diff options
Diffstat (limited to 'reportdesign/source/ui/report/FixedTextColor.cxx')
-rw-r--r-- | reportdesign/source/ui/report/FixedTextColor.cxx | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/reportdesign/source/ui/report/FixedTextColor.cxx b/reportdesign/source/ui/report/FixedTextColor.cxx index 800669bbcd9f..05ccf2f84856 100644 --- a/reportdesign/source/ui/report/FixedTextColor.cxx +++ b/reportdesign/source/ui/report/FixedTextColor.cxx @@ -158,29 +158,29 @@ namespace rptui uno::Reference<awt::XControl> xControl; OReportController *pController = const_cast<OReportController *>(&m_rReportController); - ::boost::shared_ptr<OReportModel> pModel = pController->getSdrModel(); + std::shared_ptr<OReportModel> pModel = pController->getSdrModel(); - uno::Reference<report::XSection> xSection(_xFixedText->getSection()); - if ( xSection.is() ) + uno::Reference<report::XSection> xSection(_xFixedText->getSection()); + if ( xSection.is() ) + { + OReportPage *pPage = pModel->getPage(xSection); + const size_t nIndex = pPage->getIndexOf(_xFixedText.get()); + if (nIndex < pPage->GetObjCount() ) { - OReportPage *pPage = pModel->getPage(xSection); - const size_t nIndex = pPage->getIndexOf(_xFixedText.get()); - if (nIndex < pPage->GetObjCount() ) + SdrObject *pObject = pPage->GetObj(nIndex); + OUnoObject* pUnoObj = dynamic_cast<OUnoObject*>(pObject); + if ( pUnoObj ) // this doesn't need to be done for shapes { - SdrObject *pObject = pPage->GetObj(nIndex); - OUnoObject* pUnoObj = dynamic_cast<OUnoObject*>(pObject); - if ( pUnoObj ) // this doesn't need to be done for shapes + OSectionWindow* pSectionWindow = pController->getSectionWindow(xSection); + if (pSectionWindow != 0) { - OSectionWindow* pSectionWindow = pController->getSectionWindow(xSection); - if (pSectionWindow != 0) - { - OReportSection& aOutputDevice = pSectionWindow->getReportSection(); // OutputDevice - OSectionView& aSdrView = aOutputDevice.getSectionView(); // SdrView - xControl = pUnoObj->GetUnoControl(aSdrView, aOutputDevice); - } + OReportSection& aOutputDevice = pSectionWindow->getReportSection(); // OutputDevice + OSectionView& aSdrView = aOutputDevice.getSectionView(); // SdrView + xControl = pUnoObj->GetUnoControl(aSdrView, aOutputDevice); } } } + } return xControl; } |