[PATCH] Resolves fdo#62673 Table cells non-editable on cell merge

Karthikeyan Krishnamurthi (via Code Review) gerrit at gerrit.libreoffice.org
Mon Apr 8 03:04:22 PDT 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3273

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/73/3273/1

Resolves fdo#62673 Table cells non-editable on cell merge

Previously the area calculation for returning SDRTABLEHIT_CELL is
done only using the first(origin) cell in the range of merged cells.
Now changed to calculate the area of the remaining merged cells also.

Change-Id: I2d9244115d08e31b46dbe1a4998e6a763ee38361
---
M svx/source/table/svdotable.cxx
1 file changed, 11 insertions(+), 0 deletions(-)



diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 7c368f5..ab860f7 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -1145,6 +1145,17 @@
     if( xCell.is() )
     {
         nX += mpImpl->mpLayouter->getColumnWidth( rnX );
+
+        //Fix for fdo#62673 : non-editable cell in table on cell merge
+        sal_Int32 i=1;
+        xCell=mpImpl->getCell( CellPos( rnX+i, rnY) );
+        while(xCell.is() && xCell->isMerged())
+        {
+            nX += mpImpl->mpLayouter->getColumnWidth( rnX+i );
+            i++;
+            xCell=mpImpl->getCell( CellPos( rnX+i, rnY) );
+        }
+
         if( nX < xCell->GetTextLeftDistance() )
             return SDRTABLEHIT_CELL;
     }

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

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



More information about the LibreOffice mailing list