summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-04-02 15:58:06 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-04-02 16:30:34 +0200
commit44b3e56bb4a4df59f53447c4ca4d8e02fe926206 (patch)
tree71a9efde3a6a2a00688e8feb8e3086cb32eceb4f /unotools
parent0b4965bcd7ec911951e7ca3a4cd48062843b2634 (diff)
Change INetProtocol to scoped enumeration
...and fix o3tl::enumarray::operator [] const overload Change-Id: I749b1b9d68686b03a97074253478d9d2d9d32b0b
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/config/pathoptions.cxx4
-rw-r--r--unotools/source/config/securityoptions.cxx4
-rw-r--r--unotools/source/ucbhelper/ucbhelper.cxx2
3 files changed, 5 insertions, 5 deletions
diff --git a/unotools/source/config/pathoptions.cxx b/unotools/source/config/pathoptions.cxx
index 4473397b2ea9..cadf02f3904f 100644
--- a/unotools/source/config/pathoptions.cxx
+++ b/unotools/source/config/pathoptions.cxx
@@ -299,7 +299,7 @@ OUString SvtPathOptions_Impl::ExpandMacros( const OUString& rPath ) const
OUString sExpanded( rPath );
const INetURLObject aParser( rPath );
- if ( aParser.GetProtocol() == INET_PROT_VND_SUN_STAR_EXPAND )
+ if ( aParser.GetProtocol() == INetProtocol::VND_SUN_STAR_EXPAND )
sExpanded = m_xMacroExpander->expandMacros( aParser.GetURLPath( INetURLObject::DECODE_WITH_CHARSET ) );
return sExpanded;
@@ -795,7 +795,7 @@ bool SvtPathOptions::SearchFile( OUString& rIniFile, Paths ePath )
if ( LocalFileHelper::ConvertPhysicalNameToURL( aPathToken, aURL ) )
aObj.SetURL( aURL );
}
- if ( aObj.GetProtocol() == INET_PROT_VND_SUN_STAR_EXPAND )
+ if ( aObj.GetProtocol() == INetProtocol::VND_SUN_STAR_EXPAND )
{
Reference< XMacroExpander > xMacroExpander = theMacroExpander::get( ::comphelper::getProcessComponentContext() );
const OUString sExpandedPath = xMacroExpander->expandMacros( aObj.GetURLPath( INetURLObject::DECODE_WITH_CHARSET ) );
diff --git a/unotools/source/config/securityoptions.cxx b/unotools/source/config/securityoptions.cxx
index 3c00b0eb46ce..33c90f6122e4 100644
--- a/unotools/source/config/securityoptions.cxx
+++ b/unotools/source/config/securityoptions.cxx
@@ -999,14 +999,14 @@ bool SvtSecurityOptions::isSecureMacroUri(
OUString const & uri, OUString const & referer) const
{
switch (INetURLObject(uri).GetProtocol()) {
- case INET_PROT_MACRO:
+ case INetProtocol::MACRO:
if (uri.startsWithIgnoreAsciiCase("macro:///")) {
// Denotes an App-BASIC macro (see SfxMacroLoader::loadMacro), which
// is considered safe:
return true;
}
// fall through
- case INET_PROT_SLOT:
+ case INetProtocol::SLOT:
return referer.equalsIgnoreAsciiCase("private:user")
|| isTrustedLocationUri(referer);
default:
diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx
index ec00faf062b0..39bd6fefb142 100644
--- a/unotools/source/ucbhelper/ucbhelper.cxx
+++ b/unotools/source/ucbhelper/ucbhelper.cxx
@@ -408,7 +408,7 @@ bool utl::UCBContentHelper::IsSubPath(
INetURLObject tmp;
do {
if (candidate == folder
- || (candidate.GetProtocol() == INET_PROT_FILE
+ || (candidate.GetProtocol() == INetProtocol::FILE
&& candidateLower == folderLower
&& (getCasePreservingUrl(candidate)
== getCasePreservingUrl(folder))))