cid#1607171 Data race condition
[LibreOffice.git] / sd / source / ui / inc / tpaction.hxx
blobf4577654880171f9baf10a8ef7560476428388ed
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 .
20 #pragma once
22 #include <com/sun/star/presentation/ClickAction.hpp>
23 #include <sfx2/tabdlg.hxx>
24 #include <sfx2/basedlgs.hxx>
25 #include <svx/xtable.hxx>
26 #include <unotools/resmgr.hxx>
27 #include "sdtreelb.hxx"
29 #include <vector>
31 namespace sd {
32 class View;
34 class SdDrawDocument;
36 /**
37 * Effect-SingleTab-Dialog
39 class SdActionDlg final : public SfxSingleTabDialogController
41 std::unique_ptr<weld::Container> m_xContent;
42 public:
43 SdActionDlg(weld::Window* pParent, const SfxItemSet& rAttr, ::sd::View const * pView);
46 /**
47 * Interaction-Tab-Page
49 class SdTPAction final : public SfxTabPage
51 private:
52 const ::sd::View* mpView;
53 SdDrawDocument* mpDoc;
55 bool bTreeUpdated;
56 std::vector<css::presentation::ClickAction> maCurrentActions;
57 OUString aLastFile;
58 ::std::vector< tools::Long > aVerbVector;
60 std::unique_ptr<weld::ComboBox> m_xLbAction;
61 std::unique_ptr<weld::Label> m_xFtTree; // jump destination controls
62 std::unique_ptr<SdPageObjsTLV> m_xLbTree;
63 std::unique_ptr<SdPageObjsTLV> m_xLbTreeDocument;
64 std::unique_ptr<weld::TreeView> m_xLbOLEAction;
65 std::unique_ptr<weld::Frame> m_xFrame;
66 std::unique_ptr<weld::Entry> m_xEdtSound;
67 std::unique_ptr<weld::Entry> m_xEdtBookmark;
68 std::unique_ptr<weld::Entry> m_xEdtDocument;
69 std::unique_ptr<weld::Entry> m_xEdtProgram;
70 std::unique_ptr<weld::Entry> m_xEdtMacro;
71 std::unique_ptr<weld::Button> m_xBtnSearch;
72 std::unique_ptr<weld::Button> m_xBtnSeek;
74 DECL_LINK( ClickSearchHdl, weld::Button&, void );
75 DECL_LINK( ClickActionHdl, weld::ComboBox&, void );
76 DECL_LINK( SelectTreeHdl, weld::TreeView&, void );
77 DECL_LINK( CheckFileHdl, weld::Widget&, void );
79 void UpdateTree();
80 void OpenFileDialog();
81 css::presentation::ClickAction GetActualClickAction();
82 void SetActualClickAction( css::presentation::ClickAction eCA );
83 void SetEditText( OUString const & rStr );
84 OUString GetEditText( bool bURL = false );
85 public:
86 SD_DLLPUBLIC static TranslateId GetClickActionSdResId(css::presentation::ClickAction eCA);
88 SdTPAction(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
89 virtual ~SdTPAction() override;
91 static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& );
93 virtual bool FillItemSet( SfxItemSet* ) override;
94 virtual void Reset( const SfxItemSet * ) override;
96 virtual void ActivatePage( const SfxItemSet& rSet ) override;
97 virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
99 void Construct();
101 void SetView( const ::sd::View* pSdView );
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */