r17022 by jghali - merge trunk revisions up to r17018

scribus-commit scribus-commit at lists.scribus.net
Thu Nov 24 23:07:37 UTC 2011


Author: jghali
Date: Thu Nov 24 23:07:37 2011
New Revision: 17022

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17022
Log:
merge trunk revisions up to r17018

Modified:
    branches/ScribusOIF/scribus/documentchecker.cpp
    branches/ScribusOIF/scribus/pageitem.cpp
    branches/ScribusOIF/scribus/pageitem_imageframe.cpp
    branches/ScribusOIF/scribus/pageitem_symbol.cpp
    branches/ScribusOIF/scribus/pdflib_core.cpp
    branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
    branches/ScribusOIF/scribus/plugins/import/svg/svgplugin.cpp
    branches/ScribusOIF/scribus/pslib.cpp
    branches/ScribusOIF/scribus/scimage.cpp
    branches/ScribusOIF/scribus/scimage.h
    branches/ScribusOIF/scribus/scribus.cpp
    branches/ScribusOIF/scribus/scribus.h
    branches/ScribusOIF/scribus/scribusdoc.cpp
    branches/ScribusOIF/scribus/ui/about.cpp
    branches/ScribusOIF/scribus/ui/aligndistribute.cpp
    branches/ScribusOIF/scribus/ui/aligndistribute.h
    branches/ScribusOIF/scribus/ui/aligndistribute.ui
    branches/ScribusOIF/scribus/ui/bookmarkpalette.cpp
    branches/ScribusOIF/scribus/ui/bookmarkpalette.h
    branches/ScribusOIF/scribus/ui/checkDocument.cpp
    branches/ScribusOIF/scribus/ui/checkDocument.h
    branches/ScribusOIF/scribus/ui/effectsdialog.cpp
    branches/ScribusOIF/scribus/ui/layers.cpp
    branches/ScribusOIF/scribus/ui/layers.h
    branches/ScribusOIF/scribus/ui/query.cpp
    branches/ScribusOIF/scribus/ui/query.h
    branches/ScribusOIF/scribus/ui/scrapbookpalette.cpp

Modified: branches/ScribusOIF/scribus/documentchecker.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17022&path=/branches/ScribusOIF/scribus/documentchecker.cpp
==============================================================================
--- branches/ScribusOIF/scribus/documentchecker.cpp (original)
+++ branches/ScribusOIF/scribus/documentchecker.cpp Thu Nov 24 23:07:37 2011
@@ -204,6 +204,11 @@
 					itemError.insert(MissingImage, 0);
 				else
 				{
+					if (currItem->PictureIsAvailable)
+					{
+						if (checkerSettings.checkTransparency && currItem->pixm.hasSmoothAlpha())
+							itemError.insert(Transparency, 0);
+					}
 					if  (((qRound(72.0 / currItem->imageXScale()) < checkerSettings.minResolution) || (qRound(72.0 / currItem->imageYScale()) < checkerSettings.minResolution))
 							&& (currItem->isRaster) && (checkerSettings.checkResolution))
 						itemError.insert(ImageDPITooLow, 0);
@@ -329,7 +334,7 @@
 							}
 							chr = chstr[0].unicode();
 							if ((!currItem->itemText.charStyle(e).font().canRender(chr)) && (checkerSettings.checkGlyphs))
-								itemError.insert(MissingGlyph, 0);
+								itemError.insert(MissingGlyph, e);
 						}
 						for (int t1 = 0; t1 < currItem->itemText.defaultStyle().tabValues().count(); t1++)
 						{
@@ -343,7 +348,7 @@
 							}
 							chr = chstr[0].unicode();
 							if ((!currItem->itemText.charStyle(e).font().canRender(chr)) && (checkerSettings.checkGlyphs))
-								itemError.insert(MissingGlyph, 0);
+								itemError.insert(MissingGlyph, e);
 						}
 						continue;
 					}
@@ -352,12 +357,12 @@
 						for (int numco = 0x30; numco < 0x3A; ++numco)
 						{
 							if ((!currItem->itemText.charStyle(e).font().canRender(numco)) && (checkerSettings.checkGlyphs))
-								itemError.insert(MissingGlyph, 0);
+								itemError.insert(MissingGlyph, e);
 						}
 						continue;
 					}
 					if ((!currItem->itemText.charStyle(e).font().canRender(chr)) && (checkerSettings.checkGlyphs))
-						itemError.insert(MissingGlyph, 0);
+						itemError.insert(MissingGlyph, e);
 				}
 	#endif
 			}
@@ -490,6 +495,11 @@
 					itemError.insert(MissingImage, 0);
 				else
 				{
+					if (currItem->PictureIsAvailable)
+					{
+						if (checkerSettings.checkTransparency && currItem->pixm.hasSmoothAlpha())
+							itemError.insert(Transparency, 0);
+					}
 					if  (((qRound(72.0 / currItem->imageXScale()) < checkerSettings.minResolution) || (qRound(72.0 / currItem->imageYScale()) < checkerSettings.minResolution))
 							&& (currItem->isRaster) && (checkerSettings.checkResolution))
 						itemError.insert(ImageDPITooLow, 0);
@@ -615,7 +625,7 @@
 							}
 							chr = chstr[0].unicode();
 							if ((!currItem->itemText.charStyle(e).font().canRender(chr)) && (checkerSettings.checkGlyphs))
-								itemError.insert(MissingGlyph, 0);
+								itemError.insert(MissingGlyph, e);
 						}
 						for (int t1 = 0; t1 < currItem->itemText.defaultStyle().tabValues().count(); t1++)
 						{
@@ -629,7 +639,7 @@
 							}
 							chr = chstr[0].unicode();
 							if ((!currItem->itemText.charStyle(e).font().canRender(chr)) && (checkerSettings.checkGlyphs))
-								itemError.insert(MissingGlyph, 0);
+								itemError.insert(MissingGlyph, e);
 						}
 						continue;
 					}
@@ -638,12 +648,12 @@
 						for (uint numco = 0x30; numco < 0x3A; ++numco)
 						{
 							if ((!currItem->itemText.charStyle(e).font().canRender(numco)) && (checkerSettings.checkGlyphs))
-								itemError.insert(MissingGlyph, 0);
+								itemError.insert(MissingGlyph, e);
 						}
 						continue;
 					}
 					if ((!currItem->itemText.charStyle(e).font().canRender(chr)) && (checkerSettings.checkGlyphs))
-						itemError.insert(MissingGlyph, 0);
+						itemError.insert(MissingGlyph, e);
 				}
 	#endif
 			}

Modified: branches/ScribusOIF/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17022&path=/branches/ScribusOIF/scribus/pageitem.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pageitem.cpp (original)
+++ branches/ScribusOIF/scribus/pageitem.cpp Thu Nov 24 23:07:37 2011
@@ -5927,6 +5927,13 @@
 		FPoint maxAr = getMaxClipF(&arrow);
 		totalRect = totalRect.united(QRectF(QPointF(minAr.x(), minAr.y()), QPointF(maxAr.x(), maxAr.y())));
 	}
+	if (isPathText())
+	{
+		QTransform clipTrans;
+		clipTrans.translate(Xpos, Ypos);
+		clipTrans.rotate(Rot);
+		totalRect = totalRect.united(QRectF(clipTrans.mapRect(Clip.boundingRect())));
+	}
 	totalRect.getCoords(x1, y1, x2, y2);
 }
 
@@ -5958,6 +5965,8 @@
 				extraSpace = sl.Width / 2.0;
 		}
 	}
+	if (isPathText())
+		return qMin(Xpos + QRectF(Clip.boundingRect()).x(), Xpos - extraSpace);
 	return Xpos - extraSpace;
 }
 
@@ -5986,6 +5995,8 @@
 		if ((sl.Color != CommonStrings::None) && (sl.Width != 0))
 			extraSpace = sl.Width / 2.0;
 	}
+	if (isPathText())
+		return qMin(Ypos + QRectF(Clip.boundingRect()).y(), Ypos - extraSpace);
 	return Ypos - extraSpace;
 }
 
@@ -6017,6 +6028,8 @@
 				extraSpace = sl.Width;
 		}
 	}
+	if (isPathText())
+		return qMax(QRectF(Clip.boundingRect()).width(), Width + extraSpace);
 	return Width + extraSpace;
 }
 
@@ -6045,6 +6058,8 @@
 		if ((sl.Color != CommonStrings::None) && (sl.Width != 0))
 			extraSpace = sl.Width;
 	}
+	if (isPathText())
+		return qMax(QRectF(Clip.boundingRect()).height(), Height + extraSpace);
 	return isLine() ? extraSpace : Height + extraSpace;
 }
 

Modified: branches/ScribusOIF/scribus/pageitem_imageframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17022&path=/branches/ScribusOIF/scribus/pageitem_imageframe.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pageitem_imageframe.cpp (original)
+++ branches/ScribusOIF/scribus/pageitem_imageframe.cpp Thu Nov 24 23:07:37 2011
@@ -79,13 +79,6 @@
 				p->fillPath();
 			}
 			p->save();
-			if (imageClip.size() != 0)
-			{
-				p->setupPolygon(&imageClip);
-				p->setClipPath();
-			}
-			p->setupPolygon(&PoLine);
-			p->setClipPath();
 			if (Pfile.isEmpty())
 			{
 				if ((Frame) && (m_Doc->guidesPrefs().framesShown))
@@ -144,6 +137,8 @@
 				}
 				else
 				{
+					p->setupPolygon(&PoLine);
+					p->setClipPath();
 					if (imageFlippedH())
 					{
 						p->translate(Width, 0);
@@ -153,6 +148,11 @@
 					{
 						p->translate(0, Height);
 						p->scale(1, -1);
+					}
+					if (imageClip.size() != 0)
+					{
+						p->setupPolygon(&imageClip);
+						p->setClipPath();
 					}
 					p->translate(LocalX*LocalScX, LocalY*LocalScY);
 					p->rotate(LocalRot);

Modified: branches/ScribusOIF/scribus/pageitem_symbol.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17022&path=/branches/ScribusOIF/scribus/pageitem_symbol.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pageitem_symbol.cpp (original)
+++ branches/ScribusOIF/scribus/pageitem_symbol.cpp Thu Nov 24 23:07:37 2011
@@ -110,7 +110,7 @@
 			p->setMaskMode(0);
 			ScPattern pat = m_Doc->docPatterns[patternVal];
 			p->scale(Width / pat.width, Height / pat.height);
-			p->translate(pat.items.at(0)->gXpos, pat.items.at(0)->gYpos);
+	//		p->translate(pat.items.at(0)->gXpos, pat.items.at(0)->gYpos);
 			for (int em = 0; em < pat.items.count(); ++em)
 			{
 				PageItem* embedded = pat.items.at(em);

Modified: branches/ScribusOIF/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17022&path=/branches/ScribusOIF/scribus/pdflib_core.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pdflib_core.cpp (original)
+++ branches/ScribusOIF/scribus/pdflib_core.cpp Thu Nov 24 23:07:37 2011
@@ -2482,7 +2482,7 @@
 							QTransform trans;
 							trans.scale(ite->width() / pat.width, ite->height() / pat.height);
 							trans.translate(0.0, -ite->height());
-							trans.translate(pat.items.at(0)->gXpos, -pat.items.at(0)->gYpos);
+					//		trans.translate(pat.items.at(0)->gXpos, -pat.items.at(0)->gYpos);
 							PutPage(FToStr(trans.m11())+" "+FToStr(trans.m12())+" "+FToStr(trans.m21())+" "+FToStr(trans.m22())+" "+FToStr(trans.dx())+" "+FToStr(trans.dy())+" cm\n");
 							for (int em = 0; em < pat.items.count(); ++em)
 							{
@@ -4304,7 +4304,7 @@
 				QTransform trans;
 				trans.scale(ite->width() / pat.width, ite->height() / pat.height);
 				trans.translate(0.0, -ite->height());
-			//	trans.translate(pat.items.at(0)->gXpos, -pat.items.at(0)->gYpos);
+	//			trans.translate(pat.items.at(0)->gXpos, -pat.items.at(0)->gYpos);
 				tmp += FToStr(trans.m11())+" "+FToStr(trans.m12())+" "+FToStr(trans.m21())+" "+FToStr(trans.m22())+" "+FToStr(trans.dx())+" "+FToStr(trans.dy())+" cm\n";
 				for (int em = 0; em < pat.items.count(); ++em)
 				{

Modified: branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17022&path=/branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp Thu Nov 24 23:07:37 2011
@@ -48,6 +48,7 @@
 	documentStr.reserve(524288);
 	ScXmlStreamWriter writer(&documentStr);
 	writer.setAutoFormatting(true);
+//	writer.writeStartDocument();
 	writer.writeStartElement("SCRIBUSELEMUTF8");
 	writer.writeAttribute("XP", xp);
 	writer.writeAttribute("YP", yp);
@@ -103,9 +104,9 @@
 	writePatterns(writer, fileDir, true, selection);
 	WriteObjects(m_Doc, writer, fileDir, 0, 0, ItemSelectionElements, &emG);
 	writer.writeEndElement();
-	writer.writeEndDocument();
+//	writer.writeEndDocument();
 	documentStr.squeeze();
-	return documentStr;
+	return documentStr.trimmed();
 }
 
 bool Scribus150Format::savePalette(const QString & fileName)
@@ -2403,7 +2404,7 @@
 		docu.writeAttribute("DASHOFF", item->DashOffset);
 	}
 	if (!(item->isArc() || item->isSpiral() || item->isRegularPolygon()))
-		docu.writeAttribute("path", item->PoLine.svgPath(!item->isPolyLine()));
+		docu.writeAttribute("path", item->PoLine.svgPath(!(item->isPolyLine() || item->isPathText())));
 	QString colp = item->ContourLine.svgPath(true);
 	if (!colp.isEmpty())
 		docu.writeAttribute("copath", colp);

Modified: branches/ScribusOIF/scribus/plugins/import/svg/svgplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17022&path=/branches/ScribusOIF/scribus/plugins/import/svg/svgplugin.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/import/svg/svgplugin.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/import/svg/svgplugin.cpp Thu Nov 24 23:07:37 2011
@@ -1384,7 +1384,7 @@
 		if (!m_unsupportedFeatures.contains(STag))
 		{
 			m_unsupportedFeatures.insert(STag, STag);
-			qDebug() << QString("unsupported SVG feature: %1").arg(STag);
+	//		qDebug() << QString("unsupported SVG feature: %1").arg(STag);
 			unsupported = true;
 		}
 	}

Modified: branches/ScribusOIF/scribus/pslib.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17022&path=/branches/ScribusOIF/scribus/pslib.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pslib.cpp (original)
+++ branches/ScribusOIF/scribus/pslib.cpp Thu Nov 24 23:07:37 2011
@@ -491,6 +491,7 @@
 		QBuffer b(&buf);
 		b.open( QIODevice::WriteOnly );
 		spoolStream.setDevice(&b);
+//		PS_translate(pa.items.at(0)->gXpos, -pa.items.at(0)->gYpos);
 		for (int em = 0; em < pa.items.count(); ++em)
 		{
 			PageItem* item = pa.items.at(em);
@@ -2616,7 +2617,7 @@
 				}
 				PS_scale(c->width() / pat.width, c->height() / pat.height);
 				PS_translate(0, -c->height());
-		//		PS_translate(pat.items.at(0)->gXpos, -pat.items.at(0)->gYpos);
+	//			PS_translate(pat.items.at(0)->gXpos, -pat.items.at(0)->gYpos);
 				for (int em = 0; em < pat.items.count(); ++em)
 				{
 					PageItem* embed = pat.items.at(em);

Modified: branches/ScribusOIF/scribus/scimage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17022&path=/branches/ScribusOIF/scribus/scimage.cpp
==============================================================================
--- branches/ScribusOIF/scribus/scimage.cpp (original)
+++ branches/ScribusOIF/scribus/scimage.cpp Thu Nov 24 23:07:37 2011
@@ -2444,3 +2444,23 @@
 	}
 	return true;
 }
+
+bool ScImage::hasSmoothAlpha()
+{
+	int h = height();
+	int w = width();
+	QSet<int> alpha;
+	QRgb *s, r;
+	for( int yi=0; yi < h; ++yi )
+	{
+		s = (QRgb*)(scanLine( yi ));
+		for( int xi=0; xi < w; ++xi )
+		{
+			r = *s++;
+			alpha.insert(qAlpha(r));
+			if (alpha.count() > 2)
+				return true;
+		}
+	}
+	return (alpha.count() > 2);
+}

Modified: branches/ScribusOIF/scribus/scimage.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17022&path=/branches/ScribusOIF/scribus/scimage.h
==============================================================================
--- branches/ScribusOIF/scribus/scimage.h (original)
+++ branches/ScribusOIF/scribus/scimage.h Thu Nov 24 23:07:37 2011
@@ -76,6 +76,7 @@
 	int height() const { return QImage::height(); }
 	int width() const { return QImage::width(); }
 	bool hasAlpha() const { return QImage::hasAlphaChannel(); }
+	bool hasSmoothAlpha();
 	
 	// Routines for PDF/PS output of images
 	QByteArray ImageToArray();

Modified: branches/ScribusOIF/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17022&path=/branches/ScribusOIF/scribus/scribus.cpp
==============================================================================
--- branches/ScribusOIF/scribus/scribus.cpp (original)
+++ branches/ScribusOIF/scribus/scribus.cpp Thu Nov 24 23:07:37 2011
@@ -302,6 +302,7 @@
 	previewDinUse = false;
 	printDinUse = false;
 	internalCopy = false;
+	internalCopyBuffer = "";
 	m_doc = new ScribusDoc();
 	m_doc->setup(0, 1, 1, 1, 1, "Custom", "Custom");
 	m_doc->setPage(100, 100, 0, 0, 0, 0, 0, 0, false, false);
@@ -595,6 +596,7 @@
 
 //	connect(docCheckerPalette, SIGNAL(selectElement(int, int)), this, SLOT(selectItemsFromOutlines(int, int)));
 	connect(docCheckerPalette, SIGNAL(selectElementByItem(PageItem *, bool)), this, SLOT(selectItemsFromOutlines(PageItem *, bool)));
+	connect(docCheckerPalette, SIGNAL(selectElement(PageItem *, bool, int)), this, SLOT(selectItemFromOutlines(PageItem *, bool, int)));
 	connect(docCheckerPalette, SIGNAL(selectPage(int)), this, SLOT(selectPagesFromOutlines(int)));
 	connect(docCheckerPalette, SIGNAL(selectMasterPage(QString)), this, SLOT(manageMasterPages(QString)));
 //	connect(outlinePalette, SIGNAL(selectElement(int, int, bool)), this, SLOT(selectItemsFromOutlines(int, int, bool)));
@@ -2237,6 +2239,7 @@
 		else
 			HaveNewSel(-1);
 	}
+	docCheckerPalette->setDoc(doc);
 	tocGenerator->setDoc(doc);
 	styleManager->setDoc(doc);
 	symbolPalette->setDoc(doc);
@@ -2580,9 +2583,63 @@
 	if (docSelectionCount == 0)
 		setStatusBarInfoText("");
 	else if (docSelectionCount == 1)
-		setStatusBarInfoText( tr("1 Object selected"));
+	{
+		QString whatSel = tr("Unknown");
+		switch (currItem->itemType())
+		{
+			case 2:
+				whatSel = tr("Image Frame");
+				break;
+			case 4:
+				whatSel = tr("Text Frame");
+				break;
+			case 5:
+				whatSel = tr("Line");
+				break;
+			case 6:
+				whatSel = tr("Polygon");
+				break;
+			case 7:
+				whatSel = tr("Polyline");
+				break;
+			case 8:
+				whatSel = tr("Text on Path");
+				break;
+			case 9:
+				whatSel = tr("Latex Frame");
+				break;
+			case 11:
+				whatSel = tr("Symbol");
+				break;
+			case 12:
+				whatSel = tr("Group");
+				break;
+			case 13:
+				whatSel = tr("RegularPolygon");
+				break;
+			case 14:
+				whatSel = tr("Arc");
+				break;
+			case 15:
+				whatSel = tr("Spiral");
+				break;
+			case 16:
+				whatSel = tr("Table");
+				break;
+			default:
+				whatSel = "Unknown";
+				break;
+		}
+		QString widthTxt = value2String(doc->m_Selection->width(), doc->unitIndex(), true, true);
+		QString heightTxt = value2String(doc->m_Selection->height(), doc->unitIndex(), true, true);
+		setStatusBarInfoText( tr("%1 selected, Size = %2 x %3").arg(whatSel).arg(widthTxt).arg(heightTxt));
+	}
 	else
-		setStatusBarInfoText( tr("%1 Objects selected").arg(docSelectionCount));
+	{
+		QString widthTxt = value2String(doc->m_Selection->width(), doc->unitIndex(), true, true);
+		QString heightTxt = value2String(doc->m_Selection->height(), doc->unitIndex(), true, true);
+		setStatusBarInfoText( tr("%1 Objects selected, Selection Size = %2 x %3").arg(docSelectionCount).arg(widthTxt).arg(heightTxt));
+	}
 	actionManager->disconnectNewSelectionActions();
 	scrActions["editSelectAllOnLayer"]->setEnabled(true);
 	scrActions["editDeselectAll"]->setEnabled(SelectedType != -1);
@@ -4942,18 +4999,26 @@
 				return;
 			ScriXmlDoc ss;
 			QString BufferS = ss.WriteElem(doc, doc->m_Selection);
-			if ((prefsManager->appPrefs.scrapbookPrefs.doCopyToScrapbook) && (!internalCopy))
-			{
-				scrapbookPalette->ObjFromCopyAction(BufferS, currItem->itemName());
-				rebuildRecentPasteMenu();
-			}
-			ScElemMimeData* mimeData = new ScElemMimeData();
-			mimeData->setScribusElem(BufferS);
-			mimeData->setText(BufferS);
-			QApplication::clipboard()->setMimeData(mimeData, QClipboard::Clipboard);
-		}
-		scrActions["editPaste"]->setEnabled(true);
-		scrMenuMgr->setMenuEnabled("EditPasteRecent", scrapbookPalette->tempBView->objectMap.count() != 0);
+			if (!internalCopy)
+			{
+				if ((prefsManager->appPrefs.scrapbookPrefs.doCopyToScrapbook) && (!internalCopy))
+				{
+					scrapbookPalette->ObjFromCopyAction(BufferS, currItem->itemName());
+					rebuildRecentPasteMenu();
+				}
+				ScElemMimeData* mimeData = new ScElemMimeData();
+				mimeData->setScribusElem(BufferS);
+				mimeData->setText(BufferS);
+				QApplication::clipboard()->setMimeData(mimeData, QClipboard::Clipboard);
+			}
+			else
+				internalCopyBuffer = BufferS;
+		}
+		if (!internalCopy)
+		{
+			scrActions["editPaste"]->setEnabled(true);
+			scrMenuMgr->setMenuEnabled("EditPasteRecent", scrapbookPalette->tempBView->objectMap.count() != 0);
+		}
 	}
 }
 
@@ -5082,7 +5147,7 @@
 		}
 		else
 		{
-			if (ScMimeData::clipboardHasScribusElem() || ScMimeData::clipboardHasScribusFragment())
+			if (ScMimeData::clipboardHasScribusElem() || ScMimeData::clipboardHasScribusFragment() || internalCopy)
 			{
 				view->Deselect(true);
 				uint ac = doc->Items->count();
@@ -5090,8 +5155,13 @@
 				bool savedAlignGuides = doc->SnapGuides;
 				doc->useRaster = false;
 				doc->SnapGuides = false;
-				QString buffer  = ScMimeData::clipboardScribusElem();
-				slotElemRead(buffer, doc->currentPage()->xOffset(), doc->currentPage()->yOffset(), false, true, doc, view);
+				if (internalCopy)
+					slotElemRead(internalCopyBuffer, doc->currentPage()->xOffset(), doc->currentPage()->yOffset(), false, true, doc, view);
+				else
+				{
+					QString buffer  = ScMimeData::clipboardScribusElem();
+					slotElemRead(buffer, doc->currentPage()->xOffset(), doc->currentPage()->yOffset(), false, true, doc, view);
+				}
 				// update style lists:
 				styleManager->setDoc(doc);
 				contentPropsPalette->setDoc(doc);
@@ -7345,6 +7415,7 @@
 	doc->useRaster = savedAlignGrid;
 	doc->SnapGuides = savedAlignGuides;
 	internalCopy = false;
+	internalCopyBuffer = "";
 	view->DrawNew();
 }
 
@@ -7470,6 +7541,21 @@
 		else
 		{
 			view->SetCCPo(currItem->xPos() + currItem->width() / 2.0, currItem->yPos() + currItem->height() / 2.0);
+		}
+	}
+}
+
+void ScribusMainWindow::selectItemFromOutlines(PageItem *ite, bool single, int cPos)
+{
+	selectItemsFromOutlines(ite, single);
+	if (doc->m_Selection->count() != 0)
+	{
+		PageItem *currItem = doc->m_Selection->itemAt(0);
+		if (currItem->isTextFrame())
+		{
+			view->requestMode(modeEdit);
+			currItem->itemText.setCursorPosition(cPos);
+			currItem->update();
 		}
 	}
 }
