r22748 by jghali - small refactoring for Annotation class

scribus-commit scribus-commit at lists.scribus.net
Thu Nov 1 13:09:02 UTC 2018


Author: jghali
Date: Thu Nov  1 13:09:02 2018
New Revision: 22748

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22748
Log:
small refactoring for Annotation class

Modified:
    trunk/Scribus/scribus/annotation.h
    trunk/Scribus/scribus/pageitem_textframe.cpp
    trunk/Scribus/scribus/pdflib_core.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
    trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
    trunk/Scribus/scribus/ui/annot.cpp

Modified: trunk/Scribus/scribus/annotation.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22748&path=/trunk/Scribus/scribus/annotation.h
==============================================================================
--- trunk/Scribus/scribus/annotation.h	(original)
+++ trunk/Scribus/scribus/annotation.h	Thu Nov  1 13:09:02 2018
@@ -149,8 +149,8 @@
 	void setRollOver(const QString& newRollOver) { AnRollOver=newRollOver; }
 	void setDown(const QString& newDown) { AnDown=newDown; }
 	void setBorderColor(const QString& newBorderColor) { AnBColor=newBorderColor; }
-	void setBwid(int newBwid) { AnBwid=newBwid; }
-	void setBsty(int newBsty) { AnBsty=newBsty; }
+	void setBorderWidth(int newBwid) { AnBwid=newBwid; }
+	void setBorderStyle(int newBsty) { AnBsty=newBsty; }
 	void setFeed(int newFeed) { AnFeed=newFeed; }
 	void setFlag(int newFlag) { AnFlag=newFlag; }
 	void addToFlag(int dFlag) { AnFlag+=dFlag; }
@@ -189,8 +189,8 @@
 	QString RollOver() const { return AnRollOver; }
 	QString Down() const { return AnDown; }
 	QString borderColor() const { return AnBColor; }
-	int Bwid() const { return AnBwid; }
-	int Bsty() const { return AnBsty; }
+	int borderWidth() const { return AnBwid; }
+	int borderStyle() const { return AnBsty; }
 	int Feed() const { return AnFeed; }
 	int Flag() const { return AnFlag; }
 	int MaxChar() const { return AnMaxChar; }

Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22748&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp	Thu Nov  1 13:09:02 2018
@@ -3209,11 +3209,11 @@
 			}
 		}
 		p->save();
-		if ((annotation().Bwid() > 0) && (annotation().borderColor() != CommonStrings::None) && (annotation().Type() != Annotation::Text))
+		if ((annotation().borderWidth() > 0) && (annotation().borderColor() != CommonStrings::None) && (annotation().Type() != Annotation::Text))
 		{
 			QColor tmp;
 			SetQColor(&tmp, annotation().borderColor(), 100);
-			int borderStyle = annotation().Bsty();
+			int borderStyle = annotation().borderStyle();
 			if (annotation().IsOn())
 			{
 				if (annotation().Feed() == 2)
@@ -3223,7 +3223,7 @@
 			}
 			if (annotation().Type() == Annotation::RadioButton)
 			{
-				double bwh = annotation().Bwid() / 2.0;
+				double bwh = annotation().borderWidth() / 2.0;
 				if (annotation().IsOn())
 				{
 					if (borderStyle == 4)
@@ -3234,19 +3234,19 @@
 				if ((borderStyle == 0) || (borderStyle == 1))
 				{
 					QPainterPath clp;
-					clp.addEllipse(QRectF(bwh, bwh, m_width - annotation().Bwid(), m_height - annotation().Bwid()));
+					clp.addEllipse(QRectF(bwh, bwh, m_width - annotation().borderWidth(), m_height - annotation().borderWidth()));
 					FPointArray clpArr;
 					clpArr.fromQPainterPath(clp);
 					p->setupPolygon(&clpArr);
-					p->setPen(tmp, annotation().Bwid(), borderStyle == 0 ? Qt::SolidLine : Qt::DashLine, Qt::FlatCap, Qt::MiterJoin);
+					p->setPen(tmp, annotation().borderWidth(), borderStyle == 0 ? Qt::SolidLine : Qt::DashLine, Qt::FlatCap, Qt::MiterJoin);
 					p->setFillMode(ScPainter::None);
 					p->setStrokeMode(ScPainter::Solid);
 					p->strokePath();
 				}
 				else if (borderStyle == 3)
-					p->drawShadeCircle(QRectF(0, 0, m_width, m_height), tmp, false, annotation().Bwid());
+					p->drawShadeCircle(QRectF(0, 0, m_width, m_height), tmp, false, annotation().borderWidth());
 				else if (borderStyle == 4)
-					p->drawShadeCircle(QRectF(0, 0, m_width, m_height), tmp, true, annotation().Bwid());
+					p->drawShadeCircle(QRectF(0, 0, m_width, m_height), tmp, true, annotation().borderWidth());
 			}
 			else
 			{
@@ -3258,14 +3258,14 @@
 						borderStyle = 4;
 				}
 				if (borderStyle == 2)
-					p->drawUnderlinedRect(QRectF(0, 0, m_width, m_height), tmp, annotation().Bwid());
+					p->drawUnderlinedRect(QRectF(0, 0, m_width, m_height), tmp, annotation().borderWidth());
 				else if (borderStyle == 3)
-					p->drawShadePanel(QRectF(0, 0, m_width, m_height), tmp, false, annotation().Bwid());
+					p->drawShadePanel(QRectF(0, 0, m_width, m_height), tmp, false, annotation().borderWidth());
 				else if (borderStyle == 4)
-					p->drawShadePanel(QRectF(0, 0, m_width, m_height), tmp, true, annotation().Bwid());
+					p->drawShadePanel(QRectF(0, 0, m_width, m_height), tmp, true, annotation().borderWidth());
 				else
 				{
-					p->setPen(tmp, annotation().Bwid(), borderStyle == 0 ? Qt::SolidLine : Qt::DashLine, Qt::FlatCap, Qt::MiterJoin);
+					p->setPen(tmp, annotation().borderWidth(), borderStyle == 0 ? Qt::SolidLine : Qt::DashLine, Qt::FlatCap, Qt::MiterJoin);
 					p->setStrokeMode(ScPainter::Solid);
 					p->drawRect(0, 0, m_width, m_height);
 				}
@@ -3273,7 +3273,7 @@
 		}
 		if (annotation().Type() == Annotation::Button)
 		{
-			int wdt = annotation().Bwid();
+			int wdt = annotation().borderWidth();
 			QPainterPath clp;
 			clp.addRect(QRectF(wdt, wdt, m_width - (2 * wdt), m_height - (2 * wdt)));
 			FPointArray clpArr;
@@ -3307,7 +3307,7 @@
 		}
 		if (annotation().Type() == Annotation::Textfield)
 		{
-			int wdt = annotation().Bwid();
+			int wdt = annotation().borderWidth();
 			m_textDistanceMargins.set(wdt, wdt, wdt, wdt);
 			invalid = true;
 			layout();
@@ -3452,7 +3452,7 @@
 		}
 		else if (annotation().Type() == Annotation::Combobox)
 		{
-			int wdt = annotation().Bwid();
+			int wdt = annotation().borderWidth();
 			if (m_width > 2 * wdt + 15)
 			{
 				if (!bmUtf16.isEmpty())
@@ -3474,7 +3474,7 @@
 				p->setStrokeMode(ScPainter::None);
 				p->setBrush(QColor(200, 200, 200));
 				QRectF bi;
-				if ((annotation().Bsty() == 3) || (annotation().Bsty() == 4))
+				if ((annotation().borderStyle() == 3) || (annotation().borderStyle() == 4))
 					bi = QRectF(m_width - wdt - 15, wdt, 15, m_height - (2 * wdt));
 				else
 					bi = QRectF(m_width - (wdt / 2.0) - 15, wdt / 2.0, 15, m_height - wdt);
@@ -3496,7 +3496,7 @@
 		}
 		else if (annotation().Type() == Annotation::Listbox)
 		{
-			int wdt = annotation().Bwid();
+			int wdt = annotation().borderWidth();
 			if (m_width > 2 * wdt + 15)
 			{
 				if (!bmUtf16.isEmpty())
@@ -3754,7 +3754,7 @@
 
 void PageItem_TextFrame::DrawObj_Decoration(ScPainter *p)
 {
-	//#12405 if (isAnnotation() && ((annotation().Type() > 1) && (annotation().Type() < 7)) && (annotation().Bwid() > 0))
+	//#12405 if (isAnnotation() && ((annotation().Type() > 1) && (annotation().Type() < 7)) && (annotation().borderWidth() > 0))
 	//	return;
 	p->save();
 //	p->setAntialiasing(false);

Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22748&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp	(original)
+++ trunk/Scribus/scribus/pdflib_core.cpp	Thu Nov  1 13:09:02 2018
@@ -8804,10 +8804,10 @@
 	PutDoc("/Ff "+Pdf::toPdf(flg)+"\n");
 	PutDoc("/FT /Btn\n");
 	PutDoc("/BS << /Type /Border /W ");
-	PutDoc(ite->annotation().borderColor() != CommonStrings::None ? Pdf::toPdf(ite->annotation().Bwid()) : "0");
+	PutDoc(ite->annotation().borderColor() != CommonStrings::None ? Pdf::toPdf(ite->annotation().borderWidth()) : "0");
 	PutDoc(" /S /");
 	const QByteArray xb[] = {"S", "D", "U", "B", "I"};
-	PutDoc(xb[ite->annotation().Bsty()]);
+	PutDoc(xb[ite->annotation().borderStyle()]);
 	PutDoc(" >>\n");
 	PutDoc("/MK << ");
 	PutDoc("/BG [ 1 1 1 ] ");
@@ -9038,10 +9038,10 @@
 			PutDoc(mm[ite->annotation().Vis()]);
 			PutDoc("\n");
 			PutDoc("/BS << /Type /Border /W ");
-			PutDoc(ite->annotation().borderColor() != CommonStrings::None ? Pdf::toPdf(ite->annotation().Bwid()) : "0");
+			PutDoc(ite->annotation().borderColor() != CommonStrings::None ? Pdf::toPdf(ite->annotation().borderWidth()) : "0");
 			PutDoc(" /S /");
 			const QByteArray x[] = {"S", "D", "U", "B", "I"};
-			PutDoc(x[ite->annotation().Bsty()]);
+			PutDoc(x[ite->annotation().borderStyle()]);
 			PutDoc(" >>\n");
 			QByteArray cnx;
 			if (ite->annotation().Type() == Annotation::Checkbox)
@@ -9417,7 +9417,7 @@
 		if (ite->itemText.defaultStyle().charStyle().fillColor() != CommonStrings::None)
 			cc += putColor(ite->itemText.defaultStyle().charStyle().fillColor(), ite->itemText.defaultStyle().charStyle().fillShade(), true);
 		cc += "/"+StdFonts["/ZapfDingbats"]+" "+FToStr(ite->itemText.defaultStyle().charStyle().fontSize() / 10.0)+" Tf\n";
-		cc += Pdf::toPdf(ite->annotation().Bwid())+" "+Pdf::toPdf(ite->annotation().Bwid())+" Td\n("+ct+") Tj\nET\nQ";
+		cc += Pdf::toPdf(ite->annotation().borderWidth())+" "+Pdf::toPdf(ite->annotation().borderWidth())+" Td\n("+ct+") Tj\nET\nQ";
 		PDF_xForm(appearanceObj1, ite->width(), ite->height(), cc);
 		cc.clear();
 		cc += "q\n1 g\n";
@@ -9473,23 +9473,23 @@
 	QByteArray ret;
 	if (ite->annotation().borderColor() == CommonStrings::None)
 		return ret;
-	if (ite->annotation().Bwid() == 0)
+	if (ite->annotation().borderWidth() == 0)
 		return ret;
 	QColor tmp;
 	ite->SetQColor(&tmp, ite->annotation().borderColor(), 100);
 	ret += "q\n";
 	if (ite->annotation().Type() == Annotation::RadioButton)
 	{
-		if ((ite->annotation().Bsty() == 0) || (ite->annotation().Bsty() == 1))
+		if ((ite->annotation().borderStyle() == 0) || (ite->annotation().borderStyle() == 1))
 		{
 			ret += putColor(ite->annotation().borderColor(), 100, false);
-			ret += Pdf::toPdf(ite->annotation().Bwid())+" w\n";
+			ret += Pdf::toPdf(ite->annotation().borderWidth())+" w\n";
 			ret += "0 J\n";
 			ret += "0 j\n";
-			if (ite->annotation().Bsty() == 1)
-				ret += "["+Pdf::toPdf(ite->annotation().Bwid()*4)+" "+Pdf::toPdf(ite->annotation().Bwid()*2)+"] 0 d\n";
-			double bwh = ite->annotation().Bwid() / 2.0;
-			double rad = qMin(ite->width() - ite->annotation().Bwid(), ite->height() - ite->annotation().Bwid());
+			if (ite->annotation().borderStyle() == 1)
+				ret += "["+Pdf::toPdf(ite->annotation().borderWidth()*4)+" "+Pdf::toPdf(ite->annotation().borderWidth()*2)+"] 0 d\n";
+			double bwh = ite->annotation().borderWidth() / 2.0;
+			double rad = qMin(ite->width() - ite->annotation().borderWidth(), ite->height() - ite->annotation().borderWidth());
 			QPainterPath clp;
 			clp.addEllipse(QRectF(bwh, bwh, rad, rad));
 			FPointArray clpArr;
@@ -9498,11 +9498,11 @@
 			ret += SetClipPathArray(&clpArr, true);
 			ret += "h\nS\n";
 		}
-		else if ((ite->annotation().Bsty() == 3) || (ite->annotation().Bsty() == 4))
+		else if ((ite->annotation().borderStyle() == 3) || (ite->annotation().borderStyle() == 4))
 		{
 			QColor shade;
 			QColor light;
-			if (ite->annotation().Bsty() == 4)
+			if (ite->annotation().borderStyle() == 4)
 			{
 				shade.setRgbF(tmp.redF() * 0.5, tmp.greenF() * 0.5, tmp.blueF() * 0.5);
 				light.setRgbF(tmp.redF() * 0.5 + 0.5, tmp.greenF() * 0.5 + 0.5, tmp.blueF() * 0.5 + 0.5);
@@ -9515,12 +9515,12 @@
 			ret += "0 J\n";
 			ret += "0 j\n";
 			ret += putColor(ite->annotation().borderColor(), 100, false);
-			double bwh = ite->annotation().Bwid() / 2.0;
+			double bwh = ite->annotation().borderWidth() / 2.0;
 			int h, s, v;
 			double cx = dx / 2.0;
 			double cy = dy / 2.0;
 			double rb = 0.5 * (dx < dy ? dx : dy);
-			double r = rb - 0.25 * ite->annotation().Bwid();
+			double r = rb - 0.25 * ite->annotation().borderWidth();
 			double bzc = 0.55228475;
 			ret += Pdf::toPdf(bwh)+" w\n";
 			ret += FToStr(cx + r)+" "+FToStr(cy)+" m\n";
@@ -9529,7 +9529,7 @@
 			ret += FToStr(cx - r)+" "+FToStr(cy - bzc * r)+" "+FToStr(cx - bzc * r)+" "+FToStr(cy - r)+" "+FToStr(cx)+" "+FToStr(cy - r)+" c\n";
 			ret += FToStr(cx + bzc * r)+" "+FToStr(cy - r)+" "+FToStr(cx + r)+" "+FToStr(cy - bzc * r)+" "+FToStr(cx + r)+" "+FToStr(cy)+" c\n";
 			ret += "h\nS\n";
-			r = rb - 0.73 * ite->annotation().Bwid();
+			r = rb - 0.73 * ite->annotation().borderWidth();
 			double r2 = r / 1.414213562;
 			shade.getRgb(&h, &s, &v);
 			ret += FToStr(h / 255.0)+" "+FToStr(s / 255.0)+" "+FToStr(v / 255.0)+" RG\n";
@@ -9547,28 +9547,28 @@
 	}
 	else
 	{
-		if ((ite->annotation().Bsty() == 0) || (ite->annotation().Bsty() == 1))
+		if ((ite->annotation().borderStyle() == 0) || (ite->annotation().borderStyle() == 1))
 		{
 			ret += putColor(ite->annotation().borderColor(), 100, false);
-			ret += Pdf::toPdf(ite->annotation().Bwid())+" w\n";
+			ret += Pdf::toPdf(ite->annotation().borderWidth())+" w\n";
 			ret += "0 J\n";
 			ret += "0 j\n";
-			if (ite->annotation().Bsty() == 1)
-				ret += "["+Pdf::toPdf(ite->annotation().Bwid()*4)+" "+Pdf::toPdf(ite->annotation().Bwid()*2)+"] 0 d\n";
-			double bwh = ite->annotation().Bwid() / 2.0;
+			if (ite->annotation().borderStyle() == 1)
+				ret += "["+Pdf::toPdf(ite->annotation().borderWidth()*4)+" "+Pdf::toPdf(ite->annotation().borderWidth()*2)+"] 0 d\n";
+			double bwh = ite->annotation().borderWidth() / 2.0;
 			QPainterPath clp;
-			clp.addRect(QRectF(bwh, bwh, ite->width() - ite->annotation().Bwid(), ite->height() - ite->annotation().Bwid()));
+			clp.addRect(QRectF(bwh, bwh, ite->width() - ite->annotation().borderWidth(), ite->height() - ite->annotation().borderWidth()));
 			FPointArray clpArr;
 			clpArr.fromQPainterPath(clp);
 			clpArr.translate(0, -ite->height());
 			ret += SetClipPathArray(&clpArr, true);
 			ret += "h\nS\n";
 		}
-		else if ((ite->annotation().Bsty() == 3) || (ite->annotation().Bsty() == 4))
+		else if ((ite->annotation().borderStyle() == 3) || (ite->annotation().borderStyle() == 4))
 		{
 			QColor shade;
 			QColor light;
-			if (ite->annotation().Bsty() == 4)
+			if (ite->annotation().borderStyle() == 4)
 			{
 				shade.setRgbF(tmp.redF() * 0.5, tmp.greenF() * 0.5, tmp.blueF() * 0.5);
 				light.setRgbF(tmp.redF() * 0.5 + 0.5, tmp.greenF() * 0.5 + 0.5, tmp.blueF() * 0.5 + 0.5);
@@ -9585,18 +9585,18 @@
 			ret += "0 0 m\n";
 			ret += "0 "+FToStr(dy)+" l\n";
 			ret += FToStr(dx)+" "+FToStr(dy)+" l\n";
-			ret += FToStr(dx - ite->annotation().Bwid())+" "+FToStr(dy - ite->annotation().Bwid())+" l\n";
-			ret += FToStr(ite->annotation().Bwid())+" "+FToStr(dy - ite->annotation().Bwid())+" l\n";
-			ret += FToStr(ite->annotation().Bwid())+" "+FToStr(ite->annotation().Bwid())+" l\n";
+			ret += FToStr(dx - ite->annotation().borderWidth())+" "+FToStr(dy - ite->annotation().borderWidth())+" l\n";
+			ret += FToStr(ite->annotation().borderWidth())+" "+FToStr(dy - ite->annotation().borderWidth())+" l\n";
+			ret += FToStr(ite->annotation().borderWidth())+" "+FToStr(ite->annotation().borderWidth())+" l\n";
 			ret += "h\nf\n";
 			light.getRgb(&h, &s, &v);
 			ret += FToStr(h / 255.0)+" "+FToStr(s / 255.0)+" "+FToStr(v / 255.0)+" rg\n";
 			ret += "0 0 m\n";
 			ret += FToStr(dx)+" 0 l\n";
 			ret += FToStr(dx)+" "+FToStr(dy)+" l\n";
-			ret += FToStr(dx - ite->annotation().Bwid())+" "+FToStr(dy - ite->annotation().Bwid())+" l\n";
-			ret += FToStr(dx - ite->annotation().Bwid())+" "+FToStr(ite->annotation().Bwid())+" l\n";
-			ret += FToStr(ite->annotation().Bwid())+" "+FToStr(ite->annotation().Bwid())+" l\n";
+			ret += FToStr(dx - ite->annotation().borderWidth())+" "+FToStr(dy - ite->annotation().borderWidth())+" l\n";
+			ret += FToStr(dx - ite->annotation().borderWidth())+" "+FToStr(ite->annotation().borderWidth())+" l\n";
+			ret += FToStr(ite->annotation().borderWidth())+" "+FToStr(ite->annotation().borderWidth())+" l\n";
 			ret += "h\nf\n";
 		}
 	}

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22748&path=/trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp	Thu Nov  1 13:09:02 2018
@@ -1554,8 +1554,8 @@
 	OB->m_annotation.setToolTip(obj->attribute("ANTOOLTIP",""));
 	OB->m_annotation.setRollOver(obj->attribute("ANROLL",""));
 	OB->m_annotation.setDown(obj->attribute("ANDOWN",""));
-	OB->m_annotation.setBwid(obj->attribute("ANBWID", "1").toInt());
-	OB->m_annotation.setBsty(obj->attribute("ANBSTY", "0").toInt());
+	OB->m_annotation.setBorderWidth(obj->attribute("ANBWID", "1").toInt());
+	OB->m_annotation.setBorderStyle(obj->attribute("ANBSTY", "0").toInt());
 	OB->m_annotation.setFeed(obj->attribute("ANFEED", "1").toInt());
 	OB->m_annotation.setFlag(obj->attribute("ANFLAG", "0").toInt());
 	OB->m_annotation.setFont(obj->attribute("ANFONT", "4").toInt());

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22748&path=/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp	Thu Nov  1 13:09:02 2018
@@ -2828,8 +2828,8 @@
 	currItem->annotation().setToolTip ( attrs.valueAsString("ANTOOLTIP",""));
 	currItem->annotation().setRollOver( attrs.valueAsString("ANROLL",""));
 	currItem->annotation().setDown( attrs.valueAsString("ANDOWN",""));
-	currItem->annotation().setBwid( attrs.valueAsInt("ANBWID", 1));
-	currItem->annotation().setBsty( attrs.valueAsInt("ANBSTY", 0));
+	currItem->annotation().setBorderWidth( attrs.valueAsInt("ANBWID", 1));
+	currItem->annotation().setBorderStyle( attrs.valueAsInt("ANBSTY", 0));
 	currItem->annotation().setFeed( attrs.valueAsInt("ANFEED", 1));
 	currItem->annotation().setFlag( attrs.valueAsInt("ANFLAG", 0));
 	currItem->annotation().setFont( attrs.valueAsInt("ANFONT", 4));

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22748&path=/trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp	Thu Nov  1 13:09:02 2018
@@ -1791,8 +1791,8 @@
 	currItem->annotation().setToolTip(obj->attribute("ANTOOLTIP",""));
 	currItem->annotation().setRollOver(obj->attribute("ANROLL",""));
 	currItem->annotation().setDown(obj->attribute("ANDOWN",""));
-	currItem->annotation().setBwid(obj->attribute("ANBWID", "1").toInt());
-	currItem->annotation().setBsty(obj->attribute("ANBSTY", "0").toInt());
+	currItem->annotation().setBorderWidth(obj->attribute("ANBWID", "1").toInt());
+	currItem->annotation().setBorderStyle(obj->attribute("ANBSTY", "0").toInt());
 	currItem->annotation().setFeed(obj->attribute("ANFEED", "1").toInt());
 	currItem->annotation().setFlag(obj->attribute("ANFLAG", "0").toInt());
 	currItem->annotation().setFont(obj->attribute("ANFONT", "4").toInt());

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22748&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp	Thu Nov  1 13:09:02 2018
@@ -5188,8 +5188,8 @@
 	currItem->annotation().setToolTip ( attrs.valueAsString("ANTOOLTIP",""));
 	currItem->annotation().setRollOver( attrs.valueAsString("ANROLL",""));
 	currItem->annotation().setDown( attrs.valueAsString("ANDOWN",""));
-	currItem->annotation().setBwid( attrs.valueAsInt("ANBWID", 1));
-	currItem->annotation().setBsty( attrs.valueAsInt("ANBSTY", 0));
+	currItem->annotation().setBorderWidth( attrs.valueAsInt("ANBWID", 1));
+	currItem->annotation().setBorderStyle( attrs.valueAsInt("ANBSTY", 0));
 	currItem->annotation().setFeed( attrs.valueAsInt("ANFEED", 1));
 	currItem->annotation().setFlag( attrs.valueAsInt("ANFLAG", 0));
 	currItem->annotation().setFont( attrs.valueAsInt("ANFONT", 4));

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22748&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp	Thu Nov  1 13:09:02 2018
@@ -2580,8 +2580,8 @@
 		docu.writeAttribute("ANZIEL", item->annotation().Ziel());
 		docu.writeAttribute("ANACTYP", item->annotation().ActionType());
 		docu.writeAttribute("ANTOOLTIP", item->annotation().ToolTip());
-		docu.writeAttribute("ANBWID", item->annotation().Bwid());
-		docu.writeAttribute("ANBSTY", item->annotation().Bsty());
+		docu.writeAttribute("ANBWID", item->annotation().borderWidth());
+		docu.writeAttribute("ANBSTY", item->annotation().borderStyle());
 		docu.writeAttribute("ANFEED", item->annotation().Feed());
 		docu.writeAttribute("ANFLAG", item->annotation().Flag());
 		docu.writeAttribute("ANFONT", item->annotation().Font());

Modified: trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22748&path=/trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp	Thu Nov  1 13:09:02 2018
@@ -698,15 +698,15 @@
 					bsty = 4;
 				else if (bsty == AnnotBorder::borderUnderlined)
 					bsty = 2;
-				ite->annotation().setBsty(bsty);
+				ite->annotation().setBorderStyle(bsty);
 				ite->annotation().setBorderColor(CurrColorStroke);
-				ite->annotation().setBwid(qRound(brd->getWidth()));
+				ite->annotation().setBorderWidth(qRound(brd->getWidth()));
 			}
 			else
 			{
-				ite->annotation().setBsty(0);
+				ite->annotation().setBorderStyle(0);
 				ite->annotation().setBorderColor(CommonStrings::None);
-				ite->annotation().setBwid(0);
+				ite->annotation().setBorderWidth(0);
 			}
 			QString tmTxt = "";
 			tmTxt = UnicodeParsedString(fm->getPartialName());

Modified: trunk/Scribus/scribus/ui/annot.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22748&path=/trunk/Scribus/scribus/ui/annot.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/annot.cpp	(original)
+++ trunk/Scribus/scribus/ui/annot.cpp	Thu Nov  1 13:09:02 2018
@@ -114,9 +114,9 @@
 	BorderW->clear();
 	for (uint propagate = 0; propagate < bordersArray; ++propagate)
 		BorderW->addItem(borders[propagate]);
-	BorderW->setCurrentIndex(annotation.Bwid());
-
-	BorderS->setCurrentIndex(annotation.Bsty());
+	BorderW->setCurrentIndex(annotation.borderWidth());
+
+	BorderS->setCurrentIndex(annotation.borderStyle());
 
 	OtherGroup->layout()->setAlignment(Qt::AlignTop);
 
@@ -1096,8 +1096,8 @@
 	annotation.setToolTip(Tip->text());
 	annotation.setRollOver(TextO->text());
 	annotation.setDown(DownT->text());
-	annotation.setBwid(BorderW->currentIndex());
-	annotation.setBsty(BorderS->currentIndex());
+	annotation.setBorderWidth(BorderW->currentIndex());
+	annotation.setBorderStyle(BorderS->currentIndex());
 	annotation.setFeed(ComboBox7_2->currentIndex());
 	annotation.setVis(Visib->currentIndex());
 	annotation.setFont(Schrift->currentIndex());




More information about the scribus-commit mailing list