summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
Diffstat (limited to 'svx')
-rw-r--r--svx/source/table/tablecontroller.cxx22
1 files changed, 20 insertions, 2 deletions
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index 55125b14eff4..1d7b3f8a3295 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -582,7 +582,10 @@ void SvxTableController::onInsert( sal_uInt16 nSId )
}
if( bUndo )
+ {
mpModel->EndUndo();
+ mpModel->SetChanged();
+ }
if( mpModel )
mpModel->SetChanged();
@@ -987,6 +990,9 @@ void SvxTableController::MergeMarkedCells()
SdrTableObj* pTableObj = dynamic_cast< ::sdr::table::SdrTableObj* >( mxTableObj.get() );
if( pTableObj )
{
+ if( pTableObj->IsTextEditActive() )
+ mpView->SdrEndTextEdit(sal_True);
+
TableModelNotifyGuard aGuard( mxTable.get() );
MergeRange( aStart.mnCol, aStart.mnRow, aEnd.mnCol, aEnd.mnRow );
}
@@ -1018,6 +1024,9 @@ void SvxTableController::SplitMarkedCells()
SdrTableObj* pTableObj = dynamic_cast< SdrTableObj* >( mxTableObj.get() );
if( pTableObj )
{
+ if( pTableObj->IsTextEditActive() )
+ mpView->SdrEndTextEdit(sal_True);
+
TableModelNotifyGuard aGuard( mxTable.get() );
const bool bUndo = mpModel && mpModel->IsUndoEnabled();
@@ -1476,7 +1485,16 @@ bool SvxTableController::executeAction( sal_uInt16 nAction, bool bSelect, Window
if( bSelect )
gotoCell( pTableObj->getPreviousCell( getSelectionEnd(), true ), false, pWindow, nAction );
else
- gotoCell( pTableObj->getNextCell( getSelectionEnd(), true ), false, pWindow, nAction );
+ {
+ CellPos aSelectionEnd( getSelectionEnd() );
+ CellPos aNextCell( pTableObj->getNextCell( aSelectionEnd, true ) );
+ if( aSelectionEnd == aNextCell )
+ {
+ onInsert( SID_TABLE_INSERT_ROW );
+ aNextCell = pTableObj->getNextCell( aSelectionEnd, true );
+ }
+ gotoCell( aNextCell, false, pWindow, nAction );
+ }
break;
}
}
@@ -1974,7 +1992,7 @@ void SvxTableController::MergeAttrFromSelectedCells(SfxItemSet& rAttr, bool bOnl
for( sal_Int32 nCol = aStart.mnCol; nCol <= aEnd.mnCol; nCol++ )
{
CellRef xCell( dynamic_cast< Cell* >( mxTable->getCellByPosition( nCol, nRow ).get() ) );
- if( xCell.is() )
+ if( xCell.is() && !xCell->isMerged() )
{
const SfxItemSet& rSet = xCell->GetItemSet();
SfxWhichIter aIter(rSet);