r14022 by cbradney - Remove polyFactorValue, rename polyFactorValue2 to polyFactor, adjust as necessary and pray

scribus-commit scribus-commit at lists.scribus.net
Mon Sep 21 22:45:46 CEST 2009


Revision: 14022
Author: cbradney
Date: 2009-09-21T20:46:40.616713Z
Commit message: Remove polyFactorValue, rename polyFactorValue2 to polyFactor, adjust as necessary and pray

Changeset: 
M  /trunk/Scribus/scribus/ui/polyprops.h
M  /trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
M  /trunk/Scribus/scribus/ui/prefs.cpp
M  /trunk/Scribus/scribus/ui/reformdoc.cpp
M  /trunk/Scribus/scribus/canvasmode_create.cpp
M  /trunk/Scribus/scribus/ui/tabtools.cpp
M  /trunk/Scribus/scribus/canvasmode_legacy.cpp
M  /trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
M  /trunk/Scribus/scribus/fileloader.cpp
M  /trunk/Scribus/scribus/ui/polygonwidget.cpp
M  /trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
M  /trunk/Scribus/scribus/prefsmanager.cpp
M  /trunk/Scribus/scribus/prefsstructs.h
M  /trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
M  /trunk/Scribus/scribus/ui/polygonwidget.h
M  /trunk/Scribus/scribus/ui/modetoolbar.cpp
M  /trunk/Scribus/scribus/ui/polyprops.cpp
M  /trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp

Diffs:
Index: scribus/fileloader.cpp
===================================================================
--- scribus/fileloader.cpp	(revision 14021)
+++ scribus/fileloader.cpp	(revision 14022)
@@ -261,10 +261,10 @@
 	currDoc->guidesSettings.baselineGridShown = prefsManager->appPrefs.guidesPrefs.baselineGridShown;
 	currDoc->guidesSettings.linkShown = prefsManager->appPrefs.guidesPrefs.linkShown;
 	currDoc->itemToolPrefs.polyCorners = prefsManager->appPrefs.itemToolPrefs.polyCorners;
-	currDoc->itemToolPrefs.polyFactorValue2 = prefsManager->appPrefs.itemToolPrefs.polyFactorValue2;
+	currDoc->itemToolPrefs.polyFactor = prefsManager->appPrefs.itemToolPrefs.polyFactor;
 	currDoc->itemToolPrefs.polyRotation = prefsManager->appPrefs.itemToolPrefs.polyRotation;
 	currDoc->itemToolPrefs.polyCurvature = prefsManager->appPrefs.itemToolPrefs.polyCurvature;
-	currDoc->itemToolPrefs.polyFactorValue = prefsManager->appPrefs.itemToolPrefs.polyFactorValue;
+//	currDoc->itemToolPrefs.polyFactorValue = prefsManager->appPrefs.itemToolPrefs.polyFactorValue;
 	currDoc->itemToolPrefs.polyUseFactor = prefsManager->appPrefs.itemToolPrefs.polyUseFactor;
 	currDoc->AutoSave = prefsManager->appPrefs.docSetupPrefs.AutoSave;
 	currDoc->AutoSaveTime = prefsManager->appPrefs.docSetupPrefs.AutoSaveTime;
Index: scribus/canvasmode_create.cpp
===================================================================
--- scribus/canvasmode_create.cpp	(revision 14021)
+++ scribus/canvasmode_create.cpp	(revision 14022)
@@ -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.polyFactorValue2, m_doc->itemToolPrefs.polyRotation, m_doc->itemToolPrefs.polyCurvature);
+			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);
 			p->translate(localRect.left(), localRect.top());
 			p->drawPath(path);
 		}
@@ -685,7 +685,7 @@
 				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.polyFactorValue2, m_doc->itemToolPrefs.polyRotation, m_doc->itemToolPrefs.polyCurvature);
