* commit 'ooo/DEV300_m101': (185 commits) masterfix DEV300: #i10000# usage of L10N build_type masterfix: #i10000# INT16 -> sal_Int16 fixed compile errors after resync to m100, part2 gridsort: post-rebase fixes CWS gnumake3: found another tools integer type removetooltypes01: Fix build problems after rebase to DEV300m99 in basctl, cui, reportdesign, sw native359: #i114398# changing mac langpack icon native359: #i115669# fixing package description for solaris packages gnumake3: remove comphelper version; fix including extract.hxx locales34: #i106785# add Haitian_Haiti [ht-HT] to language list and locale data; locale data contributed by <jcpoulard> sb138: #i116659# timely termination of OnLogRotateThread accfixes: removed include of obsolete header file accfixes: removed obsolete file removetooltypes01: #i112600# Fix build problems on non-pro accfixes: moved some shared strings to svx part2 accfixes: moved some shared strings to svx accfixes: added more accessibility information and fixed tab orders in multiple dialogs (cui module) removetooltypes01: #i112600# Remove tools types for Mac specific parts fixed tab order in BasicIDE, Library dialog tab page added some accessible names in BasicIDE ... Conflicts: UnoControls/source/base/registercontrols.cxx accessibility/inc/accessibility/standard/vclxaccessiblelistboxlist.hxx automation/inc/automation/communi.hxx automation/inc/automation/simplecm.hxx automation/source/communi/communi.cxx automation/source/inc/rcontrol.hxx automation/source/miniapp/servuid.hxx automation/source/server/XMLParser.cxx automation/source/server/cmdbasestream.cxx automation/source/server/profiler.hxx automation/source/server/recorder.cxx automation/source/server/retstrm.hxx automation/source/server/server.cxx automation/source/server/sta_list.cxx automation/source/server/statemnt.cxx automation/source/server/statemnt.hxx automation/source/simplecm/packethandler.cxx automation/source/simplecm/simplecm.cxx automation/source/simplecm/tcpio.cxx automation/source/simplecm/tcpio.hxx automation/source/testtool/comm_bas.hxx automation/source/testtool/cretstrm.hxx automation/source/testtool/httprequest.cxx automation/source/testtool/httprequest.hxx automation/source/testtool/objtest.cxx automation/source/testtool/objtest.hxx basctl/source/basicide/baside2.cxx basctl/source/basicide/baside2.hxx basctl/source/basicide/baside2b.cxx basctl/source/basicide/baside3.cxx basctl/source/basicide/basides1.cxx basctl/source/basicide/basides2.cxx basctl/source/basicide/basidesh.cxx basctl/source/basicide/basidesh.src basctl/source/basicide/basobj3.cxx basctl/source/basicide/bastype2.cxx basctl/source/basicide/bastype3.cxx basctl/source/basicide/bastypes.cxx basctl/source/basicide/brkdlg.cxx basctl/source/basicide/iderdll.cxx basctl/source/basicide/macrodlg.cxx basctl/source/basicide/moduldl2.cxx basctl/source/basicide/moduldlg.cxx basctl/source/basicide/objdlg.cxx basctl/source/basicide/scriptdocument.cxx basctl/source/basicide/tbxctl.cxx basctl/source/basicide/tbxctl.hxx basctl/source/basicide/tbxctl.src basctl/source/dlged/dlged.cxx basctl/source/dlged/dlgedfunc.cxx basctl/source/dlged/dlgedobj.cxx basctl/source/inc/basidesh.hxx basctl/source/inc/bastypes.hxx basctl/source/inc/dlgedmod.hxx basctl/source/inc/dlgedpage.hxx crashrep/prj/build.lst cui/inc/pch/precompiled_cui.hxx cui/source/customize/acccfg.cxx cui/source/customize/acccfg.hrc cui/source/customize/acccfg.src cui/source/customize/cfg.cxx cui/source/customize/cfgutil.cxx cui/source/customize/macropg.cxx cui/source/customize/macropg.src cui/source/customize/selector.cxx cui/source/dialogs/SpellDialog.cxx cui/source/dialogs/commonlingui.cxx cui/source/dialogs/cuicharmap.cxx cui/source/dialogs/cuifmsearch.cxx cui/source/dialogs/cuigaldlg.cxx cui/source/dialogs/cuigrfflt.cxx cui/source/dialogs/hldocntp.cxx cui/source/dialogs/hldoctp.cxx cui/source/dialogs/hlinettp.cxx cui/source/dialogs/hlmailtp.cxx cui/source/dialogs/hlmarkwn.cxx cui/source/dialogs/hlmarkwn.src cui/source/dialogs/hltpbase.cxx cui/source/dialogs/iconcdlg.cxx cui/source/dialogs/passwdomdlg.cxx cui/source/dialogs/pastedlg.cxx cui/source/dialogs/scriptdlg.cxx cui/source/dialogs/thesdlg.cxx cui/source/dialogs/zoom.cxx cui/source/factory/dlgfact.hxx cui/source/inc/SpellDialog.hxx cui/source/inc/autocdlg.hxx cui/source/inc/backgrnd.hxx cui/source/inc/bbdlg.hxx cui/source/inc/cfg.hxx cui/source/inc/cfgutil.hxx cui/source/inc/cuigaldlg.hxx cui/source/inc/cuigrfflt.hxx cui/source/inc/cuitabarea.hxx cui/source/inc/cuitabline.hxx cui/source/inc/hldocntp.hxx cui/source/inc/hltpbase.hxx cui/source/inc/iconcdlg.hxx cui/source/inc/numpages.hxx cui/source/inc/page.hxx cui/source/inc/postdlg.hxx cui/source/inc/scriptdlg.hxx cui/source/inc/transfrm.hxx cui/source/inc/zoom.hxx cui/source/options/cfgchart.cxx cui/source/options/cuisrchdlg.cxx cui/source/options/dbregister.cxx cui/source/options/dbregister.src cui/source/options/fontsubs.cxx cui/source/options/internationaloptions.cxx cui/source/options/optasian.cxx cui/source/options/optchart.cxx cui/source/options/optcolor.cxx cui/source/options/optcolor.src cui/source/options/optfltr.cxx cui/source/options/optfltr.src cui/source/options/optgdlg.cxx cui/source/options/optgdlg.src cui/source/options/optgenrl.cxx cui/source/options/opthtml.cxx cui/source/options/optimprove.cxx cui/source/options/optinet2.cxx cui/source/options/optinet2.hxx cui/source/options/optjava.cxx cui/source/options/optlingu.cxx cui/source/options/optsave.cxx cui/source/options/optsave.hxx cui/source/options/treeopt.cxx cui/source/options/webconninfo.cxx cui/source/tabpages/autocdlg.cxx cui/source/tabpages/backgrnd.cxx cui/source/tabpages/border.cxx cui/source/tabpages/chardlg.cxx cui/source/tabpages/dstribut.cxx cui/source/tabpages/grfpage.cxx cui/source/tabpages/macroass.cxx cui/source/tabpages/measure.cxx cui/source/tabpages/numfmt.cxx cui/source/tabpages/numpages.cxx cui/source/tabpages/page.cxx cui/source/tabpages/paragrph.cxx cui/source/tabpages/swpossizetabpage.cxx cui/source/tabpages/tabarea.src cui/source/tabpages/textanim.cxx cui/source/tabpages/textattr.cxx cui/source/tabpages/tparea.cxx cui/source/tabpages/tpbitmap.cxx cui/source/tabpages/tpcolor.cxx cui/source/tabpages/tpgradnt.cxx cui/source/tabpages/tphatch.cxx cui/source/tabpages/tpline.cxx cui/source/tabpages/tplnedef.cxx cui/source/tabpages/tplneend.cxx cui/source/tabpages/tpshadow.cxx cui/source/tabpages/transfrm.cxx embedserv/source/embed/register.cxx extensions/inc/pch/precompiled_extensions.hxx extensions/inc/propctrlr.hrc extensions/source/abpilot/abpservices.cxx extensions/source/bibliography/bibload.cxx extensions/source/bibliography/datman.cxx extensions/source/bibliography/general.cxx extensions/source/dbpilots/dbpservices.cxx extensions/source/inc/componentmodule.cxx extensions/source/nsplugin/source/so_env.cxx extensions/source/ole/oleobjw.cxx extensions/source/ole/oleobjw.hxx extensions/source/oooimprovement/invite_job.cxx extensions/source/oooimprovement/onlogrotate_job.cxx extensions/source/plugin/base/service.cxx extensions/source/plugin/inc/plugin/unx/mediator.hxx extensions/source/plugin/inc/plugin/unx/plugcon.hxx extensions/source/plugin/unx/mediator.cxx extensions/source/plugin/unx/nppapi.cxx extensions/source/plugin/unx/plugcon.cxx extensions/source/preload/services.cxx extensions/source/propctrlr/formmetadata.cxx extensions/source/propctrlr/pcrservices.cxx extensions/source/resource/resource.cxx extensions/source/scanner/sane.hxx extensions/source/scanner/sanedlg.cxx extensions/source/scanner/scanunx.cxx extensions/source/scanner/scanwin.cxx extensions/source/scanner/twain.cxx extensions/source/scanner/twain.hxx extensions/source/update/check/updatecheckconfig.cxx extensions/test/stm/datatest.cxx extensions/test/stm/marktest.cxx extensions/test/stm/pipetest.cxx extensions/test/stm/testfactreg.cxx extensions/workben/testpgp.cxx forms/qa/complex/forms/CheckOGroupBoxModel.java forms/qa/makefile.mk forms/source/component/Button.cxx forms/source/component/Button.hxx forms/source/component/ListBox.cxx forms/source/inc/forms_module_impl.hxx forms/source/misc/services.cxx forms/source/solar/control/navtoolbar.cxx javainstaller2/prj/build.lst javainstaller2/src/JavaSetup/org/openoffice/setup/Util/ModuleCtrl.java lingucomponent/prj/build.lst lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx lingucomponent/source/spellcheck/spell/sreg.cxx lingucomponent/source/spellcheck/spell/sspellimp.cxx package/source/manifest/ManifestExport.cxx package/source/manifest/UnoRegister.cxx package/source/xstor/owriteablestream.cxx package/source/xstor/owriteablestream.hxx package/source/xstor/xstorage.hxx package/source/zippackage/ZipPackageFolder.cxx package/source/zippackage/ZipPackageStream.cxx setup_native/source/mac/ooo/DS_Store setup_native/source/win32/customactions/shellextensions/registerextensions.cxx xmlsecurity/prj/build.lst xmlsecurity/source/component/registerservices.cxx xmlsecurity/source/dialogs/stbcontrl.cxx xmlsecurity/source/framework/xsec_framework.cxx xmlsecurity/source/xmlsec/xsec_xmlsec.cxx xmlsecurity/tools/demo/util.hxx xmlsecurity/workben/signaturetest.cxx
482 lines
26 KiB
C++
482 lines
26 KiB
C++
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
/*************************************************************************
|
|
*
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
*
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
|
*
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
|
*
|
|
* This file is part of OpenOffice.org.
|
|
*
|
|
* 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.
|
|
*
|
|
* 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).
|
|
*
|
|
* 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.
|
|
*
|
|
************************************************************************/
|
|
|
|
#ifndef EXTENSIONS_SOURCE_PROPCTRLR_FORMCOMPONENTHANDLER_HXX
|
|
#define EXTENSIONS_SOURCE_PROPCTRLR_FORMCOMPONENTHANDLER_HXX
|
|
|
|
#include "propertyhandler.hxx"
|
|
#include "sqlcommanddesign.hxx"
|
|
#include "pcrcommon.hxx"
|
|
#include <comphelper/uno3.hxx>
|
|
#include <comphelper/proparrhlp.hxx>
|
|
#include <comphelper/propertycontainer.hxx>
|
|
/** === begin UNO includes === **/
|
|
#include <com/sun/star/frame/XModel.hpp>
|
|
#include <com/sun/star/beans/XPropertyState.hpp>
|
|
#include <com/sun/star/sdbc/XRowSet.hpp>
|
|
#include <com/sun/star/awt/XControlContainer.hpp>
|
|
#include <com/sun/star/form/XForm.hpp>
|
|
/** === end UNO includes === **/
|
|
#include <tools/fldunit.hxx>
|
|
#include <vcl/waitobj.hxx>
|
|
#include <connectivity/dbtools.hxx>
|
|
|
|
#include <set>
|
|
|
|
//........................................................................
|
|
namespace pcr
|
|
{
|
|
//........................................................................
|
|
|
|
//====================================================================
|
|
//= ComponentClassification
|
|
//====================================================================
|
|
enum ComponentClassification
|
|
{
|
|
eFormControl,
|
|
eDialogControl,
|
|
eUnknown
|
|
};
|
|
|
|
//====================================================================
|
|
//= FormComponentPropertyHandler
|
|
//====================================================================
|
|
class FormComponentPropertyHandler;
|
|
typedef HandlerComponentBase< FormComponentPropertyHandler > FormComponentPropertyHandler_Base;
|
|
typedef ::comphelper::OPropertyArrayUsageHelper<FormComponentPropertyHandler> FormComponentPropertyHandler_PROP;
|
|
/** default ->XPropertyHandler for all form components.
|
|
*/
|
|
class FormComponentPropertyHandler : public FormComponentPropertyHandler_Base,
|
|
public ::comphelper::OPropertyContainer,
|
|
public FormComponentPropertyHandler_PROP
|
|
{
|
|
private:
|
|
/// access to property states
|
|
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState > m_xPropertyState;
|
|
/// the parent of our component
|
|
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xObjectParent;
|
|
|
|
/// the database connection. Owned by us if and only if we created it ourself.
|
|
mutable ::dbtools::SharedConnection m_xRowSetConnection;
|
|
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > m_xRowSet;
|
|
/** helper component encapsulating the handling for the QueryDesign component for
|
|
interactively designing an SQL command
|
|
*/
|
|
::rtl::Reference< SQLCommandDesigner > m_xCommandDesigner;
|
|
::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspectorUI > m_xBrowserUI;
|
|
|
|
/// the string indicating a "default" (VOID) value in list-like controls
|
|
::rtl::OUString m_sDefaultValueString;
|
|
/// all properties to whose control's we added ->m_sDefaultValueString
|
|
::std::set< ::rtl::OUString > m_aPropertiesWithDefListEntry;
|
|
/// type of our component
|
|
ComponentClassification m_eComponentClass;
|
|
/// is our component a (database) sub form?
|
|
bool m_bComponentIsSubForm : 1;
|
|
/// our component has a "ListSource" property
|
|
bool m_bHaveListSource : 1;
|
|
/// our component has a "Command" property
|
|
bool m_bHaveCommand : 1;
|
|
/// the class id of the component - if appliable
|
|
sal_Int16 m_nClassId;
|
|
|
|
public:
|
|
FormComponentPropertyHandler(
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext
|
|
);
|
|
|
|
DECLARE_XINTERFACE( )
|
|
|
|
// XPropertySet
|
|
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
|
|
|
|
static ::rtl::OUString SAL_CALL getImplementationName_static( ) throw (::com::sun::star::uno::RuntimeException);
|
|
static ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_static( ) throw (::com::sun::star::uno::RuntimeException);
|
|
|
|
protected:
|
|
~FormComponentPropertyHandler();
|
|
|
|
protected:
|
|
virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
|
|
virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
|
|
// XPropertyHandler overridables
|
|
virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& _rPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
|
|
virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& _rPropertyName, const ::com::sun::star::uno::Any& _rValue ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
|
|
virtual ::com::sun::star::uno::Any SAL_CALL convertToPropertyValue( const ::rtl::OUString& _rPropertyName, const ::com::sun::star::uno::Any& _rControlValue ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
|
|
virtual ::com::sun::star::uno::Any SAL_CALL convertToControlValue( const ::rtl::OUString& _rPropertyName, const ::com::sun::star::uno::Any& _rPropertyValue, const ::com::sun::star::uno::Type& _rControlValueType ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
|
|
virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& _rPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
|
|
virtual void SAL_CALL addPropertyChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& _rxListener ) throw (::com::sun::star::uno::RuntimeException);
|
|
virtual void SAL_CALL removePropertyChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& _rxListener ) throw (::com::sun::star::uno::RuntimeException);
|
|
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupersededProperties() throw (::com::sun::star::uno::RuntimeException);
|
|
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getActuatingProperties() throw (::com::sun::star::uno::RuntimeException);
|
|
virtual ::com::sun::star::inspection::LineDescriptor SAL_CALL describePropertyLine( const ::rtl::OUString& _rPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControlFactory >& _rxControlFactory ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::NullPointerException, ::com::sun::star::uno::RuntimeException);
|
|
virtual ::com::sun::star::inspection::InteractiveSelectionResult
|
|
SAL_CALL onInteractivePropertySelection( const ::rtl::OUString& _rPropertyName, sal_Bool _bPrimary, ::com::sun::star::uno::Any& _rData, const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspectorUI >& _rxInspectorUI ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::NullPointerException, ::com::sun::star::uno::RuntimeException);
|
|
virtual void SAL_CALL actuatingPropertyChanged( const ::rtl::OUString& _rActuatingPropertyName, const ::com::sun::star::uno::Any& _rNewValue, const ::com::sun::star::uno::Any& _rOldValue, const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspectorUI >& _rxInspectorUI, sal_Bool _bFirstTimeInit ) throw (::com::sun::star::lang::NullPointerException, ::com::sun::star::uno::RuntimeException);
|
|
virtual sal_Bool SAL_CALL suspend( sal_Bool _bSuspend ) throw (::com::sun::star::uno::RuntimeException);
|
|
|
|
// XComponent
|
|
virtual void SAL_CALL disposing();
|
|
|
|
// PropertyHandler
|
|
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >
|
|
SAL_CALL doDescribeSupportedProperties() const;
|
|
virtual void onNewComponent();
|
|
|
|
private:
|
|
/** initializes some (cached) meta data about the component
|
|
@throws RuntimeException
|
|
if a serious error occurs, for instance if the component does not provide an XPropertySetInfo instance
|
|
*/
|
|
void impl_initComponentMetaData_throw();
|
|
|
|
/** classifies our component, in case it's a control model, by ClassId
|
|
|
|
Note that UNO dialog controls are also classified, though they don't have the ClassId property
|
|
*/
|
|
void impl_classifyControlModel_throw();
|
|
|
|
/** const-version of ->getPropertyValue
|
|
*/
|
|
::com::sun::star::uno::Any impl_getPropertyValue_throw( const ::rtl::OUString& _rPropertyName ) const;
|
|
|
|
// some property values are faked, and not used in the way they're provided by our component
|
|
void impl_normalizePropertyValue_nothrow( ::com::sun::star::uno::Any& _rValue, PropertyId _nPropId ) const;
|
|
|
|
/** determines whether we should exclude a given property from our "supported properties"
|
|
*/
|
|
bool impl_shouldExcludeProperty_nothrow( const ::com::sun::star::beans::Property& _rProperty ) const;
|
|
|
|
/** initializes the list of field names, if we're handling a control which supports the
|
|
DataField property
|
|
*/
|
|
void impl_initFieldList_nothrow( ::std::vector< ::rtl::OUString >& rFieldNames ) const;
|
|
|
|
/** obtaines the RowSet to which our component belongs
|
|
|
|
If the component is a RowSet itself, it's returned directly. Else, the parent
|
|
is examined for the XRowSet interface. If the parent is no XRowSet, then
|
|
a check is made whether our component is a grid control column, and if so,
|
|
the parent of the grid control is examied for the XRowSet interace.
|
|
|
|
Normally, at least one of those methods should succeed.
|
|
*/
|
|
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > impl_getRowSet_throw( ) const;
|
|
|
|
/** nothrow-version of ->impl_getRowSet_throw
|
|
*/
|
|
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > impl_getRowSet_nothrow( ) const;
|
|
|
|
/** connects the row set belonging to our introspected data aware form component,
|
|
and remembers the connection in ->m_xRowSetConnection.
|
|
|
|
If the row set already is connected, ->m_xRowSetConnection will be set, too, but
|
|
not take the ownership of the connection.
|
|
|
|
If ->m_xRowSetConnection is already set, nothing happens, so if you want to
|
|
force creation of a connection, you need to clear ->m_xRowSetConnection.
|
|
*/
|
|
bool impl_ensureRowsetConnection_nothrow() const;
|
|
|
|
/** clears ->m_xRowSetConnection
|
|
*/
|
|
void impl_clearRowsetConnection_nothrow();
|
|
|
|
/** fills an ->LineDescriptor with information to represent a cursor source
|
|
of our form - that is, a table, a query, or an SQL statement.
|
|
|
|
As an example, if our form has currently a CommandType of TABLE, then the
|
|
value list in the LineDescriptor will contain a list of all tables
|
|
of the data source which the form is bound to.
|
|
|
|
@seealso impl_fillTableNames_throw
|
|
@seealso impl_fillQueryNames_throw
|
|
*/
|
|
void impl_describeCursorSource_nothrow(
|
|
::com::sun::star::inspection::LineDescriptor& _out_rProperty,
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControlFactory >& _rxControlFactory
|
|
) const;
|
|
|
|
/** describes the UI for selecting a table name
|
|
|
|
@precond
|
|
m_xRowSetConnection is not <NULL/>
|
|
*/
|
|
void impl_fillTableNames_throw( ::std::vector< ::rtl::OUString >& _out_rNames ) const;
|
|
|
|
/** describes the UI for selecting a query name
|
|
|
|
@precond
|
|
m_xRowSetConnection is not <NULL/>
|
|
*/
|
|
void impl_fillQueryNames_throw( ::std::vector< ::rtl::OUString >& _out_rNames ) const;
|
|
|
|
/** describes the UI for selecting a query name
|
|
|
|
@precond
|
|
m_xRowSetConnection is not <NULL/>
|
|
*/
|
|
void impl_fillQueryNames_throw( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _xQueryNames
|
|
,::std::vector< ::rtl::OUString >& _out_rNames
|
|
,const ::rtl::OUString& _sName = ::rtl::OUString() ) const;
|
|
|
|
/** describes the UI for selecting a ListSource (for list-like form controls)
|
|
@precond
|
|
->m_xRowSetConnection is not <NULL/>
|
|
@precond
|
|
->m_xComponent is not <NULL/>
|
|
*/
|
|
void impl_describeListSourceUI_throw(
|
|
::com::sun::star::inspection::LineDescriptor& _out_rDescriptor,
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyControlFactory >& _rxControlFactory
|
|
) const;
|
|
|
|
/** displays a datbase-related error to the user
|
|
*/
|
|
void impl_displaySQLError_nothrow( const ::dbtools::SQLExceptionInfo& _rErrorDescriptor ) const;
|
|
|
|
/** let's the user chose a selection of entries from a string list, and stores this
|
|
selection in the given property
|
|
@return
|
|
<TRUE/> if and only if the user successfully changed the property
|
|
*/
|
|
bool impl_dialogListSelection_nothrow( const ::rtl::OUString& _rProperty, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const;
|
|
|
|
/** executes a dialog for chosing a filter or sort criterion for a database form
|
|
@param _bFilter
|
|
<TRUE/> if the Filter property should be used, <FALSE/> if it's the Order
|
|
property
|
|
@param _out_rSelectedClause
|
|
the filter or order clause as chosen by the user
|
|
@precond
|
|
we're really inspecting a database form (well, a RowSet at least)
|
|
@return
|
|
<TRUE/> if and only if the user successfully chose a clause
|
|
*/
|
|
bool impl_dialogFilterOrSort_nothrow( bool _bFilter, ::rtl::OUString& _out_rSelectedClause, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const;
|
|
|
|
/** executes a dialog which allows the user to chose the columns linking
|
|
a sub to a master form, and sets the respective MasterFields / SlaveFields
|
|
properties at the form.
|
|
@precond
|
|
we're inspecting (sub) database form
|
|
@return
|
|
<TRUE/> if and only if the user successfully eneter master and slave fields
|
|
*/
|
|
bool impl_dialogLinkedFormFields_nothrow( ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const;
|
|
|
|
/** executes a dialog which allows the user to modify the FormatKey
|
|
property of our component, by chosing a (number) format.
|
|
@precond
|
|
Our component actually has a FormatKey property.
|
|
@param _out_rNewValue
|
|
the new property value, if the user chose a new formatting
|
|
@return
|
|
<TRUE/> if and only if a new formatting has been chosen by the user.
|
|
In this case, ->_out_rNewValue is filled with the new property value
|
|
*/
|
|
bool impl_dialogFormatting_nothrow( ::com::sun::star::uno::Any& _out_rNewValue, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const;
|
|
|
|
/** executes a dialog which allows to the user to change the ImageURL property
|
|
of our component by browsing for an image file.
|
|
@precond
|
|
our component actually has a ImageURL property
|
|
@param _out_rNewValue
|
|
the new property value, if the user chose a new image url
|
|
@return
|
|
<TRUE/> if and only if a new image URL has been chosen by the user.
|
|
In this case, ->_out_rNewValue is filled with the new property value
|
|
*/
|
|
bool impl_browseForImage_nothrow( ::com::sun::star::uno::Any& _out_rNewValue, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const;
|
|
|
|
/** executes a dialog which allows the user to change the TargetURL property of
|
|
our component
|
|
@precond
|
|
our component actually has a TargetURL property
|
|
@param _out_rNewValue
|
|
the new property value, if the user chose a new TargetURL
|
|
@return
|
|
<TRUE/> if and only if a new TargetURL has been chosen by the user.
|
|
In this case, ->_out_rNewValue is filled with the new property value
|
|
*/
|
|
bool impl_browseForTargetURL_nothrow( ::com::sun::star::uno::Any& _out_rNewValue, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const;
|
|
|
|
/** executes a dialog which allows the user to change the font, plus related properties,
|
|
of our component
|
|
@precond
|
|
our component actually has a Font property
|
|
@param _out_rNewValue
|
|
a value desribing the new font, as <code>Sequence< NamedValue ></code>
|
|
@return
|
|
<TRUE/> if and only if the user successfully changed the font of our component
|
|
*/
|
|
bool impl_executeFontDialog_nothrow( ::com::sun::star::uno::Any& _out_rNewValue, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const;
|
|
|
|
/** allows the user browsing for a database document
|
|
@precond
|
|
our component actually has a DataSource property
|
|
@param _out_rNewValue
|
|
the new property value, if the user chose a new DataSource
|
|
@return
|
|
<TRUE/> if and only if a new DataSource has been chosen by the user.
|
|
In this case, ->_out_rNewValue is filled with the new property value
|
|
*/
|
|
bool impl_browseForDatabaseDocument_throw( ::com::sun::star::uno::Any& _out_rNewValue, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const;
|
|
|
|
/** raises a dialog which allows the user to choose a color
|
|
@param _nColorPropertyId
|
|
the ID of the color property
|
|
@param _out_rNewValue
|
|
the chosen color value
|
|
@return
|
|
<TRUE/> if and only if a color was chosen by the user
|
|
*/
|
|
bool impl_dialogColorChooser_throw( sal_Int32 _nColorPropertyId, ::com::sun::star::uno::Any& _out_rNewValue, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const;
|
|
|
|
/** raises a dialog which allows the user to choose a label control for our component
|
|
@param _out_rNewValue
|
|
the chosen label control, if any
|
|
@return
|
|
<TRUE/> if and only if a label control was chosen by the user
|
|
*/
|
|
bool impl_dialogChooseLabelControl_nothrow( ::com::sun::star::uno::Any& _out_rNewValue, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const;
|
|
|
|
/** raises a dialog which lets the user chose the tab order of controls of a form
|
|
@precond
|
|
we have a view control container in which our controls live
|
|
@return
|
|
<TRUE/> if and only if the user successfully changed the tab order
|
|
@seealso impl_getContextControlContainer_nothrow
|
|
*/
|
|
bool impl_dialogChangeTabOrder_nothrow( ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const;
|
|
|
|
/** retrieves the context for controls, whose model(s) we're inspecting
|
|
|
|
If we're inspecting a control model, this is usually part of a set of controls
|
|
and control models, where the controls live in a certain context (a ->XControlContainer).
|
|
If we know this context, we can enable additional special functionality.
|
|
|
|
The ->XComponentContext in which we were created is examined for a value
|
|
named "ControlContext", and this value is returned.
|
|
*/
|
|
::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlContainer >
|
|
impl_getContextControlContainer_nothrow() const;
|
|
|
|
/** opens a query design window for interactively designing the SQL command of a
|
|
database form
|
|
@param _rxUIUpdate
|
|
access to the property browser UI
|
|
@param _nDesignForProperty
|
|
the ID for the property for which the designer is opened
|
|
@return
|
|
<TRUE/> if the window was successfully opened, or was previously open,
|
|
<FALSE/> otherwise
|
|
*/
|
|
bool impl_doDesignSQLCommand_nothrow(
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspectorUI >& _rxInspectorUI,
|
|
PropertyId _nDesignForProperty
|
|
);
|
|
|
|
/** updates a property (UI) whose state depends on more than one other property
|
|
|
|
->actuatingPropertyChanged is called for certain properties in whose changes
|
|
we expressed interes (->getActuatingProperty). Now such a property change can
|
|
result in simple UI updates, for instance another property being enabled or disabled.
|
|
|
|
However, it can also result in a more complex change: The current (UI) state might
|
|
depend on the value of more than one other property. Those dependent properties (their
|
|
UI, more precisly) are updated in this method.
|
|
|
|
@param _nPropid
|
|
the ->PropertyId of the dependent property whose UI state is to be updated
|
|
|
|
@param _rxInspectorUI
|
|
provides access to the property browser UI. Must not be <NULL/>.
|
|
*/
|
|
void impl_updateDependentProperty_nothrow( PropertyId _nPropId, const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XObjectInspectorUI >& _rxInspectorUI ) const;
|
|
|
|
/** determines whether the given form has a valid data source signature.
|
|
|
|
Valid here means that the DataSource property denotes an existing data source, and the
|
|
Command property is not empty. No check is made whether the value of the Command property
|
|
denotes an existent object, since this would be way too expensive.
|
|
|
|
@param _xFormProperties
|
|
the form to check. Must not be <NULL/>.
|
|
@param _bAllowEmptyDataSourceName
|
|
determine whether an empty data source name is allowed (<TRUE/>), and should not
|
|
lead to rejection
|
|
*/
|
|
static bool impl_hasValidDataSourceSignature_nothrow(
|
|
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _xFormProperties,
|
|
bool _bAllowEmptyDataSourceName );
|
|
|
|
/** returns the URL of our context document
|
|
@return
|
|
*/
|
|
::rtl::OUString impl_getDocumentURL_nothrow() const;
|
|
|
|
private:
|
|
DECL_LINK( OnDesignerClosed, void* );
|
|
|
|
private:
|
|
FormComponentPropertyHandler(); // never implemented
|
|
FormComponentPropertyHandler( const FormComponentPropertyHandler& ); // never implemented
|
|
FormComponentPropertyHandler& operator=( const FormComponentPropertyHandler& ); // never implemented
|
|
|
|
private:
|
|
using ::comphelper::OPropertyContainer::addPropertyChangeListener;
|
|
using ::comphelper::OPropertyContainer::removePropertyChangeListener;
|
|
};
|
|
|
|
//====================================================================
|
|
//= WaitCursor
|
|
//====================================================================
|
|
/** wrapper around a ->WaitObject which can cope with a NULL window
|
|
*/
|
|
class WaitCursor
|
|
{
|
|
private:
|
|
::std::auto_ptr< WaitObject > m_aWaitObject;
|
|
|
|
public:
|
|
WaitCursor( Window* _pWindow )
|
|
{
|
|
if ( _pWindow )
|
|
m_aWaitObject.reset( new WaitObject( _pWindow ) );
|
|
}
|
|
};
|
|
|
|
//........................................................................
|
|
} // namespace pcr
|
|
//........................................................................
|
|
|
|
#endif // EXTENSIONS_SOURCE_PROPCTRLR_FORMCOMPONENTHANDLER_HXX
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|