summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorAlexander Wilms <f.alexander.wilms@gmail.com>2014-02-22 21:20:15 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-02-23 03:38:49 +0000
commit0ce0c369aa8880dff9fe874ba85ec6f52ee37ddf (patch)
tree5024cba9f9ea5e3b23ea26025323f6aef39488d0 /forms
parentb81ac16e65b311d6e43c05c22c65d2040c9d7e04 (diff)
Remove unneccessary comments
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb Reviewed-on: https://gerrit.libreoffice.org/8182 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/Button.cxx100
-rw-r--r--forms/source/component/CheckBox.cxx30
-rw-r--r--forms/source/component/Columns.cxx42
-rw-r--r--forms/source/component/ComboBox.cxx68
-rw-r--r--forms/source/component/Currency.cxx38
-rw-r--r--forms/source/component/DatabaseForm.cxx348
-rw-r--r--forms/source/component/Date.cxx50
-rw-r--r--forms/source/component/Edit.cxx84
-rw-r--r--forms/source/component/EditBase.cxx26
-rw-r--r--forms/source/component/File.cxx44
-rw-r--r--forms/source/component/Filter.cxx60
-rw-r--r--forms/source/component/FixedText.cxx22
-rw-r--r--forms/source/component/FormComponent.cxx597
-rw-r--r--forms/source/component/FormattedField.cxx206
-rw-r--r--forms/source/component/FormattedField.hxx58
-rw-r--r--forms/source/component/FormsCollection.cxx24
-rw-r--r--forms/source/component/Grid.cxx204
-rw-r--r--forms/source/component/GroupBox.cxx28
-rw-r--r--forms/source/component/GroupManager.cxx65
-rw-r--r--forms/source/component/Hidden.cxx28
-rw-r--r--forms/source/component/ImageButton.cxx30
-rw-r--r--forms/source/component/ImageControl.cxx100
-rw-r--r--forms/source/component/ListBox.cxx180
-rw-r--r--forms/source/component/Numeric.cxx36
-rw-r--r--forms/source/component/Pattern.cxx40
-rw-r--r--forms/source/component/RadioButton.cxx40
-rw-r--r--forms/source/component/Time.cxx52
-rw-r--r--forms/source/component/cachedrowset.cxx18
-rw-r--r--forms/source/component/clickableimage.cxx90
-rw-r--r--forms/source/component/cloneable.cxx2
-rw-r--r--forms/source/component/entrylisthelper.cxx42
-rw-r--r--forms/source/component/errorbroadcaster.cxx14
-rw-r--r--forms/source/component/formcontrolfont.cxx24
-rw-r--r--forms/source/component/imgprod.cxx50
-rw-r--r--forms/source/component/navigationbar.cxx46
-rw-r--r--forms/source/component/propertybaghelper.cxx42
-rw-r--r--forms/source/component/refvaluecomponent.cxx26
-rw-r--r--forms/source/component/scrollbar.cxx48
-rw-r--r--forms/source/component/spinbutton.cxx44
-rw-r--r--forms/source/helper/commanddescriptionprovider.cxx6
-rw-r--r--forms/source/helper/commandimageprovider.cxx6
-rw-r--r--forms/source/helper/controlfeatureinterception.cxx14
-rw-r--r--forms/source/helper/formnavigation.cxx56
-rw-r--r--forms/source/helper/resettable.cxx10
-rw-r--r--forms/source/helper/urltransformer.cxx10
-rw-r--r--forms/source/helper/windowstateguard.cxx26
-rw-r--r--forms/source/misc/InterfaceContainer.cxx130
-rw-r--r--forms/source/misc/componenttools.cxx14
-rw-r--r--forms/source/misc/limitedformats.cxx28
-rw-r--r--forms/source/misc/listenercontainers.cxx2
-rw-r--r--forms/source/misc/property.cxx6
-rw-r--r--forms/source/misc/services.cxx20
-rw-r--r--forms/source/resource/frm_resource.cxx8
-rw-r--r--forms/source/richtext/attributedispatcher.cxx14
-rw-r--r--forms/source/richtext/clipboarddispatcher.cxx20
-rw-r--r--forms/source/richtext/featuredispatcher.cxx22
-rw-r--r--forms/source/richtext/parametrizedattributedispatcher.cxx12
-rw-r--r--forms/source/richtext/richtextcontrol.cxx58
-rw-r--r--forms/source/richtext/richtextengine.cxx14
-rw-r--r--forms/source/richtext/richtextimplcontrol.cxx66
-rw-r--r--forms/source/richtext/richtextmodel.cxx60
-rw-r--r--forms/source/richtext/richtextunowrapper.cxx14
-rw-r--r--forms/source/richtext/richtextvclcontrol.cxx52
-rw-r--r--forms/source/richtext/richtextviewport.cxx22
-rw-r--r--forms/source/richtext/rtattributehandler.cxx70
-rw-r--r--forms/source/richtext/specialdispatchers.cxx22
-rw-r--r--forms/source/runtime/formoperations.cxx112
-rw-r--r--forms/source/solar/component/navbarcontrol.cxx60
-rw-r--r--forms/source/solar/control/navtoolbar.cxx70
-rw-r--r--forms/source/xforms/convert.cxx36
-rw-r--r--forms/source/xforms/datatyperepository.cxx28
-rw-r--r--forms/source/xforms/datatypes.cxx154
72 files changed, 1797 insertions, 2491 deletions
diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx
index 6d2732b20c31..3a6b9534535d 100644
--- a/forms/source/component/Button.cxx
+++ b/forms/source/component/Button.cxx
@@ -52,13 +52,13 @@ using ::com::sun::star::frame::XDispatchProviderInterceptor;
//==================================================================
//= OButtonModel
//==================================================================
-//------------------------------------------------------------------
+
InterfaceRef SAL_CALL OButtonModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new OButtonModel( comphelper::getComponentContext(_rxFactory) ));
}
-//------------------------------------------------------------------
+
OButtonModel::OButtonModel(const Reference<XComponentContext>& _rxFactory)
:OClickableImageBaseModel( _rxFactory, VCL_CONTROLMODEL_COMMANDBUTTON, FRM_SUN_CONTROL_COMMANDBUTTON )
// use the old control name for compatibility reasons
@@ -68,7 +68,7 @@ OButtonModel::OButtonModel(const Reference<XComponentContext>& _rxFactory)
m_nClassId = FormComponentType::COMMANDBUTTON;
}
-//------------------------------------------------------------------
+
Any SAL_CALL OButtonModel::queryAggregation( const Type& _type ) throw(RuntimeException)
{
Any aReturn = OClickableImageBaseModel::queryAggregation( _type );
@@ -77,7 +77,7 @@ Any SAL_CALL OButtonModel::queryAggregation( const Type& _type ) throw(RuntimeEx
return aReturn;
}
-//------------------------------------------------------------------
+
Sequence< Type > OButtonModel::_getTypes()
{
return ::comphelper::concatSequences(
@@ -86,7 +86,7 @@ Sequence< Type > OButtonModel::_getTypes()
);
}
-//------------------------------------------------------------------
+
OButtonModel::OButtonModel( const OButtonModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
:OClickableImageBaseModel( _pOriginal, _rxFactory )
,m_aResetHelper( *this, m_aMutex )
@@ -97,12 +97,12 @@ OButtonModel::OButtonModel( const OButtonModel* _pOriginal, const Reference<XCom
implInitializeImageURL();
}
-//------------------------------------------------------------------------------
+
OButtonModel::~OButtonModel()
{
}
-//------------------------------------------------------------------------------
+
void OButtonModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 6, OClickableImageBaseModel )
@@ -115,11 +115,11 @@ void OButtonModel::describeFixedProperties( Sequence< Property >& _rProps ) cons
END_DESCRIBE_PROPERTIES();
}
-//------------------------------------------------------------------------------
+
IMPLEMENT_DEFAULT_CLONING( OButtonModel )
// XServiceInfo
-//------------------------------------------------------------------------------
+
StringSequence OButtonModel::getSupportedServiceNames() throw()
{
StringSequence aSupported = OClickableImageBaseModel::getSupportedServiceNames();
@@ -131,13 +131,13 @@ StringSequence OButtonModel::getSupportedServiceNames() throw()
return aSupported;
}
-//------------------------------------------------------------------------------
+
OUString OButtonModel::getServiceName() throw ( ::com::sun::star::uno::RuntimeException)
{
return OUString(FRM_COMPONENT_COMMANDBUTTON); // old (non-sun) name for compatibility !
}
-//------------------------------------------------------------------------------
+
void OButtonModel::write(const Reference<XObjectOutputStream>& _rxOutStream) throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
{
OClickableImageBaseModel::write(_rxOutStream);
@@ -158,7 +158,7 @@ void OButtonModel::write(const Reference<XObjectOutputStream>& _rxOutStream) thr
}
}
-//------------------------------------------------------------------------------
+
void OButtonModel::read(const Reference<XObjectInputStream>& _rxInStream) throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
{
OClickableImageBaseModel::read(_rxInStream);
@@ -218,14 +218,14 @@ void OButtonModel::read(const Reference<XObjectInputStream>& _rxInStream) throw
}
}
-//--------------------------------------------------------------------
+
void SAL_CALL OButtonModel::disposing()
{
m_aResetHelper.disposing();
OClickableImageBaseModel::disposing();
}
-//--------------------------------------------------------------------
+
void SAL_CALL OButtonModel::reset() throw (RuntimeException)
{
if ( !m_aResetHelper.approveReset() )
@@ -236,19 +236,19 @@ void SAL_CALL OButtonModel::reset() throw (RuntimeException)
m_aResetHelper.notifyResetted();
}
-//--------------------------------------------------------------------
+
void SAL_CALL OButtonModel::addResetListener( const Reference< XResetListener >& _listener ) throw (RuntimeException)
{
m_aResetHelper.addResetListener( _listener );
}
-//--------------------------------------------------------------------
+
void SAL_CALL OButtonModel::removeResetListener( const Reference< XResetListener >& _listener ) throw (RuntimeException)
{
m_aResetHelper.removeResetListener( _listener );
}
-//--------------------------------------------------------------------
+
void SAL_CALL OButtonModel::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) const
{
switch ( _nHandle )
@@ -263,7 +263,7 @@ void SAL_CALL OButtonModel::getFastPropertyValue( Any& _rValue, sal_Int32 _nHand
}
}
-//--------------------------------------------------------------------
+
void SAL_CALL OButtonModel::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const Any& _rValue ) throw (Exception)
{
switch ( _nHandle )
@@ -283,7 +283,7 @@ void SAL_CALL OButtonModel::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle
}
}
-//--------------------------------------------------------------------
+
sal_Bool SAL_CALL OButtonModel::convertFastPropertyValue( Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue ) throw (IllegalArgumentException)
{
sal_Bool bModified = sal_False;
@@ -300,7 +300,7 @@ sal_Bool SAL_CALL OButtonModel::convertFastPropertyValue( Any& _rConvertedValue,
return bModified;
}
-//--------------------------------------------------------------------
+
Any OButtonModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
{
Any aDefault;
@@ -317,7 +317,7 @@ Any OButtonModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
return aDefault;
}
-//--------------------------------------------------------------------
+
void OButtonModel::impl_resetNoBroadcast_nothrow()
{
try
@@ -333,13 +333,13 @@ void OButtonModel::impl_resetNoBroadcast_nothrow()
//==================================================================
// OButtonControl
//==================================================================
-//------------------------------------------------------------------
+
InterfaceRef SAL_CALL OButtonControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new OButtonControl( comphelper::getComponentContext(_rxFactory) ));
}
-//------------------------------------------------------------------------------
+
Sequence<Type> OButtonControl::_getTypes()
{
return ::comphelper::concatSequences(
@@ -349,7 +349,7 @@ Sequence<Type> OButtonControl::_getTypes()
);
}
-//------------------------------------------------------------------------------
+
StringSequence OButtonControl::getSupportedServiceNames() throw()
{
StringSequence aSupported = OClickableImageBaseControl::getSupportedServiceNames();
@@ -360,7 +360,7 @@ StringSequence OButtonControl::getSupportedServiceNames() throw()
return aSupported;
}
-//------------------------------------------------------------------------------
+
OButtonControl::OButtonControl(const Reference<XComponentContext>& _rxFactory)
:OClickableImageBaseControl(_rxFactory, VCL_CONTROL_COMMANDBUTTON)
,OFormNavigationHelper( _rxFactory )
@@ -380,7 +380,7 @@ OButtonControl::OButtonControl(const Reference<XComponentContext>& _rxFactory)
decrement(m_refCount);
}
-//------------------------------------------------------------------------------
+
OButtonControl::~OButtonControl()
{
if (m_nClickEvent)
@@ -388,7 +388,7 @@ OButtonControl::~OButtonControl()
}
// UNO binding
-//------------------------------------------------------------------------------
+
Any SAL_CALL OButtonControl::queryAggregation(const Type& _rType) throw (RuntimeException)
{
// if asked for the XTypeProvider, don't let OButtonControl_BASE do this
@@ -405,7 +405,7 @@ Any SAL_CALL OButtonControl::queryAggregation(const Type& _rType) throw (Runtime
return aReturn;
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OButtonControl::disposing()
{
startOrStopModelPropertyListening( false );
@@ -414,7 +414,7 @@ void SAL_CALL OButtonControl::disposing()
OFormNavigationHelper::dispose();
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OButtonControl::disposing( const EventObject& _rSource ) throw( RuntimeException )
{
OControl::disposing( _rSource );
@@ -422,7 +422,7 @@ void SAL_CALL OButtonControl::disposing( const EventObject& _rSource ) throw( Ru
}
// ActionListener
-//------------------------------------------------------------------------------
+
void OButtonControl::actionPerformed(const ActionEvent& /*rEvent*/) throw ( ::com::sun::star::uno::RuntimeException)
{
// Asynchronous for starutil::URL-Button
@@ -433,7 +433,7 @@ void OButtonControl::actionPerformed(const ActionEvent& /*rEvent*/) throw ( ::co
}
}
-//------------------------------------------------------------------------------
+
IMPL_LINK_NOARG(OButtonControl, OnClick)
{
::osl::ClearableMutexGuard aGuard( m_aMutex );
@@ -488,7 +488,7 @@ IMPL_LINK_NOARG(OButtonControl, OnClick)
return 0L;
}
-//------------------------------------------------------------------------------
+
void OButtonControl::actionPerformed_Impl( sal_Bool _bNotifyListener, const ::com::sun::star::awt::MouseEvent& _rEvt )
{
{
@@ -513,7 +513,7 @@ void OButtonControl::actionPerformed_Impl( sal_Bool _bNotifyListener, const ::co
}
// XButton
-//------------------------------------------------------------------------------
+
void OButtonControl::setLabel(const OUString& Label) throw( RuntimeException )
{
Reference<XButton> xButton;
@@ -522,7 +522,7 @@ void OButtonControl::setLabel(const OUString& Label) throw( RuntimeException )
xButton->setLabel(Label);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OButtonControl::setActionCommand(const OUString& _rCommand) throw( RuntimeException )
{
{
@@ -536,19 +536,19 @@ void SAL_CALL OButtonControl::setActionCommand(const OUString& _rCommand) throw(
xButton->setActionCommand(_rCommand);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OButtonControl::addActionListener(const Reference<XActionListener>& _rxListener) throw( RuntimeException )
{
m_aActionListeners.addInterface(_rxListener);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OButtonControl::removeActionListener(const Reference<XActionListener>& _rxListener) throw( RuntimeException )
{
m_aActionListeners.removeInterface(_rxListener);
}
-//------------------------------------------------------------------------------
+
class DoPropertyListening
{
private:
@@ -590,7 +590,7 @@ void DoPropertyListening::handleListening( const OUString& _rPropertyName )
}
}
-//------------------------------------------------------------------------------
+
void OButtonControl::startOrStopModelPropertyListening( bool _bStart )
{
DoPropertyListening aListeningHandler( getModel(), this, _bStart );
@@ -599,7 +599,7 @@ void OButtonControl::startOrStopModelPropertyListening( bool _bStart )
aListeningHandler.handleListening( PROPERTY_ENABLED );
}
-//------------------------------------------------------------------------------
+
sal_Bool SAL_CALL OButtonControl::setModel( const Reference< XControlModel >& _rxModel ) throw ( RuntimeException )
{
startOrStopModelPropertyListening( false );
@@ -616,7 +616,7 @@ sal_Bool SAL_CALL OButtonControl::setModel( const Reference< XControlModel >& _r
return bResult;
}
-//------------------------------------------------------------------------------
+
void OButtonControl::modelFeatureUrlPotentiallyChanged( )
{
sal_Int16 nOldUrlFeatureId = m_nTargetUrlFeatureId;
@@ -631,7 +631,7 @@ void OButtonControl::modelFeatureUrlPotentiallyChanged( )
}
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OButtonControl::propertyChange( const PropertyChangeEvent& _rEvent ) throw ( RuntimeException )
{
if ( _rEvent.PropertyName.equals( PROPERTY_TARGET_URL )
@@ -646,7 +646,7 @@ void SAL_CALL OButtonControl::propertyChange( const PropertyChangeEvent& _rEvent
}
}
-//------------------------------------------------------------------------------
+
namespace
{
bool isFormControllerURL( const OUString& _rURL )
@@ -656,7 +656,7 @@ namespace
}
}
-//------------------------------------------------------------------------------
+
sal_Int16 OButtonControl::getModelUrlFeatureId( ) const
{
sal_Int16 nFeatureId = -1;
@@ -686,7 +686,7 @@ sal_Int16 OButtonControl::getModelUrlFeatureId( ) const
return nFeatureId;
}
-//------------------------------------------------------------------
+
void SAL_CALL OButtonControl::setDesignMode( sal_Bool _bOn ) throw( RuntimeException )
{
OClickableImageBaseControl::setDesignMode( _bOn );
@@ -698,14 +698,14 @@ void SAL_CALL OButtonControl::setDesignMode( sal_Bool _bOn ) throw( RuntimeExcep
// this will connect if not already connected and just update else
}
-//------------------------------------------------------------------------------
+
void OButtonControl::getSupportedFeatures( ::std::vector< sal_Int16 >& /* [out] */ _rFeatureIds )
{
if ( -1 != m_nTargetUrlFeatureId )
_rFeatureIds.push_back( m_nTargetUrlFeatureId );
}
-//------------------------------------------------------------------
+
void OButtonControl::featureStateChanged( sal_Int16 _nFeatureId, sal_Bool _bEnabled )
{
if ( _nFeatureId == m_nTargetUrlFeatureId )
@@ -724,7 +724,7 @@ void OButtonControl::featureStateChanged( sal_Int16 _nFeatureId, sal_Bool _bEnab
OFormNavigationHelper::featureStateChanged( _nFeatureId, _bEnabled );
}
-//------------------------------------------------------------------
+
void OButtonControl::allFeatureStatesChanged( )
{
if ( -1 != m_nTargetUrlFeatureId )
@@ -735,7 +735,7 @@ void OButtonControl::allFeatureStatesChanged( )
OFormNavigationHelper::allFeatureStatesChanged( );
}
-//------------------------------------------------------------------
+
bool OButtonControl::isEnabled( sal_Int16 _nFeatureId ) const
{
if ( const_cast< OButtonControl* >( this )->isDesignMode() )
@@ -745,14 +745,14 @@ bool OButtonControl::isEnabled( sal_Int16 _nFeatureId ) const
return OFormNavigationHelper::isEnabled( _nFeatureId );
}
-//--------------------------------------------------------------------
+
void SAL_CALL OButtonControl::registerDispatchProviderInterceptor( const Reference< XDispatchProviderInterceptor >& _rxInterceptor ) throw (RuntimeException)
{
OClickableImageBaseControl::registerDispatchProviderInterceptor( _rxInterceptor );
OFormNavigationHelper::registerDispatchProviderInterceptor( _rxInterceptor );
}
-//--------------------------------------------------------------------
+
void SAL_CALL OButtonControl::releaseDispatchProviderInterceptor( const Reference< XDispatchProviderInterceptor >& _rxInterceptor ) throw (RuntimeException)
{
OClickableImageBaseControl::releaseDispatchProviderInterceptor( _rxInterceptor );
diff --git a/forms/source/component/CheckBox.cxx b/forms/source/component/CheckBox.cxx
index a6316d963c06..1a01ab8515d9 100644
--- a/forms/source/component/CheckBox.cxx
+++ b/forms/source/component/CheckBox.cxx
@@ -45,19 +45,19 @@ using namespace ::com::sun::star::form::binding;
//= OCheckBoxControl
//==================================================================
-//------------------------------------------------------------------
+
OCheckBoxControl::OCheckBoxControl(const Reference<XComponentContext>& _rxFactory)
:OBoundControl(_rxFactory, VCL_CONTROL_CHECKBOX)
{
}
-//------------------------------------------------------------------
+
InterfaceRef SAL_CALL OCheckBoxControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
{
return *(new OCheckBoxControl( comphelper::getComponentContext(_rxFactory) ));
}
-//------------------------------------------------------------------------------
+
StringSequence SAL_CALL OCheckBoxControl::getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException)
{
StringSequence aSupported = OBoundControl::getSupportedServiceNames();
@@ -78,8 +78,8 @@ InterfaceRef SAL_CALL OCheckBoxModel_CreateInstance(const Reference<XMultiServic
return *(new OCheckBoxModel( comphelper::getComponentContext(_rxFactory) ));
}
-//------------------------------------------------------------------
-//------------------------------------------------------------------
+
+
OCheckBoxModel::OCheckBoxModel(const Reference<XComponentContext>& _rxFactory)
:OReferenceValueComponent( _rxFactory, VCL_CONTROLMODEL_CHECKBOX, FRM_SUN_CONTROL_CHECKBOX, sal_True )
// use the old control name for compytibility reasons
@@ -89,22 +89,22 @@ OCheckBoxModel::OCheckBoxModel(const Reference<XComponentContext>& _rxFactory)
initValueProperty( PROPERTY_STATE, PROPERTY_ID_STATE );
}
-//------------------------------------------------------------------
+
OCheckBoxModel::OCheckBoxModel( const OCheckBoxModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
:OReferenceValueComponent( _pOriginal, _rxFactory )
{
}
-//------------------------------------------------------------------------------
+
OCheckBoxModel::~OCheckBoxModel()
{
}
-//------------------------------------------------------------------------------
+
IMPLEMENT_DEFAULT_CLONING( OCheckBoxModel )
// XServiceInfo
-//------------------------------------------------------------------------------
+
StringSequence SAL_CALL OCheckBoxModel::getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException)
{
StringSequence aSupported = OReferenceValueComponent::getSupportedServiceNames();
@@ -127,7 +127,7 @@ StringSequence SAL_CALL OCheckBoxModel::getSupportedServiceNames() throw(::com::
return aSupported;
}
-//------------------------------------------------------------------------------
+
void OCheckBoxModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 1, OReferenceValueComponent )
@@ -135,13 +135,13 @@ void OCheckBoxModel::describeFixedProperties( Sequence< Property >& _rProps ) co
END_DESCRIBE_PROPERTIES();
}
-//------------------------------------------------------------------------------
+
OUString SAL_CALL OCheckBoxModel::getServiceName() throw(RuntimeException)
{
return OUString(FRM_COMPONENT_CHECKBOX); // old (non-sun) name for compatibility !
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OCheckBoxModel::write(const Reference<stario::XObjectOutputStream>& _rxOutStream)
throw(stario::IOException, RuntimeException)
{
@@ -157,7 +157,7 @@ void SAL_CALL OCheckBoxModel::write(const Reference<stario::XObjectOutputStream>
writeCommonProperties(_rxOutStream);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OCheckBoxModel::read(const Reference<stario::XObjectInputStream>& _rxInStream) throw(stario::IOException, RuntimeException)
{
OReferenceValueComponent::read(_rxInStream);
@@ -206,7 +206,7 @@ bool OCheckBoxModel::DbUseBool()
return true;
}
-//------------------------------------------------------------------------------
+
Any OCheckBoxModel::translateDbColumnToControlValue()
{
Any aValue;
@@ -247,7 +247,7 @@ Any OCheckBoxModel::translateDbColumnToControlValue()
return aValue;
}
-//-----------------------------------------------------------------------------
+
sal_Bool OCheckBoxModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
{
OSL_PRECOND( m_xColumnUpdate.is(), "OCheckBoxModel::commitControlValueToDbColumn: not bound!" );
diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx
index c4cceb958332..5f5994520cab 100644
--- a/forms/source/component/Columns.cxx
+++ b/forms/source/component/Columns.cxx
@@ -63,7 +63,7 @@ const sal_uInt16 ALIGN = 0x0002;
const sal_uInt16 OLD_HIDDEN = 0x0004;
const sal_uInt16 COMPATIBLE_HIDDEN = 0x0008;
-//------------------------------------------------------------------------------
+
const StringSequence& getColumnTypes()
{
static StringSequence aColumnTypes(10);
@@ -84,7 +84,7 @@ const StringSequence& getColumnTypes()
return aColumnTypes;
}
-//------------------------------------------------------------------------------
+
sal_Int32 getColumnTypeByModelName(const OUString& aModelName)
{
const OUString aModelPrefix ("com.sun.star.form.component.");
@@ -124,7 +124,7 @@ const Sequence<sal_Int8>& OGridColumn::getUnoTunnelImplementationId()
return theOGridColumnImplementationId::get().getSeq();
}
-//------------------------------------------------------------------
+
sal_Int64 SAL_CALL OGridColumn::getSomething( const Sequence<sal_Int8>& _rIdentifier) throw(RuntimeException)
{
sal_Int64 nReturn(0);
@@ -144,13 +144,13 @@ sal_Int64 SAL_CALL OGridColumn::getSomething( const Sequence<sal_Int8>& _rIdenti
return nReturn;
}
-//------------------------------------------------------------------
+
Sequence<sal_Int8> SAL_CALL OGridColumn::getImplementationId() throw(RuntimeException)
{
return OImplementationIds::getImplementationId(getTypes());
}
-//------------------------------------------------------------------
+
Sequence<Type> SAL_CALL OGridColumn::getTypes() throw(RuntimeException)
{
TypeBag aTypes( OGridColumn_BASE::getTypes() );
@@ -174,7 +174,7 @@ Sequence<Type> SAL_CALL OGridColumn::getTypes() throw(RuntimeException)
return aTypes.getTypes();
}
-//------------------------------------------------------------------
+
Any SAL_CALL OGridColumn::queryAggregation( const Type& _rType ) throw (RuntimeException)
{
Any aReturn;
@@ -198,7 +198,7 @@ Any SAL_CALL OGridColumn::queryAggregation( const Type& _rType ) throw (RuntimeE
return aReturn;
}
-//------------------------------------------------------------------------------
+
OGridColumn::OGridColumn( const Reference<XComponentContext>& _rContext, const OUString& _sModelName )
:OGridColumn_BASE(m_aMutex)
,OPropertySetAggregationHelper(OGridColumn_BASE::rBHelper)
@@ -226,7 +226,7 @@ OGridColumn::OGridColumn( const Reference<XComponentContext>& _rContext, const O
}
}
-//------------------------------------------------------------------------------
+
OGridColumn::OGridColumn( const OGridColumn* _pOriginal )
:OGridColumn_BASE( m_aMutex )
,OPropertySetAggregationHelper( OGridColumn_BASE::rBHelper )
@@ -253,7 +253,7 @@ OGridColumn::OGridColumn( const OGridColumn* _pOriginal )
decrement( m_refCount );
}
-//------------------------------------------------------------------------------
+
OGridColumn::~OGridColumn()
{
if (!OGridColumn_BASE::rBHelper.bDisposed)
@@ -272,7 +272,7 @@ OGridColumn::~OGridColumn()
}
// XEventListener
-//------------------------------------------------------------------------------
+
void SAL_CALL OGridColumn::disposing(const EventObject& _rSource) throw(RuntimeException)
{
OPropertySetAggregationHelper::disposing(_rSource);
@@ -283,7 +283,7 @@ void SAL_CALL OGridColumn::disposing(const EventObject& _rSource) throw(RuntimeE
}
// OGridColumn_BASE
-//-----------------------------------------------------------------------------
+
void OGridColumn::disposing()
{
OGridColumn_BASE::disposing();
@@ -294,7 +294,7 @@ void OGridColumn::disposing()
xComp->dispose();
}
-//------------------------------------------------------------------------------
+
void OGridColumn::clearAggregateProperties( Sequence< Property >& _rProps, sal_Bool bAllowDropDown )
{
// some properties are not to be exposed to the outer world
@@ -354,7 +354,7 @@ void OGridColumn::clearAggregateProperties( Sequence< Property >& _rProps, sal_B
_rProps = aNewProps;
}
-//------------------------------------------------------------------------------
+
void OGridColumn::setOwnProperties(Sequence<Property>& aDescriptor)
{
aDescriptor.realloc(5);
@@ -367,7 +367,7 @@ void OGridColumn::setOwnProperties(Sequence<Property>& aDescriptor)
}
// Reference<XPropertySet>
-//------------------------------------------------------------------------------
+
void OGridColumn::getFastPropertyValue(Any& rValue, sal_Int32 nHandle ) const
{
switch (nHandle)
@@ -392,7 +392,7 @@ void OGridColumn::getFastPropertyValue(Any& rValue, sal_Int32 nHandle ) const
}
}
-//------------------------------------------------------------------------------
+
sal_Bool OGridColumn::convertFastPropertyValue( Any& rConvertedValue, Any& rOldValue,
sal_Int32 nHandle, const Any& rValue )throw( IllegalArgumentException )
{
@@ -423,7 +423,7 @@ sal_Bool OGridColumn::convertFastPropertyValue( Any& rConvertedValue, Any& rOldV
return bModified;
}
-//------------------------------------------------------------------------------
+
void OGridColumn::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue ) throw (::com::sun::star::uno::Exception)
{
switch (nHandle)
@@ -446,7 +446,7 @@ void OGridColumn::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any
// XPropertyState
-//------------------------------------------------------------------------------
+
Any OGridColumn::getPropertyDefaultByHandle( sal_Int32 nHandle ) const
{
switch (nHandle)
@@ -462,7 +462,7 @@ Any OGridColumn::getPropertyDefaultByHandle( sal_Int32 nHandle ) const
}
// XCloneable
-//------------------------------------------------------------------------------
+
Reference< XCloneable > SAL_CALL OGridColumn::createClone( ) throw (RuntimeException)
{
OGridColumn* pNewColumn = createCloneColumn();
@@ -470,7 +470,7 @@ Reference< XCloneable > SAL_CALL OGridColumn::createClone( ) throw (RuntimeExce
}
// XPersistObject
-//------------------------------------------------------------------------------
+
void SAL_CALL OGridColumn::write(const Reference<XObjectOutputStream>& _rxOutStream)
{
// 1. Write the UnoControl
@@ -518,7 +518,7 @@ void SAL_CALL OGridColumn::write(const Reference<XObjectOutputStream>& _rxOutStr
_rxOutStream->writeBoolean(getBOOL(m_aHidden));
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OGridColumn::read(const Reference<XObjectInputStream>& _rxInStream)
{
// 1. Read the UnoControl
@@ -567,7 +567,7 @@ void SAL_CALL OGridColumn::read(const Reference<XObjectInputStream>& _rxInStream
}
}
-//------------------------------------------------------------------------------
+
IMPL_COLUMN(TextFieldColumn, FRM_SUN_COMPONENT_TEXTFIELD, sal_False);
IMPL_COLUMN(PatternFieldColumn, FRM_SUN_COMPONENT_PATTERNFIELD, sal_False);
IMPL_COLUMN(DateFieldColumn, FRM_SUN_COMPONENT_DATEFIELD, sal_True);
diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx
index 285aa146b521..4c35487289ea 100644
--- a/forms/source/component/ComboBox.cxx
+++ b/forms/source/component/ComboBox.cxx
@@ -72,13 +72,13 @@ using namespace ::com::sun::star::form::binding;
//========================================================================
// class OComboBoxModel
//========================================================================
-//------------------------------------------------------------------
+
InterfaceRef SAL_CALL OComboBoxModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
{
return (*new OComboBoxModel( comphelper::getComponentContext(_rxFactory) ));
}
-//------------------------------------------------------------------------------
+
Sequence<Type> OComboBoxModel::_getTypes()
{
return ::comphelper::concatSequences(
@@ -89,7 +89,7 @@ Sequence<Type> OComboBoxModel::_getTypes()
}
// XServiceInfo
-//------------------------------------------------------------------------------
+
StringSequence SAL_CALL OComboBoxModel::getSupportedServiceNames() throw(RuntimeException)
{
StringSequence aSupported = OBoundControlModel::getSupportedServiceNames();
@@ -112,7 +112,7 @@ StringSequence SAL_CALL OComboBoxModel::getSupportedServiceNames() throw(Runtime
return aSupported;
}
-//------------------------------------------------------------------------------
+
Any SAL_CALL OComboBoxModel::queryAggregation(const Type& _rType) throw (RuntimeException)
{
Any aReturn = OBoundControlModel::queryAggregation( _rType );
@@ -123,8 +123,8 @@ Any SAL_CALL OComboBoxModel::queryAggregation(const Type& _rType) throw (Runtime
return aReturn;
}
-//------------------------------------------------------------------
-//------------------------------------------------------------------
+
+
OComboBoxModel::OComboBoxModel(const Reference<XComponentContext>& _rxFactory)
:OBoundControlModel( _rxFactory, VCL_CONTROLMODEL_COMBOBOX, FRM_SUN_CONTROL_COMBOBOX, sal_True, sal_True, sal_True )
// use the old control name for compytibility reasons
@@ -138,7 +138,7 @@ OComboBoxModel::OComboBoxModel(const Reference<XComponentContext>& _rxFactory)
initValueProperty( PROPERTY_TEXT, PROPERTY_ID_TEXT );
}
-//------------------------------------------------------------------
+
OComboBoxModel::OComboBoxModel( const OComboBoxModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
:OBoundControlModel( _pOriginal, _rxFactory )
,OEntryListHelper( *_pOriginal, (OControlModel&)*this )
@@ -151,7 +151,7 @@ OComboBoxModel::OComboBoxModel( const OComboBoxModel* _pOriginal, const Referenc
{
}
-//------------------------------------------------------------------
+
OComboBoxModel::~OComboBoxModel()
{
if (!OComponentHelper::rBHelper.bDisposed)
@@ -163,10 +163,10 @@ OComboBoxModel::~OComboBoxModel()
}
// XCloneable
-//------------------------------------------------------------------------------
+
IMPLEMENT_DEFAULT_CLONING( OComboBoxModel )
-//------------------------------------------------------------------------------
+
void OComboBoxModel::disposing()
{
OBoundControlModel::disposing();
@@ -175,7 +175,7 @@ void OComboBoxModel::disposing()
m_xFormatter = NULL;
}
-//------------------------------------------------------------------------------
+
void OComboBoxModel::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle) const
{
switch (_nHandle)
@@ -205,7 +205,7 @@ void OComboBoxModel::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle) cons
}
}
-//------------------------------------------------------------------------------
+
void OComboBoxModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const Any& _rValue)
throw (Exception)
{
@@ -260,7 +260,7 @@ void OComboBoxModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const
}
}
-//------------------------------------------------------------------------------
+
sal_Bool OComboBoxModel::convertFastPropertyValue(
Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue)
throw (IllegalArgumentException)
@@ -295,7 +295,7 @@ sal_Bool OComboBoxModel::convertFastPropertyValue(
return bModified;
}
-//------------------------------------------------------------------------------
+
void OComboBoxModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 6, OBoundControlModel )
@@ -308,7 +308,7 @@ void OComboBoxModel::describeFixedProperties( Sequence< Property >& _rProps ) co
END_DESCRIBE_PROPERTIES();
}
-//------------------------------------------------------------------------------
+
void OComboBoxModel::describeAggregateProperties( Sequence< Property >& _rAggregateProps ) const
{
OBoundControlModel::describeAggregateProperties( _rAggregateProps );
@@ -317,13 +317,13 @@ void OComboBoxModel::describeAggregateProperties( Sequence< Property >& _rAggreg
RemoveProperty( _rAggregateProps, PROPERTY_STRINGITEMLIST );
}
-//------------------------------------------------------------------------------
+
OUString SAL_CALL OComboBoxModel::getServiceName() throw(RuntimeException)
{
return OUString(FRM_COMPONENT_COMBOBOX); // old (non-sun) name for compatibility !
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OComboBoxModel::write(const Reference<stario::XObjectOutputStream>& _rxOutStream)
throw(stario::IOException, RuntimeException)
{
@@ -361,7 +361,7 @@ void SAL_CALL OComboBoxModel::write(const Reference<stario::XObjectOutputStream>
writeCommonProperties(_rxOutStream);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OComboBoxModel::read(const Reference<stario::XObjectInputStream>& _rxInStream) throw(stario::IOException, RuntimeException)
{
OBoundControlModel::read(_rxInStream);
@@ -460,7 +460,7 @@ void SAL_CALL OComboBoxModel::read(const Reference<stario::XObjectInputStream>&
}
}
-//------------------------------------------------------------------------------
+
void OComboBoxModel::loadData( bool _bForce )
{
DBG_ASSERT(m_eListSourceType != ListSourceType_VALUELIST, "OComboBoxModel::loadData : do not call for a value list !");
@@ -675,7 +675,7 @@ void OComboBoxModel::loadData( bool _bForce )
setFastPropertyValue( PROPERTY_ID_STRINGITEMLIST, makeAny( aStringSeq ) );
}
-//------------------------------------------------------------------------------
+
void OComboBoxModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm )
{
Reference<XPropertySet> xField = getField();
@@ -688,7 +688,7 @@ void OComboBoxModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm
loadData( false );
}
-//------------------------------------------------------------------------------
+
void OComboBoxModel::onDisconnectedDbColumn()
{
m_pValueFormatter.reset();
@@ -700,7 +700,7 @@ void OComboBoxModel::onDisconnectedDbColumn()
m_aListRowSet.dispose();
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OComboBoxModel::reloaded( const EventObject& aEvent ) throw(RuntimeException)
{
OBoundControlModel::reloaded(aEvent);
@@ -710,14 +710,14 @@ void SAL_CALL OComboBoxModel::reloaded( const EventObject& aEvent ) throw(Runtim
loadData( false );
}
-//------------------------------------------------------------------------------
+
void OComboBoxModel::resetNoBroadcast()
{
OBoundControlModel::resetNoBroadcast();
m_aLastKnownValue.clear();
}
-//-----------------------------------------------------------------------------
+
sal_Bool OComboBoxModel::commitControlValueToDbColumn( bool _bPostReset )
{
Any aNewValue( m_xAggregateFastSet->getFastPropertyValue( getValuePropertyAggHandle() ) );
@@ -791,7 +791,7 @@ sal_Bool OComboBoxModel::commitControlValueToDbColumn( bool _bPostReset )
}
// XPropertiesChangeListener
-//------------------------------------------------------------------------------
+
Any OComboBoxModel::translateDbColumnToControlValue()
{
OSL_PRECOND( m_pValueFormatter.get(), "OComboBoxModel::translateDbColumnToControlValue: no value formatter!" );
@@ -818,32 +818,32 @@ Any OComboBoxModel::translateDbColumnToControlValue()
// (m_aLastKnownValue is alllowed to be VOID, the control value isn't)
}
-//------------------------------------------------------------------------------
+
Any OComboBoxModel::getDefaultForReset() const
{
return makeAny( m_aDefaultText );
}
-//--------------------------------------------------------------------
+
void OComboBoxModel::stringItemListChanged( ControlModelLock& /*_rInstanceLock*/ )
{
if ( m_xAggregateSet.is() )
m_xAggregateSet->setPropertyValue( PROPERTY_STRINGITEMLIST, makeAny( getStringItemList() ) );
}
-//--------------------------------------------------------------------
+
void OComboBoxModel::connectedExternalListSource( )
{
// TODO?
}
-//--------------------------------------------------------------------
+
void OComboBoxModel::disconnectedExternalListSource( )
{
// TODO?
}
-//--------------------------------------------------------------------
+
void OComboBoxModel::refreshInternalEntryList()
{
DBG_ASSERT( !hasExternalListSource(), "OComboBoxModel::refreshInternalEntryList: invalid call!" );
@@ -857,7 +857,7 @@ void OComboBoxModel::refreshInternalEntryList()
}
}
-//--------------------------------------------------------------------
+
void SAL_CALL OComboBoxModel::disposing( const EventObject& _rSource ) throw ( RuntimeException )
{
if ( !OEntryListHelper::handleDisposing( _rSource ) )
@@ -868,19 +868,19 @@ void SAL_CALL OComboBoxModel::disposing( const EventObject& _rSource ) throw ( R
//= OComboBoxControl
//========================================================================
-//------------------------------------------------------------------
+
InterfaceRef SAL_CALL OComboBoxControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
{
return *(new OComboBoxControl( comphelper::getComponentContext(_rxFactory) ));
}
-//------------------------------------------------------------------------------
+
OComboBoxControl::OComboBoxControl(const Reference<XComponentContext>& _rxContext)
:OBoundControl(_rxContext, VCL_CONTROL_COMBOBOX)
{
}
-//------------------------------------------------------------------------------
+
StringSequence SAL_CALL OComboBoxControl::getSupportedServiceNames() throw(RuntimeException)
{
StringSequence aSupported = OBoundControl::getSupportedServiceNames();
diff --git a/forms/source/component/Currency.cxx b/forms/source/component/Currency.cxx
index e9d0e54ca62e..4a88cfb24b89 100644
--- a/forms/source/component/Currency.cxx
+++ b/forms/source/component/Currency.cxx
@@ -43,25 +43,25 @@ using namespace ::com::sun::star::util;
//==================================================================
// OCurrencyControl
//==================================================================
-//------------------------------------------------------------------
+
OCurrencyControl::OCurrencyControl(const Reference<XComponentContext>& _rxFactory)
:OBoundControl(_rxFactory, VCL_CONTROL_CURRENCYFIELD)
{
}
-//------------------------------------------------------------------
+
InterfaceRef SAL_CALL OCurrencyControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new OCurrencyControl( comphelper::getComponentContext(_rxFactory) ));
}
-//------------------------------------------------------------------------------
+
Sequence<Type> OCurrencyControl::_getTypes()
{
return OBoundControl::_getTypes();
}
-//------------------------------------------------------------------------------
+
StringSequence SAL_CALL OCurrencyControl::getSupportedServiceNames() throw()
{
StringSequence aSupported = OBoundControl::getSupportedServiceNames();
@@ -75,19 +75,19 @@ StringSequence SAL_CALL OCurrencyControl::getSupportedServiceNames() throw()
//==================================================================
// OCurrencyModel
//==================================================================
-//------------------------------------------------------------------
+
InterfaceRef SAL_CALL OCurrencyModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new OCurrencyModel( comphelper::getComponentContext(_rxFactory) ));
}
-//------------------------------------------------------------------------------
+
Sequence<Type> OCurrencyModel::_getTypes()
{
return OEditBaseModel::_getTypes();
}
-//------------------------------------------------------------------
+
void OCurrencyModel::implConstruct()
{
if (m_xAggregateSet.is())
@@ -132,8 +132,8 @@ void OCurrencyModel::implConstruct()
}
}
-//------------------------------------------------------------------
-//------------------------------------------------------------------
+
+
OCurrencyModel::OCurrencyModel(const Reference<XComponentContext>& _rxFactory)
:OEditBaseModel( _rxFactory, VCL_CONTROLMODEL_CURRENCYFIELD, FRM_SUN_CONTROL_CURRENCYFIELD, sal_False, sal_True )
// use the old control name for compytibility reasons
@@ -145,24 +145,24 @@ OCurrencyModel::OCurrencyModel(const Reference<XComponentContext>& _rxFactory)
implConstruct();
}
-//------------------------------------------------------------------
+
OCurrencyModel::OCurrencyModel( const OCurrencyModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
:OEditBaseModel( _pOriginal, _rxFactory )
{
implConstruct();
}
-//------------------------------------------------------------------
+
OCurrencyModel::~OCurrencyModel()
{
}
// XCloneable
-//------------------------------------------------------------------------------
+
IMPLEMENT_DEFAULT_CLONING( OCurrencyModel )
// XServiceInfo
-//------------------------------------------------------------------------------
+
StringSequence SAL_CALL OCurrencyModel::getSupportedServiceNames() throw()
{
StringSequence aSupported = OBoundControlModel::getSupportedServiceNames();
@@ -180,7 +180,7 @@ StringSequence SAL_CALL OCurrencyModel::getSupportedServiceNames() throw()
return aSupported;
}
-//------------------------------------------------------------------------------
+
void OCurrencyModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 2, OEditBaseModel )
@@ -192,13 +192,13 @@ void OCurrencyModel::describeFixedProperties( Sequence< Property >& _rProps ) co
END_DESCRIBE_PROPERTIES();
}
-//------------------------------------------------------------------------------
+
OUString SAL_CALL OCurrencyModel::getServiceName() throw ( ::com::sun::star::uno::RuntimeException)
{
return OUString(FRM_COMPONENT_CURRENCYFIELD); // old (non-sun) name for compatibility !
}
-//------------------------------------------------------------------------------
+
sal_Bool OCurrencyModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
{
Any aControlValue( m_xAggregateFastSet->getFastPropertyValue( getValuePropertyAggHandle() ) );
@@ -222,7 +222,7 @@ sal_Bool OCurrencyModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
return sal_True;
}
-//------------------------------------------------------------------------------
+
Any OCurrencyModel::translateDbColumnToControlValue()
{
m_aSaveValue <<= m_xColumn->getDouble();
@@ -232,7 +232,7 @@ Any OCurrencyModel::translateDbColumnToControlValue()
}
// XReset
-//------------------------------------------------------------------------------
+
Any OCurrencyModel::getDefaultForReset() const
{
Any aValue;
@@ -242,7 +242,7 @@ Any OCurrencyModel::getDefaultForReset() const
return aValue;
}
-//------------------------------------------------------------------------------
+
void OCurrencyModel::resetNoBroadcast()
{
OEditBaseModel::resetNoBroadcast();
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index a8f812cc9b39..223adc8bc321 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -118,7 +118,7 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::data;
using namespace ::com::sun::star::util;
-//--------------------------------------------------------------------------
+
extern "C" void SAL_CALL createRegistryInfo_ODatabaseForm()
{
static ::frm::OMultiInstanceAutoRegistration< ::frm::ODatabaseForm > aAutoRegistration;
@@ -169,7 +169,7 @@ private:
//= submitting and resetting html-forms asynchronously
//==================================================================
-//------------------------------------------------------------------
+
class OFormSubmitResetThread: public OComponentEventThread
{
protected:
@@ -189,14 +189,14 @@ public:
OFormSubmitResetThread(ODatabaseForm* pControl) : OComponentEventThread(pControl) { }
};
-//------------------------------------------------------------------
+
EventObject* OFormSubmitResetThread::cloneEvent(
const EventObject *pEvt ) const
{
return new ::com::sun::star::awt::MouseEvent( *(::com::sun::star::awt::MouseEvent *)pEvt );
}
-//------------------------------------------------------------------
+
void OFormSubmitResetThread::processEvent(
::cppu::OComponentHelper* pCompImpl,
const EventObject *_pEvt,
@@ -213,19 +213,19 @@ void OFormSubmitResetThread::processEvent(
//= ODatabaseForm
//==================================================================
-//------------------------------------------------------------------
+
Reference< XInterface > SAL_CALL ODatabaseForm::Create( const Reference< XMultiServiceFactory >& _rxFactory )
{
return *( new ODatabaseForm( comphelper::getComponentContext(_rxFactory) ) );
}
-//------------------------------------------------------------------------------
+
Sequence<sal_Int8> SAL_CALL ODatabaseForm::getImplementationId() throw(RuntimeException)
{
return OImplementationIds::getImplementationId(getTypes());
}
-//------------------------------------------------------------------
+
Sequence<Type> SAL_CALL ODatabaseForm::getTypes() throw(RuntimeException)
{
// ask the aggregate
@@ -241,7 +241,7 @@ Sequence<Type> SAL_CALL ODatabaseForm::getTypes() throw(RuntimeException)
return concatSequences( aRet, OPropertySetAggregationHelper::getTypes() );
}
-//------------------------------------------------------------------
+
Any SAL_CALL ODatabaseForm::queryAggregation(const Type& _rType) throw(RuntimeException)
{
Any aReturn = ODatabaseForm_BASE1::queryInterface(_rType);
@@ -276,7 +276,7 @@ Any SAL_CALL ODatabaseForm::queryAggregation(const Type& _rType) throw(RuntimeEx
return aReturn;
}
-//------------------------------------------------------------------
+
ODatabaseForm::ODatabaseForm(const Reference<XComponentContext>& _rxContext)
:OFormComponents(_rxContext)
,OPropertySetAggregationHelper(OComponentHelper::rBHelper)
@@ -311,7 +311,7 @@ ODatabaseForm::ODatabaseForm(const Reference<XComponentContext>& _rxContext)
impl_construct();
}
-//------------------------------------------------------------------
+
ODatabaseForm::ODatabaseForm( const ODatabaseForm& _cloneSource )
:OFormComponents( _cloneSource )
,OPropertySetAggregationHelper( OComponentHelper::rBHelper )
@@ -409,7 +409,7 @@ ODatabaseForm::ODatabaseForm( const ODatabaseForm& _cloneSource )
osl_atomic_decrement( &m_refCount );
}
-//------------------------------------------------------------------
+
void ODatabaseForm::impl_construct()
{
// aggregate a row set
@@ -451,7 +451,7 @@ void ODatabaseForm::impl_construct()
m_pGroupManager->acquire();
}
-//------------------------------------------------------------------
+
ODatabaseForm::~ODatabaseForm()
{
@@ -473,12 +473,12 @@ ODatabaseForm::~ODatabaseForm()
//==============================================================================
// html tools
-//------------------------------------------------------------------------
+
OUString ODatabaseForm::GetDataURLEncoded(const Reference<XControl>& SubmitButton, const ::com::sun::star::awt::MouseEvent& MouseEvt)
{
return GetDataEncoded(true,SubmitButton,MouseEvt);
}
-// -----------------------------------------------------------------------------
+
OUString ODatabaseForm::GetDataEncoded(bool _bURLEncoded,const Reference<XControl>& SubmitButton, const ::com::sun::star::awt::MouseEvent& MouseEvt)
{
// Fill List of successful Controls
@@ -531,13 +531,13 @@ OUString ODatabaseForm::GetDataEncoded(bool _bURLEncoded,const Reference<XContro
//==============================================================================
// html tools
-//------------------------------------------------------------------------
+
OUString ODatabaseForm::GetDataTextEncoded(const Reference<XControl>& SubmitButton, const ::com::sun::star::awt::MouseEvent& MouseEvt)
{
return GetDataEncoded(false,SubmitButton,MouseEvt);
}
-//------------------------------------------------------------------------
+
Sequence<sal_Int8> ODatabaseForm::GetDataMultiPartEncoded(const Reference<XControl>& SubmitButton, const ::com::sun::star::awt::MouseEvent& MouseEvt, OUString& rContentType)
{
@@ -589,7 +589,7 @@ Sequence<sal_Int8> ODatabaseForm::GetDataMultiPartEncoded(const Reference<XContr
return Sequence<sal_Int8>((sal_Int8*)pData, nLen);
}
-//------------------------------------------------------------------------
+
namespace
{
static void appendDigits( sal_Int32 _nNumber, sal_Int8 nDigits, OUStringBuffer& _rOut )
@@ -601,7 +601,7 @@ namespace
}
}
-//------------------------------------------------------------------------
+
void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Reference<XPropertySet>& xComponentSet, const OUString& rNamePrefix,
const Reference<XControl>& rxSubmitButton, const ::com::sun::star::awt::MouseEvent& MouseEvt)
{
@@ -930,7 +930,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc
}
}
-//------------------------------------------------------------------------
+
void ODatabaseForm::FillSuccessfulList( HtmlSuccessfulObjList& rList,
const Reference<XControl>& rxSubmitButton, const ::com::sun::star::awt::MouseEvent& MouseEvt )
{
@@ -950,7 +950,7 @@ void ODatabaseForm::FillSuccessfulList( HtmlSuccessfulObjList& rList,
}
}
-//------------------------------------------------------------------------
+
void ODatabaseForm::Encode( OUString& rString ) const
{
OUStringBuffer aResult;
@@ -1005,7 +1005,7 @@ void ODatabaseForm::Encode( OUString& rString ) const
rString = aResult.makeStringAndClear().replace(' ', '+');
}
-//------------------------------------------------------------------------
+
void ODatabaseForm::InsertTextPart( INetMIMEMessage& rParent, const OUString& rName,
const OUString& rData )
{
@@ -1036,7 +1036,7 @@ void ODatabaseForm::InsertTextPart( INetMIMEMessage& rParent, const OUString& rN
rParent.AttachChild( *pChild );
}
-//------------------------------------------------------------------------
+
sal_Bool ODatabaseForm::InsertFilePart( INetMIMEMessage& rParent, const OUString& rName,
const OUString& rFileName )
{
@@ -1098,13 +1098,13 @@ sal_Bool ODatabaseForm::InsertFilePart( INetMIMEMessage& rParent, const OUString
//==============================================================================
// internals
-//------------------------------------------------------------------------------
+
void ODatabaseForm::onError( const SQLErrorEvent& _rEvent )
{
m_aErrorListeners.notifyEach( &XSQLErrorListener::errorOccured, _rEvent );
}
-//------------------------------------------------------------------------------
+
void ODatabaseForm::onError( const SQLException& _rException, const OUString& _rContextDescription )
{
if ( !m_aErrorListeners.getLength() )
@@ -1114,13 +1114,13 @@ void ODatabaseForm::onError( const SQLException& _rException, const OUString& _r
onError( aEvent );
}
-//------------------------------------------------------------------------------
+
void ODatabaseForm::updateParameterInfo()
{
m_aParameterManager.updateParameterInfo( m_aFilterManager );
}
-//------------------------------------------------------------------------------
+
bool ODatabaseForm::hasValidParent() const
{
// do we have to fill the parameters again?
@@ -1154,7 +1154,7 @@ bool ODatabaseForm::hasValidParent() const
return true;
}
-//------------------------------------------------------------------------------
+
bool ODatabaseForm::fillParameters( ::osl::ResettableMutexGuard& _rClearForNotifies, const Reference< XInteractionHandler >& _rxCompletionHandler )
{
// do we have to fill the parameters again?
@@ -1175,14 +1175,14 @@ bool ODatabaseForm::fillParameters( ::osl::ResettableMutexGuard& _rClearForNotif
return true;
}
-//------------------------------------------------------------------------------
+
void ODatabaseForm::saveInsertOnlyState( )
{
OSL_ENSURE( !m_aIgnoreResult.hasValue(), "ODatabaseForm::saveInsertOnlyState: overriding old value!" );
m_aIgnoreResult = m_xAggregateSet->getPropertyValue( PROPERTY_INSERTONLY );
}
-//------------------------------------------------------------------------------
+
void ODatabaseForm::restoreInsertOnlyState( )
{
if ( m_aIgnoreResult.hasValue() )
@@ -1192,7 +1192,7 @@ void ODatabaseForm::restoreInsertOnlyState( )
}
}
-//------------------------------------------------------------------------------
+
sal_Bool ODatabaseForm::executeRowSet(::osl::ResettableMutexGuard& _rClearForNotifies, sal_Bool bMoveToFirst, const Reference< XInteractionHandler >& _rxCompletionHandler)
{
if (!m_xAggregateAsRowSet.is())
@@ -1293,7 +1293,7 @@ sal_Bool ODatabaseForm::executeRowSet(::osl::ResettableMutexGuard& _rClearForNot
return bSuccess;
}
-//------------------------------------------------------------------
+
void ODatabaseForm::disposing()
{
if (m_pAggregatePropertyMultiplexer)
@@ -1338,7 +1338,7 @@ void ODatabaseForm::disposing()
m_aPropertyBagHelper.dispose();
}
-//------------------------------------------------------------------------------
+
Reference< XConnection > ODatabaseForm::getConnection()
{
Reference< XConnection > xConn;
@@ -1346,7 +1346,7 @@ Reference< XConnection > ODatabaseForm::getConnection()
return xConn;
}
-//------------------------------------------------------------------------------
+
::osl::Mutex& ODatabaseForm::getMutex()
{
return m_aMutex;
@@ -1354,7 +1354,7 @@ Reference< XConnection > ODatabaseForm::getConnection()
//==============================================================================
// property handling
-//------------------------------------------------------------------------------
+
void ODatabaseForm::describeFixedAndAggregateProperties(
Sequence< Property >& _rProps,
Sequence< Property >& _rAggregateProps ) const
@@ -1404,61 +1404,61 @@ void ODatabaseForm::describeFixedAndAggregateProperties(
END_DESCRIBE_PROPERTIES();
}
-//------------------------------------------------------------------------------
+
Reference< XMultiPropertySet > ODatabaseForm::getPropertiesInterface()
{
return Reference< XMultiPropertySet >( *this, UNO_QUERY );
}
-//------------------------------------------------------------------------------
+
::cppu::IPropertyArrayHelper& ODatabaseForm::getInfoHelper()
{
return m_aPropertyBagHelper.getInfoHelper();
}
-//------------------------------------------------------------------------------
+
Reference< XPropertySetInfo > ODatabaseForm::getPropertySetInfo() throw( RuntimeException )
{
return createPropertySetInfo( getInfoHelper() );
}
-//--------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::addProperty( const OUString& _rName, ::sal_Int16 _nAttributes, const Any& _rInitialValue ) throw (PropertyExistException, IllegalTypeException, IllegalArgumentException, RuntimeException)
{
m_aPropertyBagHelper.addProperty( _rName, _nAttributes, _rInitialValue );
}
-//--------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::removeProperty( const OUString& _rName ) throw (UnknownPropertyException, NotRemoveableException, RuntimeException)
{
m_aPropertyBagHelper.removeProperty( _rName );
}
-//--------------------------------------------------------------------
+
Sequence< PropertyValue > SAL_CALL ODatabaseForm::getPropertyValues() throw (RuntimeException)
{
return m_aPropertyBagHelper.getPropertyValues();
}
-//--------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::setPropertyValues( const Sequence< PropertyValue >& _rProps ) throw (UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException)
{
m_aPropertyBagHelper.setPropertyValues( _rProps );
}
-//------------------------------------------------------------------------------
+
Any SAL_CALL ODatabaseForm::getWarnings( ) throw (SQLException, RuntimeException)
{
return m_aWarnings.getWarnings();
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::clearWarnings( ) throw (SQLException, RuntimeException)
{
m_aWarnings.clearWarnings();
}
-//------------------------------------------------------------------------------
+
Reference< XCloneable > SAL_CALL ODatabaseForm::createClone( ) throw (RuntimeException)
{
ODatabaseForm* pClone = new ODatabaseForm( *this );
@@ -1468,7 +1468,7 @@ Reference< XCloneable > SAL_CALL ODatabaseForm::createClone( ) throw (RuntimeEx
return pClone;
}
-//------------------------------------------------------------------------------
+
void ODatabaseForm::fire( sal_Int32* pnHandles, const Any* pNewValues, const Any* pOldValues, sal_Int32 nCount, sal_Bool bVetoable )
{
// same as in getFastPropertyValue(sal_Int32) : if we're resetting currently don't fire any changes of the
@@ -1506,7 +1506,7 @@ void ODatabaseForm::fire( sal_Int32* pnHandles, const Any* pNewValues, const Any
OPropertySetAggregationHelper::fire(pnHandles, pNewValues, pOldValues, nCount, bVetoable);
}
-//------------------------------------------------------------------------------
+
Any SAL_CALL ODatabaseForm::getFastPropertyValue( sal_Int32 nHandle )
throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
{
@@ -1517,7 +1517,7 @@ Any SAL_CALL ODatabaseForm::getFastPropertyValue( sal_Int32 nHandle )
return OPropertySetAggregationHelper::getFastPropertyValue(nHandle);
}
-//------------------------------------------------------------------------------
+
void ODatabaseForm::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
{
switch (nHandle)
@@ -1598,7 +1598,7 @@ void ODatabaseForm::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
}
}
-//------------------------------------------------------------------------------
+
sal_Bool ODatabaseForm::convertFastPropertyValue( Any& rConvertedValue, Any& rOldValue,
sal_Int32 nHandle, const Any& rValue ) throw( IllegalArgumentException )
{
@@ -1682,7 +1682,7 @@ sal_Bool ODatabaseForm::convertFastPropertyValue( Any& rConvertedValue, Any& rOl
return bModified;
}
-//------------------------------------------------------------------------------
+
void ODatabaseForm::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue ) throw( Exception )
{
switch (nHandle)
@@ -1800,7 +1800,7 @@ void ODatabaseForm::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const A
}
}
-//------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::forwardingPropertyValue( sal_Int32 _nHandle )
{
OSL_ENSURE( _nHandle == PROPERTY_ID_ACTIVE_CONNECTION, "ODatabaseForm::forwardingPropertyValue: unexpected property!" );
@@ -1812,7 +1812,7 @@ void SAL_CALL ODatabaseForm::forwardingPropertyValue( sal_Int32 _nHandle )
}
}
-//------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::forwardedPropertyValue( sal_Int32 _nHandle, bool /*_bSuccess*/ )
{
OSL_ENSURE( _nHandle == PROPERTY_ID_ACTIVE_CONNECTION, "ODatabaseForm::forwardedPropertyValue: unexpected property!" );
@@ -1824,7 +1824,7 @@ void SAL_CALL ODatabaseForm::forwardedPropertyValue( sal_Int32 _nHandle, bool /*
//==============================================================================
// com::sun::star::beans::XPropertyState
-//------------------------------------------------------------------
+
PropertyState ODatabaseForm::getPropertyStateByHandle(sal_Int32 nHandle)
{
PropertyState eState;
@@ -1874,7 +1874,7 @@ PropertyState ODatabaseForm::getPropertyStateByHandle(sal_Int32 nHandle)
return eState;
}
-//------------------------------------------------------------------
+
void ODatabaseForm::setPropertyToDefaultByHandle(sal_Int32 nHandle)
{
switch (nHandle)
@@ -1896,7 +1896,7 @@ void ODatabaseForm::setPropertyToDefaultByHandle(sal_Int32 nHandle)
}
}
-//------------------------------------------------------------------
+
Any ODatabaseForm::getPropertyDefaultByHandle( sal_Int32 nHandle ) const
{
Any aReturn;
@@ -1937,7 +1937,7 @@ Any ODatabaseForm::getPropertyDefaultByHandle( sal_Int32 nHandle ) const
//==============================================================================
// com::sun::star::form::XReset
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::reset() throw( RuntimeException )
{
::osl::ResettableMutexGuard aGuard(m_aMutex);
@@ -1976,7 +1976,7 @@ void SAL_CALL ODatabaseForm::reset() throw( RuntimeException )
}
}
-//-----------------------------------------------------------------------------
+
void ODatabaseForm::reset_impl(bool _bAproveByListeners)
{
if ( _bAproveByListeners )
@@ -2097,13 +2097,13 @@ void ODatabaseForm::reset_impl(bool _bAproveByListeners)
--m_nResetsPending;
}
-//-----------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::addResetListener(const Reference<XResetListener>& _rListener) throw( RuntimeException )
{
m_aResetListeners.addTypedListener( _rListener );
}
-//-----------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::removeResetListener(const Reference<XResetListener>& _rListener) throw( RuntimeException )
{
m_aResetListeners.removeTypedListener( _rListener );
@@ -2111,7 +2111,7 @@ void SAL_CALL ODatabaseForm::removeResetListener(const Reference<XResetListener>
//==============================================================================
// com::sun::star::form::XSubmit
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::submit( const Reference<XControl>& Control,
const ::com::sun::star::awt::MouseEvent& MouseEvt ) throw( RuntimeException )
{
@@ -2142,7 +2142,7 @@ void SAL_CALL ODatabaseForm::submit( const Reference<XControl>& Control,
submit_impl( Control, MouseEvt, true );
}
}
-// -----------------------------------------------------------------------------
+
void lcl_dispatch(const Reference< XFrame >& xFrame,const Reference<XURLTransformer>& xTransformer,const OUString& aURLStr,const OUString& aReferer,const OUString& aTargetName
,const OUString& aData,rtl_TextEncoding _eEncoding)
{
@@ -2172,7 +2172,7 @@ void lcl_dispatch(const Reference< XFrame >& xFrame,const Reference<XURLTransfor
xDisp->dispatch(aURL, aArgs);
} // if (xDisp.is())
}
-//------------------------------------------------------------------------------
+
void ODatabaseForm::submit_impl(const Reference<XControl>& Control, const ::com::sun::star::awt::MouseEvent& MouseEvt, bool _bAproveByListeners)
{
@@ -2315,13 +2315,13 @@ void ODatabaseForm::submit_impl(const Reference<XControl>& Control, const ::com:
}
// XSubmit
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::addSubmitListener(const Reference<XSubmitListener>& _rListener) throw( RuntimeException )
{
m_aSubmitListeners.addInterface(_rListener);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::removeSubmitListener(const Reference<XSubmitListener>& _rListener) throw( RuntimeException )
{
m_aSubmitListeners.removeInterface(_rListener);
@@ -2329,19 +2329,19 @@ void SAL_CALL ODatabaseForm::removeSubmitListener(const Reference<XSubmitListene
//==============================================================================
// com::sun::star::sdbc::XSQLErrorBroadcaster
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::addSQLErrorListener(const Reference<XSQLErrorListener>& _rListener) throw( RuntimeException )
{
m_aErrorListeners.addInterface(_rListener);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::removeSQLErrorListener(const Reference<XSQLErrorListener>& _rListener) throw( RuntimeException )
{
m_aErrorListeners.removeInterface(_rListener);
}
-//------------------------------------------------------------------------------
+
void ODatabaseForm::invlidateParameters()
{
::osl::MutexGuard aGuard(m_aMutex);
@@ -2350,7 +2350,7 @@ void ODatabaseForm::invlidateParameters()
//==============================================================================
// OChangeListener
-//------------------------------------------------------------------------------
+
void ODatabaseForm::_propertyChanged(const PropertyChangeEvent& evt) throw( RuntimeException )
{
if (evt.PropertyName == PROPERTY_ACTIVE_CONNECTION && !m_bForwardingConnection)
@@ -2369,7 +2369,7 @@ void ODatabaseForm::_propertyChanged(const PropertyChangeEvent& evt) throw( Runt
//==============================================================================
// smartXChild
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::setParent(const InterfaceRef& Parent) throw ( ::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException)
{
// SYNCHRONIZED ----->
@@ -2430,7 +2430,7 @@ void SAL_CALL ODatabaseForm::setParent(const InterfaceRef& Parent) throw ( ::com
//==============================================================================
// smartXTabControllerModel
-//------------------------------------------------------------------------------
+
sal_Bool SAL_CALL ODatabaseForm::getGroupControl() throw(com::sun::star::uno::RuntimeException)
{
::osl::ResettableMutexGuard aGuard(m_aMutex);
@@ -2449,7 +2449,7 @@ sal_Bool SAL_CALL ODatabaseForm::getGroupControl() throw(com::sun::star::uno::Ru
return sal_False;
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::setControlModels(const Sequence<Reference<XControlModel> >& rControls) throw( RuntimeException )
{
::osl::ResettableMutexGuard aGuard(m_aMutex);
@@ -2486,14 +2486,14 @@ void SAL_CALL ODatabaseForm::setControlModels(const Sequence<Reference<XControlM
}
}
-//------------------------------------------------------------------------------
+
Sequence<Reference<XControlModel> > SAL_CALL ODatabaseForm::getControlModels() throw( RuntimeException )
{
::osl::MutexGuard aGuard(m_aMutex);
return m_pGroupManager->getControlModels();
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::setGroup( const Sequence<Reference<XControlModel> >& _rGroup, const OUString& Name ) throw( RuntimeException )
{
::osl::MutexGuard aGuard(m_aMutex);
@@ -2522,14 +2522,14 @@ void SAL_CALL ODatabaseForm::setGroup( const Sequence<Reference<XControlModel> >
}
}
-//------------------------------------------------------------------------------
+
sal_Int32 SAL_CALL ODatabaseForm::getGroupCount() throw( RuntimeException )
{
::osl::MutexGuard aGuard(m_aMutex);
return m_pGroupManager->getGroupCount();
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::getGroup( sal_Int32 nGroup, Sequence<Reference<XControlModel> >& _rGroup, OUString& _rName ) throw( RuntimeException )
{
::osl::MutexGuard aGuard(m_aMutex);
@@ -2541,7 +2541,7 @@ void SAL_CALL ODatabaseForm::getGroup( sal_Int32 nGroup, Sequence<Reference<XCon
m_pGroupManager->getGroup( nGroup, _rGroup, _rName );
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::getGroupByName(const OUString& Name, Sequence< Reference<XControlModel> >& _rGroup) throw( RuntimeException )
{
::osl::MutexGuard aGuard(m_aMutex);
@@ -2551,7 +2551,7 @@ void SAL_CALL ODatabaseForm::getGroupByName(const OUString& Name, Sequence< Refe
//==============================================================================
// com::sun::star::lang::XEventListener
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::disposing(const EventObject& Source) throw( RuntimeException )
{
// does the call come from the connection which we are sharing with our parent?
@@ -2581,7 +2581,7 @@ void SAL_CALL ODatabaseForm::disposing(const EventObject& Source) throw( Runtime
}
}
-//------------------------------------------------------------------------------
+
void ODatabaseForm::impl_createLoadTimer()
{
OSL_PRECOND( m_pLoadTimer == NULL, "ODatabaseForm::impl_createLoadTimer: timer already exists!" );
@@ -2592,7 +2592,7 @@ void ODatabaseForm::impl_createLoadTimer()
//==============================================================================
// com::sun::star::form::XLoadListener
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::loaded(const EventObject& /*aEvent*/) throw( RuntimeException )
{
{
@@ -2606,7 +2606,7 @@ void SAL_CALL ODatabaseForm::loaded(const EventObject& /*aEvent*/) throw( Runtim
load_impl( sal_True );
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::unloading(const EventObject& /*aEvent*/) throw( RuntimeException )
{
{
@@ -2624,13 +2624,13 @@ void SAL_CALL ODatabaseForm::unloading(const EventObject& /*aEvent*/) throw( Run
unload();
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::unloaded(const EventObject& /*aEvent*/) throw( RuntimeException )
{
// nothing to do
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::reloading(const EventObject& /*aEvent*/) throw( RuntimeException )
{
// now stop the rowset listening if we are a subform
@@ -2643,7 +2643,7 @@ void SAL_CALL ODatabaseForm::reloading(const EventObject& /*aEvent*/) throw( Run
m_pLoadTimer->Stop();
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::reloaded(const EventObject& /*aEvent*/) throw( RuntimeException )
{
reload_impl(sal_True);
@@ -2655,7 +2655,7 @@ void SAL_CALL ODatabaseForm::reloaded(const EventObject& /*aEvent*/) throw( Runt
}
}
-//------------------------------------------------------------------------------
+
IMPL_LINK_NOARG(ODatabaseForm, OnTimeout)
{
reload_impl(sal_True);
@@ -2664,13 +2664,13 @@ IMPL_LINK_NOARG(ODatabaseForm, OnTimeout)
//==============================================================================
// com::sun::star::form::XLoadable
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::load() throw( RuntimeException )
{
load_impl(sal_False);
}
-//------------------------------------------------------------------------------
+
sal_Bool ODatabaseForm::canShareConnection( const Reference< XPropertySet >& _rxParentProps )
{
// our own data source
@@ -2725,7 +2725,7 @@ sal_Bool ODatabaseForm::canShareConnection( const Reference< XPropertySet >& _rx
return bCanShareConnection;
}
-//------------------------------------------------------------------------------
+
void ODatabaseForm::doShareConnection( const Reference< XPropertySet >& _rxParentProps )
{
// get the conneciton of the parent
@@ -2751,7 +2751,7 @@ void ODatabaseForm::doShareConnection( const Reference< XPropertySet >& _rxParen
m_bSharingConnection = sal_False;
}
-//------------------------------------------------------------------------------
+
void ODatabaseForm::disposingSharedConnection( const Reference< XConnection >& /*_rxConn*/ )
{
stopSharingConnection();
@@ -2760,7 +2760,7 @@ void ODatabaseForm::disposingSharedConnection( const Reference< XConnection >& /
unload( );
}
-//------------------------------------------------------------------------------
+
void ODatabaseForm::stopSharingConnection( )
{
OSL_ENSURE( m_bSharingConnection, "ODatabaseForm::stopSharingConnection: invalid call!" );
@@ -2791,7 +2791,7 @@ void ODatabaseForm::stopSharingConnection( )
}
}
-//------------------------------------------------------------------------------
+
sal_Bool ODatabaseForm::implEnsureConnection()
{
try
@@ -2852,7 +2852,7 @@ sal_Bool ODatabaseForm::implEnsureConnection()
return sal_False;
}
-//------------------------------------------------------------------------------
+
void ODatabaseForm::load_impl(sal_Bool bCausedByParentForm, sal_Bool bMoveToFirst, const Reference< XInteractionHandler >& _rxCompletionHandler ) throw( RuntimeException )
{
::osl::ResettableMutexGuard aGuard(m_aMutex);
@@ -2901,7 +2901,7 @@ void ODatabaseForm::load_impl(sal_Bool bCausedByParentForm, sal_Bool bMoveToFirs
}
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::unload() throw( RuntimeException )
{
::osl::ResettableMutexGuard aGuard(m_aMutex);
@@ -2948,13 +2948,13 @@ void SAL_CALL ODatabaseForm::unload() throw( RuntimeException )
m_aLoadListeners.notifyEach( &XLoadListener::unloaded, aEvt );
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::reload() throw( RuntimeException )
{
reload_impl(sal_True);
}
-//------------------------------------------------------------------------------
+
void ODatabaseForm::reload_impl(sal_Bool bMoveToFirst, const Reference< XInteractionHandler >& _rxCompletionHandler ) throw( RuntimeException )
{
::osl::ResettableMutexGuard aGuard(m_aMutex);
@@ -3009,19 +3009,19 @@ void ODatabaseForm::reload_impl(sal_Bool bMoveToFirst, const Reference< XInterac
m_bLoaded = sal_False;
}
-//------------------------------------------------------------------------------
+
sal_Bool SAL_CALL ODatabaseForm::isLoaded() throw( RuntimeException )
{
return m_bLoaded;
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::addLoadListener(const Reference<XLoadListener>& aListener) throw( RuntimeException )
{
m_aLoadListeners.addInterface(aListener);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::removeLoadListener(const Reference<XLoadListener>& aListener) throw( RuntimeException )
{
m_aLoadListeners.removeInterface(aListener);
@@ -3038,7 +3038,7 @@ void SAL_CALL ODatabaseForm::close() throw( SQLException, RuntimeException )
//==============================================================================
// com::sun::star::sdbc::XRowSetListener
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::cursorMoved(const EventObject& /*event*/) throw( RuntimeException )
{
// reload the subform with the new parameters of the parent
@@ -3056,13 +3056,13 @@ void SAL_CALL ODatabaseForm::cursorMoved(const EventObject& /*event*/) throw( Ru
m_pLoadTimer->Start();
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::rowChanged(const EventObject& /*event*/) throw( RuntimeException )
{
// ignore it
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::rowSetChanged(const EventObject& /*event*/) throw( RuntimeException )
{
// not interested in :
@@ -3072,7 +3072,7 @@ void SAL_CALL ODatabaseForm::rowSetChanged(const EventObject& /*event*/) throw(
// "load" respectivly "reload" ... can't do anything ....
}
-//------------------------------------------------------------------------------
+
bool ODatabaseForm::impl_approveRowChange_throw( const EventObject& _rEvent, const bool _bAllowSQLException,
::osl::ClearableMutexGuard& _rGuard )
{
@@ -3112,7 +3112,7 @@ bool ODatabaseForm::impl_approveRowChange_throw( const EventObject& _rEvent, con
return true;
}
-//------------------------------------------------------------------------------
+
sal_Bool SAL_CALL ODatabaseForm::approveCursorMove(const EventObject& event) throw( RuntimeException )
{
// is our aggregate calling?
@@ -3161,7 +3161,7 @@ sal_Bool SAL_CALL ODatabaseForm::approveCursorMove(const EventObject& event) thr
return sal_True;
}
-//------------------------------------------------------------------------------
+
sal_Bool SAL_CALL ODatabaseForm::approveRowChange(const RowChangeEvent& event) throw( RuntimeException )
{
// is our aggregate calling?
@@ -3201,7 +3201,7 @@ sal_Bool SAL_CALL ODatabaseForm::approveRowChange(const RowChangeEvent& event) t
return sal_True;
}
-//------------------------------------------------------------------------------
+
sal_Bool SAL_CALL ODatabaseForm::approveRowSetChange(const EventObject& event) throw( RuntimeException )
{
if (event.Source == InterfaceRef(static_cast<XWeak*>(this))) // ignore our aggregate as we handle this approve ourself
@@ -3230,7 +3230,7 @@ sal_Bool SAL_CALL ODatabaseForm::approveRowSetChange(const EventObject& event) t
//==============================================================================
// com::sun::star::sdb::XRowSetApproveBroadcaster
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::addRowSetApproveListener(const Reference<XRowSetApproveListener>& _rListener) throw( RuntimeException )
{
::osl::ResettableMutexGuard aGuard(m_aMutex);
@@ -3248,7 +3248,7 @@ void SAL_CALL ODatabaseForm::addRowSetApproveListener(const Reference<XRowSetApp
}
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::removeRowSetApproveListener(const Reference<XRowSetApproveListener>& _rListener) throw( RuntimeException )
{
::osl::ResettableMutexGuard aGuard(m_aMutex);
@@ -3267,24 +3267,24 @@ void SAL_CALL ODatabaseForm::removeRowSetApproveListener(const Reference<XRowSet
//==============================================================================
// com::sun:star::form::XDatabaseParameterBroadcaster
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::addDatabaseParameterListener(const Reference<XDatabaseParameterListener>& _rListener) throw( RuntimeException )
{
m_aParameterManager.addParameterListener( _rListener );
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::removeDatabaseParameterListener(const Reference<XDatabaseParameterListener>& _rListener) throw( RuntimeException )
{
m_aParameterManager.removeParameterListener( _rListener );
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::addParameterListener(const Reference<XDatabaseParameterListener>& _rListener) throw( RuntimeException )
{
ODatabaseForm::addDatabaseParameterListener( _rListener );
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::removeParameterListener(const Reference<XDatabaseParameterListener>& _rListener) throw( RuntimeException )
{
ODatabaseForm::removeDatabaseParameterListener( _rListener );
@@ -3292,7 +3292,7 @@ void SAL_CALL ODatabaseForm::removeParameterListener(const Reference<XDatabasePa
//==============================================================================
// com::sun::star::sdb::XCompletedExecution
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::executeWithCompletion( const Reference< XInteractionHandler >& _rxHandler ) throw(SQLException, RuntimeException)
{
::osl::ClearableMutexGuard aGuard(m_aMutex);
@@ -3316,7 +3316,7 @@ void SAL_CALL ODatabaseForm::executeWithCompletion( const Reference< XInteractio
//==============================================================================
// com::sun::star::sdbc::XRowSet
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::execute() throw( SQLException, RuntimeException )
{
::osl::ResettableMutexGuard aGuard(m_aMutex);
@@ -3340,14 +3340,14 @@ void SAL_CALL ODatabaseForm::execute() throw( SQLException, RuntimeException )
}
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::addRowSetListener(const Reference<XRowSetListener>& _rListener) throw( RuntimeException )
{
if (m_xAggregateAsRowSet.is())
m_xAggregateAsRowSet->addRowSetListener(_rListener);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::removeRowSetListener(const Reference<XRowSetListener>& _rListener) throw( RuntimeException )
{
if (m_xAggregateAsRowSet.is())
@@ -3356,109 +3356,109 @@ void SAL_CALL ODatabaseForm::removeRowSetListener(const Reference<XRowSetListene
//==============================================================================
// com::sun::star::sdbc::XResultSet
-//------------------------------------------------------------------------------
+
sal_Bool SAL_CALL ODatabaseForm::next() throw( SQLException, RuntimeException )
{
return m_xAggregateAsRowSet->next();
}
-//------------------------------------------------------------------------------
+
sal_Bool SAL_CALL ODatabaseForm::isBeforeFirst() throw( SQLException, RuntimeException )
{
return m_xAggregateAsRowSet->isBeforeFirst();
}
-//------------------------------------------------------------------------------
+
sal_Bool SAL_CALL ODatabaseForm::isAfterLast() throw( SQLException, RuntimeException )
{
return m_xAggregateAsRowSet->isAfterLast();
}
-//------------------------------------------------------------------------------
+
sal_Bool SAL_CALL ODatabaseForm::isFirst() throw( SQLException, RuntimeException )
{
return m_xAggregateAsRowSet->isFirst();
}
-//------------------------------------------------------------------------------
+
sal_Bool SAL_CALL ODatabaseForm::isLast() throw( SQLException, RuntimeException )
{
return m_xAggregateAsRowSet->isLast();
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::beforeFirst() throw( SQLException, RuntimeException )
{
m_xAggregateAsRowSet->beforeFirst();
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::afterLast() throw( SQLException, RuntimeException )
{
m_xAggregateAsRowSet->afterLast();
}
-//------------------------------------------------------------------------------
+
sal_Bool SAL_CALL ODatabaseForm::first() throw( SQLException, RuntimeException )
{
return m_xAggregateAsRowSet->first();
}
-//------------------------------------------------------------------------------
+
sal_Bool SAL_CALL ODatabaseForm::last() throw( SQLException, RuntimeException )
{
return m_xAggregateAsRowSet->last();
}
-//------------------------------------------------------------------------------
+
sal_Int32 SAL_CALL ODatabaseForm::getRow() throw( SQLException, RuntimeException )
{
return m_xAggregateAsRowSet->getRow();
}
-//------------------------------------------------------------------------------
+
sal_Bool SAL_CALL ODatabaseForm::absolute(sal_Int32 row) throw( SQLException, RuntimeException )
{
return m_xAggregateAsRowSet->absolute(row);
}
-//------------------------------------------------------------------------------
+
sal_Bool SAL_CALL ODatabaseForm::relative(sal_Int32 rows) throw( SQLException, RuntimeException )
{
return m_xAggregateAsRowSet->relative(rows);
}
-//------------------------------------------------------------------------------
+
sal_Bool SAL_CALL ODatabaseForm::previous() throw( SQLException, RuntimeException )
{
return m_xAggregateAsRowSet->previous();
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::refreshRow() throw( SQLException, RuntimeException )
{
m_xAggregateAsRowSet->refreshRow();
}
-//------------------------------------------------------------------------------
+
sal_Bool SAL_CALL ODatabaseForm::rowUpdated() throw( SQLException, RuntimeException )
{
return m_xAggregateAsRowSet->rowUpdated();
}
-//------------------------------------------------------------------------------
+
sal_Bool SAL_CALL ODatabaseForm::rowInserted() throw( SQLException, RuntimeException )
{
return m_xAggregateAsRowSet->rowInserted();
}
-//------------------------------------------------------------------------------
+
sal_Bool SAL_CALL ODatabaseForm::rowDeleted() throw( SQLException, RuntimeException )
{
return m_xAggregateAsRowSet->rowDeleted();
}
-//------------------------------------------------------------------------------
+
InterfaceRef SAL_CALL ODatabaseForm::getStatement() throw( SQLException, RuntimeException )
{
return m_xAggregateAsRowSet->getStatement();
@@ -3466,7 +3466,7 @@ InterfaceRef SAL_CALL ODatabaseForm::getStatement() throw( SQLException, Runtime
// com::sun::star::sdbc::XResultSetUpdate
// exceptions during insert update and delete will be forwarded to the errorlistener
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::insertRow() throw( SQLException, RuntimeException )
{
try
@@ -3486,7 +3486,7 @@ void SAL_CALL ODatabaseForm::insertRow() throw( SQLException, RuntimeException )
}
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::updateRow() throw( SQLException, RuntimeException )
{
try
@@ -3506,7 +3506,7 @@ void SAL_CALL ODatabaseForm::updateRow() throw( SQLException, RuntimeException )
}
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::deleteRow() throw( SQLException, RuntimeException )
{
try
@@ -3526,7 +3526,7 @@ void SAL_CALL ODatabaseForm::deleteRow() throw( SQLException, RuntimeException )
}
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::cancelRowUpdates() throw( SQLException, RuntimeException )
{
try
@@ -3546,7 +3546,7 @@ void SAL_CALL ODatabaseForm::cancelRowUpdates() throw( SQLException, RuntimeExce
}
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::moveToInsertRow() throw( SQLException, RuntimeException )
{
Reference<XResultSetUpdate> xUpdate;
@@ -3581,7 +3581,7 @@ void SAL_CALL ODatabaseForm::moveToInsertRow() throw( SQLException, RuntimeExcep
}
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::moveToCurrentRow() throw( SQLException, RuntimeException )
{
Reference<XResultSetUpdate> xUpdate;
@@ -3590,7 +3590,7 @@ void SAL_CALL ODatabaseForm::moveToCurrentRow() throw( SQLException, RuntimeExce
}
// com::sun::star::sdbcx::XDeleteRows
-//------------------------------------------------------------------------------
+
Sequence<sal_Int32> SAL_CALL ODatabaseForm::deleteRows(const Sequence<Any>& rows) throw( SQLException, RuntimeException )
{
try
@@ -3613,145 +3613,145 @@ Sequence<sal_Int32> SAL_CALL ODatabaseForm::deleteRows(const Sequence<Any>& rows
}
// com::sun::star::sdbc::XParameters
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::setNull(sal_Int32 parameterIndex, sal_Int32 sqlType) throw( SQLException, RuntimeException )
{
m_aParameterManager.setNull(parameterIndex, sqlType);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::setObjectNull(sal_Int32 parameterIndex, sal_Int32 sqlType, const OUString& typeName) throw( SQLException, RuntimeException )
{
m_aParameterManager.setObjectNull(parameterIndex, sqlType, typeName);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::setBoolean(sal_Int32 parameterIndex, sal_Bool x) throw( SQLException, RuntimeException )
{
m_aParameterManager.setBoolean(parameterIndex, x);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::setByte(sal_Int32 parameterIndex, sal_Int8 x) throw( SQLException, RuntimeException )
{
m_aParameterManager.setByte(parameterIndex, x);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::setShort(sal_Int32 parameterIndex, sal_Int16 x) throw( SQLException, RuntimeException )
{
m_aParameterManager.setShort(parameterIndex, x);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::setInt(sal_Int32 parameterIndex, sal_Int32 x) throw( SQLException, RuntimeException )
{
m_aParameterManager.setInt(parameterIndex, x);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::setLong(sal_Int32 parameterIndex, sal_Int64 x) throw( SQLException, RuntimeException )
{
m_aParameterManager.setLong(parameterIndex, x);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::setFloat(sal_Int32 parameterIndex, float x) throw( SQLException, RuntimeException )
{
m_aParameterManager.setFloat(parameterIndex, x);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::setDouble(sal_Int32 parameterIndex, double x) throw( SQLException, RuntimeException )
{
m_aParameterManager.setDouble(parameterIndex, x);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::setString(sal_Int32 parameterIndex, const OUString& x) throw( SQLException, RuntimeException )
{
m_aParameterManager.setString(parameterIndex, x);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::setBytes(sal_Int32 parameterIndex, const Sequence< sal_Int8 >& x) throw( SQLException, RuntimeException )
{
m_aParameterManager.setBytes(parameterIndex, x);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::setDate(sal_Int32 parameterIndex, const ::com::sun::star::util::Date& x) throw( SQLException, RuntimeException )
{
m_aParameterManager.setDate(parameterIndex, x);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::setTime(sal_Int32 parameterIndex, const ::com::sun::star::util::Time& x) throw( SQLException, RuntimeException )
{
m_aParameterManager.setTime(parameterIndex, x);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::setTimestamp(sal_Int32 parameterIndex, const ::com::sun::star::util::DateTime& x) throw( SQLException, RuntimeException )
{
m_aParameterManager.setTimestamp(parameterIndex, x);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::setBinaryStream(sal_Int32 parameterIndex, const Reference<XInputStream>& x, sal_Int32 length) throw( SQLException, RuntimeException )
{
m_aParameterManager.setBinaryStream(parameterIndex, x, length);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::setCharacterStream(sal_Int32 parameterIndex, const Reference<XInputStream>& x, sal_Int32 length) throw( SQLException, RuntimeException )
{
m_aParameterManager.setCharacterStream(parameterIndex, x, length);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::setObjectWithInfo(sal_Int32 parameterIndex, const Any& x, sal_Int32 targetSqlType, sal_Int32 scale) throw( SQLException, RuntimeException )
{
m_aParameterManager.setObjectWithInfo(parameterIndex, x, targetSqlType, scale);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::setObject(sal_Int32 parameterIndex, const Any& x) throw( SQLException, RuntimeException )
{
m_aParameterManager.setObject(parameterIndex, x);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::setRef(sal_Int32 parameterIndex, const Reference<XRef>& x) throw( SQLException, RuntimeException )
{
m_aParameterManager.setRef(parameterIndex, x);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::setBlob(sal_Int32 parameterIndex, const Reference<XBlob>& x) throw( SQLException, RuntimeException )
{
m_aParameterManager.setBlob(parameterIndex, x);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::setClob(sal_Int32 parameterIndex, const Reference<XClob>& x) throw( SQLException, RuntimeException )
{
m_aParameterManager.setClob(parameterIndex, x);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::setArray(sal_Int32 parameterIndex, const Reference<XArray>& x) throw( SQLException, RuntimeException )
{
m_aParameterManager.setArray(parameterIndex, x);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::clearParameters() throw( SQLException, RuntimeException )
{
m_aParameterManager.clearParameters();
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::propertyChange( const PropertyChangeEvent& evt ) throw (RuntimeException)
{
if ( evt.Source == m_xParent )
@@ -3769,13 +3769,13 @@ void SAL_CALL ODatabaseForm::propertyChange( const PropertyChangeEvent& evt ) th
}
// com::sun::star::lang::XServiceInfo
-//------------------------------------------------------------------------------
+
OUString SAL_CALL ODatabaseForm::getImplementationName_Static()
{
return OUString( "com.sun.star.comp.forms.ODatabaseForm" );
}
-//------------------------------------------------------------------------------
+
Sequence< OUString > SAL_CALL ODatabaseForm::getCompatibleServiceNames_Static()
{
Sequence< OUString > aServices( 1 );
@@ -3786,7 +3786,7 @@ Sequence< OUString > SAL_CALL ODatabaseForm::getCompatibleServiceNames_Static()
return aServices;
}
-//------------------------------------------------------------------------------
+
Sequence< OUString > SAL_CALL ODatabaseForm::getCurrentServiceNames_Static()
{
Sequence< OUString > aServices( 5 );
@@ -3801,7 +3801,7 @@ Sequence< OUString > SAL_CALL ODatabaseForm::getCurrentServiceNames_Static()
return aServices;
}
-//------------------------------------------------------------------------------
+
Sequence< OUString > SAL_CALL ODatabaseForm::getSupportedServiceNames_Static()
{
return ::comphelper::concatSequences(
@@ -3810,13 +3810,13 @@ Sequence< OUString > SAL_CALL ODatabaseForm::getSupportedServiceNames_Static()
);
}
-//------------------------------------------------------------------------------
+
OUString SAL_CALL ODatabaseForm::getImplementationName() throw( RuntimeException )
{
return getImplementationName_Static();
}
-//------------------------------------------------------------------------------
+
Sequence< OUString > SAL_CALL ODatabaseForm::getSupportedServiceNames() throw( RuntimeException )
{
// the services of our aggregate
@@ -3964,7 +3964,7 @@ void SAL_CALL ODatabaseForm::write(const Reference<XObjectOutputStream>& _rxOutS
}
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::read(const Reference<XObjectInputStream>& _rxInStream) throw( IOException, RuntimeException )
{
DBG_ASSERT(m_xAggregateSet.is(), "ODatabaseForm::read : only to be called if the aggregate exists !");
@@ -4061,7 +4061,7 @@ void SAL_CALL ODatabaseForm::read(const Reference<XObjectInputStream>& _rxInStre
m_xAggregateSet->setPropertyValue(PROPERTY_APPLYFILTER, makeAny((sal_Bool)((nAnyMask & DONTAPPLYFILTER) == 0)));
}
-//------------------------------------------------------------------------------
+
void ODatabaseForm::implInserted( const ElementDescription* _pElement )
{
OFormComponents::implInserted( _pElement );
@@ -4075,7 +4075,7 @@ void ODatabaseForm::implInserted( const ElementDescription* _pElement )
}
}
-//------------------------------------------------------------------------------
+
void ODatabaseForm::implRemoved(const InterfaceRef& _rxObject)
{
OFormComponents::implRemoved( _rxObject );
@@ -4088,7 +4088,7 @@ void ODatabaseForm::implRemoved(const InterfaceRef& _rxObject)
}
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::errorOccured(const SQLErrorEvent& _rEvent) throw( RuntimeException )
{
// give it to my own error listener
@@ -4098,7 +4098,7 @@ void SAL_CALL ODatabaseForm::errorOccured(const SQLErrorEvent& _rEvent) throw( R
}
// com::sun::star::container::XNamed
-//------------------------------------------------------------------------------
+
OUString SAL_CALL ODatabaseForm::getName() throw( RuntimeException )
{
OUString sReturn;
@@ -4106,7 +4106,7 @@ OUString SAL_CALL ODatabaseForm::getName() throw( RuntimeException )
return sReturn;
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseForm::setName(const OUString& aName) throw( RuntimeException )
{
setFastPropertyValue(PROPERTY_ID_NAME, makeAny(aName));
diff --git a/forms/source/component/Date.cxx b/forms/source/component/Date.cxx
index 8ff8a537dc68..3e4ccd0d3a90 100644
--- a/forms/source/component/Date.cxx
+++ b/forms/source/component/Date.cxx
@@ -44,25 +44,25 @@ using namespace ::com::sun::star::awt;
using namespace ::com::sun::star::io;
using namespace ::com::sun::star::lang;
-//------------------------------------------------------------------
+
ODateControl::ODateControl(const Reference<XComponentContext>& _rxFactory)
:OBoundControl(_rxFactory, VCL_CONTROL_DATEFIELD)
{
}
-//------------------------------------------------------------------
+
InterfaceRef SAL_CALL ODateControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new ODateControl( comphelper::getComponentContext(_rxFactory) ));
}
-//------------------------------------------------------------------------------
+
Sequence<Type> ODateControl::_getTypes()
{
return OBoundControl::_getTypes();
}
-//------------------------------------------------------------------------------
+
StringSequence SAL_CALL ODateControl::getSupportedServiceNames() throw()
{
StringSequence aSupported = OBoundControl::getSupportedServiceNames();
@@ -74,19 +74,19 @@ StringSequence SAL_CALL ODateControl::getSupportedServiceNames() throw()
}
/*************************************************************************/
-//------------------------------------------------------------------
+
InterfaceRef SAL_CALL ODateModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new ODateModel( comphelper::getComponentContext(_rxFactory) ));
}
-//------------------------------------------------------------------------------
+
Sequence<Type> ODateModel::_getTypes()
{
return OEditBaseModel::_getTypes();
}
-//------------------------------------------------------------------
+
ODateModel::ODateModel(const Reference<XComponentContext>& _rxFactory)
: OEditBaseModel(_rxFactory, VCL_CONTROLMODEL_DATEFIELD,
FRM_SUN_CONTROL_DATEFIELD, sal_True, sal_True)
@@ -112,7 +112,7 @@ ODateModel::ODateModel(const Reference<XComponentContext>& _rxFactory)
osl_atomic_decrement( &m_refCount );
}
-//------------------------------------------------------------------------------
+
ODateModel::ODateModel( const ODateModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
: OEditBaseModel(_pOriginal, _rxFactory)
, OLimitedFormats(_rxFactory, FormComponentType::DATEFIELD)
@@ -121,18 +121,18 @@ ODateModel::ODateModel( const ODateModel* _pOriginal, const Reference<XComponent
setAggregateSet( m_xAggregateFastSet, getOriginalHandle( PROPERTY_ID_DATEFORMAT ) );
}
-//------------------------------------------------------------------------------
+
ODateModel::~ODateModel( )
{
setAggregateSet(Reference< XFastPropertySet >(), -1);
}
// XCloneable
-//------------------------------------------------------------------------------
+
IMPLEMENT_DEFAULT_CLONING( ODateModel )
// XServiceInfo
-//------------------------------------------------------------------------------
+
StringSequence SAL_CALL ODateModel::getSupportedServiceNames() throw()
{
StringSequence aSupported = OBoundControlModel::getSupportedServiceNames();
@@ -155,14 +155,14 @@ StringSequence SAL_CALL ODateModel::getSupportedServiceNames() throw()
return aSupported;
}
-//------------------------------------------------------------------------------
+
OUString SAL_CALL ODateModel::getServiceName() throw ( ::com::sun::star::uno::RuntimeException)
{
return OUString(FRM_COMPONENT_DATEFIELD); // old (non-sun) name for compatibility !
}
// XPropertySet
-//------------------------------------------------------------------------------
+
void ODateModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 4, OEditBaseModel )
@@ -173,7 +173,7 @@ void ODateModel::describeFixedProperties( Sequence< Property >& _rProps ) const
END_DESCRIBE_PROPERTIES();
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODateModel::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle ) const
{
switch (_nHandle)
@@ -190,7 +190,7 @@ void SAL_CALL ODateModel::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle
}
}
-//------------------------------------------------------------------------------
+
sal_Bool SAL_CALL ODateModel::convertFastPropertyValue(Any& _rConvertedValue, Any& _rOldValue,
sal_Int32 _nHandle, const Any& _rValue ) throw(IllegalArgumentException)
{
@@ -200,7 +200,7 @@ sal_Bool SAL_CALL ODateModel::convertFastPropertyValue(Any& _rConvertedValue, An
return OEditBaseModel::convertFastPropertyValue(_rConvertedValue, _rOldValue, _nHandle, _rValue );
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODateModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const Any& _rValue) throw ( ::com::sun::star::uno::Exception)
{
if (PROPERTY_ID_FORMATKEY == _nHandle)
@@ -210,7 +210,7 @@ void SAL_CALL ODateModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, c
}
// XLoadListener
-//------------------------------------------------------------------------------
+
void ODateModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm )
{
OBoundControlModel::onConnectedDbColumn( _rxForm );
@@ -230,7 +230,7 @@ void ODateModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm )
}
}
-//------------------------------------------------------------------------------
+
sal_Bool ODateModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
{
Any aControlValue( m_xAggregateFastSet->getFastPropertyValue( getValuePropertyAggHandle() ) );
@@ -271,25 +271,25 @@ sal_Bool ODateModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
return sal_True;
}
-//------------------------------------------------------------------------------
+
Any ODateModel::translateControlValueToExternalValue( ) const
{
return getControlValue();
}
-//------------------------------------------------------------------------------
+
Any ODateModel::translateExternalValueToControlValue( const Any& _rExternalValue ) const
{
return _rExternalValue;
}
-//------------------------------------------------------------------------------
+
Any ODateModel::translateControlValueToValidatableValue( ) const
{
return getControlValue();
}
-//------------------------------------------------------------------------------
+
Any ODateModel::translateDbColumnToControlValue()
{
util::Date aDate = m_xColumn->getDate();
@@ -301,20 +301,20 @@ Any ODateModel::translateDbColumnToControlValue()
return m_aSaveValue;
}
-//------------------------------------------------------------------------------
+
Any ODateModel::getDefaultForReset() const
{
return m_aDefault;
}
-//------------------------------------------------------------------------------
+
void ODateModel::resetNoBroadcast()
{
OEditBaseModel::resetNoBroadcast();
m_aSaveValue.clear();
}
-//------------------------------------------------------------------------------
+
Sequence< Type > ODateModel::getSupportedBindingTypes()
{
return Sequence< Type >( &::getCppuType( static_cast< util::Date* >( NULL ) ), 1 );
diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx
index bdaf676f8851..4f577eb53876 100644
--- a/forms/source/component/Edit.cxx
+++ b/forms/source/component/Edit.cxx
@@ -61,13 +61,13 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::util;
using namespace ::com::sun::star::form::binding;
-//------------------------------------------------------------------
+
InterfaceRef SAL_CALL OEditControl_CreateInstance(const Reference< XMultiServiceFactory > & _rxFactory)
{
return *(new OEditControl( comphelper::getComponentContext(_rxFactory) ));
}
-//------------------------------------------------------------------------------
+
Sequence<Type> OEditControl::_getTypes()
{
static Sequence<Type> aTypes;
@@ -79,7 +79,7 @@ Sequence<Type> OEditControl::_getTypes()
return aTypes;
}
-//------------------------------------------------------------------------------
+
Any SAL_CALL OEditControl::queryAggregation(const Type& _rType) throw (RuntimeException)
{
Any aReturn = OBoundControl::queryAggregation(_rType);
@@ -89,7 +89,7 @@ Any SAL_CALL OEditControl::queryAggregation(const Type& _rType) throw (RuntimeEx
return aReturn;
}
-//------------------------------------------------------------------------------
+
OEditControl::OEditControl(const Reference<XComponentContext>& _rxFactory)
:OBoundControl( _rxFactory, FRM_SUN_CONTROL_RICHTEXTCONTROL )
,m_aChangeListeners(m_aMutex)
@@ -108,7 +108,7 @@ OEditControl::OEditControl(const Reference<XComponentContext>& _rxFactory)
decrement(m_refCount);
}
-//------------------------------------------------------------------------------
+
OEditControl::~OEditControl()
{
if( m_nKeyEvent )
@@ -123,20 +123,20 @@ OEditControl::~OEditControl()
}
// XChangeBroadcaster
-//------------------------------------------------------------------------------
+
void OEditControl::addChangeListener(const Reference<XChangeListener>& l) throw ( ::com::sun::star::uno::RuntimeException)
{
m_aChangeListeners.addInterface( l );
}
-//------------------------------------------------------------------------------
+
void OEditControl::removeChangeListener(const Reference<XChangeListener>& l) throw ( ::com::sun::star::uno::RuntimeException)
{
m_aChangeListeners.removeInterface( l );
}
// OComponentHelper
-//------------------------------------------------------------------------------
+
void OEditControl::disposing()
{
OBoundControl::disposing();
@@ -146,7 +146,7 @@ void OEditControl::disposing()
}
// XServiceInfo
-//------------------------------------------------------------------------------
+
StringSequence OEditControl::getSupportedServiceNames() throw()
{
StringSequence aSupported = OBoundControl::getSupportedServiceNames();
@@ -158,14 +158,14 @@ StringSequence OEditControl::getSupportedServiceNames() throw()
}
// XEventListener
-//------------------------------------------------------------------------------
+
void OEditControl::disposing(const EventObject& Source) throw( RuntimeException )
{
OBoundControl::disposing(Source);
}
// XFocusListener
-//------------------------------------------------------------------------------
+
void OEditControl::focusGained( const FocusEvent& /*e*/ ) throw ( ::com::sun::star::uno::RuntimeException)
{
Reference<XPropertySet> xSet(getModel(), UNO_QUERY);
@@ -173,7 +173,7 @@ void OEditControl::focusGained( const FocusEvent& /*e*/ ) throw ( ::com::sun::st
xSet->getPropertyValue( PROPERTY_TEXT ) >>= m_aHtmlChangeValue;
}
-//------------------------------------------------------------------------------
+
void OEditControl::focusLost( const FocusEvent& /*e*/ ) throw ( ::com::sun::star::uno::RuntimeException)
{
Reference<XPropertySet> xSet(getModel(), UNO_QUERY);
@@ -190,7 +190,7 @@ void OEditControl::focusLost( const FocusEvent& /*e*/ ) throw ( ::com::sun::star
}
// XKeyListener
-//------------------------------------------------------------------------------
+
void OEditControl::keyPressed(const ::com::sun::star::awt::KeyEvent& e) throw ( ::com::sun::star::uno::RuntimeException)
{
if( e.KeyCode != KEY_RETURN || e.Modifiers != 0 )
@@ -247,12 +247,12 @@ void OEditControl::keyPressed(const ::com::sun::star::awt::KeyEvent& e) throw (
m_nKeyEvent = Application::PostUserEvent( LINK(this, OEditControl,OnKeyPressed) );
}
-//------------------------------------------------------------------------------
+
void OEditControl::keyReleased(const ::com::sun::star::awt::KeyEvent& /*e*/) throw ( ::com::sun::star::uno::RuntimeException)
{
}
-//------------------------------------------------------------------------------
+
IMPL_LINK(OEditControl, OnKeyPressed, void*, /*EMPTYARG*/)
{
m_nKeyEvent = 0;
@@ -265,27 +265,27 @@ IMPL_LINK(OEditControl, OnKeyPressed, void*, /*EMPTYARG*/)
return 0L;
}
-//------------------------------------------------------------------
+
void SAL_CALL OEditControl::createPeer( const Reference< XToolkit>& _rxToolkit, const Reference< XWindowPeer>& _rxParent ) throw ( RuntimeException )
{
OBoundControl::createPeer(_rxToolkit, _rxParent);
}
/*************************************************************************/
-//------------------------------------------------------------------
+
InterfaceRef SAL_CALL OEditModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new OEditModel( comphelper::getComponentContext(_rxFactory) ));
}
-//------------------------------------------------------------------------------
+
Sequence<Type> OEditModel::_getTypes()
{
return OEditBaseModel::_getTypes();
}
-//------------------------------------------------------------------
+
OEditModel::OEditModel(const Reference<XComponentContext>& _rxFactory)
:OEditBaseModel( _rxFactory, FRM_SUN_COMPONENT_RICHTEXTCONTROL, FRM_SUN_CONTROL_TEXTFIELD, sal_True, sal_True )
,m_bMaxTextLenModified(sal_False)
@@ -296,7 +296,7 @@ OEditModel::OEditModel(const Reference<XComponentContext>& _rxFactory)
initValueProperty( PROPERTY_TEXT, PROPERTY_ID_TEXT );
}
-//------------------------------------------------------------------
+
OEditModel::OEditModel( const OEditModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
:OEditBaseModel( _pOriginal, _rxFactory )
,m_bMaxTextLenModified(sal_False)
@@ -310,7 +310,7 @@ OEditModel::OEditModel( const OEditModel* _pOriginal, const Reference<XComponent
// they will be set to new values, anyway ....
}
-//------------------------------------------------------------------
+
OEditModel::~OEditModel()
{
if (!OComponentHelper::rBHelper.bDisposed)
@@ -321,10 +321,10 @@ OEditModel::~OEditModel()
}
-//------------------------------------------------------------------------------
+
IMPLEMENT_DEFAULT_CLONING( OEditModel )
-//------------------------------------------------------------------------------
+
void OEditModel::disposing()
{
OEditBaseModel::disposing();
@@ -332,14 +332,14 @@ void OEditModel::disposing()
}
// XPersistObject
-//------------------------------------------------------------------------------
+
OUString SAL_CALL OEditModel::getServiceName() throw ( ::com::sun::star::uno::RuntimeException)
{
return OUString(FRM_COMPONENT_EDIT); // old (non-sun) name for compatibility !
}
// XServiceInfo
-//------------------------------------------------------------------------------
+
StringSequence SAL_CALL OEditModel::getSupportedServiceNames() throw()
{
StringSequence aSupported = OBoundControlModel::getSupportedServiceNames();
@@ -378,7 +378,7 @@ void SAL_CALL OEditModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle )
}
}
-//------------------------------------------------------------------------------
+
void OEditModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 5, OEditBaseModel )
@@ -390,7 +390,7 @@ void OEditModel::describeFixedProperties( Sequence< Property >& _rProps ) const
END_DESCRIBE_PROPERTIES();
}
-//------------------------------------------------------------------------------
+
void OEditModel::describeAggregateProperties( Sequence< Property >& _rAggregateProps ) const
{
OEditBaseModel::describeAggregateProperties( _rAggregateProps );
@@ -405,7 +405,7 @@ void OEditModel::describeAggregateProperties( Sequence< Property >& _rAggregateP
}
-//------------------------------------------------------------------------------
+
bool OEditModel::implActsAsRichText( ) const
{
sal_Bool bActAsRichText = sal_False;
@@ -416,7 +416,7 @@ bool OEditModel::implActsAsRichText( ) const
return bActAsRichText;
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OEditModel::reset( ) throw(RuntimeException)
{
// no reset if we currently act as rich text control
@@ -426,7 +426,7 @@ void SAL_CALL OEditModel::reset( ) throw(RuntimeException)
OEditBaseModel::reset();
}
-//------------------------------------------------------------------------------
+
namespace
{
void lcl_transferProperties( const Reference< XPropertySet >& _rxSource, const Reference< XPropertySet >& _rxDest )
@@ -496,7 +496,7 @@ namespace
}
}
-//------------------------------------------------------------------------------
+
void OEditModel::writeAggregate( const Reference< XObjectOutputStream >& _rxOutStream ) const
{
// we need to fake the writing of our aggregate. Since #i24387#, we have another aggregate,
@@ -518,7 +518,7 @@ void OEditModel::writeAggregate( const Reference< XObjectOutputStream >& _rxOutS
xFakedPersist->write( _rxOutStream );
}
-//------------------------------------------------------------------------------
+
void OEditModel::readAggregate( const Reference< XObjectInputStream >& _rxInStream )
{
// we need to fake the reading of our aggregate. Since #i24387#, we have another aggregate,
@@ -537,7 +537,7 @@ void OEditModel::readAggregate( const Reference< XObjectInputStream >& _rxInStre
}
}
-//------------------------------------------------------------------------------
+
void OEditModel::write(const Reference<XObjectOutputStream>& _rxOutStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
{
Any aCurrentText;
@@ -567,7 +567,7 @@ void OEditModel::write(const Reference<XObjectOutputStream>& _rxOutStream) throw
}
}
-//------------------------------------------------------------------------------
+
void OEditModel::read(const Reference<XObjectInputStream>& _rxInStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
{
OEditBaseModel::read(_rxInStream);
@@ -589,7 +589,7 @@ void OEditModel::read(const Reference<XObjectInputStream>& _rxInStream) throw (
}
}
-//------------------------------------------------------------------------------
+
sal_uInt16 OEditModel::getPersistenceFlags() const
{
sal_uInt16 nFlags = OEditBaseModel::getPersistenceFlags();
@@ -600,7 +600,7 @@ sal_uInt16 OEditModel::getPersistenceFlags() const
return nFlags;
}
-//------------------------------------------------------------------------------
+
void OEditModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm )
{
Reference< XPropertySet > xField = getField();
@@ -631,7 +631,7 @@ void OEditModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm )
}
}
-//------------------------------------------------------------------------------
+
void OEditModel::onDisconnectedDbColumn()
{
OEditBaseModel::onDisconnectedDbColumn();
@@ -647,7 +647,7 @@ void OEditModel::onDisconnectedDbColumn()
}
}
-//------------------------------------------------------------------------------
+
sal_Bool OEditModel::approveDbColumnType( sal_Int32 _nColumnType )
{
// if we act as rich text currently, we do not allow binding to a database column
@@ -657,13 +657,13 @@ sal_Bool OEditModel::approveDbColumnType( sal_Int32 _nColumnType )
return OEditBaseModel::approveDbColumnType( _nColumnType );
}
-//------------------------------------------------------------------------------
+
void OEditModel::resetNoBroadcast()
{
OEditBaseModel::resetNoBroadcast();
}
-//------------------------------------------------------------------------------
+
sal_Bool OEditModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
{
Any aNewValue( m_xAggregateFastSet->getFastPropertyValue( getValuePropertyAggHandle() ) );
@@ -701,7 +701,7 @@ sal_Bool OEditModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
return sal_True;
}
-//------------------------------------------------------------------------------
+
Any OEditModel::translateDbColumnToControlValue()
{
OSL_PRECOND( m_pValueFormatter.get(), "OEditModel::translateDbColumnToControlValue: no value formatter!" );
@@ -732,7 +732,7 @@ Any OEditModel::translateDbColumnToControlValue()
return aRet.hasValue() ? aRet : makeAny( OUString() );
}
-//------------------------------------------------------------------------------
+
Any OEditModel::getDefaultForReset() const
{
return makeAny( m_aDefaultText );
diff --git a/forms/source/component/EditBase.cxx b/forms/source/component/EditBase.cxx
index 100d355e1d0d..6c482984c9d3 100644
--- a/forms/source/component/EditBase.cxx
+++ b/forms/source/component/EditBase.cxx
@@ -56,7 +56,7 @@ namespace
const sal_uInt16 DEFAULT_DATE = 0x0010;
}
-//------------------------------------------------------------------
+
OEditBaseModel::OEditBaseModel( const Reference< XComponentContext >& _rxFactory, const OUString& rUnoControlModelName,
const OUString& rDefault, const sal_Bool _bSupportExternalBinding, const sal_Bool _bSupportsValidation )
:OBoundControlModel( _rxFactory, rUnoControlModelName, rDefault, sal_True, _bSupportExternalBinding, _bSupportsValidation )
@@ -66,7 +66,7 @@ OEditBaseModel::OEditBaseModel( const Reference< XComponentContext >& _rxFactory
{
}
-//------------------------------------------------------------------
+
OEditBaseModel::OEditBaseModel( const OEditBaseModel* _pOriginal, const Reference< XComponentContext >& _rxFactory )
:OBoundControlModel( _pOriginal, _rxFactory )
,m_nLastReadVersion(0)
@@ -78,13 +78,13 @@ OEditBaseModel::OEditBaseModel( const OEditBaseModel* _pOriginal, const Referenc
m_aDefaultText = _pOriginal->m_aDefaultText;
}
-//------------------------------------------------------------------
+
OEditBaseModel::~OEditBaseModel( )
{
}
// XPersist
-//------------------------------------------------------------------------------
+
void OEditBaseModel::write(const Reference<XObjectOutputStream>& _rxOutStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
{
OBoundControlModel::write(_rxOutStream);
@@ -152,13 +152,13 @@ void OEditBaseModel::write(const Reference<XObjectOutputStream>& _rxOutStream) t
// !!! properties common to all OEditBaseModel derived classes should be written in writeCommonEditProperties !!!
}
-//------------------------------------------------------------------------------
+
sal_uInt16 OEditBaseModel::getPersistenceFlags() const
{
return PF_HANDLE_COMMON_PROPS;
}
-//------------------------------------------------------------------------------
+
void OEditBaseModel::read(const Reference<XObjectInputStream>& _rxInStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
{
OBoundControlModel::read(_rxInStream);
@@ -216,14 +216,14 @@ void OEditBaseModel::read(const Reference<XObjectInputStream>& _rxInStream) thro
resetNoBroadcast();
};
-//------------------------------------------------------------------------------
+
void OEditBaseModel::defaultCommonEditProperties()
{
OBoundControlModel::defaultCommonProperties();
// no own common properties at the moment
}
-//------------------------------------------------------------------------------
+
void OEditBaseModel::readCommonEditProperties(const Reference<XObjectInputStream>& _rxInStream)
{
sal_Int32 nLen = _rxInStream->readLong();
@@ -243,7 +243,7 @@ void OEditBaseModel::readCommonEditProperties(const Reference<XObjectInputStream
xMark->deleteMark(nMark);
}
-//------------------------------------------------------------------------------
+
void OEditBaseModel::writeCommonEditProperties(const Reference<XObjectOutputStream>& _rxOutStream)
{
Reference<XMarkableStream> xMark(_rxOutStream, UNO_QUERY);
@@ -267,7 +267,7 @@ void OEditBaseModel::writeCommonEditProperties(const Reference<XObjectOutputStre
xMark->deleteMark(nMark);
}
-//------------------------------------------------------------------------------
+
void OEditBaseModel::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
{
switch (nHandle)
@@ -291,7 +291,7 @@ void OEditBaseModel::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) cons
}
}
-//------------------------------------------------------------------------------
+
sal_Bool OEditBaseModel::convertFastPropertyValue( Any& rConvertedValue, Any& rOldValue,
sal_Int32 nHandle, const Any& rValue ) throw( IllegalArgumentException )
{
@@ -326,7 +326,7 @@ sal_Bool OEditBaseModel::convertFastPropertyValue( Any& rConvertedValue, Any& rO
return bModified;
}
-//------------------------------------------------------------------------------
+
void OEditBaseModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue ) throw ( ::com::sun::star::uno::Exception)
{
switch (nHandle)
@@ -357,7 +357,7 @@ void OEditBaseModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const
}
// XPropertyState
-//------------------------------------------------------------------------------
+
Any OEditBaseModel::getPropertyDefaultByHandle( sal_Int32 nHandle ) const
{
switch (nHandle)
diff --git a/forms/source/component/File.cxx b/forms/source/component/File.cxx
index d8444ee35b0d..866067d649e7 100644
--- a/forms/source/component/File.cxx
+++ b/forms/source/component/File.cxx
@@ -45,13 +45,13 @@ using namespace ::com::sun::star::io;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::util;
-//------------------------------------------------------------------
+
InterfaceRef SAL_CALL OFileControlModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new OFileControlModel( comphelper::getComponentContext(_rxFactory) ));
}
-//------------------------------------------------------------------------------
+
Sequence<Type> OFileControlModel::_getTypes()
{
static Sequence<Type> aTypes;
@@ -71,7 +71,7 @@ Sequence<Type> OFileControlModel::_getTypes()
// XServiceInfo
-//------------------------------------------------------------------------------
+
StringSequence OFileControlModel::getSupportedServiceNames() throw(RuntimeException)
{
StringSequence aSupported = OControlModel::getSupportedServiceNames();
@@ -82,8 +82,8 @@ StringSequence OFileControlModel::getSupportedServiceNames() throw(RuntimeExcep
return aSupported;
}
-//------------------------------------------------------------------
-//------------------------------------------------------------------
+
+
OFileControlModel::OFileControlModel(const Reference<XComponentContext>& _rxFactory)
:OControlModel(_rxFactory, VCL_CONTROLMODEL_FILECONTROL)
,m_aResetListeners(m_aMutex)
@@ -91,7 +91,7 @@ OFileControlModel::OFileControlModel(const Reference<XComponentContext>& _rxFact
m_nClassId = FormComponentType::FILECONTROL;
}
-//------------------------------------------------------------------
+
OFileControlModel::OFileControlModel( const OFileControlModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
:OControlModel( _pOriginal, _rxFactory )
,m_aResetListeners( m_aMutex )
@@ -100,7 +100,7 @@ OFileControlModel::OFileControlModel( const OFileControlModel* _pOriginal, const
m_sDefaultValue = _pOriginal->m_sDefaultValue;
}
-//------------------------------------------------------------------
+
OFileControlModel::~OFileControlModel()
{
if (!OComponentHelper::rBHelper.bDisposed)
@@ -110,10 +110,10 @@ OFileControlModel::~OFileControlModel()
}
}
-//------------------------------------------------------------------------------
+
IMPLEMENT_DEFAULT_CLONING( OFileControlModel )
-//------------------------------------------------------------------------------
+
Any SAL_CALL OFileControlModel::queryAggregation(const Type& _rType) throw (RuntimeException)
{
Any aReturn = OControlModel::queryAggregation(_rType);
@@ -126,7 +126,7 @@ Any SAL_CALL OFileControlModel::queryAggregation(const Type& _rType) throw (Runt
}
// OComponentHelper
-//-----------------------------------------------------------------------------
+
void OFileControlModel::disposing()
{
OControlModel::disposing();
@@ -135,7 +135,7 @@ void OFileControlModel::disposing()
m_aResetListeners.disposeAndClear(aEvt);
}
-//------------------------------------------------------------------------------
+
Any OFileControlModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
{
switch ( _nHandle )
@@ -146,7 +146,7 @@ Any OFileControlModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
return OControlModel::getPropertyDefaultByHandle( _nHandle );
}
-//------------------------------------------------------------------------------
+
void OFileControlModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle) const
{
switch (nHandle)
@@ -157,7 +157,7 @@ void OFileControlModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle) con
}
}
-//------------------------------------------------------------------------------
+
void OFileControlModel::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const Any& rValue) throw ( ::com::sun::star::uno::Exception)
{
switch (nHandle)
@@ -171,7 +171,7 @@ void OFileControlModel::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, cons
}
}
-//------------------------------------------------------------------------------
+
sal_Bool OFileControlModel::convertFastPropertyValue(Any& rConvertedValue, Any& rOldValue, sal_Int32 nHandle, const Any& rValue)
throw( IllegalArgumentException )
{
@@ -184,7 +184,7 @@ sal_Bool OFileControlModel::convertFastPropertyValue(Any& rConvertedValue, Any&
}
}
-//------------------------------------------------------------------------------
+
void OFileControlModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 2, OControlModel )
@@ -193,13 +193,13 @@ void OFileControlModel::describeFixedProperties( Sequence< Property >& _rProps )
END_DESCRIBE_PROPERTIES();
}
-//------------------------------------------------------------------------------
+
OUString SAL_CALL OFileControlModel::getServiceName() throw ( ::com::sun::star::uno::RuntimeException)
{
return OUString(FRM_COMPONENT_FILECONTROL); // old (non-sun) name for compatibility !
}
-//------------------------------------------------------------------------------
+
void OFileControlModel::write(const Reference<stario::XObjectOutputStream>& _rxOutStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
{
OControlModel::write(_rxOutStream);
@@ -213,7 +213,7 @@ void OFileControlModel::write(const Reference<stario::XObjectOutputStream>& _rxO
writeHelpTextCompatibly(_rxOutStream);
}
-//------------------------------------------------------------------------------
+
void OFileControlModel::read(const Reference<stario::XObjectInputStream>& _rxInStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
{
OControlModel::read(_rxInStream);
@@ -239,7 +239,7 @@ void OFileControlModel::read(const Reference<stario::XObjectInputStream>& _rxInS
// _reset();
}
-//-----------------------------------------------------------------------------
+
void SAL_CALL OFileControlModel::reset() throw ( ::com::sun::star::uno::RuntimeException)
{
::cppu::OInterfaceIteratorHelper aIter(m_aResetListeners);
@@ -259,19 +259,19 @@ void SAL_CALL OFileControlModel::reset() throw ( ::com::sun::star::uno::RuntimeE
}
}
-//-----------------------------------------------------------------------------
+
void OFileControlModel::addResetListener(const Reference<XResetListener>& _rxListener) throw ( ::com::sun::star::uno::RuntimeException)
{
m_aResetListeners.addInterface(_rxListener);
}
-//-----------------------------------------------------------------------------
+
void OFileControlModel::removeResetListener(const Reference<XResetListener>& _rxListener) throw ( ::com::sun::star::uno::RuntimeException)
{
m_aResetListeners.removeInterface(_rxListener);
}
-//------------------------------------------------------------------------------
+
void OFileControlModel::_reset()
{
{ // release our mutex once (it's acquired in the calling method !), as setting aggregate properties
diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx
index 8524b1822ed9..b54fbb2c3f6a 100644
--- a/forms/source/component/Filter.cxx
+++ b/forms/source/component/Filter.cxx
@@ -64,7 +64,7 @@
#include <vcl/svapp.hxx>
#include <tools/wintypes.hxx>
-//--------------------------------------------------------------------------
+
extern "C" void SAL_CALL createRegistryInfo_OFilterControl()
{
static ::frm::OMultiInstanceAutoRegistration< ::frm::OFilterControl > aAutoRegistration;
@@ -92,7 +92,7 @@ namespace frm
//=====================================================================
// OFilterControl
//=====================================================================
- //---------------------------------------------------------------------
+
OFilterControl::OFilterControl( const Reference< XComponentContext >& _rxORB )
:UnoControl()
,m_aTextListeners( *this )
@@ -105,7 +105,7 @@ namespace frm
{
}
- //---------------------------------------------------------------------
+
sal_Bool OFilterControl::ensureInitialized( )
{
if ( !m_xField.is() )
@@ -142,7 +142,7 @@ namespace frm
return sal_True;
}
- //---------------------------------------------------------------------
+
Any SAL_CALL OFilterControl::queryAggregation( const Type & rType ) throw(RuntimeException)
{
Any aRet = UnoControl::queryAggregation( rType);
@@ -152,7 +152,7 @@ namespace frm
return aRet;
}
- //------------------------------------------------------------------
+
OUString OFilterControl::GetComponentServiceName()
{
OUString aServiceName;
@@ -180,7 +180,7 @@ namespace frm
}
// XComponent
- //---------------------------------------------------------------------
+
void OFilterControl::dispose() throw( RuntimeException )
{
EventObject aEvt(*this);
@@ -188,7 +188,7 @@ namespace frm
UnoControl::dispose();
}
- //---------------------------------------------------------------------
+
void OFilterControl::createPeer( const Reference< XToolkit > & rxToolkit, const Reference< XWindowPeer > & rParentPeer ) throw(RuntimeException)
{
UnoControl::createPeer( rxToolkit, rParentPeer );
@@ -261,14 +261,14 @@ namespace frm
m_bFilterListFilled = sal_False;
}
- //---------------------------------------------------------------------
+
void OFilterControl::PrepareWindowDescriptor( WindowDescriptor& rDescr )
{
if (m_bFilterList)
rDescr.WindowAttributes |= VclWindowPeerAttribute::DROPDOWN;
}
- //---------------------------------------------------------------------
+
void OFilterControl::ImplSetPeerProperty( const OUString& rPropName, const Any& rVal )
{
// these properties are ignored
@@ -280,14 +280,14 @@ namespace frm
}
// XEventListener
- //---------------------------------------------------------------------
+
void SAL_CALL OFilterControl::disposing(const EventObject& Source) throw( RuntimeException )
{
UnoControl::disposing(Source);
}
// XItemListener
- //---------------------------------------------------------------------
+
void SAL_CALL OFilterControl::itemStateChanged( const ItemEvent& rEvent ) throw(RuntimeException)
{
OUStringBuffer aText;
@@ -378,7 +378,7 @@ namespace frm
}
}
- //---------------------------------------------------------------------
+
void OFilterControl::implInitFilterList()
{
if ( !ensureInitialized( ) )
@@ -489,7 +489,7 @@ namespace frm
}
// XFocusListener
- //---------------------------------------------------------------------
+
void SAL_CALL OFilterControl::focusGained(const FocusEvent& /*e*/) throw( RuntimeException )
{
// should we fill the combobox?
@@ -497,12 +497,12 @@ namespace frm
implInitFilterList();
}
- //---------------------------------------------------------------------
+
void SAL_CALL OFilterControl::focusLost(const FocusEvent& /*e*/) throw( RuntimeException )
{
}
- //---------------------------------------------------------------------
+
sal_Bool SAL_CALL OFilterControl::commit() throw(RuntimeException)
{
if ( !ensureInitialized( ) )
@@ -553,19 +553,19 @@ namespace frm
}
// XTextComponent
- //---------------------------------------------------------------------
+
void SAL_CALL OFilterControl::addTextListener(const Reference< XTextListener > & l) throw(RuntimeException)
{
m_aTextListeners.addInterface( l );
}
- //---------------------------------------------------------------------
+
void SAL_CALL OFilterControl::removeTextListener(const Reference< XTextListener > & l) throw(RuntimeException)
{
m_aTextListeners.removeInterface( l );
}
- //---------------------------------------------------------------------
+
void SAL_CALL OFilterControl::setText( const OUString& aText ) throw(RuntimeException)
{
if ( !ensureInitialized( ) )
@@ -664,7 +664,7 @@ namespace frm
}
}
- //---------------------------------------------------------------------
+
void SAL_CALL OFilterControl::insertText( const ::com::sun::star::awt::Selection& rSel, const OUString& aText ) throw(::com::sun::star::uno::RuntimeException)
{
Reference< XTextComponent > xText( getPeer(), UNO_QUERY );
@@ -675,13 +675,13 @@ namespace frm
}
}
- //---------------------------------------------------------------------
+
OUString SAL_CALL OFilterControl::getText() throw(RuntimeException)
{
return m_aText;
}
- //---------------------------------------------------------------------
+
OUString SAL_CALL OFilterControl::getSelectedText( void ) throw(RuntimeException)
{
OUString aSelected;
@@ -692,7 +692,7 @@ namespace frm
return aSelected;
}
- //---------------------------------------------------------------------
+
void SAL_CALL OFilterControl::setSelection( const ::com::sun::star::awt::Selection& aSelection ) throw(::com::sun::star::uno::RuntimeException)
{
Reference< XTextComponent > xText( getPeer(), UNO_QUERY );
@@ -700,7 +700,7 @@ namespace frm
xText->setSelection( aSelection );
}
- //---------------------------------------------------------------------
+
::com::sun::star::awt::Selection SAL_CALL OFilterControl::getSelection( void ) throw(::com::sun::star::uno::RuntimeException)
{
::com::sun::star::awt::Selection aSel;
@@ -710,14 +710,14 @@ namespace frm
return aSel;
}
- //---------------------------------------------------------------------
+
sal_Bool SAL_CALL OFilterControl::isEditable( void ) throw(RuntimeException)
{
Reference< XTextComponent > xText( getPeer(), UNO_QUERY );
return xText.is() && xText->isEditable();
}
- //---------------------------------------------------------------------
+
void SAL_CALL OFilterControl::setEditable( sal_Bool bEditable ) throw(RuntimeException)
{
Reference< XTextComponent > xText( getPeer(), UNO_QUERY );
@@ -725,14 +725,14 @@ namespace frm
xText->setEditable(bEditable);
}
- //---------------------------------------------------------------------
+
sal_Int16 SAL_CALL OFilterControl::getMaxTextLen() throw(RuntimeException)
{
Reference< XTextComponent > xText( getPeer(), UNO_QUERY );
return xText.is() ? xText->getMaxTextLen() : 0;
}
- //---------------------------------------------------------------------
+
void SAL_CALL OFilterControl::setMaxTextLen( sal_Int16 nLength ) throw(RuntimeException)
{
Reference< XTextComponent > xText( getPeer(), UNO_QUERY );
@@ -740,7 +740,7 @@ namespace frm
xText->setMaxTextLen(nLength);
}
- //---------------------------------------------------------------------
+
void OFilterControl::displayException( const ::com::sun::star::sdb::SQLContext& _rExcept )
{
try
@@ -754,7 +754,7 @@ namespace frm
}
}
- //---------------------------------------------------------------------
+
void SAL_CALL OFilterControl::initialize( const Sequence< Any >& aArguments ) throw (Exception, RuntimeException)
{
const Any* pArguments = aArguments.getConstArray();
@@ -902,7 +902,7 @@ namespace frm
return aNames;
}
- //---------------------------------------------------------------------
+
Reference< XInterface > SAL_CALL OFilterControl::Create( const Reference< XMultiServiceFactory >& _rxFactory )
{
return static_cast< XServiceInfo* >( new OFilterControl( comphelper::getComponentContext(_rxFactory) ) );
diff --git a/forms/source/component/FixedText.cxx b/forms/source/component/FixedText.cxx
index 896c7a59a8e1..11601ef78a31 100644
--- a/forms/source/component/FixedText.cxx
+++ b/forms/source/component/FixedText.cxx
@@ -39,14 +39,14 @@ using namespace ::com::sun::star::io;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::util;
-//------------------------------------------------------------------------------
+
InterfaceRef SAL_CALL OFixedTextModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
{
return *(new OFixedTextModel( comphelper::getComponentContext(_rxFactory) ));
}
-//------------------------------------------------------------------
-//------------------------------------------------------------------
+
+
OFixedTextModel::OFixedTextModel( const Reference<XComponentContext>& _rxFactory )
:OControlModel(_rxFactory, VCL_CONTROLMODEL_FIXEDTEXT)
@@ -54,22 +54,22 @@ OFixedTextModel::OFixedTextModel( const Reference<XComponentContext>& _rxFactory
m_nClassId = FormComponentType::FIXEDTEXT;
}
-//------------------------------------------------------------------
+
OFixedTextModel::OFixedTextModel( const OFixedTextModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
:OControlModel( _pOriginal, _rxFactory )
{
}
-//------------------------------------------------------------------
+
OFixedTextModel::~OFixedTextModel( )
{
}
-//------------------------------------------------------------------------------
+
IMPLEMENT_DEFAULT_CLONING( OFixedTextModel )
-//------------------------------------------------------------------------------
+
StringSequence SAL_CALL OFixedTextModel::getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException)
{
StringSequence aSupported = OControlModel::getSupportedServiceNames();
@@ -80,20 +80,20 @@ StringSequence SAL_CALL OFixedTextModel::getSupportedServiceNames() throw(::com:
return aSupported;
}
-//------------------------------------------------------------------------------
+
void OFixedTextModel::describeAggregateProperties( Sequence< Property >& _rAggregateProps ) const
{
OControlModel::describeAggregateProperties( _rAggregateProps );
RemoveProperty( _rAggregateProps, PROPERTY_TABSTOP );
}
-//------------------------------------------------------------------------------
+
OUString SAL_CALL OFixedTextModel::getServiceName() throw(RuntimeException)
{
return OUString(FRM_COMPONENT_FIXEDTEXT); // old (non-sun) name for compatibility !
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OFixedTextModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
throw(IOException, RuntimeException)
{
@@ -104,7 +104,7 @@ void SAL_CALL OFixedTextModel::write(const Reference<XObjectOutputStream>& _rxOu
writeHelpTextCompatibly(_rxOutStream);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OFixedTextModel::read(const Reference<XObjectInputStream>& _rxInStream) throw(IOException, RuntimeException)
{
OControlModel::read(_rxInStream);
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index e77b677c7e79..14abb983cdfb 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -16,8 +16,6 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
-
#include "componenttools.hxx"
#include "FormComponent.hxx"
#include "frm_resource.hrc"
@@ -52,90 +50,75 @@
#include <functional>
#include <algorithm>
-
-//... namespace frm .......................................................
namespace frm
{
-//.........................................................................
-
- using namespace ::com::sun::star::uno;
- using namespace ::com::sun::star::sdb;
- using namespace ::com::sun::star::sdbc;
- using namespace ::com::sun::star::sdbcx;
- using namespace ::com::sun::star::beans;
- using namespace ::com::sun::star::container;
- using namespace ::com::sun::star::form;
- using namespace ::com::sun::star::awt;
- using namespace ::com::sun::star::io;
- using namespace ::com::sun::star::lang;
- using namespace ::com::sun::star::util;
- using namespace ::com::sun::star::form::binding;
- using namespace ::com::sun::star::form::validation;
- using namespace ::dbtools;
- using namespace ::comphelper;
-
- //=========================================================================
- //= FieldChangeNotifier
- //=========================================================================
- //-------------------------------------------------------------------------
- void ControlModelLock::impl_notifyAll_nothrow()
- {
- m_rModel.firePropertyChanges( m_aHandles, m_aOldValues, m_aNewValues, OControlModel::LockAccess() );
- }
-
- //-------------------------------------------------------------------------
- void ControlModelLock::addPropertyNotification( const sal_Int32 _nHandle, const Any& _rOldValue, const Any& _rNewValue )
- {
- sal_Int32 nOldLength = m_aHandles.getLength();
- if ( ( nOldLength != m_aOldValues.getLength() )
- || ( nOldLength != m_aNewValues.getLength() )
- )
- throw RuntimeException( OUString(), m_rModel );
-
- m_aHandles.realloc( nOldLength + 1 );
- m_aHandles[ nOldLength ] = _nHandle;
- m_aOldValues.realloc( nOldLength + 1 );
- m_aOldValues[ nOldLength ] = _rOldValue;
- m_aNewValues.realloc( nOldLength + 1 );
- m_aNewValues[ nOldLength ] = _rNewValue;
- }
-
- //=========================================================================
- //= FieldChangeNotifier
- //=========================================================================
- //-------------------------------------------------------------------------
- class FieldChangeNotifier
- {
- public:
- FieldChangeNotifier( ControlModelLock& _rLock )
- :m_rLock( _rLock )
- ,m_rModel( dynamic_cast< OBoundControlModel& >( _rLock.getModel() ) )
- {
- m_xOldField = m_rModel.getField();
- }
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::sdb;
+using namespace ::com::sun::star::sdbc;
+using namespace ::com::sun::star::sdbcx;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::container;
+using namespace ::com::sun::star::form;
+using namespace ::com::sun::star::awt;
+using namespace ::com::sun::star::io;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::util;
+using namespace ::com::sun::star::form::binding;
+using namespace ::com::sun::star::form::validation;
+using namespace ::dbtools;
+using namespace ::comphelper;
+
+// FieldChangeNotifier
+void ControlModelLock::impl_notifyAll_nothrow()
+{
+ m_rModel.firePropertyChanges( m_aHandles, m_aOldValues, m_aNewValues, OControlModel::LockAccess() );
+}
+
+void ControlModelLock::addPropertyNotification( const sal_Int32 _nHandle, const Any& _rOldValue, const Any& _rNewValue )
+{
+ sal_Int32 nOldLength = m_aHandles.getLength();
+ if ( ( nOldLength != m_aOldValues.getLength() )
+ || ( nOldLength != m_aNewValues.getLength() )
+ )
+ throw RuntimeException( OUString(), m_rModel );
- ~FieldChangeNotifier()
- {
- Reference< XPropertySet > xNewField( m_rModel.getField() );
- if ( m_xOldField != xNewField )
- m_rLock.addPropertyNotification( PROPERTY_ID_BOUNDFIELD, makeAny( m_xOldField ), makeAny( xNewField ) );
- }
+ m_aHandles.realloc( nOldLength + 1 );
+ m_aHandles[ nOldLength ] = _nHandle;
+ m_aOldValues.realloc( nOldLength + 1 );
+ m_aOldValues[ nOldLength ] = _rOldValue;
+ m_aNewValues.realloc( nOldLength + 1 );
+ m_aNewValues[ nOldLength ] = _rNewValue;
+}
- private:
- ControlModelLock& m_rLock;
- OBoundControlModel& m_rModel;
- Reference< XPropertySet > m_xOldField;
- };
+class FieldChangeNotifier
+{
+public:
+ FieldChangeNotifier( ControlModelLock& _rLock )
+ :m_rLock( _rLock )
+ ,m_rModel( dynamic_cast< OBoundControlModel& >( _rLock.getModel() ) )
+ {
+ m_xOldField = m_rModel.getField();
+ }
+
+ ~FieldChangeNotifier()
+ {
+ Reference< XPropertySet > xNewField( m_rModel.getField() );
+ if ( m_xOldField != xNewField )
+ m_rLock.addPropertyNotification( PROPERTY_ID_BOUNDFIELD, makeAny( m_xOldField ), makeAny( xNewField ) );
+ }
-//=============================================================================
-//= base class for form layer controls
-//=============================================================================
-//------------------------------------------------------------------------------
+private:
+ ControlModelLock& m_rLock;
+ OBoundControlModel& m_rModel;
+ Reference< XPropertySet > m_xOldField;
+};
+
+// base class for form layer controls
OControl::OControl( const Reference< XComponentContext >& _rxContext, const OUString& _rAggregateService, const sal_Bool _bSetDelegator )
:OComponentHelper(m_aMutex)
,m_xContext( _rxContext )
{
- // VCL-Control aggregieren
+ // aggregate VCL-Control
// bei Aggregation den Refcount um eins erhoehen da im setDelegator
// das Aggregat selbst den Refcount erhoeht
increment( m_refCount );
@@ -149,20 +132,17 @@ OControl::OControl( const Reference< XComponentContext >& _rxContext, const OUSt
doSetDelegator();
}
-//------------------------------------------------------------------------------
OControl::~OControl()
{
doResetDelegator();
}
-//------------------------------------------------------------------------------
void OControl::doResetDelegator()
{
if ( m_xAggregate.is() )
m_xAggregate->setDelegator( NULL );
}
-//------------------------------------------------------------------------------
void OControl::doSetDelegator()
{
increment( m_refCount );
@@ -176,7 +156,6 @@ void OControl::doSetDelegator()
}
// UNO Anbindung
-//------------------------------------------------------------------------------
Any SAL_CALL OControl::queryAggregation( const Type& _rType ) throw(RuntimeException)
{
// ask the base class
@@ -193,13 +172,11 @@ Any SAL_CALL OControl::queryAggregation( const Type& _rType ) throw(RuntimeExcep
return aReturn;
}
-//------------------------------------------------------------------------------
Sequence<sal_Int8> SAL_CALL OControl::getImplementationId() throw(RuntimeException)
{
return OImplementationIds::getImplementationId(getTypes());
}
-//------------------------------------------------------------------------------
Sequence<Type> SAL_CALL OControl::getTypes() throw(RuntimeException)
{
TypeBag aTypes( _getTypes() );
@@ -211,13 +188,11 @@ Sequence<Type> SAL_CALL OControl::getTypes() throw(RuntimeException)
return aTypes.getTypes();
}
-//------------------------------------------------------------------------------
Sequence<Type> OControl::_getTypes()
{
return TypeBag( OComponentHelper::getTypes(), OControl_BASE::getTypes() ).getTypes();
}
-//------------------------------------------------------------------------------
void OControl::initFormControlPeer( const Reference< XWindowPeer >& /*_rxPeer*/ )
{
// nothing to do here
@@ -247,6 +222,7 @@ Sequence< OUString > OControl::getAggregateServiceNames()
Reference< XServiceInfo > xInfo;
if ( query_aggregation( m_xAggregate, xInfo ) )
aAggServices = xInfo->getSupportedServiceNames();
+
return aAggServices;
}
@@ -258,7 +234,6 @@ Sequence<OUString> SAL_CALL OControl::getSupportedServiceNames() throw(RuntimeEx
);
}
-//------------------------------------------------------------------------------
Sequence< OUString > SAL_CALL OControl::getSupportedServiceNames_Static() throw( RuntimeException )
{
// no own supported service names
@@ -266,13 +241,12 @@ Sequence< OUString > SAL_CALL OControl::getSupportedServiceNames_Static() throw(
}
// XEventListener
-//------------------------------------------------------------------------------
void SAL_CALL OControl::disposing(const com::sun::star::lang::EventObject& _rEvent) throw (RuntimeException)
{
Reference< XInterface > xAggAsIface;
query_aggregation(m_xAggregate, xAggAsIface);
- // does the disposing come from the aggregate ?
+ // does the disposing come from the aggregate?
if (xAggAsIface != Reference< XInterface >(_rEvent.Source, UNO_QUERY))
{ // no -> forward it
Reference<com::sun::star::lang::XEventListener> xListener;
@@ -282,20 +256,17 @@ void SAL_CALL OControl::disposing(const com::sun::star::lang::EventObject& _rEve
}
// XControl
-//------------------------------------------------------------------------------
void SAL_CALL OControl::setContext(const Reference< XInterface >& Context) throw (RuntimeException)
{
if (m_xControl.is())
m_xControl->setContext(Context);
}
-//------------------------------------------------------------------------------
Reference< XInterface > SAL_CALL OControl::getContext() throw (RuntimeException)
{
return m_xControl.is() ? m_xControl->getContext() : Reference< XInterface >();
}
-//------------------------------------------------------------------------------
void OControl::impl_resetStateGuard_nothrow()
{
Reference< XWindow2 > xWindow;
@@ -312,26 +283,21 @@ void OControl::impl_resetStateGuard_nothrow()
m_aWindowStateGuard.attach( xWindow, xModel );
}
-//------------------------------------------------------------------------------
void SAL_CALL OControl::createPeer(const Reference<XToolkit>& _rxToolkit, const Reference<XWindowPeer>& _rxParent) throw (RuntimeException)
{
if ( m_xControl.is() )
{
m_xControl->createPeer( _rxToolkit, _rxParent );
-
initFormControlPeer( getPeer() );
-
impl_resetStateGuard_nothrow();
}
}
-//------------------------------------------------------------------------------
Reference<XWindowPeer> SAL_CALL OControl::getPeer() throw ( RuntimeException)
{
return m_xControl.is() ? m_xControl->getPeer() : Reference<XWindowPeer>();
}
-//------------------------------------------------------------------------------
sal_Bool SAL_CALL OControl::setModel(const Reference<XControlModel>& Model) throw ( RuntimeException)
{
if ( !m_xControl.is() )
@@ -342,41 +308,33 @@ sal_Bool SAL_CALL OControl::setModel(const Reference<XControlModel>& Model) thro
return bSuccess;
}
-//------------------------------------------------------------------------------
Reference<XControlModel> SAL_CALL OControl::getModel() throw ( RuntimeException)
{
return m_xControl.is() ? m_xControl->getModel() : Reference<XControlModel>();
}
-//------------------------------------------------------------------------------
Reference<XView> SAL_CALL OControl::getView() throw ( RuntimeException)
{
return m_xControl.is() ? m_xControl->getView() : Reference<XView>();
}
-//------------------------------------------------------------------------------
void SAL_CALL OControl::setDesignMode(sal_Bool bOn) throw ( RuntimeException)
{
if (m_xControl.is())
m_xControl->setDesignMode(bOn);
}
-//------------------------------------------------------------------------------
sal_Bool SAL_CALL OControl::isDesignMode() throw ( RuntimeException)
{
return m_xControl.is() ? m_xControl->isDesignMode() : sal_True;
}
-//------------------------------------------------------------------------------
sal_Bool SAL_CALL OControl::isTransparent() throw ( RuntimeException)
{
return m_xControl.is() ? m_xControl->isTransparent() : sal_True;
}
-//==================================================================
-//= OBoundControl
-//==================================================================
-//------------------------------------------------------------------
+// OBoundControl
OBoundControl::OBoundControl( const Reference< XComponentContext >& _rxContext,
const OUString& _rAggregateService, const sal_Bool _bSetDelegator )
:OControl( _rxContext, _rAggregateService, _bSetDelegator )
@@ -386,16 +344,15 @@ OBoundControl::OBoundControl( const Reference< XComponentContext >& _rxContext,
{
}
-//------------------------------------------------------------------
OBoundControl::~OBoundControl()
{
}
-// -----------------------------------------------------------------------------
+
Sequence< Type> OBoundControl::_getTypes()
{
return TypeBag( OControl::_getTypes(), OBoundControl_BASE::getTypes() ).getTypes();
}
-//------------------------------------------------------------------
+
Any SAL_CALL OBoundControl::queryAggregation(const Type& _rType) throw(RuntimeException)
{
Any aReturn;
@@ -416,13 +373,11 @@ Any SAL_CALL OBoundControl::queryAggregation(const Type& _rType) throw(RuntimeEx
return aReturn;
}
-//------------------------------------------------------------------
sal_Bool SAL_CALL OBoundControl::getLock() throw(RuntimeException)
{
return m_bLocked;
}
-//------------------------------------------------------------------
void SAL_CALL OBoundControl::setLock(sal_Bool _bLock) throw(RuntimeException)
{
if (m_bLocked == _bLock)
@@ -433,7 +388,6 @@ void SAL_CALL OBoundControl::setLock(sal_Bool _bLock) throw(RuntimeException)
m_bLocked = _bLock;
}
-//------------------------------------------------------------------
void OBoundControl::_setLock(sal_Bool _bLock)
{
// try to set the text component to readonly
@@ -451,47 +405,40 @@ void OBoundControl::_setLock(sal_Bool _bLock)
}
}
-//--------------------------------------------------------------------
sal_Bool SAL_CALL OBoundControl::setModel( const Reference< XControlModel >& _rxModel ) throw (RuntimeException)
{
return OControl::setModel( _rxModel );
}
-//--------------------------------------------------------------------
void SAL_CALL OBoundControl::disposing(const EventObject& Source) throw (RuntimeException)
{
// just disambiguate
OControl::disposing(Source);
}
-//--------------------------------------------------------------------
void OBoundControl::disposing()
{
OControl::disposing();
}
-//==================================================================
-//= OControlModel
-//==================================================================
-//------------------------------------------------------------------
+// OControlModel
Sequence<sal_Int8> SAL_CALL OControlModel::getImplementationId() throw(RuntimeException)
{
return OImplementationIds::getImplementationId(getTypes());
}
-//------------------------------------------------------------------
Sequence<Type> SAL_CALL OControlModel::getTypes() throw(RuntimeException)
{
TypeBag aTypes( _getTypes() );
Reference< XTypeProvider > xProv;
+
if ( query_aggregation( m_xAggregate, xProv ) )
aTypes.addTypes( xProv->getTypes() );
return aTypes.getTypes();
}
-//------------------------------------------------------------------------------
Sequence<Type> OControlModel::_getTypes()
{
return TypeBag( OComponentHelper::getTypes(),
@@ -500,7 +447,6 @@ Sequence<Type> OControlModel::_getTypes()
).getTypes();
}
-//------------------------------------------------------------------
Any SAL_CALL OControlModel::queryAggregation(const Type& _rType) throw (RuntimeException)
{
// base class 1
@@ -523,7 +469,6 @@ Any SAL_CALL OControlModel::queryAggregation(const Type& _rType) throw (RuntimeE
return aReturn;
}
-//------------------------------------------------------------------------------
void OControlModel::readHelpTextCompatibly(const staruno::Reference< stario::XObjectInputStream >& _rxInStream)
{
OUString sHelpText;
@@ -540,7 +485,6 @@ void OControlModel::readHelpTextCompatibly(const staruno::Reference< stario::XOb
}
}
-//------------------------------------------------------------------------------
void OControlModel::writeHelpTextCompatibly(const staruno::Reference< stario::XObjectOutputStream >& _rxOutStream)
{
OUString sHelpText;
@@ -557,7 +501,6 @@ void OControlModel::writeHelpTextCompatibly(const staruno::Reference< stario::XO
::comphelper::operator<<( _rxOutStream, sHelpText);
}
-//------------------------------------------------------------------
OControlModel::OControlModel(
const Reference<XComponentContext>& _rxContext,
const OUString& _rUnoControlModelTypeName,
@@ -573,14 +516,13 @@ OControlModel::OControlModel(
,m_bGenerateVbEvents( sal_False )
,m_nControlTypeinMSO(0) // 0 : default value is create from AOO
,m_nObjIDinMSO(INVALID_OBJ_ID_IN_MSO)
- // form controls are usually embedded into documents, not dialogs, and in documents
- // the native look is ugly ....
- // #i37342#
+ // form controls are usually embedded into documents, not dialogs, and in documents
+ // the native look is ugly...
+ // #i37342#
{
if (!_rUnoControlModelTypeName.isEmpty()) // the is a model we have to aggregate
{
increment(m_refCount);
-
{
m_xAggregate = Reference<XAggregation>(m_xContext->getServiceManager()->createInstanceWithContext(_rUnoControlModelTypeName, m_xContext), UNO_QUERY);
setAggregation(m_xAggregate);
@@ -599,17 +541,14 @@ OControlModel::OControlModel(
}
}
}
-
if (_bSetDelegator)
doSetDelegator();
- // Refcount wieder bei NULL
+ // Refcount is at NULL again
decrement(m_refCount);
}
-
}
-//------------------------------------------------------------------
OControlModel::OControlModel( const OControlModel* _pOriginal, const Reference< XComponentContext>& _rxFactory, const sal_Bool _bCloneAggregate, const sal_Bool _bSetDelegator )
:OComponentHelper( m_aMutex )
,OPropertySetAggregationHelper( OComponentHelper::rBHelper )
@@ -635,7 +574,6 @@ OControlModel::OControlModel( const OControlModel* _pOriginal, const Reference<
{
// temporarily increment refcount because of temporary references to ourself in the following
increment( m_refCount );
-
{
// transfer the (only, at the very moment!) ref count
m_xAggregate = createAggregateClone( _pOriginal );
@@ -651,31 +589,25 @@ OControlModel::OControlModel( const OControlModel* _pOriginal, const Reference<
// decrement ref count
decrement( m_refCount );
}
-
}
-//------------------------------------------------------------------
OControlModel::~OControlModel()
{
// release the aggregate
doResetDelegator( );
-
}
-//------------------------------------------------------------------
void OControlModel::clonedFrom( const OControlModel* /*_pOriginal*/ )
{
// nothing to do in this base class
}
-//------------------------------------------------------------------------------
void OControlModel::doResetDelegator()
{
if (m_xAggregate.is())
m_xAggregate->setDelegator(NULL);
}
-//------------------------------------------------------------------------------
void OControlModel::doSetDelegator()
{
increment(m_refCount);
@@ -687,13 +619,11 @@ void OControlModel::doSetDelegator()
}
// XChild
-//------------------------------------------------------------------------------
Reference< XInterface > SAL_CALL OControlModel::getParent() throw(RuntimeException)
{
return m_xParent;
}
-//------------------------------------------------------------------------------
void SAL_CALL OControlModel::setParent(const Reference< XInterface >& _rxParent) throw(com::sun::star::lang::NoSupportException, RuntimeException)
{
osl::MutexGuard aGuard(m_aMutex);
@@ -754,7 +684,6 @@ Sequence< OUString > SAL_CALL OControlModel::getSupportedServiceNames_Static() t
}
// XEventListener
-//------------------------------------------------------------------------------
void SAL_CALL OControlModel::disposing(const com::sun::star::lang::EventObject& _rSource) throw (RuntimeException)
{
// release the parent
@@ -775,7 +704,6 @@ void SAL_CALL OControlModel::disposing(const com::sun::star::lang::EventObject&
}
// OComponentHelper
-//-----------------------------------------------------------------------------
void OControlModel::disposing()
{
OPropertySetAggregationHelper::disposing();
@@ -789,7 +717,6 @@ void OControlModel::disposing()
m_aPropertyBagHelper.dispose();
}
-//------------------------------------------------------------------------------
void OControlModel::writeAggregate( const Reference< XObjectOutputStream >& _rxOutStream ) const
{
Reference< XPersistObject > xPersist;
@@ -797,7 +724,6 @@ void OControlModel::writeAggregate( const Reference< XObjectOutputStream >& _rxO
xPersist->write( _rxOutStream );
}
-//------------------------------------------------------------------------------
void OControlModel::readAggregate( const Reference< XObjectInputStream >& _rxInStream )
{
Reference< XPersistObject > xPersist;
@@ -805,13 +731,12 @@ void OControlModel::readAggregate( const Reference< XObjectInputStream >& _rxInS
xPersist->read( _rxInStream );
}
-//------------------------------------------------------------------------------
void SAL_CALL OControlModel::write(const Reference<stario::XObjectOutputStream>& _rxOutStream)
throw(stario::IOException, RuntimeException)
{
osl::MutexGuard aGuard(m_aMutex);
- // 1. Schreiben des UnoControls
+ // 1. writing the UnoControls
Reference<stario::XMarkableStream> xMark(_rxOutStream, UNO_QUERY);
if ( !xMark.is() )
{
@@ -828,14 +753,14 @@ void SAL_CALL OControlModel::write(const Reference<stario::XObjectOutputStream>&
writeAggregate( _rxOutStream );
- // feststellen der Laenge
+ // determining the length
nLen = xMark->offsetToMark(nMark) - 4;
xMark->jumpToMark(nMark);
_rxOutStream->writeLong(nLen);
xMark->jumpToFurthest();
xMark->deleteMark(nMark);
- // 2. Schreiben einer VersionsNummer
+ // 2. wrting a version number
_rxOutStream->writeShort(0x0003);
// 3. Schreiben der allgemeinen Properties
@@ -843,15 +768,14 @@ void SAL_CALL OControlModel::write(const Reference<stario::XObjectOutputStream>&
_rxOutStream->writeShort(m_nTabIndex);
::comphelper::operator<<( _rxOutStream, m_aTag); // 3. version
- // !!! IMPORTANT NOTE !!!
+ // IMPORTANT NOTE!
// don't write any new members here : this wouldn't be compatible with older versions, as OControlModel
// is a base class which is called in derived classes "read" method. So if you increment the version
// and write new stuff, older office versions will read this in the _derived_ classes, which may result
// in anything from data loss to crash.
- // !!! EOIN !!!
+ // EOIN!
}
-//------------------------------------------------------------------------------
void OControlModel::read(const Reference<stario::XObjectInputStream>& InStream) throw (::com::sun::star::io::IOException, RuntimeException)
{
osl::MutexGuard aGuard(m_aMutex);
@@ -865,7 +789,7 @@ void OControlModel::read(const Reference<stario::XObjectInputStream>& InStream)
);
}
- // 1. Lesen des UnoControls
+ // 1. reading the UnoControls
sal_Int32 nLen = InStream->readLong();
if (nLen)
{
@@ -875,6 +799,7 @@ void OControlModel::read(const Reference<stario::XObjectInputStream>& InStream)
{
readAggregate( InStream );
}
+
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
@@ -885,10 +810,10 @@ void OControlModel::read(const Reference<stario::XObjectInputStream>& InStream)
xMark->deleteMark(nMark);
}
- // 2. Lesen des Versionsnummer
+ // 2. reading the version number
sal_uInt16 nVersion = InStream->readShort();
- // 3. Lesen der allgemeinen Properties
+ // 3. reading the general properties
::comphelper::operator>>( InStream, m_aName);
m_nTabIndex = InStream->readShort();
@@ -904,7 +829,6 @@ void OControlModel::read(const Reference<stario::XObjectInputStream>& InStream)
// later versions shouldn't exist (see write for a detailed comment)
}
-//------------------------------------------------------------------------------
PropertyState OControlModel::getPropertyStateByHandle( sal_Int32 _nHandle )
{
// simply compare the current and the default value
@@ -920,7 +844,6 @@ PropertyState OControlModel::getPropertyStateByHandle( sal_Int32 _nHandle )
return bEqual ? PropertyState_DEFAULT_VALUE : PropertyState_DIRECT_VALUE;
}
-//------------------------------------------------------------------------------
void OControlModel::setPropertyToDefaultByHandle( sal_Int32 _nHandle)
{
Any aDefault = getPropertyDefaultByHandle( _nHandle );
@@ -933,7 +856,6 @@ void OControlModel::setPropertyToDefaultByHandle( sal_Int32 _nHandle)
}
}
-//------------------------------------------------------------------------------
Any OControlModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
{
Any aReturn;
@@ -943,23 +865,19 @@ Any OControlModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
case PROPERTY_ID_TAG:
aReturn <<= OUString();
break;
-
case PROPERTY_ID_CLASSID:
aReturn <<= (sal_Int16)FormComponentType::CONTROL;
break;
-
case PROPERTY_ID_TABINDEX:
aReturn <<= (sal_Int16)FRM_DEFAULT_TABINDEX;
break;
-
case PROPERTY_ID_NATIVE_LOOK:
aReturn <<= (sal_Bool)sal_True;
break;
-
case PROPERTY_ID_GENERATEVBAEVENTS:
aReturn <<= (sal_Bool)sal_False;
break;
- //added for exporting OCX control
+ // added for exporting OCX control
case PROPERTY_ID_CONTROL_TYPE_IN_MSO:
aReturn <<= (sal_Int16)0;
break;
@@ -975,7 +893,6 @@ Any OControlModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
return aReturn;
}
-//------------------------------------------------------------------------------
void OControlModel::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) const
{
switch ( _nHandle )
@@ -997,7 +914,7 @@ void OControlModel::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) con
break;
case PROPERTY_ID_GENERATEVBAEVENTS:
_rValue <<= (sal_Bool)m_bGenerateVbEvents;
- //added for exporting OCX control
+ // added for exporting OCX control
case PROPERTY_ID_CONTROL_TYPE_IN_MSO:
_rValue <<= (sal_Int16)m_nControlTypeinMSO;
break;
@@ -1013,7 +930,6 @@ void OControlModel::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) con
}
}
-//------------------------------------------------------------------------------
sal_Bool OControlModel::convertFastPropertyValue(
Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue)
throw (com::sun::star::lang::IllegalArgumentException)
@@ -1036,7 +952,7 @@ sal_Bool OControlModel::convertFastPropertyValue(
case PROPERTY_ID_GENERATEVBAEVENTS:
bModified = tryPropertyValue(_rConvertedValue, _rOldValue, _rValue, m_bGenerateVbEvents);
break;
- //added for exporting OCX control
+ // added for exporting OCX control
case PROPERTY_ID_CONTROL_TYPE_IN_MSO:
bModified = tryPropertyValue(_rConvertedValue, _rOldValue, _rValue, m_nControlTypeinMSO);
break;
@@ -1053,7 +969,6 @@ sal_Bool OControlModel::convertFastPropertyValue(
return bModified;
}
-//------------------------------------------------------------------------------
void OControlModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const Any& _rValue)
throw (Exception)
{
@@ -1080,7 +995,7 @@ void OControlModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const A
case PROPERTY_ID_GENERATEVBAEVENTS:
OSL_VERIFY( _rValue >>= m_bGenerateVbEvents );
break;
- //added for exporting OCX control
+ // added for exporting OCX control
case PROPERTY_ID_CONTROL_TYPE_IN_MSO:
OSL_VERIFY( _rValue >>= m_nControlTypeinMSO );
break;
@@ -1096,7 +1011,6 @@ void OControlModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const A
}
}
-//------------------------------------------------------------------------------
void OControlModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_BASE_PROPERTIES( 7 )
@@ -1110,7 +1024,6 @@ void OControlModel::describeFixedProperties( Sequence< Property >& _rProps ) con
END_DESCRIBE_PROPERTIES()
}
-//------------------------------------------------------------------------------
void OControlModel::describeAggregateProperties( Sequence< Property >& /* [out] */ _rAggregateProps ) const
{
if ( m_xAggregateSet.is() )
@@ -1121,69 +1034,58 @@ void OControlModel::describeAggregateProperties( Sequence< Property >& /* [out]
}
}
-//------------------------------------------------------------------------------
::osl::Mutex& OControlModel::getMutex()
{
return m_aMutex;
}
-//------------------------------------------------------------------------------
void OControlModel::describeFixedAndAggregateProperties( Sequence< Property >& _out_rFixedProperties, Sequence< Property >& _out_rAggregateProperties ) const
{
describeFixedProperties( _out_rFixedProperties );
describeAggregateProperties( _out_rAggregateProperties );
}
-//------------------------------------------------------------------------------
Reference< XMultiPropertySet > OControlModel::getPropertiesInterface()
{
return Reference< XMultiPropertySet >( *this, UNO_QUERY );
}
-//------------------------------------------------------------------------------
Reference< XPropertySetInfo> SAL_CALL OControlModel::getPropertySetInfo() throw( RuntimeException)
{
return createPropertySetInfo( getInfoHelper() );
}
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& OControlModel::getInfoHelper()
{
return m_aPropertyBagHelper.getInfoHelper();
}
-//--------------------------------------------------------------------
void SAL_CALL OControlModel::addProperty( const OUString& _rName, ::sal_Int16 _nAttributes, const Any& _rInitialValue ) throw (PropertyExistException, IllegalTypeException, IllegalArgumentException, RuntimeException)
{
m_aPropertyBagHelper.addProperty( _rName, _nAttributes, _rInitialValue );
}
-//--------------------------------------------------------------------
void SAL_CALL OControlModel::removeProperty( const OUString& _rName ) throw (UnknownPropertyException, NotRemoveableException, RuntimeException)
{
m_aPropertyBagHelper.removeProperty( _rName );
}
-//--------------------------------------------------------------------
Sequence< PropertyValue > SAL_CALL OControlModel::getPropertyValues() throw (RuntimeException)
{
return m_aPropertyBagHelper.getPropertyValues();
}
-//--------------------------------------------------------------------
void SAL_CALL OControlModel::setPropertyValues( const Sequence< PropertyValue >& _rProps ) throw (UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException)
{
m_aPropertyBagHelper.setPropertyValues( _rProps );
}
-//--------------------------------------------------------------------
void OControlModel::lockInstance( LockAccess )
{
m_aMutex.acquire();
osl_atomic_increment( &m_lockCount );
}
-//--------------------------------------------------------------------
oslInterlockedCount OControlModel::unlockInstance( LockAccess )
{
OSL_ENSURE( m_lockCount > 0, "OControlModel::unlockInstance: not locked!" );
@@ -1192,7 +1094,6 @@ oslInterlockedCount OControlModel::unlockInstance( LockAccess )
return lockCount;
}
-//--------------------------------------------------------------------
void OControlModel::firePropertyChanges( const Sequence< sal_Int32 >& _rHandles, const Sequence< Any >& _rOldValues,
const Sequence< Any >& _rNewValues, LockAccess )
{
@@ -1205,10 +1106,7 @@ void OControlModel::firePropertyChanges( const Sequence< sal_Int32 >& _rHandles,
);
}
-//==================================================================
-//= OBoundControlModel
-//==================================================================
-//------------------------------------------------------------------
+// OBoundControlModel
Any SAL_CALL OBoundControlModel::queryAggregation( const Type& _rType ) throw (RuntimeException)
{
Any aReturn( OControlModel::queryAggregation(_rType) );
@@ -1225,11 +1123,9 @@ Any SAL_CALL OBoundControlModel::queryAggregation( const Type& _rType ) throw (R
if ( !aReturn.hasValue() && m_bSupportsValidation )
aReturn = OBoundControlModel_VALIDATION::queryInterface( _rType );
}
-
return aReturn;
}
-//------------------------------------------------------------------
OBoundControlModel::OBoundControlModel(
const Reference< XComponentContext>& _rxFactory,
const OUString& _rUnoControlModelTypeName, const OUString& _rDefault,
@@ -1260,12 +1156,10 @@ OBoundControlModel::OBoundControlModel(
,m_eControlValueChangeInstigator( eOther )
,m_aLabelServiceName(FRM_SUN_COMPONENT_FIXEDTEXT)
{
-
// start property listening at the aggregate
implInitAggMultiplexer( );
}
-//------------------------------------------------------------------
OBoundControlModel::OBoundControlModel(
const OBoundControlModel* _pOriginal, const Reference< XComponentContext>& _rxFactory )
:OControlModel( _pOriginal, _rxFactory, sal_True, sal_False )
@@ -1294,10 +1188,8 @@ OBoundControlModel::OBoundControlModel(
,m_bBindingControlsEnable( sal_False )
,m_eControlValueChangeInstigator( eOther )
{
-
// start property listening at the aggregate
implInitAggMultiplexer( );
-
m_aLabelServiceName = _pOriginal->m_aLabelServiceName;
m_sValuePropertyName = _pOriginal->m_sValuePropertyName;
m_nValuePropertyAggregateHandle = _pOriginal->m_nValuePropertyAggregateHandle;
@@ -1309,12 +1201,10 @@ OBoundControlModel::OBoundControlModel(
// (the former should be clear - a clone of the object we're only referencing does not make sense)
// (the second would violate the restriction for label controls that they're part of the
// same form component hierarchy - we ourself are no part, yet, so we can't have a label control)
-
// start listening for changes at the value property
implInitValuePropertyListening( );
}
-//------------------------------------------------------------------
OBoundControlModel::~OBoundControlModel()
{
if ( !OComponentHelper::rBHelper.bDisposed )
@@ -1324,7 +1214,6 @@ OBoundControlModel::~OBoundControlModel()
}
doResetDelegator( );
-
OSL_ENSURE( m_pAggPropMultiplexer, "OBoundControlModel::~OBoundControlModel: what about my property multiplexer?" );
if ( m_pAggPropMultiplexer )
{
@@ -1332,10 +1221,8 @@ OBoundControlModel::~OBoundControlModel()
m_pAggPropMultiplexer->release();
m_pAggPropMultiplexer = NULL;
}
-
}
-//------------------------------------------------------------------
void OBoundControlModel::clonedFrom( const OControlModel* _pOriginal )
{
const OBoundControlModel* pBoundOriginal = static_cast< const OBoundControlModel* >( _pOriginal );
@@ -1347,14 +1234,15 @@ void OBoundControlModel::clonedFrom( const OControlModel* _pOriginal )
{
setValueBinding( pBoundOriginal->m_xExternalBinding );
}
+
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
+
}
}
-//-----------------------------------------------------------------------------
void OBoundControlModel::implInitAggMultiplexer( )
{
increment( m_refCount );
@@ -1363,12 +1251,11 @@ void OBoundControlModel::implInitAggMultiplexer( )
m_pAggPropMultiplexer = new OPropertyChangeMultiplexer( this, m_xAggregateSet, false );
m_pAggPropMultiplexer->acquire();
}
- decrement( m_refCount );
- doSetDelegator();
+ decrement( m_refCount );
+ doSetDelegator();
}
-//-----------------------------------------------------------------------------
void OBoundControlModel::implInitValuePropertyListening( ) const
{
// start listening for changes at the value property
@@ -1387,7 +1274,6 @@ void OBoundControlModel::implInitValuePropertyListening( ) const
}
}
-//-----------------------------------------------------------------------------
void OBoundControlModel::initOwnValueProperty( const OUString& i_rValuePropertyName )
{
OSL_PRECOND( m_sValuePropertyName.isEmpty() && -1 == m_nValuePropertyAggregateHandle,
@@ -1396,7 +1282,6 @@ void OBoundControlModel::initOwnValueProperty( const OUString& i_rValuePropertyN
m_sValuePropertyName = i_rValuePropertyName;
}
-//-----------------------------------------------------------------------------
void OBoundControlModel::initValueProperty( const OUString& _rValuePropertyName, sal_Int32 _nValuePropertyExternalHandle )
{
OSL_PRECOND( m_sValuePropertyName.isEmpty() && -1 == m_nValuePropertyAggregateHandle,
@@ -1420,28 +1305,24 @@ void OBoundControlModel::initValueProperty( const OUString& _rValuePropertyName,
implInitValuePropertyListening( );
}
-//-----------------------------------------------------------------------------
void OBoundControlModel::suspendValueListening( )
{
OSL_PRECOND( !m_sValuePropertyName.isEmpty(), "OBoundControlModel::suspendValueListening: don't have a value property!" );
OSL_PRECOND( m_pAggPropMultiplexer, "OBoundControlModel::suspendValueListening: I *am* not listening!" );
- if ( m_pAggPropMultiplexer )
+if ( m_pAggPropMultiplexer )
m_pAggPropMultiplexer->lock();
}
-//-----------------------------------------------------------------------------
void OBoundControlModel::resumeValueListening( )
{
OSL_PRECOND( !m_sValuePropertyName.isEmpty(), "OBoundControlModel::resumeValueListening: don't have a value property!" );
OSL_PRECOND( m_pAggPropMultiplexer, "OBoundControlModel::resumeValueListening: I *am* not listening at all!" );
OSL_PRECOND( !m_pAggPropMultiplexer || m_pAggPropMultiplexer->locked(), "OBoundControlModel::resumeValueListening: listening not suspended currently!" );
-
if ( m_pAggPropMultiplexer )
m_pAggPropMultiplexer->unlock();
}
-//-----------------------------------------------------------------------------
Sequence< Type > OBoundControlModel::_getTypes()
{
TypeBag aTypes(
@@ -1457,12 +1338,10 @@ Sequence< Type > OBoundControlModel::_getTypes()
if ( m_bSupportsValidation )
aTypes.addTypes( OBoundControlModel_VALIDATION::getTypes() );
-
return aTypes.getTypes();
}
// OComponentHelper
-//-----------------------------------------------------------------------------
void OBoundControlModel::disposing()
{
OControlModel::disposing();
@@ -1486,32 +1365,32 @@ void OBoundControlModel::disposing()
getField()->removePropertyChangeListener( PROPERTY_VALUE, this );
resetField();
}
- m_xCursor = NULL;
+ m_xCursor = NULL;
Reference< XComponent > xComp( m_xLabelControl, UNO_QUERY );
if ( xComp.is() )
xComp->removeEventListener(static_cast< XEventListener* >( static_cast< XPropertyChangeListener* >( this ) ) );
-
// disconnect from our external value binding
if ( hasExternalValueBinding() )
disconnectExternalValueBinding();
-
// dito for the validator
if ( hasValidator() )
disconnectValidator( );
}
-//------------------------------------------------------------------------------
void OBoundControlModel::onValuePropertyChange( ControlModelLock& i_rControLock )
{
if ( hasExternalValueBinding() )
- { // the control value changed, while we have an external value binding
+ {
+ // the control value changed, while we have an external value binding
// -> forward the value to it
if ( m_eControlValueChangeInstigator != eExternalBinding )
transferControlValueToExternal( i_rControLock );
}
+
else if ( !m_bCommitable && m_xColumnUpdate.is() )
- { // the control value changed, while we are bound to a database column,
+ {
+ // the control value changed, while we are bound to a database column,
// but not committable (which means changes in the control have to be reflected to
// the underlying database column immediately)
// -> forward the value to the database column
@@ -1524,45 +1403,36 @@ void OBoundControlModel::onValuePropertyChange( ControlModelLock& i_rControLock
recheckValidity( true );
}
-//------------------------------------------------------------------------------
void OBoundControlModel::_propertyChanged( const PropertyChangeEvent& _rEvt ) throw ( RuntimeException )
{
ControlModelLock aLock( *this );
-
OSL_ENSURE( _rEvt.PropertyName == m_sValuePropertyName,
"OBoundControlModel::_propertyChanged: where did this come from (1)?" );
OSL_ENSURE( m_pAggPropMultiplexer && !m_pAggPropMultiplexer->locked(),
"OBoundControlModel::_propertyChanged: where did this come from (2)?" );
-
if ( _rEvt.PropertyName == m_sValuePropertyName )
{
onValuePropertyChange( aLock );
}
}
-//------------------------------------------------------------------------------
void OBoundControlModel::startAggregatePropertyListening( const OUString& _rPropertyName )
{
OSL_PRECOND( m_pAggPropMultiplexer, "OBoundControlModel::startAggregatePropertyListening: no multiplexer!" );
OSL_ENSURE( !_rPropertyName.isEmpty(), "OBoundControlModel::startAggregatePropertyListening: invalid property name!" );
-
if ( m_pAggPropMultiplexer && !_rPropertyName.isEmpty() )
{
m_pAggPropMultiplexer->addProperty( _rPropertyName );
}
}
-//------------------------------------------------------------------------------
void OBoundControlModel::doFormListening( const bool _bStart )
{
OSL_PRECOND( !hasExternalValueBinding(), "OBoundControlModel::doFormListening: external value binding should overrule the database binding!" );
-
if ( isFormListening() == _bStart )
return;
-
if ( m_xAmbientForm.is() )
_bStart ? m_xAmbientForm->addLoadListener( this ) : m_xAmbientForm->removeLoadListener( this );
-
Reference< XLoadable > xParentLoadable( getParent(), UNO_QUERY );
if ( getParent().is() && !xParentLoadable.is() )
{
@@ -1578,34 +1448,26 @@ void OBoundControlModel::doFormListening( const bool _bStart )
}
// XChild
-//------------------------------------------------------------------------------
void SAL_CALL OBoundControlModel::setParent(const Reference<XInterface>& _rxParent) throw(com::sun::star::lang::NoSupportException, RuntimeException)
{
ControlModelLock aLock( *this );
FieldChangeNotifier aBoundFieldNotifier( aLock );
-
if ( getParent() == _rxParent )
return;
-
// disconnect from database column (which is controlled by parent, directly or indirectly)
if ( hasField() )
impl_disconnectDatabaseColumn_noNotify();
-
// log off old listeners
if ( isFormListening() )
doFormListening( false );
-
// actually set the new parent
OControlModel::setParent( _rxParent );
-
// a new parent means a new ambient form
impl_determineAmbientForm_nothrow();
-
if ( !hasExternalValueBinding() )
{
// log on new listeners
doFormListening( true );
-
// re-connect to database column of the new parent
if ( m_xAmbientForm.is() && m_xAmbientForm->isLoaded() )
impl_connectDatabaseColumn_noNotify( false );
@@ -1613,38 +1475,38 @@ void SAL_CALL OBoundControlModel::setParent(const Reference<XInterface>& _rxPare
}
// XEventListener
-//------------------------------------------------------------------------------
void SAL_CALL OBoundControlModel::disposing(const com::sun::star::lang::EventObject& _rEvent) throw (RuntimeException)
{
ControlModelLock aLock( *this );
-
if ( _rEvent.Source == getField() )
{
resetField();
}
+
else if ( _rEvent.Source == m_xLabelControl )
{
Reference<XPropertySet> xOldValue = m_xLabelControl;
m_xLabelControl = NULL;
-
// fire a propertyChanged (when we leave aLock's scope)
aLock.addPropertyNotification( PROPERTY_ID_CONTROLLABEL, makeAny( xOldValue ), makeAny( m_xLabelControl ) );
}
+
else if ( _rEvent.Source == m_xExternalBinding )
{ // *first* check for the external binding
disconnectExternalValueBinding( );
}
+
else if ( _rEvent.Source == m_xValidator )
{ // *then* check for the validator. Reason is that bindings may also act as validator at the same
// time, in this case, the validator is automatically revoked when the binding is revoked
disconnectValidator( );
}
+
else
OControlModel::disposing(_rEvent);
}
// XServiceInfo
-//------------------------------------------------------------------------------
StringSequence SAL_CALL OBoundControlModel::getSupportedServiceNames() throw(RuntimeException)
{
return ::comphelper::concatSequences(
@@ -1653,12 +1515,10 @@ StringSequence SAL_CALL OBoundControlModel::getSupportedServiceNames() throw(Run
);
}
-//------------------------------------------------------------------------------
Sequence< OUString > SAL_CALL OBoundControlModel::getSupportedServiceNames_Static() throw( RuntimeException )
{
Sequence< OUString > aOwnServiceNames( 1 );
aOwnServiceNames[ 0 ] = "com.sun.star.form.DataAwareControlModel";
-
return ::comphelper::concatSequences(
OControlModel::getSupportedServiceNames_Static(),
aOwnServiceNames
@@ -1666,19 +1526,14 @@ Sequence< OUString > SAL_CALL OBoundControlModel::getSupportedServiceNames_Stati
}
// XPersist
-//------------------------------------------------------------------------------
void SAL_CALL OBoundControlModel::write( const Reference<stario::XObjectOutputStream>& _rxOutStream ) throw(stario::IOException, RuntimeException)
{
OControlModel::write(_rxOutStream);
-
osl::MutexGuard aGuard(m_aMutex);
-
// Version
_rxOutStream->writeShort(0x0002);
-
// Controlsource
::comphelper::operator<<( _rxOutStream, m_aControlSource);
-
// !!! IMPORTANT NOTE !!!
// don't write any new members here : this wouldn't be compatible with older versions, as OBoundControlModel
// is a base class which is called in derived classes "read" method. So if you increment the version
@@ -1688,7 +1543,6 @@ void SAL_CALL OBoundControlModel::write( const Reference<stario::XObjectOutputSt
// !!! EOIN !!!
}
-//------------------------------------------------------------------------------
void OBoundControlModel::defaultCommonProperties()
{
Reference<com::sun::star::lang::XComponent> xComp(m_xLabelControl, UNO_QUERY);
@@ -1697,15 +1551,12 @@ void OBoundControlModel::defaultCommonProperties()
m_xLabelControl = NULL;
}
-//------------------------------------------------------------------------------
void OBoundControlModel::readCommonProperties(const Reference<stario::XObjectInputStream>& _rxInStream)
{
sal_Int32 nLen = _rxInStream->readLong();
-
Reference<stario::XMarkableStream> xMark(_rxInStream, UNO_QUERY);
DBG_ASSERT(xMark.is(), "OBoundControlModel::readCommonProperties : can only work with markable streams !");
sal_Int32 nMark = xMark->createMark();
-
// read the reference to the label control
Reference<stario::XPersistObject> xPersist;
sal_Int32 nUsedFlag;
@@ -1716,26 +1567,21 @@ void OBoundControlModel::readCommonProperties(const Reference<stario::XObjectInp
Reference< XComponent > xComp( m_xLabelControl, UNO_QUERY );
if (xComp.is())
xComp->addEventListener(static_cast<com::sun::star::lang::XEventListener*>(static_cast<XPropertyChangeListener*>(this)));
-
// read any other new common properties here
-
// skip the remaining bytes
xMark->jumpToMark(nMark);
_rxInStream->skipBytes(nLen);
xMark->deleteMark(nMark);
}
-//------------------------------------------------------------------------------
void OBoundControlModel::writeCommonProperties(const Reference<stario::XObjectOutputStream>& _rxOutStream)
{
Reference<stario::XMarkableStream> xMark(_rxOutStream, UNO_QUERY);
DBG_ASSERT(xMark.is(), "OBoundControlModel::writeCommonProperties : can only work with markable streams !");
sal_Int32 nMark = xMark->createMark();
-
// a placeholder where we will write the overall length (later in this method)
sal_Int32 nLen = 0;
_rxOutStream->writeLong(nLen);
-
// write the reference to the label control
Reference<stario::XPersistObject> xPersist(m_xLabelControl, UNO_QUERY);
sal_Int32 nUsedFlag = 0;
@@ -1744,9 +1590,7 @@ void OBoundControlModel::writeCommonProperties(const Reference<stario::XObjectOu
_rxOutStream->writeLong(nUsedFlag);
if (xPersist.is())
_rxOutStream->writeObject(xPersist);
-
// write any other new common properties here
-
// write the correct length at the beginning of the block
nLen = xMark->offsetToMark(nMark) - sizeof(nLen);
xMark->jumpToMark(nMark);
@@ -1755,17 +1599,14 @@ void OBoundControlModel::writeCommonProperties(const Reference<stario::XObjectOu
xMark->deleteMark(nMark);
}
-//------------------------------------------------------------------------------
void SAL_CALL OBoundControlModel::read( const Reference< stario::XObjectInputStream >& _rxInStream ) throw(stario::IOException, RuntimeException)
{
OControlModel::read(_rxInStream);
-
osl::MutexGuard aGuard(m_aMutex);
sal_uInt16 nVersion = _rxInStream->readShort(); (void)nVersion;
::comphelper::operator>>( _rxInStream, m_aControlSource);
}
-//------------------------------------------------------------------------------
void OBoundControlModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle) const
{
switch (nHandle)
@@ -1793,7 +1634,6 @@ void OBoundControlModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle) co
}
}
-//------------------------------------------------------------------------------
sal_Bool OBoundControlModel::convertFastPropertyValue(
Any& _rConvertedValue, Any& _rOldValue,
sal_Int32 _nHandle,
@@ -1819,6 +1659,7 @@ sal_Bool OBoundControlModel::convertFastPropertyValue(
getFastPropertyValue(_rOldValue, _nHandle);
bModified = m_xLabelControl.is();
}
+
else
{
bModified = tryPropertyValue(_rConvertedValue, _rOldValue, _rValue, m_xLabelControl);
@@ -1826,6 +1667,7 @@ sal_Bool OBoundControlModel::convertFastPropertyValue(
// an empty interface is interpreted as VOID
_rOldValue.clear();
}
+
break;
default:
bModified = OControlModel::convertFastPropertyValue(_rConvertedValue, _rOldValue, _nHandle, _rValue);
@@ -1833,7 +1675,6 @@ sal_Bool OBoundControlModel::convertFastPropertyValue(
return bModified;
}
-//------------------------------------------------------------------------------
Any OBoundControlModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
{
Any aDefault;
@@ -1842,11 +1683,9 @@ Any OBoundControlModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
case PROPERTY_ID_INPUT_REQUIRED:
aDefault <<= sal_Bool( sal_True );
break;
-
case PROPERTY_ID_CONTROLSOURCE:
aDefault <<= OUString();
break;
-
case PROPERTY_ID_CONTROLLABEL:
aDefault <<= Reference< XPropertySet >();
break;
@@ -1854,7 +1693,6 @@ Any OBoundControlModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
return aDefault;
}
-//------------------------------------------------------------------------------
void OBoundControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue ) throw (Exception)
{
switch (nHandle)
@@ -1872,7 +1710,6 @@ void OBoundControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, co
{
if ( rValue.hasValue() && ( rValue.getValueTypeClass() != TypeClass_INTERFACE ) )
throw com::sun::star::lang::IllegalArgumentException();
-
Reference< XInterface > xNewValue( rValue, UNO_QUERY );
if ( !xNewValue.is() )
{ // set property to "void"
@@ -1902,20 +1739,20 @@ void OBoundControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, co
if (!xAsForm.is())
// found my root
break;
-
Reference<XChild> xLoopAsChild(xMyTopLevel, UNO_QUERY);
xMyTopLevel = xLoopAsChild.is() ? xLoopAsChild->getParent() : Reference< XInterface >();
}
+
Reference< XInterface > xNewTopLevel = xAsChild->getParent();
while (xNewTopLevel.is())
{
Reference<XForm> xAsForm(xNewTopLevel, UNO_QUERY);
if (!xAsForm.is())
break;
-
Reference<XChild> xLoopAsChild(xNewTopLevel, UNO_QUERY);
xNewTopLevel = xLoopAsChild.is() ? xLoopAsChild->getParent() : Reference< XInterface >();
}
+
if (xNewTopLevel != xMyTopLevel)
{
// the both objects don't belong to the same forms collection -> not acceptable
@@ -1927,6 +1764,7 @@ void OBoundControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, co
if (xComp.is())
xComp->addEventListener(static_cast<com::sun::star::lang::XEventListener*>(static_cast<XPropertyChangeListener*>(this)));
}
+
break;
default:
OControlModel::setFastPropertyValue_NoBroadcast(nHandle, rValue );
@@ -1934,7 +1772,6 @@ void OBoundControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, co
}
// XPropertyChangeListener
-//------------------------------------------------------------------------------
void SAL_CALL OBoundControlModel::propertyChange( const PropertyChangeEvent& evt ) throw(RuntimeException)
{
// if the DBColumn value changed, transfer it to the control
@@ -1945,10 +1782,10 @@ void SAL_CALL OBoundControlModel::propertyChange( const PropertyChangeEvent& evt
if ( m_bForwardValueChanges && m_xColumn.is() )
transferDbValueToControl();
}
+
else
{
OSL_ENSURE( evt.Source == m_xExternalBinding, "OBoundControlModel::propertyChange: where did this come from?" );
-
// our binding has properties which can control properties of ourself
OUString sBindingControlledProperty;
bool bForwardToLabelControl = false;
@@ -1956,71 +1793,64 @@ void SAL_CALL OBoundControlModel::propertyChange( const PropertyChangeEvent& evt
{
sBindingControlledProperty = PROPERTY_READONLY;
}
+
else if ( evt.PropertyName.equals( PROPERTY_RELEVANT ) )
{
sBindingControlledProperty = PROPERTY_ENABLED;
bForwardToLabelControl = true;
}
+
else
return;
-
try
{
setPropertyValue( sBindingControlledProperty, evt.NewValue );
if ( bForwardToLabelControl && m_xLabelControl.is() )
m_xLabelControl->setPropertyValue( sBindingControlledProperty, evt.NewValue );
}
+
catch( const Exception& )
{
SAL_WARN("forms.component", "OBoundControlModel::propertyChange: could not adjust my binding-controlled property!");
DBG_UNHANDLED_EXCEPTION();
}
+
}
}
-//------------------------------------------------------------------------------
void SAL_CALL OBoundControlModel::onRowSetChanged( const EventObject& /*i_Event*/ ) throw (RuntimeException)
{
ControlModelLock aLock( *this );
FieldChangeNotifier aBoundFieldNotifier( aLock );
-
// disconnect from database column (which is controlled by parent, directly or indirectly)
if ( hasField() )
impl_disconnectDatabaseColumn_noNotify();
-
// log off old listeners
if ( isFormListening() )
doFormListening( false );
-
// determine the new ambient form
impl_determineAmbientForm_nothrow();
-
// log on new listeners
doFormListening( true );
-
// re-connect to database column if needed and possible
if ( m_xAmbientForm.is() && m_xAmbientForm->isLoaded() )
impl_connectDatabaseColumn_noNotify( false );
}
// XBoundComponent
-//------------------------------------------------------------------------------
void SAL_CALL OBoundControlModel::addUpdateListener(const Reference<XUpdateListener>& _rxListener) throw(RuntimeException)
{
m_aUpdateListeners.addInterface(_rxListener);
}
-//------------------------------------------------------------------------------
void SAL_CALL OBoundControlModel::removeUpdateListener(const Reference< XUpdateListener>& _rxListener) throw(RuntimeException)
{
m_aUpdateListeners.removeInterface(_rxListener);
}
-//------------------------------------------------------------------------------
sal_Bool SAL_CALL OBoundControlModel::commit() throw(RuntimeException)
{
ControlModelLock aLock( *this );
-
OSL_PRECOND( m_bCommitable, "OBoundControlModel::commit: invalid call (I'm not commitable !) " );
if ( hasExternalValueBinding() )
{
@@ -2036,22 +1866,18 @@ sal_Bool SAL_CALL OBoundControlModel::commit() throw(RuntimeException)
OSL_ENSURE( !hasExternalValueBinding(), "OBoundControlModel::commit: control flow broken!" );
// we reach this only if we're not working with an external binding
-
if ( !hasField() )
return sal_True;
-
::cppu::OInterfaceIteratorHelper aIter( m_aUpdateListeners );
EventObject aEvent;
aEvent.Source = static_cast< XWeak* >( this );
sal_Bool bSuccess = sal_True;
-
aLock.release();
- // >>>>>>>> ----- UNSAFE ----- >>>>>>>>
+ // UNSAFE >
while (aIter.hasMoreElements() && bSuccess)
bSuccess = static_cast< XUpdateListener* >( aIter.next() )->approveUpdate( aEvent );
- // <<<<<<<< ----- UNSAFE ----- <<<<<<<<
+ // < UNSAFE
aLock.acquire();
-
if ( bSuccess )
{
try
@@ -2059,10 +1885,12 @@ sal_Bool SAL_CALL OBoundControlModel::commit() throw(RuntimeException)
if ( m_xColumnUpdate.is() )
bSuccess = commitControlValueToDbColumn( false );
}
+
catch(const Exception&)
{
bSuccess = sal_False;
}
+
}
if ( bSuccess )
@@ -2070,11 +1898,9 @@ sal_Bool SAL_CALL OBoundControlModel::commit() throw(RuntimeException)
aLock.release();
m_aUpdateListeners.notifyEach( &XUpdateListener::updated, aEvent );
}
-
return bSuccess;
}
-//------------------------------------------------------------------------------
void OBoundControlModel::resetField()
{
m_xColumnUpdate.clear();
@@ -2083,18 +1909,15 @@ void OBoundControlModel::resetField()
m_nFieldType = DataType::OTHER;
}
-//------------------------------------------------------------------------------
sal_Bool OBoundControlModel::connectToField(const Reference<XRowSet>& rForm)
{
OSL_PRECOND( !hasExternalValueBinding(), "OBoundControlModel::connectToField: invalid call (have an external binding)!" );
-
- // wenn eine Verbindung zur Datenbank existiert
+ // if there's a connection to the database
if (rForm.is() && getConnection(rForm).is())
{
- // Feld bestimmen und PropertyChangeListener
+ // determine field and PropertyChangeListener
m_xCursor = rForm;
Reference<XPropertySet> xFieldCandidate;
-
if (m_xCursor.is())
{
Reference<XColumnsSupplier> xColumnsSupplier(m_xCursor, UNO_QUERY);
@@ -2106,7 +1929,9 @@ sal_Bool OBoundControlModel::connectToField(const Reference<XRowSet>& rForm)
{
OSL_VERIFY( xColumns->getByName(m_aControlSource) >>= xFieldCandidate );
}
+
}
+
}
try
@@ -2118,42 +1943,44 @@ sal_Bool OBoundControlModel::connectToField(const Reference<XRowSet>& rForm)
if ( approveDbColumnType( nFieldType ) )
impl_setField_noNotify( xFieldCandidate );
}
+
else
impl_setField_noNotify( NULL );
-
if ( m_xField.is() )
{
- if( m_xField->getPropertySetInfo()->hasPropertyByName( PROPERTY_VALUE ) )
+ if ( m_xField->getPropertySetInfo()->hasPropertyByName( PROPERTY_VALUE ) )
{
m_nFieldType = nFieldType;
-
- // an wertaenderungen horchen
+ // listen to changing values
m_xField->addPropertyChangeListener( PROPERTY_VALUE, this );
m_xColumnUpdate = Reference< XColumnUpdate >( m_xField, UNO_QUERY );
m_xColumn = Reference< XColumn >( m_xField, UNO_QUERY );
-
sal_Int32 nNullableFlag = ColumnValue::NO_NULLS;
m_xField->getPropertyValue(PROPERTY_ISNULLABLE) >>= nNullableFlag;
m_bRequired = (ColumnValue::NO_NULLS == nNullableFlag);
- // we're optimistic : in case of ColumnValue_NULLABLE_UNKNOWN we assume nullability ....
+ // we're optimistic: in case of ColumnValue_NULLABLE_UNKNOWN we assume nullability...
}
+
else
{
SAL_WARN("forms.component", "OBoundControlModel::connectToField: property " << PROPERTY_VALUE << " not supported!");
impl_setField_noNotify( NULL );
}
+
}
+
}
+
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
resetField();
}
+
}
return hasField();
}
-//------------------------------------------------------------------------------
void OBoundControlModel::initFromField( const Reference< XRowSet >& _rxRowSet )
{
// but only if the rowset if posisitioned on a valid record
@@ -2168,11 +1995,9 @@ void OBoundControlModel::initFromField( const Reference< XRowSet >& _rxRowSet )
}
}
-//------------------------------------------------------------------------------
sal_Bool OBoundControlModel::approveDbColumnType(sal_Int32 _nColumnType)
{
OSL_PRECOND( !hasExternalValueBinding(), "OBoundControlModel::approveDbColumnType: invalid call (have an external binding)!" );
-
if ((_nColumnType == DataType::BINARY) || (_nColumnType == DataType::VARBINARY)
|| (_nColumnType == DataType::LONGVARBINARY) || (_nColumnType == DataType::OTHER)
|| (_nColumnType == DataType::OBJECT) || (_nColumnType == DataType::DISTINCT)
@@ -2180,15 +2005,12 @@ sal_Bool OBoundControlModel::approveDbColumnType(sal_Int32 _nColumnType)
|| (_nColumnType == DataType::BLOB) /*|| (_nColumnType == DataType::CLOB)*/
|| (_nColumnType == DataType::REF) || (_nColumnType == DataType::SQLNULL))
return sal_False;
-
return sal_True;
}
-//------------------------------------------------------------------------------
void OBoundControlModel::impl_determineAmbientForm_nothrow()
{
Reference< XInterface > xParent( const_cast< OBoundControlModel* >( this )->getParent() );
-
m_xAmbientForm.set( xParent, UNO_QUERY );
if ( !m_xAmbientForm.is() )
{
@@ -2198,21 +2020,17 @@ void OBoundControlModel::impl_determineAmbientForm_nothrow()
}
}
-//------------------------------------------------------------------------------
void OBoundControlModel::impl_connectDatabaseColumn_noNotify( bool _bFromReload )
{
OSL_PRECOND( !hasExternalValueBinding(), "OBoundControlModel::impl_connectDatabaseColumn_noNotify: not to be called with an external value binding!" );
-
// consistency checks
DBG_ASSERT( !( hasField() && !_bFromReload ),
"OBoundControlModel::impl_connectDatabaseColumn_noNotify: the form is just *loaded*, but we already have a field!" );
(void)_bFromReload;
-
Reference< XRowSet > xRowSet( m_xAmbientForm, UNO_QUERY );
OSL_ENSURE( xRowSet.is(), "OBoundControlModel::impl_connectDatabaseColumn_noNotify: no row set!" );
if ( !xRowSet.is() )
return;
-
if ( !hasField() )
{
// connect to the column
@@ -2222,24 +2040,19 @@ void OBoundControlModel::impl_connectDatabaseColumn_noNotify( bool _bFromReload
// now that we're connected (more or less, even if we did not find a column),
// we definitely want to forward any potentially occuring value changes
m_bForwardValueChanges = sal_True;
-
// let derived classes react on this new connection
m_bLoaded = sal_True;
onConnectedDbColumn( xRowSet );
-
// initially transfer the db column value to the control, if we successfully connected to a database column
if ( hasField() )
initFromField( xRowSet );
}
-//------------------------------------------------------------------------------
void OBoundControlModel::impl_disconnectDatabaseColumn_noNotify()
{
OSL_PRECOND( !hasExternalValueBinding(), "OBoundControlModel::impl_disconnectDatabaseColumn_noNotify: not to be called with an external value binding!" );
-
// let derived classes react on this
onDisconnectedDbColumn();
-
if ( hasField() )
{
getField()->removePropertyChangeListener( PROPERTY_VALUE, this );
@@ -2250,72 +2063,55 @@ void OBoundControlModel::impl_disconnectDatabaseColumn_noNotify()
m_bLoaded = sal_False;
}
-//==============================================================================
// XLoadListener
-//------------------------------------------------------------------------------
void SAL_CALL OBoundControlModel::loaded( const EventObject& _rEvent ) throw(RuntimeException)
{
ControlModelLock aLock( *this );
FieldChangeNotifier aBoundFieldNotifier( aLock );
-
OSL_ENSURE( _rEvent.Source == m_xAmbientForm, "OBoundControlModel::loaded: where does this come from?" );
(void)_rEvent;
-
OSL_PRECOND( !hasExternalValueBinding(), "OBoundControlModel::loaded: we should never reach this with an external value binding!" );
if ( hasExternalValueBinding() )
return;
-
impl_connectDatabaseColumn_noNotify( false );
}
-
-//------------------------------------------------------------------------------
void SAL_CALL OBoundControlModel::unloaded( const com::sun::star::lang::EventObject& /*aEvent*/ ) throw(RuntimeException)
{
OSL_PRECOND( !hasExternalValueBinding(), "OBoundControlModel::unloaded: we should never reach this with an external value binding!" );
}
-//------------------------------------------------------------------------------
void SAL_CALL OBoundControlModel::reloading( const com::sun::star::lang::EventObject& /*aEvent*/ ) throw(RuntimeException)
{
OSL_PRECOND( !hasExternalValueBinding(), "OBoundControlModel::reloading: we should never reach this with an external value binding!" );
if ( hasExternalValueBinding() )
return;
-
osl::MutexGuard aGuard(m_aMutex);
m_bForwardValueChanges = sal_False;
}
-//------------------------------------------------------------------------------
void SAL_CALL OBoundControlModel::unloading(const com::sun::star::lang::EventObject& /*aEvent*/) throw(RuntimeException)
{
ControlModelLock aLock( *this );
FieldChangeNotifier aBoundFieldNotifier( aLock );
-
OSL_PRECOND( !hasExternalValueBinding(), "OBoundControlModel::unloading: we should never reach this with an external value binding!" );
if ( hasExternalValueBinding() )
return;
-
impl_disconnectDatabaseColumn_noNotify();
}
-//------------------------------------------------------------------------------
void SAL_CALL OBoundControlModel::reloaded( const EventObject& _rEvent ) throw(RuntimeException)
{
ControlModelLock aLock( *this );
FieldChangeNotifier aBoundFieldNotifier( aLock );
-
OSL_ENSURE( _rEvent.Source == m_xAmbientForm, "OBoundControlModel::reloaded: where does this come from?" );
(void)_rEvent;
-
OSL_PRECOND( !hasExternalValueBinding(), "OBoundControlModel::reloaded: we should never reach this with an external value binding!" );
if ( hasExternalValueBinding() )
return;
-
impl_connectDatabaseColumn_noNotify( true );
}
-//------------------------------------------------------------------------------
void OBoundControlModel::setControlValue( const Any& _rValue, ValueChangeInstigator _eInstigator )
{
m_eControlValueChangeInstigator = _eInstigator;
@@ -2323,14 +2119,12 @@ void OBoundControlModel::setControlValue( const Any& _rValue, ValueChangeInstiga
m_eControlValueChangeInstigator = eOther;
}
-//------------------------------------------------------------------------------
void OBoundControlModel::doSetControlValue( const Any& _rValue )
{
OSL_PRECOND( m_xAggregateFastSet.is() && m_xAggregateSet.is(),
"OBoundControlModel::doSetControlValue: invalid aggregate !" );
OSL_PRECOND( !m_sValuePropertyName.isEmpty() || ( m_nValuePropertyAggregateHandle != -1 ),
"OBoundControlModel::doSetControlValue: please override if you have own value property handling!" );
-
try
{
// release our mutex once (it's acquired in one of the calling methods), as setting aggregate properties
@@ -2341,11 +2135,14 @@ void OBoundControlModel::doSetControlValue( const Any& _rValue )
{
m_xAggregateFastSet->setFastPropertyValue( m_nValuePropertyAggregateHandle, _rValue );
}
+
else if ( !m_sValuePropertyName.isEmpty() && m_xAggregateSet.is() )
{
m_xAggregateSet->setPropertyValue( m_sValuePropertyName, _rValue );
}
+
}
+
catch( const Exception& )
{
SAL_WARN("forms.component", "OBoundControlModel::doSetControlValue: caught an exception!");
@@ -2353,7 +2150,6 @@ void OBoundControlModel::doSetControlValue( const Any& _rValue )
}
}
-//------------------------------------------------------------------------------
void OBoundControlModel::onConnectedValidator( )
{
try
@@ -2367,15 +2163,16 @@ void OBoundControlModel::onConnectedValidator( )
if ( xAggregatePropertyInfo.is() && xAggregatePropertyInfo->hasPropertyByName( PROPERTY_ENFORCE_FORMAT ) )
m_xAggregateSet->setPropertyValue( PROPERTY_ENFORCE_FORMAT, makeAny( (sal_Bool)sal_False ) );
}
+
catch( const Exception& )
{
SAL_WARN("forms.component", "OBoundControlModel::onConnectedValidator: caught an exception!");
DBG_UNHANDLED_EXCEPTION();
}
+
recheckValidity( false );
}
-//------------------------------------------------------------------------------
void OBoundControlModel::onDisconnectedValidator( )
{
try
@@ -2386,70 +2183,61 @@ void OBoundControlModel::onDisconnectedValidator( )
if ( xAggregatePropertyInfo.is() && xAggregatePropertyInfo->hasPropertyByName( PROPERTY_ENFORCE_FORMAT ) )
m_xAggregateSet->setPropertyValue( PROPERTY_ENFORCE_FORMAT, makeAny( (sal_Bool)sal_True ) );
}
+
catch( const Exception& )
{
SAL_WARN("forms.component", "OBoundControlModel::onDisconnectedValidator: caught an exception!");
DBG_UNHANDLED_EXCEPTION();
}
+
recheckValidity( false );
}
-//------------------------------------------------------------------------------
void OBoundControlModel::onConnectedExternalValue( )
{
calculateExternalValueType();
}
-//------------------------------------------------------------------------------
void OBoundControlModel::onDisconnectedExternalValue( )
{
}
-//------------------------------------------------------------------------------
void OBoundControlModel::onConnectedDbColumn( const Reference< XInterface >& /*_rxForm*/ )
{
OSL_PRECOND( !hasExternalValueBinding(), "OBoundControlModel::onConnectedDbColumn: how this? There's an external value binding!" );
}
-//------------------------------------------------------------------------------
void OBoundControlModel::onDisconnectedDbColumn()
{
OSL_PRECOND( !hasExternalValueBinding(), "OBoundControlModel::onDisconnectedDbColumn: how this? There's an external value binding!" );
}
// XReset
-//-----------------------------------------------------------------------------
Any OBoundControlModel::getDefaultForReset() const
{
return Any();
}
-//-----------------------------------------------------------------------------
void OBoundControlModel::resetNoBroadcast()
{
setControlValue( getDefaultForReset(), eOther );
}
-//-----------------------------------------------------------------------------
void OBoundControlModel::addResetListener(const Reference<XResetListener>& l) throw (RuntimeException)
{
m_aResetHelper.addResetListener( l );
}
-//-----------------------------------------------------------------------------
void OBoundControlModel::removeResetListener(const Reference<XResetListener>& l) throw (RuntimeException)
{
m_aResetHelper.removeResetListener( l );
}
-//-----------------------------------------------------------------------------
void OBoundControlModel::reset() throw (RuntimeException)
{
if ( !m_aResetHelper.approveReset() )
return;
-
ControlModelLock aLock( *this );
-
// on a new record?
sal_Bool bIsNewRecord = sal_False;
Reference<XPropertySet> xSet( m_xCursor, UNO_QUERY );
@@ -2459,10 +2247,12 @@ void OBoundControlModel::reset() throw (RuntimeException)
{
xSet->getPropertyValue( PROPERTY_ISNEW ) >>= bIsNewRecord;
}
+
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
+
}
// cursor on an invalid row?
@@ -2475,13 +2265,14 @@ void OBoundControlModel::reset() throw (RuntimeException)
)
&& !bIsNewRecord;
}
+
catch( const SQLException& )
{
SAL_WARN("forms.component", "OBoundControlModel::reset: caught an SQL exception!" );
DBG_UNHANDLED_EXCEPTION();
}
- // #i24495# - don't count the insert row as "invalid"
+ // #i24495# - don't count the insert row as "invalid"
sal_Bool bSimpleReset =
( !m_xColumn.is() // no connection to a database column
|| ( m_xCursor.is() // OR we have an improperly positioned cursor
@@ -2489,7 +2280,6 @@ void OBoundControlModel::reset() throw (RuntimeException)
)
|| hasExternalValueBinding() // OR we have an external value binding
);
-
if ( !bSimpleReset )
{
// The default values will be set if and only if the current value of the field which we're bound
@@ -2497,7 +2287,6 @@ void OBoundControlModel::reset() throw (RuntimeException)
// Else, the current field value should be refreshed
// This behaviour is not completely ... "matured": What should happen if the field as well as the
// control have a default value?
-
sal_Bool bIsNull = sal_True;
// we have to access the field content at least once to get a reliable result by XColumn::wasNull
try
@@ -2519,9 +2308,9 @@ void OBoundControlModel::reset() throw (RuntimeException)
m_xColumn->getBlob();
else
m_xColumn->getString();
-
bIsNull = m_xColumn->wasNull();
}
+
catch(const Exception&)
{
SAL_WARN("forms.component", "OBoundControlModel::reset: this should have succeeded in all cases!");
@@ -2529,7 +2318,6 @@ void OBoundControlModel::reset() throw (RuntimeException)
}
sal_Bool bNeedValueTransfer = sal_True;
-
if ( bIsNull )
{
if ( bIsNewRecord )
@@ -2538,18 +2326,18 @@ void OBoundControlModel::reset() throw (RuntimeException)
resetNoBroadcast();
// and immediately commit the changes to the DB column, to keep consistency
commitControlValueToDbColumn( true );
-
bNeedValueTransfer = sal_False;
}
+
}
if ( bNeedValueTransfer )
transferDbValueToControl();
}
+
else
{
resetNoBroadcast();
-
// transfer to the external binding, if necessary
if ( hasExternalValueBinding() )
transferControlValueToExternal( aLock );
@@ -2558,31 +2346,26 @@ void OBoundControlModel::reset() throw (RuntimeException)
// revalidate, if necessary
if ( hasValidator() )
recheckValidity( true );
-
aLock.release();
-
m_aResetHelper.notifyResetted();
}
-// -----------------------------------------------------------------------------
void OBoundControlModel::impl_setField_noNotify( const Reference< XPropertySet>& _rxField )
{
DBG_ASSERT( !hasExternalValueBinding(), "OBoundControlModel::impl_setField_noNotify: We have an external value binding!" );
m_xField = _rxField;
}
-//--------------------------------------------------------------------
sal_Bool OBoundControlModel::impl_approveValueBinding_nolock( const Reference< XValueBinding >& _rxBinding )
{
if ( !_rxBinding.is() )
return sal_False;
-
Sequence< Type > aTypeCandidates;
{
- // SYNCHRONIZED -->
+ // SYNCHRONIZED >
::osl::MutexGuard aGuard( m_aMutex );
aTypeCandidates = getSupportedBindingTypes();
- // <-- SYNCHRONIZED
+ // < SYNCHRONIZED
}
for ( const Type* pType = aTypeCandidates.getConstArray();
@@ -2593,39 +2376,31 @@ sal_Bool OBoundControlModel::impl_approveValueBinding_nolock( const Reference< X
if ( _rxBinding->supportsType( *pType ) )
return sal_True;
}
-
return sal_False;
}
-//--------------------------------------------------------------------
void OBoundControlModel::connectExternalValueBinding(
const Reference< XValueBinding >& _rxBinding, ControlModelLock& _rInstanceLock )
{
OSL_PRECOND( _rxBinding.is(), "OBoundControlModel::connectExternalValueBinding: invalid binding instance!" );
OSL_PRECOND( !hasExternalValueBinding( ), "OBoundControlModel::connectExternalValueBinding: precond not met (currently have a binding)!" );
-
// if we're connected to a database column, suspend this
if ( hasField() )
impl_disconnectDatabaseColumn_noNotify();
-
// suspend listening for load-related events at out ambient form.
// This is because an external value binding overrules a possible database binding.
if ( isFormListening() )
doFormListening( false );
-
// remember this new binding
m_xExternalBinding = _rxBinding;
-
// tell the derivee
onConnectedExternalValue();
-
try
{
// add as value listener so we get notified when the value changes
Reference< XModifyBroadcaster > xModifiable( m_xExternalBinding, UNO_QUERY );
if ( xModifiable.is() )
xModifiable->addModifyListener( this );
-
// add as property change listener for some (possibly present) properties we're
// interested in
Reference< XPropertySet > xBindingProps( m_xExternalBinding, UNO_QUERY );
@@ -2637,13 +2412,17 @@ void OBoundControlModel::connectExternalValueBinding(
xBindingProps->addPropertyChangeListener( PROPERTY_READONLY, this );
m_bBindingControlsRO = sal_True;
}
+
if ( xBindingPropsInfo->hasPropertyByName( PROPERTY_RELEVANT ) )
{
xBindingProps->addPropertyChangeListener( PROPERTY_RELEVANT, this );
m_bBindingControlsEnable = sal_True;
}
+
}
+
}
+
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
@@ -2651,7 +2430,6 @@ void OBoundControlModel::connectExternalValueBinding(
// propagate our new value
transferExternalValueToControl( _rInstanceLock );
-
// if the binding is also a validator, use it, too. This is a constraint of the
// com.sun.star.form.binding.ValidatableBindableFormComponent service
if ( m_bSupportsValidation )
@@ -2662,14 +2440,15 @@ void OBoundControlModel::connectExternalValueBinding(
if ( xAsValidator.is() )
setValidator( xAsValidator );
}
+
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
+
}
}
-//--------------------------------------------------------------------
void OBoundControlModel::disconnectExternalValueBinding( )
{
try
@@ -2678,7 +2457,6 @@ void OBoundControlModel::disconnectExternalValueBinding( )
Reference< XModifyBroadcaster > xModifiable( m_xExternalBinding, UNO_QUERY );
if ( xModifiable.is() )
xModifiable->removeModifyListener( this );
-
// remove as property change listener
Reference< XPropertySet > xBindingProps( m_xExternalBinding, UNO_QUERY );
if ( m_bBindingControlsRO )
@@ -2686,6 +2464,7 @@ void OBoundControlModel::disconnectExternalValueBinding( )
if ( m_bBindingControlsEnable )
xBindingProps->removePropertyChangeListener( PROPERTY_RELEVANT, this );
}
+
catch( const Exception& )
{
SAL_WARN("forms.component", "OBoundControlModel::disconnectExternalValueBinding: caught an exception!");
@@ -2695,23 +2474,18 @@ void OBoundControlModel::disconnectExternalValueBinding( )
// if the binding also acts as our validator, disconnect the validator, too
if ( ( m_xExternalBinding == m_xValidator ) && m_xValidator.is() )
disconnectValidator( );
-
// no binding anymore
m_xExternalBinding.clear();
-
// be a load listener at our form, again. This was suspended while we had
// an external value binding in place.
doFormListening( true );
-
// re-connect to database column of the new parent
if ( m_xAmbientForm.is() && m_xAmbientForm->isLoaded() )
impl_connectDatabaseColumn_noNotify( false );
-
// tell the derivee
onDisconnectedExternalValue();
}
-//--------------------------------------------------------------------
void SAL_CALL OBoundControlModel::setValueBinding( const Reference< XValueBinding >& _rxBinding ) throw (IncompatibleTypesException, RuntimeException)
{
OSL_PRECOND( m_bSupportsExternalBinding, "OBoundControlModel::setValueBinding: How did you reach this method?" );
@@ -2727,36 +2501,29 @@ void SAL_CALL OBoundControlModel::setValueBinding( const Reference< XValueBindin
}
ControlModelLock aLock( *this );
-
// since a ValueBinding overrules any potentially active database binding, the change in a ValueBinding
// might trigger a change in our BoundField.
FieldChangeNotifier aBoundFieldNotifier( aLock );
-
// disconnect from the old binding
if ( hasExternalValueBinding() )
disconnectExternalValueBinding( );
-
// connect to the new binding
if ( _rxBinding.is() )
connectExternalValueBinding( _rxBinding, aLock );
}
-//--------------------------------------------------------------------
Reference< XValueBinding > SAL_CALL OBoundControlModel::getValueBinding( ) throw (RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
OSL_PRECOND( m_bSupportsExternalBinding, "OBoundControlModel::getValueBinding: How did you reach this method?" );
// the interface for this method should not have been exposed if we do not
// support binding to external data
-
return m_xExternalBinding;
}
-//--------------------------------------------------------------------
void SAL_CALL OBoundControlModel::modified( const EventObject& _rEvent ) throw ( RuntimeException )
{
ControlModelLock aLock( *this );
-
OSL_PRECOND( hasExternalValueBinding(), "OBoundControlModel::modified: Where did this come from?" );
if ( !m_bTransferingValue && ( m_xExternalBinding == _rEvent.Source ) && m_xExternalBinding.is() )
{
@@ -2764,83 +2531,76 @@ void SAL_CALL OBoundControlModel::modified( const EventObject& _rEvent ) throw (
}
}
-//--------------------------------------------------------------------
void OBoundControlModel::transferDbValueToControl( )
{
try
{
setControlValue( translateDbColumnToControlValue(), eDbColumnBinding );
}
+
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
}
-//------------------------------------------------------------------------------
void OBoundControlModel::transferExternalValueToControl( ControlModelLock& _rInstanceLock )
{
Reference< XValueBinding > xExternalBinding( m_xExternalBinding );
Type aValueExchangeType( getExternalValueType() );
-
_rInstanceLock.release();
- // >>>>>>>> ----- UNSAFE ----- >>>>>>>>
+ // UNSAFE >
Any aExternalValue;
try
{
aExternalValue = xExternalBinding->getValue( aValueExchangeType );
}
+
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
- // <<<<<<<< ----- UNSAFE ----- <<<<<<<<
+ // < UNSAFE
_rInstanceLock.acquire();
-
setControlValue( translateExternalValueToControlValue( aExternalValue ), eExternalBinding );
}
-//------------------------------------------------------------------------------
void OBoundControlModel::transferControlValueToExternal( ControlModelLock& _rInstanceLock )
{
OSL_PRECOND( m_bSupportsExternalBinding && hasExternalValueBinding(),
"OBoundControlModel::transferControlValueToExternal: precondition not met!" );
-
if ( m_xExternalBinding.is() )
{
Any aExternalValue( translateControlValueToExternalValue() );
m_bTransferingValue = sal_True;
-
_rInstanceLock.release();
- // >>>>>>>> ----- UNSAFE ----- >>>>>>>>
+ // UNSAFE >
try
{
m_xExternalBinding->setValue( aExternalValue );
}
+
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
- // <<<<<<<< ----- UNSAFE ----- <<<<<<<<
- _rInstanceLock.acquire();
+ // < UNSAFE
+ _rInstanceLock.acquire();
m_bTransferingValue = sal_False;
}
}
-// -----------------------------------------------------------------------------
Sequence< Type > OBoundControlModel::getSupportedBindingTypes()
{
return Sequence< Type >( &m_aValuePropertyType, 1 );
}
-//-----------------------------------------------------------------------------
void OBoundControlModel::calculateExternalValueType()
{
m_aExternalValueType = Type();
if ( !m_xExternalBinding.is() )
return;
-
Sequence< Type > aTypeCandidates( getSupportedBindingTypes() );
for ( const Type* pTypeCandidate = aTypeCandidates.getConstArray();
pTypeCandidate != aTypeCandidates.getConstArray() + aTypeCandidates.getLength();
@@ -2855,30 +2615,24 @@ void OBoundControlModel::calculateExternalValueType()
}
}
-//-----------------------------------------------------------------------------
Any OBoundControlModel::translateExternalValueToControlValue( const Any& _rExternalValue ) const
{
OSL_PRECOND( m_bSupportsExternalBinding && hasExternalValueBinding(),
"OBoundControlModel::translateExternalValueToControlValue: precondition not met!" );
-
Any aControlValue( _rExternalValue );
-
// if the external value is VOID, and our value property is not allowed to be VOID,
// then default-construct a value
if ( !aControlValue.hasValue() && !m_bValuePropertyMayBeVoid )
aControlValue.setValue( NULL, m_aValuePropertyType );
-
- // outta here
+ // out of here
return aControlValue;
}
-//------------------------------------------------------------------------------
Any OBoundControlModel::translateControlValueToExternalValue( ) const
{
return getControlValue( );
}
-//------------------------------------------------------------------------------
Any OBoundControlModel::translateControlValueToValidatableValue( ) const
{
OSL_PRECOND( m_xValidator.is(), "OBoundControlModel::translateControlValueToValidatableValue: no validator, so why should I?" );
@@ -2887,34 +2641,30 @@ Any OBoundControlModel::translateControlValueToValidatableValue( ) const
return getControlValue();
}
-//------------------------------------------------------------------------------
Any OBoundControlModel::getControlValue( ) const
{
OSL_PRECOND( m_xAggregateFastSet.is() && m_xAggregateSet.is(),
"OBoundControlModel::getControlValue: invalid aggregate !" );
OSL_PRECOND( !m_sValuePropertyName.isEmpty() || ( m_nValuePropertyAggregateHandle != -1 ),
"OBoundControlModel::getControlValue: please override if you have own value property handling!" );
-
// determine the current control value
Any aControlValue;
if ( ( m_nValuePropertyAggregateHandle != -1 ) && m_xAggregateFastSet.is() )
{
aControlValue = m_xAggregateFastSet->getFastPropertyValue( m_nValuePropertyAggregateHandle );
}
+
else if ( !m_sValuePropertyName.isEmpty() && m_xAggregateSet.is() )
{
aControlValue = m_xAggregateSet->getPropertyValue( m_sValuePropertyName );
}
-
return aControlValue;
}
-//--------------------------------------------------------------------
void OBoundControlModel::connectValidator( const Reference< XValidator >& _rxValidator )
{
OSL_PRECOND( _rxValidator.is(), "OBoundControlModel::connectValidator: invalid validator instance!" );
OSL_PRECOND( !hasValidator( ), "OBoundControlModel::connectValidator: precond not met (have a validator currently)!" );
-
m_xValidator = _rxValidator;
// add as value listener so we get notified when the value changes
@@ -2924,15 +2674,14 @@ void OBoundControlModel::connectValidator( const Reference< XValidator >& _rxVal
{
m_xValidator->addValidityConstraintListener( this );
}
+
catch( const RuntimeException& )
{
}
}
-
onConnectedValidator( );
}
-//--------------------------------------------------------------------
void OBoundControlModel::disconnectValidator( )
{
OSL_PRECOND( hasValidator( ), "OBoundControlModel::connectValidator: precond not met (don't have a validator currently)!" );
@@ -2944,6 +2693,7 @@ void OBoundControlModel::disconnectValidator( )
{
m_xValidator->removeValidityConstraintListener( this );
}
+
catch( const RuntimeException& )
{
}
@@ -2954,16 +2704,15 @@ void OBoundControlModel::disconnectValidator( )
onDisconnectedValidator( );
}
-//--------------------------------------------------------------------
void SAL_CALL OBoundControlModel::setValidator( const Reference< XValidator >& _rxValidator ) throw (VetoException,RuntimeException)
{
::osl::ClearableMutexGuard aGuard( m_aMutex );
OSL_PRECOND( m_bSupportsValidation, "OBoundControlModel::setValidator: How did you reach this method?" );
- // the interface for this method should not have been exposed if we do not
- // support validation
+ // the interface for this method should not have been exposed if we do not
+ // support validation
// early out if the validator does not change
- if( _rxValidator == m_xValidator )
+ if ( _rxValidator == m_xValidator )
return;
if ( m_xValidator.is() && ( m_xValidator == m_xExternalBinding ) )
@@ -2981,7 +2730,6 @@ void SAL_CALL OBoundControlModel::setValidator( const Reference< XValidator >& _
connectValidator( _rxValidator );
}
-//--------------------------------------------------------------------
Reference< XValidator > SAL_CALL OBoundControlModel::getValidator( ) throw (RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -2992,7 +2740,6 @@ Reference< XValidator > SAL_CALL OBoundControlModel::getValidator( ) throw (Run
return m_xValidator;
}
-//--------------------------------------------------------------------
void SAL_CALL OBoundControlModel::validityConstraintChanged( const EventObject& /*Source*/ ) throw (RuntimeException)
{
::osl::ClearableMutexGuard aGuard( m_aMutex );
@@ -3003,13 +2750,11 @@ void SAL_CALL OBoundControlModel::validityConstraintChanged( const EventObject&
recheckValidity( false );
}
-//--------------------------------------------------------------------
sal_Bool SAL_CALL OBoundControlModel::isValid( ) throw (RuntimeException)
{
return m_bIsCurrentValueValid;
}
-//--------------------------------------------------------------------
::com::sun::star::uno::Any OBoundControlModel::getCurrentFormComponentValue() const
{
if ( hasValidator() )
@@ -3017,28 +2762,24 @@ sal_Bool SAL_CALL OBoundControlModel::isValid( ) throw (RuntimeException)
return getControlValue();
}
-//--------------------------------------------------------------------
Any SAL_CALL OBoundControlModel::getCurrentValue( ) throw (RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
return getCurrentFormComponentValue();
}
-//--------------------------------------------------------------------
void SAL_CALL OBoundControlModel::addFormComponentValidityListener( const Reference< validation::XFormComponentValidityListener >& Listener ) throw (NullPointerException, RuntimeException)
{
if ( Listener.is() )
m_aFormComponentListeners.addInterface( Listener );
}
-//--------------------------------------------------------------------
void SAL_CALL OBoundControlModel::removeFormComponentValidityListener( const Reference< validation::XFormComponentValidityListener >& Listener ) throw (NullPointerException, RuntimeException)
{
if ( Listener.is() )
m_aFormComponentListeners.removeInterface( Listener );
}
-//--------------------------------------------------------------------
void OBoundControlModel::recheckValidity( bool _bForceNotification )
{
try
@@ -3055,7 +2796,9 @@ void OBoundControlModel::recheckValidity( bool _bForceNotification )
MutexRelease aRelease( m_aMutex );
m_aFormComponentListeners.notifyEach( &validation::XFormComponentValidityListener::componentValidityChanged, EventObject( *this ) );
}
+
}
+
catch( const Exception& )
{
SAL_WARN("forms.component", "OBoundControlModel::recheckValidity: caught an exception!");
@@ -3063,7 +2806,6 @@ void OBoundControlModel::recheckValidity( bool _bForceNotification )
}
}
-//------------------------------------------------------------------------------
void OBoundControlModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 5, OControlModel )
@@ -3074,11 +2816,6 @@ void OBoundControlModel::describeFixedProperties( Sequence< Property >& _rProps
DECL_BOOL_PROP1 ( INPUT_REQUIRED, BOUND );
END_DESCRIBE_PROPERTIES()
}
-
-// -----------------------------------------------------------------------------
-
-//.........................................................................
}
-//... namespace frm .......................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx
index afb857dd7a44..eb850260b2d0 100644
--- a/forms/source/component/FormattedField.cxx
+++ b/forms/source/component/FormattedField.cxx
@@ -16,8 +16,6 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
-
#include "FormattedField.hxx"
#include "services.hxx"
#include "property.hrc"
@@ -51,14 +49,12 @@
#include <com/sun/star/form/XForm.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
#include <osl/mutex.hxx>
- // needed as long as we use the SolarMutex
+// needed as long as we use the SolarMutex
#include <comphelper/streamsection.hxx>
#include <cppuhelper/weakref.hxx>
#include <unotools/desktopterminationobserver.hxx>
-
#include <list>
#include <algorithm>
-
using namespace dbtools;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::sdb;
@@ -72,64 +68,44 @@ using namespace ::com::sun::star::io;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::util;
using namespace ::com::sun::star::form::binding;
-
namespace
{
typedef com::sun::star::util::Date UNODate;
typedef com::sun::star::util::Time UNOTime;
typedef com::sun::star::util::DateTime UNODateTime;
}
-
-//.........................................................................
namespace frm
{
-
-/*************************************************************************/
-
class StandardFormatsSupplier : protected SvNumberFormatsSupplierObj, public ::utl::ITerminationListener
{
protected:
SvNumberFormatter* m_pMyPrivateFormatter;
static WeakReference< XNumberFormatsSupplier > s_xDefaultFormatsSupplier;
-
public:
static Reference< XNumberFormatsSupplier > get( const Reference< XComponentContext >& _rxORB );
-
using SvNumberFormatsSupplierObj::operator new;
using SvNumberFormatsSupplierObj::operator delete;
-
protected:
StandardFormatsSupplier(const Reference< XComponentContext >& _rxFactory,LanguageType _eSysLanguage);
~StandardFormatsSupplier();
-
protected:
virtual bool queryTermination() const;
virtual void notifyTermination();
};
-
-//------------------------------------------------------------------
WeakReference< XNumberFormatsSupplier > StandardFormatsSupplier::s_xDefaultFormatsSupplier;
-
-//------------------------------------------------------------------
StandardFormatsSupplier::StandardFormatsSupplier(const Reference< XComponentContext > & _rxContext,LanguageType _eSysLanguage)
:SvNumberFormatsSupplierObj()
,m_pMyPrivateFormatter(new SvNumberFormatter(_rxContext, _eSysLanguage))
{
SetNumberFormatter(m_pMyPrivateFormatter);
-
// #i29147#
::utl::DesktopTerminationObserver::registerTerminationListener( this );
}
-
-//------------------------------------------------------------------
StandardFormatsSupplier::~StandardFormatsSupplier()
{
::utl::DesktopTerminationObserver::revokeTerminationListener( this );
-
DELETEZ( m_pMyPrivateFormatter );
}
-
-//------------------------------------------------------------------
Reference< XNumberFormatsSupplier > StandardFormatsSupplier::get( const Reference< XComponentContext >& _rxORB )
{
LanguageType eSysLanguage = LANGUAGE_SYSTEM;
@@ -138,14 +114,11 @@ Reference< XNumberFormatsSupplier > StandardFormatsSupplier::get( const Referenc
Reference< XNumberFormatsSupplier > xSupplier = s_xDefaultFormatsSupplier;
if ( xSupplier.is() )
return xSupplier;
-
// get the Office's locale
eSysLanguage = SvtSysLocale().GetLanguageTag().getLanguageType( false);
}
-
StandardFormatsSupplier* pSupplier = new StandardFormatsSupplier( _rxORB, eSysLanguage );
Reference< XNumberFormatsSupplier > xNewlyCreatedSupplier( pSupplier );
-
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
Reference< XNumberFormatsSupplier > xSupplier = s_xDefaultFormatsSupplier;
@@ -153,20 +126,14 @@ Reference< XNumberFormatsSupplier > StandardFormatsSupplier::get( const Referenc
// somebody used the small time frame where the mutex was not locked to create and set
// the supplier
return xSupplier;
-
s_xDefaultFormatsSupplier = xNewlyCreatedSupplier;
}
-
return xNewlyCreatedSupplier;
}
-
-//------------------------------------------------------------------
bool StandardFormatsSupplier::queryTermination() const
{
return true;
}
-
-//------------------------------------------------------------------
void StandardFormatsSupplier::notifyTermination()
{
Reference< XNumberFormatsSupplier > xKeepAlive = this;
@@ -174,19 +141,13 @@ void StandardFormatsSupplier::notifyTermination()
// earlier than upon unloading the library
// #i29147#
s_xDefaultFormatsSupplier = WeakReference< XNumberFormatsSupplier >( );
-
SetNumberFormatter( NULL );
DELETEZ( m_pMyPrivateFormatter );
}
-
-/*************************************************************************/
-//------------------------------------------------------------------
InterfaceRef SAL_CALL OFormattedControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new OFormattedControl( comphelper::getComponentContext(_rxFactory) ));
}
-
-//------------------------------------------------------------------
Sequence<Type> OFormattedControl::_getTypes()
{
return ::comphelper::concatSequences(
@@ -194,8 +155,6 @@ Sequence<Type> OFormattedControl::_getTypes()
OBoundControl::_getTypes()
);
}
-
-//------------------------------------------------------------------
Any SAL_CALL OFormattedControl::queryAggregation(const Type& _rType) throw (RuntimeException)
{
Any aReturn = OBoundControl::queryAggregation(_rType);
@@ -203,14 +162,10 @@ Any SAL_CALL OFormattedControl::queryAggregation(const Type& _rType) throw (Runt
aReturn = OFormattedControl_BASE::queryInterface(_rType);
return aReturn;
}
-
-
-//------------------------------------------------------------------------------
OFormattedControl::OFormattedControl(const Reference<XComponentContext>& _rxFactory)
:OBoundControl(_rxFactory, VCL_CONTROL_FORMATTEDFIELD)
,m_nKeyEvent(0)
{
-
increment(m_refCount);
{
Reference<XWindow> xComp;
@@ -221,64 +176,50 @@ OFormattedControl::OFormattedControl(const Reference<XComponentContext>& _rxFact
}
decrement(m_refCount);
}
-
-//------------------------------------------------------------------------------
OFormattedControl::~OFormattedControl()
{
if( m_nKeyEvent )
Application::RemoveUserEvent( m_nKeyEvent );
-
if (!OComponentHelper::rBHelper.bDisposed)
{
acquire();
dispose();
}
-
}
// XKeyListener
-//------------------------------------------------------------------------------
void OFormattedControl::disposing(const EventObject& _rSource) throw(RuntimeException)
{
OBoundControl::disposing(_rSource);
}
-
-//------------------------------------------------------------------------------
void OFormattedControl::keyPressed(const ::com::sun::star::awt::KeyEvent& e) throw ( ::com::sun::star::uno::RuntimeException)
{
if( e.KeyCode != KEY_RETURN || e.Modifiers != 0 )
return;
-
// Steht das Control in einem Formular mit einer Submit-URL?
Reference<com::sun::star::beans::XPropertySet> xSet(getModel(), UNO_QUERY);
if( !xSet.is() )
return;
-
Reference<XFormComponent> xFComp(xSet, UNO_QUERY);
InterfaceRef xParent = xFComp->getParent();
if( !xParent.is() )
return;
-
Reference<com::sun::star::beans::XPropertySet> xFormSet(xParent, UNO_QUERY);
if( !xFormSet.is() )
return;
-
Any aTmp(xFormSet->getPropertyValue( PROPERTY_TARGET_URL ));
if (!isA(aTmp, static_cast< OUString* >(NULL)) ||
getString(aTmp).isEmpty() )
return;
-
Reference<XIndexAccess> xElements(xParent, UNO_QUERY);
sal_Int32 nCount = xElements->getCount();
if( nCount > 1 )
{
-
Reference<com::sun::star::beans::XPropertySet> xFCSet;
for( sal_Int32 nIndex=0; nIndex < nCount; nIndex++ )
{
// Any aElement(xElements->getByIndex(nIndex));
xElements->getByIndex(nIndex) >>= xFCSet;
-
if (hasProperty(PROPERTY_CLASSID, xFCSet) &&
getINT16(xFCSet->getPropertyValue(PROPERTY_CLASSID)) == FormComponentType::TEXTFIELD)
{
@@ -288,7 +229,6 @@ void OFormattedControl::keyPressed(const ::com::sun::star::awt::KeyEvent& e) thr
}
}
}
-
// Da wir noch im Haender stehen, submit asynchron ausloesen
if( m_nKeyEvent )
Application::RemoveUserEvent( m_nKeyEvent );
@@ -296,16 +236,13 @@ void OFormattedControl::keyPressed(const ::com::sun::star::awt::KeyEvent& e) thr
OnKeyPressed) );
}
-//------------------------------------------------------------------------------
void OFormattedControl::keyReleased(const ::com::sun::star::awt::KeyEvent& /*e*/) throw ( ::com::sun::star::uno::RuntimeException)
{
}
-//------------------------------------------------------------------------------
IMPL_LINK(OFormattedControl, OnKeyPressed, void*, /*EMPTYARG*/)
{
m_nKeyEvent = 0;
-
Reference<XFormComponent> xFComp(getModel(), UNO_QUERY);
InterfaceRef xParent = xFComp->getParent();
Reference<XSubmit> xSubmit(xParent, UNO_QUERY);
@@ -314,25 +251,20 @@ IMPL_LINK(OFormattedControl, OnKeyPressed, void*, /*EMPTYARG*/)
return 0L;
}
-//------------------------------------------------------------------------------
StringSequence OFormattedControl::getSupportedServiceNames() throw()
{
StringSequence aSupported = OBoundControl::getSupportedServiceNames();
aSupported.realloc(aSupported.getLength() + 1);
-
OUString*pArray = aSupported.getArray();
pArray[aSupported.getLength()-1] = FRM_SUN_CONTROL_FORMATTEDFIELD;
return aSupported;
}
-//------------------------------------------------------------------------------
void OFormattedControl::setDesignMode(sal_Bool bOn) throw ( ::com::sun::star::uno::RuntimeException)
{
OBoundControl::setDesignMode(bOn);
}
-/*************************************************************************/
-//------------------------------------------------------------------
void OFormattedModel::implConstruct()
{
// members
@@ -342,48 +274,36 @@ void OFormattedModel::implConstruct()
m_nKeyType = NumberFormat::UNDEFINED;
m_aNullDate = DBTypeConversion::getStandardDate();
m_nFieldType = DataType::OTHER;
-
// default our formats supplier
increment(m_refCount);
setPropertyToDefaultByHandle(PROPERTY_ID_FORMATSSUPPLIER);
decrement(m_refCount);
-
startAggregatePropertyListening( PROPERTY_FORMATKEY );
startAggregatePropertyListening( PROPERTY_FORMATSSUPPLIER );
}
-
-//------------------------------------------------------------------
OFormattedModel::OFormattedModel(const Reference<XComponentContext>& _rxFactory)
:OEditBaseModel(_rxFactory, VCL_CONTROLMODEL_FORMATTEDFIELD, FRM_SUN_CONTROL_FORMATTEDFIELD, sal_True, sal_True )
// use the old control name for compytibility reasons
,OErrorBroadcaster( OComponentHelper::rBHelper )
{
-
implConstruct();
-
m_nClassId = FormComponentType::TEXTFIELD;
initValueProperty( PROPERTY_EFFECTIVE_VALUE, PROPERTY_ID_EFFECTIVE_VALUE );
}
-
-//------------------------------------------------------------------
OFormattedModel::OFormattedModel( const OFormattedModel* _pOriginal, const Reference< XComponentContext >& _rxFactory )
:OEditBaseModel( _pOriginal, _rxFactory )
,OErrorBroadcaster( OComponentHelper::rBHelper )
{
-
implConstruct();
}
-//------------------------------------------------------------------------------
OFormattedModel::~OFormattedModel()
{
}
// XCloneable
-//------------------------------------------------------------------------------
IMPLEMENT_DEFAULT_CLONING( OFormattedModel )
-//------------------------------------------------------------------------------
void SAL_CALL OFormattedModel::disposing()
{
OErrorBroadcaster::disposing();
@@ -391,31 +311,24 @@ void SAL_CALL OFormattedModel::disposing()
}
// XServiceInfo
-//------------------------------------------------------------------------------
StringSequence OFormattedModel::getSupportedServiceNames() throw()
{
StringSequence aSupported = OEditBaseModel::getSupportedServiceNames();
-
sal_Int32 nOldLen = aSupported.getLength();
aSupported.realloc( nOldLen + 8 );
OUString* pStoreTo = aSupported.getArray() + nOldLen;
-
*pStoreTo++ = BINDABLE_CONTROL_MODEL;
*pStoreTo++ = DATA_AWARE_CONTROL_MODEL;
*pStoreTo++ = VALIDATABLE_CONTROL_MODEL;
-
*pStoreTo++ = BINDABLE_DATA_AWARE_CONTROL_MODEL;
*pStoreTo++ = VALIDATABLE_BINDABLE_CONTROL_MODEL;
-
*pStoreTo++ = FRM_SUN_COMPONENT_FORMATTEDFIELD;
*pStoreTo++ = FRM_SUN_COMPONENT_DATABASE_FORMATTEDFIELD;
*pStoreTo++ = BINDABLE_DATABASE_FORMATTED_FIELD;
-
return aSupported;
}
// XAggregation
-//------------------------------------------------------------------------------
Any SAL_CALL OFormattedModel::queryAggregation(const Type& _rType) throw(RuntimeException)
{
Any aReturn = OEditBaseModel::queryAggregation( _rType );
@@ -423,7 +336,6 @@ Any SAL_CALL OFormattedModel::queryAggregation(const Type& _rType) throw(Runtime
}
// XTypeProvider
-//------------------------------------------------------------------------------
Sequence< Type > OFormattedModel::_getTypes()
{
return ::comphelper::concatSequences(
@@ -433,14 +345,12 @@ Sequence< Type > OFormattedModel::_getTypes()
}
// XPersistObject
-//------------------------------------------------------------------------------
OUString SAL_CALL OFormattedModel::getServiceName() throw ( ::com::sun::star::uno::RuntimeException)
{
return OUString(FRM_COMPONENT_EDIT);
}
// XPropertySet
-//------------------------------------------------------------------------------
void OFormattedModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 3, OEditBaseModel )
@@ -450,11 +360,9 @@ void OFormattedModel::describeFixedProperties( Sequence< Property >& _rProps ) c
END_DESCRIBE_PROPERTIES();
}
-//------------------------------------------------------------------------------
void OFormattedModel::describeAggregateProperties( Sequence< Property >& _rAggregateProps ) const
{
OEditBaseModel::describeAggregateProperties( _rAggregateProps );
-
// TreatAsNumeric nicht transient : wir wollen es an der UI anbinden (ist noetig, um dem EffectiveDefault
// - der kann Text oder Zahl sein - einen Sinn zu geben)
ModifyPropertyAttributes(_rAggregateProps, PROPERTY_TREATASNUMERIC, 0, PropertyAttribute::TRANSIENT);
@@ -462,33 +370,28 @@ void OFormattedModel::describeAggregateProperties( Sequence< Property >& _rAggre
// (though the paragraph above for the TreatAsNumeric does not hold anymore - we do not have an UI for this.
// But we have for the format key ...)
ModifyPropertyAttributes(_rAggregateProps, PROPERTY_FORMATKEY, 0, PropertyAttribute::TRANSIENT);
-
RemoveProperty(_rAggregateProps, PROPERTY_STRICTFORMAT);
// no strict format property for formatted fields: it does not make sense, 'cause
// there is no general way to decide which characters/sub strings are allowed during the input of an
// arbitraryly formatted control
}
-//------------------------------------------------------------------------------
void OFormattedModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle) const
{
OEditBaseModel::getFastPropertyValue(rValue, nHandle);
}
-//------------------------------------------------------------------------------
void OFormattedModel::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const Any& rValue) throw ( ::com::sun::star::uno::Exception)
{
OEditBaseModel::setFastPropertyValue_NoBroadcast(nHandle, rValue);
}
-//------------------------------------------------------------------------------
sal_Bool OFormattedModel::convertFastPropertyValue(Any& rConvertedValue, Any& rOldValue, sal_Int32 nHandle, const Any& rValue)
throw( IllegalArgumentException )
{
return OEditBaseModel::convertFastPropertyValue(rConvertedValue, rOldValue, nHandle, rValue);
}
-//------------------------------------------------------------------------------
void OFormattedModel::setPropertyToDefaultByHandle(sal_Int32 nHandle)
{
if (nHandle == PROPERTY_ID_FORMATSSUPPLIER)
@@ -502,19 +405,16 @@ void OFormattedModel::setPropertyToDefaultByHandle(sal_Int32 nHandle)
OEditBaseModel::setPropertyToDefaultByHandle(nHandle);
}
-//------------------------------------------------------------------------------
void OFormattedModel::setPropertyToDefault(const OUString& aPropertyName) throw( com::sun::star::beans::UnknownPropertyException, RuntimeException )
{
OPropertyArrayAggregationHelper& rPH = m_aPropertyBagHelper.getInfoHelper();
sal_Int32 nHandle = rPH.getHandleByName( aPropertyName );
-
if (nHandle == PROPERTY_ID_FORMATSSUPPLIER)
setPropertyToDefaultByHandle(PROPERTY_ID_FORMATSSUPPLIER);
else
OEditBaseModel::setPropertyToDefault(aPropertyName);
}
-//------------------------------------------------------------------------------
Any OFormattedModel::getPropertyDefaultByHandle( sal_Int32 nHandle ) const
{
if (nHandle == PROPERTY_ID_FORMATSSUPPLIER)
@@ -526,23 +426,19 @@ Any OFormattedModel::getPropertyDefaultByHandle( sal_Int32 nHandle ) const
return OEditBaseModel::getPropertyDefaultByHandle(nHandle);
}
-//------------------------------------------------------------------------------
Any SAL_CALL OFormattedModel::getPropertyDefault( const OUString& aPropertyName ) throw( com::sun::star::beans::UnknownPropertyException, RuntimeException )
{
OPropertyArrayAggregationHelper& rPH = m_aPropertyBagHelper.getInfoHelper();
sal_Int32 nHandle = rPH.getHandleByName( aPropertyName );
-
if (nHandle == PROPERTY_ID_FORMATSSUPPLIER)
return getPropertyDefaultByHandle(PROPERTY_ID_FORMATSSUPPLIER);
else
return OEditBaseModel::getPropertyDefault(aPropertyName);
}
-//------------------------------------------------------------------------------
void OFormattedModel::_propertyChanged( const com::sun::star::beans::PropertyChangeEvent& evt ) throw(RuntimeException)
{
// TODO: check how this works with external bindings
-
OSL_ENSURE( evt.Source == m_xAggregateSet, "OFormattedModel::_propertyChanged: where did this come from?" );
if ( evt.Source == m_xAggregateSet )
{
@@ -554,17 +450,14 @@ void OFormattedModel::_propertyChanged( const com::sun::star::beans::PropertyCha
try
{
::osl::MutexGuard aGuard( m_aMutex );
-
Reference<XNumberFormatsSupplier> xSupplier( calcFormatsSupplier() );
m_nKeyType = getNumberFormatType(xSupplier->getNumberFormats(), getINT32( evt.NewValue ) );
-
// as m_aSaveValue (which is used by commitControlValueToDbColumn) is format dependent we have
// to recalc it, which is done by translateDbColumnToControlValue
if ( m_xColumn.is() && m_xAggregateFastSet.is() && !m_xCursor->isBeforeFirst() && !m_xCursor->isAfterLast())
{
setControlValue( translateDbColumnToControlValue(), eOther );
}
-
// if we're connected to an external value binding, then re-calculate the type
// used to exchange the value - it depends on the format, too
if ( hasExternalValueBinding() )
@@ -578,18 +471,15 @@ void OFormattedModel::_propertyChanged( const com::sun::star::beans::PropertyCha
}
return;
}
-
if ( evt.PropertyName.equals( PROPERTY_FORMATSSUPPLIER ) )
{
updateFormatterNullDate();
return;
}
-
OBoundControlModel::_propertyChanged( evt );
}
}
-//------------------------------------------------------------------------------
void OFormattedModel::updateFormatterNullDate()
{
// calc the current NULL date
@@ -598,29 +488,23 @@ void OFormattedModel::updateFormatterNullDate()
xSupplier->getNumberFormatSettings()->getPropertyValue("NullDate") >>= m_aNullDate;
}
-//------------------------------------------------------------------------------
Reference< XNumberFormatsSupplier > OFormattedModel::calcFormatsSupplier() const
{
Reference<XNumberFormatsSupplier> xSupplier;
-
DBG_ASSERT(m_xAggregateSet.is(), "OFormattedModel::calcFormatsSupplier : have no aggregate !");
// hat mein aggregiertes Model einen FormatSupplier ?
if( m_xAggregateSet.is() )
m_xAggregateSet->getPropertyValue(PROPERTY_FORMATSSUPPLIER) >>= xSupplier;
-
if (!xSupplier.is())
// check if my parent form has a supplier
xSupplier = calcFormFormatsSupplier();
-
if (!xSupplier.is())
xSupplier = calcDefaultFormatsSupplier();
-
DBG_ASSERT(xSupplier.is(), "OFormattedModel::calcFormatsSupplier : no supplier !");
// jetzt sollte aber einer da sein
return xSupplier;
}
-//------------------------------------------------------------------------------
Reference<XNumberFormatsSupplier> OFormattedModel::calcFormFormatsSupplier() const
{
Reference<XChild> xMe;
@@ -628,7 +512,6 @@ Reference<XNumberFormatsSupplier> OFormattedModel::calcFormFormatsSupplier() co
// damit stellen wir sicher, dass wir auch fuer den Fall der Aggregation das richtige
// Objekt bekommen
DBG_ASSERT(xMe.is(), "OFormattedModel::calcFormFormatsSupplier : I should have a content interface !");
-
// jetzt durchhangeln nach oben, bis wir auf eine starform treffen (angefangen mit meinem eigenen Parent)
Reference<XChild> xParent(xMe->getParent(), UNO_QUERY);
Reference<XForm> xNextParentForm(xParent, UNO_QUERY);
@@ -637,13 +520,11 @@ Reference<XNumberFormatsSupplier> OFormattedModel::calcFormFormatsSupplier() co
xParent = xParent.query( xParent->getParent() );
xNextParentForm = xNextParentForm.query( xParent );
}
-
if (!xNextParentForm.is())
{
OSL_FAIL("OFormattedModel::calcFormFormatsSupplier : have no ancestor which is a form !");
return NULL;
}
-
// den FormatSupplier von meinem Vorfahren (falls der einen hat)
Reference< XRowSet > xRowSet( xNextParentForm, UNO_QUERY );
Reference< XNumberFormatsSupplier > xSupplier;
@@ -652,14 +533,12 @@ Reference<XNumberFormatsSupplier> OFormattedModel::calcFormFormatsSupplier() co
return xSupplier;
}
-//------------------------------------------------------------------------------
Reference< XNumberFormatsSupplier > OFormattedModel::calcDefaultFormatsSupplier() const
{
return StandardFormatsSupplier::get( getContext() );
}
// XBoundComponent
-//------------------------------------------------------------------------------
void OFormattedModel::loaded(const EventObject& rEvent) throw ( ::com::sun::star::uno::RuntimeException)
{
// HACK : our onConnectedDbColumn accesses our NumberFormatter which locks the solar mutex (as it doesn't have
@@ -670,31 +549,25 @@ void OFormattedModel::loaded(const EventObject& rEvent) throw ( ::com::sun::star
// property requests and one for our own code. This would need a lot of code rewriting
// alternative b): The NumberFormatter has to be really threadsafe (with an own mutex), which is
// the only "clean" solution for me.
-
SolarMutexGuard aGuard;
OEditBaseModel::loaded(rEvent);
}
-//------------------------------------------------------------------------------
void OFormattedModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm )
{
m_xOriginalFormatter = NULL;
-
// get some properties of the field
m_nFieldType = DataType::OTHER;
Reference<XPropertySet> xField = getField();
if ( xField.is() )
xField->getPropertyValue( PROPERTY_FIELDTYPE ) >>= m_nFieldType;
-
sal_Int32 nFormatKey = 0;
-
DBG_ASSERT(m_xAggregateSet.is(), "OFormattedModel::onConnectedDbColumn : have no aggregate !");
if (m_xAggregateSet.is())
{ // all the following doesn't make any sense if we have no aggregate ...
Any aSupplier = m_xAggregateSet->getPropertyValue(PROPERTY_FORMATSSUPPLIER);
DBG_ASSERT( aSupplier.hasValue(), "OFormattedModel::onConnectedDbColumn : invalid property value !" );
// das sollte im Constructor oder im read auf was richtiges gesetzt worden sein
-
Any aFmtKey = m_xAggregateSet->getPropertyValue(PROPERTY_FORMATKEY);
if ( !(aFmtKey >>= nFormatKey ) )
{ // nobody gave us a format to use. So we examine the field we're bound to for a
@@ -705,13 +578,11 @@ void OFormattedModel::onConnectedDbColumn( const Reference< XInterface >& _rxFor
aFmtKey = xField->getPropertyValue(PROPERTY_FORMATKEY);
xField->getPropertyValue(PROPERTY_FIELDTYPE) >>= nType ;
}
-
Reference<XNumberFormatsSupplier> xSupplier = calcFormFormatsSupplier();
DBG_ASSERT(xSupplier.is(), "OFormattedModel::onConnectedDbColumn : bound to a field but no parent with a formatter ? how this ?");
if (xSupplier.is())
{
m_bOriginalNumeric = getBOOL(getPropertyValue(PROPERTY_TREATASNUMERIC));
-
if (!aFmtKey.hasValue())
{ // we aren't bound to a field (or this field's format is invalid)
// -> determine the standard text (or numeric) format of the supplier
@@ -719,18 +590,15 @@ void OFormattedModel::onConnectedDbColumn( const Reference< XInterface >& _rxFor
if (xTypes.is())
{
Locale aApplicationLocale = Application::GetSettings().GetUILanguageTag().getLocale();
-
if (m_bOriginalNumeric)
aFmtKey <<= (sal_Int32)xTypes->getStandardFormat(NumberFormat::NUMBER, aApplicationLocale);
else
aFmtKey <<= (sal_Int32)xTypes->getStandardFormat(NumberFormat::TEXT, aApplicationLocale);
}
}
-
aSupplier >>= m_xOriginalFormatter;
m_xAggregateSet->setPropertyValue(PROPERTY_FORMATSSUPPLIER, makeAny(xSupplier));
m_xAggregateSet->setPropertyValue(PROPERTY_FORMATKEY, aFmtKey);
-
// das Numeric-Flag an mein gebundenes Feld anpassen
if (xField.is())
{
@@ -757,23 +625,18 @@ void OFormattedModel::onConnectedDbColumn( const Reference< XInterface >& _rxFor
}
else
m_bNumeric = m_bOriginalNumeric;
-
setPropertyValue(PROPERTY_TREATASNUMERIC, makeAny((sal_Bool)m_bNumeric));
-
OSL_VERIFY( aFmtKey >>= nFormatKey );
}
}
}
-
Reference<XNumberFormatsSupplier> xSupplier = calcFormatsSupplier();
m_bNumeric = getBOOL( getPropertyValue( PROPERTY_TREATASNUMERIC ) );
m_nKeyType = getNumberFormatType( xSupplier->getNumberFormats(), nFormatKey );
xSupplier->getNumberFormatSettings()->getPropertyValue("NullDate") >>= m_aNullDate;
-
OEditBaseModel::onConnectedDbColumn( _rxForm );
}
-//------------------------------------------------------------------------------
void OFormattedModel::onDisconnectedDbColumn()
{
OEditBaseModel::onDisconnectedDbColumn();
@@ -784,23 +647,18 @@ void OFormattedModel::onDisconnectedDbColumn()
setPropertyValue(PROPERTY_TREATASNUMERIC, makeAny((sal_Bool)m_bOriginalNumeric));
m_xOriginalFormatter = NULL;
}
-
m_nFieldType = DataType::OTHER;
m_nKeyType = NumberFormat::UNDEFINED;
m_aNullDate = DBTypeConversion::getStandardDate();
}
-//------------------------------------------------------------------------------
void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
{
OEditBaseModel::write(_rxOutStream);
_rxOutStream->writeShort(0x0003);
-
DBG_ASSERT(m_xAggregateSet.is(), "OFormattedModel::write : have no aggregate !");
-
// mein Format (evtl. void) in ein persistentes Format bringen (der Supplier zusammen mit dem Key ist es zwar auch,
// aber deswegen muessen wir ja nicht gleich den ganzen Supplier speichern, das waere ein klein wenig Overhead ;)
-
Reference<XNumberFormatsSupplier> xSupplier;
Any aFmtKey;
sal_Bool bVoidKey = sal_True;
@@ -811,25 +669,19 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
{
OSL_VERIFY( aSupplier >>= xSupplier );
}
-
aFmtKey = m_xAggregateSet->getPropertyValue(PROPERTY_FORMATKEY);
bVoidKey = (!xSupplier.is() || !aFmtKey.hasValue()) || (isLoaded() && m_xOriginalFormatter.is());
// (kein Fomatter und/oder Key) oder (loaded und faked Formatter)
}
-
_rxOutStream->writeBoolean(!bVoidKey);
if (!bVoidKey)
{
// aus dem FormatKey und dem Formatter persistente Angaben basteln
-
Any aKey = m_xAggregateSet->getPropertyValue(PROPERTY_FORMATKEY);
sal_Int32 nKey = aKey.hasValue() ? getINT32(aKey) : 0;
-
Reference<XNumberFormats> xFormats = xSupplier->getNumberFormats();
-
OUString sFormatDescription;
LanguageType eFormatLanguage = LANGUAGE_DONTKNOW;
-
static const OUString s_aLocaleProp ("Locale");
Reference<com::sun::star::beans::XPropertySet> xFormat = xFormats->getByKey(nKey);
if (hasProperty(s_aLocaleProp, xFormat))
@@ -842,37 +694,29 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
eFormatLanguage = LanguageTag::convertToLanguageType( *pLocale, false);
}
}
-
static const OUString s_aFormatStringProp ("FormatString");
if (hasProperty(s_aFormatStringProp, xFormat))
xFormat->getPropertyValue(s_aFormatStringProp) >>= sFormatDescription;
-
_rxOutStream->writeUTF(sFormatDescription);
_rxOutStream->writeLong((sal_Int32)eFormatLanguage);
}
-
// version 2 : write the properties common to all OEditBaseModels
writeCommonEditProperties(_rxOutStream);
-
// version 3 : write the effective value property of the aggregate
// Due to a bug within the UnoControlFormattedFieldModel implementation (our default aggregate) this props value isn't correctly read
// and this can't be corrected without being incompatible.
// so we have our own handling.
-
// and to be a little bit more compatible we make the following section skippable
{
OStreamSection aDownCompat(_rxOutStream);
-
// a sub version within the skippable block
_rxOutStream->writeShort(0x0000);
-
// version 0: the effective value of the aggregate
Any aEffectiveValue;
if (m_xAggregateSet.is())
{
try { aEffectiveValue = m_xAggregateSet->getPropertyValue(PROPERTY_EFFECTIVE_VALUE); } catch(const Exception&) { }
}
-
{
OStreamSection aDownCompat2(_rxOutStream);
switch (aEffectiveValue.getValueType().getTypeClass())
@@ -894,12 +738,10 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
}
}
-//------------------------------------------------------------------------------
void OFormattedModel::read(const Reference<XObjectInputStream>& _rxInStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
{
OEditBaseModel::read(_rxInStream);
sal_uInt16 nVersion = _rxInStream->readShort();
-
Reference<XNumberFormatsSupplier> xSupplier;
sal_Int32 nKey = -1;
switch (nVersion)
@@ -911,36 +753,30 @@ void OFormattedModel::read(const Reference<XObjectInputStream>& _rxInStream) thr
sal_Bool bNonVoidKey = _rxInStream->readBoolean();
if (bNonVoidKey)
{
- // den String und die Language lesen ....
+ // read string and language...
OUString sFormatDescription = _rxInStream->readUTF();
LanguageType eDescriptionLanguage = (LanguageType)_rxInStream->readLong();
-
- // und daraus von einem Formatter zu einem Key zusammenwuerfeln lassen ...
+ // and let a formatter roll dice based on that to create a key...
xSupplier = calcFormatsSupplier();
- // calcFormatsSupplier nimmt erst den vom Model, dann einen von der starform, dann einen ganz neuen ....
+ // calcFormatsSupplier first takes the one from the model, then one from the starform, then a new one...
Reference<XNumberFormats> xFormats = xSupplier->getNumberFormats();
-
if (xFormats.is())
{
Locale aDescriptionLanguage( LanguageTag::convertToLocale(eDescriptionLanguage));
-
nKey = xFormats->queryKey(sFormatDescription, aDescriptionLanguage, sal_False);
if (nKey == (sal_Int32)-1)
- { // noch nicht vorhanden in meinem Formatter ...
+ { // does not yet exist in my formatter...
nKey = xFormats->addNew(sFormatDescription, aDescriptionLanguage);
}
}
}
if ((nVersion == 0x0002) || (nVersion == 0x0003))
readCommonEditProperties(_rxInStream);
-
if (nVersion == 0x0003)
{ // since version 3 there is a "skippable" block at this position
OStreamSection aDownCompat(_rxInStream);
-
sal_Int16 nSubVersion = _rxInStream->readShort();
(void)nSubVersion;
-
// version 0 and higher : the "effective value" property
Any aEffectiveValue;
{
@@ -959,7 +795,6 @@ void OFormattedModel::read(const Reference<XObjectInputStream>& _rxInStream) thr
OSL_FAIL("FmXFormattedModel::read : unknown effective value type !");
}
}
-
// this property is only to be set if we have no control source : in all other cases the base class did a
// reset after it's read and this set the effective value to a default value
if ( m_xAggregateSet.is() && getControlSource().isEmpty() )
@@ -977,11 +812,10 @@ void OFormattedModel::read(const Reference<XObjectInputStream>& _rxInStream) thr
break;
default :
OSL_FAIL("OFormattedModel::read : unknown version !");
- // dann bleibt das Format des aggregierten Sets, wie es bei der Erzeugung ist : void
+ // then the format of the aggregated set stay like it was during creation: void
defaultCommonEditProperties();
break;
}
-
if ((nKey != -1) && m_xAggregateSet.is())
{
m_xAggregateSet->setPropertyValue(PROPERTY_FORMATSSUPPLIER, makeAny(xSupplier));
@@ -994,20 +828,18 @@ void OFormattedModel::read(const Reference<XObjectInputStream>& _rxInStream) thr
}
}
-//------------------------------------------------------------------------------
sal_uInt16 OFormattedModel::getPersistenceFlags() const
{
return (OEditBaseModel::getPersistenceFlags() & ~PF_HANDLE_COMMON_PROPS);
// a) we do our own call to writeCommonEditProperties
}
-//------------------------------------------------------------------------------
sal_Bool OFormattedModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
{
Any aControlValue( m_xAggregateFastSet->getFastPropertyValue( getValuePropertyAggHandle() ) );
if ( aControlValue != m_aSaveValue )
{
- // Leerstring + EmptyIsNull = void
+ // empty string + EmptyIsNull = void
if ( !aControlValue.hasValue()
|| ( ( aControlValue.getValueType().getTypeClass() == TypeClass_STRING )
&& getString( aControlValue ).isEmpty()
@@ -1040,14 +872,12 @@ sal_Bool OFormattedModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
return sal_True;
}
-//------------------------------------------------------------------------------
void OFormattedModel::onConnectedExternalValue( )
{
OEditBaseModel::onConnectedExternalValue();
updateFormatterNullDate();
}
-//------------------------------------------------------------------------------
Any OFormattedModel::translateExternalValueToControlValue( const Any& _rExternalValue ) const
{
Any aControlValue;
@@ -1055,11 +885,9 @@ Any OFormattedModel::translateExternalValueToControlValue( const Any& _rExternal
{
case TypeClass_VOID:
break;
-
case TypeClass_STRING:
aControlValue = _rExternalValue;
break;
-
case TypeClass_BOOLEAN:
{
sal_Bool bExternalValue = sal_False;
@@ -1067,7 +895,6 @@ Any OFormattedModel::translateExternalValueToControlValue( const Any& _rExternal
aControlValue <<= (double)( bExternalValue ? 1 : 0 );
}
break;
-
default:
{
if ( _rExternalValue.getValueType().equals( ::getCppuType( static_cast< UNODate* >( NULL ) ) ) )
@@ -1098,22 +925,17 @@ Any OFormattedModel::translateExternalValueToControlValue( const Any& _rExternal
}
}
}
-
return aControlValue;
}
-//------------------------------------------------------------------------------
Any OFormattedModel::translateControlValueToExternalValue( ) const
{
OSL_PRECOND( hasExternalValueBinding(),
"OFormattedModel::translateControlValueToExternalValue: precondition not met!" );
-
Any aControlValue( getControlValue() );
if ( !aControlValue.hasValue() )
return aControlValue;
-
Any aExternalValue;
-
// translate into the external value type
Type aExternalValueType( getExternalValueType() );
switch ( aExternalValueType.getTypeClass() )
@@ -1128,7 +950,6 @@ Any OFormattedModel::translateControlValueToExternalValue( ) const
}
}
// NO break here!
-
case TypeClass_BOOLEAN:
{
double fValue = 0;
@@ -1139,7 +960,6 @@ Any OFormattedModel::translateControlValueToExternalValue( ) const
aExternalValue <<= (sal_Bool)( fValue ? sal_True : sal_False );
}
break;
-
default:
{
double fValue = 0;
@@ -1147,7 +967,6 @@ Any OFormattedModel::translateControlValueToExternalValue( ) const
// if this asserts ... well, the somebody set the TreatAsNumeric property to false,
// and the control value is a string. This implies some weird misconfiguration
// of the FormattedModel, so we won't care for it for the moment.
-
if ( aExternalValueType.equals( ::getCppuType( static_cast< UNODate* >( NULL ) ) ) )
{
aExternalValue <<= DBTypeConversion::toDate( fValue, m_aNullDate );
@@ -1172,26 +991,21 @@ Any OFormattedModel::translateControlValueToExternalValue( ) const
return aExternalValue;
}
-//------------------------------------------------------------------------------
Any OFormattedModel::translateDbColumnToControlValue()
{
if ( m_bNumeric )
m_aSaveValue <<= DBTypeConversion::getValue( m_xColumn, m_aNullDate ); // #100056# OJ
else
m_aSaveValue <<= m_xColumn->getString();
-
if ( m_xColumn->wasNull() )
m_aSaveValue.clear();
-
return m_aSaveValue;
}
-// -----------------------------------------------------------------------------
Sequence< Type > OFormattedModel::getSupportedBindingTypes()
{
::std::list< Type > aTypes;
aTypes.push_back( ::getCppuType( static_cast< double* >( NULL ) ) );
-
switch ( m_nKeyType & ~NumberFormat::DEFINED )
{
case NumberFormat::DATE:
@@ -1210,27 +1024,21 @@ Sequence< Type > OFormattedModel::getSupportedBindingTypes()
aTypes.push_front(::getCppuType( static_cast< sal_Bool* >( NULL ) ) );
break;
}
-
Sequence< Type > aTypesRet( aTypes.size() );
::std::copy( aTypes.begin(), aTypes.end(), aTypesRet.getArray() );
return aTypesRet;
}
-//------------------------------------------------------------------------------
Any OFormattedModel::getDefaultForReset() const
{
return m_xAggregateSet->getPropertyValue( PROPERTY_EFFECTIVE_DEFAULT );
}
-//------------------------------------------------------------------------------
void OFormattedModel::resetNoBroadcast()
{
OEditBaseModel::resetNoBroadcast();
m_aSaveValue.clear();
}
-
-//.........................................................................
}
-//.........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/forms/source/component/FormattedField.hxx b/forms/source/component/FormattedField.hxx
index 1ea82f6989bb..eb274242cf46 100644
--- a/forms/source/component/FormattedField.hxx
+++ b/forms/source/component/FormattedField.hxx
@@ -26,20 +26,16 @@
#include <cppuhelper/implbase1.hxx>
#include "errorbroadcaster.hxx"
-//.........................................................................
namespace frm
{
-
- //==================================================================
- //= OFormattedModel
- //==================================================================
-
- class OFormattedModel
+class OFormattedModel
:public OEditBaseModel
,public OErrorBroadcaster
{
- // das Original, falls ich die Format-Properties meines aggregierten Models gefaket, d.h. von dem Feld, an das
- // ich gebunden bin, weitergereicht habe (nur gueltig wenn loaded)
+ // the original, in case I faked the format properties of my aggregated model,
+ // i.e. I just passed on the attributes of the field to which I am bound
+ // (only valid if loaded)
+
::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier> m_xOriginalFormatter;
::com::sun::star::util::Date m_aNullDate;
::com::sun::star::uno::Any m_aSaveValue;
@@ -47,7 +43,7 @@ namespace frm
sal_Int32 m_nFieldType;
sal_Int16 m_nKeyType;
sal_Bool m_bOriginalNumeric : 1,
- m_bNumeric : 1; // analog fuer TreatAsNumeric-Property
+ m_bNumeric : 1; // analogous for the TreatAsNumeric-property
protected:
::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier> calcDefaultFormatsSupplier() const;
@@ -59,38 +55,38 @@ namespace frm
friend class OFormattedFieldWrapper;
protected:
- // XInterface
+ // XInterface
DECLARE_UNO3_AGG_DEFAULTS( OFormattedModel, OEditBaseModel );
- // XTypeProvider
+ // XTypeProvider
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes();
- // XAggregation
+ // XAggregation
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation(const ::com::sun::star::uno::Type& _rType) throw(::com::sun::star::uno::RuntimeException);
- // OComponentHelper
+ // OComponentHelper
virtual void SAL_CALL disposing();
- // XServiceInfo
+ // XServiceInfo
IMPLEMENTATION_NAME(OFormattedModel);
virtual StringSequence SAL_CALL getSupportedServiceNames() throw();
- // XPersistObject
+ // XPersistObject
virtual void SAL_CALL write(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectOutputStream>& _rxOutStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL read(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectInputStream>& _rxInStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
virtual OUString SAL_CALL getServiceName() throw ( ::com::sun::star::uno::RuntimeException);
- // XPropertySet
+ // XPropertySet
virtual void SAL_CALL getFastPropertyValue(::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const;
virtual sal_Bool SAL_CALL convertFastPropertyValue(::com::sun::star::uno::Any& rConvertedValue, ::com::sun::star::uno::Any& rOldValue,
sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue )
throw(::com::sun::star::lang::IllegalArgumentException);
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue) throw ( ::com::sun::star::uno::Exception);
- // XLoadListener
+ // XLoadListener
virtual void SAL_CALL loaded(const ::com::sun::star::lang::EventObject& rEvent) throw ( ::com::sun::star::uno::RuntimeException);
- // XPropertyState
+ // XPropertyState
void setPropertyToDefaultByHandle(sal_Int32 nHandle);
::com::sun::star::uno::Any getPropertyDefaultByHandle(sal_Int32 nHandle) const;
@@ -105,16 +101,16 @@ namespace frm
::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rAggregateProps
) const;
- // XPropertyChangeListener
+ // XPropertyChangeListener
virtual void _propertyChanged(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw(::com::sun::star::uno::RuntimeException);
- // prevent method hiding
+ // prevent method hiding
using OEditBaseModel::disposing;
using OEditBaseModel::getFastPropertyValue;
protected:
virtual sal_uInt16 getPersistenceFlags() const;
- // as we have an own version handling for persistence
+ // as we have an own version handling for persistence
// OBoundControlModel overridables
virtual ::com::sun::star::uno::Any
@@ -144,9 +140,7 @@ namespace frm
void updateFormatterNullDate();
};
- //==================================================================
- //= OFormattedControl
- //==================================================================
+ // OFormattedControl
typedef ::cppu::ImplHelper1< ::com::sun::star::awt::XKeyListener> OFormattedControl_BASE;
class OFormattedControl : public OBoundControl
,public OFormattedControl_BASE
@@ -162,31 +156,27 @@ namespace frm
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes();
- // ::com::sun::star::lang::XServiceInfo
+ // ::com::sun::star::lang::XServiceInfo
IMPLEMENTATION_NAME(OFormattedControl);
virtual StringSequence SAL_CALL getSupportedServiceNames() throw();
- // ::com::sun::star::lang::XEventListener
+ // ::com::sun::star::lang::XEventListener
virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& _rSource) throw(::com::sun::star::uno::RuntimeException);
- // ::com::sun::star::awt::XKeyListener
+ // ::com::sun::star::awt::XKeyListener
virtual void SAL_CALL keyPressed(const ::com::sun::star::awt::KeyEvent& e) throw ( ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL keyReleased(const ::com::sun::star::awt::KeyEvent& e) throw ( ::com::sun::star::uno::RuntimeException);
- // ::com::sun::star::awt::XControl
+ // ::com::sun::star::awt::XControl
virtual void SAL_CALL setDesignMode(sal_Bool bOn) throw ( ::com::sun::star::uno::RuntimeException);
- // disambiguation
+ // disambiguation
using OBoundControl::disposing;
private:
DECL_LINK( OnKeyPressed, void* );
};
-
-//.........................................................................
}
-//.........................................................................
-
#endif // INCLUDED_FORMS_SOURCE_COMPONENT_FORMATTEDFIELD_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/forms/source/component/FormsCollection.cxx b/forms/source/component/FormsCollection.cxx
index 624d3629b40d..d0c0ec648c6b 100644
--- a/forms/source/component/FormsCollection.cxx
+++ b/forms/source/component/FormsCollection.cxx
@@ -36,32 +36,32 @@ using namespace ::com::sun::star::form;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::util;
-//------------------------------------------------------------------
-//------------------------------------------------------------------
+
+
InterfaceRef SAL_CALL OFormsCollection_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new OFormsCollection( comphelper::getComponentContext(_rxFactory) ));
}
-//------------------------------------------------------------------------------
+
OUString SAL_CALL OFormsCollection::getServiceName() throw(RuntimeException)
{
return OUString("com.sun.star.form.Forms");
}
-//------------------------------------------------------------------------------
+
Sequence< sal_Int8 > SAL_CALL OFormsCollection::getImplementationId( ) throw(RuntimeException)
{
return OImplementationIds::getImplementationId(getTypes());
}
-//------------------------------------------------------------------------------
+
Sequence<Type> SAL_CALL OFormsCollection::getTypes() throw(RuntimeException)
{
return concatSequences(OInterfaceContainer::getTypes(), FormsCollectionComponentBase::getTypes(), OFormsCollection_BASE::getTypes());
}
-//------------------------------------------------------------------
+
OFormsCollection::OFormsCollection(const Reference<XComponentContext>& _rxFactory)
:FormsCollectionComponentBase( m_aMutex )
,OInterfaceContainer( _rxFactory, m_aMutex, cppu::UnoType<XForm>::get() )
@@ -69,7 +69,7 @@ OFormsCollection::OFormsCollection(const Reference<XComponentContext>& _rxFactor
{
}
-//------------------------------------------------------------------------------
+
OFormsCollection::OFormsCollection( const OFormsCollection& _cloneSource )
:FormsCollectionComponentBase( m_aMutex )
,OInterfaceContainer( m_aMutex, _cloneSource )
@@ -77,7 +77,7 @@ OFormsCollection::OFormsCollection( const OFormsCollection& _cloneSource )
{
}
-//------------------------------------------------------------------------------
+
OFormsCollection::~OFormsCollection()
{
if (!FormsCollectionComponentBase::rBHelper.bDisposed)
@@ -87,7 +87,7 @@ OFormsCollection::~OFormsCollection()
}
}
-//------------------------------------------------------------------------------
+
Any SAL_CALL OFormsCollection::queryAggregation(const Type& _rType) throw(RuntimeException)
{
Any aReturn = OFormsCollection_BASE::queryInterface(_rType);
@@ -133,7 +133,7 @@ Reference< XCloneable > SAL_CALL OFormsCollection::createClone( ) throw (Runtim
}
// OComponentHelper
-//------------------------------------------------------------------------------
+
void OFormsCollection::disposing()
{
{
@@ -145,14 +145,14 @@ void OFormsCollection::disposing()
}
//XChild
-//------------------------------------------------------------------------------
+
void OFormsCollection::setParent(const InterfaceRef& Parent) throw( NoSupportException, RuntimeException )
{
::osl::MutexGuard aGuard( m_aMutex );
m_xParent = Parent;
}
-//------------------------------------------------------------------------------
+
InterfaceRef OFormsCollection::getParent() throw( RuntimeException )
{
return m_xParent;
diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx
index c524b0118aab..746583ba30f6 100644
--- a/forms/source/component/Grid.cxx
+++ b/forms/source/component/Grid.cxx
@@ -16,20 +16,16 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
-
#include "Columns.hxx"
#include "findpos.hxx"
#include "Grid.hxx"
#include "property.hrc"
#include "property.hxx"
#include "services.hxx"
-
#include <com/sun/star/form/FormComponentType.hpp>
#include <com/sun/star/form/XForm.hpp>
#include <com/sun/star/form/XLoadable.hpp>
#include <com/sun/star/text/WritingMode2.hpp>
-
#include <comphelper/basicio.hxx>
#include <comphelper/container.hxx>
#include <comphelper/extract.hxx>
@@ -37,13 +33,9 @@
#include <cppuhelper/queryinterface.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/svapp.hxx>
-
using namespace ::com::sun::star::uno;
-
-//.........................................................................
namespace frm
{
-//.........................................................................
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::sdb;
@@ -57,9 +49,7 @@ using namespace ::com::sun::star::io;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::util;
using namespace ::com::sun::star::view;
-
namespace WritingMode2 = ::com::sun::star::text::WritingMode2;
-
const sal_uInt16 ROWHEIGHT = 0x0001;
const sal_uInt16 FONTTYPE = 0x0002;
const sal_uInt16 FONTSIZE = 0x0004;
@@ -69,14 +59,10 @@ const sal_uInt16 TEXTCOLOR = 0x0020;
const sal_uInt16 FONTDESCRIPTOR = 0x0040;
const sal_uInt16 RECORDMARKER = 0x0080;
const sal_uInt16 BACKGROUNDCOLOR = 0x0100;
-
-//------------------------------------------------------------------
InterfaceRef SAL_CALL OGridControlModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new OGridControlModel( comphelper::getComponentContext(_rxFactory) ));
}
-
-//------------------------------------------------------------------
OGridControlModel::OGridControlModel(const Reference<XComponentContext>& _rxFactory)
:OControlModel(_rxFactory, OUString())
,OInterfaceContainer(_rxFactory, m_aMutex, ::getCppuType(static_cast<Reference<XPropertySet>*>(NULL)))
@@ -97,11 +83,9 @@ OGridControlModel::OGridControlModel(const Reference<XComponentContext>& _rxFact
,m_bAlwaysShowCursor(sal_False)
,m_bDisplaySynchron(sal_True)
{
-
m_nClassId = FormComponentType::GRIDCONTROL;
}
-//------------------------------------------------------------------
OGridControlModel::OGridControlModel( const OGridControlModel* _pOriginal, const Reference< XComponentContext >& _rxFactory )
:OControlModel( _pOriginal, _rxFactory )
,OInterfaceContainer( _rxFactory, m_aMutex, ::getCppuType( static_cast<Reference<XPropertySet>*>( NULL ) ) )
@@ -111,7 +95,6 @@ OGridControlModel::OGridControlModel( const OGridControlModel* _pOriginal, const
,m_aResetListeners( m_aMutex )
,m_aRowSetChangeListeners( m_aMutex )
{
-
m_aDefaultControl = _pOriginal->m_aDefaultControl;
m_bEnable = _pOriginal->m_bEnable;
m_bEnableVisible = _pOriginal->m_bEnableVisible;
@@ -123,14 +106,11 @@ OGridControlModel::OGridControlModel( const OGridControlModel* _pOriginal, const
m_bPrintable = _pOriginal->m_bPrintable;
m_bAlwaysShowCursor = _pOriginal->m_bAlwaysShowCursor;
m_bDisplaySynchron = _pOriginal->m_bDisplaySynchron;
-
// clone the columns
cloneColumns( _pOriginal );
-
// TODO: clone the events?
}
-//------------------------------------------------------------------
OGridControlModel::~OGridControlModel()
{
if (!OComponentHelper::rBHelper.bDisposed)
@@ -138,11 +118,9 @@ OGridControlModel::~OGridControlModel()
acquire();
dispose();
}
-
}
// XCloneable
-//------------------------------------------------------------------------------
Reference< XCloneable > SAL_CALL OGridControlModel::createClone( ) throw (RuntimeException)
{
OGridControlModel* pClone = new OGridControlModel( this, getContext() );
@@ -155,13 +133,11 @@ Reference< XCloneable > SAL_CALL OGridControlModel::createClone( ) throw (Runtim
return static_cast< XCloneable* >( static_cast< OControlModel* >( pClone ) );
}
-//------------------------------------------------------------------------------
void OGridControlModel::cloneColumns( const OGridControlModel* _pOriginalContainer )
{
try
{
Reference< XCloneable > xColCloneable;
-
const OInterfaceArray::const_iterator pColumnStart = _pOriginalContainer->m_aItems.begin();
const OInterfaceArray::const_iterator pColumnEnd = _pOriginalContainer->m_aItems.end();
for ( OInterfaceArray::const_iterator pColumn = pColumnStart; pColumn != pColumnEnd; ++pColumn )
@@ -169,19 +145,16 @@ void OGridControlModel::cloneColumns( const OGridControlModel* _pOriginalContain
// ask the col for a factory for the clone
xColCloneable = xColCloneable.query( *pColumn );
DBG_ASSERT( xColCloneable.is(), "OGridControlModel::cloneColumns: column is not cloneable!" );
-
if ( xColCloneable.is() )
{
// create a clone of the column
Reference< XCloneable > xColClone( xColCloneable->createClone() );
DBG_ASSERT( xColClone.is(), "OGridControlModel::cloneColumns: invalid column clone!" );
-
if ( xColClone.is() )
{
// insert this clone into our own container
insertByIndex( pColumn - pColumnStart, xColClone->queryInterface( m_aElementType ) );
}
-
}
}
}
@@ -192,22 +165,17 @@ void OGridControlModel::cloneColumns( const OGridControlModel* _pOriginalContain
}
// XServiceInfo
-//------------------------------------------------------------------------------
StringSequence OGridControlModel::getSupportedServiceNames() throw(RuntimeException)
{
StringSequence aSupported = OControlModel::getSupportedServiceNames();
aSupported.realloc(aSupported.getLength() + 2);
-
aSupported[aSupported.getLength()-2] = "com.sun.star.awt.UnoControlModel";
aSupported[aSupported.getLength()-1] = FRM_SUN_COMPONENT_GRIDCONTROL;
return aSupported;
}
-
-//------------------------------------------------------------------------------
Any SAL_CALL OGridControlModel::queryAggregation( const Type& _rType ) throw (RuntimeException)
{
Any aReturn = OGridControlModel_BASE::queryInterface(_rType);
-
if ( !aReturn.hasValue() )
{
aReturn = OControlModel::queryAggregation( _rType );
@@ -222,7 +190,6 @@ Any SAL_CALL OGridControlModel::queryAggregation( const Type& _rType ) throw (Ru
}
// XSQLErrorListener
-//------------------------------------------------------------------------------
void SAL_CALL OGridControlModel::errorOccured( const SQLErrorEvent& _rEvent ) throw (RuntimeException)
{
// forward the errors which happened to my columns to my own listeners
@@ -230,47 +197,38 @@ void SAL_CALL OGridControlModel::errorOccured( const SQLErrorEvent& _rEvent ) th
}
// XRowSetSupplier
-//------------------------------------------------------------------------------
Reference< XRowSet > SAL_CALL OGridControlModel::getRowSet( ) throw (RuntimeException)
{
return Reference< XRowSet >( getParent(), UNO_QUERY );
}
-//------------------------------------------------------------------------------
void SAL_CALL OGridControlModel::setRowSet( const Reference< XRowSet >& /*_rxDataSource*/ ) throw (RuntimeException)
{
OSL_FAIL( "OGridControlModel::setRowSet: not supported!" );
}
-//--------------------------------------------------------------------
void SAL_CALL OGridControlModel::addRowSetChangeListener( const Reference< XRowSetChangeListener >& i_Listener ) throw (RuntimeException)
{
if ( i_Listener.is() )
m_aRowSetChangeListeners.addInterface( i_Listener );
}
-//--------------------------------------------------------------------
void SAL_CALL OGridControlModel::removeRowSetChangeListener( const Reference< XRowSetChangeListener >& i_Listener ) throw (RuntimeException)
{
m_aRowSetChangeListeners.removeInterface( i_Listener );
}
// XChild
-//------------------------------------------------------------------------------
void SAL_CALL OGridControlModel::setParent( const InterfaceRef& i_Parent ) throw(NoSupportException, RuntimeException)
{
::osl::ClearableMutexGuard aGuard( m_aMutex );
if ( i_Parent == getParent() )
return;
-
OControlModel::setParent( i_Parent );
-
EventObject aEvent( *this );
aGuard.clear();
m_aRowSetChangeListeners.notifyEach( &XRowSetChangeListener::onRowSetChanged, aEvent );
}
-
-//------------------------------------------------------------------------------
Sequence< Type > SAL_CALL OGridControlModel::getTypes( ) throw(RuntimeException)
{
return concatSequences(
@@ -284,15 +242,12 @@ Sequence< Type > SAL_CALL OGridControlModel::getTypes( ) throw(RuntimeException
}
// OComponentHelper
-//------------------------------------------------------------------------------
void OGridControlModel::disposing()
{
OControlModel::disposing();
OErrorBroadcaster::disposing();
OInterfaceContainer::disposing();
-
setParent(NULL);
-
EventObject aEvt(static_cast<XWeak*>(this));
m_aSelectListeners.disposeAndClear(aEvt);
m_aResetListeners.disposeAndClear(aEvt);
@@ -300,7 +255,6 @@ void OGridControlModel::disposing()
}
// XEventListener
-//------------------------------------------------------------------------------
void OGridControlModel::disposing(const EventObject& _rEvent) throw( RuntimeException )
{
OControlModel::disposing( _rEvent );
@@ -308,18 +262,15 @@ void OGridControlModel::disposing(const EventObject& _rEvent) throw( RuntimeExce
}
// XSelectionSupplier
-//-----------------------------------------------------------------------------
sal_Bool SAL_CALL OGridControlModel::select(const Any& rElement) throw(IllegalArgumentException, RuntimeException)
{
::osl::ClearableMutexGuard aGuard( m_aMutex );
-
Reference<XPropertySet> xSel;
if (rElement.hasValue() && !::cppu::extractInterface(xSel, rElement))
{
throw IllegalArgumentException();
}
InterfaceRef xMe = static_cast<XWeak*>(this);
-
if (xSel.is())
{
Reference<XChild> xAsChild(xSel, UNO_QUERY);
@@ -328,7 +279,6 @@ sal_Bool SAL_CALL OGridControlModel::select(const Any& rElement) throw(IllegalAr
throw IllegalArgumentException();
}
}
-
if ( xSel != m_xSelection )
{
m_xSelection = xSel;
@@ -338,35 +288,28 @@ sal_Bool SAL_CALL OGridControlModel::select(const Any& rElement) throw(IllegalAr
}
return sal_False;
}
-
-//-----------------------------------------------------------------------------
Any SAL_CALL OGridControlModel::getSelection() throw(RuntimeException)
{
return makeAny(m_xSelection);
}
-//-----------------------------------------------------------------------------
void OGridControlModel::addSelectionChangeListener(const Reference< XSelectionChangeListener >& _rxListener) throw( RuntimeException )
{
m_aSelectListeners.addInterface(_rxListener);
}
-//-----------------------------------------------------------------------------
void OGridControlModel::removeSelectionChangeListener(const Reference< XSelectionChangeListener >& _rxListener) throw( RuntimeException )
{
m_aSelectListeners.removeInterface(_rxListener);
}
// XGridColumnFactory
-//------------------------------------------------------------------------------
Reference<XPropertySet> SAL_CALL OGridControlModel::createColumn(const OUString& ColumnType) throw ( :: com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
{
SolarMutexGuard g;
const Sequence< OUString >& rColumnTypes = frm::getColumnTypes();
return createColumn( ::detail::findPos( ColumnType, rColumnTypes ) );
}
-
-//------------------------------------------------------------------------------
Reference<XPropertySet> OGridControlModel::createColumn(sal_Int32 nTypeId) const
{
Reference<XPropertySet> xReturn;
@@ -388,15 +331,12 @@ Reference<XPropertySet> OGridControlModel::createColumn(sal_Int32 nTypeId) cons
}
return xReturn;
}
-
-//------------------------------------------------------------------------------
StringSequence SAL_CALL OGridControlModel::getColumnTypes() throw ( ::com::sun::star::uno::RuntimeException)
{
return frm::getColumnTypes();
}
// XReset
-//-----------------------------------------------------------------------------
void SAL_CALL OGridControlModel::reset() throw ( ::com::sun::star::uno::RuntimeException)
{
::cppu::OInterfaceIteratorHelper aIter(m_aResetListeners);
@@ -404,27 +344,20 @@ void SAL_CALL OGridControlModel::reset() throw ( ::com::sun::star::uno::RuntimeE
sal_Bool bContinue = sal_True;
while (aIter.hasMoreElements() && bContinue)
bContinue =((XResetListener*)aIter.next())->approveReset(aEvt);
-
if (bContinue)
{
_reset();
m_aResetListeners.notifyEach( &XResetListener::resetted, aEvt );
}
}
-
-//-----------------------------------------------------------------------------
void SAL_CALL OGridControlModel::addResetListener(const Reference<XResetListener>& _rxListener) throw ( ::com::sun::star::uno::RuntimeException)
{
m_aResetListeners.addInterface(_rxListener);
}
-
-//-----------------------------------------------------------------------------
void SAL_CALL OGridControlModel::removeResetListener(const Reference<XResetListener>& _rxListener) throw ( ::com::sun::star::uno::RuntimeException)
{
m_aResetListeners.removeInterface(_rxListener);
}
-
-//-----------------------------------------------------------------------------
void OGridControlModel::_reset()
{
Reference<XReset> xReset;
@@ -438,7 +371,6 @@ void OGridControlModel::_reset()
}
// XPropertySet
-//------------------------------------------------------------------------------
void OGridControlModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_BASE_PROPERTIES( 37 )
@@ -481,8 +413,6 @@ void OGridControlModel::describeFixedProperties( Sequence< Property >& _rProps )
DECL_PROP3(CONTEXT_WRITING_MODE,sal_Int16, BOUND, MAYBEDEFAULT, TRANSIENT);
END_DESCRIBE_PROPERTIES();
}
-
-//------------------------------------------------------------------------------
void OGridControlModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle ) const
{
switch (nHandle)
@@ -541,7 +471,6 @@ void OGridControlModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle ) co
case PROPERTY_ID_ROWHEIGHT:
rValue = m_aRowHeight;
break;
-
default:
if ( isFontRelatedProperty( nHandle ) )
FontControlModel::getFastPropertyValue( rValue, nHandle );
@@ -549,8 +478,6 @@ void OGridControlModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle ) co
OControlModel::getFastPropertyValue( rValue, nHandle );
}
}
-
-//------------------------------------------------------------------------------
sal_Bool OGridControlModel::convertFastPropertyValue( Any& rConvertedValue, Any& rOldValue,
sal_Int32 nHandle, const Any& rValue )throw( IllegalArgumentException )
{
@@ -622,7 +549,6 @@ sal_Bool OGridControlModel::convertFastPropertyValue( Any& rConvertedValue, Any&
case PROPERTY_ID_ROWHEIGHT:
{
bModified = tryPropertyValue(rConvertedValue, rOldValue, rValue, m_aRowHeight, ::getCppuType((const sal_Int32*)NULL));
-
sal_Int32 nNewVal( 0 );
if ( ( rConvertedValue >>= nNewVal ) && ( nNewVal <= 0 ) )
{
@@ -639,8 +565,6 @@ sal_Bool OGridControlModel::convertFastPropertyValue( Any& rConvertedValue, Any&
}
return bModified;
}
-
-//------------------------------------------------------------------------------
void OGridControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue ) throw ( ::com::sun::star::uno::Exception)
{
switch (nHandle)
@@ -699,7 +623,6 @@ void OGridControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, con
case PROPERTY_ID_ROWHEIGHT:
m_aRowHeight = rValue;
break;
-
default:
if ( isFontRelatedProperty( nHandle ) )
{
@@ -710,12 +633,9 @@ void OGridControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, con
else
OControlModel::setFastPropertyValue_NoBroadcast( nHandle, rValue );
}
-
}
//XPropertyState
-
-//------------------------------------------------------------------------------
Any OGridControlModel::getPropertyDefaultByHandle( sal_Int32 nHandle ) const
{
Any aReturn;
@@ -725,11 +645,9 @@ Any OGridControlModel::getPropertyDefaultByHandle( sal_Int32 nHandle ) const
case PROPERTY_ID_WRITING_MODE:
aReturn <<= WritingMode2::CONTEXT;
break;
-
case PROPERTY_ID_DEFAULTCONTROL:
aReturn <<= OUString( STARDIV_ONE_FORM_CONTROL_GRID );
break;
-
case PROPERTY_ID_PRINTABLE:
case PROPERTY_ID_HASNAVIGATION:
case PROPERTY_ID_RECORDMARKER:
@@ -738,20 +656,16 @@ Any OGridControlModel::getPropertyDefaultByHandle( sal_Int32 nHandle ) const
case PROPERTY_ID_ENABLEVISIBLE:
aReturn = makeBoolAny(true);
break;
-
case PROPERTY_ID_ALWAYSSHOWCURSOR:
aReturn = makeBoolAny(false);
break;
-
case PROPERTY_ID_HELPURL:
case PROPERTY_ID_HELPTEXT:
aReturn <<= OUString();
break;
-
case PROPERTY_ID_BORDER:
aReturn <<= (sal_Int16)1;
break;
-
case PROPERTY_ID_BORDERCOLOR:
case PROPERTY_ID_TABSTOP:
case PROPERTY_ID_BACKGROUNDCOLOR:
@@ -759,7 +673,6 @@ Any OGridControlModel::getPropertyDefaultByHandle( sal_Int32 nHandle ) const
case PROPERTY_ID_CURSORCOLOR:
// void
break;
-
default:
if ( isFontRelatedProperty( nHandle ) )
aReturn = FontControlModel::getPropertyDefaultByHandle( nHandle );
@@ -769,18 +682,15 @@ Any OGridControlModel::getPropertyDefaultByHandle( sal_Int32 nHandle ) const
return aReturn;
}
-//------------------------------------------------------------------------------
OGridColumn* OGridControlModel::getColumnImplementation(const InterfaceRef& _rxIFace) const
{
OGridColumn* pImplementation = NULL;
Reference< XUnoTunnel > xUnoTunnel( _rxIFace, UNO_QUERY );
if ( xUnoTunnel.is() )
pImplementation = reinterpret_cast<OGridColumn*>(xUnoTunnel->getSomething(OGridColumn::getUnoTunnelImplementationId()));
-
return pImplementation;
}
-//------------------------------------------------------------------------------
void OGridControlModel::gotColumn( const Reference< XInterface >& _rxColumn )
{
Reference< XSQLErrorBroadcaster > xBroadcaster( _rxColumn, UNO_QUERY );
@@ -788,7 +698,6 @@ void OGridControlModel::gotColumn( const Reference< XInterface >& _rxColumn )
xBroadcaster->addSQLErrorListener( this );
}
-//------------------------------------------------------------------------------
void OGridControlModel::lostColumn(const Reference< XInterface >& _rxColumn)
{
if ( m_xSelection == _rxColumn )
@@ -797,119 +706,95 @@ void OGridControlModel::lostColumn(const Reference< XInterface >& _rxColumn)
EventObject aEvt( static_cast< XWeak* >( this ) );
m_aSelectListeners.notifyEach( &XSelectionChangeListener::selectionChanged, aEvt );
}
-
Reference< XSQLErrorBroadcaster > xBroadcaster( _rxColumn, UNO_QUERY );
if ( xBroadcaster.is() )
xBroadcaster->removeSQLErrorListener( this );
}
-//------------------------------------------------------------------------------
void OGridControlModel::implRemoved(const InterfaceRef& _rxObject)
{
OInterfaceContainer::implRemoved(_rxObject);
lostColumn(_rxObject);
}
-//------------------------------------------------------------------------------
void OGridControlModel::implInserted( const ElementDescription* _pElement )
{
OInterfaceContainer::implInserted( _pElement );
gotColumn( _pElement->xInterface );
}
-//------------------------------------------------------------------------------
void OGridControlModel::impl_replacedElement( const ContainerEvent& _rEvent, ::osl::ClearableMutexGuard& _rInstanceLock )
{
Reference< XInterface > xOldColumn( _rEvent.ReplacedElement, UNO_QUERY );
Reference< XInterface > xNewColumn( _rEvent.Element, UNO_QUERY );
-
bool bNewSelection = ( xOldColumn == m_xSelection );
-
lostColumn( xOldColumn );
gotColumn( xNewColumn );
-
if ( bNewSelection )
m_xSelection.set( xNewColumn, UNO_QUERY );
-
OInterfaceContainer::impl_replacedElement( _rEvent, _rInstanceLock );
- // <<---- SYNCHRONIZED
-
+ // < SYNCHRONIZED
if ( bNewSelection )
{
m_aSelectListeners.notifyEach( &XSelectionChangeListener::selectionChanged, EventObject( *this ) );
}
}
-//------------------------------------------------------------------------------
ElementDescription* OGridControlModel::createElementMetaData( )
{
return new ColumnDescription;
}
-//------------------------------------------------------------------------------
void OGridControlModel::approveNewElement( const Reference< XPropertySet >& _rxObject, ElementDescription* _pElement )
{
OGridColumn* pCol = getColumnImplementation( _rxObject );
if ( !pCol )
throw IllegalArgumentException();
-
OInterfaceContainer::approveNewElement( _rxObject, _pElement );
-
// if we're here, the object passed all tests
if ( _pElement )
static_cast< ColumnDescription* >( _pElement )->pColumn = pCol;
}
// XPersistObject
-//------------------------------------------------------------------------------
OUString SAL_CALL OGridControlModel::getServiceName() throw ( ::com::sun::star::uno::RuntimeException)
{
- return OUString(FRM_COMPONENT_GRID); // old (non-sun) name for compatibility !
+ return OUString(FRM_COMPONENT_GRID); // old (non-sun) name for compatibility!
}
-//------------------------------------------------------------------------------
void OGridControlModel::write(const Reference<XObjectOutputStream>& _rxOutStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
{
OControlModel::write(_rxOutStream);
-
Reference<XMarkableStream> xMark(_rxOutStream, UNO_QUERY);
-
// 1. Version
_rxOutStream->writeShort(0x0008);
-
// 2. Columns
sal_Int32 nLen = getCount();
_rxOutStream->writeLong(nLen);
OGridColumn* pCol;
for (sal_Int32 i = 0; i < nLen; i++)
{
- // zuerst den Servicenamen fuer das darunterliegende Model
+ // first the service name for the unerlying model
pCol = getColumnImplementation(m_aItems[i]);
DBG_ASSERT(pCol != NULL, "OGridControlModel::write : such items should never reach it into my container !");
-
_rxOutStream << pCol->getModelName();
-
- // dann das Object selbst
+ // then the object itself
sal_Int32 nMark = xMark->createMark();
sal_Int32 nObjLen = 0;
_rxOutStream->writeLong(nObjLen);
-
- // schreiben der Col
+ // writing the column
pCol->write(_rxOutStream);
-
- // feststellen der Laenge
+ // determining the length
nObjLen = xMark->offsetToMark(nMark) - 4;
xMark->jumpToMark(nMark);
_rxOutStream->writeLong(nObjLen);
xMark->jumpToFurthest();
xMark->deleteMark(nMark);
}
-
// 3. Events
writeEvents(_rxOutStream);
-
- // 4. Attribute
- // Maskierung fuer alle any Typen
+ // 4. Attributes
+ // Masking for all 'any' types
sal_uInt16 nAnyMask = 0;
if (m_aRowHeight.getValueType().getTypeClass() == TypeClass_LONG)
nAnyMask |= ROWHEIGHT;
@@ -923,12 +808,9 @@ void OGridControlModel::write(const Reference<XObjectOutputStream>& _rxOutStream
nAnyMask |= BACKGROUNDCOLOR;
if (!m_bRecordMarker)
nAnyMask |= RECORDMARKER;
-
_rxOutStream->writeShort(nAnyMask);
-
if (nAnyMask & ROWHEIGHT)
_rxOutStream->writeLong(getINT32(m_aRowHeight));
-
// old structures
const FontDescriptor& aFont = getFont();
if ( nAnyMask & FONTDESCRIPTOR )
@@ -941,12 +823,10 @@ void OGridControlModel::write(const Reference<XObjectOutputStream>& _rxOutStream
_rxOutStream->writeShort( sal_Int16(aFont.Orientation * 10) );
_rxOutStream->writeBoolean( aFont.Kerning );
_rxOutStream->writeBoolean( aFont.WordLineMode );
-
// Size
_rxOutStream->writeLong( aFont.Width );
_rxOutStream->writeLong( aFont.Height );
_rxOutStream->writeShort( sal::static_int_cast< sal_Int16 >( VCLUnoHelper::ConvertFontWidth( aFont.CharacterWidth ) ) );
-
// Type
_rxOutStream->writeUTF( aFont.Name );
_rxOutStream->writeUTF( aFont.StyleName );
@@ -954,59 +834,43 @@ void OGridControlModel::write(const Reference<XObjectOutputStream>& _rxOutStream
_rxOutStream->writeShort( aFont.CharSet );
_rxOutStream->writeShort( aFont.Pitch );
}
-
_rxOutStream << m_aDefaultControl;
-
_rxOutStream->writeShort(m_nBorder);
_rxOutStream->writeBoolean(m_bEnable);
-
if (nAnyMask & TABSTOP)
_rxOutStream->writeBoolean(getBOOL(m_aTabStop));
-
_rxOutStream->writeBoolean(m_bNavigation);
-
if (nAnyMask & TEXTCOLOR)
_rxOutStream->writeLong( getTextColor() );
-
- // neu ab Version 6
+ // new since version 6
_rxOutStream << m_sHelpText;
-
if (nAnyMask & FONTDESCRIPTOR)
_rxOutStream << getFont();
-
if (nAnyMask & RECORDMARKER)
_rxOutStream->writeBoolean(m_bRecordMarker);
-
- // neu ab Version 7
+ // new since version 7
_rxOutStream->writeBoolean(m_bPrintable);
-
- // new since 8
+ // new since version 8
if (nAnyMask & BACKGROUNDCOLOR)
_rxOutStream->writeLong(getINT32(m_aBackgroundColor));
}
-//------------------------------------------------------------------------------
void OGridControlModel::read(const Reference<XObjectInputStream>& _rxInStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
{
SolarMutexGuard g;
OControlModel::read(_rxInStream);
-
Reference<XMarkableStream> xMark(_rxInStream, UNO_QUERY);
-
- // 1. Version
+ // 1. version
sal_Int16 nVersion = _rxInStream->readShort();
-
- // 2. Einlesen der Spalten
+ // 2. reading the columns
sal_Int32 nLen = _rxInStream->readLong();
if (nLen)
{
for (sal_Int32 i = 0; i < nLen; i++)
{
- // Lesen des Modelnamen
-
+ // reading the model names
OUString sModelName;
_rxInStream >> sModelName;
-
Reference<XPropertySet> xCol(createColumn(getColumnTypeByModelName(sModelName)));
DBG_ASSERT(xCol.is(), "OGridControlModel::read : unknown column type !");
sal_Int32 nObjLen = _rxInStream->readLong();
@@ -1022,15 +886,13 @@ void OGridControlModel::read(const Reference<XObjectInputStream>& _rxInStream) t
_rxInStream->skipBytes(nObjLen);
xMark->deleteMark(nMark);
}
-
if ( xCol.is() )
implInsert( i, xCol, sal_False, NULL, sal_False );
}
}
-
- // In der Basisimplementierung werden die Events nur gelesen, Elemente im Container existieren
- // da aber vor TF_ONE fuer das GridControl immer Events geschrieben wurden, muessen sie auch immer
- // mit gelesen werden
+ // In the base implementation events are only read, elements in the container exist
+ // but since before TF_ONE for the GridControl events were always written, so they
+ // need to be read, too
sal_Int32 nObjLen = _rxInStream->readLong();
if (nObjLen)
{
@@ -1042,8 +904,7 @@ void OGridControlModel::read(const Reference<XObjectInputStream>& _rxInStream) t
_rxInStream->skipBytes(nObjLen);
xMark->deleteMark(nMark);
}
-
- // Attachement lesen
+ // reading the attachement
for (sal_Int32 i = 0; i < nLen; i++)
{
InterfaceRef xIfc(m_aItems[i], UNO_QUERY);
@@ -1052,25 +913,20 @@ void OGridControlModel::read(const Reference<XObjectInputStream>& _rxInStream) t
aHelper <<= xSet;
m_xEventAttacher->attach( i, xIfc, aHelper );
}
-
- // 4. Einlesen der Attribute
+ // 4. reading the attributes
if (nVersion == 1)
return;
-
- // Maskierung fuer any
+ // Masking for any
sal_uInt16 nAnyMask = _rxInStream->readShort();
-
if (nAnyMask & ROWHEIGHT)
{
sal_Int32 nValue = _rxInStream->readLong();
m_aRowHeight <<= (sal_Int32)nValue;
}
-
FontDescriptor aFont( getFont() );
if ( nAnyMask & FONTATTRIBS )
{
aFont.Weight = (float)VCLUnoHelper::ConvertFontWeight( _rxInStream->readShort() );
-
aFont.Slant = (FontSlant)_rxInStream->readShort();
aFont.Underline = _rxInStream->readShort();
aFont.Strikeout = _rxInStream->readShort();
@@ -1092,56 +948,42 @@ void OGridControlModel::read(const Reference<XObjectInputStream>& _rxInStream) t
aFont.CharSet = _rxInStream->readShort();
aFont.Pitch = _rxInStream->readShort();
}
-
if ( nAnyMask & ( FONTATTRIBS | FONTSIZE | FONTTYPE ) )
setFont( aFont );
-
// Name
_rxInStream >> m_aDefaultControl;
m_nBorder = _rxInStream->readShort();
m_bEnable = _rxInStream->readBoolean();
-
if (nAnyMask & TABSTOP)
{
m_aTabStop = makeBoolAny(_rxInStream->readBoolean());
}
-
if (nVersion > 3)
m_bNavigation = _rxInStream->readBoolean();
-
if (nAnyMask & TEXTCOLOR)
{
sal_Int32 nValue = _rxInStream->readLong();
setTextColor( (sal_Int32)nValue );
}
-
- // neu ab Version 6
+ // new since version 6
if (nVersion > 5)
_rxInStream >> m_sHelpText;
-
if (nAnyMask & FONTDESCRIPTOR)
{
FontDescriptor aUNOFont;
_rxInStream >> aUNOFont;
setFont( aFont );
}
-
if (nAnyMask & RECORDMARKER)
m_bRecordMarker = _rxInStream->readBoolean();
-
- // neu ab Version 7
+ // new since version 7
if (nVersion > 6)
m_bPrintable = _rxInStream->readBoolean();
-
if (nAnyMask & BACKGROUNDCOLOR)
{
sal_Int32 nValue = _rxInStream->readLong();
m_aBackgroundColor <<= (sal_Int32)nValue;
}
}
-
-//.........................................................................
-} // namespace frm
-//.........................................................................
-
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/forms/source/component/GroupBox.cxx b/forms/source/component/GroupBox.cxx
index 1386de86fea7..e5afd4154c48 100644
--- a/forms/source/component/GroupBox.cxx
+++ b/forms/source/component/GroupBox.cxx
@@ -43,28 +43,28 @@ using namespace ::com::sun::star::util;
// OGroupBoxModel
//==================================================================
-//------------------------------------------------------------------
+
InterfaceRef SAL_CALL OGroupBoxModel_CreateInstance(const Reference<starlang::XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
{
return *(new OGroupBoxModel( comphelper::getComponentContext(_rxFactory) ));
}
-//------------------------------------------------------------------
-//------------------------------------------------------------------
+
+
OGroupBoxModel::OGroupBoxModel(const Reference<XComponentContext>& _rxFactory)
:OControlModel(_rxFactory, VCL_CONTROLMODEL_GROUPBOX, VCL_CONTROL_GROUPBOX)
{
m_nClassId = FormComponentType::GROUPBOX;
}
-//------------------------------------------------------------------
+
OGroupBoxModel::OGroupBoxModel( const OGroupBoxModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
:OControlModel( _pOriginal, _rxFactory )
{
}
// XServiceInfo
-//------------------------------------------------------------------------------
+
StringSequence SAL_CALL OGroupBoxModel::getSupportedServiceNames() throw(RuntimeException)
{
StringSequence aSupported = OControlModel::getSupportedServiceNames();
@@ -75,15 +75,15 @@ StringSequence SAL_CALL OGroupBoxModel::getSupportedServiceNames() throw(Runtime
return aSupported;
}
-//------------------------------------------------------------------
+
OGroupBoxModel::~OGroupBoxModel()
{
}
-//------------------------------------------------------------------------------
+
IMPLEMENT_DEFAULT_CLONING( OGroupBoxModel )
-//------------------------------------------------------------------------------
+
void OGroupBoxModel::describeAggregateProperties( Sequence< Property >& _rAggregateProps ) const
{
OControlModel::describeAggregateProperties( _rAggregateProps );
@@ -91,13 +91,13 @@ void OGroupBoxModel::describeAggregateProperties( Sequence< Property >& _rAggreg
RemoveProperty(_rAggregateProps, PROPERTY_TABSTOP);
}
-//------------------------------------------------------------------------------
+
OUString SAL_CALL OGroupBoxModel::getServiceName() throw(RuntimeException)
{
return OUString(FRM_COMPONENT_GROUPBOX); // old (non-sun) name for compatibility !
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OGroupBoxModel::write(const Reference< XObjectOutputStream>& _rxOutStream)
throw(IOException, RuntimeException)
{
@@ -108,7 +108,7 @@ void SAL_CALL OGroupBoxModel::write(const Reference< XObjectOutputStream>& _rxOu
writeHelpTextCompatibly(_rxOutStream);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OGroupBoxModel::read(const Reference< XObjectInputStream>& _rxInStream) throw(IOException, RuntimeException)
{
OControlModel::read( _rxInStream );
@@ -131,19 +131,19 @@ void SAL_CALL OGroupBoxModel::read(const Reference< XObjectInputStream>& _rxInSt
// OGroupBoxControl
//==================================================================
-//------------------------------------------------------------------
+
InterfaceRef SAL_CALL OGroupBoxControl_CreateInstance(const Reference<starlang::XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
{
return *(new OGroupBoxControl( comphelper::getComponentContext(_rxFactory) ));
}
-//------------------------------------------------------------------------------
+
OGroupBoxControl::OGroupBoxControl(const Reference<XComponentContext>& _rxFactory)
:OControl(_rxFactory, VCL_CONTROL_GROUPBOX)
{
}
-//------------------------------------------------------------------------------
+
StringSequence SAL_CALL OGroupBoxControl::getSupportedServiceNames() throw(RuntimeException)
{
StringSequence aSupported = OControl::getSupportedServiceNames();
diff --git a/forms/source/component/GroupManager.cxx b/forms/source/component/GroupManager.cxx
index af6b3c836dfa..7a90ed5804b8 100644
--- a/forms/source/component/GroupManager.cxx
+++ b/forms/source/component/GroupManager.cxx
@@ -29,11 +29,8 @@
#include <algorithm>
-//.........................................................................
namespace frm
{
-//.........................................................................
-
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::beans;
@@ -58,23 +55,18 @@ namespace
}
}
-//========================================================================
// class OGroupCompAcc
-//========================================================================
-//------------------------------------------------------------------
OGroupCompAcc::OGroupCompAcc(const Reference<XPropertySet>& rxElement, const OGroupComp& _rGroupComp )
:m_xComponent( rxElement )
,m_aGroupComp( _rGroupComp )
{
}
-//------------------------------------------------------------------
sal_Bool OGroupCompAcc::operator==( const OGroupCompAcc& rCompAcc ) const
{
return (m_xComponent == rCompAcc.GetComponent());
}
-//------------------------------------------------------------------
class OGroupCompAccLess : public ::std::binary_function<OGroupCompAcc, OGroupCompAcc, sal_Bool>
{
public:
@@ -86,18 +78,13 @@ public:
}
};
-//========================================================================
// class OGroupComp
-//========================================================================
-
-//------------------------------------------------------------------
OGroupComp::OGroupComp()
:m_nPos( -1 )
,m_nTabIndex( 0 )
{
}
-//------------------------------------------------------------------
OGroupComp::OGroupComp(const OGroupComp& _rSource)
:m_aName( _rSource.m_aName )
,m_xComponent( _rSource.m_xComponent )
@@ -107,7 +94,6 @@ OGroupComp::OGroupComp(const OGroupComp& _rSource)
{
}
-//------------------------------------------------------------------
OGroupComp::OGroupComp(const Reference<XPropertySet>& rxSet, sal_Int32 nInsertPos )
: m_aName( OGroupManager::GetGroupName( rxSet ) )
, m_xComponent( rxSet )
@@ -118,18 +104,16 @@ OGroupComp::OGroupComp(const Reference<XPropertySet>& rxSet, sal_Int32 nInsertPo
if (m_xComponent.is())
{
if (hasProperty( PROPERTY_TABINDEX, m_xComponent ) )
- // Indices kleiner 0 werden wie 0 behandelt
+ // Indices smaller than 0 are treated like 0
m_nTabIndex = std::max(getINT16(m_xComponent->getPropertyValue( PROPERTY_TABINDEX )) , sal_Int16(0));
}
}
-//------------------------------------------------------------------
sal_Bool OGroupComp::operator==( const OGroupComp& rComp ) const
{
return m_nTabIndex == rComp.GetTabIndex() && m_nPos == rComp.GetPos();
}
-//------------------------------------------------------------------
class OGroupCompLess : public ::std::binary_function<OGroupComp, OGroupComp, sal_Bool>
{
public:
@@ -147,23 +131,17 @@ public:
}
};
-//========================================================================
// class OGroup
-//========================================================================
-
-//------------------------------------------------------------------
OGroup::OGroup( const OUString& rGroupName )
:m_aGroupName( rGroupName )
,m_nInsertPos(0)
{
}
-//------------------------------------------------------------------
OGroup::~OGroup()
{
}
-//------------------------------------------------------------------
void OGroup::InsertComponent( const Reference<XPropertySet>& xSet )
{
OGroupComp aNewGroupComp( xSet, m_nInsertPos );
@@ -174,7 +152,6 @@ void OGroup::InsertComponent( const Reference<XPropertySet>& xSet )
m_nInsertPos++;
}
-//------------------------------------------------------------------
void OGroup::RemoveComponent( const Reference<XPropertySet>& rxElement )
{
sal_Int32 nGroupCompAccPos;
@@ -190,12 +167,12 @@ void OGroup::RemoveComponent( const Reference<XPropertySet>& rxElement )
m_aCompAccArray.erase( m_aCompAccArray.begin() + nGroupCompAccPos );
m_aCompArray.erase( m_aCompArray.begin() + nGroupCompPos );
- /*============================================================
+ /*
Durch das Entfernen der GroupComp ist die Einfuegeposition
ungueltig geworden. Sie braucht hier aber nicht angepasst werden,
da sie fortlaufend vergeben wird und damit immer
aufsteigend eindeutig ist.
- ============================================================*/
+ */
}
else
{
@@ -208,13 +185,11 @@ void OGroup::RemoveComponent( const Reference<XPropertySet>& rxElement )
}
}
-//------------------------------------------------------------------
sal_Bool OGroup::operator==( const OGroup& rGroup ) const
{
return m_aGroupName.equals(rGroup.GetGroupName());
}
-//------------------------------------------------------------------
class OGroupLess : public ::std::binary_function<OGroup, OGroup, sal_Bool>
{
public:
@@ -224,7 +199,6 @@ public:
}
};
-//------------------------------------------------------------------
Sequence< Reference<XControlModel> > OGroup::GetControlModels() const
{
sal_Int32 nLen = m_aCompArray.size();
@@ -240,7 +214,7 @@ Sequence< Reference<XControlModel> > OGroup::GetControlModels() const
}
DBG_NAME(OGroupManager);
-//------------------------------------------------------------------
+
OGroupManager::OGroupManager(const Reference< XContainer >& _rxContainer)
:m_pCompGroup( new OGroup( OUString("AllComponentGroup") ) )
,m_xContainer(_rxContainer)
@@ -254,16 +228,14 @@ OGroupManager::OGroupManager(const Reference< XContainer >& _rxContainer)
decrement(m_refCount);
}
-//------------------------------------------------------------------
OGroupManager::~OGroupManager()
{
DBG_DTOR(OGroupManager,NULL);
- // Alle Components und CompGroup loeschen
+ // delete all Components and CompGroup
delete m_pCompGroup;
}
// XPropertyChangeListener
-//------------------------------------------------------------------
void OGroupManager::disposing(const EventObject& evt) throw( RuntimeException )
{
Reference<XContainer> xContainer(evt.Source, UNO_QUERY);
@@ -271,23 +243,22 @@ void OGroupManager::disposing(const EventObject& evt) throw( RuntimeException )
{
DELETEZ(m_pCompGroup);
- ////////////////////////////////////////////////////////////////
- // Gruppen loeschen
+ // delete group
m_aGroupArr.clear();
m_xContainer.clear();
}
}
-// -----------------------------------------------------------------------------
+
void OGroupManager::removeFromGroupMap(const OUString& _sGroupName,const Reference<XPropertySet>& _xSet)
{
- // Component aus CompGroup entfernen
+ // remove Component from CompGroup
m_pCompGroup->RemoveComponent( _xSet );
OGroupArr::iterator aFind = m_aGroupArr.find(_sGroupName);
if ( aFind != m_aGroupArr.end() )
{
- // Gruppe vorhanden
+ // group exists
aFind->second.RemoveComponent( _xSet );
// Wenn Anzahl der Gruppenelemente == 1 ist, Gruppe deaktivieren
@@ -317,12 +288,12 @@ void OGroupManager::removeFromGroupMap(const OUString& _sGroupName,const Referen
if (hasProperty(PROPERTY_TABINDEX, _xSet))
_xSet->removePropertyChangeListener( PROPERTY_TABINDEX, this );
}
-//------------------------------------------------------------------
+
void SAL_CALL OGroupManager::propertyChange(const PropertyChangeEvent& evt) throw ( ::com::sun::star::uno::RuntimeException)
{
Reference<XPropertySet> xSet(evt.Source, UNO_QUERY);
- // Component aus Gruppe entfernen
+ // remove Component from group
OUString sGroupName;
if (hasProperty( PROPERTY_GROUP_NAME, xSet ))
xSet->getPropertyValue( PROPERTY_GROUP_NAME ) >>= sGroupName;
@@ -349,7 +320,6 @@ void SAL_CALL OGroupManager::propertyChange(const PropertyChangeEvent& evt) thro
}
// XContainerListener
-//------------------------------------------------------------------
void SAL_CALL OGroupManager::elementInserted(const ContainerEvent& Event) throw ( ::com::sun::star::uno::RuntimeException)
{
Reference< XPropertySet > xProps;
@@ -358,7 +328,6 @@ void SAL_CALL OGroupManager::elementInserted(const ContainerEvent& Event) throw
InsertElement( xProps );
}
-//------------------------------------------------------------------
void SAL_CALL OGroupManager::elementRemoved(const ContainerEvent& Event) throw ( ::com::sun::star::uno::RuntimeException)
{
Reference<XPropertySet> xProps;
@@ -367,7 +336,6 @@ void SAL_CALL OGroupManager::elementRemoved(const ContainerEvent& Event) throw (
RemoveElement( xProps );
}
-//------------------------------------------------------------------
void SAL_CALL OGroupManager::elementReplaced(const ContainerEvent& Event) throw ( ::com::sun::star::uno::RuntimeException)
{
Reference<XPropertySet> xProps;
@@ -382,19 +350,16 @@ void SAL_CALL OGroupManager::elementReplaced(const ContainerEvent& Event) throw
}
// Other functions
-//------------------------------------------------------------------
Sequence<Reference<XControlModel> > OGroupManager::getControlModels()
{
return m_pCompGroup->GetControlModels();
}
-//------------------------------------------------------------------
sal_Int32 OGroupManager::getGroupCount()
{
return m_aActiveGroupMap.size();
}
-//------------------------------------------------------------------
void OGroupManager::getGroup(sal_Int32 nGroup, Sequence< Reference<XControlModel> >& _rGroup, OUString& _rName)
{
OSL_ENSURE(nGroup >= 0 && (size_t)nGroup < m_aActiveGroupMap.size(),"OGroupManager::getGroup: Invalid group index!");
@@ -403,7 +368,6 @@ void OGroupManager::getGroup(sal_Int32 nGroup, Sequence< Reference<XControlModel
_rGroup = aGroupPos->second.GetControlModels();
}
-//------------------------------------------------------------------
void OGroupManager::getGroupByName(const OUString& _rName, Sequence< Reference<XControlModel> >& _rGroup)
{
OGroupArr::iterator aFind = m_aGroupArr.find(_rName);
@@ -411,7 +375,6 @@ void OGroupManager::getGroupByName(const OUString& _rName, Sequence< Reference<X
_rGroup = aFind->second.GetControlModels();
}
-//------------------------------------------------------------------
void OGroupManager::InsertElement( const Reference<XPropertySet>& xSet )
{
// Nur ControlModels
@@ -458,7 +421,6 @@ void OGroupManager::InsertElement( const Reference<XPropertySet>& xSet )
m_aActiveGroupMap.push_back( aFind );
}
-
// Bei Component als PropertyChangeListener anmelden
xSet->addPropertyChangeListener( PROPERTY_NAME, this );
if (hasProperty(PROPERTY_GROUP_NAME, xSet))
@@ -467,10 +429,8 @@ void OGroupManager::InsertElement( const Reference<XPropertySet>& xSet )
// Tabindex muss nicht jeder unterstuetzen
if (hasProperty(PROPERTY_TABINDEX, xSet))
xSet->addPropertyChangeListener( PROPERTY_TABINDEX, this );
-
}
-//------------------------------------------------------------------
void OGroupManager::RemoveElement( const Reference<XPropertySet>& xSet )
{
// Nur ControlModels
@@ -498,9 +458,6 @@ OUString OGroupManager::GetGroupName( ::com::sun::star::uno::Reference< ::com::s
xComponent->getPropertyValue( PROPERTY_NAME ) >>= sGroupName;
return sGroupName;
}
-
-//.........................................................................
} // namespace frm
-//.........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/forms/source/component/Hidden.cxx b/forms/source/component/Hidden.cxx
index b084030c6608..31d506ee057c 100644
--- a/forms/source/component/Hidden.cxx
+++ b/forms/source/component/Hidden.cxx
@@ -40,36 +40,36 @@ using namespace ::com::sun::star::io;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::util;
-//------------------------------------------------------------------
+
InterfaceRef SAL_CALL OHiddenModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
{
return *(new OHiddenModel( comphelper::getComponentContext(_rxFactory) ));
}
-//------------------------------------------------------------------
-//------------------------------------------------------------------
+
+
OHiddenModel::OHiddenModel(const Reference<XComponentContext>& _rxFactory)
:OControlModel(_rxFactory, OUString())
{
m_nClassId = FormComponentType::HIDDENCONTROL;
}
-//------------------------------------------------------------------
+
OHiddenModel::OHiddenModel( const OHiddenModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
:OControlModel( _pOriginal, _rxFactory )
{
m_sHiddenValue = _pOriginal->m_sHiddenValue;
}
-//------------------------------------------------------------------------------
+
OHiddenModel::~OHiddenModel( )
{
}
-//------------------------------------------------------------------------------
+
IMPLEMENT_DEFAULT_CLONING( OHiddenModel )
-//------------------------------------------------------------------------------
+
void OHiddenModel::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle) const
{
switch (_nHandle)
@@ -80,7 +80,7 @@ void OHiddenModel::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle) const
}
}
-//------------------------------------------------------------------------------
+
void OHiddenModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const Any& _rValue) throw (com::sun::star::uno::Exception)
{
switch (_nHandle)
@@ -94,7 +94,7 @@ void OHiddenModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const An
}
}
-//------------------------------------------------------------------------------
+
sal_Bool OHiddenModel::convertFastPropertyValue(
Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue)
throw (IllegalArgumentException)
@@ -112,7 +112,7 @@ sal_Bool OHiddenModel::convertFastPropertyValue(
return bModified;
}
-//------------------------------------------------------------------------------
+
void OHiddenModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_BASE_PROPERTIES(4)
@@ -124,7 +124,7 @@ void OHiddenModel::describeFixedProperties( Sequence< Property >& _rProps ) cons
}
// XServiceInfo
-//------------------------------------------------------------------------------
+
StringSequence SAL_CALL OHiddenModel::getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException)
{
StringSequence aSupported( 2 );
@@ -133,13 +133,13 @@ StringSequence SAL_CALL OHiddenModel::getSupportedServiceNames() throw(::com::su
return aSupported;
}
-//------------------------------------------------------------------------------
+
OUString SAL_CALL OHiddenModel::getServiceName() throw(RuntimeException)
{
return OUString(FRM_COMPONENT_HIDDEN); // old (non-sun) name for compatibility !
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OHiddenModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
throw(IOException, RuntimeException)
{
@@ -152,7 +152,7 @@ void SAL_CALL OHiddenModel::write(const Reference<XObjectOutputStream>& _rxOutSt
OControlModel::write(_rxOutStream);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OHiddenModel::read(const Reference<XObjectInputStream>& _rxInStream) throw(IOException, RuntimeException)
{
// Version
diff --git a/forms/source/component/ImageButton.cxx b/forms/source/component/ImageButton.cxx
index 944df88ce4ce..3c60460c7e71 100644
--- a/forms/source/component/ImageButton.cxx
+++ b/forms/source/component/ImageButton.cxx
@@ -26,10 +26,8 @@
#include <comphelper/processfactory.hxx>
#include <com/sun/star/awt/MouseButton.hpp>
-//.........................................................................
namespace frm
{
-//.........................................................................
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::sdb;
@@ -42,16 +40,12 @@ using namespace ::com::sun::star::io;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::util;
-//==================================================================
-//= OImageButtonModel
-//==================================================================
-//------------------------------------------------------------------
+// OImageButtonModel
InterfaceRef SAL_CALL OImageButtonModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new OImageButtonModel( comphelper::getComponentContext(_rxFactory) ));
}
-//------------------------------------------------------------------
OImageButtonModel::OImageButtonModel(const Reference<XComponentContext>& _rxFactory)
:OClickableImageBaseModel( _rxFactory, VCL_CONTROLMODEL_IMAGEBUTTON, FRM_SUN_CONTROL_IMAGEBUTTON )
// use the old control name for compytibility reasons
@@ -59,23 +53,19 @@ OImageButtonModel::OImageButtonModel(const Reference<XComponentContext>& _rxFact
m_nClassId = FormComponentType::IMAGEBUTTON;
}
-//------------------------------------------------------------------
OImageButtonModel::OImageButtonModel( const OImageButtonModel* _pOriginal, const Reference<XComponentContext>& _rxFactory)
:OClickableImageBaseModel( _pOriginal, _rxFactory )
{
implInitializeImageURL();
}
-//------------------------------------------------------------------------------
IMPLEMENT_DEFAULT_CLONING( OImageButtonModel )
-//------------------------------------------------------------------------------
OImageButtonModel::~OImageButtonModel()
{
}
// XServiceInfo
-//------------------------------------------------------------------------------
StringSequence OImageButtonModel::getSupportedServiceNames() throw()
{
StringSequence aSupported = OClickableImageBaseModel::getSupportedServiceNames();
@@ -86,7 +76,6 @@ StringSequence OImageButtonModel::getSupportedServiceNames() throw()
return aSupported;
}
-//------------------------------------------------------------------------------
void OImageButtonModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 5, OClickableImageBaseModel )
@@ -98,13 +87,11 @@ void OImageButtonModel::describeFixedProperties( Sequence< Property >& _rProps )
END_DESCRIBE_PROPERTIES();
}
-//------------------------------------------------------------------------------
OUString OImageButtonModel::getServiceName() throw ( ::com::sun::star::uno::RuntimeException)
{
return OUString(FRM_COMPONENT_IMAGEBUTTON); // old (non-sun) name for compatibility !
}
-//------------------------------------------------------------------------------
void OImageButtonModel::write(const Reference<XObjectOutputStream>& _rxOutStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
{
OControlModel::write(_rxOutStream);
@@ -119,7 +106,6 @@ void OImageButtonModel::write(const Reference<XObjectOutputStream>& _rxOutStream
writeHelpTextCompatibly(_rxOutStream);
}
-//------------------------------------------------------------------------------
void OImageButtonModel::read(const Reference<XObjectInputStream>& _rxInStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
{
OControlModel::read(_rxInStream);
@@ -159,16 +145,12 @@ void OImageButtonModel::read(const Reference<XObjectInputStream>& _rxInStream) t
}
}
-//==================================================================
// OImageButtonControl
-//==================================================================
-//------------------------------------------------------------------
InterfaceRef SAL_CALL OImageButtonControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new OImageButtonControl( comphelper::getComponentContext(_rxFactory) ));
}
-//------------------------------------------------------------------------------
Sequence<Type> OImageButtonControl::_getTypes()
{
static Sequence<Type> aTypes;
@@ -177,7 +159,6 @@ Sequence<Type> OImageButtonControl::_getTypes()
return aTypes;
}
-//------------------------------------------------------------------------------
StringSequence OImageButtonControl::getSupportedServiceNames() throw()
{
StringSequence aSupported = OClickableImageBaseControl::getSupportedServiceNames();
@@ -188,7 +169,6 @@ StringSequence OImageButtonControl::getSupportedServiceNames() throw()
return aSupported;
}
-//------------------------------------------------------------------------------
OImageButtonControl::OImageButtonControl(const Reference<XComponentContext>& _rxFactory)
:OClickableImageBaseControl(_rxFactory, VCL_CONTROL_IMAGEBUTTON)
{
@@ -204,7 +184,6 @@ OImageButtonControl::OImageButtonControl(const Reference<XComponentContext>& _rx
}
// UNO Anbindung
-//------------------------------------------------------------------------------
Any SAL_CALL OImageButtonControl::queryAggregation(const Type& _rType) throw (RuntimeException)
{
Any aReturn = OClickableImageBaseControl::queryAggregation(_rType);
@@ -214,7 +193,6 @@ Any SAL_CALL OImageButtonControl::queryAggregation(const Type& _rType) throw (Ru
return aReturn;
}
-//------------------------------------------------------------------------------
void OImageButtonControl::mousePressed(const awt::MouseEvent& e) throw ( ::com::sun::star::uno::RuntimeException)
{
SolarMutexGuard aSolarGuard;
@@ -238,24 +216,18 @@ void OImageButtonControl::mousePressed(const awt::MouseEvent& e) throw ( ::com::
}
}
-//------------------------------------------------------------------------------
void SAL_CALL OImageButtonControl::mouseReleased(const awt::MouseEvent& /*e*/) throw ( RuntimeException)
{
}
-//------------------------------------------------------------------------------
void SAL_CALL OImageButtonControl::mouseEntered(const awt::MouseEvent& /*e*/) throw ( RuntimeException)
{
}
-//------------------------------------------------------------------------------
void SAL_CALL OImageButtonControl::mouseExited(const awt::MouseEvent& /*e*/) throw ( RuntimeException)
{
}
-
-//.........................................................................
} // namespace frm
-//.........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index c959ab9c7dd6..c7519a8881c6 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -122,13 +122,13 @@ namespace
// OImageControlModel
//==============================================================================
-//------------------------------------------------------------------------------
+
InterfaceRef SAL_CALL OImageControlModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new OImageControlModel( comphelper::getComponentContext(_rxFactory) ));
}
-//------------------------------------------------------------------------------
+
Sequence<Type> OImageControlModel::_getTypes()
{
return concatSequences(
@@ -137,7 +137,7 @@ Sequence<Type> OImageControlModel::_getTypes()
);
}
-//------------------------------------------------------------------
+
OImageControlModel::OImageControlModel(const Reference<XComponentContext>& _rxFactory)
:OBoundControlModel( _rxFactory, VCL_CONTROLMODEL_IMAGECONTROL, FRM_SUN_CONTROL_IMAGECONTROL, sal_False, sal_False, sal_False )
// use the old control name for compytibility reasons
@@ -153,7 +153,7 @@ OImageControlModel::OImageControlModel(const Reference<XComponentContext>& _rxFa
implConstruct();
}
-//------------------------------------------------------------------
+
OImageControlModel::OImageControlModel( const OImageControlModel* _pOriginal, const Reference< XComponentContext >& _rxFactory )
:OBoundControlModel( _pOriginal, _rxFactory )
// use the old control name for compytibility reasons
@@ -174,7 +174,7 @@ OImageControlModel::OImageControlModel( const OImageControlModel* _pOriginal, co
osl_atomic_decrement( &m_refCount );
}
-//------------------------------------------------------------------
+
void OImageControlModel::implConstruct()
{
m_pImageProducer = new ImageProducer;
@@ -182,7 +182,7 @@ void OImageControlModel::implConstruct()
m_pImageProducer->SetDoneHdl( LINK( this, OImageControlModel, OnImageImportDone ) );
}
-//------------------------------------------------------------------
+
OImageControlModel::~OImageControlModel()
{
if (!OComponentHelper::rBHelper.bDisposed)
@@ -194,11 +194,11 @@ OImageControlModel::~OImageControlModel()
}
// XCloneable
-//------------------------------------------------------------------------------
+
IMPLEMENT_DEFAULT_CLONING( OImageControlModel )
// XServiceInfo
-//------------------------------------------------------------------------------
+
StringSequence OImageControlModel::getSupportedServiceNames() throw()
{
StringSequence aSupported = OBoundControlModel::getSupportedServiceNames();
@@ -209,7 +209,7 @@ StringSequence OImageControlModel::getSupportedServiceNames() throw()
return aSupported;
}
-//------------------------------------------------------------------------------
+
Any SAL_CALL OImageControlModel::queryAggregation(const Type& _rType) throw (RuntimeException)
{
// Order matters: we want to "override" the XImageProducer interface of the aggregate without
@@ -226,13 +226,13 @@ Any SAL_CALL OImageControlModel::queryAggregation(const Type& _rType) throw (Run
return aReturn;
}
-//------------------------------------------------------------------------------
+
sal_Bool OImageControlModel::approveDbColumnType( sal_Int32 _nColumnType )
{
return ImageStoreInvalid != lcl_getImageStoreType( _nColumnType );
}
-//------------------------------------------------------------------------------
+
void OImageControlModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle) const
{
switch (nHandle)
@@ -251,7 +251,7 @@ void OImageControlModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle) co
}
}
-//------------------------------------------------------------------------------
+
void OImageControlModel::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const Any& rValue) throw ( ::com::sun::star::uno::Exception)
{
switch (nHandle)
@@ -309,7 +309,7 @@ void OImageControlModel::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, con
}
}
-//------------------------------------------------------------------------------
+
sal_Bool OImageControlModel::convertFastPropertyValue(Any& rConvertedValue, Any& rOldValue, sal_Int32 nHandle, const Any& rValue)
throw( IllegalArgumentException )
{
@@ -332,7 +332,7 @@ sal_Bool OImageControlModel::convertFastPropertyValue(Any& rConvertedValue, Any&
}
}
-//------------------------------------------------------------------------------
+
void OImageControlModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 4, OBoundControlModel )
@@ -343,7 +343,7 @@ void OImageControlModel::describeFixedProperties( Sequence< Property >& _rProps
END_DESCRIBE_PROPERTIES();
}
-//------------------------------------------------------------------------------
+
void OImageControlModel::describeAggregateProperties( Sequence< Property >& /* [out] */ o_rAggregateProperties ) const
{
OBoundControlModel::describeAggregateProperties( o_rAggregateProperties );
@@ -353,13 +353,13 @@ void OImageControlModel::describeAggregateProperties( Sequence< Property >& /* [
RemoveProperty( o_rAggregateProperties, PROPERTY_GRAPHIC );
}
-//------------------------------------------------------------------------------
+
OUString OImageControlModel::getServiceName() throw ( ::com::sun::star::uno::RuntimeException)
{
return OUString(FRM_COMPONENT_IMAGECONTROL); // old (non-sun) name for compatibility !
}
-//------------------------------------------------------------------------------
+
void OImageControlModel::write(const Reference<XObjectOutputStream>& _rxOutStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
{
// Base class
@@ -373,7 +373,7 @@ void OImageControlModel::write(const Reference<XObjectOutputStream>& _rxOutStrea
writeCommonProperties(_rxOutStream);
}
-//------------------------------------------------------------------------------
+
void OImageControlModel::read(const Reference<XObjectInputStream>& _rxInStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
{
OBoundControlModel::read(_rxInStream);
@@ -408,7 +408,7 @@ void OImageControlModel::read(const Reference<XObjectInputStream>& _rxInStream)
}
}
-//------------------------------------------------------------------------------
+
sal_Bool OImageControlModel::impl_updateStreamForURL_lck( const OUString& _rURL, ValueChangeInstigator _eInstigator )
{
// create a stream for the image specified by the URL
@@ -450,7 +450,7 @@ sal_Bool OImageControlModel::impl_updateStreamForURL_lck( const OUString& _rURL,
return sal_False;
}
-//------------------------------------------------------------------------------
+
sal_Bool OImageControlModel::impl_handleNewImageURL_lck( ValueChangeInstigator _eInstigator )
{
switch ( lcl_getImageStoreType( getFieldType() ) )
@@ -489,7 +489,7 @@ sal_Bool OImageControlModel::impl_handleNewImageURL_lck( ValueChangeInstigator _
return sal_True;
}
-//------------------------------------------------------------------------------
+
sal_Bool OImageControlModel::commitControlValueToDbColumn( bool _bPostReset )
{
if ( _bPostReset )
@@ -508,7 +508,7 @@ sal_Bool OImageControlModel::commitControlValueToDbColumn( bool _bPostReset )
return sal_True;
}
-//------------------------------------------------------------------------------
+
namespace
{
bool lcl_isValidDocumentURL( const OUString& _rDocURL )
@@ -517,7 +517,7 @@ namespace
}
}
-//------------------------------------------------------------------------------
+
void OImageControlModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm )
{
OBoundControlModel::onConnectedDbColumn( _rxForm );
@@ -547,7 +547,7 @@ void OImageControlModel::onConnectedDbColumn( const Reference< XInterface >& _rx
}
}
-//------------------------------------------------------------------------------
+
void OImageControlModel::onDisconnectedDbColumn()
{
OBoundControlModel::onDisconnectedDbColumn();
@@ -555,7 +555,7 @@ void OImageControlModel::onDisconnectedDbColumn()
m_sDocumentURL = OUString();
}
-//------------------------------------------------------------------------------
+
Any OImageControlModel::translateDbColumnToControlValue()
{
switch ( lcl_getImageStoreType( getFieldType() ) )
@@ -581,13 +581,13 @@ Any OImageControlModel::translateDbColumnToControlValue()
return Any();
}
-//------------------------------------------------------------------------------
+
Any OImageControlModel::getControlValue( ) const
{
return makeAny( m_sImageURL );
}
-//------------------------------------------------------------------------------
+
void OImageControlModel::doSetControlValue( const Any& _rValue )
{
DBG_ASSERT( GetImageProducer() && m_xImageProducer.is(), "OImageControlModel::doSetControlValue: no image producer!" );
@@ -637,44 +637,44 @@ void OImageControlModel::doSetControlValue( const Any& _rValue )
}
// OComponentHelper
-//------------------------------------------------------------------
+
void SAL_CALL OImageControlModel::disposing()
{
OBoundControlModel::disposing();
}
-//------------------------------------------------------------------------------
+
void OImageControlModel::resetNoBroadcast()
{
if ( hasField() ) // only reset when we are connected to a column
OBoundControlModel::resetNoBroadcast( );
}
-//--------------------------------------------------------------------
+
Reference< XImageProducer > SAL_CALL OImageControlModel::getImageProducer() throw ( RuntimeException)
{
return this;
}
-//--------------------------------------------------------------------
+
void SAL_CALL OImageControlModel::addConsumer( const Reference< XImageConsumer >& _rxConsumer ) throw (RuntimeException)
{
GetImageProducer()->addConsumer( _rxConsumer );
}
-//--------------------------------------------------------------------
+
void SAL_CALL OImageControlModel::removeConsumer( const Reference< XImageConsumer >& _rxConsumer ) throw (RuntimeException)
{
GetImageProducer()->removeConsumer( _rxConsumer );
}
-//--------------------------------------------------------------------
+
void SAL_CALL OImageControlModel::startProduction( ) throw (RuntimeException)
{
GetImageProducer()->startProduction();
}
-//------------------------------------------------------------------------------
+
IMPL_LINK( OImageControlModel, OnImageImportDone, ::Graphic*, i_pGraphic )
{
const Reference< XGraphic > xGraphic( i_pGraphic != NULL ? Image( i_pGraphic->GetBitmapEx() ).GetXGraphic() : NULL );
@@ -695,13 +695,13 @@ IMPL_LINK( OImageControlModel, OnImageImportDone, ::Graphic*, i_pGraphic )
// OImageControlControl
//==================================================================
-//------------------------------------------------------------------
+
InterfaceRef SAL_CALL OImageControlControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new OImageControlControl( comphelper::getComponentContext(_rxFactory) ));
}
-//------------------------------------------------------------------------------
+
Sequence<Type> OImageControlControl::_getTypes()
{
return concatSequences(
@@ -710,7 +710,7 @@ Sequence<Type> OImageControlControl::_getTypes()
);
}
-//------------------------------------------------------------------------------
+
OImageControlControl::OImageControlControl(const Reference<XComponentContext>& _rxFactory)
:OBoundControl(_rxFactory, VCL_CONTROL_IMAGECONTROL)
,m_aModifyListeners( m_aMutex )
@@ -726,7 +726,7 @@ OImageControlControl::OImageControlControl(const Reference<XComponentContext>& _
decrement(m_refCount);
}
-//------------------------------------------------------------------------------
+
Any SAL_CALL OImageControlControl::queryAggregation(const Type& _rType) throw (RuntimeException)
{
Any aReturn = OBoundControl::queryAggregation( _rType );
@@ -740,7 +740,7 @@ Any SAL_CALL OImageControlControl::queryAggregation(const Type& _rType) throw (R
return aReturn;
}
-//------------------------------------------------------------------------------
+
StringSequence OImageControlControl::getSupportedServiceNames() throw()
{
StringSequence aSupported = OBoundControl::getSupportedServiceNames();
@@ -751,19 +751,19 @@ StringSequence OImageControlControl::getSupportedServiceNames() throw()
return aSupported;
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OImageControlControl::addModifyListener( const Reference< XModifyListener >& _Listener ) throw (RuntimeException)
{
m_aModifyListeners.addInterface( _Listener );
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OImageControlControl::removeModifyListener( const Reference< XModifyListener >& _Listener ) throw (RuntimeException)
{
m_aModifyListeners.removeInterface( _Listener );
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OImageControlControl::disposing()
{
EventObject aEvent( *this );
@@ -772,13 +772,13 @@ void SAL_CALL OImageControlControl::disposing()
OBoundControl::disposing();
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OImageControlControl::disposing( const EventObject& _Event ) throw(RuntimeException)
{
OBoundControl::disposing( _Event );
}
-//------------------------------------------------------------------------------
+
void OImageControlControl::implClearGraphics( sal_Bool _bForce )
{
Reference< XPropertySet > xSet( getModel(), UNO_QUERY );
@@ -801,7 +801,7 @@ void OImageControlControl::implClearGraphics( sal_Bool _bForce )
}
}
-//------------------------------------------------------------------------------
+
bool OImageControlControl::implInsertGraphics()
{
Reference< XPropertySet > xSet( getModel(), UNO_QUERY );
@@ -867,7 +867,7 @@ bool OImageControlControl::implInsertGraphics()
return false;
}
-//------------------------------------------------------------------------------
+
bool OImageControlControl::impl_isEmptyGraphics_nothrow() const
{
bool bIsEmpty = true;
@@ -888,7 +888,7 @@ bool OImageControlControl::impl_isEmptyGraphics_nothrow() const
}
// MouseListener
-//------------------------------------------------------------------------------
+
void OImageControlControl::mousePressed(const ::com::sun::star::awt::MouseEvent& e) throw ( ::com::sun::star::uno::RuntimeException)
{
SolarMutexGuard aGuard;
@@ -985,17 +985,17 @@ void OImageControlControl::mousePressed(const ::com::sun::star::awt::MouseEvent&
}
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OImageControlControl::mouseReleased(const awt::MouseEvent& /*e*/) throw ( RuntimeException )
{
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OImageControlControl::mouseEntered(const awt::MouseEvent& /*e*/) throw ( RuntimeException )
{
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OImageControlControl::mouseExited(const awt::MouseEvent& /*e*/) throw ( RuntimeException )
{
}
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index 01b253e3230d..aa3423300dcc 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -83,7 +83,7 @@ namespace frm
//==============================================================================
namespace
{
- //--------------------------------------------------------------------------
+
struct RowSetValueToString : public ::std::unary_function< ORowSetValue, OUString >
{
OUString operator()( const ORowSetValue& _value ) const
@@ -92,7 +92,7 @@ namespace frm
}
};
- //--------------------------------------------------------------------------
+
struct AppendRowSetValueString : public ::std::unary_function< OUString, void >
{
AppendRowSetValueString( OUString& _string )
@@ -109,7 +109,7 @@ namespace frm
OUString& m_string;
};
- //--------------------------------------------------------------------------
+
Sequence< OUString > lcl_convertToStringSequence( const ValueList& _values )
{
Sequence< OUString > aStrings( _values.size() );
@@ -131,13 +131,13 @@ namespace frm
//==============================================================================
//= OListBoxModel
//==============================================================================
- //------------------------------------------------------------------
+
InterfaceRef SAL_CALL OListBoxModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
{
return *(new OListBoxModel( comphelper::getComponentContext(_rxFactory) ));
}
- //------------------------------------------------------------------------------
+
Sequence< Type> OListBoxModel::_getTypes()
{
return TypeBag(
@@ -153,7 +153,7 @@ namespace frm
startAggregatePropertyListening( PROPERTY_STRINGITEMLIST );
}
- //------------------------------------------------------------------
+
OListBoxModel::OListBoxModel(const Reference<XComponentContext>& _rxFactory)
:OBoundControlModel( _rxFactory, VCL_CONTROLMODEL_LISTBOX, FRM_SUN_CONTROL_LISTBOX, sal_True, sal_True, sal_True )
// use the old control name for compatibility reasons
@@ -173,7 +173,7 @@ namespace frm
init();
}
- //------------------------------------------------------------------
+
OListBoxModel::OListBoxModel( const OListBoxModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
:OBoundControlModel( _pOriginal, _rxFactory )
,OEntryListHelper( *_pOriginal, (OControlModel&)*this )
@@ -192,7 +192,7 @@ namespace frm
init();
}
- //------------------------------------------------------------------
+
OListBoxModel::~OListBoxModel()
{
if (!OComponentHelper::rBHelper.bDisposed)
@@ -204,11 +204,11 @@ namespace frm
}
// XCloneable
- //------------------------------------------------------------------------------
+
IMPLEMENT_DEFAULT_CLONING( OListBoxModel )
// XServiceInfo
- //------------------------------------------------------------------------------
+
StringSequence SAL_CALL OListBoxModel::getSupportedServiceNames() throw(RuntimeException)
{
StringSequence aSupported = OBoundControlModel::getSupportedServiceNames();
@@ -231,7 +231,7 @@ namespace frm
return aSupported;
}
- //------------------------------------------------------------------------------
+
Any SAL_CALL OListBoxModel::queryAggregation(const Type& _rType) throw (RuntimeException)
{
Any aReturn = OBoundControlModel::queryAggregation( _rType );
@@ -243,7 +243,7 @@ namespace frm
}
// OComponentHelper
- //------------------------------------------------------------------------------
+
void OListBoxModel::disposing()
{
OBoundControlModel::disposing();
@@ -251,7 +251,7 @@ namespace frm
OErrorBroadcaster::disposing();
}
- //------------------------------------------------------------------------------
+
void OListBoxModel::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle) const
{
switch (_nHandle)
@@ -293,7 +293,7 @@ namespace frm
}
}
- //------------------------------------------------------------------------------
+
void OListBoxModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const Any& _rValue) throw (com::sun::star::uno::Exception)
{
switch (_nHandle)
@@ -388,7 +388,7 @@ namespace frm
}
}
- //------------------------------------------------------------------------------
+
sal_Bool OListBoxModel::convertFastPropertyValue(
Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue)
throw (IllegalArgumentException)
@@ -434,7 +434,7 @@ namespace frm
return bModified;
}
- //------------------------------------------------------------------------------
+
void SAL_CALL OListBoxModel::setPropertyValues( const Sequence< OUString >& _rPropertyNames, const Sequence< Any >& _rValues ) throw(PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException)
{
// if both SelectedItems and StringItemList are set, care for this
@@ -470,7 +470,7 @@ namespace frm
}
}
- //------------------------------------------------------------------------------
+
void OListBoxModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 9, OBoundControlModel )
@@ -486,7 +486,7 @@ namespace frm
END_DESCRIBE_PROPERTIES();
}
- //------------------------------------------------------------------------------
+
void OListBoxModel::_propertyChanged( const PropertyChangeEvent& i_rEvent ) throw ( RuntimeException )
{
if ( i_rEvent.PropertyName == PROPERTY_STRINGITEMLIST )
@@ -502,7 +502,7 @@ namespace frm
OBoundControlModel::_propertyChanged( i_rEvent );
}
- //------------------------------------------------------------------------------
+
void OListBoxModel::describeAggregateProperties( Sequence< Property >& _rAggregateProps ) const
{
OBoundControlModel::describeAggregateProperties( _rAggregateProps );
@@ -511,13 +511,13 @@ namespace frm
RemoveProperty( _rAggregateProps, PROPERTY_STRINGITEMLIST );
}
- //------------------------------------------------------------------------------
+
OUString SAL_CALL OListBoxModel::getServiceName() throw(RuntimeException)
{
return OUString(FRM_COMPONENT_LISTBOX); // old (non-sun) name for compatibility !
}
- //------------------------------------------------------------------------------
+
void SAL_CALL OListBoxModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
throw(IOException, RuntimeException)
{
@@ -554,7 +554,7 @@ namespace frm
writeCommonProperties(_rxOutStream);
}
- //------------------------------------------------------------------------------
+
void SAL_CALL OListBoxModel::read(const Reference<XObjectInputStream>& _rxInStream) throw(IOException, RuntimeException)
{
// We need to respect dependencies for certain variables.
@@ -675,7 +675,7 @@ namespace frm
resetNoBroadcast();
}
- //------------------------------------------------------------------------------
+
void OListBoxModel::loadData( bool _bForce )
{
SAL_INFO( "forms.component", "OListBoxModel::loadData" );
@@ -987,7 +987,7 @@ namespace frm
setFastPropertyValue( PROPERTY_ID_STRINGITEMLIST, makeAny( lcl_convertToStringSequence( aDisplayList ) ) );
}
- //------------------------------------------------------------------------------
+
void OListBoxModel::onConnectedDbColumn( const Reference< XInterface >& /*_rxForm*/ )
{
// list boxes which are bound to a db column don't have multi selection
@@ -1001,7 +1001,7 @@ namespace frm
impl_refreshDbEntryList( false );
}
- //------------------------------------------------------------------------------
+
void OListBoxModel::onDisconnectedDbColumn()
{
if ( m_eListSourceType != ListSourceType_VALUELIST )
@@ -1017,21 +1017,21 @@ namespace frm
}
}
- //------------------------------------------------------------------------------
+
void OListBoxModel::setBoundValues(const ValueList &l)
{
m_aConvertedBoundValues.clear();
m_aBoundValues = l;
}
- //------------------------------------------------------------------------------
+
void OListBoxModel::clearBoundValues()
{
ValueList().swap(m_aConvertedBoundValues);
ValueList().swap(m_aBoundValues);
}
- //------------------------------------------------------------------------------
+
void OListBoxModel::convertBoundValues(const sal_Int32 nFieldType) const
{
m_aConvertedBoundValues.resize(m_aBoundValues.size());
@@ -1047,12 +1047,12 @@ namespace frm
OSL_ENSURE(dst == m_aConvertedBoundValues.end(), "OListBoxModel::convertBoundValues expected to have overwritten all of m_aConvertedBoundValues, but did not.");
assert(dst == m_aConvertedBoundValues.end());
}
- //------------------------------------------------------------------------------
+
sal_Int32 OListBoxModel::getValueType() const
{
return impl_hasBoundComponent() ? m_nBoundColumnType : getFieldType();
}
- //------------------------------------------------------------------------------
+
ValueList OListBoxModel::impl_getValues() const
{
const sal_Int32 nFieldType = getValueType();
@@ -1081,7 +1081,7 @@ namespace frm
assert(dst == aValues.end());
return aValues;
}
- //------------------------------------------------------------------------------
+
ORowSetValue OListBoxModel::getFirstSelectedValue() const
{
static const ORowSetValue s_aEmptyVaue;
@@ -1112,7 +1112,7 @@ namespace frm
return aValues[ selectedValue ];
}
- //------------------------------------------------------------------------------
+
sal_Bool OListBoxModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
{
// current selection list
@@ -1137,7 +1137,7 @@ namespace frm
return sal_True;
}
- //------------------------------------------------------------------------------
+
Sequence< sal_Int16 > OListBoxModel::translateDbValueToControlValue(const ORowSetValue &i_aValue) const
{
Sequence< sal_Int16 > aSelectionIndicies;
@@ -1167,7 +1167,7 @@ namespace frm
return aSelectionIndicies;
}
- //------------------------------------------------------------------------------
+
Sequence< sal_Int16 > OListBoxModel::translateBindingValuesToControlValue(const Sequence< const Any > &i_aValues) const
{
const ValueList aValues( impl_getValues() );
@@ -1207,7 +1207,7 @@ namespace frm
aSelectionIndicies.realloc(nCount);
return aSelectionIndicies;
}
- //------------------------------------------------------------------------------
+
Any OListBoxModel::translateDbColumnToControlValue()
{
Reference< XPropertySet > xBoundField( getField() );
@@ -1226,7 +1226,7 @@ namespace frm
}
// XReset
- //------------------------------------------------------------------------------
+
Any OListBoxModel::getDefaultForReset() const
{
Any aValue;
@@ -1247,21 +1247,21 @@ namespace frm
return aValue;
}
- //--------------------------------------------------------------------
+
void OListBoxModel::resetNoBroadcast()
{
OBoundControlModel::resetNoBroadcast();
m_aSaveValue.setNull();
}
- //--------------------------------------------------------------------
+
void SAL_CALL OListBoxModel::disposing( const EventObject& _rSource ) throw ( RuntimeException )
{
if ( !OEntryListHelper::handleDisposing( _rSource ) )
OBoundControlModel::disposing( _rSource );
}
- //--------------------------------------------------------------------
+
namespace
{
// The type of how we should transfer our selection to external value bindings
@@ -1275,7 +1275,7 @@ namespace frm
eValue /// as string representation of the selected value
};
- //--------------------------------------------------------------------
+
ExchangeType lcl_getCurrentExchangeType( const Type& _rExchangeType )
{
switch ( _rExchangeType.getTypeClass() )
@@ -1309,7 +1309,7 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
Any OListBoxModel::translateExternalValueToControlValue( const Any& _rExternalValue ) const
{
Sequence< sal_Int16 > aSelectIndexes;
@@ -1407,7 +1407,7 @@ namespace frm
return makeAny( aSelectIndexes );
}
- //--------------------------------------------------------------------
+
namespace
{
//................................................................
@@ -1509,7 +1509,7 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
Any OListBoxModel::translateControlValueToExternalValue( ) const
{
OSL_PRECOND( hasExternalValueBinding(), "OListBoxModel::translateControlValueToExternalValue: no binding!" );
@@ -1566,14 +1566,14 @@ namespace frm
return aReturn;
}
- //------------------------------------------------------------------------------
+
Any OListBoxModel::translateControlValueToValidatableValue( ) const
{
OSL_PRECOND( hasValidator(), "OListBoxModel::translateControlValueToValidatableValue: no validator, so why should I?" );
return getCurrentFormComponentValue();
}
- //--------------------------------------------------------------------
+
Any OListBoxModel::getCurrentSingleValue() const
{
Any aCurrentValue;
@@ -1591,7 +1591,7 @@ namespace frm
return aCurrentValue;
}
- //--------------------------------------------------------------------
+
Any OListBoxModel::getCurrentMultiValue() const
{
Any aCurrentValue;
@@ -1609,7 +1609,7 @@ namespace frm
return aCurrentValue;
}
- //--------------------------------------------------------------------
+
Any OListBoxModel::getCurrentFormComponentValue() const
{
{
@@ -1639,7 +1639,7 @@ namespace frm
return aCurrentValue;
}
- //--------------------------------------------------------------------
+
Sequence< Type > OListBoxModel::getSupportedBindingTypes()
{
Sequence< Type > aTypes(6);
@@ -1652,7 +1652,7 @@ namespace frm
return aTypes;
}
- //--------------------------------------------------------------------
+
void OListBoxModel::stringItemListChanged( ControlModelLock& _rInstanceLock )
{
if ( !m_xAggregateSet.is() )
@@ -1686,13 +1686,13 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
void OListBoxModel::connectedExternalListSource( )
{
// TODO?
}
- //--------------------------------------------------------------------
+
void OListBoxModel::disconnectedExternalListSource( )
{
// TODO: in case we're part of an already loaded form, we should probably simulate
@@ -1700,7 +1700,7 @@ namespace frm
// by our SQL-binding related properties
}
- //--------------------------------------------------------------------
+
void OListBoxModel::impl_refreshDbEntryList( bool _bForce )
{
DBG_ASSERT( !hasExternalListSource(), "OListBoxModel::impl_refreshDbEntryList: invalid call!" );
@@ -1714,7 +1714,7 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
void OListBoxModel::refreshInternalEntryList()
{
impl_refreshDbEntryList( true );
@@ -1726,13 +1726,13 @@ namespace frm
// OListBoxControl
//==================================================================
- //------------------------------------------------------------------
+
InterfaceRef SAL_CALL OListBoxControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
{
return *(new OListBoxControl( comphelper::getComponentContext(_rxFactory) ));
}
- //------------------------------------------------------------------------------
+
Sequence< Type> OListBoxControl::_getTypes()
{
return TypeBag(
@@ -1741,7 +1741,7 @@ namespace frm
).getTypes();
}
- //------------------------------------------------------------------
+
Any SAL_CALL OListBoxControl::queryAggregation(const Type& _rType) throw (RuntimeException)
{
Any aReturn = OListBoxControl_BASE::queryInterface( _rType );
@@ -1754,7 +1754,7 @@ namespace frm
return aReturn;
}
- //------------------------------------------------------------------------------
+
OListBoxControl::OListBoxControl(const Reference<XComponentContext>& _rxFactory)
:OBoundControl( _rxFactory, VCL_CONTROL_LISTBOX, sal_False )
,m_aChangeListeners( m_aMutex )
@@ -1781,7 +1781,7 @@ namespace frm
m_aChangeTimer.SetTimeoutHdl(LINK(this,OListBoxControl,OnTimeout));
}
- //------------------------------------------------------------------------------
+
OListBoxControl::~OListBoxControl()
{
if (!OComponentHelper::rBHelper.bDisposed)
@@ -1795,7 +1795,7 @@ namespace frm
}
- //------------------------------------------------------------------------------
+
StringSequence SAL_CALL OListBoxControl::getSupportedServiceNames() throw(RuntimeException)
{
StringSequence aSupported = OBoundControl::getSupportedServiceNames();
@@ -1808,7 +1808,7 @@ namespace frm
// XFocusListener
- //------------------------------------------------------------------------------
+
void SAL_CALL OListBoxControl::focusGained(const FocusEvent& /*_rEvent*/) throw(RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
@@ -1823,14 +1823,14 @@ namespace frm
}
}
- //------------------------------------------------------------------------------
+
void SAL_CALL OListBoxControl::focusLost(const FocusEvent& /*_rEvent*/) throw(RuntimeException)
{
m_aCurrentSelection.clear();
}
// XItemListener
- //------------------------------------------------------------------------------
+
void SAL_CALL OListBoxControl::itemStateChanged(const ItemEvent& _rEvent) throw(RuntimeException)
{
// forward this to our listeners
@@ -1900,27 +1900,27 @@ namespace frm
}
// XEventListener
- //------------------------------------------------------------------------------
+
void SAL_CALL OListBoxControl::disposing(const EventObject& _rSource) throw (RuntimeException)
{
OBoundControl::disposing(_rSource);
}
// XChangeBroadcaster
- //------------------------------------------------------------------------------
+
void SAL_CALL OListBoxControl::addChangeListener(const Reference<XChangeListener>& _rxListener) throw(RuntimeException)
{
m_aChangeListeners.addInterface( _rxListener );
}
- //------------------------------------------------------------------------------
+
void SAL_CALL OListBoxControl::removeChangeListener(const Reference<XChangeListener>& _rxListener) throw(RuntimeException)
{
m_aChangeListeners.removeInterface( _rxListener );
}
// OComponentHelper
- //------------------------------------------------------------------------------
+
void OListBoxControl::disposing()
{
if (m_aChangeTimer.IsActive())
@@ -1948,7 +1948,7 @@ namespace frm
OBoundControl::disposing();
}
- //------------------------------------------------------------------------------
+
void OListBoxControl::processEvent( const AnyEvent& _rEvent )
{
Reference< XListBox > xKeepAlive( this );
@@ -1961,61 +1961,61 @@ namespace frm
m_aItemListeners.notifyEach( &XItemListener::itemStateChanged, rItemEvent.getEventObject() );
}
- //------------------------------------------------------------------------------
+
IMPL_LINK(OListBoxControl, OnTimeout, void*, /*EMPTYTAG*/)
{
m_aChangeListeners.notifyEach( &XChangeListener::changed, EventObject( *this ) );
return 0L;
}
- //--------------------------------------------------------------------
+
void SAL_CALL OListBoxControl::addItemListener( const Reference< XItemListener >& l ) throw (RuntimeException)
{
m_aItemListeners.addInterface( l );
}
- //--------------------------------------------------------------------
+
void SAL_CALL OListBoxControl::removeItemListener( const Reference< XItemListener >& l ) throw (RuntimeException)
{
m_aItemListeners.removeInterface( l );
}
- //--------------------------------------------------------------------
+
void SAL_CALL OListBoxControl::addActionListener( const Reference< XActionListener >& l ) throw (RuntimeException)
{
if ( m_xAggregateListBox.is() )
m_xAggregateListBox->addActionListener( l );
}
- //--------------------------------------------------------------------
+
void SAL_CALL OListBoxControl::removeActionListener( const Reference< XActionListener >& l ) throw (RuntimeException)
{
if ( m_xAggregateListBox.is() )
m_xAggregateListBox->removeActionListener( l );
}
- //--------------------------------------------------------------------
+
void SAL_CALL OListBoxControl::addItem( const OUString& aItem, ::sal_Int16 nPos ) throw (RuntimeException)
{
if ( m_xAggregateListBox.is() )
m_xAggregateListBox->addItem( aItem, nPos );
}
- //--------------------------------------------------------------------
+
void SAL_CALL OListBoxControl::addItems( const Sequence< OUString >& aItems, ::sal_Int16 nPos ) throw (RuntimeException)
{
if ( m_xAggregateListBox.is() )
m_xAggregateListBox->addItems( aItems, nPos );
}
- //--------------------------------------------------------------------
+
void SAL_CALL OListBoxControl::removeItems( ::sal_Int16 nPos, ::sal_Int16 nCount ) throw (RuntimeException)
{
if ( m_xAggregateListBox.is() )
m_xAggregateListBox->removeItems( nPos, nCount );
}
- //--------------------------------------------------------------------
+
::sal_Int16 SAL_CALL OListBoxControl::getItemCount( ) throw (RuntimeException)
{
if ( m_xAggregateListBox.is() )
@@ -2023,7 +2023,7 @@ namespace frm
return 0;
}
- //--------------------------------------------------------------------
+
OUString SAL_CALL OListBoxControl::getItem( ::sal_Int16 nPos ) throw (RuntimeException)
{
if ( m_xAggregateListBox.is() )
@@ -2031,7 +2031,7 @@ namespace frm
return OUString( );
}
- //--------------------------------------------------------------------
+
Sequence< OUString > SAL_CALL OListBoxControl::getItems( ) throw (RuntimeException)
{
if ( m_xAggregateListBox.is() )
@@ -2039,7 +2039,7 @@ namespace frm
return Sequence< OUString >( );
}
- //--------------------------------------------------------------------
+
::sal_Int16 SAL_CALL OListBoxControl::getSelectedItemPos( ) throw (RuntimeException)
{
if ( m_xAggregateListBox.is() )
@@ -2047,7 +2047,7 @@ namespace frm
return 0;
}
- //--------------------------------------------------------------------
+
Sequence< ::sal_Int16 > SAL_CALL OListBoxControl::getSelectedItemsPos( ) throw (RuntimeException)
{
if ( m_xAggregateListBox.is() )
@@ -2055,7 +2055,7 @@ namespace frm
return Sequence< ::sal_Int16 >( );
}
- //--------------------------------------------------------------------
+
OUString SAL_CALL OListBoxControl::getSelectedItem( ) throw (RuntimeException)
{
if ( m_xAggregateListBox.is() )
@@ -2063,7 +2063,7 @@ namespace frm
return OUString( );
}
- //--------------------------------------------------------------------
+
Sequence< OUString > SAL_CALL OListBoxControl::getSelectedItems( ) throw (RuntimeException)
{
if ( m_xAggregateListBox.is() )
@@ -2071,28 +2071,28 @@ namespace frm
return Sequence< OUString >( );
}
- //--------------------------------------------------------------------
+
void SAL_CALL OListBoxControl::selectItemPos( ::sal_Int16 nPos, ::sal_Bool bSelect ) throw (RuntimeException)
{
if ( m_xAggregateListBox.is() )
m_xAggregateListBox->selectItemPos( nPos, bSelect );
}
- //--------------------------------------------------------------------
+
void SAL_CALL OListBoxControl::selectItemsPos( const Sequence< ::sal_Int16 >& aPositions, ::sal_Bool bSelect ) throw (RuntimeException)
{
if ( m_xAggregateListBox.is() )
m_xAggregateListBox->selectItemsPos( aPositions, bSelect );
}
- //--------------------------------------------------------------------
+
void SAL_CALL OListBoxControl::selectItem( const OUString& aItem, ::sal_Bool bSelect ) throw (RuntimeException)
{
if ( m_xAggregateListBox.is() )
m_xAggregateListBox->selectItem( aItem, bSelect );
}
- //--------------------------------------------------------------------
+
::sal_Bool SAL_CALL OListBoxControl::isMutipleMode( ) throw (RuntimeException)
{
if ( m_xAggregateListBox.is() )
@@ -2100,14 +2100,14 @@ namespace frm
return sal_False;
}
- //--------------------------------------------------------------------
+
void SAL_CALL OListBoxControl::setMultipleMode( ::sal_Bool bMulti ) throw (RuntimeException)
{
if ( m_xAggregateListBox.is() )
m_xAggregateListBox->setMultipleMode( bMulti );
}
- //--------------------------------------------------------------------
+
::sal_Int16 SAL_CALL OListBoxControl::getDropDownLineCount( ) throw (RuntimeException)
{
if ( m_xAggregateListBox.is() )
@@ -2115,14 +2115,14 @@ namespace frm
return 0;
}
- //--------------------------------------------------------------------
+
void SAL_CALL OListBoxControl::setDropDownLineCount( ::sal_Int16 nLines ) throw (RuntimeException)
{
if ( m_xAggregateListBox.is() )
m_xAggregateListBox->setDropDownLineCount( nLines );
}
- //--------------------------------------------------------------------
+
void SAL_CALL OListBoxControl::makeVisible( ::sal_Int16 nEntry ) throw (RuntimeException)
{
if ( m_xAggregateListBox.is() )
diff --git a/forms/source/component/Numeric.cxx b/forms/source/component/Numeric.cxx
index fc977322f0f4..22c58f223efe 100644
--- a/forms/source/component/Numeric.cxx
+++ b/forms/source/component/Numeric.cxx
@@ -42,13 +42,13 @@ using namespace ::com::sun::star::form::binding;
// ONumericControl
//==================================================================
-//------------------------------------------------------------------
+
ONumericControl::ONumericControl(const Reference<XComponentContext>& _rxFactory)
:OBoundControl(_rxFactory, VCL_CONTROL_NUMERICFIELD)
{
}
-//------------------------------------------------------------------------------
+
StringSequence ONumericControl::getSupportedServiceNames() throw()
{
StringSequence aSupported = OBoundControl::getSupportedServiceNames();
@@ -60,13 +60,13 @@ StringSequence ONumericControl::getSupportedServiceNames() throw()
}
-//------------------------------------------------------------------
+
InterfaceRef SAL_CALL ONumericControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new ONumericControl( comphelper::getComponentContext(_rxFactory) ));
}
-//------------------------------------------------------------------------------
+
Sequence<Type> ONumericControl::_getTypes()
{
return OBoundControl::_getTypes();
@@ -75,20 +75,20 @@ Sequence<Type> ONumericControl::_getTypes()
//==================================================================
// ONumericModel
//==================================================================
-//------------------------------------------------------------------
+
InterfaceRef SAL_CALL ONumericModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new ONumericModel( comphelper::getComponentContext(_rxFactory) ));
}
-//------------------------------------------------------------------------------
+
Sequence<Type> ONumericModel::_getTypes()
{
return OEditBaseModel::_getTypes();
}
-//------------------------------------------------------------------
-//------------------------------------------------------------------
+
+
ONumericModel::ONumericModel(const Reference<XComponentContext>& _rxFactory)
:OEditBaseModel( _rxFactory, VCL_CONTROLMODEL_NUMERICFIELD, FRM_SUN_CONTROL_NUMERICFIELD, sal_True, sal_True )
// use the old control name for compytibility reasons
@@ -98,23 +98,23 @@ ONumericModel::ONumericModel(const Reference<XComponentContext>& _rxFactory)
initValueProperty( PROPERTY_VALUE, PROPERTY_ID_VALUE );
}
-//------------------------------------------------------------------
+
ONumericModel::ONumericModel( const ONumericModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
:OEditBaseModel( _pOriginal, _rxFactory )
{
}
-//------------------------------------------------------------------
+
ONumericModel::~ONumericModel()
{
}
// XCloneable
-//------------------------------------------------------------------------------
+
IMPLEMENT_DEFAULT_CLONING( ONumericModel )
// XServiceInfo
-//------------------------------------------------------------------------------
+
StringSequence ONumericModel::getSupportedServiceNames() throw()
{
StringSequence aSupported = OBoundControlModel::getSupportedServiceNames();
@@ -137,7 +137,7 @@ StringSequence ONumericModel::getSupportedServiceNames() throw()
return aSupported;
}
-//------------------------------------------------------------------------------
+
void ONumericModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 2, OEditBaseModel )
@@ -146,13 +146,13 @@ void ONumericModel::describeFixedProperties( Sequence< Property >& _rProps ) con
END_DESCRIBE_PROPERTIES();
}
-//------------------------------------------------------------------------------
+
OUString SAL_CALL ONumericModel::getServiceName() throw ( ::com::sun::star::uno::RuntimeException)
{
return OUString(FRM_COMPONENT_NUMERICFIELD); // old (non-sun) name for compatibility !
}
-//------------------------------------------------------------------------------
+
sal_Bool ONumericModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
{
Any aControlValue( m_xAggregateFastSet->getFastPropertyValue( getValuePropertyAggHandle() ) );
@@ -176,7 +176,7 @@ sal_Bool ONumericModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
return sal_True;
}
-//------------------------------------------------------------------------------
+
Any ONumericModel::translateDbColumnToControlValue()
{
m_aSaveValue <<= (double)m_xColumn->getDouble();
@@ -186,7 +186,7 @@ Any ONumericModel::translateDbColumnToControlValue()
return m_aSaveValue;
}
-//------------------------------------------------------------------------------
+
Any ONumericModel::getDefaultForReset() const
{
Any aValue;
@@ -196,7 +196,7 @@ Any ONumericModel::getDefaultForReset() const
return aValue;
}
-//------------------------------------------------------------------------------
+
void ONumericModel::resetNoBroadcast()
{
OEditBaseModel::resetNoBroadcast();
diff --git a/forms/source/component/Pattern.cxx b/forms/source/component/Pattern.cxx
index e09e069f566b..fe6de45bdd40 100644
--- a/forms/source/component/Pattern.cxx
+++ b/forms/source/component/Pattern.cxx
@@ -43,25 +43,25 @@ namespace frm
//==================================================================
// OPatternControl
//==================================================================
-//------------------------------------------------------------------
+
OPatternControl::OPatternControl(const Reference<XComponentContext>& _rxFactory)
:OBoundControl(_rxFactory, VCL_CONTROL_PATTERNFIELD)
{
}
-//------------------------------------------------------------------
+
InterfaceRef SAL_CALL OPatternControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new OPatternControl( comphelper::getComponentContext(_rxFactory) ));
}
-//------------------------------------------------------------------------------
+
Sequence<Type> OPatternControl::_getTypes()
{
return OBoundControl::_getTypes();
}
-//------------------------------------------------------------------------------
+
StringSequence OPatternControl::getSupportedServiceNames() throw()
{
StringSequence aSupported = OBoundControl::getSupportedServiceNames();
@@ -75,20 +75,20 @@ StringSequence OPatternControl::getSupportedServiceNames() throw()
//==================================================================
// OPatternModel
//==================================================================
-//------------------------------------------------------------------
+
InterfaceRef SAL_CALL OPatternModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new OPatternModel( comphelper::getComponentContext(_rxFactory) ));
}
-//------------------------------------------------------------------------------
+
Sequence<Type> OPatternModel::_getTypes()
{
return OEditBaseModel::_getTypes();
}
-//------------------------------------------------------------------
-//------------------------------------------------------------------
+
+
OPatternModel::OPatternModel(const Reference<XComponentContext>& _rxFactory)
:OEditBaseModel( _rxFactory, VCL_CONTROLMODEL_PATTERNFIELD, FRM_SUN_CONTROL_PATTERNFIELD, sal_False, sal_False )
// use the old control name for compytibility reasons
@@ -98,23 +98,23 @@ OPatternModel::OPatternModel(const Reference<XComponentContext>& _rxFactory)
initValueProperty( PROPERTY_TEXT, PROPERTY_ID_TEXT );
}
-//------------------------------------------------------------------
+
OPatternModel::OPatternModel( const OPatternModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
:OEditBaseModel( _pOriginal, _rxFactory )
{
}
-//------------------------------------------------------------------
+
OPatternModel::~OPatternModel()
{
}
// XCloneable
-//------------------------------------------------------------------------------
+
IMPLEMENT_DEFAULT_CLONING( OPatternModel )
// XServiceInfo
-//------------------------------------------------------------------------------
+
StringSequence SAL_CALL OPatternModel::getSupportedServiceNames() throw()
{
StringSequence aSupported = OBoundControlModel::getSupportedServiceNames();
@@ -127,7 +127,7 @@ StringSequence SAL_CALL OPatternModel::getSupportedServiceNames() throw()
}
-//------------------------------------------------------------------------------
+
void OPatternModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 4, OEditBaseModel )
@@ -138,13 +138,13 @@ void OPatternModel::describeFixedProperties( Sequence< Property >& _rProps ) con
END_DESCRIBE_PROPERTIES();
}
-//------------------------------------------------------------------------------
+
OUString SAL_CALL OPatternModel::getServiceName() throw ( ::com::sun::star::uno::RuntimeException)
{
return OUString(FRM_COMPONENT_PATTERNFIELD); // old (non-sun) name for compatibility !
}
-//------------------------------------------------------------------------------
+
sal_Bool OPatternModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
{
Any aNewValue( m_xAggregateFastSet->getFastPropertyValue( getValuePropertyAggHandle() ) );
@@ -178,7 +178,7 @@ sal_Bool OPatternModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
return sal_True;
}
-//------------------------------------------------------------------------------
+
void OPatternModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm )
{
OEditBaseModel::onConnectedDbColumn( _rxForm );
@@ -190,7 +190,7 @@ void OPatternModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm
m_pFormattedValue.reset( new ::dbtools::FormattedColumnValue( getContext(), Reference< XRowSet >( _rxForm, UNO_QUERY ), xField ) );
}
-//------------------------------------------------------------------------------
+
void OPatternModel::onDisconnectedDbColumn()
{
OEditBaseModel::onDisconnectedDbColumn();
@@ -198,7 +198,7 @@ void OPatternModel::onDisconnectedDbColumn()
}
// XPropertyChangeListener
-//------------------------------------------------------------------------------
+
Any OPatternModel::translateDbColumnToControlValue()
{
OSL_PRECOND( m_pFormattedValue.get(), "OPatternModel::translateDbColumnToControlValue: no value helper!" );
@@ -226,13 +226,13 @@ Any OPatternModel::translateDbColumnToControlValue()
}
// XReset
-//------------------------------------------------------------------------------
+
Any OPatternModel::getDefaultForReset() const
{
return makeAny( m_aDefaultText );
}
-//------------------------------------------------------------------------------
+
void OPatternModel::resetNoBroadcast()
{
OEditBaseModel::resetNoBroadcast();
diff --git a/forms/source/component/RadioButton.cxx b/forms/source/component/RadioButton.cxx
index 1430c1b7492d..3e121a714e66 100644
--- a/forms/source/component/RadioButton.cxx
+++ b/forms/source/component/RadioButton.cxx
@@ -46,13 +46,13 @@ using namespace ::com::sun::star::util;
using namespace ::com::sun::star::form::binding;
//==================================================================
-//------------------------------------------------------------------------------
+
InterfaceRef SAL_CALL ORadioButtonControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException)
{
return *(new ORadioButtonControl( comphelper::getComponentContext(_rxFactory) ));
}
-//------------------------------------------------------------------------------
+
StringSequence SAL_CALL ORadioButtonControl::getSupportedServiceNames() throw(RuntimeException)
{
StringSequence aSupported = OBoundControl::getSupportedServiceNames();
@@ -64,13 +64,13 @@ StringSequence SAL_CALL ORadioButtonControl::getSupportedServiceNames() throw(Ru
}
-//------------------------------------------------------------------
+
ORadioButtonControl::ORadioButtonControl(const Reference<XComponentContext>& _rxFactory)
:OBoundControl(_rxFactory, VCL_CONTROL_RADIOBUTTON)
{
}
-//------------------------------------------------------------------
+
void SAL_CALL ORadioButtonControl::createPeer(const Reference<starawt::XToolkit>& _rxToolkit, const Reference<starawt::XWindowPeer>& _rxParent) throw (RuntimeException)
{
OBoundControl::createPeer(_rxToolkit, _rxParent);
@@ -97,8 +97,8 @@ InterfaceRef SAL_CALL ORadioButtonModel_CreateInstance(const Reference<XMultiSer
return *(new ORadioButtonModel( comphelper::getComponentContext(_rxFactory) ));
}
-//------------------------------------------------------------------
-//------------------------------------------------------------------
+
+
ORadioButtonModel::ORadioButtonModel(const Reference<XComponentContext>& _rxFactory)
:OReferenceValueComponent( _rxFactory, VCL_CONTROLMODEL_RADIOBUTTON, FRM_SUN_CONTROL_RADIOBUTTON,sal_True )
// use the old control name for compytibility reasons
@@ -110,23 +110,23 @@ ORadioButtonModel::ORadioButtonModel(const Reference<XComponentContext>& _rxFact
startAggregatePropertyListening( PROPERTY_GROUP_NAME );
}
-//------------------------------------------------------------------
+
ORadioButtonModel::ORadioButtonModel( const ORadioButtonModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
:OReferenceValueComponent( _pOriginal, _rxFactory )
{
}
-//------------------------------------------------------------------------------
+
ORadioButtonModel::~ORadioButtonModel()
{
}
// XCloneable
-//------------------------------------------------------------------------------
+
IMPLEMENT_DEFAULT_CLONING( ORadioButtonModel )
// XServiceInfo
-//------------------------------------------------------------------------------
+
StringSequence SAL_CALL ORadioButtonModel::getSupportedServiceNames() throw(RuntimeException)
{
StringSequence aSupported = OReferenceValueComponent::getSupportedServiceNames();
@@ -149,7 +149,7 @@ StringSequence SAL_CALL ORadioButtonModel::getSupportedServiceNames() throw(Runt
return aSupported;
}
-//------------------------------------------------------------------------------
+
void ORadioButtonModel::SetSiblingPropsTo(const OUString& rPropName, const Any& rValue)
{
// my name
@@ -191,7 +191,7 @@ void ORadioButtonModel::SetSiblingPropsTo(const OUString& rPropName, const Any&
}
}
-//------------------------------------------------------------------------------
+
void ORadioButtonModel::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const Any& rValue) throw (Exception)
{
OReferenceValueComponent::setFastPropertyValue_NoBroadcast( nHandle, rValue );
@@ -275,7 +275,7 @@ void ORadioButtonModel::setControlSource()
}
}
-//------------------------------------------------------------------------------
+
void ORadioButtonModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 1, OReferenceValueComponent )
@@ -283,13 +283,13 @@ void ORadioButtonModel::describeFixedProperties( Sequence< Property >& _rProps )
END_DESCRIBE_PROPERTIES();
}
-//------------------------------------------------------------------------------
+
OUString SAL_CALL ORadioButtonModel::getServiceName() throw(RuntimeException)
{
return OUString(FRM_COMPONENT_RADIOBUTTON); // old (non-sun) name for compatibility !
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ORadioButtonModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
throw(IOException, RuntimeException)
{
@@ -307,7 +307,7 @@ void SAL_CALL ORadioButtonModel::write(const Reference<XObjectOutputStream>& _rx
writeCommonProperties(_rxOutStream);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ORadioButtonModel::read(const Reference<XObjectInputStream>& _rxInStream) throw(IOException, RuntimeException)
{
OReferenceValueComponent::read(_rxInStream);
@@ -350,7 +350,7 @@ void SAL_CALL ORadioButtonModel::read(const Reference<XObjectInputStream>& _rxIn
resetNoBroadcast();
}
-//------------------------------------------------------------------------------
+
void ORadioButtonModel::_propertyChanged(const PropertyChangeEvent& _rEvent) throw(RuntimeException)
{
if ( _rEvent.PropertyName.equals( PROPERTY_STATE ) )
@@ -374,7 +374,7 @@ void ORadioButtonModel::_propertyChanged(const PropertyChangeEvent& _rEvent) thr
OReferenceValueComponent::_propertyChanged( _rEvent );
}
-//------------------------------------------------------------------------------
+
Any ORadioButtonModel::translateDbColumnToControlValue()
{
return makeAny( (sal_Int16)
@@ -382,7 +382,7 @@ Any ORadioButtonModel::translateDbColumnToControlValue()
);
}
-//------------------------------------------------------------------------------
+
Any ORadioButtonModel::translateExternalValueToControlValue( const Any& _rExternalValue ) const
{
Any aControlValue = OReferenceValueComponent::translateExternalValueToControlValue( _rExternalValue );
@@ -393,7 +393,7 @@ Any ORadioButtonModel::translateExternalValueToControlValue( const Any& _rExtern
return aControlValue;
}
-//-----------------------------------------------------------------------------
+
sal_Bool ORadioButtonModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
{
Reference< XPropertySet > xField( getField() );
diff --git a/forms/source/component/Time.cxx b/forms/source/component/Time.cxx
index f98477328dfb..ab9b9bbef4fc 100644
--- a/forms/source/component/Time.cxx
+++ b/forms/source/component/Time.cxx
@@ -51,25 +51,25 @@ using namespace ::com::sun::star::lang;
//==================================================================
//= OTimeControl
//==================================================================
-//------------------------------------------------------------------
+
OTimeControl::OTimeControl(const Reference<XComponentContext>& _rxFactory)
:OBoundControl(_rxFactory, VCL_CONTROL_TIMEFIELD)
{
}
-//------------------------------------------------------------------
+
InterfaceRef SAL_CALL OTimeControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new OTimeControl( comphelper::getComponentContext(_rxFactory) ));
}
-//------------------------------------------------------------------------------
+
Sequence<Type> OTimeControl::_getTypes()
{
return OBoundControl::_getTypes();
}
-//------------------------------------------------------------------------------
+
StringSequence SAL_CALL OTimeControl::getSupportedServiceNames() throw()
{
StringSequence aSupported = OBoundControl::getSupportedServiceNames();
@@ -83,14 +83,14 @@ StringSequence SAL_CALL OTimeControl::getSupportedServiceNames() throw()
//==================================================================
//= OTimeModel
//==================================================================
-//------------------------------------------------------------------
+
InterfaceRef SAL_CALL OTimeModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
return *(new OTimeModel( comphelper::getComponentContext(_rxFactory) ));
}
// XServiceInfo
-//------------------------------------------------------------------------------
+
StringSequence SAL_CALL OTimeModel::getSupportedServiceNames() throw()
{
StringSequence aSupported = OBoundControlModel::getSupportedServiceNames();
@@ -113,14 +113,14 @@ StringSequence SAL_CALL OTimeModel::getSupportedServiceNames() throw()
return aSupported;
}
-//------------------------------------------------------------------------------
+
Sequence<Type> OTimeModel::_getTypes()
{
return OBoundControlModel::_getTypes();
}
-//------------------------------------------------------------------
-//------------------------------------------------------------------
+
+
OTimeModel::OTimeModel(const Reference<XComponentContext>& _rxFactory)
: OEditBaseModel(_rxFactory, VCL_CONTROLMODEL_TIMEFIELD,
FRM_SUN_CONTROL_TIMEFIELD, sal_True, sal_True)
@@ -134,7 +134,7 @@ OTimeModel::OTimeModel(const Reference<XComponentContext>& _rxFactory)
setAggregateSet(m_xAggregateFastSet, getOriginalHandle(PROPERTY_ID_TIMEFORMAT));
}
-//------------------------------------------------------------------------------
+
OTimeModel::OTimeModel(const OTimeModel* _pOriginal, const Reference<XComponentContext>& _rxFactory)
: OEditBaseModel(_pOriginal, _rxFactory)
, OLimitedFormats(_rxFactory, FormComponentType::TIMEFIELD)
@@ -143,24 +143,24 @@ OTimeModel::OTimeModel(const OTimeModel* _pOriginal, const Reference<XComponentC
setAggregateSet( m_xAggregateFastSet, getOriginalHandle( PROPERTY_ID_TIMEFORMAT ) );
}
-//------------------------------------------------------------------------------
+
OTimeModel::~OTimeModel( )
{
setAggregateSet(Reference< XFastPropertySet >(), -1);
}
// XCloneable
-//------------------------------------------------------------------------------
+
IMPLEMENT_DEFAULT_CLONING( OTimeModel )
-//------------------------------------------------------------------------------
+
OUString SAL_CALL OTimeModel::getServiceName() throw ( ::com::sun::star::uno::RuntimeException)
{
return OUString(FRM_COMPONENT_TIMEFIELD); // old (non-sun) name for compatibility !
}
// XPropertySet
-//------------------------------------------------------------------------------
+
void OTimeModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 4, OEditBaseModel )
@@ -171,7 +171,7 @@ void OTimeModel::describeFixedProperties( Sequence< Property >& _rProps ) const
END_DESCRIBE_PROPERTIES();
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OTimeModel::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle ) const
{
switch (_nHandle)
@@ -188,7 +188,7 @@ void SAL_CALL OTimeModel::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle
}
}
-//------------------------------------------------------------------------------
+
sal_Bool SAL_CALL OTimeModel::convertFastPropertyValue(Any& _rConvertedValue, Any& _rOldValue,
sal_Int32 _nHandle, const Any& _rValue ) throw(IllegalArgumentException)
{
@@ -198,7 +198,7 @@ sal_Bool SAL_CALL OTimeModel::convertFastPropertyValue(Any& _rConvertedValue, An
return OEditBaseModel::convertFastPropertyValue(_rConvertedValue, _rOldValue, _nHandle, _rValue );
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OTimeModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const Any& _rValue) throw ( ::com::sun::star::uno::Exception)
{
if (PROPERTY_ID_FORMATKEY == _nHandle)
@@ -208,7 +208,7 @@ void SAL_CALL OTimeModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, c
}
// XLoadListener
-//------------------------------------------------------------------------------
+
void OTimeModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm )
{
OBoundControlModel::onConnectedDbColumn( _rxForm );
@@ -228,7 +228,7 @@ void OTimeModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm )
}
}
-//------------------------------------------------------------------------------
+
sal_Bool OTimeModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
{
Any aControlValue( m_xAggregateFastSet->getFastPropertyValue( getValuePropertyAggHandle() ) );
@@ -270,25 +270,25 @@ sal_Bool OTimeModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
return sal_True;
}
-//------------------------------------------------------------------------------
+
Any OTimeModel::translateControlValueToExternalValue( ) const
{
return getControlValue();
}
-//------------------------------------------------------------------------------
+
Any OTimeModel::translateExternalValueToControlValue( const Any& _rExternalValue ) const
{
return _rExternalValue;
}
-//------------------------------------------------------------------------------
+
Any OTimeModel::translateControlValueToValidatableValue( ) const
{
return getControlValue();
}
-//------------------------------------------------------------------------------
+
Any OTimeModel::translateDbColumnToControlValue()
{
util::Time aTime = m_xColumn->getTime();
@@ -300,20 +300,20 @@ Any OTimeModel::translateDbColumnToControlValue()
return m_aSaveValue;
}
-//------------------------------------------------------------------------------
+
Any OTimeModel::getDefaultForReset() const
{
return m_aDefault;
}
-//------------------------------------------------------------------------------
+
void OTimeModel::resetNoBroadcast()
{
OEditBaseModel::resetNoBroadcast();
m_aSaveValue.clear();
}
-//------------------------------------------------------------------------------
+
Sequence< Type > OTimeModel::getSupportedBindingTypes()
{
return Sequence< Type >( &::getCppuType( static_cast< util::Time* >( NULL ) ), 1 );
diff --git a/forms/source/component/cachedrowset.cxx b/forms/source/component/cachedrowset.cxx
index 8847e377a054..37bf3f9d33a9 100644
--- a/forms/source/component/cachedrowset.cxx
+++ b/forms/source/component/cachedrowset.cxx
@@ -77,19 +77,19 @@ namespace frm
//====================================================================
//= CachedRowSet
//====================================================================
- //--------------------------------------------------------------------
+
CachedRowSet::CachedRowSet()
:m_pData( new CachedRowSet_Data )
{
}
- //--------------------------------------------------------------------
+
CachedRowSet::~CachedRowSet()
{
dispose();
}
- //--------------------------------------------------------------------
+
void CachedRowSet::setCommand( const OUString& _rCommand )
{
if ( m_pData->sCommand == _rCommand )
@@ -99,7 +99,7 @@ namespace frm
m_pData->bStatementDirty = true;
}
- //--------------------------------------------------------------------
+
void CachedRowSet::setCommandFromQuery( const OUString& _rQueryName )
{
Reference< XQueriesSupplier > xSupplyQueries( m_pData->xConnection, UNO_QUERY_THROW );
@@ -115,7 +115,7 @@ namespace frm
setCommand( sCommand );
}
- //--------------------------------------------------------------------
+
void CachedRowSet::setEscapeProcessing ( const sal_Bool _bEscapeProcessing )
{
if ( m_pData->bEscapeProcessing == _bEscapeProcessing )
@@ -125,7 +125,7 @@ namespace frm
m_pData->bStatementDirty = true;
}
- //--------------------------------------------------------------------
+
void CachedRowSet::setConnection( const Reference< XConnection >& _rxConnection )
{
if ( m_pData->xConnection == _rxConnection )
@@ -135,7 +135,7 @@ namespace frm
m_pData->bStatementDirty = true;
}
- //--------------------------------------------------------------------
+
Reference< XResultSet > CachedRowSet::execute()
{
Reference< XResultSet > xResult;
@@ -164,13 +164,13 @@ namespace frm
return xResult;
}
- //--------------------------------------------------------------------
+
bool CachedRowSet::isDirty() const
{
return m_pData->bStatementDirty;
}
- //--------------------------------------------------------------------
+
void CachedRowSet::dispose()
{
try
diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx
index 3f9a661f4dab..f4c79b0d1e35 100644
--- a/forms/source/component/clickableimage.cxx
+++ b/forms/source/component/clickableimage.cxx
@@ -68,7 +68,7 @@ namespace frm
//==================================================================
// OClickableImageBaseControl
//==================================================================
- //------------------------------------------------------------------------------
+
Sequence<Type> OClickableImageBaseControl::_getTypes()
{
static Sequence<Type> aTypes;
@@ -77,7 +77,7 @@ namespace frm
return aTypes;
}
- //------------------------------------------------------------------------------
+
OClickableImageBaseControl::OClickableImageBaseControl(const Reference<XComponentContext>& _rxFactory, const OUString& _aService)
:OControl(_rxFactory, _aService)
,m_pThread(NULL)
@@ -88,7 +88,7 @@ namespace frm
m_pFeatureInterception.reset( new ControlFeatureInterception( _rxFactory ) );
}
- //------------------------------------------------------------------------------
+
OClickableImageBaseControl::~OClickableImageBaseControl()
{
if (!OComponentHelper::rBHelper.bDisposed)
@@ -99,7 +99,7 @@ namespace frm
}
// UNO Anbindung
- //------------------------------------------------------------------------------
+
Any SAL_CALL OClickableImageBaseControl::queryAggregation(const Type& _rType) throw (RuntimeException)
{
Any aReturn = OControl::queryAggregation(_rType);
@@ -109,34 +109,34 @@ namespace frm
}
// XApproveActionBroadcaster
- //------------------------------------------------------------------------------
+
void OClickableImageBaseControl::addApproveActionListener(
const Reference<XApproveActionListener>& l) throw( RuntimeException )
{
m_aApproveActionListeners.addInterface(l);
}
- //------------------------------------------------------------------------------
+
void OClickableImageBaseControl::removeApproveActionListener(
const Reference<XApproveActionListener>& l) throw( RuntimeException )
{
m_aApproveActionListeners.removeInterface(l);
}
- //--------------------------------------------------------------------
+
void SAL_CALL OClickableImageBaseControl::registerDispatchProviderInterceptor( const Reference< XDispatchProviderInterceptor >& _rxInterceptor ) throw (RuntimeException)
{
m_pFeatureInterception->registerDispatchProviderInterceptor( _rxInterceptor );
}
- //--------------------------------------------------------------------
+
void SAL_CALL OClickableImageBaseControl::releaseDispatchProviderInterceptor( const Reference< XDispatchProviderInterceptor >& _rxInterceptor ) throw (RuntimeException)
{
m_pFeatureInterception->releaseDispatchProviderInterceptor( _rxInterceptor );
}
// OComponentHelper
- //------------------------------------------------------------------------------
+
void OClickableImageBaseControl::disposing()
{
EventObject aEvent( static_cast< XWeak* >( this ) );
@@ -157,7 +157,7 @@ namespace frm
OControl::disposing();
}
- //------------------------------------------------------------------------------
+
OImageProducerThread_Impl* OClickableImageBaseControl::getImageProducerThread()
{
if ( !m_pThread )
@@ -169,7 +169,7 @@ namespace frm
return m_pThread;
}
- //------------------------------------------------------------------------------
+
bool OClickableImageBaseControl::approveAction( )
{
sal_Bool bCancelled = sal_False;
@@ -186,7 +186,7 @@ namespace frm
return !bCancelled;
}
- //------------------------------------------------------------------------------
+
// Diese Methode wird auch aus einem Thread gerufen und muss deshalb
// thread-safe sein.
void OClickableImageBaseControl::actionPerformed_Impl(sal_Bool bNotifyListener, const MouseEvent& rEvt)
@@ -344,31 +344,31 @@ namespace frm
}
- //--------------------------------------------------------------------
+
void SAL_CALL OClickableImageBaseControl::addSubmissionVetoListener( const Reference< submission::XSubmissionVetoListener >& listener ) throw (NoSupportException, RuntimeException)
{
m_aSubmissionVetoListeners.addInterface( listener );
}
- //--------------------------------------------------------------------
+
void SAL_CALL OClickableImageBaseControl::removeSubmissionVetoListener( const Reference< submission::XSubmissionVetoListener >& listener ) throw (NoSupportException, RuntimeException)
{
m_aSubmissionVetoListeners.removeInterface( listener );
}
- //--------------------------------------------------------------------
+
void SAL_CALL OClickableImageBaseControl::submitWithInteraction( const Reference< XInteractionHandler >& _rxHandler ) throw (VetoException, WrappedTargetException, RuntimeException)
{
implSubmit( MouseEvent(), _rxHandler );
}
- //--------------------------------------------------------------------
+
void SAL_CALL OClickableImageBaseControl::submit( ) throw (VetoException, WrappedTargetException, RuntimeException)
{
implSubmit( MouseEvent(), NULL );
}
- //--------------------------------------------------------------------
+
Sequence< OUString > SAL_CALL OClickableImageBaseControl::getSupportedServiceNames( ) throw (RuntimeException)
{
Sequence< OUString > aSupported = OControl::getSupportedServiceNames();
@@ -380,7 +380,7 @@ namespace frm
return aSupported;
}
- //--------------------------------------------------------------------
+
void OClickableImageBaseControl::implSubmit( const MouseEvent& _rEvent, const Reference< XInteractionHandler >& _rxHandler ) SAL_THROW((VetoException, WrappedTargetException, RuntimeException))
{
try
@@ -437,7 +437,7 @@ namespace frm
//==================================================================
// OClickableImageBaseModel
//==================================================================
- //------------------------------------------------------------------------------
+
Sequence<Type> OClickableImageBaseModel::_getTypes()
{
return concatSequences(
@@ -446,8 +446,8 @@ namespace frm
);
}
- //------------------------------------------------------------------
- //------------------------------------------------------------------
+
+
OClickableImageBaseModel::OClickableImageBaseModel( const Reference< XComponentContext >& _rxFactory, const OUString& _rUnoControlModelTypeName,
const OUString& rDefault )
:OControlModel( _rxFactory, _rUnoControlModelTypeName, rDefault )
@@ -462,7 +462,7 @@ namespace frm
m_eButtonType = FormButtonType_PUSH;
}
- //------------------------------------------------------------------
+
OClickableImageBaseModel::OClickableImageBaseModel( const OClickableImageBaseModel* _pOriginal, const Reference<XComponentContext>& _rxFactory )
:OControlModel( _pOriginal, _rxFactory )
,OPropertyChangeListener( m_aMutex )
@@ -481,7 +481,7 @@ namespace frm
m_bDispatchUrlInternal = _pOriginal->m_bDispatchUrlInternal;
}
- //------------------------------------------------------------------------------
+
void OClickableImageBaseModel::implInitializeImageURL( )
{
osl_atomic_increment( &m_refCount );
@@ -494,7 +494,7 @@ namespace frm
osl_atomic_decrement( &m_refCount );
}
- //------------------------------------------------------------------------------
+
void OClickableImageBaseModel::implConstruct()
{
m_pProducer = new ImageProducer;
@@ -511,7 +511,7 @@ namespace frm
decrement(m_refCount);
}
- //------------------------------------------------------------------------------
+
OClickableImageBaseModel::~OClickableImageBaseModel()
{
if (!OComponentHelper::rBHelper.bDisposed)
@@ -525,40 +525,40 @@ namespace frm
}
// XImageProducer
- //--------------------------------------------------------------------
+
void SAL_CALL OClickableImageBaseModel::addConsumer( const Reference< XImageConsumer >& _rxConsumer ) throw (RuntimeException)
{
ImageModelMethodGuard aGuard( *this );
GetImageProducer()->addConsumer( _rxConsumer );
}
- //--------------------------------------------------------------------
+
void SAL_CALL OClickableImageBaseModel::removeConsumer( const Reference< XImageConsumer >& _rxConsumer ) throw (RuntimeException)
{
ImageModelMethodGuard aGuard( *this );
GetImageProducer()->removeConsumer( _rxConsumer );
}
- //--------------------------------------------------------------------
+
void SAL_CALL OClickableImageBaseModel::startProduction( ) throw (RuntimeException)
{
ImageModelMethodGuard aGuard( *this );
GetImageProducer()->startProduction();
}
- //--------------------------------------------------------------------
+
Reference< submission::XSubmission > SAL_CALL OClickableImageBaseModel::getSubmission() throw (RuntimeException)
{
return m_xSubmissionDelegate;
}
- //--------------------------------------------------------------------
+
void SAL_CALL OClickableImageBaseModel::setSubmission( const Reference< submission::XSubmission >& _submission ) throw (RuntimeException)
{
m_xSubmissionDelegate = _submission;
}
- //--------------------------------------------------------------------
+
Sequence< OUString > SAL_CALL OClickableImageBaseModel::getSupportedServiceNames( ) throw (RuntimeException)
{
Sequence< OUString > aSupported = OControlModel::getSupportedServiceNames();
@@ -571,7 +571,7 @@ namespace frm
}
// OComponentHelper
- //------------------------------------------------------------------------------
+
void OClickableImageBaseModel::disposing()
{
OControlModel::disposing();
@@ -585,7 +585,7 @@ namespace frm
m_pProducer = NULL;
}
- //------------------------------------------------------------------------------
+
Any SAL_CALL OClickableImageBaseModel::queryAggregation(const Type& _rType) throw (RuntimeException)
{
// order matters:
@@ -603,7 +603,7 @@ namespace frm
return aReturn;
}
- //------------------------------------------------------------------------------
+
void OClickableImageBaseModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle) const
{
switch (nHandle)
@@ -617,7 +617,7 @@ namespace frm
}
}
- //------------------------------------------------------------------------------
+
void OClickableImageBaseModel::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const Any& rValue) throw ( Exception)
{
switch (nHandle)
@@ -647,7 +647,7 @@ namespace frm
}
}
- //------------------------------------------------------------------------------
+
sal_Bool OClickableImageBaseModel::convertFastPropertyValue(Any& rConvertedValue, Any& rOldValue, sal_Int32 nHandle, const Any& rValue)
throw( IllegalArgumentException )
{
@@ -670,7 +670,7 @@ namespace frm
}
}
- //------------------------------------------------------------------------------
+
void OClickableImageBaseModel::StartProduction()
{
ImageProducer *pImgProd = GetImageProducer();
@@ -704,7 +704,7 @@ namespace frm
}
}
- //------------------------------------------------------------------------------
+
void OClickableImageBaseModel::SetURL( const OUString& rURL )
{
if (m_pMedium || rURL.isEmpty())
@@ -809,7 +809,7 @@ namespace frm
}
}
- //------------------------------------------------------------------------------
+
void OClickableImageBaseModel::DataAvailable()
{
if (!m_bProdStarted)
@@ -818,14 +818,14 @@ namespace frm
GetImageProducer()->NewDataAvailable();
}
- //------------------------------------------------------------------------------
+
void OClickableImageBaseModel::DownloadDone()
{
DataAvailable();
m_bDownloading = sal_False;
}
- //------------------------------------------------------------------------------
+
IMPL_STATIC_LINK( OClickableImageBaseModel, DownloadDoneLink, void*, EMPTYARG )
{
::osl::MutexGuard aGuard( pThis->m_aMutex );
@@ -833,7 +833,7 @@ namespace frm
return 0;
}
- //------------------------------------------------------------------------------
+
void OClickableImageBaseModel::_propertyChanged( const PropertyChangeEvent& rEvt )
throw( RuntimeException )
{
@@ -843,7 +843,7 @@ namespace frm
SetURL( getString(rEvt.NewValue) );
}
- // -----------------------------------------------------------------------------
+
Any OClickableImageBaseModel::getPropertyDefaultByHandle( sal_Int32 nHandle ) const
{
switch (nHandle)
@@ -860,13 +860,13 @@ namespace frm
//==================================================================
// OImageProducerThread_Impl
//==================================================================
- //------------------------------------------------------------------
+
EventObject* OImageProducerThread_Impl::cloneEvent( const EventObject* _pEvt ) const
{
return new EventObject( *_pEvt );
}
- //------------------------------------------------------------------
+
void OImageProducerThread_Impl::processEvent( ::cppu::OComponentHelper *pCompImpl,
const EventObject* pEvt,
const Reference<XControl>&,
diff --git a/forms/source/component/cloneable.cxx b/forms/source/component/cloneable.cxx
index a54e11b19070..8bbe17854bb3 100644
--- a/forms/source/component/cloneable.cxx
+++ b/forms/source/component/cloneable.cxx
@@ -34,7 +34,7 @@ namespace frm
//====================================================================
//= OCloneableAggregation
//====================================================================
- //------------------------------------------------------------------
+
Reference< XAggregation > OCloneableAggregation::createAggregateClone( const OCloneableAggregation* _pOriginal )
{
Reference< XCloneable > xAggregateCloneable; // will be the aggregate's XCloneable
diff --git a/forms/source/component/entrylisthelper.cxx b/forms/source/component/entrylisthelper.cxx
index 07df31f2e87a..aa2a61d717a8 100644
--- a/forms/source/component/entrylisthelper.cxx
+++ b/forms/source/component/entrylisthelper.cxx
@@ -38,14 +38,14 @@ namespace frm
//=====================================================================
//= OEntryListHelper
//=====================================================================
- //---------------------------------------------------------------------
+
OEntryListHelper::OEntryListHelper( OControlModel& _rControlModel )
:m_rControlModel( _rControlModel )
,m_aRefreshListeners( _rControlModel.getInstanceMutex() )
{
}
- //---------------------------------------------------------------------
+
OEntryListHelper::OEntryListHelper( const OEntryListHelper& _rSource, OControlModel& _rControlModel )
:m_rControlModel( _rControlModel )
,m_xListSource ( _rSource.m_xListSource )
@@ -54,12 +54,12 @@ namespace frm
{
}
- //---------------------------------------------------------------------
+
OEntryListHelper::~OEntryListHelper( )
{
}
- //---------------------------------------------------------------------
+
void SAL_CALL OEntryListHelper::setListEntrySource( const Reference< XListEntrySource >& _rxSource ) throw (RuntimeException)
{
ControlModelLock aLock( m_rControlModel );
@@ -72,14 +72,14 @@ namespace frm
connectExternalListSource( _rxSource, aLock );
}
- //---------------------------------------------------------------------
+
Reference< XListEntrySource > SAL_CALL OEntryListHelper::getListEntrySource( ) throw (RuntimeException)
{
return m_xListSource;
}
- //---------------------------------------------------------------------
+
void SAL_CALL OEntryListHelper::entryChanged( const ListEntryEvent& _rEvent ) throw (RuntimeException)
{
ControlModelLock aLock( m_rControlModel );
@@ -101,7 +101,7 @@ namespace frm
}
}
- //---------------------------------------------------------------------
+
void SAL_CALL OEntryListHelper::entryRangeInserted( const ListEntryEvent& _rEvent ) throw (RuntimeException)
{
ControlModelLock aLock( m_rControlModel );
@@ -138,7 +138,7 @@ namespace frm
}
}
- //---------------------------------------------------------------------
+
void SAL_CALL OEntryListHelper::entryRangeRemoved( const ListEntryEvent& _rEvent ) throw (RuntimeException)
{
ControlModelLock aLock( m_rControlModel );
@@ -166,7 +166,7 @@ namespace frm
}
}
- //---------------------------------------------------------------------
+
void SAL_CALL OEntryListHelper::allEntriesChanged( const EventObject& _rEvent ) throw (RuntimeException)
{
ControlModelLock aLock( m_rControlModel );
@@ -182,21 +182,21 @@ namespace frm
}
// XRefreshable
- //------------------------------------------------------------------------------
+
void SAL_CALL OEntryListHelper::addRefreshListener(const Reference<XRefreshListener>& _rxListener) throw(RuntimeException)
{
if ( _rxListener.is() )
m_aRefreshListeners.addInterface( _rxListener );
}
- //------------------------------------------------------------------------------
+
void SAL_CALL OEntryListHelper::removeRefreshListener(const Reference<XRefreshListener>& _rxListener) throw(RuntimeException)
{
if ( _rxListener.is() )
m_aRefreshListeners.removeInterface( _rxListener );
}
- //------------------------------------------------------------------------------
+
void SAL_CALL OEntryListHelper::refresh() throw(RuntimeException)
{
{
@@ -208,7 +208,7 @@ namespace frm
m_aRefreshListeners.notifyEach( &XRefreshListener::refreshed, aEvt );
}
- //---------------------------------------------------------------------
+
void OEntryListHelper::impl_lock_refreshList( ControlModelLock& _rInstanceLock )
{
if ( hasExternalListSource() )
@@ -220,7 +220,7 @@ namespace frm
refreshInternalEntryList();
}
- //---------------------------------------------------------------------
+
bool OEntryListHelper::handleDisposing( const EventObject& _rEvent )
{
if ( m_xListSource .is() && ( _rEvent.Source == m_xListSource ) )
@@ -231,7 +231,7 @@ namespace frm
return false;
}
- //---------------------------------------------------------------------
+
void OEntryListHelper::disposing( )
{
EventObject aEvt( static_cast< XRefreshable* >( this ) );
@@ -241,7 +241,7 @@ namespace frm
disconnectExternalListSource( );
}
- //---------------------------------------------------------------------
+
void OEntryListHelper::disconnectExternalListSource( )
{
if ( m_xListSource.is() )
@@ -252,19 +252,19 @@ namespace frm
disconnectedExternalListSource();
}
- //---------------------------------------------------------------------
+
void OEntryListHelper::connectedExternalListSource( )
{
// nothing to do here
}
- //---------------------------------------------------------------------
+
void OEntryListHelper::disconnectedExternalListSource( )
{
// nothing to do here
}
- //---------------------------------------------------------------------
+
void OEntryListHelper::connectExternalListSource( const Reference< XListEntrySource >& _rxSource, ControlModelLock& _rInstanceLock )
{
OSL_ENSURE( !hasExternalListSource(), "OEntryListHelper::connectExternalListSource: only to be called if no external source is active!" );
@@ -287,7 +287,7 @@ namespace frm
}
}
- //---------------------------------------------------------------------
+
sal_Bool OEntryListHelper::convertNewListSourceProperty( Any& _rConvertedValue,
Any& _rOldValue, const Any& _rValue ) SAL_THROW( ( IllegalArgumentException ) )
{
@@ -298,7 +298,7 @@ namespace frm
return ::comphelper::tryPropertyValue( _rConvertedValue, _rOldValue, _rValue, m_aStringItems );
}
- //---------------------------------------------------------------------
+
void OEntryListHelper::setNewStringItemList( const ::com::sun::star::uno::Any& _rValue, ControlModelLock& _rInstanceLock )
{
OSL_PRECOND( !hasExternalListSource(), "OEntryListHelper::setNewStringItemList: this should never have survived convertNewListSourceProperty!" );
diff --git a/forms/source/component/errorbroadcaster.cxx b/forms/source/component/errorbroadcaster.cxx
index f9a010ba112f..d90646f5f806 100644
--- a/forms/source/component/errorbroadcaster.cxx
+++ b/forms/source/component/errorbroadcaster.cxx
@@ -35,14 +35,14 @@ namespace frm
//=====================================================================
//= OErrorBroadcaster
//=====================================================================
- //---------------------------------------------------------------------
+
OErrorBroadcaster::OErrorBroadcaster( ::cppu::OBroadcastHelper& _rBHelper )
:m_rBHelper( _rBHelper )
,m_aErrorListeners( _rBHelper.rMutex )
{
}
- //---------------------------------------------------------------------
+
OErrorBroadcaster::~OErrorBroadcaster( )
{
SAL_WARN_IF( !m_rBHelper.bDisposed && !m_rBHelper.bInDispose, "forms.component",
@@ -54,14 +54,14 @@ namespace frm
// either we're not disposed, or the derived class did not call our dispose from within their dispose
}
- //---------------------------------------------------------------------
+
void SAL_CALL OErrorBroadcaster::disposing()
{
EventObject aDisposeEvent( static_cast< XSQLErrorBroadcaster* >( this ) );
m_aErrorListeners.disposeAndClear( aDisposeEvent );
}
- //------------------------------------------------------------------------------
+
void SAL_CALL OErrorBroadcaster::onError( const SQLException& _rException, const OUString& _rContextDescription )
{
Any aError;
@@ -73,7 +73,7 @@ namespace frm
onError( SQLErrorEvent( static_cast< XSQLErrorBroadcaster* >( this ), aError ) );
}
- //------------------------------------------------------------------------------
+
void SAL_CALL OErrorBroadcaster::onError( const ::com::sun::star::sdb::SQLErrorEvent& _rError )
{
if ( m_aErrorListeners.getLength() )
@@ -85,13 +85,13 @@ namespace frm
}
}
- //------------------------------------------------------------------------------
+
void SAL_CALL OErrorBroadcaster::addSQLErrorListener( const Reference< XSQLErrorListener >& _rxListener ) throw( RuntimeException )
{
m_aErrorListeners.addInterface( _rxListener );
}
- //------------------------------------------------------------------------------
+
void SAL_CALL OErrorBroadcaster::removeSQLErrorListener( const Reference< XSQLErrorListener >& _rxListener ) throw( RuntimeException )
{
m_aErrorListeners.removeInterface( _rxListener );
diff --git a/forms/source/component/formcontrolfont.cxx b/forms/source/component/formcontrolfont.cxx
index 1a4690fdd6d4..8f7162803e97 100644
--- a/forms/source/component/formcontrolfont.cxx
+++ b/forms/source/component/formcontrolfont.cxx
@@ -39,7 +39,7 @@ namespace frm
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::beans;
- //------------------------------------------------------------------------------
+
namespace
{
Any lcl_extractFontDescriptorAggregate( sal_Int32 _nHandle, const FontDescriptor& _rFont )
@@ -122,7 +122,7 @@ namespace frm
//=====================================================================
//= FontControlModel
//=====================================================================
- //---------------------------------------------------------------------
+
FontControlModel::FontControlModel( bool _bToolkitCompatibleDefaults )
:m_nFontRelief( FontRelief::NONE )
,m_nFontEmphasis( FontEmphasisMark::NONE )
@@ -130,7 +130,7 @@ namespace frm
{
}
- //---------------------------------------------------------------------
+
FontControlModel::FontControlModel( const FontControlModel* _pOriginal )
{
m_aFont = _pOriginal->m_aFont;
@@ -141,7 +141,7 @@ namespace frm
m_bToolkitCompatibleDefaults = _pOriginal->m_bToolkitCompatibleDefaults;
}
- //---------------------------------------------------------------------
+
bool FontControlModel::isFontRelatedProperty( sal_Int32 _nPropertyHandle ) const
{
return isFontAggregateProperty( _nPropertyHandle )
@@ -152,7 +152,7 @@ namespace frm
|| ( _nPropertyHandle == PROPERTY_ID_TEXTCOLOR );
}
- //---------------------------------------------------------------------
+
bool FontControlModel::isFontAggregateProperty( sal_Int32 _nPropertyHandle ) const
{
return ( _nPropertyHandle == PROPERTY_ID_FONT_CHARWIDTH )
@@ -173,7 +173,7 @@ namespace frm
|| ( _nPropertyHandle == PROPERTY_ID_FONT_TYPE );
}
- //---------------------------------------------------------------------
+
sal_Int32 FontControlModel::getTextColor( ) const
{
sal_Int32 nColor = COL_TRANSPARENT;
@@ -181,7 +181,7 @@ namespace frm
return nColor;
}
- //---------------------------------------------------------------------
+
sal_Int32 FontControlModel::getTextLineColor( ) const
{
sal_Int32 nColor = COL_TRANSPARENT;
@@ -189,7 +189,7 @@ namespace frm
return nColor;
}
- //------------------------------------------------------------------------------
+
void FontControlModel::describeFontRelatedProperties( Sequence< Property >& /* [out] */ _rProps ) const
{
sal_Int32 nPos = _rProps.getLength();
@@ -220,7 +220,7 @@ namespace frm
DECL_BOOL_PROP1 ( FONT_WORDLINEMODE, MAYBEDEFAULT );
}
- //---------------------------------------------------------------------
+
void FontControlModel::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) const
{
switch( _nHandle )
@@ -251,7 +251,7 @@ namespace frm
}
}
- //---------------------------------------------------------------------
+
sal_Bool FontControlModel::convertFastPropertyValue( Any& _rConvertedValue, Any& _rOldValue,
sal_Int32 _nHandle, const Any& _rValue ) throw( IllegalArgumentException )
{
@@ -351,7 +351,7 @@ namespace frm
return bModified;
}
- //------------------------------------------------------------------------------
+
static void setFastPropertyValue_NoBroadcast_implimpl(
FontDescriptor & rFont,
sal_Int32 nHandle, const Any& rValue) throw (Exception)
@@ -488,7 +488,7 @@ namespace frm
}
}
- //------------------------------------------------------------------------------
+
Any FontControlModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
{
Any aReturn;
diff --git a/forms/source/component/imgprod.cxx b/forms/source/component/imgprod.cxx
index e9c6a695a2e9..d374b6707acb 100644
--- a/forms/source/component/imgprod.cxx
+++ b/forms/source/component/imgprod.cxx
@@ -30,9 +30,9 @@
#include "svtools/imageresourceaccess.hxx"
#include <comphelper/processfactory.hxx>
-// --------------------
+
// - ImgProdLockBytes -
-// --------------------
+
class ImgProdLockBytes : public SvLockBytes
{
@@ -54,14 +54,14 @@ public:
virtual ErrCode Stat( SvLockBytesStat*, SvLockBytesStatFlag ) const;
};
-// ------------------------------------------------------------------------
+
ImgProdLockBytes::ImgProdLockBytes( SvStream* pStm, sal_Bool bOwner ) :
SvLockBytes( pStm, bOwner )
{
}
-// ------------------------------------------------------------------------
+
ImgProdLockBytes::ImgProdLockBytes( ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > & rStmRef ) :
xStmRef( rStmRef )
@@ -88,13 +88,13 @@ ImgProdLockBytes::ImgProdLockBytes( ::com::sun::star::uno::Reference< ::com::sun
}
}
-// ------------------------------------------------------------------------
+
ImgProdLockBytes::~ImgProdLockBytes()
{
}
-// ------------------------------------------------------------------------
+
ErrCode ImgProdLockBytes::ReadAt( sal_Size nPos, void* pBuffer, sal_Size nCount, sal_Size* pRead ) const
{
@@ -125,7 +125,7 @@ ErrCode ImgProdLockBytes::ReadAt( sal_Size nPos, void* pBuffer, sal_Size nCount,
}
}
-// ------------------------------------------------------------------------
+
ErrCode ImgProdLockBytes::WriteAt( sal_Size nPos, const void* pBuffer, sal_Size nCount, sal_Size* pWritten )
{
@@ -138,14 +138,14 @@ ErrCode ImgProdLockBytes::WriteAt( sal_Size nPos, const void* pBuffer, sal_Size
}
}
-// ------------------------------------------------------------------------
+
ErrCode ImgProdLockBytes::Flush() const
{
return ERRCODE_NONE;
}
-// ------------------------------------------------------------------------
+
ErrCode ImgProdLockBytes::SetSize( sal_Size nSize )
{
@@ -158,7 +158,7 @@ ErrCode ImgProdLockBytes::SetSize( sal_Size nSize )
}
}
-// ------------------------------------------------------------------------
+
ErrCode ImgProdLockBytes::Stat( SvLockBytesStat* pStat, SvLockBytesStatFlag eFlag ) const
{
@@ -172,9 +172,9 @@ ErrCode ImgProdLockBytes::Stat( SvLockBytesStat* pStat, SvLockBytesStatFlag eFla
}
}
-// -----------------
+
// - ImageProducer -
-// -----------------
+
ImageProducer::ImageProducer() :
mpStm ( NULL ),
@@ -183,7 +183,7 @@ ImageProducer::ImageProducer() :
mpGraphic = new Graphic;
}
-// ------------------------------------------------------------
+
ImageProducer::~ImageProducer()
{
@@ -194,7 +194,7 @@ ImageProducer::~ImageProducer()
mpStm = NULL;
}
-// ------------------------------------------------------------
+
// ::com::sun::star::uno::XInterface
::com::sun::star::uno::Any ImageProducer::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException)
@@ -205,7 +205,7 @@ ImageProducer::~ImageProducer()
return (aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ));
}
-// ------------------------------------------------------------
+
void ImageProducer::addConsumer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer >& rxConsumer )
throw(::com::sun::star::uno::RuntimeException,
@@ -216,7 +216,7 @@ void ImageProducer::addConsumer( const ::com::sun::star::uno::Reference< ::com::
maConsList.push_back( new ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > ( rxConsumer ));
}
-// ------------------------------------------------------------
+
void ImageProducer::removeConsumer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer >& rxConsumer ) throw(::com::sun::star::uno::RuntimeException)
{
@@ -226,7 +226,7 @@ void ImageProducer::removeConsumer( const ::com::sun::star::uno::Reference< ::co
maConsList.erase(riter.base()-1);
}
-// ------------------------------------------------------------
+
void ImageProducer::SetImage( const OUString& rPath )
{
@@ -248,7 +248,7 @@ void ImageProducer::SetImage( const OUString& rPath )
mpStm = NULL;
}
-// ------------------------------------------------------------
+
void ImageProducer::SetImage( SvStream& rStm )
{
@@ -260,7 +260,7 @@ void ImageProducer::SetImage( SvStream& rStm )
mpStm = new SvStream( new ImgProdLockBytes( &rStm, sal_False ) );
}
-// ------------------------------------------------------------
+
void ImageProducer::setImage( ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > & rInputStmRef )
{
@@ -275,7 +275,7 @@ void ImageProducer::setImage( ::com::sun::star::uno::Reference< ::com::sun::star
mpStm = NULL;
}
-// ------------------------------------------------------------
+
void ImageProducer::NewDataAvailable()
{
@@ -283,7 +283,7 @@ void ImageProducer::NewDataAvailable()
startProduction();
}
-// ------------------------------------------------------------
+
void ImageProducer::startProduction() throw(::com::sun::star::uno::RuntimeException)
{
@@ -329,7 +329,7 @@ void ImageProducer::startProduction() throw(::com::sun::star::uno::RuntimeExcept
}
}
-// ------------------------------------------------------------
+
sal_Bool ImageProducer::ImplImportGraphic( Graphic& rGraphic )
{
@@ -349,7 +349,7 @@ sal_Bool ImageProducer::ImplImportGraphic( Graphic& rGraphic )
return bRet;
}
-// ------------------------------------------------------------
+
void ImageProducer::ImplUpdateData( const Graphic& rGraphic )
{
@@ -369,7 +369,7 @@ void ImageProducer::ImplUpdateData( const Graphic& rGraphic )
}
}
-// ------------------------------------------------------------
+
void ImageProducer::ImplInitConsumer( const Graphic& rGraphic )
{
@@ -440,7 +440,7 @@ void ImageProducer::ImplInitConsumer( const Graphic& rGraphic )
}
}
-// ------------------------------------------------------------
+
void ImageProducer::ImplUpdateConsumer( const Graphic& rGraphic )
{
diff --git a/forms/source/component/navigationbar.cxx b/forms/source/component/navigationbar.cxx
index ffbe14b13c4f..f70aec47debb 100644
--- a/forms/source/component/navigationbar.cxx
+++ b/forms/source/component/navigationbar.cxx
@@ -26,7 +26,7 @@
#include <comphelper/basicio.hxx>
#include <comphelper/processfactory.hxx>
-//--------------------------------------------------------------------------
+
extern "C" void SAL_CALL createRegistryInfo_ONavigationBarModel()
{
static ::frm::OMultiInstanceAutoRegistration< ::frm::ONavigationBarModel > aAutoRegistration;
@@ -56,7 +56,7 @@ namespace frm
//==================================================================
// ONavigationBarModel
//==================================================================
- //------------------------------------------------------------------
+
ONavigationBarModel::ONavigationBarModel( const Reference< XComponentContext >& _rxFactory )
:OControlModel( _rxFactory, OUString() )
,FontControlModel( true )
@@ -79,7 +79,7 @@ namespace frm
getPropertyDefaultByHandle( PROPERTY_ID_CONTEXT_WRITING_MODE ) >>= m_nContextWritingMode;
}
- //------------------------------------------------------------------
+
ONavigationBarModel::ONavigationBarModel( const ONavigationBarModel* _pOriginal, const Reference< XComponentContext >& _rxFactory )
:OControlModel( _pOriginal, _rxFactory )
,FontControlModel( _pOriginal )
@@ -105,7 +105,7 @@ namespace frm
m_nContextWritingMode = _pOriginal->m_nContextWritingMode;
}
- //------------------------------------------------------------------
+
void ONavigationBarModel::implInitPropertyContainer()
{
REGISTER_PROP_2( DEFAULTCONTROL, m_sDefaultControl, BOUND, MAYBEDEFAULT );
@@ -127,7 +127,7 @@ namespace frm
REGISTER_VOID_PROP( BACKGROUNDCOLOR, m_aBackgroundColor, sal_Int32 );
}
- //------------------------------------------------------------------
+
ONavigationBarModel::~ONavigationBarModel()
{
if ( !OComponentHelper::rBHelper.bDisposed )
@@ -138,7 +138,7 @@ namespace frm
}
- //------------------------------------------------------------------
+
Any SAL_CALL ONavigationBarModel::queryAggregation( const Type& _rType ) throw ( RuntimeException )
{
Any aReturn = ONavigationBarModel_BASE::queryInterface( _rType );
@@ -149,31 +149,31 @@ namespace frm
return aReturn;
}
- //------------------------------------------------------------------
+
IMPLEMENT_FORWARD_XTYPEPROVIDER2( ONavigationBarModel, OControlModel, ONavigationBarModel_BASE )
- //------------------------------------------------------------------------------
+
IMPLEMENT_DEFAULT_CLONING( ONavigationBarModel )
- //------------------------------------------------------------------
+
OUString SAL_CALL ONavigationBarModel::getImplementationName() throw(RuntimeException)
{
return getImplementationName_Static();
}
- //------------------------------------------------------------------
+
Sequence< OUString > SAL_CALL ONavigationBarModel::getSupportedServiceNames() throw(RuntimeException)
{
return getSupportedServiceNames_Static();
}
- //------------------------------------------------------------------
+
OUString SAL_CALL ONavigationBarModel::getImplementationName_Static()
{
return OUString( "com.sun.star.comp.form.ONavigationBarModel" );
}
- //------------------------------------------------------------------
+
Sequence< OUString > SAL_CALL ONavigationBarModel::getSupportedServiceNames_Static()
{
Sequence< OUString > aSupported = OControlModel::getSupportedServiceNames_Static();
@@ -185,25 +185,25 @@ namespace frm
return aSupported;
}
- //------------------------------------------------------------------
+
Reference< XInterface > SAL_CALL ONavigationBarModel::Create( const Reference< XMultiServiceFactory >& _rxFactory )
{
return *( new ONavigationBarModel( comphelper::getComponentContext(_rxFactory) ) );
}
- //------------------------------------------------------------------
+
void SAL_CALL ONavigationBarModel::disposing()
{
OControlModel::disposing( );
}
- //------------------------------------------------------------------
+
OUString SAL_CALL ONavigationBarModel::getServiceName() throw ( RuntimeException )
{
return OUString(FRM_SUN_COMPONENT_NAVTOOLBAR);
}
- //------------------------------------------------------------------
+
#define PERSIST_TABSTOP 0x0001
#define PERSIST_BACKGROUND 0x0002
#define PERSIST_TEXTCOLOR 0x0004
@@ -217,7 +217,7 @@ namespace frm
#define PERSIST_SHOW_ACTIONS 0x0020
#define PERSIST_SHOW_FILTERSORT 0x0040
- //------------------------------------------------------------------
+
void SAL_CALL ONavigationBarModel::write( const Reference< XObjectOutputStream >& _rxOutStream ) throw ( IOException, RuntimeException )
{
// open a section for compatibility - if we later on write additional members,
@@ -290,7 +290,7 @@ namespace frm
_rxOutStream->writeLong ( m_nDelay );
}
- //------------------------------------------------------------------
+
void SAL_CALL ONavigationBarModel::read( const Reference< XObjectInputStream >& _rxInStream ) throw ( IOException, RuntimeException )
{
OStreamSection aEnsureBlockCompat( _rxInStream );
@@ -351,7 +351,7 @@ namespace frm
m_nDelay = _rxInStream->readLong();
}
- //------------------------------------------------------------------
+
void SAL_CALL ONavigationBarModel::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) const
{
if ( isRegisteredProperty( _nHandle ) )
@@ -368,7 +368,7 @@ namespace frm
}
}
- //------------------------------------------------------------------
+
sal_Bool SAL_CALL ONavigationBarModel::convertFastPropertyValue( Any& _rConvertedValue, Any& _rOldValue,
sal_Int32 _nHandle, const Any& _rValue ) throw( IllegalArgumentException )
{
@@ -390,7 +390,7 @@ namespace frm
return bModified;
}
- //------------------------------------------------------------------
+
void SAL_CALL ONavigationBarModel::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const Any& _rValue ) throw ( Exception )
{
if ( isRegisteredProperty( _nHandle ) )
@@ -409,7 +409,7 @@ namespace frm
}
}
- //------------------------------------------------------------------
+
Any ONavigationBarModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
{
Any aDefault;
@@ -464,7 +464,7 @@ namespace frm
return aDefault;
}
- //------------------------------------------------------------------
+
void ONavigationBarModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 1, OControlModel )
diff --git a/forms/source/component/propertybaghelper.cxx b/forms/source/component/propertybaghelper.cxx
index 01dadf9d7808..833ad7bfac95 100644
--- a/forms/source/component/propertybaghelper.cxx
+++ b/forms/source/component/propertybaghelper.cxx
@@ -62,7 +62,7 @@ namespace frm
//====================================================================
namespace
{
- //----------------------------------------------------------------
+
static ::comphelper::IPropertyInfoService& lcl_getPropertyInfos()
{
static ConcreteInfoService s_aPropInfos;
@@ -73,7 +73,7 @@ namespace frm
//====================================================================
//= PropertyBagHelper
//====================================================================
- //--------------------------------------------------------------------
+
PropertyBagHelper::PropertyBagHelper( IPropertyBagHelperContext& _rContext )
:m_rContext( _rContext )
,m_pPropertyArrayHelper( NULL )
@@ -81,32 +81,32 @@ namespace frm
{
}
- //--------------------------------------------------------------------
+
PropertyBagHelper::~PropertyBagHelper()
{
delete m_pPropertyArrayHelper, m_pPropertyArrayHelper = NULL;
}
- //--------------------------------------------------------------------
+
void PropertyBagHelper::dispose()
{
m_bDisposed = true;
}
- //--------------------------------------------------------------------
+
void PropertyBagHelper::impl_nts_checkDisposed_throw() const
{
if ( m_bDisposed )
throw DisposedException();
}
- //--------------------------------------------------------------------
+
void PropertyBagHelper::impl_nts_invalidatePropertySetInfo()
{
delete m_pPropertyArrayHelper, m_pPropertyArrayHelper = NULL;
}
- //--------------------------------------------------------------------
+
sal_Int32 PropertyBagHelper::impl_findFreeHandle( const OUString& _rPropertyName )
{
::comphelper::OPropertyArrayAggregationHelper& rPropInfo( impl_ts_getArrayHelper() );
@@ -145,7 +145,7 @@ namespace frm
return nHandle;
}
- //--------------------------------------------------------------------
+
::comphelper::OPropertyArrayAggregationHelper& PropertyBagHelper::impl_ts_getArrayHelper() const
{
OPropertyArrayAggregationHelper* p = m_pPropertyArrayHelper;
@@ -179,34 +179,34 @@ namespace frm
return *p;
}
- //--------------------------------------------------------------------
+
void PropertyBagHelper::addProperty( const OUString& _rName, ::sal_Int16 _nAttributes, const Any& _rInitialValue )
{
::osl::MutexGuard aGuard( m_rContext.getMutex() );
impl_nts_checkDisposed_throw();
- //----------------------------------------------
+
// check name sanity
::comphelper::OPropertyArrayAggregationHelper& aPropInfo( impl_ts_getArrayHelper() );
if ( aPropInfo.hasPropertyByName( _rName ) )
throw PropertyExistException( _rName, m_rContext.getPropertiesInterface() );
- //----------------------------------------------
+
// normalize the REMOVABLE attribute - the FormComponent service
// requires that all dynamic properties are REMOVABLE
_nAttributes |= PropertyAttribute::REMOVABLE;
- //----------------------------------------------
+
// find a free handle
sal_Int32 nHandle = impl_findFreeHandle( _rName );
- //----------------------------------------------
+
// register the property, and invalidate our property meta data
m_aDynamicProperties.addProperty( _rName, nHandle, _nAttributes, _rInitialValue );
impl_nts_invalidatePropertySetInfo();
}
- //--------------------------------------------------------------------
+
void PropertyBagHelper::removeProperty( const OUString& _rName )
{
::osl::MutexGuard aGuard( m_rContext.getMutex() );
@@ -223,28 +223,28 @@ namespace frm
impl_nts_invalidatePropertySetInfo();
}
- //--------------------------------------------------------------------
+
namespace
{
- //----------------------------------------------------------------
+
struct SelectNameOfProperty : public ::std::unary_function< Property, OUString >
{
const OUString& operator()( const Property& _rProp ) const { return _rProp.Name; }
};
- //----------------------------------------------------------------
+
struct SelectNameOfPropertyValue : public ::std::unary_function< PropertyValue, OUString >
{
const OUString& operator()( const PropertyValue& _rProp ) const { return _rProp.Name; }
};
- //----------------------------------------------------------------
+
struct SelectValueOfPropertyValue : public ::std::unary_function< PropertyValue, Any >
{
const Any& operator()( const PropertyValue& _rProp ) const { return _rProp.Value; }
};
- //----------------------------------------------------------------
+
struct PropertyValueLessByName : public ::std::binary_function< PropertyValue, PropertyValue, bool >
{
bool operator()( const PropertyValue& _lhs, const PropertyValue _rhs ) const
@@ -254,7 +254,7 @@ namespace frm
};
}
- //--------------------------------------------------------------------
+
Sequence< PropertyValue > PropertyBagHelper::getPropertyValues()
{
::osl::MutexGuard aGuard( m_rContext.getMutex() );
@@ -296,7 +296,7 @@ namespace frm
return aPropertyValues;
}
- //--------------------------------------------------------------------
+
void PropertyBagHelper::setPropertyValues( const Sequence< PropertyValue >& _rProps )
{
::osl::ClearableMutexGuard aGuard( m_rContext.getMutex() );
diff --git a/forms/source/component/refvaluecomponent.cxx b/forms/source/component/refvaluecomponent.cxx
index dddb795d7682..2d051e6d7418 100644
--- a/forms/source/component/refvaluecomponent.cxx
+++ b/forms/source/component/refvaluecomponent.cxx
@@ -36,7 +36,7 @@ namespace frm
//====================================================================
//=
//====================================================================
- //--------------------------------------------------------------------
+
OReferenceValueComponent::OReferenceValueComponent( const Reference< XComponentContext >& _rxFactory, const OUString& _rUnoControlModelTypeName, const OUString& _rDefault, sal_Bool _bSupportNoCheckRefValue )
:OBoundControlModel( _rxFactory, _rUnoControlModelTypeName, _rDefault, sal_False, sal_True, sal_True )
,m_eDefaultChecked( STATE_NOCHECK )
@@ -44,7 +44,7 @@ namespace frm
{
}
- //--------------------------------------------------------------------
+
OReferenceValueComponent::OReferenceValueComponent( const OReferenceValueComponent* _pOriginal, const Reference< XComponentContext>& _rxFactory )
:OBoundControlModel( _pOriginal, _rxFactory )
{
@@ -56,19 +56,19 @@ namespace frm
calculateExternalValueType();
}
- //--------------------------------------------------------------------
+
OReferenceValueComponent::~OReferenceValueComponent()
{
}
- //--------------------------------------------------------------------
+
void OReferenceValueComponent::setReferenceValue( const OUString& _rRefValue )
{
m_sReferenceValue = _rRefValue;
calculateExternalValueType();
}
- //--------------------------------------------------------------------
+
void SAL_CALL OReferenceValueComponent::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) const
{
switch ( _nHandle )
@@ -86,7 +86,7 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
void SAL_CALL OReferenceValueComponent::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const Any& _rValue ) throw (Exception)
{
switch ( _nHandle )
@@ -115,7 +115,7 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
sal_Bool SAL_CALL OReferenceValueComponent::convertFastPropertyValue( Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue ) throw (IllegalArgumentException)
{
sal_Bool bModified = sal_False;
@@ -141,13 +141,13 @@ namespace frm
return bModified;
}
- //------------------------------------------------------------------------------
+
Any OReferenceValueComponent::getDefaultForReset() const
{
return makeAny( (sal_Int16)m_eDefaultChecked );
}
- //--------------------------------------------------------------------
+
void OReferenceValueComponent::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( m_bSupportSecondRefValue ? 3 : 2, OBoundControlModel )
@@ -160,7 +160,7 @@ namespace frm
END_DESCRIBE_PROPERTIES();
}
- //-----------------------------------------------------------------------------
+
Sequence< Type > OReferenceValueComponent::getSupportedBindingTypes()
{
::std::list< Type > aTypes;
@@ -175,7 +175,7 @@ namespace frm
return aTypesRet;
}
- //-----------------------------------------------------------------------------
+
Any OReferenceValueComponent::translateExternalValueToControlValue( const Any& _rExternalValue ) const
{
sal_Int16 nState = STATE_DONTKNOW;
@@ -210,7 +210,7 @@ namespace frm
return makeAny( nState );
}
- //-----------------------------------------------------------------------------
+
Any OReferenceValueComponent::translateControlValueToExternalValue( ) const
{
Any aExternalValue;
@@ -259,7 +259,7 @@ namespace frm
return aExternalValue;
}
- //-----------------------------------------------------------------------------
+
Any OReferenceValueComponent::translateControlValueToValidatableValue( ) const
{
if ( !m_xAggregateSet.is() )
diff --git a/forms/source/component/scrollbar.cxx b/forms/source/component/scrollbar.cxx
index a6c30aebf538..ca2b75e8f56e 100644
--- a/forms/source/component/scrollbar.cxx
+++ b/forms/source/component/scrollbar.cxx
@@ -22,7 +22,7 @@
#include <comphelper/basicio.hxx>
#include <rtl/math.hxx>
-//--------------------------------------------------------------------------
+
extern "C" void SAL_CALL createRegistryInfo_OScrollBarModel()
{
static ::frm::OMultiInstanceAutoRegistration< ::frm::OScrollBarModel > aRegisterModel;
@@ -45,7 +45,7 @@ namespace frm
//====================================================================
//= helper
//====================================================================
- //--------------------------------------------------------------------
+
Any translateExternalDoubleToControlIntValue(
const Any& _rExternalValue, const Reference< XPropertySet >& _rxProperties,
const OUString& _rMinValueName, const OUString& _rMaxValueName )
@@ -78,7 +78,7 @@ namespace frm
return makeAny( nControlValue );
}
- //--------------------------------------------------------------------
+
Any translateControlIntToExternalDoubleValue( const Any& _rControlIntValue )
{
Any aExternalDoubleValue;
@@ -97,8 +97,8 @@ namespace frm
//====================================================================
//= OScrollBarModel
//====================================================================
- //--------------------------------------------------------------------
- //--------------------------------------------------------------------
+
+
OScrollBarModel::OScrollBarModel( const Reference<XComponentContext>& _rxFactory )
:OBoundControlModel( _rxFactory, VCL_CONTROLMODEL_SCROLLBAR, VCL_CONTROL_SCROLLBAR, sal_True, sal_True, sal_False )
,m_nDefaultScrollValue( 0 )
@@ -108,35 +108,35 @@ namespace frm
initValueProperty( PROPERTY_SCROLL_VALUE, PROPERTY_ID_SCROLL_VALUE );
}
- //--------------------------------------------------------------------
+
OScrollBarModel::OScrollBarModel( const OScrollBarModel* _pOriginal, const Reference< XComponentContext >& _rxFactory )
:OBoundControlModel( _pOriginal, _rxFactory )
{
m_nDefaultScrollValue = _pOriginal->m_nDefaultScrollValue;
}
- //--------------------------------------------------------------------
+
OScrollBarModel::~OScrollBarModel( )
{
}
- //--------------------------------------------------------------------
+
IMPLEMENT_SERVICE_REGISTRATION_2( OScrollBarModel, OControlModel, FRM_SUN_COMPONENT_SCROLLBAR, BINDABLE_INTEGER_VALUE_RANGE )
// note that we're passing OControlModel as "base class". This is because
// OBoundControlModel, our real base class, claims to support the DataAwareControlModel
// service, which isn't really true for us. We only derive from this class
// to benefit from the functionality for binding to spreadsheet cells
- //------------------------------------------------------------------------------
+
IMPLEMENT_DEFAULT_CLONING( OScrollBarModel )
- //------------------------------------------------------------------------------
+
void SAL_CALL OScrollBarModel::disposing()
{
OBoundControlModel::disposing();
}
- //--------------------------------------------------------------------
+
void OScrollBarModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 3, OControlModel )
@@ -146,7 +146,7 @@ namespace frm
END_DESCRIBE_PROPERTIES();
}
- //------------------------------------------------------------------------------
+
void OScrollBarModel::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) const
{
switch ( _nHandle )
@@ -160,7 +160,7 @@ namespace frm
}
}
- //------------------------------------------------------------------------------
+
void OScrollBarModel::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const Any& _rValue ) throw ( Exception )
{
switch ( _nHandle )
@@ -175,7 +175,7 @@ namespace frm
}
}
- //------------------------------------------------------------------------------
+
sal_Bool OScrollBarModel::convertFastPropertyValue(
Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue )
throw ( IllegalArgumentException )
@@ -194,7 +194,7 @@ namespace frm
return bModified;
}
- //--------------------------------------------------------------------
+
Any OScrollBarModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
{
Any aReturn;
@@ -213,33 +213,33 @@ namespace frm
return aReturn;
}
- //------------------------------------------------------------------------------
+
Any OScrollBarModel::translateDbColumnToControlValue( )
{
OSL_FAIL( "OScrollBarModel::commitControlValueToDbColumn: never to be called (we're not bound)!" );
return Any();
}
- //------------------------------------------------------------------------------
+
sal_Bool OScrollBarModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
{
OSL_FAIL( "OScrollBarModel::commitControlValueToDbColumn: never to be called (we're not bound)!" );
return sal_True;
}
- //------------------------------------------------------------------------------
+
Any OScrollBarModel::getDefaultForReset() const
{
return makeAny( (sal_Int32)m_nDefaultScrollValue );
}
- //--------------------------------------------------------------------
+
OUString SAL_CALL OScrollBarModel::getServiceName() throw( RuntimeException )
{
return OUString(FRM_SUN_COMPONENT_SCROLLBAR);
}
- //--------------------------------------------------------------------
+
void SAL_CALL OScrollBarModel::write( const Reference< XObjectOutputStream >& _rxOutStream )
throw( IOException, RuntimeException )
{
@@ -256,7 +256,7 @@ namespace frm
writeHelpTextCompatibly( _rxOutStream );
}
- //--------------------------------------------------------------------
+
void SAL_CALL OScrollBarModel::read( const Reference< XObjectInputStream>& _rxInStream ) throw( IOException, RuntimeException )
{
OBoundControlModel::read( _rxInStream );
@@ -279,7 +279,7 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
Any OScrollBarModel::translateExternalValueToControlValue( const Any& _rExternalValue ) const
{
return translateExternalDoubleToControlIntValue( _rExternalValue, m_xAggregateSet,
@@ -287,14 +287,14 @@ namespace frm
OUString( "ScrollValueMax" ) );
}
- //--------------------------------------------------------------------
+
Any OScrollBarModel::translateControlValueToExternalValue( ) const
{
// by definition, the base class simply obtains the property value
return translateControlIntToExternalDoubleValue( OBoundControlModel::translateControlValueToExternalValue() );
}
- //--------------------------------------------------------------------
+
Sequence< Type > OScrollBarModel::getSupportedBindingTypes()
{
return Sequence< Type >( &::getCppuType( static_cast< double* >( NULL ) ), 1 );
diff --git a/forms/source/component/spinbutton.cxx b/forms/source/component/spinbutton.cxx
index f7103af924e2..82429b0cd410 100644
--- a/forms/source/component/spinbutton.cxx
+++ b/forms/source/component/spinbutton.cxx
@@ -21,7 +21,7 @@
#include <comphelper/streamsection.hxx>
#include <comphelper/basicio.hxx>
-//--------------------------------------------------------------------------
+
extern "C" void SAL_CALL createRegistryInfo_OSpinButtonModel()
{
static ::frm::OMultiInstanceAutoRegistration< ::frm::OSpinButtonModel > aRegisterModel;
@@ -53,8 +53,8 @@ namespace frm
//====================================================================
//= OSpinButtonModel
//====================================================================
- //--------------------------------------------------------------------
- //--------------------------------------------------------------------
+
+
OSpinButtonModel::OSpinButtonModel( const Reference<XComponentContext>& _rxFactory )
:OBoundControlModel( _rxFactory, VCL_CONTROLMODEL_SPINBUTTON, VCL_CONTROL_SPINBUTTON, sal_True, sal_True, sal_False )
,m_nDefaultSpinValue( 0 )
@@ -64,35 +64,35 @@ namespace frm
initValueProperty( PROPERTY_SPIN_VALUE, PROPERTY_ID_SPIN_VALUE );
}
- //--------------------------------------------------------------------
+
OSpinButtonModel::OSpinButtonModel( const OSpinButtonModel* _pOriginal, const Reference< XComponentContext >& _rxFactory )
:OBoundControlModel( _pOriginal, _rxFactory )
{
m_nDefaultSpinValue = _pOriginal->m_nDefaultSpinValue;
}
- //--------------------------------------------------------------------
+
OSpinButtonModel::~OSpinButtonModel( )
{
}
- //--------------------------------------------------------------------
+
IMPLEMENT_SERVICE_REGISTRATION_2( OSpinButtonModel, OControlModel, FRM_SUN_COMPONENT_SPINBUTTON, BINDABLE_INTEGER_VALUE_RANGE )
// note that we're passing OControlModel as "base class". This is because
// OBoundControlModel, our real base class, claims to support the DataAwareControlModel
// service, which isn't really true for us. We only derive from this class
// to benefit from the functionality for binding to spreadsheet cells
- //------------------------------------------------------------------------------
+
IMPLEMENT_DEFAULT_CLONING( OSpinButtonModel )
- //------------------------------------------------------------------------------
+
void SAL_CALL OSpinButtonModel::disposing()
{
OBoundControlModel::disposing();
}
- //--------------------------------------------------------------------
+
void OSpinButtonModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 3, OControlModel )
@@ -102,7 +102,7 @@ namespace frm
END_DESCRIBE_PROPERTIES();
}
- //------------------------------------------------------------------------------
+
void OSpinButtonModel::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) const
{
switch ( _nHandle )
@@ -116,7 +116,7 @@ namespace frm
}
}
- //------------------------------------------------------------------------------
+
void OSpinButtonModel::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const Any& _rValue ) throw ( Exception )
{
switch ( _nHandle )
@@ -131,7 +131,7 @@ namespace frm
}
}
- //------------------------------------------------------------------------------
+
sal_Bool OSpinButtonModel::convertFastPropertyValue(
Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue )
throw ( IllegalArgumentException )
@@ -150,7 +150,7 @@ namespace frm
return bModified;
}
- //--------------------------------------------------------------------
+
Any OSpinButtonModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
{
Any aReturn;
@@ -169,33 +169,33 @@ namespace frm
return aReturn;
}
- //------------------------------------------------------------------------------
+
Any OSpinButtonModel::translateDbColumnToControlValue( )
{
OSL_FAIL( "OSpinButtonModel::commitControlValueToDbColumn: never to be called (we're not bound)!" );
return Any();
}
- //------------------------------------------------------------------------------
+
sal_Bool OSpinButtonModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
{
OSL_FAIL( "OSpinButtonModel::commitControlValueToDbColumn: never to be called (we're not bound)!" );
return sal_True;
}
- //------------------------------------------------------------------------------
+
Any OSpinButtonModel::getDefaultForReset() const
{
return makeAny( (sal_Int32)m_nDefaultSpinValue );
}
- //--------------------------------------------------------------------
+
OUString SAL_CALL OSpinButtonModel::getServiceName() throw( RuntimeException )
{
return OUString(FRM_SUN_COMPONENT_SPINBUTTON);
}
- //--------------------------------------------------------------------
+
void SAL_CALL OSpinButtonModel::write( const Reference< XObjectOutputStream >& _rxOutStream )
throw( IOException, RuntimeException )
{
@@ -212,7 +212,7 @@ namespace frm
writeHelpTextCompatibly( _rxOutStream );
}
- //--------------------------------------------------------------------
+
void SAL_CALL OSpinButtonModel::read( const Reference< XObjectInputStream>& _rxInStream ) throw( IOException, RuntimeException )
{
OBoundControlModel::read( _rxInStream );
@@ -235,7 +235,7 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
Any OSpinButtonModel::translateExternalValueToControlValue( const Any& _rExternalValue ) const
{
return translateExternalDoubleToControlIntValue( _rExternalValue, m_xAggregateSet,
@@ -243,14 +243,14 @@ namespace frm
OUString( "SpinValueMax" ) );
}
- //--------------------------------------------------------------------
+
Any OSpinButtonModel::translateControlValueToExternalValue( ) const
{
// by definition, the base class simply obtains the property value
return translateControlIntToExternalDoubleValue( OBoundControlModel::translateControlValueToExternalValue() );
}
- //--------------------------------------------------------------------
+
Sequence< Type > OSpinButtonModel::getSupportedBindingTypes()
{
return Sequence< Type >( &::getCppuType( static_cast< double* >( NULL ) ), 1 );
diff --git a/forms/source/helper/commanddescriptionprovider.cxx b/forms/source/helper/commanddescriptionprovider.cxx
index 045fe585a371..fec8c7230234 100644
--- a/forms/source/helper/commanddescriptionprovider.cxx
+++ b/forms/source/helper/commanddescriptionprovider.cxx
@@ -78,7 +78,7 @@ namespace frm
};
- //--------------------------------------------------------------------
+
void DefaultCommandDescriptionProvider::impl_init_nothrow( const Reference<XComponentContext>& _rxContext, const Reference< XModel >& _rxDocument )
{
OSL_ENSURE( _rxDocument.is(), "DefaultCommandDescriptionProvider::impl_init_nothrow: no document => no command descriptions!" );
@@ -99,7 +99,7 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
OUString DefaultCommandDescriptionProvider::getCommandDescription( const OUString& _rCommandURL ) const
{
if ( !m_xCommandAccess.is() )
@@ -118,7 +118,7 @@ namespace frm
return OUString();
}
- //--------------------------------------------------------------------
+
PCommandDescriptionProvider createDocumentCommandDescriptionProvider(
const Reference<XComponentContext>& _rxContext, const Reference< XModel >& _rxDocument )
{
diff --git a/forms/source/helper/commandimageprovider.cxx b/forms/source/helper/commandimageprovider.cxx
index bdacb8930955..72adc999f1f1 100644
--- a/forms/source/helper/commandimageprovider.cxx
+++ b/forms/source/helper/commandimageprovider.cxx
@@ -82,7 +82,7 @@ namespace frm
Reference< XImageManager > m_xModuleImageManager;
};
- //--------------------------------------------------------------------
+
void DocumentCommandImageProvider::impl_init_nothrow( const Reference<XComponentContext>& _rContext, const Reference< XModel >& _rxDocument )
{
OSL_ENSURE( _rxDocument.is(), "DocumentCommandImageProvider::impl_init_nothrow: no document => no images!" );
@@ -119,7 +119,7 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
CommandImages DocumentCommandImageProvider::getCommandImages( const CommandURLs& _rCommandURLs, const bool _bLarge ) const
{
const size_t nCommandCount = _rCommandURLs.getLength();
@@ -158,7 +158,7 @@ namespace frm
return aImages;
}
- //--------------------------------------------------------------------
+
PCommandImageProvider createDocumentCommandImageProvider(
const Reference<XComponentContext>& _rContext, const Reference< XModel >& _rxDocument )
{
diff --git a/forms/source/helper/controlfeatureinterception.cxx b/forms/source/helper/controlfeatureinterception.cxx
index 7435cc0d367e..d0f3f120143d 100644
--- a/forms/source/helper/controlfeatureinterception.cxx
+++ b/forms/source/helper/controlfeatureinterception.cxx
@@ -33,13 +33,13 @@ namespace frm
//====================================================================
//= ControlFeatureInterception
//====================================================================
- //--------------------------------------------------------------------
+
ControlFeatureInterception::ControlFeatureInterception( const Reference< XComponentContext >& _rxORB )
:m_pUrlTransformer( new UrlTransformer( _rxORB ) )
{
}
- //--------------------------------------------------------------------
+
void SAL_CALL ControlFeatureInterception::registerDispatchProviderInterceptor( const Reference< XDispatchProviderInterceptor >& _rxInterceptor ) throw (RuntimeException )
{
if ( !_rxInterceptor.is() )
@@ -62,7 +62,7 @@ namespace frm
// it's the first of the interceptor chain
}
- //--------------------------------------------------------------------
+
void SAL_CALL ControlFeatureInterception::releaseDispatchProviderInterceptor( const Reference< XDispatchProviderInterceptor >& _rxInterceptor ) throw (RuntimeException )
{
if ( !_rxInterceptor.is() )
@@ -109,7 +109,7 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
void ControlFeatureInterception::dispose()
{
// release all interceptors
@@ -129,7 +129,7 @@ namespace frm
xInterceptor = xInterceptor.query( xSlave );
}
}
- //--------------------------------------------------------------------
+
Reference< XDispatch > ControlFeatureInterception::queryDispatch( const URL& _rURL, const OUString& _rTargetFrameName, ::sal_Int32 _nSearchFlags ) SAL_THROW((RuntimeException))
{
Reference< XDispatch > xDispatcher;
@@ -138,13 +138,13 @@ namespace frm
return xDispatcher;
}
- //--------------------------------------------------------------------
+
Reference< XDispatch > ControlFeatureInterception::queryDispatch( const URL& _rURL ) SAL_THROW((RuntimeException))
{
return queryDispatch( _rURL, OUString(), 0 );
}
- //--------------------------------------------------------------------
+
Reference< XDispatch > ControlFeatureInterception::queryDispatch( const sal_Char* _pAsciiURL ) SAL_THROW((RuntimeException))
{
return queryDispatch( m_pUrlTransformer->getStrictURLFromAscii( _pAsciiURL ) );
diff --git a/forms/source/helper/formnavigation.cxx b/forms/source/helper/formnavigation.cxx
index 8acc422a0636..07ad13e279ef 100644
--- a/forms/source/helper/formnavigation.cxx
+++ b/forms/source/helper/formnavigation.cxx
@@ -42,7 +42,7 @@ namespace frm
//==================================================================
//= OFormNavigationHelper
//==================================================================
- //------------------------------------------------------------------
+
OFormNavigationHelper::OFormNavigationHelper( const Reference< XComponentContext >& _rxORB )
:m_xORB( _rxORB )
,m_nConnectedFeatures( 0 )
@@ -50,51 +50,51 @@ namespace frm
m_pFeatureInterception.reset( new ControlFeatureInterception( m_xORB ) );
}
- //------------------------------------------------------------------
+
OFormNavigationHelper::~OFormNavigationHelper()
{
}
- //------------------------------------------------------------------
+
void SAL_CALL OFormNavigationHelper::dispose( ) throw( RuntimeException )
{
m_pFeatureInterception->dispose();
disconnectDispatchers();
}
- //------------------------------------------------------------------
+
void OFormNavigationHelper::interceptorsChanged( )
{
updateDispatches();
}
- //------------------------------------------------------------------
+
void OFormNavigationHelper::featureStateChanged( sal_Int16 /*_nFeatureId*/, sal_Bool /*_bEnabled*/ )
{
// not interested in
}
- //------------------------------------------------------------------
+
void OFormNavigationHelper::allFeatureStatesChanged( )
{
// not interested in
}
- //------------------------------------------------------------------
+
void SAL_CALL OFormNavigationHelper::registerDispatchProviderInterceptor( const Reference< XDispatchProviderInterceptor >& _rxInterceptor ) throw (RuntimeException)
{
m_pFeatureInterception->registerDispatchProviderInterceptor( _rxInterceptor );
interceptorsChanged();
}
- //------------------------------------------------------------------
+
void SAL_CALL OFormNavigationHelper::releaseDispatchProviderInterceptor( const Reference< XDispatchProviderInterceptor >& _rxInterceptor ) throw (RuntimeException)
{
m_pFeatureInterception->releaseDispatchProviderInterceptor( _rxInterceptor );
interceptorsChanged();
}
- //------------------------------------------------------------------
+
void SAL_CALL OFormNavigationHelper::statusChanged( const FeatureStateEvent& _rState ) throw (RuntimeException)
{
for ( FeatureMap::iterator aFeature = m_aSupportedFeatures.begin();
@@ -122,7 +122,7 @@ namespace frm
OSL_FAIL( "OFormNavigationHelper::statusChanged: huh? An invalid/unknown URL?" );
}
- //------------------------------------------------------------------
+
void SAL_CALL OFormNavigationHelper::disposing( const EventObject& _rSource ) throw (RuntimeException)
{
// was it one of our external dispatchers?
@@ -148,7 +148,7 @@ namespace frm
}
}
- //------------------------------------------------------------------
+
void OFormNavigationHelper::updateDispatches()
{
if ( !m_nConnectedFeatures )
@@ -193,7 +193,7 @@ namespace frm
allFeatureStatesChanged( );
}
- //------------------------------------------------------------------
+
void OFormNavigationHelper::connectDispatchers()
{
if ( m_nConnectedFeatures )
@@ -225,7 +225,7 @@ namespace frm
allFeatureStatesChanged( );
}
- //------------------------------------------------------------------
+
void OFormNavigationHelper::disconnectDispatchers()
{
if ( m_nConnectedFeatures )
@@ -250,7 +250,7 @@ namespace frm
allFeatureStatesChanged( );
}
- //------------------------------------------------------------------
+
void OFormNavigationHelper::initializeSupportedFeatures( )
{
if ( m_aSupportedFeatures.empty() )
@@ -279,13 +279,13 @@ namespace frm
}
}
- //------------------------------------------------------------------
+
Reference< XDispatch > OFormNavigationHelper::queryDispatch( const URL& _rURL )
{
return m_pFeatureInterception->queryDispatch( _rURL );
}
- //------------------------------------------------------------------
+
void OFormNavigationHelper::dispatchWithArgument( sal_Int16 _nFeatureId, const sal_Char* _pParamAsciiName,
const Any& _rParamValue ) const
{
@@ -303,7 +303,7 @@ namespace frm
}
}
- //------------------------------------------------------------------
+
void OFormNavigationHelper::dispatch( sal_Int16 _nFeatureId ) const
{
FeatureMap::const_iterator aInfo = m_aSupportedFeatures.find( _nFeatureId );
@@ -317,7 +317,7 @@ namespace frm
}
}
- //------------------------------------------------------------------
+
bool OFormNavigationHelper::isEnabled( sal_Int16 _nFeatureId ) const
{
FeatureMap::const_iterator aInfo = m_aSupportedFeatures.find( _nFeatureId );
@@ -327,7 +327,7 @@ namespace frm
return false;
}
- //------------------------------------------------------------------
+
bool OFormNavigationHelper::getBooleanState( sal_Int16 _nFeatureId ) const
{
sal_Bool bState = sal_False;
@@ -339,7 +339,7 @@ namespace frm
return (bool)bState;
}
- //------------------------------------------------------------------
+
OUString OFormNavigationHelper::getStringState( sal_Int16 _nFeatureId ) const
{
OUString sState;
@@ -351,7 +351,7 @@ namespace frm
return sState;
}
- //------------------------------------------------------------------
+
sal_Int32 OFormNavigationHelper::getIntegerState( sal_Int16 _nFeatureId ) const
{
sal_Int32 nState = 0;
@@ -363,7 +363,7 @@ namespace frm
return nState;
}
- //------------------------------------------------------------------
+
void OFormNavigationHelper::invalidateSupportedFeaturesSet()
{
disconnectDispatchers( );
@@ -375,18 +375,18 @@ namespace frm
//==================================================================
//= OFormNavigationMapper
//==================================================================
- //------------------------------------------------------------------
+
OFormNavigationMapper::OFormNavigationMapper( const Reference< XComponentContext >& _rxORB )
{
m_pUrlTransformer.reset( new UrlTransformer( _rxORB ) );
}
- //------------------------------------------------------------------
+
OFormNavigationMapper::~OFormNavigationMapper( )
{
}
- //------------------------------------------------------------------
+
bool OFormNavigationMapper::getFeatureURL( sal_Int16 _nFeatureId, URL& /* [out] */ _rURL )
{
// get the ascii version of the URL
@@ -397,7 +397,7 @@ namespace frm
return ( pAsciiURL != NULL );
}
- //------------------------------------------------------------------
+
namespace
{
struct FeatureURL
@@ -440,7 +440,7 @@ namespace frm
}
}
- //------------------------------------------------------------------
+
const char* OFormNavigationMapper::getFeatureURLAscii( sal_Int16 _nFeatureId )
{
const FeatureURL* pFeatures = lcl_getFeatureTable();
@@ -453,7 +453,7 @@ namespace frm
return NULL;
}
- //------------------------------------------------------------------
+
sal_Int16 OFormNavigationMapper::getFeatureId( const OUString& _rCompleteURL )
{
const FeatureURL* pFeatures = lcl_getFeatureTable();
diff --git a/forms/source/helper/resettable.cxx b/forms/source/helper/resettable.cxx
index 9430f6d05687..1a87e5087fa5 100644
--- a/forms/source/helper/resettable.cxx
+++ b/forms/source/helper/resettable.cxx
@@ -43,19 +43,19 @@ namespace frm
//====================================================================
//= ResetHelper
//====================================================================
- //--------------------------------------------------------------------
+
void ResetHelper::addResetListener( const Reference< XResetListener >& _listener )
{
m_aResetListeners.addInterface( _listener );
}
- //--------------------------------------------------------------------
+
void ResetHelper::removeResetListener( const Reference< XResetListener >& _listener )
{
m_aResetListeners.removeInterface( _listener );
}
- //--------------------------------------------------------------------
+
bool ResetHelper::approveReset()
{
::cppu::OInterfaceIteratorHelper aIter( m_aResetListeners );
@@ -68,14 +68,14 @@ namespace frm
return bContinue;
}
- //--------------------------------------------------------------------
+
void ResetHelper::notifyResetted()
{
EventObject aResetEvent( m_rParent );
m_aResetListeners.notifyEach( &XResetListener::resetted, aResetEvent );
}
- //--------------------------------------------------------------------
+
void ResetHelper::disposing()
{
EventObject aEvent( m_rParent );
diff --git a/forms/source/helper/urltransformer.cxx b/forms/source/helper/urltransformer.cxx
index 3b3604952414..c80744fa6155 100644
--- a/forms/source/helper/urltransformer.cxx
+++ b/forms/source/helper/urltransformer.cxx
@@ -35,7 +35,7 @@ namespace frm
//====================================================================
//= UrlTransformer
//====================================================================
- //--------------------------------------------------------------------
+
UrlTransformer::UrlTransformer( const Reference< XComponentContext >& _rxORB )
:m_xORB( _rxORB )
,m_bTriedToCreateTransformer( false )
@@ -43,7 +43,7 @@ namespace frm
DBG_ASSERT( _rxORB.is(), "UrlTransformer::UrlTransformer: invalid service factory!" );
}
- //--------------------------------------------------------------------
+
bool UrlTransformer::implEnsureTransformer() const
{
// create the transformer, if not already attempted to do so
@@ -59,7 +59,7 @@ namespace frm
return m_xTransformer.is();
}
- //--------------------------------------------------------------------
+
URL UrlTransformer::getStrictURL( const OUString& _rURL ) const
{
URL aReturn;
@@ -69,13 +69,13 @@ namespace frm
return aReturn;
}
- //--------------------------------------------------------------------
+
URL UrlTransformer::getStrictURLFromAscii( const sal_Char* _pAsciiURL ) const
{
return getStrictURL( OUString::createFromAscii( _pAsciiURL ) );
}
- //--------------------------------------------------------------------
+
void UrlTransformer::parseSmartWithAsciiProtocol( ::com::sun::star::util::URL& _rURL, const sal_Char* _pAsciiURL ) const
{
if ( implEnsureTransformer() )
diff --git a/forms/source/helper/windowstateguard.cxx b/forms/source/helper/windowstateguard.cxx
index b1057b382487..009fbd4f55c1 100644
--- a/forms/source/helper/windowstateguard.cxx
+++ b/forms/source/helper/windowstateguard.cxx
@@ -86,7 +86,7 @@ namespace frm
void impl_ensureEnabledState_nothrow_nolck();
};
- //--------------------------------------------------------------------
+
WindowStateGuard_Impl::WindowStateGuard_Impl( const Reference< XWindow2 >& _rxWindow, const Reference< XPropertySet >& _rxMdelProps )
:m_xWindow( _rxWindow )
,m_xModelProps( _rxMdelProps )
@@ -101,7 +101,7 @@ namespace frm
osl_atomic_decrement( &m_refCount );
}
- //--------------------------------------------------------------------
+
void WindowStateGuard_Impl::dispose()
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -113,7 +113,7 @@ namespace frm
m_xWindow.clear();
}
- //--------------------------------------------------------------------
+
void WindowStateGuard_Impl::impl_ensureEnabledState_nothrow_nolck()
{
try
@@ -142,43 +142,43 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
void SAL_CALL WindowStateGuard_Impl::windowEnabled( const EventObject& /*e*/ ) throw (RuntimeException)
{
impl_ensureEnabledState_nothrow_nolck();
}
- //--------------------------------------------------------------------
+
void SAL_CALL WindowStateGuard_Impl::windowDisabled( const EventObject& /*e*/ ) throw (RuntimeException)
{
impl_ensureEnabledState_nothrow_nolck();
}
- //--------------------------------------------------------------------
+
void SAL_CALL WindowStateGuard_Impl::windowResized( const WindowEvent& /*e*/ ) throw (RuntimeException)
{
// not interested in
}
- //--------------------------------------------------------------------
+
void SAL_CALL WindowStateGuard_Impl::windowMoved( const WindowEvent& /*e*/ ) throw (RuntimeException)
{
// not interested in
}
- //--------------------------------------------------------------------
+
void SAL_CALL WindowStateGuard_Impl::windowShown( const EventObject& /*e*/ ) throw (RuntimeException)
{
// not interested in
}
- //--------------------------------------------------------------------
+
void SAL_CALL WindowStateGuard_Impl::windowHidden( const EventObject& /*e*/ ) throw (RuntimeException)
{
// not interested in
}
- //--------------------------------------------------------------------
+
void SAL_CALL WindowStateGuard_Impl::disposing( const EventObject& Source ) throw (RuntimeException)
{
OSL_ENSURE( Source.Source == m_xWindow, "WindowStateGuard_Impl::disposing: where does this come from?" );
@@ -189,17 +189,17 @@ namespace frm
//====================================================================
//= WindowStateGuard
//====================================================================
- //--------------------------------------------------------------------
+
WindowStateGuard::WindowStateGuard()
{
}
- //--------------------------------------------------------------------
+
WindowStateGuard::~WindowStateGuard()
{
}
- //--------------------------------------------------------------------
+
void WindowStateGuard::attach( const Reference< XWindow2 >& _rxWindow, const Reference< XControlModel >& _rxModel )
{
if ( m_pImpl.is() )
diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx
index 7954470c3193..dd6829d6beab 100644
--- a/forms/source/misc/InterfaceContainer.cxx
+++ b/forms/source/misc/InterfaceContainer.cxx
@@ -70,7 +70,7 @@ using namespace ::com::sun::star::util;
namespace
{
- //---------------------------------------------------------------------
+
static void lcl_throwIllegalArgumentException()
{
throw IllegalArgumentException();
@@ -168,12 +168,12 @@ void OInterfaceContainer::impl_addVbEvents_nolck_nothrow( const sal_Int32 i_nIn
//==================================================================
//= ElementDescription
//==================================================================
-//------------------------------------------------------------------
+
ElementDescription::ElementDescription( )
{
}
-//------------------------------------------------------------------
+
ElementDescription::~ElementDescription()
{
}
@@ -181,7 +181,7 @@ ElementDescription::~ElementDescription()
//==================================================================
//= OInterfaceContainer
//==================================================================
-//------------------------------------------------------------------
+
OInterfaceContainer::OInterfaceContainer(
const Reference<XComponentContext>& _rxContext,
::osl::Mutex& _rMutex,
@@ -195,7 +195,7 @@ OInterfaceContainer::OInterfaceContainer(
impl_createEventAttacher_nothrow();
}
-//------------------------------------------------------------------------------
+
OInterfaceContainer::OInterfaceContainer( ::osl::Mutex& _rMutex, const OInterfaceContainer& _cloneSource )
:OInterfaceContainer_BASE()
,m_rMutex( _rMutex )
@@ -206,7 +206,7 @@ OInterfaceContainer::OInterfaceContainer( ::osl::Mutex& _rMutex, const OInterfac
impl_createEventAttacher_nothrow();
}
-//------------------------------------------------------------------------------
+
void OInterfaceContainer::clonedFrom( const OInterfaceContainer& _cloneSource )
{
try
@@ -230,7 +230,7 @@ void OInterfaceContainer::clonedFrom( const OInterfaceContainer& _cloneSource )
}
}
-//------------------------------------------------------------------------------
+
void OInterfaceContainer::impl_createEventAttacher_nothrow()
{
try
@@ -243,12 +243,12 @@ void OInterfaceContainer::impl_createEventAttacher_nothrow()
}
}
-//------------------------------------------------------------------------------
+
OInterfaceContainer::~OInterfaceContainer()
{
}
-//------------------------------------------------------------------------------
+
void OInterfaceContainer::disposing()
{
// dispose all elements
@@ -277,7 +277,7 @@ void OInterfaceContainer::disposing()
}
// XPersistObject
-//------------------------------------------------------------------------------
+
namespace
{
//..........................................................................
@@ -314,7 +314,7 @@ namespace
}
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OInterfaceContainer::writeEvents(const Reference<XObjectOutputStream>& _rxOutStream)
{
// We're writing a document in SO 5.2 format (or even from earlier versions)
@@ -358,7 +358,7 @@ void SAL_CALL OInterfaceContainer::writeEvents(const Reference<XObjectOutputStre
lcl_restoreEvents( aSave, m_xEventAttacher );
}
-//------------------------------------------------------------------------------
+
struct TransformEventTo52Format : public ::std::unary_function< ScriptEventDescriptor, void >
{
void operator()( ScriptEventDescriptor& _rDescriptor )
@@ -381,7 +381,7 @@ struct TransformEventTo52Format : public ::std::unary_function< ScriptEventDescr
}
};
-//------------------------------------------------------------------------------
+
struct TransformEventTo60Format : public ::std::unary_function< ScriptEventDescriptor, void >
{
void operator()( ScriptEventDescriptor& _rDescriptor )
@@ -397,7 +397,7 @@ struct TransformEventTo60Format : public ::std::unary_function< ScriptEventDescr
}
};
-//------------------------------------------------------------------------------
+
void OInterfaceContainer::transformEvents( const EventFormat _eTargetFormat )
{
OSL_ENSURE( m_xEventAttacher.is(), "OInterfaceContainer::transformEvents: no event attacher manager!" );
@@ -440,7 +440,7 @@ void OInterfaceContainer::transformEvents( const EventFormat _eTargetFormat )
}
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OInterfaceContainer::readEvents(const Reference<XObjectInputStream>& _rxInStream)
{
::osl::MutexGuard aGuard( m_rMutex );
@@ -473,7 +473,7 @@ void SAL_CALL OInterfaceContainer::readEvents(const Reference<XObjectInputStream
}
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OInterfaceContainer::write( const Reference< XObjectOutputStream >& _rxOutStream ) throw(IOException, RuntimeException)
{
::osl::MutexGuard aGuard( m_rMutex );
@@ -504,7 +504,7 @@ void SAL_CALL OInterfaceContainer::write( const Reference< XObjectOutputStream >
}
}
-//------------------------------------------------------------------------------
+
namespace
{
Reference< XPersistObject > lcl_createPlaceHolder( const Reference< XComponentContext >& _rxORB )
@@ -531,7 +531,7 @@ namespace
}
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OInterfaceContainer::read( const Reference< XObjectInputStream >& _rxInStream ) throw(IOException, RuntimeException)
{
::osl::MutexGuard aGuard( m_rMutex );
@@ -620,20 +620,20 @@ void SAL_CALL OInterfaceContainer::read( const Reference< XObjectInputStream >&
}
// XContainer
-//------------------------------------------------------------------------------
+
void SAL_CALL OInterfaceContainer::addContainerListener(const Reference<XContainerListener>& _rxListener) throw( RuntimeException )
{
m_aContainerListeners.addInterface(_rxListener);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OInterfaceContainer::removeContainerListener(const Reference<XContainerListener>& _rxListener) throw( RuntimeException )
{
m_aContainerListeners.removeInterface(_rxListener);
}
// XEventListener
-//------------------------------------------------------------------------------
+
void SAL_CALL OInterfaceContainer::disposing(const EventObject& _rSource) throw( RuntimeException )
{
::osl::MutexGuard aGuard( m_rMutex );
@@ -678,7 +678,7 @@ void SAL_CALL OInterfaceContainer::disposing(const EventObject& _rSource) throw(
}
// XPropertyChangeListener
-//------------------------------------------------------------------------------
+
void OInterfaceContainer::propertyChange(const PropertyChangeEvent& evt)
throw (::com::sun::star::uno::RuntimeException) {
if (evt.PropertyName == PROPERTY_NAME)
@@ -696,20 +696,20 @@ throw (::com::sun::star::uno::RuntimeException) {
}
// XElementAccess
-//------------------------------------------------------------------------------
+
sal_Bool SAL_CALL OInterfaceContainer::hasElements() throw( RuntimeException )
{
return !m_aMap.empty();
}
-//------------------------------------------------------------------------------
+
Type SAL_CALL OInterfaceContainer::getElementType() throw(RuntimeException)
{
return m_aElementType;
}
// XEnumerationAccess
-//------------------------------------------------------------------------------
+
Reference<XEnumeration> SAL_CALL OInterfaceContainer::createEnumeration() throw( RuntimeException )
{
::osl::MutexGuard aGuard( m_rMutex );
@@ -717,7 +717,7 @@ Reference<XEnumeration> SAL_CALL OInterfaceContainer::createEnumeration() throw(
}
// XNameAccess
-//------------------------------------------------------------------------------
+
Any SAL_CALL OInterfaceContainer::getByName( const OUString& _rName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException)
{
::std::pair <OInterfaceMap::iterator,
@@ -729,7 +729,7 @@ Any SAL_CALL OInterfaceContainer::getByName( const OUString& _rName ) throw(NoSu
return (*aPair.first).second->queryInterface( m_aElementType );
}
-//------------------------------------------------------------------------------
+
StringSequence SAL_CALL OInterfaceContainer::getElementNames() throw(RuntimeException)
{
StringSequence aNameList(m_aItems.size());
@@ -742,7 +742,7 @@ StringSequence SAL_CALL OInterfaceContainer::getElementNames() throw(RuntimeExce
return aNameList;
}
-//------------------------------------------------------------------------------
+
sal_Bool SAL_CALL OInterfaceContainer::hasByName( const OUString& _rName ) throw(RuntimeException)
{
::std::pair <OInterfaceMap::iterator,
@@ -751,13 +751,13 @@ sal_Bool SAL_CALL OInterfaceContainer::hasByName( const OUString& _rName ) throw
}
// XIndexAccess
-//------------------------------------------------------------------------------
+
sal_Int32 OInterfaceContainer::getCount() throw( RuntimeException )
{
return m_aItems.size();
}
-//------------------------------------------------------------------------------
+
Any OInterfaceContainer::getByIndex(sal_Int32 _nIndex) throw( IndexOutOfBoundsException, WrappedTargetException, RuntimeException )
{
if (_nIndex < 0 || (_nIndex >= (sal_Int32)m_aItems.size()))
@@ -766,7 +766,7 @@ Any OInterfaceContainer::getByIndex(sal_Int32 _nIndex) throw( IndexOutOfBoundsEx
return m_aItems[_nIndex]->queryInterface( m_aElementType );
}
-//------------------------------------------------------------------------------
+
void OInterfaceContainer::approveNewElement( const Reference< XPropertySet >& _rxObject, ElementDescription* _pElement )
{
// it has to be non-NULL
@@ -800,7 +800,7 @@ void OInterfaceContainer::approveNewElement( const Reference< XPropertySet >& _r
}
}
-//------------------------------------------------------------------------------
+
void OInterfaceContainer::implInsert(sal_Int32 _nIndex, const Reference< XPropertySet >& _rxElement,
sal_Bool _bEvents, ElementDescription* _pApprovalResult, sal_Bool _bFire ) throw( IllegalArgumentException )
{
@@ -902,7 +902,7 @@ void OInterfaceContainer::implInsert(sal_Int32 _nIndex, const Reference< XProper
}
}
-//------------------------------------------------------------------------------
+
void OInterfaceContainer::removeElementsNoEvents(sal_Int32 nIndex)
{
OInterfaceArray::iterator i = m_aItems.begin() + nIndex;
@@ -923,19 +923,19 @@ void OInterfaceContainer::removeElementsNoEvents(sal_Int32 nIndex)
xChild->setParent(InterfaceRef ());
}
-//------------------------------------------------------------------------------
+
void OInterfaceContainer::implInserted( const ElementDescription* /*_pElement*/ )
{
// not inrerested in
}
-//------------------------------------------------------------------------------
+
void OInterfaceContainer::implRemoved( const InterfaceRef& /*_rxObject*/ )
{
// not inrerested in
}
-//------------------------------------------------------------------------------
+
void OInterfaceContainer::impl_replacedElement( const ContainerEvent& _rEvent, ::osl::ClearableMutexGuard& _rInstanceLock )
{
_rInstanceLock.clear();
@@ -943,7 +943,7 @@ void OInterfaceContainer::impl_replacedElement( const ContainerEvent& _rEvent, :
}
// XIndexContainer
-//------------------------------------------------------------------------------
+
void SAL_CALL OInterfaceContainer::insertByIndex( sal_Int32 _nIndex, const Any& _rElement ) throw(IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, RuntimeException)
{
Reference< XPropertySet > xElement;
@@ -951,7 +951,7 @@ void SAL_CALL OInterfaceContainer::insertByIndex( sal_Int32 _nIndex, const Any&
implInsert( _nIndex, xElement, sal_True /* event handling */ , NULL /* not yet approved */ , sal_True /* notification */ );
}
-//------------------------------------------------------------------------------
+
void OInterfaceContainer::implReplaceByIndex( const sal_Int32 _nIndex, const Any& _rNewElement, ::osl::ClearableMutexGuard& _rClearBeforeNotify )
{
OSL_PRECOND( ( _nIndex >= 0 ) && ( _nIndex < (sal_Int32)m_aItems.size() ), "OInterfaceContainer::implReplaceByIndex: precondition not met (index)!" );
@@ -1024,14 +1024,14 @@ void OInterfaceContainer::implReplaceByIndex( const sal_Int32 _nIndex, const Any
impl_replacedElement( aReplaceEvent, _rClearBeforeNotify );
}
-//------------------------------------------------------------------------------
+
void OInterfaceContainer::implCheckIndex( const sal_Int32 _nIndex ) SAL_THROW( ( ::com::sun::star::lang::IndexOutOfBoundsException ) )
{
if (_nIndex < 0 || _nIndex >= (sal_Int32)m_aItems.size())
throw IndexOutOfBoundsException();
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OInterfaceContainer::replaceByIndex(sal_Int32 _nIndex, const Any& Element) throw( IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, RuntimeException )
{
::osl::ClearableMutexGuard aGuard( m_rMutex );
@@ -1041,7 +1041,7 @@ void SAL_CALL OInterfaceContainer::replaceByIndex(sal_Int32 _nIndex, const Any&
implReplaceByIndex( _nIndex, Element, aGuard );
}
-//------------------------------------------------------------------------------
+
void OInterfaceContainer::implRemoveByIndex( const sal_Int32 _nIndex, ::osl::ClearableMutexGuard& _rClearBeforeNotify )
{
OSL_PRECOND( ( _nIndex >= 0 ) && ( _nIndex < (sal_Int32)m_aItems.size() ), "OInterfaceContainer::implRemoveByIndex: precondition not met (index)!" );
@@ -1084,7 +1084,7 @@ void OInterfaceContainer::implRemoveByIndex( const sal_Int32 _nIndex, ::osl::Cle
m_aContainerListeners.notifyEach( &XContainerListener::elementRemoved, aEvt );
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OInterfaceContainer::removeByIndex(sal_Int32 _nIndex) throw( IndexOutOfBoundsException, WrappedTargetException, RuntimeException )
{
::osl::ClearableMutexGuard aGuard( m_rMutex );
@@ -1094,13 +1094,13 @@ void SAL_CALL OInterfaceContainer::removeByIndex(sal_Int32 _nIndex) throw( Index
implRemoveByIndex( _nIndex, aGuard );
}
-//------------------------------------------------------------------------
+
ElementDescription* OInterfaceContainer::createElementMetaData( )
{
return new ElementDescription;
}
-//------------------------------------------------------------------------
+
void SAL_CALL OInterfaceContainer::insertByName(const OUString& _rName, const Any& _rElement) throw( IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException )
{
Reference< XPropertySet > xElementProps;
@@ -1131,7 +1131,7 @@ void SAL_CALL OInterfaceContainer::insertByName(const OUString& _rName, const An
implInsert( m_aItems.size(), xElementProps, sal_True, aElementMetaData.get(), sal_True );
}
-//------------------------------------------------------------------------
+
void SAL_CALL OInterfaceContainer::replaceByName(const OUString& Name, const Any& Element) throw( IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException )
{
::osl::ClearableMutexGuard aGuard( m_rMutex );
@@ -1159,7 +1159,7 @@ void SAL_CALL OInterfaceContainer::replaceByName(const OUString& Name, const Any
implReplaceByIndex( nPos, Element, aGuard );
}
-//------------------------------------------------------------------------
+
void SAL_CALL OInterfaceContainer::removeByName(const OUString& Name) throw( NoSuchElementException, WrappedTargetException, RuntimeException )
{
::osl::MutexGuard aGuard( m_rMutex );
@@ -1174,7 +1174,7 @@ void SAL_CALL OInterfaceContainer::removeByName(const OUString& Name) throw( NoS
// XEventAttacherManager
-//------------------------------------------------------------------------
+
void SAL_CALL OInterfaceContainer::registerScriptEvent( sal_Int32 nIndex, const ScriptEventDescriptor& aScriptEvent ) throw(IllegalArgumentException, RuntimeException)
{
::osl::ClearableMutexGuard aGuard( m_rMutex );
@@ -1186,7 +1186,7 @@ void SAL_CALL OInterfaceContainer::registerScriptEvent( sal_Int32 nIndex, const
}
}
-//------------------------------------------------------------------------
+
void SAL_CALL OInterfaceContainer::registerScriptEvents( sal_Int32 nIndex, const Sequence< ScriptEventDescriptor >& aScriptEvents ) throw(IllegalArgumentException, RuntimeException)
{
::osl::ClearableMutexGuard aGuard( m_rMutex );
@@ -1198,35 +1198,35 @@ void SAL_CALL OInterfaceContainer::registerScriptEvents( sal_Int32 nIndex, const
}
}
-//------------------------------------------------------------------------
+
void SAL_CALL OInterfaceContainer::revokeScriptEvent( sal_Int32 nIndex, const OUString& aListenerType, const OUString& aEventMethod, const OUString& aRemoveListenerParam ) throw(IllegalArgumentException, RuntimeException)
{
if ( m_xEventAttacher.is() )
m_xEventAttacher->revokeScriptEvent( nIndex, aListenerType, aEventMethod, aRemoveListenerParam );
}
-//------------------------------------------------------------------------
+
void SAL_CALL OInterfaceContainer::revokeScriptEvents( sal_Int32 nIndex ) throw(IllegalArgumentException, RuntimeException)
{
if ( m_xEventAttacher.is() )
m_xEventAttacher->revokeScriptEvents( nIndex );
}
-//------------------------------------------------------------------------
+
void SAL_CALL OInterfaceContainer::insertEntry( sal_Int32 nIndex ) throw(IllegalArgumentException, RuntimeException)
{
if ( m_xEventAttacher.is() )
m_xEventAttacher->insertEntry( nIndex );
}
-//------------------------------------------------------------------------
+
void SAL_CALL OInterfaceContainer::removeEntry( sal_Int32 nIndex ) throw(IllegalArgumentException, RuntimeException)
{
if ( m_xEventAttacher.is() )
m_xEventAttacher->removeEntry( nIndex );
}
-//------------------------------------------------------------------------
+
Sequence< ScriptEventDescriptor > SAL_CALL OInterfaceContainer::getScriptEvents( sal_Int32 nIndex ) throw(IllegalArgumentException, RuntimeException)
{
Sequence< ScriptEventDescriptor > aReturn;
@@ -1241,28 +1241,28 @@ Sequence< ScriptEventDescriptor > SAL_CALL OInterfaceContainer::getScriptEvents(
return aReturn;
}
-//------------------------------------------------------------------------
+
void SAL_CALL OInterfaceContainer::attach( sal_Int32 nIndex, const Reference< XInterface >& xObject, const Any& aHelper ) throw(IllegalArgumentException, ServiceNotRegisteredException, RuntimeException)
{
if ( m_xEventAttacher.is() )
m_xEventAttacher->attach( nIndex, xObject, aHelper );
}
-//------------------------------------------------------------------------
+
void SAL_CALL OInterfaceContainer::detach( sal_Int32 nIndex, const Reference< XInterface >& xObject ) throw(IllegalArgumentException, RuntimeException)
{
if ( m_xEventAttacher.is() )
m_xEventAttacher->detach( nIndex, xObject );
}
-//------------------------------------------------------------------------
+
void SAL_CALL OInterfaceContainer::addScriptListener( const Reference< XScriptListener >& xListener ) throw(IllegalArgumentException, RuntimeException)
{
if ( m_xEventAttacher.is() )
m_xEventAttacher->addScriptListener( xListener );
}
-//------------------------------------------------------------------------
+
void SAL_CALL OInterfaceContainer::removeScriptListener( const Reference< XScriptListener >& xListener ) throw(IllegalArgumentException, RuntimeException)
{
if ( m_xEventAttacher.is() )
@@ -1272,7 +1272,7 @@ void SAL_CALL OInterfaceContainer::removeScriptListener( const Reference< XScrip
//==================================================================
//= OFormComponents
//==================================================================
-//------------------------------------------------------------------------------
+
Any SAL_CALL OFormComponents::queryAggregation(const Type& _rType) throw(RuntimeException)
{
Any aReturn = OFormComponents_BASE::queryInterface(_rType);
@@ -1287,13 +1287,13 @@ Any SAL_CALL OFormComponents::queryAggregation(const Type& _rType) throw(Runtime
return aReturn;
}
-//------------------------------------------------------------------
+
Sequence<Type> SAL_CALL OFormComponents::getTypes() throw(RuntimeException)
{
return ::comphelper::concatSequences(OInterfaceContainer::getTypes(), FormComponentsBase::getTypes(), OFormComponents_BASE::getTypes());
}
-//------------------------------------------------------------------------------
+
OFormComponents::OFormComponents(const Reference<XComponentContext>& _rxFactory)
:FormComponentsBase( m_aMutex )
,OInterfaceContainer( _rxFactory, m_aMutex, cppu::UnoType<XFormComponent>::get() )
@@ -1301,7 +1301,7 @@ OFormComponents::OFormComponents(const Reference<XComponentContext>& _rxFactory)
{
}
-//------------------------------------------------------------------------------
+
OFormComponents::OFormComponents( const OFormComponents& _cloneSource )
:FormComponentsBase( m_aMutex )
,OInterfaceContainer( m_aMutex, _cloneSource )
@@ -1309,7 +1309,7 @@ OFormComponents::OFormComponents( const OFormComponents& _cloneSource )
{
}
-//------------------------------------------------------------------------------
+
OFormComponents::~OFormComponents()
{
if (!FormComponentsBase::rBHelper.bDisposed)
@@ -1320,7 +1320,7 @@ OFormComponents::~OFormComponents()
}
// OComponentHelper
-//------------------------------------------------------------------------------
+
void OFormComponents::disposing()
{
OInterfaceContainer::disposing();
@@ -1329,14 +1329,14 @@ void OFormComponents::disposing()
}
//XChild
-//------------------------------------------------------------------------------
+
void OFormComponents::setParent(const InterfaceRef& Parent) throw( NoSupportException, RuntimeException )
{
::osl::MutexGuard aGuard( m_aMutex );
m_xParent = Parent;
}
-//------------------------------------------------------------------------------
+
InterfaceRef OFormComponents::getParent() throw( RuntimeException )
{
return m_xParent;
diff --git a/forms/source/misc/componenttools.cxx b/forms/source/misc/componenttools.cxx
index 03b1f0eff145..a4a828529e73 100644
--- a/forms/source/misc/componenttools.cxx
+++ b/forms/source/misc/componenttools.cxx
@@ -38,20 +38,20 @@ namespace frm
//====================================================================
//= TypeBag
//====================================================================
- //--------------------------------------------------------------------
+
TypeBag::TypeBag( const TypeSequence& _rTypes1 )
{
addTypes( _rTypes1 );
}
- //--------------------------------------------------------------------
+
TypeBag::TypeBag( const TypeSequence& _rTypes1, const TypeSequence& _rTypes2 )
{
addTypes( _rTypes1 );
addTypes( _rTypes2 );
}
- //--------------------------------------------------------------------
+
TypeBag::TypeBag( const TypeSequence& _rTypes1, const TypeSequence& _rTypes2, const TypeSequence& _rTypes3 )
{
addTypes( _rTypes1 );
@@ -59,7 +59,7 @@ namespace frm
addTypes( _rTypes3 );
}
- //--------------------------------------------------------------------
+
void TypeBag::addTypes( const TypeSequence& _rTypes )
{
::std::copy(
@@ -69,19 +69,19 @@ namespace frm
);
}
- //--------------------------------------------------------------------
+
void TypeBag::addType( const Type& i_rType )
{
m_aTypes.insert( i_rType );
}
- //--------------------------------------------------------------------
+
void TypeBag::removeType( const TypeBag::Type& i_rType )
{
m_aTypes.erase( i_rType );
}
- //--------------------------------------------------------------------
+
TypeBag::TypeSequence TypeBag::getTypes() const
{
TypeSequence aTypes( m_aTypes.size() );
diff --git a/forms/source/misc/limitedformats.cxx b/forms/source/misc/limitedformats.cxx
index 5f0d71ea166c..ffa75cfa1d1e 100644
--- a/forms/source/misc/limitedformats.cxx
+++ b/forms/source/misc/limitedformats.cxx
@@ -43,7 +43,7 @@ namespace frm
//=====================================================================
//=
//=====================================================================
- //---------------------------------------------------------------------
+
enum LocaleType
{
ltEnglishUS,
@@ -51,7 +51,7 @@ namespace frm
ltSystem
};
- //---------------------------------------------------------------------
+
static const Locale& getLocale(LocaleType _eType)
{
static const Locale s_aEnglishUS( OUString("en"), OUString("us"), OUString() );
@@ -75,7 +75,7 @@ namespace frm
return s_aSystem;
}
- //---------------------------------------------------------------------
+
struct FormatEntry
{
const sal_Char* pDescription;
@@ -83,7 +83,7 @@ namespace frm
LocaleType eLocale;
};
- //---------------------------------------------------------------------
+
static FormatEntry* lcl_getFormatTable(sal_Int16 nTableId)
{
switch (nTableId)
@@ -130,7 +130,7 @@ namespace frm
//=====================================================================
//= OLimitedFormats
//=====================================================================
- //---------------------------------------------------------------------
+
OLimitedFormats::OLimitedFormats(const Reference< XComponentContext >& _rxContext, const sal_Int16 _nClassId)
:m_nFormatEnumPropertyHandle(-1)
,m_nTableId(_nClassId)
@@ -140,13 +140,13 @@ namespace frm
ensureTableInitialized(m_nTableId);
}
- //---------------------------------------------------------------------
+
OLimitedFormats::~OLimitedFormats()
{
releaseSupplier();
}
- //---------------------------------------------------------------------
+
void OLimitedFormats::ensureTableInitialized(const sal_Int16 _nTableId)
{
FormatEntry* pFormatTable = lcl_getFormatTable(_nTableId);
@@ -200,7 +200,7 @@ namespace frm
}
}
- //---------------------------------------------------------------------
+
void OLimitedFormats::clearTable(const sal_Int16 _nTableId)
{
::osl::MutexGuard aGuard(s_aMutex);
@@ -213,7 +213,7 @@ namespace frm
}
}
- //---------------------------------------------------------------------
+
void OLimitedFormats::setAggregateSet(const Reference< XFastPropertySet >& _rxAggregate, sal_Int32 _nOriginalPropertyHandle)
{
// changes (NULL -> not NULL) and (not NULL -> NULL) are allowed
@@ -237,7 +237,7 @@ namespace frm
#endif
}
- //---------------------------------------------------------------------
+
void OLimitedFormats::getFormatKeyPropertyValue( Any& _rValue ) const
{
_rValue.clear();
@@ -268,7 +268,7 @@ namespace frm
// TODO: should use a standard format for the control type we're working for
}
- //---------------------------------------------------------------------
+
sal_Bool OLimitedFormats::convertFormatKeyPropertyValue(Any& _rConvertedValue, Any& _rOldValue, const Any& _rNewValue)
{
OSL_ENSURE(m_xAggregate.is() && (-1 != m_nFormatEnumPropertyHandle), "OLimitedFormats::convertFormatKeyPropertyValue: not initialized!");
@@ -340,7 +340,7 @@ namespace frm
return sal_False;
}
- //---------------------------------------------------------------------
+
void OLimitedFormats::setFormatKeyPropertyValue( const Any& _rNewValue )
{
OSL_ENSURE(m_xAggregate.is() && (-1 != m_nFormatEnumPropertyHandle), "OLimitedFormats::setFormatKeyPropertyValue: not initialized!");
@@ -353,7 +353,7 @@ namespace frm
}
}
- //---------------------------------------------------------------------
+
void OLimitedFormats::acquireSupplier(const Reference< XComponentContext >& _rxContext)
{
::osl::MutexGuard aGuard(s_aMutex);
@@ -363,7 +363,7 @@ namespace frm
}
}
- //---------------------------------------------------------------------
+
void OLimitedFormats::releaseSupplier()
{
::osl::MutexGuard aGuard(s_aMutex);
diff --git a/forms/source/misc/listenercontainers.cxx b/forms/source/misc/listenercontainers.cxx
index 5c528737d33a..c6ff7fd32e45 100644
--- a/forms/source/misc/listenercontainers.cxx
+++ b/forms/source/misc/listenercontainers.cxx
@@ -31,7 +31,7 @@ namespace frm
//====================================================================
//= ResetListeners
//====================================================================
- //---------------------------------------------------------------------
+
bool ResetListeners::implTypedNotify( const Reference< XResetListener >& _rxListener,
const EventObject& _rEvent ) SAL_THROW( ( Exception ) )
{
diff --git a/forms/source/misc/property.cxx b/forms/source/misc/property.cxx
index cd5be3dc23e4..d042d2968858 100644
--- a/forms/source/misc/property.cxx
+++ b/forms/source/misc/property.cxx
@@ -35,7 +35,7 @@ namespace frm
//= PropertyInfoService
//==================================================================
PropertyInfoService::PropertyMap PropertyInfoService::s_AllKnownProperties;
-//------------------------------------------------------------------
+
sal_Int32 PropertyInfoService::getPropertyId(const OUString& _rName)
{
initialize();
@@ -57,13 +57,13 @@ sal_Int32 PropertyInfoService::getPropertyId(const OUString& _rName)
return nHandle;
}
-//------------------------------------------------------------------
+
sal_Int32 ConcreteInfoService::getPreferredPropertyId(const OUString& _rName)
{
return PropertyInfoService::getPropertyId(_rName);
}
-//------------------------------------------------------------------
+
#define ADD_PROP_ASSIGNMENT(varname) \
s_AllKnownProperties.push_back(PropertyAssignment(PROPERTY_##varname, PROPERTY_ID_##varname))
//..................................................................
diff --git a/forms/source/misc/services.cxx b/forms/source/misc/services.cxx
index e071c634b833..fd29532e4b3b 100644
--- a/forms/source/misc/services.cxx
+++ b/forms/source/misc/services.cxx
@@ -27,14 +27,14 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::registry;
-//---------------------------------------------------------------------------------------
+
//.......................................................................................
#define DECLARE_SERVICE_INFO(classImplName) \
namespace frm { \
extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> SAL_CALL classImplName##_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory) throw (::com::sun::star::uno::RuntimeException); \
}
-//---------------------------------------------------------------------------------------
+
DECLARE_SERVICE_INFO(OFixedTextModel)
DECLARE_SERVICE_INFO(ORadioButtonModel)
DECLARE_SERVICE_INFO(ORadioButtonControl)
@@ -89,7 +89,7 @@ namespace frm { \
DECLARE_SERVICE_INFO(OFormsCollection)
DECLARE_SERVICE_INFO(ImageProducer)
-//---------------------------------------------------------------------------------------
+
static Sequence< OUString > s_aClassImplementationNames;
static Sequence<Sequence< OUString > > s_aClassServiceNames;
@@ -97,7 +97,7 @@ static Sequence<sal_Int64> s_aFactories;
// need to use sal_Int64 instead of ComponentInstantiation, as ComponentInstantiation has no cppuType, so
// it can't be used with sequences
-//---------------------------------------------------------------------------------------
+
void registerClassInfo(
OUString _rClassImplName, // the ImplName of the class
const Sequence< OUString >& _rServiceNames, // the services supported by this class
@@ -118,7 +118,7 @@ void registerClassInfo(
s_aFactories.getArray()[nCurrentLength] = reinterpret_cast<sal_Int64>(_pCreateFunction);
}
-//---------------------------------------------------------------------------------------
+
//.......................................................................................
#define REGISTER_CLASS_CORE(classImplName) \
registerClassInfo( \
@@ -156,7 +156,7 @@ void registerClassInfo(
aServices.getArray()[3] = service4; \
REGISTER_CLASS_CORE(classImplName)
-//---------------------------------------------------------------------------------------
+
void ensureClassInfos()
{
if (s_aClassImplementationNames.getLength())
@@ -166,7 +166,7 @@ void ensureClassInfos()
// ========================================================================
// = ControlModels
- // ------------------------------------------------------------------------
+
// - FixedText
REGISTER_CLASS2(OFixedTextModel, FRM_COMPONENT_FIXEDTEXT, FRM_SUN_COMPONENT_FIXEDTEXT);
// - Hidden
@@ -279,7 +279,7 @@ void ensureClassInfos()
extern "C"
{
-//---------------------------------------------------------------------------------------
+
void SAL_CALL createRegistryInfo_ODatabaseForm();
void SAL_CALL createRegistryInfo_OFilterControl();
void SAL_CALL createRegistryInfo_OScrollBarModel();
@@ -291,7 +291,7 @@ void SAL_CALL createRegistryInfo_ORichTextControl();
void SAL_CALL createRegistryInfo_CLibxml2XFormsExtension();
void SAL_CALL createRegistryInfo_FormOperations();
-//---------------------------------------------------------------------------------------
+
void SAL_CALL createRegistryInfo_FORMS()
{
static sal_Bool bInit = sal_False;
@@ -311,7 +311,7 @@ void SAL_CALL createRegistryInfo_FORMS()
}
}
-//---------------------------------------------------------------------------------------
+
SAL_DLLPUBLIC_EXPORT void* SAL_CALL frm_component_getFactory(const sal_Char* _pImplName, XMultiServiceFactory* _pServiceManager, void* /*_pRegistryKey*/)
{
if (!_pServiceManager || !_pImplName)
diff --git a/forms/source/resource/frm_resource.cxx b/forms/source/resource/frm_resource.cxx
index a2a92e173170..2942d905b7cd 100644
--- a/forms/source/resource/frm_resource.cxx
+++ b/forms/source/resource/frm_resource.cxx
@@ -24,7 +24,7 @@
// ---- needed as long as we have no contexts for components ---
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
-//---------------------------------------------------
+
#include <svl/solar.hrc>
@@ -37,13 +37,13 @@ namespace frm
//==================================================================
SimpleResMgr* ResourceManager::m_pImpl = NULL;
- //------------------------------------------------------------------
+
ResourceManager::EnsureDelete::~EnsureDelete()
{
delete ResourceManager::m_pImpl;
}
- //------------------------------------------------------------------
+
void ResourceManager::ensureImplExists()
{
if (m_pImpl)
@@ -58,7 +58,7 @@ namespace frm
}
}
- //------------------------------------------------------------------
+
OUString ResourceManager::loadString(sal_uInt16 _nResId)
{
OUString sReturn;
diff --git a/forms/source/richtext/attributedispatcher.cxx b/forms/source/richtext/attributedispatcher.cxx
index 5a2acfe146c0..b6aaa4665758 100644
--- a/forms/source/richtext/attributedispatcher.cxx
+++ b/forms/source/richtext/attributedispatcher.cxx
@@ -35,7 +35,7 @@ namespace frm
//====================================================================
//= OAttributeDispatcher
//====================================================================
- //--------------------------------------------------------------------
+
OAttributeDispatcher::OAttributeDispatcher( EditView& _rView, AttributeId _nAttributeId, const URL& _rURL,
IMultiAttributeDispatcher* _pMasterDispatcher )
:ORichTextFeatureDispatcher( _rView, _rURL )
@@ -45,21 +45,21 @@ namespace frm
OSL_ENSURE( m_pMasterDispatcher, "OAttributeDispatcher::OAttributeDispatcher: invalid master dispatcher!" );
}
- //--------------------------------------------------------------------
+
OAttributeDispatcher::~OAttributeDispatcher( )
{
acquire();
dispose();
}
- //--------------------------------------------------------------------
+
void OAttributeDispatcher::disposing( ::osl::ClearableMutexGuard& _rClearBeforeNotify )
{
m_pMasterDispatcher = NULL;
ORichTextFeatureDispatcher::disposing( _rClearBeforeNotify );
}
- //--------------------------------------------------------------------
+
void OAttributeDispatcher::fillFeatureEventFromAttributeState( FeatureStateEvent& _rEvent, const AttributeState& _rState ) const
{
if ( _rState.eSimpleState == eChecked )
@@ -68,7 +68,7 @@ namespace frm
_rEvent.State <<= (sal_Bool)sal_False;
}
- //--------------------------------------------------------------------
+
FeatureStateEvent OAttributeDispatcher::buildStatusEvent() const
{
FeatureStateEvent aEvent( ORichTextFeatureDispatcher::buildStatusEvent() );
@@ -83,7 +83,7 @@ namespace frm
return aEvent;
}
- //--------------------------------------------------------------------
+
void SAL_CALL OAttributeDispatcher::dispatch( const URL& _rURL, const Sequence< PropertyValue >& _rArguments ) throw (RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -109,7 +109,7 @@ namespace frm
m_pMasterDispatcher->executeAttribute( m_nAttributeId, NULL );
}
- //--------------------------------------------------------------------
+
void OAttributeDispatcher::onAttributeStateChanged( AttributeId _nAttributeId, const AttributeState& /*_rState*/ )
{
OSL_ENSURE( _nAttributeId == m_nAttributeId, "OAttributeDispatcher::onAttributeStateChanged: wrong attribute!" );
diff --git a/forms/source/richtext/clipboarddispatcher.cxx b/forms/source/richtext/clipboarddispatcher.cxx
index 61881550647f..5f3d0fe6dd8a 100644
--- a/forms/source/richtext/clipboarddispatcher.cxx
+++ b/forms/source/richtext/clipboarddispatcher.cxx
@@ -60,7 +60,7 @@ namespace frm
//====================================================================
//= OClipboardDispatcher
//====================================================================
- //--------------------------------------------------------------------
+
OClipboardDispatcher::OClipboardDispatcher( EditView& _rView, ClipboardFunc _eFunc )
:ORichTextFeatureDispatcher( _rView, createClipboardURL( _eFunc ) )
,m_eFunc( _eFunc )
@@ -68,7 +68,7 @@ namespace frm
{
}
- //--------------------------------------------------------------------
+
sal_Bool OClipboardDispatcher::implIsEnabled( ) const
{
sal_Bool bEnabled = sal_False;
@@ -89,7 +89,7 @@ namespace frm
return bEnabled;
}
- //--------------------------------------------------------------------
+
FeatureStateEvent OClipboardDispatcher::buildStatusEvent() const
{
FeatureStateEvent aEvent( ORichTextFeatureDispatcher::buildStatusEvent() );
@@ -97,7 +97,7 @@ namespace frm
return aEvent;
}
- //--------------------------------------------------------------------
+
void OClipboardDispatcher::invalidateFeatureState_Broadcast()
{
sal_Bool bEnabled = implIsEnabled();
@@ -109,7 +109,7 @@ namespace frm
ORichTextFeatureDispatcher::invalidateFeatureState_Broadcast();
}
- //--------------------------------------------------------------------
+
void SAL_CALL OClipboardDispatcher::dispatch( const URL& /*_rURL*/, const Sequence< PropertyValue >& /*Arguments*/ ) throw (RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -135,7 +135,7 @@ namespace frm
//====================================================================
//= OPasteClipboardDispatcher
//====================================================================
- //--------------------------------------------------------------------
+
OPasteClipboardDispatcher::OPasteClipboardDispatcher( EditView& _rView )
:OClipboardDispatcher( _rView, ePaste )
,m_pClipListener( NULL )
@@ -150,7 +150,7 @@ namespace frm
m_bPastePossible = ( aDataHelper.HasFormat( SOT_FORMAT_STRING ) || aDataHelper.HasFormat( SOT_FORMAT_RTF ) );
}
- //--------------------------------------------------------------------
+
OPasteClipboardDispatcher::~OPasteClipboardDispatcher()
{
if ( !isDisposed() )
@@ -160,7 +160,7 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
IMPL_LINK( OPasteClipboardDispatcher, OnClipboardChanged, TransferableDataHelper*, _pDataHelper )
{
OSL_ENSURE( _pDataHelper, "OPasteClipboardDispatcher::OnClipboardChanged: ooops!" );
@@ -172,7 +172,7 @@ namespace frm
return 0L;
}
- //--------------------------------------------------------------------
+
void OPasteClipboardDispatcher::disposing( ::osl::ClearableMutexGuard& _rClearBeforeNotify )
{
OSL_ENSURE( getEditView() && getEditView()->GetWindow(), "OPasteClipboardDispatcher::disposing: EditView should not (yet) be disfunctional here!" );
@@ -184,7 +184,7 @@ namespace frm
OClipboardDispatcher::disposing( _rClearBeforeNotify );
}
- //--------------------------------------------------------------------
+
sal_Bool OPasteClipboardDispatcher::implIsEnabled( ) const
{
return m_bPastePossible && OClipboardDispatcher::implIsEnabled();
diff --git a/forms/source/richtext/featuredispatcher.cxx b/forms/source/richtext/featuredispatcher.cxx
index bc7d66af02a8..47fc1375d2f2 100644
--- a/forms/source/richtext/featuredispatcher.cxx
+++ b/forms/source/richtext/featuredispatcher.cxx
@@ -32,7 +32,7 @@ namespace frm
//====================================================================
//= ORichTextFeatureDispatcher
//====================================================================
- //--------------------------------------------------------------------
+
ORichTextFeatureDispatcher::ORichTextFeatureDispatcher( EditView& _rView, const URL& _rURL )
:m_aFeatureURL( _rURL )
,m_aStatusListeners( m_aMutex )
@@ -41,7 +41,7 @@ namespace frm
{
}
- //--------------------------------------------------------------------
+
ORichTextFeatureDispatcher::~ORichTextFeatureDispatcher( )
{
if ( !m_bDisposed )
@@ -51,7 +51,7 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
void ORichTextFeatureDispatcher::dispose()
{
EventObject aEvent( *this );
@@ -62,13 +62,13 @@ namespace frm
disposing( aGuard );
}
- //--------------------------------------------------------------------
+
void ORichTextFeatureDispatcher::disposing( ::osl::ClearableMutexGuard& /*_rClearBeforeNotify*/ )
{
m_pEditView = NULL;
}
- //--------------------------------------------------------------------
+
void SAL_CALL ORichTextFeatureDispatcher::addStatusListener( const Reference< XStatusListener >& _rxControl, const URL& _rURL ) throw (RuntimeException)
{
OSL_ENSURE( !m_bDisposed, "ORichTextFeatureDispatcher::addStatusListener: already disposed!" );
@@ -84,19 +84,19 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
void SAL_CALL ORichTextFeatureDispatcher::removeStatusListener( const Reference< XStatusListener >& _rxControl, const URL& /*_rURL*/ ) throw (RuntimeException)
{
m_aStatusListeners.removeInterface( _rxControl );
}
- //--------------------------------------------------------------------
+
void ORichTextFeatureDispatcher::invalidate()
{
invalidateFeatureState_Broadcast();
}
- //--------------------------------------------------------------------
+
FeatureStateEvent ORichTextFeatureDispatcher::buildStatusEvent() const
{
FeatureStateEvent aEvent;
@@ -107,7 +107,7 @@ namespace frm
return aEvent;
}
- //--------------------------------------------------------------------
+
void ORichTextFeatureDispatcher::invalidateFeatureState_Broadcast()
{
FeatureStateEvent aEvent( buildStatusEvent() );
@@ -116,13 +116,13 @@ namespace frm
doNotify( static_cast< XStatusListener* >( aIter.next() ), aEvent );
}
- //--------------------------------------------------------------------
+
void ORichTextFeatureDispatcher::newStatusListener( const Reference< XStatusListener >& _rxListener )
{
doNotify( _rxListener, buildStatusEvent() );
}
- //--------------------------------------------------------------------
+
void ORichTextFeatureDispatcher::doNotify( const Reference< XStatusListener >& _rxListener, const FeatureStateEvent& _rEvent ) const SAL_THROW(())
{
OSL_PRECOND( _rxListener.is(), "ORichTextFeatureDispatcher::doNotify: invalid listener!" );
diff --git a/forms/source/richtext/parametrizedattributedispatcher.cxx b/forms/source/richtext/parametrizedattributedispatcher.cxx
index fd729b47201e..fb90c2a0330b 100644
--- a/forms/source/richtext/parametrizedattributedispatcher.cxx
+++ b/forms/source/richtext/parametrizedattributedispatcher.cxx
@@ -41,20 +41,20 @@ namespace frm
//====================================================================
//= OParametrizedAttributeDispatcher
//====================================================================
- //--------------------------------------------------------------------
+
OParametrizedAttributeDispatcher::OParametrizedAttributeDispatcher( EditView& _rView, AttributeId _nAttributeId, const URL& _rURL, IMultiAttributeDispatcher* _pMasterDispatcher )
:OAttributeDispatcher( _rView, _nAttributeId, _rURL, _pMasterDispatcher )
{
}
- //--------------------------------------------------------------------
+
OParametrizedAttributeDispatcher::~OParametrizedAttributeDispatcher()
{
acquire();
dispose();
}
- //--------------------------------------------------------------------
+
namespace
{
static SfxSlotId lcl_normalizeLatinScriptSlotId( SfxSlotId _nSlotId )
@@ -71,7 +71,7 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
void OParametrizedAttributeDispatcher::fillFeatureEventFromAttributeState( FeatureStateEvent& _rEvent, const AttributeState& _rState ) const
{
OSL_ENSURE( getEditView(), "OParametrizedAttributeDispatcher::notifyState: already disposed!" );
@@ -91,7 +91,7 @@ namespace frm
OAttributeDispatcher::fillFeatureEventFromAttributeState( _rEvent, _rState );
}
- //--------------------------------------------------------------------
+
const SfxPoolItem* OParametrizedAttributeDispatcher::convertDispatchArgsToItem( const Sequence< PropertyValue >& _rArguments )
{
// get the real slot id. This may differ from our attribute id: for instance, both
@@ -113,7 +113,7 @@ namespace frm
return pArgument;
}
- //--------------------------------------------------------------------
+
void SAL_CALL OParametrizedAttributeDispatcher::dispatch( const URL& _rURL, const Sequence< PropertyValue >& _rArguments ) throw (RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx
index 80cae8b7f1ad..9a942ea66ed0 100644
--- a/forms/source/richtext/richtextcontrol.cxx
+++ b/forms/source/richtext/richtextcontrol.cxx
@@ -40,7 +40,7 @@
#include <svl/itempool.hxx>
#include <sfx2/msgpool.hxx>
-//--------------------------------------------------------------------------
+
extern "C" void SAL_CALL createRegistryInfo_ORichTextControl()
{
static ::frm::OMultiInstanceAutoRegistration< ::frm::ORichTextControl > aAutoRegistration;
@@ -78,21 +78,21 @@ namespace frm
//==================================================================
// ORichTextControl
//==================================================================
- //------------------------------------------------------------------
+
ORichTextControl::ORichTextControl()
:UnoEditControl()
{
}
- //------------------------------------------------------------------
+
ORichTextControl::~ORichTextControl()
{
}
- //------------------------------------------------------------------
+
IMPLEMENT_FORWARD_XTYPEPROVIDER2( ORichTextControl, UnoEditControl, ORichTextControl_Base )
- //------------------------------------------------------------------
+
Any SAL_CALL ORichTextControl::queryAggregation( const Type& _rType ) throw ( RuntimeException )
{
Any aReturn = UnoEditControl::queryAggregation( _rType );
@@ -103,7 +103,7 @@ namespace frm
return aReturn;
}
- //------------------------------------------------------------------
+
namespace
{
//..............................................................
@@ -173,7 +173,7 @@ namespace frm
}
}
- //------------------------------------------------------------------
+
void SAL_CALL ORichTextControl::createPeer( const Reference< XToolkit >& _rToolkit, const Reference< XWindowPeer >& _rParentPeer ) throw( RuntimeException )
{
sal_Bool bReallyActAsRichText = sal_False;
@@ -248,25 +248,25 @@ namespace frm
}
}
- //------------------------------------------------------------------
+
OUString SAL_CALL ORichTextControl::getImplementationName() throw( RuntimeException )
{
return getImplementationName_Static();
}
- //------------------------------------------------------------------
+
Sequence< OUString > SAL_CALL ORichTextControl::getSupportedServiceNames() throw( RuntimeException )
{
return getSupportedServiceNames_Static();
}
- //------------------------------------------------------------------
+
OUString SAL_CALL ORichTextControl::getImplementationName_Static()
{
return OUString( "com.sun.star.comp.form.ORichTextControl" );
}
- //------------------------------------------------------------------
+
Sequence< OUString > SAL_CALL ORichTextControl::getSupportedServiceNames_Static()
{
Sequence< OUString > aServices( 3 );
@@ -276,25 +276,25 @@ namespace frm
return aServices;
}
- //------------------------------------------------------------------
+
Reference< XInterface > SAL_CALL ORichTextControl::Create( const Reference< XMultiServiceFactory >& )
{
return *( new ORichTextControl() );
}
- //--------------------------------------------------------------------
+
Reference< XDispatch > SAL_CALL ORichTextControl::queryDispatch( const ::com::sun::star::util::URL& _rURL, const OUString& _rTargetFrameName, sal_Int32 _nSearchFlags ) throw (RuntimeException)
{
FORWARD_TO_PEER_3_RET( Reference< XDispatch >, XDispatchProvider, queryDispatch, _rURL, _rTargetFrameName, _nSearchFlags );
}
- //--------------------------------------------------------------------
+
Sequence< Reference< XDispatch > > SAL_CALL ORichTextControl::queryDispatches( const Sequence< DispatchDescriptor >& _rRequests ) throw (RuntimeException)
{
FORWARD_TO_PEER_1_RET( Sequence< Reference< XDispatch > >, XDispatchProvider, queryDispatches, _rRequests );
}
- //--------------------------------------------------------------------
+
sal_Bool ORichTextControl::requiresNewPeer( const OUString& _rPropertyName ) const
{
return UnoControl::requiresNewPeer( _rPropertyName ) || _rPropertyName.equals( PROPERTY_RICH_TEXT );
@@ -303,7 +303,7 @@ namespace frm
//==================================================================
// ORichTextPeer
//==================================================================
- //------------------------------------------------------------------
+
ORichTextPeer* ORichTextPeer::Create( const Reference< XControlModel >& _rxModel, Window* _pParentWindow, WinBits _nStyle )
{
DBG_TESTSOLARMUTEX();
@@ -328,17 +328,17 @@ namespace frm
return pPeer;
}
- //------------------------------------------------------------------
+
ORichTextPeer::ORichTextPeer()
{
}
- //------------------------------------------------------------------
+
ORichTextPeer::~ORichTextPeer()
{
}
- //------------------------------------------------------------------
+
void ORichTextPeer::dispose( ) throw(RuntimeException)
{
{
@@ -364,7 +364,7 @@ namespace frm
VCLXWindow::dispose();
}
- //--------------------------------------------------------------------
+
void SAL_CALL ORichTextPeer::draw( sal_Int32 _nX, sal_Int32 _nY ) throw(::com::sun::star::uno::RuntimeException)
{
SolarMutexGuard aGuard;
@@ -391,7 +391,7 @@ namespace frm
pControl->Draw( pTargetDevice, aPos, aSize, WINDOW_DRAW_NOCONTROLS );
}
- //--------------------------------------------------------------------
+
void SAL_CALL ORichTextPeer::setProperty( const OUString& _rPropertyName, const Any& _rValue )
throw (RuntimeException,
std::exception)
@@ -455,13 +455,13 @@ namespace frm
VCLXWindow::setProperty( _rPropertyName, _rValue );
}
- //------------------------------------------------------------------
+
IMPLEMENT_FORWARD_XINTERFACE2( ORichTextPeer, VCLXWindow, ORichTextPeer_Base )
- //------------------------------------------------------------------
+
IMPLEMENT_FORWARD_XTYPEPROVIDER2( ORichTextPeer, VCLXWindow, ORichTextPeer_Base )
- //--------------------------------------------------------------------
+
namespace
{
static SfxSlotId lcl_translateConflictingSlot( SfxSlotId _nIDFromPool )
@@ -495,7 +495,7 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
ORichTextPeer::SingleAttributeDispatcher ORichTextPeer::implCreateDispatcher( SfxSlotId _nSlotId, const ::com::sun::star::util::URL& _rURL )
{
RichTextControl* pRichTextControl = static_cast< RichTextControl* >( GetWindow() );
@@ -638,7 +638,7 @@ namespace frm
return xDispatcher;
}
- //--------------------------------------------------------------------
+
namespace
{
SfxSlotId lcl_getSlotFromUnoName( SfxSlotPool& _rSlotPool, const OUString& _rUnoSlotName )
@@ -664,7 +664,7 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
Reference< XDispatch > SAL_CALL ORichTextPeer::queryDispatch( const ::com::sun::star::util::URL& _rURL, const OUString& /*_rTargetFrameName*/, sal_Int32 /*_nSearchFlags*/ ) throw (RuntimeException)
{
Reference< XDispatch > xReturn;
@@ -701,7 +701,7 @@ namespace frm
return xReturn;
}
- //--------------------------------------------------------------------
+
Sequence< Reference< XDispatch > > SAL_CALL ORichTextPeer::queryDispatches( const Sequence< DispatchDescriptor >& _rRequests ) throw (RuntimeException)
{
Sequence< Reference< XDispatch > > aReturn( _rRequests.getLength() );
@@ -716,7 +716,7 @@ namespace frm
return aReturn;
}
- //--------------------------------------------------------------------
+
void ORichTextPeer::onSelectionChanged( const ESelection& /*_rSelection*/ )
{
AttributeDispatchers::iterator aDispatcherPos = m_aDispatchers.find( SID_COPY );
diff --git a/forms/source/richtext/richtextengine.cxx b/forms/source/richtext/richtextengine.cxx
index 98221cc4a61e..488df7c5c7ba 100644
--- a/forms/source/richtext/richtextengine.cxx
+++ b/forms/source/richtext/richtextengine.cxx
@@ -44,7 +44,7 @@ namespace frm
//====================================================================
//= RichTextEngine
//====================================================================
- //--------------------------------------------------------------------
+
RichTextEngine* RichTextEngine::Create()
{
SolarMutexGuard g;
@@ -79,7 +79,7 @@ namespace frm
return pReturn;
}
- //--------------------------------------------------------------------
+
RichTextEngine* RichTextEngine::Clone()
{
RichTextEngine* pClone( NULL );
@@ -98,19 +98,19 @@ namespace frm
return pClone;
}
- //--------------------------------------------------------------------
+
RichTextEngine::RichTextEngine( SfxItemPool* _pPool )
:EditEngine( _pPool )
,m_pEnginePool( _pPool )
{
}
- //--------------------------------------------------------------------
+
RichTextEngine::~RichTextEngine( )
{
}
- //--------------------------------------------------------------------
+
void RichTextEngine::registerEngineStatusListener( IEngineStatusListener* _pListener )
{
OSL_ENSURE( _pListener, "RichTextEngine::registerEngineStatusListener: invalid listener!" );
@@ -118,7 +118,7 @@ namespace frm
m_aStatusListeners.push_back( _pListener );
}
- //--------------------------------------------------------------------
+
void RichTextEngine::revokeEngineStatusListener( IEngineStatusListener* _pListener )
{
::std::vector< IEngineStatusListener* >::iterator aPos = ::std::find_if(
@@ -131,7 +131,7 @@ namespace frm
m_aStatusListeners.erase( aPos );
}
- //--------------------------------------------------------------------
+
IMPL_LINK( RichTextEngine, EditEngineStatusChanged, EditStatus*, _pStatus )
{
for ( ::std::vector< IEngineStatusListener* >::const_iterator aLoop = m_aStatusListeners.begin();
diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx
index 8ae8f53c65bd..b81929e4e5b5 100644
--- a/forms/source/richtext/richtextimplcontrol.cxx
+++ b/forms/source/richtext/richtextimplcontrol.cxx
@@ -44,7 +44,7 @@ namespace frm
//====================================================================
//= RichTextControlImpl
//====================================================================
- //--------------------------------------------------------------------
+
RichTextControlImpl::RichTextControlImpl( Control* _pAntiImpl, RichTextEngine* _pEngine, ITextAttributeListener* _pTextAttrListener, ITextSelectionListener* _pSelectionListener )
:m_pAntiImpl ( _pAntiImpl )
,m_pViewport ( NULL )
@@ -89,7 +89,7 @@ namespace frm
m_pAntiImpl->SetBackground( Wallpaper( m_pAntiImpl->GetSettings().GetStyleSettings().GetFieldColor() ) );
}
- //--------------------------------------------------------------------
+
RichTextControlImpl::~RichTextControlImpl( )
{
m_pEngine->RemoveView( m_pView );
@@ -101,7 +101,7 @@ namespace frm
delete m_pScrollCorner;
}
- //--------------------------------------------------------------------
+
void RichTextControlImpl::implUpdateAttribute( AttributeHandlerPool::const_iterator _pHandler )
{
if ( ( _pHandler->first == SID_ATTR_CHAR_WEIGHT )
@@ -127,7 +127,7 @@ namespace frm
implCheckUpdateCache( _pHandler->first, _pHandler->second->getState( m_pView->GetAttribs() ) );
}
- //--------------------------------------------------------------------
+
void RichTextControlImpl::updateAttribute( AttributeId _nAttribute )
{
AttributeHandlerPool::const_iterator pHandler = m_aAttributeHandlers.find( _nAttribute );
@@ -135,7 +135,7 @@ namespace frm
implUpdateAttribute( pHandler );
}
- //--------------------------------------------------------------------
+
void RichTextControlImpl::updateAllAttributes( )
{
for ( AttributeHandlerPool::const_iterator pHandler = m_aAttributeHandlers.begin();
@@ -158,7 +158,7 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
AttributeState RichTextControlImpl::getAttributeState( AttributeId _nAttributeId ) const
{
StateCache::const_iterator aCachedStatePos = m_aLastKnownStates.find( _nAttributeId );
@@ -170,7 +170,7 @@ namespace frm
return aCachedStatePos->second;
}
- //--------------------------------------------------------------------
+
bool RichTextControlImpl::executeAttribute( const SfxItemSet& _rCurrentAttribs, SfxItemSet& _rAttribs, AttributeId _nAttribute, const SfxPoolItem* _pArgument, ScriptType _nForScriptType )
{
// let's see whether we have a handler for this attribute
@@ -183,7 +183,7 @@ namespace frm
return false;
}
- //--------------------------------------------------------------------
+
void RichTextControlImpl::enableAttributeNotification( AttributeId _nAttributeId, ITextAttributeListener* _pListener )
{
AttributeHandlerPool::const_iterator aHandlerPos = m_aAttributeHandlers.find( _nAttributeId );
@@ -206,7 +206,7 @@ namespace frm
updateAttribute( _nAttributeId );
}
- //--------------------------------------------------------------------
+
void RichTextControlImpl::disableAttributeNotification( AttributeId _nAttributeId )
{
// forget the handler for this attribute
@@ -220,7 +220,7 @@ namespace frm
m_aAttributeListeners.erase( aListenerPos );
}
- //--------------------------------------------------------------------
+
void RichTextControlImpl::normalizeScriptDependentAttribute( SvxScriptSetItem& _rScriptSetItem )
{
_rScriptSetItem.GetItemSet().Put( m_pView->GetAttribs(), false );
@@ -238,7 +238,7 @@ namespace frm
_rScriptSetItem.GetItemSet().InvalidateItem( nNormalizedWhichId );
}
- //--------------------------------------------------------------------
+
void RichTextControlImpl::implCheckUpdateCache( AttributeId _nAttribute, const AttributeState& _rState )
{
StateCache::iterator aCachePos = m_aLastKnownStates.find( _nAttribute );
@@ -266,7 +266,7 @@ namespace frm
m_pTextAttrListener->onAttributeStateChanged( _nAttribute, _rState );
}
- //--------------------------------------------------------------------
+
ScriptType RichTextControlImpl::getSelectedScriptType() const
{
ScriptType nScript = m_pView->GetSelectedScriptType();
@@ -275,7 +275,7 @@ namespace frm
return nScript;
}
- //--------------------------------------------------------------------
+
void RichTextControlImpl::EditEngineStatusChanged( const EditStatus& _rStatus )
{
sal_uLong nStatusWord( _rStatus.GetStatusWord() );
@@ -314,28 +314,28 @@ namespace frm
m_pVScroll->SetThumbPos( m_pView->GetVisArea().Top() );
}
- //--------------------------------------------------------------------
+
IMPL_LINK( RichTextControlImpl, OnInvalidateAllAttributes, void*, /*_pNotInterestedIn*/ )
{
updateAllAttributes();
return 0L;
}
- //--------------------------------------------------------------------
+
IMPL_LINK( RichTextControlImpl, OnHScroll, ScrollBar*, _pScrollbar )
{
m_pView->Scroll( -_pScrollbar->GetDelta(), 0, RGCHK_PAPERSZ1 );
return 0L;
}
- //--------------------------------------------------------------------
+
IMPL_LINK( RichTextControlImpl, OnVScroll, ScrollBar*, _pScrollbar )
{
m_pView->Scroll( 0, -_pScrollbar->GetDelta(), RGCHK_PAPERSZ1 );
return 0L;
}
- //--------------------------------------------------------------------
+
void RichTextControlImpl::ensureScrollbars()
{
bool bNeedVScroll = 0 != ( m_pAntiImpl->GetStyle() & WB_VSCROLL );
@@ -385,7 +385,7 @@ namespace frm
layoutWindow();
}
- //--------------------------------------------------------------------
+
void RichTextControlImpl::ensureLineBreakSetting()
{
if ( !windowHasAutomaticLineBreak() )
@@ -394,7 +394,7 @@ namespace frm
layoutWindow();
}
- //--------------------------------------------------------------------
+
void RichTextControlImpl::layoutWindow()
{
if ( !m_bHasEverBeenShown )
@@ -480,7 +480,7 @@ namespace frm
updateScrollbars();
}
- //--------------------------------------------------------------------
+
void RichTextControlImpl::updateScrollbars()
{
if ( m_pVScroll )
@@ -499,7 +499,7 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
void RichTextControlImpl::notifyInitShow()
{
if ( !m_bHasEverBeenShown )
@@ -509,14 +509,14 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
void RichTextControlImpl::notifyStyleChanged()
{
ensureScrollbars();
ensureLineBreakSetting();
}
- //--------------------------------------------------------------------
+
void RichTextControlImpl::notifyZoomChanged()
{
const Fraction& rZoom = m_pAntiImpl->GetZoom();
@@ -532,25 +532,25 @@ namespace frm
layoutWindow();
}
- //--------------------------------------------------------------------
+
bool RichTextControlImpl::windowHasAutomaticLineBreak()
{
return ( m_pAntiImpl->GetStyle() & WB_WORDBREAK ) != 0;
}
- //--------------------------------------------------------------------
+
void RichTextControlImpl::SetReadOnly( bool _bReadOnly )
{
m_pView->SetReadOnly( _bReadOnly );
}
- //--------------------------------------------------------------------
+
bool RichTextControlImpl::IsReadOnly() const
{
return m_pView->IsReadOnly( );
}
- //--------------------------------------------------------------------
+
namespace
{
static void lcl_inflate( Rectangle& _rRect, long _nInflateX, long _nInflateY )
@@ -561,7 +561,7 @@ namespace frm
_rRect.Bottom() += _nInflateY;
}
}
- //--------------------------------------------------------------------
+
long RichTextControlImpl::HandleCommand( const CommandEvent& _rEvent )
{
if ( ( _rEvent.GetCommand() == COMMAND_WHEEL )
@@ -575,7 +575,7 @@ namespace frm
return 0;
}
- //--------------------------------------------------------------------
+
void RichTextControlImpl::Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, sal_uLong /*_nFlags*/ )
{
// need to normalize the map mode of the device - every paint operation on any device needs
@@ -635,13 +635,13 @@ namespace frm
_pDev->Pop();
}
- //--------------------------------------------------------------------
+
void RichTextControlImpl::SetBackgroundColor( )
{
SetBackgroundColor( Application::GetSettings().GetStyleSettings().GetFieldColor() );
}
- //--------------------------------------------------------------------
+
void RichTextControlImpl::SetBackgroundColor( const Color& _rColor )
{
Wallpaper aWallpaper( _rColor );
@@ -649,13 +649,13 @@ namespace frm
m_pViewport->SetBackground( aWallpaper );
}
- //--------------------------------------------------------------------
+
void RichTextControlImpl::SetHideInactiveSelection( bool _bHide )
{
m_pViewport->SetHideInactiveSelection( _bHide );
}
- //--------------------------------------------------------------------
+
bool RichTextControlImpl::GetHideInactiveSelection() const
{
return m_pViewport->GetHideInactiveSelection( );
diff --git a/forms/source/richtext/richtextmodel.cxx b/forms/source/richtext/richtextmodel.cxx
index 25134d69ab74..50ccfa8ef0db 100644
--- a/forms/source/richtext/richtextmodel.cxx
+++ b/forms/source/richtext/richtextmodel.cxx
@@ -33,7 +33,7 @@
#include <vcl/outdev.hxx>
#include <vcl/svapp.hxx>
-//--------------------------------------------------------------------------
+
extern "C" void SAL_CALL createRegistryInfo_ORichTextModel()
{
static ::frm::OMultiInstanceAutoRegistration< ::frm::ORichTextModel > aRegisterModel;
@@ -58,7 +58,7 @@ namespace frm
//====================================================================
//= ORichTextModel
//====================================================================
- //--------------------------------------------------------------------
+
ORichTextModel::ORichTextModel( const Reference< XComponentContext >& _rxFactory )
:OControlModel ( _rxFactory, OUString() )
,FontControlModel ( true )
@@ -90,7 +90,7 @@ namespace frm
implInit();
}
- //------------------------------------------------------------------
+
ORichTextModel::ORichTextModel( const ORichTextModel* _pOriginal, const Reference< XComponentContext >& _rxFactory )
:OControlModel ( _pOriginal, _rxFactory, sal_False )
,FontControlModel ( _pOriginal )
@@ -131,7 +131,7 @@ namespace frm
implInit();
}
- //------------------------------------------------------------------
+
void ORichTextModel::implInit()
{
OSL_ENSURE( m_pEngine.get(), "ORichTextModel::implInit: where's the engine?" );
@@ -152,7 +152,7 @@ namespace frm
implRegisterProperties();
}
- //------------------------------------------------------------------
+
void ORichTextModel::implDoAggregation()
{
increment( m_refCount );
@@ -166,7 +166,7 @@ namespace frm
decrement( m_refCount );
}
- //------------------------------------------------------------------
+
void ORichTextModel::implRegisterProperties()
{
REGISTER_PROP_2( DEFAULTCONTROL, m_sDefaultControl, BOUND, MAYBEDEFAULT );
@@ -202,7 +202,7 @@ namespace frm
REGISTER_VOID_PROP_2( ALIGN, m_aAlign, sal_Int16, BOUND, MAYBEDEFAULT );
}
- //--------------------------------------------------------------------
+
ORichTextModel::~ORichTextModel( )
{
if ( !OComponentHelper::rBHelper.bDisposed )
@@ -221,7 +221,7 @@ namespace frm
}
- //------------------------------------------------------------------
+
Any SAL_CALL ORichTextModel::queryAggregation( const Type& _rType ) throw ( RuntimeException )
{
Any aReturn = ORichTextModel_BASE::queryInterface( _rType );
@@ -232,10 +232,10 @@ namespace frm
return aReturn;
}
- //------------------------------------------------------------------
+
IMPLEMENT_FORWARD_XTYPEPROVIDER2( ORichTextModel, OControlModel, ORichTextModel_BASE )
- //--------------------------------------------------------------------
+
IMPLEMENT_SERVICE_REGISTRATION_8( ORichTextModel, OControlModel,
FRM_SUN_COMPONENT_RICHTEXTCONTROL,
OUString( "com.sun.star.text.TextRange" ),
@@ -247,17 +247,17 @@ namespace frm
OUString( "com.sun.star.style.ParagraphPropertiesComplex" )
)
- //------------------------------------------------------------------------------
+
IMPLEMENT_DEFAULT_CLONING( ORichTextModel )
- //------------------------------------------------------------------------------
+
void SAL_CALL ORichTextModel::disposing()
{
m_aModifyListeners.disposeAndClear( EventObject( *this ) );
OControlModel::disposing();
}
- //------------------------------------------------------------------------------
+
namespace
{
void lcl_removeProperty( Sequence< Property >& _rSeq, const OUString& _rPropertyName )
@@ -276,7 +276,7 @@ namespace frm
}
}
}
- //------------------------------------------------------------------------------
+
void ORichTextModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 1, OControlModel )
@@ -294,7 +294,7 @@ namespace frm
_rProps = concatSequences( aContainedProperties, aFontProperties, _rProps );
}
- //------------------------------------------------------------------------------
+
void ORichTextModel::describeAggregateProperties( Sequence< Property >& _rAggregateProps ) const
{
OControlModel::describeAggregateProperties( _rAggregateProps );
@@ -309,7 +309,7 @@ namespace frm
lcl_removeProperty( _rAggregateProps, PROPERTY_WRITING_MODE );
}
- //--------------------------------------------------------------------
+
void SAL_CALL ORichTextModel::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) const
{
if ( isRegisteredProperty( _nHandle ) )
@@ -326,7 +326,7 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
sal_Bool SAL_CALL ORichTextModel::convertFastPropertyValue( Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue ) throw( IllegalArgumentException )
{
sal_Bool bModified = sal_False;
@@ -347,7 +347,7 @@ namespace frm
return bModified;
}
- //--------------------------------------------------------------------
+
void SAL_CALL ORichTextModel::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const Any& _rValue ) throw ( Exception)
{
if ( isRegisteredProperty( _nHandle ) )
@@ -411,7 +411,7 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
Any ORichTextModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
{
Any aDefault;
@@ -480,7 +480,7 @@ namespace frm
return aDefault;
}
- //--------------------------------------------------------------------
+
void ORichTextModel::impl_smlock_setEngineText( const OUString& _rText )
{
if ( m_pEngine.get() )
@@ -492,27 +492,27 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
OUString SAL_CALL ORichTextModel::getServiceName() throw ( RuntimeException)
{
return OUString(FRM_SUN_COMPONENT_RICHTEXTCONTROL);
}
- //--------------------------------------------------------------------
+
void SAL_CALL ORichTextModel::write(const Reference< XObjectOutputStream >& _rxOutStream) throw ( IOException, RuntimeException)
{
OControlModel::write( _rxOutStream );
// TODO: place your code here
}
- //--------------------------------------------------------------------
+
void SAL_CALL ORichTextModel::read(const Reference< XObjectInputStream >& _rxInStream) throw ( IOException, RuntimeException)
{
OControlModel::read( _rxInStream );
// TODO: place your code here
}
- //--------------------------------------------------------------------
+
RichTextEngine* ORichTextModel::getEditEngine( const Reference< XControlModel >& _rxModel )
{
RichTextEngine* pEngine = NULL;
@@ -533,7 +533,7 @@ namespace frm
return pEngine;
}
- //--------------------------------------------------------------------
+
Sequence< sal_Int8 > ORichTextModel::getEditEngineTunnelId()
{
static ::cppu::OImplementationId * pId = 0;
@@ -549,7 +549,7 @@ namespace frm
return pId->getImplementationId();
}
- //--------------------------------------------------------------------
+
IMPL_LINK( ORichTextModel, OnEngineContentModified, void*, /*_pNotInterestedIn*/ )
{
if ( !m_bSettingEngineText )
@@ -566,7 +566,7 @@ namespace frm
return 0L;
}
- //--------------------------------------------------------------------
+
sal_Int64 SAL_CALL ORichTextModel::getSomething( const Sequence< sal_Int8 >& _rId ) throw (RuntimeException)
{
Sequence< sal_Int8 > aEditEngineAccessId( getEditEngineTunnelId() );
@@ -582,19 +582,19 @@ namespace frm
return 0;
}
- //--------------------------------------------------------------------
+
void SAL_CALL ORichTextModel::addModifyListener( const Reference< XModifyListener >& _rxListener ) throw (RuntimeException)
{
m_aModifyListeners.addInterface( _rxListener );
}
- //--------------------------------------------------------------------
+
void SAL_CALL ORichTextModel::removeModifyListener( const Reference< XModifyListener >& _rxListener ) throw (RuntimeException)
{
m_aModifyListeners.removeInterface( _rxListener );
}
- //--------------------------------------------------------------------
+
void ORichTextModel::potentialTextChange( )
{
OUString sCurrentEngineText;
diff --git a/forms/source/richtext/richtextunowrapper.cxx b/forms/source/richtext/richtextunowrapper.cxx
index 4415f15f4dcc..c091d28fd2eb 100644
--- a/forms/source/richtext/richtextunowrapper.cxx
+++ b/forms/source/richtext/richtextunowrapper.cxx
@@ -61,14 +61,14 @@ namespace frm
//====================================================================
//= ORichTextUnoWrapper
//====================================================================
- //--------------------------------------------------------------------
+
ORichTextUnoWrapper::ORichTextUnoWrapper( EditEngine& _rEngine, IEngineTextChangeListener* _pTextChangeListener )
:SvxUnoText( getTextEnginePropertySet() )
{
SetEditSource( new RichTextEditSource( _rEngine, _pTextChangeListener ) );
}
- //--------------------------------------------------------------------
+
ORichTextUnoWrapper::~ORichTextUnoWrapper() throw()
{
}
@@ -76,7 +76,7 @@ namespace frm
//====================================================================
//= RichTextEditSource
//====================================================================
- //--------------------------------------------------------------------
+
RichTextEditSource::RichTextEditSource( EditEngine& _rEngine, IEngineTextChangeListener* _pTextChangeListener )
:m_rEngine ( _rEngine )
,m_pTextForwarder ( new SvxEditEngineForwarder( _rEngine ) )
@@ -84,25 +84,25 @@ namespace frm
{
}
- //--------------------------------------------------------------------
+
RichTextEditSource::~RichTextEditSource()
{
delete m_pTextForwarder;
}
- //--------------------------------------------------------------------
+
SvxEditSource* RichTextEditSource::Clone() const
{
return new RichTextEditSource( m_rEngine, m_pTextChangeListener );
}
- //--------------------------------------------------------------------
+
SvxTextForwarder* RichTextEditSource::GetTextForwarder()
{
return m_pTextForwarder;
}
- //--------------------------------------------------------------------
+
void RichTextEditSource::UpdateData()
{
// this means that the content of the EditEngine changed via the UNO API
diff --git a/forms/source/richtext/richtextvclcontrol.cxx b/forms/source/richtext/richtextvclcontrol.cxx
index 2367e51bdb85..fdd967bd618c 100644
--- a/forms/source/richtext/richtextvclcontrol.cxx
+++ b/forms/source/richtext/richtextvclcontrol.cxx
@@ -48,7 +48,7 @@ namespace frm
//====================================================================
//= RichTextControl
//====================================================================
- //--------------------------------------------------------------------
+
RichTextControl::RichTextControl( RichTextEngine* _pEngine, Window* _pParent, WinBits _nStyle,
ITextAttributeListener* _pTextAttribListener, ITextSelectionListener* _pSelectionListener )
:Control( _pParent, implInitStyle( _nStyle ) )
@@ -57,26 +57,26 @@ namespace frm
implInit( _pEngine, _pTextAttribListener, _pSelectionListener );
}
- //--------------------------------------------------------------------
+
void RichTextControl::implInit( RichTextEngine* _pEngine, ITextAttributeListener* _pTextAttribListener, ITextSelectionListener* _pSelectionListener )
{
m_pImpl = new RichTextControlImpl( this, _pEngine, _pTextAttribListener, _pSelectionListener );
SetCompoundControl( true );
}
- //--------------------------------------------------------------------
+
RichTextControl::~RichTextControl( )
{
delete m_pImpl;
}
- //--------------------------------------------------------------------
+
AttributeState RichTextControl::getState( AttributeId _nAttributeId ) const
{
return m_pImpl->getAttributeState( _nAttributeId );
}
- //--------------------------------------------------------------------
+
void RichTextControl::executeAttribute( AttributeId _nAttributeId, const SfxPoolItem* _pArgument )
{
SfxItemSet aToApplyAttributes( getView().GetEmptyItemSet() );
@@ -89,7 +89,7 @@ namespace frm
applyAttributes( aToApplyAttributes );
}
- //--------------------------------------------------------------------
+
void RichTextControl::applyAttributes( const SfxItemSet& _rAttributesToApply )
{
// apply
@@ -112,19 +112,19 @@ namespace frm
// (the handler for the just executed attribute should know)
}
- //--------------------------------------------------------------------
+
void RichTextControl::enableAttributeNotification( AttributeId _nAttributeId, ITextAttributeListener* _pListener )
{
m_pImpl->enableAttributeNotification( _nAttributeId, _pListener );
}
- //--------------------------------------------------------------------
+
void RichTextControl::disableAttributeNotification( AttributeId _nAttributeId )
{
m_pImpl->disableAttributeNotification( _nAttributeId );
}
- //--------------------------------------------------------------------
+
bool RichTextControl::isMappableSlot( SfxSlotId _nSlotId )
{
switch ( _nSlotId )
@@ -152,20 +152,20 @@ namespace frm
return false;
}
- //--------------------------------------------------------------------
+
void RichTextControl::Resize()
{
m_pImpl->layoutWindow();
Invalidate();
}
- //--------------------------------------------------------------------
+
void RichTextControl::GetFocus()
{
getViewport().GrabFocus();
}
- //--------------------------------------------------------------------
+
WinBits RichTextControl::implInitStyle( WinBits nStyle )
{
if ( !( nStyle & WB_NOTABSTOP ) )
@@ -173,7 +173,7 @@ namespace frm
return nStyle;
}
- //--------------------------------------------------------------------
+
void RichTextControl::StateChanged( StateChangedType _nStateChange )
{
if ( _nStateChange == STATE_CHANGE_STYLE )
@@ -192,7 +192,7 @@ namespace frm
Control::StateChanged( _nStateChange );
}
- //--------------------------------------------------------------------
+
bool RichTextControl::PreNotify( NotifyEvent& _rNEvt )
{
if ( IsWindowOrChild( _rNEvt.GetWindow() ) )
@@ -285,7 +285,7 @@ namespace frm
return Control::PreNotify( _rNEvt );
}
- //--------------------------------------------------------------------
+
bool RichTextControl::Notify( NotifyEvent& _rNEvt )
{
bool nDone = false;
@@ -297,67 +297,67 @@ namespace frm
return nDone || Control::Notify( _rNEvt );
}
- //--------------------------------------------------------------------
+
void RichTextControl::Draw( OutputDevice* _pDev, const Point& _rPos, const Size& _rSize, sal_uLong _nFlags )
{
m_pImpl->Draw( _pDev, _rPos, _rSize, _nFlags );
}
- //--------------------------------------------------------------------
+
EditView& RichTextControl::getView()
{
return *m_pImpl->getView( RichTextControlImpl::GrantAccess() );
}
- //--------------------------------------------------------------------
+
const EditView& RichTextControl::getView() const
{
return *m_pImpl->getView( RichTextControlImpl::GrantAccess() );
}
- //--------------------------------------------------------------------
+
EditEngine& RichTextControl::getEngine() const
{
return *m_pImpl->getEngine( RichTextControlImpl::GrantAccess() );
}
- //--------------------------------------------------------------------
+
Window& RichTextControl::getViewport() const
{
return *m_pImpl->getViewport( RichTextControlImpl::GrantAccess() );
}
- //--------------------------------------------------------------------
+
void RichTextControl::SetReadOnly( bool _bReadOnly )
{
m_pImpl->SetReadOnly( _bReadOnly );
}
- //--------------------------------------------------------------------
+
bool RichTextControl::IsReadOnly() const
{
return m_pImpl->IsReadOnly();
}
- //--------------------------------------------------------------------
+
void RichTextControl::SetBackgroundColor( )
{
m_pImpl->SetBackgroundColor( );
}
- //--------------------------------------------------------------------
+
void RichTextControl::SetBackgroundColor( const Color& _rColor )
{
m_pImpl->SetBackgroundColor( _rColor );
}
- //--------------------------------------------------------------------
+
void RichTextControl::SetHideInactiveSelection( bool _bHide )
{
m_pImpl->SetHideInactiveSelection( _bHide );
}
- //--------------------------------------------------------------------
+
bool RichTextControl::GetHideInactiveSelection() const
{
return m_pImpl->GetHideInactiveSelection( );
diff --git a/forms/source/richtext/richtextviewport.cxx b/forms/source/richtext/richtextviewport.cxx
index a3f69c430d86..26077b52d48a 100644
--- a/forms/source/richtext/richtextviewport.cxx
+++ b/forms/source/richtext/richtextviewport.cxx
@@ -28,7 +28,7 @@ namespace frm
//====================================================================
//= RichTextViewPort
//====================================================================
- //--------------------------------------------------------------------
+
RichTextViewPort::RichTextViewPort( Window* _pParent )
:Control ( _pParent )
,m_pView(NULL)
@@ -36,20 +36,20 @@ namespace frm
{
}
- //--------------------------------------------------------------------
+
void RichTextViewPort::setView( EditView& _rView )
{
m_pView = &_rView;
SetPointer( _rView.GetPointer() );
}
- //--------------------------------------------------------------------
+
void RichTextViewPort::Paint( const Rectangle& _rRect )
{
m_pView->Paint( _rRect );
}
- //--------------------------------------------------------------------
+
void RichTextViewPort::GetFocus()
{
Control::GetFocus();
@@ -57,7 +57,7 @@ namespace frm
m_pView->ShowCursor( true );
}
- //--------------------------------------------------------------------
+
void RichTextViewPort::LoseFocus()
{
m_pView->HideCursor();
@@ -65,7 +65,7 @@ namespace frm
Control::LoseFocus();
}
- //--------------------------------------------------------------------
+
void RichTextViewPort::KeyInput( const KeyEvent& _rKEvt )
{
if ( !m_pView->PostKeyEvent( _rKEvt ) )
@@ -74,14 +74,14 @@ namespace frm
implInvalidateAttributes();
}
- //--------------------------------------------------------------------
+
void RichTextViewPort::MouseMove( const MouseEvent& _rMEvt )
{
Control::MouseMove( _rMEvt );
m_pView->MouseMove( _rMEvt );
}
- //--------------------------------------------------------------------
+
void RichTextViewPort::MouseButtonDown( const MouseEvent& _rMEvt )
{
Control::MouseButtonDown( _rMEvt );
@@ -89,7 +89,7 @@ namespace frm
GrabFocus();
}
- //--------------------------------------------------------------------
+
void RichTextViewPort::MouseButtonUp( const MouseEvent& _rMEvt )
{
Control::MouseButtonUp( _rMEvt );
@@ -97,7 +97,7 @@ namespace frm
implInvalidateAttributes();
}
- //--------------------------------------------------------------------
+
void RichTextViewPort::SetHideInactiveSelection( bool _bHide )
{
if ( m_bHideInactiveSelection == _bHide )
@@ -107,7 +107,7 @@ namespace frm
m_pView->SetSelectionMode( m_bHideInactiveSelection ? EE_SELMODE_HIDDEN : EE_SELMODE_STD );
}
- //--------------------------------------------------------------------
+
bool RichTextViewPort::GetHideInactiveSelection() const
{
return m_bHideInactiveSelection;
diff --git a/forms/source/richtext/rtattributehandler.cxx b/forms/source/richtext/rtattributehandler.cxx
index a1b918d65b3f..d46891693eb3 100644
--- a/forms/source/richtext/rtattributehandler.cxx
+++ b/forms/source/richtext/rtattributehandler.cxx
@@ -42,19 +42,19 @@ namespace frm
//====================================================================
//= ReferenceBase
//====================================================================
- //--------------------------------------------------------------------
+
oslInterlockedCount SAL_CALL ReferenceBase::acquire()
{
return osl_atomic_increment( &m_refCount );
}
- //--------------------------------------------------------------------
+
oslInterlockedCount SAL_CALL ReferenceBase::release()
{
return osl_atomic_decrement( &m_refCount );
}
- //--------------------------------------------------------------------
+
ReferenceBase::~ReferenceBase()
{
}
@@ -62,44 +62,44 @@ namespace frm
//====================================================================
//= AttributeHandler
//====================================================================
- //--------------------------------------------------------------------
+
AttributeHandler::AttributeHandler( AttributeId _nAttributeId, WhichId _nWhichId )
:m_nAttribute( _nAttributeId )
,m_nWhich ( _nWhichId )
{
}
- //--------------------------------------------------------------------
+
AttributeHandler::~AttributeHandler()
{
}
- //--------------------------------------------------------------------
+
oslInterlockedCount SAL_CALL AttributeHandler::acquire()
{
return ReferenceBase::acquire();
}
- //--------------------------------------------------------------------
+
oslInterlockedCount SAL_CALL AttributeHandler::release()
{
return ReferenceBase::release();
}
- //--------------------------------------------------------------------
+
AttributeId AttributeHandler::getAttributeId( ) const
{
return getAttribute();
}
- //--------------------------------------------------------------------
+
AttributeCheckState AttributeHandler::implGetCheckState( const SfxPoolItem& /*_rItem*/ ) const
{
OSL_FAIL( "AttributeHandler::implGetCheckState: not to be called!" );
return eIndetermined;
}
- //--------------------------------------------------------------------
+
void AttributeHandler::putItemForScript( SfxItemSet& _rAttribs, const SfxPoolItem& _rItem, ScriptType _nForScriptType ) const
{
SvxScriptSetItem aSetItem( (WhichId)getAttributeId(), *_rAttribs.GetPool() );
@@ -107,7 +107,7 @@ namespace frm
_rAttribs.Put( aSetItem.GetItemSet(), false );
}
- //--------------------------------------------------------------------
+
AttributeCheckState AttributeHandler::getCheckState( const SfxItemSet& _rAttribs ) const
{
AttributeCheckState eSimpleState( eIndetermined );
@@ -117,7 +117,7 @@ namespace frm
return eSimpleState;
}
- //--------------------------------------------------------------------
+
AttributeState AttributeHandler::getState( const SfxItemSet& _rAttribs ) const
{
AttributeState aState( eIndetermined );
@@ -128,7 +128,7 @@ namespace frm
//====================================================================
//= AttributeHandlerFactory
//====================================================================
- //--------------------------------------------------------------------
+
namespace
{
static WhichId lcl_implGetWhich( const SfxItemPool& _rPool, AttributeId _nAttributeId )
@@ -148,7 +148,7 @@ namespace frm
return nWhich;
}
}
- //--------------------------------------------------------------------
+
::rtl::Reference< IAttributeHandler > AttributeHandlerFactory::getHandlerFor( AttributeId _nAttributeId, const SfxItemPool& _rEditEnginePool )
{
::rtl::Reference< IAttributeHandler > pReturn;
@@ -202,7 +202,7 @@ namespace frm
//====================================================================
//= ParaAlignmentHandler
//====================================================================
- //--------------------------------------------------------------------
+
ParaAlignmentHandler::ParaAlignmentHandler( AttributeId _nAttributeId )
:AttributeHandler( _nAttributeId, EE_PARA_JUST )
,m_eAdjust( SVX_ADJUST_CENTER )
@@ -219,7 +219,7 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
AttributeCheckState ParaAlignmentHandler::implGetCheckState( const SfxPoolItem& _rItem ) const
{
OSL_ENSURE( _rItem.ISA( SvxAdjustItem ), "ParaAlignmentHandler::implGetCheckState: invalid pool item!" );
@@ -227,7 +227,7 @@ namespace frm
return ( eAdjust == m_eAdjust ) ? eChecked : eUnchecked;
}
- //--------------------------------------------------------------------
+
void ParaAlignmentHandler::executeAttribute( const SfxItemSet& /*_rCurrentAttribs*/, SfxItemSet& _rNewAttribs, const SfxPoolItem* _pAdditionalArg, ScriptType /*_nForScriptType*/ ) const
{
OSL_ENSURE( !_pAdditionalArg, "ParaAlignmentHandler::executeAttribute: this is a simple toggle attribute - no args possible!" );
@@ -238,7 +238,7 @@ namespace frm
//====================================================================
//= LineSpacingHandler
//====================================================================
- //--------------------------------------------------------------------
+
LineSpacingHandler::LineSpacingHandler( AttributeId _nAttributeId )
:AttributeHandler( _nAttributeId, EE_PARA_SBL )
,m_nLineSpace( 100 )
@@ -254,7 +254,7 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
AttributeCheckState LineSpacingHandler::implGetCheckState( const SfxPoolItem& _rItem ) const
{
OSL_ENSURE( _rItem.ISA( SvxLineSpacingItem ), "LineSpacingHandler::implGetCheckState: invalid pool item!" );
@@ -262,7 +262,7 @@ namespace frm
return ( nLineSpace == m_nLineSpace ) ? eChecked : eUnchecked;
}
- //--------------------------------------------------------------------
+
void LineSpacingHandler::executeAttribute( const SfxItemSet& /*_rCurrentAttribs*/, SfxItemSet& _rNewAttribs, const SfxPoolItem* _pAdditionalArg, ScriptType /*_nForScriptType*/ ) const
{
OSL_ENSURE( !_pAdditionalArg, "LineSpacingHandler::executeAttribute: this is a simple toggle attribute - no args possible!" );
@@ -281,7 +281,7 @@ namespace frm
//====================================================================
//= EscapementHandler
//====================================================================
- //--------------------------------------------------------------------
+
EscapementHandler::EscapementHandler( AttributeId _nAttributeId )
:AttributeHandler( _nAttributeId, EE_CHAR_ESCAPEMENT )
,m_eEscapement( SVX_ESCAPEMENT_OFF )
@@ -296,7 +296,7 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
AttributeCheckState EscapementHandler::implGetCheckState( const SfxPoolItem& _rItem ) const
{
OSL_ENSURE( _rItem.ISA( SvxEscapementItem ), "EscapementHandler::getState: invalid pool item!" );
@@ -304,7 +304,7 @@ namespace frm
return ( eEscapement == m_eEscapement ) ? eChecked : eUnchecked;
}
- //--------------------------------------------------------------------
+
void EscapementHandler::executeAttribute( const SfxItemSet& _rCurrentAttribs, SfxItemSet& _rNewAttribs, const SfxPoolItem* _pAdditionalArg, ScriptType /*_nForScriptType*/ ) const
{
OSL_ENSURE( !_pAdditionalArg, "EscapementHandler::executeAttribute: this is a simple toggle attribute - no args possible!" );
@@ -318,7 +318,7 @@ namespace frm
//====================================================================
//= SlotHandler
//====================================================================
- //--------------------------------------------------------------------
+
SlotHandler::SlotHandler( AttributeId _nAttributeId, WhichId _nWhichId )
:AttributeHandler( _nAttributeId, _nWhichId )
,m_bScriptDependent( false )
@@ -328,7 +328,7 @@ namespace frm
|| ( SID_ATTR_CHAR_FONT == _nAttributeId );
}
- //--------------------------------------------------------------------
+
AttributeState SlotHandler::getState( const SfxItemSet& _rAttribs ) const
{
AttributeState aState( eIndetermined );
@@ -340,7 +340,7 @@ namespace frm
return aState;
}
- //--------------------------------------------------------------------
+
void SlotHandler::executeAttribute( const SfxItemSet& /*_rCurrentAttribs*/, SfxItemSet& _rNewAttribs, const SfxPoolItem* _pAdditionalArg, ScriptType _nForScriptType ) const
{
if ( _pAdditionalArg )
@@ -361,7 +361,7 @@ namespace frm
//====================================================================
//= FontSizeHandler
//====================================================================
- //--------------------------------------------------------------------
+
FontSizeHandler::FontSizeHandler( AttributeId _nAttributeId, WhichId _nWhichId )
:AttributeHandler( _nAttributeId, _nWhichId )
{
@@ -370,7 +370,7 @@ namespace frm
"FontSizeHandler::FontSizeHandler: invalid attribute id!" );
}
- //--------------------------------------------------------------------
+
AttributeState FontSizeHandler::getState( const SfxItemSet& _rAttribs ) const
{
AttributeState aState( eIndetermined );
@@ -399,7 +399,7 @@ namespace frm
return aState;
}
- //--------------------------------------------------------------------
+
void FontSizeHandler::executeAttribute( const SfxItemSet& /*_rCurrentAttribs*/, SfxItemSet& _rNewAttribs, const SfxPoolItem* _pAdditionalArg, ScriptType _nForScriptType ) const
{
const SvxFontHeightItem* pFontHeightItem = PTR_CAST( SvxFontHeightItem, _pAdditionalArg );
@@ -432,7 +432,7 @@ namespace frm
//====================================================================
//= ParagraphDirectionHandler
//====================================================================
- //--------------------------------------------------------------------
+
ParagraphDirectionHandler::ParagraphDirectionHandler( AttributeId _nAttributeId )
:AttributeHandler( _nAttributeId, EE_PARA_WRITINGDIR )
,m_eParagraphDirection( FRMDIR_HORI_LEFT_TOP )
@@ -453,7 +453,7 @@ namespace frm
m_eOppositeDefaultAdjustment = SVX_ADJUST_RIGHT;
}
- //--------------------------------------------------------------------
+
AttributeCheckState ParagraphDirectionHandler::implGetCheckState( const SfxPoolItem& _rItem ) const
{
OSL_ENSURE( _rItem.ISA( SvxFrameDirectionItem ), "ParagraphDirectionHandler::implGetCheckState: invalid pool item!" );
@@ -461,7 +461,7 @@ namespace frm
return ( eDirection == m_eParagraphDirection ) ? eChecked : eUnchecked;
}
- //--------------------------------------------------------------------
+
void ParagraphDirectionHandler::executeAttribute( const SfxItemSet& _rCurrentAttribs, SfxItemSet& _rNewAttribs, const SfxPoolItem* /*_pAdditionalArg*/, ScriptType /*_nForScriptType*/ ) const
{
_rNewAttribs.Put( SvxFrameDirectionItem( m_eParagraphDirection, getWhich() ) );
@@ -480,13 +480,13 @@ namespace frm
//====================================================================
//= BooleanHandler
//====================================================================
- //--------------------------------------------------------------------
+
BooleanHandler::BooleanHandler( AttributeId _nAttributeId, WhichId _nWhichId )
:AttributeHandler( _nAttributeId, _nWhichId )
{
}
- //--------------------------------------------------------------------
+
AttributeCheckState BooleanHandler::implGetCheckState( const SfxPoolItem& _rItem ) const
{
OSL_ENSURE( _rItem.ISA( SfxBoolItem ), "BooleanHandler::implGetCheckState: invalid item!" );
@@ -496,7 +496,7 @@ namespace frm
return eIndetermined;
}
- //--------------------------------------------------------------------
+
void BooleanHandler::executeAttribute( const SfxItemSet& /*_rCurrentAttribs*/, SfxItemSet& _rNewAttribs, const SfxPoolItem* _pAdditionalArg, ScriptType /*_nForScriptType*/ ) const
{
OSL_ENSURE( _pAdditionalArg && _pAdditionalArg->ISA( SfxBoolItem ), "BooleanHandler::executeAttribute: invalid argument!" );
diff --git a/forms/source/richtext/specialdispatchers.cxx b/forms/source/richtext/specialdispatchers.cxx
index 0fa4212e3e3e..f9eaa1a64952 100644
--- a/forms/source/richtext/specialdispatchers.cxx
+++ b/forms/source/richtext/specialdispatchers.cxx
@@ -37,13 +37,13 @@ namespace frm
//====================================================================
//= OSelectAllDispatcher
//====================================================================
- //--------------------------------------------------------------------
+
OSelectAllDispatcher::OSelectAllDispatcher( EditView& _rView, const URL& _rURL )
:ORichTextFeatureDispatcher( _rView, _rURL )
{
}
- //--------------------------------------------------------------------
+
OSelectAllDispatcher::~OSelectAllDispatcher( )
{
if ( !isDisposed() )
@@ -53,7 +53,7 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
void SAL_CALL OSelectAllDispatcher::dispatch( const URL& _rURL, const Sequence< PropertyValue >& /*_rArguments*/ )
throw (RuntimeException,
std::exception)
@@ -78,7 +78,7 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
FeatureStateEvent OSelectAllDispatcher::buildStatusEvent() const
{
FeatureStateEvent aEvent( ORichTextFeatureDispatcher::buildStatusEvent() );
@@ -89,14 +89,14 @@ namespace frm
//====================================================================
//= OParagraphDirectionDispatcher
//====================================================================
- //--------------------------------------------------------------------
+
OParagraphDirectionDispatcher::OParagraphDirectionDispatcher( EditView& _rView, AttributeId _nAttributeId, const URL& _rURL,
IMultiAttributeDispatcher* _pMasterDispatcher )
:OAttributeDispatcher( _rView, _nAttributeId, _rURL, _pMasterDispatcher )
{
}
- //--------------------------------------------------------------------
+
FeatureStateEvent OParagraphDirectionDispatcher::buildStatusEvent() const
{
FeatureStateEvent aEvent( OAttributeDispatcher::buildStatusEvent() );
@@ -112,13 +112,13 @@ namespace frm
//====================================================================
//= OTextDirectionDispatcher
//====================================================================
- //--------------------------------------------------------------------
+
OTextDirectionDispatcher::OTextDirectionDispatcher( EditView& _rView, const URL& _rURL )
:ORichTextFeatureDispatcher( _rView, _rURL )
{
}
- //--------------------------------------------------------------------
+
void SAL_CALL OTextDirectionDispatcher::dispatch( const URL& _rURL, const Sequence< PropertyValue >& /*_rArguments*/ ) throw (RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -135,7 +135,7 @@ namespace frm
pEngine->SetVertical( !pEngine->IsVertical() );
}
- //--------------------------------------------------------------------
+
FeatureStateEvent OTextDirectionDispatcher::buildStatusEvent() const
{
FeatureStateEvent aEvent( ORichTextFeatureDispatcher::buildStatusEvent() );
@@ -152,13 +152,13 @@ namespace frm
//====================================================================
//= OAsianFontLayoutDispatcher
//====================================================================
- //--------------------------------------------------------------------
+
OAsianFontLayoutDispatcher::OAsianFontLayoutDispatcher( EditView& _rView, AttributeId _nAttributeId, const URL& _rURL, IMultiAttributeDispatcher* _pMasterDispatcher )
:OParametrizedAttributeDispatcher( _rView, _nAttributeId, _rURL, _pMasterDispatcher )
{
}
- //--------------------------------------------------------------------
+
const SfxPoolItem* OAsianFontLayoutDispatcher::convertDispatchArgsToItem( const Sequence< PropertyValue >& _rArguments )
{
// look for the "Enable" parameter
diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx
index 5cdeddf46202..c9d03bf52d3a 100644
--- a/forms/source/runtime/formoperations.cxx
+++ b/forms/source/runtime/formoperations.cxx
@@ -61,7 +61,7 @@
#include <osl/mutex.hxx>
#include <sal/macros.h>
-//--------------------------------------------------------------------------
+
extern "C" void SAL_CALL createRegistryInfo_FormOperations()
{
static ::frm::OMultiInstanceAutoRegistration< ::frm::FormOperations > aAutoRegistration;
@@ -124,7 +124,7 @@ namespace frm
//====================================================================
//= FormOperations
//====================================================================
- //--------------------------------------------------------------------
+
FormOperations::FormOperations( const Reference< XComponentContext >& _rxContext )
:FormOperations_Base( m_aMutex )
,m_xContext( _rxContext )
@@ -137,18 +137,18 @@ namespace frm
{
}
- //--------------------------------------------------------------------
+
FormOperations::~FormOperations()
{
}
- //--------------------------------------------------------------------
+
OUString FormOperations::getImplementationName_Static( ) throw(RuntimeException)
{
return OUString( "com.sun.star.comp.forms.FormOperations" );
}
- //--------------------------------------------------------------------
+
Sequence< OUString > FormOperations::getSupportedServiceNames_Static( ) throw(RuntimeException)
{
Sequence< OUString > aNames(1);
@@ -156,13 +156,13 @@ namespace frm
return aNames;
}
- //--------------------------------------------------------------------
+
Reference< XInterface > SAL_CALL FormOperations::Create(const Reference< XMultiServiceFactory >& _rxFactory )
{
return *new FormOperations( comphelper::getComponentContext(_rxFactory) );
}
- //--------------------------------------------------------------------
+
void SAL_CALL FormOperations::initialize( const Sequence< Any >& _arguments ) throw (Exception, RuntimeException)
{
if ( m_bConstructed )
@@ -211,28 +211,28 @@ namespace frm
return m_xUpdateCursor;
}
- //--------------------------------------------------------------------
+
Reference< XFormController > SAL_CALL FormOperations::getController() throw (RuntimeException)
{
MethodGuard aGuard( *this );
return m_xController;
}
- //--------------------------------------------------------------------
+
Reference< XFeatureInvalidation > SAL_CALL FormOperations::getFeatureInvalidation() throw (RuntimeException)
{
MethodGuard aGuard( *this );
return m_xFeatureInvalidation;
}
- //--------------------------------------------------------------------
+
void SAL_CALL FormOperations::setFeatureInvalidation( const Reference< XFeatureInvalidation > & _rxFeatureInvalidation ) throw (RuntimeException)
{
MethodGuard aGuard( *this );
m_xFeatureInvalidation = _rxFeatureInvalidation;
}
- //--------------------------------------------------------------------
+
FeatureState SAL_CALL FormOperations::getState( ::sal_Int16 _nFeature ) throw (RuntimeException)
{
MethodGuard aGuard( *this );
@@ -415,7 +415,7 @@ namespace frm
return aState;
}
- //--------------------------------------------------------------------
+
::sal_Bool SAL_CALL FormOperations::isEnabled( ::sal_Int16 _nFeature ) throw (RuntimeException)
{
MethodGuard aGuard( *this );
@@ -424,7 +424,7 @@ namespace frm
return aState.Enabled;
}
- //--------------------------------------------------------------------
+
namespace
{
static bool lcl_needConfirmCommit( sal_Int32 _nFeature )
@@ -569,7 +569,7 @@ namespace frm
return true;
}
}
- //--------------------------------------------------------------------
+
void SAL_CALL FormOperations::execute( ::sal_Int16 _nFeature ) throw (RuntimeException, IllegalArgumentException, SQLException, WrappedTargetException)
{
SolarMutexGuard aSolarGuard;
@@ -828,7 +828,7 @@ namespace frm
impl_invalidateAllSupportedFeatures_nothrow( aGuard );
}
- //--------------------------------------------------------------------
+
void SAL_CALL FormOperations::executeWithArguments( ::sal_Int16 _nFeature, const Sequence< NamedValue >& _rArguments ) throw (RuntimeException, IllegalArgumentException, SQLException, WrappedTargetException)
{
if ( !lcl_requiresArguments( _nFeature ) )
@@ -885,7 +885,7 @@ namespace frm
} // switch
}
- //--------------------------------------------------------------------
+
::sal_Bool SAL_CALL FormOperations::commitCurrentRecord( ::sal_Bool& _out_rRecordInserted ) throw (RuntimeException, SQLException)
{
MethodGuard aGuard( *this );
@@ -894,7 +894,7 @@ namespace frm
return impl_commitCurrentRecord_throw( &_out_rRecordInserted );
}
- //--------------------------------------------------------------------
+
bool FormOperations::impl_commitCurrentRecord_throw( ::sal_Bool* _pRecordInserted ) const
{
DBG_ASSERT( m_nMethodNestingLevel, "FormOperations::impl_commitCurrentRecord_throw: to be called within a MethodGuard'ed section only!" );
@@ -920,14 +920,14 @@ namespace frm
return bResult;
}
- //--------------------------------------------------------------------
+
::sal_Bool SAL_CALL FormOperations::commitCurrentControl() throw (RuntimeException, SQLException)
{
MethodGuard aGuard( *this );
return impl_commitCurrentControl_throw();
}
- //--------------------------------------------------------------------
+
bool FormOperations::impl_commitCurrentControl_throw() const
{
DBG_ASSERT( m_nMethodNestingLevel, "FormOperations::impl_commitCurrentControl_throw: to be called within a MethodGuard'ed section only!" );
@@ -969,7 +969,7 @@ namespace frm
return bSuccess;
}
- //--------------------------------------------------------------------
+
::sal_Bool SAL_CALL FormOperations::isInsertionRow() throw (RuntimeException, WrappedTargetException)
{
sal_Bool bIs = sal_False;
@@ -985,7 +985,7 @@ namespace frm
return bIs;
}
- //--------------------------------------------------------------------
+
::sal_Bool SAL_CALL FormOperations::isModifiedRow() throw (RuntimeException, WrappedTargetException)
{
sal_Bool bIs = sal_False;
@@ -1001,7 +1001,7 @@ namespace frm
return bIs;
}
- //--------------------------------------------------------------------
+
void SAL_CALL FormOperations::cursorMoved( const EventObject& /*_Event*/ ) throw (RuntimeException)
{
MethodGuard aGuard( *this );
@@ -1010,19 +1010,19 @@ namespace frm
impl_invalidateAllSupportedFeatures_nothrow( aGuard );
}
- //--------------------------------------------------------------------
+
void SAL_CALL FormOperations::rowChanged( const EventObject& /*_Event*/ ) throw (RuntimeException)
{
// not interested in
}
- //--------------------------------------------------------------------
+
void SAL_CALL FormOperations::rowSetChanged( const EventObject& /*_Event*/ ) throw (RuntimeException)
{
// not interested in
}
- //--------------------------------------------------------------------
+
void SAL_CALL FormOperations::modified( const EventObject& /*_Source*/ ) throw( RuntimeException )
{
MethodGuard aGuard( *this );
@@ -1035,7 +1035,7 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
void SAL_CALL FormOperations::propertyChange( const PropertyChangeEvent& _rEvent ) throw (RuntimeException)
{
MethodGuard aGuard( *this );
@@ -1083,13 +1083,13 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
void SAL_CALL FormOperations::disposing( const EventObject& /*_Source*/ ) throw (RuntimeException)
{
// TODO: should we react on this? Or is this the responsibility of our owner to dispose us?
}
- //--------------------------------------------------------------------
+
void SAL_CALL FormOperations::disposing()
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -1127,14 +1127,14 @@ namespace frm
m_bActiveControlModified = true;
}
- //--------------------------------------------------------------------
+
void FormOperations::impl_checkDisposed_throw() const
{
if ( impl_isDisposed_nothrow() )
throw DisposedException( OUString(), *const_cast< FormOperations* >( this ) );
}
- //--------------------------------------------------------------------
+
void FormOperations::impl_initFromController_throw()
{
OSL_PRECOND( m_xController.is(), "FormOperations::impl_initFromController_throw: invalid controller!" );
@@ -1149,7 +1149,7 @@ namespace frm
xBroadcaster->addModifyListener( this );
}
- //--------------------------------------------------------------------
+
void FormOperations::impl_initFromForm_throw()
{
OSL_PRECOND( m_xCursor.is(), "FormOperations::impl_initFromForm_throw: invalid form!" );
@@ -1165,7 +1165,7 @@ namespace frm
m_xCursorProperties->addPropertyChangeListener( PROPERTY_ISNEW, this );
}
- //--------------------------------------------------------------------
+
void FormOperations::createWithFormController( const Reference< XFormController >& _rxController )
{
m_xController = _rxController;
@@ -1177,7 +1177,7 @@ namespace frm
m_bConstructed = true;
}
- //--------------------------------------------------------------------
+
void FormOperations::createWithForm( const Reference< XForm >& _rxForm )
{
m_xCursor = m_xCursor.query( _rxForm );
@@ -1189,7 +1189,7 @@ namespace frm
m_bConstructed = true;
}
- //------------------------------------------------------------------------------
+
void FormOperations::impl_invalidateAllSupportedFeatures_nothrow( MethodGuard& _rClearForCallback ) const
{
if ( !m_xFeatureInvalidation.is() )
@@ -1201,7 +1201,7 @@ namespace frm
xInvalidation->invalidateAllFeatures();
}
- //------------------------------------------------------------------------------
+
void FormOperations::impl_invalidateModifyDependentFeatures_nothrow( MethodGuard& _rClearForCallback ) const
{
if ( !m_xFeatureInvalidation.is() )
@@ -1228,7 +1228,7 @@ namespace frm
xInvalidation->invalidateFeatures( s_aModifyDependentFeatures );
}
- //--------------------------------------------------------------------
+
void FormOperations::impl_ensureInitializedParser_nothrow()
{
OSL_PRECOND( m_xCursorProperties.is(), "FormOperations::impl_ensureInitializedParser_nothrow: we're disposed!" );
@@ -1281,7 +1281,7 @@ namespace frm
m_bInitializedParser = true;
}
- //--------------------------------------------------------------------
+
void FormOperations::impl_disposeParser_nothrow()
{
try
@@ -1308,7 +1308,7 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
bool FormOperations::impl_canMoveLeft_throw( ) const
{
if ( !impl_hasCursor_nothrow() )
@@ -1317,7 +1317,7 @@ namespace frm
return impl_getRowCount_throw() && ( !m_xCursor->isFirst() || impl_isInsertionRow_throw() );
}
- //--------------------------------------------------------------------
+
bool FormOperations::impl_canMoveRight_throw( ) const
{
if ( !impl_hasCursor_nothrow() )
@@ -1338,49 +1338,49 @@ namespace frm
return false;
}
- //--------------------------------------------------------------------
+
bool FormOperations::impl_isInsertionRow_throw() const
{
return lcl_safeGetPropertyValue_throw( m_xCursorProperties, PROPERTY_ISNEW, false );
}
- //--------------------------------------------------------------------
+
sal_Int32 FormOperations::impl_getRowCount_throw() const
{
return lcl_safeGetPropertyValue_throw( m_xCursorProperties, PROPERTY_ROWCOUNT, (sal_Int32)0 );
}
- //--------------------------------------------------------------------
+
bool FormOperations::impl_isRowCountFinal_throw() const
{
return lcl_safeGetPropertyValue_throw( m_xCursorProperties, PROPERTY_ROWCOUNTFINAL, false );
}
- //--------------------------------------------------------------------
+
bool FormOperations::impl_isModifiedRow_throw() const
{
return lcl_safeGetPropertyValue_throw( m_xCursorProperties, PROPERTY_ISMODIFIED, false );
}
- //--------------------------------------------------------------------
+
bool FormOperations::impl_isParseable_throw() const
{
const_cast< FormOperations* >( this )->impl_ensureInitializedParser_nothrow();
return m_xParser.is() && !m_xParser->getQuery().isEmpty();
}
- //--------------------------------------------------------------------
+
bool FormOperations::impl_hasFilterOrOrder_throw() const
{
return impl_isParseable_throw() && ( !m_xParser->getFilter().isEmpty() || !m_xParser->getOrder().isEmpty() );
}
- //--------------------------------------------------------------------
+
bool FormOperations::impl_isInsertOnlyForm_throw() const
{
return lcl_safeGetPropertyValue_throw( m_xCursorProperties, PROPERTY_INSERTONLY, true );
}
- //------------------------------------------------------------------------------
+
Reference< XControlModel > FormOperations::impl_getCurrentControlModel_throw() const
{
Reference< XControl > xControl( m_xController->getCurrentControl() );
@@ -1405,7 +1405,7 @@ namespace frm
return xControlModel;
}
- //------------------------------------------------------------------------------
+
Reference< XPropertySet > FormOperations::impl_getCurrentBoundField_nothrow( ) const
{
OSL_PRECOND( m_xController.is(), "FormOperations::impl_getCurrentBoundField_nothrow: no controller -> no control!" );
@@ -1429,7 +1429,7 @@ namespace frm
return xField;
}
- //------------------------------------------------------------------------------
+
sal_Int16 FormOperations::impl_gridView2ModelPos_nothrow( const Reference< XIndexAccess >& _rxColumns, sal_Int16 _nViewPos ) const
{
OSL_PRECOND( _rxColumns.is(), "FormOperations::impl_gridView2ModelPos_nothrow: invalid columns container!" );
@@ -1463,7 +1463,7 @@ namespace frm
return (sal_Int16)-1;
}
- //------------------------------------------------------------------------------
+
bool FormOperations::impl_moveLeft_throw( ) const
{
OSL_PRECOND( impl_hasCursor_nothrow(), "FormOperations::impl_moveLeft_throw: no cursor!" );
@@ -1499,7 +1499,7 @@ namespace frm
return true;
}
- //--------------------------------------------------------------------
+
bool FormOperations::impl_moveRight_throw( ) const
{
OSL_PRECOND( impl_hasCursor_nothrow(), "FormOperations::impl_moveRight_throw: no cursor!" );
@@ -1528,7 +1528,7 @@ namespace frm
return true;
}
- //--------------------------------------------------------------------
+
void FormOperations::impl_resetAllControls_nothrow() const
{
Reference< XIndexAccess > xContainer( m_xCursor, UNO_QUERY );
@@ -1556,7 +1556,7 @@ namespace frm
}
}
- //------------------------------------------------------------------------------
+
void FormOperations::impl_executeAutoSort_throw( bool _bUp ) const
{
OSL_PRECOND( m_xController.is(), "FormOperations::impl_executeAutoSort_throw: need a controller for this!" );
@@ -1619,7 +1619,7 @@ namespace frm
}
}
- //------------------------------------------------------------------------------
+
void FormOperations::impl_executeAutoFilter_throw( ) const
{
OSL_PRECOND( m_xController.is(), "FormOperations::impl_executeAutoFilter_throw: need a controller for this!" );
@@ -1688,7 +1688,7 @@ namespace frm
}
}
- //--------------------------------------------------------------------
+
void FormOperations::impl_executeFilterOrSort_throw( bool _bFilter ) const
{
OSL_PRECOND( m_xController.is(), "FormOperations::impl_executeFilterOrSort_throw: need a controller for this!" );
@@ -1732,7 +1732,7 @@ namespace frm
}
}
- //------------------------------------------------------------------------------
+
template < typename FunctObj >
void FormOperations::impl_doActionInSQLContext_throw( FunctObj f, sal_uInt16 _nErrorResourceId ) const
{
diff --git a/forms/source/solar/component/navbarcontrol.cxx b/forms/source/solar/component/navbarcontrol.cxx
index d727aeff764f..93e7ddbec2ba 100644
--- a/forms/source/solar/component/navbarcontrol.cxx
+++ b/forms/source/solar/component/navbarcontrol.cxx
@@ -39,7 +39,7 @@
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
-//--------------------------------------------------------------------------
+
extern "C" void SAL_CALL createRegistryInfo_ONavigationBarControl()
{
static ::frm::OMultiInstanceAutoRegistration< ::frm::ONavigationBarControl > aAutoRegistration;
@@ -68,21 +68,21 @@ namespace frm
//==================================================================
// ONavigationBarControl
//==================================================================
- //------------------------------------------------------------------
+
ONavigationBarControl::ONavigationBarControl( const Reference< XComponentContext >& _rxORB)
:UnoControl(), m_xContext(_rxORB)
{
}
- //------------------------------------------------------------------
+
ONavigationBarControl::~ONavigationBarControl()
{
}
- //------------------------------------------------------------------
+
IMPLEMENT_FORWARD_XTYPEPROVIDER2( ONavigationBarControl, UnoControl, ONavigationBarControl_Base )
- //------------------------------------------------------------------
+
Any SAL_CALL ONavigationBarControl::queryAggregation( const Type& _rType ) throw ( RuntimeException )
{
Any aReturn = UnoControl::queryAggregation( _rType );
@@ -93,7 +93,7 @@ namespace frm
return aReturn;
}
- //------------------------------------------------------------------
+
namespace
{
//..............................................................
@@ -123,7 +123,7 @@ namespace frm
}
}
- //------------------------------------------------------------------
+
void SAL_CALL ONavigationBarControl::createPeer( const Reference< XToolkit >& /*_rToolkit*/, const Reference< XWindowPeer >& _rParentPeer ) throw( RuntimeException )
{
SolarMutexGuard aGuard;
@@ -177,25 +177,25 @@ namespace frm
}
}
- //------------------------------------------------------------------
+
OUString SAL_CALL ONavigationBarControl::getImplementationName() throw( RuntimeException )
{
return getImplementationName_Static();
}
- //------------------------------------------------------------------
+
Sequence< OUString > SAL_CALL ONavigationBarControl::getSupportedServiceNames() throw( RuntimeException )
{
return getSupportedServiceNames_Static();
}
- //------------------------------------------------------------------
+
OUString SAL_CALL ONavigationBarControl::getImplementationName_Static()
{
return OUString( "com.sun.star.comp.form.ONavigationBarControl" );
}
- //------------------------------------------------------------------
+
Sequence< OUString > SAL_CALL ONavigationBarControl::getSupportedServiceNames_Static()
{
Sequence< OUString > aServices( 2 );
@@ -204,25 +204,25 @@ namespace frm
return aServices;
}
- //------------------------------------------------------------------
+
Reference< XInterface > SAL_CALL ONavigationBarControl::Create( const Reference< XMultiServiceFactory >& _rxFactory )
{
return *( new ONavigationBarControl( comphelper::getComponentContext(_rxFactory) ) );
}
- //------------------------------------------------------------------
+
void SAL_CALL ONavigationBarControl::registerDispatchProviderInterceptor( const Reference< XDispatchProviderInterceptor >& _rxInterceptor ) throw (RuntimeException)
{
FORWARD_TO_PEER_1( XDispatchProviderInterception, registerDispatchProviderInterceptor, _rxInterceptor );
}
- //------------------------------------------------------------------
+
void SAL_CALL ONavigationBarControl::releaseDispatchProviderInterceptor( const Reference< XDispatchProviderInterceptor >& _rxInterceptor ) throw (RuntimeException)
{
FORWARD_TO_PEER_1( XDispatchProviderInterception, releaseDispatchProviderInterceptor, _rxInterceptor );
}
- //------------------------------------------------------------------
+
void SAL_CALL ONavigationBarControl::setDesignMode( sal_Bool _bOn ) throw( RuntimeException )
{
UnoControl::setDesignMode( _bOn );
@@ -232,7 +232,7 @@ namespace frm
//==================================================================
// ONavigationBarPeer
//==================================================================
- //------------------------------------------------------------------
+
ONavigationBarPeer* ONavigationBarPeer::Create( const Reference< XComponentContext >& _rxORB,
Window* _pParentWindow, const Reference< XControlModel >& _rxModel )
{
@@ -267,31 +267,31 @@ namespace frm
return pPeer;
}
- //------------------------------------------------------------------
+
ONavigationBarPeer::ONavigationBarPeer( const Reference< XComponentContext >& _rxORB )
:OFormNavigationHelper( _rxORB )
{
}
- //------------------------------------------------------------------
+
ONavigationBarPeer::~ONavigationBarPeer()
{
}
- //------------------------------------------------------------------
+
IMPLEMENT_FORWARD_XINTERFACE2( ONavigationBarPeer, VCLXWindow, OFormNavigationHelper )
- //------------------------------------------------------------------
+
IMPLEMENT_FORWARD_XTYPEPROVIDER2( ONavigationBarPeer, VCLXWindow, OFormNavigationHelper )
- //------------------------------------------------------------------
+
void SAL_CALL ONavigationBarPeer::dispose( ) throw( RuntimeException )
{
VCLXWindow::dispose();
OFormNavigationHelper::dispose();
}
- //------------------------------------------------------------------
+
void SAL_CALL ONavigationBarPeer::setProperty( const OUString& _rPropertyName, const Any& _rValue ) throw( RuntimeException )
{
SolarMutexGuard aGuard;
@@ -371,7 +371,7 @@ namespace frm
}
}
- //------------------------------------------------------------------
+
Any SAL_CALL ONavigationBarPeer::getProperty( const OUString& _rPropertyName ) throw( RuntimeException )
{
SolarMutexGuard aGuard;
@@ -415,7 +415,7 @@ namespace frm
return aReturn;
}
- //------------------------------------------------------------------
+
void ONavigationBarPeer::interceptorsChanged( )
{
if ( isDesignMode() )
@@ -425,7 +425,7 @@ namespace frm
OFormNavigationHelper::interceptorsChanged();
}
- //------------------------------------------------------------------
+
void ONavigationBarPeer::featureStateChanged( sal_Int16 _nFeatureId, sal_Bool _bEnabled )
{
// enable this button on the toolbox
@@ -453,7 +453,7 @@ namespace frm
OFormNavigationHelper::featureStateChanged( _nFeatureId, _bEnabled );
}
- //------------------------------------------------------------------
+
void ONavigationBarPeer::allFeatureStatesChanged( )
{
// force the control to update it's states
@@ -465,7 +465,7 @@ namespace frm
OFormNavigationHelper::allFeatureStatesChanged( );
}
- //------------------------------------------------------------------
+
bool ONavigationBarPeer::isEnabled( sal_Int16 _nFeatureId ) const
{
if ( const_cast< ONavigationBarPeer* >( this )->isDesignMode() )
@@ -474,7 +474,7 @@ namespace frm
return OFormNavigationHelper::isEnabled( _nFeatureId );
}
- //------------------------------------------------------------------
+
void SAL_CALL ONavigationBarPeer::setDesignMode( sal_Bool _bOn ) throw( RuntimeException )
{
VCLXWindow::setDesignMode( _bOn );
@@ -486,14 +486,14 @@ namespace frm
// this will connect if not already connected and just update else
}
- //------------------------------------------------------------------
+
void SAL_CALL ONavigationBarPeer::disposing( const EventObject& _rSource ) throw (RuntimeException)
{
VCLXWindow::disposing( _rSource );
OFormNavigationHelper::disposing( _rSource );
}
- //------------------------------------------------------------------
+
void ONavigationBarPeer::getSupportedFeatures( ::std::vector< sal_Int16 >& _rFeatureIds )
{
_rFeatureIds.push_back( FormFeature::MoveAbsolute );
diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx
index a8127bde1f08..3fd7e856203d 100644
--- a/forms/source/solar/control/navtoolbar.cxx
+++ b/forms/source/solar/control/navtoolbar.cxx
@@ -121,7 +121,7 @@ namespace frm
};
- //---------------------------------------------------------------------
+
void ImplNavToolBar::Select()
{
if ( m_pDispatcher )
@@ -138,7 +138,7 @@ namespace frm
//=====================================================================
//= NavigationToolBar
//=====================================================================
- //---------------------------------------------------------------------
+
NavigationToolBar::NavigationToolBar( Window* _pParent, WinBits _nStyle, const PCommandImageProvider& _pImageProvider,
const PCommandDescriptionProvider& _pDescriptionProvider )
:Window( _pParent, _nStyle )
@@ -151,7 +151,7 @@ namespace frm
implInit( );
}
- //---------------------------------------------------------------------
+
NavigationToolBar::~NavigationToolBar( )
{
for ( ::std::vector< Window* >::iterator loopChildWins = m_aChildWins.begin();
@@ -164,7 +164,7 @@ namespace frm
delete m_pToolbar;
}
- //---------------------------------------------------------------------
+
void NavigationToolBar::setDispatcher( const IFeatureDispatcher* _pDispatcher )
{
m_pDispatcher = _pDispatcher;
@@ -179,7 +179,7 @@ namespace frm
updateFeatureStates( );
}
- //---------------------------------------------------------------------
+
void NavigationToolBar::updateFeatureStates( )
{
for ( sal_uInt16 nPos = 0; nPos < m_pToolbar->GetItemCount(); ++nPos )
@@ -195,7 +195,7 @@ namespace frm
}
}
- //---------------------------------------------------------------------
+
void NavigationToolBar::implEnableItem( sal_uInt16 _nItemId, bool _bEnabled )
{
m_pToolbar->EnableItem( _nItemId, _bEnabled );
@@ -207,7 +207,7 @@ namespace frm
m_pToolbar->EnableItem( LID_RECORD_FILLER, _bEnabled );
}
- //---------------------------------------------------------------------
+
void NavigationToolBar::enableFeature( sal_Int16 _nFeatureId, bool _bEnabled )
{
DBG_ASSERT( m_pToolbar->GetItemPos( (sal_uInt16)_nFeatureId ) != TOOLBOX_ITEM_NOTFOUND,
@@ -216,7 +216,7 @@ namespace frm
implEnableItem( (sal_uInt16)_nFeatureId, _bEnabled );
}
- //---------------------------------------------------------------------
+
void NavigationToolBar::checkFeature( sal_Int16 _nFeatureId, bool _bEnabled )
{
DBG_ASSERT( m_pToolbar->GetItemPos( (sal_uInt16)_nFeatureId ) != TOOLBOX_ITEM_NOTFOUND,
@@ -225,7 +225,7 @@ namespace frm
m_pToolbar->CheckItem( (sal_uInt16)_nFeatureId, _bEnabled );
}
- //---------------------------------------------------------------------
+
void NavigationToolBar::setFeatureText( sal_Int16 _nFeatureId, const OUString& _rText )
{
DBG_ASSERT( m_pToolbar->GetItemPos( (sal_uInt16)_nFeatureId ) != TOOLBOX_ITEM_NOTFOUND,
@@ -238,7 +238,7 @@ namespace frm
m_pToolbar->SetItemText( (sal_uInt16)_nFeatureId, _rText );
}
- //---------------------------------------------------------------------
+
void NavigationToolBar::implInit( )
{
m_pToolbar = new ImplNavToolBar( this );
@@ -347,7 +347,7 @@ namespace frm
implUpdateImages();
}
- //---------------------------------------------------------------------
+
void NavigationToolBar::implUpdateImages()
{
OSL_ENSURE( m_pImageProvider, "NavigationToolBar::implUpdateImages: no image provider => no images!" );
@@ -395,7 +395,7 @@ namespace frm
Resize();
}
- //---------------------------------------------------------------------
+
void NavigationToolBar::implSetImageSize( ImageSize _eSize )
{
if ( _eSize != m_eImageSize )
@@ -405,13 +405,13 @@ namespace frm
}
}
- //---------------------------------------------------------------------
+
void NavigationToolBar::SetImageSize( ImageSize _eSize )
{
implSetImageSize( _eSize );
}
- //---------------------------------------------------------------------
+
void NavigationToolBar::ShowFunctionGroup( FunctionGroup _eGroup, bool _bShow )
{
const sal_uInt16* pGroupIds = NULL;
@@ -459,7 +459,7 @@ namespace frm
m_pToolbar->ShowItem( *pGroupIds++, _bShow );
}
- //---------------------------------------------------------------------
+
bool NavigationToolBar::IsFunctionGroupVisible( FunctionGroup _eGroup )
{
sal_uInt16 nIndicatorItem = 0;
@@ -476,7 +476,7 @@ namespace frm
return m_pToolbar->IsItemVisible( nIndicatorItem );
}
- //------------------------------------------------------------------------------
+
void NavigationToolBar::StateChanged( StateChangedType nType )
{
Window::StateChanged( nType );
@@ -510,7 +510,7 @@ namespace frm
}
}
- //---------------------------------------------------------------------
+
void NavigationToolBar::Resize()
{
// resize/position the toolbox as a whole
@@ -523,7 +523,7 @@ namespace frm
Window::Resize();
}
- //---------------------------------------------------------------------
+
void NavigationToolBar::SetControlBackground()
{
Window::SetControlBackground();
@@ -533,7 +533,7 @@ namespace frm
implUpdateImages();
}
- //---------------------------------------------------------------------
+
void NavigationToolBar::SetControlBackground( const Color& _rColor )
{
Window::SetControlBackground( _rColor );
@@ -543,7 +543,7 @@ namespace frm
implUpdateImages();
}
- //---------------------------------------------------------------------
+
void NavigationToolBar::SetTextLineColor( )
{
Window::SetTextLineColor( );
@@ -551,7 +551,7 @@ namespace frm
forEachItemWindow( &NavigationToolBar::setTextLineColor, NULL );
}
- //---------------------------------------------------------------------
+
void NavigationToolBar::SetTextLineColor( const Color& _rColor )
{
Window::SetTextLineColor( _rColor );
@@ -559,7 +559,7 @@ namespace frm
forEachItemWindow( &NavigationToolBar::setTextLineColor, &_rColor );
}
- //---------------------------------------------------------------------
+
void NavigationToolBar::forEachItemWindow( ItemWindowHandler _handler, const void* _pParam )
{
for ( sal_uInt16 item = 0; item < m_pToolbar->GetItemCount(); ++item )
@@ -571,7 +571,7 @@ namespace frm
}
}
- //---------------------------------------------------------------------
+
void NavigationToolBar::setItemBackground( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* _pColor ) const
{
if ( _pColor )
@@ -580,7 +580,7 @@ namespace frm
_pItemWindow->SetControlBackground();
}
- //---------------------------------------------------------------------
+
void NavigationToolBar::setTextLineColor( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* _pColor ) const
{
if ( _pColor )
@@ -589,14 +589,14 @@ namespace frm
_pItemWindow->SetTextLineColor();
}
#if 0
- //---------------------------------------------------------------------
+
void NavigationToolBar::setItemWindowZoom( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const
{
_pItemWindow->SetZoom( GetZoom() );
_pItemWindow->SetZoomedPointFont( IsControlFont() ? GetControlFont() : GetPointFont() );
}
#endif
- //---------------------------------------------------------------------
+
void NavigationToolBar::setItemControlFont( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const
{
if ( IsControlFont() )
@@ -605,7 +605,7 @@ namespace frm
_pItemWindow->SetControlFont( );
}
- //---------------------------------------------------------------------
+
void NavigationToolBar::setItemControlForeground( sal_uInt16 /* _nItemId */, Window* _pItemWindow, const void* /* _pParam */ ) const
{
if ( IsControlForeground() )
@@ -615,7 +615,7 @@ namespace frm
_pItemWindow->SetTextColor( GetTextColor() );
}
- //---------------------------------------------------------------------
+
void NavigationToolBar::adjustItemWindowWidth( sal_uInt16 _nItemId, Window* _pItemWindow, const void* /* _pParam */ ) const
{
OUString sItemText;
@@ -645,7 +645,7 @@ namespace frm
m_pToolbar->SetItemWindow( _nItemId, _pItemWindow );
}
- //---------------------------------------------------------------------
+
void NavigationToolBar::enableItemRTL( sal_uInt16 /*_nItemId*/, Window* _pItemWindow, const void* _pIsRTLEnabled ) const
{
_pItemWindow->EnableRTL( *static_cast< const sal_Bool* >( _pIsRTLEnabled ) );
@@ -654,7 +654,7 @@ namespace frm
//=====================================================================
//= RecordPositionInput
//=====================================================================
- //---------------------------------------------------------------------
+
RecordPositionInput::RecordPositionInput( Window* _pParent )
:NumericField( _pParent, WB_BORDER | WB_VCENTER )
,m_pDispatcher( NULL )
@@ -667,18 +667,18 @@ namespace frm
SetBorderStyle( WINDOW_BORDER_MONO );
}
- //---------------------------------------------------------------------
+
RecordPositionInput::~RecordPositionInput()
{
}
- //---------------------------------------------------------------------
+
void RecordPositionInput::setDispatcher( const IFeatureDispatcher* _pDispatcher )
{
m_pDispatcher = _pDispatcher;
}
- //---------------------------------------------------------------------
+
void RecordPositionInput::FirePosition( sal_Bool _bForce )
{
if ( _bForce || (GetText() != GetSavedValue()) )
@@ -694,13 +694,13 @@ namespace frm
}
}
- //---------------------------------------------------------------------
+
void RecordPositionInput::LoseFocus()
{
FirePosition( sal_False );
}
- //---------------------------------------------------------------------
+
void RecordPositionInput::KeyInput( const KeyEvent& rKeyEvent )
{
if( rKeyEvent.GetKeyCode() == KEY_RETURN && !GetText().isEmpty() )
diff --git a/forms/source/xforms/convert.cxx b/forms/source/xforms/convert.cxx
index 103b802485d2..a0c769053b6c 100644
--- a/forms/source/xforms/convert.cxx
+++ b/forms/source/xforms/convert.cxx
@@ -55,26 +55,26 @@ Convert::Convert()
namespace
{
- // ------------------------------------------------------------------------
+
OUString lcl_toXSD_OUString( const Any& rAny )
{ OUString sStr; rAny >>= sStr; return sStr; }
- // ------------------------------------------------------------------------
+
Any lcl_toAny_OUString( const OUString& rStr )
{ Any aAny; aAny <<= rStr; return aAny; }
- // ------------------------------------------------------------------------
+
OUString lcl_toXSD_bool( const Any& rAny )
{ bool b = false; rAny >>= b; return b ? OUString("true") : OUString("false"); }
- // ------------------------------------------------------------------------
+
Any lcl_toAny_bool( const OUString& rStr )
{
bool b = ( rStr == "true" || rStr == "1" );
return makeAny( b );
}
- // ------------------------------------------------------------------------
+
OUString lcl_toXSD_double( const Any& rAny )
{
double f = 0.0;
@@ -87,7 +87,7 @@ namespace
: OUString();
}
- // ------------------------------------------------------------------------
+
Any lcl_toAny_double( const OUString& rString )
{
rtl_math_ConversionStatus eStatus;
@@ -96,7 +96,7 @@ namespace
return ( eStatus == rtl_math_ConversionStatus_Ok ) ? makeAny( f ) : Any();
}
- // ------------------------------------------------------------------------
+
void lcl_appendInt32ToBuffer( const sal_Int32 _nValue, OUStringBuffer& _rBuffer, sal_Int16 _nMinDigits )
{
if ( ( _nMinDigits >= 4 ) && ( _nValue < 1000 ) )
@@ -108,7 +108,7 @@ namespace
_rBuffer.append( _nValue );
}
- // ------------------------------------------------------------------------
+
OUString lcl_toXSD_UNODate_typed( const UNODate& rDate )
{
@@ -122,7 +122,7 @@ namespace
return sInfo.makeStringAndClear();
}
- // ------------------------------------------------------------------------
+
OUString lcl_toXSD_UNODate( const Any& rAny )
{
UNODate aDate;
@@ -130,7 +130,7 @@ namespace
return lcl_toXSD_UNODate_typed( aDate );
}
- // ------------------------------------------------------------------------
+
UNODate lcl_toUNODate( const OUString& rString )
{
UNODate aDate( 1, 1, 1900 );
@@ -154,13 +154,13 @@ namespace
return aDate;
}
- // ------------------------------------------------------------------------
+
Any lcl_toAny_UNODate( const OUString& rString )
{
return makeAny( lcl_toUNODate( rString ) );
}
- // ------------------------------------------------------------------------
+
OUString lcl_toXSD_UNOTime_typed( const UNOTime& rTime )
{
@@ -184,7 +184,7 @@ namespace
return sInfo.makeStringAndClear();
}
- // ------------------------------------------------------------------------
+
OUString lcl_toXSD_UNOTime( const Any& rAny )
{
UNOTime aTime;
@@ -192,7 +192,7 @@ namespace
return lcl_toXSD_UNOTime_typed( aTime );
}
- // ------------------------------------------------------------------------
+
UNOTime lcl_toUNOTime( const OUString& rString )
{
UNOTime aTime;
@@ -224,13 +224,13 @@ namespace
return aTime;
}
- // ------------------------------------------------------------------------
+
Any lcl_toAny_UNOTime( const OUString& rString )
{
return makeAny( lcl_toUNOTime( rString ) );
}
- // ------------------------------------------------------------------------
+
OUString lcl_toXSD_UNODateTime( const Any& rAny )
{
UNODateTime aDateTime;
@@ -247,7 +247,7 @@ namespace
return sRet;
}
- // ------------------------------------------------------------------------
+
Any lcl_toAny_UNODateTime( const OUString& rString )
{
// separate the date from the time part
@@ -323,7 +323,7 @@ Convert::Any_t Convert::toAny( const OUString& rValue,
return aIter != maMap.end() ? aIter->second.second( rValue ) : Any_t();
}
-//------------------------------------------------------------------------
+
OUString Convert::collapseWhitespace( const OUString& _rString )
{
sal_Int32 nLength = _rString.getLength();
diff --git a/forms/source/xforms/datatyperepository.cxx b/forms/source/xforms/datatyperepository.cxx
index a2a24868a89e..94fa43cefaba 100644
--- a/forms/source/xforms/datatyperepository.cxx
+++ b/forms/source/xforms/datatyperepository.cxx
@@ -54,7 +54,7 @@ namespace xforms
//====================================================================
//= ODataTypeRepository
//====================================================================
- //--------------------------------------------------------------------
+
ODataTypeRepository::ODataTypeRepository( )
{
@@ -96,12 +96,12 @@ namespace xforms
m_aRepository[ sName ] = new OShortIntegerType( sName, ::com::sun::star::xsd::DataTypeClass::gDay );
}
- //--------------------------------------------------------------------
+
ODataTypeRepository::~ODataTypeRepository( )
{
}
- //--------------------------------------------------------------------
+
ODataTypeRepository::Repository::iterator ODataTypeRepository::implLocate( const OUString& _rName, bool _bAllowMiss ) SAL_THROW( ( NoSuchElementException ) )
{
Repository::iterator aTypePos = m_aRepository.find( _rName );
@@ -111,7 +111,7 @@ namespace xforms
return aTypePos;
}
- //--------------------------------------------------------------------
+
Reference< XDataType > SAL_CALL ODataTypeRepository::getBasicDataType( sal_Int16 dataTypeClass ) throw (NoSuchElementException, RuntimeException)
{
Reference< XDataType > xReturn;
@@ -131,7 +131,7 @@ namespace xforms
return xReturn;
}
- //--------------------------------------------------------------------
+
Reference< XDataType > SAL_CALL ODataTypeRepository::cloneDataType( const OUString& sourceName, const OUString& newName ) throw (NoSuchElementException, ElementExistException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -147,7 +147,7 @@ namespace xforms
return pClone;
}
- //--------------------------------------------------------------------
+
void SAL_CALL ODataTypeRepository::revokeDataType( const OUString& typeName ) throw (NoSuchElementException, VetoException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -160,7 +160,7 @@ namespace xforms
m_aRepository.erase( aTypePos );
}
- //--------------------------------------------------------------------
+
Reference< XDataType > SAL_CALL ODataTypeRepository::getDataType( const OUString& typeName ) throw (NoSuchElementException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -168,19 +168,19 @@ namespace xforms
}
- //--------------------------------------------------------------------
+
Reference< XEnumeration > SAL_CALL ODataTypeRepository::createEnumeration( ) throw (RuntimeException)
{
return new ::comphelper::OEnumerationByName( this );
}
- //--------------------------------------------------------------------
+
Any SAL_CALL ODataTypeRepository::getByName( const OUString& aName ) throw (NoSuchElementException, WrappedTargetException, RuntimeException)
{
return makeAny( getDataType( aName ) );
}
- //--------------------------------------------------------------------
+
Sequence< OUString > SAL_CALL ODataTypeRepository::getElementNames( ) throw (RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -195,26 +195,26 @@ namespace xforms
return aNames;
}
- //--------------------------------------------------------------------
+
sal_Bool SAL_CALL ODataTypeRepository::hasByName( const OUString& aName ) throw (RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
return m_aRepository.find( aName ) != m_aRepository.end();
}
- //--------------------------------------------------------------------
+
Type SAL_CALL ODataTypeRepository::getElementType( ) throw (RuntimeException)
{
return ::getCppuType( static_cast< Reference< XDataType >* >( NULL ) );
}
- //--------------------------------------------------------------------
+
sal_Bool SAL_CALL ODataTypeRepository::hasElements( ) throw (RuntimeException)
{
return !m_aRepository.empty();
}
- //--------------------------------------------------------------------
+
// type specific implementation of registerProperties, using explicit
// template instantiations
diff --git a/forms/source/xforms/datatypes.cxx b/forms/source/xforms/datatypes.cxx
index 5b4811865a49..e44c3b88ce44 100644
--- a/forms/source/xforms/datatypes.cxx
+++ b/forms/source/xforms/datatypes.cxx
@@ -59,7 +59,7 @@ namespace xforms
//====================================================================
//= OXSDDataType
//====================================================================
- //--------------------------------------------------------------------
+
OXSDDataType::OXSDDataType( const OUString& _rName, sal_Int16 _nTypeClass )
:OXSDDataType_PBase( m_aBHelper )
,m_bIsBasic( sal_True )
@@ -70,12 +70,12 @@ namespace xforms
{
}
- //--------------------------------------------------------------------
+
OXSDDataType::~OXSDDataType()
{
}
- //--------------------------------------------------------------------
+
void OXSDDataType::registerProperties()
{
registerProperty( PROPERTY_NAME, PROPERTY_ID_NAME, BOUND, &m_sName, ::getCppuType( &m_sName ) );
@@ -86,7 +86,7 @@ namespace xforms
registerProperty( PROPERTY_XSD_TYPE_CLASS, PROPERTY_ID_XSD_TYPE_CLASS, READONLY, &m_nTypeClass, ::getCppuType( &m_nTypeClass ) );
}
- //--------------------------------------------------------------------
+
void OXSDDataType::initializeClone( const OXSDDataType& _rCloneSource )
{
m_bIsBasic = sal_False;
@@ -95,7 +95,7 @@ namespace xforms
m_nWST = _rCloneSource.m_nWST;
}
- //--------------------------------------------------------------------
+
OXSDDataType* OXSDDataType::clone( const OUString& _rNewName ) const
{
OXSDDataType* pClone = createClone( _rNewName );
@@ -103,73 +103,73 @@ namespace xforms
return pClone;
}
- //--------------------------------------------------------------------
+
IMPLEMENT_FORWARD_XINTERFACE2( OXSDDataType, OXSDDataType_Base, ::comphelper::OPropertyContainer )
- //--------------------------------------------------------------------
+
IMPLEMENT_FORWARD_XTYPEPROVIDER2( OXSDDataType, OXSDDataType_Base, ::comphelper::OPropertyContainer )
#define SET_PROPERTY( propertyid, value, member ) \
setFastPropertyValue( PROPERTY_ID_##propertyid, makeAny( value ) ); \
OSL_POSTCOND( member == value, "OXSDDataType::setFoo: inconsistency!" );
- //--------------------------------------------------------------------
+
OUString SAL_CALL OXSDDataType::getName( ) throw (RuntimeException)
{
return m_sName;
}
- //--------------------------------------------------------------------
+
void SAL_CALL OXSDDataType::setName( const OUString& aName ) throw (RuntimeException, VetoException)
{
// TODO: check the name for conflicts in the repository
SET_PROPERTY( NAME, aName, m_sName );
}
- //--------------------------------------------------------------------
+
OUString SAL_CALL OXSDDataType::getPattern() throw (RuntimeException)
{
return m_sPattern;
}
- //--------------------------------------------------------------------
+
void SAL_CALL OXSDDataType::setPattern( const OUString& _pattern ) throw (RuntimeException)
{
SET_PROPERTY( XSD_PATTERN, _pattern, m_sPattern );
}
- //--------------------------------------------------------------------
+
sal_Int16 SAL_CALL OXSDDataType::getWhiteSpaceTreatment() throw (RuntimeException)
{
return m_nWST;
}
- //--------------------------------------------------------------------
+
void SAL_CALL OXSDDataType::setWhiteSpaceTreatment( sal_Int16 _whitespacetreatment ) throw (RuntimeException, IllegalArgumentException)
{
SET_PROPERTY( XSD_WHITESPACE, _whitespacetreatment, m_nWST );
}
- //--------------------------------------------------------------------
+
sal_Bool SAL_CALL OXSDDataType::getIsBasic() throw (RuntimeException)
{
return m_bIsBasic;
}
- //--------------------------------------------------------------------
+
sal_Int16 SAL_CALL OXSDDataType::getTypeClass() throw (RuntimeException)
{
return m_nTypeClass;
}
- //--------------------------------------------------------------------
+
sal_Bool OXSDDataType::validate( const OUString& sValue ) throw( RuntimeException )
{
return ( _validate( sValue ) == 0 );
}
- //--------------------------------------------------------------------
+
OUString OXSDDataType::explainInvalid( const OUString& sValue ) throw( RuntimeException )
{
// get reason
@@ -182,7 +182,7 @@ namespace xforms
_explainInvalid( nReason ) );
}
- //--------------------------------------------------------------------
+
OUString OXSDDataType::_explainInvalid( sal_uInt16 nReason )
{
if ( RID_STR_XFORMS_PATTERN_DOESNT_MATCH == nReason )
@@ -193,7 +193,7 @@ namespace xforms
return OUString();
}
- //--------------------------------------------------------------------
+
namespace
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
@@ -224,7 +224,7 @@ namespace xforms
}
}
- //--------------------------------------------------------------------
+
sal_uInt16 OXSDDataType::_validate( const OUString& _rValue )
{
// care for the regular expression
@@ -245,7 +245,7 @@ namespace xforms
return 0;
}
- //--------------------------------------------------------------------
+
sal_Bool OXSDDataType::convertFastPropertyValue( Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue ) throw(IllegalArgumentException)
{
// let the base class do the conversion
@@ -265,7 +265,7 @@ namespace xforms
return sal_True;
}
- //--------------------------------------------------------------------
+
void SAL_CALL OXSDDataType::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const Any& _rValue ) throw (Exception)
{
OXSDDataType_PBase::setFastPropertyValue_NoBroadcast( _nHandle, _rValue );
@@ -273,7 +273,7 @@ namespace xforms
m_bPatternMatcherDirty = true;
}
- //--------------------------------------------------------------------
+
bool OXSDDataType::checkPropertySanity( sal_Int32 _nHandle, const ::com::sun::star::uno::Any& _rNewValue, OUString& _rErrorMessage )
{
if ( _nHandle == PROPERTY_ID_XSD_PATTERN )
@@ -293,37 +293,37 @@ namespace xforms
return true;
}
- //--------------------------------------------------------------------
+
void SAL_CALL OXSDDataType::setPropertyValue( const OUString& aPropertyName, const Any& aValue ) throw (UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException)
{
OXSDDataType_PBase::setPropertyValue( aPropertyName, aValue );
}
- //--------------------------------------------------------------------
+
Any SAL_CALL OXSDDataType::getPropertyValue( const OUString& PropertyName ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException)
{
return OXSDDataType_PBase::getPropertyValue( PropertyName );
}
- //--------------------------------------------------------------------
+
void SAL_CALL OXSDDataType::addPropertyChangeListener( const OUString& aPropertyName, const Reference< XPropertyChangeListener >& xListener ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException)
{
OXSDDataType_PBase::addPropertyChangeListener( aPropertyName, xListener );
}
- //--------------------------------------------------------------------
+
void SAL_CALL OXSDDataType::removePropertyChangeListener( const OUString& aPropertyName, const Reference< XPropertyChangeListener >& aListener ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException)
{
OXSDDataType_PBase::removePropertyChangeListener( aPropertyName, aListener );
}
- //--------------------------------------------------------------------
+
void SAL_CALL OXSDDataType::addVetoableChangeListener( const OUString& PropertyName, const Reference< XVetoableChangeListener >& aListener ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException)
{
OXSDDataType_PBase::addVetoableChangeListener( PropertyName, aListener );
}
- //--------------------------------------------------------------------
+
void SAL_CALL OXSDDataType::removeVetoableChangeListener( const OUString& PropertyName, const Reference< XVetoableChangeListener >& aListener ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException)
{
OXSDDataType_PBase::removeVetoableChangeListener( PropertyName, aListener );
@@ -341,14 +341,14 @@ namespace xforms
{
}
- //--------------------------------------------------------------------
+
void OValueLimitedType_Base::initializeClone( const OXSDDataType& _rCloneSource )
{
OXSDDataType::initializeClone( _rCloneSource );
initializeTypedClone( static_cast< const OValueLimitedType_Base& >( _rCloneSource ) );
}
- //--------------------------------------------------------------------
+
void OValueLimitedType_Base::initializeTypedClone( const OValueLimitedType_Base& _rCloneSource )
{
m_aMaxInclusive = _rCloneSource.m_aMaxInclusive;
@@ -361,7 +361,7 @@ namespace xforms
m_fCachedMinExclusive = _rCloneSource.m_fCachedMinExclusive;
}
- //--------------------------------------------------------------------
+
void SAL_CALL OValueLimitedType_Base::setFastPropertyValue_NoBroadcast(
sal_Int32 _nHandle, const ::com::sun::star::uno::Any& _rValue ) throw (::com::sun::star::uno::Exception)
{
@@ -414,7 +414,7 @@ namespace xforms
}
}
- //--------------------------------------------------------------------
+
bool OValueLimitedType_Base::_getValue( const OUString& rValue, double& fValue )
{
// convert to double
@@ -434,7 +434,7 @@ namespace xforms
return bReturn;
}
- //--------------------------------------------------------------------
+
sal_uInt16 OValueLimitedType_Base::_validate( const OUString& rValue )
{
sal_uInt16 nReason = OXSDDataType::_validate( rValue );
@@ -459,7 +459,7 @@ namespace xforms
return nReason;
}
- //--------------------------------------------------------------------
+
OUString OValueLimitedType_Base::_explainInvalid( sal_uInt16 nReason )
{
OUStringBuffer sInfo;
@@ -500,13 +500,13 @@ namespace xforms
//====================================================================
//= OStringType
//====================================================================
- //--------------------------------------------------------------------
+
OStringType::OStringType( const OUString& _rName, sal_Int16 _nTypeClass )
:OStringType_Base( _rName, _nTypeClass )
{
}
- //--------------------------------------------------------------------
+
void OStringType::registerProperties()
{
OStringType_Base::registerProperties();
@@ -516,10 +516,10 @@ namespace xforms
REGISTER_VOID_PROP( XSD_MAX_LENGTH, m_aMaxLength, sal_Int32 );
}
- //--------------------------------------------------------------------
+
IMPLEMENT_DEFAULT_TYPED_CLONING( OStringType, OStringType_Base )
- //--------------------------------------------------------------------
+
void OStringType::initializeTypedClone( const OStringType& _rCloneSource )
{
m_aLength = _rCloneSource.m_aLength;
@@ -527,7 +527,7 @@ namespace xforms
m_aMaxLength = _rCloneSource.m_aMaxLength;
}
- //--------------------------------------------------------------------
+
bool OStringType::checkPropertySanity( sal_Int32 _nHandle, const Any& _rNewValue, OUString& _rErrorMessage )
{
// let the base class do the conversion
@@ -553,7 +553,7 @@ namespace xforms
return _rErrorMessage.isEmpty();
}
- //--------------------------------------------------------------------
+
sal_uInt16 OStringType::_validate( const OUString& rValue )
{
// check regexp, whitespace etc. in parent class
@@ -580,7 +580,7 @@ namespace xforms
return nReason;
}
- //--------------------------------------------------------------------
+
OUString OStringType::_explainInvalid( sal_uInt16 nReason )
{
sal_Int32 nValue = 0;
@@ -616,21 +616,21 @@ namespace xforms
//====================================================================
//= OBooleanType
//====================================================================
- //--------------------------------------------------------------------
+
OBooleanType::OBooleanType( const OUString& _rName )
:OBooleanType_Base( _rName, DataTypeClass::BOOLEAN )
{
}
- //--------------------------------------------------------------------
+
IMPLEMENT_DEFAULT_CLONING( OBooleanType, OBooleanType_Base )
- //--------------------------------------------------------------------
+
void OBooleanType::initializeTypedClone( const OBooleanType& /*_rCloneSource*/ )
{
}
- //--------------------------------------------------------------------
+
sal_uInt16 OBooleanType::_validate( const OUString& sValue )
{
sal_uInt16 nInvalidityReason = OBooleanType_Base::_validate( sValue );
@@ -641,7 +641,7 @@ namespace xforms
return bValid ? 0 : RID_STR_XFORMS_INVALID_VALUE;
}
- //--------------------------------------------------------------------
+
OUString OBooleanType::_explainInvalid( sal_uInt16 nReason )
{
return ( nReason == 0 ) ? OUString() : getName();
@@ -650,23 +650,23 @@ namespace xforms
//====================================================================
//= ODecimalType
//====================================================================
- //--------------------------------------------------------------------
+
ODecimalType::ODecimalType( const OUString& _rName, sal_Int16 _nTypeClass )
:ODecimalType_Base( _rName, _nTypeClass )
{
}
- //--------------------------------------------------------------------
+
IMPLEMENT_DEFAULT_TYPED_CLONING( ODecimalType, ODecimalType_Base )
- //--------------------------------------------------------------------
+
void ODecimalType::initializeTypedClone( const ODecimalType& _rCloneSource )
{
m_aTotalDigits = _rCloneSource.m_aTotalDigits;
m_aFractionDigits = _rCloneSource.m_aFractionDigits;
}
- //--------------------------------------------------------------------
+
void ODecimalType::registerProperties()
{
ODecimalType_Base::registerProperties();
@@ -675,7 +675,7 @@ namespace xforms
REGISTER_VOID_PROP( XSD_FRACTION_DIGITS, m_aFractionDigits, sal_Int32 );
}
- //--------------------------------------------------------------------
+
// validate decimals and return code for which facets failed
// to be used by: ODecimalType::validate and ODecimalType::explainInvalid
@@ -712,7 +712,7 @@ namespace xforms
return nReason;
}
- //--------------------------------------------------------------------
+
OUString ODecimalType::_explainInvalid( sal_uInt16 nReason )
{
sal_Int32 nValue = 0;
@@ -736,7 +736,7 @@ namespace xforms
return sInfo.makeStringAndClear();
}
- //--------------------------------------------------------------------
+
OUString ODecimalType::typedValueAsHumanReadableString( const Any& _rValue ) const
{
double fValue( 0 );
@@ -744,7 +744,7 @@ namespace xforms
return OUString::number( fValue );
}
- //--------------------------------------------------------------------
+
void ODecimalType::normalizeValue( const Any& _rValue, double& _rDoubleValue ) const
{
OSL_VERIFY( _rValue >>= _rDoubleValue );
@@ -769,16 +769,16 @@ namespace xforms
//====================================================================
//= ODateType
//====================================================================
- //--------------------------------------------------------------------
+
DEFAULT_IMPLEMNENT_SUBTYPE( ODateType, DATE )
- //--------------------------------------------------------------------
+
sal_uInt16 ODateType::_validate( const OUString& _rValue )
{
return ODateType_Base::_validate( _rValue );
}
- //--------------------------------------------------------------------
+
bool ODateType::_getValue( const OUString& value, double& fValue )
{
Any aTypeValue = Convert::get().toAny( value, getCppuType() );
@@ -792,14 +792,14 @@ namespace xforms
return true;
}
- //--------------------------------------------------------------------
+
OUString ODateType::typedValueAsHumanReadableString( const Any& _rValue ) const
{
OSL_PRECOND( _rValue.getValueType().equals( getCppuType() ), "ODateType::typedValueAsHumanReadableString: unexpected type" );
return Convert::get().toXSD( _rValue );
}
- //--------------------------------------------------------------------
+
void ODateType::normalizeValue( const Any& _rValue, double& _rDoubleValue ) const
{
Date aValue;
@@ -811,16 +811,16 @@ namespace xforms
//====================================================================
//= OTimeType
//====================================================================
- //--------------------------------------------------------------------
+
DEFAULT_IMPLEMNENT_SUBTYPE( OTimeType, TIME )
- //--------------------------------------------------------------------
+
sal_uInt16 OTimeType::_validate( const OUString& _rValue )
{
return OTimeType_Base::_validate( _rValue );
}
- //--------------------------------------------------------------------
+
bool OTimeType::_getValue( const OUString& value, double& fValue )
{
Any aTypedValue = Convert::get().toAny( value, getCppuType() );
@@ -841,14 +841,14 @@ namespace xforms
return true;
}
- //--------------------------------------------------------------------
+
OUString OTimeType::typedValueAsHumanReadableString( const Any& _rValue ) const
{
OSL_PRECOND( _rValue.getValueType().equals( getCppuType() ), "OTimeType::typedValueAsHumanReadableString: unexpected type" );
return Convert::get().toXSD( _rValue );
}
- //--------------------------------------------------------------------
+
void OTimeType::normalizeValue( const Any& _rValue, double& _rDoubleValue ) const
{
Time aValue;
@@ -860,16 +860,16 @@ namespace xforms
//====================================================================
//= ODateTimeType
//====================================================================
- //--------------------------------------------------------------------
+
DEFAULT_IMPLEMNENT_SUBTYPE( ODateTimeType, DATETIME )
- //--------------------------------------------------------------------
+
sal_uInt16 ODateTimeType::_validate( const OUString& _rValue )
{
return ODateTimeType_Base::_validate( _rValue );
}
- //--------------------------------------------------------------------
+
namespace
{
double lcl_normalizeDateTime( const DateTime& _rValue )
@@ -888,7 +888,7 @@ namespace xforms
}
}
- //--------------------------------------------------------------------
+
bool ODateTimeType::_getValue( const OUString& value, double& fValue )
{
Any aTypedValue = Convert::get().toAny( value, getCppuType() );
@@ -901,7 +901,7 @@ namespace xforms
return true;
}
- //--------------------------------------------------------------------
+
OUString ODateTimeType::typedValueAsHumanReadableString( const Any& _rValue ) const
{
OSL_PRECOND( _rValue.getValueType().equals( getCppuType() ), "OTimeType::typedValueAsHumanReadableString: unexpected type" );
@@ -913,7 +913,7 @@ namespace xforms
return sString.replace( 'T', ' ' );
}
- //--------------------------------------------------------------------
+
void ODateTimeType::normalizeValue( const Any& _rValue, double& _rDoubleValue ) const
{
DateTime aValue;
@@ -924,21 +924,21 @@ namespace xforms
//====================================================================
//= OShortIntegerType
//====================================================================
- //--------------------------------------------------------------------
+
OShortIntegerType::OShortIntegerType( const OUString& _rName, sal_Int16 _nTypeClass )
:OShortIntegerType_Base( _rName, _nTypeClass )
{
}
- //--------------------------------------------------------------------
+
IMPLEMENT_DEFAULT_TYPED_CLONING( OShortIntegerType, OShortIntegerType_Base )
- //--------------------------------------------------------------------
+
void OShortIntegerType::initializeTypedClone( const OShortIntegerType& /*_rCloneSource*/ )
{
}
- //--------------------------------------------------------------------
+
bool OShortIntegerType::_getValue( const OUString& value, double& fValue )
{
fValue = (double)(sal_Int16)value.toInt32();
@@ -954,7 +954,7 @@ namespace xforms
return true;
}
- //--------------------------------------------------------------------
+
OUString OShortIntegerType::typedValueAsHumanReadableString( const Any& _rValue ) const
{
sal_Int16 nValue( 0 );
@@ -962,7 +962,7 @@ namespace xforms
return OUString::number( nValue );
}
- //--------------------------------------------------------------------
+
void OShortIntegerType::normalizeValue( const Any& _rValue, double& _rDoubleValue ) const
{
sal_Int16 nValue( 0 );