sw/source/core/unocore/unodraw.cxx | 7 +++++++ 1 file changed, 7 insertions(+)
New commits: commit 2a63aa191bdc3fff47908940ec3a5db570c1d7d0 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Mon Jun 16 10:25:43 2025 +0500 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Mon Jun 16 13:36:22 2025 +0200 tdf#167035: SwFmDrawPage::get/setPropertyValue for BackgroundFullSize It was left no-op in commit 7ab51def766ad6bfdcf5111e7b751bbc2bbf1d73 (sw: implement "Theme" property for the XDrawPage in Writer, 2023-02-01). This resulted in the request for the property returning an empty Any; then export code throwed with this stack: xolo.dll!cppu::any2bool(const com::sun::star::uno::Any & rAny) Line 105 xolo.dll!XMLNamedBoolPropertyHdl::exportXML(rtl::OUString & rStrExpValue, const com::sun::star::uno::Any & rValue, const SvXMLUnitConverter & __formal) Line 55 xolo.dll!XMLPropertySetMapper::exportXML(rtl::OUString & rStrExpValue, const XMLPropertyState & rProperty, const SvXMLUnitConverter & rUnitConverter) Line 215 xolo.dll!SvXMLExportPropertyMapper::_exportXML(comphelper::AttributeList & rAttrList, const XMLPropertyState & rProperty, const SvXMLUnitConverter & rUnitConverter, const SvXMLNamespaceMap & rNamespaceMap, const std::vector<XMLPropertyState,std::allocator<XMLPropertyState>> * pProperties, unsigned long nIdx) Line 1079 xolo.dll!SvXMLExportPropertyMapper::_exportXML(unsigned short nPropType, unsigned short & rPropTypeFlags, comphelper::AttributeList & rAttrList, const std::vector<XMLPropertyState,std::allocator<XMLPropertyState>> & rProperties, const SvXMLUnitConverter & rUnitConverter, const SvXMLNamespaceMap & rNamespaceMap, std::vector<unsigned short,std::allocator<unsigned short>> * pIndexArray, long nPropMapStartIdx, long nPropMapEndIdx) Line 919 xolo.dll!SvXMLExportPropertyMapper::exportXML(SvXMLExport & rExport, const std::vector<XMLPropertyState,std::allocator<XMLPropertyState>> & rProperties, long nPropMapStartIdx, long nPropMapEndIdx, SvXmlExportFlags nFlags, bool bUseExtensionNamespaceForGraphicProperties) Line 823 xolo.dll!SvXMLAutoStylePoolP_Impl::exportXML(XmlStyleFamily nFamily, const SvXMLAutoStylePoolP * pAntiImpl) Line 683 xolo.dll!SvXMLAutoStylePoolP::exportXML(XmlStyleFamily nFamily) Line 369 xolo.dll!SdXMLExport::ExportAutoStyles_() Line 2207 xolo.dll!SvXMLExport::ImplExportAutoStyles() Line 1122 xolo.dll!SvXMLExport::exportDoc(xmloff::token::XMLTokenEnum eClass) Line 1390 xolo.dll!SvXMLExport::filter(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> & aDescriptor) Line 814 svxcorelo.dll!SvxDrawingLayerExport(SdrModel * pModel, const com::sun::star::uno::Reference<com::sun::star::io::XOutputStream> & xOut, const com::sun::star::uno::Reference<com::sun::star::lang::XComponent> & xComponent, const char * pExportService) Line 108 svxcorelo.dll!SvxDrawingLayerExport(SdrModel * pModel, const com::sun::star::uno::Reference<com::sun::star::io::XOutputStream> & xOut, const com::sun::star::uno::Reference<com::sun::star::lang::XComponent> & xComponent) Line 43 svxcorelo.dll!SvxDrawingLayerExport(SdrModel * pModel, const com::sun::star::uno::Reference<com::sun::star::io::XOutputStream> & xOut) Line 133 swlo.dll!SwTransferable::WriteObject(SvStream & rOStream, void * pObject, unsigned long nObjectType, const com::sun::star::datatransfer::DataFlavor & __formal) Line 738 vcllo.dll!TransferableHelper::SetObject(void * pUserObject, unsigned long nUserObjectId, const com::sun::star::datatransfer::DataFlavor & rFlavor) Line 912 swlo.dll!SwTransferable::GetData(const com::sun::star::datatransfer::DataFlavor & rFlavor, const rtl::OUString & rDestDoc) Line 612 vcllo.dll!TransferableHelper::getTransferData2(const com::sun::star::datatransfer::DataFlavor & rFlavor, const rtl::OUString & rDestDoc) Line 456 vcllo.dll!TransferableHelper::getTransferData(const com::sun::star::datatransfer::DataFlavor & rFlavor) Line 321 vclplug_winlo.dll!CXTDataObject::renderAnyDataAndSetupStgMedium(tagFORMATETC & fetc, tagSTGMEDIUM & stgmedium) Line 341 vclplug_winlo.dll!CXTDataObject::GetData(tagFORMATETC * pFormatetc, tagSTGMEDIUM * pmedium) Line 261 vclplug_winlo.dll!CXNotifyingDataObject::GetData(tagFORMATETC * pFormatetc, tagSTGMEDIUM * pmedium) Line 102 ole32.dll!HandleFromHandle(IDataObject * pDataObj, tagFORMATETC * pformatetc, tagSTGMEDIUM * pmedium) Line 2049 ole32.dll!RenderCurrentFormat(HWND__ * hClipWnd, unsigned int cf, tagSTGMEDIUM * pmedium, IDataObject * pDataObj) Line 4062 ole32.dll!RenderFormat(HWND__ * hClipWnd, unsigned int cf, IDataObject * pDataObj, void * pvMTADataObject) Line 4196 when trying to export this property as a boolean. I don't know if there needs to be some change to handle the empty Any case properly here; but now SwFmDrawPage provides the wanted value. Change-Id: Id4fa7ff989697aa4329c6c36e0927d95eae8e6e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186533 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index fa36b2c394ba..cc59b24dba70 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -417,7 +417,11 @@ void SwFmDrawPage::setPropertyValue(const OUString& rPropertyName, const uno::An case WID_PAGE_USERATTRIBS: case WID_PAGE_ISDARK: case WID_NAVORDER: + break; + case WID_PAGE_BACKFULL: + if (bool bVal; aValue >>= bVal) + GetSdrPage()->SetBackgroundFullSize(bVal); break; default: @@ -462,7 +466,10 @@ uno::Any SwFmDrawPage::getPropertyValue(const OUString& rPropertyName) case WID_PAGE_USERATTRIBS: case WID_PAGE_ISDARK: case WID_NAVORDER: + break; + case WID_PAGE_BACKFULL: + aAny <<= GetSdrPage()->IsBackgroundFullSize(); break; default: