r22993 by jghali - Fix small indentation issues

scribus-commit scribus-commit at lists.scribus.net
Fri May 31 14:10:03 UTC 2019


Author: jghali
Date: Fri May 31 14:10:03 2019
New Revision: 22993

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22993
Log:
Fix small indentation issues

Modified:
    trunk/Scribus/scribus/text/storytext.cpp
    trunk/Scribus/scribus/text/storytext.h
    trunk/Scribus/scribus/ui/spalette.cpp

Modified: trunk/Scribus/scribus/text/storytext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22993&path=/trunk/Scribus/scribus/text/storytext.cpp
==============================================================================
--- trunk/Scribus/scribus/text/storytext.cpp	(original)
+++ trunk/Scribus/scribus/text/storytext.cpp	Fri May 31 14:10:03 2019
@@ -58,7 +58,7 @@
 	m_shapedTextCache = new ShapedTextCache();
 	
 	d->len = 0;
-    orphanedCharStyle = defaultStyle().charStyle();
+	orphanedCharStyle = defaultStyle().charStyle();
 	invalidateAll();
 }
 
@@ -556,13 +556,13 @@
 	if (pos + static_cast<int>(len) > length())
 		len = length() - pos;
 
-    if (pos == 0 && len > 0 && len == length())
-    {
-        int lastChar = length() - 1;
-        while (lastChar > 0 && text(lastChar) == SpecialChars::PARSEP)
-            --lastChar;
-        orphanedCharStyle = charStyle(lastChar);
-    }
+	if (pos == 0 && len > 0 && len == length())
+	{
+		int lastChar = length() - 1;
+		while (lastChar > 0 && text(lastChar) == SpecialChars::PARSEP)
+			--lastChar;
+		orphanedCharStyle = charStyle(lastChar);
+	}
 	for (int i = pos + static_cast<int>(len) - 1; i >= pos; --i)
 	{
 		ScText *it = d->at(i);
@@ -1019,7 +1019,7 @@
 
 	StoryText* that = const_cast<StoryText *>(this);
 	if (that->d->at(pos)->ch == SpecialChars::OBJECT)
-        return that->d->at(pos)->hasMark(mrk);
+		return that->d->at(pos)->hasMark(mrk);
 	return false;
 }
 
@@ -1992,7 +1992,7 @@
 void StoryText::invalidateAll()
 {
 	d->pstyleContext.invalidate();
-    invalidate(0, length());
+	invalidate(0, length());
 }
 
 void StoryText::invalidate(int firstItem, int endItem)

