Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 23694 → Rev 23695

/trunk/Scribus/doc/de/scripterapi-styles.html
191,6 → 191,10
<dd><code>getCharStyles() -&gt; list</code>
<p>Return a list of the names of all character styles in the current document.</p></dd>
 
<dt><a name="-getLineStyles"><strong>getLineStyles</strong></a>(...)</dt>
<dd><code>getLineStyles() -&gt; list</code>
<p>Return a list of the names of all line styles in the current document.</p></dd>
 
<dt><a name="-getParagraphStyles"><strong>getParagraphStyles</strong></a>(...)</dt>
<dd><code>getParagraphStyles() -&gt; list</code>
<p>Return a list of the names of all paragraph styles in the current document.</p></dd>
/trunk/Scribus/doc/en/scripterapi-styles.html
191,6 → 191,10
<dd><code>getCharStyles() -&gt; list</code>
<p>Return a list of the names of all character styles in the current document.</p></dd>
 
<dt><a name="-getLineStyles"><strong>getLineStyles</strong></a>(...)</dt>
<dd><code>getLineStyles() -&gt; list</code>
<p>Return a list of the names of all line styles in the current document.</p></dd>
 
<dt><a name="-getParagraphStyles"><strong>getParagraphStyles</strong></a>(...)</dt>
<dd><code>getParagraphStyles() -&gt; list</code>
<p>Return a list of the names of all paragraph styles in the current document.</p></dd>
/trunk/Scribus/doc/fr/scripterapi-styles.html
188,6 → 188,10
<dd><tt>getCharStyles() -&gt; liste</tt>
<p>Retourne une liste des noms de l'ensemble des styles de caractère du document courant.</p></dd>
 
<dt><a name="-getLineStyles"><strong>getLineStyles</strong></a>(...)</dt>
<dd><tt>getLineStyles() -&gt; liste</tt>
<p>Retourne une liste des noms de l'ensemble des styles de filet du document courant.</p></dd>
 
<dt><a name="-getParagraphStyles"><strong>getParagraphStyles</strong></a>(...)</dt>
<dd><tt>getParagraphStyles() -&gt; liste</tt>
<p>Retourne une liste des noms de l'ensemble des styles de paragraphe du document courant.</p></dd>
/trunk/Scribus/doc/it/scripterapi-styles.html
191,6 → 191,10
<dd><code>getCharStyles() -&gt; list</code>
<p>Return a list of the names of all character styles in the current document.</p></dd>
 
<dt><a name="-getLineStyles"><strong>getLineStyles</strong></a>(...)</dt>
<dd><code>getLineStyles() -&gt; list</code>
<p>Return a list of the names of all line styles in the current document.</p></dd>
 
<dt><a name="-getParagraphStyles"><strong>getParagraphStyles</strong></a>(...)</dt>
<dd><code>getParagraphStyles() -&gt; list</code>
<p>Return a list of the names of all paragraph styles in the current document.</p></dd>
/trunk/Scribus/doc/ru/scripterapi-styles.html
191,6 → 191,10
<dd><code>getCharStyles() -&gt; list</code>
<p>Return a list of the names of all character styles in the current document.</p></dd>
 
<dt><a name="-getLineStyles"><strong>getLineStyles</strong></a>(...)</dt>
<dd><code>getLineStyles() -&gt; list</code>
<p>Return a list of the names of all line styles in the current document.</p></dd>
 
<dt><a name="-getParagraphStyles"><strong>getParagraphStyles</strong></a>(...)</dt>
<dd><code>getParagraphStyles() -&gt; list</code>
<p>Return a list of the names of all paragraph styles in the current document.</p></dd>
/trunk/Scribus/scribus/plugins/scriptplugin/cmdstyle.cpp
402,15 → 402,15
*/
PyObject *scribus_getparagraphstyles(PyObject* /* self */)
{
PyObject *styleList;
if (!checkHaveDocument())
return nullptr;
const auto& paragraphStyles = ScCore->primaryMainWindow()->doc->paragraphStyles();
 
styleList = PyList_New(0);
PyObject *styleList = PyList_New(0);
for (int i = 0; i < paragraphStyles.count(); ++i)
{
if (PyList_Append(styleList, PyUnicode_FromString(paragraphStyles[i].name().toUtf8())))
const QString& paraStyleName = paragraphStyles[i].name();
if (PyList_Append(styleList, PyUnicode_FromString(paraStyleName.toUtf8())))
{
// An exception will have already been set by PyList_Append apparently.
return nullptr;
421,15 → 421,15
 
PyObject *scribus_getcharstylenames(PyObject* /* self */)
{
PyObject *charStyleList;
if (!checkHaveDocument())
return nullptr;
const auto& charStyles = ScCore->primaryMainWindow()->doc->charStyles();
 
charStyleList = PyList_New(0);
PyObject *charStyleList = PyList_New(0);
for (int i = 0; i < charStyles.count(); ++i)
{
if (PyList_Append(charStyleList, PyUnicode_FromString(charStyles[i].name().toUtf8())))
const QString& charStyleName = charStyles[i].name();
if (PyList_Append(charStyleList, PyUnicode_FromString(charStyleName.toUtf8())))
{
// An exception will have already been set by PyList_Append apparently.
return nullptr;
438,6 → 438,26
return charStyleList;
}
 
PyObject *scribus_getlinestyles(PyObject* /* self */)
{
if (!checkHaveDocument())
return nullptr;
const auto& lineStyles = ScCore->primaryMainWindow()->doc->lineStyles();
 
PyObject *lineStyleList = PyList_New(0);
auto itEnd = lineStyles.constEnd();
for (auto it = lineStyles.constBegin(); it != itEnd; ++it)
{
QString lineStyleName = it.key();
if (PyList_Append(lineStyleList, PyUnicode_FromString(lineStyleName.toUtf8())))
{
// An exception will have already been set by PyList_Append apparently.
return nullptr;
}
}
return lineStyleList;
}
 
/*! HACK: this removes "warning: 'blah' defined but not used" compiler warnings
with header files structure untouched (docstrings are kept near declarations)
PV */
449,5 → 469,6
<< scribus_createparagraphstyle__doc__
<< scribus_getallstyles__doc__
<< scribus_getcharstylenames__doc__
<< scribus_getlinestyles__doc__
<< scribus_getparagraphstyles__doc__;
}
/trunk/Scribus/scribus/plugins/scriptplugin/cmdstyle.h
133,5 → 133,14
"));
PyObject *scribus_getcharstylenames(PyObject * /*self*/);
 
 
/*! docstring */
PyDoc_STRVAR(scribus_getlinestyles__doc__,
QT_TR_NOOP("getLineStyles() -> list\n\
\n\
Return a list of the names of all line styles in the current document.\n\
"));
PyObject *scribus_getlinestyles(PyObject * /*self*/);
 
#endif
 
/trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp
377,6 → 377,7
{const_cast<char*>("getLineJoin"), scribus_getlinejoin, METH_VARARGS, tr(scribus_getlinejoin__doc__)},
{const_cast<char*>("getLineSpacing"), scribus_getlinespace, METH_VARARGS, tr(scribus_getlinespace__doc__)},
{const_cast<char*>("getLineStyle"), scribus_getlinestyle, METH_VARARGS, tr(scribus_getlinestyle__doc__)},
{const_cast<char*>("getLineStyles"), (PyCFunction)scribus_getlinestyles, METH_VARARGS, tr(scribus_getlinestyles__doc__)},
{const_cast<char*>("getLineWidth"), scribus_getlinewidth, METH_VARARGS, tr(scribus_getlinewidth__doc__)},
{const_cast<char*>("getMasterPage"), scribus_getmasterpage, METH_VARARGS, tr(scribus_getmasterpage__doc__)},
{const_cast<char*>("getPageItems"), (PyCFunction)scribus_getpageitems, METH_NOARGS, tr(scribus_getpageitems__doc__)},
/trunk/Scribus/scribus/scribusdoc.h
539,6 → 539,8
bool isDefaultStyle( const CharStyle& c ) const { return m_docCharStyles.isDefault(c); }
// bool isDefaultStyle( LineStyle& l ) const { return MLineStyles......; }
 
const QHash<QString, multiLine>& lineStyles() const { return MLineStyles; }
 
/**
* Returns the table style named @a name.
*/
1403,7 → 1405,7
bool isConverted {false};
QTimer * const autoSaveTimer;
QList<QString> autoSaveFiles;
QHash<QString,multiLine> MLineStyles;
QHash<QString, multiLine> MLineStyles;
QHash<QString, ScPattern> docPatterns;
QHash<QString, VGradient> docGradients;
QWidget* WinHan {nullptr};