summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsd/inc/undo/undomanager.hxx14
-rwxr-xr-xsd/source/core/drawdoc3.cxx6
-rwxr-xr-xsd/source/core/sdpage.cxx26
-rwxr-xr-xsd/source/core/undo/undomanager.cxx41
-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-xsd/source/ui/dlg/LayerTabBar.cxx2
-rwxr-xr-xsd/source/ui/dlg/dlgass.cxx2
-rwxr-xr-xsd/source/ui/docshell/docshell.cxx4
-rwxr-xr-xsd/source/ui/func/fubullet.cxx4
-rwxr-xr-xsd/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-xsd/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-xsd/source/ui/view/drviewsb.cxx6
-rwxr-xr-xsd/source/ui/view/outlview.cxx50
-rwxr-xr-xsd/source/ui/view/sdview.cxx2
-rwxr-xr-xsd/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, 114 insertions, 260 deletions
diff --git a/sd/inc/undo/undomanager.hxx b/sd/inc/undo/undomanager.hxx
index dcb6de7bf458..22167d9636fc 100755
--- a/sd/inc/undo/undomanager.hxx
+++ b/sd/inc/undo/undomanager.hxx
@@ -40,31 +40,21 @@ public:
UndoManager( sal_uInt16 nMaxUndoActionCount = 20 );
virtual void EnterListAction(const UniString &rComment, const UniString& rRepeatComment, sal_uInt16 nId=0);
- virtual void LeaveListAction();
virtual void AddUndoAction( SfxUndoAction *pAction, sal_Bool bTryMerg=sal_False );
- bool isInListAction() const { return mnListLevel != 0; }
- bool isInUndo() const { return maIsInUndoLock.isLocked(); }
-
- virtual sal_Bool Undo( sal_uInt16 nCount=1 );
- virtual sal_Bool Redo( sal_uInt16 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 7a74c082f7ec..a407d44251a5 100755
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -535,7 +535,7 @@ sal_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, sal_Bool bOnlyDuplicatePages, sal_Bool bUndo)
{
::sd::View* pView = NULL;
- SfxUndoManager* pUndoMgr = NULL;
+ ::svl::IUndoManager* pUndoMgr = NULL;
if( bUndo && !IsUndoEnabled() )
bUndo = sal_False;
@@ -1525,7 +1525,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
if( mpDocSh )
mpDocSh->SetWaitCursor( sal_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 7b54e1ce361e..879f5505b8cc 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, sal_Bool bVertical, const Rectangle& rRect, sal_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(sal_Bool bInit, sal_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, sal_Bool bInit, sal_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 5b7ed22e3a9e..37f4ebe75dfa 100755
--- a/sd/source/core/undo/undomanager.cxx
+++ b/sd/source/core/undo/undomanager.cxx
@@ -34,40 +34,22 @@ using namespace sd;
UndoManager::UndoManager( sal_uInt16 nMaxUndoActionCount /* = 20 */ )
: SfxUndoManager( nMaxUndoActionCount )
-, mnListLevel( 0 )
, mpLinkedUndoManager(NULL)
{
}
void UndoManager::EnterListAction(const UniString &rComment, const UniString& rRepeatComment, sal_uInt16 nId /* =0 */)
{
- if( !isInUndo() )
+ if( !IsDoing() )
{
ClearLinkedRedoActions();
- mnListLevel++;
SfxUndoManager::EnterListAction( rComment, rRepeatComment, nId );
}
}
-void UndoManager::LeaveListAction()
+void UndoManager::AddUndoAction( SfxUndoAction *pAction, sal_Bool bTryMerg /* = FALSE */ )
{
- if( !isInUndo() )
- {
- SfxUndoManager::LeaveListAction();
- if( mnListLevel )
- {
- mnListLevel--;
- }
- else
- {
- DBG_ERROR("sd::UndoManager::LeaveListAction(), no open list action!" );
- }
- }
-}
-
-void UndoManager::AddUndoAction( SfxUndoAction *pAction, sal_Bool bTryMerg /* = sal_False */ )
-{
- if( !isInUndo() )
+ if( !IsDoing() )
{
ClearLinkedRedoActions();
SfxUndoManager::AddUndoAction( pAction, bTryMerg );
@@ -79,22 +61,7 @@ void UndoManager::AddUndoAction( SfxUndoAction *pAction, sal_Bool bTryMerg /* =
}
-sal_Bool UndoManager::Undo( sal_uInt16 nCount )
-{
- ScopeLockGuard aGuard( maIsInUndoLock );
- return SfxUndoManager::Undo( nCount );
-}
-
-sal_Bool UndoManager::Redo( sal_uInt16 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 7337a811a5f2..73d595a8eb1e 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 82858cf06572..82b6a47c3735 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 7f0b95a02f2f..c147d1e616b5 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 7daac3d3becd..074ab49d97bb 100755
--- a/sd/source/ui/dlg/dlgass.cxx
+++ b/sd/source/ui/dlg/dlgass.cxx
@@ -1556,7 +1556,7 @@ void AssistentDlgImpl::UpdatePreview( sal_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 = sal_True;
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index 1010d0abbab7..7a0c203a1e7a 100755
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -462,7 +462,7 @@ void DrawDocShell::Deactivate( sal_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 8bf1b6509e60..259a44a66591 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, sal_True);
diff --git a/sd/source/ui/func/fuoaprms.cxx b/sd/source/ui/func/fuoaprms.cxx
index fb19c4715ba3..826bacbea622 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();
sal_uLong nCount = rMarkList.GetMarkCount();
diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index 8af2ee312f8b..4d068e1fde90 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 444c02102c76..65b4c1e89ffd 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(sal_uInt16 nAspect) const;
virtual void Draw(OutputDevice*, const JobSetup& rSetup, sal_uInt16 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 3bbbedccec6f..2f0ebbcfd18e 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 5ec314f17350..fa4aed19b2ba 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(sal_Bool bDrawViewShell, SfxRequest& rReq);
diff --git a/sd/source/ui/inc/unmodpg.hxx b/sd/source/ui/inc/unmodpg.hxx
index ee9f975c4c06..ceafa4cd8992 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 6cf3833468e3..048880f2a8aa 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -969,7 +969,7 @@ bool SlotManager::RenameSlideFromDrawViewShell( sal_uInt16 nPageId, const String
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( sal_uInt16 nPageId, const String
// (#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 50426dc39b34..3d3f560574b4 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 b2345f2f0bee..8ed46a90dbba 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 a63b246401a7..613aff9fd36c 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 1c27f4fe2198..2df075662eb1 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 7c5d90f633eb..7c219331441b 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() )
{
sal_Bool bMergeUndo = sal_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 f2c7877a1476..eb3bb754698b 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( sal_uInt16 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 8dc0bfc8ccd7..020ecf11b42f 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
- sal_uInt16 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);
}
sal_uInt16 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 )
{
- sal_uInt16 nCount = pSourceList->aUndoActions.Count();
- sal_uInt16 nDestAction = pDestinationList->aUndoActions.Count();
+ sal_uInt16 nCount = pSourceList->aUndoActions.size();
+ sal_uInt16 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
- sal_uInt16 nCount = pListAction->aUndoActions.Count();
- sal_uInt16 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 6d97fdfc9068..23d57c26ad33 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 24d6d8a4b914..f88799118577 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,
sal_Bool bTheNewBckgrndVisible,
sal_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 4748206a416d..384fe3fc6b10 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(sal_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(sal_False);
if(pUndoManager)
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 8ba64e9dcf29..62ea8a71407e 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*, sal_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(sal_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(sal_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(sal_Bool, SfxRequest& rReq)
void ViewShell::ImpSidRedo(sal_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(sal_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
}
}