r13813 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:22 CEST 2009


Revision: 13813
Author: jghali
Date: 2009-08-07T17:41:35.804879Z
Commit message: #8318, Open Office Writer importer and odf notes : discard notes until notes are really supported

Changeset: 
M  /branches/Version135/Scribus/scribus/plugins/gettext/odtim/contentreader.cpp
M  /branches/Version135/Scribus/scribus/plugins/gettext/odtim/contentreader.h

Diffs:
Index: scribus/plugins/gettext/odtim/contentreader.h
===================================================================
--- scribus/plugins/gettext/odtim/contentreader.h	(revision 13812)
+++ scribus/plugins/gettext/odtim/contentreader.h	(revision 13813)
@@ -59,6 +59,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 13812)
+++ scribus/plugins/gettext/odtim/contentreader.cpp	(revision 13813)
@@ -44,6 +44,7 @@
 	currentStyle = NULL;
 	inList = false;
 	inNote = false;
+	inAnnotation = false;
 	inNoteBody = false;
 	inSpan = false;
 	append = 0;
@@ -128,6 +129,8 @@
 			write(currentListStyle->bullet());
 		}
 	}
+	else if (name == "office:annotation")
+		inAnnotation = true;
 	else if (name == "text:note")
 		inNote = true;
 	else if (name == "text:note-body")
@@ -199,7 +202,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();
@@ -216,6 +219,10 @@
 			styleNames.pop_back();	
 		currentStyle = sreader->getStyle(getName());
 	}
+	else if (name == "office:annotation")
+	{
+		inAnnotation = false;
+	}
 	else if (name == "text:note")
 	{
 // 		qDebug("TN");
@@ -269,7 +276,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