tdf#133486 Revert "fix TODO"

This reverts commit 457d2a0c9373937332ad2ec7b16edc4b2c971a97.

Reason for revert: <INSERT REASONING HERE>

Change-Id: I4493fd0f1a309bd49ebe4ea3c14f7f558db9b90d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95551
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit bfb807bf6cf07243a88dc1e66883dfcea872ceab)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95670
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index a338a2d..a8de850 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -1982,15 +1982,17 @@
    SvXMLExport::ExportStyles_(bUsed);
}

void ScXMLExport::AddStyleFromCells(const uno::Reference<sheet::XSheetCellRanges>& xCellRanges,
void ScXMLExport::AddStyleFromCells(const uno::Reference<beans::XPropertySet>& xProperties,
                                    const uno::Reference<sheet::XSpreadsheet>& xTable,
                                    sal_Int32 nTable, const OUString* pOldName)
{
    uno::Reference<beans::XPropertySet> xProperties(xCellRanges, uno::UNO_QUERY_THROW);
    css::uno::Any aAny = xProperties->getPropertyValue("FormatID");
    sal_uInt64 nKey = 0;
    aAny >>= nKey;

    //! pass xCellRanges instead
    uno::Reference<sheet::XSheetCellRanges> xCellRanges( xProperties, uno::UNO_QUERY );

    OUString sStyleName;
    sal_Int32 nNumberFormat(-1);
    sal_Int32 nValidationIndex(-1);
@@ -2256,10 +2258,10 @@
                if (bCopySheet)
                {
                    uno::Reference <sheet::XSpreadsheet> xTable(xIndex->getByIndex(nTable), uno::UNO_QUERY);
                    uno::Reference <sheet::XSheetCellRanges> xCellRanges(
                    uno::Reference <beans::XPropertySet> xProperties(
                        xTable->getCellByPosition( aPos.Col(), aPos.Row() ), uno::UNO_QUERY );

                    AddStyleFromCells(xCellRanges, xTable, nTable, &rCellEntry.maName);
                    AddStyleFromCells(xProperties, xTable, nTable, &rCellEntry.maName);
                }
            }

@@ -2514,8 +2516,12 @@
                        uno::Reference< sheet::XSheetCellRanges> xCellRanges(xFormatRangesIndex->getByIndex(nFormatRange), uno::UNO_QUERY);
                        if (xCellRanges.is())
                        {
                            AddStyleFromCells(xCellRanges, xTable, nTable, nullptr);
                            IncrementProgressBar(false);
                            uno::Reference <beans::XPropertySet> xProperties (xCellRanges, uno::UNO_QUERY);
                            if (xProperties.is())
                            {
                                AddStyleFromCells(xProperties, xTable, nTable, nullptr);
                                IncrementProgressBar(false);
                            }
                        }
                    }
                }
diff --git a/sc/source/filter/xml/xmlexprt.hxx b/sc/source/filter/xml/xmlexprt.hxx
index 1473dad..de74021 100644
--- a/sc/source/filter/xml/xmlexprt.hxx
+++ b/sc/source/filter/xml/xmlexprt.hxx
@@ -35,7 +35,6 @@

namespace com::sun::star::table { class XCellRange; }
namespace com::sun::star::sheet { class XSpreadsheet; }
namespace com::sun::star::sheet { class XSheetCellRanges; }
namespace com::sun::star::sheet { class XSpreadsheetDocument; }

namespace sc { class DataTransformation; }
@@ -207,7 +206,7 @@
    void CollectUserDefinedNamespaces(const SfxItemPool* pPool, sal_uInt16 nAttrib);

    void AddStyleFromCells(
        const css::uno::Reference< css::sheet::XSheetCellRanges >& xCellRanges,
        const css::uno::Reference< css::beans::XPropertySet >& xProperties,
        const css::uno::Reference< css::sheet::XSpreadsheet >& xTable,
        sal_Int32 nTable, const OUString* pOldName );
    void AddStyleFromColumn(