bump product version to 5.0.4.1
[LibreOffice.git] / cui / source / inc / macroass.hxx
blob9cb85a13414a797b020367042e90fce9cfc0f323
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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;
31 class SvTabListBox;
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 );
47 protected:
48 _SfxMacroTabPage_Impl* mpImpl;
50 _SfxMacroTabPage( vcl::Window* pParent, const SfxItemSet& rItemSet );
52 void InitAndSetHandler();
53 void FillEvents();
54 void FillMacroList();
55 void EnableButtons();
57 public:
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 );
67 void ScriptChanged();
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
82 return aTbl;
85 inline void _SfxMacroTabPage::SetMacroTable( const SvxMacroTableDtor& rTbl )
87 aTbl = rTbl;
90 class SfxMacroTabPage : public _SfxMacroTabPage
92 public:
93 SfxMacroTabPage(
94 vcl::Window* pParent,
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
105 public:
106 SfxMacroAssignDlg(
107 vcl::Window* pParent,
108 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxDocumentFrame,
109 const SfxItemSet& rSet );
112 #endif
114 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */