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

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Thu Nov 19 21:31:51 UTC 2020


 cui/source/inc/numfmt.hxx      |    2 +-
 cui/source/tabpages/numfmt.cxx |    5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 510263ea0e0f16bf3e1605c4e875b5f801f89940
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Nov 19 14:03:24 2020 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Nov 19 22:31:12 2020 +0100

    SvxNumberFormatTabPage::nInitFormat should presumably be sal_uInt32
    
    all the entities it interacts with (SfxUInt32Item::GetValue,
    SvxNumberFormatShell::Create, nCurKey) consistently use sal_uInt32
    
    Change-Id: I1d929342819eddc615d18145a5815a13f326a648
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106174
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/cui/source/inc/numfmt.hxx b/cui/source/inc/numfmt.hxx
index a89e6ff2d355..5d525282a9ca 100644
--- a/cui/source/inc/numfmt.hxx
+++ b/cui/source/inc/numfmt.hxx
@@ -76,7 +76,7 @@ public:
 private:
     std::unique_ptr<SvxNumberInfoItem>    pNumItem;
     std::unique_ptr<SvxNumberFormatShell> pNumFmtShell;
-    sal_uLong           nInitFormat;
+    sal_uInt32          nInitFormat;
     short               m_nLbFormatSelPosEdComment;
 
     bool                bNumItemFlag; ///< for handling with DocShell
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 960aab9c0101..5a6436e8998b 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -43,6 +43,7 @@
 #include <vector>
 #include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
+#include <limits>
 #include <memory>
 
 using ::com::sun::star::uno::Reference;
@@ -194,7 +195,7 @@ void SvxNumberPreview::Paint(vcl::RenderContext& rRenderContext, const ::tools::
 SvxNumberFormatTabPage::SvxNumberFormatTabPage(weld::Container* pPage, weld::DialogController* pController,
     const SfxItemSet& rCoreAttrs)
     : SfxTabPage(pPage, pController, "cui/ui/numberingformatpage.ui", "NumberingFormatPage", &rCoreAttrs)
-    , nInitFormat(ULONG_MAX)
+    , nInitFormat(std::numeric_limits<sal_uInt32>::max())
     , m_nLbFormatSelPosEdComment(SELPOS_NONE)
     , bLegacyAutomaticCurrency(false)
     , sAutomaticLangEntry(CuiResId(RID_SVXSTR_AUTO_ENTRY))
@@ -471,7 +472,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet* rSet )
 
     nInitFormat = pValFmtAttr                   // memorize init key
                     ? pValFmtAttr->GetValue()   // (for FillItemSet())
-                    : ULONG_MAX;                // == DONT_KNOW
+                    : std::numeric_limits<sal_uInt32>::max(); // == DONT_KNOW
 
 
     if ( eValType == SvxNumberValueType::String )


More information about the Libreoffice-commits mailing list