Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 25097 → Rev 25096

/branches/Version15x/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp
1294,22 → 1294,27
return nullptr;
if (!(fromitem->isTextFrame()) || !(toitem->isTextFrame()))
{
PyErr_SetString(WrongFrameTypeError, QObject::tr("Can only link text frames.", "python error").toLocal8Bit().constData());
PyErr_SetString(WrongFrameTypeError, QObject::tr("Can only link text frames.","python error").toLocal8Bit().constData());
return nullptr;
}
if (fromitem->nextInChain() != nullptr)
/* if (toitem->itemText.length() > 0)
{
PyErr_SetString(ScribusException, QObject::tr("Source frame is linked to another frame.", "python error").toLocal8Bit().constData());
PyErr_SetString(ScribusException, QObject::tr("Target frame must be empty.","python error").toLocal8Bit().constData());
return nullptr;
}*/
if (toitem->nextInChain() != nullptr)
{
PyErr_SetString(ScribusException, QObject::tr("Target frame links to another frame.","python error").toLocal8Bit().constData());
return nullptr;
}
if (toitem->prevInChain() != nullptr)
{
PyErr_SetString(ScribusException, QObject::tr("Target frame is linked to by another frame.", "python error").toLocal8Bit().constData());
PyErr_SetString(ScribusException, QObject::tr("Target frame is linked to by another frame.","python error").toLocal8Bit().constData());
return nullptr;
}
if (toitem == fromitem)
{
PyErr_SetString(ScribusException, QObject::tr("Source and target are the same object.", "python error").toLocal8Bit().constData());
PyErr_SetString(ScribusException, QObject::tr("Source and target are the same object.","python error").toLocal8Bit().constData());
return nullptr;
}
// references to the others boxes
/branches/Version15x/Scribus/scribus/plugins/scriptplugin/cmdtext.h
570,8 → 570,8
QT_TR_NOOP("linkTextFrames(\"fromname\", \"toname\")\n\
\n\
Link two text frames. The frame named \"fromname\" is linked to the\n\
frame named \"toname\". The source frame must not already link to another\n\
frame. The target frame must not be linked from another frame.\n\
frame named \"toname\". The target frame must be an empty text frame\n\
and must not link to or be linked from any other frames already.\n\
\n\
May throw ScribusException if linking rules are violated.\n\
"));
/branches/Version15x/Scribus/doc/de/scripterapi-textframes.html
33,7 → 33,7
<p>Gets the number of columns of the text frame "name". If "name" is not given the currently selected item is used.</p></dd>
 
<dt><a name="-getFirstLineOffset"><strong>getFirstLineOffset</strong></a>(...)</dt>
<dd><code>getFirstLineOffset(["name"]) -&gt; integer</code>
<dd><code>getFirstLineOffset(["name"]) -&gt; string</code>
<p>Gets the offset of the first line of text inside text frame "name". If "name" is not given the currently selected item is used.</p></dd>
 
<dt><a name="-getFirstLinkedFrame"><strong>getFirstLinkedFrame</strong></a>(...)</dt>
134,7 → 134,7
 
<dt><a name="-linkTextFrames"><strong>linkTextFrames</strong></a>(...)</dt>
<dd><code>linkTextFrames("fromname", "toname")</code>
<p>Link two text frames. The frame named "fromname" is linked to the frame named "toname". The source frame must not already link to another frame. The target frame must not be linked from another frame.</p>
<p>Link two text frames. The frame named "fromname" is linked to the frame named "toname". The target frame must be an empty text frame and must not link to or be linked from any other frames already.</p>
<p>May throw <a href="#ScribusException">ScribusException</a> if linking rules are violated.</p></dd>
 
<dt><a name="-selectFrameText"><strong>selectFrameText</strong></a>(...)</dt>
/branches/Version15x/Scribus/doc/en/scripterapi-textframes.html
134,7 → 134,7
 
<dt><a name="-linkTextFrames"><strong>linkTextFrames</strong></a>(...)</dt>
<dd><code>linkTextFrames("fromname", "toname")</code>
<p>Link two text frames. The frame named "fromname" is linked to the frame named "toname". The source frame must not already link to another frame. The target frame must not be linked from another frame.</p>
<p>Link two text frames. The frame named "fromname" is linked to the frame named "toname". The target frame must be an empty text frame and must not link to or be linked from any other frames already.</p>
<p>May throw <a href="#ScribusException">ScribusException</a> if linking rules are violated.</p></dd>
 
