update dev300-m58
[ooovba.git] / svx / source / inc / hlmarkwn.hxx
blob1f861c67813782ea31dc283ffda05171c850f637
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: hlmarkwn.hxx,v $
10 * $Revision: 1.7.216.1 $
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 _SVX_BKWND_HYPERLINK_HXX
32 #define _SVX_BKWND_HYPERLINK_HXX
34 #include <com/sun/star/container/XNameAccess.hpp>
35 #include <vcl/dialog.hxx>
36 #ifndef _SV_BUTTON_HXX
37 #include <vcl/button.hxx>
38 #endif
39 #include <svtools/svtreebx.hxx>
41 #include "hlmarkwn_def.hxx" //ADD CHINA001
42 class SvxHyperlinkTabPageBase;
44 //########################################################################
45 //# #
46 //# Tree-Window #
47 //# #
48 //########################################################################
50 class SvxHlinkDlgMarkWnd;
52 class SvxHlmarkTreeLBox : public SvTreeListBox
54 private:
55 SvxHlinkDlgMarkWnd* mpParentWnd;
57 public:
58 SvxHlmarkTreeLBox( Window* pParent, const ResId& rResId );
60 virtual void Paint( const Rectangle& rRect );
63 //########################################################################
64 //# #
65 //# Window-Class #
66 //# #
67 //########################################################################
69 class SvxHlinkDlgMarkWnd : public ModalDialog //FloatingWindow
71 private:
72 friend class SvxHlmarkTreeLBox;
74 PushButton maBtApply;
75 PushButton maBtClose;
76 //SvTreeListBox maLbTree;
77 SvxHlmarkTreeLBox maLbTree;
79 BOOL mbUserMoved;
80 BOOL mbFirst;
82 SvxHyperlinkTabPageBase* mpParent;
84 String maStrLastURL;
86 USHORT mnError;
88 protected:
89 BOOL RefreshFromDoc( ::rtl::OUString aURL );
91 SvLBoxEntry* FindEntry ( String aStrName );
92 void ClearTree();
93 int FillTree( ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xLinks, SvLBoxEntry* pParentEntry =NULL );
95 virtual void Move ();
97 DECL_LINK (ClickApplyHdl_Impl, void * );
98 DECL_LINK (ClickCloseHdl_Impl, void * );
100 public:
101 SvxHlinkDlgMarkWnd (SvxHyperlinkTabPageBase *pParent);
102 ~SvxHlinkDlgMarkWnd();
104 BOOL MoveTo ( Point aNewPos );
105 void RefreshTree ( String aStrURL );
106 void SelectEntry ( String aStrMark );
108 BOOL ConnectToDialog( BOOL bDoit = TRUE );
110 USHORT SetError( USHORT nError);
114 #endif // _SVX_BKWND_HYPERLINK_HXX