22#include <document.hxx>
27#include <osl/diagnose.h>
46 sal_Int32 nElement,
const uno::Reference< xml::sax::XFastAttributeList >& )
71 sal_Int32 nElement,
const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
104 SAL_WARN(
"sc" ,
"DDE Link not inserted");
116 for (sal_Int32
i = 0;
i < nRowsP; ++
i)
128 OSL_ENSURE( bSizeMatch,
"ScXMLDDELinkContext::EndElement: matrix dimension doesn't match cells count");
138 "ScXMLDDELinkContext::EndElement: adapted matrix dimension doesn't match either");
158 if( rDDELinkCell.bEmpty )
159 pMatrix->PutEmpty( nScCol, nScRow );
160 else if( rDDELinkCell.bString )
161 pMatrix->PutString(rPool.
intern(rDDELinkCell.sValue), nScCol, nScRow);
163 pMatrix->PutDouble( rDDELinkCell.fValue, nScCol, nScRow );
175 pDDELink(pTempDDELink)
177 if ( !rAttrList.is() )
180 for (
auto &aIter : *rAttrList)
182 switch (aIter.getToken())
217 pDDELink(pTempDDELink)
227 sal_Int32 nElement,
const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
251 if ( rAttrList.is() )
255 if (aIter != rAttrList->end())
256 nCols = aIter.toInt32();
270 pDDELink(pTempDDELink),
273 if ( rAttrList.is() )
276 if (aIter != rAttrList->end())
277 nRows = aIter.toInt32();
288 sal_Int32 nElement,
const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
314 pDDELink(pTempDDELink)
316 if ( !rAttrList.is() )
319 for (
auto &aIter : *rAttrList)
321 switch (aIter.getToken())
330 sValue = aIter.toString();
335 fValue = aIter.toDouble();
size_t SCSIZE
size_t typedef to be able to find places where code was changed from USHORT to size_t and is used to ...
bool SetDdeLinkResultMatrix(size_t nDdePos, const ScMatrixRef &pResults)
Sets a result matrix for the specified DDE link.
SC_DLLPUBLIC bool CreateDdeLink(const OUString &rAppl, const OUString &rTopic, const OUString &rItem, sal_uInt8 nMode, const ScMatrixRef &pResults)
Tries to find a DDE link or creates a new, if not extant.
SC_DLLPUBLIC svl::SharedStringPool & GetSharedStringPool()
Matrix data type that can store values of mixed types.
ScXMLDDELinkContext * pDDELink
virtual ~ScXMLDDECellContext() override
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
ScXMLDDECellContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScXMLDDELinkContext *pDDELink)
ScXMLDDEColumnContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScXMLDDELinkContext *pDDELink)
virtual ~ScXMLDDEColumnContext() override
void SetApplication(const OUString &sValue)
void AddRowsToTable(const sal_Int32 nRows)
void SetTopic(const OUString &sValue)
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
void SetItem(const OUString &sValue)
ScDDELinkCells aDDELinkTable
void AddCellToRow(const ScDDELinkCell &aCell)
void AddColumns(const sal_Int32 nValue)
ScDDELinkCells aDDELinkRow
virtual ~ScXMLDDELinkContext() override
void AddRows(const sal_Int32 nValue)
ScXMLDDELinkContext(ScXMLImport &rImport)
void SetMode(const sal_uInt8 nValue)
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
virtual ~ScXMLDDELinksContext() override
ScXMLDDELinksContext(ScXMLImport &rImport)
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
virtual ~ScXMLDDERowContext() override
ScXMLDDELinkContext * pDDELink
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
ScXMLDDERowContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScXMLDDELinkContext *pDDELink)
virtual ~ScXMLDDESourceContext() override
ScXMLDDESourceContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScXMLDDELinkContext *pDDELink)
ScXMLDDELinkContext * pDDELink
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
ScXMLDDETableContext(ScXMLImport &rImport, ScXMLDDELinkContext *pDDELink)
ScXMLDDELinkContext * pDDELink
virtual ~ScXMLDDETableContext() override
This class exists only to provide GetScImport() to its derived classes.
ScXMLImport & GetScImport()
ScDocument * GetDocument()
SharedString intern(const OUString &rStr)
const sal_uInt8 SC_DDE_TEXT
const sal_uInt8 SC_DDE_DEFAULT
const sal_uInt8 SC_DDE_ENGLISH
#define SAL_WARN(area, stream)
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
XML_NUMBER_COLUMNS_REPEATED
bool IsXMLToken(std::u16string_view rString, enum XMLTokenEnum eToken)
::boost::intrusive_ptr< ScMatrix > ScMatrixRef
#define XML_ELEMENT(prefix, name)