summaryrefslogtreecommitdiffstats
path: root/sc/inc/externalrefmgr.hxx
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2010-10-05 18:14:37 -0400
committerKohei Yoshida <kyoshida@novell.com>2010-10-05 18:14:37 -0400
commit296baa2fb6dd4150a7855114093a9703cdc18b09 (patch)
tree0fe76d11e2123e4bae6f4940653f6ffa54fefd06 /sc/inc/externalrefmgr.hxx
parentPorted calc-dp-sort-fix.diff from ooo-build. (diff)
downloadcore-296baa2fb6dd4150a7855114093a9703cdc18b09.tar.gz
core-296baa2fb6dd4150a7855114093a9703cdc18b09.zip
Ported calc-extref-interpreter-rework-*.diff from ooo-build.
Re-structured the interpreter code to handle external references with ocPush, instead of ocExternalRef. This is necessary in order to support shifting of references in the same way you can with internal references. In addition, this change allows re-using of document instances already loaded when accessing external references that point to one of already loaded documents. Previously, Calc would load the same document from disk even when the document was already loaded. (n#628876)
Diffstat (limited to 'sc/inc/externalrefmgr.hxx')
-rw-r--r--sc/inc/externalrefmgr.hxx44
1 files changed, 42 insertions, 2 deletions
diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx
index 818920885493..e0988f98632b 100644
--- a/sc/inc/externalrefmgr.hxx
+++ b/sc/inc/externalrefmgr.hxx
@@ -684,7 +684,47 @@ private:
void insertRefCell(sal_uInt16 nFileId, const ScAddress& rCell);
- ScDocument* getSrcDocument(sal_uInt16 nFileId);
+ void fillCellFormat(sal_uInt32 nFmtIndex, ScExternalRefCache::CellFormat* pFmt) const;
+
+ ScExternalRefCache::TokenRef getSingleRefTokenFromSrcDoc(
+ sal_uInt16 nFileId, const ScDocument* pSrcDoc, const ScAddress& rCell,
+ ScExternalRefCache::CellFormat* pFmt);
+
+ /**
+ * Retrieve a range token array from a source document instance.
+ *
+ * @param pSrcDoc pointer to the source document instance.
+ * @param rTabName name of the first table.
+ * @param rRange range specified. Upon successful retrieval, this range
+ * gets modified to contain the correct table IDs, and in
+ * case the range is larger than the data area of the source
+ * document, it gets reduced to the data area.
+ * @param rCacheData an array of structs, with each struct containing the
+ * table name and the data in the specified range.
+ *
+ * @return range token array
+ */
+ ScExternalRefCache::TokenArrayRef getDoubleRefTokensFromSrcDoc(
+ const ScDocument* pSrcDoc, const String& rTabName, ScRange& rRange,
+ ::std::vector<ScExternalRefCache::SingleRangeData>& rCacheData);
+
+ /**
+ * Retrieve range name token array from a source document instance.
+ *
+ * @param nFileId file ID of the source document.
+ * @param pSrcDoc pointer to the source document instance
+ * @param rName range name to retrieve. Note that the range name lookup
+ * is case <i>in</i>-sensitive, and upon successful retrieval
+ * of the range name array, this name gets updated to the
+ * actual range name with the correct casing.
+ *
+ * @return range name token array
+ */
+ ScExternalRefCache::TokenArrayRef getRangeNameTokensFromSrcDoc(
+ sal_uInt16 nFileId, const ScDocument* pSrcDoc, String& rName);
+
+ const ScDocument* getInMemorySrcDocument(sal_uInt16 nFileId);
+ const ScDocument* getSrcDocument(sal_uInt16 nFileId);
SfxObjectShellRef loadSrcDocument(sal_uInt16 nFileId, String& rFilter);
bool isFileLoadable(const String& rFile) const;
@@ -711,7 +751,7 @@ private:
*/
void purgeStaleSrcDocument(sal_Int32 nTimeOut);
- sal_uInt32 getMappedNumberFormat(sal_uInt16 nFileId, sal_uInt32 nNumFmt, ScDocument* pSrcDoc);
+ sal_uInt32 getMappedNumberFormat(sal_uInt16 nFileId, sal_uInt32 nNumFmt, const ScDocument* pSrcDoc);
private:
/** cache of referenced ranges and names from source documents. */