diff options
author | K_Karthikeyan <karthikeyan@kacst.edu.sa> | 2013-03-24 09:18:31 +0300 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2013-03-26 16:55:29 +0000 |
commit | 60570afbeaa058b6f8a9b878cc41b1535ef6e5f0 (patch) | |
tree | acd71c16e582d65a04a4bc2b03c0176d25b8d459 /svx | |
parent | 5a5c8e253abbef5626dab70f8978275ac3c742f8 (diff) |
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 <pmladek@suse.cz>
Tested-by: Petr Mladek <pmladek@suse.cz>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/table/tablecontroller.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index 1cb3035e4abb..74c42cb86e38 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 ) ); } |