@@ -9720,14 +9806,6 @@
 	uint docSelectionCount = doc->m_Selection->count();
 	QString patternName = "Pattern_"+doc->m_Selection->itemAt(0)->itemName();
 	patternName = patternName.trimmed().simplified().replace(" ", "_");
-	Query dia(this, "tt", 1, 0, tr("&Name:"), tr("New Entry"));
-	dia.setEditText(patternName, true);
-	dia.setTestList(doc->docPatterns.keys());
-	dia.setCheckMode(true);
-	if (dia.exec())
-		patternName = dia.getEditText();
-	else
-		return;
 	bool wasUndo = undoManager->undoEnabled();
 	undoManager->setUndoEnabled(false);
 	PageItem* currItem;
@@ -9738,6 +9816,55 @@
 		currItem = doc->groupObjectsSelection(&itemSelection);
 	else
 		currItem = itemSelection.itemAt(0);
+	QList<PageItem*> allItems;
+	if (currItem->isGroup())
+		allItems = currItem->asGroupFrame()->getItemList();
+	else
+		allItems.append(currItem);
+	QStringList results;
+	for (int ii = 0; ii < allItems.count(); ii++)
+	{
+		PageItem *item = allItems.at(ii);
+		if ((!results.contains(item->pattern())) && ((item->GrType == 8) || (item->itemType() == PageItem::Symbol)))
+			results.append(item->pattern());
+		if (!item->strokePattern().isEmpty())
+		{
+			if (!results.contains(item->strokePattern()))
+				results.append(item->strokePattern());
+		}
+		if (!item->patternMask().isEmpty())
+		{
+			if (!results.contains(item->patternMask()))
+				results.append(item->patternMask());
+		}
+	}
+	patternsDependingOnThis.clear();
+	QStringList mainPatterns = doc->docPatterns.keys();
+	for (int b = 0; b < results.count(); b++)
+	{
+		QString temp = results[b];
+		for (int a = 0; a < mainPatterns.count(); a++)
+		{
+			if (mainPatterns[a] != temp)
+			{
+				QStringList subPatterns;
+				subPatterns = doc->getUsedPatternsHelper(mainPatterns[a], subPatterns);
+				if (subPatterns.contains(temp))
+					patternsDependingOnThis.prepend(mainPatterns[a]);
+			}
+		}
+		patternsDependingOnThis.prepend(temp);
+	}
+	allItems.clear();
+	Query dia(this, "tt", 1, 0, tr("&Name:"), tr("New Entry"));
+	dia.setEditText(patternName, true);
+	dia.setForbiddenList(patternsDependingOnThis);
+	dia.setTestList(doc->docPatterns.keys());
+	dia.setCheckMode(true);
+	if (dia.exec())
+		patternName = dia.getEditText();
+	else
+		return;
 	ScPattern pat = ScPattern();
 	pat.setDoc(doc);
 	double minx =  std::numeric_limits<double>::max();
@@ -9757,24 +9884,24 @@
 	if (doc->docPatterns.contains(patternName))
 		doc->docPatterns.remove(patternName);
 	doc->addPattern(patternName, pat);
-	double x = currItem->xPos();
-	double y = currItem->yPos();
-	double w = currItem->width();
-	double h = currItem->height();
-	currItem->setXYPos(0, 0, true);
-	currItem->gXpos = currItem->xPos();
-	currItem->gYpos = currItem->yPos();
+	double x = currItem->visualXPos();
+	double y = currItem->visualYPos();
+	double w = currItem->visualWidth();
+	double h = currItem->visualHeight();
+	currItem->gXpos = currItem->xPos() - x;
+	currItem->gYpos = currItem->yPos() - y;
+	currItem->setXYPos(currItem->gXpos, currItem->gYpos, true);
 	int d = doc->Items->indexOf(currItem);
 	z = doc->itemAdd(PageItem::Symbol, PageItem::Rectangle, x, y, w, h, 0, CommonStrings::None, CommonStrings::None, true);
 	PageItem* groupItem = doc->Items->takeAt(z);
 	groupItem->setPattern(patternName);
 	doc->Items->replace(d, groupItem);
+	doc->m_Selection->delaySignalsOff();
 	propertiesPalette->updateColorList();
 	symbolPalette->updateSymbolList();
 	emit UpdateRequest(reqColorsUpdate);
 	if (outlinePalette->isVisible())
 		outlinePalette->BuildTree();
-	doc->m_Selection->delaySignalsOff();
 	view->DrawNew();
 	undoManager->setUndoEnabled(wasUndo);
 }

Modified: branches/ScribusOIF/scribus/scribus.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17022&path=/branches/ScribusOIF/scribus/scribus.h
==============================================================================
--- branches/ScribusOIF/scribus/scribus.h (original)
+++ branches/ScribusOIF/scribus/scribus.h Thu Nov 24 23:07:37 2011
@@ -186,6 +186,7 @@
 	void restoreDeletePage(SimpleState *state, bool isUndo);
 	struct CopyContentsBuffer contentsBuffer;
 	bool internalCopy;
+	QString internalCopyBuffer;
 	int  HaveDoc;
 	PrefsContext* dirs;
 	/** \brief view is the main widget which represents your working area. The View
@@ -456,6 +457,7 @@
 	void setAlignmentValue(int a);
 	void editItemsFromOutlines(PageItem *ite);
 	void selectItemsFromOutlines(PageItem *ite, bool single = false);
+	void selectItemFromOutlines(PageItem *ite, bool single, int cPos);
 	void selectPagesFromOutlines(int ScPage);
 	void doPrintPreview();
 	void printPreview();

Modified: branches/ScribusOIF/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17022&path=/branches/ScribusOIF/scribus/scribusdoc.cpp
==============================================================================
--- branches/ScribusOIF/scribus/scribusdoc.cpp (original)
+++ branches/ScribusOIF/scribus/scribusdoc.cpp Thu Nov 24 23:07:37 2011
@@ -5601,8 +5601,7 @@
 		{
 			m_Selection->addItem(Items->at(as));
 		}
-		QRectF sR = m_Selection->getGroupRect();
-		moveGroup(-sR.x() + addedPage->xOffset(), -sR.y() + addedPage->yOffset());
+		moveGroup(addedPage->xOffset(), addedPage->yOffset());
 		if (Items->at(0)->isGroup())
 			Items->at(0)->asGroupFrame()->adjustXYPosition();
 		m_Selection->clear();
@@ -5675,9 +5674,9 @@
 		miny = qMin(miny, y1);
 		maxx = qMax(maxx, x2);
 		maxy = qMax(maxy, y2);
-		currItem->setXYPos(0, 0, true);
-		currItem->gXpos = currItem->xPos();
-		currItem->gYpos = currItem->yPos();
+		currItem->gXpos = currItem->xPos() - currItem->visualXPos();
+		currItem->gYpos = currItem->yPos() - currItem->visualYPos();
+		currItem->setXYPos(currItem->gXpos, currItem->gYpos, true);
 		docPatterns[currentEditedSymbol].pattern = currItem->DrawObj_toImage(qMax(maxx - minx, maxy - miny));
 		docPatterns[currentEditedSymbol].width = maxx - minx;
 		docPatterns[currentEditedSymbol].height = maxy - miny;

Modified: branches/ScribusOIF/scribus/ui/about.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17022&path=/branches/ScribusOIF/scribus/ui/about.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/about.cpp (original)
+++ branches/ScribusOIF/scribus/ui/about.cpp Thu Nov 24 23:07:37 2011
@@ -112,7 +112,7 @@
 	buildID = new QLabel( tab );
 	buildID->setAlignment(Qt::AlignCenter);
 	buildID->setTextInteractionFlags(Qt::TextSelectableByMouse);
-	QString BUILD_DAY = "3";
+	QString BUILD_DAY = "21";
 	QString BUILD_MONTH = CommonStrings::november;
 	QString BUILD_YEAR = "2011";
 	QString BUILD_TIME = "";

Modified: branches/ScribusOIF/scribus/ui/aligndistribute.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17022&path=/branches/ScribusOIF/scribus/ui/aligndistribute.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/aligndistribute.cpp (original)
+++ branches/ScribusOIF/scribus/ui/aligndistribute.cpp Thu Nov 24 23:07:37 2011
@@ -50,10 +50,12 @@
 //TODO Distribute with 
 
 AlignDistributePalette::AlignDistributePalette( QWidget* parent, const char* name, bool /*modal*/, Qt::WFlags /*fl*/ )
-	: ScrPaletteBase( parent, name )
+	: ScDockPalette( parent, name, 0 )
 {
 	setupUi(this);
+	setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
 	currDoc=NULL;
+	setObjectName(name);
 	
 	//hide spare controls 
 	toolButtonDummy1->hide();
@@ -84,7 +86,7 @@
 		languageChange();
 	}
 	else
-		QWidget::changeEvent(e);
+		ScDockPalette::changeEvent(e);
 }
 
 void AlignDistributePalette::languageChange()

Modified: branches/ScribusOIF/scribus/ui/aligndistribute.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17022&path=/branches/ScribusOIF/scribus/ui/aligndistribute.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/aligndistribute.h (original)
+++ branches/ScribusOIF/scribus/ui/aligndistribute.h Thu Nov 24 23:07:37 2011
@@ -34,7 +34,7 @@
 
 #include "scribusapi.h"
 #include "scribusview.h"
-#include "ui/scrpalettebase.h"
+#include "ui/scdockpalette.h"
 
 class QSpacerItem;
 class QLabel;
@@ -51,7 +51,7 @@
 
 /*! \brief Align/Distribute palette.
 */
-class SCRIBUS_API AlignDistributePalette : public ScrPaletteBase, Ui::AlignDistribute
+class SCRIBUS_API AlignDistributePalette : public ScDockPalette, Ui::AlignDistribute
 {
 	Q_OBJECT
 

Modified: branches/ScribusOIF/scribus/ui/aligndistribute.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17022&path=/branches/ScribusOIF/scribus/ui/aligndistribute.ui
==============================================================================
--- branches/ScribusOIF/scribus/ui/aligndistribute.ui (original)
+++ branches/ScribusOIF/scribus/ui/aligndistribute.ui Thu Nov 24 23:07:37 2011
@@ -1,625 +1,614 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <ui version="4.0">
  <class>AlignDistribute</class>
- <widget class="ScrPaletteBase" name="AlignDistribute">
-  <property name="enabled">
-   <bool>true</bool>
-  </property>
+ <widget class="ScDockPalette" name="AlignDistribute">
   <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
     <width>253</width>
-    <height>272</height>
+    <height>281</height>
    </rect>
   </property>
-  <property name="minimumSize">
-   <size>
-    <width>0</width>
-    <height>0</height>
-   </size>
+  <property name="windowTitle">
+   <string>DockWidget</string>
   </property>
-  <layout class="QVBoxLayout">
-   <property name="spacing">
-    <number>5</number>
-   </property>
-   <property name="margin">
-    <number>6</number>
-   </property>
-   <item>
-    <widget class="QTabWidget" name="tabWidget">
-     <property name="currentIndex">
-      <number>0</number>
-     </property>
-     <widget class="QWidget" name="tabAlign">
-      <attribute name="title">
-       <string>Align</string>
-      </attribute>
-      <layout class="QVBoxLayout">
-       <property name="margin">
-        <number>0</number>
-       </property>
-       <item>
-        <layout class="QHBoxLayout">
-         <item>
-          <spacer>
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Expanding</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item>
-          <layout class="QGridLayout">
-           <item row="1" column="0">
-            <widget class="QLabel" name="alignGuideLabel">
-             <property name="text">
-              <string>&Selected Guide:</string>
-             </property>
-             <property name="wordWrap">
-              <bool>false</bool>
-             </property>
-             <property name="buddy">
-              <cstring>alignGuideLineEdit</cstring>
-             </property>
-            </widget>
-           </item>
-           <item row="0" column="0">
-            <widget class="QLabel" name="alignRelativeToLabel">
-             <property name="text">
-              <string>&Relative To:</string>
-             </property>
-             <property name="wordWrap">
-              <bool>false</bool>
-             </property>
-             <property name="buddy">
-              <cstring>alignRelativeToCombo</cstring>
-             </property>
-            </widget>
-           </item>
-           <item row="1" column="1">
-            <widget class="QLineEdit" name="alignGuideLineEdit"/>
-           </item>
-           <item row="0" column="1">
-            <widget class="QComboBox" name="alignRelativeToCombo"/>
-           </item>
-           <item row="2" column="0">
-            <widget class="QLabel" name="alignMoveOrResizeLabel">
-             <property name="text">
-              <string>&Align Sides By:</string>
-             </property>
-             <property name="wordWrap">
-              <bool>false</bool>
-             </property>
-             <property name="buddy">
-              <cstring>alignMoveOrResizeCombo</cstring>
-             </property>
-            </widget>
-           </item>
-           <item row="2" column="1">
-            <widget class="QComboBox" name="alignMoveOrResizeCombo"/>
-           </item>
-          </layout>
-         </item>
-         <item>
-          <spacer>
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Expanding</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-        </layout>
-       </item>
-       <item>
-        <layout class="QHBoxLayout">
-         <item>
-          <spacer>
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Expanding</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item>
-          <layout class="QGridLayout">
-           <item row="1" column="3">
-            <widget class="QToolButton" name="alignBottomInToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="1" column="1">
-            <widget class="QToolButton" name="alignTopInToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="0" column="1">
-            <widget class="QToolButton" name="alignLeftInToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="0" column="3">
-            <widget class="QToolButton" name="alignRightInToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="1" column="4">
-            <widget class="QToolButton" name="alignBottomOutToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="1" column="0">
-            <widget class="QToolButton" name="alignTopOutToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="1" column="2">
-            <widget class="QToolButton" name="alignCenterVerToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="0" column="0">
-            <widget class="QToolButton" name="alignLeftOutToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="0" column="4">
-            <widget class="QToolButton" name="alignRightOutToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="0" column="2">
-            <widget class="QToolButton" name="alignCenterHorToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-          </layout>
-         </item>
-         <item>
-          <spacer>
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Expanding</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-        </layout>
-       </item>
-       <item>
-        <spacer>
-         <property name="orientation">
-          <enum>Qt::Vertical</enum>
-         </property>
-         <property name="sizeType">
-          <enum>QSizePolicy::Expanding</enum>
-         </property>
-         <property name="sizeHint" stdset="0">
-          <size>
-           <width>20</width>
-           <height>0</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
-      </layout>
+  <widget class="QWidget" name="dockWidgetContents">
+   <layout class="QVBoxLayout" name="verticalLayout_3">
+    <item>
+     <widget class="QTabWidget" name="tabWidget">
+      <property name="currentIndex">
+       <number>0</number>
+      </property>
+      <widget class="QWidget" name="tabAlign">
+       <attribute name="title">
+        <string>Align</string>
+       </attribute>
+       <layout class="QVBoxLayout">
+        <property name="margin">
+         <number>0</number>
+        </property>
+        <item>
+         <layout class="QHBoxLayout" name="_2">
+          <item>
+           <spacer>
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Expanding</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item>
+           <layout class="QGridLayout" name="_3">
+            <item row="1" column="0">
+             <widget class="QLabel" name="alignGuideLabel">
+              <property name="text">
+               <string>&Selected Guide:</string>
+              </property>
+              <property name="wordWrap">
+               <bool>false</bool>
+              </property>
+              <property name="buddy">
+               <cstring>alignGuideLineEdit</cstring>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="0">
+             <widget class="QLabel" name="alignRelativeToLabel">
+              <property name="text">
+               <string>&Relative To:</string>
+              </property>
+              <property name="wordWrap">
+               <bool>false</bool>
+              </property>
+              <property name="buddy">
+               <cstring>alignRelativeToCombo</cstring>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="1">
+             <widget class="QLineEdit" name="alignGuideLineEdit"/>
+            </item>
+            <item row="0" column="1">
+             <widget class="QComboBox" name="alignRelativeToCombo"/>
+            </item>
+            <item row="2" column="0">
+             <widget class="QLabel" name="alignMoveOrResizeLabel">
+              <property name="text">
+               <string>&Align Sides By:</string>
+              </property>
+              <property name="wordWrap">
+               <bool>false</bool>
+              </property>
+              <property name="buddy">
+               <cstring>alignMoveOrResizeCombo</cstring>
+              </property>
+             </widget>
+            </item>
+            <item row="2" column="1">
+             <widget class="QComboBox" name="alignMoveOrResizeCombo"/>
+            </item>
+           </layout>
+          </item>
+          <item>
+           <spacer>
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Expanding</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+         </layout>
+        </item>
+        <item>
+         <layout class="QHBoxLayout" name="_4">
+          <item>
+           <spacer>
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Expanding</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item>
+           <layout class="QGridLayout" name="_5">
+            <item row="1" column="3">
+             <widget class="QToolButton" name="alignBottomInToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="1">
+             <widget class="QToolButton" name="alignTopInToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="1">
+             <widget class="QToolButton" name="alignLeftInToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="3">
+             <widget class="QToolButton" name="alignRightInToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="4">
+             <widget class="QToolButton" name="alignBottomOutToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="0">
+             <widget class="QToolButton" name="alignTopOutToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="2">
+             <widget class="QToolButton" name="alignCenterVerToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="0">
+             <widget class="QToolButton" name="alignLeftOutToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="4">
+             <widget class="QToolButton" name="alignRightOutToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="2">
+             <widget class="QToolButton" name="alignCenterHorToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+          <item>
+           <spacer>
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Expanding</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+         </layout>
+        </item>
+        <item>
+         <spacer>
+          <property name="orientation">
+           <enum>Qt::Vertical</enum>
+          </property>
+          <property name="sizeType">
+           <enum>QSizePolicy::Expanding</enum>
+          </property>
+          <property name="sizeHint" stdset="0">
+           <size>
+            <width>20</width>
+            <height>0</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+       </layout>
+      </widget>
+      <widget class="QWidget" name="tabDistribute">
+       <attribute name="title">
+        <string>Distribute</string>
+       </attribute>
+       <layout class="QVBoxLayout" name="verticalLayout_2">
+        <item>
+         <layout class="QHBoxLayout" name="_6">
+          <item>
+           <spacer>
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Expanding</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>63</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item>
+           <layout class="QGridLayout" name="_7">
+            <item row="0" column="3">
+             <widget class="QToolButton" name="distributeDistHToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="2">
+             <widget class="QToolButton" name="distributeTopToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="1">
+             <widget class="QToolButton" name="distributeCenterVToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="2">
+             <widget class="QToolButton" name="distributeRightToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="3" column="0">
+             <widget class="QToolButton" name="toolButtonDummy1">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="2" column="2">
+             <widget class="QToolButton" name="distributeAcrossMarginsToolButton">
+              <property name="enabled">
+               <bool>true</bool>
+              </property>
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="0">
+             <widget class="QToolButton" name="distributeLeftToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="2" column="0">
+             <widget class="QToolButton" name="distributeAcrossPageToolButton">
+              <property name="enabled">
+               <bool>true</bool>
+              </property>
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="3" column="1">
+             <widget class="QToolButton" name="distributeDistValueHToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="2" column="3">
+             <widget class="QToolButton" name="distributeDownMarginsToolButton">
+              <property name="enabled">
+               <bool>true</bool>
+              </property>
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="1">
+             <widget class="QToolButton" name="distributeCenterHToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="3" column="3">
+             <widget class="QToolButton" name="toolButtonDummy2">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="2" column="1">
+             <widget class="QToolButton" name="distributeDownPageToolButton">
+              <property name="enabled">
+               <bool>true</bool>
+              </property>
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="3" column="2">
+             <widget class="QToolButton" name="distributeDistValueVToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="3">
+             <widget class="QToolButton" name="distributeDistVToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="0">
+             <widget class="QToolButton" name="distributeBottomToolButton">
+              <property name="text">
+               <string>...</string>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+          <item>
+           <spacer>
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Expanding</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>62</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+         </layout>
+        </item>
+        <item>
+         <layout class="QHBoxLayout" name="_8">
+          <item>
+           <spacer>
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Expanding</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item>
+           <layout class="QHBoxLayout" name="_9">
+            <item>
+             <widget class="QLabel" name="distributeDistLabel">
+              <property name="text">
+               <string>&Distance:</string>
+              </property>
+              <property name="wordWrap">
+               <bool>false</bool>
+              </property>
+              <property name="indent">
+               <number>-1</number>
+              </property>
+              <property name="buddy">
+               <cstring>distributeDistSpinBox</cstring>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="ScrSpinBox" name="distributeDistSpinBox">
+              <property name="minimumSize">
+               <size>
+                <width>50</width>
+                <height>24</height>
+               </size>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+          <item>
+           <spacer>
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Expanding</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+         </layout>
+        </item>
+        <item>
+         <layout class="QHBoxLayout" name="horizontalLayout_2">
+          <item>
+           <spacer name="spacer">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Expanding</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item>
+           <widget class="QCheckBox" name="reverseDistributionCheckBox">
+            <property name="text">
+             <string>Reverse Distribution</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <spacer name="spacer_2">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeType">
+             <enum>QSizePolicy::Expanding</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+         </layout>
+        </item>
+        <item>
+         <spacer>
+          <property name="orientation">
+           <enum>Qt::Vertical</enum>
+          </property>
+          <property name="sizeType">
+           <enum>QSizePolicy::Expanding</enum>
+          </property>
+          <property name="sizeHint" stdset="0">
+           <size>
+            <width>20</width>
+            <height>0</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+       </layout>
+      </widget>
+      <widget class="QWidget" name="tabSwap">
+       <attribute name="title">
+        <string>Swap</string>
+       </attribute>
+       <layout class="QVBoxLayout" name="verticalLayout">
+        <item>
+         <layout class="QHBoxLayout" name="horizontalLayout">
+          <item>
+           <spacer name="horizontalSpacer">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item>
+           <widget class="QToolButton" name="swapLeftToolButton">
+            <property name="text">
+             <string>...</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QToolButton" name="swapRightToolButton">
+            <property name="text">
+             <string>...</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <spacer name="horizontalSpacer_2">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+         </layout>
+        </item>
+        <item>
+         <spacer name="verticalSpacer">
+          <property name="orientation">
+           <enum>Qt::Vertical</enum>
+          </property>
+          <property name="sizeHint" stdset="0">
+           <size>
+            <width>20</width>
+            <height>0</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+       </layout>
+      </widget>
      </widget>
-     <widget class="QWidget" name="tabDistribute">
-      <attribute name="title">
-       <string>Distribute</string>
-      </attribute>
-      <layout class="QVBoxLayout" name="verticalLayout_2">
-       <item>
-        <layout class="QHBoxLayout">
-         <item>
-          <spacer>
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Expanding</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>63</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item>
-          <layout class="QGridLayout">
-           <item row="0" column="3">
-            <widget class="QToolButton" name="distributeDistHToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="1" column="2">
-            <widget class="QToolButton" name="distributeTopToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="1" column="1">
-            <widget class="QToolButton" name="distributeCenterVToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="0" column="2">
-            <widget class="QToolButton" name="distributeRightToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="3" column="0">
-            <widget class="QToolButton" name="toolButtonDummy1">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="2" column="2">
-            <widget class="QToolButton" name="distributeAcrossMarginsToolButton">
-             <property name="enabled">
-              <bool>true</bool>
-             </property>
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="0" column="0">
-            <widget class="QToolButton" name="distributeLeftToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="2" column="0">
-            <widget class="QToolButton" name="distributeAcrossPageToolButton">
-             <property name="enabled">
-              <bool>true</bool>
-             </property>
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="3" column="1">
-            <widget class="QToolButton" name="distributeDistValueHToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="2" column="3">
-            <widget class="QToolButton" name="distributeDownMarginsToolButton">
-             <property name="enabled">
-              <bool>true</bool>
-             </property>
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="0" column="1">
-            <widget class="QToolButton" name="distributeCenterHToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="3" column="3">
-            <widget class="QToolButton" name="toolButtonDummy2">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="2" column="1">
-            <widget class="QToolButton" name="distributeDownPageToolButton">
-             <property name="enabled">
-              <bool>true</bool>
-             </property>
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="3" column="2">
-            <widget class="QToolButton" name="distributeDistValueVToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="1" column="3">
-            <widget class="QToolButton" name="distributeDistVToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-           <item row="1" column="0">
-            <widget class="QToolButton" name="distributeBottomToolButton">
-             <property name="text">
-              <string>...</string>
-             </property>
-            </widget>
-           </item>
-          </layout>
-         </item>
-         <item>
-          <spacer>
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Expanding</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>62</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-        </layout>
-       </item>
-       <item>
-        <layout class="QHBoxLayout">
-         <item>
-          <spacer>
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Expanding</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item>
-          <layout class="QHBoxLayout">
-           <item>
-            <widget class="QLabel" name="distributeDistLabel">
-             <property name="text">
-              <string>&Distance:</string>
-             </property>
-             <property name="wordWrap">
-              <bool>false</bool>
-             </property>
-             <property name="indent">
-              <number>-1</number>
-             </property>
-             <property name="buddy">
-              <cstring>distributeDistSpinBox</cstring>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="ScrSpinBox" name="distributeDistSpinBox">
-             <property name="minimumSize">
-              <size>
-               <width>50</width>
-               <height>24</height>
-              </size>
-             </property>
-            </widget>
-           </item>
-          </layout>
-         </item>
-         <item>
-          <spacer>
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Expanding</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-        </layout>
-       </item>
-       <item>
-        <layout class="QHBoxLayout" name="horizontalLayout_2">
-         <item>
-          <spacer name="spacer">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Expanding</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item>
-          <widget class="QCheckBox" name="reverseDistributionCheckBox">
-           <property name="text">
-            <string>Reverse Distribution</string>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <spacer name="spacer_2">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Expanding</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-        </layout>
-       </item>
-       <item>
-        <spacer>
-         <property name="orientation">
-          <enum>Qt::Vertical</enum>
-         </property>
-         <property name="sizeType">
-          <enum>QSizePolicy::Expanding</enum>
-         </property>
-         <property name="sizeHint" stdset="0">
-          <size>
-           <width>20</width>
-           <height>0</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
-      </layout>
-     </widget>
-     <widget class="QWidget" name="tabSwap">
-      <attribute name="title">
-       <string>Swap</string>
-      </attribute>
-      <layout class="QVBoxLayout" name="verticalLayout">
-       <item>
-        <layout class="QHBoxLayout" name="horizontalLayout">
-         <item>
-          <spacer name="horizontalSpacer">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item>
-          <widget class="QToolButton" name="swapLeftToolButton">
-           <property name="text">
-            <string>...</string>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="QToolButton" name="swapRightToolButton">
-           <property name="text">
-            <string>...</string>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <spacer name="horizontalSpacer_2">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-        </layout>
-       </item>
-       <item>
-        <spacer name="verticalSpacer">
-         <property name="orientation">
-          <enum>Qt::Vertical</enum>
-         </property>
-         <property name="sizeHint" stdset="0">
-          <size>
-           <width>20</width>
-           <height>0</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
-      </layout>
-     </widget>
-    </widget>
-   </item>
-  </layout>
+    </item>
+   </layout>
+  </widget>
  </widget>
- <layoutdefault spacing="6" margin="11"/>
  <customwidgets>
   <customwidget>
    <class>ScrSpinBox</class>
@@ -627,16 +616,15 @@
    <header>ui/scrspinbox.h</header>
   </customwidget>
   <customwidget>
-   <class>ScrPaletteBase</class>
-   <extends>QWidget</extends>
-   <header>ui/scrpalettebase.h</header>
+   <class>ScDockPalette</class>
+   <extends>QDockWidget</extends>
+   <header>ui/scdockpalette.h</header>
    <container>1</container>
   </customwidget>
  </customwidgets>
  <includes>
-  <include location="local">ui/scrpalettebase.h</include>
-  <include location="local">ui/scrpalettebase.h</include>
   <include location="local">ui/scrspinbox.h</include>
+  <include location="local">ui/scdockpalette.h</include>
  </includes>
  <resources/>
  <connections/>

Modified: branches/ScribusOIF/scribus/ui/bookmarkpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17022&path=/branches/ScribusOIF/scribus/ui/bookmarkpalette.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/bookmarkpalette.cpp (original)
+++ branches/ScribusOIF/scribus/ui/bookmarkpalette.cpp Thu Nov 24 23:07:37 2011
@@ -25,25 +25,22 @@
 
 #include "bookmarkpalette.h"
 
-BookPalette::BookPalette(QWidget* parent) : ScrPaletteBase( parent, "Books", false, 0 )
+BookPalette::BookPalette(QWidget* parent) : ScDockPalette( parent, "Books", 0 )
 {
-	PaletteLayout = new QVBoxLayout( this );
-	PaletteLayout->setMargin(0);
-	PaletteLayout->setSpacing(0);
+	setObjectName(QString::fromLocal8Bit("Books"));
+	setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
 	BView = new BookMView(this);
 	BView->setMinimumSize(QSize(100,150));
-	PaletteLayout->addWidget( BView );
+	setWidget( BView );
 	languageChange();
 }
 
 void BookPalette::changeEvent(QEvent *e)
 {
 	if (e->type() == QEvent::LanguageChange)
-	{
 		languageChange();
-	}
 	else
-		QWidget::changeEvent(e);
+		ScDockPalette::changeEvent(e);
 }
 
 void BookPalette::languageChange()

Modified: branches/ScribusOIF/scribus/ui/bookmarkpalette.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17022&path=/branches/ScribusOIF/scribus/ui/bookmarkpalette.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/bookmarkpalette.h (original)
+++ branches/ScribusOIF/scribus/ui/bookmarkpalette.h Thu Nov 24 23:07:37 2011
@@ -29,14 +29,14 @@
 class QEvent;
 
 #include "scribusapi.h"
-#include "scrpalettebase.h"
+#include "scdockpalette.h"
 #include "bookmwin.h"
 /**
   *@author Franz Schmid
   */
 
 /*! \brief A Bookmark Palette */
-class SCRIBUS_API BookPalette : public ScrPaletteBase
+class SCRIBUS_API BookPalette : public ScDockPalette
 {
 	Q_OBJECT
 
@@ -58,9 +58,6 @@
 	
 public slots:
 	void languageChange();
-
-protected:
-	QVBoxLayout* PaletteLayout;
 };
 
 #endif

Modified: branches/ScribusOIF/scribus/ui/checkDocument.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17022&path=/branches/ScribusOIF/scribus/ui/checkDocument.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/checkDocument.cpp (original)
+++ branches/ScribusOIF/scribus/ui/checkDocument.cpp Thu Nov 24 23:07:37 2011
@@ -83,6 +83,7 @@
 	checkMode = checkNULL;
 	languageChange();
 	itemMap.clear();
+	posMap.clear();
 	pageMap.clear();
 	masterPageMap.clear();
 	masterPageItemMap.clear();
@@ -93,12 +94,26 @@
 	connect(reScan, SIGNAL(clicked()), this, SLOT(doReScan()));
 }
 
+void CheckDocument::setDoc(ScribusDoc *doc)
+{
+	m_Doc = doc;
+	clearErrorList();
+	CheckerPrefsList::Iterator it;
+	CheckerPrefsList::Iterator itend=doc->checkerProfiles().end();
+	for (it = doc->checkerProfiles().begin(); it != itend ; ++it)
+		curCheckProfile->addItem(it.key());
+	setCurrentComboItem(curCheckProfile, doc->curCheckProfile());
+}
+
 void CheckDocument::slotSelect(QTreeWidgetItem* ite)
 {
 	if (itemMap.contains(ite))
 	{
 		ScCore->primaryMainWindow()->closeActiveWindowMasterPageEditor();
-		emit selectElementByItem(itemMap[ite], true);
+		if (itemMap[ite]->isTextFrame())
+			emit selectElement(itemMap[ite], true, posMap[ite]);
+		else
+			emit selectElementByItem(itemMap[ite], true);
 		return;
 	}
 	if (pageMap.contains(ite))
@@ -116,7 +131,10 @@
 	{
 		if (!m_Doc->masterPageMode())
 			emit selectMasterPage(masterPageItemMap[ite]->OnMasterPage);
-		emit selectElementByItem(masterPageItemMap[ite], true);
+		if (itemMap[ite]->isTextFrame())
+			emit selectElement(masterPageItemMap[ite], true, posMap[ite]);
+		else
+			emit selectElementByItem(masterPageItemMap[ite], true);
 		return;
 	}
 }
