1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
22 #include <svtools/treelistbox.hxx>
23 #include <com/sun/star/uno/Reference.h>
26 #include <swtypes.hxx>
28 class SwDBTreeList_Impl
;
31 class SW_DLLPUBLIC SwDBTreeList
: public SvTreeListBox
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
;
55 SwDBTreeList( Window
* pParent
, const ResId
& rResId
,
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
);
76 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */