sc/Library_scqahelper.mk    |    1 
 sc/qa/unit/helper/xpath.cxx |   45 -------------------------------
 sc/qa/unit/helper/xpath.hxx |   62 --------------------------------------------
 3 files changed, 108 deletions(-)

New commits:
commit 63db958d674375876951fdddc7958e9866bdba8f
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Wed Nov 16 17:21:40 2022 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Thu Nov 17 13:22:35 2022 +0100

    sc: xpath is unused now
    
    Change-Id: I7ae93b5d64991f0fcbd656ddb6f2413bf425cfd6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142782
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/Library_scqahelper.mk b/sc/Library_scqahelper.mk
index 15289fea87af..f7db7545103d 100644
--- a/sc/Library_scqahelper.mk
+++ b/sc/Library_scqahelper.mk
@@ -66,7 +66,6 @@ $(eval $(call gb_Library_use_libraries,scqahelper,\
 
 $(eval $(call gb_Library_add_exception_objects,scqahelper,\
        sc/qa/unit/helper/qahelper \
-       sc/qa/unit/helper/xpath \
        sc/qa/unit/functions_test \
 ))
 
diff --git a/sc/qa/unit/helper/xpath.cxx b/sc/qa/unit/helper/xpath.cxx
deleted file mode 100644
index 4c8e276fb3ac..000000000000
--- a/sc/qa/unit/helper/xpath.cxx
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#include "xpath.hxx"
-
-#include <cppunit/TestAssert.h>
-#include "qahelper.hxx"
-
-#include <unotools/ucbstreamhelper.hxx>
-#include <comphelper/processfactory.hxx>
-
-#include <test/xmltesttools.hxx>
-
-#include <com/sun/star/packages/zip/ZipFileAccess.hpp>
-
-xmlDocUniquePtr XPathHelper::parseExport2(ScBootstrapFixture & rFixture, 
ScDocShell& rShell, uno::Reference<lang::XMultiServiceFactory> const & 
xSFactory, const OUString& rFile, sal_Int32 nFormat)
-{
-    std::shared_ptr<utl::TempFileNamed> pTempFile = rFixture.exportTo(rShell, 
nFormat);
-
-    return parseExport(pTempFile, xSFactory, rFile);
-}
-
-std::unique_ptr<SvStream> 
XPathHelper::parseExportStream(std::shared_ptr<utl::TempFileNamed> const & 
pTempFile, uno::Reference<lang::XMultiServiceFactory> const & xSFactory, const 
OUString& rFile)
-{
-    // Read the XML stream we're interested in.
-    uno::Reference<packages::zip::XZipFileAccess2> xNameAccess = 
packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(xSFactory),
 pTempFile->GetURL());
-    uno::Reference<io::XInputStream> 
xInputStream(xNameAccess->getByName(rFile), uno::UNO_QUERY);
-    CPPUNIT_ASSERT(xInputStream.is());
-    std::unique_ptr<SvStream> 
pStream(utl::UcbStreamHelper::CreateStream(xInputStream, true));
-    return pStream;
-}
-
-xmlDocUniquePtr XPathHelper::parseExport(std::shared_ptr<utl::TempFileNamed> 
const & pTempFile, uno::Reference<lang::XMultiServiceFactory> const & 
xSFactory, const OUString& rFile)
-{
-    std::unique_ptr<SvStream> pStream = parseExportStream(pTempFile, 
xSFactory, rFile);
-    return XmlTestTools::parseXmlStream(pStream.get());
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/qa/unit/helper/xpath.hxx b/sc/qa/unit/helper/xpath.hxx
deleted file mode 100644
index 9502972ac873..000000000000
--- a/sc/qa/unit/helper/xpath.hxx
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#pragma once
-
-#include <libxml/parser.h>
-
-#include <rtl/ustring.hxx>
-#include <sal/types.h>
-#include "scqahelperdllapi.h"
-#include <test/xmltesttools.hxx>
-
-#include <memory>
-
-namespace com::sun::star::uno { template <class interface_type> class 
Reference; }
-namespace com::sun::star::lang { class XMultiServiceFactory; }
-namespace utl { class TempFile; }
-class ScDocShell;
-class SvStream;
-
-using namespace com::sun::star;
-
-class ScBootstrapFixture;
-
-namespace XPathHelper
-{
-    /**
-     * Given that some problem doesn't affect the result in the importer, we
-     * test the resulting file directly, by opening the zip file, parsing an
-     * xml stream, and asserting an XPath expression. This method returns the
-     * xml stream, so that you can do the asserting.
-     *
-     * Warning: This method saves the document and does not export it! If you 
need to
-     *      test several files in the same exported xml file you need to 
export the file manually
-     *      and call the parseExport method that takes a TempFile
-     */
-    SCQAHELPER_DLLPUBLIC xmlDocUniquePtr parseExport2(ScBootstrapFixture &, 
ScDocShell& rShell, uno::Reference< lang::XMultiServiceFactory> const & 
xSFactory,
-            const OUString& rFile, sal_Int32 nFormat);
-
-    /**
-     * Tries to parse the specified file in the temp file zip container as a 
binary file.
-     */
-    SCQAHELPER_DLLPUBLIC std::unique_ptr<SvStream> 
parseExportStream(std::shared_ptr<utl::TempFileNamed> const & pTempFile,
-            uno::Reference<lang::XMultiServiceFactory> const & xSFactory, 
const OUString& rFile);
-
-    /**
-     * Tries to parse the specified file in the temp file zip container as an 
xml file.
-     *
-     * Should be used when the same exported file is used for testing 
different files in
-     * the same zip file.
-     */
-    SCQAHELPER_DLLPUBLIC xmlDocUniquePtr 
parseExport(std::shared_ptr<utl::TempFileNamed> const & pTempFile, 
uno::Reference< lang::XMultiServiceFactory> const & xSFactory,
-            const OUString& rFile);
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Reply via email to