summaryrefslogtreecommitdiff
path: root/sc/source/core/data/table5.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/data/table5.cxx')
-rw-r--r--sc/source/core/data/table5.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx
index 4d3c99f86899..5a50a7cfcdcc 100644
--- a/sc/source/core/data/table5.cxx
+++ b/sc/source/core/data/table5.cxx
@@ -1082,7 +1082,7 @@ void ScTable::StartListening( const ScAddress& rAddress, SvtListener* pListener
if (!ValidCol(rAddress.Col()))
return;
- aCol[rAddress.Col()].StartListening( *pListener, rAddress.Row() );
+ CreateColumnIfNotExists(rAddress.Col()).StartListening( *pListener, rAddress.Row() );
}
void ScTable::EndListening( const ScAddress& rAddress, SvtListener* pListener )
@@ -1090,7 +1090,8 @@ void ScTable::EndListening( const ScAddress& rAddress, SvtListener* pListener )
if (!ValidCol(rAddress.Col()))
return;
- aCol[rAddress.Col()].EndListening( *pListener, rAddress.Row() );
+ if (rAddress.Col() < aCol.size())
+ aCol[rAddress.Col()].EndListening( *pListener, rAddress.Row() );
}
void ScTable::StartListening( sc::StartListeningContext& rCxt, const ScAddress& rAddress, SvtListener& rListener )