diff options
author | Eike Rathke <erack@redhat.com> | 2017-11-06 19:39:26 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-11-06 19:40:19 +0100 |
commit | efdf57aa44bd22a799d76ec67c805bc5c2d91678 (patch) | |
tree | e3ca4a7848a3612a0d51d7c5dbec617ad5c9aa13 /sc/inc | |
parent | Fix typos (diff) | |
download | core-efdf57aa44bd22a799d76ec67c805bc5c2d91678.tar.gz core-efdf57aa44bd22a799d76ec67c805bc5c2d91678.zip |
ofz#4052 limit listener range to actually available sheets
... instead of an arbitrary reference range read from a binary
file format, here 4k sheets resulting in >3GB allocated listener
memory.
Change-Id: I629297f4249fdf16a0ede098b63d9648fda69ac3
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/document.hxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index a2a073a68ab2..31c5e2f4957a 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -2046,6 +2046,24 @@ private: static ScRecursionHelper* CreateRecursionHelperInstance(); + /** Adjust a range to available sheets. + + Used to start and stop listening on a sane range. Both o_rRange and + o_bEntirelyOutOfBounds are set only if needed and don't have to be + initialized by the caller. + + @param o_bEntirelyOutOfBounds + <TRUE/> if both sheets in the range point outside the + available sheet range, in which case no adjustment is done and + o_rRange is not modified. + + @return <TRUE/> if any adjustment was done or o_bEntirelyOutOfBounds + was set <TRUE/>. + <FALSE/> if rRange was within the available sheets. + */ + bool LimitRangeToAvailableSheets( const ScRange& rRange, ScRange& o_rRange, + bool& o_bEntirelyOutOfBounds ) const; + public: void StartListeningArea( const ScRange& rRange, bool bGroupListening, SvtListener* pListener ); |