diff options
Diffstat (limited to 'sd/source/ui')
-rw-r--r-- | sd/source/ui/animations/CustomAnimationDialog.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/animations/CustomAnimationList.cxx | 20 | ||||
-rw-r--r-- | sd/source/ui/animations/CustomAnimationPane.cxx | 44 | ||||
-rw-r--r-- | sd/source/ui/annotations/annotationmanager.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/docshell/docshell.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/func/fuconbez.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/func/fuformatpaintbrush.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/slideshow/slideshow.cxx | 10 | ||||
-rw-r--r-- | sd/source/ui/slideshow/slideshowimpl.cxx | 40 | ||||
-rw-r--r-- | sd/source/ui/slideshow/slideshowviewimpl.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/table/TableDesignPane.cxx | 18 | ||||
-rw-r--r-- | sd/source/ui/view/OutlinerIterator.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/view/viewoverlaymanager.cxx | 2 |
13 files changed, 80 insertions, 80 deletions
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) ) { |