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 /include | |
parent | convert INetURLObject::EncodeMechanism to scoped enum (diff) | |
download | core-3c4333c24882d6699b65d109f2cfbf7daf3122c6.tar.gz core-3c4333c24882d6699b65d109f2cfbf7daf3122c6.zip |
convert DecodeMechanism to scoped enum
(cherry picked from commit bfde4866e07746eafa2f0d6173c29d805cc35ad0)
(cherry picked from commit 3de922d4a695e253d4ca2d42b70e0b35b52e9b7c)
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
Diffstat (limited to 'include')
-rw-r--r-- | include/svl/urihelper.hxx | 4 | ||||
-rw-r--r-- | include/svtools/place.hxx | 2 | ||||
-rw-r--r-- | include/svx/xoutbmp.hxx | 3 | ||||
-rw-r--r-- | include/tools/urlobj.hxx | 50 |
4 files changed, 29 insertions, 30 deletions
diff --git a/include/svl/urihelper.hxx b/include/svl/urihelper.hxx index 5a800004a325..b26a43fcb49f 100644 --- a/include/svl/urihelper.hxx +++ b/include/svl/urihelper.hxx @@ -55,7 +55,7 @@ SVL_DLLPUBLIC OUString SmartRel2Abs(INetURLObject const & rTheBaseURIRef, bool bCheckFileExists = true, bool bIgnoreFragment = false, INetURLObject::EncodeMechanism eEncodeMechanism = INetURLObject::EncodeMechanism::WasEncoded, - INetURLObject::DecodeMechanism eDecodeMechanism = INetURLObject::DECODE_TO_IURI, + INetURLObject::DecodeMechanism eDecodeMechanism = INetURLObject::DecodeMechanism::ToIUri, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8, bool bRelativeNonURIs = false, INetURLObject::FSysStyle eStyle = INetURLObject::FSYS_DETECT); @@ -149,7 +149,7 @@ SVL_DLLPUBLIC OUString FindFirstURLInText(OUString const & rText, */ SVL_DLLPUBLIC OUString removePassword(OUString const & rURI, INetURLObject::EncodeMechanism eEncodeMechanism = INetURLObject::EncodeMechanism::WasEncoded, - INetURLObject::DecodeMechanism eDecodeMechanism = INetURLObject::DECODE_TO_IURI, + INetURLObject::DecodeMechanism eDecodeMechanism = INetURLObject::DecodeMechanism::ToIUri, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); /** Resolve a URL's host component domain name in IDNA syntax to plain DNS diff --git a/include/svtools/place.hxx b/include/svtools/place.hxx index db70cf96c163..23dd863350bd 100644 --- a/include/svtools/place.hxx +++ b/include/svtools/place.hxx @@ -31,7 +31,7 @@ public: void SetUrl(const OUString& aUrl ) { maUrl.SetURL( aUrl ); } OUString& GetName( ) { return msName; } - OUString GetUrl( ) { return maUrl.GetMainURL( INetURLObject::NO_DECODE ); } + OUString GetUrl( ) { return maUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE ); } INetURLObject& GetUrlObject( ) { return maUrl; } bool IsLocal( ) { return maUrl.GetProtocol() == INetProtocol::File; } bool IsEditable( ) { return mbEditable; } diff --git a/include/svx/xoutbmp.hxx b/include/svx/xoutbmp.hxx index e63180309d91..4618f9009f1c 100644 --- a/include/svx/xoutbmp.hxx +++ b/include/svx/xoutbmp.hxx @@ -60,8 +60,7 @@ public: static Animation MirrorAnimation( const Animation& rAnimation, bool bHMirr, bool bVMirr ); static sal_uInt16 WriteGraphic( const Graphic& rGraphic, OUString& rFileName, const OUString& rFilterName, const XOutFlags nFlags, - const Size* pMtfSize_100TH_MM = nullptr, - const css::uno::Sequence< css::beans::PropertyValue >* pFilterData = nullptr); + const Size* pMtfSize_100TH_MM = nullptr); static bool GraphicToBase64(const Graphic& rGraphic, OUString& rOUString); static sal_uInt16 ExportGraphic( const Graphic& rGraphic, const INetURLObject& rURL, diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx index af2952d207ff..52675f9ded13 100644 --- a/include/tools/urlobj.hxx +++ b/include/tools/urlobj.hxx @@ -121,29 +121,29 @@ public: @descr Along with a DecodeMechanism parameter, the get-methods all take an rtl_TextEncoding parameter, which is ignored unless the - DecodeMechanism is DECODE_WITH_CHARSET or DECODE_UNAMBIGUOUS. + DecodeMechanism is DecodeMechanism::WithCharset or DecodeMechanism::Unambiguous. */ - enum DecodeMechanism + enum class DecodeMechanism { /** The (part of the) URI is returned unchanged. Since URIs are written using a subset of US-ASCII, the returned string is guaranteed to contain only US-ASCII characters. */ - NO_DECODE, + NONE, /** All sequences of escape sequences that represent UTF-8 coded UTF-32 characters with a numerical value greater than 0x7F, are replaced by the respective UTF-16 characters. All other escape sequences are not decoded. */ - DECODE_TO_IURI, + ToIUri, /** All (sequences of) escape sequences that represent characters from the specified character set, and that can be converted to UTF-32, are replaced by the respective UTF-16 characters. All other escape sequences are not decoded. */ - DECODE_WITH_CHARSET, + WithCharset, /** All (sequences of) escape sequences that represent characters from the specified character set, that can be converted to UTF-32, and @@ -152,7 +152,7 @@ public: replaced by the respective UTF-16 characters. All other escape sequences are not decoded. */ - DECODE_UNAMBIGUOUS + Unambiguous }; // General Structure: @@ -167,18 +167,18 @@ public: = RTL_TEXTENCODING_UTF8) const { return decode(m_aAbsURIRef, eMechanism, eCharset); } - OUString GetURLNoPass(DecodeMechanism eMechanism = DECODE_TO_IURI, + OUString GetURLNoPass(DecodeMechanism eMechanism = DecodeMechanism::ToIUri, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const; - OUString GetURLNoMark(DecodeMechanism eMechanism = DECODE_TO_IURI, + OUString GetURLNoMark(DecodeMechanism eMechanism = DecodeMechanism::ToIUri, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const; OUString getAbbreviated(css::uno::Reference< css::util::XStringWidth > const & rStringWidth, sal_Int32 nWidth, - DecodeMechanism eMechanism = DECODE_TO_IURI, + DecodeMechanism eMechanism = DecodeMechanism::ToIUri, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const; @@ -340,14 +340,14 @@ public: OUString const & rTheRelURIRef, bool bIgnoreFragment = false, EncodeMechanism eEncodeMechanism = EncodeMechanism::WasEncoded, - DecodeMechanism eDecodeMechanism = DECODE_TO_IURI, + DecodeMechanism eDecodeMechanism = DecodeMechanism::ToIUri, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); static inline OUString GetRelURL(OUString const & rTheBaseURIRef, OUString const & rTheAbsURIRef, EncodeMechanism eEncodeMechanism = EncodeMechanism::WasEncoded, - DecodeMechanism eDecodeMechanism = DECODE_TO_IURI, + DecodeMechanism eDecodeMechanism = DecodeMechanism::ToIUri, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8, FSysStyle eStyle = FSYS_DETECT); @@ -358,14 +358,14 @@ public: static inline bool translateToExternal(OUString const & rTheIntURIRef, OUString & rTheExtURIRef, DecodeMechanism eDecodeMechanism - = DECODE_TO_IURI, + = DecodeMechanism::ToIUri, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); static inline bool translateToInternal(OUString const & rTheExtURIRef, OUString & rTheIntURIRef, DecodeMechanism eDecodeMechanism - = DECODE_TO_IURI, + = DecodeMechanism::ToIUri, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); @@ -409,12 +409,12 @@ public: inline bool HasUserData() const { return m_aUser.isPresent(); } - inline OUString GetUser(DecodeMechanism eMechanism = DECODE_TO_IURI, + inline OUString GetUser(DecodeMechanism eMechanism = DecodeMechanism::ToIUri, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const { return decode(m_aUser, eMechanism, eCharset); } - inline OUString GetPass(DecodeMechanism eMechanism = DECODE_TO_IURI, + inline OUString GetPass(DecodeMechanism eMechanism = DecodeMechanism::ToIUri, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const { return decode(m_aAuth, eMechanism, eCharset); } @@ -431,12 +431,12 @@ public: inline bool HasPort() const { return m_aPort.isPresent(); } - inline OUString GetHost(DecodeMechanism eMechanism = DECODE_TO_IURI, + inline OUString GetHost(DecodeMechanism eMechanism = DecodeMechanism::ToIUri, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const { return decode(m_aHost, eMechanism, eCharset); } - OUString GetHostPort(DecodeMechanism eMechanism = DECODE_TO_IURI, + OUString GetHostPort(DecodeMechanism eMechanism = DecodeMechanism::ToIUri, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); sal_uInt32 GetPort() const; @@ -450,7 +450,7 @@ public: inline bool HasURLPath() const { return !m_aPath.isEmpty(); } - inline OUString GetURLPath(DecodeMechanism eMechanism = DECODE_TO_IURI, + inline OUString GetURLPath(DecodeMechanism eMechanism = DecodeMechanism::ToIUri, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const { return decode(m_aPath, eMechanism, eCharset); } @@ -561,7 +561,7 @@ public: */ OUString getName(sal_Int32 nIndex = LAST_SEGMENT, bool bIgnoreFinalSlash = true, - DecodeMechanism eMechanism = DECODE_TO_IURI, + DecodeMechanism eMechanism = DecodeMechanism::ToIUri, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const; @@ -595,7 +595,7 @@ public: */ OUString getBase(sal_Int32 nIndex = LAST_SEGMENT, bool bIgnoreFinalSlash = true, - DecodeMechanism eMechanism = DECODE_TO_IURI, + DecodeMechanism eMechanism = DecodeMechanism::ToIUri, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const; @@ -648,7 +648,7 @@ public: */ OUString getExtension(sal_Int32 nIndex = LAST_SEGMENT, bool bIgnoreFinalSlash = true, - DecodeMechanism eMechanism = DECODE_TO_IURI, + DecodeMechanism eMechanism = DecodeMechanism::ToIUri, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const; @@ -724,7 +724,7 @@ public: inline OUString GetParam(rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const - { return decode(m_aQuery, NO_DECODE, eCharset); } + { return decode(m_aQuery, DecodeMechanism::NONE, eCharset); } inline bool SetParam(OUString const & rTheQuery, EncodeMechanism eMechanism = EncodeMechanism::WasEncoded, @@ -734,7 +734,7 @@ public: inline bool HasMark() const { return m_aFragment.isPresent(); } - inline OUString GetMark(DecodeMechanism eMechanism = DECODE_TO_IURI, + inline OUString GetMark(DecodeMechanism eMechanism = DecodeMechanism::ToIUri, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const { return decode(m_aFragment, eMechanism, eCharset); } @@ -891,7 +891,7 @@ public: the last unencoded '/'). Not that this last segment may be empty. If the URL is not hierarchical, an empty string is returned. */ - OUString GetLastName(DecodeMechanism eMechanism = DECODE_TO_IURI, + OUString GetLastName(DecodeMechanism eMechanism = DecodeMechanism::ToIUri, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const; @@ -926,7 +926,7 @@ public: EncodeMechanism eMechanism = EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8); - inline OUString GetName(DecodeMechanism eMechanism = DECODE_TO_IURI, + inline OUString GetName(DecodeMechanism eMechanism = DecodeMechanism::ToIUri, rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8) const { return GetLastName(eMechanism, eCharset); } |