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 .
20 #ifndef INCLUDED_CUI_SOURCE_INC_CUIHYPERDLG_HXX
21 #define INCLUDED_CUI_SOURCE_INC_CUIHYPERDLG_HXX
23 #include <sal/config.h>
27 #include <svx/hlnkitem.hxx>
28 #include <sfx2/childwin.hxx>
29 #include <sfx2/ctrlitem.hxx>
30 #include <sfx2/bindings.hxx>
31 #include <vcl/image.hxx>
33 #include "iconcdlg.hxx"
36 enum class HyperLinkPageType
45 /*************************************************************************
49 \************************************************************************/
52 class SvxHlinkCtrl
: public SfxControllerItem
55 VclPtr
<SvxHpLinkDlg
> pParent
;
57 SfxStatusForwarder aRdOnlyForwarder
;
60 SvxHlinkCtrl( sal_uInt16 nId
, SfxBindings
& rBindings
, SvxHpLinkDlg
* pDlg
);
61 virtual void dispose() override
;
63 virtual void StateChanged( sal_uInt16 nSID
, SfxItemState eState
,
64 const SfxPoolItem
* pState
) override
;
68 /*************************************************************************
72 \************************************************************************/
74 class SvxHpLinkDlg
: public IconChoiceDialog
77 SvxHlinkCtrl maCtrl
; ///< Controller
78 SfxBindings
* mpBindings
;
79 std::unique_ptr
<SfxItemSet
> mpItemSet
;
84 DECL_LINK (ClickOkHdl_Impl
, Button
*, void );
85 DECL_LINK (ClickApplyHdl_Impl
, Button
*, void );
86 DECL_LINK (ClickCloseHdl_Impl
, Button
*, void );
89 virtual bool Close() override
;
90 virtual void Move() override
;
94 SvxHpLinkDlg (vcl::Window
* pParent
, SfxBindings
* pBindings
);
95 virtual ~SvxHpLinkDlg () override
;
96 virtual void dispose() override
;
98 virtual void PageCreated( HyperLinkPageType nId
, IconChoicePage
& rPage
) override
;
100 void SetPage( SvxHyperlinkItem
const * pItem
);
101 void SetReadOnlyMode( bool bReadOnly
);
102 bool IsHTMLDoc() const { return mbIsHTMLDoc
; }
104 SfxDispatcher
* GetDispatcher() const { return mpBindings
->GetDispatcher(); }
108 #endif // INCLUDED_CUI_SOURCE_INC_CUIHYPERDLG_HXX
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */