diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2009-06-17 12:31:00 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2009-06-17 12:31:00 +0000 |
commit | a5a569e618519de7611d7aff935024f0d88ddb4f (patch) | |
tree | ae283d571e91c0d7a9b340dcaa4e6ed16c10740b /svx | |
parent | 9b8a5f0231f90a85d6fcca4fee5c72ed76b0dc6e (diff) |
#i10000# fix bad integration
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/table/tablecontroller.cxx | 22 |
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); |