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_LINKDLG_HXX
21 #define INCLUDED_CUI_SOURCE_INC_LINKDLG_HXX
23 #include <vcl/dialog.hxx>
24 #include <vcl/fixed.hxx>
25 #include <vcl/button.hxx>
26 #include <vcl/edit.hxx>
27 #include <vcl/lstbox.hxx>
28 #include <vcl/idle.hxx>
30 #include <svtools/svmedit.hxx>
31 #include <svtools/svtabbx.hxx>
33 /********************** SvUpdateLinksDialog ******************************
34 *************************************************************************/
41 enum class SfxLinkUpdateMode
;
43 class SvBaseLinksDlg
: public ModalDialog
45 using Window::SetType
;
47 VclPtr
<SvTabListBox
> m_pTbLinks
;
48 VclPtr
<FixedText
> m_pFtFullFileName
;
49 VclPtr
<FixedText
> m_pFtFullSourceName
;
50 VclPtr
<FixedText
> m_pFtFullTypeName
;
51 VclPtr
<RadioButton
> m_pRbAutomatic
;
52 VclPtr
<RadioButton
> m_pRbManual
;
53 VclPtr
<PushButton
> m_pPbUpdateNow
;
54 VclPtr
<PushButton
> m_pPbOpenSource
;
55 VclPtr
<PushButton
> m_pPbChangeSource
;
56 VclPtr
<PushButton
> m_pPbBreakLink
;
57 OUString aStrAutolink
;
58 OUString aStrManuallink
;
59 OUString aStrBrokenlink
;
60 OUString aStrGraphiclink
;
61 OUString aStrButtonclose
;
62 OUString aStrCloselinkmsg
;
63 OUString aStrCloselinkmsgMulti
;
64 OUString aStrWaitinglink
;
65 sfx2::LinkManager
* pLinkMgr
;
69 DECL_LINK( LinksSelectHdl
, SvTabListBox
* );
70 DECL_LINK( LinksDoubleClickHdl
, SvTabListBox
* );
71 DECL_LINK( AutomaticClickHdl
, RadioButton
* );
72 DECL_LINK( ManualClickHdl
, RadioButton
* );
73 DECL_LINK(UpdateNowClickHdl
, void *);
74 DECL_LINK( OpenSourceClickHdl
, PushButton
* );
75 DECL_LINK( ChangeSourceClickHdl
, PushButton
* );
76 DECL_LINK( BreakLinkClickHdl
, PushButton
* );
77 DECL_LINK_TYPED( UpdateWaitingHdl
, Idle
*, void );
78 DECL_LINK( EndEditHdl
, sfx2::SvBaseLink
* );
79 sfx2::SvBaseLink
* GetSelEntry( sal_uLong
* pPos
);
80 OUString
ImplGetStateStr( const sfx2::SvBaseLink
& );
81 void SetType( sfx2::SvBaseLink
& rLink
, sal_uLong nPos
, SfxLinkUpdateMode nType
);
82 void InsertEntry( const sfx2::SvBaseLink
& rLink
, sal_uLong nPos
= TREELIST_APPEND
, bool bSelect
= false);
84 void StartUpdateTimer() { aUpdateIdle
.Start(); }
86 OUString
& Autolink() { return aStrAutolink
; }
87 OUString
& Manuallink() { return aStrManuallink
; }
88 OUString
& Brokenlink() { return aStrBrokenlink
; }
89 OUString
& Graphiclink() { return aStrGraphiclink
; }
90 OUString
& Buttonclose() { return aStrButtonclose
; }
91 OUString
& Closelinkmsg() { return aStrCloselinkmsg
; }
92 OUString
& CloselinkmsgMulti() { return aStrCloselinkmsgMulti
; }
93 OUString
& Waitinglink() { return aStrWaitinglink
; }
94 void SetManager( sfx2::LinkManager
* );
97 SvBaseLinksDlg( vcl::Window
* pParent
, sfx2::LinkManager
*, bool bHtml
= false );
98 virtual ~SvBaseLinksDlg();
99 virtual void dispose() SAL_OVERRIDE
;
100 void SetActLink( sfx2::SvBaseLink
* pLink
);
103 #endif // INCLUDED_CUI_SOURCE_INC_LINKDLG_HXX
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */