change ComplexColor to show more useful properties

Change-Id: Ie19f080f2faf388f9b8ba3e9a4b3c0926d5ebdd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151674
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
This commit is contained in:
Tomaž Vajngerl 2023-05-11 23:01:10 +09:00 committed by Tomaž Vajngerl
parent 1df0565fb9
commit ca3bfa9bde
3 changed files with 20 additions and 6 deletions

View file

@ -13,7 +13,14 @@
using namespace css;
css::util::Color UnoComplexColor::getColor() { return css::util::Color(maColor.getRGBColor()); }
sal_Int32 UnoComplexColor::getType() { return sal_Int32(maColor.getType()); }
sal_Int32 UnoComplexColor::getSchemeColorType() { return sal_Int32(maColor.getSchemeType()); }
util::Color UnoComplexColor::resolveColor(uno::Reference<util::XTheme> const& /*xTheme*/)
{
return util::Color(maColor.getRGBColor());
}
namespace model::color
{
@ -22,8 +29,7 @@ uno::Reference<util::XComplexColor> createXComplexColor(model::ComplexColor cons
return new UnoComplexColor(rColor);
}
model::ComplexColor
getFromXComplexColor(css::uno::Reference<css::util::XComplexColor> const& rxColor)
model::ComplexColor getFromXComplexColor(uno::Reference<util::XComplexColor> const& rxColor)
{
model::ComplexColor aComplexColor;
UnoComplexColor const* pUnoComplexColor = static_cast<UnoComplexColor const*>(rxColor.get());

View file

@ -36,7 +36,10 @@ public:
model::ComplexColor const& getComplexColor() const { return maColor; }
// XComplexColor
css::util::Color SAL_CALL getColor() override;
sal_Int32 SAL_CALL getType() override;
sal_Int32 SAL_CALL getSchemeColorType() override;
css::util::Color SAL_CALL
resolveColor(css::uno::Reference<css::util::XTheme> const& xTheme) override;
};
namespace model::color

View file

@ -17,8 +17,13 @@ module com { module sun { module star { module util {
*/
interface XComplexColor
{
/** */
Color getColor();
long getType();
long getSchemeColorType();
/** resolve the color */
Color resolveColor([in] com::sun::star::util::XTheme xTheme);
};
}; }; }; };