r16200 by jghali - merge trunk revisions up to r16199

scribus-commit scribus-commit at lists.scribus.net
Sun Jan 2 12:27:21 CET 2011


Author: jghali
Date: Sun Jan  2 11:27:21 2011
New Revision: 16200

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16200
Log:
merge trunk revisions up to r16199

Added:
    branches/ScribusOIF/doc/en/fileproblems.html
      - copied unchanged from r16198, trunk/Scribus/doc/en/fileproblems.html
    branches/ScribusOIF/scribus/pageitem_regularpolygon.cpp
      - copied unchanged from r16198, trunk/Scribus/scribus/pageitem_regularpolygon.cpp
    branches/ScribusOIF/scribus/pageitem_regularpolygon.h
      - copied unchanged from r16198, trunk/Scribus/scribus/pageitem_regularpolygon.h
Modified:
    branches/ScribusOIF/doc/en/menu.xml
    branches/ScribusOIF/scribus/CMakeLists.txt
    branches/ScribusOIF/scribus/canvasmode_create.cpp
    branches/ScribusOIF/scribus/canvasmode_editmeshgradient.cpp
    branches/ScribusOIF/scribus/canvasmode_normal.cpp
    branches/ScribusOIF/scribus/fileloader.cpp
    branches/ScribusOIF/scribus/pageitem.cpp
    branches/ScribusOIF/scribus/pageitem.h
    branches/ScribusOIF/scribus/pdflib_core.cpp
    branches/ScribusOIF/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
    branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
    branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
    branches/ScribusOIF/scribus/plugins/import/xar/importxar.cpp
    branches/ScribusOIF/scribus/plugins/svgexplugin/svgexplugin.cpp
    branches/ScribusOIF/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortion.cpp
    branches/ScribusOIF/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp
    branches/ScribusOIF/scribus/plugins/tools/lenseffects/lenseffects.cpp
    branches/ScribusOIF/scribus/plugins/tools/pathconnect/pathconnect.cpp
    branches/ScribusOIF/scribus/plugins/tools/pathcut/pathcut.cpp
    branches/ScribusOIF/scribus/plugins/tools/pathfinder/pathfinder.cpp
    branches/ScribusOIF/scribus/plugins/tools/pathstroker/pathstroker.cpp
    branches/ScribusOIF/scribus/prefsmanager.cpp
    branches/ScribusOIF/scribus/prefsstructs.h
    branches/ScribusOIF/scribus/pslib.cpp
    branches/ScribusOIF/scribus/scpageoutput.cpp
    branches/ScribusOIF/scribus/scribus.cpp
    branches/ScribusOIF/scribus/scribus.h
    branches/ScribusOIF/scribus/scribuscore.cpp
    branches/ScribusOIF/scribus/scribusdoc.cpp
    branches/ScribusOIF/scribus/scribusdoc.h
    branches/ScribusOIF/scribus/scribusview.cpp
    branches/ScribusOIF/scribus/ui/about.cpp
    branches/ScribusOIF/scribus/ui/cpalette.cpp
    branches/ScribusOIF/scribus/ui/helpbrowser.cpp
    branches/ScribusOIF/scribus/ui/helpbrowser.h
    branches/ScribusOIF/scribus/ui/modetoolbar.cpp
    branches/ScribusOIF/scribus/ui/outlinepalette.cpp
    branches/ScribusOIF/scribus/ui/polygonwidget.cpp
    branches/ScribusOIF/scribus/ui/polygonwidget.h
    branches/ScribusOIF/scribus/ui/polygonwidgetbase.ui
    branches/ScribusOIF/scribus/ui/polyprops.cpp
    branches/ScribusOIF/scribus/ui/polyprops.h
    branches/ScribusOIF/scribus/ui/propertiespalette.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette_shape.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette_xyz.cpp
    branches/ScribusOIF/scribus/ui/propertywidget_pos.cpp
    branches/ScribusOIF/scribus/ui/propertywidget_shape.cpp
    branches/ScribusOIF/scribus/util_math.cpp
    branches/ScribusOIF/scribus/util_math.h
    branches/ScribusOIF/win32/vc8/Scribus.vcproj

Modified: branches/ScribusOIF/doc/en/menu.xml
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/doc/en/menu.xml
==============================================================================
--- branches/ScribusOIF/doc/en/menu.xml (original)
+++ branches/ScribusOIF/doc/en/menu.xml Sun Jan  2 11:27:21 2011
@@ -95,6 +95,7 @@
 		<submenuitem text="Hints &amp; FAQs" file="topten.html">
 			<submenuitem text="Help" file="faq1.html"/>
 			<submenuitem text="Development" file="faq3.html"/>
+			<submenuitem text="Problems with Document Files" file="fileproblems.html"/>
 		</submenuitem>
 	</area>
 	<area text="My Tutorials" file="tutorials.html" section="tutorials">

Modified: branches/ScribusOIF/scribus/CMakeLists.txt
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/CMakeLists.txt
==============================================================================
--- branches/ScribusOIF/scribus/CMakeLists.txt (original)
+++ branches/ScribusOIF/scribus/CMakeLists.txt Sun Jan  2 11:27:21 2011
@@ -207,6 +207,7 @@
   pageitem_pathtext.h
   pageitem_polygon.h
   pageitem_polyline.h
+  pageitem_regularpolygon.h
   pageitem_symbol.h
   pageitem_textframe.h
   pageitempointer.h
@@ -551,6 +552,7 @@
   pageitem_pathtext.cpp
   pageitem_polygon.cpp
   pageitem_polyline.cpp
+  pageitem_regularpolygon.cpp
   pageitem_symbol.cpp
   pageitem_textframe.cpp
   pageitempointer.cpp

Modified: branches/ScribusOIF/scribus/canvasmode_create.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/canvasmode_create.cpp
==============================================================================
--- branches/ScribusOIF/scribus/canvasmode_create.cpp (original)
+++ branches/ScribusOIF/scribus/canvasmode_create.cpp Sun Jan  2 11:27:21 2011
@@ -104,7 +104,7 @@
 		}
 		else if (createObjectMode == modeDrawRegularPolygon)
 		{
-			QPainterPath path = RegularPolygon(localRect.width(), localRect.height(), m_doc->itemToolPrefs().polyCorners, m_doc->itemToolPrefs().polyUseFactor, m_doc->itemToolPrefs().polyFactor, m_doc->itemToolPrefs().polyRotation, m_doc->itemToolPrefs().polyCurvature);
+			QPainterPath path = RegularPolygonPath(localRect.width(), localRect.height(), m_doc->itemToolPrefs().polyCorners, m_doc->itemToolPrefs().polyUseFactor, m_doc->itemToolPrefs().polyFactor, m_doc->itemToolPrefs().polyRotation, m_doc->itemToolPrefs().polyCurvature, m_doc->itemToolPrefs().polyInnerRot);
 			p->translate(localRect.left(), localRect.top());
 			p->drawPath(path);
 		}
@@ -513,7 +513,7 @@
 		frameType = (int) PageItem::Unspecified;
 		break;
 	case modeDrawRegularPolygon:
-		itemType  = (int) PageItem::Polygon;
+		itemType  = (int) PageItem::RegularPolygon;
 		frameType = (int) PageItem::Unspecified;
 		break;
 	case modeInsertPDFButton:
@@ -673,16 +673,9 @@
 	case modeDrawRegularPolygon:
 		{
 			if (modifiers == Qt::ShiftModifier)
-				z = m_doc->itemAddArea(PageItem::Polygon, PageItem::Unspecified, Rxp, Ryp, m_doc->itemToolPrefs().shapeLineWidth, m_doc->itemToolPrefs().shapeFillColor, m_doc->itemToolPrefs().lineColor, true);
+				z = m_doc->itemAddArea(PageItem::RegularPolygon, PageItem::Unspecified, Rxp, Ryp, m_doc->itemToolPrefs().shapeLineWidth, m_doc->itemToolPrefs().shapeFillColor, m_doc->itemToolPrefs().lineColor, true);
 			else
-			{
-				z = m_doc->itemAdd(PageItem::Polygon, PageItem::Unspecified, Rxp, Ryp, Rxpd, Rypd, m_doc->itemToolPrefs().shapeLineWidth, m_doc->itemToolPrefs().shapeFillColor, m_doc->itemToolPrefs().lineColor, true);
-			}
-			currItem = m_doc->Items->at(z);
-			QPainterPath path = RegularPolygon(currItem->width(), currItem->height(), m_doc->itemToolPrefs().polyCorners, m_doc->itemToolPrefs().polyUseFactor, m_doc->itemToolPrefs().polyFactor, m_doc->itemToolPrefs().polyRotation, m_doc->itemToolPrefs().polyCurvature);
-			currItem->PoLine.fromQPainterPath(path);
-			m_doc->AdjustItemSize(currItem);
-			currItem->Clip = FlattenPath(currItem->PoLine, currItem->Segments);
+				z = m_doc->itemAdd(PageItem::RegularPolygon, PageItem::Unspecified, Rxp, Ryp, Rxpd, Rypd, m_doc->itemToolPrefs().shapeLineWidth, m_doc->itemToolPrefs().shapeFillColor, m_doc->itemToolPrefs().lineColor, true);
 			/*
 			qApp->changeOverrideCursor(QCursor(Qt::SizeFDiagCursor));
 			m_doc->m_Selection->clear();

Modified: branches/ScribusOIF/scribus/canvasmode_editmeshgradient.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/canvasmode_editmeshgradient.cpp
==============================================================================
--- branches/ScribusOIF/scribus/canvasmode_editmeshgradient.cpp (original)
+++ branches/ScribusOIF/scribus/canvasmode_editmeshgradient.cpp Sun Jan  2 11:27:21 2011
@@ -424,6 +424,8 @@
 		double newX = mousePointDoc.x();
 		double newY = mousePointDoc.y();
 		PageItem *currItem = m_doc->m_Selection->itemAt(0);
+		FPoint npf = FPoint(mousePointDoc.x(), mousePointDoc.y(), currItem->xPos(), currItem->yPos(), currItem->rotation(), 1, 1, true);
+		m_canvas->displayXYHUD(m->globalPos(), npf.x(), npf.y());
 		FPoint npx(Mxp - newX, Myp - newY, 0, 0, currItem->rotation(), 1, 1, true);
 		if (selectedMeshPoints.count() > 0)
 		{
@@ -804,5 +806,4 @@
 	upRect = QRectF(QPointF(0, 0), QPointF(currItem->width(), currItem->height())).normalized();
 	upRect.translate(currItem->xPos(), currItem->yPos());
 	m_doc->regionsChanged()->update(upRect.adjusted(-10.0 - currItem->width() / 2.0, -10.0 - currItem->height() / 2.0, 10.0 + currItem->width() / 2.0, 10.0 + currItem->height() / 2.0));
-
-}
+}

Modified: branches/ScribusOIF/scribus/canvasmode_normal.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/canvasmode_normal.cpp
==============================================================================
--- branches/ScribusOIF/scribus/canvasmode_normal.cpp (original)
+++ branches/ScribusOIF/scribus/canvasmode_normal.cpp Sun Jan  2 11:27:21 2011
@@ -40,6 +40,7 @@
 #include "hyphenator.h"
 #include "loadsaveplugin.h"
 #include "pageitem_textframe.h"
+#include "pageitem_regularpolygon.h"
 #include "prefscontext.h"
 #include "prefsfile.h"
 #include "prefsmanager.h"
@@ -58,6 +59,7 @@
 #include "ui/customfdialog.h"
 #include "ui/insertTable.h"
 #include "ui/pageselector.h"
+#include "ui/polyprops.h"
 #include "ui/propertiespalette.h"
 #include "ui/propertiespalette_line.h"
 #include "ui/propertiespalette_text.h"
@@ -239,6 +241,18 @@
 		{
 			if (!m_doc->symbolEditMode())
 				m_view->requestMode(submodeEditSymbol);
+		}
+		else if (currItem->asRegularPolygon())
+		{
+			PageItem_RegularPolygon* item = currItem->asRegularPolygon();
+			PolygonProps* dia = new PolygonProps(m_ScMW, item->polyCorners, item->polyFactorGuiVal, item->polyFactor, item->polyUseFactor, item->polyRotation, item->polyCurvature, item->polyInnerRot);
+			if (dia->exec())
+			{
+				dia->getValues(&item->polyCorners, &item->polyFactorGuiVal, &item->polyFactor, &item->polyUseFactor, &item->polyRotation, &item->polyCurvature, &item->polyInnerRot);
+				item->recalcPath();
+			}
+			delete dia;
+			m_view->updateContents();
 		}
 	}
 }

Modified: branches/ScribusOIF/scribus/fileloader.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/fileloader.cpp
==============================================================================
--- branches/ScribusOIF/scribus/fileloader.cpp (original)
+++ branches/ScribusOIF/scribus/fileloader.cpp Sun Jan  2 11:27:21 2011
@@ -285,6 +285,8 @@
 	currDoc->itemToolPrefs().polyFactor = prefsManager->appPrefs.itemToolPrefs.polyFactor;
 	currDoc->itemToolPrefs().polyRotation = prefsManager->appPrefs.itemToolPrefs.polyRotation;
 	currDoc->itemToolPrefs().polyCurvature = prefsManager->appPrefs.itemToolPrefs.polyCurvature;
+	currDoc->itemToolPrefs().polyOuterCurvature = prefsManager->appPrefs.itemToolPrefs.polyOuterCurvature;
+	currDoc->itemToolPrefs().polyInnerRot = prefsManager->appPrefs.itemToolPrefs.polyInnerRot;
 	currDoc->itemToolPrefs().polyFactorGuiVal = prefsManager->appPrefs.itemToolPrefs.polyFactorGuiVal;
 	currDoc->itemToolPrefs().polyUseFactor = prefsManager->appPrefs.itemToolPrefs.polyUseFactor;
 	currDoc->setAutoSave(prefsManager->appPrefs.docSetupPrefs.AutoSave);

Modified: branches/ScribusOIF/scribus/pageitem.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/pageitem.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pageitem.cpp (original)
+++ branches/ScribusOIF/scribus/pageitem.cpp Sun Jan  2 11:27:21 2011
@@ -179,7 +179,6 @@
 	LayerID(other.LayerID),
 	ScaleType(other.ScaleType),
 	AspectRatio(other.AspectRatio),
-	Groups(other.Groups),
 	DashValues(other.DashValues),
 	DashOffset(other.DashOffset),
 	fill_gradient(other.fill_gradient),
@@ -558,6 +557,10 @@
 		AnName = tr("Group");
 		setUPixmap(Um::IPolygon);
 		break;
+	case RegularPolygon:
+		AnName = tr("RegularPolygon");
+		setUPixmap(Um::IPolygon);
+		break;
 	default:
 		AnName = "Item";
 		break;
@@ -577,7 +580,6 @@
 	UseEmbedded = true;
 	IRender = Intent_Relative_Colorimetric;
 	EmProfile = "";
-	Groups.clear();
 	groupItemList.clear();
 	groupWidth = 1.0;
 	groupHeight = 1.0;
@@ -1825,6 +1827,7 @@
 			case PathText:
 			case Symbol:
 			case Group:
+			case RegularPolygon:
 				embedded->DrawObj_Item(p, cullingArea);
 				break;
 			case Line:
@@ -2578,6 +2581,7 @@
 				case Line:
 				case PolyLine:
 				case Polygon:
+				case RegularPolygon:
 					GrColorP1 = m_Doc->itemToolPrefs().shapeFillColor;
 					break;
 				default:
@@ -2613,6 +2617,7 @@
 				case Line:
 				case PolyLine:
 				case Polygon:
+				case RegularPolygon:
 					GrColorP2 = m_Doc->itemToolPrefs().shapeFillColor;
 					break;
 				default:
@@ -2648,6 +2653,7 @@
 				case Line:
 				case PolyLine:
 				case Polygon:
+				case RegularPolygon:
 					GrColorP3 = m_Doc->itemToolPrefs().shapeFillColor;
 					break;
 				default:
@@ -2683,6 +2689,7 @@
 				case Line:
 				case PolyLine:
 				case Polygon:
+				case RegularPolygon:
 					GrColorP4 = m_Doc->itemToolPrefs().shapeFillColor;
 					break;
 				default:
@@ -2747,6 +2754,7 @@
 				case Line:
 				case PolyLine:
 				case Polygon:
+				case RegularPolygon:
 					MColor = m_Doc->itemToolPrefs().shapeFillColor;
 					break;
 				default:
@@ -2794,6 +2802,7 @@
 				case Line:
 				case PolyLine:
 				case Polygon:
+				case RegularPolygon:
 					MColor = m_Doc->itemToolPrefs().shapeFillColor;
 					break;
 				default:
@@ -3093,6 +3102,7 @@
 				case Line:
 				case PolyLine:
 				case Polygon:
+				case RegularPolygon:
 					tmp = m_Doc->itemToolPrefs().shapeFillColor;
 					break;
 				default:
@@ -3185,6 +3195,7 @@
 				case ImageFrame:
 				case LatexFrame:
 				case OSGFrame:
+				case RegularPolygon:
 					tmp = m_Doc->itemToolPrefs().shapeLineColor;
 					break;
 				default:
@@ -3304,6 +3315,7 @@
 				case ImageFrame:
 				case LatexFrame:
 				case OSGFrame:
+				case RegularPolygon:
 					lineColorVal = m_Doc->itemToolPrefs().shapeLineColor;
 					break;
 				default:
@@ -3341,6 +3353,7 @@
 				case Line:
 				case PolyLine:
 				case Polygon:
+				case RegularPolygon:
 					fillColorVal = m_Doc->itemToolPrefs().shapeFillColor;
 					break;
 				default:
@@ -3708,6 +3721,7 @@
 			fromType = Um::TextFrame;
 			break;
 		case Polygon:
+		case RegularPolygon:
 			fromType = Um::Polygon;
 			break;
 		default:
@@ -3729,6 +3743,7 @@
 			setUPixmap(Um::ITextFrame);
 			break;
 		case Polygon:
+		case RegularPolygon:
 			toType = Um::Polygon;
 			setUPixmap(Um::IPolygon);
 			break;

Modified: branches/ScribusOIF/scribus/pageitem.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/pageitem.h
==============================================================================
--- branches/ScribusOIF/scribus/pageitem.h (original)
+++ branches/ScribusOIF/scribus/pageitem.h Sun Jan  2 11:27:21 2011
@@ -71,13 +71,13 @@
 class PageItem_OSGFrame;
 class PageItem_Polygon;
 class PageItem_PolyLine;
+class PageItem_RegularPolygon;
 class PageItem_TextFrame;
 class PageItem_PathText;
 class PageItem_LatexFrame;
 class PageItem_Symbol;
 class TextLayout;
 
-struct CopyPasteBuffer;
 /**
   *@author Franz Schmid
   */
@@ -159,19 +159,20 @@
 	 * Multiple is used for checking in @sa Selection for all same type of items
 	 */
 	enum ItemType {
-		ItemType1	= 1,
-		ImageFrame	= 2,
-		ItemType3	= 3,
-		TextFrame	= 4,
-		Line		= 5,
-		Polygon		= 6,
-		PolyLine	= 7,
-		PathText	= 8,
-		LatexFrame  = 9,
-		OSGFrame    = 10,
-		Symbol		= 11,
-		Group		= 12,
-		Multiple	= 99
+		ItemType1		= 1,
+		ImageFrame		= 2,
+		ItemType3		= 3,
+		TextFrame		= 4,
+		Line			= 5,
+		Polygon			= 6,
+		PolyLine		= 7,
+		PathText		= 8,
+		LatexFrame  	= 9,
+		OSGFrame    	= 10,
+		Symbol			= 11,
+		Group			= 12,
+		RegularPolygon	= 13,
+		Multiple		= 99
 	};
 
 	/** @brief Text flow mode
@@ -198,17 +199,19 @@
 	virtual PageItem_OSGFrame * asOSGFrame() { return NULL; }
 	virtual PageItem_Symbol * asSymbolFrame() { return NULL; }
 	virtual PageItem_Group * asGroupFrame() { return NULL; }
-
-	virtual bool isImageFrame() const { return false; }
-	virtual bool isLine()       const { return false; }
-	virtual bool isPathText()   const { return false; }
-	virtual bool isPolygon()    const { return false; }
-	virtual bool isPolyLine()   const { return false; }
-	virtual bool isTextFrame()  const { return false; }
-	virtual bool isLatexFrame() const { return false; }
-	virtual bool isOSGFrame()   const { return false; }
-	virtual bool isSymbol()     const { return false; }
-	virtual bool isGroup()      const { return false; }
+	virtual PageItem_RegularPolygon * asRegularPolygon() { return NULL; }
+
+	virtual bool isImageFrame()		const { return false; }
+	virtual bool isLine()			const { return false; }
+	virtual bool isPathText()		const { return false; }
+	virtual bool isPolygon()		const { return false; }
+	virtual bool isPolyLine()		const { return false; }
+	virtual bool isTextFrame()		const { return false; }
+	virtual bool isLatexFrame()		const { return false; }
+	virtual bool isOSGFrame()		const { return false; }
+	virtual bool isSymbol()			const { return false; }
+	virtual bool isGroup()			const { return false; }
+	virtual bool isRegularPolygon()	const { return false; }
 
 	/** @brief Frame Type
 	 *
@@ -532,7 +535,6 @@
 	int  LayerID;
 	bool ScaleType;
 	bool AspectRatio;
-	QStack<int> Groups;
 	QVector<double> DashValues;
 	double DashOffset;
 	const QVector<double>& dashes() const { return DashValues; }

Modified: branches/ScribusOIF/scribus/pdflib_core.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/pdflib_core.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pdflib_core.cpp (original)
+++ branches/ScribusOIF/scribus/pdflib_core.cpp Sun Jan  2 11:27:21 2011
@@ -2154,6 +2154,7 @@
 					case PageItem::ItemType1:
 					case PageItem::ItemType3:
 					case PageItem::Polygon:
+					case PageItem::RegularPolygon:
 						PutPage("q\n");
 						if (((ite->GrMask > 0) || (ite->fillTransparency() != 0) || (ite->fillBlendmode() != 0)) && ((Options.Version >= PDFOptions::PDFVersion_14) || (Options.Version == PDFOptions::PDFVersion_X4)))
 						{
@@ -2457,7 +2458,7 @@
 							if (ite->imageFlippedV())
 								PutPage("1 0 0 -1 0 "+FToStr(-ite->height())+" cm\n");
 							QTransform trans;
-							trans.scale(ite->width() / ite->groupWidth, ite->height() / ite->groupHeight);
+							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);
 							PutPage(FToStr(trans.m11())+" "+FToStr(trans.m12())+" "+FToStr(trans.m21())+" "+FToStr(trans.m22())+" "+FToStr(trans.dx())+" "+FToStr(trans.dy())+" cm\n");
@@ -3889,6 +3890,7 @@
 		case PageItem::ItemType1:
 		case PageItem::ItemType3:
 		case PageItem::Polygon:
+		case PageItem::RegularPolygon:
 			tmp += "q\n";
 			if (((ite->GrMask > 0) || (ite->fillTransparency() != 0) || (ite->fillBlendmode() != 0)) && ((Options.Version >= PDFOptions::PDFVersion_14) || (Options.Version == PDFOptions::PDFVersion_X4)))
 			{
@@ -4193,7 +4195,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)
 				{
@@ -4239,7 +4241,7 @@
 				QTransform trans;
 				trans.scale(ite->width() / ite->groupWidth, ite->height() / ite->groupHeight);
 				trans.translate(0.0, -ite->height());
-				trans.translate(ite->groupItemList.at(0)->gXpos, -ite->groupItemList.at(0)->gYpos);
+			//	trans.translate(ite->groupItemList.at(0)->gXpos, -ite->groupItemList.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 < ite->groupItemList.count(); ++em)
 				{

Modified: branches/ScribusOIF/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/fileloader/scribus134format/scribus134format.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/fileloader/scribus134format/scribus134format.cpp Sun Jan  2 11:27:21 2011
@@ -2605,7 +2605,6 @@
 	QColor tmpc;
 	PageItem *currItem=NULL;
 	QString tmp;
-	int xi;
 	double xf, yf, xf2;
 	QString clPath;
 
@@ -2981,33 +2980,6 @@
 		currItem->LayerID = attrs.valueAsInt("LAYER", 0);
 	tmp = "";
 
-	if (attrs.hasAttribute("GROUPS") && (attrs.valueAsInt("NUMGROUP", 0) != 0))
-	{
-		int groupMax = doc->GroupCounter;
-		QMap<int, int>::ConstIterator gIt;
-		tmp = attrs.valueAsString("GROUPS");
-		ScTextStream fg(&tmp, QIODevice::ReadOnly);
-		currItem->Groups.clear();
-		int numGroup = attrs.valueAsInt("NUMGROUP", 0);
-		for (int cx = 0; cx < numGroup; ++cx)
-		{
-			fg >> xi;
-			gIt = groupRemap.find(xi);
-			if (gIt != groupRemap.end())
-				currItem->Groups.push(gIt.value());
-			else
-			{
-				currItem->Groups.push(groupMax); 
-				groupRemap.insert(xi, groupMax);
-				++groupMax;
-			}
-		}
-		doc->GroupCounter = groupMax;
-		tmp = "";
-	}
-	else
-		currItem->Groups.clear();
-
 	QList<ParagraphStyle::TabRecord> tbs;
 	tmp = "";
 	if ((attrs.hasAttribute("NUMTAB")) && (attrs.valueAsInt("NUMTAB", 0) != 0))

Modified: branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.cpp Sun Jan  2 11:27:21 2011
@@ -31,6 +31,7 @@
 #ifdef HAVE_OSG
 	#include "pageitem_osgframe.h"
 #endif
+#include "pageitem_regularpolygon.h"
 #include <QCursor>
 // #include <QDebug>
 #include <QFileInfo>
@@ -1701,7 +1702,9 @@
 	doc->itemToolPrefs().polyCorners      = attrs.valueAsInt("POLYC", 4);
 	doc->itemToolPrefs().polyFactor = attrs.valueAsDouble("POLYF", 0.5);
 	doc->itemToolPrefs().polyRotation     = attrs.valueAsDouble("POLYR", 0.0);
+	doc->itemToolPrefs().polyInnerRot     = attrs.valueAsDouble("POLYIR", 0.0);
 	doc->itemToolPrefs().polyCurvature    = attrs.valueAsDouble("POLYCUR", 0.0);
+	doc->itemToolPrefs().polyOuterCurvature    = attrs.valueAsDouble("POLYOCUR", 0.0);
 	doc->itemToolPrefs().polyFactorGuiVal = attrs.valueAsInt("POLYFD", 0);
 	doc->itemToolPrefs().polyUseFactor    = attrs.valueAsBool("POLYS", false);
 
@@ -3349,6 +3352,12 @@
 		currItem->groupHeight = attrs.valueAsDouble("groupHeight", h);
 		doc->GroupCounter++;
 		break;
+	case PageItem::RegularPolygon:
+		z = doc->itemAdd(PageItem::RegularPolygon, PageItem::Unspecified, x, y, w, h, pw, Pcolor, Pcolor2, true);
+		currItem = doc->Items->at(z);
+		if (pagenr > -2) 
+			currItem->OwnPage = pagenr;
+		break;
 	case PageItem::Multiple:
 		Q_ASSERT(false);
 		break;
@@ -3376,8 +3385,8 @@
 	currItem->isBookmark  = attrs.valueAsInt("BOOKMARK");
 	if ((currItem->isBookmark) && (doc->BookMarks.count() == 0))
 		doc->OldBM = true;
-	currItem->setImageFlippedH( attrs.valueAsInt("FLIPPEDH"));
-	currItem->setImageFlippedV( attrs.valueAsInt("FLIPPEDV"));
+	currItem->setImageFlippedH( attrs.valueAsInt("FLIPPEDH", 0));
+	currItem->setImageFlippedV( attrs.valueAsInt("FLIPPEDV", 0));
 	currItem->setCornerRadius( attrs.valueAsDouble("RADRECT", 0.0));
 	currItem->ClipEdited = attrs.valueAsInt("CLIPEDIT", 0);
 	currItem->setFillColor(Pcolor);
@@ -3459,13 +3468,13 @@
 		}
 	}
 	currItem->setRotation( attrs.valueAsDouble("ROT") );
-	currItem->setTextToFrameDist(attrs.valueAsDouble("EXTRA"),
+	currItem->setTextToFrameDist(attrs.valueAsDouble("EXTRA", 1.0),
 								attrs.valueAsDouble("REXTRA", 1.0),
 								attrs.valueAsDouble("TEXTRA", 1.0),
 								attrs.valueAsDouble("BEXTRA", 1.0));
 	currItem->setFirstLineOffset(static_cast<FirstLineOffsetPolicy>(attrs.valueAsInt("FLOP")));
 
-	currItem->PLineArt  = Qt::PenStyle(attrs.valueAsInt("PLINEART"));
+	currItem->PLineArt  = Qt::PenStyle(attrs.valueAsInt("PLINEART", 0));
 	currItem->PLineEnd  = Qt::PenCapStyle(attrs.valueAsInt("PLINEEND", 0));
 	currItem->PLineJoin = Qt::PenJoinStyle(attrs.valueAsInt("PLINEJOIN", 0));
 	currItem->setPrintEnabled( attrs.valueAsInt("PRINTABLE"));
@@ -3658,6 +3667,18 @@
 		currItem->updatePolyClip();
 		currItem->Frame = true;
 	}
+	if (currItem->asRegularPolygon())
+	{
+		PageItem_RegularPolygon *regitem = currItem->asRegularPolygon();
+		regitem->polyCorners      = attrs.valueAsInt("POLYC", 4);
+		regitem->polyFactor       = attrs.valueAsDouble("POLYF", 0.5);
+		regitem->polyRotation     = attrs.valueAsDouble("POLYR", 0.0);
+		regitem->polyInnerRot     = attrs.valueAsDouble("POLYIR", 0.0);
+		regitem->polyCurvature    = attrs.valueAsDouble("POLYCUR", 0.0);
+		regitem->polyOuterCurvature    = attrs.valueAsDouble("POLYOCUR", 0.0);
+		regitem->polyFactorGuiVal = attrs.valueAsInt("POLYFD", 0);
+		regitem->polyUseFactor    = attrs.valueAsBool("POLYS", false);
+	}
 	currItem->GrType = attrs.valueAsInt("GRTYP", 0);
 	QString GrColor;
 	QString GrColor2;
@@ -4095,13 +4116,13 @@
 				if (tagName == "PAGEOBJECT")
 				{
 					itemRemap[itemCount++] = m_Doc->DocItems.count();
-					if (attrs.valueAsInt("NEXTITEM") != -1)
+					if (attrs.valueAsInt("NEXTITEM", -1) != -1)
 						itemNext[m_Doc->DocItems.count()] = attrs.valueAsInt("NEXTITEM");
 				}
 				else if (tagName == "MASTEROBJECT")
 				{
 					itemRemapM[itemCountM++] = m_Doc->MasterItems.count();
-					if (attrs.valueAsInt("NEXTITEM") != -1)
+					if (attrs.valueAsInt("NEXTITEM", -1) != -1)
 						itemNextM[m_Doc->MasterItems.count()] = attrs.valueAsInt("NEXTITEM");
 				}
 

Modified: branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&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 Sun Jan  2 11:27:21 2011
@@ -24,6 +24,7 @@
 #ifdef HAVE_OSG
 	#include "pageitem_osgframe.h"
 #endif
+#include "pageitem_regularpolygon.h"
 
 #include "units.h"
 #include "util.h"
@@ -256,7 +257,9 @@
 	docu.writeAttribute("POLYC", m_Doc->itemToolPrefs().polyCorners);
 	docu.writeAttribute("POLYF", m_Doc->itemToolPrefs().polyFactor);
 	docu.writeAttribute("POLYR", m_Doc->itemToolPrefs().polyRotation);
+	docu.writeAttribute("POLYIR", m_Doc->itemToolPrefs().polyInnerRot);
 	docu.writeAttribute("POLYCUR", m_Doc->itemToolPrefs().polyCurvature);
+	docu.writeAttribute("POLYOCUR", m_Doc->itemToolPrefs().polyOuterCurvature);
 	docu.writeAttribute("POLYFD", m_Doc->itemToolPrefs().polyFactorGuiVal);
 	docu.writeAttribute("POLYS", static_cast<int>(m_Doc->itemToolPrefs().polyUseFactor));
 	docu.writeAttribute("AutoSave", static_cast<int>(m_Doc->autoSave()));
@@ -1566,17 +1569,20 @@
 		docu.writeAttribute("LAYER", item->LayerID);
 		docu.writeAttribute("BOOKMARK", item->isBookmark ? 1 : 0);
 
-		if (item->nextInChain() != 0)
-			docu.writeAttribute("NEXTITEM", item->nextInChain()->ItemNr);
-		else
-			docu.writeAttribute("NEXTITEM", -1);
-		
-		if (item->prevInChain() != 0 && items->contains(item->prevInChain()))
-			docu.writeAttribute("BACKITEM", item->prevInChain()->ItemNr);
-		else
-		{
-			docu.writeAttribute("BACKITEM", -1);
-			writeITEXTs(doc, docu, item); 	
+		if (item->asTextFrame() || item->asPathText() || item->asImageFrame())
+		{
+			if (item->nextInChain() != 0)
+				docu.writeAttribute("NEXTITEM", item->nextInChain()->ItemNr);
+			else
+				docu.writeAttribute("NEXTITEM", -1);
+			
+			if (item->prevInChain() != 0 && items->contains(item->prevInChain()))
+				docu.writeAttribute("BACKITEM", item->prevInChain()->ItemNr);
+			else
+			{
+				docu.writeAttribute("BACKITEM", -1);
+				writeITEXTs(doc, docu, item);
+			}
 		}
 
 		if (item->effectsInUse.count() != 0)
@@ -1754,20 +1760,23 @@
 		}
 
 		//CB PageItemAttributes
-		docu.writeStartElement("PageItemAttributes");
 		ObjAttrVector *attributes=item->getObjectAttributes();
-		for(ObjAttrVector::Iterator objAttrIt = attributes->begin() ; objAttrIt != attributes->end(); ++objAttrIt )
-		{
-			docu.writeEmptyElement("ItemAttribute");
-			docu.writeAttribute("Name", (*objAttrIt).name);
-			docu.writeAttribute("Type", (*objAttrIt).type);
-			docu.writeAttribute("Value", (*objAttrIt).value);
-			docu.writeAttribute("Parameter", (*objAttrIt).parameter);
-			docu.writeAttribute("Relationship", (*objAttrIt).relationship);
-			docu.writeAttribute("RelationshipTo", (*objAttrIt).relationshipto);
-			docu.writeAttribute("AutoAddTo", (*objAttrIt).autoaddto);
-		}
-		docu.writeEndElement();
+		if (attributes->count() > 0)
+		{
+			docu.writeStartElement("PageItemAttributes");
+			for(ObjAttrVector::Iterator objAttrIt = attributes->begin() ; objAttrIt != attributes->end(); ++objAttrIt )
+			{
+				docu.writeEmptyElement("ItemAttribute");
+				docu.writeAttribute("Name", (*objAttrIt).name);
+				docu.writeAttribute("Type", (*objAttrIt).type);
+				docu.writeAttribute("Value", (*objAttrIt).value);
+				docu.writeAttribute("Parameter", (*objAttrIt).parameter);
+				docu.writeAttribute("Relationship", (*objAttrIt).relationship);
+				docu.writeAttribute("RelationshipTo", (*objAttrIt).relationshipto);
+				docu.writeAttribute("AutoAddTo", (*objAttrIt).autoaddto);
+			}
+			docu.writeEndElement();
+		}
 
 		docu.writeEndElement();
 	}
@@ -1780,100 +1789,41 @@
 	if (newFormat)
 		docu.writeAttribute("OwnPage", item->OwnPage);
 	docu.writeAttribute("PTYPE",item->realItemType());
-//	docu.writeAttribute("XPOS",item->xPos());
-//	docu.writeAttribute("YPOS",item->yPos());
 	docu.writeAttribute("WIDTH",item->width());
 	docu.writeAttribute("HEIGHT",item->height());
 	docu.writeAttribute("RADRECT",item->cornerRadius());
 	docu.writeAttribute("FRTYPE", item->FrameType);
 	docu.writeAttribute("CLIPEDIT", item->ClipEdited ? 1 : 0);
-	docu.writeAttribute("PWIDTH",item->lineWidth());
-	docu.writeAttribute("PCOLOR",item->fillColor());
-	docu.writeAttribute("PCOLOR2",item->lineColor());
-	if ( ! item->itemText.defaultStyle().charStyle().isInhFillColor())
-		docu.writeAttribute("TXTFILL",item->itemText.defaultStyle().charStyle().fillColor());
-	if ( ! item->itemText.defaultStyle().charStyle().isInhStrokeColor())
-		docu.writeAttribute("TXTSTROKE",item->itemText.defaultStyle().charStyle().strokeColor());
-	if ( ! item->itemText.defaultStyle().charStyle().isInhStrokeShade())
-		docu.writeAttribute("TXTSTRSH",item->itemText.defaultStyle().charStyle().strokeShade());
-	if ( ! item->itemText.defaultStyle().charStyle().isInhFillShade())
-		docu.writeAttribute("TXTFILLSH",item->itemText.defaultStyle().charStyle().fillShade());
-	if ( ! item->itemText.defaultStyle().charStyle().isInhScaleH())
-		docu.writeAttribute("TXTSCALE",item->itemText.defaultStyle().charStyle().scaleH() / 10.0);
-	if ( ! item->itemText.defaultStyle().charStyle().isInhScaleV())
-		docu.writeAttribute("TXTSCALEV",item->itemText.defaultStyle().charStyle().scaleV() / 10.0);
-	if ( ! item->itemText.defaultStyle().charStyle().isInhBaselineOffset())
-		docu.writeAttribute("TXTBASE",item->itemText.defaultStyle().charStyle().baselineOffset() / 10.0);
-	if ( ! item->itemText.defaultStyle().charStyle().isInhShadowXOffset())
-		docu.writeAttribute("TXTSHX",item->itemText.defaultStyle().charStyle().shadowXOffset() / 10.0);
-	if ( ! item->itemText.defaultStyle().charStyle().isInhShadowYOffset())
-		docu.writeAttribute("TXTSHY",item->itemText.defaultStyle().charStyle().shadowYOffset() / 10.0);
-	if ( ! item->itemText.defaultStyle().charStyle().isInhOutlineWidth())
-		docu.writeAttribute("TXTOUT",item->itemText.defaultStyle().charStyle().outlineWidth() / 10.0);
-	if ( ! item->itemText.defaultStyle().charStyle().isInhUnderlineOffset())
-		docu.writeAttribute("TXTULP",item->itemText.defaultStyle().charStyle().underlineOffset() / 10.0);
-	if ( ! item->itemText.defaultStyle().charStyle().isInhUnderlineWidth())
-		docu.writeAttribute("TXTULW",item->itemText.defaultStyle().charStyle().underlineWidth() / 10.0);
-	if ( ! item->itemText.defaultStyle().charStyle().isInhStrikethruOffset())
-		docu.writeAttribute("TXTSTP",item->itemText.defaultStyle().charStyle().strikethruOffset() / 10.0);
-	if ( ! item->itemText.defaultStyle().charStyle().isInhStrikethruWidth())
-		docu.writeAttribute("TXTSTW",item->itemText.defaultStyle().charStyle().strikethruWidth() / 10.0);
-	if ( ! item->itemText.defaultStyle().charStyle().isInhTracking())
-		docu.writeAttribute("TXTKERN",item->itemText.defaultStyle().charStyle().tracking() / 10.0);
-	if ( ! item->itemText.defaultStyle().charStyle().isInhWordTracking())
-		docu.writeAttribute("wordTrack",item->itemText.defaultStyle().charStyle().wordTracking());
-	if ( ! item->itemText.defaultStyle().isInhMinWordTracking())
-		docu.writeAttribute("MinWordTrack", item->itemText.defaultStyle().minWordTracking());
-	if ( ! item->itemText.defaultStyle().isInhMinGlyphExtension())
-		docu.writeAttribute("MinGlyphShrink", item->itemText.defaultStyle().minGlyphExtension());
-	if ( ! item->itemText.defaultStyle().isInhMaxGlyphExtension())
-		docu.writeAttribute("MaxGlyphExtend", item->itemText.defaultStyle().maxGlyphExtension());
-	if ( ! item->itemText.defaultStyle().isInhOpticalMargins())
-		docu.writeAttribute("OpticalMargins", item->itemText.defaultStyle().opticalMargins());
-	if ( ! item->itemText.defaultStyle().isInhHyphenationMode())
-		docu.writeAttribute("HyphenationMode", item->itemText.defaultStyle().hyphenationMode());
-	if ( ! item->itemText.defaultStyle().isInhLeftMargin() )
-		docu.writeAttribute("leftMargin", item->itemText.defaultStyle().leftMargin());
-	if ( ! item->itemText.defaultStyle().isInhRightMargin())
-		docu.writeAttribute("rightMargin", item->itemText.defaultStyle().rightMargin());
-	if ( ! item->itemText.defaultStyle().isInhFirstIndent())
-		docu.writeAttribute("firstIndent", item->itemText.defaultStyle().firstIndent());
-	docu.writeAttribute("COLUMNS", item->columns());
-	docu.writeAttribute("COLGAP", item->columnGap());
-	docu.writeAttribute("NAMEDLST",item->NamedLStyle);
-	docu.writeAttribute("SHADE",item->fillShade());
-	docu.writeAttribute("SHADE2",item->lineShade());
 	docu.writeAttribute("GRTYP",item->GrType);
 	docu.writeAttribute("GRTYPS",item->GrTypeStroke);
 	docu.writeAttribute("ROT",item->rotation());
-	docu.writeAttribute("PLINEART",item->PLineArt);
-	docu.writeAttribute("PLINEEND", item->PLineEnd);
-	docu.writeAttribute("PLINEJOIN", item->PLineJoin);
-	if ( ! item->itemText.defaultStyle().isInhLineSpacing())
-		docu.writeAttribute("LINESP",item->itemText.defaultStyle().lineSpacing());
-	if ( ! item->itemText.defaultStyle().isInhLineSpacingMode())
-		docu.writeAttribute("LINESPMode", item->itemText.defaultStyle().lineSpacingMode());
-	docu.writeAttribute("LOCALSCX",item->imageXScale());
-	docu.writeAttribute("LOCALSCY",item->imageYScale());
-	docu.writeAttribute("LOCALX",item->imageXOffset());
-	docu.writeAttribute("LOCALY",item->imageYOffset());
-	docu.writeAttribute("LOCALROT" ,item->imageRotation());
-	docu.writeAttribute("PICART", item->imageShown() ? 1 : 0);
-	docu.writeAttribute("PLTSHOW", item->PoShow ? 1 : 0);
-	docu.writeAttribute("BASEOF", item->BaseOffs);
-	docu.writeAttribute("textPathType", item->textPathType);
-	docu.writeAttribute("textPathFlipped", static_cast<int>(item->textPathFlipped));
+	docu.writeAttribute("PRINTABLE", item->printEnabled() ? 1 : 0);
 	docu.writeAttribute("FLIPPEDH", item->imageFlippedH());
 	docu.writeAttribute("FLIPPEDV", item->imageFlippedV());
-/*	docu.writeAttribute("BBOXX",item->BBoxX);
-	docu.writeAttribute("BBOXH",item->BBoxH); */
-	if ( ! item->itemText.defaultStyle().charStyle().isInhFont())
-		docu.writeAttribute("IFONT",item->itemText.defaultStyle().charStyle().font().scName());
-	if ( ! item->itemText.defaultStyle().charStyle().isInhFontSize())
-		docu.writeAttribute("ISIZE",item->itemText.defaultStyle().charStyle().fontSize() / 10.0 );
-	docu.writeAttribute("SCALETYPE", item->ScaleType ? 1 : 0);
-	docu.writeAttribute("RATIO", item->AspectRatio ? 1 : 0);
-	docu.writeAttribute("PRINTABLE", item->printEnabled() ? 1 : 0);
+	if (!(item->isGroup() || item->isSymbol()))
+	{
+		docu.writeAttribute("PWIDTH",item->lineWidth());
+		docu.writeAttribute("PCOLOR",item->fillColor());
+		docu.writeAttribute("PCOLOR2",item->lineColor());
+		docu.writeAttribute("NAMEDLST",item->NamedLStyle);
+		docu.writeAttribute("SHADE",item->fillShade());
+		docu.writeAttribute("SHADE2",item->lineShade());
+		docu.writeAttribute("PLINEART",item->PLineArt);
+		docu.writeAttribute("PLINEEND", item->PLineEnd);
+		docu.writeAttribute("PLINEJOIN", item->PLineJoin);
+	}
+	if (item->asRegularPolygon())
+	{
+		PageItem_RegularPolygon *regitem = item->asRegularPolygon();
+		docu.writeAttribute("POLYC", regitem->polyCorners);
+		docu.writeAttribute("POLYF", regitem->polyFactor);
+		docu.writeAttribute("POLYR", regitem->polyRotation);
+		docu.writeAttribute("POLYIR", regitem->polyInnerRot);
+		docu.writeAttribute("POLYCUR", regitem->polyCurvature);
+		docu.writeAttribute("POLYOCUR", regitem->polyOuterCurvature);
+		docu.writeAttribute("POLYFD", regitem->polyFactorGuiVal);
+		docu.writeAttribute("POLYS", static_cast<int>(regitem->polyUseFactor));
+	}
 	if(item->isAnnotation())
 	{
 		docu.writeAttribute("ANNOTATION",1);
@@ -1924,12 +1874,90 @@
 	docu.writeAttribute("TEXTFLOW" , item->textFlowAroundObject() ? 1 : 0);
 	docu.writeAttribute("TEXTFLOW2", item->textFlowUsesBoundingBox() ? 1 : 0);
 	docu.writeAttribute("TEXTFLOW3", item->textFlowUsesContourLine() ? 1 : 0);
-	docu.writeAttribute("AUTOTEXT", item->isAutoText ? 1 : 0);
-	docu.writeAttribute("EXTRA",item->textToFrameDistLeft());
-	docu.writeAttribute("TEXTRA",item->textToFrameDistTop());
-	docu.writeAttribute("BEXTRA",item->textToFrameDistBottom());
-	docu.writeAttribute("REXTRA",item->textToFrameDistRight());
-	docu.writeAttribute("FLOP",item->firstLineOffset()); // here I think this FLOP "cher à mon cœur" is legitimate!
+	if (item->asTextFrame() || item->asPathText() || item->asImageFrame())
+	{
+		docu.writeAttribute("LOCALSCX",item->imageXScale());
+		docu.writeAttribute("LOCALSCY",item->imageYScale());
+		docu.writeAttribute("LOCALX",item->imageXOffset());
+		docu.writeAttribute("LOCALY",item->imageYOffset());
+		docu.writeAttribute("LOCALROT" ,item->imageRotation());
+		docu.writeAttribute("PICART", item->imageShown() ? 1 : 0);
+		docu.writeAttribute("SCALETYPE", item->ScaleType ? 1 : 0);
+		docu.writeAttribute("RATIO", item->AspectRatio ? 1 : 0);
+		if ( ! item->itemText.defaultStyle().charStyle().isInhFillColor())
+			docu.writeAttribute("TXTFILL",item->itemText.defaultStyle().charStyle().fillColor());
+		if ( ! item->itemText.defaultStyle().charStyle().isInhStrokeColor())
+			docu.writeAttribute("TXTSTROKE",item->itemText.defaultStyle().charStyle().strokeColor());
+		if ( ! item->itemText.defaultStyle().charStyle().isInhStrokeShade())
+			docu.writeAttribute("TXTSTRSH",item->itemText.defaultStyle().charStyle().strokeShade());
+		if ( ! item->itemText.defaultStyle().charStyle().isInhFillShade())
+			docu.writeAttribute("TXTFILLSH",item->itemText.defaultStyle().charStyle().fillShade());
+		if ( ! item->itemText.defaultStyle().charStyle().isInhScaleH())
+			docu.writeAttribute("TXTSCALE",item->itemText.defaultStyle().charStyle().scaleH() / 10.0);
+		if ( ! item->itemText.defaultStyle().charStyle().isInhScaleV())
+			docu.writeAttribute("TXTSCALEV",item->itemText.defaultStyle().charStyle().scaleV() / 10.0);
+		if ( ! item->itemText.defaultStyle().charStyle().isInhBaselineOffset())
+			docu.writeAttribute("TXTBASE",item->itemText.defaultStyle().charStyle().baselineOffset() / 10.0);
+		if ( ! item->itemText.defaultStyle().charStyle().isInhShadowXOffset())
+			docu.writeAttribute("TXTSHX",item->itemText.defaultStyle().charStyle().shadowXOffset() / 10.0);
+		if ( ! item->itemText.defaultStyle().charStyle().isInhShadowYOffset())
+			docu.writeAttribute("TXTSHY",item->itemText.defaultStyle().charStyle().shadowYOffset() / 10.0);
+		if ( ! item->itemText.defaultStyle().charStyle().isInhOutlineWidth())
+			docu.writeAttribute("TXTOUT",item->itemText.defaultStyle().charStyle().outlineWidth() / 10.0);
+		if ( ! item->itemText.defaultStyle().charStyle().isInhUnderlineOffset())
+			docu.writeAttribute("TXTULP",item->itemText.defaultStyle().charStyle().underlineOffset() / 10.0);
+		if ( ! item->itemText.defaultStyle().charStyle().isInhUnderlineWidth())
+			docu.writeAttribute("TXTULW",item->itemText.defaultStyle().charStyle().underlineWidth() / 10.0);
+		if ( ! item->itemText.defaultStyle().charStyle().isInhStrikethruOffset())
+			docu.writeAttribute("TXTSTP",item->itemText.defaultStyle().charStyle().strikethruOffset() / 10.0);
+		if ( ! item->itemText.defaultStyle().charStyle().isInhStrikethruWidth())
+			docu.writeAttribute("TXTSTW",item->itemText.defaultStyle().charStyle().strikethruWidth() / 10.0);
+		if ( ! item->itemText.defaultStyle().charStyle().isInhTracking())
+			docu.writeAttribute("TXTKERN",item->itemText.defaultStyle().charStyle().tracking() / 10.0);
+		if ( ! item->itemText.defaultStyle().charStyle().isInhWordTracking())
+			docu.writeAttribute("wordTrack",item->itemText.defaultStyle().charStyle().wordTracking());
+		if ( ! item->itemText.defaultStyle().isInhMinWordTracking())
+			docu.writeAttribute("MinWordTrack", item->itemText.defaultStyle().minWordTracking());
+		if ( ! item->itemText.defaultStyle().isInhMinGlyphExtension())
+			docu.writeAttribute("MinGlyphShrink", item->itemText.defaultStyle().minGlyphExtension());
+		if ( ! item->itemText.defaultStyle().isInhMaxGlyphExtension())
+			docu.writeAttribute("MaxGlyphExtend", item->itemText.defaultStyle().maxGlyphExtension());
+		if ( ! item->itemText.defaultStyle().isInhOpticalMargins())
+			docu.writeAttribute("OpticalMargins", item->itemText.defaultStyle().opticalMargins());
+		if ( ! item->itemText.defaultStyle().isInhHyphenationMode())
+			docu.writeAttribute("HyphenationMode", item->itemText.defaultStyle().hyphenationMode());
+		if ( ! item->itemText.defaultStyle().isInhLeftMargin() )
+			docu.writeAttribute("leftMargin", item->itemText.defaultStyle().leftMargin());
+		if ( ! item->itemText.defaultStyle().isInhRightMargin())
+			docu.writeAttribute("rightMargin", item->itemText.defaultStyle().rightMargin());
+		if ( ! item->itemText.defaultStyle().isInhFirstIndent())
+			docu.writeAttribute("firstIndent", item->itemText.defaultStyle().firstIndent());
+		if ( ! item->itemText.defaultStyle().isInhLineSpacing())
+			docu.writeAttribute("LINESP",item->itemText.defaultStyle().lineSpacing());
+		if ( ! item->itemText.defaultStyle().isInhLineSpacingMode())
+			docu.writeAttribute("LINESPMode", item->itemText.defaultStyle().lineSpacingMode());
+		if ( ! item->itemText.defaultStyle().charStyle().isInhFont())
+			docu.writeAttribute("IFONT",item->itemText.defaultStyle().charStyle().font().scName());
+		if ( ! item->itemText.defaultStyle().charStyle().isInhFontSize())
+			docu.writeAttribute("ISIZE",item->itemText.defaultStyle().charStyle().fontSize() / 10.0 );
+		if ( ! item->itemText.defaultStyle().charStyle().isInhLanguage())
+			docu.writeAttribute("LANGUAGE", item->itemText.defaultStyle().charStyle().language());
+	}
+	if (item->asTextFrame() || item->asPathText())
+	{
+		docu.writeAttribute("COLUMNS", item->columns());
+		docu.writeAttribute("COLGAP", item->columnGap());
+		docu.writeAttribute("AUTOTEXT", item->isAutoText ? 1 : 0);
+		docu.writeAttribute("EXTRA",item->textToFrameDistLeft());
+		docu.writeAttribute("TEXTRA",item->textToFrameDistTop());
+		docu.writeAttribute("BEXTRA",item->textToFrameDistBottom());
+		docu.writeAttribute("REXTRA",item->textToFrameDistRight());
+		docu.writeAttribute("FLOP",item->firstLineOffset()); // here I think this FLOP "cher à mon cœur" is legitimate!
+		docu.writeAttribute("PLTSHOW", item->PoShow ? 1 : 0);
+		docu.writeAttribute("BASEOF", item->BaseOffs);
+		docu.writeAttribute("textPathType", item->textPathType);
+		docu.writeAttribute("textPathFlipped", static_cast<int>(item->textPathFlipped));
+	}
 #ifdef HAVE_OSG
 	if (((item->asImageFrame() && !(item->asLatexFrame() || item->asOSGFrame())) || (item->asTextFrame())) && (!item->Pfile.isEmpty()))
 #else
@@ -2056,8 +2084,6 @@
 		colp += tmp.setNum(xf) + " " + tmpy.setNum(yf) + " ";
 	}
 	docu.writeAttribute("COCOOR", colp);
-	if ( ! item->itemText.defaultStyle().charStyle().isInhLanguage())
-		docu.writeAttribute("LANGUAGE", item->itemText.defaultStyle().charStyle().language());
 	if (item->asLine() || item->asPolyLine())
 	{
 		docu.writeAttribute("startArrowIndex", item->startArrowIndex());

Modified: branches/ScribusOIF/scribus/plugins/import/xar/importxar.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/plugins/import/xar/importxar.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/import/xar/importxar.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/import/xar/importxar.cpp Sun Jan  2 11:27:21 2011
@@ -1622,7 +1622,7 @@
 	if (flags & 1)
 		path.addEllipse(QPointF(0,0), w, h);
 	else
-		path = RegularPolygon(w * 2, h * 2, numSides, flags & 2, r1, 45, 0);
+		path = RegularPolygonPath(w * 2, h * 2, numSides, flags & 2, r1, 45, 0);
 	Coords.fromQPainterPath(path);
 	if (!(flags & 1))
 		Coords.translate(-w, -h);
@@ -2845,7 +2845,7 @@
 	if (ellipse)
 		path.addEllipse(QPointF(majorAxis, minorAxis), majorAxis, minorAxis);
 	else
-		path = RegularPolygon(majorAxis, minorAxis, 4, false, 0, 45, 0);
+		path = RegularPolygonPath(majorAxis, minorAxis, 4, false, 0, 45, 0);
 	Coords.fromQPainterPath(path);
 	Coords.translate(-majorAxis / 2.0, -minorAxis / 2.0);
 	Coords.translate(centerX, -centerY);

Modified: branches/ScribusOIF/scribus/plugins/svgexplugin/svgexplugin.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/plugins/svgexplugin/svgexplugin.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/svgexplugin/svgexplugin.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/svgexplugin/svgexplugin.cpp Sun Jan  2 11:27:21 2011
@@ -379,6 +379,7 @@
 	{
 		case PageItem::Polygon:
 		case PageItem::PolyLine:
+		case PageItem::RegularPolygon:
 			ob = processPolyItem(Item, trans, fill, stroke);
 			if ((Item->lineColor() != CommonStrings::None) && ((Item->startArrowIndex() != 0) || (Item->endArrowIndex() != 0)))
 				ob = processArrows(Item, ob, trans);
@@ -514,7 +515,7 @@
 {
 	bool closedPath;
 	QDomElement ob;
-	if (Item->itemType() == PageItem::Polygon)
+	if ((Item->itemType() == PageItem::Polygon) || (Item->itemType() == PageItem::RegularPolygon))
 		closedPath = true;
 	else
 		closedPath = false;
@@ -1206,6 +1207,7 @@
 		{
 			case PageItem::Polygon:
 			case PageItem::PolyLine:
+			case PageItem::RegularPolygon:
 				obE = processPolyItem(embedded, trans, fill, stroke);
 				if ((embedded->lineColor() != CommonStrings::None) && ((embedded->startArrowIndex() != 0) || (embedded->endArrowIndex() != 0)))
 					obE = processArrows(embedded, obE, trans);

Modified: branches/ScribusOIF/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortion.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortion.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortion.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortion.cpp Sun Jan  2 11:27:21 2011
@@ -79,6 +79,7 @@
 	m_actionInfo.notSuitableFor.append(PageItem::PathText);
 	m_actionInfo.notSuitableFor.append(PageItem::LatexFrame);
 	m_actionInfo.notSuitableFor.append(PageItem::Symbol);
+	m_actionInfo.notSuitableFor.append(PageItem::RegularPolygon);
 	m_actionInfo.needsNumObjects = 3;
 }
 

Modified: branches/ScribusOIF/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp Sun Jan  2 11:27:21 2011
@@ -80,6 +80,7 @@
 	m_actionInfo.notSuitableFor.append(PageItem::PathText);
 	m_actionInfo.notSuitableFor.append(PageItem::LatexFrame);
 	m_actionInfo.notSuitableFor.append(PageItem::Symbol);
+	m_actionInfo.notSuitableFor.append(PageItem::RegularPolygon);
 	m_actionInfo.forAppMode.append(modeNormal);
 	m_actionInfo.needsNumObjects = 2;
 	m_actionInfo.firstObjectType.append(PageItem::PolyLine);

Modified: branches/ScribusOIF/scribus/plugins/tools/lenseffects/lenseffects.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/plugins/tools/lenseffects/lenseffects.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/tools/lenseffects/lenseffects.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/tools/lenseffects/lenseffects.cpp Sun Jan  2 11:27:21 2011
@@ -76,6 +76,7 @@
 	m_actionInfo.notSuitableFor.append(PageItem::PathText);
 	m_actionInfo.notSuitableFor.append(PageItem::LatexFrame);
 	m_actionInfo.notSuitableFor.append(PageItem::Symbol);
+	m_actionInfo.notSuitableFor.append(PageItem::RegularPolygon);
 	m_actionInfo.needsNumObjects = 3;
 }
 

Modified: branches/ScribusOIF/scribus/plugins/tools/pathconnect/pathconnect.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/plugins/tools/pathconnect/pathconnect.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/tools/pathconnect/pathconnect.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/tools/pathconnect/pathconnect.cpp Sun Jan  2 11:27:21 2011
@@ -78,6 +78,7 @@
 	m_actionInfo.notSuitableFor.append(PageItem::PathText);
 	m_actionInfo.notSuitableFor.append(PageItem::LatexFrame);
 	m_actionInfo.notSuitableFor.append(PageItem::Symbol);
+	m_actionInfo.notSuitableFor.append(PageItem::RegularPolygon);
 	m_actionInfo.needsNumObjects = 2;
 }
 

Modified: branches/ScribusOIF/scribus/plugins/tools/pathcut/pathcut.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/plugins/tools/pathcut/pathcut.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/tools/pathcut/pathcut.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/tools/pathcut/pathcut.cpp Sun Jan  2 11:27:21 2011
@@ -84,6 +84,7 @@
 	m_actionInfo.notSuitableFor.append(PageItem::PathText);
 	m_actionInfo.notSuitableFor.append(PageItem::LatexFrame);
 	m_actionInfo.notSuitableFor.append(PageItem::Symbol);
+	m_actionInfo.notSuitableFor.append(PageItem::RegularPolygon);
 	m_actionInfo.forAppMode.append(modeNormal);
 	m_actionInfo.needsNumObjects = 2;
 	m_actionInfo.firstObjectType.append(PageItem::PolyLine);

Modified: branches/ScribusOIF/scribus/plugins/tools/pathfinder/pathfinder.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/plugins/tools/pathfinder/pathfinder.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/tools/pathfinder/pathfinder.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/tools/pathfinder/pathfinder.cpp Sun Jan  2 11:27:21 2011
@@ -91,6 +91,7 @@
 	m_actionInfo.notSuitableFor.append(PageItem::PathText);
 	m_actionInfo.notSuitableFor.append(PageItem::LatexFrame);
 	m_actionInfo.notSuitableFor.append(PageItem::Symbol);
+	m_actionInfo.notSuitableFor.append(PageItem::RegularPolygon);
 	m_actionInfo.needsNumObjects = 2;
 }
 

Modified: branches/ScribusOIF/scribus/plugins/tools/pathstroker/pathstroker.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/plugins/tools/pathstroker/pathstroker.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/tools/pathstroker/pathstroker.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/tools/pathstroker/pathstroker.cpp Sun Jan  2 11:27:21 2011
@@ -85,6 +85,7 @@
 	m_actionInfo.notSuitableFor.append(PageItem::PathText);
 	m_actionInfo.notSuitableFor.append(PageItem::LatexFrame);
 	m_actionInfo.notSuitableFor.append(PageItem::Symbol);
+	m_actionInfo.notSuitableFor.append(PageItem::RegularPolygon);
 	m_actionInfo.forAppMode.append(modeNormal);
 	m_actionInfo.needsNumObjects = 1;
 }

Modified: branches/ScribusOIF/scribus/prefsmanager.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/prefsmanager.cpp
==============================================================================
--- branches/ScribusOIF/scribus/prefsmanager.cpp (original)
+++ branches/ScribusOIF/scribus/prefsmanager.cpp Sun Jan  2 11:27:21 2011
@@ -267,7 +267,9 @@
 	appPrefs.itemToolPrefs.polyUseFactor = false;
 	appPrefs.itemToolPrefs.polyFactorGuiVal = 0;
 	appPrefs.itemToolPrefs.polyRotation = 0.0;
+	appPrefs.itemToolPrefs.polyInnerRot = 0.0;
 	appPrefs.itemToolPrefs.polyCurvature = 0.0;
+	appPrefs.itemToolPrefs.polyOuterCurvature = 0.0;
 //	appPrefs.PSize = 40;
 	appPrefs.printerPrefs.ClipMargin = false;
 	appPrefs.printerPrefs.GCRMode = false;
@@ -1465,8 +1467,10 @@
 	dcItemTools.setAttribute("PolygonCorners", appPrefs.itemToolPrefs.polyCorners);
 	dcItemTools.setAttribute("PolygonFactor", ScCLocale::toQStringC(appPrefs.itemToolPrefs.polyFactor));
 	dcItemTools.setAttribute("PolygonRotation", ScCLocale::toQStringC(appPrefs.itemToolPrefs.polyRotation));
