incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1371714 - in /incubator/ooo/trunk/main/sc/source: core/data/document.cxx ui/inc/drawview.hxx ui/view/drawview.cxx
Date Fri, 10 Aug 2012 14:27:37 GMT
Author: alg
Date: Fri Aug 10 14:27:36 2012
New Revision: 1371714

URL: http://svn.apache.org/viewvc?rev=1371714&view=rev
Log:
#120515# Implemented and finetuned the enhanced Undo feature (see #120498#) for sc

Modified:
    incubator/ooo/trunk/main/sc/source/core/data/document.cxx
    incubator/ooo/trunk/main/sc/source/ui/inc/drawview.hxx
    incubator/ooo/trunk/main/sc/source/ui/view/drawview.cxx

Modified: incubator/ooo/trunk/main/sc/source/core/data/document.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sc/source/core/data/document.cxx?rev=1371714&r1=1371713&r2=1371714&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sc/source/core/data/document.cxx (original)
+++ incubator/ooo/trunk/main/sc/source/core/data/document.cxx Fri Aug 10 14:27:36 2012
@@ -45,6 +45,7 @@
 #include <unotools/charclass.hxx>
 #include <unotools/transliterationwrapper.hxx>
 #include <tools/tenccvt.hxx>
+#include <svx/sdrundomanager.hxx>
 
 #include <com/sun/star/text/WritingMode2.hpp>
 #include <com/sun/star/script/vba/XVBACompatibility.hpp>
@@ -5290,7 +5291,11 @@ sal_Bool ScDocument::NeedPageResetAfterT
 SfxUndoManager* ScDocument::GetUndoManager()
 {
 	if (!mpUndoManager)
-		mpUndoManager = new SfxUndoManager;
+    {
+        // to support enhanced text edit for draw objects, use an SdrUndoManager
+		mpUndoManager = new SdrUndoManager;
+    }
+
 	return mpUndoManager;
 }
 

Modified: incubator/ooo/trunk/main/sc/source/ui/inc/drawview.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sc/source/ui/inc/drawview.hxx?rev=1371714&r1=1371713&r2=1371714&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sc/source/ui/inc/drawview.hxx (original)
+++ incubator/ooo/trunk/main/sc/source/ui/inc/drawview.hxx Fri Aug 10 14:27:36 2012
@@ -33,6 +33,7 @@ namespace com { namespace sun { namespac
 class ScDocument;
 class ScViewData;
 class ScDrawObjData;
+class SdrUndoManager;
 
 class ScDrawView: public FmFormView
 {
@@ -58,6 +59,9 @@ protected:
 
 	void ImplClearCalcDropMarker();
 
+    // support enhanced text edit for draw objects
+    virtual SdrUndoManager* getSdrUndoManagerForEnhancedTextEdit() const;
+
 public:
 					ScDrawView( OutputDevice* pOut, ScViewData* pData );
 	virtual			~ScDrawView();

Modified: incubator/ooo/trunk/main/sc/source/ui/view/drawview.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sc/source/ui/view/drawview.cxx?rev=1371714&r1=1371713&r2=1371714&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sc/source/ui/view/drawview.cxx (original)
+++ incubator/ooo/trunk/main/sc/source/ui/view/drawview.cxx Fri Aug 10 14:27:36 2012
@@ -42,6 +42,7 @@
 #include <svx/sdrpaintwindow.hxx>
 #include <sfx2/bindings.hxx>
 #include <sfx2/viewfrm.hxx>
+#include <svx/sdrundomanager.hxx>
 
 #include "drawview.hxx"
 #include "global.hxx"
@@ -59,6 +60,7 @@
 #include "userdat.hxx"
 #include "postit.hxx"
 #include "undocell.hxx"
+#include "document.hxx"
 
 #include "sc.hrc"
 
@@ -814,28 +816,10 @@ void ScDrawView::MarkDropObj( SdrObject*
 	}
 }
 
-//UNUSED2009-05 void ScDrawView::CaptionTextDirection( sal_uInt16 nSlot )
-//UNUSED2009-05 {
-//UNUSED2009-05     if(nSlot != SID_TEXTDIRECTION_LEFT_TO_RIGHT && nSlot != SID_TEXTDIRECTION_TOP_TO_BOTTOM)
-//UNUSED2009-05         return;
-//UNUSED2009-05 
-//UNUSED2009-05     SdrObject* pObject  = GetTextEditObject();
-//UNUSED2009-05     if ( ScDrawLayer::IsNoteCaption( pObject ) )
-//UNUSED2009-05     {
-//UNUSED2009-05         if( SdrCaptionObj* pCaption = dynamic_cast< SdrCaptionObj* >(
pObject ) )
-//UNUSED2009-05         {
-//UNUSED2009-05             SfxItemSet aAttr(pCaption->GetMergedItemSet());
-//UNUSED2009-05             aAttr.Put( SvxWritingModeItem(
-//UNUSED2009-05                 nSlot == SID_TEXTDIRECTION_LEFT_TO_RIGHT ?
-//UNUSED2009-05                     com::sun::star::text::WritingMode_LR_TB : com::sun::star::text::WritingMode_TB_RL,
-//UNUSED2009-05                     SDRATTR_TEXTDIRECTION ) );
-//UNUSED2009-05             pCaption->SetMergedItemSet(aAttr);
-//UNUSED2009-05             FuPoor* pPoor = pViewData->GetView()->GetDrawFuncPtr();
-//UNUSED2009-05             if ( pPoor )
-//UNUSED2009-05             {
-//UNUSED2009-05                 FuText* pText = static_cast<FuText*>(pPoor);
-//UNUSED2009-05                 pText->StopEditMode(sal_True);
-//UNUSED2009-05             }
-//UNUSED2009-05         }
-//UNUSED2009-05     }
-//UNUSED2009-05 }
+// support enhanced text edit for draw objects
+SdrUndoManager* ScDrawView::getSdrUndoManagerForEnhancedTextEdit() const
+{
+    return pDoc ? dynamic_cast< SdrUndoManager* >(pDoc->GetUndoManager()) : 0;
+}
+
+// eof



Mime
View raw message