sw/source/core/unocore/unostyle.cxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
New commits: commit bfc1eecc83a6b3b71fc7d5b5aa09389d682c611d Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Tue Jul 4 14:54:47 2023 +0200 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Sat Jul 8 22:38:14 2023 +0200 tdf#156155 sw: export draw:fill to top-level ODF graphic styles The default for XATTR_FILLSTYLE for Writer flys differs from the default in the item pool, which is intended for svx shapes/SdrObjects. This is implemented with an intermediate mpDfltFrameFormat but it needs some special handling so the attribute ends up in the styles.xml. Change-Id: I8f369809a9f3b7e85a8bc7ad5d309dbc3cd6ccfe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153970 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> (cherry picked from commit 9410a22cdbe7c977206456218c75683a305ef79e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153994 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 3402d34ef060..2cdab9f14431 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -2573,6 +2573,21 @@ uno::Sequence<beans::PropertyState> SwXStyle::getPropertyStates(const uno::Seque } } break; + case XATTR_FILLSTYLE: + { + if (m_rEntry.m_eFamily == SfxStyleFamily::Frame + && xStyle->GetFrameFormat()->DerivedFrom() == GetDoc()->GetDfltFrameFormat()) + { // tdf#156155 mpDfltFrameFormat is the parent, but because + // it IsDefault() it is not enumerated/exported as a style + // to ODF, so export its one important value here. + pStates[i] = beans::PropertyState_DIRECT_VALUE; + } + else + { + pStates[i] = pPropSet->getPropertyState(*pEntry, *pSourceSet); + } + } + break; case RES_BACKGROUND: { // for FlyFrames we need to mark the used properties from type RES_BACKGROUND