diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-02-14 12:28:03 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-02-14 12:31:10 -0500 |
commit | 76bdf523981d2bd983dac4e01bc5cc934118a73f (patch) | |
tree | 41677a4ef5e3cb1b9df8736d30080a1bc72d9673 /sc/source/ui/app/inputhdl.cxx | |
parent | 5000e64ecc55efd47d92714cf6db375ff37aac4b (diff) |
fdo#73773: Check if the *document* is closing, not the *app*.
Otherwise it would crash if the app has multiple document instances open
and only one of them is being closed.
Change-Id: Ib6e370037ab6097c9c6eff8035249663944b3a6c
Diffstat (limited to 'sc/source/ui/app/inputhdl.cxx')
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index d961c81e53c0..8e6d16aeb514 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -298,6 +298,11 @@ handle_r1c1: } } +void ScInputHandler::SetDocumentDisposing( bool b ) +{ + mbDocumentDisposing = b; +} + static void lcl_Replace( EditView* pView, const OUString& rNewStr, const ESelection& rOldSel ) { if ( pView ) @@ -518,6 +523,7 @@ ScInputHandler::ScInputHandler() bProtected( false ), bCellHasPercentFormat( false ), bLastIsSymbol( false ), + mbDocumentDisposing(false), nValidation( 0 ), eAttrAdjust( SVX_HOR_JUSTIFY_STANDARD ), aScaleX( 1,1 ), @@ -541,7 +547,7 @@ ScInputHandler::~ScInputHandler() // Wenn dies der Applikations-InputHandler ist, wird der dtor erst nach SfxApplication::Main // gerufen, darf sich also auf keine Sfx-Funktionen mehr verlassen - if ( !SFX_APP()->IsDowning() ) // inplace + if (!mbDocumentDisposing) // inplace EnterHandler(); // Eingabe noch abschliessen if (SC_MOD()->GetRefInputHdl()==this) |