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/4030

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/30/4030/1

prevent increase indent from running outside the cell

i have take ColWidth value and take out 200 to keep at lesat on letter inside the cell

Change-Id: I8d4518845f64044dea2f4ecd393cc625eebc6302
---
M sc/source/core/data/attarray.cxx
1 file changed, 5 insertions(+), 2 deletions(-)



diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 7ef3103..dc3ab8a 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -1656,12 +1656,15 @@
                         || ((const SvxHorJustifyItem*)pItem)->GetValue() != SVX_HOR_JUSTIFY_LEFT );
         sal_uInt16 nOldValue = ((const SfxUInt16Item&)rOldSet.Get( ATTR_INDENT )).GetValue();
         sal_uInt16 nNewValue = nOldValue;
+        //to keep Increment indent from running outside the cell
+        long nColWidth = (long)pDocument->GetColWidth(nCol,nTab);
+
         if ( bIncrement )
         {
-            if ( nNewValue < SC_MAX_INDENT )
+            if ( nNewValue < nColWidth-200 )
             {
                 nNewValue += SC_INDENT_STEP;
-                if ( nNewValue > SC_MAX_INDENT ) nNewValue = SC_MAX_INDENT;
+                if ( nNewValue > nColWidth-200 ) nNewValue = nColWidth-200;
             }
         }
         else

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d4518845f64044dea2f4ecd393cc625eebc6302
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: abdulmajeed ahmed <aalabdulrazzaq@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.