Commits

Anonymous committed b36a5f2

#i10000# fix bad integration

Comments (0)

Files changed (1)

svx/source/table/tablecontroller.cxx

 			}
 
 			if( bUndo )
+            {
 				mpModel->EndUndo();
+                mpModel->SetChanged();
+            }
 
 			if( mpModel )
 				mpModel->SetChanged();
 	SdrTableObj* pTableObj = dynamic_cast< ::sdr::table::SdrTableObj* >( mxTableObj.get() );
 	if( pTableObj )
 	{
-		TableModelNotifyGuard aGuard( mxTable.get() );
+	    if( pTableObj->IsTextEditActive() )
+		    mpView->SdrEndTextEdit(sal_True);
+
+        TableModelNotifyGuard aGuard( mxTable.get() );
 		MergeRange( aStart.mnCol, aStart.mnRow, aEnd.mnCol, aEnd.mnRow );
 	}
 }
 			SdrTableObj* pTableObj = dynamic_cast< SdrTableObj* >( mxTableObj.get() );
 			if( pTableObj )
 			{
-				TableModelNotifyGuard aGuard( mxTable.get() );
+        	    if( pTableObj->IsTextEditActive() )
+		            mpView->SdrEndTextEdit(sal_True);
+
+                TableModelNotifyGuard aGuard( mxTable.get() );
 
 				const bool bUndo = mpModel && mpModel->IsUndoEnabled();
 				if( bUndo )
 		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;
 	}
 	}
 			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);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.