r16318 by jghali - merge trunk revisions up to r16317

scribus-commit scribus-commit at lists.scribus.net
Sat Jan 29 15:15:29 CET 2011


Author: jghali
Date: Sat Jan 29 14:15:28 2011
New Revision: 16318

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

Added:
    branches/ScribusOIF/resources/icons/16/draw-spiral.png
      - copied unchanged from r16317, trunk/Scribus/resources/icons/16/draw-spiral.png
    branches/ScribusOIF/resources/icons/22/draw-spiral.png
      - copied unchanged from r16317, trunk/Scribus/resources/icons/22/draw-spiral.png
    branches/ScribusOIF/scribus/canvasmode_editspiral.cpp
      - copied, changed from r16317, trunk/Scribus/scribus/canvasmode_editspiral.cpp
    branches/ScribusOIF/scribus/canvasmode_editspiral.h
      - copied, changed from r16317, trunk/Scribus/scribus/canvasmode_editspiral.h
    branches/ScribusOIF/scribus/pageitem_spiral.cpp
      - copied unchanged from r16317, trunk/Scribus/scribus/pageitem_spiral.cpp
    branches/ScribusOIF/scribus/pageitem_spiral.h
      - copied unchanged from r16317, trunk/Scribus/scribus/pageitem_spiral.h
    branches/ScribusOIF/scribus/ui/arcwidget.cpp
      - copied unchanged from r16317, trunk/Scribus/scribus/ui/arcwidget.cpp
    branches/ScribusOIF/scribus/ui/arcwidget.h
      - copied unchanged from r16317, trunk/Scribus/scribus/ui/arcwidget.h
    branches/ScribusOIF/scribus/ui/arcwidgetbase.ui
      - copied unchanged from r16317, trunk/Scribus/scribus/ui/arcwidgetbase.ui
    branches/ScribusOIF/scribus/ui/spiralvectorbase.ui
      - copied unchanged from r16317, trunk/Scribus/scribus/ui/spiralvectorbase.ui
    branches/ScribusOIF/scribus/ui/spiralvectordialog.cpp
      - copied unchanged from r16317, trunk/Scribus/scribus/ui/spiralvectordialog.cpp
    branches/ScribusOIF/scribus/ui/spiralvectordialog.h
      - copied unchanged from r16317, trunk/Scribus/scribus/ui/spiralvectordialog.h
    branches/ScribusOIF/scribus/ui/spiralwidget.cpp
      - copied unchanged from r16317, trunk/Scribus/scribus/ui/spiralwidget.cpp
    branches/ScribusOIF/scribus/ui/spiralwidget.h
      - copied unchanged from r16317, trunk/Scribus/scribus/ui/spiralwidget.h
    branches/ScribusOIF/scribus/ui/spiralwidgetbase.ui
      - copied unchanged from r16317, trunk/Scribus/scribus/ui/spiralwidgetbase.ui
Modified:
    branches/ScribusOIF/scribus/CMakeLists.txt
    branches/ScribusOIF/scribus/actionmanager.cpp
    branches/ScribusOIF/scribus/canvas.cpp
    branches/ScribusOIF/scribus/canvas.h
    branches/ScribusOIF/scribus/canvasgesture_resize.cpp
    branches/ScribusOIF/scribus/canvasmode.cpp
    branches/ScribusOIF/scribus/canvasmode_create.cpp
    branches/ScribusOIF/scribus/canvasmode_editarc.h
    branches/ScribusOIF/scribus/canvasmode_editpolygon.cpp
    branches/ScribusOIF/scribus/canvasmode_normal.cpp
    branches/ScribusOIF/scribus/pageitem.cpp
    branches/ScribusOIF/scribus/pageitem.h
    branches/ScribusOIF/scribus/pageitem_arc.cpp
    branches/ScribusOIF/scribus/pdflib_core.cpp
    branches/ScribusOIF/scribus/plugins/fileloader/scribus12format/scribus12format.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/svgexplugin/svgexplugin.cpp
    branches/ScribusOIF/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortion.cpp
    branches/ScribusOIF/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.cpp
    branches/ScribusOIF/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp
    branches/ScribusOIF/scribus/plugins/tools/lenseffects/lensdialog.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/scribus.cpp
    branches/ScribusOIF/scribus/scribusdoc.cpp
    branches/ScribusOIF/scribus/scribusstructs.h
    branches/ScribusOIF/scribus/scribusview.h
    branches/ScribusOIF/scribus/ui/about.cpp
    branches/ScribusOIF/scribus/ui/arcvectordialog.h
    branches/ScribusOIF/scribus/ui/modetoolbar.cpp
    branches/ScribusOIF/scribus/ui/outlinepalette.cpp
    branches/ScribusOIF/scribus/ui/prefs_itemtools.cpp
    branches/ScribusOIF/scribus/ui/prefs_itemtoolsbase.ui
    branches/ScribusOIF/scribus/ui/propertiespalette.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette_line.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette_shape.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette_xyz.cpp
    branches/ScribusOIF/scribus/ui/propertywidget_line.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/vc9/Scribus.vcproj

Modified: branches/ScribusOIF/scribus/CMakeLists.txt
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/CMakeLists.txt
==============================================================================
--- branches/ScribusOIF/scribus/CMakeLists.txt (original)
+++ branches/ScribusOIF/scribus/CMakeLists.txt Sat Jan 29 14:15:28 2011
@@ -68,6 +68,7 @@
   ui/aboutplugins.ui
   ui/aligndistribute.ui
   ui/arcvectorbase.ui
+  ui/arcwidgetbase.ui
   ui/charselect.ui
   ui/charselectenhanced.ui
   ui/cmsprefsbase.ui
@@ -146,6 +147,8 @@
   ui/smpstylewidget.ui
   ui/smreplacedia.ui
   ui/smstyleimport.ui
+  ui/spiralvectorbase.ui
+  ui/spiralwidgetbase.ui
   ui/stylemanager.ui
   ui/transformdialogbase.ui
   ui/transparencypalette.ui
@@ -167,6 +170,7 @@
   canvasmode_edit.h
   canvasmode_editarc.h
   canvasmode_editpolygon.h
+  canvasmode_editspiral.h
   canvasmode_measurements.h
   canvasmode_normal.h
   chartablemodel.h
@@ -199,6 +203,7 @@
   pageitem_polygon.h
   pageitem_polyline.h
   pageitem_regularpolygon.h
+  pageitem_spiral.h
   pageitem_symbol.h
   pageitem_textframe.h
   pageitempointer.h
@@ -238,6 +243,7 @@
   ui/annot.h
   ui/annota.h
   ui/applytemplatedialog.h
+  ui/arcwidget.h
   ui/arcvectordialog.h
   ui/arrowchooser.h
   ui/autoform.h
@@ -410,6 +416,8 @@
   ui/smtabruler.h
   ui/smtextstyles.h
   ui/spalette.h
+  ui/spiralvectordialog.h
+  ui/spiralwidget.h
   ui/storyeditor.h
   ui/stylemanager.h
   ui/styleselect.h
@@ -456,6 +464,7 @@
   canvasmode_editgradient.cpp
   canvasmode_editmeshgradient.cpp
   canvasmode_editpolygon.cpp
+  canvasmode_editspiral.cpp
   canvasmode_magnifier.cpp
   canvasmode_measurements.cpp
   canvasmode_nodeedit.cpp
@@ -524,6 +533,7 @@
   pageitem_polygon.cpp
   pageitem_polyline.cpp
   pageitem_regularpolygon.cpp
+  pageitem_spiral.cpp
   pageitem_symbol.cpp
   pageitem_textframe.cpp
   pageitempointer.cpp
@@ -637,6 +647,7 @@
   ui/annot.cpp
   ui/annota.cpp
   ui/applytemplatedialog.cpp
+  ui/arcwidget.cpp
   ui/arcvectordialog.cpp
   ui/arrowchooser.cpp
   ui/autoform.cpp
@@ -813,6 +824,8 @@
   ui/smtabruler.cpp
   ui/smtextstyles.cpp
   ui/spalette.cpp
+  ui/spiralvectordialog.cpp
+  ui/spiralwidget.cpp
   ui/splash.cpp
   ui/storyeditor.cpp
   ui/stylemanager.cpp

Modified: branches/ScribusOIF/scribus/actionmanager.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/actionmanager.cpp
==============================================================================
--- branches/ScribusOIF/scribus/actionmanager.cpp (original)
+++ branches/ScribusOIF/scribus/actionmanager.cpp Sat Jan 29 14:15:28 2011
@@ -710,6 +710,8 @@
 	scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/draw-polygon.png"), loadIcon("22/draw-polygon.png"), "", defaultKey(name), mainWindow, modeDrawRegularPolygon));
 	name="toolsInsertArc";
 	scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/draw-arc.png"), loadIcon("22/draw-arc.png"), "", defaultKey(name), mainWindow, modeDrawArc));
+	name="toolsInsertSpiral";
+	scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/draw-spiral.png"), loadIcon("22/draw-spiral.png"), "", defaultKey(name), mainWindow, modeDrawSpiral));
 	name="toolsInsertLine";
 	scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("Stift16.xpm"), loadIcon("Stift.xpm"), "", defaultKey(name), mainWindow, modeDrawLine));
 	name="toolsInsertBezier";
@@ -787,7 +789,7 @@
 	(*scrActions)["toolsToolbarPDF"]->setToggleAction(true);
 
 	*modeActionNames << "toolsSelect" << "toolsInsertTextFrame" << "toolsInsertImageFrame" << "toolsInsertTableFrame";
-	*modeActionNames << "toolsInsertShape" << "toolsInsertPolygon" << "toolsInsertArc" << "toolsInsertLine" << "toolsInsertBezier";
+	*modeActionNames << "toolsInsertShape" << "toolsInsertPolygon" << "toolsInsertArc" << "toolsInsertSpiral" << "toolsInsertLine" << "toolsInsertBezier";
 	*modeActionNames << "toolsInsertFreehandLine" << "toolsInsertCalligraphicLine" << "toolsInsertRenderFrame" << "toolsRotate" << "toolsZoom" << "toolsEditContents";
 	*modeActionNames << "toolsEditWithStoryEditor" << "toolsLinkTextFrame" << "toolsUnlinkTextFrame";
 	*modeActionNames << "toolsEyeDropper" << "toolsCopyProperties";
@@ -1480,6 +1482,7 @@
 	(*scrActions)["toolsInsertShape"]->setText( tr("Insert &Shape"));
 	(*scrActions)["toolsInsertPolygon"]->setText( tr("Insert &Polygon"));
 	(*scrActions)["toolsInsertArc"]->setText( tr("Insert Arc"));
+	(*scrActions)["toolsInsertSpiral"]->setText( tr("Insert Spiral"));
 	(*scrActions)["toolsInsertLine"]->setText( tr("Insert &Line"));
 	(*scrActions)["toolsInsertCalligraphicLine"]->setText( tr("Insert Calligraphic Line"));
 	(*scrActions)["toolsInsertBezier"]->setText( tr("Insert &Bezier Curve"));
@@ -1871,6 +1874,7 @@
 		<< "toolsInsertShape"
 		<< "toolsInsertPolygon"
 		<< "toolsInsertArc"
+		<< "toolsInsertSpiral"
 		<< "toolsInsertLine"
 		<< "toolsInsertBezier"
 		<< "toolsInsertFreehandLine"

Modified: branches/ScribusOIF/scribus/canvas.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/canvas.cpp
==============================================================================
--- branches/ScribusOIF/scribus/canvas.cpp (original)
+++ branches/ScribusOIF/scribus/canvas.cpp Sat Jan 29 14:15:28 2011
@@ -2170,6 +2170,13 @@
 	QToolTip::showText(m + QPoint(5, 5), tr("Angle: %1").arg(value2String(r, SC_DEGREES, true, true)), this);
 }
 