Modified: trunk/Scribus/scribus/text/storytext.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22993&path=/trunk/Scribus/scribus/text/storytext.h
==============================================================================
--- trunk/Scribus/scribus/text/storytext.h	(original)
+++ trunk/Scribus/scribus/text/storytext.h	Fri May 31 14:10:03 2019
@@ -72,12 +72,13 @@
 {
 	Q_OBJECT
 	
- public:
+public:
 	StoryText(ScribusDoc *doc);
- 	StoryText();
- 	StoryText(const StoryText & other);
- 	StoryText& operator= (const StoryText & other);
- 	virtual ~StoryText();
+	StoryText();
+	StoryText(const StoryText & other);
+	StoryText& operator= (const StoryText & other);
+	virtual ~StoryText();
+	
 	void setDoc(ScribusDoc *docin);
 	
 	static const Xml_string saxxDefaultElem;
@@ -99,7 +100,7 @@
 	void moveCursorWordLeft();
 	void moveCursorWordRight();
 
- 	void clear();
+	void clear();
 	StoryText copy() const;
 
 	// Find text in story
@@ -161,10 +162,10 @@
 	QString sentence(int pos, int &posn);
 
 	bool hasObject(int pos) const;
- 	PageItem* getItem(int pos) const; // deprecated
+	PageItem* getItem(int pos) const; // deprecated
 	bool hasMark(int pos, Mark* mrk = nullptr) const;
 	Mark *mark(int pos) const;
-    void replaceMark(int pos, Mark* mrk);
+	void replaceMark(int pos, Mark* mrk);
 	void applyMarkCharstyle(Mark* mrk, CharStyle& currStyle) const;
 
 	bool isHighSurrogate(int pos) const;
@@ -177,15 +178,15 @@
 	// Get paragraph style at current cursor position
 	const ParagraphStyle& paragraphStyle() const;
 	// Get paragraph style at specific position
- 	const ParagraphStyle& paragraphStyle(int pos) const;
- 	const ParagraphStyle& defaultStyle() const;
- 	void setDefaultStyle(const ParagraphStyle& style);
- 	void setCharStyle(int pos, uint len, const CharStyle& style);
- 	void setStyle(int pos, const ParagraphStyle& style);
- 	void applyCharStyle(int pos, uint len, const CharStyle& style);
- 	void applyStyle(int pos, const ParagraphStyle& style, bool rmDirectFormatting = false);
- 	void eraseCharStyle(int pos, uint len, const CharStyle& style);
- 	void eraseStyle(int pos, const ParagraphStyle& style);
+	const ParagraphStyle& paragraphStyle(int pos) const;
+	const ParagraphStyle& defaultStyle() const;
+	void setDefaultStyle(const ParagraphStyle& style);
+	void setCharStyle(int pos, uint len, const CharStyle& style);
+	void setStyle(int pos, const ParagraphStyle& style);
+	void applyCharStyle(int pos, uint len, const CharStyle& style);
+	void applyStyle(int pos, const ParagraphStyle& style, bool rmDirectFormatting = false);
+	void eraseCharStyle(int pos, uint len, const CharStyle& style);
+	void eraseStyle(int pos, const ParagraphStyle& style);
 	void replaceStyles(const QMap<QString,QString>& newNameForOld);
 	void replaceCharStyles(QMap<QString,QString> newNameForOld);
 
@@ -199,17 +200,17 @@
 	void getNamedResources(ResourceCollection& lists) const;
 	void replaceNamedResources(ResourceCollection& newNames);
 	
- 	uint nrOfParagraphs() const;
+	uint nrOfParagraphs() const;
 	int startOfParagraph() const;
- 	int startOfParagraph(uint index) const;
+	int startOfParagraph(uint index) const;
 	int endOfParagraph() const;
- 	int endOfParagraph(uint index) const;
+	int endOfParagraph(uint index) const;
 	uint nrOfParagraph() const;
 	uint nrOfParagraph(int pos) const;
 
- 	uint nrOfRuns() const;
- 	int startOfRun(uint index) const;
- 	int endOfRun(uint index) const;
+	uint nrOfRuns() const;
+	int startOfRun(uint index) const;
+	int endOfRun(uint index) const;
 
 // positioning
 	int nextChar(int pos);
@@ -235,13 +236,13 @@
 
 // selection
 
- 	void selectAll();
- 	void deselectAll();
- 	void removeSelection();
- 	void extendSelection(int oldPos, int newPos);
+	void selectAll();
+	void deselectAll();
+	void removeSelection();
+	void extendSelection(int oldPos, int newPos);
 	int selectWord(int pos);
 	void select(int pos, int len, bool on = true);
- 	bool selected(int pos) const;
+	bool selected(int pos) const;
 	int startOfSelection() const;
 	int endOfSelection() const;
 	int selectionLength() const;
@@ -264,26 +265,26 @@
 //  when physical view doesn't match logical view any more:
 
 	/// call this if the shape of an embedded object changes (redos layout)
- 	void invalidateObject(const PageItem* embedded);
- 	/// call this if the shape of the paragraph changes (redos layout)
- 	void invalidateLayout();
+	void invalidateObject(const PageItem* embedded);
+	/// call this if the shape of the paragraph changes (redos layout)
+	void invalidateLayout();
 
 public slots:
 	/// call this if some logical style changes (redos shaping and layout)
- 	void invalidateAll();
+	void invalidateAll();
 
 signals:
 	void changed(int firstItem, int endItem);
 
 private:
- 	ScText * item(uint index);
- 	const ScText * item(uint index) const;
+	ScText * item(uint index);
+	const ScText * item(uint index) const;
 	void fixSurrogateSelection();
 	
 private:
 	ScribusDoc * m_doc; 
 	int m_selFirst, m_selLast;
-    CharStyle orphanedCharStyle;
+	CharStyle orphanedCharStyle;
 	ShapedTextCache* m_shapedTextCache;
 	static BreakIterator* m_graphemeIterator;
 	static BreakIterator* m_wordIterator;
@@ -293,20 +294,20 @@
 	QString textWithSoftHyphens (int pos, uint len) const;
 	void    insertCharsWithSoftHyphens(int pos, const QString& txt, bool applyNeighbourStyle = false);
 	
- 	/// mark these runs as invalid, ie. need itemize and shaping
- 	void invalidate(int firstRun, int lastRun);
- 	void removeParSep(int pos);
- 	void insertParSep(int pos);
+	/// mark these runs as invalid, ie. need itemize and shaping
+	void invalidate(int firstRun, int lastRun);
+	void removeParSep(int pos);
+	void insertParSep(int pos);
 
 	// 	int splitRun(int pos);
- 	
- 	/** bring physical view in sync with logical one. 
- 	 *  This gets called automatically from all physical view methods
+	
+	/** bring physical view in sync with logical one. 
+	 *  This gets called automatically from all physical view methods
  	 */
 // 	void validate();
- 	/// private data structure
- 	ScText_Shared * d;
- 	/// gives the physical view which was last given to the layouter
+	/// private data structure
+	ScText_Shared * d;
+	/// gives the physical view which was last given to the layouter
 // 	uint layouterVersion;
  	/// is true after layout() has been exercised
 // 	bool layouterValid;

Modified: trunk/Scribus/scribus/ui/spalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22993&path=/trunk/Scribus/scribus/ui/spalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/spalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/spalette.cpp	Fri May 31 14:10:03 2019
@@ -32,7 +32,7 @@
 ParaStyleComboBox::ParaStyleComboBox(QWidget* parent) : QComboBox(parent)
 {
 	setEditable(false);
-    addItem( CommonStrings::trDefaultParagraphStyle );
+	addItem( CommonStrings::trDefaultParagraphStyle );
 	currentDoc = nullptr;
 	connect(this, SIGNAL(activated(int)), this, SLOT(selFormat(int)));
 }
@@ -96,7 +96,7 @@
 CharStyleComboBox::CharStyleComboBox(QWidget* parent) : QComboBox(parent)
 {
 	setEditable(false);
-    addItem( CommonStrings::trDefaultCharacterStyle );
+	addItem( CommonStrings::trDefaultCharacterStyle );
 	currentDoc = nullptr;
 	connect(this, SIGNAL(activated(int)), this, SLOT(selFormat(int)));
 }
@@ -127,7 +127,7 @@
 		for (int x = 0; x < currentDoc->charStyles().count(); ++x)
 		{
 			if ( !currentDoc->charStyles()[x].name().isEmpty() &&
-                !currentDoc->charStyles()[x].isDefaultStyle())
+			    !currentDoc->charStyles()[x].isDefaultStyle())
 				st.append(currentDoc->charStyles()[x].name());
 		}
 		st.sort();
