Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/2958

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/58/2958/1

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
---
M svx/source/table/tablecontroller.cxx
1 file changed, 11 insertions(+), 4 deletions(-)



diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index ff6037c..dd3065e 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -554,10 +554,17 @@
 
             for( sal_Int32 nOffset = 0; nOffset < nNewColumns; nOffset++ )
             {
-                Reference< XPropertySet >( xCols->getByIndex( aEnd.mnCol + nOffset + 1 ), 
UNO_QUERY_THROW )->
-                    setPropertyValue( sSize,
-                        Reference< XPropertySet >( xCols->getByIndex( aStart.mnCol + nOffset ), 
UNO_QUERY_THROW )->
-                            getPropertyValue( sSize ) );
+              /*
+                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( bInsertAfter?nNewStartColumn-1:nNewStartColumn+nNewColumns 
), UNO_QUERY_THROW )->
+                      getPropertyValue( sSize ) );
             }
 
             if( bUndo )

-- 
To view, visit https://gerrit.libreoffice.org/2958
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib52e3633aecb1220cdf709058391361376dc5f00
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Karthikeyan Krishnamurthi <karthikeyan@kacst.edu.sa>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.