+	dcItemTools.setAttribute("PolygonInnerRotation", ScCLocale::toQStringC(appPrefs.itemToolPrefs.polyInnerRot));
 	dcItemTools.setAttribute("PolygonFactorGUI", appPrefs.itemToolPrefs.polyFactorGuiVal);
 	dcItemTools.setAttribute("PolygonCurvature", ScCLocale::toQStringC(appPrefs.itemToolPrefs.polyCurvature));
+	dcItemTools.setAttribute("PolygonOuterCurvature", ScCLocale::toQStringC(appPrefs.itemToolPrefs.polyOuterCurvature));
 	dcItemTools.setAttribute("PolygonUseFactor", static_cast<int>(appPrefs.itemToolPrefs.polyUseFactor));
 	dcItemTools.setAttribute("ImageScaleType", static_cast<int>(appPrefs.itemToolPrefs.imageScaleType));
 	dcItemTools.setAttribute("ImageAspectRatio", static_cast<int>(appPrefs.itemToolPrefs.imageAspectRatio));
@@ -2049,7 +2053,9 @@
 			appPrefs.itemToolPrefs.polyCorners = dc.attribute("PolygonCorners", "4").toInt();
 			appPrefs.itemToolPrefs.polyFactor = ScCLocale::toDoubleC(dc.attribute("PolygonFactor"), 0.5);
 			appPrefs.itemToolPrefs.polyRotation = ScCLocale::toDoubleC(dc.attribute("PolygonRotation"), 0.0);
+			appPrefs.itemToolPrefs.polyInnerRot = ScCLocale::toDoubleC(dc.attribute("PolygonInnerRotation"), 0.0);
 			appPrefs.itemToolPrefs.polyCurvature = ScCLocale::toDoubleC(dc.attribute("PolygonCurvature"), 0.0);
+			appPrefs.itemToolPrefs.polyOuterCurvature = ScCLocale::toDoubleC(dc.attribute("PolygonOuterCurvature"), 0.0);
 			appPrefs.itemToolPrefs.polyFactorGuiVal = dc.attribute("PolygonFactorGUI", "0").toInt();
 			appPrefs.itemToolPrefs.polyUseFactor  = static_cast<bool>(dc.attribute("PolygonUseFactor", "0").toInt());
 			appPrefs.itemToolPrefs.lineStartArrow = dc.attribute("LineStartArrow", "0").toInt();

Modified: branches/ScribusOIF/scribus/prefsstructs.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/prefsstructs.h
==============================================================================
--- branches/ScribusOIF/scribus/prefsstructs.h (original)
+++ branches/ScribusOIF/scribus/prefsstructs.h Sun Jan  2 11:27:21 2011
@@ -205,7 +205,9 @@
 	double polyFactor; //! Convex/Concave factor as a double
 	bool polyUseFactor; //! Whether to use a factor for shaping
 	double polyRotation; //! Rotation of a polygon
+	double polyInnerRot; //! Rotation of the inner points of a star
 	double polyCurvature; //! Curvature of polygon
+	double polyOuterCurvature; //! outer Curvature of polygon
 	/* Image Tool */
 	QString imageFillColor; //! Default fill color of an image frame
 	int imageFillColorShade; //! Default shade of fill color of an image grame

Modified: branches/ScribusOIF/scribus/pslib.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/pslib.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pslib.cpp (original)
+++ branches/ScribusOIF/scribus/pslib.cpp Sun Jan  2 11:27:21 2011
@@ -2009,6 +2009,7 @@
 		case PageItem::ItemType1:
 		case PageItem::ItemType3:
 		case PageItem::Polygon:
+		case PageItem::RegularPolygon:
 			if ((c->fillColor() != CommonStrings::None) || (c->GrType != 0))
 			{
 				SetClipPath(&c->PoLine);
@@ -2613,7 +2614,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/scpageoutput.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/scpageoutput.cpp
==============================================================================
--- branches/ScribusOIF/scribus/scpageoutput.cpp (original)
+++ branches/ScribusOIF/scribus/scpageoutput.cpp Sun Jan  2 11:27:21 2011
@@ -619,6 +619,7 @@
 			case PageItem::PathText:
 			case PageItem::Symbol:
 			case PageItem::Group:
+			case PageItem::RegularPolygon:
 				drawItem(embedded, p, clip);
 				break;
 			case PageItem::Line:

Modified: branches/ScribusOIF/scribus/scribus.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/scribus.cpp
==============================================================================
--- branches/ScribusOIF/scribus/scribus.cpp (original)
+++ branches/ScribusOIF/scribus/scribus.cpp Sun Jan  2 11:27:21 2011
@@ -2945,8 +2945,8 @@
 //		scrActions["itemSendToScrapbook"]->setEnabled(true);
 		scrMenuMgr->setMenuEnabled("itemSendToScrapbook", true);
 		scrActions["itemSendToPattern"]->setEnabled(true);
-		scrActions["itemAdjustFrameToImage"]->setEnabled(true);
-		scrActions["itemAdjustImageToFrame"]->setEnabled(true);
+		scrActions["itemAdjustFrameToImage"]->setEnabled(false);
+		scrActions["itemAdjustImageToFrame"]->setEnabled(false);
 		scrActions["itemExtendedImageProperties"]->setEnabled(false);
 		scrActions["itemUpdateImage"]->setEnabled(false);
 		scrActions["itemPreviewLow"]->setEnabled(false);
@@ -2963,6 +2963,15 @@
 			scrActions["itemConvertToPolygon"]->setEnabled(false);
 			scrActions["itemConvertToTextFrame"]->setEnabled(doc->appMode != modeEdit);
 		}
+		if (SelectedType == PageItem::RegularPolygon) //Polygon
+		{
+			scrMenuMgr->setMenuEnabled("ItemConvertTo", true);
+			scrActions["itemConvertToBezierCurve"]->setEnabled(doc->appMode != modeEdit);
+			scrActions["itemConvertToImageFrame"]->setEnabled(doc->appMode != modeEdit);
+			scrActions["itemConvertToOutlines"]->setEnabled(false);
+			scrActions["itemConvertToPolygon"]->setEnabled(doc->appMode != modeEdit);
+			scrActions["itemConvertToTextFrame"]->setEnabled(doc->appMode != modeEdit);
+		}
 		else if (SelectedType == PageItem::PolyLine) //Polyline
 		{
 			scrMenuMgr->setMenuEnabled("ItemConvertTo", true);
@@ -2972,7 +2981,7 @@
 			scrActions["itemConvertToPolygon"]->setEnabled(doc->appMode != modeEdit);
 			scrActions["itemConvertToTextFrame"]->setEnabled(false);
 		}
-		else if (SelectedType == PageItem::PolyLine) // Line
+		else if (SelectedType == PageItem::Line) // Line
 		{
 			scrMenuMgr->setMenuEnabled("ItemConvertTo", true);
 			scrActions["itemConvertToBezierCurve"]->setEnabled(true);
@@ -3103,7 +3112,7 @@
 			scrActions["itemDuplicate"]->setEnabled(setter);
 			scrActions["itemMulDuplicate"]->setEnabled(setter);
 			scrActions["itemTransform"]->setEnabled(setter);
-			scrActions["itemDelete"]->setEnabled(!currItem->isSingleSel);
+			scrActions["itemDelete"]->setEnabled(true);
 			scrActions["itemLowerToBottom"]->setEnabled(setter);
 			scrActions["itemRaiseToTop"]->setEnabled(setter);
 			scrActions["itemRaise"]->setEnabled(setter);
@@ -3726,7 +3735,14 @@
 		{
 			delete fileLoader;
 			qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
-			QMessageBox::critical(this, tr("Fatal Error"), "<qt>"+ tr("File %1 is not in an acceptable format").arg(FName)+"</qt>", CommonStrings::tr_OK);
+			QString title = tr("Fatal Error") ;
+			QString msg = "<qt>"+ tr("File %1 is not in an acceptable format").arg(FName)+"</qt>";
+			QString infoMsg = "<qt>" + tr("The file may be damaged or may have been produced in a later version of Scribus.") + "</qt>";
+			QMessageBox msgBox(QMessageBox::Critical, title, msg, QMessageBox::Ok | QMessageBox::Help, this);
+			msgBox.setInformativeText(infoMsg);
+			int i=msgBox.exec();
+			if (i==QMessageBox::Help)
+					slotOnlineHelp("", "fileproblems.html");
 			return false;
 		}
 		bool is12doc=false;
@@ -5339,11 +5355,27 @@
 	dia.exec();
 }
 
-void ScribusMainWindow::slotOnlineHelp()
-{
-	helpBrowser = new HelpBrowser(0, tr("Scribus Manual"), ScCore->getGuiLanguage());
-	connect(helpBrowser, SIGNAL(closed()), this, SLOT(slotOnlineHelpClosed()));
-	helpBrowser->show();
+void ScribusMainWindow::slotOnlineHelp(const QString & jumpToSection, const QString & jumpToFile)
+{
+	if (!helpBrowser)
+	{
+		helpBrowser = new HelpBrowser(0, tr("Scribus Manual"), ScCore->getGuiLanguage(), jumpToSection, jumpToFile);
+		connect(helpBrowser, SIGNAL(closed()), this, SLOT(slotOnlineHelpClosed()));
+	}
+	else //just set the requested page
+	{
+		if (!jumpToSection.isNull() || !jumpToFile.isNull())
+		{
+			helpBrowser->jumpToHelpSection(jumpToSection, jumpToFile, true);
+		}
+	}
+	slotRaiseOnlineHelp();
+}
+
+void ScribusMainWindow::slotRaiseOnlineHelp()
+{
+	if (helpBrowser)
+		helpBrowser->show();
 }
 
 void ScribusMainWindow::slotOnlineHelpClosed()
@@ -7784,8 +7816,9 @@
 		pagePalette->rebuildPages();
 	}
 }
-void ScribusMainWindow::ShowSubs()
-{
+int ScribusMainWindow::ShowSubs()
+{
+	bool showGSHelp=false;
 	if (!ScCore->haveGS())
 	{
 		QMessageBox mb(this);
@@ -7796,14 +7829,18 @@
 #else
 		msg2 += tr("Until this is remedied, you cannot import EPS images or use PostScript Print Preview. ")+"\n";
 #endif
-		msg2 += tr("Please read our <a href=\"http://wiki.scribus.net/index.php/Ghostscript\">help and installation instructions</a>.") + "</qt>";
+		//msg2 += tr("Please read our <a href=\"http://wiki.scribus.net/index.php/Ghostscript\">help and installation instructions</a>.") + "</qt>";
+		msg2 += tr("Click the Help button read Scribus-related Ghostscript help and installation instructions.") + "</qt>";
 		QMessageBox msgBox;
 		msgBox.addButton(QMessageBox::Ok);
+		msgBox.addButton(QMessageBox::Help);
 		msgBox.setIcon(QMessageBox::Warning);
 		msgBox.setWindowTitle( tr("Ghostscript is missing") );
 		msgBox.setText(msg);
 		msgBox.setInformativeText(msg2);
-		msgBox.exec();
+		int i=msgBox.exec();
+		if (i==QMessageBox::Help)
+			showGSHelp=true;
 	}
 
 	framePropsPalette->startup();
@@ -7830,7 +7867,15 @@
 
 	activateWindow();
 	if (!scriptIsRunning())
+	{
 		raise();
+		if (showGSHelp)
+		{
+			slotOnlineHelp("", "toolbox5.html");
+			return QMessageBox::Help;
+		}
+	}
+	return 0;
 }
 
 void ScribusMainWindow::doPrintPreview()
@@ -8881,24 +8926,7 @@
 			view->SelectItemNr(itemNr);
 	}
 	if (isUndo)
-	{
-		uint docSelectionCount=doc->m_Selection->count();
-		PageItem *currItem;
-		uint lowestItem = 999999;
-		for (uint a=0; a<docSelectionCount; ++a)
-		{
-			currItem = doc->m_Selection->itemAt(a);
-			lowestItem = qMin(lowestItem, currItem->ItemNr);
-		}
-		if ((lowestItem > 0) && (doc->Items->at(lowestItem-1)->Groups.count() != 0))
-		{
-			if (doc->Items->at(lowestItem-1)->Groups.top() == doc->m_Selection->itemAt(0)->Groups.top())
-			{
-				view->SelectItemNr(lowestItem-1);
-			}
-		}
 		UnGroupObj();
-	}
 	else
 		GroupObj(false);
 }
@@ -8920,24 +8948,7 @@
 	if (isUndo)
 		GroupObj(false);
 	else
-	{
-		uint docSelectionCount=doc->m_Selection->count();
-		PageItem *currItem;
-		uint lowestItem = 999999;
-		for (uint a=0; a<docSelectionCount; ++a)
-		{
-			currItem = doc->m_Selection->itemAt(a);
-			lowestItem = qMin(lowestItem, currItem->ItemNr);
-		}
-		if ((lowestItem > 0) && (doc->Items->at(lowestItem-1)->Groups.count() != 0))
-		{
-			if (doc->Items->at(lowestItem-1)->Groups.top() == doc->m_Selection->itemAt(0)->Groups.top())
-			{
-				view->SelectItemNr(lowestItem-1);
-			}
-		}
 		UnGroupObj();
-	}
 }
 
 void ScribusMainWindow::StatusPic()

Modified: branches/ScribusOIF/scribus/scribus.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/scribus.h
==============================================================================
--- branches/ScribusOIF/scribus/scribus.h (original)
+++ branches/ScribusOIF/scribus/scribus.h Sun Jan  2 11:27:21 2011
@@ -148,7 +148,7 @@
 	QVariant inputMethodQuery ( Qt::InputMethodQuery query ) const ;
 	void requestUpdate(int);
 	void setTBvals(PageItem *currItem);
-	void ShowSubs();
+	int ShowSubs();
 	void applyNewMaster(QString name);
 	void updateRecent(QString fn);
 	void doPasteRecent(QString data);
@@ -369,7 +369,8 @@
 	void slotHelpAboutPlugins();
     void slotHelpAboutQt();
 	void slotHelpCheckUpdates();
-	void slotOnlineHelp();
+	void slotRaiseOnlineHelp();
+	void slotOnlineHelp(const QString & jumpToSection=QString::null, const QString & jumpToFile=QString::null);
 	void slotOnlineHelpClosed();
 	void ToggleTips();
 	void ToggleMouseTips();
@@ -648,7 +649,7 @@
 	PrefsManager *prefsManager;
 	FormatsManager *formatsManager;
 
-	HelpBrowser* helpBrowser;
+	QPointer<HelpBrowser> helpBrowser;
 };
 
 #endif

Modified: branches/ScribusOIF/scribus/scribuscore.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/scribuscore.cpp
==============================================================================
--- branches/ScribusOIF/scribus/scribuscore.cpp (original)
+++ branches/ScribusOIF/scribus/scribuscore.cpp Sun Jan  2 11:27:21 2011
@@ -117,20 +117,27 @@
 	connect(ScQApp, SIGNAL(lastWindowClosed()), ScQApp, SLOT(quit()));
 
 	scribus->show();
-	scribus->ShowSubs();
-
-	if (!m_Files.isEmpty())
-	{
-		for (int i = 0; i < m_Files.size(); ++i)
-			scribus->loadDoc(m_Files.at(i));
-	}
-	else
-	{
-		if (PrefsManager::instance()->appPrefs.uiPrefs.showStartupDialog)
-			scribus->startUpDialog();
+	int subsRet=scribus->ShowSubs();
+	if (subsRet==0)
+	{
+		if (!m_Files.isEmpty())
+		{
+			for (int i = 0; i < m_Files.size(); ++i)
+				scribus->loadDoc(m_Files.at(i));
+		}
 		else
-			scribus->setFocus();
-	}
+		{
+			if (PrefsManager::instance()->appPrefs.uiPrefs.showStartupDialog)
+				scribus->startUpDialog();
+			else
+				scribus->setFocus();
+		}
+	}
+	else if (subsRet==QMessageBox::Help)
+	{
+		scribus->slotRaiseOnlineHelp();
+	}
+
 	qApp->setOverrideCursor(QCursor(Qt::ArrowCursor));
 
 	// A hook for plugins and scripts to trigger on. Some plugins and scripts

Modified: branches/ScribusOIF/scribus/scribusdoc.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/scribusdoc.cpp
==============================================================================
--- branches/ScribusOIF/scribus/scribusdoc.cpp (original)
+++ branches/ScribusOIF/scribus/scribusdoc.cpp Sun Jan  2 11:27:21 2011
@@ -58,6 +58,7 @@
 #endif
 #include "pageitem_symbol.h"
 #include "pageitem_group.h"
+#include "pageitem_regularpolygon.h"
 #include "ui/pagepalette.h"
 #include "pagesize.h"
 #include "pagestructs.h"
@@ -1443,24 +1444,7 @@
 			tmpSelection.addItem(Items->at(itemNr));
 	}
 	if (isUndo)
-	{
-		uint docSelectionCount=tmpSelection.count();
-		PageItem *currItem;
-		uint lowestItem = 999999;
-		for (uint a=0; a<docSelectionCount; ++a)
-		{
-			currItem = tmpSelection.itemAt(a);
-			lowestItem = qMin(lowestItem, currItem->ItemNr);
-		}
-		if ((lowestItem > 0) && (Items->at(lowestItem-1)->Groups.count() != 0))
-		{
-			if (Items->at(lowestItem-1)->Groups.top() == tmpSelection.itemAt(0)->Groups.top())
-			{
-				tmpSelection.addItem(Items->at(lowestItem-1), true);
-			}
-		}
 		itemSelection_UnGroupObjects(&tmpSelection);
-	}
 	else
 		itemSelection_GroupObjects(false, false, &tmpSelection);
 	QRectF rect(x, y , w, h);
@@ -1490,24 +1474,7 @@
 	if (isUndo)
 		itemSelection_GroupObjects(false, false, &tmpSelection);
 	else
-	{
-		uint docSelectionCount=tmpSelection.count();
-		PageItem *currItem;
-		uint lowestItem = 999999;
-		for (uint a=0; a<docSelectionCount; ++a)
-		{
-			currItem = tmpSelection.itemAt(a);
-			lowestItem = qMin(lowestItem, currItem->ItemNr);
-		}
-		if ((lowestItem > 0) && (Items->at(lowestItem-1)->Groups.count() != 0))
-		{
-			if (Items->at(lowestItem-1)->Groups.top() == tmpSelection.itemAt(0)->Groups.top())
-			{
-				tmpSelection.addItem(Items->at(lowestItem-1));
-			}
-		}
 		itemSelection_UnGroupObjects(&tmpSelection);
-	}
 	QRectF rect(x, y , w, h);
 	regionsChanged()->update(rect.adjusted(-10, -10, 20, 20));
 	m_Selection->delaySignalsOff();
@@ -3048,7 +3015,7 @@
 		for (int c = 0; c < pp.count(); c++)
 		{
 			if (!results.contains(pp[c]))
-				results.append(pp[c]);
+				results.prepend(pp[c]);
 		}
 		if (patternStack.count() == 0)
 			break;
@@ -4048,6 +4015,10 @@
 			newItem = new PageItem_Group(this, x, y, b, h, w, CommonStrings::None, CommonStrings::None);
 			Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Unspecified);
 			break;
+		case PageItem::RegularPolygon:
+			newItem = new PageItem_RegularPolygon(this, x, y, b, h, w, fill, outline);
+			Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Ellipse || frameType==PageItem::Unspecified);
+			break;
 		default:
 //			qDebug() << "unknown item type";
 			assert (false);
@@ -4277,6 +4248,7 @@
 			break;
 		case PageItem::Symbol:
 		case PageItem::Group:
+		case PageItem::RegularPolygon:
 			newItem->ClipEdited = true;
 			newItem->FrameType = 3;
 		//At this point, we cannot create a PathText item like this, only by conversion, do nothing
@@ -4304,12 +4276,12 @@
 	}
 
 	//ItemType Polygon
-	if (itemType==PageItem::Polygon || itemType==PageItem::PolyLine)
+	if (itemType==PageItem::Polygon || itemType==PageItem::PolyLine || itemType == PageItem::RegularPolygon)
 	{
 		newItem->PLineArt = Qt::PenStyle(docPrefsData.itemToolPrefs.shapeLineStyle);
 		newItem->setFillShade(docPrefsData.itemToolPrefs.shapeFillColorShade);
 		newItem->setLineShade(docPrefsData.itemToolPrefs.shapeLineColorShade);
-		if (itemType == PageItem::Polygon)
+		if ((itemType == PageItem::Polygon) || (itemType == PageItem::RegularPolygon))
 			newItem->ContourLine = newItem->PoLine.copy();
 	}
 }
@@ -8292,7 +8264,7 @@
 				currItem->moveBy(ix-ix2, iy-iy2, true);
 				currItem->setRedrawBounding();
 			}
-			if ((currItem->itemType() == PageItem::ImageFrame) || (currItem->itemType() == PageItem::TextFrame) || (currItem->itemType() == PageItem::Symbol))
+			if (currItem->isImageFrame() || currItem->isTextFrame() || currItem->isLatexFrame() || currItem->isOSGFrame() || currItem->isSymbol() || currItem->isGroup())
 				currItem->flipImageH();
 			if (currItem->itemType() != PageItem::Line)
 				MirrorPolyH(currItem);
@@ -8308,7 +8280,7 @@
 		for (uint a = 0; a < docSelectionCount; ++a)
 		{
 			PageItem* currItem=m_Selection->itemAt(a);
-			if ((currItem->itemType() == PageItem::ImageFrame) || (currItem->itemType() == PageItem::TextFrame) || (currItem->itemType() == PageItem::Symbol))
+			if (currItem->isImageFrame() || currItem->isTextFrame() || currItem->isLatexFrame() || currItem->isOSGFrame() || currItem->isSymbol() || currItem->isGroup())
 				currItem->flipImageH();
 			if (currItem->itemType() != PageItem::Line)
 				MirrorPolyH(currItem);
@@ -8356,7 +8328,7 @@
 				currItem->moveBy(ix-ix2, iy-iy2, true);
 				currItem->setRedrawBounding();
 			}
-			if ((currItem->itemType() == PageItem::ImageFrame) || (currItem->itemType() == PageItem::TextFrame) || (currItem->itemType() == PageItem::Symbol))
+			if (currItem->isImageFrame() || currItem->isTextFrame() || currItem->isLatexFrame() || currItem->isOSGFrame() || currItem->isSymbol() || currItem->isGroup())
 				currItem->flipImageV();
 			if (currItem->itemType() != PageItem::Line)
 				MirrorPolyV(currItem);
@@ -8373,7 +8345,7 @@
 		for (uint a = 0; a < docSelectionCount; ++a)
 		{
 			PageItem* currItem=m_Selection->itemAt(a);
-			if ((currItem->itemType() == PageItem::ImageFrame) || (currItem->itemType() == PageItem::TextFrame) || (currItem->itemType() == PageItem::Symbol))
+			if (currItem->isImageFrame() || currItem->isTextFrame() || currItem->isLatexFrame() || currItem->isOSGFrame() || currItem->isSymbol() || currItem->isGroup())
 				currItem->flipImageV();
 			if (currItem->itemType() != PageItem::Line)
 				MirrorPolyV(currItem);
@@ -8611,6 +8583,25 @@
 	}
 }
 
+QList<PageItem*>* ScribusDoc::GroupOfItem(QList<PageItem*>* itemList, PageItem* item)
+{
+	if (itemList->contains(item))
+		return itemList;
+	else
+	{
+		for (int a = 0; a < itemList->count(); a++)
+		{
+			if (itemList->at(a)->isGroup())
+			{
+				QList<PageItem*>* ite = GroupOfItem(&itemList->at(a)->groupItemList, item);
+				if (ite != NULL)
+					return ite;
+			}
+		}
+		return NULL;
+	}
+	return NULL;
+}
 
 void ScribusDoc::itemSelection_DeleteItem(Selection* customSelection, bool forceDeletion)
 {
@@ -8624,6 +8615,7 @@
 	QList<PageItem*> delItems;
 	QList<PageItem*> textInteractionItems;// text frames possibly interested in removal of selected items
 	PageItem *currItem;
+	QList<PageItem*>* itemList = Items;
 	uint offs = 0;
 	QString tooltip = Um::ItemsInvolved + "\n";
 	if (selectedItemCount > Um::ItemsInvolvedLimit)
@@ -8632,10 +8624,23 @@
 	for (uint de = 0; de < selectedItemCount; ++de)
 	{
 		currItem = itemSelection->itemAt(offs);
-		if ((((currItem->isSingleSel) && (currItem->Groups.count() != 0)) || ((currItem->isSingleSel) && (currItem->isTableItem))) || (currItem->locked()))
-		{
-			offs++;
-			continue;
+		if ((((currItem->isSingleSel) && (!Items->contains(currItem))) || ((currItem->isSingleSel) && (currItem->isTableItem))) || (currItem->locked()))
+		{
+			if (currItem->locked())
+			{
+				offs++;
+				continue;
+			}
+			else
+			{
+				itemList = GroupOfItem(Items, currItem);
+				if (itemList == NULL)
+				{
+					itemList = Items;
+					offs++;
+					continue;
+				}
+			}
 		}
 		//CB FIXME remove this and include of storyeditor.h too
 		if ((currItem->asTextFrame() || currItem->asPathText()) && currItem==m_ScMW->storyEditor->currentItem() && this==m_ScMW->storyEditor->currentDocument())
@@ -8705,7 +8710,7 @@
 		if (currItem->isBookmark)
 			//CB From view   emit DelBM(currItem);
 			m_ScMW->DelBookMark(currItem);
-		Items->removeAll(currItem);
+		itemList->removeAll(currItem);
 //		if (forceDeletion || !UndoManager::undoEnabled())
 		if (forceDeletion)
 			delete currItem;

Modified: branches/ScribusOIF/scribus/scribusdoc.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/scribusdoc.h
==============================================================================
--- branches/ScribusOIF/scribus/scribusdoc.h (original)
+++ branches/ScribusOIF/scribus/scribusdoc.h Sun Jan  2 11:27:21 2011
@@ -915,6 +915,7 @@
 	bool sendItemSelectionToBack();
 	bool bringItemSelectionToFront();
 
+	QList<PageItem*>* GroupOfItem(QList<PageItem*>* itemList, PageItem* item);
 	PageItem* groupObjectsSelection(Selection* customSelection=0);
 	PageItem* groupObjectsList(QList<PageItem*> &itemList);
 	void groupObjectsToItem(PageItem* groupItem, QList<PageItem*> &itemList);

Modified: branches/ScribusOIF/scribus/scribusview.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/scribusview.cpp
==============================================================================
--- branches/ScribusOIF/scribus/scribusview.cpp (original)
+++ branches/ScribusOIF/scribus/scribusview.cpp Sun Jan  2 11:27:21 2011
@@ -1796,7 +1796,7 @@
 	}
 	if (draw)
 	{
-		if (Doc->m_Selection->count() > 1)
+		if (Doc->m_Selection->count() > 0)
 		{
 			Doc->m_Selection->setGroupRect();
 			double x, y, w, h;

Modified: branches/ScribusOIF/scribus/ui/about.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/ui/about.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/about.cpp (original)
+++ branches/ScribusOIF/scribus/ui/about.cpp Sun Jan  2 11:27:21 2011
@@ -114,7 +114,7 @@
 	buildID = new QLabel( tab );
 	buildID->setAlignment(Qt::AlignCenter);
 	buildID->setTextInteractionFlags(Qt::TextSelectableByMouse);
-	QString BUILD_DAY = "18";
+	QString BUILD_DAY = "31";
 	QString BUILD_MONTH = CommonStrings::december;
 	QString BUILD_YEAR = "2010";
 	QString BUILD_TIME = "";

Modified: branches/ScribusOIF/scribus/ui/cpalette.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/ui/cpalette.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/cpalette.cpp (original)
+++ branches/ScribusOIF/scribus/ui/cpalette.cpp Sun Jan  2 11:27:21 2011
@@ -291,7 +291,7 @@
 	else
 		strokeModeCombo->setCurrentIndex(0);
 	setMeshPoint();
-	editMeshColors->setEnabled(true);
+	editMeshColors->setEnabled(!CGradDia->isVisible());
 	gradEditButton->setEnabled(true);
 
 	double patternScaleX, patternScaleY, patternOffsetX, patternOffsetY, patternRotation, patternSkewX, patternSkewY, patternSpace;

Modified: branches/ScribusOIF/scribus/ui/helpbrowser.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/ui/helpbrowser.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/helpbrowser.cpp (original)
+++ branches/ScribusOIF/scribus/ui/helpbrowser.cpp Sun Jan  2 11:27:21 2011
@@ -489,11 +489,10 @@
 		textBrowser->setUrl( QUrl::fromLocalFile(mHistory[i].url) );
 }
 
-void HelpBrowser::jumpToHelpSection(const QString& jumpToSection, const QString& jumpToFile)
+void HelpBrowser::jumpToHelpSection(const QString& jumpToSection, const QString& jumpToFile, bool dontChangeIfAlreadyLoaded)
 {
 	QString toLoad;
 	bool noDocs=false;
-
 	if (jumpToFile.isEmpty())
 	{
 		toLoad = finalBaseDir + "/"; //clean this later to handle 5 char locales
@@ -514,12 +513,14 @@
 		}
 	}
 	else
-		toLoad=jumpToFile;
-
+	{
+		toLoad=ScPaths::instance().docDir() + language + "/" + jumpToFile;
+	}
 	if (!noDocs)
 		loadHelp(toLoad);
 	else
-		displayNoHelp();
+		if (!dontChangeIfAlreadyLoaded)
+			displayNoHelp();
 }
 
 void HelpBrowser::loadHelp(const QString& filename)

Modified: branches/ScribusOIF/scribus/ui/helpbrowser.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/ui/helpbrowser.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/helpbrowser.h (original)
+++ branches/ScribusOIF/scribus/ui/helpbrowser.h Sun Jan  2 11:27:21 2011
@@ -85,6 +85,9 @@
 	
 	static bool firstRun;
 
+public slots:
+	void jumpToHelpSection(const QString& jumpToSection, const QString& jumpToFile="", bool dontChangeIfAlreadyLoaded=false);
+
 protected:
 	void closeEvent(QCloseEvent * event);
 
@@ -137,7 +140,6 @@
 protected slots:
 	virtual void languageChange();
 	void histChosen(QAction* i);
-	void jumpToHelpSection(const QString& jumpToSection, const QString& jumpToFile="");
 	void loadHelp(const QString& filename);
 	void loadMenu();
 //	void showLinkContents(const QString &link);

Modified: branches/ScribusOIF/scribus/ui/modetoolbar.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/ui/modetoolbar.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/modetoolbar.cpp (original)
+++ branches/ScribusOIF/scribus/ui/modetoolbar.cpp Sun Jan  2 11:27:21 2011
@@ -123,9 +123,12 @@
 
 void ModeToolBar::GetPolyProps()
 {
-	PolygonProps* dia = new PolygonProps(this, m_ScMW->doc->itemToolPrefs().polyCorners, m_ScMW->doc->itemToolPrefs().polyFactorGuiVal, m_ScMW->doc->itemToolPrefs().polyFactor, m_ScMW->doc->itemToolPrefs().polyUseFactor, m_ScMW->doc->itemToolPrefs().polyRotation, m_ScMW->doc->itemToolPrefs().polyCurvature);
+	PolygonProps* dia = new PolygonProps(this, m_ScMW->doc->itemToolPrefs().polyCorners, m_ScMW->doc->itemToolPrefs().polyFactorGuiVal, m_ScMW->doc->itemToolPrefs().polyFactor, m_ScMW->doc->itemToolPrefs().polyUseFactor, m_ScMW->doc->itemToolPrefs().polyRotation, m_ScMW->doc->itemToolPrefs().polyCurvature, m_ScMW->doc->itemToolPrefs().polyInnerRot);
 	if (dia->exec())
-		dia->getValues(&m_ScMW->doc->itemToolPrefs().polyCorners, &m_ScMW->doc->itemToolPrefs().polyFactorGuiVal, &m_ScMW->doc->itemToolPrefs().polyFactor, &m_ScMW->doc->itemToolPrefs().polyUseFactor, &m_ScMW->doc->itemToolPrefs().polyRotation, &m_ScMW->doc->itemToolPrefs().polyCurvature);
+	{
+		dia->getValues(&m_ScMW->doc->itemToolPrefs().polyCorners, &m_ScMW->doc->itemToolPrefs().polyFactorGuiVal, &m_ScMW->doc->itemToolPrefs().polyFactor, &m_ScMW->doc->itemToolPrefs().polyUseFactor, &m_ScMW->doc->itemToolPrefs().polyRotation, &m_ScMW->doc->itemToolPrefs().polyCurvature, &m_ScMW->doc->itemToolPrefs().polyInnerRot);
+		m_ScMW->scrActions["toolsInsertPolygon"]->trigger();
+	}
 	delete dia;
 }
 

Modified: branches/ScribusOIF/scribus/ui/outlinepalette.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/ui/outlinepalette.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/outlinepalette.cpp (original)
+++ branches/ScribusOIF/scribus/ui/outlinepalette.cpp Sun Jan  2 11:27:21 2011
@@ -128,6 +128,7 @@
 							tipText = CommonStrings::itemType_Line;
  							break;
  						case PageItem::Polygon:
+						case PageItem::RegularPolygon:
 							tipText = CommonStrings::itemType_Polygon;
  							break;
  						case PageItem::PolyLine:
@@ -488,6 +489,7 @@
 		item->setIcon( 0, lineIcon );
 		break;
 	case PageItem::Polygon:
+	case PageItem::RegularPolygon:
 		item->setIcon( 0, polygonIcon );
 		break;
 	case PageItem::PolyLine:

Modified: branches/ScribusOIF/scribus/ui/polygonwidget.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/ui/polygonwidget.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/polygonwidget.cpp (original)
+++ branches/ScribusOIF/scribus/ui/polygonwidget.cpp Sun Jan  2 11:27:21 2011
@@ -28,10 +28,10 @@
 }
 
 
-PolygonWidget::PolygonWidget(QWidget* parent, int polyCorners, int polyFd, double polyF, bool polyUseConvexFactor, double polyRotation, double polyCurvature) : QWidget( parent )
+PolygonWidget::PolygonWidget(QWidget* parent, int polyCorners, int polyFd, double polyF, bool polyUseConvexFactor, double polyRotation, double polyCurvature, double polyInnerRot) : QWidget( parent )
 {
 	setupUi(this);
-	setValues(polyCorners, polyFd, polyF, polyUseConvexFactor, polyRotation, polyCurvature);
+	setValues(polyCorners, polyFd, polyF, polyUseConvexFactor, polyRotation, polyCurvature, polyInnerRot);
 	updatePreview();
 	// signals and slots connections
 	connectSignals(true);
@@ -53,6 +53,9 @@
 		connect(curvatureSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setCurvatureSlider(int)));
 		connect(curvatureSlider, SIGNAL(valueChanged(int)), curvatureSpinBox, SLOT(setValue(int)));
 		connect(curvatureSlider, SIGNAL(valueChanged(int)), this, SLOT(updatePreview()));
+		connect(innerRotationSlider, SIGNAL(valueChanged(int)), innerRotationspinBox, SLOT(setValue(int)));
+		connect(innerRotationSlider, SIGNAL(valueChanged(int)), this, SLOT(updatePreview()));
+		connect(innerRotationspinBox, SIGNAL(valueChanged(int)), this, SLOT(setInnerRotationSlider(int)));
 	}
 	else
 	{
@@ -67,6 +70,9 @@
 		disconnect(curvatureSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setCurvatureSlider(int)));
 		disconnect(curvatureSlider, SIGNAL(valueChanged(int)), curvatureSpinBox, SLOT(setValue(int)));
 		disconnect(curvatureSlider, SIGNAL(valueChanged(int)), this, SLOT(updatePreview()));
+		disconnect(innerRotationSlider, SIGNAL(valueChanged(int)), innerRotationspinBox, SLOT(setValue(int)));
+		disconnect(innerRotationSlider, SIGNAL(valueChanged(int)), this, SLOT(updatePreview()));
+		disconnect(innerRotationspinBox, SIGNAL(valueChanged(int)), this, SLOT(setInnerRotationSlider(int)));
 	}
 }
 
@@ -84,6 +90,8 @@
 	applyConvexGroupBox->setChecked(prefsData->polyUseFactor);
 	curvatureSpinBox->setValue(qRound(prefsData->polyCurvature * 100));
 	curvatureSlider->setValue(qRound(prefsData->polyCurvature * 100));
+	innerRotationspinBox->setValue(static_cast<int>(prefsData->polyInnerRot));
+	innerRotationSlider->setValue(static_cast<int>(prefsData->polyInnerRot));
 	updatePreview();
 	connectSignals(true);
 }
@@ -95,15 +103,18 @@
 	prefsData->polyUseFactor = applyConvexGroupBox->isChecked();
 	prefsData->polyFactorGuiVal = factorSlider->value();
 	prefsData->polyRotation = rotationSpinBox->value();
+	prefsData->polyInnerRot = innerRotationspinBox->value();
 	prefsData->polyCurvature = curvatureSpinBox->value() / 100.0;
 }
 
-void PolygonWidget::setValues(int polyCorners, int polyFd, double polyF, bool polyUseConvexFactor, double polyRotation, double polyCurvature)
+void PolygonWidget::setValues(int polyCorners, int polyFd, double polyF, bool polyUseConvexFactor, double polyRotation, double polyCurvature, double polyInnerRot)
 {
 	PFactor = polyF;
 	cornersSpinBox->setValue(polyCorners);
 	rotationSpinBox->setValue(static_cast<int>(polyRotation));
 	rotationSlider->setValue(static_cast<int>(polyRotation));
+	innerRotationspinBox->setValue(static_cast<int>(polyInnerRot));
+	innerRotationSlider->setValue(static_cast<int>(polyInnerRot));
 	applyConvexGroupBox->setChecked(polyUseConvexFactor);
 	factorSpinBox->setValue(polyFd);
 	factorSlider->setValue(polyFd);
@@ -112,13 +123,14 @@
 	curvatureSlider->setValue(qRound(polyCurvature * 100));
 }
 
-void PolygonWidget::getValues(int* polyCorners, int* polyFd, double* polyF, bool* polyUseConvexFactor, double* polyRotation, double* polyCurvature)
+void PolygonWidget::getValues(int* polyCorners, int* polyFd, double* polyF, bool* polyUseConvexFactor, double* polyRotation, double* polyCurvature, double* polyInnerRot)
 {
 	*polyCorners = cornersSpinBox->value();
 	*polyF = PFactor;
 	*polyUseConvexFactor = applyConvexGroupBox->isChecked();
 	*polyFd = factorSlider->value();
 	*polyRotation = rotationSpinBox->value();
+	*polyInnerRot = innerRotationspinBox->value();
 	*polyCurvature = curvatureSpinBox->value() / 100.0;
 }
 
@@ -134,6 +146,13 @@
 	disconnect(rotationSlider, SIGNAL(valueChanged(int)), rotationSpinBox, SLOT(setValue(int)));
 	rotationSlider->setValue(a);
 	connect(rotationSlider, SIGNAL(valueChanged(int)), rotationSpinBox, SLOT(setValue(int)));
+}
+
+void PolygonWidget::setInnerRotationSlider(int a)
+{
+	disconnect(innerRotationSlider, SIGNAL(valueChanged(int)), innerRotationspinBox, SLOT(setValue(int)));
+	innerRotationSlider->setValue(a);
+	connect(innerRotationSlider, SIGNAL(valueChanged(int)), innerRotationspinBox, SLOT(setValue(int)));
 }
 
 void PolygonWidget::setCurvatureSlider(int a)
@@ -152,7 +171,7 @@
 	p.begin(&pm);
 	p.setBrush(Qt::NoBrush);
 	p.setPen(Qt::black);
