Files
libreoffice/dbaccess/source/ui/querydesign/JoinTableView.cxx

1711 lines
64 KiB
C++
Raw Normal View History

/* -*- 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 .
*/
2001-02-05 08:26:47 +00:00
#include "JoinTableView.hxx"
2011-02-03 00:33:36 +01:00
#include <osl/diagnose.h>
2001-02-05 08:26:47 +00:00
#include "querycontroller.hxx"
2001-02-28 09:18:26 +00:00
#include "JoinDesignView.hxx"
2002-08-19 07:01:32 +00:00
#include "dbu_qry.hrc"
2001-02-05 08:26:47 +00:00
#include "TableWindow.hxx"
#include "TableWindowListBox.hxx"
#include "TableConnection.hxx"
#include "TableConnectionData.hxx"
#include "ConnectionLine.hxx"
#include "ConnectionLineData.hxx"
#include "browserids.hxx"
#include <svl/urlbmk.hxx>
2001-02-05 08:26:47 +00:00
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
#include "QueryMoveTabWinUndoAct.hxx"
#include "QuerySizeTabWinUndoAct.hxx"
2001-02-05 08:26:47 +00:00
#include <vcl/svapp.hxx>
2001-02-28 09:18:26 +00:00
#include "TableWindowData.hxx"
#include "JAccess.hxx"
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
2002-05-02 06:54:11 +00:00
#include "UITools.hxx"
#include <cppuhelper/exc_hlp.hxx>
#include <tools/diagnose_ex.h>
CWS-TOOLING: integrate CWS dbaperf2 2009-06-22 11:04:36 +0200 msc r273202 : #100000# fix to run this test 2009-06-22 09:41:04 +0200 msc r273200 : #100000# correct case 2009-06-22 09:02:42 +0200 msc r273199 : new SRB 2009-06-22 08:53:26 +0200 msc r273198 : #100000 2009-06-15 12:36:32 +0200 oj r272976 : test 2009-06-12 14:23:23 +0200 msc r272918 : #101587# unused feature was removed 2009-06-12 06:45:17 +0200 oj r272903 : use GUI instead of OS 2009-06-11 09:12:30 +0200 oj r272845 : remove unused dep 2009-06-11 09:11:09 +0200 oj r272844 : ColumnAliasInOrderBy not supported 2009-06-11 08:27:00 +0200 oj r272843 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@272827 (milestone: DEV300:m50) 2009-06-10 15:30:17 +0200 msc r272822 : #100000 2009-06-10 15:27:40 +0200 msc r272820 : #102515# new function for the database type list 2009-06-10 15:26:09 +0200 msc r272818 : move file to dbaccess/tools/dbcreatetools.inc 2009-06-10 15:20:10 +0200 msc r272816 : #102515# new function for the database type list 2009-06-10 12:34:46 +0200 oj r272803 : #i101587# check extension 2009-06-10 11:53:45 +0200 oj r272800 : remove unused code 2009-06-09 09:57:25 +0200 oj r272752 : #i101587# EscapeDateTime moved into features section 2009-06-09 09:56:26 +0200 oj r272751 : enable finish 2009-06-08 11:50:37 +0200 oj r272726 : #i102588# move convert tzo saveDataSource 2009-06-05 11:54:20 +0200 jsk r272676 : #i102515# - NEW: Functions to retrieve Database names from API 2009-06-05 10:52:22 +0200 jsk r272671 : NEW: Functions to retrieve Database names from API 2009-06-05 09:36:54 +0200 oj r272666 : handle win and unx differently 2009-06-05 09:36:28 +0200 oj r272665 : handle win and unx differently 2009-06-04 13:41:56 +0200 oj r272625 : #i101268# make use of stringbuffer instead of oustring 2009-06-04 10:18:14 +0200 oj r272612 : add SAL_DLLPUBLIC_EXPORT 2009-05-28 10:56:33 +0200 oj r272381 : #i101587# create langpacks 2009-05-28 10:41:59 +0200 oj r272380 : #i101587# create langpacks 2009-05-28 10:29:30 +0200 oj r272379 : #i101587# create langpacks 2009-05-07 10:11:46 +0200 oj r271635 : fix compile warnings 2009-05-07 07:01:31 +0200 oj r271619 : change type from int32 to PathID 2009-05-07 06:53:19 +0200 oj r271618 : add all 2009-05-06 14:57:02 +0200 oj r271595 : add missing lib 2009-05-06 14:56:54 +0200 oj r271594 : no used anymore 2009-05-06 14:56:08 +0200 oj r271593 : no used anymore 2009-05-06 14:54:25 +0200 oj r271592 : no used anymore 2009-05-06 14:45:59 +0200 oj r271591 : add missing lib 2009-05-06 14:41:54 +0200 oj r271590 : change wnt 2009-05-06 14:22:21 +0200 oj r271589 : #i101587# use config for the drivers 2009-05-06 14:21:39 +0200 oj r271588 : #i101587# add new set for metadata and config data for driver 2009-05-06 14:19:36 +0200 oj r271587 : #i101587# handle metadata and props of driver 2009-05-06 10:11:11 +0200 oj r271570 : #i101587# correct wrong use of reference 2009-05-06 09:24:33 +0200 oj r271567 : #i101587# add new set for metadata 2009-05-06 08:52:06 +0200 oj r271563 : #i101587# add driver configuration 2009-05-06 08:51:04 +0200 oj r271562 : #i101587# add driver configuration 2009-05-04 10:24:41 +0200 oj r271442 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@271427 (milestone: DEV300:m47) 2009-04-28 07:06:22 +0200 oj r271303 : compile error 2009-04-27 14:12:48 +0200 oj r271270 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 14:12:27 +0200 oj r271269 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 09:30:10 +0200 oj r271255 : use string buffer when possible 2009-04-24 11:56:01 +0200 oj r271207 : #i101268# remove end() call from loop 2009-04-23 14:24:03 +0200 oj r271171 : add dep 2009-04-23 13:25:25 +0200 oj r271164 : #i101268# add config entries for database drivers 2009-04-23 13:07:13 +0200 oj r271161 : #i101268# add config entries for database drivers 2009-04-23 13:06:33 +0200 oj r271160 : #i101268# add parent url pattern entry for driver node 2009-04-23 13:05:39 +0200 oj r271159 : #i101268# add config entry for driver node 2009-04-23 13:04:09 +0200 oj r271157 : #i101268# add config entry for driver node 2009-04-23 06:41:32 +0200 oj r271142 : #i101268# add new configuration file Drivers 2009-04-22 13:49:19 +0200 oj r271103 : convert EOL 2009-04-22 13:29:17 +0200 oj r271101 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:28:08 +0200 oj r271100 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:15:26 +0200 oj r271098 : #i101268# add new configuration file Drivers 2009-04-22 13:14:43 +0200 oj r271097 : #i101268# use of driver configuration entries for features and properties
2009-07-03 12:24:35 +00:00
#include <boost/bind.hpp>
2001-10-31 16:32:48 +00:00
#include <algorithm>
#include <functional>
2001-02-05 08:26:47 +00:00
using namespace dbaui;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::accessibility;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
2002-02-08 08:10:00 +00:00
#define LINE_SIZE 50
////////////////////////////////////////////////////////////////
// Konstanten fuer das Fensterlayout
#define TABWIN_SPACING_X 17
#define TABWIN_SPACING_Y 17
#define TABWIN_WIDTH_STD 120
#define TABWIN_HEIGHT_STD 120
2001-02-05 08:26:47 +00:00
DBG_NAME(OScrollWindowHelper)
2001-02-05 08:26:47 +00:00
OScrollWindowHelper::OScrollWindowHelper( Window* pParent) : Window( pParent)
,m_aHScrollBar( this, WB_HSCROLL|WB_REPEAT|WB_DRAG )
,m_aVScrollBar( this, WB_VSCROLL|WB_REPEAT|WB_DRAG )
2001-02-13 15:44:04 +00:00
,m_pCornerWindow(new ScrollBarBox(this, WB_3DLOOK))
,m_pTableView(NULL)
2001-02-05 08:26:47 +00:00
{
DBG_CTOR(OScrollWindowHelper,NULL);
2001-02-05 08:26:47 +00:00
//////////////////////////////////////////////////////////////////////
// ScrollBars
GetHScrollBar()->SetRange( Range(0, 1000) );
GetVScrollBar()->SetRange( Range(0, 1000) );
GetHScrollBar()->SetLineSize( LINE_SIZE );
GetVScrollBar()->SetLineSize( LINE_SIZE );
GetHScrollBar()->Show();
GetVScrollBar()->Show();
2001-02-13 15:44:04 +00:00
m_pCornerWindow->Show();
2002-02-08 08:10:00 +00:00
// normally we should be SCROLL_PANE
SetAccessibleRole(AccessibleRole::SCROLL_PANE);
2001-02-13 15:44:04 +00:00
}
2001-02-05 08:26:47 +00:00
2001-02-13 15:44:04 +00:00
// -----------------------------------------------------------------------------
OScrollWindowHelper::~OScrollWindowHelper()
{
DBG_DTOR(OScrollWindowHelper,NULL);
SAL_WNODEPRECATED_DECLARATIONS_PUSH
2002-05-10 07:23:32 +00:00
::std::auto_ptr<Window> aTemp(m_pCornerWindow);
SAL_WNODEPRECATED_DECLARATIONS_POP
2002-05-10 07:23:32 +00:00
m_pCornerWindow = NULL;
2001-10-26 06:57:11 +00:00
m_pTableView = NULL;
2001-02-05 08:26:47 +00:00
}
2001-02-13 15:44:04 +00:00
2001-02-05 08:26:47 +00:00
// -----------------------------------------------------------------------------
void OScrollWindowHelper::setTableView(OJoinTableView* _pTableView)
{
m_pTableView = _pTableView;
//////////////////////////////////////////////////////////////////////
// ScrollBars
GetHScrollBar()->SetScrollHdl( LINK(m_pTableView, OJoinTableView, ScrollHdl) );
GetVScrollBar()->SetScrollHdl( LINK(m_pTableView, OJoinTableView, ScrollHdl) );
}
// -----------------------------------------------------------------------------
void OScrollWindowHelper::resetRange(const Point& _aSize)
{
Point aPos = PixelToLogic(_aSize);
GetHScrollBar()->SetRange( Range(0, aPos.X() + TABWIN_SPACING_X) );
GetVScrollBar()->SetRange( Range(0, aPos.Y() + TABWIN_SPACING_Y) );
}
2001-02-05 08:26:47 +00:00
//------------------------------------------------------------------------------
void OScrollWindowHelper::Resize()
{
Window::Resize();
Size aTotalOutputSize = GetOutputSizePixel();
long nHScrollHeight = GetHScrollBar()->GetSizePixel().Height();
long nVScrollWidth = GetVScrollBar()->GetSizePixel().Width();
GetHScrollBar()->SetPosSizePixel(
Point( 0, aTotalOutputSize.Height()-nHScrollHeight ),
Size( aTotalOutputSize.Width()-nVScrollWidth, nHScrollHeight )
);
GetVScrollBar()->SetPosSizePixel(
Point( aTotalOutputSize.Width()-nVScrollWidth, 0 ),
Size( nVScrollWidth, aTotalOutputSize.Height()-nHScrollHeight )
);
2001-02-13 15:44:04 +00:00
m_pCornerWindow->SetPosSizePixel(
Point( aTotalOutputSize.Width() - nVScrollWidth, aTotalOutputSize.Height() - nHScrollHeight),
Size( nVScrollWidth, nHScrollHeight )
);
2001-02-05 08:26:47 +00:00
GetHScrollBar()->SetPageSize( aTotalOutputSize.Width() );
GetHScrollBar()->SetVisibleSize( aTotalOutputSize.Width() );
GetVScrollBar()->SetPageSize( aTotalOutputSize.Height() );
GetVScrollBar()->SetVisibleSize( aTotalOutputSize.Height() );
// adjust the ranges of the scrollbars if neccessary
long lRange = GetHScrollBar()->GetRange().Max() - GetHScrollBar()->GetRange().Min();
if (m_pTableView->GetScrollOffset().X() + aTotalOutputSize.Width() > lRange)
GetHScrollBar()->SetRangeMax(m_pTableView->GetScrollOffset().X() + aTotalOutputSize.Width() + GetHScrollBar()->GetRange().Min());
lRange = GetVScrollBar()->GetRange().Max() - GetVScrollBar()->GetRange().Min();
if (m_pTableView->GetScrollOffset().Y() + aTotalOutputSize.Height() > lRange)
GetVScrollBar()->SetRangeMax(m_pTableView->GetScrollOffset().Y() + aTotalOutputSize.Height() + GetVScrollBar()->GetRange().Min());
m_pTableView->SetPosSizePixel(Point( 0, 0 ),Size( aTotalOutputSize.Width()-nVScrollWidth, aTotalOutputSize.Height()-nHScrollHeight ));
}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
//==================================================================
// class OJoinTableView
//==================================================================
DBG_NAME(OJoinTableView);
//------------------------------------------------------------------------------
OJoinTableView::OJoinTableView( Window* pParent, OJoinDesignView* pView )
:Window( pParent,WB_BORDER )
2001-07-26 06:11:02 +00:00
,DropTargetHelper(this)
,m_aDragOffset( Point(0,0) )
,m_aScrollOffset( Point(0,0) )
2001-02-05 08:26:47 +00:00
,m_pDragWin( NULL )
,m_pSizingWin( NULL )
,m_pSelectedConn( NULL )
,m_bTrackingInitiallyMoved(sal_False)
2001-02-05 08:26:47 +00:00
,m_pLastFocusTabWin(NULL)
,m_pView( pView )
2002-02-08 08:10:00 +00:00
,m_pAccessible(NULL)
2001-02-05 08:26:47 +00:00
{
DBG_CTOR(OJoinTableView,NULL);
SetSizePixel( Size(1000, 1000) );
InitColors();
m_aDragScrollTimer.SetTimeoutHdl(LINK(this, OJoinTableView, OnDragScrollTimer));
}
//------------------------------------------------------------------------------
OJoinTableView::~OJoinTableView()
{
DBG_DTOR(OJoinTableView,NULL);
if( m_pAccessible )
{
m_pAccessible->clearTableView();
m_pAccessible = NULL;
}
2001-02-28 09:18:26 +00:00
//////////////////////////////////////////////////////////////////////
// Listen loeschen
clearLayoutInformation();
2001-02-05 08:26:47 +00:00
}
//------------------------------------------------------------------------------
IMPL_LINK( OJoinTableView, ScrollHdl, ScrollBar*, pScrollBar )
{
//////////////////////////////////////////////////////////////////////
// Alle Fenster verschieben
ScrollPane( pScrollBar->GetDelta(), (pScrollBar == GetHScrollBar()), sal_False );
2001-02-05 08:26:47 +00:00
return 0;
}
//------------------------------------------------------------------------------
void OJoinTableView::Resize()
{
DBG_CHKTHIS(OJoinTableView,NULL);
Window::Resize();
m_aOutputSize = GetSizePixel();
// tab win positions may not be up-to-date
if (m_aTableMap.empty())
2001-02-05 08:26:47 +00:00
// no tab wins ...
return;
// we have at least one table so resize it
m_aScrollOffset.X() = GetHScrollBar()->GetThumbPos();
m_aScrollOffset.Y() = GetVScrollBar()->GetThumbPos();
OTableWindow* pCheck = m_aTableMap.begin()->second;
Point aRealPos = pCheck->GetPosPixel();
Point aAssumedPos = pCheck->GetData()->GetPosition() - GetScrollOffset();
if (aRealPos == aAssumedPos)
// all ok
return;
OTableWindowMapIterator aIter = m_aTableMap.begin();
CWS-TOOLING: integrate CWS dbaperf2 2009-06-22 11:04:36 +0200 msc r273202 : #100000# fix to run this test 2009-06-22 09:41:04 +0200 msc r273200 : #100000# correct case 2009-06-22 09:02:42 +0200 msc r273199 : new SRB 2009-06-22 08:53:26 +0200 msc r273198 : #100000 2009-06-15 12:36:32 +0200 oj r272976 : test 2009-06-12 14:23:23 +0200 msc r272918 : #101587# unused feature was removed 2009-06-12 06:45:17 +0200 oj r272903 : use GUI instead of OS 2009-06-11 09:12:30 +0200 oj r272845 : remove unused dep 2009-06-11 09:11:09 +0200 oj r272844 : ColumnAliasInOrderBy not supported 2009-06-11 08:27:00 +0200 oj r272843 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@272827 (milestone: DEV300:m50) 2009-06-10 15:30:17 +0200 msc r272822 : #100000 2009-06-10 15:27:40 +0200 msc r272820 : #102515# new function for the database type list 2009-06-10 15:26:09 +0200 msc r272818 : move file to dbaccess/tools/dbcreatetools.inc 2009-06-10 15:20:10 +0200 msc r272816 : #102515# new function for the database type list 2009-06-10 12:34:46 +0200 oj r272803 : #i101587# check extension 2009-06-10 11:53:45 +0200 oj r272800 : remove unused code 2009-06-09 09:57:25 +0200 oj r272752 : #i101587# EscapeDateTime moved into features section 2009-06-09 09:56:26 +0200 oj r272751 : enable finish 2009-06-08 11:50:37 +0200 oj r272726 : #i102588# move convert tzo saveDataSource 2009-06-05 11:54:20 +0200 jsk r272676 : #i102515# - NEW: Functions to retrieve Database names from API 2009-06-05 10:52:22 +0200 jsk r272671 : NEW: Functions to retrieve Database names from API 2009-06-05 09:36:54 +0200 oj r272666 : handle win and unx differently 2009-06-05 09:36:28 +0200 oj r272665 : handle win and unx differently 2009-06-04 13:41:56 +0200 oj r272625 : #i101268# make use of stringbuffer instead of oustring 2009-06-04 10:18:14 +0200 oj r272612 : add SAL_DLLPUBLIC_EXPORT 2009-05-28 10:56:33 +0200 oj r272381 : #i101587# create langpacks 2009-05-28 10:41:59 +0200 oj r272380 : #i101587# create langpacks 2009-05-28 10:29:30 +0200 oj r272379 : #i101587# create langpacks 2009-05-07 10:11:46 +0200 oj r271635 : fix compile warnings 2009-05-07 07:01:31 +0200 oj r271619 : change type from int32 to PathID 2009-05-07 06:53:19 +0200 oj r271618 : add all 2009-05-06 14:57:02 +0200 oj r271595 : add missing lib 2009-05-06 14:56:54 +0200 oj r271594 : no used anymore 2009-05-06 14:56:08 +0200 oj r271593 : no used anymore 2009-05-06 14:54:25 +0200 oj r271592 : no used anymore 2009-05-06 14:45:59 +0200 oj r271591 : add missing lib 2009-05-06 14:41:54 +0200 oj r271590 : change wnt 2009-05-06 14:22:21 +0200 oj r271589 : #i101587# use config for the drivers 2009-05-06 14:21:39 +0200 oj r271588 : #i101587# add new set for metadata and config data for driver 2009-05-06 14:19:36 +0200 oj r271587 : #i101587# handle metadata and props of driver 2009-05-06 10:11:11 +0200 oj r271570 : #i101587# correct wrong use of reference 2009-05-06 09:24:33 +0200 oj r271567 : #i101587# add new set for metadata 2009-05-06 08:52:06 +0200 oj r271563 : #i101587# add driver configuration 2009-05-06 08:51:04 +0200 oj r271562 : #i101587# add driver configuration 2009-05-04 10:24:41 +0200 oj r271442 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@271427 (milestone: DEV300:m47) 2009-04-28 07:06:22 +0200 oj r271303 : compile error 2009-04-27 14:12:48 +0200 oj r271270 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 14:12:27 +0200 oj r271269 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 09:30:10 +0200 oj r271255 : use string buffer when possible 2009-04-24 11:56:01 +0200 oj r271207 : #i101268# remove end() call from loop 2009-04-23 14:24:03 +0200 oj r271171 : add dep 2009-04-23 13:25:25 +0200 oj r271164 : #i101268# add config entries for database drivers 2009-04-23 13:07:13 +0200 oj r271161 : #i101268# add config entries for database drivers 2009-04-23 13:06:33 +0200 oj r271160 : #i101268# add parent url pattern entry for driver node 2009-04-23 13:05:39 +0200 oj r271159 : #i101268# add config entry for driver node 2009-04-23 13:04:09 +0200 oj r271157 : #i101268# add config entry for driver node 2009-04-23 06:41:32 +0200 oj r271142 : #i101268# add new configuration file Drivers 2009-04-22 13:49:19 +0200 oj r271103 : convert EOL 2009-04-22 13:29:17 +0200 oj r271101 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:28:08 +0200 oj r271100 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:15:26 +0200 oj r271098 : #i101268# add new configuration file Drivers 2009-04-22 13:14:43 +0200 oj r271097 : #i101268# use of driver configuration entries for features and properties
2009-07-03 12:24:35 +00:00
OTableWindowMapIterator aEnd = m_aTableMap.end();
for(;aIter != aEnd;++aIter)
2001-02-05 08:26:47 +00:00
{
OTableWindow* pCurrent = aIter->second;
Point aPos(pCurrent->GetData()->GetPosition() - GetScrollOffset());
pCurrent->SetPosPixel(aPos);
}
}
//------------------------------------------------------------------------------
sal_uLong OJoinTableView::GetTabWinCount()
2001-02-05 08:26:47 +00:00
{
DBG_CHKTHIS(OJoinTableView,NULL);
return m_aTableMap.size();
}
//------------------------------------------------------------------------------
bool OJoinTableView::RemoveConnection( OTableConnection* _pConn,sal_Bool _bDelete )
2001-02-05 08:26:47 +00:00
{
DBG_CHKTHIS(OJoinTableView,NULL);
2002-02-08 08:10:00 +00:00
DeselectConn(_pConn);
2001-02-05 08:26:47 +00:00
2002-02-08 08:10:00 +00:00
// to force a redraw
_pConn->InvalidateConnection();
2001-02-05 08:26:47 +00:00
m_pView->getController().removeConnectionData( _pConn->GetData() );
m_vTableConnection.erase(
2002-02-08 08:10:00 +00:00
::std::find(m_vTableConnection.begin(),m_vTableConnection.end(),_pConn) );
2002-11-26 06:46:13 +00:00
modified();
if ( m_pAccessible )
m_pAccessible->notifyAccessibleEvent( AccessibleEventId::CHILD,
makeAny(_pConn->GetAccessible()),
2002-11-26 06:46:13 +00:00
Any());
2002-02-08 08:10:00 +00:00
if ( _bDelete )
{
delete _pConn;
}
return true;
2001-02-05 08:26:47 +00:00
}
//------------------------------------------------------------------------
OTableWindow* OJoinTableView::GetTabWindow( const String& rName )
2001-02-05 08:26:47 +00:00
{
DBG_CHKTHIS(OJoinTableView,NULL);
2001-04-06 12:45:42 +00:00
OTableWindowMapIterator aIter = m_aTableMap.find(rName);
return aIter == m_aTableMap.end() ? NULL : aIter->second;
2001-02-05 08:26:47 +00:00
}
2001-02-28 09:18:26 +00:00
// -----------------------------------------------------------------------------
TTableWindowData::value_type OJoinTableView::createTableWindowData(const ::rtl::OUString& _rComposedName
,const ::rtl::OUString& _sTableName
,const ::rtl::OUString& _rWinName)
{
TTableWindowData::value_type pData( CreateImpl(_rComposedName, _sTableName,_rWinName) );
OJoinDesignView* pParent = getDesignView();
try
{
if ( !pData->init(pParent->getController().getConnection(),allowQueries()) )
{
if ( pData->isValid() )
onNoColumns_throw();
else
pData.reset();
}
}
catch ( const SQLException& )
{
::dbaui::showError( ::dbtools::SQLExceptionInfo( ::cppu::getCaughtException() ),
pParent, pParent->getController().getORB() );
}
catch( const WrappedTargetException& e )
{
SQLException aSql;
if ( e.TargetException >>= aSql )
::dbaui::showError( ::dbtools::SQLExceptionInfo( aSql ), pParent, pParent->getController().getORB() );
}
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
return pData;
}
// -----------------------------------------------------------------------------
OTableWindowData* OJoinTableView::CreateImpl(const ::rtl::OUString& _rComposedName
,const ::rtl::OUString& _sTableName
,const ::rtl::OUString& _rWinName)
2001-02-28 09:18:26 +00:00
{
return new OTableWindowData( NULL,_rComposedName,_sTableName, _rWinName );
2001-02-28 09:18:26 +00:00
}
2001-02-05 08:26:47 +00:00
//------------------------------------------------------------------------------
void OJoinTableView::AddTabWin(const ::rtl::OUString& _rComposedName, const ::rtl::OUString& rWinName, sal_Bool /*bNewTable*/)
2001-02-05 08:26:47 +00:00
{
DBG_CHKTHIS(OJoinTableView,NULL);
OSL_ENSURE(!_rComposedName.isEmpty(),"There must be a table name supplied!");
2001-02-05 08:26:47 +00:00
TTableWindowData::value_type pNewTabWinData(createTableWindowData( _rComposedName, rWinName,rWinName ));
2001-02-05 08:26:47 +00:00
//////////////////////////////////////////////////////////////////
// Neues Fenster in Fensterliste eintragen
OTableWindow* pNewTabWin = createWindow( pNewTabWinData );
if ( pNewTabWin->Init() )
2001-02-28 09:18:26 +00:00
{
m_pView->getController().getTableWindowData()->push_back( pNewTabWinData);
2001-02-28 09:18:26 +00:00
// when we already have a table with this name insert the full qualified one instead
if(m_aTableMap.find(rWinName) != m_aTableMap.end())
m_aTableMap[_rComposedName] = pNewTabWin;
else
m_aTableMap[rWinName] = pNewTabWin;
2001-02-05 08:26:47 +00:00
2001-02-28 09:18:26 +00:00
SetDefaultTabWinPosSize( pNewTabWin );
pNewTabWin->Show();
2001-02-05 08:26:47 +00:00
2002-11-26 06:46:13 +00:00
modified();
if ( m_pAccessible )
m_pAccessible->notifyAccessibleEvent( AccessibleEventId::CHILD,
2002-11-26 06:46:13 +00:00
Any(),
makeAny(pNewTabWin->GetAccessible()));
2001-02-28 09:18:26 +00:00
}
else
{
pNewTabWin->clearListBox();
2001-02-28 09:18:26 +00:00
delete pNewTabWin;
}
2001-02-05 08:26:47 +00:00
}
//------------------------------------------------------------------------------
void OJoinTableView::RemoveTabWin( OTableWindow* pTabWin )
{
DBG_CHKTHIS(OJoinTableView,NULL);
//////////////////////////////////////////////////////////////////////
// first delete all connections of this window to others
bool bRemove = true;
TTableWindowData::value_type pData = pTabWin->GetData();
2001-02-05 08:26:47 +00:00
sal_Int32 nCount = m_vTableConnection.size();
2001-03-21 12:49:37 +00:00
::std::vector<OTableConnection*>::reverse_iterator aIter = m_vTableConnection.rbegin();
while(aIter != m_vTableConnection.rend() && bRemove)
2001-02-05 08:26:47 +00:00
{
OTableConnection* pTabConn = (*aIter);
if(
( pData == pTabConn->GetData()->getReferencingTable()) ||
( pData == pTabConn->GetData()->getReferencedTable())
)
{
bRemove = RemoveConnection( pTabConn ,sal_True);
aIter = m_vTableConnection.rbegin();
}
else
++aIter;
2001-02-05 08:26:47 +00:00
}
//////////////////////////////////////////////////////////////////////
// then delete the window itself
2002-11-26 06:46:13 +00:00
if ( bRemove )
2001-02-05 08:26:47 +00:00
{
2002-11-26 06:46:13 +00:00
if ( m_pAccessible )
m_pAccessible->notifyAccessibleEvent( AccessibleEventId::CHILD,
2002-11-26 06:46:13 +00:00
makeAny(pTabWin->GetAccessible()),Any()
);
2001-02-05 08:26:47 +00:00
pTabWin->Hide();
OJoinController& rController = m_pView->getController();
TTableWindowData::iterator aFind = ::std::find(rController.getTableWindowData()->begin(),rController.getTableWindowData()->end(),pData);
if(aFind != rController.getTableWindowData()->end())
2001-02-05 15:17:40 +00:00
{
rController.getTableWindowData()->erase(aFind);
rController.setModified(sal_True);
2001-02-05 15:17:40 +00:00
}
2001-02-05 08:26:47 +00:00
String aWinName = pTabWin->GetWinName();
2001-03-21 12:49:37 +00:00
if(m_aTableMap.find(aWinName) != m_aTableMap.end())
m_aTableMap.erase( aWinName );
else
m_aTableMap.erase( pTabWin->GetComposedName() );
2001-03-21 12:49:37 +00:00
2001-02-05 08:26:47 +00:00
if (pTabWin == m_pLastFocusTabWin)
m_pLastFocusTabWin = NULL;
pTabWin->clearListBox();
2001-02-05 08:26:47 +00:00
delete pTabWin;
}
if ( (sal_Int32)m_vTableConnection.size() < (nCount-1) ) // if some connections could be removed
2002-11-26 06:46:13 +00:00
modified();
2001-02-05 08:26:47 +00:00
}
namespace
2001-02-05 08:26:47 +00:00
{
// -----------------------------------------------------------------------------
sal_Bool isScrollAllowed( OJoinTableView* _pView,long nDelta, sal_Bool bHoriz)
2001-02-05 08:26:47 +00:00
{
//////////////////////////////////////////////////////////////////////
// adjust ScrollBar-Positions
ScrollBar* pBar = _pView->GetVScrollBar();
if( bHoriz )
pBar = _pView->GetHScrollBar();
long nOldThumbPos = pBar->GetThumbPos();
long nNewThumbPos = nOldThumbPos + nDelta;
if( nNewThumbPos < 0 )
2011-01-09 02:04:00 +09:00
nNewThumbPos = 0;
else if( nNewThumbPos > pBar->GetRangeMax() )
2011-01-09 02:04:00 +09:00
nNewThumbPos = pBar->GetRangeMax();
2001-02-05 08:26:47 +00:00
if ( bHoriz )
{
if( nNewThumbPos == _pView->GetScrollOffset().X() )
return sal_False;
}
else if ( nNewThumbPos == _pView->GetScrollOffset().Y() )
return sal_False;
2001-02-05 08:26:47 +00:00
2011-03-12 19:20:31 -06:00
return sal_True;
}
// -----------------------------------------------------------------------------
sal_Bool getMovementImpl(OJoinTableView* _pView,const Point& _rPoint,const Size& _rSize,long& _nScrollX,long& _nScrollY)
{
_nScrollY = _nScrollX = 0;
// data about the tab win
Point aUpperLeft = _rPoint;
// normalize with respect to visibility
aUpperLeft -= _pView->GetScrollOffset();
Point aLowerRight(aUpperLeft.X() + _rSize.Width(), aUpperLeft.Y() + _rSize.Height());
// data about ourself
Size aSize = _pView->getRealOutputSize(); //GetOutputSizePixel();
sal_Bool bVisbile = sal_True;
sal_Bool bFitsHor = (aUpperLeft.X() >= 0) && (aLowerRight.X() <= aSize.Width());
sal_Bool bFitsVert= (aUpperLeft.Y() >= 0) && (aLowerRight.Y() <= aSize.Height());
if (!bFitsHor || !bFitsVert)
{
if (!bFitsHor)
{
// ensure the visibility of the right border
if ( aLowerRight.X() > aSize.Width() )
_nScrollX = aLowerRight.X() - aSize.Width() + TABWIN_SPACING_X;
// ensure the visibility of the left border (higher priority)
2002-06-24 06:56:02 +00:00
if ( aUpperLeft.X() < 0 )
_nScrollX = aUpperLeft.X() - TABWIN_SPACING_X;
}
if (!bFitsVert)
{
// lower border
if ( aLowerRight.Y() > aSize.Height() )
_nScrollY = aLowerRight.Y() - aSize.Height() + TABWIN_SPACING_Y;
// upper border
2002-06-24 06:56:02 +00:00
if ( aUpperLeft.Y() < 0 )
_nScrollY = aUpperLeft.Y() - TABWIN_SPACING_Y;
}
2002-06-24 06:56:02 +00:00
if ( _nScrollX ) // aSize.Width() > _rSize.Width() &&
bVisbile = isScrollAllowed(_pView,_nScrollX, sal_True);
2002-06-24 06:56:02 +00:00
if ( _nScrollY ) // aSize.Height() > _rSize.Height() &&
bVisbile = bVisbile && isScrollAllowed(_pView,_nScrollY, sal_False);
if ( bVisbile )
{
sal_Int32 nHRangeMax = _pView->GetHScrollBar()->GetRangeMax();
sal_Int32 nVRangeMax = _pView->GetVScrollBar()->GetRangeMax();
2001-02-05 08:26:47 +00:00
if ( aSize.Width() + _pView->GetHScrollBar()->GetThumbPos() + _nScrollX > nHRangeMax )
bVisbile = sal_False;
if ( bVisbile && aSize.Height() + _pView->GetVScrollBar()->GetThumbPos() + _nScrollY > nVRangeMax )
bVisbile = sal_False;
}
}
2001-02-05 08:26:47 +00:00
return bVisbile;
}
} // end of ano namespace
// -----------------------------------------------------------------------------
sal_Bool OJoinTableView::isMovementAllowed(const Point& _rPoint,const Size& _rSize)
{
long nX,nY;
return getMovementImpl(this,_rPoint,_rSize,nX,nY);
}
//------------------------------------------------------------------------------
void OJoinTableView::EnsureVisible(const OTableWindow* _pWin)
{
// data about the tab win
TTableWindowData::value_type pData = _pWin->GetData();
EnsureVisible( pData->GetPosition() , pData->GetSize());
Invalidate(INVALIDATE_NOCHILDREN);
}
//------------------------------------------------------------------------------
void OJoinTableView::EnsureVisible(const Point& _rPoint,const Size& _rSize)
{
long nScrollX,nScrollY;
if ( getMovementImpl(this,_rPoint,_rSize,nScrollX,nScrollY) )
{
sal_Bool bVisbile = sal_True;
if (nScrollX)
bVisbile = ScrollPane(nScrollX, sal_True, sal_True);
2001-02-05 08:26:47 +00:00
if (nScrollY)
bVisbile = bVisbile && ScrollPane(nScrollY, sal_False, sal_True);
}
2001-02-05 08:26:47 +00:00
}
//------------------------------------------------------------------------------
void OJoinTableView::SetDefaultTabWinPosSize( OTableWindow* pTabWin )
{
DBG_CHKTHIS(OJoinTableView,NULL);
//////////////////////////////////////////////////////////////////
// Position bestimmen:
// Das Fenster wird in Zeilen der Hoehe TABWIN_SPACING_Y+TABWIN_HEIGTH_STD aufgeteilt.
// Dann wird fuer jede Zeile geprueft, ob noch Platz fuer ein weiteres Fenster ist.
// Wenn kein Platz ist, wird die naechste Zeile ueberprueft.
Size aOutSize = GetSizePixel();
Point aNewPos( 0,0 );
sal_uInt16 nRow = 0;
sal_Bool bEnd = sal_False;
2001-02-05 08:26:47 +00:00
while( !bEnd )
{
//////////////////////////////////////////////////////////////////
// Neue Position auf Zeilenbeginn setzen
aNewPos.X() = TABWIN_SPACING_X;
aNewPos.Y() = (nRow+1) * TABWIN_SPACING_Y;
//////////////////////////////////////////////////////////////////
// Rectangle fuer die jeweilige Zeile bestimmen
Rectangle aRowRect( Point(0,0), aOutSize );
aRowRect.Top() = nRow * ( TABWIN_SPACING_Y + TABWIN_HEIGHT_STD );
aRowRect.Bottom() = (nRow+1) * ( TABWIN_SPACING_Y + TABWIN_HEIGHT_STD );
//////////////////////////////////////////////////////////////////
// Belegte Bereiche dieser Zeile pruefen
2011-01-09 02:04:00 +09:00
OTableWindow* pOtherTabWin;
2001-02-05 08:26:47 +00:00
OTableWindowMapIterator aIter = m_aTableMap.begin();
CWS-TOOLING: integrate CWS dbaperf2 2009-06-22 11:04:36 +0200 msc r273202 : #100000# fix to run this test 2009-06-22 09:41:04 +0200 msc r273200 : #100000# correct case 2009-06-22 09:02:42 +0200 msc r273199 : new SRB 2009-06-22 08:53:26 +0200 msc r273198 : #100000 2009-06-15 12:36:32 +0200 oj r272976 : test 2009-06-12 14:23:23 +0200 msc r272918 : #101587# unused feature was removed 2009-06-12 06:45:17 +0200 oj r272903 : use GUI instead of OS 2009-06-11 09:12:30 +0200 oj r272845 : remove unused dep 2009-06-11 09:11:09 +0200 oj r272844 : ColumnAliasInOrderBy not supported 2009-06-11 08:27:00 +0200 oj r272843 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@272827 (milestone: DEV300:m50) 2009-06-10 15:30:17 +0200 msc r272822 : #100000 2009-06-10 15:27:40 +0200 msc r272820 : #102515# new function for the database type list 2009-06-10 15:26:09 +0200 msc r272818 : move file to dbaccess/tools/dbcreatetools.inc 2009-06-10 15:20:10 +0200 msc r272816 : #102515# new function for the database type list 2009-06-10 12:34:46 +0200 oj r272803 : #i101587# check extension 2009-06-10 11:53:45 +0200 oj r272800 : remove unused code 2009-06-09 09:57:25 +0200 oj r272752 : #i101587# EscapeDateTime moved into features section 2009-06-09 09:56:26 +0200 oj r272751 : enable finish 2009-06-08 11:50:37 +0200 oj r272726 : #i102588# move convert tzo saveDataSource 2009-06-05 11:54:20 +0200 jsk r272676 : #i102515# - NEW: Functions to retrieve Database names from API 2009-06-05 10:52:22 +0200 jsk r272671 : NEW: Functions to retrieve Database names from API 2009-06-05 09:36:54 +0200 oj r272666 : handle win and unx differently 2009-06-05 09:36:28 +0200 oj r272665 : handle win and unx differently 2009-06-04 13:41:56 +0200 oj r272625 : #i101268# make use of stringbuffer instead of oustring 2009-06-04 10:18:14 +0200 oj r272612 : add SAL_DLLPUBLIC_EXPORT 2009-05-28 10:56:33 +0200 oj r272381 : #i101587# create langpacks 2009-05-28 10:41:59 +0200 oj r272380 : #i101587# create langpacks 2009-05-28 10:29:30 +0200 oj r272379 : #i101587# create langpacks 2009-05-07 10:11:46 +0200 oj r271635 : fix compile warnings 2009-05-07 07:01:31 +0200 oj r271619 : change type from int32 to PathID 2009-05-07 06:53:19 +0200 oj r271618 : add all 2009-05-06 14:57:02 +0200 oj r271595 : add missing lib 2009-05-06 14:56:54 +0200 oj r271594 : no used anymore 2009-05-06 14:56:08 +0200 oj r271593 : no used anymore 2009-05-06 14:54:25 +0200 oj r271592 : no used anymore 2009-05-06 14:45:59 +0200 oj r271591 : add missing lib 2009-05-06 14:41:54 +0200 oj r271590 : change wnt 2009-05-06 14:22:21 +0200 oj r271589 : #i101587# use config for the drivers 2009-05-06 14:21:39 +0200 oj r271588 : #i101587# add new set for metadata and config data for driver 2009-05-06 14:19:36 +0200 oj r271587 : #i101587# handle metadata and props of driver 2009-05-06 10:11:11 +0200 oj r271570 : #i101587# correct wrong use of reference 2009-05-06 09:24:33 +0200 oj r271567 : #i101587# add new set for metadata 2009-05-06 08:52:06 +0200 oj r271563 : #i101587# add driver configuration 2009-05-06 08:51:04 +0200 oj r271562 : #i101587# add driver configuration 2009-05-04 10:24:41 +0200 oj r271442 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@271427 (milestone: DEV300:m47) 2009-04-28 07:06:22 +0200 oj r271303 : compile error 2009-04-27 14:12:48 +0200 oj r271270 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 14:12:27 +0200 oj r271269 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 09:30:10 +0200 oj r271255 : use string buffer when possible 2009-04-24 11:56:01 +0200 oj r271207 : #i101268# remove end() call from loop 2009-04-23 14:24:03 +0200 oj r271171 : add dep 2009-04-23 13:25:25 +0200 oj r271164 : #i101268# add config entries for database drivers 2009-04-23 13:07:13 +0200 oj r271161 : #i101268# add config entries for database drivers 2009-04-23 13:06:33 +0200 oj r271160 : #i101268# add parent url pattern entry for driver node 2009-04-23 13:05:39 +0200 oj r271159 : #i101268# add config entry for driver node 2009-04-23 13:04:09 +0200 oj r271157 : #i101268# add config entry for driver node 2009-04-23 06:41:32 +0200 oj r271142 : #i101268# add new configuration file Drivers 2009-04-22 13:49:19 +0200 oj r271103 : convert EOL 2009-04-22 13:29:17 +0200 oj r271101 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:28:08 +0200 oj r271100 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:15:26 +0200 oj r271098 : #i101268# add new configuration file Drivers 2009-04-22 13:14:43 +0200 oj r271097 : #i101268# use of driver configuration entries for features and properties
2009-07-03 12:24:35 +00:00
OTableWindowMapIterator aEnd = m_aTableMap.end();
for(;aIter != aEnd;++aIter)
2001-02-05 08:26:47 +00:00
{
pOtherTabWin = aIter->second;
Rectangle aOtherTabWinRect( pOtherTabWin->GetPosPixel(), pOtherTabWin->GetSizePixel() );
if(
( (aOtherTabWinRect.Top()>aRowRect.Top()) && (aOtherTabWinRect.Top()<aRowRect.Bottom()) ) ||
( (aOtherTabWinRect.Bottom()>aRowRect.Top()) && (aOtherTabWinRect.Bottom()<aRowRect.Bottom()) )
)
{
//////////////////////////////////////////////////////////////////
// TabWin liegt in der Zeile
if( aOtherTabWinRect.Right()>aNewPos.X() )
aNewPos.X() = aOtherTabWinRect.Right() + TABWIN_SPACING_X;
}
}
//////////////////////////////////////////////////////////////////
// Ist in dieser Zeile noch Platz?
if( (aNewPos.X()+TABWIN_WIDTH_STD)<aRowRect.Right() )
{
aNewPos.Y() = aRowRect.Top() + TABWIN_SPACING_Y;
bEnd = sal_True;
2001-02-05 08:26:47 +00:00
}
else
{
if( (aRowRect.Bottom()+aRowRect.GetHeight()) > aOutSize.Height() )
{
// insert it in the first row
sal_Int32 nCount = m_aTableMap.size() % (nRow+1);
++nCount;
aNewPos.Y() = nCount * TABWIN_SPACING_Y + (nCount-1)*CalcZoom(TABWIN_HEIGHT_STD);
bEnd = sal_True;
2001-02-05 08:26:47 +00:00
}
else
nRow++;
}
}
//////////////////////////////////////////////////////////////////
// Groesse bestimmen
Size aNewSize( CalcZoom(TABWIN_WIDTH_STD), CalcZoom(TABWIN_HEIGHT_STD) );
// check if the new position in inside the scrollbars ranges
Point aBottom(aNewPos);
aBottom.X() += aNewSize.Width();
aBottom.Y() += aNewSize.Height();
if(!GetHScrollBar()->GetRange().IsInside(aBottom.X()))
GetHScrollBar()->SetRange( Range(0, aBottom.X()) );
if(!GetVScrollBar()->GetRange().IsInside(aBottom.Y()))
GetVScrollBar()->SetRange( Range(0, aBottom.Y()) );
pTabWin->SetPosSizePixel( aNewPos, aNewSize );
}
//------------------------------------------------------------------------------
void OJoinTableView::DataChanged(const DataChangedEvent& rDCEvt)
{
DBG_CHKTHIS(OJoinTableView,NULL);
if (rDCEvt.GetType() == DATACHANGED_SETTINGS)
{
// nehmen wir den worst-case an : die Farben haben sich geaendert, also
// mich anpassen
InitColors();
Invalidate(INVALIDATE_NOCHILDREN);
// durch das Invalidate werden auch die Connections neu gezeichnet, so dass die auch
// gleich in den neuen Farben dargestellt werden
}
}
//------------------------------------------------------------------------------
void OJoinTableView::InitColors()
{
DBG_CHKTHIS(OJoinTableView,NULL);
// die Farben fuer die Darstellung sollten die Systemfarben sein
StyleSettings aSystemStyle = Application::GetSettings().GetStyleSettings();
SetBackground(Wallpaper(Color(aSystemStyle.GetDialogColor())));
2001-02-05 08:26:47 +00:00
}
//------------------------------------------------------------------------------
void OJoinTableView::BeginChildMove( OTableWindow* pTabWin, const Point& rMousePos )
{
DBG_CHKTHIS(OJoinTableView,NULL);
if (m_pView->getController().isReadOnly())
2001-02-05 08:26:47 +00:00
return;
m_pDragWin = pTabWin;
SetPointer(Pointer(POINTER_MOVE));
Point aMousePos = ScreenToOutputPixel( rMousePos );
m_aDragOffset = aMousePos - pTabWin->GetPosPixel();
2001-02-05 08:26:47 +00:00
m_pDragWin->SetZOrder(NULL, WINDOW_ZORDER_FIRST);
m_bTrackingInitiallyMoved = sal_False;
2001-02-05 08:26:47 +00:00
StartTracking();
}
void OJoinTableView::NotifyTitleClicked( OTableWindow* pTabWin, const Point rMousePos )
{
DBG_CHKTHIS(OJoinTableView,NULL);
DeselectConn(GetSelectedConn());
BeginChildMove(pTabWin, rMousePos);
}
//------------------------------------------------------------------------------
void OJoinTableView::BeginChildSizing( OTableWindow* pTabWin, const Pointer& rPointer )
{
DBG_CHKTHIS(OJoinTableView,NULL);
if (m_pView->getController().isReadOnly())
2001-02-05 08:26:47 +00:00
return;
SetPointer( rPointer );
m_pSizingWin = pTabWin;
StartTracking();
}
//------------------------------------------------------------------------------
sal_Bool OJoinTableView::ScrollPane( long nDelta, sal_Bool bHoriz, sal_Bool bPaintScrollBars )
2001-02-05 08:26:47 +00:00
{
DBG_CHKTHIS(OJoinTableView,NULL);
sal_Bool bRet = sal_True;
2001-02-05 08:26:47 +00:00
//////////////////////////////////////////////////////////////////////
// ScrollBar-Positionen anpassen
if( bPaintScrollBars )
{
if( bHoriz )
{
long nOldThumbPos = GetHScrollBar()->GetThumbPos();
long nNewThumbPos = nOldThumbPos + nDelta;
if( nNewThumbPos < 0 )
{
nNewThumbPos = 0;
bRet = sal_False;
2001-02-05 08:26:47 +00:00
}
if( nNewThumbPos > GetHScrollBar()->GetRange().Max() )
{
nNewThumbPos = GetHScrollBar()->GetRange().Max();
bRet = sal_False;
2001-02-05 08:26:47 +00:00
}
GetHScrollBar()->SetThumbPos( nNewThumbPos );
nDelta = GetHScrollBar()->GetThumbPos() - nOldThumbPos;
}
else
{
long nOldThumbPos = GetVScrollBar()->GetThumbPos();
long nNewThumbPos = nOldThumbPos+nDelta;
if( nNewThumbPos < 0 )
{
nNewThumbPos = 0;
bRet = sal_False;
2001-02-05 08:26:47 +00:00
}
if( nNewThumbPos > GetVScrollBar()->GetRange().Max() )
{
nNewThumbPos = GetVScrollBar()->GetRange().Max();
bRet = sal_False;
2001-02-05 08:26:47 +00:00
}
GetVScrollBar()->SetThumbPos( nNewThumbPos );
nDelta = GetVScrollBar()->GetThumbPos() - nOldThumbPos;
}
}
//////////////////////////////////////////////////////////////////////
// Wenn ScrollOffset bereits an den Grenzen liegt, kein Neuzeichnen
if( (GetHScrollBar()->GetThumbPos()==m_aScrollOffset.X()) &&
(GetVScrollBar()->GetThumbPos()==m_aScrollOffset.Y()) )
return sal_False;
2001-02-05 08:26:47 +00:00
//////////////////////////////////////////////////////////////////////
// ScrollOffset neu setzen
if (bHoriz)
m_aScrollOffset.X() = GetHScrollBar()->GetThumbPos();
else
m_aScrollOffset.Y() = GetVScrollBar()->GetThumbPos();
//////////////////////////////////////////////////////////////////////
// Alle Fenster verschieben
OTableWindow* pTabWin;
Point aPos;
OTableWindowMapIterator aIter = m_aTableMap.begin();
CWS-TOOLING: integrate CWS dbaperf2 2009-06-22 11:04:36 +0200 msc r273202 : #100000# fix to run this test 2009-06-22 09:41:04 +0200 msc r273200 : #100000# correct case 2009-06-22 09:02:42 +0200 msc r273199 : new SRB 2009-06-22 08:53:26 +0200 msc r273198 : #100000 2009-06-15 12:36:32 +0200 oj r272976 : test 2009-06-12 14:23:23 +0200 msc r272918 : #101587# unused feature was removed 2009-06-12 06:45:17 +0200 oj r272903 : use GUI instead of OS 2009-06-11 09:12:30 +0200 oj r272845 : remove unused dep 2009-06-11 09:11:09 +0200 oj r272844 : ColumnAliasInOrderBy not supported 2009-06-11 08:27:00 +0200 oj r272843 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@272827 (milestone: DEV300:m50) 2009-06-10 15:30:17 +0200 msc r272822 : #100000 2009-06-10 15:27:40 +0200 msc r272820 : #102515# new function for the database type list 2009-06-10 15:26:09 +0200 msc r272818 : move file to dbaccess/tools/dbcreatetools.inc 2009-06-10 15:20:10 +0200 msc r272816 : #102515# new function for the database type list 2009-06-10 12:34:46 +0200 oj r272803 : #i101587# check extension 2009-06-10 11:53:45 +0200 oj r272800 : remove unused code 2009-06-09 09:57:25 +0200 oj r272752 : #i101587# EscapeDateTime moved into features section 2009-06-09 09:56:26 +0200 oj r272751 : enable finish 2009-06-08 11:50:37 +0200 oj r272726 : #i102588# move convert tzo saveDataSource 2009-06-05 11:54:20 +0200 jsk r272676 : #i102515# - NEW: Functions to retrieve Database names from API 2009-06-05 10:52:22 +0200 jsk r272671 : NEW: Functions to retrieve Database names from API 2009-06-05 09:36:54 +0200 oj r272666 : handle win and unx differently 2009-06-05 09:36:28 +0200 oj r272665 : handle win and unx differently 2009-06-04 13:41:56 +0200 oj r272625 : #i101268# make use of stringbuffer instead of oustring 2009-06-04 10:18:14 +0200 oj r272612 : add SAL_DLLPUBLIC_EXPORT 2009-05-28 10:56:33 +0200 oj r272381 : #i101587# create langpacks 2009-05-28 10:41:59 +0200 oj r272380 : #i101587# create langpacks 2009-05-28 10:29:30 +0200 oj r272379 : #i101587# create langpacks 2009-05-07 10:11:46 +0200 oj r271635 : fix compile warnings 2009-05-07 07:01:31 +0200 oj r271619 : change type from int32 to PathID 2009-05-07 06:53:19 +0200 oj r271618 : add all 2009-05-06 14:57:02 +0200 oj r271595 : add missing lib 2009-05-06 14:56:54 +0200 oj r271594 : no used anymore 2009-05-06 14:56:08 +0200 oj r271593 : no used anymore 2009-05-06 14:54:25 +0200 oj r271592 : no used anymore 2009-05-06 14:45:59 +0200 oj r271591 : add missing lib 2009-05-06 14:41:54 +0200 oj r271590 : change wnt 2009-05-06 14:22:21 +0200 oj r271589 : #i101587# use config for the drivers 2009-05-06 14:21:39 +0200 oj r271588 : #i101587# add new set for metadata and config data for driver 2009-05-06 14:19:36 +0200 oj r271587 : #i101587# handle metadata and props of driver 2009-05-06 10:11:11 +0200 oj r271570 : #i101587# correct wrong use of reference 2009-05-06 09:24:33 +0200 oj r271567 : #i101587# add new set for metadata 2009-05-06 08:52:06 +0200 oj r271563 : #i101587# add driver configuration 2009-05-06 08:51:04 +0200 oj r271562 : #i101587# add driver configuration 2009-05-04 10:24:41 +0200 oj r271442 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@271427 (milestone: DEV300:m47) 2009-04-28 07:06:22 +0200 oj r271303 : compile error 2009-04-27 14:12:48 +0200 oj r271270 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 14:12:27 +0200 oj r271269 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 09:30:10 +0200 oj r271255 : use string buffer when possible 2009-04-24 11:56:01 +0200 oj r271207 : #i101268# remove end() call from loop 2009-04-23 14:24:03 +0200 oj r271171 : add dep 2009-04-23 13:25:25 +0200 oj r271164 : #i101268# add config entries for database drivers 2009-04-23 13:07:13 +0200 oj r271161 : #i101268# add config entries for database drivers 2009-04-23 13:06:33 +0200 oj r271160 : #i101268# add parent url pattern entry for driver node 2009-04-23 13:05:39 +0200 oj r271159 : #i101268# add config entry for driver node 2009-04-23 13:04:09 +0200 oj r271157 : #i101268# add config entry for driver node 2009-04-23 06:41:32 +0200 oj r271142 : #i101268# add new configuration file Drivers 2009-04-22 13:49:19 +0200 oj r271103 : convert EOL 2009-04-22 13:29:17 +0200 oj r271101 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:28:08 +0200 oj r271100 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:15:26 +0200 oj r271098 : #i101268# add new configuration file Drivers 2009-04-22 13:14:43 +0200 oj r271097 : #i101268# use of driver configuration entries for features and properties
2009-07-03 12:24:35 +00:00
OTableWindowMapIterator aEnd = m_aTableMap.end();
for(;aIter != aEnd;++aIter)
2001-02-05 08:26:47 +00:00
{
pTabWin = aIter->second;
aPos = pTabWin->GetPosPixel();
if( bHoriz )
aPos.X() -= nDelta;
else aPos.Y() -= nDelta;
pTabWin->SetPosPixel( aPos );
}
Invalidate(); // INVALIDATE_NOCHILDREN
return bRet;
}
//------------------------------------------------------------------------------
void OJoinTableView::Tracking( const TrackingEvent& rTEvt )
{
DBG_CHKTHIS(OJoinTableView,NULL);
HideTracking();
if (rTEvt.IsTrackingEnded())
{
if( m_pDragWin )
{
if (m_aDragScrollTimer.IsActive())
m_aDragScrollTimer.Stop();
//////////////////////////////////////////////////////////////////////
// Position des Childs nach Verschieben anpassen
//////////////////////////////////////////////////////////////////////
// Fenster duerfen nicht aus Anzeigebereich herausbewegt werden
Point aDragWinPos = rTEvt.GetMouseEvent().GetPosPixel() - m_aDragOffset;
Size aDragWinSize = m_pDragWin->GetSizePixel();
if( aDragWinPos.X() < 0 )
aDragWinPos.X() = 0;
if( aDragWinPos.Y() < 0 )
aDragWinPos.Y() = 0;
if( (aDragWinPos.X() + aDragWinSize.Width()) > m_aOutputSize.Width() )
aDragWinPos.X() = m_aOutputSize.Width() - aDragWinSize.Width() - 1;
2001-02-05 08:26:47 +00:00
if( (aDragWinPos.Y() + aDragWinSize.Height()) > m_aOutputSize.Height() )
aDragWinPos.Y() = m_aOutputSize.Height() - aDragWinSize.Height() - 1;
2001-02-05 08:26:47 +00:00
if( aDragWinPos.X() < 0 )
aDragWinPos.X() = 0;
if( aDragWinPos.Y() < 0 )
aDragWinPos.Y() = 0;
// TODO : nicht das Fenster neu positionieren, wenn es uebersteht, sondern einfach meinen Bereich erweitern
//////////////////////////////////////////////////////////////////////
// Fenster positionieren
EndTracking();
m_pDragWin->SetZOrder(NULL, WINDOW_ZORDER_FIRST);
// erst mal testen, ob ich mich ueberhaupt bewegt habe
// (das verhindert das Setzen des modified-Flags, wenn sich eigentlich gar nichts getan hat)
TTableWindowData::value_type pData = m_pDragWin->GetData();
if ( ! (pData && pData->HasPosition() && (pData->GetPosition() == aDragWinPos)))
2001-02-05 08:26:47 +00:00
{
// die alten logischen Koordinaten
Point ptOldPos = m_pDragWin->GetPosPixel() + Point(GetHScrollBar()->GetThumbPos(), GetVScrollBar()->GetThumbPos());
// neu positionieren
m_pDragWin->SetPosPixel(aDragWinPos);
TabWinMoved(m_pDragWin, ptOldPos);
2001-02-05 08:26:47 +00:00
m_pDragWin->GrabFocus();
}
2001-02-05 08:26:47 +00:00
m_pDragWin = NULL;
SetPointer(Pointer(POINTER_ARROW));
}
// else we handle the resizing
else if( m_pSizingWin )
2001-02-05 08:26:47 +00:00
{
SetPointer( Pointer() );
EndTracking();
// die alten physikalischen Koordinaten
Size szOld = m_pSizingWin->GetSizePixel();
Point ptOld = m_pSizingWin->GetPosPixel();
Size aNewSize(CalcZoom(m_aSizingRect.GetSize().Width()),CalcZoom(m_aSizingRect.GetSize().Height()));
m_pSizingWin->SetPosSizePixel( m_aSizingRect.TopLeft(), aNewSize );
TabWinSized(m_pSizingWin, ptOld, szOld);
m_pSizingWin->Invalidate( m_aSizingRect );
m_pSizingWin = NULL;
}
}
else if (rTEvt.IsTrackingCanceled())
{
if (m_aDragScrollTimer.IsActive())
m_aDragScrollTimer.Stop();
EndTracking();
}
else
2001-02-05 08:26:47 +00:00
{
if( m_pDragWin )
{
m_ptPrevDraggingPos = rTEvt.GetMouseEvent().GetPosPixel();
// an Fenstergrenzen scrollen
ScrollWhileDragging();
}
if( m_pSizingWin )
{
Point aMousePos = rTEvt.GetMouseEvent().GetPosPixel();
2002-06-24 06:56:02 +00:00
m_aSizingRect = m_pSizingWin->getSizingRect(aMousePos,m_aOutputSize);
2001-02-05 08:26:47 +00:00
Update();
ShowTracking( m_aSizingRect, SHOWTRACK_SMALL | SHOWTRACK_WINDOW );
}
}
}
//------------------------------------------------------------------------------
void OJoinTableView::ConnDoubleClicked( OTableConnection* /*pConnection*/ )
2001-02-05 08:26:47 +00:00
{
DBG_CHKTHIS(OJoinTableView,NULL);
}
//------------------------------------------------------------------------------
void OJoinTableView::MouseButtonDown( const MouseEvent& rEvt )
{
DBG_CHKTHIS(OJoinTableView,NULL);
GrabFocus();
Window::MouseButtonDown(rEvt);
}
//------------------------------------------------------------------------------
void OJoinTableView::MouseButtonUp( const MouseEvent& rEvt )
{
DBG_CHKTHIS(OJoinTableView,NULL);
Window::MouseButtonUp(rEvt);
//////////////////////////////////////////////////////////////////////
// Wurde eine Connection ausgewaehlt?
2001-10-11 07:38:14 +00:00
if( !m_vTableConnection.empty() )
2001-02-05 08:26:47 +00:00
{
2001-10-11 07:38:14 +00:00
DeselectConn(GetSelectedConn());
::std::vector<OTableConnection*>::iterator aIter = m_vTableConnection.begin();
CWS-TOOLING: integrate CWS dbaperf2 2009-06-22 11:04:36 +0200 msc r273202 : #100000# fix to run this test 2009-06-22 09:41:04 +0200 msc r273200 : #100000# correct case 2009-06-22 09:02:42 +0200 msc r273199 : new SRB 2009-06-22 08:53:26 +0200 msc r273198 : #100000 2009-06-15 12:36:32 +0200 oj r272976 : test 2009-06-12 14:23:23 +0200 msc r272918 : #101587# unused feature was removed 2009-06-12 06:45:17 +0200 oj r272903 : use GUI instead of OS 2009-06-11 09:12:30 +0200 oj r272845 : remove unused dep 2009-06-11 09:11:09 +0200 oj r272844 : ColumnAliasInOrderBy not supported 2009-06-11 08:27:00 +0200 oj r272843 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@272827 (milestone: DEV300:m50) 2009-06-10 15:30:17 +0200 msc r272822 : #100000 2009-06-10 15:27:40 +0200 msc r272820 : #102515# new function for the database type list 2009-06-10 15:26:09 +0200 msc r272818 : move file to dbaccess/tools/dbcreatetools.inc 2009-06-10 15:20:10 +0200 msc r272816 : #102515# new function for the database type list 2009-06-10 12:34:46 +0200 oj r272803 : #i101587# check extension 2009-06-10 11:53:45 +0200 oj r272800 : remove unused code 2009-06-09 09:57:25 +0200 oj r272752 : #i101587# EscapeDateTime moved into features section 2009-06-09 09:56:26 +0200 oj r272751 : enable finish 2009-06-08 11:50:37 +0200 oj r272726 : #i102588# move convert tzo saveDataSource 2009-06-05 11:54:20 +0200 jsk r272676 : #i102515# - NEW: Functions to retrieve Database names from API 2009-06-05 10:52:22 +0200 jsk r272671 : NEW: Functions to retrieve Database names from API 2009-06-05 09:36:54 +0200 oj r272666 : handle win and unx differently 2009-06-05 09:36:28 +0200 oj r272665 : handle win and unx differently 2009-06-04 13:41:56 +0200 oj r272625 : #i101268# make use of stringbuffer instead of oustring 2009-06-04 10:18:14 +0200 oj r272612 : add SAL_DLLPUBLIC_EXPORT 2009-05-28 10:56:33 +0200 oj r272381 : #i101587# create langpacks 2009-05-28 10:41:59 +0200 oj r272380 : #i101587# create langpacks 2009-05-28 10:29:30 +0200 oj r272379 : #i101587# create langpacks 2009-05-07 10:11:46 +0200 oj r271635 : fix compile warnings 2009-05-07 07:01:31 +0200 oj r271619 : change type from int32 to PathID 2009-05-07 06:53:19 +0200 oj r271618 : add all 2009-05-06 14:57:02 +0200 oj r271595 : add missing lib 2009-05-06 14:56:54 +0200 oj r271594 : no used anymore 2009-05-06 14:56:08 +0200 oj r271593 : no used anymore 2009-05-06 14:54:25 +0200 oj r271592 : no used anymore 2009-05-06 14:45:59 +0200 oj r271591 : add missing lib 2009-05-06 14:41:54 +0200 oj r271590 : change wnt 2009-05-06 14:22:21 +0200 oj r271589 : #i101587# use config for the drivers 2009-05-06 14:21:39 +0200 oj r271588 : #i101587# add new set for metadata and config data for driver 2009-05-06 14:19:36 +0200 oj r271587 : #i101587# handle metadata and props of driver 2009-05-06 10:11:11 +0200 oj r271570 : #i101587# correct wrong use of reference 2009-05-06 09:24:33 +0200 oj r271567 : #i101587# add new set for metadata 2009-05-06 08:52:06 +0200 oj r271563 : #i101587# add driver configuration 2009-05-06 08:51:04 +0200 oj r271562 : #i101587# add driver configuration 2009-05-04 10:24:41 +0200 oj r271442 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@271427 (milestone: DEV300:m47) 2009-04-28 07:06:22 +0200 oj r271303 : compile error 2009-04-27 14:12:48 +0200 oj r271270 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 14:12:27 +0200 oj r271269 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 09:30:10 +0200 oj r271255 : use string buffer when possible 2009-04-24 11:56:01 +0200 oj r271207 : #i101268# remove end() call from loop 2009-04-23 14:24:03 +0200 oj r271171 : add dep 2009-04-23 13:25:25 +0200 oj r271164 : #i101268# add config entries for database drivers 2009-04-23 13:07:13 +0200 oj r271161 : #i101268# add config entries for database drivers 2009-04-23 13:06:33 +0200 oj r271160 : #i101268# add parent url pattern entry for driver node 2009-04-23 13:05:39 +0200 oj r271159 : #i101268# add config entry for driver node 2009-04-23 13:04:09 +0200 oj r271157 : #i101268# add config entry for driver node 2009-04-23 06:41:32 +0200 oj r271142 : #i101268# add new configuration file Drivers 2009-04-22 13:49:19 +0200 oj r271103 : convert EOL 2009-04-22 13:29:17 +0200 oj r271101 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:28:08 +0200 oj r271100 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:15:26 +0200 oj r271098 : #i101268# add new configuration file Drivers 2009-04-22 13:14:43 +0200 oj r271097 : #i101268# use of driver configuration entries for features and properties
2009-07-03 12:24:35 +00:00
::std::vector<OTableConnection*>::iterator aEnd = m_vTableConnection.end();
for(;aIter != aEnd;++aIter)
2001-02-05 08:26:47 +00:00
{
2001-10-11 07:38:14 +00:00
if( (*aIter)->CheckHit(rEvt.GetPosPixel()) )
{
SelectConn((*aIter));
2001-02-05 08:26:47 +00:00
2001-10-11 07:38:14 +00:00
// Doppelclick
if( rEvt.GetClicks() == 2 )
ConnDoubleClicked( (*aIter) );
2001-02-05 08:26:47 +00:00
2001-10-11 07:38:14 +00:00
break;
}
2001-02-05 08:26:47 +00:00
}
}
}
//------------------------------------------------------------------------------
void OJoinTableView::KeyInput( const KeyEvent& rEvt )
{
DBG_CHKTHIS(OJoinTableView,NULL);
sal_uInt16 nCode = rEvt.GetKeyCode().GetCode();
sal_Bool bShift = rEvt.GetKeyCode().IsShift();
sal_Bool bCtrl = rEvt.GetKeyCode().IsMod1();
2001-02-05 08:26:47 +00:00
if( !bCtrl && !bShift && (nCode==KEY_DELETE) )
{
if (GetSelectedConn())
2002-02-08 08:10:00 +00:00
RemoveConnection( GetSelectedConn() ,sal_True);
2001-02-05 08:26:47 +00:00
}
else
Window::KeyInput( rEvt );
}
//------------------------------------------------------------------------------
void OJoinTableView::DeselectConn(OTableConnection* pConn)
{
DBG_CHKTHIS(OJoinTableView,NULL);
if (!pConn || !pConn->IsSelected())
return;
// die zugehoerigen Eitnraege in der ListBox des Tabellenfenster deselektieren
OTableWindow* pWin = pConn->GetSourceWin();
if (pWin && pWin->GetListBox())
pWin->GetListBox()->SelectAll(sal_False);
2001-02-05 08:26:47 +00:00
pWin = pConn->GetDestWin();
if (pWin && pWin->GetListBox())
pWin->GetListBox()->SelectAll(sal_False);
2001-02-05 08:26:47 +00:00
pConn->Deselect();
m_pSelectedConn = NULL;
}
//------------------------------------------------------------------------------
void OJoinTableView::SelectConn(OTableConnection* pConn)
{
DBG_CHKTHIS(OJoinTableView,NULL);
DeselectConn(GetSelectedConn());
pConn->Select();
m_pSelectedConn = pConn;
GrabFocus(); // has to be called here because a table window may still be focused
2001-02-05 08:26:47 +00:00
// die betroffenene Eintraege in den Windows selektieren
OTableWindow* pConnSource = pConn->GetSourceWin();
OTableWindow* pConnDest = pConn->GetDestWin();
if (pConnSource && pConnDest)
{
OTableWindowListBox* pSourceBox = pConnSource->GetListBox();
OTableWindowListBox* pDestBox = pConnDest->GetListBox();
if (pSourceBox && pDestBox)
{
pSourceBox->SelectAll(sal_False);
pDestBox->SelectAll(sal_False);
2001-02-05 08:26:47 +00:00
SvLBoxEntry* pFirstSourceVisible = pSourceBox->GetFirstEntryInView();
SvLBoxEntry* pFirstDestVisible = pDestBox->GetFirstEntryInView();
const ::std::vector<OConnectionLine*>* pLines = pConn->GetConnLineList();
::std::vector<OConnectionLine*>::const_reverse_iterator aIter = pLines->rbegin();
for(;aIter != pLines->rend();++aIter)
{
if ((*aIter)->IsValid())
{
SvLBoxEntry* pSourceEntry = pSourceBox->GetEntryFromText((*aIter)->GetData()->GetSourceFieldName());
if (pSourceEntry)
{
pSourceBox->Select(pSourceEntry, sal_True);
2001-02-05 08:26:47 +00:00
pSourceBox->MakeVisible(pSourceEntry);
}
SvLBoxEntry* pDestEntry = pDestBox->GetEntryFromText((*aIter)->GetData()->GetDestFieldName());
if (pDestEntry)
{
pDestBox->Select(pDestEntry, sal_True);
2001-02-05 08:26:47 +00:00
pDestBox->MakeVisible(pDestEntry);
}
2001-11-09 07:30:00 +00:00
2001-02-05 08:26:47 +00:00
}
}
if ((pFirstSourceVisible != pSourceBox->GetFirstEntryInView())
|| (pFirstDestVisible != pDestBox->GetFirstEntryInView()))
// es wurde gescrollt -> neu zeichnen
Invalidate(INVALIDATE_NOCHILDREN);
}
}
}
//------------------------------------------------------------------------------
void OJoinTableView::Paint( const Rectangle& rRect )
{
DBG_CHKTHIS(OJoinTableView,NULL);
DrawConnections( rRect );
}
//------------------------------------------------------------------------------
void OJoinTableView::InvalidateConnections()
{
DBG_CHKTHIS(OJoinTableView,NULL);
//////////////////////////////////////////////////////////////////////
// Die Joins zeichnen
::std::for_each(m_vTableConnection.begin(),m_vTableConnection.end(),
::std::mem_fun(& OTableConnection::InvalidateConnection));
2001-02-05 08:26:47 +00:00
}
//------------------------------------------------------------------------------
void OJoinTableView::DrawConnections( const Rectangle& rRect )
{
DBG_CHKTHIS(OJoinTableView,NULL);
//////////////////////////////////////////////////////////////////////
// Die Joins zeichnen
CWS-TOOLING: integrate CWS dbaperf2 2009-06-22 11:04:36 +0200 msc r273202 : #100000# fix to run this test 2009-06-22 09:41:04 +0200 msc r273200 : #100000# correct case 2009-06-22 09:02:42 +0200 msc r273199 : new SRB 2009-06-22 08:53:26 +0200 msc r273198 : #100000 2009-06-15 12:36:32 +0200 oj r272976 : test 2009-06-12 14:23:23 +0200 msc r272918 : #101587# unused feature was removed 2009-06-12 06:45:17 +0200 oj r272903 : use GUI instead of OS 2009-06-11 09:12:30 +0200 oj r272845 : remove unused dep 2009-06-11 09:11:09 +0200 oj r272844 : ColumnAliasInOrderBy not supported 2009-06-11 08:27:00 +0200 oj r272843 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@272827 (milestone: DEV300:m50) 2009-06-10 15:30:17 +0200 msc r272822 : #100000 2009-06-10 15:27:40 +0200 msc r272820 : #102515# new function for the database type list 2009-06-10 15:26:09 +0200 msc r272818 : move file to dbaccess/tools/dbcreatetools.inc 2009-06-10 15:20:10 +0200 msc r272816 : #102515# new function for the database type list 2009-06-10 12:34:46 +0200 oj r272803 : #i101587# check extension 2009-06-10 11:53:45 +0200 oj r272800 : remove unused code 2009-06-09 09:57:25 +0200 oj r272752 : #i101587# EscapeDateTime moved into features section 2009-06-09 09:56:26 +0200 oj r272751 : enable finish 2009-06-08 11:50:37 +0200 oj r272726 : #i102588# move convert tzo saveDataSource 2009-06-05 11:54:20 +0200 jsk r272676 : #i102515# - NEW: Functions to retrieve Database names from API 2009-06-05 10:52:22 +0200 jsk r272671 : NEW: Functions to retrieve Database names from API 2009-06-05 09:36:54 +0200 oj r272666 : handle win and unx differently 2009-06-05 09:36:28 +0200 oj r272665 : handle win and unx differently 2009-06-04 13:41:56 +0200 oj r272625 : #i101268# make use of stringbuffer instead of oustring 2009-06-04 10:18:14 +0200 oj r272612 : add SAL_DLLPUBLIC_EXPORT 2009-05-28 10:56:33 +0200 oj r272381 : #i101587# create langpacks 2009-05-28 10:41:59 +0200 oj r272380 : #i101587# create langpacks 2009-05-28 10:29:30 +0200 oj r272379 : #i101587# create langpacks 2009-05-07 10:11:46 +0200 oj r271635 : fix compile warnings 2009-05-07 07:01:31 +0200 oj r271619 : change type from int32 to PathID 2009-05-07 06:53:19 +0200 oj r271618 : add all 2009-05-06 14:57:02 +0200 oj r271595 : add missing lib 2009-05-06 14:56:54 +0200 oj r271594 : no used anymore 2009-05-06 14:56:08 +0200 oj r271593 : no used anymore 2009-05-06 14:54:25 +0200 oj r271592 : no used anymore 2009-05-06 14:45:59 +0200 oj r271591 : add missing lib 2009-05-06 14:41:54 +0200 oj r271590 : change wnt 2009-05-06 14:22:21 +0200 oj r271589 : #i101587# use config for the drivers 2009-05-06 14:21:39 +0200 oj r271588 : #i101587# add new set for metadata and config data for driver 2009-05-06 14:19:36 +0200 oj r271587 : #i101587# handle metadata and props of driver 2009-05-06 10:11:11 +0200 oj r271570 : #i101587# correct wrong use of reference 2009-05-06 09:24:33 +0200 oj r271567 : #i101587# add new set for metadata 2009-05-06 08:52:06 +0200 oj r271563 : #i101587# add driver configuration 2009-05-06 08:51:04 +0200 oj r271562 : #i101587# add driver configuration 2009-05-04 10:24:41 +0200 oj r271442 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@271427 (milestone: DEV300:m47) 2009-04-28 07:06:22 +0200 oj r271303 : compile error 2009-04-27 14:12:48 +0200 oj r271270 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 14:12:27 +0200 oj r271269 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 09:30:10 +0200 oj r271255 : use string buffer when possible 2009-04-24 11:56:01 +0200 oj r271207 : #i101268# remove end() call from loop 2009-04-23 14:24:03 +0200 oj r271171 : add dep 2009-04-23 13:25:25 +0200 oj r271164 : #i101268# add config entries for database drivers 2009-04-23 13:07:13 +0200 oj r271161 : #i101268# add config entries for database drivers 2009-04-23 13:06:33 +0200 oj r271160 : #i101268# add parent url pattern entry for driver node 2009-04-23 13:05:39 +0200 oj r271159 : #i101268# add config entry for driver node 2009-04-23 13:04:09 +0200 oj r271157 : #i101268# add config entry for driver node 2009-04-23 06:41:32 +0200 oj r271142 : #i101268# add new configuration file Drivers 2009-04-22 13:49:19 +0200 oj r271103 : convert EOL 2009-04-22 13:29:17 +0200 oj r271101 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:28:08 +0200 oj r271100 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:15:26 +0200 oj r271098 : #i101268# add new configuration file Drivers 2009-04-22 13:14:43 +0200 oj r271097 : #i101268# use of driver configuration entries for features and properties
2009-07-03 12:24:35 +00:00
::std::for_each(m_vTableConnection.begin(),m_vTableConnection.end(),boost::bind( &OTableConnection::Draw, _1, boost::cref( rRect )));
2001-02-05 08:26:47 +00:00
// zum Schluss noch mal die selektierte ueber alle anderen drueber
if (GetSelectedConn())
GetSelectedConn()->Draw( rRect );
}
//------------------------------------------------------------------------------
::std::vector<OTableConnection*>::const_iterator OJoinTableView::getTableConnections(const OTableWindow* _pFromWin) const
{
return ::std::find_if( m_vTableConnection.begin(),
m_vTableConnection.end(),
::std::bind2nd(::std::mem_fun(&OTableConnection::isTableConnection),_pFromWin));
}
// -----------------------------------------------------------------------------
sal_Int32 OJoinTableView::getConnectionCount(const OTableWindow* _pFromWin) const
{
return ::std::count_if( m_vTableConnection.begin(),
m_vTableConnection.end(),
::std::bind2nd(::std::mem_fun(&OTableConnection::isTableConnection),_pFromWin));
}
2001-02-05 08:26:47 +00:00
//------------------------------------------------------------------------------
sal_Bool OJoinTableView::ExistsAConn(const OTableWindow* pFrom) const
2001-02-05 08:26:47 +00:00
{
DBG_CHKTHIS(OJoinTableView,NULL);
return getTableConnections(pFrom) != m_vTableConnection.end();
2001-02-05 08:26:47 +00:00
}
//------------------------------------------------------------------------
void OJoinTableView::ClearAll()
{
DBG_CHKTHIS(OJoinTableView,NULL);
SetUpdateMode(sal_False);
2001-02-05 08:26:47 +00:00
2001-04-30 12:02:01 +00:00
HideTabWins();
2001-02-05 08:26:47 +00:00
// und das selbe mit den Connections
::std::vector<OTableConnection*>::iterator aIter = m_vTableConnection.begin();
CWS-TOOLING: integrate CWS dbaperf2 2009-06-22 11:04:36 +0200 msc r273202 : #100000# fix to run this test 2009-06-22 09:41:04 +0200 msc r273200 : #100000# correct case 2009-06-22 09:02:42 +0200 msc r273199 : new SRB 2009-06-22 08:53:26 +0200 msc r273198 : #100000 2009-06-15 12:36:32 +0200 oj r272976 : test 2009-06-12 14:23:23 +0200 msc r272918 : #101587# unused feature was removed 2009-06-12 06:45:17 +0200 oj r272903 : use GUI instead of OS 2009-06-11 09:12:30 +0200 oj r272845 : remove unused dep 2009-06-11 09:11:09 +0200 oj r272844 : ColumnAliasInOrderBy not supported 2009-06-11 08:27:00 +0200 oj r272843 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@272827 (milestone: DEV300:m50) 2009-06-10 15:30:17 +0200 msc r272822 : #100000 2009-06-10 15:27:40 +0200 msc r272820 : #102515# new function for the database type list 2009-06-10 15:26:09 +0200 msc r272818 : move file to dbaccess/tools/dbcreatetools.inc 2009-06-10 15:20:10 +0200 msc r272816 : #102515# new function for the database type list 2009-06-10 12:34:46 +0200 oj r272803 : #i101587# check extension 2009-06-10 11:53:45 +0200 oj r272800 : remove unused code 2009-06-09 09:57:25 +0200 oj r272752 : #i101587# EscapeDateTime moved into features section 2009-06-09 09:56:26 +0200 oj r272751 : enable finish 2009-06-08 11:50:37 +0200 oj r272726 : #i102588# move convert tzo saveDataSource 2009-06-05 11:54:20 +0200 jsk r272676 : #i102515# - NEW: Functions to retrieve Database names from API 2009-06-05 10:52:22 +0200 jsk r272671 : NEW: Functions to retrieve Database names from API 2009-06-05 09:36:54 +0200 oj r272666 : handle win and unx differently 2009-06-05 09:36:28 +0200 oj r272665 : handle win and unx differently 2009-06-04 13:41:56 +0200 oj r272625 : #i101268# make use of stringbuffer instead of oustring 2009-06-04 10:18:14 +0200 oj r272612 : add SAL_DLLPUBLIC_EXPORT 2009-05-28 10:56:33 +0200 oj r272381 : #i101587# create langpacks 2009-05-28 10:41:59 +0200 oj r272380 : #i101587# create langpacks 2009-05-28 10:29:30 +0200 oj r272379 : #i101587# create langpacks 2009-05-07 10:11:46 +0200 oj r271635 : fix compile warnings 2009-05-07 07:01:31 +0200 oj r271619 : change type from int32 to PathID 2009-05-07 06:53:19 +0200 oj r271618 : add all 2009-05-06 14:57:02 +0200 oj r271595 : add missing lib 2009-05-06 14:56:54 +0200 oj r271594 : no used anymore 2009-05-06 14:56:08 +0200 oj r271593 : no used anymore 2009-05-06 14:54:25 +0200 oj r271592 : no used anymore 2009-05-06 14:45:59 +0200 oj r271591 : add missing lib 2009-05-06 14:41:54 +0200 oj r271590 : change wnt 2009-05-06 14:22:21 +0200 oj r271589 : #i101587# use config for the drivers 2009-05-06 14:21:39 +0200 oj r271588 : #i101587# add new set for metadata and config data for driver 2009-05-06 14:19:36 +0200 oj r271587 : #i101587# handle metadata and props of driver 2009-05-06 10:11:11 +0200 oj r271570 : #i101587# correct wrong use of reference 2009-05-06 09:24:33 +0200 oj r271567 : #i101587# add new set for metadata 2009-05-06 08:52:06 +0200 oj r271563 : #i101587# add driver configuration 2009-05-06 08:51:04 +0200 oj r271562 : #i101587# add driver configuration 2009-05-04 10:24:41 +0200 oj r271442 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@271427 (milestone: DEV300:m47) 2009-04-28 07:06:22 +0200 oj r271303 : compile error 2009-04-27 14:12:48 +0200 oj r271270 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 14:12:27 +0200 oj r271269 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 09:30:10 +0200 oj r271255 : use string buffer when possible 2009-04-24 11:56:01 +0200 oj r271207 : #i101268# remove end() call from loop 2009-04-23 14:24:03 +0200 oj r271171 : add dep 2009-04-23 13:25:25 +0200 oj r271164 : #i101268# add config entries for database drivers 2009-04-23 13:07:13 +0200 oj r271161 : #i101268# add config entries for database drivers 2009-04-23 13:06:33 +0200 oj r271160 : #i101268# add parent url pattern entry for driver node 2009-04-23 13:05:39 +0200 oj r271159 : #i101268# add config entry for driver node 2009-04-23 13:04:09 +0200 oj r271157 : #i101268# add config entry for driver node 2009-04-23 06:41:32 +0200 oj r271142 : #i101268# add new configuration file Drivers 2009-04-22 13:49:19 +0200 oj r271103 : convert EOL 2009-04-22 13:29:17 +0200 oj r271101 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:28:08 +0200 oj r271100 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:15:26 +0200 oj r271098 : #i101268# add new configuration file Drivers 2009-04-22 13:14:43 +0200 oj r271097 : #i101268# use of driver configuration entries for features and properties
2009-07-03 12:24:35 +00:00
::std::vector<OTableConnection*>::iterator aEnd = m_vTableConnection.end();
for(;aIter != aEnd;++aIter)
2002-02-08 08:10:00 +00:00
RemoveConnection( *aIter ,sal_True);
2001-02-05 08:26:47 +00:00
m_vTableConnection.clear();
2001-04-30 12:02:01 +00:00
m_pLastFocusTabWin = NULL;
m_pSelectedConn = NULL;
2001-02-05 08:26:47 +00:00
// scroll to the upper left
ScrollPane(-GetScrollOffset().X(), sal_True, sal_True);
ScrollPane(-GetScrollOffset().Y(), sal_False, sal_True);
2001-04-30 12:02:01 +00:00
Invalidate();
2001-02-05 08:26:47 +00:00
}
//------------------------------------------------------------------------
sal_Bool OJoinTableView::ScrollWhileDragging()
2001-02-05 08:26:47 +00:00
{
DBG_CHKTHIS(OJoinTableView,NULL);
2011-02-03 00:33:36 +01:00
OSL_ENSURE(m_pDragWin != NULL, "OJoinTableView::ScrollWhileDragging darf nur waehrend Dragging eines Fensters aufgerufen werden !");
2001-02-05 08:26:47 +00:00
// den Timer schon mal killen
if (m_aDragScrollTimer.IsActive())
m_aDragScrollTimer.Stop();
Point aDragWinPos = m_ptPrevDraggingPos - m_aDragOffset;
Size aDragWinSize = m_pDragWin->GetSizePixel();
Point aLowerRight(aDragWinPos.X() + aDragWinSize.Width(), aDragWinPos.Y() + aDragWinSize.Height());
if (!m_bTrackingInitiallyMoved && (aDragWinPos == m_pDragWin->GetPosPixel()))
return sal_True;
2001-02-05 08:26:47 +00:00
// Darstellungsfehler vermeiden (wenn bei aktivem TrackingRect gescrollt wird)
HideTracking();
sal_Bool bScrolling = sal_False;
sal_Bool bNeedScrollTimer = sal_False;
2001-02-05 08:26:47 +00:00
// An Fenstergrenzen scrollen
// TODO : nur dann abfangen, wenn das Fenster komplett verschwinden wuerde (nicht, solange noch ein Pixel sichtbar ist)
if( aDragWinPos.X() < 5 )
{
bScrolling = ScrollPane( -LINE_SIZE, sal_True, sal_True );
2001-02-05 08:26:47 +00:00
if( !bScrolling && (aDragWinPos.X()<0) )
aDragWinPos.X() = 0;
// brauche ich weiteres (timergesteuertes) Scrolling ?
bNeedScrollTimer = bScrolling && (aDragWinPos.X() < 5);
}
if( aLowerRight.X() > m_aOutputSize.Width() - 5 )
{
bScrolling = ScrollPane( LINE_SIZE, sal_True, sal_True ) ;
2001-02-05 08:26:47 +00:00
if( !bScrolling && ( aLowerRight.X() > m_aOutputSize.Width() ) )
aDragWinPos.X() = m_aOutputSize.Width() - aDragWinSize.Width();
// brauche ich weiteres (timergesteuertes) Scrolling ?
bNeedScrollTimer = bScrolling && (aLowerRight.X() > m_aOutputSize.Width() - 5);
}
if( aDragWinPos.Y() < 5 )
{
bScrolling = ScrollPane( -LINE_SIZE, sal_False, sal_True );
2001-02-05 08:26:47 +00:00
if( !bScrolling && (aDragWinPos.Y()<0) )
aDragWinPos.Y() = 0;
bNeedScrollTimer = bScrolling && (aDragWinPos.Y() < 5);
}
if( aLowerRight.Y() > m_aOutputSize.Height() - 5 )
{
bScrolling = ScrollPane( LINE_SIZE, sal_False, sal_True );
2001-02-05 08:26:47 +00:00
if( !bScrolling && ( (aDragWinPos.Y() + aDragWinSize.Height()) > m_aOutputSize.Height() ) )
aDragWinPos.Y() = m_aOutputSize.Height() - aDragWinSize.Height();
bNeedScrollTimer = bScrolling && (aLowerRight.Y() > m_aOutputSize.Height() - 5);
}
// Timer neu setzen, wenn noch notwendig
if (bNeedScrollTimer)
{
m_aDragScrollTimer.SetTimeout(100);
m_aDragScrollTimer.Start();
}
// das DraggingRect neu zeichnen
m_aDragRect = Rectangle(m_ptPrevDraggingPos - m_aDragOffset, m_pDragWin->GetSizePixel());
Update();
ShowTracking( m_aDragRect, SHOWTRACK_SMALL | SHOWTRACK_WINDOW );
return bScrolling;
}
//------------------------------------------------------------------------
IMPL_LINK_NOARG(OJoinTableView, OnDragScrollTimer)
2001-02-05 08:26:47 +00:00
{
ScrollWhileDragging();
return 0L;
}
// -----------------------------------------------------------------------------
void OJoinTableView::invalidateAndModify(SfxUndoAction *_pAction)
{
Invalidate(INVALIDATE_NOCHILDREN);
m_pView->getController().addUndoActionAndInvalidate(_pAction);
}
2001-02-05 08:26:47 +00:00
//------------------------------------------------------------------------
void OJoinTableView::TabWinMoved(OTableWindow* ptWhich, const Point& ptOldPosition)
{
DBG_CHKTHIS(OJoinTableView,NULL);
Point ptThumbPos(GetHScrollBar()->GetThumbPos(), GetVScrollBar()->GetThumbPos());
ptWhich->GetData()->SetPosition(ptWhich->GetPosPixel() + ptThumbPos);
invalidateAndModify(new OJoinMoveTabWinUndoAct(this, ptOldPosition, ptWhich));
2001-02-05 08:26:47 +00:00
}
//------------------------------------------------------------------------
void OJoinTableView::TabWinSized(OTableWindow* ptWhich, const Point& ptOldPosition, const Size& szOldSize)
{
DBG_CHKTHIS(OJoinTableView,NULL);
ptWhich->GetData()->SetSize(ptWhich->GetSizePixel());
ptWhich->GetData()->SetPosition(ptWhich->GetPosPixel());
invalidateAndModify(new OJoinSizeTabWinUndoAct(this, ptOldPosition, szOldSize, ptWhich));
2001-02-05 08:26:47 +00:00
}
//------------------------------------------------------------------------------
sal_Bool OJoinTableView::IsAddAllowed()
2001-02-05 08:26:47 +00:00
{
DBG_CHKTHIS(OJoinTableView,NULL);
// nicht wenn Db readonly
if (m_pView->getController().isReadOnly())
return sal_False;
2001-02-05 08:26:47 +00:00
try
{
Reference< XConnection> xConnection = m_pView->getController().getConnection();
if(!xConnection.is())
return sal_False;
// nicht wenn schon zuviele Tabellen
Reference < XDatabaseMetaData > xMetaData( xConnection->getMetaData() );
sal_Int32 nMax = xMetaData.is() ? xMetaData->getMaxTablesInSelect() : 0;
if (nMax && nMax <= (sal_Int32)m_aTableMap.size())
return sal_False;
}
catch(SQLException&)
{
return sal_False;
}
2001-02-05 08:26:47 +00:00
return sal_True;
2001-02-05 08:26:47 +00:00
}
// -----------------------------------------------------------------------------
void OJoinTableView::executePopup(const Point& _aPos,OTableConnection* _pSelConnection)
{
PopupMenu aContextMenu( ModuleRes( RID_MENU_JOINVIEW_CONNECTION ) );
switch (aContextMenu.Execute(this, _aPos))
{
case SID_DELETE:
2002-02-08 08:10:00 +00:00
RemoveConnection( _pSelConnection ,sal_True);
break;
case ID_QUERY_EDIT_JOINCONNECTION:
2002-02-08 08:10:00 +00:00
ConnDoubleClicked( _pSelConnection ); // is the same as double clicked
break;
}
}
2001-02-05 08:26:47 +00:00
//------------------------------------------------------------------------------
void OJoinTableView::Command(const CommandEvent& rEvt)
{
DBG_CHKTHIS(OJoinTableView,NULL);
sal_Bool bHandled = sal_False;
2001-02-05 08:26:47 +00:00
switch (rEvt.GetCommand())
{
case COMMAND_CONTEXTMENU:
{
if( m_vTableConnection.empty() )
2001-02-05 08:26:47 +00:00
return;
OTableConnection* pSelConnection = GetSelectedConn();
// when it wasn't a mouse event use the selected connection
if (!rEvt.IsMouseEvent())
{
if( pSelConnection )
{
const ::std::vector<OConnectionLine*>* pLines = pSelConnection->GetConnLineList();
::std::vector<OConnectionLine*>::const_iterator aIter = ::std::find_if(pLines->begin(),pLines->end(),::std::mem_fun(&OConnectionLine::IsValid));
if( aIter != pLines->end() )
executePopup((*aIter)->getMidPoint(),pSelConnection);
}
}
else
2001-02-05 08:26:47 +00:00
{
DeselectConn(pSelConnection);
const Point& aMousePos = rEvt.GetMousePosPixel();
::std::vector<OTableConnection*>::iterator aIter = m_vTableConnection.begin();
CWS-TOOLING: integrate CWS dbaperf2 2009-06-22 11:04:36 +0200 msc r273202 : #100000# fix to run this test 2009-06-22 09:41:04 +0200 msc r273200 : #100000# correct case 2009-06-22 09:02:42 +0200 msc r273199 : new SRB 2009-06-22 08:53:26 +0200 msc r273198 : #100000 2009-06-15 12:36:32 +0200 oj r272976 : test 2009-06-12 14:23:23 +0200 msc r272918 : #101587# unused feature was removed 2009-06-12 06:45:17 +0200 oj r272903 : use GUI instead of OS 2009-06-11 09:12:30 +0200 oj r272845 : remove unused dep 2009-06-11 09:11:09 +0200 oj r272844 : ColumnAliasInOrderBy not supported 2009-06-11 08:27:00 +0200 oj r272843 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@272827 (milestone: DEV300:m50) 2009-06-10 15:30:17 +0200 msc r272822 : #100000 2009-06-10 15:27:40 +0200 msc r272820 : #102515# new function for the database type list 2009-06-10 15:26:09 +0200 msc r272818 : move file to dbaccess/tools/dbcreatetools.inc 2009-06-10 15:20:10 +0200 msc r272816 : #102515# new function for the database type list 2009-06-10 12:34:46 +0200 oj r272803 : #i101587# check extension 2009-06-10 11:53:45 +0200 oj r272800 : remove unused code 2009-06-09 09:57:25 +0200 oj r272752 : #i101587# EscapeDateTime moved into features section 2009-06-09 09:56:26 +0200 oj r272751 : enable finish 2009-06-08 11:50:37 +0200 oj r272726 : #i102588# move convert tzo saveDataSource 2009-06-05 11:54:20 +0200 jsk r272676 : #i102515# - NEW: Functions to retrieve Database names from API 2009-06-05 10:52:22 +0200 jsk r272671 : NEW: Functions to retrieve Database names from API 2009-06-05 09:36:54 +0200 oj r272666 : handle win and unx differently 2009-06-05 09:36:28 +0200 oj r272665 : handle win and unx differently 2009-06-04 13:41:56 +0200 oj r272625 : #i101268# make use of stringbuffer instead of oustring 2009-06-04 10:18:14 +0200 oj r272612 : add SAL_DLLPUBLIC_EXPORT 2009-05-28 10:56:33 +0200 oj r272381 : #i101587# create langpacks 2009-05-28 10:41:59 +0200 oj r272380 : #i101587# create langpacks 2009-05-28 10:29:30 +0200 oj r272379 : #i101587# create langpacks 2009-05-07 10:11:46 +0200 oj r271635 : fix compile warnings 2009-05-07 07:01:31 +0200 oj r271619 : change type from int32 to PathID 2009-05-07 06:53:19 +0200 oj r271618 : add all 2009-05-06 14:57:02 +0200 oj r271595 : add missing lib 2009-05-06 14:56:54 +0200 oj r271594 : no used anymore 2009-05-06 14:56:08 +0200 oj r271593 : no used anymore 2009-05-06 14:54:25 +0200 oj r271592 : no used anymore 2009-05-06 14:45:59 +0200 oj r271591 : add missing lib 2009-05-06 14:41:54 +0200 oj r271590 : change wnt 2009-05-06 14:22:21 +0200 oj r271589 : #i101587# use config for the drivers 2009-05-06 14:21:39 +0200 oj r271588 : #i101587# add new set for metadata and config data for driver 2009-05-06 14:19:36 +0200 oj r271587 : #i101587# handle metadata and props of driver 2009-05-06 10:11:11 +0200 oj r271570 : #i101587# correct wrong use of reference 2009-05-06 09:24:33 +0200 oj r271567 : #i101587# add new set for metadata 2009-05-06 08:52:06 +0200 oj r271563 : #i101587# add driver configuration 2009-05-06 08:51:04 +0200 oj r271562 : #i101587# add driver configuration 2009-05-04 10:24:41 +0200 oj r271442 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@271427 (milestone: DEV300:m47) 2009-04-28 07:06:22 +0200 oj r271303 : compile error 2009-04-27 14:12:48 +0200 oj r271270 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 14:12:27 +0200 oj r271269 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 09:30:10 +0200 oj r271255 : use string buffer when possible 2009-04-24 11:56:01 +0200 oj r271207 : #i101268# remove end() call from loop 2009-04-23 14:24:03 +0200 oj r271171 : add dep 2009-04-23 13:25:25 +0200 oj r271164 : #i101268# add config entries for database drivers 2009-04-23 13:07:13 +0200 oj r271161 : #i101268# add config entries for database drivers 2009-04-23 13:06:33 +0200 oj r271160 : #i101268# add parent url pattern entry for driver node 2009-04-23 13:05:39 +0200 oj r271159 : #i101268# add config entry for driver node 2009-04-23 13:04:09 +0200 oj r271157 : #i101268# add config entry for driver node 2009-04-23 06:41:32 +0200 oj r271142 : #i101268# add new configuration file Drivers 2009-04-22 13:49:19 +0200 oj r271103 : convert EOL 2009-04-22 13:29:17 +0200 oj r271101 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:28:08 +0200 oj r271100 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:15:26 +0200 oj r271098 : #i101268# add new configuration file Drivers 2009-04-22 13:14:43 +0200 oj r271097 : #i101268# use of driver configuration entries for features and properties
2009-07-03 12:24:35 +00:00
::std::vector<OTableConnection*>::iterator aEnd = m_vTableConnection.end();
for(;aIter != aEnd;++aIter)
2001-02-05 08:26:47 +00:00
{
if( (*aIter)->CheckHit(aMousePos) )
2001-02-05 08:26:47 +00:00
{
SelectConn(*aIter);
if(!getDesignView()->getController().isReadOnly() && getDesignView()->getController().isConnected())
executePopup(rEvt.GetMousePosPixel(),*aIter);
break;
2001-02-05 08:26:47 +00:00
}
}
}
bHandled = sal_True;
2001-02-05 08:26:47 +00:00
}
}
if (!bHandled)
Window::Command(rEvt);
}
//------------------------------------------------------------------------------
OTableConnection* OJoinTableView::GetTabConn(const OTableWindow* pLhs,const OTableWindow* pRhs,bool _bSupressCrossOrNaturalJoin,const OTableConnection* _rpFirstAfter) const
2001-02-05 08:26:47 +00:00
{
OTableConnection* pConn = NULL;
2011-02-03 00:33:36 +01:00
OSL_ENSURE(pRhs || pLhs, "OJoinTableView::GetTabConn : invalid args !");
2001-02-05 08:26:47 +00:00
// only one NULL-arg allowed
if ((!pLhs || pLhs->ExistsAConn()) && (!pRhs || pRhs->ExistsAConn()))
{
sal_Bool bFoundStart = _rpFirstAfter ? sal_False : sal_True;
2001-02-05 08:26:47 +00:00
::std::vector<OTableConnection*>::const_iterator aIter = m_vTableConnection.begin();
CWS-TOOLING: integrate CWS dbaperf2 2009-06-22 11:04:36 +0200 msc r273202 : #100000# fix to run this test 2009-06-22 09:41:04 +0200 msc r273200 : #100000# correct case 2009-06-22 09:02:42 +0200 msc r273199 : new SRB 2009-06-22 08:53:26 +0200 msc r273198 : #100000 2009-06-15 12:36:32 +0200 oj r272976 : test 2009-06-12 14:23:23 +0200 msc r272918 : #101587# unused feature was removed 2009-06-12 06:45:17 +0200 oj r272903 : use GUI instead of OS 2009-06-11 09:12:30 +0200 oj r272845 : remove unused dep 2009-06-11 09:11:09 +0200 oj r272844 : ColumnAliasInOrderBy not supported 2009-06-11 08:27:00 +0200 oj r272843 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@272827 (milestone: DEV300:m50) 2009-06-10 15:30:17 +0200 msc r272822 : #100000 2009-06-10 15:27:40 +0200 msc r272820 : #102515# new function for the database type list 2009-06-10 15:26:09 +0200 msc r272818 : move file to dbaccess/tools/dbcreatetools.inc 2009-06-10 15:20:10 +0200 msc r272816 : #102515# new function for the database type list 2009-06-10 12:34:46 +0200 oj r272803 : #i101587# check extension 2009-06-10 11:53:45 +0200 oj r272800 : remove unused code 2009-06-09 09:57:25 +0200 oj r272752 : #i101587# EscapeDateTime moved into features section 2009-06-09 09:56:26 +0200 oj r272751 : enable finish 2009-06-08 11:50:37 +0200 oj r272726 : #i102588# move convert tzo saveDataSource 2009-06-05 11:54:20 +0200 jsk r272676 : #i102515# - NEW: Functions to retrieve Database names from API 2009-06-05 10:52:22 +0200 jsk r272671 : NEW: Functions to retrieve Database names from API 2009-06-05 09:36:54 +0200 oj r272666 : handle win and unx differently 2009-06-05 09:36:28 +0200 oj r272665 : handle win and unx differently 2009-06-04 13:41:56 +0200 oj r272625 : #i101268# make use of stringbuffer instead of oustring 2009-06-04 10:18:14 +0200 oj r272612 : add SAL_DLLPUBLIC_EXPORT 2009-05-28 10:56:33 +0200 oj r272381 : #i101587# create langpacks 2009-05-28 10:41:59 +0200 oj r272380 : #i101587# create langpacks 2009-05-28 10:29:30 +0200 oj r272379 : #i101587# create langpacks 2009-05-07 10:11:46 +0200 oj r271635 : fix compile warnings 2009-05-07 07:01:31 +0200 oj r271619 : change type from int32 to PathID 2009-05-07 06:53:19 +0200 oj r271618 : add all 2009-05-06 14:57:02 +0200 oj r271595 : add missing lib 2009-05-06 14:56:54 +0200 oj r271594 : no used anymore 2009-05-06 14:56:08 +0200 oj r271593 : no used anymore 2009-05-06 14:54:25 +0200 oj r271592 : no used anymore 2009-05-06 14:45:59 +0200 oj r271591 : add missing lib 2009-05-06 14:41:54 +0200 oj r271590 : change wnt 2009-05-06 14:22:21 +0200 oj r271589 : #i101587# use config for the drivers 2009-05-06 14:21:39 +0200 oj r271588 : #i101587# add new set for metadata and config data for driver 2009-05-06 14:19:36 +0200 oj r271587 : #i101587# handle metadata and props of driver 2009-05-06 10:11:11 +0200 oj r271570 : #i101587# correct wrong use of reference 2009-05-06 09:24:33 +0200 oj r271567 : #i101587# add new set for metadata 2009-05-06 08:52:06 +0200 oj r271563 : #i101587# add driver configuration 2009-05-06 08:51:04 +0200 oj r271562 : #i101587# add driver configuration 2009-05-04 10:24:41 +0200 oj r271442 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@271427 (milestone: DEV300:m47) 2009-04-28 07:06:22 +0200 oj r271303 : compile error 2009-04-27 14:12:48 +0200 oj r271270 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 14:12:27 +0200 oj r271269 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 09:30:10 +0200 oj r271255 : use string buffer when possible 2009-04-24 11:56:01 +0200 oj r271207 : #i101268# remove end() call from loop 2009-04-23 14:24:03 +0200 oj r271171 : add dep 2009-04-23 13:25:25 +0200 oj r271164 : #i101268# add config entries for database drivers 2009-04-23 13:07:13 +0200 oj r271161 : #i101268# add config entries for database drivers 2009-04-23 13:06:33 +0200 oj r271160 : #i101268# add parent url pattern entry for driver node 2009-04-23 13:05:39 +0200 oj r271159 : #i101268# add config entry for driver node 2009-04-23 13:04:09 +0200 oj r271157 : #i101268# add config entry for driver node 2009-04-23 06:41:32 +0200 oj r271142 : #i101268# add new configuration file Drivers 2009-04-22 13:49:19 +0200 oj r271103 : convert EOL 2009-04-22 13:29:17 +0200 oj r271101 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:28:08 +0200 oj r271100 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:15:26 +0200 oj r271098 : #i101268# add new configuration file Drivers 2009-04-22 13:14:43 +0200 oj r271097 : #i101268# use of driver configuration entries for features and properties
2009-07-03 12:24:35 +00:00
::std::vector<OTableConnection*>::const_iterator aEnd = m_vTableConnection.end();
for(;aIter != aEnd;++aIter)
2001-02-05 08:26:47 +00:00
{
OTableConnection* pData = *aIter;
if ( ( (pData->GetSourceWin() == pLhs)
&& ( (pData->GetDestWin() == pRhs)
|| (NULL == pRhs)
)
)
|| ( (pData->GetSourceWin() == pRhs)
&& ( (pData->GetDestWin() == pLhs)
|| (NULL == pLhs)
)
)
)
{
if ( _bSupressCrossOrNaturalJoin )
{
if ( supressCrossNaturalJoin(pData->GetData()) )
continue;
}
2001-02-05 08:26:47 +00:00
if (bFoundStart)
{
pConn = pData;
break;
}
if (!pConn)
// used as fallback : if there is no conn after _rpFirstAfter the first conn between the two tables
// will be used
pConn = pData;
if (pData == _rpFirstAfter)
bFoundStart = sal_True;
2001-02-05 08:26:47 +00:00
}
}
}
return pConn;
}
//------------------------------------------------------------------------------
long OJoinTableView::PreNotify(NotifyEvent& rNEvt)
{
sal_Bool bHandled = sal_False;
2001-02-05 08:26:47 +00:00
switch (rNEvt.GetType())
{
case EVENT_COMMAND:
{
const CommandEvent* pCommand = rNEvt.GetCommandEvent();
if (pCommand->GetCommand() == COMMAND_WHEEL)
{
const CommandWheelData* pData = rNEvt.GetCommandEvent()->GetWheelData();
if (pData->GetMode() == COMMAND_WHEEL_SCROLL)
{
if (pData->GetDelta() > 0)
ScrollPane(-10 * pData->GetScrollLines(), pData->IsHorz(), sal_True);
2001-02-05 08:26:47 +00:00
else
ScrollPane(10 * pData->GetScrollLines(), pData->IsHorz(), sal_True);
bHandled = sal_True;
2001-02-05 08:26:47 +00:00
}
}
}
break;
case EVENT_KEYINPUT:
{
2001-10-26 06:57:11 +00:00
if (m_aTableMap.empty())
2001-02-05 08:26:47 +00:00
// no tab wins -> no conns -> no traveling
break;
const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent();
if (!pKeyEvent->GetKeyCode().IsMod1())
{
switch (pKeyEvent->GetKeyCode().GetCode())
{
case KEY_TAB:
{
if (!HasChildPathFocus())
break;
sal_Bool bForward = !pKeyEvent->GetKeyCode().IsShift();
2001-02-05 08:26:47 +00:00
// is there an active tab win ?
OTableWindowMapIterator aIter = m_aTableMap.begin();
CWS-TOOLING: integrate CWS dbaperf2 2009-06-22 11:04:36 +0200 msc r273202 : #100000# fix to run this test 2009-06-22 09:41:04 +0200 msc r273200 : #100000# correct case 2009-06-22 09:02:42 +0200 msc r273199 : new SRB 2009-06-22 08:53:26 +0200 msc r273198 : #100000 2009-06-15 12:36:32 +0200 oj r272976 : test 2009-06-12 14:23:23 +0200 msc r272918 : #101587# unused feature was removed 2009-06-12 06:45:17 +0200 oj r272903 : use GUI instead of OS 2009-06-11 09:12:30 +0200 oj r272845 : remove unused dep 2009-06-11 09:11:09 +0200 oj r272844 : ColumnAliasInOrderBy not supported 2009-06-11 08:27:00 +0200 oj r272843 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@272827 (milestone: DEV300:m50) 2009-06-10 15:30:17 +0200 msc r272822 : #100000 2009-06-10 15:27:40 +0200 msc r272820 : #102515# new function for the database type list 2009-06-10 15:26:09 +0200 msc r272818 : move file to dbaccess/tools/dbcreatetools.inc 2009-06-10 15:20:10 +0200 msc r272816 : #102515# new function for the database type list 2009-06-10 12:34:46 +0200 oj r272803 : #i101587# check extension 2009-06-10 11:53:45 +0200 oj r272800 : remove unused code 2009-06-09 09:57:25 +0200 oj r272752 : #i101587# EscapeDateTime moved into features section 2009-06-09 09:56:26 +0200 oj r272751 : enable finish 2009-06-08 11:50:37 +0200 oj r272726 : #i102588# move convert tzo saveDataSource 2009-06-05 11:54:20 +0200 jsk r272676 : #i102515# - NEW: Functions to retrieve Database names from API 2009-06-05 10:52:22 +0200 jsk r272671 : NEW: Functions to retrieve Database names from API 2009-06-05 09:36:54 +0200 oj r272666 : handle win and unx differently 2009-06-05 09:36:28 +0200 oj r272665 : handle win and unx differently 2009-06-04 13:41:56 +0200 oj r272625 : #i101268# make use of stringbuffer instead of oustring 2009-06-04 10:18:14 +0200 oj r272612 : add SAL_DLLPUBLIC_EXPORT 2009-05-28 10:56:33 +0200 oj r272381 : #i101587# create langpacks 2009-05-28 10:41:59 +0200 oj r272380 : #i101587# create langpacks 2009-05-28 10:29:30 +0200 oj r272379 : #i101587# create langpacks 2009-05-07 10:11:46 +0200 oj r271635 : fix compile warnings 2009-05-07 07:01:31 +0200 oj r271619 : change type from int32 to PathID 2009-05-07 06:53:19 +0200 oj r271618 : add all 2009-05-06 14:57:02 +0200 oj r271595 : add missing lib 2009-05-06 14:56:54 +0200 oj r271594 : no used anymore 2009-05-06 14:56:08 +0200 oj r271593 : no used anymore 2009-05-06 14:54:25 +0200 oj r271592 : no used anymore 2009-05-06 14:45:59 +0200 oj r271591 : add missing lib 2009-05-06 14:41:54 +0200 oj r271590 : change wnt 2009-05-06 14:22:21 +0200 oj r271589 : #i101587# use config for the drivers 2009-05-06 14:21:39 +0200 oj r271588 : #i101587# add new set for metadata and config data for driver 2009-05-06 14:19:36 +0200 oj r271587 : #i101587# handle metadata and props of driver 2009-05-06 10:11:11 +0200 oj r271570 : #i101587# correct wrong use of reference 2009-05-06 09:24:33 +0200 oj r271567 : #i101587# add new set for metadata 2009-05-06 08:52:06 +0200 oj r271563 : #i101587# add driver configuration 2009-05-06 08:51:04 +0200 oj r271562 : #i101587# add driver configuration 2009-05-04 10:24:41 +0200 oj r271442 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@271427 (milestone: DEV300:m47) 2009-04-28 07:06:22 +0200 oj r271303 : compile error 2009-04-27 14:12:48 +0200 oj r271270 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 14:12:27 +0200 oj r271269 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 09:30:10 +0200 oj r271255 : use string buffer when possible 2009-04-24 11:56:01 +0200 oj r271207 : #i101268# remove end() call from loop 2009-04-23 14:24:03 +0200 oj r271171 : add dep 2009-04-23 13:25:25 +0200 oj r271164 : #i101268# add config entries for database drivers 2009-04-23 13:07:13 +0200 oj r271161 : #i101268# add config entries for database drivers 2009-04-23 13:06:33 +0200 oj r271160 : #i101268# add parent url pattern entry for driver node 2009-04-23 13:05:39 +0200 oj r271159 : #i101268# add config entry for driver node 2009-04-23 13:04:09 +0200 oj r271157 : #i101268# add config entry for driver node 2009-04-23 06:41:32 +0200 oj r271142 : #i101268# add new configuration file Drivers 2009-04-22 13:49:19 +0200 oj r271103 : convert EOL 2009-04-22 13:29:17 +0200 oj r271101 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:28:08 +0200 oj r271100 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:15:26 +0200 oj r271098 : #i101268# add new configuration file Drivers 2009-04-22 13:14:43 +0200 oj r271097 : #i101268# use of driver configuration entries for features and properties
2009-07-03 12:24:35 +00:00
OTableWindowMapIterator aEnd = m_aTableMap.end();
for(;aIter != aEnd;++aIter)
2001-02-05 08:26:47 +00:00
if (aIter->second && aIter->second->HasChildPathFocus())
break;
OTableWindow* pNextWin = NULL;
OTableConnection* pNextConn = NULL;
if (aIter != m_aTableMap.end())
{ // there is a currently active tab win
// check if there is an "overflow" and we should select a conn instead of a win
if (!m_vTableConnection.empty())
2001-02-05 08:26:47 +00:00
{
if ((aIter->second == m_aTableMap.rbegin()->second) && bForward)
// the last win is active and we're travelling forward -> select the first conn
pNextConn = *m_vTableConnection.begin();
if ((aIter == m_aTableMap.begin()) && !bForward)
// the first win is active an we're traveling backward -> select the last conn
pNextConn = *m_vTableConnection.rbegin();
}
if (!pNextConn)
2001-10-26 06:57:11 +00:00
{
2001-02-05 08:26:47 +00:00
// no conn for any reason -> select the next or previous tab win
2001-10-26 06:57:11 +00:00
if(bForward)
{
if ( aIter->second == m_aTableMap.rbegin()->second )
2001-10-26 06:57:11 +00:00
pNextWin = m_aTableMap.begin()->second;
else
{
++aIter;
pNextWin = aIter->second;
}
}
else
{
if (aIter == m_aTableMap.begin())
pNextWin = m_aTableMap.rbegin()->second;
else
{
--aIter;
pNextWin = aIter->second;
}
}
}
2001-02-05 08:26:47 +00:00
}
else
{ // no active tab win -> travel the connections
// find the currently selected conn within the conn list
sal_Int32 i(0);
for ( ::std::vector<OTableConnection*>::iterator connectionIter = m_vTableConnection.begin();
connectionIter != m_vTableConnection.end();
++connectionIter, ++i
)
2001-02-05 08:26:47 +00:00
{
if ( (*connectionIter) == GetSelectedConn() )
2001-02-05 08:26:47 +00:00
break;
}
if (i == sal_Int32(m_vTableConnection.size() - 1) && bForward)
// the last conn is active and we're travelling forward -> select the first win
pNextWin = m_aTableMap.begin()->second;
if ((i == 0) && !bForward && !m_aTableMap.empty())
2001-02-05 08:26:47 +00:00
// the first conn is active and we're travelling backward -> select the last win
pNextWin = m_aTableMap.rbegin()->second;
if (pNextWin)
DeselectConn(GetSelectedConn());
else
// no win for any reason -> select the next or previous conn
if (i < (sal_Int32)m_vTableConnection.size())
// there is a currently active conn
pNextConn = m_vTableConnection[(i + (bForward ? 1 : m_vTableConnection.size() - 1)) % m_vTableConnection.size()];
else
{ // no tab win selected, no conn selected
if (!m_vTableConnection.empty())
2001-02-05 08:26:47 +00:00
pNextConn = m_vTableConnection[bForward ? 0 : m_vTableConnection.size() - 1];
else if (!m_aTableMap.empty())
2001-02-05 08:26:47 +00:00
{
if(bForward)
pNextWin = m_aTableMap.begin()->second;
else
pNextWin = m_aTableMap.rbegin()->second;
}
}
}
// now select the object
if (pNextWin)
{
if (pNextWin->GetListBox())
pNextWin->GetListBox()->GrabFocus();
else
pNextWin->GrabFocus();
EnsureVisible(pNextWin);
}
else if (pNextConn)
{
GrabFocus();
// neccessary : a conn may be selected even if a tab win has the focus, in this case
// the next travel would select the same conn again if we would not reset te focus ...
2001-10-26 06:57:11 +00:00
SelectConn(pNextConn);
2001-02-05 08:26:47 +00:00
}
}
break;
case KEY_RETURN:
{
if (!pKeyEvent->GetKeyCode().IsShift() && GetSelectedConn() && HasFocus())
ConnDoubleClicked(GetSelectedConn());
break;
}
}
}
}
break;
case EVENT_GETFOCUS:
{
if (m_aTableMap.empty())
// no tab wins -> no conns -> no focus change
break;
2001-02-05 08:26:47 +00:00
Window* pSource = rNEvt.GetWindow();
if (pSource)
{
Window* pSearchFor = NULL;
if (pSource->GetParent() == this)
// it may be one of the tab wins
pSearchFor = pSource;
2001-03-20 07:15:49 +00:00
else if (pSource->GetParent() && (pSource->GetParent()->GetParent() == this))
2001-02-05 08:26:47 +00:00
// it may be one of th list boxes of one of the tab wins
pSearchFor = pSource->GetParent();
if (pSearchFor)
{
OTableWindowMapIterator aIter = m_aTableMap.begin();
CWS-TOOLING: integrate CWS dbaperf2 2009-06-22 11:04:36 +0200 msc r273202 : #100000# fix to run this test 2009-06-22 09:41:04 +0200 msc r273200 : #100000# correct case 2009-06-22 09:02:42 +0200 msc r273199 : new SRB 2009-06-22 08:53:26 +0200 msc r273198 : #100000 2009-06-15 12:36:32 +0200 oj r272976 : test 2009-06-12 14:23:23 +0200 msc r272918 : #101587# unused feature was removed 2009-06-12 06:45:17 +0200 oj r272903 : use GUI instead of OS 2009-06-11 09:12:30 +0200 oj r272845 : remove unused dep 2009-06-11 09:11:09 +0200 oj r272844 : ColumnAliasInOrderBy not supported 2009-06-11 08:27:00 +0200 oj r272843 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@272827 (milestone: DEV300:m50) 2009-06-10 15:30:17 +0200 msc r272822 : #100000 2009-06-10 15:27:40 +0200 msc r272820 : #102515# new function for the database type list 2009-06-10 15:26:09 +0200 msc r272818 : move file to dbaccess/tools/dbcreatetools.inc 2009-06-10 15:20:10 +0200 msc r272816 : #102515# new function for the database type list 2009-06-10 12:34:46 +0200 oj r272803 : #i101587# check extension 2009-06-10 11:53:45 +0200 oj r272800 : remove unused code 2009-06-09 09:57:25 +0200 oj r272752 : #i101587# EscapeDateTime moved into features section 2009-06-09 09:56:26 +0200 oj r272751 : enable finish 2009-06-08 11:50:37 +0200 oj r272726 : #i102588# move convert tzo saveDataSource 2009-06-05 11:54:20 +0200 jsk r272676 : #i102515# - NEW: Functions to retrieve Database names from API 2009-06-05 10:52:22 +0200 jsk r272671 : NEW: Functions to retrieve Database names from API 2009-06-05 09:36:54 +0200 oj r272666 : handle win and unx differently 2009-06-05 09:36:28 +0200 oj r272665 : handle win and unx differently 2009-06-04 13:41:56 +0200 oj r272625 : #i101268# make use of stringbuffer instead of oustring 2009-06-04 10:18:14 +0200 oj r272612 : add SAL_DLLPUBLIC_EXPORT 2009-05-28 10:56:33 +0200 oj r272381 : #i101587# create langpacks 2009-05-28 10:41:59 +0200 oj r272380 : #i101587# create langpacks 2009-05-28 10:29:30 +0200 oj r272379 : #i101587# create langpacks 2009-05-07 10:11:46 +0200 oj r271635 : fix compile warnings 2009-05-07 07:01:31 +0200 oj r271619 : change type from int32 to PathID 2009-05-07 06:53:19 +0200 oj r271618 : add all 2009-05-06 14:57:02 +0200 oj r271595 : add missing lib 2009-05-06 14:56:54 +0200 oj r271594 : no used anymore 2009-05-06 14:56:08 +0200 oj r271593 : no used anymore 2009-05-06 14:54:25 +0200 oj r271592 : no used anymore 2009-05-06 14:45:59 +0200 oj r271591 : add missing lib 2009-05-06 14:41:54 +0200 oj r271590 : change wnt 2009-05-06 14:22:21 +0200 oj r271589 : #i101587# use config for the drivers 2009-05-06 14:21:39 +0200 oj r271588 : #i101587# add new set for metadata and config data for driver 2009-05-06 14:19:36 +0200 oj r271587 : #i101587# handle metadata and props of driver 2009-05-06 10:11:11 +0200 oj r271570 : #i101587# correct wrong use of reference 2009-05-06 09:24:33 +0200 oj r271567 : #i101587# add new set for metadata 2009-05-06 08:52:06 +0200 oj r271563 : #i101587# add driver configuration 2009-05-06 08:51:04 +0200 oj r271562 : #i101587# add driver configuration 2009-05-04 10:24:41 +0200 oj r271442 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@271427 (milestone: DEV300:m47) 2009-04-28 07:06:22 +0200 oj r271303 : compile error 2009-04-27 14:12:48 +0200 oj r271270 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 14:12:27 +0200 oj r271269 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 09:30:10 +0200 oj r271255 : use string buffer when possible 2009-04-24 11:56:01 +0200 oj r271207 : #i101268# remove end() call from loop 2009-04-23 14:24:03 +0200 oj r271171 : add dep 2009-04-23 13:25:25 +0200 oj r271164 : #i101268# add config entries for database drivers 2009-04-23 13:07:13 +0200 oj r271161 : #i101268# add config entries for database drivers 2009-04-23 13:06:33 +0200 oj r271160 : #i101268# add parent url pattern entry for driver node 2009-04-23 13:05:39 +0200 oj r271159 : #i101268# add config entry for driver node 2009-04-23 13:04:09 +0200 oj r271157 : #i101268# add config entry for driver node 2009-04-23 06:41:32 +0200 oj r271142 : #i101268# add new configuration file Drivers 2009-04-22 13:49:19 +0200 oj r271103 : convert EOL 2009-04-22 13:29:17 +0200 oj r271101 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:28:08 +0200 oj r271100 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:15:26 +0200 oj r271098 : #i101268# add new configuration file Drivers 2009-04-22 13:14:43 +0200 oj r271097 : #i101268# use of driver configuration entries for features and properties
2009-07-03 12:24:35 +00:00
OTableWindowMapIterator aEnd = m_aTableMap.end();
for(;aIter != aEnd;++aIter)
2001-02-05 08:26:47 +00:00
{
if (aIter->second == pSearchFor)
{
m_pLastFocusTabWin = aIter->second;
break;
}
}
}
}
}
break;
}
if (!bHandled)
return Window::PreNotify(rNEvt);
2001-03-20 07:15:49 +00:00
return 1L;
2001-02-05 08:26:47 +00:00
}
//------------------------------------------------------------------------------
void OJoinTableView::GrabTabWinFocus()
{
2001-03-20 07:15:49 +00:00
if (m_pLastFocusTabWin && m_pLastFocusTabWin->IsVisible())
2001-02-05 08:26:47 +00:00
{
if (m_pLastFocusTabWin->GetListBox())
m_pLastFocusTabWin->GetListBox()->GrabFocus();
else
m_pLastFocusTabWin->GrabFocus();
}
else if (!m_aTableMap.empty() && m_aTableMap.begin()->second && m_aTableMap.begin()->second->IsVisible())
2001-02-05 08:26:47 +00:00
{
OTableWindow* pFirstWin = m_aTableMap.begin()->second;
if (pFirstWin->GetListBox())
pFirstWin->GetListBox()->GrabFocus();
else
pFirstWin->GrabFocus();
}
}
// -----------------------------------------------------------------------------
void OJoinTableView::StateChanged( StateChangedType nType )
{
Window::StateChanged( nType );
if ( nType == STATE_CHANGE_ZOOM )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
Font aFont = rStyleSettings.GetGroupFont();
if ( IsControlFont() )
aFont.Merge( GetControlFont() );
SetZoomedPointFont( aFont );
OTableWindowMapIterator aIter = m_aTableMap.begin();
CWS-TOOLING: integrate CWS dbaperf2 2009-06-22 11:04:36 +0200 msc r273202 : #100000# fix to run this test 2009-06-22 09:41:04 +0200 msc r273200 : #100000# correct case 2009-06-22 09:02:42 +0200 msc r273199 : new SRB 2009-06-22 08:53:26 +0200 msc r273198 : #100000 2009-06-15 12:36:32 +0200 oj r272976 : test 2009-06-12 14:23:23 +0200 msc r272918 : #101587# unused feature was removed 2009-06-12 06:45:17 +0200 oj r272903 : use GUI instead of OS 2009-06-11 09:12:30 +0200 oj r272845 : remove unused dep 2009-06-11 09:11:09 +0200 oj r272844 : ColumnAliasInOrderBy not supported 2009-06-11 08:27:00 +0200 oj r272843 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@272827 (milestone: DEV300:m50) 2009-06-10 15:30:17 +0200 msc r272822 : #100000 2009-06-10 15:27:40 +0200 msc r272820 : #102515# new function for the database type list 2009-06-10 15:26:09 +0200 msc r272818 : move file to dbaccess/tools/dbcreatetools.inc 2009-06-10 15:20:10 +0200 msc r272816 : #102515# new function for the database type list 2009-06-10 12:34:46 +0200 oj r272803 : #i101587# check extension 2009-06-10 11:53:45 +0200 oj r272800 : remove unused code 2009-06-09 09:57:25 +0200 oj r272752 : #i101587# EscapeDateTime moved into features section 2009-06-09 09:56:26 +0200 oj r272751 : enable finish 2009-06-08 11:50:37 +0200 oj r272726 : #i102588# move convert tzo saveDataSource 2009-06-05 11:54:20 +0200 jsk r272676 : #i102515# - NEW: Functions to retrieve Database names from API 2009-06-05 10:52:22 +0200 jsk r272671 : NEW: Functions to retrieve Database names from API 2009-06-05 09:36:54 +0200 oj r272666 : handle win and unx differently 2009-06-05 09:36:28 +0200 oj r272665 : handle win and unx differently 2009-06-04 13:41:56 +0200 oj r272625 : #i101268# make use of stringbuffer instead of oustring 2009-06-04 10:18:14 +0200 oj r272612 : add SAL_DLLPUBLIC_EXPORT 2009-05-28 10:56:33 +0200 oj r272381 : #i101587# create langpacks 2009-05-28 10:41:59 +0200 oj r272380 : #i101587# create langpacks 2009-05-28 10:29:30 +0200 oj r272379 : #i101587# create langpacks 2009-05-07 10:11:46 +0200 oj r271635 : fix compile warnings 2009-05-07 07:01:31 +0200 oj r271619 : change type from int32 to PathID 2009-05-07 06:53:19 +0200 oj r271618 : add all 2009-05-06 14:57:02 +0200 oj r271595 : add missing lib 2009-05-06 14:56:54 +0200 oj r271594 : no used anymore 2009-05-06 14:56:08 +0200 oj r271593 : no used anymore 2009-05-06 14:54:25 +0200 oj r271592 : no used anymore 2009-05-06 14:45:59 +0200 oj r271591 : add missing lib 2009-05-06 14:41:54 +0200 oj r271590 : change wnt 2009-05-06 14:22:21 +0200 oj r271589 : #i101587# use config for the drivers 2009-05-06 14:21:39 +0200 oj r271588 : #i101587# add new set for metadata and config data for driver 2009-05-06 14:19:36 +0200 oj r271587 : #i101587# handle metadata and props of driver 2009-05-06 10:11:11 +0200 oj r271570 : #i101587# correct wrong use of reference 2009-05-06 09:24:33 +0200 oj r271567 : #i101587# add new set for metadata 2009-05-06 08:52:06 +0200 oj r271563 : #i101587# add driver configuration 2009-05-06 08:51:04 +0200 oj r271562 : #i101587# add driver configuration 2009-05-04 10:24:41 +0200 oj r271442 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@271427 (milestone: DEV300:m47) 2009-04-28 07:06:22 +0200 oj r271303 : compile error 2009-04-27 14:12:48 +0200 oj r271270 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 14:12:27 +0200 oj r271269 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 09:30:10 +0200 oj r271255 : use string buffer when possible 2009-04-24 11:56:01 +0200 oj r271207 : #i101268# remove end() call from loop 2009-04-23 14:24:03 +0200 oj r271171 : add dep 2009-04-23 13:25:25 +0200 oj r271164 : #i101268# add config entries for database drivers 2009-04-23 13:07:13 +0200 oj r271161 : #i101268# add config entries for database drivers 2009-04-23 13:06:33 +0200 oj r271160 : #i101268# add parent url pattern entry for driver node 2009-04-23 13:05:39 +0200 oj r271159 : #i101268# add config entry for driver node 2009-04-23 13:04:09 +0200 oj r271157 : #i101268# add config entry for driver node 2009-04-23 06:41:32 +0200 oj r271142 : #i101268# add new configuration file Drivers 2009-04-22 13:49:19 +0200 oj r271103 : convert EOL 2009-04-22 13:29:17 +0200 oj r271101 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:28:08 +0200 oj r271100 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:15:26 +0200 oj r271098 : #i101268# add new configuration file Drivers 2009-04-22 13:14:43 +0200 oj r271097 : #i101268# use of driver configuration entries for features and properties
2009-07-03 12:24:35 +00:00
OTableWindowMapIterator aEnd = m_aTableMap.end();
for(;aIter != aEnd;++aIter)
2001-02-05 08:26:47 +00:00
{
aIter->second->SetZoom(GetZoom());
Size aSize(CalcZoom(aIter->second->GetSizePixel().Width()),CalcZoom(aIter->second->GetSizePixel().Height()));
aIter->second->SetSizePixel(aSize);
}
Resize();
}
}
2001-04-30 12:02:01 +00:00
//------------------------------------------------------------------------------
void OJoinTableView::HideTabWins()
{
DBG_CHKTHIS(OJoinTableView,NULL);
SetUpdateMode(sal_False);
OTableWindowMap* pTabWins = GetTabWinMap();
if ( pTabWins )
2001-04-30 12:02:01 +00:00
{
// working on a copy because the real list will be cleared in inner calls
OTableWindowMap aCopy(*pTabWins);
OTableWindowMap::iterator aIter = aCopy.begin();
CWS-TOOLING: integrate CWS dbaperf2 2009-06-22 11:04:36 +0200 msc r273202 : #100000# fix to run this test 2009-06-22 09:41:04 +0200 msc r273200 : #100000# correct case 2009-06-22 09:02:42 +0200 msc r273199 : new SRB 2009-06-22 08:53:26 +0200 msc r273198 : #100000 2009-06-15 12:36:32 +0200 oj r272976 : test 2009-06-12 14:23:23 +0200 msc r272918 : #101587# unused feature was removed 2009-06-12 06:45:17 +0200 oj r272903 : use GUI instead of OS 2009-06-11 09:12:30 +0200 oj r272845 : remove unused dep 2009-06-11 09:11:09 +0200 oj r272844 : ColumnAliasInOrderBy not supported 2009-06-11 08:27:00 +0200 oj r272843 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@272827 (milestone: DEV300:m50) 2009-06-10 15:30:17 +0200 msc r272822 : #100000 2009-06-10 15:27:40 +0200 msc r272820 : #102515# new function for the database type list 2009-06-10 15:26:09 +0200 msc r272818 : move file to dbaccess/tools/dbcreatetools.inc 2009-06-10 15:20:10 +0200 msc r272816 : #102515# new function for the database type list 2009-06-10 12:34:46 +0200 oj r272803 : #i101587# check extension 2009-06-10 11:53:45 +0200 oj r272800 : remove unused code 2009-06-09 09:57:25 +0200 oj r272752 : #i101587# EscapeDateTime moved into features section 2009-06-09 09:56:26 +0200 oj r272751 : enable finish 2009-06-08 11:50:37 +0200 oj r272726 : #i102588# move convert tzo saveDataSource 2009-06-05 11:54:20 +0200 jsk r272676 : #i102515# - NEW: Functions to retrieve Database names from API 2009-06-05 10:52:22 +0200 jsk r272671 : NEW: Functions to retrieve Database names from API 2009-06-05 09:36:54 +0200 oj r272666 : handle win and unx differently 2009-06-05 09:36:28 +0200 oj r272665 : handle win and unx differently 2009-06-04 13:41:56 +0200 oj r272625 : #i101268# make use of stringbuffer instead of oustring 2009-06-04 10:18:14 +0200 oj r272612 : add SAL_DLLPUBLIC_EXPORT 2009-05-28 10:56:33 +0200 oj r272381 : #i101587# create langpacks 2009-05-28 10:41:59 +0200 oj r272380 : #i101587# create langpacks 2009-05-28 10:29:30 +0200 oj r272379 : #i101587# create langpacks 2009-05-07 10:11:46 +0200 oj r271635 : fix compile warnings 2009-05-07 07:01:31 +0200 oj r271619 : change type from int32 to PathID 2009-05-07 06:53:19 +0200 oj r271618 : add all 2009-05-06 14:57:02 +0200 oj r271595 : add missing lib 2009-05-06 14:56:54 +0200 oj r271594 : no used anymore 2009-05-06 14:56:08 +0200 oj r271593 : no used anymore 2009-05-06 14:54:25 +0200 oj r271592 : no used anymore 2009-05-06 14:45:59 +0200 oj r271591 : add missing lib 2009-05-06 14:41:54 +0200 oj r271590 : change wnt 2009-05-06 14:22:21 +0200 oj r271589 : #i101587# use config for the drivers 2009-05-06 14:21:39 +0200 oj r271588 : #i101587# add new set for metadata and config data for driver 2009-05-06 14:19:36 +0200 oj r271587 : #i101587# handle metadata and props of driver 2009-05-06 10:11:11 +0200 oj r271570 : #i101587# correct wrong use of reference 2009-05-06 09:24:33 +0200 oj r271567 : #i101587# add new set for metadata 2009-05-06 08:52:06 +0200 oj r271563 : #i101587# add driver configuration 2009-05-06 08:51:04 +0200 oj r271562 : #i101587# add driver configuration 2009-05-04 10:24:41 +0200 oj r271442 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@271427 (milestone: DEV300:m47) 2009-04-28 07:06:22 +0200 oj r271303 : compile error 2009-04-27 14:12:48 +0200 oj r271270 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 14:12:27 +0200 oj r271269 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 09:30:10 +0200 oj r271255 : use string buffer when possible 2009-04-24 11:56:01 +0200 oj r271207 : #i101268# remove end() call from loop 2009-04-23 14:24:03 +0200 oj r271171 : add dep 2009-04-23 13:25:25 +0200 oj r271164 : #i101268# add config entries for database drivers 2009-04-23 13:07:13 +0200 oj r271161 : #i101268# add config entries for database drivers 2009-04-23 13:06:33 +0200 oj r271160 : #i101268# add parent url pattern entry for driver node 2009-04-23 13:05:39 +0200 oj r271159 : #i101268# add config entry for driver node 2009-04-23 13:04:09 +0200 oj r271157 : #i101268# add config entry for driver node 2009-04-23 06:41:32 +0200 oj r271142 : #i101268# add new configuration file Drivers 2009-04-22 13:49:19 +0200 oj r271103 : convert EOL 2009-04-22 13:29:17 +0200 oj r271101 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:28:08 +0200 oj r271100 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:15:26 +0200 oj r271098 : #i101268# add new configuration file Drivers 2009-04-22 13:14:43 +0200 oj r271097 : #i101268# use of driver configuration entries for features and properties
2009-07-03 12:24:35 +00:00
OTableWindowMap::iterator aEnd = aCopy.end();
for(;aIter != aEnd;++aIter)
RemoveTabWin(aIter->second);
2001-04-30 12:02:01 +00:00
}
m_pView->getController().setModified(sal_True);
2001-04-30 12:02:01 +00:00
SetUpdateMode(sal_True);
}
// -----------------------------------------------------------------------------
sal_Int8 OJoinTableView::AcceptDrop( const AcceptDropEvent& /*_rEvt*/ )
2001-07-06 08:57:16 +00:00
{
return DND_ACTION_NONE;
}
// -----------------------------------------------------------------------------
sal_Int8 OJoinTableView::ExecuteDrop( const ExecuteDropEvent& /*_rEvt*/ )
2001-07-06 08:57:16 +00:00
{
return DND_ACTION_NONE;
}
// -----------------------------------------------------------------------------
void OJoinTableView::dragFinished( )
{
}
//------------------------------------------------------------------------------
void OJoinTableView::StartDrag( sal_Int8 /*nAction*/, const Point& /*rPosPixel*/ )
{
}
// -----------------------------------------------------------------------------
void OJoinTableView::clearLayoutInformation()
{
m_pLastFocusTabWin = NULL;
m_pSelectedConn = NULL;
//////////////////////////////////////////////////////////////////////
// Listen loeschen
2002-02-08 08:10:00 +00:00
OTableWindowMapIterator aIter = m_aTableMap.begin();
OTableWindowMapIterator aEnd = m_aTableMap.end();
for(;aIter != aEnd;++aIter)
{
if ( aIter->second )
aIter->second->clearListBox();
SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr<Window> aTemp(aIter->second);
SAL_WNODEPRECATED_DECLARATIONS_POP
aIter->second = NULL;
}
2002-02-08 08:10:00 +00:00
m_aTableMap.clear();
2001-04-30 12:02:01 +00:00
2002-02-08 08:10:00 +00:00
::std::vector<OTableConnection*>::const_iterator aIter2 = m_vTableConnection.begin();
CWS-TOOLING: integrate CWS dbaperf2 2009-06-22 11:04:36 +0200 msc r273202 : #100000# fix to run this test 2009-06-22 09:41:04 +0200 msc r273200 : #100000# correct case 2009-06-22 09:02:42 +0200 msc r273199 : new SRB 2009-06-22 08:53:26 +0200 msc r273198 : #100000 2009-06-15 12:36:32 +0200 oj r272976 : test 2009-06-12 14:23:23 +0200 msc r272918 : #101587# unused feature was removed 2009-06-12 06:45:17 +0200 oj r272903 : use GUI instead of OS 2009-06-11 09:12:30 +0200 oj r272845 : remove unused dep 2009-06-11 09:11:09 +0200 oj r272844 : ColumnAliasInOrderBy not supported 2009-06-11 08:27:00 +0200 oj r272843 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@272827 (milestone: DEV300:m50) 2009-06-10 15:30:17 +0200 msc r272822 : #100000 2009-06-10 15:27:40 +0200 msc r272820 : #102515# new function for the database type list 2009-06-10 15:26:09 +0200 msc r272818 : move file to dbaccess/tools/dbcreatetools.inc 2009-06-10 15:20:10 +0200 msc r272816 : #102515# new function for the database type list 2009-06-10 12:34:46 +0200 oj r272803 : #i101587# check extension 2009-06-10 11:53:45 +0200 oj r272800 : remove unused code 2009-06-09 09:57:25 +0200 oj r272752 : #i101587# EscapeDateTime moved into features section 2009-06-09 09:56:26 +0200 oj r272751 : enable finish 2009-06-08 11:50:37 +0200 oj r272726 : #i102588# move convert tzo saveDataSource 2009-06-05 11:54:20 +0200 jsk r272676 : #i102515# - NEW: Functions to retrieve Database names from API 2009-06-05 10:52:22 +0200 jsk r272671 : NEW: Functions to retrieve Database names from API 2009-06-05 09:36:54 +0200 oj r272666 : handle win and unx differently 2009-06-05 09:36:28 +0200 oj r272665 : handle win and unx differently 2009-06-04 13:41:56 +0200 oj r272625 : #i101268# make use of stringbuffer instead of oustring 2009-06-04 10:18:14 +0200 oj r272612 : add SAL_DLLPUBLIC_EXPORT 2009-05-28 10:56:33 +0200 oj r272381 : #i101587# create langpacks 2009-05-28 10:41:59 +0200 oj r272380 : #i101587# create langpacks 2009-05-28 10:29:30 +0200 oj r272379 : #i101587# create langpacks 2009-05-07 10:11:46 +0200 oj r271635 : fix compile warnings 2009-05-07 07:01:31 +0200 oj r271619 : change type from int32 to PathID 2009-05-07 06:53:19 +0200 oj r271618 : add all 2009-05-06 14:57:02 +0200 oj r271595 : add missing lib 2009-05-06 14:56:54 +0200 oj r271594 : no used anymore 2009-05-06 14:56:08 +0200 oj r271593 : no used anymore 2009-05-06 14:54:25 +0200 oj r271592 : no used anymore 2009-05-06 14:45:59 +0200 oj r271591 : add missing lib 2009-05-06 14:41:54 +0200 oj r271590 : change wnt 2009-05-06 14:22:21 +0200 oj r271589 : #i101587# use config for the drivers 2009-05-06 14:21:39 +0200 oj r271588 : #i101587# add new set for metadata and config data for driver 2009-05-06 14:19:36 +0200 oj r271587 : #i101587# handle metadata and props of driver 2009-05-06 10:11:11 +0200 oj r271570 : #i101587# correct wrong use of reference 2009-05-06 09:24:33 +0200 oj r271567 : #i101587# add new set for metadata 2009-05-06 08:52:06 +0200 oj r271563 : #i101587# add driver configuration 2009-05-06 08:51:04 +0200 oj r271562 : #i101587# add driver configuration 2009-05-04 10:24:41 +0200 oj r271442 : CWS-TOOLING: rebase CWS dbaperf2 to trunk@271427 (milestone: DEV300:m47) 2009-04-28 07:06:22 +0200 oj r271303 : compile error 2009-04-27 14:12:48 +0200 oj r271270 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 14:12:27 +0200 oj r271269 : #i101268# make use of stringbuffer instead of oustring 2009-04-27 09:30:10 +0200 oj r271255 : use string buffer when possible 2009-04-24 11:56:01 +0200 oj r271207 : #i101268# remove end() call from loop 2009-04-23 14:24:03 +0200 oj r271171 : add dep 2009-04-23 13:25:25 +0200 oj r271164 : #i101268# add config entries for database drivers 2009-04-23 13:07:13 +0200 oj r271161 : #i101268# add config entries for database drivers 2009-04-23 13:06:33 +0200 oj r271160 : #i101268# add parent url pattern entry for driver node 2009-04-23 13:05:39 +0200 oj r271159 : #i101268# add config entry for driver node 2009-04-23 13:04:09 +0200 oj r271157 : #i101268# add config entry for driver node 2009-04-23 06:41:32 +0200 oj r271142 : #i101268# add new configuration file Drivers 2009-04-22 13:49:19 +0200 oj r271103 : convert EOL 2009-04-22 13:29:17 +0200 oj r271101 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:28:08 +0200 oj r271100 : #i101268# use of driver configuration entries for features and properties 2009-04-22 13:15:26 +0200 oj r271098 : #i101268# add new configuration file Drivers 2009-04-22 13:14:43 +0200 oj r271097 : #i101268# use of driver configuration entries for features and properties
2009-07-03 12:24:35 +00:00
::std::vector<OTableConnection*>::const_iterator aEnd2 = m_vTableConnection.end();
for(;aIter2 != aEnd2;++aIter2)
delete *aIter2;
2002-02-08 08:10:00 +00:00
m_vTableConnection.clear();
}
// -----------------------------------------------------------------------------
void OJoinTableView::lookForUiActivities()
2001-07-06 10:25:44 +00:00
{
}
// -----------------------------------------------------------------------------
void OJoinTableView::LoseFocus()
{
DeselectConn(GetSelectedConn());
Window::LoseFocus();
}
// -----------------------------------------------------------------------------
2001-10-22 07:09:11 +00:00
void OJoinTableView::GetFocus()
{
2002-05-02 06:54:11 +00:00
Window::GetFocus();
if ( !m_aTableMap.empty() && !GetSelectedConn() )
2002-05-02 06:54:11 +00:00
GrabTabWinFocus();
2001-10-22 07:09:11 +00:00
}
// -----------------------------------------------------------------------------
Reference< XAccessible > OJoinTableView::CreateAccessible()
{
m_pAccessible = new OJoinDesignViewAccess(this);
return m_pAccessible;
}
// -----------------------------------------------------------------------------
2002-11-26 06:46:13 +00:00
void OJoinTableView::modified()
2002-02-08 08:10:00 +00:00
{
OJoinController& rController = m_pView->getController();
rController.setModified( sal_True );
rController.InvalidateFeature(ID_BROWSER_ADDTABLE);
rController.InvalidateFeature(SID_RELATION_ADD_RELATION);
2002-02-08 08:10:00 +00:00
}
// -----------------------------------------------------------------------------
void OJoinTableView::addConnection(OTableConnection* _pConnection,sal_Bool _bAddData)
2002-02-08 08:10:00 +00:00
{
if ( _bAddData )
{
#if OSL_DEBUG_LEVEL > 0
TTableConnectionData* pTabConnDataList = m_pView->getController().getTableConnectionData();
OSL_ENSURE( ::std::find(pTabConnDataList->begin(),pTabConnDataList->end(),_pConnection->GetData()) == pTabConnDataList->end(),"Data already in vector!");
#endif
m_pView->getController().getTableConnectionData()->push_back(_pConnection->GetData());
}
2002-02-08 08:10:00 +00:00
m_vTableConnection.push_back(_pConnection);
2002-03-26 07:55:04 +00:00
_pConnection->RecalcLines();
_pConnection->InvalidateConnection();
2002-11-26 06:46:13 +00:00
modified();
if ( m_pAccessible )
m_pAccessible->notifyAccessibleEvent( AccessibleEventId::CHILD,
2002-11-26 06:46:13 +00:00
Any(),
makeAny(_pConnection->GetAccessible()));
2002-02-08 08:10:00 +00:00
}
// -----------------------------------------------------------------------------
bool OJoinTableView::allowQueries() const
{
return true;
}
// -----------------------------------------------------------------------------
void OJoinTableView::onNoColumns_throw()
{
OSL_FAIL( "OTableWindow::onNoColumns_throw: cannot really handle this!" );
throw SQLException();
}
//------------------------------------------------------------------------------
bool OJoinTableView::supressCrossNaturalJoin(const TTableConnectionData::value_type& ) const
{
return false;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */