diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-05 08:47:18 +0200 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2017-12-18 01:07:53 -0500 |
commit | 3c4333c24882d6699b65d109f2cfbf7daf3122c6 (patch) | |
tree | 739dacdd38ddd2053aaa3ad7f0ffc053eb515d52 /framework | |
parent | 6b631a02d36aa09f7c06793e8b4482d3b67ab258 (diff) |
convert DecodeMechanism to scoped enum
(cherry picked from commit bfde4866e07746eafa2f0d6173c29d805cc35ad0)
(cherry picked from commit 3de922d4a695e253d4ca2d42b70e0b35b52e9b7c)
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
Diffstat (limited to 'framework')
6 files changed, 22 insertions, 22 deletions
diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx index 1e7e797590f8..16ad4b3dafb4 100644 --- a/framework/source/fwe/helper/titlehelper.cxx +++ b/framework/source/fwe/helper/titlehelper.cxx @@ -651,18 +651,18 @@ OUString TitleHelper::impl_convertURL2Title(const OUString& sURL) if (aURL.HasMark()) aURL = INetURLObject(aURL.GetURLNoMark()); - sTitle = aURL.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET); + sTitle = aURL.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset); } else { if (aURL.hasExtension()) - sTitle = aURL.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET); + sTitle = aURL.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset); if ( sTitle.isEmpty() ) - sTitle = aURL.GetHostPort(INetURLObject::DECODE_WITH_CHARSET); + sTitle = aURL.GetHostPort(INetURLObject::DecodeMechanism::WithCharset); if ( sTitle.isEmpty() ) - sTitle = aURL.GetURLNoPass(INetURLObject::DECODE_WITH_CHARSET); + sTitle = aURL.GetURLNoPass(INetURLObject::DecodeMechanism::WithCharset); } return sTitle; diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx index bda288e26097..e084ca287c9a 100644 --- a/framework/source/services/substitutepathvars.cxx +++ b/framework/source/services/substitutepathvars.cxx @@ -520,14 +520,14 @@ throw ( RuntimeException ) INetURLObject aUrl( rURL ); if ( !aUrl.HasError() ) - aURL = aUrl.GetMainURL( INetURLObject::NO_DECODE ); + aURL = aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE ); else { // Convert a system path to a UCB compliant URL before resubstitution OUString aTemp; if ( osl::FileBase::getFileURLFromSystemPath( rURL, aTemp ) == osl::FileBase::E_None ) { - aURL = INetURLObject( aTemp ).GetMainURL( INetURLObject::NO_DECODE ); + aURL = INetURLObject( aTemp ).GetMainURL( INetURLObject::DecodeMechanism::NONE ); if( aURL.isEmpty() ) return rURL; } @@ -665,7 +665,7 @@ void SubstitutePathVariables::SetPredefinedPathVariables() m_aPreDefVars.m_FixedVar[PREDEFVAR_BRANDBASEURL] ); if ( !aProgObj.HasError() && aProgObj.insertName( LIBO_BIN_FOLDER ) ) { - m_aPreDefVars.m_FixedVar[ PREDEFVAR_PROGPATH ] = aProgObj.GetMainURL(INetURLObject::NO_DECODE); + m_aPreDefVars.m_FixedVar[ PREDEFVAR_PROGPATH ] = aProgObj.GetMainURL(INetURLObject::DecodeMechanism::NONE); m_aPreDefVars.m_FixedVar[ PREDEFVAR_PROGURL ] = m_aPreDefVars.m_FixedVar[ PREDEFVAR_PROGPATH ]; m_aPreDefVars.m_FixedVar[ PREDEFVAR_PROG ] = m_aPreDefVars.m_FixedVar[ PREDEFVAR_PROGPATH ]; } diff --git a/framework/source/services/uriabbreviation.cxx b/framework/source/services/uriabbreviation.cxx index f9c81d7bace6..5c924f1ae5bc 100644 --- a/framework/source/services/uriabbreviation.cxx +++ b/framework/source/services/uriabbreviation.cxx @@ -55,7 +55,7 @@ OUString SAL_CALL UriAbbreviation::abbreviateString(const css::uno::Reference< c { // Use INetURLObject to abbreviate URLs INetURLObject aURL( aString ); - aResult = aURL.getAbbreviated( xStringWidth, nWidth, INetURLObject::DECODE_UNAMBIGUOUS ); + aResult = aURL.getAbbreviated( xStringWidth, nWidth, INetURLObject::DecodeMechanism::Unambiguous ); } return aResult; diff --git a/framework/source/services/urltransformer.cxx b/framework/source/services/urltransformer.cxx index 98988a8a8a35..c66b9f1682e2 100644 --- a/framework/source/services/urltransformer.cxx +++ b/framework/source/services/urltransformer.cxx @@ -76,9 +76,9 @@ namespace { // Get all information about this URL. _rURL.Protocol = INetURLObject::GetScheme( _rParser.GetProtocol() ); - _rURL.User = _rParser.GetUser ( INetURLObject::DECODE_WITH_CHARSET ); - _rURL.Password = _rParser.GetPass ( INetURLObject::DECODE_WITH_CHARSET ); - _rURL.Server = _rParser.GetHost ( INetURLObject::DECODE_WITH_CHARSET ); + _rURL.User = _rParser.GetUser ( INetURLObject::DecodeMechanism::WithCharset ); + _rURL.Password = _rParser.GetPass ( INetURLObject::DecodeMechanism::WithCharset ); + _rURL.Server = _rParser.GetHost ( INetURLObject::DecodeMechanism::WithCharset ); _rURL.Port = (sal_Int16)_rParser.GetPort(); sal_Int32 nCount = _rParser.getSegmentCount( false ); @@ -91,34 +91,34 @@ namespace for ( sal_Int32 nIndex = 0; nIndex < nCount; nIndex++ ) { aPath.append( '/'); - aPath.append( _rParser.getName( nIndex, false, INetURLObject::NO_DECODE )); + aPath.append( _rParser.getName( nIndex, false, INetURLObject::DecodeMechanism::NONE )); } if ( nCount > 0 ) aPath.append( '/' ); // final slash! _rURL.Path = aPath.makeStringAndClear(); - _rURL.Name = _rParser.getName( INetURLObject::LAST_SEGMENT, false, INetURLObject::NO_DECODE ); + _rURL.Name = _rParser.getName( INetURLObject::LAST_SEGMENT, false, INetURLObject::DecodeMechanism::NONE ); } else { - _rURL.Path = _rParser.GetURLPath( INetURLObject::NO_DECODE ); + _rURL.Path = _rParser.GetURLPath( INetURLObject::DecodeMechanism::NONE ); _rURL.Name = _rParser.GetName ( ); } _rURL.Arguments = _rParser.GetParam(); - _rURL.Mark = _rParser.GetMark( INetURLObject::DECODE_WITH_CHARSET ); + _rURL.Mark = _rParser.GetMark( INetURLObject::DecodeMechanism::WithCharset ); // INetURLObject supports only an intelligent method of parsing URL's. So write // back Complete to have a valid encoded URL in all cases! - _rURL.Complete = _rParser.GetMainURL( INetURLObject::NO_DECODE ); + _rURL.Complete = _rParser.GetMainURL( INetURLObject::DecodeMechanism::NONE ); if ( _bUseIntern ) _rURL.Complete = _rURL.Complete.intern(); _rParser.SetMark ( OUString() ); _rParser.SetParam( OUString() ); - _rURL.Main = _rParser.GetMainURL( INetURLObject::NO_DECODE ); + _rURL.Main = _rParser.GetMainURL( INetURLObject::DecodeMechanism::NONE ); } } @@ -261,11 +261,11 @@ sal_Bool SAL_CALL URLTransformer::assemble( css::util::URL& aURL ) throw( css::u return false; // First parse URL WITHOUT ... - aURL.Main = aParser.GetMainURL( INetURLObject::NO_DECODE ); + aURL.Main = aParser.GetMainURL( INetURLObject::DecodeMechanism::NONE ); // ...and then WITH parameter and mark. aParser.SetParam( aURL.Arguments); aParser.SetMark ( aURL.Mark, INetURLObject::EncodeMechanism::All ); - aURL.Complete = aParser.GetMainURL( INetURLObject::NO_DECODE ); + aURL.Complete = aParser.GetMainURL( INetURLObject::DecodeMechanism::NONE ); // Return "URL is assembled". return true; @@ -308,7 +308,7 @@ OUString SAL_CALL URLTransformer::getPresentation( const css::util::URL& aURL, // Convert internal URLs to "praesentation"-URLs! OUString sPraesentationURL; - INetURLObject::translateToExternal( aTestURL.Complete, sPraesentationURL, INetURLObject::DECODE_UNAMBIGUOUS ); + INetURLObject::translateToExternal( aTestURL.Complete, sPraesentationURL, INetURLObject::DecodeMechanism::Unambiguous ); return sPraesentationURL; } diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx index d76aaab12640..fe601ab72f96 100644 --- a/framework/source/uielement/generictoolbarcontroller.cxx +++ b/framework/source/uielement/generictoolbarcontroller.cxx @@ -85,7 +85,7 @@ static OUString getMasterCommand( const OUString& rCommand ) if ( nIndex ) { aURL.SetURLPath( aURL.GetURLPath().copy( 0, nIndex ) ); - aMasterCommand = aURL.GetMainURL( INetURLObject::NO_DECODE ); + aMasterCommand = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ); } } return aMasterCommand; diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx index 0c7425bae05d..507fa2b6b86f 100644 --- a/framework/source/uielement/recentfilesmenucontroller.cxx +++ b/framework/source/uielement/recentfilesmenucontroller.cxx @@ -194,7 +194,7 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > if ( aURL.GetProtocol() == INetProtocol::File ) { // Do handle file URL differently: don't show the protocol, just the file name - aMenuTitle = aURL.GetLastName(INetURLObject::DECODE_WITH_CHARSET); + aMenuTitle = aURL.GetLastName(INetURLObject::DecodeMechanism::WithCharset); } else { |