-	QPainterPath pp = RegularPolygon(Preview->width() - 6, Preview->height() - 6, cornersSpinBox->value(), applyConvexGroupBox->isChecked(), GetFactor(), rotationSlider->value(), roundness);
+	QPainterPath pp = RegularPolygonPath(Preview->width() - 6, Preview->height() - 6, cornersSpinBox->value(), applyConvexGroupBox->isChecked(), GetFactor(), rotationSlider->value(), roundness, innerRotationspinBox->value());
 	QRectF br = pp.boundingRect();
 	if (br.x() < 0)
 	{

Modified: branches/ScribusOIF/scribus/ui/polygonwidget.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/ui/polygonwidget.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/polygonwidget.h (original)
+++ branches/ScribusOIF/scribus/ui/polygonwidget.h Sun Jan  2 11:27:21 2011
@@ -17,17 +17,18 @@
 
 	public:
 		PolygonWidget(QWidget* parent);
-		PolygonWidget(QWidget* parent, int polyCorners, int polyFd, double polyF, bool polyUseConvexFactor, double polyRotation, double polyCurvature);
+		PolygonWidget(QWidget* parent, int polyCorners, int polyFd, double polyF, bool polyUseConvexFactor, double polyRotation, double polyCurvature, double polyInnerRot);
 		~PolygonWidget() {};
 
-		void setValues(int polyCorners, int polyFd, double polyF, bool polyUseConvexFactor, double polyRotation, double polyCurvature);
-		void getValues(int* polyCorners, int* polyFd, double* polyF, bool* polyUseConvexFactor, double* polyRotation, double* polyCurvature);
+		void setValues(int polyCorners, int polyFd, double polyF, bool polyUseConvexFactor, double polyRotation, double polyCurvature, double polyInnerRot);
+		void getValues(int* polyCorners, int* polyFd, double* polyF, bool* polyUseConvexFactor, double* polyRotation, double* polyCurvature, double* polyInnerRot);
 		void restoreDefaults(struct ItemToolPrefs *prefsData);
 		void saveGuiToPrefs(struct ItemToolPrefs *prefsData);
 
 	protected slots:
 		void setFactorSlider(int a);
 		void setRotationSlider(int a);
+		void setInnerRotationSlider(int a);
 		void setCurvatureSlider(int a);
 		void updatePreview();
 		double GetZeroFactor();

Modified: branches/ScribusOIF/scribus/ui/polygonwidgetbase.ui
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/ui/polygonwidgetbase.ui
==============================================================================
--- branches/ScribusOIF/scribus/ui/polygonwidgetbase.ui (original)
+++ branches/ScribusOIF/scribus/ui/polygonwidgetbase.ui Sun Jan  2 11:27:21 2011
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>472</width>
-    <height>284</height>
+    <width>458</width>
+    <height>307</height>
    </rect>
   </property>
   <property name="sizePolicy">
@@ -22,9 +22,6 @@
   <layout class="QGridLayout" name="gridLayout_3">
    <item row="0" column="0">
     <layout class="QGridLayout" name="gridLayout">
-     <property name="spacing">
-      <number>5</number>
-     </property>
      <item row="0" column="0">
       <widget class="QLabel" name="label">
        <property name="text">
@@ -76,6 +73,39 @@
        <property name="toolTip">
         <string>Degrees of rotation for polygons</string>
        </property>
+       <property name="minimum">
+        <number>-180</number>
+       </property>
+       <property name="maximum">
+        <number>180</number>
+       </property>
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="tickPosition">
+        <enum>QSlider::TicksBelow</enum>
+       </property>
+      </widget>
+     </item>
+     <item row="3" column="0">
+      <widget class="QLabel" name="label_4">
+       <property name="text">
+        <string>Inner Rotation:</string>
+       </property>
+      </widget>
+     </item>
+     <item row="3" column="1">
+      <widget class="QSpinBox" name="innerRotationspinBox">
+       <property name="minimum">
+        <number>-180</number>
+       </property>
+       <property name="maximum">
+        <number>180</number>
+       </property>
+      </widget>
+     </item>
+     <item row="4" column="0" colspan="2">
+      <widget class="QSlider" name="innerRotationSlider">
        <property name="minimum">
         <number>-180</number>
        </property>
@@ -102,14 +132,14 @@
      </property>
      <property name="minimumSize">
       <size>
-       <width>260</width>
-       <height>260</height>
+       <width>280</width>
+       <height>280</height>
       </size>
      </property>
      <property name="maximumSize">
       <size>
-       <width>260</width>
-       <height>260</height>
+       <width>280</width>
+       <height>280</height>
       </size>
      </property>
      <property name="sizeIncrement">

Modified: branches/ScribusOIF/scribus/ui/polyprops.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/ui/polyprops.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/polyprops.cpp (original)
+++ branches/ScribusOIF/scribus/ui/polyprops.cpp Sun Jan  2 11:27:21 2011
@@ -14,7 +14,7 @@
 #include "commonstrings.h"
 #include "util_icon.h"
 
-PolygonProps::PolygonProps(QWidget* parent, int polyC, int polyFd, double polyF, bool polyS, double polyR, double polyCurvature) : QDialog( parent )
+PolygonProps::PolygonProps(QWidget* parent, int polyC, int polyFd, double polyF, bool polyS, double polyR, double polyCurvature, double polyInnerRot) : QDialog( parent )
 {
 	setModal(true);
 	setWindowTitle( tr( "Polygon Properties" ) );
@@ -22,7 +22,7 @@
 	PolygonPropsLayout = new QVBoxLayout( this );
 	PolygonPropsLayout->setMargin(10);
 	PolygonPropsLayout->setSpacing(5);
-	polyWidget = new PolygonWidget(this, polyC, polyFd, polyF, polyS, polyR, polyCurvature);
+	polyWidget = new PolygonWidget(this, polyC, polyFd, polyF, polyS, polyR, polyCurvature, polyInnerRot);
 	PolygonPropsLayout->addWidget( polyWidget );
 	Layout1 = new QHBoxLayout;
 	Layout1->setMargin(0);
@@ -42,7 +42,7 @@
 	connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
 }
 
-void PolygonProps::getValues(int* polyC, int* polyFd, double* polyF, bool* polyS, double* polyR, double* polyCurvature)
+void PolygonProps::getValues(int* polyC, int* polyFd, double* polyF, bool* polyS, double* polyR, double* polyCurvature, double* polyInnerRot)
 {
-	polyWidget->getValues(polyC, polyFd, polyF, polyS, polyR, polyCurvature);
+	polyWidget->getValues(polyC, polyFd, polyF, polyS, polyR, polyCurvature, polyInnerRot);
 }

Modified: branches/ScribusOIF/scribus/ui/polyprops.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/ui/polyprops.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/polyprops.h (original)
+++ branches/ScribusOIF/scribus/ui/polyprops.h Sun Jan  2 11:27:21 2011
@@ -20,9 +20,9 @@
 	Q_OBJECT
 
 public:
-	PolygonProps(QWidget* parent, int polyC, int polyFd, double polyF, bool polyS, double polyR, double polyCurvature);
+	PolygonProps(QWidget* parent, int polyC, int polyFd, double polyF, bool polyS, double polyR, double polyCurvature, double polyInnerRot);
 	~PolygonProps() {};
-	void getValues(int* polyC, int* polyFd, double* polyF, bool* polyS, double* polyR, double* polyCurvature);
+	void getValues(int* polyC, int* polyFd, double* polyF, bool* polyS, double* polyR, double* polyCurvature, double* polyInnerRot);
 	PolygonWidget* polyWidget;
 	QPushButton* okButton;
 	QPushButton* cancelButton;

Modified: branches/ScribusOIF/scribus/ui/propertiespalette.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/ui/propertiespalette.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette.cpp Sun Jan  2 11:27:21 2011
@@ -589,6 +589,7 @@
 		case PageItem::ItemType1:
 		case PageItem::ItemType3:
 		case PageItem::Polygon:
+		case PageItem::RegularPolygon:
 			TabStack->setItemEnabled(idShapeItem, true);
 			TabStack->setItemEnabled(idTextItem, false);
 			TabStack->setItemEnabled(idImageItem, false);

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_shape.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/ui/propertiespalette_shape.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_shape.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_shape.cpp Sun Jan  2 11:27:21 2011
@@ -16,6 +16,8 @@
 #include "commonstrings.h"
 #include "sccolorengine.h"
 #include "pageitem_textframe.h"
+#include "pageitem_regularpolygon.h"
+#include "polyprops.h"
 #include "sccombobox.h"
 #include "scribus.h"
 #include "scribuscore.h"
@@ -202,7 +204,7 @@
 		if (itemType != -1)
 		{
 			editShape->setEnabled(!currItem->locked());
-			customShape->setEnabled(itemType != 5 && itemType!= 7 && itemType !=8 && !currItem->locked());
+			customShape->setEnabled(itemType != 5 && itemType!= 7 && itemType !=8 && itemType !=13 && !currItem->locked());
 		}
 		else
 		{
@@ -251,6 +253,7 @@
 		case PageItem::ItemType1:
 		case PageItem::ItemType3:
 		case PageItem::Polygon:
+		case PageItem::RegularPolygon:
 			setEnabled(true);
 			if ((!currItem->ClipEdited) && ((currItem->FrameType == 0) || (currItem->FrameType == 2)))
 				roundRect->setEnabled(!currItem->locked());
@@ -385,9 +388,25 @@
 	if ((m_haveDoc) && (m_haveItem))
 	{
 		m_tmpSelection->clear();
-		m_ScMW->view->requestMode(modeEditClip);
-		roundRect->setEnabled(false);
-		connect(m_ScMW->nodePalette, SIGNAL(paletteClosed()), this, SLOT(handleShapeEditEnded()));
+		if (m_item->asRegularPolygon())
+		{
+			PageItem_RegularPolygon* item = m_item->asRegularPolygon();
+			PolygonProps* dia = new PolygonProps(m_ScMW, item->polyCorners, item->polyFactorGuiVal, item->polyFactor, item->polyUseFactor, item->polyRotation, item->polyCurvature, item->polyInnerRot);
+			if (dia->exec())
+			{
+				dia->getValues(&item->polyCorners, &item->polyFactorGuiVal, &item->polyFactor, &item->polyUseFactor, &item->polyRotation, &item->polyCurvature, &item->polyInnerRot);
+				item->recalcPath();
+			}
+			delete dia;
+			m_item->update();
+			emit DocChanged();
+		}
+		else
+		{
+			m_ScMW->view->requestMode(modeEditClip);
+			roundRect->setEnabled(false);
+			connect(m_ScMW->nodePalette, SIGNAL(paletteClosed()), this, SLOT(handleShapeEditEnded()));
+		}
 	}
 }
 

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_xyz.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/ui/propertiespalette_xyz.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_xyz.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_xyz.cpp Sun Jan  2 11:27:21 2011
@@ -316,6 +316,11 @@
 		m_doc->m_Selection->getGroupRect(&selX, &selY, &selW, &selH);
 	displayXY(selX, selY);
 	displayWH(selW, selH);
+	
+	bool checkableFlip = (i->isImageFrame() || i->isTextFrame() || i->isLatexFrame() || i->isOSGFrame() || i->isSymbol() || i->isGroup());
+	flipH->setCheckable(checkableFlip);
+	flipV->setCheckable(checkableFlip);
+
 	noPrint->setChecked(!i->printEnabled());
 	displayFlippedH(i->imageFlippedH());
 	displayFlippedV(i->imageFlippedV());
@@ -472,15 +477,21 @@
 
 		//CB If Toggle is not possible, then we need to enable it so we can turn it off
 		//It then gets reset below for items where its valid
-		if ((itemType > 4) && (itemType < 9))
+		flipH->setCheckable(true);
+		flipV->setCheckable(true);
+		if ((itemType == 2) || (itemType == 4) || ((itemType >= 9) && (itemType <= 12)))
 		{
 			flipH->setCheckable(true);
 			flipV->setCheckable(true);
+		}
+		else
+		{
+			flipH->setCheckable(false);
+			flipV->setCheckable(false);
 			flipH->setChecked(false);
 			flipV->setChecked(false);
 		}
-		flipH->setCheckable((itemType >= 0) && (itemType < 5));
-		flipV->setCheckable((itemType >= 0) && (itemType < 5));
+		
 		//CB Why cant we do this for lines?
 //		flipH->setEnabled((itemType !=-1) && (itemType !=5));
 //		flipV->setEnabled((itemType !=-1) && (itemType !=5));

Modified: branches/ScribusOIF/scribus/ui/propertywidget_pos.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/ui/propertywidget_pos.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_pos.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_pos.cpp Sun Jan  2 11:27:21 2011
@@ -222,16 +222,23 @@
 		//CB If Toggle is not possible, then we need to enable it so we can turn it off
 		//It then gets reset below for items where its valid
 		int itemType = m_item->itemType();
-		if ((itemType > 4) && (itemType < 9))
-		{
-			flipH->setCheckable(true);
-			flipV->setCheckable(true);
+		
+		bool checkableFlip = false;
+		checkableFlip |= m_item->isImageFrame();
+		checkableFlip |= m_item->isTextFrame();
+		checkableFlip |= m_item->isLatexFrame();
+		checkableFlip |= m_item->isOSGFrame();
+		checkableFlip |= m_item->isSymbol();
+		checkableFlip |= m_item->isGroup();
+		flipH->setCheckable(checkableFlip);
+		flipV->setCheckable(checkableFlip);
+		
+		if (!checkableFlip)
+		{
 			flipH->setChecked(false);
 			flipV->setChecked(false);
 		}
-		flipH->setCheckable((itemType >= 0) && (itemType < 5));
-		flipV->setCheckable((itemType >= 0) && (itemType < 5));
-
+		
 		basePointWidget->setEnabled(true);
 
 		if (m_item->asOSGFrame())

Modified: branches/ScribusOIF/scribus/ui/propertywidget_shape.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/ui/propertywidget_shape.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_shape.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_shape.cpp Sun Jan  2 11:27:21 2011
@@ -16,6 +16,8 @@
 #include "commonstrings.h"
 #include "sccolorengine.h"
 #include "pageitem_textframe.h"
+#include "pageitem_regularpolygon.h"
+#include "polyprops.h"
 #include "sccombobox.h"
 #include "scribus.h"
 #include "scribuscore.h"
@@ -336,9 +338,25 @@
 	if (m_doc && m_item)
 	{
 		m_tmpSelection->clear();
-		m_ScMW->view->requestMode(modeEditClip);
-		roundRect->setEnabled(false);
-		connect(m_ScMW->nodePalette, SIGNAL(paletteClosed()), this, SLOT(handleShapeEditEnded()));
+		if (m_item->asRegularPolygon())
+		{
+			PageItem_RegularPolygon* item = m_item->asRegularPolygon();
+			PolygonProps* dia = new PolygonProps(m_ScMW, item->polyCorners, item->polyFactorGuiVal, item->polyFactor, item->polyUseFactor, item->polyRotation, item->polyCurvature, item->polyInnerRot);
+			if (dia->exec())
+			{
+				dia->getValues(&item->polyCorners, &item->polyFactorGuiVal, &item->polyFactor, &item->polyUseFactor, &item->polyRotation, &item->polyCurvature, &item->polyInnerRot);
+				item->recalcPath();
+			}
+			delete dia;
+			m_item->update();
+			emit DocChanged();
+		}
+		else
+		{
+			m_ScMW->view->requestMode(modeEditClip);
+			roundRect->setEnabled(false);
+			connect(m_ScMW->nodePalette, SIGNAL(paletteClosed()), this, SLOT(handleShapeEditEnded()));
+		}
 	}
 }
 

Modified: branches/ScribusOIF/scribus/util_math.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/util_math.cpp
==============================================================================
--- branches/ScribusOIF/scribus/util_math.cpp (original)
+++ branches/ScribusOIF/scribus/util_math.cpp Sun Jan  2 11:27:21 2011
@@ -65,7 +65,7 @@
 	return ret;
 }
 
-QPainterPath RegularPolygon(double w, double h, uint c, bool star, double factor, double rota, double factor2)
+QPainterPath RegularPolygonPath(double w, double h, uint c, bool star, double factor, double rota, double factor2, double innerRot)
 {
 	uint cx = star ? c * 2 : c;
 	double seg = 360.0 / cx;
@@ -87,6 +87,7 @@
 			{
 				wf *= di;
 				hf *= di;
+				sc += innerRot;
 			}
 			mx = sin(sc / 180.0 * M_PI) * (wf) + (w/2.0);
 			my = cos(sc / 180.0 * M_PI) * (hf) + (h/2.0);

Modified: branches/ScribusOIF/scribus/util_math.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/scribus/util_math.h
==============================================================================
--- branches/ScribusOIF/scribus/util_math.h (original)
+++ branches/ScribusOIF/scribus/util_math.h Sun Jan  2 11:27:21 2011
@@ -34,7 +34,7 @@
 FPoint SCRIBUS_API projectPointOnLine(FPoint p, QPointF lineStart, QPointF lineEnd);
 QPolygon SCRIBUS_API FlattenPath(const FPointArray& ina, QList<uint> &Segs);
 QList<QPainterPath> SCRIBUS_API decomposePath(QPainterPath &path);
-QPainterPath SCRIBUS_API RegularPolygon(double w, double h, uint c, bool star, double factor, double rota, double factor2 = 0.0);
+QPainterPath SCRIBUS_API RegularPolygonPath(double w, double h, uint c, bool star, double factor, double rota, double factor2 = 0.0, double innerRot = 0.0);
 uint SCRIBUS_API getDouble(QString in, bool raw);
 inline double SCRIBUS_API sind(double);
 inline double SCRIBUS_API cosd(double);

Modified: branches/ScribusOIF/win32/vc8/Scribus.vcproj
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16200&path=/branches/ScribusOIF/win32/vc8/Scribus.vcproj
==============================================================================
--- branches/ScribusOIF/win32/vc8/Scribus.vcproj (original)
+++ branches/ScribusOIF/win32/vc8/Scribus.vcproj Sun Jan  2 11:27:21 2011
@@ -1247,6 +1247,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\pageitem_regularpolygon.cpp"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\pageitem_symbol.cpp"
 				>
 			</File>
@@ -6428,6 +6432,38 @@
 				</FileConfiguration>
 			</File>
 			<File
+				RelativePath="..\..\scribus\pageitem_regularpolygon.h"
+				>
+				<FileConfiguration
+					Name="Debug-cairo|Win32"
+					>
+					<Tool
+						Name="moc.exe"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release-cairo|Win32"
+					>
+					<Tool
+						Name="moc.exe"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug-arthur|Win32"
+					>
+					<Tool
+						Name="moc.exe"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release-arthur|Win32"
+					>
+					<Tool
+						Name="moc.exe"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
 				RelativePath="..\..\scribus\pageitem_symbol.h"
 				>
 				<FileConfiguration
@@ -12810,6 +12846,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\moc_pageitem_regularpolygon.cpp"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\moc_pageitem_symbol.cpp"
 				>
 			</File>




More information about the scribus-commit mailing list