summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-05-30 13:11:01 +0200
committerAndras Timar <andras.timar@collabora.com>2017-05-31 15:32:00 +0200
commitd55f7bd0127c84b36312f0284b94a9568a578691 (patch)
treefa4a6b512019daeb51289ba2b626afdf86c95cb4 /xmloff
parent2650a973ced3f1aef8169dd49bde2645a7eb2c03 (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/38214 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 024fa6b3915fd84586b348b5033dcc4312cd8926)
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/draw/shapeexport.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index f3880cb1c5ab..95013a03a27d 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -385,11 +385,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