Kaydet (Commit) db38e3f2 authored tarafından Michael Stahl's avatar Michael Stahl

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 9835a582)

Change-Id: Ic99ad4bf0c8e6e24fc10da173ec480c9d29c0363
üst d412e969
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment