diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-05-30 13:11:01 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-05-30 16:31:14 +0200 |
commit | d9ae5391e72b91f80d6915d2ff420e191fdc892f (patch) | |
tree | 7b6d2145776f3ea259aaa080f3bbe2f40c3715c4 | |
parent | 47b8e2a05cae8c32017725f6c498d3d4892ca5c4 (diff) |
tdf#108231 tdf#108109 xmloff: SvxUnoDrawingModel doesn't implement...
... XStyleFamiliesSupplier, so try to do without. This is called from
sw in case SWTRANSFER_OBJECTTYPE_DRAWMODEL.
(regression from 9835a5823e0f559aabbc0e15ea126c82229c4bc7)
Change-Id: Ic99ad4bf0c8e6e24fc10da173ec480c9d29c0363
(cherry picked from commit db38e3f201517acf22c1773ae9fc4cb2514788b1)
Reviewed-on: https://gerrit.libreoffice.org/38213
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 13e8ef9decde..0116c610a5c6 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -389,11 +389,16 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap // Shapes with a Writer TextBox always have a parent style. // If there would be none, then just assign the first available. uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(GetExport().GetModel(), uno::UNO_QUERY); - uno::Reference<container::XNameAccess> xStyleFamilies = xStyleFamiliesSupplier->getStyleFamilies(); - uno::Reference<container::XNameAccess> xFrameStyles = xStyleFamilies->getByName("FrameStyles").get< uno::Reference<container::XNameAccess> >(); - uno::Sequence<OUString> aFrameStyles = xFrameStyles->getElementNames(); - if (aFrameStyles.hasElements()) - aParentName = aFrameStyles[0]; + if (xStyleFamiliesSupplier.is()) // tdf#108231 + { + uno::Reference<container::XNameAccess> xStyleFamilies = xStyleFamiliesSupplier->getStyleFamilies(); + uno::Reference<container::XNameAccess> xFrameStyles = xStyleFamilies->getByName("FrameStyles").get< uno::Reference<container::XNameAccess> >(); + uno::Sequence<OUString> aFrameStyles = xFrameStyles->getElementNames(); + if (aFrameStyles.hasElements()) + { + aParentName = aFrameStyles[0]; + } + } } // filter propset |