This is an automated email from the ASF dual-hosted git repository.

mseidel pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 40af24d  Fixed typos, removed whitespace
40af24d is described below

commit 40af24dde132952d751fe82f1a6c2cf29e6c4741
Author: mseidel <msei...@apache.org>
AuthorDate: Mon Mar 14 16:55:23 2022 +0100

    Fixed typos, removed whitespace
---
 main/connectivity/source/sdbcx/VCatalog.cxx    |  25 +++---
 main/connectivity/source/sdbcx/VCollection.cxx | 110 ++++++++++++-------------
 main/connectivity/source/sdbcx/VView.cxx       |  16 ++--
 main/connectivity/source/sdbcx/makefile.mk     |  10 +--
 4 files changed, 79 insertions(+), 82 deletions(-)

diff --git a/main/connectivity/source/sdbcx/VCatalog.cxx 
b/main/connectivity/source/sdbcx/VCatalog.cxx
index 40117e6..16557b6 100644
--- a/main/connectivity/source/sdbcx/VCatalog.cxx
+++ b/main/connectivity/source/sdbcx/VCatalog.cxx
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,16 +7,16 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
 
@@ -101,7 +101,7 @@ Reference< XNameAccess > SAL_CALL OCatalog::getTables(  ) 
throw(RuntimeException
 {
        ::osl::MutexGuard aGuard(m_aMutex);
        checkDisposed(OCatalog_BASE::rBHelper.bDisposed);
-               
+
        try
        {
                if(!m_pTables)
@@ -125,7 +125,7 @@ Reference< XNameAccess > SAL_CALL OCatalog::getViews(  ) 
throw(RuntimeException)
 {
        ::osl::MutexGuard aGuard(m_aMutex);
        checkDisposed(OCatalog_BASE::rBHelper.bDisposed);
-     
+
        try
        {
                if(!m_pViews)
@@ -149,7 +149,7 @@ Reference< XNameAccess > SAL_CALL OCatalog::getUsers(  ) 
throw(RuntimeException)
 {
        ::osl::MutexGuard aGuard(m_aMutex);
        checkDisposed(OCatalog_BASE::rBHelper.bDisposed);
-     
+
        try
        {
                if(!m_pUsers)
@@ -173,7 +173,7 @@ Reference< XNameAccess > SAL_CALL OCatalog::getGroups(  ) 
throw(RuntimeException
 {
        ::osl::MutexGuard aGuard(m_aMutex);
        checkDisposed(OCatalog_BASE::rBHelper.bDisposed);
-        
+
        try
        {
                if(!m_pGroups)
@@ -197,15 +197,15 @@ Reference< XNameAccess > SAL_CALL OCatalog::getGroups(  ) 
throw(RuntimeException
        ::rtl::OUString sCatalog = _xRow->getString(1);
        if ( _xRow->wasNull() )
                sCatalog = ::rtl::OUString();
-       ::rtl::OUString sSchema  = _xRow->getString(2);
+       ::rtl::OUString sSchema = _xRow->getString(2);
        if ( _xRow->wasNull() )
                sSchema = ::rtl::OUString();
-       ::rtl::OUString sTable   = _xRow->getString(3);
+       ::rtl::OUString sTable = _xRow->getString(3);
        if ( _xRow->wasNull() )
                sTable = ::rtl::OUString();
 
        ::rtl::OUString sComposedName(
-           ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, 
sTable, sal_False, ::dbtools::eInDataManipulation ) );
+               ::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, 
sTable, sal_False, ::dbtools::eInDataManipulation ) );
        return sComposedName;
 }
 // 
-----------------------------------------------------------------------------
@@ -226,7 +226,7 @@ void OCatalog::fillNames(Reference< XResultSet >& 
_xResult,TStringVector& _rName
 // -------------------------------------------------------------------------
 void ODescriptor::construct()
 {
-    sal_Int32 nAttrib = isNew() ? 0 : 
::com::sun::star::beans::PropertyAttribute::READONLY;
+       sal_Int32 nAttrib = isNew() ? 0 : 
::com::sun::star::beans::PropertyAttribute::READONLY;
        
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME),
 PROPERTY_ID_NAME ,nAttrib,&m_Name,::getCppuType(static_cast< 
::rtl::OUString*>(NULL)));
 }
 // -------------------------------------------------------------------------
@@ -234,4 +234,3 @@ ODescriptor::~ODescriptor()
 {
 }
 // 
-----------------------------------------------------------------------------
-
diff --git a/main/connectivity/source/sdbcx/VCollection.cxx 
b/main/connectivity/source/sdbcx/VCollection.cxx
index abeab99..74fd430 100644
--- a/main/connectivity/source/sdbcx/VCollection.cxx
+++ b/main/connectivity/source/sdbcx/VCollection.cxx
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,16 +7,16 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
 
@@ -59,16 +59,16 @@ namespace
 
        //      private:
                // this combination of map and vector is used to have a fast 
name and index access
-               ::std::vector< ObjectIter >                             
m_aElements;            // hold the iterators which point to map
-               ObjectMap                                                       
        m_aNameMap;                     // hold the elements and a name
+               ::std::vector< ObjectIter >                             
m_aElements; // hold the iterators which point to map
+               ObjectMap                                                       
        m_aNameMap; // hold the elements and a name
        public:
-               OHardRefMap(sal_Bool _bCase) 
+               OHardRefMap(sal_Bool _bCase)
                        : m_aNameMap(_bCase ? true : false)
                {
                }
-        virtual ~OHardRefMap()
-        {
-        }
+               virtual ~OHardRefMap()
+               {
+               }
 
                virtual void reserve(size_t nLength)
                {
@@ -120,7 +120,7 @@ namespace
                {
                        OSL_ENSURE(!m_aNameMap.size(),"OCollection::reFill: 
collection isn't empty");
                        m_aElements.reserve(_rVector.size());
-                       
+
                        for(TStringVector::const_iterator i=_rVector.begin(); i 
!= _rVector.end();++i)
                                
m_aElements.push_back(m_aNameMap.insert(m_aNameMap.begin(), 
ObjectEntry(*i,ObjectType())));
                }
@@ -153,7 +153,7 @@ namespace
                        Sequence< ::rtl::OUString > 
aNameList(m_aElements.size());
 
                        ::rtl::OUString* pStringArray = aNameList.getArray();
-            typename ::std::vector< ObjectIter >::const_iterator aEnd = 
m_aElements.end();
+                       typename ::std::vector< ObjectIter >::const_iterator 
aEnd = m_aElements.end();
                        for(typename ::std::vector< ObjectIter 
>::const_iterator aIter = m_aElements.begin(); aIter != 
aEnd;++aIter,++pStringArray)
                                *pStringArray = (*aIter)->first;
 
@@ -171,10 +171,10 @@ namespace
                        Reference<XComponent> 
xComp(m_aElements[_nIndex]->second.get(),UNO_QUERY);
                        ::comphelper::disposeComponent(xComp);
                        m_aElements[_nIndex]->second = T();
-       
+
                        ::rtl::OUString sName = m_aElements[_nIndex]->first;
                        m_aElements.erase(m_aElements.begin()+_nIndex);
-                       m_aNameMap.erase(sName);        
+                       m_aNameMap.erase(sName);
                }
                // 
-----------------------------------------------------------------------------
                virtual void disposeElements()
@@ -189,7 +189,7 @@ namespace
                                }
                        }
                        m_aElements.clear();
-                       m_aNameMap.clear();                     
+                       m_aNameMap.clear();
                }
                // 
-----------------------------------------------------------------------------
                virtual sal_Int32 findColumn( const ::rtl::OUString& columnName 
)
@@ -199,7 +199,7 @@ namespace
                        return m_aElements.size() - (m_aElements.end() - 
::std::find(m_aElements.begin(),m_aElements.end(),aIter));
                }
                // 
-----------------------------------------------------------------------------
-               virtual ::rtl::OUString findColumnAtIndex(  sal_Int32 _nIndex)
+               virtual ::rtl::OUString findColumnAtIndex( sal_Int32 _nIndex)
                {
                        OSL_ENSURE(_nIndex >= 0 && _nIndex < 
static_cast<sal_Int32>(m_aElements.size()),"Illegal argument!");
                        return m_aElements[_nIndex]->first;
@@ -222,9 +222,9 @@ namespace
                        m_aElements[_nIndex]->second = _xObject;
                }
                // 
-----------------------------------------------------------------------------
-               sal_Bool isCaseSensitive() const 
-               { 
-                       return m_aNameMap.key_comp().isCaseSensitive(); 
+               sal_Bool isCaseSensitive() const
+               {
+                       return m_aNameMap.key_comp().isCaseSensitive();
                }
                // 
-----------------------------------------------------------------------------
        };
@@ -239,7 +239,7 @@ OCollection::OCollection(::cppu::OWeakObject& _rParent
                                                 , const TStringVector &_rVector
                                                 , sal_Bool _bUseIndexOnly
                                                 , sal_Bool _bUseHardRef)
-                     :m_aContainerListeners(_rMutex)
+                                        :m_aContainerListeners(_rMutex)
                                         ,m_aRefreshListeners(_rMutex)
                                         ,m_rParent(_rParent)
                                         ,m_rMutex(_rMutex)
@@ -306,7 +306,7 @@ void OCollection::disposing(void)
        
m_aRefreshListeners.disposeAndClear(EventObject(static_cast<XTypeProvider*>(this)));
 
        ::osl::MutexGuard aGuard(m_rMutex);
-       
+
        disposeElements();
 
        m_pElements->swap();
@@ -326,14 +326,14 @@ Any SAL_CALL OCollection::getByName( const 
::rtl::OUString& aName ) throw(NoSuch
        ::osl::MutexGuard aGuard(m_rMutex);
 
        if ( !m_pElements->exists(aName) )
-    {
-        ::connectivity::SharedResources aResources;
-        const ::rtl::OUString sError( 
aResources.getResourceStringWithSubstitution(
-                STR_NO_ELEMENT_NAME,
-                "$name$", aName
-             ) );
+       {
+               ::connectivity::SharedResources aResources;
+               const ::rtl::OUString sError( 
aResources.getResourceStringWithSubstitution(
+                               STR_NO_ELEMENT_NAME,
+                               "$name$", aName
+                               ) );
                throw NoSuchElementException( sError, static_cast< 
XTypeProvider* >( this ) );
-    }
+       }
 
        return makeAny(getObject(m_pElements->findColumn(aName)));
 }
@@ -347,12 +347,12 @@ Sequence< ::rtl::OUString > SAL_CALL 
OCollection::getElementNames(  ) throw(Runt
 void SAL_CALL OCollection::refresh(  ) throw(RuntimeException)
 {
        ::osl::MutexGuard aGuard(m_rMutex);
-       
-       disposeElements();      
+
+       disposeElements();
 
        impl_refresh();
        EventObject aEvt(static_cast<XTypeProvider*>(this));
-    m_aRefreshListeners.notifyEach( &XRefreshListener::refreshed, aEvt );
+       m_aRefreshListeners.notifyEach( &XRefreshListener::refreshed, aEvt );
 }
 // 
-----------------------------------------------------------------------------
 void OCollection::reFill(const TStringVector &_rVector)
@@ -370,10 +370,10 @@ Reference< XPropertySet > SAL_CALL 
OCollection::createDataDescriptor(  ) throw(R
 // 
-----------------------------------------------------------------------------
 ::rtl::OUString OCollection::getNameForObject(const ObjectType& _xObject)
 {
-    OSL_ENSURE(_xObject.is(),"OCollection::getNameForObject: Object is NULL!");
-    ::rtl::OUString sName;
-    
_xObject->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))
 >>= sName;
-    return sName;
+       OSL_ENSURE(_xObject.is(),"OCollection::getNameForObject: Object is 
NULL!");
+       ::rtl::OUString sName;
+       
_xObject->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))
 >>= sName;
+       return sName;
 }
 // -------------------------------------------------------------------------
 // XAppend
@@ -381,27 +381,27 @@ void SAL_CALL OCollection::appendByDescriptor( const 
Reference< XPropertySet >&
 {
        ::osl::ClearableMutexGuard aGuard(m_rMutex);
 
-    ::rtl::OUString sName = getNameForObject( descriptor );
+       ::rtl::OUString sName = getNameForObject( descriptor );
 
        if ( m_pElements->exists(sName) )
                throw 
ElementExistException(sName,static_cast<XTypeProvider*>(this));
 
-    ObjectType xNewlyCreated = appendObject( sName, descriptor );
+       ObjectType xNewlyCreated = appendObject( sName, descriptor );
        if ( !xNewlyCreated.is() )
-        throw RuntimeException();
+               throw RuntimeException();
 
-    ODescriptor* pDescriptor = ODescriptor::getImplementation( xNewlyCreated );
+       ODescriptor* pDescriptor = ODescriptor::getImplementation( 
xNewlyCreated );
        if ( pDescriptor )
                pDescriptor->setNew( sal_False );
 
-    sName = getNameForObject( xNewlyCreated );
-       if ( !m_pElements->exists( sName ) ) // this may happen when the drived 
class included it itself
+       sName = getNameForObject( xNewlyCreated );
+       if ( !m_pElements->exists( sName ) ) // this may happen when the 
derived class included it itself
                m_pElements->insert( sName, xNewlyCreated );
 
-    // notify our container listeners
+       // notify our container listeners
        ContainerEvent aEvent(static_cast<XContainer*>(this), makeAny(sName), 
makeAny(xNewlyCreated), Any());
-    aGuard.clear();
-    m_aContainerListeners.notifyEach( &XContainerListener::elementInserted, 
aEvent );
+       aGuard.clear();
+       m_aContainerListeners.notifyEach( &XContainerListener::elementInserted, 
aEvent );
 }
 // -------------------------------------------------------------------------
 // XDrop
@@ -449,14 +449,14 @@ void OCollection::notifyElementRemoved(const 
::rtl::OUString& _sName)
 sal_Int32 SAL_CALL OCollection::findColumn( const ::rtl::OUString& columnName 
) throw(SQLException, RuntimeException)
 {
        if ( !m_pElements->exists(columnName) )
-    {
-        ::connectivity::SharedResources aResources;
-        const ::rtl::OUString sError( 
aResources.getResourceStringWithSubstitution(
-                            STR_UNKNOWN_COLUMN_NAME,
-                            "$columnname$", columnName
-                         ) );
+       {
+               ::connectivity::SharedResources aResources;
+               const ::rtl::OUString sError( 
aResources.getResourceStringWithSubstitution(
+                                                       STR_UNKNOWN_COLUMN_NAME,
+                                                       "$columnname$", 
columnName
+                                                       ) );
                ::dbtools::throwGenericSQLException(sError,static_cast< 
XIndexAccess*>(this));
-    }
+       }
 
        return m_pElements->findColumn(columnName) + 1; // because columns 
start at one
 }
@@ -464,7 +464,7 @@ sal_Int32 SAL_CALL OCollection::findColumn( const 
::rtl::OUString& columnName )
 Reference< XEnumeration > SAL_CALL OCollection::createEnumeration(  ) 
throw(RuntimeException)
 {
        ::osl::MutexGuard aGuard(m_rMutex);
-    return new OEnumerationByIndex( static_cast< XIndexAccess*>(this));
+       return new OEnumerationByIndex( static_cast< XIndexAccess*>(this));
 }
 // 
-----------------------------------------------------------------------------
 void SAL_CALL OCollection::addContainerListener( const Reference< 
XContainerListener >& _rxListener ) throw(RuntimeException)
@@ -524,7 +524,7 @@ void SAL_CALL OCollection::removeRefreshListener( const 
Reference< XRefreshListe
 void OCollection::insertElement(const ::rtl::OUString& _sElementName,const 
ObjectType& _xElement)
 {
        OSL_ENSURE(!m_pElements->exists(_sElementName),"Element already 
exists");
-       if ( !m_pElements->exists(_sElementName) ) 
+       if ( !m_pElements->exists(_sElementName) )
                m_pElements->insert(_sElementName,_xElement);
 }
 // 
-----------------------------------------------------------------------------
@@ -533,7 +533,7 @@ void OCollection::renameObject(const ::rtl::OUString 
_sOldName,const ::rtl::OUSt
        OSL_ENSURE(m_pElements->exists(_sOldName),"Element doesn't exist");
        OSL_ENSURE(!m_pElements->exists(_sNewName),"Element already exists");
        OSL_ENSURE(_sNewName.getLength(),"New name must not be empty!");
-       OSL_ENSURE(_sOldName.getLength(),"New name must not be empty!");
+       OSL_ENSURE(_sOldName.getLength(),"Old name must not be empty!");
 
        if ( m_pElements->rename(_sOldName,_sNewName) )
        {
@@ -590,7 +590,7 @@ ObjectType OCollection::cloneDescriptor( const ObjectType& 
_descriptor )
 // 
-----------------------------------------------------------------------------
 ObjectType OCollection::appendObject( const ::rtl::OUString& /*_rForName*/, 
const Reference< XPropertySet >& descriptor )
 {
-    return cloneDescriptor( descriptor );
+       return cloneDescriptor( descriptor );
 }
 // 
-----------------------------------------------------------------------------
 void OCollection::dropObject(sal_Int32 /*_nPos*/,const ::rtl::OUString 
/*_sElementName*/)
diff --git a/main/connectivity/source/sdbcx/VView.cxx 
b/main/connectivity/source/sdbcx/VView.cxx
index 59e2839..234fb1f 100644
--- a/main/connectivity/source/sdbcx/VView.cxx
+++ b/main/connectivity/source/sdbcx/VView.cxx
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,16 +7,16 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
 
@@ -90,18 +90,18 @@ void OView::disposing(void)
 // -------------------------------------------------------------------------
 Sequence< Type > SAL_CALL OView::getTypes(  ) throw(RuntimeException)
 {
-    return 
::comphelper::concatSequences(ODescriptor::getTypes(),OView_BASE::getTypes());
+       return 
::comphelper::concatSequences(ODescriptor::getTypes(),OView_BASE::getTypes());
 }
 // -------------------------------------------------------------------------
 Any SAL_CALL OView::queryInterface( const Type & rType ) 
throw(RuntimeException)
 {
-    Any aRet = OView_BASE::queryInterface( rType);
+       Any aRet = OView_BASE::queryInterface( rType);
        return aRet.hasValue() ? aRet : ODescriptor::queryInterface( rType);
 }
 // -------------------------------------------------------------------------
 ::cppu::IPropertyArrayHelper* OView::createArrayHelper( sal_Int32 /*_nId*/ ) 
const
 {
-    return doCreateArrayHelper();
+       return doCreateArrayHelper();
 }
 // -------------------------------------------------------------------------
 ::cppu::IPropertyArrayHelper & OView::getInfoHelper()
@@ -142,5 +142,3 @@ void SAL_CALL OView::release() throw()
        OView_BASE::release();
 }
 // 
-----------------------------------------------------------------------------
-
-
diff --git a/main/connectivity/source/sdbcx/makefile.mk 
b/main/connectivity/source/sdbcx/makefile.mk
index 96ffb88..2f9c389 100644
--- a/main/connectivity/source/sdbcx/makefile.mk
+++ b/main/connectivity/source/sdbcx/makefile.mk
@@ -1,5 +1,5 @@
 #**************************************************************
-#  
+#
 #  Licensed to the Apache Software Foundation (ASF) under one
 #  or more contributor license agreements.  See the NOTICE file
 #  distributed with this work for additional information
@@ -7,16 +7,16 @@
 #  to you under the Apache License, Version 2.0 (the
 #  "License"); you may not use this file except in compliance
 #  with the License.  You may obtain a copy of the License at
-#  
+#
 #    http://www.apache.org/licenses/LICENSE-2.0
-#  
+#
 #  Unless required by applicable law or agreed to in writing,
 #  software distributed under the License is distributed on an
 #  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 #  KIND, either express or implied.  See the License for the
 #  specific language governing permissions and limitations
 #  under the License.
-#  
+#
 #**************************************************************
 
 
@@ -56,4 +56,4 @@ SLOFILES=\
 
 .INCLUDE : target.mk
 
-
+# vim: set noet ts=4 sw=4:

Reply via email to