Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #ifndef _LINKDLG_HXX
30 : : #define _LINKDLG_HXX
31 : :
32 : : #include <vcl/dialog.hxx>
33 : : #include <vcl/fixed.hxx>
34 : : #include <vcl/button.hxx>
35 : : #include <vcl/edit.hxx>
36 : : #include <vcl/lstbox.hxx>
37 : :
38 : : #include <svtools/svmedit.hxx> // MultiLineEdit
39 : : #include <svtools/svtabbx.hxx> // MultiLineEdit
40 : :
41 : : /********************** SvUpdateLinksDialog ******************************
42 : : *************************************************************************/
43 : : namespace sfx2
44 : : {
45 : : class LinkManager;
46 : : class SvBaseLink;
47 : : }
48 : :
49 : : class SvBaseLinksDlg : public ModalDialog
50 : : {
51 : : using Window::SetType;
52 : :
53 : : FixedText aFtFiles;
54 : : FixedText aFtLinks;
55 : : FixedText aFtType;
56 : : FixedText aFtStatus;
57 : : SvTabListBox aTbLinks;
58 : : FixedText aFtFiles2;
59 : : FixedText aFtFullFileName;
60 : : FixedText aFtSource2;
61 : : FixedText aFtFullSourceName;
62 : : FixedText aFtType2;
63 : : FixedText aFtFullTypeName;
64 : : FixedText aFtUpdate;
65 : : RadioButton aRbAutomatic;
66 : : RadioButton aRbManual;
67 : : CancelButton aCancelButton1;
68 : : HelpButton aHelpButton1;
69 : : PushButton aPbUpdateNow;
70 : : PushButton aPbOpenSource;
71 : : PushButton aPbChangeSource;
72 : : PushButton aPbBreakLink;
73 : : String aStrAutolink;
74 : : String aStrManuallink;
75 : : String aStrBrokenlink;
76 : : String aStrGraphiclink;
77 : : String aStrButtonclose;
78 : : String aStrCloselinkmsg;
79 : : String aStrCloselinkmsgMulti;
80 : : String aStrWaitinglink;
81 : : sfx2::LinkManager* pLinkMgr;
82 : : sal_Bool bHtmlMode;
83 : : Timer aUpdateTimer;
84 : :
85 : : #if _SOLAR__PRIVATE
86 : : DECL_LINK( LinksSelectHdl, SvTabListBox * );
87 : : DECL_LINK( LinksDoubleClickHdl, SvTabListBox * );
88 : : DECL_LINK( AutomaticClickHdl, RadioButton * );
89 : : DECL_LINK( ManualClickHdl, RadioButton * );
90 : : DECL_LINK(UpdateNowClickHdl, void *);
91 : : DECL_LINK( OpenSourceClickHdl, PushButton * );
92 : : DECL_LINK( ChangeSourceClickHdl, PushButton * );
93 : : DECL_LINK( BreakLinkClickHdl, PushButton * );
94 : : DECL_LINK( UpdateWaitingHdl, Timer * );
95 : : DECL_LINK( EndEditHdl, sfx2::SvBaseLink* );
96 : : sfx2::SvBaseLink* GetSelEntry( sal_uInt16* pPos );
97 : : String ImplGetStateStr( const sfx2::SvBaseLink& );
98 : : void SetType( sfx2::SvBaseLink& rLink, sal_uInt16 nPos, sal_uInt16 nType );
99 : : void InsertEntry( const sfx2::SvBaseLink& rLink, sal_uInt16 nPos = LISTBOX_APPEND, sal_Bool bSelect = sal_False);
100 : : #endif
101 : :
102 : 0 : void StartUpdateTimer() { aUpdateTimer.Start(); }
103 : :
104 : 0 : SvTabListBox& Links() { return aTbLinks; }
105 : 0 : FixedText& FileName() { return aFtFullFileName; }
106 : 0 : FixedText& SourceName() { return aFtFullSourceName; }
107 : 0 : FixedText& TypeName() { return aFtFullTypeName; }
108 : 0 : RadioButton& Automatic() { return aRbAutomatic; }
109 : 0 : RadioButton& Manual() { return aRbManual; }
110 : 0 : PushButton& UpdateNow() { return aPbUpdateNow; }
111 : 0 : PushButton& OpenSource() { return aPbOpenSource; }
112 : 0 : PushButton& ChangeSource() { return aPbChangeSource; }
113 : 0 : PushButton& BreakLink() { return aPbBreakLink; }
114 : :
115 : 0 : String& Autolink() { return aStrAutolink; }
116 : 0 : String& Manuallink() { return aStrManuallink; }
117 : 0 : String& Brokenlink() { return aStrBrokenlink; }
118 : : String& Graphiclink() { return aStrGraphiclink; }
119 : : String& Buttonclose() { return aStrButtonclose; }
120 : 0 : String& Closelinkmsg() { return aStrCloselinkmsg; }
121 : 0 : String& CloselinkmsgMulti() { return aStrCloselinkmsgMulti; }
122 : 0 : String& Waitinglink() { return aStrWaitinglink; }
123 : : void SetManager( sfx2::LinkManager* );
124 : :
125 : : public:
126 : : SvBaseLinksDlg( Window * pParent, sfx2::LinkManager*, sal_Bool bHtml = sal_False );
127 : : ~SvBaseLinksDlg();
128 : : void SetActLink( sfx2::SvBaseLink * pLink );
129 : : };
130 : :
131 : : #endif // _LINKDLG_HXX
132 : :
133 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|