+void Canvas::displayRealRotHUD(QPoint m, double rot)
+{
+	if (!PrefsManager::instance()->appPrefs.displayPrefs.showMouseCoordinates)
+		return;
+	QToolTip::showText(m + QPoint(5, 5), tr("Angle: %1").arg(value2String(rot, SC_DEGREES, true, true)), this);
+}
+
 void Canvas::setupEditHRuler(PageItem * item, bool forceAndReset)
 {
 	static QString rulerItemRef;

Modified: branches/ScribusOIF/scribus/canvas.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/canvas.h
==============================================================================
--- branches/ScribusOIF/scribus/canvas.h (original)
+++ branches/ScribusOIF/scribus/canvas.h Sat Jan 29 14:15:28 2011
@@ -94,6 +94,7 @@
 	friend class CanvasMode_EditGradient;
 	friend class CanvasMode_EditMeshGradient;
 	friend class CanvasMode_EditPolygon;
+	friend class CanvasMode_EditSpiral;
 	friend class CanvasMode_EyeDropper;
 	friend class CanvasMode_FrameLinks;
 	friend class CanvasMode_Magnifier;
@@ -195,6 +196,7 @@
 	void displayXYHUD(QPoint m, double x, double y);
 	void displaySizeHUD(QPoint m, double x, double y, bool isLine = false);
 	void displayRotHUD(QPoint m, double rot);
+	void displayRealRotHUD(QPoint m, double rot);
 	
 	void setupEditHRuler(PageItem * item, bool forceAndReset = false);
 	

Modified: branches/ScribusOIF/scribus/canvasgesture_resize.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/canvasgesture_resize.cpp
==============================================================================
--- branches/ScribusOIF/scribus/canvasgesture_resize.cpp (original)
+++ branches/ScribusOIF/scribus/canvasgesture_resize.cpp Sat Jan 29 14:15:28 2011
@@ -30,6 +30,7 @@
 #include "selection.h"
 #include "undomanager.h"
 #include "pageitem_arc.h"
+#include "pageitem_spiral.h"
 #include "util_math.h"
 
 ResizeGesture::ResizeGesture (CanvasMode* parent) : CanvasGesture(parent)
@@ -322,6 +323,11 @@
 			currItem->PoLine.translate(-tp2.x(), -tp2.y());
 			m_doc->AdjustItemSize(currItem);
 		}
+		if (currItem->isSpiral())
+		{
+			PageItem_Spiral* item = currItem->asSpiral();
+			item->recalcPath();
+		}
 		// rotation does not change
 	}
 	m_origBounds = m_bounds;

Modified: branches/ScribusOIF/scribus/canvasmode.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/canvasmode.cpp
==============================================================================
--- branches/ScribusOIF/scribus/canvasmode.cpp (original)
+++ branches/ScribusOIF/scribus/canvasmode.cpp Sat Jan 29 14:15:28 2011
@@ -28,6 +28,7 @@
 #include "canvasmode_editgradient.h"
 #include "canvasmode_editmeshgradient.h"
 #include "canvasmode_editpolygon.h"
+#include "canvasmode_editspiral.h"
 #include "canvasmode_eyedropper.h"
 #include "canvasmode_framelinks.h"
 #include "canvasmode_magnifier.h"
@@ -139,6 +140,7 @@
 		case modeDrawTable:
 		case modeDrawRegularPolygon:
 		case modeDrawArc:
+		case modeDrawSpiral:
 		case modeInsertPDFButton:
 		case modeInsertPDFTextfield:
 		case modeInsertPDFCheckbox:
@@ -176,6 +178,9 @@
 			break;
 		case modeEditPolygon:
 			result = new CanvasMode_EditPolygon(view);
+			break;
+		case modeEditSpiral:
+			result = new CanvasMode_EditSpiral(view);
 			break;
 			// more modes as they are defined...
 			
@@ -551,6 +556,7 @@
 	{
 		case modeDrawShapes:
 		case modeDrawArc:
+		case modeDrawSpiral:
 			qApp->changeOverrideCursor(QCursor(loadIcon("DrawFrame.xpm")));
 			break;
 		case modeDrawImage:
@@ -604,6 +610,7 @@
 		case modeInsertPDF3DAnnotation:
 		case modeEditArc:
 		case modeEditPolygon:
+		case modeEditSpiral:
 			qApp->changeOverrideCursor(QCursor(Qt::CrossCursor));
 			break;
 		default:

Modified: branches/ScribusOIF/scribus/canvasmode_create.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/canvasmode_create.cpp
==============================================================================
--- branches/ScribusOIF/scribus/canvasmode_create.cpp (original)
+++ branches/ScribusOIF/scribus/canvasmode_create.cpp Sat Jan 29 14:15:28 2011
@@ -117,6 +117,12 @@
 			p->translate(localRect.left(), localRect.top());
 			p->drawPath(path);
 		}
+		else if (createObjectMode == modeDrawSpiral)
+		{
+			QPainterPath path = SpiralPath(localRect.width(), localRect.height(), m_doc->itemToolPrefs().spiralStartAngle, m_doc->itemToolPrefs().spiralEndAngle, m_doc->itemToolPrefs().spiralFactor);
+			p->translate(localRect.left(), localRect.top());
+			p->drawPath(path);
+		}
 		else if ((createObjectMode == modeDrawShapes) && (createObjectSubMode > 1))
 		{
 			FPointArray poly;
@@ -527,6 +533,10 @@
 		break;
 	case modeDrawArc:
 		itemType  = (int) PageItem::Arc;
+		frameType = (int) PageItem::Unspecified;
+		break;
+	case modeDrawSpiral:
+		itemType  = (int) PageItem::Spiral;
 		frameType = (int) PageItem::Unspecified;
 		break;
 	case modeInsertPDFButton:
@@ -664,6 +674,14 @@
 			z = m_doc->itemAddArea(PageItem::Arc, PageItem::Unspecified, Rxp, Ryp, m_doc->itemToolPrefs().shapeLineWidth, m_doc->itemToolPrefs().shapeFillColor, m_doc->itemToolPrefs().lineColor, true);
 		else
 			z = m_doc->itemAdd(PageItem::Arc, PageItem::Unspecified, Rxp, Ryp, Rxpd, Rypd, m_doc->itemToolPrefs().shapeLineWidth, m_doc->itemToolPrefs().shapeFillColor, m_doc->itemToolPrefs().lineColor, true);
+		m_doc->AdjustItemSize(m_doc->Items->at(z));
+		m_doc->setRedrawBounding(m_doc->Items->at(z));
+		break;
+	case modeDrawSpiral:
+		if (modifiers == Qt::ShiftModifier)
+			z = m_doc->itemAddArea(PageItem::Spiral, PageItem::Unspecified, Rxp, Ryp, m_doc->itemToolPrefs().shapeLineWidth, CommonStrings::None, m_doc->itemToolPrefs().lineColor, true);
+		else
+			z = m_doc->itemAdd(PageItem::Spiral, PageItem::Unspecified, Rxp, Ryp, Rxpd, Rypd, m_doc->itemToolPrefs().shapeLineWidth, CommonStrings::None, m_doc->itemToolPrefs().lineColor, true);
 		m_doc->AdjustItemSize(m_doc->Items->at(z));
 		m_doc->setRedrawBounding(m_doc->Items->at(z));
 		break;

Modified: branches/ScribusOIF/scribus/canvasmode_editarc.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/canvasmode_editarc.h
==============================================================================
--- branches/ScribusOIF/scribus/canvasmode_editarc.h (original)
+++ branches/ScribusOIF/scribus/canvasmode_editarc.h Sat Jan 29 14:15:28 2011
@@ -1,99 +1,99 @@
-/*
- For general Scribus (>=1.3.2) copyright and licensing information please refer
- to the COPYING file provided with the program. Following this notice may exist
- a copyright and/or license notice that predates the release of Scribus 1.3.2
- for which a new license (GPL+exception) is in place.
- */
-/***************************************************************************
-*                                                                         *
-*   This program is free software; you can redistribute it and/or modify  *
-*   it under the terms of the GNU General Public License as published by  *
-*   the Free Software Foundation; either version 2 of the License, or     *
-*   (at your option) any later version.                                   *
-*                                                                         *
-***************************************************************************/
-/***************************************************************************
-                 canvasmode_editarc.h  -  description
-                             -------------------
-    begin                : Tue Jan 4 2011
-    copyright            : (C) 2011 by Franz Schmid
-    email                : Franz.Schmid at altmuehlnet.de
- ***************************************************************************/
-
-#ifndef CANVAS_MODE_EDITARC_H
-#define CANVAS_MODE_EDITARC_H
-
-#include <QObject>
-#include <QTime>
-
-#include "canvasmode.h"
-#include "fpointarray.h"
-#include "ui/arcvectordialog.h"
-
-class PageItem;
-class ScribusMainWindow;
-class ScribusView;
-
-
-// This class encapsulate the old code for mouse interaction from scribusview.cpp
-
-class CanvasMode_EditArc :  public CanvasMode
-{	
-	Q_OBJECT
-public:
-	CanvasMode_EditArc(ScribusView* view);
-
-	virtual void enterEvent(QEvent *);
-	virtual void leaveEvent(QEvent *);
-	
-	virtual void activate(bool);
-	virtual void deactivate(bool);
-	virtual void mouseDoubleClickEvent(QMouseEvent *m);
-	virtual void mouseReleaseEvent(QMouseEvent *m);
-	virtual void mouseMoveEvent(QMouseEvent *m);
-	virtual void mousePressEvent(QMouseEvent *m);
-	virtual void drawControls(QPainter* p);
-	void drawControlsArc(QPainter* pp, PageItem* currItem);
-
-private:
-
-	typedef enum 
-	{
-		noPointDefined,
-		useControlStart,
-		useControlSweep,
-		useControlHeight,
-		useControlWidth
-	} eArcPoint;
-
-	inline bool GetItem(PageItem** pi);
-
-	double Mxp, Myp;
-	ScribusMainWindow* m_ScMW;
-	bool m_cursorVisible;
-	bool m_lastPosWasOverGuide;
-	QPointF startPoint;
-	QPointF endPoint;
-	QPointF centerPoint;
-	QPointF widthPoint;
-	QPointF heightPoint;
-	double startAngle;
-	double endAngle;
-	eArcPoint m_arcPoint;
-	ArcVectorDialog* VectorDialog;
-
+/*
+ For general Scribus (>=1.3.2) copyright and licensing information please refer
+ to the COPYING file provided with the program. Following this notice may exist
+ a copyright and/or license notice that predates the release of Scribus 1.3.2
+ for which a new license (GPL+exception) is in place.
+ */
+/***************************************************************************
+*                                                                         *
+*   This program is free software; you can redistribute it and/or modify  *
+*   it under the terms of the GNU General Public License as published by  *
+*   the Free Software Foundation; either version 2 of the License, or     *
+*   (at your option) any later version.                                   *
+*                                                                         *
+***************************************************************************/
+/***************************************************************************
+                 canvasmode_editarc.h  -  description
+                             -------------------
+    begin                : Tue Jan 4 2011
+    copyright            : (C) 2011 by Franz Schmid
+    email                : Franz.Schmid at altmuehlnet.de
+ ***************************************************************************/
+
+#ifndef CANVAS_MODE_EDITARC_H
+#define CANVAS_MODE_EDITARC_H
+
+#include <QObject>
+#include <QTime>
+
+#include "canvasmode.h"
+#include "fpointarray.h"
+#include "ui/arcvectordialog.h"
+
+class PageItem;
+class ScribusMainWindow;
+class ScribusView;
+
+
+// This class encapsulate the old code for mouse interaction from scribusview.cpp
+
+class CanvasMode_EditArc :  public CanvasMode
+{	
+	Q_OBJECT
+public:
+	CanvasMode_EditArc(ScribusView* view);
+
+	virtual void enterEvent(QEvent *);
+	virtual void leaveEvent(QEvent *);
+	
+	virtual void activate(bool);
+	virtual void deactivate(bool);
+	virtual void mouseDoubleClickEvent(QMouseEvent *m);
+	virtual void mouseReleaseEvent(QMouseEvent *m);
+	virtual void mouseMoveEvent(QMouseEvent *m);
+	virtual void mousePressEvent(QMouseEvent *m);
+	virtual void drawControls(QPainter* p);
+	void drawControlsArc(QPainter* pp, PageItem* currItem);
+
+private:
+
+	typedef enum 
+	{
+		noPointDefined,
+		useControlStart,
+		useControlSweep,
+		useControlHeight,
+		useControlWidth
+	} eArcPoint;
+
+	inline bool GetItem(PageItem** pi);
+
+	double Mxp, Myp;
+	ScribusMainWindow* m_ScMW;
+	bool m_cursorVisible;
+	bool m_lastPosWasOverGuide;
+	QPointF startPoint;
+	QPointF endPoint;
+	QPointF centerPoint;
+	QPointF widthPoint;
+	QPointF heightPoint;
+	double startAngle;
+	double endAngle;
+	eArcPoint m_arcPoint;
+	ArcVectorDialog* VectorDialog;
+
 	int    m_blockUpdateFromItem;
 	void   blockUpdateFromItem(bool block) { if (block) ++m_blockUpdateFromItem; else --m_blockUpdateFromItem; }
-	bool   updateFromItemBlocked() { return (m_blockUpdateFromItem > 0); }
-
-public slots:
-	void updateFromItem();
-
-private slots:
-	void endEditing(bool active);
-	void endEditing();
-	void applyValues(double start, double end, double height, double width);
-};
-
-
-#endif
+	bool   updateFromItemBlocked() { return (m_blockUpdateFromItem > 0); }
+
+public slots:
+	void updateFromItem();
+
+private slots:
+	void endEditing(bool active);
+	void endEditing();
+	void applyValues(double start, double end, double height, double width);
+};
+
+
+#endif

Modified: branches/ScribusOIF/scribus/canvasmode_editpolygon.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/canvasmode_editpolygon.cpp
==============================================================================
--- branches/ScribusOIF/scribus/canvasmode_editpolygon.cpp (original)
+++ branches/ScribusOIF/scribus/canvasmode_editpolygon.cpp Sat Jan 29 14:15:28 2011
@@ -218,6 +218,7 @@
 
 void CanvasMode_EditPolygon::deactivate(bool forGesture)
 {
+	disconnect(VectorDialog, SIGNAL(paletteShown(bool)), this, SLOT(endEditing(bool)));
 	VectorDialog->close();
 	delete VectorDialog;
 	m_view->redrawMarker->hide();

Modified: branches/ScribusOIF/scribus/canvasmode_normal.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/canvasmode_normal.cpp
==============================================================================
--- branches/ScribusOIF/scribus/canvasmode_normal.cpp (original)
+++ branches/ScribusOIF/scribus/canvasmode_normal.cpp Sat Jan 29 14:15:28 2011
@@ -243,18 +243,6 @@
 			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->polyFactor, item->polyUseFactor, item->polyRotation, item->polyCurvature, item->polyInnerRot, item->polyOuterCurvature);
-			if (dia->exec())
-			{
-				dia->getValues(&item->polyCorners, &item->polyFactor, &item->polyUseFactor, &item->polyRotation, &item->polyCurvature, &item->polyInnerRot, &item->polyOuterCurvature);
-				item->recalcPath();
-			}
-			delete dia;
-			m_view->updateContents();
-		} */
 		else if (currItem->asArc())
 		{
 			m_view->requestMode(modeEditArc);
@@ -262,6 +250,10 @@
 		else if (currItem->asRegularPolygon())
 		{
 			m_view->requestMode(modeEditPolygon);
+		}
+		else if (currItem->asSpiral())
+		{
+			m_view->requestMode(modeEditSpiral);
 		}
 	}
 }

