20 #ifndef INCLUDED_SC_SOURCE_FILTER_INC_EXTERNALLINKBUFFER_HXX
21 #define INCLUDED_SC_SOURCE_FILTER_INC_EXTERNALLINKBUFFER_HXX
25 #include <com/sun/star/sheet/ExternalLinkInfo.hpp>
31 namespace sheet {
struct DDEItemInfo; }
32 namespace sheet {
class XDDELink; }
33 namespace sheet {
class XExternalDocLink; }
34 namespace sheet {
class XExternalSheetCache; }
62 template<
typename Type >
92 css::sheet::DDEItemInfo& orItemInfo )
const;
96 OUString& orDdeServer,
98 OUString& orDdeItem );
111 css::uno::Reference< css::sheet::XDDELink >
129 void setRange( sal_Int32 nFirst, sal_Int32 nLast );
131 void setExternalRange( sal_Int32 nDocLink, sal_Int32 nFirst, sal_Int32 nLast );
173 template<
typename charT,
typename traits >
187 default:
return stream << static_cast<int>(type);
251 css::uno::Reference< css::sheet::XExternalSheetCache >
276 css::uno::Reference< css::sheet::XExternalDocLink >
322 css::uno::Sequence< css::sheet::ExternalLinkInfo >
326 ExternalLinkRef
getExternalLink( sal_Int32 nRefId,
bool bUseRefSheets =
true )
const;
Helper class to provide access to global workbook data.
void importDdeItem(const AttributeList &rAttribs)
Imports the ddeItem element describing an item of a DDE link.
css::uno::Reference< css::sheet::XDDELink > mxDdeLink
Current position in result matrix.
void setSelfLinkType()
Sets the link type to 'self reference'.
ExternalLink(const WorkbookHelper &rHelper)
void importExternalSelf(SequenceInputStream &rStrm)
Imports the EXTERNALSELF record from the passed stream.
bool getDdeLinkData(OUString &orDdeServer, OUString &orDdeTopic, OUString &orDdeItem)
Returns the complete DDE link data of this DDE item.
ExternalLinkRef getExternalLink(sal_Int32 nRefId, bool bUseRefSheets=true) const
Returns the external link for the passed reference identifier.
FunctionLibraryType meFuncLibType
Type of this link object.
ExternalLinkVec maLinks
Implicit self reference at index 0.
std::shared_ptr< ExternalLink > ExternalLinkRef
ExternalLinkRef mxSelfRef
bool isDeleted() const
Returns true, if the sheet indexes are valid and different.
Link refers to the current sheet.
sal_Int32 getLastSheet() const
void appendResultValue(const Type &rValue)
Appends the passed value to the result set.
void importExternalSelf(SequenceInputStream &rStrm)
Imports the EXTERNALSELF record from the passed stream.
ResultMatrix maResults
Additional name data.
Link refers to the current workbook.
void importExternalNameFlags(SequenceInputStream &rStrm)
Imports the EXTERNALNAMEFLAGS record containing the settings of an external name. ...
Link refers to an external add-in.
void setExternalTargetUrl(const OUString &rTargetUrl, const OUString &rTargetType)
Link refers to an external spreadsheet document.
ExternalLinkVec maExtLinks
List of link structures for all kinds of links.
void importExternalName(SequenceInputStream &rStrm)
Imports the EXTERNALNAME record containing the name (only).
const ExternalLink & mrParentLink
bool mbOleObj
Name is the StdDocumentName for DDE.
void importExternalReference(const AttributeList &rAttribs)
Imports the externalReference element containing the relation identifier.
bool mbIconified
Name is an OLE object.
LinkSheetRangeType meType
exports com.sun.star. sheet
sal_Int32 mnTabId1
Zero-based index into list of external documents.
ExternalLinkType getLinkType() const
Returns the type of this external link.
Base class for defined names and external names.
void importExternalAddin(SequenceInputStream &rStrm)
Imports the EXTERNALADDIN record from the passed stream.
css::uno::Reference< css::sheet::XExternalDocLink > mxDocLink
Target link, DDE topic, OLE target.
void importSheetName(const AttributeList &rAttribs)
Imports the sheetName element containing the sheet name in an externally linked document.
sal_Int32 mnTabId2
Zero-based index to first sheet in external document.
sal_Int32 mnDocLink
Link sheet range type.
container_type::iterator iterator
RefSheetsModel()
Zero-based index to last sheet in external document.
const RefSheetsModel * getRefSheets(sal_Int32 nRefId) const
Returns the specified sheet indexes for a reference identifier.
ExternalNameRef importExternalName(SequenceInputStream &rStrm)
Imports the EXTERNALNAME record describing an external name.
Just for round-tripping (FIXME: Functionality not actually implemented after all.) ...
void importExternalRef(SequenceInputStream &rStrm)
Imports the EXTERNALREF record from the passed stream.
ExternalName(const ExternalLink &rParentLink)
sal_Int32 getDocumentLinkIndex() const
Returns the token index of the external document.
void importOleItem(const AttributeList &rAttribs)
Imports the oleItem element describing an object of an OLE link.
void insertExternalSheet(const OUString &rSheetName)
Creates an external document link and the sheet cache for the passed sheet name.
void setSameSheet()
Sets this struct to "use current sheet" state.
void importExternalAddin(SequenceInputStream &rStrm)
Imports the EXTERNALADDIN record from the passed stream.
ExternalNameRef importOleItem(const AttributeList &rAttribs)
Imports the oleItem element describing an object of an OLE link.
RefVector< ExternalLink > ExternalLinkVec
std::vector< sal_Int32 > maSheetCaches
Interface for an external document.
Sheet range in an external document.
bool mbUseRefSheets
Sheet indexes for reference ids.
void importOleLink(const ::oox::core::Relations &rRelations, const AttributeList &rAttribs)
Imports the oleLink element describing an OLE link.
sal_Int32 mnLast
Index of the first sheet or index of first external sheet cache.
Matrix< css::uno::Any > ResultMatrix
ExternalLinkBuffer(const WorkbookHelper &rHelper)
bool is3dRange() const
Returns true, if the sheet indexes are valid and different.
void readBiff12Data(SequenceInputStream &rStrm)
const OUString & getTargetUrl() const
Returns the target URL of this external link.
sal_Int32 mnFirst
Document link token index for external links.
void importExternalSame(SequenceInputStream &rStrm)
Imports the EXTERNALSAME record from the passed stream.
ExternalNameRef createExternalName()
sal_Int32 getDocLinkIndex() const
void setResultSize(sal_Int32 nColumns, sal_Int32 nRows)
Sets the size of the result matrix.
const OUString & getRelId() const
Returns the relation identifier for the external link fragment.
RefSheetsModelVec maRefSheets
Real external links needed for formula parser.
FunctionLibraryType
This enumeration contains constants for all known external libraries containing supported sheet funct...
sal_Int32 getFirstSheet() const
void importValues(const AttributeList &rAttribs)
Imports the values element containing the size of the DDE result matrix.
ExternalLinkRef importExternalReference(const AttributeList &rAttribs)
Imports the externalReference element containing .
bool mbPreferPic
Notify application on data change.
void importDefinedName(const AttributeList &rAttribs)
Imports the definedName element describing an external name.
css::uno::Sequence< css::sheet::ExternalLinkInfo > getLinkInfos() const
Returns the sequence of link infos needed by the XML formula parser.
void setExternalRange(sal_Int32 nDocLink, sal_Int32 nFirst, sal_Int32 nLast)
Sets the passed external sheet cache range to the members of this struct.
void setDeleted()
Sets this struct to deleted state.
ExternalLinkType meLinkType
ExternalNameModel maExtNameModel
External link this name belongs to.
Represents a REF entry in the BIFF12 EXTERNALSHEETS or in the BIFF8 EXTERNSHEET record.
void importDdeItemValues(SequenceInputStream &rStrm)
Imports the DDEITEMVALUES record containing the size of the DDE result matrix.
RefVector< ExternalName > maExtNames
External sheet cache indexes.
void importDdeLink(const AttributeList &rAttribs)
Imports the ddeLink element describing a DDE link.
void importExternalSame(SequenceInputStream &rStrm)
Imports the EXTERNALSAME record from the passed stream.
Sheet range in the own document.
LinkSheetRange getSheetRange(sal_Int32 nRefId) const
Returns the sheet range for the specified reference (BIFF8 only).
void importDdeItemError(SequenceInputStream &rStrm)
Imports the DDEITEM_ERROR record containing an error code in a link result.
const OUString & getClassName() const
Returns the class name of this external link.
sal_Int32 getSheetCacheIndex(sal_Int32 nTabId) const
Returns the external sheet cache index or for the passed sheet.
void importExternalSheets(SequenceInputStream &rStrm)
Imports the EXTERNALSHEETS record from the passed stream.
bool isExternal() const
Returns true, if the sheet range points to an external document.
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 o...
OUString maClassName
Relation identifier for the external link fragment.
Contains indexes for a range of sheets in the spreadsheet document.
void parseExternalReference(const ::oox::core::Relations &rRelations, const OUString &rRelId)
ExternalLinkRef importExternalRef(SequenceInputStream &rStrm)
Imports the EXTERNALREF record from the passed stream.
void importDdeItemString(SequenceInputStream &rStrm)
Imports the DDEITEM_STRING record containing a string in a link result.
std::basic_ostream< charT, traits > & operator<<(std::basic_ostream< charT, traits > &stream, const ExternalLinkType &type)
css::sheet::ExternalLinkInfo getLinkInfo() const
Returns the link info needed by the XML formula parser.
OUString maTargetUrl
DDE service, OLE class name.
void importExtSheetNames(SequenceInputStream &rStrm)
Imports the EXTSHEETNAMES record containing the sheet names in an externally linked document...
void importExternalBook(const ::oox::core::Relations &rRelations, const AttributeList &rAttribs)
Imports the externalBook element describing an externally linked document.
::std::vector< RefSheetsModel > RefSheetsModelVec
bool isSameSheet() const
Returns true, if the sheet indexes are valid and different.
bool mbDdeLinkCreated
Interface of a DDE link.
css::uno::Reference< css::sheet::XExternalSheetCache > getSheetCache(sal_Int32 nTabId) const
Returns the sheet cache of the external sheet with the passed index.
ExternalLinkRef createExternalLink()
Creates a new external link and inserts it into the list of links.
void importDdeItemBool(SequenceInputStream &rStrm)
Imports the DDEITEM_BOOL record containing a boolean value in a link result.
bool getDdeItemInfo(css::sheet::DDEItemInfo &orItemInfo) const
Returns the DDE item info needed by the XML formula parser.
void setDdeOleTargetUrl(const OUString &rClassName, const OUString &rTargetUrl, ExternalLinkType eLinkType)
void setRange(sal_Int32 nFirst, sal_Int32 nLast)
Sets the passed absolute sheet range to the members of this struct.
void importDefinedName(const AttributeList &rAttribs)
Imports the definedName element.
FunctionLibraryType getFuncLibraryType() const
Returns the type of the external library if this is a library link.
std::shared_ptr< ExternalName > ExternalNameRef
ExternalNameRef importDdeItem(const AttributeList &rAttribs)
Imports the ddeItem element describing an item of a DDE link.
ResultMatrix::iterator maCurrIt
DDE/OLE link results.
OUString maRelId
Type of the function library, if link type is ExternalLinkType::Library.
bool mbStdDocName
Picture link.
void importDdeItemDouble(SequenceInputStream &rStrm)
Imports the DDEITEM_DOUBLE record containing a double value in a link result.
ExternalNameRef getNameByIndex(sal_Int32 nIndex) const
Returns the external name with the passed zero-based index.
ExternalNameModel()
Iconified object link.