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 class  EncodeMechanism {
  All ,
  WasEncoded ,
  NotCanonical
}
 The way input strings that represent (parts of) URIs are interpreted in set-methods. More...
 
enum class  DecodeMechanism {
  NONE ,
  ToIUri ,
  WithCharset ,
  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 class  EscapeType {
  NONE ,
  Octet ,
  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 (std::u16string_view rTheAbsURIRef, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
 
bool SetURL (std::u16string_view rTheAbsURIRef, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
 
bool ConcatData (INetProtocol eTheScheme, std::u16string_view rTheUser, std::u16string_view rThePassword, std::u16string_view rTheHost, sal_uInt32 nThePort, std::u16string_view rThePath)
 
 INetURLObject (std::u16string_view rTheAbsURIRef, INetProtocol eTheSmartScheme, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8, FSysStyle eStyle=FSysStyle::Detect)
 
void SetSmartProtocol (INetProtocol eTheSmartScheme)
 
bool SetSmartURL (std::u16string_view 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 (std::u16string_view rTheUser)
 
bool SetPass (std::u16string_view rThePassword)
 
bool SetUserAndPass (std::u16string_view rTheUser, std::u16string_view 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 (std::u16string_view rTheHost)
 
bool SetPort (sal_uInt32 nThePort)
 
bool HasURLPath () const
 
OUString GetURLPath (DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
 
bool SetURLPath (std::u16string_view 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 (std::u16string_view 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 (std::u16string_view 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 (std::u16string_view 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 (std::u16string_view 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 (std::u16string_view 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 (std::u16string_view 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 (std::u16string_view rTheSegment, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
 
void CutLastName ()
 
OUString PathToFileName () const
 
OUString GetFull () const
 
OUString GetPath () const
 
void SetBase (std::u16string_view rTheBase)
 
OUString GetBase () const
 
void SetExtension (std::u16string_view rTheExtension)
 
OUString CutExtension ()
 
void changeScheme (INetProtocol eTargetScheme)
 

Static Public Member Functions

static OUString GetAbsURL (std::u16string_view rTheBaseURIRef, OUString const &rTheRelURIRef, EncodeMechanism eEncodeMechanism=EncodeMechanism::WasEncoded, DecodeMechanism eDecodeMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
 @descr 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 (std::u16string_view 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 (std::u16string_view rTheIntURIRef, OUString &rTheExtURIRef, DecodeMechanism eDecodeMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
 
static bool translateToInternal (std::u16string_view 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 const OUString & GetSchemeName (INetProtocol eTheScheme)
 Return the human-readable name for a given scheme. More...
 
static INetProtocol CompareProtocolScheme (std::u16string_view aTheAbsURIRef)
 
static OUString encode (std::u16string_view rText, Part ePart, EncodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
 Encode some text as part of a URI. More...
 
static OUString decode (std::u16string_view rText, DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
 Decode some text. More...
 
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 (std::u16string_view 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 (std::u16string_view rTheUser, rtl_TextEncoding eCharset)
 
bool clearPassword ()
 
bool setPassword (std::u16string_view rThePassword, rtl_TextEncoding eCharset)
 
bool setHost (std::u16string_view rTheHost, rtl_TextEncoding eCharset)
 
bool setPath (std::u16string_view 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 (std::u16string_view rTheQuery, EncodeMechanism eMechanism, rtl_TextEncoding eCharset)
 
bool clearFragment ()
 
bool setFragment (std::u16string_view 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 (std::u16string_view rTheIntURIRef, OUString &rTheExtURIRef, DecodeMechanism eDecodeMechanism, rtl_TextEncoding eCharset)
 
static bool convertExtToInt (std::u16string_view 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, OUStringBuffer *pCanonic)
 
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 void encodeText (OUStringBuffer &rOutputBuffer, sal_Unicode const *pBegin, sal_Unicode const *pEnd, Part ePart, EncodeMechanism eMechanism, rtl_TextEncoding eCharset, bool bKeepVisibleEscapes)
 
static void encodeText (OUStringBuffer &rOutputBuffer, std::u16string_view 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

anonymous enum

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

@descr 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 475 of file urlobj.hxx.

◆ DecodeMechanism

enum class INetURLObject::DecodeMechanism
strong

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

@descr 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.

◆ EncodeMechanism

enum class INetURLObject::EncodeMechanism
strong

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

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

@descr 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.

◆ EscapeType

enum class INetURLObject::EscapeType
strong
Enumerator
NONE 
Octet 
Utf32 

Definition at line 802 of file urlobj.hxx.

◆ Part

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 782 of file urlobj.hxx.

Constructor & Destructor Documentation

◆ INetURLObject() [1/3]

INetURLObject::INetURLObject ( )
inline

Definition at line 257 of file urlobj.hxx.

Referenced by GetAbsURL(), and GetRelURL().

◆ INetURLObject() [2/3]

INetURLObject::INetURLObject ( std::u16string_view  rTheAbsURIRef,
EncodeMechanism  eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
)
inlineexplicit

Definition at line 1148 of file urlobj.hxx.

References setAbsURIRef(), and size.

◆ INetURLObject() [3/3]

INetURLObject::INetURLObject ( std::u16string_view  rTheAbsURIRef,
INetProtocol  eTheSmartScheme,
EncodeMechanism  eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8,
FSysStyle  eStyle = FSysStyle::Detect 
)
inline

Definition at line 1165 of file urlobj.hxx.

References setAbsURIRef().

Member Function Documentation

◆ Append()

bool INetURLObject::Append ( std::u16string_view  rTheSegment,
EncodeMechanism  eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
)

Definition at line 3229 of file urlobj.cxx.

References insertName(), and LAST_SEGMENT.

◆ appendEscape()

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

Definition at line 459 of file urlobj.cxx.

Referenced by appendUCS4(), appendUCS4Escape(), and decode().

◆ appendUCS4()

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

◆ appendUCS4Escape()

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

Definition at line 4417 of file urlobj.cxx.

References appendEscape(), and DBG_ASSERT.

Referenced by appendUCS4().

◆ changeScheme()

void INetURLObject::changeScheme ( INetProtocol  eTargetScheme)

◆ checkHierarchical()

bool INetURLObject::checkHierarchical ( ) const
private

◆ clearFragment()

bool INetURLObject::clearFragment ( )
private

◆ clearPassword()

bool INetURLObject::clearPassword ( )
private

◆ clearQuery()

void INetURLObject::clearQuery ( )
private

◆ CompareProtocolScheme()

INetProtocol INetURLObject::CompareProtocolScheme ( std::u16string_view  aTheAbsURIRef)
static

Definition at line 3959 of file urlobj.cxx.

References getPrefix(), INetURLObject::PrefixInfo::m_eScheme, NotValid, and p.

◆ ConcatData()

bool INetURLObject::ConcatData ( INetProtocol  eTheScheme,
std::u16string_view  rTheUser,
std::u16string_view  rThePassword,
std::u16string_view  rTheHost,
sal_uInt32  nThePort,
std::u16string_view  rThePath 
)

◆ convertAbsToRel()

bool INetURLObject::convertAbsToRel ( OUString const &  rTheAbsURIRef,
OUString &  rTheRelURIRef,
EncodeMechanism  eEncodeMechanism,
DecodeMechanism  eDecodeMechanism,
rtl_TextEncoding  eCharset,
FSysStyle  eStyle 
) const
private

◆ convertExtToInt()

bool INetURLObject::convertExtToInt ( std::u16string_view  rTheExtURIRef,
OUString &  rTheIntURIRef,
DecodeMechanism  eDecodeMechanism,
rtl_TextEncoding  eCharset 
)
staticprivate

◆ convertIntToExt()

bool INetURLObject::convertIntToExt ( std::u16string_view  rTheIntURIRef,
OUString &  rTheExtURIRef,
DecodeMechanism  eDecodeMechanism,
rtl_TextEncoding  eCharset 
)
staticprivate

◆ convertRelToAbs()

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

◆ CutExtension()

OUString INetURLObject::CutExtension ( )

Definition at line 4816 of file urlobj.cxx.

References getExtension(), LAST_SEGMENT, and removeExtension().

◆ CutLastName()

void INetURLObject::CutLastName ( )

Definition at line 4761 of file urlobj.cxx.

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

◆ decode() [1/3]

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

Definition at line 3464 of file urlobj.cxx.

References appendEscape(), getUTF32(), NONE, Octet, PART_UNAMBIGUOUS, ToIUri, Unambiguous, Utf32, and WasEncoded.

◆ decode() [2/3]

OUString INetURLObject::decode ( std::u16string_view  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 1302 of file urlobj.hxx.

References decode().

Referenced by convertAbsToRel(), convertExtToInt(), convertIntToExt(), decode(), getAbbreviated(), getBase(), getExtension(), getFSysPath(), GetHostPort(), getName(), and PathToFileName().

◆ decode() [3/3]

OUString INetURLObject::decode ( SubString const &  rSubString,
DecodeMechanism  eMechanism,
rtl_TextEncoding  eCharset 
) const
inlineprivate

◆ encode()

OUString INetURLObject::encode ( std::u16string_view  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 1292 of file urlobj.hxx.

References aBuf, and encodeText().

◆ encodeText() [1/2]

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

◆ encodeText() [2/2]

void INetURLObject::encodeText ( OUStringBuffer &  rOutputBuffer,
std::u16string_view  rTheText,
Part  ePart,
EncodeMechanism  eMechanism,
rtl_TextEncoding  eCharset,
bool  bKeepVisibleEscapes 
)
inlinestaticprivate

Definition at line 1124 of file urlobj.hxx.

References encodeText().

◆ getAbbreviated()

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

◆ GetAbsURL()

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

@descr 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 3896 of file urlobj.cxx.

References convertRelToAbs(), Detect, GetMainURL(), INetURLObject(), ToIUri, and WasEncoded.

◆ getAuthority()

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

◆ getAuthorityBegin()

sal_Int32 INetURLObject::getAuthorityBegin ( ) const
private

◆ GetBase()

OUString INetURLObject::GetBase ( ) const

Definition at line 4806 of file urlobj.cxx.

References getBase(), LAST_SEGMENT, and WithCharset.

◆ getBase()

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 4122 of file urlobj.cxx.

References decode(), INetURLObject::SubString::getBegin(), INetURLObject::SubString::getLength(), getSegment(), INetURLObject::SubString::isPresent(), m_aAbsURIRef, nIndex, and p.

Referenced by GetBase().

◆ getData()

std::unique_ptr< SvMemoryStream > INetURLObject::getData ( ) const

◆ getExtension()

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 4179 of file urlobj.cxx.

References decode(), INetURLObject::SubString::getBegin(), INetURLObject::SubString::getLength(), getSegment(), INetURLObject::SubString::isPresent(), m_aAbsURIRef, nIndex, and p.

Referenced by CutExtension(), and GetFileExtension().

◆ getExternalURL()

OUString INetURLObject::getExternalURL ( ) const

Definition at line 3920 of file urlobj.cxx.

References m_aAbsURIRef, and translateToExternal().

◆ GetFileExtension()

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 4756 of file urlobj.cxx.

References getExtension(), and LAST_SEGMENT.

◆ getFSysPath()

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 4315 of file urlobj.cxx.

References DBG_ASSERT, decode(), Dos, File, INetURLObject::SubString::getBegin(), INetURLObject::SubString::getLength(), getUTF32(), hasDosVolume(), INetURLObject::SubString::isPresent(), m_aAbsURIRef, m_aHost, m_aPath, m_eScheme, NONE, p, Unix, Vos, WasEncoded, and WithCharset.

◆ GetFull()

OUString INetURLObject::GetFull ( ) const

Definition at line 4786 of file urlobj.cxx.

References PathToFileName(), and removeFinalSlash().

◆ GetHost()

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

Definition at line 437 of file urlobj.hxx.

Referenced by operator==().

◆ GetHostPort()

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

◆ GetLastName()

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 4750 of file urlobj.cxx.

References getName(), and LAST_SEGMENT.

◆ GetMainURL()

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

◆ GetMark()

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

Definition at line 746 of file urlobj.hxx.

◆ getName()

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 4055 of file urlobj.cxx.

References decode(), INetURLObject::SubString::getBegin(), INetURLObject::SubString::getLength(), getSegment(), INetURLObject::SubString::isPresent(), m_aAbsURIRef, nIndex, and p.

Referenced by GetLastName().

◆ GetNewAbsURL()

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

Definition at line 1200 of file urlobj.hxx.

References convertRelToAbs(), Detect, and WasEncoded.

◆ GetParam()

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

Definition at line 734 of file urlobj.hxx.

Referenced by operator==().

◆ GetPartBeforeLastName()

OUString INetURLObject::GetPartBeforeLastName ( ) const

◆ GetPass()

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

Definition at line 420 of file urlobj.hxx.

Referenced by operator==().

◆ GetPath()

OUString INetURLObject::GetPath ( ) const

Definition at line 4793 of file urlobj.cxx.

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

◆ GetPort()

sal_uInt32 INetURLObject::GetPort ( ) const

◆ getPrefix()

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

◆ GetProtocol()

INetProtocol INetURLObject::GetProtocol ( ) const
inline

Definition at line 380 of file urlobj.hxx.

Referenced by getData().

◆ GetRelURL()

OUString INetURLObject::GetRelURL ( std::u16string_view  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 1216 of file urlobj.hxx.

References convertAbsToRel(), and INetURLObject().

◆ GetScheme()

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 3947 of file urlobj.cxx.

References getSchemeInfo().

◆ getSchemeInfo() [1/2]

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

◆ getSchemeInfo() [2/2]

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

Definition at line 319 of file urlobj.cxx.

References DATA, EMPTY, JAVASCRIPT, map, PRIVATE, SLOT, u, and UNO.

◆ GetSchemeName()

const 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 3953 of file urlobj.cxx.

References getSchemeInfo(), and INetURLObject::SchemeInfo::m_sScheme.

◆ getSegment()

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

◆ getSegmentCount()

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

The number of segments in the hierarchical path.

@descr 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 4015 of file urlobj.cxx.

References checkHierarchical(), INetURLObject::SubString::getBegin(), INetURLObject::SubString::getLength(), m_aAbsURIRef, m_aPath, n, and p.

◆ GetURLNoMark()

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

Definition at line 3527 of file urlobj.cxx.

References clearFragment(), and GetMainURL().

◆ GetURLNoPass()

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

Definition at line 3519 of file urlobj.cxx.

References clearPassword(), and GetMainURL().

◆ GetURLPath()

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

Definition at line 456 of file urlobj.hxx.

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

◆ GetUser()

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

Definition at line 415 of file urlobj.hxx.

Referenced by operator==().

◆ getUTF32()

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

◆ hasDosVolume()

bool INetURLObject::hasDosVolume ( FSysStyle  eStyle) const
private

◆ HasError()

bool INetURLObject::HasError ( ) const
inline

Definition at line 260 of file urlobj.hxx.

References NotValid.

Referenced by clearFragment(), clearQuery(), ConcatData(), convertRelToAbs(), and setFragment().

◆ hasExtension()

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 4103 of file urlobj.cxx.

References INetURLObject::SubString::getBegin(), INetURLObject::SubString::getLength(), getSegment(), INetURLObject::SubString::isPresent(), LAST_SEGMENT, m_aAbsURIRef, and p.

◆ hasFinalSlash()

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 4268 of file urlobj.cxx.

References checkHierarchical(), INetURLObject::SubString::getBegin(), INetURLObject::SubString::getLength(), m_aAbsURIRef, and m_aPath.

◆ HasMark()

bool INetURLObject::HasMark ( ) const
inline

Definition at line 744 of file urlobj.hxx.

◆ HasParam()

bool INetURLObject::HasParam ( ) const
inline

Definition at line 732 of file urlobj.hxx.

Referenced by operator==().

◆ HasPort()

bool INetURLObject::HasPort ( ) const
inline

Definition at line 435 of file urlobj.hxx.

◆ HasURLPath()

bool INetURLObject::HasURLPath ( ) const
inline

Definition at line 454 of file urlobj.hxx.

◆ HasUserData()

bool INetURLObject::HasUserData ( ) const
inline

Definition at line 413 of file urlobj.hxx.

◆ insertName()

bool INetURLObject::insertName ( std::u16string_view  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 3282 of file urlobj.cxx.

References checkHierarchical(), DBG_ASSERT, encodeText(), INetURLObject::SubString::getBegin(), INetURLObject::SubString::getLength(), LAST_SEGMENT, m_aAbsURIRef, m_aPath, nIndex, NotCanonical, PART_PCHAR, and setPath().

Referenced by Append().

◆ isAnyKnownWebDAVScheme()

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 3937 of file urlobj.cxx.

References Http, Https, isSchemeEqualTo(), u, and VndSunStarWebdav.

◆ IsCaseSensitive()

static bool INetURLObject::IsCaseSensitive ( )
inlinestatic

Definition at line 914 of file urlobj.hxx.

◆ isSchemeEqualTo() [1/2]

bool INetURLObject::isSchemeEqualTo ( INetProtocol  scheme) const
inline

Definition at line 382 of file urlobj.hxx.

Referenced by isAnyKnownWebDAVScheme().

◆ isSchemeEqualTo() [2/2]

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

◆ operator!=()

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

Definition at line 284 of file urlobj.hxx.

◆ operator==()

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

◆ parseHost()

bool INetURLObject::parseHost ( sal_Unicode const *&  rBegin,
sal_Unicode const *  pEnd,
OUStringBuffer *  pCanonic 
)
staticprivate

Definition at line 2380 of file urlobj.cxx.

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

Referenced by parseHostOrNetBiosName().

◆ parseHostOrNetBiosName()

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

◆ parsePath()

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

◆ PathToFileName()

OUString INetURLObject::PathToFileName ( ) const

Definition at line 4771 of file urlobj.cxx.

References decode(), File, INetURLObject::SubString::getEnd(), m_aAbsURIRef, m_aPath, m_eScheme, and NONE.

Referenced by GetFull(), and GetPath().

◆ removeExtension()

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 4238 of file urlobj.cxx.

References INetURLObject::SubString::getBegin(), INetURLObject::SubString::getLength(), getSegment(), INetURLObject::SubString::isPresent(), m_aAbsURIRef, m_aPath, nIndex, NotCanonical, p, and setPath().

Referenced by CutExtension().

◆ removeFinalSlash()

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 4296 of file urlobj.cxx.

References checkHierarchical(), INetURLObject::SubString::getBegin(), INetURLObject::SubString::getLength(), m_aAbsURIRef, m_aPath, NotCanonical, and setPath().

Referenced by GetFull(), and GetPath().

◆ removeSegment()

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 4031 of file urlobj.cxx.

References INetURLObject::SubString::getBegin(), INetURLObject::SubString::getEnd(), INetURLObject::SubString::getLength(), getSegment(), INetURLObject::SubString::isEmpty(), INetURLObject::SubString::isPresent(), m_aAbsURIRef, m_aPath, nIndex, NotCanonical, and setPath().

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

◆ scanDomain()

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

Definition at line 4657 of file urlobj.cxx.

References p.

Referenced by setAbsURIRef().

◆ scanIPv6reference()

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

Definition at line 4719 of file urlobj.cxx.

References p.

Referenced by setAbsURIRef().

◆ setAbsURIRef()

bool INetURLObject::setAbsURIRef ( std::u16string_view  rTheAbsURIRef,
EncodeMechanism  eMechanism,
rtl_TextEncoding  eCharset,
bool  bSmart,
FSysStyle  eStyle 
)
private

◆ SetBase()

void INetURLObject::SetBase ( std::u16string_view  rTheBase)

Definition at line 4801 of file urlobj.cxx.

References All, LAST_SEGMENT, and setBase().

◆ setBase()

bool INetURLObject::setBase ( std::u16string_view  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 4147 of file urlobj.cxx.

References encodeText(), INetURLObject::SubString::getBegin(), INetURLObject::SubString::getLength(), getSegment(), INetURLObject::SubString::isPresent(), m_aAbsURIRef, m_aPath, nIndex, NotCanonical, p, PART_PCHAR, and setPath().

Referenced by SetBase().

◆ SetExtension()

void INetURLObject::SetExtension ( std::u16string_view  rTheExtension)

Definition at line 4811 of file urlobj.cxx.

References LAST_SEGMENT, and setExtension().

◆ setExtension()

bool INetURLObject::setExtension ( std::u16string_view  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 4206 of file urlobj.cxx.

References encodeText(), INetURLObject::SubString::getBegin(), INetURLObject::SubString::getLength(), getSegment(), INetURLObject::SubString::isPresent(), m_aAbsURIRef, m_aPath, nIndex, NotCanonical, p, PART_PCHAR, setPath(), and WasEncoded.

Referenced by SetExtension().

◆ setFinalSlash()

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 4279 of file urlobj.cxx.

References checkHierarchical(), INetURLObject::SubString::getBegin(), INetURLObject::SubString::getLength(), m_aAbsURIRef, m_aPath, NotCanonical, and setPath().

Referenced by GetPartBeforeLastName().

◆ setFragment()

bool INetURLObject::setFragment ( std::u16string_view  rTheMark,
EncodeMechanism  eMechanism,
rtl_TextEncoding  eCharset 
)
private

◆ SetHost()

bool INetURLObject::SetHost ( std::u16string_view  rTheHost)
inline

Definition at line 447 of file urlobj.hxx.

◆ setHost()

bool INetURLObject::setHost ( std::u16string_view  rTheHost,
rtl_TextEncoding  eCharset 
)
private

◆ setInvalid()

void INetURLObject::setInvalid ( )
private

◆ SetMark()

bool INetURLObject::SetMark ( std::u16string_view  rTheFragment,
EncodeMechanism  eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
)
inline

Definition at line 1282 of file urlobj.hxx.

References clearFragment(), and setFragment().

◆ setName()

bool INetURLObject::setName ( std::u16string_view  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 4076 of file urlobj.cxx.

References encodeText(), INetURLObject::SubString::getBegin(), INetURLObject::SubString::getLength(), getSegment(), INetURLObject::SubString::isPresent(), LAST_SEGMENT, m_aAbsURIRef, m_aPath, NotCanonical, p, PART_PCHAR, and setPath().

◆ SetParam()

bool INetURLObject::SetParam ( std::u16string_view  rTheQuery,
EncodeMechanism  eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
)
inline

Definition at line 1270 of file urlobj.hxx.

References clearQuery(), and setQuery().

◆ SetPass()

bool INetURLObject::SetPass ( std::u16string_view  rThePassword)
inline

Definition at line 1254 of file urlobj.hxx.

References clearPassword(), and setPassword().

◆ setPassword()

bool INetURLObject::setPassword ( std::u16string_view  rThePassword,
rtl_TextEncoding  eCharset 
)
private

◆ setPath()

bool INetURLObject::setPath ( std::u16string_view  rThePath,
EncodeMechanism  eMechanism,
rtl_TextEncoding  eCharset 
)
private

◆ SetPort()

bool INetURLObject::SetPort ( sal_uInt32  nThePort)

◆ setQuery()

bool INetURLObject::setQuery ( std::u16string_view  rTheQuery,
EncodeMechanism  eMechanism,
rtl_TextEncoding  eCharset 
)
private

◆ SetSmartProtocol()

void INetURLObject::SetSmartProtocol ( INetProtocol  eTheSmartScheme)
inline

Definition at line 311 of file urlobj.hxx.

◆ SetSmartURL()

bool INetURLObject::SetSmartURL ( std::u16string_view  rTheAbsURIRef,
EncodeMechanism  eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8,
FSysStyle  eStyle = FSysStyle::Detect 
)
inline

Definition at line 1175 of file urlobj.hxx.

References setAbsURIRef().

◆ SetURL()

bool INetURLObject::SetURL ( std::u16string_view  rTheAbsURIRef,
EncodeMechanism  eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
)
inline

Definition at line 1157 of file urlobj.hxx.

References setAbsURIRef().

◆ SetURLPath()

bool INetURLObject::SetURLPath ( std::u16string_view  rThePath,
EncodeMechanism  eMechanism = EncodeMechanism::WasEncoded,
rtl_TextEncoding  eCharset = RTL_TEXTENCODING_UTF8 
)
inline

Definition at line 461 of file urlobj.hxx.

◆ SetUser()

bool INetURLObject::SetUser ( std::u16string_view  rTheUser)
inline

Definition at line 425 of file urlobj.hxx.

◆ setUser()

bool INetURLObject::setUser ( std::u16string_view  rTheUser,
rtl_TextEncoding  eCharset 
)
private

◆ SetUserAndPass()

bool INetURLObject::SetUserAndPass ( std::u16string_view  rTheUser,
std::u16string_view  rThePassword 
)
inline

Definition at line 1261 of file urlobj.hxx.

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

◆ smartRel2Abs()

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 1185 of file urlobj.hxx.

References convertRelToAbs().

◆ translateToExternal()

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

Definition at line 1231 of file urlobj.hxx.

References convertIntToExt().

Referenced by getExternalURL().

◆ translateToInternal()

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

Definition at line 1243 of file urlobj.hxx.

References convertExtToInt().

Member Data Documentation

◆ m_aAbsURIRef

OUStringBuffer INetURLObject::m_aAbsURIRef
private

◆ m_aAuth

SubString INetURLObject::m_aAuth
private

◆ m_aFragment

SubString INetURLObject::m_aFragment
private

◆ m_aHost

SubString INetURLObject::m_aHost
private

◆ m_aPath

SubString INetURLObject::m_aPath
private

◆ m_aPort

SubString INetURLObject::m_aPort
private

◆ m_aQuery

SubString INetURLObject::m_aQuery
private

◆ m_aScheme

SubString INetURLObject::m_aScheme
private

◆ m_aUser

SubString INetURLObject::m_aUser
private

◆ m_eScheme

INetProtocol INetURLObject::m_eScheme
private

◆ m_eSmartScheme

INetProtocol INetURLObject::m_eSmartScheme
private

Definition at line 970 of file urlobj.hxx.

Referenced by setAbsURIRef().


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