reportdesign/inc/RptPage.hxx             |    2 +-
 reportdesign/source/core/sdr/RptPage.cxx |    8 ++++----
 sw/source/ui/config/optcomp.cxx          |   16 ++++++++--------
 sw/source/uibase/inc/optcomp.hxx         |    6 +++---
 4 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit e8c07076689d593b9d2863d166b1933ecb6f480a
Author:     Pelin Kuran <pelinrku...@gmail.com>
AuthorDate: Tue Jan 28 16:03:55 2020 +0300
Commit:     Michael Stahl <michael.st...@cib.de>
CommitDate: Thu Feb 27 15:43:03 2020 +0100

    tdf#114441: Convert use of sal_uLong to better integer types
    
    Change-Id: I29b3b76dcc7960938155be768ed110c090607fbd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87619
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@cib.de>

diff --git a/reportdesign/inc/RptPage.hxx b/reportdesign/inc/RptPage.hxx
index d8ff7fc9d176..1c0f77b0adeb 100644
--- a/reportdesign/inc/RptPage.hxx
+++ b/reportdesign/inc/RptPage.hxx
@@ -62,7 +62,7 @@ public:
     /** returns the index inside the object list which belongs to the report 
component.
         @param  _xObject    the report component
     */
-    sal_uLong getIndexOf(const css::uno::Reference< 
css::report::XReportComponent >& _xObject);
+    size_t getIndexOf(const css::uno::Reference< css::report::XReportComponent 
>& _xObject);
 
     /** removes the SdrObject which belongs to the report component.
         @param  _xObject    the report component
diff --git a/reportdesign/source/core/sdr/RptPage.cxx 
b/reportdesign/source/core/sdr/RptPage.cxx
index 743ebb98140d..24931fe3286f 100644
--- a/reportdesign/source/core/sdr/RptPage.cxx
+++ b/reportdesign/source/core/sdr/RptPage.cxx
@@ -54,7 +54,7 @@ SdrPage* OReportPage::CloneSdrPage(SdrModel& rTargetModel) 
const
 }
 
 
-sal_uLong OReportPage::getIndexOf(const uno::Reference< 
report::XReportComponent >& _xObject)
+size_t OReportPage::getIndexOf(const uno::Reference< report::XReportComponent 
>& _xObject)
 {
     const size_t nCount = GetObjCount();
     size_t i = 0;
@@ -67,12 +67,12 @@ sal_uLong OReportPage::getIndexOf(const uno::Reference< 
report::XReportComponent
             break;
         }
     }
-    return static_cast<sal_uLong>(i);
+    return i;
 }
 
 void OReportPage::removeSdrObject(const uno::Reference< 
report::XReportComponent >& _xObject)
 {
-    sal_uLong nPos = getIndexOf(_xObject);
+    size_t nPos = getIndexOf(_xObject);
     if ( nPos < GetObjCount() )
     {
         OObjectBase* pBase = dynamic_cast<OObjectBase*>(GetObj(nPos));
@@ -110,7 +110,7 @@ void OReportPage::insertObject(const uno::Reference< 
report::XReportComponent >&
     OSL_ENSURE(_xObject.is(),"Object is not valid to create a SdrObject!");
     if ( !_xObject.is() )
         return;
-    sal_uLong nPos = getIndexOf(_xObject);
+    size_t nPos = getIndexOf(_xObject);
     if ( nPos < GetObjCount() )
         return; // Object already in list
 
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index 36a056da3cf2..8be4045f154c 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -108,7 +108,7 @@ SwCompatibilityOptPage::~SwCompatibilityOptPage()
 {
 }
 
-static sal_uLong convertBools2Ulong_Impl
+static sal_uInt32 convertBools2Ulong_Impl
 (
     bool _bUsePrtMetrics,
     bool _bAddSpacing,
@@ -127,8 +127,8 @@ static sal_uLong convertBools2Ulong_Impl
     bool bEmptyDbFieldHidesPara
 )
 {
-    sal_uLong nRet = 0;
-    sal_uLong nSetBit = 1;
+    sal_uInt32 nRet = 0;
+    sal_uInt32 nSetBit = 1;
 
     if ( _bUsePrtMetrics )
         nRet |= nSetBit;
@@ -290,7 +290,7 @@ IMPL_LINK_NOARG(SwCompatibilityOptPage, UseAsDefaultHdl, 
weld::Button&, void)
     }
 }
 
-void SwCompatibilityOptPage::SetCurrentOptions( sal_uLong nOptions )
+void SwCompatibilityOptPage::SetCurrentOptions( sal_uInt32 nOptions )
 {
     const int nCount = m_xOptionsLB->n_children();
     OSL_ENSURE( nCount <= 32, "SwCompatibilityOptPage::Reset(): entry 
overflow" );
@@ -302,9 +302,9 @@ void SwCompatibilityOptPage::SetCurrentOptions( sal_uLong 
nOptions )
     }
 }
 
-sal_uLong SwCompatibilityOptPage::GetDocumentOptions() const
+sal_uInt32 SwCompatibilityOptPage::GetDocumentOptions() const
 {
-    sal_uLong nRet = 0;
+    sal_uInt32 nRet = 0;
     if ( m_pWrtShell )
     {
         const IDocumentSettingAccess& rIDocumentSettingAccess = 
m_pWrtShell->getIDocumentSettingAccess();
@@ -345,7 +345,7 @@ bool SwCompatibilityOptPage::FillItemSet( SfxItemSet*  )
     bool bModified = false;
     if ( m_pWrtShell )
     {
-        sal_uLong nSavedOptions = m_nSavedOptions;
+        sal_uInt32 nSavedOptions = m_nSavedOptions;
         const int nCount = m_xOptionsLB->n_children();
         OSL_ENSURE( nCount <= 32, "SwCompatibilityOptPage::Reset(): entry 
overflow" );
 
@@ -456,7 +456,7 @@ void SwCompatibilityOptPage::Reset( const SfxItemSet*  )
 {
     m_xOptionsLB->select(0);
 
-    sal_uLong nOptions = GetDocumentOptions();
+    sal_uInt32 nOptions = GetDocumentOptions();
     SetCurrentOptions( nOptions );
     m_nSavedOptions = nOptions;
 
diff --git a/sw/source/uibase/inc/optcomp.hxx b/sw/source/uibase/inc/optcomp.hxx
index d0b565aae4b2..e087d3852362 100644
--- a/sw/source/uibase/inc/optcomp.hxx
+++ b/sw/source/uibase/inc/optcomp.hxx
@@ -42,7 +42,7 @@ private:
     // impl object
     std::unique_ptr<SwCompatibilityOptPage_Impl> m_pImpl;
     // saved options after "Reset"; used in "FillItemSet" for comparison
-    sal_uLong                   m_nSavedOptions;
+    sal_uInt32                  m_nSavedOptions;
     bool                        m_bSavedMSFormsMenuOption;
 
     // controls
@@ -60,8 +60,8 @@ private:
 
     // private methods
     void                    InitControls( const SfxItemSet& rSet );
-    void                    SetCurrentOptions( sal_uLong nOptions );
-    sal_uLong                   GetDocumentOptions() const;
+    void                    SetCurrentOptions( sal_uInt32 nOptions );
+    sal_uInt32              GetDocumentOptions() const;
     void                    WriteOptions();
 
 public:
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to