bump product version to 4.1.6.2
[LibreOffice.git] / sw / source / ui / inc / dbtree.hxx
blobdba79bc7d0fee2fbc27a42a3746bd8fe86c66162
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef _DBTREE_HXX
20 #define _DBTREE_HXX
22 #include <svtools/treelistbox.hxx>
23 #include <com/sun/star/uno/Reference.h>
25 #include "swdllapi.h"
26 #include <swtypes.hxx>
28 class SwDBTreeList_Impl;
29 class SwWrtShell;
31 class SW_DLLPUBLIC SwDBTreeList : public SvTreeListBox
33 ImageList aImageList;
34 Image aDBBMP;
35 Image aTableBMP;
36 Image aQueryBMP;
38 String sDefDBName;
39 bool bInitialized;
40 sal_Bool bShowColumns;
42 SwDBTreeList_Impl* pImpl;
44 SW_DLLPRIVATE DECL_LINK( DBCompare, SvSortData* );
46 SW_DLLPRIVATE void InitTreeList();
47 SW_DLLPRIVATE virtual void RequestingChildren( SvTreeListEntry* pParent );
49 SW_DLLPRIVATE virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
50 SW_DLLPRIVATE virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
52 using SvTreeListBox::Select;
54 public:
55 SwDBTreeList( Window* pParent, const ResId& rResId,
56 SwWrtShell* pSh,
57 const String& rDefDBName = aEmptyStr,
58 const sal_Bool bShowCol = sal_False );
59 SwDBTreeList(Window* pParent);
60 virtual ~SwDBTreeList();
61 virtual Size GetOptimalSize() const;
63 String GetDBName( String& rTableName, String& rColumnName, sal_Bool* pbIsTable = 0);
65 void Select( const String& rDBName, const String& rTableName,
66 const String& rColumnName );
68 void ShowColumns(sal_Bool bShowCol);
69 void SetWrtShell(SwWrtShell& rSh);
71 void AddDataSource(const String& rSource);
74 #endif
76 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */