r13873 by jghali - #5820 : make layer hierarchy apply on masterpage Mega behavior change. Formerly elements were drawn in following order : master page element then std page elements. As a consequence it was no possible to put a master page element in front of a std page element. From now on layers are drawn one by one with master page elements belonging to the layer first, then std page element. So a master page element from a top layer will always be drawn above a std page element from a bottom layer

scribus-commit scribus-commit at lists.scribus.net
Wed Aug 26 05:42:52 CEST 2009


Revision: 13873
Author: jghali
Date: 2009-08-16T21:56:23.684614Z
Commit message: #5820 : make layer hierarchy apply on masterpage
Mega behavior change. Formerly elements were drawn in following order : master page element then std page elements. As a consequence it was no possible to put a master page element in front of a std page element. From now on layers are drawn one by one with master page elements belonging to the layer first, then std page element. So a master page element from a top layer will always be drawn above a std page element from a bottom layer

Changeset: 
M  /trunk/Scribus/scribus/scpageoutput.h
M  /trunk/Scribus/scribus/CMakeLists.txt
M  /trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
M  /trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
M  /trunk/Scribus/scribus/scribusview.cpp
M  /trunk/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp
M  /trunk/Scribus/scribus/sclayer.h
M  /trunk/Scribus/scribus/pdflib_core.cpp
A  /trunk/Scribus/scribus/util_layer.cpp
M  /trunk/Scribus/scribus/pslib.cpp
M  /trunk/Scribus/scribus/canvas.cpp
M  /trunk/Scribus/scribus/ui/multiprogressdialog.cpp
M  /trunk/Scribus/scribus/plugins/svgexplugin/svgexplugin.h
M  /trunk/Scribus/scribus/pdflib_core.h
M  /trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
M  /trunk/Scribus/scribus/pslib.h
A  /trunk/Scribus/scribus/util_layer.h
M  /trunk/Scribus/scribus/canvas.h
M  /trunk/Scribus/scribus/ui/multiprogressdialog.h
M  /trunk/Scribus/scribus/scpageoutput.cpp
M  /trunk/Scribus/win32/vc8/Scribus.vcproj

Diffs:
Index: scribus/pdflib_core.cpp
===================================================================
--- scribus/pdflib_core.cpp	(revision 13872)
+++ scribus/pdflib_core.cpp	(revision 13873)
@@ -2689,17 +2689,9 @@
 
 bool PDFLibCore::PDF_ProcessPage(const Page* pag, uint PNr, bool clip)
 {
-	QStack<PageItem*> groupStack;
-	QStack<PageItem*> groupStackS;
-	QStack<QString>      groupDataStack;
-	QString tmp, output;
 	ActPageP = pag;
-	PageItem* ite;
-	QList<PageItem*> PItems;
-	int Lnr = 0;
 	ScLayer ll;
 	ll.isPrintable = false;
-	ll.LNr = 0;
 	if (Options.UseLPI)
 		PutPage("/"+HTName+" gs\n");
 	double bleedRight = 0.0;
@@ -2728,278 +2720,297 @@
 		PutPage(FToStr(ActPageP->Margins.Left)+" "+FToStr(ActPageP->Margins.Bottom)+" "+FToStr(maxBoxX)+" "+FToStr(maxBoxY)+" re W n\n");
 	//	PutPage("0 0 "+FToStr(ActPageP->width())+" "+FToStr(ActPageP->height())+" re W n\n");
 	}
-	if (!pag->MPageNam.isEmpty())
+	//CB *2 because the Pitems count loop runs twice.. y.. dunno.
+	if (usingGUI && pag->pageName().isEmpty())
+		progressDialog->setProgress("ECPI", 0, doc.DocItems.count()*2);
+	for (int lam = 0; lam < doc.Layers.count() && !abortExport; ++lam)
 	{
-		const Page* mPage = doc.MasterPages.at(doc.MasterNames[doc.Pages->at(PNr)->MPageNam]);
-		int   mPageIndex  = doc.MasterPages.indexOf((Page* const) mPage) + 1;
-		if (doc.MasterItems.count() != 0)
+		ll.isPrintable = false;
+		doc.Layers.levelToLayer(ll, lam);
+		if (!PDF_ProcessMasterElements(ll, pag, PNr))
+			return false;
+		if (!PDF_ProcessPageElements(ll, pag, PNr))
+			return false;
+	}
+	PutPage("Q\n"); // Restore
+	return true;
+}
+
+bool PDFLibCore::PDF_ProcessMasterElements(const ScLayer& layer, const Page* pag, uint PNr)
+{
+	PageItem* ite;
+	QString output;
+	QStack<PageItem*> groupStack;
+	QStack<PageItem*> groupStackS;
+	QStack<QString>   groupDataStack;
+	QList<PageItem*> PItems;
+
+	if (pag->MPageNam.isEmpty())
+		return true;
+	if (doc.MasterItems.count() <= 0)
+		return true;
+	const Page* mPage = doc.MasterPages.at(doc.MasterNames[doc.Pages->at(PNr)->MPageNam]);
+	int   mPageIndex  = doc.MasterPages.indexOf((Page* const) mPage) + 1;
+
+	if (!Options.MirrorH)
+		PutPage("1 0 0 1 0 0 cm\n");
+	if ((layer.isPrintable) || ((Options.Version == PDFOptions::PDFVersion_15) && (Options.useLayers)))
+	{
+		if ((Options.Version == PDFOptions::PDFVersion_15) && (Options.useLayers))
+			PutPage("/OC /"+OCGEntries[layer.Name].Name+" BDC\n");
+		for (int am = 0; am < pag->FromMaster.count() && !abortExport; ++am)
 		{
-			if (!Options.MirrorH)
-				PutPage("1 0 0 1 0 0 cm\n");
-			for (int lam = 0; lam < doc.Layers.count() && !abortExport; ++lam)
+			ite = pag->FromMaster.at(am);
+			if (usingGUI)
+				qApp->processEvents();
+			if ((ite->LayerNr != layer.LNr) || (!ite->printEnabled()))
+				continue;
+			if ((!pag->pageName().isEmpty()) && (ite->OwnPage != static_cast<int>(pag->pageNr())) && (ite->OwnPage != -1))
+				continue;
+			QString name = QString("/master_page_obj_%1_%2").arg(mPageIndex).arg(ite->ItemNr);
+			if (ite->isGroupControl)
 			{
-				doc.Layers.levelToLayer(ll, Lnr);
-				Lnr++;
-				if ((ll.isPrintable) || ((Options.Version == PDFOptions::PDFVersion_15) && (Options.useLayers)))
+				PutPage("q\n");
+				FPointArray cl = ite->PoLine.copy();
+				FPointArray clb = ite->PoLine.copy();
+				QMatrix mm;
+				mm.translate(ite->xPos() - mPage->xOffset(), (ite->yPos() - mPage->yOffset()) - mPage->height());
+				mm.rotate(ite->rotation());
+				cl.map( mm );
+				ite->PoLine = cl;
+				PutPage(SetClipPath(ite));
+				PutPage("h W* n\n");
+				groupStack.push(ite->groupsLastItem);
+				ite->PoLine = clb.copy();
+				continue;
+			}
+			if (! ite->asTextFrame())
+				PutPage(name+" Do\n");
+			else
+			{
+				double oldX = ite->xPos();
+				double oldY = ite->yPos();
+				double OldBX = ite->BoundingX;
+				double OldBY = ite->BoundingY;
+				ite->setXPos(ite->xPos() - mPage->xOffset() + pag->xOffset(), true);
+				ite->setYPos(ite->yPos() - mPage->yOffset() + pag->yOffset(), true);
+				if (!PDF_ProcessItem(output, ite, pag, pag->pageNr()))
+					return false;
+				PutPage(output);
+				ite->setXYPos(oldX, oldY, true);
+				ite->BoundingX = OldBX;
+				ite->BoundingY = OldBY;
+			}
+			if (groupStack.count() != 0)
+			{
+				while (ite == groupStack.top())
 				{
-					if ((Options.Version == PDFOptions::PDFVersion_15) && (Options.useLayers))
-						PutPage("/OC /"+OCGEntries[ll.Name].Name+" BDC\n");
-					for (int am = 0; am < pag->FromMaster.count() && !abortExport; ++am)
-					{
-						ite = pag->FromMaster.at(am);
-						if (usingGUI)
-							qApp->processEvents();
-						if ((ite->LayerNr != ll.LNr) || (!ite->printEnabled()))
-							continue;
-						if ((!pag->pageName().isEmpty()) && (ite->OwnPage != static_cast<int>(pag->pageNr())) && (ite->OwnPage != -1))
-							continue;
-						QString name = QString("/master_page_obj_%1_%2").arg(mPageIndex).arg(ite->ItemNr);
-						if (ite->isGroupControl)
-						{
-							PutPage("q\n");
-							FPointArray cl = ite->PoLine.copy();
-							FPointArray clb = ite->PoLine.copy();
-							QMatrix mm;
-							mm.translate(ite->xPos() - mPage->xOffset(), (ite->yPos() - mPage->yOffset()) - mPage->height());
-							mm.rotate(ite->rotation());
-							cl.map( mm );
-							ite->PoLine = cl;
-							PutPage(SetClipPath(ite));
-							PutPage("h W* n\n");
-							groupStack.push(ite->groupsLastItem);
-							ite->PoLine = clb.copy();
-							continue;
-						}
-						if (! ite->asTextFrame())
-							PutPage(name+" Do\n");
-						else
-						{
-							double oldX = ite->xPos();
-							double oldY = ite->yPos();
-							double OldBX = ite->BoundingX;
-							double OldBY = ite->BoundingY;
-							ite->setXPos(ite->xPos() - mPage->xOffset() + pag->xOffset(), true);
-							ite->setYPos(ite->yPos() - mPage->yOffset() + pag->yOffset(), true);
-							if (!PDF_ProcessItem(output, ite, pag, pag->pageNr()))
-								return false;
-							PutPage(output);
-							ite->setXYPos(oldX, oldY, true);
-							ite->BoundingX = OldBX;
-							ite->BoundingY = OldBY;
-						}
-						if (groupStack.count() != 0)
-						{
-							while (ite == groupStack.top())
-							{
-								PutPage("Q\n");
-								groupStack.pop();
-								if (groupStack.count() == 0)
-									break;
-							}
-						}
-					}
-					for (int am = 0; am < pag->FromMaster.count(); ++am)
-					{
-						ite = pag->FromMaster.at(am);
-						if ((ite->LayerNr != ll.LNr) || (!ite->printEnabled()))
-							continue;
-						if (ite->ChangedMasterItem)
-							continue;
-						if ((!pag->pageName().isEmpty()) && (ite->OwnPage != static_cast<int>(pag->pageNr())) && (ite->OwnPage != -1))
-							continue;
-						if (!ite->isTableItem)
-							continue;
-						double oldX = ite->xPos();
-						double oldY = ite->yPos();
-						double OldBX = ite->BoundingX;
-						double OldBY = ite->BoundingY;
-						ite->setXPos(ite->xPos() - mPage->xOffset() + pag->xOffset(), true);
-						ite->setYPos(ite->yPos() - mPage->yOffset() + pag->yOffset(), true);
-						PutPage(PDF_ProcessTableItem(ite, pag));
-						ite->setXYPos(oldX, oldY, true);
-						ite->BoundingX = OldBX;
-						ite->BoundingY = OldBY;
-					}
-					if ((Options.Version == PDFOptions::PDFVersion_15) && (Options.useLayers))
-						PutPage("EMC\n");
+					PutPage("Q\n");
+					groupStack.pop();
+					if (groupStack.count() == 0)
+						break;
 				}
 			}
 		}
+		for (int am = 0; am < pag->FromMaster.count(); ++am)
+		{
+			ite = pag->FromMaster.at(am);
+			if ((ite->LayerNr != layer.LNr) || (!ite->printEnabled()))
+				continue;
+			if (ite->ChangedMasterItem)
+				continue;
+			if ((!pag->pageName().isEmpty()) && (ite->OwnPage != static_cast<int>(pag->pageNr())) && (ite->OwnPage != -1))
+				continue;
+			if (!ite->isTableItem)
+				continue;
+			double oldX = ite->xPos();
+			double oldY = ite->yPos();
+			double OldBX = ite->BoundingX;
+			double OldBY = ite->BoundingY;
+			ite->setXPos(ite->xPos() - mPage->xOffset() + pag->xOffset(), true);
+			ite->setYPos(ite->yPos() - mPage->yOffset() + pag->yOffset(), true);
+			PutPage(PDF_ProcessTableItem(ite, pag));
+			ite->setXYPos(oldX, oldY, true);
+			ite->BoundingX = OldBX;
+			ite->BoundingY = OldBY;
+		}
+		if ((Options.Version == PDFOptions::PDFVersion_15) && (Options.useLayers))
+			PutPage("EMC\n");
 	}
-	ll.isPrintable = false;
-	ll.LNr = 0;
-	Lnr = 0;
-	//CB *2 because the Pitems count loop runs twice.. y.. dunno.
-	if (usingGUI && pag->pageName().isEmpty())
-		progressDialog->setProgress("ECPI", 0, doc.DocItems.count()*2);
-	int pc_exportpagesitems=0;
+	return true;
+}
+
+bool PDFLibCore::PDF_ProcessPageElements(const ScLayer& layer, const Page* pag, uint PNr)
+{
+	PageItem* ite;
+	QString output;
+	QStack<PageItem*> groupStack;
+	QStack<PageItem*> groupStackS;
+	QStack<QString>   groupDataStack;
+	QList<PageItem*> PItems;
+
+	int pc_exportpagesitems = usingGUI ? progressDialog->progress("ECPI") : 0;
 	PItems = (pag->pageName().isEmpty()) ? doc.DocItems : doc.MasterItems;
-	for (int la = 0; la < doc.Layers.count() && !abortExport; ++la)
+	if ((layer.isPrintable) || ((Options.Version == PDFOptions::PDFVersion_15) && (Options.useLayers)))
 	{
-		doc.Layers.levelToLayer(ll, Lnr);
-		if ((ll.isPrintable) || ((Options.Version == PDFOptions::PDFVersion_15) && (Options.useLayers)))
+		QString inh = "";
+		if ((Options.Version == PDFOptions::PDFVersion_15) && (Options.useLayers))
+			PutPage("/OC /"+OCGEntries[layer.Name].Name+" BDC\n");
+		for (int a = 0; a < PItems.count() && !abortExport; ++a)
 		{
-			QString inh = "";
-			if ((Options.Version == PDFOptions::PDFVersion_15) && (Options.useLayers))
-				PutPage("/OC /"+OCGEntries[ll.Name].Name+" BDC\n");
-			for (int a = 0; a < PItems.count() && !abortExport; ++a)
+			ite = PItems.at(a);
+			if (ite->LayerNr != layer.LNr)
+				continue;
+			if (usingGUI)
 			{
-				if (usingGUI)
+				progressDialog->setProgress("ECPI", ++pc_exportpagesitems);
+				qApp->processEvents();
+			}
+			QString grcon = "";
+			if (ite->isGroupControl)
+			{
+				grcon += "q\n";
+				FPointArray cl = ite->PoLine.copy();
+				FPointArray clb = ite->PoLine.copy();
+				QMatrix mm;
+				mm.translate(ite->xPos() - pag->xOffset(), (ite->yPos() - pag->yOffset()) - pag->height());
+				mm.rotate(ite->rotation());
+				cl.map( mm );
+				ite->PoLine = cl;
+				grcon += SetClipPath(ite);
+				grcon += "h W* n\n";
+				groupStack.push(ite->groupsLastItem);
+				groupStackS.push(ite);
+				if (((layer.transparency != 1) || (layer.blendMode != 0)) && (Options.Version >= PDFOptions::PDFVersion_14))
 				{
-					progressDialog->setProgress("ECPI", ++pc_exportpagesitems);
-					qApp->processEvents();
+					inh += grcon;
+					groupDataStack.push(inh);
+					inh = "";
 				}
-				ite = PItems.at(a);
-				if (ite->LayerNr != ll.LNr)
-					continue;
-				QString grcon = "";
-				if (ite->isGroupControl)
+				else
 				{
-					grcon += "q\n";
-					FPointArray cl = ite->PoLine.copy();
-					FPointArray clb = ite->PoLine.copy();
-					QMatrix mm;
-					mm.translate(ite->xPos() - pag->xOffset(), (ite->yPos() - pag->yOffset()) - pag->height());
-					mm.rotate(ite->rotation());
-					cl.map( mm );
-					ite->PoLine = cl;
-					grcon += SetClipPath(ite);
-					grcon += "h W* n\n";
-					groupStack.push(ite->groupsLastItem);
-					groupStackS.push(ite);
-					if (((ll.transparency != 1) || (ll.blendMode != 0)) && (Options.Version >= PDFOptions::PDFVersion_14))
+					PutPage(grcon);
+					groupDataStack.push(Content);
+					Content = "";
+				}
+				ite->PoLine = clb.copy();
+				continue;
+			}
+			if (!PDF_ProcessItem(output, ite, pag, PNr))
+				return false;
+			if (((layer.transparency != 1) || (layer.blendMode != 0)) && (Options.Version >= PDFOptions::PDFVersion_14))
+				inh += output;
+			else
+				PutPage(output);
+			if (groupStack.count() != 0)
+			{
+				while (ite == groupStack.top())
+				{
+					QString tmpData;
+					PageItem *controlItem = groupStackS.pop();
+					if (((layer.transparency != 1) || (layer.blendMode != 0)) && (Options.Version >= PDFOptions::PDFVersion_14))
 					{
-						inh += grcon;
-						groupDataStack.push(inh);
-						inh = "";
+						tmpData = inh;
+						inh = groupDataStack.pop();
+						if (Options.Version >= PDFOptions::PDFVersion_14)
+							inh += Write_TransparencyGroup(controlItem->fillTransparency(), controlItem->fillBlendmode(), tmpData);
+						else
+							inh += tmpData;
+						inh += "Q\n";
 					}
 					else
 					{
-						PutPage(grcon);
-						groupDataStack.push(Content);
-						Content = "";
-					}
-					ite->PoLine = clb.copy();
-					continue;
-				}
-				if (!PDF_ProcessItem(output, ite, pag, PNr))
-					return false;
-				if (((ll.transparency != 1) || (ll.blendMode != 0)) && (Options.Version >= PDFOptions::PDFVersion_14))
-					inh += output;
-				else
-					PutPage(output);
-				if (groupStack.count() != 0)
-				{
-					while (ite == groupStack.top())
-					{
-						QString tmpData;
-						PageItem *controlItem = groupStackS.pop();
-						if (((ll.transparency != 1) || (ll.blendMode != 0)) && (Options.Version >= PDFOptions::PDFVersion_14))
-						{
-							tmpData = inh;
-							inh = groupDataStack.pop();
-							if (Options.Version >= PDFOptions::PDFVersion_14)
-								inh += Write_TransparencyGroup(controlItem->fillTransparency(), controlItem->fillBlendmode(), tmpData);
-							else
-								inh += tmpData;
-							inh += "Q\n";
-						}
+						tmpData = Content;
+						Content = groupDataStack.pop();
+						if (Options.Version >= PDFOptions::PDFVersion_14)
+							Content += Write_TransparencyGroup(controlItem->fillTransparency(), controlItem->fillBlendmode(), tmpData);
 						else
-						{
-							tmpData = Content;
-							Content = groupDataStack.pop();
-							if (Options.Version >= PDFOptions::PDFVersion_14)
-								Content += Write_TransparencyGroup(controlItem->fillTransparency(), controlItem->fillBlendmode(), tmpData);
-							else
-								Content += tmpData;
-							PutPage("Q\n");
-						}
-						groupStack.pop();
-						if (groupStack.count() == 0)
-							break;
+							Content += tmpData;
+						PutPage("Q\n");
 					}
+					groupStack.pop();
+					if (groupStack.count() == 0)
+						break;
 				}
 			}
-			for (int a = 0; a < PItems.count() && !abortExport; ++a)
+		}
+		for (int a = 0; a < PItems.count() && !abortExport; ++a)
+		{
+			ite = PItems.at(a);
+			if (ite->LayerNr != layer.LNr)
+				continue;
+			if (usingGUI)
 			{
-				if (usingGUI)
-				{
-					progressDialog->setProgress("ECPI", ++pc_exportpagesitems);
-					qApp->processEvents();
-				}
-				ite = PItems.at(a);
-				if (ite->LayerNr != ll.LNr)
-					continue;
-				if (!ite->isTableItem)
-					continue;
-				double bLeft, bRight, bBottom, bTop;
-				getBleeds(ActPageP, bLeft, bRight, bBottom, bTop);
-				double x  = pag->xOffset() - bLeft;
-				double y  = pag->yOffset() - bTop;
-				double w  = pag->width()  + bLeft + bRight;
-				double h1 = pag->height() + bBottom + bTop;
-				double ilw= ite->lineWidth();
-				double x2 = ite->BoundingX - ilw / 2.0;
-				double y2 = ite->BoundingY - ilw / 2.0;
-				double w2 = qMax(ite->BoundingW + ilw, 1.0);
-				double h2 = qMax(ite->BoundingH + ilw, 1.0);
-				if (!( qMax( x, x2 ) <= qMin( x+w, x2+w2 ) && qMax( y, y2 ) <= qMin( y+h1, y2+h2 )))
-					continue;
-				if (ite->ChangedMasterItem)
-					continue;
-				if ((!pag->pageName().isEmpty()) && (ite->OwnPage != static_cast<int>(pag->pageNr())) && (ite->OwnPage != -1))
-					continue;
-				if (!ite->printEnabled())
-					continue;
-				if (((ll.transparency != 1) || (ll.blendMode != 0)) && (Options.Version >= PDFOptions::PDFVersion_14))
-					inh += PDF_ProcessTableItem(ite, pag);
-				else
-					PutPage(PDF_ProcessTableItem(ite, pag));
+				progressDialog->setProgress("ECPI", ++pc_exportpagesitems);
+				qApp->processEvents();
 			}
-			if (((ll.transparency != 1) || (ll.blendMode != 0)) && (Options.Version >= PDFOptions::PDFVersion_14))
-			{
-				int Gobj = newObject();
-				StartObj(Gobj);
-				PutDoc("<< /Type /Group\n");
-				PutDoc("/S /Transparency\n");
-				PutDoc("/I false\n");
-				PutDoc("/K false\n");
-				PutDoc(">>\nendobj\n");
-				QString ShName = ResNam+QString::number(ResCount);
-				ResCount++;
-				Transpar[ShName] = writeGState("/CA "+FToStr(ll.transparency)+"\n"
-											   + "/ca "+FToStr(ll.transparency)+"\n"
-											   + "/SMask /None\n/AIS false\n/OPM 1\n"
-											   + "/BM /" + blendMode(ll.blendMode) + "\n");
-				uint formObject = newObject();
-				StartObj(formObject);
-				PutDoc("<<\n/Type /XObject\n/Subtype /Form\n/FormType 1\n");
-				double bleedRight = 0.0;
-				double bleedLeft  = 0.0;
-				getBleeds(ActPageP, bleedLeft, bleedRight);
-				double maxBoxX = ActPageP->width()+bleedRight+bleedLeft;
-				double maxBoxY = ActPageP->height()+Options.bleeds.Top+Options.bleeds.Bottom;
-				PutDoc("/BBox [ "+FToStr(-bleedLeft)+" "+FToStr(-Options.bleeds.Bottom)+" "+FToStr(maxBoxX)+" "+FToStr(maxBoxY)+" ]\n");
-				PutDoc("/Group "+QString::number(Gobj)+" 0 R\n");
-				if (Options.Compress)
-					inh = CompressStr(&inh);
-				PutDoc("/Length "+QString::number(inh.length()+1));
-				if (Options.Compress)
-					PutDoc("\n/Filter /FlateDecode");
-				PutDoc(" >>\nstream\n"+EncStream(inh, formObject)+"\nendstream\nendobj\n");
-				QString name = ll.Name.simplified().replace(QRegExp("[\\s\\/\\{\\[\\]\\}\\<\\>\\(\\)\\%]"), "_") + QString::number(ll.LNr) + QString::number(PNr);
-				Seite.XObjects[name] = formObject;
-				PutPage("q\n");
-				PutPage("/"+ShName+" gs\n");
-				PutPage("/"+name+" Do\n");
-				PutPage("Q\n");
-			}
-			if ((Options.Version == PDFOptions::PDFVersion_15) && (Options.useLayers))
-				PutPage("EMC\n");
+			if (!ite->isTableItem)
+				continue;
+			double bLeft, bRight, bBottom, bTop;
+			getBleeds(ActPageP, bLeft, bRight, bBottom, bTop);
+			double x  = pag->xOffset() - bLeft;
+			double y  = pag->yOffset() - bTop;
+			double w  = pag->width()  + bLeft + bRight;
+			double h1 = pag->height() + bBottom + bTop;
+			double ilw= ite->lineWidth();
+			double x2 = ite->BoundingX - ilw / 2.0;
+			double y2 = ite->BoundingY - ilw / 2.0;
+			double w2 = qMax(ite->BoundingW + ilw, 1.0);
+			double h2 = qMax(ite->BoundingH + ilw, 1.0);
+			if (!( qMax( x, x2 ) <= qMin( x+w, x2+w2 ) && qMax( y, y2 ) <= qMin( y+h1, y2+h2 )))
+				continue;
+			if (ite->ChangedMasterItem)
+				continue;
+			if ((!pag->pageName().isEmpty()) && (ite->OwnPage != static_cast<int>(pag->pageNr())) && (ite->OwnPage != -1))
+				continue;
+			if (!ite->printEnabled())
+				continue;
+			if (((layer.transparency != 1) || (layer.blendMode != 0)) && (Options.Version >= PDFOptions::PDFVersion_14))
+				inh += PDF_ProcessTableItem(ite, pag);
+			else
+				PutPage(PDF_ProcessTableItem(ite, pag));
 		}
-		Lnr++;
+		if (((layer.transparency != 1) || (layer.blendMode != 0)) && (Options.Version >= PDFOptions::PDFVersion_14))
+		{
+			int Gobj = newObject();
+			StartObj(Gobj);
+			PutDoc("<< /Type /Group\n");
+			PutDoc("/S /Transparency\n");
+			PutDoc("/I false\n");
+			PutDoc("/K false\n");
+			PutDoc(">>\nendobj\n");
+			QString ShName = ResNam+QString::number(ResCount);
+			ResCount++;
+			Transpar[ShName] = writeGState("/CA "+FToStr(layer.transparency)+"\n"
+										   + "/ca "+FToStr(layer.transparency)+"\n"
+										   + "/SMask /None\n/AIS false\n/OPM 1\n"
+										   + "/BM /" + blendMode(layer.blendMode) + "\n");
+			uint formObject = newObject();
+			StartObj(formObject);
+			PutDoc("<<\n/Type /XObject\n/Subtype /Form\n/FormType 1\n");
+			double bleedRight = 0.0;
+			double bleedLeft  = 0.0;
+			getBleeds(ActPageP, bleedLeft, bleedRight);
+			double maxBoxX = ActPageP->width()+bleedRight+bleedLeft;
+			double maxBoxY = ActPageP->height()+Options.bleeds.Top+Options.bleeds.Bottom;
+			PutDoc("/BBox [ "+FToStr(-bleedLeft)+" "+FToStr(-Options.bleeds.Bottom)+" "+FToStr(maxBoxX)+" "+FToStr(maxBoxY)+" ]\n");
+			PutDoc("/Group "+QString::number(Gobj)+" 0 R\n");
+			if (Options.Compress)
+				inh = CompressStr(&inh);
+			PutDoc("/Length "+QString::number(inh.length()+1));
+			if (Options.Compress)
+				PutDoc("\n/Filter /FlateDecode");
+			PutDoc(" >>\nstream\n"+EncStream(inh, formObject)+"\nendstream\nendobj\n");
+			QString name = layer.Name.simplified().replace(QRegExp("[\\s\\/\\{\\[\\]\\}\\<\\>\\(\\)\\%]"), "_") + QString::number(layer.LNr) + QString::number(PNr);
+			Seite.XObjects[name] = formObject;
+			PutPage("q\n");
+			PutPage("/"+ShName+" gs\n");
+			PutPage("/"+name+" Do\n");
+			PutPage("Q\n");
+		}
+		if ((Options.Version == PDFOptions::PDFVersion_15) && (Options.useLayers))
+			PutPage("EMC\n");
 	}
-	PutPage("Q\n"); // Restore
 	return true;
 }
 
Index: scribus/util_layer.h
===================================================================
--- scribus/util_layer.h	(revision 0)
+++ scribus/util_layer.h	(revision 13873)
@@ -0,0 +1,19 @@
+/*
+For general Scribus (>=1.3.2) copyright and licensing information please refer
+to the COPYING file provided with the program. Following this notice may exist
+a copyright and/or license notice that predates the release of Scribus 1.3.2
+for which a new license (GPL+exception) is in place.
+*/
+#ifndef _UTIL_LAYER_H
+#define _UTIL_LAYER_H
+
+#include "scribusapi.h"
+
+class ScribusDoc;
+
+/*! \brief Recreate layers so that pre-1.5.0svn doc keep their visual aspect when loaded in 1.5.0svn+
+ * \param doc the scribus document
+ */
+void SCRIBUS_API handleOldLayerBehavior(ScribusDoc* doc);
+
+#endif
Index: scribus/pslib.h
===================================================================
--- scribus/pslib.h	(revision 13872)
+++ scribus/pslib.h	(revision 13873)
@@ -46,6 +46,7 @@
 class PageItem;
 class MultiProgressDialog;
 class ScImage;
+class ScLayer;
 
 /**
   *@author Franz Schmid
@@ -122,7 +123,9 @@
 		virtual void PS_TemplateEnd();
 		virtual void PS_UseTemplate(QString Name);
 		virtual bool ProcessItem(ScribusDoc* Doc, Page* a, PageItem* c, uint PNr, bool sep, bool farb, bool ic, bool gcr, bool master, bool embedded = false, bool useTemplate = false);
-		virtual void ProcessPage(ScribusDoc* Doc, /*ScribusView* view,*/Page* a, uint PNr, bool sep = false, bool farb = true, bool ic = false, bool gcr = true);
+		virtual void ProcessPage(ScribusDoc* Doc, Page* a, uint PNr, bool sep = false, bool farb = true, bool ic = false, bool gcr = true);
+		virtual bool ProcessMasterPageLayer(ScribusDoc* Doc, Page* a, ScLayer& ll, uint PNr, bool sep = false, bool farb = true, bool ic = false, bool gcr = true);
+		virtual bool ProcessPageLayer(ScribusDoc* Doc, Page* a, ScLayer& ll, uint PNr, bool sep = false, bool farb = true, bool ic = false, bool gcr = true);
 		virtual void drawArrow(PageItem *ite, QMatrix &arrowTrans, int arrowIndex, bool gcr);
 		virtual void putColor(const QString& color, double shade, bool fill);
 		virtual void GetBleeds(Page* page, double& left, double& right);
Index: scribus/pdflib_core.h
===================================================================
--- scribus/pdflib_core.h	(revision 13872)
+++ scribus/pdflib_core.h	(revision 13873)
@@ -27,6 +27,7 @@
 class PDFOptions;
 class PrefsContext;
 class MultiProgressDialog;
+class ScLayer;
 class ScText;
 
 #include "scribusstructs.h"
@@ -83,6 +84,8 @@
 	void PDF_End_Page();
 	bool PDF_TemplatePage(const Page* pag, bool clip = false);
 	bool PDF_ProcessPage(const Page* pag, uint PNr, bool clip = false);
+	bool PDF_ProcessMasterElements(const ScLayer& layer, const Page* page, uint PNr);
+	bool PDF_ProcessPageElements(const ScLayer& layer, const Page* page, uint PNr);
 	bool PDF_End_Doc(const QString& PrintPr = "", const QString& Name = "", int Components = 0);
 	bool closeAndCleanup();
 
Index: scribus/canvas.h
===================================================================
--- scribus/canvas.h	(revision 13872)
+++ scribus/canvas.h	(revision 13873)
@@ -40,6 +40,7 @@
 
 class Page;
 class PageItem;
+class ScLayer;
 class ScPainter;
 class ScribusDoc;
 class ScribusView;
@@ -183,8 +184,8 @@
 	int previewVisual() const { return m_viewMode.previewVisual; }
 	void setPreviewVisual(int mode) { m_viewMode.previewVisual = qMax(0, mode); m_viewMode.viewAsPreview = (mode >= 0); }
 	
-	void DrawMasterItems(ScPainter *painter, Page *page, QRect clip);
-	void DrawPageItems(ScPainter *painter, QRect clip);
+	void DrawMasterItems(ScPainter *painter, Page *page, ScLayer& layer, QRect clip);
+	void DrawPageItems(ScPainter *painter, ScLayer& layer, QRect clip);
 	virtual void paintEvent ( QPaintEvent * p );
 	void displayXYHUD(QPoint m);
 	void displayCorrectedXYHUD(QPoint m, double x, double y);
Index: scribus/canvas.cpp
===================================================================
--- scribus/canvas.cpp	(revision 13872)
+++ scribus/canvas.cpp	(revision 13873)
@@ -895,6 +895,10 @@
 	painter->translate(-m_doc->minCanvasCoordinate.x(), -m_doc->minCanvasCoordinate.y());
 	painter->setLineWidth(1);
 	painter->setFillMode(ScPainter::Solid);
+
+	ScLayer layer;
+	layer.isViewable = false;
+	layer.LNr = 0;
 	
 //	Tsetup = tim.elapsed();
 	if (!m_doc->masterPageMode())
@@ -910,15 +914,21 @@
 		else
 			painter->beginLayer(1.0, 0);
 		
+		m_viewMode.linkedFramesToShow.clear();
 		if ((m_doc->guidesSettings.before) && (!m_viewMode.viewAsPreview))
 		{
 			drawGuides(painter, clipx, clipy, clipw, cliph);
 		}
-		for (uint a = 0; a < docPagesCount; ++a)
+		int layerCount = m_doc->layerCount();
+		for (int layerLevel = 0; layerLevel < layerCount; ++layerLevel)
 		{
-			DrawMasterItems(painter, m_doc->Pages->at(a), QRect(clipx, clipy, clipw, cliph));
+			m_doc->Layers.levelToLayer(layer, layerLevel);
+			for (uint a = 0; a < docPagesCount; ++a)
+			{
+				DrawMasterItems(painter, m_doc->Pages->at(a), layer, QRect(clipx, clipy, clipw, cliph));
+			}
+			DrawPageItems(painter, layer, QRect(clipx, clipy, clipw, cliph));
 		}
-		DrawPageItems(painter, QRect(clipx, clipy, clipw, cliph));
 		painter->endLayer();
 //		Tcontents = tim.elapsed();
 		if ((!m_doc->guidesSettings.before) && (!m_viewMode.viewAsPreview))
