summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-05-26 20:42:08 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-05-26 22:33:02 +0200
commitfe6cce01c88d045a1fcf09acf049c34c22299b02 (patch)
treec118594a43386096bca55179f31b2b61e64dfa48 /sd
parentb894a3d7f991dd248dfd8935b31da8bccfd130b2 (diff)
Fix loplugin:simplifypointertobool for libstdc++ std::shared_ptr
...where the get member function is defined on a std::__shared_ptr base class, so loplugin:simplifypointertobool used to miss those until now. (While e.g. using libc++ on macOS found those cases.) 366d08f2f6d4de922f6099c62bb81b49d89e0a68 "new loplugin:simplifypointertobool" was mistaken in breaking isSmartPointerType(const clang::Type* t) out of isSmartPointerType(const Expr* e); c874294ad9fb178df47c66875bfbdec466e39763 "Fix detection of std::unique_ptr/shared_ptr in loplugin:redundantpointerops" had introduced that indivisible two-step algorithm on purpose. The amount of additional hits (on Linux) apparently asked for turning loplugin:simplifypointertobool into a rewriting plugin. Which in turn showed that the naive adivce to just "drop the get()" is not sufficient in places that are not contextually converted to bool, as those places need to be wrapped in a bool(...) functional cast now. If the expression was already wrapped in parentheses, those could be reused as part of the functional cast, but implementing that showed that such cases are not yet found at all by the existing loplugin:simplifypointertobool. Lets leave that TODO for another commit. Besides the changes to compilerplugins/ itself, this change has been generated fully automatically with the rewriting plugin on Linux. Change-Id: I83107d6f634fc9ac232986f49044d7017df83e2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94888 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'sd')
-rw-r--r--sd/source/core/CustomAnimationEffect.cxx24
-rw-r--r--sd/source/core/CustomAnimationPreset.cxx14
-rw-r--r--sd/source/core/EffectMigration.cxx18
-rw-r--r--sd/source/core/sdpage_animations.cxx2
-rw-r--r--sd/source/core/undoanim.cxx10
-rw-r--r--sd/source/filter/ppt/ppt97animations.cxx4
-rw-r--r--sd/source/filter/ppt/pptin.cxx4
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx2
-rw-r--r--sd/source/ui/animations/CustomAnimationList.cxx20
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.cxx44
-rw-r--r--sd/source/ui/annotations/annotationmanager.cxx6
-rw-r--r--sd/source/ui/docshell/docshell.cxx2
-rw-r--r--sd/source/ui/func/fuconbez.cxx2
-rw-r--r--sd/source/ui/func/fuformatpaintbrush.cxx4
-rw-r--r--sd/source/ui/slideshow/slideshow.cxx10
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx40
-rw-r--r--sd/source/ui/slideshow/slideshowviewimpl.cxx4
-rw-r--r--sd/source/ui/table/TableDesignPane.cxx18
-rw-r--r--sd/source/ui/view/OutlinerIterator.cxx6
-rw-r--r--sd/source/ui/view/viewoverlaymanager.cxx2
20 files changed, 118 insertions, 118 deletions
diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx
index 2004b88564f8..1c6456d60c76 100644
--- a/sd/source/core/CustomAnimationEffect.cxx
+++ b/sd/source/core/CustomAnimationEffect.cxx
@@ -1667,7 +1667,7 @@ CustomAnimationEffectPtr EffectSequenceHelper::append( const CustomAnimationPres
{
CustomAnimationEffectPtr pEffect;
- if( pPreset.get() )
+ if( pPreset )
{
Reference< XAnimationNode > xNode( pPreset->create( "" ) );
if( xNode.is() )
@@ -1771,7 +1771,7 @@ CustomAnimationEffectPtr EffectSequenceHelper::append( const SdrPathObj& rPathOb
void EffectSequenceHelper::replace( const CustomAnimationEffectPtr& pEffect, const CustomAnimationPresetPtr& pPreset, const OUString& rPresetSubType, double fDuration /* = -1.0 */ )
{
- if( !(pEffect.get() && pPreset.get()) )
+ if( !(pEffect && pPreset) )
return;
try
@@ -1799,7 +1799,7 @@ void EffectSequenceHelper::replace( const CustomAnimationEffectPtr& pEffect, con
void EffectSequenceHelper::remove( const CustomAnimationEffectPtr& pEffect )
{
- if( pEffect.get() )
+ if( pEffect )
{
pEffect->setEffectSequence( nullptr );
maEffects.remove( pEffect );
@@ -1810,7 +1810,7 @@ void EffectSequenceHelper::remove( const CustomAnimationEffectPtr& pEffect )
void EffectSequenceHelper::moveToBeforeEffect( const CustomAnimationEffectPtr& pEffect, const CustomAnimationEffectPtr& pInsertBefore)
{
- if ( pEffect.get() )
+ if ( pEffect )
{
maEffects.remove( pEffect );
EffectSequence::iterator aInsertIter( find( pInsertBefore ) );
@@ -1922,13 +1922,13 @@ void EffectSequenceHelper::implRebuild()
else
pEffect.reset();
}
- while( pEffect.get() && (pEffect->getNodeType() == EffectNodeType::WITH_PREVIOUS) );
+ while( pEffect && (pEffect->getNodeType() == EffectNodeType::WITH_PREVIOUS) );
fBegin += fDuration;
}
- while( pEffect.get() && (pEffect->getNodeType() != EffectNodeType::ON_CLICK) );
+ while( pEffect && (pEffect->getNodeType() != EffectNodeType::ON_CLICK) );
}
- while( pEffect.get() );
+ while( pEffect );
// process after effect nodes
std::for_each( aAfterEffects.begin(), aAfterEffects.end(), stl_process_after_effect_node_func );
@@ -2417,7 +2417,7 @@ void EffectSequenceHelper::updateTextGroups()
continue; // trivial case, no group
CustomAnimationTextGroupPtr pGroup = findGroup( nGroupId );
- if( !pGroup.get() )
+ if( !pGroup )
{
pGroup = std::make_shared<CustomAnimationTextGroup>( pEffect->getTargetShape(), nGroupId );
maGroupMap[nGroupId] = pGroup;
@@ -2991,7 +2991,7 @@ void EffectSequenceHelper::processAfterEffect( const Reference< XAnimationNode >
if( aIter != maEffects.end() )
pMasterEffect = *aIter;
- if( pMasterEffect.get() )
+ if( pMasterEffect )
{
pMasterEffect->setHasAfterEffect( true );
@@ -3221,7 +3221,7 @@ CustomAnimationEffectPtr MainSequence::findEffect( const css::uno::Reference< cs
for (auto const& interactiveSequence : maInteractiveSequenceVector)
{
pEffect = interactiveSequence->findEffect( xNode );
- if (pEffect.get())
+ if (pEffect)
break;
}
}
@@ -3535,13 +3535,13 @@ void InteractiveSequence::implRebuild()
MainSequenceRebuildGuard::MainSequenceRebuildGuard( const MainSequencePtr& pMainSequence )
: mpMainSequence( pMainSequence )
{
- if( mpMainSequence.get() )
+ if( mpMainSequence )
mpMainSequence->lockRebuilds();
}
MainSequenceRebuildGuard::~MainSequenceRebuildGuard()
{
- if( mpMainSequence.get() )
+ if( mpMainSequence )
mpMainSequence->unlockRebuilds();
}
diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx
index 6c2a3f701043..25c03daae6ac 100644
--- a/sd/source/core/CustomAnimationPreset.cxx
+++ b/sd/source/core/CustomAnimationPreset.cxx
@@ -162,7 +162,7 @@ Reference< XAnimationNode > CustomAnimationPreset::create( const OUString& rstrS
strSubType = maDefaultSubTyp;
CustomAnimationEffectPtr pEffect = maSubTypes[strSubType];
- if( pEffect.get() )
+ if( pEffect )
{
Reference< XCloneable > xCloneable( pEffect->getNode(), UNO_QUERY_THROW );
Reference< XAnimationNode > xNode( xCloneable->createClone(), UNO_QUERY_THROW );
@@ -292,7 +292,7 @@ void CustomAnimationPresets::importEffects()
const OUString aPresetId( pEffect->getPresetId() );
CustomAnimationPresetPtr pDescriptor = getEffectDescriptor( aPresetId );
- if( pDescriptor.get() )
+ if( pDescriptor )
pDescriptor->add( pEffect );
else
{
@@ -398,7 +398,7 @@ void CustomAnimationPresets::importPresets( const Reference< XMultiServiceFactor
for( const OUString& rEffectName : std::as_const(aEffects) )
{
CustomAnimationPresetPtr pEffect = getEffectDescriptor( rEffectName );
- if( pEffect.get() )
+ if( pEffect )
{
aEffectsList.push_back( pEffect );
}
@@ -465,11 +465,11 @@ const OUString& CustomAnimationPresets::translateName( const OUString& rId, cons
}
void CustomAnimationPresets::changePresetSubType( const CustomAnimationEffectPtr& pEffect, const OUString& rPresetSubType ) const
{
- if( pEffect.get() && pEffect->getPresetSubType() != rPresetSubType )
+ if( pEffect && pEffect->getPresetSubType() != rPresetSubType )
{
CustomAnimationPresetPtr pDescriptor( getEffectDescriptor( pEffect->getPresetId() ) );
- if( pDescriptor.get() )
+ if( pDescriptor )
{
Reference< XAnimationNode > xNewNode( pDescriptor->create( rPresetSubType ) );
if( xNewNode.is() )
@@ -518,11 +518,11 @@ Reference< XAnimationNode > CustomAnimationPresets::getRandomPreset( sal_Int16 n
sal_Int32 nCategory = comphelper::rng::uniform_size_distribution(0, pCategoryList->size()-1);
PresetCategoryPtr pCategory = (*pCategoryList)[nCategory];
- if( pCategory.get() && !pCategory->maEffects.empty() )
+ if( pCategory && !pCategory->maEffects.empty() )
{
sal_Int32 nDescriptor = comphelper::rng::uniform_size_distribution(0, pCategory->maEffects.size()-1);
CustomAnimationPresetPtr pPreset = pCategory->maEffects[nDescriptor];
- if( pPreset.get() )
+ if( pPreset )
{
std::vector<OUString> aSubTypes = pPreset->getSubTypes();
diff --git a/sd/source/core/EffectMigration.cxx b/sd/source/core/EffectMigration.cxx
index 1aa52dfe0c68..35bddcd3116e 100644
--- a/sd/source/core/EffectMigration.cxx
+++ b/sd/source/core/EffectMigration.cxx
@@ -454,7 +454,7 @@ void EffectMigration::SetAnimationEffect( SvxShape* pShape, AnimationEffect eEff
CustomAnimationPresetPtr pPreset( rPresets.getEffectDescriptor( aPresetId ) );
sd::MainSequencePtr pMainSequence = static_cast<SdPage*>(pObj->getSdrPageFromSdrObject())->getMainSequence();
- if( !(pPreset.get() && pMainSequence.get()) )
+ if( !(pPreset && pMainSequence) )
return;
const Reference< XShape > xShape( pShape );
@@ -476,7 +476,7 @@ void EffectMigration::SetAnimationEffect( SvxShape* pShape, AnimationEffect eEff
if( nGroupId >= 0 )
{
CustomAnimationTextGroupPtr pGroup = pMainSequence->findGroup( nGroupId );
- if( pGroup.get() )
+ if( pGroup )
{
// add an effect to animate the shape
pMainSequence->setAnimateForm( pGroup, true );
@@ -538,7 +538,7 @@ void EffectMigration::SetAnimationEffect( SvxShape* pShape, AnimationEffect eEff
pEffect = *aIterOnlyBackground;
}
- if( pEffect.get() )
+ if( pEffect )
{
if( (pEffect->getPresetId() != aPresetId) ||
(pEffect->getPresetSubType() != aPresetSubType) )
@@ -557,7 +557,7 @@ AnimationEffect EffectMigration::GetAnimationEffect( SvxShape* pShape )
SdrObject* pObj = pShape->GetSdrObject();
sd::MainSequencePtr pMainSequence = static_cast<SdPage*>(pObj->getSdrPageFromSdrObject())->getMainSequence();
- if( pMainSequence.get() )
+ if( pMainSequence )
{
const Reference< XShape > xShape( pShape );
@@ -619,7 +619,7 @@ void EffectMigration::SetTextAnimationEffect( SvxShape* pShape, AnimationEffect
sd::MainSequencePtr pMainSequence = static_cast<SdPage*>(pObj->getSdrPageFromSdrObject())->getMainSequence();
- if( !(pPreset.get() && pMainSequence.get()) )
+ if( !(pPreset && pMainSequence) )
return;
const Reference< XShape > xShape( pShape );
@@ -672,7 +672,7 @@ void EffectMigration::SetTextAnimationEffect( SvxShape* pShape, AnimationEffect
}
}
- if( pShapeEffect.get() )
+ if( pShapeEffect )
{
SdPage* pPage = dynamic_cast< SdPage* >( pObj->getSdrPageFromSdrObject() );
const bool bManual = (pPage == nullptr) || (pPage->GetPresChange() == PresChange::Manual);
@@ -730,7 +730,7 @@ AnimationEffect EffectMigration::GetTextAnimationEffect( SvxShape* pShape )
{
sd::MainSequencePtr pMainSequence = static_cast<SdPage*>(pObj->getSdrPageFromSdrObject())->getMainSequence();
- if( pMainSequence.get() )
+ if( pMainSequence )
{
const Reference< XShape > xShape( pShape );
EffectSequence::iterator aIter( ImplFindEffect( pMainSequence, xShape, ShapeAnimationSubType::ONLY_TEXT ) );
@@ -1278,7 +1278,7 @@ void EffectMigration::SetAnimationPath( SvxShape* pShape, SdrPathObj const * pPa
if( pPage )
{
std::shared_ptr< sd::MainSequence > pMainSequence( pPage->getMainSequence() );
- if( pMainSequence.get() )
+ if( pMainSequence )
pMainSequence->append( *pPathObj, makeAny( xShape ), -1.0, "" );
}
}
@@ -1353,7 +1353,7 @@ void EffectMigration::CreateAnimatedGroup(SdrObjGroup const & rGroupObj, SdPage&
std::shared_ptr< sd::MainSequence > pMainSequence(rPage.getMainSequence());
- if(!pMainSequence.get())
+ if(!pMainSequence)
return;
std::vector< SdrObject* > aObjects;
diff --git a/sd/source/core/sdpage_animations.cxx b/sd/source/core/sdpage_animations.cxx
index 47094551e950..bb16cacdbb7a 100644
--- a/sd/source/core/sdpage_animations.cxx
+++ b/sd/source/core/sdpage_animations.cxx
@@ -60,7 +60,7 @@ Reference< XAnimationNode > const & SdPage::getAnimationNode()
void SdPage::setAnimationNode( Reference< XAnimationNode > const & xNode )
{
mxAnimationNode = xNode;
- if( mpMainSequence.get() )
+ if( mpMainSequence )
mpMainSequence->reset( xNode );
}
diff --git a/sd/source/core/undoanim.cxx b/sd/source/core/undoanim.cxx
index 8ad89efcc159..707d14bf885b 100644
--- a/sd/source/core/undoanim.cxx
+++ b/sd/source/core/undoanim.cxx
@@ -124,10 +124,10 @@ struct UndoAnimationPathImpl
return;
std::shared_ptr< sd::MainSequence > pMainSequence( mpPage->getMainSequence() );
- if( pMainSequence.get() )
+ if( pMainSequence )
{
CustomAnimationEffectPtr pEffect( pMainSequence->findEffect( xNode ) );
- if( pEffect.get() )
+ if( pEffect )
{
mnEffectOffset = pMainSequence->getOffsetFromEffect( pEffect );
msUndoPath = pEffect->getPath();
@@ -143,7 +143,7 @@ struct UndoAnimationPathImpl
if( mpPage && (mnEffectOffset >= 0) )
{
std::shared_ptr< sd::MainSequence > pMainSequence( mpPage->getMainSequence() );
- if( pMainSequence.get() )
+ if( pMainSequence )
pEffect = pMainSequence->getEffectFromOffset( mnEffectOffset );
}
return pEffect;
@@ -163,7 +163,7 @@ UndoAnimationPath::~UndoAnimationPath()
void UndoAnimationPath::Undo()
{
CustomAnimationEffectPtr pEffect = mpImpl->getEffect();
- if( pEffect.get() )
+ if( pEffect )
{
mpImpl->msRedoPath = pEffect->getPath();
pEffect->setPath( mpImpl->msUndoPath );
@@ -173,7 +173,7 @@ void UndoAnimationPath::Undo()
void UndoAnimationPath::Redo()
{
CustomAnimationEffectPtr pEffect = mpImpl->getEffect();
- if( pEffect.get() )
+ if( pEffect )
{
pEffect->setPath( mpImpl->msRedoPath );
}
diff --git a/sd/source/filter/ppt/ppt97animations.cxx b/sd/source/filter/ppt/ppt97animations.cxx
index 64312a026292..96d578019753 100644
--- a/sd/source/filter/ppt/ppt97animations.cxx
+++ b/sd/source/filter/ppt/ppt97animations.cxx
@@ -560,7 +560,7 @@ void Ppt97Animation::createAndSetCustomAnimationEffect( SdrObject* pObj )
return;
}
::sd::MainSequencePtr pMainSequence = static_cast<SdPage*>(pObj->getSdrPageFromSdrObject())->getMainSequence();
- if( !pMainSequence.get() )
+ if( !pMainSequence )
{
OSL_FAIL("no MainSequence found for ppt import");
return;
@@ -568,7 +568,7 @@ void Ppt97Animation::createAndSetCustomAnimationEffect( SdrObject* pObj )
const ::sd::CustomAnimationPresets& rPresets( ::sd::CustomAnimationPresets::getCustomAnimationPresets() );
::sd::CustomAnimationPresetPtr pPreset( rPresets.getEffectDescriptor( GetPresetId() ) );
- if( !pPreset.get() )
+ if( !pPreset )
{
OSL_FAIL("no suitable preset found for ppt import");
return;
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 9a7e2b5f93b5..26453ed7033c 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -1487,7 +1487,7 @@ struct Ppt97AnimationStlSortHelper
bool Ppt97AnimationStlSortHelper::operator()( const std::pair< SdrObject*, Ppt97AnimationPtr >& p1, const std::pair< SdrObject*, Ppt97AnimationPtr >& p2 )
{
- if( !p1.second.get() || !p2.second.get() )
+ if( !p1.second || !p2.second )
return p1.second.get() < p2.second.get();
if( *p1.second < *p2.second )
return true;
@@ -1853,7 +1853,7 @@ void ImplSdPPTImport::ImportPageEffect( SdPage* pPage, const bool bNewAnimations
for( auto& rEntry : aAnimationsOnThisPage )
{
Ppt97AnimationPtr pPpt97Animation = rEntry.second;
- if( pPpt97Animation.get() )
+ if( pPpt97Animation )
pPpt97Animation->createAndSetCustomAnimationEffect( rEntry.first );
}
}
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index b19e76350c70..c9f64e2c8125 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -144,7 +144,7 @@ void SdPresetPropertyBox::setValue( const Any& rValue, const OUString& rPresetId
const CustomAnimationPresets& rPresets = CustomAnimationPresets::getCustomAnimationPresets();
CustomAnimationPresetPtr pDescriptor = rPresets.getEffectDescriptor( rPresetId );
- if( pDescriptor.get() )
+ if( pDescriptor )
{
OUString aPropertyValue;
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx
index e6ccb0c3c721..9444d21ed192 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -555,7 +555,7 @@ CustomAnimationList::~CustomAnimationList()
mnPostCollapseEvent = nullptr;
}
- if( mpMainSequence.get() )
+ if( mpMainSequence )
mpMainSequence->removeListener( this );
clear();
@@ -631,13 +631,13 @@ void CustomAnimationList::clear()
void CustomAnimationList::update( const MainSequencePtr& pMainSequence )
{
- if( mpMainSequence.get() )
+ if( mpMainSequence )
mpMainSequence->removeListener( this );
mpMainSequence = pMainSequence;
update();
- if( mpMainSequence.get() )
+ if( mpMainSequence )
mpMainSequence->addListener( this );
}
@@ -670,7 +670,7 @@ void CustomAnimationList::update()
std::unique_ptr<weld::TreeIter> xEntry = mxTreeView->make_iterator();
- if( mpMainSequence.get() )
+ if( mpMainSequence )
{
std::unique_ptr<weld::TreeIter> xLastSelectedEntry;
std::unique_ptr<weld::TreeIter> xLastVisibleEntry;
@@ -680,7 +680,7 @@ void CustomAnimationList::update()
&aSelected, &nFirstSelOld, &pFirstSelEffect, &xLastSelectedEntry](weld::TreeIter& rEntry){
CustomAnimationListEntryItem* pEntry = reinterpret_cast<CustomAnimationListEntryItem*>(mxTreeView->get_id(rEntry).toInt64());
CustomAnimationEffectPtr pEffect(pEntry->getEffect());
- if (pEffect.get())
+ if (pEffect)
{
if (weld::IsEntryVisible(*mxTreeView, rEntry))
{
@@ -735,7 +735,7 @@ void CustomAnimationList::update()
clear();
- if (mpMainSequence.get())
+ if (mpMainSequence)
{
std::for_each( mpMainSequence->getBegin(), mpMainSequence->getEnd(), stl_append_effect_func( *this ) );
mxLastParentEntry.reset();
@@ -768,7 +768,7 @@ void CustomAnimationList::update()
mxTreeView->show();
}
- if (mpMainSequence.get())
+ if (mpMainSequence)
{
long nFirstSelNew = -1;
long nLastSelNew = -1;
@@ -783,7 +783,7 @@ void CustomAnimationList::update()
CustomAnimationListEntryItem* pEntry = reinterpret_cast<CustomAnimationListEntryItem*>(mxTreeView->get_id(*xEntry).toInt64());
CustomAnimationEffectPtr pEffect( pEntry->getEffect() );
- if (pEffect.get())
+ if (pEffect)
{
// Any effects that were visible should still be visible, so expand their parents.
// (a previously expanded parent may have moved leaving a child to now be the new parent to expand)
@@ -1112,7 +1112,7 @@ EffectSequence CustomAnimationList::getSelection() const
{
CustomAnimationListEntryItem* pChild = reinterpret_cast<CustomAnimationListEntryItem*>(mxTreeView->get_id(*xChild).toInt64());
const CustomAnimationEffectPtr& pChildEffect( pChild->getEffect() );
- if( pChildEffect.get() )
+ if( pChildEffect )
aSelection.push_back( pChildEffect );
}
} while (mxTreeView->iter_next_sibling(*xChild));
@@ -1146,7 +1146,7 @@ IMPL_LINK(CustomAnimationList, CommandHdl, const CommandEvent&, rCEvt, bool)
CustomAnimationEffectPtr pEffect(pEntry->getEffect());
nEntries++;
- if (pEffect.get())
+ if (pEffect)
{
if( nNodeType == -1 )
{
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index c85f9df7a90b..a55f93beecbc 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -323,7 +323,7 @@ IMPL_LINK(CustomAnimationPane,EventMultiplexerListener,
onChangeCurrentPage();
break;
case EventMultiplexerEventId::EndTextEdit:
- if (mpMainSequence.get() && rEvent.mpUserData)
+ if (mpMainSequence && rEvent.mpUserData)
mxCustomAnimationList->update( mpMainSequence );
break;
default: break;
@@ -540,7 +540,7 @@ void CustomAnimationPane::updateControls()
Any aValue;
CustomAnimationPresetPtr pDescriptor = CustomAnimationPresets::getCustomAnimationPresets().getEffectDescriptor( pEffect->getPresetId() );
- if (pDescriptor.get())
+ if (pDescriptor)
{
std::vector<OUString> aProperties( pDescriptor->getProperties() );
if( !aProperties.empty() )
@@ -572,7 +572,7 @@ void CustomAnimationPane::updateControls()
mxPlaceholderBox->set_sensitive( bEnable );
mxFTProperty->set_sensitive( bEnable );
- if (!pDescriptor.get())
+ if (!pDescriptor)
{
mxPBPropertyMore->set_sensitive( false );
mxFTStartDelay->set_sensitive( false );
@@ -609,7 +609,7 @@ void CustomAnimationPane::updateControls()
if (nEntryData)
{
CustomAnimationPresetPtr& pPtr = *reinterpret_cast<CustomAnimationPresetPtr*>(nEntryData);
- if( pPtr.get() && pPtr->getPresetId() == rsPresetId )
+ if( pPtr && pPtr->getPresetId() == rsPresetId )
{
mxLBAnimation->select( nAnimationPos );
mnLastSelectedAnimation = nAnimationPos;
@@ -719,7 +719,7 @@ void CustomAnimationPane::updateControls()
EffectSequenceHelper* pSequence = nullptr;
for( const CustomAnimationEffectPtr& pEffect : maListSelection )
{
- if( pEffect.get() )
+ if( pEffect )
{
if( pSequence == nullptr )
{
@@ -754,7 +754,7 @@ static bool updateMotionPathImpl( CustomAnimationPane& rPane, ::sd::View& rView,
while( aIter != aEnd )
{
CustomAnimationEffectPtr pEffect( *aIter++ );
- if( pEffect.get() && pEffect->getPresetClass() == css::presentation::EffectPresetClass::MOTIONPATH )
+ if( pEffect && pEffect->getPresetClass() == css::presentation::EffectPresetClass::MOTIONPATH )
{
rtl::Reference< MotionPathTag > xMotionPathTag;
// first try to find if there is already a tag for this
@@ -797,11 +797,11 @@ void CustomAnimationPane::updateMotionPathTags()
if( mxView.is() )
{
std::shared_ptr<ViewShell> xViewShell( mrBase.GetMainViewShell() );
- if( xViewShell.get() )
+ if( xViewShell )
pView = xViewShell->GetView();
}
- if( IsVisible() && mpMainSequence.get() && pView )
+ if( IsVisible() && mpMainSequence && pView )
{
bChanges = updateMotionPathImpl( *this, *pView, mpMainSequence->getBegin(), mpMainSequence->getEnd(), aTags, maMotionPathTags );
@@ -1155,10 +1155,10 @@ std::unique_ptr<STLPropertySet> CustomAnimationPane::createSelectionSet()
if( nGroupId != -1 )
pTextGroup = pEffectSequence->findGroup( nGroupId );
- addValue( pSet, nHandleTextGrouping, makeAny( pTextGroup.get() ? pTextGroup->getTextGrouping() : sal_Int32(-1) ) );
+ addValue( pSet, nHandleTextGrouping, makeAny( pTextGroup ? pTextGroup->getTextGrouping() : sal_Int32(-1) ) );
addValue( pSet, nHandleAnimateForm, makeAny( pTextGroup.get() == nullptr || pTextGroup->getAnimateForm() ) );
- addValue( pSet, nHandleTextGroupingAuto, makeAny( pTextGroup.get() ? pTextGroup->getTextGroupingAuto() : -1.0 ) );
- addValue( pSet, nHandleTextReverse, makeAny( pTextGroup.get() && pTextGroup->getTextReverse() ) );
+ addValue( pSet, nHandleTextGroupingAuto, makeAny( pTextGroup ? pTextGroup->getTextGroupingAuto() : -1.0 ) );
+ addValue( pSet, nHandleTextReverse, makeAny( pTextGroup && pTextGroup->getTextReverse() ) );
if( pEffectSequence->getSequenceType() == EffectNodeType::INTERACTIVE_SEQUENCE )
{
@@ -1167,7 +1167,7 @@ std::unique_ptr<STLPropertySet> CustomAnimationPane::createSelectionSet()
}
CustomAnimationPresetPtr pDescriptor = rPresets.getEffectDescriptor( pEffect->getPresetId() );
- if( pDescriptor.get() )
+ if( pDescriptor )
{
sal_Int32 nType = nPropertyTypeNone;
@@ -1544,7 +1544,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet const * pResultSet, ST
if( bHasAnimateForm )
{
- if( pTextGroup.get() && pTextGroup->getAnimateForm() != bAnimateForm )
+ if( pTextGroup && pTextGroup->getAnimateForm() != bAnimateForm )
{
if( (pTextGroup->getTextGrouping() >= 0) && (nTextGrouping == -1 ) )
{
@@ -1562,7 +1562,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet const * pResultSet, ST
if( bHasTextGrouping )
{
- if( pTextGroup.get() && pTextGroup->getTextGrouping() != nTextGrouping )
+ if( pTextGroup && pTextGroup->getTextGrouping() != nTextGrouping )
{
pEffectSequence->setTextGrouping( pTextGroup, nTextGrouping );
@@ -1582,7 +1582,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet const * pResultSet, ST
if (!bDoSetAnimateFormFirst && bNeedDoSetAnimateForm)
{
- if( pTextGroup.get() )
+ if( pTextGroup )
{
pEffectSequence->setAnimateForm( pTextGroup, bAnimateForm );
bChanged = true;
@@ -1591,7 +1591,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet const * pResultSet, ST
if( bHasTextGroupingAuto )
{
- if( pTextGroup.get() && pTextGroup->getTextGroupingAuto() != fTextGroupingAuto )
+ if( pTextGroup && pTextGroup->getTextGroupingAuto() != fTextGroupingAuto )
{
pEffectSequence->setTextGroupingAuto( pTextGroup, fTextGroupingAuto );
bChanged = true;
@@ -1600,7 +1600,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet const * pResultSet, ST
if( bHasTextReverse )
{
- if( pTextGroup.get() && pTextGroup->getTextReverse() != bTextReverse )
+ if( pTextGroup && pTextGroup->getTextReverse() != bTextReverse )
{
pEffectSequence->setTextReverse( pTextGroup, bTextReverse );
bChanged = true;
@@ -1817,7 +1817,7 @@ void CustomAnimationPane::onAdd()
mxCBXDuration->set_sensitive( bHasSpeed );
mxFTDuration->set_sensitive( bHasSpeed );
- if( pDescriptor.get() )
+ if( pDescriptor )
{
mxCustomAnimationList->unselect_all();
@@ -1842,7 +1842,7 @@ void CustomAnimationPane::onAdd()
else
pCreated->setNodeType( EffectNodeType::WITH_PREVIOUS );
- if( pCreated.get() )
+ if( pCreated )
mxCustomAnimationList->select( pCreated );
}
}
@@ -2214,7 +2214,7 @@ sal_Int32 CustomAnimationPane::fillAnimationLB( bool bHasText )
for (PresetCategoryPtr& pCategory : rCategoryList)
{
- if( pCategory.get() )
+ if( pCategory )
{
InsertCategory(*mxLBAnimation, pCategory->maLabel);
@@ -2226,7 +2226,7 @@ sal_Int32 CustomAnimationPane::fillAnimationLB( bool bHasText )
for( CustomAnimationPresetPtr& pDescriptor : aSortedVector )
{
// ( !isTextOnly || ( isTextOnly && bHasText ) ) <=> !isTextOnly || bHasText
- if( pDescriptor.get() && ( !pDescriptor->isTextOnly() || bHasText ) )
+ if( pDescriptor && ( !pDescriptor->isTextOnly() || bHasText ) )
{
auto pCustomPtr = new CustomAnimationPresetPtr(pDescriptor);
OUString sId = OUString::number(reinterpret_cast<sal_Int64>(pCustomPtr));
@@ -2467,7 +2467,7 @@ void CustomAnimationPane::onSelect()
// pEffectInsertBefore may be null if moving to end of list.
void CustomAnimationPane::onDragNDropComplete(std::vector< CustomAnimationEffectPtr > pEffectsDragged, CustomAnimationEffectPtr pEffectInsertBefore)
{
- if ( !mpMainSequence.get() )
+ if ( !mpMainSequence )
return;
addUndo();
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index 8cd867a89c1a..512ed85a786d 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -111,7 +111,7 @@ SfxItemPool* GetAnnotationPool()
static SfxBindings* getBindings( ViewShellBase const & rBase )
{
- if( rBase.GetMainViewShell().get() && rBase.GetMainViewShell()->GetViewFrame() )
+ if( rBase.GetMainViewShell() && rBase.GetMainViewShell()->GetViewFrame() )
return &rBase.GetMainViewShell()->GetViewFrame()->GetBindings();
return nullptr;
@@ -119,7 +119,7 @@ static SfxBindings* getBindings( ViewShellBase const & rBase )
static SfxDispatcher* getDispatcher( ViewShellBase const & rBase )
{
- if( rBase.GetMainViewShell().get() && rBase.GetMainViewShell()->GetViewFrame() )
+ if( rBase.GetMainViewShell() && rBase.GetMainViewShell()->GetViewFrame() )
return rBase.GetMainViewShell()->GetViewFrame()->GetDispatcher();
return nullptr;
@@ -1292,7 +1292,7 @@ SdPage* AnnotationManagerImpl::GetNextPage( SdPage const * pPage, bool bForward
SdPage* AnnotationManagerImpl::GetCurrentPage()
{
- if (mrBase.GetMainViewShell().get())
+ if (mrBase.GetMainViewShell())
return mrBase.GetMainViewShell()->getCurrentPage();
return nullptr;
}
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index ad0ce701bdfe..86fa9198dc05 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -452,7 +452,7 @@ void DrawDocShell::ClearUndoBuffer()
if( pViewShellBase )
{
std::shared_ptr<ViewShell> pViewSh( pViewShellBase->GetMainViewShell() );
- if( pViewSh.get() )
+ if( pViewSh )
{
::sd::View* pView = pViewSh->GetView();
if( pView )
diff --git a/sd/source/ui/func/fuconbez.cxx b/sd/source/ui/func/fuconbez.cxx
index 7630ea02304e..526210ae84c9 100644
--- a/sd/source/ui/func/fuconbez.cxx
+++ b/sd/source/ui/func/fuconbez.cxx
@@ -230,7 +230,7 @@ bool FuConstructBezierPolygon::MouseButtonUp(const MouseEvent& rMEvt )
if( pPage )
{
std::shared_ptr< sd::MainSequence > pMainSequence( pPage->getMainSequence() );
- if( pMainSequence.get() )
+ if( pMainSequence )
{
Sequence< Any > aTargets;
maTargets >>= aTargets;
diff --git a/sd/source/ui/func/fuformatpaintbrush.cxx b/sd/source/ui/func/fuformatpaintbrush.cxx
index e4c305808b6f..437af13d0270 100644
--- a/sd/source/ui/func/fuformatpaintbrush.cxx
+++ b/sd/source/ui/func/fuformatpaintbrush.cxx
@@ -163,7 +163,7 @@ bool FuFormatPaintBrush::MouseMove(const MouseEvent& rMEvt)
bool FuFormatPaintBrush::MouseButtonUp(const MouseEvent& rMEvt)
{
- if( mxItemSet.get() && mpView && mpView->AreObjectsMarked() )
+ if( mxItemSet && mpView && mpView->AreObjectsMarked() )
{
bool bNoCharacterFormats = false;
bool bNoParagraphFormats = false;
@@ -231,7 +231,7 @@ bool FuFormatPaintBrush::HasContentForThisType( SdrInventor nObjectInventor, sal
void FuFormatPaintBrush::Paste( bool bNoCharacterFormats, bool bNoParagraphFormats )
{
const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
- if( !(mxItemSet.get() && ( rMarkList.GetMarkCount() == 1 )) )
+ if( !(mxItemSet && ( rMarkList.GetMarkCount() == 1 )) )
return;
SdrObject* pObj( nullptr );
diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx
index 1b63f0d06f14..74bbe395d92d 100644
--- a/sd/source/ui/slideshow/slideshow.cxx
+++ b/sd/source/ui/slideshow/slideshow.cxx
@@ -1067,14 +1067,14 @@ void SlideShow::StartInPlacePresentation()
::std::shared_ptr<FrameworkHelper> pHelper(FrameworkHelper::Instance(*mpCurrentViewShellBase));
::std::shared_ptr<ViewShell> pMainViewShell(pHelper->GetViewShell(FrameworkHelper::msCenterPaneURL));
- if( pMainViewShell.get() )
+ if( pMainViewShell )
eShell = pMainViewShell->GetShellType();
if( eShell != ViewShell::ST_IMPRESS )
{
// Switch temporary to a DrawViewShell which supports the in-place presentation.
- if( pMainViewShell.get() )
+ if( pMainViewShell )
{
FrameView* pFrameView = pMainViewShell->GetFrameView();
pFrameView->SetPresentationViewShellId(SID_VIEWSHELL1);
@@ -1107,7 +1107,7 @@ void SlideShow::StartInPlacePresentation()
return;
bool bSuccess = false;
- if( mxCurrentSettings.get() && mxCurrentSettings->mbPreview )
+ if( mxCurrentSettings && mxCurrentSettings->mbPreview )
{
bSuccess = mxController->startPreview(mxCurrentSettings->mxStartPage, mxCurrentSettings->mxAnimationNode, mxCurrentSettings->mpParentWindow );
}
@@ -1120,7 +1120,7 @@ void SlideShow::StartInPlacePresentation()
end();
else
{
- if( mpCurrentViewShellBase && ( !mxCurrentSettings.get() || ( mxCurrentSettings.get() && !mxCurrentSettings->mbPreview ) ) )
+ if( mpCurrentViewShellBase && ( !mxCurrentSettings || ( mxCurrentSettings && !mxCurrentSettings->mbPreview ) ) )
mpCurrentViewShellBase->GetWindow()->GrabFocus();
}
}
@@ -1149,7 +1149,7 @@ void SlideShow::StartFullscreenPresentation( )
// view shells.
FrameView* pOriginalFrameView = nullptr;
::std::shared_ptr<ViewShell> xShell(mpCurrentViewShellBase->GetMainViewShell());
- if (xShell.get())
+ if (xShell)
pOriginalFrameView = xShell->GetFrameView();
delete mpFullScreenFrameView;
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index e92bb0b509ce..03fbc17a10dc 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -1310,7 +1310,7 @@ void SlideshowImpl::displayCurrentSlide (const bool bSkipAllMainSequenceEffects)
stopSound();
removeShapeEvents();
- if( mpSlideController.get() && mxShow.is() )
+ if( mpSlideController && mxShow.is() )
{
Reference< XDrawPagesSupplier > xDrawPages( mpDoc->getUnoModel(),
UNO_QUERY_THROW );
@@ -1431,7 +1431,7 @@ void SlideshowImpl::click( const Reference< XShape >& xShape )
SolarMutexGuard aSolarGuard;
WrappedShapeEventImplPtr pEvent = maShapeEventMap[xShape];
- if( !pEvent.get() )
+ if( !pEvent )
return;
switch( pEvent->meClickAction )
@@ -1589,7 +1589,7 @@ void SlideshowImpl::hyperLinkClicked( OUString const& aHyperLink )
void SlideshowImpl::displaySlideNumber( sal_Int32 nSlideNumber )
{
- if( mpSlideController.get() )
+ if( mpSlideController )
{
if( mpSlideController->jumpToSlideNumber( nSlideNumber ) )
{
@@ -1601,7 +1601,7 @@ void SlideshowImpl::displaySlideNumber( sal_Int32 nSlideNumber )
/** nSlideIndex == -1 displays current slide again */
void SlideshowImpl::displaySlideIndex( sal_Int32 nSlideIndex )
{
- if( mpSlideController.get() )
+ if( mpSlideController )
{
if( (nSlideIndex == -1) || mpSlideController->jumpToSlideIndex( nSlideIndex ) )
{
@@ -1619,7 +1619,7 @@ void SlideshowImpl::jumpToBookmark( const OUString& sBookmark )
sal_Int32 SlideshowImpl::getCurrentSlideNumber() const
{
- return mpSlideController.get() ? mpSlideController->getCurrentSlideNumber() : -1;
+ return mpSlideController ? mpSlideController->getCurrentSlideNumber() : -1;
}
sal_Bool SAL_CALL SlideshowImpl::isEndless()
@@ -1736,7 +1736,7 @@ bool SlideshowImpl::keyInput(const KeyEvent& rKEvt)
case KEY_SUBTRACT:
// in case the user cancels the presentation, switch to current slide
// in edit mode
- if( mpSlideController.get() && (ANIMATIONMODE_SHOW == meAnimationMode) )
+ if( mpSlideController && (ANIMATIONMODE_SHOW == meAnimationMode) )
{
if( mpSlideController->getCurrentSlideNumber() != -1 )
mnRestoreSlide = mpSlideController->getCurrentSlideNumber();
@@ -1763,7 +1763,7 @@ bool SlideshowImpl::keyInput(const KeyEvent& rKEvt)
{
if( !maCharBuffer.isEmpty() )
{
- if( mpSlideController.get() )
+ if( mpSlideController )
{
if( mpSlideController->jumpToSlideNumber( maCharBuffer.toInt32() - 1 ) )
displayCurrentSlide();
@@ -1900,7 +1900,7 @@ IMPL_LINK( SlideshowImpl, EventListenerHdl, VclSimpleEvent&, rSimpleEvent, void
case MediaCommand::Stop:
// in case the user cancels the presentation, switch to current slide
// in edit mode
- if( mpSlideController.get() && (ANIMATIONMODE_SHOW == meAnimationMode) )
+ if( mpSlideController && (ANIMATIONMODE_SHOW == meAnimationMode) )
{
if( mpSlideController->getCurrentSlideNumber() != -1 )
mnRestoreSlide = mpSlideController->getCurrentSlideNumber();
@@ -2157,7 +2157,7 @@ IMPL_LINK( SlideshowImpl, ContextMenuSelectHdl, Menu *, pMenu, bool )
// When in autoplay mode (pps/ppsx), offer editing of the presentation
// Turn autostart off, else Impress will close when exiting the Presentation
mpViewShell->GetDoc()->SetExitAfterPresenting(false);
- if( mpSlideController.get() && (ANIMATIONMODE_SHOW == meAnimationMode) )
+ if( mpSlideController && (ANIMATIONMODE_SHOW == meAnimationMode) )
{
if( mpSlideController->getCurrentSlideNumber() != -1 )
{
@@ -2170,7 +2170,7 @@ IMPL_LINK( SlideshowImpl, ContextMenuSelectHdl, Menu *, pMenu, bool )
{
// in case the user cancels the presentation, switch to current slide
// in edit mode
- if( mpSlideController.get() && (ANIMATIONMODE_SHOW == meAnimationMode) )
+ if( mpSlideController && (ANIMATIONMODE_SHOW == meAnimationMode) )
{
if( mpSlideController->getCurrentSlideNumber() != -1 )
{
@@ -2529,7 +2529,7 @@ Reference< XDrawPage > SAL_CALL SlideshowImpl::getCurrentSlide()
SolarMutexGuard aSolarGuard;
Reference< XDrawPage > xSlide;
- if( mxShow.is() && mpSlideController.get() )
+ if( mxShow.is() && mpSlideController )
{
sal_Int32 nSlide = getCurrentSlideNumber();
if( (nSlide >= 0) && (nSlide < mpSlideController->getSlideNumberCount() ) )
@@ -2555,14 +2555,14 @@ sal_Int32 SAL_CALL SlideshowImpl::getNextSlideIndex()
sal_Int32 SAL_CALL SlideshowImpl::getCurrentSlideIndex()
{
- return mpSlideController.get() ? mpSlideController->getCurrentSlideIndex() : -1;
+ return mpSlideController ? mpSlideController->getCurrentSlideIndex() : -1;
}
// css::presentation::XSlideShowController:
::sal_Int32 SAL_CALL SlideshowImpl::getSlideCount()
{
- return mpSlideController.get() ? mpSlideController->getSlideIndexCount() : 0;
+ return mpSlideController ? mpSlideController->getSlideIndexCount() : 0;
}
Reference< XDrawPage > SAL_CALL SlideshowImpl::getSlideByIndex(::sal_Int32 Index)
@@ -2717,7 +2717,7 @@ void SAL_CALL SlideshowImpl::gotoNextEffect( )
{
SolarMutexGuard aSolarGuard;
- if( !(mxShow.is() && mpSlideController.get() && mpShowWindow) )
+ if( !(mxShow.is() && mpSlideController && mpShowWindow) )
return;
if( mbIsPaused )
@@ -2743,7 +2743,7 @@ void SAL_CALL SlideshowImpl::gotoPreviousEffect( )
{
SolarMutexGuard aSolarGuard;
- if( !(mxShow.is() && mpSlideController.get() && mpShowWindow) )
+ if( !(mxShow.is() && mpSlideController && mpShowWindow) )
return;
if( mbIsPaused )
@@ -2765,7 +2765,7 @@ void SAL_CALL SlideshowImpl::gotoFirstSlide( )
{
SolarMutexGuard aSolarGuard;
- if( !(mpShowWindow && mpSlideController.get()) )
+ if( !(mpShowWindow && mpSlideController) )
return;
if( mbIsPaused )
@@ -2805,7 +2805,7 @@ void SAL_CALL SlideshowImpl::gotoNextSlide( )
maInputFreezeTimer.Start();
}
- if( mpSlideController.get() )
+ if( mpSlideController )
{
if( mpSlideController->nextSlide() )
{
@@ -2862,7 +2862,7 @@ void SlideshowImpl::gotoPreviousSlide (const bool bSkipAllMainSequenceEffects)
{
SolarMutexGuard aSolarGuard;
- if( !(mxShow.is() && mpSlideController.get()) )
+ if( !(mxShow.is() && mpSlideController) )
return;
try
@@ -2909,7 +2909,7 @@ void SAL_CALL SlideshowImpl::gotoLastSlide()
{
SolarMutexGuard aSolarGuard;
- if( !mpSlideController.get() )
+ if( !mpSlideController )
return;
if( mbIsPaused )
@@ -2945,7 +2945,7 @@ void SAL_CALL SlideshowImpl::gotoSlide( const Reference< XDrawPage >& xSlide )
{
SolarMutexGuard aSolarGuard;
- if( !(mpSlideController.get() && xSlide.is()) )
+ if( !(mpSlideController && xSlide.is()) )
return;
if( mbIsPaused )
diff --git a/sd/source/ui/slideshow/slideshowviewimpl.cxx b/sd/source/ui/slideshow/slideshowviewimpl.cxx
index 56d14adf2370..46d92f8967ba 100644
--- a/sd/source/ui/slideshow/slideshowviewimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowviewimpl.cxx
@@ -291,7 +291,7 @@ Reference< rendering::XSpriteCanvas > SAL_CALL SlideShowView::getCanvas( )
{
::osl::MutexGuard aGuard( m_aMutex );
- return mpCanvas.get() ? mpCanvas->getUNOSpriteCanvas() : Reference< rendering::XSpriteCanvas >();
+ return mpCanvas ? mpCanvas->getUNOSpriteCanvas() : Reference< rendering::XSpriteCanvas >();
}
void SAL_CALL SlideShowView::clear()
@@ -311,7 +311,7 @@ void SAL_CALL SlideShowView::clear()
::cppcanvas::PolyPolygonSharedPtr pPolyPoly(
::cppcanvas::BaseGfxFactory::createPolyPolygon( mpCanvas, aPoly ) );
- if( pPolyPoly.get() )
+ if( pPolyPoly )
{
pPolyPoly->setRGBAFillColor( 0x000000FFU );
pPolyPoly->draw();
diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx
index 64009e7bfe77..277ff844acad 100644
--- a/sd/source/ui/table/TableDesignPane.cxx
+++ b/sd/source/ui/table/TableDesignPane.cxx
@@ -128,7 +128,7 @@ TableDesignWidget::~TableDesignWidget()
static SfxBindings* getBindings( ViewShellBase const & rBase )
{
- if( rBase.GetMainViewShell().get() && rBase.GetMainViewShell()->GetViewFrame() )
+ if( rBase.GetMainViewShell() && rBase.GetMainViewShell()->GetViewFrame() )
return &rBase.GetMainViewShell()->GetViewFrame()->GetBindings();
else
return nullptr;
@@ -136,7 +136,7 @@ static SfxBindings* getBindings( ViewShellBase const & rBase )
static SfxDispatcher* getDispatcher( ViewShellBase const & rBase )
{
- if( rBase.GetMainViewShell().get() && rBase.GetMainViewShell()->GetViewFrame() )
+ if( rBase.GetMainViewShell() && rBase.GetMainViewShell()->GetViewFrame() )
return rBase.GetMainViewShell()->GetViewFrame()->GetDispatcher();
else
return nullptr;
@@ -526,7 +526,7 @@ static void FillCellInfoMatrix( const CellInfoVector& rStyle, const TableStyleSe
xCellInfo = rStyle[sdr::table::last_row_style];
}
- if( !xCellInfo.get() )
+ if( !xCellInfo )
{
// next come first and last column, if used and available
if( rSettings.mbUseFirstColumn && (nCol == 0) )
@@ -539,7 +539,7 @@ static void FillCellInfoMatrix( const CellInfoVector& rStyle, const TableStyleSe
}
}
- if( !xCellInfo.get() )
+ if( !xCellInfo )
{
if( rSettings.mbUseRowBanding )
{
@@ -554,7 +554,7 @@ static void FillCellInfoMatrix( const CellInfoVector& rStyle, const TableStyleSe
}
}
- if( !xCellInfo.get() )
+ if( !xCellInfo )
{
if( rSettings.mbUseColumnBanding )
{
@@ -569,7 +569,7 @@ static void FillCellInfoMatrix( const CellInfoVector& rStyle, const TableStyleSe
}
}
- if( !xCellInfo.get() )
+ if( !xCellInfo )
{
// use default cell style if non found yet
xCellInfo = rStyle[sdr::table::body_style];
@@ -614,7 +614,7 @@ static BitmapEx CreateDesignPreview( const Reference< XIndexAccess >& xTableStyl
std::shared_ptr< CellInfo > xCellInfo(aMatrix[(nCol * nPreviewColumns) + nRow]);
Color aTextColor( COL_AUTO );
- if( xCellInfo.get() )
+ if( xCellInfo )
{
// fill cell background
const ::tools::Rectangle aRect( nX, nY, nX + nCellWidth - 1, nY + nCellHeight - 1 );
@@ -647,7 +647,7 @@ static BitmapEx CreateDesignPreview( const Reference< XIndexAccess >& xTableStyl
{
std::shared_ptr< CellInfo > xCellInfo(aMatrix[(nCol * nPreviewColumns) + nRow]);
- if( xCellInfo.get() )
+ if( xCellInfo )
{
const Point aPntTL( nX, nY );
const Point aPntTR( nX + nCellWidth - 1, nY );
@@ -670,7 +670,7 @@ static BitmapEx CreateDesignPreview( const Reference< XIndexAccess >& xTableStyl
{
// check border
std::shared_ptr< CellInfo > xBorderInfo(aMatrix[(nBorderCol * nPreviewColumns) + nBorderRow]);
- if( xBorderInfo.get() )
+ if( xBorderInfo )
{
const ::editeng::SvxBorderLine* pBorderLine2 = xBorderInfo->maBorder->GetLine(static_cast<SvxBoxItemLine>(static_cast<int>(nLine)^1));
if( pBorderLine2 && pBorderLine2->HasPriority(*pBorderLine) )
diff --git a/sd/source/ui/view/OutlinerIterator.cxx b/sd/source/ui/view/OutlinerIterator.cxx
index 869350fa9571..9629774072fc 100644
--- a/sd/source/ui/view/OutlinerIterator.cxx
+++ b/sd/source/ui/view/OutlinerIterator.cxx
@@ -249,7 +249,7 @@ Iterator OutlinerContainer::CreateDocumentIterator (
case CURRENT:
const std::shared_ptr<DrawViewShell> pDrawViewShell(
std::dynamic_pointer_cast<DrawViewShell>(rpViewShell));
- if (pDrawViewShell.get())
+ if (pDrawViewShell)
{
ePageKind = pDrawViewShell->GetPageKind();
eEditMode = pDrawViewShell->GetEditMode();
@@ -301,7 +301,7 @@ sal_Int32 OutlinerContainer::GetPageIndex (
switch (aLocation)
{
case CURRENT:
- if (pDrawViewShell.get())
+ if (pDrawViewShell)
nPageIndex = pDrawViewShell->GetCurPagePos();
else
{
@@ -346,7 +346,7 @@ IteratorImplBase::IteratorImplBase(SdDrawDocument* pDocument,
if ( ! mpViewShellWeak.expired())
pDrawViewShell = std::dynamic_pointer_cast<DrawViewShell>(rpViewShellWeak.lock());
- if (pDrawViewShell.get())
+ if (pDrawViewShell)
{
maPosition.mePageKind = pDrawViewShell->GetPageKind();
maPosition.meEditMode = pDrawViewShell->GetEditMode();
diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx
index a1d6cdc1b30c..282f4aeb8e93 100644
--- a/sd/source/ui/view/viewoverlaymanager.cxx
+++ b/sd/source/ui/view/viewoverlaymanager.cxx
@@ -488,7 +488,7 @@ bool ViewOverlayManager::CreateTags()
std::shared_ptr<ViewShell> aMainShell = mrBase.GetMainViewShell();
- SdPage* pPage = aMainShell.get() ? aMainShell->getCurrentPage() : nullptr;
+ SdPage* pPage = aMainShell ? aMainShell->getCurrentPage() : nullptr;
if( pPage && !pPage->IsMasterPage() && (pPage->GetPageKind() == PageKind::Standard) )
{