summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-11-18 17:02:14 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2022-11-18 18:35:07 +0100
commite68476242571ea434098fb66bef87820bef9b599 (patch)
treed20302483d79a3372936292cf751c238380334dc /sd
parent2fa426da15a12e2a63554247e3c1c3f8c0ec5c24 (diff)
AddWindowToPaintView -> AddDeviceToPaintView
... and likewise DeleteWindowFromPaintView -> DeleteDeviceFromPaintView because they add/delete output devices, not windows, ever since commit 53fd4bb47c53cbb62a542c847ed38238e7b3e148 (INTEGRATION: CWS sdwarningsbegone (1.42.34); FILE MERGED, Dec 12 18:19:15 2006) And use references instead of pointers, because they are dereferenced unconditionally. Change-Id: I67d5841babaec040aa5308e95f333948eb0dde2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142945 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sd')
-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
5 files changed, 15 insertions, 15 deletions
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()));
}
}