summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShady Mohamed <shadimabdrawy1999@gmail.com>2023-02-27 12:51:42 +0200
committerHossein <hossein@libreoffice.org>2023-03-02 13:04:07 +0000
commit350f51569c8d8498eabcbeef4323083c8e13371e (patch)
treeab505a729cc608b8ca501922761e5899e30f9525
parent4d0d98238b427b98310b6d0624e21bbec6d553f8 (diff)
tdf#114441 Convert sal_uLong to better data type sal_uInt32
In this patch, all the instances of sal_uLong in sw/source/ui/fldui/ folder are changed to better types. The variable m_nOldFormat is changed to the type sal_uInt32 in fldfunc.hxx as we have m_nOldFormat = GetCurField()->GetFormat() in fldfunc.cxx file and GetFormat() return sal_uInt32. Also, the data type of variable nFormat is changed from to sal_uInt32 as there is a conditional operation with the sal_uInt32 output. This is also the case for other changed files. The variable nFormat is changed to sal_uInt32 in files fldref.cxx and fldvar.cxx. Change-Id: I57ac03e48d4f0eecc96cfdbc19e92e00148f07d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147881 Tested-by: Hossein <hossein@libreoffice.org> Reviewed-by: Hossein <hossein@libreoffice.org>
-rw-r--r--sw/source/ui/fldui/flddb.cxx2
-rw-r--r--sw/source/ui/fldui/flddb.hxx2
-rw-r--r--sw/source/ui/fldui/flddinf.hxx2
-rw-r--r--sw/source/ui/fldui/flddok.cxx2
-rw-r--r--sw/source/ui/fldui/flddok.hxx2
-rw-r--r--sw/source/ui/fldui/fldfunc.cxx2
-rw-r--r--sw/source/ui/fldui/fldfunc.hxx2
-rw-r--r--sw/source/ui/fldui/fldref.cxx2
-rw-r--r--sw/source/ui/fldui/fldvar.cxx2
9 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index 62dd538f01e0..0c0210eedaac 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -210,7 +210,7 @@ bool SwFieldDBPage::FillItemSet(SfxItemSet* )
if(!aData.sDataSource.isEmpty()) // without database no new field command
{
const SwFieldTypesEnum nTypeId = static_cast<SwFieldTypesEnum>(m_xTypeLB->get_id(GetTypeSel()).toUInt32());
- sal_uLong nFormat = 0;
+ sal_uInt32 nFormat = 0;
sal_uInt16 nSubType = 0;
OUString sDBName = aData.sDataSource
diff --git a/sw/source/ui/fldui/flddb.hxx b/sw/source/ui/fldui/flddb.hxx
index b25c38699234..9fb967b9a5ae 100644
--- a/sw/source/ui/fldui/flddb.hxx
+++ b/sw/source/ui/fldui/flddb.hxx
@@ -30,7 +30,7 @@ class SwFieldDBPage : public SwFieldPage
OUString m_sOldDBName;
OUString m_sOldTableName;
OUString m_sOldColumnName;
- sal_uLong m_nOldFormat;
+ sal_uInt32 m_nOldFormat;
sal_uInt16 m_nOldSubType;
std::unique_ptr<weld::TreeView> m_xTypeLB;
diff --git a/sw/source/ui/fldui/flddinf.hxx b/sw/source/ui/fldui/flddinf.hxx
index f37de0a1939a..c3773af163b9 100644
--- a/sw/source/ui/fldui/flddinf.hxx
+++ b/sw/source/ui/fldui/flddinf.hxx
@@ -31,7 +31,7 @@ class SwFieldDokInfPage : public SwFieldPage
css::uno::Reference < css::beans::XPropertySet > m_xCustomPropertySet;
sal_Int32 m_nOldSel;
- sal_uLong m_nOldFormat;
+ sal_uInt32 m_nOldFormat;
OUString m_sOldCustomFieldName;
std::unique_ptr<weld::TreeView> m_xTypeList;
diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx
index 66d6e63d6259..f669fa7b92b2 100644
--- a/sw/source/ui/fldui/flddok.cxx
+++ b/sw/source/ui/fldui/flddok.cxx
@@ -540,7 +540,7 @@ bool SwFieldDokPage::FillItemSet(SfxItemSet* )
}
OUString aVal(m_xValueED->get_text());
- sal_uLong nFormat = 0;
+ sal_uInt32 nFormat = 0;
sal_uInt16 nSubType = 0;
if (m_xFormatLB->get_sensitive())
diff --git a/sw/source/ui/fldui/flddok.hxx b/sw/source/ui/fldui/flddok.hxx
index a43b7547df0e..b532b06f01f6 100644
--- a/sw/source/ui/fldui/flddok.hxx
+++ b/sw/source/ui/fldui/flddok.hxx
@@ -27,7 +27,7 @@
class SwFieldDokPage : public SwFieldPage
{
sal_Int32 m_nOldSel;
- sal_uLong m_nOldFormat;
+ sal_uInt32 m_nOldFormat;
std::unique_ptr<weld::TreeView> m_xTypeLB;
std::unique_ptr<weld::Widget> m_xSelection;
diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx
index e84dcda1e780..6447c375e5b4 100644
--- a/sw/source/ui/fldui/fldfunc.cxx
+++ b/sw/source/ui/fldui/fldfunc.cxx
@@ -518,7 +518,7 @@ bool SwFieldFuncPage::FillItemSet(SfxItemSet* )
sal_uInt16 nSubType = 0;
const sal_Int32 nEntryPos = m_xFormatLB->get_selected_index();
- const sal_uLong nFormat = (nEntryPos == -1)
+ const sal_uInt32 nFormat = (nEntryPos == -1)
? 0 : m_xFormatLB->get_id(nEntryPos).toUInt32();
OUString aVal(m_xValueED->get_text());
diff --git a/sw/source/ui/fldui/fldfunc.hxx b/sw/source/ui/fldui/fldfunc.hxx
index 8ecaa98fbfae..9fef98d256af 100644
--- a/sw/source/ui/fldui/fldfunc.hxx
+++ b/sw/source/ui/fldui/fldfunc.hxx
@@ -29,7 +29,7 @@ class SwFieldFuncPage : public SwFieldPage
OUString m_sOldValueFT;
OUString m_sOldNameFT;
- sal_uLong m_nOldFormat;
+ sal_uInt32 m_nOldFormat;
bool m_bDropDownLBChanged;
std::unique_ptr<weld::TreeView> m_xTypeLB;
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index ea8e41414d4a..bd6fef539478 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -955,7 +955,7 @@ bool SwFieldRefPage::FillItemSet(SfxItemSet* )
sal_uInt16 nSubType = 0;
const sal_Int32 nEntryPos = m_xFormatLB->get_selected_index();
- const sal_uLong nFormat = (nEntryPos == -1)
+ const sal_uInt32 nFormat = (nEntryPos == -1)
? 0 : m_xFormatLB->get_id(nEntryPos).toUInt32();
OUString aVal(m_xValueED->get_text());
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index 5116ae438780..e0db9b458294 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -1006,7 +1006,7 @@ IMPL_LINK(SwFieldVarPage, TBClickHdl, weld::Button&, rBox, void)
{
if (nNumFormatPos != -1)
{
- sal_uLong nNumberFormat = nNumFormatPos == 0 ? 0 : m_xNumFormatLB->GetFormat();
+ sal_uInt32 nNumberFormat = nNumFormatPos == 0 ? 0 : m_xNumFormatLB->GetFormat();
if (nNumberFormat)
{ // Switch language to office-language because Kalkulator expects
// String in office format and it should be fed into dialog like