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 INCLUDED_CUI_SOURCE_INC_MACROASS_HXX
20 #define INCLUDED_CUI_SOURCE_INC_MACROASS_HXX
22 #include "sal/config.h"
24 #include <sfx2/basedlgs.hxx>
25 #include <sfx2/tabdlg.hxx>
26 #include <svl/macitem.hxx>
27 #include <vcl/lstbox.hxx>
28 #include <com/sun/star/frame/XFrame.hpp>
30 class _SfxMacroTabPage
;
33 class _SfxMacroTabPage_Impl
;
35 class _SfxMacroTabPage
: public SfxTabPage
37 SvxMacroTableDtor aTbl
;
38 DECL_DLLPRIVATE_LINK( SelectEvent_Impl
, SvTabListBox
* );
39 DECL_DLLPRIVATE_LINK( SelectGroup_Impl
, ListBox
* );
40 DECL_DLLPRIVATE_LINK( SelectMacro_Impl
, ListBox
* );
42 DECL_DLLPRIVATE_LINK( DoubleClickHdl_Impl
, Control
* );
43 DECL_DLLPRIVATE_LINK( AssignDeleteHdl_Impl
, PushButton
* );
45 DECL_DLLPRIVATE_LINK_TYPED( TimeOut_Impl
, Idle
*, void );
48 _SfxMacroTabPage_Impl
* mpImpl
;
50 _SfxMacroTabPage( vcl::Window
* pParent
, const SfxItemSet
& rItemSet
);
52 void InitAndSetHandler();
59 virtual ~_SfxMacroTabPage();
60 virtual void dispose() SAL_OVERRIDE
;
62 void AddEvent( const OUString
& rEventName
, sal_uInt16 nEventId
);
64 const SvxMacroTableDtor
& GetMacroTable() const;
65 void SetMacroTable( const SvxMacroTableDtor
& rTbl
);
68 virtual void PageCreated (const SfxAllItemSet
& aSet
) SAL_OVERRIDE
;
69 using TabPage::ActivatePage
; // FIXME WTF is this nonsense?
70 virtual void ActivatePage( const SfxItemSet
& ) SAL_OVERRIDE
;
71 void LaunchFillGroup();
73 // --------- inherit from the base -------------
74 virtual bool FillItemSet( SfxItemSet
* rSet
) SAL_OVERRIDE
;
75 virtual void Reset( const SfxItemSet
* rSet
) SAL_OVERRIDE
;
77 bool IsReadOnly() const SAL_OVERRIDE
;
80 inline const SvxMacroTableDtor
& _SfxMacroTabPage::GetMacroTable() const
85 inline void _SfxMacroTabPage::SetMacroTable( const SvxMacroTableDtor
& rTbl
)
90 class SfxMacroTabPage
: public _SfxMacroTabPage
95 const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XFrame
>& rxDocumentFrame
,
96 const SfxItemSet
& rSet
99 // --------- inherit from the base -------------
100 static VclPtr
<SfxTabPage
> Create( vcl::Window
* pParent
, const SfxItemSet
* rAttrSet
);
103 class SfxMacroAssignDlg
: public SfxSingleTabDialog
107 vcl::Window
* pParent
,
108 const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XFrame
>& rxDocumentFrame
,
109 const SfxItemSet
& rSet
);
114 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */