[Libreoffice-commits] core.git: accessibility/source basctl/source idl/inc idl/source

Shubham Verma lifemeansmore008 at gmail.com
Tue Feb 27 16:52:13 UTC 2018


 accessibility/source/extended/textwindowaccessibility.cxx |    2 +-
 basctl/source/basicide/baside2.cxx                        |    2 +-
 basctl/source/basicide/baside2.hxx                        |    2 +-
 basctl/source/basicide/baside2b.cxx                       |    4 ++--
 basctl/source/basicide/basides3.cxx                       |    4 ++--
 basctl/source/basicide/bastypes.cxx                       |    6 +++---
 basctl/source/inc/bastypes.hxx                            |    2 +-
 idl/inc/lex.hxx                                           |    6 +++---
 idl/source/cmptools/lex.cxx                               |    4 ++--
 9 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit 0b49701fa5c22abba6b9b4a60ddd2720973dd858
Author: Shubham Verma <lifemeansmore008 at gmail.com>
Date:   Fri Feb 23 00:21:07 2018 +0530

    tdf#114441 sal_uLong to better integer types
    
    Change-Id: I55b45821cf67a99f97ba067a3d4923d76c19696e
    Reviewed-on: https://gerrit.libreoffice.org/50204
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx
index 3b62c886d7af..a4de8a27c67a 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -799,7 +799,7 @@ Document::retrieveParagraphText(Paragraph const * pParagraph)
 {
     SolarMutexGuard aGuard;
     ::osl::MutexGuard aInternalGuard(GetMutex());
-    return m_rEngine.GetText(static_cast< ::sal_uLong >(pParagraph->getNumber()));
+    return m_rEngine.GetText(static_cast< ::sal_uInt32 >(pParagraph->getNumber()));
         // numeric overflow cannot happen here
 }
 
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 6d6ef01ed0a8..c7eb307b9500 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -420,7 +420,7 @@ void ModulWindow::LoadBasic()
         if ( pStream )
         {
             AssertValidEditEngine();
-            sal_uLong nLines = CalcLineCount( *pStream );
+            sal_uInt32 nLines = CalcLineCount( *pStream );
             // nLines*4: ReadText/Formatting/Highlighting/Formatting
             GetEditorWindow().CreateProgress( IDEResId(RID_STR_GENERATESOURCE), nLines*4 );
             GetEditEngine()->SetUpdateMode( false );
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index 79428e116b9e..653b27bcef4e 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -138,7 +138,7 @@ public:
     ExtTextEngine*  GetEditEngine() const   { return pEditEngine.get(); }
     TextView*       GetEditView() const     { return pEditView.get(); }
 
-    void            CreateProgress( const OUString& rText, sal_uLong nRange );
+    void            CreateProgress( const OUString& rText, sal_uInt32 nRange );
     void            DestroyProgress();
 
     void            ParagraphInsertedDeleted( sal_uLong nNewPara, bool bInserted );
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 06604ba9c0b6..a506a68e40b3 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -204,7 +204,7 @@ private:
 class EditorWindow::ProgressInfo : public SfxProgress
 {
 public:
-    ProgressInfo (SfxObjectShell* pObjSh, OUString const& rText, sal_uLong nRange) :
+    ProgressInfo (SfxObjectShell* pObjSh, OUString const& rText, sal_uInt32 nRange) :
         SfxProgress(pObjSh, rText, nRange),
         nCurState(0)
     { }
@@ -1304,7 +1304,7 @@ void EditorWindow::ParagraphInsertedDeleted( sal_uLong nPara, bool bInserted )
     }
 }
 
-void EditorWindow::CreateProgress( const OUString& rText, sal_uLong nRange )
+void EditorWindow::CreateProgress( const OUString& rText, sal_uInt32 nRange )
 {
     DBG_ASSERT( !pProgress, "ProgressInfo exists already" );
     pProgress.reset(new ProgressInfo(
diff --git a/basctl/source/basicide/basides3.cxx b/basctl/source/basicide/basides3.cxx
index ea892bfe873c..c12fb56c2f2c 100644
--- a/basctl/source/basicide/basides3.cxx
+++ b/basctl/source/basicide/basides3.cxx
@@ -39,7 +39,7 @@ VclPtr<DialogWindow> Shell::CreateDlgWin( const ScriptDocument& rDocument, const
 {
     bCreatingWindow = true;
 
-    sal_uLong nKey = 0;
+    sal_uInt16 nKey = 0;
     VclPtr<DialogWindow> pWin;
     OUString aLibName( rLibName );
     OUString aDlgName( rDlgName );
@@ -97,7 +97,7 @@ VclPtr<DialogWindow> Shell::CreateDlgWin( const ScriptDocument& rDocument, const
     if( pWin )
     {
         pWin->GrabScrollBars( aHScrollBar.get(), aVScrollBar.get() );
-        pTabBar->InsertPage( static_cast<sal_uInt16>(nKey), aDlgName );
+        pTabBar->InsertPage( nKey, aDlgName );
         pTabBar->Sort();
         if ( !pCurWin )
             SetCurWindow( pWin, false, false );
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index f8332d8a4243..a770bd986213 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -620,10 +620,10 @@ void CutLines( OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines )
     }
 }
 
-sal_uLong CalcLineCount( SvStream& rStream )
+sal_uInt32 CalcLineCount( SvStream& rStream )
 {
-    sal_uLong nLFs = 0;
-    sal_uLong nCRs = 0;
+    sal_uInt32 nLFs = 0;
+    sal_uInt32 nCRs = 0;
     char c;
 
     rStream.Seek( 0 );
diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx
index 454601db0bed..fa30b4c15295 100644
--- a/basctl/source/inc/bastypes.hxx
+++ b/basctl/source/inc/bastypes.hxx
@@ -293,7 +293,7 @@ private:
 
 void            CutLines( OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines );
 OUString CreateMgrAndLibStr( const OUString& rMgrName, const OUString& rLibName );
-sal_uLong           CalcLineCount( SvStream& rStream );
+sal_uInt32           CalcLineCount( SvStream& rStream );
 
 bool QueryReplaceMacro( const OUString& rName, weld::Widget* pParent );
 bool QueryDelMacro( const OUString& rName, weld::Widget* pParent );
diff --git a/idl/inc/lex.hxx b/idl/inc/lex.hxx
index 58728260772c..7ddc3e9ce246 100644
--- a/idl/inc/lex.hxx
+++ b/idl/inc/lex.hxx
@@ -40,7 +40,7 @@ friend class SvTokenStream;
     OString                 aString;
     union
     {
-        sal_uLong           nLong;
+        sal_uInt64           nLong;
         bool                bBool;
         char                cChar;
         SvStringHashEntry * pHash;
@@ -79,7 +79,7 @@ public:
                         ? pHash->GetName()
                         : aString;
                 }
-    sal_uLong   GetNumber() const       { return nLong;         }
+    sal_uInt64   GetNumber() const       { return nLong;         }
     bool        GetBool() const         { return bBool;         }
     char        GetChar() const         { return cChar;         }
 
@@ -124,7 +124,7 @@ class SvTokenStream
                     }
 
     void            FillTokenList();
-    sal_uLong       GetNumber();
+    sal_uInt64       GetNumber();
     bool            MakeToken( SvToken & );
     bool            IsEof() const { return pInStream->eof(); }
     void            SetMax()
diff --git a/idl/source/cmptools/lex.cxx b/idl/source/cmptools/lex.cxx
index 2f1e550cec58..599b06136008 100644
--- a/idl/source/cmptools/lex.cxx
+++ b/idl/source/cmptools/lex.cxx
@@ -148,9 +148,9 @@ char SvTokenStream::GetNextChar()
     return nChar;
 }
 
-sal_uLong SvTokenStream::GetNumber()
+sal_uInt64 SvTokenStream::GetNumber()
 {
-    sal_uLong   l = 0;
+    sal_uInt64   l = 0;
     short   nLog = 10;
 
     if( '0' == c )


More information about the Libreoffice-commits mailing list