summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/inc/refdata.hxx7
-rw-r--r--sc/source/core/tool/refdata.cxx2
2 files changed, 6 insertions, 3 deletions
diff --git a/sc/inc/refdata.hxx b/sc/inc/refdata.hxx
index 7edac9f4bb01..1274636d17da 100644
--- a/sc/inc/refdata.hxx
+++ b/sc/inc/refdata.hxx
@@ -94,7 +94,9 @@ public:
bool ColValid() const;
bool RowValid() const;
bool TabValid() const;
- /// In external references nTab is -1
+ /** In external references nTab is -1 if the external document was not
+ loaded but the sheet was cached, or >=0 if the external document was
+ loaded. */
bool ValidExternal() const;
ScAddress toAbs( const ScAddress& rPos ) const;
@@ -145,7 +147,8 @@ struct ScComplexRefData
bool Valid() const;
/** In external references nTab is -1 for the start tab and -1 for the end
- tab if one sheet, or >=0 if more than one sheets. */
+ tab if one sheet and the external document was not loaded but sheet was
+ cached, or >=0 also if more than one sheets. */
bool ValidExternal() const;
/** Whether this references entire columns, A:A */
diff --git a/sc/source/core/tool/refdata.cxx b/sc/source/core/tool/refdata.cxx
index 397421ad6007..4321e96d3e8a 100644
--- a/sc/source/core/tool/refdata.cxx
+++ b/sc/source/core/tool/refdata.cxx
@@ -181,7 +181,7 @@ bool ScSingleRefData::TabValid() const
bool ScSingleRefData::ValidExternal() const
{
- return ColValid() && RowValid() && mnTab == -1;
+ return ColValid() && RowValid() && mnTab >= -1;
}
ScAddress ScSingleRefData::toAbs( const ScAddress& rPos ) const