summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/app/scmod.cxx11
-rw-r--r--sc/source/ui/docshell/docfunc.cxx9
-rw-r--r--sc/source/ui/docshell/docsh.cxx2
-rw-r--r--sc/source/ui/docshell/docsh4.cxx15
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx7
-rw-r--r--sc/source/ui/drawfunc/drawsh2.cxx2
-rw-r--r--sc/source/ui/drawfunc/drtxtob.cxx2
-rw-r--r--sc/source/ui/drawfunc/futext3.cxx2
-rw-r--r--sc/source/ui/inc/docsh.hxx5
-rw-r--r--sc/source/ui/inc/tabvwsh.hxx2
-rw-r--r--sc/source/ui/inc/undobase.hxx5
-rw-r--r--sc/source/ui/undo/undobase.cxx16
-rw-r--r--sc/source/ui/undo/undoblk.cxx5
-rw-r--r--sc/source/ui/undo/undoblk2.cxx20
-rw-r--r--sc/source/ui/undo/undoblk3.cxx29
-rw-r--r--sc/source/ui/undo/undotab.cxx5
-rw-r--r--sc/source/ui/undo/undoutil.cxx5
-rw-r--r--sc/source/ui/vba/vbaapplication.cxx5
-rw-r--r--sc/source/ui/view/auditsh.cxx2
-rw-r--r--sc/source/ui/view/dbfunc.cxx5
-rw-r--r--[-rwxr-xr-x]sc/source/ui/view/dbfunc3.cxx2
-rw-r--r--sc/source/ui/view/drawview.cxx2
-rw-r--r--sc/source/ui/view/editsh.cxx2
-rw-r--r--sc/source/ui/view/formatsh.cxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx2
-rw-r--r--sc/source/ui/view/pgbrksh.cxx2
-rw-r--r--sc/source/ui/view/pivotsh.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx4
-rw-r--r--sc/source/ui/view/tabvwsha.cxx87
-rw-r--r--sc/source/ui/view/tabvwshb.cxx95
-rw-r--r--sc/source/ui/view/tabvwshe.cxx4
-rw-r--r--sc/source/ui/view/tabvwshf.cxx2
-rw-r--r--sc/source/ui/view/viewfun3.cxx4
33 files changed, 182 insertions, 182 deletions
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index f7a02e1577f7..56cfb98afc9c 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -58,7 +58,6 @@
#include <vcl/status.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/request.hxx>
-#include <sfx2/macrconf.hxx>
#include <sfx2/printer.hxx>
#include <editeng/langitem.hxx>
#include <svtools/colorcfg.hxx>
@@ -391,20 +390,14 @@ void ScModule::Execute( SfxRequest& rReq )
{
String aMacroName =
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Template.Samples.ShowStyles"));
- SfxApplication* pApp = SFX_APP();
- pApp->EnterBasicCall();
- pApp->GetMacroConfig()->Call( NULL, aMacroName, pApp->GetBasicManager() );
- pApp->LeaveBasicCall();
+ SfxApplication::CallAppBasic( aMacroName );
}
break;
case SID_EURO_CONVERTER:
{
String aMacroName =
String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("Euro.ConvertRun.Main"));
- SfxApplication* pApp = SFX_APP();
- pApp->EnterBasicCall();
- pApp->GetMacroConfig()->Call( NULL, aMacroName, pApp->GetBasicManager() );
- pApp->LeaveBasicCall();
+ SfxApplication::CallAppBasic( aMacroName );
}
break;
case SID_AUTOSPELL_CHECK:
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 50d95fbd677d..5e4a9c97808a 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -1137,7 +1137,7 @@ bool ScDocFunc::ReplaceNote( const ScAddress& rPos, const String& rNoteText, con
if (aTester.IsEditable())
{
ScDrawLayer* pDrawLayer = rDoc.GetDrawLayer();
- SfxUndoManager* pUndoMgr = (pDrawLayer && rDoc.IsUndoEnabled()) ? rDocShell.GetUndoManager() : 0;
+ ::svl::IUndoManager* pUndoMgr = (pDrawLayer && rDoc.IsUndoEnabled()) ? rDocShell.GetUndoManager() : 0;
ScNoteData aOldData;
ScPostIt* pOldNote = rDoc.ReleaseNote( rPos );
@@ -1741,8 +1741,7 @@ BOOL ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
}
rDocShell.GetUndoManager()->LeaveListAction();
- SfxUndoManager* pMgr = rDocShell.GetUndoManager();
- pMgr->RemoveLastUndoAction();
+ rDocShell.GetUndoManager()->RemoveLastUndoAction();
delete pRefUndoDoc;
delete pUndoData;
@@ -2618,7 +2617,6 @@ script::ModuleInfo lcl_InitModuleInfo( SfxObjectShell& rDocSh, String& sModule )
void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String& sSource )
{
- SFX_APP()->EnterBasicCall();
SfxObjectShell& rDocSh = *rDoc.GetDocumentShell();
uno::Reference< script::XLibraryContainer > xLibContainer = rDocSh.GetBasicContainer();
DBG_ASSERT( xLibContainer.is(), "No BasicContainer!" );
@@ -2662,12 +2660,10 @@ void VBA_InsertModule( ScDocument& rDoc, SCTAB nTab, String& sModuleName, String
}
}
- SFX_APP()->LeaveBasicCall();
}
void VBA_DeleteModule( ScDocShell& rDocSh, String& sModuleName )
{
- SFX_APP()->EnterBasicCall();
uno::Reference< script::XLibraryContainer > xLibContainer = rDocSh.GetBasicContainer();
DBG_ASSERT( xLibContainer.is(), "No BasicContainer!" );
@@ -2689,7 +2685,6 @@ void VBA_DeleteModule( ScDocShell& rDocSh, String& sModuleName )
xVBAModuleInfo->removeModuleInfo( sModuleName );
}
- SFX_APP()->LeaveBasicCall();
}
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 901363785cc9..5d9af06a7d65 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -2581,7 +2581,7 @@ __EXPORT ScDocShell::~ScDocShell()
//------------------------------------------------------------------
-SfxUndoManager* __EXPORT ScDocShell::GetUndoManager()
+::svl::IUndoManager* __EXPORT ScDocShell::GetUndoManager()
{
return aDocument.GetUndoManager();
}
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 5de8b17b0598..dee4c3060578 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -108,6 +108,7 @@ using namespace ::com::sun::star;
#include "chgviset.hxx"
#include "reffact.hxx"
#include "chartlis.hxx"
+#include "chartpos.hxx"
#include "waitoff.hxx"
#include "tablink.hxx" // ScDocumentLoader statics
#include "drwlayer.hxx"
@@ -377,19 +378,11 @@ void ScDocShell::Execute( SfxRequest& rReq )
BOOL bOk = TRUE;
if ( !bAddRange && ( !bColInit || !bRowInit ) )
{
- // Spalten/Zeilenkoepfe testen wie in chartarr
+ ScChartPositioner aChartPositioner( &aDocument, nTab, nCol1,nRow1, nCol2,nRow2 );
if (!bColInit)
- {
- for (SCCOL i=nCol1; i<=nCol2 && bColHeaders; i++)
- if (aDocument.HasValueData( i, nRow1, nTab ))
- bColHeaders = FALSE;
- }
+ bColHeaders = aChartPositioner.HasColHeaders();
if (!bRowInit)
- {
- for (SCROW i=nRow1; i<=nRow2 && bRowHeaders; i++)
- if (aDocument.HasValueData( nCol1, i, nTab ))
- bRowHeaders = FALSE;
- }
+ bRowHeaders = aChartPositioner.HasRowHeaders();
//CHINA001 ScColRowLabelDlg aDlg( pParent, bRowHeaders, bColHeaders );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index 7fa31246275a..ba39316768b7 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -1392,7 +1392,8 @@ static ScTokenArray* lcl_convertToTokenArray(ScDocument* pSrcDoc, ScRange& rRang
// Only loop within the data area.
SCCOL nDataCol1 = nCol1, nDataCol2 = nCol2;
SCROW nDataRow1 = nRow1, nDataRow2 = nRow2;
- if (!pSrcDoc->ShrinkToDataArea(nTab, nDataCol1, nDataRow1, nDataCol2, nDataRow2))
+ bool bShrunk;
+ if (!pSrcDoc->ShrinkToUsedDataArea( bShrunk, nTab, nDataCol1, nDataRow1, nDataCol2, nDataRow2, false))
// no data within specified range.
continue;
@@ -1708,8 +1709,8 @@ ScExternalRefCache::TokenRef ScExternalRefManager::getSingleRefToken(
SCCOL nDataCol1 = 0, nDataCol2 = MAXCOL;
SCROW nDataRow1 = 0, nDataRow2 = MAXROW;
- pSrcDoc->ShrinkToDataArea(nTab, nDataCol1, nDataRow1, nDataCol2, nDataRow2);
- if (rCell.Col() < nDataCol1 || nDataCol2 < rCell.Col() || rCell.Row() < nDataRow1 || nDataRow2 < rCell.Row())
+ bool bData = pSrcDoc->ShrinkToDataArea(nTab, nDataCol1, nDataRow1, nDataCol2, nDataRow2);
+ if (!bData || rCell.Col() < nDataCol1 || nDataCol2 < rCell.Col() || rCell.Row() < nDataRow1 || nDataRow2 < rCell.Row())
{
// requested cell is outside the data area. Don't even bother caching
// this data, but add it to the cached range to prevent accessing the
diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx
index 7da571fc05a7..fc3ceadd3a92 100644
--- a/sc/source/ui/drawfunc/drawsh2.cxx
+++ b/sc/source/ui/drawfunc/drawsh2.cxx
@@ -68,7 +68,7 @@ ScDrawShell::ScDrawShell( ScViewData* pData ) :
pViewData( pData )
{
SetPool( &pViewData->GetScDrawView()->GetModel()->GetItemPool() );
- SfxUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
+ ::svl::IUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
SetUndoManager( pMgr );
if ( !pViewData->GetDocument()->IsUndoEnabled() )
{
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index a5159d8a8043..df1c82b17c40 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -127,7 +127,7 @@ ScDrawTextObjectBar::ScDrawTextObjectBar(ScViewData* pData) :
SetPool( pViewData->GetScDrawView()->GetDefaultAttr().GetPool() );
// UndoManager wird beim Umschalten in den Edit-Modus umgesetzt...
- SfxUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
+ ::svl::IUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
SetUndoManager( pMgr );
if ( !pViewData->GetDocument()->IsUndoEnabled() )
{
diff --git a/sc/source/ui/drawfunc/futext3.cxx b/sc/source/ui/drawfunc/futext3.cxx
index 534e68705fa8..1800dc53a744 100644
--- a/sc/source/ui/drawfunc/futext3.cxx
+++ b/sc/source/ui/drawfunc/futext3.cxx
@@ -85,7 +85,7 @@ void FuText::StopEditMode(BOOL /*bTextDirection*/)
}
ScDocShell* pDocShell = rViewData.GetDocShell();
- SfxUndoManager* pUndoMgr = rDoc.IsUndoEnabled() ? pDocShell->GetUndoManager() : 0;
+ ::svl::IUndoManager* pUndoMgr = rDoc.IsUndoEnabled() ? pDocShell->GetUndoManager() : 0;
bool bNewNote = false;
if( pNote && pUndoMgr )
{
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index fe94db107be0..132652891959 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -187,7 +187,8 @@ public:
virtual void Activate();
virtual void Deactivate();
- virtual SfxUndoManager* GetUndoManager();
+ virtual ::svl::IUndoManager*
+ GetUndoManager();
virtual void FillClass( SvGlobalName * pClassName,
sal_uInt32 * pFormat,
@@ -325,6 +326,8 @@ public:
void PostPaintGridAll();
void PostPaintExtras();
+ bool IsPaintLocked() const { return pPaintLockData != NULL; }
+
void PostDataChanged();
void UpdatePaintExt( USHORT& rExtFlags, SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index c3316092d044..69832218f172 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -346,7 +346,7 @@ public:
BOOL IsDrawTextShell() const;
BOOL IsAuditShell() const;
- void SetDrawTextUndo( SfxUndoManager* pUndoMgr );
+ void SetDrawTextUndo( ::svl::IUndoManager* pUndoMgr );
void FillFieldData( ScHeaderFieldData& rData );
diff --git a/sc/source/ui/inc/undobase.hxx b/sc/source/ui/inc/undobase.hxx
index 6f2bb3572832..ea7885b2859b 100644
--- a/sc/source/ui/inc/undobase.hxx
+++ b/sc/source/ui/inc/undobase.hxx
@@ -31,6 +31,7 @@
#include <svl/undo.hxx>
#include "global.hxx"
#include "address.hxx"
+#include "docsh.hxx"
class ScDocument;
class ScDocShell;
@@ -53,6 +54,10 @@ protected:
ScDocShell* pDocShell;
SfxUndoAction* pDetectiveUndo;
+ bool IsPaintLocked() const { return pDocShell->IsPaintLocked(); }
+
+ bool SetViewMarkData( const ScMarkData& rMarkData );
+
void BeginUndo();
void EndUndo();
void BeginRedo();
diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx
index fffb76ebd061..793b416fbee4 100644
--- a/sc/source/ui/undo/undobase.cxx
+++ b/sc/source/ui/undo/undobase.cxx
@@ -66,6 +66,19 @@ __EXPORT ScSimpleUndo::~ScSimpleUndo()
delete pDetectiveUndo;
}
+bool ScSimpleUndo::SetViewMarkData( const ScMarkData& rMarkData )
+{
+ if ( IsPaintLocked() )
+ return false;
+
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
+ if ( !pViewShell )
+ return false;
+
+ pViewShell->SetMarkData( rMarkData );
+ return true;
+}
+
BOOL __EXPORT ScSimpleUndo::Merge( SfxUndoAction *pNextAction )
{
// Zu jeder Undo-Action kann eine SdrUndoGroup fuer das Aktualisieren
@@ -253,6 +266,9 @@ BOOL ScBlockUndo::AdjustHeight()
void ScBlockUndo::ShowBlock()
{
+ if ( IsPaintLocked() )
+ return;
+
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
{
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index 3fb2c74a9954..556cd3c82d93 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -1600,10 +1600,8 @@ String __EXPORT ScUndoSelectionStyle::GetComment() const
void ScUndoSelectionStyle::DoChange( const BOOL bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
ScRange aWorkRange( aRange );
if ( pDoc->HasAttrib( aWorkRange, HASATTR_MERGED ) ) // zusammengefasste Zellen?
@@ -1635,6 +1633,7 @@ void ScUndoSelectionStyle::DoChange( const BOOL bUndo )
pDocShell->UpdatePaintExt( nExtFlags, aWorkRange );
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if ( !( (pViewShell) && pViewShell->AdjustBlockHeight() ) )
/*A*/ pDocShell->PostPaint( aWorkRange, PAINT_GRID | PAINT_EXTRAS, nExtFlags );
diff --git a/sc/source/ui/undo/undoblk2.cxx b/sc/source/ui/undo/undoblk2.cxx
index 2ab03eb71923..a7ddfaf6f23f 100644
--- a/sc/source/ui/undo/undoblk2.cxx
+++ b/sc/source/ui/undo/undoblk2.cxx
@@ -113,18 +113,13 @@ void __EXPORT ScUndoWidthOrHeight::Undo()
BeginUndo();
ScDocument* pDoc = pDocShell->GetDocument();
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
SCCOLROW nPaintStart = nStart > 0 ? nStart-1 : static_cast<SCCOLROW>(0);
if (eMode==SC_SIZE_OPTIMAL)
{
- if (pViewShell)
- {
- pViewShell->SetMarkData( aMarkData );
-
+ if ( SetViewMarkData( aMarkData ) )
nPaintStart = 0; // paint all, because of changed selection
- }
}
//! outlines from all tables?
@@ -155,6 +150,7 @@ void __EXPORT ScUndoWidthOrHeight::Undo()
DoSdrUndoAction( pDrawUndo, pDoc );
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
{
pViewShell->UpdateScrollBars();
@@ -171,19 +167,14 @@ void __EXPORT ScUndoWidthOrHeight::Redo()
{
BeginRedo();
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
-
BOOL bPaintAll = FALSE;
if (eMode==SC_SIZE_OPTIMAL)
{
- if (pViewShell)
- {
- pViewShell->SetMarkData( aMarkData );
-
+ if ( SetViewMarkData( aMarkData ) )
bPaintAll = TRUE; // paint all, because of changed selection
- }
}
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
{
SCTAB nTab = pViewShell->GetViewData()->GetTabNo();
@@ -192,7 +183,8 @@ void __EXPORT ScUndoWidthOrHeight::Redo()
}
// SetWidthOrHeight aendert aktuelle Tabelle !
- pViewShell->SetWidthOrHeight( bWidth, nRangeCnt, pRanges, eMode, nNewSize, FALSE, TRUE, &aMarkData );
+ if ( pViewShell )
+ pViewShell->SetWidthOrHeight( bWidth, nRangeCnt, pRanges, eMode, nNewSize, FALSE, TRUE, &aMarkData );
// paint grid if selection was changed directly at the MarkData
if (bPaintAll)
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 506afeac138e..6a9c7e12af23 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -147,10 +147,8 @@ void ScUndoDeleteContents::SetChangeTrack()
void ScUndoDeleteContents::DoChange( const BOOL bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
USHORT nExtFlags = 0;
@@ -195,6 +193,7 @@ void ScUndoDeleteContents::DoChange( const BOOL bUndo )
SetChangeTrack();
}
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if ( !( (pViewShell) && pViewShell->AdjustRowHeight(
aRange.aStart.Row(), aRange.aEnd.Row() ) ) )
/*A*/ pDocShell->PostPaint( aRange, PAINT_GRID | PAINT_EXTRAS, nExtFlags );
@@ -341,10 +340,8 @@ void ScUndoFillTable::SetChangeTrack()
void ScUndoFillTable::DoChange( const BOOL bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
if (bUndo) // nur Undo
{
@@ -379,6 +376,7 @@ void ScUndoFillTable::DoChange( const BOOL bUndo )
// CellContentChanged kommt mit der Markierung
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
{
SCTAB nTab = pViewShell->GetViewData()->GetTabNo();
@@ -485,10 +483,8 @@ String __EXPORT ScUndoSelectionAttr::GetComment() const
void ScUndoSelectionAttr::DoChange( const BOOL bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
ScRange aEffRange( aRange );
if ( pDoc->HasAttrib( aEffRange, HASATTR_MERGED ) ) // zusammengefasste Zellen?
@@ -515,6 +511,7 @@ void ScUndoSelectionAttr::DoChange( const BOOL bUndo )
pDoc->ApplySelectionFrame( aMarkData, pLineOuter, pLineInner );
}
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if ( !( (pViewShell) && pViewShell->AdjustBlockHeight() ) )
/*A*/ pDocShell->PostPaint( aEffRange, PAINT_GRID | PAINT_EXTRAS, nExtFlags );
@@ -1165,8 +1162,7 @@ void __EXPORT ScUndoReplace::Undo()
DBG_ASSERT(pSearchItem->GetCommand() == SVX_SEARCHCMD_REPLACE_ALL,
"ScUndoReplace:: Falscher Modus");
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
//! markierte Tabellen
//! Bereich merken ?
@@ -1243,7 +1239,7 @@ void __EXPORT ScUndoReplace::Redo()
{
if (pViewShell)
{
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
pViewShell->SearchAndReplace( pSearchItem, FALSE, TRUE );
}
@@ -1466,9 +1462,7 @@ void ScUndoConversion::DoChange( ScDocument* pRefDoc, const ScAddress& rCursorPo
ScDocument* pDoc = pDocShell->GetDocument();
ShowTable( rCursorPos.Tab() );
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
SCTAB nTabCount = pDoc->GetTableCount();
// Undo/Redo-doc has only selected tables
@@ -1575,9 +1569,7 @@ void ScUndoRefConversion::DoChange( ScDocument* pRefDoc)
ShowTable(aRange);
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
ScRange aCopyRange = aRange;
SCTAB nTabCount = pDoc->GetTableCount();
@@ -1586,6 +1578,7 @@ void ScUndoRefConversion::DoChange( ScDocument* pRefDoc)
pRefDoc->CopyToDocument( aCopyRange, nFlags, bMulti, pDoc, &aMarkData );
pDocShell->PostPaint( aRange, PAINT_GRID);
pDocShell->PostDataChanged();
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
pViewShell->CellContentChanged();
}
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index d9acc34bf28c..c6cce0bee4bd 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -891,9 +891,7 @@ void ScUndoMakeScenario::Undo()
void ScUndoMakeScenario::Redo()
{
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
RedoSdrUndoAction( pDrawUndo ); // Draw Redo first
@@ -905,6 +903,7 @@ void ScUndoMakeScenario::Redo()
bDrawIsInUndo = FALSE;
pDocShell->SetInUndo( FALSE );
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
pViewShell->SetTabNo( nDestTab, TRUE );
diff --git a/sc/source/ui/undo/undoutil.cxx b/sc/source/ui/undo/undoutil.cxx
index 168975cdda3a..9cd32381c8a5 100644
--- a/sc/source/ui/undo/undoutil.cxx
+++ b/sc/source/ui/undo/undoutil.cxx
@@ -43,10 +43,13 @@
#include "globstr.hrc"
#include "global.hxx"
-void ScUndoUtil::MarkSimpleBlock( ScDocShell* /* pDocShell */,
+void ScUndoUtil::MarkSimpleBlock( ScDocShell* pDocShell,
SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ )
{
+ if ( pDocShell->IsPaintLocked() )
+ return;
+
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
{
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index 30d4bd4d39a0..290b34a949ca 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -481,7 +481,6 @@ void SAL_CALL
ScVbaApplication::wait( double time ) throw (uno::RuntimeException)
{
StarBASIC* pBasic = SFX_APP()->GetBasic();
- SFX_APP()->EnterBasicCall();
SbxArrayRef aArgs = new SbxArray;
SbxVariableRef aRef = new SbxVariable;
aRef->PutDouble( time );
@@ -495,8 +494,6 @@ ScVbaApplication::wait( double time ) throw (uno::RuntimeException)
// forces a broadcast
SbxVariableRef pNew = new SbxMethod( *((SbxMethod*)pMeth));
}
- SFX_APP()->LeaveBasicCall();
-
}
uno::Any SAL_CALL
@@ -1164,7 +1161,6 @@ uno::Any SAL_CALL
ScVbaApplication::Caller( const uno::Any& /*aIndex*/ ) throw ( uno::RuntimeException )
{
StarBASIC* pBasic = SFX_APP()->GetBasic();
- SFX_APP()->EnterBasicCall();
SbMethod* pMeth = (SbMethod*)pBasic->GetRtl()->Find( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FuncCaller") ), SbxCLASS_METHOD );
uno::Any aRet;
if ( pMeth )
@@ -1175,7 +1171,6 @@ ScVbaApplication::Caller( const uno::Any& /*aIndex*/ ) throw ( uno::RuntimeExcep
OSL_TRACE("pNew has type %d and string value %s", pNew->GetType(), rtl::OUStringToOString( pNew->GetString(), RTL_TEXTENCODING_UTF8 ).getStr() );
aRet = sbxToUnoValue( pNew );
}
- SFX_APP()->LeaveBasicCall();
return aRet;
}
diff --git a/sc/source/ui/view/auditsh.cxx b/sc/source/ui/view/auditsh.cxx
index 2c80c154759d..ea081b6f2fa6 100644
--- a/sc/source/ui/view/auditsh.cxx
+++ b/sc/source/ui/view/auditsh.cxx
@@ -68,7 +68,7 @@ ScAuditingShell::ScAuditingShell(ScViewData* pData) :
nFunction( SID_FILL_ADD_PRED )
{
SetPool( &pViewData->GetViewShell()->GetPool() );
- SfxUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
+ ::svl::IUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
SetUndoManager( pMgr );
if ( !pViewData->GetDocument()->IsUndoEnabled() )
{
diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx
index 1e5a6b9da4ae..f2a277b987df 100644
--- a/sc/source/ui/view/dbfunc.cxx
+++ b/sc/source/ui/view/dbfunc.cxx
@@ -159,7 +159,10 @@ ScDBData* ScDBFunc::GetDBData( BOOL bMark, ScGetDBMode eMode, ScGetDBSelection e
ScDocument* pDoc = pDocSh->GetDocument();
SCCOL nCol1 = aRange.aStart.Col(), nCol2 = aRange.aEnd.Col();
SCROW nRow1 = aRange.aStart.Row(), nRow2 = aRange.aEnd.Row();
- if (pDoc->ShrinkToUsedDataArea( aRange.aStart.Tab(), nCol1, nRow1, nCol2, nRow2, bShrinkColumnsOnly))
+ bool bShrunk;
+ pDoc->ShrinkToUsedDataArea( bShrunk, aRange.aStart.Tab(),
+ nCol1, nRow1, nCol2, nRow2, bShrinkColumnsOnly);
+ if (bShrunk)
{
aRange.aStart.SetCol(nCol1);
aRange.aEnd.SetCol(nCol2);
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index dbdeae1ae0b1..1ac653f88b70 100755..100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -2187,7 +2187,7 @@ void ScDBFunc::ShowDataPilotSourceData( ScDPObject& rDPObj, const Sequence<sheet
pInsDoc->GetCellArea( nNewTab, nEndCol, nEndRow );
pInsDoc->SetClipArea( ScRange( 0, 0, nNewTab, nEndCol, nEndRow, nNewTab ) );
- SfxUndoManager* pMgr = GetViewData()->GetDocShell()->GetUndoManager();
+ ::svl::IUndoManager* pMgr = GetViewData()->GetDocShell()->GetUndoManager();
String aUndo = ScGlobal::GetRscString( STR_UNDO_DOOUTLINE );
pMgr->EnterListAction( aUndo, aUndo );
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index 3307398b5ef8..1d748246a1d6 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -763,7 +763,7 @@ void ScDrawView::DeleteMarked()
(void)pCaptObj; // prevent 'unused variable' compiler warning in pro builds
ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
ScDocShell* pDocShell = pViewData ? pViewData->GetDocShell() : 0;
- SfxUndoManager* pUndoMgr = pDocShell ? pDocShell->GetUndoManager() : 0;
+ ::svl::IUndoManager* pUndoMgr = pDocShell ? pDocShell->GetUndoManager() : 0;
bool bUndo = pDrawLayer && pDocShell && pUndoMgr && pDoc->IsUndoEnabled();
// remove the cell note from document, we are its owner now
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 848a0a3c7636..269017804c3c 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -1174,7 +1174,7 @@ void ScEditShell::GetUndoState(SfxItemSet &rSet)
EditView* pTopView = pHdl->GetTopView();
if (pTopView)
{
- SfxUndoManager& rTopMgr = pTopView->GetEditEngine()->GetUndoManager();
+ ::svl::IUndoManager& rTopMgr = pTopView->GetEditEngine()->GetUndoManager();
if ( rTopMgr.GetUndoActionCount() == 0 )
rSet.DisableItem( SID_UNDO );
if ( rTopMgr.GetRedoActionCount() == 0 )
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 3ff7222178f3..377ebed987f2 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -161,7 +161,7 @@ ScFormatShell::ScFormatShell(ScViewData* pData) :
ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
SetPool( &pTabViewShell->GetPool() );
- SfxUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
+ ::svl::IUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
SetUndoManager( pMgr );
if ( !pViewData->GetDocument()->IsUndoEnabled() )
{
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 0f07b8772254..d7f0be025574 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -1884,7 +1884,7 @@ void __EXPORT ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
if (nMouseStatus == SC_GM_WATERUNDO) // Undo im Giesskannenmodus
{
- SfxUndoManager* pMgr = pViewData->GetDocShell()->GetUndoManager();
+ ::svl::IUndoManager* pMgr = pViewData->GetDocShell()->GetUndoManager();
if ( pMgr->GetUndoActionCount() && pMgr->GetUndoActionId() == STR_UNDO_APPLYCELLSTYLE )
pMgr->Undo();
else
diff --git a/sc/source/ui/view/pgbrksh.cxx b/sc/source/ui/view/pgbrksh.cxx
index 0e792b2bb279..d5e3450f3e5a 100644
--- a/sc/source/ui/view/pgbrksh.cxx
+++ b/sc/source/ui/view/pgbrksh.cxx
@@ -67,7 +67,7 @@ ScPageBreakShell::ScPageBreakShell( ScTabViewShell* pViewSh ) :
{
SetPool( &pViewSh->GetPool() );
ScViewData* pViewData = pViewSh->GetViewData();
- SfxUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
+ ::svl::IUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
SetUndoManager( pMgr );
if ( !pViewData->GetDocument()->IsUndoEnabled() )
{
diff --git a/sc/source/ui/view/pivotsh.cxx b/sc/source/ui/view/pivotsh.cxx
index a65f86ffed2c..b7f2e2234438 100644
--- a/sc/source/ui/view/pivotsh.cxx
+++ b/sc/source/ui/view/pivotsh.cxx
@@ -76,7 +76,7 @@ ScPivotShell::ScPivotShell( ScTabViewShell* pViewSh ) :
{
SetPool( &pViewSh->GetPool() );
ScViewData* pViewData = pViewSh->GetViewData();
- SfxUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
+ ::svl::IUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
SetUndoManager( pMgr );
if ( !pViewData->GetDocument()->IsUndoEnabled() )
{
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 4596880b7fb6..f23ed39b34c5 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -1116,7 +1116,7 @@ BOOL ScTabViewShell::IsAuditShell() const
return ( pAuditingShell && ( GetMySubShell() == pAuditingShell ) );
}
-void ScTabViewShell::SetDrawTextUndo( SfxUndoManager* pNewUndoMgr )
+void ScTabViewShell::SetDrawTextUndo( ::svl::IUndoManager* pNewUndoMgr )
{
// Default: Undo-Manager der DocShell
if (!pNewUndoMgr)
@@ -1640,7 +1640,7 @@ void ScTabViewShell::Construct( BYTE nForceDesignMode )
MakeDrawView( nForceDesignMode );
ViewOptionsHasChanged(FALSE); // legt auch evtl. DrawView an
- SfxUndoManager* pMgr = pDocSh->GetUndoManager();
+ ::svl::IUndoManager* pMgr = pDocSh->GetUndoManager();
SetUndoManager( pMgr );
pFormShell->SetUndoManager( pMgr );
if ( !pDoc->IsUndoEnabled() )
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 7734f3e24ff8..9700fe3dca3f 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -34,7 +34,6 @@
#define _ZFORLIST_DECLARE_TABLE
#include "scitems.hxx"
-#include <svl/slstitm.hxx>
#include <svl/stritem.hxx>
#include <svl/whiter.hxx>
#include <svl/zformat.hxx>
@@ -738,92 +737,6 @@ void __EXPORT ScTabViewShell::GetSaveState( SfxItemSet& rSet )
//------------------------------------------------------------------
-void ScTabViewShell::ExecuteUndo(SfxRequest& rReq)
-{
- SfxShell* pSh = GetViewData()->GetDispatcher().GetShell(0);
- SfxUndoManager* pUndoManager = pSh->GetUndoManager();
-
- const SfxItemSet* pReqArgs = rReq.GetArgs();
- ScDocShell* pDocSh = GetViewData()->GetDocShell();
-
- USHORT nSlot = rReq.GetSlot();
- switch ( nSlot )
- {
- case SID_UNDO:
- case SID_REDO:
- if ( pUndoManager )
- {
- BOOL bIsUndo = ( nSlot == SID_UNDO );
-
- USHORT nCount = 1;
- const SfxPoolItem* pItem;
- if ( pReqArgs && pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET )
- nCount = ((const SfxUInt16Item*)pItem)->GetValue();
-
- // lock paint for more than one cell undo action (not for editing within a cell)
- BOOL bLockPaint = ( nCount > 1 && pUndoManager == GetUndoManager() );
- if ( bLockPaint )
- pDocSh->LockPaint();
-
- for (USHORT i=0; i<nCount; i++)
- {
- if ( bIsUndo )
- pUndoManager->Undo(0);
- else
- pUndoManager->Redo(0);
- }
-
- if ( bLockPaint )
- pDocSh->UnlockPaint();
-
- GetViewFrame()->GetBindings().InvalidateAll(sal_False);
- }
- break;
-// default:
-// GetViewFrame()->ExecuteSlot( rReq );
- }
-}
-
-void ScTabViewShell::GetUndoState(SfxItemSet &rSet)
-{
- SfxShell* pSh = GetViewData()->GetDispatcher().GetShell(0);
- SfxUndoManager* pUndoManager = pSh->GetUndoManager();
-
- SfxWhichIter aIter(rSet);
- USHORT nWhich = aIter.FirstWhich();
- while ( nWhich )
- {
- switch (nWhich)
- {
- case SID_GETUNDOSTRINGS:
- case SID_GETREDOSTRINGS:
- {
- SfxStringListItem aStrLst( nWhich );
- if ( pUndoManager )
- {
- List* pList = aStrLst.GetList();
- BOOL bIsUndo = ( nWhich == SID_GETUNDOSTRINGS );
- USHORT nCount = bIsUndo ? pUndoManager->GetUndoActionCount() : pUndoManager->GetRedoActionCount();
- for (USHORT i=0; i<nCount; i++)
- pList->Insert( new String( bIsUndo ? pUndoManager->GetUndoActionComment(i) :
- pUndoManager->GetRedoActionComment(i) ),
- LIST_APPEND );
- }
- rSet.Put( aStrLst );
- }
- break;
- default:
- // get state from sfx view frame
- GetViewFrame()->GetSlotState( nWhich, NULL, &rSet );
- }
-
- nWhich = aIter.NextWhich();
- }
-}
-
-
-//------------------------------------------------------------------
-
void ScTabViewShell::ExecDrawOpt( SfxRequest& rReq )
{
ScViewOptions aViewOptions = GetViewData()->GetOptions();
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index c6d9b004b9ba..b13707a8378b 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -61,9 +61,11 @@
#include <sfx2/viewfrm.hxx>
#include <svtools/soerr.hxx>
#include <svl/rectitem.hxx>
+#include <svl/slstitm.hxx>
#include <svl/whiter.hxx>
#include <unotools/moduleoptions.hxx>
#include <sot/exchange.hxx>
+#include <tools/diagnose_ex.h>
#include "tabvwsh.hxx"
#include "globstr.hrc"
@@ -487,5 +489,98 @@ void ScTabViewShell::GetDrawInsState(SfxItemSet &rSet)
}
+//------------------------------------------------------------------
+
+void ScTabViewShell::ExecuteUndo(SfxRequest& rReq)
+{
+ SfxShell* pSh = GetViewData()->GetDispatcher().GetShell(0);
+ ::svl::IUndoManager* pUndoManager = pSh->GetUndoManager();
+
+ const SfxItemSet* pReqArgs = rReq.GetArgs();
+ ScDocShell* pDocSh = GetViewData()->GetDocShell();
+
+ USHORT nSlot = rReq.GetSlot();
+ switch ( nSlot )
+ {
+ case SID_UNDO:
+ case SID_REDO:
+ if ( pUndoManager )
+ {
+ BOOL bIsUndo = ( nSlot == SID_UNDO );
+
+ USHORT nCount = 1;
+ const SfxPoolItem* pItem;
+ if ( pReqArgs && pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET )
+ nCount = ((const SfxUInt16Item*)pItem)->GetValue();
+
+ // lock paint for more than one cell undo action (not for editing within a cell)
+ BOOL bLockPaint = ( nCount > 1 && pUndoManager == GetUndoManager() );
+ if ( bLockPaint )
+ pDocSh->LockPaint();
+
+ try
+ {
+ for (USHORT i=0; i<nCount; i++)
+ {
+ if ( bIsUndo )
+ pUndoManager->Undo();
+ else
+ pUndoManager->Redo();
+ }
+ }
+ catch ( const uno::Exception& )
+ {
+ // no need to handle. By definition, the UndoManager handled this by clearing the
+ // Undo/Redo stacks
+ }
+
+ if ( bLockPaint )
+ pDocSh->UnlockPaint();
+
+ GetViewFrame()->GetBindings().InvalidateAll(sal_False);
+ }
+ break;
+// default:
+// GetViewFrame()->ExecuteSlot( rReq );
+ }
+}
+
+void ScTabViewShell::GetUndoState(SfxItemSet &rSet)
+{
+ SfxShell* pSh = GetViewData()->GetDispatcher().GetShell(0);
+ ::svl::IUndoManager* pUndoManager = pSh->GetUndoManager();
+
+ SfxWhichIter aIter(rSet);
+ USHORT nWhich = aIter.FirstWhich();
+ while ( nWhich )
+ {
+ switch (nWhich)
+ {
+ case SID_GETUNDOSTRINGS:
+ case SID_GETREDOSTRINGS:
+ {
+ SfxStringListItem aStrLst( nWhich );
+ if ( pUndoManager )
+ {
+ List* pList = aStrLst.GetList();
+ BOOL bIsUndo = ( nWhich == SID_GETUNDOSTRINGS );
+ size_t nCount = bIsUndo ? pUndoManager->GetUndoActionCount() : pUndoManager->GetRedoActionCount();
+ for (size_t i=0; i<nCount; i++)
+ pList->Insert( new String( bIsUndo ? pUndoManager->GetUndoActionComment(i) :
+ pUndoManager->GetRedoActionComment(i) ),
+ LIST_APPEND );
+ }
+ rSet.Put( aStrLst );
+ }
+ break;
+ default:
+ // get state from sfx view frame
+ GetViewFrame()->GetSlotState( nWhich, NULL, &rSet );
+ }
+
+ nWhich = aIter.NextWhich();
+ }
+}
+
diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx
index c0af39226c3f..6034ac81ecba 100644
--- a/sc/source/ui/view/tabvwshe.cxx
+++ b/sc/source/ui/view/tabvwshe.cxx
@@ -97,7 +97,9 @@ String __EXPORT ScTabViewShell::GetSelectionText( BOOL bWholeWord )
SCROW nRow1, nRow2;
SCTAB nTab1, nTab2;
aRange.GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
- if (pDoc->ShrinkToUsedDataArea( nTab1, nCol1, nRow1, nCol2, nRow2, false))
+ bool bShrunk;
+ pDoc->ShrinkToUsedDataArea( bShrunk, nTab1, nCol1, nRow1, nCol2, nRow2, false);
+ if (bShrunk)
{
aRange.aStart.SetCol( nCol1 );
aRange.aStart.SetRow( nRow1 );
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 37c1b0ab1e84..b192182a26aa 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -675,7 +675,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
{
// handle several sheets
- SfxUndoManager* pUndoManager = pDocSh->GetUndoManager();
+ ::svl::IUndoManager* pUndoManager = pDocSh->GetUndoManager();
String aUndo = ScGlobal::GetRscString( STR_UNDO_TAB_RTL );
pUndoManager->EnterListAction( aUndo, aUndo );
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index f7a126c2dac8..0dc77a19121c 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -1009,7 +1009,7 @@ BOOL ScViewFunc::PasteFromClip( USHORT nFlags, ScDocument* pClipDoc,
ScDocument* pDoc = GetViewData()->GetDocument();
ScDocShell* pDocSh = GetViewData()->GetDocShell();
ScMarkData& rMark = GetViewData()->GetMarkData();
- SfxUndoManager* pUndoMgr = pDocSh->GetUndoManager();
+ ::svl::IUndoManager* pUndoMgr = pDocSh->GetUndoManager();
const BOOL bRecord(pDoc->IsUndoEnabled());
ScDocShellModificator aModificator( *pDocSh );
@@ -1635,7 +1635,7 @@ bool ScViewFunc::PasteMultiRangesFromClip(
if (pDoc->IsUndoEnabled())
{
- SfxUndoManager* pUndoMgr = pDocSh->GetUndoManager();
+ ::svl::IUndoManager* pUndoMgr = pDocSh->GetUndoManager();
String aUndo = ScGlobal::GetRscString(
pClipDoc->IsCutMode() ? STR_UNDO_CUT : STR_UNDO_COPY);
pUndoMgr->EnterListAction(aUndo, aUndo);