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...
 
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...
 
ScRangeDatacreateNamedRangeObject (OUString &orName, const css::uno::Sequence< css::sheet::FormulaToken > &rTokens, sal_Int32 nIndex, sal_Int32 nNameFlags) const
 Creates and returns a defined name on-the-fly in the Calc document. More...
 
ScRangeDatacreateLocalNamedRangeObject (OUString &orName, const css::uno::Sequence< css::sheet::FormulaToken > &rTokens, sal_Int32 nIndex, sal_Int32 nNameFlags, sal_Int32 nTab) 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

- Static Public Member Functions inherited from oox::xls::WorkbookHelper
static WorkbookGlobalsRef constructGlobals (ExcelFilter &rFilter)
 

Detailed Description

Definition at line 191 of file externallinkbuffer.hxx.

Constructor & Destructor Documentation

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

Definition at line 260 of file externallinkbuffer.cxx.

References Unknown.

Member Function Documentation

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

Definition at line 540 of file externallinkbuffer.cxx.

References maExtNames.

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

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

Returns the class name of this external link.

Definition at line 237 of file externallinkbuffer.hxx.

References maClassName.

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

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

Returns the token index of the external document.

Definition at line 422 of file externallinkbuffer.cxx.

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

Referenced by getSheetRange().

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

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

Definition at line 417 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().

ExternalLinkInfo oox::xls::ExternalLink::getLinkInfo ( ) const
ExternalLinkType oox::xls::ExternalLink::getLinkType ( ) const
inline
ExternalNameRef oox::xls::ExternalLink::getNameByIndex ( sal_Int32  nIndex) const

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

Definition at line 475 of file externallinkbuffer.cxx.

References maExtNames.

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

Returns the relation identifier for the external link fragment.

Definition at line 235 of file externallinkbuffer.hxx.

References maRelId.

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

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 434 of file externallinkbuffer.cxx.

References Exception, getSheetCacheIndex(), and mxDocLink.

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

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

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

Definition at line 428 of file externallinkbuffer.cxx.

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

Referenced by getSheetCache(), and getSheetRange().

void oox::xls::ExternalLink::getSheetRange ( LinkSheetRange orSheetRange,
sal_Int32  nTabId1,
sal_Int32  nTabId2 
) const
const OUString& oox::xls::ExternalLink::getTargetUrl ( ) const
inline

Returns the target URL of this external link.

Definition at line 239 of file externallinkbuffer.hxx.

References maTargetUrl.

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

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

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

Definition at line 294 of file externallinkbuffer.cxx.

References createExternalName().

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

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

Imports the ddeLink element describing a DDE link.

Definition at line 287 of file externallinkbuffer.cxx.

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

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

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

Imports the definedName element describing an external name.

Definition at line 282 of file externallinkbuffer.cxx.

References createExternalName().

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

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

Imports the EXTERNALADDIN record from the passed stream.

Definition at line 330 of file externallinkbuffer.cxx.

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

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().

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.

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

Imports the EXTERNALNAME record describing an external name.

Definition at line 372 of file externallinkbuffer.cxx.

References createExternalName().

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

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

Imports the EXTERNALREF record from the passed stream.

Definition at line 315 of file externallinkbuffer.cxx.

References maRelId.

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

Imports the externalReference element containing the relation identifier.

Definition at line 267 of file externallinkbuffer.cxx.

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

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

Imports the EXTERNALSAME record from the passed stream.

Definition at line 325 of file externallinkbuffer.cxx.

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

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

Imports the EXTERNALSELF record from the passed stream.

Definition at line 320 of file externallinkbuffer.cxx.

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

void oox::xls::ExternalLink::importExtSheetNames ( SequenceInputStream rStrm)
ExternalNameRef oox::xls::ExternalLink::importOleItem ( const AttributeList rAttribs)

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

Definition at line 308 of file externallinkbuffer.cxx.

References createExternalName().

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

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

Imports the oleLink element describing an OLE link.

Definition at line 301 of file externallinkbuffer.cxx.

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

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

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

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

Definition at line 277 of file externallinkbuffer.cxx.

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

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

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 529 of file externallinkbuffer.cxx.

References maSheetCaches, and mxDocLink.

Referenced by importExtSheetNames(), and importSheetName().

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

Definition at line 523 of file externallinkbuffer.cxx.

References Relation, and setExternalTargetUrl().

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

Definition at line 515 of file externallinkbuffer.cxx.

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

Referenced by importDdeLink(), and importOleLink().

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

Sets the link type to 'self reference'.

Definition at line 229 of file externallinkbuffer.hxx.

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

Member Data Documentation

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

Relation identifier for the external link fragment.

Definition at line 274 of file externallinkbuffer.hxx.

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

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

External sheet cache indexes.

Definition at line 279 of file externallinkbuffer.hxx.

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

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

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

Definition at line 273 of file externallinkbuffer.hxx.

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

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

Interface for an external document.

Definition at line 278 of file externallinkbuffer.hxx.

Referenced by getSheetCacheIndex(), and insertExternalSheet().

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

DDE service, OLE class name.

Definition at line 275 of file externallinkbuffer.hxx.

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

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

Type of this link object.

Definition at line 272 of file externallinkbuffer.hxx.

Referenced by getFuncLibraryType(), and setExternalTargetUrl().

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

Target link, DDE topic, OLE target.

Definition at line 277 of file externallinkbuffer.hxx.

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


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