summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2011-02-03 15:53:56 +0100
committerMathias Bauer <mba@openoffice.org>2011-02-03 15:53:56 +0100
commit865034108866bf3e1982d66a1e7f1f420ed0eebb (patch)
treed38af920368a2693af9de274ab0368634a44a61f
parent911d360e2a4a723a46d729a2bb5eea1596a07c1c (diff)
parent1a0a7970636e093d015267b828ecd8d5c2543541 (diff)
CWS gnumake3: resync to m99
-rwxr-xr-x[-rw-r--r--]sd/inc/undo/undomanager.hxx14
-rwxr-xr-xsd/source/core/drawdoc3.cxx6
-rwxr-xr-xsd/source/core/sdpage.cxx26
-rwxr-xr-x[-rw-r--r--]sd/source/core/undo/undomanager.cxx39
-rwxr-xr-xsd/source/ui/animations/CustomAnimationPane.cxx4
-rwxr-xr-xsd/source/ui/animations/SlideTransitionPane.cxx6
-rw-r--r--sd/source/ui/app/app.img120
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/LayerTabBar.cxx2
-rwxr-xr-xsd/source/ui/dlg/dlgass.cxx2
-rwxr-xr-xsd/source/ui/docshell/docshell.cxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fubullet.cxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fuoaprms.cxx2
-rwxr-xr-xsd/source/ui/func/fupage.cxx2
-rwxr-xr-xsd/source/ui/inc/DrawDocShell.hxx4
-rwxr-xr-xsd/source/ui/inc/SlideSorterViewShell.hxx2
-rwxr-xr-xsd/source/ui/inc/ViewShell.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/unmodpg.hxx4
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSlotManager.cxx4
-rwxr-xr-xsd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx2
-rwxr-xr-xsd/source/ui/toolpanel/controls/DocumentHelper.cxx4
-rwxr-xr-xsd/source/ui/view/ViewShellImplementation.cxx4
-rwxr-xr-xsd/source/ui/view/ViewShellManager.cxx4
-rwxr-xr-xsd/source/ui/view/drviews2.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drviewsb.cxx6
-rwxr-xr-xsd/source/ui/view/outlview.cxx50
-rwxr-xr-xsd/source/ui/view/sdview.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/unmodpg.cxx4
-rw-r--r--sd/source/ui/view/viewshe3.cxx4
-rwxr-xr-xsd/source/ui/view/viewshel.cxx43
29 files changed, 113 insertions, 259 deletions
diff --git a/sd/inc/undo/undomanager.hxx b/sd/inc/undo/undomanager.hxx
index b2e40c1e7442..708a05390f12 100644..100755
--- a/sd/inc/undo/undomanager.hxx
+++ b/sd/inc/undo/undomanager.hxx
@@ -40,31 +40,21 @@ public:
UndoManager( USHORT nMaxUndoActionCount = 20 );
virtual void EnterListAction(const UniString &rComment, const UniString& rRepeatComment, USHORT nId=0);
- virtual void LeaveListAction();
virtual void AddUndoAction( SfxUndoAction *pAction, BOOL bTryMerg=FALSE );
- bool isInListAction() const { return mnListLevel != 0; }
- bool isInUndo() const { return maIsInUndoLock.isLocked(); }
-
- virtual BOOL Undo( USHORT nCount=1 );
- virtual BOOL Redo( USHORT nCount=1 );
-
/** Set or reset the undo manager linked with the called undo manager.
*/
- void SetLinkedUndoManager (SfxUndoManager* pLinkedUndoManager);
+ void SetLinkedUndoManager (::svl::IUndoManager* pLinkedUndoManager);
private:
using SfxUndoManager::Undo;
using SfxUndoManager::Redo;
- int mnListLevel;
- ScopeLock maIsInUndoLock;
-
/** Used when the outline view is visible as a last resort to
synchronize the undo managers.
*/
- SfxUndoManager* mpLinkedUndoManager;
+ ::svl::IUndoManager* mpLinkedUndoManager;
/** Call ClearRedo() at the linked undo manager, when present.
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index 025700a790fc..43e44ce1e70f 100755
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -535,7 +535,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
|* den Seiten transferieren, sonst verlieren die Textobjekte
|* beim Transfer den Bezug zur Vorlage
\*************************************************************************/
- SfxUndoManager* pUndoMgr = NULL;
+ ::svl::IUndoManager* pUndoMgr = NULL;
if( mpDocSh )
{
pUndoMgr = mpDocSh->GetUndoManager();
@@ -1356,7 +1356,7 @@ SvStream* SdDrawDocument::GetDocumentStream(SdrDocumentStreamInfo& rStreamInfo)
void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, BOOL bOnlyDuplicatePages, BOOL bUndo)
{
::sd::View* pView = NULL;
- SfxUndoManager* pUndoMgr = NULL;
+ ::svl::IUndoManager* pUndoMgr = NULL;
if( bUndo && !IsUndoEnabled() )
bUndo = FALSE;
@@ -1525,7 +1525,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum,
if( mpDocSh )
mpDocSh->SetWaitCursor( TRUE );
- SfxUndoManager* pUndoMgr = mpDocSh->GetUndoManager();
+ ::svl::IUndoManager* pUndoMgr = mpDocSh->GetUndoManager();
const bool bUndo = IsUndoEnabled();
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index e045437d37b1..c52cd24270ee 100755
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -251,8 +251,8 @@ void SdPage::EnsureMasterPageDefaultBackground()
*/
SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rectangle& rRect, BOOL /* bInsert */ )
{
- sd::UndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
- const bool bUndo = pUndoManager && pUndoManager->isInListAction() && IsInserted();
+ ::svl::IUndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
+ const bool bUndo = pUndoManager && pUndoManager->IsInListAction() && IsInserted();
SdrObject* pSdrObj = NULL;
@@ -716,10 +716,10 @@ void SdPage::Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectang
{
if( pObj->GetUserCall() )
{
- sd::UndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
- const bool bUndo = pUndoManager && pUndoManager->isInListAction() && IsInserted();
+ ::svl::IUndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
+ const bool bUndo = pUndoManager && pUndoManager->IsInListAction() && IsInserted();
/*
- DBG_ASSERT( bUndo || (pUndoManager && pUndoManager->isInUndo()),
+ DBG_ASSERT( bUndo || (pUndoManager && pUndoManager->IsDoing()),
"SdPage::Changed(), model change without undo!?" );
*/
if( bUndo )
@@ -767,8 +767,8 @@ void SdPage::Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectang
void SdPage::CreateTitleAndLayout(BOOL bInit, BOOL bCreate )
{
- sd::UndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
- const bool bUndo = pUndoManager && pUndoManager->isInListAction() && IsInserted();
+ ::svl::IUndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
+ const bool bUndo = pUndoManager && pUndoManager->IsInListAction() && IsInserted();
SdPage* pMasterPage = this;
@@ -1554,8 +1554,8 @@ void SdPage::SetAutoLayout(AutoLayout eLayout, BOOL bInit, BOOL bCreate )
const bool bSwitchLayout = eLayout != GetAutoLayout();
- sd::UndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
- const bool bUndo = pUndoManager && pUndoManager->isInListAction() && IsInserted();
+ ::svl::IUndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
+ const bool bUndo = pUndoManager && pUndoManager->IsInListAction() && IsInserted();
meAutoLayout = eLayout;
@@ -2112,8 +2112,8 @@ SdrObject* convertPresentationObjectImpl( SdPage& rPage, SdrObject* pSourceObj,
if( !pModel || !pSourceObj )
return pSourceObj;
- sd::UndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
- const bool bUndo = pUndoManager && pUndoManager->isInListAction() && rPage.IsInserted();
+ ::svl::IUndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
+ const bool bUndo = pUndoManager && pUndoManager->IsInListAction() && rPage.IsInserted();
SdrObject* pNewObj = pSourceObj;
if((eObjKind == PRESOBJ_OUTLINE) && (pSourceObj->GetObjIdentifier() == OBJ_TEXT) )
@@ -2252,8 +2252,8 @@ SdrObject* convertPresentationObjectImpl( SdPage& rPage, SdrObject* pSourceObj,
*/
SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind, bool bVertical, Rectangle aRect, bool bInit )
{
- sd::UndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
- const bool bUndo = pUndoManager && pUndoManager->isInListAction() && IsInserted();
+ ::svl::IUndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
+ const bool bUndo = pUndoManager && pUndoManager->IsInListAction() && IsInserted();
if (!pObj && bInit)
{
diff --git a/sd/source/core/undo/undomanager.cxx b/sd/source/core/undo/undomanager.cxx
index f3fe9b11c2bd..6ee11d03e392 100644..100755
--- a/sd/source/core/undo/undomanager.cxx
+++ b/sd/source/core/undo/undomanager.cxx
@@ -34,40 +34,22 @@ using namespace sd;
UndoManager::UndoManager( USHORT nMaxUndoActionCount /* = 20 */ )
: SfxUndoManager( nMaxUndoActionCount )
-, mnListLevel( 0 )
, mpLinkedUndoManager(NULL)
{
}
void UndoManager::EnterListAction(const UniString &rComment, const UniString& rRepeatComment, USHORT nId /* =0 */)
{
- if( !isInUndo() )
+ if( !IsDoing() )
{
ClearLinkedRedoActions();
- mnListLevel++;
SfxUndoManager::EnterListAction( rComment, rRepeatComment, nId );
}
}
-void UndoManager::LeaveListAction()
-{
- if( !isInUndo() )
- {
- SfxUndoManager::LeaveListAction();
- if( mnListLevel )
- {
- mnListLevel--;
- }
- else
- {
- DBG_ERROR("sd::UndoManager::LeaveListAction(), no open list action!" );
- }
- }
-}
-
void UndoManager::AddUndoAction( SfxUndoAction *pAction, BOOL bTryMerg /* = FALSE */ )
{
- if( !isInUndo() )
+ if( !IsDoing() )
{
ClearLinkedRedoActions();
SfxUndoManager::AddUndoAction( pAction, bTryMerg );
@@ -79,22 +61,7 @@ void UndoManager::AddUndoAction( SfxUndoAction *pAction, BOOL bTryMerg /* = FALS
}
-BOOL UndoManager::Undo( USHORT nCount )
-{
- ScopeLockGuard aGuard( maIsInUndoLock );
- return SfxUndoManager::Undo( nCount );
-}
-
-BOOL UndoManager::Redo( USHORT nCount )
-{
- ScopeLockGuard aGuard( maIsInUndoLock );
- return SfxUndoManager::Redo( nCount );
-}
-
-
-
-
-void UndoManager::SetLinkedUndoManager (SfxUndoManager* pLinkedUndoManager)
+void UndoManager::SetLinkedUndoManager (::svl::IUndoManager* pLinkedUndoManager)
{
mpLinkedUndoManager = pLinkedUndoManager;
}
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index 9cdbc2f0cfba..2d70316c1432 100755
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -289,7 +289,7 @@ CustomAnimationPane::~CustomAnimationPane()
void CustomAnimationPane::addUndo()
{
- SfxUndoManager* pManager = mrBase.GetDocShell()->GetUndoManager();
+ ::svl::IUndoManager* pManager = mrBase.GetDocShell()->GetUndoManager();
if( pManager )
{
SdPage* pPage = SdPage::getImplementation( mxCurrentPage );
@@ -2461,7 +2461,7 @@ void CustomAnimationPane::updatePathFromMotionPathTag( const rtl::Reference< Mot
CustomAnimationEffectPtr pEffect = xTag->getEffect();
if( (pPathObj != 0) && pEffect.get() != 0 )
{
- SfxUndoManager* pManager = mrBase.GetDocShell()->GetUndoManager();
+ ::svl::IUndoManager* pManager = mrBase.GetDocShell()->GetUndoManager();
if( pManager )
{
SdPage* pPage = SdPage::getImplementation( mxCurrentPage );
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index fe34f0138db2..88b30ab658e3 100755
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -265,9 +265,9 @@ void lcl_CreateUndoForPages(
const ::sd::slidesorter::SharedPageSelection& rpPages,
::sd::ViewShellBase& rBase )
{
- ::sd::DrawDocShell* pDocSh = rBase.GetDocShell();
- SfxUndoManager* pManager = pDocSh->GetUndoManager();
- SdDrawDocument* pDoc = pDocSh->GetDoc();
+ ::sd::DrawDocShell* pDocSh = rBase.GetDocShell();
+ ::svl::IUndoManager* pManager = pDocSh->GetUndoManager();
+ SdDrawDocument* pDoc = pDocSh->GetDoc();
if( pManager && pDocSh && pDoc )
{
String aComment( SdResId(STR_UNDO_SLIDE_PARAMS) );
diff --git a/sd/source/ui/app/app.img b/sd/source/ui/app/app.img
deleted file mode 100644
index a435b84b8887..000000000000
--- a/sd/source/ui/app/app.img
+++ /dev/null
@@ -1,120 +0,0 @@
-File = "sc05410.bmp";Identifier = SID_HELPMENU;
-File = "sc05500.bmp";Identifier = SID_NEW_DOCUMENT;File = "sco043.bmp
-File = "sc05501.bmp";Identifier = SID_OPENDOC;File = "sco044.bmp
-File = "sc05504.bmp";Identifier = SID_PRINTDOC;File = "sco051.bmp
-File = "sc05505.bmp";Identifier = SID_SAVEDOC;File = "sco046.bmp
-File = "sc05539.bmp";Identifier = SID_TEMPLATE;
-File = "sc05561.bmp";Identifier = SID_INSERT_OBJECT;
-File = "sc05700.bmp";Identifier = SID_REDO;
-File = "sc05701.bmp";Identifier = SID_UNDO;
-File = "sc05710.bmp";Identifier = SID_CUT;File = "sco058.bmp
-File = "sc05711.bmp";Identifier = SID_COPY;File = "sco059.bmp
-File = "sc05712.bmp";Identifier = SID_PASTE;File = "sco060.bmp
-
-File = "sc10008.bmp";Identifier = SID_ATTR_CHAR_POSTURE;
-File = "sc10009.bmp";Identifier = SID_ATTR_CHAR_WEIGHT;
-File = "sc10012.bmp";Identifier = SID_ATTR_CHAR_CONTOUR;
-File = "sc10014.bmp";Identifier = SID_ATTR_CHAR_UNDERLINE;
-File = "sc10028.bmp";Identifier = SID_TEXT_ADJUST_LEFT;
-File = "sc10029.bmp";Identifier = SID_TEXT_ADJUST_RIGHT;
-File = "sc10030.bmp";Identifier = SID_TEXT_ADJUST_CENTER;
-File = "sc10031.bmp";Identifier = SID_TEXT_ADJUST_BLOCK;
-File = "sc10034.bmp";Identifier = SID_TEXT_LINESPACING_1;
-File = "sc10035.bmp";Identifier = SID_TEXT_LINESPACING_2;
-File = "sc10036.bmp";Identifier = SID_TEXT_LINESPACING_3;
-File = "sc10087.bmp";Identifier = SID_TRANSFORM;
-File = "sc10102.bmp";Identifier = SID_TOOL_LINE;File = "sco207.bmp
-File = "sc10104.bmp";Identifier = SID_TOOL_RECT;File = "sco209.bmp
-File = "sc10110.bmp";Identifier = SID_TOOL_ELLIPSE;File = "sco215.bmp
-File = "sc10113.bmp";Identifier = SID_TOOL_PIE;File = "sco220.bmp
-File = "sc10114.bmp";Identifier = SID_TOOL_ARC;File = "sco217.bmp
-File = "sc10116.bmp";Identifier = SID_TOOL_CIRCLECUT;File = "sco221.bmp
-File = "sc10117.bmp";Identifier = SID_TOOL_POLYGON;File = "sco222.bmp
-File = "sc10118.bmp";Identifier = SID_TOOL_BEZIER;File = "sco223.bmp
-File = "sc10119.bmp";Identifier = SID_BEZIER_INSERT;
-File = "sc10120.bmp";Identifier = SID_BEZIER_DELETE;
-File = "sc10121.bmp";Identifier = SID_BEZIER_MOVE;
-File = "sc10122.bmp";Identifier = SID_BEZIER_CLOSE;
-// wurde durch sc20014.bmp ersetzt:
-// File = "sc10123.bmp";Identifier = SID_BEZIER_SMOOTH;
-File = "sc10126.bmp";Identifier = SID_EDIT_POINTS;
-File = "sc10127.bmp";Identifier = SID_BEZIER_CUTLINE;
-File = "sc10129.bmp";Identifier = SID_TOOL_ROTATE;
-File = "sc10130.bmp";Identifier = SID_ALIGNMENT;
-File = "sc10131.bmp";Identifier = SID_LEFT;File = "sco231.bmp
-File = "sc10132.bmp";Identifier = SID_CENTER;File = "sco232.bmp
-File = "sc10133.bmp";Identifier = SID_RIGHT;File = "sco233.bmp
-File = "sc10134.bmp";Identifier = SID_UP;File = "sco234.bmp
-File = "sc10135.bmp";Identifier = SID_MIDDLE;File = "sco235.bmp
-File = "sc10136.bmp";Identifier = SID_DOWN;File = "sco236.bmp
-File = "sc10140.bmp";Identifier = SID_INSERTDIAGRAM;File = "sco246.bmp
-File = "sc10141.bmp";Identifier = SID_ATTR_TABLE;
-File = "sc10142.bmp";Identifier = SID_AREA;
-File = "sc10143.bmp";Identifier = SID_LINE;
-File = "sc10144.bmp";Identifier = SID_TOOL_CONTROLS;File = "sco270.bmp
-File = "sc10145.bmp";Identifier = SID_DIALOG_TESTMODE;File = "sco274.bmp
-File = "sc10146.bmp";Identifier = SID_INSERT_PUSHBUTTON;File = "sco271.bmp
-File = "sc10147.bmp";Identifier = SID_INSERT_RADIOBUTTON;File = "sco272.bmp
-File = "sc10148.bmp";Identifier = SID_INSERT_CHECKBOX;File = "sco273.bmp
-File = "sc10150.bmp";Identifier = SID_OUTLINE_UP;File = "sco290.bmp
-File = "sc10151.bmp";Identifier = SID_OUTLINE_DOWN;File = "sco291.bmp
-File = "sc10152.bmp";Identifier = SID_OUTLINE_LEFT;File = "sco292.bmp
-File = "sc10153.bmp";Identifier = SID_OUTLINE_RIGHT;File = "sco293.bmp
-File = "sc10154.bmp";Identifier = SID_OUTLINE_FORMAT;File = "sco204.bmp
-File = "sc10155.bmp";Identifier = SID_OUTLINE_TITLE;File = "sco295.bmp
-File = "sc10156.bmp";Identifier = SID_OUTLINE_BULLET;File = "sco296.bmp
-File = "sc10157.bmp";Identifier = SID_PRESENTATION;File = "sco238.bmp
-File = "sc10159.bmp";Identifier = SID_REHEARSE_TIMINGS;File = "sco239.bmp
-File = "sc10160.bmp";Identifier = SID_DIA;File = "sco240.bmp
-File = "sc10161.bmp";Identifier = SID_HIDE_SLIDE;File = "sco241.bmp
-File = "sc10162.bmp";Identifier = SID_CHOOSE_POLYGON;File = "sco242.bmp
-File = "sc10163.bmp";Identifier = SID_SHOW_BROWSER;File = "sco275.bmp
-File = "sc10188.bmp";Identifier = SID_INSERT_FIXEDTEXT;File = "sco276.bmp
-File = "sc10189.bmp";Identifier = SID_INSERT_GROUPBOX;File = "sco277.bmp
-File = "sc10191.bmp";Identifier = SID_INSERT_LISTBOX;File = "sco278.bmp
-File = "sc10192.bmp";Identifier = SID_INSERT_COMBOBOX;File = "sco279.bmp
-File = "sc10231.bmp";Identifier = SID_OUTLINE_COLLAPSE;
-File = "sc10232.bmp";Identifier = SID_OUTLINE_EXPAND_ALL;
-File = "sc10233.bmp";Identifier = SID_OUTLINE_EXPAND;
-File = "sc10240.bmp";Identifier = SID_INSERT_FRAME;
-File = "sc10241.bmp";Identifier = SID_INSERT_GRAPHIC;
-File = "sc10242.bmp";Identifier = SID_AUTOFORMAT;
-File = "sc10243.bmp";Identifier = SID_SPELLING;
-File = "sc10244.bmp";Identifier = SID_INSERT_DRAW;
-File = "sc10700.bmp";Identifier = SID_TOOL_SELECT;File = "sco200.bmp
-File = "sc10701.bmp";Identifier = SID_TOOL_ZOOM;File = "sco201.bmp
-File = "sc10702.bmp";Identifier = SID_ZOOM_PLUS;File = "sco202.bmp
-File = "sc10703.bmp";Identifier = SID_ZOOM_MINUS;File = "sco203.bmp
-File = "sc10704.bmp";Identifier = SID_ZOOM_100_PERCENT;File = "sco204.bmp
-File = "sc10705.bmp";Identifier = SID_ZOOM_PAGE;File = "sco205.bmp
-File = "sc10706.bmp";Identifier = SID_ZOOM_OBJECTS;File = "sco206.bmp
-File = "sc10724.bmp";Identifier = SID_TOOL_TEXT;File = "sco224.bmp
-
-File = "sc20000.bmp";Identifier = SID_ATTR_CHAR_COLOR;File = "charcol.bmp";
-File = "sc20001.bmp";Identifier = SID_TOOL_CONNECTOR;File = "sco298.bmp";
-
-// Controller
-File = "sc20002.bmp";Identifier = SID_TEMPLATE_APPLY;
-File = "sc20003.bmp";Identifier = SID_ATTR_LINE_STYLE;
-File = "sc20004.bmp";Identifier = SID_ATTR_LINE_WIDTH;
-File = "sc20005.bmp";Identifier = SID_ATTR_LINE_COLOR;
-File = "sc20006.bmp";Identifier = SID_ATTR_FILL_STYLE;
-File = "sc20007.bmp";Identifier = SID_DIA_EFFECT;
-File = "sc20008.bmp";Identifier = SID_DIA_SPEED;
-File = "sc20009.bmp";Identifier = SID_DIA_AUTO;
-File = "sc20010.bmp";Identifier = SID_DIA_TIME;
-File = "sc20011.bmp";Identifier = SID_ATTR_FONT;
-File = "sc20012.bmp";Identifier = SID_ATTR_FONTHEIGHT;
-
-// Bezier-Toolbar
-File = "sc20013.bmp";Identifier = SID_BEZIER_EDGE;
-File = "sc20014.bmp";Identifier = SID_BEZIER_SMOOTH;
-File = "sc20015.bmp";Identifier = SID_BEZIER_SYMMTR;
-File = "sc20016.bmp";Identifier = SID_BEZIER_CONVERT;
-
-// Standardleiste
-File = "sc20020.bmp";Identifier = SID_INSERTPAGE;
-File = "sc20094.bmp";Identifier = SID_MODIFYPAGE;
-File = "sc20170.bmp";Identifier = SID_PRESENTATION_LAYOUT;
-
-// Basic-IDE ...
diff --git a/sd/source/ui/dlg/LayerTabBar.cxx b/sd/source/ui/dlg/LayerTabBar.cxx
index 29425a3bda71..cd5977772bfe 100644..100755
--- a/sd/source/ui/dlg/LayerTabBar.cxx
+++ b/sd/source/ui/dlg/LayerTabBar.cxx
@@ -317,7 +317,7 @@ void LayerTabBar::EndRenaming()
DBG_ASSERT( pDrView, "Rename layer undo action is only working with a SdDrawView" );
if( pDrView )
{
- SfxUndoManager* pManager = pDoc->GetDocSh()->GetUndoManager();
+ ::svl::IUndoManager* pManager = pDoc->GetDocSh()->GetUndoManager();
SdLayerModifyUndoAction* pAction = new SdLayerModifyUndoAction(
pDoc,
pLayer,
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx
index 82ca4d05b996..4645b3540f04 100755
--- a/sd/source/ui/dlg/dlgass.cxx
+++ b/sd/source/ui/dlg/dlgass.cxx
@@ -1556,7 +1556,7 @@ void AssistentDlgImpl::UpdatePreview( BOOL bDocPreview )
{
SfxObjectShell* pShell = xDocShell;
DrawDocShell* pDocShell = PTR_CAST(DrawDocShell,pShell);
- SfxUndoManager* pUndoMgr = pDocShell?pDocShell->GetUndoManager():NULL;
+ ::svl::IUndoManager* pUndoMgr = pDocShell?pDocShell->GetUndoManager():NULL;
if(pUndoMgr)
pUndoMgr->Undo();
mbUserDataDirty = TRUE;
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index 78b1b9434ad0..9714d8599374 100755
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -462,7 +462,7 @@ void DrawDocShell::Deactivate( BOOL )
|*
\************************************************************************/
-SfxUndoManager* DrawDocShell::GetUndoManager()
+::svl::IUndoManager* DrawDocShell::GetUndoManager()
{
return mpUndoManager;
}
@@ -600,7 +600,7 @@ void DrawDocShell::ClearUndoBuffer()
pSfxViewFrame = SfxViewFrame::GetNext(*pSfxViewFrame, this, false);
}
- SfxUndoManager* pUndoManager = GetUndoManager();
+ ::svl::IUndoManager* pUndoManager = GetUndoManager();
if(pUndoManager && pUndoManager->GetUndoActionCount())
pUndoManager->Clear();
}
diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx
index 92b1450624e1..92aa2d3cc9f3 100644..100755
--- a/sd/source/ui/func/fubullet.cxx
+++ b/sd/source/ui/func/fubullet.cxx
@@ -146,7 +146,7 @@ void FuBullet::InsertFormattingMark( sal_Unicode cMark )
pOV->InsertText( aEmptyStr );
// prepare undo
- SfxUndoManager& rUndoMgr = pOL->GetUndoManager();
+ ::svl::IUndoManager& rUndoMgr = pOL->GetUndoManager();
rUndoMgr.EnterListAction(String(SdResId(STR_UNDO_INSERT_SPECCHAR)),
aEmptyStr );
@@ -276,7 +276,7 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq )
SfxItemSet aOldSet( mpDoc->GetPool(), EE_CHAR_FONTINFO, EE_CHAR_FONTINFO, 0 );
aOldSet.Put( pOV->GetAttribs() );
- SfxUndoManager& rUndoMgr = pOL->GetUndoManager();
+ ::svl::IUndoManager& rUndoMgr = pOL->GetUndoManager();
rUndoMgr.EnterListAction(String(SdResId(STR_UNDO_INSERT_SPECCHAR)),
aEmptyStr );
pOV->InsertText(aChars, TRUE);
diff --git a/sd/source/ui/func/fuoaprms.cxx b/sd/source/ui/func/fuoaprms.cxx
index b348d6533930..980176b20b19 100644..100755
--- a/sd/source/ui/func/fuoaprms.cxx
+++ b/sd/source/ui/func/fuoaprms.cxx
@@ -94,7 +94,7 @@ FunctionReference FuObjectAnimationParameters::Create( ViewShell* pViewSh, ::sd:
void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
{
- SfxUndoManager* pUndoMgr = mpViewShell->GetViewFrame()->GetObjectShell()->GetUndoManager();
+ ::svl::IUndoManager* pUndoMgr = mpViewShell->GetViewFrame()->GetObjectShell()->GetUndoManager();
const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
ULONG nCount = rMarkList.GetMarkCount();
diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index d4e2fcd8083f..fdbad8a3df22 100755
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -414,7 +414,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
else if( bSetToAllPages )
{
String aComment(SdResId(STR_UNDO_CHANGE_PAGEFORMAT));
- SfxUndoManager* pUndoMgr = mpDocSh->GetUndoManager();
+ ::svl::IUndoManager* pUndoMgr = mpDocSh->GetUndoManager();
pUndoMgr->EnterListAction(aComment, aComment);
SdUndoGroup* pUndoGroup = new SdUndoGroup(mpDoc);
pUndoGroup->SetComment(aComment);
diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx
index 4ad4b0d09392..b3f626f62137 100755
--- a/sd/source/ui/inc/DrawDocShell.hxx
+++ b/sd/source/ui/inc/DrawDocShell.hxx
@@ -49,6 +49,7 @@ class SfxPrinter;
struct SdrDocumentStreamInfo;
struct SpellCallbackInfo;
class AbstractSvxNameDialog;
+class SfxUndoManager;
namespace sd {
@@ -100,7 +101,8 @@ public:
virtual Rectangle GetVisArea(USHORT nAspect) const;
virtual void Draw(OutputDevice*, const JobSetup& rSetup, USHORT nAspect = ASPECT_CONTENT);
- virtual SfxUndoManager* GetUndoManager();
+ virtual ::svl::IUndoManager*
+ GetUndoManager();
virtual Printer* GetDocumentPrinter();
virtual void OnDocumentPrinterChanged(Printer* pNewPrinter);
virtual SfxStyleSheetBasePool* GetStyleSheetPool();
diff --git a/sd/source/ui/inc/SlideSorterViewShell.hxx b/sd/source/ui/inc/SlideSorterViewShell.hxx
index 2b03cd636d0f..de1e1ebae006 100755
--- a/sd/source/ui/inc/SlideSorterViewShell.hxx
+++ b/sd/source/ui/inc/SlideSorterViewShell.hxx
@@ -192,7 +192,7 @@ protected:
/** This method is overloaded to handle a missing tool bar correctly.
This is the case when the slide sorter is not the main view shell.
*/
- virtual SfxUndoManager* ImpGetUndoManager (void) const;
+ virtual ::svl::IUndoManager* ImpGetUndoManager (void) const;
private:
::boost::shared_ptr<SlideSorter> mpSlideSorter;
diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx
index e6e6b401cb57..195e323f579d 100755
--- a/sd/source/ui/inc/ViewShell.hxx
+++ b/sd/source/ui/inc/ViewShell.hxx
@@ -534,7 +534,7 @@ protected:
::std::auto_ptr<Implementation> mpImpl;
// #96090# Support methods for centralized UNDO/REDO
- virtual SfxUndoManager* ImpGetUndoManager (void) const;
+ virtual ::svl::IUndoManager* ImpGetUndoManager (void) const;
void ImpGetUndoStrings(SfxItemSet &rSet) const;
void ImpGetRedoStrings(SfxItemSet &rSet) const;
void ImpSidUndo(BOOL bDrawViewShell, SfxRequest& rReq);
diff --git a/sd/source/ui/inc/unmodpg.hxx b/sd/source/ui/inc/unmodpg.hxx
index 185dc90b24bf..9a811b445f42 100644..100755
--- a/sd/source/ui/inc/unmodpg.hxx
+++ b/sd/source/ui/inc/unmodpg.hxx
@@ -36,9 +36,6 @@ class SdPage;
class ModifyPageUndoAction : public SdUndoAction
{
- // #67720#
- SfxUndoManager* mpManager;
-
SdPage* mpPage;
String maOldName;
String maNewName;
@@ -54,7 +51,6 @@ class ModifyPageUndoAction : public SdUndoAction
public:
TYPEINFO();
ModifyPageUndoAction(
- SfxUndoManager* pManager, // #67720#
SdDrawDocument* pTheDoc,
SdPage* pThePage,
String aTheNewName,
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index 0ab4b9e3bdc3..9fb7fbed87e6 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -969,7 +969,7 @@ bool SlotManager::RenameSlideFromDrawViewShell( USHORT nPageId, const String & r
SdPage* pPageToRename = NULL;
PageKind ePageKind = mrSlideSorter.GetModel().GetPageType();
- SfxUndoManager* pManager = pDocument->GetDocSh()->GetUndoManager();
+ ::svl::IUndoManager* pManager = pDocument->GetDocSh()->GetUndoManager();
if( mrSlideSorter.GetModel().GetEditMode() == EM_PAGE )
{
@@ -989,7 +989,7 @@ bool SlotManager::RenameSlideFromDrawViewShell( USHORT nPageId, const String & r
// (#67720#)
ModifyPageUndoAction* pAction = new ModifyPageUndoAction(
- pManager, pDocument, pUndoPage, rName, pUndoPage->GetAutoLayout(),
+ pDocument, pUndoPage, rName, pUndoPage->GetAutoLayout(),
aVisibleLayers.IsSet( nBackground ),
aVisibleLayers.IsSet( nBgObj ));
pManager->AddUndoAction( pAction );
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
index f8e7e13cdd2b..b1bcc7050a77 100755
--- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
@@ -321,7 +321,7 @@ bool SlideSorterViewShell::RelocateToParentWindow (::Window* pParentWindow)
-SfxUndoManager* SlideSorterViewShell::ImpGetUndoManager (void) const
+::svl::IUndoManager* SlideSorterViewShell::ImpGetUndoManager (void) const
{
SfxShell* pObjectBar = GetViewShellBase().GetViewShellManager()->GetTopShell();
if (pObjectBar != NULL)
diff --git a/sd/source/ui/toolpanel/controls/DocumentHelper.cxx b/sd/source/ui/toolpanel/controls/DocumentHelper.cxx
index c5919b7aa7ee..f7d470e56333 100755
--- a/sd/source/ui/toolpanel/controls/DocumentHelper.cxx
+++ b/sd/source/ui/toolpanel/controls/DocumentHelper.cxx
@@ -290,7 +290,7 @@ void DocumentHelper::ProvideStyles (
// Add an undo action for the copied style sheets.
if( !aCreatedStyles.empty() )
{
- SfxUndoManager* pUndoManager = rTargetDocument.GetDocSh()->GetUndoManager();
+ ::svl::IUndoManager* pUndoManager = rTargetDocument.GetDocSh()->GetUndoManager();
if (pUndoManager != NULL)
{
SdMoveStyleSheetsUndoAction* pMovStyles =
@@ -341,7 +341,7 @@ void DocumentHelper::AssignMasterPageToPageList (
if (aCleanedList.size() == 0)
break;
- SfxUndoManager* pUndoMgr = rTargetDocument.GetDocSh()->GetUndoManager();
+ ::svl::IUndoManager* pUndoMgr = rTargetDocument.GetDocSh()->GetUndoManager();
if( pUndoMgr )
pUndoMgr->EnterListAction(String(SdResId(STR_UNDO_SET_PRESLAYOUT)), String());
diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx
index fdd7c530137f..2a574fa087ef 100755
--- a/sd/source/ui/view/ViewShellImplementation.cxx
+++ b/sd/source/ui/view/ViewShellImplementation.cxx
@@ -212,7 +212,7 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
SdPage* pUndoPage =
bHandoutMode ? pHandoutMPage : pCurrentPage;
- SfxUndoManager* pUndoManager = mrViewShell.GetDocSh()->GetUndoManager();
+ ::svl::IUndoManager* pUndoManager = mrViewShell.GetDocSh()->GetUndoManager();
DBG_ASSERT(pUndoManager, "No UNDO MANAGER ?!?");
if( pUndoManager )
@@ -220,7 +220,7 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
String aComment( SdResId(STR_UNDO_MODIFY_PAGE) );
pUndoManager->EnterListAction(aComment, aComment);
ModifyPageUndoAction* pAction = new ModifyPageUndoAction(
- pUndoManager, pDocument, pUndoPage, aNewName, aNewAutoLayout, bBVisible, bBObjsVisible);
+ pDocument, pUndoPage, aNewName, aNewAutoLayout, bBVisible, bBObjsVisible);
pUndoManager->AddUndoAction(pAction);
// Clear the selection because the selectec object may be removed as
diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx
index c1ffcb884cd1..2335a6ec838f 100755
--- a/sd/source/ui/view/ViewShellManager.cxx
+++ b/sd/source/ui/view/ViewShellManager.cxx
@@ -915,7 +915,7 @@ void ViewShellManager::Implementation::UpdateShellStack (void)
// Remember the undo manager from the top-most shell on the stack.
SfxShell* pTopMostShell = mrBase.GetSubShell(0);
- SfxUndoManager* pUndoManager = (pTopMostShell!=NULL)
+ ::svl::IUndoManager* pUndoManager = (pTopMostShell!=NULL)
? pTopMostShell->GetUndoManager()
: NULL;
@@ -1015,7 +1015,7 @@ void ViewShellManager::Implementation::TakeShellsFromStack (const SfxShell* pShe
// Remember the undo manager from the top-most shell on the stack.
SfxShell* pTopMostShell = mrBase.GetSubShell(0);
- SfxUndoManager* pUndoManager = (pTopMostShell!=NULL)
+ ::svl::IUndoManager* pUndoManager = (pTopMostShell!=NULL)
? pTopMostShell->GetUndoManager()
: NULL;
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 7aaba7d9c4fa..092dce05a196 100755
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -151,7 +151,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if( rReq.GetArgs() )
{
BOOL bMergeUndo = FALSE;
- SfxUndoManager* pUndoManager = GetDocSh()->GetUndoManager();
+ ::svl::IUndoManager* pUndoManager = GetDocSh()->GetUndoManager();
// Anpassungen Start/EndWidth #63083#
if(nSId == SID_ATTR_LINE_WIDTH)
diff --git a/sd/source/ui/view/drviewsb.cxx b/sd/source/ui/view/drviewsb.cxx
index d7cc1fc1d84a..b9f6ec9a4a96 100644..100755
--- a/sd/source/ui/view/drviewsb.cxx
+++ b/sd/source/ui/view/drviewsb.cxx
@@ -356,7 +356,7 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq)
break;
}
- SfxUndoManager* pManager = GetDoc()->GetDocSh()->GetUndoManager();
+ ::svl::IUndoManager* pManager = GetDoc()->GetDocSh()->GetUndoManager();
SdLayerModifyUndoAction* pAction = new SdLayerModifyUndoAction(
GetDoc(),
pLayer,
@@ -748,9 +748,9 @@ bool DrawViewShell::RenameSlide( USHORT nPageId, const String & rName )
SetOfByte aVisibleLayers = mpActualPage->TRG_GetMasterPageVisibleLayers();
// (#67720#)
- SfxUndoManager* pManager = GetDoc()->GetDocSh()->GetUndoManager();
+ ::svl::IUndoManager* pManager = GetDoc()->GetDocSh()->GetUndoManager();
ModifyPageUndoAction* pAction = new ModifyPageUndoAction(
- pManager, GetDoc(), pUndoPage, rName, pUndoPage->GetAutoLayout(),
+ GetDoc(), pUndoPage, rName, pUndoPage->GetAutoLayout(),
aVisibleLayers.IsSet( nBackground ),
aVisibleLayers.IsSet( nBgObj ));
pManager->AddUndoAction( pAction );
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index dfad4b34c6f2..ee2ac158bffa 100755
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -1451,7 +1451,7 @@ SdPage* OutlineView::GetActualPage()
SdPage* pCurrent = GetPageForParagraph(static_cast<Paragraph*>(pSelList->First()) );
DBG_ASSERT( pCurrent ||
- (mpDocSh->GetUndoManager() && static_cast< sd::UndoManager *>(mpDocSh->GetUndoManager())->isInUndo()) ||
+ (mpDocSh->GetUndoManager() && static_cast< sd::UndoManager *>(mpDocSh->GetUndoManager())->IsDoing()) ||
maDragAndDropModelGuard.get(),
"sd::OutlineView::GetActualPage(), no current page?" );
if( pCurrent )
@@ -1783,7 +1783,7 @@ void OutlineView::EndModelChange()
{
UpdateDocument();
- SfxUndoManager* pDocUndoMgr = mpDocSh->GetUndoManager();
+ ::svl::IUndoManager* pDocUndoMgr = mpDocSh->GetUndoManager();
bool bHasUndoActions = pDocUndoMgr->GetUndoActionCount() != 0;
@@ -1801,6 +1801,9 @@ void OutlineView::EndModelChange()
if( bHasUndoActions && mpOutliner->GetEditEngine().HasTriedMergeOnLastAddUndo() )
TryToMergeUndoActions();
+
+ mpOutlineViewShell->Invalidate( SID_UNDO );
+ mpOutlineViewShell->Invalidate( SID_REDO );
}
/** updates all changes in the outliner model to the draw model */
@@ -1838,7 +1841,7 @@ void OutlineView::UpdateDocument()
/** merge edit engine undo actions if possible */
void OutlineView::TryToMergeUndoActions()
{
- SfxUndoManager& rOutlineUndo = mpOutliner->GetUndoManager();
+ ::svl::IUndoManager& rOutlineUndo = mpOutliner->GetUndoManager();
if( rOutlineUndo.GetUndoActionCount() > 1 )
{
SfxListUndoAction* pListAction = dynamic_cast< SfxListUndoAction* >( rOutlineUndo.GetUndoAction(0) );
@@ -1846,11 +1849,11 @@ void OutlineView::TryToMergeUndoActions()
if( pListAction && pPrevListAction )
{
// find the top EditUndo action in the top undo action list
- USHORT nAction = pListAction->aUndoActions.Count();
+ size_t nAction = pListAction->aUndoActions.size();
EditUndo* pEditUndo = 0;
while( !pEditUndo && nAction )
{
- pEditUndo = dynamic_cast< EditUndo* >(pListAction->aUndoActions[--nAction]);
+ pEditUndo = dynamic_cast< EditUndo* >(pListAction->aUndoActions[--nAction].pAction);
}
USHORT nEditPos = nAction; // we need this later to remove the merged undo actions
@@ -1858,7 +1861,7 @@ void OutlineView::TryToMergeUndoActions()
// make sure it is the only EditUndo action in the top undo list
while( pEditUndo && nAction )
{
- if( dynamic_cast< EditUndo* >(pListAction->aUndoActions[--nAction]) )
+ if( dynamic_cast< EditUndo* >(pListAction->aUndoActions[--nAction].pAction) )
pEditUndo = 0;
}
@@ -1867,10 +1870,10 @@ void OutlineView::TryToMergeUndoActions()
{
// yes, see if we can merge it with the prev undo list
- nAction = pPrevListAction->aUndoActions.Count();
+ nAction = pPrevListAction->aUndoActions.size();
EditUndo* pPrevEditUndo = 0;
while( !pPrevEditUndo && nAction )
- pPrevEditUndo = dynamic_cast< EditUndo* >(pPrevListAction->aUndoActions[--nAction]);
+ pPrevEditUndo = dynamic_cast< EditUndo* >(pPrevListAction->aUndoActions[--nAction].pAction);
if( pPrevEditUndo && pPrevEditUndo->Merge( pEditUndo ) )
{
@@ -1878,22 +1881,23 @@ void OutlineView::TryToMergeUndoActions()
// the top EditUndo of the previous undo list
// first remove the merged undo action
- DBG_ASSERT( pListAction->aUndoActions[nEditPos] == pEditUndo, "sd::OutlineView::TryToMergeUndoActions(), wrong edit pos!" );
+ DBG_ASSERT( pListAction->aUndoActions[nEditPos].pAction == pEditUndo,
+ "sd::OutlineView::TryToMergeUndoActions(), wrong edit pos!" );
pListAction->aUndoActions.Remove(nEditPos);
delete pEditUndo;
// now check if we also can merge the draw undo actions
- SfxUndoManager* pDocUndoManager = mpDocSh->GetUndoManager();
- if( pDocUndoManager && ( pListAction->aUndoActions.Count() == 1 ))
+ ::svl::IUndoManager* pDocUndoManager = mpDocSh->GetUndoManager();
+ if( pDocUndoManager && ( pListAction->aUndoActions.size() == 1 ))
{
- SfxLinkUndoAction* pLinkAction = dynamic_cast< SfxLinkUndoAction* >( pListAction->aUndoActions[0] );
+ SfxLinkUndoAction* pLinkAction = dynamic_cast< SfxLinkUndoAction* >( pListAction->aUndoActions[0].pAction );
SfxLinkUndoAction* pPrevLinkAction = 0;
if( pLinkAction )
{
- nAction = pPrevListAction->aUndoActions.Count();
+ nAction = pPrevListAction->aUndoActions.size();
while( !pPrevLinkAction && nAction )
- pPrevLinkAction = dynamic_cast< SfxLinkUndoAction* >(pPrevListAction->aUndoActions[--nAction]);
+ pPrevLinkAction = dynamic_cast< SfxLinkUndoAction* >(pPrevListAction->aUndoActions[--nAction].pAction);
}
if( pLinkAction && pPrevLinkAction &&
@@ -1905,15 +1909,15 @@ void OutlineView::TryToMergeUndoActions()
if( pSourceList && pDestinationList )
{
- USHORT nCount = pSourceList->aUndoActions.Count();
- USHORT nDestAction = pDestinationList->aUndoActions.Count();
+ USHORT nCount = pSourceList->aUndoActions.size();
+ USHORT nDestAction = pDestinationList->aUndoActions.size();
while( nCount-- )
{
- const SfxUndoAction* pTemp = pSourceList->aUndoActions.GetObject(0);
+ SfxUndoAction* pTemp = pSourceList->aUndoActions[0].pAction;
pSourceList->aUndoActions.Remove(0);
pDestinationList->aUndoActions.Insert( pTemp, nDestAction++ );
}
- pDestinationList->nCurUndoAction = pDestinationList->aUndoActions.Count();
+ pDestinationList->nCurUndoAction = pDestinationList->aUndoActions.size();
pListAction->aUndoActions.Remove(0);
delete pLinkAction;
@@ -1923,21 +1927,21 @@ void OutlineView::TryToMergeUndoActions()
}
}
- if( pListAction->aUndoActions.Count() )
+ if ( !pListAction->aUndoActions.empty() )
{
// now we have to move all remaining doc undo actions from the top undo
// list to the previous undo list and remove the top undo list
- USHORT nCount = pListAction->aUndoActions.Count();
- USHORT nDestAction = pPrevListAction->aUndoActions.Count();
+ size_t nCount = pListAction->aUndoActions.size();
+ size_t nDestAction = pPrevListAction->aUndoActions.size();
while( nCount-- )
{
- const SfxUndoAction* pTemp = pListAction->aUndoActions.GetObject(0);
+ SfxUndoAction* pTemp = pListAction->aUndoActions[0].pAction;
pListAction->aUndoActions.Remove(0);
if( pTemp )
pPrevListAction->aUndoActions.Insert( pTemp, nDestAction++ );
}
- pPrevListAction->nCurUndoAction = pPrevListAction->aUndoActions.Count();
+ pPrevListAction->nCurUndoAction = pPrevListAction->aUndoActions.size();
}
rOutlineUndo.RemoveLastUndoAction();
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 3aed9c6c0d9c..36d55213ab78 100755
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -1167,7 +1167,7 @@ bool View::isRecordingUndo() const
if( mpDoc && mpDoc->IsUndoEnabled() )
{
sd::UndoManager* pUndoManager = mpDoc ? mpDoc->GetUndoManager() : 0;
- return pUndoManager && pUndoManager->isInListAction();
+ return pUndoManager && pUndoManager->IsInListAction();
}
else
{
diff --git a/sd/source/ui/view/unmodpg.cxx b/sd/source/ui/view/unmodpg.cxx
index 5a7f9830895e..66e5c7a506e5 100644..100755
--- a/sd/source/ui/view/unmodpg.cxx
+++ b/sd/source/ui/view/unmodpg.cxx
@@ -56,15 +56,13 @@ TYPEINIT1(ModifyPageUndoAction, SdUndoAction);
\************************************************************************/
ModifyPageUndoAction::ModifyPageUndoAction(
- SfxUndoManager* pTheManager, // #67720#
SdDrawDocument* pTheDoc,
SdPage* pThePage,
String aTheNewName,
AutoLayout eTheNewAutoLayout,
BOOL bTheNewBckgrndVisible,
BOOL bTheNewBckgrndObjsVisible)
-: SdUndoAction(pTheDoc),
- mpManager(pTheManager)
+: SdUndoAction(pTheDoc)
{
DBG_ASSERT(pThePage, "Undo ohne Seite ???");
diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx
index 363ff91edf36..ab4b9e6732f5 100644
--- a/sd/source/ui/view/viewshe3.cxx
+++ b/sd/source/ui/view/viewshe3.cxx
@@ -151,7 +151,7 @@ void ViewShell::GetMenuState( SfxItemSet &rSet )
// #96090#
if(SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_UNDO))
{
- SfxUndoManager* pUndoManager = ImpGetUndoManager();
+ ::svl::IUndoManager* pUndoManager = ImpGetUndoManager();
sal_Bool bActivate(FALSE);
if(pUndoManager)
@@ -179,7 +179,7 @@ void ViewShell::GetMenuState( SfxItemSet &rSet )
// #96090#
if(SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_REDO))
{
- SfxUndoManager* pUndoManager = ImpGetUndoManager();
+ ::svl::IUndoManager* pUndoManager = ImpGetUndoManager();
sal_Bool bActivate(FALSE);
if(pUndoManager)
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 7885d07e5f2c..7f142ded077e 100755
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -85,6 +85,7 @@
#include <svx/extrusionbar.hxx>
#include <svx/fontworkbar.hxx>
#include <svx/svdoutl.hxx>
+#include <tools/diagnose_ex.h>
// #96090#
#include <svl/slstitm.hxx>
@@ -1040,7 +1041,7 @@ void ViewShell::UpdatePreview (SdPage*, BOOL )
// usefull is still done.
}
-SfxUndoManager* ViewShell::ImpGetUndoManager (void) const
+::svl::IUndoManager* ViewShell::ImpGetUndoManager (void) const
{
const ViewShell* pMainViewShell = GetViewShellBase().GetMainViewShell().get();
@@ -1081,7 +1082,7 @@ SfxUndoManager* ViewShell::ImpGetUndoManager (void) const
void ViewShell::ImpGetUndoStrings(SfxItemSet &rSet) const
{
- SfxUndoManager* pUndoManager = ImpGetUndoManager();
+ ::svl::IUndoManager* pUndoManager = ImpGetUndoManager();
if(pUndoManager)
{
sal_uInt16 nCount(pUndoManager->GetUndoActionCount());
@@ -1116,7 +1117,7 @@ void ViewShell::ImpGetUndoStrings(SfxItemSet &rSet) const
void ViewShell::ImpGetRedoStrings(SfxItemSet &rSet) const
{
- SfxUndoManager* pUndoManager = ImpGetUndoManager();
+ ::svl::IUndoManager* pUndoManager = ImpGetUndoManager();
if(pUndoManager)
{
sal_uInt16 nCount(pUndoManager->GetRedoActionCount());
@@ -1151,7 +1152,7 @@ void ViewShell::ImpGetRedoStrings(SfxItemSet &rSet) const
void ViewShell::ImpSidUndo(BOOL, SfxRequest& rReq)
{
- SfxUndoManager* pUndoManager = ImpGetUndoManager();
+ ::svl::IUndoManager* pUndoManager = ImpGetUndoManager();
sal_uInt16 nNumber(1);
const SfxItemSet* pReqArgs = rReq.GetArgs();
@@ -1166,11 +1167,19 @@ void ViewShell::ImpSidUndo(BOOL, SfxRequest& rReq)
sal_uInt16 nCount(pUndoManager->GetUndoActionCount());
if(nCount >= nNumber)
{
- // #94637# when UndoStack is cleared by ModifyPageUndoAction
- // the nCount may have changed, so test GetUndoActionCount()
- while(nNumber-- && pUndoManager->GetUndoActionCount())
+ try
{
- pUndoManager->Undo();
+ // #94637# when UndoStack is cleared by ModifyPageUndoAction
+ // the nCount may have changed, so test GetUndoActionCount()
+ while(nNumber-- && pUndoManager->GetUndoActionCount())
+ {
+ pUndoManager->Undo();
+ }
+ }
+ catch( const Exception& e )
+ {
+ // no need to handle. By definition, the UndoManager handled this by clearing the
+ // Undo/Redo stacks
}
}
@@ -1192,7 +1201,7 @@ void ViewShell::ImpSidUndo(BOOL, SfxRequest& rReq)
void ViewShell::ImpSidRedo(BOOL, SfxRequest& rReq)
{
- SfxUndoManager* pUndoManager = ImpGetUndoManager();
+ ::svl::IUndoManager* pUndoManager = ImpGetUndoManager();
sal_uInt16 nNumber(1);
const SfxItemSet* pReqArgs = rReq.GetArgs();
@@ -1207,11 +1216,19 @@ void ViewShell::ImpSidRedo(BOOL, SfxRequest& rReq)
sal_uInt16 nCount(pUndoManager->GetRedoActionCount());
if(nCount >= nNumber)
{
- // #94637# when UndoStack is cleared by ModifyPageRedoAction
- // the nCount may have changed, so test GetRedoActionCount()
- while(nNumber-- && pUndoManager->GetRedoActionCount())
+ try
+ {
+ // #94637# when UndoStack is cleared by ModifyPageRedoAction
+ // the nCount may have changed, so test GetRedoActionCount()
+ while(nNumber-- && pUndoManager->GetRedoActionCount())
+ {
+ pUndoManager->Redo();
+ }
+ }
+ catch( const Exception& e )
{
- pUndoManager->Redo();
+ // no need to handle. By definition, the UndoManager handled this by clearing the
+ // Undo/Redo stacks
}
}