LibreOffice Module sc (master) 1
Public Member Functions | Static Public Member Functions | List of all members
XclImpUrlHelper Class Reference

This class contains static methods to decode a URL stored in an Excel file. More...

#include <xihelper.hxx>

Public Member Functions

 XclImpUrlHelper (const XclImpUrlHelper &)=delete
 delete copy constructor More...
 
const XclImpUrlHelperoperator= (const XclImpUrlHelper &)=delete
 delete copy-assignment operator More...
 
 XclImpUrlHelper ()=delete
 We don't want anybody to instantiate this class, since it is just a collection of static methods. More...
 

Static Public Member Functions

static void DecodeUrl (OUString &rUrl, OUString &rTabName, bool &rbSameWb, const XclImpRoot &rRoot, const OUString &rEncodedUrl)
 Decodes an encoded external document URL with optional sheet name. More...
 
static void DecodeUrl (OUString &rUrl, bool &rbSameWb, const XclImpRoot &rRoot, const OUString &rEncodedUrl)
 Decodes an encoded external document URL without sheet name. More...
 
static bool DecodeLink (OUString &rApplic, OUString &rTopic, std::u16string_view aEncUrl)
 Decodes the passed URL to OLE or DDE link components. More...
 

Detailed Description

This class contains static methods to decode a URL stored in an Excel file.

@descr Excel URLs can contain a sheet name, for instance: path[test.xls]Sheet1 This sheet name will be extracted automatically.

Definition at line 251 of file xihelper.hxx.

Constructor & Destructor Documentation

◆ XclImpUrlHelper() [1/2]

XclImpUrlHelper::XclImpUrlHelper ( const XclImpUrlHelper )
delete

delete copy constructor

◆ XclImpUrlHelper() [2/2]

XclImpUrlHelper::XclImpUrlHelper ( )
delete

We don't want anybody to instantiate this class, since it is just a collection of static methods.

Member Function Documentation

◆ DecodeLink()

bool XclImpUrlHelper::DecodeLink ( OUString &  rApplic,
OUString &  rTopic,
std::u16string_view  aEncUrl 
)
static

Decodes the passed URL to OLE or DDE link components.

@descr For DDE links: Decodes to application name and topic. For OLE object links: Decodes to class name and document URL.

Returns
true = decoding was successful, returned strings are valid (not empty).

Definition at line 763 of file xihelper.cxx.

References EXC_DDE_DELIM, and nPos.

Referenced by XclImpSupbook::GetLinkData().

◆ DecodeUrl() [1/2]

void XclImpUrlHelper::DecodeUrl ( OUString &  rUrl,
bool &  rbSameWb,
const XclImpRoot rRoot,
const OUString &  rEncodedUrl 
)
static

Decodes an encoded external document URL without sheet name.

Parameters
rUrlReturns the decoded file name incl. path.
rbSameWbReturns true, if the URL is a reference to the own workbook.
rEncodedUrlAn encoded URL from Excel.

Definition at line 753 of file xihelper.cxx.

References DecodeUrl().

◆ DecodeUrl() [2/2]

void XclImpUrlHelper::DecodeUrl ( OUString &  rUrl,
OUString &  rTabName,
bool &  rbSameWb,
const XclImpRoot rRoot,
const OUString &  rEncodedUrl 
)
static

Decodes an encoded external document URL with optional sheet name.

Parameters
rUrlReturns the decoded file name incl. path.
rTabNameReturns the decoded sheet name.
rbSameWbReturns true, if the URL is a reference to the own workbook.
rEncodedUrlAn encoded URL from Excel.

Initial state, read string mode character.

Read URL path.

Read file name.

Read sheet name.

Raw mode. No control characters will occur.

Definition at line 609 of file xihelper.cxx.

References EXC_DDE_DELIM, EXC_URL_DOSDRIVE, EXC_URL_DRIVEROOT, EXC_URL_PARENTDIR, EXC_URL_RAW, EXC_URL_SUBDIR, EXC_URLSTART_ENCODED, EXC_URLSTART_SELF, EXC_URLSTART_SELFENCODED, XclRoot::GetBasePath(), INetURLObject::getFSysPath(), and pChar.

Referenced by DecodeUrl(), ImportExcel::Externsheet(), XclImpChangeTrack::Read3DTabRefInfo(), XclImpPivotCache::ReadDconref(), and XclImpSupbook::XclImpSupbook().

◆ operator=()

const XclImpUrlHelper & XclImpUrlHelper::operator= ( const XclImpUrlHelper )
delete

delete copy-assignment operator


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