summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-12-05 07:59:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-12-05 12:49:02 +0200
commit803215142efa6437515348f63bd70ffdcf5d45f1 (patch)
treea665854bb7d11f410e3b1e5596e16ae335afadc5 /include
parent9d3366c4c62efa4260c1b11d4b53d5982d6fac48 (diff)
convert INetURLObject::EncodeMechanism to scoped enum
Change-Id: I50ea17c7779c7b5cacddf548f1773fd7d6c8bade
Diffstat (limited to 'include')
-rw-r--r--include/svl/urihelper.hxx6
-rw-r--r--include/tools/urlobj.hxx40
2 files changed, 23 insertions, 23 deletions
diff --git a/include/svl/urihelper.hxx b/include/svl/urihelper.hxx
index ce10bc932a1c..5a800004a325 100644
--- a/include/svl/urihelper.hxx
+++ b/include/svl/urihelper.hxx
@@ -54,7 +54,7 @@ SVL_DLLPUBLIC OUString SmartRel2Abs(INetURLObject const & rTheBaseURIRef,
Link<OUString *, bool> const & rMaybeFileHdl = Link<OUString *, bool>(),
bool bCheckFileExists = true,
bool bIgnoreFragment = false,
- INetURLObject::EncodeMechanism eEncodeMechanism = INetURLObject::WAS_ENCODED,
+ INetURLObject::EncodeMechanism eEncodeMechanism = INetURLObject::EncodeMechanism::WasEncoded,
INetURLObject::DecodeMechanism eDecodeMechanism = INetURLObject::DECODE_TO_IURI,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8,
bool bRelativeNonURIs = false,
@@ -119,7 +119,7 @@ SVL_DLLPUBLIC OUString FindFirstURLInText(OUString const & rText,
sal_Int32 & rBegin,
sal_Int32 & rEnd,
CharClass const & rCharClass,
- INetURLObject::EncodeMechanism eMechanism = INetURLObject::WAS_ENCODED,
+ INetURLObject::EncodeMechanism eMechanism = INetURLObject::EncodeMechanism::WasEncoded,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
/** Remove any password component from both absolute and relative URLs.
@@ -148,7 +148,7 @@ SVL_DLLPUBLIC OUString FindFirstURLInText(OUString const & rText,
@return The input URI with any password component removed.
*/
SVL_DLLPUBLIC OUString removePassword(OUString const & rURI,
- INetURLObject::EncodeMechanism eEncodeMechanism = INetURLObject::WAS_ENCODED,
+ INetURLObject::EncodeMechanism eEncodeMechanism = INetURLObject::EncodeMechanism::WasEncoded,
INetURLObject::DecodeMechanism eDecodeMechanism = INetURLObject::DECODE_TO_IURI,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx
index 9fa5bee5c0e9..af2952d207ff 100644
--- a/include/tools/urlobj.hxx
+++ b/include/tools/urlobj.hxx
@@ -92,14 +92,14 @@ public:
@descr Along with an EncodeMechanism parameter, the set-methods all
take an rtl_TextEncoding parameter, which is ignored unless the
- EncodeMechanism is WAS_ENCODED.
+ EncodeMechanism is EncodeMechanism::WasEncoded.
*/
- enum EncodeMechanism
+ enum class EncodeMechanism
{
/** All escape sequences that are already present are ignored, and are
interpreted as literal sequences of three characters.
*/
- ENCODE_ALL,
+ All,
/** Sequences of escape sequences, that represent characters from the
specified character set and that can be converted to UTF-32
@@ -108,12 +108,12 @@ public:
(sequences of) escape sequences. Other escape sequences are
copied verbatim (but using upper case hex digits).
*/
- WAS_ENCODED,
+ WasEncoded,
/** All escape sequences that are already present are copied verbatim
(but using upper case hex digits).
*/
- NOT_CANONIC
+ NotCanonical
};
/** The way strings that represent (parts of) URIs are returned from get-
@@ -191,11 +191,11 @@ public:
inline explicit INetURLObject(
OUString const & rTheAbsURIRef,
- EncodeMechanism eMechanism = WAS_ENCODED,
+ EncodeMechanism eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
inline bool SetURL(OUString const & rTheAbsURIRef,
- EncodeMechanism eMechanism = WAS_ENCODED,
+ EncodeMechanism eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
bool ConcatData(INetProtocol eTheScheme, OUString const & rTheUser,
@@ -299,7 +299,7 @@ public:
inline INetURLObject(OUString const & rTheAbsURIRef,
INetProtocol eTheSmartScheme,
- EncodeMechanism eMechanism = WAS_ENCODED,
+ EncodeMechanism eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8,
FSysStyle eStyle = FSYS_DETECT);
@@ -308,7 +308,7 @@ public:
inline bool
SetSmartURL(OUString const & rTheAbsURIRef,
- EncodeMechanism eMechanism = WAS_ENCODED,
+ EncodeMechanism eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8,
FSysStyle eStyle = FSYS_DETECT);
@@ -316,7 +316,7 @@ public:
smartRel2Abs(OUString const & rTheRelURIRef,
bool & rWasAbsolute,
bool bIgnoreFragment = false,
- EncodeMechanism eMechanism = WAS_ENCODED,
+ EncodeMechanism eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8,
bool bRelativeNonURIs = false,
FSysStyle eStyle = FSYS_DETECT) const;
@@ -339,14 +339,14 @@ public:
GetAbsURL(OUString const & rTheBaseURIRef,
OUString const & rTheRelURIRef,
bool bIgnoreFragment = false,
- EncodeMechanism eEncodeMechanism = WAS_ENCODED,
+ EncodeMechanism eEncodeMechanism = EncodeMechanism::WasEncoded,
DecodeMechanism eDecodeMechanism = DECODE_TO_IURI,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
static inline OUString
GetRelURL(OUString const & rTheBaseURIRef,
OUString const & rTheAbsURIRef,
- EncodeMechanism eEncodeMechanism = WAS_ENCODED,
+ EncodeMechanism eEncodeMechanism = EncodeMechanism::WasEncoded,
DecodeMechanism eDecodeMechanism = DECODE_TO_IURI,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8,
FSysStyle eStyle = FSYS_DETECT);
@@ -456,7 +456,7 @@ public:
{ return decode(m_aPath, eMechanism, eCharset); }
inline bool SetURLPath(OUString const & rThePath,
- EncodeMechanism eMechanism = WAS_ENCODED,
+ EncodeMechanism eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8)
{ return setPath(rThePath, eMechanism, eCharset); }
@@ -540,7 +540,7 @@ public:
bool insertName(OUString const & rTheName,
bool bAppendFinalSlash = false,
sal_Int32 nIndex = LAST_SEGMENT,
- EncodeMechanism eMechanism = WAS_ENCODED,
+ EncodeMechanism eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
/** Get the name of a segment of the hierarchical path.
@@ -619,7 +619,7 @@ public:
*/
bool setBase(OUString const & rTheBase,
sal_Int32 nIndex = LAST_SEGMENT,
- EncodeMechanism eMechanism = WAS_ENCODED,
+ EncodeMechanism eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
/** Determine whether the name of the last segment has an extension.
@@ -727,7 +727,7 @@ public:
{ return decode(m_aQuery, NO_DECODE, eCharset); }
inline bool SetParam(OUString const & rTheQuery,
- EncodeMechanism eMechanism = WAS_ENCODED,
+ EncodeMechanism eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
// Fragment:
@@ -740,7 +740,7 @@ public:
{ return decode(m_aFragment, eMechanism, eCharset); }
inline bool SetMark(OUString const & rTheFragment,
- EncodeMechanism eMechanism = WAS_ENCODED,
+ EncodeMechanism eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
// File URLs:
@@ -905,7 +905,7 @@ public:
OUString GetFileExtension() const;
bool Append(OUString const & rTheSegment,
- EncodeMechanism eMechanism = WAS_ENCODED,
+ EncodeMechanism eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
void CutLastName();
@@ -923,7 +923,7 @@ public:
OUString GetBase() const;
void SetName(OUString const & rTheName,
- EncodeMechanism eMechanism = WAS_ENCODED,
+ EncodeMechanism eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
inline OUString GetName(DecodeMechanism eMechanism = DECODE_TO_IURI,
@@ -1229,7 +1229,7 @@ inline bool INetURLObject::GetNewAbsURL(OUString const & rTheRelURIRef,
INetURLObject aTheAbsURIRef;
bool bWasAbsolute;
if (!convertRelToAbs(rTheRelURIRef, aTheAbsURIRef, bWasAbsolute,
- WAS_ENCODED, RTL_TEXTENCODING_UTF8, false/*bIgnoreFragment*/, false, false,
+ EncodeMechanism::WasEncoded, RTL_TEXTENCODING_UTF8, false/*bIgnoreFragment*/, false, false,
FSYS_DETECT))
return false;
if (pTheAbsURIRef)