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 _SVX_DOCLINKDIALOG_HXX_
30 : : #define _SVX_DOCLINKDIALOG_HXX_
31 : :
32 : : #include <vcl/dialog.hxx>
33 : : #include <vcl/fixed.hxx>
34 : : #include <vcl/edit.hxx>
35 : : #include <vcl/button.hxx>
36 : : #include <svtools/inettbc.hxx>
37 : : #include <svtools/urlcontrol.hxx>
38 : :
39 : : //......................................................................
40 : : namespace svx
41 : : {
42 : : //......................................................................
43 : :
44 : : //==================================================================
45 : : //= ODocumentLinkDialog
46 : : //==================================================================
47 : : /** dialog for editing document links associated with data sources
48 : : */
49 [ # # ][ # # ]: 0 : class ODocumentLinkDialog : public ModalDialog
[ # # ][ # # ]
[ # # ][ # # ]
[ # # ][ # # ]
[ # # ][ # # ]
50 : : {
51 : : protected:
52 : : FixedText m_aURLLabel;
53 : : ::svt::OFileURLControl m_aURL;
54 : : PushButton m_aBrowseFile;
55 : : FixedText m_aNameLabel;
56 : : Edit m_aName;
57 : :
58 : : FixedLine m_aBottomLine;
59 : : OKButton m_aOK;
60 : : CancelButton m_aCancel;
61 : : HelpButton m_aHelp;
62 : :
63 : : sal_Bool m_bCreatingNew;
64 : :
65 : : Link m_aNameValidator;
66 : :
67 : : public:
68 : : ODocumentLinkDialog( Window* _pParent, sal_Bool _bCreateNew );
69 : :
70 : : // name validation has to be done by an external instance
71 : : // the validator link gets a pointer to a String, and should return 0 if the string is not
72 : : // acceptable
73 : 0 : void setNameValidator( const Link& _rValidator ) { m_aNameValidator = _rValidator; }
74 : : Link getNameValidator( ) const { return m_aNameValidator; }
75 : :
76 : : void set( const String& _rName, const String& _rURL );
77 : : void get( String& _rName, String& _rURL ) const;
78 : :
79 : : protected:
80 : : DECL_LINK(OnTextModified, void *);
81 : : DECL_LINK( OnBrowseFile, void* );
82 : : DECL_LINK( OnOk, void* );
83 : :
84 : : void validate( );
85 : : };
86 : :
87 : : //......................................................................
88 : : } // namespace svx
89 : : //......................................................................
90 : :
91 : : #endif // _SVX_DOCLINKDIALOG_HXX_
92 : :
93 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|