diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-03-02 11:14:20 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-03-02 11:38:17 +0900 |
commit | 2098f14ad3bd3637979aad66f5a66d6f10702a02 (patch) | |
tree | c3737ea421d96223f354ef2fa637891a00794307 /svx/source | |
parent | ec4fce4b23baeb899a8fc1ddf5e1ef5866bf6746 (diff) |
cleanup tableBorderHdl::CreateB2dIAObject
Change-Id: I1cdcf23fd64c3a445a3c8dddea8684013113a04e
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/table/tablehandles.cxx | 58 |
1 files changed, 26 insertions, 32 deletions
diff --git a/svx/source/table/tablehandles.cxx b/svx/source/table/tablehandles.cxx index 4eac136b287a..761fb57667c1 100644 --- a/svx/source/table/tablehandles.cxx +++ b/svx/source/table/tablehandles.cxx @@ -265,45 +265,40 @@ void TableBorderHdl::CreateB2dIAObject() { GetRidOfIAObject(); - if(pHdlList && pHdlList->GetView() && !pHdlList->GetView()->areMarkHandlesHidden()) + if (pHdlList && pHdlList->GetView() && !pHdlList->GetView()->areMarkHandlesHidden()) { SdrMarkView* pView = pHdlList->GetView(); SdrPageView* pPageView = pView->GetSdrPageView(); - if(pPageView) + if (!pPageView) + return; + + for(sal_uInt32 nWindow = 0; nWindow < pPageView->PageWindowCount(); nWindow++) { - for(sal_uInt32 nWindow = 0; nWindow < pPageView->PageWindowCount(); nWindow++) + const SdrPageWindow& rPageWindow = *pPageView->GetPageWindow(nWindow); + + if (rPageWindow.GetPaintWindow().OutputToWindow()) { - const SdrPageWindow& rPageWindow = *pPageView->GetPageWindow(nWindow); + rtl::Reference<sdr::overlay::OverlayManager> xManager = rPageWindow.GetOverlayManager(); - if(rPageWindow.GetPaintWindow().OutputToWindow()) + if (xManager.is()) { - rtl::Reference< ::sdr::overlay::OverlayManager > xManager = rPageWindow.GetOverlayManager(); - if (xManager.is()) - { - const basegfx::B2DRange aRange(vcl::unotools::b2DRectangleFromRectangle(maRectangle)); - const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer; - const Color aHilightColor(aSvtOptionsDrawinglayer.getHilightColor()); - const double fTransparence(aSvtOptionsDrawinglayer.GetTransparentSelectionPercent() * 0.01); - - sdr::overlay::OverlayObject* pOverlayObject = new sdr::overlay::OverlayRectangle( - aRange.getMinimum(), - aRange.getMaximum(), - aHilightColor, - fTransparence, - 6.0, - 0.0, - 0.0, - 500, - // make animation dependent from text edit active, because for tables - // this handle is also used when text edit *is* active for it. This - // interferes too much concerning repaint stuff (at least as long as - // text edit is not yet on the overlay) - getAnimate()); - - xManager->add(*pOverlayObject); - maOverlayGroup.append(*pOverlayObject); - } + const basegfx::B2DRange aRange(vcl::unotools::b2DRectangleFromRectangle(maRectangle)); + const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer; + const Color aHilightColor(aSvtOptionsDrawinglayer.getHilightColor()); + const double fTransparence(aSvtOptionsDrawinglayer.GetTransparentSelectionPercent() * 0.01); + // make animation dependent from text edit active, because for tables + // this handle is also used when text edit *is* active for it. This + // interferes too much concerning repaint stuff (at least as long as + // text edit is not yet on the overlay) + const bool bAnimate = getAnimate(); + + sdr::overlay::OverlayObject* pOverlayObject = + new sdr::overlay::OverlayRectangle(aRange.getMinimum(), aRange.getMaximum(), + aHilightColor, fTransparence, + 6.0, 0.0, 0.0, 500, bAnimate); + xManager->add(*pOverlayObject); + maOverlayGroup.append(*pOverlayObject); } } } @@ -311,7 +306,6 @@ void TableBorderHdl::CreateB2dIAObject() } - } // end of namespace table } // end of namespace sdr |