2012-07-05 13:54:17 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/*
|
2013-04-24 17:14:03 +01:00
|
|
|
* This file is part of the LibreOffice project.
|
2012-07-05 13:54:17 +01:00
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*/
|
2013-10-28 03:54:49 +01:00
|
|
|
#ifndef INCLUDED_BASIC_QA_CPPUNIT_BASICTEST_HXX
|
|
|
|
#define INCLUDED_BASIC_QA_CPPUNIT_BASICTEST_HXX
|
2012-07-05 13:54:17 +01:00
|
|
|
|
|
|
|
#include <sal/types.h>
|
2013-11-11 21:25:36 -06:00
|
|
|
#include <cppunit/TestFixture.h>
|
|
|
|
#include <cppunit/extensions/HelperMacros.h>
|
|
|
|
#include <cppunit/plugin/TestPlugIn.h>
|
2012-07-05 13:54:17 +01:00
|
|
|
#include <test/bootstrapfixture.hxx>
|
2013-11-11 21:25:36 -06:00
|
|
|
#include <basic/sbstar.hxx>
|
|
|
|
#include <basic/basrdll.hxx>
|
|
|
|
#include <basic/sbmod.hxx>
|
|
|
|
#include <basic/sbmeth.hxx>
|
|
|
|
#include <basic/sbuno.hxx>
|
2012-07-05 13:54:17 +01:00
|
|
|
|
2013-03-06 21:14:08 +00:00
|
|
|
class MacroSnippet
|
|
|
|
{
|
2016-01-30 22:12:35 +01:00
|
|
|
private:
|
2013-03-06 21:14:08 +00:00
|
|
|
bool mbError;
|
2015-01-18 23:31:37 +01:00
|
|
|
BasicDLL maDll; // we need a dll instance for resource manager etc.
|
2013-03-06 21:14:08 +00:00
|
|
|
SbModuleRef mpMod;
|
|
|
|
StarBASICRef mpBasic;
|
|
|
|
|
2016-01-30 22:12:35 +01:00
|
|
|
void InitSnippet();
|
|
|
|
void MakeModule( const OUString& sSource );
|
2013-03-06 21:14:08 +00:00
|
|
|
|
2016-01-30 22:12:35 +01:00
|
|
|
public:
|
|
|
|
explicit MacroSnippet( const OUString& sSource );
|
|
|
|
MacroSnippet();
|
2013-03-06 21:14:08 +00:00
|
|
|
|
2016-01-30 22:12:35 +01:00
|
|
|
void LoadSourceFromFile( const OUString& sMacroFileURL );
|
2014-05-01 23:42:49 +10:00
|
|
|
|
2016-01-30 22:12:35 +01:00
|
|
|
SbxVariableRef Run( const css::uno::Sequence< css::uno::Any >& rArgs );
|
2013-03-06 21:14:08 +00:00
|
|
|
|
2016-01-30 22:12:35 +01:00
|
|
|
SbxVariableRef Run();
|
2013-03-06 21:14:08 +00:00
|
|
|
|
2016-01-30 22:12:35 +01:00
|
|
|
bool Compile();
|
2013-03-06 21:14:08 +00:00
|
|
|
|
2016-10-05 07:56:12 +02:00
|
|
|
DECL_LINK( BasicErrorHdl, StarBASIC *, bool );
|
2013-03-06 21:14:08 +00:00
|
|
|
|
2016-01-30 22:12:35 +01:00
|
|
|
bool HasError();
|
2013-03-06 21:14:08 +00:00
|
|
|
};
|
|
|
|
|
2012-07-05 13:54:17 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|