Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 : #ifndef INCLUDED_CUI_SOURCE_INC_LINKDLG_HXX
21 : #define INCLUDED_CUI_SOURCE_INC_LINKDLG_HXX
22 :
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 :
29 : #include <svtools/svmedit.hxx>
30 : #include <svtools/svtabbx.hxx>
31 :
32 : /********************** SvUpdateLinksDialog ******************************
33 : *************************************************************************/
34 : namespace sfx2
35 : {
36 : class LinkManager;
37 : class SvBaseLink;
38 : }
39 :
40 : class SvBaseLinksDlg : public ModalDialog
41 : {
42 : using Window::SetType;
43 :
44 : SvTabListBox *m_pTbLinks;
45 : FixedText *m_pFtFullFileName;
46 : FixedText *m_pFtFullSourceName;
47 : FixedText *m_pFtFullTypeName;
48 : RadioButton *m_pRbAutomatic;
49 : RadioButton *m_pRbManual;
50 : PushButton *m_pPbUpdateNow;
51 : PushButton *m_pPbOpenSource;
52 : PushButton *m_pPbChangeSource;
53 : PushButton *m_pPbBreakLink;
54 : OUString aStrAutolink;
55 : OUString aStrManuallink;
56 : OUString aStrBrokenlink;
57 : OUString aStrGraphiclink;
58 : OUString aStrButtonclose;
59 : OUString aStrCloselinkmsg;
60 : OUString aStrCloselinkmsgMulti;
61 : OUString aStrWaitinglink;
62 : sfx2::LinkManager* pLinkMgr;
63 : bool bHtmlMode;
64 : Timer aUpdateTimer;
65 :
66 : DECL_LINK( LinksSelectHdl, SvTabListBox * );
67 : DECL_LINK( LinksDoubleClickHdl, SvTabListBox * );
68 : DECL_LINK( AutomaticClickHdl, RadioButton * );
69 : DECL_LINK( ManualClickHdl, RadioButton * );
70 : DECL_LINK(UpdateNowClickHdl, void *);
71 : DECL_LINK( OpenSourceClickHdl, PushButton * );
72 : DECL_LINK( ChangeSourceClickHdl, PushButton * );
73 : DECL_LINK( BreakLinkClickHdl, PushButton * );
74 : DECL_LINK( UpdateWaitingHdl, Timer * );
75 : DECL_LINK( EndEditHdl, sfx2::SvBaseLink* );
76 : sfx2::SvBaseLink* GetSelEntry( sal_uLong* pPos );
77 : OUString ImplGetStateStr( const sfx2::SvBaseLink& );
78 : void SetType( sfx2::SvBaseLink& rLink, sal_uLong nPos, sal_uInt16 nType );
79 : void InsertEntry( const sfx2::SvBaseLink& rLink, sal_uLong nPos = TREELIST_APPEND, bool bSelect = false);
80 :
81 0 : void StartUpdateTimer() { aUpdateTimer.Start(); }
82 :
83 0 : OUString& Autolink() { return aStrAutolink; }
84 0 : OUString& Manuallink() { return aStrManuallink; }
85 0 : OUString& Brokenlink() { return aStrBrokenlink; }
86 : OUString& Graphiclink() { return aStrGraphiclink; }
87 : OUString& Buttonclose() { return aStrButtonclose; }
88 0 : OUString& Closelinkmsg() { return aStrCloselinkmsg; }
89 0 : OUString& CloselinkmsgMulti() { return aStrCloselinkmsgMulti; }
90 0 : OUString& Waitinglink() { return aStrWaitinglink; }
91 : void SetManager( sfx2::LinkManager* );
92 :
93 : public:
94 : SvBaseLinksDlg( vcl::Window * pParent, sfx2::LinkManager*, bool bHtml = false );
95 : virtual ~SvBaseLinksDlg();
96 : void SetActLink( sfx2::SvBaseLink * pLink );
97 : };
98 :
99 : #endif // INCLUDED_CUI_SOURCE_INC_LINKDLG_HXX
100 :
101 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|