summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-03-07 20:33:43 +0000
committerAndras Timar <andras.timar@collabora.com>2017-05-30 09:40:36 +0200
commitf5a6844e683f8d97c60f5cf19aab00d41209cfc3 (patch)
treee4ebfe86d810ded6f2f5a9f81866eba3bc3d48a0 /svx
parent3ad60c39a266b54a0dd94ac8bd15a88d64c9dd5f (diff)
make SfxGetpApp just get and move GetOrCreate to the periphery
Reviewed-on: https://gerrit.libreoffice.org/34957 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry-picked from commit 3d213b3dc5130bdbacbd64be00867eecad6373e8) Conflicts: svx/source/gengal/gengal.cxx Change-Id: If3b22635e46dbccf0fad101f51bb653cbbcd3a32 Reviewed-on: https://gerrit.libreoffice.org/38166 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/CppunitTest_svx_unit.mk1
-rw-r--r--svx/Executable_gengal.mk1
-rw-r--r--svx/qa/unit/xoutdev.cxx7
-rw-r--r--svx/source/gengal/gengal.cxx4
4 files changed, 13 insertions, 0 deletions
diff --git a/svx/CppunitTest_svx_unit.mk b/svx/CppunitTest_svx_unit.mk
index 6563d60e4eaf..0bac905a9dc9 100644
--- a/svx/CppunitTest_svx_unit.mk
+++ b/svx/CppunitTest_svx_unit.mk
@@ -20,6 +20,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,svx_unit, \
$(eval $(call gb_CppunitTest_use_libraries,svx_unit, \
sal \
+ sfx \
svxcore \
tl \
unotest \
diff --git a/svx/Executable_gengal.mk b/svx/Executable_gengal.mk
index 49b3b34df987..0cecfa02357c 100644
--- a/svx/Executable_gengal.mk
+++ b/svx/Executable_gengal.mk
@@ -33,6 +33,7 @@ $(eval $(call gb_Executable_use_libraries,gengal,\
basegfx \
sal \
tl \
+ sfx \
svl \
svt \
comphelper \
diff --git a/svx/qa/unit/xoutdev.cxx b/svx/qa/unit/xoutdev.cxx
index 7be8c4749992..22c92d5ff291 100644
--- a/svx/qa/unit/xoutdev.cxx
+++ b/svx/qa/unit/xoutdev.cxx
@@ -13,6 +13,7 @@
#include <cppunit/plugin/TestPlugIn.h>
#include <sal/types.h>
+#include <sfx2/app.hxx>
#include <tools/stream.hxx>
#include <unotest/directories.hxx>
#include <unotools/tempfile.hxx>
@@ -25,6 +26,12 @@ class XOutdevTest : public CppUnit::TestFixture
public:
void testPdfGraphicExport();
+ virtual void setUp() override
+ {
+ CppUnit::TestFixture::setUp();
+ SfxApplication::GetOrCreate();
+ }
+
CPPUNIT_TEST_SUITE(XOutdevTest);
CPPUNIT_TEST(testPdfGraphicExport);
CPPUNIT_TEST_SUITE_END();
diff --git a/svx/source/gengal/gengal.cxx b/svx/source/gengal/gengal.cxx
index f8b5385203a8..7c7fc24dff64 100644
--- a/svx/source/gengal/gengal.cxx
+++ b/svx/source/gengal/gengal.cxx
@@ -36,6 +36,8 @@
#include <osl/file.hxx>
#include <osl/process.h>
#include <rtl/bootstrap.hxx>
+#include <sfx2/app.hxx>
+#include <sal/types.h>
#include <vcl/svapp.hxx>
#include <svx/galtheme.hxx>
@@ -276,6 +278,8 @@ int GalApp::Main()
{
try
{
+ SfxApplication::GetOrCreate();
+
OUString aPath, aDestDir;
OUString aName( "Default name" );
std::vector<INetURLObject> aFiles;