summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2009-02-02 10:37:42 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2009-02-02 10:37:42 +0000
commitf3314ac07f3147f1478795e290153f9fdf2a5200 (patch)
tree19d54c78f63d42d3eab86079bbe739c295791332
parent452d2640c41097c0663bc3928c312ba314b67a65 (diff)
CWS-TOOLING: integrate CWS impress166_OOO310
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
-rw-r--r--svx/source/svdraw/svdotext.cxx3
-rw-r--r--svx/source/svdraw/svdotxed.cxx3
-rw-r--r--svx/source/table/cell.cxx16
-rw-r--r--svx/source/table/cell.hxx2
-rw-r--r--svx/source/table/tableundo.cxx48
-rw-r--r--svx/source/table/tableundo.hxx5
-rw-r--r--xmloff/source/text/txtprmap.cxx4
7 files changed, 60 insertions, 21 deletions
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index a2fc403f93..11332376f6 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 d7de91a707..a3f5fb76d1 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 158f9aced4..40e1456ffd 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 8299aa5342..35aa44b1af 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 b39d44ad43..a6c5ff1e3b 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 8ab12a9428..36e71a254f 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
{
diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx
index 83fa7436ff..1a7b3631e5 100644
--- a/xmloff/source/text/txtprmap.cxx
+++ b/xmloff/source/text/txtprmap.cxx
@@ -378,6 +378,8 @@ XMLPropertyMapEntry aXMLParaPropMap[] =
MP_E( "DefaultOutlineLevel", STYLE, DEFAULT_OUTLINE_LEVEL, XML_TYPE_TEXT_NUMBER8_ONE_BASED|MID_FLAG_SPECIAL_ITEM_EXPORT|MID_FLAG_NO_PROPERTY_IMPORT, CTF_DEFAULT_OUTLINE_LEVEL ),
+ MP_ED( "FontIndependentLineSpacing", STYLE, FONT_INDEPENDENT_LINE_SPACING, XML_TYPE_BOOL, 0 ),
+
M_END()
};
@@ -390,8 +392,6 @@ XMLPropertyMapEntry aXMLAdditionalTextDefaultsMap[] =
// OD 2004-05-05 #i28701# - RES_WRAP_INFLUENCE_ON_OBJPOS
MG_ED( "WrapInfluenceOnPosition", DRAW, WRAP_INFLUENCE_ON_POSITION, XML_TYPE_WRAP_INFLUENCE_ON_POSITION, 0 ),
- MP_ED( "FontIndependentLineSpacing", STYLE, FONT_INDEPENDENT_LINE_SPACING, XML_TYPE_BOOL, 0 ),
-
M_END()
};