sc/inc/document.hxx                     |    2 +-
 sc/inc/fmtuno.hxx                       |    2 +-
 sc/qa/unit/subsequent_filters_test.cxx  |    4 ++--
 sc/qa/unit/subsequent_filters_test2.cxx |    2 +-
 sc/qa/unit/ucalc_formula.cxx            |    2 +-
 sc/source/core/data/documen4.cxx        |    2 +-
 sc/source/core/data/patattr.cxx         |    4 ++--
 sc/source/core/tool/detfunc.cxx         |    2 +-
 sc/source/filter/excel/xicontent.cxx    |    2 +-
 sc/source/filter/xml/xmlcelli.cxx       |    2 +-
 sc/source/ui/unoobj/cellsuno.cxx        |    2 +-
 sc/source/ui/unoobj/fmtuno.cxx          |    2 +-
 sc/source/ui/view/cellsh2.cxx           |    2 +-
 sc/source/ui/view/gridwin.cxx           |    2 +-
 sc/source/ui/view/viewfun2.cxx          |    2 +-
 15 files changed, 17 insertions(+), 17 deletions(-)

New commits:
commit e3e49d07e2feebcec631eed98bea5e3f6f6ab572
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Sat Aug 27 08:46:31 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sat Aug 27 13:09:24 2022 +0200

    sal_uLong->sal_uInt32 in ValidationEntry
    
    we are already using sal_uInt32 in various places, and passing
    this through SfxUInt32Item
    
    Change-Id: Iea06b59edc56632b823729462516a6b5fb74e28a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138917
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 4dab1da8158b..41b7d71a63e7 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1867,7 +1867,7 @@ public:
 
     void                                    SetCondFormList( 
ScConditionalFormatList* pList, SCTAB nTab );
     SC_DLLPUBLIC sal_uLong                  AddValidationEntry( const 
ScValidationData& rNew );
-    SC_DLLPUBLIC const ScValidationData*    GetValidationEntry( sal_uLong 
nIndex ) const;
+    SC_DLLPUBLIC const ScValidationData*    GetValidationEntry( sal_uInt32 
nIndex ) const;
 
     SC_DLLPUBLIC ScConditionalFormatList*   GetCondFormList( SCTAB nTab ) 
const;
 
diff --git a/sc/inc/fmtuno.hxx b/sc/inc/fmtuno.hxx
index 75d4c099ca55..81d1532381ea 100644
--- a/sc/inc/fmtuno.hxx
+++ b/sc/inc/fmtuno.hxx
@@ -189,7 +189,7 @@ private:
 public:
 
                             ScTableValidationObj() = delete;
-                            ScTableValidationObj(const ScDocument& rDoc, 
sal_uLong nKey,
+                            ScTableValidationObj(const ScDocument& rDoc, 
sal_uInt32 nKey,
                                                 const 
formula::FormulaGrammar::Grammar eGrammar);
     virtual                 ~ScTableValidationObj() override;
 
diff --git a/sc/qa/unit/subsequent_filters_test.cxx 
b/sc/qa/unit/subsequent_filters_test.cxx
index 62c0cfb98c8a..9149d4379db4 100644
--- a/sc/qa/unit/subsequent_filters_test.cxx
+++ b/sc/qa/unit/subsequent_filters_test.cxx
@@ -1413,12 +1413,12 @@ struct ValDataTestParams
     OUString aErrorTitle;
     OUString aErrorMessage;
     ScValidErrorStyle eErrorStyle;
-    sal_uLong nExpectedIndex;
+    sal_uInt32 nExpectedIndex;
 
     ValDataTestParams( ScValidationMode eMode, ScConditionMode eOp,
                        const OUString& aExpr1, const OUString& aExpr2, 
ScDocument& rDoc,
                        const ScAddress& aPos, const OUString& aETitle, const 
OUString& aEMsg,
-                       ScValidErrorStyle eEStyle, sal_uLong nIndex ):
+                       ScValidErrorStyle eEStyle, sal_uInt32 nIndex ):
                             eValMode(eMode), eCondOp(eOp), aStrVal1(aExpr1),
                             aStrVal2(aExpr2), rDocument(rDoc), aPosition(aPos),
                             aErrorTitle(aETitle), aErrorMessage(aEMsg),
diff --git a/sc/qa/unit/subsequent_filters_test2.cxx 
b/sc/qa/unit/subsequent_filters_test2.cxx
index 8f747f5aff03..782b3a2c497e 100644
--- a/sc/qa/unit/subsequent_filters_test2.cxx
+++ b/sc/qa/unit/subsequent_filters_test2.cxx
@@ -1252,7 +1252,7 @@ void checkValidationFormula(const ScAddress& rPos, const 
ScDocument& rDoc,
 {
     const SfxUInt32Item* pItem = rDoc.GetAttr(rPos, ATTR_VALIDDATA);
     CPPUNIT_ASSERT(pItem);
-    sal_uLong nKey = pItem->GetValue();
+    sal_uInt32 nKey = pItem->GetValue();
     const ScValidationData* pData = rDoc.GetValidationEntry(nKey);
     CPPUNIT_ASSERT(pData);
 
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 480c009b13dc..7463f1a23f57 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -4626,7 +4626,7 @@ void TestFormula::testFormulaRefUpdateValidity()
         SC_VALID_LIST, ScConditionMode::Equal, "C2:C4", "", *m_pDoc, 
ScAddress(0,1,0), "", "",
         m_pDoc->GetGrammar(), m_pDoc->GetGrammar());
 
-    sal_uLong nIndex = m_pDoc->AddValidationEntry(aData);
+    sal_uInt32 nIndex = m_pDoc->AddValidationEntry(aData);
     SfxUInt32Item aItem(ATTR_VALIDDATA, nIndex);
 
     ScPatternAttr aNewAttrs(
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index 9aa39d66ca94..e7945b773d9d 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -878,7 +878,7 @@ void ScDocument::SetCondFormList( ScConditionalFormatList* 
pList, SCTAB nTab )
         maTabs[nTab]->SetCondFormList(pList);
 }
 
-const ScValidationData* ScDocument::GetValidationEntry( sal_uLong nIndex ) 
const
+const ScValidationData* ScDocument::GetValidationEntry( sal_uInt32 nIndex ) 
const
 {
     if ( pValidationList )
         return pValidationList->GetData( nIndex );
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index 8a88e9449850..4368057d9889 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -1116,11 +1116,11 @@ ScPatternAttr* ScPatternAttr::PutInPool( ScDocument* 
pDestDoc, ScDocument* pSrcD
             {
                 // Copy validity to the new document
 
-                sal_uLong nNewIndex = 0;
+                sal_uInt32 nNewIndex = 0;
                 ScValidationDataList* pSrcList = pSrcDoc->GetValidationList();
                 if ( pSrcList )
                 {
-                    sal_uLong nOldIndex = static_cast<const 
SfxUInt32Item*>(pSrcItem)->GetValue();
+                    sal_uInt32 nOldIndex = static_cast<const 
SfxUInt32Item*>(pSrcItem)->GetValue();
                     const ScValidationData* pOldData = pSrcList->GetData( 
nOldIndex );
                     if ( pOldData )
                         nNewIndex = pDestDoc->AddValidationEntry( *pOldData );
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index 64adfc89dfd8..bd5202ecfbb7 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -1360,7 +1360,7 @@ bool ScDetectiveFunc::MarkInvalid(bool& rOverflow)
     const ScPatternAttr* pPattern = aAttrIter.GetNext( nCol, nRow1, nRow2 );
     while ( pPattern && nInsCount < SC_DET_MAXCIRCLE )
     {
-        sal_uLong nIndex = pPattern->GetItem(ATTR_VALIDDATA).GetValue();
+        sal_uInt32 nIndex = pPattern->GetItem(ATTR_VALIDDATA).GetValue();
         if (nIndex)
         {
             const ScValidationData* pData = rDoc.GetValidationEntry( nIndex );
diff --git a/sc/source/filter/excel/xicontent.cxx 
b/sc/source/filter/excel/xicontent.cxx
index d2ed9464ca13..cf4ea663dec1 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -940,7 +940,7 @@ void XclImpValidationManager::Apply()
     {
         DVItem& rItem = *rxDVItem;
         // set the handle ID
-        sal_uLong nHandle = rDoc.AddValidationEntry( rItem.maValidData );
+        sal_uInt32 nHandle = rDoc.AddValidationEntry( rItem.maValidData );
         ScPatternAttr aPattern( rDoc.GetPool() );
         aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_VALIDDATA, nHandle ) );
 
diff --git a/sc/source/filter/xml/xmlcelli.cxx 
b/sc/source/filter/xml/xmlcelli.cxx
index 1ee22c93e9b5..e7a8037cd7eb 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -791,7 +791,7 @@ void ScXMLTableRowCellContext::SetContentValidation( const 
ScRange& rScRange )
     if( !aValidation.sBaseCellAddress.isEmpty() )
         aScValidationData.SetSrcString( aValidation.sBaseCellAddress );
 
-    sal_uLong nIndex = pDoc->AddValidationEntry( aScValidationData );
+    sal_uInt32 nIndex = pDoc->AddValidationEntry( aScValidationData );
 
     ScPatternAttr aPattern( pDoc->GetPool() );
     aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_VALIDDATA, nIndex ) );
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index bab6f23fdb1c..03ff6d9a62b9 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -2314,7 +2314,7 @@ void ScCellRangesBase::SetOnePropertyValue( const 
SfxItemPropertyMapEntry* pEntr
 
                             std::unique_ptr<ScValidationData> pNewData(
                                     pValidObj->CreateValidationData( rDoc, 
eGrammar ));
-                            sal_uLong nIndex = rDoc.AddValidationEntry( 
*pNewData );
+                            sal_uInt32 nIndex = rDoc.AddValidationEntry( 
*pNewData );
                             pNewData.reset();
 
                             ScPatternAttr aPattern( rDoc.GetPool() );
diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx
index 068175181c74..e218634b82ec 100644
--- a/sc/source/ui/unoobj/fmtuno.cxx
+++ b/sc/source/ui/unoobj/fmtuno.cxx
@@ -544,7 +544,7 @@ void SAL_CALL ScTableConditionalEntry::setStyleName( const 
OUString& aStyleName
     aData.maStyle = ScStyleNameConversion::ProgrammaticToDisplayName( 
aStyleName, SfxStyleFamily::Para );
 }
 
-ScTableValidationObj::ScTableValidationObj(const ScDocument& rDoc, sal_uLong 
nKey,
+ScTableValidationObj::ScTableValidationObj(const ScDocument& rDoc, sal_uInt32 
nKey,
                                            const 
formula::FormulaGrammar::Grammar eGrammar) :
     aPropSet( lcl_GetValidatePropertyMap() )
 {
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 5b96bb65085b..eb6ee98de193 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -852,7 +852,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
                     SCROW nCurY = GetViewData().GetCurY();
                     SCTAB nTab = GetViewData().GetTabNo();
                     ScAddress aCursorPos( nCurX, nCurY, nTab );
-                    sal_uLong nIndex = rDoc.GetAttr(
+                    sal_uInt32 nIndex = rDoc.GetAttr(
                                 nCurX, nCurY, nTab, ATTR_VALIDDATA 
)->GetValue();
                     if ( nIndex )
                     {
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 6bc42b7c77a8..cb2f6141df0c 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -1447,7 +1447,7 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, 
SCROW nRow )
 
     sal_Int32 nSelPos = -1;
 
-    sal_uLong nIndex = rDoc.GetAttr( nCol, nRow, nTab, ATTR_VALIDDATA 
)->GetValue();
+    sal_uInt32 nIndex = rDoc.GetAttr( nCol, nRow, nTab, ATTR_VALIDDATA 
)->GetValue();
     if ( nIndex )
     {
         const ScValidationData* pData = rDoc.GetValidationEntry( nIndex );
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index c8ed4cc9e485..d05ddad12c24 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -3456,7 +3456,7 @@ void ScViewFunc::SetSelectionFrameLines( const 
SvxBorderLine* pLine,
 void ScViewFunc::SetValidation( const ScValidationData& rNew )
 {
     ScDocument& rDoc = GetViewData().GetDocument();
-    sal_uLong nIndex = rDoc.AddValidationEntry(rNew);      // for it there is 
no Undo
+    sal_uInt32 nIndex = rDoc.AddValidationEntry(rNew);      // for it there is 
no Undo
     SfxUInt32Item aItem( ATTR_VALIDDATA, nIndex );
 
     ApplyAttr( aItem );         // with Paint and Undo...

Reply via email to