+			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);
Index: scribus/canvasmode_legacy.cpp
===================================================================
--- scribus/canvasmode_legacy.cpp	(revision 14021)
+++ scribus/canvasmode_legacy.cpp	(revision 14022)
@@ -2011,7 +2011,7 @@
 					z = m_doc->itemAdd(PageItem::Polygon, PageItem::Unspecified, Rxp, Ryp, 1+Rxpd, 1+Rypd, m_doc->itemToolPrefs.shapeLineWidth, m_doc->itemToolPrefs.shapeFillColor, m_doc->itemToolPrefs.shapeLineColor, !m_canvas->m_viewMode.m_MouseButtonPressed);
 				}
 				currItem = m_doc->Items->at(z);
-				QPainterPath path = RegularPolygon(currItem->width(), currItem->height(), m_doc->itemToolPrefs.polyCorners, m_doc->itemToolPrefs.polyUseFactor, m_doc->itemToolPrefs.polyFactorValue2, m_doc->itemToolPrefs.polyRotation, m_doc->itemToolPrefs.polyCurvature);
+				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);
 				currItem->Clip = FlattenPath(currItem->PoLine, currItem->Segments);
 				qApp->changeOverrideCursor(QCursor(Qt::SizeFDiagCursor));
Index: scribus/prefsmanager.cpp
===================================================================
--- scribus/prefsmanager.cpp	(revision 14021)
+++ scribus/prefsmanager.cpp	(revision 14022)
@@ -284,9 +284,9 @@
 	appPrefs.guidesPrefs.guidePlacement = true;
 	appPrefs.docSetupPrefs.docUnitIndex = 0;
 	appPrefs.itemToolPrefs.polyCorners = 4;
-	appPrefs.itemToolPrefs.polyFactorValue2 = 0.5;
+	appPrefs.itemToolPrefs.polyFactor = 0.5;
 	appPrefs.itemToolPrefs.polyUseFactor = false;
-	appPrefs.itemToolPrefs.polyFactorValue = 0;
+//	appPrefs.itemToolPrefs.polyFactorValue = 0;
 	appPrefs.itemToolPrefs.polyRotation = 0.0;
 	appPrefs.itemToolPrefs.polyCurvature = 0.0;
 //	appPrefs.PSize = 40;
@@ -1355,9 +1355,9 @@
 	dc9.setAttribute("PICTSCX",ScCLocale::toQStringC(appPrefs.itemToolPrefs.imageScaleX));
 	dc9.setAttribute("PICTSCY",ScCLocale::toQStringC(appPrefs.itemToolPrefs.imageScaleY));
 	dc9.setAttribute("POLYC", appPrefs.itemToolPrefs.polyCorners);
-	dc9.setAttribute("POLYF", ScCLocale::toQStringC(appPrefs.itemToolPrefs.polyFactorValue2));
+	dc9.setAttribute("POLYF", ScCLocale::toQStringC(appPrefs.itemToolPrefs.polyFactor));
 	dc9.setAttribute("POLYR", ScCLocale::toQStringC(appPrefs.itemToolPrefs.polyRotation));
-	dc9.setAttribute("POLYFD", appPrefs.itemToolPrefs.polyFactorValue);
+//	dc9.setAttribute("POLYFD", appPrefs.itemToolPrefs.polyFactorValue);
 	dc9.setAttribute("POLYCUR", ScCLocale::toQStringC(appPrefs.itemToolPrefs.polyCurvature));
 	dc9.setAttribute("POLYS", static_cast<int>(appPrefs.itemToolPrefs.polyUseFactor));
 	dc9.setAttribute("PSCALE", static_cast<int>(appPrefs.itemToolPrefs.imageScaleType));
@@ -1926,10 +1926,10 @@
 			appPrefs.itemToolPrefs.imageUseEmbeddedPath = static_cast<bool>(dc.attribute("EmbeddedPath", "0").toInt());
 			appPrefs.itemToolPrefs.imageLowResType = dc.attribute("HalfRes", "1").toInt();
 			appPrefs.itemToolPrefs.polyCorners = dc.attribute("POLYC", "4").toInt();
-			appPrefs.itemToolPrefs.polyFactorValue2 = ScCLocale::toDoubleC(dc.attribute("POLYF"), 0.5);
+			appPrefs.itemToolPrefs.polyFactor = ScCLocale::toDoubleC(dc.attribute("POLYF"), 0.5);
 			appPrefs.itemToolPrefs.polyRotation = ScCLocale::toDoubleC(dc.attribute("POLYR"), 0.0);
 			appPrefs.itemToolPrefs.polyCurvature = ScCLocale::toDoubleC(dc.attribute("POLYCUR"), 0.0);
-			appPrefs.itemToolPrefs.polyFactorValue = dc.attribute("POLYFD", "0").toInt();
+//			appPrefs.itemToolPrefs.polyFactorValue = dc.attribute("POLYFD", "0").toInt();
 			appPrefs.itemToolPrefs.polyUseFactor  = static_cast<bool>(dc.attribute("POLYS", "0").toInt());
 			appPrefs.itemToolPrefs.lineStartArrow = dc.attribute("StartArrow", "0").toInt();
 			appPrefs.itemToolPrefs.lineEndArrow   = dc.attribute("EndArrow", "0").toInt();
Index: scribus/prefsstructs.h
===================================================================
--- scribus/prefsstructs.h	(revision 14021)
+++ scribus/prefsstructs.h	(revision 14022)
@@ -180,8 +180,8 @@
 	int lineEndArrow; //! Ending arrow, 0 = none
 	/* Regular Polygon Tool */
 	int polyCorners;  //! Number of corners for a polygon
-	int polyFactorValue; //! Factor as an integer????
-	double polyFactorValue2; //! Convex/Concave factor as a double
+//	int polyFactorValue; //! Factor as an integer????
+	double polyFactor; //! Convex/Concave factor as a double
 	bool polyUseFactor; //! Whether to use a factor for shaping
 	double polyRotation; //! Rotation of a polygon
 	double polyCurvature; //! Curvature of polygon
Index: scribus/ui/polygonwidget.h
===================================================================
--- scribus/ui/polygonwidget.h	(revision 14021)
+++ scribus/ui/polygonwidget.h	(revision 14022)
@@ -16,11 +16,11 @@
 	Q_OBJECT
 
 public:
-	PolygonWidget(QWidget* parent, int polyC, int polyFd, double polyF, bool polyS, double polyR, double polyCurvature);
+	PolygonWidget(QWidget* parent, int polyC, /*int polyFd, */double polyF, bool polyS, double polyR, double polyCurvature);
 	~PolygonWidget() {};
 	double GetZeroFaktor();
 	double GetMaxFaktor();
-	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);
 	void restoreDefaults(struct ItemToolPrefs *prefsData);
 	double PFactor;
 
Index: scribus/ui/polygonwidget.cpp
===================================================================
--- scribus/ui/polygonwidget.cpp	(revision 14021)
+++ scribus/ui/polygonwidget.cpp	(revision 14022)
@@ -22,7 +22,7 @@
 
 using namespace std;
 
