You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by al...@apache.org on 2013/06/27 12:23:24 UTC
svn commit: r1497286 - in /openoffice/trunk/main: sc/inc/
sc/source/core/data/ sc/source/ui/docshell/ sc/source/ui/drawfunc/
sc/source/ui/view/ svx/inc/svx/ svx/source/svdraw/
Author: alg
Date: Thu Jun 27 10:23:24 2013
New Revision: 1497286
URL: http://svn.apache.org/r1497286
Log:
i121008 corrected calc cell comment stuff
Modified:
openoffice/trunk/main/sc/inc/drwlayer.hxx
openoffice/trunk/main/sc/source/core/data/documen9.cxx
openoffice/trunk/main/sc/source/core/data/drwlayer.cxx
openoffice/trunk/main/sc/source/ui/docshell/dbdocfun.cxx
openoffice/trunk/main/sc/source/ui/docshell/docfunc.cxx
openoffice/trunk/main/sc/source/ui/drawfunc/futext3.cxx
openoffice/trunk/main/sc/source/ui/view/drawview.cxx
openoffice/trunk/main/sc/source/ui/view/viewfun6.cxx
openoffice/trunk/main/svx/inc/svx/svdmodel.hxx
openoffice/trunk/main/svx/source/svdraw/svdedxv.cxx
openoffice/trunk/main/svx/source/svdraw/svdmodel.cxx
openoffice/trunk/main/svx/source/svdraw/svdundo.cxx
Modified: openoffice/trunk/main/sc/inc/drwlayer.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sc/inc/drwlayer.hxx?rev=1497286&r1=1497285&r2=1497286&view=diff
==============================================================================
--- openoffice/trunk/main/sc/inc/drwlayer.hxx (original)
+++ openoffice/trunk/main/sc/inc/drwlayer.hxx Thu Jun 27 10:23:24 2013
@@ -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 );
Modified: openoffice/trunk/main/sc/source/core/data/documen9.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sc/source/core/data/documen9.cxx?rev=1497286&r1=1497285&r2=1497286&view=diff
==============================================================================
--- openoffice/trunk/main/sc/source/core/data/documen9.cxx (original)
+++ openoffice/trunk/main/sc/source/core/data/documen9.cxx Thu Jun 27 10:23:24 2013
@@ -75,7 +75,7 @@ SfxBroadcaster* ScDocument::GetDrawBroad
void ScDocument::BeginDrawUndo()
{
if (pDrawLayer)
- pDrawLayer->BeginCalcUndo();
+ pDrawLayer->BeginCalcUndo(false);
}
sal_Bool ScDocument::IsDrawRecording() const
Modified: openoffice/trunk/main/sc/source/core/data/drwlayer.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sc/source/core/data/drwlayer.cxx?rev=1497286&r1=1497285&r2=1497286&view=diff
==============================================================================
--- openoffice/trunk/main/sc/source/core/data/drwlayer.cxx (original)
+++ openoffice/trunk/main/sc/source/core/data/drwlayer.cxx Thu Jun 27 10:23:24 2013
@@ -860,10 +860,10 @@ void ScDrawLayer::AddCalcUndo( SdrUndoAc
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;
}
Modified: openoffice/trunk/main/sc/source/ui/docshell/dbdocfun.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sc/source/ui/docshell/dbdocfun.cxx?rev=1497286&r1=1497285&r2=1497286&view=diff
==============================================================================
--- openoffice/trunk/main/sc/source/ui/docshell/dbdocfun.cxx (original)
+++ openoffice/trunk/main/sc/source/ui/docshell/dbdocfun.cxx Thu Jun 27 10:23:24 2013
@@ -541,7 +541,7 @@ sal_Bool ScDBDocFunc::Sort( SCTAB nTab,
// #i59745# collect all drawing undo actions affecting cell note captions
if( pDrawLayer )
- pDrawLayer->BeginCalcUndo();
+ pDrawLayer->BeginCalcUndo(false);
}
if ( bCopy )
Modified: openoffice/trunk/main/sc/source/ui/docshell/docfunc.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sc/source/ui/docshell/docfunc.cxx?rev=1497286&r1=1497285&r2=1497286&view=diff
==============================================================================
--- openoffice/trunk/main/sc/source/ui/docshell/docfunc.cxx (original)
+++ openoffice/trunk/main/sc/source/ui/docshell/docfunc.cxx Thu Jun 27 10:23:24 2013
@@ -190,7 +190,7 @@ sal_Bool ScDocFunc::DetectiveAddPred(con
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(con
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(con
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(con
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(co
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
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(SCTA
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( sa
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 ScAdd
// 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;
Modified: openoffice/trunk/main/sc/source/ui/drawfunc/futext3.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sc/source/ui/drawfunc/futext3.cxx?rev=1497286&r1=1497285&r2=1497286&view=diff
==============================================================================
--- openoffice/trunk/main/sc/source/ui/drawfunc/futext3.cxx (original)
+++ openoffice/trunk/main/sc/source/ui/drawfunc/futext3.cxx Thu Jun 27 10:23:24 2013
@@ -87,14 +87,18 @@ void FuText::StopEditMode(sal_Bool /*bTe
{
/* 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 /*bTe
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)
Modified: openoffice/trunk/main/sc/source/ui/view/drawview.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sc/source/ui/view/drawview.cxx?rev=1497286&r1=1497285&r2=1497286&view=diff
==============================================================================
--- openoffice/trunk/main/sc/source/ui/view/drawview.cxx (original)
+++ openoffice/trunk/main/sc/source/ui/view/drawview.cxx Thu Jun 27 10:23:24 2013
@@ -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
Modified: openoffice/trunk/main/sc/source/ui/view/viewfun6.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sc/source/ui/view/viewfun6.cxx?rev=1497286&r1=1497285&r2=1497286&view=diff
==============================================================================
--- openoffice/trunk/main/sc/source/ui/view/viewfun6.cxx (original)
+++ openoffice/trunk/main/sc/source/ui/view/viewfun6.cxx Thu Jun 27 10:23:24 2013
@@ -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)
Modified: openoffice/trunk/main/svx/inc/svx/svdmodel.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/inc/svx/svdmodel.hxx?rev=1497286&r1=1497285&r2=1497286&view=diff
==============================================================================
--- openoffice/trunk/main/svx/inc/svx/svdmodel.hxx (original)
+++ openoffice/trunk/main/svx/inc/svx/svdmodel.hxx Thu Jun 27 10:23:24 2013
@@ -219,6 +219,7 @@ protected:
sal_uInt32 nMaxUndoCount;
FASTBOOL bSaveNative;
sal_Bool bStarDrawPreviewMode;
+ bool mbDisableTextEditUsesCommonUndoManager;
//////////////////////////////////////////////////////////////////////////////
@@ -671,6 +672,9 @@ public:
void SetStarDrawPreviewMode(sal_Bool bPreview);
sal_Bool IsStarDrawPreviewMode() { return bStarDrawPreviewMode; }
+ bool GetDisableTextEditUsesCommonUndoManager() const { return mbDisableTextEditUsesCommonUndoManager; }
+ void SetDisableTextEditUsesCommonUndoManager(bool bNew) { mbDisableTextEditUsesCommonUndoManager = bNew; }
+
SotStorage* GetModelStorage() const { return pModelStorage; }
void SetModelStorage( SotStorage* pStor ) { pModelStorage = pStor; }
Modified: openoffice/trunk/main/svx/source/svdraw/svdedxv.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/svdraw/svdedxv.cxx?rev=1497286&r1=1497285&r2=1497286&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/svdraw/svdedxv.cxx (original)
+++ openoffice/trunk/main/svx/source/svdraw/svdedxv.cxx Thu Jun 27 10:23:24 2013
@@ -768,7 +768,7 @@ sal_Bool SdrObjEditView::SdrBeginTextEdi
if( mxSelectionController.is() )
mxSelectionController->onSelectionHasChanged();
- if(IsUndoEnabled())
+ if(IsUndoEnabled() && GetModel() && !GetModel()->GetDisableTextEditUsesCommonUndoManager())
{
SdrUndoManager* pSdrUndoManager = getSdrUndoManagerForEnhancedTextEdit();
@@ -854,7 +854,7 @@ SdrEndTextEditKind SdrObjEditView::SdrEn
SdrUndoManager* pUndoEditUndoManager = 0;
bool bNeedToUndoSavedRedoTextEdit(false);
- if(IsUndoEnabled() && GetModel() && pTEObj && pTEOutliner)
+ if(IsUndoEnabled() && GetModel() && pTEObj && pTEOutliner && !GetModel()->GetDisableTextEditUsesCommonUndoManager())
{
// change back the UndoManager to the remembered original one
::svl::IUndoManager* pOriginal = pTEOutliner->SetUndoManager(mpOldTextEditUndoManager);
Modified: openoffice/trunk/main/svx/source/svdraw/svdmodel.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/svdraw/svdmodel.cxx?rev=1497286&r1=1497285&r2=1497286&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/svdraw/svdmodel.cxx (original)
+++ openoffice/trunk/main/svx/source/svdraw/svdmodel.cxx Thu Jun 27 10:23:24 2013
@@ -171,7 +171,7 @@ void SdrModel::ImpCtor(SfxItemPool* pPoo
mbKernAsianPunctuation = sal_False;
mbAddExtLeading = sal_False;
mnHandoutPageCount = 0;
-
+ mbDisableTextEditUsesCommonUndoManager = false;
SvxAsianConfig aAsian;
mnCharCompressType = aAsian.GetCharDistanceCompression();
Modified: openoffice/trunk/main/svx/source/svdraw/svdundo.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/svdraw/svdundo.cxx?rev=1497286&r1=1497285&r2=1497286&view=diff
==============================================================================
--- openoffice/trunk/main/svx/source/svdraw/svdundo.cxx (original)
+++ openoffice/trunk/main/svx/source/svdraw/svdundo.cxx Thu Jun 27 10:23:24 2013
@@ -1164,7 +1164,7 @@ void SdrUndoObjSetText::Undo()
SdrText* pText = static_cast< SdrTextObj*>( pObj )->getText(mnText);
if( pText )
- pText->SetOutlinerParaObject(pText1);
+ static_cast< SdrTextObj* >( pObj )->NbcSetOutlinerParaObjectForText( pText1, pText );
pObj->SetEmptyPresObj( bEmptyPresObj );
pObj->ActionChanged();