diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-06-14 15:48:52 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-06-14 19:54:26 +0000 |
commit | 9f0997eb167d0ef2193a59d43ab55ea5f13ebaac (patch) | |
tree | 815c61b4c26e17a1f51c503f4f1090b2b6b102c4 /include/basic/sbxvar.hxx | |
parent | be2cf3d28b91cff4127c95cfe4481f36bdeb24fb (diff) |
Resolves: tdf#59222 Crash in Basic with an array of values...
from a range address
trying to make all SbxVariables reference count their parents
is ludiciously hard, so just reference count this one known
crashing case
Change-Id: Ie1fa6624e8184146dd00d766cdbacef674153ef6
Reviewed-on: https://gerrit.libreoffice.org/26272
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/basic/sbxvar.hxx')
-rw-r--r-- | include/basic/sbxvar.hxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/basic/sbxvar.hxx b/include/basic/sbxvar.hxx index 3ee3768a2a07..25ac2605d859 100644 --- a/include/basic/sbxvar.hxx +++ b/include/basic/sbxvar.hxx @@ -283,8 +283,19 @@ public: static sal_uInt16 MakeHashCode( const OUString& rName ); }; +typedef tools::SvRef<SbxObject> SbxObjectRef; typedef tools::SvRef<SbxVariable> SbxVariableRef; +//tdf#59222 SbxEnsureParentVariable is a SbxVariable which keeps a reference to +//its parent, ensuring it always exists while this SbxVariable exists +class BASIC_DLLPUBLIC SbxEnsureParentVariable : public SbxVariable +{ + SbxObjectRef xParent; +public: + SbxEnsureParentVariable(const SbxVariable& r); + virtual void SetParent(SbxObject* p) override; +}; + #endif // INCLUDED_BASIC_SBXVAR_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |