summaryrefslogtreecommitdiffstats
path: root/sc/inc/externalrefmgr.hxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-05-20 13:57:13 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-05-21 13:25:24 -0400
commit8d5d877dc94ba5edfc7587b957ca5a00725d434b (patch)
tree3e0d8dd0796a72cb7db38d6fb91cd93a26d5fbb4 /sc/inc/externalrefmgr.hxx
parentLocalize this string. (diff)
downloadcore-8d5d877dc94ba5edfc7587b957ca5a00725d434b.tar.gz
core-8d5d877dc94ba5edfc7587b957ca5a00725d434b.zip
cp#1000072: Populate cache tables when updating all external links.
This way, even after the loaded doc shells get purged due to timeout, we won't reload those external documents from disk again. One caveat is that we currently don't pre-populate empty cells even if they are referenced by the host document. Change-Id: I1de2987836bf2fc5d9d7044b406fb99faa534164
Diffstat (limited to 'sc/inc/externalrefmgr.hxx')
-rw-r--r--sc/inc/externalrefmgr.hxx24
1 files changed, 24 insertions, 0 deletions
diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx
index bbb3094eae2a..9bcc64d36f8f 100644
--- a/sc/inc/externalrefmgr.hxx
+++ b/sc/inc/externalrefmgr.hxx
@@ -55,6 +55,12 @@ class SharedStringPool;
}
+namespace sc {
+
+class ColumnSpanSet;
+
+}
+
class ScExternalRefLink : public ::sfx2::SvBaseLink
{
public:
@@ -145,6 +151,8 @@ public:
Table();
~Table();
+ void clear();
+
/**
* Add cell value to the cache.
*
@@ -268,6 +276,13 @@ public:
void setAllCacheTableReferencedStati( bool bReferenced );
bool areAllCacheTablesReferenced() const;
+ /**
+ * Collect all cached non-empty cell positions, inferred directly from the
+ * cached data, not the cached range metadata stored separately in the
+ * Table.
+ */
+ void getAllCachedDataSpans( sal_uInt16 nFileId, sc::ColumnSpanSet& rSet ) const;
+
private:
struct ReferencedStatus
{
@@ -295,8 +310,17 @@ public:
ScExternalRefCache::TableTypeRef getCacheTable(sal_uInt16 nFileId, size_t nTabIndex) const;
ScExternalRefCache::TableTypeRef getCacheTable(sal_uInt16 nFileId, const OUString& rTabName, bool bCreateNew, size_t* pnIndex);
+ /**
+ * Clear all caches including the cache tables.
+ */
void clearCache(sal_uInt16 nFileId);
+ /**
+ * Clear all caches but keep the tables. All cache tables will be empty
+ * after the call, but the tables will not be removed.
+ */
+ void clearCacheTables(sal_uInt16 nFileId);
+
private:
struct RangeHash
{