diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-24 16:05:22 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-25 09:07:48 +0200 |
commit | 025604bbfa093ec4c29280793d2230e3cc3534d7 (patch) | |
tree | 46769f77a5398f5b3c35fd1983e8209a094ab7b4 /sw/source | |
parent | 11980815c782ebfa4003225fc5208e9f05225ba8 (diff) |
replace URLLOAD constants with o3tl::typed_flags
Change-Id: Ief6cb3dfc53da8cbae0feded9e215905c7a8459c
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/access/acchyperlink.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/access/accnotexthyperlink.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/docvw/SidebarTxtControl.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/docvw/edtwin.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/docvw/romenu.cxx | 9 | ||||
-rw-r--r-- | sw/source/uibase/inc/wrtsh.hxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/wrtsh/wrtsh2.cxx | 8 |
7 files changed, 17 insertions, 16 deletions
diff --git a/sw/source/core/access/acchyperlink.cxx b/sw/source/core/access/acchyperlink.cxx index 6a330c78b017..a62075282611 100644 --- a/sw/source/core/access/acchyperlink.cxx +++ b/sw/source/core/access/acchyperlink.cxx @@ -86,7 +86,7 @@ sal_Bool SAL_CALL SwAccessibleHyperlink::doAccessibleAction( sal_Int32 nIndex ) SwViewShell *pVSh = xPara->GetShell(); if( pVSh ) { - LoadURL(*pVSh, rINetFormat.GetValue(), URLLOAD_NOFILTER, + LoadURL(*pVSh, rINetFormat.GetValue(), LoadUrlFlags::NONE, rINetFormat.GetTargetFrame()); OSL_ENSURE( pTextAttr == rINetFormat.GetTextINetFormat(), "lost my txt attr" ); diff --git a/sw/source/core/access/accnotexthyperlink.cxx b/sw/source/core/access/accnotexthyperlink.cxx index 161fac1af043..d1aebb9cc33c 100644 --- a/sw/source/core/access/accnotexthyperlink.cxx +++ b/sw/source/core/access/accnotexthyperlink.cxx @@ -82,7 +82,7 @@ sal_Bool SAL_CALL SwAccessibleNoTextHyperlink::doAccessibleAction( sal_Int32 nIn SwViewShell *pVSh = xFrame->GetShell(); if( pVSh ) { - LoadURL( *pVSh, pMapObj->GetURL(), URLLOAD_NOFILTER, + LoadURL( *pVSh, pMapObj->GetURL(), LoadUrlFlags::NONE, pMapObj->GetTarget() ); bRet = true; } @@ -93,7 +93,7 @@ sal_Bool SAL_CALL SwAccessibleNoTextHyperlink::doAccessibleAction( sal_Int32 nIn SwViewShell *pVSh = xFrame->GetShell(); if( pVSh ) { - LoadURL( *pVSh, aURL.GetURL(), URLLOAD_NOFILTER, + LoadURL( *pVSh, aURL.GetURL(), LoadUrlFlags::NONE, aURL.GetTargetFrameName() ); bRet = true; } diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx index 5ec2a0580d8a..8609b540ce9f 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.cxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx @@ -341,7 +341,7 @@ void SidebarTextControl::MouseButtonDown( const MouseEvent& rMEvt ) SwWrtShell &rSh = mrDocView.GetWrtShell(); OUString sURL( pURL->GetURL() ); OUString sTarget( pURL->GetTargetFrame() ); - ::LoadURL(rSh, sURL, URLLOAD_NOFILTER, sTarget); + ::LoadURL(rSh, sURL, LoadUrlFlags::NONE, sTarget); return; } } diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index e8665d2466a7..8899e5bbfd61 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -4613,9 +4613,9 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) // Internetfield? --> call link (load doc!!) if( !bInSel ) { - sal_uInt16 nFilter = URLLOAD_NOFILTER; + LoadUrlFlags nFilter = LoadUrlFlags::NONE; if( KEY_MOD1 == rMEvt.GetModifier() ) - nFilter |= URLLOAD_NEWVIEW; + nFilter |= LoadUrlFlags::NewView; bool bExecHyperlinks = m_rView.GetDocShell()->IsReadOnly(); if ( !bExecHyperlinks ) diff --git a/sw/source/uibase/docvw/romenu.cxx b/sw/source/uibase/docvw/romenu.cxx index 11a4e301e8ae..482d7949a08e 100644 --- a/sw/source/uibase/docvw/romenu.cxx +++ b/sw/source/uibase/docvw/romenu.cxx @@ -265,12 +265,13 @@ void SwReadOnlyPopup::Execute( vcl::Window* pWin, sal_uInt16 nId ) TransferDataContainer* pClipCntnr = nullptr; sal_uInt16 nExecId = USHRT_MAX; - sal_uInt16 nFilter = USHRT_MAX; + bool bFilterSet = false; + LoadUrlFlags nFilter; switch( nId ) { case SID_WIN_FULLSCREEN : nExecId = SID_WIN_FULLSCREEN; break; - case MN_READONLY_OPENURL: nFilter = URLLOAD_NOFILTER; break; - case MN_READONLY_OPENURLNEW: nFilter = URLLOAD_NEWVIEW; break; + case MN_READONLY_OPENURL: nFilter = LoadUrlFlags::NONE; bFilterSet = true; break; + case MN_READONLY_OPENURLNEW: nFilter = LoadUrlFlags::NewView; bFilterSet = true; break; case MN_READONLY_COPY: nExecId = SID_COPY; break; case MN_READONLY_EDITDOC: nExecId = SID_EDITDOC; break; @@ -327,7 +328,7 @@ void SwReadOnlyPopup::Execute( vcl::Window* pWin, sal_uInt16 nId ) } if( USHRT_MAX != nExecId ) rDis.GetBindings()->Execute( nExecId ); - if( USHRT_MAX != nFilter ) + if( bFilterSet ) ::LoadURL(rSh, sURL, nFilter, sTargetFrameName); if( pClipCntnr ) diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx index f3aaaaceb027..c3b63ef2d03e 100644 --- a/sw/source/uibase/inc/wrtsh.hxx +++ b/sw/source/uibase/inc/wrtsh.hxx @@ -420,8 +420,8 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); // a click at the given field. the cursor is on it. // execute the predefined actions. void ClickToField( const SwField& rField ); - void ClickToINetAttr( const SwFormatINetFormat& rItem, sal_uInt16 nFilter = URLLOAD_NOFILTER ); - bool ClickToINetGrf( const Point& rDocPt, sal_uInt16 nFilter ); + void ClickToINetAttr( const SwFormatINetFormat& rItem, LoadUrlFlags nFilter = LoadUrlFlags::NONE ); + bool ClickToINetGrf( const Point& rDocPt, LoadUrlFlags nFilter ); inline bool IsInClickToEdit() const ; // if a URL-Button is selected, return its URL; otherwise an empty string diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx index ac17db298931..a8c22d3a1981 100644 --- a/sw/source/uibase/wrtsh/wrtsh2.cxx +++ b/sw/source/uibase/wrtsh/wrtsh2.cxx @@ -408,7 +408,7 @@ void SwWrtShell::ClickToField( const SwField& rField ) m_bIsInClickToEdit = false; } -void SwWrtShell::ClickToINetAttr( const SwFormatINetFormat& rItem, sal_uInt16 nFilter ) +void SwWrtShell::ClickToINetAttr( const SwFormatINetFormat& rItem, LoadUrlFlags nFilter ) { if( rItem.GetValue().isEmpty() ) return ; @@ -436,7 +436,7 @@ void SwWrtShell::ClickToINetAttr( const SwFormatINetFormat& rItem, sal_uInt16 nF m_bIsInClickToEdit = false; } -bool SwWrtShell::ClickToINetGrf( const Point& rDocPt, sal_uInt16 nFilter ) +bool SwWrtShell::ClickToINetGrf( const Point& rDocPt, LoadUrlFlags nFilter ) { bool bRet = false; OUString sURL; @@ -459,7 +459,7 @@ bool SwWrtShell::ClickToINetGrf( const Point& rDocPt, sal_uInt16 nFilter ) return bRet; } -void LoadURL( SwViewShell& rVSh, const OUString& rURL, sal_uInt16 nFilter, +void LoadURL( SwViewShell& rVSh, const OUString& rURL, LoadUrlFlags nFilter, const OUString& rTargetFrameName ) { OSL_ENSURE( !rURL.isEmpty(), "what should be loaded here?" ); @@ -506,7 +506,7 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, sal_uInt16 nFilter, //#39076# Silent can be removed accordingly to SFX. SfxBoolItem aBrowse( SID_BROWSE, true ); - if( nFilter & URLLOAD_NEWVIEW ) + if( nFilter & LoadUrlFlags::NewView ) aTargetFrameName.SetValue( "_blank" ); const SfxPoolItem* aArr[] = { |