[Libreoffice-commits] core.git: 5 commits - sw/inc sw/source

Caolán McNamara caolanm at redhat.com
Thu Nov 21 06:06:49 PST 2013


 sw/inc/redline.hxx                |    2 +-
 sw/source/core/doc/docedt.cxx     |    6 +++---
 sw/source/core/doc/docredln.cxx   |   20 ++++++++++----------
 sw/source/core/inc/txtfrm.hxx     |    2 +-
 sw/source/filter/ww8/wrtw8esh.cxx |    4 ++--
 5 files changed, 17 insertions(+), 17 deletions(-)

New commits:
commit 6de7da389a9b607ebdf1a01a58ccf1bfbff42007
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 21 09:59:54 2013 +0000

    longparas: these are really xub_StrLens
    
    Change-Id: Ia754de347f277a07479e4056b7c9a03534a3dab4

diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx
index b49b6d9..3256bb3 100644
--- a/sw/inc/redline.hxx
+++ b/sw/inc/redline.hxx
@@ -247,7 +247,7 @@ public:
     void ShowOriginal( sal_uInt16 nLoop = 0 );
 
     /// Calculates the intersection with text node number nNdIdx.
-    void CalcStartEnd( sal_uLong nNdIdx, sal_uInt16& nStart, sal_uInt16& nEnd ) const;
+    void CalcStartEnd( sal_uLong nNdIdx, xub_StrLen& rStart, xub_StrLen& rEnd ) const;
 
     /// Initiate the layout.
     void InvalidateRange();
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index ee4db26..2e606aa 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -3258,36 +3258,36 @@ void SwRedline::InvalidateRange()       // trigger the Layout
 
 /** Calculates the start and end position of the intersection rTmp and
     text node nNdIdx */
-void SwRedline::CalcStartEnd( sal_uLong nNdIdx, sal_uInt16& nStart, sal_uInt16& nEnd ) const
+void SwRedline::CalcStartEnd( sal_uLong nNdIdx, xub_StrLen& rStart, xub_StrLen& rEnd ) const
 {
     const SwPosition *pRStt = Start(), *pREnd = End();
     if( pRStt->nNode < nNdIdx )
     {
         if( pREnd->nNode > nNdIdx )
         {
-            nStart = 0;             // Paragraph is completely enclosed
-            nEnd = STRING_LEN;
+            rStart = 0;             // Paragraph is completely enclosed
+            rEnd = STRING_LEN;
         }
         else
         {
             OSL_ENSURE( pREnd->nNode == nNdIdx,
                 "SwRedlineItr::Seek: GetRedlinePos Error" );
-            nStart = 0;             // Paragraph is overlapped in the beginning
-            nEnd = pREnd->nContent.GetIndex();
+            rStart = 0;             // Paragraph is overlapped in the beginning
+            rEnd = pREnd->nContent.GetIndex();
         }
     }
     else if( pRStt->nNode == nNdIdx )
     {
-        nStart = pRStt->nContent.GetIndex();
+        rStart = pRStt->nContent.GetIndex();
         if( pREnd->nNode == nNdIdx )
-            nEnd = pREnd->nContent.GetIndex(); // Within the Paragraph
+            rEnd = pREnd->nContent.GetIndex(); // Within the Paragraph
         else
-            nEnd = STRING_LEN;      // Paragraph is overlapped in the end
+            rEnd = STRING_LEN;      // Paragraph is overlapped in the end
     }
     else
     {
-        nStart = STRING_LEN;
-        nEnd = STRING_LEN;
+        rStart = STRING_LEN;
+        rEnd = STRING_LEN;
     }
 }
 
commit 522fd11122b1bb5f4ec110ea4a12bb7640d0f795
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 21 10:20:54 2013 +0000

    longparas: this should be xub_Strlen
    
    Change-Id: I018104df6fcae8bf1474db1479742238d1cb4cd2

diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index 02d9100..345a569 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -512,7 +512,7 @@ public:
     sal_Bool FillRegister( SwTwips& rRegStart, sal_uInt16& rRegDiff );
 
 
-    sal_uInt16 GetLineCount( sal_uInt16 nPos );     //Ermittelt die Zeilenanzahl
+    sal_uInt16 GetLineCount( xub_StrLen nPos );     //Ermittelt die Zeilenanzahl
 
     //Fuer die Anzeige der Zeilennummern.
     sal_uLong GetAllLines()  const { return nAllLines; }
commit 99469a024f2a9a6146c7f8d745557a361fac2e1d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 21 09:57:29 2013 +0000

    longparas: these are really xub_StrLens
    
    Change-Id: I512bf822fcccd158bbe57184ea85a9a72724ca8c

diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index e3b5542..599e0ad 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -1105,10 +1105,10 @@ rtl_TextEncoding MSWord_SdrAttrIter::GetNextCharSet() const
 // der erste Parameter in SearchNext() liefert zurueck, ob es ein TxtAtr ist.
 xub_StrLen MSWord_SdrAttrIter::SearchNext( xub_StrLen nStartPos )
 {
-    sal_uInt16 nMinPos = STRING_MAXLEN;
+    xub_StrLen nMinPos = STRING_MAXLEN;
     for(std::vector<EECharAttrib>::const_iterator i = aTxtAtrArr.begin(); i < aTxtAtrArr.end(); ++i)
     {
-        sal_uInt16 nPos = i->nStart; // gibt erstes Attr-Zeichen
+        xub_StrLen nPos = i->nStart; // gibt erstes Attr-Zeichen
         if( nPos >= nStartPos && nPos <= nMinPos )
         {
             nMinPos = nPos;
commit 97d78086d9f832df1d6fad4e5a7ae99682f09ba9
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 21 09:40:59 2013 +0000

    longparas: ditch unused argument
    
    Change-Id: I023a4bee6bf92acc21f0b4821f45b0a47b2da78f

diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index e7b9570..d9bd0ca 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -1789,7 +1789,7 @@ bool SwDoc::DeleteRange( SwPaM & rPam )
 }
 
 static void lcl_syncGrammarError( SwTxtNode &rTxtNode, linguistic2::ProofreadingResult& rResult,
-    xub_StrLen /*nBeginGrammarCheck*/, const ModelToViewHelper &rConversionMap )
+    const ModelToViewHelper &rConversionMap )
 {
     if( rTxtNode.IsGrammarCheckDirty() )
         return;
@@ -1936,7 +1936,7 @@ uno::Any SwDoc::Spell( SwPaM& rPaM,
                                     aResult = xGCIterator->checkSentenceAtPosition(
                                             xDoc, xFlatPara, aExpandText, lang::Locale(), nBeginGrammarCheck, -1, -1 );
 
-                                    lcl_syncGrammarError( *((SwTxtNode*)pNd), aResult, nBeginGrammarCheck, aConversionMap );
+                                    lcl_syncGrammarError( *((SwTxtNode*)pNd), aResult, aConversionMap );
 
                                     // get suggestions to use for the specific error position
                                     nGrammarErrors = aResult.aErrors.getLength();
commit 225e4b750802b67a1b4bf630471c578ddf0d9db1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 21 09:39:40 2013 +0000

    longparas: safe xub_Strlen->sal_Int32
    
    Change-Id: Id1425d80908aca5c44f028ccc79e597afa175b00

diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 18f80ba..e7b9570 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -2764,7 +2764,7 @@ void SwDoc::RemoveLeadingWhiteSpace(const SwPosition & rPos )
     if ( pTNd )
     {
         const OUString& rTxt = pTNd->GetTxt();
-        xub_StrLen nIdx = 0;
+        sal_Int32 nIdx = 0;
         while (nIdx < rTxt.getLength())
         {
             sal_Unicode const cCh = rTxt[nIdx];


More information about the Libreoffice-commits mailing list