[Libreoffice-commits] .: sc/CppunitTest_sc_ucalc.mk sc/qa sc/source

Caolán McNamara caolan at kemper.freedesktop.org
Tue Apr 12 07:21:34 PDT 2011


 sc/CppunitTest_sc_ucalc.mk      |    2 +-
 sc/qa/unit/ucalc.cxx            |    9 ++++-----
 sc/source/ui/docshell/impex.cxx |   13 ++++++++-----
 3 files changed, 13 insertions(+), 11 deletions(-)

New commits:
commit 6423636d79fdd09a0c311e5ff2b9439905351f43
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Apr 12 15:14:12 2011 +0100

    Resolves: fdo#36128 fix up paths for gbuild

diff --git a/sc/CppunitTest_sc_ucalc.mk b/sc/CppunitTest_sc_ucalc.mk
index 0c857ab..5a92c16 100644
--- a/sc/CppunitTest_sc_ucalc.mk
+++ b/sc/CppunitTest_sc_ucalc.mk
@@ -40,7 +40,7 @@ $(eval $(call gb_CppunitTest_set_args,sc_ucalc,\
 	--invisible \
 	"-env:UNO_TYPES=$(foreach binrdb,udkapi.rdb types.rdb,\
 		file://$(if $(filter WNT,$(OS)),/)$(OUTDIR)/bin/$(binrdb))" \
-    "-env:UNO_SERVICES=$(foreach rdb,$(OUTDIR)/xml/ure/services.rdb $(WORKDIR)/CustomTarget/sc/qa/unit/services.rdb,\
+	"-env:UNO_SERVICES=$(foreach rdb,$(OUTDIR)/xml/ure/services.rdb $(WORKDIR)/CustomTarget/sc/qa/unit/services.rdb,\
 		file://$(if $(filter WNT,$(OS)),/)$(rdb))" \
 	$(foreach dir,URE_INTERNAL_LIB_DIR OOO_BASE_DIR BRAND_BASE_DIR, \
 		-env:$(dir)=file://$(if $(filter WNT,$(OS)),/$(OUTDIR)/bin,$(OUTDIR)/lib)) \
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index b489528..3fb247c 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -266,8 +266,7 @@ public:
     CPPUNIT_TEST(testGraphicsInGroup);
     CPPUNIT_TEST(testStreamValid);
     CPPUNIT_TEST(testFunctionLists);
-    // fdo#36128 disabled for now because it fails
-    //CPPUNIT_TEST(testCVEs);
+    CPPUNIT_TEST(testCVEs);
     CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -488,15 +487,15 @@ void Test::testCVEs()
     bool bResult;
 
     bResult = testLoad(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Quattro Pro 6.0")),
-        m_aPWDURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/CVE/CVE-2007-5745-1.wb2")));
+        m_aPWDURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/qa/unit/CVE/CVE-2007-5745-1.wb2")));
     CPPUNIT_ASSERT_MESSAGE("CVE-2007-5745 regression", bResult == true);
 
     bResult = testLoad(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Quattro Pro 6.0")),
-        m_aPWDURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/CVE/CVE-2007-5745-2.wb2")));
+        m_aPWDURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/qa/unit/CVE/CVE-2007-5745-2.wb2")));
     CPPUNIT_ASSERT_MESSAGE("CVE-2007-5745 regression", bResult == true);
 
     bResult = testLoad(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Quattro Pro 6.0")),
-        m_aPWDURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/CVE/CVE-2007-5747-1.wb2")));
+        m_aPWDURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/qa/unit/CVE/CVE-2007-5747-1.wb2")));
     CPPUNIT_ASSERT_MESSAGE("CVE-2007-5747 regression", bResult == false);
 }
 
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 8c6aa8c..21becd5 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -2084,13 +2084,16 @@ ScFormatFilterPlugin &ScFormatFilter::Get()
     if (plugin != NULL)
         return *plugin;
 
+    ::rtl::OUString sFilterLib(RTL_CONSTASCII_USTRINGPARAM(SVLIBRARY("scfilt")));
     static ::osl::Module aModule;
-    if ( aModule.loadRelative( &thisModule,
-                   ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "scfilt" ) ) ) ) )
+    bool bLoaded = aModule.loadRelative(&thisModule, sFilterLib);
+    if (!bLoaded)
+        bLoaded = aModule.load(sFilterLib);
+    if (bLoaded)
     {
-    oslGenericFunction fn = aModule.getFunctionSymbol( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ScFilterCreate" )) );
-    if (fn != NULL)
-        plugin = reinterpret_cast<FilterFn>(fn)();
+        oslGenericFunction fn = aModule.getFunctionSymbol( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ScFilterCreate" )) );
+        if (fn != NULL)
+            plugin = reinterpret_cast<FilterFn>(fn)();
     }
     if (plugin == NULL)
         plugin = new ScFormatFilterMissing();


More information about the Libreoffice-commits mailing list