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 | 1a3a1ba913c73a3ed06b4682128e59d48f343566 (patch) | |
tree | 549e63028154117d66a56a9cf65afa56917ca414 /svx/source/table | |
parent | 362b77882077e3564973a86ffed1e82587852356 (diff) |
#i10000# fix bad integration
Diffstat (limited to 'svx/source/table')
-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 c07bb66512..2a9aa3ecdf 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); |