diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-11-21 10:10:54 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-21 10:12:35 +0000 |
commit | 18c1d56353838a393de5d75da65cc68e17d78492 (patch) | |
tree | 243a90b356e5eb349443ada74f8a9f08b287c9d7 /svx | |
parent | d1916dfdb3d9b264c97415c03e7c4eb358dd9cd5 (diff) |
a ImplEncirclementOverlay is never constructed
Diffstat (limited to 'svx')
-rw-r--r-- | svx/inc/svx/svdpntv.hxx | 8 | ||||
-rw-r--r-- | svx/source/svdraw/svdpntv.cxx | 126 |
2 files changed, 5 insertions, 129 deletions
diff --git a/svx/inc/svx/svdpntv.hxx b/svx/inc/svx/svdpntv.hxx index c099d83aedd4..927f96ca9e1e 100644 --- a/svx/inc/svx/svdpntv.hxx +++ b/svx/inc/svx/svdpntv.hxx @@ -133,9 +133,6 @@ class SVX_DLLPUBLIC SdrPaintView : public SfxListener, public SfxRepeatTarget, p friend class SdrGrafObj; protected: - // #114409#-2 Migrate Encirclement - class ImplEncirclementOverlay* mpEncirclementOverlay; - SdrModel* pMod; #ifdef DBG_UTIL SdrItemBrowser* pItemBrowser; @@ -293,8 +290,6 @@ public: TYPEINFO(); virtual void ClearPageView(); -// virtual void ClearAll(); -// virtual void Clear(); // PageViews loeschen, Markierungen weg, ... SdrModel* GetModel() const { return pMod; } virtual sal_Bool IsAction() const; @@ -487,9 +482,6 @@ public: // werden soll. Wird NULL uebergeben, wird es in allen an der View // angemeldeten OutputDevices gleichzeitig dargestellt. void MovEncirclement(const Point& rPnt); - Rectangle EndEncirclement(sal_Bool bNoJustify = sal_False); - void BrkEncirclement(); - sal_Bool IsEncirclement() const { return (0L != mpEncirclementOverlay); } // use this mode as mode to draw all internal GraphicManager objects with sal_uIntPtr GetGraphicManagerDrawMode() const { return nGraphicManagerDrawMode; } diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index dd6f70096967..4e669395fb40 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -84,63 +84,6 @@ using namespace ::rtl; using namespace ::com::sun::star; //////////////////////////////////////////////////////////////////////////////////////////////////// -class ImplEncirclementOverlay -{ - // The OverlayObjects - ::sdr::overlay::OverlayObjectList maObjects; - - // The remembered second position in logical coodinates - basegfx::B2DPoint maSecondPosition; - -public: - ImplEncirclementOverlay(const SdrPaintView& rView, const basegfx::B2DPoint& rStartPos); - ~ImplEncirclementOverlay(); - - void SetSecondPosition(const basegfx::B2DPoint& rNewPosition); -}; - -ImplEncirclementOverlay::ImplEncirclementOverlay(const SdrPaintView& rView, const basegfx::B2DPoint& rStartPos) -: maSecondPosition(rStartPos) -{ - for(sal_uInt32 a(0L); a < rView.PaintWindowCount(); a++) - { - SdrPaintWindow* pCandidate = rView.GetPaintWindow(a); - ::sdr::overlay::OverlayManager* pTargetOverlay = pCandidate->GetOverlayManager(); - - if(pTargetOverlay) - { - ::sdr::overlay::OverlayRollingRectangleStriped* aNew = new ::sdr::overlay::OverlayRollingRectangleStriped( - rStartPos, rStartPos, false); - pTargetOverlay->add(*aNew); - maObjects.append(*aNew); - } - } -} - -ImplEncirclementOverlay::~ImplEncirclementOverlay() -{ - // The OverlayObjects are cleared using the destructor of OverlayObjectList. - // That destructor calls clear() at the list which removes all objects from the - // OverlayManager and deletes them. -} - -void ImplEncirclementOverlay::SetSecondPosition(const basegfx::B2DPoint& rNewPosition) -{ - if(rNewPosition != maSecondPosition) - { - // apply to OverlayObjects - for(sal_uInt32 a(0L); a < maObjects.count(); a++) - { - ::sdr::overlay::OverlayRollingRectangleStriped& rCandidate = (::sdr::overlay::OverlayRollingRectangleStriped&)maObjects.getOverlayObject(a); - rCandidate.setSecondPosition(rNewPosition); - } - - // remember new position - maSecondPosition = rNewPosition; - } -} - -//////////////////////////////////////////////////////////////////////////////////////////////////// // interface to SdrPaintWindow SdrPaintWindow* SdrPaintView::FindPaintWindow(const OutputDevice& rOut) const @@ -260,12 +203,10 @@ void SdrPaintView::ImpClearVars() aNam.ToUpperAscii(); maGridColor = Color( COL_BLACK ); - BrkEncirclement(); } SdrPaintView::SdrPaintView(SdrModel* pModel1, OutputDevice* pOut) -: mpEncirclementOverlay(0L), - mpPageView(0L), +: mpPageView(0L), aDefaultAttr(pModel1->GetItemPool()), mbBufferedOutputAllowed(false), mbBufferedOverlayAllowed(false), @@ -313,8 +254,6 @@ SdrPaintView::~SdrPaintView() delete maPaintWindows.back(); maPaintWindows.pop_back(); } - - BrkEncirclement(); } //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -408,41 +347,27 @@ void SdrPaintView::ModelHasChanged() sal_Bool SdrPaintView::IsAction() const { - return IsEncirclement(); + return false; } -void SdrPaintView::MovAction(const Point& rPnt) +void SdrPaintView::MovAction(const Point&) { - if (IsEncirclement()) - { - MovEncirclement(rPnt); - } } void SdrPaintView::EndAction() { - if(IsEncirclement()) - { - EndEncirclement(); - } } void SdrPaintView::BckAction() { - BrkEncirclement(); } void SdrPaintView::BrkAction() { - BrkEncirclement(); } -void SdrPaintView::TakeActionRect(Rectangle& rRect) const +void SdrPaintView::TakeActionRect(Rectangle&) const { - if(IsEncirclement()) - { - rRect = Rectangle(aDragStat.GetStart(),aDragStat.GetNow()); - } } //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -504,49 +429,8 @@ void SdrPaintView::SetActualWin(const OutputDevice* pWin) //////////////////////////////////////////////////////////////////////////////////////////////////// -void SdrPaintView::MovEncirclement(const Point& rPnt) -{ - if(IsEncirclement() && aDragStat.CheckMinMoved(rPnt)) - { - aDragStat.NextMove(rPnt); - - DBG_ASSERT(mpEncirclementOverlay, "SdrSnapView::MovSetPageOrg: no ImplPageOriginOverlay (!)"); - basegfx::B2DPoint aNewPos(rPnt.X(), rPnt.Y()); - mpEncirclementOverlay->SetSecondPosition(aNewPos); - } -} - -Rectangle SdrPaintView::EndEncirclement(sal_Bool bNoJustify) +void SdrPaintView::MovEncirclement(const Point&) { - Rectangle aRetval; - - if(IsEncirclement()) - { - if(aDragStat.IsMinMoved()) - { - aRetval = Rectangle(aDragStat.GetStart(), aDragStat.GetNow()); - - if(!bNoJustify) - { - aRetval.Justify(); - } - } - - // cleanup - BrkEncirclement(); - } - - return aRetval; -} - -void SdrPaintView::BrkEncirclement() -{ - if(IsEncirclement()) - { - DBG_ASSERT(mpEncirclementOverlay, "SdrSnapView::MovSetPageOrg: no ImplPageOriginOverlay (!)"); - delete mpEncirclementOverlay; - mpEncirclementOverlay = 0L; - } } //////////////////////////////////////////////////////////////////////////////////////////////////// |