introduce docmodel comp., model::ThemeColor, use it in SvxColorItem

Added a new component docmodel, that has the document model types,
which only depend on other basic components. This is needed so the
types can be used in every relevant component - xmloff, oox, svx,
editeng,...

Introduces model::ThemeColor, which is a class used to store the
theme color data, including transformations (svx::Transformation).
For UNO use XThemeColor is added, and the implementation UnoThemeColor
which wraps svx::ThemeColor, so it can be tranported around.

Reactor all the code and tests to accomodate for this change.

Change-Id: I7ce6752cdfaf5e4d3b8e4d90314afa469dd65cfc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144847
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
This commit is contained in:
Tomaž Vajngerl
2023-01-12 23:15:58 +00:00
committed by Tomaž Vajngerl
parent c945eafc99
commit bd0f526f2d
70 changed files with 883 additions and 277 deletions
+1
View File
@@ -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 \
+1
View File
@@ -63,6 +63,7 @@ $(eval $(call gb_Module_add_moduledirs,cross_toolset,\
configmgr \
connectivity \
cppcanvas \
docmodel \
drawinglayer \
editeng \
emfio \
+1
View File
@@ -74,6 +74,7 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
cui \
desktop \
$(call gb_Helper_optional,DICTIONARIES,dictionaries) \
docmodel\
drawinglayer \
editeng \
embeddedobj \
+16 -15
View File
@@ -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
"""
+1
View File
@@ -38,6 +38,7 @@ $(eval $(call gb_Library_use_libraries,cui,\
comphelper \
cppu \
cppuhelper \
docmodel \
drawinglayer \
editeng \
i18nlangtag \
+10 -4
View File
@@ -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>
+7 -5
View File
@@ -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);
+6 -4
View File
@@ -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 ) );
+39
View File
@@ -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:
+7
View File
@@ -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:
+18
View File
@@ -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:
+5
View File
@@ -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.
+12
View File
@@ -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: */
+34
View File
@@ -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: */
+40
View File
@@ -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: */
+1
View File
@@ -22,6 +22,7 @@ $(eval $(call gb_CppunitTest_use_libraries,editeng_core, \
comphelper \
cppu \
cppuhelper \
docmodel \
i18nlangtag \
i18nutil \
lng \
+1
View File
@@ -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 \
+5 -2
View File
@@ -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>
+59 -46
View File
@@ -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,13 +1549,26 @@ 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)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 )
{
mColor = rNewCol;
+19 -3
View File
@@ -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;
}
}
}
+21
View File
@@ -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: */
+146
View File
@@ -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: */
+42
View File
@@ -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: */
+55
View File
@@ -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: */
+4 -50
View File
@@ -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;
};
+4 -28
View File
@@ -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
+4 -5
View File
@@ -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;
};
+1
View File
@@ -4173,6 +4173,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/util,\
XCloseBroadcaster \
XCloseListener \
XCloseable \
XThemeColor \
XDataEditor \
XDataEditorListener \
XFlushListener \
+26
View File
@@ -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: */
+1
View File
@@ -23,6 +23,7 @@ $(eval $(call gb_CppunitTest_use_libraries,oox_drawingml, \
comphelper \
cppu \
cppuhelper \
docmodel \
oox \
sal \
subsequenttest \
+1
View File
@@ -23,6 +23,7 @@ $(eval $(call gb_CppunitTest_use_libraries,oox_shape, \
comphelper \
cppu \
cppuhelper \
docmodel \
oox \
sal \
subsequenttest \
+1
View File
@@ -40,6 +40,7 @@ $(eval $(call gb_CppunitTest_use_libraries,oox_tokenmap,\
comphelper \
cppu \
cppuhelper \
docmodel \
editeng \
expwrap \
drawinglayer \
+1
View File
@@ -46,6 +46,7 @@ $(eval $(call gb_Library_use_libraries,oox,\
editeng \
expwrap \
drawinglayer \
docmodel \
msfilter \
sal \
i18nlangtag \
+52 -17
View File
@@ -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>
+14 -14
View File
@@ -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)));
+1
View File
@@ -30,6 +30,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sd_uiimpress, \
cppcanvas \
cppu \
cppuhelper \
docmodel \
drawinglayer \
editeng \
for \
+1
View File
@@ -26,6 +26,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sd_uimpress,\
cppcanvas \
cppu \
cppuhelper \
docmodel \
drawinglayer \
drawinglayercore \
editeng \
+1
View File
@@ -74,6 +74,7 @@ $(eval $(call gb_Library_use_libraries,sd,\
cppcanvas \
cppu \
cppuhelper \
docmodel \
drawinglayercore \
drawinglayer \
editeng \
+62 -6
View File
@@ -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>
+15 -3
View File
@@ -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;
}
+1 -1
View File
@@ -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);
}
+2 -2
View File
@@ -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));
+14 -15
View File
@@ -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));
}
+4 -3
View File
@@ -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);
}
@@ -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 \
+1 -1
View File
@@ -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']
+1
View File
@@ -23,6 +23,7 @@ $(eval $(call gb_CppunitTest_use_libraries,svx_removewhichrange, \
comphelper \
cppu \
cppuhelper \
docmodel \
drawinglayer \
drawinglayercore \
editeng \
+1
View File
@@ -23,6 +23,7 @@ $(eval $(call gb_CppunitTest_use_libraries,svx_styles, \
comphelper \
cppu \
cppuhelper \
docmodel \
svx \
sal \
subsequenttest \
+1
View File
@@ -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 \
+1
View File
@@ -62,6 +62,7 @@ $(eval $(call gb_Library_use_libraries,svxcore,\
cppu \
$(call gb_Helper_optional,DBCONNECTIVITY, \
dbtools) \
docmodel \
drawinglayercore \
drawinglayer \
editeng \
+14 -15
View File
@@ -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>
+7 -7
View File
@@ -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 {};
+16 -3
View File
@@ -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;
}
+15 -3
View File
@@ -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;
}
+38 -9
View File
@@ -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:
+1
View File
@@ -29,6 +29,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_apitests, \
cppu \
cppuhelper \
drawinglayer \
docmodel \
editeng \
for \
forui \
+1
View File
@@ -21,6 +21,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_core_draw, \
comphelper \
cppu \
cppuhelper \
docmodel \
sal \
sfx \
subsequenttest \
+1
View File
@@ -21,6 +21,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_core_theme, \
comphelper \
cppu \
cppuhelper \
docmodel \
sal \
sfx \
subsequenttest \
+1
View File
@@ -25,6 +25,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_macros_test, \
cppu \
cppuhelper \
drawinglayer \
docmodel \
editeng \
for \
forui \
+1
View File
@@ -24,6 +24,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_ooxmlimport, \
comphelper \
cppu \
cppuhelper \
docmodel \
sal \
sfx \
subsequenttest \
+1
View File
@@ -24,6 +24,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_ooxmlimport2, \
comphelper \
cppu \
cppuhelper \
docmodel \
sal \
sfx \
subsequenttest \
+1
View File
@@ -22,6 +22,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_tiledrendering, \
cppu \
cppuhelper \
editeng \
docmodel \
sal \
sfx \
subsequenttest \
+1
View File
@@ -34,6 +34,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_uwriter, \
cppuhelper \
$(call gb_Helper_optional,DBCONNECTIVITY, \
dbtools) \
docmodel \
drawinglayer \
drawinglayercore \
editeng \
+1
View File
@@ -58,6 +58,7 @@ $(eval $(call gb_Library_use_libraries,sw,\
cppuhelper \
$(call gb_Helper_optional,DBCONNECTIVITY, \
dbtools) \
docmodel \
drawinglayercore \
drawinglayer \
editeng \
+1
View File
@@ -26,6 +26,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_layoutwriter$(1), \
comphelper \
cppu \
cppuhelper \
docmodel \
editeng \
msword \
sal \
+1
View File
@@ -13,6 +13,7 @@ define sw_ooxmlexport_libraries
comphelper \
cppu \
cppuhelper \
docmodel \
editeng \
sal \
sfx \
+10 -10
View File
@@ -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);
+7 -6
View File
@@ -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;
+1
View File
@@ -13,6 +13,7 @@ define sw_uiwriter_libraries
comphelper \
cppu \
cppuhelper \
docmodel \
editeng \
i18nlangtag \
msword \
+1
View File
@@ -24,6 +24,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_ww8export$(1), \
comphelper \
cppu \
cppuhelper \
docmodel \
editeng \
emboleobj \
sal \