summaryrefslogtreecommitdiff
path: root/writerperfect
diff options
context:
space:
mode:
authorLaurent Alonso <laurent.alonso@inria.fr>2012-05-07 10:52:13 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2012-05-07 11:01:08 +0200
commit27482e865d1fc8d66d9a11fa524ceddf9d982833 (patch)
treeec787b01440e1aafe733c2d55879c907786644af /writerperfect
parent916b0a18acf0cabb01988a8162b9545aeee838a9 (diff)
Add possibility of generating foot/endnotes with text labels
Diffstat (limited to 'writerperfect')
-rw-r--r--writerperfect/source/filter/OdtGenerator.cxx26
1 files changed, 22 insertions, 4 deletions
diff --git a/writerperfect/source/filter/OdtGenerator.cxx b/writerperfect/source/filter/OdtGenerator.cxx
index 10443b90371e..16bc97b1045f 100644
--- a/writerperfect/source/filter/OdtGenerator.cxx
+++ b/writerperfect/source/filter/OdtGenerator.cxx
@@ -852,8 +852,17 @@ void OdtGenerator::openFootnote(const WPXPropertyList &propList)
}
mpImpl->mpCurrentContentElements->push_back(pOpenFootNote);
- mpImpl->mpCurrentContentElements->push_back(new TagOpenElement("text:note-citation"));
- if (propList["libwpd:number"])
+ TagOpenElement *pOpenFootCitation = new TagOpenElement("text:note-citation");
+ if (propList["text:label"])
+ {
+ WPXString tmpString(propList["text:label"]->getStr(),true);
+ pOpenFootCitation->addAttribute("text:label", tmpString);
+ }
+ mpImpl->mpCurrentContentElements->push_back(pOpenFootCitation);
+
+ if (propList["text:label"])
+ mpImpl->mpCurrentContentElements->push_back(new CharDataElement(propList["text:label"]->getStr().cstr()));
+ else if (propList["libwpd:number"])
mpImpl->mpCurrentContentElements->push_back(new CharDataElement(propList["libwpd:number"]->getStr().cstr()));
mpImpl->mpCurrentContentElements->push_back(new TagCloseElement("text:note-citation"));
@@ -885,8 +894,17 @@ void OdtGenerator::openEndnote(const WPXPropertyList &propList)
}
mpImpl->mpCurrentContentElements->push_back(pOpenEndNote);
- mpImpl->mpCurrentContentElements->push_back(new TagOpenElement("text:note-citation"));
- if (propList["libwpd:number"])
+ TagOpenElement *pOpenEndCitation = new TagOpenElement("text:note-citation");
+ if (propList["text:label"])
+ {
+ WPXString tmpString(propList["text:label"]->getStr(),true);
+ pOpenEndCitation->addAttribute("text:label", tmpString);
+ }
+ mpImpl->mpCurrentContentElements->push_back(pOpenEndCitation);
+
+ if (propList["text:label"])
+ mpImpl->mpCurrentContentElements->push_back(new CharDataElement(propList["text:label"]->getStr().cstr()));
+ else if (propList["libwpd:number"])
mpImpl->mpCurrentContentElements->push_back(new CharDataElement(propList["libwpd:number"]->getStr().cstr()));
mpImpl->mpCurrentContentElements->push_back(new TagCloseElement("text:note-citation"));