update dev300-m58
[ooovba.git] / sw / source / ui / inc / dbtree.hxx
blob2bc381762dc2efa45dc69c1e2ccf4b898439deff
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: dbtree.hxx,v $
10 * $Revision: 1.14 $
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 ************************************************************************/
30 #ifndef _DBTREE_HXX
31 #define _DBTREE_HXX
33 #include <svtools/svtreebx.hxx>
34 #include <com/sun/star/uno/Reference.h>
36 namespace com{namespace sun{namespace star{namespace container{
37 class XNameAccess;
38 }}}}
39 #include "swdllapi.h"
40 #include <swtypes.hxx>
41 #include <swunodef.hxx>
43 class SwDBTreeList_Impl;
44 class SwWrtShell;
46 class SW_DLLPUBLIC SwDBTreeList : public SvTreeListBox
48 ImageList aImageList;
49 ImageList aImageListHC;
50 Image aDBBMP;
51 Image aTableBMP;
52 Image aQueryBMP;
54 String sDefDBName;
55 BOOL bInitialized;
56 BOOL bShowColumns;
58 SwDBTreeList_Impl* pImpl;
60 SW_DLLPRIVATE DECL_LINK( DBCompare, SvSortData* );
62 SW_DLLPRIVATE void InitTreeList();
63 SW_DLLPRIVATE virtual void RequestingChilds( SvLBoxEntry* pParent );
65 SW_DLLPRIVATE virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
66 SW_DLLPRIVATE virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
68 using SvTreeListBox::Select;
70 public:
71 SwDBTreeList( Window* pParent, const ResId& rResId,
72 SwWrtShell* pSh,
73 const String& rDefDBName = aEmptyStr,
74 const BOOL bShowCol = FALSE );
75 virtual ~SwDBTreeList();
77 String GetDBName( String& rTableName, String& rColumnName, BOOL* pbIsTable = 0);
79 void Select( const String& rDBName, const String& rTableName,
80 const String& rColumnName );
82 void ShowColumns(BOOL bShowCol);
83 void SetWrtShell(SwWrtShell& rSh);
85 void AddDataSource(const String& rSource);
88 #endif