[Libreoffice-commits] .: 2 commits - sc/inc sc/source

Markus Mohrhard mmohrhard at kemper.freedesktop.org
Thu Aug 9 15:48:41 PDT 2012


 sc/inc/document.hxx              |    4 ++--
 sc/inc/table.hxx                 |   10 +++++-----
 sc/source/core/data/document.cxx |    4 ++--
 sc/source/core/data/table1.cxx   |   10 +++++-----
 4 files changed, 14 insertions(+), 14 deletions(-)

New commits:
commit 067dca9c3e70091850dbb1d374170c2fce708e84
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Aug 9 23:48:48 2012 +0200

    make more calc methods const
    
    Change-Id: Ifc4775546ded8f524379946eb799dbbb314f7e8c

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 7b8e48b..ba23156 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -955,9 +955,9 @@ public:
                                             SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab,
                                             ScDirection eDir );
 
-    SC_DLLPUBLIC void           FindAreaPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, ScMoveDirection eDirection );
+    SC_DLLPUBLIC void           FindAreaPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, ScMoveDirection eDirection ) const;
     SC_DLLPUBLIC void           GetNextPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCsCOL nMovX, SCsROW nMovY,
-                                bool bMarked, bool bUnprotected, const ScMarkData& rMark );
+                                bool bMarked, bool bUnprotected, const ScMarkData& rMark ) const;
 
     bool            GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, SCTAB nTab,
                                         const ScMarkData& rMark );
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 2d073de..f4709bf 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -426,7 +426,7 @@ public:
 
     void        FindAreaPos( SCCOL& rCol, SCROW& rRow, ScMoveDirection eDirection ) const;
     void        GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY,
-                                bool bMarked, bool bUnprotected, const ScMarkData& rMark );
+                                bool bMarked, bool bUnprotected, const ScMarkData& rMark ) const;
 
     void        LimitChartArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow );
 
@@ -813,7 +813,7 @@ private:
                         sal_uLong nFillCount, FillDir eFillDir, ScProgress* pProgress );
 
     bool        ValidNextPos( SCCOL nCol, SCROW nRow, const ScMarkData& rMark,
-                                bool bMarked, bool bUnprotected );
+                                bool bMarked, bool bUnprotected ) const;
 
     void        AutoFormatArea(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
                                 const ScPatternAttr& rAttr, sal_uInt16 nFormatNo);
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index c160b68..d660686 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -5310,7 +5310,7 @@ SCSIZE ScDocument::GetEmptyLinesInBlock( SCCOL nStartCol, SCROW nStartRow, SCTAB
 }
 
 
-void ScDocument::FindAreaPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, ScMoveDirection eDirection )
+void ScDocument::FindAreaPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, ScMoveDirection eDirection ) const
 {
     if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
         maTabs[nTab]->FindAreaPos( rCol, rRow, eDirection );
@@ -5318,7 +5318,7 @@ void ScDocument::FindAreaPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, ScMoveDirect
 
 
 void ScDocument::GetNextPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCsCOL nMovX, SCsROW nMovY,
-                                bool bMarked, bool bUnprotected, const ScMarkData& rMark )
+                                bool bMarked, bool bUnprotected, const ScMarkData& rMark ) const
 {
     OSL_ENSURE( !nMovX || !nMovY, "GetNextPos: nur X oder Y" );
 
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 1cfa06b..1ca2760 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -1182,7 +1182,7 @@ void ScTable::FindAreaPos( SCCOL& rCol, SCROW& rRow, ScMoveDirection eDirection
 }
 
 bool ScTable::ValidNextPos( SCCOL nCol, SCROW nRow, const ScMarkData& rMark,
-                                bool bMarked, bool bUnprotected )
+                                bool bMarked, bool bUnprotected ) const
 {
     if (!ValidCol(nCol) || !ValidRow(nRow))
         return false;
@@ -1215,7 +1215,7 @@ bool ScTable::ValidNextPos( SCCOL nCol, SCROW nRow, const ScMarkData& rMark,
 }
 
 void ScTable::GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY,
-                                bool bMarked, bool bUnprotected, const ScMarkData& rMark )
+                                bool bMarked, bool bUnprotected, const ScMarkData& rMark ) const
 {
     if (bUnprotected && !IsProtected())     // Tabelle ueberhaupt geschuetzt?
         bUnprotected = false;
commit 8f92384031e332024ba39693b855bde67e033ac9
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Aug 9 21:26:42 2012 +0200

    make some methods const
    
    Change-Id: I45dfad63c364b515e83f6498f79a64f6de6a2396

diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 8748326..2d073de 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -424,7 +424,7 @@ public:
     SCSIZE      GetEmptyLinesInBlock( SCCOL nStartCol, SCROW nStartRow,
                                         SCCOL nEndCol, SCROW nEndRow, ScDirection eDir );
 
-    void        FindAreaPos( SCCOL& rCol, SCROW& rRow, ScMoveDirection eDirection );
+    void        FindAreaPos( SCCOL& rCol, SCROW& rRow, ScMoveDirection eDirection ) const;
     void        GetNextPos( SCCOL& rCol, SCROW& rRow, SCsCOL nMovX, SCsROW nMovY,
                                 bool bMarked, bool bUnprotected, const ScMarkData& rMark );
 
@@ -913,9 +913,9 @@ private:
 
     void        CopyPrintRange(const ScTable& rTable);
 
-    SCCOL       FindNextVisibleColWithContent(SCCOL nCol, bool bRight, SCROW nRow);
+    SCCOL       FindNextVisibleColWithContent(SCCOL nCol, bool bRight, SCROW nRow) const;
 
-    SCCOL       FindNextVisibleCol(SCCOL nCol, bool bRight);
+    SCCOL       FindNextVisibleCol(SCCOL nCol, bool bRight) const;
 
     /**
      * Use this to iterate through non-empty visible cells in a single column.
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index e8c5d2e..1cfa06b 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -1053,7 +1053,7 @@ void ScTable::LimitChartArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol
         --rEndRow;
 }
 
-SCCOL ScTable::FindNextVisibleCol( SCCOL nCol, bool bRight )
+SCCOL ScTable::FindNextVisibleCol( SCCOL nCol, bool bRight ) const
 {
     if(bRight)
     {
@@ -1077,7 +1077,7 @@ SCCOL ScTable::FindNextVisibleCol( SCCOL nCol, bool bRight )
     }
 }
 
-SCCOL ScTable::FindNextVisibleColWithContent( SCCOL nCol, bool bRight, SCROW nRow )
+SCCOL ScTable::FindNextVisibleColWithContent( SCCOL nCol, bool bRight, SCROW nRow ) const
 {
     if(bRight)
     {
@@ -1129,7 +1129,7 @@ SCCOL ScTable::FindNextVisibleColWithContent( SCCOL nCol, bool bRight, SCROW nRo
     }
 }
 
-void ScTable::FindAreaPos( SCCOL& rCol, SCROW& rRow, ScMoveDirection eDirection )
+void ScTable::FindAreaPos( SCCOL& rCol, SCROW& rRow, ScMoveDirection eDirection ) const
 {
     if (eDirection == SC_MOVE_LEFT || eDirection == SC_MOVE_RIGHT)
     {


More information about the Libreoffice-commits mailing list