@@ -161,7 +161,7 @@
 CellStyleComboBox::CellStyleComboBox(QWidget* parent) : QComboBox(parent)
 {
 	setEditable(false);
-    addItem( CommonStrings::trDefaultCellStyle );
+	addItem( CommonStrings::trDefaultCellStyle );
 	currentDoc = nullptr;
 	connect(this, SIGNAL(activated(int)), this, SLOT(selFormat(int)));
 }
@@ -192,7 +192,7 @@
 		for (int x = 0; x < currentDoc->cellStyles().count(); ++x)
 		{
 			if ( !currentDoc->cellStyles()[x].name().isEmpty() &&
-                !currentDoc->cellStyles()[x].isDefaultStyle())
+			    !currentDoc->cellStyles()[x].isDefaultStyle())
 				st.append(currentDoc->cellStyles()[x].name());
 		}
 		st.sort();
@@ -258,7 +258,7 @@
 		for (int x = 0; x < currentDoc->tableStyles().count(); ++x)
 		{
 			if ( !currentDoc->tableStyles()[x].name().isEmpty() &&
-                !currentDoc->tableStyles()[x].isDefaultStyle())
+			    !currentDoc->tableStyles()[x].isDefaultStyle())
 				st.append(currentDoc->tableStyles()[x].name());
 		}
 		st.sort();




More information about the scribus-commit mailing list