2010-10-12 15:59:03 +02:00
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2012-06-14 17:39:53 +01:00
/*
* This file is part of the LibreOffice project .
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License , v . 2.0 . If a copy of the MPL was not distributed with this
* file , You can obtain one at http : //mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice :
*
* Licensed to the Apache Software Foundation ( ASF ) under one or more
* contributor license agreements . See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership . The ASF licenses this file to you under the Apache
* License , Version 2.0 ( the " License " ) ; you may not use this file
* except in compliance with the License . You may obtain a copy of
* the License at http : //www.apache.org/licenses/LICENSE-2.0 .
*/
2000-10-26 13:46:14 +00:00
2009-10-23 09:46:03 +02:00
# include "browserids.hxx"
2000-10-26 13:46:14 +00:00
# include "brwctrlr.hxx"
# include "brwview.hxx"
2009-10-23 09:46:03 +02:00
# include "dbu_brw.hrc"
# include "dbustrings.hrc"
# include "queryfilter.hxx"
# include "queryorder.hxx"
2000-11-09 06:33:33 +00:00
# include "sqlmessage.hxx"
2009-10-23 09:46:03 +02:00
2000-10-26 13:46:14 +00:00
# include <com/sun/star/beans/PropertyAttribute.hpp>
2009-10-23 09:46:03 +02:00
# include <com/sun/star/container/XNameContainer.hpp>
# include <com/sun/star/container/XNamed.hpp>
2000-10-26 13:46:14 +00:00
# include <com/sun/star/form/FormButtonType.hpp>
# include <com/sun/star/form/FormSubmitEncoding.hpp>
# include <com/sun/star/form/FormSubmitMethod.hpp>
# include <com/sun/star/form/XApproveActionBroadcaster.hpp>
2009-10-23 09:46:03 +02:00
# include <com/sun/star/form/XBoundControl.hpp>
2000-10-26 13:46:14 +00:00
# include <com/sun/star/form/XChangeBroadcaster.hpp>
2009-10-23 09:46:03 +02:00
# include <com/sun/star/form/XChangeListener.hpp>
2000-10-26 13:46:14 +00:00
# include <com/sun/star/form/XDatabaseParameterBroadcaster.hpp>
2009-10-23 09:46:03 +02:00
# include <com/sun/star/form/XLoadable.hpp>
# include <com/sun/star/form/XReset.hpp>
# include <com/sun/star/form/XResetListener.hpp>
# include <com/sun/star/form/XSubmit.hpp>
# include <com/sun/star/form/XSubmitListener.hpp>
# include <com/sun/star/form/runtime/XFormController.hpp>
# include <com/sun/star/sdb/CommandType.hpp>
# include <com/sun/star/sdb/ErrorCondition.hpp>
# include <com/sun/star/sdb/ParametersRequest.hpp>
# include <com/sun/star/sdb/SQLContext.hpp>
# include <com/sun/star/sdb/XInteractionSupplyParameters.hpp>
# include <com/sun/star/sdb/XSQLErrorBroadcaster.hpp>
# include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
2010-01-22 08:14:22 +01:00
# include <com/sun/star/sdb/SQLFilterOperator.hpp>
2009-10-23 09:46:03 +02:00
# include <com/sun/star/sdbc/XConnection.hpp>
# include <com/sun/star/sdbc/XResultSetUpdate.hpp>
# include <com/sun/star/sdbc/XRowSetListener.hpp>
# include <com/sun/star/sdbc/XWarningsSupplier.hpp>
2001-08-16 09:39:55 +00:00
# include <com/sun/star/sdbcx/Privilege.hpp>
2009-10-23 09:46:03 +02:00
# include <com/sun/star/sdbcx/XRowLocate.hpp>
2012-10-02 15:03:12 +02:00
# include <com/sun/star/task/InteractionHandler.hpp>
2009-10-23 09:46:03 +02:00
# include <com/sun/star/uno/TypeClass.hpp>
2012-08-29 09:32:55 +02:00
# include <com/sun/star/util/NumberFormatter.hpp>
2009-10-23 09:46:03 +02:00
# include <com/sun/star/util/XCancellable.hpp>
# include <comphelper/enumhelper.hxx>
# include <comphelper/extract.hxx>
2000-10-31 09:00:53 +00:00
# include <comphelper/interaction.hxx>
2012-09-19 13:15:15 +02:00
# include <comphelper/processfactory.hxx>
2009-10-23 09:46:03 +02:00
# include <comphelper/sequence.hxx>
2012-06-11 13:15:18 +01:00
# include <comphelper/string.hxx>
2000-11-09 06:33:33 +00:00
# include <connectivity/dbexception.hxx>
2009-10-23 09:46:03 +02:00
# include <connectivity/dbtools.hxx>
CWS-TOOLING: integrate CWS evoab2def
2009-05-28 16:00:19 +0200 fs r272412 : don't use createFalse - Evo 2.22 simply hangs when ask for all contacts without a first name. Instead, in the WHERE 0=1 case, simply create an empty result set
2009-05-22 14:25:51 +0200 fs r272193 : #i10000#
2009-05-22 14:25:37 +0200 fs r272192 : oops, ENABLE_EVOAB2 for some platforms only, not generically
2009-05-22 14:19:00 +0200 fs r272191 : #i10000#
2009-05-22 12:42:38 +0200 fs r272183 : when sorting, properly use a syslocale collator, instead of comparing the numerical values of the string's UTF-16 code points
2009-05-20 15:09:00 +0200 fs r272131 : clear/getWarnings: also allowed without cache
2009-05-20 14:11:19 +0200 fs r272128 : removed debug traces
2009-05-20 14:03:31 +0200 fs r272126 : #i55701# +STR_SORT_BY_COL_ONLY
2009-05-20 14:02:29 +0200 fs r272125 : implement sorting
2009-05-20 10:10:19 +0200 fs r272107 : #i10000#
2009-05-19 16:02:17 +0200 fs r272089 : #i10000#
2009-05-19 16:02:02 +0200 fs r272088 : #i55701# strings for new error condition DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 16:01:31 +0200 fs r272087 : #i55701# use DATA_CANNOT_SELECT_UNFILTERED as standardized error code
2009-05-19 15:59:59 +0200 fs r272086 : #i55701# +DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 15:46:12 +0200 fs r272084 : #i55701# recognize the DATA_CANNOT_SELECT_UNFILTERED error condition, and allow filtering in this case, even when the result set is empty
2009-05-19 09:06:50 +0200 fs r272059 : merging changes from CWS dba32b, to prevent future conflicts with upcoming local changes
2009-05-18 21:48:58 +0200 fs r272054 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:48:42 +0200 fs r272053 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:47:41 +0200 fs r272052 : +setExternalWarnings
2009-05-18 21:47:12 +0200 fs r272051 : #i55701# when re/loading the form, display any possible warnings
2009-05-18 21:43:26 +0200 fs r272050 : #i55701# implement XWarningsSupplier, exposing the warnings of our result set
2009-05-18 21:42:51 +0200 fs r272049 : #i55701# implement XWarningsSupplier, exposing the warnings of our aggregate RowSet
2009-05-18 17:53:59 +0200 fs r272041 : #i55701# moved the (I)WarningsContainer from dbaccess to connectivity, to be able to use it in the latter module, too
2009-05-18 17:24:10 +0200 fs r272040 : #i55701# properly enable the various Evolution types
2009-05-18 14:52:19 +0200 fs r272024 : #i55701# properly enable the Evolution types
2009-05-18 13:57:10 +0200 fs r272018 : fixed/extended whereAnalysis (column searching still not enabled, as neither LIKE nor = seem to work with my (somewhat older) Evolution version)
2009-05-18 13:56:08 +0200 fs r272017 : extended showParseTree
2009-05-18 13:55:25 +0200 fs r272016 : extended showParseTree
2009-05-18 11:40:16 +0200 fs r272008 : #i55701#
2009-05-18 11:39:02 +0200 fs r272006 : let the PreparedStatement return proper meta data, too
2009-05-18 10:05:37 +0200 fs r271999 : moved the XStatement interface to from OCommonStatement to OStatement - the former class is also the base for other classes which should not have this interface
2009-05-15 21:53:22 +0200 fs r271973 : collectColumnInformation: report invalid meta data as assertion
2009-05-15 21:51:40 +0200 fs r271972 : showParseTree should be const
2009-05-15 21:51:26 +0200 fs r271971 : showParseTree should be const
2009-05-15 21:51:03 +0200 fs r271970 : properly recognize the 'WHERE 0 = 1' clause, this way having proper statement meta data, this way saving much much calls from the DBA framework
2009-05-15 20:29:03 +0200 fs r271969 : cleaned up the mess with the statement classes
2009-05-15 15:51:11 +0200 fs r271944 : let the result set properly init its meta data
2009-05-15 15:29:54 +0200 fs r271939 : proper property implementations for the resultset class
2009-05-15 15:01:31 +0200 fs r271936 : proper property implementations for the statement class
2009-05-08 14:46:33 +0200 fs r271717 : component_foo must be PUBLIC
2009-05-06 09:20:05 +0200 fs r271565 : #i10000# (warnings on unxlngi6)
2009-05-06 09:01:30 +0200 fs r271564 : #i101493#
2009-05-05 23:08:12 +0200 fs r271560 : #i55701# merging the changes from the ancient (CVS-based) CWS evoab2default into this CWS here
2009-06-05 12:31:05 +00:00
# include <connectivity/sqlerror.hxx>
2009-10-23 09:46:03 +02:00
# include <cppuhelper/exc_hlp.hxx>
# include <cppuhelper/implbase2.hxx>
# include <cppuhelper/typeprovider.hxx>
# include <osl/mutex.hxx>
2009-04-23 10:42:05 +00:00
# include <rtl/logfile.hxx>
2009-10-23 09:46:03 +02:00
# include <sfx2/app.hxx>
# include <sfx2/sfx.hrc>
# include <svx/fmsearch.hxx>
# include <svx/svxdlg.hxx>
# include <tools/diagnose_ex.h>
2011-02-03 00:33:36 +01:00
# include <osl/diagnose.h>
2009-10-23 09:46:03 +02:00
# include <vcl/msgbox.hxx>
# include <vcl/waitobj.hxx>
2004-02-03 19:41:49 +00:00
2012-08-29 09:32:55 +02:00
using namespace : : com : : sun : : star ;
2000-10-26 13:46:14 +00:00
using namespace : : com : : sun : : star : : uno ;
2001-05-16 13:27:19 +00:00
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 : : sdbc ;
2001-08-27 05:57:24 +00:00
using namespace : : com : : sun : : star : : sdbcx ;
2000-10-31 09:00:53 +00:00
using namespace : : com : : sun : : star : : task ;
2000-10-26 13:46:14 +00:00
using namespace : : com : : sun : : star : : beans ;
2000-11-07 17:34:39 +00:00
using namespace : : com : : sun : : star : : frame ;
2001-05-16 13:27:19 +00:00
using namespace : : com : : sun : : star : : form ;
2000-11-07 17:34:39 +00:00
using namespace : : com : : sun : : star : : util ;
2001-01-09 14:52:33 +00:00
using namespace : : com : : sun : : star : : lang ;
2000-10-26 13:46:14 +00:00
using namespace : : com : : sun : : star : : container ;
2000-10-31 09:00:53 +00:00
using namespace : : dbtools ;
using namespace : : comphelper ;
2001-06-29 07:45:10 +00:00
using namespace : : svt ;
2000-10-26 13:46:14 +00:00
# define HANDLE_SQL_ERRORS( action, successflag, context, message ) \
try \
{ \
2006-07-10 14:23:44 +00:00
successflag = sal_False ; \
2000-10-26 13:46:14 +00:00
action ; \
2006-07-10 14:23:44 +00:00
successflag = sal_True ; \
2000-10-26 13:46:14 +00:00
} \
2006-07-10 14:23:44 +00:00
catch ( SQLException & e ) \
2000-10-26 13:46:14 +00:00
{ \
2006-07-10 14:23:44 +00:00
SQLException aError = : : dbtools : : prependErrorInfo ( e , * this , context ) ; \
2000-10-26 13:46:14 +00:00
: : com : : sun : : star : : sdb : : SQLErrorEvent aEvent ; \
2006-07-10 14:23:44 +00:00
aEvent . Reason < < = aError ; \
2000-10-26 13:46:14 +00:00
errorOccured ( aEvent ) ; \
} \
2006-07-10 14:23:44 +00:00
catch ( Exception & ) \
2000-10-26 13:46:14 +00:00
{ \
2006-07-10 14:23:44 +00:00
DBG_UNHANDLED_EXCEPTION ( ) ; \
2000-10-26 13:46:14 +00:00
} \
2011-02-25 17:47:41 +01:00
# define DO_SAFE( action, message ) try { action; } catch(Exception&) { OSL_FAIL(message); } ;
2000-10-26 13:46:14 +00:00
2000-10-31 09:00:53 +00:00
//..................................................................
namespace dbaui
{
//..................................................................
//==================================================================
// OParameterContinuation
//==================================================================
class OParameterContinuation : public OInteraction < XInteractionSupplyParameters >
{
Sequence < PropertyValue > m_aValues ;
public :
OParameterContinuation ( ) { }
Sequence < PropertyValue > getValues ( ) const { return m_aValues ; }
// XInteractionSupplyParameters
virtual void SAL_CALL setParameters ( const Sequence < PropertyValue > & _rValues ) throw ( RuntimeException ) ;
} ;
//------------------------------------------------------------------
void SAL_CALL OParameterContinuation : : setParameters ( const Sequence < PropertyValue > & _rValues ) throw ( RuntimeException )
{
m_aValues = _rValues ;
}
2000-10-26 13:46:14 +00:00
2001-05-16 13:27:19 +00:00
//==============================================================================
2009-10-23 09:46:03 +02:00
// a helper class implementing a runtime::XFormController, will be aggregated by SbaXDataBrowserController
// (we can't derive from XFormController as it's base class is XTabController and the XTabController::getModel collides
// with the XController::getModel implemented in our base class SbaXDataBrowserController)
2001-05-16 13:27:19 +00:00
class SbaXDataBrowserController : : FormControllerImpl
2009-10-23 09:46:03 +02:00
: public : : cppu : : WeakAggImplHelper2 < : : com : : sun : : star : : form : : runtime : : XFormController ,
: : com : : sun : : star : : frame : : XFrameActionListener >
2001-05-16 13:27:19 +00:00
{
friend class SbaXDataBrowserController ;
: : cppu : : OInterfaceContainerHelper m_aActivateListeners ;
SbaXDataBrowserController * m_pOwner ;
public :
FormControllerImpl ( SbaXDataBrowserController * pOwner ) ;
2009-10-23 09:46:03 +02:00
// XFormController
virtual : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : form : : runtime : : XFormOperations > SAL_CALL getFormOperations ( ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
2001-05-16 13:27:19 +00:00
virtual : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : awt : : XControl > SAL_CALL getCurrentControl ( void ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
virtual void SAL_CALL addActivateListener ( const : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : form : : XFormControllerListener > & l ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
virtual void SAL_CALL removeActivateListener ( const : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : form : : XFormControllerListener > & l ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
2009-10-29 11:59:44 +01:00
virtual void SAL_CALL addChildController ( const : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : form : : runtime : : XFormController > & _ChildController ) throw ( : : com : : sun : : star : : uno : : RuntimeException , : : com : : sun : : star : : lang : : IllegalArgumentException ) ;
2009-10-23 16:03:52 +02:00
virtual : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : form : : runtime : : XFormControllerContext > SAL_CALL getContext ( ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
virtual void SAL_CALL setContext ( const : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : form : : runtime : : XFormControllerContext > & _context ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
virtual : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : task : : XInteractionHandler > SAL_CALL getInteractionHandler ( ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
virtual void SAL_CALL setInteractionHandler ( const : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : task : : XInteractionHandler > & _interactionHandler ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
2001-05-16 13:27:19 +00:00
2009-10-23 09:46:03 +02:00
// XChild, base of XFormController
virtual : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : uno : : XInterface > SAL_CALL getParent ( ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
virtual void SAL_CALL setParent ( const : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : uno : : XInterface > & Parent ) throw ( : : com : : sun : : star : : lang : : NoSupportException , : : com : : sun : : star : : uno : : RuntimeException ) ;
// XComponent, base of XFormController
virtual void SAL_CALL dispose ( ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
virtual void SAL_CALL addEventListener ( const : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : lang : : XEventListener > & xListener ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
virtual void SAL_CALL removeEventListener ( const : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : lang : : XEventListener > & aListener ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
// XIndexAccess, base of XFormController
virtual : : sal_Int32 SAL_CALL getCount ( ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
virtual : : com : : sun : : star : : uno : : Any SAL_CALL getByIndex ( : : sal_Int32 Index ) throw ( : : com : : sun : : star : : lang : : IndexOutOfBoundsException , : : com : : sun : : star : : lang : : WrappedTargetException , : : com : : sun : : star : : uno : : RuntimeException ) ;
// XElementAccess, base of XIndexAccess
virtual : : com : : sun : : star : : uno : : Type SAL_CALL getElementType ( ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
virtual : : sal_Bool SAL_CALL hasElements ( ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
// XEnumerationAccess, base of XElementAccess
virtual : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : container : : XEnumeration > SAL_CALL createEnumeration ( ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
// XModifyBroadcaster, base of XFormController
virtual void SAL_CALL addModifyListener ( const : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : util : : XModifyListener > & aListener ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
virtual void SAL_CALL removeModifyListener ( const : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : util : : XModifyListener > & aListener ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
// XConfirmDeleteBroadcaster, base of XFormController
virtual void SAL_CALL addConfirmDeleteListener ( const : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : form : : XConfirmDeleteListener > & aListener ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
virtual void SAL_CALL removeConfirmDeleteListener ( const : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : form : : XConfirmDeleteListener > & aListener ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
// XSQLErrorBroadcaster, base of XFormController
virtual void SAL_CALL addSQLErrorListener ( const : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : sdb : : XSQLErrorListener > & Listener ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
virtual void SAL_CALL removeSQLErrorListener ( const : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : sdb : : XSQLErrorListener > & Listener ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
// XRowSetApproveBroadcaster, base of XFormController
virtual void SAL_CALL addRowSetApproveListener ( const : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : sdb : : XRowSetApproveListener > & listener ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
virtual void SAL_CALL removeRowSetApproveListener ( const : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : sdb : : XRowSetApproveListener > & listener ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
// XDatabaseParameterBroadcaster2, base of XFormController
virtual void SAL_CALL addDatabaseParameterListener ( const : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : form : : XDatabaseParameterListener > & aListener ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
virtual void SAL_CALL removeDatabaseParameterListener ( const : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : form : : XDatabaseParameterListener > & aListener ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
// XDatabaseParameterBroadcaster, base of XDatabaseParameterBroadcaster2
virtual void SAL_CALL addParameterListener ( const : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : form : : XDatabaseParameterListener > & aListener ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
virtual void SAL_CALL removeParameterListener ( const : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : form : : XDatabaseParameterListener > & aListener ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
// XModeSelector, base of XFormController
virtual void SAL_CALL setMode ( const : : rtl : : OUString & aMode ) throw ( : : com : : sun : : star : : lang : : NoSupportException , : : com : : sun : : star : : uno : : RuntimeException ) ;
virtual : : rtl : : OUString SAL_CALL getMode ( ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
virtual : : com : : sun : : star : : uno : : Sequence < : : rtl : : OUString > SAL_CALL getSupportedModes ( ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
virtual : : sal_Bool SAL_CALL supportsMode ( const : : rtl : : OUString & aMode ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
// XTabController, base of XFormController
2001-05-16 13:27:19 +00:00
virtual void SAL_CALL setModel ( const : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : awt : : XTabControllerModel > & Model ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
virtual : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : awt : : XTabControllerModel > SAL_CALL getModel ( void ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
virtual void SAL_CALL setContainer ( const : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : awt : : XControlContainer > & _Container ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
virtual : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : awt : : XControlContainer > SAL_CALL getContainer ( void ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
virtual : : com : : sun : : star : : uno : : Sequence < : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : awt : : XControl > > SAL_CALL getControls ( void ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
virtual void SAL_CALL autoTabOrder ( void ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
virtual void SAL_CALL activateTabOrder ( void ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
virtual void SAL_CALL activateFirst ( void ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
virtual void SAL_CALL activateLast ( void ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
2009-10-23 09:46:03 +02:00
// XFrameActionListener
2001-05-16 13:27:19 +00:00
virtual void SAL_CALL frameAction ( const : : com : : sun : : star : : frame : : FrameActionEvent & aEvent ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
2009-10-23 09:46:03 +02:00
// XEventListener
2001-05-16 13:27:19 +00:00
virtual void SAL_CALL disposing ( const : : com : : sun : : star : : lang : : EventObject & Source ) throw ( : : com : : sun : : star : : uno : : RuntimeException ) ;
protected :
~ FormControllerImpl ( ) ;
} ;
2005-09-23 11:19:18 +00:00
DBG_NAME ( FormControllerImpl )
2001-05-16 13:27:19 +00:00
//------------------------------------------------------------------
2006-06-20 01:55:50 +00:00
SbaXDataBrowserController : : FormControllerImpl : : FormControllerImpl ( SbaXDataBrowserController * _pOwner )
: m_aActivateListeners ( _pOwner - > getMutex ( ) )
, m_pOwner ( _pOwner )
2001-05-16 13:27:19 +00:00
{
2005-09-23 11:19:18 +00:00
DBG_CTOR ( FormControllerImpl , NULL ) ;
2001-05-16 13:27:19 +00:00
OSL_ENSURE ( m_pOwner , " SbaXDataBrowserController::FormControllerImpl::FormControllerImpl : invalid Owner ! " ) ;
}
//------------------------------------------------------------------
SbaXDataBrowserController : : FormControllerImpl : : ~ FormControllerImpl ( )
{
2005-09-23 11:19:18 +00:00
DBG_DTOR ( FormControllerImpl , NULL ) ;
2001-05-16 13:27:19 +00:00
}
2009-10-23 09:46:03 +02:00
//------------------------------------------------------------------
Reference < runtime : : XFormOperations > SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : getFormOperations ( ) throw ( RuntimeException )
{
2011-03-12 11:27:59 +01:00
OSL_FAIL ( " SbaXDataBrowserController::FormControllerImpl::getFormOperations: not supported! " ) ;
2009-10-23 09:46:03 +02:00
return NULL ;
}
2001-05-16 13:27:19 +00:00
//------------------------------------------------------------------
Reference < : : com : : sun : : star : : awt : : XControl > SbaXDataBrowserController : : FormControllerImpl : : getCurrentControl ( void ) throw ( RuntimeException )
{
return m_pOwner - > getBrowserView ( ) ? m_pOwner - > getBrowserView ( ) - > getGridControl ( ) : Reference < : : com : : sun : : star : : awt : : XControl > ( ) ;
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : addActivateListener ( const Reference < : : com : : sun : : star : : form : : XFormControllerListener > & l ) throw ( RuntimeException )
{
m_aActivateListeners . addInterface ( l ) ;
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : removeActivateListener ( const Reference < : : com : : sun : : star : : form : : XFormControllerListener > & l ) throw ( RuntimeException )
{
m_aActivateListeners . removeInterface ( l ) ;
}
2009-10-29 11:59:44 +01:00
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : addChildController ( const Reference < runtime : : XFormController > & /*_ChildController*/ ) throw ( RuntimeException , IllegalArgumentException )
{
// not supported
throw IllegalArgumentException ( : : rtl : : OUString ( ) , * this , 1 ) ;
}
2009-10-23 16:03:52 +02:00
//------------------------------------------------------------------
Reference < runtime : : XFormControllerContext > SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : getContext ( ) throw ( RuntimeException )
{
2011-03-12 11:27:59 +01:00
OSL_FAIL ( " SbaXDataBrowserController::FormControllerImpl::getContext: no support!! " ) ;
2009-10-23 16:03:52 +02:00
return NULL ;
}
//------------------------------------------------------------------
2009-10-23 22:03:53 +02:00
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : setContext ( const Reference < runtime : : XFormControllerContext > & /*_context*/ ) throw ( RuntimeException )
2009-10-23 16:03:52 +02:00
{
2011-03-12 11:27:59 +01:00
OSL_FAIL ( " SbaXDataBrowserController::FormControllerImpl::setContext: no support!! " ) ;
2009-10-23 16:03:52 +02:00
}
//------------------------------------------------------------------
Reference < XInteractionHandler > SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : getInteractionHandler ( ) throw ( RuntimeException )
{
2011-03-12 11:27:59 +01:00
OSL_FAIL ( " SbaXDataBrowserController::FormControllerImpl::getInteractionHandler: no support!! " ) ;
2009-10-23 16:03:52 +02:00
return NULL ;
}
//------------------------------------------------------------------
2009-10-23 22:03:53 +02:00
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : setInteractionHandler ( const Reference < XInteractionHandler > & /*_interactionHandler*/ ) throw ( RuntimeException )
2009-10-23 16:03:52 +02:00
{
2011-03-12 11:27:59 +01:00
OSL_FAIL ( " SbaXDataBrowserController::FormControllerImpl::setInteractionHandler: no support!! " ) ;
2009-10-23 16:03:52 +02:00
}
//------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
Reference < XInterface > SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : getParent ( ) throw ( RuntimeException )
{
// don't have any parent form controllers
return NULL ;
}
//------------------------------------------------------------------
2009-10-23 13:08:43 +02:00
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : setParent ( const Reference < XInterface > & /*Parent*/ ) throw ( NoSupportException , RuntimeException )
2009-10-23 09:46:03 +02:00
{
throw NoSupportException ( : : rtl : : OUString ( ) , * this ) ;
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : dispose ( ) throw ( RuntimeException )
{
2011-03-12 11:27:59 +01:00
OSL_FAIL ( " SbaXDataBrowserController::FormControllerImpl::dispose: no, you do *not* want to do this! " ) ;
2009-10-23 09:46:03 +02:00
}
//------------------------------------------------------------------
2009-10-23 13:08:43 +02:00
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : addEventListener ( const Reference < XEventListener > & /*xListener*/ ) throw ( RuntimeException )
2009-10-23 09:46:03 +02:00
{
2011-03-12 11:27:59 +01:00
OSL_FAIL ( " SbaXDataBrowserController::FormControllerImpl::addEventListener: no support!! " ) ;
2009-10-23 09:46:03 +02:00
}
//------------------------------------------------------------------
2009-10-23 13:08:43 +02:00
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : removeEventListener ( const Reference < XEventListener > & /*aListener*/ ) throw ( RuntimeException )
2009-10-23 09:46:03 +02:00
{
2011-03-12 11:27:59 +01:00
OSL_FAIL ( " SbaXDataBrowserController::FormControllerImpl::removeEventListener: no support!! " ) ;
2009-10-23 09:46:03 +02:00
}
//------------------------------------------------------------------
: : sal_Int32 SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : getCount ( ) throw ( RuntimeException )
{
// no sub controllers, never
return 0 ;
}
//------------------------------------------------------------------
Any SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : getByIndex ( : : sal_Int32 /*Index*/ ) throw ( IndexOutOfBoundsException , WrappedTargetException , RuntimeException )
{
// no sub controllers, never
throw IndexOutOfBoundsException ( : : rtl : : OUString ( ) , * this ) ;
}
//------------------------------------------------------------------
Type SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : getElementType ( ) throw ( RuntimeException )
{
return : : cppu : : UnoType < runtime : : XFormController > : : get ( ) ;
}
//------------------------------------------------------------------
: : sal_Bool SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : hasElements ( ) throw ( RuntimeException )
{
// no sub controllers, never
return false ;
}
//------------------------------------------------------------------
Reference < XEnumeration > SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : createEnumeration ( ) throw ( RuntimeException )
{
return new : : comphelper : : OEnumerationByIndex ( this ) ;
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : addModifyListener ( const Reference < XModifyListener > & /*_Listener*/ ) throw ( RuntimeException )
{
2011-03-12 11:27:59 +01:00
OSL_FAIL ( " SbaXDataBrowserController::FormControllerImpl::addModifyListener: no support! " ) ;
2009-10-23 09:46:03 +02:00
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : removeModifyListener ( const Reference < XModifyListener > & /*_Listener*/ ) throw ( RuntimeException )
{
2011-03-12 11:27:59 +01:00
OSL_FAIL ( " SbaXDataBrowserController::FormControllerImpl::removeModifyListener: no support! " ) ;
2009-10-23 09:46:03 +02:00
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : addConfirmDeleteListener ( const Reference < XConfirmDeleteListener > & /*_Listener*/ ) throw ( RuntimeException )
{
2011-03-12 11:27:59 +01:00
OSL_FAIL ( " SbaXDataBrowserController::FormControllerImpl::addConfirmDeleteListener: no support! " ) ;
2009-10-23 09:46:03 +02:00
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : removeConfirmDeleteListener ( const Reference < XConfirmDeleteListener > & /*_Listener*/ ) throw ( RuntimeException )
{
2011-03-12 11:27:59 +01:00
OSL_FAIL ( " SbaXDataBrowserController::FormControllerImpl::removeConfirmDeleteListener: no support! " ) ;
2009-10-23 09:46:03 +02:00
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : addSQLErrorListener ( const Reference < XSQLErrorListener > & /*_Listener*/ ) throw ( RuntimeException )
{
2011-03-12 11:27:59 +01:00
OSL_FAIL ( " SbaXDataBrowserController::FormControllerImpl::addSQLErrorListener: no support! " ) ;
2009-10-23 09:46:03 +02:00
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : removeSQLErrorListener ( const Reference < XSQLErrorListener > & /*_Listener*/ ) throw ( RuntimeException )
{
2011-03-12 11:27:59 +01:00
OSL_FAIL ( " SbaXDataBrowserController::FormControllerImpl::removeSQLErrorListener: no support! " ) ;
2009-10-23 09:46:03 +02:00
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : addRowSetApproveListener ( const Reference < XRowSetApproveListener > & /*_Listener*/ ) throw ( RuntimeException )
{
2011-03-12 11:27:59 +01:00
OSL_FAIL ( " SbaXDataBrowserController::FormControllerImpl::addRowSetApproveListener: no support! " ) ;
2009-10-23 09:46:03 +02:00
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : removeRowSetApproveListener ( const Reference < XRowSetApproveListener > & /*_Listener*/ ) throw ( RuntimeException )
{
2011-03-12 11:27:59 +01:00
OSL_FAIL ( " SbaXDataBrowserController::FormControllerImpl::removeRowSetApproveListener: no support! " ) ;
2009-10-23 09:46:03 +02:00
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : addDatabaseParameterListener ( const Reference < XDatabaseParameterListener > & /*_Listener*/ ) throw ( RuntimeException )
{
2011-03-12 11:27:59 +01:00
OSL_FAIL ( " SbaXDataBrowserController::FormControllerImpl::addDatabaseParameterListener: no support! " ) ;
2009-10-23 09:46:03 +02:00
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : removeDatabaseParameterListener ( const Reference < XDatabaseParameterListener > & /*_Listener*/ ) throw ( RuntimeException )
{
2011-03-12 11:27:59 +01:00
OSL_FAIL ( " SbaXDataBrowserController::FormControllerImpl::removeDatabaseParameterListener: no support! " ) ;
2009-10-23 09:46:03 +02:00
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : addParameterListener ( const Reference < XDatabaseParameterListener > & /*_Listener*/ ) throw ( RuntimeException )
{
2011-03-12 11:27:59 +01:00
OSL_FAIL ( " SbaXDataBrowserController::FormControllerImpl::addParameterListener: no support! " ) ;
2009-10-23 09:46:03 +02:00
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : removeParameterListener ( const Reference < XDatabaseParameterListener > & /*_Listener*/ ) throw ( RuntimeException )
{
2011-03-12 11:27:59 +01:00
OSL_FAIL ( " SbaXDataBrowserController::FormControllerImpl::removeParameterListener: no support! " ) ;
2009-10-23 09:46:03 +02:00
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : setMode ( const : : rtl : : OUString & _rMode ) throw ( NoSupportException , RuntimeException )
{
if ( ! supportsMode ( _rMode ) )
throw NoSupportException ( ) ;
}
//------------------------------------------------------------------
: : rtl : : OUString SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : getMode ( ) throw ( RuntimeException )
{
return : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " DataMode " ) ) ;
}
//------------------------------------------------------------------
Sequence < : : rtl : : OUString > SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : getSupportedModes ( ) throw ( RuntimeException )
{
Sequence < : : rtl : : OUString > aModes ( 1 ) ;
aModes [ 1 ] = : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " DataMode " ) ) ;
return aModes ;
}
//------------------------------------------------------------------
: : sal_Bool SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : supportsMode ( const : : rtl : : OUString & aMode ) throw ( RuntimeException )
{
return aMode . compareToAscii ( " DataMode " ) = = 0 ;
}
2001-05-16 13:27:19 +00:00
//------------------------------------------------------------------
2006-06-20 01:55:50 +00:00
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : setModel ( const Reference < : : com : : sun : : star : : awt : : XTabControllerModel > & /*Model*/ ) throw ( RuntimeException )
2001-05-16 13:27:19 +00:00
{
2011-03-19 14:05:01 +01:00
OSL_FAIL ( " SbaXDataBrowserController::FormControllerImpl::setModel : invalid call, can't change my model ! " ) ;
2001-05-16 13:27:19 +00:00
}
//------------------------------------------------------------------
Reference < : : com : : sun : : star : : awt : : XTabControllerModel > SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : getModel ( void ) throw ( RuntimeException )
{
return Reference < XTabControllerModel > ( m_pOwner - > getRowSet ( ) , UNO_QUERY ) ;
}
//------------------------------------------------------------------
2006-06-20 01:55:50 +00:00
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : setContainer ( const Reference < : : com : : sun : : star : : awt : : XControlContainer > & /*_Container*/ ) throw ( RuntimeException )
2001-05-16 13:27:19 +00:00
{
2011-03-19 14:05:01 +01:00
OSL_FAIL ( " SbaXDataBrowserController::FormControllerImpl::setContainer : invalid call, can't change my container ! " ) ;
2001-05-16 13:27:19 +00:00
}
//------------------------------------------------------------------
Reference < : : com : : sun : : star : : awt : : XControlContainer > SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : getContainer ( void ) throw ( RuntimeException )
{
if ( m_pOwner - > getBrowserView ( ) )
return m_pOwner - > getBrowserView ( ) - > getContainer ( ) ;
return Reference < : : com : : sun : : star : : awt : : XControlContainer > ( ) ;
}
//------------------------------------------------------------------
Sequence < Reference < : : com : : sun : : star : : awt : : XControl > > SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : getControls ( void ) throw ( RuntimeException )
{
if ( m_pOwner - > getBrowserView ( ) )
{
Reference < : : com : : sun : : star : : awt : : XControl > xGrid = m_pOwner - > getBrowserView ( ) - > getGridControl ( ) ;
return Sequence < Reference < : : com : : sun : : star : : awt : : XControl > > ( & xGrid , 1 ) ;
}
return Sequence < Reference < : : com : : sun : : star : : awt : : XControl > > ( ) ;
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : autoTabOrder ( void ) throw ( RuntimeException )
{
2011-03-19 14:05:01 +01:00
OSL_FAIL ( " SbaXDataBrowserController::FormControllerImpl::autoTabOrder : nothing to do (always have only one control) ! " ) ;
2001-05-16 13:27:19 +00:00
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : activateTabOrder ( void ) throw ( RuntimeException )
{
2011-03-19 14:05:01 +01:00
OSL_FAIL ( " SbaXDataBrowserController::FormControllerImpl::activateTabOrder : nothing to do (always have only one control) ! " ) ;
2001-05-16 13:27:19 +00:00
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : activateFirst ( void ) throw ( RuntimeException )
{
if ( m_pOwner - > getBrowserView ( ) )
m_pOwner - > getBrowserView ( ) - > getVclControl ( ) - > ActivateCell ( ) ;
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : activateLast ( void ) throw ( RuntimeException )
{
if ( m_pOwner - > getBrowserView ( ) )
m_pOwner - > getBrowserView ( ) - > getVclControl ( ) - > ActivateCell ( ) ;
}
//------------------------------------------------------------------
2008-03-06 17:13:16 +00:00
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : frameAction ( const : : com : : sun : : star : : frame : : FrameActionEvent & /*aEvent*/ ) throw ( RuntimeException )
2001-05-16 13:27:19 +00:00
{
}
//------------------------------------------------------------------
2006-06-20 01:55:50 +00:00
void SAL_CALL SbaXDataBrowserController : : FormControllerImpl : : disposing ( const : : com : : sun : : star : : lang : : EventObject & /*Source*/ ) throw ( RuntimeException )
2001-05-16 13:27:19 +00:00
{
// nothing to do
// we don't add ourself as listener to any broadcasters, so we are not resposible for removing us
}
2000-10-26 13:46:14 +00:00
//==================================================================
//= SbaXDataBrowserController
//==================================================================
2001-06-21 16:52:32 +00:00
//------------------------------------------------------------------
Sequence < Type > SAL_CALL SbaXDataBrowserController : : getTypes ( ) throw ( RuntimeException )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::getTypes " ) ;
2001-06-21 16:52:32 +00:00
return : : comphelper : : concatSequences (
2008-03-06 17:13:16 +00:00
SbaXDataBrowserController_Base : : getTypes ( ) ,
2001-06-21 16:52:32 +00:00
m_pFormControllerImpl - > getTypes ( )
) ;
}
//------------------------------------------------------------------
Sequence < sal_Int8 > SAL_CALL SbaXDataBrowserController : : getImplementationId ( ) throw ( RuntimeException )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::getImplementationId " ) ;
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-06-21 16:52:32 +00:00
}
//------------------------------------------------------------------
2000-10-26 13:46:14 +00:00
Any SAL_CALL SbaXDataBrowserController : : queryInterface ( const Type & _rType ) throw ( RuntimeException )
{
2001-05-16 13:27:19 +00:00
// check for our additional interfaces
2008-03-06 17:13:16 +00:00
Any aRet = SbaXDataBrowserController_Base : : queryInterface ( _rType ) ;
2001-05-16 13:27:19 +00:00
2009-10-29 11:59:44 +01:00
// check for our aggregate (implementing the XFormController)
2001-05-16 13:27:19 +00:00
if ( ! aRet . hasValue ( ) )
2009-10-29 11:59:44 +01:00
aRet = m_xFormControllerImpl - > queryAggregation ( _rType ) ;
2001-05-16 13:27:19 +00:00
// no more to offer
return aRet ;
2000-10-26 13:46:14 +00:00
}
2005-09-23 11:19:18 +00:00
DBG_NAME ( SbaXDataBrowserController )
2000-10-26 13:46:14 +00:00
//------------------------------------------------------------------------------
SbaXDataBrowserController : : SbaXDataBrowserController ( const Reference < : : com : : sun : : star : : lang : : XMultiServiceFactory > & _rM )
2008-03-06 17:13:16 +00:00
: SbaXDataBrowserController_Base ( _rM )
2009-12-11 09:51:25 +01:00
, m_nRowSetPrivileges ( 0 )
2006-08-25 08:18:44 +00:00
, m_pClipbordNotifier ( NULL )
2006-06-20 01:55:50 +00:00
, m_aAsyncGetCellFocus ( LINK ( this , SbaXDataBrowserController , OnAsyncGetCellFocus ) )
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
, m_aAsyncDisplayError ( LINK ( this , SbaXDataBrowserController , OnAsyncDisplayError ) )
2006-06-20 01:55:50 +00:00
, m_sStateSaveRecord ( ModuleRes ( RID_STR_SAVE_CURRENT_RECORD ) )
, m_sStateUndoRecord ( ModuleRes ( RID_STR_UNDO_MODIFY_RECORD ) )
2008-03-05 15:52:29 +00:00
, m_sModuleIdentifier ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " com.sun.star.sdb.DataSourceBrowser " ) ) )
2006-06-20 01:55:50 +00:00
, m_pFormControllerImpl ( NULL )
2000-10-26 13:46:14 +00:00
, m_nFormActionNestingLevel ( 0 )
2006-06-20 01:55:50 +00:00
, m_bLoadCanceled ( sal_False )
CWS-TOOLING: integrate CWS evoab2def
2009-05-28 16:00:19 +0200 fs r272412 : don't use createFalse - Evo 2.22 simply hangs when ask for all contacts without a first name. Instead, in the WHERE 0=1 case, simply create an empty result set
2009-05-22 14:25:51 +0200 fs r272193 : #i10000#
2009-05-22 14:25:37 +0200 fs r272192 : oops, ENABLE_EVOAB2 for some platforms only, not generically
2009-05-22 14:19:00 +0200 fs r272191 : #i10000#
2009-05-22 12:42:38 +0200 fs r272183 : when sorting, properly use a syslocale collator, instead of comparing the numerical values of the string's UTF-16 code points
2009-05-20 15:09:00 +0200 fs r272131 : clear/getWarnings: also allowed without cache
2009-05-20 14:11:19 +0200 fs r272128 : removed debug traces
2009-05-20 14:03:31 +0200 fs r272126 : #i55701# +STR_SORT_BY_COL_ONLY
2009-05-20 14:02:29 +0200 fs r272125 : implement sorting
2009-05-20 10:10:19 +0200 fs r272107 : #i10000#
2009-05-19 16:02:17 +0200 fs r272089 : #i10000#
2009-05-19 16:02:02 +0200 fs r272088 : #i55701# strings for new error condition DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 16:01:31 +0200 fs r272087 : #i55701# use DATA_CANNOT_SELECT_UNFILTERED as standardized error code
2009-05-19 15:59:59 +0200 fs r272086 : #i55701# +DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 15:46:12 +0200 fs r272084 : #i55701# recognize the DATA_CANNOT_SELECT_UNFILTERED error condition, and allow filtering in this case, even when the result set is empty
2009-05-19 09:06:50 +0200 fs r272059 : merging changes from CWS dba32b, to prevent future conflicts with upcoming local changes
2009-05-18 21:48:58 +0200 fs r272054 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:48:42 +0200 fs r272053 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:47:41 +0200 fs r272052 : +setExternalWarnings
2009-05-18 21:47:12 +0200 fs r272051 : #i55701# when re/loading the form, display any possible warnings
2009-05-18 21:43:26 +0200 fs r272050 : #i55701# implement XWarningsSupplier, exposing the warnings of our result set
2009-05-18 21:42:51 +0200 fs r272049 : #i55701# implement XWarningsSupplier, exposing the warnings of our aggregate RowSet
2009-05-18 17:53:59 +0200 fs r272041 : #i55701# moved the (I)WarningsContainer from dbaccess to connectivity, to be able to use it in the latter module, too
2009-05-18 17:24:10 +0200 fs r272040 : #i55701# properly enable the various Evolution types
2009-05-18 14:52:19 +0200 fs r272024 : #i55701# properly enable the Evolution types
2009-05-18 13:57:10 +0200 fs r272018 : fixed/extended whereAnalysis (column searching still not enabled, as neither LIKE nor = seem to work with my (somewhat older) Evolution version)
2009-05-18 13:56:08 +0200 fs r272017 : extended showParseTree
2009-05-18 13:55:25 +0200 fs r272016 : extended showParseTree
2009-05-18 11:40:16 +0200 fs r272008 : #i55701#
2009-05-18 11:39:02 +0200 fs r272006 : let the PreparedStatement return proper meta data, too
2009-05-18 10:05:37 +0200 fs r271999 : moved the XStatement interface to from OCommonStatement to OStatement - the former class is also the base for other classes which should not have this interface
2009-05-15 21:53:22 +0200 fs r271973 : collectColumnInformation: report invalid meta data as assertion
2009-05-15 21:51:40 +0200 fs r271972 : showParseTree should be const
2009-05-15 21:51:26 +0200 fs r271971 : showParseTree should be const
2009-05-15 21:51:03 +0200 fs r271970 : properly recognize the 'WHERE 0 = 1' clause, this way having proper statement meta data, this way saving much much calls from the DBA framework
2009-05-15 20:29:03 +0200 fs r271969 : cleaned up the mess with the statement classes
2009-05-15 15:51:11 +0200 fs r271944 : let the result set properly init its meta data
2009-05-15 15:29:54 +0200 fs r271939 : proper property implementations for the resultset class
2009-05-15 15:01:31 +0200 fs r271936 : proper property implementations for the statement class
2009-05-08 14:46:33 +0200 fs r271717 : component_foo must be PUBLIC
2009-05-06 09:20:05 +0200 fs r271565 : #i10000# (warnings on unxlngi6)
2009-05-06 09:01:30 +0200 fs r271564 : #i101493#
2009-05-05 23:08:12 +0200 fs r271560 : #i55701# merging the changes from the ancient (CVS-based) CWS evoab2default into this CWS here
2009-06-05 12:31:05 +00:00
, m_bCannotSelectUnfiltered ( true )
2000-10-26 13:46:14 +00:00
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::SbaXDataBrowserController " ) ;
2005-09-23 11:19:18 +00:00
DBG_CTOR ( SbaXDataBrowserController , NULL ) ;
2001-05-16 13:27:19 +00:00
// create the form controller aggregate
: : comphelper : : increment ( m_refCount ) ;
{
m_pFormControllerImpl = new FormControllerImpl ( this ) ;
m_xFormControllerImpl = m_pFormControllerImpl ;
m_xFormControllerImpl - > setDelegator ( * this ) ;
}
: : comphelper : : decrement ( m_refCount ) ;
2006-08-15 09:49:12 +00:00
m_aInvalidateClipboard . SetTimeoutHdl ( LINK ( this , SbaXDataBrowserController , OnInvalidateClipboard ) ) ;
m_aInvalidateClipboard . SetTimeout ( 300 ) ;
2000-10-26 13:46:14 +00:00
}
//------------------------------------------------------------------------------
SbaXDataBrowserController : : ~ SbaXDataBrowserController ( )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::~SbaXDataBrowserController " ) ;
2004-08-02 14:31:55 +00:00
// deleteView();
2001-05-16 13:27:19 +00:00
// release the aggregated form controller
if ( m_xFormControllerImpl . is ( ) )
{
Reference < XInterface > xEmpty ;
m_xFormControllerImpl - > setDelegator ( xEmpty ) ;
}
2005-09-23 11:19:18 +00:00
DBG_DTOR ( SbaXDataBrowserController , NULL ) ;
2001-05-16 13:27:19 +00:00
}
2008-03-06 17:13:16 +00:00
2001-05-16 13:27:19 +00:00
// -----------------------------------------------------------------------
2008-03-06 17:13:16 +00:00
void SbaXDataBrowserController : : startFrameListening ( const Reference < XFrame > & _rxFrame )
2001-05-16 13:27:19 +00:00
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::startFrameListening " ) ;
2008-03-06 17:13:16 +00:00
SbaXDataBrowserController_Base : : startFrameListening ( _rxFrame ) ;
2001-05-16 13:27:19 +00:00
2008-03-06 17:13:16 +00:00
Reference < XFrameActionListener > xAggListener ;
if ( m_xFormControllerImpl . is ( ) )
m_xFormControllerImpl - > queryAggregation ( XFrameActionListener : : static_type ( ) ) > > = xAggListener ;
2001-05-16 13:27:19 +00:00
2008-03-06 17:13:16 +00:00
if ( _rxFrame . is ( ) & & xAggListener . is ( ) )
_rxFrame - > addFrameActionListener ( xAggListener ) ;
}
2001-05-16 13:27:19 +00:00
2008-03-06 17:13:16 +00:00
// -----------------------------------------------------------------------
void SbaXDataBrowserController : : stopFrameListening ( const Reference < XFrame > & _rxFrame )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::stopFrameListening " ) ;
2008-03-06 17:13:16 +00:00
SbaXDataBrowserController_Base : : stopFrameListening ( _rxFrame ) ;
Reference < XFrameActionListener > xAggListener ;
if ( m_xFormControllerImpl . is ( ) )
m_xFormControllerImpl - > queryAggregation ( XFrameActionListener : : static_type ( ) ) > > = xAggListener ;
if ( _rxFrame . is ( ) & & xAggListener . is ( ) )
_rxFrame - > removeFrameActionListener ( xAggListener ) ;
2000-10-26 13:46:14 +00:00
}
2001-05-16 13:27:19 +00:00
2001-07-17 12:07:48 +00:00
// -----------------------------------------------------------------------------
CWS-TOOLING: integrate CWS evoab2def
2009-05-28 16:00:19 +0200 fs r272412 : don't use createFalse - Evo 2.22 simply hangs when ask for all contacts without a first name. Instead, in the WHERE 0=1 case, simply create an empty result set
2009-05-22 14:25:51 +0200 fs r272193 : #i10000#
2009-05-22 14:25:37 +0200 fs r272192 : oops, ENABLE_EVOAB2 for some platforms only, not generically
2009-05-22 14:19:00 +0200 fs r272191 : #i10000#
2009-05-22 12:42:38 +0200 fs r272183 : when sorting, properly use a syslocale collator, instead of comparing the numerical values of the string's UTF-16 code points
2009-05-20 15:09:00 +0200 fs r272131 : clear/getWarnings: also allowed without cache
2009-05-20 14:11:19 +0200 fs r272128 : removed debug traces
2009-05-20 14:03:31 +0200 fs r272126 : #i55701# +STR_SORT_BY_COL_ONLY
2009-05-20 14:02:29 +0200 fs r272125 : implement sorting
2009-05-20 10:10:19 +0200 fs r272107 : #i10000#
2009-05-19 16:02:17 +0200 fs r272089 : #i10000#
2009-05-19 16:02:02 +0200 fs r272088 : #i55701# strings for new error condition DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 16:01:31 +0200 fs r272087 : #i55701# use DATA_CANNOT_SELECT_UNFILTERED as standardized error code
2009-05-19 15:59:59 +0200 fs r272086 : #i55701# +DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 15:46:12 +0200 fs r272084 : #i55701# recognize the DATA_CANNOT_SELECT_UNFILTERED error condition, and allow filtering in this case, even when the result set is empty
2009-05-19 09:06:50 +0200 fs r272059 : merging changes from CWS dba32b, to prevent future conflicts with upcoming local changes
2009-05-18 21:48:58 +0200 fs r272054 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:48:42 +0200 fs r272053 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:47:41 +0200 fs r272052 : +setExternalWarnings
2009-05-18 21:47:12 +0200 fs r272051 : #i55701# when re/loading the form, display any possible warnings
2009-05-18 21:43:26 +0200 fs r272050 : #i55701# implement XWarningsSupplier, exposing the warnings of our result set
2009-05-18 21:42:51 +0200 fs r272049 : #i55701# implement XWarningsSupplier, exposing the warnings of our aggregate RowSet
2009-05-18 17:53:59 +0200 fs r272041 : #i55701# moved the (I)WarningsContainer from dbaccess to connectivity, to be able to use it in the latter module, too
2009-05-18 17:24:10 +0200 fs r272040 : #i55701# properly enable the various Evolution types
2009-05-18 14:52:19 +0200 fs r272024 : #i55701# properly enable the Evolution types
2009-05-18 13:57:10 +0200 fs r272018 : fixed/extended whereAnalysis (column searching still not enabled, as neither LIKE nor = seem to work with my (somewhat older) Evolution version)
2009-05-18 13:56:08 +0200 fs r272017 : extended showParseTree
2009-05-18 13:55:25 +0200 fs r272016 : extended showParseTree
2009-05-18 11:40:16 +0200 fs r272008 : #i55701#
2009-05-18 11:39:02 +0200 fs r272006 : let the PreparedStatement return proper meta data, too
2009-05-18 10:05:37 +0200 fs r271999 : moved the XStatement interface to from OCommonStatement to OStatement - the former class is also the base for other classes which should not have this interface
2009-05-15 21:53:22 +0200 fs r271973 : collectColumnInformation: report invalid meta data as assertion
2009-05-15 21:51:40 +0200 fs r271972 : showParseTree should be const
2009-05-15 21:51:26 +0200 fs r271971 : showParseTree should be const
2009-05-15 21:51:03 +0200 fs r271970 : properly recognize the 'WHERE 0 = 1' clause, this way having proper statement meta data, this way saving much much calls from the DBA framework
2009-05-15 20:29:03 +0200 fs r271969 : cleaned up the mess with the statement classes
2009-05-15 15:51:11 +0200 fs r271944 : let the result set properly init its meta data
2009-05-15 15:29:54 +0200 fs r271939 : proper property implementations for the resultset class
2009-05-15 15:01:31 +0200 fs r271936 : proper property implementations for the statement class
2009-05-08 14:46:33 +0200 fs r271717 : component_foo must be PUBLIC
2009-05-06 09:20:05 +0200 fs r271565 : #i10000# (warnings on unxlngi6)
2009-05-06 09:01:30 +0200 fs r271564 : #i101493#
2009-05-05 23:08:12 +0200 fs r271560 : #i55701# merging the changes from the ancient (CVS-based) CWS evoab2default into this CWS here
2009-06-05 12:31:05 +00:00
void SbaXDataBrowserController : : onStartLoading ( const Reference < XLoadable > & _rxLoadable )
{
m_bLoadCanceled = sal_False ;
m_bCannotSelectUnfiltered = false ;
Reference < XWarningsSupplier > xWarnings ( _rxLoadable , UNO_QUERY ) ;
if ( xWarnings . is ( ) )
xWarnings - > clearWarnings ( ) ;
}
// -----------------------------------------------------------------------------
void SbaXDataBrowserController : : impl_checkForCannotSelectUnfiltered ( const SQLExceptionInfo & _rError )
{
2012-12-03 13:55:06 +02:00
: : connectivity : : SQLError aError ( comphelper : : getComponentContext ( getORB ( ) ) ) ;
CWS-TOOLING: integrate CWS evoab2def
2009-05-28 16:00:19 +0200 fs r272412 : don't use createFalse - Evo 2.22 simply hangs when ask for all contacts without a first name. Instead, in the WHERE 0=1 case, simply create an empty result set
2009-05-22 14:25:51 +0200 fs r272193 : #i10000#
2009-05-22 14:25:37 +0200 fs r272192 : oops, ENABLE_EVOAB2 for some platforms only, not generically
2009-05-22 14:19:00 +0200 fs r272191 : #i10000#
2009-05-22 12:42:38 +0200 fs r272183 : when sorting, properly use a syslocale collator, instead of comparing the numerical values of the string's UTF-16 code points
2009-05-20 15:09:00 +0200 fs r272131 : clear/getWarnings: also allowed without cache
2009-05-20 14:11:19 +0200 fs r272128 : removed debug traces
2009-05-20 14:03:31 +0200 fs r272126 : #i55701# +STR_SORT_BY_COL_ONLY
2009-05-20 14:02:29 +0200 fs r272125 : implement sorting
2009-05-20 10:10:19 +0200 fs r272107 : #i10000#
2009-05-19 16:02:17 +0200 fs r272089 : #i10000#
2009-05-19 16:02:02 +0200 fs r272088 : #i55701# strings for new error condition DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 16:01:31 +0200 fs r272087 : #i55701# use DATA_CANNOT_SELECT_UNFILTERED as standardized error code
2009-05-19 15:59:59 +0200 fs r272086 : #i55701# +DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 15:46:12 +0200 fs r272084 : #i55701# recognize the DATA_CANNOT_SELECT_UNFILTERED error condition, and allow filtering in this case, even when the result set is empty
2009-05-19 09:06:50 +0200 fs r272059 : merging changes from CWS dba32b, to prevent future conflicts with upcoming local changes
2009-05-18 21:48:58 +0200 fs r272054 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:48:42 +0200 fs r272053 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:47:41 +0200 fs r272052 : +setExternalWarnings
2009-05-18 21:47:12 +0200 fs r272051 : #i55701# when re/loading the form, display any possible warnings
2009-05-18 21:43:26 +0200 fs r272050 : #i55701# implement XWarningsSupplier, exposing the warnings of our result set
2009-05-18 21:42:51 +0200 fs r272049 : #i55701# implement XWarningsSupplier, exposing the warnings of our aggregate RowSet
2009-05-18 17:53:59 +0200 fs r272041 : #i55701# moved the (I)WarningsContainer from dbaccess to connectivity, to be able to use it in the latter module, too
2009-05-18 17:24:10 +0200 fs r272040 : #i55701# properly enable the various Evolution types
2009-05-18 14:52:19 +0200 fs r272024 : #i55701# properly enable the Evolution types
2009-05-18 13:57:10 +0200 fs r272018 : fixed/extended whereAnalysis (column searching still not enabled, as neither LIKE nor = seem to work with my (somewhat older) Evolution version)
2009-05-18 13:56:08 +0200 fs r272017 : extended showParseTree
2009-05-18 13:55:25 +0200 fs r272016 : extended showParseTree
2009-05-18 11:40:16 +0200 fs r272008 : #i55701#
2009-05-18 11:39:02 +0200 fs r272006 : let the PreparedStatement return proper meta data, too
2009-05-18 10:05:37 +0200 fs r271999 : moved the XStatement interface to from OCommonStatement to OStatement - the former class is also the base for other classes which should not have this interface
2009-05-15 21:53:22 +0200 fs r271973 : collectColumnInformation: report invalid meta data as assertion
2009-05-15 21:51:40 +0200 fs r271972 : showParseTree should be const
2009-05-15 21:51:26 +0200 fs r271971 : showParseTree should be const
2009-05-15 21:51:03 +0200 fs r271970 : properly recognize the 'WHERE 0 = 1' clause, this way having proper statement meta data, this way saving much much calls from the DBA framework
2009-05-15 20:29:03 +0200 fs r271969 : cleaned up the mess with the statement classes
2009-05-15 15:51:11 +0200 fs r271944 : let the result set properly init its meta data
2009-05-15 15:29:54 +0200 fs r271939 : proper property implementations for the resultset class
2009-05-15 15:01:31 +0200 fs r271936 : proper property implementations for the statement class
2009-05-08 14:46:33 +0200 fs r271717 : component_foo must be PUBLIC
2009-05-06 09:20:05 +0200 fs r271565 : #i10000# (warnings on unxlngi6)
2009-05-06 09:01:30 +0200 fs r271564 : #i101493#
2009-05-05 23:08:12 +0200 fs r271560 : #i55701# merging the changes from the ancient (CVS-based) CWS evoab2default into this CWS here
2009-06-05 12:31:05 +00:00
: : connectivity : : ErrorCode nErrorCode ( aError . getErrorCode ( ErrorCondition : : DATA_CANNOT_SELECT_UNFILTERED ) ) ;
if ( ( ( const SQLException * ) _rError ) - > ErrorCode = = nErrorCode )
{
m_bCannotSelectUnfiltered = true ;
InvalidateFeature ( ID_BROWSER_FILTERCRIT ) ;
}
}
// -----------------------------------------------------------------------------
sal_Bool SbaXDataBrowserController : : reloadForm ( const Reference < XLoadable > & _rxLoadable )
2001-07-17 12:07:48 +00:00
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::reloadForm " ) ;
2001-07-17 12:07:48 +00:00
WaitObject aWO ( getBrowserView ( ) ) ;
CWS-TOOLING: integrate CWS evoab2def
2009-05-28 16:00:19 +0200 fs r272412 : don't use createFalse - Evo 2.22 simply hangs when ask for all contacts without a first name. Instead, in the WHERE 0=1 case, simply create an empty result set
2009-05-22 14:25:51 +0200 fs r272193 : #i10000#
2009-05-22 14:25:37 +0200 fs r272192 : oops, ENABLE_EVOAB2 for some platforms only, not generically
2009-05-22 14:19:00 +0200 fs r272191 : #i10000#
2009-05-22 12:42:38 +0200 fs r272183 : when sorting, properly use a syslocale collator, instead of comparing the numerical values of the string's UTF-16 code points
2009-05-20 15:09:00 +0200 fs r272131 : clear/getWarnings: also allowed without cache
2009-05-20 14:11:19 +0200 fs r272128 : removed debug traces
2009-05-20 14:03:31 +0200 fs r272126 : #i55701# +STR_SORT_BY_COL_ONLY
2009-05-20 14:02:29 +0200 fs r272125 : implement sorting
2009-05-20 10:10:19 +0200 fs r272107 : #i10000#
2009-05-19 16:02:17 +0200 fs r272089 : #i10000#
2009-05-19 16:02:02 +0200 fs r272088 : #i55701# strings for new error condition DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 16:01:31 +0200 fs r272087 : #i55701# use DATA_CANNOT_SELECT_UNFILTERED as standardized error code
2009-05-19 15:59:59 +0200 fs r272086 : #i55701# +DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 15:46:12 +0200 fs r272084 : #i55701# recognize the DATA_CANNOT_SELECT_UNFILTERED error condition, and allow filtering in this case, even when the result set is empty
2009-05-19 09:06:50 +0200 fs r272059 : merging changes from CWS dba32b, to prevent future conflicts with upcoming local changes
2009-05-18 21:48:58 +0200 fs r272054 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:48:42 +0200 fs r272053 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:47:41 +0200 fs r272052 : +setExternalWarnings
2009-05-18 21:47:12 +0200 fs r272051 : #i55701# when re/loading the form, display any possible warnings
2009-05-18 21:43:26 +0200 fs r272050 : #i55701# implement XWarningsSupplier, exposing the warnings of our result set
2009-05-18 21:42:51 +0200 fs r272049 : #i55701# implement XWarningsSupplier, exposing the warnings of our aggregate RowSet
2009-05-18 17:53:59 +0200 fs r272041 : #i55701# moved the (I)WarningsContainer from dbaccess to connectivity, to be able to use it in the latter module, too
2009-05-18 17:24:10 +0200 fs r272040 : #i55701# properly enable the various Evolution types
2009-05-18 14:52:19 +0200 fs r272024 : #i55701# properly enable the Evolution types
2009-05-18 13:57:10 +0200 fs r272018 : fixed/extended whereAnalysis (column searching still not enabled, as neither LIKE nor = seem to work with my (somewhat older) Evolution version)
2009-05-18 13:56:08 +0200 fs r272017 : extended showParseTree
2009-05-18 13:55:25 +0200 fs r272016 : extended showParseTree
2009-05-18 11:40:16 +0200 fs r272008 : #i55701#
2009-05-18 11:39:02 +0200 fs r272006 : let the PreparedStatement return proper meta data, too
2009-05-18 10:05:37 +0200 fs r271999 : moved the XStatement interface to from OCommonStatement to OStatement - the former class is also the base for other classes which should not have this interface
2009-05-15 21:53:22 +0200 fs r271973 : collectColumnInformation: report invalid meta data as assertion
2009-05-15 21:51:40 +0200 fs r271972 : showParseTree should be const
2009-05-15 21:51:26 +0200 fs r271971 : showParseTree should be const
2009-05-15 21:51:03 +0200 fs r271970 : properly recognize the 'WHERE 0 = 1' clause, this way having proper statement meta data, this way saving much much calls from the DBA framework
2009-05-15 20:29:03 +0200 fs r271969 : cleaned up the mess with the statement classes
2009-05-15 15:51:11 +0200 fs r271944 : let the result set properly init its meta data
2009-05-15 15:29:54 +0200 fs r271939 : proper property implementations for the resultset class
2009-05-15 15:01:31 +0200 fs r271936 : proper property implementations for the statement class
2009-05-08 14:46:33 +0200 fs r271717 : component_foo must be PUBLIC
2009-05-06 09:20:05 +0200 fs r271565 : #i10000# (warnings on unxlngi6)
2009-05-06 09:01:30 +0200 fs r271564 : #i101493#
2009-05-05 23:08:12 +0200 fs r271560 : #i55701# merging the changes from the ancient (CVS-based) CWS evoab2default into this CWS here
2009-06-05 12:31:05 +00:00
onStartLoading ( _rxLoadable ) ;
2001-07-17 12:07:48 +00:00
FormErrorHelper aReportError ( this ) ;
if ( _rxLoadable - > isLoaded ( ) )
_rxLoadable - > reload ( ) ;
else
_rxLoadable - > load ( ) ;
2010-01-22 08:14:22 +01:00
m_xParser . clear ( ) ;
const Reference < XPropertySet > xFormSet ( getRowSet ( ) , UNO_QUERY ) ;
if ( : : comphelper : : getBOOL ( xFormSet - > getPropertyValue ( PROPERTY_ESCAPE_PROCESSING ) ) )
xFormSet - > getPropertyValue ( PROPERTY_SINGLESELECTQUERYCOMPOSER ) > > = m_xParser ;
2011-02-03 11:59:22 +01:00
#if 0
2010-09-30 09:27:40 +02:00
{
const Reference < XPropertySet > xRowSetProps ( getRowSet ( ) , UNO_QUERY ) ;
const Reference < XSingleSelectQueryAnalyzer > xAnalyzer ( xRowSetProps - > getPropertyValue ( PROPERTY_SINGLESELECTQUERYCOMPOSER ) , UNO_QUERY ) ;
if ( xAnalyzer . is ( ) )
{
const Reference < XIndexAccess > xOrderColumns ( xAnalyzer - > getOrderColumns ( ) , UNO_SET_THROW ) ;
const sal_Int32 nOrderColumns ( xOrderColumns - > getCount ( ) ) ;
for ( sal_Int32 c = 0 ; c < nOrderColumns ; + + c )
{
const Reference < XPropertySet > xOrderColumn ( xOrderColumns - > getByIndex ( c ) , UNO_QUERY_THROW ) ;
: : rtl : : OUString sColumnName ;
OSL_VERIFY ( xOrderColumn - > getPropertyValue ( PROPERTY_NAME ) > > = sColumnName ) ;
: : rtl : : OUString sTableName ;
OSL_VERIFY ( xOrderColumn - > getPropertyValue ( PROPERTY_TABLENAME ) > > = sTableName ) ;
( void ) sColumnName ;
( void ) sTableName ;
}
}
}
2011-02-03 11:59:22 +01:00
# endif
2010-09-30 09:27:40 +02:00
CWS-TOOLING: integrate CWS evoab2def
2009-05-28 16:00:19 +0200 fs r272412 : don't use createFalse - Evo 2.22 simply hangs when ask for all contacts without a first name. Instead, in the WHERE 0=1 case, simply create an empty result set
2009-05-22 14:25:51 +0200 fs r272193 : #i10000#
2009-05-22 14:25:37 +0200 fs r272192 : oops, ENABLE_EVOAB2 for some platforms only, not generically
2009-05-22 14:19:00 +0200 fs r272191 : #i10000#
2009-05-22 12:42:38 +0200 fs r272183 : when sorting, properly use a syslocale collator, instead of comparing the numerical values of the string's UTF-16 code points
2009-05-20 15:09:00 +0200 fs r272131 : clear/getWarnings: also allowed without cache
2009-05-20 14:11:19 +0200 fs r272128 : removed debug traces
2009-05-20 14:03:31 +0200 fs r272126 : #i55701# +STR_SORT_BY_COL_ONLY
2009-05-20 14:02:29 +0200 fs r272125 : implement sorting
2009-05-20 10:10:19 +0200 fs r272107 : #i10000#
2009-05-19 16:02:17 +0200 fs r272089 : #i10000#
2009-05-19 16:02:02 +0200 fs r272088 : #i55701# strings for new error condition DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 16:01:31 +0200 fs r272087 : #i55701# use DATA_CANNOT_SELECT_UNFILTERED as standardized error code
2009-05-19 15:59:59 +0200 fs r272086 : #i55701# +DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 15:46:12 +0200 fs r272084 : #i55701# recognize the DATA_CANNOT_SELECT_UNFILTERED error condition, and allow filtering in this case, even when the result set is empty
2009-05-19 09:06:50 +0200 fs r272059 : merging changes from CWS dba32b, to prevent future conflicts with upcoming local changes
2009-05-18 21:48:58 +0200 fs r272054 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:48:42 +0200 fs r272053 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:47:41 +0200 fs r272052 : +setExternalWarnings
2009-05-18 21:47:12 +0200 fs r272051 : #i55701# when re/loading the form, display any possible warnings
2009-05-18 21:43:26 +0200 fs r272050 : #i55701# implement XWarningsSupplier, exposing the warnings of our result set
2009-05-18 21:42:51 +0200 fs r272049 : #i55701# implement XWarningsSupplier, exposing the warnings of our aggregate RowSet
2009-05-18 17:53:59 +0200 fs r272041 : #i55701# moved the (I)WarningsContainer from dbaccess to connectivity, to be able to use it in the latter module, too
2009-05-18 17:24:10 +0200 fs r272040 : #i55701# properly enable the various Evolution types
2009-05-18 14:52:19 +0200 fs r272024 : #i55701# properly enable the Evolution types
2009-05-18 13:57:10 +0200 fs r272018 : fixed/extended whereAnalysis (column searching still not enabled, as neither LIKE nor = seem to work with my (somewhat older) Evolution version)
2009-05-18 13:56:08 +0200 fs r272017 : extended showParseTree
2009-05-18 13:55:25 +0200 fs r272016 : extended showParseTree
2009-05-18 11:40:16 +0200 fs r272008 : #i55701#
2009-05-18 11:39:02 +0200 fs r272006 : let the PreparedStatement return proper meta data, too
2009-05-18 10:05:37 +0200 fs r271999 : moved the XStatement interface to from OCommonStatement to OStatement - the former class is also the base for other classes which should not have this interface
2009-05-15 21:53:22 +0200 fs r271973 : collectColumnInformation: report invalid meta data as assertion
2009-05-15 21:51:40 +0200 fs r271972 : showParseTree should be const
2009-05-15 21:51:26 +0200 fs r271971 : showParseTree should be const
2009-05-15 21:51:03 +0200 fs r271970 : properly recognize the 'WHERE 0 = 1' clause, this way having proper statement meta data, this way saving much much calls from the DBA framework
2009-05-15 20:29:03 +0200 fs r271969 : cleaned up the mess with the statement classes
2009-05-15 15:51:11 +0200 fs r271944 : let the result set properly init its meta data
2009-05-15 15:29:54 +0200 fs r271939 : proper property implementations for the resultset class
2009-05-15 15:01:31 +0200 fs r271936 : proper property implementations for the statement class
2009-05-08 14:46:33 +0200 fs r271717 : component_foo must be PUBLIC
2009-05-06 09:20:05 +0200 fs r271565 : #i10000# (warnings on unxlngi6)
2009-05-06 09:01:30 +0200 fs r271564 : #i101493#
2009-05-05 23:08:12 +0200 fs r271560 : #i55701# merging the changes from the ancient (CVS-based) CWS evoab2default into this CWS here
2009-06-05 12:31:05 +00:00
Reference < XWarningsSupplier > xWarnings ( _rxLoadable , UNO_QUERY ) ;
if ( xWarnings . is ( ) )
{
2011-01-26 12:26:48 +01:00
try
CWS-TOOLING: integrate CWS evoab2def
2009-05-28 16:00:19 +0200 fs r272412 : don't use createFalse - Evo 2.22 simply hangs when ask for all contacts without a first name. Instead, in the WHERE 0=1 case, simply create an empty result set
2009-05-22 14:25:51 +0200 fs r272193 : #i10000#
2009-05-22 14:25:37 +0200 fs r272192 : oops, ENABLE_EVOAB2 for some platforms only, not generically
2009-05-22 14:19:00 +0200 fs r272191 : #i10000#
2009-05-22 12:42:38 +0200 fs r272183 : when sorting, properly use a syslocale collator, instead of comparing the numerical values of the string's UTF-16 code points
2009-05-20 15:09:00 +0200 fs r272131 : clear/getWarnings: also allowed without cache
2009-05-20 14:11:19 +0200 fs r272128 : removed debug traces
2009-05-20 14:03:31 +0200 fs r272126 : #i55701# +STR_SORT_BY_COL_ONLY
2009-05-20 14:02:29 +0200 fs r272125 : implement sorting
2009-05-20 10:10:19 +0200 fs r272107 : #i10000#
2009-05-19 16:02:17 +0200 fs r272089 : #i10000#
2009-05-19 16:02:02 +0200 fs r272088 : #i55701# strings for new error condition DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 16:01:31 +0200 fs r272087 : #i55701# use DATA_CANNOT_SELECT_UNFILTERED as standardized error code
2009-05-19 15:59:59 +0200 fs r272086 : #i55701# +DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 15:46:12 +0200 fs r272084 : #i55701# recognize the DATA_CANNOT_SELECT_UNFILTERED error condition, and allow filtering in this case, even when the result set is empty
2009-05-19 09:06:50 +0200 fs r272059 : merging changes from CWS dba32b, to prevent future conflicts with upcoming local changes
2009-05-18 21:48:58 +0200 fs r272054 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:48:42 +0200 fs r272053 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:47:41 +0200 fs r272052 : +setExternalWarnings
2009-05-18 21:47:12 +0200 fs r272051 : #i55701# when re/loading the form, display any possible warnings
2009-05-18 21:43:26 +0200 fs r272050 : #i55701# implement XWarningsSupplier, exposing the warnings of our result set
2009-05-18 21:42:51 +0200 fs r272049 : #i55701# implement XWarningsSupplier, exposing the warnings of our aggregate RowSet
2009-05-18 17:53:59 +0200 fs r272041 : #i55701# moved the (I)WarningsContainer from dbaccess to connectivity, to be able to use it in the latter module, too
2009-05-18 17:24:10 +0200 fs r272040 : #i55701# properly enable the various Evolution types
2009-05-18 14:52:19 +0200 fs r272024 : #i55701# properly enable the Evolution types
2009-05-18 13:57:10 +0200 fs r272018 : fixed/extended whereAnalysis (column searching still not enabled, as neither LIKE nor = seem to work with my (somewhat older) Evolution version)
2009-05-18 13:56:08 +0200 fs r272017 : extended showParseTree
2009-05-18 13:55:25 +0200 fs r272016 : extended showParseTree
2009-05-18 11:40:16 +0200 fs r272008 : #i55701#
2009-05-18 11:39:02 +0200 fs r272006 : let the PreparedStatement return proper meta data, too
2009-05-18 10:05:37 +0200 fs r271999 : moved the XStatement interface to from OCommonStatement to OStatement - the former class is also the base for other classes which should not have this interface
2009-05-15 21:53:22 +0200 fs r271973 : collectColumnInformation: report invalid meta data as assertion
2009-05-15 21:51:40 +0200 fs r271972 : showParseTree should be const
2009-05-15 21:51:26 +0200 fs r271971 : showParseTree should be const
2009-05-15 21:51:03 +0200 fs r271970 : properly recognize the 'WHERE 0 = 1' clause, this way having proper statement meta data, this way saving much much calls from the DBA framework
2009-05-15 20:29:03 +0200 fs r271969 : cleaned up the mess with the statement classes
2009-05-15 15:51:11 +0200 fs r271944 : let the result set properly init its meta data
2009-05-15 15:29:54 +0200 fs r271939 : proper property implementations for the resultset class
2009-05-15 15:01:31 +0200 fs r271936 : proper property implementations for the statement class
2009-05-08 14:46:33 +0200 fs r271717 : component_foo must be PUBLIC
2009-05-06 09:20:05 +0200 fs r271565 : #i10000# (warnings on unxlngi6)
2009-05-06 09:01:30 +0200 fs r271564 : #i101493#
2009-05-05 23:08:12 +0200 fs r271560 : #i55701# merging the changes from the ancient (CVS-based) CWS evoab2default into this CWS here
2009-06-05 12:31:05 +00:00
{
2011-01-26 12:26:48 +01:00
SQLExceptionInfo aInfo ( xWarnings - > getWarnings ( ) ) ;
if ( aInfo . isValid ( ) )
{
showError ( aInfo ) ;
impl_checkForCannotSelectUnfiltered ( aInfo ) ;
}
}
catch ( const SQLException & e )
{
( void ) e ;
CWS-TOOLING: integrate CWS evoab2def
2009-05-28 16:00:19 +0200 fs r272412 : don't use createFalse - Evo 2.22 simply hangs when ask for all contacts without a first name. Instead, in the WHERE 0=1 case, simply create an empty result set
2009-05-22 14:25:51 +0200 fs r272193 : #i10000#
2009-05-22 14:25:37 +0200 fs r272192 : oops, ENABLE_EVOAB2 for some platforms only, not generically
2009-05-22 14:19:00 +0200 fs r272191 : #i10000#
2009-05-22 12:42:38 +0200 fs r272183 : when sorting, properly use a syslocale collator, instead of comparing the numerical values of the string's UTF-16 code points
2009-05-20 15:09:00 +0200 fs r272131 : clear/getWarnings: also allowed without cache
2009-05-20 14:11:19 +0200 fs r272128 : removed debug traces
2009-05-20 14:03:31 +0200 fs r272126 : #i55701# +STR_SORT_BY_COL_ONLY
2009-05-20 14:02:29 +0200 fs r272125 : implement sorting
2009-05-20 10:10:19 +0200 fs r272107 : #i10000#
2009-05-19 16:02:17 +0200 fs r272089 : #i10000#
2009-05-19 16:02:02 +0200 fs r272088 : #i55701# strings for new error condition DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 16:01:31 +0200 fs r272087 : #i55701# use DATA_CANNOT_SELECT_UNFILTERED as standardized error code
2009-05-19 15:59:59 +0200 fs r272086 : #i55701# +DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 15:46:12 +0200 fs r272084 : #i55701# recognize the DATA_CANNOT_SELECT_UNFILTERED error condition, and allow filtering in this case, even when the result set is empty
2009-05-19 09:06:50 +0200 fs r272059 : merging changes from CWS dba32b, to prevent future conflicts with upcoming local changes
2009-05-18 21:48:58 +0200 fs r272054 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:48:42 +0200 fs r272053 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:47:41 +0200 fs r272052 : +setExternalWarnings
2009-05-18 21:47:12 +0200 fs r272051 : #i55701# when re/loading the form, display any possible warnings
2009-05-18 21:43:26 +0200 fs r272050 : #i55701# implement XWarningsSupplier, exposing the warnings of our result set
2009-05-18 21:42:51 +0200 fs r272049 : #i55701# implement XWarningsSupplier, exposing the warnings of our aggregate RowSet
2009-05-18 17:53:59 +0200 fs r272041 : #i55701# moved the (I)WarningsContainer from dbaccess to connectivity, to be able to use it in the latter module, too
2009-05-18 17:24:10 +0200 fs r272040 : #i55701# properly enable the various Evolution types
2009-05-18 14:52:19 +0200 fs r272024 : #i55701# properly enable the Evolution types
2009-05-18 13:57:10 +0200 fs r272018 : fixed/extended whereAnalysis (column searching still not enabled, as neither LIKE nor = seem to work with my (somewhat older) Evolution version)
2009-05-18 13:56:08 +0200 fs r272017 : extended showParseTree
2009-05-18 13:55:25 +0200 fs r272016 : extended showParseTree
2009-05-18 11:40:16 +0200 fs r272008 : #i55701#
2009-05-18 11:39:02 +0200 fs r272006 : let the PreparedStatement return proper meta data, too
2009-05-18 10:05:37 +0200 fs r271999 : moved the XStatement interface to from OCommonStatement to OStatement - the former class is also the base for other classes which should not have this interface
2009-05-15 21:53:22 +0200 fs r271973 : collectColumnInformation: report invalid meta data as assertion
2009-05-15 21:51:40 +0200 fs r271972 : showParseTree should be const
2009-05-15 21:51:26 +0200 fs r271971 : showParseTree should be const
2009-05-15 21:51:03 +0200 fs r271970 : properly recognize the 'WHERE 0 = 1' clause, this way having proper statement meta data, this way saving much much calls from the DBA framework
2009-05-15 20:29:03 +0200 fs r271969 : cleaned up the mess with the statement classes
2009-05-15 15:51:11 +0200 fs r271944 : let the result set properly init its meta data
2009-05-15 15:29:54 +0200 fs r271939 : proper property implementations for the resultset class
2009-05-15 15:01:31 +0200 fs r271936 : proper property implementations for the statement class
2009-05-08 14:46:33 +0200 fs r271717 : component_foo must be PUBLIC
2009-05-06 09:20:05 +0200 fs r271565 : #i10000# (warnings on unxlngi6)
2009-05-06 09:01:30 +0200 fs r271564 : #i101493#
2009-05-05 23:08:12 +0200 fs r271560 : #i55701# merging the changes from the ancient (CVS-based) CWS evoab2default into this CWS here
2009-06-05 12:31:05 +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 _rxLoadable - > isLoaded ( ) ;
2001-07-17 12:07:48 +00:00
}
2000-11-03 13:46:21 +00:00
// -----------------------------------------------------------------------------
void SbaXDataBrowserController : : initFormatter ( )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::initFormatter " ) ;
2000-11-03 13:46:21 +00:00
// ---------------------------------------------------------------
// create a formatter working with the connections format supplier
2012-12-04 13:18:35 +02:00
Reference < : : com : : sun : : star : : util : : XNumberFormatsSupplier > xSupplier ( : : dbtools : : getNumberFormats ( : : dbtools : : getConnection ( m_xRowSet ) , sal_True , comphelper : : getComponentContext ( getORB ( ) ) ) ) ;
2000-10-26 13:46:14 +00:00
2000-11-03 13:46:21 +00:00
if ( xSupplier . is ( ) )
{
// create a new formatter
2012-08-29 09:32:55 +02:00
m_xFormatter = Reference < util : : XNumberFormatter > (
2012-09-19 13:15:15 +02:00
util : : NumberFormatter : : create ( comphelper : : getComponentContext ( getORB ( ) ) ) , UNO_QUERY_THROW ) ;
2012-08-29 09:32:55 +02:00
m_xFormatter - > attachNumberFormatsSupplier ( xSupplier ) ;
2000-11-03 13:46:21 +00:00
}
else // clear the formatter
m_xFormatter = NULL ;
}
2001-01-09 14:52:33 +00:00
// -----------------------------------------------------------------------------
2004-11-16 13:30:31 +00:00
void SbaXDataBrowserController : : describeSupportedFeatures ( )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::describeSupportedFeatures " ) ;
2008-03-06 17:13:16 +00:00
SbaXDataBrowserController_Base : : describeSupportedFeatures ( ) ;
2004-11-16 13:30:31 +00:00
implDescribeSupportedFeature ( " .uno:FormSlots/undoRecord " , ID_BROWSER_UNDORECORD , CommandGroup : : CONTROLS ) ;
implDescribeSupportedFeature ( " .uno:FormController/undoRecord " , ID_BROWSER_UNDORECORD , CommandGroup : : CONTROLS ) ;
implDescribeSupportedFeature ( " .uno:RecUndo " , ID_BROWSER_UNDORECORD , CommandGroup : : CONTROLS ) ;
implDescribeSupportedFeature ( " .uno:FormSlots/saveRecord " , ID_BROWSER_SAVERECORD , CommandGroup : : CONTROLS ) ;
implDescribeSupportedFeature ( " .uno:FormController/saveRecord " , ID_BROWSER_SAVERECORD , CommandGroup : : CONTROLS ) ;
implDescribeSupportedFeature ( " .uno:RecSave " , ID_BROWSER_SAVERECORD , CommandGroup : : CONTROLS ) ;
2008-01-30 07:42:45 +00:00
implDescribeSupportedFeature ( " .uno:Save " , ID_BROWSER_SAVERECORD , CommandGroup : : DOCUMENT ) ;
2004-11-16 13:30:31 +00:00
implDescribeSupportedFeature ( " .uno:RecSearch " , SID_FM_SEARCH , CommandGroup : : CONTROLS ) ;
implDescribeSupportedFeature ( " .uno:AutoFilter " , SID_FM_AUTOFILTER , CommandGroup : : CONTROLS ) ;
implDescribeSupportedFeature ( " .uno:Refresh " , SID_FM_REFRESH , CommandGroup : : CONTROLS ) ;
implDescribeSupportedFeature ( " .uno:OrderCrit " , SID_FM_ORDERCRIT , CommandGroup : : CONTROLS ) ;
implDescribeSupportedFeature ( " .uno:RemoveFilterSort " , SID_FM_REMOVE_FILTER_SORT , CommandGroup : : CONTROLS ) ;
implDescribeSupportedFeature ( " .uno:FormFiltered " , SID_FM_FORM_FILTERED , CommandGroup : : CONTROLS ) ;
implDescribeSupportedFeature ( " .uno:FilterCrit " , SID_FM_FILTERCRIT , CommandGroup : : CONTROLS ) ;
implDescribeSupportedFeature ( " .uno:Sortup " , ID_BROWSER_SORTUP , CommandGroup : : CONTROLS ) ;
implDescribeSupportedFeature ( " .uno:SortDown " , ID_BROWSER_SORTDOWN , CommandGroup : : CONTROLS ) ;
2008-03-06 17:13:16 +00:00
implDescribeSupportedFeature ( " .uno:FormSlots/deleteRecord " , SID_FM_DELETEROWS , CommandGroup : : EDIT ) ;
implDescribeSupportedFeature ( " .uno:FormSlots/insertRecord " , ID_BROWSER_INSERT_ROW , CommandGroup : : INSERT ) ;
2001-01-09 14:52:33 +00:00
}
2000-10-26 13:46:14 +00:00
//------------------------------------------------------------------------------
sal_Bool SbaXDataBrowserController : : Construct ( Window * pParent )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::Construct " ) ;
2000-10-26 13:46:14 +00:00
// ---------------------------------------------
// create/initialize the form and the grid model
m_xRowSet = CreateForm ( ) ;
if ( ! m_xRowSet . is ( ) )
return sal_False ;
2004-08-02 14:31:55 +00:00
m_xColumnsSupplier . set ( m_xRowSet , UNO_QUERY ) ;
m_xLoadable . set ( m_xRowSet , UNO_QUERY ) ;
2001-08-27 05:57:24 +00:00
2010-09-30 09:27:40 +02:00
Reference < XPropertySet > xFormProperties ( m_xRowSet , UNO_QUERY ) ;
if ( ! InitializeForm ( xFormProperties ) )
2000-10-26 13:46:14 +00:00
return sal_False ;
m_xGridModel = CreateGridModel ( ) ;
if ( ! m_xGridModel . is ( ) )
return sal_False ;
2000-11-03 13:46:21 +00:00
// set the formatter if available
initFormatter ( ) ;
2000-10-26 13:46:14 +00:00
// ---------------------------------------------------------------
// we want to have a grid with a "flat" border
Reference < XPropertySet > xGridSet ( m_xGridModel , UNO_QUERY ) ;
2004-08-02 14:31:55 +00:00
if ( xGridSet . is ( ) )
2000-10-26 13:46:14 +00:00
xGridSet - > setPropertyValue ( PROPERTY_BORDER , makeAny ( ( sal_Int16 ) 2 ) ) ;
// ----------
// marry them
Reference < : : com : : sun : : star : : container : : XNameContainer > xNameCont ( m_xRowSet , UNO_QUERY ) ;
2002-04-23 06:23:16 +00:00
{
String sText ( ModuleRes ( STR_DATASOURCE_GRIDCONTROL_NAME ) ) ;
xNameCont - > insertByName ( : : rtl : : OUString ( sText ) , makeAny ( m_xGridModel ) ) ;
}
2000-10-26 13:46:14 +00:00
// ---------------
// create the view
2012-12-14 12:58:00 +02:00
setView ( * new UnoDataBrowserView ( pParent , * this , comphelper : : getComponentContext ( getORB ( ) ) ) ) ;
2001-01-09 14:52:33 +00:00
if ( ! getBrowserView ( ) )
2000-10-26 13:46:14 +00:00
return sal_False ;
// late construction
sal_Bool bSuccess = sal_False ;
try
{
2001-01-09 14:52:33 +00:00
getBrowserView ( ) - > Construct ( getControlModel ( ) ) ;
2000-10-26 13:46:14 +00:00
bSuccess = sal_True ;
}
catch ( SQLException & )
{
}
2001-01-09 14:52:33 +00:00
catch ( Exception & )
2000-10-26 13:46:14 +00:00
{
2011-02-25 17:47:41 +01:00
OSL_FAIL ( " SbaXDataBrowserController::Construct : the construction of UnoDataBrowserView failed ! " ) ;
2000-10-26 13:46:14 +00:00
}
if ( ! bSuccess )
{
2004-08-02 14:31:55 +00:00
// deleteView();
2000-10-26 13:46:14 +00:00
return sal_False ;
}
2002-05-23 11:25:52 +00:00
// now that we have a view we can create the clipboard listener
m_aSystemClipboard = TransferableDataHelper : : CreateFromSystemClipboard ( getView ( ) ) ;
m_aSystemClipboard . StartClipboardListening ( ) ;
m_pClipbordNotifier = new TransferableClipboardListener ( LINK ( this , SbaXDataBrowserController , OnClipboardChanged ) ) ;
m_pClipbordNotifier - > acquire ( ) ;
m_pClipbordNotifier - > AddRemoveListener ( getView ( ) , sal_True ) ;
2001-01-09 14:52:33 +00:00
// this call create the toolbox
2008-03-06 17:13:16 +00:00
SbaXDataBrowserController_Base : : Construct ( pParent ) ;
2000-10-26 13:46:14 +00:00
2001-01-09 14:52:33 +00:00
getBrowserView ( ) - > Show ( ) ;
2000-10-26 13:46:14 +00:00
// set the callbacks for the grid control
2001-01-09 14:52:33 +00:00
SbaGridControl * pVclGrid = getBrowserView ( ) - > getVclControl ( ) ;
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( pVclGrid , " SbaXDataBrowserController::Construct : have no VCL control ! " ) ;
2000-10-26 13:46:14 +00:00
pVclGrid - > SetMasterListener ( this ) ;
// --------------------------
// add listeners ...
// ... to the form model
Reference < XPropertySet > xFormSet ( getRowSet ( ) , UNO_QUERY ) ;
if ( xFormSet . is ( ) )
{
2001-06-21 16:52:32 +00:00
xFormSet - > addPropertyChangeListener ( PROPERTY_ISNEW , static_cast < XPropertyChangeListener * > ( this ) ) ;
xFormSet - > addPropertyChangeListener ( PROPERTY_ISMODIFIED , static_cast < XPropertyChangeListener * > ( this ) ) ;
xFormSet - > addPropertyChangeListener ( PROPERTY_ROWCOUNT , static_cast < XPropertyChangeListener * > ( this ) ) ;
xFormSet - > addPropertyChangeListener ( PROPERTY_ACTIVECOMMAND , static_cast < XPropertyChangeListener * > ( this ) ) ;
xFormSet - > addPropertyChangeListener ( PROPERTY_ORDER , static_cast < XPropertyChangeListener * > ( this ) ) ;
xFormSet - > addPropertyChangeListener ( PROPERTY_FILTER , static_cast < XPropertyChangeListener * > ( this ) ) ;
2004-10-22 08:04:30 +00:00
xFormSet - > addPropertyChangeListener ( PROPERTY_HAVING_CLAUSE , static_cast < XPropertyChangeListener * > ( this ) ) ;
2001-06-21 16:52:32 +00:00
xFormSet - > addPropertyChangeListener ( PROPERTY_APPLYFILTER , static_cast < XPropertyChangeListener * > ( this ) ) ;
2000-10-26 13:46:14 +00:00
}
Reference < : : com : : sun : : star : : sdb : : XSQLErrorBroadcaster > xFormError ( getRowSet ( ) , UNO_QUERY ) ;
if ( xFormError . is ( ) )
xFormError - > addSQLErrorListener ( ( : : com : : sun : : star : : sdb : : XSQLErrorListener * ) this ) ;
2001-08-27 05:57:24 +00:00
if ( m_xLoadable . is ( ) )
m_xLoadable - > addLoadListener ( this ) ;
2000-10-26 13:46:14 +00:00
Reference < : : com : : sun : : star : : form : : XDatabaseParameterBroadcaster > xFormParameter ( getRowSet ( ) , UNO_QUERY ) ;
if ( xFormParameter . is ( ) )
xFormParameter - > addParameterListener ( ( : : com : : sun : : star : : form : : XDatabaseParameterListener * ) this ) ;
addModelListeners ( getControlModel ( ) ) ;
2001-01-09 14:52:33 +00:00
addControlListeners ( getBrowserView ( ) - > getGridControl ( ) ) ;
2000-10-26 13:46:14 +00:00
// -------------
// load the form
return LoadForm ( ) ;
}
//------------------------------------------------------------------------------
sal_Bool SbaXDataBrowserController : : LoadForm ( )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::LoadForm " ) ;
2001-08-27 05:57:24 +00:00
reloadForm ( m_xLoadable ) ;
2000-10-26 13:46:14 +00:00
return sal_True ;
}
//------------------------------------------------------------------------------
2006-06-20 01:55:50 +00:00
void SbaXDataBrowserController : : AddColumnListener ( const Reference < XPropertySet > & /*xCol*/ )
2000-10-26 13:46:14 +00:00
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::AddColumnListener " ) ;
2000-10-26 13:46:14 +00:00
// we're not interested in any column properties ...
}
//------------------------------------------------------------------------------
2006-06-20 01:55:50 +00:00
void SbaXDataBrowserController : : RemoveColumnListener ( const Reference < XPropertySet > & /*xCol*/ )
2000-10-26 13:46:14 +00:00
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::RemoveColumnListener " ) ;
2000-10-26 13:46:14 +00:00
}
//------------------------------------------------------------------------------
Reference < XRowSet > SbaXDataBrowserController : : CreateForm ( )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::CreateForm " ) ;
2010-11-11 17:20:24 -03:00
return Reference < XRowSet > ( getORB ( ) - > createInstance ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " com.sun.star.form.component.Form " ) ) ) , UNO_QUERY ) ;
2000-10-26 13:46:14 +00:00
}
//------------------------------------------------------------------------------
Reference < : : com : : sun : : star : : form : : XFormComponent > SbaXDataBrowserController : : CreateGridModel ( )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::CreateGridModel " ) ;
2010-11-11 17:20:24 -03:00
return Reference < : : com : : sun : : star : : form : : XFormComponent > ( getORB ( ) - > createInstance ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " com.sun.star.form.component.GridControl " ) ) ) , UNO_QUERY ) ;
2000-10-26 13:46:14 +00:00
}
// -------------------------------------------------------------------------
void SbaXDataBrowserController : : addModelListeners ( const Reference < : : com : : sun : : star : : awt : : XControlModel > & _xGridControlModel )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::addModelListeners " ) ;
2000-10-26 13:46:14 +00:00
// ... all the grid columns
2005-09-23 11:19:18 +00:00
addColumnListeners ( _xGridControlModel ) ;
2000-10-26 13:46:14 +00:00
// (we are interested in all columns the grid has (and only in these) so we have to listen to the container, too)
Reference < : : com : : sun : : star : : container : : XContainer > xColContainer ( _xGridControlModel , UNO_QUERY ) ;
if ( xColContainer . is ( ) )
xColContainer - > addContainerListener ( ( : : com : : sun : : star : : container : : XContainerListener * ) this ) ;
Reference < : : com : : sun : : star : : form : : XReset > xReset ( _xGridControlModel , UNO_QUERY ) ;
if ( xReset . is ( ) )
xReset - > addResetListener ( ( : : com : : sun : : star : : form : : XResetListener * ) this ) ;
}
// -------------------------------------------------------------------------
2006-06-20 01:55:50 +00:00
void SbaXDataBrowserController : : removeModelListeners ( const Reference < XControlModel > & _xGridControlModel )
2000-10-26 13:46:14 +00:00
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::removeModelListeners " ) ;
2000-10-26 13:46:14 +00:00
// every single column model
2006-06-20 01:55:50 +00:00
Reference < XIndexContainer > xColumns ( _xGridControlModel , UNO_QUERY ) ;
2000-10-26 13:46:14 +00:00
if ( xColumns . is ( ) )
{
2004-08-02 14:31:55 +00:00
sal_Int32 nCount = xColumns - > getCount ( ) ;
for ( sal_uInt16 i = 0 ; i < nCount ; + + i )
2000-10-26 13:46:14 +00:00
{
2004-08-02 14:31:55 +00:00
Reference < XPropertySet > xCol ( xColumns - > getByIndex ( i ) , UNO_QUERY ) ;
2000-10-26 13:46:14 +00:00
RemoveColumnListener ( xCol ) ;
}
}
2006-06-20 01:55:50 +00:00
Reference < XContainer > xColContainer ( _xGridControlModel , UNO_QUERY ) ;
2000-10-26 13:46:14 +00:00
if ( xColContainer . is ( ) )
2006-06-20 01:55:50 +00:00
xColContainer - > removeContainerListener ( this ) ;
2000-10-26 13:46:14 +00:00
2006-06-20 01:55:50 +00:00
Reference < XReset > xReset ( _xGridControlModel , UNO_QUERY ) ;
2000-10-26 13:46:14 +00:00
if ( xReset . is ( ) )
2006-06-20 01:55:50 +00:00
xReset - > removeResetListener ( this ) ;
2000-10-26 13:46:14 +00:00
}
// -------------------------------------------------------------------------
void SbaXDataBrowserController : : addControlListeners ( const Reference < : : com : : sun : : star : : awt : : XControl > & _xGridControl )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::addControlListeners " ) ;
2000-10-26 13:46:14 +00:00
// to ge the 'modified' for the current cell
2001-05-16 13:27:19 +00:00
Reference < XModifyBroadcaster > xBroadcaster ( getBrowserView ( ) - > getGridControl ( ) , UNO_QUERY ) ;
2000-10-26 13:46:14 +00:00
if ( xBroadcaster . is ( ) )
2001-06-21 16:52:32 +00:00
xBroadcaster - > addModifyListener ( static_cast < XModifyListener * > ( this ) ) ;
2000-10-26 13:46:14 +00:00
// introduce ourself as dispatch provider for the grid
2001-05-16 13:27:19 +00:00
Reference < XDispatchProviderInterception > xInterception ( getBrowserView ( ) - > getGridControl ( ) , UNO_QUERY ) ;
2000-10-26 13:46:14 +00:00
if ( xInterception . is ( ) )
2001-06-21 16:52:32 +00:00
xInterception - > registerDispatchProviderInterceptor ( static_cast < XDispatchProviderInterceptor * > ( this ) ) ;
2001-05-16 13:27:19 +00:00
// add as focus listener to the control (needed for the form controller functionality)
Reference < XWindow > xWindow ( _xGridControl , UNO_QUERY ) ;
if ( xWindow . is ( ) )
xWindow - > addFocusListener ( this ) ;
2000-10-26 13:46:14 +00:00
}
// -------------------------------------------------------------------------
void SbaXDataBrowserController : : removeControlListeners ( const Reference < : : com : : sun : : star : : awt : : XControl > & _xGridControl )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::removeControlListeners " ) ;
2001-05-16 13:27:19 +00:00
Reference < XModifyBroadcaster > xBroadcaster ( _xGridControl , UNO_QUERY ) ;
2000-10-26 13:46:14 +00:00
if ( xBroadcaster . is ( ) )
2001-06-21 16:52:32 +00:00
xBroadcaster - > removeModifyListener ( static_cast < XModifyListener * > ( this ) ) ;
2000-10-26 13:46:14 +00:00
2001-05-16 13:27:19 +00:00
Reference < XDispatchProviderInterception > xInterception ( _xGridControl , UNO_QUERY ) ;
2000-10-26 13:46:14 +00:00
if ( xInterception . is ( ) )
2001-06-21 16:52:32 +00:00
xInterception - > releaseDispatchProviderInterceptor ( static_cast < XDispatchProviderInterceptor * > ( this ) ) ;
2001-05-16 13:27:19 +00:00
Reference < XWindow > xWindow ( _xGridControl , UNO_QUERY ) ;
if ( xWindow . is ( ) )
xWindow - > removeFocusListener ( this ) ;
}
//------------------------------------------------------------------
2006-06-20 01:55:50 +00:00
void SAL_CALL SbaXDataBrowserController : : focusGained ( const FocusEvent & /*e*/ ) throw ( RuntimeException )
2001-05-16 13:27:19 +00:00
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::focusGained " ) ;
2001-05-16 13:27:19 +00:00
// notify our activate listeners (registered on the form controller aggregate)
EventObject aEvt ( * this ) ;
: : cppu : : OInterfaceIteratorHelper aIter ( m_pFormControllerImpl - > m_aActivateListeners ) ;
while ( aIter . hasMoreElements ( ) )
2001-06-21 16:52:32 +00:00
static_cast < XFormControllerListener * > ( aIter . next ( ) ) - > formActivated ( aEvt ) ;
2001-05-16 13:27:19 +00:00
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController : : focusLost ( const FocusEvent & e ) throw ( RuntimeException )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::focusLost " ) ;
2001-05-16 13:27:19 +00:00
// some general checks
if ( ! getBrowserView ( ) | | ! getBrowserView ( ) - > getGridControl ( ) . is ( ) )
return ;
Reference < XVclWindowPeer > xMyGridPeer ( getBrowserView ( ) - > getGridControl ( ) - > getPeer ( ) , UNO_QUERY ) ;
if ( ! xMyGridPeer . is ( ) )
return ;
Reference < XWindowPeer > xNextControlPeer ( e . NextFocus , UNO_QUERY ) ;
if ( ! xNextControlPeer . is ( ) )
return ;
// don't do a notification if it remains in the family (i.e. a child of the grid control gets the focus)
if ( xMyGridPeer - > isChild ( xNextControlPeer ) )
return ;
if ( xMyGridPeer = = xNextControlPeer )
return ;
// notify the listeners that the "form" we represent has been deactivated
EventObject aEvt ( * this ) ;
: : cppu : : OInterfaceIteratorHelper aIter ( m_pFormControllerImpl - > m_aActivateListeners ) ;
while ( aIter . hasMoreElements ( ) )
2001-06-21 16:52:32 +00:00
static_cast < XFormControllerListener * > ( aIter . next ( ) ) - > formDeactivated ( aEvt ) ;
2001-05-16 13:27:19 +00:00
// commit the changes of the grid control (as we're deactivated)
Reference < XBoundComponent > xCommitable ( getBrowserView ( ) - > getGridControl ( ) , UNO_QUERY ) ;
if ( xCommitable . is ( ) )
xCommitable - > commit ( ) ;
else
2011-03-19 14:05:01 +01:00
OSL_FAIL ( " SbaXDataBrowserController::focusLost : why is my control not commitable ? " ) ;
2000-10-26 13:46:14 +00:00
}
// -------------------------------------------------------------------------
2006-06-20 01:55:50 +00:00
void SbaXDataBrowserController : : disposingGridControl ( const : : com : : sun : : star : : lang : : EventObject & /*Source*/ )
2000-10-26 13:46:14 +00:00
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::disposingGridControl " ) ;
2001-01-09 14:52:33 +00:00
removeControlListeners ( getBrowserView ( ) - > getGridControl ( ) ) ;
2000-10-26 13:46:14 +00:00
}
// -------------------------------------------------------------------------
2006-06-20 01:55:50 +00:00
void SbaXDataBrowserController : : disposingGridModel ( const : : com : : sun : : star : : lang : : EventObject & /*Source*/ )
2000-10-26 13:46:14 +00:00
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::disposingGridModel " ) ;
2000-10-26 13:46:14 +00:00
removeModelListeners ( getControlModel ( ) ) ;
}
// -------------------------------------------------------------------------
void SbaXDataBrowserController : : disposingFormModel ( const : : com : : sun : : star : : lang : : EventObject & Source )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::disposingFormModel " ) ;
2000-10-26 13:46:14 +00:00
Reference < XPropertySet > xSourceSet ( Source . Source , UNO_QUERY ) ;
if ( xSourceSet . is ( ) )
{
2001-06-21 16:52:32 +00:00
xSourceSet - > removePropertyChangeListener ( PROPERTY_ISNEW , static_cast < XPropertyChangeListener * > ( this ) ) ;
xSourceSet - > removePropertyChangeListener ( PROPERTY_ISMODIFIED , static_cast < XPropertyChangeListener * > ( this ) ) ;
xSourceSet - > removePropertyChangeListener ( PROPERTY_ROWCOUNT , static_cast < XPropertyChangeListener * > ( this ) ) ;
xSourceSet - > removePropertyChangeListener ( PROPERTY_ACTIVECOMMAND , static_cast < XPropertyChangeListener * > ( this ) ) ;
xSourceSet - > removePropertyChangeListener ( PROPERTY_ORDER , static_cast < XPropertyChangeListener * > ( this ) ) ;
xSourceSet - > removePropertyChangeListener ( PROPERTY_FILTER , static_cast < XPropertyChangeListener * > ( this ) ) ;
2004-10-22 08:04:30 +00:00
xSourceSet - > removePropertyChangeListener ( PROPERTY_HAVING_CLAUSE , static_cast < XPropertyChangeListener * > ( this ) ) ;
2001-06-21 16:52:32 +00:00
xSourceSet - > removePropertyChangeListener ( PROPERTY_APPLYFILTER , static_cast < XPropertyChangeListener * > ( this ) ) ;
2000-10-26 13:46:14 +00:00
}
Reference < : : com : : sun : : star : : sdb : : XSQLErrorBroadcaster > xFormError ( Source . Source , UNO_QUERY ) ;
if ( xFormError . is ( ) )
xFormError - > removeSQLErrorListener ( ( : : com : : sun : : star : : sdb : : XSQLErrorListener * ) this ) ;
2001-08-27 05:57:24 +00:00
if ( m_xLoadable . is ( ) )
m_xLoadable - > removeLoadListener ( this ) ;
2000-10-26 13:46:14 +00:00
Reference < : : com : : sun : : star : : form : : XDatabaseParameterBroadcaster > xFormParameter ( Source . Source , UNO_QUERY ) ;
if ( xFormParameter . is ( ) )
xFormParameter - > removeParameterListener ( ( : : com : : sun : : star : : form : : XDatabaseParameterListener * ) this ) ;
}
// -------------------------------------------------------------------------
void SbaXDataBrowserController : : disposingColumnModel ( const : : com : : sun : : star : : lang : : EventObject & Source )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::disposingColumnModel " ) ;
2000-10-26 13:46:14 +00:00
RemoveColumnListener ( Reference < XPropertySet > ( Source . Source , UNO_QUERY ) ) ;
}
// -------------------------------------------------------------------------
2001-05-16 13:27:19 +00:00
void SbaXDataBrowserController : : disposing ( const EventObject & Source ) throw ( RuntimeException )
2000-10-26 13:46:14 +00:00
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::disposing " ) ;
2001-05-16 13:27:19 +00:00
// if it's a component other than our aggregate, forward it to the aggregate
2008-03-06 17:13:16 +00:00
if ( m_xFormControllerImpl ! = Source . Source )
2001-05-16 13:27:19 +00:00
{
2008-03-06 17:13:16 +00:00
Reference < XEventListener > xAggListener ;
m_xFormControllerImpl - > queryAggregation ( : : getCppuType ( & xAggListener ) ) > > = xAggListener ;
if ( xAggListener . is ( ) )
xAggListener - > disposing ( Source ) ;
2001-05-16 13:27:19 +00:00
}
2000-10-26 13:46:14 +00:00
// is it the grid control ?
2001-01-09 14:52:33 +00:00
if ( getBrowserView ( ) )
2000-10-26 13:46:14 +00:00
{
Reference < : : com : : sun : : star : : awt : : XControl > xSourceControl ( Source . Source , UNO_QUERY ) ;
2001-01-09 14:52:33 +00:00
if ( xSourceControl = = getBrowserView ( ) - > getGridControl ( ) )
2000-10-26 13:46:14 +00:00
disposingGridControl ( Source ) ;
}
// it's model (the container of the columns) ?
if ( getControlModel ( ) = = Source . Source )
disposingGridModel ( Source ) ;
// the form's model ?
if ( ( getRowSet ( ) = = Source . Source ) )
disposingFormModel ( Source ) ;
// from a single column model ?
Reference < XPropertySet > xSourceSet ( Source . Source , UNO_QUERY ) ;
if ( xSourceSet . is ( ) )
{
Reference < XPropertySetInfo > xInfo = xSourceSet - > getPropertySetInfo ( ) ;
// we assume that columns have a Width property and all other sets we are listening to don't have
if ( xInfo - > hasPropertyByName ( PROPERTY_WIDTH ) )
disposingColumnModel ( Source ) ;
}
2008-03-06 17:13:16 +00:00
SbaXDataBrowserController_Base : : OGenericUnoController : : disposing ( Source ) ;
2000-10-26 13:46:14 +00:00
}
2008-03-05 15:52:29 +00:00
// -----------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController : : setIdentifier ( const : : rtl : : OUString & _Identifier ) throw ( RuntimeException )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::setIdentifier " ) ;
2008-12-01 12:31:27 +00:00
: : osl : : MutexGuard aGuard ( getMutex ( ) ) ;
2008-03-05 15:52:29 +00:00
m_sModuleIdentifier = _Identifier ;
}
// -----------------------------------------------------------------------
: : rtl : : OUString SAL_CALL SbaXDataBrowserController : : getIdentifier ( ) throw ( RuntimeException )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::getIdentifier " ) ;
2008-12-01 12:31:27 +00:00
: : osl : : MutexGuard aGuard ( getMutex ( ) ) ;
2008-03-05 15:52:29 +00:00
return m_sModuleIdentifier ;
}
2000-10-26 13:46:14 +00:00
// -----------------------------------------------------------------------
2001-06-22 09:24:09 +00:00
void SbaXDataBrowserController : : propertyChange ( const PropertyChangeEvent & evt ) throw ( RuntimeException )
2000-10-26 13:46:14 +00:00
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::propertyChange " ) ;
2000-10-26 13:46:14 +00:00
Reference < XPropertySet > xSource ( evt . Source , UNO_QUERY ) ;
if ( ! xSource . is ( ) )
return ;
2010-10-13 01:38:41 -05:00
SolarMutexGuard aGuard ;
2000-10-26 13:46:14 +00:00
// the IsModified changed to sal_False ?
if ( ( evt . PropertyName . equals ( PROPERTY_ISMODIFIED ) )
& & ( : : comphelper : : getBOOL ( evt . NewValue ) = = sal_False )
)
{ // -> the current field isn't modified anymore, too
2001-10-29 14:14:28 +00:00
setCurrentModified ( sal_False ) ;
2000-10-26 13:46:14 +00:00
}
// switching to a new record ?
if ( ( evt . PropertyName . equals ( PROPERTY_ISNEW ) )
& & ( : : comphelper : : getBOOL ( evt . NewValue ) = = sal_True )
)
{
if ( : : comphelper : : getINT32 ( xSource - > getPropertyValue ( PROPERTY_ROWCOUNT ) ) = = 0 )
// if we're switching to a new record and didn't have any records before we need to invalidate
// all slots (as the cursor was invalid before the mode change and so the slots were disabled)
InvalidateAll ( ) ;
}
2009-04-23 10:42:05 +00:00
2010-09-29 12:51:19 +02:00
if ( evt . PropertyName . equals ( PROPERTY_FILTER ) )
2000-10-26 13:46:14 +00:00
{
2009-04-23 10:42:05 +00:00
InvalidateFeature ( ID_BROWSER_REMOVEFILTER ) ;
}
else if ( evt . PropertyName . equals ( PROPERTY_HAVING_CLAUSE ) )
{
InvalidateFeature ( ID_BROWSER_REMOVEFILTER ) ;
}
else if ( evt . PropertyName . equals ( PROPERTY_ORDER ) )
{
InvalidateFeature ( ID_BROWSER_REMOVEFILTER ) ;
2000-10-26 13:46:14 +00:00
}
// a new record count ? -> may be our search availability has changed
if ( evt . PropertyName . equals ( PROPERTY_ROWCOUNT ) )
2001-08-10 07:21:12 +00:00
{
2006-11-21 16:16:14 +00:00
sal_Int32 nNewValue = 0 , nOldValue = 0 ;
2001-08-10 07:21:12 +00:00
evt . NewValue > > = nNewValue ;
evt . OldValue > > = nOldValue ;
if ( ( nOldValue = = 0 & & nNewValue ! = 0 ) | | ( nOldValue ! = 0 & & nNewValue = = 0 ) )
InvalidateAll ( ) ;
}
2000-10-26 13:46:14 +00:00
}
//------------------------------------------------------------------------
2006-06-20 01:55:50 +00:00
void SbaXDataBrowserController : : modified ( const : : com : : sun : : star : : lang : : EventObject & /*aEvent*/ ) throw ( RuntimeException )
2000-10-26 13:46:14 +00:00
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::modified " ) ;
2001-10-29 14:14:28 +00:00
setCurrentModified ( sal_True ) ;
2000-10-26 13:46:14 +00:00
}
// -----------------------------------------------------------------------
void SbaXDataBrowserController : : elementInserted ( const : : com : : sun : : star : : container : : ContainerEvent & evt ) throw ( RuntimeException )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::elementInserted " ) ;
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( Reference < XInterface > ( evt . Source , UNO_QUERY ) . get ( ) = = Reference < XInterface > ( getControlModel ( ) , UNO_QUERY ) . get ( ) ,
2000-12-10 15:11:02 +00:00
" SbaXDataBrowserController::elementInserted: where did this come from (not from the grid model)?! " ) ;
2004-08-02 14:31:55 +00:00
Reference < XPropertySet > xNewColumn ( evt . Element , UNO_QUERY ) ;
if ( xNewColumn . is ( ) )
AddColumnListener ( xNewColumn ) ;
2000-10-26 13:46:14 +00:00
}
// -----------------------------------------------------------------------
void SbaXDataBrowserController : : elementRemoved ( const : : com : : sun : : star : : container : : ContainerEvent & evt ) throw ( RuntimeException )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::elementRemoved " ) ;
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( Reference < XInterface > ( evt . Source , UNO_QUERY ) . get ( ) = = Reference < XInterface > ( getControlModel ( ) , UNO_QUERY ) . get ( ) ,
2000-12-10 15:11:02 +00:00
" SbaXDataBrowserController::elementRemoved: where did this come from (not from the grid model)?! " ) ;
2004-08-02 14:31:55 +00:00
Reference < XPropertySet > xOldColumn ( evt . Element , UNO_QUERY ) ;
if ( xOldColumn . is ( ) )
RemoveColumnListener ( xOldColumn ) ;
2000-10-26 13:46:14 +00:00
}
// -----------------------------------------------------------------------
void SbaXDataBrowserController : : elementReplaced ( const : : com : : sun : : star : : container : : ContainerEvent & evt ) throw ( RuntimeException )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::elementReplaced " ) ;
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( Reference < XInterface > ( evt . Source , UNO_QUERY ) . get ( ) = = Reference < XInterface > ( getControlModel ( ) , UNO_QUERY ) . get ( ) ,
2000-12-10 15:11:02 +00:00
" SbaXDataBrowserController::elementReplaced: where did this come from (not from the grid model)?! " ) ;
2004-08-02 14:31:55 +00:00
Reference < XPropertySet > xOldColumn ( evt . ReplacedElement , UNO_QUERY ) ;
if ( xOldColumn . is ( ) )
RemoveColumnListener ( xOldColumn ) ;
2000-10-26 13:46:14 +00:00
2004-08-02 14:31:55 +00:00
Reference < XPropertySet > xNewColumn ( evt . Element , UNO_QUERY ) ;
if ( xNewColumn . is ( ) )
AddColumnListener ( xNewColumn ) ;
2000-10-26 13:46:14 +00:00
}
// -----------------------------------------------------------------------
2006-06-20 01:55:50 +00:00
sal_Bool SbaXDataBrowserController : : suspend ( sal_Bool /*bSuspend*/ ) throw ( RuntimeException )
2000-10-26 13:46:14 +00:00
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::suspend " ) ;
2000-10-26 13:46:14 +00:00
m_aAsyncGetCellFocus . CancelCall ( ) ;
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
m_aAsyncDisplayError . CancelCall ( ) ;
2000-10-26 13:46:14 +00:00
m_aAsyncInvalidateAll . CancelCall ( ) ;
2002-01-24 16:43:35 +00:00
sal_Bool bSuccess = SaveModified ( ) ;
return bSuccess ;
2000-10-26 13:46:14 +00:00
}
// -----------------------------------------------------------------------
2001-03-01 14:17:55 +00:00
void SbaXDataBrowserController : : disposing ( )
2000-10-26 13:46:14 +00:00
{
2001-05-16 13:27:19 +00:00
// the base class
2008-03-06 17:13:16 +00:00
SbaXDataBrowserController_Base : : OGenericUnoController : : disposing ( ) ;
2000-10-26 13:46:14 +00:00
2009-11-23 14:28:55 +01:00
// the data source
Reference < XPropertySet > xFormSet ( getRowSet ( ) , UNO_QUERY ) ;
if ( xFormSet . is ( ) )
2000-10-26 13:46:14 +00:00
{
2009-11-23 14:28:55 +01:00
xFormSet - > removePropertyChangeListener ( PROPERTY_ISNEW , static_cast < XPropertyChangeListener * > ( this ) ) ;
xFormSet - > removePropertyChangeListener ( PROPERTY_ISMODIFIED , static_cast < XPropertyChangeListener * > ( this ) ) ;
xFormSet - > removePropertyChangeListener ( PROPERTY_ROWCOUNT , static_cast < XPropertyChangeListener * > ( this ) ) ;
xFormSet - > removePropertyChangeListener ( PROPERTY_ACTIVECOMMAND , static_cast < XPropertyChangeListener * > ( this ) ) ;
xFormSet - > removePropertyChangeListener ( PROPERTY_ORDER , static_cast < XPropertyChangeListener * > ( this ) ) ;
xFormSet - > removePropertyChangeListener ( PROPERTY_FILTER , static_cast < XPropertyChangeListener * > ( this ) ) ;
xFormSet - > removePropertyChangeListener ( PROPERTY_HAVING_CLAUSE , static_cast < XPropertyChangeListener * > ( this ) ) ;
xFormSet - > removePropertyChangeListener ( PROPERTY_APPLYFILTER , static_cast < XPropertyChangeListener * > ( this ) ) ;
}
2000-10-26 13:46:14 +00:00
2009-11-23 14:28:55 +01:00
Reference < : : com : : sun : : star : : sdb : : XSQLErrorBroadcaster > xFormError ( getRowSet ( ) , UNO_QUERY ) ;
if ( xFormError . is ( ) )
xFormError - > removeSQLErrorListener ( ( : : com : : sun : : star : : sdb : : XSQLErrorListener * ) this ) ;
2000-10-26 13:46:14 +00:00
2009-11-23 14:28:55 +01:00
if ( m_xLoadable . is ( ) )
m_xLoadable - > removeLoadListener ( this ) ;
2000-10-26 13:46:14 +00:00
2009-11-23 14:28:55 +01:00
Reference < : : com : : sun : : star : : form : : XDatabaseParameterBroadcaster > xFormParameter ( getRowSet ( ) , UNO_QUERY ) ;
if ( xFormParameter . is ( ) )
xFormParameter - > removeParameterListener ( ( : : com : : sun : : star : : form : : XDatabaseParameterListener * ) this ) ;
2000-10-26 13:46:14 +00:00
removeModelListeners ( getControlModel ( ) ) ;
2006-08-15 09:49:12 +00:00
if ( getView ( ) & & m_pClipbordNotifier )
2002-05-23 11:25:52 +00:00
{
2004-08-02 14:31:55 +00:00
m_pClipbordNotifier - > ClearCallbackLink ( ) ;
2002-05-23 11:25:52 +00:00
m_pClipbordNotifier - > AddRemoveListener ( getView ( ) , sal_False ) ;
m_pClipbordNotifier - > release ( ) ;
m_pClipbordNotifier = NULL ;
}
2001-01-09 14:52:33 +00:00
if ( getBrowserView ( ) )
2000-10-26 13:46:14 +00:00
{
2001-01-09 14:52:33 +00:00
removeControlListeners ( getBrowserView ( ) - > getGridControl ( ) ) ;
2000-10-26 13:46:14 +00:00
// don't delete explicitly, this is done by the owner (and user) of this controller (me hopes ...)
2010-02-09 17:26:40 +01:00
clearView ( ) ;
2000-10-26 13:46:14 +00:00
}
if ( m_aInvalidateClipboard . IsActive ( ) )
m_aInvalidateClipboard . Stop ( ) ;
2009-11-23 14:28:55 +01:00
// dispose the row set
try
2000-10-26 13:46:14 +00:00
{
2009-11-23 14:28:55 +01:00
: : comphelper : : disposeComponent ( m_xRowSet ) ;
2001-08-27 05:57:24 +00:00
2009-11-23 14:28:55 +01:00
m_xRowSet = NULL ;
m_xColumnsSupplier = NULL ;
m_xLoadable = NULL ;
}
catch ( Exception & )
{
2010-03-11 11:26:05 +01:00
DBG_UNHANDLED_EXCEPTION ( ) ;
2000-10-26 13:46:14 +00:00
}
2010-01-22 08:14:22 +01:00
m_xParser . clear ( ) ;
2010-04-16 13:55:24 +02:00
// don't dispose, just reset - it's owned by the RowSet
2000-10-26 13:46:14 +00:00
}
//------------------------------------------------------------------------------
void SbaXDataBrowserController : : frameAction ( const : : com : : sun : : star : : frame : : FrameActionEvent & aEvent ) throw ( RuntimeException )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::frameAction " ) ;
2008-12-01 12:31:27 +00:00
: : osl : : MutexGuard aGuard ( getMutex ( ) ) ;
2008-03-06 17:13:16 +00:00
SbaXDataBrowserController_Base : : frameAction ( aEvent ) ;
if ( aEvent . Source = = getFrame ( ) )
switch ( aEvent . Action )
2000-10-26 13:46:14 +00:00
{
2008-03-06 17:13:16 +00:00
case FrameAction_FRAME_ACTIVATED :
case FrameAction_FRAME_UI_ACTIVATED :
2000-10-26 13:46:14 +00:00
// ensure that the active cell (if any) has the focus
m_aAsyncGetCellFocus . Call ( ) ;
// start the clipboard timer
2001-01-09 14:52:33 +00:00
if ( getBrowserView ( ) & & getBrowserView ( ) - > getVclControl ( ) & & ! m_aInvalidateClipboard . IsActive ( ) )
2000-10-26 13:46:14 +00:00
{
m_aInvalidateClipboard . Start ( ) ;
2006-08-15 09:49:12 +00:00
OnInvalidateClipboard ( NULL ) ;
2000-10-26 13:46:14 +00:00
}
break ;
2008-03-06 17:13:16 +00:00
case FrameAction_FRAME_DEACTIVATING :
case FrameAction_FRAME_UI_DEACTIVATING :
2000-10-26 13:46:14 +00:00
// stop the clipboard invalidator
2001-01-09 14:52:33 +00:00
if ( getBrowserView ( ) & & getBrowserView ( ) - > getVclControl ( ) & & m_aInvalidateClipboard . IsActive ( ) )
2000-10-26 13:46:14 +00:00
{
m_aInvalidateClipboard . Stop ( ) ;
2006-08-15 09:49:12 +00:00
OnInvalidateClipboard ( NULL ) ;
2000-10-26 13:46:14 +00:00
}
// remove the "get cell focus"-event
m_aAsyncGetCellFocus . CancelCall ( ) ;
break ;
2006-06-20 01:55:50 +00:00
default :
break ;
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
//------------------------------------------------------------------------------
IMPL_LINK ( SbaXDataBrowserController , OnAsyncDisplayError , void * , /* _pNotInterestedIn */ )
{
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 ( m_aCurrentError . isValid ( ) )
{
OSQLMessageBox aDlg ( getBrowserView ( ) , m_aCurrentError ) ;
aDlg . Execute ( ) ;
}
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 0L ;
}
2000-10-26 13:46:14 +00:00
//------------------------------------------------------------------------------
void SbaXDataBrowserController : : errorOccured ( const : : com : : sun : : star : : sdb : : SQLErrorEvent & aEvent ) throw ( RuntimeException )
{
2010-12-04 12:33:49 +09:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::errorOccurred " ) ;
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
: : osl : : MutexGuard aGuard ( getMutex ( ) ) ;
SQLExceptionInfo aInfo ( aEvent . Reason ) ;
if ( ! aInfo . isValid ( ) )
return ;
if ( m_nFormActionNestingLevel )
2000-10-26 13:46:14 +00:00
{
2010-12-04 12:33:49 +09:00
OSL_ENSURE ( ! m_aCurrentError . isValid ( ) , " SbaXDataBrowserController::errorOccurred: can handle one error per transaction only! " ) ;
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
m_aCurrentError = aInfo ;
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
else
CWS-TOOLING: integrate CWS dba32j
2009-11-26 09:30:10 +0100 msc r277648 : #100000 fix urgent testscript error
2009-11-25 10:27:56 +0100 msc r277625 : #i100000 fix urgent testscript error
2009-11-17 22:16:46 +0100 fs r277544 : CWS-TOOLING: rebase CWS dba32j to branches/OOO320@277531 (milestone: OOO320:m5)
2009-11-17 14:26:47 +0100 fs r277535 : ooops, didn't mean to commit this uncommented line
2009-11-14 20:50:29 +0100 fs r277505 : add a --disable-pango switch to SM's configure options, and add a patch which makes certain code respect it (well, respect it better than currently, by not using some pango_x_* functions, which are not always available, even when pango itself is present)
2009-11-14 20:47:41 +0100 fs r277504 : spelling
2009-11-13 14:04:00 +0100 fs r277502 : #i100764# (commit approved by ab@openoffice.org): getModelFromBasic: do not start with the parent's parent when looking for ThisComponent, but walk up the anchestor chain, starting with the immediate parent
2009-11-13 11:04:15 +0100 fs r277496 : #i100764# better heuristics for determining whether or not to participate in the ThisComponent game
2009-11-13 11:02:30 +0100 fs r277495 : #i100764# set the WB_EXT_DOCUMENT style at the backing component's container window, when creating it without the TaskCreator (which would normally do this)
2009-11-11 13:49:11 +0100 fs r277452 : #i106816#
2009-11-11 13:48:53 +0100 fs r277451 : fix the CREATETARBAL target, which is expected to create the zips used as prebuilts. The *inc.zip missed the NSS files in case NSS was built externally
2009-11-11 12:15:34 +0100 fs r277449 : update ignore list
2009-11-11 12:09:23 +0100 fs r277448 : add a link to the Mozilla build tools download location
2009-11-11 12:07:16 +0100 fs r277447 : add a link to the Mozilla build tools download location
2009-11-06 16:23:12 +0100 fs r277393 : #i106643#
2009-11-03 23:20:29 +0100 fs r277328 : #i106574#
reverted the recent fix for issue #i105235#, and implemented a better one.
2009-11-02 12:59:48 +0100 fs r277294 : #i106550# errorOccured: also display the error when we're not in a nested form action - form actions are allowed to be triggered by other instances as well
2009-12-01 09:53:35 +00:00
{
m_aCurrentError = aInfo ;
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
m_aAsyncDisplayError . Call ( ) ;
CWS-TOOLING: integrate CWS dba32j
2009-11-26 09:30:10 +0100 msc r277648 : #100000 fix urgent testscript error
2009-11-25 10:27:56 +0100 msc r277625 : #i100000 fix urgent testscript error
2009-11-17 22:16:46 +0100 fs r277544 : CWS-TOOLING: rebase CWS dba32j to branches/OOO320@277531 (milestone: OOO320:m5)
2009-11-17 14:26:47 +0100 fs r277535 : ooops, didn't mean to commit this uncommented line
2009-11-14 20:50:29 +0100 fs r277505 : add a --disable-pango switch to SM's configure options, and add a patch which makes certain code respect it (well, respect it better than currently, by not using some pango_x_* functions, which are not always available, even when pango itself is present)
2009-11-14 20:47:41 +0100 fs r277504 : spelling
2009-11-13 14:04:00 +0100 fs r277502 : #i100764# (commit approved by ab@openoffice.org): getModelFromBasic: do not start with the parent's parent when looking for ThisComponent, but walk up the anchestor chain, starting with the immediate parent
2009-11-13 11:04:15 +0100 fs r277496 : #i100764# better heuristics for determining whether or not to participate in the ThisComponent game
2009-11-13 11:02:30 +0100 fs r277495 : #i100764# set the WB_EXT_DOCUMENT style at the backing component's container window, when creating it without the TaskCreator (which would normally do this)
2009-11-11 13:49:11 +0100 fs r277452 : #i106816#
2009-11-11 13:48:53 +0100 fs r277451 : fix the CREATETARBAL target, which is expected to create the zips used as prebuilts. The *inc.zip missed the NSS files in case NSS was built externally
2009-11-11 12:15:34 +0100 fs r277449 : update ignore list
2009-11-11 12:09:23 +0100 fs r277448 : add a link to the Mozilla build tools download location
2009-11-11 12:07:16 +0100 fs r277447 : add a link to the Mozilla build tools download location
2009-11-06 16:23:12 +0100 fs r277393 : #i106643#
2009-11-03 23:20:29 +0100 fs r277328 : #i106574#
reverted the recent fix for issue #i105235#, and implemented a better one.
2009-11-02 12:59:48 +0100 fs r277294 : #i106550# errorOccured: also display the error when we're not in a nested form action - form actions are allowed to be triggered by other instances as well
2009-12-01 09:53:35 +00:00
}
2000-10-26 13:46:14 +00:00
}
//------------------------------------------------------------------------------
sal_Bool SbaXDataBrowserController : : approveParameter ( const : : com : : sun : : star : : form : : DatabaseParameterEvent & aEvent ) throw ( RuntimeException )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::approveParameter " ) ;
2000-10-26 13:46:14 +00:00
if ( aEvent . Source ! = getRowSet ( ) )
{
// not my data source -> allow anything
2011-02-25 17:47:41 +01:00
OSL_FAIL ( " SbaXDataBrowserController::approveParameter : invalid event source ! " ) ;
2000-10-26 13:46:14 +00:00
return sal_True ;
}
Reference < : : com : : sun : : star : : container : : XIndexAccess > xParameters = aEvent . Parameters ;
2010-10-13 01:38:41 -05:00
SolarMutexGuard aSolarGuard ;
2000-10-26 13:46:14 +00:00
2000-10-31 09:00:53 +00:00
// default handling: instantiate an interaction handler and let it handle the parameter request
try
2000-10-26 13:46:14 +00:00
{
2000-10-31 09:00:53 +00:00
// two continuations allowed: OK and Cancel
OParameterContinuation * pParamValues = new OParameterContinuation ;
OInteractionAbort * pAbort = new OInteractionAbort ;
// the request
ParametersRequest aRequest ;
aRequest . Parameters = xParameters ;
aRequest . Connection = getConnection ( Reference < XRowSet > ( aEvent . Source , UNO_QUERY ) ) ;
OInteractionRequest * pParamRequest = new OInteractionRequest ( makeAny ( aRequest ) ) ;
Reference < XInteractionRequest > xParamRequest ( pParamRequest ) ;
// some knittings
pParamRequest - > addContinuation ( pParamValues ) ;
pParamRequest - > addContinuation ( pAbort ) ;
// create the handler, let it handle the request
2012-10-04 14:36:34 +02:00
Reference < XInteractionHandler2 > xHandler ( InteractionHandler : : createWithParent ( comphelper : : getComponentContext ( getORB ( ) ) , 0 ) ) ;
2012-10-02 15:03:12 +02:00
xHandler - > handle ( xParamRequest ) ;
2000-10-31 09:00:53 +00:00
if ( ! pParamValues - > wasSelected ( ) )
{ // canceled
2002-01-29 11:23:58 +00:00
setLoadingCancelled ( ) ;
2000-10-31 09:00:53 +00:00
return sal_False ;
}
// transfer the values into the parameter supplier
Sequence < PropertyValue > aFinalValues = pParamValues - > getValues ( ) ;
if ( aFinalValues . getLength ( ) ! = aRequest . Parameters - > getCount ( ) )
{
2011-02-25 17:47:41 +01:00
OSL_FAIL ( " SbaXDataBrowserController::approveParameter: the InteractionHandler returned nonsense! " ) ;
2002-01-29 11:23:58 +00:00
setLoadingCancelled ( ) ;
2000-10-31 09:00:53 +00:00
return sal_False ;
}
const PropertyValue * pFinalValues = aFinalValues . getConstArray ( ) ;
for ( sal_Int32 i = 0 ; i < aFinalValues . getLength ( ) ; + + i , + + pFinalValues )
{
Reference < XPropertySet > xParam ;
: : cppu : : extractInterface ( xParam , aRequest . Parameters - > getByIndex ( i ) ) ;
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( xParam . is ( ) , " SbaXDataBrowserController::approveParameter: one of the parameters is no property set! " ) ;
2000-10-31 09:00:53 +00:00
if ( xParam . is ( ) )
{
# ifdef DBG_UTIL
: : rtl : : OUString sName ;
xParam - > getPropertyValue ( PROPERTY_NAME ) > > = sName ;
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( sName . equals ( pFinalValues - > Name ) , " SbaXDataBrowserController::approveParameter: suspicious value names! " ) ;
2000-10-31 09:00:53 +00:00
# endif
try { xParam - > setPropertyValue ( PROPERTY_VALUE , pFinalValues - > Value ) ; }
catch ( Exception & )
{
2011-02-25 17:47:41 +01:00
OSL_FAIL ( " SbaXDataBrowserController::approveParameter: setting one of the properties failed! " ) ;
2000-10-31 09:00:53 +00:00
}
}
}
}
2008-05-05 14:52:38 +00:00
catch ( const Exception & )
2000-10-31 09:00:53 +00:00
{
2008-05-05 14:52:38 +00:00
DBG_UNHANDLED_EXCEPTION ( ) ;
2000-10-26 13:46:14 +00:00
}
return sal_True ;
}
//------------------------------------------------------------------------------
2006-06-20 01:55:50 +00:00
sal_Bool SbaXDataBrowserController : : approveReset ( const : : com : : sun : : star : : lang : : EventObject & /*rEvent*/ ) throw ( RuntimeException )
2000-10-26 13:46:14 +00:00
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::approveReset " ) ;
2000-10-26 13:46:14 +00:00
return sal_True ;
}
//------------------------------------------------------------------------------
void SbaXDataBrowserController : : resetted ( const : : com : : sun : : star : : lang : : EventObject & rEvent ) throw ( RuntimeException )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::resetted " ) ;
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( rEvent . Source = = getControlModel ( ) , " SbaXDataBrowserController::resetted : where did this come from ? " ) ;
2006-06-20 01:55:50 +00:00
( void ) rEvent ;
2001-10-29 14:14:28 +00:00
setCurrentModified ( sal_False ) ;
2000-10-26 13:46:14 +00:00
}
//------------------------------------------------------------------------------
2006-06-20 01:55:50 +00:00
sal_Bool SbaXDataBrowserController : : confirmDelete ( const : : com : : sun : : star : : sdb : : RowChangeEvent & /*aEvent*/ ) throw ( RuntimeException )
2000-10-26 13:46:14 +00:00
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::confirmDelete " ) ;
2001-01-09 14:52:33 +00:00
if ( QueryBox ( getBrowserView ( ) , ModuleRes ( QUERY_BRW_DELETE_ROWS ) ) . Execute ( ) ! = RET_YES )
2000-10-26 13:46:14 +00:00
return sal_False ;
return sal_True ;
}
//------------------------------------------------------------------------------
2002-01-24 16:43:35 +00:00
FeatureState SbaXDataBrowserController : : GetState ( sal_uInt16 nId ) const
2000-10-26 13:46:14 +00:00
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::GetState " ) ;
2000-10-26 13:46:14 +00:00
FeatureState aReturn ;
// (disabled automatically)
try
{
// no chance without a view
2001-01-09 14:52:33 +00:00
if ( ! getBrowserView ( ) | | ! getBrowserView ( ) - > getVclControl ( ) )
2000-10-26 13:46:14 +00:00
return aReturn ;
2005-09-23 11:19:18 +00:00
switch ( nId )
{
case ID_BROWSER_REMOVEFILTER :
if ( ! m_xParser . is ( ) )
2009-04-23 10:42:05 +00:00
{
aReturn . bEnabled = false ;
return aReturn ;
}
2005-09-23 11:19:18 +00:00
// any filter or sort order set ?
aReturn . bEnabled = m_xParser - > getFilter ( ) . getLength ( ) | | m_xParser - > getHavingClause ( ) . getLength ( ) | | m_xParser - > getOrder ( ) . getLength ( ) ;
return aReturn ;
}
// no chance without valid models
if ( isValid ( ) & & ! isValidCursor ( ) )
return aReturn ;
2000-10-26 13:46:14 +00:00
switch ( nId )
{
case ID_BROWSER_SEARCH :
{
Reference < XPropertySet > xFormSet ( getRowSet ( ) , UNO_QUERY ) ;
sal_Int32 nCount = : : comphelper : : getINT32 ( xFormSet - > getPropertyValue ( PROPERTY_ROWCOUNT ) ) ;
aReturn . bEnabled = nCount ! = 0 ;
}
break ;
2008-03-05 15:52:29 +00:00
case ID_BROWSER_INSERT_ROW :
{
// check if it is available
2009-12-11 09:51:25 +01:00
sal_Bool bInsertPrivilege = ( m_nRowSetPrivileges & Privilege : : INSERT ) ! = 0 ;
sal_Bool bAllowInsertions = sal_True ;
try
{
Reference < XPropertySet > xRowSetProps ( getRowSet ( ) , UNO_QUERY_THROW ) ;
2010-11-11 17:20:24 -03:00
OSL_VERIFY ( xRowSetProps - > getPropertyValue ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " AllowInserts " ) ) ) > > = bAllowInsertions ) ;
2009-12-11 09:51:25 +01:00
}
catch ( const Exception & )
{
DBG_UNHANDLED_EXCEPTION ( ) ;
}
aReturn . bEnabled = bInsertPrivilege & & bAllowInsertions ;
2008-03-05 15:52:29 +00:00
}
break ;
case SID_FM_DELETEROWS :
{
2009-12-11 09:51:25 +01:00
// check if it is available
sal_Bool bDeletePrivilege = ( m_nRowSetPrivileges & Privilege : : INSERT ) ! = 0 ;
sal_Bool bAllowDeletions = sal_True ;
sal_Int32 nRowCount = 0 ;
sal_Bool bInsertionRow = sal_False ;
try
{
Reference < XPropertySet > xRowSetProps ( getRowSet ( ) , UNO_QUERY_THROW ) ;
2010-11-11 17:20:24 -03:00
OSL_VERIFY ( xRowSetProps - > getPropertyValue ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " AllowDeletes " ) ) ) > > = bAllowDeletions ) ;
2009-12-11 09:51:25 +01:00
OSL_VERIFY ( xRowSetProps - > getPropertyValue ( PROPERTY_ROWCOUNT ) > > = nRowCount ) ;
OSL_VERIFY ( xRowSetProps - > getPropertyValue ( PROPERTY_ISNEW ) > > = bInsertionRow ) ;
}
catch ( const Exception & )
{
DBG_UNHANDLED_EXCEPTION ( ) ;
}
aReturn . bEnabled = bDeletePrivilege & & bAllowDeletions & & ( nRowCount ! = 0 ) & & ! bInsertionRow ;
2008-03-05 15:52:29 +00:00
}
break ;
2000-10-26 13:46:14 +00:00
case ID_BROWSER_COPY :
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 ( getBrowserView ( ) - > getVclControl ( ) - > GetSelectRowCount ( ) )
{
aReturn . bEnabled = m_aCurrentFrame . isActive ( ) ;
break ;
}
// run through
case ID_BROWSER_PASTE :
2000-10-26 13:46:14 +00:00
case ID_BROWSER_CUT :
{
2001-06-29 07:45:10 +00:00
CellControllerRef xCurrentController = getBrowserView ( ) - > getVclControl ( ) - > Controller ( ) ;
if ( xCurrentController . Is ( ) & & xCurrentController - > ISA ( EditCellController ) )
2000-10-26 13:46:14 +00:00
{
Edit & rEdit = ( Edit & ) xCurrentController - > GetWindow ( ) ;
sal_Bool bHasLen = ( rEdit . GetSelection ( ) . Len ( ) ! = 0 ) ;
sal_Bool bIsReadOnly = rEdit . IsReadOnly ( ) ;
switch ( nId )
{
2008-03-06 17:13:16 +00:00
case ID_BROWSER_CUT : aReturn . bEnabled = m_aCurrentFrame . isActive ( ) & & bHasLen & & ! bIsReadOnly ; break ;
case SID_COPY : aReturn . bEnabled = m_aCurrentFrame . isActive ( ) & & bHasLen ; break ;
2001-07-26 06:11:02 +00:00
case ID_BROWSER_PASTE :
2008-03-06 17:13:16 +00:00
aReturn . bEnabled = m_aCurrentFrame . isActive ( ) & & ! bIsReadOnly ;
2002-05-22 13:03:34 +00:00
if ( aReturn . bEnabled )
2001-07-26 06:11:02 +00:00
{
2002-05-23 11:25:52 +00:00
aReturn . bEnabled = aReturn . bEnabled & & IsFormatSupported ( m_aSystemClipboard . GetDataFlavorExVector ( ) , FORMAT_STRING ) ;
2001-07-26 06:11:02 +00:00
}
2002-05-22 13:03:34 +00:00
break ;
2000-10-26 13:46:14 +00:00
}
}
}
break ;
case ID_BROWSER_SORTUP :
case ID_BROWSER_SORTDOWN :
case ID_BROWSER_AUTOFILTER :
{
// a native statement can't be filtered or sorted
2009-04-23 10:42:05 +00:00
const Reference < XPropertySet > xFormSet ( getRowSet ( ) , UNO_QUERY ) ;
2009-12-16 12:22:02 +01:00
if ( ! : : comphelper : : getBOOL ( xFormSet - > getPropertyValue ( PROPERTY_ESCAPE_PROCESSING ) ) | | ! m_xParser . is ( ) )
2000-10-26 13:46:14 +00:00
break ;
Reference < XPropertySet > xCurrentField = getBoundField ( ) ;
if ( ! xCurrentField . is ( ) )
break ;
aReturn . bEnabled = : : comphelper : : getBOOL ( xCurrentField - > getPropertyValue ( PROPERTY_ISSEARCHABLE ) ) ;
2009-04-23 10:42:05 +00:00
const Reference < XRowSet > xRow = getRowSet ( ) ;
CWS-TOOLING: integrate CWS evoab2def
2009-05-28 16:00:19 +0200 fs r272412 : don't use createFalse - Evo 2.22 simply hangs when ask for all contacts without a first name. Instead, in the WHERE 0=1 case, simply create an empty result set
2009-05-22 14:25:51 +0200 fs r272193 : #i10000#
2009-05-22 14:25:37 +0200 fs r272192 : oops, ENABLE_EVOAB2 for some platforms only, not generically
2009-05-22 14:19:00 +0200 fs r272191 : #i10000#
2009-05-22 12:42:38 +0200 fs r272183 : when sorting, properly use a syslocale collator, instead of comparing the numerical values of the string's UTF-16 code points
2009-05-20 15:09:00 +0200 fs r272131 : clear/getWarnings: also allowed without cache
2009-05-20 14:11:19 +0200 fs r272128 : removed debug traces
2009-05-20 14:03:31 +0200 fs r272126 : #i55701# +STR_SORT_BY_COL_ONLY
2009-05-20 14:02:29 +0200 fs r272125 : implement sorting
2009-05-20 10:10:19 +0200 fs r272107 : #i10000#
2009-05-19 16:02:17 +0200 fs r272089 : #i10000#
2009-05-19 16:02:02 +0200 fs r272088 : #i55701# strings for new error condition DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 16:01:31 +0200 fs r272087 : #i55701# use DATA_CANNOT_SELECT_UNFILTERED as standardized error code
2009-05-19 15:59:59 +0200 fs r272086 : #i55701# +DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 15:46:12 +0200 fs r272084 : #i55701# recognize the DATA_CANNOT_SELECT_UNFILTERED error condition, and allow filtering in this case, even when the result set is empty
2009-05-19 09:06:50 +0200 fs r272059 : merging changes from CWS dba32b, to prevent future conflicts with upcoming local changes
2009-05-18 21:48:58 +0200 fs r272054 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:48:42 +0200 fs r272053 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:47:41 +0200 fs r272052 : +setExternalWarnings
2009-05-18 21:47:12 +0200 fs r272051 : #i55701# when re/loading the form, display any possible warnings
2009-05-18 21:43:26 +0200 fs r272050 : #i55701# implement XWarningsSupplier, exposing the warnings of our result set
2009-05-18 21:42:51 +0200 fs r272049 : #i55701# implement XWarningsSupplier, exposing the warnings of our aggregate RowSet
2009-05-18 17:53:59 +0200 fs r272041 : #i55701# moved the (I)WarningsContainer from dbaccess to connectivity, to be able to use it in the latter module, too
2009-05-18 17:24:10 +0200 fs r272040 : #i55701# properly enable the various Evolution types
2009-05-18 14:52:19 +0200 fs r272024 : #i55701# properly enable the Evolution types
2009-05-18 13:57:10 +0200 fs r272018 : fixed/extended whereAnalysis (column searching still not enabled, as neither LIKE nor = seem to work with my (somewhat older) Evolution version)
2009-05-18 13:56:08 +0200 fs r272017 : extended showParseTree
2009-05-18 13:55:25 +0200 fs r272016 : extended showParseTree
2009-05-18 11:40:16 +0200 fs r272008 : #i55701#
2009-05-18 11:39:02 +0200 fs r272006 : let the PreparedStatement return proper meta data, too
2009-05-18 10:05:37 +0200 fs r271999 : moved the XStatement interface to from OCommonStatement to OStatement - the former class is also the base for other classes which should not have this interface
2009-05-15 21:53:22 +0200 fs r271973 : collectColumnInformation: report invalid meta data as assertion
2009-05-15 21:51:40 +0200 fs r271972 : showParseTree should be const
2009-05-15 21:51:26 +0200 fs r271971 : showParseTree should be const
2009-05-15 21:51:03 +0200 fs r271970 : properly recognize the 'WHERE 0 = 1' clause, this way having proper statement meta data, this way saving much much calls from the DBA framework
2009-05-15 20:29:03 +0200 fs r271969 : cleaned up the mess with the statement classes
2009-05-15 15:51:11 +0200 fs r271944 : let the result set properly init its meta data
2009-05-15 15:29:54 +0200 fs r271939 : proper property implementations for the resultset class
2009-05-15 15:01:31 +0200 fs r271936 : proper property implementations for the statement class
2009-05-08 14:46:33 +0200 fs r271717 : component_foo must be PUBLIC
2009-05-06 09:20:05 +0200 fs r271565 : #i10000# (warnings on unxlngi6)
2009-05-06 09:01:30 +0200 fs r271564 : #i101493#
2009-05-05 23:08:12 +0200 fs r271560 : #i55701# merging the changes from the ancient (CVS-based) CWS evoab2default into this CWS here
2009-06-05 12:31:05 +00:00
aReturn . bEnabled = aReturn . bEnabled
& & xRow . is ( )
& & ! xRow - > isBeforeFirst ( )
& & ! xRow - > isAfterLast ( )
& & ! xRow - > rowDeleted ( )
& & ( : : comphelper : : getINT32 ( xFormSet - > getPropertyValue ( PROPERTY_ROWCOUNT ) ) ! = 0 ) ;
2000-10-26 13:46:14 +00:00
}
break ;
case ID_BROWSER_FILTERCRIT :
2009-12-16 12:22:02 +01:00
if ( m_bCannotSelectUnfiltered & & m_xParser . is ( ) )
CWS-TOOLING: integrate CWS evoab2def
2009-05-28 16:00:19 +0200 fs r272412 : don't use createFalse - Evo 2.22 simply hangs when ask for all contacts without a first name. Instead, in the WHERE 0=1 case, simply create an empty result set
2009-05-22 14:25:51 +0200 fs r272193 : #i10000#
2009-05-22 14:25:37 +0200 fs r272192 : oops, ENABLE_EVOAB2 for some platforms only, not generically
2009-05-22 14:19:00 +0200 fs r272191 : #i10000#
2009-05-22 12:42:38 +0200 fs r272183 : when sorting, properly use a syslocale collator, instead of comparing the numerical values of the string's UTF-16 code points
2009-05-20 15:09:00 +0200 fs r272131 : clear/getWarnings: also allowed without cache
2009-05-20 14:11:19 +0200 fs r272128 : removed debug traces
2009-05-20 14:03:31 +0200 fs r272126 : #i55701# +STR_SORT_BY_COL_ONLY
2009-05-20 14:02:29 +0200 fs r272125 : implement sorting
2009-05-20 10:10:19 +0200 fs r272107 : #i10000#
2009-05-19 16:02:17 +0200 fs r272089 : #i10000#
2009-05-19 16:02:02 +0200 fs r272088 : #i55701# strings for new error condition DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 16:01:31 +0200 fs r272087 : #i55701# use DATA_CANNOT_SELECT_UNFILTERED as standardized error code
2009-05-19 15:59:59 +0200 fs r272086 : #i55701# +DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 15:46:12 +0200 fs r272084 : #i55701# recognize the DATA_CANNOT_SELECT_UNFILTERED error condition, and allow filtering in this case, even when the result set is empty
2009-05-19 09:06:50 +0200 fs r272059 : merging changes from CWS dba32b, to prevent future conflicts with upcoming local changes
2009-05-18 21:48:58 +0200 fs r272054 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:48:42 +0200 fs r272053 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:47:41 +0200 fs r272052 : +setExternalWarnings
2009-05-18 21:47:12 +0200 fs r272051 : #i55701# when re/loading the form, display any possible warnings
2009-05-18 21:43:26 +0200 fs r272050 : #i55701# implement XWarningsSupplier, exposing the warnings of our result set
2009-05-18 21:42:51 +0200 fs r272049 : #i55701# implement XWarningsSupplier, exposing the warnings of our aggregate RowSet
2009-05-18 17:53:59 +0200 fs r272041 : #i55701# moved the (I)WarningsContainer from dbaccess to connectivity, to be able to use it in the latter module, too
2009-05-18 17:24:10 +0200 fs r272040 : #i55701# properly enable the various Evolution types
2009-05-18 14:52:19 +0200 fs r272024 : #i55701# properly enable the Evolution types
2009-05-18 13:57:10 +0200 fs r272018 : fixed/extended whereAnalysis (column searching still not enabled, as neither LIKE nor = seem to work with my (somewhat older) Evolution version)
2009-05-18 13:56:08 +0200 fs r272017 : extended showParseTree
2009-05-18 13:55:25 +0200 fs r272016 : extended showParseTree
2009-05-18 11:40:16 +0200 fs r272008 : #i55701#
2009-05-18 11:39:02 +0200 fs r272006 : let the PreparedStatement return proper meta data, too
2009-05-18 10:05:37 +0200 fs r271999 : moved the XStatement interface to from OCommonStatement to OStatement - the former class is also the base for other classes which should not have this interface
2009-05-15 21:53:22 +0200 fs r271973 : collectColumnInformation: report invalid meta data as assertion
2009-05-15 21:51:40 +0200 fs r271972 : showParseTree should be const
2009-05-15 21:51:26 +0200 fs r271971 : showParseTree should be const
2009-05-15 21:51:03 +0200 fs r271970 : properly recognize the 'WHERE 0 = 1' clause, this way having proper statement meta data, this way saving much much calls from the DBA framework
2009-05-15 20:29:03 +0200 fs r271969 : cleaned up the mess with the statement classes
2009-05-15 15:51:11 +0200 fs r271944 : let the result set properly init its meta data
2009-05-15 15:29:54 +0200 fs r271939 : proper property implementations for the resultset class
2009-05-15 15:01:31 +0200 fs r271936 : proper property implementations for the statement class
2009-05-08 14:46:33 +0200 fs r271717 : component_foo must be PUBLIC
2009-05-06 09:20:05 +0200 fs r271565 : #i10000# (warnings on unxlngi6)
2009-05-06 09:01:30 +0200 fs r271564 : #i101493#
2009-05-05 23:08:12 +0200 fs r271560 : #i55701# merging the changes from the ancient (CVS-based) CWS evoab2default into this CWS here
2009-06-05 12:31:05 +00:00
{
aReturn . bEnabled = sal_True ;
break ;
}
// no break
case ID_BROWSER_ORDERCRIT :
2001-07-16 06:42:07 +00:00
{
2009-04-23 10:42:05 +00:00
const Reference < XPropertySet > xFormSet ( getRowSet ( ) , UNO_QUERY ) ;
2009-12-16 12:22:02 +01:00
if ( ! : : comphelper : : getBOOL ( xFormSet - > getPropertyValue ( PROPERTY_ESCAPE_PROCESSING ) ) | | ! m_xParser . is ( ) )
2009-04-23 10:42:05 +00:00
break ;
CWS-TOOLING: integrate CWS evoab2def
2009-05-28 16:00:19 +0200 fs r272412 : don't use createFalse - Evo 2.22 simply hangs when ask for all contacts without a first name. Instead, in the WHERE 0=1 case, simply create an empty result set
2009-05-22 14:25:51 +0200 fs r272193 : #i10000#
2009-05-22 14:25:37 +0200 fs r272192 : oops, ENABLE_EVOAB2 for some platforms only, not generically
2009-05-22 14:19:00 +0200 fs r272191 : #i10000#
2009-05-22 12:42:38 +0200 fs r272183 : when sorting, properly use a syslocale collator, instead of comparing the numerical values of the string's UTF-16 code points
2009-05-20 15:09:00 +0200 fs r272131 : clear/getWarnings: also allowed without cache
2009-05-20 14:11:19 +0200 fs r272128 : removed debug traces
2009-05-20 14:03:31 +0200 fs r272126 : #i55701# +STR_SORT_BY_COL_ONLY
2009-05-20 14:02:29 +0200 fs r272125 : implement sorting
2009-05-20 10:10:19 +0200 fs r272107 : #i10000#
2009-05-19 16:02:17 +0200 fs r272089 : #i10000#
2009-05-19 16:02:02 +0200 fs r272088 : #i55701# strings for new error condition DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 16:01:31 +0200 fs r272087 : #i55701# use DATA_CANNOT_SELECT_UNFILTERED as standardized error code
2009-05-19 15:59:59 +0200 fs r272086 : #i55701# +DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 15:46:12 +0200 fs r272084 : #i55701# recognize the DATA_CANNOT_SELECT_UNFILTERED error condition, and allow filtering in this case, even when the result set is empty
2009-05-19 09:06:50 +0200 fs r272059 : merging changes from CWS dba32b, to prevent future conflicts with upcoming local changes
2009-05-18 21:48:58 +0200 fs r272054 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:48:42 +0200 fs r272053 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:47:41 +0200 fs r272052 : +setExternalWarnings
2009-05-18 21:47:12 +0200 fs r272051 : #i55701# when re/loading the form, display any possible warnings
2009-05-18 21:43:26 +0200 fs r272050 : #i55701# implement XWarningsSupplier, exposing the warnings of our result set
2009-05-18 21:42:51 +0200 fs r272049 : #i55701# implement XWarningsSupplier, exposing the warnings of our aggregate RowSet
2009-05-18 17:53:59 +0200 fs r272041 : #i55701# moved the (I)WarningsContainer from dbaccess to connectivity, to be able to use it in the latter module, too
2009-05-18 17:24:10 +0200 fs r272040 : #i55701# properly enable the various Evolution types
2009-05-18 14:52:19 +0200 fs r272024 : #i55701# properly enable the Evolution types
2009-05-18 13:57:10 +0200 fs r272018 : fixed/extended whereAnalysis (column searching still not enabled, as neither LIKE nor = seem to work with my (somewhat older) Evolution version)
2009-05-18 13:56:08 +0200 fs r272017 : extended showParseTree
2009-05-18 13:55:25 +0200 fs r272016 : extended showParseTree
2009-05-18 11:40:16 +0200 fs r272008 : #i55701#
2009-05-18 11:39:02 +0200 fs r272006 : let the PreparedStatement return proper meta data, too
2009-05-18 10:05:37 +0200 fs r271999 : moved the XStatement interface to from OCommonStatement to OStatement - the former class is also the base for other classes which should not have this interface
2009-05-15 21:53:22 +0200 fs r271973 : collectColumnInformation: report invalid meta data as assertion
2009-05-15 21:51:40 +0200 fs r271972 : showParseTree should be const
2009-05-15 21:51:26 +0200 fs r271971 : showParseTree should be const
2009-05-15 21:51:03 +0200 fs r271970 : properly recognize the 'WHERE 0 = 1' clause, this way having proper statement meta data, this way saving much much calls from the DBA framework
2009-05-15 20:29:03 +0200 fs r271969 : cleaned up the mess with the statement classes
2009-05-15 15:51:11 +0200 fs r271944 : let the result set properly init its meta data
2009-05-15 15:29:54 +0200 fs r271939 : proper property implementations for the resultset class
2009-05-15 15:01:31 +0200 fs r271936 : proper property implementations for the statement class
2009-05-08 14:46:33 +0200 fs r271717 : component_foo must be PUBLIC
2009-05-06 09:20:05 +0200 fs r271565 : #i10000# (warnings on unxlngi6)
2009-05-06 09:01:30 +0200 fs r271564 : #i101493#
2009-05-05 23:08:12 +0200 fs r271560 : #i55701# merging the changes from the ancient (CVS-based) CWS evoab2default into this CWS here
2009-06-05 12:31:05 +00:00
aReturn . bEnabled = getRowSet ( ) . is ( )
& & ( : : comphelper : : getINT32 ( xFormSet - > getPropertyValue ( PROPERTY_ROWCOUNT ) ) ! = 0 ) ;
2001-07-16 06:42:07 +00:00
}
2000-10-26 13:46:14 +00:00
break ;
case ID_BROWSER_REFRESH :
2004-10-22 08:04:30 +00:00
aReturn . bEnabled = sal_True ;
2000-10-26 13:46:14 +00:00
break ;
case ID_BROWSER_REDO :
aReturn . bEnabled = sal_False ; // simply forget it ;). no redo possible.
break ;
2002-05-22 13:03:34 +00:00
case ID_BROWSER_UNDORECORD :
case ID_BROWSER_SAVERECORD :
2000-10-26 13:46:14 +00:00
{
if ( ! m_bCurrentlyModified )
{
Reference < XPropertySet > xFormSet ( getRowSet ( ) , UNO_QUERY ) ;
if ( xFormSet . is ( ) )
aReturn . bEnabled = : : comphelper : : getBOOL ( xFormSet - > getPropertyValue ( PROPERTY_ISMODIFIED ) ) ;
}
else
aReturn . bEnabled = sal_True ;
2006-07-10 14:23:44 +00:00
aReturn . sTitle = ( ID_BROWSER_UNDORECORD = = nId ) ? m_sStateUndoRecord : m_sStateSaveRecord ;
2000-10-26 13:46:14 +00:00
}
break ;
case ID_BROWSER_EDITDOC :
{
// check if it is available
Reference < XPropertySet > xDataSourceSet ( getRowSet ( ) , UNO_QUERY ) ;
if ( ! xDataSourceSet . is ( ) )
break ; // no datasource -> no edit mode
sal_Int32 nDataSourcePrivileges = : : comphelper : : getINT32 ( xDataSourceSet - > getPropertyValue ( PROPERTY_PRIVILEGES ) ) ;
2010-11-11 17:20:24 -03:00
sal_Bool bInsertAllowedAndPossible = ( ( nDataSourcePrivileges & : : com : : sun : : star : : sdbcx : : Privilege : : INSERT ) ! = 0 ) & & : : comphelper : : getBOOL ( xDataSourceSet - > getPropertyValue ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " AllowInserts " ) ) ) ) ;
sal_Bool bUpdateAllowedAndPossible = ( ( nDataSourcePrivileges & : : com : : sun : : star : : sdbcx : : Privilege : : UPDATE ) ! = 0 ) & & : : comphelper : : getBOOL ( xDataSourceSet - > getPropertyValue ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " AllowUpdates " ) ) ) ) ;
sal_Bool bDeleteAllowedAndPossible = ( ( nDataSourcePrivileges & : : com : : sun : : star : : sdbcx : : Privilege : : DELETE ) ! = 0 ) & & : : comphelper : : getBOOL ( xDataSourceSet - > getPropertyValue ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " AllowDeletes " ) ) ) ) ;
2000-10-26 13:46:14 +00:00
if ( ! bInsertAllowedAndPossible & & ! bUpdateAllowedAndPossible & & ! bDeleteAllowedAndPossible )
break ; // no insert/update/delete -> no edit mode
2001-07-17 12:07:48 +00:00
if ( ! isValidCursor ( ) | | ! isLoaded ( ) )
2000-10-26 13:46:14 +00:00
break ; // no cursor -> no edit mode
aReturn . bEnabled = sal_True ;
2001-01-09 14:52:33 +00:00
sal_Int16 nGridMode = getBrowserView ( ) - > getVclControl ( ) - > GetOptions ( ) ;
2006-07-10 14:23:44 +00:00
aReturn . bChecked = nGridMode > DbGridControl : : OPT_READONLY ;
2000-10-26 13:46:14 +00:00
}
break ;
case ID_BROWSER_FILTERED :
{
aReturn . bEnabled = sal_False ;
Reference < XPropertySet > xActiveSet ( getRowSet ( ) , UNO_QUERY ) ;
: : rtl : : OUString aFilter = : : comphelper : : getString ( xActiveSet - > getPropertyValue ( PROPERTY_FILTER ) ) ;
2004-10-22 08:04:30 +00:00
: : rtl : : OUString aHaving = : : comphelper : : getString ( xActiveSet - > getPropertyValue ( PROPERTY_HAVING_CLAUSE ) ) ;
2011-12-19 18:10:37 -02:00
if ( ! ( aFilter . isEmpty ( ) & & aHaving . isEmpty ( ) ) )
2000-10-26 13:46:14 +00:00
{
2006-07-10 14:23:44 +00:00
xActiveSet - > getPropertyValue ( PROPERTY_APPLYFILTER ) > > = aReturn . bChecked ;
2000-10-26 13:46:14 +00:00
aReturn . bEnabled = sal_True ;
}
else
{
2006-07-10 14:23:44 +00:00
aReturn . bChecked = sal_False ;
2000-10-26 13:46:14 +00:00
aReturn . bEnabled = sal_False ;
}
}
break ;
2004-09-09 08:41:14 +00:00
default :
2008-03-06 17:13:16 +00:00
return SbaXDataBrowserController_Base : : GetState ( nId ) ;
2000-10-26 13:46:14 +00:00
}
}
2006-06-20 01:55:50 +00:00
catch ( const Exception & )
2000-10-26 13:46:14 +00:00
{
2006-06-20 01:55:50 +00:00
DBG_UNHANDLED_EXCEPTION ( ) ;
2000-10-26 13:46:14 +00:00
}
return aReturn ;
}
2001-07-17 12:07:48 +00:00
//------------------------------------------------------------------------------
2010-01-22 08:14:22 +01:00
void SbaXDataBrowserController : : applyParserOrder ( const : : rtl : : OUString & _rOldOrder , const Reference < XSingleSelectQueryComposer > & _xParser )
2001-07-17 12:07:48 +00:00
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::applyParserOrder " ) ;
2001-07-17 12:07:48 +00:00
Reference < XPropertySet > xFormSet ( getRowSet ( ) , UNO_QUERY ) ;
2001-08-27 05:57:24 +00:00
if ( ! m_xLoadable . is ( ) )
2001-07-17 12:07:48 +00:00
{
2011-03-19 14:05:01 +01:00
OSL_FAIL ( " SbaXDataBrowserController::applyParserOrder: invalid row set! " ) ;
2001-07-17 12:07:48 +00:00
return ;
}
2003-04-01 13:01:01 +00:00
sal_uInt16 nPos = getCurrentColumnPosition ( ) ;
2001-07-17 12:07:48 +00:00
sal_Bool bSuccess = sal_False ;
try
{
2010-01-22 08:14:22 +01:00
xFormSet - > setPropertyValue ( PROPERTY_ORDER , makeAny ( _xParser - > getOrder ( ) ) ) ;
2001-08-27 05:57:24 +00:00
bSuccess = reloadForm ( m_xLoadable ) ;
2001-07-17 12:07:48 +00:00
}
catch ( Exception & )
{
}
if ( ! bSuccess )
{
xFormSet - > setPropertyValue ( PROPERTY_ORDER , makeAny ( _rOldOrder ) ) ;
try
{
2002-01-29 11:23:58 +00:00
if ( loadingCancelled ( ) | | ! reloadForm ( m_xLoadable ) )
2001-07-17 12:07:48 +00:00
criticalFail ( ) ;
}
catch ( Exception & )
{
criticalFail ( ) ;
}
InvalidateAll ( ) ;
}
InvalidateFeature ( ID_BROWSER_REMOVEFILTER ) ;
2003-04-01 13:01:01 +00:00
setCurrentColumnPosition ( nPos ) ;
2001-07-17 12:07:48 +00:00
}
//------------------------------------------------------------------------------
2010-01-22 08:14:22 +01:00
void SbaXDataBrowserController : : applyParserFilter ( const : : rtl : : OUString & _rOldFilter , sal_Bool _bOldFilterApplied , const : : rtl : : OUString & _sOldHaving , const Reference < XSingleSelectQueryComposer > & _xParser )
2001-07-17 12:07:48 +00:00
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::applyParserFilter " ) ;
2001-07-17 12:07:48 +00:00
Reference < XPropertySet > xFormSet ( getRowSet ( ) , UNO_QUERY ) ;
2001-08-27 05:57:24 +00:00
if ( ! m_xLoadable . is ( ) )
2001-07-17 12:07:48 +00:00
{
2011-03-19 14:05:01 +01:00
OSL_FAIL ( " SbaXDataBrowserController::applyParserFilter: invalid row set! " ) ;
2001-07-17 12:07:48 +00:00
return ;
}
2003-04-01 13:01:01 +00:00
sal_uInt16 nPos = getCurrentColumnPosition ( ) ;
2001-07-17 12:07:48 +00:00
sal_Bool bSuccess = sal_False ;
try
{
FormErrorHelper aError ( this ) ;
2010-01-22 08:14:22 +01:00
xFormSet - > setPropertyValue ( PROPERTY_FILTER , makeAny ( _xParser - > getFilter ( ) ) ) ;
xFormSet - > setPropertyValue ( PROPERTY_HAVING_CLAUSE , makeAny ( _xParser - > getHavingClause ( ) ) ) ;
2001-07-17 12:07:48 +00:00
xFormSet - > setPropertyValue ( PROPERTY_APPLYFILTER , : : comphelper : : makeBoolAny ( sal_Bool ( sal_True ) ) ) ;
2001-08-27 05:57:24 +00:00
bSuccess = reloadForm ( m_xLoadable ) ;
2001-07-17 12:07:48 +00:00
}
catch ( Exception & )
{
}
if ( ! bSuccess )
{
xFormSet - > setPropertyValue ( PROPERTY_FILTER , makeAny ( _rOldFilter ) ) ;
2004-10-22 08:04:30 +00:00
xFormSet - > setPropertyValue ( PROPERTY_HAVING_CLAUSE , makeAny ( _sOldHaving ) ) ;
2001-07-17 12:07:48 +00:00
xFormSet - > setPropertyValue ( PROPERTY_APPLYFILTER , : : comphelper : : makeBoolAny ( _bOldFilterApplied ) ) ;
try
{
2002-01-29 11:23:58 +00:00
if ( loadingCancelled ( ) | | ! reloadForm ( m_xLoadable ) )
2001-07-17 12:07:48 +00:00
criticalFail ( ) ;
}
catch ( Exception & )
{
criticalFail ( ) ;
}
InvalidateAll ( ) ;
}
InvalidateFeature ( ID_BROWSER_REMOVEFILTER ) ;
2003-04-01 13:01:01 +00:00
setCurrentColumnPosition ( nPos ) ;
2001-07-17 12:07:48 +00:00
}
2010-09-30 09:27:40 +02:00
2010-01-22 08:14:22 +01:00
//------------------------------------------------------------------------------
Reference < XSingleSelectQueryComposer > SbaXDataBrowserController : : createParser_nothrow ( )
{
2010-09-30 09:27:40 +02:00
Reference < XSingleSelectQueryComposer > xComposer ;
2010-01-22 08:14:22 +01:00
try
{
2010-09-30 09:27:40 +02:00
const Reference < XPropertySet > xRowSetProps ( getRowSet ( ) , UNO_QUERY_THROW ) ;
const Reference < XMultiServiceFactory > xFactory (
xRowSetProps - > getPropertyValue ( PROPERTY_ACTIVE_CONNECTION ) , UNO_QUERY_THROW ) ;
xComposer . set ( xFactory - > createInstance ( SERVICE_NAME_SINGLESELECTQUERYCOMPOSER ) , UNO_QUERY_THROW ) ;
: : rtl : : OUString sActiveCommand ;
OSL_VERIFY ( xRowSetProps - > getPropertyValue ( PROPERTY_ACTIVECOMMAND ) > > = sActiveCommand ) ;
2011-12-19 18:10:37 -02:00
if ( ! sActiveCommand . isEmpty ( ) )
2010-09-30 09:27:40 +02:00
{
xComposer - > setElementaryQuery ( sActiveCommand ) ;
}
else
{
: : rtl : : OUString sCommand ;
OSL_VERIFY ( xRowSetProps - > getPropertyValue ( PROPERTY_COMMAND ) > > = sCommand ) ;
sal_Int32 nCommandType = CommandType : : COMMAND ;
OSL_VERIFY ( xRowSetProps - > getPropertyValue ( PROPERTY_COMMAND_TYPE ) > > = nCommandType ) ;
xComposer - > setCommand ( sCommand , nCommandType ) ;
}
: : rtl : : OUString sFilter ;
OSL_VERIFY ( xRowSetProps - > getPropertyValue ( PROPERTY_FILTER ) > > = sFilter ) ;
xComposer - > setFilter ( sFilter ) ;
: : rtl : : OUString sHavingClause ;
OSL_VERIFY ( xRowSetProps - > getPropertyValue ( PROPERTY_HAVING_CLAUSE ) > > = sHavingClause ) ;
xComposer - > setHavingClause ( sHavingClause ) ;
: : rtl : : OUString sOrder ;
OSL_VERIFY ( xRowSetProps - > getPropertyValue ( PROPERTY_ORDER ) > > = sOrder ) ;
xComposer - > setOrder ( sOrder ) ;
2010-01-22 08:14:22 +01:00
}
2010-09-30 09:27:40 +02:00
catch ( const Exception & )
2010-01-22 08:14:22 +01:00
{
DBG_UNHANDLED_EXCEPTION ( ) ;
}
2010-09-30 09:27:40 +02:00
return xComposer ;
2010-01-22 08:14:22 +01:00
}
2000-10-26 13:46:14 +00:00
//------------------------------------------------------------------------------
void SbaXDataBrowserController : : ExecuteFilterSortCrit ( sal_Bool bFilter )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::ExecuteFilterSortCrit " ) ;
2000-10-26 13:46:14 +00:00
if ( ! SaveModified ( ) )
return ;
Reference < XPropertySet > xFormSet ( getRowSet ( ) , UNO_QUERY ) ;
2009-04-23 10:42:05 +00:00
const : : rtl : : OUString sOldVal = bFilter ? m_xParser - > getFilter ( ) : m_xParser - > getOrder ( ) ;
const : : rtl : : OUString sOldHaving = m_xParser - > getHavingClause ( ) ;
2010-01-22 08:14:22 +01:00
Reference < XSingleSelectQueryComposer > xParser = createParser_nothrow ( ) ;
2000-10-26 13:46:14 +00:00
try
{
2001-08-27 05:57:24 +00:00
Reference < : : com : : sun : : star : : sdbcx : : XColumnsSupplier > xSup = getColumnsSupplier ( ) ;
2008-01-30 07:42:45 +00:00
Reference < XConnection > xCon ( xFormSet - > getPropertyValue ( PROPERTY_ACTIVE_CONNECTION ) , UNO_QUERY ) ;
2000-11-10 15:14:45 +00:00
if ( bFilter )
{
2012-11-02 15:13:28 +02:00
DlgFilterCrit aDlg ( getBrowserView ( ) , comphelper : : getComponentContext ( getORB ( ) ) , xCon , xParser , xSup - > getColumns ( ) ) ;
2000-11-10 15:14:45 +00:00
String aFilter ;
2010-09-29 12:51:19 +02:00
if ( ! aDlg . Execute ( ) )
return ; // if so we don't need to update the grid
2005-01-05 11:33:18 +00:00
aDlg . BuildWherePart ( ) ;
2000-11-10 15:14:45 +00:00
}
2000-10-26 13:46:14 +00:00
else
2000-11-10 15:14:45 +00:00
{
2010-01-22 08:14:22 +01:00
DlgOrderCrit aDlg ( getBrowserView ( ) , xCon , xParser , xSup - > getColumns ( ) ) ;
2000-11-10 15:14:45 +00:00
String aOrder ;
if ( ! aDlg . Execute ( ) )
{
return ; // if so we don't need to actualize the grid
}
aDlg . BuildOrderPart ( ) ;
}
2000-10-26 13:46:14 +00:00
}
CWS-TOOLING: integrate CWS evoab2def
2009-05-28 16:00:19 +0200 fs r272412 : don't use createFalse - Evo 2.22 simply hangs when ask for all contacts without a first name. Instead, in the WHERE 0=1 case, simply create an empty result set
2009-05-22 14:25:51 +0200 fs r272193 : #i10000#
2009-05-22 14:25:37 +0200 fs r272192 : oops, ENABLE_EVOAB2 for some platforms only, not generically
2009-05-22 14:19:00 +0200 fs r272191 : #i10000#
2009-05-22 12:42:38 +0200 fs r272183 : when sorting, properly use a syslocale collator, instead of comparing the numerical values of the string's UTF-16 code points
2009-05-20 15:09:00 +0200 fs r272131 : clear/getWarnings: also allowed without cache
2009-05-20 14:11:19 +0200 fs r272128 : removed debug traces
2009-05-20 14:03:31 +0200 fs r272126 : #i55701# +STR_SORT_BY_COL_ONLY
2009-05-20 14:02:29 +0200 fs r272125 : implement sorting
2009-05-20 10:10:19 +0200 fs r272107 : #i10000#
2009-05-19 16:02:17 +0200 fs r272089 : #i10000#
2009-05-19 16:02:02 +0200 fs r272088 : #i55701# strings for new error condition DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 16:01:31 +0200 fs r272087 : #i55701# use DATA_CANNOT_SELECT_UNFILTERED as standardized error code
2009-05-19 15:59:59 +0200 fs r272086 : #i55701# +DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 15:46:12 +0200 fs r272084 : #i55701# recognize the DATA_CANNOT_SELECT_UNFILTERED error condition, and allow filtering in this case, even when the result set is empty
2009-05-19 09:06:50 +0200 fs r272059 : merging changes from CWS dba32b, to prevent future conflicts with upcoming local changes
2009-05-18 21:48:58 +0200 fs r272054 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:48:42 +0200 fs r272053 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:47:41 +0200 fs r272052 : +setExternalWarnings
2009-05-18 21:47:12 +0200 fs r272051 : #i55701# when re/loading the form, display any possible warnings
2009-05-18 21:43:26 +0200 fs r272050 : #i55701# implement XWarningsSupplier, exposing the warnings of our result set
2009-05-18 21:42:51 +0200 fs r272049 : #i55701# implement XWarningsSupplier, exposing the warnings of our aggregate RowSet
2009-05-18 17:53:59 +0200 fs r272041 : #i55701# moved the (I)WarningsContainer from dbaccess to connectivity, to be able to use it in the latter module, too
2009-05-18 17:24:10 +0200 fs r272040 : #i55701# properly enable the various Evolution types
2009-05-18 14:52:19 +0200 fs r272024 : #i55701# properly enable the Evolution types
2009-05-18 13:57:10 +0200 fs r272018 : fixed/extended whereAnalysis (column searching still not enabled, as neither LIKE nor = seem to work with my (somewhat older) Evolution version)
2009-05-18 13:56:08 +0200 fs r272017 : extended showParseTree
2009-05-18 13:55:25 +0200 fs r272016 : extended showParseTree
2009-05-18 11:40:16 +0200 fs r272008 : #i55701#
2009-05-18 11:39:02 +0200 fs r272006 : let the PreparedStatement return proper meta data, too
2009-05-18 10:05:37 +0200 fs r271999 : moved the XStatement interface to from OCommonStatement to OStatement - the former class is also the base for other classes which should not have this interface
2009-05-15 21:53:22 +0200 fs r271973 : collectColumnInformation: report invalid meta data as assertion
2009-05-15 21:51:40 +0200 fs r271972 : showParseTree should be const
2009-05-15 21:51:26 +0200 fs r271971 : showParseTree should be const
2009-05-15 21:51:03 +0200 fs r271970 : properly recognize the 'WHERE 0 = 1' clause, this way having proper statement meta data, this way saving much much calls from the DBA framework
2009-05-15 20:29:03 +0200 fs r271969 : cleaned up the mess with the statement classes
2009-05-15 15:51:11 +0200 fs r271944 : let the result set properly init its meta data
2009-05-15 15:29:54 +0200 fs r271939 : proper property implementations for the resultset class
2009-05-15 15:01:31 +0200 fs r271936 : proper property implementations for the statement class
2009-05-08 14:46:33 +0200 fs r271717 : component_foo must be PUBLIC
2009-05-06 09:20:05 +0200 fs r271565 : #i10000# (warnings on unxlngi6)
2009-05-06 09:01:30 +0200 fs r271564 : #i101493#
2009-05-05 23:08:12 +0200 fs r271560 : #i55701# merging the changes from the ancient (CVS-based) CWS evoab2default into this CWS here
2009-06-05 12:31:05 +00:00
catch ( const SQLException & )
{
SQLExceptionInfo aError ( : : cppu : : getCaughtException ( ) ) ;
showError ( aError ) ;
return ;
}
2001-01-09 14:52:33 +00:00
catch ( Exception & )
2000-10-26 13:46:14 +00:00
{
return ;
}
2010-01-22 08:14:22 +01:00
: : rtl : : OUString sNewVal = bFilter ? xParser - > getFilter ( ) : xParser - > getOrder ( ) ;
2000-10-26 13:46:14 +00:00
sal_Bool bOldFilterApplied ( sal_False ) ;
if ( bFilter )
{
2001-01-09 14:52:33 +00:00
try { bOldFilterApplied = : : comphelper : : getBOOL ( xFormSet - > getPropertyValue ( PROPERTY_APPLYFILTER ) ) ; } catch ( Exception & ) { } ;
2000-10-26 13:46:14 +00:00
}
2010-01-22 08:14:22 +01:00
: : rtl : : OUString sNewHaving = xParser - > getHavingClause ( ) ;
2004-10-22 08:04:30 +00:00
if ( sOldVal . equals ( sNewVal ) & & ( ! bFilter | | sOldHaving . equals ( sNewHaving ) ) )
2000-10-26 13:46:14 +00:00
// nothing to be done
return ;
2001-07-17 12:07:48 +00:00
if ( bFilter )
2010-01-22 08:14:22 +01:00
applyParserFilter ( sOldVal , bOldFilterApplied , sOldHaving , xParser ) ;
2001-07-17 12:07:48 +00:00
else
2010-01-22 08:14:22 +01:00
applyParserOrder ( sOldVal , xParser ) ;
2003-04-01 13:01:01 +00:00
2010-01-22 08:14:22 +01:00
: : comphelper : : disposeComponent ( xParser ) ;
2000-10-26 13:46:14 +00:00
}
//------------------------------------------------------------------------------
void SbaXDataBrowserController : : ExecuteSearch ( )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::ExecuteSearch " ) ;
2000-10-26 13:46:14 +00:00
// calculate the control source of the active field
2001-01-09 14:52:33 +00:00
Reference < : : com : : sun : : star : : form : : XGrid > xGrid ( getBrowserView ( ) - > getGridControl ( ) , UNO_QUERY ) ;
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( xGrid . is ( ) , " SbaXDataBrowserController::ExecuteSearch : the control should have an ::com::sun::star::form::XGrid interface ! " ) ;
2000-10-26 13:46:14 +00:00
2001-01-09 14:52:33 +00:00
Reference < : : com : : sun : : star : : form : : XGridPeer > xGridPeer ( getBrowserView ( ) - > getGridControl ( ) - > getPeer ( ) , UNO_QUERY ) ;
2000-10-26 13:46:14 +00:00
Reference < : : com : : sun : : star : : container : : XIndexContainer > xColumns = xGridPeer - > getColumns ( ) ;
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( xGridPeer . is ( ) & & xColumns . is ( ) , " SbaXDataBrowserController::ExecuteSearch : invalid peer ! " ) ;
2000-10-26 13:46:14 +00:00
sal_Int16 nViewCol = xGrid - > getCurrentColumnPosition ( ) ;
2001-01-09 14:52:33 +00:00
sal_Int16 nModelCol = getBrowserView ( ) - > View2ModelPos ( nViewCol ) ;
2000-10-26 13:46:14 +00:00
2004-08-02 14:31:55 +00:00
Reference < XPropertySet > xCurrentCol ( xColumns - > getByIndex ( nModelCol ) , UNO_QUERY ) ;
2000-10-26 13:46:14 +00:00
String sActiveField = : : comphelper : : getString ( xCurrentCol - > getPropertyValue ( PROPERTY_CONTROLSOURCE ) ) ;
// the text within the current cell
String sInitialText ;
Reference < : : com : : sun : : star : : container : : XIndexAccess > xColControls ( xGridPeer , UNO_QUERY ) ;
2004-08-02 14:31:55 +00:00
Reference < XInterface > xCurControl ( xColControls - > getByIndex ( nViewCol ) , UNO_QUERY ) ;
2000-10-26 13:46:14 +00:00
: : rtl : : OUString aInitialText ;
if ( IsSearchableControl ( xCurControl , & aInitialText ) )
2011-03-01 12:56:59 +00:00
sInitialText = aInitialText ;
2000-10-26 13:46:14 +00:00
// prohibit the synchronization of the grid's display with the cursor's position
Reference < XPropertySet > xModelSet ( getControlModel ( ) , UNO_QUERY ) ;
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( xModelSet . is ( ) , " SbaXDataBrowserController::ExecuteSearch : no model set ?! " ) ;
2010-11-11 17:20:24 -03:00
xModelSet - > setPropertyValue ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " DisplayIsSynchron " ) ) , : : comphelper : : makeBoolAny ( sal_Bool ( sal_False ) ) ) ;
xModelSet - > setPropertyValue ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " AlwaysShowCursor " ) ) , : : comphelper : : makeBoolAny ( sal_Bool ( sal_True ) ) ) ;
xModelSet - > setPropertyValue ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " CursorColor " ) ) , makeAny ( sal_Int32 ( COL_LIGHTRED ) ) ) ;
2000-10-26 13:46:14 +00:00
2012-12-04 13:18:35 +02:00
Reference < : : com : : sun : : star : : util : : XNumberFormatsSupplier > xNFS ( : : dbtools : : getNumberFormats ( : : dbtools : : getConnection ( m_xRowSet ) , sal_True , comphelper : : getComponentContext ( getORB ( ) ) ) ) ;
2000-10-26 13:46:14 +00:00
2004-02-03 19:41:49 +00:00
SvxAbstractDialogFactory * pFact = SvxAbstractDialogFactory : : Create ( ) ;
2004-11-16 13:30:31 +00:00
AbstractFmSearchDialog * pDialog = NULL ;
if ( pFact )
2007-07-31 13:01:29 +00:00
{
: : std : : vector < String > aContextNames ;
2012-07-02 16:02:38 +01:00
aContextNames . push_back ( rtl : : OUString ( " Standard " ) ) ;
2007-07-31 13:01:29 +00:00
pDialog = pFact - > CreateFmSearchDialog ( getBrowserView ( ) , sInitialText , aContextNames , 0 , LINK ( this , SbaXDataBrowserController , OnSearchContextRequest ) ) ;
}
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( pDialog , " SbaXDataBrowserController::ExecuteSearch: could not get the search dialog! " ) ;
2004-11-16 13:30:31 +00:00
if ( pDialog )
{
pDialog - > SetActiveField ( sActiveField ) ;
pDialog - > SetFoundHandler ( LINK ( this , SbaXDataBrowserController , OnFoundData ) ) ;
pDialog - > SetCanceledNotFoundHdl ( LINK ( this , SbaXDataBrowserController , OnCanceledNotFound ) ) ;
pDialog - > Execute ( ) ;
delete pDialog ;
}
2000-10-26 13:46:14 +00:00
// restore the grid's normal operating state
2010-11-11 17:20:24 -03:00
xModelSet - > setPropertyValue ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " DisplayIsSynchron " ) ) , : : comphelper : : makeBoolAny ( sal_Bool ( sal_True ) ) ) ;
xModelSet - > setPropertyValue ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " AlwaysShowCursor " ) ) , : : comphelper : : makeBoolAny ( sal_Bool ( sal_False ) ) ) ;
xModelSet - > setPropertyValue ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " CursorColor " ) ) , Any ( ) ) ;
2000-10-26 13:46:14 +00:00
}
//------------------------------------------------------------------------------
2008-06-25 11:39:41 +00:00
void SbaXDataBrowserController : : Execute ( sal_uInt16 nId , const Sequence < PropertyValue > & _rArgs )
2000-10-26 13:46:14 +00:00
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::Execute " ) ;
2000-10-26 13:46:14 +00:00
sal_Bool bSortUp = sal_True ;
switch ( nId )
{
2008-06-25 11:39:41 +00:00
default :
SbaXDataBrowserController_Base : : Execute ( nId , _rArgs ) ;
return ;
2008-03-05 15:52:29 +00:00
case ID_BROWSER_INSERT_ROW :
try
{
if ( SaveModified ( ) )
{
getRowSet ( ) - > afterLast ( ) ;
// check if it is available
Reference < XResultSetUpdate > xUpdateCursor ( getRowSet ( ) , UNO_QUERY_THROW ) ;
xUpdateCursor - > moveToInsertRow ( ) ;
}
}
catch ( Exception & )
{
2011-03-12 12:04:35 +01:00
OSL_FAIL ( " Exception caught! " ) ;
2008-03-05 15:52:29 +00:00
}
break ;
case SID_FM_DELETEROWS :
if ( SaveModified ( ) )
{
SbaGridControl * pVclGrid = getBrowserView ( ) - > getVclControl ( ) ;
if ( pVclGrid )
{
if ( ! pVclGrid - > GetSelectRowCount ( ) )
{
pVclGrid - > DeactivateCell ( ) ;
pVclGrid - > SelectRow ( pVclGrid - > GetCurRow ( ) ) ;
}
pVclGrid - > DeleteSelectedRows ( ) ;
}
}
break ;
2000-10-26 13:46:14 +00:00
case ID_BROWSER_FILTERED :
if ( SaveModified ( ) )
{
Reference < XPropertySet > xActiveSet ( getRowSet ( ) , UNO_QUERY ) ;
sal_Bool bApplied = : : comphelper : : getBOOL ( xActiveSet - > getPropertyValue ( PROPERTY_APPLYFILTER ) ) ;
xActiveSet - > setPropertyValue ( PROPERTY_APPLYFILTER , : : comphelper : : makeBoolAny ( sal_Bool ( ! bApplied ) ) ) ;
2005-09-23 11:19:18 +00:00
reloadForm ( m_xLoadable ) ;
2000-10-26 13:46:14 +00:00
}
InvalidateFeature ( ID_BROWSER_FILTERED ) ;
break ;
case ID_BROWSER_EDITDOC :
{
2001-01-09 14:52:33 +00:00
sal_Int16 nGridMode = getBrowserView ( ) - > getVclControl ( ) - > GetOptions ( ) ;
2000-10-26 13:46:14 +00:00
if ( nGridMode = = DbGridControl : : OPT_READONLY )
2001-01-09 14:52:33 +00:00
getBrowserView ( ) - > getVclControl ( ) - > SetOptions ( DbGridControl : : OPT_UPDATE | DbGridControl : : OPT_INSERT | DbGridControl : : OPT_DELETE ) ;
2000-10-26 13:46:14 +00:00
// the options not supported by the data source will be removed automatically
else
{
2002-01-24 16:43:35 +00:00
if ( ! SaveModified ( ) )
2000-10-26 13:46:14 +00:00
// give the user a chance to save the current record (if neccessary)
break ;
// maybe the user wanted to reject the modified record ?
2002-05-22 13:03:34 +00:00
if ( GetState ( ID_BROWSER_UNDORECORD ) . bEnabled )
2004-09-09 08:41:14 +00:00
Execute ( ID_BROWSER_UNDORECORD , Sequence < PropertyValue > ( ) ) ;
2000-10-26 13:46:14 +00:00
2001-01-09 14:52:33 +00:00
getBrowserView ( ) - > getVclControl ( ) - > SetOptions ( DbGridControl : : OPT_READONLY ) ;
2000-10-26 13:46:14 +00:00
}
InvalidateFeature ( ID_BROWSER_EDITDOC ) ;
}
break ;
case ID_BROWSER_SEARCH :
2002-01-24 16:43:35 +00:00
if ( SaveModified ( ) )
2000-10-26 13:46:14 +00:00
ExecuteSearch ( ) ;
break ;
case ID_BROWSER_COPY :
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 ( getBrowserView ( ) - > getVclControl ( ) - > GetSelectRowCount ( ) > 0 )
{
getBrowserView ( ) - > getVclControl ( ) - > CopySelectedRowsToClipboard ( ) ;
break ;
}
// run through
2000-10-26 13:46:14 +00:00
case ID_BROWSER_CUT :
case ID_BROWSER_PASTE :
{
2001-06-29 07:45:10 +00:00
CellControllerRef xCurrentController = getBrowserView ( ) - > getVclControl ( ) - > Controller ( ) ;
2000-10-26 13:46:14 +00:00
if ( ! xCurrentController . Is ( ) )
// should be intercepted by GetState. Normally.
// Unfortunately ID_BROWSER_PASTE is a 'fast call' slot, which means it may be executed without checking if it is
// enabled. This would be really deadly herein if the current cell has no controller ...
return ;
Edit & rEdit = ( Edit & ) xCurrentController - > GetWindow ( ) ;
switch ( nId )
{
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
case ID_BROWSER_CUT : rEdit . Cut ( ) ; break ;
case SID_COPY : rEdit . Copy ( ) ; break ;
case ID_BROWSER_PASTE : rEdit . Paste ( ) ; break ;
2000-10-26 13:46:14 +00:00
}
if ( ID_BROWSER_CUT = = nId | | ID_BROWSER_PASTE = = nId )
{
xCurrentController - > SetModified ( ) ;
rEdit . Modify ( ) ;
}
}
break ;
case ID_BROWSER_SORTDOWN :
bSortUp = sal_False ;
// DON'T break
case ID_BROWSER_SORTUP :
{
if ( ! SaveModified ( ) )
break ;
if ( ! isValidCursor ( ) )
break ;
// only one sort order
Reference < XPropertySet > xField ( getBoundField ( ) , UNO_QUERY ) ;
if ( ! xField . is ( ) )
break ;
2010-01-22 08:14:22 +01:00
Reference < XSingleSelectQueryComposer > xParser = createParser_nothrow ( ) ;
const : : rtl : : OUString sOldSort = xParser - > getOrder ( ) ;
2007-11-13 14:33:26 +00:00
sal_Bool bParserSuccess = sal_False ;
2000-10-26 13:46:14 +00:00
HANDLE_SQL_ERRORS (
2010-01-22 08:14:22 +01:00
xParser - > setOrder ( : : rtl : : OUString ( ) ) ; xParser - > appendOrderByColumn ( xField , bSortUp ) ,
2000-10-26 13:46:14 +00:00
bParserSuccess ,
2012-04-29 23:36:57 +01:00
ModuleRes ( SBA_BROWSER_SETTING_ORDER ) . toString ( ) ,
2001-08-14 11:11:45 +00:00
" SbaXDataBrowserController::Execute : caught an exception while composing the new filter ! "
2000-10-26 13:46:14 +00:00
)
if ( bParserSuccess )
2010-01-22 08:14:22 +01:00
applyParserOrder ( sOldSort , xParser ) ;
2000-10-26 13:46:14 +00:00
}
break ;
case ID_BROWSER_AUTOFILTER :
{
if ( ! SaveModified ( ) )
break ;
if ( ! isValidCursor ( ) )
break ;
Reference < XPropertySet > xField ( getBoundField ( ) , UNO_QUERY ) ;
if ( ! xField . is ( ) )
break ;
2004-10-22 08:04:30 +00:00
// check if the column is a aggregate function
sal_Bool bHaving = sal_False ;
: : rtl : : OUString sName ;
xField - > getPropertyValue ( PROPERTY_NAME ) > > = sName ;
Reference < XColumnsSupplier > xColumnsSupplier ( m_xParser , UNO_QUERY ) ;
Reference < : : com : : sun : : star : : container : : XNameAccess > xCols = xColumnsSupplier . is ( ) ? xColumnsSupplier - > getColumns ( ) : Reference < : : com : : sun : : star : : container : : XNameAccess > ( ) ;
if ( xCols . is ( ) & & xCols - > hasByName ( sName ) )
{
Reference < XPropertySet > xProp ( xCols - > getByName ( sName ) , UNO_QUERY ) ;
static : : rtl : : OUString sAgg ( RTL_CONSTASCII_USTRINGPARAM ( " AggregateFunction " ) ) ;
if ( xProp - > getPropertySetInfo ( ) - > hasPropertyByName ( sAgg ) )
xProp - > getPropertyValue ( sAgg ) > > = bHaving ;
}
2010-01-22 08:14:22 +01:00
Reference < XSingleSelectQueryComposer > xParser = createParser_nothrow ( ) ;
const : : rtl : : OUString sOldFilter = xParser - > getFilter ( ) ;
const : : rtl : : OUString sOldHaving = xParser - > getHavingClause ( ) ;
2000-10-26 13:46:14 +00:00
Reference < XPropertySet > xFormSet ( getRowSet ( ) , UNO_QUERY ) ;
sal_Bool bApplied = : : comphelper : : getBOOL ( xFormSet - > getPropertyValue ( PROPERTY_APPLYFILTER ) ) ;
// do we have a filter but it's not applied ?
// -> completely overwrite it, else append one
if ( ! bApplied )
{
2010-01-22 08:14:22 +01:00
DO_SAFE ( ( bHaving ? xParser - > setHavingClause ( : : rtl : : OUString ( ) ) : xParser - > setFilter ( : : rtl : : OUString ( ) ) ) , " SbaXDataBrowserController::Execute : caught an exception while resetting the new filter ! " ) ;
2000-10-26 13:46:14 +00:00
}
2007-11-13 14:33:26 +00:00
sal_Bool bParserSuccess = sal_False ;
2004-10-22 08:04:30 +00:00
2012-08-30 03:58:55 +02:00
const sal_Int32 nOp = SQLFilterOperator : : EQUAL ;
2004-10-22 08:04:30 +00:00
if ( bHaving )
{
HANDLE_SQL_ERRORS (
2010-01-22 08:14:22 +01:00
xParser - > appendHavingClauseByColumn ( xField , sal_True , nOp ) ,
2004-10-22 08:04:30 +00:00
bParserSuccess ,
2012-04-29 23:36:57 +01:00
ModuleRes ( SBA_BROWSER_SETTING_FILTER ) . toString ( ) ,
2004-10-22 08:04:30 +00:00
" SbaXDataBrowserController::Execute : caught an exception while composing the new filter ! "
)
}
else
{
HANDLE_SQL_ERRORS (
2010-01-22 08:14:22 +01:00
xParser - > appendFilterByColumn ( xField , sal_True , nOp ) ,
2004-10-22 08:04:30 +00:00
bParserSuccess ,
2012-04-29 23:36:57 +01:00
ModuleRes ( SBA_BROWSER_SETTING_FILTER ) . toString ( ) ,
2004-10-22 08:04:30 +00:00
" SbaXDataBrowserController::Execute : caught an exception while composing the new filter ! "
)
}
2000-10-26 13:46:14 +00:00
if ( bParserSuccess )
2010-01-22 08:14:22 +01:00
applyParserFilter ( sOldFilter , bApplied , sOldHaving , xParser ) ;
2000-10-26 13:46:14 +00:00
InvalidateFeature ( ID_BROWSER_REMOVEFILTER ) ;
InvalidateFeature ( ID_BROWSER_FILTERED ) ;
}
break ;
case ID_BROWSER_ORDERCRIT :
ExecuteFilterSortCrit ( sal_False ) ;
break ;
case ID_BROWSER_FILTERCRIT :
ExecuteFilterSortCrit ( sal_True ) ;
InvalidateFeature ( ID_BROWSER_FILTERED ) ;
break ;
case ID_BROWSER_REMOVEFILTER :
{
if ( ! SaveModified ( ) )
break ;
2005-09-23 11:19:18 +00:00
sal_Bool bNeedPostReload = preReloadForm ( ) ;
2000-10-26 13:46:14 +00:00
// reset the filter and the sort property simutaneously so only _one_ new statement has to be
// sent
Reference < XPropertySet > xSet ( getRowSet ( ) , UNO_QUERY ) ;
2005-09-23 11:19:18 +00:00
if ( xSet . is ( ) )
{
xSet - > setPropertyValue ( PROPERTY_FILTER , makeAny ( : : rtl : : OUString ( ) ) ) ;
xSet - > setPropertyValue ( PROPERTY_HAVING_CLAUSE , makeAny ( : : rtl : : OUString ( ) ) ) ;
xSet - > setPropertyValue ( PROPERTY_ORDER , makeAny ( : : rtl : : OUString ( ) ) ) ;
}
try
{
reloadForm ( m_xLoadable ) ;
if ( bNeedPostReload )
postReloadForm ( ) ;
}
catch ( Exception & )
2000-10-26 13:46:14 +00:00
{
}
InvalidateFeature ( ID_BROWSER_REMOVEFILTER ) ;
InvalidateFeature ( ID_BROWSER_FILTERED ) ;
}
break ;
case ID_BROWSER_REFRESH :
2002-01-24 16:43:35 +00:00
if ( SaveModified ( ) )
2001-08-14 11:11:45 +00:00
{
2005-09-23 11:19:18 +00:00
if ( ! reloadForm ( m_xLoadable ) )
2001-07-17 12:07:48 +00:00
criticalFail ( ) ;
2001-08-14 11:11:45 +00:00
}
2000-10-26 13:46:14 +00:00
break ;
2002-05-22 13:03:34 +00:00
case ID_BROWSER_SAVERECORD :
2002-07-22 11:59:36 +00:00
if ( SaveModified ( sal_False ) )
2001-10-29 14:14:28 +00:00
setCurrentModified ( sal_False ) ;
break ;
2000-10-26 13:46:14 +00:00
2002-05-22 13:03:34 +00:00
case ID_BROWSER_UNDORECORD :
2000-10-26 13:46:14 +00:00
{
2001-10-26 06:55:37 +00:00
try
2000-10-26 13:46:14 +00:00
{
2001-10-26 06:55:37 +00:00
// restore the cursor state
Reference < XResultSetUpdate > xCursor ( getRowSet ( ) , UNO_QUERY ) ;
Reference < XPropertySet > xSet ( xCursor , UNO_QUERY ) ;
Any aVal = xSet - > getPropertyValue ( PROPERTY_ISNEW ) ;
if ( aVal . hasValue ( ) & & : : comphelper : : getBOOL ( aVal ) )
{
xCursor - > moveToInsertRow ( ) ;
// no need to reset the grid model after we moved to the insert row, this is done implicitly by the
// form
// (and in some cases it may be deadly to do the reset explicitly after the form did it implicitly,
// cause the form's reset may be async, and this leads to some nice deadlock scenarios ....)
}
else
{
xCursor - > cancelRowUpdates ( ) ;
// restore the grids state
Reference < : : com : : sun : : star : : form : : XReset > xReset ( getControlModel ( ) , UNO_QUERY ) ;
if ( xReset . is ( ) )
xReset - > reset ( ) ;
}
2000-10-26 13:46:14 +00:00
}
2001-10-26 06:55:37 +00:00
catch ( SQLException & )
2000-10-26 13:46:14 +00:00
{
}
2001-10-29 14:14:28 +00:00
setCurrentModified ( sal_False ) ;
2000-10-26 13:46:14 +00:00
}
}
}
//------------------------------------------------------------------------------
2002-07-22 11:59:36 +00:00
sal_Bool SbaXDataBrowserController : : SaveModified ( sal_Bool bAskFor )
2000-10-26 13:46:14 +00:00
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::SaveModified " ) ;
2002-07-22 11:59:36 +00:00
if ( bAskFor & & GetState ( ID_BROWSER_SAVERECORD ) . bEnabled )
{
getBrowserView ( ) - > getVclControl ( ) - > GrabFocus ( ) ;
QueryBox aQry ( getBrowserView ( ) - > getVclControl ( ) , ModuleRes ( QUERY_BRW_SAVEMODIFIED ) ) ;
switch ( aQry . Execute ( ) )
{
case RET_NO :
2004-09-09 08:41:14 +00:00
Execute ( ID_BROWSER_UNDORECORD , Sequence < PropertyValue > ( ) ) ;
2002-07-22 11:59:36 +00:00
return sal_True ;
case RET_CANCEL :
return sal_False ;
}
}
if ( ! CommitCurrent ( ) ) // das aktuelle Control committen lassen
2000-10-26 13:46:14 +00:00
return sal_False ;
Reference < XPropertySet > xFormSet ( getRowSet ( ) , UNO_QUERY ) ;
sal_Bool bResult = sal_False ;
try
{
if ( : : comphelper : : getBOOL ( xFormSet - > getPropertyValue ( PROPERTY_ISMODIFIED ) ) )
{
Reference < XResultSetUpdate > xCursor ( getRowSet ( ) , UNO_QUERY ) ;
if ( : : comphelper : : getBOOL ( xFormSet - > getPropertyValue ( PROPERTY_ISNEW ) ) )
xCursor - > insertRow ( ) ;
else
xCursor - > updateRow ( ) ;
}
bResult = sal_True ;
}
catch ( SQLException & )
{
}
2001-01-09 14:52:33 +00:00
catch ( Exception & )
2000-10-26 13:46:14 +00:00
{
2011-02-25 17:47:41 +01:00
OSL_FAIL ( " SbaXDataBrowserController::SaveModified : could not save the current record ! " ) ;
2000-10-26 13:46:14 +00:00
bResult = sal_False ;
}
2002-07-22 11:59:36 +00:00
InvalidateFeature ( ID_BROWSER_SAVERECORD ) ;
InvalidateFeature ( ID_BROWSER_UNDORECORD ) ;
2000-10-26 13:46:14 +00:00
return bResult ;
}
//------------------------------------------------------------------------------
sal_Bool SbaXDataBrowserController : : CommitCurrent ( )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::CommitCurrent " ) ;
2001-01-09 14:52:33 +00:00
if ( ! getBrowserView ( ) )
2000-10-26 13:46:14 +00:00
return sal_True ;
2001-01-09 14:52:33 +00:00
Reference < : : com : : sun : : star : : awt : : XControl > xActiveControl ( getBrowserView ( ) - > getGridControl ( ) ) ;
2000-10-26 13:46:14 +00:00
Reference < : : com : : sun : : star : : form : : XBoundControl > xLockingTest ( xActiveControl , UNO_QUERY ) ;
sal_Bool bControlIsLocked = xLockingTest . is ( ) & & xLockingTest - > getLock ( ) ;
if ( xActiveControl . is ( ) & & ! bControlIsLocked )
{
// zunaechst das Control fragen ob es das IFace unterstuetzt
Reference < : : com : : sun : : star : : form : : XBoundComponent > xBoundControl ( xActiveControl , UNO_QUERY ) ;
if ( ! xBoundControl . is ( ) )
xBoundControl = Reference < : : com : : sun : : star : : form : : XBoundComponent > ( xActiveControl - > getModel ( ) , UNO_QUERY ) ;
if ( xBoundControl . is ( ) & & ! xBoundControl - > commit ( ) )
return sal_False ;
}
return sal_True ;
}
2001-10-29 14:14:28 +00:00
//------------------------------------------------------------------------------
void SbaXDataBrowserController : : setCurrentModified ( sal_Bool _bSet )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::setCurrentModified " ) ;
2001-10-29 14:14:28 +00:00
m_bCurrentlyModified = _bSet ;
2002-05-22 13:03:34 +00:00
InvalidateFeature ( ID_BROWSER_SAVERECORD ) ;
2001-10-29 14:14:28 +00:00
InvalidateFeature ( ID_BROWSER_UNDORECORD ) ;
}
//------------------------------------------------------------------------------
void SbaXDataBrowserController : : RowChanged ( )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::RowChanged " ) ;
2001-10-29 14:14:28 +00:00
setCurrentModified ( sal_False ) ;
}
2000-10-26 13:46:14 +00:00
//------------------------------------------------------------------------------
void SbaXDataBrowserController : : ColumnChanged ( )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::ColumnChanged " ) ;
2000-10-26 13:46:14 +00:00
InvalidateFeature ( ID_BROWSER_SORTUP ) ;
InvalidateFeature ( ID_BROWSER_SORTDOWN ) ;
InvalidateFeature ( ID_BROWSER_ORDERCRIT ) ;
InvalidateFeature ( ID_BROWSER_FILTERCRIT ) ;
InvalidateFeature ( ID_BROWSER_AUTOFILTER ) ;
InvalidateFeature ( ID_BROWSER_REMOVEFILTER ) ;
2001-10-29 14:14:28 +00:00
setCurrentModified ( sal_False ) ;
2000-10-26 13:46:14 +00:00
}
//------------------------------------------------------------------------------
void SbaXDataBrowserController : : SelectionChanged ( )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::SelectionChanged " ) ;
2005-07-08 09:38:08 +00:00
// not interested in
2000-10-26 13:46:14 +00:00
}
//------------------------------------------------------------------------------
void SbaXDataBrowserController : : CellActivated ( )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::CellActivated " ) ;
2000-10-26 13:46:14 +00:00
m_aInvalidateClipboard . Start ( ) ;
2006-08-15 09:49:12 +00:00
OnInvalidateClipboard ( NULL ) ;
2000-10-26 13:46:14 +00:00
}
//------------------------------------------------------------------------------
void SbaXDataBrowserController : : CellDeactivated ( )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::CellDeactivated " ) ;
2000-10-26 13:46:14 +00:00
m_aInvalidateClipboard . Stop ( ) ;
2006-08-15 09:49:12 +00:00
OnInvalidateClipboard ( NULL ) ;
2000-10-26 13:46:14 +00:00
}
2002-05-23 11:25:52 +00:00
//------------------------------------------------------------------------------
2012-03-01 18:00:32 +01:00
IMPL_LINK_NOARG ( SbaXDataBrowserController , OnClipboardChanged )
2002-05-23 11:25:52 +00:00
{
2010-10-13 01:38:41 -05:00
SolarMutexGuard aGuard ;
2002-05-23 11:25:52 +00:00
return OnInvalidateClipboard ( NULL ) ;
}
2000-10-26 13:46:14 +00:00
//------------------------------------------------------------------------------
2006-08-15 09:49:12 +00:00
IMPL_LINK ( SbaXDataBrowserController , OnInvalidateClipboard , AutoTimer * , _pTimer )
2000-10-26 13:46:14 +00:00
{
InvalidateFeature ( ID_BROWSER_CUT ) ;
InvalidateFeature ( ID_BROWSER_COPY ) ;
2006-08-15 09:49:12 +00:00
// if the invalidation was triggered by the timer, we do not need to invalidate PASTE.
// The timer is only for checking the CUT/COPY slots regulariry, which depend on the
// selection state of the active cell
// TODO: get a callback at the Edit which allows to be notified when the selection
// changes. This would be much better than this cycle-eating polling mechanism here ....
if ( _pTimer ! = & m_aInvalidateClipboard )
InvalidateFeature ( ID_BROWSER_PASTE ) ;
2000-10-26 13:46:14 +00:00
return 0L ;
}
// -------------------------------------------------------------------------
Reference < XPropertySet > SbaXDataBrowserController : : getBoundField ( sal_uInt16 nViewPos ) const
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::SaveData " ) ;
2000-10-26 13:46:14 +00:00
Reference < XPropertySet > xEmptyReturn ;
// get the current column from the grid
if ( nViewPos = = ( sal_uInt16 ) - 1 )
{
2001-01-09 14:52:33 +00:00
Reference < : : com : : sun : : star : : form : : XGrid > xGrid ( getBrowserView ( ) - > getGridControl ( ) , UNO_QUERY ) ;
2000-10-26 13:46:14 +00:00
if ( ! xGrid . is ( ) )
return xEmptyReturn ;
nViewPos = xGrid - > getCurrentColumnPosition ( ) ;
}
2001-01-09 14:52:33 +00:00
sal_uInt16 nCurrentCol = getBrowserView ( ) - > View2ModelPos ( nViewPos ) ;
2000-10-26 13:46:14 +00:00
if ( nCurrentCol = = ( sal_uInt16 ) - 1 )
return xEmptyReturn ;
// get the according column from the model
Reference < : : com : : sun : : star : : container : : XIndexContainer > xCols ( getControlModel ( ) , UNO_QUERY ) ;
2004-08-02 14:31:55 +00:00
Reference < XPropertySet > xCurrentCol ( xCols - > getByIndex ( nCurrentCol ) , UNO_QUERY ) ;
2000-10-26 13:46:14 +00:00
if ( ! xCurrentCol . is ( ) )
return xEmptyReturn ;
2004-08-02 14:31:55 +00:00
xEmptyReturn . set ( xCurrentCol - > getPropertyValue ( PROPERTY_BOUNDFIELD ) , UNO_QUERY ) ;
2001-08-27 05:57:24 +00:00
return xEmptyReturn ;
2000-10-26 13:46:14 +00:00
}
//------------------------------------------------------------------------------
IMPL_LINK ( SbaXDataBrowserController , OnSearchContextRequest , FmSearchContext * , pContext )
{
2001-01-09 14:52:33 +00:00
Reference < : : com : : sun : : star : : container : : XIndexAccess > xPeerContainer ( getBrowserView ( ) - > getGridControl ( ) , UNO_QUERY ) ;
2000-10-26 13:46:14 +00:00
// check all grid columns for their control source
Reference < : : com : : sun : : star : : container : : XIndexAccess > xModelColumns ( getFormComponent ( ) , UNO_QUERY ) ;
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( xModelColumns . is ( ) , " SbaXDataBrowserController::OnSearchContextRequest : there is a grid control without columns ! " ) ;
2000-10-26 13:46:14 +00:00
// the case 'no columns' should be indicated with an empty container, I think ...
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( xModelColumns - > getCount ( ) > = xPeerContainer - > getCount ( ) , " SbaXDataBrowserController::OnSearchContextRequest : impossible : have more view than model columns ! " ) ;
2000-10-26 13:46:14 +00:00
String sFieldList ;
for ( sal_Int32 nViewPos = 0 ; nViewPos < xPeerContainer - > getCount ( ) ; + + nViewPos )
{
2004-08-02 14:31:55 +00:00
Reference < XInterface > xCurrentColumn ( xPeerContainer - > getByIndex ( nViewPos ) , UNO_QUERY ) ;
2000-10-26 13:46:14 +00:00
if ( ! xCurrentColumn . is ( ) )
continue ;
2010-11-24 01:07:16 +00:00
// can we use this column control for searching ?
2000-10-26 13:46:14 +00:00
if ( ! IsSearchableControl ( xCurrentColumn ) )
continue ;
2001-04-24 13:36:44 +00:00
sal_uInt16 nModelPos = getBrowserView ( ) - > View2ModelPos ( ( sal_uInt16 ) nViewPos ) ;
2004-08-02 14:31:55 +00:00
Reference < XPropertySet > xCurrentColModel ( xModelColumns - > getByIndex ( nModelPos ) , UNO_QUERY ) ;
2011-03-01 16:57:50 +00:00
String aName = : : comphelper : : getString ( xCurrentColModel - > getPropertyValue ( PROPERTY_CONTROLSOURCE ) ) ;
2000-10-26 13:46:14 +00:00
2011-03-01 12:56:59 +00:00
sFieldList + = aName ;
2000-10-26 13:46:14 +00:00
sFieldList + = ' ; ' ;
pContext - > arrFields . push_back ( xCurrentColumn ) ;
}
2012-06-11 13:15:18 +01:00
sFieldList = comphelper : : string : : stripEnd ( sFieldList , ' ; ' ) ;
2000-10-26 13:46:14 +00:00
2004-08-02 14:31:55 +00:00
pContext - > xCursor . set ( getRowSet ( ) , UNO_QUERY ) ;
2000-10-26 13:46:14 +00:00
pContext - > strUsedFields = sFieldList ;
// if the cursor is in a mode other than STANDARD -> reset
Reference < XPropertySet > xCursorSet ( pContext - > xCursor , UNO_QUERY ) ;
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( xCursorSet . is ( ) & & ! : : comphelper : : getBOOL ( xCursorSet - > getPropertyValue ( PROPERTY_ISMODIFIED ) ) ,
2000-10-26 13:46:14 +00:00
" SbaXDataBrowserController::OnSearchContextRequest : please do not call for cursors with modified rows ! " ) ;
if ( xCursorSet . is ( ) & & : : comphelper : : getBOOL ( xCursorSet - > getPropertyValue ( PROPERTY_ISNEW ) ) )
{
Reference < XResultSetUpdate > xUpdateCursor ( pContext - > xCursor , UNO_QUERY ) ;
xUpdateCursor - > moveToCurrentRow ( ) ;
}
return pContext - > arrFields . size ( ) ;
}
//------------------------------------------------------------------------------
IMPL_LINK ( SbaXDataBrowserController , OnFoundData , FmFoundRecordInformation * , pInfo )
{
Reference < : : com : : sun : : star : : sdbcx : : XRowLocate > xCursor ( getRowSet ( ) , UNO_QUERY ) ;
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( xCursor . is ( ) , " SbaXDataBrowserController::OnFoundData : shit happens. sometimes. but this is simply impossible ! " ) ;
2000-10-26 13:46:14 +00:00
// move the cursor
xCursor - > moveToBookmark ( pInfo - > aPosition ) ;
// let the grid snyc it's display with the cursor
Reference < XPropertySet > xModelSet ( getControlModel ( ) , UNO_QUERY ) ;
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( xModelSet . is ( ) , " SbaXDataBrowserController::OnFoundData : no model set ?! " ) ;
2010-11-11 17:20:24 -03:00
Any aOld = xModelSet - > getPropertyValue ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " DisplayIsSynchron " ) ) ) ;
xModelSet - > setPropertyValue ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " DisplayIsSynchron " ) ) , : : comphelper : : makeBoolAny ( sal_Bool ( sal_True ) ) ) ;
xModelSet - > setPropertyValue ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " DisplayIsSynchron " ) ) , aOld ) ;
2000-10-26 13:46:14 +00:00
// and move to the field
2001-01-09 14:52:33 +00:00
Reference < : : com : : sun : : star : : container : : XIndexAccess > aColumnControls ( getBrowserView ( ) - > getGridControl ( ) - > getPeer ( ) , UNO_QUERY ) ;
2003-12-01 17:01:33 +00:00
sal_uInt16 nViewPos ;
for ( nViewPos = 0 ; nViewPos < aColumnControls - > getCount ( ) ; + + nViewPos )
2000-10-26 13:46:14 +00:00
{
2004-08-02 14:31:55 +00:00
Reference < XInterface > xCurrent ( aColumnControls - > getByIndex ( nViewPos ) , UNO_QUERY ) ;
2000-10-26 13:46:14 +00:00
if ( IsSearchableControl ( xCurrent ) )
2008-12-11 07:05:03 +00:00
{
2000-10-31 13:09:13 +00:00
if ( pInfo - > nFieldPos )
2000-10-26 13:46:14 +00:00
- - pInfo - > nFieldPos ;
2000-10-31 13:09:13 +00:00
else
break ;
2008-12-11 07:05:03 +00:00
}
2000-10-26 13:46:14 +00:00
}
2001-01-09 14:52:33 +00:00
Reference < : : com : : sun : : star : : form : : XGrid > xGrid ( getBrowserView ( ) - > getGridControl ( ) , UNO_QUERY ) ;
2000-10-26 13:46:14 +00:00
xGrid - > setCurrentColumnPosition ( nViewPos ) ;
return 0 ;
}
//------------------------------------------------------------------------------
IMPL_LINK ( SbaXDataBrowserController , OnCanceledNotFound , FmFoundRecordInformation * , pInfo )
{
Reference < : : com : : sun : : star : : sdbcx : : XRowLocate > xCursor ( getRowSet ( ) , UNO_QUERY ) ;
2005-12-21 12:36:29 +00:00
try
{
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( xCursor . is ( ) , " SbaXDataBrowserController::OnCanceledNotFound : shit happens. sometimes. but this is simply impossible ! " ) ;
2005-12-21 12:36:29 +00:00
// move the cursor
xCursor - > moveToBookmark ( pInfo - > aPosition ) ;
}
catch ( const Exception & )
{
DBG_UNHANDLED_EXCEPTION ( ) ;
}
2000-10-26 13:46:14 +00:00
2005-12-21 12:36:29 +00:00
try
{
2010-11-24 01:07:16 +00:00
// let the grid snyc its display with the cursor
2005-12-21 12:36:29 +00:00
Reference < XPropertySet > xModelSet ( getControlModel ( ) , UNO_QUERY ) ;
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( xModelSet . is ( ) , " SbaXDataBrowserController::OnCanceledNotFound : no model set ?! " ) ;
2010-11-11 17:20:24 -03:00
Any aOld = xModelSet - > getPropertyValue ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " DisplayIsSynchron " ) ) ) ;
xModelSet - > setPropertyValue ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " DisplayIsSynchron " ) ) , : : comphelper : : makeBoolAny ( sal_Bool ( sal_True ) ) ) ;
xModelSet - > setPropertyValue ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " DisplayIsSynchron " ) ) , aOld ) ;
2005-12-21 12:36:29 +00:00
}
catch ( const Exception & )
{
DBG_UNHANDLED_EXCEPTION ( ) ;
}
2000-10-26 13:46:14 +00:00
return 0L ;
}
//------------------------------------------------------------------------------
2012-03-01 18:00:32 +01:00
IMPL_LINK_NOARG ( SbaXDataBrowserController , OnAsyncGetCellFocus )
2000-10-26 13:46:14 +00:00
{
2001-01-09 14:52:33 +00:00
SbaGridControl * pVclGrid = getBrowserView ( ) ? getBrowserView ( ) - > getVclControl ( ) : NULL ;
2000-10-26 13:46:14 +00:00
// if we have a controller, but the window for the controller doesn't have the focus, we correct this
2000-12-07 13:14:31 +00:00
if ( pVclGrid )
{
if ( ! pVclGrid - > IsEditing ( ) )
return 0L ;
2000-10-26 13:46:14 +00:00
2000-12-07 13:14:31 +00:00
if ( pVclGrid - > HasChildPathFocus ( ) )
pVclGrid - > Controller ( ) - > GetWindow ( ) . GrabFocus ( ) ;
}
2000-10-26 13:46:14 +00:00
return 0L ;
}
//------------------------------------------------------------------------------
2001-07-17 12:07:48 +00:00
void SbaXDataBrowserController : : criticalFail ( )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::criticalFail " ) ;
2001-07-17 12:07:48 +00:00
InvalidateAll ( ) ;
2009-12-11 09:51:25 +01:00
m_nRowSetPrivileges = 0 ;
2001-07-17 12:07:48 +00:00
}
//------------------------------------------------------------------------------
void SbaXDataBrowserController : : LoadFinished ( sal_Bool /*bWasSynch*/ )
2000-10-26 13:46:14 +00:00
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::LoadFinished " ) ;
2009-12-11 09:51:25 +01:00
m_nRowSetPrivileges = 0 ;
2001-08-16 09:39:55 +00:00
if ( isValid ( ) & & ! loadingCancelled ( ) )
2000-10-26 13:46:14 +00:00
{
2009-12-11 09:51:25 +01:00
// obtain cached values
try
{
Reference < XPropertySet > xFormProps ( m_xLoadable , UNO_QUERY_THROW ) ;
OSL_VERIFY ( xFormProps - > getPropertyValue ( PROPERTY_PRIVILEGES ) > > = m_nRowSetPrivileges ) ;
}
catch ( const Exception & )
{
DBG_UNHANDLED_EXCEPTION ( ) ;
}
2000-10-26 13:46:14 +00:00
// --------------------------------
// switch the control to alive mode
2001-01-09 14:52:33 +00:00
getBrowserView ( ) - > getGridControl ( ) - > setDesignMode ( sal_False ) ;
2000-10-26 13:46:14 +00:00
2009-07-06 09:00:26 +00:00
// -------------------------------
initializeParser ( ) ;
2009-04-23 10:42:05 +00:00
// -------------------------------
InvalidateAll ( ) ;
m_aAsyncGetCellFocus . Call ( ) ;
}
}
// -----------------------------------------------------------------------------
void SbaXDataBrowserController : : initializeParser ( ) const
{
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::initializeParser " ) ;
if ( ! m_xParser . is ( ) )
{
2000-10-26 13:46:14 +00:00
// ----------------------------------------------
// create a parser (needed for filtering/sorting)
try
{
2009-04-23 10:42:05 +00:00
const Reference < XPropertySet > xFormSet ( getRowSet ( ) , UNO_QUERY ) ;
2007-11-21 14:50:24 +00:00
if ( : : comphelper : : getBOOL ( xFormSet - > getPropertyValue ( PROPERTY_ESCAPE_PROCESSING ) ) )
2000-10-26 13:46:14 +00:00
{ // (only if the statement isn't native)
// (it is allowed to use the PROPERTY_ISPASSTHROUGH : _after_ loading a form it is valid)
2010-01-22 08:14:22 +01:00
xFormSet - > getPropertyValue ( PROPERTY_SINGLESELECTQUERYCOMPOSER ) > > = m_xParser ;
2000-10-26 13:46:14 +00:00
}
}
2001-01-09 14:52:33 +00:00
catch ( Exception & )
2000-10-26 13:46:14 +00:00
{
2009-07-06 09:00:26 +00:00
DBG_UNHANDLED_EXCEPTION ( ) ;
2000-10-26 13:46:14 +00:00
m_xParser = NULL ;
// no further handling, we ignore the error
}
}
}
2001-01-09 14:52:33 +00:00
//------------------------------------------------------------------------------
2006-06-20 01:55:50 +00:00
void SbaXDataBrowserController : : loaded ( const EventObject & /*aEvent*/ ) throw ( RuntimeException )
2001-01-09 14:52:33 +00:00
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::loaded " ) ;
2001-01-09 14:52:33 +00:00
// not interested in
// we're loading within an separate thread and have a handling for it's "finished event"
}
//------------------------------------------------------------------------------
2006-06-20 01:55:50 +00:00
void SbaXDataBrowserController : : unloading ( const EventObject & /*aEvent*/ ) throw ( RuntimeException )
2001-01-09 14:52:33 +00:00
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::unloading " ) ;
2001-01-09 14:52:33 +00:00
// not interested in
}
//------------------------------------------------------------------------------
2006-06-20 01:55:50 +00:00
void SbaXDataBrowserController : : unloaded ( const EventObject & /*aEvent*/ ) throw ( RuntimeException )
2001-01-09 14:52:33 +00:00
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::unloaded " ) ;
2010-07-07 08:07:40 +02:00
m_xParser . clear ( ) ;
2001-01-09 14:52:33 +00:00
InvalidateAll ( ) ;
2010-11-24 01:07:16 +00:00
// do this asynchronously, there are other listeners reacting on this message ...
2001-01-09 14:52:33 +00:00
// (it's a little hack : the grid columns are listening to this event, too, and their bound field may
// change as a reaction on that event. as we have no chance to be notified of this change (which is
// the one we're interested in) we give them time to do what they want to before invalidating our
// bound-field-dependent slots ....
}
//------------------------------------------------------------------------------
2006-06-20 01:55:50 +00:00
void SbaXDataBrowserController : : reloading ( const EventObject & /*aEvent*/ ) throw ( RuntimeException )
2001-01-09 14:52:33 +00:00
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::reloading " ) ;
2001-01-09 14:52:33 +00:00
// not interested in
}
2000-10-26 13:46:14 +00:00
2001-01-09 14:52:33 +00:00
//------------------------------------------------------------------------------
2006-06-20 01:55:50 +00:00
void SbaXDataBrowserController : : reloaded ( const EventObject & /*aEvent*/ ) throw ( RuntimeException )
2001-01-09 14:52:33 +00:00
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::reloaded " ) ;
2001-01-09 14:52:33 +00:00
InvalidateAll ( ) ;
2006-06-20 01:55:50 +00:00
// do this asynchronously, there are other listeners reacting on this message ...
2001-01-09 14:52:33 +00:00
// (it's a little hack : the grid columns are listening to this event, too, and their bound field may
// change as a reaction on that event. as we have no chance to be notified of this change (which is
// the one we're interested in) we give them time to do what they want to before invalidating our
// bound-field-dependent slots ....
}
2000-10-26 13:46:14 +00:00
//------------------------------------------------------------------------------
void SbaXDataBrowserController : : enterFormAction ( )
{
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 ( ! m_nFormActionNestingLevel )
// first action -> reset
m_aCurrentError . clear ( ) ;
2000-10-26 13:46:14 +00:00
+ + m_nFormActionNestingLevel ;
}
//------------------------------------------------------------------------------
void SbaXDataBrowserController : : leaveFormAction ( )
{
2011-02-03 00:33:36 +01:00
OSL_ENSURE ( m_nFormActionNestingLevel > 0 , " SbaXDataBrowserController::leaveFormAction : invalid call ! " ) ;
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 ( - - m_nFormActionNestingLevel > 0 )
return ;
if ( ! m_aCurrentError . isValid ( ) )
return ;
m_aAsyncDisplayError . Call ( ) ;
2000-10-26 13:46:14 +00:00
}
2001-07-17 12:07:48 +00:00
// -------------------------------------------------------------------------
sal_Bool SbaXDataBrowserController : : isLoaded ( ) const
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::isLoaded " ) ;
2001-08-27 05:57:24 +00:00
return m_xLoadable . is ( ) & & m_xLoadable - > isLoaded ( ) ;
2001-07-17 12:07:48 +00:00
}
2000-10-26 13:46:14 +00:00
// -------------------------------------------------------------------------
sal_Bool SbaXDataBrowserController : : isValidCursor ( ) const
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::isValidCursor " ) ;
2001-08-27 05:57:24 +00:00
if ( ! m_xColumnsSupplier . is ( ) )
2000-10-26 13:46:14 +00:00
return sal_False ;
2001-08-27 05:57:24 +00:00
Reference < : : com : : sun : : star : : container : : XNameAccess > xCols = m_xColumnsSupplier - > getColumns ( ) ;
2001-08-24 05:40:35 +00:00
if ( ! xCols . is ( ) | | ! xCols - > hasElements ( ) )
2000-10-26 13:46:14 +00:00
return sal_False ;
2001-01-15 08:36:15 +00:00
2009-04-23 10:42:05 +00:00
sal_Bool bIsValid = ! ( m_xRowSet - > isBeforeFirst ( ) | | m_xRowSet - > isAfterLast ( ) ) ;
if ( ! bIsValid )
{
Reference < XPropertySet > xProp ( m_xRowSet , UNO_QUERY ) ;
bIsValid = : : cppu : : any2bool ( xProp - > getPropertyValue ( PROPERTY_ISNEW ) ) ;
if ( ! bIsValid )
{
CWS-TOOLING: integrate CWS evoab2def
2009-05-28 16:00:19 +0200 fs r272412 : don't use createFalse - Evo 2.22 simply hangs when ask for all contacts without a first name. Instead, in the WHERE 0=1 case, simply create an empty result set
2009-05-22 14:25:51 +0200 fs r272193 : #i10000#
2009-05-22 14:25:37 +0200 fs r272192 : oops, ENABLE_EVOAB2 for some platforms only, not generically
2009-05-22 14:19:00 +0200 fs r272191 : #i10000#
2009-05-22 12:42:38 +0200 fs r272183 : when sorting, properly use a syslocale collator, instead of comparing the numerical values of the string's UTF-16 code points
2009-05-20 15:09:00 +0200 fs r272131 : clear/getWarnings: also allowed without cache
2009-05-20 14:11:19 +0200 fs r272128 : removed debug traces
2009-05-20 14:03:31 +0200 fs r272126 : #i55701# +STR_SORT_BY_COL_ONLY
2009-05-20 14:02:29 +0200 fs r272125 : implement sorting
2009-05-20 10:10:19 +0200 fs r272107 : #i10000#
2009-05-19 16:02:17 +0200 fs r272089 : #i10000#
2009-05-19 16:02:02 +0200 fs r272088 : #i55701# strings for new error condition DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 16:01:31 +0200 fs r272087 : #i55701# use DATA_CANNOT_SELECT_UNFILTERED as standardized error code
2009-05-19 15:59:59 +0200 fs r272086 : #i55701# +DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 15:46:12 +0200 fs r272084 : #i55701# recognize the DATA_CANNOT_SELECT_UNFILTERED error condition, and allow filtering in this case, even when the result set is empty
2009-05-19 09:06:50 +0200 fs r272059 : merging changes from CWS dba32b, to prevent future conflicts with upcoming local changes
2009-05-18 21:48:58 +0200 fs r272054 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:48:42 +0200 fs r272053 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:47:41 +0200 fs r272052 : +setExternalWarnings
2009-05-18 21:47:12 +0200 fs r272051 : #i55701# when re/loading the form, display any possible warnings
2009-05-18 21:43:26 +0200 fs r272050 : #i55701# implement XWarningsSupplier, exposing the warnings of our result set
2009-05-18 21:42:51 +0200 fs r272049 : #i55701# implement XWarningsSupplier, exposing the warnings of our aggregate RowSet
2009-05-18 17:53:59 +0200 fs r272041 : #i55701# moved the (I)WarningsContainer from dbaccess to connectivity, to be able to use it in the latter module, too
2009-05-18 17:24:10 +0200 fs r272040 : #i55701# properly enable the various Evolution types
2009-05-18 14:52:19 +0200 fs r272024 : #i55701# properly enable the Evolution types
2009-05-18 13:57:10 +0200 fs r272018 : fixed/extended whereAnalysis (column searching still not enabled, as neither LIKE nor = seem to work with my (somewhat older) Evolution version)
2009-05-18 13:56:08 +0200 fs r272017 : extended showParseTree
2009-05-18 13:55:25 +0200 fs r272016 : extended showParseTree
2009-05-18 11:40:16 +0200 fs r272008 : #i55701#
2009-05-18 11:39:02 +0200 fs r272006 : let the PreparedStatement return proper meta data, too
2009-05-18 10:05:37 +0200 fs r271999 : moved the XStatement interface to from OCommonStatement to OStatement - the former class is also the base for other classes which should not have this interface
2009-05-15 21:53:22 +0200 fs r271973 : collectColumnInformation: report invalid meta data as assertion
2009-05-15 21:51:40 +0200 fs r271972 : showParseTree should be const
2009-05-15 21:51:26 +0200 fs r271971 : showParseTree should be const
2009-05-15 21:51:03 +0200 fs r271970 : properly recognize the 'WHERE 0 = 1' clause, this way having proper statement meta data, this way saving much much calls from the DBA framework
2009-05-15 20:29:03 +0200 fs r271969 : cleaned up the mess with the statement classes
2009-05-15 15:51:11 +0200 fs r271944 : let the result set properly init its meta data
2009-05-15 15:29:54 +0200 fs r271939 : proper property implementations for the resultset class
2009-05-15 15:01:31 +0200 fs r271936 : proper property implementations for the statement class
2009-05-08 14:46:33 +0200 fs r271717 : component_foo must be PUBLIC
2009-05-06 09:20:05 +0200 fs r271565 : #i10000# (warnings on unxlngi6)
2009-05-06 09:01:30 +0200 fs r271564 : #i101493#
2009-05-05 23:08:12 +0200 fs r271560 : #i55701# merging the changes from the ancient (CVS-based) CWS evoab2default into this CWS here
2009-06-05 12:31:05 +00:00
bIsValid = m_xParser . is ( ) ;
2009-04-23 10:42:05 +00:00
}
2010-11-24 01:07:16 +00:00
}
2009-04-23 10:42:05 +00:00
return bIsValid ;
2000-10-26 13:46:14 +00:00
}
2000-11-07 17:34:39 +00:00
2003-04-01 13:01:01 +00:00
// -----------------------------------------------------------------------------
2006-06-20 01:55:50 +00:00
sal_Int16 SbaXDataBrowserController : : getCurrentColumnPosition ( )
2003-04-01 13:01:01 +00:00
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::getCurrentColumnPosition " ) ;
2003-04-01 13:01:01 +00:00
Reference < : : com : : sun : : star : : form : : XGrid > xGrid ( getBrowserView ( ) - > getGridControl ( ) , UNO_QUERY ) ;
2006-06-20 01:55:50 +00:00
sal_Int16 nViewPos = - 1 ;
2003-04-01 13:01:01 +00:00
try
{
if ( xGrid . is ( ) )
nViewPos = xGrid - > getCurrentColumnPosition ( ) ;
}
catch ( Exception & ) { }
return nViewPos ;
}
// -----------------------------------------------------------------------------
2006-06-20 01:55:50 +00:00
void SbaXDataBrowserController : : setCurrentColumnPosition ( sal_Int16 _nPos )
2003-04-01 13:01:01 +00:00
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::setCurrentColumnPosition " ) ;
2003-04-01 13:01:01 +00:00
Reference < : : com : : sun : : star : : form : : XGrid > xGrid ( getBrowserView ( ) - > getGridControl ( ) , UNO_QUERY ) ;
try
{
if ( - 1 ! = _nPos )
xGrid - > setCurrentColumnPosition ( _nPos ) ;
}
catch ( Exception & ) { }
}
2004-06-01 09:11:12 +00:00
// -----------------------------------------------------------------------------
void SbaXDataBrowserController : : BeforeDrop ( )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::BeforeDrop " ) ;
2004-06-01 09:11:12 +00:00
Reference < : : com : : sun : : star : : sdb : : XSQLErrorBroadcaster > xFormError ( getRowSet ( ) , UNO_QUERY ) ;
if ( xFormError . is ( ) )
xFormError - > removeSQLErrorListener ( ( : : com : : sun : : star : : sdb : : XSQLErrorListener * ) this ) ;
}
// -----------------------------------------------------------------------------
void SbaXDataBrowserController : : AfterDrop ( )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::AfterDrop " ) ;
2004-06-01 09:11:12 +00:00
Reference < : : com : : sun : : star : : sdb : : XSQLErrorBroadcaster > xFormError ( getRowSet ( ) , UNO_QUERY ) ;
if ( xFormError . is ( ) )
xFormError - > addSQLErrorListener ( ( : : com : : sun : : star : : sdb : : XSQLErrorListener * ) this ) ;
}
2004-09-09 08:41:14 +00:00
// -----------------------------------------------------------------------------
2005-09-23 11:19:18 +00:00
void SbaXDataBrowserController : : addColumnListeners ( const Reference < : : com : : sun : : star : : awt : : XControlModel > & _xGridControlModel )
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::addColumnListeners " ) ;
2005-09-23 11:19:18 +00:00
// ... all the grid columns
Reference < : : com : : sun : : star : : container : : XIndexContainer > xColumns ( _xGridControlModel , UNO_QUERY ) ;
if ( xColumns . is ( ) )
{
sal_Int32 nCount = xColumns - > getCount ( ) ;
for ( sal_uInt16 i = 0 ; i < nCount ; + + i )
{
Reference < XPropertySet > xCol ( xColumns - > getByIndex ( i ) , UNO_QUERY ) ;
AddColumnListener ( xCol ) ;
}
}
}
// -----------------------------------------------------------------------------
2006-06-20 01:55:50 +00:00
sal_Bool SbaXDataBrowserController : : InitializeGridModel ( const Reference < : : com : : sun : : star : : form : : XFormComponent > & /*xGrid*/ )
2005-09-23 11:19:18 +00:00
{
2009-04-23 10:42:05 +00:00
RTL_LOGFILE_CONTEXT_AUTHOR ( aLogger , " dbaui " , " Ocke.Janssen@sun.com " , " SbaXDataBrowserController::InitializeGridModel " ) ;
2005-09-23 11:19:18 +00:00
return sal_True ;
}
2000-10-31 09:00:53 +00:00
//..................................................................
} // namespace dbaui
//..................................................................
2010-10-12 15:59:03 +02:00
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */