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