diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2023-05-11 19:40:06 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2023-06-21 10:58:13 +0200 |
commit | 56e58e6a1280d9bdd23550ba998f14aef4980244 (patch) | |
tree | d74257b40a5976ec9e7f5a2b7fa9d2fa342717be /test | |
parent | bb2c55b2c8f72bfbb7f98cf88911cb88ee1a71d6 (diff) |
sc: add CharComplexColor and CellBackgroundComplexColor properties
Change-Id: I30153796a39b2aa3648cb107905974ed6f0f3851
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151668
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/Library_subsequenttest.mk | 1 | ||||
-rw-r--r-- | test/source/beans/xpropertyset.cxx | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk index 7323f7312d93..91f4a1d8e86b 100644 --- a/test/Library_subsequenttest.mk +++ b/test/Library_subsequenttest.mk @@ -34,6 +34,7 @@ $(eval $(call gb_Library_use_libraries,subsequenttest,\ utl \ unotest \ vcl \ + docmodel \ )) $(eval $(call gb_Library_use_externals,subsequenttest,\ diff --git a/test/source/beans/xpropertyset.cxx b/test/source/beans/xpropertyset.cxx index 00c3378106d9..038b1e5733b6 100644 --- a/test/source/beans/xpropertyset.cxx +++ b/test/source/beans/xpropertyset.cxx @@ -17,12 +17,14 @@ #include <com/sun/star/beans/XVetoableChangeListener.hpp> #include <com/sun/star/lang/EventObject.hpp> #include <com/sun/star/util/DateTime.hpp> +#include <com/sun/star/util/XComplexColor.hpp> #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/uno/Type.h> #include <cppuhelper/implbase.hxx> +#include <docmodel/uno/UnoComplexColor.hxx> #include <rtl/ref.hxx> #include <cppunit/TestAssert.h> @@ -242,6 +244,13 @@ bool XPropertySet::isPropertyValueChangeable(const OUString& rName) aDT.Year += 1; xPropSet->setPropertyValue(rName, Any(aDT)); } + else if (type == cppu::UnoType<uno::Reference<util::XComplexColor>>::get()) + { + auto xComplexColor = any.get<uno::Reference<util::XComplexColor>>(); + auto aComplexColor = model::color::getFromXComplexColor(xComplexColor); + xPropSet->setPropertyValue(rName, + Any(model::color::createXComplexColor(aComplexColor))); + } else { std::cout << "Unknown type:\n" |