22#include <com/sun/star/report/XFixedText.hpp>
23#include <com/sun/star/awt/XVclWindowPeer.hpp>
46 :m_rReportController(_aController)
58 uno::Reference< report::XFixedText > xFixedText( _rEvent.Source, uno::UNO_QUERY );
59 if ( ! xFixedText.is() )
66 uno::Reference< lang::XComponent > xComponent( xFixedText, uno::UNO_QUERY_THROW );
69 catch (uno::Exception
const&)
90 uno::Reference< report::XFixedText > xFixedText( _rxElement, uno::UNO_QUERY );
91 if ( ! xFixedText.is() )
102 uno::Reference <report::XSection> xSection(xFixedText->getParent(), uno::UNO_QUERY_THROW);
104 bool bSectionBackColorIsTransparent = xSection->getBackTransparent();
105 if (bSectionBackColorIsTransparent)
110 bIsDark = aWindowColor.
IsDark();
114 css::util::Color aColor2 = xSection->getBackColor();
116 bIsDark = aBackColor.
IsDark();
121 Color aLabelBackColor(nBackColor);
122 bIsDark = aLabelBackColor.
IsDark();
125 uno::Reference<awt::XVclWindowPeer> xVclWindowPeer =
getVclWindowPeer(xFixedText);
134 util::Color aLabelColor = xFixedText->getCharColor();
139 catch(
const uno::Exception& )
150 uno::Reference<awt::XControl> xControl;
153 std::shared_ptr<OReportModel> pModel = pController->
getSdrModel();
155 uno::Reference<report::XSection> xSection(_xFixedText->getSection());
160 if (nIndex < pPage->GetObjCount() )
167 if (pSectionWindow !=
nullptr)
182 uno::Reference<awt::XVclWindowPeer> xVclWindowPeer;
183 uno::Reference<awt::XControl> xControl =
getXControl(_xComponent);
185 xVclWindowPeer.set( xControl->getPeer(), uno::UNO_QUERY);
187 return xVclWindowPeer;
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
SdrObject * GetObj(size_t nNum) const
css::uno::Reference< css::awt::XControl > GetUnoControl(const SdrView &_rView, const OutputDevice &_rOut) const
const Color & GetWindowColor() const
const Color & GetLabelTextColor() const
void notifyPropertyChange(const css::beans::PropertyChangeEvent &_rEvent) override
const OReportController & m_rReportController
void notifyElementInserted(const css::uno::Reference< css::uno::XInterface > &_rxElement) override
static void setPropertyTextColor(const css::uno::Reference< css::awt::XVclWindowPeer > &_xVclWindowPeer, Color _nFormatKey)
css::uno::Reference< css::awt::XVclWindowPeer > getVclWindowPeer(const css::uno::Reference< css::report::XFixedText > &_xComponent)
void handle(const css::uno::Reference< css::uno::XInterface > &_rxElement) override
css::uno::Reference< css::awt::XControl > getXControl(const css::uno::Reference< css::report::XFixedText > &_xFixedText)
virtual ~FixedTextColor() override
FixedTextColor(const OReportController &_aObserver)
OSectionWindow * getSectionWindow(const css::uno::Reference< css::report::XSection > &_xSection) const
const std::shared_ptr< rptui::OReportModel > & getSdrModel() const
return the SdrModel of the real model
size_t getIndexOf(const css::uno::Reference< css::report::XReportComponent > &_xObject)
returns the index inside the object list which belongs to the report component.
OSectionView & getSectionView() const
OReportSection & getReportSection()
::OutputDevice const * GetOutDev() const
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
#define DBG_UNHANDLED_EXCEPTION(...)
EmbeddedObjectRef * pObject
constexpr OUStringLiteral PROPERTY_TEXTCOLOR