[Libreoffice-commits] .: 2 commits - forms/source vcl/unx

Philipp Weissenbacher p.weissenbacher at kemper.freedesktop.org
Wed Mar 7 08:50:19 PST 2012


 forms/source/component/File.cxx          |    4 ++--
 forms/source/component/ImageControl.cxx  |   13 ++++++-------
 forms/source/component/RadioButton.cxx   |   28 +++++++++++++---------------
 vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx |    4 ++--
 4 files changed, 23 insertions(+), 26 deletions(-)

New commits:
commit b43fe402154fae9bf1e2201d9b1a049cbcaf63ef
Author: Philipp Weissenbacher <p.weissenbacher at gmail.com>
Date:   Wed Mar 7 17:47:58 2012 +0100

    WaE: Fix cppcheck syntax error warning

diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index f7fdbd1..c363d5f 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -75,9 +75,9 @@ static void expandexpanders(GtkContainer *pWidget)
     GList *pChildren = gtk_container_get_children(pWidget);
     for( GList *p = pChildren; p; p = p->next )
     {
-        if GTK_IS_CONTAINER(GTK_WIDGET(p->data))
+        if (GTK_IS_CONTAINER(GTK_WIDGET(p->data)))
             expandexpanders(GTK_CONTAINER(GTK_WIDGET(p->data)));
-        if GTK_IS_EXPANDER(GTK_WIDGET(p->data))
+        if (GTK_IS_EXPANDER(GTK_WIDGET(p->data)))
             gtk_expander_set_expanded(GTK_EXPANDER(GTK_WIDGET(p->data)), sal_True);
     }
     g_list_free(pChildren);
commit 2343fc82a9a87fd6704194077822768db9e717aa
Author: Philipp Weissenbacher <p.weissenbacher at gmail.com>
Date:   Tue Mar 6 21:48:09 2012 +0100

    Translate German comments

diff --git a/forms/source/component/File.cxx b/forms/source/component/File.cxx
index 7bbf225..6cca4fc 100644
--- a/forms/source/component/File.cxx
+++ b/forms/source/component/File.cxx
@@ -250,7 +250,7 @@ void OFileControlModel::read(const Reference<stario::XObjectInputStream>& _rxInS
             m_sDefaultValue = ::rtl::OUString();
     }
 
-    // Nach dem Lesen die Defaultwerte anzeigen
+    // Display default values after read
 //  _reset();
 }
 
@@ -266,7 +266,7 @@ void SAL_CALL OFileControlModel::reset() throw ( ::com::sun::star::uno::RuntimeE
     if (bContinue)
     {
         {
-            // Wenn Models threadSave
+            // If Models are threadSave
             ::osl::MutexGuard aGuard(m_aMutex);
             _reset();
         }
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index fc2503a..8c61449 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -223,7 +223,7 @@ StringSequence  OImageControlModel::getSupportedServiceNames() throw()
 //------------------------------------------------------------------------------
 Any SAL_CALL OImageControlModel::queryAggregation(const Type& _rType) throw (RuntimeException)
 {
-    // oder matters: we want to "override" the XImageProducer interface of the aggreate with out
+    // Order matters: we want to "override" the XImageProducer interface of the aggreate with out
     // own XImageProducer interface, thus we need to query OImageControlModel_Base first
     Any aReturn = OImageControlModel_Base::queryInterface( _rType );
 
@@ -373,7 +373,7 @@ void OImageControlModel::describeAggregateProperties( Sequence< Property >& /* [
 //------------------------------------------------------------------------------
 void OImageControlModel::write(const Reference<XObjectOutputStream>& _rxOutStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
 {
-    // Basisklasse
+    // Base class
     OBoundControlModel::write(_rxOutStream);
     // Version
     _rxOutStream->writeShort(0x0003);
@@ -411,7 +411,7 @@ void OImageControlModel::read(const Reference<XObjectInputStream>& _rxInStream)
             defaultCommonProperties();
             break;
     }
-    // Nach dem Lesen die Defaultwerte anzeigen
+    // Display default values after read
     if ( !getControlSource().isEmpty() )
     {   // (not if we don't have a control source - the "State" property acts like it is persistent, then
         ::osl::MutexGuard aGuard(m_aMutex); // resetNoBroadcast expects this mutex guarding
@@ -728,7 +728,7 @@ OImageControlControl::OImageControlControl(const Reference<XMultiServiceFactory>
 {
     increment(m_refCount);
     {
-        // als Focus- und MouseListener anmelden
+        // Add as Focus- and MouseListener
         Reference< XWindow > xComp;
         query_aggregation( m_xAggregate, xComp );
         if ( xComp.is() )
@@ -959,7 +959,7 @@ void OImageControlControl::mousePressed(const ::com::sun::star::awt::MouseEvent&
     else
     {
         //////////////////////////////////////////////////////////////////////
-        // Doppelclick
+        // Double click
         if (e.ClickCount == 2)
         {
 
@@ -967,8 +967,7 @@ void OImageControlControl::mousePressed(const ::com::sun::star::awt::MouseEvent&
             if (!xSet.is())
                 return;
 
-            // wenn Control nicht gebunden ist, kein Dialog (da die zu schickende URL hinterher sowieso
-            // versanden wuerde)
+            // If the Control is not bound, do not display a dialog (because the to-be-sent URL would be invalid anyway)
             Reference<XPropertySet> xBoundField;
             if (hasProperty(PROPERTY_BOUNDFIELD, xSet))
                 ::cppu::extractInterface(xBoundField, xSet->getPropertyValue(PROPERTY_BOUNDFIELD));
diff --git a/forms/source/component/RadioButton.cxx b/forms/source/component/RadioButton.cxx
index 4160d8b..a311aad 100644
--- a/forms/source/component/RadioButton.cxx
+++ b/forms/source/component/RadioButton.cxx
@@ -171,7 +171,7 @@ void ORadioButtonModel::SetSiblingPropsTo(const ::rtl::OUString& rPropName, cons
     if (sMyGroup.isEmpty())
         sMyGroup = m_aName;
 
-    // meine Siblings durchiterieren
+    // Iterate over my siblings
     Reference<XIndexAccess> xIndexAccess(getParent(), UNO_QUERY);
     if (xIndexAccess.is())
     {
@@ -185,9 +185,9 @@ void ORadioButtonModel::SetSiblingPropsTo(const ::rtl::OUString& rPropName, cons
             if (!xSiblingProperties.is())
                 continue;
             if (xMyProps == xSiblingProperties)
-                continue;   // mich selber nicht umsetzen
+                continue;   // do not set myself
 
-            // nur wenn es ein Radio-Button ist
+            // Only if it's a RadioButton
             if (!hasProperty(PROPERTY_CLASSID, xSiblingProperties))
                 continue;
             sal_Int16 nType = 0;
@@ -195,7 +195,7 @@ void ORadioButtonModel::SetSiblingPropsTo(const ::rtl::OUString& rPropName, cons
             if (nType != FormComponentType::RADIOBUTTON)
                 continue;
 
-            // das 'zur selben Gruppe gehoeren' wird am Namen festgemacht
+            // The group association is attached to the name
             sCurrentGroup = OGroupManager::GetGroupName( xSiblingProperties );
             if (sCurrentGroup == sMyGroup)
                 xSiblingProperties->setPropertyValue(rPropName, rValue);
@@ -214,14 +214,13 @@ void ORadioButtonModel::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, cons
         SetSiblingPropsTo(PROPERTY_CONTROLLABEL, rValue);
     }
 
-    // wenn sich die ControlSource-Eigenschaft geaendert hat ...
+    // If the ControlSource property has changed ...
     if (nHandle == PROPERTY_ID_CONTROLSOURCE)
-    {   // ... muss ich allen meinen Siblings, die in der selben RadioButton-Gruppe sind wie ich, auch die
-        // neue ControlSource mitgeben
+    {   // ... I have to pass the new ControlSource to my siblings, which are in the same RadioButton group as I am
         SetSiblingPropsTo(PROPERTY_CONTROLSOURCE, rValue);
     }
 
-    // die andere Richtung : wenn sich mein Name aendert ...
+    // The other way: if my name changes ...
     if (nHandle == PROPERTY_ID_NAME)
     {
         setControlSource();
@@ -232,8 +231,8 @@ void ORadioButtonModel::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, cons
         sal_Int16 nValue;
         rValue >>= nValue;
         if (1 == nValue)
-        {   // bei allen Radios der selben Gruppe das 'default checked' ruecksetzen, denn wie schon der highlander wusste :
-            // es kann nur einen geben.
+        {   // Reset the 'default checked' for all Radios of the same group.
+            // Because (as the Highlander already knew): "There can be only one"
             Any aZero;
             nValue = 0;
             aZero <<= nValue;
@@ -262,13 +261,13 @@ void ORadioButtonModel::setControlSource()
                 continue;
 
             if (xMyProps == xSiblingProperties)
-                // nur wenn ich nicht mich selber gefunden habe
+                // Only if I didn't find myself
                 continue;
 
             sal_Int16 nType = 0;
             xSiblingProperties->getPropertyValue(PROPERTY_CLASSID) >>= nType;
             if (nType != FormComponentType::RADIOBUTTON)
-                // nur Radio-Buttons
+                // Only RadioButtons
                 continue;
 
             ::rtl::OUString sSiblingName, sSiblingGroupName;
@@ -357,7 +356,7 @@ void SAL_CALL ORadioButtonModel::read(const Reference<XObjectInputStream>& _rxIn
     setReferenceValue( sReferenceValue );
     setDefaultChecked( (ToggleState)nDefaultChecked );
 
-    // Nach dem Lesen die Defaultwerte anzeigen
+    // Display default values after read
     if ( !getControlSource().isEmpty() )
         // (not if we don't have a control source - the "State" property acts like it is persistent, then
         resetNoBroadcast();
@@ -370,8 +369,7 @@ void ORadioButtonModel::_propertyChanged(const PropertyChangeEvent& _rEvent) thr
     {
         if ( _rEvent.NewValue == (sal_Int16)1 )
         {
-            // wenn sich mein Status auf 'checked' geaendert hat, muss ich alle meine Siblings, die in der selben Gruppe
-            // sind wie ich, entsprechend zuruecksetzen
+            // If my status has changed to 'checked', I have to reset all my siblings, which are in the same group as I am
             Any aZero;
             aZero <<= (sal_Int16)0;
             SetSiblingPropsTo( PROPERTY_STATE, aZero );


More information about the Libreoffice-commits mailing list