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 /sfx2/source/bastyp | |
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 'sfx2/source/bastyp')
-rw-r--r-- | sfx2/source/bastyp/progress.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sfx2/source/bastyp/progress.cxx b/sfx2/source/bastyp/progress.cxx index a9bcff553e61..be387aa711ec 100644 --- a/sfx2/source/bastyp/progress.cxx +++ b/sfx2/source/bastyp/progress.cxx @@ -74,7 +74,7 @@ struct SfxProgress_Impl void SfxProgress_Impl::Enable_Impl() { - SfxObjectShell* pDoc = static_cast<SfxObjectShell*>(xObjSh); + SfxObjectShell* pDoc = xObjSh.get(); SfxViewFrame *pFrame = SfxViewFrame::GetFirst(pDoc); while ( pFrame ) { @@ -249,7 +249,7 @@ void SfxProgress::SetState { // get the active ViewFrame of the document this progress is working on // if it doesn't work on a document, take the current ViewFrame - SfxObjectShell* pObjSh = pImpl->xObjSh; + SfxObjectShell* pObjSh = pImpl->xObjSh.get(); pImpl->pView = SfxViewFrame::Current(); DBG_ASSERT( pImpl->pView || pObjSh, "Can't make progress bar!"); if ( pObjSh && ( !pImpl->pView || pObjSh != pImpl->pView->GetObjectShell() ) ) @@ -321,16 +321,16 @@ void SfxProgress::Resume() { if ( pImpl->xObjSh.Is() ) { - for ( SfxViewFrame *pFrame = SfxViewFrame::GetFirst(pImpl->xObjSh); + for ( SfxViewFrame *pFrame = SfxViewFrame::GetFirst(pImpl->xObjSh.get() ); pFrame; - pFrame = SfxViewFrame::GetNext( *pFrame, pImpl->xObjSh ) ) + pFrame = SfxViewFrame::GetNext( *pFrame, pImpl->xObjSh.get() ) ) pFrame->GetWindow().EnterWait(); } } - if ( pImpl->xObjSh ) + if ( pImpl->xObjSh.Is() ) { - SfxViewFrame *pFrame = SfxViewFrame::GetFirst(pImpl->xObjSh); + SfxViewFrame *pFrame = SfxViewFrame::GetFirst(pImpl->xObjSh.get()); if ( pFrame ) pFrame->GetBindings().ENTERREGISTRATIONS(); } @@ -366,14 +366,14 @@ void SfxProgress::Suspend() if ( pImpl->xObjSh.Is() ) { for ( SfxViewFrame *pFrame = - SfxViewFrame::GetFirst(pImpl->xObjSh); + SfxViewFrame::GetFirst(pImpl->xObjSh.get()); pFrame; - pFrame = SfxViewFrame::GetNext( *pFrame, pImpl->xObjSh ) ) + pFrame = SfxViewFrame::GetNext( *pFrame, pImpl->xObjSh.get() ) ) pFrame->GetWindow().LeaveWait(); } if ( pImpl->xObjSh.Is() ) { - SfxViewFrame *pFrame = SfxViewFrame::GetFirst(pImpl->xObjSh); + SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pImpl->xObjSh.get() ); if ( pFrame ) pFrame->GetBindings().LEAVEREGISTRATIONS(); } |