sc/source/filter/xml/xmlsorti.cxx |   14 +++++++-------
 sc/source/filter/xml/xmlsorti.hxx |    4 ++--
 sc/source/ui/unoobj/datauno.cxx   |    2 +-
 3 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 51430baec561ffe904f01b1cc04583a09b2328d6
Author:     shark <[email protected]>
AuthorDate: Mon Jan 12 07:04:56 2026 +0000
Commit:     Regina Henschel <[email protected]>
CommitDate: Thu Jan 15 13:42:45 2026 +0100

    tdf#168747 replace deprecated css::util::SortFieldType enum
    
    Change-Id: Idec6ea5a5e6706439ac2dc367d69a71773bf2fb1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197059
    Tested-by: Jenkins
    Reviewed-by: Regina Henschel <[email protected]>

diff --git a/sc/source/filter/xml/xmlsorti.cxx 
b/sc/source/filter/xml/xmlsorti.cxx
index 230e46ab7e6c..36818d79552a 100644
--- a/sc/source/filter/xml/xmlsorti.cxx
+++ b/sc/source/filter/xml/xmlsorti.cxx
@@ -28,8 +28,8 @@
 #include <xmloff/xmlnamespace.hxx>
 #include <o3tl/string_view.hxx>
 
-#include <com/sun/star/util/SortField.hpp>
 #include <com/sun/star/sheet/SortNumberBehavior.hpp>
+#include <com/sun/star/table/TableSortField.hpp>
 
 using namespace com::sun::star;
 using namespace xmloff::token;
@@ -179,12 +179,12 @@ void SAL_CALL ScXMLSortContext::endFastElement( sal_Int32 
/*nElement*/ )
 
 void ScXMLSortContext::AddSortField(std::u16string_view sFieldNumber, 
std::u16string_view sDataType, std::u16string_view sOrder)
 {
-    util::SortField aSortField;
+    table::TableSortField aSortField;
     aSortField.Field = o3tl::toInt32(sFieldNumber);
     if (IsXMLToken(sOrder, XML_ASCENDING))
-        aSortField.SortAscending = true;
+        aSortField.IsAscending = true;
     else
-        aSortField.SortAscending = false;
+        aSortField.IsAscending = false;
     if (sDataType.size() > 8)
     {
         std::u16string_view sTemp = sDataType.substr(0, 8);
@@ -197,15 +197,15 @@ void ScXMLSortContext::AddSortField(std::u16string_view 
sFieldNumber, std::u16st
         else
         {
             if (IsXMLToken(sDataType, XML_AUTOMATIC))
-                aSortField.FieldType = util::SortFieldType_AUTOMATIC;
+                aSortField.FieldType = table::TableSortFieldType_AUTOMATIC;
         }
     }
     else
     {
         if (IsXMLToken(sDataType, XML_TEXT))
-            aSortField.FieldType = util::SortFieldType_ALPHANUMERIC;
+            aSortField.FieldType = table::TableSortFieldType_ALPHANUMERIC;
         else if (IsXMLToken(sDataType, XML_NUMBER))
-            aSortField.FieldType = util::SortFieldType_NUMERIC;
+            aSortField.FieldType = table::TableSortFieldType_NUMERIC;
     }
     aSortFields.realloc(aSortFields.getLength() + 1);
     aSortFields.getArray()[aSortFields.getLength() - 1] = aSortField;
diff --git a/sc/source/filter/xml/xmlsorti.hxx 
b/sc/source/filter/xml/xmlsorti.hxx
index e5a14e036eb4..4e445b1b4714 100644
--- a/sc/source/filter/xml/xmlsorti.hxx
+++ b/sc/source/filter/xml/xmlsorti.hxx
@@ -23,7 +23,7 @@
 
 #include "importcontext.hxx"
 
-namespace com::sun::star::util { struct SortField; }
+namespace com::sun::star::table { struct TableSortField; }
 namespace sax_fastparser { class FastAttributeList; }
 
 class ScXMLImport;
@@ -33,7 +33,7 @@ class ScXMLSortContext : public ScXMLImportContext
 {
     ScXMLDatabaseRangeContext* pDatabaseRangeContext;
 
-    css::uno::Sequence <css::util::SortField> aSortFields;
+    css::uno::Sequence <css::table::TableSortField> aSortFields;
     css::table::CellAddress aOutputPosition;
     LanguageTagODF maLanguageTagODF;
     OUString    sAlgorithm;
diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx
index e182e8622a7e..969f4076fb9d 100644
--- a/sc/source/ui/unoobj/datauno.cxx
+++ b/sc/source/ui/unoobj/datauno.cxx
@@ -386,7 +386,7 @@ void ScSortDescriptor::FillSortParam( ScSortParam& rParam, 
const uno::Sequence<b
                 sal_Int32 i;
                 if ( nCount > nSortSize )
                 {
-                    nCount = nSortSize;
+                    nSortSize = nCount;
                     rParam.maKeyState.resize(nCount);
                 }
                 const table::TableSortField* pFieldArray = 
aNewSeq.getConstArray();

Reply via email to