[Libreoffice-commits] core.git: accessibility/source basic/qa comphelper/source compilerplugins/clang cppcanvas/source cppuhelper/source extensions/source include/oox oox/source sc/inc sc/qa sc/source sdext/source sd/source sfx2/source slideshow/source store/source svl/source svtools/source sw/source vcl/qa vcl/source vcl/unx writerfilter/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jun 3 08:52:42 UTC 2020
accessibility/source/standard/vclxaccessiblecombobox.cxx | 2
accessibility/source/standard/vclxaccessibledropdowncombobox.cxx | 2
accessibility/source/standard/vclxaccessibledropdownlistbox.cxx | 2
accessibility/source/standard/vclxaccessiblelistbox.cxx | 2
basic/qa/cppunit/basictest.cxx | 2
comphelper/source/misc/configuration.cxx | 8 -
compilerplugins/clang/simplifypointertobool.cxx | 35 ++++
compilerplugins/clang/test/simplifypointertobool.cxx | 39 +++++
cppcanvas/source/mtfrenderer/implrenderer.cxx | 2
cppcanvas/source/tools/canvasgraphichelper.cxx | 3
cppcanvas/source/wrapper/basegfxfactory.cxx | 9 -
cppcanvas/source/wrapper/implbitmap.cxx | 6
cppcanvas/source/wrapper/implpolypolygon.cxx | 3
cppcanvas/source/wrapper/vclfactory.cxx | 3
cppuhelper/source/servicemanager.cxx | 22 +-
extensions/source/propctrlr/browserlistbox.cxx | 2
extensions/source/propctrlr/propcontroller.hxx | 2
include/oox/ole/axcontrol.hxx | 2
oox/source/ppt/pptshape.cxx | 4
oox/source/shape/ShapeContextHandler.cxx | 2
sc/inc/document.hxx | 2
sc/qa/extras/scpdfexport.cxx | 4
sc/qa/unit/bugfix-test.cxx | 2
sc/qa/unit/copy_paste_test.cxx | 4
sc/qa/unit/ucalc_formula.cxx | 4
sc/source/core/data/document10.cxx | 2
sc/source/filter/excel/xecontent.cxx | 2
sc/source/filter/excel/xilink.cxx | 2
sc/source/filter/inc/richstring.hxx | 2
sc/source/ui/unoobj/linkuno.cxx | 2
sd/source/core/EffectMigration.cxx | 2
sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx | 2
sd/source/ui/accessibility/AccessibleSlideSorterView.cxx | 4
sd/source/ui/animations/CustomAnimationList.cxx | 2
sd/source/ui/animations/CustomAnimationPane.cxx | 2
sd/source/ui/animations/motionpathtag.cxx | 2
sd/source/ui/framework/factories/FullScreenPane.cxx | 2
sd/source/ui/framework/factories/Pane.cxx | 2
sd/source/ui/presenter/PresenterHelper.cxx | 4
sd/source/ui/presenter/SlideRenderer.cxx | 2
sd/source/ui/sidebar/MasterPageContainer.cxx | 24 +--
sd/source/ui/sidebar/MasterPageContainerQueue.cxx | 4
sd/source/ui/sidebar/PanelBase.cxx | 2
sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx | 4
sd/source/ui/slidesorter/controller/SlideSorterController.cxx | 4
sd/source/ui/slidesorter/controller/SlsClipboard.cxx | 2
sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx | 12 -
sd/source/ui/slidesorter/controller/SlsFocusManager.cxx | 4
sd/source/ui/slidesorter/controller/SlsPageSelector.cxx | 12 -
sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx | 8 -
sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx | 2
sd/source/ui/slidesorter/controller/SlsSlotManager.cxx | 4
sd/source/ui/slidesorter/model/SlideSorterModel.cxx | 4
sd/source/ui/slidesorter/model/SlsPageEnumeration.cxx | 2
sd/source/ui/slidesorter/shell/SlideSorter.cxx | 8 -
sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx | 50 +++---
sd/source/ui/slidesorter/view/SlideSorterView.cxx | 4
sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx | 2
sd/source/ui/view/FormShellManager.cxx | 2
sd/source/ui/view/ViewShellBase.cxx | 2
sd/source/ui/view/ViewShellManager.cxx | 4
sd/source/ui/view/drviews1.cxx | 4
sd/source/ui/view/drviews4.cxx | 14 -
sd/source/ui/view/grviewsh.cxx | 2
sd/source/ui/view/viewshe2.cxx | 34 ++--
sd/source/ui/view/viewshel.cxx | 76 +++++-----
sdext/source/presenter/PresenterAccessibility.cxx | 2
sdext/source/presenter/PresenterButton.cxx | 10 -
sdext/source/presenter/PresenterController.cxx | 8 -
sdext/source/presenter/PresenterHelpView.cxx | 4
sdext/source/presenter/PresenterNotesView.cxx | 10 -
sdext/source/presenter/PresenterPaneBase.cxx | 4
sdext/source/presenter/PresenterPaneBorderPainter.cxx | 6
sdext/source/presenter/PresenterPaneContainer.cxx | 16 +-
sdext/source/presenter/PresenterPaneFactory.cxx | 4
sdext/source/presenter/PresenterProtocolHandler.cxx | 2
sdext/source/presenter/PresenterScreen.cxx | 4
sdext/source/presenter/PresenterScrollBar.cxx | 6
sdext/source/presenter/PresenterSlidePreview.cxx | 2
sdext/source/presenter/PresenterSlideShowView.cxx | 10 -
sdext/source/presenter/PresenterSlideSorter.cxx | 56 +++----
sdext/source/presenter/PresenterTheme.cxx | 28 +--
sdext/source/presenter/PresenterTimer.cxx | 2
sdext/source/presenter/PresenterToolBar.cxx | 37 ++--
sdext/source/presenter/PresenterViewFactory.cxx | 4
sdext/source/presenter/PresenterWindowManager.cxx | 20 +-
sfx2/source/sidebar/SidebarController.cxx | 4
sfx2/source/view/viewprn.cxx | 2
slideshow/source/engine/effectrewinder.cxx | 2
slideshow/source/engine/eventqueue.cxx | 6
store/source/storbase.hxx | 4
svl/source/items/style.cxx | 2
svtools/source/brwbox/brwbox2.cxx | 4
svtools/source/control/tabbar.cxx | 2
sw/source/filter/ww8/WW8TableInfo.cxx | 14 -
sw/source/filter/ww8/wrtw8nds.cxx | 6
sw/source/filter/ww8/wrtww8.cxx | 10 -
sw/source/filter/ww8/ww8atr.cxx | 2
vcl/qa/cppunit/lifecycle.cxx | 6
vcl/source/control/tabctrl.cxx | 2
vcl/unx/gtk3/a11y/gtk3atkwrapper.cxx | 6
writerfilter/source/dmapper/DomainMapper.cxx | 14 -
writerfilter/source/dmapper/DomainMapperTableHandler.cxx | 2
writerfilter/source/dmapper/DomainMapperTableManager.cxx | 4
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 2
writerfilter/source/dmapper/GraphicImport.cxx | 2
writerfilter/source/dmapper/StyleSheetTable.cxx | 2
writerfilter/source/dmapper/TablePropertiesHandler.cxx | 2
writerfilter/source/ooxml/Handler.cxx | 4
writerfilter/source/ooxml/OOXMLFactory.cxx | 6
writerfilter/source/ooxml/OOXMLFastContextHandler.cxx | 10 -
writerfilter/source/ooxml/OOXMLParserState.cxx | 8 -
writerfilter/source/ooxml/OOXMLPropertySet.cxx | 16 +-
113 files changed, 466 insertions(+), 405 deletions(-)
New commits:
commit 054c0e7177cbef26942f8ca7cb7b1422ceea721c
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Jun 2 10:40:26 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Jun 3 10:51:57 2020 +0200
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 at collabora.co.uk>
diff --git a/accessibility/source/standard/vclxaccessiblecombobox.cxx b/accessibility/source/standard/vclxaccessiblecombobox.cxx
index 9dc476ff2121..e537f7199eaa 100644
--- a/accessibility/source/standard/vclxaccessiblecombobox.cxx
+++ b/accessibility/source/standard/vclxaccessiblecombobox.cxx
@@ -34,7 +34,7 @@ VCLXAccessibleComboBox::VCLXAccessibleComboBox (VCLXWindow* pVCLWindow)
bool VCLXAccessibleComboBox::IsValid() const
{
- return GetWindow().get() != nullptr;
+ return GetWindow();
}
// XServiceInfo
diff --git a/accessibility/source/standard/vclxaccessibledropdowncombobox.cxx b/accessibility/source/standard/vclxaccessibledropdowncombobox.cxx
index 76b3be98b0d4..97fcebb04a2b 100644
--- a/accessibility/source/standard/vclxaccessibledropdowncombobox.cxx
+++ b/accessibility/source/standard/vclxaccessibledropdowncombobox.cxx
@@ -37,7 +37,7 @@ VCLXAccessibleDropDownComboBox::VCLXAccessibleDropDownComboBox (VCLXWindow* pVCL
bool VCLXAccessibleDropDownComboBox::IsValid() const
{
- return GetWindow().get() != nullptr;
+ return GetWindow();
}
void VCLXAccessibleDropDownComboBox::ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent)
diff --git a/accessibility/source/standard/vclxaccessibledropdownlistbox.cxx b/accessibility/source/standard/vclxaccessibledropdownlistbox.cxx
index d67d8dda5c47..2bee1b51f8fc 100644
--- a/accessibility/source/standard/vclxaccessibledropdownlistbox.cxx
+++ b/accessibility/source/standard/vclxaccessibledropdownlistbox.cxx
@@ -37,7 +37,7 @@ VCLXAccessibleDropDownListBox::VCLXAccessibleDropDownListBox (VCLXWindow* pVCLWi
bool VCLXAccessibleDropDownListBox::IsValid() const
{
- return GetWindow().get() != nullptr;
+ return GetWindow();
}
diff --git a/accessibility/source/standard/vclxaccessiblelistbox.cxx b/accessibility/source/standard/vclxaccessiblelistbox.cxx
index bb811becb31f..26602167379a 100644
--- a/accessibility/source/standard/vclxaccessiblelistbox.cxx
+++ b/accessibility/source/standard/vclxaccessiblelistbox.cxx
@@ -34,7 +34,7 @@ VCLXAccessibleListBox::VCLXAccessibleListBox (VCLXWindow* pVCLWindow)
bool VCLXAccessibleListBox::IsValid() const
{
- return GetWindow().get() != nullptr;
+ return GetWindow();
}
// XServiceInfo
diff --git a/basic/qa/cppunit/basictest.cxx b/basic/qa/cppunit/basictest.cxx
index 635da6e5ec0c..4122885ba10c 100644
--- a/basic/qa/cppunit/basictest.cxx
+++ b/basic/qa/cppunit/basictest.cxx
@@ -101,7 +101,7 @@ SbxVariableRef MacroSnippet::Run()
bool MacroSnippet::Compile()
{
- CPPUNIT_ASSERT_MESSAGE("module is NULL", mpMod.get() != nullptr );
+ CPPUNIT_ASSERT_MESSAGE("module is NULL", mpMod );
mpMod->Compile();
return !mbError;
}
diff --git a/comphelper/source/misc/configuration.cxx b/comphelper/source/misc/configuration.cxx
index 6c5b5c41dac3..24657ab011f5 100644
--- a/comphelper/source/misc/configuration.cxx
+++ b/comphelper/source/misc/configuration.cxx
@@ -140,7 +140,7 @@ void comphelper::detail::ConfigurationWrapper::setPropertyValue(
std::shared_ptr< ConfigurationChanges > const & batch,
OUString const & path, css::uno::Any const & value)
{
- assert(batch.get() != nullptr);
+ assert(batch);
batch->setPropertyValue(path, value);
}
@@ -156,7 +156,7 @@ void comphelper::detail::ConfigurationWrapper::setLocalizedPropertyValue(
std::shared_ptr< ConfigurationChanges > const & batch,
OUString const & path, css::uno::Any const & value)
{
- assert(batch.get() != nullptr);
+ assert(batch);
batch->setPropertyValue(path, value);
}
@@ -176,7 +176,7 @@ comphelper::detail::ConfigurationWrapper::getGroupReadWrite(
std::shared_ptr< ConfigurationChanges > const & batch,
OUString const & path)
{
- assert(batch.get() != nullptr);
+ assert(batch);
return batch->getGroup(path);
}
@@ -196,7 +196,7 @@ comphelper::detail::ConfigurationWrapper::getSetReadWrite(
std::shared_ptr< ConfigurationChanges > const & batch,
OUString const & path)
{
- assert(batch.get() != nullptr);
+ assert(batch);
return batch->getSet(path);
}
diff --git a/compilerplugins/clang/simplifypointertobool.cxx b/compilerplugins/clang/simplifypointertobool.cxx
index 46a80a770757..4f8abb52c74f 100644
--- a/compilerplugins/clang/simplifypointertobool.cxx
+++ b/compilerplugins/clang/simplifypointertobool.cxx
@@ -45,6 +45,7 @@ public:
}
bool VisitImplicitCastExpr(ImplicitCastExpr const*);
+ bool VisitBinaryOperator(BinaryOperator const*);
bool PreTraverseUnaryLNot(UnaryOperator* expr)
{
@@ -303,7 +304,8 @@ bool SimplifyPointerToBool::VisitImplicitCastExpr(ImplicitCastExpr const* castEx
return true;
if (castExpr->getCastKind() != CK_PointerToBoolean)
return true;
- auto memberCallExpr = dyn_cast<CXXMemberCallExpr>(castExpr->getSubExpr()->IgnoreParens());
+ auto memberCallExpr
+ = dyn_cast<CXXMemberCallExpr>(castExpr->getSubExpr()->IgnoreParenImpCasts());
if (!memberCallExpr)
return true;
auto methodDecl = memberCallExpr->getMethodDecl();
@@ -416,6 +418,37 @@ bool SimplifyPointerToBool::VisitImplicitCastExpr(ImplicitCastExpr const* castEx
return true;
}
+bool SimplifyPointerToBool::VisitBinaryOperator(BinaryOperator const* binOp)
+{
+ if (ignoreLocation(binOp))
+ return true;
+ auto opCode = binOp->getOpcode();
+ //TODO if (opCode != BO_EQ && opCode != BO_NE)
+ // return true;
+ if (opCode != BO_NE)
+ return true;
+ const Expr* possibleMemberCall = nullptr;
+ if (isa<CXXNullPtrLiteralExpr>(binOp->getLHS()->IgnoreParenImpCasts()))
+ possibleMemberCall = binOp->getRHS();
+ else if (isa<CXXNullPtrLiteralExpr>(binOp->getRHS()->IgnoreParenImpCasts()))
+ possibleMemberCall = binOp->getLHS();
+ else
+ return true;
+ auto memberCallExpr = dyn_cast<CXXMemberCallExpr>(possibleMemberCall);
+ if (!memberCallExpr)
+ return true;
+ auto methodDecl = memberCallExpr->getMethodDecl();
+ if (!methodDecl || !methodDecl->getIdentifier() || methodDecl->getName() != "get")
+ return true;
+ if (!loplugin::isSmartPointerType(memberCallExpr->getImplicitObjectArgument()))
+ return true;
+ report(DiagnosticsEngine::Warning,
+ std::string("simplify, convert to ") + (opCode == BO_EQ ? "'!x'" : "'x'"),
+ binOp->getExprLoc())
+ << binOp->getSourceRange();
+ return true;
+}
+
loplugin::Plugin::Registration<SimplifyPointerToBool> simplifypointertobool("simplifypointertobool",
true);
diff --git a/compilerplugins/clang/test/simplifypointertobool.cxx b/compilerplugins/clang/test/simplifypointertobool.cxx
index e4bf14c40f45..05f78d52ed78 100644
--- a/compilerplugins/clang/test/simplifypointertobool.cxx
+++ b/compilerplugins/clang/test/simplifypointertobool.cxx
@@ -8,6 +8,7 @@
*/
#include <memory>
+#include "com/sun/star/uno/XInterface.hpp"
void foo();
@@ -30,6 +31,44 @@ void test2(std::shared_ptr<int> p)
// expected-error at +1 {{simplify, drop the get() [loplugin:simplifypointertobool]}}
if (p.get())
foo();
+ // TODOexpected-error at +1 {{simplify, convert to '!x' [loplugin:simplifypointertobool]}}
+ if (p.get() == nullptr)
+ foo();
+ // TODOexpected-error at +1 {{simplify, convert to '!x' [loplugin:simplifypointertobool]}}
+ if (p == nullptr)
+ foo();
+ // TODOexpected-error at +1 {{simplify, convert to 'x' [loplugin:simplifypointertobool]}}
+ if (p != nullptr)
+ foo();
+ // TODOexpected-error at +1 {{simplify, convert to '!x' [loplugin:simplifypointertobool]}}
+ if (nullptr == p.get())
+ foo();
+ // expected-error at +1 {{simplify, convert to 'x' [loplugin:simplifypointertobool]}}
+ if (p.get() != nullptr)
+ foo();
+ // expected-error at +1 {{simplify, convert to 'x' [loplugin:simplifypointertobool]}}
+ if (nullptr != p.get())
+ foo();
+}
+
+void test2(int* p)
+{
+ // TODOexpected-error at +1 {{simplify, convert to '!x' [loplugin:simplifypointertobool]}}
+ if (p == nullptr)
+ foo();
+ // TODOexpected-error at +1 {{simplify, convert to 'x' [loplugin:simplifypointertobool]}}
+ if (p != nullptr)
+ foo();
+}
+
+void test2(css::uno::Reference<css::uno::XInterface> const& p)
+{
+ // expected-error at +1 {{simplify, drop the get() [loplugin:simplifypointertobool]}}
+ if (p.get())
+ foo();
+ // TODOexpected-error at +1 {{simplify, convert to '!x' [loplugin:simplifypointertobool]}}
+ if (p.get() == nullptr)
+ foo();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 4109e21635d1..8e7b03559447 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -2853,7 +2853,7 @@ namespace cppcanvas::internal
{
SAL_INFO( "cppcanvas.emf", "::cppcanvas::internal::ImplRenderer::ImplRenderer(mtf)" );
- OSL_ENSURE( rCanvas.get() != nullptr && rCanvas->getUNOCanvas().is(),
+ OSL_ENSURE( rCanvas && rCanvas->getUNOCanvas().is(),
"ImplRenderer::ImplRenderer(): Invalid canvas" );
OSL_ENSURE( rCanvas->getUNOCanvas()->getDevice().is(),
"ImplRenderer::ImplRenderer(): Invalid graphic device" );
diff --git a/cppcanvas/source/tools/canvasgraphichelper.cxx b/cppcanvas/source/tools/canvasgraphichelper.cxx
index 2ccc1f0cbae5..f7a91d38d361 100644
--- a/cppcanvas/source/tools/canvasgraphichelper.cxx
+++ b/cppcanvas/source/tools/canvasgraphichelper.cxx
@@ -37,8 +37,7 @@ namespace cppcanvas::internal
maClipPolyPolygon(),
mpCanvas( rParentCanvas )
{
- OSL_ENSURE( mpCanvas.get() != nullptr &&
- mpCanvas->getUNOCanvas().is(),
+ OSL_ENSURE( mpCanvas && mpCanvas->getUNOCanvas().is(),
"CanvasGraphicHelper::CanvasGraphicHelper: no valid canvas" );
::canvas::tools::initRenderState( maRenderState );
diff --git a/cppcanvas/source/wrapper/basegfxfactory.cxx b/cppcanvas/source/wrapper/basegfxfactory.cxx
index 0549c4e12175..8f11c6bb4a49 100644
--- a/cppcanvas/source/wrapper/basegfxfactory.cxx
+++ b/cppcanvas/source/wrapper/basegfxfactory.cxx
@@ -37,8 +37,7 @@ namespace cppcanvas
PolyPolygonSharedPtr BaseGfxFactory::createPolyPolygon( const CanvasSharedPtr& rCanvas,
const ::basegfx::B2DPolygon& rPoly )
{
- OSL_ENSURE( rCanvas.get() != nullptr &&
- rCanvas->getUNOCanvas().is(),
+ OSL_ENSURE( rCanvas && rCanvas->getUNOCanvas().is(),
"BaseGfxFactory::createPolyPolygon(): Invalid canvas" );
if( rCanvas.get() == nullptr )
@@ -57,8 +56,7 @@ namespace cppcanvas
BitmapSharedPtr BaseGfxFactory::createBitmap( const CanvasSharedPtr& rCanvas,
const ::basegfx::B2ISize& rSize )
{
- OSL_ENSURE( rCanvas.get() != nullptr &&
- rCanvas->getUNOCanvas().is(),
+ OSL_ENSURE( rCanvas && rCanvas->getUNOCanvas().is(),
"BaseGfxFactory::createBitmap(): Invalid canvas" );
if( rCanvas.get() == nullptr )
@@ -76,8 +74,7 @@ namespace cppcanvas
BitmapSharedPtr BaseGfxFactory::createAlphaBitmap( const CanvasSharedPtr& rCanvas,
const ::basegfx::B2ISize& rSize )
{
- OSL_ENSURE( rCanvas.get() != nullptr &&
- rCanvas->getUNOCanvas().is(),
+ OSL_ENSURE( rCanvas && rCanvas->getUNOCanvas().is(),
"BaseGfxFactory::createBitmap(): Invalid canvas" );
if( rCanvas.get() == nullptr )
diff --git a/cppcanvas/source/wrapper/implbitmap.cxx b/cppcanvas/source/wrapper/implbitmap.cxx
index 8ce319539523..4ca8980a1b15 100644
--- a/cppcanvas/source/wrapper/implbitmap.cxx
+++ b/cppcanvas/source/wrapper/implbitmap.cxx
@@ -53,8 +53,7 @@ namespace cppcanvas::internal
{
CanvasSharedPtr pCanvas( getCanvas() );
- OSL_ENSURE( pCanvas.get() != nullptr &&
- pCanvas->getUNOCanvas().is(),
+ OSL_ENSURE( pCanvas && pCanvas->getUNOCanvas().is(),
"ImplBitmap::draw: invalid canvas" );
if( pCanvas.get() == nullptr ||
@@ -75,8 +74,7 @@ namespace cppcanvas::internal
{
CanvasSharedPtr pCanvas( getCanvas() );
- OSL_ENSURE( pCanvas.get() != nullptr &&
- pCanvas->getUNOCanvas().is(),
+ OSL_ENSURE( pCanvas && pCanvas->getUNOCanvas().is(),
"ImplBitmap::drawAlphaModulated(): invalid canvas" );
if( pCanvas.get() == nullptr ||
diff --git a/cppcanvas/source/wrapper/implpolypolygon.cxx b/cppcanvas/source/wrapper/implpolypolygon.cxx
index 1e8fc7c8b5f5..54f0fe30818c 100644
--- a/cppcanvas/source/wrapper/implpolypolygon.cxx
+++ b/cppcanvas/source/wrapper/implpolypolygon.cxx
@@ -88,8 +88,7 @@ namespace cppcanvas::internal
{
CanvasSharedPtr pCanvas( getCanvas() );
- OSL_ENSURE( pCanvas.get() != nullptr &&
- pCanvas->getUNOCanvas().is(),
+ OSL_ENSURE( pCanvas && pCanvas->getUNOCanvas().is(),
"ImplBitmap::draw: invalid canvas" );
if( pCanvas.get() == nullptr ||
diff --git a/cppcanvas/source/wrapper/vclfactory.cxx b/cppcanvas/source/wrapper/vclfactory.cxx
index c90d91b23de8..9d286ec7d8d3 100644
--- a/cppcanvas/source/wrapper/vclfactory.cxx
+++ b/cppcanvas/source/wrapper/vclfactory.cxx
@@ -56,8 +56,7 @@ namespace cppcanvas
BitmapSharedPtr VCLFactory::createBitmap( const CanvasSharedPtr& rCanvas,
const ::BitmapEx& rBmpEx )
{
- OSL_ENSURE( rCanvas.get() != nullptr &&
- rCanvas->getUNOCanvas().is(),
+ OSL_ENSURE( rCanvas && rCanvas->getUNOCanvas().is(),
"VCLFactory::createBitmap(): Invalid canvas" );
if( rCanvas.get() == nullptr )
diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx
index 2ba6ae51a888..f06405f7794b 100644
--- a/cppuhelper/source/servicemanager.cxx
+++ b/cppuhelper/source/servicemanager.cxx
@@ -487,7 +487,7 @@ public:
cppuhelper::ServiceManager::Data::Implementation > const &
implementation):
manager_(manager), implementation_(implementation)
- { assert(manager.is()); assert(implementation.get() != nullptr); }
+ { assert(manager.is()); assert(implementation); }
SingletonFactory(const SingletonFactory&) = delete;
const SingletonFactory& operator=(const SingletonFactory&) = delete;
@@ -539,7 +539,7 @@ public:
cppuhelper::ServiceManager::Data::Implementation > const &
implementation):
manager_(manager), implementation_(implementation)
- { assert(manager.is()); assert(implementation.get() != nullptr); }
+ { assert(manager.is()); assert(implementation); }
ImplementationWrapper(const ImplementationWrapper&) = delete;
const ImplementationWrapper& operator=(const ImplementationWrapper&) = delete;
@@ -723,7 +723,7 @@ void cppuhelper::ServiceManager::addSingletonContextEntries(
for (const auto& [rName, rImpls] : data_.singletons)
{
assert(!rImpls.empty());
- assert(rImpls[0].get() != nullptr);
+ assert(rImpls[0]);
SAL_INFO_IF(
rImpls.size() > 1, "cppuhelper",
"Arbitrarily choosing " << rImpls[0]->name
@@ -742,7 +742,7 @@ void cppuhelper::ServiceManager::loadImplementation(
css::uno::Reference< css::uno::XComponentContext > const & context,
std::shared_ptr< Data::Implementation > const & implementation)
{
- assert(implementation.get() != nullptr);
+ assert(implementation);
{
osl::MutexGuard g(rBHelper.rMutex);
if (implementation->status == Data::Implementation::STATUS_LOADED) {
@@ -839,7 +839,7 @@ void cppuhelper::ServiceManager::disposing() {
osl::MutexGuard g(rBHelper.rMutex);
for (const auto& rEntry : data_.namedImplementations)
{
- assert(rEntry.second.get() != nullptr);
+ assert(rEntry.second);
if (!rEntry.second->singletons.empty()) {
osl::MutexGuard g2(rEntry.second->mutex);
if (rEntry.second->disposeSingleton.is()) {
@@ -849,7 +849,7 @@ void cppuhelper::ServiceManager::disposing() {
}
for (const auto& rEntry : data_.dynamicImplementations)
{
- assert(rEntry.second.get() != nullptr);
+ assert(rEntry.second);
if (!rEntry.second->singletons.empty()) {
osl::MutexGuard g2(rEntry.second->mutex);
if (rEntry.second->disposeSingleton.is()) {
@@ -1587,7 +1587,7 @@ bool cppuhelper::ServiceManager::insertExtraData(Data const & extra) {
cont->removeByName(name + "/arguments");
} catch (const css::container::NoSuchElementException &) {}
assert(!rImpls.empty());
- assert(rImpls[0].get() != nullptr);
+ assert(rImpls[0]);
SAL_INFO_IF(
rImpls.size() > 1, "cppuhelper",
"Arbitrarily choosing " << rImpls[0]->name
@@ -1626,7 +1626,7 @@ void cppuhelper::ServiceManager::removeRdbFiles(
data_.namedImplementations.begin());
j != data_.namedImplementations.end();)
{
- assert(j->second.get() != nullptr);
+ assert(j->second);
if (j->second->rdbFile == rUri) {
clear.push_back(j->second);
//TODO: The below leaves data_ in an inconsistent state upon
@@ -1660,7 +1660,7 @@ bool cppuhelper::ServiceManager::removeLegacyFactory(
if (i == data_.dynamicImplementations.end()) {
return isDisposed();
}
- assert(i->second.get() != nullptr);
+ assert(i->second);
clear = i->second;
if (removeListener) {
comp = i->second->component;
@@ -1697,7 +1697,7 @@ void cppuhelper::ServiceManager::removeImplementation(const OUString & name) {
"Remove non-inserted implementation " + name,
static_cast< cppu::OWeakObject * >(this));
}
- assert(i->second.get() != nullptr);
+ assert(i->second);
clear = i->second;
//TODO: The below leaves data_ in an inconsistent state upon exceptions:
removeFromImplementationMap(
@@ -1739,7 +1739,7 @@ cppuhelper::ServiceManager::findServiceImplementation(
<< " among multiple implementations for " << i->first);
impl = i->second[0];
}
- assert(impl.get() != nullptr);
+ assert(impl);
loaded = impl->status == Data::Implementation::STATUS_LOADED;
}
if (!loaded) {
diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx
index ca62420b4d2d..6ac118cc91ba 100644
--- a/extensions/source/propctrlr/browserlistbox.cxx
+++ b/extensions/source/propctrlr/browserlistbox.cxx
@@ -428,7 +428,7 @@ namespace pcr
_out_rpLine = line->pLine;
else
_out_rpLine.reset();
- return ( nullptr != _out_rpLine.get() );
+ return bool(_out_rpLine);
}
void OBrowserListBox::EnablePropertyControls( const OUString& _rEntryName, sal_Int16 _nControls, bool _bEnable )
diff --git a/extensions/source/propctrlr/propcontroller.hxx b/extensions/source/propctrlr/propcontroller.hxx
index 1afc7a7728b2..11b9a7b5cdf6 100644
--- a/extensions/source/propctrlr/propcontroller.hxx
+++ b/extensions/source/propctrlr/propcontroller.hxx
@@ -227,7 +227,7 @@ namespace pcr
// stop the inspection
void stopInspection( bool _bCommitModified );
- bool haveView() const { return m_xPropView.get() != nullptr; }
+ bool haveView() const { return bool(m_xPropView); }
OPropertyEditor& getPropertyBox() { return m_xPropView->getPropertyBox(); }
// does the inspection of the objects as indicated by our model
diff --git a/include/oox/ole/axcontrol.hxx b/include/oox/ole/axcontrol.hxx
index db14305cae9d..f8e0a5e5a7db 100644
--- a/include/oox/ole/axcontrol.hxx
+++ b/include/oox/ole/axcontrol.hxx
@@ -913,7 +913,7 @@ public:
ControlModelBase* createModelFromGuid( const OUString& rClassId );
/** Returns true, if the internal control model exists. */
- bool hasModel() const { return mxModel.get() != nullptr; }
+ bool hasModel() const { return bool(mxModel); }
/** Returns read-only access to the internal control model. */
const ControlModelBase* getModel() const { return mxModel.get(); }
/** Returns read/write access to the internal control model. */
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index edf527b67049..b28c9d07b223 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -348,7 +348,7 @@ void PPTShape::addShape(
} else
setMasterTextListStyle( aMasterTextListStyle );
- Reference< XShape > xShape( createAndInsert( rFilterBase, sServiceName, pTheme, rxShapes, bClearText, mpPlaceholder.get() != nullptr, aTransformation, getFillProperties() ) );
+ Reference< XShape > xShape( createAndInsert( rFilterBase, sServiceName, pTheme, rxShapes, bClearText, bool(mpPlaceholder), aTransformation, getFillProperties() ) );
if (!rSlidePersist.isMasterPage() && rSlidePersist.getPage().is() && mnSubType == XML_title)
{
try
@@ -369,7 +369,7 @@ void PPTShape::addShape(
}
// Apply text properties on placeholder text inside this placeholder shape
- if (meShapeLocation == Slide && mpPlaceholder.get() != nullptr && getTextBody() && getTextBody()->isEmpty())
+ if (meShapeLocation == Slide && mpPlaceholder && getTextBody() && getTextBody()->isEmpty())
{
Reference < XText > xText(mxShape, UNO_QUERY);
if (xText.is())
diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx
index ab5dfdb8524c..0684814bc7cc 100644
--- a/oox/source/shape/ShapeContextHandler.cxx
+++ b/oox/source/shape/ShapeContextHandler.cxx
@@ -501,7 +501,7 @@ ShapeContextHandler::getShape()
mxWpgContext.clear();
}
}
- else if (mpShape.get() != nullptr)
+ else if (mpShape)
{
basegfx::B2DHomMatrix aTransformation;
mpShape->addShape(*mxFilterBase, mpThemePtr.get(), xShapes, aTransformation, mpShape->getFillProperties() );
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 6e277f10a284..03ea2b9d4336 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1357,7 +1357,7 @@ public:
/// If set, joining cells into shared formula groups will be delayed until reset again
/// (RegroupFormulaCells() will be called as needed).
void DelayFormulaGrouping( bool delay );
- bool IsDelayedFormulaGrouping() const { return pDelayedFormulaGrouping.get() != nullptr; }
+ bool IsDelayedFormulaGrouping() const { return bool(pDelayedFormulaGrouping); }
/// To be used only by SharedFormulaUtil::joinFormulaCells().
void AddDelayedFormulaGroupingCell( const ScFormulaCell* cell );
diff --git a/sc/qa/extras/scpdfexport.cxx b/sc/qa/extras/scpdfexport.cxx
index 070721dcd091..7b9610061bdb 100644
--- a/sc/qa/extras/scpdfexport.cxx
+++ b/sc/qa/extras/scpdfexport.cxx
@@ -232,7 +232,7 @@ void ScPDFExportTest::testExportRange_Tdf120161()
SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(mxComponent);
CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell);
ScDocShellRef xDocSh = dynamic_cast<ScDocShell*>(pFoundShell);
- CPPUNIT_ASSERT(xDocSh.get() != nullptr);
+ CPPUNIT_ASSERT(xDocSh);
// put some content into the first row with default font
ScDocument& rDoc = xDocSh->GetDocument();
@@ -291,7 +291,7 @@ void ScPDFExportTest::testExportFitToPage_Tdf103516()
SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(mxComponent);
CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell);
ScDocShellRef xDocSh = dynamic_cast<ScDocShell*>(pFoundShell);
- CPPUNIT_ASSERT(xDocSh.get() != nullptr);
+ CPPUNIT_ASSERT(xDocSh);
// put some content into the table
ScDocument& rDoc = xDocSh->GetDocument();
diff --git a/sc/qa/unit/bugfix-test.cxx b/sc/qa/unit/bugfix-test.cxx
index 2b2523319cec..bf09da9872f2 100644
--- a/sc/qa/unit/bugfix-test.cxx
+++ b/sc/qa/unit/bugfix-test.cxx
@@ -164,7 +164,7 @@ void ScFiltersTest::testTdf91979()
CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell);
ScDocShellRef xDocSh = dynamic_cast<ScDocShell*>(pFoundShell);
- CPPUNIT_ASSERT(xDocSh.get() != nullptr);
+ CPPUNIT_ASSERT(xDocSh);
// Get the document controller
ScTabViewShell* pViewShell = xDocSh->GetBestViewShell(false);
diff --git a/sc/qa/unit/copy_paste_test.cxx b/sc/qa/unit/copy_paste_test.cxx
index e81c0eee0957..49d949b2035d 100644
--- a/sc/qa/unit/copy_paste_test.cxx
+++ b/sc/qa/unit/copy_paste_test.cxx
@@ -117,7 +117,7 @@ void ScCopyPasteTest::testCopyPasteXLS()
CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell);
xDocSh = dynamic_cast<ScDocShell*>(pFoundShell);
- CPPUNIT_ASSERT(xDocSh.get() != nullptr);
+ CPPUNIT_ASSERT(xDocSh);
// Get the document controller
pViewShell = xDocSh->GetBestViewShell(false);
@@ -185,7 +185,7 @@ void ScCopyPasteTest::testTdf84411()
CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell);
ScDocShellRef xDocSh = dynamic_cast<ScDocShell*>(pFoundShell);
- CPPUNIT_ASSERT(xDocSh.get() != nullptr);
+ CPPUNIT_ASSERT(xDocSh);
uno::Reference< frame::XModel2 > xModel2 ( xDocSh->GetModel(), UNO_QUERY );
CPPUNIT_ASSERT( xModel2.is() );
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 920350424fb8..eb8e0f555a52 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -6591,7 +6591,7 @@ void Test::testExternalRef()
// have been cached.
ScExternalRefCache::TableTypeRef pCacheTab = pRefMgr->getCacheTable(
nFileId, aExtSh1Name, false);
- CPPUNIT_ASSERT_MESSAGE("Cache table for sheet 1 should exist.", pCacheTab.get() != nullptr);
+ CPPUNIT_ASSERT_MESSAGE("Cache table for sheet 1 should exist.", pCacheTab);
ScRange aCachedRange = getCachedRange(pCacheTab);
CPPUNIT_ASSERT_MESSAGE("Unexpected cached data range.",
aCachedRange.aStart.Col() == 0 && aCachedRange.aEnd.Col() == 1 &&
@@ -6603,7 +6603,7 @@ void Test::testExternalRef()
// Sheet3's row 5 is not referenced; it should not be cached.
pCacheTab = pRefMgr->getCacheTable(nFileId, aExtSh3Name, false);
- CPPUNIT_ASSERT_MESSAGE("Cache table for sheet 3 should exist.", pCacheTab.get() != nullptr);
+ CPPUNIT_ASSERT_MESSAGE("Cache table for sheet 3 should exist.", pCacheTab);
aCachedRange = getCachedRange(pCacheTab);
CPPUNIT_ASSERT_MESSAGE("Unexpected cached data range.",
aCachedRange.aStart.Col() == 0 && aCachedRange.aEnd.Col() == 1 &&
diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx
index b04ac76e06ab..85158474cb0a 100644
--- a/sc/source/core/data/document10.cxx
+++ b/sc/source/core/data/document10.cxx
@@ -383,7 +383,7 @@ void ScDocument::DelayFormulaGrouping( bool delay )
}
else
{
- if( pDelayedFormulaGrouping.get() != nullptr && pDelayedFormulaGrouping->IsValid())
+ if( pDelayedFormulaGrouping && pDelayedFormulaGrouping->IsValid())
RegroupFormulaCells( *pDelayedFormulaGrouping );
pDelayedFormulaGrouping.reset();
}
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 3d95f28269c2..e8aedefa8f42 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -530,7 +530,7 @@ void XclExpHyperlink::SaveXml( XclExpXmlStream& rStrm )
FSNS( XML_r, XML_id ), !sId.isEmpty()
? sId.toUtf8().getStr()
: nullptr,
- XML_location, mxTextMark.get() != nullptr
+ XML_location, mxTextMark
? XclXmlUtils::ToOString( *mxTextMark ).getStr()
: nullptr,
// OOXTODO: XML_tooltip, from record HLinkTooltip 800h wzTooltip
diff --git a/sc/source/filter/excel/xilink.cxx b/sc/source/filter/excel/xilink.cxx
index 0c2297cf8458..9d4e1c8342a3 100644
--- a/sc/source/filter/excel/xilink.cxx
+++ b/sc/source/filter/excel/xilink.cxx
@@ -545,7 +545,7 @@ bool XclImpExtName::CreateOleData(ScDocument& rDoc, const OUString& rUrl,
bool XclImpExtName::HasFormulaTokens() const
{
- return (mxArray.get() != nullptr);
+ return bool(mxArray);
}
// Cached external cells ======================================================
diff --git a/sc/source/filter/inc/richstring.hxx b/sc/source/filter/inc/richstring.hxx
index 71de809efeb7..3db609828a86 100644
--- a/sc/source/filter/inc/richstring.hxx
+++ b/sc/source/filter/inc/richstring.hxx
@@ -55,7 +55,7 @@ public:
/** Returns the text data of this portion. */
const OUString& getText() const { return maText; }
/** Returns true, if the portion contains font formatting. */
- bool hasFont() const { return mxFont.get() != nullptr; }
+ bool hasFont() const { return bool(mxFont); }
/** Converts the portion and replaces or appends to the passed XText. */
void convert(
diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx
index 29972fac20a6..b9d556c783a9 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -1541,7 +1541,7 @@ sal_Bool SAL_CALL ScExternalDocLinkObj::hasByName(const OUString &aName)
// #i116940# be consistent with getByName: allow only table names which have a cache already
ScExternalRefCache::TableTypeRef pTable = mpRefMgr->getCacheTable(mnFileId, aName, false);
- return (pTable.get() != nullptr);
+ return bool(pTable);
}
sal_Int32 SAL_CALL ScExternalDocLinkObj::getCount()
diff --git a/sd/source/core/EffectMigration.cxx b/sd/source/core/EffectMigration.cxx
index 35bddcd3116e..58cf4c30b016 100644
--- a/sd/source/core/EffectMigration.cxx
+++ b/sd/source/core/EffectMigration.cxx
@@ -684,7 +684,7 @@ void EffectMigration::SetTextAnimationEffect( SvxShape* pShape, AnimationEffect
}
}
- if( pGroup.get() != nullptr )
+ if( pGroup )
{
const bool bLaserEffect = (eEffect >= AnimationEffect_LASER_FROM_LEFT) && (eEffect <= AnimationEffect_LASER_FROM_LOWERRIGHT);
diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
index e2c3816daa1b..a8c81225130b 100644
--- a/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
+++ b/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
@@ -421,7 +421,7 @@ SdPage* AccessibleSlideSorterObject::GetPage() const
{
::sd::slidesorter::model::SharedPageDescriptor pDescriptor(
mrSlideSorter.GetModel().GetPageDescriptor(mnPageNumber));
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
return pDescriptor->GetPage();
else
return nullptr;
diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
index 305f8abaa3d4..99f38b4d3d79 100644
--- a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
+++ b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
@@ -387,7 +387,7 @@ Reference<XAccessible> SAL_CALL
const Point aTestPoint (aPoint.X, aPoint.Y);
::sd::slidesorter::model::SharedPageDescriptor pHitDescriptor (
mrSlideSorter.GetController().GetPageAt(aTestPoint));
- if (pHitDescriptor.get() != nullptr)
+ if (pHitDescriptor)
xAccessible = mpImpl->GetAccessibleChild(
(pHitDescriptor->GetPage()->GetPageNum()-1)/2);
@@ -737,7 +737,7 @@ AccessibleSlideSorterObject* AccessibleSlideSorterView::Implementation::GetAcces
{
::sd::slidesorter::model::SharedPageDescriptor pDescriptor(
mrSlideSorter.GetModel().GetPageDescriptor(nIndex));
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
{
maPageObjects[nIndex] = new AccessibleSlideSorterObject(
&mrAccessibleSlideSorter,
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx
index 9444d21ed192..8eceb1c0c5a6 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -509,7 +509,7 @@ sal_Int8 CustomAnimationList::ExecuteDrop(const ExecuteDropEvent& rEvt)
const bool bMovingEffect = ( mxDndEffectDragging != nullptr );
const bool bMoveNotSelf = !xDndEffectInsertBefore || (mxDndEffectDragging && mxTreeView->iter_compare(*xDndEffectInsertBefore, *mxDndEffectDragging) != 0);
- const bool bHaveSequence = ( mpMainSequence.get() != nullptr );
+ const bool bHaveSequence(mpMainSequence);
if( bMovingEffect && bMoveNotSelf && bHaveSequence )
{
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index a55f93beecbc..8af4b358e074 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -2506,7 +2506,7 @@ void CustomAnimationPane::updatePathFromMotionPathTag( const rtl::Reference< Mot
SdrPathObj* pPathObj = xTag->getPathObj();
CustomAnimationEffectPtr pEffect = xTag->getEffect();
- if( (pPathObj != nullptr) && pEffect.get() != nullptr )
+ if( (pPathObj != nullptr) && pEffect )
{
SfxUndoManager* pManager = mrBase.GetDocShell()->GetUndoManager();
if( pManager )
diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx
index 60c77e0d0890..75cd52b55f39 100644
--- a/sd/source/ui/animations/motionpathtag.cxx
+++ b/sd/source/ui/animations/motionpathtag.cxx
@@ -399,7 +399,7 @@ void MotionPathTag::updatePathAttributes()
void MotionPathTag::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
{
- if( !(mpPathObj && !mbInUpdatePath && rHint.GetId() == SfxHintId::ThisIsAnSdrHint && (mpEffect.get() != nullptr)) )
+ if( !(mpPathObj && !mbInUpdatePath && rHint.GetId() == SfxHintId::ThisIsAnSdrHint && mpEffect) )
return;
if( mxPolyPoly != mpPathObj->GetPathPoly() )
diff --git a/sd/source/ui/framework/factories/FullScreenPane.cxx b/sd/source/ui/framework/factories/FullScreenPane.cxx
index 03f8afb3b21a..fd32ba6c9026 100644
--- a/sd/source/ui/framework/factories/FullScreenPane.cxx
+++ b/sd/source/ui/framework/factories/FullScreenPane.cxx
@@ -100,7 +100,7 @@ void SAL_CALL FullScreenPane::disposing()
{
mpWindow.disposeAndClear();
- if (mpWorkWindow.get() != nullptr)
+ if (mpWorkWindow)
{
Link<VclWindowEvent&,void> aWindowEventHandler (LINK(this, FullScreenPane, WindowEventHandler));
mpWorkWindow->RemoveEventListener(aWindowEventHandler);
diff --git a/sd/source/ui/framework/factories/Pane.cxx b/sd/source/ui/framework/factories/Pane.cxx
index 6ca637ea6694..631cc072edb3 100644
--- a/sd/source/ui/framework/factories/Pane.cxx
+++ b/sd/source/ui/framework/factories/Pane.cxx
@@ -168,7 +168,7 @@ Reference<rendering::XCanvas> Pane::CreateCanvas()
{
::cppcanvas::SpriteCanvasSharedPtr pCanvas (
cppcanvas::VCLFactory::createSpriteCanvas(*mpWindow));
- if (pCanvas.get() != nullptr)
+ if (pCanvas)
xCanvas.set(pCanvas->getUNOSpriteCanvas());
}
diff --git a/sd/source/ui/presenter/PresenterHelper.cxx b/sd/source/ui/presenter/PresenterHelper.cxx
index 4fce3397eae0..66774bd1e5ef 100644
--- a/sd/source/ui/presenter/PresenterHelper.cxx
+++ b/sd/source/ui/presenter/PresenterHelper.cxx
@@ -82,7 +82,7 @@ Reference<awt::XWindow> SAL_CALL PresenterHelper::createWindow (
{
// Make the frame window transparent and make the parent able to
// draw behind it.
- if (pParentWindow.get() != nullptr)
+ if (pParentWindow)
pParentWindow->EnableChildTransparentMode();
}
@@ -386,7 +386,7 @@ Reference<rendering::XBitmap> SAL_CALL PresenterHelper::loadBitmap (
const cppcanvas::CanvasSharedPtr pCanvas (
cppcanvas::VCLFactory::createCanvas(rxCanvas));
- if (pCanvas.get() != nullptr)
+ if (pCanvas)
{
BitmapEx aBitmapEx(bmpid);
cppcanvas::BitmapSharedPtr xBitmap(
diff --git a/sd/source/ui/presenter/SlideRenderer.cxx b/sd/source/ui/presenter/SlideRenderer.cxx
index bb4a75209767..f8281e6319bb 100644
--- a/sd/source/ui/presenter/SlideRenderer.cxx
+++ b/sd/source/ui/presenter/SlideRenderer.cxx
@@ -98,7 +98,7 @@ Reference<rendering::XBitmap> SlideRenderer::createPreviewForCanvas (
cppcanvas::CanvasSharedPtr pCanvas (
cppcanvas::VCLFactory::createCanvas(rxCanvas));
- if (pCanvas.get() != nullptr)
+ if (pCanvas)
return cppcanvas::VCLFactory::createBitmap(
pCanvas,
CreatePreview(rxSlide, rMaximalSize, nSuperSampleFactor))->getUNOBitmap();
diff --git a/sd/source/ui/sidebar/MasterPageContainer.cxx b/sd/source/ui/sidebar/MasterPageContainer.cxx
index 21fb595e9624..767c1e332133 100644
--- a/sd/source/ui/sidebar/MasterPageContainer.cxx
+++ b/sd/source/ui/sidebar/MasterPageContainer.cxx
@@ -245,7 +245,7 @@ MasterPageContainer::Token MasterPageContainer::PutMasterPage (
void MasterPageContainer::AcquireToken (Token aToken)
{
SharedMasterPageDescriptor pDescriptor = mpImpl->GetDescriptor(aToken);
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
{
++pDescriptor->mnUseCount;
}
@@ -361,7 +361,7 @@ OUString MasterPageContainer::GetURLForToken (
const ::osl::MutexGuard aGuard (mpImpl->maMutex);
SharedMasterPageDescriptor pDescriptor = mpImpl->GetDescriptor(aToken);
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
return pDescriptor->msURL;
else
return OUString();
@@ -373,7 +373,7 @@ OUString MasterPageContainer::GetPageNameForToken (
const ::osl::MutexGuard aGuard (mpImpl->maMutex);
SharedMasterPageDescriptor pDescriptor = mpImpl->GetDescriptor(aToken);
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
return pDescriptor->msPageName;
else
return OUString();
@@ -385,7 +385,7 @@ OUString MasterPageContainer::GetStyleNameForToken (
const ::osl::MutexGuard aGuard (mpImpl->maMutex);
SharedMasterPageDescriptor pDescriptor = mpImpl->GetDescriptor(aToken);
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
return pDescriptor->msStyleName;
else
return OUString();
@@ -399,7 +399,7 @@ SdPage* MasterPageContainer::GetPageObjectForToken (
SdPage* pPageObject = nullptr;
SharedMasterPageDescriptor pDescriptor = mpImpl->GetDescriptor(aToken);
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
{
pPageObject = pDescriptor->mpMasterPage;
if (pPageObject == nullptr)
@@ -421,7 +421,7 @@ MasterPageContainer::Origin MasterPageContainer::GetOriginForToken (Token aToken
const ::osl::MutexGuard aGuard (mpImpl->maMutex);
SharedMasterPageDescriptor pDescriptor = mpImpl->GetDescriptor(aToken);
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
return pDescriptor->meOrigin;
else
return UNKNOWN;
@@ -432,7 +432,7 @@ sal_Int32 MasterPageContainer::GetTemplateIndexForToken (Token aToken)
const ::osl::MutexGuard aGuard (mpImpl->maMutex);
SharedMasterPageDescriptor pDescriptor = mpImpl->GetDescriptor(aToken);
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
return pDescriptor->mnTemplateIndex;
else
return -1;
@@ -675,7 +675,7 @@ bool MasterPageContainer::Implementation::HasToken (Token aToken) const
{
return aToken>=0
&& o3tl::make_unsigned(aToken)<maContainer.size()
- && maContainer[aToken].get()!=nullptr;
+ && maContainer[aToken];
}
SharedMasterPageDescriptor MasterPageContainer::Implementation::GetDescriptor (Token aToken) const
@@ -691,7 +691,7 @@ void MasterPageContainer::Implementation::InvalidatePreview (Token aToken)
const ::osl::MutexGuard aGuard (maMutex);
SharedMasterPageDescriptor pDescriptor (GetDescriptor(aToken));
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
{
pDescriptor->maSmallPreview = Image();
pDescriptor->maLargePreview = Image();
@@ -712,7 +712,7 @@ Image MasterPageContainer::Implementation::GetPreviewForToken (
// When the preview is missing but inexpensively creatable then do that
// now.
- if (pDescriptor.get()!=nullptr)
+ if (pDescriptor)
{
if (ePreviewState == PS_CREATABLE)
if (UpdateDescriptor(pDescriptor, false,false, true))
@@ -760,7 +760,7 @@ MasterPageContainer::PreviewState MasterPageContainer::Implementation::GetPrevie
PreviewState eState (PS_NOT_AVAILABLE);
SharedMasterPageDescriptor pDescriptor = GetDescriptor(aToken);
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
{
if (pDescriptor->maLargePreview.GetSizePixel().Width() != 0)
eState = PS_AVAILABLE;
@@ -783,7 +783,7 @@ MasterPageContainer::PreviewState MasterPageContainer::Implementation::GetPrevie
bool MasterPageContainer::Implementation::RequestPreview (Token aToken)
{
SharedMasterPageDescriptor pDescriptor = GetDescriptor(aToken);
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
return mpRequestQueue->RequestPreview(pDescriptor);
else
return false;
diff --git a/sd/source/ui/sidebar/MasterPageContainerQueue.cxx b/sd/source/ui/sidebar/MasterPageContainerQueue.cxx
index 417702dd909d..b1067c9a6bee 100644
--- a/sd/source/ui/sidebar/MasterPageContainerQueue.cxx
+++ b/sd/source/ui/sidebar/MasterPageContainerQueue.cxx
@@ -117,7 +117,7 @@ void MasterPageContainerQueue::LateInit()
bool MasterPageContainerQueue::RequestPreview (const SharedMasterPageDescriptor& rpDescriptor)
{
bool bSuccess (false);
- if (rpDescriptor.get() != nullptr
+ if (rpDescriptor
&& rpDescriptor->maLargePreview.GetSizePixel().Width() == 0)
{
sal_Int32 nPriority (CalculatePriority(rpDescriptor));
@@ -215,7 +215,7 @@ IMPL_LINK(MasterPageContainerQueue, DelayedPreviewCreation, Timer*, pTimer, void
mpRequestQueue->erase(mpRequestQueue->begin());
- if (aRequest.mpDescriptor.get() != nullptr)
+ if (aRequest.mpDescriptor)
{
mnRequestsServedCount += 1;
if ( ! mpWeakContainer.expired())
diff --git a/sd/source/ui/sidebar/PanelBase.cxx b/sd/source/ui/sidebar/PanelBase.cxx
index 061d4ea3f3bb..70a20ea4e017 100644
--- a/sd/source/ui/sidebar/PanelBase.cxx
+++ b/sd/source/ui/sidebar/PanelBase.cxx
@@ -69,7 +69,7 @@ bool PanelBase::ProvideWrappedControl()
if (mpWrappedControl)
mpWrappedControl->Show();
}
- return mpWrappedControl.get() != nullptr;
+ return bool(mpWrappedControl);
}
ISidebarReceiver::~ISidebarReceiver()
diff --git a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
index ec0c2a3d22e2..d3fba2087432 100644
--- a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
@@ -100,7 +100,7 @@ IMPL_LINK_NOARG(QueueProcessor, ProcessRequestHdl, Timer *, void)
void QueueProcessor::ProcessRequests()
{
- assert(mpCacheContext.get()!=nullptr);
+ assert(mpCacheContext);
// Never process more than one request at a time in order to prevent the
// lock up of the edit view.
@@ -147,7 +147,7 @@ void QueueProcessor::ProcessOneRequest (
::osl::MutexGuard aGuard (maMutex);
// Create a new preview bitmap and store it in the cache.
- if (mpCache != nullptr && mpCacheContext.get() != nullptr)
+ if (mpCache != nullptr && mpCacheContext)
{
const SdPage* pSdPage = dynamic_cast<const SdPage*>(mpCacheContext->GetPage(aKey));
if (pSdPage != nullptr)
diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
index 638b405bdd09..2588124b867c 100644
--- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
+++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
@@ -346,7 +346,7 @@ bool SlideSorterController::Command (
// focused page as top left position of the context menu.
model::SharedPageDescriptor pDescriptor (
GetFocusManager().GetFocusedPageDescriptor());
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
{
::tools::Rectangle aBBox (
mrView.GetLayouter().GetPageObjectLayouter()->GetBoundingBox (
@@ -803,7 +803,7 @@ void SlideSorterController::PageNameHasChanged (int nPageIndex, const OUString&
{
// Request a repaint for the page object whose name has changed.
model::SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex));
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
mrView.RequestRepaint(pDescriptor);
// Get a pointer to the corresponding accessible object and notify
diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
index 7b08dd24b1ff..c45e782be567 100644
--- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
@@ -353,7 +353,7 @@ void Clipboard::SelectPageRange (sal_Int32 nFirstIndex, sal_Int32 nPageCount)
{
model::SharedPageDescriptor pDescriptor (
mrSlideSorter.GetModel().GetPageDescriptor(nFirstIndex + i));
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
{
rSelector.SelectPage(pDescriptor);
// The first page of the new selection is made the current page.
diff --git a/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx b/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx
index 8ae3afdad243..1d9970bb201b 100644
--- a/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx
@@ -88,7 +88,7 @@ void CurrentSlideManager::NotifyCurrentSlideChange (const sal_Int32 nSlideIndex)
void CurrentSlideManager::ReleaseCurrentSlide()
{
- if (mpCurrentSlide.get() != nullptr)
+ if (mpCurrentSlide)
mrSlideSorter.GetView().SetState(mpCurrentSlide, PageDescriptor::ST_Current, false);
mpCurrentSlide.reset();
@@ -106,7 +106,7 @@ void CurrentSlideManager::AcquireCurrentSlide (const sal_Int32 nSlideIndex)
// given XDrawPage may or may not be member of the slide sorter
// document.
mpCurrentSlide = mrSlideSorter.GetModel().GetPageDescriptor(mnCurrentSlideIndex);
- if (mpCurrentSlide.get() != nullptr)
+ if (mpCurrentSlide)
mrSlideSorter.GetView().SetState(mpCurrentSlide, PageDescriptor::ST_Current, true);
}
}
@@ -163,7 +163,7 @@ void CurrentSlideManager::SwitchCurrentSlide (
void CurrentSlideManager::SetCurrentSlideAtViewShellBase (const SharedPageDescriptor& rpDescriptor)
{
- OSL_ASSERT(rpDescriptor.get() != nullptr);
+ OSL_ASSERT(rpDescriptor);
ViewShellBase* pBase = mrSlideSorter.GetViewShellBase();
if (pBase != nullptr)
@@ -182,7 +182,7 @@ void CurrentSlideManager::SetCurrentSlideAtViewShellBase (const SharedPageDescri
void CurrentSlideManager::SetCurrentSlideAtTabControl (const SharedPageDescriptor& rpDescriptor)
{
- OSL_ASSERT(rpDescriptor.get() != nullptr);
+ OSL_ASSERT(rpDescriptor);
ViewShellBase* pBase = mrSlideSorter.GetViewShellBase();
if (pBase != nullptr)
@@ -200,7 +200,7 @@ void CurrentSlideManager::SetCurrentSlideAtTabControl (const SharedPageDescripto
void CurrentSlideManager::SetCurrentSlideAtXController (const SharedPageDescriptor& rpDescriptor)
{
- OSL_ASSERT(rpDescriptor.get() != nullptr);
+ OSL_ASSERT(rpDescriptor);
try
{
@@ -230,7 +230,7 @@ void CurrentSlideManager::HandleModelChange()
if (mnCurrentSlideIndex >= 0)
{
mpCurrentSlide = mrSlideSorter.GetModel().GetPageDescriptor(mnCurrentSlideIndex);
- if (mpCurrentSlide.get() != nullptr)
+ if (mpCurrentSlide)
mrSlideSorter.GetView().SetState(mpCurrentSlide, PageDescriptor::ST_Current, true);
}
}
diff --git a/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx b/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx
index 0169bff7fbdc..60f0bd48d763 100644
--- a/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx
@@ -143,7 +143,7 @@ model::SharedPageDescriptor FocusManager::GetFocusedPageDescriptor() const
bool FocusManager::SetFocusedPage (const model::SharedPageDescriptor& rpDescriptor)
{
- if (rpDescriptor.get() != nullptr)
+ if (rpDescriptor)
{
FocusHider aFocusHider (*this);
mnPageIndex = (rpDescriptor->GetPage()->GetPageNum()-1)/2;
@@ -170,7 +170,7 @@ bool FocusManager::IsFocusShowing() const
void FocusManager::HideFocusIndicator (const model::SharedPageDescriptor& rpDescriptor)
{
- if (rpDescriptor.get() != nullptr)
+ if (rpDescriptor)
{
mrSlideSorter.GetView().SetState(rpDescriptor, model::PageDescriptor::ST_Focused, false);
diff --git a/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx b/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
index f3aa7ad19edd..b9d428297c8a 100644
--- a/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
@@ -125,7 +125,7 @@ void PageSelector::SetCoreSelection()
void PageSelector::SelectPage (int nPageIndex)
{
SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex));
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
SelectPage(pDescriptor);
}
@@ -133,7 +133,7 @@ void PageSelector::SelectPage (const SdPage* pPage)
{
const sal_Int32 nPageIndex (mrModel.GetIndex(pPage));
SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex));
- if (pDescriptor.get()!=nullptr && pDescriptor->GetPage()==pPage)
+ if (pDescriptor && pDescriptor->GetPage()==pPage)
SelectPage(pDescriptor);
}
@@ -163,7 +163,7 @@ void PageSelector::SelectPage (const SharedPageDescriptor& rpDescriptor)
void PageSelector::DeselectPage (int nPageIndex)
{
model::SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex));
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
DeselectPage(pDescriptor);
}
@@ -213,7 +213,7 @@ void PageSelector::CheckConsistency() const
bool PageSelector::IsPageSelected(int nPageIndex)
{
SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex));
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
return pDescriptor->HasState(PageDescriptor::ST_Selected);
else
return false;
@@ -222,7 +222,7 @@ bool PageSelector::IsPageSelected(int nPageIndex)
bool PageSelector::IsPageVisible(int nPageIndex)
{
SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex));
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
return pDescriptor->HasState(PageDescriptor::ST_Visible);
else
return false;
@@ -270,7 +270,7 @@ std::shared_ptr<PageSelector::PageSelection> PageSelector::GetPageSelection() co
for (int nIndex=0; nIndex<nPageCount; nIndex++)
{
SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nIndex));
- if (pDescriptor.get()!=nullptr && pDescriptor->HasState(PageDescriptor::ST_Selected))
+ if (pDescriptor && pDescriptor->HasState(PageDescriptor::ST_Selected))
pSelection->push_back(pDescriptor->GetPage());
}
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
index 1efdd922277a..0bf400aad1f7 100644
--- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
@@ -588,7 +588,7 @@ void SelectionFunction::GotoNextPage (int nOffset)
{
model::SharedPageDescriptor pDescriptor
= mrController.GetCurrentSlideManager()->GetCurrentSlide();
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
{
SdPage* pPage = pDescriptor->GetPage();
OSL_ASSERT(pPage!=nullptr);
@@ -610,11 +610,11 @@ void SelectionFunction::GotoPage (int nIndex)
mrController.GetFocusManager().SetFocusedPage(nIndex);
model::SharedPageDescriptor pNextPageDescriptor (
mrSlideSorter.GetModel().GetPageDescriptor (nIndex));
- if (pNextPageDescriptor.get() != nullptr)
+ if (pNextPageDescriptor)
mpModeHandler->SetCurrentPage(pNextPageDescriptor);
else
{
- OSL_ASSERT(pNextPageDescriptor.get() != nullptr);
+ OSL_ASSERT(pNextPageDescriptor);
}
ResetShiftKeySelectionAnchor();
}
@@ -930,7 +930,7 @@ void SelectionFunction::ModeHandler::SwitchView (const model::SharedPageDescript
if (pViewShell==nullptr || !pViewShell->IsMainViewShell())
return;
- if (rpDescriptor.get()!=nullptr && rpDescriptor->GetPage()!=nullptr)
+ if (rpDescriptor && rpDescriptor->GetPage()!=nullptr)
{
mrSlideSorter.GetModel().GetDocument()->SetSelected(rpDescriptor->GetPage(), true);
pViewShell->GetFrameView()->SetSelectedPage(
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx
index d8f8207aaf69..4847ff3114bd 100644
--- a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx
@@ -231,7 +231,7 @@ void SelectionManager::SelectionHasChanged ()
OSL_ASSERT(mrController.GetCurrentSlideManager());
SharedPageDescriptor pDescriptor(mrController.GetCurrentSlideManager()->GetCurrentSlide());
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
pViewShell->UpdatePreview(pDescriptor->GetPage());
// Tell the selection change listeners that the selection has changed.
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index 27febd5dde42..bb8814fb6fa7 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -952,7 +952,7 @@ IMPL_LINK(SlotManager, RenameSlideHdl, AbstractSvxNameDialog&, rDialog, bool)
model::SharedPageDescriptor pDescriptor (
mrSlideSorter.GetController().GetCurrentSlideManager()->GetCurrentSlide());
SdPage* pCurrentPage = nullptr;
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
pCurrentPage = pDescriptor->GetPage();
return (pCurrentPage!=nullptr && aNewName == pCurrentPage->GetName())
@@ -980,7 +980,7 @@ bool SlotManager::RenameSlideFromDrawViewShell( sal_uInt16 nPageId, const OUStri
{
model::SharedPageDescriptor pDescriptor (
mrSlideSorter.GetController().GetCurrentSlideManager()->GetCurrentSlide());
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
pPageToRename = pDescriptor->GetPage();
if (pPageToRename != nullptr)
diff --git a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
index 0fe7fbdcbcaf..4afc516a9b84 100644
--- a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
+++ b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
@@ -200,7 +200,7 @@ sal_Int32 SlideSorterModel::GetIndex (const Reference<drawing::XDrawPage>& rxSli
aNumber >>= nNumber;
nNumber -= 1;
SharedPageDescriptor pDescriptor (GetPageDescriptor(nNumber, false));
- if (pDescriptor.get() != nullptr
+ if (pDescriptor
&& pDescriptor->GetXDrawPage() == rxSlide)
{
return nNumber;
@@ -244,7 +244,7 @@ sal_Int32 SlideSorterModel::GetIndex (const SdrPage* pPage) const
// First try to guess the right index.
sal_Int16 nNumber ((pPage->GetPageNum()-1)/2);
SharedPageDescriptor pDescriptor (GetPageDescriptor(nNumber, false));
- if (pDescriptor.get() != nullptr
+ if (pDescriptor
&& pDescriptor->GetPage() == pPage)
{
return nNumber;
diff --git a/sd/source/ui/slidesorter/model/SlsPageEnumeration.cxx b/sd/source/ui/slidesorter/model/SlsPageEnumeration.cxx
index f434d8c5270d..a67f057e7e19 100644
--- a/sd/source/ui/slidesorter/model/SlsPageEnumeration.cxx
+++ b/sd/source/ui/slidesorter/model/SlsPageEnumeration.cxx
@@ -184,7 +184,7 @@ void PageEnumerationImpl::AdvanceToNextValidElement()
SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(mnIndex));
// Test for the predicate being fulfilled.
- if (pDescriptor.get()!=nullptr && maPredicate(pDescriptor))
+ if (pDescriptor && maPredicate(pDescriptor))
{
// This predicate is valid.
break;
diff --git a/sd/source/ui/slidesorter/shell/SlideSorter.cxx b/sd/source/ui/slidesorter/shell/SlideSorter.cxx
index a0ef078f9953..5d933dcd379f 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorter.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorter.cxx
@@ -208,19 +208,19 @@ SlideSorter::~SlideSorter()
model::SlideSorterModel& SlideSorter::GetModel() const
{
- assert(mpSlideSorterModel.get()!=nullptr);
+ assert(mpSlideSorterModel);
return *mpSlideSorterModel;
}
view::SlideSorterView& SlideSorter::GetView() const
{
- assert(mpSlideSorterView.get()!=nullptr);
+ assert(mpSlideSorterView);
return *mpSlideSorterView;
}
controller::SlideSorterController& SlideSorter::GetController() const
{
- assert(mpSlideSorterController.get()!=nullptr);
+ assert(mpSlideSorterController);
return *mpSlideSorterController;
}
@@ -364,7 +364,7 @@ void SlideSorter::RelocateToWindow (vcl::Window* pParentWindow)
// view shell. (One is created earlier while the constructor of the base
// class is executed. But because at that time the correct
// accessibility object can not be constructed we do that now.)
- if (mpContentWindow.get() !=nullptr)
+ if (mpContentWindow)
{
mpContentWindow->Hide();
mpContentWindow->Show();
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
index aae9af937627..4836ba3dd1b5 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
@@ -182,7 +182,7 @@ void SlideSorterViewShell::Init (bool bIsMainViewShell)
pActiveWindow->Show();
mpSlideSorter->GetModel().UpdatePageList();
- if (mpContentWindow.get() != nullptr)
+ if (mpContentWindow)
mpContentWindow->SetViewShell(this);
}
@@ -239,7 +239,7 @@ css::uno::Reference<css::accessibility::XAccessible>
if (mpView == nullptr || mpSlideSorter == nullptr)
return nullptr;
- assert(mpSlideSorter.get()!=nullptr);
+ assert(mpSlideSorter);
::accessibility::AccessibleSlideSorterView *pAccessibleView =
new ::accessibility::AccessibleSlideSorterView(
@@ -267,7 +267,7 @@ void SlideSorterViewShell::SwitchViewFireFocus(const css::uno::Reference< css::a
SlideSorter& SlideSorterViewShell::GetSlideSorter() const
{
- assert(mpSlideSorter.get()!=nullptr);
+ assert(mpSlideSorter);
return *mpSlideSorter;
}
@@ -326,7 +326,7 @@ SdPage* SlideSorterViewShell::GetActualPage()
{
model::SharedPageDescriptor pDescriptor (
mpSlideSorter->GetController().GetCurrentSlideManager()->GetCurrentSlide());
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
pCurrentPage = pDescriptor->GetPage();
}
@@ -336,32 +336,32 @@ SdPage* SlideSorterViewShell::GetActualPage()
void SlideSorterViewShell::GetMenuState ( SfxItemSet& rSet)
{
ViewShell::GetMenuState(rSet);
- assert(mpSlideSorter.get()!=nullptr);
+ assert(mpSlideSorter);
mpSlideSorter->GetController().GetSlotManager()->GetMenuState(rSet);
}
void SlideSorterViewShell::GetClipboardState ( SfxItemSet& rSet)
{
ViewShell::GetMenuState(rSet);
- assert(mpSlideSorter.get()!=nullptr);
+ assert(mpSlideSorter);
mpSlideSorter->GetController().GetSlotManager()->GetClipboardState(rSet);
}
void SlideSorterViewShell::ExecCtrl (SfxRequest& rRequest)
{
- assert(mpSlideSorter.get()!=nullptr);
+ assert(mpSlideSorter);
mpSlideSorter->GetController().ExecCtrl(rRequest);
}
void SlideSorterViewShell::GetCtrlState (SfxItemSet& rSet)
{
- assert(mpSlideSorter.get()!=nullptr);
+ assert(mpSlideSorter);
mpSlideSorter->GetController().GetCtrlState(rSet);
}
void SlideSorterViewShell::FuSupport (SfxRequest& rRequest)
{
- assert(mpSlideSorter.get()!=nullptr);
+ assert(mpSlideSorter);
mpSlideSorter->GetController().FuSupport(rRequest);
}
@@ -370,7 +370,7 @@ void SlideSorterViewShell::FuSupport (SfxRequest& rRequest)
*/
void SlideSorterViewShell::FuTemporary (SfxRequest& rRequest)
{
- assert(mpSlideSorter.get()!=nullptr);
+ assert(mpSlideSorter);
switch (rRequest.GetSlot())
{
case SID_MODIFYPAGE:
@@ -394,19 +394,19 @@ void SlideSorterViewShell::FuTemporary (SfxRequest& rRequest)
void SlideSorterViewShell::GetStatusBarState (SfxItemSet& rSet)
{
- assert(mpSlideSorter.get()!=nullptr);
+ assert(mpSlideSorter);
mpSlideSorter->GetController().GetStatusBarState(rSet);
}
void SlideSorterViewShell::FuPermanent (SfxRequest& rRequest)
{
- assert(mpSlideSorter.get()!=nullptr);
+ assert(mpSlideSorter);
mpSlideSorter->GetController().FuPermanent(rRequest);
}
void SlideSorterViewShell::GetAttrState (SfxItemSet& rSet)
{
- assert(mpSlideSorter.get()!=nullptr);
+ assert(mpSlideSorter);
mpSlideSorter->GetController().GetAttrState(rSet);
}
@@ -428,7 +428,7 @@ void SlideSorterViewShell::ArrangeGUIElements()
{
if (IsActive())
{
- assert(mpSlideSorter.get()!=nullptr);
+ assert(mpSlideSorter);
mpSlideSorter->ArrangeGUIElements(maViewPos, maViewSize);
mbIsArrangeGUIElementsPending = false;
}
@@ -482,14 +482,14 @@ void SlideSorterViewShell::Command (
const CommandEvent& rEvent,
::sd::Window* pWindow)
{
- assert(mpSlideSorter.get()!=nullptr);
+ assert(mpSlideSorter);
if ( ! mpSlideSorter->GetController().Command (rEvent, pWindow))
ViewShell::Command (rEvent, pWindow);
}
void SlideSorterViewShell::ReadFrameViewData (FrameView* pFrameView)
{
- assert(mpSlideSorter.get()!=nullptr);
+ assert(mpSlideSorter);
if (pFrameView != nullptr)
{
view::SlideSorterView& rView (mpSlideSorter->GetView());
@@ -525,7 +525,7 @@ void SlideSorterViewShell::ReadFrameViewData (FrameView* pFrameView)
void SlideSorterViewShell::WriteFrameViewData()
{
- assert(mpSlideSorter.get()!=nullptr);
+ assert(mpSlideSorter);
if (mpFrameView == nullptr)
return;
@@ -563,7 +563,7 @@ void SlideSorterViewShell::SetZoom (long int )
void SlideSorterViewShell::SetZoomRect (const ::tools::Rectangle& rZoomRect)
{
- assert(mpSlideSorter.get()!=nullptr);
+ assert(mpSlideSorter);
Size aPageSize (mpSlideSorter->GetView().GetLayouter().GetPageObjectSize());
::tools::Rectangle aRect(rZoomRect);
@@ -611,7 +611,7 @@ void SlideSorterViewShell::StartDrag (
const Point& rDragPt,
vcl::Window* pWindow )
{
- assert(mpSlideSorter.get()!=nullptr);
+ assert(mpSlideSorter);
mpSlideSorter->GetController().GetClipboard().StartDrag (
rDragPt,
pWindow);
@@ -624,7 +624,7 @@ sal_Int8 SlideSorterViewShell::AcceptDrop (
sal_uInt16 nPage,
SdrLayerID nLayer)
{
- assert(mpSlideSorter.get()!=nullptr);
+ assert(mpSlideSorter);
return mpSlideSorter->GetController().GetClipboard().AcceptDrop (
rEvt,
rTargetHelper,
@@ -640,7 +640,7 @@ sal_Int8 SlideSorterViewShell::ExecuteDrop (
sal_uInt16 nPage,
SdrLayerID nLayer)
{
- assert(mpSlideSorter.get()!=nullptr);
+ assert(mpSlideSorter);
return mpSlideSorter->GetController().GetClipboard().ExecuteDrop (
rEvt,
rTargetHelper,
@@ -652,28 +652,28 @@ sal_Int8 SlideSorterViewShell::ExecuteDrop (
std::shared_ptr<SlideSorterViewShell::PageSelection>
SlideSorterViewShell::GetPageSelection() const
{
- assert(mpSlideSorter.get()!=nullptr);
+ assert(mpSlideSorter);
return mpSlideSorter->GetController().GetPageSelector().GetPageSelection();
}
void SlideSorterViewShell::SetPageSelection (
const std::shared_ptr<PageSelection>& rSelection)
{
- assert(mpSlideSorter.get()!=nullptr);
+ assert(mpSlideSorter);
mpSlideSorter->GetController().GetPageSelector().SetPageSelection(rSelection, true);
}
void SlideSorterViewShell::AddSelectionChangeListener (
const Link<LinkParamNone*,void>& rCallback)
{
- assert(mpSlideSorter.get()!=nullptr);
+ assert(mpSlideSorter);
mpSlideSorter->GetController().GetSelectionManager()->AddSelectionChangeListener(rCallback);
}
void SlideSorterViewShell::RemoveSelectionChangeListener (
const Link<LinkParamNone*,void>& rCallback)
{
- assert(mpSlideSorter.get()!=nullptr);
+ assert(mpSlideSorter);
mpSlideSorter->GetController().GetSelectionManager()->RemoveSelectionChangeListener(rCallback);
}
diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
index 6b090fbe5f5a..46f1c00435ce 100644
--- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx
+++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
@@ -445,7 +445,7 @@ void SlideSorterView::DeterminePageObjectVisibilities()
for (long nIndex=aUnion.Min(); nIndex<=aUnion.Max(); nIndex++)
{
pDescriptor = mrModel.GetPageDescriptor(nIndex);
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
SetState(
pDescriptor,
PageDescriptor::ST_Visible,
@@ -484,7 +484,7 @@ void SlideSorterView::UpdatePreciousFlags()
for (int nIndex=0; nIndex<=nPageCount; ++nIndex)
{
pDescriptor = mrModel.GetPageDescriptor(nIndex);
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
{
pCache->SetPreciousFlag(
pDescriptor->GetPage(),
diff --git a/sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx b/sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx
index 96e0c4d57b40..ce27cec28dc3 100644
--- a/sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx
+++ b/sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx
@@ -45,7 +45,7 @@ ViewCacheContext::~ViewCacheContext()
void ViewCacheContext::NotifyPreviewCreation(cache::CacheKey aKey)
{
const model::SharedPageDescriptor pDescriptor (GetDescriptor(aKey));
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
{
// Force a repaint that will trigger their re-creation.
mrSlideSorter.GetView().RequestRepaint(pDescriptor);
diff --git a/sd/source/ui/view/FormShellManager.cxx b/sd/source/ui/view/FormShellManager.cxx
index 9b4ff79b717b..522efec6fcfd 100644
--- a/sd/source/ui/view/FormShellManager.cxx
+++ b/sd/source/ui/view/FormShellManager.cxx
@@ -73,7 +73,7 @@ FormShellManager::~FormShellManager()
Link<sd::tools::EventMultiplexerEvent&,void> aLink (LINK(this, FormShellManager, ConfigurationUpdateHandler));
mrBase.GetEventMultiplexer()->RemoveEventListener(aLink);
- if (mpSubShellFactory.get() != nullptr)
+ if (mpSubShellFactory)
{
ViewShell* pShell = mrBase.GetMainViewShell().get();
if (pShell != nullptr)
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index c4b4c208a8bb..df1091cced75 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -266,7 +266,7 @@ ViewShellBase::~ViewShellBase()
xSlideShow.clear();
// Tell the controller that the ViewShellBase is not available anymore.
- if (mpImpl->mpController.get() != nullptr)
+ if (mpImpl->mpController)
mpImpl->mpController->ReleaseViewShellBase();
// We have to hide the main window to prevent SFX complaining after a
diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx
index eb9b0ff40a27..3b9308d8c5f0 100644
--- a/sd/source/ui/view/ViewShellManager.cxx
+++ b/sd/source/ui/view/ViewShellManager.cxx
@@ -1017,14 +1017,14 @@ void ViewShellManager::Implementation::DestroyViewShell (
maShellFactories.erase(aRange.first, aRange.second);
// Release the shell.
- if (rDescriptor.mpFactory.get() != nullptr)
+ if (rDescriptor.mpFactory)
rDescriptor.mpFactory->ReleaseShell(rDescriptor.mpShell);
}
void ViewShellManager::Implementation::DestroySubShell (
const ShellDescriptor& rDescriptor)
{
- OSL_ASSERT(rDescriptor.mpFactory.get() != nullptr);
+ OSL_ASSERT(rDescriptor.mpFactory);
rDescriptor.mpFactory->ReleaseShell(rDescriptor.mpShell);
}
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index afe8b0f9d9fa..c99163f62817 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -575,7 +575,7 @@ void DrawViewShell::UpdateHRuler()
Invalidate( SID_RULER_OBJECT );
Invalidate( SID_RULER_TEXT_RIGHT_TO_LEFT );
- if (mpHorizontalRuler.get() != nullptr)
+ if (mpHorizontalRuler)
mpHorizontalRuler->ForceUpdate();
}
@@ -589,7 +589,7 @@ void DrawViewShell::UpdateVRuler()
Invalidate( SID_RULER_PAGE_POS );
Invalidate( SID_RULER_OBJECT );
- if (mpVerticalRuler.get() != nullptr)
+ if (mpVerticalRuler)
mpVerticalRuler->ForceUpdate();
}
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index e88e8683ae3f..9839d3d799e5 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -310,7 +310,7 @@ void DrawViewShell::MouseMove(const MouseEvent& rMEvt, ::sd::Window* pWin)
{
bool bInsideOtherWindow = false;
- if (mpContentWindow.get() != nullptr)
+ if (mpContentWindow)
{
aOutputArea = ::tools::Rectangle(Point(0,0),
mpContentWindow->GetOutputSizePixel());
@@ -791,19 +791,19 @@ void DrawViewShell::ShowMousePosInfo(const ::tools::Rectangle& rRect,
long nVOffs = 0;
sal_uInt16 nCnt;
- if (mpHorizontalRuler.get() != nullptr)
+ if (mpHorizontalRuler)
mpHorizontalRuler->SetLines();
- if (mpVerticalRuler.get() != nullptr)
+ if (mpVerticalRuler)
mpVerticalRuler->SetLines();
- if (mpHorizontalRuler.get() != nullptr)
+ if (mpHorizontalRuler)
{
nHOffs = mpHorizontalRuler->GetNullOffset() +
mpHorizontalRuler->GetPageOffset();
}
- if (mpVerticalRuler.get() != nullptr)
+ if (mpVerticalRuler)
{
nVOffs = mpVerticalRuler->GetNullOffset() +
mpVerticalRuler->GetPageOffset();
@@ -820,9 +820,9 @@ void DrawViewShell::ShowMousePosInfo(const ::tools::Rectangle& rRect,
nCnt++;
}
- if (mpHorizontalRuler.get() != nullptr)
+ if (mpHorizontalRuler)
mpHorizontalRuler->SetLines(nCnt, pHLines);
- if (mpVerticalRuler.get() != nullptr)
+ if (mpVerticalRuler)
mpVerticalRuler->SetLines(nCnt, pVLines);
}
diff --git a/sd/source/ui/view/grviewsh.cxx b/sd/source/ui/view/grviewsh.cxx
index 9ab5501c14e6..b914b2da8cbd 100644
--- a/sd/source/ui/view/grviewsh.cxx
+++ b/sd/source/ui/view/grviewsh.cxx
@@ -67,7 +67,7 @@ void GraphicViewShell::ChangeEditMode (
void GraphicViewShell::ArrangeGUIElements()
{
- if (mpLayerTabBar.get()!=nullptr && mpLayerTabBar->IsVisible())
+ if (mpLayerTabBar && mpLayerTabBar->IsVisible())
{
Size aSize = mpLayerTabBar->GetSizePixel();
const Size aFrameSize (GetViewFrame()->GetWindow().GetOutputSizePixel());
diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx
index 9ce31a6cba29..47ac53f680c0 100644
--- a/sd/source/ui/view/viewshe2.cxx
+++ b/sd/source/ui/view/viewshe2.cxx
@@ -71,7 +71,7 @@ namespace sd {
*/
void ViewShell::UpdateScrollBars()
{
- if (mpHorizontalScrollBar.get() != nullptr)
+ if (mpHorizontalScrollBar)
{
long nW = static_cast<long>(mpContentWindow->GetVisibleWidth() * 32000);
long nX = static_cast<long>(mpContentWindow->GetVisibleX() * 32000);
@@ -84,7 +84,7 @@ void ViewShell::UpdateScrollBars()
mpHorizontalScrollBar->SetPageSize(nPage);
}
- if (mpVerticalScrollBar.get() != nullptr)
+ if (mpVerticalScrollBar)
{
long nH = static_cast<long>(mpContentWindow->GetVisibleHeight() * 32000);
long nY = static_cast<long>(mpContentWindow->GetVisibleY() * 32000);
@@ -317,13 +317,13 @@ void ViewShell::SetZoom(long nZoom)
Fraction aUIScale(nZoom, 100);
aUIScale *= GetDoc()->GetUIScale();
- if (mpHorizontalRuler.get() != nullptr)
+ if (mpHorizontalRuler)
mpHorizontalRuler->SetZoom(aUIScale);
- if (mpVerticalRuler.get() != nullptr)
+ if (mpVerticalRuler)
mpVerticalRuler->SetZoom(aUIScale);
- if (mpContentWindow.get() != nullptr)
+ if (mpContentWindow)
{
mpContentWindow->SetZoomIntegral(nZoom);
@@ -369,13 +369,13 @@ void ViewShell::SetZoomRect(const ::tools::Rectangle& rZoomRect)
Point aPos = GetActiveWindow()->GetWinViewPos();
- if (mpHorizontalRuler.get() != nullptr)
+ if (mpHorizontalRuler)
mpHorizontalRuler->SetZoom(aUIScale);
- if (mpVerticalRuler.get() != nullptr)
+ if (mpVerticalRuler)
mpVerticalRuler->SetZoom(aUIScale);
- if (mpContentWindow.get() != nullptr)
+ if (mpContentWindow)
{
Point aNewPos = mpContentWindow->GetWinViewPos();
aNewPos.setX( aPos.X() );
@@ -409,7 +409,7 @@ void ViewShell::SetZoomRect(const ::tools::Rectangle& rZoomRect)
void ViewShell::InitWindows(const Point& rViewOrigin, const Size& rViewSize,
const Point& rWinPos, bool bUpdate)
{
- if (mpContentWindow.get() != nullptr)
+ if (mpContentWindow)
{
mpContentWindow->SetViewOrigin(rViewOrigin);
mpContentWindow->SetViewSize(rViewSize);
@@ -438,7 +438,7 @@ void ViewShell::InitWindows(const Point& rViewOrigin, const Size& rViewSize,
*/
void ViewShell::InvalidateWindows()
{
- if (mpContentWindow.get() != nullptr)
+ if (mpContentWindow)
mpContentWindow->Invalidate();
}
@@ -447,7 +447,7 @@ void ViewShell::InvalidateWindows()
*/
void ViewShell::DrawMarkRect(const ::tools::Rectangle& rRect) const
{
- if (mpContentWindow.get() != nullptr)
+ if (mpContentWindow)
{
mpContentWindow->InvertTracking(rRect, ShowTrackFlags::Object | ShowTrackFlags::TrackWindow);
}
@@ -822,7 +822,7 @@ void ViewShell::SetRuler(bool bRuler)
{
mbHasRulers = ( bRuler && !GetDocSh()->IsPreview() ); // no rulers on preview mode
- if (mpHorizontalRuler.get() != nullptr)
+ if (mpHorizontalRuler)
{
if (mbHasRulers)
{
@@ -834,7 +834,7 @@ void ViewShell::SetRuler(bool bRuler)
}
}
- if (mpVerticalRuler.get() != nullptr)
+ if (mpVerticalRuler)
{
if (mbHasRulers)
{
@@ -853,13 +853,13 @@ void ViewShell::SetRuler(bool bRuler)
void ViewShell::SetScrollBarsVisible(bool bVisible)
{
- if (mpVerticalScrollBar.get() != nullptr)
+ if (mpVerticalScrollBar)
mpVerticalScrollBar->Show( bVisible );
- if (mpHorizontalScrollBar.get() != nullptr)
+ if (mpHorizontalScrollBar)
mpHorizontalScrollBar->Show( bVisible );
- if (mpScrollBarBox.get() != nullptr)
+ if (mpScrollBarBox)
mpScrollBarBox->Show(bVisible);
}
@@ -916,7 +916,7 @@ void ViewShell::VisAreaChanged(const ::tools::Rectangle& /*rRect*/)
void ViewShell::SetWinViewPos(const Point& rWinPos)
{
- if (mpContentWindow.get() != nullptr)
+ if (mpContentWindow)
{
mpContentWindow->SetWinViewPos(rWinPos);
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index ca99e3f7a214..9ba96ff29a87 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -111,7 +111,7 @@ namespace sd {
bool ViewShell::IsPageFlipMode() const
{
- return dynamic_cast< const DrawViewShell *>( this ) != nullptr && mpContentWindow.get() != nullptr &&
+ return dynamic_cast< const DrawViewShell *>( this ) != nullptr && mpContentWindow &&
mpContentWindow->GetVisibleHeight() >= 1.0;
}
@@ -149,7 +149,7 @@ ViewShell::~ViewShell()
mpLayerTabBar.disposeAndClear();
- if (mpImpl->mpSubShellFactory.get() != nullptr)
+ if (mpImpl->mpSubShellFactory)
GetViewShellBase().GetViewShellManager()->RemoveSubShellFactory(
this,mpImpl->mpSubShellFactory);
@@ -299,9 +299,9 @@ void ViewShell::Activate(bool bIsMDIActivate)
is sent sometimes asynchronous, it can happen, that the wrong window
gets the focus. */
- if (mpHorizontalRuler.get() != nullptr)
+ if (mpHorizontalRuler)
mpHorizontalRuler->SetActive();
- if (mpVerticalRuler.get() != nullptr)
+ if (mpVerticalRuler)
mpVerticalRuler->SetActive();
if (bIsMDIActivate)
@@ -376,9 +376,9 @@ void ViewShell::Deactivate(bool bIsMDIActivate)
GetCurrentFunction()->Deactivate();
}
- if (mpHorizontalRuler.get() != nullptr)
+ if (mpHorizontalRuler)
mpHorizontalRuler->SetActive(false);
- if (mpVerticalRuler.get() != nullptr)
+ if (mpVerticalRuler)
mpVerticalRuler->SetActive(false);
SfxShell::Deactivate(bIsMDIActivate);
@@ -762,7 +762,7 @@ bool ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWi
void ViewShell::SetupRulers()
{
- if(!(mbHasRulers && (mpContentWindow.get() != nullptr) && !SlideShow::IsRunning(GetViewShellBase())))
+ if(!(mbHasRulers && mpContentWindow && !SlideShow::IsRunning(GetViewShellBase())))
return;
long nHRulerOfs = 0;
@@ -770,7 +770,7 @@ void ViewShell::SetupRulers()
if ( mpVerticalRuler.get() == nullptr )
{
mpVerticalRuler.reset(CreateVRuler(GetActiveWindow()));
- if ( mpVerticalRuler.get() != nullptr )
+ if ( mpVerticalRuler )
{
nHRulerOfs = mpVerticalRuler->GetSizePixel().Width();
mpVerticalRuler->SetActive();
@@ -780,7 +780,7 @@ void ViewShell::SetupRulers()
if ( mpHorizontalRuler.get() == nullptr )
{
mpHorizontalRuler.reset(CreateHRuler(GetActiveWindow()));
- if ( mpHorizontalRuler.get() != nullptr )
+ if ( mpHorizontalRuler )
{
mpHorizontalRuler->SetWinPos(nHRulerOfs);
mpHorizontalRuler->SetActive();
@@ -899,26 +899,26 @@ SvBorder ViewShell::GetBorder()
SvBorder aBorder;
// Horizontal scrollbar.
- if (mpHorizontalScrollBar.get()!=nullptr
+ if (mpHorizontalScrollBar
&& mpHorizontalScrollBar->IsVisible())
{
aBorder.Bottom() = maScrBarWH.Height();
}
// Vertical scrollbar.
- if (mpVerticalScrollBar.get()!=nullptr
+ if (mpVerticalScrollBar
&& mpVerticalScrollBar->IsVisible())
{
aBorder.Right() = maScrBarWH.Width();
}
// Place horizontal ruler below tab bar.
- if (mbHasRulers && mpContentWindow.get() != nullptr)
+ if (mbHasRulers && mpContentWindow)
{
SetupRulers();
- if (mpHorizontalRuler.get() != nullptr)
+ if (mpHorizontalRuler)
aBorder.Top() = mpHorizontalRuler->GetSizePixel().Height();
- if (mpVerticalRuler.get() != nullptr)
+ if (mpVerticalRuler)
aBorder.Left() = mpVerticalRuler->GetSizePixel().Width();
}
@@ -940,11 +940,11 @@ void ViewShell::ArrangeGUIElements()
long nBottom = maViewPos.Y() + maViewSize.Height();
// Horizontal scrollbar.
- if (mpHorizontalScrollBar.get()!=nullptr
+ if (mpHorizontalScrollBar
&& mpHorizontalScrollBar->IsVisible())
{
nBottom -= maScrBarWH.Height();
- if (mpLayerTabBar.get()!=nullptr && mpLayerTabBar->IsVisible())
+ if (mpLayerTabBar && mpLayerTabBar->IsVisible())
nBottom -= mpLayerTabBar->GetSizePixel().Height();
mpHorizontalScrollBar->SetPosSizePixel (
Point(nLeft, nBottom),
@@ -952,7 +952,7 @@ void ViewShell::ArrangeGUIElements()
}
// Vertical scrollbar.
- if (mpVerticalScrollBar.get()!=nullptr
+ if (mpVerticalScrollBar
&& mpVerticalScrollBar->IsVisible())
{
nRight -= maScrBarWH.Width();
@@ -962,11 +962,11 @@ void ViewShell::ArrangeGUIElements()
}
// Filler in the lower right corner.
- if (mpScrollBarBox.get() != nullptr)
+ if (mpScrollBarBox)
{
- if (mpHorizontalScrollBar.get()!=nullptr
+ if (mpHorizontalScrollBar
&& mpHorizontalScrollBar->IsVisible()
- && mpVerticalScrollBar.get()!=nullptr
+ && mpVerticalScrollBar
&& mpVerticalScrollBar->IsVisible())
{
mpScrollBarBox->Show();
@@ -977,20 +977,20 @@ void ViewShell::ArrangeGUIElements()
}
// Place horizontal ruler below tab bar.
- if (mbHasRulers && mpContentWindow.get() != nullptr)
+ if (mbHasRulers && mpContentWindow)
{
- if (mpHorizontalRuler.get() != nullptr)
+ if (mpHorizontalRuler)
{
Size aRulerSize = mpHorizontalRuler->GetSizePixel();
aRulerSize.setWidth( nRight - nLeft );
mpHorizontalRuler->SetPosSizePixel (
Point(nLeft,nTop), aRulerSize);
- if (mpVerticalRuler.get() != nullptr)
+ if (mpVerticalRuler)
mpHorizontalRuler->SetBorderPos(
mpVerticalRuler->GetSizePixel().Width()-1);
nTop += aRulerSize.Height();
}
- if (mpVerticalRuler.get() != nullptr)
+ if (mpVerticalRuler)
{
Size aRulerSize = mpVerticalRuler->GetSizePixel();
aRulerSize.setHeight( nBottom - nTop );
@@ -1021,7 +1021,7 @@ void ViewShell::ArrangeGUIElements()
Size(maViewSize.Width()-maScrBarWH.Width(),
maViewSize.Height()-maScrBarWH.Height()));
- if (mpContentWindow.get() != nullptr)
+ if (mpContentWindow)
mpContentWindow->UpdateMapOrigin();
UpdateScrollBars();
@@ -1032,10 +1032,10 @@ void ViewShell::ArrangeGUIElements()
void ViewShell::SetUIUnit(FieldUnit eUnit)
{
// Set unit at horizontal and vertical rulers.
- if (mpHorizontalRuler.get() != nullptr)
+ if (mpHorizontalRuler)
mpHorizontalRuler->SetUnit(eUnit);
- if (mpVerticalRuler.get() != nullptr)
+ if (mpVerticalRuler)
mpVerticalRuler->SetUnit(eUnit);
}
@@ -1044,7 +1044,7 @@ void ViewShell::SetUIUnit(FieldUnit eUnit)
*/
void ViewShell::SetDefTabHRuler( sal_uInt16 nDefTab )
{
- if (mpHorizontalRuler.get() != nullptr)
+ if (mpHorizontalRuler)
mpHorizontalRuler->SetDefTabDist( nDefTab );
}
@@ -1499,23 +1499,23 @@ void ViewShell::ShowUIControls (bool bVisible)
{
if (mbHasRulers)
{
- if (mpHorizontalRuler.get() != nullptr)
+ if (mpHorizontalRuler)
mpHorizontalRuler->Show( bVisible );
- if (mpVerticalRuler.get() != nullptr)
+ if (mpVerticalRuler)
mpVerticalRuler->Show( bVisible );
}
- if (mpVerticalScrollBar.get() != nullptr)
+ if (mpVerticalScrollBar)
mpVerticalScrollBar->Show( bVisible );
- if (mpHorizontalScrollBar.get() != nullptr)
+ if (mpHorizontalScrollBar)
mpHorizontalScrollBar->Show( bVisible );
- if (mpScrollBarBox.get() != nullptr)
+ if (mpScrollBarBox)
mpScrollBarBox->Show(bVisible);
- if (mpContentWindow.get() != nullptr)
+ if (mpContentWindow)
mpContentWindow->Show( bVisible );
}
@@ -1525,14 +1525,14 @@ bool ViewShell::RelocateToParentWindow (vcl::Window* pParentWindow)
mpParentWindow->SetBackground (Wallpaper());
- if (mpContentWindow.get() != nullptr)
+ if (mpContentWindow)
mpContentWindow->SetParent(pParentWindow);
- if (mpHorizontalScrollBar.get() != nullptr)
+ if (mpHorizontalScrollBar)
mpHorizontalScrollBar->SetParent(mpParentWindow);
- if (mpVerticalScrollBar.get() != nullptr)
+ if (mpVerticalScrollBar)
mpVerticalScrollBar->SetParent(mpParentWindow);
- if (mpScrollBarBox.get() != nullptr)
+ if (mpScrollBarBox)
mpScrollBarBox->SetParent(mpParentWindow);
return true;
diff --git a/sdext/source/presenter/PresenterAccessibility.cxx b/sdext/source/presenter/PresenterAccessibility.cxx
index 2c494c058a2b..e82a0755b17c 100644
--- a/sdext/source/presenter/PresenterAccessibility.cxx
+++ b/sdext/source/presenter/PresenterAccessibility.cxx
@@ -1635,7 +1635,7 @@ bool PresenterAccessible::AccessibleParagraph::GetWindowState (const sal_Int16 n
switch (nType)
{
case AccessibleStateType::EDITABLE:
- return mpParagraph.get()!=nullptr;
+ return bool(mpParagraph);
case AccessibleStateType::ACTIVE:
return true;
diff --git a/sdext/source/presenter/PresenterButton.cxx b/sdext/source/presenter/PresenterButton.cxx
index f663e97e943c..77964c5e8965 100644
--- a/sdext/source/presenter/PresenterButton.cxx
+++ b/sdext/source/presenter/PresenterButton.cxx
@@ -266,7 +266,7 @@ void SAL_CALL PresenterButton::mouseReleased (const css::awt::MouseEvent&)
if (meState == PresenterBitmapDescriptor::ButtonDown)
{
- OSL_ASSERT(mpPresenterController.get()!=nullptr);
+ OSL_ASSERT(mpPresenterController);
mpPresenterController->DispatchUnoCommand(msAction);
meState = PresenterBitmapDescriptor::Normal;
@@ -299,7 +299,7 @@ void SAL_CALL PresenterButton::disposing (const css::lang::EventObject& rEvent)
css::geometry::IntegerSize2D PresenterButton::CalculateButtonSize()
{
- if (mpFont.get()!=nullptr && !mpFont->mxFont.is() && mxCanvas.is())
+ if (mpFont && !mpFont->mxFont.is() && mxCanvas.is())
mpFont->PrepareFont(mxCanvas);
if (mpFont.get()==nullptr || !mpFont->mxFont.is())
return geometry::IntegerSize2D(-1,-1);
@@ -364,11 +364,11 @@ Reference<rendering::XBitmap> PresenterButton::GetBitmap (
const SharedBitmapDescriptor& mpIcon,
const PresenterBitmapDescriptor::Mode eMode)
{
- if (mpIcon.get() != nullptr)
+ if (mpIcon)
return mpIcon->GetBitmap(eMode);
else
{
- OSL_ASSERT(mpIcon.get()!=nullptr);
+ OSL_ASSERT(mpIcon);
return nullptr;
}
}
@@ -404,7 +404,7 @@ void PresenterButton::SetupButtonBitmaps()
mxMouseOverBitmap = mxCanvas->getDevice()->createCompatibleAlphaBitmap(maButtonSize);
xCanvas.set(mxMouseOverBitmap, UNO_QUERY);
- if (mpMouseOverFont.get()!=nullptr && !mpMouseOverFont->mxFont.is() && mxCanvas.is())
+ if (mpMouseOverFont && !mpMouseOverFont->mxFont.is() && mxCanvas.is())
mpMouseOverFont->PrepareFont(mxCanvas);
if (xCanvas.is())
RenderButton(
diff --git a/sdext/source/presenter/PresenterController.cxx b/sdext/source/presenter/PresenterController.cxx
index 8d378d15f2f7..12787a546d18 100644
--- a/sdext/source/presenter/PresenterController.cxx
+++ b/sdext/source/presenter/PresenterController.cxx
@@ -503,7 +503,7 @@ void PresenterController::HideView (const OUString& rsViewURL)
{
PresenterPaneContainer::SharedPaneDescriptor pDescriptor (
mpPaneContainer->FindViewURL(rsViewURL));
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
{
mxConfigurationController->requestResourceDeactivation(
ResourceId::createWithAnchor(
@@ -765,7 +765,7 @@ void SAL_CALL PresenterController::notifyConfigurationChange (
mpWindowManager->Update();
// Request the repainting of the area previously
// occupied by the view.
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
GetPaintManager()->Invalidate(pDescriptor->mxBorderWindow);
}
}
@@ -953,7 +953,7 @@ void SAL_CALL PresenterController::keyReleased (const awt::KeyEvent& rEvent)
case awt::Key::F1:
// Toggle the help view.
- if (mpWindowManager.get() != nullptr)
+ if (mpWindowManager)
{
if (mpWindowManager->GetViewMode() != PresenterWindowManager::VM_Help)
mpWindowManager->SetViewMode(PresenterWindowManager::VM_Help);
@@ -1053,7 +1053,7 @@ void PresenterController::InitializeMainPane (const Reference<XPane>& rxPane)
mpWindowManager->SetParentPane(rxPane);
mpWindowManager->SetTheme(mpTheme);
- if (mpPaneBorderPainter.get() != nullptr)
+ if (mpPaneBorderPainter)
mpPaneBorderPainter->SetTheme(mpTheme);
// Add key listener
diff --git a/sdext/source/presenter/PresenterHelpView.cxx b/sdext/source/presenter/PresenterHelpView.cxx
index 9f0a55de4068..ecff22e648d6 100644
--- a/sdext/source/presenter/PresenterHelpView.cxx
+++ b/sdext/source/presenter/PresenterHelpView.cxx
@@ -155,7 +155,7 @@ PresenterHelpView::PresenterHelpView (
if (mpPresenterController.is())
{
mpFont = mpPresenterController->GetViewFont(mxViewId->getResourceURL());
- if (mpFont.get() != nullptr)
+ if (mpFont)
{
mpFont->PrepareFont(mxCanvas);
}
@@ -464,7 +464,7 @@ void PresenterHelpView::ProvideCanvas()
void PresenterHelpView::Resize()
{
- if (!(mpCloseButton.get() != nullptr && mxWindow.is()))
+ if (!(mpCloseButton && mxWindow.is()))
return;
const awt::Rectangle aWindowBox (mxWindow->getPosSize());
diff --git a/sdext/source/presenter/PresenterNotesView.cxx b/sdext/source/presenter/PresenterNotesView.cxx
index c271875fe14a..a9fa7446b693 100644
--- a/sdext/source/presenter/PresenterNotesView.cxx
+++ b/sdext/source/presenter/PresenterNotesView.cxx
@@ -258,7 +258,7 @@ void PresenterNotesView::SetSlide (const Reference<drawing::XDrawPage>& rxNotesP
Layout();
- if (mpScrollBar.get() != nullptr)
+ if (mpScrollBar)
{
mpScrollBar->SetThumbPosition(0, false);
UpdateScrollBar();
@@ -405,13 +405,13 @@ void PresenterNotesView::Layout()
mnSeparatorYLocation = aWindowBox.Height - nToolBarHeight - gnSpaceBelowSeparator;
aNewTextBoundingBox.Y2 = mnSeparatorYLocation - gnSpaceAboveSeparator;
// Place the close button.
- if (mpCloseButton.get() != nullptr)
+ if (mpCloseButton)
mpCloseButton->SetCenter(geometry::RealPoint2D(
(aWindowBox.Width + aToolBarSize.Width) / 2,
aWindowBox.Height - aToolBarSize.Height/2));
}
// Check whether the vertical scroll bar is necessary.
- if (mpScrollBar.get() != nullptr)
+ if (mpScrollBar)
{
bool bShowVerticalScrollbar (false);
try
@@ -514,7 +514,7 @@ void PresenterNotesView::PaintToolBar (const awt::Rectangle& rUpdateBox)
Sequence<double>(4),
rendering::CompositeOperation::SOURCE);
- if (mpBackground.get() != nullptr)
+ if (mpBackground)
{
// Paint the background.
mpPresenterController->GetCanvasHelper()->Paint(
@@ -544,7 +544,7 @@ void PresenterNotesView::PaintText (const awt::Rectangle& rUpdateBox)
if (aBox.Width <= 0 || aBox.Height <= 0)
return;
- if (mpBackground.get() != nullptr)
+ if (mpBackground)
{
// Paint the background.
mpPresenterController->GetCanvasHelper()->Paint(
diff --git a/sdext/source/presenter/PresenterPaneBase.cxx b/sdext/source/presenter/PresenterPaneBase.cxx
index 29e7e4b046d8..6ec411b99c1b 100644
--- a/sdext/source/presenter/PresenterPaneBase.cxx
+++ b/sdext/source/presenter/PresenterPaneBase.cxx
@@ -47,7 +47,7 @@ PresenterPaneBase::PresenterPaneBase (
msTitle(),
mxComponentContext(rxContext)
{
- if (mpPresenterController.get() != nullptr)
+ if (mpPresenterController)
mxPresenterHelper = mpPresenterController->GetPresenterHelper();
}
@@ -98,7 +98,7 @@ void PresenterPaneBase::SetTitle (const OUString& rsTitle)
{
msTitle = rsTitle;
- OSL_ASSERT(mpPresenterController.get()!=nullptr);
+ OSL_ASSERT(mpPresenterController);
OSL_ASSERT(mpPresenterController->GetPaintManager() != nullptr);
mpPresenterController->GetPaintManager()->Invalidate(mxBorderWindow);
diff --git a/sdext/source/presenter/PresenterPaneBorderPainter.cxx b/sdext/source/presenter/PresenterPaneBorderPainter.cxx
index ba57bb09b40b..53d60faa2315 100644
--- a/sdext/source/presenter/PresenterPaneBorderPainter.cxx
+++ b/sdext/source/presenter/PresenterPaneBorderPainter.cxx
@@ -260,7 +260,7 @@ awt::Point SAL_CALL PresenterPaneBorderPainter::getCalloutOffset (
{
const std::shared_ptr<RendererPaneStyle> pRendererPaneStyle(
mpRenderer->GetRendererPaneStyle(rsPaneBorderStyleName));
- if (pRendererPaneStyle != nullptr && pRendererPaneStyle->mpBottomCallout.get() != nullptr)
+ if (pRendererPaneStyle != nullptr && pRendererPaneStyle->mpBottomCallout)
{
return awt::Point (
0,
@@ -771,7 +771,7 @@ RendererPaneStyle::RendererPaneStyle (
mpFont = rpTheme->GetFont(rsStyleName);
OUString sAnchor ("Left");
- if (mpFont.get() != nullptr)
+ if (mpFont)
{
sAnchor = mpFont->msAnchor;
mnFontXOffset = mpFont->mnXOffset;
@@ -887,7 +887,7 @@ SharedBitmapDescriptor RendererPaneStyle::GetBitmap(
const OUString& rsBitmapName)
{
SharedBitmapDescriptor pDescriptor (rpTheme->GetBitmap(rsStyleName, rsBitmapName));
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
return pDescriptor;
else
return mpEmpty;
diff --git a/sdext/source/presenter/PresenterPaneContainer.cxx b/sdext/source/presenter/PresenterPaneContainer.cxx
index 7c9c1a5fc2e9..a102304258fb 100644
--- a/sdext/source/presenter/PresenterPaneContainer.cxx
+++ b/sdext/source/presenter/PresenterPaneContainer.cxx
@@ -59,7 +59,7 @@ void PresenterPaneContainer::PreparePane (
return;
SharedPaneDescriptor pPane (FindPaneURL(rxPaneId->getResourceURL()));
- if (pPane.get() != nullptr)
+ if (pPane)
return;
// No entry found for the given pane id. Create a new one.
@@ -110,7 +110,7 @@ PresenterPaneContainer::SharedPaneDescriptor
PreparePane(xPaneId, OUString(), OUString(), OUString(),
false, ViewInitializationFunction());
pDescriptor = FindPaneURL(sPaneURL);
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
{
Reference<awt::XWindow> xWindow (rxPane->getWindow());
pDescriptor->mxContentWindow = xWindow;
@@ -138,7 +138,7 @@ PresenterPaneContainer::SharedPaneDescriptor
sPaneURL = rxPaneId->getResourceURL();
SharedPaneDescriptor pDescriptor (FindPaneURL(sPaneURL));
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
{
pDescriptor->mxBorderWindow = rxBorderWindow;
return pDescriptor;
@@ -165,7 +165,7 @@ PresenterPaneContainer::SharedPaneDescriptor
}
pDescriptor = FindPaneURL(sPaneURL);
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
{
pDescriptor->mxView = rxView;
try
@@ -187,7 +187,7 @@ PresenterPaneContainer::SharedPaneDescriptor
PresenterPaneContainer::RemovePane (const Reference<XResourceId>& rxPaneId)
{
SharedPaneDescriptor pDescriptor (FindPaneId(rxPaneId));
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
{
if (pDescriptor->mxContentWindow.is())
pDescriptor->mxContentWindow->removeEventListener(this);
@@ -217,7 +217,7 @@ PresenterPaneContainer::SharedPaneDescriptor
}
pDescriptor = FindPaneURL(sPaneURL);
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
{
pDescriptor->mxView = nullptr;
}
@@ -282,7 +282,7 @@ PresenterPaneContainer::SharedPaneDescriptor PresenterPaneContainer::FindViewURL
OUString PresenterPaneContainer::GetPaneURLForViewURL (const OUString& rsViewURL)
{
SharedPaneDescriptor pDescriptor (FindViewURL(rsViewURL));
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
if (pDescriptor->mxPaneId.is())
return pDescriptor->mxPaneId->getResourceURL();
return OUString();
@@ -315,7 +315,7 @@ void SAL_CALL PresenterPaneContainer::disposing (
{
SharedPaneDescriptor pDescriptor (
FindContentWindow(Reference<awt::XWindow>(rEvent.Source, UNO_QUERY)));
- if (pDescriptor.get() != nullptr)
+ if (pDescriptor)
{
RemovePane(pDescriptor->mxPaneId);
}
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list