Translate German comments, fix some whitespace and bad translations
This commit is contained in:
@@ -382,13 +382,13 @@ OButtonControl::OButtonControl(const Reference<XMultiServiceFactory>& _rxFactory
|
|||||||
{
|
{
|
||||||
increment(m_refCount);
|
increment(m_refCount);
|
||||||
{
|
{
|
||||||
// als ActionListener anmelden
|
// Register as ActionListener
|
||||||
Reference<XButton> xButton;
|
Reference<XButton> xButton;
|
||||||
query_aggregation( m_xAggregate, xButton);
|
query_aggregation( m_xAggregate, xButton);
|
||||||
if (xButton.is())
|
if (xButton.is())
|
||||||
xButton->addActionListener(this);
|
xButton->addActionListener(this);
|
||||||
}
|
}
|
||||||
// Refcount bei 1 fuer Listener
|
// For Listener: refcount at one
|
||||||
decrement(m_refCount);
|
decrement(m_refCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -399,7 +399,7 @@ OButtonControl::~OButtonControl()
|
|||||||
Application::RemoveUserEvent(m_nClickEvent);
|
Application::RemoveUserEvent(m_nClickEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
// UNO Anbindung
|
// UNO binding
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
Any SAL_CALL OButtonControl::queryAggregation(const Type& _rType) throw (RuntimeException)
|
Any SAL_CALL OButtonControl::queryAggregation(const Type& _rType) throw (RuntimeException)
|
||||||
{
|
{
|
||||||
@@ -437,7 +437,7 @@ void SAL_CALL OButtonControl::disposing( const EventObject& _rSource ) throw( Ru
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
void OButtonControl::actionPerformed(const ActionEvent& /*rEvent*/) throw ( ::com::sun::star::uno::RuntimeException)
|
void OButtonControl::actionPerformed(const ActionEvent& /*rEvent*/) throw ( ::com::sun::star::uno::RuntimeException)
|
||||||
{
|
{
|
||||||
// Asynchron fuer starutil::URL-Button
|
// Asynchronous for starutil::URL-Button
|
||||||
sal_uLong n = Application::PostUserEvent( LINK(this, OButtonControl,OnClick) );
|
sal_uLong n = Application::PostUserEvent( LINK(this, OButtonControl,OnClick) );
|
||||||
{
|
{
|
||||||
::osl::MutexGuard aGuard( m_aMutex );
|
::osl::MutexGuard aGuard( m_aMutex );
|
||||||
@@ -459,8 +459,8 @@ IMPL_LINK_NOARG(OButtonControl, OnClick)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Sonst nicht. Dann darf man aber auf keinen Fal die Listener
|
// Else, don't. We then must not notify the Listeners in any case,
|
||||||
// benachrichtigen, auch dann nicht, wenn er spaeter hinzukommt.
|
// not even if added later on.
|
||||||
aGuard.clear();
|
aGuard.clear();
|
||||||
|
|
||||||
// recognize the button type
|
// recognize the button type
|
||||||
@@ -485,7 +485,7 @@ IMPL_LINK_NOARG(OButtonControl, OnClick)
|
|||||||
#ifdef DBG_UTIL
|
#ifdef DBG_UTIL
|
||||||
catch( const RuntimeException& )
|
catch( const RuntimeException& )
|
||||||
{
|
{
|
||||||
// silent this
|
// silence this
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
catch( const Exception& )
|
catch( const Exception& )
|
||||||
@@ -685,7 +685,7 @@ sal_Int16 OButtonControl::getModelUrlFeatureId( ) const
|
|||||||
xModelProps->getPropertyValue( PROPERTY_BUTTONTYPE ) >>= eButtonType;
|
xModelProps->getPropertyValue( PROPERTY_BUTTONTYPE ) >>= eButtonType;
|
||||||
}
|
}
|
||||||
|
|
||||||
// are we an URL button?
|
// are we a URL button?
|
||||||
if ( eButtonType == FormButtonType_URL )
|
if ( eButtonType == FormButtonType_URL )
|
||||||
{
|
{
|
||||||
// is it a feature URL?
|
// is it a feature URL?
|
||||||
|
@@ -135,7 +135,7 @@ private:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// UNO Anbindung
|
// UNO binding
|
||||||
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes();
|
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -146,7 +146,7 @@ public:
|
|||||||
IMPLEMENTATION_NAME(OButtonControl);
|
IMPLEMENTATION_NAME(OButtonControl);
|
||||||
virtual StringSequence SAL_CALL getSupportedServiceNames() throw();
|
virtual StringSequence SAL_CALL getSupportedServiceNames() throw();
|
||||||
|
|
||||||
// UNO Anbindung
|
// UNO binding
|
||||||
DECLARE_UNO3_AGG_DEFAULTS(OButtonControl, OClickableImageBaseControl);
|
DECLARE_UNO3_AGG_DEFAULTS(OButtonControl, OClickableImageBaseControl);
|
||||||
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation(const ::com::sun::star::uno::Type& _rType) throw(::com::sun::star::uno::RuntimeException);
|
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation(const ::com::sun::star::uno::Type& _rType) throw(::com::sun::star::uno::RuntimeException);
|
||||||
|
|
||||||
|
@@ -205,7 +205,7 @@ void SAL_CALL OCheckBoxModel::read(const Reference<stario::XObjectInputStream>&
|
|||||||
setReferenceValue( sReferenceValue );
|
setReferenceValue( sReferenceValue );
|
||||||
setDefaultChecked( static_cast< ToggleState >( nDefaultChecked ) );
|
setDefaultChecked( static_cast< ToggleState >( nDefaultChecked ) );
|
||||||
|
|
||||||
// Nach dem Lesen die Defaultwerte anzeigen
|
// After reading in, display the default values
|
||||||
if ( !getControlSource().isEmpty() )
|
if ( !getControlSource().isEmpty() )
|
||||||
// (not if we don't have a control source - the "State" property acts like it is persistent, then
|
// (not if we don't have a control source - the "State" property acts like it is persistent, then
|
||||||
resetNoBroadcast();
|
resetNoBroadcast();
|
||||||
@@ -217,7 +217,7 @@ Any OCheckBoxModel::translateDbColumnToControlValue()
|
|||||||
Any aValue;
|
Any aValue;
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////
|
||||||
// Wert an ControlModel setzen
|
// Set value in ControlModel
|
||||||
sal_Bool bValue = m_xColumn->getBoolean();
|
sal_Bool bValue = m_xColumn->getBoolean();
|
||||||
if ( m_xColumn->wasNull() )
|
if ( m_xColumn->wasNull() )
|
||||||
{
|
{
|
||||||
|
@@ -217,8 +217,8 @@ OGridColumn::OGridColumn( const comphelper::ComponentContext& _rContext, const :
|
|||||||
{
|
{
|
||||||
DBG_CTOR(OGridColumn,NULL);
|
DBG_CTOR(OGridColumn,NULL);
|
||||||
|
|
||||||
// Anlegen des UnoControlModels
|
// Create the UnoControlModel
|
||||||
if ( !m_aModelName.isEmpty() ) // is there a to-be-aggregated model?
|
if ( !m_aModelName.isEmpty() ) // is there a to-be-aggregated model?
|
||||||
{
|
{
|
||||||
increment( m_refCount );
|
increment( m_refCount );
|
||||||
|
|
||||||
@@ -232,7 +232,7 @@ OGridColumn::OGridColumn( const comphelper::ComponentContext& _rContext, const :
|
|||||||
m_xAggregate->setDelegator( static_cast< ::cppu::OWeakObject* >( this ) );
|
m_xAggregate->setDelegator( static_cast< ::cppu::OWeakObject* >( this ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Refcount wieder bei NULL
|
// Set refcount back to zero
|
||||||
decrement( m_refCount );
|
decrement( m_refCount );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -275,7 +275,7 @@ OGridColumn::~OGridColumn()
|
|||||||
dispose();
|
dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
// freigeben der Agg
|
// Free the aggregate
|
||||||
if (m_xAggregate.is())
|
if (m_xAggregate.is())
|
||||||
{
|
{
|
||||||
InterfaceRef xIface;
|
InterfaceRef xIface;
|
||||||
@@ -483,11 +483,11 @@ Reference< XCloneable > SAL_CALL OGridColumn::createClone( ) throw (RuntimeExce
|
|||||||
return pNewColumn;
|
return pNewColumn;
|
||||||
}
|
}
|
||||||
|
|
||||||
//XPersistObject
|
// XPersistObject
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
void SAL_CALL OGridColumn::write(const Reference<XObjectOutputStream>& _rxOutStream)
|
void SAL_CALL OGridColumn::write(const Reference<XObjectOutputStream>& _rxOutStream)
|
||||||
{
|
{
|
||||||
// 1. Schreiben des UnoControls
|
// 1. Write the UnoControl
|
||||||
Reference<XMarkableStream> xMark(_rxOutStream, UNO_QUERY);
|
Reference<XMarkableStream> xMark(_rxOutStream, UNO_QUERY);
|
||||||
sal_Int32 nMark = xMark->createMark();
|
sal_Int32 nMark = xMark->createMark();
|
||||||
|
|
||||||
@@ -498,14 +498,14 @@ void SAL_CALL OGridColumn::write(const Reference<XObjectOutputStream>& _rxOutStr
|
|||||||
if (query_aggregation(m_xAggregate, xPersist))
|
if (query_aggregation(m_xAggregate, xPersist))
|
||||||
xPersist->write(_rxOutStream);
|
xPersist->write(_rxOutStream);
|
||||||
|
|
||||||
// feststellen der Laenge
|
// Calculate the length
|
||||||
nLen = xMark->offsetToMark(nMark) - 4;
|
nLen = xMark->offsetToMark(nMark) - 4;
|
||||||
xMark->jumpToMark(nMark);
|
xMark->jumpToMark(nMark);
|
||||||
_rxOutStream->writeLong(nLen);
|
_rxOutStream->writeLong(nLen);
|
||||||
xMark->jumpToFurthest();
|
xMark->jumpToFurthest();
|
||||||
xMark->deleteMark(nMark);
|
xMark->deleteMark(nMark);
|
||||||
|
|
||||||
// 2. Schreiben einer VersionsNummer
|
// 2. Write a version number
|
||||||
_rxOutStream->writeShort(0x0002);
|
_rxOutStream->writeShort(0x0002);
|
||||||
|
|
||||||
sal_uInt16 nAnyMask = 0;
|
sal_uInt16 nAnyMask = 0;
|
||||||
@@ -535,7 +535,7 @@ void SAL_CALL OGridColumn::write(const Reference<XObjectOutputStream>& _rxOutStr
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
void SAL_CALL OGridColumn::read(const Reference<XObjectInputStream>& _rxInStream)
|
void SAL_CALL OGridColumn::read(const Reference<XObjectInputStream>& _rxInStream)
|
||||||
{
|
{
|
||||||
// 1. Lesen des UnoControls
|
// 1. Read the UnoControl
|
||||||
sal_Int32 nLen = _rxInStream->readLong();
|
sal_Int32 nLen = _rxInStream->readLong();
|
||||||
if (nLen)
|
if (nLen)
|
||||||
{
|
{
|
||||||
@@ -550,7 +550,7 @@ void SAL_CALL OGridColumn::read(const Reference<XObjectInputStream>& _rxInStream
|
|||||||
xMark->deleteMark(nMark);
|
xMark->deleteMark(nMark);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2. Lesen des Versionsnummer
|
// 2. Write a version number
|
||||||
sal_uInt16 nVersion = _rxInStream->readShort(); (void)nVersion;
|
sal_uInt16 nVersion = _rxInStream->readShort(); (void)nVersion;
|
||||||
sal_uInt16 nAnyMask = _rxInStream->readShort();
|
sal_uInt16 nAnyMask = _rxInStream->readShort();
|
||||||
|
|
||||||
|
@@ -75,7 +75,7 @@ protected:
|
|||||||
::rtl::OUString m_aModelName;
|
::rtl::OUString m_aModelName;
|
||||||
|
|
||||||
// [properties]
|
// [properties]
|
||||||
::rtl::OUString m_aLabel; // Name der Spalte
|
::rtl::OUString m_aLabel; // Column name
|
||||||
// [properties]
|
// [properties]
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -83,7 +83,7 @@ public:
|
|||||||
OGridColumn(const OGridColumn* _pOriginal );
|
OGridColumn(const OGridColumn* _pOriginal );
|
||||||
virtual ~OGridColumn();
|
virtual ~OGridColumn();
|
||||||
|
|
||||||
// UNO Anbindung
|
// UNO binding
|
||||||
DECLARE_UNO3_AGG_DEFAULTS(OGridControlModel, OGridColumn_BASE);
|
DECLARE_UNO3_AGG_DEFAULTS(OGridControlModel, OGridColumn_BASE);
|
||||||
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw (::com::sun::star::uno::RuntimeException);
|
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw (::com::sun::star::uno::RuntimeException);
|
||||||
|
|
||||||
@@ -198,7 +198,7 @@ OGridColumn* ClassName::createCloneColumn() const \
|
|||||||
#define TYPE_TEXTFIELD 8
|
#define TYPE_TEXTFIELD 8
|
||||||
#define TYPE_TIMEFIELD 9
|
#define TYPE_TIMEFIELD 9
|
||||||
|
|
||||||
// liste aller bekannten columns
|
// List of all known columns
|
||||||
const StringSequence& getColumnTypes();
|
const StringSequence& getColumnTypes();
|
||||||
sal_Int32 getColumnTypeByModelName(const ::rtl::OUString& aModelName);
|
sal_Int32 getColumnTypeByModelName(const ::rtl::OUString& aModelName);
|
||||||
|
|
||||||
|
@@ -236,7 +236,7 @@ void OComboBoxModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const
|
|||||||
DBG_ASSERT(_rValue.getValueType().getTypeClass() == TypeClass_STRING,
|
DBG_ASSERT(_rValue.getValueType().getTypeClass() == TypeClass_STRING,
|
||||||
"OComboBoxModel::setFastPropertyValue_NoBroadcast : invalid type !" );
|
"OComboBoxModel::setFastPropertyValue_NoBroadcast : invalid type !" );
|
||||||
_rValue >>= m_aListSource;
|
_rValue >>= m_aListSource;
|
||||||
// die ListSource hat sich geaendert -> neu laden
|
// The ListSource has changed -> reload
|
||||||
if (ListSourceType_VALUELIST != m_eListSourceType)
|
if (ListSourceType_VALUELIST != m_eListSourceType)
|
||||||
{
|
{
|
||||||
if ( m_xCursor.is() && !hasField() && !hasExternalListSource() )
|
if ( m_xCursor.is() && !hasField() && !hasExternalListSource() )
|
||||||
@@ -411,7 +411,7 @@ void SAL_CALL OComboBoxModel::read(const Reference<stario::XObjectInputStream>&
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Maskierung fuer any
|
// Masking for any
|
||||||
sal_uInt16 nAnyMask;
|
sal_uInt16 nAnyMask;
|
||||||
_rxInStream >> nAnyMask;
|
_rxInStream >> nAnyMask;
|
||||||
|
|
||||||
@@ -453,8 +453,8 @@ void SAL_CALL OComboBoxModel::read(const Reference<stario::XObjectInputStream>&
|
|||||||
if (nVersion > 0x0003) // nVersion == 4
|
if (nVersion > 0x0003) // nVersion == 4
|
||||||
_rxInStream >> m_aDefaultText;
|
_rxInStream >> m_aDefaultText;
|
||||||
|
|
||||||
// Stringliste muss geleert werden, wenn eine Listenquelle gesetzt ist
|
// StringList must be emptied if a ListSource is set.
|
||||||
// dieses kann der Fall sein wenn im alive modus gespeichert wird
|
// This can be the case if we save in alive mode.
|
||||||
if ( !m_aListSource.isEmpty()
|
if ( !m_aListSource.isEmpty()
|
||||||
&& !hasExternalListSource()
|
&& !hasExternalListSource()
|
||||||
)
|
)
|
||||||
@@ -468,7 +468,7 @@ void SAL_CALL OComboBoxModel::read(const Reference<stario::XObjectInputStream>&
|
|||||||
if (nVersion > 0x0005)
|
if (nVersion > 0x0005)
|
||||||
readCommonProperties(_rxInStream);
|
readCommonProperties(_rxInStream);
|
||||||
|
|
||||||
// Nach dem Lesen die Defaultwerte anzeigen
|
// After reading in, display the default values
|
||||||
if ( !getControlSource().isEmpty() )
|
if ( !getControlSource().isEmpty() )
|
||||||
{
|
{
|
||||||
// (not if we don't have a control source - the "State" property acts like it is persistent, then
|
// (not if we don't have a control source - the "State" property acts like it is persistent, then
|
||||||
@@ -485,7 +485,7 @@ void OComboBoxModel::loadData( bool _bForce )
|
|||||||
if ( hasExternalListSource() )
|
if ( hasExternalListSource() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Connection holen
|
// Get Connection
|
||||||
Reference<XRowSet> xForm(m_xCursor, UNO_QUERY);
|
Reference<XRowSet> xForm(m_xCursor, UNO_QUERY);
|
||||||
if (!xForm.is())
|
if (!xForm.is())
|
||||||
return;
|
return;
|
||||||
@@ -625,7 +625,7 @@ void OComboBoxModel::loadData( bool _bForce )
|
|||||||
case ListSourceType_TABLE:
|
case ListSourceType_TABLE:
|
||||||
case ListSourceType_QUERY:
|
case ListSourceType_QUERY:
|
||||||
{
|
{
|
||||||
// die XDatabaseVAriant der ersten Spalte
|
// The XDatabaseVariant of the first column
|
||||||
Reference<XColumnsSupplier> xSupplyCols(xListCursor, UNO_QUERY);
|
Reference<XColumnsSupplier> xSupplyCols(xListCursor, UNO_QUERY);
|
||||||
DBG_ASSERT(xSupplyCols.is(), "OComboBoxModel::loadData : cursor supports the row set service but is no column supplier?!");
|
DBG_ASSERT(xSupplyCols.is(), "OComboBoxModel::loadData : cursor supports the row set service but is no column supplier?!");
|
||||||
Reference<XIndexAccess> xColumns;
|
Reference<XIndexAccess> xColumns;
|
||||||
@@ -642,10 +642,10 @@ void OComboBoxModel::loadData( bool _bForce )
|
|||||||
|
|
||||||
::dbtools::FormattedColumnValue aValueFormatter( getContext(), xForm, xDataField );
|
::dbtools::FormattedColumnValue aValueFormatter( getContext(), xForm, xDataField );
|
||||||
|
|
||||||
// Listen fuellen
|
// Fill Lists
|
||||||
sal_Int16 i = 0;
|
sal_Int16 i = 0;
|
||||||
// per definitionem the list cursor is positioned _before_ the first row at the moment
|
// At the moment by definition the list cursor is positioned _before_ the first row
|
||||||
while (xListCursor->next() && (i++<SHRT_MAX)) // max anzahl eintraege
|
while (xListCursor->next() && (i++<SHRT_MAX)) // Set max. count
|
||||||
{
|
{
|
||||||
aStringList.push_back( aValueFormatter.getFormattedValue() );
|
aStringList.push_back( aValueFormatter.getFormattedValue() );
|
||||||
}
|
}
|
||||||
@@ -681,13 +681,13 @@ void OComboBoxModel::loadData( bool _bForce )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// String-Sequence fuer ListBox erzeugen
|
// Create StringSequence for ListBox
|
||||||
StringSequence aStringSeq(aStringList.size());
|
StringSequence aStringSeq(aStringList.size());
|
||||||
::rtl::OUString* pStringAry = aStringSeq.getArray();
|
::rtl::OUString* pStringAry = aStringSeq.getArray();
|
||||||
for (sal_Int32 i = 0; i<aStringSeq.getLength(); ++i)
|
for (sal_Int32 i = 0; i<aStringSeq.getLength(); ++i)
|
||||||
pStringAry[i] = aStringList[i];
|
pStringAry[i] = aStringList[i];
|
||||||
|
|
||||||
// String-Sequence an ListBox setzen
|
// Set String-Sequence at ListBox
|
||||||
setFastPropertyValue( PROPERTY_ID_STRINGITEMLIST, makeAny( aStringSeq ) );
|
setFastPropertyValue( PROPERTY_ID_STRINGITEMLIST, makeAny( aStringSeq ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -699,7 +699,7 @@ void OComboBoxModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm
|
|||||||
m_pValueFormatter.reset( new ::dbtools::FormattedColumnValue( getContext(), Reference< XRowSet >( _rxForm, UNO_QUERY ), xField ) );
|
m_pValueFormatter.reset( new ::dbtools::FormattedColumnValue( getContext(), Reference< XRowSet >( _rxForm, UNO_QUERY ), xField ) );
|
||||||
getPropertyValue( PROPERTY_STRINGITEMLIST ) >>= m_aDesignModeStringItems;
|
getPropertyValue( PROPERTY_STRINGITEMLIST ) >>= m_aDesignModeStringItems;
|
||||||
|
|
||||||
// Daten nur laden, wenn eine Listenquelle angegeben wurde
|
// Only load data if a ListSource was supplied
|
||||||
if ( !m_aListSource.isEmpty() && m_xCursor.is() && !hasExternalListSource() )
|
if ( !m_aListSource.isEmpty() && m_xCursor.is() && !hasExternalListSource() )
|
||||||
loadData( false );
|
loadData( false );
|
||||||
}
|
}
|
||||||
|
@@ -73,8 +73,8 @@ class OComboBoxModel
|
|||||||
|
|
||||||
::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter> m_xFormatter;
|
::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter> m_xFormatter;
|
||||||
|
|
||||||
::com::sun::star::form::ListSourceType m_eListSourceType; // type der list source
|
::com::sun::star::form::ListSourceType m_eListSourceType; // ListSource's type
|
||||||
sal_Bool m_bEmptyIsNull; // LeerString wird als NULL interpretiert
|
sal_Bool m_bEmptyIsNull; // Empty string is interpreted as NULL
|
||||||
|
|
||||||
::std::auto_ptr< ::dbtools::FormattedColumnValue >
|
::std::auto_ptr< ::dbtools::FormattedColumnValue >
|
||||||
m_pValueFormatter;
|
m_pValueFormatter;
|
||||||
|
@@ -206,12 +206,12 @@ void OEditControl::keyPressed(const ::com::sun::star::awt::KeyEvent& e) throw (
|
|||||||
if( e.KeyCode != KEY_RETURN || e.Modifiers != 0 )
|
if( e.KeyCode != KEY_RETURN || e.Modifiers != 0 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Steht das Control in einem Formular mit einer Submit-URL?
|
// Is the Control in a form with a submit URL?
|
||||||
Reference<XPropertySet> xSet(getModel(), UNO_QUERY);
|
Reference<XPropertySet> xSet(getModel(), UNO_QUERY);
|
||||||
if( !xSet.is() )
|
if( !xSet.is() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// nicht fuer multiline edits
|
// Not for multiline edits
|
||||||
Any aTmp( xSet->getPropertyValue(PROPERTY_MULTILINE));
|
Any aTmp( xSet->getPropertyValue(PROPERTY_MULTILINE));
|
||||||
if ((aTmp.getValueType().equals(::getBooleanCppuType())) && getBOOL(aTmp))
|
if ((aTmp.getValueType().equals(::getBooleanCppuType())) && getBOOL(aTmp))
|
||||||
return;
|
return;
|
||||||
@@ -244,14 +244,14 @@ void OEditControl::keyPressed(const ::com::sun::star::awt::KeyEvent& e) throw (
|
|||||||
if (hasProperty(PROPERTY_CLASSID, xFCSet) &&
|
if (hasProperty(PROPERTY_CLASSID, xFCSet) &&
|
||||||
getINT16(xFCSet->getPropertyValue(PROPERTY_CLASSID)) == FormComponentType::TEXTFIELD)
|
getINT16(xFCSet->getPropertyValue(PROPERTY_CLASSID)) == FormComponentType::TEXTFIELD)
|
||||||
{
|
{
|
||||||
// Noch ein weiteres Edit gefunden ==> dann nicht submitten
|
// Found another Edit -> then do not submit!
|
||||||
if (xFCSet != xSet)
|
if (xFCSet != xSet)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Da wir noch im Haender stehen, submit asynchron ausloesen
|
// Because we're still in the header, trigger submit asynchronously
|
||||||
if( m_nKeyEvent )
|
if( m_nKeyEvent )
|
||||||
Application::RemoveUserEvent( m_nKeyEvent );
|
Application::RemoveUserEvent( m_nKeyEvent );
|
||||||
m_nKeyEvent = Application::PostUserEvent( LINK(this, OEditControl,OnKeyPressed) );
|
m_nKeyEvent = Application::PostUserEvent( LINK(this, OEditControl,OnKeyPressed) );
|
||||||
@@ -556,9 +556,9 @@ void OEditModel::write(const Reference<XObjectOutputStream>& _rxOutStream) throw
|
|||||||
{
|
{
|
||||||
Any aCurrentText;
|
Any aCurrentText;
|
||||||
sal_Int16 nOldTextLen = 0;
|
sal_Int16 nOldTextLen = 0;
|
||||||
// bin ich gerade loaded und habe dazu zeitweilig die MaxTextLen umgesetzt ?
|
// Am I loaded at the moment and did I switch MaxTextLen temporarily?
|
||||||
if ( m_bMaxTextLenModified )
|
if ( m_bMaxTextLenModified )
|
||||||
{ // -> fuer die Dauer des Speicherns meinem aggregierten Model die alte TextLen einreden
|
{ // -> for the duration of saving, make my aggregated model believe the old TextLen
|
||||||
|
|
||||||
// before doing this we have to save the current text value of the aggregate, as this may be affected by resetting the text len
|
// before doing this we have to save the current text value of the aggregate, as this may be affected by resetting the text len
|
||||||
aCurrentText = m_xAggregateSet->getPropertyValue(PROPERTY_TEXT);
|
aCurrentText = m_xAggregateSet->getPropertyValue(PROPERTY_TEXT);
|
||||||
@@ -570,7 +570,7 @@ void OEditModel::write(const Reference<XObjectOutputStream>& _rxOutStream) throw
|
|||||||
OEditBaseModel::write(_rxOutStream);
|
OEditBaseModel::write(_rxOutStream);
|
||||||
|
|
||||||
if ( m_bMaxTextLenModified )
|
if ( m_bMaxTextLenModified )
|
||||||
{ // wieder zuruecksetzen
|
{ // Reset again
|
||||||
m_xAggregateSet->setPropertyValue(PROPERTY_MAXTEXTLEN, makeAny(nOldTextLen));
|
m_xAggregateSet->setPropertyValue(PROPERTY_MAXTEXTLEN, makeAny(nOldTextLen));
|
||||||
// and reset the text
|
// and reset the text
|
||||||
// First we set it to an empty string : Without this the second setPropertyValue would not do anything as it thinks
|
// First we set it to an empty string : Without this the second setPropertyValue would not do anything as it thinks
|
||||||
@@ -655,7 +655,7 @@ void OEditModel::onDisconnectedDbColumn()
|
|||||||
if ( hasField() && m_bMaxTextLenModified )
|
if ( hasField() && m_bMaxTextLenModified )
|
||||||
{
|
{
|
||||||
Any aVal;
|
Any aVal;
|
||||||
aVal <<= (sal_Int16)0; // nur wenn es 0 war, habe ich es in onConnectedDbColumn umgesetzt
|
aVal <<= (sal_Int16)0; // Only if it was 0, I switched it in onConnectedDbColumn
|
||||||
m_xAggregateSet->setPropertyValue(PROPERTY_MAXTEXTLEN, aVal);
|
m_xAggregateSet->setPropertyValue(PROPERTY_MAXTEXTLEN, aVal);
|
||||||
m_bMaxTextLenModified = sal_False;
|
m_bMaxTextLenModified = sal_False;
|
||||||
}
|
}
|
||||||
@@ -664,7 +664,7 @@ void OEditModel::onDisconnectedDbColumn()
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
sal_Bool OEditModel::approveDbColumnType( sal_Int32 _nColumnType )
|
sal_Bool OEditModel::approveDbColumnType( sal_Int32 _nColumnType )
|
||||||
{
|
{
|
||||||
// if we act as rich text curently, we do not allow binding to a database column
|
// if we act as rich text currently, we do not allow binding to a database column
|
||||||
if ( implActsAsRichText() )
|
if ( implActsAsRichText() )
|
||||||
return sal_False;
|
return sal_False;
|
||||||
|
|
||||||
|
@@ -105,14 +105,14 @@ void OEditBaseModel::write(const Reference<XObjectOutputStream>& _rxOutStream) t
|
|||||||
_rxOutStream->writeShort(0); // obsolete
|
_rxOutStream->writeShort(0); // obsolete
|
||||||
_rxOutStream << m_aDefaultText;
|
_rxOutStream << m_aDefaultText;
|
||||||
|
|
||||||
// Maskierung fuer any
|
// Masking for any
|
||||||
sal_uInt16 nAnyMask = 0;
|
sal_uInt16 nAnyMask = 0;
|
||||||
if (m_aDefault.getValueType().getTypeClass() == TypeClass_LONG)
|
if (m_aDefault.getValueType().getTypeClass() == TypeClass_LONG)
|
||||||
nAnyMask |= DEFAULT_LONG;
|
nAnyMask |= DEFAULT_LONG;
|
||||||
else if (m_aDefault.getValueType().getTypeClass() == TypeClass_DOUBLE)
|
else if (m_aDefault.getValueType().getTypeClass() == TypeClass_DOUBLE)
|
||||||
nAnyMask |= DEFAULT_DOUBLE;
|
nAnyMask |= DEFAULT_DOUBLE;
|
||||||
|
|
||||||
if (m_bFilterProposal) // da boolean, kein Wert speichern
|
if (m_bFilterProposal) // Don't save a value, because it's boolean
|
||||||
nAnyMask |= FILTERPROPOSAL;
|
nAnyMask |= FILTERPROPOSAL;
|
||||||
|
|
||||||
_rxOutStream->writeBoolean(m_bEmptyIsNull);
|
_rxOutStream->writeBoolean(m_bEmptyIsNull);
|
||||||
@@ -151,7 +151,7 @@ void OEditBaseModel::read(const Reference<XObjectInputStream>& _rxInStream) thro
|
|||||||
OBoundControlModel::read(_rxInStream);
|
OBoundControlModel::read(_rxInStream);
|
||||||
::osl::MutexGuard aGuard(m_aMutex);
|
::osl::MutexGuard aGuard(m_aMutex);
|
||||||
|
|
||||||
// Version eigene Versionsnummer
|
// Version's own version number
|
||||||
sal_uInt16 nVersion = _rxInStream->readShort();
|
sal_uInt16 nVersion = _rxInStream->readShort();
|
||||||
m_nLastReadVersion = nVersion;
|
m_nLastReadVersion = nVersion;
|
||||||
|
|
||||||
@@ -189,7 +189,7 @@ void OEditBaseModel::read(const Reference<XObjectInputStream>& _rxInStream) thro
|
|||||||
if (bHandleCommonProps)
|
if (bHandleCommonProps)
|
||||||
readCommonEditProperties(_rxInStream);
|
readCommonEditProperties(_rxInStream);
|
||||||
|
|
||||||
// Nach dem Lesen die Defaultwerte anzeigen
|
// After reading, display default values
|
||||||
if ( !getControlSource().isEmpty() )
|
if ( !getControlSource().isEmpty() )
|
||||||
// (not if we don't have a control source - the "State" property acts like it is persistent, then)
|
// (not if we don't have a control source - the "State" property acts like it is persistent, then)
|
||||||
resetNoBroadcast();
|
resetNoBroadcast();
|
||||||
@@ -316,7 +316,7 @@ void OEditBaseModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const
|
|||||||
DBG_ASSERT(rValue.getValueType().getTypeClass() == TypeClass_BOOLEAN, "invalid type" );
|
DBG_ASSERT(rValue.getValueType().getTypeClass() == TypeClass_BOOLEAN, "invalid type" );
|
||||||
m_bFilterProposal = getBOOL(rValue);
|
m_bFilterProposal = getBOOL(rValue);
|
||||||
break;
|
break;
|
||||||
// Aenderung der defaultwerte fuehrt zu reset
|
// Changing the default values causes a reset
|
||||||
case PROPERTY_ID_DEFAULT_TEXT:
|
case PROPERTY_ID_DEFAULT_TEXT:
|
||||||
DBG_ASSERT(rValue.getValueType().getTypeClass() == TypeClass_STRING, "invalid type" );
|
DBG_ASSERT(rValue.getValueType().getTypeClass() == TypeClass_STRING, "invalid type" );
|
||||||
rValue >>= m_aDefaultText;
|
rValue >>= m_aDefaultText;
|
||||||
@@ -333,7 +333,7 @@ void OEditBaseModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//XPropertyState
|
// XPropertyState
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
Any OEditBaseModel::getPropertyDefaultByHandle( sal_Int32 nHandle ) const
|
Any OEditBaseModel::getPropertyDefaultByHandle( sal_Int32 nHandle ) const
|
||||||
{
|
{
|
||||||
|
@@ -66,7 +66,7 @@ class OEditBaseModel : public OBoundControlModel
|
|||||||
sal_Int16 m_nLastReadVersion;
|
sal_Int16 m_nLastReadVersion;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// [properties] fuer all Editierfelder
|
// [properties] for all EditingFields
|
||||||
::com::sun::star::uno::Any m_aDefault;
|
::com::sun::star::uno::Any m_aDefault;
|
||||||
::rtl::OUString m_aDefaultText; // default value
|
::rtl::OUString m_aDefaultText; // default value
|
||||||
sal_Bool m_bEmptyIsNull : 1; // empty string will be interepreted as NULL when committing
|
sal_Bool m_bEmptyIsNull : 1; // empty string will be interepreted as NULL when committing
|
||||||
|
@@ -46,13 +46,13 @@ OComponentEventThread::OComponentEventThread( ::cppu::OComponentHelper* pCompImp
|
|||||||
|
|
||||||
increment(m_refCount);
|
increment(m_refCount);
|
||||||
|
|
||||||
// Eine Referenz des Controls halten
|
// Hold a reference of the Control
|
||||||
{
|
{
|
||||||
InterfaceRef xIFace(static_cast<XWeak*>(pCompImpl));
|
InterfaceRef xIFace(static_cast<XWeak*>(pCompImpl));
|
||||||
query_interface(xIFace, m_xComp);
|
query_interface(xIFace, m_xComp);
|
||||||
}
|
}
|
||||||
|
|
||||||
// und uns an dem Control anmelden
|
// and add us at the Control
|
||||||
{
|
{
|
||||||
Reference<XEventListener> xEvtLstnr = static_cast<XEventListener*>(this);
|
Reference<XEventListener> xEvtLstnr = static_cast<XEventListener*>(this);
|
||||||
m_xComp->addEventListener( xEvtLstnr );
|
m_xComp->addEventListener( xEvtLstnr );
|
||||||
@@ -66,7 +66,7 @@ OComponentEventThread::~OComponentEventThread()
|
|||||||
DBG_DTOR( OComponentEventThread, NULL );
|
DBG_DTOR( OComponentEventThread, NULL );
|
||||||
|
|
||||||
DBG_ASSERT( m_aEvents.empty(),
|
DBG_ASSERT( m_aEvents.empty(),
|
||||||
"OComponentEventThread::~OComponentEventThread: Kein dispose gerufen?" );
|
"OComponentEventThread::~OComponentEventThread: Didn't call dispose?" );
|
||||||
|
|
||||||
impl_clearEventQueue();
|
impl_clearEventQueue();
|
||||||
}
|
}
|
||||||
@@ -102,19 +102,19 @@ void OComponentEventThread::disposing( const EventObject& evt ) throw ( ::com::s
|
|||||||
{
|
{
|
||||||
::osl::MutexGuard aGuard( m_aMutex );
|
::osl::MutexGuard aGuard( m_aMutex );
|
||||||
|
|
||||||
// Event-Listener abmelden
|
// Remove EventListener
|
||||||
Reference<XEventListener> xEvtLstnr = static_cast<XEventListener*>(this);
|
Reference<XEventListener> xEvtLstnr = static_cast<XEventListener*>(this);
|
||||||
m_xComp->removeEventListener( xEvtLstnr );
|
m_xComp->removeEventListener( xEvtLstnr );
|
||||||
|
|
||||||
// Event-Queue loeschen
|
// Clear EventQueue
|
||||||
impl_clearEventQueue();
|
impl_clearEventQueue();
|
||||||
|
|
||||||
// Das Control loslassen und pCompImpl auf 0 setzen, damit der
|
// Free the Control and set pCompImpl to 0,
|
||||||
// Thread weiss, dass er sich beenden soll.
|
// so that the thread knows, that it should terminate.
|
||||||
m_xComp = 0;
|
m_xComp = 0;
|
||||||
m_pCompImpl = 0;
|
m_pCompImpl = 0;
|
||||||
|
|
||||||
// Den Thread aufwecken und beenden.
|
// Wake up the thread and terminate
|
||||||
m_aCond.set();
|
m_aCond.set();
|
||||||
terminate();
|
terminate();
|
||||||
}
|
}
|
||||||
@@ -132,7 +132,7 @@ void OComponentEventThread::addEvent( const EventObject* _pEvt,
|
|||||||
{
|
{
|
||||||
::osl::MutexGuard aGuard( m_aMutex );
|
::osl::MutexGuard aGuard( m_aMutex );
|
||||||
|
|
||||||
// Daten in die Queue stellen
|
// Put data into the queue
|
||||||
m_aEvents.push_back( cloneEvent( _pEvt ) );
|
m_aEvents.push_back( cloneEvent( _pEvt ) );
|
||||||
|
|
||||||
Reference<XWeak> xWeakControl(rControl, UNO_QUERY);
|
Reference<XWeak> xWeakControl(rControl, UNO_QUERY);
|
||||||
@@ -141,7 +141,7 @@ void OComponentEventThread::addEvent( const EventObject* _pEvt,
|
|||||||
|
|
||||||
m_aFlags.push_back( bFlag );
|
m_aFlags.push_back( bFlag );
|
||||||
|
|
||||||
// Thread aufwecken
|
// Wake up thread
|
||||||
m_aCond.set();
|
m_aCond.set();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -174,8 +174,7 @@ void OComponentEventThread::run()
|
|||||||
{
|
{
|
||||||
implStarted( );
|
implStarted( );
|
||||||
|
|
||||||
// uns selbst festhalten, damit wir nicht geloescht werden,
|
// Hold on to ourselves, so that we're not deleted if a dispose is called at some point in time
|
||||||
// wenn zwischendrinne mal ein dispose gerufen wird.
|
|
||||||
InterfaceRef xThis(static_cast<XWeak*>(this));
|
InterfaceRef xThis(static_cast<XWeak*>(this));
|
||||||
|
|
||||||
do
|
do
|
||||||
@@ -184,8 +183,7 @@ void OComponentEventThread::run()
|
|||||||
|
|
||||||
while( m_aEvents.size() > 0 )
|
while( m_aEvents.size() > 0 )
|
||||||
{
|
{
|
||||||
// Das Control holen und festhalten, damit es waehrend des
|
// Get the Control and hold on to it so that it cannot be deleted during actionPerformed
|
||||||
// actionPerformed nicht geloescht werden kann.
|
|
||||||
Reference<XComponent> xComp = m_xComp;
|
Reference<XComponent> xComp = m_xComp;
|
||||||
::cppu::OComponentHelper *pCompImpl = m_pCompImpl;
|
::cppu::OComponentHelper *pCompImpl = m_pCompImpl;
|
||||||
|
|
||||||
@@ -203,8 +201,8 @@ void OComponentEventThread::run()
|
|||||||
|
|
||||||
{
|
{
|
||||||
MutexRelease aReleaseOnce(m_aMutex);
|
MutexRelease aReleaseOnce(m_aMutex);
|
||||||
// Weil ein queryHardRef eine Exception schmeissen kann sollte
|
// Because a queryHardRef can throw an Exception, it shoudln't be called when
|
||||||
// es nicht bei gelocktem Mutex aufgerufen werden.
|
// the mutex is locked.
|
||||||
Reference<XControl> xControl;
|
Reference<XControl> xControl;
|
||||||
if ( xControlAdapter.is() )
|
if ( xControlAdapter.is() )
|
||||||
query_interface(xControlAdapter->queryAdapted(), xControl);
|
query_interface(xControlAdapter->queryAdapted(), xControl);
|
||||||
@@ -216,17 +214,16 @@ void OComponentEventThread::run()
|
|||||||
delete pEvt;
|
delete pEvt;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Nach einem dispose kennen wir das Control nicht mehr. Dann darf
|
// After a Dispose, we do not know the Control anymore.
|
||||||
// auch nicht gewartet werden.
|
// Thus, we must not wait either.
|
||||||
if( !m_xComp.is() )
|
if( !m_xComp.is() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Warte-Bedingung zuruecksetzen
|
// Reset waiting condition
|
||||||
m_aCond.reset();
|
m_aCond.reset();
|
||||||
{
|
{
|
||||||
MutexRelease aReleaseOnce(m_aMutex);
|
MutexRelease aReleaseOnce(m_aMutex);
|
||||||
// und warten ... falls nicht zwischenzeitlich doch noch ein
|
// And wait ... if, in the meantime, an Event came in after all
|
||||||
// Event eingetroffen ist.
|
|
||||||
m_aCond.wait();
|
m_aCond.wait();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -61,13 +61,13 @@ class OComponentEventThread
|
|||||||
DECLARE_STL_VECTOR(sal_Bool, ThreadBools);
|
DECLARE_STL_VECTOR(sal_Bool, ThreadBools);
|
||||||
|
|
||||||
::osl::Mutex m_aMutex;
|
::osl::Mutex m_aMutex;
|
||||||
::osl::Condition m_aCond; // Queue gefuellt?
|
::osl::Condition m_aCond; // Queue filled?
|
||||||
ThreadEvents m_aEvents; // Event-Queue
|
ThreadEvents m_aEvents; // EventQueue
|
||||||
ThreadObjects m_aControls; // Control fuer Submit
|
ThreadObjects m_aControls; // Control for Submit
|
||||||
ThreadBools m_aFlags; // Flags fuer Submit/Reset
|
ThreadBools m_aFlags; // Flags for Submit/Reset
|
||||||
|
|
||||||
::cppu::OComponentHelper* m_pCompImpl; // Implementierung des Controls
|
::cppu::OComponentHelper* m_pCompImpl; // Implementation of the Control
|
||||||
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent> m_xComp; // ::com::sun::star::lang::XComponent des Controls
|
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent> m_xComp; // ::com::sun::star::lang::XComponent of the Control
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
@@ -77,16 +77,14 @@ protected:
|
|||||||
virtual void SAL_CALL kill();
|
virtual void SAL_CALL kill();
|
||||||
virtual void SAL_CALL onTerminated();
|
virtual void SAL_CALL onTerminated();
|
||||||
|
|
||||||
// Die folgende Methode wird gerufen um das Event unter Beruecksichtigung
|
// The following method is called to duplicate the Event while respecting it's type.
|
||||||
// seines Typs zu duplizieren.
|
|
||||||
virtual ::com::sun::star::lang::EventObject* cloneEvent(const ::com::sun::star::lang::EventObject* _pEvt) const = 0;
|
virtual ::com::sun::star::lang::EventObject* cloneEvent(const ::com::sun::star::lang::EventObject* _pEvt) const = 0;
|
||||||
|
|
||||||
// Ein Event bearbeiten. Der Mutex ist dabei nicht gelockt, pCompImpl
|
// Edit an Event:
|
||||||
// bleibt aber in jedem Fall gueltig. Bei pEvt kann es sich auch um
|
// The mutex is not locked, but pCompImpl stays valid in any case.
|
||||||
// einen abgeleiteten Typ handeln, naemlich den, den cloneEvent
|
// pEvt can be a derrived type, namely the one that cloneEvent returns.
|
||||||
// zurueckgibt. rControl ist nur gesetzt, wenn beim addEvent ein
|
// rControl is only set, if a Control has been passed in addEvent.
|
||||||
// Control uebergeben wurde. Da das Control nur als WeakRef gehalten
|
// Because the Control is only held as a WeakRef, it can disappear in the meantime.
|
||||||
// wird kann es auch zwischenzeitlich verschwinden.
|
|
||||||
virtual void processEvent( ::cppu::OComponentHelper* _pCompImpl,
|
virtual void processEvent( ::cppu::OComponentHelper* _pCompImpl,
|
||||||
const ::com::sun::star::lang::EventObject* _pEvt,
|
const ::com::sun::star::lang::EventObject* _pEvt,
|
||||||
const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& _rControl,
|
const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>& _rControl,
|
||||||
|
Reference in New Issue
Block a user