LibreOffice Module unotest (master)
1
unotest
source
cpp
bootstrapfixturebase.cxx
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/*
3
* This file is part of the LibreOffice project.
4
*
5
* This Source Code Form is subject to the terms of the Mozilla Public
6
* License, v. 2.0. If a copy of the MPL was not distributed with this
7
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
*/
9
10
#include <
sal/config.h
>
11
#include <config_features.h>
12
13
#include <
unotest/bootstrapfixturebase.hxx
>
14
#include <
comphelper/processfactory.hxx
>
15
#if HAVE_FEATURE_SCRIPTING
16
#include <
basic/sbstar.hxx
>
17
#endif
18
19
using namespace
::
com::sun::star
;
20
21
// NB. this constructor is called before any tests are run, once for each
22
// test function in a rather non-intuitive way. This is why all the 'real'
23
// heavy lifting is deferred until setUp. setUp and tearDown are interleaved
24
// between the tests as you might expect.
25
test::BootstrapFixtureBase::BootstrapFixtureBase
() {}
26
27
test::BootstrapFixtureBase::~BootstrapFixtureBase
() {}
28
29
void
test::BootstrapFixtureBase::setUp
()
30
{
31
m_xContext
=
comphelper::getProcessComponentContext
();
32
m_xFactory =
m_xContext
->getServiceManager();
33
m_xSFactory.set(m_xFactory, uno::UNO_QUERY_THROW);
34
}
35
36
void
test::BootstrapFixtureBase::tearDown
()
37
{
38
#if HAVE_FEATURE_SCRIPTING
39
StarBASIC::DetachAllDocBasicItems
();
40
#endif
41
}
42
43
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
m_xContext
Reference< XComponentContext > m_xContext
bootstrapfixturebase.hxx
StarBASIC::DetachAllDocBasicItems
static void DetachAllDocBasicItems()
test::BootstrapFixtureBase::BootstrapFixtureBase
BootstrapFixtureBase()
Definition:
bootstrapfixturebase.cxx:25
test::BootstrapFixtureBase::setUp
virtual void setUp() override
Definition:
bootstrapfixturebase.cxx:29
test::BootstrapFixtureBase::tearDown
virtual void tearDown() override
Definition:
bootstrapfixturebase.cxx:36
test::BootstrapFixtureBase::~BootstrapFixtureBase
virtual ~BootstrapFixtureBase() override
Definition:
bootstrapfixturebase.cxx:27
config.h
com::sun::star
comphelper::getProcessComponentContext
Reference< XComponentContext > getProcessComponentContext()
processfactory.hxx
sbstar.hxx
Generated on Sun Jul 30 2023 04:33:26 for LibreOffice Module unotest (master) by
1.9.3