2010-10-12 15:53:47 +02:00
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2000-09-18 16:07:07 +00:00
/*************************************************************************
*
2008-04-10 23:59:15 +00:00
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER .
2000-09-18 16:07:07 +00:00
*
2010-02-12 15:01:35 +01:00
* Copyright 2000 , 2010 Oracle and / or its affiliates .
2000-09-18 16:07:07 +00:00
*
2008-04-10 23:59:15 +00:00
* OpenOffice . org - a multi - platform office productivity suite
2000-09-18 16:07:07 +00:00
*
2008-04-10 23:59:15 +00:00
* This file is part of OpenOffice . org .
2000-09-18 16:07:07 +00:00
*
2008-04-10 23:59:15 +00:00
* OpenOffice . org is free software : you can redistribute it and / or modify
* it under the terms of the GNU Lesser General Public License version 3
* only , as published by the Free Software Foundation .
2000-09-18 16:07:07 +00:00
*
2008-04-10 23:59:15 +00:00
* OpenOffice . org is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU Lesser General Public License version 3 for more details
* ( a copy is included in the LICENSE file that accompanied this code ) .
2000-09-18 16:07:07 +00:00
*
2008-04-10 23:59:15 +00:00
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice . org . If not , see
* < http : //www.openoffice.org/license.html>
* for a copy of the LGPLv3 License .
2000-09-18 16:07:07 +00:00
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2006-09-17 04:05:26 +00:00
// MARKER(update_precomp.py): autogen include statement, do not remove
# include "precompiled_svx.hxx"
2004-07-05 14:50:20 +00:00
# include "fmcontrolbordermanager.hxx"
2005-01-05 11:20:25 +00:00
# include "fmcontrollayout.hxx"
2009-10-30 11:38:26 +01:00
# include "formcontroller.hxx"
# include "formfeaturedispatcher.hxx"
2008-08-19 08:47:45 +00:00
# include "fmdocumentclassification.hxx"
2009-10-30 11:38:26 +01:00
# include "formcontrolling.hxx"
2008-08-19 08:47:45 +00:00
# include "fmprop.hrc"
2009-10-30 11:38:26 +01:00
# include "svx/dialmgr.hxx"
2010-04-20 15:55:51 +02:00
# include "svx/fmresids.hrc"
2007-07-24 11:01:33 +00:00
# include "fmservs.hxx"
2009-11-04 12:06:36 +01:00
# include "svx/fmtools.hxx"
2008-08-19 08:47:45 +00:00
# include "fmurl.hxx"
/** === begin UNO includes === **/
# include <com/sun/star/awt/FocusChangeReason.hpp>
2000-09-18 16:07:07 +00:00
# include <com/sun/star/awt/XCheckBox.hpp>
2008-08-19 08:47:45 +00:00
# include <com/sun/star/awt/XComboBox.hpp>
2000-09-18 16:07:07 +00:00
# include <com/sun/star/awt/XListBox.hpp>
2008-08-19 08:47:45 +00:00
# include <com/sun/star/awt/XVclWindowPeer.hpp>
# include <com/sun/star/beans/NamedValue.hpp>
# include <com/sun/star/beans/PropertyAttribute.hpp>
# include <com/sun/star/container/XIdentifierReplace.hpp>
2000-09-18 16:07:07 +00:00
# include <com/sun/star/form/TabulatorCycle.hpp>
2008-08-19 08:47:45 +00:00
# include <com/sun/star/form/validation/XValidatableFormComponent.hpp>
# include <com/sun/star/form/XBoundComponent.hpp>
2000-09-18 16:07:07 +00:00
# include <com/sun/star/form/XBoundControl.hpp>
2008-08-19 08:47:45 +00:00
# include <com/sun/star/form/XGridControl.hpp>
# include <com/sun/star/form/XLoadable.hpp>
# include <com/sun/star/form/XReset.hpp>
2000-09-18 16:07:07 +00:00
# include <com/sun/star/frame/XController.hpp>
2003-03-27 14:06:05 +00:00
# include <com/sun/star/sdb/ParametersRequest.hpp>
2008-08-19 08:47:45 +00:00
# include <com/sun/star/sdb/RowChangeAction.hpp>
# include <com/sun/star/sdb/XInteractionSupplyParameters.hpp>
# include <com/sun/star/sdbc/ColumnValue.hpp>
2010-09-17 08:38:54 +02:00
# include <com/sun/star/sdbc/DataType.hpp>
2008-08-19 08:47:45 +00:00
# include <com/sun/star/util/XURLTransformer.hpp>
2009-10-30 11:38:26 +01:00
# include <com/sun/star/form/runtime/FormOperations.hpp>
# include <com/sun/star/form/runtime/FormFeature.hpp>
# include <com/sun/star/container/XContainer.hpp>
# include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
# include <com/sun/star/util/XNumberFormatter.hpp>
# include <com/sun/star/sdb/SQLContext.hpp>
# include <com/sun/star/sdb/XColumn.hpp>
2008-08-19 08:47:45 +00:00
/** === end UNO includes === **/
2000-09-18 16:07:07 +00:00
2000-10-20 13:18:57 +00:00
# include <comphelper/enumhelper.hxx>
2007-07-24 11:01:33 +00:00
# include <comphelper/extract.hxx>
2008-08-19 08:47:45 +00:00
# include <comphelper/interaction.hxx>
# include <comphelper/namedvaluecollection.hxx>
# include <comphelper/propagg.hxx>
# include <comphelper/property.hxx>
# include <comphelper/sequence.hxx>
# include <comphelper/uno3.hxx>
2010-11-22 14:38:05 +01:00
# include <comphelper/flagguard.hxx>
2000-09-18 16:07:07 +00:00
# include <cppuhelper/queryinterface.hxx>
# include <cppuhelper/typeprovider.hxx>
2008-08-19 08:47:45 +00:00
# include <toolkit/controls/unocontrol.hxx>
# include <toolkit/helper/vclunohelper.hxx>
# include <tools/debug.hxx>
# include <tools/diagnose_ex.h>
# include <tools/shl.hxx>
# include <vcl/msgbox.hxx>
# include <vcl/svapp.hxx>
2010-10-16 03:18:35 -05:00
# include <osl/mutex.hxx>
2009-04-23 10:42:05 +00:00
# include <rtl/logfile.hxx>
2006-11-14 12:24:06 +00:00
2004-04-13 10:05:48 +00:00
# include <algorithm>
2011-02-08 17:39:27 +01:00
# include <o3tl/compat_functional.hxx>
2004-04-13 10:05:48 +00:00
2004-07-05 14:50:20 +00:00
using namespace : : com : : sun : : star ;
2000-10-31 08:31:59 +00:00
using namespace : : comphelper ;
2001-05-29 13:15:08 +00:00
using namespace : : connectivity ;
2001-07-25 12:44:28 +00:00
using namespace : : connectivity : : simple ;
2000-09-18 16:07:07 +00:00
2009-10-23 09:46:03 +02:00
//------------------------------------------------------------------
: : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : uno : : XInterface > SAL_CALL
FormController_NewInstance_Impl ( const : : com : : sun : : star : : uno : : Reference < : : com : : sun : : star : : lang : : XMultiServiceFactory > & _rxORB )
{
return * ( new : : svxform : : FormController ( _rxORB ) ) ;
}
namespace svxform
{
/** === begin UNO using === **/
using : : com : : sun : : star : : sdb : : XColumn ;
using : : com : : sun : : star : : awt : : XControl ;
using : : com : : sun : : star : : awt : : XTabController ;
using : : com : : sun : : star : : awt : : XToolkit ;
using : : com : : sun : : star : : awt : : XWindowPeer ;
using : : com : : sun : : star : : form : : XGrid ;
using : : com : : sun : : star : : beans : : XPropertySet ;
using : : com : : sun : : star : : uno : : UNO_SET_THROW ;
using : : com : : sun : : star : : uno : : UNO_QUERY_THROW ;
using : : com : : sun : : star : : container : : XIndexAccess ;
using : : com : : sun : : star : : uno : : Exception ;
using : : com : : sun : : star : : uno : : XInterface ;
using : : com : : sun : : star : : uno : : UNO_QUERY ;
using : : com : : sun : : star : : uno : : Sequence ;
using : : com : : sun : : star : : uno : : Reference ;
using : : com : : sun : : star : : beans : : XPropertySetInfo ;
using : : com : : sun : : star : : beans : : PropertyValue ;
using : : com : : sun : : star : : uno : : RuntimeException ;
using : : com : : sun : : star : : lang : : IndexOutOfBoundsException ;
using : : com : : sun : : star : : sdb : : XInteractionSupplyParameters ;
using : : com : : sun : : star : : awt : : XTextComponent ;
2009-10-29 15:55:37 +01:00
using : : com : : sun : : star : : awt : : XTextListener ;
2009-10-23 09:46:03 +02:00
using : : com : : sun : : star : : uno : : Any ;
using : : com : : sun : : star : : frame : : XDispatch ;
using : : com : : sun : : star : : lang : : XMultiServiceFactory ;
using : : com : : sun : : star : : uno : : XAggregation ;
using : : com : : sun : : star : : uno : : Type ;
using : : com : : sun : : star : : lang : : IllegalArgumentException ;
using : : com : : sun : : star : : sdbc : : XConnection ;
using : : com : : sun : : star : : sdbc : : XRowSet ;
using : : com : : sun : : star : : sdbc : : XDatabaseMetaData ;
using : : com : : sun : : star : : util : : XNumberFormatsSupplier ;
using : : com : : sun : : star : : util : : XNumberFormatter ;
using : : com : : sun : : star : : sdbcx : : XColumnsSupplier ;
using : : com : : sun : : star : : container : : XNameAccess ;
using : : com : : sun : : star : : lang : : EventObject ;
using : : com : : sun : : star : : beans : : Property ;
using : : com : : sun : : star : : container : : XEnumeration ;
using : : com : : sun : : star : : form : : XFormComponent ;
using : : com : : sun : : star : : form : : runtime : : XFormOperations ;
2009-10-29 11:59:44 +01:00
using : : com : : sun : : star : : form : : runtime : : FilterEvent ;
using : : com : : sun : : star : : form : : runtime : : XFilterControllerListener ;
2009-10-23 09:46:03 +02:00
using : : com : : sun : : star : : awt : : XControlContainer ;
using : : com : : sun : : star : : container : : XIdentifierReplace ;
using : : com : : sun : : star : : lang : : WrappedTargetException ;
using : : com : : sun : : star : : form : : XFormControllerListener ;
using : : com : : sun : : star : : awt : : XWindow ;
using : : com : : sun : : star : : sdbc : : XResultSet ;
using : : com : : sun : : star : : awt : : XControlModel ;
using : : com : : sun : : star : : awt : : XTabControllerModel ;
using : : com : : sun : : star : : beans : : PropertyChangeEvent ;
using : : com : : sun : : star : : form : : validation : : XValidatableFormComponent ;
using : : com : : sun : : star : : form : : XLoadable ;
using : : com : : sun : : star : : script : : XEventAttacherManager ;
using : : com : : sun : : star : : form : : XBoundControl ;
using : : com : : sun : : star : : beans : : XPropertyChangeListener ;
using : : com : : sun : : star : : awt : : TextEvent ;
using : : com : : sun : : star : : form : : XBoundComponent ;
using : : com : : sun : : star : : awt : : XCheckBox ;
using : : com : : sun : : star : : awt : : XComboBox ;
using : : com : : sun : : star : : awt : : XListBox ;
using : : com : : sun : : star : : awt : : ItemEvent ;
using : : com : : sun : : star : : util : : XModifyListener ;
using : : com : : sun : : star : : form : : XReset ;
using : : com : : sun : : star : : frame : : XDispatchProviderInterception ;
using : : com : : sun : : star : : form : : XGridControl ;
using : : com : : sun : : star : : awt : : XVclWindowPeer ;
using : : com : : sun : : star : : form : : validation : : XValidator ;
using : : com : : sun : : star : : awt : : FocusEvent ;
using : : com : : sun : : star : : sdb : : SQLContext ;
using : : com : : sun : : star : : container : : XChild ;
using : : com : : sun : : star : : form : : TabulatorCycle_RECORDS ;
using : : com : : sun : : star : : container : : ContainerEvent ;
using : : com : : sun : : star : : lang : : DisposedException ;
using : : com : : sun : : star : : lang : : Locale ;
using : : com : : sun : : star : : beans : : NamedValue ;
using : : com : : sun : : star : : lang : : NoSupportException ;
using : : com : : sun : : star : : sdb : : RowChangeEvent ;
using : : com : : sun : : star : : frame : : XStatusListener ;
using : : com : : sun : : star : : frame : : XDispatchProviderInterceptor ;
using : : com : : sun : : star : : sdb : : SQLErrorEvent ;
using : : com : : sun : : star : : form : : DatabaseParameterEvent ;
using : : com : : sun : : star : : sdb : : ParametersRequest ;
using : : com : : sun : : star : : task : : XInteractionRequest ;
using : : com : : sun : : star : : util : : URL ;
using : : com : : sun : : star : : frame : : FeatureStateEvent ;
2009-10-23 16:03:52 +02:00
using : : com : : sun : : star : : form : : runtime : : XFormControllerContext ;
using : : com : : sun : : star : : task : : XInteractionHandler ;
2009-10-30 11:38:26 +01:00
using : : com : : sun : : star : : form : : runtime : : FormOperations ;
using : : com : : sun : : star : : container : : XContainer ;
2009-10-30 12:03:32 +01:00
using : : com : : sun : : star : : sdbc : : SQLWarning ;
2009-10-23 09:46:03 +02:00
/** === end UNO using === **/
namespace ColumnValue = : : com : : sun : : star : : sdbc : : ColumnValue ;
namespace PropertyAttribute = : : com : : sun : : star : : beans : : PropertyAttribute ;
namespace FocusChangeReason = : : com : : sun : : star : : awt : : FocusChangeReason ;
namespace RowChangeAction = : : com : : sun : : star : : sdb : : RowChangeAction ;
2009-10-30 11:38:26 +01:00
namespace FormFeature = : : com : : sun : : star : : form : : runtime : : FormFeature ;
2010-09-17 08:38:54 +02:00
namespace DataType = : : com : : sun : : star : : sdbc : : DataType ;
2009-10-23 09:46:03 +02:00
2008-12-01 12:31:27 +00:00
//==============================================================================
// ColumnInfo
//==============================================================================
struct ColumnInfo
{
// information about the column itself
Reference < XColumn > xColumn ;
sal_Int32 nNullable ;
sal_Bool bAutoIncrement ;
CWS-TOOLING: integrate CWS dba32g
2009-09-09 07:53:55 +0200 oj r275964 : replace strlen with rtl_str_getLength
2009-09-07 20:59:10 +0200 fs r275913 : disable the CopyTableWizard test until issue 104869 is fixed
2009-09-07 12:17:31 +0200 oj r275885 : #i104810# remove de as lang
2009-09-05 22:26:21 +0200 fs r275857 : protect StateChanged against re-entrance
2009-09-05 22:25:52 +0200 fs r275856 : don't attempt to classify the parent of a form as control
2009-09-05 22:25:29 +0200 fs r275855 : protect against re-entrance
2009-09-05 00:11:40 +0200 fs r275835 : #i10000#
2009-09-04 23:25:50 +0200 fs r275834 : #i10000#
2009-09-04 23:23:47 +0200 fs r275833 : #i10000#
2009-09-04 21:49:37 +0200 fs r275830 : #i10000# correct wrong conflict resolution
2009-09-04 20:59:51 +0200 fs r275829 : CWS-TOOLING: rebase CWS dba32g to trunk@275801 (milestone: DEV300:m57)
2009-09-04 11:08:32 +0200 oj r275791 : #i104780# new version 1.2.0
2009-09-03 22:29:21 +0200 fs r275775 : OSL_TRACE doesn't need \n anymore
2009-09-03 08:33:21 +0200 fs r275743 : CWS-TOOLING: rebase CWS dba32g to trunk@275331 (milestone: DEV300:m56)
2009-09-02 13:48:12 +0200 fs r275708 : removed useless include
2009-09-02 13:45:43 +0200 fs r275707 : more since tags, which are used across offapi/udkapi
2009-09-02 13:23:04 +0200 fs r275705 : should *not* have the dtor, copy ctor, and assignment operator compiler-generated, else we run into trouble as soon as the compiler creates different versions of our singleton member's static data in different libraries
2009-09-02 12:32:45 +0200 fs r275704 : AutoIncrementIsPrimaryKey is a driver setting, not a data source setting
2009-09-02 11:42:49 +0200 fs r275701 : URL meta data are meta data which are valid for all connections of this type, not per-data-source properties. Settings them as data source properties is a hack.
2009-09-02 08:43:34 +0200 fs r275696 : 3.x.x is not a valid 'since' tag
2009-09-01 16:05:24 +0200 fs r275665 : #i104686# don't treat controls bound to read-only columns as required
2009-09-01 13:10:22 +0200 fs r275657 : #i104574# use PageUp/Down to scroll through the complete page
2009-09-01 07:04:48 +0200 oj r275641 : #i104104# correct line ends
2009-08-31 15:52:34 +0200 fs r275612 : #i104410#
2009-08-31 12:29:05 +0200 fs r275596 : #i104364#
2009-08-31 12:28:56 +0200 fs r275595 : #i104364#
2009-08-31 11:43:09 +0200 fs r275593 : #i104649# JavaDriverClassPath is also a known JDBC-bridge setting
2009-08-31 11:41:37 +0200 fs r275592 : #i104649#
2009-08-28 21:48:27 +0200 fs r275552 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI
2009-08-28 21:48:17 +0200 fs r275551 : #i96862# do not show the 'Create a new database' option when a) no embedded/dBase driver is installed or b) the configuration requests to hide the option
2009-08-28 21:47:19 +0200 fs r275550 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI
2009-08-28 21:46:41 +0200 fs r275549 : #i96862# renamed and extended the configuration data which controls availability of certain DBA-related UI
2009-08-28 15:10:19 +0200 fs r275535 : #i96862# if no embedded driver is installed, use dBase for creating new DBs. If no dBase driver is installed, too, do not offer the 'Create new database' option
2009-08-28 14:03:04 +0200 fs r275532 : #i104454# allow multiple fields to display the same column
2009-08-28 13:14:00 +0200 fs r275528 : #i104584# driver meta data do not belong into a data source's settings
2009-08-28 13:09:57 +0200 fs r275527 : properly chech the MySQL type buttons (else next/back in the wizard leads to state with two buttons checked)
2009-08-28 13:09:17 +0200 fs r275526 : #i104584# driver meta data do not belong into a data source's settings
2009-08-28 13:07:18 +0200 fs r275525 : BooleanComparisonMode is a property, or a feature - but not a driver meta data
2009-08-28 11:00:31 +0200 fs r275521 : #i104580#
2009-08-28 10:40:05 +0200 fs r275519 : #i104577# correct assertion: If the template node type is ANY, then any value type is allowed
2009-08-28 10:09:30 +0200 fs r275518 : #i104575# implement Named Pipe UI
2009-08-28 10:09:07 +0200 fs r275517 : pass the trigger-event to IWindowOperator::operateOn / work with VclWindowEvents, not VclSimpleEvents
2009-08-27 14:27:36 +0200 fs r275484 : ImplPosTabPage: respect mbEmptyViewMargin for WINDOWALIGN_LEFT
2009-08-27 13:43:56 +0200 fs r275480 : merging latest changes from CWS dba32f herein
2009-08-27 13:23:07 +0200 fs r275475 : #i103882#
2009-08-27 11:56:55 +0200 fs r275466 : #i104544# SetState: Do not call Update at the window which we just set text for. It should (sic\!) not be needed, but causes trouble
2009-08-27 11:55:34 +0200 fs r275465 : #i104544#
do not allow re-entrance for impl_ensureControl_nothrow
Actually, this is part of the fix only. I also removed the code which triggered this re-entrance (from
the grid control implementation), but to ensure it won't happen, again, I added some safety herein.
2009-08-27 10:14:11 +0200 fs r275459 : preparations for supporting a 'NamedPipe' parameter for the MySQL Connector/OOo
2009-08-27 10:13:21 +0200 fs r275458 : preparations for supporting a 'NamedPipe' setting for the MySQL Connector/OOo
2009-08-27 10:11:14 +0200 fs r275456 : outsourced the MySQLNative settings into a dedicated class, to not duplicate all the code in two tab page implementations
2009-08-26 14:18:13 +0200 fs r275422 : #i10000#
2009-08-26 13:26:36 +0200 fs r275419 : ignore output paths
2009-08-26 13:23:38 +0200 fs r275417 : support the LocalSocket property for the MySQL native driver
2009-08-26 13:17:05 +0200 fs r275416 : some re-factoring, to outsource the tab page for setting up the MySQLNative connection, into a dedicated class (needed later)
2009-08-26 13:15:15 +0200 fs r275415 : support a NoThousandSep property for NumericFormatters - I'm tired of correcting this at runtime, instead of controlling it in the resource
2009-08-26 11:45:08 +0200 fs r275410 : oops, 'flat' shouldn't have got lost
2009-08-26 09:38:57 +0200 fs r275398 : #i102631# when saving the document fails, ensure that the interaction handler really can handle/display the error
2009-08-26 09:37:05 +0200 fs r275397 : #i102631# don't let non-IO/RuntimeExceptions escape from DatabaseDocument::store*, wrap them into an IOException
2009-08-26 09:35:39 +0200 fs r275395 : let the default interaction handler implement XInteractionHandler2
2009-08-25 13:51:34 +0200 fs r275352 : #i102631# createTempFile: pass URL through FileHelper.getOOoCompatibleFileURL
2009-08-25 13:49:23 +0200 fs r275351 : #i102631# createTempFileURL: immediately delete the file implicitly created by createTempFile, we really only need the URL
2009-08-24 14:49:07 +0200 fs r275318 : #i10000#
2009-08-24 14:36:03 +0200 fs r275315 : properly terminate message with 0 character
2009-08-24 14:35:45 +0200 fs r275314 : trace method concepts in non-pro, if special flag is enabled
2009-08-24 14:24:17 +0200 fs r275312 : #i98973# filter some more events for grid control columns
2009-08-24 14:15:23 +0200 fs r275311 : #i98973# implement XComboBox for combo box cells
2009-08-24 13:39:24 +0200 fs r275308 : #i98973# do not display the 'actionPerformed' event for grid combo box columns
2009-08-24 12:52:03 +0200 fs r275303 : #i98973# implement XCheckBox and XButton for check box cells
2009-08-24 11:56:05 +0200 oj r275300 : #i104447# wrong default for orientation
2009-08-24 10:51:21 +0200 fs r275296 : in the script selector dialog, interpret a double click onto a function as OK
2009-08-24 10:50:56 +0200 fs r275295 : localize some to-be-displayed names, consolidate some code regarding form/control naming
2009-08-21 14:28:05 +0200 fs r275255 : #i98973# implement KeyListeners
2009-08-21 14:27:20 +0200 fs r275254 : #i98973# move the conversion VCL[Mouse|Key]Event->Awt[Mouse|Key]Event from vclxwindow.cxx to VCLUnoHelper
2009-08-21 14:08:50 +0200 fs r275248 : #i98973# implement Mouse- and MouseMotion-broadcasting
2009-08-21 13:31:08 +0200 fs r275244 : #i98973# implement text and change listeners at text cells
2009-08-21 12:47:38 +0200 fs r275234 : #i104399# some refactoring:
If the MySQL Connector/OOo is installed, it registers for the sdbc:mysqlc: protocol (now known as DST_MYSQL_NATIVE_DIRECT).
However, we do not want to display this in the UI, instead we display "MySQL" only, which collects DST_MYSQL_ODBC, DST_MYSQL_JDBC, and DST_MYSQL_NATIVE.
2009-08-21 12:45:18 +0200 fs r275232 : #i104399# also register for the sdbc:mysql:mysqlc protocol, decide at runtime (depending on the availability of sdbc:mysqlc:), whether it is really accepted. This prevents that the C/OOo extension needs to register *our* implementation name for the sdbc:mysql:mysqlc: protocol, which would be somewhat weird
2009-08-20 16:18:48 +0200 fs r275190 : merging the latest changes from CWS dba32f (which this CWS was created from)
2009-08-19 20:19:59 +0200 fs r275160 : add some spacing between the radios
2009-08-19 14:50:15 +0200 fs r275150 : #i98973# slightly refactoring the grid cell implementations, to prepare for proper events being fired. Implement focus events for the moment, more to come.
2009-08-19 10:53:38 +0200 fs r275142 : #i99936# initialize newly created models
2009-08-18 23:03:48 +0200 fs r275132 : merging latest changes from CWS dba32f
2009-08-18 15:14:08 +0200 fs r275110 : #i102819# SetColumnPos: SCROLL_CLIP is deadly here
2009-09-14 11:18:01 +00:00
sal_Bool bReadOnly ;
2008-12-01 12:31:27 +00:00
: : rtl : : OUString sName ;
// information about the control(s) bound to this column
/// the first control which is bound to the given column, and which requires input
Reference < XControl > xFirstControlWithInputRequired ;
/** the first grid control which contains a column which is bound to the given database column, and requires
input
*/
Reference < XGrid > xFirstGridWithInputRequiredColumn ;
/** if xFirstControlWithInputRequired is a grid control, then nRequiredGridColumn specifies the position
of the grid column which is actually bound
*/
sal_Int32 nRequiredGridColumn ;
ColumnInfo ( )
: xColumn ( )
, nNullable ( ColumnValue : : NULLABLE_UNKNOWN )
, bAutoIncrement ( sal_False )
CWS-TOOLING: integrate CWS dba32g
2009-09-09 07:53:55 +0200 oj r275964 : replace strlen with rtl_str_getLength
2009-09-07 20:59:10 +0200 fs r275913 : disable the CopyTableWizard test until issue 104869 is fixed
2009-09-07 12:17:31 +0200 oj r275885 : #i104810# remove de as lang
2009-09-05 22:26:21 +0200 fs r275857 : protect StateChanged against re-entrance
2009-09-05 22:25:52 +0200 fs r275856 : don't attempt to classify the parent of a form as control
2009-09-05 22:25:29 +0200 fs r275855 : protect against re-entrance
2009-09-05 00:11:40 +0200 fs r275835 : #i10000#
2009-09-04 23:25:50 +0200 fs r275834 : #i10000#
2009-09-04 23:23:47 +0200 fs r275833 : #i10000#
2009-09-04 21:49:37 +0200 fs r275830 : #i10000# correct wrong conflict resolution
2009-09-04 20:59:51 +0200 fs r275829 : CWS-TOOLING: rebase CWS dba32g to trunk@275801 (milestone: DEV300:m57)
2009-09-04 11:08:32 +0200 oj r275791 : #i104780# new version 1.2.0
2009-09-03 22:29:21 +0200 fs r275775 : OSL_TRACE doesn't need \n anymore
2009-09-03 08:33:21 +0200 fs r275743 : CWS-TOOLING: rebase CWS dba32g to trunk@275331 (milestone: DEV300:m56)
2009-09-02 13:48:12 +0200 fs r275708 : removed useless include
2009-09-02 13:45:43 +0200 fs r275707 : more since tags, which are used across offapi/udkapi
2009-09-02 13:23:04 +0200 fs r275705 : should *not* have the dtor, copy ctor, and assignment operator compiler-generated, else we run into trouble as soon as the compiler creates different versions of our singleton member's static data in different libraries
2009-09-02 12:32:45 +0200 fs r275704 : AutoIncrementIsPrimaryKey is a driver setting, not a data source setting
2009-09-02 11:42:49 +0200 fs r275701 : URL meta data are meta data which are valid for all connections of this type, not per-data-source properties. Settings them as data source properties is a hack.
2009-09-02 08:43:34 +0200 fs r275696 : 3.x.x is not a valid 'since' tag
2009-09-01 16:05:24 +0200 fs r275665 : #i104686# don't treat controls bound to read-only columns as required
2009-09-01 13:10:22 +0200 fs r275657 : #i104574# use PageUp/Down to scroll through the complete page
2009-09-01 07:04:48 +0200 oj r275641 : #i104104# correct line ends
2009-08-31 15:52:34 +0200 fs r275612 : #i104410#
2009-08-31 12:29:05 +0200 fs r275596 : #i104364#
2009-08-31 12:28:56 +0200 fs r275595 : #i104364#
2009-08-31 11:43:09 +0200 fs r275593 : #i104649# JavaDriverClassPath is also a known JDBC-bridge setting
2009-08-31 11:41:37 +0200 fs r275592 : #i104649#
2009-08-28 21:48:27 +0200 fs r275552 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI
2009-08-28 21:48:17 +0200 fs r275551 : #i96862# do not show the 'Create a new database' option when a) no embedded/dBase driver is installed or b) the configuration requests to hide the option
2009-08-28 21:47:19 +0200 fs r275550 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI
2009-08-28 21:46:41 +0200 fs r275549 : #i96862# renamed and extended the configuration data which controls availability of certain DBA-related UI
2009-08-28 15:10:19 +0200 fs r275535 : #i96862# if no embedded driver is installed, use dBase for creating new DBs. If no dBase driver is installed, too, do not offer the 'Create new database' option
2009-08-28 14:03:04 +0200 fs r275532 : #i104454# allow multiple fields to display the same column
2009-08-28 13:14:00 +0200 fs r275528 : #i104584# driver meta data do not belong into a data source's settings
2009-08-28 13:09:57 +0200 fs r275527 : properly chech the MySQL type buttons (else next/back in the wizard leads to state with two buttons checked)
2009-08-28 13:09:17 +0200 fs r275526 : #i104584# driver meta data do not belong into a data source's settings
2009-08-28 13:07:18 +0200 fs r275525 : BooleanComparisonMode is a property, or a feature - but not a driver meta data
2009-08-28 11:00:31 +0200 fs r275521 : #i104580#
2009-08-28 10:40:05 +0200 fs r275519 : #i104577# correct assertion: If the template node type is ANY, then any value type is allowed
2009-08-28 10:09:30 +0200 fs r275518 : #i104575# implement Named Pipe UI
2009-08-28 10:09:07 +0200 fs r275517 : pass the trigger-event to IWindowOperator::operateOn / work with VclWindowEvents, not VclSimpleEvents
2009-08-27 14:27:36 +0200 fs r275484 : ImplPosTabPage: respect mbEmptyViewMargin for WINDOWALIGN_LEFT
2009-08-27 13:43:56 +0200 fs r275480 : merging latest changes from CWS dba32f herein
2009-08-27 13:23:07 +0200 fs r275475 : #i103882#
2009-08-27 11:56:55 +0200 fs r275466 : #i104544# SetState: Do not call Update at the window which we just set text for. It should (sic\!) not be needed, but causes trouble
2009-08-27 11:55:34 +0200 fs r275465 : #i104544#
do not allow re-entrance for impl_ensureControl_nothrow
Actually, this is part of the fix only. I also removed the code which triggered this re-entrance (from
the grid control implementation), but to ensure it won't happen, again, I added some safety herein.
2009-08-27 10:14:11 +0200 fs r275459 : preparations for supporting a 'NamedPipe' parameter for the MySQL Connector/OOo
2009-08-27 10:13:21 +0200 fs r275458 : preparations for supporting a 'NamedPipe' setting for the MySQL Connector/OOo
2009-08-27 10:11:14 +0200 fs r275456 : outsourced the MySQLNative settings into a dedicated class, to not duplicate all the code in two tab page implementations
2009-08-26 14:18:13 +0200 fs r275422 : #i10000#
2009-08-26 13:26:36 +0200 fs r275419 : ignore output paths
2009-08-26 13:23:38 +0200 fs r275417 : support the LocalSocket property for the MySQL native driver
2009-08-26 13:17:05 +0200 fs r275416 : some re-factoring, to outsource the tab page for setting up the MySQLNative connection, into a dedicated class (needed later)
2009-08-26 13:15:15 +0200 fs r275415 : support a NoThousandSep property for NumericFormatters - I'm tired of correcting this at runtime, instead of controlling it in the resource
2009-08-26 11:45:08 +0200 fs r275410 : oops, 'flat' shouldn't have got lost
2009-08-26 09:38:57 +0200 fs r275398 : #i102631# when saving the document fails, ensure that the interaction handler really can handle/display the error
2009-08-26 09:37:05 +0200 fs r275397 : #i102631# don't let non-IO/RuntimeExceptions escape from DatabaseDocument::store*, wrap them into an IOException
2009-08-26 09:35:39 +0200 fs r275395 : let the default interaction handler implement XInteractionHandler2
2009-08-25 13:51:34 +0200 fs r275352 : #i102631# createTempFile: pass URL through FileHelper.getOOoCompatibleFileURL
2009-08-25 13:49:23 +0200 fs r275351 : #i102631# createTempFileURL: immediately delete the file implicitly created by createTempFile, we really only need the URL
2009-08-24 14:49:07 +0200 fs r275318 : #i10000#
2009-08-24 14:36:03 +0200 fs r275315 : properly terminate message with 0 character
2009-08-24 14:35:45 +0200 fs r275314 : trace method concepts in non-pro, if special flag is enabled
2009-08-24 14:24:17 +0200 fs r275312 : #i98973# filter some more events for grid control columns
2009-08-24 14:15:23 +0200 fs r275311 : #i98973# implement XComboBox for combo box cells
2009-08-24 13:39:24 +0200 fs r275308 : #i98973# do not display the 'actionPerformed' event for grid combo box columns
2009-08-24 12:52:03 +0200 fs r275303 : #i98973# implement XCheckBox and XButton for check box cells
2009-08-24 11:56:05 +0200 oj r275300 : #i104447# wrong default for orientation
2009-08-24 10:51:21 +0200 fs r275296 : in the script selector dialog, interpret a double click onto a function as OK
2009-08-24 10:50:56 +0200 fs r275295 : localize some to-be-displayed names, consolidate some code regarding form/control naming
2009-08-21 14:28:05 +0200 fs r275255 : #i98973# implement KeyListeners
2009-08-21 14:27:20 +0200 fs r275254 : #i98973# move the conversion VCL[Mouse|Key]Event->Awt[Mouse|Key]Event from vclxwindow.cxx to VCLUnoHelper
2009-08-21 14:08:50 +0200 fs r275248 : #i98973# implement Mouse- and MouseMotion-broadcasting
2009-08-21 13:31:08 +0200 fs r275244 : #i98973# implement text and change listeners at text cells
2009-08-21 12:47:38 +0200 fs r275234 : #i104399# some refactoring:
If the MySQL Connector/OOo is installed, it registers for the sdbc:mysqlc: protocol (now known as DST_MYSQL_NATIVE_DIRECT).
However, we do not want to display this in the UI, instead we display "MySQL" only, which collects DST_MYSQL_ODBC, DST_MYSQL_JDBC, and DST_MYSQL_NATIVE.
2009-08-21 12:45:18 +0200 fs r275232 : #i104399# also register for the sdbc:mysql:mysqlc protocol, decide at runtime (depending on the availability of sdbc:mysqlc:), whether it is really accepted. This prevents that the C/OOo extension needs to register *our* implementation name for the sdbc:mysql:mysqlc: protocol, which would be somewhat weird
2009-08-20 16:18:48 +0200 fs r275190 : merging the latest changes from CWS dba32f (which this CWS was created from)
2009-08-19 20:19:59 +0200 fs r275160 : add some spacing between the radios
2009-08-19 14:50:15 +0200 fs r275150 : #i98973# slightly refactoring the grid cell implementations, to prepare for proper events being fired. Implement focus events for the moment, more to come.
2009-08-19 10:53:38 +0200 fs r275142 : #i99936# initialize newly created models
2009-08-18 23:03:48 +0200 fs r275132 : merging latest changes from CWS dba32f
2009-08-18 15:14:08 +0200 fs r275110 : #i102819# SetColumnPos: SCROLL_CLIP is deadly here
2009-09-14 11:18:01 +00:00
, bReadOnly ( sal_False )
2008-12-01 12:31:27 +00:00
, sName ( )
, xFirstControlWithInputRequired ( )
, xFirstGridWithInputRequiredColumn ( )
, nRequiredGridColumn ( - 1 )
{
}
} ;
//==============================================================================
//= ColumnInfoCache
//==============================================================================
class ColumnInfoCache
{
public :
ColumnInfoCache ( const Reference < XColumnsSupplier > & _rxColSupplier ) ;
2009-03-05 07:09:20 +00:00
size_t getColumnCount ( ) const { return m_aColumns . size ( ) ; }
2008-12-01 12:31:27 +00:00
const ColumnInfo & getColumnInfo ( size_t _pos ) ;
bool controlsInitialized ( ) const { return m_bControlsInitialized ; }
void initializeControls ( const Sequence < Reference < XControl > > & _rControls ) ;
void deinitializeControls ( ) ;
private :
typedef : : std : : vector < ColumnInfo > ColumnInfos ;
ColumnInfos m_aColumns ;
bool m_bControlsInitialized ;
} ;
//------------------------------------------------------------------------------
ColumnInfoCache : : ColumnInfoCache ( const Reference < XColumnsSupplier > & _rxColSupplier )
: m_aColumns ( )
, m_bControlsInitialized ( false )
{
try
{
m_aColumns . clear ( ) ;
Reference < XColumnsSupplier > xSupplyCols ( _rxColSupplier , UNO_SET_THROW ) ;
Reference < XIndexAccess > xColumns ( xSupplyCols - > getColumns ( ) , UNO_QUERY_THROW ) ;
sal_Int32 nColumnCount = xColumns - > getCount ( ) ;
m_aColumns . reserve ( nColumnCount ) ;
Reference < XPropertySet > xColumnProps ;
for ( sal_Int32 i = 0 ; i < nColumnCount ; + + i )
{
ColumnInfo aColInfo ;
aColInfo . xColumn . set ( xColumns - > getByIndex ( i ) , UNO_QUERY_THROW ) ;
xColumnProps . set ( aColInfo . xColumn , UNO_QUERY_THROW ) ;
OSL_VERIFY ( xColumnProps - > getPropertyValue ( FM_PROP_ISNULLABLE ) > > = aColInfo . nNullable ) ;
OSL_VERIFY ( xColumnProps - > getPropertyValue ( FM_PROP_AUTOINCREMENT ) > > = aColInfo . bAutoIncrement ) ;
OSL_VERIFY ( xColumnProps - > getPropertyValue ( FM_PROP_NAME ) > > = aColInfo . sName ) ;
CWS-TOOLING: integrate CWS dba32g
2009-09-09 07:53:55 +0200 oj r275964 : replace strlen with rtl_str_getLength
2009-09-07 20:59:10 +0200 fs r275913 : disable the CopyTableWizard test until issue 104869 is fixed
2009-09-07 12:17:31 +0200 oj r275885 : #i104810# remove de as lang
2009-09-05 22:26:21 +0200 fs r275857 : protect StateChanged against re-entrance
2009-09-05 22:25:52 +0200 fs r275856 : don't attempt to classify the parent of a form as control
2009-09-05 22:25:29 +0200 fs r275855 : protect against re-entrance
2009-09-05 00:11:40 +0200 fs r275835 : #i10000#
2009-09-04 23:25:50 +0200 fs r275834 : #i10000#
2009-09-04 23:23:47 +0200 fs r275833 : #i10000#
2009-09-04 21:49:37 +0200 fs r275830 : #i10000# correct wrong conflict resolution
2009-09-04 20:59:51 +0200 fs r275829 : CWS-TOOLING: rebase CWS dba32g to trunk@275801 (milestone: DEV300:m57)
2009-09-04 11:08:32 +0200 oj r275791 : #i104780# new version 1.2.0
2009-09-03 22:29:21 +0200 fs r275775 : OSL_TRACE doesn't need \n anymore
2009-09-03 08:33:21 +0200 fs r275743 : CWS-TOOLING: rebase CWS dba32g to trunk@275331 (milestone: DEV300:m56)
2009-09-02 13:48:12 +0200 fs r275708 : removed useless include
2009-09-02 13:45:43 +0200 fs r275707 : more since tags, which are used across offapi/udkapi
2009-09-02 13:23:04 +0200 fs r275705 : should *not* have the dtor, copy ctor, and assignment operator compiler-generated, else we run into trouble as soon as the compiler creates different versions of our singleton member's static data in different libraries
2009-09-02 12:32:45 +0200 fs r275704 : AutoIncrementIsPrimaryKey is a driver setting, not a data source setting
2009-09-02 11:42:49 +0200 fs r275701 : URL meta data are meta data which are valid for all connections of this type, not per-data-source properties. Settings them as data source properties is a hack.
2009-09-02 08:43:34 +0200 fs r275696 : 3.x.x is not a valid 'since' tag
2009-09-01 16:05:24 +0200 fs r275665 : #i104686# don't treat controls bound to read-only columns as required
2009-09-01 13:10:22 +0200 fs r275657 : #i104574# use PageUp/Down to scroll through the complete page
2009-09-01 07:04:48 +0200 oj r275641 : #i104104# correct line ends
2009-08-31 15:52:34 +0200 fs r275612 : #i104410#
2009-08-31 12:29:05 +0200 fs r275596 : #i104364#
2009-08-31 12:28:56 +0200 fs r275595 : #i104364#
2009-08-31 11:43:09 +0200 fs r275593 : #i104649# JavaDriverClassPath is also a known JDBC-bridge setting
2009-08-31 11:41:37 +0200 fs r275592 : #i104649#
2009-08-28 21:48:27 +0200 fs r275552 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI
2009-08-28 21:48:17 +0200 fs r275551 : #i96862# do not show the 'Create a new database' option when a) no embedded/dBase driver is installed or b) the configuration requests to hide the option
2009-08-28 21:47:19 +0200 fs r275550 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI
2009-08-28 21:46:41 +0200 fs r275549 : #i96862# renamed and extended the configuration data which controls availability of certain DBA-related UI
2009-08-28 15:10:19 +0200 fs r275535 : #i96862# if no embedded driver is installed, use dBase for creating new DBs. If no dBase driver is installed, too, do not offer the 'Create new database' option
2009-08-28 14:03:04 +0200 fs r275532 : #i104454# allow multiple fields to display the same column
2009-08-28 13:14:00 +0200 fs r275528 : #i104584# driver meta data do not belong into a data source's settings
2009-08-28 13:09:57 +0200 fs r275527 : properly chech the MySQL type buttons (else next/back in the wizard leads to state with two buttons checked)
2009-08-28 13:09:17 +0200 fs r275526 : #i104584# driver meta data do not belong into a data source's settings
2009-08-28 13:07:18 +0200 fs r275525 : BooleanComparisonMode is a property, or a feature - but not a driver meta data
2009-08-28 11:00:31 +0200 fs r275521 : #i104580#
2009-08-28 10:40:05 +0200 fs r275519 : #i104577# correct assertion: If the template node type is ANY, then any value type is allowed
2009-08-28 10:09:30 +0200 fs r275518 : #i104575# implement Named Pipe UI
2009-08-28 10:09:07 +0200 fs r275517 : pass the trigger-event to IWindowOperator::operateOn / work with VclWindowEvents, not VclSimpleEvents
2009-08-27 14:27:36 +0200 fs r275484 : ImplPosTabPage: respect mbEmptyViewMargin for WINDOWALIGN_LEFT
2009-08-27 13:43:56 +0200 fs r275480 : merging latest changes from CWS dba32f herein
2009-08-27 13:23:07 +0200 fs r275475 : #i103882#
2009-08-27 11:56:55 +0200 fs r275466 : #i104544# SetState: Do not call Update at the window which we just set text for. It should (sic\!) not be needed, but causes trouble
2009-08-27 11:55:34 +0200 fs r275465 : #i104544#
do not allow re-entrance for impl_ensureControl_nothrow
Actually, this is part of the fix only. I also removed the code which triggered this re-entrance (from
the grid control implementation), but to ensure it won't happen, again, I added some safety herein.
2009-08-27 10:14:11 +0200 fs r275459 : preparations for supporting a 'NamedPipe' parameter for the MySQL Connector/OOo
2009-08-27 10:13:21 +0200 fs r275458 : preparations for supporting a 'NamedPipe' setting for the MySQL Connector/OOo
2009-08-27 10:11:14 +0200 fs r275456 : outsourced the MySQLNative settings into a dedicated class, to not duplicate all the code in two tab page implementations
2009-08-26 14:18:13 +0200 fs r275422 : #i10000#
2009-08-26 13:26:36 +0200 fs r275419 : ignore output paths
2009-08-26 13:23:38 +0200 fs r275417 : support the LocalSocket property for the MySQL native driver
2009-08-26 13:17:05 +0200 fs r275416 : some re-factoring, to outsource the tab page for setting up the MySQLNative connection, into a dedicated class (needed later)
2009-08-26 13:15:15 +0200 fs r275415 : support a NoThousandSep property for NumericFormatters - I'm tired of correcting this at runtime, instead of controlling it in the resource
2009-08-26 11:45:08 +0200 fs r275410 : oops, 'flat' shouldn't have got lost
2009-08-26 09:38:57 +0200 fs r275398 : #i102631# when saving the document fails, ensure that the interaction handler really can handle/display the error
2009-08-26 09:37:05 +0200 fs r275397 : #i102631# don't let non-IO/RuntimeExceptions escape from DatabaseDocument::store*, wrap them into an IOException
2009-08-26 09:35:39 +0200 fs r275395 : let the default interaction handler implement XInteractionHandler2
2009-08-25 13:51:34 +0200 fs r275352 : #i102631# createTempFile: pass URL through FileHelper.getOOoCompatibleFileURL
2009-08-25 13:49:23 +0200 fs r275351 : #i102631# createTempFileURL: immediately delete the file implicitly created by createTempFile, we really only need the URL
2009-08-24 14:49:07 +0200 fs r275318 : #i10000#
2009-08-24 14:36:03 +0200 fs r275315 : properly terminate message with 0 character
2009-08-24 14:35:45 +0200 fs r275314 : trace method concepts in non-pro, if special flag is enabled
2009-08-24 14:24:17 +0200 fs r275312 : #i98973# filter some more events for grid control columns
2009-08-24 14:15:23 +0200 fs r275311 : #i98973# implement XComboBox for combo box cells
2009-08-24 13:39:24 +0200 fs r275308 : #i98973# do not display the 'actionPerformed' event for grid combo box columns
2009-08-24 12:52:03 +0200 fs r275303 : #i98973# implement XCheckBox and XButton for check box cells
2009-08-24 11:56:05 +0200 oj r275300 : #i104447# wrong default for orientation
2009-08-24 10:51:21 +0200 fs r275296 : in the script selector dialog, interpret a double click onto a function as OK
2009-08-24 10:50:56 +0200 fs r275295 : localize some to-be-displayed names, consolidate some code regarding form/control naming
2009-08-21 14:28:05 +0200 fs r275255 : #i98973# implement KeyListeners
2009-08-21 14:27:20 +0200 fs r275254 : #i98973# move the conversion VCL[Mouse|Key]Event->Awt[Mouse|Key]Event from vclxwindow.cxx to VCLUnoHelper
2009-08-21 14:08:50 +0200 fs r275248 : #i98973# implement Mouse- and MouseMotion-broadcasting
2009-08-21 13:31:08 +0200 fs r275244 : #i98973# implement text and change listeners at text cells
2009-08-21 12:47:38 +0200 fs r275234 : #i104399# some refactoring:
If the MySQL Connector/OOo is installed, it registers for the sdbc:mysqlc: protocol (now known as DST_MYSQL_NATIVE_DIRECT).
However, we do not want to display this in the UI, instead we display "MySQL" only, which collects DST_MYSQL_ODBC, DST_MYSQL_JDBC, and DST_MYSQL_NATIVE.
2009-08-21 12:45:18 +0200 fs r275232 : #i104399# also register for the sdbc:mysql:mysqlc protocol, decide at runtime (depending on the availability of sdbc:mysqlc:), whether it is really accepted. This prevents that the C/OOo extension needs to register *our* implementation name for the sdbc:mysql:mysqlc: protocol, which would be somewhat weird
2009-08-20 16:18:48 +0200 fs r275190 : merging the latest changes from CWS dba32f (which this CWS was created from)
2009-08-19 20:19:59 +0200 fs r275160 : add some spacing between the radios
2009-08-19 14:50:15 +0200 fs r275150 : #i98973# slightly refactoring the grid cell implementations, to prepare for proper events being fired. Implement focus events for the moment, more to come.
2009-08-19 10:53:38 +0200 fs r275142 : #i99936# initialize newly created models
2009-08-18 23:03:48 +0200 fs r275132 : merging latest changes from CWS dba32f
2009-08-18 15:14:08 +0200 fs r275110 : #i102819# SetColumnPos: SCROLL_CLIP is deadly here
2009-09-14 11:18:01 +00:00
OSL_VERIFY ( xColumnProps - > getPropertyValue ( FM_PROP_ISREADONLY ) > > = aColInfo . bReadOnly ) ;
2008-12-01 12:31:27 +00:00
m_aColumns . push_back ( aColInfo ) ;
}
}
catch ( const Exception & )
{
DBG_UNHANDLED_EXCEPTION ( ) ;
}
}
//------------------------------------------------------------------------------
namespace
{
bool lcl_isBoundTo ( const Reference < XPropertySet > & _rxControlModel , const Reference < XInterface > & _rxNormDBField )
{
Reference < XInterface > xNormBoundField ( _rxControlModel - > getPropertyValue ( FM_PROP_BOUNDFIELD ) , UNO_QUERY ) ;
return ( xNormBoundField . get ( ) = = _rxNormDBField . get ( ) ) ;
}
bool lcl_isInputRequired ( const Reference < XPropertySet > & _rxControlModel )
{
sal_Bool bInputRequired = sal_True ;
OSL_VERIFY ( _rxControlModel - > getPropertyValue ( FM_PROP_INPUT_REQUIRED ) > > = bInputRequired ) ;
return ( bInputRequired ! = sal_False ) ;
}
CWS-TOOLING: integrate CWS dba32g
2009-09-09 07:53:55 +0200 oj r275964 : replace strlen with rtl_str_getLength
2009-09-07 20:59:10 +0200 fs r275913 : disable the CopyTableWizard test until issue 104869 is fixed
2009-09-07 12:17:31 +0200 oj r275885 : #i104810# remove de as lang
2009-09-05 22:26:21 +0200 fs r275857 : protect StateChanged against re-entrance
2009-09-05 22:25:52 +0200 fs r275856 : don't attempt to classify the parent of a form as control
2009-09-05 22:25:29 +0200 fs r275855 : protect against re-entrance
2009-09-05 00:11:40 +0200 fs r275835 : #i10000#
2009-09-04 23:25:50 +0200 fs r275834 : #i10000#
2009-09-04 23:23:47 +0200 fs r275833 : #i10000#
2009-09-04 21:49:37 +0200 fs r275830 : #i10000# correct wrong conflict resolution
2009-09-04 20:59:51 +0200 fs r275829 : CWS-TOOLING: rebase CWS dba32g to trunk@275801 (milestone: DEV300:m57)
2009-09-04 11:08:32 +0200 oj r275791 : #i104780# new version 1.2.0
2009-09-03 22:29:21 +0200 fs r275775 : OSL_TRACE doesn't need \n anymore
2009-09-03 08:33:21 +0200 fs r275743 : CWS-TOOLING: rebase CWS dba32g to trunk@275331 (milestone: DEV300:m56)
2009-09-02 13:48:12 +0200 fs r275708 : removed useless include
2009-09-02 13:45:43 +0200 fs r275707 : more since tags, which are used across offapi/udkapi
2009-09-02 13:23:04 +0200 fs r275705 : should *not* have the dtor, copy ctor, and assignment operator compiler-generated, else we run into trouble as soon as the compiler creates different versions of our singleton member's static data in different libraries
2009-09-02 12:32:45 +0200 fs r275704 : AutoIncrementIsPrimaryKey is a driver setting, not a data source setting
2009-09-02 11:42:49 +0200 fs r275701 : URL meta data are meta data which are valid for all connections of this type, not per-data-source properties. Settings them as data source properties is a hack.
2009-09-02 08:43:34 +0200 fs r275696 : 3.x.x is not a valid 'since' tag
2009-09-01 16:05:24 +0200 fs r275665 : #i104686# don't treat controls bound to read-only columns as required
2009-09-01 13:10:22 +0200 fs r275657 : #i104574# use PageUp/Down to scroll through the complete page
2009-09-01 07:04:48 +0200 oj r275641 : #i104104# correct line ends
2009-08-31 15:52:34 +0200 fs r275612 : #i104410#
2009-08-31 12:29:05 +0200 fs r275596 : #i104364#
2009-08-31 12:28:56 +0200 fs r275595 : #i104364#
2009-08-31 11:43:09 +0200 fs r275593 : #i104649# JavaDriverClassPath is also a known JDBC-bridge setting
2009-08-31 11:41:37 +0200 fs r275592 : #i104649#
2009-08-28 21:48:27 +0200 fs r275552 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI
2009-08-28 21:48:17 +0200 fs r275551 : #i96862# do not show the 'Create a new database' option when a) no embedded/dBase driver is installed or b) the configuration requests to hide the option
2009-08-28 21:47:19 +0200 fs r275550 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI
2009-08-28 21:46:41 +0200 fs r275549 : #i96862# renamed and extended the configuration data which controls availability of certain DBA-related UI
2009-08-28 15:10:19 +0200 fs r275535 : #i96862# if no embedded driver is installed, use dBase for creating new DBs. If no dBase driver is installed, too, do not offer the 'Create new database' option
2009-08-28 14:03:04 +0200 fs r275532 : #i104454# allow multiple fields to display the same column
2009-08-28 13:14:00 +0200 fs r275528 : #i104584# driver meta data do not belong into a data source's settings
2009-08-28 13:09:57 +0200 fs r275527 : properly chech the MySQL type buttons (else next/back in the wizard leads to state with two buttons checked)
2009-08-28 13:09:17 +0200 fs r275526 : #i104584# driver meta data do not belong into a data source's settings
2009-08-28 13:07:18 +0200 fs r275525 : BooleanComparisonMode is a property, or a feature - but not a driver meta data
2009-08-28 11:00:31 +0200 fs r275521 : #i104580#
2009-08-28 10:40:05 +0200 fs r275519 : #i104577# correct assertion: If the template node type is ANY, then any value type is allowed
2009-08-28 10:09:30 +0200 fs r275518 : #i104575# implement Named Pipe UI
2009-08-28 10:09:07 +0200 fs r275517 : pass the trigger-event to IWindowOperator::operateOn / work with VclWindowEvents, not VclSimpleEvents
2009-08-27 14:27:36 +0200 fs r275484 : ImplPosTabPage: respect mbEmptyViewMargin for WINDOWALIGN_LEFT
2009-08-27 13:43:56 +0200 fs r275480 : merging latest changes from CWS dba32f herein
2009-08-27 13:23:07 +0200 fs r275475 : #i103882#
2009-08-27 11:56:55 +0200 fs r275466 : #i104544# SetState: Do not call Update at the window which we just set text for. It should (sic\!) not be needed, but causes trouble
2009-08-27 11:55:34 +0200 fs r275465 : #i104544#
do not allow re-entrance for impl_ensureControl_nothrow
Actually, this is part of the fix only. I also removed the code which triggered this re-entrance (from
the grid control implementation), but to ensure it won't happen, again, I added some safety herein.
2009-08-27 10:14:11 +0200 fs r275459 : preparations for supporting a 'NamedPipe' parameter for the MySQL Connector/OOo
2009-08-27 10:13:21 +0200 fs r275458 : preparations for supporting a 'NamedPipe' setting for the MySQL Connector/OOo
2009-08-27 10:11:14 +0200 fs r275456 : outsourced the MySQLNative settings into a dedicated class, to not duplicate all the code in two tab page implementations
2009-08-26 14:18:13 +0200 fs r275422 : #i10000#
2009-08-26 13:26:36 +0200 fs r275419 : ignore output paths
2009-08-26 13:23:38 +0200 fs r275417 : support the LocalSocket property for the MySQL native driver
2009-08-26 13:17:05 +0200 fs r275416 : some re-factoring, to outsource the tab page for setting up the MySQLNative connection, into a dedicated class (needed later)
2009-08-26 13:15:15 +0200 fs r275415 : support a NoThousandSep property for NumericFormatters - I'm tired of correcting this at runtime, instead of controlling it in the resource
2009-08-26 11:45:08 +0200 fs r275410 : oops, 'flat' shouldn't have got lost
2009-08-26 09:38:57 +0200 fs r275398 : #i102631# when saving the document fails, ensure that the interaction handler really can handle/display the error
2009-08-26 09:37:05 +0200 fs r275397 : #i102631# don't let non-IO/RuntimeExceptions escape from DatabaseDocument::store*, wrap them into an IOException
2009-08-26 09:35:39 +0200 fs r275395 : let the default interaction handler implement XInteractionHandler2
2009-08-25 13:51:34 +0200 fs r275352 : #i102631# createTempFile: pass URL through FileHelper.getOOoCompatibleFileURL
2009-08-25 13:49:23 +0200 fs r275351 : #i102631# createTempFileURL: immediately delete the file implicitly created by createTempFile, we really only need the URL
2009-08-24 14:49:07 +0200 fs r275318 : #i10000#
2009-08-24 14:36:03 +0200 fs r275315 : properly terminate message with 0 character
2009-08-24 14:35:45 +0200 fs r275314 : trace method concepts in non-pro, if special flag is enabled
2009-08-24 14:24:17 +0200 fs r275312 : #i98973# filter some more events for grid control columns
2009-08-24 14:15:23 +0200 fs r275311 : #i98973# implement XComboBox for combo box cells
2009-08-24 13:39:24 +0200 fs r275308 : #i98973# do not display the 'actionPerformed' event for grid combo box columns
2009-08-24 12:52:03 +0200 fs r275303 : #i98973# implement XCheckBox and XButton for check box cells
2009-08-24 11:56:05 +0200 oj r275300 : #i104447# wrong default for orientation
2009-08-24 10:51:21 +0200 fs r275296 : in the script selector dialog, interpret a double click onto a function as OK
2009-08-24 10:50:56 +0200 fs r275295 : localize some to-be-displayed names, consolidate some code regarding form/control naming
2009-08-21 14:28:05 +0200 fs r275255 : #i98973# implement KeyListeners
2009-08-21 14:27:20 +0200 fs r275254 : #i98973# move the conversion VCL[Mouse|Key]Event->Awt[Mouse|Key]Event from vclxwindow.cxx to VCLUnoHelper
2009-08-21 14:08:50 +0200 fs r275248 : #i98973# implement Mouse- and MouseMotion-broadcasting
2009-08-21 13:31:08 +0200 fs r275244 : #i98973# implement text and change listeners at text cells
2009-08-21 12:47:38 +0200 fs r275234 : #i104399# some refactoring:
If the MySQL Connector/OOo is installed, it registers for the sdbc:mysqlc: protocol (now known as DST_MYSQL_NATIVE_DIRECT).
However, we do not want to display this in the UI, instead we display "MySQL" only, which collects DST_MYSQL_ODBC, DST_MYSQL_JDBC, and DST_MYSQL_NATIVE.
2009-08-21 12:45:18 +0200 fs r275232 : #i104399# also register for the sdbc:mysql:mysqlc protocol, decide at runtime (depending on the availability of sdbc:mysqlc:), whether it is really accepted. This prevents that the C/OOo extension needs to register *our* implementation name for the sdbc:mysql:mysqlc: protocol, which would be somewhat weird
2009-08-20 16:18:48 +0200 fs r275190 : merging the latest changes from CWS dba32f (which this CWS was created from)
2009-08-19 20:19:59 +0200 fs r275160 : add some spacing between the radios
2009-08-19 14:50:15 +0200 fs r275150 : #i98973# slightly refactoring the grid cell implementations, to prepare for proper events being fired. Implement focus events for the moment, more to come.
2009-08-19 10:53:38 +0200 fs r275142 : #i99936# initialize newly created models
2009-08-18 23:03:48 +0200 fs r275132 : merging latest changes from CWS dba32f
2009-08-18 15:14:08 +0200 fs r275110 : #i102819# SetColumnPos: SCROLL_CLIP is deadly here
2009-09-14 11:18:01 +00:00
2008-12-01 12:31:27 +00:00
void lcl_resetColumnControlInfo ( ColumnInfo & _rColInfo )
{
_rColInfo . xFirstControlWithInputRequired . clear ( ) ;
_rColInfo . xFirstGridWithInputRequiredColumn . clear ( ) ;
_rColInfo . nRequiredGridColumn = - 1 ;
}
}
//------------------------------------------------------------------------------
void ColumnInfoCache : : deinitializeControls ( )
{
for ( ColumnInfos : : iterator col = m_aColumns . begin ( ) ;
col ! = m_aColumns . end ( ) ;
+ + col
)
{
lcl_resetColumnControlInfo ( * col ) ;
}
}
//------------------------------------------------------------------------------
void ColumnInfoCache : : initializeControls ( const Sequence < Reference < XControl > > & _rControls )
{
try
{
// for every of our known columns, find the controls which are bound to this column
for ( ColumnInfos : : iterator col = m_aColumns . begin ( ) ;
col ! = m_aColumns . end ( ) ;
+ + col
)
{
OSL_ENSURE ( ! col - > xFirstControlWithInputRequired . is ( ) & & ! col - > xFirstGridWithInputRequiredColumn . is ( )
& & ( col - > nRequiredGridColumn = = - 1 ) , " ColumnInfoCache::initializeControls: called me twice? " ) ;
lcl_resetColumnControlInfo ( * col ) ;
Reference < XInterface > xNormColumn ( col - > xColumn , UNO_QUERY_THROW ) ;
const Reference < XControl > * pControl ( _rControls . getConstArray ( ) ) ;
const Reference < XControl > * pControlEnd ( pControl + _rControls . getLength ( ) ) ;
for ( ; pControl ! = pControlEnd ; + + pControl )
{
if ( ! pControl - > is ( ) )
continue ;
Reference < XPropertySet > xModel ( ( * pControl ) - > getModel ( ) , UNO_QUERY_THROW ) ;
Reference < XPropertySetInfo > xModelPSI ( xModel - > getPropertySetInfo ( ) , UNO_SET_THROW ) ;
// special handling for grid controls
Reference < XGrid > xGrid ( * pControl , UNO_QUERY ) ;
if ( xGrid . is ( ) )
{
Reference < XIndexAccess > xGridColAccess ( xModel , UNO_QUERY_THROW ) ;
sal_Int32 gridColCount = xGridColAccess - > getCount ( ) ;
sal_Int32 gridCol = 0 ;
for ( gridCol = 0 ; gridCol < gridColCount ; + + gridCol )
{
Reference < XPropertySet > xGridColumnModel ( xGridColAccess - > getByIndex ( gridCol ) , UNO_QUERY_THROW ) ;
if ( ! lcl_isBoundTo ( xGridColumnModel , xNormColumn )
| | ! lcl_isInputRequired ( xGridColumnModel )
)
continue ; // with next grid column
break ;
}
if ( gridCol < gridColCount )
{
// found a grid column which is bound to the given
col - > xFirstGridWithInputRequiredColumn = xGrid ;
col - > nRequiredGridColumn = gridCol ;
break ;
}
continue ; // with next control
}
if ( ! xModelPSI - > hasPropertyByName ( FM_PROP_BOUNDFIELD )
| | ! lcl_isBoundTo ( xModel , xNormColumn )
| | ! lcl_isInputRequired ( xModel )
)
continue ; // with next control
break ;
}
if ( pControl = = pControlEnd )
// did not find a control which is bound to this particular column, and for which the input is required
continue ; // with next DB column
col - > xFirstControlWithInputRequired = * pControl ;
}
}
catch ( const Exception & )
{
DBG_UNHANDLED_EXCEPTION ( ) ;
}
m_bControlsInitialized = true ;
}
//------------------------------------------------------------------------------
const ColumnInfo & ColumnInfoCache : : getColumnInfo ( size_t _pos )
{
if ( _pos > = m_aColumns . size ( ) )
throw IndexOutOfBoundsException ( ) ;
return m_aColumns [ _pos ] ;
}
2000-10-31 08:31:59 +00:00
//==================================================================
2008-12-01 12:31:27 +00:00
// OParameterContinuation
2000-10-31 08:31:59 +00:00
//==================================================================
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-09-18 16:07:07 +00:00
//==================================================================
// FmXAutoControl
//==================================================================
struct FmFieldInfo
{
rtl : : OUString aFieldName ;
2000-11-06 06:19:53 +00:00
Reference < XPropertySet > xField ;
2004-04-13 10:05:48 +00:00
Reference < XTextComponent > xText ;
2000-09-18 16:07:07 +00:00
2004-04-13 10:05:48 +00:00
FmFieldInfo ( const Reference < XPropertySet > & _xField , const Reference < XTextComponent > & _xText )
2000-09-18 16:07:07 +00:00
: xField ( _xField )
, xText ( _xText )
{ xField - > getPropertyValue ( FM_PROP_NAME ) > > = aFieldName ; }
} ;
//==================================================================
// FmXAutoControl
//==================================================================
class FmXAutoControl : public UnoControl
{
friend Reference < XInterface > SAL_CALL FmXAutoControl_NewInstance_Impl ( ) ;
public :
2010-12-06 14:14:11 +01:00
FmXAutoControl ( const : : comphelper : : ComponentContext & i_context )
: UnoControl ( i_context . getLegacyServiceFactory ( ) )
{
}
2000-09-18 16:07:07 +00:00
2010-11-21 13:15:06 +01:00
virtual : : rtl : : OUString GetComponentServiceName ( ) { return : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " Edit " ) ) ; }
2004-04-13 10:05:48 +00:00
virtual void SAL_CALL createPeer ( const Reference < XToolkit > & rxToolkit , const Reference < XWindowPeer > & rParentPeer ) throw ( RuntimeException ) ;
2000-09-18 16:07:07 +00:00
protected :
virtual void ImplSetPeerProperty ( const : : rtl : : OUString & rPropName , const Any & rVal ) ;
} ;
//------------------------------------------------------------------------------
2004-04-13 10:05:48 +00:00
void FmXAutoControl : : createPeer ( const Reference < XToolkit > & rxToolkit , const Reference < XWindowPeer > & rParentPeer ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
UnoControl : : createPeer ( rxToolkit , rParentPeer ) ;
2004-04-13 10:05:48 +00:00
Reference < XTextComponent > xText ( getPeer ( ) , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
if ( xText . is ( ) )
{
2005-04-13 07:28:58 +00:00
xText - > setText ( : : rtl : : OUString ( String ( SVX_RES ( RID_STR_AUTOFIELD ) ) ) ) ;
2000-09-18 16:07:07 +00:00
xText - > setEditable ( sal_False ) ;
}
}
//------------------------------------------------------------------------------
void FmXAutoControl : : ImplSetPeerProperty ( const : : rtl : : OUString & rPropName , const Any & rVal )
{
// these properties are ignored
if ( rPropName = = FM_PROP_TEXT )
return ;
UnoControl : : ImplSetPeerProperty ( rPropName , rVal ) ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
IMPL_LINK ( FormController , OnActivateTabOrder , void * , /*EMPTYTAG*/ )
2000-09-18 16:07:07 +00:00
{
activateTabOrder ( ) ;
return 1 ;
}
2004-04-13 10:05:48 +00:00
//------------------------------------------------------------------------------
struct UpdateAllListeners : public : : std : : unary_function < Reference < XDispatch > , bool >
{
bool operator ( ) ( const Reference < XDispatch > & _rxDispatcher ) const
{
static_cast < : : svx : : OSingleFeatureDispatcher * > ( _rxDispatcher . get ( ) ) - > updateAllListeners ( ) ;
2011-02-08 17:39:27 +01:00
// the return is a dummy only so we can use this struct in a o3tl::compose1 call
2004-04-13 10:05:48 +00:00
return true ;
}
} ;
//..............................................................................
2009-10-23 09:46:03 +02:00
IMPL_LINK ( FormController , OnInvalidateFeatures , void * , /*_pNotInterestedInThisParam*/ )
2004-04-13 10:05:48 +00:00
{
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2009-10-30 11:38:26 +01:00
for ( : : std : : set < sal_Int16 > : : const_iterator aLoop = m_aInvalidFeatures . begin ( ) ;
2004-04-13 10:05:48 +00:00
aLoop ! = m_aInvalidFeatures . end ( ) ;
+ + aLoop
)
{
DispatcherContainer : : const_iterator aDispatcherPos = m_aFeatureDispatchers . find ( * aLoop ) ;
if ( aDispatcherPos ! = m_aFeatureDispatchers . end ( ) )
{
// TODO: for the real and actual listener notifications, we should release
// our mutex
UpdateAllListeners ( ) ( aDispatcherPos - > second ) ;
}
}
return 1 ;
}
2000-09-18 16:07:07 +00:00
/*************************************************************************/
2009-10-23 09:46:03 +02:00
DBG_NAME ( FormController )
2000-09-18 16:07:07 +00:00
//------------------------------------------------------------------
2009-10-23 16:03:52 +02:00
FormController : : FormController ( const Reference < XMultiServiceFactory > & _rxORB )
2009-10-23 09:46:03 +02:00
: FormController_BASE ( m_aMutex )
, OPropertySetHelper ( FormController_BASE : : rBHelper )
2009-10-30 11:38:26 +01:00
, OSQLParserClient ( _rxORB )
, m_aContext ( _rxORB )
2000-09-18 16:07:07 +00:00
, m_aActivateListeners ( m_aMutex )
, m_aModifyListeners ( m_aMutex )
, m_aErrorListeners ( m_aMutex )
, m_aDeleteListeners ( m_aMutex )
, m_aRowSetApproveListeners ( m_aMutex )
, m_aParameterListeners ( m_aMutex )
2009-10-29 11:59:44 +01:00
, m_aFilterListeners ( m_aMutex )
2004-07-05 14:50:20 +00:00
, m_pControlBorderManager ( new : : svxform : : ControlBorderManager )
2009-10-30 11:38:26 +01:00
, m_xFormOperations ( )
, m_aMode ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " DataMode " ) ) )
2009-10-23 09:46:03 +02:00
, m_aLoadEvent ( LINK ( this , FormController , OnLoad ) )
, m_aToggleEvent ( LINK ( this , FormController , OnToggleAutoFields ) )
, m_aActivationEvent ( LINK ( this , FormController , OnActivated ) )
, m_aDeactivationEvent ( LINK ( this , FormController , OnDeactivated ) )
2009-10-29 15:55:37 +01:00
, m_nCurrentFilterPosition ( - 1 )
2000-09-18 16:07:07 +00:00
, m_bCurrentRecordModified ( sal_False )
, m_bCurrentRecordNew ( sal_False )
, m_bLocked ( sal_False )
2006-06-19 14:53:21 +00:00
, m_bDBConnection ( sal_False )
, m_bCycle ( sal_False )
, m_bCanInsert ( sal_False )
, m_bCanUpdate ( sal_False )
, m_bCommitLock ( sal_False )
, m_bModified ( sal_False )
, m_bControlsSorted ( sal_False )
2000-09-18 16:07:07 +00:00
, m_bFiltering ( sal_False )
, m_bAttachEvents ( sal_True )
, m_bDetachEvents ( sal_True )
2004-11-16 10:22:40 +00:00
, m_bAttemptedHandlerCreation ( false )
2010-09-17 08:38:54 +02:00
, m_bSuspendFilterTextListening ( false )
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
DBG_CTOR ( FormController , NULL ) ;
2002-12-05 08:58:04 +00:00
2000-10-20 13:18:57 +00:00
: : comphelper : : increment ( m_refCount ) ;
2000-09-18 16:07:07 +00:00
{
2004-04-15 10:26:50 +00:00
{
m_xAggregate = Reference < XAggregation > (
2009-10-30 11:38:26 +01:00
m_aContext . createComponent ( " com.sun.star.awt.TabController " ) ,
2004-04-15 10:26:50 +00:00
UNO_QUERY
) ;
2009-10-23 09:46:03 +02:00
DBG_ASSERT ( m_xAggregate . is ( ) , " FormController::FormController : could not create my aggregate ! " ) ;
2004-04-15 10:26:50 +00:00
m_xTabController = Reference < XTabController > ( m_xAggregate , UNO_QUERY ) ;
}
if ( m_xAggregate . is ( ) )
2004-04-13 10:05:48 +00:00
m_xAggregate - > setDelegator ( * this ) ;
}
2000-10-20 13:18:57 +00:00
: : comphelper : : decrement ( m_refCount ) ;
2000-09-18 16:07:07 +00:00
2004-04-13 10:05:48 +00:00
m_aTabActivationTimer . SetTimeout ( 500 ) ;
2009-10-23 09:46:03 +02:00
m_aTabActivationTimer . SetTimeoutHdl ( LINK ( this , FormController , OnActivateTabOrder ) ) ;
2004-04-13 10:05:48 +00:00
m_aFeatureInvalidationTimer . SetTimeout ( 200 ) ;
2009-10-23 09:46:03 +02:00
m_aFeatureInvalidationTimer . SetTimeoutHdl ( LINK ( this , FormController , OnInvalidateFeatures ) ) ;
2000-09-18 16:07:07 +00:00
}
//------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
FormController : : ~ FormController ( )
2000-09-18 16:07:07 +00:00
{
2003-10-21 07:43:57 +00:00
{
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2000-09-18 16:07:07 +00:00
2008-12-01 12:31:27 +00:00
m_aLoadEvent . CancelPendingCall ( ) ;
m_aToggleEvent . CancelPendingCall ( ) ;
m_aActivationEvent . CancelPendingCall ( ) ;
m_aDeactivationEvent . CancelPendingCall ( ) ;
2000-09-18 16:07:07 +00:00
2004-04-13 10:05:48 +00:00
if ( m_aTabActivationTimer . IsActive ( ) )
m_aTabActivationTimer . Stop ( ) ;
2003-10-21 07:43:57 +00:00
}
2000-09-18 16:07:07 +00:00
2004-04-13 10:05:48 +00:00
if ( m_aFeatureInvalidationTimer . IsActive ( ) )
m_aFeatureInvalidationTimer . Stop ( ) ;
2005-01-21 15:56:33 +00:00
disposeAllFeaturesAndDispatchers ( ) ;
2004-04-13 10:05:48 +00:00
2009-10-30 11:38:26 +01:00
if ( m_xFormOperations . is ( ) )
m_xFormOperations - > dispose ( ) ;
m_xFormOperations . clear ( ) ;
2000-09-18 16:07:07 +00:00
// Freigeben der Aggregation
2004-04-13 10:05:48 +00:00
if ( m_xAggregate . is ( ) )
2000-09-18 16:07:07 +00:00
{
2004-04-13 10:05:48 +00:00
m_xAggregate - > setDelegator ( NULL ) ;
m_xAggregate . clear ( ) ;
2000-09-18 16:07:07 +00:00
}
2002-12-05 08:58:04 +00:00
2004-07-05 14:50:20 +00:00
DELETEZ ( m_pControlBorderManager ) ;
2009-10-23 09:46:03 +02:00
DBG_DTOR ( FormController , NULL ) ;
2000-09-18 16:07:07 +00:00
}
2002-12-05 08:58:04 +00:00
2000-11-06 06:19:53 +00:00
// -----------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : acquire ( ) throw ( )
2000-11-06 06:19:53 +00:00
{
2009-10-23 09:46:03 +02:00
FormController_BASE : : acquire ( ) ;
2000-11-06 06:19:53 +00:00
}
2008-12-01 12:31:27 +00:00
2000-11-06 06:19:53 +00:00
// -----------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : release ( ) throw ( )
2000-11-06 06:19:53 +00:00
{
2009-10-23 09:46:03 +02:00
FormController_BASE : : release ( ) ;
2000-11-06 06:19:53 +00:00
}
2008-12-01 12:31:27 +00:00
//------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
Any SAL_CALL FormController : : queryInterface ( const Type & _rType ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
Any aRet = FormController_BASE : : queryInterface ( _rType ) ;
2008-12-01 12:31:27 +00:00
if ( ! aRet . hasValue ( ) )
aRet = OPropertySetHelper : : queryInterface ( _rType ) ;
if ( ! aRet . hasValue ( ) )
aRet = m_xAggregate - > queryAggregation ( _rType ) ;
return aRet ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
Sequence < sal_Int8 > SAL_CALL FormController : : getImplementationId ( ) throw ( RuntimeException )
2008-12-01 12:31:27 +00:00
{
static : : cppu : : OImplementationId * pId = NULL ;
if ( ! pId )
2000-09-18 16:07:07 +00:00
{
2008-12-01 12:31:27 +00:00
: : osl : : MutexGuard aGuard ( : : osl : : Mutex : : getGlobalMutex ( ) ) ;
if ( ! pId )
2000-09-18 16:07:07 +00:00
{
2008-12-01 12:31:27 +00:00
static : : cppu : : OImplementationId aId ;
2000-09-18 16:07:07 +00:00
pId = & aId ;
}
}
return pId - > getImplementationId ( ) ;
}
2008-12-01 12:31:27 +00:00
2000-09-18 16:07:07 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
Sequence < Type > SAL_CALL FormController : : getTypes ( ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2008-12-01 12:31:27 +00:00
return comphelper : : concatSequences (
2009-10-23 09:46:03 +02:00
FormController_BASE : : getTypes ( ) ,
2008-12-01 12:31:27 +00:00
: : cppu : : OPropertySetHelper : : getTypes ( )
) ;
2000-09-18 16:07:07 +00:00
}
2004-04-13 10:05:48 +00:00
// XServiceInfo
2000-09-18 16:07:07 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
sal_Bool SAL_CALL FormController : : supportsService ( const : : rtl : : OUString & ServiceName ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2004-04-13 10:05:48 +00:00
Sequence < : : rtl : : OUString > aSNL ( getSupportedServiceNames ( ) ) ;
2000-09-18 16:07:07 +00:00
const : : rtl : : OUString * pArray = aSNL . getConstArray ( ) ;
for ( sal_Int32 i = 0 ; i < aSNL . getLength ( ) ; i + + )
if ( pArray [ i ] = = ServiceName )
return sal_True ;
return sal_False ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
: : rtl : : OUString SAL_CALL FormController : : getImplementationName ( ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2010-11-21 13:15:06 +01:00
return : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " org.openoffice.comp.svx.FormController " ) ) ;
2000-09-18 16:07:07 +00:00
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
Sequence < : : rtl : : OUString > SAL_CALL FormController : : getSupportedServiceNames ( void ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2004-04-13 10:05:48 +00:00
// service names which are supported only, but cannot be used to created an
// instance at a service factory
Sequence < : : rtl : : OUString > aNonCreatableServiceNames ( 1 ) ;
aNonCreatableServiceNames [ 0 ] = : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " com.sun.star.form.FormControllerDispatcher " ) ) ;
// services which can be used to created an instance at a service factory
Sequence < : : rtl : : OUString > aCreatableServiceNames ( getSupportedServiceNames_Static ( ) ) ;
return : : comphelper : : concatSequences ( aCreatableServiceNames , aNonCreatableServiceNames ) ;
2000-09-18 16:07:07 +00:00
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
sal_Bool SAL_CALL FormController : : approveReset ( const EventObject & /*rEvent*/ ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
return sal_True ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : resetted ( const EventObject & rEvent ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
if ( getCurrentControl ( ) . is ( ) & & ( getCurrentControl ( ) - > getModel ( ) = = rEvent . Source ) )
m_bModified = sal_False ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
Sequence < : : rtl : : OUString > FormController : : getSupportedServiceNames_Static ( void )
2000-09-18 16:07:07 +00:00
{
static Sequence < : : rtl : : OUString > aServices ;
if ( ! aServices . getLength ( ) )
{
aServices . realloc ( 2 ) ;
2009-10-23 09:46:03 +02:00
aServices . getArray ( ) [ 0 ] = FM_FORM_CONTROLLER ;
2010-11-21 13:15:06 +01:00
aServices . getArray ( ) [ 1 ] = : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " com.sun.star.awt.control.TabController " ) ) ;
2000-09-18 16:07:07 +00:00
}
return aServices ;
}
2009-10-29 15:55:37 +01:00
// -----------------------------------------------------------------------------
namespace
2000-09-18 16:07:07 +00:00
{
2009-10-29 15:55:37 +01:00
struct ResetComponentText : public : : std : : unary_function < Reference < XTextComponent > , void >
2000-09-18 16:07:07 +00:00
{
2009-10-29 15:55:37 +01:00
void operator ( ) ( const Reference < XTextComponent > & _rxText )
{
_rxText - > setText ( : : rtl : : OUString ( ) ) ;
}
} ;
2000-09-18 16:07:07 +00:00
2009-10-29 15:55:37 +01:00
struct RemoveComponentTextListener : public : : std : : unary_function < Reference < XTextComponent > , void >
{
RemoveComponentTextListener ( const Reference < XTextListener > & _rxListener )
: m_xListener ( _rxListener )
{
}
2000-09-18 16:07:07 +00:00
2009-10-29 15:55:37 +01:00
void operator ( ) ( const Reference < XTextComponent > & _rxText )
2000-09-18 16:07:07 +00:00
{
2009-10-29 15:55:37 +01:00
_rxText - > removeTextListener ( m_xListener ) ;
2000-09-18 16:07:07 +00:00
}
2009-10-29 15:55:37 +01:00
private :
Reference < XTextListener > m_xListener ;
} ;
2000-09-18 16:07:07 +00:00
}
2009-10-29 15:55:37 +01:00
2009-04-23 10:42:05 +00:00
// -----------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : impl_setTextOnAllFilter_throw ( )
2009-04-23 10:42:05 +00:00
{
2010-09-17 08:38:54 +02:00
m_bSuspendFilterTextListening = true ;
: : comphelper : : FlagGuard aResetFlag ( m_bSuspendFilterTextListening ) ;
2009-10-29 11:59:44 +01:00
// reset the text for all controls
2009-10-29 15:55:37 +01:00
: : std : : for_each ( m_aFilterComponents . begin ( ) , m_aFilterComponents . end ( ) , ResetComponentText ( ) ) ;
if ( m_aFilterRows . empty ( ) )
// nothing to do anymore
return ;
2009-10-29 11:59:44 +01:00
if ( m_nCurrentFilterPosition < 0 )
return ;
2009-04-23 10:42:05 +00:00
// set the text for all filters
2009-10-29 15:55:37 +01:00
OSL_ENSURE ( m_aFilterRows . size ( ) > ( size_t ) m_nCurrentFilterPosition ,
2009-10-29 11:59:44 +01:00
" FormController::impl_setTextOnAllFilter_throw: m_nCurrentFilterPosition too big " ) ;
2000-09-18 16:07:07 +00:00
2009-10-29 15:55:37 +01:00
if ( ( size_t ) m_nCurrentFilterPosition < m_aFilterRows . size ( ) )
2009-04-23 10:42:05 +00:00
{
2009-10-29 15:55:37 +01:00
FmFilterRow & rRow = m_aFilterRows [ m_nCurrentFilterPosition ] ;
2009-10-29 11:59:44 +01:00
for ( FmFilterRow : : const_iterator iter2 = rRow . begin ( ) ;
iter2 ! = rRow . end ( ) ;
+ + iter2
)
2009-04-23 10:42:05 +00:00
{
2009-10-29 11:59:44 +01:00
iter2 - > first - > setText ( iter2 - > second ) ;
2009-04-23 10:42:05 +00:00
}
2009-10-29 11:59:44 +01:00
}
2009-04-23 10:42:05 +00:00
}
2000-09-18 16:07:07 +00:00
// OPropertySetHelper
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
sal_Bool FormController : : convertFastPropertyValue ( Any & /*rConvertedValue*/ , Any & /*rOldValue*/ ,
2006-06-19 14:53:21 +00:00
sal_Int32 /*nHandle*/ , const Any & /*rValue*/ )
2004-04-13 10:05:48 +00:00
throw ( IllegalArgumentException )
2000-09-18 16:07:07 +00:00
{
return sal_False ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : setFastPropertyValue_NoBroadcast ( sal_Int32 /*nHandle*/ , const Any & /*rValue*/ )
2004-04-13 10:05:48 +00:00
throw ( Exception )
2000-09-18 16:07:07 +00:00
{
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : getFastPropertyValue ( Any & rValue , sal_Int32 nHandle ) const
2000-09-18 16:07:07 +00:00
{
switch ( nHandle )
{
2007-11-21 14:22:32 +00:00
case FM_ATTR_FILTER :
2000-09-18 16:07:07 +00:00
{
2007-11-21 14:22:32 +00:00
: : rtl : : OUStringBuffer aFilter ;
2002-10-07 12:09:48 +00:00
OStaticDataAccessTools aStaticTools ;
Reference < XConnection > xConnection ( aStaticTools . getRowSetConnection ( Reference < XRowSet > ( m_xModelAsIndex , UNO_QUERY ) ) ) ;
2000-09-18 16:07:07 +00:00
if ( xConnection . is ( ) )
{
2004-04-13 10:05:48 +00:00
Reference < XDatabaseMetaData > xMetaData ( xConnection - > getMetaData ( ) ) ;
2009-10-30 11:38:26 +01:00
Reference < XNumberFormatsSupplier > xFormatSupplier ( aStaticTools . getNumberFormats ( xConnection , sal_True ) ) ;
Reference < XNumberFormatter > xFormatter ( m_aContext . createComponent ( " com.sun.star.util.NumberFormatter " ) , UNO_QUERY_THROW ) ;
2000-09-18 16:07:07 +00:00
xFormatter - > attachNumberFormatsSupplier ( xFormatSupplier ) ;
2004-04-13 10:05:48 +00:00
Reference < XColumnsSupplier > xSupplyCols ( m_xModelAsIndex , UNO_QUERY ) ;
Reference < XNameAccess > xFields ( xSupplyCols - > getColumns ( ) , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
2000-11-06 06:19:53 +00:00
: : rtl : : OUString aQuote ( xMetaData - > getIdentifierQuoteString ( ) ) ;
2000-09-18 16:07:07 +00:00
2009-10-29 11:59:44 +01:00
// now add the filter rows
2009-10-29 15:55:37 +01:00
try
2000-09-18 16:07:07 +00:00
{
2009-10-29 15:55:37 +01:00
for ( FmFilterRows : : const_iterator row = m_aFilterRows . begin ( ) ; row ! = m_aFilterRows . end ( ) ; + + row )
{
const FmFilterRow & rRow = * row ;
2000-09-18 16:07:07 +00:00
2009-10-29 15:55:37 +01:00
if ( rRow . empty ( ) )
continue ;
2007-11-21 14:22:32 +00:00
2010-11-01 12:05:01 +01:00
: : rtl : : OUStringBuffer aRowFilter ;
2009-10-29 15:55:37 +01:00
for ( FmFilterRow : : const_iterator condition = rRow . begin ( ) ; condition ! = rRow . end ( ) ; + + condition )
2000-09-18 16:07:07 +00:00
{
2009-10-29 15:55:37 +01:00
// get the field of the controls map
Reference < XControl > xControl ( condition - > first , UNO_QUERY_THROW ) ;
Reference < XPropertySet > xModelProps ( xControl - > getModel ( ) , UNO_QUERY_THROW ) ;
Reference < XPropertySet > xField ( xModelProps - > getPropertyValue ( FM_PROP_BOUNDFIELD ) , UNO_QUERY_THROW ) ;
: : rtl : : OUString sFilterValue ( condition - > second ) ;
: : rtl : : OUString sErrorMsg , sCriteria ;
2010-09-17 08:38:54 +02:00
const : : rtl : : Reference < ISQLParseNode > xParseNode =
2010-11-01 12:37:19 +01:00
predicateTree ( sErrorMsg , sFilterValue , xFormatter , xField ) ;
2009-10-29 15:55:37 +01:00
OSL_ENSURE ( xParseNode . is ( ) , " FormController::getFastPropertyValue: could not parse the field value predicate! " ) ;
if ( xParseNode . is ( ) )
{
// don't use a parse context here, we need it unlocalized
xParseNode - > parseNodeToStr ( sCriteria , xConnection , NULL ) ;
2010-11-01 12:05:01 +01:00
if ( condition ! = rRow . begin ( ) )
aRowFilter . appendAscii ( " AND " ) ;
aRowFilter . append ( sCriteria ) ;
2009-10-29 15:55:37 +01:00
}
2000-09-18 16:07:07 +00:00
}
2010-11-01 12:05:01 +01:00
if ( aRowFilter . getLength ( ) > 0 )
{
2010-11-01 12:50:56 +01:00
if ( aFilter . getLength ( ) )
aFilter . appendAscii ( " OR " ) ;
2010-11-01 12:05:01 +01:00
aFilter . appendAscii ( " ( " ) ;
aFilter . append ( aRowFilter . makeStringAndClear ( ) ) ;
aFilter . appendAscii ( " ) " ) ;
}
2000-09-18 16:07:07 +00:00
}
2009-10-29 15:55:37 +01:00
}
catch ( const Exception & )
{
DBG_UNHANDLED_EXCEPTION ( ) ;
aFilter . setLength ( 0 ) ;
2000-09-18 16:07:07 +00:00
}
}
2007-11-21 14:22:32 +00:00
rValue < < = aFilter . makeStringAndClear ( ) ;
2007-05-10 09:05:49 +00:00
}
break ;
case FM_ATTR_FORM_OPERATIONS :
2009-10-30 11:38:26 +01:00
rValue < < = m_xFormOperations ;
2007-05-10 09:05:49 +00:00
break ;
2000-09-18 16:07:07 +00:00
}
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
Reference < XPropertySetInfo > FormController : : getPropertySetInfo ( ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2000-11-06 06:19:53 +00:00
static Reference < XPropertySetInfo > xInfo ( createPropertySetInfo ( getInfoHelper ( ) ) ) ;
2000-09-18 16:07:07 +00:00
return xInfo ;
}
//------------------------------------------------------------------------------
# define DECL_PROP_CORE(varname, type) \
2000-11-06 06:19:53 +00:00
pDesc [ nPos + + ] = Property ( FM_PROP_ # # varname , FM_ATTR_ # # varname , : : getCppuType ( ( const type * ) 0 ) ,
2000-09-18 16:07:07 +00:00
# define DECL_PROP1(varname, type, attrib1) \
2003-06-12 09:29:01 +00:00
DECL_PROP_CORE ( varname , type ) PropertyAttribute : : attrib1 )
2000-09-18 16:07:07 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : fillProperties (
2000-11-06 06:19:53 +00:00
Sequence < Property > & /* [out] */ _rProps ,
2006-06-19 14:53:21 +00:00
Sequence < Property > & /* [out] */ /*_rAggregateProps*/
2000-09-18 16:07:07 +00:00
) const
{
2007-05-10 09:05:49 +00:00
_rProps . realloc ( 2 ) ;
2000-09-18 16:07:07 +00:00
sal_Int32 nPos = 0 ;
2000-11-06 06:19:53 +00:00
Property * pDesc = _rProps . getArray ( ) ;
2007-11-21 14:22:32 +00:00
DECL_PROP1 ( FILTER , rtl : : OUString , READONLY ) ;
2007-05-10 09:05:49 +00:00
DECL_PROP1 ( FORM_OPERATIONS , Reference < XFormOperations > , READONLY ) ;
2000-09-18 16:07:07 +00:00
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
: : cppu : : IPropertyArrayHelper & FormController : : getInfoHelper ( )
2000-09-18 16:07:07 +00:00
{
return * getArrayHelper ( ) ;
}
2009-10-29 11:59:44 +01:00
// XFilterController
//------------------------------------------------------------------------------
void SAL_CALL FormController : : addFilterControllerListener ( const Reference < XFilterControllerListener > & _Listener ) throw ( RuntimeException )
{
m_aFilterListeners . addInterface ( _Listener ) ;
}
//------------------------------------------------------------------------------
void SAL_CALL FormController : : removeFilterControllerListener ( const Reference < XFilterControllerListener > & _Listener ) throw ( RuntimeException )
{
m_aFilterListeners . removeInterface ( _Listener ) ;
}
//------------------------------------------------------------------------------
: : sal_Int32 SAL_CALL FormController : : getFilterComponents ( ) throw ( : : com : : sun : : star : : uno : : RuntimeException )
{
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
impl_checkDisposed_throw ( ) ;
2009-10-29 15:55:37 +01:00
return m_aFilterComponents . size ( ) ;
2009-10-29 11:59:44 +01:00
}
//------------------------------------------------------------------------------
: : sal_Int32 SAL_CALL FormController : : getDisjunctiveTerms ( ) throw ( : : com : : sun : : star : : uno : : RuntimeException )
{
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
impl_checkDisposed_throw ( ) ;
2009-10-29 15:55:37 +01:00
return m_aFilterRows . size ( ) ;
2009-10-29 11:59:44 +01:00
}
//------------------------------------------------------------------------------
void SAL_CALL FormController : : setPredicateExpression ( : : sal_Int32 _Component , : : sal_Int32 _Term , const : : rtl : : OUString & _PredicateExpression ) throw ( RuntimeException , IndexOutOfBoundsException )
{
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
impl_checkDisposed_throw ( ) ;
if ( ( _Component < 0 ) | | ( _Component > = getFilterComponents ( ) ) | | ( _Term < 0 ) | | ( _Term > = getDisjunctiveTerms ( ) ) )
throw IndexOutOfBoundsException ( : : rtl : : OUString ( ) , * this ) ;
2009-10-29 15:55:37 +01:00
Reference < XTextComponent > xText ( m_aFilterComponents [ _Component ] ) ;
2009-10-29 11:59:44 +01:00
xText - > setText ( _PredicateExpression ) ;
2009-10-29 15:55:37 +01:00
FmFilterRow & rFilterRow = m_aFilterRows [ _Term ] ;
2009-10-29 11:59:44 +01:00
if ( _PredicateExpression . getLength ( ) )
rFilterRow [ xText ] = _PredicateExpression ;
else
rFilterRow . erase ( xText ) ;
}
//------------------------------------------------------------------------------
Reference < XControl > FormController : : getFilterComponent ( : : sal_Int32 _Component ) throw ( RuntimeException , IndexOutOfBoundsException )
{
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
impl_checkDisposed_throw ( ) ;
if ( ( _Component < 0 ) | | ( _Component > = getFilterComponents ( ) ) )
throw IndexOutOfBoundsException ( : : rtl : : OUString ( ) , * this ) ;
2009-10-29 15:55:37 +01:00
return Reference < XControl > ( m_aFilterComponents [ _Component ] , UNO_QUERY ) ;
2009-10-29 11:59:44 +01:00
}
//------------------------------------------------------------------------------
Sequence < Sequence < : : rtl : : OUString > > FormController : : getPredicateExpressions ( ) throw ( RuntimeException )
{
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
impl_checkDisposed_throw ( ) ;
2009-10-29 15:55:37 +01:00
Sequence < Sequence < : : rtl : : OUString > > aExpressions ( m_aFilterRows . size ( ) ) ;
2009-10-29 11:59:44 +01:00
sal_Int32 termIndex = 0 ;
2009-10-29 15:55:37 +01:00
for ( FmFilterRows : : const_iterator row = m_aFilterRows . begin ( ) ;
row ! = m_aFilterRows . end ( ) ;
2009-10-29 11:59:44 +01:00
+ + row , + + termIndex
)
{
const FmFilterRow & rRow ( * row ) ;
2009-10-29 15:55:37 +01:00
Sequence < : : rtl : : OUString > aConjunction ( m_aFilterComponents . size ( ) ) ;
2009-10-29 11:59:44 +01:00
sal_Int32 componentIndex = 0 ;
2009-10-29 15:55:37 +01:00
for ( FilterComponents : : const_iterator comp = m_aFilterComponents . begin ( ) ;
comp ! = m_aFilterComponents . end ( ) ;
2009-10-29 11:59:44 +01:00
+ + comp , + + componentIndex
)
{
2009-10-29 15:55:37 +01:00
FmFilterRow : : const_iterator predicate = rRow . find ( * comp ) ;
2009-10-29 11:59:44 +01:00
if ( predicate ! = rRow . end ( ) )
aConjunction [ componentIndex ] = predicate - > second ;
}
aExpressions [ termIndex ] = aConjunction ;
}
return aExpressions ;
}
//------------------------------------------------------------------------------
void SAL_CALL FormController : : removeDisjunctiveTerm ( : : sal_Int32 _Term ) throw ( IndexOutOfBoundsException , RuntimeException )
{
// SYNCHRONIZED -->
: : osl : : ClearableMutexGuard aGuard ( m_aMutex ) ;
impl_checkDisposed_throw ( ) ;
if ( ( _Term < 0 ) | | ( _Term > = getDisjunctiveTerms ( ) ) )
throw IndexOutOfBoundsException ( : : rtl : : OUString ( ) , * this ) ;
// if the to-be-deleted row is our current row, we need to shift
if ( _Term = = m_nCurrentFilterPosition )
{
2009-10-29 15:55:37 +01:00
if ( m_nCurrentFilterPosition < sal_Int32 ( m_aFilterRows . size ( ) - 1 ) )
2009-10-29 11:59:44 +01:00
+ + m_nCurrentFilterPosition ;
else
- - m_nCurrentFilterPosition ;
}
2009-10-29 15:55:37 +01:00
FmFilterRows : : iterator pos = m_aFilterRows . begin ( ) + _Term ;
m_aFilterRows . erase ( pos ) ;
2009-10-29 11:59:44 +01:00
// adjust m_nCurrentFilterPosition if the removed row preceeded it
if ( _Term < m_nCurrentFilterPosition )
- - m_nCurrentFilterPosition ;
2009-10-29 15:55:37 +01:00
OSL_POSTCOND ( ( m_nCurrentFilterPosition < 0 ) = = ( m_aFilterRows . empty ( ) ) ,
" FormController::removeDisjunctiveTerm: inconsistency! " ) ;
2009-10-29 11:59:44 +01:00
// update the texts in the filter controls
impl_setTextOnAllFilter_throw ( ) ;
FilterEvent aEvent ;
aEvent . Source = * this ;
aEvent . DisjunctiveTerm = _Term ;
aGuard . clear ( ) ;
// <-- SYNCHRONIZED
m_aFilterListeners . notifyEach ( & XFilterControllerListener : : disjunctiveTermRemoved , aEvent ) ;
}
//------------------------------------------------------------------------------
void SAL_CALL FormController : : appendEmptyDisjunctiveTerm ( ) throw ( RuntimeException )
{
// SYNCHRONIZED -->
: : osl : : ClearableMutexGuard aGuard ( m_aMutex ) ;
impl_checkDisposed_throw ( ) ;
impl_appendEmptyFilterRow ( aGuard ) ;
// <-- SYNCHRONIZED
}
//------------------------------------------------------------------------------
: : sal_Int32 SAL_CALL FormController : : getActiveTerm ( ) throw ( RuntimeException )
{
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
impl_checkDisposed_throw ( ) ;
return m_nCurrentFilterPosition ;
}
//------------------------------------------------------------------------------
void SAL_CALL FormController : : setActiveTerm ( : : sal_Int32 _ActiveTerm ) throw ( IndexOutOfBoundsException , RuntimeException )
{
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
impl_checkDisposed_throw ( ) ;
if ( ( _ActiveTerm < 0 ) | | ( _ActiveTerm > = getDisjunctiveTerms ( ) ) )
throw IndexOutOfBoundsException ( : : rtl : : OUString ( ) , * this ) ;
if ( _ActiveTerm = = getActiveTerm ( ) )
return ;
m_nCurrentFilterPosition = _ActiveTerm ;
impl_setTextOnAllFilter_throw ( ) ;
}
2004-04-13 10:05:48 +00:00
// XElementAccess
2000-09-18 16:07:07 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
sal_Bool SAL_CALL FormController : : hasElements ( void ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2009-10-29 11:59:44 +01:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2002-11-14 09:01:03 +00:00
return ! m_aChilds . empty ( ) ;
2000-09-18 16:07:07 +00:00
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
Type SAL_CALL FormController : : getElementType ( void ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2004-04-13 10:05:48 +00:00
return : : getCppuType ( ( const Reference < XFormController > * ) 0 ) ;
2000-09-18 16:07:07 +00:00
}
2004-04-13 10:05:48 +00:00
// XEnumerationAccess
2000-09-18 16:07:07 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
Reference < XEnumeration > SAL_CALL FormController : : createEnumeration ( void ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2000-10-20 13:18:57 +00:00
return new : : comphelper : : OEnumerationByIndex ( this ) ;
2000-09-18 16:07:07 +00:00
}
2004-04-13 10:05:48 +00:00
// XIndexAccess
2000-09-18 16:07:07 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
sal_Int32 SAL_CALL FormController : : getCount ( void ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2003-05-19 11:51:00 +00:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2000-09-18 16:07:07 +00:00
return m_aChilds . size ( ) ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
Any SAL_CALL FormController : : getByIndex ( sal_Int32 Index ) throw ( IndexOutOfBoundsException , WrappedTargetException , RuntimeException )
2000-09-18 16:07:07 +00:00
{
2003-05-19 11:51:00 +00:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2000-09-18 16:07:07 +00:00
if ( Index < 0 | |
2001-05-16 13:22:30 +00:00
Index > = ( sal_Int32 ) m_aChilds . size ( ) )
2004-04-13 10:05:48 +00:00
throw IndexOutOfBoundsException ( ) ;
2000-09-18 16:07:07 +00:00
2009-10-29 11:59:44 +01:00
return makeAny ( m_aChilds [ Index ] ) ;
2000-09-18 16:07:07 +00:00
}
// EventListener
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : disposing ( const EventObject & e ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
// Ist der Container disposed worden
2003-05-19 11:51:00 +00:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2004-04-13 10:05:48 +00:00
Reference < XControlContainer > xContainer ( e . Source , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
if ( xContainer . is ( ) )
{
2004-04-13 10:05:48 +00:00
setContainer ( Reference < XControlContainer > ( ) ) ;
2000-09-18 16:07:07 +00:00
}
else
{
// ist ein Control disposed worden
2004-04-13 10:05:48 +00:00
Reference < XControl > xControl ( e . Source , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
if ( xControl . is ( ) )
{
if ( getContainer ( ) . is ( ) )
removeControl ( xControl ) ;
}
}
}
// OComponentHelper
2005-01-21 15:56:33 +00:00
//-----------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : disposeAllFeaturesAndDispatchers ( ) SAL_THROW ( ( ) )
2005-01-21 15:56:33 +00:00
{
for ( DispatcherContainer : : iterator aDispatcher = m_aFeatureDispatchers . begin ( ) ;
aDispatcher ! = m_aFeatureDispatchers . end ( ) ;
+ + aDispatcher
)
{
try
{
: : comphelper : : disposeComponent ( aDispatcher - > second ) ;
}
catch ( const Exception & )
{
2009-10-23 16:03:52 +02:00
DBG_UNHANDLED_EXCEPTION ( ) ;
2005-01-21 15:56:33 +00:00
}
}
m_aFeatureDispatchers . clear ( ) ;
}
2000-09-18 16:07:07 +00:00
//-----------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : disposing ( void )
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
EventObject aEvt ( * this ) ;
2004-04-13 10:05:48 +00:00
// if we're still active, simulate a "deactivated" event
if ( m_xActiveControl . is ( ) )
2006-07-26 06:43:01 +00:00
m_aActivateListeners . notifyEach ( & XFormControllerListener : : formDeactivated , aEvt ) ;
2000-09-18 16:07:07 +00:00
2004-04-13 10:05:48 +00:00
// notify all our listeners
2000-09-18 16:07:07 +00:00
m_aActivateListeners . disposeAndClear ( aEvt ) ;
m_aModifyListeners . disposeAndClear ( aEvt ) ;
m_aErrorListeners . disposeAndClear ( aEvt ) ;
m_aDeleteListeners . disposeAndClear ( aEvt ) ;
m_aRowSetApproveListeners . disposeAndClear ( aEvt ) ;
m_aParameterListeners . disposeAndClear ( aEvt ) ;
2009-10-29 11:59:44 +01:00
m_aFilterListeners . disposeAndClear ( aEvt ) ;
2000-09-18 16:07:07 +00:00
2003-05-19 11:51:00 +00:00
removeBoundFieldListener ( ) ;
2002-10-01 13:04:27 +00:00
stopFiltering ( ) ;
2004-07-05 14:50:20 +00:00
m_pControlBorderManager - > restoreAll ( ) ;
2009-10-29 15:55:37 +01:00
m_aFilterRows . clear ( ) ;
2000-09-18 16:07:07 +00:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2008-08-19 08:47:45 +00:00
m_xActiveControl = NULL ;
implSetCurrentControl ( NULL ) ;
2000-09-18 16:07:07 +00:00
2004-04-13 10:05:48 +00:00
// clean up our children
2000-09-18 16:07:07 +00:00
for ( FmFormControllers : : const_iterator i = m_aChilds . begin ( ) ;
2010-12-29 09:52:22 +01:00
i ! = m_aChilds . end ( ) ; + + i )
2000-09-18 16:07:07 +00:00
{
// search the position of the model within the form
2004-04-13 10:05:48 +00:00
Reference < XFormComponent > xForm ( ( * i ) - > getModel ( ) , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
sal_uInt32 nPos = m_xModelAsIndex - > getCount ( ) ;
2004-04-13 10:05:48 +00:00
Reference < XFormComponent > xTemp ;
2000-09-18 16:07:07 +00:00
for ( ; nPos ; )
{
2004-04-13 10:05:48 +00:00
m_xModelAsIndex - > getByIndex ( - - nPos ) > > = xTemp ;
if ( xForm . get ( ) = = xTemp . get ( ) )
2000-09-18 16:07:07 +00:00
{
2004-04-13 10:05:48 +00:00
Reference < XInterface > xIfc ( * i , UNO_QUERY ) ;
m_xModelAsManager - > detach ( nPos , xIfc ) ;
2000-09-18 16:07:07 +00:00
break ;
}
}
2004-04-13 10:05:48 +00:00
Reference < XComponent > ( * i , UNO_QUERY ) - > dispose ( ) ;
2000-09-18 16:07:07 +00:00
}
m_aChilds . clear ( ) ;
2005-01-21 15:56:33 +00:00
disposeAllFeaturesAndDispatchers ( ) ;
2004-04-13 10:05:48 +00:00
2009-10-30 11:38:26 +01:00
if ( m_xFormOperations . is ( ) )
m_xFormOperations - > dispose ( ) ;
m_xFormOperations . clear ( ) ;
2000-09-18 16:07:07 +00:00
if ( m_bDBConnection )
unload ( ) ;
2004-04-13 10:05:48 +00:00
setContainer ( NULL ) ;
setModel ( NULL ) ;
setParent ( NULL ) ;
2000-09-18 16:07:07 +00:00
2004-04-13 10:05:48 +00:00
: : comphelper : : disposeComponent ( m_xComposer ) ;
2000-09-18 16:07:07 +00:00
m_bDBConnection = sal_False ;
}
2004-07-05 14:50:20 +00:00
//------------------------------------------------------------------------------
namespace
{
static bool lcl_shouldUseDynamicControlBorder ( const Reference < XInterface > & _rxForm , const Any & _rDynamicColorProp )
{
bool bDoUse = false ;
if ( ! ( _rDynamicColorProp > > = bDoUse ) )
{
DocumentType eDocType = DocumentClassification : : classifyHostDocument ( _rxForm ) ;
2005-01-05 11:20:25 +00:00
return ControlLayouter : : useDynamicBorderColor ( eDocType ) ;
2004-07-05 14:50:20 +00:00
}
return bDoUse ;
}
}
2000-09-18 16:07:07 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : propertyChange ( const PropertyChangeEvent & evt ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
2003-05-19 11:51:00 +00:00
if ( evt . PropertyName = = FM_PROP_BOUNDFIELD )
2000-09-18 16:07:07 +00:00
{
2003-05-19 11:51:00 +00:00
Reference < XPropertySet > xOldBound ;
evt . OldValue > > = xOldBound ;
if ( ! xOldBound . is ( ) & & evt . NewValue . hasValue ( ) )
2000-09-18 16:07:07 +00:00
{
2004-04-13 10:05:48 +00:00
Reference < XControlModel > xControlModel ( evt . Source , UNO_QUERY ) ;
Reference < XControl > xControl = findControl ( m_aControls , xControlModel , sal_False , sal_False ) ;
2003-05-19 11:51:00 +00:00
if ( xControl . is ( ) )
{
2004-11-16 10:22:40 +00:00
startControlModifyListening ( xControl ) ;
2003-05-19 11:51:00 +00:00
Reference < XPropertySet > xProp ( xControlModel , UNO_QUERY ) ;
if ( xProp . is ( ) )
xProp - > removePropertyChangeListener ( FM_PROP_BOUNDFIELD , this ) ;
}
2000-09-18 16:07:07 +00:00
}
2003-05-19 11:51:00 +00:00
}
else
{
sal_Bool bModifiedChanged = ( evt . PropertyName = = FM_PROP_ISMODIFIED ) ;
sal_Bool bNewChanged = ( evt . PropertyName = = FM_PROP_ISNEW ) ;
if ( bModifiedChanged | | bNewChanged )
2000-09-18 16:07:07 +00:00
{
2003-05-19 11:51:00 +00:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
if ( bModifiedChanged )
m_bCurrentRecordModified = : : comphelper : : getBOOL ( evt . NewValue ) ;
else
m_bCurrentRecordNew = : : comphelper : : getBOOL ( evt . NewValue ) ;
// toggle the locking
if ( m_bLocked ! = determineLockState ( ) )
{
m_bLocked = ! m_bLocked ;
setLocks ( ) ;
if ( isListeningForChanges ( ) )
startListening ( ) ;
else
stopListening ( ) ;
}
2008-12-01 12:31:27 +00:00
if ( bNewChanged )
m_aToggleEvent . Call ( ) ;
2000-09-18 16:07:07 +00:00
2003-05-19 11:51:00 +00:00
if ( ! m_bCurrentRecordModified )
m_bModified = sal_False ;
}
2004-07-05 14:50:20 +00:00
else if ( evt . PropertyName = = FM_PROP_DYNAMIC_CONTROL_BORDER )
{
bool bEnable = lcl_shouldUseDynamicControlBorder ( evt . Source , evt . NewValue ) ;
if ( bEnable )
{
m_pControlBorderManager - > enableDynamicBorderColor ( ) ;
2004-11-16 10:22:40 +00:00
if ( m_xActiveControl . is ( ) )
m_pControlBorderManager - > focusGained ( m_xActiveControl . get ( ) ) ;
2004-07-05 14:50:20 +00:00
}
else
{
m_pControlBorderManager - > disableDynamicBorderColor ( ) ;
}
}
2000-09-18 16:07:07 +00:00
}
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
bool FormController : : replaceControl ( const Reference < XControl > & _rxExistentControl , const Reference < XControl > & _rxNewControl )
2000-09-18 16:07:07 +00:00
{
2006-11-14 12:24:06 +00:00
bool bSuccess = false ;
try
2000-09-18 16:07:07 +00:00
{
2006-11-14 12:24:06 +00:00
Reference < XIdentifierReplace > xContainer ( getContainer ( ) , UNO_QUERY ) ;
2009-10-23 09:46:03 +02:00
DBG_ASSERT ( xContainer . is ( ) , " FormController::replaceControl: yes, it's not required by the service description, but XItentifierReplaces would be nice! " ) ;
2006-11-14 12:24:06 +00:00
if ( xContainer . is ( ) )
{
// look up the ID of _rxExistentControl
Sequence < sal_Int32 > aIdentifiers ( xContainer - > getIdentifiers ( ) ) ;
const sal_Int32 * pIdentifiers = aIdentifiers . getConstArray ( ) ;
const sal_Int32 * pIdentifiersEnd = aIdentifiers . getConstArray ( ) + aIdentifiers . getLength ( ) ;
for ( ; pIdentifiers ! = pIdentifiersEnd ; + + pIdentifiers )
{
Reference < XControl > xCheck ( xContainer - > getByIdentifier ( * pIdentifiers ) , UNO_QUERY ) ;
if ( xCheck = = _rxExistentControl )
break ;
}
2009-10-23 09:46:03 +02:00
DBG_ASSERT ( pIdentifiers ! = pIdentifiersEnd , " FormController::replaceControl: did not find the control in the container! " ) ;
2006-11-14 12:24:06 +00:00
if ( pIdentifiers ! = pIdentifiersEnd )
{
bool bReplacedWasActive = ( m_xActiveControl . get ( ) = = _rxExistentControl . get ( ) ) ;
bool bReplacedWasCurrent = ( m_xCurrentControl . get ( ) = = _rxExistentControl . get ( ) ) ;
if ( bReplacedWasActive )
{
2008-08-19 08:47:45 +00:00
m_xActiveControl = NULL ;
implSetCurrentControl ( NULL ) ;
2006-11-14 12:24:06 +00:00
}
else if ( bReplacedWasCurrent )
2008-08-19 08:47:45 +00:00
{
implSetCurrentControl ( _rxNewControl ) ;
}
2006-11-14 12:24:06 +00:00
// carry over the model
_rxNewControl - > setModel ( _rxExistentControl - > getModel ( ) ) ;
xContainer - > replaceByIdentifer ( * pIdentifiers , makeAny ( _rxNewControl ) ) ;
bSuccess = true ;
if ( bReplacedWasActive )
{
Reference < XWindow > xControlWindow ( _rxNewControl , UNO_QUERY ) ;
if ( xControlWindow . is ( ) )
xControlWindow - > setFocus ( ) ;
}
}
}
}
catch ( const Exception & )
{
2009-10-23 16:03:52 +02:00
DBG_UNHANDLED_EXCEPTION ( ) ;
2000-09-18 16:07:07 +00:00
}
2006-11-14 12:24:06 +00:00
Reference < XControl > xDisposeIt ( bSuccess ? _rxExistentControl : _rxNewControl ) ;
: : comphelper : : disposeComponent ( xDisposeIt ) ;
return bSuccess ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : toggleAutoFields ( sal_Bool bAutoFields )
2006-11-14 12:24:06 +00:00
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
2000-09-18 16:07:07 +00:00
2003-11-24 15:38:56 +00:00
2005-10-24 07:26:42 +00:00
Sequence < Reference < XControl > > aControlsCopy ( m_aControls ) ;
const Reference < XControl > * pControls = aControlsCopy . getConstArray ( ) ;
sal_Int32 nControls = aControlsCopy . getLength ( ) ;
2000-09-18 16:07:07 +00:00
if ( bAutoFields )
{
// as we don't want new controls to be attached to the scripting environment
// we change attach flags
m_bAttachEvents = sal_False ;
2004-11-16 10:22:40 +00:00
for ( sal_Int32 i = nControls ; i > 0 ; )
2000-09-18 16:07:07 +00:00
{
2006-11-14 12:24:06 +00:00
Reference < XControl > xControl = pControls [ - - i ] ;
2000-09-18 16:07:07 +00:00
if ( xControl . is ( ) )
{
2000-11-06 06:19:53 +00:00
Reference < XPropertySet > xSet ( xControl - > getModel ( ) , UNO_QUERY ) ;
2000-10-20 13:18:57 +00:00
if ( xSet . is ( ) & & : : comphelper : : hasProperty ( FM_PROP_BOUNDFIELD , xSet ) )
2000-09-18 16:07:07 +00:00
{
// does the model use a bound field ?
2000-11-07 12:16:50 +00:00
Reference < XPropertySet > xField ;
xSet - > getPropertyValue ( FM_PROP_BOUNDFIELD ) > > = xField ;
2000-09-18 16:07:07 +00:00
// is it a autofield?
2006-11-14 12:24:06 +00:00
if ( xField . is ( )
& & : : comphelper : : hasProperty ( FM_PROP_AUTOINCREMENT , xField )
& & : : comphelper : : getBOOL ( xField - > getPropertyValue ( FM_PROP_AUTOINCREMENT ) )
)
2000-09-18 16:07:07 +00:00
{
2010-12-06 14:14:11 +01:00
replaceControl ( xControl , new FmXAutoControl ( m_aContext ) ) ;
2000-09-18 16:07:07 +00:00
}
}
}
}
m_bAttachEvents = sal_True ;
}
else
{
m_bDetachEvents = sal_False ;
2004-11-16 10:22:40 +00:00
for ( sal_Int32 i = nControls ; i > 0 ; )
2000-09-18 16:07:07 +00:00
{
2006-11-14 12:24:06 +00:00
Reference < XControl > xControl = pControls [ - - i ] ;
2000-09-18 16:07:07 +00:00
if ( xControl . is ( ) )
{
2000-11-06 06:19:53 +00:00
Reference < XPropertySet > xSet ( xControl - > getModel ( ) , UNO_QUERY ) ;
2000-10-20 13:18:57 +00:00
if ( xSet . is ( ) & & : : comphelper : : hasProperty ( FM_PROP_BOUNDFIELD , xSet ) )
2000-09-18 16:07:07 +00:00
{
// does the model use a bound field ?
2000-11-07 12:16:50 +00:00
Reference < XPropertySet > xField ;
xSet - > getPropertyValue ( FM_PROP_BOUNDFIELD ) > > = xField ;
2000-09-18 16:07:07 +00:00
// is it a autofield?
2006-11-14 12:24:06 +00:00
if ( xField . is ( )
& & : : comphelper : : hasProperty ( FM_PROP_AUTOINCREMENT , xField )
& & : : comphelper : : getBOOL ( xField - > getPropertyValue ( FM_PROP_AUTOINCREMENT ) )
)
2000-09-18 16:07:07 +00:00
{
2006-11-14 12:24:06 +00:00
: : rtl : : OUString sServiceName ;
OSL_VERIFY ( xSet - > getPropertyValue ( FM_PROP_DEFAULTCONTROL ) > > = sServiceName ) ;
2009-10-30 11:38:26 +01:00
Reference < XControl > xNewControl ( m_aContext . createComponent ( sServiceName ) , UNO_QUERY ) ;
2006-11-14 12:24:06 +00:00
replaceControl ( xControl , xNewControl ) ;
2000-09-18 16:07:07 +00:00
}
}
}
}
m_bDetachEvents = sal_True ;
}
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
IMPL_LINK ( FormController , OnToggleAutoFields , void * , EMPTYARG )
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
2008-12-01 12:31:27 +00:00
2000-09-18 16:07:07 +00:00
toggleAutoFields ( m_bCurrentRecordNew ) ;
return 1L ;
}
2004-04-13 10:05:48 +00:00
// XTextListener
2000-09-18 16:07:07 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : textChanged ( const TextEvent & e ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2009-10-29 11:59:44 +01:00
// SYNCHRONIZED -->
: : osl : : ClearableMutexGuard aGuard ( m_aMutex ) ;
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
2010-09-17 08:38:54 +02:00
if ( ! m_bFiltering )
2000-09-18 16:07:07 +00:00
{
2010-09-17 08:38:54 +02:00
impl_onModify ( ) ;
return ;
}
2004-04-13 10:05:48 +00:00
2010-09-17 08:38:54 +02:00
if ( m_bSuspendFilterTextListening )
return ;
2003-05-19 11:51:00 +00:00
2010-09-17 08:38:54 +02:00
Reference < XTextComponent > xText ( e . Source , UNO_QUERY ) ;
: : rtl : : OUString aText = xText - > getText ( ) ;
2009-10-29 11:59:44 +01:00
2010-09-17 08:38:54 +02:00
if ( m_aFilterRows . empty ( ) )
appendEmptyDisjunctiveTerm ( ) ;
2009-10-29 11:59:44 +01:00
2010-09-17 08:38:54 +02:00
// Suchen der aktuellen Row
if ( ( ( size_t ) m_nCurrentFilterPosition > = m_aFilterRows . size ( ) ) | | ( m_nCurrentFilterPosition < 0 ) )
{
OSL_ENSURE ( false , " FormController::textChanged: m_nCurrentFilterPosition is wrong! " ) ;
return ;
}
2009-10-29 11:59:44 +01:00
2010-09-17 08:38:54 +02:00
FmFilterRow & rRow = m_aFilterRows [ m_nCurrentFilterPosition ] ;
2009-10-29 11:59:44 +01:00
2010-09-17 08:38:54 +02:00
// do we have a new filter
if ( aText . getLength ( ) )
rRow [ xText ] = aText ;
CWS-TOOLING: integrate CWS dba32a
2009-04-16 13:08:19 +0200 oj r270882 : #i14538# set property at control
2009-04-16 13:04:28 +0200 oj r270881 : #i98557# remove binary string for SRB
2009-04-15 13:19:10 +0200 oj r270838 : #i96782# use type set at view
2009-04-14 14:53:20 +0200 oj r270778 : #i96782# set initialize size for custom shape
2009-04-06 14:19:14 +0200 oj r270546 : #i88432# correct pos when < 0 while resizing
2009-04-06 13:36:13 +0200 oj r270541 : #i96782# handle toolbar and menubar differently
2009-04-06 13:33:54 +0200 oj r270540 : #i96782# handle toolbar and menubar differently
2009-04-06 12:28:23 +0200 oj r270534 : #i96782# handle toolbar and menubar differently
2009-04-06 12:27:44 +0200 oj r270533 : #i96782# handle toolbar and menubar differently
2009-04-06 12:24:32 +0200 oj r270532 : #i96782# handle toolbar and menubar differently
2009-04-06 12:15:15 +0200 oj r270531 : do not initialze when field is empty
2009-04-06 10:06:08 +0200 oj r270528 : #i96782# clean up of menubar and remove duplicates
2009-04-06 09:47:49 +0200 oj r270527 : #i96519# adjust help text dynamic
2009-04-03 13:43:20 +0200 oj r270482 : do not need to remove section from observer they are already disposed
2009-04-03 13:27:28 +0200 fs r270479 : #i97356#
2009-04-02 11:30:39 +0200 fs r270386 : UNX line ends
2009-04-02 10:54:51 +0200 fs r270379 : UNX line ends
2009-04-02 10:39:57 +0200 fs r270378 : UNX line ends
2009-04-02 10:37:24 +0200 fs r270377 : why did this survive the rebase? was removed on trunk ...
2009-03-31 13:31:12 +0200 fs r270277 : component_foo should be public
2009-03-28 00:21:01 +0100 fs r270176 : manuallly merged the changes which happened in CWS before resync to m45, where the directory had been moved from reportdesign/registry to reportbuilder/registry
2009-03-27 23:01:20 +0100 fs r270174 : CWS-TOOLING: rebase CWS dba32a to trunk@270033 (milestone: DEV300:m45)
2009-03-11 12:23:35 +0100 fs r269310 : #i99958# ensure the ControlModelLock doesn't release twice
2009-03-06 09:07:32 +0100 fs r268970 : ignore output paths in SVN's status
2009-03-06 09:07:08 +0100 fs r268969 : ignore output paths in SVN's status
2009-03-04 11:28:02 +0100 oj r268800 : copy and paste error, check correct end now
2009-03-03 15:49:11 +0100 fs r268736 : #i10000# those merges were lost during the rebase (m38->m42)
2009-03-03 13:25:27 +0100 lla r268720 : #i99652# fix wrong refactoring
2009-02-27 11:12:56 +0100 fs r268566 : beautified
2009-02-27 10:53:47 +0100 fs r268561 : doFormListening(false) only when actually isFormListening() (found during complex test case XMLFormSettings with assertions)
2009-02-26 20:55:31 +0100 fs r268546 : #i96530# set the Label property of the bound control, if we didn't create a dedicated label control
2009-02-26 11:53:09 +0100 fs r268494 : #i10000#
2009-02-26 11:27:50 +0100 fs r268493 : #i10000#
2009-02-26 11:17:08 +0100 fs r268490 : reportdesign depends on REPORTBUILDER, not REPORTDESIGN
2009-02-25 11:39:48 +0100 fs r268422 : #i10000# post-resync: INFO_ESCAPE_DATETIME got lost during rebase
2009-02-24 23:24:10 +0100 fs r268411 : CWS-TOOLING: rebase CWS dba32a to trunk@268395 (milestone: DEV300:m42)
2009-02-20 15:09:48 +0100 fs r268324 : respect ImplicitCatalog/SchemaRestriction in all necessary places
2009-02-20 13:48:10 +0100 oj r268318 : order of initialize corrected
2009-02-14 15:07:52 +0100 fs r267759 : #i98975# when an image does not have a bitmap, but a text, draw this (as placeholder)
2009-02-14 15:02:40 +0100 fs r267758 : consolidated and removed some duplicate code
2009-02-14 13:52:23 +0100 fs r267756 : #i10000#
2009-02-13 22:08:34 +0100 fs r267750 : #i100000#
2009-02-13 22:07:25 +0100 fs r267749 : #i10000#
2009-02-13 21:55:36 +0100 fs r267747 : #i10000#
2009-02-13 21:54:27 +0100 fs r267746 : use const_cast
2009-02-13 21:29:10 +0100 fs r267745 : #i10000#
2009-02-13 21:27:39 +0100 fs r267744 : #i10000#
2009-02-13 20:59:13 +0100 fs r267742 : #i10000#
2009-02-13 13:21:30 +0100 fs r267717 : better diagnostics
2009-02-13 13:17:24 +0100 fs r267715 : #i58313# support Catalog/SchemaRestriction settings, which are applied in getTables when 'all catalogs/schemas' are to be retrieved
2009-02-13 13:16:14 +0100 fs r267714 : filter out some more known global settings
2009-02-13 12:39:43 +0100 fs r267713 : #i58313# ImplicitCatalog/SchemaRestriction
2009-02-13 12:36:50 +0100 fs r267712 : when exporting data source settings, allow for properties which have a VOID default value, but are currently not VOID
2009-02-13 12:35:57 +0100 fs r267711 : implement XSet, to allow inserting properties which have a default value of VOID
2009-02-13 12:35:03 +0100 fs r267710 : +addVoidProperty
2009-02-13 10:20:08 +0100 fs r267697 : removed unused variable
2009-02-13 09:46:46 +0100 fs r267695 : refactored the table filtering code, to have a better base for introducing additional low level filters
2009-02-10 09:23:07 +0100 lla r267537 : #i10000# wrong line feed, double named variable
2009-02-09 12:13:08 +0100 oj r267508 : #i98605# notify hanlder
2009-02-09 11:50:34 +0100 oj r267507 : #i98926# solve refcount problem
2009-02-09 11:50:05 +0100 oj r267506 : #i98971# fix for simple html
2009-02-09 11:49:24 +0100 oj r267505 : #i98971# fix for simple html
2009-02-09 11:47:27 +0100 oj r267504 : invoke on copy
2009-02-09 09:51:00 +0100 fs r267500 : #i98316#
2009-02-09 09:46:10 +0100 fs r267499 : setCurrentSelection: don't reset the current form when we de-select everything
2009-02-09 09:43:45 +0100 fs r267498 : #i98316#
2009-02-08 21:25:18 +0100 fs r267496 : #i98272# introduce late ctor for cloning
2009-02-07 21:08:39 +0100 fs r267485 : #i98272# when copy-constructing a FmFormPageImpl, use the XCloneable of the forms collection, instead of XPersistObject (which is incompletely implemented)
2009-02-07 21:07:26 +0100 fs r267484 : removed obsolete include guards
2009-02-07 21:05:22 +0100 fs r267483 : #i98272# implement XCloneable
2009-02-06 15:02:48 +0100 lla r267467 : #i96523# add XImageControl
2009-02-06 14:41:38 +0100 oj r267463 : #i98926# late init when connection disposed but only when asked for
2009-02-06 13:49:57 +0100 lla r267457 : #i92860# bigint in forms doesn't allow input of values > 1, fixed
2009-02-06 13:03:55 +0100 oj r267455 : ImageScaleMode
2009-02-05 14:48:19 +0100 lla r267424 : #i89335# dropdown listboxes are 14 instead of 7 lines high
2009-02-05 13:40:00 +0100 oj r267423 : #i96945# insert new prop Opaque
2009-02-05 13:39:19 +0100 oj r267422 : #i96945# insert layer handling for hell and heaven
2009-02-05 13:29:32 +0100 lla r267420 : #i89335# add is null, is not null, is not like filter condition
2009-02-04 12:23:02 +0100 oj r267364 : #i98821# load table font settings
2009-02-04 10:05:27 +0100 oj r267351 : #i98821# load table font settings
2009-02-04 09:23:22 +0100 fs r267350 : checking persistency of UI settings in database documents - for the moment, capture table formattings (which is issue 98821)
2009-02-04 09:22:15 +0100 fs r267349 : moved some methods which are of wider interest from DatabaseDocument to FileHelper resp. TestCase
2009-02-04 08:56:27 +0100 oj r267347 : #i97586# UcbStreamHelper::CreateStream doesn't check all streamModes use different method
2009-02-04 08:23:26 +0100 oj r267346 : #i98701# check key size is >= 3 and some redesign
2009-02-03 23:29:24 +0100 fs r267345 : return the component (controller), not the frame
2009-02-03 23:28:53 +0100 fs r267344 : openExisting returns a controller now, not the frame (this was a bug)
2009-02-03 23:28:25 +0100 fs r267343 : openElement: properly return the component in the table/query case
2009-02-02 12:48:17 +0100 oj r267261 : #i96013# fix for relative path
2009-02-02 10:33:28 +0100 lla r267253 : #i98557# cleanups and consolidation
2009-02-02 09:37:23 +0100 lla r267250 : #i88432# resize will no longer move components to other sections
2009-02-02 09:08:24 +0100 oj r267245 : #i97475# write 0x1A at the end of the file
2009-01-30 19:39:20 +0100 lla r267230 : #i10000# unused parameters
2009-01-30 09:51:09 +0100 fs r267181 : onsolete
2009-01-30 09:49:27 +0100 fs r267180 : onsolete
2009-01-29 14:28:22 +0100 oj r267139 : #i96825# import cell style
2009-01-29 14:23:12 +0100 oj r267137 : #i98601# export imagescalehandler
2009-01-29 14:19:57 +0100 lla r267135 : #i98601# add ImageScaleMode
2009-01-29 13:21:08 +0100 oj r267124 : #i98601# impl ScaleMode
2009-01-29 13:20:56 +0100 oj r267123 : #i98601# impl ScaleMode
2009-01-29 08:46:40 +0100 oj r267095 : new property: ScaleMode
2009-01-29 08:45:23 +0100 oj r267094 : new ScaleMode from UnControlImageModel
2009-01-29 08:28:12 +0100 oj r267093 : #i87930# close all sub forms/reports when the desktop is going to be terminated and no db frame exists
2009-01-28 19:54:34 +0100 lla r267082 : #i98557# pictures in report wizard
2009-01-28 15:06:25 +0100 oj r267060 : #i87930# close all sub forms/reports when the desktop is going to be terminated and no db frame exists
2009-01-28 11:38:41 +0100 lla r267046 : #i76783# handle binary fields in forms
2009-01-28 09:24:43 +0100 lla r267025 : #i10000#
2009-01-28 08:40:04 +0100 fs r267024 : #i10000#
2009-01-28 08:04:43 +0100 oj r267023 : #i93456# use resource strings for function names
2009-01-27 13:26:05 +0100 oj r266988 : check data field is type field or expression
2009-01-27 13:07:17 +0100 oj r266985 : check data field length
2009-01-27 11:48:19 +0100 oj r266974 : #i96823# return dll string as column name when no alias exists
2009-01-27 09:53:11 +0100 fs r266958 : display the message of a caught exception
2009-01-27 09:44:13 +0100 fs r266957 : #i58313# when retrieving all tables, just set an empty table type filter - the connection will care for translating this, by respecting the TableTypeFilterMode setting
2009-01-27 09:36:09 +0100 fs r266956 : #i58313# getTables: per JDBC spec, is not a valid table type filter. Translate it to 'null'.
2009-01-26 11:24:49 +0100 lla r266912 : #i97865# cleanups (AddField viewable in remote mode)
2009-01-26 07:49:27 +0100 lla r266897 : #i97865# AddField opens in remote case
2009-01-26 07:48:58 +0100 lla r266896 : #i97865# AddField opens in remote case
2009-01-26 07:48:42 +0100 lla r266895 : #i97865# AddField opens in remote case
2009-01-23 15:04:40 +0100 fs r266825 : consolidate the usage of OSQLMessageBox with MessageType==Warning into OSQLWarningBox
2009-01-23 10:47:33 +0100 fs r266787 : +supportsUserAdministration
2009-01-23 10:47:11 +0100 fs r266784 : use DatabaseMetaData.supportsUserAdministration
2009-01-23 07:55:59 +0100 lla r266767 : #i10000# fix gcc compiler failures
2009-01-21 15:08:55 +0100 lla r266673 : #i97265# Labels in HC (IsDark) with other color (viewable)
2009-01-19 14:58:54 +0100 lla r266504 : #i96523# last problems with FormatKey and '0' values fixed
2009-01-19 14:58:00 +0100 lla r266503 : #i96519# AddField help text
2009-01-19 11:59:02 +0100 fs r266485 : #i96523# for formatted field models, init them with TreatAsNumber = false
2009-01-16 10:31:49 +0100 lla r266405 : #i96793# add shrink to popup menu
2009-01-16 09:21:44 +0100 lla r266401 : #i96519# AddField contains a help text
2009-01-15 11:21:49 +0100 lla r266357 : #i96523# problem with XVclWindowPeer not fixed now
2009-01-15 09:19:20 +0100 lla r266335 : #i96523# more crashes fixed.
2009-01-14 13:08:34 +0100 lla r266291 : #i96523# problems with crashes fixed
2009-01-13 10:54:24 +0100 lla r266199 : #i96523# show datasource in formattedfields new files
2009-01-13 10:52:39 +0100 lla r266198 : #i96523# show datasource in formattedfields
2009-01-13 09:41:50 +0100 lla r266197 : #i96526# handling none existance default.otr
2009-01-12 12:55:49 +0100 fs r266151 : don't expect the control model to be a BoundComponent before adding as modify listener
2009-01-12 12:51:33 +0100 fs r266149 : #i88458# let the ImageControl be an XModifyBroadcaster, so the forms runtime can notice when the user changes the control content while it does not have the focus
2009-01-09 13:41:22 +0100 fs r266080 : doc
2009-01-09 13:14:14 +0100 fs r266077 : #i97377# SetModified when order is changed via DnD
2009-01-07 09:55:40 +0100 oj r265951 : merge from master
2009-01-07 09:55:24 +0100 oj r265950 : removed observer
2009-01-07 09:55:06 +0100 oj r265949 : merge from master
2009-01-07 07:29:11 +0100 oj r265945 : shadow var changed
2009-01-06 07:25:57 +0100 oj r265893 : CWS-TOOLING: rebase CWS dba32a to trunk@265758 (milestone: DEV300:m38)
2009-01-05 13:18:22 +0100 oj r265865 : convert to unix le
2009-01-05 09:13:52 +0100 lla r265857 : #i79423# lc_ sc_ permutation fix
2009-01-02 19:40:59 +0100 lla r265847 : #i79423# section shrink icons
2008-12-22 11:37:57 +0100 lla r265749 : #i97484# move component to negative Y-position
2008-12-22 11:37:05 +0100 lla r265748 : #i97484# move component to negative Y-position
2008-12-22 11:35:33 +0100 lla r265747 : #i97484# move component to negative Y-position
2008-12-22 11:25:07 +0100 lla r265745 : #i96757# changes via property browser was not undoable
2008-12-18 15:10:38 +0100 fs r265694 : corrected an condition in doFormListening, which otherwise leads to uncommitable grid columns in documents which are loaded from disc (not in documents which are newly created)
2008-12-18 14:54:39 +0100 fs r265692 : Hide Columns text slightly changed
2008-12-18 13:44:15 +0100 fs r265683 : #i94068# properly display erros happening during a form operation - at least once, and at most once
2008-12-18 11:28:29 +0100 fs r265677 : document the new InputRequired property
2008-12-18 11:04:15 +0100 fs r265676 : #i96530# createControlLabelPair: don't actually create a label for a checkbox
2008-12-18 10:35:53 +0100 fs r265674 : #i95226# when a column is replaced, and it's the selected column, update the selection
2008-12-18 10:34:42 +0100 fs r265673 : #i95226# refactoring of the implReplaced method
2008-12-18 10:34:28 +0100 fs r265672 : #i95226# when replacing a grid column, update the property browser
2008-12-18 10:33:17 +0100 fs r265671 : when an element is removed, remove it from m_aCurrentSelection, too (if necessary)
2008-12-18 10:31:57 +0100 fs r265670 : Hide Columns text slightly changed
2008-12-18 10:15:56 +0100 lla r265669 : #i14538# do not allow to press finish button twice
2008-12-18 08:56:33 +0100 lla r265665 : #i10000# build depend=t problem hacked.
2008-12-17 20:59:10 +0100 fs r265656 : #i89821# don't let a MultiLineEdit select all text when it receives the focus
2008-12-17 12:10:54 +0100 fs r265594 : #i97356#
2008-12-17 12:06:29 +0100 fs r265593 : #i97355# Print -> Printable
2008-12-17 11:59:31 +0100 fs r265591 : #i97350# combo boxes comment on list selection (as list boxes already do)
2008-12-16 09:53:57 +0100 lla r265527 : #i96526# handling none existance default.otr
2008-12-15 14:48:39 +0100 lla r265500 : #i79423# reparing, was wrong implemented
2008-12-12 15:08:33 +0100 lla r265424 : #i10000# remove wrong carridge returns
2008-12-12 15:07:55 +0100 lla r265423 : #i10000# remove wrong carridge returns
2008-12-12 15:06:41 +0100 lla r265422 : #i10000# remove wrong carridge returns
2008-12-12 10:23:13 +0100 lla r265395 : #i95234# reset DragDelta
2008-12-12 10:11:02 +0100 lla r265393 : #i79423# pre versions of shrink buttons
2008-12-11 15:32:13 +0100 fs r265318 : prevent a deadlock during complex.dbaccess.DatabaseDocument test
2008-12-11 15:30:06 +0100 fs r265316 : prevent a deadlock during complex.dbaccess.DatabaseDocument test
2008-12-11 15:07:05 +0100 fs r265307 : removed superfluous text
2008-12-11 12:29:54 +0100 lla r265282 : #i96757# cleanup second try
2008-12-11 12:09:15 +0100 lla r265278 : #i96757# cleanup
2008-12-11 12:07:56 +0100 lla r265277 : #i95234#
2008-12-10 14:04:39 +0100 lla r265183 : #i93472# D&D fixes
2008-12-10 12:29:33 +0100 lla r265168 : #i94067# add (APP|SYS)FONT to XUnitConversion
2008-12-10 12:15:02 +0100 lla r265166 : #i94067# add APPFONT, SYSFONT to MeasureUnit
2008-12-10 11:52:10 +0100 lla r265163 : #i94067# add comments
2008-12-06 20:33:05 +0100 fs r264935 : #i10000# precompiled header
2008-12-05 09:29:26 +0100 fs r264889 : #i10000#
2008-12-05 09:07:31 +0100 fs r264888 : #i10000#
2008-12-04 13:25:46 +0100 fs r264838 : CWS-TOOLING: rebase CWS dba32a to trunk@264807 (milestone: DEV300:m37)
2008-12-03 23:49:13 +0100 fs r264808 : merge changes from trunk, to be able to do a rebase
2008-12-03 17:13:09 +0100 lla r264801 : #i91041# update documentation
2008-12-03 16:57:04 +0100 lla r264799 : #i94067# allow convert(Point|Size)ToLogic as pixel also
2008-12-02 12:36:32 +0100 lla r264687 : #i96782# bring toolbar objects to menu structure
2008-12-02 10:32:44 +0100 lla r264667 : #i86255# make property work
2008-12-02 09:22:47 +0100 lla r264659 : #i79423# add section shrink toolbar
2008-12-02 07:41:22 +0100 lla r264657 : #i86255# add check box for Escape DateTime property
2008-12-02 07:37:17 +0100 lla r264656 : #i79423# new shrink buttons
2008-11-26 11:55:28 +0100 fs r264362 : #i96541#
FillPropertySet: do not only catch UnknownPropertyException when setting the Char/ParaAutoStyleName,
but also care for the other exceptions which can be thrown by XPropertySet::setPropertyValue.
This is actually not the real fix for #i96541#, but only a follow-up. The root cause of the issue
was fixed in CWS dba301b, but this here was another (potential) bug which popped up during investigations.
2008-11-25 09:04:40 +0100 lla r264273 : #i82083# new toolbox in GroupsSorting dialog
2008-11-25 08:56:08 +0100 lla r264272 : #i94729# change token strings into string list, move class out of function
2008-11-24 15:52:22 +0100 fs r264251 : #i96532# do not set AppendTableAlias, NameLengthLimit, etc., if the OXMLDataSourceInstance is used for elements at which those attributes never appear
2008-11-24 15:51:45 +0100 fs r264249 : #i96532# do not set AppendTableAlias, NameLengthLimit, etc., if the OXMLDataSourceInstance is used for elements at which those attributes never appear
2008-11-24 15:45:21 +0100 fs r264244 : #i96532# the API default for ParamNameSubst is false
2008-11-24 15:45:04 +0100 fs r264243 : #i96532# do not set AppendTableAlias, NameLengthLimit, etc., if the OXMLDataSourceInstance is used for elements at which those attributes never appear
2008-11-24 15:44:14 +0100 fs r264241 : #i96532# slight refactoring of exporting properties which have a XML default different from the API default
2008-11-24 10:50:01 +0100 lla r264216 : #i82083# icons for new toolbox
2008-11-24 09:38:45 +0100 lla r264205 : #i82083# new toolbox in GroupsSorting dialog
2008-11-24 09:32:20 +0100 lla r264201 : #i96501# cleanup assertions
2008-11-24 09:12:55 +0100 lla r264198 : #i83082# enhancement for toolboxes, better HC comfort
2008-11-24 08:46:43 +0100 lla r264197 : #i96501# fix problem with negative positions
2008-11-21 11:44:47 +0100 fs r264118 : #i57042# introduce a counter for suspending change notifications of a given property, so recursive calls are possible
2008-11-21 11:02:17 +0100 fs r264116 : #i96388# don't call ExecuteContextMenuAction when no action was chosen by the user
2008-11-21 10:36:53 +0100 fs r264114 : #i47384# assertion was wrong
2008-11-14 12:33:15 +0100 fs r263673 : #i47318# XRowSetChangeBroadcaster/Listener, to be able to listen for changes in an XRowSetSupplier's RowSet
2008-11-14 12:30:29 +0100 fs r263672 : #i47318# more refactoring
- BoundControlModels now listen at the XRowSetSupplier for changes in the supplied
RowSet, to properly revoke/register old/new listeners at the RowSet
- replaced ::osl::Mutex in various places with a ControlModelLock
2008-11-14 12:20:55 +0100 fs r263671 : when BUILD_TYPE includes QADEVOOO, the BUILD_QADEVOOO needs to bet set, too
2008-11-14 12:19:21 +0100 fs r263670 : oops, this was not intended to be committed
2008-11-12 11:08:10 +0100 fs r263579 : #i96096# new ctors taking UNO_QUERY_THROW
2008-11-12 09:15:54 +0100 fs r263576 : no need to load the complete dialog just to get a string which the dialog itself loads from resource
2008-11-10 17:55:45 +0100 fs r263535 : spelling in comment
2008-11-10 15:51:14 +0100 fs r263523 : #i47318# various refactorings
1. don't forward syntetic XLoadListener events from the grid control to
the grid columns. Instead, forward GridColumn::XChild::setParent to
the base class, which then can add itself as load listener
2. removed various occurances of XMultiServiceFactory, instead use the
::comphelper::ComponentContext
3. in O(Bound)ControlModel, have a mechanism to lock the instance (using
ControlModelLock) and fire property changes when the last lock dies.
2008-11-10 12:49:24 +0100 oj r263513 : #i94729# change token strings into string list
2008-11-10 12:13:15 +0100 oj r263512 : #i95222# export chart:title style as well
2008-11-10 08:55:25 +0100 oj r263507 : #i93471# show the correct tabpage when selecting a different object
2008-11-07 23:38:29 +0100 fs r263490 : #i95977# for the event input controls, add a component extending their functionality so they're reset when the users presses DEL
2008-11-07 23:35:39 +0100 fs r263489 : during #i95977#: When a VCL Window is deleted from within VCL code, the respective WindowPeer was never disposed. Corrected this.
2008-11-07 14:57:07 +0100 fs r263420 : #i95963# human-readable display names for event bindings
2008-11-06 10:34:52 +0100 fs r263366 : #i95865# don't use library names containing InvalidZipEntryFileNames - workaround until i95409 is fixed
2008-11-06 10:33:28 +0100 fs r263365 : #i95865#
copied the following change from CWS odfmetadata2 (not yet integrated) into CWS dba31d
- comphelper/inc/comphelper/storagehelper.hxx,
comphelper/source/misc/storagehelper.cxx:
+ add function IsValidZipEntryFileName (moved from module package)
2009-04-22 11:01:27 +00:00
else
2010-09-17 08:38:54 +02:00
{
// do we have the control in the row
FmFilterRow : : iterator iter = rRow . find ( xText ) ;
// erase the entry out of the row
if ( iter ! = rRow . end ( ) )
rRow . erase ( iter ) ;
}
// multiplex the event to our FilterControllerListeners
FilterEvent aEvent ;
aEvent . Source = * this ;
aEvent . FilterComponent = : : std : : find ( m_aFilterComponents . begin ( ) , m_aFilterComponents . end ( ) , xText ) - m_aFilterComponents . begin ( ) ;
aEvent . DisjunctiveTerm = getActiveTerm ( ) ;
aEvent . PredicateExpression = aText ;
aGuard . clear ( ) ;
// <-- SYNCHRONIZED
// notify the changed filter expression
m_aFilterListeners . notifyEach ( & XFilterControllerListener : : predicateExpressionChanged , aEvent ) ;
2000-09-18 16:07:07 +00:00
}
2004-04-13 10:05:48 +00:00
// XItemListener
2000-09-18 16:07:07 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : itemStateChanged ( const ItemEvent & /*rEvent*/ ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
CWS-TOOLING: integrate CWS dba32a
2009-04-16 13:08:19 +0200 oj r270882 : #i14538# set property at control
2009-04-16 13:04:28 +0200 oj r270881 : #i98557# remove binary string for SRB
2009-04-15 13:19:10 +0200 oj r270838 : #i96782# use type set at view
2009-04-14 14:53:20 +0200 oj r270778 : #i96782# set initialize size for custom shape
2009-04-06 14:19:14 +0200 oj r270546 : #i88432# correct pos when < 0 while resizing
2009-04-06 13:36:13 +0200 oj r270541 : #i96782# handle toolbar and menubar differently
2009-04-06 13:33:54 +0200 oj r270540 : #i96782# handle toolbar and menubar differently
2009-04-06 12:28:23 +0200 oj r270534 : #i96782# handle toolbar and menubar differently
2009-04-06 12:27:44 +0200 oj r270533 : #i96782# handle toolbar and menubar differently
2009-04-06 12:24:32 +0200 oj r270532 : #i96782# handle toolbar and menubar differently
2009-04-06 12:15:15 +0200 oj r270531 : do not initialze when field is empty
2009-04-06 10:06:08 +0200 oj r270528 : #i96782# clean up of menubar and remove duplicates
2009-04-06 09:47:49 +0200 oj r270527 : #i96519# adjust help text dynamic
2009-04-03 13:43:20 +0200 oj r270482 : do not need to remove section from observer they are already disposed
2009-04-03 13:27:28 +0200 fs r270479 : #i97356#
2009-04-02 11:30:39 +0200 fs r270386 : UNX line ends
2009-04-02 10:54:51 +0200 fs r270379 : UNX line ends
2009-04-02 10:39:57 +0200 fs r270378 : UNX line ends
2009-04-02 10:37:24 +0200 fs r270377 : why did this survive the rebase? was removed on trunk ...
2009-03-31 13:31:12 +0200 fs r270277 : component_foo should be public
2009-03-28 00:21:01 +0100 fs r270176 : manuallly merged the changes which happened in CWS before resync to m45, where the directory had been moved from reportdesign/registry to reportbuilder/registry
2009-03-27 23:01:20 +0100 fs r270174 : CWS-TOOLING: rebase CWS dba32a to trunk@270033 (milestone: DEV300:m45)
2009-03-11 12:23:35 +0100 fs r269310 : #i99958# ensure the ControlModelLock doesn't release twice
2009-03-06 09:07:32 +0100 fs r268970 : ignore output paths in SVN's status
2009-03-06 09:07:08 +0100 fs r268969 : ignore output paths in SVN's status
2009-03-04 11:28:02 +0100 oj r268800 : copy and paste error, check correct end now
2009-03-03 15:49:11 +0100 fs r268736 : #i10000# those merges were lost during the rebase (m38->m42)
2009-03-03 13:25:27 +0100 lla r268720 : #i99652# fix wrong refactoring
2009-02-27 11:12:56 +0100 fs r268566 : beautified
2009-02-27 10:53:47 +0100 fs r268561 : doFormListening(false) only when actually isFormListening() (found during complex test case XMLFormSettings with assertions)
2009-02-26 20:55:31 +0100 fs r268546 : #i96530# set the Label property of the bound control, if we didn't create a dedicated label control
2009-02-26 11:53:09 +0100 fs r268494 : #i10000#
2009-02-26 11:27:50 +0100 fs r268493 : #i10000#
2009-02-26 11:17:08 +0100 fs r268490 : reportdesign depends on REPORTBUILDER, not REPORTDESIGN
2009-02-25 11:39:48 +0100 fs r268422 : #i10000# post-resync: INFO_ESCAPE_DATETIME got lost during rebase
2009-02-24 23:24:10 +0100 fs r268411 : CWS-TOOLING: rebase CWS dba32a to trunk@268395 (milestone: DEV300:m42)
2009-02-20 15:09:48 +0100 fs r268324 : respect ImplicitCatalog/SchemaRestriction in all necessary places
2009-02-20 13:48:10 +0100 oj r268318 : order of initialize corrected
2009-02-14 15:07:52 +0100 fs r267759 : #i98975# when an image does not have a bitmap, but a text, draw this (as placeholder)
2009-02-14 15:02:40 +0100 fs r267758 : consolidated and removed some duplicate code
2009-02-14 13:52:23 +0100 fs r267756 : #i10000#
2009-02-13 22:08:34 +0100 fs r267750 : #i100000#
2009-02-13 22:07:25 +0100 fs r267749 : #i10000#
2009-02-13 21:55:36 +0100 fs r267747 : #i10000#
2009-02-13 21:54:27 +0100 fs r267746 : use const_cast
2009-02-13 21:29:10 +0100 fs r267745 : #i10000#
2009-02-13 21:27:39 +0100 fs r267744 : #i10000#
2009-02-13 20:59:13 +0100 fs r267742 : #i10000#
2009-02-13 13:21:30 +0100 fs r267717 : better diagnostics
2009-02-13 13:17:24 +0100 fs r267715 : #i58313# support Catalog/SchemaRestriction settings, which are applied in getTables when 'all catalogs/schemas' are to be retrieved
2009-02-13 13:16:14 +0100 fs r267714 : filter out some more known global settings
2009-02-13 12:39:43 +0100 fs r267713 : #i58313# ImplicitCatalog/SchemaRestriction
2009-02-13 12:36:50 +0100 fs r267712 : when exporting data source settings, allow for properties which have a VOID default value, but are currently not VOID
2009-02-13 12:35:57 +0100 fs r267711 : implement XSet, to allow inserting properties which have a default value of VOID
2009-02-13 12:35:03 +0100 fs r267710 : +addVoidProperty
2009-02-13 10:20:08 +0100 fs r267697 : removed unused variable
2009-02-13 09:46:46 +0100 fs r267695 : refactored the table filtering code, to have a better base for introducing additional low level filters
2009-02-10 09:23:07 +0100 lla r267537 : #i10000# wrong line feed, double named variable
2009-02-09 12:13:08 +0100 oj r267508 : #i98605# notify hanlder
2009-02-09 11:50:34 +0100 oj r267507 : #i98926# solve refcount problem
2009-02-09 11:50:05 +0100 oj r267506 : #i98971# fix for simple html
2009-02-09 11:49:24 +0100 oj r267505 : #i98971# fix for simple html
2009-02-09 11:47:27 +0100 oj r267504 : invoke on copy
2009-02-09 09:51:00 +0100 fs r267500 : #i98316#
2009-02-09 09:46:10 +0100 fs r267499 : setCurrentSelection: don't reset the current form when we de-select everything
2009-02-09 09:43:45 +0100 fs r267498 : #i98316#
2009-02-08 21:25:18 +0100 fs r267496 : #i98272# introduce late ctor for cloning
2009-02-07 21:08:39 +0100 fs r267485 : #i98272# when copy-constructing a FmFormPageImpl, use the XCloneable of the forms collection, instead of XPersistObject (which is incompletely implemented)
2009-02-07 21:07:26 +0100 fs r267484 : removed obsolete include guards
2009-02-07 21:05:22 +0100 fs r267483 : #i98272# implement XCloneable
2009-02-06 15:02:48 +0100 lla r267467 : #i96523# add XImageControl
2009-02-06 14:41:38 +0100 oj r267463 : #i98926# late init when connection disposed but only when asked for
2009-02-06 13:49:57 +0100 lla r267457 : #i92860# bigint in forms doesn't allow input of values > 1, fixed
2009-02-06 13:03:55 +0100 oj r267455 : ImageScaleMode
2009-02-05 14:48:19 +0100 lla r267424 : #i89335# dropdown listboxes are 14 instead of 7 lines high
2009-02-05 13:40:00 +0100 oj r267423 : #i96945# insert new prop Opaque
2009-02-05 13:39:19 +0100 oj r267422 : #i96945# insert layer handling for hell and heaven
2009-02-05 13:29:32 +0100 lla r267420 : #i89335# add is null, is not null, is not like filter condition
2009-02-04 12:23:02 +0100 oj r267364 : #i98821# load table font settings
2009-02-04 10:05:27 +0100 oj r267351 : #i98821# load table font settings
2009-02-04 09:23:22 +0100 fs r267350 : checking persistency of UI settings in database documents - for the moment, capture table formattings (which is issue 98821)
2009-02-04 09:22:15 +0100 fs r267349 : moved some methods which are of wider interest from DatabaseDocument to FileHelper resp. TestCase
2009-02-04 08:56:27 +0100 oj r267347 : #i97586# UcbStreamHelper::CreateStream doesn't check all streamModes use different method
2009-02-04 08:23:26 +0100 oj r267346 : #i98701# check key size is >= 3 and some redesign
2009-02-03 23:29:24 +0100 fs r267345 : return the component (controller), not the frame
2009-02-03 23:28:53 +0100 fs r267344 : openExisting returns a controller now, not the frame (this was a bug)
2009-02-03 23:28:25 +0100 fs r267343 : openElement: properly return the component in the table/query case
2009-02-02 12:48:17 +0100 oj r267261 : #i96013# fix for relative path
2009-02-02 10:33:28 +0100 lla r267253 : #i98557# cleanups and consolidation
2009-02-02 09:37:23 +0100 lla r267250 : #i88432# resize will no longer move components to other sections
2009-02-02 09:08:24 +0100 oj r267245 : #i97475# write 0x1A at the end of the file
2009-01-30 19:39:20 +0100 lla r267230 : #i10000# unused parameters
2009-01-30 09:51:09 +0100 fs r267181 : onsolete
2009-01-30 09:49:27 +0100 fs r267180 : onsolete
2009-01-29 14:28:22 +0100 oj r267139 : #i96825# import cell style
2009-01-29 14:23:12 +0100 oj r267137 : #i98601# export imagescalehandler
2009-01-29 14:19:57 +0100 lla r267135 : #i98601# add ImageScaleMode
2009-01-29 13:21:08 +0100 oj r267124 : #i98601# impl ScaleMode
2009-01-29 13:20:56 +0100 oj r267123 : #i98601# impl ScaleMode
2009-01-29 08:46:40 +0100 oj r267095 : new property: ScaleMode
2009-01-29 08:45:23 +0100 oj r267094 : new ScaleMode from UnControlImageModel
2009-01-29 08:28:12 +0100 oj r267093 : #i87930# close all sub forms/reports when the desktop is going to be terminated and no db frame exists
2009-01-28 19:54:34 +0100 lla r267082 : #i98557# pictures in report wizard
2009-01-28 15:06:25 +0100 oj r267060 : #i87930# close all sub forms/reports when the desktop is going to be terminated and no db frame exists
2009-01-28 11:38:41 +0100 lla r267046 : #i76783# handle binary fields in forms
2009-01-28 09:24:43 +0100 lla r267025 : #i10000#
2009-01-28 08:40:04 +0100 fs r267024 : #i10000#
2009-01-28 08:04:43 +0100 oj r267023 : #i93456# use resource strings for function names
2009-01-27 13:26:05 +0100 oj r266988 : check data field is type field or expression
2009-01-27 13:07:17 +0100 oj r266985 : check data field length
2009-01-27 11:48:19 +0100 oj r266974 : #i96823# return dll string as column name when no alias exists
2009-01-27 09:53:11 +0100 fs r266958 : display the message of a caught exception
2009-01-27 09:44:13 +0100 fs r266957 : #i58313# when retrieving all tables, just set an empty table type filter - the connection will care for translating this, by respecting the TableTypeFilterMode setting
2009-01-27 09:36:09 +0100 fs r266956 : #i58313# getTables: per JDBC spec, is not a valid table type filter. Translate it to 'null'.
2009-01-26 11:24:49 +0100 lla r266912 : #i97865# cleanups (AddField viewable in remote mode)
2009-01-26 07:49:27 +0100 lla r266897 : #i97865# AddField opens in remote case
2009-01-26 07:48:58 +0100 lla r266896 : #i97865# AddField opens in remote case
2009-01-26 07:48:42 +0100 lla r266895 : #i97865# AddField opens in remote case
2009-01-23 15:04:40 +0100 fs r266825 : consolidate the usage of OSQLMessageBox with MessageType==Warning into OSQLWarningBox
2009-01-23 10:47:33 +0100 fs r266787 : +supportsUserAdministration
2009-01-23 10:47:11 +0100 fs r266784 : use DatabaseMetaData.supportsUserAdministration
2009-01-23 07:55:59 +0100 lla r266767 : #i10000# fix gcc compiler failures
2009-01-21 15:08:55 +0100 lla r266673 : #i97265# Labels in HC (IsDark) with other color (viewable)
2009-01-19 14:58:54 +0100 lla r266504 : #i96523# last problems with FormatKey and '0' values fixed
2009-01-19 14:58:00 +0100 lla r266503 : #i96519# AddField help text
2009-01-19 11:59:02 +0100 fs r266485 : #i96523# for formatted field models, init them with TreatAsNumber = false
2009-01-16 10:31:49 +0100 lla r266405 : #i96793# add shrink to popup menu
2009-01-16 09:21:44 +0100 lla r266401 : #i96519# AddField contains a help text
2009-01-15 11:21:49 +0100 lla r266357 : #i96523# problem with XVclWindowPeer not fixed now
2009-01-15 09:19:20 +0100 lla r266335 : #i96523# more crashes fixed.
2009-01-14 13:08:34 +0100 lla r266291 : #i96523# problems with crashes fixed
2009-01-13 10:54:24 +0100 lla r266199 : #i96523# show datasource in formattedfields new files
2009-01-13 10:52:39 +0100 lla r266198 : #i96523# show datasource in formattedfields
2009-01-13 09:41:50 +0100 lla r266197 : #i96526# handling none existance default.otr
2009-01-12 12:55:49 +0100 fs r266151 : don't expect the control model to be a BoundComponent before adding as modify listener
2009-01-12 12:51:33 +0100 fs r266149 : #i88458# let the ImageControl be an XModifyBroadcaster, so the forms runtime can notice when the user changes the control content while it does not have the focus
2009-01-09 13:41:22 +0100 fs r266080 : doc
2009-01-09 13:14:14 +0100 fs r266077 : #i97377# SetModified when order is changed via DnD
2009-01-07 09:55:40 +0100 oj r265951 : merge from master
2009-01-07 09:55:24 +0100 oj r265950 : removed observer
2009-01-07 09:55:06 +0100 oj r265949 : merge from master
2009-01-07 07:29:11 +0100 oj r265945 : shadow var changed
2009-01-06 07:25:57 +0100 oj r265893 : CWS-TOOLING: rebase CWS dba32a to trunk@265758 (milestone: DEV300:m38)
2009-01-05 13:18:22 +0100 oj r265865 : convert to unix le
2009-01-05 09:13:52 +0100 lla r265857 : #i79423# lc_ sc_ permutation fix
2009-01-02 19:40:59 +0100 lla r265847 : #i79423# section shrink icons
2008-12-22 11:37:57 +0100 lla r265749 : #i97484# move component to negative Y-position
2008-12-22 11:37:05 +0100 lla r265748 : #i97484# move component to negative Y-position
2008-12-22 11:35:33 +0100 lla r265747 : #i97484# move component to negative Y-position
2008-12-22 11:25:07 +0100 lla r265745 : #i96757# changes via property browser was not undoable
2008-12-18 15:10:38 +0100 fs r265694 : corrected an condition in doFormListening, which otherwise leads to uncommitable grid columns in documents which are loaded from disc (not in documents which are newly created)
2008-12-18 14:54:39 +0100 fs r265692 : Hide Columns text slightly changed
2008-12-18 13:44:15 +0100 fs r265683 : #i94068# properly display erros happening during a form operation - at least once, and at most once
2008-12-18 11:28:29 +0100 fs r265677 : document the new InputRequired property
2008-12-18 11:04:15 +0100 fs r265676 : #i96530# createControlLabelPair: don't actually create a label for a checkbox
2008-12-18 10:35:53 +0100 fs r265674 : #i95226# when a column is replaced, and it's the selected column, update the selection
2008-12-18 10:34:42 +0100 fs r265673 : #i95226# refactoring of the implReplaced method
2008-12-18 10:34:28 +0100 fs r265672 : #i95226# when replacing a grid column, update the property browser
2008-12-18 10:33:17 +0100 fs r265671 : when an element is removed, remove it from m_aCurrentSelection, too (if necessary)
2008-12-18 10:31:57 +0100 fs r265670 : Hide Columns text slightly changed
2008-12-18 10:15:56 +0100 lla r265669 : #i14538# do not allow to press finish button twice
2008-12-18 08:56:33 +0100 lla r265665 : #i10000# build depend=t problem hacked.
2008-12-17 20:59:10 +0100 fs r265656 : #i89821# don't let a MultiLineEdit select all text when it receives the focus
2008-12-17 12:10:54 +0100 fs r265594 : #i97356#
2008-12-17 12:06:29 +0100 fs r265593 : #i97355# Print -> Printable
2008-12-17 11:59:31 +0100 fs r265591 : #i97350# combo boxes comment on list selection (as list boxes already do)
2008-12-16 09:53:57 +0100 lla r265527 : #i96526# handling none existance default.otr
2008-12-15 14:48:39 +0100 lla r265500 : #i79423# reparing, was wrong implemented
2008-12-12 15:08:33 +0100 lla r265424 : #i10000# remove wrong carridge returns
2008-12-12 15:07:55 +0100 lla r265423 : #i10000# remove wrong carridge returns
2008-12-12 15:06:41 +0100 lla r265422 : #i10000# remove wrong carridge returns
2008-12-12 10:23:13 +0100 lla r265395 : #i95234# reset DragDelta
2008-12-12 10:11:02 +0100 lla r265393 : #i79423# pre versions of shrink buttons
2008-12-11 15:32:13 +0100 fs r265318 : prevent a deadlock during complex.dbaccess.DatabaseDocument test
2008-12-11 15:30:06 +0100 fs r265316 : prevent a deadlock during complex.dbaccess.DatabaseDocument test
2008-12-11 15:07:05 +0100 fs r265307 : removed superfluous text
2008-12-11 12:29:54 +0100 lla r265282 : #i96757# cleanup second try
2008-12-11 12:09:15 +0100 lla r265278 : #i96757# cleanup
2008-12-11 12:07:56 +0100 lla r265277 : #i95234#
2008-12-10 14:04:39 +0100 lla r265183 : #i93472# D&D fixes
2008-12-10 12:29:33 +0100 lla r265168 : #i94067# add (APP|SYS)FONT to XUnitConversion
2008-12-10 12:15:02 +0100 lla r265166 : #i94067# add APPFONT, SYSFONT to MeasureUnit
2008-12-10 11:52:10 +0100 lla r265163 : #i94067# add comments
2008-12-06 20:33:05 +0100 fs r264935 : #i10000# precompiled header
2008-12-05 09:29:26 +0100 fs r264889 : #i10000#
2008-12-05 09:07:31 +0100 fs r264888 : #i10000#
2008-12-04 13:25:46 +0100 fs r264838 : CWS-TOOLING: rebase CWS dba32a to trunk@264807 (milestone: DEV300:m37)
2008-12-03 23:49:13 +0100 fs r264808 : merge changes from trunk, to be able to do a rebase
2008-12-03 17:13:09 +0100 lla r264801 : #i91041# update documentation
2008-12-03 16:57:04 +0100 lla r264799 : #i94067# allow convert(Point|Size)ToLogic as pixel also
2008-12-02 12:36:32 +0100 lla r264687 : #i96782# bring toolbar objects to menu structure
2008-12-02 10:32:44 +0100 lla r264667 : #i86255# make property work
2008-12-02 09:22:47 +0100 lla r264659 : #i79423# add section shrink toolbar
2008-12-02 07:41:22 +0100 lla r264657 : #i86255# add check box for Escape DateTime property
2008-12-02 07:37:17 +0100 lla r264656 : #i79423# new shrink buttons
2008-11-26 11:55:28 +0100 fs r264362 : #i96541#
FillPropertySet: do not only catch UnknownPropertyException when setting the Char/ParaAutoStyleName,
but also care for the other exceptions which can be thrown by XPropertySet::setPropertyValue.
This is actually not the real fix for #i96541#, but only a follow-up. The root cause of the issue
was fixed in CWS dba301b, but this here was another (potential) bug which popped up during investigations.
2008-11-25 09:04:40 +0100 lla r264273 : #i82083# new toolbox in GroupsSorting dialog
2008-11-25 08:56:08 +0100 lla r264272 : #i94729# change token strings into string list, move class out of function
2008-11-24 15:52:22 +0100 fs r264251 : #i96532# do not set AppendTableAlias, NameLengthLimit, etc., if the OXMLDataSourceInstance is used for elements at which those attributes never appear
2008-11-24 15:51:45 +0100 fs r264249 : #i96532# do not set AppendTableAlias, NameLengthLimit, etc., if the OXMLDataSourceInstance is used for elements at which those attributes never appear
2008-11-24 15:45:21 +0100 fs r264244 : #i96532# the API default for ParamNameSubst is false
2008-11-24 15:45:04 +0100 fs r264243 : #i96532# do not set AppendTableAlias, NameLengthLimit, etc., if the OXMLDataSourceInstance is used for elements at which those attributes never appear
2008-11-24 15:44:14 +0100 fs r264241 : #i96532# slight refactoring of exporting properties which have a XML default different from the API default
2008-11-24 10:50:01 +0100 lla r264216 : #i82083# icons for new toolbox
2008-11-24 09:38:45 +0100 lla r264205 : #i82083# new toolbox in GroupsSorting dialog
2008-11-24 09:32:20 +0100 lla r264201 : #i96501# cleanup assertions
2008-11-24 09:12:55 +0100 lla r264198 : #i83082# enhancement for toolboxes, better HC comfort
2008-11-24 08:46:43 +0100 lla r264197 : #i96501# fix problem with negative positions
2008-11-21 11:44:47 +0100 fs r264118 : #i57042# introduce a counter for suspending change notifications of a given property, so recursive calls are possible
2008-11-21 11:02:17 +0100 fs r264116 : #i96388# don't call ExecuteContextMenuAction when no action was chosen by the user
2008-11-21 10:36:53 +0100 fs r264114 : #i47384# assertion was wrong
2008-11-14 12:33:15 +0100 fs r263673 : #i47318# XRowSetChangeBroadcaster/Listener, to be able to listen for changes in an XRowSetSupplier's RowSet
2008-11-14 12:30:29 +0100 fs r263672 : #i47318# more refactoring
- BoundControlModels now listen at the XRowSetSupplier for changes in the supplied
RowSet, to properly revoke/register old/new listeners at the RowSet
- replaced ::osl::Mutex in various places with a ControlModelLock
2008-11-14 12:20:55 +0100 fs r263671 : when BUILD_TYPE includes QADEVOOO, the BUILD_QADEVOOO needs to bet set, too
2008-11-14 12:19:21 +0100 fs r263670 : oops, this was not intended to be committed
2008-11-12 11:08:10 +0100 fs r263579 : #i96096# new ctors taking UNO_QUERY_THROW
2008-11-12 09:15:54 +0100 fs r263576 : no need to load the complete dialog just to get a string which the dialog itself loads from resource
2008-11-10 17:55:45 +0100 fs r263535 : spelling in comment
2008-11-10 15:51:14 +0100 fs r263523 : #i47318# various refactorings
1. don't forward syntetic XLoadListener events from the grid control to
the grid columns. Instead, forward GridColumn::XChild::setParent to
the base class, which then can add itself as load listener
2. removed various occurances of XMultiServiceFactory, instead use the
::comphelper::ComponentContext
3. in O(Bound)ControlModel, have a mechanism to lock the instance (using
ControlModelLock) and fire property changes when the last lock dies.
2008-11-10 12:49:24 +0100 oj r263513 : #i94729# change token strings into string list
2008-11-10 12:13:15 +0100 oj r263512 : #i95222# export chart:title style as well
2008-11-10 08:55:25 +0100 oj r263507 : #i93471# show the correct tabpage when selecting a different object
2008-11-07 23:38:29 +0100 fs r263490 : #i95977# for the event input controls, add a component extending their functionality so they're reset when the users presses DEL
2008-11-07 23:35:39 +0100 fs r263489 : during #i95977#: When a VCL Window is deleted from within VCL code, the respective WindowPeer was never disposed. Corrected this.
2008-11-07 14:57:07 +0100 fs r263420 : #i95963# human-readable display names for event bindings
2008-11-06 10:34:52 +0100 fs r263366 : #i95865# don't use library names containing InvalidZipEntryFileNames - workaround until i95409 is fixed
2008-11-06 10:33:28 +0100 fs r263365 : #i95865#
copied the following change from CWS odfmetadata2 (not yet integrated) into CWS dba31d
- comphelper/inc/comphelper/storagehelper.hxx,
comphelper/source/misc/storagehelper.cxx:
+ add function IsValidZipEntryFileName (moved from module package)
2009-04-22 11:01:27 +00:00
impl_onModify ( ) ;
2000-09-18 16:07:07 +00:00
}
// XModificationBroadcaster
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : addModifyListener ( const Reference < XModifyListener > & l ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2009-10-29 11:59:44 +01:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
impl_checkDisposed_throw ( ) ;
2000-09-18 16:07:07 +00:00
m_aModifyListeners . addInterface ( l ) ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : removeModifyListener ( const Reference < XModifyListener > & l ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2009-10-29 11:59:44 +01:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
impl_checkDisposed_throw ( ) ;
2000-09-18 16:07:07 +00:00
m_aModifyListeners . removeInterface ( l ) ;
}
// XModificationListener
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : modified ( const EventObject & _rEvent ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
CWS-TOOLING: integrate CWS dba32a
2009-04-16 13:08:19 +0200 oj r270882 : #i14538# set property at control
2009-04-16 13:04:28 +0200 oj r270881 : #i98557# remove binary string for SRB
2009-04-15 13:19:10 +0200 oj r270838 : #i96782# use type set at view
2009-04-14 14:53:20 +0200 oj r270778 : #i96782# set initialize size for custom shape
2009-04-06 14:19:14 +0200 oj r270546 : #i88432# correct pos when < 0 while resizing
2009-04-06 13:36:13 +0200 oj r270541 : #i96782# handle toolbar and menubar differently
2009-04-06 13:33:54 +0200 oj r270540 : #i96782# handle toolbar and menubar differently
2009-04-06 12:28:23 +0200 oj r270534 : #i96782# handle toolbar and menubar differently
2009-04-06 12:27:44 +0200 oj r270533 : #i96782# handle toolbar and menubar differently
2009-04-06 12:24:32 +0200 oj r270532 : #i96782# handle toolbar and menubar differently
2009-04-06 12:15:15 +0200 oj r270531 : do not initialze when field is empty
2009-04-06 10:06:08 +0200 oj r270528 : #i96782# clean up of menubar and remove duplicates
2009-04-06 09:47:49 +0200 oj r270527 : #i96519# adjust help text dynamic
2009-04-03 13:43:20 +0200 oj r270482 : do not need to remove section from observer they are already disposed
2009-04-03 13:27:28 +0200 fs r270479 : #i97356#
2009-04-02 11:30:39 +0200 fs r270386 : UNX line ends
2009-04-02 10:54:51 +0200 fs r270379 : UNX line ends
2009-04-02 10:39:57 +0200 fs r270378 : UNX line ends
2009-04-02 10:37:24 +0200 fs r270377 : why did this survive the rebase? was removed on trunk ...
2009-03-31 13:31:12 +0200 fs r270277 : component_foo should be public
2009-03-28 00:21:01 +0100 fs r270176 : manuallly merged the changes which happened in CWS before resync to m45, where the directory had been moved from reportdesign/registry to reportbuilder/registry
2009-03-27 23:01:20 +0100 fs r270174 : CWS-TOOLING: rebase CWS dba32a to trunk@270033 (milestone: DEV300:m45)
2009-03-11 12:23:35 +0100 fs r269310 : #i99958# ensure the ControlModelLock doesn't release twice
2009-03-06 09:07:32 +0100 fs r268970 : ignore output paths in SVN's status
2009-03-06 09:07:08 +0100 fs r268969 : ignore output paths in SVN's status
2009-03-04 11:28:02 +0100 oj r268800 : copy and paste error, check correct end now
2009-03-03 15:49:11 +0100 fs r268736 : #i10000# those merges were lost during the rebase (m38->m42)
2009-03-03 13:25:27 +0100 lla r268720 : #i99652# fix wrong refactoring
2009-02-27 11:12:56 +0100 fs r268566 : beautified
2009-02-27 10:53:47 +0100 fs r268561 : doFormListening(false) only when actually isFormListening() (found during complex test case XMLFormSettings with assertions)
2009-02-26 20:55:31 +0100 fs r268546 : #i96530# set the Label property of the bound control, if we didn't create a dedicated label control
2009-02-26 11:53:09 +0100 fs r268494 : #i10000#
2009-02-26 11:27:50 +0100 fs r268493 : #i10000#
2009-02-26 11:17:08 +0100 fs r268490 : reportdesign depends on REPORTBUILDER, not REPORTDESIGN
2009-02-25 11:39:48 +0100 fs r268422 : #i10000# post-resync: INFO_ESCAPE_DATETIME got lost during rebase
2009-02-24 23:24:10 +0100 fs r268411 : CWS-TOOLING: rebase CWS dba32a to trunk@268395 (milestone: DEV300:m42)
2009-02-20 15:09:48 +0100 fs r268324 : respect ImplicitCatalog/SchemaRestriction in all necessary places
2009-02-20 13:48:10 +0100 oj r268318 : order of initialize corrected
2009-02-14 15:07:52 +0100 fs r267759 : #i98975# when an image does not have a bitmap, but a text, draw this (as placeholder)
2009-02-14 15:02:40 +0100 fs r267758 : consolidated and removed some duplicate code
2009-02-14 13:52:23 +0100 fs r267756 : #i10000#
2009-02-13 22:08:34 +0100 fs r267750 : #i100000#
2009-02-13 22:07:25 +0100 fs r267749 : #i10000#
2009-02-13 21:55:36 +0100 fs r267747 : #i10000#
2009-02-13 21:54:27 +0100 fs r267746 : use const_cast
2009-02-13 21:29:10 +0100 fs r267745 : #i10000#
2009-02-13 21:27:39 +0100 fs r267744 : #i10000#
2009-02-13 20:59:13 +0100 fs r267742 : #i10000#
2009-02-13 13:21:30 +0100 fs r267717 : better diagnostics
2009-02-13 13:17:24 +0100 fs r267715 : #i58313# support Catalog/SchemaRestriction settings, which are applied in getTables when 'all catalogs/schemas' are to be retrieved
2009-02-13 13:16:14 +0100 fs r267714 : filter out some more known global settings
2009-02-13 12:39:43 +0100 fs r267713 : #i58313# ImplicitCatalog/SchemaRestriction
2009-02-13 12:36:50 +0100 fs r267712 : when exporting data source settings, allow for properties which have a VOID default value, but are currently not VOID
2009-02-13 12:35:57 +0100 fs r267711 : implement XSet, to allow inserting properties which have a default value of VOID
2009-02-13 12:35:03 +0100 fs r267710 : +addVoidProperty
2009-02-13 10:20:08 +0100 fs r267697 : removed unused variable
2009-02-13 09:46:46 +0100 fs r267695 : refactored the table filtering code, to have a better base for introducing additional low level filters
2009-02-10 09:23:07 +0100 lla r267537 : #i10000# wrong line feed, double named variable
2009-02-09 12:13:08 +0100 oj r267508 : #i98605# notify hanlder
2009-02-09 11:50:34 +0100 oj r267507 : #i98926# solve refcount problem
2009-02-09 11:50:05 +0100 oj r267506 : #i98971# fix for simple html
2009-02-09 11:49:24 +0100 oj r267505 : #i98971# fix for simple html
2009-02-09 11:47:27 +0100 oj r267504 : invoke on copy
2009-02-09 09:51:00 +0100 fs r267500 : #i98316#
2009-02-09 09:46:10 +0100 fs r267499 : setCurrentSelection: don't reset the current form when we de-select everything
2009-02-09 09:43:45 +0100 fs r267498 : #i98316#
2009-02-08 21:25:18 +0100 fs r267496 : #i98272# introduce late ctor for cloning
2009-02-07 21:08:39 +0100 fs r267485 : #i98272# when copy-constructing a FmFormPageImpl, use the XCloneable of the forms collection, instead of XPersistObject (which is incompletely implemented)
2009-02-07 21:07:26 +0100 fs r267484 : removed obsolete include guards
2009-02-07 21:05:22 +0100 fs r267483 : #i98272# implement XCloneable
2009-02-06 15:02:48 +0100 lla r267467 : #i96523# add XImageControl
2009-02-06 14:41:38 +0100 oj r267463 : #i98926# late init when connection disposed but only when asked for
2009-02-06 13:49:57 +0100 lla r267457 : #i92860# bigint in forms doesn't allow input of values > 1, fixed
2009-02-06 13:03:55 +0100 oj r267455 : ImageScaleMode
2009-02-05 14:48:19 +0100 lla r267424 : #i89335# dropdown listboxes are 14 instead of 7 lines high
2009-02-05 13:40:00 +0100 oj r267423 : #i96945# insert new prop Opaque
2009-02-05 13:39:19 +0100 oj r267422 : #i96945# insert layer handling for hell and heaven
2009-02-05 13:29:32 +0100 lla r267420 : #i89335# add is null, is not null, is not like filter condition
2009-02-04 12:23:02 +0100 oj r267364 : #i98821# load table font settings
2009-02-04 10:05:27 +0100 oj r267351 : #i98821# load table font settings
2009-02-04 09:23:22 +0100 fs r267350 : checking persistency of UI settings in database documents - for the moment, capture table formattings (which is issue 98821)
2009-02-04 09:22:15 +0100 fs r267349 : moved some methods which are of wider interest from DatabaseDocument to FileHelper resp. TestCase
2009-02-04 08:56:27 +0100 oj r267347 : #i97586# UcbStreamHelper::CreateStream doesn't check all streamModes use different method
2009-02-04 08:23:26 +0100 oj r267346 : #i98701# check key size is >= 3 and some redesign
2009-02-03 23:29:24 +0100 fs r267345 : return the component (controller), not the frame
2009-02-03 23:28:53 +0100 fs r267344 : openExisting returns a controller now, not the frame (this was a bug)
2009-02-03 23:28:25 +0100 fs r267343 : openElement: properly return the component in the table/query case
2009-02-02 12:48:17 +0100 oj r267261 : #i96013# fix for relative path
2009-02-02 10:33:28 +0100 lla r267253 : #i98557# cleanups and consolidation
2009-02-02 09:37:23 +0100 lla r267250 : #i88432# resize will no longer move components to other sections
2009-02-02 09:08:24 +0100 oj r267245 : #i97475# write 0x1A at the end of the file
2009-01-30 19:39:20 +0100 lla r267230 : #i10000# unused parameters
2009-01-30 09:51:09 +0100 fs r267181 : onsolete
2009-01-30 09:49:27 +0100 fs r267180 : onsolete
2009-01-29 14:28:22 +0100 oj r267139 : #i96825# import cell style
2009-01-29 14:23:12 +0100 oj r267137 : #i98601# export imagescalehandler
2009-01-29 14:19:57 +0100 lla r267135 : #i98601# add ImageScaleMode
2009-01-29 13:21:08 +0100 oj r267124 : #i98601# impl ScaleMode
2009-01-29 13:20:56 +0100 oj r267123 : #i98601# impl ScaleMode
2009-01-29 08:46:40 +0100 oj r267095 : new property: ScaleMode
2009-01-29 08:45:23 +0100 oj r267094 : new ScaleMode from UnControlImageModel
2009-01-29 08:28:12 +0100 oj r267093 : #i87930# close all sub forms/reports when the desktop is going to be terminated and no db frame exists
2009-01-28 19:54:34 +0100 lla r267082 : #i98557# pictures in report wizard
2009-01-28 15:06:25 +0100 oj r267060 : #i87930# close all sub forms/reports when the desktop is going to be terminated and no db frame exists
2009-01-28 11:38:41 +0100 lla r267046 : #i76783# handle binary fields in forms
2009-01-28 09:24:43 +0100 lla r267025 : #i10000#
2009-01-28 08:40:04 +0100 fs r267024 : #i10000#
2009-01-28 08:04:43 +0100 oj r267023 : #i93456# use resource strings for function names
2009-01-27 13:26:05 +0100 oj r266988 : check data field is type field or expression
2009-01-27 13:07:17 +0100 oj r266985 : check data field length
2009-01-27 11:48:19 +0100 oj r266974 : #i96823# return dll string as column name when no alias exists
2009-01-27 09:53:11 +0100 fs r266958 : display the message of a caught exception
2009-01-27 09:44:13 +0100 fs r266957 : #i58313# when retrieving all tables, just set an empty table type filter - the connection will care for translating this, by respecting the TableTypeFilterMode setting
2009-01-27 09:36:09 +0100 fs r266956 : #i58313# getTables: per JDBC spec, is not a valid table type filter. Translate it to 'null'.
2009-01-26 11:24:49 +0100 lla r266912 : #i97865# cleanups (AddField viewable in remote mode)
2009-01-26 07:49:27 +0100 lla r266897 : #i97865# AddField opens in remote case
2009-01-26 07:48:58 +0100 lla r266896 : #i97865# AddField opens in remote case
2009-01-26 07:48:42 +0100 lla r266895 : #i97865# AddField opens in remote case
2009-01-23 15:04:40 +0100 fs r266825 : consolidate the usage of OSQLMessageBox with MessageType==Warning into OSQLWarningBox
2009-01-23 10:47:33 +0100 fs r266787 : +supportsUserAdministration
2009-01-23 10:47:11 +0100 fs r266784 : use DatabaseMetaData.supportsUserAdministration
2009-01-23 07:55:59 +0100 lla r266767 : #i10000# fix gcc compiler failures
2009-01-21 15:08:55 +0100 lla r266673 : #i97265# Labels in HC (IsDark) with other color (viewable)
2009-01-19 14:58:54 +0100 lla r266504 : #i96523# last problems with FormatKey and '0' values fixed
2009-01-19 14:58:00 +0100 lla r266503 : #i96519# AddField help text
2009-01-19 11:59:02 +0100 fs r266485 : #i96523# for formatted field models, init them with TreatAsNumber = false
2009-01-16 10:31:49 +0100 lla r266405 : #i96793# add shrink to popup menu
2009-01-16 09:21:44 +0100 lla r266401 : #i96519# AddField contains a help text
2009-01-15 11:21:49 +0100 lla r266357 : #i96523# problem with XVclWindowPeer not fixed now
2009-01-15 09:19:20 +0100 lla r266335 : #i96523# more crashes fixed.
2009-01-14 13:08:34 +0100 lla r266291 : #i96523# problems with crashes fixed
2009-01-13 10:54:24 +0100 lla r266199 : #i96523# show datasource in formattedfields new files
2009-01-13 10:52:39 +0100 lla r266198 : #i96523# show datasource in formattedfields
2009-01-13 09:41:50 +0100 lla r266197 : #i96526# handling none existance default.otr
2009-01-12 12:55:49 +0100 fs r266151 : don't expect the control model to be a BoundComponent before adding as modify listener
2009-01-12 12:51:33 +0100 fs r266149 : #i88458# let the ImageControl be an XModifyBroadcaster, so the forms runtime can notice when the user changes the control content while it does not have the focus
2009-01-09 13:41:22 +0100 fs r266080 : doc
2009-01-09 13:14:14 +0100 fs r266077 : #i97377# SetModified when order is changed via DnD
2009-01-07 09:55:40 +0100 oj r265951 : merge from master
2009-01-07 09:55:24 +0100 oj r265950 : removed observer
2009-01-07 09:55:06 +0100 oj r265949 : merge from master
2009-01-07 07:29:11 +0100 oj r265945 : shadow var changed
2009-01-06 07:25:57 +0100 oj r265893 : CWS-TOOLING: rebase CWS dba32a to trunk@265758 (milestone: DEV300:m38)
2009-01-05 13:18:22 +0100 oj r265865 : convert to unix le
2009-01-05 09:13:52 +0100 lla r265857 : #i79423# lc_ sc_ permutation fix
2009-01-02 19:40:59 +0100 lla r265847 : #i79423# section shrink icons
2008-12-22 11:37:57 +0100 lla r265749 : #i97484# move component to negative Y-position
2008-12-22 11:37:05 +0100 lla r265748 : #i97484# move component to negative Y-position
2008-12-22 11:35:33 +0100 lla r265747 : #i97484# move component to negative Y-position
2008-12-22 11:25:07 +0100 lla r265745 : #i96757# changes via property browser was not undoable
2008-12-18 15:10:38 +0100 fs r265694 : corrected an condition in doFormListening, which otherwise leads to uncommitable grid columns in documents which are loaded from disc (not in documents which are newly created)
2008-12-18 14:54:39 +0100 fs r265692 : Hide Columns text slightly changed
2008-12-18 13:44:15 +0100 fs r265683 : #i94068# properly display erros happening during a form operation - at least once, and at most once
2008-12-18 11:28:29 +0100 fs r265677 : document the new InputRequired property
2008-12-18 11:04:15 +0100 fs r265676 : #i96530# createControlLabelPair: don't actually create a label for a checkbox
2008-12-18 10:35:53 +0100 fs r265674 : #i95226# when a column is replaced, and it's the selected column, update the selection
2008-12-18 10:34:42 +0100 fs r265673 : #i95226# refactoring of the implReplaced method
2008-12-18 10:34:28 +0100 fs r265672 : #i95226# when replacing a grid column, update the property browser
2008-12-18 10:33:17 +0100 fs r265671 : when an element is removed, remove it from m_aCurrentSelection, too (if necessary)
2008-12-18 10:31:57 +0100 fs r265670 : Hide Columns text slightly changed
2008-12-18 10:15:56 +0100 lla r265669 : #i14538# do not allow to press finish button twice
2008-12-18 08:56:33 +0100 lla r265665 : #i10000# build depend=t problem hacked.
2008-12-17 20:59:10 +0100 fs r265656 : #i89821# don't let a MultiLineEdit select all text when it receives the focus
2008-12-17 12:10:54 +0100 fs r265594 : #i97356#
2008-12-17 12:06:29 +0100 fs r265593 : #i97355# Print -> Printable
2008-12-17 11:59:31 +0100 fs r265591 : #i97350# combo boxes comment on list selection (as list boxes already do)
2008-12-16 09:53:57 +0100 lla r265527 : #i96526# handling none existance default.otr
2008-12-15 14:48:39 +0100 lla r265500 : #i79423# reparing, was wrong implemented
2008-12-12 15:08:33 +0100 lla r265424 : #i10000# remove wrong carridge returns
2008-12-12 15:07:55 +0100 lla r265423 : #i10000# remove wrong carridge returns
2008-12-12 15:06:41 +0100 lla r265422 : #i10000# remove wrong carridge returns
2008-12-12 10:23:13 +0100 lla r265395 : #i95234# reset DragDelta
2008-12-12 10:11:02 +0100 lla r265393 : #i79423# pre versions of shrink buttons
2008-12-11 15:32:13 +0100 fs r265318 : prevent a deadlock during complex.dbaccess.DatabaseDocument test
2008-12-11 15:30:06 +0100 fs r265316 : prevent a deadlock during complex.dbaccess.DatabaseDocument test
2008-12-11 15:07:05 +0100 fs r265307 : removed superfluous text
2008-12-11 12:29:54 +0100 lla r265282 : #i96757# cleanup second try
2008-12-11 12:09:15 +0100 lla r265278 : #i96757# cleanup
2008-12-11 12:07:56 +0100 lla r265277 : #i95234#
2008-12-10 14:04:39 +0100 lla r265183 : #i93472# D&D fixes
2008-12-10 12:29:33 +0100 lla r265168 : #i94067# add (APP|SYS)FONT to XUnitConversion
2008-12-10 12:15:02 +0100 lla r265166 : #i94067# add APPFONT, SYSFONT to MeasureUnit
2008-12-10 11:52:10 +0100 lla r265163 : #i94067# add comments
2008-12-06 20:33:05 +0100 fs r264935 : #i10000# precompiled header
2008-12-05 09:29:26 +0100 fs r264889 : #i10000#
2008-12-05 09:07:31 +0100 fs r264888 : #i10000#
2008-12-04 13:25:46 +0100 fs r264838 : CWS-TOOLING: rebase CWS dba32a to trunk@264807 (milestone: DEV300:m37)
2008-12-03 23:49:13 +0100 fs r264808 : merge changes from trunk, to be able to do a rebase
2008-12-03 17:13:09 +0100 lla r264801 : #i91041# update documentation
2008-12-03 16:57:04 +0100 lla r264799 : #i94067# allow convert(Point|Size)ToLogic as pixel also
2008-12-02 12:36:32 +0100 lla r264687 : #i96782# bring toolbar objects to menu structure
2008-12-02 10:32:44 +0100 lla r264667 : #i86255# make property work
2008-12-02 09:22:47 +0100 lla r264659 : #i79423# add section shrink toolbar
2008-12-02 07:41:22 +0100 lla r264657 : #i86255# add check box for Escape DateTime property
2008-12-02 07:37:17 +0100 lla r264656 : #i79423# new shrink buttons
2008-11-26 11:55:28 +0100 fs r264362 : #i96541#
FillPropertySet: do not only catch UnknownPropertyException when setting the Char/ParaAutoStyleName,
but also care for the other exceptions which can be thrown by XPropertySet::setPropertyValue.
This is actually not the real fix for #i96541#, but only a follow-up. The root cause of the issue
was fixed in CWS dba301b, but this here was another (potential) bug which popped up during investigations.
2008-11-25 09:04:40 +0100 lla r264273 : #i82083# new toolbox in GroupsSorting dialog
2008-11-25 08:56:08 +0100 lla r264272 : #i94729# change token strings into string list, move class out of function
2008-11-24 15:52:22 +0100 fs r264251 : #i96532# do not set AppendTableAlias, NameLengthLimit, etc., if the OXMLDataSourceInstance is used for elements at which those attributes never appear
2008-11-24 15:51:45 +0100 fs r264249 : #i96532# do not set AppendTableAlias, NameLengthLimit, etc., if the OXMLDataSourceInstance is used for elements at which those attributes never appear
2008-11-24 15:45:21 +0100 fs r264244 : #i96532# the API default for ParamNameSubst is false
2008-11-24 15:45:04 +0100 fs r264243 : #i96532# do not set AppendTableAlias, NameLengthLimit, etc., if the OXMLDataSourceInstance is used for elements at which those attributes never appear
2008-11-24 15:44:14 +0100 fs r264241 : #i96532# slight refactoring of exporting properties which have a XML default different from the API default
2008-11-24 10:50:01 +0100 lla r264216 : #i82083# icons for new toolbox
2008-11-24 09:38:45 +0100 lla r264205 : #i82083# new toolbox in GroupsSorting dialog
2008-11-24 09:32:20 +0100 lla r264201 : #i96501# cleanup assertions
2008-11-24 09:12:55 +0100 lla r264198 : #i83082# enhancement for toolboxes, better HC comfort
2008-11-24 08:46:43 +0100 lla r264197 : #i96501# fix problem with negative positions
2008-11-21 11:44:47 +0100 fs r264118 : #i57042# introduce a counter for suspending change notifications of a given property, so recursive calls are possible
2008-11-21 11:02:17 +0100 fs r264116 : #i96388# don't call ExecuteContextMenuAction when no action was chosen by the user
2008-11-21 10:36:53 +0100 fs r264114 : #i47384# assertion was wrong
2008-11-14 12:33:15 +0100 fs r263673 : #i47318# XRowSetChangeBroadcaster/Listener, to be able to listen for changes in an XRowSetSupplier's RowSet
2008-11-14 12:30:29 +0100 fs r263672 : #i47318# more refactoring
- BoundControlModels now listen at the XRowSetSupplier for changes in the supplied
RowSet, to properly revoke/register old/new listeners at the RowSet
- replaced ::osl::Mutex in various places with a ControlModelLock
2008-11-14 12:20:55 +0100 fs r263671 : when BUILD_TYPE includes QADEVOOO, the BUILD_QADEVOOO needs to bet set, too
2008-11-14 12:19:21 +0100 fs r263670 : oops, this was not intended to be committed
2008-11-12 11:08:10 +0100 fs r263579 : #i96096# new ctors taking UNO_QUERY_THROW
2008-11-12 09:15:54 +0100 fs r263576 : no need to load the complete dialog just to get a string which the dialog itself loads from resource
2008-11-10 17:55:45 +0100 fs r263535 : spelling in comment
2008-11-10 15:51:14 +0100 fs r263523 : #i47318# various refactorings
1. don't forward syntetic XLoadListener events from the grid control to
the grid columns. Instead, forward GridColumn::XChild::setParent to
the base class, which then can add itself as load listener
2. removed various occurances of XMultiServiceFactory, instead use the
::comphelper::ComponentContext
3. in O(Bound)ControlModel, have a mechanism to lock the instance (using
ControlModelLock) and fire property changes when the last lock dies.
2008-11-10 12:49:24 +0100 oj r263513 : #i94729# change token strings into string list
2008-11-10 12:13:15 +0100 oj r263512 : #i95222# export chart:title style as well
2008-11-10 08:55:25 +0100 oj r263507 : #i93471# show the correct tabpage when selecting a different object
2008-11-07 23:38:29 +0100 fs r263490 : #i95977# for the event input controls, add a component extending their functionality so they're reset when the users presses DEL
2008-11-07 23:35:39 +0100 fs r263489 : during #i95977#: When a VCL Window is deleted from within VCL code, the respective WindowPeer was never disposed. Corrected this.
2008-11-07 14:57:07 +0100 fs r263420 : #i95963# human-readable display names for event bindings
2008-11-06 10:34:52 +0100 fs r263366 : #i95865# don't use library names containing InvalidZipEntryFileNames - workaround until i95409 is fixed
2008-11-06 10:33:28 +0100 fs r263365 : #i95865#
copied the following change from CWS odfmetadata2 (not yet integrated) into CWS dba31d
- comphelper/inc/comphelper/storagehelper.hxx,
comphelper/source/misc/storagehelper.cxx:
+ add function IsValidZipEntryFileName (moved from module package)
2009-04-22 11:01:27 +00:00
try
{
if ( _rEvent . Source ! = m_xActiveControl )
{ // let this control grab the focus
// (this case may happen if somebody moves the scroll wheel of the mouse over a control
// which does not have the focus)
// 85511 - 29.05.2001 - frank.schoenheit@germany.sun.com
//
// also, it happens when an image control gets a new image by double-clicking it
// #i88458# / 2009-01-12 / frank.schoenheit@sun.com
Reference < XWindow > xControlWindow ( _rEvent . Source , UNO_QUERY_THROW ) ;
xControlWindow - > setFocus ( ) ;
}
}
catch ( const Exception & )
{
DBG_UNHANDLED_EXCEPTION ( ) ;
}
impl_onModify ( ) ;
2000-09-18 16:07:07 +00:00
}
//------------------------------------------------------------------------------
2009-10-29 11:59:44 +01:00
void FormController : : impl_checkDisposed_throw ( ) const
{
if ( impl_isDisposed_nofail ( ) )
throw DisposedException ( : : rtl : : OUString ( ) , * const_cast < FormController * > ( this ) ) ;
}
2000-09-18 16:07:07 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : impl_onModify ( )
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
CWS-TOOLING: integrate CWS dba32a
2009-04-16 13:08:19 +0200 oj r270882 : #i14538# set property at control
2009-04-16 13:04:28 +0200 oj r270881 : #i98557# remove binary string for SRB
2009-04-15 13:19:10 +0200 oj r270838 : #i96782# use type set at view
2009-04-14 14:53:20 +0200 oj r270778 : #i96782# set initialize size for custom shape
2009-04-06 14:19:14 +0200 oj r270546 : #i88432# correct pos when < 0 while resizing
2009-04-06 13:36:13 +0200 oj r270541 : #i96782# handle toolbar and menubar differently
2009-04-06 13:33:54 +0200 oj r270540 : #i96782# handle toolbar and menubar differently
2009-04-06 12:28:23 +0200 oj r270534 : #i96782# handle toolbar and menubar differently
2009-04-06 12:27:44 +0200 oj r270533 : #i96782# handle toolbar and menubar differently
2009-04-06 12:24:32 +0200 oj r270532 : #i96782# handle toolbar and menubar differently
2009-04-06 12:15:15 +0200 oj r270531 : do not initialze when field is empty
2009-04-06 10:06:08 +0200 oj r270528 : #i96782# clean up of menubar and remove duplicates
2009-04-06 09:47:49 +0200 oj r270527 : #i96519# adjust help text dynamic
2009-04-03 13:43:20 +0200 oj r270482 : do not need to remove section from observer they are already disposed
2009-04-03 13:27:28 +0200 fs r270479 : #i97356#
2009-04-02 11:30:39 +0200 fs r270386 : UNX line ends
2009-04-02 10:54:51 +0200 fs r270379 : UNX line ends
2009-04-02 10:39:57 +0200 fs r270378 : UNX line ends
2009-04-02 10:37:24 +0200 fs r270377 : why did this survive the rebase? was removed on trunk ...
2009-03-31 13:31:12 +0200 fs r270277 : component_foo should be public
2009-03-28 00:21:01 +0100 fs r270176 : manuallly merged the changes which happened in CWS before resync to m45, where the directory had been moved from reportdesign/registry to reportbuilder/registry
2009-03-27 23:01:20 +0100 fs r270174 : CWS-TOOLING: rebase CWS dba32a to trunk@270033 (milestone: DEV300:m45)
2009-03-11 12:23:35 +0100 fs r269310 : #i99958# ensure the ControlModelLock doesn't release twice
2009-03-06 09:07:32 +0100 fs r268970 : ignore output paths in SVN's status
2009-03-06 09:07:08 +0100 fs r268969 : ignore output paths in SVN's status
2009-03-04 11:28:02 +0100 oj r268800 : copy and paste error, check correct end now
2009-03-03 15:49:11 +0100 fs r268736 : #i10000# those merges were lost during the rebase (m38->m42)
2009-03-03 13:25:27 +0100 lla r268720 : #i99652# fix wrong refactoring
2009-02-27 11:12:56 +0100 fs r268566 : beautified
2009-02-27 10:53:47 +0100 fs r268561 : doFormListening(false) only when actually isFormListening() (found during complex test case XMLFormSettings with assertions)
2009-02-26 20:55:31 +0100 fs r268546 : #i96530# set the Label property of the bound control, if we didn't create a dedicated label control
2009-02-26 11:53:09 +0100 fs r268494 : #i10000#
2009-02-26 11:27:50 +0100 fs r268493 : #i10000#
2009-02-26 11:17:08 +0100 fs r268490 : reportdesign depends on REPORTBUILDER, not REPORTDESIGN
2009-02-25 11:39:48 +0100 fs r268422 : #i10000# post-resync: INFO_ESCAPE_DATETIME got lost during rebase
2009-02-24 23:24:10 +0100 fs r268411 : CWS-TOOLING: rebase CWS dba32a to trunk@268395 (milestone: DEV300:m42)
2009-02-20 15:09:48 +0100 fs r268324 : respect ImplicitCatalog/SchemaRestriction in all necessary places
2009-02-20 13:48:10 +0100 oj r268318 : order of initialize corrected
2009-02-14 15:07:52 +0100 fs r267759 : #i98975# when an image does not have a bitmap, but a text, draw this (as placeholder)
2009-02-14 15:02:40 +0100 fs r267758 : consolidated and removed some duplicate code
2009-02-14 13:52:23 +0100 fs r267756 : #i10000#
2009-02-13 22:08:34 +0100 fs r267750 : #i100000#
2009-02-13 22:07:25 +0100 fs r267749 : #i10000#
2009-02-13 21:55:36 +0100 fs r267747 : #i10000#
2009-02-13 21:54:27 +0100 fs r267746 : use const_cast
2009-02-13 21:29:10 +0100 fs r267745 : #i10000#
2009-02-13 21:27:39 +0100 fs r267744 : #i10000#
2009-02-13 20:59:13 +0100 fs r267742 : #i10000#
2009-02-13 13:21:30 +0100 fs r267717 : better diagnostics
2009-02-13 13:17:24 +0100 fs r267715 : #i58313# support Catalog/SchemaRestriction settings, which are applied in getTables when 'all catalogs/schemas' are to be retrieved
2009-02-13 13:16:14 +0100 fs r267714 : filter out some more known global settings
2009-02-13 12:39:43 +0100 fs r267713 : #i58313# ImplicitCatalog/SchemaRestriction
2009-02-13 12:36:50 +0100 fs r267712 : when exporting data source settings, allow for properties which have a VOID default value, but are currently not VOID
2009-02-13 12:35:57 +0100 fs r267711 : implement XSet, to allow inserting properties which have a default value of VOID
2009-02-13 12:35:03 +0100 fs r267710 : +addVoidProperty
2009-02-13 10:20:08 +0100 fs r267697 : removed unused variable
2009-02-13 09:46:46 +0100 fs r267695 : refactored the table filtering code, to have a better base for introducing additional low level filters
2009-02-10 09:23:07 +0100 lla r267537 : #i10000# wrong line feed, double named variable
2009-02-09 12:13:08 +0100 oj r267508 : #i98605# notify hanlder
2009-02-09 11:50:34 +0100 oj r267507 : #i98926# solve refcount problem
2009-02-09 11:50:05 +0100 oj r267506 : #i98971# fix for simple html
2009-02-09 11:49:24 +0100 oj r267505 : #i98971# fix for simple html
2009-02-09 11:47:27 +0100 oj r267504 : invoke on copy
2009-02-09 09:51:00 +0100 fs r267500 : #i98316#
2009-02-09 09:46:10 +0100 fs r267499 : setCurrentSelection: don't reset the current form when we de-select everything
2009-02-09 09:43:45 +0100 fs r267498 : #i98316#
2009-02-08 21:25:18 +0100 fs r267496 : #i98272# introduce late ctor for cloning
2009-02-07 21:08:39 +0100 fs r267485 : #i98272# when copy-constructing a FmFormPageImpl, use the XCloneable of the forms collection, instead of XPersistObject (which is incompletely implemented)
2009-02-07 21:07:26 +0100 fs r267484 : removed obsolete include guards
2009-02-07 21:05:22 +0100 fs r267483 : #i98272# implement XCloneable
2009-02-06 15:02:48 +0100 lla r267467 : #i96523# add XImageControl
2009-02-06 14:41:38 +0100 oj r267463 : #i98926# late init when connection disposed but only when asked for
2009-02-06 13:49:57 +0100 lla r267457 : #i92860# bigint in forms doesn't allow input of values > 1, fixed
2009-02-06 13:03:55 +0100 oj r267455 : ImageScaleMode
2009-02-05 14:48:19 +0100 lla r267424 : #i89335# dropdown listboxes are 14 instead of 7 lines high
2009-02-05 13:40:00 +0100 oj r267423 : #i96945# insert new prop Opaque
2009-02-05 13:39:19 +0100 oj r267422 : #i96945# insert layer handling for hell and heaven
2009-02-05 13:29:32 +0100 lla r267420 : #i89335# add is null, is not null, is not like filter condition
2009-02-04 12:23:02 +0100 oj r267364 : #i98821# load table font settings
2009-02-04 10:05:27 +0100 oj r267351 : #i98821# load table font settings
2009-02-04 09:23:22 +0100 fs r267350 : checking persistency of UI settings in database documents - for the moment, capture table formattings (which is issue 98821)
2009-02-04 09:22:15 +0100 fs r267349 : moved some methods which are of wider interest from DatabaseDocument to FileHelper resp. TestCase
2009-02-04 08:56:27 +0100 oj r267347 : #i97586# UcbStreamHelper::CreateStream doesn't check all streamModes use different method
2009-02-04 08:23:26 +0100 oj r267346 : #i98701# check key size is >= 3 and some redesign
2009-02-03 23:29:24 +0100 fs r267345 : return the component (controller), not the frame
2009-02-03 23:28:53 +0100 fs r267344 : openExisting returns a controller now, not the frame (this was a bug)
2009-02-03 23:28:25 +0100 fs r267343 : openElement: properly return the component in the table/query case
2009-02-02 12:48:17 +0100 oj r267261 : #i96013# fix for relative path
2009-02-02 10:33:28 +0100 lla r267253 : #i98557# cleanups and consolidation
2009-02-02 09:37:23 +0100 lla r267250 : #i88432# resize will no longer move components to other sections
2009-02-02 09:08:24 +0100 oj r267245 : #i97475# write 0x1A at the end of the file
2009-01-30 19:39:20 +0100 lla r267230 : #i10000# unused parameters
2009-01-30 09:51:09 +0100 fs r267181 : onsolete
2009-01-30 09:49:27 +0100 fs r267180 : onsolete
2009-01-29 14:28:22 +0100 oj r267139 : #i96825# import cell style
2009-01-29 14:23:12 +0100 oj r267137 : #i98601# export imagescalehandler
2009-01-29 14:19:57 +0100 lla r267135 : #i98601# add ImageScaleMode
2009-01-29 13:21:08 +0100 oj r267124 : #i98601# impl ScaleMode
2009-01-29 13:20:56 +0100 oj r267123 : #i98601# impl ScaleMode
2009-01-29 08:46:40 +0100 oj r267095 : new property: ScaleMode
2009-01-29 08:45:23 +0100 oj r267094 : new ScaleMode from UnControlImageModel
2009-01-29 08:28:12 +0100 oj r267093 : #i87930# close all sub forms/reports when the desktop is going to be terminated and no db frame exists
2009-01-28 19:54:34 +0100 lla r267082 : #i98557# pictures in report wizard
2009-01-28 15:06:25 +0100 oj r267060 : #i87930# close all sub forms/reports when the desktop is going to be terminated and no db frame exists
2009-01-28 11:38:41 +0100 lla r267046 : #i76783# handle binary fields in forms
2009-01-28 09:24:43 +0100 lla r267025 : #i10000#
2009-01-28 08:40:04 +0100 fs r267024 : #i10000#
2009-01-28 08:04:43 +0100 oj r267023 : #i93456# use resource strings for function names
2009-01-27 13:26:05 +0100 oj r266988 : check data field is type field or expression
2009-01-27 13:07:17 +0100 oj r266985 : check data field length
2009-01-27 11:48:19 +0100 oj r266974 : #i96823# return dll string as column name when no alias exists
2009-01-27 09:53:11 +0100 fs r266958 : display the message of a caught exception
2009-01-27 09:44:13 +0100 fs r266957 : #i58313# when retrieving all tables, just set an empty table type filter - the connection will care for translating this, by respecting the TableTypeFilterMode setting
2009-01-27 09:36:09 +0100 fs r266956 : #i58313# getTables: per JDBC spec, is not a valid table type filter. Translate it to 'null'.
2009-01-26 11:24:49 +0100 lla r266912 : #i97865# cleanups (AddField viewable in remote mode)
2009-01-26 07:49:27 +0100 lla r266897 : #i97865# AddField opens in remote case
2009-01-26 07:48:58 +0100 lla r266896 : #i97865# AddField opens in remote case
2009-01-26 07:48:42 +0100 lla r266895 : #i97865# AddField opens in remote case
2009-01-23 15:04:40 +0100 fs r266825 : consolidate the usage of OSQLMessageBox with MessageType==Warning into OSQLWarningBox
2009-01-23 10:47:33 +0100 fs r266787 : +supportsUserAdministration
2009-01-23 10:47:11 +0100 fs r266784 : use DatabaseMetaData.supportsUserAdministration
2009-01-23 07:55:59 +0100 lla r266767 : #i10000# fix gcc compiler failures
2009-01-21 15:08:55 +0100 lla r266673 : #i97265# Labels in HC (IsDark) with other color (viewable)
2009-01-19 14:58:54 +0100 lla r266504 : #i96523# last problems with FormatKey and '0' values fixed
2009-01-19 14:58:00 +0100 lla r266503 : #i96519# AddField help text
2009-01-19 11:59:02 +0100 fs r266485 : #i96523# for formatted field models, init them with TreatAsNumber = false
2009-01-16 10:31:49 +0100 lla r266405 : #i96793# add shrink to popup menu
2009-01-16 09:21:44 +0100 lla r266401 : #i96519# AddField contains a help text
2009-01-15 11:21:49 +0100 lla r266357 : #i96523# problem with XVclWindowPeer not fixed now
2009-01-15 09:19:20 +0100 lla r266335 : #i96523# more crashes fixed.
2009-01-14 13:08:34 +0100 lla r266291 : #i96523# problems with crashes fixed
2009-01-13 10:54:24 +0100 lla r266199 : #i96523# show datasource in formattedfields new files
2009-01-13 10:52:39 +0100 lla r266198 : #i96523# show datasource in formattedfields
2009-01-13 09:41:50 +0100 lla r266197 : #i96526# handling none existance default.otr
2009-01-12 12:55:49 +0100 fs r266151 : don't expect the control model to be a BoundComponent before adding as modify listener
2009-01-12 12:51:33 +0100 fs r266149 : #i88458# let the ImageControl be an XModifyBroadcaster, so the forms runtime can notice when the user changes the control content while it does not have the focus
2009-01-09 13:41:22 +0100 fs r266080 : doc
2009-01-09 13:14:14 +0100 fs r266077 : #i97377# SetModified when order is changed via DnD
2009-01-07 09:55:40 +0100 oj r265951 : merge from master
2009-01-07 09:55:24 +0100 oj r265950 : removed observer
2009-01-07 09:55:06 +0100 oj r265949 : merge from master
2009-01-07 07:29:11 +0100 oj r265945 : shadow var changed
2009-01-06 07:25:57 +0100 oj r265893 : CWS-TOOLING: rebase CWS dba32a to trunk@265758 (milestone: DEV300:m38)
2009-01-05 13:18:22 +0100 oj r265865 : convert to unix le
2009-01-05 09:13:52 +0100 lla r265857 : #i79423# lc_ sc_ permutation fix
2009-01-02 19:40:59 +0100 lla r265847 : #i79423# section shrink icons
2008-12-22 11:37:57 +0100 lla r265749 : #i97484# move component to negative Y-position
2008-12-22 11:37:05 +0100 lla r265748 : #i97484# move component to negative Y-position
2008-12-22 11:35:33 +0100 lla r265747 : #i97484# move component to negative Y-position
2008-12-22 11:25:07 +0100 lla r265745 : #i96757# changes via property browser was not undoable
2008-12-18 15:10:38 +0100 fs r265694 : corrected an condition in doFormListening, which otherwise leads to uncommitable grid columns in documents which are loaded from disc (not in documents which are newly created)
2008-12-18 14:54:39 +0100 fs r265692 : Hide Columns text slightly changed
2008-12-18 13:44:15 +0100 fs r265683 : #i94068# properly display erros happening during a form operation - at least once, and at most once
2008-12-18 11:28:29 +0100 fs r265677 : document the new InputRequired property
2008-12-18 11:04:15 +0100 fs r265676 : #i96530# createControlLabelPair: don't actually create a label for a checkbox
2008-12-18 10:35:53 +0100 fs r265674 : #i95226# when a column is replaced, and it's the selected column, update the selection
2008-12-18 10:34:42 +0100 fs r265673 : #i95226# refactoring of the implReplaced method
2008-12-18 10:34:28 +0100 fs r265672 : #i95226# when replacing a grid column, update the property browser
2008-12-18 10:33:17 +0100 fs r265671 : when an element is removed, remove it from m_aCurrentSelection, too (if necessary)
2008-12-18 10:31:57 +0100 fs r265670 : Hide Columns text slightly changed
2008-12-18 10:15:56 +0100 lla r265669 : #i14538# do not allow to press finish button twice
2008-12-18 08:56:33 +0100 lla r265665 : #i10000# build depend=t problem hacked.
2008-12-17 20:59:10 +0100 fs r265656 : #i89821# don't let a MultiLineEdit select all text when it receives the focus
2008-12-17 12:10:54 +0100 fs r265594 : #i97356#
2008-12-17 12:06:29 +0100 fs r265593 : #i97355# Print -> Printable
2008-12-17 11:59:31 +0100 fs r265591 : #i97350# combo boxes comment on list selection (as list boxes already do)
2008-12-16 09:53:57 +0100 lla r265527 : #i96526# handling none existance default.otr
2008-12-15 14:48:39 +0100 lla r265500 : #i79423# reparing, was wrong implemented
2008-12-12 15:08:33 +0100 lla r265424 : #i10000# remove wrong carridge returns
2008-12-12 15:07:55 +0100 lla r265423 : #i10000# remove wrong carridge returns
2008-12-12 15:06:41 +0100 lla r265422 : #i10000# remove wrong carridge returns
2008-12-12 10:23:13 +0100 lla r265395 : #i95234# reset DragDelta
2008-12-12 10:11:02 +0100 lla r265393 : #i79423# pre versions of shrink buttons
2008-12-11 15:32:13 +0100 fs r265318 : prevent a deadlock during complex.dbaccess.DatabaseDocument test
2008-12-11 15:30:06 +0100 fs r265316 : prevent a deadlock during complex.dbaccess.DatabaseDocument test
2008-12-11 15:07:05 +0100 fs r265307 : removed superfluous text
2008-12-11 12:29:54 +0100 lla r265282 : #i96757# cleanup second try
2008-12-11 12:09:15 +0100 lla r265278 : #i96757# cleanup
2008-12-11 12:07:56 +0100 lla r265277 : #i95234#
2008-12-10 14:04:39 +0100 lla r265183 : #i93472# D&D fixes
2008-12-10 12:29:33 +0100 lla r265168 : #i94067# add (APP|SYS)FONT to XUnitConversion
2008-12-10 12:15:02 +0100 lla r265166 : #i94067# add APPFONT, SYSFONT to MeasureUnit
2008-12-10 11:52:10 +0100 lla r265163 : #i94067# add comments
2008-12-06 20:33:05 +0100 fs r264935 : #i10000# precompiled header
2008-12-05 09:29:26 +0100 fs r264889 : #i10000#
2008-12-05 09:07:31 +0100 fs r264888 : #i10000#
2008-12-04 13:25:46 +0100 fs r264838 : CWS-TOOLING: rebase CWS dba32a to trunk@264807 (milestone: DEV300:m37)
2008-12-03 23:49:13 +0100 fs r264808 : merge changes from trunk, to be able to do a rebase
2008-12-03 17:13:09 +0100 lla r264801 : #i91041# update documentation
2008-12-03 16:57:04 +0100 lla r264799 : #i94067# allow convert(Point|Size)ToLogic as pixel also
2008-12-02 12:36:32 +0100 lla r264687 : #i96782# bring toolbar objects to menu structure
2008-12-02 10:32:44 +0100 lla r264667 : #i86255# make property work
2008-12-02 09:22:47 +0100 lla r264659 : #i79423# add section shrink toolbar
2008-12-02 07:41:22 +0100 lla r264657 : #i86255# add check box for Escape DateTime property
2008-12-02 07:37:17 +0100 lla r264656 : #i79423# new shrink buttons
2008-11-26 11:55:28 +0100 fs r264362 : #i96541#
FillPropertySet: do not only catch UnknownPropertyException when setting the Char/ParaAutoStyleName,
but also care for the other exceptions which can be thrown by XPropertySet::setPropertyValue.
This is actually not the real fix for #i96541#, but only a follow-up. The root cause of the issue
was fixed in CWS dba301b, but this here was another (potential) bug which popped up during investigations.
2008-11-25 09:04:40 +0100 lla r264273 : #i82083# new toolbox in GroupsSorting dialog
2008-11-25 08:56:08 +0100 lla r264272 : #i94729# change token strings into string list, move class out of function
2008-11-24 15:52:22 +0100 fs r264251 : #i96532# do not set AppendTableAlias, NameLengthLimit, etc., if the OXMLDataSourceInstance is used for elements at which those attributes never appear
2008-11-24 15:51:45 +0100 fs r264249 : #i96532# do not set AppendTableAlias, NameLengthLimit, etc., if the OXMLDataSourceInstance is used for elements at which those attributes never appear
2008-11-24 15:45:21 +0100 fs r264244 : #i96532# the API default for ParamNameSubst is false
2008-11-24 15:45:04 +0100 fs r264243 : #i96532# do not set AppendTableAlias, NameLengthLimit, etc., if the OXMLDataSourceInstance is used for elements at which those attributes never appear
2008-11-24 15:44:14 +0100 fs r264241 : #i96532# slight refactoring of exporting properties which have a XML default different from the API default
2008-11-24 10:50:01 +0100 lla r264216 : #i82083# icons for new toolbox
2008-11-24 09:38:45 +0100 lla r264205 : #i82083# new toolbox in GroupsSorting dialog
2008-11-24 09:32:20 +0100 lla r264201 : #i96501# cleanup assertions
2008-11-24 09:12:55 +0100 lla r264198 : #i83082# enhancement for toolboxes, better HC comfort
2008-11-24 08:46:43 +0100 lla r264197 : #i96501# fix problem with negative positions
2008-11-21 11:44:47 +0100 fs r264118 : #i57042# introduce a counter for suspending change notifications of a given property, so recursive calls are possible
2008-11-21 11:02:17 +0100 fs r264116 : #i96388# don't call ExecuteContextMenuAction when no action was chosen by the user
2008-11-21 10:36:53 +0100 fs r264114 : #i47384# assertion was wrong
2008-11-14 12:33:15 +0100 fs r263673 : #i47318# XRowSetChangeBroadcaster/Listener, to be able to listen for changes in an XRowSetSupplier's RowSet
2008-11-14 12:30:29 +0100 fs r263672 : #i47318# more refactoring
- BoundControlModels now listen at the XRowSetSupplier for changes in the supplied
RowSet, to properly revoke/register old/new listeners at the RowSet
- replaced ::osl::Mutex in various places with a ControlModelLock
2008-11-14 12:20:55 +0100 fs r263671 : when BUILD_TYPE includes QADEVOOO, the BUILD_QADEVOOO needs to bet set, too
2008-11-14 12:19:21 +0100 fs r263670 : oops, this was not intended to be committed
2008-11-12 11:08:10 +0100 fs r263579 : #i96096# new ctors taking UNO_QUERY_THROW
2008-11-12 09:15:54 +0100 fs r263576 : no need to load the complete dialog just to get a string which the dialog itself loads from resource
2008-11-10 17:55:45 +0100 fs r263535 : spelling in comment
2008-11-10 15:51:14 +0100 fs r263523 : #i47318# various refactorings
1. don't forward syntetic XLoadListener events from the grid control to
the grid columns. Instead, forward GridColumn::XChild::setParent to
the base class, which then can add itself as load listener
2. removed various occurances of XMultiServiceFactory, instead use the
::comphelper::ComponentContext
3. in O(Bound)ControlModel, have a mechanism to lock the instance (using
ControlModelLock) and fire property changes when the last lock dies.
2008-11-10 12:49:24 +0100 oj r263513 : #i94729# change token strings into string list
2008-11-10 12:13:15 +0100 oj r263512 : #i95222# export chart:title style as well
2008-11-10 08:55:25 +0100 oj r263507 : #i93471# show the correct tabpage when selecting a different object
2008-11-07 23:38:29 +0100 fs r263490 : #i95977# for the event input controls, add a component extending their functionality so they're reset when the users presses DEL
2008-11-07 23:35:39 +0100 fs r263489 : during #i95977#: When a VCL Window is deleted from within VCL code, the respective WindowPeer was never disposed. Corrected this.
2008-11-07 14:57:07 +0100 fs r263420 : #i95963# human-readable display names for event bindings
2008-11-06 10:34:52 +0100 fs r263366 : #i95865# don't use library names containing InvalidZipEntryFileNames - workaround until i95409 is fixed
2008-11-06 10:33:28 +0100 fs r263365 : #i95865#
copied the following change from CWS odfmetadata2 (not yet integrated) into CWS dba31d
- comphelper/inc/comphelper/storagehelper.hxx,
comphelper/source/misc/storagehelper.cxx:
+ add function IsValidZipEntryFileName (moved from module package)
2009-04-22 11:01:27 +00:00
2000-09-18 16:07:07 +00:00
{
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
CWS-TOOLING: integrate CWS dba32a
2009-04-16 13:08:19 +0200 oj r270882 : #i14538# set property at control
2009-04-16 13:04:28 +0200 oj r270881 : #i98557# remove binary string for SRB
2009-04-15 13:19:10 +0200 oj r270838 : #i96782# use type set at view
2009-04-14 14:53:20 +0200 oj r270778 : #i96782# set initialize size for custom shape
2009-04-06 14:19:14 +0200 oj r270546 : #i88432# correct pos when < 0 while resizing
2009-04-06 13:36:13 +0200 oj r270541 : #i96782# handle toolbar and menubar differently
2009-04-06 13:33:54 +0200 oj r270540 : #i96782# handle toolbar and menubar differently
2009-04-06 12:28:23 +0200 oj r270534 : #i96782# handle toolbar and menubar differently
2009-04-06 12:27:44 +0200 oj r270533 : #i96782# handle toolbar and menubar differently
2009-04-06 12:24:32 +0200 oj r270532 : #i96782# handle toolbar and menubar differently
2009-04-06 12:15:15 +0200 oj r270531 : do not initialze when field is empty
2009-04-06 10:06:08 +0200 oj r270528 : #i96782# clean up of menubar and remove duplicates
2009-04-06 09:47:49 +0200 oj r270527 : #i96519# adjust help text dynamic
2009-04-03 13:43:20 +0200 oj r270482 : do not need to remove section from observer they are already disposed
2009-04-03 13:27:28 +0200 fs r270479 : #i97356#
2009-04-02 11:30:39 +0200 fs r270386 : UNX line ends
2009-04-02 10:54:51 +0200 fs r270379 : UNX line ends
2009-04-02 10:39:57 +0200 fs r270378 : UNX line ends
2009-04-02 10:37:24 +0200 fs r270377 : why did this survive the rebase? was removed on trunk ...
2009-03-31 13:31:12 +0200 fs r270277 : component_foo should be public
2009-03-28 00:21:01 +0100 fs r270176 : manuallly merged the changes which happened in CWS before resync to m45, where the directory had been moved from reportdesign/registry to reportbuilder/registry
2009-03-27 23:01:20 +0100 fs r270174 : CWS-TOOLING: rebase CWS dba32a to trunk@270033 (milestone: DEV300:m45)
2009-03-11 12:23:35 +0100 fs r269310 : #i99958# ensure the ControlModelLock doesn't release twice
2009-03-06 09:07:32 +0100 fs r268970 : ignore output paths in SVN's status
2009-03-06 09:07:08 +0100 fs r268969 : ignore output paths in SVN's status
2009-03-04 11:28:02 +0100 oj r268800 : copy and paste error, check correct end now
2009-03-03 15:49:11 +0100 fs r268736 : #i10000# those merges were lost during the rebase (m38->m42)
2009-03-03 13:25:27 +0100 lla r268720 : #i99652# fix wrong refactoring
2009-02-27 11:12:56 +0100 fs r268566 : beautified
2009-02-27 10:53:47 +0100 fs r268561 : doFormListening(false) only when actually isFormListening() (found during complex test case XMLFormSettings with assertions)
2009-02-26 20:55:31 +0100 fs r268546 : #i96530# set the Label property of the bound control, if we didn't create a dedicated label control
2009-02-26 11:53:09 +0100 fs r268494 : #i10000#
2009-02-26 11:27:50 +0100 fs r268493 : #i10000#
2009-02-26 11:17:08 +0100 fs r268490 : reportdesign depends on REPORTBUILDER, not REPORTDESIGN
2009-02-25 11:39:48 +0100 fs r268422 : #i10000# post-resync: INFO_ESCAPE_DATETIME got lost during rebase
2009-02-24 23:24:10 +0100 fs r268411 : CWS-TOOLING: rebase CWS dba32a to trunk@268395 (milestone: DEV300:m42)
2009-02-20 15:09:48 +0100 fs r268324 : respect ImplicitCatalog/SchemaRestriction in all necessary places
2009-02-20 13:48:10 +0100 oj r268318 : order of initialize corrected
2009-02-14 15:07:52 +0100 fs r267759 : #i98975# when an image does not have a bitmap, but a text, draw this (as placeholder)
2009-02-14 15:02:40 +0100 fs r267758 : consolidated and removed some duplicate code
2009-02-14 13:52:23 +0100 fs r267756 : #i10000#
2009-02-13 22:08:34 +0100 fs r267750 : #i100000#
2009-02-13 22:07:25 +0100 fs r267749 : #i10000#
2009-02-13 21:55:36 +0100 fs r267747 : #i10000#
2009-02-13 21:54:27 +0100 fs r267746 : use const_cast
2009-02-13 21:29:10 +0100 fs r267745 : #i10000#
2009-02-13 21:27:39 +0100 fs r267744 : #i10000#
2009-02-13 20:59:13 +0100 fs r267742 : #i10000#
2009-02-13 13:21:30 +0100 fs r267717 : better diagnostics
2009-02-13 13:17:24 +0100 fs r267715 : #i58313# support Catalog/SchemaRestriction settings, which are applied in getTables when 'all catalogs/schemas' are to be retrieved
2009-02-13 13:16:14 +0100 fs r267714 : filter out some more known global settings
2009-02-13 12:39:43 +0100 fs r267713 : #i58313# ImplicitCatalog/SchemaRestriction
2009-02-13 12:36:50 +0100 fs r267712 : when exporting data source settings, allow for properties which have a VOID default value, but are currently not VOID
2009-02-13 12:35:57 +0100 fs r267711 : implement XSet, to allow inserting properties which have a default value of VOID
2009-02-13 12:35:03 +0100 fs r267710 : +addVoidProperty
2009-02-13 10:20:08 +0100 fs r267697 : removed unused variable
2009-02-13 09:46:46 +0100 fs r267695 : refactored the table filtering code, to have a better base for introducing additional low level filters
2009-02-10 09:23:07 +0100 lla r267537 : #i10000# wrong line feed, double named variable
2009-02-09 12:13:08 +0100 oj r267508 : #i98605# notify hanlder
2009-02-09 11:50:34 +0100 oj r267507 : #i98926# solve refcount problem
2009-02-09 11:50:05 +0100 oj r267506 : #i98971# fix for simple html
2009-02-09 11:49:24 +0100 oj r267505 : #i98971# fix for simple html
2009-02-09 11:47:27 +0100 oj r267504 : invoke on copy
2009-02-09 09:51:00 +0100 fs r267500 : #i98316#
2009-02-09 09:46:10 +0100 fs r267499 : setCurrentSelection: don't reset the current form when we de-select everything
2009-02-09 09:43:45 +0100 fs r267498 : #i98316#
2009-02-08 21:25:18 +0100 fs r267496 : #i98272# introduce late ctor for cloning
2009-02-07 21:08:39 +0100 fs r267485 : #i98272# when copy-constructing a FmFormPageImpl, use the XCloneable of the forms collection, instead of XPersistObject (which is incompletely implemented)
2009-02-07 21:07:26 +0100 fs r267484 : removed obsolete include guards
2009-02-07 21:05:22 +0100 fs r267483 : #i98272# implement XCloneable
2009-02-06 15:02:48 +0100 lla r267467 : #i96523# add XImageControl
2009-02-06 14:41:38 +0100 oj r267463 : #i98926# late init when connection disposed but only when asked for
2009-02-06 13:49:57 +0100 lla r267457 : #i92860# bigint in forms doesn't allow input of values > 1, fixed
2009-02-06 13:03:55 +0100 oj r267455 : ImageScaleMode
2009-02-05 14:48:19 +0100 lla r267424 : #i89335# dropdown listboxes are 14 instead of 7 lines high
2009-02-05 13:40:00 +0100 oj r267423 : #i96945# insert new prop Opaque
2009-02-05 13:39:19 +0100 oj r267422 : #i96945# insert layer handling for hell and heaven
2009-02-05 13:29:32 +0100 lla r267420 : #i89335# add is null, is not null, is not like filter condition
2009-02-04 12:23:02 +0100 oj r267364 : #i98821# load table font settings
2009-02-04 10:05:27 +0100 oj r267351 : #i98821# load table font settings
2009-02-04 09:23:22 +0100 fs r267350 : checking persistency of UI settings in database documents - for the moment, capture table formattings (which is issue 98821)
2009-02-04 09:22:15 +0100 fs r267349 : moved some methods which are of wider interest from DatabaseDocument to FileHelper resp. TestCase
2009-02-04 08:56:27 +0100 oj r267347 : #i97586# UcbStreamHelper::CreateStream doesn't check all streamModes use different method
2009-02-04 08:23:26 +0100 oj r267346 : #i98701# check key size is >= 3 and some redesign
2009-02-03 23:29:24 +0100 fs r267345 : return the component (controller), not the frame
2009-02-03 23:28:53 +0100 fs r267344 : openExisting returns a controller now, not the frame (this was a bug)
2009-02-03 23:28:25 +0100 fs r267343 : openElement: properly return the component in the table/query case
2009-02-02 12:48:17 +0100 oj r267261 : #i96013# fix for relative path
2009-02-02 10:33:28 +0100 lla r267253 : #i98557# cleanups and consolidation
2009-02-02 09:37:23 +0100 lla r267250 : #i88432# resize will no longer move components to other sections
2009-02-02 09:08:24 +0100 oj r267245 : #i97475# write 0x1A at the end of the file
2009-01-30 19:39:20 +0100 lla r267230 : #i10000# unused parameters
2009-01-30 09:51:09 +0100 fs r267181 : onsolete
2009-01-30 09:49:27 +0100 fs r267180 : onsolete
2009-01-29 14:28:22 +0100 oj r267139 : #i96825# import cell style
2009-01-29 14:23:12 +0100 oj r267137 : #i98601# export imagescalehandler
2009-01-29 14:19:57 +0100 lla r267135 : #i98601# add ImageScaleMode
2009-01-29 13:21:08 +0100 oj r267124 : #i98601# impl ScaleMode
2009-01-29 13:20:56 +0100 oj r267123 : #i98601# impl ScaleMode
2009-01-29 08:46:40 +0100 oj r267095 : new property: ScaleMode
2009-01-29 08:45:23 +0100 oj r267094 : new ScaleMode from UnControlImageModel
2009-01-29 08:28:12 +0100 oj r267093 : #i87930# close all sub forms/reports when the desktop is going to be terminated and no db frame exists
2009-01-28 19:54:34 +0100 lla r267082 : #i98557# pictures in report wizard
2009-01-28 15:06:25 +0100 oj r267060 : #i87930# close all sub forms/reports when the desktop is going to be terminated and no db frame exists
2009-01-28 11:38:41 +0100 lla r267046 : #i76783# handle binary fields in forms
2009-01-28 09:24:43 +0100 lla r267025 : #i10000#
2009-01-28 08:40:04 +0100 fs r267024 : #i10000#
2009-01-28 08:04:43 +0100 oj r267023 : #i93456# use resource strings for function names
2009-01-27 13:26:05 +0100 oj r266988 : check data field is type field or expression
2009-01-27 13:07:17 +0100 oj r266985 : check data field length
2009-01-27 11:48:19 +0100 oj r266974 : #i96823# return dll string as column name when no alias exists
2009-01-27 09:53:11 +0100 fs r266958 : display the message of a caught exception
2009-01-27 09:44:13 +0100 fs r266957 : #i58313# when retrieving all tables, just set an empty table type filter - the connection will care for translating this, by respecting the TableTypeFilterMode setting
2009-01-27 09:36:09 +0100 fs r266956 : #i58313# getTables: per JDBC spec, is not a valid table type filter. Translate it to 'null'.
2009-01-26 11:24:49 +0100 lla r266912 : #i97865# cleanups (AddField viewable in remote mode)
2009-01-26 07:49:27 +0100 lla r266897 : #i97865# AddField opens in remote case
2009-01-26 07:48:58 +0100 lla r266896 : #i97865# AddField opens in remote case
2009-01-26 07:48:42 +0100 lla r266895 : #i97865# AddField opens in remote case
2009-01-23 15:04:40 +0100 fs r266825 : consolidate the usage of OSQLMessageBox with MessageType==Warning into OSQLWarningBox
2009-01-23 10:47:33 +0100 fs r266787 : +supportsUserAdministration
2009-01-23 10:47:11 +0100 fs r266784 : use DatabaseMetaData.supportsUserAdministration
2009-01-23 07:55:59 +0100 lla r266767 : #i10000# fix gcc compiler failures
2009-01-21 15:08:55 +0100 lla r266673 : #i97265# Labels in HC (IsDark) with other color (viewable)
2009-01-19 14:58:54 +0100 lla r266504 : #i96523# last problems with FormatKey and '0' values fixed
2009-01-19 14:58:00 +0100 lla r266503 : #i96519# AddField help text
2009-01-19 11:59:02 +0100 fs r266485 : #i96523# for formatted field models, init them with TreatAsNumber = false
2009-01-16 10:31:49 +0100 lla r266405 : #i96793# add shrink to popup menu
2009-01-16 09:21:44 +0100 lla r266401 : #i96519# AddField contains a help text
2009-01-15 11:21:49 +0100 lla r266357 : #i96523# problem with XVclWindowPeer not fixed now
2009-01-15 09:19:20 +0100 lla r266335 : #i96523# more crashes fixed.
2009-01-14 13:08:34 +0100 lla r266291 : #i96523# problems with crashes fixed
2009-01-13 10:54:24 +0100 lla r266199 : #i96523# show datasource in formattedfields new files
2009-01-13 10:52:39 +0100 lla r266198 : #i96523# show datasource in formattedfields
2009-01-13 09:41:50 +0100 lla r266197 : #i96526# handling none existance default.otr
2009-01-12 12:55:49 +0100 fs r266151 : don't expect the control model to be a BoundComponent before adding as modify listener
2009-01-12 12:51:33 +0100 fs r266149 : #i88458# let the ImageControl be an XModifyBroadcaster, so the forms runtime can notice when the user changes the control content while it does not have the focus
2009-01-09 13:41:22 +0100 fs r266080 : doc
2009-01-09 13:14:14 +0100 fs r266077 : #i97377# SetModified when order is changed via DnD
2009-01-07 09:55:40 +0100 oj r265951 : merge from master
2009-01-07 09:55:24 +0100 oj r265950 : removed observer
2009-01-07 09:55:06 +0100 oj r265949 : merge from master
2009-01-07 07:29:11 +0100 oj r265945 : shadow var changed
2009-01-06 07:25:57 +0100 oj r265893 : CWS-TOOLING: rebase CWS dba32a to trunk@265758 (milestone: DEV300:m38)
2009-01-05 13:18:22 +0100 oj r265865 : convert to unix le
2009-01-05 09:13:52 +0100 lla r265857 : #i79423# lc_ sc_ permutation fix
2009-01-02 19:40:59 +0100 lla r265847 : #i79423# section shrink icons
2008-12-22 11:37:57 +0100 lla r265749 : #i97484# move component to negative Y-position
2008-12-22 11:37:05 +0100 lla r265748 : #i97484# move component to negative Y-position
2008-12-22 11:35:33 +0100 lla r265747 : #i97484# move component to negative Y-position
2008-12-22 11:25:07 +0100 lla r265745 : #i96757# changes via property browser was not undoable
2008-12-18 15:10:38 +0100 fs r265694 : corrected an condition in doFormListening, which otherwise leads to uncommitable grid columns in documents which are loaded from disc (not in documents which are newly created)
2008-12-18 14:54:39 +0100 fs r265692 : Hide Columns text slightly changed
2008-12-18 13:44:15 +0100 fs r265683 : #i94068# properly display erros happening during a form operation - at least once, and at most once
2008-12-18 11:28:29 +0100 fs r265677 : document the new InputRequired property
2008-12-18 11:04:15 +0100 fs r265676 : #i96530# createControlLabelPair: don't actually create a label for a checkbox
2008-12-18 10:35:53 +0100 fs r265674 : #i95226# when a column is replaced, and it's the selected column, update the selection
2008-12-18 10:34:42 +0100 fs r265673 : #i95226# refactoring of the implReplaced method
2008-12-18 10:34:28 +0100 fs r265672 : #i95226# when replacing a grid column, update the property browser
2008-12-18 10:33:17 +0100 fs r265671 : when an element is removed, remove it from m_aCurrentSelection, too (if necessary)
2008-12-18 10:31:57 +0100 fs r265670 : Hide Columns text slightly changed
2008-12-18 10:15:56 +0100 lla r265669 : #i14538# do not allow to press finish button twice
2008-12-18 08:56:33 +0100 lla r265665 : #i10000# build depend=t problem hacked.
2008-12-17 20:59:10 +0100 fs r265656 : #i89821# don't let a MultiLineEdit select all text when it receives the focus
2008-12-17 12:10:54 +0100 fs r265594 : #i97356#
2008-12-17 12:06:29 +0100 fs r265593 : #i97355# Print -> Printable
2008-12-17 11:59:31 +0100 fs r265591 : #i97350# combo boxes comment on list selection (as list boxes already do)
2008-12-16 09:53:57 +0100 lla r265527 : #i96526# handling none existance default.otr
2008-12-15 14:48:39 +0100 lla r265500 : #i79423# reparing, was wrong implemented
2008-12-12 15:08:33 +0100 lla r265424 : #i10000# remove wrong carridge returns
2008-12-12 15:07:55 +0100 lla r265423 : #i10000# remove wrong carridge returns
2008-12-12 15:06:41 +0100 lla r265422 : #i10000# remove wrong carridge returns
2008-12-12 10:23:13 +0100 lla r265395 : #i95234# reset DragDelta
2008-12-12 10:11:02 +0100 lla r265393 : #i79423# pre versions of shrink buttons
2008-12-11 15:32:13 +0100 fs r265318 : prevent a deadlock during complex.dbaccess.DatabaseDocument test
2008-12-11 15:30:06 +0100 fs r265316 : prevent a deadlock during complex.dbaccess.DatabaseDocument test
2008-12-11 15:07:05 +0100 fs r265307 : removed superfluous text
2008-12-11 12:29:54 +0100 lla r265282 : #i96757# cleanup second try
2008-12-11 12:09:15 +0100 lla r265278 : #i96757# cleanup
2008-12-11 12:07:56 +0100 lla r265277 : #i95234#
2008-12-10 14:04:39 +0100 lla r265183 : #i93472# D&D fixes
2008-12-10 12:29:33 +0100 lla r265168 : #i94067# add (APP|SYS)FONT to XUnitConversion
2008-12-10 12:15:02 +0100 lla r265166 : #i94067# add APPFONT, SYSFONT to MeasureUnit
2008-12-10 11:52:10 +0100 lla r265163 : #i94067# add comments
2008-12-06 20:33:05 +0100 fs r264935 : #i10000# precompiled header
2008-12-05 09:29:26 +0100 fs r264889 : #i10000#
2008-12-05 09:07:31 +0100 fs r264888 : #i10000#
2008-12-04 13:25:46 +0100 fs r264838 : CWS-TOOLING: rebase CWS dba32a to trunk@264807 (milestone: DEV300:m37)
2008-12-03 23:49:13 +0100 fs r264808 : merge changes from trunk, to be able to do a rebase
2008-12-03 17:13:09 +0100 lla r264801 : #i91041# update documentation
2008-12-03 16:57:04 +0100 lla r264799 : #i94067# allow convert(Point|Size)ToLogic as pixel also
2008-12-02 12:36:32 +0100 lla r264687 : #i96782# bring toolbar objects to menu structure
2008-12-02 10:32:44 +0100 lla r264667 : #i86255# make property work
2008-12-02 09:22:47 +0100 lla r264659 : #i79423# add section shrink toolbar
2008-12-02 07:41:22 +0100 lla r264657 : #i86255# add check box for Escape DateTime property
2008-12-02 07:37:17 +0100 lla r264656 : #i79423# new shrink buttons
2008-11-26 11:55:28 +0100 fs r264362 : #i96541#
FillPropertySet: do not only catch UnknownPropertyException when setting the Char/ParaAutoStyleName,
but also care for the other exceptions which can be thrown by XPropertySet::setPropertyValue.
This is actually not the real fix for #i96541#, but only a follow-up. The root cause of the issue
was fixed in CWS dba301b, but this here was another (potential) bug which popped up during investigations.
2008-11-25 09:04:40 +0100 lla r264273 : #i82083# new toolbox in GroupsSorting dialog
2008-11-25 08:56:08 +0100 lla r264272 : #i94729# change token strings into string list, move class out of function
2008-11-24 15:52:22 +0100 fs r264251 : #i96532# do not set AppendTableAlias, NameLengthLimit, etc., if the OXMLDataSourceInstance is used for elements at which those attributes never appear
2008-11-24 15:51:45 +0100 fs r264249 : #i96532# do not set AppendTableAlias, NameLengthLimit, etc., if the OXMLDataSourceInstance is used for elements at which those attributes never appear
2008-11-24 15:45:21 +0100 fs r264244 : #i96532# the API default for ParamNameSubst is false
2008-11-24 15:45:04 +0100 fs r264243 : #i96532# do not set AppendTableAlias, NameLengthLimit, etc., if the OXMLDataSourceInstance is used for elements at which those attributes never appear
2008-11-24 15:44:14 +0100 fs r264241 : #i96532# slight refactoring of exporting properties which have a XML default different from the API default
2008-11-24 10:50:01 +0100 lla r264216 : #i82083# icons for new toolbox
2008-11-24 09:38:45 +0100 lla r264205 : #i82083# new toolbox in GroupsSorting dialog
2008-11-24 09:32:20 +0100 lla r264201 : #i96501# cleanup assertions
2008-11-24 09:12:55 +0100 lla r264198 : #i83082# enhancement for toolboxes, better HC comfort
2008-11-24 08:46:43 +0100 lla r264197 : #i96501# fix problem with negative positions
2008-11-21 11:44:47 +0100 fs r264118 : #i57042# introduce a counter for suspending change notifications of a given property, so recursive calls are possible
2008-11-21 11:02:17 +0100 fs r264116 : #i96388# don't call ExecuteContextMenuAction when no action was chosen by the user
2008-11-21 10:36:53 +0100 fs r264114 : #i47384# assertion was wrong
2008-11-14 12:33:15 +0100 fs r263673 : #i47318# XRowSetChangeBroadcaster/Listener, to be able to listen for changes in an XRowSetSupplier's RowSet
2008-11-14 12:30:29 +0100 fs r263672 : #i47318# more refactoring
- BoundControlModels now listen at the XRowSetSupplier for changes in the supplied
RowSet, to properly revoke/register old/new listeners at the RowSet
- replaced ::osl::Mutex in various places with a ControlModelLock
2008-11-14 12:20:55 +0100 fs r263671 : when BUILD_TYPE includes QADEVOOO, the BUILD_QADEVOOO needs to bet set, too
2008-11-14 12:19:21 +0100 fs r263670 : oops, this was not intended to be committed
2008-11-12 11:08:10 +0100 fs r263579 : #i96096# new ctors taking UNO_QUERY_THROW
2008-11-12 09:15:54 +0100 fs r263576 : no need to load the complete dialog just to get a string which the dialog itself loads from resource
2008-11-10 17:55:45 +0100 fs r263535 : spelling in comment
2008-11-10 15:51:14 +0100 fs r263523 : #i47318# various refactorings
1. don't forward syntetic XLoadListener events from the grid control to
the grid columns. Instead, forward GridColumn::XChild::setParent to
the base class, which then can add itself as load listener
2. removed various occurances of XMultiServiceFactory, instead use the
::comphelper::ComponentContext
3. in O(Bound)ControlModel, have a mechanism to lock the instance (using
ControlModelLock) and fire property changes when the last lock dies.
2008-11-10 12:49:24 +0100 oj r263513 : #i94729# change token strings into string list
2008-11-10 12:13:15 +0100 oj r263512 : #i95222# export chart:title style as well
2008-11-10 08:55:25 +0100 oj r263507 : #i93471# show the correct tabpage when selecting a different object
2008-11-07 23:38:29 +0100 fs r263490 : #i95977# for the event input controls, add a component extending their functionality so they're reset when the users presses DEL
2008-11-07 23:35:39 +0100 fs r263489 : during #i95977#: When a VCL Window is deleted from within VCL code, the respective WindowPeer was never disposed. Corrected this.
2008-11-07 14:57:07 +0100 fs r263420 : #i95963# human-readable display names for event bindings
2008-11-06 10:34:52 +0100 fs r263366 : #i95865# don't use library names containing InvalidZipEntryFileNames - workaround until i95409 is fixed
2008-11-06 10:33:28 +0100 fs r263365 : #i95865#
copied the following change from CWS odfmetadata2 (not yet integrated) into CWS dba31d
- comphelper/inc/comphelper/storagehelper.hxx,
comphelper/source/misc/storagehelper.cxx:
+ add function IsValidZipEntryFileName (moved from module package)
2009-04-22 11:01:27 +00:00
if ( ! m_bModified )
m_bModified = sal_True ;
2001-05-29 13:15:08 +00:00
}
EventObject aEvt ( static_cast < cppu : : OWeakObject * > ( this ) ) ;
2006-07-26 06:43:01 +00:00
m_aModifyListeners . notifyEach ( & XModifyListener : : modified , aEvt ) ;
2000-09-18 16:07:07 +00:00
}
//------------------------------------------------------------------------------
2009-10-29 15:55:37 +01:00
void FormController : : impl_addFilterRow ( const FmFilterRow & _row )
2000-09-18 16:07:07 +00:00
{
2009-10-29 15:55:37 +01:00
m_aFilterRows . push_back ( _row ) ;
if ( m_aFilterRows . size ( ) = = 1 )
{ // that's the first row ever
OSL_ENSURE ( m_nCurrentFilterPosition = = - 1 , " FormController::impl_addFilterRow: inconsistency! " ) ;
m_nCurrentFilterPosition = 0 ;
}
}
2009-10-29 11:59:44 +01:00
//------------------------------------------------------------------------------
void FormController : : impl_appendEmptyFilterRow ( : : osl : : ClearableMutexGuard & _rClearBeforeNotify )
{
// SYNCHRONIZED -->
2009-10-29 15:55:37 +01:00
impl_addFilterRow ( FmFilterRow ( ) ) ;
2009-10-29 11:59:44 +01:00
// notify the listeners
FilterEvent aEvent ;
aEvent . Source = * this ;
2009-10-29 15:55:37 +01:00
aEvent . DisjunctiveTerm = ( sal_Int32 ) m_aFilterRows . size ( ) - 1 ;
2009-10-29 11:59:44 +01:00
_rClearBeforeNotify . clear ( ) ;
// <-- SYNCHRONIZED
m_aFilterListeners . notifyEach ( & XFilterControllerListener : : disjunctiveTermAdded , aEvent ) ;
}
2000-09-18 16:07:07 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
sal_Bool FormController : : determineLockState ( ) const
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
2000-09-18 16:07:07 +00:00
// a.) in filter mode we are always locked
// b.) if we have no valid model or our model (a result set) is not alive -> we're locked
// c.) if we are inserting everything is OK and we are not locked
// d.) if are not updatable or on invalid position
2004-04-13 10:05:48 +00:00
Reference < XResultSet > xResultSet ( m_xModelAsIndex , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
if ( m_bFiltering | | ! xResultSet . is ( ) | | ! isRowSetAlive ( xResultSet ) )
return sal_True ;
else
return ( m_bCanInsert & & m_bCurrentRecordNew ) ? sal_False
: xResultSet - > isBeforeFirst ( ) | | xResultSet - > isAfterLast ( ) | | xResultSet - > rowDeleted ( ) | | ! m_bCanUpdate ;
}
// FocusListener
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : focusGained ( const FocusEvent & e ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2009-10-23 16:03:52 +02:00
// SYNCHRONIZED -->
: : osl : : ClearableMutexGuard aGuard ( m_aMutex ) ;
2009-10-29 11:59:44 +01:00
impl_checkDisposed_throw ( ) ;
2000-09-18 16:07:07 +00:00
2004-07-05 14:50:20 +00:00
m_pControlBorderManager - > focusGained ( e . Source ) ;
2009-10-23 16:03:52 +02:00
Reference < XControl > xControl ( e . Source , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
if ( m_bDBConnection )
{
// do we need to keep the locking of the commit
// we hold the lock as long as the control differs from the current
// otherwhise we disabled the lock
2004-04-13 10:05:48 +00:00
m_bCommitLock = m_bCommitLock & & ( XControl * ) xControl . get ( ) ! = ( XControl * ) m_xCurrentControl . get ( ) ;
2000-09-18 16:07:07 +00:00
if ( m_bCommitLock )
return ;
// when do we have to commit a value to form or a filter
// a.) if the current value is modified
// b.) there must be a current control
// c.) and it must be different from the new focus owning control or
// d.) the focus is moving around (so we have only one control)
2008-12-01 12:31:27 +00:00
if ( ( m_bModified | | m_bFiltering )
& & m_xCurrentControl . is ( )
& & ( ( xControl . get ( ) ! = m_xCurrentControl . get ( ) )
| | ( ( e . FocusFlags & FocusChangeReason : : AROUND )
& & ( m_bCycle | | m_bFiltering )
)
)
2000-09-18 16:07:07 +00:00
)
{
// check the old control if the content is ok
2011-04-13 11:17:17 +01:00
# if OSL_DEBUG_LEVEL > 1
2004-04-13 10:05:48 +00:00
Reference < XBoundControl > xLockingTest ( m_xCurrentControl , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
sal_Bool bControlIsLocked = xLockingTest . is ( ) & & xLockingTest - > getLock ( ) ;
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! bControlIsLocked , " FormController::Gained: I'm modified and the current control is locked ? How this ? " ) ;
2000-09-18 16:07:07 +00:00
// normalerweise sollte ein gelocktes Control nicht modified sein, also muss wohl mein bModified aus einem anderen Kontext
// gesetzt worden sein, was ich nicht verstehen wuerde ...
# endif
DBG_ASSERT ( m_xCurrentControl . is ( ) , " kein CurrentControl gesetzt " ) ;
// zunaechst das Control fragen ob es das IFace unterstuetzt
2003-03-27 14:06:05 +00:00
Reference < XBoundComponent > xBound ( m_xCurrentControl , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
if ( ! xBound . is ( ) & & m_xCurrentControl . is ( ) )
2003-03-27 14:06:05 +00:00
xBound = Reference < XBoundComponent > ( m_xCurrentControl - > getModel ( ) , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
// lock if we lose the focus during commit
m_bCommitLock = sal_True ;
// Commit nicht erfolgreich, Focus zuruecksetzen
if ( xBound . is ( ) & & ! xBound - > commit ( ) )
{
// the commit failed and we don't commit again until the current control
// which couldn't be commit gains the focus again
2004-04-13 10:05:48 +00:00
Reference < XWindow > xWindow ( m_xCurrentControl , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
if ( xWindow . is ( ) )
xWindow - > setFocus ( ) ;
return ;
}
else
{
m_bModified = sal_False ;
m_bCommitLock = sal_False ;
}
}
2004-04-13 10:05:48 +00:00
if ( ! m_bFiltering & & m_bCycle & & ( e . FocusFlags & FocusChangeReason : : AROUND ) & & m_xCurrentControl . is ( ) )
2000-09-18 16:07:07 +00:00
{
2009-10-30 11:38:26 +01:00
SQLErrorEvent aErrorEvent ;
OSL_ENSURE ( m_xFormOperations . is ( ) , " FormController::focusGained: hmm? " ) ;
// should have been created in setModel
try
2006-07-26 06:43:01 +00:00
{
2009-10-30 11:38:26 +01:00
if ( e . FocusFlags & FocusChangeReason : : FORWARD )
{
if ( m_xFormOperations . is ( ) & & m_xFormOperations - > isEnabled ( FormFeature : : MoveToNext ) )
m_xFormOperations - > execute ( FormFeature : : MoveToNext ) ;
}
else // backward
{
if ( m_xFormOperations . is ( ) & & m_xFormOperations - > isEnabled ( FormFeature : : MoveToPrevious ) )
m_xFormOperations - > execute ( FormFeature : : MoveToPrevious ) ;
}
2004-04-13 10:05:48 +00:00
}
2009-10-30 11:38:26 +01:00
catch ( const Exception & )
2004-04-13 10:05:48 +00:00
{
2009-10-30 11:38:26 +01:00
// don't handle this any further. That's an ... admissible error.
DBG_UNHANDLED_EXCEPTION ( ) ;
2004-04-13 10:05:48 +00:00
}
2000-09-18 16:07:07 +00:00
}
}
// Immer noch ein und dasselbe Control
2009-10-30 11:38:26 +01:00
if ( ( m_xActiveControl = = xControl )
& & ( xControl = = m_xCurrentControl )
2001-05-29 13:15:08 +00:00
)
2000-09-18 16:07:07 +00:00
{
DBG_ASSERT ( m_xCurrentControl . is ( ) , " Kein CurrentControl selektiert " ) ;
return ;
}
sal_Bool bActivated = ! m_xActiveControl . is ( ) & & xControl . is ( ) ;
m_xActiveControl = xControl ;
2008-12-01 12:31:27 +00:00
2008-08-19 08:47:45 +00:00
implSetCurrentControl ( xControl ) ;
2008-12-01 12:31:27 +00:00
OSL_POSTCOND ( m_xCurrentControl . is ( ) , " implSetCurrentControl did nonsense! " ) ;
2000-09-18 16:07:07 +00:00
2008-12-01 12:31:27 +00:00
if ( bActivated )
{
// (asynchronously) call activation handlers
m_aActivationEvent . Call ( ) ;
2000-09-18 16:07:07 +00:00
2008-12-01 12:31:27 +00:00
// call modify listeners
if ( m_bModified )
m_aModifyListeners . notifyEach ( & XModifyListener : : modified , EventObject ( * this ) ) ;
}
2000-09-18 16:07:07 +00:00
2004-04-13 10:05:48 +00:00
// invalidate all features which depend on the currently focused control
2009-10-16 21:06:14 +02:00
if ( m_bDBConnection & & ! m_bFiltering )
2008-08-19 08:47:45 +00:00
implInvalidateCurrentControlDependentFeatures ( ) ;
2000-09-18 16:07:07 +00:00
2009-10-23 16:03:52 +02:00
if ( ! m_xCurrentControl . is ( ) )
return ;
// Control erhaelt Focus, dann eventuell in den sichtbaren Bereich
Reference < XFormControllerContext > xContext ( m_xContext ) ;
Reference < XControl > xCurrentControl ( m_xCurrentControl ) ;
aGuard . clear ( ) ;
// <-- SYNCHRONIZED
if ( xContext . is ( ) )
xContext - > makeVisible ( xCurrentControl ) ;
2000-09-18 16:07:07 +00:00
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
IMPL_LINK ( FormController , OnActivated , void * , /**/ )
2000-09-18 16:07:07 +00:00
{
2008-12-01 12:31:27 +00:00
EventObject aEvent ;
aEvent . Source = * this ;
m_aActivateListeners . notifyEach ( & XFormControllerListener : : formActivated , aEvent ) ;
2000-09-18 16:07:07 +00:00
2008-12-01 12:31:27 +00:00
return 0L ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
IMPL_LINK ( FormController , OnDeactivated , void * , /**/ )
2008-12-01 12:31:27 +00:00
{
EventObject aEvent ;
aEvent . Source = * this ;
m_aActivateListeners . notifyEach ( & XFormControllerListener : : formDeactivated , aEvent ) ;
return 0L ;
2000-09-18 16:07:07 +00:00
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : focusLost ( const FocusEvent & e ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
2004-07-05 14:50:20 +00:00
m_pControlBorderManager - > focusLost ( e . Source ) ;
2004-04-13 10:05:48 +00:00
Reference < XControl > xControl ( e . Source , UNO_QUERY ) ;
Reference < XWindowPeer > xNext ( e . NextFocus , UNO_QUERY ) ;
Reference < XControl > xNextControl = isInList ( xNext ) ;
2000-09-18 16:07:07 +00:00
if ( ! xNextControl . is ( ) )
{
m_xActiveControl = NULL ;
2008-12-01 12:31:27 +00:00
m_aDeactivationEvent . Call ( ) ;
2000-09-18 16:07:07 +00:00
}
}
2004-07-05 14:50:20 +00:00
//--------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : mousePressed ( const awt : : MouseEvent & /*_rEvent*/ ) throw ( RuntimeException )
2004-07-05 14:50:20 +00:00
{
// not interested in
}
//--------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : mouseReleased ( const awt : : MouseEvent & /*_rEvent*/ ) throw ( RuntimeException )
2004-07-05 14:50:20 +00:00
{
// not interested in
}
//--------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : mouseEntered ( const awt : : MouseEvent & _rEvent ) throw ( RuntimeException )
2004-07-05 14:50:20 +00:00
{
m_pControlBorderManager - > mouseEntered ( _rEvent . Source ) ;
}
//--------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : mouseExited ( const awt : : MouseEvent & _rEvent ) throw ( RuntimeException )
2004-07-05 14:50:20 +00:00
{
m_pControlBorderManager - > mouseExited ( _rEvent . Source ) ;
}
2004-11-16 10:22:40 +00:00
//--------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : componentValidityChanged ( const EventObject & _rSource ) throw ( RuntimeException )
2004-11-16 10:22:40 +00:00
{
Reference < XControl > xControl ( findControl ( m_aControls , Reference < XControlModel > ( _rSource . Source , UNO_QUERY ) , sal_False , sal_False ) ) ;
Reference < XValidatableFormComponent > xValidatable ( _rSource . Source , UNO_QUERY ) ;
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( xControl . is ( ) & & xValidatable . is ( ) , " FormController::componentValidityChanged: huh? " ) ;
2004-11-16 10:22:40 +00:00
if ( xControl . is ( ) & & xValidatable . is ( ) )
m_pControlBorderManager - > validityChanged ( xControl , xValidatable ) ;
}
//--------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : setModel ( const Reference < XTabControllerModel > & Model ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2009-10-29 11:59:44 +01:00
impl_checkDisposed_throw ( ) ;
2009-10-23 09:46:03 +02:00
DBG_ASSERT ( m_xTabController . is ( ) , " FormController::setModel : invalid aggregate ! " ) ;
2000-09-18 16:07:07 +00:00
2004-07-05 14:50:20 +00:00
try
2000-09-18 16:07:07 +00:00
{
2004-07-05 14:50:20 +00:00
// disconnect from the old model
if ( m_xModelAsIndex . is ( ) )
2000-09-18 16:07:07 +00:00
{
2004-07-05 14:50:20 +00:00
if ( m_bDBConnection )
{
// we are currently working on the model
EventObject aEvt ( m_xModelAsIndex ) ;
unloaded ( aEvt ) ;
}
2000-09-18 16:07:07 +00:00
2004-07-05 14:50:20 +00:00
Reference < XLoadable > xForm ( m_xModelAsIndex , UNO_QUERY ) ;
if ( xForm . is ( ) )
xForm - > removeLoadListener ( this ) ;
2000-09-18 16:07:07 +00:00
2004-07-05 14:50:20 +00:00
Reference < XSQLErrorBroadcaster > xBroadcaster ( m_xModelAsIndex , UNO_QUERY ) ;
if ( xBroadcaster . is ( ) )
xBroadcaster - > removeSQLErrorListener ( this ) ;
2000-09-18 16:07:07 +00:00
2004-07-05 14:50:20 +00:00
Reference < XDatabaseParameterBroadcaster > xParamBroadcaster ( m_xModelAsIndex , UNO_QUERY ) ;
if ( xParamBroadcaster . is ( ) )
xParamBroadcaster - > removeParameterListener ( this ) ;
2009-10-30 11:38:26 +01:00
2004-07-05 14:50:20 +00:00
}
2000-09-18 16:07:07 +00:00
2005-01-21 15:56:33 +00:00
disposeAllFeaturesAndDispatchers ( ) ;
2004-04-13 10:05:48 +00:00
2009-10-30 11:38:26 +01:00
if ( m_xFormOperations . is ( ) )
m_xFormOperations - > dispose ( ) ;
m_xFormOperations . clear ( ) ;
2004-07-05 14:50:20 +00:00
// set the new model wait for the load event
if ( m_xTabController . is ( ) )
m_xTabController - > setModel ( Model ) ;
m_xModelAsIndex = Reference < XIndexAccess > ( Model , UNO_QUERY ) ;
m_xModelAsManager = Reference < XEventAttacherManager > ( Model , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
2004-07-05 14:50:20 +00:00
// only if both ifaces exit, the controller will work successful
if ( ! m_xModelAsIndex . is ( ) | | ! m_xModelAsManager . is ( ) )
{
m_xModelAsManager = NULL ;
m_xModelAsIndex = NULL ;
}
2000-09-18 16:07:07 +00:00
2004-07-05 14:50:20 +00:00
if ( m_xModelAsIndex . is ( ) )
{
2009-10-30 11:38:26 +01:00
// re-create m_xFormOperations
m_xFormOperations . set ( FormOperations : : createWithFormController ( m_aContext . getUNOContext ( ) , this ) , UNO_SET_THROW ) ;
m_xFormOperations - > setFeatureInvalidation ( this ) ;
2004-04-13 10:05:48 +00:00
2004-07-05 14:50:20 +00:00
// adding load and ui interaction listeners
Reference < XLoadable > xForm ( Model , UNO_QUERY ) ;
if ( xForm . is ( ) )
xForm - > addLoadListener ( this ) ;
2000-09-18 16:07:07 +00:00
2004-07-05 14:50:20 +00:00
Reference < XSQLErrorBroadcaster > xBroadcaster ( Model , UNO_QUERY ) ;
if ( xBroadcaster . is ( ) )
xBroadcaster - > addSQLErrorListener ( this ) ;
2000-09-18 16:07:07 +00:00
2004-07-05 14:50:20 +00:00
Reference < XDatabaseParameterBroadcaster > xParamBroadcaster ( Model , UNO_QUERY ) ;
if ( xParamBroadcaster . is ( ) )
xParamBroadcaster - > addParameterListener ( this ) ;
2000-09-18 16:07:07 +00:00
2004-07-05 14:50:20 +00:00
// well, is the database already loaded?
// then we have to simulate a load event
Reference < XLoadable > xCursor ( m_xModelAsIndex , UNO_QUERY ) ;
if ( xCursor . is ( ) & & xCursor - > isLoaded ( ) )
{
EventObject aEvt ( xCursor ) ;
loaded ( aEvt ) ;
}
Reference < XPropertySet > xModelProps ( m_xModelAsIndex , UNO_QUERY ) ;
Reference < XPropertySetInfo > xPropInfo ( xModelProps - > getPropertySetInfo ( ) ) ;
if ( xPropInfo . is ( )
2007-07-06 06:36:06 +00:00
& & xPropInfo - > hasPropertyByName ( FM_PROP_DYNAMIC_CONTROL_BORDER )
& & xPropInfo - > hasPropertyByName ( FM_PROP_CONTROL_BORDER_COLOR_FOCUS )
& & xPropInfo - > hasPropertyByName ( FM_PROP_CONTROL_BORDER_COLOR_MOUSE )
& & xPropInfo - > hasPropertyByName ( FM_PROP_CONTROL_BORDER_COLOR_INVALID )
2004-07-05 14:50:20 +00:00
)
{
bool bEnableDynamicControlBorder = lcl_shouldUseDynamicControlBorder (
xModelProps . get ( ) , xModelProps - > getPropertyValue ( FM_PROP_DYNAMIC_CONTROL_BORDER ) ) ;
if ( bEnableDynamicControlBorder )
m_pControlBorderManager - > enableDynamicBorderColor ( ) ;
else
m_pControlBorderManager - > disableDynamicBorderColor ( ) ;
sal_Int32 nColor = 0 ;
if ( xModelProps - > getPropertyValue ( FM_PROP_CONTROL_BORDER_COLOR_FOCUS ) > > = nColor )
m_pControlBorderManager - > setStatusColor ( CONTROL_STATUS_FOCUSED , nColor ) ;
if ( xModelProps - > getPropertyValue ( FM_PROP_CONTROL_BORDER_COLOR_MOUSE ) > > = nColor )
m_pControlBorderManager - > setStatusColor ( CONTROL_STATUS_MOUSE_HOVER , nColor ) ;
2004-11-16 10:22:40 +00:00
if ( xModelProps - > getPropertyValue ( FM_PROP_CONTROL_BORDER_COLOR_INVALID ) > > = nColor )
m_pControlBorderManager - > setStatusColor ( CONTROL_STATUS_INVALID , nColor ) ;
2004-07-05 14:50:20 +00:00
}
2000-09-18 16:07:07 +00:00
}
}
2004-07-05 14:50:20 +00:00
catch ( const Exception & )
{
2009-10-23 16:03:52 +02:00
DBG_UNHANDLED_EXCEPTION ( ) ;
2004-07-05 14:50:20 +00:00
}
2000-09-18 16:07:07 +00:00
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
Reference < XTabControllerModel > FormController : : getModel ( ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2009-10-29 11:59:44 +01:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
impl_checkDisposed_throw ( ) ;
2009-10-23 09:46:03 +02:00
DBG_ASSERT ( m_xTabController . is ( ) , " FormController::getModel : invalid aggregate ! " ) ;
2000-09-18 16:07:07 +00:00
if ( ! m_xTabController . is ( ) )
2004-04-13 10:05:48 +00:00
return Reference < XTabControllerModel > ( ) ;
2000-09-18 16:07:07 +00:00
return m_xTabController - > getModel ( ) ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : addToEventAttacher ( const Reference < XControl > & xControl )
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
OSL_ENSURE ( xControl . is ( ) , " FormController::addToEventAttacher: invalid control - how did you reach this? " ) ;
2006-01-19 14:39:43 +00:00
if ( ! xControl . is ( ) )
return ; /* throw IllegalArgumentException(); */
2000-09-18 16:07:07 +00:00
// anmelden beim Eventattacher
2004-04-13 10:05:48 +00:00
Reference < XFormComponent > xComp ( xControl - > getModel ( ) , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
if ( xComp . is ( ) & & m_xModelAsIndex . is ( ) )
{
// Und die Position des ControlModel darin suchen
sal_uInt32 nPos = m_xModelAsIndex - > getCount ( ) ;
2004-04-13 10:05:48 +00:00
Reference < XFormComponent > xTemp ;
2000-09-18 16:07:07 +00:00
for ( ; nPos ; )
{
2000-11-07 12:16:50 +00:00
m_xModelAsIndex - > getByIndex ( - - nPos ) > > = xTemp ;
2004-04-13 10:05:48 +00:00
if ( ( XFormComponent * ) xComp . get ( ) = = ( XFormComponent * ) xTemp . get ( ) )
2000-09-18 16:07:07 +00:00
{
Reference < XInterface > xIfc ( xControl , UNO_QUERY ) ;
m_xModelAsManager - > attach ( nPos , xIfc , makeAny ( xControl ) ) ;
break ;
}
}
}
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : removeFromEventAttacher ( const Reference < XControl > & xControl )
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
OSL_ENSURE ( xControl . is ( ) , " FormController::removeFromEventAttacher: invalid control - how did you reach this? " ) ;
2006-01-19 14:39:43 +00:00
if ( ! xControl . is ( ) )
return ; /* throw IllegalArgumentException(); */
2000-09-18 16:07:07 +00:00
// abmelden beim Eventattacher
2004-04-13 10:05:48 +00:00
Reference < XFormComponent > xComp ( xControl - > getModel ( ) , UNO_QUERY ) ;
2003-03-27 14:06:05 +00:00
if ( xComp . is ( ) & & m_xModelAsIndex . is ( ) )
2000-09-18 16:07:07 +00:00
{
// Und die Position des ControlModel darin suchen
sal_uInt32 nPos = m_xModelAsIndex - > getCount ( ) ;
2004-04-13 10:05:48 +00:00
Reference < XFormComponent > xTemp ;
2000-09-18 16:07:07 +00:00
for ( ; nPos ; )
{
2000-11-07 12:16:50 +00:00
m_xModelAsIndex - > getByIndex ( - - nPos ) > > = xTemp ;
2004-04-13 10:05:48 +00:00
if ( ( XFormComponent * ) xComp . get ( ) = = ( XFormComponent * ) xTemp . get ( ) )
2000-09-18 16:07:07 +00:00
{
Reference < XInterface > xIfc ( xControl , UNO_QUERY ) ;
m_xModelAsManager - > detach ( nPos , xIfc ) ;
break ;
}
}
}
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : setContainer ( const Reference < XControlContainer > & xContainer ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
2004-04-13 10:05:48 +00:00
Reference < XTabControllerModel > xTabModel ( getModel ( ) ) ;
2000-09-18 16:07:07 +00:00
DBG_ASSERT ( xTabModel . is ( ) | | ! xContainer . is ( ) , " No Model defined " ) ;
// if we have a new container we need a model
2009-10-23 09:46:03 +02:00
DBG_ASSERT ( m_xTabController . is ( ) , " FormController::setContainer : invalid aggregate ! " ) ;
2000-09-18 16:07:07 +00:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2004-04-13 10:05:48 +00:00
Reference < XContainer > xCurrentContainer ;
2000-09-18 16:07:07 +00:00
if ( m_xTabController . is ( ) )
2004-04-13 10:05:48 +00:00
xCurrentContainer = Reference < XContainer > ( m_xTabController - > getContainer ( ) , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
if ( xCurrentContainer . is ( ) )
{
xCurrentContainer - > removeContainerListener ( this ) ;
2004-04-13 10:05:48 +00:00
if ( m_aTabActivationTimer . IsActive ( ) )
m_aTabActivationTimer . Stop ( ) ;
2000-09-18 16:07:07 +00:00
// clear the filter map
2009-10-29 15:55:37 +01:00
: : std : : for_each ( m_aFilterComponents . begin ( ) , m_aFilterComponents . end ( ) , RemoveComponentTextListener ( this ) ) ;
m_aFilterComponents . clear ( ) ;
2000-09-18 16:07:07 +00:00
// einsammeln der Controls
2004-11-16 10:22:40 +00:00
const Reference < XControl > * pControls = m_aControls . getConstArray ( ) ;
const Reference < XControl > * pControlsEnd = pControls + m_aControls . getLength ( ) ;
while ( pControls ! = pControlsEnd )
implControlRemoved ( * pControls + + , true ) ;
2000-09-18 16:07:07 +00:00
// Datenbank spezifische Dinge vornehmen
if ( m_bDBConnection & & isListeningForChanges ( ) )
stopListening ( ) ;
2004-05-10 12:13:52 +00:00
m_aControls . realloc ( 0 ) ;
2000-09-18 16:07:07 +00:00
}
if ( m_xTabController . is ( ) )
m_xTabController - > setContainer ( xContainer ) ;
// Welche Controls gehoeren zum Container ?
if ( xContainer . is ( ) & & xTabModel . is ( ) )
{
2004-04-13 10:05:48 +00:00
Sequence < Reference < XControlModel > > aModels = xTabModel - > getControlModels ( ) ;
const Reference < XControlModel > * pModels = aModels . getConstArray ( ) ;
2004-11-16 10:22:40 +00:00
Sequence < Reference < XControl > > aAllControls = xContainer - > getControls ( ) ;
2000-09-18 16:07:07 +00:00
sal_Int32 nCount = aModels . getLength ( ) ;
2004-04-13 10:05:48 +00:00
m_aControls = Sequence < Reference < XControl > > ( nCount ) ;
Reference < XControl > * pControls = m_aControls . getArray ( ) ;
2000-09-18 16:07:07 +00:00
// einsammeln der Controls
sal_Int32 i , j ;
2004-11-16 10:22:40 +00:00
for ( i = 0 , j = 0 ; i < nCount ; + + i , + + pModels )
2000-09-18 16:07:07 +00:00
{
2004-11-16 10:22:40 +00:00
Reference < XControl > xControl = findControl ( aAllControls , * pModels , sal_False , sal_True ) ;
if ( xControl . is ( ) )
2000-09-18 16:07:07 +00:00
{
2004-11-16 10:22:40 +00:00
pControls [ j + + ] = xControl ;
implControlInserted ( xControl , true ) ;
2000-09-18 16:07:07 +00:00
}
}
2004-05-10 12:13:52 +00:00
// not every model had an associated control
2000-09-18 16:07:07 +00:00
if ( j ! = i )
m_aControls . realloc ( j ) ;
// am Container horchen
2004-04-13 10:05:48 +00:00
Reference < XContainer > xNewContainer ( xContainer , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
if ( xNewContainer . is ( ) )
xNewContainer - > addContainerListener ( this ) ;
// Datenbank spezifische Dinge vornehmen
if ( m_bDBConnection )
{
m_bLocked = determineLockState ( ) ;
setLocks ( ) ;
if ( ! isLocked ( ) )
startListening ( ) ;
}
}
// befinden sich die Controls in der richtigen Reihenfolge
m_bControlsSorted = sal_True ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
Reference < XControlContainer > FormController : : getContainer ( ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2003-05-19 11:51:00 +00:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2009-10-29 11:59:44 +01:00
impl_checkDisposed_throw ( ) ;
2009-10-23 09:46:03 +02:00
DBG_ASSERT ( m_xTabController . is ( ) , " FormController::getContainer : invalid aggregate ! " ) ;
2000-09-18 16:07:07 +00:00
if ( ! m_xTabController . is ( ) )
2004-04-13 10:05:48 +00:00
return Reference < XControlContainer > ( ) ;
2000-09-18 16:07:07 +00:00
return m_xTabController - > getContainer ( ) ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
Sequence < Reference < XControl > > FormController : : getControls ( void ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2009-10-29 11:59:44 +01:00
impl_checkDisposed_throw ( ) ;
2000-09-18 16:07:07 +00:00
if ( ! m_bControlsSorted )
{
2004-04-13 10:05:48 +00:00
Reference < XTabControllerModel > xModel = getModel ( ) ;
2000-09-18 16:07:07 +00:00
if ( ! xModel . is ( ) )
return m_aControls ;
2004-04-13 10:05:48 +00:00
Sequence < Reference < XControlModel > > aControlModels = xModel - > getControlModels ( ) ;
const Reference < XControlModel > * pModels = aControlModels . getConstArray ( ) ;
2000-09-18 16:07:07 +00:00
sal_Int32 nModels = aControlModels . getLength ( ) ;
2004-04-13 10:05:48 +00:00
Sequence < Reference < XControl > > aNewControls ( nModels ) ;
2000-09-18 16:07:07 +00:00
2004-04-13 10:05:48 +00:00
Reference < XControl > * pControls = aNewControls . getArray ( ) ;
2004-11-16 10:22:40 +00:00
Reference < XControl > xControl ;
2000-09-18 16:07:07 +00:00
// Umsortieren der Controls entsprechend der TabReihenfolge
2004-05-12 12:25:29 +00:00
sal_Int32 j = 0 ;
2004-11-16 10:22:40 +00:00
for ( sal_Int32 i = 0 ; i < nModels ; + + i , + + pModels )
2000-09-18 16:07:07 +00:00
{
2004-11-16 10:22:40 +00:00
xControl = findControl ( m_aControls , * pModels , sal_True , sal_True ) ;
if ( xControl . is ( ) )
pControls [ j + + ] = xControl ;
2000-09-18 16:07:07 +00:00
}
2004-05-10 12:13:52 +00:00
// not every model had an associated control
if ( j ! = nModels )
aNewControls . realloc ( j ) ;
2000-09-18 16:07:07 +00:00
m_aControls = aNewControls ;
m_bControlsSorted = sal_True ;
}
return m_aControls ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : autoTabOrder ( ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2009-10-29 11:59:44 +01:00
impl_checkDisposed_throw ( ) ;
2009-10-23 09:46:03 +02:00
DBG_ASSERT ( m_xTabController . is ( ) , " FormController::autoTabOrder : invalid aggregate ! " ) ;
2000-09-18 16:07:07 +00:00
if ( m_xTabController . is ( ) )
m_xTabController - > autoTabOrder ( ) ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : activateTabOrder ( ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2009-10-29 11:59:44 +01:00
impl_checkDisposed_throw ( ) ;
2009-10-23 09:46:03 +02:00
DBG_ASSERT ( m_xTabController . is ( ) , " FormController::activateTabOrder : invalid aggregate ! " ) ;
2000-09-18 16:07:07 +00:00
if ( m_xTabController . is ( ) )
m_xTabController - > activateTabOrder ( ) ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : setControlLock ( const Reference < XControl > & xControl )
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
2000-09-18 16:07:07 +00:00
sal_Bool bLocked = isLocked ( ) ;
// es wird gelockt
// a.) wenn der ganze Datensatz gesperrt ist
// b.) wenn das zugehoerige Feld gespeert ist
2004-04-13 10:05:48 +00:00
Reference < XBoundControl > xBound ( xControl , UNO_QUERY ) ;
2009-04-01 13:20:55 +00:00
if ( xBound . is ( ) & & ( ( ( bLocked & & bLocked ! = xBound - > getLock ( ) ) | |
2000-09-18 16:07:07 +00:00
! bLocked ) ) ) // beim entlocken immer einzelne Felder ueberpr<70> fen
{
// gibt es eine Datenquelle
2000-11-06 06:19:53 +00:00
Reference < XPropertySet > xSet ( xControl - > getModel ( ) , UNO_QUERY ) ;
2000-10-20 13:18:57 +00:00
if ( xSet . is ( ) & & : : comphelper : : hasProperty ( FM_PROP_BOUNDFIELD , xSet ) )
2000-09-18 16:07:07 +00:00
{
// wie sieht mit den Properties ReadOnly und Enable aus
sal_Bool bTouch = sal_True ;
2000-10-20 13:18:57 +00:00
if ( : : comphelper : : hasProperty ( FM_PROP_ENABLED , xSet ) )
bTouch = : : comphelper : : getBOOL ( xSet - > getPropertyValue ( FM_PROP_ENABLED ) ) ;
if ( : : comphelper : : hasProperty ( FM_PROP_READONLY , xSet ) )
bTouch = ! : : comphelper : : getBOOL ( xSet - > getPropertyValue ( FM_PROP_READONLY ) ) ;
2000-09-18 16:07:07 +00:00
if ( bTouch )
{
2000-11-07 12:16:50 +00:00
Reference < XPropertySet > xField ;
xSet - > getPropertyValue ( FM_PROP_BOUNDFIELD ) > > = xField ;
2000-09-18 16:07:07 +00:00
if ( xField . is ( ) )
{
if ( bLocked )
xBound - > setLock ( bLocked ) ;
else
{
try
{
Any aVal = xField - > getPropertyValue ( FM_PROP_ISREADONLY ) ;
2000-10-20 13:18:57 +00:00
if ( aVal . hasValue ( ) & & : : comphelper : : getBOOL ( aVal ) )
2000-09-18 16:07:07 +00:00
xBound - > setLock ( sal_True ) ;
else
xBound - > setLock ( bLocked ) ;
}
2009-10-23 09:46:03 +02:00
catch ( const Exception & )
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
DBG_UNHANDLED_EXCEPTION ( ) ;
2000-09-18 16:07:07 +00:00
}
}
}
}
}
}
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : setLocks ( )
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
2000-09-18 16:07:07 +00:00
// alle Controls, die mit einer Datenquelle verbunden sind locken/unlocken
2004-11-16 10:22:40 +00:00
const Reference < XControl > * pControls = m_aControls . getConstArray ( ) ;
const Reference < XControl > * pControlsEnd = pControls + m_aControls . getLength ( ) ;
while ( pControls ! = pControlsEnd )
setControlLock ( * pControls + + ) ;
2000-09-18 16:07:07 +00:00
}
//------------------------------------------------------------------------------
2004-11-16 10:22:40 +00:00
namespace
2000-09-18 16:07:07 +00:00
{
2004-11-16 10:22:40 +00:00
bool lcl_shouldListenForModifications ( const Reference < XControl > & _rxControl , const Reference < XPropertyChangeListener > & _rxBoundFieldListener )
2000-09-18 16:07:07 +00:00
{
2004-11-16 10:22:40 +00:00
bool bShould = false ;
2000-09-18 16:07:07 +00:00
2004-11-16 10:22:40 +00:00
Reference < XBoundComponent > xBound ( _rxControl , UNO_QUERY ) ;
if ( xBound . is ( ) )
2000-09-18 16:07:07 +00:00
{
2004-11-16 10:22:40 +00:00
bShould = true ;
2000-09-18 16:07:07 +00:00
}
2004-11-16 10:22:40 +00:00
else if ( _rxControl . is ( ) )
{
CWS-TOOLING: integrate CWS dba32a
2009-04-16 13:08:19 +0200 oj r270882 : #i14538# set property at control
2009-04-16 13:04:28 +0200 oj r270881 : #i98557# remove binary string for SRB
2009-04-15 13:19:10 +0200 oj r270838 : #i96782# use type set at view
2009-04-14 14:53:20 +0200 oj r270778 : #i96782# set initialize size for custom shape
2009-04-06 14:19:14 +0200 oj r270546 : #i88432# correct pos when < 0 while resizing
2009-04-06 13:36:13 +0200 oj r270541 : #i96782# handle toolbar and menubar differently
2009-04-06 13:33:54 +0200 oj r270540 : #i96782# handle toolbar and menubar differently
2009-04-06 12:28:23 +0200 oj r270534 : #i96782# handle toolbar and menubar differently
2009-04-06 12:27:44 +0200 oj r270533 : #i96782# handle toolbar and menubar differently
2009-04-06 12:24:32 +0200 oj r270532 : #i96782# handle toolbar and menubar differently
2009-04-06 12:15:15 +0200 oj r270531 : do not initialze when field is empty
2009-04-06 10:06:08 +0200 oj r270528 : #i96782# clean up of menubar and remove duplicates
2009-04-06 09:47:49 +0200 oj r270527 : #i96519# adjust help text dynamic
2009-04-03 13:43:20 +0200 oj r270482 : do not need to remove section from observer they are already disposed
2009-04-03 13:27:28 +0200 fs r270479 : #i97356#
2009-04-02 11:30:39 +0200 fs r270386 : UNX line ends
2009-04-02 10:54:51 +0200 fs r270379 : UNX line ends
2009-04-02 10:39:57 +0200 fs r270378 : UNX line ends
2009-04-02 10:37:24 +0200 fs r270377 : why did this survive the rebase? was removed on trunk ...
2009-03-31 13:31:12 +0200 fs r270277 : component_foo should be public
2009-03-28 00:21:01 +0100 fs r270176 : manuallly merged the changes which happened in CWS before resync to m45, where the directory had been moved from reportdesign/registry to reportbuilder/registry
2009-03-27 23:01:20 +0100 fs r270174 : CWS-TOOLING: rebase CWS dba32a to trunk@270033 (milestone: DEV300:m45)
2009-03-11 12:23:35 +0100 fs r269310 : #i99958# ensure the ControlModelLock doesn't release twice
2009-03-06 09:07:32 +0100 fs r268970 : ignore output paths in SVN's status
2009-03-06 09:07:08 +0100 fs r268969 : ignore output paths in SVN's status
2009-03-04 11:28:02 +0100 oj r268800 : copy and paste error, check correct end now
2009-03-03 15:49:11 +0100 fs r268736 : #i10000# those merges were lost during the rebase (m38->m42)
2009-03-03 13:25:27 +0100 lla r268720 : #i99652# fix wrong refactoring
2009-02-27 11:12:56 +0100 fs r268566 : beautified
2009-02-27 10:53:47 +0100 fs r268561 : doFormListening(false) only when actually isFormListening() (found during complex test case XMLFormSettings with assertions)
2009-02-26 20:55:31 +0100 fs r268546 : #i96530# set the Label property of the bound control, if we didn't create a dedicated label control
2009-02-26 11:53:09 +0100 fs r268494 : #i10000#
2009-02-26 11:27:50 +0100 fs r268493 : #i10000#
2009-02-26 11:17:08 +0100 fs r268490 : reportdesign depends on REPORTBUILDER, not REPORTDESIGN
2009-02-25 11:39:48 +0100 fs r268422 : #i10000# post-resync: INFO_ESCAPE_DATETIME got lost during rebase
2009-02-24 23:24:10 +0100 fs r268411 : CWS-TOOLING: rebase CWS dba32a to trunk@268395 (milestone: DEV300:m42)
2009-02-20 15:09:48 +0100 fs r268324 : respect ImplicitCatalog/SchemaRestriction in all necessary places
2009-02-20 13:48:10 +0100 oj r268318 : order of initialize corrected
2009-02-14 15:07:52 +0100 fs r267759 : #i98975# when an image does not have a bitmap, but a text, draw this (as placeholder)
2009-02-14 15:02:40 +0100 fs r267758 : consolidated and removed some duplicate code
2009-02-14 13:52:23 +0100 fs r267756 : #i10000#
2009-02-13 22:08:34 +0100 fs r267750 : #i100000#
2009-02-13 22:07:25 +0100 fs r267749 : #i10000#
2009-02-13 21:55:36 +0100 fs r267747 : #i10000#
2009-02-13 21:54:27 +0100 fs r267746 : use const_cast
2009-02-13 21:29:10 +0100 fs r267745 : #i10000#
2009-02-13 21:27:39 +0100 fs r267744 : #i10000#
2009-02-13 20:59:13 +0100 fs r267742 : #i10000#
2009-02-13 13:21:30 +0100 fs r267717 : better diagnostics
2009-02-13 13:17:24 +0100 fs r267715 : #i58313# support Catalog/SchemaRestriction settings, which are applied in getTables when 'all catalogs/schemas' are to be retrieved
2009-02-13 13:16:14 +0100 fs r267714 : filter out some more known global settings
2009-02-13 12:39:43 +0100 fs r267713 : #i58313# ImplicitCatalog/SchemaRestriction
2009-02-13 12:36:50 +0100 fs r267712 : when exporting data source settings, allow for properties which have a VOID default value, but are currently not VOID
2009-02-13 12:35:57 +0100 fs r267711 : implement XSet, to allow inserting properties which have a default value of VOID
2009-02-13 12:35:03 +0100 fs r267710 : +addVoidProperty
2009-02-13 10:20:08 +0100 fs r267697 : removed unused variable
2009-02-13 09:46:46 +0100 fs r267695 : refactored the table filtering code, to have a better base for introducing additional low level filters
2009-02-10 09:23:07 +0100 lla r267537 : #i10000# wrong line feed, double named variable
2009-02-09 12:13:08 +0100 oj r267508 : #i98605# notify hanlder
2009-02-09 11:50:34 +0100 oj r267507 : #i98926# solve refcount problem
2009-02-09 11:50:05 +0100 oj r267506 : #i98971# fix for simple html
2009-02-09 11:49:24 +0100 oj r267505 : #i98971# fix for simple html
2009-02-09 11:47:27 +0100 oj r267504 : invoke on copy
2009-02-09 09:51:00 +0100 fs r267500 : #i98316#
2009-02-09 09:46:10 +0100 fs r267499 : setCurrentSelection: don't reset the current form when we de-select everything
2009-02-09 09:43:45 +0100 fs r267498 : #i98316#
2009-02-08 21:25:18 +0100 fs r267496 : #i98272# introduce late ctor for cloning
2009-02-07 21:08:39 +0100 fs r267485 : #i98272# when copy-constructing a FmFormPageImpl, use the XCloneable of the forms collection, instead of XPersistObject (which is incompletely implemented)
2009-02-07 21:07:26 +0100 fs r267484 : removed obsolete include guards
2009-02-07 21:05:22 +0100 fs r267483 : #i98272# implement XCloneable
2009-02-06 15:02:48 +0100 lla r267467 : #i96523# add XImageControl
2009-02-06 14:41:38 +0100 oj r267463 : #i98926# late init when connection disposed but only when asked for
2009-02-06 13:49:57 +0100 lla r267457 : #i92860# bigint in forms doesn't allow input of values > 1, fixed
2009-02-06 13:03:55 +0100 oj r267455 : ImageScaleMode
2009-02-05 14:48:19 +0100 lla r267424 : #i89335# dropdown listboxes are 14 instead of 7 lines high
2009-02-05 13:40:00 +0100 oj r267423 : #i96945# insert new prop Opaque
2009-02-05 13:39:19 +0100 oj r267422 : #i96945# insert layer handling for hell and heaven
2009-02-05 13:29:32 +0100 lla r267420 : #i89335# add is null, is not null, is not like filter condition
2009-02-04 12:23:02 +0100 oj r267364 : #i98821# load table font settings
2009-02-04 10:05:27 +0100 oj r267351 : #i98821# load table font settings
2009-02-04 09:23:22 +0100 fs r267350 : checking persistency of UI settings in database documents - for the moment, capture table formattings (which is issue 98821)
2009-02-04 09:22:15 +0100 fs r267349 : moved some methods which are of wider interest from DatabaseDocument to FileHelper resp. TestCase
2009-02-04 08:56:27 +0100 oj r267347 : #i97586# UcbStreamHelper::CreateStream doesn't check all streamModes use different method
2009-02-04 08:23:26 +0100 oj r267346 : #i98701# check key size is >= 3 and some redesign
2009-02-03 23:29:24 +0100 fs r267345 : return the component (controller), not the frame
2009-02-03 23:28:53 +0100 fs r267344 : openExisting returns a controller now, not the frame (this was a bug)
2009-02-03 23:28:25 +0100 fs r267343 : openElement: properly return the component in the table/query case
2009-02-02 12:48:17 +0100 oj r267261 : #i96013# fix for relative path
2009-02-02 10:33:28 +0100 lla r267253 : #i98557# cleanups and consolidation
2009-02-02 09:37:23 +0100 lla r267250 : #i88432# resize will no longer move components to other sections
2009-02-02 09:08:24 +0100 oj r267245 : #i97475# write 0x1A at the end of the file
2009-01-30 19:39:20 +0100 lla r267230 : #i10000# unused parameters
2009-01-30 09:51:09 +0100 fs r267181 : onsolete
2009-01-30 09:49:27 +0100 fs r267180 : onsolete
2009-01-29 14:28:22 +0100 oj r267139 : #i96825# import cell style
2009-01-29 14:23:12 +0100 oj r267137 : #i98601# export imagescalehandler
2009-01-29 14:19:57 +0100 lla r267135 : #i98601# add ImageScaleMode
2009-01-29 13:21:08 +0100 oj r267124 : #i98601# impl ScaleMode
2009-01-29 13:20:56 +0100 oj r267123 : #i98601# impl ScaleMode
2009-01-29 08:46:40 +0100 oj r267095 : new property: ScaleMode
2009-01-29 08:45:23 +0100 oj r267094 : new ScaleMode from UnControlImageModel
2009-01-29 08:28:12 +0100 oj r267093 : #i87930# close all sub forms/reports when the desktop is going to be terminated and no db frame exists
2009-01-28 19:54:34 +0100 lla r267082 : #i98557# pictures in report wizard
2009-01-28 15:06:25 +0100 oj r267060 : #i87930# close all sub forms/reports when the desktop is going to be terminated and no db frame exists
2009-01-28 11:38:41 +0100 lla r267046 : #i76783# handle binary fields in forms
2009-01-28 09:24:43 +0100 lla r267025 : #i10000#
2009-01-28 08:40:04 +0100 fs r267024 : #i10000#
2009-01-28 08:04:43 +0100 oj r267023 : #i93456# use resource strings for function names
2009-01-27 13:26:05 +0100 oj r266988 : check data field is type field or expression
2009-01-27 13:07:17 +0100 oj r266985 : check data field length
2009-01-27 11:48:19 +0100 oj r266974 : #i96823# return dll string as column name when no alias exists
2009-01-27 09:53:11 +0100 fs r266958 : display the message of a caught exception
2009-01-27 09:44:13 +0100 fs r266957 : #i58313# when retrieving all tables, just set an empty table type filter - the connection will care for translating this, by respecting the TableTypeFilterMode setting
2009-01-27 09:36:09 +0100 fs r266956 : #i58313# getTables: per JDBC spec, is not a valid table type filter. Translate it to 'null'.
2009-01-26 11:24:49 +0100 lla r266912 : #i97865# cleanups (AddField viewable in remote mode)
2009-01-26 07:49:27 +0100 lla r266897 : #i97865# AddField opens in remote case
2009-01-26 07:48:58 +0100 lla r266896 : #i97865# AddField opens in remote case
2009-01-26 07:48:42 +0100 lla r266895 : #i97865# AddField opens in remote case
2009-01-23 15:04:40 +0100 fs r266825 : consolidate the usage of OSQLMessageBox with MessageType==Warning into OSQLWarningBox
2009-01-23 10:47:33 +0100 fs r266787 : +supportsUserAdministration
2009-01-23 10:47:11 +0100 fs r266784 : use DatabaseMetaData.supportsUserAdministration
2009-01-23 07:55:59 +0100 lla r266767 : #i10000# fix gcc compiler failures
2009-01-21 15:08:55 +0100 lla r266673 : #i97265# Labels in HC (IsDark) with other color (viewable)
2009-01-19 14:58:54 +0100 lla r266504 : #i96523# last problems with FormatKey and '0' values fixed
2009-01-19 14:58:00 +0100 lla r266503 : #i96519# AddField help text
2009-01-19 11:59:02 +0100 fs r266485 : #i96523# for formatted field models, init them with TreatAsNumber = false
2009-01-16 10:31:49 +0100 lla r266405 : #i96793# add shrink to popup menu
2009-01-16 09:21:44 +0100 lla r266401 : #i96519# AddField contains a help text
2009-01-15 11:21:49 +0100 lla r266357 : #i96523# problem with XVclWindowPeer not fixed now
2009-01-15 09:19:20 +0100 lla r266335 : #i96523# more crashes fixed.
2009-01-14 13:08:34 +0100 lla r266291 : #i96523# problems with crashes fixed
2009-01-13 10:54:24 +0100 lla r266199 : #i96523# show datasource in formattedfields new files
2009-01-13 10:52:39 +0100 lla r266198 : #i96523# show datasource in formattedfields
2009-01-13 09:41:50 +0100 lla r266197 : #i96526# handling none existance default.otr
2009-01-12 12:55:49 +0100 fs r266151 : don't expect the control model to be a BoundComponent before adding as modify listener
2009-01-12 12:51:33 +0100 fs r266149 : #i88458# let the ImageControl be an XModifyBroadcaster, so the forms runtime can notice when the user changes the control content while it does not have the focus
2009-01-09 13:41:22 +0100 fs r266080 : doc
2009-01-09 13:14:14 +0100 fs r266077 : #i97377# SetModified when order is changed via DnD
2009-01-07 09:55:40 +0100 oj r265951 : merge from master
2009-01-07 09:55:24 +0100 oj r265950 : removed observer
2009-01-07 09:55:06 +0100 oj r265949 : merge from master
2009-01-07 07:29:11 +0100 oj r265945 : shadow var changed
2009-01-06 07:25:57 +0100 oj r265893 : CWS-TOOLING: rebase CWS dba32a to trunk@265758 (milestone: DEV300:m38)
2009-01-05 13:18:22 +0100 oj r265865 : convert to unix le
2009-01-05 09:13:52 +0100 lla r265857 : #i79423# lc_ sc_ permutation fix
2009-01-02 19:40:59 +0100 lla r265847 : #i79423# section shrink icons
2008-12-22 11:37:57 +0100 lla r265749 : #i97484# move component to negative Y-position
2008-12-22 11:37:05 +0100 lla r265748 : #i97484# move component to negative Y-position
2008-12-22 11:35:33 +0100 lla r265747 : #i97484# move component to negative Y-position
2008-12-22 11:25:07 +0100 lla r265745 : #i96757# changes via property browser was not undoable
2008-12-18 15:10:38 +0100 fs r265694 : corrected an condition in doFormListening, which otherwise leads to uncommitable grid columns in documents which are loaded from disc (not in documents which are newly created)
2008-12-18 14:54:39 +0100 fs r265692 : Hide Columns text slightly changed
2008-12-18 13:44:15 +0100 fs r265683 : #i94068# properly display erros happening during a form operation - at least once, and at most once
2008-12-18 11:28:29 +0100 fs r265677 : document the new InputRequired property
2008-12-18 11:04:15 +0100 fs r265676 : #i96530# createControlLabelPair: don't actually create a label for a checkbox
2008-12-18 10:35:53 +0100 fs r265674 : #i95226# when a column is replaced, and it's the selected column, update the selection
2008-12-18 10:34:42 +0100 fs r265673 : #i95226# refactoring of the implReplaced method
2008-12-18 10:34:28 +0100 fs r265672 : #i95226# when replacing a grid column, update the property browser
2008-12-18 10:33:17 +0100 fs r265671 : when an element is removed, remove it from m_aCurrentSelection, too (if necessary)
2008-12-18 10:31:57 +0100 fs r265670 : Hide Columns text slightly changed
2008-12-18 10:15:56 +0100 lla r265669 : #i14538# do not allow to press finish button twice
2008-12-18 08:56:33 +0100 lla r265665 : #i10000# build depend=t problem hacked.
2008-12-17 20:59:10 +0100 fs r265656 : #i89821# don't let a MultiLineEdit select all text when it receives the focus
2008-12-17 12:10:54 +0100 fs r265594 : #i97356#
2008-12-17 12:06:29 +0100 fs r265593 : #i97355# Print -> Printable
2008-12-17 11:59:31 +0100 fs r265591 : #i97350# combo boxes comment on list selection (as list boxes already do)
2008-12-16 09:53:57 +0100 lla r265527 : #i96526# handling none existance default.otr
2008-12-15 14:48:39 +0100 lla r265500 : #i79423# reparing, was wrong implemented
2008-12-12 15:08:33 +0100 lla r265424 : #i10000# remove wrong carridge returns
2008-12-12 15:07:55 +0100 lla r265423 : #i10000# remove wrong carridge returns
2008-12-12 15:06:41 +0100 lla r265422 : #i10000# remove wrong carridge returns
2008-12-12 10:23:13 +0100 lla r265395 : #i95234# reset DragDelta
2008-12-12 10:11:02 +0100 lla r265393 : #i79423# pre versions of shrink buttons
2008-12-11 15:32:13 +0100 fs r265318 : prevent a deadlock during complex.dbaccess.DatabaseDocument test
2008-12-11 15:30:06 +0100 fs r265316 : prevent a deadlock during complex.dbaccess.DatabaseDocument test
2008-12-11 15:07:05 +0100 fs r265307 : removed superfluous text
2008-12-11 12:29:54 +0100 lla r265282 : #i96757# cleanup second try
2008-12-11 12:09:15 +0100 lla r265278 : #i96757# cleanup
2008-12-11 12:07:56 +0100 lla r265277 : #i95234#
2008-12-10 14:04:39 +0100 lla r265183 : #i93472# D&D fixes
2008-12-10 12:29:33 +0100 lla r265168 : #i94067# add (APP|SYS)FONT to XUnitConversion
2008-12-10 12:15:02 +0100 lla r265166 : #i94067# add APPFONT, SYSFONT to MeasureUnit
2008-12-10 11:52:10 +0100 lla r265163 : #i94067# add comments
2008-12-06 20:33:05 +0100 fs r264935 : #i10000# precompiled header
2008-12-05 09:29:26 +0100 fs r264889 : #i10000#
2008-12-05 09:07:31 +0100 fs r264888 : #i10000#
2008-12-04 13:25:46 +0100 fs r264838 : CWS-TOOLING: rebase CWS dba32a to trunk@264807 (milestone: DEV300:m37)
2008-12-03 23:49:13 +0100 fs r264808 : merge changes from trunk, to be able to do a rebase
2008-12-03 17:13:09 +0100 lla r264801 : #i91041# update documentation
2008-12-03 16:57:04 +0100 lla r264799 : #i94067# allow convert(Point|Size)ToLogic as pixel also
2008-12-02 12:36:32 +0100 lla r264687 : #i96782# bring toolbar objects to menu structure
2008-12-02 10:32:44 +0100 lla r264667 : #i86255# make property work
2008-12-02 09:22:47 +0100 lla r264659 : #i79423# add section shrink toolbar
2008-12-02 07:41:22 +0100 lla r264657 : #i86255# add check box for Escape DateTime property
2008-12-02 07:37:17 +0100 lla r264656 : #i79423# new shrink buttons
2008-11-26 11:55:28 +0100 fs r264362 : #i96541#
FillPropertySet: do not only catch UnknownPropertyException when setting the Char/ParaAutoStyleName,
but also care for the other exceptions which can be thrown by XPropertySet::setPropertyValue.
This is actually not the real fix for #i96541#, but only a follow-up. The root cause of the issue
was fixed in CWS dba301b, but this here was another (potential) bug which popped up during investigations.
2008-11-25 09:04:40 +0100 lla r264273 : #i82083# new toolbox in GroupsSorting dialog
2008-11-25 08:56:08 +0100 lla r264272 : #i94729# change token strings into string list, move class out of function
2008-11-24 15:52:22 +0100 fs r264251 : #i96532# do not set AppendTableAlias, NameLengthLimit, etc., if the OXMLDataSourceInstance is used for elements at which those attributes never appear
2008-11-24 15:51:45 +0100 fs r264249 : #i96532# do not set AppendTableAlias, NameLengthLimit, etc., if the OXMLDataSourceInstance is used for elements at which those attributes never appear
2008-11-24 15:45:21 +0100 fs r264244 : #i96532# the API default for ParamNameSubst is false
2008-11-24 15:45:04 +0100 fs r264243 : #i96532# do not set AppendTableAlias, NameLengthLimit, etc., if the OXMLDataSourceInstance is used for elements at which those attributes never appear
2008-11-24 15:44:14 +0100 fs r264241 : #i96532# slight refactoring of exporting properties which have a XML default different from the API default
2008-11-24 10:50:01 +0100 lla r264216 : #i82083# icons for new toolbox
2008-11-24 09:38:45 +0100 lla r264205 : #i82083# new toolbox in GroupsSorting dialog
2008-11-24 09:32:20 +0100 lla r264201 : #i96501# cleanup assertions
2008-11-24 09:12:55 +0100 lla r264198 : #i83082# enhancement for toolboxes, better HC comfort
2008-11-24 08:46:43 +0100 lla r264197 : #i96501# fix problem with negative positions
2008-11-21 11:44:47 +0100 fs r264118 : #i57042# introduce a counter for suspending change notifications of a given property, so recursive calls are possible
2008-11-21 11:02:17 +0100 fs r264116 : #i96388# don't call ExecuteContextMenuAction when no action was chosen by the user
2008-11-21 10:36:53 +0100 fs r264114 : #i47384# assertion was wrong
2008-11-14 12:33:15 +0100 fs r263673 : #i47318# XRowSetChangeBroadcaster/Listener, to be able to listen for changes in an XRowSetSupplier's RowSet
2008-11-14 12:30:29 +0100 fs r263672 : #i47318# more refactoring
- BoundControlModels now listen at the XRowSetSupplier for changes in the supplied
RowSet, to properly revoke/register old/new listeners at the RowSet
- replaced ::osl::Mutex in various places with a ControlModelLock
2008-11-14 12:20:55 +0100 fs r263671 : when BUILD_TYPE includes QADEVOOO, the BUILD_QADEVOOO needs to bet set, too
2008-11-14 12:19:21 +0100 fs r263670 : oops, this was not intended to be committed
2008-11-12 11:08:10 +0100 fs r263579 : #i96096# new ctors taking UNO_QUERY_THROW
2008-11-12 09:15:54 +0100 fs r263576 : no need to load the complete dialog just to get a string which the dialog itself loads from resource
2008-11-10 17:55:45 +0100 fs r263535 : spelling in comment
2008-11-10 15:51:14 +0100 fs r263523 : #i47318# various refactorings
1. don't forward syntetic XLoadListener events from the grid control to
the grid columns. Instead, forward GridColumn::XChild::setParent to
the base class, which then can add itself as load listener
2. removed various occurances of XMultiServiceFactory, instead use the
::comphelper::ComponentContext
3. in O(Bound)ControlModel, have a mechanism to lock the instance (using
ControlModelLock) and fire property changes when the last lock dies.
2008-11-10 12:49:24 +0100 oj r263513 : #i94729# change token strings into string list
2008-11-10 12:13:15 +0100 oj r263512 : #i95222# export chart:title style as well
2008-11-10 08:55:25 +0100 oj r263507 : #i93471# show the correct tabpage when selecting a different object
2008-11-07 23:38:29 +0100 fs r263490 : #i95977# for the event input controls, add a component extending their functionality so they're reset when the users presses DEL
2008-11-07 23:35:39 +0100 fs r263489 : during #i95977#: When a VCL Window is deleted from within VCL code, the respective WindowPeer was never disposed. Corrected this.
2008-11-07 14:57:07 +0100 fs r263420 : #i95963# human-readable display names for event bindings
2008-11-06 10:34:52 +0100 fs r263366 : #i95865# don't use library names containing InvalidZipEntryFileNames - workaround until i95409 is fixed
2008-11-06 10:33:28 +0100 fs r263365 : #i95865#
copied the following change from CWS odfmetadata2 (not yet integrated) into CWS dba31d
- comphelper/inc/comphelper/storagehelper.hxx,
comphelper/source/misc/storagehelper.cxx:
+ add function IsValidZipEntryFileName (moved from module package)
2009-04-22 11:01:27 +00:00
Reference < XPropertySet > xModelProps ( _rxControl - > getModel ( ) , UNO_QUERY ) ;
2004-11-16 10:22:40 +00:00
if ( xModelProps . is ( ) & & : : comphelper : : hasProperty ( FM_PROP_BOUNDFIELD , xModelProps ) )
{
Reference < XPropertySet > xField ;
xModelProps - > getPropertyValue ( FM_PROP_BOUNDFIELD ) > > = xField ;
bShould = xField . is ( ) ;
if ( ! bShould & & _rxBoundFieldListener . is ( ) )
xModelProps - > addPropertyChangeListener ( FM_PROP_BOUNDFIELD , _rxBoundFieldListener ) ;
}
}
return bShould ;
2000-09-18 16:07:07 +00:00
}
2004-11-16 10:22:40 +00:00
}
2000-09-18 16:07:07 +00:00
2004-11-16 10:22:40 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : startControlModifyListening ( const Reference < XControl > & xControl )
2004-11-16 10:22:40 +00:00
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
2004-11-16 10:22:40 +00:00
bool bModifyListening = lcl_shouldListenForModifications ( xControl , this ) ;
// artificial while
while ( bModifyListening )
2000-09-18 16:07:07 +00:00
{
2004-04-13 10:05:48 +00:00
Reference < XModifyBroadcaster > xMod ( xControl , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
if ( xMod . is ( ) )
{
xMod - > addModifyListener ( this ) ;
break ;
}
// alle die Text um vorzeitig ein modified zu erkennen
2004-04-13 10:05:48 +00:00
Reference < XTextComponent > xText ( xControl , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
if ( xText . is ( ) )
{
xText - > addTextListener ( this ) ;
break ;
}
2004-04-13 10:05:48 +00:00
Reference < XCheckBox > xBox ( xControl , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
if ( xBox . is ( ) )
{
xBox - > addItemListener ( this ) ;
break ;
}
2004-04-13 10:05:48 +00:00
Reference < XComboBox > xCbBox ( xControl , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
if ( xCbBox . is ( ) )
{
xCbBox - > addItemListener ( this ) ;
break ;
}
2004-04-13 10:05:48 +00:00
Reference < XListBox > xListBox ( xControl , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
if ( xListBox . is ( ) )
{
xListBox - > addItemListener ( this ) ;
break ;
}
break ;
}
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : stopControlModifyListening ( const Reference < XControl > & xControl )
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
2000-09-18 16:07:07 +00:00
2004-11-16 10:22:40 +00:00
bool bModifyListening = lcl_shouldListenForModifications ( xControl , NULL ) ;
2000-09-18 16:07:07 +00:00
// kuenstliches while
while ( bModifyListening )
{
2004-04-13 10:05:48 +00:00
Reference < XModifyBroadcaster > xMod ( xControl , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
if ( xMod . is ( ) )
{
xMod - > removeModifyListener ( this ) ;
break ;
}
// alle die Text um vorzeitig ein modified zu erkennen
2004-04-13 10:05:48 +00:00
Reference < XTextComponent > xText ( xControl , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
if ( xText . is ( ) )
{
xText - > removeTextListener ( this ) ;
break ;
}
2004-04-13 10:05:48 +00:00
Reference < XCheckBox > xBox ( xControl , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
if ( xBox . is ( ) )
{
xBox - > removeItemListener ( this ) ;
break ;
}
2004-04-13 10:05:48 +00:00
Reference < XComboBox > xCbBox ( xControl , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
if ( xCbBox . is ( ) )
{
xCbBox - > removeItemListener ( this ) ;
break ;
}
2004-04-13 10:05:48 +00:00
Reference < XListBox > xListBox ( xControl , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
if ( xListBox . is ( ) )
{
xListBox - > removeItemListener ( this ) ;
break ;
}
break ;
}
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : startListening ( )
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
2000-09-18 16:07:07 +00:00
m_bModified = sal_False ;
// jetzt anmelden bei gebundenen feldern
2004-11-16 10:22:40 +00:00
const Reference < XControl > * pControls = m_aControls . getConstArray ( ) ;
const Reference < XControl > * pControlsEnd = pControls + m_aControls . getLength ( ) ;
while ( pControls ! = pControlsEnd )
startControlModifyListening ( * pControls + + ) ;
2000-09-18 16:07:07 +00:00
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : stopListening ( )
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
2000-09-18 16:07:07 +00:00
m_bModified = sal_False ;
// jetzt anmelden bei gebundenen feldern
2004-11-16 10:22:40 +00:00
const Reference < XControl > * pControls = m_aControls . getConstArray ( ) ;
const Reference < XControl > * pControlsEnd = pControls + m_aControls . getLength ( ) ;
while ( pControls ! = pControlsEnd )
stopControlModifyListening ( * pControls + + ) ;
2000-09-18 16:07:07 +00:00
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
Reference < XControl > FormController : : findControl ( Sequence < Reference < XControl > > & _rControls , const Reference < XControlModel > & xCtrlModel , sal_Bool _bRemove , sal_Bool _bOverWrite ) const
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
2000-09-18 16:07:07 +00:00
DBG_ASSERT ( xCtrlModel . is ( ) , " findControl - welches ?! " ) ;
2004-11-16 10:22:40 +00:00
Reference < XControl > * pControls = _rControls . getArray ( ) ;
2004-04-13 10:05:48 +00:00
Reference < XControlModel > xModel ;
2004-11-16 10:22:40 +00:00
for ( sal_Int32 i = 0 , nCount = _rControls . getLength ( ) ; i < nCount ; + + i , + + pControls )
2000-09-18 16:07:07 +00:00
{
2004-11-16 10:22:40 +00:00
if ( pControls - > is ( ) )
2000-09-18 16:07:07 +00:00
{
2004-11-16 10:22:40 +00:00
xModel = ( * pControls ) - > getModel ( ) ;
if ( xModel . get ( ) = = xCtrlModel . get ( ) )
2000-09-18 16:07:07 +00:00
{
2004-11-16 10:22:40 +00:00
Reference < XControl > xControl ( * pControls ) ;
2003-03-27 14:06:05 +00:00
if ( _bRemove )
2004-11-16 10:22:40 +00:00
: : comphelper : : removeElementAt ( _rControls , i ) ;
2003-05-19 11:51:00 +00:00
else if ( _bOverWrite )
2004-11-16 10:22:40 +00:00
* pControls = Reference < XControl > ( ) ;
return xControl ;
2000-09-18 16:07:07 +00:00
}
}
}
2004-04-13 10:05:48 +00:00
return Reference < XControl > ( ) ;
2000-09-18 16:07:07 +00:00
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : implControlInserted ( const Reference < XControl > & _rxControl , bool _bAddToEventAttacher )
2000-09-18 16:07:07 +00:00
{
2004-11-16 10:22:40 +00:00
Reference < XWindow > xWindow ( _rxControl , UNO_QUERY ) ;
if ( xWindow . is ( ) )
2000-09-18 16:07:07 +00:00
{
2004-07-05 14:50:20 +00:00
xWindow - > addFocusListener ( this ) ;
xWindow - > addMouseListener ( this ) ;
2004-11-16 10:22:40 +00:00
if ( _bAddToEventAttacher )
addToEventAttacher ( _rxControl ) ;
2000-09-18 16:07:07 +00:00
}
2004-11-16 10:22:40 +00:00
// add a dispatch interceptor to the control (if supported)
Reference < XDispatchProviderInterception > xInterception ( _rxControl , UNO_QUERY ) ;
if ( xInterception . is ( ) )
createInterceptor ( xInterception ) ;
2000-09-18 16:07:07 +00:00
2004-11-16 10:22:40 +00:00
if ( _rxControl . is ( ) )
2000-09-18 16:07:07 +00:00
{
2004-11-16 10:22:40 +00:00
Reference < XControlModel > xModel ( _rxControl - > getModel ( ) ) ;
2000-09-18 16:07:07 +00:00
// we want to know about the reset of the the model of our controls
// (for correctly resetting m_bModified)
2004-11-16 10:22:40 +00:00
Reference < XReset > xReset ( xModel , UNO_QUERY ) ;
if ( xReset . is ( ) )
xReset - > addResetListener ( this ) ;
// and we want to know about the validity, to visually indicate it
Reference < XValidatableFormComponent > xValidatable ( xModel , UNO_QUERY ) ;
if ( xValidatable . is ( ) )
{
xValidatable - > addFormComponentValidityListener ( this ) ;
m_pControlBorderManager - > validityChanged ( _rxControl , xValidatable ) ;
}
2000-09-18 16:07:07 +00:00
}
2004-11-16 10:22:40 +00:00
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : implControlRemoved ( const Reference < XControl > & _rxControl , bool _bRemoveFromEventAttacher )
2004-11-16 10:22:40 +00:00
{
Reference < XWindow > xWindow ( _rxControl , UNO_QUERY ) ;
if ( xWindow . is ( ) )
{
xWindow - > removeFocusListener ( this ) ;
xWindow - > removeMouseListener ( this ) ;
if ( _bRemoveFromEventAttacher )
removeFromEventAttacher ( _rxControl ) ;
}
Reference < XDispatchProviderInterception > xInterception ( _rxControl , UNO_QUERY ) ;
if ( xInterception . is ( ) )
deleteInterceptor ( xInterception ) ;
if ( _rxControl . is ( ) )
{
Reference < XControlModel > xModel ( _rxControl - > getModel ( ) ) ;
Reference < XReset > xReset ( xModel , UNO_QUERY ) ;
if ( xReset . is ( ) )
xReset - > removeResetListener ( this ) ;
Reference < XValidatableFormComponent > xValidatable ( xModel , UNO_QUERY ) ;
if ( xValidatable . is ( ) )
xValidatable - > removeFormComponentValidityListener ( this ) ;
}
}
2008-08-19 08:47:45 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : implSetCurrentControl ( const Reference < XControl > & _rxControl )
2008-08-19 08:47:45 +00:00
{
if ( m_xCurrentControl . get ( ) = = _rxControl . get ( ) )
return ;
Reference < XGridControl > xGridControl ( m_xCurrentControl , UNO_QUERY ) ;
if ( xGridControl . is ( ) )
xGridControl - > removeGridControlListener ( this ) ;
m_xCurrentControl = _rxControl ;
xGridControl . set ( m_xCurrentControl , UNO_QUERY ) ;
if ( xGridControl . is ( ) )
xGridControl - > addGridControlListener ( this ) ;
}
2004-11-16 10:22:40 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : insertControl ( const Reference < XControl > & xControl )
2004-11-16 10:22:40 +00:00
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
2004-11-16 10:22:40 +00:00
m_bControlsSorted = sal_False ;
m_aControls . realloc ( m_aControls . getLength ( ) + 1 ) ;
m_aControls . getArray ( ) [ m_aControls . getLength ( ) - 1 ] = xControl ;
2008-12-01 12:31:27 +00:00
if ( m_pColumnInfoCache . get ( ) )
m_pColumnInfoCache - > deinitializeControls ( ) ;
2004-11-16 10:22:40 +00:00
implControlInserted ( xControl , m_bAttachEvents ) ;
2000-09-18 16:07:07 +00:00
if ( m_bDBConnection & & ! m_bFiltering )
setControlLock ( xControl ) ;
if ( isListeningForChanges ( ) & & m_bAttachEvents )
2004-11-16 10:22:40 +00:00
startControlModifyListening ( xControl ) ;
2000-09-18 16:07:07 +00:00
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : removeControl ( const Reference < XControl > & xControl )
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
2004-11-16 10:22:40 +00:00
const Reference < XControl > * pControls = m_aControls . getConstArray ( ) ;
const Reference < XControl > * pControlsEnd = pControls + m_aControls . getLength ( ) ;
while ( pControls ! = pControlsEnd )
2000-09-18 16:07:07 +00:00
{
2004-11-16 10:22:40 +00:00
if ( xControl . get ( ) = = ( * pControls + + ) . get ( ) )
2000-09-18 16:07:07 +00:00
{
2005-10-24 07:26:42 +00:00
: : comphelper : : removeElementAt ( m_aControls , pControls - m_aControls . getConstArray ( ) - 1 ) ;
2000-09-18 16:07:07 +00:00
break ;
}
}
2009-10-29 15:55:37 +01:00
FilterComponents : : iterator componentPos = : : std : : find ( m_aFilterComponents . begin ( ) , m_aFilterComponents . end ( ) , xControl ) ;
if ( componentPos ! = m_aFilterComponents . end ( ) )
m_aFilterComponents . erase ( componentPos ) ;
2000-09-18 16:07:07 +00:00
2004-11-16 10:22:40 +00:00
implControlRemoved ( xControl , m_bDetachEvents ) ;
2000-09-18 16:07:07 +00:00
2004-11-16 10:22:40 +00:00
if ( isListeningForChanges ( ) & & m_bDetachEvents )
stopControlModifyListening ( xControl ) ;
2000-09-18 16:07:07 +00:00
}
2004-04-13 10:05:48 +00:00
// XLoadListener
2000-09-18 16:07:07 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : loaded ( const EventObject & rEvent ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( rEvent . Source = = m_xModelAsIndex , " FormController::loaded: where did this come from? " ) ;
2002-12-05 08:58:04 +00:00
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
2000-09-18 16:07:07 +00:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2004-04-13 10:05:48 +00:00
Reference < XRowSet > xForm ( rEvent . Source , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
// do we have a connected data source
2002-10-07 12:09:48 +00:00
OStaticDataAccessTools aStaticTools ;
if ( xForm . is ( ) & & aStaticTools . getRowSetConnection ( xForm ) . is ( ) )
2000-09-18 16:07:07 +00:00
{
2000-11-06 06:19:53 +00:00
Reference < XPropertySet > xSet ( xForm , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
if ( xSet . is ( ) )
{
Any aVal = xSet - > getPropertyValue ( FM_PROP_CYCLE ) ;
2006-11-21 16:09:15 +00:00
sal_Int32 aVal2 = 0 ;
2000-09-18 16:07:07 +00:00
: : cppu : : enum2int ( aVal2 , aVal ) ;
2004-04-13 10:05:48 +00:00
m_bCycle = ! aVal . hasValue ( ) | | aVal2 = = TabulatorCycle_RECORDS ;
2002-10-07 12:09:48 +00:00
m_bCanUpdate = aStaticTools . canUpdate ( xSet ) ;
m_bCanInsert = aStaticTools . canInsert ( xSet ) ;
2000-10-20 13:18:57 +00:00
m_bCurrentRecordModified = : : comphelper : : getBOOL ( xSet - > getPropertyValue ( FM_PROP_ISMODIFIED ) ) ;
m_bCurrentRecordNew = : : comphelper : : getBOOL ( xSet - > getPropertyValue ( FM_PROP_ISNEW ) ) ;
2000-09-18 16:07:07 +00:00
2002-12-05 08:58:04 +00:00
startFormListening ( xSet , sal_False ) ;
2000-09-18 16:07:07 +00:00
// set the locks for the current controls
if ( getContainer ( ) . is ( ) )
{
2008-12-01 12:31:27 +00:00
m_aLoadEvent . Call ( ) ;
2000-09-18 16:07:07 +00:00
}
}
else
{
m_bCanInsert = m_bCanUpdate = m_bCycle = sal_False ;
m_bCurrentRecordModified = sal_False ;
m_bCurrentRecordNew = sal_False ;
m_bLocked = sal_False ;
}
m_bDBConnection = sal_True ;
}
else
{
m_bDBConnection = sal_False ;
m_bCanInsert = m_bCanUpdate = m_bCycle = sal_False ;
m_bCurrentRecordModified = sal_False ;
m_bCurrentRecordNew = sal_False ;
m_bLocked = sal_False ;
}
2004-04-13 10:05:48 +00:00
2008-12-01 12:31:27 +00:00
Reference < XColumnsSupplier > xFormColumns ( xForm , UNO_QUERY ) ;
m_pColumnInfoCache . reset ( xFormColumns . is ( ) ? new ColumnInfoCache ( xFormColumns ) : NULL ) ;
2004-04-13 10:05:48 +00:00
updateAllDispatchers ( ) ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : updateAllDispatchers ( ) const
2004-04-13 10:05:48 +00:00
{
: : std : : for_each (
m_aFeatureDispatchers . begin ( ) ,
m_aFeatureDispatchers . end ( ) ,
2011-02-08 17:39:27 +01:00
: : o3tl : : compose1 (
2004-04-13 10:05:48 +00:00
UpdateAllListeners ( ) ,
2011-02-08 17:39:27 +01:00
: : o3tl : : select2nd < DispatcherContainer : : value_type > ( )
2004-04-13 10:05:48 +00:00
)
) ;
2000-09-18 16:07:07 +00:00
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
IMPL_LINK ( FormController , OnLoad , void * , EMPTYARG )
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
2000-09-18 16:07:07 +00:00
m_bLocked = determineLockState ( ) ;
setLocks ( ) ;
if ( ! m_bLocked )
startListening ( ) ;
// just one exception toggle the auto values
2006-11-14 12:24:06 +00:00
if ( m_bCurrentRecordNew )
2000-09-18 16:07:07 +00:00
toggleAutoFields ( sal_True ) ;
return 1L ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : unloaded ( const EventObject & /*rEvent*/ ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2009-10-29 11:59:44 +01:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
impl_checkDisposed_throw ( ) ;
2004-04-13 10:05:48 +00:00
updateAllDispatchers ( ) ;
2000-09-18 16:07:07 +00:00
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : reloading ( const EventObject & /*aEvent*/ ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2003-05-19 11:51:00 +00:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2009-10-29 11:59:44 +01:00
impl_checkDisposed_throw ( ) ;
2000-09-18 16:07:07 +00:00
// do the same like in unloading
// just one exception toggle the auto values
2008-12-01 12:31:27 +00:00
m_aToggleEvent . CancelPendingCall ( ) ;
2000-09-18 16:07:07 +00:00
unload ( ) ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : reloaded ( const EventObject & aEvent ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2009-10-29 11:59:44 +01:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
impl_checkDisposed_throw ( ) ;
2000-09-18 16:07:07 +00:00
loaded ( aEvent ) ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : unloading ( const EventObject & /*aEvent*/ ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2009-10-29 11:59:44 +01:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
impl_checkDisposed_throw ( ) ;
2000-09-18 16:07:07 +00:00
unload ( ) ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : unload ( ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2009-10-29 11:59:44 +01:00
impl_checkDisposed_throw ( ) ;
2008-12-01 12:31:27 +00:00
m_aLoadEvent . CancelPendingCall ( ) ;
2000-09-18 16:07:07 +00:00
// be sure not to have autofields
2006-11-14 12:24:06 +00:00
if ( m_bCurrentRecordNew )
2000-09-18 16:07:07 +00:00
toggleAutoFields ( sal_False ) ;
2003-05-19 11:51:00 +00:00
// remove bound field listing again
removeBoundFieldListener ( ) ;
2000-09-18 16:07:07 +00:00
if ( m_bDBConnection & & isListeningForChanges ( ) )
stopListening ( ) ;
2002-12-05 08:58:04 +00:00
Reference < XPropertySet > xSet ( m_xModelAsIndex , UNO_QUERY ) ;
if ( m_bDBConnection & & xSet . is ( ) )
stopFormListening ( xSet , sal_False ) ;
m_bDBConnection = sal_False ;
m_bCanInsert = m_bCanUpdate = m_bCycle = sal_False ;
m_bCurrentRecordModified = m_bCurrentRecordNew = m_bLocked = sal_False ;
2008-12-01 12:31:27 +00:00
m_pColumnInfoCache . reset ( NULL ) ;
2002-12-05 08:58:04 +00:00
}
2004-11-16 10:22:40 +00:00
2003-05-19 11:51:00 +00:00
// -----------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : removeBoundFieldListener ( )
2003-05-19 11:51:00 +00:00
{
2004-11-16 10:22:40 +00:00
const Reference < XControl > * pControls = m_aControls . getConstArray ( ) ;
const Reference < XControl > * pControlsEnd = pControls + m_aControls . getLength ( ) ;
while ( pControls ! = pControlsEnd )
2003-05-19 11:51:00 +00:00
{
2004-11-16 10:22:40 +00:00
Reference < XPropertySet > xProp ( * pControls + + , UNO_QUERY ) ;
2003-05-19 11:51:00 +00:00
if ( xProp . is ( ) )
2004-11-16 10:22:40 +00:00
xProp - > removePropertyChangeListener ( FM_PROP_BOUNDFIELD , this ) ;
2003-05-19 11:51:00 +00:00
}
}
2004-11-16 10:22:40 +00:00
2002-12-05 08:58:04 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : startFormListening ( const Reference < XPropertySet > & _rxForm , sal_Bool _bPropertiesOnly )
2002-12-05 08:58:04 +00:00
{
2004-07-05 14:50:20 +00:00
try
2000-09-18 16:07:07 +00:00
{
2004-07-05 14:50:20 +00:00
if ( m_bCanInsert | | m_bCanUpdate ) // form can be modified
2000-09-18 16:07:07 +00:00
{
2004-07-05 14:50:20 +00:00
_rxForm - > addPropertyChangeListener ( FM_PROP_ISNEW , this ) ;
_rxForm - > addPropertyChangeListener ( FM_PROP_ISMODIFIED , this ) ;
if ( ! _bPropertiesOnly )
{
// set the Listener for UI interaction
Reference < XRowSetApproveBroadcaster > xApprove ( _rxForm , UNO_QUERY ) ;
if ( xApprove . is ( ) )
xApprove - > addRowSetApproveListener ( this ) ;
// listener for row set changes
Reference < XRowSet > xRowSet ( _rxForm , UNO_QUERY ) ;
if ( xRowSet . is ( ) )
xRowSet - > addRowSetListener ( this ) ;
}
2002-12-05 08:58:04 +00:00
}
2004-07-05 14:50:20 +00:00
2007-07-06 06:36:06 +00:00
Reference < XPropertySetInfo > xInfo = _rxForm - > getPropertySetInfo ( ) ;
if ( xInfo . is ( ) & & xInfo - > hasPropertyByName ( FM_PROP_DYNAMIC_CONTROL_BORDER ) )
2004-07-05 14:50:20 +00:00
_rxForm - > addPropertyChangeListener ( FM_PROP_DYNAMIC_CONTROL_BORDER , this ) ;
}
catch ( const Exception & )
{
2009-10-23 16:03:52 +02:00
DBG_UNHANDLED_EXCEPTION ( ) ;
2002-12-05 08:58:04 +00:00
}
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : stopFormListening ( const Reference < XPropertySet > & _rxForm , sal_Bool _bPropertiesOnly )
2002-12-05 08:58:04 +00:00
{
2004-07-05 14:50:20 +00:00
try
2002-12-05 08:58:04 +00:00
{
2004-07-05 14:50:20 +00:00
if ( m_bCanInsert | | m_bCanUpdate )
2002-12-05 08:58:04 +00:00
{
2004-07-05 14:50:20 +00:00
_rxForm - > removePropertyChangeListener ( FM_PROP_ISNEW , this ) ;
_rxForm - > removePropertyChangeListener ( FM_PROP_ISMODIFIED , this ) ;
if ( ! _bPropertiesOnly )
{
Reference < XRowSetApproveBroadcaster > xApprove ( _rxForm , UNO_QUERY ) ;
if ( xApprove . is ( ) )
xApprove - > removeRowSetApproveListener ( this ) ;
2002-12-05 08:58:04 +00:00
2004-07-05 14:50:20 +00:00
Reference < XRowSet > xRowSet ( _rxForm , UNO_QUERY ) ;
if ( xRowSet . is ( ) )
xRowSet - > removeRowSetListener ( this ) ;
}
2000-09-18 16:07:07 +00:00
}
2004-07-05 14:50:20 +00:00
2007-07-06 06:36:06 +00:00
Reference < XPropertySetInfo > xInfo = _rxForm - > getPropertySetInfo ( ) ;
if ( xInfo . is ( ) & & xInfo - > hasPropertyByName ( FM_PROP_DYNAMIC_CONTROL_BORDER ) )
2004-07-05 14:50:20 +00:00
_rxForm - > removePropertyChangeListener ( FM_PROP_DYNAMIC_CONTROL_BORDER , this ) ;
}
catch ( const Exception & )
{
2009-10-23 16:03:52 +02:00
DBG_UNHANDLED_EXCEPTION ( ) ;
2000-09-18 16:07:07 +00:00
}
}
// com::sun::star::sdbc::XRowSetListener
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : cursorMoved ( const EventObject & /*event*/ ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2009-10-29 11:59:44 +01:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
impl_checkDisposed_throw ( ) ;
2000-09-18 16:07:07 +00:00
// toggle the locking ?
if ( m_bLocked ! = determineLockState ( ) )
{
m_bLocked = ! m_bLocked ;
setLocks ( ) ;
if ( isListeningForChanges ( ) )
startListening ( ) ;
else
stopListening ( ) ;
}
2002-12-05 08:58:04 +00:00
// neither the current control nor the current record are modified anymore
m_bCurrentRecordModified = m_bModified = sal_False ;
2000-09-18 16:07:07 +00:00
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : rowChanged ( const EventObject & /*event*/ ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
// not interested in ...
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : rowSetChanged ( const EventObject & /*event*/ ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
// not interested in ...
}
2004-04-13 10:05:48 +00:00
// XContainerListener
2000-09-18 16:07:07 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : elementInserted ( const ContainerEvent & evt ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2009-10-29 11:59:44 +01:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
impl_checkDisposed_throw ( ) ;
Reference < XControl > xControl ( evt . Element , UNO_QUERY ) ;
if ( ! xControl . is ( ) )
2000-09-18 16:07:07 +00:00
return ;
2004-04-13 10:05:48 +00:00
Reference < XFormComponent > xModel ( xControl - > getModel ( ) , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
if ( xModel . is ( ) & & m_xModelAsIndex = = xModel - > getParent ( ) )
{
insertControl ( xControl ) ;
2004-04-13 10:05:48 +00:00
if ( m_aTabActivationTimer . IsActive ( ) )
m_aTabActivationTimer . Stop ( ) ;
2000-09-18 16:07:07 +00:00
2004-04-13 10:05:48 +00:00
m_aTabActivationTimer . Start ( ) ;
2000-09-18 16:07:07 +00:00
}
2004-04-13 10:05:48 +00:00
// are we in filtermode and a XModeSelector has inserted an element
else if ( m_bFiltering & & Reference < XModeSelector > ( evt . Source , UNO_QUERY ) . is ( ) )
2000-09-18 16:07:07 +00:00
{
2004-04-13 10:05:48 +00:00
xModel = Reference < XFormComponent > ( evt . Source , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
if ( xModel . is ( ) & & m_xModelAsIndex = = xModel - > getParent ( ) )
{
2000-11-06 06:19:53 +00:00
Reference < XPropertySet > xSet ( xControl - > getModel ( ) , UNO_QUERY ) ;
2000-10-20 13:18:57 +00:00
if ( xSet . is ( ) & & : : comphelper : : hasProperty ( FM_PROP_BOUNDFIELD , xSet ) )
2000-09-18 16:07:07 +00:00
{
// does the model use a bound field ?
2000-11-07 12:16:50 +00:00
Reference < XPropertySet > xField ;
xSet - > getPropertyValue ( FM_PROP_BOUNDFIELD ) > > = xField ;
2000-09-18 16:07:07 +00:00
2004-04-13 10:05:48 +00:00
Reference < XTextComponent > xText ( xControl , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
// may we filter the field?
2000-10-20 13:18:57 +00:00
if ( xText . is ( ) & & xField . is ( ) & & : : comphelper : : hasProperty ( FM_PROP_SEARCHABLE , xField ) & &
: : comphelper : : getBOOL ( xField - > getPropertyValue ( FM_PROP_SEARCHABLE ) ) )
2000-09-18 16:07:07 +00:00
{
2009-10-29 15:55:37 +01:00
m_aFilterComponents . push_back ( xText ) ;
xText - > addTextListener ( this ) ;
2000-09-18 16:07:07 +00:00
}
}
}
}
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : elementReplaced ( const ContainerEvent & evt ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2006-11-14 12:24:06 +00:00
// simulate an elementRemoved
ContainerEvent aRemoveEvent ( evt ) ;
aRemoveEvent . Element = evt . ReplacedElement ;
aRemoveEvent . ReplacedElement = Any ( ) ;
elementRemoved ( aRemoveEvent ) ;
2000-09-18 16:07:07 +00:00
2006-11-14 12:24:06 +00:00
// simulate an elementInserted
ContainerEvent aInsertEvent ( evt ) ;
aInsertEvent . ReplacedElement = Any ( ) ;
elementInserted ( aInsertEvent ) ;
2000-09-18 16:07:07 +00:00
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : elementRemoved ( const ContainerEvent & evt ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2009-10-29 11:59:44 +01:00
impl_checkDisposed_throw ( ) ;
2000-09-18 16:07:07 +00:00
2004-04-13 10:05:48 +00:00
Reference < XControl > xControl ;
2000-11-07 12:16:50 +00:00
evt . Element > > = xControl ;
2000-09-18 16:07:07 +00:00
if ( ! xControl . is ( ) )
return ;
2004-04-13 10:05:48 +00:00
Reference < XFormComponent > xModel ( xControl - > getModel ( ) , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
if ( xModel . is ( ) & & m_xModelAsIndex = = xModel - > getParent ( ) )
{
removeControl ( xControl ) ;
// TabOrder nicht neu berechnen, da das intern schon funktionieren mu<6D> !
}
2006-11-14 12:24:06 +00:00
// are we in filtermode and a XModeSelector has inserted an element
else if ( m_bFiltering & & Reference < XModeSelector > ( evt . Source , UNO_QUERY ) . is ( ) )
2000-09-18 16:07:07 +00:00
{
2009-10-29 15:55:37 +01:00
FilterComponents : : iterator componentPos = : : std : : find (
m_aFilterComponents . begin ( ) , m_aFilterComponents . end ( ) , xControl ) ;
if ( componentPos ! = m_aFilterComponents . end ( ) )
m_aFilterComponents . erase ( componentPos ) ;
2000-09-18 16:07:07 +00:00
}
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
Reference < XControl > FormController : : isInList ( const Reference < XWindowPeer > & xPeer ) const
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
2004-11-16 10:22:40 +00:00
const Reference < XControl > * pControls = m_aControls . getConstArray ( ) ;
2000-09-18 16:07:07 +00:00
sal_uInt32 nCtrls = m_aControls . getLength ( ) ;
2004-11-16 10:22:40 +00:00
for ( sal_uInt32 n = 0 ; n < nCtrls & & xPeer . is ( ) ; + + n , + + pControls )
2000-09-18 16:07:07 +00:00
{
2004-11-16 10:22:40 +00:00
if ( pControls - > is ( ) )
2000-09-18 16:07:07 +00:00
{
2004-11-16 10:22:40 +00:00
Reference < XVclWindowPeer > xCtrlPeer ( ( * pControls ) - > getPeer ( ) , UNO_QUERY ) ;
if ( ( xCtrlPeer . get ( ) = = xPeer . get ( ) ) | | xCtrlPeer - > isChild ( xPeer ) )
return * pControls ;
2000-09-18 16:07:07 +00:00
}
}
2004-04-13 10:05:48 +00:00
return Reference < XControl > ( ) ;
2000-09-18 16:07:07 +00:00
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : activateFirst ( ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2009-10-29 11:59:44 +01:00
impl_checkDisposed_throw ( ) ;
2009-10-23 09:46:03 +02:00
DBG_ASSERT ( m_xTabController . is ( ) , " FormController::activateFirst : invalid aggregate ! " ) ;
2000-09-18 16:07:07 +00:00
if ( m_xTabController . is ( ) )
m_xTabController - > activateFirst ( ) ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : activateLast ( ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2009-10-29 11:59:44 +01:00
impl_checkDisposed_throw ( ) ;
2009-10-23 09:46:03 +02:00
DBG_ASSERT ( m_xTabController . is ( ) , " FormController::activateLast : invalid aggregate ! " ) ;
2000-09-18 16:07:07 +00:00
if ( m_xTabController . is ( ) )
m_xTabController - > activateLast ( ) ;
}
2004-04-13 10:05:48 +00:00
// XFormController
2000-09-18 16:07:07 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
Reference < XFormOperations > SAL_CALL FormController : : getFormOperations ( ) throw ( RuntimeException )
2001-05-29 13:15:08 +00:00
{
2003-05-19 11:51:00 +00:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2009-10-29 11:59:44 +01:00
impl_checkDisposed_throw ( ) ;
2009-10-23 09:46:03 +02:00
2009-10-30 11:38:26 +01:00
return m_xFormOperations ;
2009-10-23 09:46:03 +02:00
}
//------------------------------------------------------------------------------
Reference < XControl > SAL_CALL FormController : : getCurrentControl ( void ) throw ( RuntimeException )
2001-05-29 13:15:08 +00:00
{
2003-05-19 11:51:00 +00:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2009-10-29 11:59:44 +01:00
impl_checkDisposed_throw ( ) ;
2001-05-29 13:15:08 +00:00
return m_xCurrentControl ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : addActivateListener ( const Reference < XFormControllerListener > & l ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2003-05-19 11:51:00 +00:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2009-10-29 11:59:44 +01:00
impl_checkDisposed_throw ( ) ;
2000-09-18 16:07:07 +00:00
m_aActivateListeners . addInterface ( l ) ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : removeActivateListener ( const Reference < XFormControllerListener > & l ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2003-05-19 11:51:00 +00:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2009-10-29 11:59:44 +01:00
impl_checkDisposed_throw ( ) ;
2000-09-18 16:07:07 +00:00
m_aActivateListeners . removeInterface ( l ) ;
}
//------------------------------------------------------------------------------
2009-10-29 11:59:44 +01:00
void SAL_CALL FormController : : addChildController ( const Reference < XFormController > & _ChildController ) throw ( RuntimeException , IllegalArgumentException )
{
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
impl_checkDisposed_throw ( ) ;
if ( ! _ChildController . is ( ) )
throw IllegalArgumentException ( : : rtl : : OUString ( ) , * this , 1 ) ;
// TODO: (localized) error message
// the parent of our (to-be-)child must be our own model
Reference < XFormComponent > xFormOfChild ( _ChildController - > getModel ( ) , UNO_QUERY ) ;
if ( ! xFormOfChild . is ( ) )
throw IllegalArgumentException ( : : rtl : : OUString ( ) , * this , 1 ) ;
// TODO: (localized) error message
if ( xFormOfChild - > getParent ( ) ! = m_xModelAsIndex )
throw IllegalArgumentException ( : : rtl : : OUString ( ) , * this , 1 ) ;
// TODO: (localized) error message
m_aChilds . push_back ( _ChildController ) ;
_ChildController - > setParent ( * this ) ;
// search the position of the model within the form
sal_uInt32 nPos = m_xModelAsIndex - > getCount ( ) ;
Reference < XFormComponent > xTemp ;
for ( ; nPos ; )
{
m_xModelAsIndex - > getByIndex ( - - nPos ) > > = xTemp ;
if ( xFormOfChild = = xTemp )
{
Reference < XInterface > xIfc ( _ChildController , UNO_QUERY ) ;
m_xModelAsManager - > attach ( nPos , xIfc , makeAny ( _ChildController ) ) ;
break ;
}
}
}
2009-10-23 16:03:52 +02:00
//------------------------------------------------------------------------------
Reference < XFormControllerContext > SAL_CALL FormController : : getContext ( ) throw ( RuntimeException )
{
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2009-10-29 11:59:44 +01:00
impl_checkDisposed_throw ( ) ;
2009-10-23 16:03:52 +02:00
return m_xContext ;
}
//------------------------------------------------------------------------------
void SAL_CALL FormController : : setContext ( const Reference < XFormControllerContext > & _context ) throw ( RuntimeException )
{
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2009-10-29 11:59:44 +01:00
impl_checkDisposed_throw ( ) ;
2009-10-23 16:03:52 +02:00
m_xContext = _context ;
}
//------------------------------------------------------------------------------
Reference < XInteractionHandler > SAL_CALL FormController : : getInteractionHandler ( ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2009-10-23 16:03:52 +02:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2009-10-29 11:59:44 +01:00
impl_checkDisposed_throw ( ) ;
2009-10-23 16:03:52 +02:00
return m_xInteractionHandler ;
}
//------------------------------------------------------------------------------
void SAL_CALL FormController : : setInteractionHandler ( const Reference < XInteractionHandler > & _interactionHandler ) throw ( RuntimeException )
{
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2009-10-29 11:59:44 +01:00
impl_checkDisposed_throw ( ) ;
2009-10-23 16:03:52 +02:00
m_xInteractionHandler = _interactionHandler ;
}
2000-09-18 16:07:07 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : setFilter ( : : std : : vector < FmFieldInfo > & rFieldInfos )
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
2000-09-18 16:07:07 +00:00
// create the composer
2001-07-25 12:44:28 +00:00
Reference < XRowSet > xForm ( m_xModelAsIndex , UNO_QUERY ) ;
2002-10-07 12:09:48 +00:00
Reference < XConnection > xConnection ( OStaticDataAccessTools ( ) . getRowSetConnection ( xForm ) ) ;
2000-09-18 16:07:07 +00:00
if ( xForm . is ( ) )
{
2008-01-30 07:23:55 +00:00
try
2000-09-18 16:07:07 +00:00
{
2008-01-30 07:23:55 +00:00
Reference < XMultiServiceFactory > xFactory ( xConnection , UNO_QUERY_THROW ) ;
m_xComposer . set (
xFactory - > createInstance ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " com.sun.star.sdb.SingleSelectQueryComposer " ) ) ) ,
UNO_QUERY_THROW ) ;
Reference < XPropertySet > xSet ( xForm , UNO_QUERY ) ;
: : rtl : : OUString sStatement = : : comphelper : : getString ( xSet - > getPropertyValue ( FM_PROP_ACTIVECOMMAND ) ) ;
: : rtl : : OUString sFilter = : : comphelper : : getString ( xSet - > getPropertyValue ( FM_PROP_FILTER ) ) ;
m_xComposer - > setElementaryQuery ( sStatement ) ;
m_xComposer - > setFilter ( sFilter ) ;
}
catch ( const Exception & )
{
DBG_UNHANDLED_EXCEPTION ( ) ;
2000-09-18 16:07:07 +00:00
}
}
if ( m_xComposer . is ( ) )
{
2000-11-06 06:19:53 +00:00
Sequence < PropertyValue > aLevel ;
Sequence < Sequence < PropertyValue > > aFilterRows = m_xComposer - > getStructuredFilter ( ) ;
2000-09-18 16:07:07 +00:00
// ok, we recieve the list of filters as sequence of fieldnames, value
// now we have to transform the fieldname into UI names, that could be a label of the field or
// a aliasname or the fieldname itself
// first adjust the field names if necessary
2008-01-30 07:23:55 +00:00
Reference < XNameAccess > xQueryColumns =
Reference < XColumnsSupplier > ( m_xComposer , UNO_QUERY_THROW ) - > getColumns ( ) ;
2000-09-18 16:07:07 +00:00
2008-01-29 16:09:42 +00:00
for ( : : std : : vector < FmFieldInfo > : : iterator iter = rFieldInfos . begin ( ) ;
2011-07-31 01:17:59 +02:00
iter ! = rFieldInfos . end ( ) ; + + iter )
2000-09-18 16:07:07 +00:00
{
2002-11-14 09:01:03 +00:00
if ( xQueryColumns - > hasByName ( ( * iter ) . aFieldName ) )
2000-09-18 16:07:07 +00:00
{
2002-11-14 09:01:03 +00:00
if ( ( xQueryColumns - > getByName ( ( * iter ) . aFieldName ) > > = ( * iter ) . xField ) & & ( * iter ) . xField . is ( ) )
( * iter ) . xField - > getPropertyValue ( FM_PROP_REALNAME ) > > = ( * iter ) . aFieldName ;
2000-09-18 16:07:07 +00:00
}
}
2004-04-13 10:05:48 +00:00
Reference < XDatabaseMetaData > xMetaData ( xConnection - > getMetaData ( ) ) ;
2000-09-18 16:07:07 +00:00
// now transfer the filters into Value/TextComponent pairs
2002-11-14 09:01:03 +00:00
: : comphelper : : UStringMixEqual aCompare ( xMetaData - > storesMixedCaseQuotedIdentifiers ( ) ) ;
// need to parse criteria localized
OStaticDataAccessTools aStaticTools ;
2004-04-13 10:05:48 +00:00
Reference < XNumberFormatsSupplier > xFormatSupplier ( aStaticTools . getNumberFormats ( xConnection , sal_True ) ) ;
2009-10-30 11:38:26 +01:00
Reference < XNumberFormatter > xFormatter ( m_aContext . createComponent ( " com.sun.star.util.NumberFormatter " ) , UNO_QUERY ) ;
2002-11-14 09:01:03 +00:00
xFormatter - > attachNumberFormatsSupplier ( xFormatSupplier ) ;
2004-04-13 10:05:48 +00:00
Locale aAppLocale = Application : : GetSettings ( ) . GetUILocale ( ) ;
2009-10-30 11:38:26 +01:00
LocaleDataWrapper aLocaleWrapper ( m_aContext . getLegacyServiceFactory ( ) , aAppLocale ) ;
2000-09-18 16:07:07 +00:00
// retrieving the filter
2000-11-06 06:19:53 +00:00
const Sequence < PropertyValue > * pRow = aFilterRows . getConstArray ( ) ;
2000-09-18 16:07:07 +00:00
for ( sal_Int32 i = 0 , nLen = aFilterRows . getLength ( ) ; i < nLen ; + + i )
{
FmFilterRow aRow ;
// search a field for the given name
2000-11-06 06:19:53 +00:00
const PropertyValue * pRefValues = pRow [ i ] . getConstArray ( ) ;
2000-09-18 16:07:07 +00:00
for ( sal_Int32 j = 0 , nLen1 = pRow [ i ] . getLength ( ) ; j < nLen1 ; j + + )
{
// look for the text component
2000-11-06 06:19:53 +00:00
Reference < XPropertySet > xField ;
2000-09-18 16:07:07 +00:00
try
{
2000-11-06 06:19:53 +00:00
Reference < XPropertySet > xSet ;
2000-09-18 16:07:07 +00:00
: : rtl : : OUString aRealName ;
// first look with the given name
if ( xQueryColumns - > hasByName ( pRefValues [ j ] . Name ) )
{
xQueryColumns - > getByName ( pRefValues [ j ] . Name ) > > = xSet ;
// get the RealName
2010-11-21 13:15:06 +01:00
xSet - > getPropertyValue ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " RealName " ) ) ) > > = aRealName ;
2000-09-18 16:07:07 +00:00
// compare the condition field name and the RealName
if ( aCompare ( aRealName , pRefValues [ j ] . Name ) )
xField = xSet ;
}
if ( ! xField . is ( ) )
{
// no we have to check every column to find the realname
2004-04-13 10:05:48 +00:00
Reference < XIndexAccess > xColumnsByIndex ( xQueryColumns , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
for ( sal_Int32 n = 0 , nCount = xColumnsByIndex - > getCount ( ) ; n < nCount ; n + + )
{
xColumnsByIndex - > getByIndex ( n ) > > = xSet ;
2010-11-21 13:15:06 +01:00
xSet - > getPropertyValue ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " RealName " ) ) ) > > = aRealName ;
2000-09-18 16:07:07 +00:00
if ( aCompare ( aRealName , pRefValues [ j ] . Name ) )
{
// get the column by its alias
xField = xSet ;
break ;
}
}
}
if ( ! xField . is ( ) )
continue ;
}
2001-07-25 12:44:28 +00:00
catch ( const Exception & )
2000-09-18 16:07:07 +00:00
{
continue ;
}
// find the text component
2008-01-29 16:09:42 +00:00
for ( : : std : : vector < FmFieldInfo > : : iterator iter = rFieldInfos . begin ( ) ;
2011-07-31 01:17:59 +02:00
iter ! = rFieldInfos . end ( ) ; + + iter )
2000-09-18 16:07:07 +00:00
{
// we found the field so insert a new entry to the filter row
if ( ( * iter ) . xField = = xField )
{
// do we already have the control ?
if ( aRow . find ( ( * iter ) . xText ) ! = aRow . end ( ) )
{
2000-11-06 06:19:53 +00:00
: : rtl : : OUString aCompText = aRow [ ( * iter ) . xText ] ;
2010-11-21 13:15:06 +01:00
aCompText + = : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " " ) ) ;
2001-07-25 12:44:28 +00:00
: : rtl : : OString aVal = m_xParser - > getContext ( ) . getIntlKeywordAscii ( OParseContext : : KEY_AND ) ;
2000-11-06 06:19:53 +00:00
aCompText + = : : rtl : : OUString ( aVal . getStr ( ) , aVal . getLength ( ) , RTL_TEXTENCODING_ASCII_US ) ;
2010-11-21 13:15:06 +01:00
aCompText + = : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " " ) ) ;
2000-11-06 06:19:53 +00:00
aCompText + = : : comphelper : : getString ( pRefValues [ j ] . Value ) ;
2000-09-18 16:07:07 +00:00
aRow [ ( * iter ) . xText ] = aCompText ;
}
else
2002-11-14 09:01:03 +00:00
{
: : rtl : : OUString sPredicate , sErrorMsg ;
pRefValues [ j ] . Value > > = sPredicate ;
: : rtl : : Reference < ISQLParseNode > xParseNode = predicateTree ( sErrorMsg , sPredicate , xFormatter , xField ) ;
if ( xParseNode . is ( ) )
{
: : rtl : : OUString sCriteria ;
xParseNode - > parseNodeToPredicateStr ( sCriteria
2006-12-13 15:42:30 +00:00
, xConnection
2002-11-14 09:01:03 +00:00
, xFormatter
, xField
, aAppLocale
2003-03-27 14:06:05 +00:00
, ( sal_Char ) aLocaleWrapper . getNumDecimalSep ( ) . GetChar ( 0 )
2002-11-14 09:01:03 +00:00
, getParseContext ( ) ) ;
aRow [ ( * iter ) . xText ] = sCriteria ;
}
}
2000-09-18 16:07:07 +00:00
}
}
}
if ( aRow . empty ( ) )
continue ;
2009-10-29 15:55:37 +01:00
impl_addFilterRow ( aRow ) ;
2000-09-18 16:07:07 +00:00
}
}
// now set the filter controls
2009-10-29 15:55:37 +01:00
for ( : : std : : vector < FmFieldInfo > : : iterator field = rFieldInfos . begin ( ) ;
field ! = rFieldInfos . end ( ) ;
+ + field
)
2000-09-18 16:07:07 +00:00
{
2009-10-29 15:55:37 +01:00
m_aFilterComponents . push_back ( field - > xText ) ;
2000-09-18 16:07:07 +00:00
}
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : startFiltering ( )
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
2000-09-18 16:07:07 +00:00
2002-10-07 12:09:48 +00:00
OStaticDataAccessTools aStaticTools ;
Reference < XConnection > xConnection ( aStaticTools . getRowSetConnection ( Reference < XRowSet > ( m_xModelAsIndex , UNO_QUERY ) ) ) ;
2002-03-19 12:12:39 +00:00
if ( ! xConnection . is ( ) )
// nothing to do - can't filter a form which is not connected
return ;
2000-09-18 16:07:07 +00:00
// stop listening for controls
if ( isListeningForChanges ( ) )
stopListening ( ) ;
m_bFiltering = sal_True ;
// as we don't want new controls to be attached to the scripting environment
// we change attach flags
m_bAttachEvents = sal_False ;
// Austauschen der Kontrols fuer das aktuelle Formular
2005-10-24 07:26:42 +00:00
Sequence < Reference < XControl > > aControlsCopy ( m_aControls ) ;
const Reference < XControl > * pControls = aControlsCopy . getConstArray ( ) ;
sal_Int32 nControlCount = aControlsCopy . getLength ( ) ;
2000-09-18 16:07:07 +00:00
// the control we have to activate after replacement
2004-04-13 10:05:48 +00:00
Reference < XDatabaseMetaData > xMetaData ( xConnection - > getMetaData ( ) ) ;
Reference < XNumberFormatsSupplier > xFormatSupplier = aStaticTools . getNumberFormats ( xConnection , sal_True ) ;
2009-10-30 11:38:26 +01:00
Reference < XNumberFormatter > xFormatter ( m_aContext . createComponent ( " com.sun.star.util.NumberFormatter " ) , UNO_QUERY ) ;
2000-09-18 16:07:07 +00:00
xFormatter - > attachNumberFormatsSupplier ( xFormatSupplier ) ;
// structure for storing the field info
2008-01-29 16:09:42 +00:00
: : std : : vector < FmFieldInfo > aFieldInfos ;
2000-09-18 16:07:07 +00:00
2006-11-14 12:24:06 +00:00
for ( sal_Int32 i = nControlCount ; i > 0 ; )
2000-09-18 16:07:07 +00:00
{
2006-11-14 12:24:06 +00:00
Reference < XControl > xControl = pControls [ - - i ] ;
if ( xControl . is ( ) )
2000-09-18 16:07:07 +00:00
{
2006-11-14 12:24:06 +00:00
// no events for the control anymore
removeFromEventAttacher ( xControl ) ;
2000-09-18 16:07:07 +00:00
2006-11-14 12:24:06 +00:00
// do we have a mode selector
Reference < XModeSelector > xSelector ( xControl , UNO_QUERY ) ;
if ( xSelector . is ( ) )
{
2009-10-30 11:38:26 +01:00
xSelector - > setMode ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " FilterMode " ) ) ) ;
2000-09-18 16:07:07 +00:00
2006-11-14 12:24:06 +00:00
// listening for new controls of the selector
Reference < XContainer > xContainer ( xSelector , UNO_QUERY ) ;
if ( xContainer . is ( ) )
xContainer - > addContainerListener ( this ) ;
2000-09-18 16:07:07 +00:00
2006-11-14 12:24:06 +00:00
Reference < XEnumerationAccess > xElementAccess ( xSelector , UNO_QUERY ) ;
if ( xElementAccess . is ( ) )
{
Reference < XEnumeration > xEnumeration ( xElementAccess - > createEnumeration ( ) ) ;
Reference < XControl > xSubControl ;
while ( xEnumeration - > hasMoreElements ( ) )
2000-09-18 16:07:07 +00:00
{
2006-11-14 12:24:06 +00:00
xEnumeration - > nextElement ( ) > > = xSubControl ;
if ( xSubControl . is ( ) )
2000-09-18 16:07:07 +00:00
{
2006-11-14 12:24:06 +00:00
Reference < XPropertySet > xSet ( xSubControl - > getModel ( ) , UNO_QUERY ) ;
if ( xSet . is ( ) & & : : comphelper : : hasProperty ( FM_PROP_BOUNDFIELD , xSet ) )
2000-09-18 16:07:07 +00:00
{
2006-11-14 12:24:06 +00:00
// does the model use a bound field ?
Reference < XPropertySet > xField ;
xSet - > getPropertyValue ( FM_PROP_BOUNDFIELD ) > > = xField ;
Reference < XTextComponent > xText ( xSubControl , UNO_QUERY ) ;
// may we filter the field?
if ( xText . is ( ) & & xField . is ( ) & & : : comphelper : : hasProperty ( FM_PROP_SEARCHABLE , xField ) & &
: : comphelper : : getBOOL ( xField - > getPropertyValue ( FM_PROP_SEARCHABLE ) ) )
2000-09-18 16:07:07 +00:00
{
2006-11-14 12:24:06 +00:00
aFieldInfos . push_back ( FmFieldInfo ( xField , xText ) ) ;
xText - > addTextListener ( this ) ;
2000-09-18 16:07:07 +00:00
}
}
}
}
}
2006-11-14 12:24:06 +00:00
continue ;
}
2000-09-18 16:07:07 +00:00
2006-11-14 12:24:06 +00:00
Reference < XPropertySet > xModel ( xControl - > getModel ( ) , UNO_QUERY ) ;
if ( xModel . is ( ) & & : : comphelper : : hasProperty ( FM_PROP_BOUNDFIELD , xModel ) )
{
// does the model use a bound field ?
Any aVal = xModel - > getPropertyValue ( FM_PROP_BOUNDFIELD ) ;
Reference < XPropertySet > xField ;
aVal > > = xField ;
2000-09-18 16:07:07 +00:00
2006-11-14 12:24:06 +00:00
// may we filter the field?
2000-09-18 16:07:07 +00:00
2006-11-14 12:24:06 +00:00
if ( xField . is ( )
& & : : comphelper : : hasProperty ( FM_PROP_SEARCHABLE , xField )
& & : : comphelper : : getBOOL ( xField - > getPropertyValue ( FM_PROP_SEARCHABLE ) )
)
{
// create a filter control
Sequence < Any > aCreationArgs ( 3 ) ;
2010-11-21 13:15:06 +01:00
aCreationArgs [ 0 ] < < = NamedValue ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " MessageParent " ) ) , makeAny ( VCLUnoHelper : : GetInterface ( getDialogParentWindow ( ) ) ) ) ;
aCreationArgs [ 1 ] < < = NamedValue ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " NumberFormatter " ) ) , makeAny ( xFormatter ) ) ;
aCreationArgs [ 2 ] < < = NamedValue ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " ControlModel " ) ) , makeAny ( xModel ) ) ;
2006-11-14 12:24:06 +00:00
Reference < XControl > xFilterControl (
2009-10-30 11:38:26 +01:00
m_aContext . createComponentWithArguments ( " com.sun.star.form.control.FilterControl " , aCreationArgs ) ,
2006-11-14 12:24:06 +00:00
UNO_QUERY
) ;
2009-10-23 09:46:03 +02:00
DBG_ASSERT ( xFilterControl . is ( ) , " FormController::startFiltering: could not create a filter control! " ) ;
2006-11-14 12:24:06 +00:00
if ( replaceControl ( xControl , xFilterControl ) )
2000-09-18 16:07:07 +00:00
{
2006-11-14 12:24:06 +00:00
Reference < XTextComponent > xFilterText ( xFilterControl , UNO_QUERY ) ;
aFieldInfos . push_back ( FmFieldInfo ( xField , xFilterText ) ) ;
xFilterText - > addTextListener ( this ) ;
2000-09-18 16:07:07 +00:00
}
}
2006-11-14 12:24:06 +00:00
}
else
{
// abmelden vom EventManager
2000-09-18 16:07:07 +00:00
}
}
}
// we have all filter controls now, so the next step is to read the filters from the form
// resolve all aliases and set the current filter to the according structure
setFilter ( aFieldInfos ) ;
2002-12-05 08:58:04 +00:00
Reference < XPropertySet > xSet ( m_xModelAsIndex , UNO_QUERY ) ;
if ( xSet . is ( ) )
stopFormListening ( xSet , sal_True ) ;
2000-09-18 16:07:07 +00:00
2009-04-23 10:42:05 +00:00
impl_setTextOnAllFilter_throw ( ) ;
2000-09-18 16:07:07 +00:00
// lock all controls which are not used for filtering
m_bLocked = determineLockState ( ) ;
setLocks ( ) ;
m_bAttachEvents = sal_True ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : stopFiltering ( )
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
2002-11-04 12:45:49 +00:00
if ( ! m_bFiltering ) // #104693# OJ
{ // nothing to do
2000-09-18 16:07:07 +00:00
return ;
}
m_bFiltering = sal_False ;
m_bDetachEvents = sal_False ;
2000-10-20 13:18:57 +00:00
: : comphelper : : disposeComponent ( m_xComposer ) ;
2000-09-18 16:07:07 +00:00
// Austauschen der Kontrols fuer das aktuelle Formular
2005-10-24 07:26:42 +00:00
Sequence < Reference < XControl > > aControlsCopy ( m_aControls ) ;
const Reference < XControl > * pControls = aControlsCopy . getConstArray ( ) ;
sal_Int32 nControlCount = aControlsCopy . getLength ( ) ;
2000-09-18 16:07:07 +00:00
// clear the filter control map
2009-10-29 15:55:37 +01:00
: : std : : for_each ( m_aFilterComponents . begin ( ) , m_aFilterComponents . end ( ) , RemoveComponentTextListener ( this ) ) ;
m_aFilterComponents . clear ( ) ;
2000-09-18 16:07:07 +00:00
2006-11-14 12:24:06 +00:00
for ( sal_Int32 i = nControlCount ; i > 0 ; )
2000-09-18 16:07:07 +00:00
{
2006-11-14 12:24:06 +00:00
Reference < XControl > xControl = pControls [ - - i ] ;
if ( xControl . is ( ) )
2000-09-18 16:07:07 +00:00
{
2006-11-14 12:24:06 +00:00
// now enable eventhandling again
addToEventAttacher ( xControl ) ;
Reference < XModeSelector > xSelector ( xControl , UNO_QUERY ) ;
if ( xSelector . is ( ) )
2000-09-18 16:07:07 +00:00
{
2009-10-30 11:38:26 +01:00
xSelector - > setMode ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " DataMode " ) ) ) ;
2000-09-18 16:07:07 +00:00
2006-11-14 12:24:06 +00:00
// listening for new controls of the selector
Reference < XContainer > xContainer ( xSelector , UNO_QUERY ) ;
if ( xContainer . is ( ) )
xContainer - > removeContainerListener ( this ) ;
continue ;
}
2000-09-18 16:07:07 +00:00
2006-11-14 12:24:06 +00:00
Reference < XPropertySet > xSet ( xControl - > getModel ( ) , UNO_QUERY ) ;
if ( xSet . is ( ) & & : : comphelper : : hasProperty ( FM_PROP_BOUNDFIELD , xSet ) )
{
// does the model use a bound field ?
Reference < XPropertySet > xField ;
xSet - > getPropertyValue ( FM_PROP_BOUNDFIELD ) > > = xField ;
2000-09-18 16:07:07 +00:00
2006-11-14 12:24:06 +00:00
// may we filter the field?
if ( xField . is ( )
& & : : comphelper : : hasProperty ( FM_PROP_SEARCHABLE , xField )
& & : : comphelper : : getBOOL ( xField - > getPropertyValue ( FM_PROP_SEARCHABLE ) )
)
2000-09-18 16:07:07 +00:00
{
2006-11-14 12:24:06 +00:00
: : rtl : : OUString sServiceName ;
OSL_VERIFY ( xSet - > getPropertyValue ( FM_PROP_DEFAULTCONTROL ) > > = sServiceName ) ;
2009-10-30 11:38:26 +01:00
Reference < XControl > xNewControl ( m_aContext . createComponent ( sServiceName ) , UNO_QUERY ) ;
2006-11-14 12:24:06 +00:00
replaceControl ( xControl , xNewControl ) ;
2000-09-18 16:07:07 +00:00
}
}
}
}
2002-12-05 08:58:04 +00:00
Reference < XPropertySet > xSet ( m_xModelAsIndex , UNO_QUERY ) ;
if ( xSet . is ( ) )
startFormListening ( xSet , sal_True ) ;
2000-09-18 16:07:07 +00:00
m_bDetachEvents = sal_True ;
2009-10-29 15:55:37 +01:00
m_aFilterRows . clear ( ) ;
m_nCurrentFilterPosition = - 1 ;
2000-09-18 16:07:07 +00:00
// release the locks if possible
// lock all controls which are not used for filtering
m_bLocked = determineLockState ( ) ;
setLocks ( ) ;
// restart listening for control modifications
if ( isListeningForChanges ( ) )
startListening ( ) ;
}
2004-04-13 10:05:48 +00:00
// XModeSelector
2000-09-18 16:07:07 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : setMode ( const : : rtl : : OUString & Mode ) throw ( NoSupportException , RuntimeException )
2000-09-18 16:07:07 +00:00
{
2003-05-19 11:51:00 +00:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2009-10-29 11:59:44 +01:00
impl_checkDisposed_throw ( ) ;
2003-05-19 11:51:00 +00:00
2000-09-18 16:07:07 +00:00
if ( ! supportsMode ( Mode ) )
2004-04-13 10:05:48 +00:00
throw NoSupportException ( ) ;
2000-09-18 16:07:07 +00:00
if ( Mode = = m_aMode )
return ;
m_aMode = Mode ;
2011-01-20 11:23:45 +01:00
if ( Mode . equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( " FilterMode " ) ) )
2000-09-18 16:07:07 +00:00
startFiltering ( ) ;
else
stopFiltering ( ) ;
for ( FmFormControllers : : const_iterator i = m_aChilds . begin ( ) ;
2003-05-19 11:51:00 +00:00
i ! = m_aChilds . end ( ) ; + + i )
2000-09-18 16:07:07 +00:00
{
2004-04-13 10:05:48 +00:00
Reference < XModeSelector > xMode ( * i , UNO_QUERY ) ;
2003-05-19 11:51:00 +00:00
if ( xMode . is ( ) )
xMode - > setMode ( Mode ) ;
2000-09-18 16:07:07 +00:00
}
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
: : rtl : : OUString SAL_CALL FormController : : getMode ( void ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2009-10-29 11:59:44 +01:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
impl_checkDisposed_throw ( ) ;
2000-09-18 16:07:07 +00:00
return m_aMode ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
Sequence < : : rtl : : OUString > SAL_CALL FormController : : getSupportedModes ( void ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2009-10-29 11:59:44 +01:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
impl_checkDisposed_throw ( ) ;
2000-09-18 16:07:07 +00:00
static Sequence < : : rtl : : OUString > aModes ;
if ( ! aModes . getLength ( ) )
{
aModes . realloc ( 2 ) ;
: : rtl : : OUString * pModes = aModes . getArray ( ) ;
2009-10-30 11:38:26 +01:00
pModes [ 0 ] = : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " DataMode " ) ) ;
pModes [ 1 ] = : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " FilterMode " ) ) ;
2000-09-18 16:07:07 +00:00
}
return aModes ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
sal_Bool SAL_CALL FormController : : supportsMode ( const : : rtl : : OUString & Mode ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2009-10-29 11:59:44 +01:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
impl_checkDisposed_throw ( ) ;
2000-09-18 16:07:07 +00:00
Sequence < : : rtl : : OUString > aModes ( getSupportedModes ( ) ) ;
const : : rtl : : OUString * pModes = aModes . getConstArray ( ) ;
for ( sal_Int32 i = aModes . getLength ( ) ; i > 0 ; )
{
if ( pModes [ - - i ] = = Mode )
return sal_True ;
}
return sal_False ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
Window * FormController : : getDialogParentWindow ( )
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
2009-10-23 16:03:52 +02:00
Window * pParentWindow = NULL ;
try
2000-09-18 16:07:07 +00:00
{
2009-10-23 16:03:52 +02:00
Reference < XControl > xContainerControl ( getContainer ( ) , UNO_QUERY_THROW ) ;
Reference < XWindowPeer > xContainerPeer ( xContainerControl - > getPeer ( ) , UNO_QUERY_THROW ) ;
pParentWindow = VCLUnoHelper : : GetWindow ( xContainerPeer ) ;
2000-09-18 16:07:07 +00:00
}
2009-10-23 16:03:52 +02:00
catch ( const Exception & )
{
DBG_UNHANDLED_EXCEPTION ( ) ;
2000-09-18 16:07:07 +00:00
}
2009-10-23 16:03:52 +02:00
return pParentWindow ;
2000-09-18 16:07:07 +00:00
}
2004-04-02 09:29:20 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
bool FormController : : checkFormComponentValidity ( : : rtl : : OUString & /* [out] */ _rFirstInvalidityExplanation , Reference < XControlModel > & /* [out] */ _rxFirstInvalidModel ) SAL_THROW ( ( ) )
2004-04-02 09:29:20 +00:00
{
try
{
Reference < XEnumerationAccess > xControlEnumAcc ( getModel ( ) , UNO_QUERY ) ;
Reference < XEnumeration > xControlEnumeration ;
if ( xControlEnumAcc . is ( ) )
xControlEnumeration = xControlEnumAcc - > createEnumeration ( ) ;
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( xControlEnumeration . is ( ) , " FormController::checkFormComponentValidity: cannot enumerate the controls! " ) ;
2004-04-02 09:29:20 +00:00
if ( ! xControlEnumeration . is ( ) )
// assume all valid
return true ;
Reference < XValidatableFormComponent > xValidatable ;
while ( xControlEnumeration - > hasMoreElements ( ) )
{
if ( ! ( xControlEnumeration - > nextElement ( ) > > = xValidatable ) )
// control does not support validation
continue ;
if ( xValidatable - > isValid ( ) )
continue ;
Reference < XValidator > xValidator ( xValidatable - > getValidator ( ) ) ;
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( xValidator . is ( ) , " FormController::checkFormComponentValidity: invalid, but no validator? " ) ;
2004-04-02 09:29:20 +00:00
if ( ! xValidator . is ( ) )
// this violates the interface definition of css.form.validation.XValidatableFormComponent ...
continue ;
_rFirstInvalidityExplanation = xValidator - > explainInvalid ( xValidatable - > getCurrentValue ( ) ) ;
_rxFirstInvalidModel = _rxFirstInvalidModel . query ( xValidatable ) ;
return false ;
}
}
catch ( const Exception & )
{
2009-10-23 16:03:52 +02:00
DBG_UNHANDLED_EXCEPTION ( ) ;
2004-04-02 09:29:20 +00:00
}
return true ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
Reference < XControl > FormController : : locateControl ( const Reference < XControlModel > & _rxModel ) SAL_THROW ( ( ) )
2004-04-02 09:29:20 +00:00
{
try
{
Sequence < Reference < XControl > > aControls ( getControls ( ) ) ;
const Reference < XControl > * pControls = aControls . getConstArray ( ) ;
const Reference < XControl > * pControlsEnd = aControls . getConstArray ( ) + aControls . getLength ( ) ;
for ( ; pControls ! = pControlsEnd ; + + pControls )
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( pControls - > is ( ) , " FormController::locateControl: NULL-control? " ) ;
2004-04-02 09:29:20 +00:00
if ( pControls - > is ( ) )
{
if ( ( * pControls ) - > getModel ( ) = = _rxModel )
return * pControls ;
}
}
2011-03-19 14:09:49 +01:00
OSL_FAIL ( " FormController::locateControl: did not find a control for this model! " ) ;
2004-04-02 09:29:20 +00:00
}
catch ( const Exception & )
{
2009-10-23 16:03:52 +02:00
DBG_UNHANDLED_EXCEPTION ( ) ;
2004-04-02 09:29:20 +00:00
}
return NULL ;
}
//------------------------------------------------------------------------------
namespace
{
void displayErrorSetFocus ( const String & _rMessage , const Reference < XControl > & _rxFocusControl , Window * _pDialogParent )
{
SQLContext aError ;
aError . Message = String ( SVX_RES ( RID_STR_WRITEERROR ) ) ;
aError . Details = _rMessage ;
displayException ( aError , _pDialogParent ) ;
if ( _rxFocusControl . is ( ) )
{
Reference < XWindow > xControlWindow ( _rxFocusControl , UNO_QUERY ) ;
OSL_ENSURE ( xControlWindow . is ( ) , " displayErrorSetFocus: invalid control! " ) ;
if ( xControlWindow . is ( ) )
xControlWindow - > setFocus ( ) ;
}
}
2007-07-24 11:01:33 +00:00
sal_Bool lcl_shouldValidateRequiredFields_nothrow ( const Reference < XInterface > & _rxForm )
{
try
{
static : : rtl : : OUString s_sFormsCheckRequiredFields ( RTL_CONSTASCII_USTRINGPARAM ( " FormsCheckRequiredFields " ) ) ;
// first, check whether the form has a property telling us the answer
// this allows people to use the XPropertyContainer interface of a form to control
// the behaviour on a per-form basis.
Reference < XPropertySet > xFormProps ( _rxForm , UNO_QUERY_THROW ) ;
Reference < XPropertySetInfo > xPSI ( xFormProps - > getPropertySetInfo ( ) ) ;
if ( xPSI - > hasPropertyByName ( s_sFormsCheckRequiredFields ) )
{
sal_Bool bShouldValidate = true ;
OSL_VERIFY ( xFormProps - > getPropertyValue ( s_sFormsCheckRequiredFields ) > > = bShouldValidate ) ;
return bShouldValidate ;
}
// next, check the data source which created the connection
Reference < XChild > xConnectionAsChild ( xFormProps - > getPropertyValue ( FM_PROP_ACTIVE_CONNECTION ) , UNO_QUERY_THROW ) ;
Reference < XPropertySet > xDataSource ( xConnectionAsChild - > getParent ( ) , UNO_QUERY ) ;
if ( ! xDataSource . is ( ) )
// seldom (but possible): this is not a connection created by a data source
return sal_True ;
Reference < XPropertySet > xDataSourceSettings (
xDataSource - > getPropertyValue ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " Settings " ) ) ) ,
UNO_QUERY_THROW ) ;
sal_Bool bShouldValidate = true ;
OSL_VERIFY ( xDataSourceSettings - > getPropertyValue ( s_sFormsCheckRequiredFields ) > > = bShouldValidate ) ;
return bShouldValidate ;
}
catch ( const Exception & )
{
DBG_UNHANDLED_EXCEPTION ( ) ;
}
return sal_True ;
}
2004-04-02 09:29:20 +00:00
}
2004-04-13 10:05:48 +00:00
// XRowSetApproveListener
2000-09-18 16:07:07 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
sal_Bool SAL_CALL FormController : : approveRowChange ( const RowChangeEvent & _rEvent ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2008-12-01 12:31:27 +00:00
: : osl : : ClearableMutexGuard aGuard ( m_aMutex ) ;
2009-10-29 11:59:44 +01:00
impl_checkDisposed_throw ( ) ;
2008-12-01 12:31:27 +00:00
2000-09-18 16:07:07 +00:00
: : cppu : : OInterfaceIteratorHelper aIter ( m_aRowSetApproveListeners ) ;
sal_Bool bValid = sal_True ;
if ( aIter . hasMoreElements ( ) )
{
2007-07-24 11:01:33 +00:00
RowChangeEvent aEvt ( _rEvent ) ;
2000-09-18 16:07:07 +00:00
aEvt . Source = * this ;
2004-04-13 10:05:48 +00:00
bValid = ( ( XRowSetApproveListener * ) aIter . next ( ) ) - > approveRowChange ( aEvt ) ;
2000-09-18 16:07:07 +00:00
}
2007-07-24 11:01:33 +00:00
if ( ! bValid )
return bValid ;
if ( ( _rEvent . Action ! = RowChangeAction : : INSERT )
& & ( _rEvent . Action ! = RowChangeAction : : UPDATE )
)
return bValid ;
// if some of the control models are bound to validators, check them
: : rtl : : OUString sInvalidityExplanation ;
Reference < XControlModel > xInvalidModel ;
if ( ! checkFormComponentValidity ( sInvalidityExplanation , xInvalidModel ) )
2000-09-18 16:07:07 +00:00
{
2008-12-01 12:31:27 +00:00
Reference < XControl > xControl ( locateControl ( xInvalidModel ) ) ;
aGuard . clear ( ) ;
displayErrorSetFocus ( sInvalidityExplanation , xControl , getDialogParentWindow ( ) ) ;
2007-07-24 11:01:33 +00:00
return false ;
}
2004-04-02 09:29:20 +00:00
2007-07-24 11:01:33 +00:00
// check values on NULL and required flag
if ( ! lcl_shouldValidateRequiredFields_nothrow ( _rEvent . Source ) )
return sal_True ;
2000-09-18 16:07:07 +00:00
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( m_pColumnInfoCache . get ( ) , " FormController::approveRowChange: no column infos! " ) ;
2008-12-01 12:31:27 +00:00
if ( ! m_pColumnInfoCache . get ( ) )
return sal_True ;
2007-07-24 11:01:33 +00:00
try
{
2008-12-01 12:31:27 +00:00
if ( ! m_pColumnInfoCache - > controlsInitialized ( ) )
m_pColumnInfoCache - > initializeControls ( getControls ( ) ) ;
2000-09-18 16:07:07 +00:00
2008-12-01 12:31:27 +00:00
size_t colCount = m_pColumnInfoCache - > getColumnCount ( ) ;
for ( size_t col = 0 ; col < colCount ; + + col )
2000-09-18 16:07:07 +00:00
{
2008-12-01 12:31:27 +00:00
const ColumnInfo & rColInfo = m_pColumnInfoCache - > getColumnInfo ( col ) ;
if ( rColInfo . nNullable ! = ColumnValue : : NO_NULLS )
2000-09-18 16:07:07 +00:00
continue ;
2008-12-01 12:31:27 +00:00
if ( rColInfo . bAutoIncrement )
2000-09-18 16:07:07 +00:00
continue ;
CWS-TOOLING: integrate CWS dba32g
2009-09-09 07:53:55 +0200 oj r275964 : replace strlen with rtl_str_getLength
2009-09-07 20:59:10 +0200 fs r275913 : disable the CopyTableWizard test until issue 104869 is fixed
2009-09-07 12:17:31 +0200 oj r275885 : #i104810# remove de as lang
2009-09-05 22:26:21 +0200 fs r275857 : protect StateChanged against re-entrance
2009-09-05 22:25:52 +0200 fs r275856 : don't attempt to classify the parent of a form as control
2009-09-05 22:25:29 +0200 fs r275855 : protect against re-entrance
2009-09-05 00:11:40 +0200 fs r275835 : #i10000#
2009-09-04 23:25:50 +0200 fs r275834 : #i10000#
2009-09-04 23:23:47 +0200 fs r275833 : #i10000#
2009-09-04 21:49:37 +0200 fs r275830 : #i10000# correct wrong conflict resolution
2009-09-04 20:59:51 +0200 fs r275829 : CWS-TOOLING: rebase CWS dba32g to trunk@275801 (milestone: DEV300:m57)
2009-09-04 11:08:32 +0200 oj r275791 : #i104780# new version 1.2.0
2009-09-03 22:29:21 +0200 fs r275775 : OSL_TRACE doesn't need \n anymore
2009-09-03 08:33:21 +0200 fs r275743 : CWS-TOOLING: rebase CWS dba32g to trunk@275331 (milestone: DEV300:m56)
2009-09-02 13:48:12 +0200 fs r275708 : removed useless include
2009-09-02 13:45:43 +0200 fs r275707 : more since tags, which are used across offapi/udkapi
2009-09-02 13:23:04 +0200 fs r275705 : should *not* have the dtor, copy ctor, and assignment operator compiler-generated, else we run into trouble as soon as the compiler creates different versions of our singleton member's static data in different libraries
2009-09-02 12:32:45 +0200 fs r275704 : AutoIncrementIsPrimaryKey is a driver setting, not a data source setting
2009-09-02 11:42:49 +0200 fs r275701 : URL meta data are meta data which are valid for all connections of this type, not per-data-source properties. Settings them as data source properties is a hack.
2009-09-02 08:43:34 +0200 fs r275696 : 3.x.x is not a valid 'since' tag
2009-09-01 16:05:24 +0200 fs r275665 : #i104686# don't treat controls bound to read-only columns as required
2009-09-01 13:10:22 +0200 fs r275657 : #i104574# use PageUp/Down to scroll through the complete page
2009-09-01 07:04:48 +0200 oj r275641 : #i104104# correct line ends
2009-08-31 15:52:34 +0200 fs r275612 : #i104410#
2009-08-31 12:29:05 +0200 fs r275596 : #i104364#
2009-08-31 12:28:56 +0200 fs r275595 : #i104364#
2009-08-31 11:43:09 +0200 fs r275593 : #i104649# JavaDriverClassPath is also a known JDBC-bridge setting
2009-08-31 11:41:37 +0200 fs r275592 : #i104649#
2009-08-28 21:48:27 +0200 fs r275552 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI
2009-08-28 21:48:17 +0200 fs r275551 : #i96862# do not show the 'Create a new database' option when a) no embedded/dBase driver is installed or b) the configuration requests to hide the option
2009-08-28 21:47:19 +0200 fs r275550 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI
2009-08-28 21:46:41 +0200 fs r275549 : #i96862# renamed and extended the configuration data which controls availability of certain DBA-related UI
2009-08-28 15:10:19 +0200 fs r275535 : #i96862# if no embedded driver is installed, use dBase for creating new DBs. If no dBase driver is installed, too, do not offer the 'Create new database' option
2009-08-28 14:03:04 +0200 fs r275532 : #i104454# allow multiple fields to display the same column
2009-08-28 13:14:00 +0200 fs r275528 : #i104584# driver meta data do not belong into a data source's settings
2009-08-28 13:09:57 +0200 fs r275527 : properly chech the MySQL type buttons (else next/back in the wizard leads to state with two buttons checked)
2009-08-28 13:09:17 +0200 fs r275526 : #i104584# driver meta data do not belong into a data source's settings
2009-08-28 13:07:18 +0200 fs r275525 : BooleanComparisonMode is a property, or a feature - but not a driver meta data
2009-08-28 11:00:31 +0200 fs r275521 : #i104580#
2009-08-28 10:40:05 +0200 fs r275519 : #i104577# correct assertion: If the template node type is ANY, then any value type is allowed
2009-08-28 10:09:30 +0200 fs r275518 : #i104575# implement Named Pipe UI
2009-08-28 10:09:07 +0200 fs r275517 : pass the trigger-event to IWindowOperator::operateOn / work with VclWindowEvents, not VclSimpleEvents
2009-08-27 14:27:36 +0200 fs r275484 : ImplPosTabPage: respect mbEmptyViewMargin for WINDOWALIGN_LEFT
2009-08-27 13:43:56 +0200 fs r275480 : merging latest changes from CWS dba32f herein
2009-08-27 13:23:07 +0200 fs r275475 : #i103882#
2009-08-27 11:56:55 +0200 fs r275466 : #i104544# SetState: Do not call Update at the window which we just set text for. It should (sic\!) not be needed, but causes trouble
2009-08-27 11:55:34 +0200 fs r275465 : #i104544#
do not allow re-entrance for impl_ensureControl_nothrow
Actually, this is part of the fix only. I also removed the code which triggered this re-entrance (from
the grid control implementation), but to ensure it won't happen, again, I added some safety herein.
2009-08-27 10:14:11 +0200 fs r275459 : preparations for supporting a 'NamedPipe' parameter for the MySQL Connector/OOo
2009-08-27 10:13:21 +0200 fs r275458 : preparations for supporting a 'NamedPipe' setting for the MySQL Connector/OOo
2009-08-27 10:11:14 +0200 fs r275456 : outsourced the MySQLNative settings into a dedicated class, to not duplicate all the code in two tab page implementations
2009-08-26 14:18:13 +0200 fs r275422 : #i10000#
2009-08-26 13:26:36 +0200 fs r275419 : ignore output paths
2009-08-26 13:23:38 +0200 fs r275417 : support the LocalSocket property for the MySQL native driver
2009-08-26 13:17:05 +0200 fs r275416 : some re-factoring, to outsource the tab page for setting up the MySQLNative connection, into a dedicated class (needed later)
2009-08-26 13:15:15 +0200 fs r275415 : support a NoThousandSep property for NumericFormatters - I'm tired of correcting this at runtime, instead of controlling it in the resource
2009-08-26 11:45:08 +0200 fs r275410 : oops, 'flat' shouldn't have got lost
2009-08-26 09:38:57 +0200 fs r275398 : #i102631# when saving the document fails, ensure that the interaction handler really can handle/display the error
2009-08-26 09:37:05 +0200 fs r275397 : #i102631# don't let non-IO/RuntimeExceptions escape from DatabaseDocument::store*, wrap them into an IOException
2009-08-26 09:35:39 +0200 fs r275395 : let the default interaction handler implement XInteractionHandler2
2009-08-25 13:51:34 +0200 fs r275352 : #i102631# createTempFile: pass URL through FileHelper.getOOoCompatibleFileURL
2009-08-25 13:49:23 +0200 fs r275351 : #i102631# createTempFileURL: immediately delete the file implicitly created by createTempFile, we really only need the URL
2009-08-24 14:49:07 +0200 fs r275318 : #i10000#
2009-08-24 14:36:03 +0200 fs r275315 : properly terminate message with 0 character
2009-08-24 14:35:45 +0200 fs r275314 : trace method concepts in non-pro, if special flag is enabled
2009-08-24 14:24:17 +0200 fs r275312 : #i98973# filter some more events for grid control columns
2009-08-24 14:15:23 +0200 fs r275311 : #i98973# implement XComboBox for combo box cells
2009-08-24 13:39:24 +0200 fs r275308 : #i98973# do not display the 'actionPerformed' event for grid combo box columns
2009-08-24 12:52:03 +0200 fs r275303 : #i98973# implement XCheckBox and XButton for check box cells
2009-08-24 11:56:05 +0200 oj r275300 : #i104447# wrong default for orientation
2009-08-24 10:51:21 +0200 fs r275296 : in the script selector dialog, interpret a double click onto a function as OK
2009-08-24 10:50:56 +0200 fs r275295 : localize some to-be-displayed names, consolidate some code regarding form/control naming
2009-08-21 14:28:05 +0200 fs r275255 : #i98973# implement KeyListeners
2009-08-21 14:27:20 +0200 fs r275254 : #i98973# move the conversion VCL[Mouse|Key]Event->Awt[Mouse|Key]Event from vclxwindow.cxx to VCLUnoHelper
2009-08-21 14:08:50 +0200 fs r275248 : #i98973# implement Mouse- and MouseMotion-broadcasting
2009-08-21 13:31:08 +0200 fs r275244 : #i98973# implement text and change listeners at text cells
2009-08-21 12:47:38 +0200 fs r275234 : #i104399# some refactoring:
If the MySQL Connector/OOo is installed, it registers for the sdbc:mysqlc: protocol (now known as DST_MYSQL_NATIVE_DIRECT).
However, we do not want to display this in the UI, instead we display "MySQL" only, which collects DST_MYSQL_ODBC, DST_MYSQL_JDBC, and DST_MYSQL_NATIVE.
2009-08-21 12:45:18 +0200 fs r275232 : #i104399# also register for the sdbc:mysql:mysqlc protocol, decide at runtime (depending on the availability of sdbc:mysqlc:), whether it is really accepted. This prevents that the C/OOo extension needs to register *our* implementation name for the sdbc:mysql:mysqlc: protocol, which would be somewhat weird
2009-08-20 16:18:48 +0200 fs r275190 : merging the latest changes from CWS dba32f (which this CWS was created from)
2009-08-19 20:19:59 +0200 fs r275160 : add some spacing between the radios
2009-08-19 14:50:15 +0200 fs r275150 : #i98973# slightly refactoring the grid cell implementations, to prepare for proper events being fired. Implement focus events for the moment, more to come.
2009-08-19 10:53:38 +0200 fs r275142 : #i99936# initialize newly created models
2009-08-18 23:03:48 +0200 fs r275132 : merging latest changes from CWS dba32f
2009-08-18 15:14:08 +0200 fs r275110 : #i102819# SetColumnPos: SCROLL_CLIP is deadly here
2009-09-14 11:18:01 +00:00
if ( rColInfo . bReadOnly )
continue ;
2000-09-18 16:07:07 +00:00
2008-12-01 12:31:27 +00:00
if ( ! rColInfo . xFirstControlWithInputRequired . is ( ) & & ! rColInfo . xFirstGridWithInputRequiredColumn . is ( ) )
2000-09-18 16:07:07 +00:00
continue ;
2007-07-24 11:01:33 +00:00
// TODO: in case of binary fields, this "getString" below is extremely expensive
2008-12-01 12:31:27 +00:00
if ( rColInfo . xColumn - > getString ( ) . getLength ( ) | | ! rColInfo . xColumn - > wasNull ( ) )
continue ;
2000-09-18 16:07:07 +00:00
2008-12-01 12:31:27 +00:00
String sMessage ( SVX_RES ( RID_ERR_FIELDREQUIRED ) ) ;
sMessage . SearchAndReplace ( ' # ' , rColInfo . sName ) ;
2001-07-25 12:44:28 +00:00
2008-12-01 12:31:27 +00:00
// the control to focus
Reference < XControl > xControl ( rColInfo . xFirstControlWithInputRequired ) ;
if ( ! xControl . is ( ) )
xControl . set ( rColInfo . xFirstGridWithInputRequiredColumn , UNO_QUERY ) ;
aGuard . clear ( ) ;
displayErrorSetFocus ( sMessage , rColInfo . xFirstControlWithInputRequired , getDialogParentWindow ( ) ) ;
return sal_False ;
2000-09-18 16:07:07 +00:00
}
}
2007-07-24 11:01:33 +00:00
catch ( const Exception & )
{
DBG_UNHANDLED_EXCEPTION ( ) ;
}
return true ;
2000-09-18 16:07:07 +00:00
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
sal_Bool SAL_CALL FormController : : approveCursorMove ( const EventObject & event ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2003-05-19 11:51:00 +00:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2009-10-29 11:59:44 +01:00
impl_checkDisposed_throw ( ) ;
2000-09-18 16:07:07 +00:00
: : cppu : : OInterfaceIteratorHelper aIter ( m_aRowSetApproveListeners ) ;
if ( aIter . hasMoreElements ( ) )
{
2004-04-13 10:05:48 +00:00
EventObject aEvt ( event ) ;
2000-09-18 16:07:07 +00:00
aEvt . Source = * this ;
2004-04-13 10:05:48 +00:00
return ( ( XRowSetApproveListener * ) aIter . next ( ) ) - > approveCursorMove ( aEvt ) ;
2000-09-18 16:07:07 +00:00
}
return sal_True ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
sal_Bool SAL_CALL FormController : : approveRowSetChange ( const EventObject & event ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2003-05-19 11:51:00 +00:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2009-10-29 11:59:44 +01:00
impl_checkDisposed_throw ( ) ;
2000-09-18 16:07:07 +00:00
: : cppu : : OInterfaceIteratorHelper aIter ( m_aRowSetApproveListeners ) ;
if ( aIter . hasMoreElements ( ) )
{
2004-04-13 10:05:48 +00:00
EventObject aEvt ( event ) ;
2000-09-18 16:07:07 +00:00
aEvt . Source = * this ;
2004-04-13 10:05:48 +00:00
return ( ( XRowSetApproveListener * ) aIter . next ( ) ) - > approveRowSetChange ( aEvt ) ;
2000-09-18 16:07:07 +00:00
}
return sal_True ;
}
2004-04-13 10:05:48 +00:00
// XRowSetApproveBroadcaster
2000-09-18 16:07:07 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : addRowSetApproveListener ( const Reference < XRowSetApproveListener > & _rxListener ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2003-05-19 11:51:00 +00:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2009-10-29 11:59:44 +01:00
impl_checkDisposed_throw ( ) ;
2000-09-18 16:07:07 +00:00
m_aRowSetApproveListeners . addInterface ( _rxListener ) ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : removeRowSetApproveListener ( const Reference < XRowSetApproveListener > & _rxListener ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2003-05-19 11:51:00 +00:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2009-10-29 11:59:44 +01:00
impl_checkDisposed_throw ( ) ;
2000-09-18 16:07:07 +00:00
m_aRowSetApproveListeners . removeInterface ( _rxListener ) ;
}
2004-04-13 10:05:48 +00:00
// XErrorListener
2000-09-18 16:07:07 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : errorOccured ( const SQLErrorEvent & aEvent ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2008-12-01 12:31:27 +00:00
: : osl : : ClearableMutexGuard aGuard ( m_aMutex ) ;
2009-10-29 11:59:44 +01:00
impl_checkDisposed_throw ( ) ;
2000-09-18 16:07:07 +00:00
: : cppu : : OInterfaceIteratorHelper aIter ( m_aErrorListeners ) ;
if ( aIter . hasMoreElements ( ) )
{
2004-04-13 10:05:48 +00:00
SQLErrorEvent aEvt ( aEvent ) ;
2000-09-18 16:07:07 +00:00
aEvt . Source = * this ;
2004-04-13 10:05:48 +00:00
( ( XSQLErrorListener * ) aIter . next ( ) ) - > errorOccured ( aEvt ) ;
2000-09-18 16:07:07 +00:00
}
else
{
2008-12-01 12:31:27 +00:00
aGuard . clear ( ) ;
displayException ( aEvent ) ;
2000-09-18 16:07:07 +00:00
}
}
2004-04-13 10:05:48 +00:00
// XErrorBroadcaster
2000-09-18 16:07:07 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : addSQLErrorListener ( const Reference < XSQLErrorListener > & aListener ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2003-05-19 11:51:00 +00:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2009-10-29 11:59:44 +01:00
impl_checkDisposed_throw ( ) ;
2000-09-18 16:07:07 +00:00
m_aErrorListeners . addInterface ( aListener ) ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : removeSQLErrorListener ( const Reference < XSQLErrorListener > & aListener ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2003-05-19 11:51:00 +00:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
2009-10-29 11:59:44 +01:00
impl_checkDisposed_throw ( ) ;
2000-09-18 16:07:07 +00:00
m_aErrorListeners . removeInterface ( aListener ) ;
}
2004-06-28 15:57:45 +00:00
// XDatabaseParameterBroadcaster2
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : addDatabaseParameterListener ( const Reference < XDatabaseParameterListener > & aListener ) throw ( RuntimeException )
2004-06-28 15:57:45 +00:00
{
2009-10-29 11:59:44 +01:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
impl_checkDisposed_throw ( ) ;
2004-06-28 15:57:45 +00:00
m_aParameterListeners . addInterface ( aListener ) ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : removeDatabaseParameterListener ( const Reference < XDatabaseParameterListener > & aListener ) throw ( RuntimeException )
2004-06-28 15:57:45 +00:00
{
2009-10-29 11:59:44 +01:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
impl_checkDisposed_throw ( ) ;
2004-06-28 15:57:45 +00:00
m_aParameterListeners . removeInterface ( aListener ) ;
}
2004-04-13 10:05:48 +00:00
// XDatabaseParameterBroadcaster
2000-09-18 16:07:07 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : addParameterListener ( const Reference < XDatabaseParameterListener > & aListener ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
FormController : : addDatabaseParameterListener ( aListener ) ;
2000-09-18 16:07:07 +00:00
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : removeParameterListener ( const Reference < XDatabaseParameterListener > & aListener ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
FormController : : removeDatabaseParameterListener ( aListener ) ;
2000-09-18 16:07:07 +00:00
}
2004-04-13 10:05:48 +00:00
// XDatabaseParameterListener
2000-09-18 16:07:07 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
sal_Bool SAL_CALL FormController : : approveParameter ( const DatabaseParameterEvent & aEvent ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2010-10-13 02:47:36 -05:00
SolarMutexGuard aSolarGuard ;
2009-10-29 11:59:44 +01:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
impl_checkDisposed_throw ( ) ;
2000-09-18 16:07:07 +00:00
: : cppu : : OInterfaceIteratorHelper aIter ( m_aParameterListeners ) ;
if ( aIter . hasMoreElements ( ) )
{
2004-04-13 10:05:48 +00:00
DatabaseParameterEvent aEvt ( aEvent ) ;
2000-09-18 16:07:07 +00:00
aEvt . Source = * this ;
2004-04-13 10:05:48 +00:00
return ( ( XDatabaseParameterListener * ) aIter . next ( ) ) - > approveParameter ( aEvt ) ;
2000-09-18 16:07:07 +00:00
}
else
{
2000-10-31 08:31:59 +00:00
// default handling: instantiate an interaction handler and let it handle the parameter request
try
{
2004-11-16 10:22:40 +00:00
if ( ! ensureInteractionHandler ( ) )
return sal_False ;
2000-10-31 08:31:59 +00:00
// two continuations allowed: OK and Cancel
OParameterContinuation * pParamValues = new OParameterContinuation ;
OInteractionAbort * pAbort = new OInteractionAbort ;
// the request
ParametersRequest aRequest ;
aRequest . Parameters = aEvent . Parameters ;
2002-10-07 12:09:48 +00:00
aRequest . Connection = OStaticDataAccessTools ( ) . getRowSetConnection ( Reference < XRowSet > ( aEvent . Source , UNO_QUERY ) ) ;
2000-10-31 08:31:59 +00:00
OInteractionRequest * pParamRequest = new OInteractionRequest ( makeAny ( aRequest ) ) ;
Reference < XInteractionRequest > xParamRequest ( pParamRequest ) ;
// some knittings
pParamRequest - > addContinuation ( pParamValues ) ;
pParamRequest - > addContinuation ( pAbort ) ;
2004-11-16 10:22:40 +00:00
// handle the request
2009-10-29 13:18:02 +01:00
m_xInteractionHandler - > handle ( xParamRequest ) ;
2000-09-18 16:07:07 +00:00
2000-10-31 08:31:59 +00:00
if ( ! pParamValues - > wasSelected ( ) )
// canceled
return sal_False ;
// transfer the values into the parameter supplier
Sequence < PropertyValue > aFinalValues = pParamValues - > getValues ( ) ;
if ( aFinalValues . getLength ( ) ! = aRequest . Parameters - > getCount ( ) )
{
2011-03-01 19:07:44 +01:00
OSL_FAIL ( " FormController::approveParameter: the InteractionHandler returned nonsense! " ) ;
2000-10-31 08:31:59 +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 ) ) ;
if ( xParam . is ( ) )
{
# ifdef DBG_UTIL
: : rtl : : OUString sName ;
xParam - > getPropertyValue ( FM_PROP_NAME ) > > = sName ;
2009-10-23 09:46:03 +02:00
DBG_ASSERT ( sName . equals ( pFinalValues - > Name ) , " FormController::approveParameter: suspicious value names! " ) ;
2000-10-31 08:31:59 +00:00
# endif
try { xParam - > setPropertyValue ( FM_PROP_VALUE , pFinalValues - > Value ) ; }
catch ( Exception & )
{
2011-03-01 19:07:44 +01:00
OSL_FAIL ( " FormController::approveParameter: setting one of the properties failed! " ) ;
2000-10-31 08:31:59 +00:00
}
}
}
}
catch ( Exception & )
{
2009-10-23 16:03:52 +02:00
DBG_UNHANDLED_EXCEPTION ( ) ;
2000-10-31 08:31:59 +00:00
}
2000-09-18 16:07:07 +00:00
}
return sal_True ;
}
2004-04-13 10:05:48 +00:00
// XConfirmDeleteBroadcaster
2000-09-18 16:07:07 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : addConfirmDeleteListener ( const Reference < XConfirmDeleteListener > & aListener ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2009-10-29 11:59:44 +01:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
impl_checkDisposed_throw ( ) ;
2000-09-18 16:07:07 +00:00
m_aDeleteListeners . addInterface ( aListener ) ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : removeConfirmDeleteListener ( const Reference < XConfirmDeleteListener > & aListener ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2009-10-29 11:59:44 +01:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
impl_checkDisposed_throw ( ) ;
2000-09-18 16:07:07 +00:00
m_aDeleteListeners . removeInterface ( aListener ) ;
}
2004-04-13 10:05:48 +00:00
// XConfirmDeleteListener
2000-09-18 16:07:07 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
sal_Bool SAL_CALL FormController : : confirmDelete ( const RowChangeEvent & aEvent ) throw ( RuntimeException )
2000-09-18 16:07:07 +00:00
{
2009-10-29 11:59:44 +01:00
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
impl_checkDisposed_throw ( ) ;
2000-09-18 16:07:07 +00:00
: : cppu : : OInterfaceIteratorHelper aIter ( m_aDeleteListeners ) ;
if ( aIter . hasMoreElements ( ) )
{
2004-04-13 10:05:48 +00:00
RowChangeEvent aEvt ( aEvent ) ;
2000-09-18 16:07:07 +00:00
aEvt . Source = * this ;
2004-04-13 10:05:48 +00:00
return ( ( XConfirmDeleteListener * ) aIter . next ( ) ) - > confirmDelete ( aEvt ) ;
2000-09-18 16:07:07 +00:00
}
2009-10-30 12:03:32 +01:00
// default handling: instantiate an interaction handler and let it handle the request
String sTitle ;
sal_Int32 nLength = aEvent . Rows ;
if ( nLength > 1 )
{
sTitle = SVX_RES ( RID_STR_DELETECONFIRM_RECORDS ) ;
sTitle . SearchAndReplace ( ' # ' , String : : CreateFromInt32 ( nLength ) ) ;
}
2000-09-18 16:07:07 +00:00
else
2009-10-30 12:03:32 +01:00
sTitle = SVX_RES ( RID_STR_DELETECONFIRM_RECORD ) ;
try
2000-09-18 16:07:07 +00:00
{
2009-10-30 12:03:32 +01:00
if ( ! ensureInteractionHandler ( ) )
return sal_False ;
// two continuations allowed: Yes and No
OInteractionApprove * pApprove = new OInteractionApprove ;
OInteractionDisapprove * pDisapprove = new OInteractionDisapprove ;
2000-09-18 16:07:07 +00:00
2009-10-30 12:03:32 +01:00
// the request
SQLWarning aWarning ;
aWarning . Message = sTitle ;
SQLWarning aDetails ;
aDetails . Message = String ( SVX_RES ( RID_STR_DELETECONFIRM ) ) ;
aWarning . NextException < < = aDetails ;
2000-09-18 16:07:07 +00:00
2009-10-30 12:03:32 +01:00
OInteractionRequest * pRequest = new OInteractionRequest ( makeAny ( aWarning ) ) ;
Reference < XInteractionRequest > xRequest ( pRequest ) ;
// some knittings
pRequest - > addContinuation ( pApprove ) ;
pRequest - > addContinuation ( pDisapprove ) ;
// handle the request
m_xInteractionHandler - > handle ( xRequest ) ;
if ( pApprove - > wasSelected ( ) )
return sal_True ;
}
catch ( const Exception & )
{
DBG_UNHANDLED_EXCEPTION ( ) ;
2000-09-18 16:07:07 +00:00
}
2009-10-30 12:03:32 +01:00
return sal_False ;
2000-09-18 16:07:07 +00:00
}
//------------------------------------------------------------------------------
2009-10-30 11:38:26 +01:00
void SAL_CALL FormController : : invalidateFeatures ( const Sequence < : : sal_Int16 > & _Features ) throw ( RuntimeException )
2004-04-13 10:05:48 +00:00
{
: : osl : : MutexGuard aGuard ( m_aMutex ) ;
// for now, just copy the ids of the features, because ....
2009-10-30 11:38:26 +01:00
: : std : : copy ( _Features . getConstArray ( ) , _Features . getConstArray ( ) + _Features . getLength ( ) ,
: : std : : insert_iterator < : : std : : set < sal_Int16 > > ( m_aInvalidFeatures , m_aInvalidFeatures . begin ( ) )
2004-04-13 10:05:48 +00:00
) ;
// ... we will do the real invalidation asynchronously
if ( ! m_aFeatureInvalidationTimer . IsActive ( ) )
m_aFeatureInvalidationTimer . Start ( ) ;
}
2009-10-30 11:38:26 +01:00
//------------------------------------------------------------------------------
void SAL_CALL FormController : : invalidateAllFeatures ( ) throw ( RuntimeException )
{
: : osl : : ClearableMutexGuard aGuard ( m_aMutex ) ;
Sequence < sal_Int16 > aInterceptedFeatures ( m_aFeatureDispatchers . size ( ) ) ;
: : std : : transform (
m_aFeatureDispatchers . begin ( ) ,
m_aFeatureDispatchers . end ( ) ,
aInterceptedFeatures . getArray ( ) ,
2011-02-08 17:39:27 +01:00
: : o3tl : : select1st < DispatcherContainer : : value_type > ( )
2009-10-30 11:38:26 +01:00
) ;
aGuard . clear ( ) ;
if ( aInterceptedFeatures . getLength ( ) )
invalidateFeatures ( aInterceptedFeatures ) ;
}
2004-04-13 10:05:48 +00:00
//------------------------------------------------------------------------------
Reference < XDispatch >
2009-10-30 11:38:26 +01:00
FormController : : interceptedQueryDispatch ( const URL & aURL ,
2006-06-19 14:53:21 +00:00
const : : rtl : : OUString & /*aTargetFrameName*/ , sal_Int32 /*nSearchFlags*/ )
2000-09-18 16:07:07 +00:00
throw ( RuntimeException )
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
2004-04-13 10:05:48 +00:00
Reference < XDispatch > xReturn ;
2000-09-18 16:07:07 +00:00
// dispatches handled by ourself
2004-11-16 10:22:40 +00:00
if ( ( aURL . Complete = = FMURL_CONFIRM_DELETION )
2011-01-20 11:23:45 +01:00
| | ( ( aURL . Complete . equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( " private:/InteractionHandler " ) ) )
2004-11-16 10:22:40 +00:00
& & ensureInteractionHandler ( )
)
)
xReturn = static_cast < XDispatch * > ( this ) ;
2000-09-18 16:07:07 +00:00
// dispatches of FormSlot-URLs we have to translate
2009-10-30 11:38:26 +01:00
if ( ! xReturn . is ( ) & & m_xFormOperations . is ( ) )
2004-11-16 10:22:40 +00:00
{
2004-04-13 10:05:48 +00:00
// find the slot id which corresponds to the URL
2009-10-30 11:38:26 +01:00
sal_Int32 nFeatureSlotId = : : svx : : FeatureSlotTranslation : : getControllerFeatureSlotIdForURL ( aURL . Main ) ;
sal_Int16 nFormFeature = ( nFeatureSlotId ! = - 1 ) ? : : svx : : FeatureSlotTranslation : : getFormFeatureForSlotId ( nFeatureSlotId ) : - 1 ;
if ( nFormFeature > 0 )
2004-11-16 10:22:40 +00:00
{
2004-04-13 10:05:48 +00:00
// get the dispatcher for this feature, create if necessary
2009-10-30 11:38:26 +01:00
DispatcherContainer : : const_iterator aDispatcherPos = m_aFeatureDispatchers . find ( nFormFeature ) ;
2004-04-13 10:05:48 +00:00
if ( aDispatcherPos = = m_aFeatureDispatchers . end ( ) )
2000-09-18 16:07:07 +00:00
{
2004-04-13 10:05:48 +00:00
aDispatcherPos = m_aFeatureDispatchers . insert (
2009-10-30 11:38:26 +01:00
DispatcherContainer : : value_type ( nFormFeature , new : : svx : : OSingleFeatureDispatcher ( aURL , nFormFeature , m_xFormOperations , m_aMutex ) )
2004-04-13 10:05:48 +00:00
) . first ;
2000-09-18 16:07:07 +00:00
}
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( aDispatcherPos - > second . is ( ) , " FormController::interceptedQueryDispatch: should have a dispatcher by now! " ) ;
2004-04-13 10:05:48 +00:00
return aDispatcherPos - > second ;
2000-09-18 16:07:07 +00:00
}
}
// no more to offer
return xReturn ;
}
2001-06-15 10:11:14 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : dispatch ( const URL & _rURL , const Sequence < PropertyValue > & _rArgs ) throw ( RuntimeException )
2001-06-15 10:11:14 +00:00
{
2004-11-16 10:22:40 +00:00
if ( _rArgs . getLength ( ) ! = 1 )
{
2011-03-01 19:07:44 +01:00
OSL_FAIL ( " FormController::dispatch: no arguments -> no dispatch! " ) ;
2004-11-16 10:22:40 +00:00
return ;
}
2011-01-20 11:23:45 +01:00
if ( _rURL . Complete . equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( " private:/InteractionHandler " ) ) )
2004-11-16 10:22:40 +00:00
{
Reference < XInteractionRequest > xRequest ;
OSL_VERIFY ( _rArgs [ 0 ] . Value > > = xRequest ) ;
if ( xRequest . is ( ) )
handle ( xRequest ) ;
return ;
}
if ( _rURL . Complete = = FMURL_CONFIRM_DELETION )
{
2011-03-01 19:07:44 +01:00
OSL_FAIL ( " FormController::dispatch: How do you expect me to return something via this call? " ) ;
2004-11-16 10:22:40 +00:00
// confirmDelete has a return value - dispatch hasn't
return ;
}
2011-03-01 19:07:44 +01:00
OSL_FAIL ( " FormController::dispatch: unknown URL! " ) ;
2001-06-15 10:11:14 +00:00
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : addStatusListener ( const Reference < XStatusListener > & _rxListener , const URL & _rURL ) throw ( RuntimeException )
2001-06-15 10:11:14 +00:00
{
if ( _rURL . Complete = = FMURL_CONFIRM_DELETION )
{
if ( _rxListener . is ( ) )
{ // send an initial statusChanged event
FeatureStateEvent aEvent ;
aEvent . FeatureURL = _rURL ;
aEvent . IsEnabled = sal_True ;
_rxListener - > statusChanged ( aEvent ) ;
// and don't add the listener at all (the status will never change)
}
}
else
2011-03-19 14:09:49 +01:00
OSL_FAIL ( " FormController::addStatusListener: invalid (unsupported) URL! " ) ;
2001-06-15 10:11:14 +00:00
}
2009-10-23 16:03:52 +02:00
//------------------------------------------------------------------------------
Reference < XInterface > SAL_CALL FormController : : getParent ( ) throw ( RuntimeException )
{
return m_xParent ;
}
//------------------------------------------------------------------------------
void SAL_CALL FormController : : setParent ( const Reference < XInterface > & Parent ) throw ( NoSupportException , RuntimeException )
{
m_xParent = Parent ;
2001-06-15 10:11:14 +00:00
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : removeStatusListener ( const Reference < XStatusListener > & /*_rxListener*/ , const URL & _rURL ) throw ( RuntimeException )
2001-06-15 10:11:14 +00:00
{
2006-06-19 14:53:21 +00:00
( void ) _rURL ;
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( _rURL . Complete = = FMURL_CONFIRM_DELETION , " FormController::removeStatusListener: invalid (unsupported) URL! " ) ;
2001-06-15 10:11:14 +00:00
// we never really added the listener, so we don't need to remove it
}
2000-09-18 16:07:07 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
Reference < XDispatchProviderInterceptor > FormController : : createInterceptor ( const Reference < XDispatchProviderInterception > & _xInterception )
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
2006-10-12 11:44:59 +00:00
# ifdef DBG_UTIL
2000-09-18 16:07:07 +00:00
// check if we already have a interceptor for the given object
for ( ConstInterceptorsIterator aIter = m_aControlDispatchInterceptors . begin ( ) ;
aIter ! = m_aControlDispatchInterceptors . end ( ) ;
+ + aIter
)
{
if ( ( * aIter ) - > getIntercepted ( ) = = _xInterception )
2011-03-01 19:07:44 +01:00
OSL_FAIL ( " FormController::createInterceptor : we already do intercept this objects dispatches ! " ) ;
2000-09-18 16:07:07 +00:00
}
# endif
2009-10-30 11:38:26 +01:00
DispatchInterceptionMultiplexer * pInterceptor = new DispatchInterceptionMultiplexer ( _xInterception , this ) ;
2000-09-18 16:07:07 +00:00
pInterceptor - > acquire ( ) ;
2009-10-30 11:38:26 +01:00
m_aControlDispatchInterceptors . insert ( m_aControlDispatchInterceptors . end ( ) , pInterceptor ) ;
2000-09-18 16:07:07 +00:00
2009-10-30 11:38:26 +01:00
return pInterceptor ;
2000-09-18 16:07:07 +00:00
}
2004-11-16 10:22:40 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
bool FormController : : ensureInteractionHandler ( )
2004-11-16 10:22:40 +00:00
{
if ( m_xInteractionHandler . is ( ) )
return true ;
if ( m_bAttemptedHandlerCreation )
return false ;
m_bAttemptedHandlerCreation = true ;
2010-02-04 10:38:39 +01:00
m_xInteractionHandler . set ( m_aContext . createComponent ( : : rtl : : OUString ( RTL_CONSTASCII_USTRINGPARAM ( " com.sun.star.task.InteractionHandler " ) ) ) , UNO_QUERY ) ;
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( m_xInteractionHandler . is ( ) , " FormController::ensureInteractionHandler: could not create an interaction handler! " ) ;
2004-11-16 10:22:40 +00:00
return m_xInteractionHandler . is ( ) ;
}
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : handle ( const Reference < XInteractionRequest > & _rRequest ) throw ( RuntimeException )
2004-11-16 10:22:40 +00:00
{
if ( ! ensureInteractionHandler ( ) )
return ;
m_xInteractionHandler - > handle ( _rRequest ) ;
}
2000-09-18 16:07:07 +00:00
//------------------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : deleteInterceptor ( const Reference < XDispatchProviderInterception > & _xInterception )
2000-09-18 16:07:07 +00:00
{
2009-10-23 09:46:03 +02:00
OSL_ENSURE ( ! impl_isDisposed_nofail ( ) , " FormController: already disposed! " ) ;
2000-09-18 16:07:07 +00:00
// search the interceptor responsible for the given object
InterceptorsIterator aIter ;
for ( aIter = m_aControlDispatchInterceptors . begin ( ) ;
aIter ! = m_aControlDispatchInterceptors . end ( ) ;
+ + aIter
)
{
if ( ( * aIter ) - > getIntercepted ( ) = = _xInterception )
break ;
}
if ( aIter = = m_aControlDispatchInterceptors . end ( ) )
{
return ;
}
// log off the interception from it's interception object
2009-10-30 11:38:26 +01:00
DispatchInterceptionMultiplexer * pInterceptorImpl = * aIter ;
2000-09-18 16:07:07 +00:00
pInterceptorImpl - > dispose ( ) ;
pInterceptorImpl - > release ( ) ;
// remove the interceptor from our array
m_aControlDispatchInterceptors . erase ( aIter ) ;
}
2004-11-16 10:22:40 +00:00
//--------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void FormController : : implInvalidateCurrentControlDependentFeatures ( )
2004-11-16 10:22:40 +00:00
{
2009-10-30 11:38:26 +01:00
Sequence < sal_Int16 > aCurrentControlDependentFeatures ( 4 ) ;
2004-11-16 10:22:40 +00:00
2009-10-30 11:38:26 +01:00
aCurrentControlDependentFeatures [ 0 ] = FormFeature : : SortAscending ;
aCurrentControlDependentFeatures [ 1 ] = FormFeature : : SortDescending ;
aCurrentControlDependentFeatures [ 2 ] = FormFeature : : AutoFilter ;
aCurrentControlDependentFeatures [ 3 ] = FormFeature : : RefreshCurrentControl ;
2000-09-18 16:07:07 +00:00
2008-08-19 08:47:45 +00:00
invalidateFeatures ( aCurrentControlDependentFeatures ) ;
}
2000-09-18 16:07:07 +00:00
2008-08-19 08:47:45 +00:00
//--------------------------------------------------------------------
2009-10-23 09:46:03 +02:00
void SAL_CALL FormController : : columnChanged ( const EventObject & /*_event*/ ) throw ( RuntimeException )
2008-08-19 08:47:45 +00:00
{
implInvalidateCurrentControlDependentFeatures ( ) ;
2004-11-16 10:22:40 +00:00
}
2009-10-23 09:46:03 +02:00
} // namespace svxform
2010-10-12 15:53:47 +02:00
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */