summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-06-02 10:40:26 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-06-03 10:51:57 +0200
commit054c0e7177cbef26942f8ca7cb7b1422ceea721c (patch)
tree7390a1be5ee0797b7f43d7d433822315fd75c6dd /sfx2
parent0f499af8c2c22ccc8f1c19edeeb2bdac8cbcb7f0 (diff)
loplugin:simplifypointertobool improve
to look for the x.get() != null pattern, which can be simplified to x I'll do the x.get() == nullptr pattern in a separate patch, to reduce the chances of a mistake Change-Id: I45e0d178e75359857cdf50d712039cb526016555 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95354 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx4
-rw-r--r--sfx2/source/view/viewprn.cxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 08606a83f9dc..378a7c47832d 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -660,7 +660,7 @@ void SidebarController::CreateDeck(const OUString& rDeckId, const Context& rCont
VclPtr<Deck> aDeck = xDeckDescriptor->mpDeck;
if (aDeck.get()==nullptr || bForceCreate)
{
- if (aDeck.get()!=nullptr)
+ if (aDeck)
aDeck.disposeAndClear();
aDeck = VclPtr<Deck>::Create(
@@ -723,7 +723,7 @@ void SidebarController::CreatePanels(const OUString& rDeckId, const Context& rCo
rPanelContexDescriptor.mbIsInitiallyVisible,
rContext,
pDeck);
- if (aPanel.get()!=nullptr )
+ if (aPanel )
{
aNewPanels[nWriteIndex] = aPanel;
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 4db985c961d9..a2d6e6823bf6 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -117,7 +117,7 @@ SfxPrinterController::SfxPrinterController( const VclPtr<Printer>& i_rPrinter,
, m_bOrigStatus( false )
, m_bNeedsChange( false )
, m_bApi(i_bApi)
- , m_bTempPrinter( i_rPrinter.get() != nullptr )
+ , m_bTempPrinter( i_rPrinter )
{
if ( mpViewShell )
{