lokalize
xliffstorage.cpp
Go to the documentation of this file.
105 if (parentElement.tagName()=="group" && parentElement.attribute("restype")=="x-gettext-plurals")
285 //qWarning()<<"text is fragmented into several QDomCharacterData. localDelLen:"<<localDelLen<<"cData:"<<cData;
313 qWarning()<<"inserting tag"<<tag.name()<<tag.id<<tag.start<<tag.end<<mid<<data->pos<<startingPos;
316 QDomElement newNode=elem.insertAfter( elem.ownerDocument().createElement(tag.getElementName()),n).toElement();
349 childrenCumulativeLen+=InlineTag::isPaired(InlineTag::getElementType(tmp.toElement().tagName().toUtf8()));
406 data->tags.append(InlineTag(startingPos, -1, InlineTag::getElementType(el.tagName().toUtf8()), el.attribute("id"), el.attribute("xid")));
490 catalogString.string=content(unit.firstChildElement( names[part==DocPosition::Target]), &data );
547 targetEl = unitEl.insertAfter(m_doc.createElement(bintargettarget[pos.entry<size()]),refNode).toElement();
630 static QDomElement phaseElement(QDomDocument m_doc, const QString& name, QDomElement& phasegroup)
CatalogString catalogString(const DocPosition &pos) const
Definition: xliffstorage.cpp:495
static QString doContent(QDomElement elem, int startingPos, ContentEditingData *data)
Definition: xliffstorage.cpp:250
QDomNodeList elementsByTagName(const QString &tagname) const
bool contains(const Key &key) const
QDomNode appendChild(const QDomNode &newChild)
QString toString(Qt::DateFormat format) const
void append(const T &value)
Definition: pos.h:44
QString attribute(const QString &name, const QString &defValue) const
QString data() const
QDomNode insertAfter(const QDomNode &newChild, const QDomNode &refChild)
Definition: catalogcapabilities.h:30
bool isElement() const
T & last()
int size() const
QDomElement nextSiblingElement(const QString &tagName) const
QVector< Note > phaseNotes(const QString &phase) const
Definition: xliffstorage.cpp:877
QVector< T > toVector() const
InlineTag targetDeleteTag(const DocPosition &)
Definition: xliffstorage.cpp:579
const_iterator insert(const T &value)
bool isAttr() const
QStringList matchData(const DocPosition &pos) const
user-invisible data for matching, e.g.
Definition: xliffstorage.cpp:928
QString setPhase(const DocPosition &pos, const QString &phase)
Definition: xliffstorage.cpp:901
bool isEmpty() const
void targetInsertTag(const DocPosition &, const InlineTag &)
Definition: xliffstorage.cpp:572
static InlineElement getElementType(const QByteArray &)
Definition: catalogstring.cpp:58
QDomNode nextSibling() const
QDomElement toElement() const
QVector< Note > phaseNotes(QDomDocument m_doc, const QString &phasename, bool remove=false)
Definition: xliffstorage.cpp:857
QDomNode lastChild() const
QDate fromString(const QString &string, Qt::DateFormat format)
void clear()
int elapsed() const
void append(const T &value)
QDomDocument ownerDocument() const
QString text() const
bool hasAttribute(const QString &name) const
static void initNoteFromElement(Note ¬e, QDomElement elem)
Definition: xliffstorage.cpp:763
void setAttribute(const QString &name, const QString &value)
Definition: catalogcapabilities.h:33
int toInt(bool *ok, int base) const
QDomNodeList elementsByTagName(const QString &tagname) const
void targetInsert(const DocPosition &pos, const QString &arg)
Definition: xliffstorage.cpp:537
bool isEmpty() const
QStringList context(const DocPosition &pos) const
Definition: xliffstorage.cpp:921
void insertData(unsigned long offset, const QString &arg)
void setTarget(const DocPosition &pos, const QString &arg)
Definition: xliffstorage.cpp:587
bool isValid() const
virtual void setFeature(const QString &name, bool enable)
static Phase phaseFromElement(QDomElement phaseElem)
Definition: xliffstorage.cpp:652
void setEquivTrans(const DocPosition &pos, bool equivTrans)
Definition: xliffstorage.cpp:997
static QDomElement phaseElement(QDomDocument m_doc, const QString &name, QDomElement &phasegroup)
Definition: xliffstorage.cpp:630
Definition: phase.h:34
Definition: state.h:41
QDomText createTextNode(const QString &value)
void reserve(int size)
QStringList sourceFiles(const DocPosition &pos) const
Definition: xliffstorage.cpp:731
QDomNode removeChild(const QDomNode &oldChild)
bool contains(QChar ch, Qt::CaseSensitivity cs) const
static QString content(QDomElement elem, ContentEditingData *data=0)
walks through XLIFF XML and performs actions depending on ContentEditingData:
Definition: xliffstorage.cpp:245
QString source(const DocPosition &pos) const
flat-model interface (ignores XLIFF grouping)
Definition: xliffstorage.cpp:513
void targetDelete(const DocPosition &pos, int count)
edit operations used by undo/redo system and sync-mode
Definition: xliffstorage.cpp:523
bool contains(const T &value) const
bool isNull() const
static QString genericContent(QDomElement elem, bool nonbin)
Definition: xliffstorage.cpp:509
QVector< AltTrans > altTrans(const DocPosition &pos) const
Definition: xliffstorage.cpp:595
data structure used to pass info about inline elements a XLIFF tag is represented by a TAGRANGE_IMAGE...
Definition: catalogstring.h:128
const T & at(int i) const
void save(QTextStream &str, int indent) const
QDomNode firstChild() const
bool isCharacterData() const
QString mid(int position, int n) const
void deleteData(unsigned long offset, unsigned long count)
Definition: catalogcapabilities.h:32
CatalogString sourceWithTags(DocPosition pos) const
Definition: xliffstorage.cpp:504
Definition: phase.h:68
QDomNode parentNode() const
bool save(QIODevice *device, bool belongsToProject=false)
Definition: xliffstorage.cpp:166
QVector< Note > notes(const DocPosition &pos) const
Definition: xliffstorage.cpp:777
Definition: pos.h:43
QDomElement firstChildElement(const QString &tagName) const
QDomElement lastChildElement(const QString &tagName) const
CatalogString targetWithTags(DocPosition pos) const
Definition: xliffstorage.cpp:500
QString id(const DocPosition &pos) const
entry id unique for this file
Definition: xliffstorage.cpp:934
TargetState setState(const DocPosition &pos, TargetState state)
Definition: xliffstorage.cpp:969
Definition: catalogstring.h:57
QString left(int n) const
QList< T > toList() const
void start()
Note setNote(DocPosition pos, const Note ¬e)
pos.form is note number
Definition: xliffstorage.cpp:800
iterator insert(const Key &key, const T &value)
void removeAttribute(const QString &name)
bool isEquivTrans(const DocPosition &pos) const
Definition: xliffstorage.cpp:992
QString tagName() const
Definition: catalogcapabilities.h:29
int size() const
QVector< Note > developerNotes(const DocPosition &pos) const
Definition: xliffstorage.cpp:793
Definition: note.h:31
QDomElement createElement(const QString &tagName)
static const char * getElementName(InlineElement type)
Definition: catalogstring.cpp:29
Definition: catalogcapabilities.h:31
QDomCharacterData toCharacterData() const
QVector< Note > setPhaseNotes(const QString &phase, QVector< Note > notes)
Definition: xliffstorage.cpp:882
int size() const
QDomNode insertBefore(const QDomNode &newChild, const QDomNode &refChild)
Definition: note.h:31
Definition: alttrans.h:30
data structure used to pass info about inline elements a XLIFF tag is represented by a TAGRANGE_IMAGE...
Definition: catalogstring.h:44
int numberOfPluralFormsForLangCode(const QString &langCode)
Definition: gettextheader.cpp:151
QDomNode at(int index) const
bool setContent(const QByteArray &data, bool namespaceProcessing, QString *errorMsg, int *errorLine, int *errorColumn)
const T value(const Key &key) const
QByteArray toUtf8() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:07 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:07 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.