Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : : #ifndef _MACROASS_HXX
29 : : #define _MACROASS_HXX
30 : :
31 : : #include "sal/config.h"
32 : :
33 : : #include <sfx2/basedlgs.hxx>
34 : : #include <sfx2/tabdlg.hxx>
35 : : #include <svl/macitem.hxx>
36 : : #include <vcl/lstbox.hxx>
37 : : #include <com/sun/star/frame/XFrame.hpp>
38 : :
39 : : class _SfxMacroTabPage;
40 : : class SvTabListBox;
41 : : class String;
42 : :
43 : : class _SfxMacroTabPage_Impl;
44 : :
45 : : class _SfxMacroTabPage : public SfxTabPage
46 : : {
47 : : SvxMacroTableDtor aTbl;
48 : : DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, SelectEvent_Impl, SvTabListBox * );
49 : : DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, SelectGroup_Impl, ListBox * );
50 : : DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, SelectMacro_Impl, ListBox * );
51 : :
52 : : DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, DoubleClickHdl_Impl, Control* );
53 : : DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton * );
54 : :
55 : : DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, TimeOut_Impl, Timer* );
56 : :
57 : : protected:
58 : : _SfxMacroTabPage_Impl* mpImpl;
59 : :
60 : : _SfxMacroTabPage( Window* pParent, const ResId& rId, const SfxItemSet& rItemSet );
61 : :
62 : : void InitAndSetHandler();
63 : : void FillEvents();
64 : : void FillMacroList();
65 : : void EnableButtons();
66 : :
67 : : public:
68 : :
69 : : virtual ~_SfxMacroTabPage();
70 : :
71 : : void AddEvent( const String & rEventName, sal_uInt16 nEventId );
72 : :
73 : : const SvxMacroTableDtor& GetMacroTbl() const;
74 : : void SetMacroTbl( const SvxMacroTableDtor& rTbl );
75 : : void ClearMacroTbl();
76 : :
77 : : virtual void ScriptChanged();
78 : : virtual void PageCreated (SfxAllItemSet aSet);
79 : :
80 : : // --------- inherit from the base -------------
81 : : virtual sal_Bool FillItemSet( SfxItemSet& rSet );
82 : : virtual void Reset( const SfxItemSet& rSet );
83 : :
84 : : sal_Bool IsReadOnly() const;
85 : : };
86 : :
87 : : inline const SvxMacroTableDtor& _SfxMacroTabPage::GetMacroTbl() const
88 : : {
89 : : return aTbl;
90 : : }
91 : :
92 : : inline void _SfxMacroTabPage::SetMacroTbl( const SvxMacroTableDtor& rTbl )
93 : : {
94 : : aTbl = rTbl;
95 : : }
96 : :
97 : : inline void _SfxMacroTabPage::ClearMacroTbl()
98 : : {
99 : : aTbl.clear();
100 : : }
101 : :
102 [ # # ]: 0 : class SfxMacroTabPage : public _SfxMacroTabPage
103 : : {
104 : : public:
105 : : SfxMacroTabPage(
106 : : Window* pParent,
107 : : const ResId& rId,
108 : : const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame,
109 : : const SfxItemSet& rSet
110 : : );
111 : :
112 : : // --------- inherit from the base -------------
113 : : static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
114 : : };
115 : :
116 : : class SfxMacroAssignDlg : public SfxSingleTabDialog
117 : : {
118 : : public:
119 : : SfxMacroAssignDlg(
120 : : Window* pParent,
121 : : const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame,
122 : : const SfxItemSet& rSet );
123 : : virtual ~SfxMacroAssignDlg();
124 : : };
125 : :
126 : : #endif
127 : :
128 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|