1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef BASCTL_BASOBJ_HXX
20 #define BASCTL_BASOBJ_HXX
22 #include "scriptdocument.hxx"
24 #include <svl/lstner.hxx>
38 void Organize( sal_Int16 tabId
);
41 // help methods for the general use:
42 SbMethod
* CreateMacro( SbModule
* pModule
, const String
& rMacroName
);
43 void RunMethod( SbMethod
* pMethod
);
45 StarBASIC
* FindBasic( const SbxVariable
* pVar
);
47 long HandleBasicError( StarBASIC
* pBasic
);
48 void BasicStopped( bool* pbAppWindowDisabled
= 0, bool* pbDispatcherLocked
= 0, sal_uInt16
* pnWaitCount
= 0,
49 SfxUInt16Item
** ppSWActionCount
= 0, SfxUInt16Item
** ppSWLockViewCount
= 0 );
51 bool IsValidSbxName( const String
& rName
);
53 BasicManager
* FindBasicManager( StarBASIC
* pLib
);
55 SfxBindings
* GetBindingsPtr();
57 SfxDispatcher
* GetDispatcher ();
59 void InvalidateDebuggerSlots();
63 ::com::sun::star::uno::Sequence
< OUString
> GetMergedLibraryNames(
64 const ::com::sun::star::uno::Reference
< ::com::sun::star::script::XLibraryContainer
>& xModLibContainer
,
65 const ::com::sun::star::uno::Reference
< ::com::sun::star::script::XLibraryContainer
>& xDlgLibContainer
);
69 Will show an error message when renaming fails because the new name is already used.
72 Window
* pErrorParent
, const ScriptDocument
& rDocument
,
73 const OUString
& rLibName
, const OUString
& rOldName
, const OUString
& rNewName
);
75 // new methods for macros
78 const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XModel
>& rxLimitToDocument
,
79 bool bChooseOnly
, const OUString
& rMacroDesc
);
81 ::com::sun::star::uno::Sequence
< OUString
> GetMethodNames(
82 const ScriptDocument
& rDocument
, const OUString
& rLibName
, const OUString
& rModName
)
83 throw( ::com::sun::star::container::NoSuchElementException
);
86 const ScriptDocument
& rDocument
, const OUString
& rLibName
, const OUString
& rModName
, const OUString
& rMethName
);
88 // new methods for dialogs
92 Will show an error message when renaming fails because the new name is already used.
95 Window
* pErrorParent
, const ScriptDocument
& rDocument
, const OUString
& rLibName
, const OUString
& rOldName
, const OUString
& rNewName
)
96 throw( ::com::sun::star::container::ElementExistException
, ::com::sun::star::container::NoSuchElementException
);
98 bool RemoveDialog( const ScriptDocument
& rDocument
, const OUString
& rLibName
, const OUString
& rDlgName
);
100 void MarkDocumentModified( const ScriptDocument
& rDocument
);
102 } // namespace basctl
104 #endif // BASCTL_BASOBJ_HXX
106 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */