summaryrefslogtreecommitdiff
path: root/forms/source
diff options
context:
space:
mode:
authorPhilipp Weissenbacher <p.weissenbacher@gmail.com>2014-09-24 11:43:17 +0200
committerCaolán McNamara <caolanm@redhat.com>2014-09-25 08:49:03 +0000
commit0f8ed329131573289c98b8339f53e57abf67967d (patch)
treed27554e6db953ab7332acae8815671c11335b2e4 /forms/source
parent0af1c09b3ad23790d9992ec329a2c3f28b820050 (diff)
fdo#39468 Translate German comments, clean some ws
Conflicts: forms/source/component/FormComponent.cxx forms/source/component/FormattedField.cxx Change-Id: I76dacfff3aa6f5680a1e81c97281c4f744ec1ceb Reviewed-on: https://gerrit.libreoffice.org/11622 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'forms/source')
-rw-r--r--forms/source/component/FormComponent.cxx6
-rw-r--r--forms/source/component/FormattedField.cxx67
-rw-r--r--forms/source/component/FormattedField.hxx2
-rw-r--r--forms/source/component/FormattedFieldWrapper.hxx2
-rw-r--r--forms/source/component/FormsCollection.hxx12
-rw-r--r--forms/source/component/Grid.hxx16
-rw-r--r--forms/source/component/GroupBox.cxx1
-rw-r--r--forms/source/component/GroupBox.hxx2
-rw-r--r--forms/source/component/GroupManager.cxx35
-rw-r--r--forms/source/component/GroupManager.hxx34
-rw-r--r--forms/source/component/Hidden.cxx2
-rw-r--r--forms/source/component/ImageButton.cxx10
-rw-r--r--forms/source/component/ImageButton.hxx4
13 files changed, 92 insertions, 101 deletions
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index e8547ac72311..996e1b6580e0 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -154,7 +154,7 @@ void OControl::doSetDelegator()
decrement( m_refCount );
}
-// UNO Anbindung
+// UNO Binding
Any SAL_CALL OControl::queryAggregation( const Type& _rType ) throw(RuntimeException, std::exception)
{
// ask the base class
@@ -758,13 +758,13 @@ void SAL_CALL OControlModel::write(const Reference<css::io::XObjectOutputStream>
xMark->jumpToFurthest();
xMark->deleteMark(nMark);
- // 2. wrting a version number
+ // 2. writing a version number
_rxOutStream->writeShort(0x0003);
// 3. writing the general properties
::comphelper::operator<<( _rxOutStream, m_aName);
_rxOutStream->writeShort(m_nTabIndex);
- ::comphelper::operator<<( _rxOutStream, m_aTag); // 3. version
+ ::comphelper::operator<<( _rxOutStream, m_aTag); // 3rd version
// IMPORTANT NOTE!
// don't write any new members here: this wouldn't be compatible with older versions, as OControlModel
diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx
index 30d72fc32502..6ed72744f167 100644
--- a/forms/source/component/FormattedField.cxx
+++ b/forms/source/component/FormattedField.cxx
@@ -196,7 +196,7 @@ void OFormattedControl::keyPressed(const ::com::sun::star::awt::KeyEvent& e) thr
{
if( e.KeyCode != KEY_RETURN || e.Modifiers != 0 )
return;
- // Is the control on a form with a submit URL?
+ // Is the control located in a form with a Submit URL?
Reference<com::sun::star::beans::XPropertySet> xSet(getModel(), UNO_QUERY);
if( !xSet.is() )
return;
@@ -223,13 +223,13 @@ void OFormattedControl::keyPressed(const ::com::sun::star::awt::KeyEvent& e) thr
if (hasProperty(PROPERTY_CLASSID, xFCSet) &&
getINT16(xFCSet->getPropertyValue(PROPERTY_CLASSID)) == FormComponentType::TEXTFIELD)
{
- // Found another edit ==> no submit
+ // Found another Edit -> Do not submit then
if (xFCSet != xSet)
return;
}
}
}
- // Still in the handler, trigger submit asynchronous
+ // Because we're still in the Handler, execute submit asynchronously
if( m_nKeyEvent )
Application::RemoveUserEvent( m_nKeyEvent );
m_nKeyEvent = Application::PostUserEvent( LINK(this, OFormattedControl,
@@ -283,7 +283,7 @@ void OFormattedModel::implConstruct()
}
OFormattedModel::OFormattedModel(const Reference<XComponentContext>& _rxFactory)
:OEditBaseModel(_rxFactory, VCL_CONTROLMODEL_FORMATTEDFIELD, FRM_SUN_CONTROL_FORMATTEDFIELD, true, true )
- // use the old control name for compytibility reasons
+ // use the old control name for compytibility reasons
,OErrorBroadcaster( OComponentHelper::rBHelper )
{
implConstruct();
@@ -363,17 +363,17 @@ void OFormattedModel::describeFixedProperties( Sequence< Property >& _rProps ) c
void OFormattedModel::describeAggregateProperties( Sequence< Property >& _rAggregateProps ) const
{
OEditBaseModel::describeAggregateProperties( _rAggregateProps );
- // TreatAsNumeric not transient : we want to bind it to the UI (necessary, because EffectiveDefault
- // - could be text or numbers - for making sense)
+ // TreatAsNumeric is not transient: we want to attach it to the UI
+ // This is necessary to make EffectiveDefault (which may be text or a number) meaningful
ModifyPropertyAttributes(_rAggregateProps, PROPERTY_TREATASNUMERIC, 0, PropertyAttribute::TRANSIENT);
- // same for FormatKey
+ // Same for FormatKey
// (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
+ // 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
@@ -492,7 +492,7 @@ Reference< XNumberFormatsSupplier > OFormattedModel::calcFormatsSupplier() const
{
Reference<XNumberFormatsSupplier> xSupplier;
DBG_ASSERT(m_xAggregateSet.is(), "OFormattedModel::calcFormatsSupplier : have no aggregate !");
- // check if my aggregated model has a FormatSupplier
+ // Does my aggregate model have a FormatSupplier?
if( m_xAggregateSet.is() )
m_xAggregateSet->getPropertyValue(PROPERTY_FORMATSSUPPLIER) >>= xSupplier;
if (!xSupplier.is())
@@ -501,7 +501,7 @@ Reference< XNumberFormatsSupplier > OFormattedModel::calcFormatsSupplier() const
if (!xSupplier.is())
xSupplier = calcDefaultFormatsSupplier();
DBG_ASSERT(xSupplier.is(), "OFormattedModel::calcFormatsSupplier : no supplier !");
- // now it should be there
+ // We should have one by now
return xSupplier;
}
@@ -509,9 +509,9 @@ Reference<XNumberFormatsSupplier> OFormattedModel::calcFormFormatsSupplier() co
{
Reference<XChild> xMe;
query_interface(static_cast<XWeak*>(const_cast<OFormattedModel*>(this)), xMe);
- // now we are sure, in case of an aggregation, to get the right object
+ // By this we make sure that we get the right object even when aggregating
DBG_ASSERT(xMe.is(), "OFormattedModel::calcFormFormatsSupplier : I should have a content interface !");
- // expand to the top, till we get to an initial form (starting with my own parent)
+ // Iterate through until we reach a StartForm (starting with an own Parent)
Reference<XChild> xParent(xMe->getParent(), UNO_QUERY);
Reference<XForm> xNextParentForm(xParent, UNO_QUERY);
while (!xNextParentForm.is() && xParent.is())
@@ -524,7 +524,7 @@ Reference<XNumberFormatsSupplier> OFormattedModel::calcFormFormatsSupplier() co
OSL_FAIL("OFormattedModel::calcFormFormatsSupplier : have no ancestor which is a form !");
return NULL;
}
- // the FormatSupplier of my ancestor (if he owns one)
+ // The FormatSupplier of my ancestor (if it has one)
Reference< XRowSet > xRowSet( xNextParentForm, UNO_QUERY );
Reference< XNumberFormatsSupplier > xSupplier;
if (xRowSet.is())
@@ -540,7 +540,7 @@ Reference< XNumberFormatsSupplier > OFormattedModel::calcDefaultFormatsSupplier(
// XBoundComponent
void OFormattedModel::loaded(const EventObject& rEvent) throw ( ::com::sun::star::uno::RuntimeException, std::exception)
{
- // HACK : our onConnectedDbColumn accesses our NumberFormatter which locks the solar mutex (as it doesn't have
+ // HACK: our onConnectedDbColumn accesses our NumberFormatter which locks the solar mutex (as it doesn't have
// an own one). To prevent deadlocks with other threads which may request a property from us in an
// UI-triggered action (e.g. an tooltip) we lock the solar mutex _here_ before our base class locks
// it's own muext (which is used for property requests)
@@ -566,7 +566,7 @@ void OFormattedModel::onConnectedDbColumn( const Reference< XInterface >& _rxFor
{ // 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 !" );
- // this should already be initiated and correctly set by the constructor or the read function
+ // This should've been set to the correct value in the ctor or in the read
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
@@ -598,7 +598,7 @@ void OFormattedModel::onConnectedDbColumn( const Reference< XInterface >& _rxFor
aSupplier >>= m_xOriginalFormatter;
m_xAggregateSet->setPropertyValue(PROPERTY_FORMATSSUPPLIER, makeAny(xSupplier));
m_xAggregateSet->setPropertyValue(PROPERTY_FORMATKEY, aFmtKey);
- // adapt the numeric-flag to my bound field
+ // Adapt the NumericFalg to my bound field
if (xField.is())
{
m_bNumeric = false;
@@ -640,7 +640,7 @@ void OFormattedModel::onDisconnectedDbColumn()
{
OEditBaseModel::onDisconnectedDbColumn();
if (m_xOriginalFormatter.is())
- { // the aggregated model has no format information
+ { // Our aggregated model does not hold any Format information
m_xAggregateSet->setPropertyValue(PROPERTY_FORMATSSUPPLIER, makeAny(m_xOriginalFormatter));
m_xAggregateSet->setPropertyValue(PROPERTY_FORMATKEY, Any());
setPropertyValue(PROPERTY_TREATASNUMERIC, makeAny(m_bOriginalNumeric));
@@ -656,8 +656,9 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
OEditBaseModel::write(_rxOutStream);
_rxOutStream->writeShort(0x0003);
DBG_ASSERT(m_xAggregateSet.is(), "OFormattedModel::write : have no aggregate !");
- // take my format (possibly void) into a persistent format (the supplier together with the key
- // would also be persistent, but saving the whole supplier would be overhead)
+ // Bring my Format (may be void) to a persistent Format.
+ // The Supplier together with the Key is already persistent, but that doesn't mean
+ // we have to save the Supplier (which would be quite some overhead)
Reference<XNumberFormatsSupplier> xSupplier;
Any aFmtKey;
bool bVoidKey = true;
@@ -670,12 +671,12 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
}
aFmtKey = m_xAggregateSet->getPropertyValue(PROPERTY_FORMATKEY);
bVoidKey = (!xSupplier.is() || !aFmtKey.hasValue()) || (isLoaded() && m_xOriginalFormatter.is());
- // (no formatter and/or key) or (loaded and fakes formatter)
+ // (no Format and/or Key) OR (loaded and faked Formatter)
}
_rxOutStream->writeBoolean(!bVoidKey);
if (!bVoidKey)
{
- // build persistent data with the FormatKey and the formatter
+ // Create persistent values from the FormatKey and the Formatter
Any aKey = m_xAggregateSet->getPropertyValue(PROPERTY_FORMATKEY);
sal_Int32 nKey = aKey.hasValue() ? getINT32(aKey) : 0;
Reference<XNumberFormats> xFormats = xSupplier->getNumberFormats();
@@ -702,8 +703,8 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
// 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.
+ // 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
{
@@ -711,7 +712,7 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
// a sub version within the skippable block
_rxOutStream->writeShort(0x0000);
// version 0: the effective value of the aggregate
- Any aEffectiveValue;
+ Any aEffectiveValue;
if (m_xAggregateSet.is())
{
try { aEffectiveValue = m_xAggregateSet->getPropertyValue(PROPERTY_EFFECTIVE_VALUE); } catch(const Exception&) { }
@@ -757,7 +758,7 @@ void OFormattedModel::read(const Reference<XObjectInputStream>& _rxInStream) thr
LanguageType eDescriptionLanguage = (LanguageType)_rxInStream->readLong();
// and let a formatter roll dice based on that to create a key...
xSupplier = calcFormatsSupplier();
- // calcFormatsSupplier first takes the one from the model, then one from the starform, then a new one...
+ // 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())
{
@@ -953,9 +954,9 @@ Any OFormattedModel::translateControlValueToExternalValue( ) const
{
double fValue = 0;
OSL_VERIFY( aControlValue >>= fValue );
- // 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 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.
aExternalValue <<= fValue != 0.0;
}
break;
@@ -963,9 +964,9 @@ Any OFormattedModel::translateControlValueToExternalValue( ) const
{
double fValue = 0;
OSL_VERIFY( aControlValue >>= fValue );
- // 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 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( cppu::UnoType< UNODate >::get() ) )
{
aExternalValue <<= DBTypeConversion::toDate( fValue, m_aNullDate );
diff --git a/forms/source/component/FormattedField.hxx b/forms/source/component/FormattedField.hxx
index 7c9c261d0665..c4b047b8b6e3 100644
--- a/forms/source/component/FormattedField.hxx
+++ b/forms/source/component/FormattedField.hxx
@@ -44,7 +44,7 @@ class OFormattedModel
sal_Int32 m_nFieldType;
sal_Int16 m_nKeyType;
- bool m_bOriginalNumeric : 1,
+ bool m_bOriginalNumeric : 1,
m_bNumeric : 1; // analogous for the TreatAsNumeric-property
protected:
diff --git a/forms/source/component/FormattedFieldWrapper.hxx b/forms/source/component/FormattedFieldWrapper.hxx
index 1315d4f8a2f6..1ea2290bc940 100644
--- a/forms/source/component/FormattedFieldWrapper.hxx
+++ b/forms/source/component/FormattedFieldWrapper.hxx
@@ -46,7 +46,7 @@ protected:
::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation> m_xAggregate;
rtl::Reference< OEditModel > m_pEditPart;
- // if we act as formatted this is used to write the EditModel part
+ // if we act as formatted this is used to write the EditModel part
::com::sun::star::uno::Reference< ::com::sun::star::io::XPersistObject> m_xFormattedPart;
// if we act as formatted, this is the PersistObject interface of our aggregate, used
// to read and write the FormattedModel part
diff --git a/forms/source/component/FormsCollection.hxx b/forms/source/component/FormsCollection.hxx
index 39804179efb8..7344baad8987 100644
--- a/forms/source/component/FormsCollection.hxx
+++ b/forms/source/component/FormsCollection.hxx
@@ -31,26 +31,22 @@
namespace frm
{
-
-
// OFormsCollection
-// Implementiert den UNO-Container fuer Formulare
-// enthaelt alle zugeordneten Forms
-// dieses Container kann selbst den Context fuer Formulare darstellen
-// oder aussen einen Context uebergeben bekommen
+// Implements the UNO Container for Forms and contains all assigend Forms.
+// It can either represent the Context for Forms or be passed a Context.
typedef ::cppu::OComponentHelper FormsCollectionComponentBase;
typedef ::cppu::ImplHelper2< ::com::sun::star::form::XForms
,::com::sun::star::lang::XServiceInfo > OFormsCollection_BASE;
- // else MSVC kills itself on some statements
+// else MSVC kills itself on some statements
class OFormsCollection
:public FormsCollectionComponentBase
,public OInterfaceContainer
,public OFormsCollection_BASE
{
::osl::Mutex m_aMutex;
- ::comphelper::InterfaceRef m_xParent; // Parent
+ ::comphelper::InterfaceRef m_xParent; // Parent
public:
OFormsCollection(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory);
diff --git a/forms/source/component/Grid.hxx b/forms/source/component/Grid.hxx
index 3c03911a5e01..d48f8e19e2d3 100644
--- a/forms/source/component/Grid.hxx
+++ b/forms/source/component/Grid.hxx
@@ -43,7 +43,7 @@ class OGridColumn;
struct ColumnDescription : public ElementDescription
{
public:
- OGridColumn* pColumn; // not owned by this instance! only to prevent duplicate XUnoTunnel usage
+ OGridColumn* pColumn; // not owned by this instance! only to prevent duplicate XUnoTunnel usage
};
@@ -69,10 +69,10 @@ class OGridControlModel :public OControlModel
m_aRowSetChangeListeners;
// [properties]
- ::com::sun::star::uno::Any m_aRowHeight; // Zeilenhoehe
+ ::com::sun::star::uno::Any m_aRowHeight; // Row height
::com::sun::star::uno::Any m_aTabStop;
::com::sun::star::uno::Any m_aBackgroundColor;
- ::com::sun::star::uno::Any m_aCursorColor; // transient
+ ::com::sun::star::uno::Any m_aCursorColor; // transient
::com::sun::star::uno::Any m_aBorderColor;
OUString m_aDefaultControl;
OUString m_sHelpText;
@@ -81,10 +81,10 @@ class OGridControlModel :public OControlModel
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xSelection;
// [properties]
- OUString m_sHelpURL; // URL
- sal_Int16 m_nBorder;
- sal_Int16 m_nWritingMode;
- sal_Int16 m_nContextWritingMode;
+ OUString m_sHelpURL; // URL
+ sal_Int16 m_nBorder;
+ sal_Int16 m_nWritingMode;
+ sal_Int16 m_nContextWritingMode;
bool m_bEnableVisible : 1;
bool m_bEnable : 1;
bool m_bNavigation : 1;
@@ -100,7 +100,7 @@ protected:
public:
DECLARE_DEFAULT_LEAF_XTOR( OGridControlModel );
- // UNO Anbindung
+ // UNO Binding
DECLARE_UNO3_AGG_DEFAULTS(OGridControlModel, OControlModel)
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
diff --git a/forms/source/component/GroupBox.cxx b/forms/source/component/GroupBox.cxx
index 9e9b5961b691..b0e5109a35d0 100644
--- a/forms/source/component/GroupBox.cxx
+++ b/forms/source/component/GroupBox.cxx
@@ -116,7 +116,6 @@ void SAL_CALL OGroupBoxModel::read(const Reference< XObjectInputStream>& _rxInSt
// Version
sal_uInt16 nVersion = _rxInStream->readShort();
DBG_ASSERT(nVersion > 0, "OGroupBoxModel::read : version 0 ? this should never have been written !");
- // ups, ist das Englisch richtig ? ;)
if (nVersion == 2)
readHelpTextCompatibly(_rxInStream);
diff --git a/forms/source/component/GroupBox.hxx b/forms/source/component/GroupBox.hxx
index 1fd17774e074..255f705d80a0 100644
--- a/forms/source/component/GroupBox.hxx
+++ b/forms/source/component/GroupBox.hxx
@@ -53,7 +53,7 @@ protected:
};
-// OGroupBoxControl (nur aus Kompatibilitaet zur 5.0)
+// OGroupBoxControl (only for compatibility for 5.0)
class OGroupBoxControl : public OControl
{
diff --git a/forms/source/component/GroupManager.cxx b/forms/source/component/GroupManager.cxx
index 2a5a98462b27..d25a6db85edb 100644
--- a/forms/source/component/GroupManager.cxx
+++ b/forms/source/component/GroupManager.cxx
@@ -117,7 +117,7 @@ public:
bool operator() (const OGroupComp& lhs, const OGroupComp& rhs) const
{
bool bResult;
- // TabIndex von 0 wird hinten einsortiert
+ // TabIndex of 0 will be added at the end
if (lhs.m_nTabIndex == rhs.GetTabIndex())
bResult = lhs.m_nPos < rhs.GetPos();
else if (lhs.m_nTabIndex && rhs.GetTabIndex())
@@ -164,20 +164,19 @@ void OGroup::RemoveComponent( const Reference<XPropertySet>& rxElement )
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.
- */
+ * By removing the GroupComp the insertion position has become invalid.
+ * We do not to change it here, however, because its passed on continously
+ * and ascending distinctively.
+ */
}
else
{
- OSL_FAIL( "OGroup::RemoveComponent: Component nicht in Gruppe" );
+ OSL_FAIL( "OGroup::RemoveComponent: Component not in Group" );
}
}
else
{
- OSL_FAIL( "OGroup::RemoveComponent: Component nicht in Gruppe" );
+ OSL_FAIL( "OGroup::RemoveComponent: Component not in Group" );
}
}
@@ -243,7 +242,7 @@ void OGroupManager::removeFromGroupMap(const OUString& _sGroupName,const Referen
// group exists
aFind->second.RemoveComponent( _xSet );
- // Wenn Anzahl der Gruppenelemente == 1 ist, Gruppe deaktivieren
+ // If the count of Group elements == 1 -> deactivate Group
sal_Int32 nCount = aFind->second.Count();
if ( nCount == 1 || nCount == 0 )
{
@@ -263,7 +262,7 @@ void OGroupManager::removeFromGroupMap(const OUString& _sGroupName,const Referen
}
- // Bei Component als PropertyChangeListener abmelden
+ // Deregister as PropertyChangeListener at Component
_xSet->removePropertyChangeListener( PROPERTY_NAME, this );
if (hasProperty(PROPERTY_GROUP_NAME, _xSet))
_xSet->removePropertyChangeListener( PROPERTY_GROUP_NAME, this );
@@ -297,7 +296,7 @@ void SAL_CALL OGroupManager::propertyChange(const PropertyChangeEvent& evt) thro
removeFromGroupMap(sGroupName,xSet);
- // Component neu einordnen
+ // Re-insert Component
InsertElement( xSet );
}
@@ -359,15 +358,15 @@ void OGroupManager::getGroupByName(const OUString& _rName, Sequence< Reference<X
void OGroupManager::InsertElement( const Reference<XPropertySet>& xSet )
{
- // Nur ControlModels
+ // Only ControlModels
Reference<XControlModel> xControl(xSet, UNO_QUERY);
if (!xControl.is() )
return;
- // Component in CompGroup aufnehmen
+ // Add Component to CompGroup
m_pCompGroup->InsertComponent( xSet );
- // Component in Gruppe aufnehmen
+ // Add Component to Group
OUString sGroupName( GetGroupName( xSet ) );
OGroupArr::iterator aFind = m_aGroupArr.find(sGroupName);
@@ -403,24 +402,24 @@ void OGroupManager::InsertElement( const Reference<XPropertySet>& xSet )
m_aActiveGroupMap.push_back( aFind );
}
- // Bei Component als PropertyChangeListener anmelden
+ // Register as PropertyChangeListener at Component
xSet->addPropertyChangeListener( PROPERTY_NAME, this );
if (hasProperty(PROPERTY_GROUP_NAME, xSet))
xSet->addPropertyChangeListener( PROPERTY_GROUP_NAME, this );
- // Tabindex muss nicht jeder unterstuetzen
+ // Not everyone needs to support Tabindex
if (hasProperty(PROPERTY_TABINDEX, xSet))
xSet->addPropertyChangeListener( PROPERTY_TABINDEX, this );
}
void OGroupManager::RemoveElement( const Reference<XPropertySet>& xSet )
{
- // Nur ControlModels
+ // Only ControlModels
Reference<XControlModel> xControl(xSet, UNO_QUERY);
if (!xControl.is() )
return;
- // Component aus Gruppe entfernen
+ // Remove Component from Group
OUString sGroupName( GetGroupName( xSet ) );
removeFromGroupMap(sGroupName,xSet);
diff --git a/forms/source/component/GroupManager.hxx b/forms/source/component/GroupManager.hxx
index ca686d474a16..01d8c60a38d7 100644
--- a/forms/source/component/GroupManager.hxx
+++ b/forms/source/component/GroupManager.hxx
@@ -36,22 +36,19 @@
using namespace comphelper;
/*
- * Der GroupManager horcht an der starform, ob FormComponents eingefuegt oder entfernt
- * werden. Zusaetzlich horcht er bei den FormComponents an den Properties
- * "Name" und "TabIndex". Mit diesen Infos aktualisiert er seine Gruppen.
+ * The GroupManager listens at the StarForm for FormComponent insertion and removal as well as
+ * its properties "Name" and "TabIndex" and updates its Group using this information.
*
- * Der GroupManager verwaltet eine Gruppe, in der alle Controls nach TabIndex
- * geordnet sind, und ein Array von Gruppen, in dem jede FormComponent noch
- * einmal einer Gruppe dem Namen nach zugeordnet wird.
- * Die einzelnen Gruppen werden ueber eine Map aktiviert, wenn sie mehr als
- * ein Element besitzen.
+ * The GroupManager manages a Group in which all Controls are sorted by TabIndex.
+ * It also manages an array of Groups, in which each FormComponent is assigned a
+ * Group according to its name.
+ * Each Group is activated using a Map, if they contain more than one element.
*
- * Die Gruppen verwalten intern die FormComponents in zwei Arrays. In dem
- * GroupCompArray werden die Components nach TabIndex und Einfuegepostion
- * sortiert. Da auf dieses Array ueber die FormComponent zugegriffen
- * wird, gibt es noch das GroupCompAccessArray, in dem die FormComponents
- * nach ihrer Speicheradresse sortiert sind. Jedes Element des
- * GroupCompAccessArrays ist mit einem Element des GroupCompArrays verpointert.
+ * The Groups manage the FormComponents internally using two arrays.
+ * In the GroupCompArray the Components are sorted by TabIndex and insertion position.
+ * Because this array is accessed via the FormComponent, we also have the GroupCompAccessArray
+ * in which the FormComponents are sorted by their storage address.
+ * Every element of the GroupCompArray has a pointer to the GroupCompArray.
*/
namespace frm
{
@@ -144,7 +141,7 @@ class OGroup
OGroupCompAccArr m_aCompAccArray;
OUString m_aGroupName;
- sal_uInt16 m_nInsertPos; // Die Einfugeposition der GroupComps wird von der Gruppe bestimmt.
+ sal_uInt16 m_nInsertPos; // The insertion position of the GroupComps is determind by the Group
friend class OGroupLess;
@@ -170,10 +167,9 @@ typedef std::vector<OGroupArr::iterator> OActiveGroups;
class OGroupManager : public ::cppu::WeakImplHelper2< ::com::sun::star::beans::XPropertyChangeListener, ::com::sun::star::container::XContainerListener>
{
- OGroup* m_pCompGroup; // Alle Components nach TabIndices sortiert
- OGroupArr m_aGroupArr; // Alle Components nach Gruppen sortiert
- OActiveGroups m_aActiveGroupMap; // In dieser Map werden die Indices aller Gruppen gehalten,
- // die mehr als 1 Element haben
+ OGroup* m_pCompGroup; // Sort all Components by TabIndices
+ OGroupArr m_aGroupArr; // Sort all Components by group
+ OActiveGroups m_aActiveGroupMap; // This map contains all indices of all groups with more than 1 element
::com::sun::star::uno::Reference< ::com::sun::star::container::XContainer >
m_xContainer;
diff --git a/forms/source/component/Hidden.cxx b/forms/source/component/Hidden.cxx
index 16236a2be7b3..deb58cef4646 100644
--- a/forms/source/component/Hidden.cxx
+++ b/forms/source/component/Hidden.cxx
@@ -146,7 +146,7 @@ void SAL_CALL OHiddenModel::write(const Reference<XObjectOutputStream>& _rxOutSt
// Version
_rxOutStream->writeShort(0x0002);
- // Wert
+ // Value
_rxOutStream << m_sHiddenValue;
OControlModel::write(_rxOutStream);
diff --git a/forms/source/component/ImageButton.cxx b/forms/source/component/ImageButton.cxx
index 868c41d6a99c..1802437dfae0 100644
--- a/forms/source/component/ImageButton.cxx
+++ b/forms/source/component/ImageButton.cxx
@@ -47,7 +47,7 @@ InterfaceRef SAL_CALL OImageButtonModel_CreateInstance(const Reference<XMultiSer
OImageButtonModel::OImageButtonModel(const Reference<XComponentContext>& _rxFactory)
:OClickableImageBaseModel( _rxFactory, VCL_CONTROLMODEL_IMAGEBUTTON, FRM_SUN_CONTROL_IMAGEBUTTON )
- // use the old control name for compytibility reasons
+ // use the old control name for compytibility reasons
{
m_nClassId = FormComponentType::IMAGEBUTTON;
}
@@ -173,7 +173,7 @@ OImageButtonControl::OImageButtonControl(const Reference<XComponentContext>& _rx
{
increment(m_refCount);
{
- // als MouseListener anmelden
+ // Register as MouseListener
Reference< awt::XWindow > xComp;
query_aggregation( m_xAggregate, xComp);
if (xComp.is())
@@ -182,7 +182,7 @@ OImageButtonControl::OImageButtonControl(const Reference<XComponentContext>& _rx
decrement(m_refCount);
}
-// UNO Anbindung
+// UNO Binding
Any SAL_CALL OImageButtonControl::queryAggregation(const Type& _rType) throw (RuntimeException, std::exception)
{
Any aReturn = OClickableImageBaseControl::queryAggregation(_rType);
@@ -208,8 +208,8 @@ void OImageButtonControl::mousePressed(const awt::MouseEvent& e) throw ( ::com::
}
else
{
- // Sonst nicht. Dann darf man aber auf keinen Fal die Listener
- // benachrichtigen, auch dann nicht, wenn er spaeter hinzukommt.
+ // Or else don't; we must not notify the listeners in that case.
+ // Even not if its added later on.
aGuard.clear();
actionPerformed_Impl( false, e );
}
diff --git a/forms/source/component/ImageButton.hxx b/forms/source/component/ImageButton.hxx
index 645bb88d754e..ee728e81fd8f 100644
--- a/forms/source/component/ImageButton.hxx
+++ b/forms/source/component/ImageButton.hxx
@@ -56,7 +56,7 @@ class OImageButtonControl : public OClickableImageBaseControl,
public OImageButtonControl_BASE
{
protected:
- // UNO Anbindung
+ // UNO Binding
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes() SAL_OVERRIDE;
public:
@@ -66,7 +66,7 @@ public:
IMPLEMENTATION_NAME(OImageButtonControl);
virtual StringSequence SAL_CALL getSupportedServiceNames() throw(std::exception) SAL_OVERRIDE;
- // UNO Anbindung
+ // UNO Binding
DECLARE_UNO3_AGG_DEFAULTS(OImageButtonControl, OClickableImageBaseControl)
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation(const ::com::sun::star::uno::Type& _rType) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;