diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-30 09:48:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-30 10:32:31 +0000 |
commit | 2b789f2e9db61937763c7f69a37ee44a4913284a (patch) | |
tree | 0af57d4c326ced5182e67e249b51b51af8614462 | |
parent | b5c26668a04e275c2cb015e0890cf74e7054997d (diff) |
use SFX_INTERFACE_NONE constant
inside of constructing SfxInterface(0) by hand
Change-Id: Ic2cbe39366a36b40b672242a250f68135d4e2cd3
Reviewed-on: https://gerrit.libreoffice.org/35892
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sfx2/source/view/frame2.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/frmload.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/view/viewfac.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 6 |
4 files changed, 7 insertions, 7 deletions
diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx index c48711c8fcf2..b040b2b4ab79 100644 --- a/sfx2/source/view/frame2.cxx +++ b/sfx2/source/view/frame2.cxx @@ -242,7 +242,7 @@ SfxFrame* SfxFrame::Create( SfxObjectShell& rDoc, vcl::Window& rWindow, SfxInter ::comphelper::NamedValueCollection aArgs( aLoadArgs ); aArgs.put( "Model", rDoc.GetModel() ); aArgs.put( "Hidden", bHidden ); - if ( nViewId != SfxInterfaceId(0) ) + if ( nViewId != SFX_INTERFACE_NONE ) aArgs.put( "ViewId", (sal_uInt16)nViewId ); aLoadArgs = aArgs.getPropertyValues(); diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx index 90c01dba7dc1..7e5a4be0e59e 100644 --- a/sfx2/source/view/frmload.cxx +++ b/sfx2/source/view/frmload.cxx @@ -541,7 +541,7 @@ SfxInterfaceId SfxFrameLoader_Impl::impl_determineEffectiveViewId_nothrow( const SfxInterfaceId nViewId(i_rDescriptor.getOrDefault( "ViewId", sal_Int16( 0 ) )); try { - if ( nViewId == SfxInterfaceId(0) ) + if ( nViewId == SFX_INTERFACE_NONE ) do { Reference< XViewDataSupplier > xViewDataSupplier( i_rDocument.GetModel(), UNO_QUERY ); @@ -577,7 +577,7 @@ SfxInterfaceId SfxFrameLoader_Impl::impl_determineEffectiveViewId_nothrow( const DBG_UNHANDLED_EXCEPTION(); } - if ( nViewId == SfxInterfaceId(0) ) + if ( nViewId == SFX_INTERFACE_NONE ) nViewId = i_rDocument.GetFactory().GetViewFactory().GetOrdinal(); return nViewId; } diff --git a/sfx2/source/view/viewfac.cxx b/sfx2/source/view/viewfac.cxx index 255a1536887f..fb9da0d9ef40 100644 --- a/sfx2/source/view/viewfac.cxx +++ b/sfx2/source/view/viewfac.cxx @@ -38,7 +38,7 @@ OUString SfxViewFactory::GetAPIViewName() const if ( !m_sViewName.isEmpty() ) return m_sViewName; - if ( GetOrdinal() == SfxInterfaceId(0) ) + if ( GetOrdinal() == SFX_INTERFACE_NONE ) return OUString( "Default" ); return GetLegacyViewName(); diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 5179d4f4ecbe..28a77a83a8c1 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -1305,7 +1305,7 @@ void SfxViewFrame::Construct_Impl( SfxObjectShell *pObjSh ) m_pImpl->bResizeInToOut = true; m_pImpl->bObjLocked = false; m_pImpl->pFocusWin = nullptr; - m_pImpl->nCurViewId = SfxInterfaceId(0); + m_pImpl->nCurViewId = SFX_INTERFACE_NONE; m_pImpl->bReloading = false; m_pImpl->bIsDowning = false; m_pImpl->bModal = false; @@ -1792,7 +1792,7 @@ SfxViewFrame* SfxViewFrame::LoadDocument( SfxObjectShell& i_rDoc, SfxInterfaceId SfxViewFrame* SfxViewFrame::LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const Reference< XFrame >& i_rTargetFrame ) { - return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, i_rTargetFrame, SfxInterfaceId(0), false ); + return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, i_rTargetFrame, SFX_INTERFACE_NONE, false ); } SfxViewFrame* SfxViewFrame::LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const SfxFrameItem* i_pFrameItem, SfxInterfaceId i_nViewId ) @@ -1808,7 +1808,7 @@ SfxViewFrame* SfxViewFrame::DisplayNewDocument( SfxObjectShell& i_rDoc, const Sf return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, pFrameItem ? pFrameItem->GetFrame() : nullptr, - SfxInterfaceId(0), + SFX_INTERFACE_NONE, pHiddenItem && pHiddenItem->GetValue() ); } |