@@ -928,11 +938,17 @@
 	}
 	else // masterPageMode
 	{			
+		m_viewMode.linkedFramesToShow.clear();
 		drawBackgroundMasterpage(painter, clipx, clipy, clipw, cliph);
 		
 //		Tbackground = tim.elapsed();
 		painter->beginLayer(1.0, 0);
-		DrawPageItems(painter, QRect(clipx, clipy, clipw, cliph));
+		int layerCount = m_doc->layerCount();
+		for (int layerLevel = 0; layerLevel < layerCount; ++layerLevel)
+		{
+			m_doc->Layers.levelToLayer(layer, layerLevel);
+			DrawPageItems(painter, layer, QRect(clipx, clipy, clipw, cliph));
+		}
 		painter->endLayer();
 //		Tcontents = tim.elapsed();
 		
@@ -1243,379 +1259,355 @@
 
 
 /**
-  draws masterpage items in layer order
+  draws masterpage items of a specific layer
  */
-void Canvas::DrawMasterItems(ScPainter *painter, Page *page, QRect clip)
+void Canvas::DrawMasterItems(ScPainter *painter, Page *page, ScLayer& layer, QRect clip)
 {
+	if ((m_viewMode.previewMode) && (!layer.isPrintable))
+		return;
+	if ((m_viewMode.viewAsPreview) && (!layer.isPrintable))
+		return;
+	if (!layer.isViewable)
+		return;
+	if (page->MPageNam.isEmpty())
+		return;
+	if (page->FromMaster.count() <= 0)
+		return;
+
 	FPoint orig = localToCanvas(clip.topLeft());
 	QRectF cullingArea = QRectF(static_cast<int>(orig.x()), static_cast<int>(orig.y()), 
 							  qRound(clip.width() / m_viewMode.scale + 0.5), qRound(clip.height() / m_viewMode.scale + 0.5));
 	QStack<PageItem*> groupStack;
 	QStack<PageItem*> groupStack2;
-	if (!page->MPageNam.isEmpty())
+
+	PageItem *currItem;
+	Page* Mp = m_doc->MasterPages.at(m_doc->MasterNames[page->MPageNam]);
+	uint layerCount = m_doc->layerCount();
+	if ((layerCount > 1) && ((layer.blendMode != 0) || (layer.transparency != 1.0)) && (!layer.outlineMode))
+		painter->beginLayer(layer.transparency, layer.blendMode);
+	uint pageFromMasterCount=page->FromMaster.count();
+	for (uint a = 0; a < pageFromMasterCount; ++a)
 	{
-		Page* Mp = m_doc->MasterPages.at(m_doc->MasterNames[page->MPageNam]);
-		if (page->FromMaster.count() != 0)
+		currItem = page->FromMaster.at(a);
+		if (currItem->LayerNr != layer.LNr)
+			continue;
+		if ((currItem->OwnPage != -1) && (currItem->OwnPage != static_cast<int>(Mp->pageNr())))
+			continue;
+		if ((m_viewMode.previewMode) && (!currItem->printEnabled()))
+			continue;
+		if ((m_viewMode.viewAsPreview) && (!currItem->printEnabled()))
+			continue;
+		double OldX = currItem->xPos();
+		double OldY = currItem->yPos();
+		double OldBX = currItem->BoundingX;
+		double OldBY = currItem->BoundingY;
+		if (!currItem->ChangedMasterItem)
 		{
-			int Lnr;
-			ScLayer ll;
-			PageItem *currItem;
-			ll.isViewable = false;
-			ll.LNr = 0;
-			Lnr = 0;
-			uint layerCount=m_doc->layerCount();
-			for (uint la = 0; la < layerCount; ++la)
+			//Hack to not check for undo changes, indicate drawing only
+			currItem->moveBy(-Mp->xOffset() + page->xOffset(), -Mp->yOffset() + page->yOffset(), true);
+			currItem->BoundingX = OldBX - Mp->xOffset() + page->xOffset();
+			currItem->BoundingY = OldBY - Mp->yOffset() + page->yOffset();
+		}
+		if (currItem->isGroupControl)
+		{
+			painter->save();
+			currItem->savedOwnPage = currItem->OwnPage;
+			currItem->OwnPage = page->pageNr();
+			if ((cullingArea.intersects(currItem->getBoundingRect().adjusted(0.0, 0.0, 1.0, 1.0))) && (m_doc->guidesSettings.layerMarkersShown) && (m_doc->layerCount() > 1))
+				currItem->DrawObj(painter, cullingArea);
+			FPointArray cl = currItem->PoLine.copy();
+			QMatrix mm;
+			mm.translate(currItem->xPos(), currItem->yPos());
+			mm.rotate(currItem->rotation());
+			cl.map( mm );
+			painter->beginLayer(1.0 - currItem->fillTransparency(), currItem->fillBlendmode(), &cl);
+			groupStack.push(currItem->groupsLastItem);
+			groupStack2.push(currItem);
+			currItem->OwnPage = currItem->savedOwnPage;
+			if (!currItem->ChangedMasterItem)
 			{
-				m_doc->Layers.levelToLayer(ll, Lnr);
-				bool pr = true;
-				if ((m_viewMode.previewMode) && (!ll.isPrintable))
-					pr = false;
-				if ((m_viewMode.viewAsPreview) && (!ll.isPrintable))
-					pr = false;
-				if ((ll.isViewable) && (pr))
-				{
-					if ((layerCount > 1) && ((ll.blendMode != 0) || (ll.transparency != 1.0)) && (!ll.outlineMode))
-						painter->beginLayer(ll.transparency, ll.blendMode);
-					uint pageFromMasterCount=page->FromMaster.count();
-					for (uint a = 0; a < pageFromMasterCount; ++a)
-					{
-						currItem = page->FromMaster.at(a);
-						if (currItem->LayerNr != ll.LNr)
-							continue;
-						if ((currItem->OwnPage != -1) && (currItem->OwnPage != static_cast<int>(Mp->pageNr())))
-							continue;
-						if ((m_viewMode.previewMode) && (!currItem->printEnabled()))
-							continue;
-						if ((m_viewMode.viewAsPreview) && (!currItem->printEnabled()))
-							continue;
-						double OldX = currItem->xPos();
-						double OldY = currItem->yPos();
-						double OldBX = currItem->BoundingX;
-						double OldBY = currItem->BoundingY;
-						if (!currItem->ChangedMasterItem)
-						{
-							//Hack to not check for undo changes, indicate drawing only
-							currItem->moveBy(-Mp->xOffset() + page->xOffset(), -Mp->yOffset() + page->yOffset(), true);
-							currItem->BoundingX = OldBX - Mp->xOffset() + page->xOffset();
-							currItem->BoundingY = OldBY - Mp->yOffset() + page->yOffset();
-						}
-						if (currItem->isGroupControl)
-						{
-							painter->save();
-							currItem->savedOwnPage = currItem->OwnPage;
-							currItem->OwnPage = page->pageNr();
-							if ((cullingArea.intersects(currItem->getBoundingRect().adjusted(0.0, 0.0, 1.0, 1.0))) && (m_doc->guidesSettings.layerMarkersShown) && (m_doc->layerCount() > 1))
-								currItem->DrawObj(painter, cullingArea);
-							FPointArray cl = currItem->PoLine.copy();
-							QMatrix mm;
-							mm.translate(currItem->xPos(), currItem->yPos());
-							mm.rotate(currItem->rotation());
-							cl.map( mm );
-							painter->beginLayer(1.0 - currItem->fillTransparency(), currItem->fillBlendmode(), &cl);
-							groupStack.push(currItem->groupsLastItem);
-							groupStack2.push(currItem);
-							currItem->OwnPage = currItem->savedOwnPage;
-							if (!currItem->ChangedMasterItem)
-							{
-								//Hack to not check for undo changes, indicate drawing only
-								currItem->setXYPos(OldX, OldY, true);
-								currItem->BoundingX = OldBX;
-								currItem->BoundingY = OldBY;
-							}
-							continue;
-						}
-						currItem->savedOwnPage = currItem->OwnPage;
-						currItem->OwnPage = page->pageNr();
+				//Hack to not check for undo changes, indicate drawing only
+				currItem->setXYPos(OldX, OldY, true);
+				currItem->BoundingX = OldBX;
+				currItem->BoundingY = OldBY;
+			}
+			continue;
+		}
+		currItem->savedOwnPage = currItem->OwnPage;
+		currItem->OwnPage = page->pageNr();
 //FIXME						if (!evSpon || forceRedraw)
-		//					currItem->invalid = true;
-						if (cullingArea.intersects(currItem->getBoundingRect().adjusted(0.0, 0.0, 1.0, 1.0)))
-						{
-							if (!((m_viewMode.operItemMoving || m_viewMode.operItemResizeInEditMode) && (currItem->isSelected())))
-							{
-								if (m_viewMode.forceRedraw)
-									currItem->invalidateLayout();
-								currItem->DrawObj(painter, cullingArea);
-							}
+//					currItem->invalid = true;
+		if (cullingArea.intersects(currItem->getBoundingRect().adjusted(0.0, 0.0, 1.0, 1.0)))
+		{
+			if (!((m_viewMode.operItemMoving || m_viewMode.operItemResizeInEditMode) && (currItem->isSelected())))
+			{
+				if (m_viewMode.forceRedraw)
+					currItem->invalidateLayout();
+				currItem->DrawObj(painter, cullingArea);
+			}
 //							else 
 //								qDebug() << "skip masterpage item (move/resizeEdit/selected)" << m_viewMode.operItemMoving << m_viewMode.operItemResizeInEditMode << currItem->isSelected();
-						}
-						currItem->OwnPage = currItem->savedOwnPage;
-						if (!currItem->ChangedMasterItem)
-						{
-							//Hack to not check for undo changes, indicate drawing only
-							currItem->setXYPos(OldX, OldY, true);
-							currItem->BoundingX = OldBX;
-							currItem->BoundingY = OldBY;
-						}
-						if (groupStack.count() != 0)
-						{
-							while (currItem == groupStack.top())
-							{
-								painter->endLayer();
-								painter->restore();
-								PageItem *cite = groupStack2.pop();
-								double OldX = cite->xPos();
-								double OldY = cite->yPos();
-								double OldBX = cite->BoundingX;
-								double OldBY = cite->BoundingY;
-								if (!cite->ChangedMasterItem)
-								{
-									//Hack to not check for undo changes, indicate drawing only
-									cite->moveBy(-Mp->xOffset() + page->xOffset(), -Mp->yOffset() + page->yOffset(), true);
-									cite->BoundingX = OldBX - Mp->xOffset() + page->xOffset();
-									cite->BoundingY = OldBY - Mp->yOffset() + page->yOffset();
-								}
-								if ((cullingArea.intersects(cite->getBoundingRect().adjusted(0.0, 0.0, 1.0, 1.0))) && (m_doc->guidesSettings.layerMarkersShown) && (m_doc->layerCount() > 1))
-									cite->DrawObj(painter, cullingArea);
-								cite->OwnPage = cite->savedOwnPage;
-								if (!currItem->ChangedMasterItem)
-								{
-									//Hack to not check for undo changes, indicate drawing only
-									cite->setXYPos(OldX, OldY, true);
-									cite->BoundingX = OldBX;
-									cite->BoundingY = OldBY;
-								}
-								groupStack.pop();
-								if (groupStack.count() == 0)
-									break;
-							}
-						}
-					}
-					for (uint a = 0; a < pageFromMasterCount; ++a)
-					{
-						currItem = page->FromMaster.at(a);
-						if (currItem->LayerNr != ll.LNr)
-							continue;
-						if (!currItem->isTableItem)
-							continue;
-						if ((m_viewMode.previewMode) && (!currItem->printEnabled()))
-							continue;
-						if ((m_viewMode.viewAsPreview) && (!currItem->printEnabled()))
-							continue;
-						if ((currItem->OwnPage != -1) && (currItem->OwnPage != static_cast<int>(Mp->pageNr())))
-							continue;
-						if (currItem->isGroupControl)
-							continue;
-						double OldX = currItem->xPos();
-						double OldY = currItem->yPos();
-						double OldBX = currItem->BoundingX;
-						double OldBY = currItem->BoundingY;
-						if (!currItem->ChangedMasterItem)
-						{
-							//Hack to not check for undo changes, indicate drawing only
-							currItem->setXYPos(OldX - Mp->xOffset() + page->xOffset(), OldY - Mp->yOffset() + page->yOffset(), true);
-							currItem->BoundingX = OldBX - Mp->xOffset() + page->xOffset();
-							currItem->BoundingY = OldBY - Mp->yOffset() + page->yOffset();
-						}
-						if (cullingArea.intersects(currItem->getBoundingRect().adjusted(0.0, 0.0, 1.0, 1.0)))
-						{
-							painter->save();
-							painter->translate(currItem->xPos(), currItem->yPos());
-							painter->rotate(currItem->rotation());
-							if ((currItem->lineColor() != CommonStrings::None) && (currItem->lineWidth() != 0.0))
-							{
-								QColor tmp;
-								currItem->SetQColor(&tmp, currItem->lineColor(), currItem->lineShade());
-								if ((currItem->TopLine) || (currItem->RightLine) || (currItem->BottomLine) || (currItem->LeftLine))
-								{
-									painter->setPen(tmp, currItem->lineWidth(), currItem->PLineArt, Qt::SquareCap, currItem->PLineJoin);
-									if (currItem->TopLine)
-										painter->drawLine(FPoint(0.0, 0.0), FPoint(currItem->width(), 0.0));
-									if (currItem->RightLine)
-										painter->drawLine(FPoint(currItem->width(), 0.0), FPoint(currItem->width(), currItem->height()));
-									if (currItem->BottomLine)
-										painter->drawLine(FPoint(currItem->width(), currItem->height()), FPoint(0.0, currItem->height()));
-									if (currItem->LeftLine)
-										painter->drawLine(FPoint(0.0, currItem->height()), FPoint(0.0, 0.0));
-								}
-							}
-							painter->restore();
-						}
-						if (!currItem->ChangedMasterItem)
-						{
-							//Hack to not check for undo changes, indicate drawing only
-							currItem->setXYPos(OldX, OldY, true);
-							currItem->BoundingX = OldBX;
-							currItem->BoundingY = OldBY;
-						}
-					}
-					if ((layerCount > 1) && ((ll.blendMode != 0) || (ll.transparency != 1.0)) && (!ll.outlineMode))
-						painter->endLayer();
+		}
+		currItem->OwnPage = currItem->savedOwnPage;
+		if (!currItem->ChangedMasterItem)
+		{
+			//Hack to not check for undo changes, indicate drawing only
+			currItem->setXYPos(OldX, OldY, true);
+			currItem->BoundingX = OldBX;
+			currItem->BoundingY = OldBY;
+		}
+		if (groupStack.count() != 0)
+		{
+			while (currItem == groupStack.top())
+			{
+				painter->endLayer();
+				painter->restore();
+				PageItem *cite = groupStack2.pop();
+				double OldX = cite->xPos();
+				double OldY = cite->yPos();
+				double OldBX = cite->BoundingX;
+				double OldBY = cite->BoundingY;
+				if (!cite->ChangedMasterItem)
+				{
+					//Hack to not check for undo changes, indicate drawing only
+					cite->moveBy(-Mp->xOffset() + page->xOffset(), -Mp->yOffset() + page->yOffset(), true);
+					cite->BoundingX = OldBX - Mp->xOffset() + page->xOffset();
+					cite->BoundingY = OldBY - Mp->yOffset() + page->yOffset();
 				}
-				Lnr++;
+				if ((cullingArea.intersects(cite->getBoundingRect().adjusted(0.0, 0.0, 1.0, 1.0))) && (m_doc->guidesSettings.layerMarkersShown) && (m_doc->layerCount() > 1))
+					cite->DrawObj(painter, cullingArea);
+				cite->OwnPage = cite->savedOwnPage;
+				if (!currItem->ChangedMasterItem)
+				{
+					//Hack to not check for undo changes, indicate drawing only
+					cite->setXYPos(OldX, OldY, true);
+					cite->BoundingX = OldBX;
+					cite->BoundingY = OldBY;
+				}
+				groupStack.pop();
+				if (groupStack.count() == 0)
+					break;
 			}
 		}
 	}
+	for (uint a = 0; a < pageFromMasterCount; ++a)
+	{
+		currItem = page->FromMaster.at(a);
+		if (currItem->LayerNr != layer.LNr)
+			continue;
+		if (!currItem->isTableItem)
+			continue;
+		if ((m_viewMode.previewMode) && (!currItem->printEnabled()))
+			continue;
+		if ((m_viewMode.viewAsPreview) && (!currItem->printEnabled()))
+			continue;
+		if ((currItem->OwnPage != -1) && (currItem->OwnPage != static_cast<int>(Mp->pageNr())))
+			continue;
+		if (currItem->isGroupControl)
+			continue;
+		double OldX = currItem->xPos();
+		double OldY = currItem->yPos();
+		double OldBX = currItem->BoundingX;
+		double OldBY = currItem->BoundingY;
+		if (!currItem->ChangedMasterItem)
+		{
+			//Hack to not check for undo changes, indicate drawing only
+			currItem->setXYPos(OldX - Mp->xOffset() + page->xOffset(), OldY - Mp->yOffset() + page->yOffset(), true);
+			currItem->BoundingX = OldBX - Mp->xOffset() + page->xOffset();
+			currItem->BoundingY = OldBY - Mp->yOffset() + page->yOffset();
+		}
+		if (cullingArea.intersects(currItem->getBoundingRect().adjusted(0.0, 0.0, 1.0, 1.0)))
+		{
+			painter->save();
+			painter->translate(currItem->xPos(), currItem->yPos());
+			painter->rotate(currItem->rotation());
+			if ((currItem->lineColor() != CommonStrings::None) && (currItem->lineWidth() != 0.0))
+			{
+				QColor tmp;
+				currItem->SetQColor(&tmp, currItem->lineColor(), currItem->lineShade());
+				if ((currItem->TopLine) || (currItem->RightLine) || (currItem->BottomLine) || (currItem->LeftLine))
+				{
+					painter->setPen(tmp, currItem->lineWidth(), currItem->PLineArt, Qt::SquareCap, currItem->PLineJoin);
+					if (currItem->TopLine)
+						painter->drawLine(FPoint(0.0, 0.0), FPoint(currItem->width(), 0.0));
+					if (currItem->RightLine)
+						painter->drawLine(FPoint(currItem->width(), 0.0), FPoint(currItem->width(), currItem->height()));
+					if (currItem->BottomLine)
+						painter->drawLine(FPoint(currItem->width(), currItem->height()), FPoint(0.0, currItem->height()));
+					if (currItem->LeftLine)
+						painter->drawLine(FPoint(0.0, currItem->height()), FPoint(0.0, 0.0));
+				}
+			}
+			painter->restore();
+		}
+		if (!currItem->ChangedMasterItem)
+		{
+			//Hack to not check for undo changes, indicate drawing only
+			currItem->setXYPos(OldX, OldY, true);
+			currItem->BoundingX = OldBX;
+			currItem->BoundingY = OldBY;
+		}
+	}
+	if ((layerCount > 1) && ((layer.blendMode != 0) || (layer.transparency != 1.0)) && (!layer.outlineMode))
+		painter->endLayer();
 }
 
 
 /**
-  draws page items in layer order
+  draws page items contained in a specific Layer
  */
-void Canvas::DrawPageItems(ScPainter *painter, QRect clip)
+void Canvas::DrawPageItems(ScPainter *painter, ScLayer& layer, QRect clip)
 {
+	if ((m_viewMode.previewMode) && (!layer.isPrintable))
+		return;
+	if ((m_viewMode.viewAsPreview) && (!layer.isPrintable))
+		return;
+	if (!layer.isViewable)
+		return;
+	if (m_doc->Items->count() <= 0)
+		return;
+
 // 	qDebug()<<"Canvas::DrawPageItems"<<m_viewMode.forceRedraw<<m_viewMode.operItemSelecting;
-	m_viewMode.linkedFramesToShow.clear();
 	FPoint orig = localToCanvas(clip.topLeft());
 	QRectF cullingArea = QRectF(static_cast<int>(orig.x()), static_cast<int>(orig.y()), 
 							  qRound(clip.width() / m_viewMode.scale + 0.5), qRound(clip.height() / m_viewMode.scale + 0.5));
 	QStack<PageItem*> groupStack;
 	QStack<PageItem*> groupStack2;
-	if (m_doc->Items->count() != 0)
+
+	PageItem *currItem;
+	uint layerCount = m_doc->layerCount();
+	int docCurrPageNo=static_cast<int>(m_doc->currentPageNumber());
+	if ((layerCount > 1) && ((layer.blendMode != 0) || (layer.transparency != 1.0)) && (!layer.outlineMode))
+		painter->beginLayer(layer.transparency, layer.blendMode);
+	for (int it = 0; it < m_doc->Items->count(); ++it)
 	{
-		int Lnr=0;
-		ScLayer ll;
-		PageItem *currItem;
-		ll.isViewable = false;
-		ll.LNr = 0;
-		uint layerCount=m_doc->layerCount();
-		int docCurrPageNo=static_cast<int>(m_doc->currentPageNumber());
-		for (uint la2 = 0; la2 < layerCount; ++la2)
+		currItem = m_doc->Items->at(it);
+		if (currItem->LayerNr != layer.LNr)
+			continue;
+		if ((m_viewMode.previewMode) && (!currItem->printEnabled()))
+			continue;
+		if ((m_viewMode.viewAsPreview) && (!currItem->printEnabled()))
+			continue;
+		if ((m_doc->masterPageMode()) && ((currItem->OwnPage != -1) && (currItem->OwnPage != docCurrPageNo)))
+			continue;
+		if (!m_doc->masterPageMode() && !currItem->OnMasterPage.isEmpty())
 		{
-			m_doc->Layers.levelToLayer(ll, Lnr);
-			bool pr = true;
-			if ((m_viewMode.previewMode) && (!ll.isPrintable))
-				pr = false;
-			if ((m_viewMode.viewAsPreview) && (!ll.isPrintable))
-				pr = false;
-			if ((ll.isViewable) && (pr))
-			{
-				if ((layerCount > 1) && ((ll.blendMode != 0) || (ll.transparency != 1.0)) && (!ll.outlineMode))
-					painter->beginLayer(ll.transparency, ll.blendMode);
-				for (int it = 0; it < m_doc->Items->count(); ++it)
-				{
-					currItem = m_doc->Items->at(it);
-					if (currItem->LayerNr != ll.LNr)
-						continue;
-					if ((m_viewMode.previewMode) && (!currItem->printEnabled()))
-						continue;
-					if ((m_viewMode.viewAsPreview) && (!currItem->printEnabled()))
-						continue;
-					if ((m_doc->masterPageMode()) && ((currItem->OwnPage != -1) && (currItem->OwnPage != docCurrPageNo)))
-						continue;
-					if (!m_doc->masterPageMode() && !currItem->OnMasterPage.isEmpty())
-					{
-						if (currItem->OnMasterPage != m_doc->currentPage()->pageName())
-							continue;
-					}
-					if (currItem->isGroupControl)
-					{
-						painter->save();
-						FPointArray cl = currItem->PoLine.copy();
-						QMatrix mm;
-						mm.translate(currItem->xPos(), currItem->yPos());
-						mm.rotate(currItem->rotation());
-						cl.map( mm );
-						painter->beginLayer(1.0 - currItem->fillTransparency(), currItem->fillBlendmode(), &cl);
-						groupStack.push(currItem->groupsLastItem);
-						groupStack2.push(currItem);
-						continue;
-					}
-					if (cullingArea.intersects(currItem->getBoundingRect().adjusted(0.0, 0.0, 1.0, 1.0)))
-					{
+			if (currItem->OnMasterPage != m_doc->currentPage()->pageName())
+				continue;
+		}
+		if (currItem->isGroupControl)
+		{
+			painter->save();
+			FPointArray cl = currItem->PoLine.copy();
+			QMatrix mm;
+			mm.translate(currItem->xPos(), currItem->yPos());
+			mm.rotate(currItem->rotation());
+			cl.map( mm );
+			painter->beginLayer(1.0 - currItem->fillTransparency(), currItem->fillBlendmode(), &cl);
+			groupStack.push(currItem->groupsLastItem);
+			groupStack2.push(currItem);
+			continue;
+		}
+		if (cullingArea.intersects(currItem->getBoundingRect().adjusted(0.0, 0.0, 1.0, 1.0)))
+		{
 //FIXME						if (!evSpon || forceRedraw) 
-		//					currItem->invalid = true;
+//					currItem->invalid = true;
 //						if ((!m_MouseButtonPressed) || (m_doc->appMode == modeEditClip))
-						if (((m_viewMode.operItemMoving || m_viewMode.operItemResizeInEditMode || m_viewMode.drawSelectedItemsWithControls) && currItem->isSelected()))
-						{
+			if (((m_viewMode.operItemMoving || m_viewMode.operItemResizeInEditMode || m_viewMode.drawSelectedItemsWithControls) && currItem->isSelected()))
+			{
 //							qDebug() << "skipping pageitem (move/resizeEdit/selected)" << m_viewMode.operItemMoving << m_viewMode.operItemResizeInEditMode << currItem->isSelected();
-						}
-						else if(m_viewMode.operItemSelecting)
-						{
-							currItem->invalid = false;
-							currItem->DrawObj(painter, cullingArea);
-						}
-						else
-						{
-							// I comment it because the "view" should not
-							// alter the "data". And it really prevents optimisation - pm
+			}
+			else if(m_viewMode.operItemSelecting)
+			{
+				currItem->invalid = false;
+				currItem->DrawObj(painter, cullingArea);
+			}
+			else
+			{
+				// I comment it because the "view" should not
+				// alter the "data". And it really prevents optimisation - pm
 // 							if (m_viewMode.forceRedraw)
 // 								currItem->invalidateLayout();
-							currItem->DrawObj(painter, cullingArea);
-						}
+				currItem->DrawObj(painter, cullingArea);
+			}
 //						currItem->Redrawn = true;
-						if ((currItem->asTextFrame()) && ((currItem->nextInChain() != 0) || (currItem->prevInChain() != 0)))
-						{
-							PageItem *nextItem = currItem;
-							while (nextItem != 0)
-							{
-								if (nextItem->prevInChain() != 0)
-									nextItem = nextItem->prevInChain();
-								else
-									break;
-							}
-							if (!m_viewMode.linkedFramesToShow.contains(nextItem))
-								m_viewMode.linkedFramesToShow.append(nextItem);
-						}
-						/* FIXME:av -
-						what to fix exactly? - pm
-						*/
-						if ((m_doc->appMode == modeEdit) && (currItem->isSelected()) && (currItem->itemType() == PageItem::TextFrame))
-						{
-						
-							setupEditHRuler(currItem);
-						}
-					}
-					if (groupStack.count() != 0)
-					{
-						while (currItem == groupStack.top())
-						{
-							painter->endLayer();
-							painter->restore();
-							PageItem *cite = groupStack2.pop();
-							if ((cullingArea.intersects(cite->getBoundingRect())) && (((m_doc->guidesSettings.layerMarkersShown) && (m_doc->layerCount() > 1)) || (cite->textFlowUsesContourLine())))
-								cite->DrawObj(painter, cullingArea);
-							groupStack.pop();
-							if (groupStack.count() == 0)
-								break;
-						}
-					}
+			if ((currItem->asTextFrame()) && ((currItem->nextInChain() != 0) || (currItem->prevInChain() != 0)))
+			{
+				PageItem *nextItem = currItem;
+				while (nextItem != 0)
+				{
+					if (nextItem->prevInChain() != 0)
+						nextItem = nextItem->prevInChain();
+					else
+						break;
 				}
-				for (int it = 0; it < m_doc->Items->count(); ++it)
+				if (!m_viewMode.linkedFramesToShow.contains(nextItem))
+					m_viewMode.linkedFramesToShow.append(nextItem);
+			}
+			/* FIXME:av -
+			what to fix exactly? - pm
+			*/
+			if ((m_doc->appMode == modeEdit) && (currItem->isSelected()) && (currItem->itemType() == PageItem::TextFrame))
+			{
+			
+				setupEditHRuler(currItem);
+			}
+		}
+		if (groupStack.count() != 0)
+		{
+			while (currItem == groupStack.top())
+			{
+				painter->endLayer();
+				painter->restore();
+				PageItem *cite = groupStack2.pop();
+				if ((cullingArea.intersects(cite->getBoundingRect())) && (((m_doc->guidesSettings.layerMarkersShown) && (m_doc->layerCount() > 1)) || (cite->textFlowUsesContourLine())))
+					cite->DrawObj(painter, cullingArea);
+				groupStack.pop();
+				if (groupStack.count() == 0)
+					break;
+			}
+		}
+	}
+	for (int it = 0; it < m_doc->Items->count(); ++it)
+	{
+		currItem = m_doc->Items->at(it);
+		if (currItem->LayerNr != layer.LNr)
+			continue;
+		if (!currItem->isTableItem)
+			continue;
+		if ((m_viewMode.previewMode) && (!currItem->printEnabled()))
+			continue;
+		if ((m_viewMode.viewAsPreview) && (!currItem->printEnabled()))
+			continue;
+		if (cullingArea.intersects(currItem->getBoundingRect().adjusted(0.0, 0.0, 1.0, 1.0)))
+		{
+			painter->save();
+			painter->translate(currItem->xPos(), currItem->yPos());
+			painter->rotate(currItem->rotation());
+			if ((currItem->lineColor() != CommonStrings::None) && (currItem->lineWidth() != 0.0))
+			{
+				QColor tmp;
+				currItem->SetQColor(&tmp, currItem->lineColor(), currItem->lineShade());
+				if ((currItem->TopLine) || (currItem->RightLine) || (currItem->BottomLine) || (currItem->LeftLine))
 				{
-					currItem = m_doc->Items->at(it);
-					if (currItem->LayerNr != ll.LNr)
-						continue;
-					if (!currItem->isTableItem)
-						continue;
-					if ((m_viewMode.previewMode) && (!currItem->printEnabled()))
-						continue;
-					if ((m_viewMode.viewAsPreview) && (!currItem->printEnabled()))
-						continue;
-					if (cullingArea.intersects(currItem->getBoundingRect().adjusted(0.0, 0.0, 1.0, 1.0)))
-					{
-						painter->save();
-						painter->translate(currItem->xPos(), currItem->yPos());
-						painter->rotate(currItem->rotation());
-						if ((currItem->lineColor() != CommonStrings::None) && (currItem->lineWidth() != 0.0))
-						{
-							QColor tmp;
-							currItem->SetQColor(&tmp, currItem->lineColor(), currItem->lineShade());
-							if ((currItem->TopLine) || (currItem->RightLine) || (currItem->BottomLine) || (currItem->LeftLine))
-							{
-								painter->setPen(tmp, currItem->lineWidth(), currItem->PLineArt, Qt::SquareCap, currItem->PLineJoin);
-								if (currItem->TopLine)
-									painter->drawLine(FPoint(0.0, 0.0), FPoint(currItem->width(), 0.0));
-								if (currItem->RightLine)
-									painter->drawLine(FPoint(currItem->width(), 0.0), FPoint(currItem->width(), currItem->height()));
-								if (currItem->BottomLine)
-									painter->drawLine(FPoint(currItem->width(), currItem->height()), FPoint(0.0, currItem->height()));
-								if (currItem->LeftLine)
-									painter->drawLine(FPoint(0.0, currItem->height()), FPoint(0.0, 0.0));
-							}
-						}
-						painter->restore();
-					}
+					painter->setPen(tmp, currItem->lineWidth(), currItem->PLineArt, Qt::SquareCap, currItem->PLineJoin);
+					if (currItem->TopLine)
+						painter->drawLine(FPoint(0.0, 0.0), FPoint(currItem->width(), 0.0));
+					if (currItem->RightLine)
+						painter->drawLine(FPoint(currItem->width(), 0.0), FPoint(currItem->width(), currItem->height()));
+					if (currItem->BottomLine)
+						painter->drawLine(FPoint(currItem->width(), currItem->height()), FPoint(0.0, currItem->height()));
+					if (currItem->LeftLine)
+						painter->drawLine(FPoint(0.0, currItem->height()), FPoint(0.0, 0.0));
 				}
-				if ((layerCount > 1) && ((ll.blendMode != 0) || (ll.transparency != 1.0)) && (!ll.outlineMode))
-					painter->endLayer();
 			}
-			Lnr++;
+			painter->restore();
 		}
 	}
+	if ((layerCount > 1) && ((layer.blendMode != 0) || (layer.transparency != 1.0)) && (!layer.outlineMode))
+		painter->endLayer();
 }
 
-
 /**
   Draws the canvas background for masterpages, incl. bleeds
  */
Index: scribus/scpageoutput.h
===================================================================
--- scribus/scpageoutput.h	(revision 13872)
+++ scribus/scpageoutput.h	(revision 13873)
@@ -15,11 +15,9 @@
 #include "scpainterexbase.h"
 #include "scimage.h"
 
-class ScribusDoc;
-class Page;
 class CharStyle;
 struct GlyphLayout;
-
+class Page;
 class PageItem;
 class PageItem_ImageFrame;
 class PageItem_Line;
@@ -27,6 +25,8 @@
 class PageItem_Polygon;
 class PageItem_PolyLine;
 class PageItem_TextFrame;
+class ScLayer;
+class ScribusDoc;
 
 class SCRIBUS_API MarksOptions
 {
@@ -59,8 +59,8 @@
 	virtual void fillPath( PageItem* item, ScPainterExBase* painter, const QRect& clip );
 	virtual void strokePath( PageItem* item, ScPainterExBase* painter, const QRect& clip );
 
-	virtual void drawMasterItems( ScPainterExBase *painter, Page *page, const QRect& clip);
-	virtual void drawPageItems( ScPainterExBase *painter, Page *page, const QRect& clip);
+	virtual void drawMasterItems( ScPainterExBase *painter, Page *page, ScLayer& layer, const QRect& clip);
+	virtual void drawPageItems( ScPainterExBase *painter, Page *page, ScLayer& layer, const QRect& clip);
 
 	virtual void drawItem( PageItem* item, ScPainterExBase* painter, const QRect& clip );
 	virtual void drawItem_Pre( PageItem* item, ScPainterExBase* painter );
Index: scribus/scpageoutput.cpp
===================================================================
--- scribus/scpageoutput.cpp	(revision 13872)
+++ scribus/scpageoutput.cpp	(revision 13873)
@@ -89,272 +89,245 @@
 	int clipy = static_cast<int>(page->yOffset());
 	int clipw = qRound(page->width());
 	int cliph = qRound(page->height());
-	drawMasterItems(painter, page, QRect(clipx, clipy, clipw, cliph));
-	drawPageItems(painter, page, QRect(clipx, clipy, clipw, cliph));
+	ScLayer layer;
+	layer.isViewable = false;
+	uint layerCount = m_doc->layerCount();
+	for (uint la = 0; la < layerCount; ++la)
+	{
+		m_doc->Layers.levelToLayer(layer, la);
+		drawMasterItems(painter, page, layer, QRect(clipx, clipy, clipw, cliph));
+		drawPageItems(painter, page, layer, QRect(clipx, clipy, clipw, cliph));
+	}
 	drawMarks(page, painter, m_marksOptions);
 }
 
-void ScPageOutput::drawMasterItems(ScPainterExBase *painter, Page *page, const QRect& clip)
+void ScPageOutput::drawMasterItems(ScPainterExBase *painter, Page *page, ScLayer& layer, const QRect& clip)
 {
+	PageItem* currItem;
 	QStack<PageItem*> groupStack;
 	QStack<PageItem*> groupClips;
-	if (!page->MPageNam.isEmpty())
+	if (page->MPageNam.isEmpty())
+		return;
+	if (page->FromMaster.count() <= 0)
+		return;
+	if (!layer.isViewable || !layer.isPrintable)
+		return;
+	Page* Mp = m_doc->MasterPages.at(m_doc->MasterNames[page->MPageNam]);
+	uint pageFromMasterCount = page->FromMaster.count();
+	for (uint a = 0; a < pageFromMasterCount; ++a)
 	{
-		Page* Mp = m_doc->MasterPages.at(m_doc->MasterNames[page->MPageNam]);
-		if (page->FromMaster.count() != 0)
+		currItem = page->FromMaster.at(a);
+		if (currItem->LayerNr != layer.LNr)
+			continue;
+		if ((currItem->OwnPage != -1) && (currItem->OwnPage != static_cast<int>(Mp->pageNr())))
+			continue;
+		if (!currItem->printEnabled())
+			continue;
+		if (currItem->isGroupControl)
 		{
-			int Lnr;
-			ScLayer ll;
-			PageItem *currItem;
-			ll.isViewable = false;
-			ll.LNr = 0;
-			Lnr = 0;
-			uint layerCount = m_doc->layerCount();
-			for (uint la = 0; la < layerCount; ++la)
+			painter->save();
+			groupClips.push(currItem);
+			groupStack.push(currItem->groupsLastItem);
+			continue;
+		}
+		int savedOwnPage = currItem->OwnPage;
+		double OldX = currItem->xPos();
+		double OldY = currItem->yPos();
+		double OldBX = currItem->BoundingX;
+		double OldBY = currItem->BoundingY;
+		currItem->OwnPage = page->pageNr();
+		if (!currItem->ChangedMasterItem)
+		{
+			currItem->moveBy(-Mp->xOffset() + page->xOffset(), -Mp->yOffset() + page->yOffset(), true);
+			currItem->BoundingX = OldBX - Mp->xOffset() + page->xOffset();
+			currItem->BoundingY = OldBY - Mp->yOffset() + page->yOffset();
+		}
+		/*if (evSpon)
+			currItem->Dirty = true;*/
+		QRect oldR(currItem->getRedrawBounding(1.0));
+		if (clip.intersects(oldR))
+		{
+			// relayout necessary to get page number ok
+			currItem->invalidateLayout();
+			currItem->layout();
+			drawItem(currItem, painter, clip);
+		}
+		currItem->OwnPage = savedOwnPage;
+		if (!currItem->ChangedMasterItem)
+		{
+			currItem->setXYPos(OldX, OldY, true);
+			currItem->BoundingX = OldBX;
+			currItem->BoundingY = OldBY;
+		}
+		if (groupStack.count() != 0)
+		{
+			while (currItem == groupStack.top())
 			{
-				m_doc->Layers.levelToLayer(ll, Lnr);
-				bool pr = true;
-				if ( !ll.isPrintable )
-					pr = false;
-				if ((ll.isViewable) && (pr))
+				QMatrix mm;
+				PageItem *tmpItem = groupClips.pop();
+				FPointArray cl = tmpItem->PoLine.copy();
+				mm.translate(tmpItem->xPos(), tmpItem->yPos());
+				mm.rotate(tmpItem->rotation());
+				cl.map( mm );
+				painter->setupPolygon(&cl);
+				painter->setClipPath();
+				painter->restore();
+				groupStack.pop();
+				if (groupStack.count() == 0)
+					break;
+			}
+		}
+	}
+	for (uint a = 0; a < pageFromMasterCount; ++a)
+	{
+		currItem = page->FromMaster.at(a);
+		if (currItem->LayerNr != layer.LNr)
+			continue;
+		if (!currItem->isTableItem)
+			continue;
+		if ((currItem->OwnPage != -1) && (currItem->OwnPage != static_cast<int>(Mp->pageNr())))
+			continue;
+		double OldX = currItem->xPos();
+		double OldY = currItem->yPos();
+		double OldBX = currItem->BoundingX;
+		double OldBY = currItem->BoundingY;
+		if (!currItem->ChangedMasterItem)
+		{
+			currItem->setXPos(OldX - Mp->xOffset() + page->xOffset(), true);
+			currItem->setYPos(OldY - Mp->yOffset() + page->yOffset(), true);
+			currItem->BoundingX = OldBX - Mp->xOffset() + page->xOffset();
+			currItem->BoundingY = OldBY - Mp->yOffset() + page->yOffset();
+		}
+		QRect oldR(currItem->getRedrawBounding(1.0));
+		if (clip.intersects(oldR))
+		{
+			painter->save();
+			painter->translate(currItem->xPos(), currItem->yPos());
+			painter->rotate(currItem->rotation());
+			if (currItem->lineColor() != CommonStrings::None)
+			{
+				ScColorShade tmp( m_doc->PageColors[currItem->lineColor()], (int) currItem->lineShade());
+				if ((currItem->TopLine) || (currItem->RightLine) || (currItem->BottomLine) || (currItem->LeftLine))
 				{
-					uint pageFromMasterCount=page->FromMaster.count();
-					for (uint a = 0; a < pageFromMasterCount; ++a)
-					{
-						currItem = page->FromMaster.at(a);
-						if (currItem->LayerNr != ll.LNr)
-							continue;
-						if ((currItem->OwnPage != -1) && (currItem->OwnPage != static_cast<int>(Mp->pageNr())))
-							continue;
-						if (!currItem->printEnabled())
-							continue;
-						if (currItem->isGroupControl)
-						{
-							painter->save();
-							groupClips.push(currItem);
-							groupStack.push(currItem->groupsLastItem);
-							continue;
-						}
-						int savedOwnPage = currItem->OwnPage;
-						double OldX = currItem->xPos();
-						double OldY = currItem->yPos();
-						double OldBX = currItem->BoundingX;
-						double OldBY = currItem->BoundingY;
-						currItem->OwnPage = page->pageNr();
-						if (!currItem->ChangedMasterItem)
-						{
-							currItem->moveBy(-Mp->xOffset() + page->xOffset(), -Mp->yOffset() + page->yOffset(), true);
-							currItem->BoundingX = OldBX - Mp->xOffset() + page->xOffset();
-							currItem->BoundingY = OldBY - Mp->yOffset() + page->yOffset();
-						}
-						/*if (evSpon)
-							currItem->Dirty = true;*/
-						QRect oldR(currItem->getRedrawBounding(1.0));
-						if (clip.intersects(oldR))
-						{
-							// relayout necessary to get page number ok
-							currItem->invalidateLayout();
-							currItem->layout();
-							drawItem(currItem, painter, clip);
-						}
-						currItem->OwnPage = savedOwnPage;
-						if (!currItem->ChangedMasterItem)
-						{
-							currItem->setXYPos(OldX, OldY, true);
-							currItem->BoundingX = OldBX;
-							currItem->BoundingY = OldBY;
-						}
-						if (groupStack.count() != 0)
-						{
-							while (currItem == groupStack.top())
-							{
-								QMatrix mm;
-								PageItem *tmpItem = groupClips.pop();
-								FPointArray cl = tmpItem->PoLine.copy();
-								mm.translate(tmpItem->xPos(), tmpItem->yPos());
-								mm.rotate(tmpItem->rotation());
-								cl.map( mm );
-								painter->setupPolygon(&cl);
-								painter->setClipPath();
-								painter->restore();
-								groupStack.pop();
-								if (groupStack.count() == 0)
-									break;
-							}
-						}
-					}
-					for (uint a = 0; a < pageFromMasterCount; ++a)
-					{
-						currItem = page->FromMaster.at(a);
-						if (currItem->LayerNr != ll.LNr)
-							continue;
-						if (!currItem->isTableItem)
-							continue;
-						if ((currItem->OwnPage != -1) && (currItem->OwnPage != static_cast<int>(Mp->pageNr())))
-							continue;
-						double OldX = currItem->xPos();
-						double OldY = currItem->yPos();
-						double OldBX = currItem->BoundingX;
-						double OldBY = currItem->BoundingY;
-						if (!currItem->ChangedMasterItem)
-						{
-							currItem->setXPos(OldX - Mp->xOffset() + page->xOffset(), true);
-							currItem->setYPos(OldY - Mp->yOffset() + page->yOffset(), true);
-							currItem->BoundingX = OldBX - Mp->xOffset() + page->xOffset();
-							currItem->BoundingY = OldBY - Mp->yOffset() + page->yOffset();
-						}
-						QRect oldR(currItem->getRedrawBounding(1.0));
-						if (clip.intersects(oldR))
-						{
-							painter->save();
-							painter->translate(currItem->xPos(), currItem->yPos());
-							painter->rotate(currItem->rotation());
-							if (currItem->lineColor() != CommonStrings::None)
-							{
-								ScColorShade tmp( m_doc->PageColors[currItem->lineColor()], (int) currItem->lineShade());
-								if ((currItem->TopLine) || (currItem->RightLine) || (currItem->BottomLine) || (currItem->LeftLine))
-								{
-									painter->setPen(tmp, currItem->lineWidth(), currItem->PLineArt, Qt::SquareCap, currItem->PLineJoin);
-									if (currItem->TopLine)
-										painter->drawLine(FPoint(0.0, 0.0), FPoint(currItem->width(), 0.0));
-									if (currItem->RightLine)
-										painter->drawLine(FPoint(currItem->width(), 0.0), FPoint(currItem->width(), currItem->height()));
-									if (currItem->BottomLine)
-										painter->drawLine(FPoint(currItem->width(), currItem->height()), FPoint(0.0, currItem->height()));
-									if (currItem->LeftLine)
-										painter->drawLine(FPoint(0.0, currItem->height()), FPoint(0.0, 0.0));
-								}
-							}
-							painter->restore();
-						}
-						if (!currItem->ChangedMasterItem)
-						{
-							currItem->setXPos(OldX, true);
-							currItem->setYPos(OldY, true);
-							currItem->BoundingX = OldBX;
-							currItem->BoundingY = OldBY;
-						}
-					}
+					painter->setPen(tmp, currItem->lineWidth(), currItem->PLineArt, Qt::SquareCap, currItem->PLineJoin);
+					if (currItem->TopLine)
+						painter->drawLine(FPoint(0.0, 0.0), FPoint(currItem->width(), 0.0));
+					if (currItem->RightLine)
+						painter->drawLine(FPoint(currItem->width(), 0.0), FPoint(currItem->width(), currItem->height()));
+					if (currItem->BottomLine)
+						painter->drawLine(FPoint(currItem->width(), currItem->height()), FPoint(0.0, currItem->height()));
+					if (currItem->LeftLine)
+						painter->drawLine(FPoint(0.0, currItem->height()), FPoint(0.0, 0.0));
 				}
-				Lnr++;
 			}
+			painter->restore();
 		}
+		if (!currItem->ChangedMasterItem)
+		{
+			currItem->setXPos(OldX, true);
+			currItem->setYPos(OldY, true);
+			currItem->BoundingX = OldBX;
+			currItem->BoundingY = OldBY;
+		}
 	}
 }
 
-void ScPageOutput::drawPageItems(ScPainterExBase *painter, Page *page, const QRect& clip)
+void ScPageOutput::drawPageItems(ScPainterExBase *painter, Page *page, ScLayer& layer, const QRect& clip)
 {
-	//linkedFramesToShow.clear();
+	PageItem *currItem;
 	QStack<PageItem*> groupStack;
 	QStack<PageItem*> groupClips;
-	if (m_doc->Items->count() != 0)
+	if (m_doc->Items->count() <= 0)
+		return;
+	if (!layer.isViewable || !layer.isPrintable)
+		return;
+	int docCurrPageNo = static_cast<int>(page->pageNr());
+	for (int it = 0; it < m_doc->Items->count(); ++it)
 	{
-		int Lnr=0;
-		ScLayer ll;
-		PageItem *currItem;
-		ll.isViewable = false;
-		ll.LNr = 0;
-		uint layerCount = m_doc->layerCount();
-		//int docCurrPageNo=static_cast<int>(m_doc->currentPageNumber());
-		int docCurrPageNo=static_cast<int>(page->pageNr());
-		for (uint la2 = 0; la2 < layerCount; ++la2)
+		currItem = m_doc->Items->at(it);
+		if (currItem->LayerNr != layer.LNr)
+			continue;
+		if (!currItem->printEnabled())
+			continue;
+		if ((m_doc->masterPageMode()) && ((currItem->OwnPage != -1) && (currItem->OwnPage != docCurrPageNo)))
+			continue;
+		if (!m_doc->masterPageMode() && !currItem->OnMasterPage.isEmpty())
 		{
-			m_doc->Layers.levelToLayer(ll, Lnr);
-			bool pr = true;
-			if (!ll.isPrintable)
-				pr = false;
-			if ((ll.isViewable) && (pr))
+			if (currItem->OnMasterPage != page->pageName())
+				continue;
+		}
+		if (currItem->isGroupControl)
+		{
+			painter->save();
+			groupClips.push(currItem);
+			groupStack.push(currItem->groupsLastItem);
+			continue;
+		}
+		QRect oldR(currItem->getRedrawBounding(1.0));
+		if (clip.intersects(oldR))
+		{
+			drawItem( currItem, painter, clip );
+			if ((currItem->asTextFrame()) && ((currItem->nextInChain() != 0) || (currItem->prevInChain() != 0)))
 			{
-				for (int it = 0; it < m_doc->Items->count(); ++it)
+				PageItem *nextItem = currItem;
+				while (nextItem != 0)
 				{
-					currItem = m_doc->Items->at(it);
-					if (currItem->LayerNr != ll.LNr)
-						continue;
-					if (!currItem->printEnabled())
-						continue;
-					if ((m_doc->masterPageMode()) && ((currItem->OwnPage != -1) && (currItem->OwnPage != docCurrPageNo)))
-						continue;
-					if (!m_doc->masterPageMode() && !currItem->OnMasterPage.isEmpty())
-					{
-						if (currItem->OnMasterPage != page->pageName())
-							continue;
-					}
-					if (currItem->isGroupControl)
-					{
-						painter->save();
-						groupClips.push(currItem);
-						groupStack.push(currItem->groupsLastItem);
-						continue;
-					}
-					QRect oldR(currItem->getRedrawBounding(1.0));
-					if (clip.intersects(oldR))
-					{
-						drawItem( currItem, painter, clip );
-						if ((currItem->asTextFrame()) && ((currItem->nextInChain() != 0) || (currItem->prevInChain() != 0)))
-						{
-							PageItem *nextItem = currItem;
-							while (nextItem != 0)
-							{
-								if (nextItem->prevInChain() != 0)
-									nextItem = nextItem->prevInChain();
-								else
-									break;
-							}
-						}
-					}
-					if (groupStack.count() != 0)
-					{
-						while (currItem == groupStack.top())
-						{
-							QMatrix mm;
-							PageItem *tmpItem = groupClips.pop();
-							FPointArray cl = tmpItem->PoLine.copy();
-							mm.translate(tmpItem->xPos(), tmpItem->yPos());
-							mm.rotate(tmpItem->rotation());
-							cl.map( mm );
-							painter->setupPolygon(&cl);
-							painter->setClipPath();
-							painter->restore();
-							groupStack.pop();
-							if (groupStack.count() == 0)
-								break;
-						}
-					}
+					if (nextItem->prevInChain() != 0)
+						nextItem = nextItem->prevInChain();
+					else
+						break;
 				}
-				for (int it = 0; it < m_doc->Items->count(); ++it)
+			}
+		}
+		if (groupStack.count() != 0)
+		{
+			while (currItem == groupStack.top())
+			{
+				QMatrix mm;
+				PageItem *tmpItem = groupClips.pop();
+				FPointArray cl = tmpItem->PoLine.copy();
+				mm.translate(tmpItem->xPos(), tmpItem->yPos());
+				mm.rotate(tmpItem->rotation());
+				cl.map( mm );
+				painter->setupPolygon(&cl);
+				painter->setClipPath();
+				painter->restore();
+				groupStack.pop();
+				if (groupStack.count() == 0)
+					break;
+			}
+		}
+	}
+	for (int it = 0; it < m_doc->Items->count(); ++it)
+	{
+		currItem = m_doc->Items->at(it);
+		if (currItem->LayerNr != layer.LNr)
+			continue;
+		if (!currItem->isTableItem)
+			continue;
+		QRect oldR(currItem->getRedrawBounding(1.0));
+		if (clip.intersects(oldR))
+		{
+			painter->save();
+			painter->translate(currItem->xPos(), currItem->yPos());
+			painter->rotate(currItem->rotation());
+			if (currItem->lineColor() != CommonStrings::None)
+			{
+				ScColorShade tmp( m_doc->PageColors[currItem->lineColor()], (int) currItem->lineShade() );
+				if ((currItem->TopLine) || (currItem->RightLine) || (currItem->BottomLine) || (currItem->LeftLine))
 				{
-					currItem = m_doc->Items->at(it);
-					if (currItem->LayerNr != ll.LNr)
-						continue;
-					if (!currItem->isTableItem)
-						continue;
-					QRect oldR(currItem->getRedrawBounding(1.0));
-					if (clip.intersects(oldR))
-					{
-						painter->save();
-						painter->translate(currItem->xPos(), currItem->yPos());
-						painter->rotate(currItem->rotation());
-						if (currItem->lineColor() != CommonStrings::None)
-						{
-							ScColorShade tmp( m_doc->PageColors[currItem->lineColor()], (int) currItem->lineShade() );
-							if ((currItem->TopLine) || (currItem->RightLine) || (currItem->BottomLine) || (currItem->LeftLine))
-							{
-								painter->setPen(tmp, currItem->lineWidth(), currItem->PLineArt, Qt::SquareCap, currItem->PLineJoin);
-								if (currItem->TopLine)
-									painter->drawLine(FPoint(0.0, 0.0), FPoint(currItem->width(), 0.0));
-								if (currItem->RightLine)
-									painter->drawLine(FPoint(currItem->width(), 0.0), FPoint(currItem->width(), currItem->height()));
-								if (currItem->BottomLine)
-									painter->drawLine(FPoint(currItem->width(), currItem->height()), FPoint(0.0, currItem->height()));
-								if (currItem->LeftLine)
-									painter->drawLine(FPoint(0.0, currItem->height()), FPoint(0.0, 0.0));
-							}
-						}
-						painter->restore();
-					}
+					painter->setPen(tmp, currItem->lineWidth(), currItem->PLineArt, Qt::SquareCap, currItem->PLineJoin);
+					if (currItem->TopLine)
+						painter->drawLine(FPoint(0.0, 0.0), FPoint(currItem->width(), 0.0));
+					if (currItem->RightLine)
+						painter->drawLine(FPoint(currItem->width(), 0.0), FPoint(currItem->width(), currItem->height()));
+					if (currItem->BottomLine)
+						painter->drawLine(FPoint(currItem->width(), currItem->height()), FPoint(0.0, currItem->height()));
+					if (currItem->LeftLine)
+						painter->drawLine(FPoint(0.0, currItem->height()), FPoint(0.0, 0.0));
 				}
 			}
-			Lnr++;
+			painter->restore();
 		}
 	}
 }
Index: scribus/scribusview.cpp
===================================================================
--- scribus/scribusview.cpp	(revision 13872)
+++ scribus/scribusview.cpp	(revision 13873)
@@ -2927,6 +2927,8 @@
 {
 	QImage pm;
 	QImage im;
+	ScLayer layer;
+	layer.isViewable = false;
 	int Nr = Doc->MasterNames[name];
 	int clipx = static_cast<int>(Doc->scratch.Left);
 	int clipy = static_cast<int>(Doc->scratch.Top);
@@ -2961,7 +2963,12 @@
 			painter->drawRect(clipx, clipy, clipw, cliph);
 		}
 		painter->beginLayer(1.0, 0);
-		m_canvas->DrawPageItems(painter, QRect(clipx, clipy, clipw, cliph));
+		int layerCount = Doc->layerCount();
+		for (int layerLevel = 0; layerLevel < layerCount; ++layerLevel)
+		{
+			Doc->Layers.levelToLayer(layer, layerLevel);
+			m_canvas->DrawPageItems(painter, layer, QRect(clipx, clipy, clipw, cliph));
+		}
 		painter->endLayer();
 		painter->end();
 		double sx = pm.width() / static_cast<double>(maxGr);
@@ -3086,8 +3093,15 @@
 				}
 			}
 
-			m_canvas->DrawMasterItems(painter, Doc->DocPages.at(Nr), QRect(clipx, clipy, clipw, cliph));
-			m_canvas->DrawPageItems(painter, QRect(clipx, clipy, clipw, cliph));
+			ScLayer layer;
+			layer.isViewable = false;
+			int layerCount = Doc->layerCount();
+			for (int layerLevel = 0; layerLevel < layerCount; ++layerLevel)
+			{
+				Doc->Layers.levelToLayer(layer, layerLevel);
+				m_canvas->DrawMasterItems(painter, Doc->DocPages.at(Nr), layer, QRect(clipx, clipy, clipw, cliph));
+				m_canvas->DrawPageItems(painter, layer, QRect(clipx, clipy, clipw, cliph));
+			}
 			painter->endLayer();
 			painter->end();
 			delete painter;
Index: scribus/sclayer.h
===================================================================
--- scribus/sclayer.h	(revision 13872)
+++ scribus/sclayer.h	(revision 13873)
@@ -36,13 +36,13 @@
 
 class SCRIBUS_API ScLayers : public QList<ScLayer>
 {
-protected:
+public:
+
 	/**
 	 * @brief  Get layer max identifier
 	 * @return Layer max identifier or -1 is list is empty
 	 */
 	int getMaxNumber(void);
-public:
 
 	/**
 	 * @brief  Get bottom layer
Index: scribus/ui/multiprogressdialog.h
===================================================================
--- scribus/ui/multiprogressdialog.h	(revision 13872)
+++ scribus/ui/multiprogressdialog.h	(revision 13873)
@@ -76,6 +76,17 @@
 		 */
 		bool addExtraProgressBars(const QStringList &barsList, const QStringList &barsTexts, const QList<bool>& barsNumerical);
 		/**
+		 * Get the overall progress for the dialog
+		 * @return overall progress 
+		 */
+		int overallProgress() const;
+		/**
+		 * Get the progress for a user defined progress bar
+		 * @param barName 
+		 * @return progress for specified user bar
+		 */
+		int progress(const QString &barName) const;
+		/**
 		 * Set a new label for a user defined progress bar
 		 * @param barName Progress bar name
 		 * @param newLabel New label
Index: scribus/ui/multiprogressdialog.cpp
===================================================================
--- scribus/ui/multiprogressdialog.cpp	(revision 13872)
+++ scribus/ui/multiprogressdialog.cpp	(revision 13873)
@@ -81,6 +81,22 @@
 	return true;
 }
 
+int MultiProgressDialog::overallProgress() const
+{
+	return overallProgressBar->value();
+}
+
+int MultiProgressDialog::progress(const QString &barName) const
+{
+	int progress = 0;
+	if (progressBars.contains(barName))
+	{
+		progress = progressBars[barName]->value();
+		return true;
+	}
+	return false;
+}
+
 bool MultiProgressDialog::setLabel(const QString &barName, const QString & newLabel)
 {
 	if (progressLabels.contains(barName))
Index: scribus/plugins/fileloader/scribus12format/scribus12format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus12format/scribus12format.cpp	(revision 13872)
+++ scribus/plugins/fileloader/scribus12format/scribus12format.cpp	(revision 13873)
@@ -20,6 +20,7 @@
 #include "units.h"
 #include "util.h"
 #include "util_color.h"
+#include "util_layer.h"
 #include "scgzfile.h"
 #include <QCursor>
 #include <QFileInfo>
@@ -717,6 +718,8 @@
 	//m_Doc->Items = m_Doc->DocItems;
 	m_Doc->setMasterPageMode(false);
 	m_View->reformPages();
+
+	handleOldLayerBehavior(m_Doc);
 	if (m_Doc->layerCount() == 0)
 	{
 		ScLayer* nl = m_Doc->Layers.newLayer( QObject::tr("Background") );
Index: scribus/plugins/fileloader/scribus13format/scribus13format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus13format/scribus13format.cpp	(revision 13872)
+++ scribus/plugins/fileloader/scribus13format/scribus13format.cpp	(revision 13873)
@@ -20,6 +20,7 @@
 #include "units.h"
 #include "util.h"
 #include "util_color.h"
+#include "util_layer.h"
 #include "util_math.h"
 #include "util_text.h"
 #include "scclocale.h"
@@ -1104,14 +1105,19 @@
 				ta->BottomLink = 0;
 		}
 	}
-	m_Doc->setActiveLayer(layerToSetActive);
 	m_Doc->setMasterPageMode(false);
 	m_Doc->setLoading(false);
 	m_Doc->reformPages(true);
 	m_Doc->setLoading(true);
 
+	handleOldLayerBehavior(m_Doc);
 	if (m_Doc->Layers.count() == 0)
-		m_Doc->Layers.newLayer( QObject::tr("Background") );
+	{
+		ScLayer* nl = m_Doc->Layers.newLayer( QObject::tr("Background") );
+		nl->flowControl  = false;
+		layerToSetActive = nl->LNr;
+	}
+	m_Doc->setActiveLayer(layerToSetActive);
 	
 	// reestablish textframe links
 	if (itemNext.count() != 0)
Index: scribus/plugins/fileloader/scribus134format/scribus134format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(revision 13872)
+++ scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(revision 13873)
@@ -27,6 +27,7 @@
 #include "util.h"
 #include "util_math.h"
 #include "util_color.h"
+#include "util_layer.h"
 #include "scgzfile.h"
 #include "scpattern.h"
 #include <QCursor>
@@ -556,12 +557,18 @@
 //		m_Doc->pageSets[m_Doc->currentPageLayout].GapVertical = 0.0;
 //		m_Doc->pageSets[m_Doc->currentPageLayout].GapBelow = dc.attribute("GapVertical", "40").toDouble();
 	}
-	m_Doc->setActiveLayer(layerToSetActive);
+
 	m_Doc->setMasterPageMode(false);
 	m_Doc->reformPages();
 
+	handleOldLayerBehavior(m_Doc);
 	if (m_Doc->Layers.count() == 0)
-		m_Doc->Layers.newLayer( QObject::tr("Background") );
+	{
+		ScLayer* nl = m_Doc->Layers.newLayer( QObject::tr("Background") );
+		nl->flowControl  = false;
+		layerToSetActive = nl->LNr;
+	}
+	m_Doc->setActiveLayer(layerToSetActive);
 
 	// reestablish textframe links
 	if (itemNext.count() != 0)
Index: scribus/plugins/svgexplugin/svgexplugin.h
===================================================================
--- scribus/plugins/svgexplugin/svgexplugin.h	(revision 13872)
+++ scribus/plugins/svgexplugin/svgexplugin.h	(revision 13873)
@@ -13,6 +13,7 @@
 #include "loadsaveplugin.h"
 
 class QString;
+class ScLayer;
 class ScribusDoc;
 class ScribusMainWindow;
 class PageItem;
@@ -77,7 +78,7 @@
 	\brief Process a page to export to SVG format
 	\param Seite Page *
 	*/
-	void ProcessPage(Page *Seite);
+	void ProcessPageLayer(Page *page, ScLayer& layer);
 	void ProcessItemOnPage(double xOffset, double yOffset, PageItem *Item, QDomElement *parentElem);
 	QDomElement processPolyItem(PageItem *Item, QString trans, QString fill, QString stroke);
 	QDomElement processLineItem(PageItem *Item, QString trans, QString stroke);
Index: scribus/plugins/svgexplugin/svgexplugin.cpp
===================================================================
--- scribus/plugins/svgexplugin/svgexplugin.cpp	(revision 13872)
+++ scribus/plugins/svgexplugin/svgexplugin.cpp	(revision 13873)
@@ -195,7 +195,7 @@
 	Options = Opts;
 	QFileInfo fiBase(fName);
 	baseDir = fiBase.absolutePath();
-	Page *Seite;
+	Page *page;
 	GradCount = 0;
 	ClipCount = 0;
 	PattCount = 0;
@@ -203,9 +203,9 @@
 	QString vo = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
 	QString st = "<svg></svg>";
 	docu.setContent(st);
-	Seite = m_Doc->currentPage();
-	double pageWidth  = Seite->width();
-	double pageHeight = Seite->height();
+	page = m_Doc->currentPage();
+	double pageWidth  = page->width();
+	double pageHeight = page->height();
 	docElement = docu.documentElement();
 	docElement.setAttribute("width", FToStr(pageWidth)+"pt");
 	docElement.setAttribute("height", FToStr(pageHeight)+"pt");
@@ -239,10 +239,19 @@
 		backG.setAttribute("style", "fill:"+m_Doc->papColor.name()+";" + "stroke:none;");
 		docElement.appendChild(backG);
 	}
-	Seite = m_Doc->MasterPages.at(m_Doc->MasterNames[m_Doc->currentPage()->MPageNam]);
-	ProcessPage(Seite);
-	Seite = m_Doc->currentPage();
-	ProcessPage(Seite);
+	ScLayer ll;
+	ll.isPrintable = false;
+	for (int la = 0; la < m_Doc->Layers.count(); la++)
+	{
+		m_Doc->Layers.levelToLayer(ll, la);
+		if (ll.isPrintable)
+		{
+			page = m_Doc->MasterPages.at(m_Doc->MasterNames[m_Doc->currentPage()->MPageNam]);
+			ProcessPageLayer(page, ll);
+			page = m_Doc->currentPage();
+			ProcessPageLayer(page, ll);
+		}
+	}
 	if(Options.compressFile)
 	{
 		// zipped saving
@@ -265,134 +274,126 @@
 	return true;
 }
 
-void SVGExPlug::ProcessPage(Page *Seite)
+void SVGExPlug::ProcessPageLayer(Page *page, ScLayer& layer)
 {
-	int Lnr = 0;
-	ScLayer ll;
-	ll.isPrintable = false;
-	ll.LNr = 0;
 	QDomElement layerGroup;
 	PageItem *Item;
 	QList<PageItem*> Items;
 	QStack<PageItem*> groupStack;
 	QStack<QDomElement> groupStack2;
 	Page* SavedAct = m_Doc->currentPage();
-	if (Seite->pageName().isEmpty())
+	if (page->pageName().isEmpty())
 		Items = m_Doc->DocItems;
 	else
 		Items = m_Doc->MasterItems;
 	if (Items.count() == 0)
 		return;
-	m_Doc->setCurrentPage(Seite);
-	for (int la = 0; la < m_Doc->Layers.count(); la++)
+	if (!layer.isPrintable)
+		return;
+	m_Doc->setCurrentPage(page);
+
+	layerGroup = docu.createElement("g");
+	layerGroup.setAttribute("id", layer.Name);
+	if (layer.transparency != 1.0)
+		layerGroup.setAttribute("opacity", FToStr(layer.transparency));
+	for(int j = 0; j < Items.count(); ++j)
 	{
-		m_Doc->Layers.levelToLayer(ll, Lnr);
-		if (ll.isPrintable)
+		Item = Items.at(j);
+		if (Item->LayerNr != layer.LNr)
+			continue;
+		if (!Item->printEnabled())
+			continue;
+		double x = page->xOffset();
+		double y = page->yOffset();
+		double w = page->width();
+		double h = page->height();
+		double x2 = Item->BoundingX;
+		double y2 = Item->BoundingY;
+		double w2 = Item->BoundingW;
+		double h2 = Item->BoundingH;
+		if (!( qMax( x, x2 ) <= qMin( x+w, x2+w2 ) && qMax( y, y2 ) <= qMin( y+h, y2+h2 )))
+			continue;
+		if (Item->isGroupControl)
 		{
+			groupStack.push(Item->groupsLastItem);
+			groupStack2.push(layerGroup);
 			layerGroup = docu.createElement("g");
-			layerGroup.setAttribute("id", ll.Name);
-			if (ll.transparency != 1.0)
-				layerGroup.setAttribute("opacity", FToStr(ll.transparency));
-			for(int j = 0; j < Items.count(); ++j)
+			if (!Item->AutoName)
+				layerGroup.setAttribute("id", Item->itemName());
+			if (Item->fillTransparency() != 0)
+				layerGroup.setAttribute("opacity", FToStr(1.0 - Item->fillTransparency()));
+			QDomElement ob = docu.createElement("clipPath");
+			ob.setAttribute("id", "Clip"+IToStr(ClipCount));
+			QDomElement cl = docu.createElement("path");
+			cl.setAttribute("d", SetClipPath(&Item->PoLine, true));
+			QString trans = "translate("+FToStr(Item->xPos()-page->xOffset())+", "+FToStr(Item->yPos()-page->yOffset())+")";
+			if (Item->rotation() != 0)
+				trans += " rotate("+FToStr(Item->rotation())+")";
+			cl.setAttribute("transform", trans);
+			ob.appendChild(cl);
+			globalDefs.appendChild(ob);
+			layerGroup.setAttribute("clip-path", "url(#Clip"+IToStr(ClipCount)+")");
+			ClipCount++;
+			continue;
+		}
+		ProcessItemOnPage(Item->xPos()-page->xOffset(), Item->yPos()-page->yOffset(), Item, &layerGroup);
+		if (groupStack.count() != 0)
+		{
+			while (Item == groupStack.top())
 			{
-				Item = Items.at(j);
-				if (Item->LayerNr != ll.LNr)
-					continue;
-				if (!Item->printEnabled())
-					continue;
-				double x = Seite->xOffset();
-				double y = Seite->yOffset();
-				double w = Seite->width();
-				double h = Seite->height();
-				double x2 = Item->BoundingX;
-				double y2 = Item->BoundingY;
-				double w2 = Item->BoundingW;
-				double h2 = Item->BoundingH;
-				if (!( qMax( x, x2 ) <= qMin( x+w, x2+w2 ) && qMax( y, y2 ) <= qMin( y+h, y2+h2 )))
-					continue;
-				if (Item->isGroupControl)
-				{
-					groupStack.push(Item->groupsLastItem);
-					groupStack2.push(layerGroup);
-					layerGroup = docu.createElement("g");
-					if (!Item->AutoName)
-						layerGroup.setAttribute("id", Item->itemName());
-					if (Item->fillTransparency() != 0)
-						layerGroup.setAttribute("opacity", FToStr(1.0 - Item->fillTransparency()));
-					QDomElement ob = docu.createElement("clipPath");
-					ob.setAttribute("id", "Clip"+IToStr(ClipCount));
-					QDomElement cl = docu.createElement("path");
-					cl.setAttribute("d", SetClipPath(&Item->PoLine, true));
-					QString trans = "translate("+FToStr(Item->xPos()-Seite->xOffset())+", "+FToStr(Item->yPos()-Seite->yOffset())+")";
-					if (Item->rotation() != 0)
-						trans += " rotate("+FToStr(Item->rotation())+")";
-					cl.setAttribute("transform", trans);
-					ob.appendChild(cl);
-					globalDefs.appendChild(ob);
-					layerGroup.setAttribute("clip-path", "url(#Clip"+IToStr(ClipCount)+")");
-					ClipCount++;
-					continue;
-				}
-				ProcessItemOnPage(Item->xPos()-Seite->xOffset(), Item->yPos()-Seite->yOffset(), Item, &layerGroup);
-				if (groupStack.count() != 0)
-				{
-					while (Item == groupStack.top())
-					{
-						groupStack.pop();
-						groupStack2.top().appendChild(layerGroup);
-						layerGroup = groupStack2.pop();
-						if (groupStack.count() == 0)
-							break;
-					}
-				}
+				groupStack.pop();
+				groupStack2.top().appendChild(layerGroup);
+				layerGroup = groupStack2.pop();
+				if (groupStack.count() == 0)
+					break;
 			}
-			for(int j = 0; j < Items.count(); ++j)
-			{
-				Item = Items.at(j);
-				if (Item->LayerNr != ll.LNr)
-					continue;
-				if (!Item->printEnabled())
-					continue;
-				double x = Seite->xOffset();
-				double y = Seite->yOffset();
-				double w = Seite->width();
-				double h = Seite->height();
-				double x2 = Item->BoundingX;
-				double y2 = Item->BoundingY;
-				double w2 = Item->BoundingW;
-				double h2 = Item->BoundingH;
-				if (!( qMax( x, x2 ) <= qMin( x+w, x2+w2 ) && qMax( y, y2 ) <= qMin( y+h, y2+h2 )))
-					continue;
-				if (!Item->isTableItem)
-					continue;
-				if ((Item->lineColor() == CommonStrings::None) || (Item->lineWidth() == 0.0))
-					continue;
-				if ((Item->TopLine) || (Item->RightLine) || (Item->BottomLine) || (Item->LeftLine))
-				{
-					QString trans = "translate("+FToStr(Item->xPos()-Seite->xOffset())+", "+FToStr(Item->yPos()-Seite->yOffset())+")";
-					if (Item->rotation() != 0)
-						trans += " rotate("+FToStr(Item->rotation())+")";
-					QString stroke = getStrokeStyle(Item);
-					QDomElement ob = docu.createElement("path");
-					ob.setAttribute("transform", trans);
-					ob.setAttribute("style", "fill:none; " + stroke);
-					QString pathAttr = "";
-					if (Item->TopLine)
-						pathAttr += "M 0 0 L "+FToStr(Item->width())+" 0";
-					if (Item->RightLine)
-						pathAttr += " M " + FToStr(Item->width()) + "0 L "+FToStr(Item->width())+" "+FToStr(Item->height());
-					if (Item->BottomLine)
-						pathAttr += " M 0 " + FToStr(Item->height()) + " L "+FToStr(Item->width())+" "+FToStr(Item->height());
-					if (Item->LeftLine)
-						pathAttr += " M 0 0 L 0 "+FToStr(Item->height());
-					ob.setAttribute("d", pathAttr);
-					layerGroup.appendChild(ob);
-				}
-			}
-			docElement.appendChild(layerGroup);
 		}
-		Lnr++;
 	}
+	for(int j = 0; j < Items.count(); ++j)
+	{
+		Item = Items.at(j);
+		if (Item->LayerNr != layer.LNr)
+			continue;
+		if (!Item->printEnabled())
+			continue;
+		double x = page->xOffset();
+		double y = page->yOffset();
+		double w = page->width();
+		double h = page->height();
+		double x2 = Item->BoundingX;
+		double y2 = Item->BoundingY;
+		double w2 = Item->BoundingW;
+		double h2 = Item->BoundingH;
+		if (!( qMax( x, x2 ) <= qMin( x+w, x2+w2 ) && qMax( y, y2 ) <= qMin( y+h, y2+h2 )))
+			continue;
+		if (!Item->isTableItem)
+			continue;
+		if ((Item->lineColor() == CommonStrings::None) || (Item->lineWidth() == 0.0))
+			continue;
+		if ((Item->TopLine) || (Item->RightLine) || (Item->BottomLine) || (Item->LeftLine))
+		{
+			QString trans = "translate("+FToStr(Item->xPos()-page->xOffset())+", "+FToStr(Item->yPos()-page->yOffset())+")";
+			if (Item->rotation() != 0)
+				trans += " rotate("+FToStr(Item->rotation())+")";
+			QString stroke = getStrokeStyle(Item);
+			QDomElement ob = docu.createElement("path");
+			ob.setAttribute("transform", trans);
+			ob.setAttribute("style", "fill:none; " + stroke);
+			QString pathAttr = "";
+			if (Item->TopLine)
+				pathAttr += "M 0 0 L "+FToStr(Item->width())+" 0";
+			if (Item->RightLine)
+				pathAttr += " M " + FToStr(Item->width()) + "0 L "+FToStr(Item->width())+" "+FToStr(Item->height());
+			if (Item->BottomLine)
+				pathAttr += " M 0 " + FToStr(Item->height()) + " L "+FToStr(Item->width())+" "+FToStr(Item->height());
+			if (Item->LeftLine)
+				pathAttr += " M 0 0 L 0 "+FToStr(Item->height());
+			ob.setAttribute("d", pathAttr);
+			layerGroup.appendChild(ob);
+		}
+	}
+	docElement.appendChild(layerGroup);
+
 	m_Doc->setCurrentPage(SavedAct);
 }
 
Index: scribus/pslib.cpp
===================================================================
--- scribus/pslib.cpp	(revision 13872)
+++ scribus/pslib.cpp	(revision 13873)
@@ -1782,7 +1782,6 @@
 	double gy = 0.0;
 	double gw = 0.0;
 	double gh = 0.0;;
-	dum.clear();
 	PS_set_Info("Author", Doc->documentInfo.getAuthor());
 	PS_set_Info("Title", Doc->documentInfo.getTitle());
 	if (!farb)
@@ -1945,26 +1944,27 @@
 		if (usingGUI)
 			ScQApp->processEvents();
 		a = pageNs[aa]-1;
+		Page* page = Doc->Pages->at(a);
 		//if ((!Art) && (view->SelItem.count() != 0))
 		if ((!Art) && (Doc->m_Selection->count() != 0))
 		{
 			MarginStruct Ma;
 			Ma.Left = gx;
 			Ma.Top = gy;
-			Ma.Bottom = Doc->Pages->at(a)->height() - (gy + gh);
-			Ma.Right = Doc->Pages->at(a)->width() - (gx + gw);
-			PS_begin_page(Doc->Pages->at(a), &Ma, true);
+			Ma.Bottom = page->height() - (gy + gh);
+			Ma.Right  = page->width() - (gx + gw);
+			PS_begin_page(page, &Ma, true);
 		}
 		else
-			PS_begin_page(Doc->Pages->at(a), &Doc->Pages->at(a)->Margins, doClip);
+			PS_begin_page(page, &page->Margins, doClip);
 		if (Hm)
 		{
-			PS_translate(Doc->Pages->at(a)->width(), 0);
+			PS_translate(page->width(), 0);
 			PS_scale(-1, 1);
 		}
 		if (Vm)
 		{
-			PS_translate(0, Doc->Pages->at(a)->height());
+			PS_translate(0, page->height());
 			PS_scale(1, -1);
 		}
 		if (sep)
@@ -1982,201 +1982,23 @@
 			else
 				PS_plate(4, SepNam);
 		}
-		if (!Doc->Pages->at(a)->MPageNam.isEmpty() && !abortExport && !errorOccured)
+		ScLayer ll;
+		ll.isPrintable = false;
+		for (int lam = 0; lam < Doc->Layers.count() && !abortExport && !errorOccured; ++lam)
 		{
-			int h, s, v, k;
-			QByteArray chstrc;
-			QString chstr;
-			int Lnr = 0;
-			ScLayer ll;
-			ll.isPrintable = false;
-			ll.LNr = 0;
-			Page* mPage = Doc->MasterPages.at(Doc->MasterNames[Doc->Pages->at(a)->MPageNam]);
-			if (Doc->MasterItems.count() != 0)
+			Doc->Layers.levelToLayer(ll, lam);
+			if (!ll.isPrintable)
+				continue;
+			if (!page->MPageNam.isEmpty() && !abortExport && !errorOccured)
 			{
-				for (int lam = 0; lam < Doc->Layers.count() && !abortExport && !errorOccured; ++lam)
-				{
-					Doc->Layers.levelToLayer(ll, Lnr);
-					if (ll.isPrintable)
-					{
-						for (int am = 0; am < Doc->Pages->at(a)->FromMaster.count() && !abortExport; ++am)
-						{
-							QString tmps;
-							PageItem *ite = Doc->Pages->at(a)->FromMaster.at(am);
-							if (usingGUI)
-								ScQApp->processEvents();
-							if ((ite->LayerNr != ll.LNr) || (!ite->printEnabled()))
-								continue;
-							if (ite->isGroupControl)
-							{
-								PS_save();
-								FPointArray cl = ite->PoLine.copy();
-								QMatrix mm;
-								mm.translate(ite->xPos() - mPage->xOffset(), (ite->yPos() - mPage->yOffset()) - Doc->Pages->at(a)->height());
-								mm.rotate(ite->rotation());
-								cl.map( mm );
-								SetClipPath(&cl);
-								PS_closepath();
-								PS_clip(true);
-								groupStack.push(ite->groupsLastItem);
-								continue;
-							}
-							if (!(ite->asTextFrame()) && !(ite->asImageFrame()))
-							{
-								int mpIndex = Doc->MasterNames[Doc->Pages->at(a)->MPageNam];
-								PS_UseTemplate(QString("mp_obj_%1_%2").arg(mpIndex).arg(ite->ItemNr));
-							}
-							else if (ite->asImageFrame())
-							{
-								PS_save();
-								// JG : replace what seems mostly duplicate code by corresponding function call (#3936)
-								errorOccured = !ProcessItem(Doc, mPage, ite, a, sep, farb, Ic, gcr, false, false, true);
-								if (errorOccured) break;
-								PS_restore();
-							}
-							else if (ite->asTextFrame())
-							{
-								PS_save();
-								if (ite->doOverprint)
-								{
-									PutStream("true setoverprint\n");
-									PutStream("true setoverprintmode\n");
-								}
-								if (ite->fillColor() != CommonStrings::None)
-								{
-									SetColor(ite->fillColor(), ite->fillShade(), &h, &s, &v, &k, gcr);
-									PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
-								}
-								PS_translate(ite->xPos() - mPage->xOffset(), mPage->height() - (ite->yPos() - mPage->yOffset()));
-								if (ite->rotation() != 0)
-									PS_rotate(-ite->rotation());
-								if ((ite->fillColor() != CommonStrings::None) || (ite->GrType != 0))
-								{
-									SetClipPath(&ite->PoLine);
-									PS_closepath();
-									if (ite->GrType != 0)
-										HandleGradient(ite, ite->width(), ite->height(), gcr);
-									else
-										putColor(ite->fillColor(), ite->fillShade(), true);
-								}
-								if (ite->imageFlippedH())
-								{
-									PS_translate(ite->width(), 0);
-									PS_scale(-1, 1);
-								}
-								if (ite->imageFlippedV())
-								{
-									PS_translate(0, -ite->height());
-									PS_scale(1, -1);
-								}
-								setTextSt(Doc, ite, gcr, a, mPage, sep, farb, Ic, true);
-								if (((ite->lineColor() != CommonStrings::None) || (!ite->NamedLStyle.isEmpty())) && (!ite->isTableItem))
-								{
-									if (ite->NamedLStyle.isEmpty()) // && (ite->lineWidth() != 0.0))
-									{
-										SetColor(ite->lineColor(), ite->lineShade(), &h, &s, &v, &k, gcr);
-										PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
-										PS_setlinewidth(ite->lineWidth());
-										PS_setcapjoin(ite->PLineEnd, ite->PLineJoin);
-										PS_setdash(ite->PLineArt, ite->DashOffset, ite->DashValues);
-										SetClipPath(&ite->PoLine);
-										PS_closepath();
-										putColor(ite->lineColor(), ite->lineShade(), false);
-									}
-									else
-									{
-										multiLine ml = Doc->MLineStyles[ite->NamedLStyle];
-										for (int it = ml.size()-1; it > -1; it--)
-										{
-											if (ml[it].Color != CommonStrings::None) //&& (ml[it].Width != 0))
-											{
-												SetColor(ml[it].Color, ml[it].Shade, &h, &s, &v, &k, gcr);
-												PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
-												PS_setlinewidth(ml[it].Width);
-												PS_setcapjoin(static_cast<Qt::PenCapStyle>(ml[it].LineEnd), static_cast<Qt::PenJoinStyle>(ml[it].LineJoin));
-												PS_setdash(static_cast<Qt::PenStyle>(ml[it].Dash), 0, dum);
-												SetClipPath(&ite->PoLine);
-												PS_closepath();
-												putColor(ml[it].Color, ml[it].Shade, false);
-											}
-										}
-									}
-								}
-								PS_restore();
-							}
-							if (groupStack.count() != 0)
-							{
-								while (ite == groupStack.top())
-								{
-									PS_restore();
-									groupStack.pop();
-									if (groupStack.count() == 0)
-										break;
-								}
-							}
-						}
-					}
-					for (int am = 0; am < Doc->Pages->at(a)->FromMaster.count() && !abortExport; ++am)
-					{
-						PageItem *ite = Doc->Pages->at(a)->FromMaster.at(am);
-						if (!ite->isTableItem)
-							continue;
-						if ((ite->lineColor() == CommonStrings::None) || (ite->lineWidth() == 0.0))
-							continue;
-						if (ite->printEnabled())
-						{
-							PS_save();
-							if (ite->doOverprint)
-							{
-								PutStream("true setoverprint\n");
-								PutStream("true setoverprintmode\n");
-							}
-							if (ite->lineColor() != CommonStrings::None)
-							{
-								SetColor(ite->lineColor(), ite->lineShade(), &h, &s, &v, &k, gcr);
-								PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
-							}
-							PS_setlinewidth(ite->lineWidth());
-							PS_setcapjoin(ite->PLineEnd, ite->PLineJoin);
-							PS_setdash(ite->PLineArt, ite->DashOffset, ite->DashValues);
-							PS_translate(ite->xPos() - mPage->xOffset(), mPage->height() - (ite->yPos() - mPage->yOffset()));
-							if (ite->rotation() != 0)
-								PS_rotate(-ite->rotation());
-							if ((ite->TopLine) || (ite->RightLine) || (ite->BottomLine) || (ite->LeftLine))
-							{
-								if (ite->TopLine)
-								{
-									PS_moveto(0, 0);
-									PS_lineto(ite->width(), 0);
-								}
-								if (ite->RightLine)
-								{
-									PS_moveto(ite->width(), 0);
-									PS_lineto(ite->width(), -ite->height());
-								}
-								if (ite->BottomLine)
-								{
-									PS_moveto(0, -ite->height());
-									PS_lineto(ite->width(), -ite->height());
-								}
-								if (ite->LeftLine)
-								{
-									PS_moveto(0, 0);
-									PS_lineto(0, -ite->height());
-								}
-								putColor(ite->lineColor(), ite->lineShade(), false);
-							}
-							PS_restore();
-						}
-					}
-					Lnr++;
-				}
-				if (abortExport || errorOccured) break;
+				errorOccured |= !ProcessMasterPageLayer(Doc, page, ll, a, sep, farb, Ic, gcr);
 			}
+			if (!abortExport && !errorOccured)
+			{
+				errorOccured |= !ProcessPageLayer(Doc, page, ll, a+1, sep, farb, Ic, gcr);
+			}
 		}
 		if (!abortExport && !errorOccured)
-			ProcessPage(Doc, Doc->Pages->at(a), a+1, sep, farb, Ic, gcr);
-		if (!abortExport && !errorOccured)
 			PS_end_page();
 		if (sep)
 		{
@@ -2214,7 +2036,6 @@
 	int d;
 	ScText *hl;
 	QVector<double> dum;
-	dum.clear();
 	QChar chstr;
 	QString tmps;
 	if (c->printEnabled())
@@ -3235,6 +3056,336 @@
 	}
 }
 
