[Libreoffice-commits] core.git: sc/source

Kohei Yoshida kohei.yoshida at collabora.com
Fri Oct 14 00:50:09 UTC 2016


 sc/source/ui/inc/viewdata.hxx  |   12 ++++++++++++
 sc/source/ui/view/viewdata.cxx |    3 ++-
 2 files changed, 14 insertions(+), 1 deletion(-)

New commits:
commit d800825f0d673071519846431e4113c1bd292482
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Thu Oct 13 20:45:09 2016 -0400

    Annotate the code a bit around EditGrowX/Y.
    
    Change-Id: Ib7ee2e4aa393b7d842aeaf0569f104eee17ea4ad

diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index d4b5a04..4986e1f 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -444,7 +444,19 @@ public:
     EditView*       GetEditView( ScSplitPos eWhich ) const
                                         { return pEditView[eWhich]; }
 
+    /**
+     * Extend the output area for the edit engine view in a horizontal
+     * direction as needed.
+     */
     void            EditGrowX();
+
+    /**
+     * Extend the output area for the edit engine view in a vertical direction
+     * as needed.
+     *
+     * @param bInitial when true, then the call originates from a brand-new
+     *                 edit engine instance.
+     */
     void            EditGrowY( bool bInitial = false );
 
     ScSplitPos      GetEditActivePart() const       { return eEditActivePart; }
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 7763af3..4eb61f0 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -1212,6 +1212,7 @@ void ScViewData::EditGrowX()
         static_cast<ScEditEngineDefaulter*>( pCurView->GetEditEngine() );
     vcl::Window* pWin = pCurView->GetWindow();
 
+    // Get the left- and right-most column positions.
     SCCOL nLeft = GetPosX(eHWhich);
     SCCOL nRight = nLeft + VisibleCellsX(eHWhich);
 
@@ -1219,7 +1220,7 @@ void ScViewData::EditGrowX()
     Rectangle   aArea = pCurView->GetOutputArea();
     long        nOldRight = aArea.Right();
 
-    //  Margin ist schon bei der urspruenglichen Breite beruecksichtigt
+    // Margin is already included in the original width.
     long nTextWidth = pEngine->CalcTextWidth();
 
     bool bChanged = false;


More information about the Libreoffice-commits mailing list