LibreOffice Module tools (master)  1
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
INetURLObject Class Reference

#include <urlobj.hxx>

Collaboration diagram for INetURLObject:
[legend]

Classes

struct  PrefixInfo
 
struct  SchemeInfo
 
class  SubString
 

Public Types

enum  EncodeMechanism {
  EncodeMechanism::All,
  EncodeMechanism::WasEncoded,
  EncodeMechanism::NotCanonical
}
 The way input strings that represent (parts of) URIs are interpreted in set-methods. More...
 
enum  DecodeMechanism {
  DecodeMechanism::NONE,
  DecodeMechanism::ToIUri,
  DecodeMechanism::WithCharset,
  DecodeMechanism::Unambiguous
}
 The way strings that represent (parts of) URIs are returned from get- methods. More...
 
enum  { LAST_SEGMENT = -1 }
 A constant to address the last segment in various methods dealing with hierarchical paths. More...
 
enum  Part {
  PART_USER_PASSWORD = 0x00001,
  PART_FPATH = 0x00008,
  PART_AUTHORITY = 0x00010,
  PART_REL_SEGMENT_EXTRA = 0x00020,
  PART_URIC = 0x00040,
  PART_HTTP_PATH = 0x00080,
  PART_MESSAGE_ID_PATH = 0x00100,
  PART_MAILTO = 0x00200,
  PART_PATH_BEFORE_QUERY = 0x00400,
  PART_PCHAR = 0x00800,
  PART_VISIBLE = 0x01000,
  PART_VISIBLE_NONSPECIAL = 0x02000,
  PART_UNO_PARAM_VALUE = 0x04000,
  PART_UNAMBIGUOUS = 0x08000,
  PART_URIC_NO_SLASH = 0x10000,
  PART_HTTP_QUERY = 0x20000
}
 
enum  EscapeType {
  EscapeType::NONE,
  EscapeType::Octet,
  EscapeType::Utf32
}
 

Public Member Functions

 INetURLObject ()
 
bool HasError () const
 
OUString GetMainURL (DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
 
OUString GetURLNoPass (DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
 
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=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
 
bool operator== (INetURLObject const &rObject) const
 
bool operator!= (INetURLObject const &rObject) const
 
 INetURLObject (OUString const &rTheAbsURIRef, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
 
bool SetURL (OUString const &rTheAbsURIRef, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
 
bool ConcatData (INetProtocol eTheScheme, OUString const &rTheUser, OUString const &rThePassword, OUString const &rTheHost, sal_uInt32 nThePort, OUString const &rThePath)
 
 INetURLObject (OUString const &rTheAbsURIRef, INetProtocol eTheSmartScheme, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8, FSysStyle eStyle=FSysStyle::Detect)
 
void SetSmartProtocol (INetProtocol eTheSmartScheme)
 
bool SetSmartURL (OUString const &rTheAbsURIRef, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8, FSysStyle eStyle=FSysStyle::Detect)
 
INetURLObject smartRel2Abs (OUString const &rTheRelURIRef, bool &rWasAbsolute, bool bIgnoreFragment=false, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8, bool bRelativeNonURIs=false, FSysStyle eStyle=FSysStyle::Detect) const
 
bool GetNewAbsURL (OUString const &rTheRelURIRef, INetURLObject *pTheAbsURIRef) const
 
OUString getExternalURL () const
 
INetProtocol GetProtocol () const
 
bool isSchemeEqualTo (INetProtocol scheme) const
 
bool isSchemeEqualTo (std::u16string_view scheme) const
 
bool isAnyKnownWebDAVScheme () const
 Check if the scheme is one of the WebDAV scheme we know about. More...
 
bool HasUserData () const
 
OUString GetUser (DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
 
OUString GetPass (DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
 
bool SetUser (OUString const &rTheUser)
 
bool SetPass (OUString const &rThePassword)
 
bool SetUserAndPass (OUString const &rTheUser, OUString const &rThePassword)
 
bool HasPort () const
 
OUString GetHost (DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
 
OUString GetHostPort (DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
 
sal_uInt32 GetPort () const
 
bool SetHost (OUString const &rTheHost)
 
bool SetPort (sal_uInt32 nThePort)
 
bool HasURLPath () const
 
OUString GetURLPath (DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
 
bool SetURLPath (OUString const &rThePath, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
 
sal_Int32 getSegmentCount (bool bIgnoreFinalSlash=true) const
 The number of segments in the hierarchical path. More...
 
bool removeSegment (sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true)
 Remove a segment from the hierarchical path. More...
 
bool insertName (OUString const &rTheName, bool bAppendFinalSlash=false, sal_Int32 nIndex=LAST_SEGMENT, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
 Insert a new segment into the hierarchical path. More...
 
OUString getName (sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true, DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
 Get the name of a segment of the hierarchical path. More...
 
bool setName (OUString const &rTheName, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
 Set the name of the last segment (preserving any parameters and any query or fragment part). More...
 
OUString getBase (sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true, DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
 Get the base of the name of a segment. More...
 
bool setBase (OUString const &rTheBase, sal_Int32 nIndex=LAST_SEGMENT, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
 Set the base of the name of a segment (preserving the extension). More...
 
bool hasExtension () const
 Determine whether the name of the last segment has an extension. More...
 
OUString getExtension (sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true, DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
 Get the extension of the name of a segment. More...
 
bool setExtension (OUString const &rTheExtension, sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
 Set the extension of the name of a segment (replacing an already existing extension). More...
 
bool removeExtension (sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true)
 Remove the extension of the name of a segment. More...
 
bool hasFinalSlash () const
 Determine whether the hierarchical path ends in a final slash. More...
 
bool setFinalSlash ()
 Make the hierarchical path end in a final slash (if it does not already do so). More...
 
bool removeFinalSlash ()
 Remove a final slash from the hierarchical path. More...
 
bool HasParam () const
 
OUString GetParam (rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
 
bool SetParam (OUString const &rTheQuery, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
 
bool HasMark () const
 
OUString GetMark (DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
 
bool SetMark (OUString const &rTheFragment, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
 
OUString getFSysPath (FSysStyle eStyle, sal_Unicode *pDelimiter=nullptr) const
 Return the file system path represented by a file URL (ignoring any fragment part). More...
 
std::unique_ptr< SvMemoryStreamgetData () const
 
OUString GetPartBeforeLastName () const
 
OUString GetLastName (DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
 Get the last segment in the path. More...
 
OUString GetFileExtension () const
 Get the 'extension' of the last segment in the path. More...
 
bool Append (OUString const &rTheSegment, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
 
void CutLastName ()
 
OUString PathToFileName () const
 
OUString GetFull () const
 
OUString GetPath () const
 
void SetBase (OUString const &rTheBase)
 
OUString GetBase () const
 
void SetExtension (OUString const &rTheExtension)
 
OUString CutExtension ()
 
void changeScheme (INetProtocol eTargetScheme)
 

Static Public Member Functions

static OUString GetAbsURL (OUString const &rTheBaseURIRef, OUString const &rTheRelURIRef, EncodeMechanism eEncodeMechanism=EncodeMechanism::WasEncoded, DecodeMechanism eDecodeMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
 If rTheRelURIRef cannot be converted to an absolute URL (because of syntactic reasons), either rTheRelURIRef or an empty string is returned: If all of the parameters eEncodeMechanism, eDecodeMechanism and eCharset have their respective default values, then rTheRelURIRef is returned unmodified; otherwise, an empty string is returned. More...
 
static OUString GetRelURL (OUString const &rTheBaseURIRef, OUString const &rTheAbsURIRef, EncodeMechanism eEncodeMechanism=EncodeMechanism::WasEncoded, DecodeMechanism eDecodeMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8, FSysStyle eStyle=FSysStyle::Detect)
 
static bool translateToExternal (OUString const &rTheIntURIRef, OUString &rTheExtURIRef, DecodeMechanism eDecodeMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
 
static bool translateToInternal (OUString const &rTheExtURIRef, OUString &rTheIntURIRef, DecodeMechanism eDecodeMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
 
static OUString GetScheme (INetProtocol eTheScheme)
 Return the URL 'prefix' for a given scheme. More...
 
static OUString GetSchemeName (INetProtocol eTheScheme)
 Return the human-readable name for a given scheme. More...
 
static INetProtocol CompareProtocolScheme (OUString const &rTheAbsURIRef)
 
static OUString encode (OUString const &rText, Part ePart, EncodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
 Encode some text as part of a URI. More...
 
static OUString decode (OUString const &rText, DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
 Decode some text. More...
 
static OUString decode (OUStringBuffer const &rText, DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
 
static void appendUCS4Escape (OUStringBuffer &rTheText, sal_uInt32 nUCS4)
 
static void appendUCS4 (OUStringBuffer &rTheText, sal_uInt32 nUCS4, EscapeType eEscapeType, Part ePart, rtl_TextEncoding eCharset, bool bKeepVisibleEscapes)
 
static sal_uInt32 getUTF32 (sal_Unicode const *&rBegin, sal_Unicode const *pEnd, EncodeMechanism eMechanism, rtl_TextEncoding eCharset, EscapeType &rEscapeType)
 
static sal_uInt32 scanDomain (sal_Unicode const *&rBegin, sal_Unicode const *pEnd, bool bEager=true)
 
static bool IsCaseSensitive ()
 

Private Member Functions

TOOLS_DLLPRIVATE void setInvalid ()
 
bool setAbsURIRef (OUString const &rTheAbsURIRef, EncodeMechanism eMechanism, rtl_TextEncoding eCharset, bool bSmart, FSysStyle eStyle)
 
bool convertRelToAbs (OUString const &rTheRelURIRef, INetURLObject &rTheAbsURIRef, bool &rWasAbsolute, EncodeMechanism eMechanism, rtl_TextEncoding eCharset, bool bIgnoreFragment, bool bSmart, bool bRelativeNonURIs, FSysStyle eStyle) const
 
bool convertAbsToRel (OUString const &rTheAbsURIRef, OUString &rTheRelURIRef, EncodeMechanism eEncodeMechanism, DecodeMechanism eDecodeMechanism, rtl_TextEncoding eCharset, FSysStyle eStyle) const
 
TOOLS_DLLPRIVATE SchemeInfo const & getSchemeInfo () const
 
TOOLS_DLLPRIVATE sal_Int32 getAuthorityBegin () const
 
TOOLS_DLLPRIVATE SubString getAuthority () const
 
bool setUser (OUString const &rTheUser, rtl_TextEncoding eCharset)
 
bool clearPassword ()
 
bool setPassword (OUString const &rThePassword, rtl_TextEncoding eCharset)
 
bool setHost (OUString const &rTheHost, rtl_TextEncoding eCharset)
 
bool setPath (OUString const &rThePath, EncodeMechanism eMechanism, rtl_TextEncoding eCharset)
 
TOOLS_DLLPRIVATE bool checkHierarchical () const
 
TOOLS_DLLPRIVATE SubString getSegment (sal_Int32 nIndex, bool bIgnoreFinalSlash) const
 
void clearQuery ()
 
bool setQuery (OUString const &rTheQuery, EncodeMechanism eMechanism, rtl_TextEncoding eCharset)
 
bool clearFragment ()
 
bool setFragment (OUString const &rTheMark, EncodeMechanism eMechanism, rtl_TextEncoding eCharset)
 
TOOLS_DLLPRIVATE bool hasDosVolume (FSysStyle eStyle) const
 
OUString decode (SubString const &rSubString, DecodeMechanism eMechanism, rtl_TextEncoding eCharset) const
 

Static Private Member Functions

static bool convertIntToExt (OUString const &rTheIntURIRef, OUString &rTheExtURIRef, DecodeMechanism eDecodeMechanism, rtl_TextEncoding eCharset)
 
static bool convertExtToInt (OUString const &rTheExtURIRef, OUString &rTheIntURIRef, DecodeMechanism eDecodeMechanism, rtl_TextEncoding eCharset)
 
static TOOLS_DLLPRIVATE SchemeInfo const & getSchemeInfo (INetProtocol eTheScheme)
 
static TOOLS_DLLPRIVATE PrefixInfo const * getPrefix (sal_Unicode const *&rBegin, sal_Unicode const *pEnd)
 
static TOOLS_DLLPRIVATE bool parseHost (sal_Unicode const *&rBegin, sal_Unicode const *pEnd, OUString &rCanonic)
 
static TOOLS_DLLPRIVATE bool parseHostOrNetBiosName (sal_Unicode const *pBegin, sal_Unicode const *pEnd, EncodeMechanism eMechanism, rtl_TextEncoding eCharset, bool bNetBiosName, OUStringBuffer *pCanonic)
 
static TOOLS_DLLPRIVATE bool parsePath (INetProtocol eScheme, sal_Unicode const **pBegin, sal_Unicode const *pEnd, EncodeMechanism eMechanism, rtl_TextEncoding eCharset, bool bSkippedInitialSlash, sal_uInt32 nSegmentDelimiter, sal_uInt32 nAltSegmentDelimiter, sal_uInt32 nQueryDelimiter, sal_uInt32 nFragmentDelimiter, OUStringBuffer &rSynPath)
 
static TOOLS_DLLPRIVATE void appendEscape (OUStringBuffer &rTheText, sal_uInt32 nOctet)
 
static OUString encodeText (sal_Unicode const *pBegin, sal_Unicode const *pEnd, Part ePart, EncodeMechanism eMechanism, rtl_TextEncoding eCharset, bool bKeepVisibleEscapes)
 
static OUString encodeText (OUString const &rTheText, Part ePart, EncodeMechanism eMechanism, rtl_TextEncoding eCharset, bool bKeepVisibleEscapes)
 
static OUString decode (sal_Unicode const *pBegin, sal_Unicode const *pEnd, DecodeMechanism, rtl_TextEncoding eCharset)
 
static TOOLS_DLLPRIVATE bool scanIPv6reference (sal_Unicode const *&rBegin, sal_Unicode const *pEnd)
 

Private Attributes

OUStringBuffer m_aAbsURIRef
 
SubString m_aScheme
 
SubString m_aUser
 
SubString m_aAuth
 
SubString m_aHost
 
SubString m_aPort
 
SubString m_aPath
 
SubString m_aQuery
 
SubString m_aFragment
 
INetProtocol m_eScheme
 
INetProtocol m_eSmartScheme
 

Detailed Description

Definition at line 179 of file urlobj.hxx.

Member Enumeration Documentation

anonymous enum

A constant to address the last segment in various methods dealing with hierarchical paths.

It is often more efficient to address the last segment using this constant, than to determine its ordinal value using getSegmentCount().

Enumerator
LAST_SEGMENT 

Definition at line 476 of file urlobj.hxx.

The way strings that represent (parts of) URIs are returned from get- methods.

Along with a DecodeMechanism parameter, the get-methods all take an rtl_TextEncoding parameter, which is ignored unless the DecodeMechanism is DecodeMechanism::WithCharset or DecodeMechanism::Unambiguous.

Enumerator
NONE 

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.

ToIUri 

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.

WithCharset 

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.

Unambiguous 

All (sequences of) escape sequences that represent characters from the specified character set, that can be converted to UTF-32, and that (in the case of ASCII characters) can safely be decoded without altering the meaning of the (part of the) URI, are replaced by the respective UTF-16 characters.

All other escape sequences are not decoded.

Definition at line 223 of file urlobj.hxx.

The way input strings that represent (parts of) URIs are interpreted in set-methods.

UTF-32 characters in the range 0x80–0x10FFFF are replaced by sequences of escape sequences, representing the UTF-8 coded characters.

Along with an EncodeMechanism parameter, the set-methods all take an rtl_TextEncoding parameter, which is ignored unless the EncodeMechanism is EncodeMechanism::WasEncoded.

Enumerator
All 

All escape sequences that are already present are ignored, and are interpreted as literal sequences of three characters.

WasEncoded 

Sequences of escape sequences, that represent characters from the specified character set and that can be converted to UTF-32 characters, are first decoded.

If they have to be encoded, they are converted to UTF-8 characters and are than translated into (sequences of) escape sequences. Other escape sequences are copied verbatim (but using upper case hex digits).

NotCanonical 

All escape sequences that are already present are copied verbatim (but using upper case hex digits).

Definition at line 194 of file urlobj.hxx.

Enumerator
NONE 
Octet 
Utf32 

Definition at line 803 of file urlobj.hxx.

Enumerator
PART_USER_PASSWORD 
PART_FPATH 
PART_AUTHORITY 
PART_REL_SEGMENT_EXTRA 
PART_URIC 
PART_HTTP_PATH 
PART_MESSAGE_ID_PATH 
PART_MAILTO 
PART_PATH_BEFORE_QUERY 
PART_PCHAR 
PART_VISIBLE 
PART_VISIBLE_NONSPECIAL 
PART_UNO_PARAM_VALUE 
PART_UNAMBIGUOUS 
PART_URIC_NO_SLASH 
PART_HTTP_QUERY 

Definition at line 783 of file urlobj.hxx.

Constructor & Destructor Documentation

INetURLObject::INetURLObject ( )
inline

Definition at line 257 of file urlobj.hxx.

Referenced by GetRelURL().

INetURLObject::INetURLObject ( OUString const &  rTheAbsURIRef,
EncodeMechanism  eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
)
inlineexplicit

Definition at line 1149 of file urlobj.hxx.

References setAbsURIRef().

INetURLObject::INetURLObject ( OUString const &  rTheAbsURIRef,
INetProtocol  eTheSmartScheme,
EncodeMechanism  eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8,
FSysStyle  eStyle = FSysStyle::Detect 
)
inline

Definition at line 1166 of file urlobj.hxx.

References setAbsURIRef().

Member Function Documentation

bool INetURLObject::Append ( OUString const &  rTheSegment,
EncodeMechanism  eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
)

Definition at line 3149 of file urlobj.cxx.

void INetURLObject::appendEscape ( OUStringBuffer &  rTheText,
sal_uInt32  nOctet 
)
inlinestaticprivate

Definition at line 426 of file urlobj.cxx.

void INetURLObject::appendUCS4 ( OUStringBuffer &  rTheText,
sal_uInt32  nUCS4,
EscapeType  eEscapeType,
Part  ePart,
rtl_TextEncoding  eCharset,
bool  bKeepVisibleEscapes 
)
static

Definition at line 4402 of file urlobj.cxx.

References INetMIME::isVisible().

void INetURLObject::appendUCS4Escape ( OUStringBuffer &  rTheText,
sal_uInt32  nUCS4 
)
static

Definition at line 4357 of file urlobj.cxx.

References DBG_ASSERT.

void INetURLObject::changeScheme ( INetProtocol  eTargetScheme)

Definition at line 1451 of file urlobj.cxx.

References Generic.

bool INetURLObject::checkHierarchical ( ) const
private

Definition at line 3139 of file urlobj.cxx.

References VndSunStarExpand.

bool INetURLObject::clearFragment ( )
private
bool INetURLObject::clearPassword ( )
private

Definition at line 2271 of file urlobj.cxx.

Referenced by GetURLNoPass(), SetPass(), and SetUserAndPass().

void INetURLObject::clearQuery ( )
private

Definition at line 3288 of file urlobj.cxx.

Referenced by CutLastName(), GetPartBeforeLastName(), and SetParam().

INetProtocol INetURLObject::CompareProtocolScheme ( OUString const &  rTheAbsURIRef)
static

Definition at line 3886 of file urlobj.cxx.

References INetURLObject::PrefixInfo::m_eScheme, and NotValid.

bool INetURLObject::ConcatData ( INetProtocol  eTheScheme,
OUString const &  rTheUser,
OUString const &  rThePassword,
OUString const &  rTheHost,
sal_uInt32  nThePort,
OUString const &  rThePath 
)

Definition at line 3690 of file urlobj.cxx.

References File, Generic, and Ldap.

bool INetURLObject::convertAbsToRel ( OUString const &  rTheAbsURIRef,
OUString &  rTheRelURIRef,
EncodeMechanism  eEncodeMechanism,
DecodeMechanism  eDecodeMechanism,
rtl_TextEncoding  eCharset,
FSysStyle  eStyle 
) const
private
bool INetURLObject::convertExtToInt ( OUString const &  rTheExtURIRef,
OUString &  rTheIntURIRef,
DecodeMechanism  eDecodeMechanism,
rtl_TextEncoding  eCharset 
)
staticprivate
bool INetURLObject::convertIntToExt ( OUString const &  rTheIntURIRef,
OUString &  rTheExtURIRef,
DecodeMechanism  eDecodeMechanism,
rtl_TextEncoding  eCharset 
)
staticprivate
bool INetURLObject::convertRelToAbs ( OUString const &  rTheRelURIRef,
INetURLObject rTheAbsURIRef,
bool &  rWasAbsolute,
EncodeMechanism  eMechanism,
rtl_TextEncoding  eCharset,
bool  bIgnoreFragment,
bool  bSmart,
bool  bRelativeNonURIs,
FSysStyle  eStyle 
) const
private
OUString INetURLObject::CutExtension ( )

Definition at line 4756 of file urlobj.cxx.

void INetURLObject::CutLastName ( )

Definition at line 4701 of file urlobj.cxx.

References clearFragment(), clearQuery(), and removeSegment().

OUString INetURLObject::decode ( OUString const &  rText,
DecodeMechanism  eMechanism,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
)
inlinestatic

Decode some text.

Parameters
rTextSome (encoded) text.
eMechanismSee the general discussion for get-methods.
eCharsetSee the general discussion for get-methods.
Returns
The text, decoded according to the given mechanism and charset (escape sequences replaced by 'raw' characters).

Definition at line 1301 of file urlobj.hxx.

Referenced by convertAbsToRel(), and decode().

OUString INetURLObject::decode ( OUStringBuffer const &  rText,
DecodeMechanism  eMechanism,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
)
inlinestatic

Definition at line 1309 of file urlobj.hxx.

References decode().

OUString INetURLObject::decode ( sal_Unicode const *  pBegin,
sal_Unicode const *  pEnd,
DecodeMechanism  eMechanism,
rtl_TextEncoding  eCharset 
)
staticprivate

Definition at line 3382 of file urlobj.cxx.

OUString INetURLObject::decode ( SubString const &  rSubString,
DecodeMechanism  eMechanism,
rtl_TextEncoding  eCharset 
) const
inlineprivate
OUString INetURLObject::encode ( OUString const &  rText,
Part  ePart,
EncodeMechanism  eMechanism,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
)
inlinestatic

Encode some text as part of a URI.

Parameters
rTextSome text (for its interpretation, see the general discussion for set-methods).
ePartThe part says which characters are 'forbidden' and must be encoded (replaced by escape sequences). Characters outside the US- ASCII range are always 'forbidden.'
eMechanismSee the general discussion for set-methods.
eCharsetSee the general discussion for set-methods.
Returns
The text, encoded according to the given mechanism and charset ('forbidden' characters replaced by escape sequences).

Definition at line 1293 of file urlobj.hxx.

References encodeText().

OUString INetURLObject::encodeText ( sal_Unicode const *  pBegin,
sal_Unicode const *  pEnd,
Part  ePart,
EncodeMechanism  eMechanism,
rtl_TextEncoding  eCharset,
bool  bKeepVisibleEscapes 
)
staticprivate

Definition at line 3363 of file urlobj.cxx.

Referenced by encode(), and encodeText().

OUString INetURLObject::encodeText ( OUString const &  rTheText,
Part  ePart,
EncodeMechanism  eMechanism,
rtl_TextEncoding  eCharset,
bool  bKeepVisibleEscapes 
)
inlinestaticprivate

Definition at line 1127 of file urlobj.hxx.

References encodeText().

OUString INetURLObject::getAbbreviated ( css::uno::Reference< css::util::XStringWidth > const &  rStringWidth,
sal_Int32  nWidth,
DecodeMechanism  eMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
) const

Definition at line 3454 of file urlobj.cxx.

References aBuffer, Generic, and i.

OUString INetURLObject::GetAbsURL ( OUString const &  rTheBaseURIRef,
OUString const &  rTheRelURIRef,
EncodeMechanism  eEncodeMechanism = EncodeMechanism::WasEncoded,
DecodeMechanism  eDecodeMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
)
static

If rTheRelURIRef cannot be converted to an absolute URL (because of syntactic reasons), either rTheRelURIRef or an empty string is returned: If all of the parameters eEncodeMechanism, eDecodeMechanism and eCharset have their respective default values, then rTheRelURIRef is returned unmodified; otherwise, an empty string is returned.

Definition at line 3823 of file urlobj.cxx.

References Detect, and GetMainURL().

INetURLObject::SubString INetURLObject::getAuthority ( ) const
private

Definition at line 2218 of file urlobj.cxx.

sal_Int32 INetURLObject::getAuthorityBegin ( ) const
private

Definition at line 2201 of file urlobj.cxx.

References DBG_ASSERT.

OUString INetURLObject::getBase ( sal_Int32  nIndex = LAST_SEGMENT,
bool  bIgnoreFinalSlash = true,
DecodeMechanism  eMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
) const

Get the base of the name of a segment.

Parameters
nIndexThe non-negative index of the segment, or LAST_SEGMENT if addressing the last segment.
bIgnoreFinalSlashIf true, a final slash at the end of the hierarchical path does not denote an empty segment, but is ignored.
eMechanismSee the general discussion for get-methods.
eCharsetSee the general discussion for get-methods.
Returns
The base part of the specified segment. If the path is not hierarchical, or the specified segment does not exits, an empty string is returned.

Definition at line 4054 of file urlobj.cxx.

References INetURLObject::SubString::getBegin(), INetURLObject::SubString::getLength(), and INetURLObject::SubString::isPresent().

OUString INetURLObject::GetBase ( ) const

Definition at line 4746 of file urlobj.cxx.

std::unique_ptr< SvMemoryStream > INetURLObject::getData ( ) const
OUString INetURLObject::getExtension ( sal_Int32  nIndex = LAST_SEGMENT,
bool  bIgnoreFinalSlash = true,
DecodeMechanism  eMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
) const

Get the extension of the name of a segment.

Parameters
nIndexThe non-negative index of the segment, or LAST_SEGMENT if addressing the last segment.
bIgnoreFinalSlashIf true, a final slash at the end of the hierarchical path does not denote an empty segment, but is ignored.
eMechanismSee the general discussion for get-methods.
eCharsetSee the general discussion for get-methods.
Returns
The extension part of the specified segment. If the path is not hierarchical, or the specified segment does not exits, an empty string is returned.

Definition at line 4114 of file urlobj.cxx.

References INetURLObject::SubString::getBegin(), INetURLObject::SubString::getLength(), and INetURLObject::SubString::isPresent().

OUString INetURLObject::getExternalURL ( ) const

Definition at line 3847 of file urlobj.cxx.

OUString INetURLObject::GetFileExtension ( ) const

Get the 'extension' of the last segment in the path.

Returns
For a hierarchical URL, everything after the first unencoded '.' in the last segment of the path. Note that this 'extension' may be empty. If the URL is not hierarchical, or if the last segment does not contain an unencoded '.', an empty string is returned.

Definition at line 4696 of file urlobj.cxx.

OUString INetURLObject::getFSysPath ( FSysStyle  eStyle,
sal_Unicode pDelimiter = nullptr 
) const

Return the file system path represented by a file URL (ignoring any fragment part).

Parameters
eStyleThe notation of the returned file system path.
pDelimiterUpon successful return, this parameter can return the character that is the 'main' delimiter within the returned file system path (e.g., "/" for Unix, "\" for DOS). This is especially useful for routines that later try to shorten the returned file system path at a 'good' position, e.g. to fit it into some limited display space.
Returns
The file system path represented by this file URL. If this file URL does not represent a file system path according to the specified notation, or if this is not a file URL at all, an empty string is returned.

Definition at line 4253 of file urlobj.cxx.

References DBG_ASSERT, Dos, File, Unix, and Vos.

OUString INetURLObject::GetFull ( ) const

Definition at line 4726 of file urlobj.cxx.

References PathToFileName(), and removeFinalSlash().

OUString INetURLObject::GetHost ( DecodeMechanism  eMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
) const
inline

Definition at line 438 of file urlobj.hxx.

Referenced by operator==().

OUString INetURLObject::GetHostPort ( DecodeMechanism  eMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
) const

Definition at line 3894 of file urlobj.cxx.

OUString INetURLObject::GetLastName ( DecodeMechanism  eMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
) const

Get the last segment in the path.

Parameters
eMechanismSee the general discussion for get-methods.
eCharsetSee the general discussion for get-methods.
Returns
For a hierarchical URL, the last segment (everything after the last unencoded '/'). Note that this last segment may be empty. If the URL is not hierarchical, an empty string is returned.

Definition at line 4690 of file urlobj.cxx.

OUString INetURLObject::GetMainURL ( DecodeMechanism  eMechanism,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
) const
inline
OUString INetURLObject::GetMark ( DecodeMechanism  eMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
) const
inline

Definition at line 747 of file urlobj.hxx.

OUString INetURLObject::getName ( sal_Int32  nIndex = LAST_SEGMENT,
bool  bIgnoreFinalSlash = true,
DecodeMechanism  eMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
) const

Get the name of a segment of the hierarchical path.

Parameters
nIndexThe non-negative index of the segment, or LAST_SEGMENT if addressing the last segment.
bIgnoreFinalSlashIf true, a final slash at the end of the hierarchical path does not denote an empty segment, but is ignored.
eMechanismSee the general discussion for get-methods.
eCharsetSee the general discussion for get-methods.
Returns
The name part of the specified segment. If the path is not hierarchical, or the specified segment does not exits, an empty string is returned.

Definition at line 3985 of file urlobj.cxx.

References INetURLObject::SubString::getBegin(), INetURLObject::SubString::getLength(), and INetURLObject::SubString::isPresent().

bool INetURLObject::GetNewAbsURL ( OUString const &  rTheRelURIRef,
INetURLObject pTheAbsURIRef 
) const
inline

Definition at line 1201 of file urlobj.hxx.

References convertRelToAbs(), Detect, and WasEncoded.

OUString INetURLObject::GetParam ( rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8) const
inline

Definition at line 735 of file urlobj.hxx.

Referenced by operator==().

OUString INetURLObject::GetPartBeforeLastName ( ) const

Definition at line 4677 of file urlobj.cxx.

References clearFragment(), clearQuery(), GetMainURL(), removeSegment(), and setFinalSlash().

OUString INetURLObject::GetPass ( DecodeMechanism  eMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
) const
inline

Definition at line 421 of file urlobj.hxx.

Referenced by operator==().

OUString INetURLObject::GetPath ( ) const

Definition at line 4733 of file urlobj.cxx.

References PathToFileName(), removeFinalSlash(), and removeSegment().

sal_uInt32 INetURLObject::GetPort ( ) const

Definition at line 3910 of file urlobj.cxx.

References INetMIME::scanUnsigned().

Referenced by operator==().

INetURLObject::PrefixInfo const * INetURLObject::getPrefix ( sal_Unicode const *&  rBegin,
sal_Unicode const *  pEnd 
)
staticprivate
INetProtocol INetURLObject::GetProtocol ( ) const
inline

Definition at line 380 of file urlobj.hxx.

OUString INetURLObject::GetRelURL ( OUString const &  rTheBaseURIRef,
OUString const &  rTheAbsURIRef,
EncodeMechanism  eEncodeMechanism = EncodeMechanism::WasEncoded,
DecodeMechanism  eDecodeMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8,
FSysStyle  eStyle = FSysStyle::Detect 
)
inlinestatic

Definition at line 1217 of file urlobj.hxx.

References convertAbsToRel(), and INetURLObject().

OUString INetURLObject::GetScheme ( INetProtocol  eTheScheme)
static

Return the URL 'prefix' for a given scheme.

Parameters
eTheSchemeOne of the supported URL schemes.
Returns
The 'prefix' of URLs of the given scheme.

Definition at line 3874 of file urlobj.cxx.

INetURLObject::SchemeInfo const & INetURLObject::getSchemeInfo ( INetProtocol  eTheScheme)
inlinestaticprivate

Definition at line 316 of file urlobj.cxx.

References map.

INetURLObject::SchemeInfo const & INetURLObject::getSchemeInfo ( ) const
inlineprivate

Definition at line 407 of file urlobj.cxx.

OUString INetURLObject::GetSchemeName ( INetProtocol  eTheScheme)
static

Return the human-readable name for a given scheme.

Parameters
eTheSchemeOne of the supported URL schemes.
Returns
The protocol name of URLs of the given scheme.

Definition at line 3880 of file urlobj.cxx.

INetURLObject::SubString INetURLObject::getSegment ( sal_Int32  nIndex,
bool  bIgnoreFinalSlash 
) const
private

Definition at line 3156 of file urlobj.cxx.

References DBG_ASSERT.

sal_Int32 INetURLObject::getSegmentCount ( bool  bIgnoreFinalSlash = true) const

The number of segments in the hierarchical path.

Using RFC 2396 and RFC 2234, a hierarchical path is of the form

hierarchical-path = 1*("/" segment)

segment = name *(";" param)

name = [base ["." extension]]

base = 1*pchar

extension = *<any pchar except ".">

param = *pchar

Parameters
bIgnoreFinalSlashIf true, a final slash at the end of the hierarchical path does not denote an empty segment, but is ignored.
Returns
The number of segments in the hierarchical path. If the path is not hierarchical, 0 is returned.

Definition at line 3945 of file urlobj.cxx.

References n.

OUString INetURLObject::GetURLNoMark ( DecodeMechanism  eMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
) const

Definition at line 3445 of file urlobj.cxx.

References clearFragment(), and GetMainURL().

OUString INetURLObject::GetURLNoPass ( DecodeMechanism  eMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
) const

Definition at line 3437 of file urlobj.cxx.

References clearPassword(), and GetMainURL().

OUString INetURLObject::GetURLPath ( DecodeMechanism  eMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
) const
inline

Definition at line 457 of file urlobj.hxx.

Referenced by operator==().

OUString INetURLObject::GetUser ( DecodeMechanism  eMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
) const
inline

Definition at line 416 of file urlobj.hxx.

Referenced by operator==().

sal_uInt32 INetURLObject::getUTF32 ( sal_Unicode const *&  rBegin,
sal_Unicode const *  pEnd,
EncodeMechanism  eMechanism,
rtl_TextEncoding  eCharset,
EscapeType rEscapeType 
)
static

Definition at line 4465 of file urlobj.cxx.

References DBG_ASSERT, INetMIME::getHexWeight(), and INetMIME::getUTF32Character().

bool INetURLObject::hasDosVolume ( FSysStyle  eStyle) const
private

Definition at line 3351 of file urlobj.cxx.

References Dos.

Referenced by convertAbsToRel().

bool INetURLObject::HasError ( ) const
inline

Definition at line 260 of file urlobj.hxx.

References NotValid.

Referenced by convertRelToAbs().

bool INetURLObject::hasExtension ( ) const

Determine whether the name of the last segment has an extension.

Returns
True if the name of the specified segment has an extension. If the path is not hierarchical, or the specified segment does not exist, false is returned.

Definition at line 4035 of file urlobj.cxx.

References INetURLObject::SubString::getBegin(), INetURLObject::SubString::getLength(), and INetURLObject::SubString::isPresent().

bool INetURLObject::hasFinalSlash ( ) const

Determine whether the hierarchical path ends in a final slash.

Returns
True if the hierarchical path ends in a final slash. If the path is not hierarchical, false is returned.

Definition at line 4207 of file urlobj.cxx.

bool INetURLObject::HasMark ( ) const
inline

Definition at line 745 of file urlobj.hxx.

bool INetURLObject::HasParam ( ) const
inline

Definition at line 733 of file urlobj.hxx.

Referenced by operator==().

bool INetURLObject::HasPort ( ) const
inline

Definition at line 436 of file urlobj.hxx.

bool INetURLObject::HasURLPath ( ) const
inline

Definition at line 455 of file urlobj.hxx.

bool INetURLObject::HasUserData ( ) const
inline

Definition at line 414 of file urlobj.hxx.

bool INetURLObject::insertName ( OUString const &  rTheName,
bool  bAppendFinalSlash = false,
sal_Int32  nIndex = LAST_SEGMENT,
EncodeMechanism  eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
)

Insert a new segment into the hierarchical path.

A final slash at the end of the hierarchical path does not denote an empty segment, but is ignored.

Parameters
rTheNameThe name part of the new segment. The new segment will contain no parameters.
bAppendFinalSlashIf the new segment is appended at the end of the hierarchical path, this parameter specifies whether to add a final slash after it or not.
nIndexThe non-negative index of the segment before which to insert the new segment. LAST_SEGMENT or an nIndex that equals getSegmentCount() inserts the new segment at the end of the hierarchical path.
eMechanismSee the general discussion for set-methods.
eCharsetSee the general discussion for set-methods.
Returns
True if the segment has successfully been inserted (and the resulting URI is still valid). If the path is not hierarchical, or the specified place to insert the new segment does not exist, false is returned. If false is returned, the object is not modified.

Definition at line 3202 of file urlobj.cxx.

References DBG_ASSERT.

bool INetURLObject::isAnyKnownWebDAVScheme ( ) const

Check if the scheme is one of the WebDAV scheme we know about.

Returns
true is one other scheme either public scheme or private scheme.

Definition at line 3864 of file urlobj.cxx.

References Http, Https, u, and VndSunStarWebdav.

static bool INetURLObject::IsCaseSensitive ( )
inlinestatic

Definition at line 919 of file urlobj.hxx.

bool INetURLObject::isSchemeEqualTo ( INetProtocol  scheme) const
inline

Definition at line 382 of file urlobj.hxx.

bool INetURLObject::isSchemeEqualTo ( std::u16string_view  scheme) const

Definition at line 3855 of file urlobj.cxx.

bool INetURLObject::operator!= ( INetURLObject const &  rObject) const
inline

Definition at line 284 of file urlobj.hxx.

bool INetURLObject::operator== ( INetURLObject const &  rObject) const
bool INetURLObject::parseHost ( sal_Unicode const *&  rBegin,
sal_Unicode const *  pEnd,
OUString &  rCanonic 
)
staticprivate

Definition at line 2330 of file urlobj.cxx.

References INetMIME::getHexWeight(), and INetMIME::getWeight().

bool INetURLObject::parseHostOrNetBiosName ( sal_Unicode const *  pBegin,
sal_Unicode const *  pEnd,
EncodeMechanism  eMechanism,
rtl_TextEncoding  eCharset,
bool  bNetBiosName,
OUStringBuffer *  pCanonic 
)
staticprivate

Definition at line 2764 of file urlobj.cxx.

References INetMIME::isVisible().

bool INetURLObject::parsePath ( INetProtocol  eScheme,
sal_Unicode const **  pBegin,
sal_Unicode const *  pEnd,
EncodeMechanism  eMechanism,
rtl_TextEncoding  eCharset,
bool  bSkippedInitialSlash,
sal_uInt32  nSegmentDelimiter,
sal_uInt32  nAltSegmentDelimiter,
sal_uInt32  nQueryDelimiter,
sal_uInt32  nFragmentDelimiter,
OUStringBuffer &  rSynPath 
)
staticprivate
OUString INetURLObject::PathToFileName ( ) const

Definition at line 4711 of file urlobj.cxx.

References File.

Referenced by GetFull(), and GetPath().

bool INetURLObject::removeExtension ( sal_Int32  nIndex = LAST_SEGMENT,
bool  bIgnoreFinalSlash = true 
)

Remove the extension of the name of a segment.

Parameters
nIndexThe non-negative index of the segment, or LAST_SEGMENT if addressing the last segment.
bIgnoreFinalSlashIf true, a final slash at the end of the hierarchical path does not denote an empty segment, but is ignored.
Returns
True if the extension has successfully been removed (and the resulting URI is still valid), or if the name did not have an extension. If the path is not hierarchical, or the specified segment does not exist, false is returned. If false is returned, the object is not modified.

Definition at line 4177 of file urlobj.cxx.

References INetURLObject::SubString::getBegin(), INetURLObject::SubString::getLength(), and INetURLObject::SubString::isPresent().

bool INetURLObject::removeFinalSlash ( )

Remove a final slash from the hierarchical path.

Returns
True if a final slash has successfully been removed (and the resulting URI is still valid), or if the hierarchical path already did not end in a final slash. If the path is not hierarchical, false is returned. If false is returned, the object is not modified.

Definition at line 4234 of file urlobj.cxx.

Referenced by GetFull(), and GetPath().

bool INetURLObject::removeSegment ( sal_Int32  nIndex = LAST_SEGMENT,
bool  bIgnoreFinalSlash = true 
)

Remove a segment from the hierarchical path.

Parameters
nIndexThe non-negative index of the segment, or LAST_SEGMENT if addressing the last segment.
bIgnoreFinalSlashIf true, a final slash at the end of the hierarchical path does not denote an empty segment, but is ignored.
Returns
True if the segment has successfully been removed (and the resulting URI is still valid). If the path is not hierarchical, or the specified segment does not exist, false is returned. If false is returned, the object is not modified.

Definition at line 3961 of file urlobj.cxx.

References INetURLObject::SubString::getBegin(), INetURLObject::SubString::getEnd(), INetURLObject::SubString::isEmpty(), and INetURLObject::SubString::isPresent().

Referenced by CutLastName(), GetPartBeforeLastName(), and GetPath().

sal_uInt32 INetURLObject::scanDomain ( sal_Unicode const *&  rBegin,
sal_Unicode const *  pEnd,
bool  bEager = true 
)
static

Definition at line 4597 of file urlobj.cxx.

bool INetURLObject::scanIPv6reference ( sal_Unicode const *&  rBegin,
sal_Unicode const *  pEnd 
)
staticprivate

Definition at line 4659 of file urlobj.cxx.

bool INetURLObject::setAbsURIRef ( OUString const &  rTheAbsURIRef,
EncodeMechanism  eMechanism,
rtl_TextEncoding  eCharset,
bool  bSmart,
FSysStyle  eStyle 
)
private
bool INetURLObject::setBase ( OUString const &  rTheBase,
sal_Int32  nIndex = LAST_SEGMENT,
EncodeMechanism  eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
)

Set the base of the name of a segment (preserving the extension).

A final slash at the end of the hierarchical path does not denote an empty segment, but is ignored.

Parameters
rTheBaseThe new base.
nIndexThe non-negative index of the segment, or LAST_SEGMENT if addressing the last segment.
eMechanismSee the general discussion for set-methods.
eCharsetSee the general discussion for set-methods.
Returns
True if the base has successfully been modified (and the resulting URI is still valid). If the path is not hierarchical, or the specified segment does not exist, false is returned. If false is returned, the object is not modified.

Definition at line 4079 of file urlobj.cxx.

References INetURLObject::SubString::getBegin(), INetURLObject::SubString::getLength(), and INetURLObject::SubString::isPresent().

void INetURLObject::SetBase ( OUString const &  rTheBase)

Definition at line 4741 of file urlobj.cxx.

bool INetURLObject::setExtension ( OUString const &  rTheExtension,
sal_Int32  nIndex = LAST_SEGMENT,
bool  bIgnoreFinalSlash = true,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
)

Set the extension of the name of a segment (replacing an already existing extension).

Parameters
rTheExtensionThe new extension.
nIndexThe non-negative index of the segment, or LAST_SEGMENT if addressing the last segment.
bIgnoreFinalSlashIf true, a final slash at the end of the hierarchical path does not denote an empty segment, but is ignored.
eCharsetSee the general discussion for set-methods.
Returns
True if the extension has successfully been modified (and the resulting URI is still valid). If the path is not hierarchical, or the specified segment does not exist, false is returned. If false is returned, the object is not modified.

Definition at line 4141 of file urlobj.cxx.

References INetURLObject::SubString::getBegin(), INetURLObject::SubString::getLength(), and INetURLObject::SubString::isPresent().

void INetURLObject::SetExtension ( OUString const &  rTheExtension)

Definition at line 4751 of file urlobj.cxx.

bool INetURLObject::setFinalSlash ( )

Make the hierarchical path end in a final slash (if it does not already do so).

Returns
True if a final slash has successfully been appended (and the resulting URI is still valid), or if the hierarchical path already ended in a final slash. If the path is not hierarchical, false is returned. If false is returned, the object is not modified.

Definition at line 4218 of file urlobj.cxx.

Referenced by GetPartBeforeLastName().

bool INetURLObject::setFragment ( OUString const &  rTheMark,
EncodeMechanism  eMechanism,
rtl_TextEncoding  eCharset 
)
private

Definition at line 3333 of file urlobj.cxx.

Referenced by SetMark().

bool INetURLObject::SetHost ( OUString const &  rTheHost)
inline

Definition at line 448 of file urlobj.hxx.

bool INetURLObject::setHost ( OUString const &  rTheHost,
rtl_TextEncoding  eCharset 
)
private

Definition at line 2825 of file urlobj.cxx.

References File, and Ldap.

void INetURLObject::setInvalid ( )
private

Definition at line 563 of file urlobj.cxx.

References NotValid.

bool INetURLObject::SetMark ( OUString const &  rTheFragment,
EncodeMechanism  eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
)
inline

Definition at line 1283 of file urlobj.hxx.

References clearFragment(), and setFragment().

bool INetURLObject::setName ( OUString const &  rTheName,
EncodeMechanism  eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
)

Set the name of the last segment (preserving any parameters and any query or fragment part).

Parameters
rTheNameThe new name.
eMechanismSee the general discussion for get-methods.
eCharsetSee the general discussion for get-methods.
Returns
True if the name has successfully been modified (and the resulting URI is still valid). If the path is not hierarchical, or a last segment does not exist, false is returned. If false is returned, the object is not modified.

Definition at line 4006 of file urlobj.cxx.

References INetURLObject::SubString::getBegin(), INetURLObject::SubString::getLength(), and INetURLObject::SubString::isPresent().

bool INetURLObject::SetParam ( OUString const &  rTheQuery,
EncodeMechanism  eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
)
inline

Definition at line 1271 of file urlobj.hxx.

References clearQuery(), and setQuery().

bool INetURLObject::SetPass ( OUString const &  rThePassword)
inline

Definition at line 1255 of file urlobj.hxx.

References clearPassword(), and setPassword().

bool INetURLObject::setPassword ( OUString const &  rThePassword,
rtl_TextEncoding  eCharset 
)
private

Definition at line 2289 of file urlobj.cxx.

References u.

Referenced by SetPass(), and SetUserAndPass().

bool INetURLObject::setPath ( OUString const &  rThePath,
EncodeMechanism  eMechanism,
rtl_TextEncoding  eCharset 
)
private

Definition at line 3122 of file urlobj.cxx.

bool INetURLObject::SetPort ( sal_uInt32  nThePort)

Definition at line 3923 of file urlobj.cxx.

References u.

bool INetURLObject::setQuery ( OUString const &  rTheQuery,
EncodeMechanism  eMechanism,
rtl_TextEncoding  eCharset 
)
private

Definition at line 3300 of file urlobj.cxx.

References u.

Referenced by SetParam().

void INetURLObject::SetSmartProtocol ( INetProtocol  eTheSmartScheme)
inline

Definition at line 311 of file urlobj.hxx.

bool INetURLObject::SetSmartURL ( OUString const &  rTheAbsURIRef,
EncodeMechanism  eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8,
FSysStyle  eStyle = FSysStyle::Detect 
)
inline

Definition at line 1176 of file urlobj.hxx.

References setAbsURIRef().

bool INetURLObject::SetURL ( OUString const &  rTheAbsURIRef,
EncodeMechanism  eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
)
inline

Definition at line 1158 of file urlobj.hxx.

References setAbsURIRef().

bool INetURLObject::SetURLPath ( OUString const &  rThePath,
EncodeMechanism  eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
)
inline

Definition at line 462 of file urlobj.hxx.

bool INetURLObject::SetUser ( OUString const &  rTheUser)
inline

Definition at line 426 of file urlobj.hxx.

bool INetURLObject::setUser ( OUString const &  rTheUser,
rtl_TextEncoding  eCharset 
)
private

Definition at line 2229 of file urlobj.cxx.

References u.

Referenced by SetUserAndPass().

bool INetURLObject::SetUserAndPass ( OUString const &  rTheUser,
OUString const &  rThePassword 
)
inline

Definition at line 1262 of file urlobj.hxx.

References clearPassword(), setPassword(), and setUser().

INetURLObject INetURLObject::smartRel2Abs ( OUString const &  rTheRelURIRef,
bool &  rWasAbsolute,
bool  bIgnoreFragment = false,
EncodeMechanism  eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8,
bool  bRelativeNonURIs = false,
FSysStyle  eStyle = FSysStyle::Detect 
) const
inline

Definition at line 1186 of file urlobj.hxx.

References convertRelToAbs().

bool INetURLObject::translateToExternal ( OUString const &  rTheIntURIRef,
OUString &  rTheExtURIRef,
DecodeMechanism  eDecodeMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
)
inlinestatic

Definition at line 1232 of file urlobj.hxx.

References convertIntToExt().

bool INetURLObject::translateToInternal ( OUString const &  rTheExtURIRef,
OUString &  rTheIntURIRef,
DecodeMechanism  eDecodeMechanism = DecodeMechanism::ToIUri,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
)
inlinestatic

Definition at line 1244 of file urlobj.hxx.

References convertExtToInt().

Member Data Documentation

OUStringBuffer INetURLObject::m_aAbsURIRef
private

Definition at line 965 of file urlobj.hxx.

Referenced by convertAbsToRel(), decode(), and operator==().

SubString INetURLObject::m_aAuth
private

Definition at line 968 of file urlobj.hxx.

Referenced by convertAbsToRel().

SubString INetURLObject::m_aFragment
private

Definition at line 973 of file urlobj.hxx.

Referenced by convertAbsToRel().

SubString INetURLObject::m_aHost
private

Definition at line 969 of file urlobj.hxx.

Referenced by convertAbsToRel().

SubString INetURLObject::m_aPath
private

Definition at line 971 of file urlobj.hxx.

Referenced by convertAbsToRel().

SubString INetURLObject::m_aPort
private

Definition at line 970 of file urlobj.hxx.

Referenced by convertAbsToRel().

SubString INetURLObject::m_aQuery
private

Definition at line 972 of file urlobj.hxx.

Referenced by convertAbsToRel().

SubString INetURLObject::m_aScheme
private

Definition at line 966 of file urlobj.hxx.

Referenced by convertAbsToRel(), and operator==().

SubString INetURLObject::m_aUser
private

Definition at line 967 of file urlobj.hxx.

Referenced by convertAbsToRel().

INetProtocol INetURLObject::m_eScheme
private

Definition at line 974 of file urlobj.hxx.

Referenced by operator==().

INetProtocol INetURLObject::m_eSmartScheme
private

Definition at line 975 of file urlobj.hxx.


The documentation for this class was generated from the following files: