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:
parent
1df0565fb9
commit
ca3bfa9bde
3 changed files with 20 additions and 6 deletions
|
@ -13,7 +13,14 @@
|
||||||
|
|
||||||
using namespace css;
|
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
|
namespace model::color
|
||||||
{
|
{
|
||||||
|
@ -22,8 +29,7 @@ uno::Reference<util::XComplexColor> createXComplexColor(model::ComplexColor cons
|
||||||
return new UnoComplexColor(rColor);
|
return new UnoComplexColor(rColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
model::ComplexColor
|
model::ComplexColor getFromXComplexColor(uno::Reference<util::XComplexColor> const& rxColor)
|
||||||
getFromXComplexColor(css::uno::Reference<css::util::XComplexColor> const& rxColor)
|
|
||||||
{
|
{
|
||||||
model::ComplexColor aComplexColor;
|
model::ComplexColor aComplexColor;
|
||||||
UnoComplexColor const* pUnoComplexColor = static_cast<UnoComplexColor const*>(rxColor.get());
|
UnoComplexColor const* pUnoComplexColor = static_cast<UnoComplexColor const*>(rxColor.get());
|
||||||
|
|
|
@ -36,7 +36,10 @@ public:
|
||||||
model::ComplexColor const& getComplexColor() const { return maColor; }
|
model::ComplexColor const& getComplexColor() const { return maColor; }
|
||||||
|
|
||||||
// XComplexColor
|
// 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
|
namespace model::color
|
||||||
|
|
|
@ -17,8 +17,13 @@ module com { module sun { module star { module util {
|
||||||
*/
|
*/
|
||||||
interface XComplexColor
|
interface XComplexColor
|
||||||
{
|
{
|
||||||
/** */
|
long getType();
|
||||||
Color getColor();
|
|
||||||
|
long getSchemeColorType();
|
||||||
|
|
||||||
|
/** resolve the color */
|
||||||
|
Color resolveColor([in] com::sun::star::util::XTheme xTheme);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}; }; }; };
|
}; }; }; };
|
||||||
|
|
Loading…
Reference in a new issue