Kaydet (Commit) 0f8ed329 authored tarafından Philipp Weissenbacher's avatar Philipp Weissenbacher Kaydeden (comit) Caolán McNamara

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/11622Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 0af1c09b
......@@ -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
......
......@@ -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:
......
......@@ -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
......
......@@ -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);
......
......@@ -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;
......
......@@ -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);
......
......@@ -53,7 +53,7 @@ protected:
};
// OGroupBoxControl (nur aus Kompatibilitaet zur 5.0)
// OGroupBoxControl (only for compatibility for 5.0)
class OGroupBoxControl : public OControl
{
......
......@@ -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);
......
......@@ -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;
......
......@@ -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);
......
......@@ -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 );
}
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment