2000-09-18 16:15:01 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 18:55:11 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 18:55:11 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 18:55:11 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 18:55:11 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 18:55:11 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 18:55:11 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
#ifndef _DBTREE_HXX
|
|
|
|
#define _DBTREE_HXX
|
|
|
|
|
|
|
|
#include <svtools/svtreebx.hxx>
|
|
|
|
#include <com/sun/star/uno/Reference.h>
|
2004-08-23 07:58:14 +00:00
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
namespace com{namespace sun{namespace star{namespace container{
|
|
|
|
class XNameAccess;
|
|
|
|
}}}}
|
2004-08-23 07:58:14 +00:00
|
|
|
#include "swdllapi.h"
|
2001-05-07 13:50:58 +00:00
|
|
|
#include <swtypes.hxx>
|
|
|
|
#include <swunodef.hxx>
|
2004-08-23 07:58:14 +00:00
|
|
|
|
2001-07-17 11:34:55 +00:00
|
|
|
class SwDBTreeList_Impl;
|
2001-08-15 07:20:44 +00:00
|
|
|
class SwWrtShell;
|
2004-08-23 07:58:14 +00:00
|
|
|
|
|
|
|
class SW_DLLPUBLIC SwDBTreeList : public SvTreeListBox
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
2002-05-31 06:19:24 +00:00
|
|
|
ImageList aImageList;
|
|
|
|
ImageList aImageListHC;
|
2000-09-18 16:15:01 +00:00
|
|
|
Image aDBBMP;
|
|
|
|
Image aTableBMP;
|
|
|
|
Image aQueryBMP;
|
|
|
|
|
|
|
|
String sDefDBName;
|
|
|
|
BOOL bInitialized;
|
|
|
|
BOOL bShowColumns;
|
|
|
|
|
2001-07-17 11:34:55 +00:00
|
|
|
SwDBTreeList_Impl* pImpl;
|
|
|
|
|
2004-08-23 07:58:14 +00:00
|
|
|
SW_DLLPRIVATE DECL_LINK( DBCompare, SvSortData* );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2004-08-23 07:58:14 +00:00
|
|
|
SW_DLLPRIVATE void InitTreeList();
|
|
|
|
SW_DLLPRIVATE virtual void RequestingChilds( SvLBoxEntry* pParent );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2004-08-23 07:58:14 +00:00
|
|
|
SW_DLLPRIVATE virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
|
|
|
|
SW_DLLPRIVATE virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2007-10-22 14:17:40 +00:00
|
|
|
using SvTreeListBox::Select;
|
|
|
|
|
2000-09-18 16:15:01 +00:00
|
|
|
public:
|
2001-05-07 13:50:58 +00:00
|
|
|
SwDBTreeList( Window* pParent, const ResId& rResId,
|
2003-12-01 08:46:15 +00:00
|
|
|
SwWrtShell* pSh,
|
2001-08-15 07:20:44 +00:00
|
|
|
const String& rDefDBName = aEmptyStr,
|
2001-05-07 13:50:58 +00:00
|
|
|
const BOOL bShowCol = FALSE );
|
|
|
|
virtual ~SwDBTreeList();
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2001-05-07 13:50:58 +00:00
|
|
|
String GetDBName( String& rTableName, String& rColumnName, BOOL* pbIsTable = 0);
|
2007-09-27 10:57:11 +00:00
|
|
|
|
2001-05-07 13:50:58 +00:00
|
|
|
void Select( const String& rDBName, const String& rTableName,
|
|
|
|
const String& rColumnName );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
|
|
|
void ShowColumns(BOOL bShowCol);
|
2003-12-01 08:46:15 +00:00
|
|
|
void SetWrtShell(SwWrtShell& rSh);
|
2004-08-02 13:23:03 +00:00
|
|
|
|
|
|
|
void AddDataSource(const String& rSource);
|
2000-09-18 16:15:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|