summaryrefslogtreecommitdiff
path: root/writerperfect/source/writer
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-09-05 20:16:49 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-09-06 09:06:06 +0200
commit4f7034b64cd6ae6cd7bc2ef99d29709ab6117a31 (patch)
treebd709d0e3ad7cc1f8c0b49b07bb71e16f7361c2a /writerperfect/source/writer
parent8a85ed4cbd4b5e3221bb35bdd8c882950b61bd93 (diff)
EPUB export: handle text properties from text styles
This is the last combination of style -> direct inheritance that was not handled previously. Change-Id: Ie92b38b89a13b81f09cd7300b0d1b939cda3d8ff Reviewed-on: https://gerrit.libreoffice.org/41952 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'writerperfect/source/writer')
-rw-r--r--writerperfect/source/writer/exp/txtparai.cxx20
1 files changed, 15 insertions, 5 deletions
diff --git a/writerperfect/source/writer/exp/txtparai.cxx b/writerperfect/source/writer/exp/txtparai.cxx
index 932ae744f4e9..31ab25f43cad 100644
--- a/writerperfect/source/writer/exp/txtparai.cxx
+++ b/writerperfect/source/writer/exp/txtparai.cxx
@@ -55,13 +55,23 @@ void XMLSpanContext::startElement(const OUString &/*rName*/, const css::uno::Ref
{
// Reference to an automatic text style, try to look it up.
auto itStyle = mrImport.GetAutomaticTextStyles().find(rAttributeValue);
- if (itStyle == mrImport.GetAutomaticTextStyles().end())
+ if (itStyle != mrImport.GetAutomaticTextStyles().end())
+ {
+ // Apply properties directly, librevenge has no notion of automatic styles.
+ librevenge::RVNGPropertyList::Iter itProp(itStyle->second);
+ for (itProp.rewind(); itProp.next();)
+ aPropertyList.insert(itProp.key(), itProp()->clone());
continue;
+ }
- // Apply properties directly, librevenge has no notion of automatic styles.
- librevenge::RVNGPropertyList::Iter itProp(itStyle->second);
- for (itProp.rewind(); itProp.next();)
- aPropertyList.insert(itProp.key(), itProp()->clone());
+ itStyle = mrImport.GetTextStyles().find(rAttributeValue);
+ if (itStyle != mrImport.GetTextStyles().end())
+ {
+ // Apply properties from text style.
+ librevenge::RVNGPropertyList::Iter itProp(itStyle->second);
+ for (itProp.rewind(); itProp.next();)
+ aPropertyList.insert(itProp.key(), itProp()->clone());
+ }
}
else
{