summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2023-03-17 14:54:30 +0200
committerMaxim Monastirsky <momonasmon@gmail.com>2023-03-23 08:54:06 +0000
commitb1393fd5ce847f40abab49f57c67929bb0087fae (patch)
tree6b185b3daf215c67171bd78c20b63d878084d933 /xmloff
parent5d88965e7cca19205f5ef5ebd10ae8a8459ecb49 (diff)
sc drawstyles: ODF import and export
Change-Id: Id92088a7d70c550682fe707d81e94157edc7caa8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149330 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/draw/shapeexport.cxx3
-rw-r--r--xmloff/source/draw/ximpshap.cxx6
2 files changed, 7 insertions, 2 deletions
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index da9fe7f0e438..056c3ce98267 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -1439,8 +1439,9 @@ void XMLShapeExport::ExportGraphicDefaults()
{
aStEx->exportDefaultStyle( xDefaults, XML_STYLE_FAMILY_SD_GRAPHICS_NAME, xPropertySetMapper );
- // write graphic family styles
+ // write graphic styles (family name differs depending on the module)
aStEx->exportStyleFamily("graphics", OUString(XML_STYLE_FAMILY_SD_GRAPHICS_NAME), xPropertySetMapper, false, XmlStyleFamily::SD_GRAPHICS_ID);
+ aStEx->exportStyleFamily("GraphicStyles", OUString(XML_STYLE_FAMILY_SD_GRAPHICS_NAME), xPropertySetMapper, false, XmlStyleFamily::SD_GRAPHICS_ID);
}
}
catch(const lang::ServiceNotRegisteredException&)
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 266135bad479..22f9d7ddb0a1 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -671,7 +671,11 @@ void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */)
else
{
// get graphics family
- xFamilies->getByName("graphics") >>= xFamily;
+ if (xFamilies->hasByName("graphics"))
+ xFamilies->getByName("graphics") >>= xFamily;
+ else
+ xFamilies->getByName("GraphicStyles") >>= xFamily;
+
aStyleName = GetImport().GetStyleDisplayName(
XmlStyleFamily::SD_GRAPHICS_ID,
aStyleName );