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_BKWND_HYPERLINK_HXX
30 : : #define _SVX_BKWND_HYPERLINK_HXX
31 : :
32 : : #include <com/sun/star/container/XNameAccess.hpp>
33 : : #include <vcl/dialog.hxx>
34 : : #include <vcl/button.hxx>
35 : : #include <svtools/svtreebx.hxx>
36 : :
37 : : #include "hlmarkwn_def.hxx"
38 : : class SvxHyperlinkTabPageBase;
39 : :
40 : : //########################################################################
41 : : //# #
42 : : //# Tree-Window #
43 : : //# #
44 : : //########################################################################
45 : :
46 : : class SvxHlinkDlgMarkWnd;
47 : :
48 [ # # ]: 0 : class SvxHlmarkTreeLBox : public SvTreeListBox
49 : : {
50 : : private:
51 : : SvxHlinkDlgMarkWnd* mpParentWnd;
52 : :
53 : : public:
54 : : SvxHlmarkTreeLBox( Window* pParent, const ResId& rResId );
55 : :
56 : : virtual void Paint( const Rectangle& rRect );
57 : : };
58 : :
59 : : //########################################################################
60 : : //# #
61 : : //# Window-Class #
62 : : //# #
63 : : //########################################################################
64 : :
65 : : class SvxHlinkDlgMarkWnd : public ModalDialog //FloatingWindow
66 : : {
67 : : private:
68 : : friend class SvxHlmarkTreeLBox;
69 : :
70 : : PushButton maBtApply;
71 : : PushButton maBtClose;
72 : : SvxHlmarkTreeLBox maLbTree;
73 : :
74 : : sal_Bool mbUserMoved;
75 : : sal_Bool mbFirst;
76 : :
77 : : SvxHyperlinkTabPageBase* mpParent;
78 : :
79 : : String maStrLastURL;
80 : :
81 : : sal_uInt16 mnError;
82 : :
83 : : protected:
84 : : sal_Bool RefreshFromDoc( ::rtl::OUString aURL );
85 : :
86 : : SvLBoxEntry* FindEntry ( String aStrName );
87 : : void ClearTree();
88 : : int FillTree( ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xLinks, SvLBoxEntry* pParentEntry =NULL );
89 : :
90 : : virtual void Move ();
91 : :
92 : : DECL_LINK (ClickApplyHdl_Impl, void * );
93 : : DECL_LINK (ClickCloseHdl_Impl, void * );
94 : :
95 : : public:
96 : : SvxHlinkDlgMarkWnd (SvxHyperlinkTabPageBase *pParent);
97 : : ~SvxHlinkDlgMarkWnd();
98 : :
99 : : sal_Bool MoveTo ( Point aNewPos );
100 : : void RefreshTree ( String aStrURL );
101 : : void SelectEntry ( String aStrMark );
102 : :
103 : : sal_Bool ConnectToDialog( sal_Bool bDoit = sal_True );
104 : :
105 : : sal_uInt16 SetError( sal_uInt16 nError);
106 : : };
107 : :
108 : :
109 : : #endif // _SVX_BKWND_HYPERLINK_HXX
110 : :
111 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|