From a87412a599b0f87bf2cbf0f02f539b3529a08940 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Wed, 29 Oct 2014 23:21:41 -0400 Subject: Remove indirection... Change-Id: Ia01ed40391a4d5725a9f9e22817406216020c0d2 --- svx/source/svdraw/sdrpagewindow.cxx | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) (limited to 'svx/source') diff --git a/svx/source/svdraw/sdrpagewindow.cxx b/svx/source/svdraw/sdrpagewindow.cxx index ca15df072de5..5fa995a105e3 100644 --- a/svx/source/svdraw/sdrpagewindow.cxx +++ b/svx/source/svdraw/sdrpagewindow.cxx @@ -44,18 +44,18 @@ using namespace ::com::sun::star; struct SdrPageWindow::Impl { // #110094# ObjectContact section - sdr::contact::ObjectContact* mpObjectContact; + mutable sdr::contact::ObjectContactOfPageView* mpObjectContact; // the SdrPageView this window belongs to - SdrPageView& mrPageView; + SdrPageView& mrPageView; // the PaintWindow to paint on. Here is access to OutDev etc. // #i72752# change to pointer to allow patcing it in DrawLayer() if necessary - SdrPaintWindow* mpPaintWindow; - SdrPaintWindow* mpOriginalPaintWindow; + SdrPaintWindow* mpPaintWindow; + SdrPaintWindow* mpOriginalPaintWindow; // UNO stuff for xControls - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer > mxControlContainer; + uno::Reference mxControlContainer; Impl( SdrPageView& rPageView, SdrPaintWindow& rPaintWindow ) : mpObjectContact(NULL), @@ -155,12 +155,6 @@ SdrPageWindow::~SdrPageWindow() delete mpImpl; } -// ObjectContact section -sdr::contact::ObjectContact* SdrPageWindow::CreateViewSpecificObjectContact() -{ - return new sdr::contact::ObjectContactOfPageView(*this); -} - SdrPageView& SdrPageWindow::GetPageView() const { return mpImpl->mrPageView; @@ -448,9 +442,7 @@ void SdrPageWindow::InvalidatePageWindow(const basegfx::B2DRange& rRange) const sdr::contact::ObjectContact& SdrPageWindow::GetObjectContact() const { if (!mpImpl->mpObjectContact) - { - ((SdrPageWindow*)this)->mpImpl->mpObjectContact = ((SdrPageWindow*)this)->CreateViewSpecificObjectContact(); - } + mpImpl->mpObjectContact = new sdr::contact::ObjectContactOfPageView(const_cast(*this)); return *mpImpl->mpObjectContact; } @@ -458,7 +450,7 @@ const sdr::contact::ObjectContact& SdrPageWindow::GetObjectContact() const sdr::contact::ObjectContact& SdrPageWindow::GetObjectContact() { if (!mpImpl->mpObjectContact) - mpImpl->mpObjectContact = CreateViewSpecificObjectContact(); + mpImpl->mpObjectContact = new sdr::contact::ObjectContactOfPageView(*this); return *mpImpl->mpObjectContact; } -- cgit