tdf#161412 - UI: fix warning in PDF password dialog didn't disappear
[LibreOffice.git] / basic / qa / cppunit / basictest.hxx
blob46af3542b82b834368841dd5eb02f1ae2ba105eb
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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 #pragma once
11 #include <sal/types.h>
12 #include <cppunit/TestFixture.h>
13 #include <cppunit/extensions/HelperMacros.h>
14 #include <cppunit/plugin/TestPlugIn.h>
15 #include <test/bootstrapfixture.hxx>
16 #include <basic/sbstar.hxx>
17 #include <basic/basrdll.hxx>
18 #include <basic/sbmod.hxx>
19 #include <basic/sbmeth.hxx>
20 #include <basic/sbuno.hxx>
22 class MacroSnippet
24 private:
25 bool mbError;
26 ErrCodeMsg maErrCode;
27 BasicDLL maDll; // we need a dll instance for resource manager etc.
28 SbModuleRef mpMod;
29 StarBASICRef mpBasic;
31 void InitSnippet();
32 void MakeModule(const OUString& sName, const OUString& sSource);
34 public:
35 explicit MacroSnippet(const OUString& sSource);
36 MacroSnippet();
38 void LoadSourceFromFile(const OUString& sName, const OUString& sMacroFileURL);
40 SbxVariableRef Run(const css::uno::Sequence<css::uno::Any>& rArgs);
42 SbxVariableRef Run();
44 bool Compile();
46 DECL_LINK(BasicErrorHdl, StarBASIC*, bool);
48 bool HasError() const;
49 const ErrCodeMsg& getError() const;
52 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */