[Libreoffice-commits] core.git: forms/source

Philipp Weissenbacher p.weissenbacher at gmail.com
Thu Sep 18 23:36:02 PDT 2014


 forms/source/component/Button.cxx         |    4 -
 forms/source/component/Button.hxx         |   12 +----
 forms/source/component/CheckBox.cxx       |    2 
 forms/source/component/Columns.hxx        |    8 +--
 forms/source/component/ComboBox.cxx       |   14 +++---
 forms/source/component/ComboBox.hxx       |   17 +++----
 forms/source/component/Currency.cxx       |    6 +-
 forms/source/component/DatabaseForm.cxx   |   36 +++++++--------
 forms/source/component/DatabaseForm.hxx   |    8 +--
 forms/source/component/Edit.cxx           |    2 
 forms/source/component/Edit.hxx           |    3 -
 forms/source/component/EditBase.hxx       |    6 +-
 forms/source/component/EventThread.hxx    |    2 
 forms/source/component/File.cxx           |    4 -
 forms/source/component/FormComponent.cxx  |   31 ++++++-------
 forms/source/component/cachedrowset.hxx   |    3 -
 forms/source/component/clickableimage.cxx |   69 +++++++++++++-----------------
 forms/source/component/clickableimage.hxx |   21 ++++-----
 18 files changed, 116 insertions(+), 132 deletions(-)

New commits:
commit 778dcbc53ee32517f3867ac4edd603c77a7bb70d
Author: Philipp Weissenbacher <p.weissenbacher at gmail.com>
Date:   Fri Sep 19 00:58:01 2014 +0200

    fdo#39468 Translate German comments, clean some ws
    
    Change-Id: I4a9b3b3e0d0fefb18808b0b045ffcf3531f4ea28
    Reviewed-on: https://gerrit.libreoffice.org/11524
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
    Tested-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx
index 2c248d5..4c6adca 100644
--- a/forms/source/component/Button.cxx
+++ b/forms/source/component/Button.cxx
@@ -188,7 +188,7 @@ void OButtonModel::read(const Reference<XObjectInputStream>& _rxInStream) throw
         case 0x0003:
         {
             OStreamSection aSection( _rxInStream.get() );
-                // this will skip any unknown bytes in it's dtor
+            // this will skip any unknown bytes in it's dtor
 
             // button type
             m_eButtonType = (FormButtonType)_rxInStream->readShort();
@@ -621,7 +621,7 @@ void OButtonControl::modelFeatureUrlPotentiallyChanged( )
 {
     sal_Int16 nOldUrlFeatureId = m_nTargetUrlFeatureId;
 
-    // doe we have another TargetURL now? If so, we need to update our dispatches
+    // Do we have another TargetURL now? If so, we need to update our dispatches
     m_nTargetUrlFeatureId = getModelUrlFeatureId( );
     if ( nOldUrlFeatureId != m_nTargetUrlFeatureId )
     {
diff --git a/forms/source/component/Button.hxx b/forms/source/component/Button.hxx
index 8289de1..418de7f 100644
--- a/forms/source/component/Button.hxx
+++ b/forms/source/component/Button.hxx
@@ -97,7 +97,7 @@ private:
     ResetHelper m_aResetHelper;
 
     // <properties>
-    ToggleState m_eDefaultState;          // the default check state
+    ToggleState m_eDefaultState; // the default check state
     // </properties>
 protected:
     using OClickableImageBaseModel::disposing;
@@ -177,17 +177,13 @@ protected:
 private:
     DECL_LINK( OnClick, void* );
 
-    /** to be called whenever the feature URL represented by our model has potentially changed
-    */
+    /// to be called whenever the feature URL represented by our model has potentially changed
     void        modelFeatureUrlPotentiallyChanged( );
 
-    /** retrieves the feature id (see OFormNavigationHelper) of the TargetURL of
-        the model.
-    */
+    /// retrieves the feature id (see OFormNavigationHelper) of the TargetURL of the model.
     sal_Int16   getModelUrlFeatureId( ) const;
 
-    /** starts or stops listening for changes in model properties we're interested in
-    */
+    /// starts or stops listening for changes in model properties we're interested in
     void        startOrStopModelPropertyListening( bool _bStart );
 };
 
diff --git a/forms/source/component/CheckBox.cxx b/forms/source/component/CheckBox.cxx
index 53c1195..89ef88f 100644
--- a/forms/source/component/CheckBox.cxx
+++ b/forms/source/component/CheckBox.cxx
@@ -76,7 +76,7 @@ InterfaceRef SAL_CALL OCheckBoxModel_CreateInstance(const Reference<XMultiServic
 
 OCheckBoxModel::OCheckBoxModel(const Reference<XComponentContext>& _rxFactory)
     :OReferenceValueComponent( _rxFactory, VCL_CONTROLMODEL_CHECKBOX, FRM_SUN_CONTROL_CHECKBOX, true )
-                    // use the old control name for compytibility reasons
+    // use the old control name for compytibility reasons
 {
 
     m_nClassId = FormComponentType::CHECKBOX;
diff --git a/forms/source/component/Columns.hxx b/forms/source/component/Columns.hxx
index 89a95a1..669d156 100644
--- a/forms/source/component/Columns.hxx
+++ b/forms/source/component/Columns.hxx
@@ -50,15 +50,15 @@ class OGridColumn   :public ::comphelper::OBaseMutex
 {
 protected:
 // [properties]
-    ::com::sun::star::uno::Any  m_aWidth;                   // column width
-    ::com::sun::star::uno::Any  m_aAlign;                   // column alignment
-    ::com::sun::star::uno::Any  m_aHidden;                  // column hidden?
+    ::com::sun::star::uno::Any  m_aWidth;  // column width
+    ::com::sun::star::uno::Any  m_aAlign;  // column alignment
+    ::com::sun::star::uno::Any  m_aHidden; // column hidden?
 // [properties]
 
     OUString                 m_aModelName;
 
 // [properties]
-    OUString             m_aLabel;                   // Column name
+    OUString                m_aLabel;      // Column name
 // [properties]
 
 public:
diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx
index a6d8817..8e3bfff 100644
--- a/forms/source/component/ComboBox.cxx
+++ b/forms/source/component/ComboBox.cxx
@@ -127,7 +127,7 @@ Any SAL_CALL OComboBoxModel::queryAggregation(const Type& _rType) throw (Runtime
 
 OComboBoxModel::OComboBoxModel(const Reference<XComponentContext>& _rxFactory)
     :OBoundControlModel( _rxFactory, VCL_CONTROLMODEL_COMBOBOX, FRM_SUN_CONTROL_COMBOBOX, true, true, true )
-                    // use the old control name for compytibility reasons
+     // use the old control name for compatibility reasons
     ,OEntryListHelper( (OControlModel&)*this )
     ,OErrorBroadcaster( OComponentHelper::rBHelper )
     ,m_aListRowSet()
@@ -248,7 +248,7 @@ void OComboBoxModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const
         {
             ControlModelLock aLock( *this );
             setNewStringItemList( _rValue, aLock );
-                // TODO: this is bogus. setNewStringItemList expects a guard which has the *only*
+                // FIXME: this is bogus. setNewStringItemList expects a guard which has the *only*
                 // lock to the mutex, but setFastPropertyValue_NoBroadcast is already called with
                 // a lock - so we effectively has two locks here, of which setNewStringItemList can
                 // only control one.
@@ -336,7 +336,7 @@ void SAL_CALL OComboBoxModel::write(const Reference<css::io::XObjectOutputStream
     // Version 0x0005:  HelpText
     _rxOutStream->writeShort(0x0006);
 
-    // Maskierung fuer any
+    // Mask for Any
     sal_uInt16 nAnyMask = 0;
     if (m_aBoundColumn.getValueType().getTypeClass() == TypeClass_SHORT)
         nAnyMask |= BOUNDCOLUMN;
@@ -396,7 +396,7 @@ void SAL_CALL OComboBoxModel::read(const Reference<css::io::XObjectInputStream>&
         return;
     }
 
-    // Masking for any
+    // Mask for Any
     sal_uInt16 nAnyMask;
     _rxInStream >> nAnyMask;
 
@@ -729,8 +729,8 @@ bool OComboBoxModel::commitControlValueToDbColumn( bool _bPostReset )
     if ( bModified )
     {
         if  (   !aNewValue.hasValue()
-            ||  (   sNewValue.isEmpty()         // an empty string
-                &&  m_bEmptyIsNull              // which should be interpreted as NULL
+            ||  (   sNewValue.isEmpty() // an empty string
+                &&  m_bEmptyIsNull      // which should be interpreted as NULL
                 )
             )
         {
@@ -760,7 +760,7 @@ bool OComboBoxModel::commitControlValueToDbColumn( bool _bPostReset )
 
     // add the new value to the list
     bool bAddToList = bModified && !_bPostReset;
-        // (only if this is not the "commit" triggered by a "reset")
+    // (only if this is not the "commit" triggered by a "reset")
 
     if ( bAddToList )
     {
diff --git a/forms/source/component/ComboBox.hxx b/forms/source/component/ComboBox.hxx
index af3518d..3229f07 100644
--- a/forms/source/component/ComboBox.hxx
+++ b/forms/source/component/ComboBox.hxx
@@ -48,22 +48,19 @@ class OComboBoxModel
 {
     CachedRowSet                            m_aListRowSet;          // the row set to fill the list
     ::com::sun::star::uno::Any              m_aBoundColumn;         // obsolete
-    OUString                         m_aListSource;
-    OUString                         m_aDefaultText;         // DefaultText
+    OUString                                m_aListSource;
+    OUString                                m_aDefaultText;         // DefaultText
     ::com::sun::star::uno::Any              m_aLastKnownValue;
 
     StringSequence                          m_aDesignModeStringItems;
-        // upon loading, in some cases we reset fill our string item list ourself. We don't want
-        // to lose the user's items then, so we remember them here.
-
-
+    // upon loading, in some cases we reset fill our string item list ourself. We don't want
+    // to lose the user's items then, so we remember them here.
     ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter> m_xFormatter;
 
     ::com::sun::star::form::ListSourceType  m_eListSourceType;      // ListSource's type
-    bool                                m_bEmptyIsNull;         // Empty string is interpreted as NULL
+    bool                                    m_bEmptyIsNull;         // Empty string is interpreted as NULL
 
-    ::std::auto_ptr< ::dbtools::FormattedColumnValue >
-                                            m_pValueFormatter;
+    ::std::auto_ptr< ::dbtools::FormattedColumnValue > m_pValueFormatter;
 
 
 
@@ -129,7 +126,7 @@ protected:
 
     virtual void            resetNoBroadcast() SAL_OVERRIDE;
 
-    // OEntryListHelper overriables
+    // OEntryListHelper overridables
     virtual void    stringItemListChanged( ControlModelLock& _rInstanceLock ) SAL_OVERRIDE;
     virtual void    connectedExternalListSource( ) SAL_OVERRIDE;
     virtual void    disconnectedExternalListSource( ) SAL_OVERRIDE;
diff --git a/forms/source/component/Currency.cxx b/forms/source/component/Currency.cxx
index 421af7f..80cf96a 100644
--- a/forms/source/component/Currency.cxx
+++ b/forms/source/component/Currency.cxx
@@ -131,7 +131,7 @@ void OCurrencyModel::implConstruct()
 
 OCurrencyModel::OCurrencyModel(const Reference<XComponentContext>& _rxFactory)
     :OEditBaseModel( _rxFactory, VCL_CONTROLMODEL_CURRENCYFIELD, FRM_SUN_CONTROL_CURRENCYFIELD, false, true )
-                                    // use the old control name for compytibility reasons
+    // use the old control name for compaytibility reasons
 {
 
     m_nClassId = FormComponentType::CURRENCYFIELD;
@@ -179,8 +179,8 @@ StringSequence SAL_CALL OCurrencyModel::getSupportedServiceNames() throw(std::ex
 void OCurrencyModel::describeFixedProperties( Sequence< Property >& _rProps ) const
 {
     BEGIN_DESCRIBE_PROPERTIES( 2, OEditBaseModel )
-        // Value auf transient setzen
-//      ModifyPropertyAttributes(_rAggregateProps, PROPERTY_VALUE, PropertyAttribute::TRANSIENT, 0);
+    // Set Value to transient
+    // ModifyPropertyAttributes(_rAggregateProps, PROPERTY_VALUE, PropertyAttribute::TRANSIENT, 0);
 
         DECL_PROP3(DEFAULT_VALUE,       double,             BOUND, MAYBEDEFAULT, MAYBEVOID);
         DECL_PROP1(TABINDEX,        sal_Int16,              BOUND);
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 6689959..676fb18 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -598,7 +598,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc
     if (!xComponentSet.is())
         return;
 
-    // MIB 25.6.98: Catch nested Forms; or would we need to submit them?
+    // TODO: Catch nested Forms; or would we need to submit them?
     if (!hasProperty(PROPERTY_CLASSID, xComponentSet))
         return;
 
@@ -621,7 +621,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc
         case FormComponentType::COMMANDBUTTON:
         {
             // We only evaluate the pressed Submit button
-            // MIB: If one is passed at all
+            // If one is passed at all
             if( rxSubmitButton.is() )
             {
                 Reference<XPropertySet>  xSubmitButtonComponent(rxSubmitButton->getModel(), UNO_QUERY);
@@ -639,7 +639,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc
         case FormComponentType::IMAGEBUTTON:
         {
             // We only evaluate the pressed Submit button
-            // MIB: If one is passed at all
+            // If one is passed at all
             if( rxSubmitButton.is() )
             {
                 Reference<XPropertySet>  xSubmitButtonComponent(rxSubmitButton->getModel(), UNO_QUERY);
@@ -667,7 +667,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc
             }
         } break;
 
-        // CheckBoxen / RadioButtons
+        // CheckBoxes/RadioButtons
         case FormComponentType::CHECKBOX:
         case FormComponentType::RADIOBUTTON:
         {
@@ -693,13 +693,13 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc
             if( !hasProperty(PROPERTY_TEXT, xComponentSet) )
                 break;
 
-            // MIB: Special treatment for multiline edit only if we have a control for it
+            // Special treatment for multiline edit only if we have a control for it
             Any aTmp = xComponentSet->getPropertyValue( PROPERTY_MULTILINE );
             bool bMulti =   rxSubmitButton.is()
                             && (aTmp.getValueType().getTypeClass() == TypeClass_BOOLEAN)
                             && getBOOL(aTmp);
             OUString sText;
-            if ( bMulti )   // For multiline edit, get the text at the control
+            if ( bMulti ) // For multiline edit, get the text at the control
             {
 
                 Reference<XControlContainer>  xControlContainer(rxSubmitButton->getContext(), UNO_QUERY);
@@ -748,7 +748,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc
         case FormComponentType::CURRENCYFIELD:
         case FormComponentType::NUMERICFIELD:
         {
-            // <name>=<wert> // Value is a double with dot as decimal delimiter
+            // <name>=<value> // Value is a double with dot as decimal delimiter
                              // no value (NULL) means empty value
             if( hasProperty(PROPERTY_VALUE, xComponentSet) )
             {
@@ -767,7 +767,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc
         }   break;
         case FormComponentType::DATEFIELD:
         {
-            // <name>=<wert> // Value is a Date with the format MM-DD-YYYY
+            // <name>=<value> // Value is a Date with the format MM-DD-YYYY
                              // no value (NULL) means empty value
             if( hasProperty(PROPERTY_DATE, xComponentSet) )
             {
@@ -790,7 +790,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc
         }   break;
         case FormComponentType::TIMEFIELD:
         {
-            // <name>=<wert> // Value is a Time with the format HH:MM:SS
+            // <name>=<value> // Value is a Time with the format HH:MM:SS
                              // no value (NULL) means empty value
             if( hasProperty(PROPERTY_TIME, xComponentSet) )
             {
@@ -927,7 +927,7 @@ void ODatabaseForm::FillSuccessfulList( HtmlSuccessfulObjList& rList,
     // Delete list
     rList.clear();
     // Iterate over Components
-    Reference<XPropertySet>         xComponentSet;
+    Reference<XPropertySet> xComponentSet;
     OUString aPrefix;
 
     // we know already how many objects should be appended,
@@ -1262,7 +1262,7 @@ bool ODatabaseForm::executeRowSet(::osl::ResettableMutexGuard& _rClearForNotifie
                 {
                     // move on the insert row of set
                     // resetting must be done later, after the load events have been posted
-                    // see :moveToInsertRow and load , reload
+                    // see: moveToInsertRow and load , reload
                     Reference<XResultSetUpdate>  xUpdate;
                     if (query_aggregation( m_xAggregate, xUpdate))
                         xUpdate->moveToInsertRow();
@@ -1310,7 +1310,7 @@ void ODatabaseForm::disposing()
     m_aSubmitListeners.disposeAndClear(aEvt);
     m_aErrorListeners.disposeAndClear(aEvt);
 
-    m_aParameterManager.dispose();   // (to free any references it may have to me)
+    m_aParameterManager.dispose();   // To free any references it may have to be me
     m_aFilterManager.dispose();      // (dito)
 
     OFormComponents::disposing();
@@ -2061,7 +2061,7 @@ void ODatabaseForm::reset_impl(bool _bAproveByListeners)
         xIter->nextElement() >>= xReset;
         if (xReset.is())
         {
-            // TODO : all reset-methods have to be thread-safe
+            // TODO: all reset-methods have to be thread-safe
             xReset->reset();
         }
     }
@@ -2350,7 +2350,7 @@ void ODatabaseForm::_propertyChanged(const PropertyChangeEvent& evt) throw( Runt
         sal_Int32 nHandle = PROPERTY_ID_ACTIVE_CONNECTION;
         fire(&nHandle, &evt.NewValue, &evt.OldValue, 1, false);
     }
-    else    // it was one of the statement relevant props
+    else // it was one of the statement relevant props
     {
         // if the statement has changed we have to delete the parameter info
         invlidateParameters();
@@ -2684,7 +2684,7 @@ bool ODatabaseForm::canShareConnection( const Reference< XPropertySet >& _rxPare
             bCanShareConnection = true;
         else
         {   // the data source name is empty
-            // -> ook for the URL
+            // -> ok for the URL
             OUString sParentURL;
             OUString sMyURL;
             _rxParentProps->getPropertyValue( PROPERTY_URL ) >>= sParentURL;
@@ -3193,7 +3193,7 @@ sal_Bool SAL_CALL ODatabaseForm::approveRowChange(const RowChangeEvent& event) t
 
 sal_Bool SAL_CALL ODatabaseForm::approveRowSetChange(const EventObject& event) throw( RuntimeException, std::exception )
 {
-    if (event.Source == InterfaceRef(static_cast<XWeak*>(this)))    // ignore our aggregate as we handle this approve ourself
+    if (event.Source == InterfaceRef(static_cast<XWeak*>(this))) // ignore our aggregate as we handle this approve ourself
     {
         ::osl::ClearableMutexGuard aGuard( m_aMutex );
         bool bWasLoaded = isLoaded();
@@ -3887,7 +3887,7 @@ void SAL_CALL ODatabaseForm::write(const Reference<XObjectOutputStream>& _rxOutS
             default : OSL_FAIL("ODatabaseForm::write : wrong CommandType !");
         }
     }
-    _rxOutStream->writeShort((sal_Int16)eTranslated);           // former DataSelectionType
+    _rxOutStream->writeShort((sal_Int16)eTranslated); // former DataSelectionType
 
     // very old versions expect a CursorType here
     _rxOutStream->writeShort(DatabaseCursorType_KEYSET);
@@ -4082,7 +4082,7 @@ void SAL_CALL ODatabaseForm::errorOccured(const SQLErrorEvent& _rEvent) throw( R
 {
     // give it to my own error listener
     onError(_rEvent);
-    // TODO : think about extending the chain with an SQLContext object saying
+    // TODO: think about extending the chain with an SQLContext object saying
     // "this was an error of one of my children"
 }
 
diff --git a/forms/source/component/DatabaseForm.hxx b/forms/source/component/DatabaseForm.hxx
index 9c86f5b..72358a4 100644
--- a/forms/source/component/DatabaseForm.hxx
+++ b/forms/source/component/DatabaseForm.hxx
@@ -159,7 +159,7 @@ class ODatabaseForm :public OFormComponents
 {
     friend class OFormSubmitResetThread;
 
-        // listener administration
+    // listener administration
     ::cppu::OInterfaceContainerHelper   m_aLoadListeners;
     ::cppu::OInterfaceContainerHelper   m_aRowSetApproveListeners;
     ::cppu::OInterfaceContainerHelper   m_aRowSetListeners;
@@ -180,7 +180,7 @@ class ODatabaseForm :public OFormComponents
     PropertyBagHelper           m_aPropertyBagHelper;
     ::dbtools::WarningsContainer    m_aWarnings;
     OPropertyChangeMultiplexer* m_pAggregatePropertyMultiplexer;
-    // Verwaltung der ControlGruppen
+    // Management of the Control Groups
     OGroupManager*              m_pGroupManager;
     ::dbtools::ParameterManager m_aParameterManager;
     ::dbtools::FilterManager    m_aFilterManager;
@@ -188,8 +188,8 @@ class ODatabaseForm :public OFormComponents
 
     OFormSubmitResetThread*     m_pThread;
     OUString             m_sCurrentErrorContext;
-                // will be used as additional context information
-                // when an exception is catched and forwarded to the listeners
+    // will be used as additional context information
+    // when an exception is catched and forwarded to the listeners
 
     sal_Int32                       m_nResetsPending;
 //  <overwritten_properties>
diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx
index c711ea9..f2e049e 100644
--- a/forms/source/component/Edit.cxx
+++ b/forms/source/component/Edit.cxx
@@ -199,7 +199,7 @@ void OEditControl::keyPressed(const ::com::sun::star::awt::KeyEvent& e) throw (
     if( !xSet.is() )
         return;
 
-    // Not for  multiline edits
+    // Not for multiline edits
     Any aTmp( xSet->getPropertyValue(PROPERTY_MULTILINE));
     if ((aTmp.getValueType().equals(::getBooleanCppuType())) && getBOOL(aTmp))
         return;
diff --git a/forms/source/component/Edit.hxx b/forms/source/component/Edit.hxx
index 66af4a0..d8eda8b 100644
--- a/forms/source/component/Edit.hxx
+++ b/forms/source/component/Edit.hxx
@@ -38,8 +38,7 @@ class OEditModel
                                 m_pValueFormatter;
     bool                    m_bMaxTextLenModified : 1;  // set to <TRUE/> when we change the MaxTextLen of the aggregate
 
-    bool                    m_bWritingFormattedFake : 1;
-        // are we writing something which should be interpreted as formatted upon reading?
+    bool                    m_bWritingFormattedFake : 1; // are we writing something which should be interpreted as formatted upon reading?
 
 protected:
     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes() SAL_OVERRIDE;
diff --git a/forms/source/component/EditBase.hxx b/forms/source/component/EditBase.hxx
index c0636e6..1147dbb 100644
--- a/forms/source/component/EditBase.hxx
+++ b/forms/source/component/EditBase.hxx
@@ -56,7 +56,7 @@ class OEditBaseModel :  public OBoundControlModel
 protected:
 // [properties]         for all EditingFields
     ::com::sun::star::uno::Any  m_aDefault;
-    OUString             m_aDefaultText;             // default value
+    OUString                m_aDefaultText;             // default value
     bool                    m_bEmptyIsNull : 1;         // empty string will be interepreted as NULL when committing
     bool                    m_bFilterProposal : 1;      // use a list of possible value in filtermode
 // [properties]
@@ -88,8 +88,8 @@ protected:
     void defaultCommonEditProperties();
 
     virtual sal_uInt16 getPersistenceFlags() const;
-        // derived classes may use this if they want this base class to write additional version flags
-        // (one of the PF_.... constants). After ::read they may ask for that flags with getLastReadVersion
+    // derived classes may use this if they want this base class to write additional version flags
+    // (one of the PF_.... constants). After ::read they may ask for that flags with getLastReadVersion
 };
 
 
diff --git a/forms/source/component/EventThread.hxx b/forms/source/component/EventThread.hxx
index 9a5f353..30ec45f 100644
--- a/forms/source/component/EventThread.hxx
+++ b/forms/source/component/EventThread.hxx
@@ -97,7 +97,7 @@ public:
     // ::com::sun::star::lang::XEventListener
     virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& _rSource ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
-/* resolve ambiguity : both OWeakObject and OObject have these memory operators */
+    // Resolve ambiguity: both OWeakObject and OObject have these memory operators
     void * SAL_CALL operator new( size_t size ) throw() { return osl::Thread::operator new(size); }
     void SAL_CALL operator delete( void * p ) throw() { osl::Thread::operator delete(p); }
 
diff --git a/forms/source/component/File.cxx b/forms/source/component/File.cxx
index 6690b02..bf2e35f 100644
--- a/forms/source/component/File.cxx
+++ b/forms/source/component/File.cxx
@@ -208,7 +208,7 @@ void OFileControlModel::write(const Reference<css::io::XObjectOutputStream>& _rx
 
     // Version
     _rxOutStream->writeShort(0x0002);
-    // Default-Wert
+    // Default value
     _rxOutStream << m_sDefaultValue;
     writeHelpTextCompatibly(_rxOutStream);
 }
@@ -221,7 +221,7 @@ void OFileControlModel::read(const Reference<css::io::XObjectInputStream>& _rxIn
 
     // Version
     sal_uInt16 nVersion = _rxInStream->readShort();
-    // Default-Wert
+    // Default value
     switch (nVersion)
     {
         case 1:
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index f2d26f3..7d606cc 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -118,9 +118,8 @@ OControl::OControl( const Reference< XComponentContext >& _rxContext, const OUSt
             :OComponentHelper(m_aMutex)
             ,m_xContext( _rxContext )
 {
-    // aggregate VCL-Control
-    // bei Aggregation den Refcount um eins erhoehen da im setDelegator
-    // das Aggregat selbst den Refcount erhoeht
+    // Aggregate VCL Control
+    // Increment the RefCount for aggregates, because the aggregate by itself increments the RefCount in the setDelegator
     increment( m_refCount );
     {
         m_xAggregate.set(_rxContext->getServiceManager()->createInstanceWithContext(_rAggregateService, _rxContext), css::uno::UNO_QUERY);
@@ -249,7 +248,7 @@ void SAL_CALL OControl::disposing(const com::sun::star::lang::EventObject& _rEve
     // does the disposing come from the aggregate?
     if (xAggAsIface != Reference< XInterface >(_rEvent.Source, UNO_QUERY))
     {   // no -> forward it
-                Reference<com::sun::star::lang::XEventListener> xListener;
+        Reference<com::sun::star::lang::XEventListener> xListener;
         if (query_aggregation(m_xAggregate, xListener))
             xListener->disposing(_rEvent);
     }
@@ -768,7 +767,7 @@ void SAL_CALL OControlModel::write(const Reference<css::io::XObjectOutputStream>
     ::comphelper::operator<<( _rxOutStream, m_aTag); // 3. version
 
     // IMPORTANT NOTE!
-    // don't write any new members here : this wouldn't be compatible with older versions, as OControlModel
+    // don't write any new members here: this wouldn't be compatible with older versions, as OControlModel
     // is a base class which is called in derived classes "read" method. So if you increment the version
     // and write new stuff, older office versions will read this in the _derived_ classes, which may result
     // in anything from data loss to crash.
@@ -1534,7 +1533,7 @@ void SAL_CALL OBoundControlModel::write( const Reference<css::io::XObjectOutputS
     // Controlsource
     ::comphelper::operator<<( _rxOutStream, m_aControlSource);
     // !!! IMPORTANT NOTE !!!
-    // don't write any new members here : this wouldn't be compatible with older versions, as OBoundControlModel
+    // don't write any new members here: this wouldn't be compatible with older versions, as OBoundControlModel
     // is a base class which is called in derived classes "read" method. So if you increment the version
     // and write new stuff, older office versions will read this in the _derived_ classes, which may result
     // in anything from data loss to crash.
@@ -1728,7 +1727,7 @@ void OBoundControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, co
                 throw com::sun::star::lang::IllegalArgumentException();
             }
 
-            // check if weself and the given model have a common anchestor (up to the forms collection)
+            // Check if we and the given model have a common ancestor (up to the forms collection)
             Reference<XChild> xCont;
             query_interface(static_cast<XWeak*>(this), xCont);
             Reference< XInterface > xMyTopLevel = xCont->getParent();
@@ -1957,7 +1956,7 @@ bool OBoundControlModel::connectToField(const Reference<XRowSet>& rForm)
                     sal_Int32 nNullableFlag = ColumnValue::NO_NULLS;
                     m_xField->getPropertyValue(PROPERTY_ISNULLABLE) >>= nNullableFlag;
                     m_bRequired = (ColumnValue::NO_NULLS == nNullableFlag);
-                        // we're optimistic: in case of ColumnValue_NULLABLE_UNKNOWN we assume nullability...
+                    // we're optimistic: in case of ColumnValue_NULLABLE_UNKNOWN we assume nullability...
                 }
 
                 else
@@ -2488,8 +2487,8 @@ void OBoundControlModel::disconnectExternalValueBinding( )
 void SAL_CALL OBoundControlModel::setValueBinding( const Reference< XValueBinding >& _rxBinding ) throw (IncompatibleTypesException, RuntimeException, std::exception)
 {
     OSL_PRECOND( m_bSupportsExternalBinding, "OBoundControlModel::setValueBinding: How did you reach this method?" );
-        // the interface for this method should not have been exposed if we do not
-        // support binding to external data
+    // the interface for this method should not have been exposed if we do not
+    // support binding to external data
     // allow reset
     if ( _rxBinding.is() && !impl_approveValueBinding_nolock( _rxBinding ) )
     {
@@ -2515,8 +2514,8 @@ Reference< XValueBinding > SAL_CALL OBoundControlModel::getValueBinding(  ) thro
 {
     ::osl::MutexGuard aGuard( m_aMutex );
     OSL_PRECOND( m_bSupportsExternalBinding, "OBoundControlModel::getValueBinding: How did you reach this method?" );
-        // the interface for this method should not have been exposed if we do not
-        // support binding to external data
+    // the interface for this method should not have been exposed if we do not
+    // support binding to external data
     return m_xExternalBinding;
 }
 
@@ -2733,8 +2732,8 @@ Reference< XValidator > SAL_CALL OBoundControlModel::getValidator(  ) throw (Run
 {
     ::osl::MutexGuard aGuard( m_aMutex );
     OSL_PRECOND( m_bSupportsValidation, "OBoundControlModel::getValidator: How did you reach this method?" );
-        // the interface for this method should not have been exposed if we do not
-        // support validation
+    // the interface for this method should not have been exposed if we do not
+    // support validation
 
     return m_xValidator;
 }
@@ -2743,8 +2742,8 @@ void SAL_CALL OBoundControlModel::validityConstraintChanged( const EventObject&
 {
     ::osl::ClearableMutexGuard aGuard( m_aMutex );
     OSL_PRECOND( m_bSupportsValidation, "OBoundControlModel::validityConstraintChanged: How did you reach this method?" );
-        // the interface for this method should not have been exposed if we do not
-        // support validation
+    // the interface for this method should not have been exposed if we do not
+    // support validation
 
     recheckValidity( false );
 }
diff --git a/forms/source/component/cachedrowset.hxx b/forms/source/component/cachedrowset.hxx
index ddc17d8f..b7a7aff 100644
--- a/forms/source/component/cachedrowset.hxx
+++ b/forms/source/component/cachedrowset.hxx
@@ -33,8 +33,7 @@ namespace frm
 
     struct CachedRowSet_Data;
 
-    /** caches a result set obtained from a SQL statement
-    */
+    /// caches a result set obtained from a SQL statement
     class CachedRowSet
     {
     public:
diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx
index 35f8245..c2729b1 100644
--- a/forms/source/component/clickableimage.cxx
+++ b/forms/source/component/clickableimage.cxx
@@ -98,7 +98,7 @@ namespace frm
         }
     }
 
-    // UNO Anbindung
+    // UNO Binding
 
     Any SAL_CALL OClickableImageBaseControl::queryAggregation(const Type& _rType) throw (RuntimeException, std::exception)
     {
@@ -178,7 +178,7 @@ namespace frm
         ::cppu::OInterfaceIteratorHelper aIter( m_aApproveActionListeners );
         while( !bCancelled && aIter.hasMoreElements() )
         {
-            // Jede approveAction-Methode muss thread-safe sein!!!
+            // Every approveAction method must be thread-safe!
             if( !static_cast< XApproveActionListener* >( aIter.next() )->approveAction( aEvent ) )
                 bCancelled = true;
         }
@@ -187,8 +187,7 @@ namespace frm
     }
 
 
-    // Diese Methode wird auch aus einem Thread gerufen und muss deshalb
-    // thread-safe sein.
+    // This method is also called from a thread and thus must be thread-safe.
     void OClickableImageBaseControl::actionPerformed_Impl(bool bNotifyListener, const MouseEvent& rEvt)
     {
         if( bNotifyListener )
@@ -197,15 +196,15 @@ namespace frm
                 return;
         }
 
-        // Ob der Rest des Codes Thread-Safe ist weiss man nicht genau. Deshalb
-        // wird das meiste bei gelocktem Solar-Mutex erledigen.
+        // Whether the rest of the code is thread-safe, one can't tell. Therefore
+        // we do most of the work on a locked solar mutex.
         Reference<XPropertySet>  xSet;
         Reference< XInterface > xModelsParent;
         FormButtonType eButtonType = FormButtonType_PUSH;
         {
             SolarMutexGuard aGuard;
 
-            // Parent holen
+            // Get parent
             Reference<XFormComponent>  xComp(getModel(), UNO_QUERY);
             if (!xComp.is())
                 return;
@@ -214,7 +213,7 @@ namespace frm
             if (!xModelsParent.is())
                 return;
 
-            // which button type?
+            // Which button type?
             xSet.set(xComp, css::uno::UNO_QUERY);
             if ( !xSet.is() )
                 return;
@@ -225,7 +224,7 @@ namespace frm
         {
             case FormButtonType_RESET:
             {
-                // reset-Methoden muessen thread-safe sein!
+                // Reset methods must be thread-safe!
                 Reference<XReset>  xReset(xModelsParent, UNO_QUERY);
                 if (!xReset.is())
                     return;
@@ -258,7 +257,7 @@ namespace frm
                     return;
 
 
-                // Jetzt URL ausfuehren
+                // Execute URL now
                 Reference< XController >  xController = xModel->getCurrentController();
                 if (!xController.is())
                     return;
@@ -272,19 +271,19 @@ namespace frm
                     getString(xSet->getPropertyValue(PROPERTY_TARGET_URL));
 
                 if (!aURL.Complete.isEmpty() && (LOCAL_URL_PREFIX == aURL.Complete[0]))
-                {   // the URL contains a local URL only. Since the URLTransformer does not handle this case correctly
+                {   // FIXME: The URL contains a local URL only. Since the URLTransformer does not handle this case correctly
                     // (it can't: it does not know the document URL), we have to take care for this ourself.
                     // The real solution would be to not allow such relative URLs (there is a rule that at runtime, all
                     // URLs have to be absolute), but for compatibility reasons this is no option.
                     // The more as the user does not want to see a local URL as "file://<path>/<document>#mark" if it
                     // could be "#mark" as well.
                     // If we someday say that this hack (yes, it's kind of a hack) is not sustainable anymore, the complete
-                    // solutiuon would be:
+                    // solution would be:
                     // * recognize URLs consisting of a mark only while _reading_ the document
                     // * for this, allow the INetURLObject (which at the moment is invoked when reading URLs) to
                     //   transform such mark-only URLs into correct absolute URLs
                     // * at the UI, show only the mark
-                    // * !!!! recognize every SAVEAS on the document, so the absolute URL can be adjusted. This seems
+                    // * !!! recognize every SAVEAS on the document, so the absolute URL can be adjusted. This seems
                     // rather impossible !!!
                     aURL.Mark = aURL.Complete;
                     aURL.Complete = xModel->getURL();
@@ -336,7 +335,7 @@ namespace frm
             }   break;
             default:
             {
-                    // notify the action listeners for a push button
+                // notify the action listeners for a push button
                 ActionEvent aEvt(static_cast<XWeak*>(this), m_aActionCommand);
                 m_aActionListeners.notifyEach( &XActionListener::actionPerformed, aEvt );
             }
@@ -520,7 +519,7 @@ namespace frm
             dispose();
         }
         DBG_ASSERT(m_pMedium == NULL, "OClickableImageBaseModel::~OClickableImageBaseModel : leaving a memory leak ...");
-            // spaetestens im dispose sollte das aufgeraeumt worden sein
+        // This should be cleaned up at least in the dispose
 
     }
 
@@ -682,7 +681,7 @@ namespace frm
             if ( ::svt::GraphicAccess::isSupportedURL( sURL )  )
                 pImgProd->SetImage( sURL );
             else
-                // caution: the medium may be NULL if somebody gave us a invalid URL to work with
+                // caution: the medium may be NULL if somebody gave us an invalid URL to work with
                 pImgProd->SetImage(OUString());
             m_bDownloading = false;
             return;
@@ -709,7 +708,7 @@ namespace frm
     {
         if (m_pMedium || rURL.isEmpty())
         {
-            // Den Stream am Producer freigeben, bevor das Medium geloscht wird.
+            // Free the stream at the Producer, before the medium is deleted
             GetImageProducer()->SetImage(OUString());
             delete m_pMedium;
             m_pMedium = NULL;
@@ -728,12 +727,11 @@ namespace frm
 
             m_pMedium = new SfxMedium(rURL, STREAM_STD_READ);
 
-            // Das XModel suchen, um an die Object-Shell oder zumindest den
-            // Referer zu gelangen.
-            // Das Model findet man allerdings nur beim Laden von HTML-Dokumenten
-            // und dann, wenn die URL in einem bereits geladenen Dokument
-            // geaendert wird. Waehrend des Ladens kommt man nicht an das
-            // Model ran.
+            // Find the XModel to get to the Object shell or at least the
+            // Referer.
+            // There's only a Model if we load HTML documents and the URL is
+            // changed in a document that is already loaded. There's no way
+            // we can get to the Model during loading.
             Reference< XModel >  xModel;
             InterfaceRef  xIfc( *this );
             while( !xModel.is() && xIfc.is() )
@@ -743,11 +741,9 @@ namespace frm
                 query_interface(xIfc, xModel);
             }
 
-            // Die Object-Shell suchen, indem wir
-            // ueber alle Object-Shells iterieren und deren XModel mit dem
-            // eigenen vergleichen. Als Optimierung probieren wir aber erstmal
-            // die aktuelle Object-Shell.
-            // wir unser XModel mit dem aller Object
+            // Search for the Object shell by iterating over all Object shells
+            // and comparing their XModel to our´s.
+            // As an optimization, we try the current Object shell first.
             SfxObjectShell *pObjSh = 0;
 
             if( xModel.is() )
@@ -776,8 +772,8 @@ namespace frm
     #ifdef USE_REGISTER_TRANSFER
             if( pObjSh )
             {
-                // Target-Frame uebertragen, damit auch javascript:-URLs
-                // "geladen" werden koennen.
+                // Transfer target frame, so that javascript: URLs
+                // can also be "loaded"
                 const SfxMedium *pShMedium = pObjSh->GetMedium();
                 if( pShMedium )
                     m_pMedium->SetLoadTargetFrame(pShMedium->GetLoadTargetFrame());
@@ -785,20 +781,20 @@ namespace frm
     #else
             if( pObjSh )
             {
-                // Target-Frame uebertragen, damit auch javascript:-URLs
-                // "geladen" werden koennen.
+                // Transfer target frame, so that javascript: URLs
+                // can also be "loaded"
                 const SfxMedium *pShMedium = pObjSh->GetMedium();
                 if( pShMedium )
                     m_pMedium->SetLoadTargetFrame(pShMedium->GetLoadTargetFrame());
             }
     #endif
 
-            // Downloading-Flag auf sal_True setzen. Es werden dann auch
-            // Data-Available-Links, wenn wir in den Pending-Staus gelangen.
+            // Set downloading flag to true. They will be Data Available Links,
+            // if get to the pending staus.
             m_bDownloading = true;
             m_bProdStarted = false;
 
-            // Download anstossen (Achtung: Kann auch synchron sein).
+            // Kick off download (caution: can be synchronous).
             m_pMedium->Download(STATIC_LINK(this, OClickableImageBaseModel, DownloadDoneLink));
         }
         else
@@ -837,8 +833,7 @@ namespace frm
     void OClickableImageBaseModel::_propertyChanged( const PropertyChangeEvent& rEvt )
         throw( RuntimeException )
     {
-        // Wenn eine URL gesetzt worden ist, muss die noch an den ImageProducer
-        // weitergereicht werden.
+        // If a URL was set, it needs to be passed onto the ImageProducer.
         ::osl::MutexGuard aGuard(m_aMutex);
         SetURL( getString(rEvt.NewValue) );
     }
diff --git a/forms/source/component/clickableimage.hxx b/forms/source/component/clickableimage.hxx
index a70f081..8fb17f5 100644
--- a/forms/source/component/clickableimage.hxx
+++ b/forms/source/component/clickableimage.hxx
@@ -58,16 +58,16 @@ namespace frm
                                     ,public OPropertyChangeListener
     {
     protected:
-        ::com::sun::star::form::FormButtonType  m_eButtonType;      // Art des Buttons (push,submit,reset)
-        OUString                         m_sTargetURL;       // URL fuer den URL-Button
-        OUString                         m_sTargetFrame;     // TargetFrame zum Oeffnen
+        ::com::sun::star::form::FormButtonType  m_eButtonType; // Type of the button (push, submit, reset)
+        OUString                         m_sTargetURL;         // URL for the URL button
+        OUString                         m_sTargetFrame;       // TargetFrame to open
 
         // ImageProducer stuff
         ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageProducer>    m_xProducer;
-        SfxMedium*                              m_pMedium;          // Download-Medium
+        SfxMedium*                              m_pMedium;     // Download medium
         ImageProducer*                          m_pProducer;
         bool                                m_bDispatchUrlInternal; // property: is not allowed to set : 1
-        bool                                m_bDownloading : 1; // laeuft ein Download?
+        bool                                m_bDownloading : 1;     // Is a download in progress?
         bool                                m_bProdStarted : 1;
 
         // XSubmission stuff
@@ -90,7 +90,7 @@ namespace frm
     public:
         DECLARE_DEFAULT_XTOR( OClickableImageBaseModel );
 
-        // UNO Anbindung
+        // UNO Binding
         DECLARE_UNO3_AGG_DEFAULTS(OClickableImageBaseModel, 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;
 
@@ -205,7 +205,7 @@ namespace frm
         virtual ~OClickableImageBaseControl();
 
     protected:
-        // UNO Anbindung
+        // UNO Binding
         DECLARE_UNO3_AGG_DEFAULTS(OClickableImageBaseControl, OControl)
         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;
 
@@ -249,12 +249,11 @@ namespace frm
     {
     protected:
 
-        // Die folgende Methode wrrd gerufen um das Event unter Beruecksichtigung
-        // seines Typs zu duplizieren
+        // This method was called to duplicate the Event by taking its type into account
         virtual ::com::sun::star::lang::EventObject* cloneEvent( const ::com::sun::star::lang::EventObject* _pEvt ) const SAL_OVERRIDE;
 
-        // Ein Event bearbeiten. Der Mutex ist dabei nicht gelockt, pCompImpl
-        // bleibt aber in jedem Fall gueltig.
+        // Process an Event.
+        // The mutex is not locked, pCompImpl stays valid in any case
         virtual void processEvent( ::cppu::OComponentHelper *pCompImpl,
                                 const ::com::sun::star::lang::EventObject*,
                                 const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl>&,


More information about the Libreoffice-commits mailing list