a ImplEncirclementOverlay is never constructed
This commit is contained in:
@@ -133,9 +133,6 @@ class SVX_DLLPUBLIC SdrPaintView : public SfxListener, public SfxRepeatTarget, p
|
|||||||
friend class SdrGrafObj;
|
friend class SdrGrafObj;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// #114409#-2 Migrate Encirclement
|
|
||||||
class ImplEncirclementOverlay* mpEncirclementOverlay;
|
|
||||||
|
|
||||||
SdrModel* pMod;
|
SdrModel* pMod;
|
||||||
#ifdef DBG_UTIL
|
#ifdef DBG_UTIL
|
||||||
SdrItemBrowser* pItemBrowser;
|
SdrItemBrowser* pItemBrowser;
|
||||||
@@ -293,8 +290,6 @@ public:
|
|||||||
TYPEINFO();
|
TYPEINFO();
|
||||||
|
|
||||||
virtual void ClearPageView();
|
virtual void ClearPageView();
|
||||||
// virtual void ClearAll();
|
|
||||||
// virtual void Clear(); // PageViews loeschen, Markierungen weg, ...
|
|
||||||
SdrModel* GetModel() const { return pMod; }
|
SdrModel* GetModel() const { return pMod; }
|
||||||
|
|
||||||
virtual sal_Bool IsAction() const;
|
virtual sal_Bool IsAction() const;
|
||||||
@@ -487,9 +482,6 @@ public:
|
|||||||
// werden soll. Wird NULL uebergeben, wird es in allen an der View
|
// werden soll. Wird NULL uebergeben, wird es in allen an der View
|
||||||
// angemeldeten OutputDevices gleichzeitig dargestellt.
|
// angemeldeten OutputDevices gleichzeitig dargestellt.
|
||||||
void MovEncirclement(const Point& rPnt);
|
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
|
// use this mode as mode to draw all internal GraphicManager objects with
|
||||||
sal_uIntPtr GetGraphicManagerDrawMode() const { return nGraphicManagerDrawMode; }
|
sal_uIntPtr GetGraphicManagerDrawMode() const { return nGraphicManagerDrawMode; }
|
||||||
|
@@ -83,63 +83,6 @@
|
|||||||
using namespace ::rtl;
|
using namespace ::rtl;
|
||||||
using namespace ::com::sun::star;
|
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
|
// interface to SdrPaintWindow
|
||||||
|
|
||||||
@@ -260,12 +203,10 @@ void SdrPaintView::ImpClearVars()
|
|||||||
aNam.ToUpperAscii();
|
aNam.ToUpperAscii();
|
||||||
|
|
||||||
maGridColor = Color( COL_BLACK );
|
maGridColor = Color( COL_BLACK );
|
||||||
BrkEncirclement();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SdrPaintView::SdrPaintView(SdrModel* pModel1, OutputDevice* pOut)
|
SdrPaintView::SdrPaintView(SdrModel* pModel1, OutputDevice* pOut)
|
||||||
: mpEncirclementOverlay(0L),
|
: mpPageView(0L),
|
||||||
mpPageView(0L),
|
|
||||||
aDefaultAttr(pModel1->GetItemPool()),
|
aDefaultAttr(pModel1->GetItemPool()),
|
||||||
mbBufferedOutputAllowed(false),
|
mbBufferedOutputAllowed(false),
|
||||||
mbBufferedOverlayAllowed(false),
|
mbBufferedOverlayAllowed(false),
|
||||||
@@ -313,8 +254,6 @@ SdrPaintView::~SdrPaintView()
|
|||||||
delete maPaintWindows.back();
|
delete maPaintWindows.back();
|
||||||
maPaintWindows.pop_back();
|
maPaintWindows.pop_back();
|
||||||
}
|
}
|
||||||
|
|
||||||
BrkEncirclement();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -408,41 +347,27 @@ void SdrPaintView::ModelHasChanged()
|
|||||||
|
|
||||||
sal_Bool SdrPaintView::IsAction() const
|
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()
|
void SdrPaintView::EndAction()
|
||||||
{
|
{
|
||||||
if(IsEncirclement())
|
|
||||||
{
|
|
||||||
EndEncirclement();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SdrPaintView::BckAction()
|
void SdrPaintView::BckAction()
|
||||||
{
|
{
|
||||||
BrkEncirclement();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SdrPaintView::BrkAction()
|
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)
|
void SdrPaintView::MovEncirclement(const Point&)
|
||||||
{
|
{
|
||||||
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)
|
|
||||||
{
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@@ -169,7 +169,6 @@ ImpSvtData::~ImpSvtData()
|
|||||||
ImplBorderWindow::ImplBorderWindow(Window*, long, unsigned short, com::sun::star::uno::Any const&)
|
ImplBorderWindow::ImplBorderWindow(Window*, long, unsigned short, com::sun::star::uno::Any const&)
|
||||||
ImplBorderWindow::SetHelpButton(unsigned char)
|
ImplBorderWindow::SetHelpButton(unsigned char)
|
||||||
ImplDevFontList::ImplFindByLocale(com::sun::star::lang::Locale&) const
|
ImplDevFontList::ImplFindByLocale(com::sun::star::lang::Locale&) const
|
||||||
ImplEncirclementOverlay::ImplEncirclementOverlay(SdrPaintView const&, basegfx::B2DPoint const&)
|
|
||||||
ImplEntryList::IsEntrySelected(String const&) const
|
ImplEntryList::IsEntrySelected(String const&) const
|
||||||
ImplImageList::GetImageCount() const
|
ImplImageList::GetImageCount() const
|
||||||
ImplListBox::GetEntryFlags(unsigned short) const
|
ImplListBox::GetEntryFlags(unsigned short) const
|
||||||
|
Reference in New Issue
Block a user