2007-03-15 15:01:45 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-11 10:07:44 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2007-03-15 15:01:45 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2007-03-15 15:01:45 +00:00
|
|
|
*
|
2008-04-11 10:07:44 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2007-03-15 15:01:45 +00:00
|
|
|
*
|
2008-04-11 10:07:44 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2007-03-15 15:01:45 +00:00
|
|
|
*
|
2008-04-11 10:07:44 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2007-03-15 15:01:45 +00:00
|
|
|
*
|
2008-04-11 10:07:44 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2007-03-15 15:01:45 +00:00
|
|
|
*
|
2008-04-11 10:07:44 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2007-03-15 15:01:45 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
#ifndef _BASOBJ_HXX
|
|
|
|
#define _BASOBJ_HXX
|
|
|
|
|
|
|
|
#include "scriptdocument.hxx"
|
|
|
|
#include <tools/string.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/lstner.hxx>
|
2007-03-15 15:01:45 +00:00
|
|
|
|
|
|
|
#ifndef _COM_SUN_STAR_IO_XINPUTSTREAMPROVIDER_HXX_
|
|
|
|
#include <com/sun/star/io/XInputStreamProvider.hpp>
|
|
|
|
#endif
|
|
|
|
#include <com/sun/star/script/XLibraryContainer.hpp>
|
|
|
|
#include <com/sun/star/frame/XModel.hpp>
|
|
|
|
|
|
|
|
class SfxMacro;
|
|
|
|
class SbMethod;
|
|
|
|
class SbModule;
|
|
|
|
class SbxObject;
|
|
|
|
class SbxVariable;
|
|
|
|
class StarBASIC;
|
|
|
|
class BasicManager;
|
|
|
|
class SfxUInt16Item;
|
|
|
|
class SfxBindings;
|
|
|
|
class Window;
|
|
|
|
struct BasicIDE_Impl;
|
|
|
|
|
2008-07-07 11:24:15 +00:00
|
|
|
namespace BasicIDE
|
2007-03-15 15:01:45 +00:00
|
|
|
{
|
2008-07-07 11:24:15 +00:00
|
|
|
void Organize( INT16 tabId );
|
2007-03-15 15:01:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
// Hilfsmethoden fuer den allg. Gebrauch:
|
2008-07-07 11:24:15 +00:00
|
|
|
SbMethod* CreateMacro( SbModule* pModule, const String& rMacroName );
|
|
|
|
void RunMethod( SbMethod* pMethod );
|
|
|
|
|
|
|
|
StarBASIC* FindBasic( const SbxVariable* pVar );
|
|
|
|
void StopBasic();
|
|
|
|
long HandleBasicError( StarBASIC* pBasic );
|
|
|
|
void BasicStopped( BOOL* pbAppWindowDisabled = 0, BOOL* pbDispatcherLocked = 0, USHORT* pnWaitCount = 0,
|
2007-03-15 15:01:45 +00:00
|
|
|
SfxUInt16Item** ppSWActionCount = 0, SfxUInt16Item** ppSWLockViewCount = 0 );
|
|
|
|
|
2008-07-07 11:24:15 +00:00
|
|
|
BOOL IsValidSbxName( const String& rName );
|
2007-03-15 15:01:45 +00:00
|
|
|
|
2008-07-07 11:24:15 +00:00
|
|
|
BasicManager* FindBasicManager( StarBASIC* pLib );
|
2007-03-15 15:01:45 +00:00
|
|
|
|
2008-07-07 11:24:15 +00:00
|
|
|
SfxBindings* GetBindingsPtr();
|
2007-03-15 15:01:45 +00:00
|
|
|
|
2008-07-07 11:24:15 +00:00
|
|
|
void InvalidateDebuggerSlots();
|
2007-03-15 15:01:45 +00:00
|
|
|
|
|
|
|
// libraries
|
|
|
|
|
2008-07-07 11:24:15 +00:00
|
|
|
::com::sun::star::uno::Sequence< ::rtl::OUString > GetMergedLibraryNames(
|
2007-03-15 15:01:45 +00:00
|
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >& xModLibContainer,
|
|
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >& xDlgLibContainer );
|
|
|
|
|
|
|
|
// new methods for modules
|
|
|
|
|
2008-07-07 11:24:15 +00:00
|
|
|
::rtl::OUString GetModule(
|
2007-03-15 15:01:45 +00:00
|
|
|
const ScriptDocument& rDocument, const String& rLibName, const String& rModName )
|
|
|
|
throw( ::com::sun::star::container::NoSuchElementException );
|
|
|
|
|
|
|
|
/** renames a module
|
|
|
|
|
|
|
|
Will show an error message when renaming fails because the new name is already used.
|
|
|
|
*/
|
2008-07-07 11:24:15 +00:00
|
|
|
bool RenameModule(
|
2007-03-15 15:01:45 +00:00
|
|
|
Window* pErrorParent, const ScriptDocument& rDocument,
|
|
|
|
const String& rLibName, const String& rOldName, const String& rNewName );
|
|
|
|
|
|
|
|
// new methods for macros
|
|
|
|
|
2008-07-07 11:24:15 +00:00
|
|
|
::rtl::OUString ChooseMacro( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxLimitToDocument,
|
2007-03-15 15:01:45 +00:00
|
|
|
BOOL bChooseOnly, const ::rtl::OUString& rMacroDesc );
|
|
|
|
|
2008-07-07 11:24:15 +00:00
|
|
|
::com::sun::star::uno::Sequence< ::rtl::OUString > GetMethodNames(
|
2007-03-15 15:01:45 +00:00
|
|
|
const ScriptDocument& rDocument, const String& rLibName, const String& rModName )
|
|
|
|
throw( ::com::sun::star::container::NoSuchElementException );
|
|
|
|
|
2008-07-07 11:24:15 +00:00
|
|
|
BOOL HasMethod(
|
2007-03-15 15:01:45 +00:00
|
|
|
const ScriptDocument& rDocument, const String& rLibName, const String& rModName, const String& rMethName );
|
|
|
|
|
|
|
|
// new methods for dialogs
|
|
|
|
|
2008-07-07 11:24:15 +00:00
|
|
|
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStreamProvider > GetDialog(
|
2007-03-15 15:01:45 +00:00
|
|
|
const ScriptDocument& rDocument, const String& rLibName, const String& rDlgName )
|
|
|
|
throw( ::com::sun::star::container::NoSuchElementException );
|
|
|
|
|
|
|
|
/** renames a dialog
|
|
|
|
|
|
|
|
Will show an error message when renaming fails because the new name is already used.
|
|
|
|
*/
|
2008-07-07 11:24:15 +00:00
|
|
|
bool RenameDialog(
|
2007-03-15 15:01:45 +00:00
|
|
|
Window* pErrorParent, const ScriptDocument& rDocument, const String& rLibName, const String& rOldName, const String& rNewName )
|
|
|
|
throw( ::com::sun::star::container::ElementExistException, ::com::sun::star::container::NoSuchElementException );
|
|
|
|
|
2008-07-07 11:24:15 +00:00
|
|
|
bool RemoveDialog(
|
2007-03-15 15:01:45 +00:00
|
|
|
const ScriptDocument& rDocument, const String& rLibName, const String& rDlgName );
|
|
|
|
|
2008-07-07 11:24:15 +00:00
|
|
|
void MarkDocumentModified( const ScriptDocument& rDocument );
|
|
|
|
}
|
2007-03-15 15:01:45 +00:00
|
|
|
|
|
|
|
#endif // _BASOBJ_HXX
|