[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/libs/kotext/opendocument
From: Thorsten Zachmann <t.zachmann () zagge ! de>
Date: 2010-04-09 9:42:04
Message-ID: 20100409094204.95F6AAC894 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1112835 by zachmann:
Fix Bug: 233803 - Styles not saved for variables
Save styles for variables
BUG: 233803
M +18 -0 KoTextWriter.cpp
--- trunk/koffice/libs/kotext/opendocument/KoTextWriter.cpp #1112834:1112835
@@ -30,6 +30,7 @@
#include <QBuffer>
#include "KoInlineObject.h"
+#include "KoVariable.h"
#include "KoInlineTextObjectManager.h"
#include "styles/KoStyleManager.h"
#include "styles/KoCharacterStyle.h"
@@ -356,9 +357,26 @@
}
}
+ bool saveSpan = dynamic_cast<KoVariable*>(inlineObject) != 0;
+
+ if (saveSpan) {
+ QString styleName = saveCharacterStyle(charFormat, blockCharFormat);
+ if (!styleName.isEmpty()) {
+ writer->startElement("text:span", false);
+ writer->addAttribute("text:style-name", styleName);
+ }
+ else {
+ saveSpan = false;
+ }
+ }
+
if (saveInlineObject) {
inlineObject->saveOdf(context);
}
+
+ if (saveSpan) {
+ writer->endElement();
+ }
//
// Track the end marker for matched pairs so we produce valid
// ODF
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic