r19116 by jghali - fix broken code indentation introduced in last commits

scribus-commit scribus-commit at lists.scribus.net
Sun May 11 22:57:56 UTC 2014


Author: jghali
Date: Sun May 11 22:57:56 2014
New Revision: 19116

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19116
Log:
fix broken code indentation introduced in last commits

Modified:
    trunk/Scribus/scribus/documentbuilder.cpp
    trunk/Scribus/scribus/documentbuilder.h
    trunk/Scribus/scribus/scribusdoc.cpp
    trunk/Scribus/scribus/scribusdoc.h

Modified: trunk/Scribus/scribus/documentbuilder.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19116&path=/trunk/Scribus/scribus/documentbuilder.cpp
==============================================================================
--- trunk/Scribus/scribus/documentbuilder.cpp (original)
+++ trunk/Scribus/scribus/documentbuilder.cpp Sun May 11 22:57:56 2014
@@ -52,15 +52,15 @@
 {
 	ScribusDoc* doc = new ScribusDoc();
 
-	doc->is12doc=false;
-    doc->appMode = modeNormal;
-    doc->HasCMS = false;
-    //doc->setActiveLayer(0); //CB should not need this, the file load process sets it to ALAYER from the doc
-    doc->OpenNodes.clear();
-    doc->setLoading(true);
-    doc->SoftProofing = false;
-    doc->Gamut = false;
-  
+	doc->is12doc = false;
+	doc->appMode = modeNormal;
+	doc->HasCMS = false;
+	//doc->setActiveLayer(0); //CB should not need this, the file load process sets it to ALAYER from the doc
+	doc->OpenNodes.clear();
+	doc->setLoading(true);
+	doc->SoftProofing = false;
+	doc->Gamut = false;
+	
 	return doc;
 }
 
@@ -90,8 +90,8 @@
 		page->MPageNam = QString("");
 	else if (page->MPageNam.isEmpty())
 		page->MPageNam = QString("Normal");
-    page->setInitialWidth(page->width());
-    page->setInitialHeight(page->height());
+	page->setInitialWidth(page->width());
+	page->setInitialHeight(page->height());
 	return page;
 }
 
@@ -102,35 +102,34 @@
 	const PageItem::ItemFrameType frameType = static_cast<PageItem::ItemFrameType> (frameTypeI);
 	
 	PageItem* newItem = m_doc->createPageItem(itemType, frameType, x,y,b,h,w,fill, outline);
-    m_doc->Items->append(newItem);
+	m_doc->Items->append(newItem);
 	return newItem;
 }
 
 
 PageItem* DocumentBuilder::finishPageItem(PageItem* newItem)
 {
-
-        if (newItem->asImageFrame() || newItem->asLatexFrame())
-        {
-            if (!newItem->Pfile.isEmpty())
-            {
-                    m_doc->loadPict(newItem->Pfile, newItem, false);
-                    //if (newItem->pixm.imgInfo.PDSpathData.contains(clipPath))
-                    //{
-                      //      newItem->imageClip = newItem->pixm.imgInfo.PDSpathData[clipPath].copy();
-                            //newItem->pixm.imgInfo.usedPath = clipPath;
-                        //    QTransform cl;
-                          //  cl.translate(newItem->imageXOffset()*newItem->imageXScale(), newItem->imageYOffset()*newItem->imageYScale());
-                           // cl.scale(newItem->imageXScale(), newItem->imageYScale());
-                           // newItem->imageClip.map(cl);
-                    //}
-                    //if (layerFound)
-                    //{
-                      //      newItem->pixm.imgInfo.isRequest = true;
-                        //    m_doc->loadPict(newItem->Pfile, newItem, true);
-                    //}
-            }
-        }
-        return newItem;
+	if (newItem->asImageFrame() || newItem->asLatexFrame())
+	{
+		if (!newItem->Pfile.isEmpty())
+		{
+				m_doc->loadPict(newItem->Pfile, newItem, false);
+				/* if (newItem->pixm.imgInfo.PDSpathData.contains(clipPath))
+				{
+					newItem->imageClip = newItem->pixm.imgInfo.PDSpathData[clipPath].copy();
+					newItem->pixm.imgInfo.usedPath = clipPath;
+					QTransform cl;
+					cl.translate(newItem->imageXOffset()*newItem->imageXScale(), newItem->imageYOffset()*newItem->imageYScale());
+					cl.scale(newItem->imageXScale(), newItem->imageYScale());
+					newItem->imageClip.map(cl);
+				}
+				if (layerFound)
+				{
+					newItem->pixm.imgInfo.isRequest = true;
+					m_doc->loadPict(newItem->Pfile, newItem, true);
+				} */
+		}
+	}
+	return newItem;
 }
 

Modified: trunk/Scribus/scribus/documentbuilder.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19116&path=/trunk/Scribus/scribus/documentbuilder.h
==============================================================================
--- trunk/Scribus/scribus/documentbuilder.h (original)
+++ trunk/Scribus/scribus/documentbuilder.h Sun May 11 22:57:56 2014
@@ -29,18 +29,18 @@
 	DocumentBuilder(ScribusDoc*);
 	virtual ~DocumentBuilder();
 
-    virtual ScribusDoc* createDocument();
+	virtual ScribusDoc* createDocument();
 	virtual void setDocument(ScribusDoc*);
-    virtual ScribusDoc* finishDocument(ScribusDoc*);
+	virtual ScribusDoc* finishDocument(ScribusDoc*);
 
-    virtual ScPage* createScPage(int number, const QString& name);
-    virtual ScPage* finishScPage(ScPage*);
+	virtual ScPage* createScPage(int number, const QString& name);
+	virtual ScPage* finishScPage(ScPage*);
 
 	virtual PageItem* createPageItem(int itemType, int frameType, double x, double y, double b, double h, double w, const QString& fill, const QString& outline);
-    virtual PageItem* finishPageItem(PageItem*);
+	virtual PageItem* finishPageItem(PageItem*);
 
-    ScribusDoc* document()
-    {
+	ScribusDoc* document()
+	{
 		return m_doc;
 	}
 };

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19116&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Sun May 11 22:57:56 2014
@@ -5357,7 +5357,7 @@
 //			Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Unspecified);
 			break;
 		case PageItem::TextFrame:
-            newItem = new PageItem_TextFrame(this, x, y, b, h, w, CommonStrings::None, outline);
+			newItem = new PageItem_TextFrame(this, x, y, b, h, w, CommonStrings::None, outline);
 //			Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Unspecified);
 			break;
 		case PageItem::Line:
@@ -5419,12 +5419,12 @@
 //			qDebug() << "unknown item type";
 			assert (false);
 	}
-    if (newItem != NULL)
-    {   
-        //Add in item default values based on itemType and frameType
-        itemAddDetails(itemType, frameType, newItem);
-    }
-    return newItem;
+	if (newItem != NULL)
+	{
+		//Add in item default values based on itemType and frameType
+		itemAddDetails(itemType, frameType, newItem);
+	}
+	return newItem;
 }
 
 int ScribusDoc::itemAdd(const PageItem::ItemType itemType, const PageItem::ItemFrameType frameType, const double x, const double y, const double b, const double h, const double w, const QString& fill, const QString& outline, const bool itemFinalised, const bool noteFrame)
@@ -5435,20 +5435,20 @@
 	{
 		activeTransaction = new UndoTransaction(undoManager->beginTransaction());
 	}
-    
-    PageItem* newItem;
-    if (noteFrame)
-    {    
-        newItem = new PageItem_NoteFrame(this, x, y, b, h, w, CommonStrings::None, outline);
-        itemAddDetails(itemType, frameType, newItem);
-    }
-    else
-        newItem = createPageItem(itemType, frameType, x, y, b, h, w, fill, outline); 
-    
-    Q_CHECK_PTR(newItem);
+	
+	PageItem* newItem;
+	if (noteFrame)
+	{
+		newItem = new PageItem_NoteFrame(this, x, y, b, h, w, CommonStrings::None, outline);
+		itemAddDetails(itemType, frameType, newItem);
+	}
+	else
+		newItem = createPageItem(itemType, frameType, x, y, b, h, w, fill, outline); 
+	
+	Q_CHECK_PTR(newItem);
 	if (newItem==NULL)
 		return -1;
-    
+	
 	Items->append(newItem);
 	if (UndoManager::undoEnabled())
 	{

Modified: trunk/Scribus/scribus/scribusdoc.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19116&path=/trunk/Scribus/scribus/scribusdoc.h
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.h (original)
+++ trunk/Scribus/scribus/scribusdoc.h Sun May 11 22:57:56 2014
@@ -774,12 +774,12 @@
 	 */
 	bool copyPageToMasterPage(const int, const int, const int, const QString&, bool);
 	
-    
-    /**
-     * @brief Just create but don't add to items list and don't create undo record
-     */
-    PageItem* createPageItem(const PageItem::ItemType itemType, const PageItem::ItemFrameType frameType, double x, double y, double b, double h, double w, const QString& fill, const QString& outline);
-    
+	
+	/**
+	 * @brief Just create but don't add to items list and don't create undo record
+	 */
+	PageItem* createPageItem(const PageItem::ItemType itemType, const PageItem::ItemFrameType frameType, double x, double y, double b, double h, double w, const QString& fill, const QString& outline);
+	
 	/**
 	 * @brief Add an Item to the document.
 	 * A simple function to create an item of a defined type and add it to the document




More information about the scribus-commit mailing list