[Libreoffice-commits] core.git: vcl/workben

Caolán McNamara caolanm at redhat.com
Wed Nov 8 17:19:21 UTC 2017


 vcl/workben/fftester.cxx |   12 ++++++++++++
 1 file changed, 12 insertions(+)

New commits:
commit e3e4b799d9f0d04065397f05deefbb029a5ee7b1
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 8 14:34:07 2017 +0000

    mirror fuzzer setup in fftester
    
    Change-Id: I8bcb834a7e297f43fad6a07c2e861897f962e8d4
    Reviewed-on: https://gerrit.libreoffice.org/44468
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/workben/fftester.cxx b/vcl/workben/fftester.cxx
index 7b61bbb8c40b..548ff3cd0c00 100644
--- a/vcl/workben/fftester.cxx
+++ b/vcl/workben/fftester.cxx
@@ -30,6 +30,8 @@
 #include <comphelper/processfactory.hxx>
 
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/ucb/XContentProvider.hpp>
+#include <com/sun/star/ucb/XUniversalContentBroker.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
 #include <unotools/configmgr.hxx>
 #include <vcl/dibtools.hxx>
@@ -88,6 +90,16 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
             Application::Abort( "Failed to bootstrap" );
         comphelper::setProcessServiceFactory( xServiceManager );
         utl::ConfigManager::EnableAvoidConfig();
+
+        // initialise unconfigured UCB:
+        css::uno::Reference<css::ucb::XUniversalContentBroker> xUcb(comphelper::getProcessServiceFactory()->
+            createInstance("com.sun.star.ucb.UniversalContentBroker"), css::uno::UNO_QUERY_THROW);
+        css::uno::Sequence<css::uno::Any> aArgs(1);
+        aArgs[0] <<= OUString("NoConfig");
+        css::uno::Reference<css::ucb::XContentProvider> xFileProvider(comphelper::getProcessServiceFactory()->
+            createInstanceWithArguments("com.sun.star.ucb.FileContentProvider", aArgs), css::uno::UNO_QUERY_THROW);
+        xUcb->registerContentProvider(xFileProvider, "file", true);
+
         InitVCL();
 
         if (strcmp(argv[2], "wmf") == 0 || strcmp(argv[2], "emf") == 0)


More information about the Libreoffice-commits mailing list