summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2022-03-17 20:37:39 +0100
committerMiklos Vajna <vmiklos@collabora.com>2022-03-18 08:07:02 +0100
commit1868dea877b0c956ee34e92afad59920e66cad3f (patch)
tree1de6e3485125f09e6d3436c6a2d6b9f1e1bc0b06 /sd/source
parent778bbcede813dd51e11ee61583247db1199eda63 (diff)
sd theme: add ODP import/export for shape fill color
Refer to the 12 pre-defined colors by name + don't write the attribute for the case when there is no theme. Change-Id: I37c984b3371ec878a0d733977f5c937dce27c440 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131717 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/core/stlsheet.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 30b4bc38eee8..feff63dbf69a 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -51,6 +51,7 @@
#include <svx/sdtayitm.hxx>
#include <svx/sdtaiitm.hxx>
#include <svx/xit.hxx>
+#include <svx/xflclit.hxx>
#include <tools/diagnose_ex.h>
#include <stlsheet.hxx>
#include <sdresid.hxx>
@@ -1315,6 +1316,17 @@ PropertyState SAL_CALL SdStyleSheet::getPropertyState( const OUString& PropertyN
if( ( pItem == nullptr ) || pItem->GetName().isEmpty() )
eState = PropertyState_DEFAULT_VALUE;
}
+ break;
+ case XATTR_FILLCOLOR:
+ if (pEntry->nMemberId == MID_COLOR_THEME_INDEX)
+ {
+ const XFillColorItem* pColor = rStyleSet.GetItem<XFillColorItem>(pEntry->nWID);
+ if (pColor->GetThemeColor().GetThemeIndex() == -1)
+ {
+ eState = PropertyState_DEFAULT_VALUE;
+ }
+ }
+ break;
}
}