2010-10-27 12:45:03 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-10-04 11:25:41 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2013-10-28 03:46:16 +01:00
|
|
|
#ifndef INCLUDED_CUI_SOURCE_INC_MACROASS_HXX
|
|
|
|
#define INCLUDED_CUI_SOURCE_INC_MACROASS_HXX
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
#include "sal/config.h"
|
|
|
|
|
|
|
|
#include <sfx2/basedlgs.hxx>
|
|
|
|
#include <sfx2/tabdlg.hxx>
|
|
|
|
#include <svl/macitem.hxx>
|
|
|
|
#include <vcl/lstbox.hxx>
|
|
|
|
#include <com/sun/star/frame/XFrame.hpp>
|
|
|
|
|
2016-04-22 10:13:56 +02:00
|
|
|
class SfxMacroTabPage_;
|
2009-10-31 00:36:06 +01:00
|
|
|
class SvTabListBox;
|
2015-09-07 09:35:04 +02:00
|
|
|
class SvTreeListBox;
|
2016-04-22 10:13:56 +02:00
|
|
|
class SfxMacroTabPage_Impl;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2016-06-10 09:37:39 +02:00
|
|
|
class SfxMacroTabPage : public SfxTabPage
|
2009-10-31 00:36:06 +01:00
|
|
|
{
|
|
|
|
SvxMacroTableDtor aTbl;
|
2015-09-07 09:35:04 +02:00
|
|
|
DECL_DLLPRIVATE_LINK_TYPED( SelectEvent_Impl, SvTreeListBox*, void );
|
|
|
|
DECL_DLLPRIVATE_LINK_TYPED( SelectGroup_Impl, SvTreeListBox*, void );
|
|
|
|
DECL_DLLPRIVATE_LINK_TYPED( SelectMacro_Impl, SvTreeListBox*, void );
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-09-10 14:39:17 +02:00
|
|
|
DECL_DLLPRIVATE_LINK_TYPED( AssignDeleteHdl_Impl, SvTreeListBox*, bool );
|
2015-08-19 09:11:34 +02:00
|
|
|
DECL_DLLPRIVATE_LINK_TYPED( AssignDeleteClickHdl_Impl, Button *, void );
|
2015-09-10 14:39:17 +02:00
|
|
|
bool AssignDeleteHdl(Control *);
|
2015-05-09 21:28:38 +02:00
|
|
|
DECL_DLLPRIVATE_LINK_TYPED( TimeOut_Impl, Idle*, void );
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
protected:
|
2016-06-10 09:37:39 +02:00
|
|
|
SfxMacroTabPage_Impl* mpImpl;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
void InitAndSetHandler();
|
|
|
|
void FillEvents();
|
|
|
|
void FillMacroList();
|
2010-11-01 15:24:47 +01:00
|
|
|
void EnableButtons();
|
2009-10-31 00:36:06 +01:00
|
|
|
|
|
|
|
public:
|
2016-06-10 09:37:39 +02:00
|
|
|
SfxMacroTabPage(
|
|
|
|
vcl::Window* pParent,
|
|
|
|
const css::uno::Reference< css::frame::XFrame >& rxDocumentFrame,
|
|
|
|
const SfxItemSet& rSet
|
|
|
|
);
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2016-06-10 09:37:39 +02:00
|
|
|
virtual ~SfxMacroTabPage();
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void dispose() override;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2013-09-26 08:30:52 +02:00
|
|
|
void AddEvent( const OUString & rEventName, sal_uInt16 nEventId );
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-01-21 12:15:26 +02:00
|
|
|
void ScriptChanged();
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void PageCreated (const SfxAllItemSet& aSet) override;
|
2012-12-04 22:43:46 +01:00
|
|
|
using TabPage::ActivatePage; // FIXME WTF is this nonsense?
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void ActivatePage( const SfxItemSet& ) override;
|
2013-05-03 17:17:10 +01:00
|
|
|
void LaunchFillGroup();
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2012-04-15 17:50:21 +02:00
|
|
|
// --------- inherit from the base -------------
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual bool FillItemSet( SfxItemSet* rSet ) override;
|
|
|
|
virtual void Reset( const SfxItemSet* rSet ) override;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
bool IsReadOnly() const override;
|
2009-10-31 00:36:06 +01:00
|
|
|
|
2012-04-15 17:50:21 +02:00
|
|
|
// --------- inherit from the base -------------
|
2015-04-17 13:51:33 +01:00
|
|
|
static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rAttrSet );
|
2009-10-31 00:36:06 +01:00
|
|
|
};
|
|
|
|
|
2014-01-23 11:41:20 +00:00
|
|
|
class SfxMacroAssignDlg : public SfxSingleTabDialog
|
2009-10-31 00:36:06 +01:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
SfxMacroAssignDlg(
|
2014-09-23 11:20:40 +02:00
|
|
|
vcl::Window* pParent,
|
2015-07-28 14:18:40 +02:00
|
|
|
const css::uno::Reference< css::frame::XFrame >& rxDocumentFrame,
|
2009-10-31 00:36:06 +01:00
|
|
|
const SfxItemSet& rSet );
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
2010-10-27 12:45:03 +01:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|