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, const OUString &rEncUrl)
 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.

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

Definition at line 252 of file xihelper.hxx.

Constructor & Destructor Documentation

XclImpUrlHelper::XclImpUrlHelper ( const XclImpUrlHelper )
delete

delete copy constructor

XclImpUrlHelper::XclImpUrlHelper ( )
delete

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

Member Function Documentation

bool XclImpUrlHelper::DecodeLink ( OUString &  rApplic,
OUString &  rTopic,
const OUString &  rEncUrl 
)
static

Decodes the passed URL to OLE or DDE link components.

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 757 of file xihelper.cxx.

References EXC_DDE_DELIM, and nPos.

Referenced by XclImpSupbook::GetLinkData().

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 603 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(), and pChar.

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

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 747 of file xihelper.cxx.

References DecodeUrl().

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

delete copy-assignment operator


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