1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef _SVX_DOCLINKDIALOG_HXX_
29 #define _SVX_DOCLINKDIALOG_HXX_
31 #include <vcl/dialog.hxx>
32 #include <vcl/fixed.hxx>
33 #include <vcl/edit.hxx>
34 #ifndef _SV_BUTTON_HXX
35 #include <vcl/button.hxx>
37 #include <svtools/inettbc.hxx>
38 #include <svtools/urlcontrol.hxx>
40 //......................................................................
43 //......................................................................
45 //==================================================================
46 //= ODocumentLinkDialog
47 //==================================================================
48 /** dialog for editing document links associated with data sources
50 class ODocumentLinkDialog
: public ModalDialog
53 FixedText m_aURLLabel
;
54 ::svt::OFileURLControl m_aURL
;
55 PushButton m_aBrowseFile
;
56 FixedText m_aNameLabel
;
59 FixedLine m_aBottomLine
;
61 CancelButton m_aCancel
;
64 sal_Bool m_bCreatingNew
;
66 Link m_aNameValidator
;
69 ODocumentLinkDialog( Window
* _pParent
, sal_Bool _bCreateNew
);
71 // name validation has to be done by an external instance
72 // the validator link gets a pointer to a String, and should return 0 if the string is not
74 void setNameValidator( const Link
& _rValidator
) { m_aNameValidator
= _rValidator
; }
75 Link
getNameValidator( ) const { return m_aNameValidator
; }
77 void set( const String
& _rName
, const String
& _rURL
);
78 void get( String
& _rName
, String
& _rURL
) const;
81 DECL_LINK( OnTextModified
, Control
* );
82 DECL_LINK( OnBrowseFile
, void* );
83 DECL_LINK( OnOk
, void* );
88 //......................................................................
90 //......................................................................
92 #endif // _SVX_DOCLINKDIALOG_HXX_