diff options
author | Oliver Bolte <obo@openoffice.org> | 2009-02-12 12:44:26 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2009-02-12 12:44:26 +0000 |
commit | 520f0e3413513f68c572ad53e71b3b84a54b5e30 (patch) | |
tree | 7536c8ae3fea39c04eb5f52dafe423014a457aaf /svx/source | |
parent | 65e36d7972447743930358d9463e7bcdf1276f37 (diff) |
CWS-TOOLING: integrate CWS impress166
2009-01-27 11:42:29 +0100 af r266972 : #i98508# Handle non DrawViewShell view shells correctly.
2009-01-21 10:41:32 +0100 af r266635 : #i98069# Do not call PreModelChange() for every ModelLock.
2009-01-20 15:25:41 +0100 af r266588 : #i98069# Added friend declaration that became necessary on Solaris after recent changes.
2009-01-19 13:48:47 +0100 af r266493 : #i97478# Prevent SID_PARASPACE_(DE|IN)CREASE from crashing when style sheet is missing.
2009-01-16 11:52:37 +0100 af r266411 : #i97338# Check the dispatcher before using it to show a context menu.
2009-01-15 14:33:55 +0100 sj r266373 : #153716# taking care of font-independent line spacing (editmode and hittest)
2009-01-15 14:29:46 +0100 sj r266372 : #153716# taking care of font-independent line spacing also in presentation styles
2009-01-14 14:04:16 +0100 af r266301 : #i97634# Do view change synchronously. Use shared pointers for view shells.
2009-01-14 14:01:27 +0100 af r266300 : #i97634# Added non-API methods that update the configuration synchronously.
2009-01-14 13:34:40 +0100 af r266295 : #i98069# Be more carefull with handling model updates to avoid assertion regarding number of selected pages.
2009-01-14 11:34:57 +0100 cl r266270 : #i97261# force outliner para oibject after text edit
2009-01-14 10:49:08 +0100 cl r266269 : #i97413# dispose cell undo action if shape dies
2009-01-13 18:50:05 +0100 cl r266247 : #i97347# fixed cell undo crash
2009-01-12 14:16:56 +0100 af r266156 : #i97296# Using is() method to check WeakReference for validity.
2009-01-12 13:52:00 +0100 af r266155 : #i97190# Turned static_cast to dynamic_cast in CreateChildList.
2009-01-12 13:06:57 +0100 af r266153 : #i97552# Catching Exceptions caught while accessing OLE-Object that is to be inserted.
2009-01-12 13:06:37 +0100 cl r266152 : #i96164# applied patch to fix ambiguous operation
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/svdraw/svdotext.cxx | 3 | ||||
-rw-r--r-- | svx/source/svdraw/svdotxed.cxx | 3 | ||||
-rw-r--r-- | svx/source/table/cell.cxx | 16 | ||||
-rw-r--r-- | svx/source/table/cell.hxx | 2 | ||||
-rw-r--r-- | svx/source/table/tableundo.cxx | 48 | ||||
-rw-r--r-- | svx/source/table/tableundo.hxx | 5 |
6 files changed, 58 insertions, 19 deletions
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index dd2fc5e9cd9c..9e38a0994bad 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -910,7 +910,10 @@ void SdrTextObj::TakeTextRect( SdrOutliner& rOutliner, Rectangle& rTextRect, FAS pTestObj->GetOutlinerParaObject() != pOutlinerParaObject ) { if( bHitTest ) // #i33696# take back fix #i27510# + { rOutliner.SetTextObj( this ); + rOutliner.SetFixedCellHeight(((const SdrTextFixedCellHeightItem&)GetMergedItem(SDRATTR_TEXT_USEFIXEDCELLHEIGHT)).GetValue()); + } rOutliner.SetUpdateMode(TRUE); rOutliner.SetText(*pPara); diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx index 42645bc9aecb..3b1a304bf9d4 100644 --- a/svx/source/svdraw/svdotxed.cxx +++ b/svx/source/svdraw/svdotxed.cxx @@ -39,6 +39,7 @@ #include <editstat.hxx> #include <svtools/itemset.hxx> #include <svx/eeitem.hxx> +#include <svx/sdtfchim.hxx> //////////////////////////////////////////////////////////////////////////////////////////////////// // @@ -91,7 +92,9 @@ sal_Bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl) if(pOutlinerParaObject!=NULL) { rOutl.SetText(*GetOutlinerParaObject()); + rOutl.SetFixedCellHeight(((const SdrTextFixedCellHeightItem&)GetMergedItem(SDRATTR_TEXT_USEFIXEDCELLHEIGHT)).GetValue()); } + // ggf. Rahmenattribute am 1. (neuen) Absatz des Outliners setzen if( !HasTextImpl( &rOutl ) ) { diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index 4eb4fd0118dc..3063f782ae64 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -678,6 +678,9 @@ void Cell::SetOutlinerParaObject( OutlinerParaObject* pTextObject ) { SdrText::SetOutlinerParaObject( pTextObject ); maSelection.nStartPara = 0xffff; + + if( pTextObject == 0 ) + ForceOutlinerParaObject( OUTLINERMODE_TEXTOBJECT ); } // ----------------------------------------------------------------------------- @@ -694,15 +697,22 @@ void Cell::AddUndo() // ----------------------------------------------------------------------------- -sdr::properties::TextProperties* Cell::CloneProperties( SdrObject& rNewObj, Cell& rNewCell ) +sdr::properties::TextProperties* Cell::CloneProperties( sdr::properties::TextProperties* pProperties, SdrObject& rNewObj, Cell& rNewCell ) { - if( mpProperties ) - return new sdr::properties::CellProperties( *static_cast<sdr::properties::CellProperties*>(mpProperties), rNewObj, &rNewCell ); + if( pProperties ) + return new sdr::properties::CellProperties( *static_cast<sdr::properties::CellProperties*>(pProperties), rNewObj, &rNewCell ); else return 0; } // ----------------------------------------------------------------------------- + +sdr::properties::TextProperties* Cell::CloneProperties( SdrObject& rNewObj, Cell& rNewCell ) +{ + return CloneProperties(mpProperties,rNewObj,rNewCell); +} + +// ----------------------------------------------------------------------------- // XInterface // ----------------------------------------------------------------------------- diff --git a/svx/source/table/cell.hxx b/svx/source/table/cell.hxx index 02d5d1dc30cc..15be15b2b6af 100644 --- a/svx/source/table/cell.hxx +++ b/svx/source/table/cell.hxx @@ -202,6 +202,8 @@ public: sdr::properties::TextProperties* CloneProperties( SdrObject& rNewObj, Cell& rNewCell ); + static sdr::properties::TextProperties* CloneProperties( sdr::properties::TextProperties* pProperties, SdrObject& rNewObj, Cell& rNewCell ); + void notifyModified(); protected: diff --git a/svx/source/table/tableundo.cxx b/svx/source/table/tableundo.cxx index 91235c908e0b..9f872fded787 100644 --- a/svx/source/table/tableundo.cxx +++ b/svx/source/table/tableundo.cxx @@ -40,6 +40,7 @@ #include "tablerow.hxx" #include "tablecolumn.hxx" + // ----------------------------------------------------------------------------- using ::rtl::OUString; @@ -56,22 +57,36 @@ CellUndo::CellUndo( const SdrObjectWeakRef& xObjRef, const CellRef& xCell ) , mxCell( xCell ) , mbUndo( true ) { - - getDataFromCell( maUndoData ); + if( mxCell.is() && mxObjRef.is() ) + { + getDataFromCell( maUndoData ); + mxObjRef->AddObjectUser( *this ); + } } CellUndo::~CellUndo() { - if( mbUndo ) - { - delete maUndoData.mpProperties; - delete maUndoData.mpOutlinerParaObject; - } - else - { - delete maRedoData.mpProperties; - delete maRedoData.mpOutlinerParaObject; - } + if( mxObjRef.is() ) + mxObjRef->RemoveObjectUser( *this ); + dispose(); +} + +void CellUndo::dispose() +{ + mxCell.clear(); + delete maUndoData.mpProperties; + maUndoData.mpProperties = 0; + delete maRedoData.mpProperties; + maRedoData.mpProperties = 0; + delete maUndoData.mpOutlinerParaObject; + maUndoData.mpOutlinerParaObject = 0; + delete maRedoData.mpOutlinerParaObject; + maRedoData.mpOutlinerParaObject = 0; +} + +void CellUndo::ObjectInDestruction(const SdrObject& ) +{ + dispose(); } void CellUndo::Undo() @@ -88,7 +103,7 @@ void CellUndo::Undo() void CellUndo::Redo() { - if( mxCell.is() && mbUndo ) + if( mxCell.is() && !mbUndo ) { setDataToCell( maRedoData ); mbUndo = true; @@ -110,8 +125,11 @@ BOOL CellUndo::Merge( SfxUndoAction *pNextAction ) void CellUndo::setDataToCell( const Data& rData ) { - mxCell->mpProperties = rData.mpProperties; - + delete mxCell->mpProperties; + if( rData.mpProperties ) + mxCell->mpProperties = Cell::CloneProperties( rData.mpProperties, *mxObjRef.get(), *mxCell.get() ); + else + mxCell->mpProperties = 0; if( rData.mpOutlinerParaObject ) mxCell->SetOutlinerParaObject( rData.mpOutlinerParaObject->Clone() ); diff --git a/svx/source/table/tableundo.hxx b/svx/source/table/tableundo.hxx index 07adeb872192..cc6c73ce5367 100644 --- a/svx/source/table/tableundo.hxx +++ b/svx/source/table/tableundo.hxx @@ -50,7 +50,7 @@ class OutlinerParaObject; namespace sdr { namespace table { -class CellUndo : public SdrUndoAction +class CellUndo : public SdrUndoAction, public sdr::ObjectUser { public: CellUndo( const SdrObjectWeakRef& xObjRef, const CellRef& xCell ); @@ -60,6 +60,9 @@ public: virtual void Redo(); virtual BOOL Merge( SfxUndoAction *pNextAction ); + void dispose(); + virtual void ObjectInDestruction(const SdrObject& rObject); + private: struct Data { |