r21662 by jghali - use const ParagraphStyle& in ScribusDoc::getNumberStr() arguments
scribus-commit
scribus-commit at lists.scribus.net
Sat Dec 17 20:15:58 UTC 2016
Author: jghali
Date: Sat Dec 17 20:15:58 2016
New Revision: 21662
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21662
Log:
use const ParagraphStyle& in ScribusDoc::getNumberStr() arguments
Modified:
trunk/Scribus/scribus/scribusdoc.cpp
trunk/Scribus/scribus/scribusdoc.h
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21662&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Sat Dec 17 20:15:58 2016
@@ -16589,7 +16589,7 @@
flag_Renumber = true;
}
-QString ScribusDoc::getNumberStr(QString numName, int level, bool reset, ParagraphStyle &style)
+QString ScribusDoc::getNumberStr(QString numName, int level, bool reset, const ParagraphStyle &style)
{
Q_ASSERT(numerations.contains(numName));
if (!numerations.contains(numName))
@@ -16762,7 +16762,7 @@
{
if ((pos == 0) || (item->itemText.text(pos - 1) == SpecialChars::PARSEP))
{
- ParagraphStyle style = item->itemText.paragraphStyle(pos);
+ const ParagraphStyle& style = item->itemText.paragraphStyle(pos);
if (style.hasNum() && style.numName() != "<local block>")
{
if (!numerations.contains(style.numName()))
Modified: trunk/Scribus/scribus/scribusdoc.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21662&path=/trunk/Scribus/scribus/scribusdoc.h
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.h (original)
+++ trunk/Scribus/scribus/scribusdoc.h Sat Dec 17 20:15:58 2016
@@ -1803,7 +1803,7 @@
QMap<QString, NumStruct*> numerations;
QStringList orgNumNames; //orgNumerations keeps original settings read from paragraph styles for reset settings overrided localy
void setupNumerations(); //read styles for used auto-numerations, initialize numCounters
- QString getNumberStr(QString numName, int level, bool reset, ParagraphStyle &style);
+ QString getNumberStr(QString numName, int level, bool reset, const ParagraphStyle &style);
void setNumerationCounter(QString numName, int level, int number);
bool flag_Renumber;
bool flag_NumUpdateRequest;
More information about the scribus-commit
mailing list