19#include <com/sun/star/text/XTextRange.hpp>
20#include <com/sun/star/container/XEnumerationAccess.hpp>
21#include <com/sun/star/container/XEnumeration.hpp>
22#include <com/sun/star/beans/XPropertySet.hpp>
23#include <com/sun/star/util/XComplexColor.hpp>
35 const uno::Reference<beans::XPropertySet>& xPortion)
42 uno::Reference<util::XComplexColor> xComplexColor;
44 if (!xComplexColor.is())
58 const uno::Reference<beans::XPropertySet>& xShape)
63 uno::Reference<util::XComplexColor> xComplexColor;
65 if (!xComplexColor.is())
79 const uno::Reference<beans::XPropertySet>& xShape)
84 uno::Reference<util::XComplexColor> xComplexColor;
86 if (!xComplexColor.is())
103 uno::Reference<drawing::XShape> xShape =
pObject->getUnoShape();
104 uno::Reference<text::XTextRange> xShapeText(xShape, uno::UNO_QUERY);
108 uno::Reference<container::XEnumerationAccess> xText(xShapeText->getText(), uno::UNO_QUERY);
109 uno::Reference<container::XEnumeration> xParagraphs = xText->createEnumeration();
110 while (xParagraphs->hasMoreElements())
112 uno::Reference<container::XEnumerationAccess> xParagraph(xParagraphs->nextElement(),
114 uno::Reference<container::XEnumeration> xPortions = xParagraph->createEnumeration();
115 while (xPortions->hasMoreElements())
117 uno::Reference<beans::XPropertySet> xPortion(xPortions->nextElement(),
119 updateTextPortionColorSet(rColorSet, xPortion);
124 uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
125 updateFillColorSet(rColorSet, xShapeProps);
126 updateLineColorSet(rColorSet, xShapeProps);
SdrObject * GetObj(size_t nNum) const
size_t GetObjCount() const
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
Color resolveColor(model::ComplexColor const &rComplexColor) const
virtual ~ThemeColorChanger() override
ThemeColorChanger(SdrPage *pPage)
void apply(std::shared_ptr< model::ColorSet > const &pColorSet) override
EmbeddedObjectRef * pObject
model::ComplexColor getFromXComplexColor(uno::Reference< util::XComplexColor > const &rxColor)
void updateSdrObject(model::ColorSet const &rColorSet, SdrObject *pObject)
Updates properties of the SdrObject.
constexpr OUStringLiteral UNO_NAME_FILLCOLOR
constexpr OUStringLiteral UNO_NAME_LINE_COMPLEX_COLOR
constexpr OUStringLiteral UNO_NAME_EDIT_CHAR_COMPLEX_COLOR
constexpr OUStringLiteral UNO_NAME_EDIT_CHAR_COLOR
constexpr OUStringLiteral UNO_NAME_LINECOLOR
constexpr OUStringLiteral UNO_NAME_FILL_COMPLEX_COLOR