summaryrefslogtreecommitdiffstats
path: root/sdext
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-25 08:53:14 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-25 12:15:44 +0100
commit390fad39a8f945c848ff998d9f75720318781123 (patch)
tree6338d12d31601635d6e079e7bb96e94eaa0642f3 /sdext
parent[Pardus] tdf#108989 Add contextual manage names command. (diff)
downloadcore-390fad39a8f945c848ff998d9f75720318781123.tar.gz
core-390fad39a8f945c848ff998d9f75720318781123.zip
loplugin:datamembershadow in PresenterPane
the subclass field is just a copy of the parent field, so drop the subclass, and consequently simply the CreateCanvases method, we don't need to pass the parameter down, can just access the parent field. Change-Id: I3be448a06b32d01cdda4fc36b78cafb4488e2913 Reviewed-on: https://gerrit.libreoffice.org/48553 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/presenter/PresenterPane.cxx11
-rw-r--r--sdext/source/presenter/PresenterPane.hxx1
-rw-r--r--sdext/source/presenter/PresenterPaneBase.cxx9
-rw-r--r--sdext/source/presenter/PresenterPaneBase.hxx2
-rw-r--r--sdext/source/presenter/PresenterSpritePane.cxx5
-rw-r--r--sdext/source/presenter/PresenterSpritePane.hxx2
6 files changed, 9 insertions, 21 deletions
diff --git a/sdext/source/presenter/PresenterPane.cxx b/sdext/source/presenter/PresenterPane.cxx
index e806c7e58a51..e539d98b4373 100644
--- a/sdext/source/presenter/PresenterPane.cxx
+++ b/sdext/source/presenter/PresenterPane.cxx
@@ -128,27 +128,26 @@ void SAL_CALL PresenterPane::windowPaint (const awt::PaintEvent& rEvent)
void PresenterPane::CreateCanvases (
- const Reference<awt::XWindow>& rxParentWindow,
const Reference<rendering::XSpriteCanvas>& rxParentCanvas)
{
if ( ! mxPresenterHelper.is())
return;
- if ( ! rxParentWindow.is())
+ if ( ! mxParentWindow.is())
return;
if ( ! rxParentCanvas.is())
return;
mxBorderCanvas = mxPresenterHelper->createSharedCanvas(
rxParentCanvas,
- rxParentWindow,
+ mxParentWindow,
Reference<rendering::XCanvas>(rxParentCanvas, UNO_QUERY),
- rxParentWindow,
+ mxParentWindow,
mxBorderWindow);
mxContentCanvas = mxPresenterHelper->createSharedCanvas(
rxParentCanvas,
- rxParentWindow,
+ mxParentWindow,
Reference<rendering::XCanvas>(rxParentCanvas, UNO_QUERY),
- rxParentWindow,
+ mxParentWindow,
mxContentWindow);
PaintBorder(mxBorderWindow->getPosSize());
diff --git a/sdext/source/presenter/PresenterPane.hxx b/sdext/source/presenter/PresenterPane.hxx
index dc12aa920abc..681245389be9 100644
--- a/sdext/source/presenter/PresenterPane.hxx
+++ b/sdext/source/presenter/PresenterPane.hxx
@@ -76,7 +76,6 @@ private:
css::awt::Rectangle maBoundingBox;
virtual void CreateCanvases (
- const css::uno::Reference<css::awt::XWindow>& rxParentWindow,
const css::uno::Reference<css::rendering::XSpriteCanvas>& rxParentCanvas) override;
void Invalidate (
diff --git a/sdext/source/presenter/PresenterPaneBase.cxx b/sdext/source/presenter/PresenterPaneBase.cxx
index 4f8dc23e2573..f6174652b103 100644
--- a/sdext/source/presenter/PresenterPaneBase.cxx
+++ b/sdext/source/presenter/PresenterPaneBase.cxx
@@ -197,7 +197,7 @@ void SAL_CALL PresenterPaneBase::initialize (const Sequence<Any>& rArguments)
5);
}
- CreateWindows(mxParentWindow, bIsWindowVisibleOnCreation);
+ CreateWindows(bIsWindowVisibleOnCreation);
if (mxBorderWindow.is())
{
@@ -205,7 +205,7 @@ void SAL_CALL PresenterPaneBase::initialize (const Sequence<Any>& rArguments)
mxBorderWindow->addPaintListener(this);
}
- CreateCanvases(mxParentWindow, xParentCanvas);
+ CreateCanvases(xParentCanvas);
// Raise new windows.
ToTop();
@@ -265,14 +265,13 @@ void SAL_CALL PresenterPaneBase::disposing (const lang::EventObject& rEvent)
void PresenterPaneBase::CreateWindows (
- const Reference<awt::XWindow>& rxParentWindow,
const bool bIsWindowVisibleOnCreation)
{
- if (mxPresenterHelper.is() && rxParentWindow.is())
+ if (mxPresenterHelper.is() && mxParentWindow.is())
{
mxBorderWindow = mxPresenterHelper->createWindow(
- rxParentWindow,
+ mxParentWindow,
false,
bIsWindowVisibleOnCreation,
false,
diff --git a/sdext/source/presenter/PresenterPaneBase.hxx b/sdext/source/presenter/PresenterPaneBase.hxx
index f47ccbfd4c44..bfe87ed42206 100644
--- a/sdext/source/presenter/PresenterPaneBase.hxx
+++ b/sdext/source/presenter/PresenterPaneBase.hxx
@@ -114,11 +114,9 @@ protected:
SharedBitmapDescriptor mpViewBackground;
virtual void CreateCanvases (
- const css::uno::Reference<css::awt::XWindow>& rxParentWindow,
const css::uno::Reference<css::rendering::XSpriteCanvas>& rxParentCanvas) = 0;
void CreateWindows (
- const css::uno::Reference<css::awt::XWindow>& rxParentWindow,
const bool bIsWindowVisibleOnCreation);
void PaintBorder (const css::awt::Rectangle& rUpdateRectangle);
void ToTop();
diff --git a/sdext/source/presenter/PresenterSpritePane.cxx b/sdext/source/presenter/PresenterSpritePane.cxx
index 64c7ee327e44..a5ebf1fce252 100644
--- a/sdext/source/presenter/PresenterSpritePane.cxx
+++ b/sdext/source/presenter/PresenterSpritePane.cxx
@@ -33,7 +33,6 @@ namespace sdext { namespace presenter {
PresenterSpritePane::PresenterSpritePane (const Reference<XComponentContext>& rxContext,
const ::rtl::Reference<PresenterController>& rpPresenterController)
: PresenterPaneBase(rxContext, rpPresenterController),
- mxParentWindow(),
mxParentCanvas(),
mpSprite(new PresenterSprite())
{
@@ -53,7 +52,6 @@ PresenterSpritePane::~PresenterSpritePane()
void PresenterSpritePane::disposing()
{
mpSprite->SetFactory(nullptr);
- mxParentWindow = nullptr;
mxParentCanvas = nullptr;
PresenterPaneBase::disposing();
}
@@ -165,12 +163,9 @@ void PresenterSpritePane::UpdateCanvases()
}
void PresenterSpritePane::CreateCanvases (
- const css::uno::Reference<css::awt::XWindow>& rxParentWindow,
const css::uno::Reference<css::rendering::XSpriteCanvas>& rxParentCanvas)
{
- OSL_ASSERT(!mxParentWindow.is() || mxParentWindow==rxParentWindow);
OSL_ASSERT(!mxParentCanvas.is() || mxParentCanvas==rxParentCanvas);
- mxParentWindow = rxParentWindow;
mxParentCanvas = rxParentCanvas;
mpSprite->SetFactory(mxParentCanvas);
diff --git a/sdext/source/presenter/PresenterSpritePane.hxx b/sdext/source/presenter/PresenterSpritePane.hxx
index e65ea98a9148..694b8794265c 100644
--- a/sdext/source/presenter/PresenterSpritePane.hxx
+++ b/sdext/source/presenter/PresenterSpritePane.hxx
@@ -80,12 +80,10 @@ public:
virtual void SAL_CALL windowPaint (const css::awt::PaintEvent& rEvent) override;
private:
- css::uno::Reference<css::awt::XWindow> mxParentWindow;
css::uno::Reference<css::rendering::XSpriteCanvas> mxParentCanvas;
std::shared_ptr<PresenterSprite> mpSprite;
virtual void CreateCanvases (
- const css::uno::Reference<css::awt::XWindow>& rxParentWindow,
const css::uno::Reference<css::rendering::XSpriteCanvas>& rxParentCanvas) override;
void UpdateCanvases();
};