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 : FixedText aFtFiles;
45 : FixedText aFtLinks;
46 : FixedText aFtType;
47 : FixedText aFtStatus;
48 : SvTabListBox aTbLinks;
49 : FixedText aFtFiles2;
50 : FixedText aFtFullFileName;
51 : FixedText aFtSource2;
52 : FixedText aFtFullSourceName;
53 : FixedText aFtType2;
54 : FixedText aFtFullTypeName;
55 : FixedText aFtUpdate;
56 : RadioButton aRbAutomatic;
57 : RadioButton aRbManual;
58 : CancelButton aCancelButton1;
59 : HelpButton aHelpButton1;
60 : PushButton aPbUpdateNow;
61 : PushButton aPbOpenSource;
62 : PushButton aPbChangeSource;
63 : PushButton aPbBreakLink;
64 : OUString aStrAutolink;
65 : OUString aStrManuallink;
66 : OUString aStrBrokenlink;
67 : OUString aStrGraphiclink;
68 : OUString aStrButtonclose;
69 : OUString aStrCloselinkmsg;
70 : OUString aStrCloselinkmsgMulti;
71 : OUString aStrWaitinglink;
72 : sfx2::LinkManager* pLinkMgr;
73 : sal_Bool bHtmlMode;
74 : Timer aUpdateTimer;
75 :
76 : DECL_LINK( LinksSelectHdl, SvTabListBox * );
77 : DECL_LINK( LinksDoubleClickHdl, SvTabListBox * );
78 : DECL_LINK( AutomaticClickHdl, RadioButton * );
79 : DECL_LINK( ManualClickHdl, RadioButton * );
80 : DECL_LINK(UpdateNowClickHdl, void *);
81 : DECL_LINK( OpenSourceClickHdl, PushButton * );
82 : DECL_LINK( ChangeSourceClickHdl, PushButton * );
83 : DECL_LINK( BreakLinkClickHdl, PushButton * );
84 : DECL_LINK( UpdateWaitingHdl, Timer * );
85 : DECL_LINK( EndEditHdl, sfx2::SvBaseLink* );
86 : sfx2::SvBaseLink* GetSelEntry( sal_uLong* pPos );
87 : OUString ImplGetStateStr( const sfx2::SvBaseLink& );
88 : void SetType( sfx2::SvBaseLink& rLink, sal_uLong nPos, sal_uInt16 nType );
89 : void InsertEntry( const sfx2::SvBaseLink& rLink, sal_uLong nPos = TREELIST_APPEND, sal_Bool bSelect = sal_False);
90 :
91 0 : void StartUpdateTimer() { aUpdateTimer.Start(); }
92 :
93 0 : SvTabListBox& Links() { return aTbLinks; }
94 0 : FixedText& FileName() { return aFtFullFileName; }
95 0 : FixedText& SourceName() { return aFtFullSourceName; }
96 0 : FixedText& TypeName() { return aFtFullTypeName; }
97 0 : RadioButton& Automatic() { return aRbAutomatic; }
98 0 : RadioButton& Manual() { return aRbManual; }
99 0 : PushButton& UpdateNow() { return aPbUpdateNow; }
100 0 : PushButton& OpenSource() { return aPbOpenSource; }
101 0 : PushButton& ChangeSource() { return aPbChangeSource; }
102 0 : PushButton& BreakLink() { return aPbBreakLink; }
103 :
104 0 : OUString& Autolink() { return aStrAutolink; }
105 0 : OUString& Manuallink() { return aStrManuallink; }
106 0 : OUString& Brokenlink() { return aStrBrokenlink; }
107 : OUString& Graphiclink() { return aStrGraphiclink; }
108 : OUString& Buttonclose() { return aStrButtonclose; }
109 0 : OUString& Closelinkmsg() { return aStrCloselinkmsg; }
110 0 : OUString& CloselinkmsgMulti() { return aStrCloselinkmsgMulti; }
111 0 : OUString& Waitinglink() { return aStrWaitinglink; }
112 : void SetManager( sfx2::LinkManager* );
113 :
114 : public:
115 : SvBaseLinksDlg( Window * pParent, sfx2::LinkManager*, sal_Bool bHtml = sal_False );
116 : virtual ~SvBaseLinksDlg();
117 : void SetActLink( sfx2::SvBaseLink * pLink );
118 : };
119 :
120 : #endif // INCLUDED_CUI_SOURCE_INC_LINKDLG_HXX
121 :
122 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|