-PolygonWidget::PolygonWidget(QWidget* parent, int polyC, int polyFd, double polyF, bool polyS, double polyR, double polyCurvature) : QWidget( parent )
+PolygonWidget::PolygonWidget(QWidget* parent, int polyC, /*int polyFd, */double polyF, bool polyS, double polyR, double polyCurvature) : QWidget( parent )
 {
 	setupUi(this);
 	PFactor = polyF;
@@ -30,9 +30,9 @@
 	Faktor2->setValue(static_cast<int>(polyR));
 	Slider2->setValue(static_cast<int>(polyR));
 	Konvex->setChecked(polyS);
-	Faktor->setValue(polyFd);
-	Slider1->setValue(polyFd);
-	if (polyFd == 0)
+	Faktor->setValue(polyF);
+	Slider1->setValue(polyF);
+	if (polyF == 0.0)
 		Konvex->setChecked(false);
 	CurvatureSpin->setValue(qRound(polyCurvature * 100));
 	CurvatureSlider->setValue(qRound(polyCurvature * 100));
@@ -65,14 +65,14 @@
 	disconnect(CurvatureSpin, SIGNAL(valueChanged(int)), this, SLOT(ValFromSpin3(int)));
 	disconnect(CurvatureSlider, SIGNAL(valueChanged(int)), CurvatureSpin, SLOT(setValue(int)));
 	disconnect(CurvatureSlider, SIGNAL(valueChanged(int)), this, SLOT(UpdatePreView()));
-	PFactor = prefsData->polyUseFactor;
+	PFactor = prefsData->polyFactor;
 	Ecken->setValue(prefsData->polyCorners);
 	Faktor2->setValue(static_cast<int>(prefsData->polyRotation));
 	Slider2->setValue(static_cast<int>(prefsData->polyRotation));
 	Konvex->setChecked(prefsData->polyUseFactor);
-	Faktor->setValue(prefsData->polyFactorValue);
-	Slider1->setValue(prefsData->polyFactorValue);
-	if (prefsData->polyFactorValue == 0)
+	Faktor->setValue(prefsData->polyFactor);
+	Slider1->setValue(prefsData->polyFactor);
+	if (prefsData->polyFactor == 0.0)
 		Konvex->setChecked(false);
 	CurvatureSpin->setValue(qRound(prefsData->polyCurvature * 100));
 	CurvatureSlider->setValue(qRound(prefsData->polyCurvature * 100));
@@ -90,12 +90,12 @@
 	connect(CurvatureSlider, SIGNAL(valueChanged(int)), this, SLOT(UpdatePreView()));
 }
 
-void PolygonWidget::getValues(int* polyC, int* polyFd, double* polyF, bool* polyS, double* polyR, double* polyCurvature)
+void PolygonWidget::getValues(int* polyC, /*int* polyFd, */double* polyF, bool* polyS, double* polyR, double* polyCurvature)
 {
 	*polyC = Ecken->value();
-	*polyF = PFactor;
+	*polyF = Slider1->value();
 	*polyS = Konvex->isChecked();
-	*polyFd = Slider1->value();
+//	*polyFd = Slider1->value();
 	*polyR = Faktor2->value();
 	*polyCurvature = CurvatureSpin->value() / 100.0;
 }
Index: scribus/ui/prefs.cpp
===================================================================
--- scribus/ui/prefs.cpp	(revision 14021)
+++ scribus/ui/prefs.cpp	(revision 14022)
@@ -392,8 +392,8 @@
 	prefsManager->appPrefs.scrapbookPrefs.numScrapbookCopies = tabScrapbook->numScrapCopies->value();
 
 	tabTools->polyWidget->getValues(&prefsManager->appPrefs.itemToolPrefs.polyCorners,
-									&prefsManager->appPrefs.itemToolPrefs.polyFactorValue,
-									&prefsManager->appPrefs.itemToolPrefs.polyFactorValue2,
+//									&prefsManager->appPrefs.itemToolPrefs.polyFactorValue,
+									&prefsManager->appPrefs.itemToolPrefs.polyFactor,
 									&prefsManager->appPrefs.itemToolPrefs.polyUseFactor,
 									&prefsManager->appPrefs.itemToolPrefs.polyRotation,
 									&prefsManager->appPrefs.itemToolPrefs.polyCurvature);
Index: scribus/ui/modetoolbar.cpp
===================================================================
--- scribus/ui/modetoolbar.cpp	(revision 14021)
+++ scribus/ui/modetoolbar.cpp	(revision 14022)
@@ -89,9 +89,9 @@
 
 void ModeToolBar::GetPolyProps()
 {
-	PolygonProps* dia = new PolygonProps(this, m_ScMW->doc->itemToolPrefs.polyCorners, m_ScMW->doc->itemToolPrefs.polyFactorValue, m_ScMW->doc->itemToolPrefs.polyFactorValue2, 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.polyFactorValue,*/ m_ScMW->doc->itemToolPrefs.polyFactor, m_ScMW->doc->itemToolPrefs.polyUseFactor, m_ScMW->doc->itemToolPrefs.polyRotation, m_ScMW->doc->itemToolPrefs.polyCurvature);
 	if (dia->exec())
-		dia->getValues(&m_ScMW->doc->itemToolPrefs.polyCorners, &m_ScMW->doc->itemToolPrefs.polyFactorValue, &m_ScMW->doc->itemToolPrefs.polyFactorValue2, &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.polyFactorValue,*/ &m_ScMW->doc->itemToolPrefs.polyFactor, &m_ScMW->doc->itemToolPrefs.polyUseFactor, &m_ScMW->doc->itemToolPrefs.polyRotation, &m_ScMW->doc->itemToolPrefs.polyCurvature);
 	delete dia;
 }
 
Index: scribus/ui/polyprops.h
===================================================================
--- scribus/ui/polyprops.h	(revision 14021)
+++ scribus/ui/polyprops.h	(revision 14022)
@@ -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);
 	~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);
 	PolygonWidget* polyWidget;
 	QPushButton* okButton;
 	QPushButton* cancelButton;
Index: scribus/ui/reformdoc.cpp
===================================================================
--- scribus/ui/reformdoc.cpp	(revision 14021)
+++ scribus/ui/reformdoc.cpp	(revision 14022)
@@ -430,8 +430,8 @@
 	currDoc->opToolPrefs.dispY = tabTools->genDispY->value();
 	currDoc->opToolPrefs.constrain = tabTools->genRot->value();
 	tabTools->polyWidget->getValues(&currDoc->itemToolPrefs.polyCorners,
-									&currDoc->itemToolPrefs.polyFactorValue,
-									&currDoc->itemToolPrefs.polyFactorValue2,
+//									&currDoc->itemToolPrefs.polyFactorValue,
+									&currDoc->itemToolPrefs.polyFactor,
 									&currDoc->itemToolPrefs.polyUseFactor,
 									&currDoc->itemToolPrefs.polyRotation,
 									&currDoc->itemToolPrefs.polyCurvature);
Index: scribus/ui/tabtools.cpp
===================================================================
--- scribus/ui/tabtools.cpp	(revision 14021)
+++ scribus/ui/tabtools.cpp	(revision 14022)
@@ -426,8 +426,8 @@
 	polygonHeadLine->setFont(f);
 	subTabPolygonLayout->addWidget( polygonHeadLine, 0, 0, Qt::AlignHCenter | Qt::AlignTop );
 	polyWidget = new PolygonWidget(subTabPolygon, prefsData->polyCorners,
-								   prefsData->polyFactorValue,
-								   prefsData->polyFactorValue2,
+//								   prefsData->polyFactorValue,
+								   prefsData->polyFactor,
 								   prefsData->polyUseFactor,
 								   prefsData->polyRotation,
 								   prefsData->polyCurvature);
Index: scribus/ui/polyprops.cpp
===================================================================
--- scribus/ui/polyprops.cpp	(revision 14021)
+++ scribus/ui/polyprops.cpp	(revision 14022)
@@ -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) : 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);
 	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)
 {
-	polyWidget->getValues(polyC, polyFd, polyF, polyS, polyR, polyCurvature);
+	polyWidget->getValues(polyC, /*polyFd,*/ polyF, polyS, polyR, polyCurvature);
 }
Index: scribus/plugins/fileloader/scribus13format/scribus13format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus13format/scribus13format.cpp	(revision 14021)
+++ scribus/plugins/fileloader/scribus13format/scribus13format.cpp	(revision 14022)
@@ -351,10 +351,10 @@
 		m_Doc->SnapGuides = static_cast<bool>(dc.attribute("SnapToGuides", "0").toInt());
 		m_Doc->useRaster = static_cast<bool>(dc.attribute("SnapToGrid", "0").toInt());
 		m_Doc->itemToolPrefs.polyCorners = dc.attribute("POLYC", "4").toInt();
-		m_Doc->itemToolPrefs.polyFactorValue2 = ScCLocale::toDoubleC(dc.attribute("POLYF"), 0.5);
+		m_Doc->itemToolPrefs.polyFactor = ScCLocale::toDoubleC(dc.attribute("POLYF"), 0.5);
 		m_Doc->itemToolPrefs.polyRotation = ScCLocale::toDoubleC(dc.attribute("POLYR"), 0.0);
 		m_Doc->itemToolPrefs.polyCurvature = 0.0;
-		m_Doc->itemToolPrefs.polyFactorValue = dc.attribute("POLYFD", "0").toInt();
+//		m_Doc->itemToolPrefs.polyFactorValue = dc.attribute("POLYFD", "0").toInt();
 		m_Doc->itemToolPrefs.polyUseFactor = static_cast<bool>(dc.attribute("POLYS", "0").toInt());
 		m_Doc->AutoSave = static_cast<bool>(dc.attribute("AutoSave", "0").toInt());
 		m_Doc->AutoSaveTime = dc.attribute("AutoSaveTime", "600000").toInt();
@@ -1268,9 +1268,9 @@
 	dc.setAttribute("GuideRad", m_Doc->guidesSettings.guideRad);
 	dc.setAttribute("GRAB",m_Doc->guidesSettings.grabRadius);
 	dc.setAttribute("POLYC", m_Doc->itemToolPrefs.polyCorners);
-	dc.setAttribute("POLYF", m_Doc->itemToolPrefs.polyFactorValue2);
+	dc.setAttribute("POLYF", m_Doc->itemToolPrefs.polyFactor);
 	dc.setAttribute("POLYR", m_Doc->itemToolPrefs.polyRotation);
-	dc.setAttribute("POLYFD", m_Doc->itemToolPrefs.polyFactorValue);
+//	dc.setAttribute("POLYFD", m_Doc->itemToolPrefs.polyFactorValue);
 	dc.setAttribute("POLYS", static_cast<int>(m_Doc->itemToolPrefs.polyUseFactor));
 	dc.setAttribute("AutoSave", static_cast<int>(m_Doc->AutoSave));
 	dc.setAttribute("AutoSaveTime", m_Doc->AutoSaveTime);
Index: scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
===================================================================
--- scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp	(revision 14021)
+++ scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp	(revision 14022)
@@ -177,10 +177,10 @@
 	docu.writeAttribute("GuideRad", m_Doc->guidesSettings.guideRad);
 	docu.writeAttribute("GRAB",m_Doc->guidesSettings.grabRadius);
 	docu.writeAttribute("POLYC", m_Doc->itemToolPrefs.polyCorners);
-	docu.writeAttribute("POLYF", m_Doc->itemToolPrefs.polyFactorValue2);
+	docu.writeAttribute("POLYF", m_Doc->itemToolPrefs.polyFactor);
 	docu.writeAttribute("POLYR", m_Doc->itemToolPrefs.polyRotation);
 	docu.writeAttribute("POLYCUR", m_Doc->itemToolPrefs.polyCurvature);
-	docu.writeAttribute("POLYFD", m_Doc->itemToolPrefs.polyFactorValue);
+//	docu.writeAttribute("POLYFD", m_Doc->itemToolPrefs.polyFactorValue);
 	docu.writeAttribute("POLYS", static_cast<int>(m_Doc->itemToolPrefs.polyUseFactor));
 	docu.writeAttribute("AutoSave", static_cast<int>(m_Doc->AutoSave));
 	docu.writeAttribute("AutoSaveTime", m_Doc->AutoSaveTime);
Index: scribus/plugins/fileloader/scribus150format/scribus150format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(revision 14021)
+++ scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(revision 14022)
@@ -860,10 +860,10 @@
 	doc->itemToolPrefs.textColumnGap    = attrs.valueAsDouble("DGAP", 0.0);
 
 	doc->itemToolPrefs.polyCorners      = attrs.valueAsInt("POLYC", 4);
-	doc->itemToolPrefs.polyFactorValue2 = attrs.valueAsDouble("POLYF", 0.5);
+	doc->itemToolPrefs.polyFactor = attrs.valueAsDouble("POLYF", 0.5);
 	doc->itemToolPrefs.polyRotation     = attrs.valueAsDouble("POLYR", 0.0);
 	doc->itemToolPrefs.polyCurvature    = attrs.valueAsDouble("POLYCUR", 0.0);
-	doc->itemToolPrefs.polyFactorValue  = attrs.valueAsInt("POLYFD", 0);
+//	doc->itemToolPrefs.polyFactorValue  = attrs.valueAsInt("POLYFD", 0);
 	doc->itemToolPrefs.polyUseFactor    = attrs.valueAsBool("POLYS", false);
 
 	doc->itemToolPrefs.lineStartArrow = attrs.valueAsInt("StartArrow", 0);
Index: scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
===================================================================
--- scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp	(revision 14021)
+++ scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp	(revision 14022)
@@ -174,10 +174,10 @@
 	docu.writeAttribute("GuideRad", m_Doc->guidesSettings.guideRad);
 	docu.writeAttribute("GRAB",m_Doc->guidesSettings.grabRadius);
 	docu.writeAttribute("POLYC", m_Doc->itemToolPrefs.polyCorners);
-	docu.writeAttribute("POLYF", m_Doc->itemToolPrefs.polyFactorValue2);
+	docu.writeAttribute("POLYF", m_Doc->itemToolPrefs.polyFactor);
 	docu.writeAttribute("POLYR", m_Doc->itemToolPrefs.polyRotation);
 	docu.writeAttribute("POLYCUR", m_Doc->itemToolPrefs.polyCurvature);
-	docu.writeAttribute("POLYFD", m_Doc->itemToolPrefs.polyFactorValue);
+//	docu.writeAttribute("POLYFD", m_Doc->itemToolPrefs.polyFactorValue);
 	docu.writeAttribute("POLYS", static_cast<int>(m_Doc->itemToolPrefs.polyUseFactor));
 	docu.writeAttribute("AutoSave", static_cast<int>(m_Doc->AutoSave));
 	docu.writeAttribute("AutoSaveTime", m_Doc->AutoSaveTime);
Index: scribus/plugins/fileloader/scribus134format/scribus134format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(revision 14021)
+++ scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(revision 14022)
@@ -868,10 +868,10 @@
 	doc->itemToolPrefs.textColumnGap    = attrs.valueAsDouble("DGAP", 0.0);
 
 	doc->itemToolPrefs.polyCorners   = attrs.valueAsInt("POLYC", 4);
-	doc->itemToolPrefs.polyFactorValue2   = attrs.valueAsDouble("POLYF", 0.5);
+	doc->itemToolPrefs.polyFactor   = attrs.valueAsDouble("POLYF", 0.5);
 	doc->itemToolPrefs.polyRotation   = attrs.valueAsDouble("POLYR", 0.0);
 	doc->itemToolPrefs.polyCurvature = attrs.valueAsDouble("POLYCUR", 0.0);
-	doc->itemToolPrefs.polyFactorValue  = attrs.valueAsInt("POLYFD", 0);
+//	doc->itemToolPrefs.polyFactorValue  = attrs.valueAsInt("POLYFD", 0);
 	doc->itemToolPrefs.polyUseFactor   = attrs.valueAsBool("POLYS", false);
 
 	doc->itemToolPrefs.lineStartArrow = attrs.valueAsInt("StartArrow", 0);




More information about the scribus-commit mailing list