LibreOffice Module sc (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
oox::xls::ExternalLink Class Reference

#include <externallinkbuffer.hxx>

Inheritance diagram for oox::xls::ExternalLink:
[legend]
Collaboration diagram for oox::xls::ExternalLink:
[legend]

Public Member Functions

 ExternalLink (const WorkbookHelper &rHelper)
 
void importExternalReference (const AttributeList &rAttribs)
 Imports the externalReference element containing the relation identifier. More...
 
void importExternalBook (const ::oox::core::Relations &rRelations, const AttributeList &rAttribs)
 Imports the externalBook element describing an externally linked document. More...
 
void importSheetName (const AttributeList &rAttribs)
 Imports the sheetName element containing the sheet name in an externally linked document. More...
 
void importDefinedName (const AttributeList &rAttribs)
 Imports the definedName element describing an external name. More...
 
void importDdeLink (const AttributeList &rAttribs)
 Imports the ddeLink element describing a DDE link. More...
 
ExternalNameRef importDdeItem (const AttributeList &rAttribs)
 Imports the ddeItem element describing an item of a DDE link. More...
 
void importOleLink (const ::oox::core::Relations &rRelations, const AttributeList &rAttribs)
 Imports the oleLink element describing an OLE link. More...
 
ExternalNameRef importOleItem (const AttributeList &rAttribs)
 Imports the oleItem element describing an object of an OLE link. More...
 
void importExternalBook (const ::oox::core::Relations &rRelations, SequenceInputStream &rStrm)
 Imports the EXTERNALBOOK record describing an externally linked document, DDE link, or OLE link. More...
 
void importExtSheetNames (SequenceInputStream &rStrm)
 Imports the EXTSHEETNAMES record containing the sheet names in an externally linked document. More...
 
ExternalNameRef importExternalName (SequenceInputStream &rStrm)
 Imports the EXTERNALNAME record describing an external name. More...
 
void importExternalRef (SequenceInputStream &rStrm)
 Imports the EXTERNALREF record from the passed stream. More...
 
void importExternalSelf (SequenceInputStream &rStrm)
 Imports the EXTERNALSELF record from the passed stream. More...
 
void importExternalSame (SequenceInputStream &rStrm)
 Imports the EXTERNALSAME record from the passed stream. More...
 
void importExternalAddin (SequenceInputStream &rStrm)
 Imports the EXTERNALADDIN record from the passed stream. More...
 
void setSelfLinkType ()
 Sets the link type to 'self reference'. More...
 
ExternalLinkType getLinkType () const
 Returns the type of this external link. More...
 
const OUString & getRelId () const
 Returns the relation identifier for the external link fragment. More...
 
const OUString & getClassName () const
 Returns the class name of this external link. More...
 
const OUString & getTargetUrl () const
 Returns the target URL of this external link. More...
 
css::sheet::ExternalLinkInfo getLinkInfo () const
 Returns the link info needed by the XML formula parser. More...
 
FunctionLibraryType getFuncLibraryType () const
 Returns the type of the external library if this is a library link. More...
 
sal_Int32 getDocumentLinkIndex () const
 Returns the token index of the external document. More...
 
sal_Int32 getSheetCacheIndex (sal_Int32 nTabId) const
 Returns the external sheet cache index or for the passed sheet. More...
 
css::uno::Reference< css::sheet::XExternalSheetCache > getSheetCache (sal_Int32 nTabId) const
 Returns the sheet cache of the external sheet with the passed index. More...
 
void getSheetRange (LinkSheetRange &orSheetRange, sal_Int32 nTabId1, sal_Int32 nTabId2) const
 Returns the internal sheet range or range of external sheet caches for the passed sheet range (BIFF only). More...
 
ExternalNameRef getNameByIndex (sal_Int32 nIndex) const
 Returns the external name with the passed zero-based index. More...
 
- Public Member Functions inherited from oox::xls::WorkbookHelper
 WorkbookHelper (WorkbookGlobals &rBookGlob)
 
virtual ~WorkbookHelper ()
 
 WorkbookHelper (WorkbookHelper const &)=default
 
 WorkbookHelper (WorkbookHelper &&)=default
 
WorkbookHelperoperator= (WorkbookHelper const &)=delete
 
WorkbookHelperoperator= (WorkbookHelper &&)=delete
 
::oox::core::FilterBasegetBaseFilter () const
 Returns the base filter object (base class of all filters). More...
 
SegmentProgressBargetProgressBar () const
 Returns the filter progress bar. More...
 
sal_Int16 getCurrentSheetIndex () const
 Returns the index of the current Calc sheet, if filter currently processes a sheet. More...
 
bool isGeneratorKnownGood () const
 Returns true when reading a file generated by a known good generator. More...
 
bool hasCalculatedFormulaCells () const
 Returns true if any formula cell is calculated. More...
 
void setCalculatedFormulaCells ()
 Set if any formula cell is calculated. More...
 
void setVbaProjectStorage (const StorageRef &rxVbaPrjStrg)
 Sets the VBA project storage used to import VBA source code and forms. More...
 
void setCurrentSheetIndex (SCTAB nSheet)
 Sets the index of the current Calc sheet, if filter currently processes a sheet. More...
 
void finalizeWorkbookImport ()
 Final conversion after importing the workbook. More...
 
void useInternalChartDataTable (bool bInternal)
 
ScDocumentgetScDocument ()
 
const ScDocumentgetScDocument () const
 
ScDocumentImportgetDocImport ()
 
const ScDocumentImportgetDocImport () const
 
ScEditEngineDefaultergetEditEngine () const
 
const css::uno::Reference< css::sheet::XSpreadsheetDocument > & getDocument () const
 Returns a reference to the source/target spreadsheet document model. More...
 
css::uno::Reference< css::sheet::XSpreadsheet > getSheetFromDoc (sal_Int32 nSheet) const
 Returns a reference to the specified spreadsheet in the document model. More...
 
css::uno::Reference< css::sheet::XSpreadsheet > getSheetFromDoc (const OUString &rSheet) const
 Returns a reference to the specified spreadsheet in the document model. More...
 
css::uno::Reference< css::table::XCellRange > getCellRangeFromDoc (const ScRange &rRange) const
 Returns the XCellRange interface for the passed cell range address. More...
 
css::uno::Reference< css::container::XNameContainer > getCellStyleFamily () const
 Returns the cell styles container from the Calc document. More...
 
css::uno::Reference< css::style::XStyle > getStyleObject (const OUString &rStyleName, bool bPageStyle) const
 Returns the specified cell or page style from the Calc document. More...
 
RangeDataRet createNamedRangeObject (OUString &orName, sal_Int32 nIndex, sal_Int32 nNameFlags, bool bHidden) const
 Creates and returns a defined name on-the-fly in the Calc document. More...
 
RangeDataRet createLocalNamedRangeObject (OUString &orName, sal_Int32 nIndex, sal_Int32 nNameFlags, sal_Int32 nTab, bool bHidden) const
 Creates and returns a defined name on-the-fly in the sheet. More...
 
css::uno::Reference< css::sheet::XDatabaseRange > createDatabaseRangeObject (OUString &orName, const ScRange &rRangeAddr) const
 Creates and returns a database range on-the-fly in the Calc document. More...
 
css::uno::Reference< css::sheet::XDatabaseRange > createUnnamedDatabaseRangeObject (const ScRange &rRangeAddr) const
 Creates and returns an unnamed database range on-the-fly in the Calc document. More...
 
ScDBDatafindDatabaseRangeByIndex (sal_uInt16 nIndex) const
 Finds the (already existing) database range of the given formula token index. More...
 
css::uno::Reference< css::style::XStyle > createStyleObject (OUString &orStyleName, bool bPageStyle) const
 Creates and returns a com.sun.star.style.Style object for cells or pages. More...
 
FormulaBuffergetFormulaBuffer () const
 
WorkbookSettingsgetWorkbookSettings () const
 Returns the global workbook settings object. More...
 
ViewSettingsgetViewSettings () const
 Returns the workbook and sheet view settings object. More...
 
WorksheetBuffergetWorksheets () const
 Returns the worksheet buffer containing sheet names and properties. More...
 
ThemeBuffergetTheme () const
 Returns the office theme object read from the theme substorage. More...
 
StylesBuffergetStyles () const
 Returns all cell formatting objects read from the styles substream. More...
 
SharedStringsBuffergetSharedStrings () const
 Returns the shared strings read from the shared strings substream. More...
 
ExternalLinkBuffergetExternalLinks () const
 Returns the external links read from the external links substream. More...
 
DefinedNamesBuffergetDefinedNames () const
 Returns the defined names read from the workbook globals. More...
 
TableBuffergetTables () const
 Returns the tables collection (equivalent to Calc's database ranges). More...
 
ScenarioBuffergetScenarios () const
 Returns the scenarios collection. More...
 
ConnectionsBuffergetConnections () const
 Returns the collection of external data connections. More...
 
PivotCacheBuffergetPivotCaches () const
 Returns the collection of pivot caches. More...
 
PivotTableBuffergetPivotTables () const
 Returns the collection of pivot tables. More...
 
FormulaParsergetFormulaParser () const
 Returns a shared import formula parser (import filter only!). More...
 
FormulaParsercreateFormulaParser () const
 Returns an unshared import formula parser (import filter only!). More...
 
UnitConvertergetUnitConverter () const
 Returns the measurement unit converter. More...
 
AddressConvertergetAddressConverter () const
 Returns the converter for string to cell address/range conversion. More...
 
oox::drawingml::chart::ChartConvertergetChartConverter () const
 Returns the chart object converter. More...
 
PageSettingsConvertergetPageSettingsConverter () const
 Returns the page and print settings converter. More...
 
::oox::core::XmlFilterBasegetOoxFilter () const
 Returns the base OOXML/BIFF12 filter object. More...
 
bool importOoxFragment (const rtl::Reference< oox::core::FragmentHandler > &rxHandler)
 Imports a fragment using the passed fragment handler, which contains the full path to the fragment stream. More...
 
bool importOoxFragment (const rtl::Reference< oox::core::FragmentHandler > &rxHandler, oox::core::FastParser &rParser)
 
rtl_TextEncoding getTextEncoding () const
 Returns the text encoding used to import/export byte strings. More...
 

Private Member Functions

void setExternalTargetUrl (const OUString &rTargetUrl, const OUString &rTargetType)
 
void setDdeOleTargetUrl (const OUString &rClassName, const OUString &rTargetUrl, ExternalLinkType eLinkType)
 
void parseExternalReference (const ::oox::core::Relations &rRelations, const OUString &rRelId)
 
void insertExternalSheet (const OUString &rSheetName)
 Creates an external document link and the sheet cache for the passed sheet name. More...
 
ExternalNameRef createExternalName ()
 

Private Attributes

ExternalLinkType meLinkType
 
FunctionLibraryType meFuncLibType
 Type of this link object. More...
 
OUString maRelId
 Type of the function library, if link type is ExternalLinkType::Library. More...
 
OUString maClassName
 Relation identifier for the external link fragment. More...
 
OUString maTargetUrl
 DDE service, OLE class name. More...
 
css::uno::Reference< css::sheet::XExternalDocLink > mxDocLink
 Target link, DDE topic, OLE target. More...
 
std::vector< sal_Int32 > maSheetCaches
 Interface for an external document. More...
 
RefVector< ExternalNamemaExtNames
 External sheet cache indexes. More...
 

Additional Inherited Members

- Public Types inherited from oox::xls::WorkbookHelper
typedef std::pair< ScRangeData *, bool > RangeDataRet
 
- Static Public Member Functions inherited from oox::xls::WorkbookHelper
static WorkbookGlobalsRef constructGlobals (ExcelFilter &rFilter)
 

Detailed Description

Definition at line 190 of file externallinkbuffer.hxx.

Constructor & Destructor Documentation

◆ ExternalLink()

oox::xls::ExternalLink::ExternalLink ( const WorkbookHelper rHelper)
explicit

Definition at line 283 of file externallinkbuffer.cxx.

References Unknown.

Member Function Documentation

◆ createExternalName()

ExternalNameRef oox::xls::ExternalLink::createExternalName ( )
private

Definition at line 563 of file externallinkbuffer.cxx.

References maExtNames.

Referenced by importDdeItem(), importDefinedName(), importExternalName(), and importOleItem().

◆ getClassName()

const OUString & oox::xls::ExternalLink::getClassName ( ) const
inline

Returns the class name of this external link.

Definition at line 236 of file externallinkbuffer.hxx.

References maClassName.

Referenced by oox::xls::ExternalName::getDdeLinkData().

◆ getDocumentLinkIndex()

sal_Int32 oox::xls::ExternalLink::getDocumentLinkIndex ( ) const

Returns the token index of the external document.

Definition at line 445 of file externallinkbuffer.cxx.

References oox::xls::External, meLinkType, and mxDocLink.

Referenced by getSheetRange().

◆ getFuncLibraryType()

FunctionLibraryType oox::xls::ExternalLink::getFuncLibraryType ( ) const

Returns the type of the external library if this is a library link.

Definition at line 440 of file externallinkbuffer.cxx.

References oox::xls::FUNCLIB_UNKNOWN, oox::xls::Library, meFuncLibType, and meLinkType.

Referenced by oox::xls::FormulaParserImpl::pushExternalNameOperand(), and oox::xls::FormulaParserImpl::resolveBadFuncName().

◆ getLinkInfo()

ExternalLinkInfo oox::xls::ExternalLink::getLinkInfo ( ) const

Returns the link info needed by the XML formula parser.

Definition at line 402 of file externallinkbuffer.cxx.

References aItemInfos, comphelper::containerToSequence(), oox::xls::DDE, oox::xls::External, oox::xls::Library, maClassName, maExtNames, maTargetUrl, meLinkType, oox::xls::Same, and oox::xls::Self.

◆ getLinkType()

ExternalLinkType oox::xls::ExternalLink::getLinkType ( ) const
inline

◆ getNameByIndex()

ExternalNameRef oox::xls::ExternalLink::getNameByIndex ( sal_Int32  nIndex) const

Returns the external name with the passed zero-based index.

Definition at line 498 of file externallinkbuffer.cxx.

References maExtNames, and nIndex.

◆ getRelId()

const OUString & oox::xls::ExternalLink::getRelId ( ) const
inline

Returns the relation identifier for the external link fragment.

Definition at line 234 of file externallinkbuffer.hxx.

References maRelId.

Referenced by oox::xls::WorkbookFragment::importExternalLinkFragment().

◆ getSheetCache()

Reference< XExternalSheetCache > oox::xls::ExternalLink::getSheetCache ( sal_Int32  nTabId) const

Returns the sheet cache of the external sheet with the passed index.

Definition at line 457 of file externallinkbuffer.cxx.

References Exception, getSheetCacheIndex(), and mxDocLink.

Referenced by oox::xls::ExternalLinkFragment::createSheetDataContext().

◆ getSheetCacheIndex()

sal_Int32 oox::xls::ExternalLink::getSheetCacheIndex ( sal_Int32  nTabId) const

Returns the external sheet cache index or for the passed sheet.

Definition at line 451 of file externallinkbuffer.cxx.

References oox::xls::External, oox::ContainerHelper::getVectorElement(), maSheetCaches, and meLinkType.

Referenced by getSheetCache(), and getSheetRange().

◆ getSheetRange()

void oox::xls::ExternalLink::getSheetRange ( LinkSheetRange orSheetRange,
sal_Int32  nTabId1,
sal_Int32  nTabId2 
) const

◆ getTargetUrl()

const OUString & oox::xls::ExternalLink::getTargetUrl ( ) const
inline

Returns the target URL of this external link.

Definition at line 238 of file externallinkbuffer.hxx.

References maTargetUrl.

Referenced by oox::xls::ExternalName::getDdeLinkData(), oox::xls::ExternalName::importDefinedName(), and oox::xls::FormulaParserImpl::resolveOleTarget().

◆ importDdeItem()

ExternalNameRef oox::xls::ExternalLink::importDdeItem ( const AttributeList rAttribs)

Imports the ddeItem element describing an item of a DDE link.

Definition at line 317 of file externallinkbuffer.cxx.

References createExternalName().

Referenced by oox::xls::ExternalLinkFragment::onCreateContext().

◆ importDdeLink()

void oox::xls::ExternalLink::importDdeLink ( const AttributeList rAttribs)

Imports the ddeLink element describing a DDE link.

Definition at line 310 of file externallinkbuffer.cxx.

References oox::xls::DDE, oox::AttributeList::getXString(), and setDdeOleTargetUrl().

Referenced by oox::xls::ExternalLinkFragment::onCreateContext().

◆ importDefinedName()

void oox::xls::ExternalLink::importDefinedName ( const AttributeList rAttribs)

Imports the definedName element describing an external name.

Definition at line 305 of file externallinkbuffer.cxx.

References createExternalName().

Referenced by oox::xls::ExternalLinkFragment::onCreateContext().

◆ importExternalAddin()

void oox::xls::ExternalLink::importExternalAddin ( SequenceInputStream rStrm)

Imports the EXTERNALADDIN record from the passed stream.

Definition at line 353 of file externallinkbuffer.cxx.

References meLinkType, and oox::xls::Unknown.

◆ importExternalBook() [1/2]

void oox::xls::ExternalLink::importExternalBook ( const ::oox::core::Relations rRelations,
const AttributeList rAttribs 
)

Imports the externalBook element describing an externally linked document.

Referenced by oox::xls::ExternalLinkFragment::onCreateContext(), and oox::xls::ExternalLinkFragment::onCreateRecordContext().

◆ importExternalBook() [2/2]

void oox::xls::ExternalLink::importExternalBook ( const ::oox::core::Relations rRelations,
SequenceInputStream rStrm 
)

Imports the EXTERNALBOOK record describing an externally linked document, DDE link, or OLE link.

◆ importExternalName()

ExternalNameRef oox::xls::ExternalLink::importExternalName ( SequenceInputStream rStrm)

Imports the EXTERNALNAME record describing an external name.

Definition at line 395 of file externallinkbuffer.cxx.

References createExternalName(), and rStrm.

Referenced by oox::xls::ExternalLinkFragment::onCreateRecordContext().

◆ importExternalRef()

void oox::xls::ExternalLink::importExternalRef ( SequenceInputStream rStrm)

Imports the EXTERNALREF record from the passed stream.

Definition at line 338 of file externallinkbuffer.cxx.

References maRelId, and rStrm.

◆ importExternalReference()

void oox::xls::ExternalLink::importExternalReference ( const AttributeList rAttribs)

Imports the externalReference element containing the relation identifier.

Definition at line 290 of file externallinkbuffer.cxx.

References oox::AttributeList::getString(), and maRelId.

◆ importExternalSame()

void oox::xls::ExternalLink::importExternalSame ( SequenceInputStream rStrm)

Imports the EXTERNALSAME record from the passed stream.

Definition at line 348 of file externallinkbuffer.cxx.

References meLinkType, and oox::xls::Same.

◆ importExternalSelf()

void oox::xls::ExternalLink::importExternalSelf ( SequenceInputStream rStrm)

Imports the EXTERNALSELF record from the passed stream.

Definition at line 343 of file externallinkbuffer.cxx.

References meLinkType, and oox::xls::Self.

◆ importExtSheetNames()

void oox::xls::ExternalLink::importExtSheetNames ( SequenceInputStream rStrm)

Imports the EXTSHEETNAMES record containing the sheet names in an externally linked document.

Definition at line 384 of file externallinkbuffer.cxx.

References oox::xls::External, insertExternalSheet(), oox::xls::Library, meLinkType, nCount, oox::xls::BiffHelper::readString(), rStrm, and SAL_WARN_IF.

Referenced by oox::xls::ExternalLinkFragment::onCreateRecordContext().

◆ importOleItem()

ExternalNameRef oox::xls::ExternalLink::importOleItem ( const AttributeList rAttribs)

Imports the oleItem element describing an object of an OLE link.

Definition at line 331 of file externallinkbuffer.cxx.

References createExternalName().

Referenced by oox::xls::ExternalLinkFragment::onCreateContext().

◆ importOleLink()

void oox::xls::ExternalLink::importOleLink ( const ::oox::core::Relations rRelations,
const AttributeList rAttribs 
)

Imports the oleLink element describing an OLE link.

Definition at line 324 of file externallinkbuffer.cxx.

References oox::AttributeList::getString(), oox::AttributeList::getXString(), oox::xls::OLE, and setDdeOleTargetUrl().

Referenced by oox::xls::ExternalLinkFragment::onCreateContext().

◆ importSheetName()

void oox::xls::ExternalLink::importSheetName ( const AttributeList rAttribs)

Imports the sheetName element containing the sheet name in an externally linked document.

Definition at line 300 of file externallinkbuffer.cxx.

References oox::AttributeList::getXString(), and insertExternalSheet().

Referenced by oox::xls::ExternalLinkFragment::onCreateContext().

◆ insertExternalSheet()

void oox::xls::ExternalLink::insertExternalSheet ( const OUString &  rSheetName)
private

Creates an external document link and the sheet cache for the passed sheet name.

Definition at line 552 of file externallinkbuffer.cxx.

References maSheetCaches, and mxDocLink.

Referenced by importExtSheetNames(), and importSheetName().

◆ parseExternalReference()

void oox::xls::ExternalLink::parseExternalReference ( const ::oox::core::Relations rRelations,
const OUString &  rRelId 
)
private

Definition at line 546 of file externallinkbuffer.cxx.

References Relation, and setExternalTargetUrl().

◆ setDdeOleTargetUrl()

void oox::xls::ExternalLink::setDdeOleTargetUrl ( const OUString &  rClassName,
const OUString &  rTargetUrl,
ExternalLinkType  eLinkType 
)
private

Definition at line 538 of file externallinkbuffer.cxx.

References maClassName, maTargetUrl, meLinkType, and oox::xls::Unknown.

Referenced by importDdeLink(), and importOleLink().

◆ setExternalTargetUrl()

void oox::xls::ExternalLink::setExternalTargetUrl ( const OUString &  rTargetUrl,
const OUString &  rTargetType 
)
private

◆ setSelfLinkType()

void oox::xls::ExternalLink::setSelfLinkType ( )
inline

Sets the link type to 'self reference'.

Definition at line 228 of file externallinkbuffer.hxx.

References meLinkType, and oox::xls::Self.

Member Data Documentation

◆ maClassName

OUString oox::xls::ExternalLink::maClassName
private

Relation identifier for the external link fragment.

Definition at line 273 of file externallinkbuffer.hxx.

Referenced by getClassName(), getLinkInfo(), and setDdeOleTargetUrl().

◆ maExtNames

RefVector< ExternalName > oox::xls::ExternalLink::maExtNames
private

External sheet cache indexes.

Definition at line 278 of file externallinkbuffer.hxx.

Referenced by createExternalName(), getLinkInfo(), and getNameByIndex().

◆ maRelId

OUString oox::xls::ExternalLink::maRelId
private

Type of the function library, if link type is ExternalLinkType::Library.

Definition at line 272 of file externallinkbuffer.hxx.

Referenced by getRelId(), importExternalRef(), and importExternalReference().

◆ maSheetCaches

std::vector< sal_Int32 > oox::xls::ExternalLink::maSheetCaches
private

Interface for an external document.

Definition at line 277 of file externallinkbuffer.hxx.

Referenced by getSheetCacheIndex(), and insertExternalSheet().

◆ maTargetUrl

OUString oox::xls::ExternalLink::maTargetUrl
private

DDE service, OLE class name.

Definition at line 274 of file externallinkbuffer.hxx.

Referenced by getLinkInfo(), getTargetUrl(), setDdeOleTargetUrl(), and setExternalTargetUrl().

◆ meFuncLibType

FunctionLibraryType oox::xls::ExternalLink::meFuncLibType
private

Type of this link object.

Definition at line 271 of file externallinkbuffer.hxx.

Referenced by getFuncLibraryType(), and setExternalTargetUrl().

◆ meLinkType

ExternalLinkType oox::xls::ExternalLink::meLinkType
private

◆ mxDocLink

css::uno::Reference< css::sheet::XExternalDocLink > oox::xls::ExternalLink::mxDocLink
private

Target link, DDE topic, OLE target.

Definition at line 276 of file externallinkbuffer.hxx.

Referenced by getDocumentLinkIndex(), getSheetCache(), insertExternalSheet(), and setExternalTargetUrl().


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