summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/svx/fmview.hxx4
-rw-r--r--include/svx/svdedxv.hxx4
-rw-r--r--include/svx/svdpntv.hxx6
-rw-r--r--sc/source/ui/view/tabview5.cxx6
-rw-r--r--sd/source/ui/inc/OutlineView.hxx4
-rw-r--r--sd/source/ui/slideshow/showwin.cxx4
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx6
-rw-r--r--sd/source/ui/view/outlview.cxx14
-rw-r--r--sd/source/ui/view/sdview.cxx2
-rw-r--r--svx/source/form/fmview.cxx15
-rw-r--r--svx/source/svdraw/svdedxv.cxx18
-rw-r--r--svx/source/svdraw/svdpntv.cxx12
-rw-r--r--sw/source/core/view/viewsh.cxx6
13 files changed, 48 insertions, 53 deletions
diff --git a/include/svx/fmview.hxx b/include/svx/fmview.hxx
index 2c2b26f20f41..a1a08de5e56b 100644
--- a/include/svx/fmview.hxx
+++ b/include/svx/fmview.hxx
@@ -82,8 +82,8 @@ public:
rtl::Reference<SdrObject> CreateXFormsControl( const svx::OXFormsDescriptor &_rDesc );
virtual void MarkListHasChanged() override;
- virtual void AddWindowToPaintView(OutputDevice* pNewWin, vcl::Window* pWindow) override;
- virtual void DeleteWindowFromPaintView(OutputDevice* pOldWin) override;
+ virtual void AddDeviceToPaintView(OutputDevice& rNewDev, vcl::Window* pWindow) override;
+ virtual void DeleteDeviceFromPaintView(OutputDevice& rOldDev) override;
static void createControlLabelPair(
OutputDevice const * _pOutDev,
diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx
index e22670ac88cd..d5901fbb7125 100644
--- a/include/svx/svdedxv.hxx
+++ b/include/svx/svdedxv.hxx
@@ -275,8 +275,8 @@ public:
void SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr);
// Intern: at mounting new OutlinerView...
- virtual void AddWindowToPaintView(OutputDevice* pNewWin, vcl::Window* pWindow) override;
- virtual void DeleteWindowFromPaintView(OutputDevice* pOldWin) override;
+ virtual void AddDeviceToPaintView(OutputDevice& rNewDev, vcl::Window* pWindow) override;
+ virtual void DeleteDeviceFromPaintView(OutputDevice& rOldWin) override;
sal_uInt16 GetSelectionLevel() const;
diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx
index 46a174e08e1d..7e49d959232b 100644
--- a/include/svx/svdpntv.hxx
+++ b/include/svx/svdpntv.hxx
@@ -299,9 +299,9 @@ public:
// Iterate over all registered PageViews
SdrPageView* GetSdrPageView() const { return mpPageView.get(); }
- // A SdrView can be displayed on multiple Windows at the same time
- virtual void AddWindowToPaintView(OutputDevice* pNewWin, vcl::Window* pWindow);
- virtual void DeleteWindowFromPaintView(OutputDevice* pOldWin);
+ // A SdrView can be output to multiple devices at the same time
+ virtual void AddDeviceToPaintView(OutputDevice& rNewDev, vcl::Window* pWindow);
+ virtual void DeleteDeviceFromPaintView(OutputDevice& rOldDev);
void SetLayerVisible(const OUString& rName, bool bShow);
bool IsLayerVisible(const OUString& rName) const;
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index 6b9dd1d616b4..dd3e057ada21 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -185,7 +185,7 @@ ScTabView::~ScTabView()
for (i=0; i<4; i++)
if (pGridWin[i])
{
- pDrawView->DeleteWindowFromPaintView(pGridWin[i]->GetOutDev());
+ pDrawView->DeleteDeviceFromPaintView(*pGridWin[i]->GetOutDev());
}
pDrawView->HideSdrPage();
@@ -238,7 +238,7 @@ void ScTabView::MakeDrawView( TriState nForceDesignMode )
if (pGridWin[i])
{
if ( SC_SPLIT_BOTTOMLEFT != static_cast<ScSplitPos>(i) )
- pDrawView->AddWindowToPaintView(pGridWin[i]->GetOutDev(), nullptr);
+ pDrawView->AddDeviceToPaintView(*pGridWin[i]->GetOutDev(), nullptr);
}
pDrawView->RecalcScale();
for (i=0; i<4; i++)
@@ -271,7 +271,7 @@ void ScTabView::DoAddWin( ScGridWindow* pWin )
{
if (pDrawView)
{
- pDrawView->AddWindowToPaintView(pWin->GetOutDev(), nullptr);
+ pDrawView->AddDeviceToPaintView(*pWin->GetOutDev(), nullptr);
pWin->DrawLayerCreated();
}
pWin->SetAutoSpellContext(mpSpellCheckCxt);
diff --git a/sd/source/ui/inc/OutlineView.hxx b/sd/source/ui/inc/OutlineView.hxx
index 058f6323a234..4fdfddf4a24b 100644
--- a/sd/source/ui/inc/OutlineView.hxx
+++ b/sd/source/ui/inc/OutlineView.hxx
@@ -75,8 +75,8 @@ public:
static SdrTextObj* CreateTitleTextObject(SdPage* pPage);
static SdrTextObj* CreateOutlineTextObject(SdPage* pPage);
- virtual void AddWindowToPaintView(OutputDevice* pWin, vcl::Window* pWindow) override;
- virtual void DeleteWindowFromPaintView(OutputDevice* pWin) override;
+ virtual void AddDeviceToPaintView(OutputDevice& rDev, vcl::Window* pWindow) override;
+ virtual void DeleteDeviceFromPaintView(OutputDevice& rDev) override;
OutlinerView* GetViewByWindow(vcl::Window const * pWin) const;
SdrOutliner& GetOutliner() { return mrOutliner; }
diff --git a/sd/source/ui/slideshow/showwin.cxx b/sd/source/ui/slideshow/showwin.cxx
index e793dec288c1..8e1f8a6d49cd 100644
--- a/sd/source/ui/slideshow/showwin.cxx
+++ b/sd/source/ui/slideshow/showwin.cxx
@@ -587,7 +587,7 @@ IMPL_LINK( ShowWindow, EventHdl, VclWindowEvent&, rEvent, void )
void ShowWindow::DeleteWindowFromPaintView()
{
if( mpViewShell->GetView() )
- mpViewShell->GetView()->DeleteWindowFromPaintView( GetOutDev() );
+ mpViewShell->GetView()->DeleteDeviceFromPaintView( *GetOutDev() );
sal_uInt16 nChild = GetChildCount();
while( nChild-- )
@@ -597,7 +597,7 @@ void ShowWindow::DeleteWindowFromPaintView()
void ShowWindow::AddWindowToPaintView()
{
if( mpViewShell->GetView() )
- mpViewShell->GetView()->AddWindowToPaintView( GetOutDev(), nullptr );
+ mpViewShell->GetView()->AddDeviceToPaintView( *GetOutDev(), nullptr );
sal_uInt16 nChild = GetChildCount();
while( nChild-- )
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 210a367b5007..aa815be59ffa 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -628,7 +628,7 @@ void SlideshowImpl::disposing(std::unique_lock<std::mutex>&)
// take DrawView from presentation window, but give the old window back
if( mpShowWindow && mpView )
- mpView->DeleteWindowFromPaintView( mpShowWindow->GetOutDev() );
+ mpView->DeleteDeviceFromPaintView( *mpShowWindow->GetOutDev() );
if( mpView )
mpView->SetAnimationPause( false );
@@ -781,7 +781,7 @@ bool SlideshowImpl::startPreview(
if( mpView )
{
- mpView->AddWindowToPaintView( mpShowWindow->GetOutDev(), nullptr );
+ mpView->AddDeviceToPaintView( *mpShowWindow->GetOutDev(), nullptr );
mpView->SetAnimationPause( true );
}
@@ -967,7 +967,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx const * pPresSettings )
if( mpView )
{
- mpView->AddWindowToPaintView( mpShowWindow->GetOutDev(), nullptr );
+ mpView->AddDeviceToPaintView( *mpShowWindow->GetOutDev(), nullptr );
mpView->SetAnimationPause( true );
}
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index c3b7a57ca81a..3c51ee76747b 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -194,7 +194,7 @@ void OutlineView::Paint(const ::tools::Rectangle& rRect, ::sd::Window const * pW
}
}
-void OutlineView::AddWindowToPaintView(OutputDevice* pWin, vcl::Window* pWindow)
+void OutlineView::AddDeviceToPaintView(OutputDevice& rDev, vcl::Window* pWindow)
{
bool bAdded = false;
bool bValidArea = false;
@@ -206,7 +206,7 @@ void OutlineView::AddWindowToPaintView(OutputDevice* pWin, vcl::Window* pWindow)
{
if (mpOutlinerViews[nView] == nullptr)
{
- mpOutlinerViews[nView].reset( new OutlinerView(&mrOutliner, dynamic_cast< ::sd::Window* >(pWin->GetOwnerWindow())) );
+ mpOutlinerViews[nView].reset( new OutlinerView(&mrOutliner, dynamic_cast< ::sd::Window* >(rDev.GetOwnerWindow())) );
mpOutlinerViews[nView]->SetBackgroundColor( aWhiteColor );
mrOutliner.InsertView(mpOutlinerViews[nView].get(), EE_APPEND);
bAdded = true;
@@ -226,12 +226,12 @@ void OutlineView::AddWindowToPaintView(OutputDevice* pWin, vcl::Window* pWindow)
}
// white background in Outliner
- pWin->SetBackground( Wallpaper( aWhiteColor ) );
+ rDev.SetBackground( Wallpaper( aWhiteColor ) );
- ::sd::View::AddWindowToPaintView(pWin, pWindow);
+ ::sd::View::AddDeviceToPaintView(rDev, pWindow);
}
-void OutlineView::DeleteWindowFromPaintView(OutputDevice* pWin)
+void OutlineView::DeleteDeviceFromPaintView(OutputDevice& rDev)
{
bool bRemoved = false;
sal_uInt16 nView = 0;
@@ -243,7 +243,7 @@ void OutlineView::DeleteWindowFromPaintView(OutputDevice* pWin)
{
pWindow = mpOutlinerViews[nView]->GetWindow();
- if (pWindow->GetOutDev() == pWin)
+ if (pWindow->GetOutDev() == &rDev)
{
mrOutliner.RemoveView( mpOutlinerViews[nView].get() );
mpOutlinerViews[nView].reset();
@@ -254,7 +254,7 @@ void OutlineView::DeleteWindowFromPaintView(OutputDevice* pWin)
nView++;
}
- ::sd::View::DeleteWindowFromPaintView(pWin);
+ ::sd::View::DeleteDeviceFromPaintView(rDev);
}
/**
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 3c5d190532fe..153284bdc414 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -161,7 +161,7 @@ View::~View()
while(PaintWindowCount())
{
// remove all registered OutDevs
- suppress_fun_call_w_exception(DeleteWindowFromPaintView(GetFirstOutputDevice()));
+ suppress_fun_call_w_exception(DeleteDeviceFromPaintView(*GetFirstOutputDevice()));
}
}
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx
index 40c86b72369b..d656464f1698 100644
--- a/svx/source/form/fmview.cxx
+++ b/svx/source/form/fmview.cxx
@@ -174,28 +174,25 @@ namespace
}
-void FmFormView::AddWindowToPaintView(OutputDevice* pNewWin, vcl::Window* pWindow)
+void FmFormView::AddDeviceToPaintView(OutputDevice& rNewDev, vcl::Window* pWindow)
{
- E3dView::AddWindowToPaintView(pNewWin, pWindow);
-
- if ( !pNewWin )
- return;
+ E3dView::AddDeviceToPaintView(rNewDev, pWindow);
// look up the PageViewWindow for the newly inserted window, and care for it
// #i39269# / 2004-12-20 / frank.schoenheit@sun.com
- const SdrPageWindow* pPageWindow = findPageWindow( this, pNewWin );
+ const SdrPageWindow* pPageWindow = findPageWindow( this, &rNewDev );
if ( pPageWindow )
pImpl->addWindow( *pPageWindow );
}
-void FmFormView::DeleteWindowFromPaintView(OutputDevice* pNewWin)
+void FmFormView::DeleteDeviceFromPaintView(OutputDevice& rNewDev)
{
- const SdrPageWindow* pPageWindow = findPageWindow( this, pNewWin );
+ const SdrPageWindow* pPageWindow = findPageWindow( this, &rNewDev );
if ( pPageWindow )
pImpl->removeWindow( pPageWindow->GetControlContainer() );
- E3dView::DeleteWindowFromPaintView(pNewWin);
+ E3dView::DeleteDeviceFromPaintView(rNewDev);
}
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 1a2ee50f2762..42be2aff97fb 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -2483,37 +2483,37 @@ void SdrObjEditView::SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveH
SdrGlueEditView::SetStyleSheet(pStyleSheet, bDontRemoveHardAttr);
}
-void SdrObjEditView::AddWindowToPaintView(OutputDevice* pNewWin, vcl::Window* pWindow)
+void SdrObjEditView::AddDeviceToPaintView(OutputDevice& rNewDev, vcl::Window* pWindow)
{
- SdrGlueEditView::AddWindowToPaintView(pNewWin, pWindow);
+ SdrGlueEditView::AddDeviceToPaintView(rNewDev, pWindow);
if (mxWeakTextEditObj.get() && !mbTextEditOnlyOneView
- && pNewWin->GetOutDevType() == OUTDEV_WINDOW)
+ && rNewDev.GetOutDevType() == OUTDEV_WINDOW)
{
- OutlinerView* pOutlView = ImpMakeOutlinerView(pNewWin->GetOwnerWindow(), nullptr);
+ OutlinerView* pOutlView = ImpMakeOutlinerView(rNewDev.GetOwnerWindow(), nullptr);
mpTextEditOutliner->InsertView(pOutlView);
}
}
-void SdrObjEditView::DeleteWindowFromPaintView(OutputDevice* pOldWin)
+void SdrObjEditView::DeleteDeviceFromPaintView(OutputDevice& rOldDev)
{
- SdrGlueEditView::DeleteWindowFromPaintView(pOldWin);
+ SdrGlueEditView::DeleteDeviceFromPaintView(rOldDev);
if (mxWeakTextEditObj.get() && !mbTextEditOnlyOneView
- && pOldWin->GetOutDevType() == OUTDEV_WINDOW)
+ && rOldDev.GetOutDevType() == OUTDEV_WINDOW)
{
for (size_t i = mpTextEditOutliner->GetViewCount(); i > 0;)
{
i--;
OutlinerView* pOLV = mpTextEditOutliner->GetView(i);
- if (pOLV && pOLV->GetWindow() == pOldWin->GetOwnerWindow())
+ if (pOLV && pOLV->GetWindow() == rOldDev.GetOwnerWindow())
{
mpTextEditOutliner->RemoveView(i);
}
}
}
- lcl_RemoveTextEditOutlinerViews(this, GetSdrPageView(), pOldWin);
+ lcl_RemoveTextEditOutlinerViews(this, GetSdrPageView(), &rOldDev);
}
bool SdrObjEditView::IsTextEditInSelectionMode() const
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index 4145229b0027..7e47af6ddced 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -175,7 +175,7 @@ SdrPaintView::SdrPaintView(SdrModel& rSdrModel, OutputDevice* pOut)
SetDefaultStyleSheet(mpModel->GetDefaultStyleSheet(), true);
if (pOut)
- AddWindowToPaintView(pOut, nullptr);
+ AddDeviceToPaintView(*pOut, nullptr);
maColorConfig.AddListener(this);
onChangeColorConfig();
@@ -385,10 +385,9 @@ void SdrPaintView::HideSdrPage()
}
}
-void SdrPaintView::AddWindowToPaintView(OutputDevice* pNewWin, vcl::Window *pWindow)
+void SdrPaintView::AddDeviceToPaintView(OutputDevice& rNewDev, vcl::Window *pWindow)
{
- DBG_ASSERT(pNewWin, "SdrPaintView::AddWindowToPaintView: No OutputDevice(!)");
- SdrPaintWindow* pNewPaintWindow = new SdrPaintWindow(*this, *pNewWin, pWindow);
+ SdrPaintWindow* pNewPaintWindow = new SdrPaintWindow(*this, rNewDev, pWindow);
maPaintWindows.emplace_back(pNewPaintWindow);
if(mpPageView)
@@ -397,10 +396,9 @@ void SdrPaintView::AddWindowToPaintView(OutputDevice* pNewWin, vcl::Window *pWin
}
}
-void SdrPaintView::DeleteWindowFromPaintView(OutputDevice* pOldWin)
+void SdrPaintView::DeleteDeviceFromPaintView(OutputDevice& rOldDev)
{
- assert(pOldWin && "SdrPaintView::DeleteWindowFromPaintView: No OutputDevice(!)");
- SdrPaintWindow* pCandidate = FindPaintWindow(*pOldWin);
+ SdrPaintWindow* pCandidate = FindPaintWindow(rOldDev);
if(pCandidate)
{
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 49a716d51391..402f4f2e01a4 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1406,14 +1406,14 @@ bool SwViewShell::SmoothScroll( tools::Long lXDiff, tools::Long lYDiff, const to
// #i75172# To get a clean repaint, a new ObjectContact is needed here. Without, the
// repaint would not be correct since it would use the wrong DrawPage visible region.
// This repaint IS about painting something currently outside the visible part (!).
- // For that purpose, AddWindowToPaintView is used which creates a new SdrPageViewWindow
+ // For that purpose, AddDeviceToPaintView is used which creates a new SdrPageViewWindow
// and all the necessary stuff. It's not cheap, but necessary here. Alone because repaint
// target really is NOT the current window.
// Also will automatically NOT use PreRendering and overlay (since target is VirtualDevice)
if(!HasDrawView())
MakeDrawView();
SdrView* pDrawView = GetDrawView();
- pDrawView->AddWindowToPaintView(pVout, nullptr);
+ pDrawView->AddDeviceToPaintView(*pVout, nullptr);
// clear mpWin during DLPrePaint2 to get paint preparation for mpOut, but set it again
// immediately afterwards. There are many decisions in SW which imply that Printing
@@ -1431,7 +1431,7 @@ bool SwViewShell::SmoothScroll( tools::Long lXDiff, tools::Long lYDiff, const to
// end paint and destroy ObjectContact again
DLPostPaint2(true);
- pDrawView->DeleteWindowFromPaintView(pVout);
+ pDrawView->DeleteDeviceFromPaintView(*pVout);
}
mpOut = pOld;