Modified: branches/ScribusOIF/scribus/pageitem.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/pageitem.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pageitem.cpp (original)
+++ branches/ScribusOIF/scribus/pageitem.cpp Sat Jan 29 14:15:28 2011
@@ -564,6 +564,10 @@
 		AnName = tr("Arc");
 		setUPixmap(Um::IPolygon);
 		break;
+	case Spiral:
+		AnName = tr("Spiral");
+		setUPixmap(Um::IPolygon);
+		break;
 	default:
 		AnName = "Item";
 		break;
@@ -1545,7 +1549,7 @@
 			p->setBlendModeFill(0);
 	#endif
 			p->setMaskMode(0);
-			if (itemType()==PathText || itemType()==PolyLine || itemType()==Line || itemType()==Symbol || itemType()==Group)
+			if (itemType()==PathText || itemType()==PolyLine || itemType()==Spiral || itemType()==Line || itemType()==Symbol || itemType()==Group)
 				doStroke=false;
 			if ((doStroke) && (!m_Doc->RePos))
 			{
@@ -1801,6 +1805,7 @@
 				break;
 			case Line:
 			case PolyLine:
+			case Spiral:
 				embedded->m_lineWidth = pws * qMin(style.scaleH() / 1000.0, style.scaleV() / 1000.0);
 				embedded->DrawObj_Item(p, cullingArea);
 				break;
@@ -2553,6 +2558,7 @@
 				case Polygon:
 				case RegularPolygon:
 				case Arc:
+				case Spiral:
 					GrColorP1 = m_Doc->itemToolPrefs().shapeFillColor;
 					break;
 				default:
@@ -2590,6 +2596,7 @@
 				case Polygon:
 				case RegularPolygon:
 				case Arc:
+				case Spiral:
 					GrColorP2 = m_Doc->itemToolPrefs().shapeFillColor;
 					break;
 				default:
@@ -2627,6 +2634,7 @@
 				case Polygon:
 				case RegularPolygon:
 				case Arc:
+				case Spiral:
 					GrColorP3 = m_Doc->itemToolPrefs().shapeFillColor;
 					break;
 				default:
@@ -2664,6 +2672,7 @@
 				case Polygon:
 				case RegularPolygon:
 				case Arc:
+				case Spiral:
 					GrColorP4 = m_Doc->itemToolPrefs().shapeFillColor;
 					break;
 				default:
@@ -2730,6 +2739,7 @@
 				case Polygon:
 				case RegularPolygon:
 				case Arc:
+				case Spiral:
 					MColor = m_Doc->itemToolPrefs().shapeFillColor;
 					break;
 				default:
@@ -2779,6 +2789,7 @@
 				case Polygon:
 				case RegularPolygon:
 				case Arc:
+				case Spiral:
 					MColor = m_Doc->itemToolPrefs().shapeFillColor;
 					break;
 				default:
@@ -3080,6 +3091,7 @@
 				case Polygon:
 				case RegularPolygon:
 				case Arc:
+				case Spiral:
 					tmp = m_Doc->itemToolPrefs().shapeFillColor;
 					break;
 				default:
@@ -3174,6 +3186,7 @@
 				case OSGFrame:
 				case RegularPolygon:
 				case Arc:
+				case Spiral:
 					tmp = m_Doc->itemToolPrefs().shapeLineColor;
 					break;
 				default:
@@ -3295,6 +3308,7 @@
 				case OSGFrame:
 				case RegularPolygon:
 				case Arc:
+				case Spiral:
 					lineColorVal = m_Doc->itemToolPrefs().shapeLineColor;
 					break;
 				default:
@@ -3334,6 +3348,7 @@
 				case Polygon:
 				case RegularPolygon:
 				case Arc:
+				case Spiral:
 					fillColorVal = m_Doc->itemToolPrefs().shapeFillColor;
 					break;
 				default:

Modified: branches/ScribusOIF/scribus/pageitem.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/pageitem.h
==============================================================================
--- branches/ScribusOIF/scribus/pageitem.h (original)
+++ branches/ScribusOIF/scribus/pageitem.h Sat Jan 29 14:15:28 2011
@@ -76,6 +76,7 @@
 class PageItem_TextFrame;
 class PageItem_PathText;
 class PageItem_LatexFrame;
+class PageItem_Spiral;
 class PageItem_Symbol;
 class TextLayout;
 
@@ -174,6 +175,7 @@
 		Group			= 12,
 		RegularPolygon	= 13,
 		Arc				= 14,
+		Spiral			= 15,
 		Multiple		= 99
 	};
 
@@ -203,6 +205,7 @@
 	virtual PageItem_Group * asGroupFrame() { return NULL; }
 	virtual PageItem_RegularPolygon * asRegularPolygon() { return NULL; }
 	virtual PageItem_Arc * asArc() { return NULL; }
+	virtual PageItem_Spiral * asSpiral() { return NULL; }
 
 	virtual bool isImageFrame()		const { return false; }
 	virtual bool isLine()			const { return false; }
@@ -216,6 +219,7 @@
 	virtual bool isGroup()			const { return false; }
 	virtual bool isRegularPolygon()	const { return false; }
 	virtual bool isArc()			const { return false; }
+	virtual bool isSpiral()			const { return false; }
 
 	/** @brief Frame Type
 	 *

Modified: branches/ScribusOIF/scribus/pageitem_arc.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/pageitem_arc.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pageitem_arc.cpp (original)
+++ branches/ScribusOIF/scribus/pageitem_arc.cpp Sat Jan 29 14:15:28 2011
@@ -54,12 +54,7 @@
 	arcWidth = w;
 	arcStartAngle = m_Doc->itemToolPrefs().arcStartAngle;
 	arcSweepAngle = m_Doc->itemToolPrefs().arcSweepAngle;
-	QPainterPath path;
-	path.moveTo(w / 2.0, h / 2.0);
-	path.arcTo(0.0, 0.0, w, h, arcStartAngle, arcSweepAngle);
-	path.closeSubpath();
-	PoLine.fromQPainterPath(path);
-	Clip = FlattenPath(PoLine, Segments);
+	recalcPath();
 }
 
 void PageItem_Arc::DrawObj_Item(ScPainter *p, QRectF /*e*/)

Modified: branches/ScribusOIF/scribus/pdflib_core.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/pdflib_core.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pdflib_core.cpp (original)
+++ branches/ScribusOIF/scribus/pdflib_core.cpp Sat Jan 29 14:15:28 2011
@@ -2246,6 +2246,7 @@
 						}
 						break;
 					case PageItem::PolyLine:
+					case PageItem::Spiral:
 						if (ite->PoLine.size() > 4) // && ((ite->PoLine.point(0) != ite->PoLine.point(1)) || (ite->PoLine.point(2) != ite->PoLine.point(3))))
 						{
 							PutPage("q\n");
@@ -4016,6 +4017,7 @@
 			}
 			break;
 		case PageItem::PolyLine:
+		case PageItem::Spiral:
 			if (ite->PoLine.size() > 4)  // && ((ite->PoLine.point(0) != ite->PoLine.point(1)) || (ite->PoLine.point(2) != ite->PoLine.point(3))))
 			{
 				tmp += "q\n";

Modified: branches/ScribusOIF/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/fileloader/scribus12format/scribus12format.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/fileloader/scribus12format/scribus12format.cpp Sat Jan 29 14:15:28 2011
@@ -371,6 +371,7 @@
 	case PageItem::Multiple:
 	case PageItem::RegularPolygon:
 	case PageItem::Arc:
+	case PageItem::Spiral:
 		Q_ASSERT(false);
 		break;
 	case PageItem::LatexFrame:

Modified: branches/ScribusOIF/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&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 Sat Jan 29 14:15:28 2011
@@ -2743,6 +2743,7 @@
 	case PageItem::Symbol:
 	case PageItem::RegularPolygon:
 	case PageItem::Arc:
+	case PageItem::Spiral:
 	case PageItem::Multiple:
 		Q_ASSERT(false);
 		break;

Modified: branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&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 Sat Jan 29 14:15:28 2011
@@ -33,6 +33,7 @@
 #endif
 #include "pageitem_regularpolygon.h"
 #include "pageitem_arc.h"
+#include "pageitem_spiral.h"
 #include <QCursor>
 // #include <QDebug>
 #include <QFileInfo>
@@ -1716,6 +1717,9 @@
 
 	doc->itemToolPrefs().arcStartAngle = attrs.valueAsDouble("arcStartAngle", 30.0);
 	doc->itemToolPrefs().arcSweepAngle = attrs.valueAsDouble("arcSweepAngle", 300.0);
+	doc->itemToolPrefs().spiralStartAngle = attrs.valueAsDouble("spiralStartAngle", 0.0);
+	doc->itemToolPrefs().spiralEndAngle = attrs.valueAsDouble("spiralEndAngle", 1080.0);
+	doc->itemToolPrefs().spiralFactor = attrs.valueAsDouble("spiralFactor", 1.2);
 
 	doc->itemToolPrefs().lineStartArrow = attrs.valueAsInt("StartArrow", 0);
 	doc->itemToolPrefs().lineEndArrow   = attrs.valueAsInt("EndArrow", 0);
@@ -3376,6 +3380,12 @@
 		if (pagenr > -2) 
 			currItem->OwnPage = pagenr;
 		break;
+	case PageItem::Spiral:
+		z = doc->itemAdd(PageItem::Spiral, 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;
@@ -3709,6 +3719,13 @@
 		arcitem->arcStartAngle = attrs.valueAsDouble("arcStartAngle", 30.0);
 		arcitem->arcSweepAngle = attrs.valueAsDouble("arcSweepAngle", 300.0);
 	}
+	if (currItem->asSpiral())
+	{
+		PageItem_Spiral *arcitem = currItem->asSpiral();
+		arcitem->spiralStartAngle = attrs.valueAsDouble("spiralStartAngle", 0.0);
+		arcitem->spiralEndAngle = attrs.valueAsDouble("spiralEndAngle", 360.0);
+		arcitem->spiralFactor = attrs.valueAsDouble("spiralFactor", 1.2);
+	}
 	currItem->GrType = attrs.valueAsInt("GRTYP", 0);
 	QString GrColor;
 	QString GrColor2;

Modified: branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&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 Sat Jan 29 14:15:28 2011
@@ -26,6 +26,7 @@
 #endif
 #include "pageitem_regularpolygon.h"
 #include "pageitem_arc.h"
+#include "pageitem_spiral.h"
 
 #include "units.h"
 #include "util.h"
@@ -263,7 +264,10 @@
 	docu.writeAttribute("POLYOCUR", m_Doc->itemToolPrefs().polyOuterCurvature);
 	docu.writeAttribute("POLYS", static_cast<int>(m_Doc->itemToolPrefs().polyUseFactor));
 	docu.writeAttribute("arcStartAngle", m_Doc->itemToolPrefs().arcStartAngle);
-	docu.writeAttribute("arcSweepAngle", m_Doc->itemToolPrefs().polyInnerRot);
+	docu.writeAttribute("arcSweepAngle", m_Doc->itemToolPrefs().arcSweepAngle);
+	docu.writeAttribute("spiralStartAngle", m_Doc->itemToolPrefs().spiralStartAngle);
+	docu.writeAttribute("spiralEndAngle", m_Doc->itemToolPrefs().spiralEndAngle);
+	docu.writeAttribute("spiralFactor", m_Doc->itemToolPrefs().spiralFactor);
 	docu.writeAttribute("AutoSave", static_cast<int>(m_Doc->autoSave()));
 	docu.writeAttribute("AutoSaveTime", m_Doc->autoSaveTime());
 	docu.writeAttribute("ScratchBottom", m_Doc->scratch()->Bottom);
@@ -1857,6 +1861,13 @@
 		docu.writeAttribute("arcStartAngle", arcitem->arcStartAngle);
 		docu.writeAttribute("arcSweepAngle", arcitem->arcSweepAngle);
 	}
+	if (item->asSpiral())
+	{
+		PageItem_Spiral *arcitem = item->asSpiral();
+		docu.writeAttribute("spiralStartAngle", arcitem->spiralStartAngle);
+		docu.writeAttribute("spiralEndAngle", arcitem->spiralEndAngle);
+		docu.writeAttribute("spiralFactor", arcitem->spiralFactor);
+	}
 	if(item->isAnnotation())
 	{
 		docu.writeAttribute("ANNOTATION",1);

Modified: branches/ScribusOIF/scribus/plugins/svgexplugin/svgexplugin.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/plugins/svgexplugin/svgexplugin.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/svgexplugin/svgexplugin.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/svgexplugin/svgexplugin.cpp Sat Jan 29 14:15:28 2011
@@ -383,6 +383,7 @@
 		case PageItem::Polygon:
 		case PageItem::PolyLine:
 		case PageItem::RegularPolygon:
+		case PageItem::Spiral:
 			ob = processPolyItem(Item, trans, fill, stroke);
 			if ((Item->lineColor() != CommonStrings::None) && ((Item->startArrowIndex() != 0) || (Item->endArrowIndex() != 0)))
 				ob = processArrows(Item, ob, trans);
@@ -1212,6 +1213,7 @@
 			case PageItem::Polygon:
 			case PageItem::PolyLine:
 			case PageItem::RegularPolygon:
+			case PageItem::Spiral:
 				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=16318&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 Sat Jan 29 14:15:28 2011
@@ -81,6 +81,7 @@
 	m_actionInfo.notSuitableFor.append(PageItem::Symbol);
 	m_actionInfo.notSuitableFor.append(PageItem::RegularPolygon);
 	m_actionInfo.notSuitableFor.append(PageItem::Arc);
+	m_actionInfo.notSuitableFor.append(PageItem::Spiral);
 	m_actionInfo.needsNumObjects = 3;
 }
 

Modified: branches/ScribusOIF/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.cpp Sat Jan 29 14:15:28 2011
@@ -32,6 +32,7 @@
 #include "commonstrings.h"
 #include "fpointarray.h"
 #include "pageitem.h"
+#include "pageitem_group.h"
 #include "sccolorengine.h"
 #include "scpattern.h"
 #include "selection.h"
@@ -204,12 +205,17 @@
 	itemSelection->setGroupRect();
 	itemSelection->getGroupRect(&gx, &gy, &gw, &gh);
 	uint selectedItemCount = itemSelection->count();
-	w4 = qMax(gw, gh) / 2.0;
-	w2 = qMax(gw, gh);
-	ww = qMax(gw, gh) * 2.0;
+	if (parentItem == 0)
+	{
+		w4 = qMax(gw, gh) / 2.0;
+		w2 = qMax(gw, gh);
+		ww = qMax(gw, gh) * 2.0;
+	}
 	for (uint i = 0; i < selectedItemCount; ++i)
 	{
 		currItem = itemSelection->itemAt(i);
+		if (currItem->isGroup())
+			currItem->asGroupFrame()->adjustXYPosition();
 		FPointArray path = currItem->PoLine;
 		deltaX = ((w2 - gw) / 2.0) + w4;
 		deltaY = ((w2 - gh) / 2.0) + w4;
@@ -227,10 +233,12 @@
 		}
 		else
 		{
-			QTransform mm;
-			mm.rotate(-parent->rotation());
-			mm.translate(-parent->xPos(), -parent->yPos());
-			pItem->setPos(mm.map(QPointF(currItem->xPos(), currItem->yPos())));
+		//	QTransform mm;
+		//	mm.rotate(-parent->rotation());
+		//	mm.translate(-parent->xPos(), -parent->yPos());
+		//	pItem->setPos(mm.map(QPointF(currItem->xPos(), currItem->yPos())));
+			pItem->setPos(QPointF(currItem->gXpos, currItem->gYpos));
+			pItem->rotate(currItem->rotation());
 		}
 		QPainterPath pathO = pp;
 		QTransform mmO;

Modified: branches/ScribusOIF/scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&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 Sat Jan 29 14:15:28 2011
@@ -82,6 +82,7 @@
 	m_actionInfo.notSuitableFor.append(PageItem::Symbol);
 	m_actionInfo.notSuitableFor.append(PageItem::RegularPolygon);
 	m_actionInfo.notSuitableFor.append(PageItem::Arc);
+	m_actionInfo.notSuitableFor.append(PageItem::Spiral);
 	m_actionInfo.forAppMode.append(modeNormal);
 	m_actionInfo.needsNumObjects = 2;
 	m_actionInfo.firstObjectType.append(PageItem::PolyLine);

Modified: branches/ScribusOIF/scribus/plugins/tools/lenseffects/lensdialog.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/plugins/tools/lenseffects/lensdialog.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/tools/lenseffects/lensdialog.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/tools/lenseffects/lensdialog.cpp Sat Jan 29 14:15:28 2011
@@ -32,6 +32,7 @@
 #include "sccolorengine.h"
 #include "scpattern.h"
 #include "commonstrings.h"
+#include "pageitem_group.h"
 
 LensItem::LensItem(QRectF geom, LensDialog *parent) : QGraphicsRectItem(geom)
 {
@@ -280,6 +281,8 @@
 	for (uint i = 0; i < selectedItemCount; ++i)
 	{
 		currItem = itemSelection->itemAt(i);
+		if (currItem->isGroup())
+			currItem->asGroupFrame()->adjustXYPosition();
 		FPointArray path = currItem->PoLine;
 		QPainterPath pp;
 		if (currItem->itemType() == PageItem::PolyLine)

Modified: branches/ScribusOIF/scribus/plugins/tools/lenseffects/lenseffects.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&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 Sat Jan 29 14:15:28 2011
@@ -78,6 +78,7 @@
 	m_actionInfo.notSuitableFor.append(PageItem::Symbol);
 	m_actionInfo.notSuitableFor.append(PageItem::RegularPolygon);
 	m_actionInfo.notSuitableFor.append(PageItem::Arc);
+	m_actionInfo.notSuitableFor.append(PageItem::Spiral);
 	m_actionInfo.needsNumObjects = 3;
 }
 

Modified: branches/ScribusOIF/scribus/plugins/tools/pathconnect/pathconnect.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&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 Sat Jan 29 14:15:28 2011
@@ -79,6 +79,7 @@
 	m_actionInfo.notSuitableFor.append(PageItem::LatexFrame);
 	m_actionInfo.notSuitableFor.append(PageItem::Symbol);
 	m_actionInfo.notSuitableFor.append(PageItem::RegularPolygon);
+	m_actionInfo.notSuitableFor.append(PageItem::Spiral);
 	m_actionInfo.notSuitableFor.append(PageItem::Arc);
 	m_actionInfo.needsNumObjects = 2;
 }

Modified: branches/ScribusOIF/scribus/plugins/tools/pathcut/pathcut.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&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 Sat Jan 29 14:15:28 2011
@@ -86,6 +86,7 @@
 	m_actionInfo.notSuitableFor.append(PageItem::Symbol);
 	m_actionInfo.notSuitableFor.append(PageItem::RegularPolygon);
 	m_actionInfo.notSuitableFor.append(PageItem::Arc);
+	m_actionInfo.notSuitableFor.append(PageItem::Spiral);
 	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=16318&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 Sat Jan 29 14:15:28 2011
@@ -93,6 +93,7 @@
 	m_actionInfo.notSuitableFor.append(PageItem::Symbol);
 	m_actionInfo.notSuitableFor.append(PageItem::RegularPolygon);
 	m_actionInfo.notSuitableFor.append(PageItem::Arc);
+	m_actionInfo.notSuitableFor.append(PageItem::Spiral);
 	m_actionInfo.needsNumObjects = 2;
 }
 

Modified: branches/ScribusOIF/scribus/plugins/tools/pathstroker/pathstroker.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&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 Sat Jan 29 14:15:28 2011
@@ -87,6 +87,7 @@
 	m_actionInfo.notSuitableFor.append(PageItem::Symbol);
 	m_actionInfo.notSuitableFor.append(PageItem::RegularPolygon);
 	m_actionInfo.notSuitableFor.append(PageItem::Arc);
+	m_actionInfo.notSuitableFor.append(PageItem::Spiral);
 	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=16318&path=/branches/ScribusOIF/scribus/prefsmanager.cpp
==============================================================================
--- branches/ScribusOIF/scribus/prefsmanager.cpp (original)
+++ branches/ScribusOIF/scribus/prefsmanager.cpp Sat Jan 29 14:15:28 2011
@@ -271,6 +271,9 @@
 	appPrefs.itemToolPrefs.polyOuterCurvature = 0.0;
 	appPrefs.itemToolPrefs.arcStartAngle = 30.0;
 	appPrefs.itemToolPrefs.arcSweepAngle = 300.0;
+	appPrefs.itemToolPrefs.spiralStartAngle = 0.0;
+	appPrefs.itemToolPrefs.spiralEndAngle = 1080.0;
+	appPrefs.itemToolPrefs.spiralFactor = 1.2;
 //	appPrefs.PSize = 40;
 	appPrefs.printerPrefs.ClipMargin = false;
 	appPrefs.printerPrefs.GCRMode = false;
@@ -1474,6 +1477,9 @@
 	dcItemTools.setAttribute("PolygonOuterCurvature", ScCLocale::toQStringC(appPrefs.itemToolPrefs.polyOuterCurvature));
 	dcItemTools.setAttribute("arcStartAngle", ScCLocale::toQStringC(appPrefs.itemToolPrefs.arcStartAngle));
 	dcItemTools.setAttribute("arcSweepAngle", ScCLocale::toQStringC(appPrefs.itemToolPrefs.arcSweepAngle));
+	dcItemTools.setAttribute("spiralStartAngle", ScCLocale::toQStringC(appPrefs.itemToolPrefs.spiralStartAngle));
+	dcItemTools.setAttribute("spiralEndAngle", ScCLocale::toQStringC(appPrefs.itemToolPrefs.spiralEndAngle));
+	dcItemTools.setAttribute("spiralFactor", ScCLocale::toQStringC(appPrefs.itemToolPrefs.spiralFactor));
 	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));
@@ -2068,6 +2074,9 @@
 			appPrefs.itemToolPrefs.lineEndArrow   = dc.attribute("LineEndArrow", "0").toInt();
 			appPrefs.itemToolPrefs.arcStartAngle = ScCLocale::toDoubleC(dc.attribute("arcStartAngle"), 30.0);
 			appPrefs.itemToolPrefs.arcSweepAngle = ScCLocale::toDoubleC(dc.attribute("arcSweepAngle"), 300.0);
+			appPrefs.itemToolPrefs.spiralStartAngle = ScCLocale::toDoubleC(dc.attribute("spiralStartAngle"), 0.0);
+			appPrefs.itemToolPrefs.spiralEndAngle = ScCLocale::toDoubleC(dc.attribute("spiralEndAngle"), 1080.0);
+			appPrefs.itemToolPrefs.spiralFactor = ScCLocale::toDoubleC(dc.attribute("spiralFactor"), 1.2);
 			if (dc.hasAttribute("Face"))
 			{
 				QString tmpf=dc.attribute("Face");

Modified: branches/ScribusOIF/scribus/prefsstructs.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/prefsstructs.h
==============================================================================
--- branches/ScribusOIF/scribus/prefsstructs.h (original)
+++ branches/ScribusOIF/scribus/prefsstructs.h Sat Jan 29 14:15:28 2011
@@ -228,6 +228,10 @@
 	/* Arc Tool */
 	double arcStartAngle;    //! angle where the arc starts
 	double arcSweepAngle;    //! angle the arc spans
+	/* Spiral Tool */
+	double spiralStartAngle;    //! angle where the spiral starts
+	double spiralEndAngle;    //! angle where the spiral ends
+	double spiralFactor;	//! factor the spiral gets smaller
 };
 
 struct OperatorToolPrefs

Modified: branches/ScribusOIF/scribus/pslib.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/pslib.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pslib.cpp (original)
+++ branches/ScribusOIF/scribus/pslib.cpp Sat Jan 29 14:15:28 2011
@@ -2063,6 +2063,7 @@
 			}
 			break;
 		case PageItem::PolyLine:
+		case PageItem::Spiral:
 			if ((c->fillColor() != CommonStrings::None) || (c->GrType != 0))
 			{
 				SetClipPath(&c->PoLine);

Modified: branches/ScribusOIF/scribus/scribus.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/scribus.cpp
==============================================================================
--- branches/ScribusOIF/scribus/scribus.cpp (original)
+++ branches/ScribusOIF/scribus/scribus.cpp Sat Jan 29 14:15:28 2011
@@ -820,6 +820,7 @@
 	scrMenuMgr->addMenuItem(scrActions["toolsInsertShape"], "Insert", false);
 	scrMenuMgr->addMenuItem(scrActions["toolsInsertPolygon"], "Insert", false);
 	scrMenuMgr->addMenuItem(scrActions["toolsInsertArc"], "Insert", false);
+	scrMenuMgr->addMenuItem(scrActions["toolsInsertSpiral"], "Insert", false);
 	scrMenuMgr->addMenuItem(scrActions["toolsInsertLine"], "Insert", false);
 	scrMenuMgr->addMenuItem(scrActions["toolsInsertBezier"], "Insert", false);
 	scrMenuMgr->addMenuItem(scrActions["toolsInsertFreehandLine"], "Insert", false);
@@ -2478,6 +2479,7 @@
 	scrActions["toolsInsertCalligraphicLine"]->setEnabled(true);
 	scrActions["toolsInsertPolygon"]->setEnabled(true);
 	scrActions["toolsInsertArc"]->setEnabled(true);
+	scrActions["toolsInsertSpiral"]->setEnabled(true);
 	scrActions["toolsInsertRenderFrame"]->setEnabled(true);
 	scrActions["toolsMeasurements"]->setEnabled(true);
 	scrActions["toolsEyeDropper"]->setEnabled(true);
@@ -2981,13 +2983,16 @@
 			scrActions["itemConvertToPolygon"]->setEnabled(doc->appMode != modeEdit);
 			scrActions["itemConvertToTextFrame"]->setEnabled(false);
 		}
-		else if (SelectedType == PageItem::Line) // Line
+		else if ((SelectedType == PageItem::Line) || (SelectedType == PageItem::Spiral)) // Line
 		{
 			scrMenuMgr->setMenuEnabled("ItemConvertTo", true);
 			scrActions["itemConvertToBezierCurve"]->setEnabled(true);
 			scrActions["itemConvertToImageFrame"]->setEnabled(false);
 			scrActions["itemConvertToOutlines"]->setEnabled(false);
-			scrActions["itemConvertToPolygon"]->setEnabled(false);
+			if (SelectedType == PageItem::Spiral)
+				scrActions["itemConvertToPolygon"]->setEnabled(doc->appMode != modeEdit);
+			else
+				scrActions["itemConvertToPolygon"]->setEnabled(false);
 			scrActions["itemConvertToTextFrame"]->setEnabled(false);
 		}
 		else if (SelectedType == PageItem::Symbol)
@@ -4601,6 +4606,7 @@
 		scrActions["toolsInsertCalligraphicLine"]->setEnabled(false);
 		scrActions["toolsInsertPolygon"]->setEnabled(false);
 		scrActions["toolsInsertArc"]->setEnabled(false);
+		scrActions["toolsInsertSpiral"]->setEnabled(false);
 		scrActions["toolsInsertRenderFrame"]->setEnabled(false);
 		scrActions["toolsLinkTextFrame"]->setEnabled(false);
 		scrActions["toolsUnlinkTextFrame"]->setEnabled(false);
@@ -6091,6 +6097,7 @@
 		scrActions["toolsInsertCalligraphicLine"]->setEnabled(false);
 		scrActions["toolsInsertPolygon"]->setEnabled(false);
 		scrActions["toolsInsertArc"]->setEnabled(false);
+		scrActions["toolsInsertSpiral"]->setEnabled(false);
 		scrActions["toolsInsertRenderFrame"]->setEnabled(false);
 		scrActions["toolsLinkTextFrame"]->setEnabled(false);
 		scrActions["toolsUnlinkTextFrame"]->setEnabled(false);
@@ -6173,6 +6180,7 @@
 	scrActions["toolsInsertCalligraphicLine"]->setEnabled(true);
 	scrActions["toolsInsertPolygon"]->setEnabled(true);
 	scrActions["toolsInsertArc"]->setEnabled(true);
+	scrActions["toolsInsertSpiral"]->setEnabled(true);
 	scrActions["toolsInsertRenderFrame"]->setEnabled(true);
 	scrActions["toolsPDFPushButton"]->setEnabled(true);
 	scrActions["toolsPDFTextField"]->setEnabled(true);
@@ -6263,6 +6271,7 @@
 	scrActions["toolsInsertShape"]->setChecked(mode==modeDrawShapes);
 	scrActions["toolsInsertPolygon"]->setChecked(mode==modeDrawRegularPolygon);
 	scrActions["toolsInsertArc"]->setChecked(mode==modeDrawArc);
+	scrActions["toolsInsertSpiral"]->setChecked(mode==modeDrawSpiral);
 	scrActions["toolsInsertLine"]->setChecked(mode==modeDrawLine);
 	scrActions["toolsInsertBezier"]->setChecked(mode==modeDrawBezierLine);
 	scrActions["toolsInsertFreehandLine"]->setChecked(mode==modeDrawFreehandLine);
@@ -6427,6 +6436,7 @@
 		{
 			case modeDrawShapes:
 			case modeDrawArc:
+			case modeDrawSpiral:
 				if (docSelectionCount!=0)
 					view->Deselect(true);
 				qApp->changeOverrideCursor(QCursor(loadIcon("DrawFrame.xpm")));
@@ -6493,6 +6503,7 @@
 			case modeEditMeshGradient:
 			case modeEditArc:
 			case modeEditPolygon:
+			case modeEditSpiral:
 				qApp->changeOverrideCursor(QCursor(Qt::CrossCursor));
 				break;
 			default:
@@ -9133,6 +9144,7 @@
 	scrActions["toolsInsertCalligraphicLine"]->setEnabled(setter);
 	scrActions["toolsInsertPolygon"]->setEnabled(setter);
 	scrActions["toolsInsertArc"]->setEnabled(setter);
+	scrActions["toolsInsertSpiral"]->setEnabled(setter);
 	scrActions["toolsInsertRenderFrame"]->setEnabled(setter);
 	if (doc->masterPageMode())
 	{

Modified: branches/ScribusOIF/scribus/scribusdoc.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/scribusdoc.cpp
==============================================================================
--- branches/ScribusOIF/scribus/scribusdoc.cpp (original)
+++ branches/ScribusOIF/scribus/scribusdoc.cpp Sat Jan 29 14:15:28 2011
@@ -60,6 +60,7 @@
 #include "pageitem_group.h"
 #include "pageitem_regularpolygon.h"
 #include "pageitem_arc.h"
+#include "pageitem_spiral.h"
 #include "ui/pagepalette.h"
 #include "pagesize.h"
 #include "pagestructs.h"
@@ -4028,6 +4029,10 @@
 			newItem = new PageItem_Arc(this, x, y, b, h, w, fill, outline);
 			Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Ellipse || frameType==PageItem::Unspecified);
 			break;
+		case PageItem::Spiral:
+			newItem = new PageItem_Spiral(this, x, y, b, h, w, fill, outline);
+			Q_ASSERT(frameType==PageItem::Unspecified);
+			break;
 		default:
 //			qDebug() << "unknown item type";
 			assert (false);
@@ -4251,6 +4256,7 @@
 			}
 			break;
 		case PageItem::PolyLine:
+		case PageItem::Spiral:
 			newItem->ClipEdited = true;
 			break;
 		case PageItem::PathText:
@@ -4286,7 +4292,7 @@
 	}
 
 	//ItemType Polygon
-	if (itemType==PageItem::Polygon || itemType==PageItem::PolyLine || itemType == PageItem::RegularPolygon || itemType == PageItem::Arc)
+	if (itemType==PageItem::Polygon || itemType==PageItem::PolyLine || itemType==PageItem::Spiral || itemType == PageItem::RegularPolygon || itemType == PageItem::Arc)
 	{
 		newItem->PLineArt = Qt::PenStyle(docPrefsData.itemToolPrefs.shapeLineStyle);
 		newItem->setFillShade(docPrefsData.itemToolPrefs.shapeFillColorShade);
@@ -4981,6 +4987,7 @@
 		case PageItem::PolyLine:
 			newItem->convertTo(PageItem::PolyLine);
 			newItem->ClipEdited = true;
+			newItem->FrameType = 3;
 			if(oldItem->itemType()==PageItem::Line)
 			{
 				QTransform ma;
@@ -5923,7 +5930,7 @@
 			//cb moved to setlinewidth
 			//currItem->Oldm_lineWidth = currItem->lineWidth();
 			currItem->setLineWidth(w);
-			if (currItem->asPolyLine())
+			if (currItem->asPolyLine() || currItem->asSpiral())
 				currItem->setPolyClip(qRound(qMax(currItem->lineWidth() / 2, 1.0)));
 			if (currItem->asLine())
 			{
@@ -6347,6 +6354,7 @@
 							case PageItem::Polygon:
 							case PageItem::ImageFrame:
 							case PageItem::LatexFrame:
+							case PageItem::Spiral:
 								currItem->setLineColor(docPrefsData.itemToolPrefs.shapeLineColor);
 								break;
 							default:
@@ -6394,6 +6402,7 @@
 								case PageItem::Line:
 								case PageItem::PolyLine:
 								case PageItem::Polygon:
+								case PageItem::Spiral:
 									currItem->setFillColor(docPrefsData.itemToolPrefs.shapeFillColor);
 									break;
 								default:
@@ -8270,7 +8279,7 @@
 				currItem->moveBy(ix-ix2, iy-iy2, true);
 				currItem->setRedrawBounding();
 			}
-			if (currItem->isImageFrame() || currItem->isTextFrame() || currItem->isLatexFrame() || currItem->isOSGFrame() || currItem->isSymbol() || currItem->isGroup())
+			if (currItem->isImageFrame() || currItem->isTextFrame() || currItem->isLatexFrame() || currItem->isOSGFrame() || currItem->isSymbol() || currItem->isGroup() || currItem->isSpiral())
 				currItem->flipImageH();
 			if (currItem->itemType() != PageItem::Line)
 				MirrorPolyH(currItem);
@@ -8306,7 +8315,7 @@
 		for (uint a = 0; a < docSelectionCount; ++a)
 		{
 			PageItem* currItem=m_Selection->itemAt(a);
-			if (currItem->isImageFrame() || currItem->isTextFrame() || currItem->isLatexFrame() || currItem->isOSGFrame() || currItem->isSymbol() || currItem->isGroup())
+			if (currItem->isImageFrame() || currItem->isTextFrame() || currItem->isLatexFrame() || currItem->isOSGFrame() || currItem->isSymbol() || currItem->isGroup() || currItem->isSpiral())
 				currItem->flipImageH();
 			if (currItem->itemType() != PageItem::Line)
 				MirrorPolyH(currItem);
@@ -8374,7 +8383,7 @@
 				currItem->moveBy(ix-ix2, iy-iy2, true);
 				currItem->setRedrawBounding();
 			}
-			if (currItem->isImageFrame() || currItem->isTextFrame() || currItem->isLatexFrame() || currItem->isOSGFrame() || currItem->isSymbol() || currItem->isGroup())
+			if (currItem->isImageFrame() || currItem->isTextFrame() || currItem->isLatexFrame() || currItem->isOSGFrame() || currItem->isSymbol() || currItem->isGroup() || currItem->isSpiral())
 				currItem->flipImageV();
 			if (currItem->itemType() != PageItem::Line)
 				MirrorPolyV(currItem);
@@ -8413,7 +8422,7 @@
 		for (uint a = 0; a < docSelectionCount; ++a)
 		{
 			PageItem* currItem=m_Selection->itemAt(a);
-			if (currItem->isImageFrame() || currItem->isTextFrame() || currItem->isLatexFrame() || currItem->isOSGFrame() || currItem->isSymbol() || currItem->isGroup())
+			if (currItem->isImageFrame() || currItem->isTextFrame() || currItem->isLatexFrame() || currItem->isOSGFrame() || currItem->isSymbol() || currItem->isGroup() || currItem->isSpiral())
 				currItem->flipImageV();
 			if (currItem->itemType() != PageItem::Line)
 				MirrorPolyV(currItem);
@@ -10918,7 +10927,7 @@
 	for (uint a = 0; a < selectedItemCount; ++a)
 	{
 		PageItem *currItem = itemSelection->itemAt(a);
-		if (!(currItem->asLine() || currItem->asPolyLine()))
+		if (!(currItem->asLine() || currItem->asPolyLine() || currItem->asSpiral()))
 			continue;
 		if (startArrowID!=-1)
 		{
@@ -10961,7 +10970,7 @@
 	for (uint a = 0; a < selectedItemCount; ++a)
 	{
 		PageItem *currItem = itemSelection->itemAt(a);
-		if (!(currItem->asLine() || currItem->asPolyLine()))
+		if (!(currItem->asLine() || currItem->asPolyLine() || currItem->asSpiral()))
 			continue;
 		if (startArrowSc !=  -1)
 		{
@@ -11584,7 +11593,7 @@
 	currItem->ClipEdited = true;
 	currItem->OldB2 = currItem->width();
 	currItem->OldH2 = currItem->height();
-	if (currItem->asPolyLine())
+	if (currItem->asPolyLine() || currItem->asSpiral())
 		currItem->setPolyClip(qRound(qMax(currItem->lineWidth() / 2, 1.0)));
 	else if (currItem->asPathText())
 		currItem->updatePolyClip();
@@ -11789,7 +11798,13 @@
 				FPoint tp2(getMinClipF(&bb->PoLine));
 				bb->PoLine.translate(-tp2.x(), -tp2.y());
 			}
-			AdjustItemSize(bb, true, false);
+			if (bb->isSpiral())
+			{
+				PageItem_Spiral* item = bb->asSpiral();
+				item->recalcPath();
+			}
+			else
+				AdjustItemSize(bb, true, false);
 			QTransform ma3;
 			ma3.translate(gx, gy);
 			ma3.scale(scx, scy);

Modified: branches/ScribusOIF/scribus/scribusstructs.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/scribusstructs.h
==============================================================================
--- branches/ScribusOIF/scribus/scribusstructs.h (original)
+++ branches/ScribusOIF/scribus/scribusstructs.h Sat Jan 29 14:15:28 2011
@@ -313,7 +313,9 @@
 	modeDrawCalligraphicLine,
 	modeDrawArc,
 	modeEditArc,
-	modeEditPolygon
+	modeEditPolygon,
+	modeDrawSpiral,
+	modeEditSpiral
 };
 
 struct AlignObjs

Modified: branches/ScribusOIF/scribus/scribusview.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/scribusview.h
==============================================================================
--- branches/ScribusOIF/scribus/scribusview.h (original)
+++ branches/ScribusOIF/scribus/scribusview.h Sat Jan 29 14:15:28 2011
@@ -103,6 +103,7 @@
 	friend class CanvasMode_EditMeshGradient;
 	friend class CanvasMode_EditPolygon;
 	friend class CanvasMode_EditArc;
+	friend class CanvasMode_EditSpiral;
 	friend class CanvasMode_FrameLinks;
 	friend class CanvasMode_Magnifier;
 	friend class CanvasMode_NodeEdit;

Modified: branches/ScribusOIF/scribus/ui/about.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/ui/about.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/about.cpp (original)
+++ branches/ScribusOIF/scribus/ui/about.cpp Sat Jan 29 14:15:28 2011
@@ -112,7 +112,7 @@
 	buildID = new QLabel( tab );
 	buildID->setAlignment(Qt::AlignCenter);
 	buildID->setTextInteractionFlags(Qt::TextSelectableByMouse);
-	QString BUILD_DAY = "23";
+	QString BUILD_DAY = "27";
 	QString BUILD_MONTH = CommonStrings::january;
 	QString BUILD_YEAR = "2011";
 	QString BUILD_TIME = "";

Modified: branches/ScribusOIF/scribus/ui/arcvectordialog.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/ui/arcvectordialog.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/arcvectordialog.h (original)
+++ branches/ScribusOIF/scribus/ui/arcvectordialog.h Sat Jan 29 14:15:28 2011
@@ -22,7 +22,7 @@
  ***************************************************************************/
 
 #ifndef ARCVECTOR_H
-#define ARcVECTOR_H
+#define ARCVECTOR_H
 
 #include "ui_arcvectorbase.h"
 

Modified: branches/ScribusOIF/scribus/ui/modetoolbar.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/ui/modetoolbar.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/modetoolbar.cpp (original)
+++ branches/ScribusOIF/scribus/ui/modetoolbar.cpp Sat Jan 29 14:15:28 2011
@@ -72,6 +72,7 @@
 	tb2->setPopupMode(QToolButton::MenuButtonPopup);
 
 	this->addAction(m_ScMW->scrActions["toolsInsertArc"]);
+	this->addAction(m_ScMW->scrActions["toolsInsertSpiral"]);
 	this->addAction(m_ScMW->scrActions["toolsInsertLine"]);
 	this->addAction(m_ScMW->scrActions["toolsInsertBezier"]);
 	this->addAction(m_ScMW->scrActions["toolsInsertFreehandLine"]);

Modified: branches/ScribusOIF/scribus/ui/outlinepalette.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/ui/outlinepalette.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/outlinepalette.cpp (original)
+++ branches/ScribusOIF/scribus/ui/outlinepalette.cpp Sat Jan 29 14:15:28 2011
@@ -133,6 +133,7 @@
 							tipText = CommonStrings::itemType_Polygon;
  							break;
  						case PageItem::PolyLine:
+						case PageItem::Spiral:
 							tipText = CommonStrings::itemType_Polyline;
  							break;
  						case PageItem::PathText:
@@ -495,6 +496,7 @@
 		item->setIcon( 0, polygonIcon );
 		break;
 	case PageItem::PolyLine:
+	case PageItem::Spiral:
 		item->setIcon( 0, polylineIcon );
 		break;
 	case PageItem::PathText:

Modified: branches/ScribusOIF/scribus/ui/prefs_itemtools.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/ui/prefs_itemtools.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/prefs_itemtools.cpp (original)
+++ branches/ScribusOIF/scribus/ui/prefs_itemtools.cpp Sat Jan 29 14:15:28 2011
@@ -194,6 +194,11 @@
 	calPenAngleSpinBox->setValue(prefsData->itemToolPrefs.calligrapicPenAngle);
 	calPenWidthSpinBox->setValue(prefsData->itemToolPrefs.calligrapicPenWidth);
 
+	// Arc Tool
+	arcDisplay->restoreDefaults(&prefsData->itemToolPrefs);
+	// Spiral Tool
+	spiralDisplay->restoreDefaults(&prefsData->itemToolPrefs);
+
 	enableSignals(true);
 }
 
@@ -312,6 +317,11 @@
 	prefsData->itemToolPrefs.calligrapicPenLineWidth = calPenLineWidthSpinBox->value();
 	prefsData->itemToolPrefs.calligrapicPenAngle = calPenAngleSpinBox->value();
 	prefsData->itemToolPrefs.calligrapicPenWidth = calPenWidthSpinBox->value();
+
+	//Arc Tool
+	arcDisplay->saveGuiToPrefs(&prefsData->itemToolPrefs);
+	//Spiral Tool
+	spiralDisplay->saveGuiToPrefs(&prefsData->itemToolPrefs);
 }
 
 void Prefs_ItemTools::enableSignals(bool on)

Modified: branches/ScribusOIF/scribus/ui/prefs_itemtoolsbase.ui
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/ui/prefs_itemtoolsbase.ui
==============================================================================
--- branches/ScribusOIF/scribus/ui/prefs_itemtoolsbase.ui (original)
+++ branches/ScribusOIF/scribus/ui/prefs_itemtoolsbase.ui Sat Jan 29 14:15:28 2011
@@ -79,8 +79,8 @@
            <rect>
             <x>0</x>
             <y>0</y>
-            <width>637</width>
-            <height>632</height>
+            <width>643</width>
+            <height>646</height>
            </rect>
           </property>
           <layout class="QVBoxLayout" name="verticalLayout_2">
@@ -651,8 +651,8 @@
            <rect>
             <x>0</x>
             <y>0</y>
-            <width>637</width>
-            <height>632</height>
+            <width>643</width>
+            <height>646</height>
            </rect>
           </property>
           <layout class="QVBoxLayout" name="verticalLayout_7">
@@ -1440,6 +1440,93 @@
        </item>
       </layout>
      </widget>
+     <widget class="QWidget" name="tab_5">
+      <attribute name="title">
+       <string>Arc</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="verticalLayout_10">
+       <item>
+        <layout class="QHBoxLayout" name="horizontalLayout_11">
+         <item>
+          <widget class="ArcWidget" name="arcDisplay" native="true">
+           <property name="minimumSize">
+            <size>
+             <width>100</width>
+             <height>100</height>
+            </size>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <spacer name="horizontalSpacer_17">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>40</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <spacer name="verticalSpacer_12">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>10</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="tab_6">
+      <attribute name="title">
+       <string>Spiral</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="verticalLayout_11">
+       <item>
+        <layout class="QHBoxLayout" name="horizontalLayout_12">
+         <item>
+          <widget class="SpiralWidget" name="spiralDisplay" native="true">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="minimumSize">
+            <size>
+             <width>100</width>
+             <height>100</height>
+            </size>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <spacer name="horizontalSpacer_18">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>40</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+        </layout>
+       </item>
+      </layout>
+     </widget>
     </widget>
    </item>
   </layout>
@@ -1447,8 +1534,8 @@
  <customwidgets>
   <customwidget>
    <class>ScrSpinBox</class>
-   <extends>QSpinBox</extends>
-   <header location="global">ui/scrspinbox.h</header>
+   <extends>QDoubleSpinBox</extends>
+   <header>ui/scrspinbox.h</header>
   </customwidget>
   <customwidget>
    <class>FontCombo</class>
@@ -1480,6 +1567,18 @@
    <class>LinkButton</class>
    <extends>QToolButton</extends>
    <header>ui/linkbutton.h</header>
+  </customwidget>
+  <customwidget>
+   <class>ArcWidget</class>
+   <extends>QWidget</extends>
+   <header>ui/arcwidget.h</header>
+   <container>1</container>
+  </customwidget>
+  <customwidget>
+   <class>SpiralWidget</class>
+   <extends>QWidget</extends>
+   <header>ui/spiralwidget.h</header>
+   <container>1</container>
   </customwidget>
  </customwidgets>
  <tabstops>

Modified: branches/ScribusOIF/scribus/ui/propertiespalette.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/ui/propertiespalette.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette.cpp Sat Jan 29 14:15:28 2011
@@ -581,6 +581,7 @@
 			TabStack->setItemEnabled(idLineItem, true);
 			break;
 		case PageItem::PolyLine:
+		case PageItem::Spiral:
 			TabStack->setItemEnabled(idShapeItem, true);
 			TabStack->setItemEnabled(idTextItem, false);
 			TabStack->setItemEnabled(idImageItem, false);

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_line.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/ui/propertiespalette_line.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_line.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_line.cpp Sat Jan 29 14:15:28 2011
@@ -267,7 +267,7 @@
 	endArrowScale->blockSignals(true);
 	lineMode->blockSignals(true);
 
-	if ((m_item->asLine()) || (m_item->asPolyLine()))
+	if ((m_item->asLine()) || (m_item->asPolyLine()) || (m_item->asSpiral()))
 	{
 		startArrow->setEnabled(true);
 		endArrow->setEnabled(true);

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_shape.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/ui/propertiespalette_shape.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_shape.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_shape.cpp Sat Jan 29 14:15:28 2011
@@ -194,11 +194,12 @@
 	if (m_item)
 	{
 		enabled  = true;
+		enabled &= !m_item->isArc();
 		enabled &= !m_item->isLine();
+		enabled &= !m_item->isPathText();
 		enabled &= !m_item->isPolyLine();
-		enabled &= !m_item->isPathText();
+		enabled &= !m_item->isSpiral();
 		enabled &= !m_item->isRegularPolygon();
-		enabled &= !m_item->isArc();
 		enabled &= !m_item->locked();
 	}
 	customShape->setEnabled(enabled);
@@ -280,6 +281,7 @@
 				roundRect->setEnabled(false);
 			break;
 		case PageItem::PolyLine:
+		case PageItem::Spiral:
 			setEnabled(true);
 			roundRect->setEnabled(false);
 			break;
@@ -423,6 +425,11 @@
 		else if (m_item->asArc())
 		{
 			m_ScMW->view->requestMode(modeEditArc);
+			roundRect->setEnabled(false);
+		}
+		else if (m_item->asSpiral())
+		{
+			m_ScMW->view->requestMode(modeEditSpiral);
 			roundRect->setEnabled(false);
 		}
 		else

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_xyz.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/ui/propertiespalette_xyz.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_xyz.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_xyz.cpp Sat Jan 29 14:15:28 2011
@@ -20,6 +20,7 @@
 #include "sccolorengine.h"
 #include "pageitem.h"
 #include "pageitem_arc.h"
+#include "pageitem_spiral.h"
 #include "pageitem_textframe.h"
 #include "propertiespalette_utils.h"
 #include "sccombobox.h"
@@ -318,7 +319,7 @@
 	displayXY(selX, selY);
 	displayWH(selW, selH);
 	
-	bool checkableFlip = (i->isImageFrame() || i->isTextFrame() || i->isLatexFrame() || i->isOSGFrame() || i->isSymbol() || i->isGroup());
+	bool checkableFlip = (i->isImageFrame() || i->isTextFrame() || i->isLatexFrame() || i->isOSGFrame() || i->isSymbol() || i->isGroup() || i->isSpiral());
 	flipH->setCheckable(checkableFlip);
 	flipV->setCheckable(checkableFlip);
 
@@ -481,7 +482,7 @@
 		//It then gets reset below for items where its valid
 		flipH->setCheckable(true);
 		flipV->setCheckable(true);
-		if ((itemType == 2) || (itemType == 4) || ((itemType >= 9) && (itemType <= 12)))
+		if ((itemType == 2) || (itemType == 4) || ((itemType >= 9) && (itemType <= 12)) || (itemType == 15))
 		{
 			flipH->setCheckable(true);
 			flipV->setCheckable(true);
@@ -942,6 +943,11 @@
 			FPoint tp2(getMinClipF(&m_item->PoLine));
 			m_item->PoLine.translate(-tp2.x(), -tp2.y());
 			m_doc->AdjustItemSize(m_item);
+		}
+		if (m_item->isSpiral())
+		{
+			PageItem_Spiral* item = m_item->asSpiral();
+			item->recalcPath();
 		}
 		m_item->Sizing = oldS;
 	}
@@ -1065,6 +1071,11 @@
 				m_item->PoLine.translate(-tp2.x(), -tp2.y());
 				m_doc->AdjustItemSize(m_item);
 			}
+			if (m_item->isSpiral())
+			{
+				PageItem_Spiral* item = m_item->asSpiral();
+				item->recalcPath();
+			}
 			m_item->Sizing = oldS;
 		}
 		//emit DocChanged();

Modified: branches/ScribusOIF/scribus/ui/propertywidget_line.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/ui/propertywidget_line.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_line.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_line.cpp Sat Jan 29 14:15:28 2011
@@ -262,7 +262,7 @@
 		rightLine->setChecked(m_item->RightLine);
 		bottomLine->setChecked(m_item->BottomLine);
 	}
-	else if ((m_item->asLine()) || (m_item->asPolyLine()))
+	else if ((m_item->asLine()) || (m_item->asPolyLine()) || (m_item->asSpiral()))
 	{
 		stackedWidget->setCurrentIndex(1);
 		stackedWidget->setVisible(true);

Modified: branches/ScribusOIF/scribus/ui/propertywidget_pos.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/ui/propertywidget_pos.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_pos.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_pos.cpp Sat Jan 29 14:15:28 2011
@@ -18,6 +18,7 @@
 #include "sccolorengine.h"
 #include "pageitem.h"
 #include "pageitem_arc.h"
+#include "pageitem_spiral.h"
 #include "pageitem_textframe.h"
 #include "propertiespalette_utils.h"
 #include "sccombobox.h"
@@ -225,12 +226,13 @@
 		int itemType = m_item->itemType();
 		
 		bool checkableFlip = false;
+		checkableFlip |= m_item->isGroup();
 		checkableFlip |= m_item->isImageFrame();
 		checkableFlip |= m_item->isTextFrame();
 		checkableFlip |= m_item->isLatexFrame();
 		checkableFlip |= m_item->isOSGFrame();
+		checkableFlip |= m_item->isSpiral();
 		checkableFlip |= m_item->isSymbol();
-		checkableFlip |= m_item->isGroup();
 		flipH->setCheckable(checkableFlip);
 		flipV->setCheckable(checkableFlip);
 		
@@ -896,6 +898,11 @@
 			FPoint tp2(getMinClipF(&m_item->PoLine));
 			m_item->PoLine.translate(-tp2.x(), -tp2.y());
 			m_doc->AdjustItemSize(m_item);
+		}
+		if (m_item->isSpiral())
+		{
+			PageItem_Spiral* item = m_item->asSpiral();
+			item->recalcPath();
 		}
 		m_item->Sizing = oldS;
 	}
@@ -1019,6 +1026,11 @@
 				m_item->PoLine.translate(-tp2.x(), -tp2.y());
 				m_doc->AdjustItemSize(m_item);
 			}
+			if (m_item->isSpiral())
+			{
+				PageItem_Spiral* item = m_item->asSpiral();
+				item->recalcPath();
+			}
 			m_item->Sizing = oldS;
 		}
 		//emit DocChanged();

