svx/source/table/tablecontroller.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
New commits: commit 60570afbeaa058b6f8a9b878cc41b1535ef6e5f0 Author: K_Karthikeyan <karthike...@kacst.edu.sa> Date: Sun Mar 24 09:18:31 2013 +0300 Resolves fdo#61540 On Insert before, the reference column whose size is going to be used for newly created column(s) is wrong. As the new columns are inserted before the reference column, the reference column moved to the new position by no., of new columns i.e (earlier+newcolumns). Change-Id: Ib52e3633aecb1220cdf709058391361376dc5f00 Reviewed-on: https://gerrit.libreoffice.org/2958 Reviewed-by: Petr Mladek <pmla...@suse.cz> Tested-by: Petr Mladek <pmla...@suse.cz> diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index 1cb3035..74c42cb 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -554,9 +554,14 @@ void SvxTableController::onInsert( sal_uInt16 nSId, const SfxItemSet* pArgs ) for( sal_Int32 nOffset = 0; nOffset < nNewColumns; nOffset++ ) { - Reference< XPropertySet >( xCols->getByIndex( aEnd.mnCol + nOffset + 1 ), UNO_QUERY_THROW )-> + // Resolves fdo#61540 + // On Insert before, the reference column whose size is going to be + // used for newly created column(s) is wrong. As the new columns are + // inserted before the reference column, the reference column moved + // to the new position by no., of new columns i.e (earlier+newcolumns). + Reference< XPropertySet >(xCols->getByIndex(nNewStartColumn+nOffset), UNO_QUERY_THROW )-> setPropertyValue( sSize, - Reference< XPropertySet >( xCols->getByIndex( aStart.mnCol + nOffset ), UNO_QUERY_THROW )-> + Reference< XPropertySet >(xCols->getByIndex( bInsertAfter?nNewStartColumn-1:nNewStartColumn+nNewColumns ), UNO_QUERY_THROW )-> getPropertyValue( sSize ) ); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits