1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: basobj.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
33 #include "scriptdocument.hxx"
34 #include <tools/string.hxx>
35 #include <svtools/lstner.hxx>
37 #ifndef _COM_SUN_STAR_IO_XINPUTSTREAMPROVIDER_HXX_
38 #include <com/sun/star/io/XInputStreamProvider.hpp>
40 #include <com/sun/star/script/XLibraryContainer.hpp>
41 #include <com/sun/star/frame/XModel.hpp>
57 void Organize( INT16 tabId
);
60 // Hilfsmethoden fuer den allg. Gebrauch:
61 SbMethod
* CreateMacro( SbModule
* pModule
, const String
& rMacroName
);
62 void RunMethod( SbMethod
* pMethod
);
64 StarBASIC
* FindBasic( const SbxVariable
* pVar
);
66 long HandleBasicError( StarBASIC
* pBasic
);
67 void BasicStopped( BOOL
* pbAppWindowDisabled
= 0, BOOL
* pbDispatcherLocked
= 0, USHORT
* pnWaitCount
= 0,
68 SfxUInt16Item
** ppSWActionCount
= 0, SfxUInt16Item
** ppSWLockViewCount
= 0 );
70 BOOL
IsValidSbxName( const String
& rName
);
72 BasicManager
* FindBasicManager( StarBASIC
* pLib
);
74 SfxBindings
* GetBindingsPtr();
76 void InvalidateDebuggerSlots();
80 ::com::sun::star::uno::Sequence
< ::rtl::OUString
> GetMergedLibraryNames(
81 const ::com::sun::star::uno::Reference
< ::com::sun::star::script::XLibraryContainer
>& xModLibContainer
,
82 const ::com::sun::star::uno::Reference
< ::com::sun::star::script::XLibraryContainer
>& xDlgLibContainer
);
84 // new methods for modules
86 ::rtl::OUString
GetModule(
87 const ScriptDocument
& rDocument
, const String
& rLibName
, const String
& rModName
)
88 throw( ::com::sun::star::container::NoSuchElementException
);
92 Will show an error message when renaming fails because the new name is already used.
95 Window
* pErrorParent
, const ScriptDocument
& rDocument
,
96 const String
& rLibName
, const String
& rOldName
, const String
& rNewName
);
98 // new methods for macros
100 ::rtl::OUString
ChooseMacro( const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XModel
>& rxLimitToDocument
,
101 BOOL bChooseOnly
, const ::rtl::OUString
& rMacroDesc
);
103 ::com::sun::star::uno::Sequence
< ::rtl::OUString
> GetMethodNames(
104 const ScriptDocument
& rDocument
, const String
& rLibName
, const String
& rModName
)
105 throw( ::com::sun::star::container::NoSuchElementException
);
108 const ScriptDocument
& rDocument
, const String
& rLibName
, const String
& rModName
, const String
& rMethName
);
110 // new methods for dialogs
112 ::com::sun::star::uno::Reference
< ::com::sun::star::io::XInputStreamProvider
> GetDialog(
113 const ScriptDocument
& rDocument
, const String
& rLibName
, const String
& rDlgName
)
114 throw( ::com::sun::star::container::NoSuchElementException
);
118 Will show an error message when renaming fails because the new name is already used.
121 Window
* pErrorParent
, const ScriptDocument
& rDocument
, const String
& rLibName
, const String
& rOldName
, const String
& rNewName
)
122 throw( ::com::sun::star::container::ElementExistException
, ::com::sun::star::container::NoSuchElementException
);
125 const ScriptDocument
& rDocument
, const String
& rLibName
, const String
& rDlgName
);
127 void MarkDocumentModified( const ScriptDocument
& rDocument
);
130 #endif // _BASOBJ_HXX