summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/app/inputhdl.cxx8
-rw-r--r--sc/source/ui/inc/inputhdl.hxx3
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx3
3 files changed, 13 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)
diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx
index bc7afcae014b..10f1f0a01041 100644
--- a/sc/source/ui/inc/inputhdl.hxx
+++ b/sc/source/ui/inc/inputhdl.hxx
@@ -100,6 +100,7 @@ private:
bool bProtected:1;
bool bCellHasPercentFormat:1;
bool bLastIsSymbol:1;
+ bool mbDocumentDisposing:1;
sal_uLong nValidation;
SvxCellHorJustify eAttrAdjust;
@@ -256,6 +257,8 @@ public:
// actually private, public for SID_INPUT_SUM
void InitRangeFinder(const OUString& rFormula);
+ void SetDocumentDisposing( bool b );
+
static void SetAutoComplete(bool bSet) { bAutoComplete = bSet; }
};
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 769fbf3e126d..b32cb8f95350 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1790,6 +1790,9 @@ ScTabViewShell::~ScTabViewShell()
// alles auf NULL, falls aus dem TabView-dtor noch darauf zugegriffen wird
//! (soll eigentlich nicht !??!?!)
+ if (pInputHandler)
+ pInputHandler->SetDocumentDisposing(true);
+
DELETEZ(pFontworkBarShell);
DELETEZ(pExtrusionBarShell);
DELETEZ(pCellShell);