Apache OpenOffice (AOO) Bugzilla – Issue 128599
During merge in the AMJ column, don't ask to move cells if they are all empty
Last modified: 2024-04-21 07:52:04 UTC
A new Calc document: in one column select a range of blank cells (or a range of cells in which only the first one is not blank). Now merge them (choose menu Format ⟶ Merge Cells or the "Merge Cells" button on the Formatting bar). Calc shall merge the cells but when the range is in the last column of the sheet, i.e. AMJ (1024), Calc will first ask: Should the contents of the hidden cells be moved into the first cell? This shouldn't happen because it doesn't happen with any column other than AMJ. Issue reproducible with 4.1.15 and the lastest 4.2dev. SOURCE CODE POINTER, file: main/sc/source/ui/view/viewfun2.cxx Consider the condition on line 1130 below if the value of "nStartCol" corresponds to the AMJ column. ------------------------ 1129 if ( !pDoc->IsBlockEmpty( nStartTab, nStartCol,nStartRow+1, nStartCol,nEndRow, true ) || 1130 !pDoc->IsBlockEmpty( nStartTab, nStartCol+1,nStartRow, nEndCol,nEndRow, true ) ) 1131 { 1132 if (!bApi) 1133 { 1134 MessBox aBox( GetViewData()->GetDialogParent(), 1135 WinBits(WB_YES_NO_CANCEL | WB_DEF_NO), 1136 ScGlobal::GetRscString( STR_MSSG_DOSUBTOTALS_0 ), 1137 ScGlobal::GetRscString( STR_MERGE_NOTEMPTY ) ); 1138 sal_uInt16 nRetVal = aBox.Execute(); 1139 1140 if ( nRetVal == RET_YES ) 1141 rDoContents = sal_True; 1142 else if ( nRetVal == RET_CANCEL ) 1143 bOk = sal_False; 1144 } 1145 } ------------------------