+bool PSLib::ProcessMasterPageLayer(ScribusDoc* Doc, Page* page, ScLayer& layer, uint PNr, bool sep, bool farb, bool ic, bool gcr)
+{
+	bool success = true;
+	int h, s, v, k;
+	QVector<double> dum;
+	QStack<PageItem*> groupStack;
+	Page* mPage = Doc->MasterPages.at(Doc->MasterNames[page->MPageNam]);
+	if (layer.isPrintable)
+	{
+		for (int am = 0; am < page->FromMaster.count() && !abortExport; ++am)
+		{
+			QString tmps;
+			PageItem *ite = page->FromMaster.at(am);
+			if (usingGUI)
+				ScQApp->processEvents();
+			if ((ite->LayerNr != layer.LNr) || (!ite->printEnabled()))
+				continue;
+			if (ite->isGroupControl)
+			{
+				PS_save();
+				FPointArray cl = ite->PoLine.copy();
+				QMatrix mm;
+				mm.translate(ite->xPos() - mPage->xOffset(), (ite->yPos() - mPage->yOffset()) - page->height());
+				mm.rotate(ite->rotation());
+				cl.map( mm );
+				SetClipPath(&cl);
+				PS_closepath();
+				PS_clip(true);
+				groupStack.push(ite->groupsLastItem);
+				continue;
+			}
+			if (!(ite->asTextFrame()) && !(ite->asImageFrame()))
+			{
+				int mpIndex = Doc->MasterNames[page->MPageNam];
+				PS_UseTemplate(QString("mp_obj_%1_%2").arg(mpIndex).arg(ite->ItemNr));
+			}
+			else if (ite->asImageFrame())
+			{
+				PS_save();
+				// JG : replace what seems mostly duplicate code by corresponding function call (#3936)
+				success &= ProcessItem(Doc, mPage, ite, PNr, sep, farb, ic, gcr, false, false, true);
+				PS_restore();
+			}
+			else if (ite->asTextFrame())
+			{
+				PS_save();
+				if (ite->doOverprint)
+				{
+					PutStream("true setoverprint\n");
+					PutStream("true setoverprintmode\n");
+				}
+				if (ite->fillColor() != CommonStrings::None)
+				{
+					SetColor(ite->fillColor(), ite->fillShade(), &h, &s, &v, &k, gcr);
+					PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
+				}
+				PS_translate(ite->xPos() - mPage->xOffset(), mPage->height() - (ite->yPos() - mPage->yOffset()));
+				if (ite->rotation() != 0)
+					PS_rotate(-ite->rotation());
+				if ((ite->fillColor() != CommonStrings::None) || (ite->GrType != 0))
+				{
+					SetClipPath(&ite->PoLine);
+					PS_closepath();
+					if (ite->GrType != 0)
+						HandleGradient(ite, ite->width(), ite->height(), gcr);
+					else
+						putColor(ite->fillColor(), ite->fillShade(), true);
+				}
+				if (ite->imageFlippedH())
+				{
+					PS_translate(ite->width(), 0);
+					PS_scale(-1, 1);
+				}
+				if (ite->imageFlippedV())
+				{
+					PS_translate(0, -ite->height());
+					PS_scale(1, -1);
+				}
+				setTextSt(Doc, ite, gcr, PNr, mPage, sep, farb, ic, true);
+				if (((ite->lineColor() != CommonStrings::None) || (!ite->NamedLStyle.isEmpty())) && (!ite->isTableItem))
+				{
+					if (ite->NamedLStyle.isEmpty()) // && (ite->lineWidth() != 0.0))
+					{
+						SetColor(ite->lineColor(), ite->lineShade(), &h, &s, &v, &k, gcr);
+						PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
+						PS_setlinewidth(ite->lineWidth());
+						PS_setcapjoin(ite->PLineEnd, ite->PLineJoin);
+						PS_setdash(ite->PLineArt, ite->DashOffset, ite->DashValues);
+						SetClipPath(&ite->PoLine);
+						PS_closepath();
+						putColor(ite->lineColor(), ite->lineShade(), false);
+					}
+					else
+					{
+						multiLine ml = Doc->MLineStyles[ite->NamedLStyle];
+						for (int it = ml.size()-1; it > -1; it--)
+						{
+							if (ml[it].Color != CommonStrings::None) //&& (ml[it].Width != 0))
+							{
+								SetColor(ml[it].Color, ml[it].Shade, &h, &s, &v, &k, gcr);
+								PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
+								PS_setlinewidth(ml[it].Width);
+								PS_setcapjoin(static_cast<Qt::PenCapStyle>(ml[it].LineEnd), static_cast<Qt::PenJoinStyle>(ml[it].LineJoin));
+								PS_setdash(static_cast<Qt::PenStyle>(ml[it].Dash), 0, dum);
+								SetClipPath(&ite->PoLine);
+								PS_closepath();
+								putColor(ml[it].Color, ml[it].Shade, false);
+							}
+						}
+					}
+				}
+				PS_restore();
+			}
+			if (groupStack.count() != 0)
+			{
+				while (ite == groupStack.top())
+				{
+					PS_restore();
+					groupStack.pop();
+					if (groupStack.count() == 0)
+						break;
+				}
+			}
+			if (!success) break;
+		}
+	}
+	for (int am = 0; am < page->FromMaster.count() && !abortExport; ++am)
+	{
+		PageItem *ite = page->FromMaster.at(am);
+		if (!ite->isTableItem)
+			continue;
+		if ((ite->lineColor() == CommonStrings::None) || (ite->lineWidth() == 0.0))
+			continue;
+		if (ite->printEnabled())
+		{
+			PS_save();
+			if (ite->doOverprint)
+			{
+				PutStream("true setoverprint\n");
+				PutStream("true setoverprintmode\n");
+			}
+			if (ite->lineColor() != CommonStrings::None)
+			{
+				SetColor(ite->lineColor(), ite->lineShade(), &h, &s, &v, &k, gcr);
+				PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
+			}
+			PS_setlinewidth(ite->lineWidth());
+			PS_setcapjoin(ite->PLineEnd, ite->PLineJoin);
+			PS_setdash(ite->PLineArt, ite->DashOffset, ite->DashValues);
+			PS_translate(ite->xPos() - mPage->xOffset(), mPage->height() - (ite->yPos() - mPage->yOffset()));
+			if (ite->rotation() != 0)
+				PS_rotate(-ite->rotation());
+			if ((ite->TopLine) || (ite->RightLine) || (ite->BottomLine) || (ite->LeftLine))
+			{
+				if (ite->TopLine)
+				{
+					PS_moveto(0, 0);
+					PS_lineto(ite->width(), 0);
+				}
+				if (ite->RightLine)
+				{
+					PS_moveto(ite->width(), 0);
+					PS_lineto(ite->width(), -ite->height());
+				}
+				if (ite->BottomLine)
+				{
+					PS_moveto(0, -ite->height());
+					PS_lineto(ite->width(), -ite->height());
+				}
+				if (ite->LeftLine)
+				{
+					PS_moveto(0, 0);
+					PS_lineto(0, -ite->height());
+				}
+				putColor(ite->lineColor(), ite->lineShade(), false);
+			}
+			PS_restore();
+		}
+	}
+	return success;
+}
+
+bool PSLib::ProcessPageLayer(ScribusDoc* Doc, Page* page, ScLayer& layer, uint PNr, bool sep, bool farb, bool ic, bool gcr)
+{
+	bool success = true;
+	int b, h, s, v, k;
+	QList<PageItem*> items;
+	QStack<PageItem*> groupStack;
+	items = (page->pageName().isEmpty()) ? Doc->DocItems : Doc->MasterItems;
+	if (layer.isPrintable && !abortExport)
+	{
+		for (b = 0; b < items.count() && !abortExport; ++b)
+		{
+			PageItem *item = items.at(b);
+			if (usingGUI)
+				ScQApp->processEvents();
+			if (item->LayerNr != layer.LNr)
+				continue;
+			if ((!page->pageName().isEmpty()) && (item->asTextFrame()))
+				continue;
+			if ((!page->pageName().isEmpty()) && (item->asImageFrame()) && ((sep) || (!farb)))
+				continue;
+			//if ((!Art) && (view->SelItem.count() != 0) && (!c->Select))
+			if ((!Art) && (!item->isSelected()) && (Doc->m_Selection->count() != 0))
+				continue;
+			double bLeft, bRight, bBottom, bTop;
+			GetBleeds(page, bLeft, bRight, bBottom, bTop);
+			double x  = page->xOffset() - bLeft;
+			double y  = page->yOffset() - bTop;
+			double w  = page->width() + bLeft + bRight;
+			double h1 = page->height() + bBottom + bTop;
+			double ilw = item->lineWidth();
+			double x2 = item->BoundingX - ilw / 2.0;
+			double y2 = item->BoundingY - ilw / 2.0;
+			double w2 = qMax(item->BoundingW + ilw, 1.0);
+			double h2 = qMax(item->BoundingH + ilw, 1.0);
+			if (!( qMax( x, x2 ) <= qMin( x+w, x2+w2 ) && qMax( y, y2 ) <= qMin( y+h1, y2+h2 )))
+				continue;
+			if (item->ChangedMasterItem)
+				continue;
+			if ((!page->pageName().isEmpty()) && (item->OwnPage != static_cast<int>(page->pageNr())) && (item->OwnPage != -1))
+				continue;
+			if (item->isGroupControl)
+			{
+				PS_save();
+				FPointArray cl = item->PoLine.copy();
+				QMatrix mm;
+				mm.translate(item->xPos() - page->xOffset(), (item->yPos() - page->yOffset()) - page->height());
+				mm.rotate(item->rotation());
+				cl.map( mm );
+				SetClipPath(&cl);
+				PS_closepath();
+				PS_clip(true);
+				groupStack.push(item->groupsLastItem);
+				continue;
+			}
+			success &= ProcessItem(Doc, page, item, PNr, sep, farb, ic, gcr, false);
+			if (groupStack.count() != 0)
+			{
+				while (item == groupStack.top())
+				{
+					PS_restore();
+					groupStack.pop();
+					if (groupStack.count() == 0)
+						break;
+				}
+			}
+			if (!success) break;
+		}
+	}
+	if (!success)
+		return false;
+	for (b = 0; b < items.count() && !abortExport; ++b)
+	{
+		PageItem* item = items.at(b);
+		if (usingGUI)
+			ScQApp->processEvents();
+		if (item->LayerNr != layer.LNr)
+			continue;
+		if ((!page->pageName().isEmpty()) && (item->asTextFrame()))
+			continue;
+		if ((!page->pageName().isEmpty()) && (item->asImageFrame()) && ((sep) || (!farb)))
+			continue;
+		double bLeft, bRight, bBottom, bTop;
+		GetBleeds(page, bLeft, bRight, bBottom, bTop);
+		double x  = page->xOffset() - bLeft;
+		double y  = page->yOffset() - bTop;
+		double w  = page->width() + bLeft + bRight;
+		double h1 = page->height() + bBottom + bTop;
+		double ilw= item->lineWidth();
+		double x2 = item->BoundingX - ilw / 2.0;
+		double y2 = item->BoundingY - ilw / 2.0;
+		double w2 = qMax(item->BoundingW + ilw, 1.0);
+		double h2 = qMax(item->BoundingH + ilw, 1.0);
+		if (!( qMax( x, x2 ) <= qMin( x+w, x2+w2 ) && qMax( y, y2 ) <= qMin( y+h1, y2+h2 )))
+			continue;
+		if (item->ChangedMasterItem)
+			continue;
+		if (!item->isTableItem || !item->printEnabled())
+			continue;
+		if (item->lineColor() == CommonStrings::None) //|| (item->lineWidth() == 0.0))
+			continue;
+		if ((!page->pageName().isEmpty()) && (item->OwnPage != static_cast<int>(page->pageNr())) && (item->OwnPage != -1))
+			continue;
+		PS_save();
+		if (item->doOverprint)
+		{
+			PutStream("true setoverprint\n");
+			PutStream("true setoverprintmode\n");
+		}
+		if (item->lineColor() != CommonStrings::None)
+		{
+			SetColor(item->lineColor(), item->lineShade(), &h, &s, &v, &k, gcr);
+			PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
+		}
+		PS_setlinewidth(item->lineWidth());
+		PS_setcapjoin(item->PLineEnd, item->PLineJoin);
+		PS_setdash(item->PLineArt, item->DashOffset, item->DashValues);
+		PS_translate(item->xPos() - page->xOffset(), page->height() - (item->yPos() - page->yOffset()));
+		if (item->rotation() != 0)
+			PS_rotate(-item->rotation());
+		if ((item->TopLine) || (item->RightLine) || (item->BottomLine) || (item->LeftLine))
+		{
+			if (item->TopLine)
+			{
+				PS_moveto(0, 0);
+				PS_lineto(item->width(), 0);
+			}
+			if (item->RightLine)
+			{
+				PS_moveto(item->width(), 0);
+				PS_lineto(item->width(), -item->height());
+			}
+			if (item->BottomLine)
+			{
+				PS_moveto(0, -item->height());
+				PS_lineto(item->width(), -item->height());
+			}
+			if (item->LeftLine)
+			{
+				PS_moveto(0, 0);
+				PS_lineto(0, -item->height());
+			}
+			putColor(item->lineColor(), item->lineShade(), false);
+		}
+		PS_restore();
+	}
+	return success;
+}
+
 void PSLib::HandleGradient(PageItem *c, double w, double h, bool gcr)
 {
 	int ch,cs,cv,ck;
Index: scribus/util_layer.cpp
===================================================================
--- scribus/util_layer.cpp	(revision 0)
+++ scribus/util_layer.cpp	(revision 13873)
@@ -0,0 +1,89 @@
+/*
+For general Scribus (>=1.3.2) copyright and licensing information please refer
+to the COPYING file provided with the program. Following this notice may exist
+a copyright and/or license notice that predates the release of Scribus 1.3.2
+for which a new license (GPL+exception) is in place.
+*/
+/***************************************************************************
+                          util.cpp  -  description
+                             -------------------
+    begin                : Fri Sep 14 2001
+    copyright            : (C) 2001 by Franz Schmid
+    email                : Franz.Schmid at altmuehlnet.de
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 2 of the License, or     *
+ *   (at your option) any later version.                                   *
+ *                                                                         *
+ ***************************************************************************/
+
+#include "scconfig.h"
+#include "sclayer.h"
+#include "scribusdoc.h"
+#include "util_layer.h"
+
+#include <QMap>
+
+using namespace std;
+
+void handleOldLayerBehavior(ScribusDoc* doc)
+{
+	if (doc->Layers.count() <= 1)
+		return;
+	if (doc->MasterItems.count() <= 0)
+		return;
+	
+	// Sort layers to be sure the levels are properly set
+	doc->Layers.sort();
+
+	// Create new background layers for master page elements
+	ScLayers newLayers;
+	QMap<int, int> layerMap;
+	int layersCount = doc->Layers.count();
+	// Create layers for std pages elements, keep old layer id
+	for (int i = 0; i < doc->Layers.count(); ++i)
+	{
+		const ScLayer* layer = doc->Layers.layerByLevel(i);
+		if (layer)
+		{
+			// Change level of std elements layer
+			ScLayer stdElemLayer(*layer);
+			stdElemLayer.Level = i + layersCount;
+			newLayers.append(stdElemLayer);
+		}
+	}
+	// Create layers for master pages elements with new layer id
+	for (int i = 0; i < doc->Layers.count(); ++i)
+	{
+		const ScLayer* layer = doc->Layers.layerByLevel(i);
+		if (layer)
+		{
+			// Create new layer for master elements
+			ScLayer masterElemLayer(*layer);
+			int oldId = masterElemLayer.LNr;
+			int newId = newLayers.getMaxNumber() + 1;
+			masterElemLayer.LNr  = newId;
+			masterElemLayer.Name = layer->Name + QObject::tr(" (mp items)");
+			newLayers.append(masterElemLayer);
+			layerMap.insert(oldId, newId);
+		}
+	}
+	newLayers.sort();
+	doc->Layers = newLayers;
+	
+	// Reassign layer of master page elements
+	PageItem* item;
+	QMap<int, int>::iterator idIt;
+	int mpCount = doc->MasterItems.count();
+	for (int i = 0; i < mpCount; ++i)
+	{
+		item = doc->MasterItems.at(i);
+		idIt = layerMap.find(item->LayerNr);
+		if (idIt != layerMap.end())
+			item->LayerNr = idIt.value();
+	}
+}
Index: scribus/CMakeLists.txt
===================================================================
--- scribus/CMakeLists.txt	(revision 13872)
+++ scribus/CMakeLists.txt	(revision 13873)
@@ -755,6 +755,7 @@
   util_formats.cpp
   util_ghostscript.cpp
   util_icon.cpp
+  util_layer.cpp
   util_math.cpp
   util_printer.cpp
   util_text.cpp
Index: win32/vc8/Scribus.vcproj
===================================================================
--- win32/vc8/Scribus.vcproj	(revision 13872)
+++ win32/vc8/Scribus.vcproj	(revision 13873)
@@ -2004,6 +2004,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\util_layer.cpp"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\util_math.cpp"
 				>
 			</File>
@@ -7165,7 +7169,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -7176,7 +7180,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -7187,7 +7191,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -7198,7 +7202,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -8785,7 +8789,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -8796,7 +8800,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -8807,7 +8811,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -8818,7 +8822,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -8881,7 +8885,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -8892,7 +8896,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -8903,7 +8907,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -8914,7 +8918,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -8929,7 +8933,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -8940,7 +8944,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -8951,7 +8955,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -8962,7 +8966,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -8977,7 +8981,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -8988,7 +8992,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -8999,7 +9003,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9010,7 +9014,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9025,7 +9029,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9036,7 +9040,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9047,7 +9051,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9058,7 +9062,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9073,7 +9077,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9084,7 +9088,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9095,7 +9099,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9106,7 +9110,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9121,7 +9125,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9132,7 +9136,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9143,7 +9147,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9154,7 +9158,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9169,7 +9173,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9180,7 +9184,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9191,7 +9195,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9202,7 +9206,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9217,7 +9221,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9228,7 +9232,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9239,7 +9243,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9250,7 +9254,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9265,7 +9269,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9276,7 +9280,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9287,7 +9291,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9298,7 +9302,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9313,7 +9317,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9324,7 +9328,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9335,7 +9339,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9346,7 +9350,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9361,7 +9365,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9372,7 +9376,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9383,7 +9387,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9394,7 +9398,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9409,7 +9413,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9420,7 +9424,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9431,7 +9435,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9442,7 +9446,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9457,7 +9461,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9468,7 +9472,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9479,7 +9483,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9490,7 +9494,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9505,7 +9509,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9516,7 +9520,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9527,7 +9531,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9538,7 +9542,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9553,7 +9557,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9564,7 +9568,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9575,7 +9579,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9586,7 +9590,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9601,7 +9605,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9612,7 +9616,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9623,7 +9627,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9634,7 +9638,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9649,7 +9653,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9660,7 +9664,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9671,7 +9675,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9682,7 +9686,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9697,7 +9701,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9708,7 +9712,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9719,7 +9723,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9730,7 +9734,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9745,7 +9749,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9756,7 +9760,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9767,7 +9771,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9778,7 +9782,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9793,7 +9797,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9804,7 +9808,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9815,7 +9819,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9826,7 +9830,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9841,7 +9845,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9852,7 +9856,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9863,7 +9867,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9874,7 +9878,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9889,7 +9893,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9900,7 +9904,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9911,7 +9915,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9922,7 +9926,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9937,7 +9941,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9948,7 +9952,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9959,7 +9963,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -9970,7 +9974,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Moc&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;"
+						CommandLine="$(QT4_DIR)\bin\moc.exe &quot;$(InputPath)&quot; -o  &quot;$(InputDir)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\moc.exe"
 						Outputs="$(InputDir)\moc_$(InputName).cpp"
 					/>
@@ -14777,6 +14781,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\util_layer.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\util_math.h"
 				>
 			</File>
@@ -17072,7 +17080,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17083,7 +17091,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17094,7 +17102,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17105,7 +17113,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17552,7 +17560,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17563,7 +17571,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17574,7 +17582,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17585,7 +17593,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17600,7 +17608,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17611,7 +17619,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17622,7 +17630,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17633,7 +17641,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17648,7 +17656,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17659,7 +17667,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17670,7 +17678,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17681,7 +17689,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17696,7 +17704,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17707,7 +17715,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17718,7 +17726,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17729,7 +17737,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17744,7 +17752,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17755,7 +17763,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17766,7 +17774,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17777,7 +17785,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17792,7 +17800,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17803,7 +17811,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17814,7 +17822,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17825,7 +17833,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17840,7 +17848,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17851,7 +17859,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17862,7 +17870,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17873,7 +17881,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17888,7 +17896,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17899,7 +17907,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17910,7 +17918,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17921,7 +17929,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17936,7 +17944,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17947,7 +17955,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17958,7 +17966,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17969,7 +17977,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17984,7 +17992,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -17995,7 +18003,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18006,7 +18014,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18017,7 +18025,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18032,7 +18040,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18043,7 +18051,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18054,7 +18062,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18065,7 +18073,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18080,7 +18088,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18091,7 +18099,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18102,7 +18110,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18113,7 +18121,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18128,7 +18136,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18139,7 +18147,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18150,7 +18158,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18161,7 +18169,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18176,7 +18184,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18187,7 +18195,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18198,7 +18206,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18209,7 +18217,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18224,7 +18232,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18235,7 +18243,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18246,7 +18254,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18257,7 +18265,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18272,7 +18280,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18283,7 +18291,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18294,7 +18302,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18305,7 +18313,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18320,7 +18328,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18331,7 +18339,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18342,7 +18350,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18353,7 +18361,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18368,7 +18376,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18379,7 +18387,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18390,7 +18398,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18401,7 +18409,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18416,7 +18424,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18427,7 +18435,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18438,7 +18446,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18449,7 +18457,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18464,7 +18472,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18475,7 +18483,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18486,7 +18494,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18497,7 +18505,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18512,7 +18520,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18523,7 +18531,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18534,7 +18542,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18545,7 +18553,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18560,7 +18568,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18571,7 +18579,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18582,7 +18590,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18593,7 +18601,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18608,7 +18616,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18619,7 +18627,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18630,7 +18638,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18641,7 +18649,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18656,7 +18664,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18667,7 +18675,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18678,7 +18686,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>
@@ -18689,7 +18697,7 @@
 					<Tool
 						Name="VCCustomBuildTool"
 						Description="Uic&apos;ing $(InputFileName)"
-						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;"
+						CommandLine="$(QT4_DIR)\bin\uic.exe &quot;$(InputPath)&quot; -o &quot;$(InputDir)\ui_$(InputName).h&quot;&#x0D;&#x0A;"
 						AdditionalDependencies="$(QT4_DIR)\bin\uic.exe"
 						Outputs="$(InputDir)\ui_$(InputName).h"
 					/>




More information about the scribus-commit mailing list