@@ -144,6 +162,7 @@
 	reportDisplay->clear();
 	reportDisplay->setSortingEnabled(false);
 	itemMap.clear();
+	posMap.clear();
 	pageMap.clear();
 	masterPageMap.clear();
 	masterPageItemMap.clear();
@@ -390,6 +409,7 @@
 					{
 						it3 = masterItemErrorsIt.value().begin();
 						buildItem(object, it3.key(), masterItemErrorsIt.key());
+						posMap.insert(object, it3.value());
 					}
 					else
 					{
@@ -397,6 +417,7 @@
 						{
 							QTreeWidgetItem * errorText = new QTreeWidgetItem( object, 0 );
 							buildItem(errorText, it3.key(), masterItemErrorsIt.key());
+							posMap.insert(object, it3.value());
 						}
 						object->setExpanded( true );
 					}
@@ -465,6 +486,7 @@
 					{
 						it3 = docItemErrorsIt.value().begin();
 						buildItem(object, it3.key(), docItemErrorsIt.key());
+						posMap.insert(object, it3.value());
 					}
 					else
 					{
@@ -472,6 +494,7 @@
 						{
 							QTreeWidgetItem * errorText = new QTreeWidgetItem( object);
 							buildItem(errorText, it3.key(), docItemErrorsIt.key());
+							posMap.insert(object, it3.value());
 						}
 						object->setExpanded( true );
 					}