Modified: branches/ScribusOIF/scribus/ui/propertywidget_shape.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/ui/propertywidget_shape.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertywidget_shape.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertywidget_shape.cpp Sat Jan 29 14:15:28 2011
@@ -108,11 +108,12 @@
 	if (m_item)
 	{
 		enabled  = true;
+		enabled &= !m_item->isArc();
 		enabled &= !m_item->isLine();
+		enabled &= !m_item->isPathText();
 		enabled &= !m_item->isPolyLine();
-		enabled &= !m_item->isPathText();
+		enabled &= !m_item->isSpiral();
 		enabled &= !m_item->isRegularPolygon();
-		enabled &= !m_item->isArc();
 		enabled &= !m_item->locked();
 	}
 	customShape->setEnabled(enabled);
@@ -181,6 +182,7 @@
 			break;
 		case PageItem::PolyLine:
 		case PageItem::PathText:
+		case PageItem::Spiral:
 			setEnabled(true);
 			roundRect->setEnabled(false);
 			break;
@@ -373,6 +375,11 @@
 		else if (m_item->asArc())
 		{
 			m_ScMW->view->requestMode(modeEditArc);
+			roundRect->setEnabled(false);
+		}
+		else if (m_item->asSpiral())
+		{
+			m_ScMW->view->requestMode(modeEditSpiral);
 			roundRect->setEnabled(false);
 		}
 		else

Modified: branches/ScribusOIF/scribus/util_math.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/util_math.cpp
==============================================================================
--- branches/ScribusOIF/scribus/util_math.cpp (original)
+++ branches/ScribusOIF/scribus/util_math.cpp Sat Jan 29 14:15:28 2011
@@ -161,6 +161,114 @@
 	return pts;
 }
 
+QPainterPath SpiralPath(double spiralWidth, double spiralHeight, double spiralStartAngle, double spiralEndAngle, double spiralFactor)
+{
+	if (spiralStartAngle >= spiralEndAngle)
+		return QPainterPath();
+	double startAngleK = spiralStartAngle;
+	double endAngleK = spiralEndAngle;
+	QPainterPath path, path2;
+	double sh = spiralHeight / (spiralFactor + 1.0);
+	double sw = 0.0;
+	double ww = spiralWidth;
+	double hh = spiralHeight - sh;
+	double segStart = 0.0;
+	double segEnd = 180.0;
+	double spanAngle = 180.0;
+	double startAngle = 0.0;
+	bool segPart = true;
+	bool draw = false;
+	QPointF tp;
+	path2.moveTo(sw, sh);
+	while (segStart < endAngleK)
+	{
+		if (startAngleK >= segEnd)
+		{
+			tp = path2.currentPosition();
+			if (segPart)
+			{
+				sw = tp.x();
+				sh = spiralHeight / (spiralFactor + 1.0);
+				path2.arcTo(sw, sh - hh, ww, hh * 2, 180, 180);
+			}
+			else
+			{
+				sw = tp.x() - ww;
+				sh = spiralHeight / (spiralFactor + 1.0) - hh;
+				path2.arcTo(sw, sh, ww, hh * 2, 0, 180);
+			}
+			segPart = !segPart;
+			ww /= spiralFactor;
+			hh /= spiralFactor;
+			segStart += 180.0;
+			segEnd += 180.0;
+			spanAngle = 180.0;
+			continue;
+		}
+		if ((startAngleK >= segStart) && (startAngleK <= segEnd))
+		{
+			startAngle = startAngleK + 180;
+			spanAngle = segEnd - startAngleK;
+			if ((endAngleK >= segStart) && (endAngleK <= segEnd))
+				spanAngle -= segEnd - endAngleK;
+			if (segPart)
+			{
+				sw = tp.x();
+				sh = spiralHeight / (spiralFactor + 1.0);
+				path.arcMoveTo(sw, sh - hh, ww, hh * 2, startAngle);
+				path.arcTo(sw, sh - hh, ww, hh * 2, startAngle, spanAngle);
+				startAngle = 0.0;
+			}
+			else
+			{
+				sw = tp.x() - ww;
+				sh = spiralHeight / (spiralFactor + 1.0) - hh;
+				path.arcMoveTo(sw, sh, ww, hh * 2, startAngle);
+				path.arcTo(sw, sh, ww, hh * 2, startAngle, spanAngle);
+				startAngle = 180.0;
+			}
+			draw = true;
+			segPart = !segPart;
+			ww /= spiralFactor;
+			hh /= spiralFactor;
+			if ((endAngleK >= segStart) && (endAngleK <= segEnd))
+				break;
+			segStart += 180.0;
+			segEnd += 180.0;
+			spanAngle = 180.0;
+			continue;
+		}
+		if ((endAngleK >= segStart) && (endAngleK <= segEnd))
+			spanAngle -= segEnd - endAngleK;
+		tp = path.currentPosition();
+		if (segPart)
+		{
+			sw = tp.x();
+			sh = tp.y();
+			if (draw)
+				path.arcTo(sw, sh - hh, ww, hh * 2, startAngle, spanAngle);
+			startAngle = 0.0;
+		}
+		else
+		{
+			sw = tp.x() - ww;
+			sh = tp.y() - hh;
+			if (draw)
+				path.arcTo(sw, sh, ww, hh * 2, startAngle, spanAngle);
+			startAngle = 180.0;
+		}
+		segPart = !segPart;
+		ww /= spiralFactor;
+		hh /= spiralFactor;
+		if ((endAngleK >= segStart) && (endAngleK <= segEnd))
+			break;
+		segStart += 180.0;
+		segEnd += 180.0;
+		spanAngle = 180.0;
+	}
+	return path;
+}
+
 QList<QPainterPath> decomposePath(QPainterPath &path)
 {
 	QList<QPainterPath> ret;

Modified: branches/ScribusOIF/scribus/util_math.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/scribus/util_math.h
==============================================================================
--- branches/ScribusOIF/scribus/util_math.h (original)
+++ branches/ScribusOIF/scribus/util_math.h Sat Jan 29 14:15:28 2011
@@ -35,6 +35,7 @@
 QPolygon SCRIBUS_API FlattenPath(const FPointArray& ina, QList<uint> &Segs);
 QList<QPainterPath> SCRIBUS_API decomposePath(QPainterPath &path);
 QPainterPath SCRIBUS_API RegularPolygonPath(double w, double h, uint c, bool star, double factor, double rota, double factor2 = 0.0, double innerRot = 0.0, double factor3 = 0.0);
+QPainterPath SCRIBUS_API SpiralPath(double spiralWidth, double spiralHeight, double spiralStartAngle, double spiralEndAngle, double spiralFactor);
 uint SCRIBUS_API getDouble(QString in, bool raw);
 inline double SCRIBUS_API sind(double);
 inline double SCRIBUS_API cosd(double);

Modified: branches/ScribusOIF/win32/vc9/Scribus.vcproj
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16318&path=/branches/ScribusOIF/win32/vc9/Scribus.vcproj
==============================================================================
--- branches/ScribusOIF/win32/vc9/Scribus.vcproj (original)
+++ branches/ScribusOIF/win32/vc9/Scribus.vcproj Sat Jan 29 14:15:28 2011
@@ -353,6 +353,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\ui\arcwidget.cpp"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\ui\arrowchooser.cpp"
 				>
 			</File>
@@ -457,6 +461,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\canvasmode_editspiral.cpp"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\canvasmode_eyedropper.cpp"
 				>
 			</File>
@@ -1053,6 +1061,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\pageitem_spiral.cpp"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\pageitem_symbol.cpp"
 				>
 			</File>
@@ -1846,6 +1858,14 @@
 			</File>
 			<File
 				RelativePath="..\..\scribus\text\specialchars.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\scribus\ui\spiralvectordialog.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\scribus\ui\spiralwidget.cpp"
 				>
 			</File>
 			<File
@@ -2234,6 +2254,24 @@
 				</FileConfiguration>
 			</File>
 			<File
+				RelativePath="..\..\scribus\ui\arcwidget.h"
+				>
+				<FileConfiguration
+					Name="Debug-cairo|Win32"
+					>
+					<Tool
+						Name="moc.exe"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release-cairo|Win32"
+					>
+					<Tool
+						Name="moc.exe"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
 				RelativePath="..\..\scribus\ui\arrowchooser.h"
 				>
 				<FileConfiguration
@@ -2507,6 +2545,24 @@
 			</File>
 			<File
 				RelativePath="..\..\scribus\canvasmode_editpolygon.h"
+				>
+				<FileConfiguration
+					Name="Debug-cairo|Win32"
+					>
+					<Tool
+						Name="moc.exe"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release-cairo|Win32"
+					>
+					<Tool
+						Name="moc.exe"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\scribus\canvasmode_editspiral.h"
 				>
 				<FileConfiguration
 					Name="Debug-cairo|Win32"
@@ -4588,6 +4644,24 @@
 				</FileConfiguration>
 			</File>
 			<File
+				RelativePath="..\..\scribus\pageitem_spiral.h"
+				>
+				<FileConfiguration
+					Name="Debug-cairo|Win32"
+					>
+					<Tool
+						Name="moc.exe"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release-cairo|Win32"
+					>
+					<Tool
+						Name="moc.exe"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
 				RelativePath="..\..\scribus\pageitem_symbol.h"
 				>
 				<FileConfiguration
@@ -7348,6 +7422,42 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\ui\spiralvectordialog.h"
+				>
+				<FileConfiguration
+					Name="Debug-cairo|Win32"
+					>
+					<Tool
+						Name="moc.exe"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release-cairo|Win32"
+					>
+					<Tool
+						Name="moc.exe"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\scribus\ui\spiralwidget.h"
+				>
+				<FileConfiguration
+					Name="Debug-cairo|Win32"
+					>
+					<Tool
+						Name="moc.exe"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release-cairo|Win32"
+					>
+					<Tool
+						Name="moc.exe"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
 				RelativePath="..\..\scribus\ui\splash.h"
 				>
 			</File>
@@ -7915,6 +8025,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\ui\ui_arcwidgetbase.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\ui\ui_charselect.h"
 				>
 			</File>
@@ -8244,6 +8358,14 @@
 			</File>
 			<File
 				RelativePath="..\..\scribus\ui\ui_smreplacedia.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\scribus\ui\ui_spiralvectorbase.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\scribus\ui\ui_spiralwidgetbase.h"
 				>
 			</File>
 			<File
@@ -8312,6 +8434,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\ui\moc_arcwidget.cpp"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\ui\moc_arrowchooser.cpp"
 				>
 			</File>
@@ -8360,7 +8486,11 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\..\..\scribus-1.5.x-svn\Scribus\scribus\moc_canvasmode_editpolygon.cpp"
+				RelativePath="..\..\scribus\moc_canvasmode_editpolygon.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\scribus\moc_canvasmode_editspiral.cpp"
 				>
 			</File>
 			<File
@@ -8752,6 +8882,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\moc_pageitem_spiral.cpp"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\moc_pageitem_symbol.cpp"
 				>
 			</File>
@@ -9269,6 +9403,14 @@
 			</File>
 			<File
 				RelativePath="..\..\scribus\ui\moc_spalette.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\scribus\ui\moc_spiralvectordialog.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\scribus\ui\moc_spiralwidget.cpp"
 				>
 			</File>
 			<File
@@ -9377,6 +9519,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\scribus\ui\arcwidgetbase.ui"
+				>
+			</File>
+			<File
 				RelativePath="..\..\scribus\ui\charselect.ui"
 				>
 			</File>
@@ -9714,6 +9860,14 @@
 			</File>
 			<File
 				RelativePath="..\..\scribus\ui\smstyleimport.ui"
+				>
+			</File>
+			<File
+				RelativePath="..\..\scribus\ui\spiralvectorbase.ui"
+				>
+			</File>
+			<File
+				RelativePath="..\..\scribus\ui\spiralwidgetbase.ui"
 				>
 			</File>
 			<File




More information about the scribus-commit mailing list