summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-12-05 08:47:18 +0200
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2017-12-18 01:07:53 -0500
commit3c4333c24882d6699b65d109f2cfbf7daf3122c6 (patch)
tree739dacdd38ddd2053aaa3ad7f0ffc053eb515d52 /unotools
parent6b631a02d36aa09f7c06793e8b4482d3b67ab258 (diff)
convert DecodeMechanism to scoped enum
(cherry picked from commit bfde4866e07746eafa2f0d6173c29d805cc35ad0) (cherry picked from commit 3de922d4a695e253d4ca2d42b70e0b35b52e9b7c) Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/config/pathoptions.cxx16
-rw-r--r--unotools/source/ucbhelper/ucbhelper.cxx14
2 files changed, 15 insertions, 15 deletions
diff --git a/unotools/source/config/pathoptions.cxx b/unotools/source/config/pathoptions.cxx
index d9052456d3d2..5accec7861a4 100644
--- a/unotools/source/config/pathoptions.cxx
+++ b/unotools/source/config/pathoptions.cxx
@@ -313,7 +313,7 @@ OUString SvtPathOptions_Impl::ExpandMacros( const OUString& rPath ) const
const INetURLObject aParser( rPath );
if ( aParser.GetProtocol() == INetProtocol::VndSunStarExpand )
- sExpanded = m_xMacroExpander->expandMacros( aParser.GetURLPath( INetURLObject::DECODE_WITH_CHARSET ) );
+ sExpanded = m_xMacroExpander->expandMacros( aParser.GetURLPath( INetURLObject::DecodeMechanism::WithCharset ) );
return sExpanded;
}
@@ -744,15 +744,15 @@ bool SvtPathOptions::SearchFile( OUString& rIniFile, Paths ePath )
}
while ( nIniIndex >= 0 );
- if ( !::utl::UCBContentHelper::Exists( aObj.GetMainURL( INetURLObject::NO_DECODE ) ) )
+ if ( !::utl::UCBContentHelper::Exists( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) )
{
aObj.SetSmartURL( GetConfigPath() );
aObj.insertName( aIniFile );
- bRet = ::utl::UCBContentHelper::Exists( aObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ bRet = ::utl::UCBContentHelper::Exists( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
}
if ( bRet )
- rIniFile = aObj.GetMainURL( INetURLObject::NO_DECODE );
+ rIniFile = aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
break;
}
@@ -809,7 +809,7 @@ bool SvtPathOptions::SearchFile( OUString& rIniFile, Paths ePath )
if ( aObj.GetProtocol() == INetProtocol::VndSunStarExpand )
{
Reference< XMacroExpander > xMacroExpander = theMacroExpander::get( ::comphelper::getProcessComponentContext() );
- const OUString sExpandedPath = xMacroExpander->expandMacros( aObj.GetURLPath( INetURLObject::DECODE_WITH_CHARSET ) );
+ const OUString sExpandedPath = xMacroExpander->expandMacros( aObj.GetURLPath( INetURLObject::DecodeMechanism::WithCharset ) );
aObj.SetURL( sExpandedPath );
}
@@ -821,7 +821,7 @@ bool SvtPathOptions::SearchFile( OUString& rIniFile, Paths ePath )
}
while ( nIniIndex >= 0 );
- bRet = ::utl::UCBContentHelper::Exists( aObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ bRet = ::utl::UCBContentHelper::Exists( aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if ( bRet )
{
@@ -829,11 +829,11 @@ bool SvtPathOptions::SearchFile( OUString& rIniFile, Paths ePath )
{
OUString sTmp;
osl::FileBase::getSystemPathFromFileURL(
- aObj.GetMainURL( INetURLObject::NO_DECODE ), sTmp );
+ aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ), sTmp );
rIniFile = sTmp;
}
else
- rIniFile = aObj.GetMainURL( INetURLObject::NO_DECODE );
+ rIniFile = aObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
break;
}
}
diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx
index 93ad0a670925..37844f2b6dd3 100644
--- a/unotools/source/ucbhelper/ucbhelper.cxx
+++ b/unotools/source/ucbhelper/ucbhelper.cxx
@@ -65,7 +65,7 @@ namespace {
OUString canonic(OUString const & url) {
INetURLObject o(url);
SAL_WARN_IF(o.HasError(), "unotools.ucbhelper", "Invalid URL \"" << url << '"');
- return o.GetMainURL(INetURLObject::NO_DECODE);
+ return o.GetMainURL(INetURLObject::DecodeMechanism::NONE);
}
ucbhelper::Content content(OUString const & url) {
@@ -77,7 +77,7 @@ ucbhelper::Content content(OUString const & url) {
ucbhelper::Content content(INetURLObject const & url) {
return ucbhelper::Content(
- url.GetMainURL(INetURLObject::NO_DECODE),
+ url.GetMainURL(INetURLObject::DecodeMechanism::NONE),
utl::UCBContentHelper::getDefaultCommandEnvironment(),
comphelper::getProcessComponentContext());
}
@@ -381,17 +381,17 @@ bool utl::UCBContentHelper::Exists(OUString const & url) {
OUString name(
o.getName(
INetURLObject::LAST_SEGMENT, true,
- INetURLObject::DECODE_WITH_CHARSET));
+ INetURLObject::DecodeMechanism::WithCharset));
o.removeSegment();
o.removeFinalSlash();
std::vector<OUString> cs(
- getContents(o.GetMainURL(INetURLObject::NO_DECODE)));
+ getContents(o.GetMainURL(INetURLObject::DecodeMechanism::NONE)));
for (std::vector<OUString>::iterator i(cs.begin()); i != cs.end();
++i)
{
if (INetURLObject(*i).getName(
INetURLObject::LAST_SEGMENT, true,
- INetURLObject::DECODE_WITH_CHARSET).
+ INetURLObject::DecodeMechanism::WithCharset).
equalsIgnoreAsciiCase(name))
{
return true;
@@ -474,11 +474,11 @@ bool utl::UCBContentHelper::ensureFolder(
try
{
INetURLObject aURL( rFolder );
- OUString aTitle = aURL.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
+ OUString aTitle = aURL.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DecodeMechanism::WithCharset );
aURL.removeSegment();
::ucbhelper::Content aParent;
- if ( ::ucbhelper::Content::create( aURL.GetMainURL( INetURLObject::NO_DECODE ),
+ if ( ::ucbhelper::Content::create( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ),
xEnv, xCtx, aParent ) )
{
return ::utl::UCBContentHelper::MakeFolder(aParent, aTitle, result);