@@ -531,6 +554,7 @@
 					{
 						it3 = freeItemsErrorsIt.value().begin();
 						buildItem(object, it3.key(), freeItemsErrorsIt.key());
+						posMap.insert(object, it3.value());
 					}
 					else
 					{
@@ -538,6 +562,7 @@
 						{
 							QTreeWidgetItem * errorText = new QTreeWidgetItem( object);
 							buildItem(errorText, it3.key(), freeItemsErrorsIt.key());
+							posMap.insert(object, it3.value());
 						}
 						object->setExpanded( true );
 					}

Modified: branches/ScribusOIF/scribus/ui/checkDocument.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17022&path=/branches/ScribusOIF/scribus/ui/checkDocument.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/checkDocument.h (original)
+++ branches/ScribusOIF/scribus/ui/checkDocument.h Thu Nov 24 23:07:37 2011
@@ -38,6 +38,7 @@
 	~CheckDocument() {};
 	
 	virtual void changeEvent(QEvent *e);
+	void setDoc(ScribusDoc *doc);
 
 	/*! \brief State of the P.V. */
 	enum CheckMode { checkNULL, checkPDF, checkEPS, checkPrint, checkPrintPreview };
@@ -78,7 +79,7 @@
 signals:
 	//void rescan();
 	//! \brief Signal emitted when user selects any page item in error list.
-//	void selectElement(int, int);
+	void selectElement(PageItem *, bool, int);
 	void selectElementByItem(PageItem *, bool);
 	//! \brief Signal emitted when user selects any page in error list.
 	void selectPage(int);
@@ -107,6 +108,8 @@
 	QMap<QTreeWidgetItem*, QString> masterPageMap;
 	//! \brief Mappping MP Item - MP item nr.
 	QMap<QTreeWidgetItem*, PageItem*> masterPageItemMap;
+	//! \brief Mappping Page Item - cursor position in item
+	QMap<QTreeWidgetItem*, int> posMap;
 
 	//! \brief a reference to the current document
 	ScribusDoc* m_Doc;

Modified: branches/ScribusOIF/scribus/ui/effectsdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17022&path=/branches/ScribusOIF/scribus/ui/effectsdialog.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/effectsdialog.cpp (original)
+++ branches/ScribusOIF/scribus/ui/effectsdialog.cpp Thu Nov 24 23:07:37 2011
@@ -48,9 +48,13 @@
 	effectsList = currItem->effectsInUse;
 	doc = docc;
 	currentOptions = 0;
+
+//	CMSettings cms(docc, "", Intent_Perceptual);
+//	cms.allowColorManagement(false);
 	bool mode = false;
-	CMSettings cms(docc, "", Intent_Perceptual);
-	cms.allowColorManagement(false);
+	CMSettings cms(doc, currItem->IProfile, currItem->IRender);
+	cms.setUseEmbeddedProfile(currItem->UseEmbedded);
+	cms.allowSoftProofing(true);
 	image.loadPicture(currItem->Pfile, currItem->pixm.imgInfo.actualPageNumber, cms, ScImage::RGBData, 72, &mode);
 	int ix = image.width();
 	int iy = image.height();

Modified: branches/ScribusOIF/scribus/ui/layers.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17022&path=/branches/ScribusOIF/scribus/ui/layers.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/layers.cpp (original)
+++ branches/ScribusOIF/scribus/ui/layers.cpp Thu Nov 24 23:07:37 2011
@@ -37,9 +37,12 @@
 #include "undomanager.h"
 #include "util_icon.h"
 
-LayerPalette::LayerPalette(QWidget* parent) : ScrPaletteBase( parent, "Layers", false, 0 ), m_Doc(0)
-{
-	LayerPaletteLayout = new QVBoxLayout( this );
+LayerPalette::LayerPalette(QWidget* parent) : ScDockPalette( parent, "Layers", 0 ), m_Doc(0)
+{
+	setObjectName(QString::fromLocal8Bit("Layers"));
+	setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
+	containerWidget = new QWidget(this);
+	LayerPaletteLayout = new QVBoxLayout();
 	LayerPaletteLayout->setMargin(2);
 	LayerPaletteLayout->setSpacing(2);
 
@@ -134,6 +137,8 @@
 	Layout1->addWidget( lowerLayerButton );
 
 	LayerPaletteLayout->addLayout( Layout1 );
+	containerWidget->setLayout( LayerPaletteLayout );
+	setWidget( containerWidget );
 	ClearInhalt();
 	languageChange();
 
@@ -560,7 +565,7 @@
 		languageChange();
 	}
 	else
-		QWidget::changeEvent(e);
+		ScDockPalette::changeEvent(e);
 }
 
 void LayerPalette::languageChange()

Modified: branches/ScribusOIF/scribus/ui/layers.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17022&path=/branches/ScribusOIF/scribus/ui/layers.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/layers.h (original)
+++ branches/ScribusOIF/scribus/ui/layers.h Thu Nov 24 23:07:37 2011
@@ -10,7 +10,7 @@
 #include <QList>
 
 #include "scribusapi.h"
-#include "ui/scrpalettebase.h"
+#include "ui/scdockpalette.h"
 #include "scribusstructs.h"
 #include "sclayer.h"
 
@@ -28,7 +28,7 @@
 class ScComboBox;
 class ScribusDoc;
 
-class SCRIBUS_API LayerPalette : public ScrPaletteBase
+class SCRIBUS_API LayerPalette : public ScDockPalette
 {
 	Q_OBJECT
 
@@ -70,6 +70,7 @@
 	void LayerActivated(int);
 
 protected:
+	QWidget* containerWidget;
 	ScribusDoc* m_Doc;
 	QVBoxLayout* LayerPaletteLayout;
 	QHBoxLayout* Layout1;

Modified: branches/ScribusOIF/scribus/ui/query.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17022&path=/branches/ScribusOIF/scribus/ui/query.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/query.cpp (original)
+++ branches/ScribusOIF/scribus/ui/query.cpp Thu Nov 24 23:07:37 2011
@@ -61,6 +61,14 @@
 {
 	if (answerEdit->text().isEmpty())
 		return;
+	if (!forbiddenList.isEmpty())
+	{
+		if (forbiddenList.contains(answerEdit->text()))
+		{
+			QMessageBox::warning(this, CommonStrings::trWarning, tr("Name \"%1\" is not allowed.\nPlease choose another.").arg(answerEdit->text()), CommonStrings::tr_OK);
+			return;
+		}
+	}
 	if (!checkList.isEmpty())
 	{
 		if (checkList.contains(answerEdit->text()))
@@ -106,6 +114,11 @@
 	checkList = tList;
 }
 
+void Query::setForbiddenList(QStringList tList)
+{
+	forbiddenList = tList;
+}
+
 void Query::setCheckMode(bool mode)
 {
 	checkMode = mode;

Modified: branches/ScribusOIF/scribus/ui/query.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17022&path=/branches/ScribusOIF/scribus/ui/query.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/query.h (original)
+++ branches/ScribusOIF/scribus/ui/query.h Thu Nov 24 23:07:37 2011
@@ -30,6 +30,7 @@
 	const QString getEditText();
 	void setEditText(QString newText, bool setSelected);
 	void setTestList(QStringList tList);
+	void setForbiddenList(QStringList tList);
 	void setCheckMode(bool mode);
 
 public slots:
@@ -44,6 +45,7 @@
 	QLineEdit* answerEdit;
 	QLabel* questionLabel;
 	QStringList checkList;
+	QStringList forbiddenList;
 	bool checkMode;
 };
 

Modified: branches/ScribusOIF/scribus/ui/scrapbookpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17022&path=/branches/ScribusOIF/scribus/ui/scrapbookpalette.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/scrapbookpalette.cpp (original)
+++ branches/ScribusOIF/scribus/ui/scrapbookpalette.cpp Thu Nov 24 23:07:37 2011
@@ -134,9 +134,9 @@
 		e->acceptProposedAction();
 		if (e->source() == this)
 			return;
-		QString nam, tmp = "";
 		QString text = e->mimeData()->text();
-		if (text.startsWith("<SCRIBUSELEM"))
+		int startElemPos = text.left(512).indexOf("<SCRIBUSELEM");
+		if (startElemPos >= 0)
 			emit objDropped(text);
 	}
 	else if ( e->mimeData()->hasFormat("text/uri-list"))




More information about the scribus-commit mailing list