summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2013-06-27 10:23:24 +0000
committerArmin Le Grand <alg@apache.org>2013-06-27 10:23:24 +0000
commitfb1dc1d963e192e588731cce3a3ba20996c4e589 (patch)
tree7dd4c8fa45635a13cf5c1f9bc065390fa6c265b8 /sc
parentbe6ce149c164d8ac06f12a4a1cc04a9299f5fd07 (diff)
i121008 corrected calc cell comment stuff
Notes
Notes: merged as: ecccfa73b9c69a5d9645a2647f20a37588a63a8e
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/drwlayer.hxx2
-rw-r--r--sc/source/core/data/documen9.cxx2
-rw-r--r--sc/source/core/data/drwlayer.cxx5
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx2
-rw-r--r--sc/source/ui/docshell/docfunc.cxx18
-rw-r--r--sc/source/ui/drawfunc/futext3.cxx12
-rw-r--r--sc/source/ui/view/drawview.cxx2
-rw-r--r--sc/source/ui/view/viewfun6.cxx2
8 files changed, 25 insertions, 20 deletions
diff --git a/sc/inc/drwlayer.hxx b/sc/inc/drwlayer.hxx
index 86d0cc2e0e74..7bfe56b12a7b 100644
--- a/sc/inc/drwlayer.hxx
+++ b/sc/inc/drwlayer.hxx
@@ -146,7 +146,7 @@ public:
void EnableAdjust( sal_Bool bSet = sal_True ) { bAdjustEnabled = bSet; }
- void BeginCalcUndo();
+ void BeginCalcUndo(bool bDisableTextEditUsesCommonUndoManager);
SdrUndoGroup* GetCalcUndo();
sal_Bool IsRecording() const { return bRecording; }
void AddCalcUndo( SdrUndoAction* pUndo );
diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index 9c788ea43739..882af4cd0d8a 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -75,7 +75,7 @@ SfxBroadcaster* ScDocument::GetDrawBroadcaster()
void ScDocument::BeginDrawUndo()
{
if (pDrawLayer)
- pDrawLayer->BeginCalcUndo();
+ pDrawLayer->BeginCalcUndo(false);
}
sal_Bool ScDocument::IsDrawRecording() const
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 8a0a5fb8cea3..4bd47f9608f2 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -860,10 +860,10 @@ void ScDrawLayer::AddCalcUndo( SdrUndoAction* pUndo )
delete pUndo;
}
-void ScDrawLayer::BeginCalcUndo()
+void ScDrawLayer::BeginCalcUndo(bool bDisableTextEditUsesCommonUndoManager)
{
//! DBG_ASSERT( !bRecording, "BeginCalcUndo ohne GetCalcUndo" );
-
+ SetDisableTextEditUsesCommonUndoManager(bDisableTextEditUsesCommonUndoManager);
DELETEZ(pUndoGroup);
bRecording = sal_True;
}
@@ -875,6 +875,7 @@ SdrUndoGroup* ScDrawLayer::GetCalcUndo()
SdrUndoGroup* pRet = pUndoGroup;
pUndoGroup = NULL;
bRecording = sal_False;
+ SetDisableTextEditUsesCommonUndoManager(false);
return pRet;
}
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 921d1271e58e..40be175302be 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -541,7 +541,7 @@ sal_Bool ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
// #i59745# collect all drawing undo actions affecting cell note captions
if( pDrawLayer )
- pDrawLayer->BeginCalcUndo();
+ pDrawLayer->BeginCalcUndo(false);
}
if ( bCopy )
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 15d4f71ad907..16c9ce363281 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -190,7 +190,7 @@ sal_Bool ScDocFunc::DetectiveAddPred(const ScAddress& rPos)
SCTAB nTab = rPos.Tab();
if (bUndo)
- pModel->BeginCalcUndo();
+ pModel->BeginCalcUndo(false);
sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).ShowPred( nCol, nRow );
SdrUndoGroup* pUndo = NULL;
if (bUndo)
@@ -231,7 +231,7 @@ sal_Bool ScDocFunc::DetectiveDelPred(const ScAddress& rPos)
SCTAB nTab = rPos.Tab();
if (bUndo)
- pModel->BeginCalcUndo();
+ pModel->BeginCalcUndo(false);
sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).DeletePred( nCol, nRow );
SdrUndoGroup* pUndo = NULL;
if (bUndo)
@@ -270,7 +270,7 @@ sal_Bool ScDocFunc::DetectiveAddSucc(const ScAddress& rPos)
SCTAB nTab = rPos.Tab();
if (bUndo)
- pModel->BeginCalcUndo();
+ pModel->BeginCalcUndo(false);
sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).ShowSucc( nCol, nRow );
SdrUndoGroup* pUndo = NULL;
if (bUndo)
@@ -311,7 +311,7 @@ sal_Bool ScDocFunc::DetectiveDelSucc(const ScAddress& rPos)
SCTAB nTab = rPos.Tab();
if (bUndo)
- pModel->BeginCalcUndo();
+ pModel->BeginCalcUndo(false);
sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).DeleteSucc( nCol, nRow );
SdrUndoGroup* pUndo = NULL;
if (bUndo)
@@ -350,7 +350,7 @@ sal_Bool ScDocFunc::DetectiveAddError(const ScAddress& rPos)
SCTAB nTab = rPos.Tab();
if (bUndo)
- pModel->BeginCalcUndo();
+ pModel->BeginCalcUndo(false);
sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).ShowError( nCol, nRow );
SdrUndoGroup* pUndo = NULL;
if (bUndo)
@@ -389,7 +389,7 @@ sal_Bool ScDocFunc::DetectiveMarkInvalid(SCTAB nTab)
if (pWaitWin)
pWaitWin->EnterWait();
if (bUndo)
- pModel->BeginCalcUndo();
+ pModel->BeginCalcUndo(false);
sal_Bool bOverflow;
sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).MarkInvalid( bOverflow );
SdrUndoGroup* pUndo = NULL;
@@ -429,7 +429,7 @@ sal_Bool ScDocFunc::DetectiveDelAll(SCTAB nTab)
ScDocShellModificator aModificator( rDocShell );
if (bUndo)
- pModel->BeginCalcUndo();
+ pModel->BeginCalcUndo(false);
sal_Bool bDone = ScDetectiveFunc( pDoc,nTab ).DeleteAll( SC_DET_DETECTIVE );
SdrUndoGroup* pUndo = NULL;
if (bUndo)
@@ -471,7 +471,7 @@ sal_Bool ScDocFunc::DetectiveRefresh( sal_Bool bAutomatic )
rDocShell.MakeDrawLayer();
ScDrawLayer* pModel = pDoc->GetDrawLayer();
if (bUndo)
- pModel->BeginCalcUndo();
+ pModel->BeginCalcUndo(false);
// Loeschen auf allen Tabellen
@@ -1147,7 +1147,7 @@ bool ScDocFunc::ReplaceNote( const ScAddress& rPos, const String& rNoteText, con
// collect drawing undo actions for deleting/inserting caption obejcts
if( pUndoMgr )
- pDrawLayer->BeginCalcUndo();
+ pDrawLayer->BeginCalcUndo(false);
// delete the note (creates drawing undo action for the caption object)
delete pOldNote;
diff --git a/sc/source/ui/drawfunc/futext3.cxx b/sc/source/ui/drawfunc/futext3.cxx
index 2fdfffeab3ab..1137c372b582 100644
--- a/sc/source/ui/drawfunc/futext3.cxx
+++ b/sc/source/ui/drawfunc/futext3.cxx
@@ -87,14 +87,18 @@ void FuText::StopEditMode(sal_Bool /*bTextDirection*/)
{
/* Put all undo actions already collected (e.g. create caption object)
and all following undo actions (text changed) together into a ListAction. */
- String aUndoStr = ScGlobal::GetRscString( STR_UNDO_EDITNOTE );
- pUndoMgr->EnterListAction( aUndoStr, aUndoStr );
- if( SdrUndoGroup* pCalcUndo = pDrawLayer->GetCalcUndo() )
+ SdrUndoGroup* pCalcUndo = pDrawLayer->GetCalcUndo();
+
+ if(pCalcUndo)
{
+ const String aUndoStr = ScGlobal::GetRscString( STR_UNDO_EDITNOTE );
+ pUndoMgr->EnterListAction( aUndoStr, aUndoStr );
+
/* Note has been created before editing, if first undo action is
an insert action. Needed below to decide whether to drop the
undo if editing a new note has been cancelled. */
bNewNote = (pCalcUndo->GetActionCount() > 0) && pCalcUndo->GetAction( 0 )->ISA( SdrUndoNewObj );
+
// create a "insert note" undo action if needed
if( bNewNote )
pUndoMgr->AddUndoAction( new ScUndoReplaceNote( *pDocShell, aNotePos, pNote->GetNoteData(), true, pCalcUndo ) );
@@ -140,7 +144,7 @@ void FuText::StopEditMode(sal_Bool /*bTextDirection*/)
if( pUndoMgr )
{
// collect the "remove object" drawing undo action created by DeleteNote()
- pDrawLayer->BeginCalcUndo();
+ pDrawLayer->BeginCalcUndo(false);
// rescue note data before deletion
ScNoteData aNoteData( pNote->GetNoteData() );
// delete note from document (removes caption, but does not delete it)
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index e38779f22893..1aafc0cf82ff 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -835,7 +835,7 @@ void ScDrawView::DeleteMarked()
DBG_ASSERT( aNoteData.mpCaption == pCaptObj, "ScDrawView::DeleteMarked - caption object does not match" );
// collect the drawing undo action created while deleting the note
if( bUndo )
- pDrawLayer->BeginCalcUndo();
+ pDrawLayer->BeginCalcUndo(false);
// delete the note (already removed from document above)
delete pNote;
// add the undo action for the note
diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx
index 0b1deb81dad0..f463b89573b2 100644
--- a/sc/source/ui/view/viewfun6.cxx
+++ b/sc/source/ui/view/viewfun6.cxx
@@ -159,7 +159,7 @@ void ScViewFunc::EditNote()
// start drawing undo to catch undo action for insertion of the caption object
pDocSh->MakeDrawLayer();
ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
- pDrawLayer->BeginCalcUndo();
+ pDrawLayer->BeginCalcUndo(true);
// generated undo action is processed in FuText::StopEditMode
// get existing note or create a new note (including caption drawing object)