2010-10-27 12:33:13 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-14 17:39:53 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2013-11-05 02:18:53 +01:00
|
|
|
#ifndef INCLUDED_DBACCESS_SOURCE_UI_QUERYDESIGN_QTABLEWINDOW_HXX
|
|
|
|
#define INCLUDED_DBACCESS_SOURCE_UI_QUERYDESIGN_QTABLEWINDOW_HXX
|
2001-02-05 08:35:57 +00:00
|
|
|
|
2017-10-23 22:42:52 +02:00
|
|
|
#include <TableWindow.hxx>
|
2001-02-05 08:35:57 +00:00
|
|
|
#include "QTableWindowData.hxx"
|
2017-10-23 22:42:52 +02:00
|
|
|
#include <TableFieldDescription.hxx>
|
2001-02-05 08:35:57 +00:00
|
|
|
|
|
|
|
namespace dbaui
|
|
|
|
{
|
|
|
|
class OQueryTableWindow : public OTableWindow
|
|
|
|
{
|
2001-03-23 08:47:54 +00:00
|
|
|
sal_Int32 m_nAliasNum;
|
2016-09-12 12:56:25 +02:00
|
|
|
OUString m_strInitialAlias;
|
2001-02-05 08:35:57 +00:00
|
|
|
public:
|
2016-09-12 12:56:25 +02:00
|
|
|
OQueryTableWindow( vcl::Window* pParent, const TTableWindowData::value_type& pTabWinData );
|
2001-02-05 08:35:57 +00:00
|
|
|
|
2017-12-30 14:36:04 +02:00
|
|
|
OUString const & GetAliasName() const
|
2001-02-05 08:35:57 +00:00
|
|
|
{
|
2007-11-01 14:30:41 +00:00
|
|
|
return static_cast<OQueryTableWindowData*>(GetData().get())->GetAliasName();
|
2001-02-05 08:35:57 +00:00
|
|
|
}
|
2013-04-07 12:06:47 +02:00
|
|
|
void SetAliasName(const OUString& strNewAlias)
|
2001-02-05 08:35:57 +00:00
|
|
|
{
|
2007-11-01 14:30:41 +00:00
|
|
|
static_cast<OQueryTableWindowData*>(GetData().get())->SetAliasName(strNewAlias);
|
2001-02-05 08:35:57 +00:00
|
|
|
}
|
|
|
|
|
2012-11-25 01:10:10 +01:00
|
|
|
// late Constructor, the base class CREATES Listbox on first call
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual bool Init() override;
|
2001-02-05 08:35:57 +00:00
|
|
|
|
2017-07-31 12:26:12 +02:00
|
|
|
bool ExistsField(const OUString& strFieldName, OTableFieldDescRef const & rInfo);
|
2014-04-17 11:16:55 +02:00
|
|
|
bool ExistsAVisitedConn() const;
|
2001-02-05 08:35:57 +00:00
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual OUString GetName() const override { return GetWinName(); }
|
2002-11-08 08:27:59 +00:00
|
|
|
|
2001-02-05 08:35:57 +00:00
|
|
|
protected:
|
|
|
|
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void OnEntryDoubleClicked(SvTreeListEntry* pEntry) override;
|
2012-11-25 01:10:10 +01:00
|
|
|
// is called from DoubleClickHdl of the ListBox
|
2002-06-27 07:23:50 +00:00
|
|
|
/** delete the user data with the equal type as created within createUserData
|
|
|
|
@param _pUserData
|
|
|
|
The user data store in the listbox entries. Created with a call to createUserData.
|
|
|
|
_pUserData may be <NULL/>.
|
|
|
|
*/
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void deleteUserData(void*& _pUserData) override;
|
2002-06-27 07:23:50 +00:00
|
|
|
|
|
|
|
/** creates user information that will be append at the ListBoxentry
|
|
|
|
@param _xColumn
|
|
|
|
The corresponding column, can be <NULL/>.
|
|
|
|
@param _bPrimaryKey
|
|
|
|
<TRUE/> when the column belongs to the primary key
|
|
|
|
@return
|
|
|
|
the user data which will be append at the listbox entry, may be <NULL/>
|
|
|
|
*/
|
2015-08-03 09:14:58 +02:00
|
|
|
virtual void* createUserData(const css::uno::Reference<
|
|
|
|
css::beans::XPropertySet>& _xColumn,
|
2015-10-12 16:04:04 +02:00
|
|
|
bool _bPrimaryKey) override;
|
2001-02-05 08:35:57 +00:00
|
|
|
};
|
|
|
|
}
|
2013-11-05 02:18:53 +01:00
|
|
|
#endif // INCLUDED_DBACCESS_SOURCE_UI_QUERYDESIGN_QTABLEWINDOW_HXX
|
2001-02-05 08:35:57 +00:00
|
|
|
|
2010-10-27 12:33:13 +01:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|