summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Repository.mk1
-rw-r--r--RepositoryModule_build.mk1
-rw-r--r--RepositoryModule_host.mk1
-rwxr-xr-xbin/update_pch31
-rw-r--r--cui/Library_cui.mk1
-rw-r--r--cui/inc/pch/precompiled_cui.hxx14
-rw-r--r--cui/source/tabpages/chardlg.cxx12
-rw-r--r--cui/source/tabpages/tpcolor.cxx10
-rw-r--r--docmodel/Library_docmodel.mk39
-rw-r--r--docmodel/Makefile7
-rw-r--r--docmodel/Module_docmodel.mk18
-rw-r--r--docmodel/README.md5
-rw-r--r--docmodel/inc/pch/precompiled_docmodel.cxx12
-rw-r--r--docmodel/inc/pch/precompiled_docmodel.hxx34
-rw-r--r--docmodel/source/uno/UnoThemeColor.cxx40
-rw-r--r--editeng/CppunitTest_editeng_core.mk1
-rw-r--r--editeng/Library_editeng.mk1
-rw-r--r--editeng/inc/pch/precompiled_editeng.hxx7
-rw-r--r--editeng/source/items/textitem.cxx105
-rw-r--r--editeng/source/uno/unotext.cxx22
-rw-r--r--include/docmodel/dllapi.h21
-rw-r--r--include/docmodel/theme/ThemeColor.hxx146
-rw-r--r--include/docmodel/theme/ThemeColorType.hxx42
-rw-r--r--include/docmodel/uno/UnoThemeColor.hxx55
-rw-r--r--include/editeng/colritem.hxx54
-rw-r--r--include/svx/ColorSets.hxx32
-rw-r--r--include/svx/xcolit.hxx9
-rw-r--r--offapi/UnoApi_offapi.mk1
-rw-r--r--offapi/com/sun/star/util/XThemeColor.idl26
-rw-r--r--oox/CppunitTest_oox_drawingml.mk1
-rw-r--r--oox/CppunitTest_oox_shape.mk1
-rw-r--r--oox/CppunitTest_oox_tokenmap.mk1
-rw-r--r--oox/Library_oox.mk1
-rw-r--r--oox/inc/pch/precompiled_oox.hxx69
-rw-r--r--oox/source/export/ThemeExport.cxx28
-rw-r--r--sd/CppunitTest_sd_uiimpress.mk1
-rw-r--r--sd/CppunitTest_sd_uimpress.mk1
-rw-r--r--sd/Library_sd.mk1
-rw-r--r--sd/inc/pch/precompiled_sd.hxx68
-rw-r--r--sd/source/core/stlsheet.cxx18
-rw-r--r--sd/source/filter/eppt/pptx-epptooxml.cxx2
-rw-r--r--sd/source/ui/func/fuconstr.cxx4
-rw-r--r--sd/source/ui/view/drtxtob1.cxx29
-rw-r--r--sd/source/ui/view/drviews2.cxx7
-rw-r--r--solenv/gbuild/extensions/pre_MergedLibsList.mk1
-rw-r--r--solenv/qa/python/gbuildtojson.py2
-rw-r--r--svx/CppunitTest_svx_removewhichrange.mk1
-rw-r--r--svx/CppunitTest_svx_styles.mk1
-rw-r--r--svx/CppunitTest_svx_unit.mk1
-rw-r--r--svx/Library_svxcore.mk1
-rw-r--r--svx/inc/pch/precompiled_svx.hxx29
-rw-r--r--svx/source/styles/ColorSets.cxx14
-rw-r--r--svx/source/table/cell.cxx19
-rw-r--r--svx/source/unodraw/unoshape.cxx18
-rw-r--r--svx/source/xoutdev/xattr.cxx47
-rw-r--r--sw/CppunitTest_sw_apitests.mk1
-rw-r--r--sw/CppunitTest_sw_core_draw.mk1
-rw-r--r--sw/CppunitTest_sw_core_theme.mk1
-rw-r--r--sw/CppunitTest_sw_macros_test.mk1
-rw-r--r--sw/CppunitTest_sw_ooxmlimport.mk1
-rw-r--r--sw/CppunitTest_sw_ooxmlimport2.mk1
-rw-r--r--sw/CppunitTest_sw_tiledrendering.mk1
-rw-r--r--sw/CppunitTest_sw_uwriter.mk1
-rw-r--r--sw/Library_sw.mk1
-rw-r--r--sw/layoutwriter_setup.mk1
-rw-r--r--sw/ooxmlexport_setup.mk1
-rw-r--r--sw/qa/core/theme/ThemeTest.cxx20
-rw-r--r--sw/source/uibase/sidebar/ThemePanel.cxx13
-rw-r--r--sw/uiwriter_setup.mk1
-rw-r--r--sw/ww8export_setup.mk1
70 files changed, 883 insertions, 277 deletions
diff --git a/Repository.mk b/Repository.mk
index ff20165796a5..89eb990b3354 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -401,6 +401,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
deploymentmisc \
$(if $(filter-out MACOSX WNT,$(OS)),desktopbe1) \
$(call gb_Helper_optional,SCRIPTING,dlgprov) \
+ docmodel \
drawinglayercore \
drawinglayer \
editeng \
diff --git a/RepositoryModule_build.mk b/RepositoryModule_build.mk
index 2f3a06edd12a..2059c1f2a5a9 100644
--- a/RepositoryModule_build.mk
+++ b/RepositoryModule_build.mk
@@ -63,6 +63,7 @@ $(eval $(call gb_Module_add_moduledirs,cross_toolset,\
configmgr \
connectivity \
cppcanvas \
+ docmodel \
drawinglayer \
editeng \
emfio \
diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk
index c0bd27b1c260..2fbee39dc610 100644
--- a/RepositoryModule_host.mk
+++ b/RepositoryModule_host.mk
@@ -74,6 +74,7 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
cui \
desktop \
$(call gb_Helper_optional,DICTIONARIES,dictionaries) \
+ docmodel\
drawinglayer \
editeng \
embeddedobj \
diff --git a/bin/update_pch b/bin/update_pch
index 1cb5cb9979a6..63a39ce51b0b 100755
--- a/bin/update_pch
+++ b/bin/update_pch
@@ -73,6 +73,7 @@ DEFAULTS = \
'desktop.deploymentgui' : ( 3, EXCLUDE, EXCLUDE, EXCLUDE), # 5.7
'desktop.deploymentmisc' : ( 3, EXCLUDE, EXCLUDE, EXCLUDE), # 3.4
'desktop.sofficeapp' : ( 6, EXCLUDE, INCLUDE, INCLUDE), # 6.5
+ 'docmodel.docmodel' : ( 3, EXCLUDE, EXCLUDE, INCLUDE), # 3.8
'drawinglayer.drawinglayer' : ( 4, EXCLUDE, EXCLUDE, EXCLUDE), # 7.4
'editeng.editeng' : ( 5, EXCLUDE, INCLUDE, EXCLUDE), # 13.0
'forms.frm' : ( 2, EXCLUDE, EXCLUDE, EXCLUDE), # 14.2
@@ -1191,8 +1192,8 @@ class TestMakefileParser(unittest.TestCase):
def test_parse_multiline_eval(self):
source = """$(eval $(call gb_Library_set_include,sal,\\
- $$(INCLUDE) \\
- -I$(SRCDIR)/sal/inc \\
+ $$(INCLUDE) \\
+ -I$(SRCDIR)/sal/inc \\
))
"""
lines = source.split('\n')
@@ -1203,9 +1204,9 @@ class TestMakefileParser(unittest.TestCase):
def test_parse_multiline_eval_with_if(self):
source = """$(eval $(call gb_Library_add_defs,sal,\\
- $(if $(filter $(OS),iOS), \\
- -DNO_CHILD_PROCESSES \\
- ) \\
+ $(if $(filter $(OS),iOS), \\
+ -DNO_CHILD_PROCESSES \\
+ ) \\
))
"""
lines = source.split('\n')
@@ -1216,7 +1217,7 @@ class TestMakefileParser(unittest.TestCase):
def test_parse_multiline_add_with_if(self):
source = """$(eval $(call gb_Library_add_exception_objects,sal,\\
- sal/osl/unx/time \\
+ sal/osl/unx/time \\
$(if $(filter DESKTOP,$(BUILD_TYPE)), sal/osl/unx/salinit) \\
))
"""
@@ -1230,11 +1231,11 @@ class TestMakefileParser(unittest.TestCase):
def test_parse_if_else(self):
source = """ifeq ($(OS),MACOSX)
$(eval $(call gb_Library_add_exception_objects,sal,\\
- sal/osl/mac/mac \\
+ sal/osl/mac/mac \\
))
else
$(eval $(call gb_Library_add_exception_objects,sal,\\
- sal/osl/unx/uunxapi \\
+ sal/osl/unx/uunxapi \\
))
endif
"""
@@ -1251,16 +1252,16 @@ endif
def test_parse_nested_if(self):
source = """ifeq ($(OS),MACOSX)
$(eval $(call gb_Library_add_exception_objects,sal,\\
- sal/osl/mac/mac \\
+ sal/osl/mac/mac \\
))
else
$(eval $(call gb_Library_add_exception_objects,sal,\\
- sal/osl/unx/uunxapi \\
+ sal/osl/unx/uunxapi \\
))
ifeq ($(OS),LINUX)
$(eval $(call gb_Library_add_exception_objects,sal,\\
- sal/textenc/context \\
+ sal/textenc/context \\
))
endif
endif
@@ -1280,16 +1281,16 @@ endif
def test_parse_exclude_system(self):
source = """ifeq ($(OS),MACOSX)
$(eval $(call gb_Library_add_exception_objects,sal,\\
- sal/osl/mac/mac \\
+ sal/osl/mac/mac \\
))
else
$(eval $(call gb_Library_add_exception_objects,sal,\\
- sal/osl/unx/uunxapi \\
+ sal/osl/unx/uunxapi \\
))
ifeq ($(OS),LINUX)
$(eval $(call gb_Library_add_exception_objects,sal,\\
- sal/textenc/context \\
+ sal/textenc/context \\
))
endif
endif
@@ -1306,7 +1307,7 @@ endif
def test_parse_filter(self):
source = """ifneq ($(filter $(OS),MACOSX iOS),)
$(eval $(call gb_Library_add_exception_objects,sal,\\
- sal/osl/unx/osxlocale \\
+ sal/osl/unx/osxlocale \\
))
endif
"""
diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 85f779cc964d..03a1577ee66b 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -38,6 +38,7 @@ $(eval $(call gb_Library_use_libraries,cui,\
comphelper \
cppu \
cppuhelper \
+ docmodel \
drawinglayer \
editeng \
i18nlangtag \
diff --git a/cui/inc/pch/precompiled_cui.hxx b/cui/inc/pch/precompiled_cui.hxx
index 6553c5874b1a..7b7688c74ad9 100644
--- a/cui/inc/pch/precompiled_cui.hxx
+++ b/cui/inc/pch/precompiled_cui.hxx
@@ -13,7 +13,7 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
- Generated on 2022-08-13 18:00:55 using:
+ Generated on 2023-01-10 23:29:57 using:
./bin/update_pch cui cui --cutoff=8 --exclude:system --include:module --exclude:local
If after updating build fails, use the following command to locate conflicting headers:
@@ -53,6 +53,7 @@
#include <string>
#include <string_view>
#include <type_traits>
+#include <typeinfo>
#include <unordered_map>
#include <unordered_set>
#include <utility>
@@ -114,7 +115,6 @@
#include <vcl/customweld.hxx>
#include <vcl/devicecoordinate.hxx>
#include <vcl/dllapi.h>
-#include <comphelper/errcode.hxx>
#include <vcl/event.hxx>
#include <vcl/fntstyle.hxx>
#include <vcl/font.hxx>
@@ -125,6 +125,7 @@
#include <vcl/image.hxx>
#include <vcl/imap.hxx>
#include <vcl/imapobj.hxx>
+#include <vcl/kernarray.hxx>
#include <vcl/keycod.hxx>
#include <vcl/keycodes.hxx>
#include <vcl/mapmod.hxx>
@@ -177,6 +178,7 @@
#include <basegfx/range/b2drange.hxx>
#include <basegfx/range/b2drectangle.hxx>
#include <basegfx/range/basicrange.hxx>
+#include <basegfx/tuple/Size2D.hxx>
#include <basegfx/tuple/Tuple2D.hxx>
#include <basegfx/tuple/Tuple3D.hxx>
#include <basegfx/tuple/b2dtuple.hxx>
@@ -186,6 +188,7 @@
#include <basegfx/vector/b2dsize.hxx>
#include <basegfx/vector/b2dvector.hxx>
#include <basegfx/vector/b2enums.hxx>
+#include <basegfx/vector/b2isize.hxx>
#include <basegfx/vector/b2ivector.hxx>
#include <basic/basicdllapi.h>
#include <basic/sbxdef.hxx>
@@ -261,6 +264,8 @@
#include <com/sun/star/util/XAccounting.hpp>
#include <comphelper/compbase.hxx>
#include <comphelper/comphelperdllapi.h>
+#include <comphelper/diagnose_ex.hxx>
+#include <comphelper/errcode.hxx>
#include <comphelper/interfacecontainer4.hxx>
#include <comphelper/lok.hxx>
#include <comphelper/processfactory.hxx>
@@ -276,6 +281,7 @@
#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/weakref.hxx>
+#include <docmodel/theme/ThemeColorType.hxx>
#include <drawinglayer/drawinglayerdllapi.h>
#include <drawinglayer/geometry/viewinformation2d.hxx>
#include <drawinglayer/primitive2d/CommonTypes.hxx>
@@ -297,6 +303,7 @@
#include <editeng/svxfont.hxx>
#include <i18nlangtag/lang.h>
#include <i18nlangtag/languagetag.hxx>
+#include <i18nutil/i18nutildllapi.h>
#include <i18nutil/searchopt.hxx>
#include <i18nutil/transliteration.hxx>
#include <o3tl/cow_wrapper.hxx>
@@ -401,7 +408,6 @@
#include <tools/datetime.hxx>
#include <tools/debug.hxx>
#include <tools/degree.hxx>
-#include <comphelper/diagnose_ex.hxx>
#include <tools/fldunit.hxx>
#include <tools/fontenum.hxx>
#include <tools/fract.hxx>
@@ -420,7 +426,6 @@
#include <tools/toolsdllapi.h>
#include <tools/urlobj.hxx>
#include <tools/weakbase.h>
-#include <tools/weakbase.hxx>
#include <typelib/typeclass.h>
#include <typelib/typedescription.h>
#include <typelib/uik.h>
@@ -434,6 +439,7 @@
#include <unotools/resmgr.hxx>
#include <unotools/syslocale.hxx>
#include <unotools/unotoolsdllapi.h>
+#include <unotools/weakref.hxx>
#endif // PCH_LEVEL >= 3
#if PCH_LEVEL >= 4
#include <cfgutil.hxx>
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 3fff1a62352a..194dfd65f830 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1596,12 +1596,14 @@ bool SvxCharEffectsPage::FillItemSetColor_Impl( SfxItemSet& rSet )
{
SvxColorItem aItem( aSelectedColor.m_aColor, nWhich );
- if (aSelectedColor.m_nThemeIndex != -1)
+ // The color was picked from the theme palette, remember its index.
+ model::ThemeColorType eType = model::convertToThemeColorType(aSelectedColor.m_nThemeIndex);
+ if (eType != model::ThemeColorType::Unknown)
{
- // The color was picked from the theme palette, remember its index.
- aItem.GetThemeColor().SetThemeIndex(aSelectedColor.m_nThemeIndex);
- aItem.GetThemeColor().SetLumMod(aSelectedColor.m_nLumMod);
- aItem.GetThemeColor().SetLumOff(aSelectedColor.m_nLumOff);
+ aItem.GetThemeColor().setType(eType);
+ aItem.GetThemeColor().clearTransformations();
+ aItem.GetThemeColor().addTransformation({model::TransformationType::LumMod, aSelectedColor.m_nLumMod});
+ aItem.GetThemeColor().addTransformation({model::TransformationType::LumOff, aSelectedColor.m_nLumOff});
}
rSet.Put(aItem);
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 7790ff60a8c2..9c0b5b457525 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -245,17 +245,19 @@ bool SvxColorTabPage::FillItemSet( SfxItemSet* rSet )
sColorName = "#" + aCurrentColor.m_aColor.AsRGBHexString().toAsciiUpperCase();
maPaletteManager.AddRecentColor( aCurrentColor.m_aColor, sColorName );
XFillColorItem aColorItem( sColorName, aCurrentColor.m_aColor );
- if (aCurrentColor.m_nThemeIndex != -1)
+ model::ThemeColorType eType = model::convertToThemeColorType(aCurrentColor.m_nThemeIndex);
+ if (eType != model::ThemeColorType::Unknown)
{
- aColorItem.GetThemeColor().SetThemeIndex(aCurrentColor.m_nThemeIndex);
+ aColorItem.GetThemeColor().setType(eType);
}
+ aColorItem.GetThemeColor().clearTransformations();
if (aCurrentColor.m_nLumMod != 10000)
{
- aColorItem.GetThemeColor().SetLumMod(aCurrentColor.m_nLumMod);
+ aColorItem.GetThemeColor().addTransformation({model::TransformationType::LumMod, aCurrentColor.m_nLumMod});
}
if (aCurrentColor.m_nLumOff != 0)
{
- aColorItem.GetThemeColor().SetLumOff(aCurrentColor.m_nLumOff);
+ aColorItem.GetThemeColor().addTransformation({model::TransformationType::LumOff, aCurrentColor.m_nLumOff});
}
rSet->Put( aColorItem );
rSet->Put( XFillStyleItem( drawing::FillStyle_SOLID ) );
diff --git a/docmodel/Library_docmodel.mk b/docmodel/Library_docmodel.mk
new file mode 100644
index 000000000000..3e0d28dfda28
--- /dev/null
+++ b/docmodel/Library_docmodel.mk
@@ -0,0 +1,39 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Library_Library,docmodel))
+
+$(eval $(call gb_Library_add_exception_objects,docmodel,\
+ docmodel/source/uno/UnoThemeColor \
+))
+
+$(eval $(call gb_Library_set_include,docmodel,\
+ $$(INCLUDE) \
+ -I$(SRCDIR)/docmodel/inc \
+))
+
+$(eval $(call gb_Library_add_defs,docmodel,\
+ -DDOCMODEL_DLLIMPLEMENTATION \
+))
+
+$(eval $(call gb_Library_set_precompiled_header,docmodel,docmodel/inc/pch/precompiled_docmodel))
+
+$(eval $(call gb_Library_use_sdk_api,docmodel))
+
+$(eval $(call gb_Library_use_libraries,docmodel,\
+ basegfx \
+ comphelper \
+ cppuhelper \
+ cppu \
+ sal \
+ vcl \
+ tl \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/docmodel/Makefile b/docmodel/Makefile
new file mode 100644
index 000000000000..ccb1c85a04da
--- /dev/null
+++ b/docmodel/Makefile
@@ -0,0 +1,7 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+
+module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(module_directory)/../solenv/gbuild/partial_build.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/docmodel/Module_docmodel.mk b/docmodel/Module_docmodel.mk
new file mode 100644
index 000000000000..7e55ff74ad60
--- /dev/null
+++ b/docmodel/Module_docmodel.mk
@@ -0,0 +1,18 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Module_Module,docmodel))
+
+$(eval $(call gb_Module_add_targets,docmodel,\
+ Library_docmodel \
+))
+
+
+
+# vim: set noet sw=4 ts=4:
diff --git a/docmodel/README.md b/docmodel/README.md
new file mode 100644
index 000000000000..c8d08b133b1e
--- /dev/null
+++ b/docmodel/README.md
@@ -0,0 +1,5 @@
+# Document Model Types and Objects
+
+Contains document model types, that don't require many depenencies except
+basic types found in basegfx and tools. The purpose of this types and
+objects is to be available in all common components.
diff --git a/docmodel/inc/pch/precompiled_docmodel.cxx b/docmodel/inc/pch/precompiled_docmodel.cxx
new file mode 100644
index 000000000000..f8a84e17d6c3
--- /dev/null
+++ b/docmodel/inc/pch/precompiled_docmodel.cxx
@@ -0,0 +1,12 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "precompiled_docmodel.hxx"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/docmodel/inc/pch/precompiled_docmodel.hxx b/docmodel/inc/pch/precompiled_docmodel.hxx
new file mode 100644
index 000000000000..1942b8737a17
--- /dev/null
+++ b/docmodel/inc/pch/precompiled_docmodel.hxx
@@ -0,0 +1,34 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+/*
+ This file has been autogenerated by update_pch.sh. It is possible to edit it
+ manually (such as when an include file has been moved/renamed/removed). All such
+ manual changes will be rewritten by the next run of update_pch.sh (which presumably
+ also fixes all possible problems, so it's usually better to use it).
+
+ Generated on 2023-01-10 23:20:14 using:
+ bin/update_pch docmodel docmodel --cutoff=3 --exclude:system --exclude:module --include:local
+
+ If after updating build fails, use the following command to locate conflicting headers:
+ ./bin/update_pch_bisect ./docmodel/inc/pch/precompiled_docmodel.hxx "make docmodel.build" --find-conflicts
+*/
+
+#include <sal/config.h>
+#if PCH_LEVEL >= 1
+#endif // PCH_LEVEL >= 1
+#if PCH_LEVEL >= 2
+#include <sal/types.h>
+#endif // PCH_LEVEL >= 2
+#if PCH_LEVEL >= 3
+#endif // PCH_LEVEL >= 3
+#if PCH_LEVEL >= 4
+#endif // PCH_LEVEL >= 4
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/docmodel/source/uno/UnoThemeColor.cxx b/docmodel/source/uno/UnoThemeColor.cxx
new file mode 100644
index 000000000000..f6374b54933b
--- /dev/null
+++ b/docmodel/source/uno/UnoThemeColor.cxx
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#include <docmodel/uno/UnoThemeColor.hxx>
+#include <cppuhelper/queryinterface.hxx>
+
+using namespace css;
+
+// css::lang::XUnoTunnel
+UNO3_GETIMPLEMENTATION_IMPL(UnoThemeColor);
+
+sal_Int16 UnoThemeColor::getType() { return sal_uInt16(maThemeColor.getType()); }
+
+namespace model::theme
+{
+uno::Reference<util::XThemeColor> createXThemeColor(model::ThemeColor const& rThemeColor)
+{
+ return new UnoThemeColor(rThemeColor);
+}
+
+void setFromXThemeColor(model::ThemeColor& rThemeColor,
+ uno::Reference<util::XThemeColor> const& rxColorTheme)
+{
+ UnoThemeColor* pUnoThemeColor = comphelper::getFromUnoTunnel<UnoThemeColor>(rxColorTheme);
+ if (pUnoThemeColor)
+ {
+ rThemeColor = pUnoThemeColor->getThemeColor();
+ }
+}
+
+} // end model::theme
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/CppunitTest_editeng_core.mk b/editeng/CppunitTest_editeng_core.mk
index 3b3a999e8fa0..9b79048b637a 100644
--- a/editeng/CppunitTest_editeng_core.mk
+++ b/editeng/CppunitTest_editeng_core.mk
@@ -22,6 +22,7 @@ $(eval $(call gb_CppunitTest_use_libraries,editeng_core, \
comphelper \
cppu \
cppuhelper \
+ docmodel \
i18nlangtag \
i18nutil \
lng \
diff --git a/editeng/Library_editeng.mk b/editeng/Library_editeng.mk
index 6602793e3e02..7f7f3581b62f 100644
--- a/editeng/Library_editeng.mk
+++ b/editeng/Library_editeng.mk
@@ -138,6 +138,7 @@ $(eval $(call gb_Library_add_exception_objects,editeng,\
$(eval $(call gb_Library_use_libraries,editeng,\
xo \
basegfx \
+ docmodel \
lng \
svt \
tk \
diff --git a/editeng/inc/pch/precompiled_editeng.hxx b/editeng/inc/pch/precompiled_editeng.hxx
index 8472a893b5a1..3f5d71018ac5 100644
--- a/editeng/inc/pch/precompiled_editeng.hxx
+++ b/editeng/inc/pch/precompiled_editeng.hxx
@@ -13,7 +13,7 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
- Generated on 2022-09-03 23:10:43 using:
+ Generated on 2023-01-10 23:29:32 using:
./bin/update_pch editeng editeng --cutoff=5 --exclude:system --include:module --exclude:local
If after updating build fails, use the following command to locate conflicting headers:
@@ -107,7 +107,6 @@
#include <vcl/bitmapex.hxx>
#include <vcl/checksum.hxx>
#include <vcl/dllapi.h>
-#include <comphelper/errcode.hxx>
#include <vcl/font.hxx>
#include <vcl/gfxlink.hxx>
#include <vcl/graph.hxx>
@@ -128,6 +127,7 @@
#if PCH_LEVEL >= 3
#include <basegfx/basegfxdllapi.h>
#include <basegfx/color/bcolor.hxx>
+#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/numeric/ftools.hxx>
#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/point/b2ipoint.hxx>
@@ -136,6 +136,7 @@
#include <basegfx/range/Range2D.hxx>
#include <basegfx/range/b2drange.hxx>
#include <basegfx/range/basicrange.hxx>
+#include <basegfx/tuple/Size2D.hxx>
#include <basegfx/tuple/Tuple2D.hxx>
#include <basegfx/tuple/Tuple3D.hxx>
#include <basegfx/tuple/b2dtuple.hxx>
@@ -145,6 +146,7 @@
#include <basegfx/vector/b2dsize.hxx>
#include <basegfx/vector/b2dvector.hxx>
#include <basegfx/vector/b2enums.hxx>
+#include <basegfx/vector/b2isize.hxx>
#include <basegfx/vector/b2ivector.hxx>
#include <com/sun/star/awt/Key.hpp>
#include <com/sun/star/awt/KeyGroup.hpp>
@@ -190,6 +192,7 @@
#include <com/sun/star/xml/sax/XFastTokenHandler.hpp>
#include <comphelper/comphelperdllapi.h>
#include <comphelper/diagnose_ex.hxx>
+#include <comphelper/errcode.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
#include <cppu/cppudllapi.h>
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 30b780f1b855..bf6017cdcf6d 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -1353,38 +1353,6 @@ bool SvxContourItem::GetPresentation
return true;
}
-SvxThemeColor::SvxThemeColor()
- : maThemeIndex(-1)
- , mnLumMod(10000)
- , mnLumOff(0)
- , mnTintOrShade(0)
-{
-}
-
-bool SvxThemeColor::operator==(const SvxThemeColor& rThemeColor) const
-{
- return maThemeIndex == rThemeColor.maThemeIndex &&
- mnLumMod == rThemeColor.mnLumMod &&
- mnLumOff == rThemeColor.mnLumOff &&
- mnTintOrShade == rThemeColor.mnTintOrShade;
-}
-
-void SvxThemeColor::dumpAsXml(xmlTextWriterPtr pWriter) const
-{
- (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SvxThemeColor"));
-
- (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("theme-index"),
- BAD_CAST(OString::number(maThemeIndex).getStr()));
- (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("lum-mod"),
- BAD_CAST(OString::number(mnLumMod).getStr()));
- (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("lum-off"),
- BAD_CAST(OString::number(mnLumOff).getStr()));
- (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("tint-or-shade"),
- BAD_CAST(OString::number(mnTintOrShade).getStr()));
-
- (void)xmlTextWriterEndElement(pWriter);
-}
-
// class SvxColorItem ----------------------------------------------------
SvxColorItem::SvxColorItem( const sal_uInt16 nId ) :
SfxPoolItem(nId),
@@ -1429,22 +1397,42 @@ bool SvxColorItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
}
case MID_COLOR_THEME_INDEX:
{
- rVal <<= maThemeColor.GetThemeIndex();
+ rVal <<= sal_Int16(maThemeColor.getType());
break;
}
case MID_COLOR_TINT_OR_SHADE:
{
- rVal <<= maThemeColor.GetTintOrShade();
+ sal_Int16 nValue = 0;
+ for (auto const& rTransform : maThemeColor.getTransformations())
+ {
+ if (rTransform.meType == model::TransformationType::Tint)
+ nValue = rTransform.mnValue;
+ else if (rTransform.meType == model::TransformationType::Shade)
+ nValue = -rTransform.mnValue;
+ }
+ rVal <<= nValue;
break;
}
case MID_COLOR_LUM_MOD:
{
- rVal <<= maThemeColor.GetLumMod();
+ sal_Int16 nValue = 10000;
+ for (auto const& rTransform : maThemeColor.getTransformations())
+ {
+ if (rTransform.meType == model::TransformationType::LumMod)
+ nValue = rTransform.mnValue;
+ }
+ rVal <<= nValue;
break;
}
case MID_COLOR_LUM_OFF:
{
- rVal <<= maThemeColor.GetLumOff();
+ sal_Int16 nValue = 0;
+ for (auto const& rTransform : maThemeColor.getTransformations())
+ {
+ if (rTransform.meType == model::TransformationType::LumOff)
+ nValue = rTransform.mnValue;
+ }
+ rVal <<= nValue;
break;
}
default:
@@ -1482,31 +1470,43 @@ bool SvxColorItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
sal_Int16 nIndex = -1;
if (!(rVal >>= nIndex))
return false;
- maThemeColor.SetThemeIndex(nIndex);
+ maThemeColor.setType(model::convertToThemeColorType(nIndex));
}
break;
case MID_COLOR_TINT_OR_SHADE:
{
- sal_Int16 nTintShade = -1;
+ sal_Int16 nTintShade = 0;
if (!(rVal >>= nTintShade))
return false;
- maThemeColor.SetTintOrShade(nTintShade);
+
+ maThemeColor.removeTransformations(model::TransformationType::Tint);
+ maThemeColor.removeTransformations(model::TransformationType::Shade);
+
+ if (nTintShade > 0)
+ maThemeColor.addTransformation({model::TransformationType::Tint, nTintShade});
+ else if (nTintShade < 0)
+ {
+ sal_Int16 nShade = o3tl::narrowing<sal_Int16>(-nTintShade);
+ maThemeColor.addTransformation({model::TransformationType::Shade, nShade});
+ }
}
break;
case MID_COLOR_LUM_MOD:
{
- sal_Int16 nLumMod = -1;
+ sal_Int16 nLumMod = 10000;
if (!(rVal >>= nLumMod))
return false;
- maThemeColor.SetLumMod(nLumMod);
+ maThemeColor.removeTransformations(model::TransformationType::LumMod);
+ maThemeColor.addTransformation({model::TransformationType::LumMod, nLumMod});
}
break;
case MID_COLOR_LUM_OFF:
{
- sal_Int16 nLumOff = -1;
+ sal_Int16 nLumOff = 0;
if (!(rVal >>= nLumOff))
return false;
- maThemeColor.SetLumOff(nLumOff);
+ maThemeColor.removeTransformations(model::TransformationType::LumOff);
+ maThemeColor.addTransformation({model::TransformationType::LumOff, nLumOff});
}
break;
default:
@@ -1549,12 +1549,25 @@ void SvxColorItem::dumpAsXml(xmlTextWriterPtr pWriter) const
GetPresentation( SfxItemPresentation::Complete, MapUnit::Map100thMM, MapUnit::Map100thMM, aStr, aIntlWrapper);
(void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("presentation"), BAD_CAST(OUStringToOString(aStr, RTL_TEXTENCODING_UTF8).getStr()));
- maThemeColor.dumpAsXml(pWriter);
+ (void)xmlTextWriterStartElement(pWriter, BAD_CAST("theme-color"));
- (void)xmlTextWriterEndElement(pWriter);
-}
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("theme-index"),
+ BAD_CAST(OString::number(sal_Int16(maThemeColor.getType())).getStr()));
+
+ for (auto const& rTransform : maThemeColor.getTransformations())
+ {
+ (void)xmlTextWriterStartElement(pWriter, BAD_CAST("transformation"));
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("type"),
+ BAD_CAST(OString::number(sal_Int16(rTransform.meType)).getStr()));
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"),
+ BAD_CAST(OString::number(rTransform.mnValue).getStr()));
+ (void)xmlTextWriterEndElement(pWriter);
+ }
+ (void)xmlTextWriterEndElement(pWriter);
+ (void)xmlTextWriterEndElement(pWriter);
+}
void SvxColorItem::SetValue( const Color& rNewCol )
{
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index 8d6b2aa9ec53..e5877a7d2e5a 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -1142,23 +1142,39 @@ bool SvxUnoTextRangeBase::_getOnePropertyStates(const SfxItemSet* pSet, const Sf
switch (pMap->nMemberId)
{
case MID_COLOR_THEME_INDEX:
- if (pColor->GetThemeColor().GetThemeIndex() == -1)
+ if (pColor->GetThemeColor().getType() == model::ThemeColorType::Unknown)
{
eItemState = SfxItemState::DEFAULT;
}
break;
case MID_COLOR_LUM_MOD:
- if (pColor->GetThemeColor().GetLumMod() == 10000)
+ {
+ sal_Int16 nLumMod = 10000;
+ for (auto const& rTransform : pColor->GetThemeColor().getTransformations())
+ {
+ if (rTransform.meType == model::TransformationType::LumMod)
+ nLumMod = rTransform.mnValue;
+ }
+ if (nLumMod == 10000)
{
eItemState = SfxItemState::DEFAULT;
}
break;
+ }
case MID_COLOR_LUM_OFF:
- if (pColor->GetThemeColor().GetLumOff() == 0)
+ {
+ sal_Int16 nLumOff = 0;
+ for (auto const& rTransform : pColor->GetThemeColor().getTransformations())
+ {
+ if (rTransform.meType == model::TransformationType::LumOff)
+ nLumOff = rTransform.mnValue;
+ }
+ if (nLumOff == 0)
{
eItemState = SfxItemState::DEFAULT;
}
break;
+ }
}
}
diff --git a/include/docmodel/dllapi.h b/include/docmodel/dllapi.h
new file mode 100644
index 000000000000..f90b7cc4c08e
--- /dev/null
+++ b/include/docmodel/dllapi.h
@@ -0,0 +1,21 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include <sal/types.h>
+
+#if defined(DOCMODEL_DLLIMPLEMENTATION)
+#define DOCMODEL_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#else
+#define DOCMODEL_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#endif
+#define DOCMODEL_DLLPRIVATE SAL_DLLPRIVATE
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/docmodel/theme/ThemeColor.hxx b/include/docmodel/theme/ThemeColor.hxx
new file mode 100644
index 000000000000..2069594713d8
--- /dev/null
+++ b/include/docmodel/theme/ThemeColor.hxx
@@ -0,0 +1,146 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#pragma once
+
+#include <docmodel/dllapi.h>
+#include <vector>
+#include <docmodel/theme/ThemeColorType.hxx>
+#include <tools/color.hxx>
+
+namespace model
+{
+/** Color transfomation type */
+enum class TransformationType
+{
+ Undefined,
+ Red,
+ RedMod,
+ RedOff,
+ Green,
+ GreenMod,
+ GreenOff,
+ Blue,
+ BlueMod,
+ BlueOff,
+ Alpha,
+ AlphaMod,
+ AlphaOff,
+ Hue,
+ HueMod,
+ HueOff,
+ Sat,
+ SatMod,
+ SatOff,
+ Lum,
+ LumMod,
+ LumOff,
+ Shade,
+ Tint,
+ Gray,
+ Comp,
+ Inv,
+ Gamma,
+ InvGamma
+};
+
+/** Definition of a color transformation.
+ *
+ * This just defines how a color should be transformed (changed). The
+ * type defines what kind of transformation should occur and the value
+ * defines by how much.
+ */
+struct DOCMODEL_DLLPUBLIC Transformation
+{
+ TransformationType meType = TransformationType::Undefined;
+ sal_Int16 mnValue = 0; /// percentage value -10000 to +10000
+
+ bool operator==(const Transformation& rTransformation) const
+ {
+ return meType == rTransformation.meType && mnValue == rTransformation.mnValue;
+ }
+};
+
+/** Definition of a theme color
+ *
+ * A theme color is defined by the type of theme color and a set of
+ * transformations that in addition manipulate the resulting color
+ * (i.e. tints, shades).
+ */
+class DOCMODEL_DLLPUBLIC ThemeColor
+{
+ ThemeColorType meType = ThemeColorType::Unknown;
+ std::vector<Transformation> maTransformations;
+
+public:
+ ThemeColor() = default;
+
+ ThemeColorType getType() const { return meType; }
+
+ void setType(ThemeColorType eType) { meType = eType; }
+
+ void clearTransformations() { maTransformations.clear(); }
+
+ void addTransformation(Transformation const& rTransform)
+ {
+ maTransformations.push_back(rTransform);
+ }
+
+ void removeTransformations(TransformationType eType)
+ {
+ maTransformations.erase(std::remove_if(maTransformations.begin(), maTransformations.end(),
+ [eType](Transformation const& rTransform) {
+ return rTransform.meType == eType;
+ }),
+ maTransformations.end());
+ }
+
+ std::vector<Transformation> const& getTransformations() const { return maTransformations; }
+
+ /** Applies the defined trasformations to the input color */
+ Color applyTransformations(Color const& rColor) const
+ {
+ Color aColor(rColor);
+
+ for (auto const& rTransform : maTransformations)
+ {
+ switch (rTransform.meType)
+ {
+ case TransformationType::Tint:
+ aColor.ApplyTintOrShade(rTransform.mnValue);
+ break;
+ case TransformationType::Shade:
+ aColor.ApplyTintOrShade(-rTransform.mnValue);
+ break;
+ case TransformationType::LumMod:
+ aColor.ApplyLumModOff(rTransform.mnValue, 0);
+ break;
+ case TransformationType::LumOff:
+ aColor.ApplyLumModOff(10000, rTransform.mnValue);
+ break;
+ default:
+ break;
+ }
+ }
+ return aColor;
+ }
+
+ bool operator==(const ThemeColor& rThemeColor) const
+ {
+ return meType == rThemeColor.meType
+ && maTransformations.size() == rThemeColor.maTransformations.size()
+ && std::equal(maTransformations.begin(), maTransformations.end(),
+ rThemeColor.maTransformations.begin());
+ }
+};
+
+} // end of namespace model
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/docmodel/theme/ThemeColorType.hxx b/include/docmodel/theme/ThemeColorType.hxx
new file mode 100644
index 000000000000..a8ed9a56a6dc
--- /dev/null
+++ b/include/docmodel/theme/ThemeColorType.hxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#pragma once
+
+namespace model
+{
+/// Offsets into the color list of a theme.
+enum class ThemeColorType : sal_Int32
+{
+ Unknown = -1,
+ Dark1 = 0,
+ Light1 = 1,
+ Dark2 = 2,
+ Light2 = 3,
+ Accent1 = 4,
+ Accent2 = 5,
+ Accent3 = 6,
+ Accent4 = 7,
+ Accent5 = 8,
+ Accent6 = 9,
+ Hyperlink = 10,
+ FollowedHyperlink = 11,
+ LAST = FollowedHyperlink
+};
+
+constexpr ThemeColorType convertToThemeColorType(sal_Int32 nIndex)
+{
+ if (nIndex < 0 || nIndex > 11)
+ return ThemeColorType::Unknown;
+ return static_cast<ThemeColorType>(nIndex);
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/docmodel/uno/UnoThemeColor.hxx b/include/docmodel/uno/UnoThemeColor.hxx
new file mode 100644
index 000000000000..50063ab981dd
--- /dev/null
+++ b/include/docmodel/uno/UnoThemeColor.hxx
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include <cppuhelper/implbase.hxx>
+#include <cppuhelper/supportsservice.hxx>
+#include <comphelper/servicehelper.hxx>
+
+#include <com/sun/star/util/Color.hpp>
+#include <com/sun/star/util/XThemeColor.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+
+#include <utility>
+#include <docmodel/dllapi.h>
+#include <docmodel/theme/ThemeColor.hxx>
+
+class DOCMODEL_DLLPUBLIC UnoThemeColor final
+ : public cppu::WeakImplHelper<css::util::XThemeColor, css::lang::XUnoTunnel>
+{
+private:
+ model::ThemeColor maThemeColor;
+
+public:
+ UnoThemeColor(model::ThemeColor const& rThemeColor)
+ : maThemeColor(rThemeColor)
+ {
+ }
+
+ model::ThemeColor const& getThemeColor() const { return maThemeColor; }
+
+ // XThemeColor
+ sal_Int16 SAL_CALL getType() override;
+
+ UNO3_GETIMPLEMENTATION_DECL(UnoThemeColor)
+};
+
+namespace model::theme
+{
+DOCMODEL_DLLPUBLIC css::uno::Reference<css::util::XThemeColor>
+createXThemeColor(model::ThemeColor const& rThemeColor);
+
+DOCMODEL_DLLPUBLIC void
+setFromXThemeColor(model::ThemeColor& rThemeColor,
+ css::uno::Reference<css::util::XThemeColor> const& rxThemeColor);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/editeng/colritem.hxx b/include/editeng/colritem.hxx
index 05a7183c8582..d4090eb9e7eb 100644
--- a/include/editeng/colritem.hxx
+++ b/include/editeng/colritem.hxx
@@ -22,63 +22,17 @@
#include <svl/poolitem.hxx>
#include <tools/color.hxx>
#include <editeng/editengdllapi.h>
+#include <docmodel/theme/ThemeColor.hxx>
#define VERSION_USEAUTOCOLOR 1
-/// Represents theme metadata for a (tools) Color.
-class EDITENG_DLLPUBLIC SvxThemeColor
-{
- sal_Int16 maThemeIndex;
- /// Luminance Modulation: 100th percentage, defaults to 100%.
- sal_Int16 mnLumMod;
- /// Luminance Offset: 100th percentage, defaults to 0%.
- sal_Int16 mnLumOff;
-
- sal_Int16 mnTintOrShade;
-
-public:
- explicit SvxThemeColor();
- bool operator==(const SvxThemeColor& rThemeColor) const;
-
- sal_Int16 GetThemeIndex() const
- {
- return maThemeIndex;
- }
-
- void SetThemeIndex(sal_Int16 nIndex)
- {
- maThemeIndex = nIndex;
-
- }
- void SetLumMod(sal_Int16 nLumMod) { mnLumMod = nLumMod; }
-
- sal_Int16 GetLumMod() const { return mnLumMod; }
-
- void SetLumOff(sal_Int16 nLumOff) { mnLumOff = nLumOff; }
-
- sal_Int16 GetLumOff() const { return mnLumOff; }
-
- sal_Int16 GetTintOrShade() const
- {
- return mnTintOrShade;
- }
-
- void SetTintOrShade(sal_Int16 nTintOrShade)
- {
- mnTintOrShade = nTintOrShade;
- }
-
- void dumpAsXml(xmlTextWriterPtr pWriter) const;
-};
-
/** SvxColorItem item describes a color.
*/
class EDITENG_DLLPUBLIC SvxColorItem final : public SfxPoolItem
{
private:
Color mColor;
- SvxThemeColor maThemeColor;
-
+ model::ThemeColor maThemeColor;
public:
static SfxPoolItem* CreateDefault();
@@ -105,9 +59,9 @@ public:
}
void SetValue(const Color& rNewColor);
- SvxThemeColor& GetThemeColor() { return maThemeColor; }
+ model::ThemeColor& GetThemeColor() { return maThemeColor; }
- const SvxThemeColor& GetThemeColor() const { return maThemeColor; }
+ const model::ThemeColor& GetThemeColor() const { return maThemeColor; }
void dumpAsXml(xmlTextWriterPtr pWriter) const override;
};
diff --git a/include/svx/ColorSets.hxx b/include/svx/ColorSets.hxx
index 115b7448a8a0..a5d41cc05a57 100644
--- a/include/svx/ColorSets.hxx
+++ b/include/svx/ColorSets.hxx
@@ -18,6 +18,7 @@
#include <sal/log.hxx>
#include <sal/types.h>
#include <svx/svxdllapi.h>
+#include <docmodel/theme/ThemeColorType.hxx>
#include <tools/color.hxx>
typedef struct _xmlTextWriter* xmlTextWriterPtr;
@@ -26,31 +27,6 @@ class SdrPage;
namespace svx
{
-/// Offsets into the color list of a theme.
-enum class ThemeColorType : sal_Int32
-{
- Unknown = -1,
- Dark1 = 0,
- Light1 = 1,
- Dark2 = 2,
- Light2 = 3,
- Accent1 = 4,
- Accent2 = 5,
- Accent3 = 6,
- Accent4 = 7,
- Accent5 = 8,
- Accent6 = 9,
- Hyperlink = 10,
- FollowedHyperlink = 11,
- LAST = FollowedHyperlink
-};
-
-constexpr ThemeColorType convertToThemeColorType(sal_Int32 nIndex)
-{
- if (nIndex < 0 || nIndex > 11)
- return ThemeColorType::Unknown;
- return static_cast<ThemeColorType>(nIndex);
-}
class SVXCORE_DLLPUBLIC ColorSet
{
@@ -67,9 +43,9 @@ public:
return maName;
}
- Color getColor(ThemeColorType nType) const
+ Color getColor(model::ThemeColorType nType) const
{
- if (nType == ThemeColorType::Unknown)
+ if (nType == model::ThemeColorType::Unknown)
{
SAL_WARN("svx", "ColorSet::getColor with ThemeColorType::Unknown");
return COL_AUTO;
@@ -279,7 +255,7 @@ public:
std::vector<Color> GetColors() const;
- Color GetColor(ThemeColorType eType) const;
+ Color GetColor(model::ThemeColorType eType) const;
};
} // end of namespace svx
diff --git a/include/svx/xcolit.hxx b/include/svx/xcolit.hxx
index 5b882f9a97a9..3ece0ef3b52b 100644
--- a/include/svx/xcolit.hxx
+++ b/include/svx/xcolit.hxx
@@ -22,18 +22,17 @@
#include <tools/color.hxx>
#include <editeng/colritem.hxx>
+#include <docmodel/theme/ThemeColor.hxx>
#include <svx/svxdllapi.h>
#include <svx/xit.hxx>
class XColorList;
-
-
class SVXCORE_DLLPUBLIC XColorItem : public NameOrIndex
{
Color aColor;
- SvxThemeColor maThemeColor;
+ model::ThemeColor maThemeColor;
public:
static SfxPoolItem* CreateDefault();
@@ -51,8 +50,8 @@ public:
const Color& GetColorValue() const;
void SetColorValue(const Color& rNew) { aColor = rNew; Detach(); }
- SvxThemeColor& GetThemeColor() { return maThemeColor; }
- const SvxThemeColor& GetThemeColor() const { return maThemeColor; }
+ model::ThemeColor& GetThemeColor() { return maThemeColor; }
+ const model::ThemeColor& GetThemeColor() const { return maThemeColor; }
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
};
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 6d0b4c1b5954..4913d17747c6 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -4173,6 +4173,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/util,\
XCloseBroadcaster \
XCloseListener \
XCloseable \
+ XThemeColor \
XDataEditor \
XDataEditorListener \
XFlushListener \
diff --git a/offapi/com/sun/star/util/XThemeColor.idl b/offapi/com/sun/star/util/XThemeColor.idl
new file mode 100644
index 000000000000..7da38c4850a2
--- /dev/null
+++ b/offapi/com/sun/star/util/XThemeColor.idl
@@ -0,0 +1,26 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+
+module com { module sun { module star { module util {
+
+
+/** Theme Color interface
+
+ @since LibreOffice 7.6
+*/
+interface XThemeColor
+{
+ /** Type of the theme color */
+ short getType();
+};
+
+}; }; }; };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/CppunitTest_oox_drawingml.mk b/oox/CppunitTest_oox_drawingml.mk
index 0ad75df13870..3a9e0d0a28f7 100644
--- a/oox/CppunitTest_oox_drawingml.mk
+++ b/oox/CppunitTest_oox_drawingml.mk
@@ -23,6 +23,7 @@ $(eval $(call gb_CppunitTest_use_libraries,oox_drawingml, \
comphelper \
cppu \
cppuhelper \
+ docmodel \
oox \
sal \
subsequenttest \
diff --git a/oox/CppunitTest_oox_shape.mk b/oox/CppunitTest_oox_shape.mk
index 2d3638763490..073a21133708 100644
--- a/oox/CppunitTest_oox_shape.mk
+++ b/oox/CppunitTest_oox_shape.mk
@@ -23,6 +23,7 @@ $(eval $(call gb_CppunitTest_use_libraries,oox_shape, \
comphelper \
cppu \
cppuhelper \
+ docmodel \
oox \
sal \
subsequenttest \
diff --git a/oox/CppunitTest_oox_tokenmap.mk b/oox/CppunitTest_oox_tokenmap.mk
index 46294ecab965..60557288646e 100644
--- a/oox/CppunitTest_oox_tokenmap.mk
+++ b/oox/CppunitTest_oox_tokenmap.mk
@@ -40,6 +40,7 @@ $(eval $(call gb_CppunitTest_use_libraries,oox_tokenmap,\
comphelper \
cppu \
cppuhelper \
+ docmodel \
editeng \
expwrap \
drawinglayer \
diff --git a/oox/Library_oox.mk b/oox/Library_oox.mk
index 67f4f6e1ec0f..9943c2e7eb38 100644
--- a/oox/Library_oox.mk
+++ b/oox/Library_oox.mk
@@ -46,6 +46,7 @@ $(eval $(call gb_Library_use_libraries,oox,\
editeng \
expwrap \
drawinglayer \
+ docmodel \
msfilter \
sal \
i18nlangtag \
diff --git a/oox/inc/pch/precompiled_oox.hxx b/oox/inc/pch/precompiled_oox.hxx
index 4281760d10cc..cba76097feed 100644
--- a/oox/inc/pch/precompiled_oox.hxx
+++ b/oox/inc/pch/precompiled_oox.hxx
@@ -13,7 +13,7 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
- Generated on 2021-09-28 05:37:38 using:
+ Generated on 2023-01-10 23:28:48 using:
./bin/update_pch oox oox --cutoff=6 --exclude:system --exclude:module --include:local
If after updating build fails, use the following command to locate conflicting headers:
@@ -28,6 +28,7 @@
#include <cmath>
#include <cstddef>
#include <cstdlib>
+#include <cstring>
#include <functional>
#include <iomanip>
#include <limits.h>
@@ -36,9 +37,11 @@
#include <math.h>
#include <memory>
#include <new>
+#include <numeric>
#include <optional>
#include <ostream>
#include <set>
+#include <stack>
#include <string.h>
#include <string_view>
#include <type_traits>
@@ -47,13 +50,12 @@
#include <utility>
#include <vector>
#include <boost/algorithm/string.hpp>
+#include <boost/property_tree/ptree_fwd.hpp>
#endif // PCH_LEVEL >= 1
#if PCH_LEVEL >= 2
#include <osl/diagnose.h>
-#include <osl/doublecheckedlocking.h>
#include <osl/endian.h>
#include <osl/file.hxx>
-#include <osl/getglobalmutex.hxx>
#include <osl/interlck.h>
#include <osl/mutex.hxx>
#include <osl/thread.h>
@@ -67,6 +69,7 @@
#include <rtl/math.hxx>
#include <rtl/random.h>
#include <rtl/ref.hxx>
+#include <rtl/strbuf.h>
#include <rtl/strbuf.hxx>
#include <rtl/string.h>
#include <rtl/string.hxx>
@@ -79,14 +82,21 @@
#include <rtl/ustring.h>
#include <rtl/ustring.hxx>
#include <sal/log.hxx>
+#include <sal/macros.h>
#include <sal/saldllapi.h>
#include <sal/types.h>
+#include <vcl/GraphicExternalLink.hxx>
+#include <vcl/animate/Animation.hxx>
#include <vcl/bitmap.hxx>
+#include <vcl/bitmapex.hxx>
#include <vcl/cairo.hxx>
#include <vcl/devicecoordinate.hxx>
#include <vcl/dllapi.h>
#include <vcl/fntstyle.hxx>
#include <vcl/font.hxx>
+#include <vcl/gfxlink.hxx>
+#include <vcl/graph.hxx>
+#include <vcl/kernarray.hxx>
#include <vcl/mapmod.hxx>
#include <vcl/metaactiontypes.hxx>
#include <vcl/outdev.hxx>
@@ -105,7 +115,9 @@
#include <vcl/rendercontext/State.hxx>
#include <vcl/rendercontext/SystemTextColorFlags.hxx>
#include <vcl/salnativewidgets.hxx>
+#include <vcl/settings.hxx>
#include <vcl/vclreferencebase.hxx>
+#include <vcl/vectorgraphicdata.hxx>
#include <vcl/wall.hxx>
#endif // PCH_LEVEL >= 2
#if PCH_LEVEL >= 3
@@ -113,8 +125,13 @@
#include <basegfx/color/bcolor.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/numeric/ftools.hxx>
+#include <basegfx/point/b2dpoint.hxx>
+#include <basegfx/point/b2ipoint.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
+#include <basegfx/tuple/Tuple2D.hxx>
+#include <basegfx/tuple/b2dtuple.hxx>
#include <basegfx/tuple/b3dtuple.hxx>
+#include <basegfx/vector/b2dsize.hxx>
#include <basegfx/vector/b2enums.hxx>
#include <com/sun/star/awt/DeviceInfo.hpp>
#include <com/sun/star/awt/FontWeight.hpp>
@@ -122,15 +139,20 @@
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/beans/PropertyState.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/beans/PropertyValues.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeSegment.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeTextFrame.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
#include <com/sun/star/drawing/Hatch.hpp>
#include <com/sun/star/drawing/LineCap.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
+#include <com/sun/star/drawing/TextFitToSizeType.hpp>
+#include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
#include <com/sun/star/drawing/XDrawPage.hpp>
#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/drawing/XShapes.hpp>
@@ -147,6 +169,7 @@
#include <com/sun/star/style/LineSpacingMode.hpp>
#include <com/sun/star/style/ParagraphAdjust.hpp>
#include <com/sun/star/text/WritingMode.hpp>
+#include <com/sun/star/text/WritingMode2.hpp>
#include <com/sun/star/text/XText.hpp>
#include <com/sun/star/uno/Any.h>
#include <com/sun/star/uno/Any.hxx>
@@ -167,7 +190,9 @@
#include <com/sun/star/xml/sax/XFastDocumentHandler.hpp>
#include <com/sun/star/xml/sax/XFastSAXSerializable.hpp>
#include <comphelper/comphelperdllapi.h>
+#include <comphelper/diagnose_ex.hxx>
#include <comphelper/processfactory.hxx>
+#include <comphelper/propertyvalue.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/sequenceashashmap.hxx>
#include <comphelper/storagehelper.hxx>
@@ -175,18 +200,15 @@
#include <cppu/unotype.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/implbase_ex.hxx>
-#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/weakref.hxx>
-#include <drawingml/chart/chartcontextbase.hxx>
-#include <drawingml/chart/chartspacemodel.hxx>
-#include <drawingml/chart/converterbase.hxx>
-#include <drawingml/chart/objectformatter.hxx>
-#include <drawingml/chart/titlemodel.hxx>
+#include <docmodel/theme/ThemeColorType.hxx>
+#include <drawinglayer/primitive2d/Primitive2DContainer.hxx>
#include <drawingml/colorchoicecontext.hxx>
#include <drawingml/customshapeproperties.hxx>
#include <drawingml/fillproperties.hxx>
#include <drawingml/lineproperties.hxx>
+#include <drawingml/linepropertiescontext.hxx>
#include <drawingml/misccontexts.hxx>
#include <drawingml/shapepropertiescontext.hxx>
#include <drawingml/table/tablestylepart.hxx>
@@ -200,25 +222,42 @@
#include <i18nlangtag/lang.h>
#include <o3tl/cow_wrapper.hxx>
#include <o3tl/safeint.hxx>
+#include <o3tl/span.hxx>
+#include <o3tl/string_view.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <o3tl/unit_conversion.hxx>
#include <sax/fastattribs.hxx>
#include <sax/fshelper.hxx>
#include <sax/saxdllapi.h>
+#include <svl/eitem.hxx>
+#include <svl/itemset.hxx>
#include <svl/poolitem.hxx>
+#include <svl/style.hxx>
#include <svl/svldllapi.h>
#include <svl/typedwhich.hxx>
+#include <svl/whichranges.hxx>
+#include <svx/ColorSets.hxx>
+#include <svx/itextprovider.hxx>
#include <svx/msdffdef.hxx>
+#include <svx/sdtaditm.hxx>
+#include <svx/sdtaitm.hxx>
+#include <svx/sdtakitm.hxx>
+#include <svx/svddef.hxx>
+#include <svx/svdoattr.hxx>
#include <svx/svdobjkind.hxx>
+#include <svx/svdotext.hxx>
+#include <svx/svdtext.hxx>
+#include <svx/svdtrans.hxx>
#include <svx/svdtypes.hxx>
#include <svx/svxdllapi.h>
#include <tools/color.hxx>
+#include <tools/datetime.hxx>
#include <tools/degree.hxx>
-#include <comphelper/diagnose_ex.hxx>
#include <tools/fldunit.hxx>
#include <tools/fontenum.hxx>
#include <tools/fract.hxx>
#include <tools/gen.hxx>
+#include <tools/helpers.hxx>
#include <tools/link.hxx>
#include <tools/long.hxx>
#include <tools/mapunit.hxx>
@@ -243,14 +282,11 @@
#include <oox/core/relations.hxx>
#include <oox/core/xmlfilterbase.hxx>
#include <oox/dllapi.h>
-#include <oox/drawingml/chart/chartconverter.hxx>
-#include <oox/drawingml/chart/datasourcemodel.hxx>
-#include <oox/drawingml/chart/modelbase.hxx>
#include <oox/drawingml/clrscheme.hxx>
#include <oox/drawingml/color.hxx>
#include <oox/drawingml/drawingmltypes.hxx>
-#include <oox/drawingml/graphicshapecontext.hxx>
#include <oox/drawingml/shape.hxx>
+#include <oox/drawingml/shapecontext.hxx>
#include <oox/drawingml/shapepropertymap.hxx>
#include <oox/drawingml/theme.hxx>
#include <oox/export/utils.hxx>
@@ -261,16 +297,15 @@
#include <oox/helper/containerhelper.hxx>
#include <oox/helper/graphichelper.hxx>
#include <oox/helper/helper.hxx>
-#include <oox/helper/modelobjecthelper.hxx>
#include <oox/helper/propertymap.hxx>
#include <oox/helper/propertyset.hxx>
#include <oox/helper/refmap.hxx>
-#include <oox/helper/refvector.hxx>
#include <oox/helper/storagebase.hxx>
#include <oox/helper/textinputstream.hxx>
#include <oox/ole/olestorage.hxx>
#include <oox/ppt/comments.hxx>
#include <oox/ppt/headerfooter.hxx>
+#include <oox/ppt/pptimport.hxx>
#include <oox/ppt/pptshape.hxx>
#include <oox/ppt/slidepersist.hxx>
#include <oox/token/namespaces.hxx>
diff --git a/oox/source/export/ThemeExport.cxx b/oox/source/export/ThemeExport.cxx
index f11b894f924a..b1684986f028 100644
--- a/oox/source/export/ThemeExport.cxx
+++ b/oox/source/export/ThemeExport.cxx
@@ -224,19 +224,19 @@ bool ThemeExport::writeFormatScheme(sax_fastparser::FSHelperPtr pFS)
bool ThemeExport::writeColorSet(sax_fastparser::FSHelperPtr pFS, svx::Theme const& rTheme)
{
- static std::unordered_map<sal_Int32, svx::ThemeColorType> constTokenMap
- = { { XML_dk1, svx::ThemeColorType::Dark1 },
- { XML_lt1, svx::ThemeColorType::Light1 },
- { XML_dk2, svx::ThemeColorType::Dark2 },
- { XML_lt2, svx::ThemeColorType::Light2 },
- { XML_accent1, svx::ThemeColorType::Accent1 },
- { XML_accent2, svx::ThemeColorType::Accent2 },
- { XML_accent3, svx::ThemeColorType::Accent3 },
- { XML_accent4, svx::ThemeColorType::Accent4 },
- { XML_accent5, svx::ThemeColorType::Accent5 },
- { XML_accent6, svx::ThemeColorType::Accent6 },
- { XML_hlink, svx::ThemeColorType::Hyperlink },
- { XML_folHlink, svx::ThemeColorType::FollowedHyperlink } };
+ static std::unordered_map<sal_Int32, model::ThemeColorType> constTokenMap
+ = { { XML_dk1, model::ThemeColorType::Dark1 },
+ { XML_lt1, model::ThemeColorType::Light1 },
+ { XML_dk2, model::ThemeColorType::Dark2 },
+ { XML_lt2, model::ThemeColorType::Light2 },
+ { XML_accent1, model::ThemeColorType::Accent1 },
+ { XML_accent2, model::ThemeColorType::Accent2 },
+ { XML_accent3, model::ThemeColorType::Accent3 },
+ { XML_accent4, model::ThemeColorType::Accent4 },
+ { XML_accent5, model::ThemeColorType::Accent5 },
+ { XML_accent6, model::ThemeColorType::Accent6 },
+ { XML_hlink, model::ThemeColorType::Hyperlink },
+ { XML_folHlink, model::ThemeColorType::FollowedHyperlink } };
static std::array<sal_Int32, 12> constTokenArray
= { XML_dk1, XML_lt1, XML_dk2, XML_lt2, XML_accent1, XML_accent2,
@@ -248,7 +248,7 @@ bool ThemeExport::writeColorSet(sax_fastparser::FSHelperPtr pFS, svx::Theme cons
for (auto nToken : constTokenArray)
{
- svx::ThemeColorType eColorType = constTokenMap[nToken];
+ model::ThemeColorType eColorType = constTokenMap[nToken];
Color aColor = pColorSet->getColor(eColorType);
pFS->startElementNS(XML_a, nToken);
pFS->singleElementNS(XML_a, XML_srgbClr, XML_val, I32SHEX(sal_Int32(aColor)));
diff --git a/sd/CppunitTest_sd_uiimpress.mk b/sd/CppunitTest_sd_uiimpress.mk
index 2599d0a97982..c2ba59be987a 100644
--- a/sd/CppunitTest_sd_uiimpress.mk
+++ b/sd/CppunitTest_sd_uiimpress.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sd_uiimpress, \
cppcanvas \
cppu \
cppuhelper \
+ docmodel \
drawinglayer \
editeng \
for \
diff --git a/sd/CppunitTest_sd_uimpress.mk b/sd/CppunitTest_sd_uimpress.mk
index 4575a06107b5..bff68b0386d0 100644
--- a/sd/CppunitTest_sd_uimpress.mk
+++ b/sd/CppunitTest_sd_uimpress.mk
@@ -26,6 +26,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sd_uimpress,\
cppcanvas \
cppu \
cppuhelper \
+ docmodel \
drawinglayer \
drawinglayercore \
editeng \
diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk
index 1a3a87174098..3c60a60b3a3d 100644
--- a/sd/Library_sd.mk
+++ b/sd/Library_sd.mk
@@ -74,6 +74,7 @@ $(eval $(call gb_Library_use_libraries,sd,\
cppcanvas \
cppu \
cppuhelper \
+ docmodel \
drawinglayercore \
drawinglayer \
editeng \
diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx
index 8963b9432162..b4110da7f641 100644
--- a/sd/inc/pch/precompiled_sd.hxx
+++ b/sd/inc/pch/precompiled_sd.hxx
@@ -13,7 +13,7 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
- Generated on 2022-08-08 10:27:15 using:
+ Generated on 2023-01-10 23:30:40 using:
./bin/update_pch sd sd --cutoff=4 --exclude:system --exclude:module --include:local
If after updating build fails, use the following command to locate conflicting headers:
@@ -25,16 +25,21 @@
#include <algorithm>
#include <array>
#include <cassert>
+#include <cmath>
#include <cstddef>
+#include <cstring>
#include <functional>
#include <initializer_list>
#include <iomanip>
#include <iterator>
+#include <limits>
#include <locale>
#include <map>
+#include <math.h>
#include <memory>
#include <mutex>
#include <new>
+#include <numeric>
#include <optional>
#include <ostream>
#include <set>
@@ -61,12 +66,16 @@
#include <osl/socket_decl.hxx>
#include <osl/time.h>
#include <rtl/alloc.h>
+#include <rtl/bootstrap.hxx>
#include <rtl/character.hxx>
-#include <rtl/locale.h>
+#include <rtl/math.h>
#include <rtl/math.hxx>
#include <rtl/ref.hxx>
+#include <rtl/strbuf.h>
#include <rtl/strbuf.hxx>
#include <rtl/string.hxx>
+#include <rtl/stringconcat.hxx>
+#include <rtl/stringutils.hxx>
#include <rtl/tencinfo.h>
#include <rtl/textenc.h>
#include <rtl/ustrbuf.hxx>
@@ -77,13 +86,13 @@
#include <sal/types.h>
#include <sal/typesizes.h>
#include <vcl/EnumContext.hxx>
+#include <vcl/GraphicObject.hxx>
#include <vcl/InterimItemWindow.hxx>
#include <vcl/bitmapex.hxx>
#include <vcl/commandevent.hxx>
#include <vcl/commandinfoprovider.hxx>
#include <vcl/customweld.hxx>
#include <vcl/dllapi.h>
-#include <comphelper/errcode.hxx>
#include <vcl/errinf.hxx>
#include <vcl/event.hxx>
#include <vcl/fntstyle.hxx>
@@ -96,6 +105,7 @@
#include <vcl/image.hxx>
#include <vcl/imapobj.hxx>
#include <vcl/keycod.hxx>
+#include <vcl/mapmod.hxx>
#include <vcl/outdev.hxx>
#include <vcl/ptrstyle.hxx>
#include <vcl/region.hxx>
@@ -121,6 +131,7 @@
#include <basegfx/color/bcolor.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <basegfx/numeric/ftools.hxx>
#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/point/b2ipoint.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
@@ -131,6 +142,7 @@
#include <basegfx/range/basicrange.hxx>
#include <basegfx/tuple/b2dtuple.hxx>
#include <basegfx/tuple/b3dtuple.hxx>
+#include <basegfx/vector/b2dsize.hxx>
#include <basegfx/vector/b2dvector.hxx>
#include <basic/sberrors.hxx>
#include <basic/sbstar.hxx>
@@ -138,10 +150,27 @@
#include <cache/SlsPageCacheManager.hxx>
#include <com/sun/star/animations/AnimationFill.hpp>
#include <com/sun/star/animations/AnimationNodeType.hpp>
+#include <com/sun/star/animations/AnimationRestart.hpp>
+#include <com/sun/star/animations/AnimationTransformType.hpp>
+#include <com/sun/star/animations/Event.hpp>
+#include <com/sun/star/animations/EventTrigger.hpp>
#include <com/sun/star/animations/ParallelTimeContainer.hpp>
+#include <com/sun/star/animations/Timing.hpp>
+#include <com/sun/star/animations/TransitionSubType.hpp>
+#include <com/sun/star/animations/TransitionType.hpp>
+#include <com/sun/star/animations/ValuePair.hpp>
#include <com/sun/star/animations/XAnimate.hpp>
+#include <com/sun/star/animations/XAnimateMotion.hpp>
+#include <com/sun/star/animations/XAnimateTransform.hpp>
+#include <com/sun/star/animations/XAnimationNode.hpp>
+#include <com/sun/star/animations/XAnimationNodeSupplier.hpp>
+#include <com/sun/star/animations/XAudio.hpp>
+#include <com/sun/star/animations/XCommand.hpp>
+#include <com/sun/star/animations/XIterateContainer.hpp>
+#include <com/sun/star/animations/XTransitionFilter.hpp>
#include <com/sun/star/awt/FontDescriptor.hpp>
#include <com/sun/star/awt/FontSlant.hpp>
+#include <com/sun/star/awt/XBitmap.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/beans/PropertyState.hpp>
@@ -164,9 +193,13 @@
#include <com/sun/star/datatransfer/dnd/XDragGestureListener.hpp>
#include <com/sun/star/datatransfer/dnd/XDragSourceListener.hpp>
#include <com/sun/star/datatransfer/dnd/XDropTargetListener.hpp>
+#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
+#include <com/sun/star/drawing/BitmapMode.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
#include <com/sun/star/drawing/LineCap.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/drawing/XDrawPage.hpp>
+#include <com/sun/star/drawing/XDrawPages.hpp>
#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
#include <com/sun/star/drawing/XDrawView.hpp>
#include <com/sun/star/drawing/XMasterPagesSupplier.hpp>
@@ -185,6 +218,7 @@
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/frame/XTerminateListener.hpp>
+#include <com/sun/star/geometry/RealPoint2D.hpp>
#include <com/sun/star/i18n/UnicodeScript.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
@@ -198,11 +232,20 @@
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/media/XPlayer.hpp>
#include <com/sun/star/office/XAnnotation.hpp>
+#include <com/sun/star/office/XAnnotationAccess.hpp>
+#include <com/sun/star/office/XAnnotationEnumeration.hpp>
+#include <com/sun/star/presentation/AnimationSpeed.hpp>
+#include <com/sun/star/presentation/EffectCommands.hpp>
#include <com/sun/star/presentation/EffectNodeType.hpp>
#include <com/sun/star/presentation/EffectPresetClass.hpp>
#include <com/sun/star/presentation/ParagraphTarget.hpp>
+#include <com/sun/star/presentation/ShapeAnimationSubType.hpp>
+#include <com/sun/star/presentation/TextAnimationType.hpp>
+#include <com/sun/star/style/LineSpacing.hpp>
+#include <com/sun/star/style/TabStop.hpp>
#include <com/sun/star/style/XStyle.hpp>
#include <com/sun/star/task/XStatusIndicator.hpp>
+#include <com/sun/star/text/XSimpleText.hpp>
#include <com/sun/star/text/XText.hpp>
#include <com/sun/star/text/XTextCopy.hpp>
#include <com/sun/star/text/XTextRange.hpp>
@@ -226,6 +269,8 @@
#include <comphelper/classids.hxx>
#include <comphelper/compbase.hxx>
#include <comphelper/comphelperdllapi.h>
+#include <comphelper/diagnose_ex.hxx>
+#include <comphelper/errcode.hxx>
#include <comphelper/extract.hxx>
#include <comphelper/lok.hxx>
#include <comphelper/processfactory.hxx>
@@ -233,6 +278,7 @@
#include <comphelper/propertyvalue.hxx>
#include <comphelper/scopeguard.hxx>
#include <comphelper/sequence.hxx>
+#include <comphelper/sequenceashashmap.hxx>
#include <comphelper/servicehelper.hxx>
#include <comphelper/storagehelper.hxx>
#include <controller/SlideSorterController.hxx>
@@ -293,16 +339,17 @@
#include <editeng/unoedsrc.hxx>
#include <editeng/unolingu.hxx>
#include <editeng/wghtitem.hxx>
+#include <filter/msfilter/msfilterdllapi.h>
#include <framework/ConfigurationController.hxx>
#include <framework/FrameworkHelper.hxx>
#include <framework/Pane.hxx>
#include <framework/ViewShellWrapper.hxx>
-#include <i18nlangtag/i18nlangtagdllapi.h>
#include <i18nlangtag/lang.h>
#include <i18nlangtag/languagetag.hxx>
#include <model/SlideSorterModel.hxx>
#include <model/SlsPageDescriptor.hxx>
#include <model/SlsPageEnumerationProvider.hxx>
+#include <o3tl/any.hxx>
#include <o3tl/cow_wrapper.hxx>
#include <o3tl/deleter.hxx>
#include <o3tl/safeint.hxx>
@@ -312,7 +359,10 @@
#include <o3tl/strong_int.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <o3tl/underlyingenumvalue.hxx>
+#include <o3tl/unit_conversion.hxx>
#include <officecfg/Office/Common.hxx>
+#include <oox/dllapi.h>
+#include <oox/drawingml/drawingmltypes.hxx>
#include <salhelper/simplereferenceobject.hxx>
#include <salhelper/thread.hxx>
#include <sfx2/app.hxx>
@@ -351,6 +401,7 @@
#include <sfx2/zoomitem.hxx>
#include <sot/exchange.hxx>
#include <sot/formats.hxx>
+#include <sot/storage.hxx>
#include <svl/SfxBroadcaster.hxx>
#include <svl/cjkoptions.hxx>
#include <svl/eitem.hxx>
@@ -368,6 +419,7 @@
#include <svl/style.hxx>
#include <svl/svldllapi.h>
#include <svl/typedwhich.hxx>
+#include <svl/urihelper.hxx>
#include <svl/urlbmk.hxx>
#include <svl/whiter.hxx>
#include <svtools/ehdl.hxx>
@@ -385,9 +437,11 @@
#include <svx/fmshell.hxx>
#include <svx/fontwork.hxx>
#include <svx/fontworkbar.hxx>
+#include <svx/gallery.hxx>
#include <svx/hlnkitem.hxx>
#include <svx/hyperdlg.hxx>
#include <svx/imapdlg.hxx>
+#include <svx/msdffdef.hxx>
#include <svx/obj3d.hxx>
#include <svx/pageitem.hxx>
#include <svx/ruler.hxx>
@@ -402,6 +456,7 @@
#include <svx/sdrpaintwindow.hxx>
#include <svx/sdtagitm.hxx>
#include <svx/sdtfsitm.hxx>
+#include <svx/sdtmfitm.hxx>
#include <svx/srchdlg.hxx>
#include <svx/svddef.hxx>
#include <svx/svdetc.hxx>
@@ -422,6 +477,7 @@
#include <svx/svdpage.hxx>
#include <svx/svdpagv.hxx>
#include <svx/svdpool.hxx>
+#include <svx/svdtypes.hxx>
#include <svx/svdundo.hxx>
#include <svx/svxdlg.hxx>
#include <svx/svxdllapi.h>
@@ -448,12 +504,11 @@
#include <tools/color.hxx>
#include <tools/debug.hxx>
#include <tools/degree.hxx>
-#include <comphelper/diagnose_ex.hxx>
#include <tools/fldunit.hxx>
#include <tools/fontenum.hxx>
+#include <tools/fract.hxx>
#include <tools/gen.hxx>
#include <tools/globname.hxx>
-#include <tools/lineend.hxx>
#include <tools/link.hxx>
#include <tools/long.hxx>
#include <tools/mapunit.hxx>
@@ -474,6 +529,7 @@
#include <unotools/localedatawrapper.hxx>
#include <unotools/moduleoptions.hxx>
#include <unotools/options.hxx>
+#include <unotools/pathoptions.hxx>
#include <unotools/resmgr.hxx>
#include <unotools/streamwrap.hxx>
#include <unotools/syslocale.hxx>
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 4d72cf0915c6..b12e280f231f 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -1358,7 +1358,7 @@ PropertyState SAL_CALL SdStyleSheet::getPropertyState( const OUString& PropertyN
if (pEntry->nMemberId == MID_COLOR_THEME_INDEX)
{
const XFillColorItem* pColor = rStyleSet.GetItem<XFillColorItem>(pEntry->nWID);
- if (pColor->GetThemeColor().GetThemeIndex() == -1)
+ if (pColor->GetThemeColor().getType() == model::ThemeColorType::Unknown)
{
eState = PropertyState_DEFAULT_VALUE;
}
@@ -1366,7 +1366,13 @@ PropertyState SAL_CALL SdStyleSheet::getPropertyState( const OUString& PropertyN
else if (pEntry->nMemberId == MID_COLOR_LUM_MOD)
{
const XFillColorItem* pColor = rStyleSet.GetItem<XFillColorItem>(pEntry->nWID);
- if (pColor->GetThemeColor().GetLumMod() == 10000)
+ sal_Int16 nLumMod = 10000;
+ for (auto const& rTransform : pColor->GetThemeColor().getTransformations())
+ {
+ if (rTransform.meType == model::TransformationType::LumMod)
+ nLumMod = rTransform.mnValue;
+ }
+ if (nLumMod == 10000)
{
eState = PropertyState_DEFAULT_VALUE;
}
@@ -1374,7 +1380,13 @@ PropertyState SAL_CALL SdStyleSheet::getPropertyState( const OUString& PropertyN
else if (pEntry->nMemberId == MID_COLOR_LUM_OFF)
{
const XFillColorItem* pColor = rStyleSet.GetItem<XFillColorItem>(pEntry->nWID);
- if (pColor->GetThemeColor().GetLumOff() == 0)
+ sal_Int16 nLumOff = 0;
+ for (auto const& rTransform : pColor->GetThemeColor().getTransformations())
+ {
+ if (rTransform.meType == model::TransformationType::LumOff)
+ nLumOff = rTransform.mnValue;
+ }
+ if (nLumOff == 0)
{
eState = PropertyState_DEFAULT_VALUE;
}
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index d0d602cb4299..3827c90e045e 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -2186,7 +2186,7 @@ bool PowerPointExport::WriteColorSets(const FSHelperPtr& pFS, svx::Theme* pTheme
{
sal_Int32 nToken = aPredefinedClrTokens[static_cast<PredefinedClrSchemeId>(nId)];
pFS->startElementNS(XML_a, nToken);
- svx::ThemeColorType eType = svx::convertToThemeColorType(nId);
+ model::ThemeColorType eType = model::convertToThemeColorType(nId);
pFS->singleElementNS(XML_a, XML_srgbClr, XML_val, I32SHEX(static_cast<sal_Int32>(pColorSet->getColor(eType))));
pFS->endElementNS(XML_a, nToken);
}
diff --git a/sd/source/ui/func/fuconstr.cxx b/sd/source/ui/func/fuconstr.cxx
index dd086641cdbf..e7f0bb3a67bb 100644
--- a/sd/source/ui/func/fuconstr.cxx
+++ b/sd/source/ui/func/fuconstr.cxx
@@ -389,10 +389,10 @@ void FuConstruct::SetStyleSheet( SfxItemSet& rAttr, SdrObject* pObj,
aAttr.Put(XFillStyleItem(css::drawing::FillStyle_SOLID));
- svx::ThemeColorType eColorType = svx::ThemeColorType::Accent1;
+ model::ThemeColorType eColorType = model::ThemeColorType::Accent1;
Color aColor = pTheme->GetColor(eColorType);
XFillColorItem aFillColorItem("", aColor);
- aFillColorItem.GetThemeColor().SetThemeIndex(static_cast<sal_Int16>(eColorType));
+ aFillColorItem.GetThemeColor().setType(eColorType);
aAttr.Put(aFillColorItem);
aAttr.Put(XLineStyleItem(css::drawing::LineStyle_SOLID));
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index 6282b750aa06..7fba8728d991 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -780,21 +780,20 @@ void TextObjectBar::Execute( SfxRequest &rReq )
if (nSlot == SID_ATTR_CHAR_COLOR)
{
pColorItem = std::make_unique<SvxColorItem>(pNewArgs->Get(EE_CHAR_COLOR));
- }
- if (const SfxInt16Item* pIntItem = pArgs->GetItemIfSet(SID_ATTR_COLOR_THEME_INDEX, false))
- {
- pColorItem->GetThemeColor().SetThemeIndex(pIntItem->GetValue());
- }
- if (const SfxInt16Item* pIntItem = pArgs->GetItemIfSet(SID_ATTR_COLOR_LUM_MOD, false))
- {
- pColorItem->GetThemeColor().SetLumMod(pIntItem->GetValue());
- }
- if (const SfxInt16Item* pIntItem = pArgs->GetItemIfSet(SID_ATTR_COLOR_LUM_OFF, false))
- {
- pColorItem->GetThemeColor().SetLumOff(pIntItem->GetValue());
- }
- if (pColorItem)
- {
+ pColorItem->GetThemeColor().clearTransformations();
+
+ if (const SfxInt16Item* pIntItem = pArgs->GetItemIfSet(SID_ATTR_COLOR_THEME_INDEX, false))
+ {
+ pColorItem->GetThemeColor().setType(model::convertToThemeColorType(pIntItem->GetValue()));
+ }
+ if (const SfxInt16Item* pIntItem = pArgs->GetItemIfSet(SID_ATTR_COLOR_LUM_MOD, false))
+ {
+ pColorItem->GetThemeColor().addTransformation({model::TransformationType::LumMod, pIntItem->GetValue()});
+ }
+ if (const SfxInt16Item* pIntItem = pArgs->GetItemIfSet(SID_ATTR_COLOR_LUM_OFF, false))
+ {
+ pColorItem->GetThemeColor().addTransformation({model::TransformationType::LumOff, pIntItem->GetValue()});
+ }
pNewArgs->Put(std::move(pColorItem));
}
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index b2c2803a2438..a390533e89dc 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -575,20 +575,21 @@ public:
if (pColorItem)
{
XFillColorItem aColorItem(*pColorItem);
+ aColorItem.GetThemeColor().clearTransformations();
if (pArgs->GetItemState(SID_ATTR_COLOR_THEME_INDEX, false, &pItem) == SfxItemState::SET)
{
auto pIntItem = static_cast<const SfxInt16Item*>(pItem);
- aColorItem.GetThemeColor().SetThemeIndex(pIntItem->GetValue());
+ aColorItem.GetThemeColor().setType(model::convertToThemeColorType(pIntItem->GetValue()));
}
if (pArgs->GetItemState(SID_ATTR_COLOR_LUM_MOD, false, &pItem) == SfxItemState::SET)
{
auto pIntItem = static_cast<const SfxInt16Item*>(pItem);
- aColorItem.GetThemeColor().SetLumMod(pIntItem->GetValue());
+ aColorItem.GetThemeColor().addTransformation({model::TransformationType::LumMod, pIntItem->GetValue()});
}
if (pArgs->GetItemState(SID_ATTR_COLOR_LUM_OFF, false, &pItem) == SfxItemState::SET)
{
auto pIntItem = static_cast<const SfxInt16Item*>(pItem);
- aColorItem.GetThemeColor().SetLumOff(pIntItem->GetValue());
+ aColorItem.GetThemeColor().addTransformation({model::TransformationType::LumOff, pIntItem->GetValue()});
}
pArgs->Put(aColorItem);
}
diff --git a/solenv/gbuild/extensions/pre_MergedLibsList.mk b/solenv/gbuild/extensions/pre_MergedLibsList.mk
index b2402ec0c2af..6bf0157a361b 100644
--- a/solenv/gbuild/extensions/pre_MergedLibsList.mk
+++ b/solenv/gbuild/extensions/pre_MergedLibsList.mk
@@ -28,6 +28,7 @@ gb_MERGE_LIBRARY_LIST := \
deploymentmisc \
$(if $(filter-out MACOSX WNT,$(OS)),desktopbe1) \
$(if $(filter WNT,$(OS)),directx9canvas) \
+ docmodel \
drawinglayercore \
drawinglayer \
editeng \
diff --git a/solenv/qa/python/gbuildtojson.py b/solenv/qa/python/gbuildtojson.py
index 8f08668dbbdd..e693f75f5947 100644
--- a/solenv/qa/python/gbuildtojson.py
+++ b/solenv/qa/python/gbuildtojson.py
@@ -124,7 +124,7 @@ class CheckGbuildToJsonModules(unittest.TestCase):
shutil.rmtree(self.tempwork)
def test_gbuildtojson(self):
- modules = ['accessibility', 'android', 'animations', 'apple_remote', 'avmedia', 'basctl', 'basegfx', 'basic', 'bean', 'canvas', 'chart2', 'codemaker', 'comphelper', 'cppcanvas', 'cui', 'dbaccess', 'desktop', 'drawinglayer', 'editeng', 'embeddedobj', 'embedserv', 'eventattacher', 'extras', 'filter', 'forms', 'formula', 'fpicker', 'framework', 'hwpfilter', 'i18nlangtag', 'i18nutil', 'idl', 'instsetoo_native', 'io', 'ios', 'jvmaccess', 'jvmfwk', 'l10ntools', 'librelogo', 'libreofficekit', 'linguistic', 'lotuswordpro', 'nlpsolver', 'o3tl', 'offapi', 'officecfg', 'onlineupdate', 'oovbaapi', 'oox', 'opencl', 'package', 'postprocess', 'pyuno', 'registry', 'remotebridges', 'reportbuilder', 'reportdesign', 'ridljar', 'salhelper', 'sax', 'sc', 'sccomp', 'scp2', 'scripting', 'sd', 'sdext', 'setup_native', 'sfx2', 'slideshow', 'smoketest', 'soltools', 'sot', 'starmath', 'store', 'svgio', 'emfio', 'svl', 'svtools', 'svx', 'sw', 'swext', 'sysui', 'test', 'testtools', 'toolkit', 'ucb', 'ucbhelper', 'udkapi', 'uitest', 'UnoControls', 'unodevtools', 'unoidl', 'unoil', 'unotest', 'unotools', 'unoxml', 'ure', 'uui', 'vbahelper', 'vcl', 'winaccessibility', 'wizards', 'writerperfect', 'xmerge', 'xmlhelp', 'xmloff', 'xmlreader', 'xmlscript', 'xmlsecurity']
+ modules = ['accessibility', 'android', 'animations', 'apple_remote', 'avmedia', 'basctl', 'basegfx', 'basic', 'bean', 'canvas', 'chart2', 'codemaker', 'comphelper', 'cppcanvas', 'cui', 'dbaccess', 'desktop', 'docmodel', 'drawinglayer', 'editeng', 'embeddedobj', 'embedserv', 'eventattacher', 'extras', 'filter', 'forms', 'formula', 'fpicker', 'framework', 'hwpfilter', 'i18nlangtag', 'i18nutil', 'idl', 'instsetoo_native', 'io', 'ios', 'jvmaccess', 'jvmfwk', 'l10ntools', 'librelogo', 'libreofficekit', 'linguistic', 'lotuswordpro', 'nlpsolver', 'o3tl', 'offapi', 'officecfg', 'onlineupdate', 'oovbaapi', 'oox', 'opencl', 'package', 'postprocess', 'pyuno', 'registry', 'remotebridges', 'reportbuilder', 'reportdesign', 'ridljar', 'salhelper', 'sax', 'sc', 'sccomp', 'scp2', 'scripting', 'sd', 'sdext', 'setup_native', 'sfx2', 'slideshow', 'smoketest', 'soltools', 'sot', 'starmath', 'store', 'svgio', 'emfio', 'svl', 'svtools', 'svx', 'sw', 'swext', 'sysui', 'test', 'testtools', 'toolkit', 'ucb', 'ucbhelper', 'udkapi', 'uitest', 'UnoControls', 'unodevtools', 'unoidl', 'unoil', 'unotest', 'unotools', 'unoxml', 'ure', 'uui', 'vbahelper', 'vcl', 'winaccessibility', 'wizards', 'writerperfect', 'xmerge', 'xmlhelp', 'xmloff', 'xmlreader', 'xmlscript', 'xmlsecurity']
if os.environ['OS'] == 'WNT':
# for now, use a limited subset for testing on windows as it is so annoyingly slow on this
modules = ['chart2', 'cui', 'dbaccess', 'framework', 'oox', 'sfx2', 'svl', 'svtools', 'svx', 'toolkit', 'vcl', 'xmloff']
diff --git a/svx/CppunitTest_svx_removewhichrange.mk b/svx/CppunitTest_svx_removewhichrange.mk
index 6819c4452609..9fea95320f7b 100644
--- a/svx/CppunitTest_svx_removewhichrange.mk
+++ b/svx/CppunitTest_svx_removewhichrange.mk
@@ -23,6 +23,7 @@ $(eval $(call gb_CppunitTest_use_libraries,svx_removewhichrange, \
comphelper \
cppu \
cppuhelper \
+ docmodel \
drawinglayer \
drawinglayercore \
editeng \
diff --git a/svx/CppunitTest_svx_styles.mk b/svx/CppunitTest_svx_styles.mk
index 60f7e13d07d3..9d5cccabb8b9 100644
--- a/svx/CppunitTest_svx_styles.mk
+++ b/svx/CppunitTest_svx_styles.mk
@@ -23,6 +23,7 @@ $(eval $(call gb_CppunitTest_use_libraries,svx_styles, \
comphelper \
cppu \
cppuhelper \
+ docmodel \
svx \
sal \
subsequenttest \
diff --git a/svx/CppunitTest_svx_unit.mk b/svx/CppunitTest_svx_unit.mk
index 678a27322e02..a46aa5b0d583 100644
--- a/svx/CppunitTest_svx_unit.mk
+++ b/svx/CppunitTest_svx_unit.mk
@@ -38,6 +38,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,svx_unit, \
$(eval $(call gb_CppunitTest_use_libraries,svx_unit, \
basegfx \
+ docmodel \
drawinglayer \
drawinglayercore \
editeng \
diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk
index 6a1c0b5de352..439ae516427c 100644
--- a/svx/Library_svxcore.mk
+++ b/svx/Library_svxcore.mk
@@ -62,6 +62,7 @@ $(eval $(call gb_Library_use_libraries,svxcore,\
cppu \
$(call gb_Helper_optional,DBCONNECTIVITY, \
dbtools) \
+ docmodel \
drawinglayercore \
drawinglayer \
editeng \
diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx
index 8f83a82187d6..8ccbe5900922 100644
--- a/svx/inc/pch/precompiled_svx.hxx
+++ b/svx/inc/pch/precompiled_svx.hxx
@@ -13,7 +13,7 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
- Generated on 2022-01-26 09:16:16 using:
+ Generated on 2023-01-10 23:28:52 using:
./bin/update_pch svx svx --cutoff=3 --exclude:system --exclude:module --include:local
If after updating build fails, use the following command to locate conflicting headers:
@@ -26,11 +26,13 @@
#include <array>
#include <cassert>
#include <climits>
+#include <cmath>
#include <cstddef>
#include <cstdlib>
#include <deque>
#include <functional>
#include <limits.h>
+#include <limits>
#include <map>
#include <memory>
#include <mutex>
@@ -84,7 +86,6 @@
#include <vcl/commandinfoprovider.hxx>
#include <vcl/customweld.hxx>
#include <vcl/dllapi.h>
-#include <comphelper/errcode.hxx>
#include <vcl/errinf.hxx>
#include <vcl/event.hxx>
#include <vcl/fieldvalues.hxx>
@@ -122,10 +123,11 @@
#include <basegfx/point/b3dpoint.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
-#include <basegfx/range/b2drange.hxx>
-#include <basegfx/range/basicrange.hxx>
+#include <basegfx/polygon/b3dpolypolygon.hxx>
+#include <basegfx/range/b3drange.hxx>
#include <basegfx/tuple/b2dtuple.hxx>
-#include <basegfx/vector/b2dvector.hxx>
+#include <basegfx/tuple/b3dtuple.hxx>
+#include <basegfx/vector/b2dsize.hxx>
#include <basegfx/vector/b2enums.hxx>
#include <basegfx/vector/b3dvector.hxx>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
@@ -169,7 +171,6 @@
#include <com/sun/star/frame/XTerminateListener.hpp>
#include <com/sun/star/frame/XToolbarController.hpp>
#include <com/sun/star/graphic/XGraphic.hpp>
-#include <com/sun/star/i18n/BreakIterator.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/lang/EventObject.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
@@ -196,7 +197,6 @@
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/uno/XWeak.hpp>
-#include <com/sun/star/uno/genfunc.hxx>
#include <com/sun/star/util/NumberFormat.hpp>
#include <com/sun/star/util/URLTransformer.hpp>
#include <com/sun/star/util/XModifyListener.hpp>
@@ -206,6 +206,8 @@
#include <comphelper/broadcasthelper.hxx>
#include <comphelper/compbase.hxx>
#include <comphelper/comphelperdllapi.h>
+#include <comphelper/diagnose_ex.hxx>
+#include <comphelper/errcode.hxx>
#include <comphelper/interfacecontainer4.hxx>
#include <comphelper/lok.hxx>
#include <comphelper/multicontainer2.hxx>
@@ -217,7 +219,6 @@
#include <comphelper/sequence.hxx>
#include <comphelper/servicehelper.hxx>
#include <comphelper/types.hxx>
-#include <cppu/unotype.hxx>
#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/cppuhelperdllapi.h>
#include <cppuhelper/implbase.hxx>
@@ -226,11 +227,9 @@
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/weakagg.hxx>
+#include <docmodel/theme/ThemeColor.hxx>
#include <drawinglayer/drawinglayerdllapi.h>
-#include <drawinglayer/primitive2d/CommonTypes.hxx>
#include <drawinglayer/primitive2d/Primitive2DContainer.hxx>
-#include <drawinglayer/primitive2d/Primitive2DVisitor.hxx>
-#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
#include <drawinglayer/processor2d/baseprocessor2d.hxx>
#include <drawinglayer/processor2d/processor2dtools.hxx>
#include <editeng/borderline.hxx>
@@ -267,6 +266,8 @@
#include <o3tl/deleter.hxx>
#include <o3tl/safeint.hxx>
#include <o3tl/sorted_vector.hxx>
+#include <o3tl/span.hxx>
+#include <o3tl/string_view.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <o3tl/underlyingenumvalue.hxx>
#include <o3tl/unit_conversion.hxx>
@@ -334,7 +335,6 @@
#include <tools/datetime.hxx>
#include <tools/debug.hxx>
#include <tools/degree.hxx>
-#include <comphelper/diagnose_ex.hxx>
#include <tools/fldunit.hxx>
#include <tools/fract.hxx>
#include <tools/gen.hxx>
@@ -350,15 +350,14 @@
#include <tools/time.hxx>
#include <tools/toolsdllapi.h>
#include <tools/urlobj.hxx>
-#include <typelib/typedescription.h>
-#include <uno/data.h>
+#include <unotools/configmgr.hxx>
#include <unotools/fontcvt.hxx>
#include <unotools/localedatawrapper.hxx>
-#include <unotools/pathoptions.hxx>
#include <unotools/resmgr.hxx>
#include <unotools/syslocale.hxx>
#include <unotools/unotoolsdllapi.h>
#include <unotools/viewoptions.hxx>
+#include <unotools/weakref.hxx>
#endif // PCH_LEVEL >= 3
#if PCH_LEVEL >= 4
#include <cell.hxx>
diff --git a/svx/source/styles/ColorSets.cxx b/svx/source/styles/ColorSets.cxx
index 5511253f3d03..00ffdae3b031 100644
--- a/svx/source/styles/ColorSets.cxx
+++ b/svx/source/styles/ColorSets.cxx
@@ -39,9 +39,9 @@ void UpdateTextPortionColorSet(const uno::Reference<beans::XPropertySet>& xPorti
{
sal_Int16 nCharColorTheme = -1;
xPortion->getPropertyValue(UNO_NAME_EDIT_CHAR_COLOR_THEME) >>= nCharColorTheme;
- svx::ThemeColorType eColorThemeType = svx::convertToThemeColorType(nCharColorTheme);
+ model::ThemeColorType eColorThemeType = model::convertToThemeColorType(nCharColorTheme);
- if (eColorThemeType == svx::ThemeColorType::Unknown)
+ if (eColorThemeType == model::ThemeColorType::Unknown)
return;
Color aColor = rColorSet.getColor(eColorThemeType);
@@ -74,8 +74,8 @@ void UpdateFillColorSet(const uno::Reference<beans::XPropertySet>& xShape, const
sal_Int16 nFillColorTheme = -1;
xShape->getPropertyValue(UNO_NAME_FILLCOLOR_THEME) >>= nFillColorTheme;
- svx::ThemeColorType eColorThemeType = svx::convertToThemeColorType(nFillColorTheme);
- if (eColorThemeType == svx::ThemeColorType::Unknown)
+ model::ThemeColorType eColorThemeType = model::convertToThemeColorType(nFillColorTheme);
+ if (eColorThemeType == model::ThemeColorType::Unknown)
return;
Color aColor = rColorSet.getColor(eColorThemeType);
@@ -281,7 +281,7 @@ void Theme::ToAny(css::uno::Any& rVal) const
if (mpColorSet)
{
std::vector<util::Color> aColorScheme;
- for (auto eThemeColorType : o3tl::enumrange<svx::ThemeColorType>())
+ for (auto eThemeColorType : o3tl::enumrange<model::ThemeColorType>())
{
Color aColor = mpColorSet->getColor(eThemeColorType);
aColorScheme.push_back(sal_Int32(aColor));
@@ -362,14 +362,14 @@ std::vector<Color> Theme::GetColors() const
return {};
std::vector<Color> aColors;
- for (auto eThemeColorType : o3tl::enumrange<svx::ThemeColorType>())
+ for (auto eThemeColorType : o3tl::enumrange<model::ThemeColorType>())
{
aColors.push_back(mpColorSet->getColor(eThemeColorType));
}
return aColors;
}
-Color Theme::GetColor(ThemeColorType eType) const
+Color Theme::GetColor(model::ThemeColorType eType) const
{
if (!mpColorSet)
return {};
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index 5dbc1ee1a8e5..4d200239c2e0 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -1450,10 +1450,11 @@ PropertyState SAL_CALL Cell::getPropertyState( const OUString& PropertyName )
}
break;
case XATTR_FILLCOLOR:
+
if (pMap->nMemberId == MID_COLOR_THEME_INDEX)
{
const XFillColorItem* pColor = rSet.GetItem<XFillColorItem>(pMap->nWID);
- if (pColor->GetThemeColor().GetThemeIndex() == -1)
+ if (pColor->GetThemeColor().getType() == model::ThemeColorType::Unknown)
{
eState = PropertyState_DEFAULT_VALUE;
}
@@ -1461,7 +1462,13 @@ PropertyState SAL_CALL Cell::getPropertyState( const OUString& PropertyName )
else if (pMap->nMemberId == MID_COLOR_LUM_MOD)
{
const XFillColorItem* pColor = rSet.GetItem<XFillColorItem>(pMap->nWID);
- if (pColor->GetThemeColor().GetLumMod() == 10000)
+ sal_Int16 nLumMod = 10000;
+ for (auto const& rTransform : pColor->GetThemeColor().getTransformations())
+ {
+ if (rTransform.meType == model::TransformationType::LumMod)
+ nLumMod = rTransform.mnValue;
+ }
+ if (nLumMod == 10000)
{
eState = PropertyState_DEFAULT_VALUE;
}
@@ -1469,7 +1476,13 @@ PropertyState SAL_CALL Cell::getPropertyState( const OUString& PropertyName )
else if (pMap->nMemberId == MID_COLOR_LUM_OFF)
{
const XFillColorItem* pColor = rSet.GetItem<XFillColorItem>(pMap->nWID);
- if (pColor->GetThemeColor().GetLumOff() == 0)
+ sal_Int16 nLumOff = 0;
+ for (auto const& rTransform : pColor->GetThemeColor().getTransformations())
+ {
+ if (rTransform.meType == model::TransformationType::LumOff)
+ nLumOff = rTransform.mnValue;
+ }
+ if (nLumOff == 0)
{
eState = PropertyState_DEFAULT_VALUE;
}
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 60dd13aeac7d..9692df8c130d 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -1957,7 +1957,7 @@ beans::PropertyState SvxShape::_getPropertyState( const OUString& PropertyName )
if (pMap->nMemberId == MID_COLOR_THEME_INDEX)
{
const XFillColorItem* pColor = rSet.GetItem<XFillColorItem>(pMap->nWID);
- if (pColor->GetThemeColor().GetThemeIndex() == -1)
+ if (pColor->GetThemeColor().getType() == model::ThemeColorType::Unknown)
{
eState = beans::PropertyState_DEFAULT_VALUE;
}
@@ -1965,7 +1965,13 @@ beans::PropertyState SvxShape::_getPropertyState( const OUString& PropertyName )
else if (pMap->nMemberId == MID_COLOR_LUM_MOD)
{
const XFillColorItem* pColor = rSet.GetItem<XFillColorItem>(pMap->nWID);
- if (pColor->GetThemeColor().GetLumMod() == 10000)
+ sal_Int16 nLumMod = 10000;
+ for (auto const& rTransform : pColor->GetThemeColor().getTransformations())
+ {
+ if (rTransform.meType == model::TransformationType::LumMod)
+ nLumMod = rTransform.mnValue;
+ }
+ if (nLumMod == 10000)
{
eState = beans::PropertyState_DEFAULT_VALUE;
}
@@ -1973,7 +1979,13 @@ beans::PropertyState SvxShape::_getPropertyState( const OUString& PropertyName )
else if (pMap->nMemberId == MID_COLOR_LUM_OFF)
{
const XFillColorItem* pColor = rSet.GetItem<XFillColorItem>(pMap->nWID);
- if (pColor->GetThemeColor().GetLumOff() == 0)
+ sal_Int16 nLumOff = 0;
+ for (auto const& rTransform : pColor->GetThemeColor().getTransformations())
+ {
+ if (rTransform.meType == model::TransformationType::LumOff)
+ nLumOff = rTransform.mnValue;
+ }
+ if (nLumOff == 0)
{
eState = beans::PropertyState_DEFAULT_VALUE;
}
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 47668cc6bf6b..38a9431a47a6 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -335,7 +335,22 @@ void XColorItem::dumpAsXml(xmlTextWriterPtr pWriter) const
NameOrIndex::dumpAsXml(pWriter);
- maThemeColor.dumpAsXml(pWriter);
+ (void)xmlTextWriterStartElement(pWriter, BAD_CAST("theme-color"));
+
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("theme-index"),
+ BAD_CAST(OString::number(sal_Int16(maThemeColor.getType())).getStr()));
+
+ for (auto const& rTransform : maThemeColor.getTransformations())
+ {
+ (void)xmlTextWriterStartElement(pWriter, BAD_CAST("transformation"));
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("type"),
+ BAD_CAST(OString::number(sal_Int16(rTransform.meType)).getStr()));
+ (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"),
+ BAD_CAST(OString::number(rTransform.mnValue).getStr()));
+ (void)xmlTextWriterEndElement(pWriter);
+ }
+
+ (void)xmlTextWriterEndElement(pWriter);
(void)xmlTextWriterEndElement(pWriter);
}
@@ -1908,17 +1923,29 @@ bool XFillColorItem::QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId ) cons
{
case MID_COLOR_THEME_INDEX:
{
- rVal <<= GetThemeColor().GetThemeIndex();
+ rVal <<= sal_Int16(GetThemeColor().getType());
break;
}
case MID_COLOR_LUM_MOD:
{
- rVal <<= GetThemeColor().GetLumMod();
+ sal_Int16 nValue = 10000;
+ for (auto const& rTransform : GetThemeColor().getTransformations())
+ {
+ if (rTransform.meType == model::TransformationType::LumMod)
+ nValue = rTransform.mnValue;
+ }
+ rVal <<= nValue;
break;
}
case MID_COLOR_LUM_OFF:
{
- rVal <<= GetThemeColor().GetLumOff();
+ sal_Int16 nValue = 0;
+ for (auto const& rTransform : GetThemeColor().getTransformations())
+ {
+ if (rTransform.meType == model::TransformationType::LumOff)
+ nValue = rTransform.mnValue;
+ }
+ rVal <<= nValue;
break;
}
default:
@@ -1941,23 +1968,25 @@ bool XFillColorItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId )
sal_Int16 nIndex = -1;
if (!(rVal >>= nIndex))
return false;
- GetThemeColor().SetThemeIndex(nIndex);
+ GetThemeColor().setType(model::convertToThemeColorType(nIndex));
break;
}
case MID_COLOR_LUM_MOD:
{
- sal_Int16 nLumMod = -1;
+ sal_Int16 nLumMod = 10000;
if (!(rVal >>= nLumMod))
return false;
- GetThemeColor().SetLumMod(nLumMod);
+ GetThemeColor().removeTransformations(model::TransformationType::LumMod);
+ GetThemeColor().addTransformation({model::TransformationType::LumMod, nLumMod});
}
break;
case MID_COLOR_LUM_OFF:
{
- sal_Int16 nLumOff = -1;
+ sal_Int16 nLumOff = 0;
if (!(rVal >>= nLumOff))
return false;
- GetThemeColor().SetLumOff(nLumOff);
+ GetThemeColor().removeTransformations(model::TransformationType::LumOff);
+ GetThemeColor().addTransformation({model::TransformationType::LumOff, nLumOff});
}
break;
default:
diff --git a/sw/CppunitTest_sw_apitests.mk b/sw/CppunitTest_sw_apitests.mk
index 9af8873079d3..716607dbe404 100644
--- a/sw/CppunitTest_sw_apitests.mk
+++ b/sw/CppunitTest_sw_apitests.mk
@@ -29,6 +29,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_apitests, \
cppu \
cppuhelper \
drawinglayer \
+ docmodel \
editeng \
for \
forui \
diff --git a/sw/CppunitTest_sw_core_draw.mk b/sw/CppunitTest_sw_core_draw.mk
index 63dfd5f828b9..0267fc60e2d5 100644
--- a/sw/CppunitTest_sw_core_draw.mk
+++ b/sw/CppunitTest_sw_core_draw.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_core_draw, \
comphelper \
cppu \
cppuhelper \
+ docmodel \
sal \
sfx \
subsequenttest \
diff --git a/sw/CppunitTest_sw_core_theme.mk b/sw/CppunitTest_sw_core_theme.mk
index 84b462ea8245..03b42a32e666 100644
--- a/sw/CppunitTest_sw_core_theme.mk
+++ b/sw/CppunitTest_sw_core_theme.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_core_theme, \
comphelper \
cppu \
cppuhelper \
+ docmodel \
sal \
sfx \
subsequenttest \
diff --git a/sw/CppunitTest_sw_macros_test.mk b/sw/CppunitTest_sw_macros_test.mk
index a0be4e6cd27f..9cc9b597c9ce 100644
--- a/sw/CppunitTest_sw_macros_test.mk
+++ b/sw/CppunitTest_sw_macros_test.mk
@@ -25,6 +25,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_macros_test, \
cppu \
cppuhelper \
drawinglayer \
+ docmodel \
editeng \
for \
forui \
diff --git a/sw/CppunitTest_sw_ooxmlimport.mk b/sw/CppunitTest_sw_ooxmlimport.mk
index 93ecf2324477..0df45a3b11c5 100644
--- a/sw/CppunitTest_sw_ooxmlimport.mk
+++ b/sw/CppunitTest_sw_ooxmlimport.mk
@@ -24,6 +24,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_ooxmlimport, \
comphelper \
cppu \
cppuhelper \
+ docmodel \
sal \
sfx \
subsequenttest \
diff --git a/sw/CppunitTest_sw_ooxmlimport2.mk b/sw/CppunitTest_sw_ooxmlimport2.mk
index ed8d2a92e514..89dd74ff40d1 100644
--- a/sw/CppunitTest_sw_ooxmlimport2.mk
+++ b/sw/CppunitTest_sw_ooxmlimport2.mk
@@ -24,6 +24,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_ooxmlimport2, \
comphelper \
cppu \
cppuhelper \
+ docmodel \
sal \
sfx \
subsequenttest \
diff --git a/sw/CppunitTest_sw_tiledrendering.mk b/sw/CppunitTest_sw_tiledrendering.mk
index 198fc04a0028..830167ca21d3 100644
--- a/sw/CppunitTest_sw_tiledrendering.mk
+++ b/sw/CppunitTest_sw_tiledrendering.mk
@@ -22,6 +22,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_tiledrendering, \
cppu \
cppuhelper \
editeng \
+ docmodel \
sal \
sfx \
subsequenttest \
diff --git a/sw/CppunitTest_sw_uwriter.mk b/sw/CppunitTest_sw_uwriter.mk
index 2c2361d199b6..7b328c998fe3 100644
--- a/sw/CppunitTest_sw_uwriter.mk
+++ b/sw/CppunitTest_sw_uwriter.mk
@@ -34,6 +34,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_uwriter, \
cppuhelper \
$(call gb_Helper_optional,DBCONNECTIVITY, \
dbtools) \
+ docmodel \
drawinglayer \
drawinglayercore \
editeng \
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index 19cb6baeac74..478136e50f54 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -58,6 +58,7 @@ $(eval $(call gb_Library_use_libraries,sw,\
cppuhelper \
$(call gb_Helper_optional,DBCONNECTIVITY, \
dbtools) \
+ docmodel \
drawinglayercore \
drawinglayer \
editeng \
diff --git a/sw/layoutwriter_setup.mk b/sw/layoutwriter_setup.mk
index e151bcf75509..bfc9548fceef 100644
--- a/sw/layoutwriter_setup.mk
+++ b/sw/layoutwriter_setup.mk
@@ -26,6 +26,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_layoutwriter$(1), \
comphelper \
cppu \
cppuhelper \
+ docmodel \
editeng \
msword \
sal \
diff --git a/sw/ooxmlexport_setup.mk b/sw/ooxmlexport_setup.mk
index 8f45d30be7c3..e124ee3b6a12 100644
--- a/sw/ooxmlexport_setup.mk
+++ b/sw/ooxmlexport_setup.mk
@@ -13,6 +13,7 @@ define sw_ooxmlexport_libraries
comphelper \
cppu \
cppuhelper \
+ docmodel \
editeng \
sal \
sfx \
diff --git a/sw/qa/core/theme/ThemeTest.cxx b/sw/qa/core/theme/ThemeTest.cxx
index 2ab9072469c0..a6591c6b77db 100644
--- a/sw/qa/core/theme/ThemeTest.cxx
+++ b/sw/qa/core/theme/ThemeTest.cxx
@@ -50,16 +50,16 @@ CPPUNIT_TEST_FIXTURE(SwCoreThemeTest, testDrawPageThemeExists)
CPPUNIT_ASSERT(pColorSet);
CPPUNIT_ASSERT_EQUAL(OUString(u"Orange"), pColorSet->getName());
- CPPUNIT_ASSERT_EQUAL(Color(0xE48312), pTheme->GetColor(svx::ThemeColorType::Accent1));
- CPPUNIT_ASSERT_EQUAL(Color(0xBD582C), pTheme->GetColor(svx::ThemeColorType::Accent2));
- CPPUNIT_ASSERT_EQUAL(Color(0x865640), pTheme->GetColor(svx::ThemeColorType::Accent3));
- CPPUNIT_ASSERT_EQUAL(Color(0x9B8357), pTheme->GetColor(svx::ThemeColorType::Accent4));
- CPPUNIT_ASSERT_EQUAL(Color(0xC2BC80), pTheme->GetColor(svx::ThemeColorType::Accent5));
- CPPUNIT_ASSERT_EQUAL(Color(0x94A088), pTheme->GetColor(svx::ThemeColorType::Accent6));
- CPPUNIT_ASSERT_EQUAL(Color(0x000000), pTheme->GetColor(svx::ThemeColorType::Dark1));
- CPPUNIT_ASSERT_EQUAL(Color(0x637052), pTheme->GetColor(svx::ThemeColorType::Dark2));
- CPPUNIT_ASSERT_EQUAL(Color(0xFFFFFF), pTheme->GetColor(svx::ThemeColorType::Light1));
- CPPUNIT_ASSERT_EQUAL(Color(0xCCDDEA), pTheme->GetColor(svx::ThemeColorType::Light2));
+ CPPUNIT_ASSERT_EQUAL(Color(0xE48312), pTheme->GetColor(model::ThemeColorType::Accent1));
+ CPPUNIT_ASSERT_EQUAL(Color(0xBD582C), pTheme->GetColor(model::ThemeColorType::Accent2));
+ CPPUNIT_ASSERT_EQUAL(Color(0x865640), pTheme->GetColor(model::ThemeColorType::Accent3));
+ CPPUNIT_ASSERT_EQUAL(Color(0x9B8357), pTheme->GetColor(model::ThemeColorType::Accent4));
+ CPPUNIT_ASSERT_EQUAL(Color(0xC2BC80), pTheme->GetColor(model::ThemeColorType::Accent5));
+ CPPUNIT_ASSERT_EQUAL(Color(0x94A088), pTheme->GetColor(model::ThemeColorType::Accent6));
+ CPPUNIT_ASSERT_EQUAL(Color(0x000000), pTheme->GetColor(model::ThemeColorType::Dark1));
+ CPPUNIT_ASSERT_EQUAL(Color(0x637052), pTheme->GetColor(model::ThemeColorType::Dark2));
+ CPPUNIT_ASSERT_EQUAL(Color(0xFFFFFF), pTheme->GetColor(model::ThemeColorType::Light1));
+ CPPUNIT_ASSERT_EQUAL(Color(0xCCDDEA), pTheme->GetColor(model::ThemeColorType::Light2));
svx::FontScheme const& rFontScheme = pTheme->getFontScheme();
CPPUNIT_ASSERT_EQUAL(OUString(u"Calibri Light"), rFontScheme.getMajorLatin().maTypeface);
diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx b/sw/source/uibase/sidebar/ThemePanel.cxx
index ad0d74e2b678..83a09d092dbf 100644
--- a/sw/source/uibase/sidebar/ThemePanel.cxx
+++ b/sw/source/uibase/sidebar/ThemePanel.cxx
@@ -223,11 +223,12 @@ void changeFont(SwFormat* pFormat, SwDocStyleSheet const * pStyle, FontSet const
void changeColor(SwTextFormatColl* pCollection, svx::ColorSet const& rColorSet, StyleRedefinition* /*pRedefinition*/)
{
SvxColorItem aColorItem(pCollection->GetColor());
- auto nThemeIndex = aColorItem.GetThemeColor().GetThemeIndex();
- if (nThemeIndex >= 0)
+ model::ThemeColor const& rThemeColor = aColorItem.GetThemeColor();
+ auto eThemeType = rThemeColor.getType();
+ if (eThemeType != model::ThemeColorType::Unknown)
{
- Color aColor = rColorSet.getColor(svx::convertToThemeColorType(nThemeIndex));
- aColor.ApplyTintOrShade(aColorItem.GetThemeColor().GetTintOrShade());
+ Color aColor = rColorSet.getColor(eThemeType);
+ aColor = rThemeColor.applyTransformations(aColor);
aColorItem.SetValue(aColor);
pCollection->SetFormatAttr(aColorItem);
}
@@ -399,10 +400,10 @@ BitmapEx GenerateColorPreview(const svx::ColorSet& rColorSet)
for (sal_uInt32 i = 0; i < 12; i += 2)
{
- pVirtualDev->SetFillColor(rColorSet.getColor(svx::convertToThemeColorType(i)));
+ pVirtualDev->SetFillColor(rColorSet.getColor(model::convertToThemeColorType(i)));
pVirtualDev->DrawRect(tools::Rectangle(x, y1, x + SIZE, y1 + SIZE));
- pVirtualDev->SetFillColor(rColorSet.getColor(svx::convertToThemeColorType(i + 1)));
+ pVirtualDev->SetFillColor(rColorSet.getColor(model::convertToThemeColorType(i + 1)));
pVirtualDev->DrawRect(tools::Rectangle(x, y2, x + SIZE, y2 + SIZE));
x += SIZE + BORDER;
diff --git a/sw/uiwriter_setup.mk b/sw/uiwriter_setup.mk
index 37c506149e7e..013cb3e29953 100644
--- a/sw/uiwriter_setup.mk
+++ b/sw/uiwriter_setup.mk
@@ -13,6 +13,7 @@ define sw_uiwriter_libraries
comphelper \
cppu \
cppuhelper \
+ docmodel \
editeng \
i18nlangtag \
msword \
diff --git a/sw/ww8export_setup.mk b/sw/ww8export_setup.mk
index 26a58ad41191..daa726c1b667 100644
--- a/sw/ww8export_setup.mk
+++ b/sw/ww8export_setup.mk
@@ -24,6 +24,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_ww8export$(1), \
comphelper \
cppu \
cppuhelper \
+ docmodel \
editeng \
emboleobj \
sal \