[Libreoffice-commits] .: 4 commits - configmgr/source sc/CppunitTest_sc_test_filters.mk sc/prj sc/qa svx/source

Michael Meeks michael at kemper.freedesktop.org
Fri Sep 2 07:31:21 PDT 2011


 configmgr/source/components.cxx   |   17 +++++++++++++++--
 sc/CppunitTest_sc_test_filters.mk |   38 +++++++++++++++++++++++++++++++-------
 sc/prj/build.lst                  |    2 +-
 sc/qa/unit/filters-test.cxx       |   22 +++++++++++++---------
 svx/source/xoutdev/xtabcolr.cxx   |    1 -
 svx/source/xoutdev/xtabdash.cxx   |    1 -
 svx/source/xoutdev/xtabgrdt.cxx   |   14 --------------
 svx/source/xoutdev/xtabhtch.cxx   |    1 -
 svx/source/xoutdev/xtablend.cxx   |    1 -
 9 files changed, 60 insertions(+), 37 deletions(-)

New commits:
commit 59b308e05613e2e5611dac427f3523b2fe59ba46
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Fri Sep 2 15:30:17 2011 +0100

    add missing components, use new configmgr path, and enable ODS test

diff --git a/sc/CppunitTest_sc_test_filters.mk b/sc/CppunitTest_sc_test_filters.mk
index 073a4c9..8f700bb 100644
--- a/sc/CppunitTest_sc_test_filters.mk
+++ b/sc/CppunitTest_sc_test_filters.mk
@@ -94,6 +94,7 @@ $(eval $(call gb_CppunitTest_set_args,sc_filters_test,\
     --headless \
     --invisible \
     --protector unoexceptionprotector$(gb_Library_DLLEXT) unoexceptionprotector \
+    -env:OOO_CONFIG_REGISTRY_DIR=file://$(OUTDIR)/xml/registry \
 ))
 
 $(eval $(call gb_RdbTarget_RdbTarget,sc_filters_test))
@@ -111,9 +112,16 @@ $(eval $(call gb_RdbTarget_add_components,sc_filters_test,\
     comphelper/util/comphelp \
     i18npool/util/i18npool \
     package/util/package2 \
+    package/source/xstor/xstor \
+    unotools/util/utl \
+    basic/util/sb \
+    unoxml/source/rdf/unordf \
+    sax/source/expatwrap/expwrap \
 ))
 
 $(eval $(call gb_RdbTarget_add_old_components,sc_filters_test,\
+    configmgr \
+    filterconfig1 \
     ucb1 \
     ucpfile1 \
 ))
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index 17e6a23..8ad19eb 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -193,7 +193,6 @@ void FiltersTest::testODSs()
     rtl::OUString aString1(RTL_CONSTASCII_USTRINGPARAM("calc8"));
     rtl::OUString aString2 = m_aSrcRoot + rtl::OUString(
         RTL_CONSTASCII_USTRINGPARAM("/sc/qa/unit/data/ods/named-ranges-global.ods"));
-    return;
 
     ScDocShellRef xDocSh = load( aString1, aString2 , rtl::OUString(), 50331943);
 
commit f44c104106170fca4bcaa90b50572dddda6c9858
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Fri Sep 2 15:26:20 2011 +0100

    enable calc's ODS file filter unit test

diff --git a/sc/CppunitTest_sc_test_filters.mk b/sc/CppunitTest_sc_test_filters.mk
index 6a52e2c..073a4c9 100644
--- a/sc/CppunitTest_sc_test_filters.mk
+++ b/sc/CppunitTest_sc_test_filters.mk
@@ -35,20 +35,36 @@ $(eval $(call gb_CppunitTest_add_exception_objects,sc_filters_test, \
 ))
 
 $(eval $(call gb_CppunitTest_add_linked_libs,sc_filters_test, \
+    avmedia \
+    basegfx \
+    comphelper \
+    cppu \
+    cppuhelper \
+    drawinglayer \
+    editeng \
+    fileacc \
+    for \
+    forui \
+    i18nisolang1 \
+    msfilter \
+    sal \
+    salhelper \
+    sb \
     sc \
     sfx \
+    sot \
     svl \
     svt \
-    vcl \
+    svx \
+    svxcore \
+    tk \
     tl \
     ucbhelper \
     utl \
-    i18nisolang1 \
-    comphelper \
-    cppu \
-    cppuhelper \
-    sal \
-    $(gb_STDLIBS) \
+    vbahelper \
+    vcl \
+    xo \
+	$(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_CppunitTest_set_include,sc_filters_test,\
diff --git a/sc/prj/build.lst b/sc/prj/build.lst
index 00807e2..b2c1b77 100644
--- a/sc/prj/build.lst
+++ b/sc/prj/build.lst
@@ -1,2 +1,2 @@
-sc      sc      :       filter TRANSLATIONS:translations vbahelper oovbaapi svx uui stoc BOOST:boost formula MDDS:mdds oox LIBXSLT:libxslt unoxml ure test NULL
+sc      sc      :       filter TRANSLATIONS:translations vbahelper oovbaapi svx uui stoc BOOST:boost formula MDDS:mdds oox LIBXSLT:libxslt unoxml ure test xmloff desktop ucb package configmgr NULL
 sc sc\prj nmake - all sc_prj   NULL
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index 08a8969..17e6a23 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -73,7 +73,7 @@ public:
     virtual void tearDown();
 
     void recursiveScan(const rtl::OUString &rFilter, const rtl::OUString &rURL, const rtl::OUString &rUserData, int nExpected);
-    ScDocShellRef load(const rtl::OUString &rFilter, const rtl::OUString &rURL, const rtl::OUString &rUserData);
+    ScDocShellRef load(const rtl::OUString &rFilter, const rtl::OUString &rURL, const rtl::OUString &rUserData, sal_uLong nFormatType = 0);
 
     /**
      * Ensure CVEs remain unbroken
@@ -95,12 +95,16 @@ private:
 };
 
 ScDocShellRef FiltersTest::load(const rtl::OUString &rFilter, const rtl::OUString &rURL,
-    const rtl::OUString &rUserData)
+    const rtl::OUString &rUserData, sal_uLong nFormatType)
 {
+    sal_uInt32 nFormat = 0;
+    if (nFormatType)
+        nFormat = SFX_FILTER_IMPORT | SFX_FILTER_USESOPTIONS;
     SfxFilter aFilter(
         rFilter,
-        rtl::OUString(), 0, 0, rtl::OUString(), 0, rtl::OUString(),
-        rUserData, rtl::OUString() );
+        rtl::OUString(), nFormatType, nFormat, rtl::OUString(), 0, rtl::OUString(),
+        rUserData, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:factory/scalc*")) );
+    aFilter.SetVersion(SOFFICE_FILEFORMAT_CURRENT);
 
     ScDocShellRef xDocShRef = new ScDocShell;
     SfxMedium aSrcMed(rURL, STREAM_STD_READ, true);
@@ -186,13 +190,14 @@ void FiltersTest::testCVEs()
 
 void FiltersTest::testODSs()
 {
-#if 0
-// TODO: loading of ods still fails.  I need to look into this.
-    ScDocShellRef xDocSh = load(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("calc8")),
-        m_aSrcRoot + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/clone/calc/sc/qa/unit/data/ods/named-ranges-global.ods")), rtl::OUString());
+    rtl::OUString aString1(RTL_CONSTASCII_USTRINGPARAM("calc8"));
+    rtl::OUString aString2 = m_aSrcRoot + rtl::OUString(
+        RTL_CONSTASCII_USTRINGPARAM("/sc/qa/unit/data/ods/named-ranges-global.ods"));
+    return;
+
+    ScDocShellRef xDocSh = load( aString1, aString2 , rtl::OUString(), 50331943);
 
     CPPUNIT_ASSERT_MESSAGE("Failed to load named-ranges-global.ods.", xDocSh.Is());
-#endif
 }
 
 FiltersTest::FiltersTest()
commit da1073f13071d3ad1c12ae7d66950beb2414a02c
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Fri Sep 2 15:20:53 2011 +0100

    let unit tests use the solver's config xml with OOO_CONFIG_REGISTRY_DIR

diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index ec2c0a6..4887928 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -511,7 +511,20 @@ Components::Components(
     lock_ = lock();
 
     OSL_ASSERT(context.is());
-    RTL_LOGFILE_TRACE_AUTHOR("configmgr", "sb", "begin parsing");
+
+    // Check if we are being used for in-tree unit tests ...
+    rtl::OUString aUnitTestDir;
+    if (rtl::Bootstrap::get( rtl::OUString(
+                RTL_CONSTASCII_USTRINGPARAM("OOO_CONFIG_REGISTRY_DIR") ), aUnitTestDir))
+    {
+        parseXcsXcuLayer( 0, aUnitTestDir );
+        // next is required for the (somewhat strange) filter configuration
+        parseModuleLayer( 1, aUnitTestDir + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/spool")));
+        return;
+    }
+
+    RTL_LOGFILE_TRACE("configmgr : begin parsing");
+
     parseXcsXcuLayer(
         0,
         expand(
@@ -582,7 +595,7 @@ Components::Components(
                     "PackageRegistryBackend/configmgr.ini"))),
         true);
     parseModificationLayer();
-    RTL_LOGFILE_TRACE_AUTHOR("configmgr", "sb", "end parsing");
+    RTL_LOGFILE_TRACE("configmgr : end parsing");
 }
 
 Components::~Components()
commit 7872be8ab6add3dddb47fc08a1e3fd3f42c244d6
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Thu Sep 1 21:54:50 2011 +0100

    more xoutdev redundant cut/paste cleanup

diff --git a/svx/source/xoutdev/xtabcolr.cxx b/svx/source/xoutdev/xtabcolr.cxx
index 502bb0c..f24d0e7 100644
--- a/svx/source/xoutdev/xtabcolr.cxx
+++ b/svx/source/xoutdev/xtabcolr.cxx
@@ -32,7 +32,6 @@
 #include "svx/XPropertyTable.hxx"
 #include <unotools/pathoptions.hxx>
 
-#include <sfx2/docfile.hxx>
 #include <svx/dialogs.hrc>
 #include <svx/dialmgr.hxx>
 #include <svx/xtable.hxx>
diff --git a/svx/source/xoutdev/xtabdash.cxx b/svx/source/xoutdev/xtabdash.cxx
index 8287dd8..c0fbf25 100644
--- a/svx/source/xoutdev/xtabdash.cxx
+++ b/svx/source/xoutdev/xtabdash.cxx
@@ -38,7 +38,6 @@
 #include <vcl/virdev.hxx>
 #include <vcl/window.hxx>
 #include <svl/itemset.hxx>
-#include <sfx2/docfile.hxx>
 #include <svx/dialogs.hrc>
 #include <svx/dialmgr.hxx>
 #include <svx/xtable.hxx>
diff --git a/svx/source/xoutdev/xtabgrdt.cxx b/svx/source/xoutdev/xtabgrdt.cxx
index 73e9f98..91c83c4 100644
--- a/svx/source/xoutdev/xtabgrdt.cxx
+++ b/svx/source/xoutdev/xtabgrdt.cxx
@@ -35,7 +35,6 @@
 
 #include <vcl/virdev.hxx>
 #include <svl/itemset.hxx>
-#include <sfx2/docfile.hxx>
 #include <svx/dialogs.hrc>
 #include <svx/dialmgr.hxx>
 #include <svx/xtable.hxx>
@@ -53,16 +52,6 @@
 
 using namespace com::sun::star;
 
-using ::rtl::OUString;
-
-char const aChckGradient[]  = { 0x04, 0x00, 'S','O','G','L'};   // < 5.2
-char const aChckGradient0[] = { 0x04, 0x00, 'S','O','G','0'};   // = 5.2
-char const aChckXML[]       = { '<', '?', 'x', 'm', 'l' };      // = 6.0
-
-// --------------------
-// class XGradientList
-// --------------------
-
 class impXGradientList
 {
 private:
@@ -245,7 +234,4 @@ Bitmap* XGradientList::CreateBitmapForUI( long nIndex, sal_Bool bDelete )
     return pBitmap;
 }
 
-//////////////////////////////////////////////////////////////////////////////
-// eof
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/xoutdev/xtabhtch.cxx b/svx/source/xoutdev/xtabhtch.cxx
index f61ed6e..be426f8 100644
--- a/svx/source/xoutdev/xtabhtch.cxx
+++ b/svx/source/xoutdev/xtabhtch.cxx
@@ -36,7 +36,6 @@
 
 #include <vcl/virdev.hxx>
 #include <svl/itemset.hxx>
-#include <sfx2/docfile.hxx>
 #include <svx/dialogs.hrc>
 #include <svx/dialmgr.hxx>
 #include <svx/xtable.hxx>
diff --git a/svx/source/xoutdev/xtablend.cxx b/svx/source/xoutdev/xtablend.cxx
index 6ffc622..40bde52 100644
--- a/svx/source/xoutdev/xtablend.cxx
+++ b/svx/source/xoutdev/xtablend.cxx
@@ -36,7 +36,6 @@
 
 #include <vcl/svapp.hxx>
 #include <svl/itemset.hxx>
-#include <sfx2/docfile.hxx>
 
 #include <svx/dialogs.hrc>
 #include <svx/dialmgr.hxx>


More information about the Libreoffice-commits mailing list