diff options
author | Jacek Fraczek <fraczek.jacek@gmail.com> | 2016-10-05 22:00:51 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-10-10 08:48:30 +0000 |
commit | f004aa99514d385f3ee254bba735f5eaeb7d9ad8 (patch) | |
tree | aacd5792f553b8e9cbf029cc7e0797ed0dd423fe /sd/source/ui | |
parent | 728c7327bd97602a38723553ed044ea4c01d13b2 (diff) |
tdf#89307: Removed SvRef::operator T*()
Conditional statements are using SvRef::Is() method.
Changed static_cast<T*>(svRef<T>) occurances to svRef.get().
Added operator == and != to SvRef.
SbxObject::Execute is using SbxVariableRef internally.
SbxObject::FindQualified is using SbxVariableRef internally.
Change-Id: I45b553e35d8fca9bf71163e6eefc60802a066395
Reviewed-on: https://gerrit.libreoffice.org/29621
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sd/source/ui')
-rw-r--r-- | sd/source/ui/app/sdxfer.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlsClipboard.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlsSlotManager.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/view/ViewClipboard.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/sdview3.cxx | 4 |
5 files changed, 8 insertions, 8 deletions
diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx index c699a563fcd7..a92573d7739b 100644 --- a/sd/source/ui/app/sdxfer.cxx +++ b/sd/source/ui/app/sdxfer.cxx @@ -127,7 +127,7 @@ SdTransferable::~SdTransferable() if( maDocShellRef.Is() ) { - SfxObjectShell* pObj = maDocShellRef; + SfxObjectShell* pObj = maDocShellRef.get(); ::sd::DrawDocShell* pDocSh = static_cast< ::sd::DrawDocShell*>(pObj); pDocSh->DoClose(); } diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx index a926f04434d8..4dec3b3e5808 100644 --- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx +++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx @@ -325,7 +325,7 @@ sal_Int32 Clipboard::PasteTransferable (sal_Int32 nInsertPosition) } else { - SfxObjectShell* pShell = pClipTransferable->GetDocShell(); + SfxObjectShell* pShell = pClipTransferable->GetDocShell().get(); DrawDocShell* pDataDocSh = static_cast<DrawDocShell*>(pShell); SdDrawDocument* pDataDoc = pDataDocSh->GetDoc(); diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx index b297daad4693..e65729257426 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx @@ -358,7 +358,7 @@ void SlotManager::FuSupport (SfxRequest& rRequest) SdTransferable* pTransferClip = SD_MOD()->pTransferClip; if( pTransferClip ) { - SfxObjectShell* pTransferDocShell = pTransferClip->GetDocShell(); + SfxObjectShell* pTransferDocShell = pTransferClip->GetDocShell().get(); DrawDocShell* pDocShell = dynamic_cast<DrawDocShell*>(pTransferDocShell); if (pDocShell && pDocShell->GetDoc()->GetPageCount() > 1) @@ -698,14 +698,14 @@ void SlotManager::GetClipboardState ( SfxItemSet& rSet) || rSet.GetItemState(SID_PASTE_SPECIAL) == SfxItemState::DEFAULT) { // no own clipboard data? - if ( !pTransferClip || !pTransferClip->GetDocShell() ) + if ( !pTransferClip || !pTransferClip->GetDocShell().Is() ) { rSet.DisableItem(SID_PASTE); rSet.DisableItem(SID_PASTE_SPECIAL); } else { - SfxObjectShell* pTransferDocShell = pTransferClip->GetDocShell(); + SfxObjectShell* pTransferDocShell = pTransferClip->GetDocShell().get(); if( !pTransferDocShell || static_cast<DrawDocShell*>(pTransferDocShell)->GetDoc()->GetPageCount() <= 1 ) { diff --git a/sd/source/ui/view/ViewClipboard.cxx b/sd/source/ui/view/ViewClipboard.cxx index d6fd07e9cb16..ef088734f3c8 100644 --- a/sd/source/ui/view/ViewClipboard.cxx +++ b/sd/source/ui/view/ViewClipboard.cxx @@ -200,7 +200,7 @@ sal_uInt16 ViewClipboard::InsertSlides ( { // Otherwise all pages of the document of the transferable are // inserted. - SfxObjectShell* pShell = rTransferable.GetDocShell(); + SfxObjectShell* pShell = rTransferable.GetDocShell().get(); pDataDocSh = static_cast<DrawDocShell*>(pShell); SdDrawDocument* pDataDoc = pDataDocSh->GetDoc(); diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index 452a7e4bc5da..e15d320cc6f2 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -363,7 +363,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, // Paste only if SfxClassificationHelper recommends so. const SfxObjectShellRef& pSource = pOwnData->GetDocShell(); SfxObjectShell* pDestination = mrDoc.GetDocSh(); - if (pSource && pDestination) + if (pSource.Is() && pDestination) { SfxClassificationCheckPasteResult eResult = SfxClassificationHelper::CheckPaste(pSource->getDocProperties(), pDestination->getDocProperties()); if (!SfxClassificationHelper::ShowPasteInfo(eResult)) @@ -375,7 +375,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, { const View* pSourceView = pOwnData->GetView(); - if( pOwnData->GetDocShell() && pOwnData->IsPageTransferable() ) + if( pOwnData->GetDocShell().Is() && pOwnData->IsPageTransferable() ) { mpClipboard->HandlePageDrop (*pOwnData); bReturn = true; |