1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
30 #include "scriptdocument.hxx"
31 #include <tools/string.hxx>
32 #include <svl/lstner.hxx>
34 #ifndef _COM_SUN_STAR_IO_XINPUTSTREAMPROVIDER_HXX_
35 #include <com/sun/star/io/XInputStreamProvider.hpp>
37 #include <com/sun/star/script/XLibraryContainer.hpp>
38 #include <com/sun/star/frame/XModel.hpp>
54 void Organize( sal_Int16 tabId
);
57 // Hilfsmethoden fuer den allg. Gebrauch:
58 SbMethod
* CreateMacro( SbModule
* pModule
, const String
& rMacroName
);
59 void RunMethod( SbMethod
* pMethod
);
61 StarBASIC
* FindBasic( const SbxVariable
* pVar
);
63 long HandleBasicError( StarBASIC
* pBasic
);
64 void BasicStopped( sal_Bool
* pbAppWindowDisabled
= 0, sal_Bool
* pbDispatcherLocked
= 0, sal_uInt16
* pnWaitCount
= 0,
65 SfxUInt16Item
** ppSWActionCount
= 0, SfxUInt16Item
** ppSWLockViewCount
= 0 );
67 sal_Bool
IsValidSbxName( const String
& rName
);
69 BasicManager
* FindBasicManager( StarBASIC
* pLib
);
71 SfxBindings
* GetBindingsPtr();
73 void InvalidateDebuggerSlots();
77 ::com::sun::star::uno::Sequence
< ::rtl::OUString
> GetMergedLibraryNames(
78 const ::com::sun::star::uno::Reference
< ::com::sun::star::script::XLibraryContainer
>& xModLibContainer
,
79 const ::com::sun::star::uno::Reference
< ::com::sun::star::script::XLibraryContainer
>& xDlgLibContainer
);
81 // new methods for modules
83 ::rtl::OUString
GetModule(
84 const ScriptDocument
& rDocument
, const String
& rLibName
, const String
& rModName
)
85 throw( ::com::sun::star::container::NoSuchElementException
);
89 Will show an error message when renaming fails because the new name is already used.
92 Window
* pErrorParent
, const ScriptDocument
& rDocument
,
93 const String
& rLibName
, const String
& rOldName
, const String
& rNewName
);
95 // new methods for macros
97 ::rtl::OUString
ChooseMacro( const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XModel
>& rxLimitToDocument
,
98 sal_Bool bChooseOnly
, const ::rtl::OUString
& rMacroDesc
);
100 ::com::sun::star::uno::Sequence
< ::rtl::OUString
> GetMethodNames(
101 const ScriptDocument
& rDocument
, const String
& rLibName
, const String
& rModName
)
102 throw( ::com::sun::star::container::NoSuchElementException
);
105 const ScriptDocument
& rDocument
, const String
& rLibName
, const String
& rModName
, const String
& rMethName
);
107 // new methods for dialogs
109 ::com::sun::star::uno::Reference
< ::com::sun::star::io::XInputStreamProvider
> GetDialog(
110 const ScriptDocument
& rDocument
, const String
& rLibName
, const String
& rDlgName
)
111 throw( ::com::sun::star::container::NoSuchElementException
);
115 Will show an error message when renaming fails because the new name is already used.
118 Window
* pErrorParent
, const ScriptDocument
& rDocument
, const String
& rLibName
, const String
& rOldName
, const String
& rNewName
)
119 throw( ::com::sun::star::container::ElementExistException
, ::com::sun::star::container::NoSuchElementException
);
122 const ScriptDocument
& rDocument
, const String
& rLibName
, const String
& rDlgName
);
124 void MarkDocumentModified( const ScriptDocument
& rDocument
);
127 #endif // _BASOBJ_HXX