<dt><a name="-selectFrameText"><strong>selectFrameText</strong></a>(...)</dt>
/branches/Version15x/Scribus/doc/it/scripterapi-textframes.html
33,7 → 33,7
<p>Gets the number of columns of the text frame "name". If "name" is not given the currently selected item is used.</p></dd>
 
<dt><a name="-getFirstLineOffset"><strong>getFirstLineOffset</strong></a>(...)</dt>
<dd><code>getFirstLineOffset(["name"]) -&gt; integer</code>
<dd><code>getFirstLineOffset(["name"]) -&gt; string</code>
<p>Gets the offset of the first line of text inside text frame "name". If "name" is not given the currently selected item is used.</p></dd>
 
<dt><a name="-getFirstLinkedFrame"><strong>getFirstLinkedFrame</strong></a>(...)</dt>
134,7 → 134,7
 
<dt><a name="-linkTextFrames"><strong>linkTextFrames</strong></a>(...)</dt>
<dd><code>linkTextFrames("fromname", "toname")</code>
<p>Link two text frames. The frame named "fromname" is linked to the frame named "toname". The source frame must not already link to another frame. The target frame must not be linked from another frame.</p>
<p>Link two text frames. The frame named "fromname" is linked to the frame named "toname". The target frame must be an empty text frame and must not link to or be linked from any other frames already.</p>
<p>May throw <a href="#ScribusException">ScribusException</a> if linking rules are violated.</p></dd>
 
<dt><a name="-selectFrameText"><strong>selectFrameText</strong></a>(...)</dt>
/branches/Version15x/Scribus/doc/ru/scripterapi-textframes.html
33,7 → 33,7
<p>Gets the number of columns of the text frame "name". If "name" is not given the currently selected item is used.</p></dd>
 
<dt><a name="-getFirstLineOffset"><strong>getFirstLineOffset</strong></a>(...)</dt>
<dd><code>getFirstLineOffset(["name"]) -&gt; integer</code>
<dd><code>getFirstLineOffset(["name"]) -&gt; string</code>
<p>Gets the offset of the first line of text inside text frame "name". If "name" is not given the currently selected item is used.</p></dd>
 
<dt><a name="-getFirstLinkedFrame"><strong>getFirstLinkedFrame</strong></a>(...)</dt>
134,7 → 134,7
 
<dt><a name="-linkTextFrames"><strong>linkTextFrames</strong></a>(...)</dt>
<dd><code>linkTextFrames("fromname", "toname")</code>
<p>Link two text frames. The frame named "fromname" is linked to the frame named "toname". The source frame must not already link to another frame. The target frame must not be linked from another frame.</p>
<p>Link two text frames. The frame named "fromname" is linked to the frame named "toname". The target frame must be an empty text frame and must not link to or be linked from any other frames already.</p>
<p>May throw <a href="#ScribusException">ScribusException</a> if linking rules are violated.</p></dd>
 
<dt><a name="-selectFrameText"><strong>selectFrameText</strong></a>(...)</dt>
/branches/Version15x/Scribus/doc/fr/scripterapi-textframes.html
111,7 → 111,7
 
<dt><a name="-linkTextFrames"><strong>linkTextFrames</strong></a>(...)</dt>
<dd><code>linkTextFrames("nomDepart", "nomArrivee")</code>
<p>&Eacute;tablit un lien entre deux cadres de texte. Le cadre nommé "nomDepart" est lié au cadre "nomArrivee". Le cadre source ne doit pas déja porter un lien vers un cadre de texte suivant. Le cadre cible ne doit pas porter de lien provenant d'autres cadres.</p>
<p>&Eacute;tablit un lien entre deux cadres de texte. Le cadre nommé "nomDepart" est lié au cadre "nomArrivee". Le cadre cible doit &ecirc;tre un cadre de texte vide et ne doit pas pointer vers d'autres cadres ni porter un lien provenant d'autres cadres.</p>
<p>Peut générer <a href="#ScribusException">ScribusException</a> en cas d'infraction des règles de liens.</p></dd>