diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2017-03-23 20:14:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-27 09:43:58 +0000 |
commit | d615af618cc6a7152c76a49b3cd09db38eaa9e07 (patch) | |
tree | bc0d69070444dc687708de9a4a146c5c2d3b6852 /sw | |
parent | 6f968f00b1534406a2943be374fab924c3396482 (diff) |
create SfxInterfaceId o3tl::strong_int
Change-Id: Ie52f63382a9fb36f9a472801be012b140bfb51f6
Reviewed-on: https://gerrit.libreoffice.org/35722
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/shellid.hxx | 66 | ||||
-rw-r--r-- | sw/source/core/doc/docglbl.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/html/htmlform.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmresultdialogs.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/app/appenv.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/app/docsh2.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/app/swmodule.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/dbui/dbmgr.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/misc/glshell.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/uno/unomailmerge.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uno/unotxdoc.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/uno/unotxvw.cxx | 2 |
12 files changed, 50 insertions, 50 deletions
diff --git a/sw/inc/shellid.hxx b/sw/inc/shellid.hxx index 33ff3581d847..d7bfe88d0c0e 100644 --- a/sw/inc/shellid.hxx +++ b/sw/inc/shellid.hxx @@ -23,44 +23,44 @@ // Mapping for UI-parameters -#define SW_BASESHELL (SFX_INTERFACE_SW_START + 1) -#define SW_TEXTSHELL (SFX_INTERFACE_SW_START + 2) -#define SW_LISTSHELL (SFX_INTERFACE_SW_START + 3) -#define SW_TABSHELL (SFX_INTERFACE_SW_START + 4) -#define SW_FRAMESHELL (SFX_INTERFACE_SW_START + 5) -#define SW_GRFSHELL (SFX_INTERFACE_SW_START + 6) -#define SW_OLESHELL (SFX_INTERFACE_SW_START + 7) -#define SW_DRAWSHELL (SFX_INTERFACE_SW_START + 8) -#define SW_DRWTXTSHELL (SFX_INTERFACE_SW_START + 9) +#define SW_BASESHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(1)) +#define SW_TEXTSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(2)) +#define SW_LISTSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(3)) +#define SW_TABSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(4)) +#define SW_FRAMESHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(5)) +#define SW_GRFSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(6)) +#define SW_OLESHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(7)) +#define SW_DRAWSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(8)) +#define SW_DRWTXTSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(9)) -#define SW_INTERFACE_MODULE (SFX_INTERFACE_SW_START + 10) -#define SW_DOCSHELL (SFX_INTERFACE_SW_START + 11) -#define SW_VIEWSHELL (SFX_INTERFACE_SW_START + 12) -#define SW_PAGEPREVIEW (SFX_INTERFACE_SW_START + 13) -#define SW_GLOSDOCSHELL (SFX_INTERFACE_SW_START + 14) -#define SW_SRC_VIEWSHELL (SFX_INTERFACE_SW_START + 15) +#define SW_INTERFACE_MODULE (SFX_INTERFACE_SW_START + SfxInterfaceId(10)) +#define SW_DOCSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(11)) +#define SW_VIEWSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(12)) +#define SW_PAGEPREVIEW (SFX_INTERFACE_SW_START + SfxInterfaceId(13)) +#define SW_GLOSDOCSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(14)) +#define SW_SRC_VIEWSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(15)) -#define SW_BEZIERSHELL (SFX_INTERFACE_SW_START + 16) -#define SW_DRAWBASESHELL (SFX_INTERFACE_SW_START + 17) -#define SW_DRAWFORMSHELL (SFX_INTERFACE_SW_START + 18) +#define SW_BEZIERSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(16)) +#define SW_DRAWBASESHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(17)) +#define SW_DRAWFORMSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(18)) -#define SW_WEBDOCSHELL (SFX_INTERFACE_SW_START + 19) -#define SW_WEBVIEWSHELL (SFX_INTERFACE_SW_START + 20) -#define SW_WEBBASESHELL (SFX_INTERFACE_SW_START + 21) -#define SW_WEBTEXTSHELL (SFX_INTERFACE_SW_START + 22) -#define SW_WEBFRAMESHELL (SFX_INTERFACE_SW_START + 23) -#define SW_WEBGLOSDOCSHELL (SFX_INTERFACE_SW_START + 24) -#define SW_WEBLISTSHELL (SFX_INTERFACE_SW_START + 25) -#define SW_WEBTABSHELL (SFX_INTERFACE_SW_START + 26) -#define SW_WEBGRFSHELL (SFX_INTERFACE_SW_START + 27) -#define SW_WEBOLESHELL (SFX_INTERFACE_SW_START + 28) -#define SW_WEBDRAWBASESHELL (SFX_INTERFACE_SW_START + 29) -#define SW_WEBDRAWFORMSHELL (SFX_INTERFACE_SW_START + 30) +#define SW_WEBDOCSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(19)) +#define SW_WEBVIEWSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(20)) +#define SW_WEBBASESHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(21)) +#define SW_WEBTEXTSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(22)) +#define SW_WEBFRAMESHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(23)) +#define SW_WEBGLOSDOCSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(24)) +#define SW_WEBLISTSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(25)) +#define SW_WEBTABSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(26)) +#define SW_WEBGRFSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(27)) +#define SW_WEBOLESHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(28)) +#define SW_WEBDRAWBASESHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(29)) +#define SW_WEBDRAWFORMSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(30)) -#define SW_MEDIASHELL (SFX_INTERFACE_SW_START + 31) -#define SW_ANNOTATIONSHELL (SFX_INTERFACE_SW_START + 32) +#define SW_MEDIASHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(31)) +#define SW_ANNOTATIONSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(32)) -#define SW_NAVIGATIONSHELL (SFX_INTERFACE_SW_START + 33) +#define SW_NAVIGATIONSHELL (SFX_INTERFACE_SW_START + SfxInterfaceId(33)) #endif // _UIPARAM_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx index f4b0afb0d8da..f1580189c70f 100644 --- a/sw/source/core/doc/docglbl.cxx +++ b/sw/source/core/doc/docglbl.cxx @@ -327,7 +327,7 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const OUString& rPath, bool bOutline, if( SPLITDOC_TO_HTML == eDocType && !pDoc->GetSpzFrameFormats()->empty() ) { - SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 ); + SfxViewFrame::LoadHiddenDocument( *xDocSh, SFX_INTERFACE_NONE ); } xDocSh->DoSaveAs( *pTmpMed ); xDocSh->DoSaveCompleted( pTmpMed ); diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index 67dc1883d838..c8dc6f681a69 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -647,7 +647,7 @@ void SwHTMLParser::SetControlSize( const uno::Reference< drawing::XShape >& rSha m_bRemoveHidden = ( pHiddenItem == nullptr || !pHiddenItem->GetValue() ); } - m_pTempViewFrame = SfxViewFrame::LoadHiddenDocument( *pDocSh, 0 ); + m_pTempViewFrame = SfxViewFrame::LoadHiddenDocument( *pDocSh, SFX_INTERFACE_NONE ); CallStartAction(); pVSh = m_xDoc->getIDocumentLayoutAccess().GetCurrentViewShell(); // this ridiculous hack also enables Undo, so turn it off again diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx index a33cf9950900..a61fa90c0909 100644 --- a/sw/source/ui/dbui/mmresultdialogs.cxx +++ b/sw/source/ui/dbui/mmresultdialogs.cxx @@ -694,7 +694,7 @@ IMPL_LINK(SwMMResultSaveDialog, SaveOutputHdl_Impl, Button*, pButton, void) // the shell will be closed at the end, but it is more safe to use SfxObjectShellLock here SfxObjectShellLock xTempDocShell( new SwDocShell( SfxObjectCreateMode::STANDARD ) ); xTempDocShell->DoInitNew(); - SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 ); + SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, SFX_INTERFACE_NONE ); SwView* pTempView = static_cast<SwView*>( pTempFrame->GetViewShell() ); pTargetView->GetWrtShell().StartAction(); SwgReaderOption aOpt; @@ -1101,7 +1101,7 @@ IMPL_LINK(SwMMResultEmailDialog, SendDocumentsHdl_Impl, Button*, pButton, void) // the shell will be closed at the end, but it is more safe to use SfxObjectShellLock here SfxObjectShellLock xTempDocShell( new SwDocShell( SfxObjectCreateMode::STANDARD ) ); xTempDocShell->DoInitNew(); - SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, 0 ); + SfxViewFrame* pTempFrame = SfxViewFrame::LoadHiddenDocument( *xTempDocShell, SFX_INTERFACE_NONE ); SwView* pTempView = static_cast<SwView*>( pTempFrame->GetViewShell() ); pTargetView->GetWrtShell().StartAction(); SwgReaderOption aOpt; diff --git a/sw/source/uibase/app/appenv.cxx b/sw/source/uibase/app/appenv.cxx index 93366b85d8c3..ec4bfc0a4187 100644 --- a/sw/source/uibase/app/appenv.cxx +++ b/sw/source/uibase/app/appenv.cxx @@ -160,7 +160,7 @@ void SwModule::InsertEnv( SfxRequest& rReq ) // Create new document (don't show!) SfxObjectShellLock xDocSh( new SwDocShell( SfxObjectCreateMode::STANDARD ) ); xDocSh->DoInitNew(); - pFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 ); + pFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, SFX_INTERFACE_NONE ); pNewView = static_cast<SwView*>( pFrame->GetViewShell()); pNewView->AttrChangedNotify( &pNewView->GetWrtShell() ); // so that SelectShell is being called pSh = pNewView->GetWrtShellPtr(); diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 1fa82477ff77..9c4af8e901cd 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -746,7 +746,7 @@ void SwDocShell::Execute(SfxRequest& rReq) else { // Create new document - SfxViewFrame *pFrame = SfxViewFrame::LoadDocument( *xDocSh, 0 ); + SfxViewFrame *pFrame = SfxViewFrame::LoadDocument( *xDocSh, SFX_INTERFACE_NONE ); SwView *pCurrView = static_cast<SwView*>( pFrame->GetViewShell()); // Set document's title diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx index e1d7db7bee15..88ef18e5cdb8 100644 --- a/sw/source/uibase/app/swmodule.cxx +++ b/sw/source/uibase/app/swmodule.cxx @@ -230,15 +230,15 @@ void SwDLL::RegisterFactories() // These Id's must not be changed. Through these Id's the View (resume Documentview) // is created by Sfx. if (!utl::ConfigManager::IsAvoidConfig() && SvtModuleOptions().IsWriter()) - SwView::RegisterFactory ( 2 ); + SwView::RegisterFactory ( SFX_INTERFACE_SFXDOCSH ); #if HAVE_FEATURE_DESKTOP - SwWebView::RegisterFactory ( 5 ); + SwWebView::RegisterFactory ( SFX_INTERFACE_SFXMODULE ); if (!utl::ConfigManager::IsAvoidConfig() && SvtModuleOptions().IsWriter()) { - SwSrcView::RegisterFactory ( 6 ); - SwPagePreview::RegisterFactory ( 7 ); + SwSrcView::RegisterFactory ( SfxInterfaceId(6) ); + SwPagePreview::RegisterFactory ( SfxInterfaceId(7) ); } #endif } diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 965ca0f05b60..f54a51d80f28 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -973,7 +973,7 @@ static SfxObjectShell* lcl_CreateWorkingDocument( { const SwDoc *pSourceDoc = rSourceWrtShell.GetDoc(); SfxObjectShellRef xWorkObjectShell = pSourceDoc->CreateCopy( true, (aType == WorkingDocType::TARGET) ); - SfxViewFrame* pWorkFrame = SfxViewFrame::LoadHiddenDocument( *xWorkObjectShell, 0 ); + SfxViewFrame* pWorkFrame = SfxViewFrame::LoadHiddenDocument( *xWorkObjectShell, SFX_INTERFACE_NONE ); if( pSourceWindow ) { diff --git a/sw/source/uibase/misc/glshell.cxx b/sw/source/uibase/misc/glshell.cxx index 82fecf90b152..8dbf06f4d057 100644 --- a/sw/source/uibase/misc/glshell.cxx +++ b/sw/source/uibase/misc/glshell.cxx @@ -204,10 +204,10 @@ SwDocShellRef SwGlossaries::EditGroupDoc( const OUString& rGroup, const OUString if (pGroup && pGroup->GetCount()) { // query which view is registered. In WebWriter there is no normal view - sal_uInt16 nViewId = nullptr != SwView::Factory() ? 2 : 6; + SfxInterfaceId nViewId = nullptr != SwView::Factory() ? SFX_INTERFACE_SFXDOCSH : SfxInterfaceId(6); const OUString sLongName = pGroup->GetLongName(pGroup->GetIndex( rShortName )); - if( 6 == nViewId ) + if( SfxInterfaceId(6) == nViewId ) { SwWebGlosDocShell* pDocSh = new SwWebGlosDocShell(); xDocSh = pDocSh; diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx index 6b9ae135da79..ed90741306d5 100644 --- a/sw/source/uibase/uno/unomailmerge.cxx +++ b/sw/source/uibase/uno/unomailmerge.cxx @@ -384,7 +384,7 @@ SwXMailMerge::SwXMailMerge() : // like in: SwModule::InsertEnv (appenv.cxx) m_xDocSh = new SwDocShell( SfxObjectCreateMode::STANDARD ); m_xDocSh->DoInitNew(); - SfxViewFrame *pFrame = SfxViewFrame::LoadHiddenDocument( *m_xDocSh, 0 ); + SfxViewFrame *pFrame = SfxViewFrame::LoadHiddenDocument( *m_xDocSh, SFX_INTERFACE_NONE ); SwView *pView = static_cast<SwView*>( pFrame->GetViewShell() ); pView->AttrChangedNotify( &pView->GetWrtShell() ); //So that SelectShell is called. m_xModel = m_xDocSh->GetModel(); diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index d23b31d7ed43..64b5dff73365 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -1152,7 +1152,7 @@ void SwXTextDocument::printPages(const Sequence< beans::PropertyValue >& xOption SolarMutexGuard aGuard; if(IsValid()) { - SfxViewFrame* pFrame = SfxViewFrame::LoadHiddenDocument( *pDocShell, 7 ); + SfxViewFrame* pFrame = SfxViewFrame::LoadHiddenDocument( *pDocShell, SfxInterfaceId(7) ); SfxRequest aReq(FN_PRINT_PAGEPREVIEW, SfxCallMode::SYNCHRON, pDocShell->GetDoc()->GetAttrPool()); aReq.AppendItem(SfxBoolItem(FN_PRINT_PAGEPREVIEW, true)); @@ -2482,7 +2482,7 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount( { //create a hidden view to be able to export as PDF also in print preview //pView and pSwView are not changed intentionally! - m_pHiddenViewFrame = SfxViewFrame::LoadHiddenDocument( *pRenderDocShell, 2 ); + m_pHiddenViewFrame = SfxViewFrame::LoadHiddenDocument( *pRenderDocShell, SFX_INTERFACE_SFXDOCSH ); pViewShell = static_cast<SwView*>(m_pHiddenViewFrame->GetViewShell())->GetWrtShellPtr(); } else diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx index b6789ce3f6b2..67cf62bddb85 100644 --- a/sw/source/uibase/uno/unotxvw.cxx +++ b/sw/source/uibase/uno/unotxvw.cxx @@ -635,7 +635,7 @@ SfxObjectShellLock SwXTextView::BuildTmpSelectionDoc() // #i103634#, #i112425#: do not expand numbering and fields on PDF export pTempDoc->SetClipBoard(true); rOldSh.FillPrtDoc(pTempDoc, pPrt); - SfxViewFrame* pDocFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 ); + SfxViewFrame* pDocFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, SFX_INTERFACE_NONE ); SwView* pDocView = static_cast<SwView*>( pDocFrame->GetViewShell() ); pDocView->AttrChangedNotify( &pDocView->GetWrtShell() );//So that SelectShell is called. SwWrtShell* pSh = pDocView->GetWrtShellPtr(); |