sc/source/filter/excel/xecontent.cxx | 12 ++++++------ sc/source/filter/excel/xetable.cxx | 2 +- sc/source/filter/inc/xecontent.hxx | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-)
New commits: commit 56a654ae337e48f5845252e91a95cf9a63ed3388 Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Fri Aug 26 20:53:12 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat Aug 27 13:08:20 2022 +0200 sal_uLong->sal_uInt32 in XclExpDV we are already passing this through ATTR_VALIDDATA which is a SfxUInt32Item Change-Id: I491a85379a2f4900c70f3eb92f5be3f3c16a1d42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138916 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx index c8de11d2548f..c5954bc06bef 100644 --- a/sc/source/filter/excel/xecontent.cxx +++ b/sc/source/filter/excel/xecontent.cxx @@ -1673,7 +1673,7 @@ void lcl_SetValidationText(const OUString& rText, XclExpString& rValidationText) } // namespace -XclExpDV::XclExpDV( const XclExpRoot& rRoot, sal_uLong nScHandle ) : +XclExpDV::XclExpDV( const XclExpRoot& rRoot, sal_uInt32 nScHandle ) : XclExpRecord( EXC_ID_DV ), XclExpRoot( rRoot ), mnFlags( 0 ), @@ -1845,7 +1845,7 @@ XclExpDV::XclExpDV( const XclExpRoot& rRoot, sal_uLong nScHandle ) : else { OSL_FAIL( "XclExpDV::XclExpDV - missing core data" ); - mnScHandle = ULONG_MAX; + mnScHandle = SAL_MAX_UINT32; } } @@ -1861,7 +1861,7 @@ void XclExpDV::InsertCellRange( const ScRange& rRange ) bool XclExpDV::Finalize() { GetAddressConverter().ConvertRangeList( maXclRanges, maScRanges, true ); - return (mnScHandle != ULONG_MAX) && !maXclRanges.empty(); + return (mnScHandle != SAL_MAX_UINT32) && !maXclRanges.empty(); } void XclExpDV::WriteBody( XclExpStream& rStrm ) @@ -1938,7 +1938,7 @@ XclExpDval::~XclExpDval() { } -void XclExpDval::InsertCellRange( const ScRange& rRange, sal_uLong nScHandle ) +void XclExpDval::InsertCellRange( const ScRange& rRange, sal_uInt32 nScHandle ) { if( GetBiff() == EXC_BIFF8 ) { @@ -1983,7 +1983,7 @@ void XclExpDval::SaveXml( XclExpXmlStream& rStrm ) rWorksheet->endElement( XML_dataValidations ); } -XclExpDV& XclExpDval::SearchOrCreateDv( sal_uLong nScHandle ) +XclExpDV& XclExpDval::SearchOrCreateDv( sal_uInt32 nScHandle ) { // test last found record if( mxLastFoundDV && (mxLastFoundDV->GetScHandle() == nScHandle) ) @@ -1996,7 +1996,7 @@ XclExpDV& XclExpDval::SearchOrCreateDv( sal_uLong nScHandle ) size_t nFirstPos = 0; size_t nLastPos = maDVList.GetSize() - 1; bool bLoop = true; - sal_uLong nCurrScHandle = ::std::numeric_limits< sal_uLong >::max(); + sal_uInt32 nCurrScHandle = ::std::numeric_limits< sal_uInt32 >::max(); while( (nFirstPos <= nLastPos) && bLoop ) { nCurrPos = (nFirstPos + nLastPos) / 2; diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx index f8afeb672fa9..146f6a06833b 100644 --- a/sc/source/filter/excel/xetable.cxx +++ b/sc/source/filter/excel/xetable.cxx @@ -2750,7 +2750,7 @@ XclExpCellTable::XclExpCellTable( const XclExpRoot& rRoot ) : // data validation if( ScfTools::CheckItem( rItemSet, ATTR_VALIDDATA, false ) ) { - sal_uLong nScHandle = rItemSet.Get( ATTR_VALIDDATA ).GetValue(); + sal_uInt32 nScHandle = rItemSet.Get( ATTR_VALIDDATA ).GetValue(); ScRange aScRange( aScPos ); aScRange.aEnd.SetCol( nLastScCol ); mxDval->InsertCellRange( aScRange, nScHandle ); diff --git a/sc/source/filter/inc/xecontent.hxx b/sc/source/filter/inc/xecontent.hxx index ba85f1d0d99f..07318a037ca4 100644 --- a/sc/source/filter/inc/xecontent.hxx +++ b/sc/source/filter/inc/xecontent.hxx @@ -314,11 +314,11 @@ private: class XclExpDV : public XclExpRecord, protected XclExpRoot { public: - explicit XclExpDV( const XclExpRoot& rRoot, sal_uLong nScHandle ); + explicit XclExpDV( const XclExpRoot& rRoot, sal_uInt32 nScHandle ); virtual ~XclExpDV() override; /** Returns the core handle of the validation data. */ - sal_uLong GetScHandle() const { return mnScHandle; } + sal_uInt32 GetScHandle() const { return mnScHandle; } /** Inserts a new cell range into the cell range list. */ void InsertCellRange( const ScRange& rPos ); @@ -346,7 +346,7 @@ private: XclTokenArrayRef mxTokArr2; /// Formula for second condition. OUString msFormula2; /// OOXML Formula for second condition. sal_uInt32 mnFlags; /// Miscellaneous flags. - sal_uLong mnScHandle; /// The core handle for quick list search. + sal_uInt32 mnScHandle; /// The core handle for quick list search. }; /** This class contains the DV record list following the DVAL record. */ @@ -357,7 +357,7 @@ public: virtual ~XclExpDval() override; /** Inserts the cell range into the range list of the DV record with the specified handle. */ - void InsertCellRange( const ScRange& rRange, sal_uLong nScHandle ); + void InsertCellRange( const ScRange& rRange, sal_uInt32 nScHandle ); /** Writes the DVAL record and the DV record list. */ virtual void Save( XclExpStream& rStrm ) override; @@ -365,7 +365,7 @@ public: private: /** Searches for or creates a XclExpDV record object with the specified handle. */ - XclExpDV& SearchOrCreateDv( sal_uLong nScHandle ); + XclExpDV& SearchOrCreateDv( sal_uInt32 nScHandle ); /** Writes the body of the DVAL record. */ virtual void WriteBody( XclExpStream& rStrm ) override;