Files
libreoffice/dbaccess/source/ui/browser/unodatbr.cxx

3774 lines
155 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2000-10-26 13:46:14 +00:00
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2000-10-26 13:46:14 +00:00
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
2000-10-26 13:46:14 +00:00
*
* OpenOffice.org - a multi-platform office productivity suite
2000-10-26 13:46:14 +00:00
*
* This file is part of OpenOffice.org.
2000-10-26 13:46:14 +00:00
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
2000-10-26 13:46:14 +00:00
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
2000-10-26 13:46:14 +00:00
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
2000-10-26 13:46:14 +00:00
*
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx"
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
#include "browserids.hxx"
#include "dbaccess_helpid.hrc"
#include "dbexchange.hxx"
#include "dbtreelistbox.hxx"
#include "dbtreemodel.hxx"
#include "dbtreeview.hxx"
#include "dbu_brw.hrc"
#include "dbu_reghelper.hxx"
#include "dbustrings.hrc"
#include "dlgsave.hxx"
#include "HtmlReader.hxx"
#include "imageprovider.hxx"
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
#include "listviewitems.hxx"
#include "QEnumTypes.hxx"
#include "RtfReader.hxx"
#include "sbagrid.hrc"
#include "sbagrid.hxx"
#include "sqlmessage.hxx"
#include "TokenWriter.hxx"
#include "UITools.hxx"
#include "unodatbr.hxx"
#include "WColumnSelect.hxx"
#include "WCopyTable.hxx"
#include "WCPage.hxx"
#include "WExtendPages.hxx"
#include "WNameMatch.hxx"
2000-10-26 13:46:14 +00:00
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
/** === begin UNO includes === **/
#include <com/sun/star/awt/LineEndFormat.hpp>
CWS-TOOLING: integrate CWS dba32c 2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion 2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time 2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths 2009-06-29 10:08:54 +0200 fs r273455 : #i103138# refactored the code for positioning/zooming the control Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to take an additional ViewTransformation parameter, describing the transformation to obtain the actual control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter. This has become necessary since during painting, the device which we created our control for might not necessarily have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size, this would lead to wrong results. Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken. Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ... I consider it broken, since: - we need the map mode to obtain the proper zoom level, which is to be forwarded to the control - there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears). It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand one has no possibility to obtain the current zoom by other means. Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used, which means the controls have a zoom of "1:1" set, which is wrong here. 2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties 2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning 2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed 2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc 2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux 2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux 2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar 2009-06-15 14:11:27 +0200 fs r272983 : added since tag 2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted 2009-06-15 11:08:53 +0200 fs r272969 : #i10000# 2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701# 2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src 2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50) 2009-06-02 09:53:10 +0200 fs r272483 : #i10000# 2009-05-29 15:55:03 +0200 fs r272465 : #i100818# 2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any 2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition 2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex 2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed 2009-05-27 14:53:36 +0200 fs r272347 : #i10000# 2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast 2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly 2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used 2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function 2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well 2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution 2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set 2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition 2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria 2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR 2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein 2009-05-25 15:49:57 +0200 fs r272254 : #i999704# 2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property 2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString 2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein 2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property 2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property) 2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default 2009-05-25 14:39:31 +0200 fs r272243 : removed dead import 2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns 2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent 2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel 2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event 2009-05-22 21:42:47 +0200 fs r272211 : #i102003# 2009-05-22 21:42:20 +0200 fs r272210 : grammar 2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously 2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear 2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG 2009-05-22 12:03:42 +0200 fs r272180 : #i88878# provided by noel.power@novell.com implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs 2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them 2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values 2009-05-15 15:08:31 +0200 fs r271937 : includes 2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint 2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity 2009-05-15 10:15:44 +0200 fs r271928 : #i10000# 2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:23:23 +0200 fs r271919 : #i101622# 2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids 2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b) 2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48 2009-05-07 14:43:19 +0200 fs r271670 : #i101477# 2009-05-07 14:37:30 +0200 fs r271668 : #i101477# 2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch 2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics 2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47) 2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control 2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
#include <com/sun/star/awt/LineEndFormat.hpp>
#include <com/sun/star/awt/MouseWheelBehavior.hpp>
2000-10-26 13:46:14 +00:00
#include <com/sun/star/awt/TextAlign.hpp>
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
#include <com/sun/star/awt/VisualEffect.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
2000-10-26 13:46:14 +00:00
#include <com/sun/star/container/XNameContainer.hpp>
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
#include <com/sun/star/form/XForm.hpp>
#include <com/sun/star/form/XGridColumnFactory.hpp>
#include <com/sun/star/form/XLoadable.hpp>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
#include <com/sun/star/frame/XLayoutManager.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/sdb/CommandType.hpp>
#include <com/sun/star/sdb/SQLContext.hpp>
#include <com/sun/star/sdb/XBookmarksSupplier.hpp>
#include <com/sun/star/sdb/XCompletedConnection.hpp>
#include <com/sun/star/sdb/XDatabaseRegistrations.hpp>
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
#include <com/sun/star/sdb/XDocumentDataSource.hpp>
#include <com/sun/star/sdb/XParametersSupplier.hpp>
#include <com/sun/star/sdb/XQueriesSupplier.hpp>
#include <com/sun/star/sdb/XQueryDefinitionsSupplier.hpp>
#include <com/sun/star/sdb/XResultSetAccess.hpp>
#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
#include <com/sun/star/sdb/application/NamedDatabaseObject.hpp>
CWS-TOOLING: integrate CWS dba31e 2008-11-19 12:36:23 +0100 msc r263980 : i96104 2008-11-19 12:31:19 +0100 msc r263979 : i96104 2008-11-19 12:21:55 +0100 msc r263977 : i96104 2008-11-19 12:18:53 +0100 msc r263976 : i96104 2008-11-18 09:09:45 +0100 oj r263746 : disable color entry when area is set 2008-11-18 08:37:52 +0100 oj r263741 : #remove sub report entry 2008-11-17 11:20:25 +0100 fs r263708 : #i10000# 2008-11-17 11:06:52 +0100 fs r263706 : minimal version now is 3.1 2008-11-12 22:25:59 +0100 fs r263621 : #i96150# 2008-11-12 22:20:02 +0100 fs r263620 : rebased to m34 2008-11-12 21:39:41 +0100 fs r263618 : MANUAL REBASE: rebase CWS dba31d to DEV300_m34 2008-11-12 13:54:58 +0100 fs r263597 : #i96134# MediaDescriptor.URL is to be preferred over MediaDescriptor.FileName. Nonetheless, ensure both are handled 2008-11-12 13:53:40 +0100 fs r263596 : #i96134# re-enabled the code for #i41897#, a better fix is to come 2008-11-12 12:48:21 +0100 fs r263585 : #i96134# disable saving URLs of file-base databases relatively 2008-11-11 16:11:11 +0100 msc r263566 : #i96104# 2008-11-05 09:09:47 +0100 oj r263342 : #i88727# color noe added 2008-11-05 08:41:43 +0100 oj r263341 : #i77916# zoom added 2008-11-04 21:24:15 +0100 fs r263339 : disposing: call disposeAndClear without own mutex locked - some of our listeners insist on locking the SolarMutex, which sometimes led to deadlocks on the complex test cases 2008-11-04 21:23:15 +0100 fs r263338 : remove SolarMutex locking - this happned in CWS dba31c (in the CVS version), which this CWS was created from, but seems to got lost during resync 2008-11-04 20:49:50 +0100 fs r263335 : docu formatting 2008-11-04 20:06:39 +0100 fs r263334 : #i95826# use m_aMutex, not a DocumentGuard (wrongly resolved merge conflicts) 2008-11-04 17:36:29 +0100 fs r263332 : #i92688# properly revoke as XEventListener from m_xActiveController when disposing 2008-11-04 14:49:34 +0100 fs r263324 : #i92322# enable Input Required if EmptyIsNULL does not exist at the control 2008-10-31 11:10:04 +0100 oj r262857 : merge from cvs to svn 2008-10-31 09:46:45 +0100 oj r262853 : merge from cvs to svn 2008-10-31 08:46:37 +0100 oj r262849 : merge from cvs to svn 2008-10-31 08:44:24 +0100 oj r262848 : merge from cvs to svn 2008-10-31 08:43:33 +0100 oj r262847 : merge from cvs to svn 2008-10-31 08:42:28 +0100 oj r262846 : merge from cvs to svn 2008-10-31 08:41:58 +0100 oj r262845 : merge from cvs to svn 2008-10-31 08:41:32 +0100 oj r262844 : merge from cvs to svn 2008-10-28 12:19:50 +0100 oj r262733 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:42 +0100 oj r262732 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:36 +0100 oj r262731 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:31 +0100 oj r262730 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:22 +0100 oj r262729 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:18 +0100 oj r262728 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:10 +0100 oj r262727 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:06 +0100 oj r262726 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:05 +0100 oj r262725 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:01 +0100 oj r262724 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:50 +0100 oj r262723 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:41 +0100 oj r262722 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:40 +0100 oj r262721 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:27 +0100 oj r262720 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:10 +0100 oj r262719 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:01 +0100 oj r262718 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:17:39 +0100 oj r262717 : #iXXXXX#: migrate CWS dba31e to SVN
2008-12-01 12:31:27 +00:00
#include <com/sun/star/sdbc/ColumnValue.hpp>
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/FetchDirection.hpp>
#include <com/sun/star/sdbc/SQLWarning.hpp>
#include <com/sun/star/sdbc/XDataSource.hpp>
2001-02-23 14:17:34 +00:00
#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
#include <com/sun/star/sdbc/XWarningsSupplier.hpp>
#include <com/sun/star/sdbcx/Privilege.hpp>
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
#include <com/sun/star/sdbcx/XDrop.hpp>
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
#include <com/sun/star/sdbcx/XViewsSupplier.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <com/sun/star/util/XFlushable.hpp>
#include <com/sun/star/sdb/XDocumentDataSource.hpp>
#include <com/sun/star/document/MacroExecMode.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/ui/XContextMenuInterceptor.hpp>
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
/** === end UNO includes === **/
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
#include <comphelper/extract.hxx>
#include <comphelper/sequence.hxx>
2000-10-26 13:46:14 +00:00
#include <comphelper/types.hxx>
#include <connectivity/dbexception.hxx>
2009-11-05 10:35:18 +01:00
#include <cppuhelper/exc_hlp.hxx>
2001-02-16 15:00:13 +00:00
#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/typeprovider.hxx>
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
#include <sfx2/app.hxx>
#include <sfx2/dispatch.hxx>
2001-02-28 09:01:54 +00:00
#include <sot/storage.hxx>
#include <svl/filenotation.hxx>
#include <svl/intitem.hxx>
#include <unotools/moduleoptions.hxx>
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
#include <svtools/svlbitm.hxx>
#include <svtools/svtreebx.hxx>
#include <svx/algitem.hxx>
#include <svx/dataaccessdescriptor.hxx>
#include <svx/databaseregistrationui.hxx>
#include <toolkit/unohlp.hxx>
#include <tools/diagnose_ex.h>
2011-02-03 00:33:36 +01:00
#include <osl/diagnose.h>
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
#include <tools/multisel.hxx>
#include <tools/urlobj.hxx>
#include <unotools/confignode.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/split.hxx>
#include <vcl/stdtext.hxx>
#include <vcl/svapp.hxx>
#include <vcl/toolbox.hxx>
#include <vcl/waitobj.hxx>
#include <vcl/wrkwin.hxx>
CWS-TOOLING: integrate CWS dbaperf1 2009-04-02 09:12:25 +0200 oj r270372 : CWS-TOOLING: rebase CWS dbaperf1 to trunk@270033 (milestone: DEV300:m45) 2009-03-17 10:20:34 +0100 oj r269577 : add parameter 2009-03-17 10:20:05 +0100 oj r269576 : add parameter 2009-03-12 12:32:24 +0100 oj r269387 : add missing ++ 2009-03-11 12:53:35 +0100 oj r269315 : compile error 2009-03-06 08:52:11 +0100 oj r268968 : #i99264# remove duplicate code 2009-03-06 08:20:08 +0100 oj r268966 : add missingheader 2009-03-06 08:17:41 +0100 oj r268965 : add header 2009-03-06 08:15:07 +0100 oj r268964 : #i99708# remove duplicate code 2009-03-06 07:24:11 +0100 oj r268963 : #i99708# remove duplicate code 2009-03-06 07:22:24 +0100 oj r268962 : #i99708# use tenary operator 2009-03-06 07:19:21 +0100 oj r268961 : remove unused rtl_logs 2009-03-06 07:15:55 +0100 oj r268960 : #i99708# extract getLength from for loop 2009-03-06 07:15:35 +0100 oj r268959 : #i99708# extract getLength from for loop 2009-03-06 07:14:57 +0100 oj r268958 : remove unused rtl_logs 2009-03-06 07:13:01 +0100 oj r268957 : insert DBG_ helper 2009-03-06 07:12:17 +0100 oj r268956 : remove unused rtl_logs 2009-03-06 07:10:26 +0100 oj r268955 : remove unused rtl_logs 2009-03-06 07:04:51 +0100 oj r268954 : #i99708# use tenary operator 2009-03-05 12:04:46 +0100 oj r268895 : comment RTL_LOG out 2009-03-05 09:05:07 +0100 oj r268874 : add rtl logfile 2009-03-04 14:21:18 +0100 oj r268828 : #i99708# make static inplace and some method calls in for loop removed 2009-03-04 14:20:34 +0100 oj r268827 : #i99708# impl double check pattern for getInfohelper 2009-03-02 09:31:42 +0100 oj r268636 : add rtl logfile 2009-03-02 08:18:37 +0100 oj r268633 : add rtl logfile 2009-02-27 11:22:16 +0100 oj r268570 : #i99709# change algorithm for marking objects 2009-02-27 11:17:04 +0100 oj r268568 : #i99708# some improvements to load forms, controls faster and replacement of size() call with !empty() which is much faster 2009-02-24 10:09:35 +0100 sb r268383 : #i99290# no longer care to set a sensible context class loader for native threads attached to the VM 2009-02-23 13:44:04 +0100 oj r268354 : #i76606# seekrow changes 2009-02-23 12:27:30 +0100 oj r268349 : deleted 2009-02-20 15:14:23 +0100 oj r268325 : #i76606# some code changes 2009-02-19 14:15:25 +0100 oj r268284 : #i76606# use of simple prep stmt instead of full blown rowset, when source and dest connection are the same use insert into ... ( select ... ) 2009-02-19 11:27:55 +0100 oj r268265 : #i76606# insert some RTL_LOG and setObject impl 2009-02-18 14:45:37 +0100 oj r268222 : #i99363# insert RTL_LOG 2009-02-18 14:45:18 +0100 oj r268221 : #i99363# insert RTL_LOG 2009-02-18 11:14:54 +0100 oj r268207 : #i99363# call some impl_ methods to avoid duplicate cechCache calls 2009-02-18 11:10:47 +0100 oj r268206 : #i99363# make isCount inline 2009-02-18 10:33:22 +0100 oj r268203 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-18 10:32:57 +0100 oj r268202 : #i99363# use bookmarkable if available and inserted some RTL_LOG 2009-02-17 07:29:05 +0100 oj r267843 : #i96897# remove some dll public 2009-02-16 15:01:04 +0100 oj r267816 : #i96897# remove some dll public 2009-02-16 14:25:53 +0100 oj r267810 : #i99264# remove duplicate code 2009-02-16 14:25:33 +0100 oj r267809 : #i99264# remove duplicate code 2009-02-16 14:24:59 +0100 oj r267808 : #i99264# remove duplicate code 2009-02-13 10:56:17 +0100 oj r267703 : #i99191# comment the contextclassloader 2009-02-13 10:32:40 +0100 oj r267700 : reduce call to resultset meta data 2009-02-13 10:27:31 +0100 oj r267699 : reduce call to resultset meta data 2009-02-13 10:27:08 +0100 oj r267698 : reduce call to resultset meta data
2009-04-23 10:42:05 +00:00
#include <rtl/logfile.hxx>
2000-10-26 13:46:14 +00:00
#include <memory>
2000-10-26 13:46:14 +00:00
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::awt;
2000-10-26 13:46:14 +00:00
using namespace ::com::sun::star::sdb;
using namespace ::com::sun::star::sdb::application;
2000-10-26 13:46:14 +00:00
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::util;
using namespace ::com::sun::star::frame;
2000-10-26 13:46:14 +00:00
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::ui::dialogs;
using namespace ::com::sun::star::task;
2001-01-09 14:52:33 +00:00
using namespace ::com::sun::star::form;
using namespace ::com::sun::star::io;
using namespace ::com::sun::star::i18n;
using namespace ::com::sun::star::view;
using namespace ::com::sun::star::datatransfer;
using namespace ::com::sun::star::document;
using namespace ::com::sun::star::ui;
using namespace ::dbtools;
using namespace ::comphelper;
2001-04-11 11:43:39 +00:00
using namespace ::svx;
// .........................................................................
namespace dbaui
{
// .........................................................................
namespace DatabaseObject = ::com::sun::star::sdb::application::DatabaseObject;
namespace DatabaseObjectContainer = ::com::sun::star::sdb::application::DatabaseObjectContainer;
2000-10-26 13:46:14 +00:00
//==================================================================
//= SbaTableQueryBrowser
//==================================================================
// -------------------------------------------------------------------------
extern "C" void SAL_CALL createRegistryInfo_OBrowser()
{
static OMultiInstanceAutoRegistration< SbaTableQueryBrowser > aAutoRegistration;
}
// -------------------------------------------------------------------------
void SafeAddPropertyListener(const Reference< XPropertySet > & xSet, const ::rtl::OUString& rPropName, XPropertyChangeListener* pListener)
{
Reference< XPropertySetInfo > xInfo = xSet->getPropertySetInfo();
if (xInfo->hasPropertyByName(rPropName))
xSet->addPropertyChangeListener(rPropName, pListener);
}
// -------------------------------------------------------------------------
void SafeRemovePropertyListener(const Reference< XPropertySet > & xSet, const ::rtl::OUString& rPropName, XPropertyChangeListener* pListener)
{
Reference< XPropertySetInfo > xInfo = xSet->getPropertySetInfo();
if (xInfo->hasPropertyByName(rPropName))
xSet->removePropertyChangeListener(rPropName, pListener);
}
//-------------------------------------------------------------------------
::rtl::OUString SAL_CALL SbaTableQueryBrowser::getImplementationName() throw(RuntimeException)
{
return getImplementationName_Static();
}
//-------------------------------------------------------------------------
::comphelper::StringSequence SAL_CALL SbaTableQueryBrowser::getSupportedServiceNames() throw(RuntimeException)
{
return getSupportedServiceNames_Static();
}
// -------------------------------------------------------------------------
::rtl::OUString SbaTableQueryBrowser::getImplementationName_Static() throw(RuntimeException)
{
return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbu.ODatasourceBrowser"));
2000-10-26 13:46:14 +00:00
}
//-------------------------------------------------------------------------
::comphelper::StringSequence SbaTableQueryBrowser::getSupportedServiceNames_Static() throw(RuntimeException)
{
::comphelper::StringSequence aSupported(1);
aSupported.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.DataSourceBrowser"));
2000-10-26 13:46:14 +00:00
return aSupported;
}
//-------------------------------------------------------------------------
Reference< XInterface > SAL_CALL SbaTableQueryBrowser::Create(const Reference<XMultiServiceFactory >& _rxFactory)
{
SolarMutexGuard aGuard;
2000-10-26 13:46:14 +00:00
return *(new SbaTableQueryBrowser(_rxFactory));
}
2001-07-03 11:54:05 +00:00
DBG_NAME(SbaTableQueryBrowser);
2000-10-26 13:46:14 +00:00
//------------------------------------------------------------------------------
SbaTableQueryBrowser::SbaTableQueryBrowser(const Reference< XMultiServiceFactory >& _rM)
:SbaXDataBrowserController(_rM)
CWS-TOOLING: integrate CWS dba31e 2008-11-19 12:36:23 +0100 msc r263980 : i96104 2008-11-19 12:31:19 +0100 msc r263979 : i96104 2008-11-19 12:21:55 +0100 msc r263977 : i96104 2008-11-19 12:18:53 +0100 msc r263976 : i96104 2008-11-18 09:09:45 +0100 oj r263746 : disable color entry when area is set 2008-11-18 08:37:52 +0100 oj r263741 : #remove sub report entry 2008-11-17 11:20:25 +0100 fs r263708 : #i10000# 2008-11-17 11:06:52 +0100 fs r263706 : minimal version now is 3.1 2008-11-12 22:25:59 +0100 fs r263621 : #i96150# 2008-11-12 22:20:02 +0100 fs r263620 : rebased to m34 2008-11-12 21:39:41 +0100 fs r263618 : MANUAL REBASE: rebase CWS dba31d to DEV300_m34 2008-11-12 13:54:58 +0100 fs r263597 : #i96134# MediaDescriptor.URL is to be preferred over MediaDescriptor.FileName. Nonetheless, ensure both are handled 2008-11-12 13:53:40 +0100 fs r263596 : #i96134# re-enabled the code for #i41897#, a better fix is to come 2008-11-12 12:48:21 +0100 fs r263585 : #i96134# disable saving URLs of file-base databases relatively 2008-11-11 16:11:11 +0100 msc r263566 : #i96104# 2008-11-05 09:09:47 +0100 oj r263342 : #i88727# color noe added 2008-11-05 08:41:43 +0100 oj r263341 : #i77916# zoom added 2008-11-04 21:24:15 +0100 fs r263339 : disposing: call disposeAndClear without own mutex locked - some of our listeners insist on locking the SolarMutex, which sometimes led to deadlocks on the complex test cases 2008-11-04 21:23:15 +0100 fs r263338 : remove SolarMutex locking - this happned in CWS dba31c (in the CVS version), which this CWS was created from, but seems to got lost during resync 2008-11-04 20:49:50 +0100 fs r263335 : docu formatting 2008-11-04 20:06:39 +0100 fs r263334 : #i95826# use m_aMutex, not a DocumentGuard (wrongly resolved merge conflicts) 2008-11-04 17:36:29 +0100 fs r263332 : #i92688# properly revoke as XEventListener from m_xActiveController when disposing 2008-11-04 14:49:34 +0100 fs r263324 : #i92322# enable Input Required if EmptyIsNULL does not exist at the control 2008-10-31 11:10:04 +0100 oj r262857 : merge from cvs to svn 2008-10-31 09:46:45 +0100 oj r262853 : merge from cvs to svn 2008-10-31 08:46:37 +0100 oj r262849 : merge from cvs to svn 2008-10-31 08:44:24 +0100 oj r262848 : merge from cvs to svn 2008-10-31 08:43:33 +0100 oj r262847 : merge from cvs to svn 2008-10-31 08:42:28 +0100 oj r262846 : merge from cvs to svn 2008-10-31 08:41:58 +0100 oj r262845 : merge from cvs to svn 2008-10-31 08:41:32 +0100 oj r262844 : merge from cvs to svn 2008-10-28 12:19:50 +0100 oj r262733 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:42 +0100 oj r262732 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:36 +0100 oj r262731 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:31 +0100 oj r262730 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:22 +0100 oj r262729 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:18 +0100 oj r262728 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:10 +0100 oj r262727 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:06 +0100 oj r262726 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:05 +0100 oj r262725 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:01 +0100 oj r262724 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:50 +0100 oj r262723 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:41 +0100 oj r262722 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:40 +0100 oj r262721 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:27 +0100 oj r262720 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:10 +0100 oj r262719 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:01 +0100 oj r262718 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:17:39 +0100 oj r262717 : #iXXXXX#: migrate CWS dba31e to SVN
2008-12-01 12:31:27 +00:00
,m_aSelectionListeners( getMutex() )
,m_aContextMenuInterceptors( getMutex() )
,m_aTableCopyHelper(this)
2000-10-26 13:46:14 +00:00
,m_pTreeView(NULL)
,m_pSplitter(NULL)
,m_pTreeModel(NULL)
2001-01-09 14:52:33 +00:00
,m_pCurrentlyDisplayed(NULL)
,m_nAsyncDrop(0)
,m_nBorder(1)
,m_bQueryEscapeProcessing( sal_False )
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
,m_bShowMenu(sal_False)
,m_bInSuspend(sal_False)
,m_bEnableBrowser(sal_True)
2000-10-26 13:46:14 +00:00
{
2001-07-03 11:54:05 +00:00
DBG_CTOR(SbaTableQueryBrowser,NULL);
2000-10-26 13:46:14 +00:00
}
//------------------------------------------------------------------------------
SbaTableQueryBrowser::~SbaTableQueryBrowser()
{
2001-07-03 11:54:05 +00:00
DBG_DTOR(SbaTableQueryBrowser,NULL);
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
if ( !rBHelper.bDisposed && !rBHelper.bInDispose )
{
OSL_ENSURE(0,"Please check who doesn't dispose this component!");
// increment ref count to prevent double call of Dtor
osl_incrementInterlockedCount( &m_refCount );
dispose();
}
}
//------------------------------------------------------------------------------
Any SAL_CALL SbaTableQueryBrowser::queryInterface(const Type& _rType) throw (RuntimeException)
{
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
if ( _rType.equals( XScriptInvocationContext::static_type() ) )
{
OSL_PRECOND( !!m_aDocScriptSupport, "SbaTableQueryBrowser::queryInterface: did not initialize this, yet!" );
if ( !!m_aDocScriptSupport && *m_aDocScriptSupport )
return makeAny( Reference< XScriptInvocationContext >( this ) );
return Any();
}
Any aReturn = SbaXDataBrowserController::queryInterface(_rType);
if (!aReturn.hasValue())
aReturn = SbaTableQueryBrowser_Base::queryInterface(_rType);
return aReturn;
}
//------------------------------------------------------------------------------
Sequence< Type > SAL_CALL SbaTableQueryBrowser::getTypes( ) throw (RuntimeException)
{
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
Sequence< Type > aTypes( ::comphelper::concatSequences(
SbaXDataBrowserController::getTypes(),
SbaTableQueryBrowser_Base::getTypes()
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
) );
OSL_PRECOND( !!m_aDocScriptSupport, "SbaTableQueryBrowser::getTypes: did not initialize this, yet!" );
if ( !m_aDocScriptSupport || !*m_aDocScriptSupport )
{
Sequence< Type > aStrippedTypes( aTypes.getLength() - 1 );
::std::remove_copy_if(
aTypes.getConstArray(),
aTypes.getConstArray() + aTypes.getLength(),
aStrippedTypes.getArray(),
::std::bind2nd( ::std::equal_to< Type >(), XScriptInvocationContext::static_type() )
);
aTypes = aStrippedTypes;
}
return aTypes;
}
//------------------------------------------------------------------------------
Sequence< sal_Int8 > SAL_CALL SbaTableQueryBrowser::getImplementationId( ) throw (RuntimeException)
{
2001-08-27 05:57:24 +00:00
static ::cppu::OImplementationId * pId = 0;
if (! pId)
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
if (! pId)
{
static ::cppu::OImplementationId aId;
pId = &aId;
}
}
return pId->getImplementationId();
}
//------------------------------------------------------------------------------
2001-03-01 14:17:55 +00:00
void SAL_CALL SbaTableQueryBrowser::disposing()
{
SolarMutexGuard aGuard;
// doin' a lot of VCL stuff here -> lock the SolarMutex
// kiss our listeners goodbye
2001-06-21 17:03:36 +00:00
EventObject aEvt(*this);
m_aSelectionListeners.disposeAndClear(aEvt);
m_aContextMenuInterceptors.disposeAndClear(aEvt);
// reset the content's tree view: it holds a reference to our model which is to be deleted immediately,
// and it will live longer than we do.
2001-01-09 14:52:33 +00:00
if (getBrowserView())
getBrowserView()->setTreeView(NULL);
clearTreeModel();
// clear the tree model
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
{
::std::auto_ptr<SvLBoxTreeList> aTemp(m_pTreeModel);
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
m_pTreeModel = NULL;
}
// remove ourself as status listener
implRemoveStatusListeners();
// remove the container listener from the database context
try
{
Reference< XDatabaseRegistrations > xDatabaseRegistrations( m_xDatabaseContext, UNO_QUERY_THROW );
xDatabaseRegistrations->removeDatabaseRegistrationsListener( this );
}
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
// check out from all the objects we are listening
// the frame
if (m_xCurrentFrameParent.is())
m_xCurrentFrameParent->removeFrameActionListener((::com::sun::star::frame::XFrameActionListener*)this);
2001-03-01 14:17:55 +00:00
SbaXDataBrowserController::disposing();
2000-10-26 13:46:14 +00:00
}
2000-10-26 13:46:14 +00:00
//------------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::Construct(Window* pParent)
{
if ( !SbaXDataBrowserController::Construct( pParent ) )
2000-10-26 13:46:14 +00:00
return sal_False;
try
{
Reference< XDatabaseRegistrations > xDatabaseRegistrations( m_xDatabaseContext, UNO_QUERY_THROW );
xDatabaseRegistrations->addDatabaseRegistrationsListener( this );
// the collator for the string compares
m_xCollator = Reference< XCollator >( getORB()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.Collator")) ), UNO_QUERY_THROW );
m_xCollator->loadDefaultCollator( Application::GetSettings().GetLocale(), 0 );
}
catch(Exception&)
{
DBG_ERROR("SbaTableQueryBrowser::Construct: could not create (or start listening at) the database context!");
}
2000-10-26 13:46:14 +00:00
// some help ids
2001-01-09 14:52:33 +00:00
if (getBrowserView() && getBrowserView()->getVclControl())
2000-10-26 13:46:14 +00:00
{
// create controls and set sizes
const long nFrameWidth = getBrowserView()->LogicToPixel( ::Size( 3, 0 ), MAP_APPFONT ).Width();
2000-10-26 13:46:14 +00:00
2001-01-09 14:52:33 +00:00
m_pSplitter = new Splitter(getBrowserView(),WB_HSCROLL);
m_pSplitter->SetPosSizePixel( ::Point(0,0), ::Size(nFrameWidth,0) );
2000-10-26 13:46:14 +00:00
m_pSplitter->SetBackground( Wallpaper( Application::GetSettings().GetStyleSettings().GetDialogColor() ) );
m_pTreeView = new DBTreeView(getBrowserView(),getORB(), WB_TABSTOP | WB_BORDER);
m_pTreeView->SetPreExpandHandler(LINK(this, SbaTableQueryBrowser, OnExpandEntry));
m_pTreeView->setCopyHandler(LINK(this, SbaTableQueryBrowser, OnCopyEntry));
m_pTreeView->getListBox().setContextMenuProvider( this );
m_pTreeView->getListBox().setControlActionListener( this );
2000-11-30 15:55:19 +00:00
m_pTreeView->SetHelpId(HID_CTL_TREEVIEW);
2000-10-26 13:46:14 +00:00
// a default pos for the splitter, so that the listbox is about 80 (logical) pixels wide
m_pSplitter->SetSplitPosPixel( getBrowserView()->LogicToPixel( ::Size( 80, 0 ), MAP_APPFONT ).Width() );
2001-01-09 14:52:33 +00:00
getBrowserView()->setSplitter(m_pSplitter);
getBrowserView()->setTreeView(m_pTreeView);
2000-10-26 13:46:14 +00:00
// fill view with data
m_pTreeModel = new SvLBoxTreeList;
m_pTreeModel->SetSortMode(SortAscending);
m_pTreeModel->SetCompareHdl(LINK(this, SbaTableQueryBrowser, OnTreeEntryCompare));
2000-10-26 13:46:14 +00:00
m_pTreeView->setModel(m_pTreeModel);
CWS-TOOLING: integrate CWS dba31e 2008-11-19 12:36:23 +0100 msc r263980 : i96104 2008-11-19 12:31:19 +0100 msc r263979 : i96104 2008-11-19 12:21:55 +0100 msc r263977 : i96104 2008-11-19 12:18:53 +0100 msc r263976 : i96104 2008-11-18 09:09:45 +0100 oj r263746 : disable color entry when area is set 2008-11-18 08:37:52 +0100 oj r263741 : #remove sub report entry 2008-11-17 11:20:25 +0100 fs r263708 : #i10000# 2008-11-17 11:06:52 +0100 fs r263706 : minimal version now is 3.1 2008-11-12 22:25:59 +0100 fs r263621 : #i96150# 2008-11-12 22:20:02 +0100 fs r263620 : rebased to m34 2008-11-12 21:39:41 +0100 fs r263618 : MANUAL REBASE: rebase CWS dba31d to DEV300_m34 2008-11-12 13:54:58 +0100 fs r263597 : #i96134# MediaDescriptor.URL is to be preferred over MediaDescriptor.FileName. Nonetheless, ensure both are handled 2008-11-12 13:53:40 +0100 fs r263596 : #i96134# re-enabled the code for #i41897#, a better fix is to come 2008-11-12 12:48:21 +0100 fs r263585 : #i96134# disable saving URLs of file-base databases relatively 2008-11-11 16:11:11 +0100 msc r263566 : #i96104# 2008-11-05 09:09:47 +0100 oj r263342 : #i88727# color noe added 2008-11-05 08:41:43 +0100 oj r263341 : #i77916# zoom added 2008-11-04 21:24:15 +0100 fs r263339 : disposing: call disposeAndClear without own mutex locked - some of our listeners insist on locking the SolarMutex, which sometimes led to deadlocks on the complex test cases 2008-11-04 21:23:15 +0100 fs r263338 : remove SolarMutex locking - this happned in CWS dba31c (in the CVS version), which this CWS was created from, but seems to got lost during resync 2008-11-04 20:49:50 +0100 fs r263335 : docu formatting 2008-11-04 20:06:39 +0100 fs r263334 : #i95826# use m_aMutex, not a DocumentGuard (wrongly resolved merge conflicts) 2008-11-04 17:36:29 +0100 fs r263332 : #i92688# properly revoke as XEventListener from m_xActiveController when disposing 2008-11-04 14:49:34 +0100 fs r263324 : #i92322# enable Input Required if EmptyIsNULL does not exist at the control 2008-10-31 11:10:04 +0100 oj r262857 : merge from cvs to svn 2008-10-31 09:46:45 +0100 oj r262853 : merge from cvs to svn 2008-10-31 08:46:37 +0100 oj r262849 : merge from cvs to svn 2008-10-31 08:44:24 +0100 oj r262848 : merge from cvs to svn 2008-10-31 08:43:33 +0100 oj r262847 : merge from cvs to svn 2008-10-31 08:42:28 +0100 oj r262846 : merge from cvs to svn 2008-10-31 08:41:58 +0100 oj r262845 : merge from cvs to svn 2008-10-31 08:41:32 +0100 oj r262844 : merge from cvs to svn 2008-10-28 12:19:50 +0100 oj r262733 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:42 +0100 oj r262732 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:36 +0100 oj r262731 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:31 +0100 oj r262730 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:22 +0100 oj r262729 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:18 +0100 oj r262728 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:10 +0100 oj r262727 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:06 +0100 oj r262726 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:05 +0100 oj r262725 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:01 +0100 oj r262724 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:50 +0100 oj r262723 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:41 +0100 oj r262722 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:40 +0100 oj r262721 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:27 +0100 oj r262720 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:10 +0100 oj r262719 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:01 +0100 oj r262718 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:17:39 +0100 oj r262717 : #iXXXXX#: migrate CWS dba31e to SVN
2008-12-01 12:31:27 +00:00
m_pTreeView->setSelChangeHdl( LINK( this, SbaTableQueryBrowser, OnSelectionChange ) );
2000-10-26 13:46:14 +00:00
// TODO
2001-01-09 14:52:33 +00:00
getBrowserView()->getVclControl()->GetDataWindow().SetUniqueId(UID_DATABROWSE_DATAWINDOW);
getBrowserView()->getVclControl()->SetHelpId(HID_CTL_TABBROWSER);
getBrowserView()->SetUniqueId(UID_CTL_CONTENT);
if (getBrowserView()->getVclControl()->GetHeaderBar())
getBrowserView()->getVclControl()->GetHeaderBar()->SetHelpId(HID_DATABROWSE_HEADER);
2000-12-08 20:16:38 +00:00
InvalidateFeature(ID_BROWSER_EXPLORER);
2000-10-26 13:46:14 +00:00
}
return sal_True;
}
// -------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::InitializeForm(const Reference< ::com::sun::star::sdbc::XRowSet > & _rxForm)
{
2001-01-09 14:52:33 +00:00
if(!m_pCurrentlyDisplayed)
return sal_True;
2001-01-09 14:52:33 +00:00
// this method set all format settings from the orignal table or query
2000-10-26 13:46:14 +00:00
try
{
// we send all properties at once, maybe the implementation is clever enough to handle one big PropertiesChanged
// more effective than many small PropertyChanged ;)
2001-01-09 14:52:33 +00:00
Sequence< ::rtl::OUString> aProperties(3);
Sequence< Any> aValues(3);
DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(m_pCurrentlyDisplayed->GetUserData());
OSL_ENSURE( pData, "SbaTableQueryBrowser::InitializeForm: No user data set at the currently displayed entry!" );
OSL_ENSURE( pData->xObjectProperties.is(), "SbaTableQueryBrowser::InitializeForm: No table available!" );
2000-10-26 13:46:14 +00:00
if ( pData->xObjectProperties.is() )
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
{
sal_Int32 nPos = 0;
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
// is the filter intially applied ?
aProperties.getArray()[nPos] = PROPERTY_APPLYFILTER;
aValues.getArray()[nPos++] = pData->xObjectProperties->getPropertyValue(PROPERTY_APPLYFILTER);
2001-01-09 14:52:33 +00:00
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
// the initial filter
aProperties.getArray()[nPos] = PROPERTY_FILTER;
aValues.getArray()[nPos++] = pData->xObjectProperties->getPropertyValue(PROPERTY_FILTER);
if ( pData->xObjectProperties->getPropertySetInfo()->hasPropertyByName(PROPERTY_HAVING_CLAUSE) )
{
aProperties.realloc(aProperties.getLength()+1);
aValues.realloc(aValues.getLength()+1);
// the initial having clause
aProperties.getArray()[nPos] = PROPERTY_HAVING_CLAUSE;
aValues.getArray()[nPos++] = pData->xObjectProperties->getPropertyValue(PROPERTY_HAVING_CLAUSE);
}
2001-01-09 14:52:33 +00:00
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
// the initial ordering
aProperties.getArray()[nPos] = PROPERTY_ORDER;
aValues.getArray()[nPos++] = pData->xObjectProperties->getPropertyValue(PROPERTY_ORDER);
2001-01-09 14:52:33 +00:00
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
Reference< XMultiPropertySet > xFormMultiSet(_rxForm, UNO_QUERY);
xFormMultiSet->setPropertyValues(aProperties, aValues);
}
2000-10-26 13:46:14 +00:00
}
catch(Exception&)
2000-10-26 13:46:14 +00:00
{
DBG_ERROR("SbaTableQueryBrowser::InitializeForm : something went wrong !");
return sal_False;
}
return sal_True;
}
//------------------------------------------------------------------------------
void SbaTableQueryBrowser::initializePreviewMode()
{
if ( getBrowserView() && getBrowserView()->getVclControl() )
{
getBrowserView()->getVclControl()->AlwaysEnableInput( FALSE );
getBrowserView()->getVclControl()->EnableInput( FALSE );
getBrowserView()->getVclControl()->ForceHideScrollbars( sal_True );
}
Reference< XPropertySet > xDataSourceSet(getRowSet(), UNO_QUERY);
if ( xDataSourceSet.is() )
{
xDataSourceSet->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AllowInserts")),makeAny(sal_False));
xDataSourceSet->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AllowUpdates")),makeAny(sal_False));
xDataSourceSet->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AllowDeletes")),makeAny(sal_False));
}
}
2000-10-26 13:46:14 +00:00
//------------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::star::form::XFormComponent > & xGrid)
{
try
{
2000-11-23 11:27:21 +00:00
Reference< ::com::sun::star::form::XGridColumnFactory > xColFactory(xGrid, UNO_QUERY);
Reference< XNameContainer > xColContainer(xGrid, UNO_QUERY);
clearGridColumns( xColContainer );
2000-10-26 13:46:14 +00:00
Reference< XChild > xGridAsChild(xGrid, UNO_QUERY);
Reference< XLoadable > xFormAsLoadable;
if (xGridAsChild.is())
xFormAsLoadable = xFormAsLoadable.query(xGridAsChild->getParent());
if (xFormAsLoadable.is() && xFormAsLoadable->isLoaded())
2001-01-09 14:52:33 +00:00
{
// set the formats from the table
if(m_pCurrentlyDisplayed)
{
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
Sequence< ::rtl::OUString> aProperties(6 + ( m_bPreview ? 5 : 0 ));
Sequence< Any> aValues(7 + ( m_bPreview ? 5 : 0 ));
DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(m_pCurrentlyDisplayed->GetUserData());
OSL_ENSURE( pData->xObjectProperties.is(), "SbaTableQueryBrowser::InitializeGridModel: No table available!" );
if ( !pData->xObjectProperties.is() )
return sal_False;
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
::rtl::OUString* pStringIter = aProperties.getArray();
Any* pValueIter = aValues.getArray();
if ( m_bPreview )
{
*pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AlwaysShowCursor"));
*pValueIter++ <<= sal_False;
*pStringIter++ = PROPERTY_BORDER;
*pValueIter++ <<= sal_Int16(0);
}
*pStringIter++ = PROPERTY_FONT;
*pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_FONT);
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
*pStringIter++ = PROPERTY_TEXTEMPHASIS;
*pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_TEXTEMPHASIS);
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
*pStringIter++ = PROPERTY_TEXTRELIEF;
*pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_TEXTRELIEF);
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
if ( m_bPreview )
{
*pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasNavigationBar"));
*pValueIter++ <<= sal_False;
*pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasRecordMarker"));
*pValueIter++ <<= sal_False;
}
*pStringIter++ = PROPERTY_ROW_HEIGHT;
*pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_ROW_HEIGHT);
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
if ( m_bPreview )
{
*pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Tabstop"));
*pValueIter++ <<= sal_False;
}
*pStringIter++ = PROPERTY_TEXTCOLOR;
*pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_TEXTCOLOR);
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
*pStringIter++ = PROPERTY_TEXTLINECOLOR;
*pValueIter++ = pData->xObjectProperties->getPropertyValue(PROPERTY_TEXTLINECOLOR);
Reference< XMultiPropertySet > xFormMultiSet(xGrid, UNO_QUERY);
xFormMultiSet->setPropertyValues(aProperties, aValues);
}
2001-01-09 14:52:33 +00:00
// get the formats supplier of the database we're working with
Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier = getNumberFormatter()->getNumberFormatsSupplier();
2000-10-26 13:46:14 +00:00
Reference<XConnection> xConnection;
Reference<XPropertySet> xRowSetProps(getRowSet(),UNO_QUERY);
xRowSetProps->getPropertyValue( PROPERTY_ACTIVE_CONNECTION ) >>= xConnection;
OSL_ENSURE(xConnection.is(),"A ActiveConnection should normaly exists!");
2000-10-26 13:46:14 +00:00
Reference<XChild> xChild(xConnection,UNO_QUERY);
Reference<XPropertySet> xDataSourceProp(xChild->getParent(),UNO_QUERY);
sal_Bool bSuppressVersionCol = sal_False;
OSL_VERIFY( xDataSourceProp->getPropertyValue( PROPERTY_SUPPRESSVERSIONCL ) >>= bSuppressVersionCol );
2000-10-26 13:46:14 +00:00
// insert the column into the gridcontrol so that we see something :-)
::rtl::OUString aCurrentModelType;
Reference<XColumnsSupplier> xSupCols(getRowSet(),UNO_QUERY);
Reference<XNameAccess> xColumns = xSupCols->getColumns();
Sequence< ::rtl::OUString> aNames = xColumns->getElementNames();
const ::rtl::OUString* pIter = aNames.getConstArray();
const ::rtl::OUString* pEnd = pIter + aNames.getLength();
2000-10-26 13:46:14 +00:00
::rtl::OUString sDefaultProperty;
Reference< XPropertySet > xColumn;
Reference< XPropertySetInfo > xColPSI;
for (sal_uInt16 i=0; pIter != pEnd; ++i,++pIter)
2000-11-23 11:27:21 +00:00
{
xColumn.set( xColumns->getByName( *pIter ), UNO_QUERY_THROW );
xColPSI.set( xColumn->getPropertySetInfo(), UNO_SET_THROW );
// ignore the column when it is a rowversion one
if ( bSuppressVersionCol
&& xColPSI->hasPropertyByName( PROPERTY_ISROWVERSION )
&& ::cppu::any2bool( xColumn->getPropertyValue( PROPERTY_ISROWVERSION ) )
)
continue;
// use the result set column's type to determine the type of grid column to create
sal_Bool bFormattedIsNumeric = sal_True;
sal_Int32 nType = ::comphelper::getINT32( xColumn->getPropertyValue( PROPERTY_TYPE ) );
::std::vector< NamedValue > aInitialValues;
::std::vector< ::rtl::OUString > aCopyProperties;
switch(nType)
{
case DataType::BIT:
case DataType::BOOLEAN:
CWS-TOOLING: integrate CWS dba31e 2008-11-19 12:36:23 +0100 msc r263980 : i96104 2008-11-19 12:31:19 +0100 msc r263979 : i96104 2008-11-19 12:21:55 +0100 msc r263977 : i96104 2008-11-19 12:18:53 +0100 msc r263976 : i96104 2008-11-18 09:09:45 +0100 oj r263746 : disable color entry when area is set 2008-11-18 08:37:52 +0100 oj r263741 : #remove sub report entry 2008-11-17 11:20:25 +0100 fs r263708 : #i10000# 2008-11-17 11:06:52 +0100 fs r263706 : minimal version now is 3.1 2008-11-12 22:25:59 +0100 fs r263621 : #i96150# 2008-11-12 22:20:02 +0100 fs r263620 : rebased to m34 2008-11-12 21:39:41 +0100 fs r263618 : MANUAL REBASE: rebase CWS dba31d to DEV300_m34 2008-11-12 13:54:58 +0100 fs r263597 : #i96134# MediaDescriptor.URL is to be preferred over MediaDescriptor.FileName. Nonetheless, ensure both are handled 2008-11-12 13:53:40 +0100 fs r263596 : #i96134# re-enabled the code for #i41897#, a better fix is to come 2008-11-12 12:48:21 +0100 fs r263585 : #i96134# disable saving URLs of file-base databases relatively 2008-11-11 16:11:11 +0100 msc r263566 : #i96104# 2008-11-05 09:09:47 +0100 oj r263342 : #i88727# color noe added 2008-11-05 08:41:43 +0100 oj r263341 : #i77916# zoom added 2008-11-04 21:24:15 +0100 fs r263339 : disposing: call disposeAndClear without own mutex locked - some of our listeners insist on locking the SolarMutex, which sometimes led to deadlocks on the complex test cases 2008-11-04 21:23:15 +0100 fs r263338 : remove SolarMutex locking - this happned in CWS dba31c (in the CVS version), which this CWS was created from, but seems to got lost during resync 2008-11-04 20:49:50 +0100 fs r263335 : docu formatting 2008-11-04 20:06:39 +0100 fs r263334 : #i95826# use m_aMutex, not a DocumentGuard (wrongly resolved merge conflicts) 2008-11-04 17:36:29 +0100 fs r263332 : #i92688# properly revoke as XEventListener from m_xActiveController when disposing 2008-11-04 14:49:34 +0100 fs r263324 : #i92322# enable Input Required if EmptyIsNULL does not exist at the control 2008-10-31 11:10:04 +0100 oj r262857 : merge from cvs to svn 2008-10-31 09:46:45 +0100 oj r262853 : merge from cvs to svn 2008-10-31 08:46:37 +0100 oj r262849 : merge from cvs to svn 2008-10-31 08:44:24 +0100 oj r262848 : merge from cvs to svn 2008-10-31 08:43:33 +0100 oj r262847 : merge from cvs to svn 2008-10-31 08:42:28 +0100 oj r262846 : merge from cvs to svn 2008-10-31 08:41:58 +0100 oj r262845 : merge from cvs to svn 2008-10-31 08:41:32 +0100 oj r262844 : merge from cvs to svn 2008-10-28 12:19:50 +0100 oj r262733 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:42 +0100 oj r262732 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:36 +0100 oj r262731 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:31 +0100 oj r262730 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:22 +0100 oj r262729 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:18 +0100 oj r262728 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:10 +0100 oj r262727 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:06 +0100 oj r262726 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:05 +0100 oj r262725 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:01 +0100 oj r262724 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:50 +0100 oj r262723 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:41 +0100 oj r262722 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:40 +0100 oj r262721 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:27 +0100 oj r262720 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:10 +0100 oj r262719 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:01 +0100 oj r262718 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:17:39 +0100 oj r262717 : #iXXXXX#: migrate CWS dba31e to SVN
2008-12-01 12:31:27 +00:00
{
aCurrentModelType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CheckBox"));
aInitialValues.push_back( NamedValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VisualEffect" ) ), makeAny( VisualEffect::FLAT ) ) );
sDefaultProperty = PROPERTY_DEFAULTSTATE;
CWS-TOOLING: integrate CWS dba31e 2008-11-19 12:36:23 +0100 msc r263980 : i96104 2008-11-19 12:31:19 +0100 msc r263979 : i96104 2008-11-19 12:21:55 +0100 msc r263977 : i96104 2008-11-19 12:18:53 +0100 msc r263976 : i96104 2008-11-18 09:09:45 +0100 oj r263746 : disable color entry when area is set 2008-11-18 08:37:52 +0100 oj r263741 : #remove sub report entry 2008-11-17 11:20:25 +0100 fs r263708 : #i10000# 2008-11-17 11:06:52 +0100 fs r263706 : minimal version now is 3.1 2008-11-12 22:25:59 +0100 fs r263621 : #i96150# 2008-11-12 22:20:02 +0100 fs r263620 : rebased to m34 2008-11-12 21:39:41 +0100 fs r263618 : MANUAL REBASE: rebase CWS dba31d to DEV300_m34 2008-11-12 13:54:58 +0100 fs r263597 : #i96134# MediaDescriptor.URL is to be preferred over MediaDescriptor.FileName. Nonetheless, ensure both are handled 2008-11-12 13:53:40 +0100 fs r263596 : #i96134# re-enabled the code for #i41897#, a better fix is to come 2008-11-12 12:48:21 +0100 fs r263585 : #i96134# disable saving URLs of file-base databases relatively 2008-11-11 16:11:11 +0100 msc r263566 : #i96104# 2008-11-05 09:09:47 +0100 oj r263342 : #i88727# color noe added 2008-11-05 08:41:43 +0100 oj r263341 : #i77916# zoom added 2008-11-04 21:24:15 +0100 fs r263339 : disposing: call disposeAndClear without own mutex locked - some of our listeners insist on locking the SolarMutex, which sometimes led to deadlocks on the complex test cases 2008-11-04 21:23:15 +0100 fs r263338 : remove SolarMutex locking - this happned in CWS dba31c (in the CVS version), which this CWS was created from, but seems to got lost during resync 2008-11-04 20:49:50 +0100 fs r263335 : docu formatting 2008-11-04 20:06:39 +0100 fs r263334 : #i95826# use m_aMutex, not a DocumentGuard (wrongly resolved merge conflicts) 2008-11-04 17:36:29 +0100 fs r263332 : #i92688# properly revoke as XEventListener from m_xActiveController when disposing 2008-11-04 14:49:34 +0100 fs r263324 : #i92322# enable Input Required if EmptyIsNULL does not exist at the control 2008-10-31 11:10:04 +0100 oj r262857 : merge from cvs to svn 2008-10-31 09:46:45 +0100 oj r262853 : merge from cvs to svn 2008-10-31 08:46:37 +0100 oj r262849 : merge from cvs to svn 2008-10-31 08:44:24 +0100 oj r262848 : merge from cvs to svn 2008-10-31 08:43:33 +0100 oj r262847 : merge from cvs to svn 2008-10-31 08:42:28 +0100 oj r262846 : merge from cvs to svn 2008-10-31 08:41:58 +0100 oj r262845 : merge from cvs to svn 2008-10-31 08:41:32 +0100 oj r262844 : merge from cvs to svn 2008-10-28 12:19:50 +0100 oj r262733 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:42 +0100 oj r262732 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:36 +0100 oj r262731 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:31 +0100 oj r262730 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:22 +0100 oj r262729 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:18 +0100 oj r262728 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:10 +0100 oj r262727 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:06 +0100 oj r262726 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:05 +0100 oj r262725 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:01 +0100 oj r262724 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:50 +0100 oj r262723 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:41 +0100 oj r262722 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:40 +0100 oj r262721 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:27 +0100 oj r262720 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:10 +0100 oj r262719 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:01 +0100 oj r262718 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:17:39 +0100 oj r262717 : #iXXXXX#: migrate CWS dba31e to SVN
2008-12-01 12:31:27 +00:00
sal_Int32 nNullable = ColumnValue::NULLABLE_UNKNOWN;
OSL_VERIFY( xColumn->getPropertyValue( PROPERTY_ISNULLABLE ) >>= nNullable );
aInitialValues.push_back( NamedValue(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TriState" ) ),
makeAny( sal_Bool( ColumnValue::NO_NULLS != nNullable ) )
) );
}
break;
case DataType::LONGVARCHAR:
2009-11-11 14:09:11 +01:00
case DataType::CLOB:
aInitialValues.push_back( NamedValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MultiLine" ) ), makeAny( (sal_Bool)sal_True ) ) );
// NO break!
case DataType::BINARY:
case DataType::VARBINARY:
case DataType::LONGVARBINARY:
aCurrentModelType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TextField"));
sDefaultProperty = PROPERTY_DEFAULTTEXT;
break;
case DataType::VARCHAR:
case DataType::CHAR:
bFormattedIsNumeric = sal_False;
// NO break!
default:
aCurrentModelType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FormattedField"));
sDefaultProperty = PROPERTY_EFFECTIVEDEFAULT;
if ( xSupplier.is() )
aInitialValues.push_back( NamedValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FormatsSupplier")), makeAny( xSupplier ) ) );
aInitialValues.push_back( NamedValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TreatAsNumber")), makeAny( (sal_Bool)bFormattedIsNumeric ) ) );
aCopyProperties.push_back( PROPERTY_FORMATKEY );
break;
}
2000-11-23 11:27:21 +00:00
aInitialValues.push_back( NamedValue( PROPERTY_CONTROLSOURCE, makeAny( *pIter ) ) );
::rtl::OUString sLabel;
xColumn->getPropertyValue(PROPERTY_LABEL) >>= sLabel;
if ( sLabel.getLength() )
aInitialValues.push_back( NamedValue( PROPERTY_LABEL, makeAny( sLabel ) ) );
else
aInitialValues.push_back( NamedValue( PROPERTY_LABEL, makeAny( *pIter ) ) );
Reference< XPropertySet > xGridCol( xColFactory->createColumn( aCurrentModelType ), UNO_SET_THROW );
Reference< XPropertySetInfo > xGridColPSI( xGridCol->getPropertySetInfo(), UNO_SET_THROW );
// calculate the default
Any aDefault;
if ( xGridColPSI->hasPropertyByName( PROPERTY_CONTROLDEFAULT ) )
aDefault = xColumn->getPropertyValue( PROPERTY_CONTROLDEFAULT );
// default value
if ( nType == DataType::BIT || nType == DataType::BOOLEAN )
{
if ( aDefault.hasValue() )
2001-12-03 12:36:06 +00:00
aDefault <<= (comphelper::getString(aDefault).toInt32() == 0) ? (sal_Int16)STATE_NOCHECK : (sal_Int16)STATE_CHECK;
else
aDefault <<= ((sal_Int16)STATE_DONTKNOW);
}
2000-11-23 11:27:21 +00:00
if ( aDefault.hasValue() )
aInitialValues.push_back( NamedValue( sDefaultProperty, aDefault ) );
// transfer properties from the definition to the UNO-model :
aCopyProperties.push_back( PROPERTY_HIDDEN );
aCopyProperties.push_back( PROPERTY_WIDTH );
2000-11-23 11:27:21 +00:00
// help text to display for the column
CWS-TOOLING: integrate CWS dba32c 2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion 2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time 2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths 2009-06-29 10:08:54 +0200 fs r273455 : #i103138# refactored the code for positioning/zooming the control Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to take an additional ViewTransformation parameter, describing the transformation to obtain the actual control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter. This has become necessary since during painting, the device which we created our control for might not necessarily have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size, this would lead to wrong results. Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken. Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ... I consider it broken, since: - we need the map mode to obtain the proper zoom level, which is to be forwarded to the control - there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears). It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand one has no possibility to obtain the current zoom by other means. Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used, which means the controls have a zoom of "1:1" set, which is wrong here. 2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties 2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning 2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed 2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc 2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux 2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux 2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar 2009-06-15 14:11:27 +0200 fs r272983 : added since tag 2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted 2009-06-15 11:08:53 +0200 fs r272969 : #i10000# 2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701# 2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src 2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50) 2009-06-02 09:53:10 +0200 fs r272483 : #i10000# 2009-05-29 15:55:03 +0200 fs r272465 : #i100818# 2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any 2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition 2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex 2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed 2009-05-27 14:53:36 +0200 fs r272347 : #i10000# 2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast 2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly 2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used 2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function 2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well 2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution 2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set 2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition 2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria 2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR 2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein 2009-05-25 15:49:57 +0200 fs r272254 : #i999704# 2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property 2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString 2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein 2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property 2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property) 2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default 2009-05-25 14:39:31 +0200 fs r272243 : removed dead import 2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns 2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent 2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel 2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event 2009-05-22 21:42:47 +0200 fs r272211 : #i102003# 2009-05-22 21:42:20 +0200 fs r272210 : grammar 2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously 2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear 2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG 2009-05-22 12:03:42 +0200 fs r272180 : #i88878# provided by noel.power@novell.com implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs 2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them 2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values 2009-05-15 15:08:31 +0200 fs r271937 : includes 2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint 2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity 2009-05-15 10:15:44 +0200 fs r271928 : #i10000# 2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:23:23 +0200 fs r271919 : #i101622# 2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids 2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b) 2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48 2009-05-07 14:43:19 +0200 fs r271670 : #i101477# 2009-05-07 14:37:30 +0200 fs r271668 : #i101477# 2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch 2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics 2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47) 2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control 2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
Any aDescription;
if ( xColPSI->hasPropertyByName( PROPERTY_HELPTEXT ) )
CWS-TOOLING: integrate CWS dba32c 2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion 2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time 2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths 2009-06-29 10:08:54 +0200 fs r273455 : #i103138# refactored the code for positioning/zooming the control Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to take an additional ViewTransformation parameter, describing the transformation to obtain the actual control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter. This has become necessary since during painting, the device which we created our control for might not necessarily have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size, this would lead to wrong results. Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken. Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ... I consider it broken, since: - we need the map mode to obtain the proper zoom level, which is to be forwarded to the control - there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears). It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand one has no possibility to obtain the current zoom by other means. Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used, which means the controls have a zoom of "1:1" set, which is wrong here. 2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties 2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning 2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed 2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc 2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux 2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux 2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar 2009-06-15 14:11:27 +0200 fs r272983 : added since tag 2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted 2009-06-15 11:08:53 +0200 fs r272969 : #i10000# 2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701# 2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src 2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50) 2009-06-02 09:53:10 +0200 fs r272483 : #i10000# 2009-05-29 15:55:03 +0200 fs r272465 : #i100818# 2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any 2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition 2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex 2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed 2009-05-27 14:53:36 +0200 fs r272347 : #i10000# 2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast 2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly 2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used 2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function 2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well 2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution 2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set 2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition 2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria 2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR 2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein 2009-05-25 15:49:57 +0200 fs r272254 : #i999704# 2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property 2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString 2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein 2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property 2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property) 2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default 2009-05-25 14:39:31 +0200 fs r272243 : removed dead import 2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns 2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent 2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel 2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event 2009-05-22 21:42:47 +0200 fs r272211 : #i102003# 2009-05-22 21:42:20 +0200 fs r272210 : grammar 2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously 2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear 2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG 2009-05-22 12:03:42 +0200 fs r272180 : #i88878# provided by noel.power@novell.com implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs 2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them 2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values 2009-05-15 15:08:31 +0200 fs r271937 : includes 2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint 2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity 2009-05-15 10:15:44 +0200 fs r271928 : #i10000# 2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:23:23 +0200 fs r271919 : #i101622# 2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids 2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b) 2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48 2009-05-07 14:43:19 +0200 fs r271670 : #i101477# 2009-05-07 14:37:30 +0200 fs r271668 : #i101477# 2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch 2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics 2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47) 2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control 2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
aDescription = xColumn->getPropertyValue( PROPERTY_HELPTEXT );
::rtl::OUString sTemp;
aDescription >>= sTemp;
if ( !sTemp.getLength() )
xColumn->getPropertyValue( PROPERTY_DESCRIPTION ) >>= sTemp;
aDescription <<= sTemp;
aInitialValues.push_back( NamedValue( PROPERTY_HELPTEXT, aDescription ) );
2000-11-23 11:27:21 +00:00
// ... horizontal justify
CWS-TOOLING: integrate CWS dba32c 2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion 2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time 2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths 2009-06-29 10:08:54 +0200 fs r273455 : #i103138# refactored the code for positioning/zooming the control Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to take an additional ViewTransformation parameter, describing the transformation to obtain the actual control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter. This has become necessary since during painting, the device which we created our control for might not necessarily have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size, this would lead to wrong results. Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken. Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ... I consider it broken, since: - we need the map mode to obtain the proper zoom level, which is to be forwarded to the control - there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears). It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand one has no possibility to obtain the current zoom by other means. Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used, which means the controls have a zoom of "1:1" set, which is wrong here. 2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties 2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning 2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed 2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc 2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux 2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux 2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar 2009-06-15 14:11:27 +0200 fs r272983 : added since tag 2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted 2009-06-15 11:08:53 +0200 fs r272969 : #i10000# 2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701# 2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src 2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50) 2009-06-02 09:53:10 +0200 fs r272483 : #i10000# 2009-05-29 15:55:03 +0200 fs r272465 : #i100818# 2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any 2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition 2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex 2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed 2009-05-27 14:53:36 +0200 fs r272347 : #i10000# 2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast 2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly 2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used 2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function 2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well 2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution 2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set 2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition 2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria 2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR 2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein 2009-05-25 15:49:57 +0200 fs r272254 : #i999704# 2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property 2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString 2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein 2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property 2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property) 2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default 2009-05-25 14:39:31 +0200 fs r272243 : removed dead import 2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns 2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent 2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel 2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event 2009-05-22 21:42:47 +0200 fs r272211 : #i102003# 2009-05-22 21:42:20 +0200 fs r272210 : grammar 2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously 2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear 2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG 2009-05-22 12:03:42 +0200 fs r272180 : #i88878# provided by noel.power@novell.com implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs 2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them 2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values 2009-05-15 15:08:31 +0200 fs r271937 : includes 2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint 2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity 2009-05-15 10:15:44 +0200 fs r271928 : #i10000# 2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:23:23 +0200 fs r271919 : #i101622# 2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids 2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b) 2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48 2009-05-07 14:43:19 +0200 fs r271670 : #i101477# 2009-05-07 14:37:30 +0200 fs r271668 : #i101477# 2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch 2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics 2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47) 2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control 2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
Any aAlign; aAlign <<= sal_Int16( 0 );
Any aColAlign( xColumn->getPropertyValue( PROPERTY_ALIGN ) );
if ( aColAlign.hasValue() )
aAlign <<= sal_Int16( ::comphelper::getINT32( aColAlign ) );
aInitialValues.push_back( NamedValue( PROPERTY_ALIGN, aAlign ) );
// don't allow the mouse to scroll in the cells
if ( xGridColPSI->hasPropertyByName( PROPERTY_MOUSE_WHEEL_BEHAVIOR ) )
aInitialValues.push_back( NamedValue( PROPERTY_MOUSE_WHEEL_BEHAVIOR, makeAny( MouseWheelBehavior::SCROLL_DISABLED ) ) );
2000-11-23 11:27:21 +00:00
// now set all those values
for ( ::std::vector< NamedValue >::const_iterator property = aInitialValues.begin();
property != aInitialValues.end();
++property
)
{
xGridCol->setPropertyValue( property->Name, property->Value );
}
for ( ::std::vector< ::rtl::OUString >::const_iterator copyPropertyName = aCopyProperties.begin();
copyPropertyName != aCopyProperties.end();
++copyPropertyName
)
xGridCol->setPropertyValue( *copyPropertyName, xColumn->getPropertyValue( *copyPropertyName ) );
2000-11-23 11:27:21 +00:00
xColContainer->insertByName(*pIter, makeAny(xGridCol));
}
2000-11-23 11:27:21 +00:00
}
2000-10-26 13:46:14 +00:00
}
catch(Exception&)
2000-10-26 13:46:14 +00:00
{
DBG_UNHANDLED_EXCEPTION();
2000-10-26 13:46:14 +00:00
return sal_False;
}
return sal_True;
}
2001-01-09 14:52:33 +00:00
// -----------------------------------------------------------------------------
Reference<XPropertySet> getColumnHelper(SvLBoxEntry* _pCurrentlyDisplayed,const Reference<XPropertySet>& _rxSource)
{
Reference<XPropertySet> xRet;
if(_pCurrentlyDisplayed)
{
DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(_pCurrentlyDisplayed->GetUserData());
Reference<XColumnsSupplier> xColumnsSup(pData->xObjectProperties,UNO_QUERY);
2001-01-09 14:52:33 +00:00
Reference<XNameAccess> xNames = xColumnsSup->getColumns();
::rtl::OUString aName;
_rxSource->getPropertyValue(PROPERTY_NAME) >>= aName;
if(xNames.is() && xNames->hasByName(aName))
xRet.set(xNames->getByName(aName),UNO_QUERY);
2001-01-09 14:52:33 +00:00
}
return xRet;
}
2001-06-15 07:39:22 +00:00
// -----------------------------------------------------------------------
void SbaTableQueryBrowser::transferChangedControlProperty(const ::rtl::OUString& _rProperty, const Any& _rNewValue)
{
if(m_pCurrentlyDisplayed)
{
DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(m_pCurrentlyDisplayed->GetUserData());
Reference< XPropertySet > xObjectProps(pData->xObjectProperties, UNO_QUERY);
OSL_ENSURE(xObjectProps.is(),"SbaTableQueryBrowser::transferChangedControlProperty: no table/query object!");
if (xObjectProps.is())
xObjectProps->setPropertyValue(_rProperty, _rNewValue);
2001-06-15 07:39:22 +00:00
}
}
2000-10-26 13:46:14 +00:00
// -----------------------------------------------------------------------
2001-09-13 13:15:52 +00:00
void SbaTableQueryBrowser::propertyChange(const PropertyChangeEvent& evt) throw(::com::sun::star::uno::RuntimeException)
2000-10-26 13:46:14 +00:00
{
SbaXDataBrowserController::propertyChange(evt);
2001-01-09 14:52:33 +00:00
try
{
Reference< XPropertySet > xSource(evt.Source, UNO_QUERY);
if (!xSource.is())
return;
// one of the many properties which require us to update the definition ?
// a column's width ?
else if (evt.PropertyName.equals(PROPERTY_WIDTH))
{ // a column width has changed -> update the model
// (the update of the view is done elsewhere)
Reference<XPropertySet> xProp = getColumnHelper(m_pCurrentlyDisplayed,xSource);
if(xProp.is())
{
if(!evt.NewValue.hasValue())
xProp->setPropertyValue(PROPERTY_WIDTH,makeAny((sal_Int32)227));
else
xProp->setPropertyValue(PROPERTY_WIDTH,evt.NewValue);
}
}
// a column's 'visible' state ?
else if (evt.PropertyName.equals(PROPERTY_HIDDEN))
{
Reference<XPropertySet> xProp = getColumnHelper(m_pCurrentlyDisplayed,xSource);
if(xProp.is())
xProp->setPropertyValue(PROPERTY_HIDDEN,evt.NewValue);
}
// a columns alignment ?
else if (evt.PropertyName.equals(PROPERTY_ALIGN))
{
Reference<XPropertySet> xProp = getColumnHelper(m_pCurrentlyDisplayed,xSource);
2001-02-14 13:37:35 +00:00
try
2001-01-09 14:52:33 +00:00
{
2001-02-14 13:37:35 +00:00
if(xProp.is())
{
if(evt.NewValue.hasValue())
{
sal_Int16 nAlign = 0;
if(evt.NewValue >>= nAlign)
xProp->setPropertyValue(PROPERTY_ALIGN,makeAny(sal_Int32(nAlign)));
else
xProp->setPropertyValue(PROPERTY_ALIGN,evt.NewValue);
}
else
xProp->setPropertyValue(PROPERTY_ALIGN,makeAny(::com::sun::star::awt::TextAlign::LEFT));
2001-02-14 13:37:35 +00:00
}
}
catch( const Exception& )
2001-02-14 13:37:35 +00:00
{
DBG_UNHANDLED_EXCEPTION();
2001-01-09 14:52:33 +00:00
}
}
// a column's format ?
else if ( (evt.PropertyName.equals(PROPERTY_FORMATKEY))
&& (TypeClass_LONG == evt.NewValue.getValueTypeClass())
)
{
// update the model (means the definition object)
Reference<XPropertySet> xProp = getColumnHelper(m_pCurrentlyDisplayed,xSource);
if(xProp.is())
xProp->setPropertyValue(PROPERTY_FORMATKEY,evt.NewValue);
}
// some table definition properties ?
// the height of the rows in the grid ?
else if (evt.PropertyName.equals(PROPERTY_ROW_HEIGHT))
{
if(m_pCurrentlyDisplayed)
{
DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(m_pCurrentlyDisplayed->GetUserData());
OSL_ENSURE( pData->xObjectProperties.is(), "No table available!" );
2001-01-09 14:52:33 +00:00
sal_Bool bDefault = !evt.NewValue.hasValue();
if (bDefault)
pData->xObjectProperties->setPropertyValue(PROPERTY_ROW_HEIGHT,makeAny((sal_Int32)45));
2001-01-09 14:52:33 +00:00
else
pData->xObjectProperties->setPropertyValue(PROPERTY_ROW_HEIGHT,evt.NewValue);
2001-01-09 14:52:33 +00:00
}
}
2001-06-15 07:39:22 +00:00
else if ( evt.PropertyName.equals(PROPERTY_FONT) // the font ?
|| evt.PropertyName.equals(PROPERTY_TEXTCOLOR) // the text color ?
|| evt.PropertyName.equals(PROPERTY_FILTER) // the filter ?
|| evt.PropertyName.equals(PROPERTY_HAVING_CLAUSE) // the having clause ?
2001-06-15 07:39:22 +00:00
|| evt.PropertyName.equals(PROPERTY_ORDER) // the sort ?
|| evt.PropertyName.equals(PROPERTY_APPLYFILTER) // the appliance of the filter ?
|| evt.PropertyName.equals(PROPERTY_TEXTLINECOLOR) // the text line color ?
|| evt.PropertyName.equals(PROPERTY_TEXTEMPHASIS) // the text emphasis ?
|| evt.PropertyName.equals(PROPERTY_TEXTRELIEF) // the text relief ?
)
2001-01-09 14:52:33 +00:00
{
2001-06-15 07:39:22 +00:00
transferChangedControlProperty(evt.PropertyName, evt.NewValue);
2001-01-09 14:52:33 +00:00
}
}
catch( const Exception& )
2001-01-09 14:52:33 +00:00
{
DBG_UNHANDLED_EXCEPTION();
2001-01-09 14:52:33 +00:00
}
2000-10-26 13:46:14 +00:00
}
// -----------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::suspend(sal_Bool bSuspend) throw( RuntimeException )
{
SolarMutexGuard aSolarGuard;
CWS-TOOLING: integrate CWS dba31e 2008-11-19 12:36:23 +0100 msc r263980 : i96104 2008-11-19 12:31:19 +0100 msc r263979 : i96104 2008-11-19 12:21:55 +0100 msc r263977 : i96104 2008-11-19 12:18:53 +0100 msc r263976 : i96104 2008-11-18 09:09:45 +0100 oj r263746 : disable color entry when area is set 2008-11-18 08:37:52 +0100 oj r263741 : #remove sub report entry 2008-11-17 11:20:25 +0100 fs r263708 : #i10000# 2008-11-17 11:06:52 +0100 fs r263706 : minimal version now is 3.1 2008-11-12 22:25:59 +0100 fs r263621 : #i96150# 2008-11-12 22:20:02 +0100 fs r263620 : rebased to m34 2008-11-12 21:39:41 +0100 fs r263618 : MANUAL REBASE: rebase CWS dba31d to DEV300_m34 2008-11-12 13:54:58 +0100 fs r263597 : #i96134# MediaDescriptor.URL is to be preferred over MediaDescriptor.FileName. Nonetheless, ensure both are handled 2008-11-12 13:53:40 +0100 fs r263596 : #i96134# re-enabled the code for #i41897#, a better fix is to come 2008-11-12 12:48:21 +0100 fs r263585 : #i96134# disable saving URLs of file-base databases relatively 2008-11-11 16:11:11 +0100 msc r263566 : #i96104# 2008-11-05 09:09:47 +0100 oj r263342 : #i88727# color noe added 2008-11-05 08:41:43 +0100 oj r263341 : #i77916# zoom added 2008-11-04 21:24:15 +0100 fs r263339 : disposing: call disposeAndClear without own mutex locked - some of our listeners insist on locking the SolarMutex, which sometimes led to deadlocks on the complex test cases 2008-11-04 21:23:15 +0100 fs r263338 : remove SolarMutex locking - this happned in CWS dba31c (in the CVS version), which this CWS was created from, but seems to got lost during resync 2008-11-04 20:49:50 +0100 fs r263335 : docu formatting 2008-11-04 20:06:39 +0100 fs r263334 : #i95826# use m_aMutex, not a DocumentGuard (wrongly resolved merge conflicts) 2008-11-04 17:36:29 +0100 fs r263332 : #i92688# properly revoke as XEventListener from m_xActiveController when disposing 2008-11-04 14:49:34 +0100 fs r263324 : #i92322# enable Input Required if EmptyIsNULL does not exist at the control 2008-10-31 11:10:04 +0100 oj r262857 : merge from cvs to svn 2008-10-31 09:46:45 +0100 oj r262853 : merge from cvs to svn 2008-10-31 08:46:37 +0100 oj r262849 : merge from cvs to svn 2008-10-31 08:44:24 +0100 oj r262848 : merge from cvs to svn 2008-10-31 08:43:33 +0100 oj r262847 : merge from cvs to svn 2008-10-31 08:42:28 +0100 oj r262846 : merge from cvs to svn 2008-10-31 08:41:58 +0100 oj r262845 : merge from cvs to svn 2008-10-31 08:41:32 +0100 oj r262844 : merge from cvs to svn 2008-10-28 12:19:50 +0100 oj r262733 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:42 +0100 oj r262732 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:36 +0100 oj r262731 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:31 +0100 oj r262730 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:22 +0100 oj r262729 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:18 +0100 oj r262728 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:10 +0100 oj r262727 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:06 +0100 oj r262726 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:05 +0100 oj r262725 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:01 +0100 oj r262724 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:50 +0100 oj r262723 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:41 +0100 oj r262722 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:40 +0100 oj r262721 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:27 +0100 oj r262720 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:10 +0100 oj r262719 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:01 +0100 oj r262718 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:17:39 +0100 oj r262717 : #iXXXXX#: migrate CWS dba31e to SVN
2008-12-01 12:31:27 +00:00
::osl::MutexGuard aGuard( getMutex() );
if ( getView() && getView()->IsInModalMode() )
return sal_False;
sal_Bool bRet = sal_False;
if ( !m_bInSuspend )
{
m_bInSuspend = sal_True;
if ( rBHelper.bDisposed )
throw DisposedException( ::rtl::OUString(), *this );
bRet = SbaXDataBrowserController::suspend(bSuspend);
2008-10-01 12:28:29 +00:00
if ( bRet && getView() )
getView()->Hide();
m_bInSuspend = sal_False;
}
2000-10-26 13:46:14 +00:00
return bRet;
2000-10-26 13:46:14 +00:00
}
// -------------------------------------------------------------------------
void SAL_CALL SbaTableQueryBrowser::statusChanged( const FeatureStateEvent& _rEvent ) throw(RuntimeException)
2000-10-26 13:46:14 +00:00
{
// search the external dispatcher causing this call
Reference< XDispatch > xSource(_rEvent.Source, UNO_QUERY);
ExternalFeaturesMap::iterator aLoop;
for ( aLoop = m_aExternalFeatures.begin();
aLoop != m_aExternalFeatures.end();
++aLoop
)
{
if ( _rEvent.FeatureURL.Complete == aLoop->second.aURL.Complete)
{
2011-02-03 00:33:36 +01:00
OSL_ENSURE( xSource.get() == aLoop->second.xDispatcher.get(), "SbaTableQueryBrowser::statusChanged: inconsistent!" );
// update the enabled state
aLoop->second.bEnabled = _rEvent.IsEnabled;
switch ( aLoop->first )
{
case ID_BROWSER_DOCUMENT_DATASOURCE:
{
// if it's the slot for the document data source, remember the state
Sequence< PropertyValue > aDescriptor;
#if OSL_DEBUG_LEVEL > 0
sal_Bool bProperFormat =
#endif
_rEvent.State >>= aDescriptor;
OSL_ENSURE(bProperFormat, "SbaTableQueryBrowser::statusChanged: need a data access descriptor here!");
m_aDocumentDataSource.initializeFrom(aDescriptor);
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
OSL_ENSURE( ( m_aDocumentDataSource.has(daDataSource)
|| m_aDocumentDataSource.has(daDatabaseLocation)
)
&& m_aDocumentDataSource.has(daCommand)
&& m_aDocumentDataSource.has(daCommandType),
"SbaTableQueryBrowser::statusChanged: incomplete descriptor!");
// check if we know the object which is set as document data source
checkDocumentDataSource();
}
break;
default:
// update the toolbox
implCheckExternalSlot( aLoop->first );
break;
}
break;
}
}
2011-02-03 00:33:36 +01:00
OSL_ENSURE(aLoop != m_aExternalFeatures.end(), "SbaTableQueryBrowser::statusChanged: don't know who sent this!");
}
2000-10-26 13:46:14 +00:00
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::checkDocumentDataSource()
{
SvLBoxEntry* pDataSourceEntry = NULL;
SvLBoxEntry* pContainerEntry = NULL;
SvLBoxEntry* pObjectEntry = getObjectEntry( m_aDocumentDataSource, &pDataSourceEntry, &pContainerEntry, sal_False );
sal_Bool bKnownDocDataSource = (NULL != pObjectEntry);
if (!bKnownDocDataSource)
{
if (NULL != pDataSourceEntry)
2010-11-24 01:07:16 +00:00
{ // at least the data source is known
if (NULL != pContainerEntry)
bKnownDocDataSource = sal_True; // assume we know it.
// TODO: should we expand the object container? This may be too expensive just for checking ....
else
{
if ((NULL == pObjectEntry) && m_aDocumentDataSource.has(daCommandType) && m_aDocumentDataSource.has(daCommand))
{ // maybe we have a command to be displayed ?
sal_Int32 nCommandType = CommandType::TABLE;
m_aDocumentDataSource[daCommandType] >>= nCommandType;
::rtl::OUString sCommand;
m_aDocumentDataSource[daCommand] >>= sCommand;
bKnownDocDataSource = (CommandType::COMMAND == nCommandType) && (0 != sCommand.getLength());
}
}
}
}
if ( !bKnownDocDataSource )
m_aExternalFeatures[ ID_BROWSER_DOCUMENT_DATASOURCE ].bEnabled = sal_False;
// update the toolbox
implCheckExternalSlot(ID_BROWSER_DOCUMENT_DATASOURCE);
}
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::extractDescriptorProps(const ::svx::ODataAccessDescriptor& _rDescriptor, ::rtl::OUString& _rDataSource, ::rtl::OUString& _rCommand, sal_Int32& _rCommandType, sal_Bool& _rEscapeProcessing)
{
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
_rDataSource = _rDescriptor.getDataSource();
if ( _rDescriptor.has(daCommand) )
_rDescriptor[daCommand] >>= _rCommand;
if ( _rDescriptor.has(daCommandType) )
_rDescriptor[daCommandType] >>= _rCommandType;
// escape processing is the only one allowed not to be present
_rEscapeProcessing = sal_True;
if (_rDescriptor.has(daEscapeProcessing))
_rEscapeProcessing = ::cppu::any2bool(_rDescriptor[daEscapeProcessing]);
}
// -------------------------------------------------------------------------
namespace
{
bool getDataSourceDisplayName_isURL( const String& _rDS, String& _rDisplayName, String& _rUniqueId )
{
INetURLObject aURL( _rDS );
if ( aURL.GetProtocol() != INET_PROT_NOT_VALID )
{
_rDisplayName = aURL.getBase(INetURLObject::LAST_SEGMENT,true,INetURLObject::DECODE_WITH_CHARSET);
_rUniqueId = aURL.GetMainURL( INetURLObject::NO_DECODE );
return true;
}
_rDisplayName = _rDS;
_rUniqueId = String();
return false;
}
// .....................................................................
struct FilterByEntryDataId : public IEntryFilter
{
String sId;
FilterByEntryDataId( const String& _rId ) : sId( _rId ) { }
virtual ~FilterByEntryDataId() {}
virtual bool includeEntry( SvLBoxEntry* _pEntry ) const;
};
bool FilterByEntryDataId::includeEntry( SvLBoxEntry* _pEntry ) const
{
DBTreeListUserData* pData = static_cast< DBTreeListUserData* >( _pEntry->GetUserData() );
return ( !pData || ( pData->sAccessor == sId ) );
}
}
// -------------------------------------------------------------------------
String SbaTableQueryBrowser::getDataSourceAcessor( SvLBoxEntry* _pDataSourceEntry ) const
{
2011-02-03 00:33:36 +01:00
OSL_ENSURE( _pDataSourceEntry, "SbaTableQueryBrowser::getDataSourceAcessor: invalid entry!" );
DBTreeListUserData* pData = static_cast< DBTreeListUserData* >( _pDataSourceEntry->GetUserData() );
2011-02-03 00:33:36 +01:00
OSL_ENSURE( pData, "SbaTableQueryBrowser::getDataSourceAcessor: invalid entry data!" );
OSL_ENSURE( pData->eType == etDatasource, "SbaTableQueryBrowser::getDataSourceAcessor: entry does not denote a data source!" );
return pData->sAccessor.Len() ? pData->sAccessor : GetEntryText( _pDataSourceEntry );
}
// -------------------------------------------------------------------------
SvLBoxEntry* SbaTableQueryBrowser::getObjectEntry(const ::rtl::OUString& _rDataSource, const ::rtl::OUString& _rCommand, sal_Int32 _nCommandType,
SvLBoxEntry** _ppDataSourceEntry, SvLBoxEntry** _ppContainerEntry, sal_Bool _bExpandAncestors,
const SharedConnection& _rxConnection )
{
if (_ppDataSourceEntry)
*_ppDataSourceEntry = NULL;
if (_ppContainerEntry)
*_ppContainerEntry = NULL;
SvLBoxEntry* pObject = NULL;
if ( m_pTreeView )
{
// look for the data source entry
String sDisplayName, sDataSourceId;
bool bIsDataSourceURL = getDataSourceDisplayName_isURL( _rDataSource, sDisplayName, sDataSourceId );
// the display name may differ from the URL for readability reasons
// #i33699# - 2004-09-24 - fs@openoffice.org
FilterByEntryDataId aFilter( sDataSourceId );
SvLBoxEntry* pDataSource = m_pTreeView->getListBox().GetEntryPosByName( sDisplayName, NULL, &aFilter );
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
if ( !pDataSource ) // check if the data source name is a file location
{
if ( bIsDataSourceURL )
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
{
// special case, the data source is a URL
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
// add new entries to the list box model
implAddDatasource( _rDataSource, _rxConnection );
pDataSource = m_pTreeView->getListBox().GetEntryPosByName( sDisplayName, NULL, &aFilter );
2011-02-03 00:33:36 +01:00
OSL_ENSURE( pDataSource, "SbaTableQueryBrowser::getObjectEntry: hmm - did not find it again!" );
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
}
}
if (_ppDataSourceEntry)
// (caller wants to have it ...)
*_ppDataSourceEntry = pDataSource;
if (pDataSource)
{
// expand if required so
if (_bExpandAncestors)
m_pTreeView->getListBox().Expand(pDataSource);
// look for the object container
SvLBoxEntry* pCommandType = NULL;
switch (_nCommandType)
{
case CommandType::TABLE:
pCommandType = m_pTreeView->getListBox().GetModel()->GetEntry(pDataSource, CONTAINER_TABLES);
break;
case CommandType::QUERY:
pCommandType = m_pTreeView->getListBox().GetModel()->GetEntry(pDataSource, CONTAINER_QUERIES);
break;
}
if (_ppContainerEntry)
*_ppContainerEntry = pCommandType;
if (pCommandType)
{
// expand if required so
if (_bExpandAncestors)
{
m_pTreeView->getListBox().Expand(pCommandType);
}
// look for the object
::rtl::OUString sCommand = _rCommand;
sal_Int32 nIndex = 0;
do
{
::rtl::OUString sPath = sCommand.getToken( 0, '/', nIndex );
pObject = m_pTreeView->getListBox().GetEntryPosByName(sPath, pCommandType);
pCommandType = pObject;
2010-01-07 09:06:53 +01:00
if ( nIndex >= 0 )
{
if (ensureEntryObject(pObject))
{
DBTreeListUserData* pParentData = static_cast< DBTreeListUserData* >( pObject->GetUserData() );
Reference< XNameAccess > xCollection( pParentData->xContainer, UNO_QUERY );
sal_Int32 nIndex2 = nIndex;
sPath = sCommand.getToken( 0, '/', nIndex2 );
try
{
if ( xCollection->hasByName(sPath) )
{
if(!m_pTreeView->getListBox().GetEntryPosByName(sPath,pObject))
{
Reference<XNameAccess> xChild(xCollection->getByName(sPath),UNO_QUERY);
DBTreeListUserData* pEntryData = new DBTreeListUserData;
pEntryData->eType = etQuery;
if ( xChild.is() )
{
pEntryData->eType = etQueryContainer;
}
implAppendEntry( pObject, sPath, pEntryData, pEntryData->eType );
}
}
}
catch(Exception&)
{
DBG_ERROR("SbaTableQueryBrowser::populateTree: could not fill the tree");
}
}
}
}
while ( nIndex >= 0 );
}
}
}
return pObject;
}
// -------------------------------------------------------------------------
SvLBoxEntry* SbaTableQueryBrowser::getObjectEntry(const ::svx::ODataAccessDescriptor& _rDescriptor,
SvLBoxEntry** _ppDataSourceEntry, SvLBoxEntry** _ppContainerEntry,
sal_Bool _bExpandAncestors)
{
// extract the props from the descriptor
::rtl::OUString sDataSource;
::rtl::OUString sCommand;
sal_Int32 nCommandType = CommandType::COMMAND;
sal_Bool bEscapeProcessing = sal_True;
extractDescriptorProps(_rDescriptor, sDataSource, sCommand, nCommandType, bEscapeProcessing);
return getObjectEntry( sDataSource, sCommand, nCommandType, _ppDataSourceEntry, _ppContainerEntry, _bExpandAncestors, SharedConnection() );
}
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::connectExternalDispatches()
{
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
Reference< XDispatchProvider > xProvider( getFrame(), UNO_QUERY );
2011-02-03 00:33:36 +01:00
OSL_ENSURE(xProvider.is(), "SbaTableQueryBrowser::connectExternalDispatches: no DispatchProvider !");
if (xProvider.is())
{
if ( m_aExternalFeatures.empty() )
{
const sal_Char* pURLs[] = {
".uno:DataSourceBrowser/DocumentDataSource",
".uno:DataSourceBrowser/FormLetter",
".uno:DataSourceBrowser/InsertColumns",
".uno:DataSourceBrowser/InsertContent",
};
const sal_uInt16 nIds[] = {
ID_BROWSER_DOCUMENT_DATASOURCE,
ID_BROWSER_FORMLETTER,
ID_BROWSER_INSERTCOLUMNS,
ID_BROWSER_INSERTCONTENT
};
2010-10-09 22:17:25 -05:00
for ( size_t i=0; i < SAL_N_ELEMENTS( pURLs ); ++i )
{
URL aURL;
aURL.Complete = ::rtl::OUString::createFromAscii( pURLs[i] );
if ( m_xUrlTransformer.is() )
m_xUrlTransformer->parseStrict( aURL );
m_aExternalFeatures[ nIds[ i ] ] = ExternalFeature( aURL );
}
}
for ( ExternalFeaturesMap::iterator feature = m_aExternalFeatures.begin();
feature != m_aExternalFeatures.end();
++feature
)
{
feature->second.xDispatcher = xProvider->queryDispatch(
feature->second.aURL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_parent")), FrameSearchFlag::PARENT
);
if ( feature->second.xDispatcher.get() == static_cast< XDispatch* >( this ) )
{
OSL_ENSURE( sal_False, "SbaTableQueryBrowser::connectExternalDispatches: this should not happen anymore!" );
// (nowadays, the URLs aren't in our SupportedFeatures list anymore, so we should
// not supply a dispatcher for this)
feature->second.xDispatcher.clear();
}
if ( feature->second.xDispatcher.is() )
{
try
{
feature->second.xDispatcher->addStatusListener( this, feature->second.aURL );
}
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
}
implCheckExternalSlot( feature->first );
}
}
}
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::implCheckExternalSlot( sal_uInt16 _nId )
{
if ( !m_xMainToolbar.is() )
return;
Window* pToolboxWindow = VCLUnoHelper::GetWindow( m_xMainToolbar );
ToolBox* pToolbox = dynamic_cast< ToolBox* >( pToolboxWindow );
OSL_ENSURE( pToolbox, "SbaTableQueryBrowser::implCheckExternalSlot: cannot obtain the toolbox window!" );
// check if we have to hide this item from the toolbox
if ( pToolbox )
{
sal_Bool bHaveDispatcher = m_aExternalFeatures[ _nId ].xDispatcher.is();
if ( bHaveDispatcher != pToolbox->IsItemVisible( _nId ) )
bHaveDispatcher ? pToolbox->ShowItem( _nId ) : pToolbox->HideItem( _nId );
}
// and invalidate this feature in general
InvalidateFeature( _nId );
}
// -------------------------------------------------------------------------
void SAL_CALL SbaTableQueryBrowser::disposing( const EventObject& _rSource ) throw(RuntimeException)
{
// our frame ?
Reference< ::com::sun::star::frame::XFrame > xSourceFrame(_rSource.Source, UNO_QUERY);
if (m_xCurrentFrameParent.is() && (xSourceFrame == m_xCurrentFrameParent))
m_xCurrentFrameParent->removeFrameActionListener((::com::sun::star::frame::XFrameActionListener*)this);
else
2000-10-26 13:46:14 +00:00
{
// search the external dispatcher causing this call in our map
Reference< XDispatch > xSource(_rSource.Source, UNO_QUERY);
if(xSource.is())
2000-10-26 13:46:14 +00:00
{
for ( ExternalFeaturesMap::iterator aLoop = m_aExternalFeatures.begin();
aLoop != m_aExternalFeatures.end();
++aLoop
)
2001-01-09 14:52:33 +00:00
{
if ( aLoop->second.xDispatcher.get() == xSource.get() )
{
ExternalFeaturesMap::iterator aPrevious = aLoop;
--aPrevious;
// remove it
m_aExternalFeatures.erase( aLoop );
// maybe update the UI
implCheckExternalSlot(aLoop->first);
2001-01-09 14:52:33 +00:00
// continue, the same XDispatch may be resposible for more than one URL
aLoop = aPrevious;
}
2001-01-09 14:52:33 +00:00
}
}
else
{
Reference<XConnection> xCon(_rSource.Source, UNO_QUERY);
if ( xCon.is() && m_pTreeView )
{ // our connection is in dispose so we have to find the entry equal with this connection
// and close it what means to collapse the entry
// get the top-level representing the removed data source
SvLBoxEntry* pDSLoop = m_pTreeView->getListBox().FirstChild(NULL);
while (pDSLoop)
2001-01-09 14:52:33 +00:00
{
DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(pDSLoop->GetUserData());
if ( pData && pData->xConnection == xCon )
{
2010-11-24 01:07:16 +00:00
// we set the connection to null to avoid a second disposing of the connection
pData->xConnection.clear();
closeConnection(pDSLoop,sal_False);
break;
}
pDSLoop = m_pTreeView->getListBox().NextSibling(pDSLoop);
}
2001-01-09 14:52:33 +00:00
}
else
SbaXDataBrowserController::disposing(_rSource);
}
}
}
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::implRemoveStatusListeners()
{
// clear all old dispatches
for ( ExternalFeaturesMap::const_iterator aLoop = m_aExternalFeatures.begin();
aLoop != m_aExternalFeatures.end();
++aLoop
)
{
if ( aLoop->second.xDispatcher.is() )
{
try
{
aLoop->second.xDispatcher->removeStatusListener( this, aLoop->second.aURL );
}
catch (Exception&)
{
DBG_ERROR("SbaTableQueryBrowser::implRemoveStatusListeners: could not remove a status listener!");
}
2000-10-26 13:46:14 +00:00
}
}
m_aExternalFeatures.clear();
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL SbaTableQueryBrowser::select( const Any& _rSelection ) throw (IllegalArgumentException, RuntimeException)
{
SolarMutexGuard aGuard;
2002-02-13 08:55:15 +00:00
// doin' a lot of VCL stuff here -> lock the SolarMutex
Sequence< PropertyValue > aDescriptorSequence;
if (!(_rSelection >>= aDescriptorSequence))
throw IllegalArgumentException(::rtl::OUString(), *this, 1);
// TODO: error message
ODataAccessDescriptor aDescriptor;
try
{
aDescriptor = ODataAccessDescriptor(aDescriptorSequence);
}
catch(const Exception&)
{
OSL_ENSURE(sal_False, "SbaTableQueryBrowser::select: could not extract the descriptor!");
}
// check the precense of the props we need
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
if ( !(aDescriptor.has(daDataSource) || aDescriptor.has(daDatabaseLocation)) || !aDescriptor.has(daCommand) || !aDescriptor.has(daCommandType))
throw IllegalArgumentException(::rtl::OUString(), *this, 1);
// TODO: error message
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
return implSelect(aDescriptor,sal_True);
}
// -------------------------------------------------------------------------
Any SAL_CALL SbaTableQueryBrowser::getSelection( ) throw (RuntimeException)
{
Any aReturn;
try
{
Reference< XLoadable > xLoadable(getRowSet(), UNO_QUERY);
if (xLoadable.is() && xLoadable->isLoaded())
{
2001-06-22 09:33:50 +00:00
Reference< XPropertySet > aFormProps(getRowSet(), UNO_QUERY);
ODataAccessDescriptor aDescriptor(aFormProps);
// remove properties which are not part of our "selection"
aDescriptor.erase(daConnection);
aDescriptor.erase(daCursor);
aReturn <<= aDescriptor.createPropertyValueSequence();
}
}
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
return aReturn;
}
// -------------------------------------------------------------------------
void SAL_CALL SbaTableQueryBrowser::addSelectionChangeListener( const Reference< XSelectionChangeListener >& _rxListener ) throw (RuntimeException)
{
m_aSelectionListeners.addInterface(_rxListener);
}
// -------------------------------------------------------------------------
void SAL_CALL SbaTableQueryBrowser::removeSelectionChangeListener( const Reference< XSelectionChangeListener >& _rxListener ) throw (RuntimeException)
{
m_aSelectionListeners.removeInterface(_rxListener);
}
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::attachFrame(const Reference< ::com::sun::star::frame::XFrame > & _xFrame) throw( RuntimeException )
{
implRemoveStatusListeners();
if (m_xCurrentFrameParent.is())
m_xCurrentFrameParent->removeFrameActionListener((::com::sun::star::frame::XFrameActionListener*)this);
SbaXDataBrowserController::attachFrame(_xFrame);
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
Reference< XFrame > xCurrentFrame( getFrame() );
if ( xCurrentFrame.is() )
{
m_xCurrentFrameParent = xCurrentFrame->findFrame(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_parent")),FrameSearchFlag::PARENT);
if ( m_xCurrentFrameParent.is() )
m_xCurrentFrameParent->addFrameActionListener((::com::sun::star::frame::XFrameActionListener*)this);
// obtain our toolbox
try
{
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
Reference< XPropertySet > xFrameProps( m_aCurrentFrame.getFrame(), UNO_QUERY_THROW );
Reference< XLayoutManager > xLayouter(
xFrameProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" ) ) ),
UNO_QUERY );
if ( xLayouter.is() )
{
Reference< XUIElement > xUI(
xLayouter->getElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/toolbar" ) ) ),
UNO_SET_THROW );
m_xMainToolbar = m_xMainToolbar.query( xUI->getRealInterface() );
OSL_ENSURE( m_xMainToolbar.is(), "SbaTableQueryBrowser::attachFrame: where's my toolbox?" );
}
}
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
}
// get the dispatchers for the external slots
connectExternalDispatches();
2000-10-26 13:46:14 +00:00
}
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::addModelListeners(const Reference< ::com::sun::star::awt::XControlModel > & _xGridControlModel)
{
SbaXDataBrowserController::addModelListeners(_xGridControlModel);
2001-06-15 07:39:22 +00:00
Reference< XPropertySet > xSourceSet(_xGridControlModel, UNO_QUERY);
if (xSourceSet.is())
2000-10-26 13:46:14 +00:00
{
xSourceSet->addPropertyChangeListener(PROPERTY_ROW_HEIGHT, static_cast<XPropertyChangeListener*>(this));
xSourceSet->addPropertyChangeListener(PROPERTY_FONT, static_cast<XPropertyChangeListener*>(this));
xSourceSet->addPropertyChangeListener(PROPERTY_TEXTCOLOR, static_cast<XPropertyChangeListener*>(this));
xSourceSet->addPropertyChangeListener(PROPERTY_TEXTLINECOLOR, static_cast<XPropertyChangeListener*>(this));
xSourceSet->addPropertyChangeListener(PROPERTY_TEXTEMPHASIS, static_cast<XPropertyChangeListener*>(this));
xSourceSet->addPropertyChangeListener(PROPERTY_TEXTRELIEF, static_cast<XPropertyChangeListener*>(this));
2000-10-26 13:46:14 +00:00
}
}
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::removeModelListeners(const Reference< ::com::sun::star::awt::XControlModel > & _xGridControlModel)
{
SbaXDataBrowserController::removeModelListeners(_xGridControlModel);
Reference< XPropertySet > xSourceSet(_xGridControlModel, UNO_QUERY);
if (xSourceSet.is())
{
xSourceSet->removePropertyChangeListener(PROPERTY_ROW_HEIGHT, static_cast<XPropertyChangeListener*>(this));
xSourceSet->removePropertyChangeListener(PROPERTY_FONT, static_cast<XPropertyChangeListener*>(this));
xSourceSet->removePropertyChangeListener(PROPERTY_TEXTCOLOR, static_cast<XPropertyChangeListener*>(this));
xSourceSet->removePropertyChangeListener(PROPERTY_TEXTLINECOLOR, static_cast<XPropertyChangeListener*>(this));
xSourceSet->removePropertyChangeListener(PROPERTY_TEXTEMPHASIS, static_cast<XPropertyChangeListener*>(this));
xSourceSet->removePropertyChangeListener(PROPERTY_TEXTRELIEF, static_cast<XPropertyChangeListener*>(this));
2000-10-26 13:46:14 +00:00
}
}
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::RowChanged()
{
2001-05-22 12:08:22 +00:00
if(getBrowserView())
{
SbaGridControl* pControl = getBrowserView()->getVclControl();
if (!pControl->IsEditing())
InvalidateFeature(ID_BROWSER_COPY);
}
SbaXDataBrowserController::RowChanged();
}
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::ColumnChanged()
{
2001-05-22 12:08:22 +00:00
if(getBrowserView())
{
SbaGridControl* pControl = getBrowserView()->getVclControl();
if (!pControl->IsEditing())
InvalidateFeature(ID_BROWSER_COPY);
}
SbaXDataBrowserController::ColumnChanged();
}
2000-10-26 13:46:14 +00:00
//------------------------------------------------------------------------------
void SbaTableQueryBrowser::AddColumnListener(const Reference< XPropertySet > & xCol)
{
SbaXDataBrowserController::AddColumnListener(xCol);
SafeAddPropertyListener(xCol, PROPERTY_WIDTH, static_cast<XPropertyChangeListener*>(this));
SafeAddPropertyListener(xCol, PROPERTY_HIDDEN, static_cast<XPropertyChangeListener*>(this));
SafeAddPropertyListener(xCol, PROPERTY_ALIGN, static_cast<XPropertyChangeListener*>(this));
SafeAddPropertyListener(xCol, PROPERTY_FORMATKEY, static_cast<XPropertyChangeListener*>(this));
2000-10-26 13:46:14 +00:00
}
//------------------------------------------------------------------------------
void SbaTableQueryBrowser::RemoveColumnListener(const Reference< XPropertySet > & xCol)
{
SbaXDataBrowserController::RemoveColumnListener(xCol);
SafeRemovePropertyListener(xCol, PROPERTY_WIDTH, static_cast<XPropertyChangeListener*>(this));
SafeRemovePropertyListener(xCol, PROPERTY_HIDDEN, static_cast<XPropertyChangeListener*>(this));
SafeRemovePropertyListener(xCol, PROPERTY_ALIGN, static_cast<XPropertyChangeListener*>(this));
SafeRemovePropertyListener(xCol, PROPERTY_FORMATKEY, static_cast<XPropertyChangeListener*>(this));
2000-10-26 13:46:14 +00:00
}
//------------------------------------------------------------------------------
void SbaTableQueryBrowser::criticalFail()
{
SbaXDataBrowserController::criticalFail();
unloadAndCleanup( sal_False );
}
//------------------------------------------------------------------------------
void SbaTableQueryBrowser::LoadFinished(sal_Bool _bWasSynch)
{
SbaXDataBrowserController::LoadFinished(_bWasSynch);
m_sQueryCommand = ::rtl::OUString();
m_bQueryEscapeProcessing = sal_False;
if (isValid() && !loadingCancelled())
{
// did we load a query?
sal_Bool bTemporary; // needed because we m_bQueryEscapeProcessing is only one bit wide (and we want to pass it by reference)
if ( implGetQuerySignature( m_sQueryCommand, bTemporary ) )
m_bQueryEscapeProcessing = bTemporary;
}
// if the form has been loaded, this means that our "selection" has changed
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
EventObject aEvent( *this );
m_aSelectionListeners.notifyEach( &XSelectionChangeListener::selectionChanged, aEvent );
}
2000-10-26 13:46:14 +00:00
//------------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::getExternalSlotState( sal_uInt16 _nId ) const
{
sal_Bool bEnabled = sal_False;
ExternalFeaturesMap::const_iterator aPos = m_aExternalFeatures.find( _nId );
if ( ( m_aExternalFeatures.end() != aPos ) && aPos->second.xDispatcher.is() )
bEnabled = aPos->second.bEnabled;
return bEnabled;
}
//------------------------------------------------------------------------------
FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const
2000-10-26 13:46:14 +00:00
{
FeatureState aReturn;
// (disabled automatically)
// no chance without a view
if (!getBrowserView() || !getBrowserView()->getVclControl())
return aReturn;
switch ( nId )
2002-05-23 05:46:37 +00:00
{
case ID_TREE_ADMINISTRATE:
aReturn.bEnabled = true;
return aReturn;
2002-05-23 05:46:37 +00:00
case ID_BROWSER_CLOSE:
// the close button should always be enabled
aReturn.bEnabled = !m_bEnableBrowser;
return aReturn;
// "toggle explorer" is always enabled (if we have a explorer)
case ID_BROWSER_EXPLORER:
aReturn.bEnabled = m_bEnableBrowser;
aReturn.bChecked = haveExplorer();
return aReturn;
case ID_BROWSER_REMOVEFILTER:
return SbaXDataBrowserController::GetState( nId );
case ID_BROWSER_COPY:
if ( !m_pTreeView->HasChildPathFocus() )
// handled below
break;
// NO break!
case ID_TREE_CLOSE_CONN:
case ID_TREE_EDIT_DATABASE:
{
SvLBoxEntry* pCurrentEntry( m_pTreeView->getListBox().GetCurEntry() );
EntryType eType = getEntryType( pCurrentEntry );
if ( eType == etUnknown )
return aReturn;
SvLBoxEntry* pDataSourceEntry = m_pTreeView->getListBox().GetRootLevelParent( pCurrentEntry );
DBTreeListUserData* pDSData
= pDataSourceEntry
? static_cast< DBTreeListUserData* >( pDataSourceEntry->GetUserData() )
: NULL;
if ( nId == ID_TREE_CLOSE_CONN )
{
aReturn.bEnabled = ( pDSData != NULL ) && pDSData->xConnection.is();
}
else if ( nId == ID_TREE_EDIT_DATABASE )
{
::utl::OConfigurationTreeRoot aConfig( ::utl::OConfigurationTreeRoot::createWithServiceFactory( getORB(),
CWS-TOOLING: integrate CWS dba32g 2009-09-09 07:53:55 +0200 oj r275964 : replace strlen with rtl_str_getLength 2009-09-07 20:59:10 +0200 fs r275913 : disable the CopyTableWizard test until issue 104869 is fixed 2009-09-07 12:17:31 +0200 oj r275885 : #i104810# remove de as lang 2009-09-05 22:26:21 +0200 fs r275857 : protect StateChanged against re-entrance 2009-09-05 22:25:52 +0200 fs r275856 : don't attempt to classify the parent of a form as control 2009-09-05 22:25:29 +0200 fs r275855 : protect against re-entrance 2009-09-05 00:11:40 +0200 fs r275835 : #i10000# 2009-09-04 23:25:50 +0200 fs r275834 : #i10000# 2009-09-04 23:23:47 +0200 fs r275833 : #i10000# 2009-09-04 21:49:37 +0200 fs r275830 : #i10000# correct wrong conflict resolution 2009-09-04 20:59:51 +0200 fs r275829 : CWS-TOOLING: rebase CWS dba32g to trunk@275801 (milestone: DEV300:m57) 2009-09-04 11:08:32 +0200 oj r275791 : #i104780# new version 1.2.0 2009-09-03 22:29:21 +0200 fs r275775 : OSL_TRACE doesn't need \n anymore 2009-09-03 08:33:21 +0200 fs r275743 : CWS-TOOLING: rebase CWS dba32g to trunk@275331 (milestone: DEV300:m56) 2009-09-02 13:48:12 +0200 fs r275708 : removed useless include 2009-09-02 13:45:43 +0200 fs r275707 : more since tags, which are used across offapi/udkapi 2009-09-02 13:23:04 +0200 fs r275705 : should *not* have the dtor, copy ctor, and assignment operator compiler-generated, else we run into trouble as soon as the compiler creates different versions of our singleton member's static data in different libraries 2009-09-02 12:32:45 +0200 fs r275704 : AutoIncrementIsPrimaryKey is a driver setting, not a data source setting 2009-09-02 11:42:49 +0200 fs r275701 : URL meta data are meta data which are valid for all connections of this type, not per-data-source properties. Settings them as data source properties is a hack. 2009-09-02 08:43:34 +0200 fs r275696 : 3.x.x is not a valid 'since' tag 2009-09-01 16:05:24 +0200 fs r275665 : #i104686# don't treat controls bound to read-only columns as required 2009-09-01 13:10:22 +0200 fs r275657 : #i104574# use PageUp/Down to scroll through the complete page 2009-09-01 07:04:48 +0200 oj r275641 : #i104104# correct line ends 2009-08-31 15:52:34 +0200 fs r275612 : #i104410# 2009-08-31 12:29:05 +0200 fs r275596 : #i104364# 2009-08-31 12:28:56 +0200 fs r275595 : #i104364# 2009-08-31 11:43:09 +0200 fs r275593 : #i104649# JavaDriverClassPath is also a known JDBC-bridge setting 2009-08-31 11:41:37 +0200 fs r275592 : #i104649# 2009-08-28 21:48:27 +0200 fs r275552 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI 2009-08-28 21:48:17 +0200 fs r275551 : #i96862# do not show the 'Create a new database' option when a) no embedded/dBase driver is installed or b) the configuration requests to hide the option 2009-08-28 21:47:19 +0200 fs r275550 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI 2009-08-28 21:46:41 +0200 fs r275549 : #i96862# renamed and extended the configuration data which controls availability of certain DBA-related UI 2009-08-28 15:10:19 +0200 fs r275535 : #i96862# if no embedded driver is installed, use dBase for creating new DBs. If no dBase driver is installed, too, do not offer the 'Create new database' option 2009-08-28 14:03:04 +0200 fs r275532 : #i104454# allow multiple fields to display the same column 2009-08-28 13:14:00 +0200 fs r275528 : #i104584# driver meta data do not belong into a data source's settings 2009-08-28 13:09:57 +0200 fs r275527 : properly chech the MySQL type buttons (else next/back in the wizard leads to state with two buttons checked) 2009-08-28 13:09:17 +0200 fs r275526 : #i104584# driver meta data do not belong into a data source's settings 2009-08-28 13:07:18 +0200 fs r275525 : BooleanComparisonMode is a property, or a feature - but not a driver meta data 2009-08-28 11:00:31 +0200 fs r275521 : #i104580# 2009-08-28 10:40:05 +0200 fs r275519 : #i104577# correct assertion: If the template node type is ANY, then any value type is allowed 2009-08-28 10:09:30 +0200 fs r275518 : #i104575# implement Named Pipe UI 2009-08-28 10:09:07 +0200 fs r275517 : pass the trigger-event to IWindowOperator::operateOn / work with VclWindowEvents, not VclSimpleEvents 2009-08-27 14:27:36 +0200 fs r275484 : ImplPosTabPage: respect mbEmptyViewMargin for WINDOWALIGN_LEFT 2009-08-27 13:43:56 +0200 fs r275480 : merging latest changes from CWS dba32f herein 2009-08-27 13:23:07 +0200 fs r275475 : #i103882# 2009-08-27 11:56:55 +0200 fs r275466 : #i104544# SetState: Do not call Update at the window which we just set text for. It should (sic\!) not be needed, but causes trouble 2009-08-27 11:55:34 +0200 fs r275465 : #i104544# do not allow re-entrance for impl_ensureControl_nothrow Actually, this is part of the fix only. I also removed the code which triggered this re-entrance (from the grid control implementation), but to ensure it won't happen, again, I added some safety herein. 2009-08-27 10:14:11 +0200 fs r275459 : preparations for supporting a 'NamedPipe' parameter for the MySQL Connector/OOo 2009-08-27 10:13:21 +0200 fs r275458 : preparations for supporting a 'NamedPipe' setting for the MySQL Connector/OOo 2009-08-27 10:11:14 +0200 fs r275456 : outsourced the MySQLNative settings into a dedicated class, to not duplicate all the code in two tab page implementations 2009-08-26 14:18:13 +0200 fs r275422 : #i10000# 2009-08-26 13:26:36 +0200 fs r275419 : ignore output paths 2009-08-26 13:23:38 +0200 fs r275417 : support the LocalSocket property for the MySQL native driver 2009-08-26 13:17:05 +0200 fs r275416 : some re-factoring, to outsource the tab page for setting up the MySQLNative connection, into a dedicated class (needed later) 2009-08-26 13:15:15 +0200 fs r275415 : support a NoThousandSep property for NumericFormatters - I'm tired of correcting this at runtime, instead of controlling it in the resource 2009-08-26 11:45:08 +0200 fs r275410 : oops, 'flat' shouldn't have got lost 2009-08-26 09:38:57 +0200 fs r275398 : #i102631# when saving the document fails, ensure that the interaction handler really can handle/display the error 2009-08-26 09:37:05 +0200 fs r275397 : #i102631# don't let non-IO/RuntimeExceptions escape from DatabaseDocument::store*, wrap them into an IOException 2009-08-26 09:35:39 +0200 fs r275395 : let the default interaction handler implement XInteractionHandler2 2009-08-25 13:51:34 +0200 fs r275352 : #i102631# createTempFile: pass URL through FileHelper.getOOoCompatibleFileURL 2009-08-25 13:49:23 +0200 fs r275351 : #i102631# createTempFileURL: immediately delete the file implicitly created by createTempFile, we really only need the URL 2009-08-24 14:49:07 +0200 fs r275318 : #i10000# 2009-08-24 14:36:03 +0200 fs r275315 : properly terminate message with 0 character 2009-08-24 14:35:45 +0200 fs r275314 : trace method concepts in non-pro, if special flag is enabled 2009-08-24 14:24:17 +0200 fs r275312 : #i98973# filter some more events for grid control columns 2009-08-24 14:15:23 +0200 fs r275311 : #i98973# implement XComboBox for combo box cells 2009-08-24 13:39:24 +0200 fs r275308 : #i98973# do not display the 'actionPerformed' event for grid combo box columns 2009-08-24 12:52:03 +0200 fs r275303 : #i98973# implement XCheckBox and XButton for check box cells 2009-08-24 11:56:05 +0200 oj r275300 : #i104447# wrong default for orientation 2009-08-24 10:51:21 +0200 fs r275296 : in the script selector dialog, interpret a double click onto a function as OK 2009-08-24 10:50:56 +0200 fs r275295 : localize some to-be-displayed names, consolidate some code regarding form/control naming 2009-08-21 14:28:05 +0200 fs r275255 : #i98973# implement KeyListeners 2009-08-21 14:27:20 +0200 fs r275254 : #i98973# move the conversion VCL[Mouse|Key]Event->Awt[Mouse|Key]Event from vclxwindow.cxx to VCLUnoHelper 2009-08-21 14:08:50 +0200 fs r275248 : #i98973# implement Mouse- and MouseMotion-broadcasting 2009-08-21 13:31:08 +0200 fs r275244 : #i98973# implement text and change listeners at text cells 2009-08-21 12:47:38 +0200 fs r275234 : #i104399# some refactoring: If the MySQL Connector/OOo is installed, it registers for the sdbc:mysqlc: protocol (now known as DST_MYSQL_NATIVE_DIRECT). However, we do not want to display this in the UI, instead we display "MySQL" only, which collects DST_MYSQL_ODBC, DST_MYSQL_JDBC, and DST_MYSQL_NATIVE. 2009-08-21 12:45:18 +0200 fs r275232 : #i104399# also register for the sdbc:mysql:mysqlc protocol, decide at runtime (depending on the availability of sdbc:mysqlc:), whether it is really accepted. This prevents that the C/OOo extension needs to register *our* implementation name for the sdbc:mysql:mysqlc: protocol, which would be somewhat weird 2009-08-20 16:18:48 +0200 fs r275190 : merging the latest changes from CWS dba32f (which this CWS was created from) 2009-08-19 20:19:59 +0200 fs r275160 : add some spacing between the radios 2009-08-19 14:50:15 +0200 fs r275150 : #i98973# slightly refactoring the grid cell implementations, to prepare for proper events being fired. Implement focus events for the moment, more to come. 2009-08-19 10:53:38 +0200 fs r275142 : #i99936# initialize newly created models 2009-08-18 23:03:48 +0200 fs r275132 : merging latest changes from CWS dba32f 2009-08-18 15:14:08 +0200 fs r275110 : #i102819# SetColumnPos: SCROLL_CLIP is deadly here
2009-09-14 11:18:01 +00:00
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.DataAccess/Policies/Features/Common" ) ) ) );
sal_Bool bHaveEditDatabase( sal_True );
OSL_VERIFY( aConfig.getNodeValue( "EditDatabaseFromDataSourceView" ) >>= bHaveEditDatabase );
aReturn.bEnabled = getORB().is() && ( pDataSourceEntry != NULL ) && bHaveEditDatabase;
}
else if ( nId == ID_BROWSER_COPY )
{
aReturn.bEnabled = isEntryCopyAllowed( pCurrentEntry );
}
return aReturn;
}
2000-12-08 20:16:38 +00:00
}
// all slots not handled above are not available if no form is loaded
if (!isLoaded())
return aReturn;
2000-10-26 13:46:14 +00:00
try
{
sal_Bool bHandled = sal_False;
switch (nId)
{
case ID_BROWSER_DOCUMENT_DATASOURCE:
// the slot is enabled if we have an external dispatcher able to handle it,
// and the dispatcher must have enabled the slot in general
aReturn.bEnabled = getExternalSlotState( ID_BROWSER_DOCUMENT_DATASOURCE );
bHandled = sal_True;
break;
case ID_BROWSER_REFRESH:
aReturn.bEnabled = sal_True;
bHandled = sal_True;
break;
}
if (bHandled)
2000-10-26 13:46:14 +00:00
return aReturn;
2000-10-26 13:46:14 +00:00
// no chance without valid models
if (isValid() && !isValidCursor() && nId != ID_BROWSER_CLOSE)
2000-10-26 13:46:14 +00:00
return aReturn;
2000-10-26 13:46:14 +00:00
switch (nId)
{
case ID_BROWSER_INSERTCOLUMNS:
case ID_BROWSER_INSERTCONTENT:
case ID_BROWSER_FORMLETTER:
2000-10-26 13:46:14 +00:00
{
// the slot is enabled if we have an external dispatcher able to handle it,
// and the dispatcher must have enabled the slot in general
aReturn.bEnabled = getExternalSlotState( nId );
// for the Insert* slots, we need at least one selected row
if (ID_BROWSER_FORMLETTER != nId)
2001-01-09 14:52:33 +00:00
aReturn.bEnabled = aReturn.bEnabled && getBrowserView()->getVclControl()->GetSelectRowCount();
2000-10-26 13:46:14 +00:00
// disabled for native queries which are not saved within the database
// 67706 - 23.08.99 - FS
2000-10-26 13:46:14 +00:00
Reference< XPropertySet > xDataSource(getRowSet(), UNO_QUERY);
try
{
aReturn.bEnabled = aReturn.bEnabled && xDataSource.is();
if (xDataSource.is())
{
sal_Int32 nType = ::comphelper::getINT32(xDataSource->getPropertyValue(PROPERTY_COMMAND_TYPE));
aReturn.bEnabled = aReturn.bEnabled && ((::comphelper::getBOOL(xDataSource->getPropertyValue(PROPERTY_ESCAPE_PROCESSING)) || (nType == ::com::sun::star::sdb::CommandType::QUERY)));
2000-10-26 13:46:14 +00:00
}
}
2001-01-09 14:52:33 +00:00
catch(DisposedException&)
{
OSL_ENSURE(sal_False, "SbaTableQueryBrowser::GetState: object already disposed!");
2001-01-09 14:52:33 +00:00
}
catch( const Exception& )
2000-10-26 13:46:14 +00:00
{
DBG_UNHANDLED_EXCEPTION();
2000-10-26 13:46:14 +00:00
}
}
break;
2000-10-26 13:46:14 +00:00
case ID_BROWSER_TITLE:
{
Reference<XPropertySet> xProp(getRowSet(),UNO_QUERY);
sal_Int32 nCommandType = CommandType::TABLE;
xProp->getPropertyValue(PROPERTY_COMMAND_TYPE) >>= nCommandType;
2000-10-26 13:46:14 +00:00
String sTitle;
switch (nCommandType)
{
case CommandType::TABLE:
sTitle = String(ModuleRes(STR_TBL_TITLE)); break;
case CommandType::QUERY:
2001-01-09 14:52:33 +00:00
case CommandType::COMMAND:
2000-10-26 13:46:14 +00:00
sTitle = String(ModuleRes(STR_QRY_TITLE)); break;
default:
2011-02-03 00:33:36 +01:00
OSL_ENSURE(sal_False, "SbaTableQueryBrowser::GetState: unknown command type!");
2000-10-26 13:46:14 +00:00
}
::rtl::OUString aName;
xProp->getPropertyValue(PROPERTY_COMMAND) >>= aName;
String sObject(aName.getStr());
sTitle.SearchAndReplace('#',sObject);
aReturn.sTitle = sTitle;
2000-10-26 13:46:14 +00:00
aReturn.bEnabled = sal_True;
}
break;
case ID_BROWSER_TABLEATTR:
case ID_BROWSER_ROWHEIGHT:
case ID_BROWSER_COLATTRSET:
case ID_BROWSER_COLWIDTH:
2001-01-09 14:52:33 +00:00
aReturn.bEnabled = getBrowserView() && getBrowserView()->getVclControl() && isValid() && isValidCursor();
2000-10-26 13:46:14 +00:00
// aReturn.bEnabled &= getDefinition() && !getDefinition()->GetDatabase()->IsReadOnly();
break;
case ID_BROWSER_COPY:
OSL_ENSURE( !m_pTreeView->HasChildPathFocus(), "SbaTableQueryBrowser::GetState( ID_BROWSER_COPY ): this should have been handled above!" );
if (getBrowserView() && getBrowserView()->getVclControl() && !getBrowserView()->getVclControl()->IsEditing())
{
SbaGridControl* pControl = getBrowserView()->getVclControl();
CWS-TOOLING: integrate CWS dba32e 2009-08-10 13:16:25 +0200 fs r274805 : #i84390# typo corrected 2009-08-10 13:04:28 +0200 fs r274804 : #i103741# properly terminate the last token in a string with a 0 byte 2009-07-24 08:54:05 +0200 msc r274286 : #103219# changed long name 2009-07-24 08:42:28 +0200 msc r274285 : #i79649# changed behaviour of the wizard 2009-07-22 14:17:49 +0200 oj r274238 : GrabFocus 2009-07-22 13:38:01 +0200 oj r274232 : #i102934# mixed up 2009-07-22 13:37:16 +0200 oj r274231 : #i102934# mixed up 2009-07-21 12:30:36 +0200 oj r274176 : crash when using distinct 2009-07-21 10:03:44 +0200 oj r274163 : set last char to 0 2009-07-21 09:31:22 +0200 oj r274161 : mediatype corrected 2009-07-20 11:45:33 +0200 fs r274118 : typo in formatting string 2009-07-20 11:40:39 +0200 fs r274117 : removed unused include 2009-07-20 11:40:01 +0200 fs r274116 : class name corrected 2009-07-16 13:41:45 +0200 oj r274046 : i101587 wrong check for embeddeddatabase url in confguration, have to check path 2009-07-16 13:12:05 +0200 tbo r274044 : #i103219# adjust declarion to new hid.lst 2009-07-16 12:43:48 +0200 oj r274041 : #i102497# check also fot longvarchar 2009-07-16 12:15:41 +0200 oj r274039 : #i103030# handle type description and exceptions as well 2009-07-16 11:14:26 +0200 fs r274035 : let SVN ignore output paths 2009-07-16 09:23:43 +0200 fs r274030 : TransforFormComponentProperties: no need to check for attribute equality 2009-07-10 14:16:23 +0200 oj r273892 : CWS-TOOLING: rebase CWS dba32e to trunk@273858 (milestone: DEV300:m52) 2009-07-01 21:41:50 +0200 fs r273614 : #i10000# 2009-07-01 15:01:10 +0200 fs r273589 : Input required doesn't make sense at all in XML form documents 2009-07-01 12:10:31 +0200 fs r273562 : updated 2009-07-01 11:46:12 +0200 fs r273560 : #i103219# add about 100 missing long names 2009-07-01 10:11:41 +0200 fs r273551 : moved from socket/port usage to pipe/name usage, which is more common nowadays 2009-07-01 09:50:03 +0200 fs r273549 : removed obsolete (empty) folder 2009-07-01 09:47:35 +0200 fs r273548 : copied the code for the Accessibility Workbench herein, formerly located in the old CVS repository, at gsl/awb 2009-06-30 10:07:47 +0200 fs r273493 : merging latest changes from CWS dba32d 2009-06-29 20:46:31 +0200 fs r273482 : #i103138# Rectangle conversions 2009-06-29 10:01:13 +0200 fs r273453 : #i103138# refactored the code for positioning/zooming the control Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to take an additional ViewTransformation parameter, describing the transformation to obtain the actual control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter. This has become necessary since during painting, the device which we created our control for might not necessarily have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size, this would lead to wrong results. Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken. Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ... I consider it broken, since: - we need the map mode to obtain the proper zoom level, which is to be forwarded to the control - there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears). It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand one has no possibility to obtain the current zoom by other means. Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used, which means the controls have a zoom of "1:1" set, which is wrong here. 2009-06-29 09:52:13 +0200 fs r273452 : during #i103138#: belongsToDevice is unused nowadays 2009-06-24 12:40:06 +0200 fs r273329 : #i102888# #i102899# 2009-06-24 12:10:29 +0200 oj r273327 : #i103030# some code changes 2009-06-24 09:44:14 +0200 oj r273311 : #i103030# some code changes 2009-06-24 09:24:42 +0200 oj r273309 : #i103030# add log 2009-06-24 09:03:29 +0200 fs r273308 : if a col's table name is schema.table, properly quote all parts 2009-06-24 08:56:06 +0200 oj r273307 : #i102691# changed string 2009-06-23 13:31:43 +0200 oj r273280 : #i102479# fix date, time and datetime 2009-06-23 12:51:28 +0200 oj r273277 : #i103020# clear old expression when updating to avoid dead pointers in treelist userdata 2009-06-23 12:17:16 +0200 oj r273275 : #i103030# add LogBridge 2009-06-23 11:53:10 +0200 oj r273272 : shawdowed var resolved 2009-06-23 11:48:49 +0200 oj r273270 : #i103030# add :log to uno env if var UNO_ENV_LOG is set 2009-06-23 11:47:47 +0200 oj r273269 : #i103030# add LogBridge 2009-06-23 11:47:11 +0200 oj r273268 : #i103030# add LogBridge 2009-06-23 08:05:08 +0200 oj r273253 : #i102934# add key for collapsing 2009-06-22 13:21:33 +0200 fs r273225 : merging latest changes from CWS dba32d 2009-06-22 13:15:22 +0200 fs r273221 : why restrict to 12 entries? 2009-06-22 08:12:21 +0200 oj r273196 : #i102655# choosen > chosen typo fixed 2009-06-22 08:08:04 +0200 oj r273195 : #i102657# typo fix 2009-06-22 08:06:28 +0200 oj r273194 : #i102934# expanding and collasping of section 2009-06-22 08:05:52 +0200 oj r273193 : #i102930# set focus in treelistbox 2009-06-22 08:04:56 +0200 oj r273192 : #i102929# enable tabstop 2009-06-19 13:18:26 +0200 oj r273157 : remove unused param 2009-06-19 10:07:05 +0200 oj r273149 : CWS-TOOLING: rebase CWS dba32e to trunk@272827 (milestone: DEV300:m50) 2009-06-19 07:32:40 +0200 oj r273146 : merge from dba32d to dba32e 2009-06-19 07:22:56 +0200 oj r273145 : merge from dba32d to dba32e 2009-06-19 07:22:33 +0200 oj r273144 : merge from dba32d to dba32e 2009-06-18 14:09:34 +0200 fs r273116 : merging the latest changes from CWS dba32d (up to revision 273108) herein, which effectively is a rebase to DEV300.m50 2009-06-18 08:50:35 +0200 oj r273098 : #i102894# fix for new line in text 2009-06-18 08:28:48 +0200 oj r273097 : #i102892# check any 2009-06-18 08:21:34 +0200 oj r273096 : check if error is valid 2009-06-16 13:49:28 +0200 fs r273019 : why make a drop down control by default? The form control factory in SVX does this better those days ... 2009-06-10 09:53:20 +0200 oj r272797 : add lic text 2009-06-10 09:48:55 +0200 oj r272796 : test added for i101618 2009-06-09 14:57:39 +0200 oj r272771 : #i101618# access database document only when script container is needed 2009-06-09 12:42:25 +0200 oj r272765 : #i102497# check type property 2009-06-09 12:32:49 +0200 oj r272764 : adjust test cases 2009-06-09 12:31:58 +0200 oj r272763 : adjust test cases 2009-06-09 12:31:22 +0200 oj r272762 : adjust test cases 2009-06-09 11:35:42 +0200 oj r272761 : check if error is valid 2009-06-09 11:29:42 +0200 oj r272760 : #i102497# longvarchar was missing 2009-06-08 14:52:49 +0200 fs r272733 : #i102564# when setting a new field, also set m_nFieldType 2009-06-08 13:51:20 +0200 oj r272730 : add tests 2009-06-05 14:38:01 +0200 oj r272686 : add dep 2009-06-05 14:35:00 +0200 oj r272684 : add new tests 2009-06-05 13:41:18 +0200 oj r272681 : code clean ups 2009-06-05 12:40:51 +0200 oj r272678 : code cleanup 2009-06-05 12:02:57 +0200 oj r272677 : code cleanup 2009-06-05 10:42:38 +0200 oj r272670 : #i49320# impl export of single rows and as RTF and HTML 2009-06-03 14:30:37 +0200 oj r272576 : #i79649# check if file matches filter wildcard 2009-06-03 13:41:57 +0200 oj r272560 : #i102470# impl not b like 'c'
2009-08-26 10:09:17 +00:00
if ( pControl->GetSelectRowCount() )
{
aReturn.bEnabled = m_aCurrentFrame.isActive();
break;
2010-11-24 01:07:16 +00:00
}
CWS-TOOLING: integrate CWS dba32e 2009-08-10 13:16:25 +0200 fs r274805 : #i84390# typo corrected 2009-08-10 13:04:28 +0200 fs r274804 : #i103741# properly terminate the last token in a string with a 0 byte 2009-07-24 08:54:05 +0200 msc r274286 : #103219# changed long name 2009-07-24 08:42:28 +0200 msc r274285 : #i79649# changed behaviour of the wizard 2009-07-22 14:17:49 +0200 oj r274238 : GrabFocus 2009-07-22 13:38:01 +0200 oj r274232 : #i102934# mixed up 2009-07-22 13:37:16 +0200 oj r274231 : #i102934# mixed up 2009-07-21 12:30:36 +0200 oj r274176 : crash when using distinct 2009-07-21 10:03:44 +0200 oj r274163 : set last char to 0 2009-07-21 09:31:22 +0200 oj r274161 : mediatype corrected 2009-07-20 11:45:33 +0200 fs r274118 : typo in formatting string 2009-07-20 11:40:39 +0200 fs r274117 : removed unused include 2009-07-20 11:40:01 +0200 fs r274116 : class name corrected 2009-07-16 13:41:45 +0200 oj r274046 : i101587 wrong check for embeddeddatabase url in confguration, have to check path 2009-07-16 13:12:05 +0200 tbo r274044 : #i103219# adjust declarion to new hid.lst 2009-07-16 12:43:48 +0200 oj r274041 : #i102497# check also fot longvarchar 2009-07-16 12:15:41 +0200 oj r274039 : #i103030# handle type description and exceptions as well 2009-07-16 11:14:26 +0200 fs r274035 : let SVN ignore output paths 2009-07-16 09:23:43 +0200 fs r274030 : TransforFormComponentProperties: no need to check for attribute equality 2009-07-10 14:16:23 +0200 oj r273892 : CWS-TOOLING: rebase CWS dba32e to trunk@273858 (milestone: DEV300:m52) 2009-07-01 21:41:50 +0200 fs r273614 : #i10000# 2009-07-01 15:01:10 +0200 fs r273589 : Input required doesn't make sense at all in XML form documents 2009-07-01 12:10:31 +0200 fs r273562 : updated 2009-07-01 11:46:12 +0200 fs r273560 : #i103219# add about 100 missing long names 2009-07-01 10:11:41 +0200 fs r273551 : moved from socket/port usage to pipe/name usage, which is more common nowadays 2009-07-01 09:50:03 +0200 fs r273549 : removed obsolete (empty) folder 2009-07-01 09:47:35 +0200 fs r273548 : copied the code for the Accessibility Workbench herein, formerly located in the old CVS repository, at gsl/awb 2009-06-30 10:07:47 +0200 fs r273493 : merging latest changes from CWS dba32d 2009-06-29 20:46:31 +0200 fs r273482 : #i103138# Rectangle conversions 2009-06-29 10:01:13 +0200 fs r273453 : #i103138# refactored the code for positioning/zooming the control Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to take an additional ViewTransformation parameter, describing the transformation to obtain the actual control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter. This has become necessary since during painting, the device which we created our control for might not necessarily have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size, this would lead to wrong results. Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken. Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ... I consider it broken, since: - we need the map mode to obtain the proper zoom level, which is to be forwarded to the control - there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears). It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand one has no possibility to obtain the current zoom by other means. Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used, which means the controls have a zoom of "1:1" set, which is wrong here. 2009-06-29 09:52:13 +0200 fs r273452 : during #i103138#: belongsToDevice is unused nowadays 2009-06-24 12:40:06 +0200 fs r273329 : #i102888# #i102899# 2009-06-24 12:10:29 +0200 oj r273327 : #i103030# some code changes 2009-06-24 09:44:14 +0200 oj r273311 : #i103030# some code changes 2009-06-24 09:24:42 +0200 oj r273309 : #i103030# add log 2009-06-24 09:03:29 +0200 fs r273308 : if a col's table name is schema.table, properly quote all parts 2009-06-24 08:56:06 +0200 oj r273307 : #i102691# changed string 2009-06-23 13:31:43 +0200 oj r273280 : #i102479# fix date, time and datetime 2009-06-23 12:51:28 +0200 oj r273277 : #i103020# clear old expression when updating to avoid dead pointers in treelist userdata 2009-06-23 12:17:16 +0200 oj r273275 : #i103030# add LogBridge 2009-06-23 11:53:10 +0200 oj r273272 : shawdowed var resolved 2009-06-23 11:48:49 +0200 oj r273270 : #i103030# add :log to uno env if var UNO_ENV_LOG is set 2009-06-23 11:47:47 +0200 oj r273269 : #i103030# add LogBridge 2009-06-23 11:47:11 +0200 oj r273268 : #i103030# add LogBridge 2009-06-23 08:05:08 +0200 oj r273253 : #i102934# add key for collapsing 2009-06-22 13:21:33 +0200 fs r273225 : merging latest changes from CWS dba32d 2009-06-22 13:15:22 +0200 fs r273221 : why restrict to 12 entries? 2009-06-22 08:12:21 +0200 oj r273196 : #i102655# choosen > chosen typo fixed 2009-06-22 08:08:04 +0200 oj r273195 : #i102657# typo fix 2009-06-22 08:06:28 +0200 oj r273194 : #i102934# expanding and collasping of section 2009-06-22 08:05:52 +0200 oj r273193 : #i102930# set focus in treelistbox 2009-06-22 08:04:56 +0200 oj r273192 : #i102929# enable tabstop 2009-06-19 13:18:26 +0200 oj r273157 : remove unused param 2009-06-19 10:07:05 +0200 oj r273149 : CWS-TOOLING: rebase CWS dba32e to trunk@272827 (milestone: DEV300:m50) 2009-06-19 07:32:40 +0200 oj r273146 : merge from dba32d to dba32e 2009-06-19 07:22:56 +0200 oj r273145 : merge from dba32d to dba32e 2009-06-19 07:22:33 +0200 oj r273144 : merge from dba32d to dba32e 2009-06-18 14:09:34 +0200 fs r273116 : merging the latest changes from CWS dba32d (up to revision 273108) herein, which effectively is a rebase to DEV300.m50 2009-06-18 08:50:35 +0200 oj r273098 : #i102894# fix for new line in text 2009-06-18 08:28:48 +0200 oj r273097 : #i102892# check any 2009-06-18 08:21:34 +0200 oj r273096 : check if error is valid 2009-06-16 13:49:28 +0200 fs r273019 : why make a drop down control by default? The form control factory in SVX does this better those days ... 2009-06-10 09:53:20 +0200 oj r272797 : add lic text 2009-06-10 09:48:55 +0200 oj r272796 : test added for i101618 2009-06-09 14:57:39 +0200 oj r272771 : #i101618# access database document only when script container is needed 2009-06-09 12:42:25 +0200 oj r272765 : #i102497# check type property 2009-06-09 12:32:49 +0200 oj r272764 : adjust test cases 2009-06-09 12:31:58 +0200 oj r272763 : adjust test cases 2009-06-09 12:31:22 +0200 oj r272762 : adjust test cases 2009-06-09 11:35:42 +0200 oj r272761 : check if error is valid 2009-06-09 11:29:42 +0200 oj r272760 : #i102497# longvarchar was missing 2009-06-08 14:52:49 +0200 fs r272733 : #i102564# when setting a new field, also set m_nFieldType 2009-06-08 13:51:20 +0200 oj r272730 : add tests 2009-06-05 14:38:01 +0200 oj r272686 : add dep 2009-06-05 14:35:00 +0200 oj r272684 : add new tests 2009-06-05 13:41:18 +0200 oj r272681 : code clean ups 2009-06-05 12:40:51 +0200 oj r272678 : code cleanup 2009-06-05 12:02:57 +0200 oj r272677 : code cleanup 2009-06-05 10:42:38 +0200 oj r272670 : #i49320# impl export of single rows and as RTF and HTML 2009-06-03 14:30:37 +0200 oj r272576 : #i79649# check if file matches filter wildcard 2009-06-03 13:41:57 +0200 oj r272560 : #i102470# impl not b like 'c'
2009-08-26 10:09:17 +00:00
else
aReturn.bEnabled = pControl->canCopyCellText(pControl->GetCurRow(), pControl->GetCurColumnId());
break;
}
// NO break here
2000-10-26 13:46:14 +00:00
default:
return SbaXDataBrowserController::GetState(nId);
}
}
catch(const Exception&)
2000-10-26 13:46:14 +00:00
{
DBG_UNHANDLED_EXCEPTION();
2000-10-26 13:46:14 +00:00
}
return aReturn;
}
//------------------------------------------------------------------------------
void SbaTableQueryBrowser::Execute(sal_uInt16 nId, const Sequence< PropertyValue >& aArgs)
2000-10-26 13:46:14 +00:00
{
switch (nId)
{
default:
SbaXDataBrowserController::Execute(nId,aArgs);
break;
case ID_TREE_EDIT_DATABASE:
implAdministrate( m_pTreeView->getListBox().GetCurEntry() );
break;
case ID_TREE_CLOSE_CONN:
openHelpAgent( HID_DSBROWSER_DISCONNECTING );
closeConnection( m_pTreeView->getListBox().GetRootLevelParent( m_pTreeView->getListBox().GetCurEntry() ) );
break;
case ID_TREE_ADMINISTRATE:
::svx::administrateDatabaseRegistration( getView() );
break;
case ID_BROWSER_REFRESH:
{
if ( !SaveModified( ) )
// nothing to do
break;
sal_Bool bFullReinit = sal_False;
// check if the query signature (if the form is based on a query) has changed
if ( m_sQueryCommand.getLength() )
{
::rtl::OUString sNewQueryCommand;
sal_Bool bNewQueryEP;
#if OSL_DEBUG_LEVEL > 0
sal_Bool bIsQuery =
#endif
implGetQuerySignature( sNewQueryCommand, bNewQueryEP );
OSL_ENSURE( bIsQuery, "SbaTableQueryBrowser::Execute: was a query before, but is not anymore?" );
bFullReinit = ( sNewQueryCommand != m_sQueryCommand ) || ( m_bQueryEscapeProcessing != bNewQueryEP );
}
if ( !bFullReinit )
{
// let the base class do a simple reload
SbaXDataBrowserController::Execute(nId,aArgs);
break;
}
// NO break here!
}
case ID_BROWSER_REFRESH_REBUILD:
{
if ( !SaveModified() )
// nothing to do
break;
SvLBoxEntry* pSelected = m_pCurrentlyDisplayed;
// unload
unloadAndCleanup( sal_False );
// reselect the entry
CWS-TOOLING: integrate CWS dba31e 2008-11-19 12:36:23 +0100 msc r263980 : i96104 2008-11-19 12:31:19 +0100 msc r263979 : i96104 2008-11-19 12:21:55 +0100 msc r263977 : i96104 2008-11-19 12:18:53 +0100 msc r263976 : i96104 2008-11-18 09:09:45 +0100 oj r263746 : disable color entry when area is set 2008-11-18 08:37:52 +0100 oj r263741 : #remove sub report entry 2008-11-17 11:20:25 +0100 fs r263708 : #i10000# 2008-11-17 11:06:52 +0100 fs r263706 : minimal version now is 3.1 2008-11-12 22:25:59 +0100 fs r263621 : #i96150# 2008-11-12 22:20:02 +0100 fs r263620 : rebased to m34 2008-11-12 21:39:41 +0100 fs r263618 : MANUAL REBASE: rebase CWS dba31d to DEV300_m34 2008-11-12 13:54:58 +0100 fs r263597 : #i96134# MediaDescriptor.URL is to be preferred over MediaDescriptor.FileName. Nonetheless, ensure both are handled 2008-11-12 13:53:40 +0100 fs r263596 : #i96134# re-enabled the code for #i41897#, a better fix is to come 2008-11-12 12:48:21 +0100 fs r263585 : #i96134# disable saving URLs of file-base databases relatively 2008-11-11 16:11:11 +0100 msc r263566 : #i96104# 2008-11-05 09:09:47 +0100 oj r263342 : #i88727# color noe added 2008-11-05 08:41:43 +0100 oj r263341 : #i77916# zoom added 2008-11-04 21:24:15 +0100 fs r263339 : disposing: call disposeAndClear without own mutex locked - some of our listeners insist on locking the SolarMutex, which sometimes led to deadlocks on the complex test cases 2008-11-04 21:23:15 +0100 fs r263338 : remove SolarMutex locking - this happned in CWS dba31c (in the CVS version), which this CWS was created from, but seems to got lost during resync 2008-11-04 20:49:50 +0100 fs r263335 : docu formatting 2008-11-04 20:06:39 +0100 fs r263334 : #i95826# use m_aMutex, not a DocumentGuard (wrongly resolved merge conflicts) 2008-11-04 17:36:29 +0100 fs r263332 : #i92688# properly revoke as XEventListener from m_xActiveController when disposing 2008-11-04 14:49:34 +0100 fs r263324 : #i92322# enable Input Required if EmptyIsNULL does not exist at the control 2008-10-31 11:10:04 +0100 oj r262857 : merge from cvs to svn 2008-10-31 09:46:45 +0100 oj r262853 : merge from cvs to svn 2008-10-31 08:46:37 +0100 oj r262849 : merge from cvs to svn 2008-10-31 08:44:24 +0100 oj r262848 : merge from cvs to svn 2008-10-31 08:43:33 +0100 oj r262847 : merge from cvs to svn 2008-10-31 08:42:28 +0100 oj r262846 : merge from cvs to svn 2008-10-31 08:41:58 +0100 oj r262845 : merge from cvs to svn 2008-10-31 08:41:32 +0100 oj r262844 : merge from cvs to svn 2008-10-28 12:19:50 +0100 oj r262733 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:42 +0100 oj r262732 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:36 +0100 oj r262731 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:31 +0100 oj r262730 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:22 +0100 oj r262729 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:18 +0100 oj r262728 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:10 +0100 oj r262727 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:06 +0100 oj r262726 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:05 +0100 oj r262725 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:01 +0100 oj r262724 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:50 +0100 oj r262723 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:41 +0100 oj r262722 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:40 +0100 oj r262721 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:27 +0100 oj r262720 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:10 +0100 oj r262719 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:01 +0100 oj r262718 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:17:39 +0100 oj r262717 : #iXXXXX#: migrate CWS dba31e to SVN
2008-12-01 12:31:27 +00:00
if ( pSelected )
{
implSelect( pSelected );
}
else
{
Reference<XPropertySet> xProp(getRowSet(),UNO_QUERY);
implSelect(::svx::ODataAccessDescriptor(xProp));
}
}
break;
2000-12-08 20:16:38 +00:00
case ID_BROWSER_EXPLORER:
toggleExplorer();
break;
case ID_BROWSER_DOCUMENT_DATASOURCE:
implSelect(m_aDocumentDataSource);
break;
case ID_BROWSER_INSERTCOLUMNS:
case ID_BROWSER_INSERTCONTENT:
case ID_BROWSER_FORMLETTER:
2001-01-09 14:52:33 +00:00
if (getBrowserView() && isValidCursor())
2000-10-26 13:46:14 +00:00
{
// the URL the slot id is assigned to
OSL_ENSURE( m_aExternalFeatures.find( nId ) != m_aExternalFeatures.end(),
"SbaTableQueryBrowser::Execute( ID_BROWSER_?): how could this ever be enabled?" );
URL aParentUrl = m_aExternalFeatures[ nId ].aURL;
2000-10-26 13:46:14 +00:00
// let the dispatcher execute the slot
Reference< XDispatch > xDispatch( m_aExternalFeatures[ nId ].xDispatcher );
if (xDispatch.is())
2000-10-26 13:46:14 +00:00
{
// set the properties for the dispatch
// first fill the selection
2001-01-09 14:52:33 +00:00
SbaGridControl* pGrid = getBrowserView()->getVclControl();
2000-10-26 13:46:14 +00:00
MultiSelection* pSelection = (MultiSelection*)pGrid->GetSelection();
2001-04-11 11:43:39 +00:00
Sequence< Any > aSelection;
if ( !pGrid->IsAllSelected() )
{ // transfer the selected rows only if not all rows are selected
// (all rows means the whole table)
2011-02-08 08:48:39 +01:00
// #i3832#
if (pSelection != NULL)
2000-10-26 13:46:14 +00:00
{
aSelection.realloc(pSelection->GetSelectCount());
long nIdx = pSelection->FirstSelected();
Any* pSelectionNos = aSelection.getArray();
while (nIdx >= 0)
{
*pSelectionNos++ <<= (sal_Int32)(nIdx + 1);
nIdx = pSelection->NextSelected();
}
2000-10-26 13:46:14 +00:00
}
}
Reference< XResultSet > xCursorClone;
try
{
Reference< XResultSetAccess > xResultSetAccess(getRowSet(),UNO_QUERY);
if (xResultSetAccess.is())
xCursorClone = xResultSetAccess->createResultSet();
}
2001-01-09 14:52:33 +00:00
catch(DisposedException&)
{
OSL_ENSURE(0,"Object already disposed!");
}
catch(Exception&)
{
DBG_ERROR("SbaTableQueryBrowser::Execute(ID_BROWSER_?): could not clone the cursor!");
}
2000-10-26 13:46:14 +00:00
Reference<XPropertySet> xProp(getRowSet(),UNO_QUERY);
2000-10-26 13:46:14 +00:00
try
{
2001-04-11 11:43:39 +00:00
ODataAccessDescriptor aDescriptor;
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
::rtl::OUString sDataSourceName;
xProp->getPropertyValue(PROPERTY_DATASOURCENAME) >>= sDataSourceName;
aDescriptor.setDataSource(sDataSourceName);
2001-04-11 11:43:39 +00:00
aDescriptor[daCommand] = xProp->getPropertyValue(PROPERTY_COMMAND);
aDescriptor[daCommandType] = xProp->getPropertyValue(PROPERTY_COMMAND_TYPE);
aDescriptor[daConnection] = xProp->getPropertyValue(PROPERTY_ACTIVE_CONNECTION);
2001-04-11 11:43:39 +00:00
aDescriptor[daCursor] <<= xCursorClone;
if ( aSelection.getLength() )
{
aDescriptor[daSelection] <<= aSelection;
aDescriptor[daBookmarkSelection] <<= sal_False;
// these are selection indicies
// before we change this, all clients have to be adjusted
// so that they recognize the new BookmarkSelection property!
}
2001-04-11 11:43:39 +00:00
xDispatch->dispatch(aParentUrl, aDescriptor.createPropertyValueSequence());
}
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
2000-10-26 13:46:14 +00:00
}
}
break;
2001-01-09 14:52:33 +00:00
case ID_BROWSER_CLOSE:
closeTask();
// if it's not 0, such a async close is already pending
2001-01-09 14:52:33 +00:00
break;
case ID_BROWSER_COPY:
if(m_pTreeView->HasChildPathFocus())
{
copyEntry(m_pTreeView->getListBox().GetCurEntry());
}
CWS-TOOLING: integrate CWS dba32e 2009-08-10 13:16:25 +0200 fs r274805 : #i84390# typo corrected 2009-08-10 13:04:28 +0200 fs r274804 : #i103741# properly terminate the last token in a string with a 0 byte 2009-07-24 08:54:05 +0200 msc r274286 : #103219# changed long name 2009-07-24 08:42:28 +0200 msc r274285 : #i79649# changed behaviour of the wizard 2009-07-22 14:17:49 +0200 oj r274238 : GrabFocus 2009-07-22 13:38:01 +0200 oj r274232 : #i102934# mixed up 2009-07-22 13:37:16 +0200 oj r274231 : #i102934# mixed up 2009-07-21 12:30:36 +0200 oj r274176 : crash when using distinct 2009-07-21 10:03:44 +0200 oj r274163 : set last char to 0 2009-07-21 09:31:22 +0200 oj r274161 : mediatype corrected 2009-07-20 11:45:33 +0200 fs r274118 : typo in formatting string 2009-07-20 11:40:39 +0200 fs r274117 : removed unused include 2009-07-20 11:40:01 +0200 fs r274116 : class name corrected 2009-07-16 13:41:45 +0200 oj r274046 : i101587 wrong check for embeddeddatabase url in confguration, have to check path 2009-07-16 13:12:05 +0200 tbo r274044 : #i103219# adjust declarion to new hid.lst 2009-07-16 12:43:48 +0200 oj r274041 : #i102497# check also fot longvarchar 2009-07-16 12:15:41 +0200 oj r274039 : #i103030# handle type description and exceptions as well 2009-07-16 11:14:26 +0200 fs r274035 : let SVN ignore output paths 2009-07-16 09:23:43 +0200 fs r274030 : TransforFormComponentProperties: no need to check for attribute equality 2009-07-10 14:16:23 +0200 oj r273892 : CWS-TOOLING: rebase CWS dba32e to trunk@273858 (milestone: DEV300:m52) 2009-07-01 21:41:50 +0200 fs r273614 : #i10000# 2009-07-01 15:01:10 +0200 fs r273589 : Input required doesn't make sense at all in XML form documents 2009-07-01 12:10:31 +0200 fs r273562 : updated 2009-07-01 11:46:12 +0200 fs r273560 : #i103219# add about 100 missing long names 2009-07-01 10:11:41 +0200 fs r273551 : moved from socket/port usage to pipe/name usage, which is more common nowadays 2009-07-01 09:50:03 +0200 fs r273549 : removed obsolete (empty) folder 2009-07-01 09:47:35 +0200 fs r273548 : copied the code for the Accessibility Workbench herein, formerly located in the old CVS repository, at gsl/awb 2009-06-30 10:07:47 +0200 fs r273493 : merging latest changes from CWS dba32d 2009-06-29 20:46:31 +0200 fs r273482 : #i103138# Rectangle conversions 2009-06-29 10:01:13 +0200 fs r273453 : #i103138# refactored the code for positioning/zooming the control Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to take an additional ViewTransformation parameter, describing the transformation to obtain the actual control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter. This has become necessary since during painting, the device which we created our control for might not necessarily have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size, this would lead to wrong results. Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken. Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ... I consider it broken, since: - we need the map mode to obtain the proper zoom level, which is to be forwarded to the control - there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears). It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand one has no possibility to obtain the current zoom by other means. Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used, which means the controls have a zoom of "1:1" set, which is wrong here. 2009-06-29 09:52:13 +0200 fs r273452 : during #i103138#: belongsToDevice is unused nowadays 2009-06-24 12:40:06 +0200 fs r273329 : #i102888# #i102899# 2009-06-24 12:10:29 +0200 oj r273327 : #i103030# some code changes 2009-06-24 09:44:14 +0200 oj r273311 : #i103030# some code changes 2009-06-24 09:24:42 +0200 oj r273309 : #i103030# add log 2009-06-24 09:03:29 +0200 fs r273308 : if a col's table name is schema.table, properly quote all parts 2009-06-24 08:56:06 +0200 oj r273307 : #i102691# changed string 2009-06-23 13:31:43 +0200 oj r273280 : #i102479# fix date, time and datetime 2009-06-23 12:51:28 +0200 oj r273277 : #i103020# clear old expression when updating to avoid dead pointers in treelist userdata 2009-06-23 12:17:16 +0200 oj r273275 : #i103030# add LogBridge 2009-06-23 11:53:10 +0200 oj r273272 : shawdowed var resolved 2009-06-23 11:48:49 +0200 oj r273270 : #i103030# add :log to uno env if var UNO_ENV_LOG is set 2009-06-23 11:47:47 +0200 oj r273269 : #i103030# add LogBridge 2009-06-23 11:47:11 +0200 oj r273268 : #i103030# add LogBridge 2009-06-23 08:05:08 +0200 oj r273253 : #i102934# add key for collapsing 2009-06-22 13:21:33 +0200 fs r273225 : merging latest changes from CWS dba32d 2009-06-22 13:15:22 +0200 fs r273221 : why restrict to 12 entries? 2009-06-22 08:12:21 +0200 oj r273196 : #i102655# choosen > chosen typo fixed 2009-06-22 08:08:04 +0200 oj r273195 : #i102657# typo fix 2009-06-22 08:06:28 +0200 oj r273194 : #i102934# expanding and collasping of section 2009-06-22 08:05:52 +0200 oj r273193 : #i102930# set focus in treelistbox 2009-06-22 08:04:56 +0200 oj r273192 : #i102929# enable tabstop 2009-06-19 13:18:26 +0200 oj r273157 : remove unused param 2009-06-19 10:07:05 +0200 oj r273149 : CWS-TOOLING: rebase CWS dba32e to trunk@272827 (milestone: DEV300:m50) 2009-06-19 07:32:40 +0200 oj r273146 : merge from dba32d to dba32e 2009-06-19 07:22:56 +0200 oj r273145 : merge from dba32d to dba32e 2009-06-19 07:22:33 +0200 oj r273144 : merge from dba32d to dba32e 2009-06-18 14:09:34 +0200 fs r273116 : merging the latest changes from CWS dba32d (up to revision 273108) herein, which effectively is a rebase to DEV300.m50 2009-06-18 08:50:35 +0200 oj r273098 : #i102894# fix for new line in text 2009-06-18 08:28:48 +0200 oj r273097 : #i102892# check any 2009-06-18 08:21:34 +0200 oj r273096 : check if error is valid 2009-06-16 13:49:28 +0200 fs r273019 : why make a drop down control by default? The form control factory in SVX does this better those days ... 2009-06-10 09:53:20 +0200 oj r272797 : add lic text 2009-06-10 09:48:55 +0200 oj r272796 : test added for i101618 2009-06-09 14:57:39 +0200 oj r272771 : #i101618# access database document only when script container is needed 2009-06-09 12:42:25 +0200 oj r272765 : #i102497# check type property 2009-06-09 12:32:49 +0200 oj r272764 : adjust test cases 2009-06-09 12:31:58 +0200 oj r272763 : adjust test cases 2009-06-09 12:31:22 +0200 oj r272762 : adjust test cases 2009-06-09 11:35:42 +0200 oj r272761 : check if error is valid 2009-06-09 11:29:42 +0200 oj r272760 : #i102497# longvarchar was missing 2009-06-08 14:52:49 +0200 fs r272733 : #i102564# when setting a new field, also set m_nFieldType 2009-06-08 13:51:20 +0200 oj r272730 : add tests 2009-06-05 14:38:01 +0200 oj r272686 : add dep 2009-06-05 14:35:00 +0200 oj r272684 : add new tests 2009-06-05 13:41:18 +0200 oj r272681 : code clean ups 2009-06-05 12:40:51 +0200 oj r272678 : code cleanup 2009-06-05 12:02:57 +0200 oj r272677 : code cleanup 2009-06-05 10:42:38 +0200 oj r272670 : #i49320# impl export of single rows and as RTF and HTML 2009-06-03 14:30:37 +0200 oj r272576 : #i79649# check if file matches filter wildcard 2009-06-03 13:41:57 +0200 oj r272560 : #i102470# impl not b like 'c'
2009-08-26 10:09:17 +00:00
else if (getBrowserView() && getBrowserView()->getVclControl() && !getBrowserView()->getVclControl()->IsEditing() && getBrowserView()->getVclControl()->GetSelectRowCount() < 1)
{
SbaGridControl* pControl = getBrowserView()->getVclControl();
pControl->copyCellText(pControl->GetCurRow(), pControl->GetCurColumnId());
}
else
SbaXDataBrowserController::Execute(nId,aArgs);
break;
2000-10-26 13:46:14 +00:00
}
}
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::implAddDatasource( const String& _rDataSourceName, const SharedConnection& _rxConnection )
{
Image a, b, c;
String d, e;
implAddDatasource( _rDataSourceName, a, d, b, e, c, _rxConnection );
}
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::implAddDatasource(const String& _rDbName, Image& _rDbImage,
String& _rQueryName, Image& _rQueryImage, String& _rTableName, Image& _rTableImage,
const SharedConnection& _rxConnection)
{
SolarMutexGuard aGuard;
// initialize the names/images if necessary
if (!_rQueryName.Len())
_rQueryName = String(ModuleRes(RID_STR_QUERIES_CONTAINER));
if (!_rTableName.Len())
_rTableName = String(ModuleRes(RID_STR_TABLES_CONTAINER));
ImageProvider aImageProvider;
if (!_rQueryImage)
2010-11-16 20:42:52 +00:00
_rQueryImage = aImageProvider.getFolderImage( DatabaseObject::QUERY );
if (!_rTableImage)
2010-11-16 20:42:52 +00:00
_rTableImage = aImageProvider.getFolderImage( DatabaseObject::TABLE );
if (!_rDbImage)
2010-11-16 20:42:52 +00:00
_rDbImage = aImageProvider.getDatabaseImage();
// add the entry for the data source
// special handling for data sources denoted by URLs - we do not want to display this ugly URL, do we?
// #i33699# - 2004-09-24 - fs@openoffice.org
String sDSDisplayName, sDataSourceId;
getDataSourceDisplayName_isURL( _rDbName, sDSDisplayName, sDataSourceId );
SvLBoxEntry* pDatasourceEntry = m_pTreeView->getListBox().InsertEntry( sDSDisplayName, _rDbImage, _rDbImage, NULL, sal_False );
DBTreeListUserData* pDSData = new DBTreeListUserData;
pDSData->eType = etDatasource;
pDSData->sAccessor = sDataSourceId;
pDSData->xConnection = _rxConnection;
pDatasourceEntry->SetUserData(pDSData);
// the child for the queries container
{
DBTreeListUserData* pQueriesData = new DBTreeListUserData;
pQueriesData->eType = etQueryContainer;
m_pTreeView->getListBox().InsertEntry(
_rQueryName, _rQueryImage, _rQueryImage, pDatasourceEntry,
TRUE /*ChildsOnDemand*/, LIST_APPEND, pQueriesData );
}
// the child for the tables container
{
DBTreeListUserData* pTablesData = new DBTreeListUserData;
pTablesData->eType = etTableContainer;
m_pTreeView->getListBox().InsertEntry(
_rTableName, _rTableImage, _rTableImage, pDatasourceEntry,
TRUE /*ChildsOnDemand*/, LIST_APPEND, pTablesData );
}
}
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::initializeTreeModel()
{
if (m_xDatabaseContext.is())
{
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
Image aDBImage, aQueriesImage, aTablesImage;
String sQueriesName, sTablesName;
// fill the model with the names of the registered datasources
Sequence< ::rtl::OUString > aDatasources = m_xDatabaseContext->getElementNames();
const ::rtl::OUString* pIter = aDatasources.getConstArray();
const ::rtl::OUString* pEnd = pIter + aDatasources.getLength();
for (; pIter != pEnd; ++pIter)
implAddDatasource( *pIter, aDBImage, sQueriesName, aQueriesImage, sTablesName, aTablesImage, SharedConnection() );
}
}
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::populateTree(const Reference<XNameAccess>& _xNameAccess,
SvLBoxEntry* _pParent,
EntryType _eEntryType)
{
DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(_pParent->GetUserData());
2001-03-29 06:09:53 +00:00
if(pData) // don't ask if the nameaccess is already set see OnExpandEntry views and tables
pData->xContainer = _xNameAccess;
try
{
Sequence< ::rtl::OUString > aNames = _xNameAccess->getElementNames();
const ::rtl::OUString* pIter = aNames.getConstArray();
const ::rtl::OUString* pEnd = pIter + aNames.getLength();
for (; pIter != pEnd; ++pIter)
{
if( !m_pTreeView->getListBox().GetEntryPosByName(*pIter,_pParent))
{
Reference<XNameAccess> xChild(_xNameAccess->getByName(*pIter),UNO_QUERY);
DBTreeListUserData* pEntryData = new DBTreeListUserData;
pEntryData->eType = _eEntryType;
if ( _eEntryType == etQuery && xChild.is() )
{
pEntryData->eType = etQueryContainer;
}
implAppendEntry( _pParent, *pIter, pEntryData, pEntryData->eType );
}
}
}
catch(Exception&)
{
DBG_ERROR("SbaTableQueryBrowser::populateTree: could not fill the tree");
}
}
//------------------------------------------------------------------------------
SvLBoxEntry* SbaTableQueryBrowser::implAppendEntry( SvLBoxEntry* _pParent, const String& _rName, void* _pUserData, EntryType _eEntryType )
{
::std::auto_ptr< ImageProvider > pImageProvider( getImageProviderFor( _pParent ) );
2010-11-16 20:42:52 +00:00
Image aImage;
pImageProvider->getImages( _rName, getDatabaseObjectType( _eEntryType ), aImage );
SvLBoxEntry* pNewEntry = m_pTreeView->getListBox().InsertEntry( _rName, _pParent, _eEntryType == etQueryContainer , LIST_APPEND, _pUserData );
m_pTreeView->getListBox().SetExpandedEntryBmp( pNewEntry, aImage );
m_pTreeView->getListBox().SetCollapsedEntryBmp( pNewEntry, aImage );
return pNewEntry;
}
//------------------------------------------------------------------------------
IMPL_LINK(SbaTableQueryBrowser, OnExpandEntry, SvLBoxEntry*, _pParent)
{
if (_pParent->HasChilds())
// nothing to to ...
return 1L;
SvLBoxEntry* pFirstParent = m_pTreeView->getListBox().GetRootLevelParent(_pParent);
2001-04-02 11:21:49 +00:00
OSL_ENSURE(pFirstParent,"SbaTableQueryBrowser::OnExpandEntry: No rootlevelparent!");
DBTreeListUserData* pData = static_cast< DBTreeListUserData* >(_pParent->GetUserData());
2001-04-02 11:21:49 +00:00
OSL_ENSURE(pData,"SbaTableQueryBrowser::OnExpandEntry: No user data!");
#if OSL_DEBUG_LEVEL > 0
SvLBoxString* pString = static_cast<SvLBoxString*>(pFirstParent->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING));
2001-04-02 11:21:49 +00:00
OSL_ENSURE(pString,"SbaTableQueryBrowser::OnExpandEntry: No string item!");
#endif
if (etTableContainer == pData->eType)
2001-01-09 14:52:33 +00:00
{
WaitObject aWaitCursor(getBrowserView());
// it could be that we already have a connection
SharedConnection xConnection;
ensureConnection( pFirstParent, xConnection );
if ( xConnection.is() )
{
SQLExceptionInfo aInfo;
try
2001-03-29 06:09:53 +00:00
{
Reference< XWarningsSupplier > xWarnings(xConnection, UNO_QUERY);
if (xWarnings.is())
xWarnings->clearWarnings();
// first insert the views because the tables can also include
// views but that time the bitmap is the wrong one
// the nameaccess will be overwriten in populateTree
Reference<XViewsSupplier> xViewSup(xConnection,UNO_QUERY);
if(xViewSup.is())
populateTree( xViewSup->getViews(), _pParent, etTableOrView );
Reference<XTablesSupplier> xTabSup(xConnection,UNO_QUERY);
if(xTabSup.is())
{
populateTree( xTabSup->getTables(), _pParent, etTableOrView );
Reference<XContainer> xCont(xTabSup->getTables(),UNO_QUERY);
if(xCont.is())
// add as listener to know when elements are inserted or removed
xCont->addContainerListener(this);
}
2001-03-29 06:09:53 +00:00
if (xWarnings.is())
{
SQLExceptionInfo aWarnings(xWarnings->getWarnings());
if (aWarnings.isValid() && sal_False)
{
SQLContext aContext;
aContext.Message = String(ModuleRes(STR_OPENTABLES_WARNINGS));
aContext.Details = String(ModuleRes(STR_OPENTABLES_WARNINGS_DETAILS));
aContext.NextException = aWarnings.get();
aWarnings = aContext;
showError(aWarnings);
}
// TODO: we need a better concept for these warnings:
// something like "don't show any warnings for this datasource, again" would be nice
// But this requires an extension of the InteractionHandler and an additional property on the data source
}
}
catch(const SQLContext& e) { aInfo = e; }
catch(const SQLWarning& e) { aInfo = e; }
catch(const SQLException& e) { aInfo = e; }
2001-08-02 06:57:49 +00:00
catch(const WrappedTargetException& e)
{
SQLException aSql;
if(e.TargetException >>= aSql)
aInfo = aSql;
else
OSL_ENSURE(sal_False, "SbaTableQueryBrowser::OnExpandEntry: something strange happended!");
2001-08-02 06:57:49 +00:00
}
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
if (aInfo.isValid())
showError(aInfo);
}
else
return 0L;
2010-12-04 12:33:49 +09:00
// 0 indicates that an error occurred
}
else
{ // we have to expand the queries or bookmarks
if (ensureEntryObject(_pParent))
2001-02-16 15:00:13 +00:00
{
DBTreeListUserData* pParentData = static_cast< DBTreeListUserData* >( _pParent->GetUserData() );
Reference< XNameAccess > xCollection( pParentData->xContainer, UNO_QUERY );
populateTree( xCollection, _pParent, etQuery );
2001-02-16 15:00:13 +00:00
}
}
return 1L;
}
//------------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::ensureEntryObject( SvLBoxEntry* _pEntry )
{
2011-02-03 00:33:36 +01:00
OSL_ENSURE(_pEntry, "SbaTableQueryBrowser::ensureEntryObject: invalid argument!");
if (!_pEntry)
return sal_False;
EntryType eType = getEntryType( _pEntry );
// the user data of the entry
DBTreeListUserData* pEntryData = static_cast<DBTreeListUserData*>(_pEntry->GetUserData());
OSL_ENSURE(pEntryData,"ensureEntryObject: user data should already be set!");
SvLBoxEntry* pDataSourceEntry = m_pTreeView->getListBox().GetRootLevelParent(_pEntry);
sal_Bool bSuccess = sal_False;
switch (eType)
{
case etQueryContainer:
if ( pEntryData->xContainer.is() )
{
// nothing to do
bSuccess = sal_True;
break;
}
{
SvLBoxEntry* pParent = m_pTreeView->getListBox().GetParent(_pEntry);
if ( pParent != pDataSourceEntry )
{
SvLBoxString* pString = (SvLBoxString*)_pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING);
OSL_ENSURE(pString,"There must be a string item!");
::rtl::OUString aName(pString->GetText());
DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(pParent->GetUserData());
try
{
Reference< XNameAccess > xNameAccess(pData->xContainer,UNO_QUERY);
if ( xNameAccess.is() )
pEntryData->xContainer.set(xNameAccess->getByName(aName),UNO_QUERY);
}
catch(const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
bSuccess = pEntryData->xContainer.is();
}
else
{
try
{
Reference< XQueryDefinitionsSupplier > xQuerySup;
m_xDatabaseContext->getByName( getDataSourceAcessor( pDataSourceEntry ) ) >>= xQuerySup;
if (xQuerySup.is())
{
Reference< XNameAccess > xQueryDefs = xQuerySup->getQueryDefinitions();
Reference< XContainer > xCont(xQueryDefs, UNO_QUERY);
if (xCont.is())
// add as listener to get notified if elements are inserted or removed
xCont->addContainerListener(this);
pEntryData->xContainer = xQueryDefs;
bSuccess = pEntryData->xContainer.is();
}
else {
DBG_ERROR("SbaTableQueryBrowser::ensureEntryObject: no XQueryDefinitionsSupplier interface!");
}
}
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
}
}
break;
default:
DBG_ERROR("SbaTableQueryBrowser::ensureEntryObject: ooops ... missing some implementation here!");
// TODO ...
break;
}
return bSuccess;
}
//------------------------------------------------------------------------------
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
sal_Bool SbaTableQueryBrowser::implSelect(const ::svx::ODataAccessDescriptor& _rDescriptor,sal_Bool _bSelectDirect)
{
// extract the props
::rtl::OUString sDataSource;
::rtl::OUString sCommand;
sal_Int32 nCommandType = CommandType::COMMAND;
sal_Bool bEscapeProcessing = sal_True;
extractDescriptorProps(_rDescriptor, sDataSource, sCommand, nCommandType, bEscapeProcessing);
// select it
return implSelect( sDataSource, sCommand, nCommandType, bEscapeProcessing, SharedConnection(), _bSelectDirect );
}
//------------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::implLoadAnything(const ::rtl::OUString& _rDataSourceName, const ::rtl::OUString& _rCommand,
const sal_Int32 _nCommandType, const sal_Bool _bEscapeProcessing, const SharedConnection& _rxConnection)
{
Reference<XPropertySet> xProp(getRowSet(),UNO_QUERY);
if(xProp.is())
{
Reference< ::com::sun::star::form::XLoadable > xLoadable(xProp,UNO_QUERY);
try
{
// the values allowing the RowSet to re-execute
xProp->setPropertyValue(PROPERTY_DATASOURCENAME, makeAny(_rDataSourceName));
if(_rxConnection.is())
xProp->setPropertyValue( PROPERTY_ACTIVE_CONNECTION, makeAny( _rxConnection.getTyped() ) );
// set this _before_ setting the connection, else the rowset would rebuild it ...
xProp->setPropertyValue(PROPERTY_COMMAND_TYPE, makeAny(_nCommandType));
xProp->setPropertyValue(PROPERTY_COMMAND, makeAny(_rCommand));
xProp->setPropertyValue(PROPERTY_ESCAPE_PROCESSING, ::cppu::bool2any(_bEscapeProcessing));
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
if ( m_bPreview )
{
xProp->setPropertyValue(PROPERTY_FETCHDIRECTION, makeAny(FetchDirection::FORWARD));
}
// the formatter depends on the data source we're working on, so rebuild it here ...
initFormatter();
// switch the grid to design mode while loading
getBrowserView()->getGridControl()->setDesignMode(sal_True);
InitializeForm(getRowSet());
sal_Bool bSuccess = sal_True;
{
{
Reference< XNameContainer > xColContainer(getFormComponent(), UNO_QUERY);
// first we have to clear the grid
clearGridColumns(xColContainer);
}
FormErrorHelper aHelper(this);
// load the form
bSuccess = reloadForm(xLoadable);
// initialize the model
InitializeGridModel(getFormComponent());
if ( m_bPreview )
initializePreviewMode();
LoadFinished(sal_True);
}
InvalidateAll();
return bSuccess;
}
2009-11-05 10:35:18 +01:00
catch( const SQLException& e )
{
2009-11-05 10:35:18 +01:00
Any aException( ::cppu::getCaughtException() );
showError( SQLExceptionInfo( aException ) );
}
2009-11-05 10:35:18 +01:00
catch( const WrappedTargetException& e )
2001-08-02 06:57:49 +00:00
{
SQLException aSql;
2009-11-05 10:35:18 +01:00
if ( e.TargetException.isExtractableTo( ::cppu::UnoType< SQLException >::get() ) )
showError( SQLExceptionInfo( e.TargetException ) );
2001-08-02 06:57:49 +00:00
else
2009-11-05 10:35:18 +01:00
{
DBG_UNHANDLED_EXCEPTION();
}
2001-08-02 06:57:49 +00:00
}
catch(Exception&)
{
2009-11-05 10:35:18 +01:00
DBG_UNHANDLED_EXCEPTION();
}
}
InvalidateAll();
return sal_False;
}
//------------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::implSelect(const ::rtl::OUString& _rDataSourceName, const ::rtl::OUString& _rCommand,
const sal_Int32 _nCommandType, const sal_Bool _bEscapeProcessing,
const SharedConnection& _rxConnection
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
,sal_Bool _bSelectDirect)
{
if (_rDataSourceName.getLength() && _rCommand.getLength() && (-1 != _nCommandType))
{
SvLBoxEntry* pDataSource = NULL;
SvLBoxEntry* pCommandType = NULL;
SvLBoxEntry* pCommand = getObjectEntry( _rDataSourceName, _rCommand, _nCommandType, &pDataSource, &pCommandType, sal_True, _rxConnection );
CWS-TOOLING: integrate CWS dba32c 2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion 2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time 2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths 2009-06-29 10:08:54 +0200 fs r273455 : #i103138# refactored the code for positioning/zooming the control Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to take an additional ViewTransformation parameter, describing the transformation to obtain the actual control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter. This has become necessary since during painting, the device which we created our control for might not necessarily have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size, this would lead to wrong results. Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken. Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ... I consider it broken, since: - we need the map mode to obtain the proper zoom level, which is to be forwarded to the control - there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears). It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand one has no possibility to obtain the current zoom by other means. Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used, which means the controls have a zoom of "1:1" set, which is wrong here. 2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties 2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning 2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed 2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc 2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux 2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux 2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar 2009-06-15 14:11:27 +0200 fs r272983 : added since tag 2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted 2009-06-15 11:08:53 +0200 fs r272969 : #i10000# 2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701# 2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src 2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50) 2009-06-02 09:53:10 +0200 fs r272483 : #i10000# 2009-05-29 15:55:03 +0200 fs r272465 : #i100818# 2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any 2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition 2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex 2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed 2009-05-27 14:53:36 +0200 fs r272347 : #i10000# 2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast 2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly 2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used 2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function 2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well 2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution 2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set 2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition 2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria 2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR 2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein 2009-05-25 15:49:57 +0200 fs r272254 : #i999704# 2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property 2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString 2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein 2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property 2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property) 2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default 2009-05-25 14:39:31 +0200 fs r272243 : removed dead import 2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns 2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent 2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel 2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event 2009-05-22 21:42:47 +0200 fs r272211 : #i102003# 2009-05-22 21:42:20 +0200 fs r272210 : grammar 2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously 2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear 2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG 2009-05-22 12:03:42 +0200 fs r272180 : #i88878# provided by noel.power@novell.com implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs 2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them 2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values 2009-05-15 15:08:31 +0200 fs r271937 : includes 2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint 2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity 2009-05-15 10:15:44 +0200 fs r271928 : #i10000# 2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:23:23 +0200 fs r271919 : #i101622# 2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids 2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b) 2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48 2009-05-07 14:43:19 +0200 fs r271670 : #i101477# 2009-05-07 14:37:30 +0200 fs r271668 : #i101477# 2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch 2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics 2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47) 2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control 2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
if (pCommand)
{
CWS-TOOLING: integrate CWS dba32c 2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion 2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time 2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths 2009-06-29 10:08:54 +0200 fs r273455 : #i103138# refactored the code for positioning/zooming the control Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to take an additional ViewTransformation parameter, describing the transformation to obtain the actual control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter. This has become necessary since during painting, the device which we created our control for might not necessarily have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size, this would lead to wrong results. Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken. Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ... I consider it broken, since: - we need the map mode to obtain the proper zoom level, which is to be forwarded to the control - there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears). It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand one has no possibility to obtain the current zoom by other means. Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used, which means the controls have a zoom of "1:1" set, which is wrong here. 2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties 2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning 2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed 2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc 2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux 2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux 2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar 2009-06-15 14:11:27 +0200 fs r272983 : added since tag 2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted 2009-06-15 11:08:53 +0200 fs r272969 : #i10000# 2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701# 2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src 2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50) 2009-06-02 09:53:10 +0200 fs r272483 : #i10000# 2009-05-29 15:55:03 +0200 fs r272465 : #i100818# 2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any 2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition 2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex 2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed 2009-05-27 14:53:36 +0200 fs r272347 : #i10000# 2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast 2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly 2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used 2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function 2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well 2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution 2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set 2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition 2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria 2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR 2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein 2009-05-25 15:49:57 +0200 fs r272254 : #i999704# 2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property 2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString 2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein 2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property 2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property) 2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default 2009-05-25 14:39:31 +0200 fs r272243 : removed dead import 2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns 2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent 2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel 2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event 2009-05-22 21:42:47 +0200 fs r272211 : #i102003# 2009-05-22 21:42:20 +0200 fs r272210 : grammar 2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously 2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear 2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG 2009-05-22 12:03:42 +0200 fs r272180 : #i88878# provided by noel.power@novell.com implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs 2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them 2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values 2009-05-15 15:08:31 +0200 fs r271937 : includes 2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint 2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity 2009-05-15 10:15:44 +0200 fs r271928 : #i10000# 2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:23:23 +0200 fs r271919 : #i101622# 2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids 2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b) 2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48 2009-05-07 14:43:19 +0200 fs r271670 : #i101477# 2009-05-07 14:37:30 +0200 fs r271668 : #i101477# 2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch 2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics 2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47) 2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control 2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
bool bSuccess = true;
if ( _bSelectDirect )
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
{
CWS-TOOLING: integrate CWS dba32c 2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion 2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time 2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths 2009-06-29 10:08:54 +0200 fs r273455 : #i103138# refactored the code for positioning/zooming the control Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to take an additional ViewTransformation parameter, describing the transformation to obtain the actual control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter. This has become necessary since during painting, the device which we created our control for might not necessarily have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size, this would lead to wrong results. Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken. Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ... I consider it broken, since: - we need the map mode to obtain the proper zoom level, which is to be forwarded to the control - there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears). It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand one has no possibility to obtain the current zoom by other means. Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used, which means the controls have a zoom of "1:1" set, which is wrong here. 2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties 2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning 2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed 2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc 2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux 2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux 2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar 2009-06-15 14:11:27 +0200 fs r272983 : added since tag 2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted 2009-06-15 11:08:53 +0200 fs r272969 : #i10000# 2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701# 2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src 2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50) 2009-06-02 09:53:10 +0200 fs r272483 : #i10000# 2009-05-29 15:55:03 +0200 fs r272465 : #i100818# 2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any 2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition 2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex 2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed 2009-05-27 14:53:36 +0200 fs r272347 : #i10000# 2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast 2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly 2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used 2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function 2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well 2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution 2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set 2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition 2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria 2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR 2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein 2009-05-25 15:49:57 +0200 fs r272254 : #i999704# 2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property 2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString 2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein 2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property 2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property) 2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default 2009-05-25 14:39:31 +0200 fs r272243 : removed dead import 2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns 2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent 2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel 2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event 2009-05-22 21:42:47 +0200 fs r272211 : #i102003# 2009-05-22 21:42:20 +0200 fs r272210 : grammar 2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously 2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear 2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG 2009-05-22 12:03:42 +0200 fs r272180 : #i88878# provided by noel.power@novell.com implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs 2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them 2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values 2009-05-15 15:08:31 +0200 fs r271937 : includes 2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint 2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity 2009-05-15 10:15:44 +0200 fs r271928 : #i10000# 2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:23:23 +0200 fs r271919 : #i101622# 2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids 2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b) 2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48 2009-05-07 14:43:19 +0200 fs r271670 : #i101477# 2009-05-07 14:37:30 +0200 fs r271668 : #i101477# 2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch 2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics 2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47) 2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control 2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
bSuccess = implSelect( pCommand );
}
else
{
m_pTreeView->getListBox().Select( pCommand );
}
2008-10-01 12:28:29 +00:00
CWS-TOOLING: integrate CWS dba32c 2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion 2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time 2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths 2009-06-29 10:08:54 +0200 fs r273455 : #i103138# refactored the code for positioning/zooming the control Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to take an additional ViewTransformation parameter, describing the transformation to obtain the actual control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter. This has become necessary since during painting, the device which we created our control for might not necessarily have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size, this would lead to wrong results. Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken. Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ... I consider it broken, since: - we need the map mode to obtain the proper zoom level, which is to be forwarded to the control - there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears). It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand one has no possibility to obtain the current zoom by other means. Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used, which means the controls have a zoom of "1:1" set, which is wrong here. 2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties 2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning 2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed 2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc 2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux 2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux 2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar 2009-06-15 14:11:27 +0200 fs r272983 : added since tag 2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted 2009-06-15 11:08:53 +0200 fs r272969 : #i10000# 2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701# 2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src 2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50) 2009-06-02 09:53:10 +0200 fs r272483 : #i10000# 2009-05-29 15:55:03 +0200 fs r272465 : #i100818# 2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any 2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition 2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex 2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed 2009-05-27 14:53:36 +0200 fs r272347 : #i10000# 2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast 2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly 2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used 2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function 2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well 2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution 2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set 2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition 2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria 2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR 2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein 2009-05-25 15:49:57 +0200 fs r272254 : #i999704# 2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property 2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString 2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein 2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property 2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property) 2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default 2009-05-25 14:39:31 +0200 fs r272243 : removed dead import 2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns 2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent 2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel 2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event 2009-05-22 21:42:47 +0200 fs r272211 : #i102003# 2009-05-22 21:42:20 +0200 fs r272210 : grammar 2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously 2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear 2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG 2009-05-22 12:03:42 +0200 fs r272180 : #i88878# provided by noel.power@novell.com implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs 2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them 2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values 2009-05-15 15:08:31 +0200 fs r271937 : includes 2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint 2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity 2009-05-15 10:15:44 +0200 fs r271928 : #i10000# 2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:23:23 +0200 fs r271919 : #i101622# 2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids 2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b) 2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48 2009-05-07 14:43:19 +0200 fs r271670 : #i101477# 2009-05-07 14:37:30 +0200 fs r271668 : #i101477# 2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch 2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics 2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47) 2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control 2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
if ( bSuccess )
{
2008-10-01 12:28:29 +00:00
m_pTreeView->getListBox().MakeVisible(pCommand);
m_pTreeView->getListBox().SetCursor(pCommand);
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
}
CWS-TOOLING: integrate CWS dba32c 2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion 2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time 2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths 2009-06-29 10:08:54 +0200 fs r273455 : #i103138# refactored the code for positioning/zooming the control Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to take an additional ViewTransformation parameter, describing the transformation to obtain the actual control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter. This has become necessary since during painting, the device which we created our control for might not necessarily have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size, this would lead to wrong results. Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken. Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ... I consider it broken, since: - we need the map mode to obtain the proper zoom level, which is to be forwarded to the control - there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears). It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand one has no possibility to obtain the current zoom by other means. Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used, which means the controls have a zoom of "1:1" set, which is wrong here. 2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties 2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning 2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed 2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc 2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux 2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux 2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar 2009-06-15 14:11:27 +0200 fs r272983 : added since tag 2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted 2009-06-15 11:08:53 +0200 fs r272969 : #i10000# 2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701# 2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src 2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50) 2009-06-02 09:53:10 +0200 fs r272483 : #i10000# 2009-05-29 15:55:03 +0200 fs r272465 : #i100818# 2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any 2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition 2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex 2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed 2009-05-27 14:53:36 +0200 fs r272347 : #i10000# 2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast 2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly 2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used 2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function 2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well 2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution 2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set 2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition 2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria 2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR 2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein 2009-05-25 15:49:57 +0200 fs r272254 : #i999704# 2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property 2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString 2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein 2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property 2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property) 2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default 2009-05-25 14:39:31 +0200 fs r272243 : removed dead import 2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns 2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent 2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel 2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event 2009-05-22 21:42:47 +0200 fs r272211 : #i102003# 2009-05-22 21:42:20 +0200 fs r272210 : grammar 2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously 2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear 2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG 2009-05-22 12:03:42 +0200 fs r272180 : #i88878# provided by noel.power@novell.com implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs 2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them 2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values 2009-05-15 15:08:31 +0200 fs r271937 : includes 2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint 2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity 2009-05-15 10:15:44 +0200 fs r271928 : #i10000# 2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:23:23 +0200 fs r271919 : #i101622# 2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids 2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b) 2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48 2009-05-07 14:43:19 +0200 fs r271670 : #i101477# 2009-05-07 14:37:30 +0200 fs r271668 : #i101477# 2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch 2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics 2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47) 2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control 2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
}
else if (!pCommandType)
{
if ( m_pCurrentlyDisplayed )
{ // tell the old entry (if any) it has been deselected
selectPath(m_pCurrentlyDisplayed, sal_False);
m_pCurrentlyDisplayed = NULL;
}
CWS-TOOLING: integrate CWS dba32c 2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion 2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time 2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths 2009-06-29 10:08:54 +0200 fs r273455 : #i103138# refactored the code for positioning/zooming the control Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to take an additional ViewTransformation parameter, describing the transformation to obtain the actual control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter. This has become necessary since during painting, the device which we created our control for might not necessarily have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size, this would lead to wrong results. Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken. Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ... I consider it broken, since: - we need the map mode to obtain the proper zoom level, which is to be forwarded to the control - there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears). It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand one has no possibility to obtain the current zoom by other means. Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used, which means the controls have a zoom of "1:1" set, which is wrong here. 2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties 2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning 2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed 2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc 2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux 2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux 2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar 2009-06-15 14:11:27 +0200 fs r272983 : added since tag 2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted 2009-06-15 11:08:53 +0200 fs r272969 : #i10000# 2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701# 2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src 2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50) 2009-06-02 09:53:10 +0200 fs r272483 : #i10000# 2009-05-29 15:55:03 +0200 fs r272465 : #i100818# 2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any 2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition 2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex 2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed 2009-05-27 14:53:36 +0200 fs r272347 : #i10000# 2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast 2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly 2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used 2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function 2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well 2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution 2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set 2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition 2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria 2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR 2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein 2009-05-25 15:49:57 +0200 fs r272254 : #i999704# 2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property 2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString 2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein 2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property 2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property) 2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default 2009-05-25 14:39:31 +0200 fs r272243 : removed dead import 2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns 2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent 2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel 2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event 2009-05-22 21:42:47 +0200 fs r272211 : #i102003# 2009-05-22 21:42:20 +0200 fs r272210 : grammar 2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously 2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear 2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG 2009-05-22 12:03:42 +0200 fs r272180 : #i88878# provided by noel.power@novell.com implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs 2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them 2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values 2009-05-15 15:08:31 +0200 fs r271937 : includes 2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint 2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity 2009-05-15 10:15:44 +0200 fs r271928 : #i10000# 2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:23:23 +0200 fs r271919 : #i101622# 2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids 2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b) 2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48 2009-05-07 14:43:19 +0200 fs r271670 : #i101477# 2009-05-07 14:37:30 +0200 fs r271668 : #i101477# 2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch 2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics 2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47) 2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control 2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
// we have a command and need to display this in the rowset
return implLoadAnything(_rDataSourceName, _rCommand, _nCommandType, _bEscapeProcessing, _rxConnection);
}
}
return sal_False;
}
//------------------------------------------------------------------------------
CWS-TOOLING: integrate CWS dba31e 2008-11-19 12:36:23 +0100 msc r263980 : i96104 2008-11-19 12:31:19 +0100 msc r263979 : i96104 2008-11-19 12:21:55 +0100 msc r263977 : i96104 2008-11-19 12:18:53 +0100 msc r263976 : i96104 2008-11-18 09:09:45 +0100 oj r263746 : disable color entry when area is set 2008-11-18 08:37:52 +0100 oj r263741 : #remove sub report entry 2008-11-17 11:20:25 +0100 fs r263708 : #i10000# 2008-11-17 11:06:52 +0100 fs r263706 : minimal version now is 3.1 2008-11-12 22:25:59 +0100 fs r263621 : #i96150# 2008-11-12 22:20:02 +0100 fs r263620 : rebased to m34 2008-11-12 21:39:41 +0100 fs r263618 : MANUAL REBASE: rebase CWS dba31d to DEV300_m34 2008-11-12 13:54:58 +0100 fs r263597 : #i96134# MediaDescriptor.URL is to be preferred over MediaDescriptor.FileName. Nonetheless, ensure both are handled 2008-11-12 13:53:40 +0100 fs r263596 : #i96134# re-enabled the code for #i41897#, a better fix is to come 2008-11-12 12:48:21 +0100 fs r263585 : #i96134# disable saving URLs of file-base databases relatively 2008-11-11 16:11:11 +0100 msc r263566 : #i96104# 2008-11-05 09:09:47 +0100 oj r263342 : #i88727# color noe added 2008-11-05 08:41:43 +0100 oj r263341 : #i77916# zoom added 2008-11-04 21:24:15 +0100 fs r263339 : disposing: call disposeAndClear without own mutex locked - some of our listeners insist on locking the SolarMutex, which sometimes led to deadlocks on the complex test cases 2008-11-04 21:23:15 +0100 fs r263338 : remove SolarMutex locking - this happned in CWS dba31c (in the CVS version), which this CWS was created from, but seems to got lost during resync 2008-11-04 20:49:50 +0100 fs r263335 : docu formatting 2008-11-04 20:06:39 +0100 fs r263334 : #i95826# use m_aMutex, not a DocumentGuard (wrongly resolved merge conflicts) 2008-11-04 17:36:29 +0100 fs r263332 : #i92688# properly revoke as XEventListener from m_xActiveController when disposing 2008-11-04 14:49:34 +0100 fs r263324 : #i92322# enable Input Required if EmptyIsNULL does not exist at the control 2008-10-31 11:10:04 +0100 oj r262857 : merge from cvs to svn 2008-10-31 09:46:45 +0100 oj r262853 : merge from cvs to svn 2008-10-31 08:46:37 +0100 oj r262849 : merge from cvs to svn 2008-10-31 08:44:24 +0100 oj r262848 : merge from cvs to svn 2008-10-31 08:43:33 +0100 oj r262847 : merge from cvs to svn 2008-10-31 08:42:28 +0100 oj r262846 : merge from cvs to svn 2008-10-31 08:41:58 +0100 oj r262845 : merge from cvs to svn 2008-10-31 08:41:32 +0100 oj r262844 : merge from cvs to svn 2008-10-28 12:19:50 +0100 oj r262733 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:42 +0100 oj r262732 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:36 +0100 oj r262731 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:31 +0100 oj r262730 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:22 +0100 oj r262729 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:18 +0100 oj r262728 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:10 +0100 oj r262727 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:06 +0100 oj r262726 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:05 +0100 oj r262725 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:01 +0100 oj r262724 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:50 +0100 oj r262723 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:41 +0100 oj r262722 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:40 +0100 oj r262721 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:27 +0100 oj r262720 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:10 +0100 oj r262719 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:01 +0100 oj r262718 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:17:39 +0100 oj r262717 : #iXXXXX#: migrate CWS dba31e to SVN
2008-12-01 12:31:27 +00:00
IMPL_LINK(SbaTableQueryBrowser, OnSelectionChange, void*, /*NOINTERESTEDIN*/)
{
CWS-TOOLING: integrate CWS dba31e 2008-11-19 12:36:23 +0100 msc r263980 : i96104 2008-11-19 12:31:19 +0100 msc r263979 : i96104 2008-11-19 12:21:55 +0100 msc r263977 : i96104 2008-11-19 12:18:53 +0100 msc r263976 : i96104 2008-11-18 09:09:45 +0100 oj r263746 : disable color entry when area is set 2008-11-18 08:37:52 +0100 oj r263741 : #remove sub report entry 2008-11-17 11:20:25 +0100 fs r263708 : #i10000# 2008-11-17 11:06:52 +0100 fs r263706 : minimal version now is 3.1 2008-11-12 22:25:59 +0100 fs r263621 : #i96150# 2008-11-12 22:20:02 +0100 fs r263620 : rebased to m34 2008-11-12 21:39:41 +0100 fs r263618 : MANUAL REBASE: rebase CWS dba31d to DEV300_m34 2008-11-12 13:54:58 +0100 fs r263597 : #i96134# MediaDescriptor.URL is to be preferred over MediaDescriptor.FileName. Nonetheless, ensure both are handled 2008-11-12 13:53:40 +0100 fs r263596 : #i96134# re-enabled the code for #i41897#, a better fix is to come 2008-11-12 12:48:21 +0100 fs r263585 : #i96134# disable saving URLs of file-base databases relatively 2008-11-11 16:11:11 +0100 msc r263566 : #i96104# 2008-11-05 09:09:47 +0100 oj r263342 : #i88727# color noe added 2008-11-05 08:41:43 +0100 oj r263341 : #i77916# zoom added 2008-11-04 21:24:15 +0100 fs r263339 : disposing: call disposeAndClear without own mutex locked - some of our listeners insist on locking the SolarMutex, which sometimes led to deadlocks on the complex test cases 2008-11-04 21:23:15 +0100 fs r263338 : remove SolarMutex locking - this happned in CWS dba31c (in the CVS version), which this CWS was created from, but seems to got lost during resync 2008-11-04 20:49:50 +0100 fs r263335 : docu formatting 2008-11-04 20:06:39 +0100 fs r263334 : #i95826# use m_aMutex, not a DocumentGuard (wrongly resolved merge conflicts) 2008-11-04 17:36:29 +0100 fs r263332 : #i92688# properly revoke as XEventListener from m_xActiveController when disposing 2008-11-04 14:49:34 +0100 fs r263324 : #i92322# enable Input Required if EmptyIsNULL does not exist at the control 2008-10-31 11:10:04 +0100 oj r262857 : merge from cvs to svn 2008-10-31 09:46:45 +0100 oj r262853 : merge from cvs to svn 2008-10-31 08:46:37 +0100 oj r262849 : merge from cvs to svn 2008-10-31 08:44:24 +0100 oj r262848 : merge from cvs to svn 2008-10-31 08:43:33 +0100 oj r262847 : merge from cvs to svn 2008-10-31 08:42:28 +0100 oj r262846 : merge from cvs to svn 2008-10-31 08:41:58 +0100 oj r262845 : merge from cvs to svn 2008-10-31 08:41:32 +0100 oj r262844 : merge from cvs to svn 2008-10-28 12:19:50 +0100 oj r262733 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:42 +0100 oj r262732 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:36 +0100 oj r262731 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:31 +0100 oj r262730 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:22 +0100 oj r262729 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:18 +0100 oj r262728 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:10 +0100 oj r262727 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:06 +0100 oj r262726 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:05 +0100 oj r262725 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:01 +0100 oj r262724 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:50 +0100 oj r262723 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:41 +0100 oj r262722 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:40 +0100 oj r262721 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:27 +0100 oj r262720 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:10 +0100 oj r262719 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:01 +0100 oj r262718 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:17:39 +0100 oj r262717 : #iXXXXX#: migrate CWS dba31e to SVN
2008-12-01 12:31:27 +00:00
return implSelect( m_pTreeView->getListBox().FirstSelected() ) ? 1L : 0L;
}
//------------------------------------------------------------------------------
SvLBoxEntry* SbaTableQueryBrowser::implGetConnectionEntry(SvLBoxEntry* _pEntry) const
{
SvLBoxEntry* pCurrentEntry = _pEntry;
DBTreeListUserData* pEntryData = static_cast< DBTreeListUserData* >( pCurrentEntry->GetUserData() );
while(pEntryData->eType != etDatasource )
{
pCurrentEntry = m_pTreeModel->GetParent(pCurrentEntry);
pEntryData = static_cast< DBTreeListUserData* >( pCurrentEntry->GetUserData() );
}
return pCurrentEntry;
}
CWS-TOOLING: integrate CWS dba31e 2008-11-19 12:36:23 +0100 msc r263980 : i96104 2008-11-19 12:31:19 +0100 msc r263979 : i96104 2008-11-19 12:21:55 +0100 msc r263977 : i96104 2008-11-19 12:18:53 +0100 msc r263976 : i96104 2008-11-18 09:09:45 +0100 oj r263746 : disable color entry when area is set 2008-11-18 08:37:52 +0100 oj r263741 : #remove sub report entry 2008-11-17 11:20:25 +0100 fs r263708 : #i10000# 2008-11-17 11:06:52 +0100 fs r263706 : minimal version now is 3.1 2008-11-12 22:25:59 +0100 fs r263621 : #i96150# 2008-11-12 22:20:02 +0100 fs r263620 : rebased to m34 2008-11-12 21:39:41 +0100 fs r263618 : MANUAL REBASE: rebase CWS dba31d to DEV300_m34 2008-11-12 13:54:58 +0100 fs r263597 : #i96134# MediaDescriptor.URL is to be preferred over MediaDescriptor.FileName. Nonetheless, ensure both are handled 2008-11-12 13:53:40 +0100 fs r263596 : #i96134# re-enabled the code for #i41897#, a better fix is to come 2008-11-12 12:48:21 +0100 fs r263585 : #i96134# disable saving URLs of file-base databases relatively 2008-11-11 16:11:11 +0100 msc r263566 : #i96104# 2008-11-05 09:09:47 +0100 oj r263342 : #i88727# color noe added 2008-11-05 08:41:43 +0100 oj r263341 : #i77916# zoom added 2008-11-04 21:24:15 +0100 fs r263339 : disposing: call disposeAndClear without own mutex locked - some of our listeners insist on locking the SolarMutex, which sometimes led to deadlocks on the complex test cases 2008-11-04 21:23:15 +0100 fs r263338 : remove SolarMutex locking - this happned in CWS dba31c (in the CVS version), which this CWS was created from, but seems to got lost during resync 2008-11-04 20:49:50 +0100 fs r263335 : docu formatting 2008-11-04 20:06:39 +0100 fs r263334 : #i95826# use m_aMutex, not a DocumentGuard (wrongly resolved merge conflicts) 2008-11-04 17:36:29 +0100 fs r263332 : #i92688# properly revoke as XEventListener from m_xActiveController when disposing 2008-11-04 14:49:34 +0100 fs r263324 : #i92322# enable Input Required if EmptyIsNULL does not exist at the control 2008-10-31 11:10:04 +0100 oj r262857 : merge from cvs to svn 2008-10-31 09:46:45 +0100 oj r262853 : merge from cvs to svn 2008-10-31 08:46:37 +0100 oj r262849 : merge from cvs to svn 2008-10-31 08:44:24 +0100 oj r262848 : merge from cvs to svn 2008-10-31 08:43:33 +0100 oj r262847 : merge from cvs to svn 2008-10-31 08:42:28 +0100 oj r262846 : merge from cvs to svn 2008-10-31 08:41:58 +0100 oj r262845 : merge from cvs to svn 2008-10-31 08:41:32 +0100 oj r262844 : merge from cvs to svn 2008-10-28 12:19:50 +0100 oj r262733 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:42 +0100 oj r262732 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:36 +0100 oj r262731 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:31 +0100 oj r262730 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:22 +0100 oj r262729 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:18 +0100 oj r262728 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:10 +0100 oj r262727 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:06 +0100 oj r262726 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:05 +0100 oj r262725 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:01 +0100 oj r262724 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:50 +0100 oj r262723 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:41 +0100 oj r262722 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:40 +0100 oj r262721 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:27 +0100 oj r262720 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:10 +0100 oj r262719 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:01 +0100 oj r262718 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:17:39 +0100 oj r262717 : #iXXXXX#: migrate CWS dba31e to SVN
2008-12-01 12:31:27 +00:00
//------------------------------------------------------------------------------
bool SbaTableQueryBrowser::implSelect( SvLBoxEntry* _pEntry )
{
if ( !_pEntry )
return false;
DBTreeListUserData* pEntryData = static_cast< DBTreeListUserData* >( _pEntry->GetUserData() );
switch (pEntryData->eType)
{
case etTableOrView:
case etQuery:
break;
default:
// nothing to do
CWS-TOOLING: integrate CWS dba31e 2008-11-19 12:36:23 +0100 msc r263980 : i96104 2008-11-19 12:31:19 +0100 msc r263979 : i96104 2008-11-19 12:21:55 +0100 msc r263977 : i96104 2008-11-19 12:18:53 +0100 msc r263976 : i96104 2008-11-18 09:09:45 +0100 oj r263746 : disable color entry when area is set 2008-11-18 08:37:52 +0100 oj r263741 : #remove sub report entry 2008-11-17 11:20:25 +0100 fs r263708 : #i10000# 2008-11-17 11:06:52 +0100 fs r263706 : minimal version now is 3.1 2008-11-12 22:25:59 +0100 fs r263621 : #i96150# 2008-11-12 22:20:02 +0100 fs r263620 : rebased to m34 2008-11-12 21:39:41 +0100 fs r263618 : MANUAL REBASE: rebase CWS dba31d to DEV300_m34 2008-11-12 13:54:58 +0100 fs r263597 : #i96134# MediaDescriptor.URL is to be preferred over MediaDescriptor.FileName. Nonetheless, ensure both are handled 2008-11-12 13:53:40 +0100 fs r263596 : #i96134# re-enabled the code for #i41897#, a better fix is to come 2008-11-12 12:48:21 +0100 fs r263585 : #i96134# disable saving URLs of file-base databases relatively 2008-11-11 16:11:11 +0100 msc r263566 : #i96104# 2008-11-05 09:09:47 +0100 oj r263342 : #i88727# color noe added 2008-11-05 08:41:43 +0100 oj r263341 : #i77916# zoom added 2008-11-04 21:24:15 +0100 fs r263339 : disposing: call disposeAndClear without own mutex locked - some of our listeners insist on locking the SolarMutex, which sometimes led to deadlocks on the complex test cases 2008-11-04 21:23:15 +0100 fs r263338 : remove SolarMutex locking - this happned in CWS dba31c (in the CVS version), which this CWS was created from, but seems to got lost during resync 2008-11-04 20:49:50 +0100 fs r263335 : docu formatting 2008-11-04 20:06:39 +0100 fs r263334 : #i95826# use m_aMutex, not a DocumentGuard (wrongly resolved merge conflicts) 2008-11-04 17:36:29 +0100 fs r263332 : #i92688# properly revoke as XEventListener from m_xActiveController when disposing 2008-11-04 14:49:34 +0100 fs r263324 : #i92322# enable Input Required if EmptyIsNULL does not exist at the control 2008-10-31 11:10:04 +0100 oj r262857 : merge from cvs to svn 2008-10-31 09:46:45 +0100 oj r262853 : merge from cvs to svn 2008-10-31 08:46:37 +0100 oj r262849 : merge from cvs to svn 2008-10-31 08:44:24 +0100 oj r262848 : merge from cvs to svn 2008-10-31 08:43:33 +0100 oj r262847 : merge from cvs to svn 2008-10-31 08:42:28 +0100 oj r262846 : merge from cvs to svn 2008-10-31 08:41:58 +0100 oj r262845 : merge from cvs to svn 2008-10-31 08:41:32 +0100 oj r262844 : merge from cvs to svn 2008-10-28 12:19:50 +0100 oj r262733 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:42 +0100 oj r262732 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:36 +0100 oj r262731 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:31 +0100 oj r262730 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:22 +0100 oj r262729 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:18 +0100 oj r262728 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:10 +0100 oj r262727 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:06 +0100 oj r262726 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:05 +0100 oj r262725 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:01 +0100 oj r262724 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:50 +0100 oj r262723 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:41 +0100 oj r262722 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:40 +0100 oj r262721 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:27 +0100 oj r262720 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:10 +0100 oj r262719 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:01 +0100 oj r262718 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:17:39 +0100 oj r262717 : #iXXXXX#: migrate CWS dba31e to SVN
2008-12-01 12:31:27 +00:00
return false;
}
CWS-TOOLING: integrate CWS dba31e 2008-11-19 12:36:23 +0100 msc r263980 : i96104 2008-11-19 12:31:19 +0100 msc r263979 : i96104 2008-11-19 12:21:55 +0100 msc r263977 : i96104 2008-11-19 12:18:53 +0100 msc r263976 : i96104 2008-11-18 09:09:45 +0100 oj r263746 : disable color entry when area is set 2008-11-18 08:37:52 +0100 oj r263741 : #remove sub report entry 2008-11-17 11:20:25 +0100 fs r263708 : #i10000# 2008-11-17 11:06:52 +0100 fs r263706 : minimal version now is 3.1 2008-11-12 22:25:59 +0100 fs r263621 : #i96150# 2008-11-12 22:20:02 +0100 fs r263620 : rebased to m34 2008-11-12 21:39:41 +0100 fs r263618 : MANUAL REBASE: rebase CWS dba31d to DEV300_m34 2008-11-12 13:54:58 +0100 fs r263597 : #i96134# MediaDescriptor.URL is to be preferred over MediaDescriptor.FileName. Nonetheless, ensure both are handled 2008-11-12 13:53:40 +0100 fs r263596 : #i96134# re-enabled the code for #i41897#, a better fix is to come 2008-11-12 12:48:21 +0100 fs r263585 : #i96134# disable saving URLs of file-base databases relatively 2008-11-11 16:11:11 +0100 msc r263566 : #i96104# 2008-11-05 09:09:47 +0100 oj r263342 : #i88727# color noe added 2008-11-05 08:41:43 +0100 oj r263341 : #i77916# zoom added 2008-11-04 21:24:15 +0100 fs r263339 : disposing: call disposeAndClear without own mutex locked - some of our listeners insist on locking the SolarMutex, which sometimes led to deadlocks on the complex test cases 2008-11-04 21:23:15 +0100 fs r263338 : remove SolarMutex locking - this happned in CWS dba31c (in the CVS version), which this CWS was created from, but seems to got lost during resync 2008-11-04 20:49:50 +0100 fs r263335 : docu formatting 2008-11-04 20:06:39 +0100 fs r263334 : #i95826# use m_aMutex, not a DocumentGuard (wrongly resolved merge conflicts) 2008-11-04 17:36:29 +0100 fs r263332 : #i92688# properly revoke as XEventListener from m_xActiveController when disposing 2008-11-04 14:49:34 +0100 fs r263324 : #i92322# enable Input Required if EmptyIsNULL does not exist at the control 2008-10-31 11:10:04 +0100 oj r262857 : merge from cvs to svn 2008-10-31 09:46:45 +0100 oj r262853 : merge from cvs to svn 2008-10-31 08:46:37 +0100 oj r262849 : merge from cvs to svn 2008-10-31 08:44:24 +0100 oj r262848 : merge from cvs to svn 2008-10-31 08:43:33 +0100 oj r262847 : merge from cvs to svn 2008-10-31 08:42:28 +0100 oj r262846 : merge from cvs to svn 2008-10-31 08:41:58 +0100 oj r262845 : merge from cvs to svn 2008-10-31 08:41:32 +0100 oj r262844 : merge from cvs to svn 2008-10-28 12:19:50 +0100 oj r262733 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:42 +0100 oj r262732 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:36 +0100 oj r262731 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:31 +0100 oj r262730 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:22 +0100 oj r262729 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:18 +0100 oj r262728 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:10 +0100 oj r262727 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:06 +0100 oj r262726 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:05 +0100 oj r262725 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:01 +0100 oj r262724 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:50 +0100 oj r262723 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:41 +0100 oj r262722 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:40 +0100 oj r262721 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:27 +0100 oj r262720 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:10 +0100 oj r262719 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:01 +0100 oj r262718 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:17:39 +0100 oj r262717 : #iXXXXX#: migrate CWS dba31e to SVN
2008-12-01 12:31:27 +00:00
OSL_ENSURE(m_pTreeModel->HasParent(_pEntry), "SbaTableQueryBrowser::implSelect: invalid entry (1)!");
OSL_ENSURE(m_pTreeModel->HasParent(m_pTreeModel->GetParent(_pEntry)), "SbaTableQueryBrowser::implSelect: invalid entry (2)!");
// get the entry for the tables or queries
SvLBoxEntry* pContainer = m_pTreeModel->GetParent(_pEntry);
DBTreeListUserData* pContainerData = static_cast<DBTreeListUserData*>(pContainer->GetUserData());
// get the entry for the datasource
SvLBoxEntry* pConnection = implGetConnectionEntry(pContainer);
DBTreeListUserData* pConData = static_cast<DBTreeListUserData*>(pConnection->GetUserData());
// reinitialize the rowset
// but first check if it is necessary
// get all old properties
Reference<XPropertySet> xRowSetProps(getRowSet(),UNO_QUERY);
::rtl::OUString aOldName;
xRowSetProps->getPropertyValue(PROPERTY_COMMAND) >>= aOldName;
sal_Int32 nOldType = 0;
xRowSetProps->getPropertyValue(PROPERTY_COMMAND_TYPE) >>= nOldType;
Reference<XConnection> xOldConnection(xRowSetProps->getPropertyValue(PROPERTY_ACTIVE_CONNECTION),UNO_QUERY);
// the name of the table or query
SvLBoxString* pString = (SvLBoxString*)_pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING);
OSL_ENSURE(pString,"There must be a string item!");
const ::rtl::OUString sSimpleName = pString->GetText();
::rtl::OUStringBuffer sNameBuffer(sSimpleName);
if ( etQueryContainer == pContainerData->eType )
{
SvLBoxEntry* pTemp = pContainer;
while( m_pTreeModel->GetParent(pTemp) != pConnection )
{
sNameBuffer.insert(0,sal_Unicode('/'));
pString = (SvLBoxString*)pTemp->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING);
OSL_ENSURE(pString,"There must be a string item!");
sNameBuffer.insert(0,pString->GetText());
pTemp = m_pTreeModel->GetParent(pTemp);
}
}
::rtl::OUString aName = sNameBuffer.makeStringAndClear();
sal_Int32 nCommandType = ( etTableContainer == pContainerData->eType)
? CommandType::TABLE
: CommandType::QUERY;
// check if need to rebuild the rowset
sal_Bool bRebuild = ( xOldConnection != pConData->xConnection )
|| ( nOldType != nCommandType )
|| ( aName != aOldName );
2001-08-27 05:57:24 +00:00
Reference< ::com::sun::star::form::XLoadable > xLoadable = getLoadable();
bRebuild |= !xLoadable->isLoaded();
CWS-TOOLING: integrate CWS dba32c 2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion 2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time 2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths 2009-06-29 10:08:54 +0200 fs r273455 : #i103138# refactored the code for positioning/zooming the control Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to take an additional ViewTransformation parameter, describing the transformation to obtain the actual control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter. This has become necessary since during painting, the device which we created our control for might not necessarily have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size, this would lead to wrong results. Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken. Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ... I consider it broken, since: - we need the map mode to obtain the proper zoom level, which is to be forwarded to the control - there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears). It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand one has no possibility to obtain the current zoom by other means. Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used, which means the controls have a zoom of "1:1" set, which is wrong here. 2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties 2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning 2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed 2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc 2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux 2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux 2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar 2009-06-15 14:11:27 +0200 fs r272983 : added since tag 2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted 2009-06-15 11:08:53 +0200 fs r272969 : #i10000# 2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701# 2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src 2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50) 2009-06-02 09:53:10 +0200 fs r272483 : #i10000# 2009-05-29 15:55:03 +0200 fs r272465 : #i100818# 2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any 2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition 2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex 2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed 2009-05-27 14:53:36 +0200 fs r272347 : #i10000# 2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast 2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly 2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used 2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function 2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well 2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution 2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set 2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition 2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria 2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR 2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein 2009-05-25 15:49:57 +0200 fs r272254 : #i999704# 2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property 2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString 2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein 2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property 2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property) 2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default 2009-05-25 14:39:31 +0200 fs r272243 : removed dead import 2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns 2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent 2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel 2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event 2009-05-22 21:42:47 +0200 fs r272211 : #i102003# 2009-05-22 21:42:20 +0200 fs r272210 : grammar 2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously 2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear 2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG 2009-05-22 12:03:42 +0200 fs r272180 : #i88878# provided by noel.power@novell.com implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs 2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them 2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values 2009-05-15 15:08:31 +0200 fs r271937 : includes 2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint 2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity 2009-05-15 10:15:44 +0200 fs r271928 : #i10000# 2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:23:23 +0200 fs r271919 : #i101622# 2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids 2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b) 2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48 2009-05-07 14:43:19 +0200 fs r271670 : #i101477# 2009-05-07 14:37:30 +0200 fs r271668 : #i101477# 2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch 2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics 2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47) 2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control 2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
bool bSuccess = true;
if ( bRebuild )
{
2001-02-23 14:17:34 +00:00
try
{
2001-01-09 14:52:33 +00:00
WaitObject aWaitCursor(getBrowserView());
// tell the old entry it has been deselected
selectPath(m_pCurrentlyDisplayed, sal_False);
m_pCurrentlyDisplayed = NULL;
// not really loaded
2001-01-09 14:52:33 +00:00
m_pCurrentlyDisplayed = _pEntry;
// tell the new entry it has been selected
selectPath(m_pCurrentlyDisplayed, sal_True);
// get the name of the data source currently selected
ensureConnection( m_pCurrentlyDisplayed, pConData->xConnection );
if ( !pConData->xConnection.is() )
2001-02-06 08:43:00 +00:00
{
unloadAndCleanup( sal_False );
CWS-TOOLING: integrate CWS dba32c 2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion 2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time 2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths 2009-06-29 10:08:54 +0200 fs r273455 : #i103138# refactored the code for positioning/zooming the control Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to take an additional ViewTransformation parameter, describing the transformation to obtain the actual control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter. This has become necessary since during painting, the device which we created our control for might not necessarily have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size, this would lead to wrong results. Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken. Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ... I consider it broken, since: - we need the map mode to obtain the proper zoom level, which is to be forwarded to the control - there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears). It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand one has no possibility to obtain the current zoom by other means. Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used, which means the controls have a zoom of "1:1" set, which is wrong here. 2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties 2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning 2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed 2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc 2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux 2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux 2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar 2009-06-15 14:11:27 +0200 fs r272983 : added since tag 2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted 2009-06-15 11:08:53 +0200 fs r272969 : #i10000# 2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701# 2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src 2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50) 2009-06-02 09:53:10 +0200 fs r272483 : #i10000# 2009-05-29 15:55:03 +0200 fs r272465 : #i100818# 2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any 2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition 2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex 2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed 2009-05-27 14:53:36 +0200 fs r272347 : #i10000# 2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast 2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly 2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used 2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function 2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well 2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution 2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set 2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition 2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria 2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR 2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein 2009-05-25 15:49:57 +0200 fs r272254 : #i999704# 2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property 2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString 2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein 2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property 2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property) 2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default 2009-05-25 14:39:31 +0200 fs r272243 : removed dead import 2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns 2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent 2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel 2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event 2009-05-22 21:42:47 +0200 fs r272211 : #i102003# 2009-05-22 21:42:20 +0200 fs r272210 : grammar 2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously 2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear 2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG 2009-05-22 12:03:42 +0200 fs r272180 : #i88878# provided by noel.power@novell.com implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs 2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them 2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values 2009-05-15 15:08:31 +0200 fs r271937 : includes 2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint 2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity 2009-05-15 10:15:44 +0200 fs r271928 : #i10000# 2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:23:23 +0200 fs r271919 : #i101622# 2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids 2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b) 2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48 2009-05-07 14:43:19 +0200 fs r271670 : #i101477# 2009-05-07 14:37:30 +0200 fs r271668 : #i101477# 2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch 2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics 2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47) 2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control 2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
return false;
2001-02-06 08:43:00 +00:00
}
2001-01-09 14:52:33 +00:00
Reference<XNameAccess> xNameAccess;
switch(nCommandType)
{
case CommandType::TABLE:
{
// only for tables
if ( !pContainerData->xContainer.is() )
2001-01-09 14:52:33 +00:00
{
Reference<XTablesSupplier> xSup( pConData->xConnection, UNO_QUERY );
2001-01-09 14:52:33 +00:00
if(xSup.is())
xNameAccess = xSup->getTables();
pContainerData->xContainer = xNameAccess;
2001-01-09 14:52:33 +00:00
}
else
xNameAccess.set( pContainerData->xContainer, UNO_QUERY );
2001-01-09 14:52:33 +00:00
}
break;
case CommandType::QUERY:
{
if ( pContainerData->xContainer.is() )
xNameAccess.set( pContainerData->xContainer, UNO_QUERY );
else
{
Reference<XQueriesSupplier> xSup( pConData->xConnection, UNO_QUERY );
if(xSup.is())
xNameAccess = xSup->getQueries();
}
2001-01-09 14:52:33 +00:00
}
break;
}
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
String sStatus(ModuleRes( CommandType::TABLE == nCommandType ? STR_LOADING_TABLE : STR_LOADING_QUERY ));
sStatus.SearchAndReplaceAscii("$name$", aName);
BrowserViewStatusDisplay aShowStatus(static_cast<UnoDataBrowserView*>(getView()), sStatus);
if(xNameAccess.is() && xNameAccess->hasByName(sSimpleName))
2001-01-09 14:52:33 +00:00
{
DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(_pEntry->GetUserData());
if ( !pData->xObjectProperties.is() )
2001-01-09 14:52:33 +00:00
{
Reference<XInterface> xObject;
if(xNameAccess->getByName(sSimpleName) >>= xObject) // remember the table or query object
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
{
pData->xObjectProperties = pData->xObjectProperties.query( xObject );
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
// if the query contains a parameterized statement and preview is enabled we won't get any data.
if ( m_bPreview && nCommandType == CommandType::QUERY && xObject.is() )
{
::rtl::OUString sSql;
Reference<XPropertySet> xObjectProps(xObject,UNO_QUERY);
xObjectProps->getPropertyValue(PROPERTY_COMMAND) >>= sSql;
Reference< XMultiServiceFactory > xFactory( pConData->xConnection, UNO_QUERY );
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
if (xFactory.is())
{
try
{
Reference<XSingleSelectQueryAnalyzer> xAnalyzer(xFactory->createInstance(SERVICE_NAME_SINGLESELECTQUERYCOMPOSER),UNO_QUERY);
if ( xAnalyzer.is() )
{
xAnalyzer->setQuery(sSql);
Reference<XParametersSupplier> xParSup(xAnalyzer,UNO_QUERY);
if ( xParSup->getParameters()->getCount() > 0 )
{
String sFilter = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" WHERE "));
sFilter = sFilter + xAnalyzer->getFilter();
String sReplace(sSql);
sReplace.SearchAndReplace(sFilter,String());
xAnalyzer->setQuery(sReplace);
Reference<XSingleSelectQueryComposer> xComposer(xAnalyzer,UNO_QUERY);
xComposer->setFilter(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("0=1")));
aName = xAnalyzer->getQuery();
nCommandType = CommandType::COMMAND;
}
}
}
catch (Exception&)
{
CWS-TOOLING: integrate CWS dba32c 2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion 2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time 2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths 2009-06-29 10:08:54 +0200 fs r273455 : #i103138# refactored the code for positioning/zooming the control Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to take an additional ViewTransformation parameter, describing the transformation to obtain the actual control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter. This has become necessary since during painting, the device which we created our control for might not necessarily have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size, this would lead to wrong results. Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken. Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ... I consider it broken, since: - we need the map mode to obtain the proper zoom level, which is to be forwarded to the control - there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears). It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand one has no possibility to obtain the current zoom by other means. Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used, which means the controls have a zoom of "1:1" set, which is wrong here. 2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties 2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning 2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed 2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc 2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux 2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux 2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar 2009-06-15 14:11:27 +0200 fs r272983 : added since tag 2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted 2009-06-15 11:08:53 +0200 fs r272969 : #i10000# 2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701# 2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src 2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50) 2009-06-02 09:53:10 +0200 fs r272483 : #i10000# 2009-05-29 15:55:03 +0200 fs r272465 : #i100818# 2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any 2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition 2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex 2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed 2009-05-27 14:53:36 +0200 fs r272347 : #i10000# 2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast 2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly 2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used 2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function 2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well 2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution 2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set 2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition 2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria 2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR 2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein 2009-05-25 15:49:57 +0200 fs r272254 : #i999704# 2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property 2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString 2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein 2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property 2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property) 2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default 2009-05-25 14:39:31 +0200 fs r272243 : removed dead import 2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns 2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent 2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel 2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event 2009-05-22 21:42:47 +0200 fs r272211 : #i102003# 2009-05-22 21:42:20 +0200 fs r272210 : grammar 2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously 2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear 2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG 2009-05-22 12:03:42 +0200 fs r272180 : #i88878# provided by noel.power@novell.com implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs 2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them 2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values 2009-05-15 15:08:31 +0200 fs r271937 : includes 2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint 2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity 2009-05-15 10:15:44 +0200 fs r271928 : #i10000# 2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:23:23 +0200 fs r271919 : #i101622# 2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids 2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b) 2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48 2009-05-07 14:43:19 +0200 fs r271670 : #i101477# 2009-05-07 14:37:30 +0200 fs r271668 : #i101477# 2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch 2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics 2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47) 2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control 2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
DBG_UNHANDLED_EXCEPTION();
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
}
}
}
}
2001-01-09 14:52:33 +00:00
}
}
String sDataSourceName( getDataSourceAcessor( pConnection ) );
CWS-TOOLING: integrate CWS dba32c 2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion 2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time 2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths 2009-06-29 10:08:54 +0200 fs r273455 : #i103138# refactored the code for positioning/zooming the control Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to take an additional ViewTransformation parameter, describing the transformation to obtain the actual control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter. This has become necessary since during painting, the device which we created our control for might not necessarily have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size, this would lead to wrong results. Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken. Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ... I consider it broken, since: - we need the map mode to obtain the proper zoom level, which is to be forwarded to the control - there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears). It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand one has no possibility to obtain the current zoom by other means. Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used, which means the controls have a zoom of "1:1" set, which is wrong here. 2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties 2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning 2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed 2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc 2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux 2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux 2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar 2009-06-15 14:11:27 +0200 fs r272983 : added since tag 2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted 2009-06-15 11:08:53 +0200 fs r272969 : #i10000# 2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701# 2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src 2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50) 2009-06-02 09:53:10 +0200 fs r272483 : #i10000# 2009-05-29 15:55:03 +0200 fs r272465 : #i100818# 2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any 2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition 2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex 2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed 2009-05-27 14:53:36 +0200 fs r272347 : #i10000# 2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast 2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly 2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used 2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function 2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well 2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution 2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set 2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition 2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria 2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR 2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein 2009-05-25 15:49:57 +0200 fs r272254 : #i999704# 2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property 2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString 2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein 2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property 2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property) 2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default 2009-05-25 14:39:31 +0200 fs r272243 : removed dead import 2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns 2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent 2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel 2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event 2009-05-22 21:42:47 +0200 fs r272211 : #i102003# 2009-05-22 21:42:20 +0200 fs r272210 : grammar 2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously 2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear 2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG 2009-05-22 12:03:42 +0200 fs r272180 : #i88878# provided by noel.power@novell.com implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs 2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them 2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values 2009-05-15 15:08:31 +0200 fs r271937 : includes 2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint 2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity 2009-05-15 10:15:44 +0200 fs r271928 : #i10000# 2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:23:23 +0200 fs r271919 : #i101622# 2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids 2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b) 2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48 2009-05-07 14:43:19 +0200 fs r271670 : #i101477# 2009-05-07 14:37:30 +0200 fs r271668 : #i101477# 2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch 2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics 2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47) 2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control 2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
bSuccess = implLoadAnything( sDataSourceName, aName, nCommandType, sal_True, pConData->xConnection );
if ( !bSuccess )
{ // clean up
criticalFail();
}
2001-01-09 14:52:33 +00:00
}
2001-08-02 06:57:49 +00:00
catch(const SQLException& e)
2001-02-23 14:17:34 +00:00
{
showError(SQLExceptionInfo(e));
// reset the values
xRowSetProps->setPropertyValue(PROPERTY_DATASOURCENAME,Any());
xRowSetProps->setPropertyValue(PROPERTY_ACTIVE_CONNECTION,Any());
2001-02-23 14:17:34 +00:00
}
2001-08-02 06:57:49 +00:00
catch(WrappedTargetException& e)
{
SQLException aSql;
if(e.TargetException >>= aSql)
showError(SQLExceptionInfo(aSql));
else
CWS-TOOLING: integrate CWS dba31e 2008-11-19 12:36:23 +0100 msc r263980 : i96104 2008-11-19 12:31:19 +0100 msc r263979 : i96104 2008-11-19 12:21:55 +0100 msc r263977 : i96104 2008-11-19 12:18:53 +0100 msc r263976 : i96104 2008-11-18 09:09:45 +0100 oj r263746 : disable color entry when area is set 2008-11-18 08:37:52 +0100 oj r263741 : #remove sub report entry 2008-11-17 11:20:25 +0100 fs r263708 : #i10000# 2008-11-17 11:06:52 +0100 fs r263706 : minimal version now is 3.1 2008-11-12 22:25:59 +0100 fs r263621 : #i96150# 2008-11-12 22:20:02 +0100 fs r263620 : rebased to m34 2008-11-12 21:39:41 +0100 fs r263618 : MANUAL REBASE: rebase CWS dba31d to DEV300_m34 2008-11-12 13:54:58 +0100 fs r263597 : #i96134# MediaDescriptor.URL is to be preferred over MediaDescriptor.FileName. Nonetheless, ensure both are handled 2008-11-12 13:53:40 +0100 fs r263596 : #i96134# re-enabled the code for #i41897#, a better fix is to come 2008-11-12 12:48:21 +0100 fs r263585 : #i96134# disable saving URLs of file-base databases relatively 2008-11-11 16:11:11 +0100 msc r263566 : #i96104# 2008-11-05 09:09:47 +0100 oj r263342 : #i88727# color noe added 2008-11-05 08:41:43 +0100 oj r263341 : #i77916# zoom added 2008-11-04 21:24:15 +0100 fs r263339 : disposing: call disposeAndClear without own mutex locked - some of our listeners insist on locking the SolarMutex, which sometimes led to deadlocks on the complex test cases 2008-11-04 21:23:15 +0100 fs r263338 : remove SolarMutex locking - this happned in CWS dba31c (in the CVS version), which this CWS was created from, but seems to got lost during resync 2008-11-04 20:49:50 +0100 fs r263335 : docu formatting 2008-11-04 20:06:39 +0100 fs r263334 : #i95826# use m_aMutex, not a DocumentGuard (wrongly resolved merge conflicts) 2008-11-04 17:36:29 +0100 fs r263332 : #i92688# properly revoke as XEventListener from m_xActiveController when disposing 2008-11-04 14:49:34 +0100 fs r263324 : #i92322# enable Input Required if EmptyIsNULL does not exist at the control 2008-10-31 11:10:04 +0100 oj r262857 : merge from cvs to svn 2008-10-31 09:46:45 +0100 oj r262853 : merge from cvs to svn 2008-10-31 08:46:37 +0100 oj r262849 : merge from cvs to svn 2008-10-31 08:44:24 +0100 oj r262848 : merge from cvs to svn 2008-10-31 08:43:33 +0100 oj r262847 : merge from cvs to svn 2008-10-31 08:42:28 +0100 oj r262846 : merge from cvs to svn 2008-10-31 08:41:58 +0100 oj r262845 : merge from cvs to svn 2008-10-31 08:41:32 +0100 oj r262844 : merge from cvs to svn 2008-10-28 12:19:50 +0100 oj r262733 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:42 +0100 oj r262732 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:36 +0100 oj r262731 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:31 +0100 oj r262730 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:22 +0100 oj r262729 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:18 +0100 oj r262728 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:10 +0100 oj r262727 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:06 +0100 oj r262726 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:05 +0100 oj r262725 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:01 +0100 oj r262724 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:50 +0100 oj r262723 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:41 +0100 oj r262722 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:40 +0100 oj r262721 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:27 +0100 oj r262720 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:10 +0100 oj r262719 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:01 +0100 oj r262718 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:17:39 +0100 oj r262717 : #iXXXXX#: migrate CWS dba31e to SVN
2008-12-01 12:31:27 +00:00
OSL_ENSURE(sal_False, "SbaTableQueryBrowser::implSelect: something strange happended!");
2001-08-02 06:57:49 +00:00
// reset the values
xRowSetProps->setPropertyValue(PROPERTY_DATASOURCENAME,Any());
xRowSetProps->setPropertyValue(PROPERTY_ACTIVE_CONNECTION,Any());
2001-08-02 06:57:49 +00:00
}
2001-01-09 14:52:33 +00:00
catch(Exception&)
{
// reset the values
xRowSetProps->setPropertyValue(PROPERTY_DATASOURCENAME,Any());
xRowSetProps->setPropertyValue(PROPERTY_ACTIVE_CONNECTION,Any());
2001-01-09 14:52:33 +00:00
}
2000-10-26 13:46:14 +00:00
}
CWS-TOOLING: integrate CWS dba32c 2009-06-29 20:53:25 +0200 fs r273484 : #i103138# Rectangle conversion 2009-06-29 20:51:50 +0200 fs r273483 : #i103138# yet more refactoring, now also setting the proper zoom level at the proper point in time 2009-06-29 13:40:26 +0200 fs r273470 : added svn:ignore to ignore output paths 2009-06-29 10:08:54 +0200 fs r273455 : #i103138# refactored the code for positioning/zooming the control Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to take an additional ViewTransformation parameter, describing the transformation to obtain the actual control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter. This has become necessary since during painting, the device which we created our control for might not necessarily have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size, this would lead to wrong results. Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken. Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ... I consider it broken, since: - we need the map mode to obtain the proper zoom level, which is to be forwarded to the control - there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears). It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand one has no possibility to obtain the current zoom by other means. Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used, which means the controls have a zoom of "1:1" set, which is wrong here. 2009-06-25 13:41:35 +0200 msc r273380 : #100000# the tabs changed die to new properties 2009-06-24 12:42:40 +0200 msc r273330 : #102082# remove issue warning 2009-06-22 10:43:14 +0200 fs r273201 : createPrimitive2DSequence: care for being disposed 2009-06-18 12:35:13 +0200 oj r273109 : #i102305# make nooptfiles for gcc 2009-06-17 12:14:37 +0200 oj r273056 : #i102305# fix for linux 2009-06-17 07:20:22 +0200 oj r273046 : #i102305# move ValueTransfer into the for loop to avoid a crash under Linux 2009-06-17 07:17:28 +0200 oj r273045 : #i102305# use varchar 2009-06-15 14:11:27 +0200 fs r272983 : added since tag 2009-06-15 12:11:39 +0200 oj r272973 : #i102305# SAL_DLLPUBLIC_EXPORT inserted 2009-06-15 11:08:53 +0200 fs r272969 : #i10000# 2009-06-15 09:25:13 +0200 fs r272963 : merging fix for P1 issue #i102701# 2009-06-11 11:31:24 +0200 fs r272858 : #i10000# copied the fix which before the rebase was done in ../dialog/macropg.src 2009-06-11 09:38:14 +0200 fs r272846 : CWS-TOOLING: rebase CWS dba32c to trunk@272827 (milestone: DEV300:m50) 2009-06-02 09:53:10 +0200 fs r272483 : #i10000# 2009-05-29 15:55:03 +0200 fs r272465 : #i100818# 2009-05-29 12:58:43 +0200 fs r272452 : don't apply comphelper::getString on possibly VOID any 2009-05-29 10:38:35 +0200 oj r272437 : #i101519# handle where condition 2009-05-29 09:53:39 +0200 fs r272434 : #i100818# call into releaseStubs /without/ locked GlobalMutex 2009-05-28 07:53:44 +0200 oj r272375 : #i101369# parse tree changed 2009-05-27 14:53:36 +0200 fs r272347 : #i10000# 2009-05-27 09:29:15 +0200 oj r272327 : #i101626# check for double before hard cast 2009-05-27 09:13:58 +0200 oj r272326 : #i101626# handle void correctly 2009-05-27 08:04:39 +0200 oj r272321 : #i102256# wrong method signature used 2009-05-27 07:55:52 +0200 oj r272320 : #i101519# look up parameter typ if used in function 2009-05-27 06:49:07 +0200 oj r272319 : #i101519# set parameter from rowset as well 2009-05-26 13:30:56 +0200 oj r272297 : #i101987# impl XBatchExecution 2009-05-26 12:44:34 +0200 oj r272293 : #i101700# check if group is not set 2009-05-26 12:16:53 +0200 oj r272290 : #i101369# resolved some reduce7reduce problems with boolean_term and search_condition 2009-05-26 12:12:42 +0200 oj r272289 : #i101369# fix for or on one line criteria 2009-05-25 16:02:25 +0200 fs r272257 : #i999704# +PROPERTY_MOUSE_WHEEL_BEHAVIOR 2009-05-25 16:01:55 +0200 fs r272256 : merging the changes from CWS dba32b herein 2009-05-25 15:49:57 +0200 fs r272254 : #i999704# 2009-05-25 15:32:57 +0200 fs r272252 : #i99704# grid columns also to respect the MouseWheelBehavior property 2009-05-25 15:23:43 +0200 fs r272251 : don't pass empty Anys to ::comphelper::getString 2009-05-25 14:48:43 +0200 fs r272248 : merged changes from CWS dba32b herein 2009-05-25 14:44:40 +0200 fs r272247 : #i99704# support new MouseWheelBehavior property 2009-05-25 14:43:18 +0200 fs r272246 : #i99704# WheelWithoutFocus (peer property) superseded by MouseWheelBehavior (model property) 2009-05-25 14:41:03 +0200 fs r272245 : #i99704# no need to set the mouse wheel behavior at the peer, this is now a model property, having the right default 2009-05-25 14:39:31 +0200 fs r272243 : removed dead import 2009-05-25 14:35:36 +0200 fs r272242 : the new EnableVisible doesn't make sense for grid columns 2009-05-25 14:34:33 +0200 fs r272241 : #i99704# +MouseWheelBehavior - allow to enable/disable the mouse wheel for the control, or make it focus-dependent 2009-05-25 14:26:11 +0200 fs r272240 : #i99704# change MouseSettings wheel flag (NoWheelActionWithoutFocus) to a three-state option, allowing to completely ignore the mouse wheel 2009-05-23 21:35:59 +0200 fs r272213 : localize 'sub component opened/closed' event 2009-05-22 21:42:47 +0200 fs r272211 : #i102003# 2009-05-22 21:42:20 +0200 fs r272210 : grammar 2009-05-22 21:36:10 +0200 fs r272209 : #i102140# load only once, not twice, and show error messages during loading (and during any form action, that is) asynchronously 2009-05-22 21:35:11 +0200 fs r272208 : #i102140# +clear 2009-05-22 14:50:30 +0200 fs r272194 : #i102139# for newly created DB docs, set the MacroExecutionMode to USE_CONFIG 2009-05-22 12:03:42 +0200 fs r272180 : #i88878# provided by noel.power@novell.com implement a visibility property (EnableVisible) for toolkit controls, and usage in forms and UNO dialogs 2009-05-15 15:37:31 +0200 fs r271942 : #i100671# corrected some @since tags, so autodoc has better chances of correctly reading them 2009-05-15 15:33:11 +0200 fs r271940 : don't call comphelper::getFOO for VOID values 2009-05-15 15:08:31 +0200 fs r271937 : includes 2009-05-15 13:39:22 +0200 fs r271934 : #i101398# createPrimitive2DSequence: when we already have a control, use the old code. In particular, call positionControlForPaint 2009-05-15 12:33:48 +0200 fs r271933 : make the geometry a part of the ControlPrimitive2D's identity 2009-05-15 10:15:44 +0200 fs r271928 : #i10000# 2009-05-14 20:55:38 +0200 fs r271921 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:55:31 +0200 fs r271920 : #i101398# don't reuse the name PRIMITIVE_ID_CONTROLPRIMITIVE2D, make the name of our own ControlPrimitive2D unique 2009-05-14 20:23:23 +0200 fs r271919 : #i101622# 2009-05-14 16:04:38 +0200 fs r271898 : don't use comphelper::getInt32 on voids 2009-05-14 16:04:12 +0200 fs r271897 : merge fix for issue whose number just slipped my memory ... (originally fixed in CWS dba32b) 2009-05-14 15:36:55 +0200 fs r271895 : merging changes from DEV300:m48 2009-05-07 14:43:19 +0200 fs r271670 : #i101477# 2009-05-07 14:37:30 +0200 fs r271668 : #i101477# 2009-05-07 09:27:30 +0200 oj r271628 : #i101343# remove pch 2009-05-06 09:36:02 +0200 fs r271568 : getFoo: diagnostics 2009-05-04 09:23:06 +0200 oj r271438 : CWS-TOOLING: rebase CWS dba32c to trunk@271427 (milestone: DEV300:m47) 2009-04-29 23:18:13 +0200 fs r271394 : #i101398# use a dedicated 2DPrimitive for UNO Controls, which is able to provide the B2DRange *without* actually creating the control 2009-04-29 13:52:25 +0200 fs r271366 : #i101308#
2009-07-03 14:21:50 +00:00
return bSuccess;
2000-10-26 13:46:14 +00:00
}
2001-01-09 14:52:33 +00:00
// -----------------------------------------------------------------------------
SvLBoxEntry* SbaTableQueryBrowser::getEntryFromContainer(const Reference<XNameAccess>& _rxNameAccess)
2001-01-09 14:52:33 +00:00
{
DBTreeListBox& rListBox = m_pTreeView->getListBox();
2001-01-09 14:52:33 +00:00
SvLBoxEntry* pContainer = NULL;
SvLBoxEntry* pDSLoop = rListBox.FirstChild(NULL);
while (pDSLoop)
2001-01-09 14:52:33 +00:00
{
pContainer = rListBox.GetEntry(pDSLoop, CONTAINER_QUERIES);
DBTreeListUserData* pQueriesData = static_cast<DBTreeListUserData*>(pContainer->GetUserData());
if ( pQueriesData && pQueriesData->xContainer == _rxNameAccess )
break;
pContainer = rListBox.GetEntry(pDSLoop, CONTAINER_TABLES);
DBTreeListUserData* pTablesData = static_cast<DBTreeListUserData*>(pContainer->GetUserData());
if ( pTablesData && pTablesData->xContainer == _rxNameAccess )
break;
pDSLoop = rListBox.NextSibling(pDSLoop);
pContainer = NULL;
2001-01-09 14:52:33 +00:00
}
return pContainer;
}
// -------------------------------------------------------------------------
void SAL_CALL SbaTableQueryBrowser::elementInserted( const ContainerEvent& _rEvent ) throw(RuntimeException)
{
SolarMutexGuard aSolarGuard;
2001-01-09 14:52:33 +00:00
Reference< XNameAccess > xNames(_rEvent.Source, UNO_QUERY);
// first search for a definition container where we can insert this element
SvLBoxEntry* pEntry = getEntryFromContainer(xNames);
2001-01-09 14:52:33 +00:00
if(pEntry) // found one
{
// insert the new entry into the tree
DBTreeListUserData* pContainerData = static_cast<DBTreeListUserData*>(pEntry->GetUserData());
OSL_ENSURE(pContainerData, "elementInserted: There must be user data for this type!");
DBTreeListUserData* pNewData = new DBTreeListUserData;
sal_Bool bIsTable = etTableContainer == pContainerData->eType;
if ( bIsTable )
{
_rEvent.Element >>= pNewData->xObjectProperties;// remember the new element
pNewData->eType = etTableOrView;
2001-01-09 14:52:33 +00:00
}
else
{
if ((sal_Int32)m_pTreeView->getListBox().GetChildCount(pEntry) < ( xNames->getElementNames().getLength() - 1 ) )
{
// the item inserts its children on demand, but it has not been expanded yet. So ensure here and
// now that it has all items
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
populateTree(xNames, pEntry, etQuery );
}
pNewData->eType = etQuery;
}
implAppendEntry( pEntry, ::comphelper::getString( _rEvent.Accessor ), pNewData, pNewData->eType );
2001-01-09 14:52:33 +00:00
}
else
SbaXDataBrowserController::elementInserted(_rEvent);
}
// -------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::isCurrentlyDisplayedChanged(const String& _sName,SvLBoxEntry* _pContainer)
{
return m_pCurrentlyDisplayed
&& getEntryType(m_pCurrentlyDisplayed) == getChildType(_pContainer)
&& m_pTreeView->getListBox().GetParent(m_pCurrentlyDisplayed) == _pContainer
&& m_pTreeView->getListBox().GetEntryText(m_pCurrentlyDisplayed) == _sName;
}
// -------------------------------------------------------------------------
void SAL_CALL SbaTableQueryBrowser::elementRemoved( const ContainerEvent& _rEvent ) throw(RuntimeException)
{
SolarMutexGuard aSolarGuard;
2001-01-09 14:52:33 +00:00
Reference< XNameAccess > xNames(_rEvent.Source, UNO_QUERY);
// get the top-level representing the removed data source
// and search for the queries and tables
SvLBoxEntry* pContainer = getEntryFromContainer(xNames);
if ( pContainer )
2001-01-09 14:52:33 +00:00
{ // a query or table has been removed
String aName = ::comphelper::getString(_rEvent.Accessor).getStr();
if ( isCurrentlyDisplayedChanged( aName, pContainer) )
{ // the element displayed currently has been replaced
2001-01-09 14:52:33 +00:00
// we need to remember the old value
SvLBoxEntry* pTemp = m_pCurrentlyDisplayed;
2001-01-09 14:52:33 +00:00
// unload
unloadAndCleanup( sal_False ); // don't dispose the connection
DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(pTemp->GetUserData());
pTemp->SetUserData(NULL);
delete pData;
// the data could be null because we have a table which isn't correct
2001-01-09 14:52:33 +00:00
m_pTreeModel->Remove(pTemp);
}
else
{
// remove the entry from the model
SvLBoxEntry* pChild = m_pTreeModel->FirstChild(pContainer);
2001-01-09 14:52:33 +00:00
while(pChild)
{
if (m_pTreeView->getListBox().GetEntryText(pChild) == aName)
2001-01-09 14:52:33 +00:00
{
DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(pChild->GetUserData());
pChild->SetUserData(NULL);
2001-01-09 14:52:33 +00:00
delete pData;
m_pTreeModel->Remove(pChild);
break;
}
pChild = m_pTreeModel->NextSibling(pChild);
}
}
// maybe the object which is part of the document data source has been removed
checkDocumentDataSource();
2001-01-09 14:52:33 +00:00
}
else
SbaXDataBrowserController::elementRemoved(_rEvent);
}
// -------------------------------------------------------------------------
void SAL_CALL SbaTableQueryBrowser::elementReplaced( const ContainerEvent& _rEvent ) throw(RuntimeException)
{
SolarMutexGuard aSolarGuard;
2001-01-09 14:52:33 +00:00
Reference< XNameAccess > xNames(_rEvent.Source, UNO_QUERY);
SvLBoxEntry* pContainer = getEntryFromContainer(xNames);
if ( pContainer )
2001-01-09 14:52:33 +00:00
{ // a table or query as been replaced
String aName = ::comphelper::getString(_rEvent.Accessor).getStr();
if ( isCurrentlyDisplayedChanged( aName, pContainer) )
{ // the element displayed currently has been replaced
2001-01-09 14:52:33 +00:00
// we need to remember the old value
SvLBoxEntry* pTemp = m_pCurrentlyDisplayed;
unloadAndCleanup( sal_False ); // don't dispose the connection
2001-01-09 14:52:33 +00:00
DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(pTemp->GetUserData());
if (pData)
2001-01-09 14:52:33 +00:00
{
if ( etTableOrView == pData->eType )
{ // only insert userdata when we have a table because the query is only a commanddefinition object and not a query
_rEvent.Element >>= pData->xObjectProperties; // remember the new element
}
else
{
pTemp->SetUserData(NULL);
delete pData;
}
2001-01-09 14:52:33 +00:00
}
}
else
{
// find the entry for this name
SvLBoxEntry* pChild = m_pTreeModel->FirstChild(pContainer);
2001-01-09 14:52:33 +00:00
while(pChild)
{
if (m_pTreeView->getListBox().GetEntryText(pChild) == aName)
2001-01-09 14:52:33 +00:00
{
DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(pChild->GetUserData());
if (pData)
2001-01-09 14:52:33 +00:00
{
if ( etTableOrView == pData->eType )
{ // only insert userdata when we have a table because the query is only a commanddefinition object and not a query
_rEvent.Element >>= pData->xObjectProperties; // remember the new element
}
else
{
pChild->SetUserData(NULL);
delete pData;
}
2001-01-09 14:52:33 +00:00
}
break;
}
pChild = m_pTreeModel->NextSibling(pChild);
}
}
// maybe the object which is part of the document data source has been removed
checkDocumentDataSource();
2001-01-09 14:52:33 +00:00
}
else if (xNames.get() == m_xDatabaseContext.get())
{ // a datasource has been replaced in the context
DBG_ERROR("SbaTableQueryBrowser::elementReplaced: no support for replaced data sources!");
// very suspicious: the database context should not allow to replace data source, only to register
// and revoke them
}
else
SbaXDataBrowserController::elementReplaced(_rEvent);
}
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::impl_releaseConnection( SharedConnection& _rxConnection )
{
// remove as event listener
Reference< XComponent > xComponent( _rxConnection, UNO_QUERY );
if ( xComponent.is() )
{
Reference< XEventListener > xListener( static_cast< ::cppu::OWeakObject* >( this ), UNO_QUERY );
xComponent->removeEventListener( xListener );
}
try
{
// temporary (hopefully!) hack for #i55274#
Reference< XFlushable > xFlush( _rxConnection, UNO_QUERY );
if ( xFlush.is() )
xFlush->flush();
}
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
// clear
_rxConnection.clear();
// will implicitly dispose if we have the ownership, since xConnection is a SharedConnection
}
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::disposeConnection( SvLBoxEntry* _pDSEntry )
{
2011-02-03 00:33:36 +01:00
OSL_ENSURE( _pDSEntry, "SbaTableQueryBrowser::disposeConnection: invalid entry (NULL)!" );
OSL_ENSURE( impl_isDataSourceEntry( _pDSEntry ), "SbaTableQueryBrowser::disposeConnection: invalid entry (not top-level)!" );
if ( _pDSEntry )
{
DBTreeListUserData* pTreeListData = static_cast< DBTreeListUserData* >( _pDSEntry->GetUserData() );
if ( pTreeListData )
impl_releaseConnection( pTreeListData->xConnection );
}
}
// -------------------------------------------------------------------------
2001-01-09 14:52:33 +00:00
void SbaTableQueryBrowser::closeConnection(SvLBoxEntry* _pDSEntry,sal_Bool _bDisposeConnection)
{
2011-02-03 00:33:36 +01:00
OSL_ENSURE(_pDSEntry, "SbaTableQueryBrowser::closeConnection: invalid entry (NULL)!");
OSL_ENSURE( impl_isDataSourceEntry( _pDSEntry ), "SbaTableQueryBrowser::closeConnection: invalid entry (not top-level)!");
// if one of the entries of the given DS is displayed currently, unload the form
if (m_pCurrentlyDisplayed && (m_pTreeView->getListBox().GetRootLevelParent(m_pCurrentlyDisplayed) == _pDSEntry))
unloadAndCleanup(_bDisposeConnection);
// collapse the query/table container
for (SvLBoxEntry* pContainers = m_pTreeModel->FirstChild(_pDSEntry); pContainers; pContainers= m_pTreeModel->NextSibling(pContainers))
{
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
SvLBoxEntry* pElements = m_pTreeModel->FirstChild(pContainers);
if ( pElements )
m_pTreeView->getListBox().Collapse(pContainers);
m_pTreeView->getListBox().EnableExpandHandler(pContainers);
// and delete their children (they are connection-relative)
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
for (; pElements; )
{
SvLBoxEntry* pRemove = pElements;
pElements= m_pTreeModel->NextSibling(pElements);
DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(pRemove->GetUserData());
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
pRemove->SetUserData(NULL);
2001-01-09 14:52:33 +00:00
delete pData;
m_pTreeModel->Remove(pRemove);
}
}
// collapse the entry itself
m_pTreeView->getListBox().Collapse(_pDSEntry);
// dispose/reset the connection
if ( _bDisposeConnection )
disposeConnection( _pDSEntry );
}
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::unloadAndCleanup( sal_Bool _bDisposeConnection )
{
2001-01-09 14:52:33 +00:00
if (!m_pCurrentlyDisplayed)
// nothing to do
return;
SvLBoxEntry* pDSEntry = m_pTreeView->getListBox().GetRootLevelParent(m_pCurrentlyDisplayed);
// de-select the path for the currently displayed table/query
2001-01-09 14:52:33 +00:00
if (m_pCurrentlyDisplayed)
{
selectPath(m_pCurrentlyDisplayed, sal_False);
}
m_pCurrentlyDisplayed = NULL;
try
{
// get the active connection. We need to dispose it.
Reference< XPropertySet > xRowSetProps(getRowSet(),UNO_QUERY);
Reference< XConnection > xConn;
xRowSetProps->getPropertyValue(PROPERTY_ACTIVE_CONNECTION) >>= xConn;
#if OSL_DEBUG_LEVEL > 1
{
Reference< XComponent > xComp;
::cppu::extractInterface(xComp, xRowSetProps->getPropertyValue(PROPERTY_ACTIVE_CONNECTION));
}
#endif
// unload the form
2001-08-27 05:57:24 +00:00
Reference< XLoadable > xLoadable = getLoadable();
if (xLoadable->isLoaded())
xLoadable->unload();
// clear the grid control
Reference< XNameContainer > xConta(getControlModel(),UNO_QUERY);
clearGridColumns(xConta);
// dispose the connection
2001-01-09 14:52:33 +00:00
if(_bDisposeConnection)
disposeConnection( pDSEntry );
}
2001-02-23 14:17:34 +00:00
catch(SQLException& e)
{
showError(SQLExceptionInfo(e));
}
2001-08-02 06:57:49 +00:00
catch(WrappedTargetException& e)
{
SQLException aSql;
if(e.TargetException >>= aSql)
showError(SQLExceptionInfo(aSql));
else
OSL_ENSURE(sal_False, "SbaTableQueryBrowser::unloadAndCleanup: something strange happended!");
2001-08-02 06:57:49 +00:00
}
catch(Exception&)
{
OSL_ENSURE(sal_False, "SbaTableQueryBrowser::unloadAndCleanup: could not reset the form");
}
}
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
// -------------------------------------------------------------------------
namespace
{
Reference< XInterface > lcl_getDataSource( const Reference< XNameAccess >& _rxDatabaseContext,
const ::rtl::OUString& _rDataSourceName, const Reference< XConnection >& _rxConnection )
{
Reference< XDataSource > xDataSource;
try
{
if ( _rDataSourceName.getLength() && _rxDatabaseContext->hasByName( _rDataSourceName ) )
xDataSource.set( _rxDatabaseContext->getByName( _rDataSourceName ), UNO_QUERY_THROW );
if ( !xDataSource.is() )
{
Reference< XChild > xConnAsChild( _rxConnection, UNO_QUERY );
if ( xConnAsChild.is() )
xDataSource.set( xConnAsChild->getParent(), UNO_QUERY_THROW );
}
}
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
return xDataSource.get();
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
}
}
2000-10-26 13:46:14 +00:00
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::impl_initialize()
{
SolarMutexGuard aGuard;
// doin' a lot of VCL stuff here -> lock the SolarMutex
// first initialize the parent
SbaXDataBrowserController::impl_initialize();
Reference<XConnection> xForeignConnection;
Reference< XFrame > xFrame;
::rtl::OUString aTableName, aCatalogName, aSchemaName;
2001-01-09 14:52:33 +00:00
sal_Bool bEsacpeProcessing = sal_True;
sal_Int32 nInitialDisplayCommandType = CommandType::COMMAND;
::rtl::OUString sInitialDataSourceName;
::rtl::OUString sInitialCommand;
const NamedValueCollection& rArguments( getInitParams() );
rArguments.get_ensureType( (::rtl::OUString)PROPERTY_DATASOURCENAME, sInitialDataSourceName );
rArguments.get_ensureType( (::rtl::OUString)PROPERTY_COMMAND_TYPE, nInitialDisplayCommandType );
rArguments.get_ensureType( (::rtl::OUString)PROPERTY_COMMAND, sInitialCommand );
rArguments.get_ensureType( (::rtl::OUString)PROPERTY_ACTIVE_CONNECTION, xForeignConnection );
rArguments.get_ensureType( (::rtl::OUString)PROPERTY_UPDATE_CATALOGNAME, aCatalogName );
rArguments.get_ensureType( (::rtl::OUString)PROPERTY_UPDATE_SCHEMANAME, aSchemaName );
rArguments.get_ensureType( (::rtl::OUString)PROPERTY_UPDATE_TABLENAME, aTableName );
rArguments.get_ensureType( (::rtl::OUString)PROPERTY_ESCAPE_PROCESSING, bEsacpeProcessing );
rArguments.get_ensureType( "Frame", xFrame );
rArguments.get_ensureType( (::rtl::OUString)PROPERTY_SHOWMENU, m_bShowMenu );
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
// disable the browser if either of ShowTreeViewButton (compatibility name) or EnableBrowser
// is present and set to FALSE
sal_Bool bDisableBrowser = ( sal_False == rArguments.getOrDefault( "ShowTreeViewButton", sal_True ) ) // compatibility name
|| ( sal_False == rArguments.getOrDefault( (::rtl::OUString)PROPERTY_ENABLE_BROWSER, sal_True ) );
OSL_ENSURE( !rArguments.has( "ShowTreeViewButton" ),
"SbaTableQueryBrowser::impl_initialize: ShowTreeViewButton is superseded by EnableBrowser!" );
m_bEnableBrowser = !bDisableBrowser;
// hide the tree view it is disabled in general, or if the settings tell to hide it initially
sal_Bool bHideTreeView = ( !m_bEnableBrowser )
|| ( sal_False == rArguments.getOrDefault( "ShowTreeView", sal_True ) ) // compatibility name
|| ( sal_False == rArguments.getOrDefault( (::rtl::OUString)PROPERTY_SHOW_BROWSER, sal_True ) );
OSL_ENSURE( !rArguments.has( "ShowTreeView" ),
"SbaTableQueryBrowser::impl_initialize: ShowTreeView is superseded by ShowBrowser!" );
if ( bHideTreeView )
hideExplorer();
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
else
showExplorer();
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
if ( m_bPreview )
{
try
{
Sequence< ::rtl::OUString> aProperties(5);
Sequence< Any> aValues(5);
::rtl::OUString* pStringIter = aProperties.getArray();
Any* pValueIter = aValues.getArray();
*pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AlwaysShowCursor"));
*pValueIter++ <<= sal_False;
*pStringIter++ = PROPERTY_BORDER;
*pValueIter++ <<= sal_Int16(0);
*pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasNavigationBar"));
*pValueIter++ <<= sal_False;
*pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HasRecordMarker"));
*pValueIter++ <<= sal_False;
*pStringIter++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Tabstop"));
*pValueIter++ <<= sal_False;
Reference< XMultiPropertySet > xFormMultiSet(getFormComponent(), UNO_QUERY);
if ( xFormMultiSet.is() )
xFormMultiSet->setPropertyValues(aProperties, aValues);
}
catch(Exception)
{
DBG_UNHANDLED_EXCEPTION();
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
}
}
// are we loaded into a (sub)frame of an embedded document (i.e. a form belonging to a database
// document)?
sal_Bool bSubFrameOfEmbeddedDocument = sal_False;
if ( xFrame.is() )
{
Reference<XFramesSupplier> xSup = xFrame->getCreator();
Reference<XController> xCont = xSup.is() ? xSup->getController() : Reference<XController>();
bSubFrameOfEmbeddedDocument = xCont.is() && ::dbtools::isEmbeddedInDatabase( xCont->getModel(), xForeignConnection );
}
// if we have a connection at this point, it was either passed from outside, our
// determined from a outer DB document. In both cases, do not dispose it later on.
SharedConnection xConnection( xForeignConnection, SharedConnection::NoTakeOwnership );
// should we display all registered databases in the left hand side tree?
// or only *one* special?
sal_Bool bLimitedTreeEntries = sal_False;
// if we're part of a frame which is a secondary frame of a database document, then only
// display the database for this document, not all registered ones
bLimitedTreeEntries |= bSubFrameOfEmbeddedDocument;
// if the tree view is not to be displayed at all, then only display the data source
// which was given as initial selection
bLimitedTreeEntries |= ( m_bEnableBrowser != sal_True );
if ( bLimitedTreeEntries )
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
{
if ( xConnection.is() )
{
startConnectionListening( xConnection );
// if no initial name was given, try to obtain one from the data source
if ( !sInitialDataSourceName.getLength() )
{
Reference< XChild > xChild( xConnection, UNO_QUERY );
Reference< XPropertySet > xDataSourceProperties;
if ( xChild.is() )
xDataSourceProperties = xDataSourceProperties.query( xChild->getParent() );
if ( xDataSourceProperties.is() )
{
try
{
OSL_VERIFY( xDataSourceProperties->getPropertyValue( PROPERTY_NAME ) >>= sInitialDataSourceName );
}
catch( const Exception& )
{
OSL_ENSURE( sal_False, "SbaTableQueryBrowser::impl_initialize: a connection parent which does not have a 'Name'!??" );
}
}
}
}
implAddDatasource( sInitialDataSourceName, xConnection );
m_pTreeView->getListBox().Expand( m_pTreeView->getListBox().First() );
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
}
else
initializeTreeModel();
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
if ( m_bEnableBrowser )
{
m_aDocScriptSupport = ::boost::optional< bool >( false );
}
else
{
// we are not used as "browser", but as mere view for a single table/query/command. In particular,
// there is a specific database document which we belong to.
Reference< XOfficeDatabaseDocument > xDocument( getDataSourceOrModel(
lcl_getDataSource( m_xDatabaseContext, sInitialDataSourceName, xConnection ) ), UNO_QUERY );
m_aDocScriptSupport = ::boost::optional< bool >( Reference< XEmbeddedScripts >( xDocument, UNO_QUERY ).is() );
}
if ( implSelect( sInitialDataSourceName, sInitialCommand, nInitialDisplayCommandType, bEsacpeProcessing, xConnection, sal_True ) )
{
try
{
Reference< XPropertySet > xRowSetProps(getRowSet(), UNO_QUERY);
xRowSetProps->setPropertyValue(PROPERTY_UPDATE_CATALOGNAME,makeAny(aCatalogName));
xRowSetProps->setPropertyValue(PROPERTY_UPDATE_SCHEMANAME,makeAny(aSchemaName));
xRowSetProps->setPropertyValue(PROPERTY_UPDATE_TABLENAME,makeAny(aTableName));
}
catch(const Exception&)
{
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
OSL_ENSURE(sal_False, "SbaTableQueryBrowser::impl_initialize: could not set the update related names!");
}
}
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
InvalidateAll();
}
// -------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::haveExplorer() const
{
return m_pTreeView && m_pTreeView->IsVisible();
}
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::hideExplorer()
{
if (!haveExplorer())
return;
if (!getBrowserView())
return;
m_pTreeView->Hide();
m_pSplitter->Hide();
getBrowserView()->Resize();
InvalidateFeature(ID_BROWSER_EXPLORER);
}
// -------------------------------------------------------------------------
void SbaTableQueryBrowser::showExplorer()
{
if (haveExplorer())
return;
if (!getBrowserView())
return;
m_pTreeView->Show();
m_pSplitter->Show();
getBrowserView()->Resize();
InvalidateFeature(ID_BROWSER_EXPLORER);
}
// -----------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::ensureConnection(SvLBoxEntry* _pAnyEntry, SharedConnection& _rConnection)
{
SvLBoxEntry* pDSEntry = m_pTreeView->getListBox().GetRootLevelParent(_pAnyEntry);
DBTreeListUserData* pDSData =
pDSEntry
? static_cast<DBTreeListUserData*>(pDSEntry->GetUserData())
: NULL;
return ensureConnection( pDSEntry, pDSData, _rConnection );
}
// -----------------------------------------------------------------------------
::std::auto_ptr< ImageProvider > SbaTableQueryBrowser::getImageProviderFor( SvLBoxEntry* _pAnyEntry )
{
::std::auto_ptr< ImageProvider > pImageProvider( new ImageProvider );
SharedConnection xConnection;
if ( getExistentConnectionFor( _pAnyEntry, xConnection ) )
pImageProvider.reset( new ImageProvider( xConnection ) );
return pImageProvider;
}
// -----------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::getExistentConnectionFor( SvLBoxEntry* _pAnyEntry, SharedConnection& _rConnection )
{
SvLBoxEntry* pDSEntry = m_pTreeView->getListBox().GetRootLevelParent( _pAnyEntry );
DBTreeListUserData* pDSData =
pDSEntry
? static_cast< DBTreeListUserData* >( pDSEntry->GetUserData() )
: NULL;
if ( pDSData )
_rConnection = pDSData->xConnection;
return _rConnection.is();
}
2011-02-03 09:07:57 +01:00
#if OSL_DEBUG_LEVEL > 0
// -----------------------------------------------------------------------------
bool SbaTableQueryBrowser::impl_isDataSourceEntry( SvLBoxEntry* _pEntry ) const
{
return m_pTreeModel->GetRootLevelParent( _pEntry ) == _pEntry;
}
#endif
// -----------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::ensureConnection( SvLBoxEntry* _pDSEntry, void* pDSData, SharedConnection& _rConnection )
{
2011-02-03 00:33:36 +01:00
OSL_ENSURE( impl_isDataSourceEntry( _pDSEntry ), "SbaTableQueryBrowser::ensureConnection: this entry does not denote a data source!" );
if(_pDSEntry)
{
DBTreeListUserData* pTreeListData = static_cast<DBTreeListUserData*>(pDSData);
::rtl::OUString aDSName = GetEntryText(_pDSEntry);
if ( pTreeListData )
_rConnection = pTreeListData->xConnection;
2001-06-19 10:00:23 +00:00
if ( !_rConnection.is() && pTreeListData )
{
// show the "connecting to ..." status
String sConnecting(ModuleRes(STR_CONNECTING_DATASOURCE));
sConnecting.SearchAndReplaceAscii("$name$", aDSName);
BrowserViewStatusDisplay aShowStatus(static_cast<UnoDataBrowserView*>(getView()), sConnecting);
// build a string showing context information in case of error
String sConnectingContext( ModuleRes( STR_COULDNOTCONNECT_DATASOURCE ) );
sConnectingContext.SearchAndReplaceAscii("$name$", aDSName);
// connect
_rConnection.reset(
CWS-TOOLING: integrate CWS dba31e 2008-11-19 12:36:23 +0100 msc r263980 : i96104 2008-11-19 12:31:19 +0100 msc r263979 : i96104 2008-11-19 12:21:55 +0100 msc r263977 : i96104 2008-11-19 12:18:53 +0100 msc r263976 : i96104 2008-11-18 09:09:45 +0100 oj r263746 : disable color entry when area is set 2008-11-18 08:37:52 +0100 oj r263741 : #remove sub report entry 2008-11-17 11:20:25 +0100 fs r263708 : #i10000# 2008-11-17 11:06:52 +0100 fs r263706 : minimal version now is 3.1 2008-11-12 22:25:59 +0100 fs r263621 : #i96150# 2008-11-12 22:20:02 +0100 fs r263620 : rebased to m34 2008-11-12 21:39:41 +0100 fs r263618 : MANUAL REBASE: rebase CWS dba31d to DEV300_m34 2008-11-12 13:54:58 +0100 fs r263597 : #i96134# MediaDescriptor.URL is to be preferred over MediaDescriptor.FileName. Nonetheless, ensure both are handled 2008-11-12 13:53:40 +0100 fs r263596 : #i96134# re-enabled the code for #i41897#, a better fix is to come 2008-11-12 12:48:21 +0100 fs r263585 : #i96134# disable saving URLs of file-base databases relatively 2008-11-11 16:11:11 +0100 msc r263566 : #i96104# 2008-11-05 09:09:47 +0100 oj r263342 : #i88727# color noe added 2008-11-05 08:41:43 +0100 oj r263341 : #i77916# zoom added 2008-11-04 21:24:15 +0100 fs r263339 : disposing: call disposeAndClear without own mutex locked - some of our listeners insist on locking the SolarMutex, which sometimes led to deadlocks on the complex test cases 2008-11-04 21:23:15 +0100 fs r263338 : remove SolarMutex locking - this happned in CWS dba31c (in the CVS version), which this CWS was created from, but seems to got lost during resync 2008-11-04 20:49:50 +0100 fs r263335 : docu formatting 2008-11-04 20:06:39 +0100 fs r263334 : #i95826# use m_aMutex, not a DocumentGuard (wrongly resolved merge conflicts) 2008-11-04 17:36:29 +0100 fs r263332 : #i92688# properly revoke as XEventListener from m_xActiveController when disposing 2008-11-04 14:49:34 +0100 fs r263324 : #i92322# enable Input Required if EmptyIsNULL does not exist at the control 2008-10-31 11:10:04 +0100 oj r262857 : merge from cvs to svn 2008-10-31 09:46:45 +0100 oj r262853 : merge from cvs to svn 2008-10-31 08:46:37 +0100 oj r262849 : merge from cvs to svn 2008-10-31 08:44:24 +0100 oj r262848 : merge from cvs to svn 2008-10-31 08:43:33 +0100 oj r262847 : merge from cvs to svn 2008-10-31 08:42:28 +0100 oj r262846 : merge from cvs to svn 2008-10-31 08:41:58 +0100 oj r262845 : merge from cvs to svn 2008-10-31 08:41:32 +0100 oj r262844 : merge from cvs to svn 2008-10-28 12:19:50 +0100 oj r262733 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:42 +0100 oj r262732 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:36 +0100 oj r262731 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:31 +0100 oj r262730 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:22 +0100 oj r262729 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:18 +0100 oj r262728 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:10 +0100 oj r262727 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:06 +0100 oj r262726 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:05 +0100 oj r262725 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:01 +0100 oj r262724 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:50 +0100 oj r262723 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:41 +0100 oj r262722 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:40 +0100 oj r262721 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:27 +0100 oj r262720 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:10 +0100 oj r262719 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:01 +0100 oj r262718 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:17:39 +0100 oj r262717 : #iXXXXX#: migrate CWS dba31e to SVN
2008-12-01 12:31:27 +00:00
connect( getDataSourceAcessor( _pDSEntry ), sConnectingContext, NULL ),
SharedConnection::TakeOwnership
);
// remember the connection
pTreeListData->xConnection = _rConnection;
}
}
return _rConnection.is();
}
// -----------------------------------------------------------------------------
IMPL_LINK( SbaTableQueryBrowser, OnTreeEntryCompare, const SvSortData*, _pSortData )
{
SvLBoxEntry* pLHS = static_cast<SvLBoxEntry*>(_pSortData->pLeft);
SvLBoxEntry* pRHS = static_cast<SvLBoxEntry*>(_pSortData->pRight);
2011-02-03 00:33:36 +01:00
OSL_ENSURE(pLHS && pRHS, "SbaTableQueryBrowser::OnTreeEntryCompare: invalid tree entries!");
// we want the table entry and the end so we have to do a check
if (isContainer(pRHS))
{
// don't use getEntryType (directly or indirecly) for the LHS:
// LHS is currently beeing inserted, so it is not "completely valid" at the moment
const EntryType eRight = getEntryType(pRHS);
if (etTableContainer == eRight)
// every other container should be placed _before_ the bookmark container
return -1;
const String sLeft = m_pTreeView->getListBox().GetEntryText(pLHS);
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
EntryType eLeft = etTableContainer;
if (String(ModuleRes(RID_STR_TABLES_CONTAINER)) == sLeft)
eLeft = etTableContainer;
else if (String(ModuleRes(RID_STR_QUERIES_CONTAINER)) == sLeft)
eLeft = etQueryContainer;
if ( eLeft == eRight )
return COMPARE_EQUAL;
if ( ( eLeft == etTableContainer ) && ( eRight == etQueryContainer ) )
return COMPARE_GREATER;
if ( ( eLeft == etQueryContainer ) && ( eRight == etTableContainer ) )
return COMPARE_LESS;
OSL_ENSURE( false, "SbaTableQueryBrowser::OnTreeEntryCompare: unexpected case!" );
return COMPARE_EQUAL;
}
SvLBoxString* pLeftTextItem = static_cast<SvLBoxString*>(pLHS->GetFirstItem(SV_ITEM_ID_LBOXSTRING));
SvLBoxString* pRightTextItem = static_cast<SvLBoxString*>(pRHS->GetFirstItem(SV_ITEM_ID_LBOXSTRING));
2011-02-03 00:33:36 +01:00
OSL_ENSURE(pLeftTextItem && pRightTextItem, "SbaTableQueryBrowser::OnTreeEntryCompare: invalid text items!");
String sLeftText = pLeftTextItem->GetText();
String sRightText = pRightTextItem->GetText();
sal_Int32 nCompareResult = 0; // equal by default
if (m_xCollator.is())
{
try
{
nCompareResult = m_xCollator->compareString(sLeftText, sRightText);
}
catch(Exception&)
{
}
}
else
// default behaviour if we do not have a collator -> do the simple string compare
nCompareResult = sLeftText.CompareTo(sRightText);
return nCompareResult;
}
// -----------------------------------------------------------------------------
void SbaTableQueryBrowser::implAdministrate( SvLBoxEntry* _pApplyTo )
{
OSL_PRECOND( _pApplyTo, "SbaTableQueryBrowser::implAdministrate: illegal entry!" );
if ( !_pApplyTo )
return;
try
{
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
// get the desktop object
sal_Int32 nFrameSearchFlag = FrameSearchFlag::ALL | FrameSearchFlag::GLOBAL ;
Reference< XComponentLoader > xFrameLoader(getORB()->createInstance(SERVICE_FRAME_DESKTOP),UNO_QUERY);
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
if ( xFrameLoader.is() )
{
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
// the initial selection
SvLBoxEntry* pTopLevelSelected = _pApplyTo;
while (pTopLevelSelected && m_pTreeView->getListBox().GetParent(pTopLevelSelected))
pTopLevelSelected = m_pTreeView->getListBox().GetParent(pTopLevelSelected);
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
::rtl::OUString sInitialSelection;
if (pTopLevelSelected)
sInitialSelection = getDataSourceAcessor( pTopLevelSelected );
CWS-TOOLING: integrate CWS dba31e 2008-11-19 12:36:23 +0100 msc r263980 : i96104 2008-11-19 12:31:19 +0100 msc r263979 : i96104 2008-11-19 12:21:55 +0100 msc r263977 : i96104 2008-11-19 12:18:53 +0100 msc r263976 : i96104 2008-11-18 09:09:45 +0100 oj r263746 : disable color entry when area is set 2008-11-18 08:37:52 +0100 oj r263741 : #remove sub report entry 2008-11-17 11:20:25 +0100 fs r263708 : #i10000# 2008-11-17 11:06:52 +0100 fs r263706 : minimal version now is 3.1 2008-11-12 22:25:59 +0100 fs r263621 : #i96150# 2008-11-12 22:20:02 +0100 fs r263620 : rebased to m34 2008-11-12 21:39:41 +0100 fs r263618 : MANUAL REBASE: rebase CWS dba31d to DEV300_m34 2008-11-12 13:54:58 +0100 fs r263597 : #i96134# MediaDescriptor.URL is to be preferred over MediaDescriptor.FileName. Nonetheless, ensure both are handled 2008-11-12 13:53:40 +0100 fs r263596 : #i96134# re-enabled the code for #i41897#, a better fix is to come 2008-11-12 12:48:21 +0100 fs r263585 : #i96134# disable saving URLs of file-base databases relatively 2008-11-11 16:11:11 +0100 msc r263566 : #i96104# 2008-11-05 09:09:47 +0100 oj r263342 : #i88727# color noe added 2008-11-05 08:41:43 +0100 oj r263341 : #i77916# zoom added 2008-11-04 21:24:15 +0100 fs r263339 : disposing: call disposeAndClear without own mutex locked - some of our listeners insist on locking the SolarMutex, which sometimes led to deadlocks on the complex test cases 2008-11-04 21:23:15 +0100 fs r263338 : remove SolarMutex locking - this happned in CWS dba31c (in the CVS version), which this CWS was created from, but seems to got lost during resync 2008-11-04 20:49:50 +0100 fs r263335 : docu formatting 2008-11-04 20:06:39 +0100 fs r263334 : #i95826# use m_aMutex, not a DocumentGuard (wrongly resolved merge conflicts) 2008-11-04 17:36:29 +0100 fs r263332 : #i92688# properly revoke as XEventListener from m_xActiveController when disposing 2008-11-04 14:49:34 +0100 fs r263324 : #i92322# enable Input Required if EmptyIsNULL does not exist at the control 2008-10-31 11:10:04 +0100 oj r262857 : merge from cvs to svn 2008-10-31 09:46:45 +0100 oj r262853 : merge from cvs to svn 2008-10-31 08:46:37 +0100 oj r262849 : merge from cvs to svn 2008-10-31 08:44:24 +0100 oj r262848 : merge from cvs to svn 2008-10-31 08:43:33 +0100 oj r262847 : merge from cvs to svn 2008-10-31 08:42:28 +0100 oj r262846 : merge from cvs to svn 2008-10-31 08:41:58 +0100 oj r262845 : merge from cvs to svn 2008-10-31 08:41:32 +0100 oj r262844 : merge from cvs to svn 2008-10-28 12:19:50 +0100 oj r262733 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:42 +0100 oj r262732 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:36 +0100 oj r262731 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:31 +0100 oj r262730 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:22 +0100 oj r262729 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:18 +0100 oj r262728 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:10 +0100 oj r262727 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:06 +0100 oj r262726 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:05 +0100 oj r262725 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:01 +0100 oj r262724 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:50 +0100 oj r262723 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:41 +0100 oj r262722 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:40 +0100 oj r262721 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:27 +0100 oj r262720 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:10 +0100 oj r262719 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:01 +0100 oj r262718 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:17:39 +0100 oj r262717 : #iXXXXX#: migrate CWS dba31e to SVN
2008-12-01 12:31:27 +00:00
Reference< XDataSource > xDataSource( getDataSourceByName( sInitialSelection, getView(), getORB(), NULL ) );
Reference< XModel > xDocumentModel( getDataSourceOrModel( xDataSource ), UNO_QUERY );
if ( xDocumentModel.is() )
{
Reference< XInteractionHandler > xInteractionHandler(
getORB()->createInstance(
autorecovery: more sophisticated configuration data for interaction handlers The generic css.task.InteractionHandler implementation in module uui is now able to instantiate "sub handlers", i.e. components to delegate a request to, based on the type of the request, and some configuration data. The "old" (and now deprecated) configuration scheme at org.openoffice.ucb.InteractionHandler did not contain type information, so any handlers registered there were always called when no default implementation for a given request was available. The "new" configuration scheme at org.openoffice.Interaction contains UNO type information. That is, a given handler implementation can declare itself responsible for an arbitrary set of UNO types, and for each of those types, whether it is also responsible for sub types. The generic interaction handler implementation uses this configuration data, when it encounteres an interaction request it cannot fullfill itself, to instantiate a component to delegate the request to. As with the "old" data, such a component is required to support the css.task.XInteractionHandler2 interface. Also, if it supports css.lang.XInitialization, then it will be initialized with a name-value pair, the name being "Parent", the value being the XWindow interface of the parent window for any message boxes. As an examplary implementation for this feature, the css.sdb.InteractionHandler has been deprecated. Now the css.sdb.DatabaseInteractionHandler is reponsible for database-related interactions, and the new configuration scheme is pre-filled with data assigning this responsibility. Consequently, a lot of places previously creating an css.sdb.InteractionHandler have been modified to create the default css.task.InteractionHandler.
2010-02-01 21:32:33 +01:00
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.InteractionHandler" ) ) ),
UNO_QUERY );
OSL_ENSURE( xInteractionHandler.is(), "SbaTableQueryBrowser::implAdministrate: no interaction handler available!" );
::comphelper::NamedValueCollection aLoadArgs;
aLoadArgs.put( "Model", xDocumentModel );
aLoadArgs.put( "InteractionHandler", xInteractionHandler );
aLoadArgs.put( "MacroExecutionMode", MacroExecMode::USE_CONFIG );
Sequence< PropertyValue > aLoadArgPV;
aLoadArgs >>= aLoadArgPV;
xFrameLoader->loadComponentFromURL(
xDocumentModel->getURL(),
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_default")),
nFrameSearchFlag,
aLoadArgPV
);
}
}
}
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
}
// -----------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::requestQuickHelp( const SvLBoxEntry* _pEntry, String& _rText ) const
{
const DBTreeListUserData* pData = static_cast< const DBTreeListUserData* >( _pEntry->GetUserData() );
if ( ( pData->eType == etDatasource ) && pData->sAccessor.Len() )
{
_rText = ::svt::OFileNotation( pData->sAccessor ).get( ::svt::OFileNotation::N_SYSTEM );
return sal_True;
}
return sal_False;
}
// -----------------------------------------------------------------------------
PopupMenu* SbaTableQueryBrowser::getContextMenu( Control& _rControl ) const
2000-12-08 20:16:38 +00:00
{
OSL_PRECOND( &m_pTreeView->getListBox() == &_rControl,
"SbaTableQueryBrowser::getContextMenu: where does this come from?" );
if ( &m_pTreeView->getListBox() != &_rControl )
return NULL;
return new PopupMenu( ModuleRes( MENU_BROWSER_DEFAULTCONTEXT ) );
}
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
// -----------------------------------------------------------------------------
IController& SbaTableQueryBrowser::getCommandController()
{
return *this;
}
2001-03-29 06:09:53 +00:00
// -----------------------------------------------------------------------------
::cppu::OInterfaceContainerHelper* SbaTableQueryBrowser::getContextMenuInterceptors()
{
return &m_aContextMenuInterceptors;
}
2001-02-16 15:00:13 +00:00
// -----------------------------------------------------------------------------
Any SbaTableQueryBrowser::getCurrentSelection( Control& _rControl ) const
{
OSL_PRECOND( &m_pTreeView->getListBox() == &_rControl,
"SbaTableQueryBrowser::getCurrentSelection: where does this come from?" );
if ( &m_pTreeView->getListBox() != &_rControl )
return Any();
SvLBoxEntry* pSelected = m_pTreeView->getListBox().FirstSelected();
if ( !pSelected )
return Any();
OSL_ENSURE( m_pTreeView->getListBox().NextSelected( pSelected ) == NULL,
"SbaTableQueryBrowser::getCurrentSelection: single-selection is expected here!" );
NamedDatabaseObject aSelectedObject;
DBTreeListUserData* pData = static_cast< DBTreeListUserData* >( pSelected->GetUserData() );
aSelectedObject.Type = static_cast< sal_Int32 >( pData->eType );
switch ( aSelectedObject.Type )
{
case DatabaseObject::QUERY:
case DatabaseObject::TABLE:
aSelectedObject.Name = m_pTreeView->getListBox().GetEntryText( pSelected );
break;
case DatabaseObjectContainer::DATA_SOURCE:
case DatabaseObjectContainer::QUERIES:
case DatabaseObjectContainer::TABLES:
aSelectedObject.Name = getDataSourceAcessor( pSelected );
break;
default:
OSL_ENSURE( false, "SbaTableQueryBrowser::getCurrentSelection: invalid (unexpected) object type!" );
break;
}
return makeAny( aSelectedObject );
}
// -----------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::implGetQuerySignature( ::rtl::OUString& _rCommand, sal_Bool& _bEscapeProcessing )
{
_rCommand = ::rtl::OUString();
_bEscapeProcessing = sal_False;
try
{
2010-11-24 01:07:16 +00:00
// contain the dss (data source signature) of the form
::rtl::OUString sDataSourceName;
::rtl::OUString sCommand;
sal_Int32 nCommandType = CommandType::COMMAND;
Reference< XPropertySet > xRowsetProps( getRowSet(), UNO_QUERY );
ODataAccessDescriptor aDesc( xRowsetProps );
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
sDataSourceName = aDesc.getDataSource();
aDesc[ daCommand ] >>= sCommand;
aDesc[ daCommandType ] >>= nCommandType;
// do we need to do anything?
if ( CommandType::QUERY != nCommandType )
return sal_False;
// get the query object
Reference< XQueryDefinitionsSupplier > xSuppQueries;
Reference< XNameAccess > xQueries;
Reference< XPropertySet > xQuery;
m_xDatabaseContext->getByName( sDataSourceName ) >>= xSuppQueries;
if ( xSuppQueries.is() )
xQueries = xSuppQueries->getQueryDefinitions();
if ( xQueries.is() )
xQueries->getByName( sCommand ) >>= xQuery;
OSL_ENSURE( xQuery.is(), "SbaTableQueryBrowser::implGetQuerySignature: could not retrieve the query object!" );
// get the two properties we need
if ( xQuery.is() )
{
xQuery->getPropertyValue( PROPERTY_COMMAND ) >>= _rCommand;
_bEscapeProcessing = ::cppu::any2bool( xQuery->getPropertyValue( PROPERTY_ESCAPE_PROCESSING ) );
return sal_True;
}
}
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
return sal_False;
}
//------------------------------------------------------------------------------
void SbaTableQueryBrowser::frameAction(const ::com::sun::star::frame::FrameActionEvent& aEvent) throw( RuntimeException )
{
if (aEvent.Frame == m_xCurrentFrameParent)
{
if(aEvent.Action == FrameAction_COMPONENT_DETACHING)
implRemoveStatusListeners();
else if (aEvent.Action == FrameAction_COMPONENT_REATTACHED)
connectExternalDispatches();
}
else
SbaXDataBrowserController::frameAction(aEvent);
}
// -----------------------------------------------------------------------------
void SbaTableQueryBrowser::clearGridColumns(const Reference< XNameContainer >& _xColContainer)
{
// first we have to clear the grid
Sequence< ::rtl::OUString > aNames = _xColContainer->getElementNames();
const ::rtl::OUString* pIter = aNames.getConstArray();
const ::rtl::OUString* pEnd = pIter + aNames.getLength();
Reference< XInterface > xColumn;
for (; pIter != pEnd;++pIter)
{
_xColContainer->getByName(*pIter) >>= xColumn;
_xColContainer->removeByName(*pIter);
::comphelper::disposeComponent(xColumn);
}
}
// -----------------------------------------------------------------------------
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
void SbaTableQueryBrowser::loadMenu(const Reference< XFrame >& _xFrame)
{
if ( m_bShowMenu )
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
{
OGenericUnoController::loadMenu(_xFrame);
}
else if ( !m_bPreview )
{
Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager = getLayoutManager(_xFrame);
if ( xLayoutManager.is() )
{
xLayoutManager->lock();
xLayoutManager->createElement( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/toolbar" )));
xLayoutManager->unlock();
xLayoutManager->doLayout();
}
onLoadedMenu( xLayoutManager );
}
}
// -----------------------------------------------------------------------------
::rtl::OUString SbaTableQueryBrowser::getPrivateTitle() const
{
::rtl::OUString sTitle;
if ( m_pCurrentlyDisplayed )
{
SvLBoxEntry* pContainer = m_pTreeModel->GetParent(m_pCurrentlyDisplayed);
// get the entry for the datasource
SvLBoxEntry* pConnection = implGetConnectionEntry(pContainer);
::rtl::OUString sName = m_pTreeView->getListBox().GetEntryText(m_pCurrentlyDisplayed);
sTitle = GetEntryText( pConnection );
INetURLObject aURL(sTitle);
if ( aURL.GetProtocol() != INET_PROT_NOT_VALID )
sTitle = aURL.getBase(INetURLObject::LAST_SEGMENT,true,INetURLObject::DECODE_WITH_CHARSET);
if ( sName.getLength() )
{
sName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - "));
sName += sTitle;
sTitle = sName;
}
}
return sTitle;
INTEGRATION: CWS insight01 (1.152.38); FILE MERGED 2004/07/16 12:18:56 oj 1.152.38.33: check if datasource name is set, if not try to get name from connection's parent 2004/07/15 14:26:35 oj 1.152.38.32: solarmutex corrected 2004/07/15 10:58:36 oj 1.152.38.31: add chkthis macros 2004/07/14 10:22:22 oj 1.152.38.30: #i30603# corret frame loading 2004/07/11 17:12:29 oj 1.152.38.29: merge conflicts resolved 2004/06/01 08:50:33 oj 1.152.38.28: RESYNC: (1.153-1.156); FILE MERGED 2004/05/28 13:28:38 oj 1.152.38.27: remove some unused things 2004/05/21 10:21:29 oj 1.152.38.26: check for parameterized query and preview 2004/04/27 07:13:33 oj 1.152.38.25: remove unused code 2004/04/19 09:59:52 oj 1.152.38.24: if preview, disable nav controls prior 2004/04/01 11:37:01 oj 1.152.38.23: ongoing work 2004/04/01 10:37:55 oj 1.152.38.22: set cursor before collapsing 2004/04/01 10:22:36 oj 1.152.38.21: select from api call directly 2004/03/15 08:18:16 oj 1.152.38.20: #111075# disable border when in preview mode 2004/03/14 14:49:06 oj 1.152.38.19: ongoing work 2004/03/11 08:59:19 oj 1.152.38.18: #111075# changes for closing 2004/03/08 07:26:55 oj 1.152.38.17: change to new menu layout 2004/03/05 07:11:43 oj 1.152.38.16: #111090# changes for the new prop dialogs 2004/02/27 08:41:04 oj 1.152.38.15: #111075# check for vcl control 2004/02/20 14:39:53 oj 1.152.38.14: #111075# ongoing work 2004/02/20 11:32:24 oj 1.152.38.13: #i25414# extend the datadescriptor for database location and connection resource 2004/02/12 16:20:48 oj 1.152.38.12: #111075# fix refcount problem 2004/01/22 07:31:42 oj 1.152.38.11: #i24210# disable navibar and recordmarker when preview is enabled 2004/01/21 13:07:38 oj 1.152.38.10: #111075# ongoing work 2004/01/02 13:57:58 oj 1.152.38.9: RESYNC: (1.152-1.153); FILE MERGED 2004/01/02 09:54:05 oj 1.152.38.8: #111075# ongoing work 2003/12/17 09:15:56 oj 1.152.38.7: #111075# ongoing work 2003/11/26 12:23:08 oj 1.152.38.6: #111075# ongoing work 2003/11/17 09:43:42 oj 1.152.38.5: #111075# ongoning work 2003/11/05 11:41:06 oj 1.152.38.4: #111075# ongoing work 2003/10/24 06:36:37 oj 1.152.38.3: #i21643# import filter changes 2003/09/18 05:58:02 oj 1.152.38.2: #111075# ongoing work 2003/07/29 12:23:19 oj 1.152.38.1: #111075# insight changes
2004-08-02 14:35:09 +00:00
}
// -----------------------------------------------------------------------------
sal_Bool SbaTableQueryBrowser::preReloadForm()
{
sal_Bool bIni = sal_False;
if ( !m_pCurrentlyDisplayed )
{
// switch the grid to design mode while loading
getBrowserView()->getGridControl()->setDesignMode(sal_True);
// we had an invalid statement so we need to connect the column models
Reference<XPropertySet> xRowSetProps(getRowSet(),UNO_QUERY);
::svx::ODataAccessDescriptor aDesc(xRowSetProps);
// extract the props
::rtl::OUString sDataSource;
::rtl::OUString sCommand;
sal_Int32 nCommandType = CommandType::COMMAND;
sal_Bool bEscapeProcessing = sal_True;
extractDescriptorProps(aDesc, sDataSource, sCommand, nCommandType, bEscapeProcessing);
if ( sDataSource.getLength() && sCommand.getLength() && (-1 != nCommandType) )
{
SvLBoxEntry* pDataSource = NULL;
SvLBoxEntry* pCommandType = NULL;
m_pCurrentlyDisplayed = getObjectEntry( sDataSource, sCommand, nCommandType, &pDataSource, &pCommandType, sal_True, SharedConnection() );
bIni = sal_True;
}
}
return bIni;
}
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
// -----------------------------------------------------------------------------
void SbaTableQueryBrowser::postReloadForm()
{
InitializeGridModel(getFormComponent());
LoadFinished(sal_True);
}
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
//------------------------------------------------------------------------------
Reference< XEmbeddedScripts > SAL_CALL SbaTableQueryBrowser::getScriptContainer() throw (RuntimeException)
{
CWS-TOOLING: integrate CWS dba32e 2009-08-10 13:16:25 +0200 fs r274805 : #i84390# typo corrected 2009-08-10 13:04:28 +0200 fs r274804 : #i103741# properly terminate the last token in a string with a 0 byte 2009-07-24 08:54:05 +0200 msc r274286 : #103219# changed long name 2009-07-24 08:42:28 +0200 msc r274285 : #i79649# changed behaviour of the wizard 2009-07-22 14:17:49 +0200 oj r274238 : GrabFocus 2009-07-22 13:38:01 +0200 oj r274232 : #i102934# mixed up 2009-07-22 13:37:16 +0200 oj r274231 : #i102934# mixed up 2009-07-21 12:30:36 +0200 oj r274176 : crash when using distinct 2009-07-21 10:03:44 +0200 oj r274163 : set last char to 0 2009-07-21 09:31:22 +0200 oj r274161 : mediatype corrected 2009-07-20 11:45:33 +0200 fs r274118 : typo in formatting string 2009-07-20 11:40:39 +0200 fs r274117 : removed unused include 2009-07-20 11:40:01 +0200 fs r274116 : class name corrected 2009-07-16 13:41:45 +0200 oj r274046 : i101587 wrong check for embeddeddatabase url in confguration, have to check path 2009-07-16 13:12:05 +0200 tbo r274044 : #i103219# adjust declarion to new hid.lst 2009-07-16 12:43:48 +0200 oj r274041 : #i102497# check also fot longvarchar 2009-07-16 12:15:41 +0200 oj r274039 : #i103030# handle type description and exceptions as well 2009-07-16 11:14:26 +0200 fs r274035 : let SVN ignore output paths 2009-07-16 09:23:43 +0200 fs r274030 : TransforFormComponentProperties: no need to check for attribute equality 2009-07-10 14:16:23 +0200 oj r273892 : CWS-TOOLING: rebase CWS dba32e to trunk@273858 (milestone: DEV300:m52) 2009-07-01 21:41:50 +0200 fs r273614 : #i10000# 2009-07-01 15:01:10 +0200 fs r273589 : Input required doesn't make sense at all in XML form documents 2009-07-01 12:10:31 +0200 fs r273562 : updated 2009-07-01 11:46:12 +0200 fs r273560 : #i103219# add about 100 missing long names 2009-07-01 10:11:41 +0200 fs r273551 : moved from socket/port usage to pipe/name usage, which is more common nowadays 2009-07-01 09:50:03 +0200 fs r273549 : removed obsolete (empty) folder 2009-07-01 09:47:35 +0200 fs r273548 : copied the code for the Accessibility Workbench herein, formerly located in the old CVS repository, at gsl/awb 2009-06-30 10:07:47 +0200 fs r273493 : merging latest changes from CWS dba32d 2009-06-29 20:46:31 +0200 fs r273482 : #i103138# Rectangle conversions 2009-06-29 10:01:13 +0200 fs r273453 : #i103138# refactored the code for positioning/zooming the control Basically, we now allow adjustControlGeometry_throw (formerly known as positionControl_throw and setControlZoom) to take an additional ViewTransformation parameter, describing the transformation to obtain the actual control position/size. Consequently, positionControl itself also allows for a ViewTransformation parameter. This has become necessary since during painting, the device which we created our control for might not necessarily have a proper MapMode set. In this case, if we would use this map mode for calculating the control's position/size, this would lead to wrong results. Note that this problem was introduced by the fix for #i101398#: During the fix, we postponed the control creation to a later time (when it is really needed). At this later time, the MapMode at the device is broken, at the earlier time where we formerly crearted the control (createPrimitive2DSequence), it is not yet broken. Whether or not the MapMode is defined as "broken" might depend on one's point of view, however ... I consider it broken, since: - we need the map mode to obtain the proper zoom level, which is to be forwarded to the control - there are scenarios where the MapMode is *not* set to MAP_PIXEL (in those scenarios, everything works fine), and there are scenarios where it *is* set to MAP_PIXEL (in those the bug 103138 appears). It somehow feels wrong that one cannot rely on the device's map mode this way, but on the other hand one has no possibility to obtain the current zoom by other means. Note that one issue (still to be submitted) is left: In the page pane of a Draw/Impress document, controls have a wrong text size. This is because in this pane, the above-mentioned "broken" map mode is used, which means the controls have a zoom of "1:1" set, which is wrong here. 2009-06-29 09:52:13 +0200 fs r273452 : during #i103138#: belongsToDevice is unused nowadays 2009-06-24 12:40:06 +0200 fs r273329 : #i102888# #i102899# 2009-06-24 12:10:29 +0200 oj r273327 : #i103030# some code changes 2009-06-24 09:44:14 +0200 oj r273311 : #i103030# some code changes 2009-06-24 09:24:42 +0200 oj r273309 : #i103030# add log 2009-06-24 09:03:29 +0200 fs r273308 : if a col's table name is schema.table, properly quote all parts 2009-06-24 08:56:06 +0200 oj r273307 : #i102691# changed string 2009-06-23 13:31:43 +0200 oj r273280 : #i102479# fix date, time and datetime 2009-06-23 12:51:28 +0200 oj r273277 : #i103020# clear old expression when updating to avoid dead pointers in treelist userdata 2009-06-23 12:17:16 +0200 oj r273275 : #i103030# add LogBridge 2009-06-23 11:53:10 +0200 oj r273272 : shawdowed var resolved 2009-06-23 11:48:49 +0200 oj r273270 : #i103030# add :log to uno env if var UNO_ENV_LOG is set 2009-06-23 11:47:47 +0200 oj r273269 : #i103030# add LogBridge 2009-06-23 11:47:11 +0200 oj r273268 : #i103030# add LogBridge 2009-06-23 08:05:08 +0200 oj r273253 : #i102934# add key for collapsing 2009-06-22 13:21:33 +0200 fs r273225 : merging latest changes from CWS dba32d 2009-06-22 13:15:22 +0200 fs r273221 : why restrict to 12 entries? 2009-06-22 08:12:21 +0200 oj r273196 : #i102655# choosen > chosen typo fixed 2009-06-22 08:08:04 +0200 oj r273195 : #i102657# typo fix 2009-06-22 08:06:28 +0200 oj r273194 : #i102934# expanding and collasping of section 2009-06-22 08:05:52 +0200 oj r273193 : #i102930# set focus in treelistbox 2009-06-22 08:04:56 +0200 oj r273192 : #i102929# enable tabstop 2009-06-19 13:18:26 +0200 oj r273157 : remove unused param 2009-06-19 10:07:05 +0200 oj r273149 : CWS-TOOLING: rebase CWS dba32e to trunk@272827 (milestone: DEV300:m50) 2009-06-19 07:32:40 +0200 oj r273146 : merge from dba32d to dba32e 2009-06-19 07:22:56 +0200 oj r273145 : merge from dba32d to dba32e 2009-06-19 07:22:33 +0200 oj r273144 : merge from dba32d to dba32e 2009-06-18 14:09:34 +0200 fs r273116 : merging the latest changes from CWS dba32d (up to revision 273108) herein, which effectively is a rebase to DEV300.m50 2009-06-18 08:50:35 +0200 oj r273098 : #i102894# fix for new line in text 2009-06-18 08:28:48 +0200 oj r273097 : #i102892# check any 2009-06-18 08:21:34 +0200 oj r273096 : check if error is valid 2009-06-16 13:49:28 +0200 fs r273019 : why make a drop down control by default? The form control factory in SVX does this better those days ... 2009-06-10 09:53:20 +0200 oj r272797 : add lic text 2009-06-10 09:48:55 +0200 oj r272796 : test added for i101618 2009-06-09 14:57:39 +0200 oj r272771 : #i101618# access database document only when script container is needed 2009-06-09 12:42:25 +0200 oj r272765 : #i102497# check type property 2009-06-09 12:32:49 +0200 oj r272764 : adjust test cases 2009-06-09 12:31:58 +0200 oj r272763 : adjust test cases 2009-06-09 12:31:22 +0200 oj r272762 : adjust test cases 2009-06-09 11:35:42 +0200 oj r272761 : check if error is valid 2009-06-09 11:29:42 +0200 oj r272760 : #i102497# longvarchar was missing 2009-06-08 14:52:49 +0200 fs r272733 : #i102564# when setting a new field, also set m_nFieldType 2009-06-08 13:51:20 +0200 oj r272730 : add tests 2009-06-05 14:38:01 +0200 oj r272686 : add dep 2009-06-05 14:35:00 +0200 oj r272684 : add new tests 2009-06-05 13:41:18 +0200 oj r272681 : code clean ups 2009-06-05 12:40:51 +0200 oj r272678 : code cleanup 2009-06-05 12:02:57 +0200 oj r272677 : code cleanup 2009-06-05 10:42:38 +0200 oj r272670 : #i49320# impl export of single rows and as RTF and HTML 2009-06-03 14:30:37 +0200 oj r272576 : #i79649# check if file matches filter wildcard 2009-06-03 13:41:57 +0200 oj r272560 : #i102470# impl not b like 'c'
2009-08-26 10:09:17 +00:00
// update our database document
Reference< XModel > xDocument;
try
{
Reference< XPropertySet > xCursorProps( getRowSet(), UNO_QUERY_THROW );
Reference< XConnection > xConnection( xCursorProps->getPropertyValue( PROPERTY_ACTIVE_CONNECTION ), UNO_QUERY );
if ( xConnection.is() )
{
Reference< XChild > xChild( xConnection, UNO_QUERY_THROW );
Reference< XDocumentDataSource > xDataSource( xChild->getParent(), UNO_QUERY_THROW );
xDocument.set( xDataSource->getDatabaseDocument(), UNO_QUERY_THROW );
}
}
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
Reference< XEmbeddedScripts > xScripts( xDocument, UNO_QUERY );
OSL_ENSURE( xScripts.is() || !xDocument.is(),
INTEGRATION: CWS odbmacros2 (1.192.2); FILE MERGED 2008/03/06 09:59:17 fs 1.192.2.14: manual resync to 1.195 to prevent conflicts at integration time 2008/02/18 13:56:24 fs 1.192.2.13: corrected calculation of bHideTreeView 2008/02/20 13:28:00 fs 1.192.2.12.2.3: some DBG_UNHANDLED_EXCEPTIONs 2008/02/18 14:01:03 fs 1.192.2.12.2.2: 'resync': merge changes 1.192.2.12->1.192.2.13 2008/02/14 12:25:00 fs 1.192.2.12.2.1: #i49133# re-enable the macros in DBDocs, which had been temporarily disable to finalize CWS odbmacros2 2008/02/14 08:36:55 fs 1.192.2.12: temporarily disable scripting support for database documents, so we have an intermediate version of the CWS which we can integrate 2008/02/11 13:42:13 fs 1.192.2.11: #i10000# 2008/02/11 11:16:47 fs 1.192.2.10: replace ShowTreeView/Button with (Enable|Show)Browser 2008/02/06 21:44:26 fs 1.192.2.9: #i49133# don't support XScriptInvocationContext if our associated document does not support XEmbeddedScripts, or if we cannot unambiguously be associated with with a dooc 2008/02/06 08:35:51 fs 1.192.2.8: copying the fix for #i85879# into this CWS: cleanup the toolbar mess in the data source browser 2008/02/04 22:35:43 fs 1.192.2.7: #i10000# 2008/02/04 13:08:01 fs 1.192.2.6: RESYNC: (1.192-1.193); FILE MERGED 2008/01/24 10:08:47 fs 1.192.2.5: implDirectSQL was never used / since rebuilding the connection is not implemented, remove it from the menu 2007/12/19 13:26:52 fs 1.192.2.4: getDataSourceName_displayError: database context arg is not necessary 2007/12/19 06:12:22 fs 1.192.2.3: #i49133# +m_xCurrentDatabaseDocument 2007/12/18 21:23:20 fs 1.192.2.2: removed an obsolete friend declaration 2007/12/13 11:22:06 fs 1.192.2.1: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change
2008-03-06 17:15:05 +00:00
"SbaTableQueryBrowser::getScriptContainer: invalid database document!" );
return xScripts;
}
//------------------------------------------------------------------------------
void SAL_CALL SbaTableQueryBrowser::registerContextMenuInterceptor( const Reference< XContextMenuInterceptor >& _Interceptor ) throw (RuntimeException)
{
if ( _Interceptor.is() )
m_aContextMenuInterceptors.addInterface( _Interceptor );
}
//------------------------------------------------------------------------------
void SAL_CALL SbaTableQueryBrowser::releaseContextMenuInterceptor( const Reference< XContextMenuInterceptor >& _Interceptor ) throw (RuntimeException)
{
if ( _Interceptor.is() )
m_aContextMenuInterceptors.removeInterface( _Interceptor );
}
//------------------------------------------------------------------------------
void SAL_CALL SbaTableQueryBrowser::registeredDatabaseLocation( const DatabaseRegistrationEvent& _Event ) throw (RuntimeException)
{
SolarMutexGuard aGuard;
implAddDatasource( _Event.Name, SharedConnection() );
}
//------------------------------------------------------------------------------
void SbaTableQueryBrowser::impl_cleanupDataSourceEntry( const String& _rDataSourceName )
{
// get the top-level representing the removed data source
SvLBoxEntry* pDataSourceEntry = m_pTreeView->getListBox().FirstChild( NULL );
while ( pDataSourceEntry )
{
if ( m_pTreeView->getListBox().GetEntryText( pDataSourceEntry ) == _rDataSourceName )
break;
pDataSourceEntry = m_pTreeView->getListBox().NextSibling( pDataSourceEntry );
}
OSL_ENSURE( pDataSourceEntry, "SbaTableQueryBrowser::impl_cleanupDataSourceEntry: do not know this data source!" );
if ( !pDataSourceEntry )
return;
if ( isSelected( pDataSourceEntry ) )
{ // a table or query belonging to the deleted data source is currently beeing displayed.
OSL_ENSURE( m_pTreeView->getListBox().GetRootLevelParent( m_pCurrentlyDisplayed ) == pDataSourceEntry,
"SbaTableQueryBrowser::impl_cleanupDataSourceEntry: inconsistence (1)!" );
unloadAndCleanup( sal_True );
}
else
OSL_ENSURE(
( NULL == m_pCurrentlyDisplayed )
|| ( m_pTreeView->getListBox().GetRootLevelParent( m_pCurrentlyDisplayed ) != pDataSourceEntry ),
"SbaTableQueryBrowser::impl_cleanupDataSourceEntry: inconsistence (2)!");
// delete any user data of the child entries of the to-be-removed entry
SvTreeEntryList* pList = m_pTreeModel->GetChildList( pDataSourceEntry );
if ( pList )
{
SvLBoxEntry* pEntryLoop = static_cast<SvLBoxEntry*>( pList->First() );
while ( pEntryLoop )
{
DBTreeListUserData* pData = static_cast< DBTreeListUserData* >( pEntryLoop->GetUserData() );
pEntryLoop->SetUserData( NULL );
delete pData;
pEntryLoop = static_cast< SvLBoxEntry* >( pList->Next() );
}
}
// remove the entry
DBTreeListUserData* pData = static_cast< DBTreeListUserData* >( pDataSourceEntry->GetUserData() );
pDataSourceEntry->SetUserData( NULL );
delete pData;
m_pTreeModel->Remove( pDataSourceEntry );
}
//------------------------------------------------------------------------------
void SAL_CALL SbaTableQueryBrowser::revokedDatabaseLocation( const DatabaseRegistrationEvent& _Event ) throw (RuntimeException)
{
SolarMutexGuard aGuard;
impl_cleanupDataSourceEntry( _Event.Name );
// maybe the object which is part of the document data source has been removed
checkDocumentDataSource();
}
//------------------------------------------------------------------------------
void SAL_CALL SbaTableQueryBrowser::changedDatabaseLocation( const DatabaseRegistrationEvent& _Event ) throw (RuntimeException)
{
SolarMutexGuard aGuard;
// in case the data source was expanded, and connected, we need to clean it up
// for simplicity, just do as if the data source were completely removed and re-added
impl_cleanupDataSourceEntry( _Event.Name );
implAddDatasource( _Event.Name, SharedConnection() );
}
// .........................................................................
} // namespace dbaui
// .........................................................................
2000-10-26 13:46:14 +00:00
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */