diff options
author | EMartinGube <martin.gube@web.de> | 2023-08-14 21:31:24 +0200 |
---|---|---|
committer | Hossein <hossein@libreoffice.org> | 2023-11-04 02:34:56 +0100 |
commit | d7a5e7643f3540b1490c1e2f1a91ff86c721d7b6 (patch) | |
tree | ae79c1b658faa9257df69ac62ea07d89eaab017d /sw | |
parent | e963da8716a9e418ff220f0c0b5299dcaa82f53a (diff) |
tdf#114441 Convert use of sal_uLong to better integer types
Return type of GetColumnFormat() is changed to sal_uInt32. All the
values from the function calls inside GetCloumnFormat() which were
involved in the return value seem to be positive right now.
Change-Id: Id19b2982d8372e10fee5fc0fd4233576076ec3df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155680
Tested-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/dbmgr.hxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/dbui/dbmgr.cxx | 11 |
2 files changed, 8 insertions, 7 deletions
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx index b0d4b756917d..4c6a0c1e7499 100644 --- a/sw/inc/dbmgr.hxx +++ b/sw/inc/dbmgr.hxx @@ -325,13 +325,13 @@ public: css::uno::Reference< css::sdbc::XConnection> const & xConnection, const OUString& rTableName); - static sal_uLong GetColumnFormat( css::uno::Reference< css::sdbc::XDataSource> const & xSource, + static sal_uInt32 GetColumnFormat( css::uno::Reference< css::sdbc::XDataSource> const & xSource, css::uno::Reference< css::sdbc::XConnection> const & xConnection, css::uno::Reference< css::beans::XPropertySet> const & xColumn, SvNumberFormatter* pNFormatr, LanguageType nLanguage ); - sal_uLong GetColumnFormat( const OUString& rDBName, + sal_uInt32 GetColumnFormat( const OUString& rDBName, const OUString& rTableName, const OUString& rColNm, SvNumberFormatter* pNFormatr, diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 0cc225e0c3de..bb4cdc12cdbe 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -591,7 +591,7 @@ void SwDBManager::ImportFromConnection( SwWrtShell* pSh ) std::optional<SwWait> oWait; { - sal_uLong i = 0; + sal_uInt32 i = 0; do { ImportDBEntry(pSh); @@ -1670,13 +1670,13 @@ void SwDBManager::MergeCancel() // determine the column's Numberformat and transfer to the forwarded Formatter, // if applicable. -sal_uLong SwDBManager::GetColumnFormat( const OUString& rDBName, +sal_uInt32 SwDBManager::GetColumnFormat( const OUString& rDBName, const OUString& rTableName, const OUString& rColNm, SvNumberFormatter* pNFormatr, LanguageType nLanguage ) { - sal_uLong nRet = 0; + sal_uInt32 nRet = 0; if(pNFormatr) { uno::Reference< sdbc::XDataSource> xSource; @@ -1750,7 +1750,7 @@ sal_uLong SwDBManager::GetColumnFormat( const OUString& rDBName, return nRet; } -sal_uLong SwDBManager::GetColumnFormat( uno::Reference< sdbc::XDataSource> const & xSource_in, +sal_uInt32 SwDBManager::GetColumnFormat( uno::Reference< sdbc::XDataSource> const & xSource_in, uno::Reference< sdbc::XConnection> const & xConnection, uno::Reference< beans::XPropertySet> const & xColumn, SvNumberFormatter* pNFormatr, @@ -1759,7 +1759,7 @@ sal_uLong SwDBManager::GetColumnFormat( uno::Reference< sdbc::XDataSource> const auto xSource = xSource_in; // set the NumberFormat in the doc if applicable - sal_uLong nRet = 0; + sal_uInt32 nRet = 0; if(!xSource.is()) { @@ -1813,6 +1813,7 @@ sal_uLong SwDBManager::GetColumnFormat( uno::Reference< sdbc::XDataSource> const nFormat = xDocNumberFormats->queryKey( sFormat, aLoc, false ); if(NUMBERFORMAT_ENTRY_NOT_FOUND == sal::static_int_cast< sal_uInt32, sal_Int32>(nFormat)) nFormat = xDocNumberFormats->addNew( sFormat, aLoc ); + nRet = nFormat; bUseDefault = false; } |