r22786 by jghali - small refactoring
scribus-commit
scribus-commit at lists.scribus.net
Fri Dec 14 23:05:34 UTC 2018
Author: jghali
Date: Fri Dec 14 23:05:34 2018
New Revision: 22786
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22786
Log:
small refactoring
Modified:
trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp
Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22786&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp Fri Dec 14 23:05:34 2018
@@ -65,9 +65,9 @@
}
if (item->HasSel)
{
- for (int b = 0; b < item->itemText.length(); b++)
- if (item->itemText.selected(b))
- return PyFloat_FromDouble(static_cast<double>(item->itemText.charStyle(b).fontSize() / 10.0));
+ for (int i = 0; i < item->itemText.length(); i++)
+ if (item->itemText.selected(i))
+ return PyFloat_FromDouble(static_cast<double>(item->itemText.charStyle(i).fontSize() / 10.0));
return nullptr;
}
return PyFloat_FromDouble(static_cast<double>(item->currentCharStyle().fontSize() / 10.0));
@@ -90,9 +90,9 @@
}
if (item->HasSel)
{
- for (int b = 0; b < item->itemText.length(); b++)
- if (item->itemText.selected(b))
- return PyString_FromString(item->itemText.charStyle(b).font().scName().toUtf8());
+ for (int i = 0; i < item->itemText.length(); i++)
+ if (item->itemText.selected(i))
+ return PyString_FromString(item->itemText.charStyle(i).font().scName().toUtf8());
return nullptr;
}
return PyString_FromString(item->currentCharStyle().font().scName().toUtf8());
@@ -259,9 +259,9 @@
}
if (item->HasSel)
{
- for (int b = 0; b < item->itemText.length(); b++)
- if (item->itemText.selected(b))
- return PyString_FromString(item->itemText.charStyle(b).fontFeatures().toUtf8());
+ for (int i = 0; i < item->itemText.length(); i++)
+ if (item->itemText.selected(i))
+ return PyString_FromString(item->itemText.charStyle(i).fontFeatures().toUtf8());
return nullptr;
}
return PyString_FromString(item->currentCharStyle().fontFeatures().toUtf8());
More information about the scribus-commit
mailing list