r13814 by jghali - #8318, Open Office Writer importer and odf notes : discard notes until notes are really supported
scribus-commit
scribus-commit at lists.scribus.net
Fri Aug 7 19:45:38 CEST 2009
Revision: 13814
Author: jghali
Date: 2009-08-07T17:42:03.993192Z
Commit message: #8318, Open Office Writer importer and odf notes : discard notes until notes are really supported
Changeset:
M /trunk/Scribus/scribus/plugins/gettext/odtim/contentreader.cpp
M /trunk/Scribus/scribus/plugins/gettext/odtim/contentreader.h
Diffs:
Index: scribus/plugins/gettext/odtim/contentreader.h
===================================================================
--- scribus/plugins/gettext/odtim/contentreader.h (revision 13813)
+++ scribus/plugins/gettext/odtim/contentreader.h (revision 13814)
@@ -61,6 +61,7 @@
gtStyle *pstyle;
bool importTextOnly;
bool inList;
+ bool inAnnotation;
bool inNote;
bool inNoteBody;
bool inSpan;
Index: scribus/plugins/gettext/odtim/contentreader.cpp
===================================================================
--- scribus/plugins/gettext/odtim/contentreader.cpp (revision 13813)
+++ scribus/plugins/gettext/odtim/contentreader.cpp (revision 13814)
@@ -48,6 +48,7 @@
currentStyle = NULL;
inList = false;
inNote = false;
+ inAnnotation = false;
inNoteBody = false;
inSpan = false;
append = 0;
@@ -132,6 +133,8 @@
write(currentListStyle->bullet());
}
}
+ else if (name == "office:annotation")
+ inAnnotation = true;
else if (name == "text:note")
inNote = true;
else if (name == "text:note-body")
@@ -203,7 +206,7 @@
// qDebug("TPTH");
write("\n");
--append;
- if (inList || inNote || inNoteBody)
+ if (inList || inAnnotation || inNote || inNoteBody)
{
if(static_cast<int>(styleNames.size()) > 0)
styleNames.pop_back();
@@ -220,6 +223,10 @@
styleNames.pop_back();
currentStyle = sreader->getStyle(getName());
}
+ else if (name == "office:annotation")
+ {
+ inAnnotation = false;
+ }
else if (name == "text:note")
{
// qDebug("TN");
@@ -273,7 +280,7 @@
void ContentReader::write(const QString& text)
{
- if (!inNote && !inNoteBody) // Disable notes import for now
+ if (!inNote && !inNoteBody && !inAnnotation) // Disable notes import for now
{
if (importTextOnly)
writer->appendUnstyled(text);
More information about the scribus-commit
mailing list