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 4c77d9855a Cleanup
4c77d9855a is described below

commit 4c77d9855a97d670c1bf20bf0bbd0aa291258a3a
Author: mseidel <[email protected]>
AuthorDate: Tue May 13 18:31:57 2025 +0200

    Cleanup
---
 main/desktop/source/app/configinit.cxx             | 157 +++++++++---------
 main/sc/source/filter/excel/xlpage.cxx             |  10 +-
 .../source/win32/customactions/reg64/reg64.cxx     | 122 +++++++-------
 .../win32/shlxthandler/infotips/infotips.cxx       |   3 -
 main/svtools/source/uno/unoevent.cxx               |  77 ++++-----
 main/vos/source/timer.cxx                          | 180 ++++++++++-----------
 6 files changed, 249 insertions(+), 300 deletions(-)

diff --git a/main/desktop/source/app/configinit.cxx 
b/main/desktop/source/app/configinit.cxx
index a0d1e9dc82..8b97177704 100644
--- a/main/desktop/source/app/configinit.cxx
+++ b/main/desktop/source/app/configinit.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,21 +7,18 @@
  * 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.
- * 
+ *
  *************************************************************/
 
-
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_desktop.hxx"
 
@@ -78,11 +75,11 @@ typedef uno::Reference< lang::XMultiServiceFactory > 
ConfigurationProvider;
 
 OUString getMsgString( sal_uInt16 nId, char const * aFallBackMsg )
 {
-    ResMgr* pResMgr = Desktop::GetDesktopResManager();
-    if ( !pResMgr || !nId )
-        return OUString::createFromAscii(aFallBackMsg);
-    else
-        return OUString( String(ResId( nId, *pResMgr )));
+       ResMgr* pResMgr = Desktop::GetDesktopResManager();
+       if ( !pResMgr || !nId )
+               return OUString::createFromAscii(aFallBackMsg);
+       else
+               return OUString( String(ResId( nId, *pResMgr )));
 }
 // ----------------------------------------------------------------------------
 /** Creates the normal configuration provider.
@@ -91,42 +88,42 @@ OUString getMsgString( sal_uInt16 nId, char const * 
aFallBackMsg )
 static
 ConfigurationProvider createDefaultConfigurationProvider( )
 {
-    uno::Reference< lang::XMultiServiceFactory > xServiceManager = 
::comphelper::getProcessServiceFactory();
+       uno::Reference< lang::XMultiServiceFactory > xServiceManager = 
::comphelper::getProcessServiceFactory();
 
-    OSL_ENSURE( xServiceManager.is(),"No ServiceManager set for 
CreateApplicationConfigurationProvider");
+       OSL_ENSURE( xServiceManager.is(),"No ServiceManager set for 
CreateApplicationConfigurationProvider");
 
-    ConfigurationProvider xProvider;
+       ConfigurationProvider xProvider;
 
-    if (xServiceManager.is())
-    {
-   
-            xProvider.set( xServiceManager->createInstance(k_PROVIDER),  
UNO_QUERY);
-    }
+       if (xServiceManager.is())
+       {
 
-    if (!xProvider.is())
-    {
-        OUString const sMsg = OUSTRING("Service \"") + k_PROVIDER + 
-                                OUSTRING("\" is not available at the service 
manager.");
+                       xProvider.set( 
xServiceManager->createInstance(k_PROVIDER),  UNO_QUERY);
+       }
 
-        throw lang::ServiceNotRegisteredException(sMsg, xServiceManager);
-    }
+       if (!xProvider.is())
+       {
+               OUString const sMsg = OUSTRING("Service \"") + k_PROVIDER +
+                                                         OUSTRING("\" is not 
available at the service manager.");
+
+               throw lang::ServiceNotRegisteredException(sMsg, 
xServiceManager);
+       }
 
-    return xProvider;
+       return xProvider;
 }
 // ----------------------------------------------------------------------------
-/// @attention this method must be called from a catch statement!
+// @attention this method must be called from a catch statement!
 static void handleGeneralException(uno::Exception& aException,
                                    const rtl::OUString& aMessage)
 {
-    aException.Message = aMessage ;
-    throw ;
+       aException.Message = aMessage ;
+       throw ;
 }
 // ----------------------------------------------------------------------------
 
 uno::Reference< lang::XMultiServiceFactory > 
CreateApplicationConfigurationProvider( )
 {
-    uno::Reference< lang::XMultiServiceFactory > xProvider;
-    
+       uno::Reference< lang::XMultiServiceFactory > xProvider;
+
     try
     {
         xProvider = createDefaultConfigurationProvider( );
@@ -140,25 +137,25 @@ uno::Reference< lang::XMultiServiceFactory > 
CreateApplicationConfigurationProvi
      catch (backend::CannotConnectException & exception)
     {
         handleGeneralException(exception,
-                getMsgString( STR_CONFIG_ERR_CANNOT_CONNECT, 
+                getMsgString( STR_CONFIG_ERR_CANNOT_CONNECT,
                             "A connection to your configuration settings could 
not be established. "));
     }
     catch (backend::BackendSetupException & exception)
     {
         handleGeneralException(exception,
-                getMsgString( STR_CONFIG_ERR_CANNOT_CONNECT, 
+                getMsgString( STR_CONFIG_ERR_CANNOT_CONNECT,
                             "A connection to your configuration settings could 
not be established. "));
     }
     catch (configuration::CannotLoadConfigurationException & exception)
     {
         handleGeneralException(exception,
-                getMsgString( STR_CONFIG_ERR_CANNOT_CONNECT, 
+                getMsgString( STR_CONFIG_ERR_CANNOT_CONNECT,
                             "A connection to your configuration settings could 
not be established. "));
     }
     catch (uno::Exception & exception)
     {
         handleGeneralException(exception,
-                getMsgString( STR_CONFIG_ERR_ACCESS_GENERAL, 
+                getMsgString( STR_CONFIG_ERR_ACCESS_GENERAL,
                             "A general error occurred while accessing your 
configuration settings."));
     }
 
@@ -168,9 +165,6 @@ uno::Reference< lang::XMultiServiceFactory > 
CreateApplicationConfigurationProvi
 // ----------------------------------------------------------------------------
 
 
-
-
-// ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // ConfigurationErrorHandler
 // ----------------------------------------------------------------------------
@@ -191,20 +185,20 @@ namespace
         void deinstall()    { uno::setCurrentContext(m_xChainedContext); }
 
         uno::Any getChainedValueByName( OUString const & aName) const
-        { 
-            return m_xChainedContext.is() 
-                            ? m_xChainedContext->getValueByName(aName) 
-                            : uno::Any(); 
+        {
+            return m_xChainedContext.is()
+                            ? m_xChainedContext->getValueByName(aName)
+                            : uno::Any();
         }
 
         // XCurrentContext
         virtual uno::Any SAL_CALL
-            getValueByName( OUString const & aName) 
+            getValueByName( OUString const & aName)
                 throw (uno::RuntimeException);
     };
-    
+
     uno::Any SAL_CALL
-        SimpleCurrentContext::getValueByName( OUString const & aName) 
+        SimpleCurrentContext::getValueByName( OUString const & aName)
             throw (uno::RuntimeException)
     {
         return getChainedValueByName(aName);
@@ -227,70 +221,71 @@ public:
 
     // XCurrentContext
     virtual uno::Any SAL_CALL
-        getValueByName( OUString const & aName) 
+        getValueByName( OUString const & aName)
             throw (uno::RuntimeException);
 
 private:
-    InteractionHandler  m_xHandler;
+       InteractionHandler  m_xHandler;
 };
 
 
//------------------------------------------------------------------------------
-uno::Any SAL_CALL ConfigurationErrorHandler::Context::getValueByName( OUString 
const & aName) 
-        throw (uno::RuntimeException)
+uno::Any SAL_CALL ConfigurationErrorHandler::Context::getValueByName( OUString 
const & aName)
+               throw (uno::RuntimeException)
 {
-    if ( aName.equalsAscii( CONFIG_ERROR_HANDLER ) )
-    {
-        if ( !m_xHandler.is() )
-            m_xHandler = 
ConfigurationErrorHandler::getDefaultInteractionHandler();
-        return uno::Any( m_xHandler );
-    }
-    return SimpleCurrentContext::getValueByName( aName );
+       if ( aName.equalsAscii( CONFIG_ERROR_HANDLER ) )
+       {
+               if ( !m_xHandler.is() )
+                         m_xHandler = 
ConfigurationErrorHandler::getDefaultInteractionHandler();
+               return uno::Any( m_xHandler );
+       }
+       return SimpleCurrentContext::getValueByName( aName );
 }
 
 
//------------------------------------------------------------------------------
 ConfigurationErrorHandler::~ConfigurationErrorHandler()
 {
-    deactivate();
+       deactivate();
 }
 
 
//------------------------------------------------------------------------------
-/// installs the handler into the current context
+// installs the handler into the current context
 void ConfigurationErrorHandler::activate()
 {
-    if (!m_pContext) 
-    {
-        m_pContext = new Context;
-        m_pContext->acquire();
-    }
-    m_pContext->install();
+       if (!m_pContext)
+       {
+               m_pContext = new Context;
+               m_pContext->acquire();
+       }
+       m_pContext->install();
 }
 
 
//------------------------------------------------------------------------------
-/// deinstalls the handler from the current context, restoring the previous 
context
+// deinstalls the handler from the current context, restoring the previous 
context
 void ConfigurationErrorHandler::deactivate()
 {
-    if (m_pContext) 
-    {
-        m_pContext->deinstall();
-        m_pContext->release();
-        m_pContext = 0;
-    }
+       if (m_pContext)
+       {
+               m_pContext->deinstall();
+               m_pContext->release();
+               m_pContext = 0;
+       }
 }
 
//------------------------------------------------------------------------------
 
 ConfigurationErrorHandler::InteractionHandler 
ConfigurationErrorHandler::getDefaultInteractionHandler()
 {
-    uno::Reference< lang::XMultiServiceFactory > xServiceManager = 
::comphelper::getProcessServiceFactory();
+       uno::Reference< lang::XMultiServiceFactory > xServiceManager = 
::comphelper::getProcessServiceFactory();
 
-    OSL_ENSURE( xServiceManager.is(),"No ServiceManager set for 
ConfigurationErrorHandler");
+       OSL_ENSURE( xServiceManager.is(),"No ServiceManager set for 
ConfigurationErrorHandler");
 
-    InteractionHandler xHandler;
+       InteractionHandler xHandler;
 
-    if (xServiceManager.is())
-    {
-        xHandler.set( xServiceManager->createInstance(k_ERRORHANDLER), 
UNO_QUERY );
-    }
+       if (xServiceManager.is())
+       {
+               xHandler.set( xServiceManager->createInstance(k_ERRORHANDLER), 
UNO_QUERY );
+       }
 
-    return xHandler;
+       return xHandler;
 }
-//------------------------------------------------------------------------------
+
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/sc/source/filter/excel/xlpage.cxx 
b/main/sc/source/filter/excel/xlpage.cxx
index aa4ae5c690..bb4f74a9da 100644
--- a/main/sc/source/filter/excel/xlpage.cxx
+++ b/main/sc/source/filter/excel/xlpage.cxx
@@ -19,8 +19,6 @@
  *
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_scfilt.hxx"
 #include "xlpage.hxx"
@@ -37,9 +35,9 @@
 
 struct XclPaperSize
 {
-    Paper              mePaper;            /// SVX paper size identifier.
-    long                mnWidth;            /// Paper width in twips.
-    long                mnHeight;           /// Paper height in twips.
+    Paper              mePaper;            // SVX paper size identifier.
+    long                mnWidth;            // Paper width in twips.
+    long                mnHeight;           // Paper height in twips.
 };
 
 #define IN2TWIPS( v )      ((long)((v) * EXC_TWIPS_PER_INCH + 0.5))
@@ -240,4 +238,4 @@ void XclPageData::SetScPaperSize( const Size& rSize, bool 
bPortrait )
     }
 }
 
-// ============================================================================
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/setup_native/source/win32/customactions/reg64/reg64.cxx 
b/main/setup_native/source/win32/customactions/reg64/reg64.cxx
index d99802e053..7077ca6101 100644
--- a/main/setup_native/source/win32/customactions/reg64/reg64.cxx
+++ b/main/setup_native/source/win32/customactions/reg64/reg64.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,25 +7,18 @@
  * 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.
- * 
+ *
  *************************************************************/
 
-
-
-/*
-
-*/
-
-
 #define UNICODE
 
 #ifdef _MSC_VER
@@ -40,16 +33,16 @@
 
 #include <malloc.h>
 //#include <string>
-//#include <map> 
+//#include <map>
 #include <strsafe.h>
 
 // 10.11.2009 tkr: MinGW doesn't know anything about RegDeleteKeyExW if WINVER 
< 0x0502.
 extern "C" {
-WINADVAPI LONG WINAPI RegDeleteKeyExW(HKEY,LPCWSTR,REGSAM,DWORD); 
+WINADVAPI LONG WINAPI RegDeleteKeyExW(HKEY,LPCWSTR,REGSAM,DWORD);
 }
 
 // 06.11.2009 tkr: to provide windows xp as build systems for mingw we need to 
define KEY_WOW64_64KEY
-// in mingw 3.13 KEY_WOW64_64KEY isn't available < Win2003 systems. 
+// in mingw 3.13 KEY_WOW64_64KEY isn't available < Win2003 systems.
 // Also defined in 
setup_native\source\win32\customactions\reg64\reg64.cxx,source\win32\customactions\shellextensions\shellextensions.cxx
 and
 // extensions\source\activex\main\so_activex.cpp
 
@@ -89,7 +82,7 @@ static inline void OutputDebugStringFormat( const wchar_t*, 
... )
 bool WriteRegistry( MSIHANDLE & hMSI, OPERATION op, const wchar_t* 
componentName)
 {
        INSTALLSTATE current_state;
-    INSTALLSTATE comp_state; 
+       INSTALLSTATE comp_state;
        UINT ret = MsiGetComponentState( hMSI, componentName, &current_state, 
&comp_state );
        if ( ERROR_SUCCESS == ret )
        {
@@ -155,20 +148,20 @@ BOOL UnicodeEquals( wchar_t* pStr1, wchar_t* pStr2 )
                pStr1++, pStr2++;
 
        return ( *pStr1 == 0 && *pStr2 == 0 );
-} 
+}
 
 BOOL GetMsiProp( MSIHANDLE hMSI, const wchar_t* pPropName, wchar_t** ppValue )
 {
        OutputDebugStringFormat(L"GetMsiProp - START\n" );
-    DWORD sz = 0;
+       DWORD sz = 0;
        UINT ret = MsiGetProperty( hMSI, pPropName, L"", &sz );
        if ( ret == ERROR_MORE_DATA )
        {
-               sz++;
-               DWORD nbytes = sz * sizeof( wchar_t );
-               wchar_t* buff = reinterpret_cast<wchar_t*>( malloc( nbytes ) );
-               ZeroMemory( buff, nbytes );
-               MsiGetProperty( hMSI, pPropName, buff, &sz );
+               sz++;
+               DWORD nbytes = sz * sizeof( wchar_t );
+               wchar_t* buff = reinterpret_cast<wchar_t*>( malloc( nbytes ) );
+               ZeroMemory( buff, nbytes );
+               MsiGetProperty( hMSI, pPropName, buff, &sz );
 
                OutputDebugStringFormat(L"GetMsiProp - Value" );
                OutputDebugStringFormat( buff );
@@ -176,11 +169,11 @@ BOOL GetMsiProp( MSIHANDLE hMSI, const wchar_t* 
pPropName, wchar_t** ppValue )
 
                return TRUE;
        } else if (ret  == ERROR_INVALID_HANDLE)
-       {       
+       {
                OutputDebugStringFormat(L"GetMsiProp - ERROR_INVALID_HANDLE" );
        } else if (ret == ERROR_INVALID_PARAMETER)
        {
-               OutputDebugStringFormat(L"GetMsiProp - ERROR_INVALID_PARAMETER" 
);              
+               OutputDebugStringFormat(L"GetMsiProp - ERROR_INVALID_PARAMETER" 
);
        } else if (ret == ERROR_SUCCESS)
        {
                OutputDebugStringFormat(L"GetMsiProp - ERROR_SUCCESS" );
@@ -189,16 +182,16 @@ BOOL GetMsiProp( MSIHANDLE hMSI, const wchar_t* 
pPropName, wchar_t** ppValue )
 
        OutputDebugStringFormat(L"GetMsiProp - ENDE\n" );
        return FALSE;
-} 
+}
 
 bool IsInstallForAllUsers( MSIHANDLE hMSI )
 {
        OutputDebugStringFormat(L"IsInstallForAllUsers - START\n" );
-    bool bResult = FALSE;
-    wchar_t* pVal = NULL;
-    if ( GetMsiProp( hMSI, L"ALLUSERS", &pVal ) && pVal )
+       bool bResult = FALSE;
+       wchar_t* pVal = NULL;
+       if ( GetMsiProp( hMSI, L"ALLUSERS", &pVal ) && pVal )
        {
-       bResult = UnicodeEquals( pVal , L"1" );
+               bResult = UnicodeEquals( pVal , L"1" );
                free( pVal );
        }
 
@@ -209,17 +202,17 @@ bool IsInstallForAllUsers( MSIHANDLE hMSI )
 wchar_t* GetBasisInstallLocation( MSIHANDLE hMSI )
 {
        OutputDebugStringFormat(L"GetBasisInstallLocation - START\n" );
-    bool bResult = FALSE;
-    wchar_t* pVal = NULL;
-    GetMsiProp( hMSI, L"INSTALLLOCATION", &pVal);
+       bool bResult = FALSE;
+       wchar_t* pVal = NULL;
+       GetMsiProp( hMSI, L"INSTALLLOCATION", &pVal);
 
-    OutputDebugStringFormat(L"GetBasisInstallLocation - ENDE\n" );
+       OutputDebugStringFormat(L"GetBasisInstallLocation - ENDE\n" );
 
-    return pVal;
+       return pVal;
 }
- 
 
-bool QueryReg64Table(MSIHANDLE& rhDatabase, MSIHANDLE& rhView) 
+
+bool QueryReg64Table(MSIHANDLE& rhDatabase, MSIHANDLE& rhView)
 {
        OutputDebugStringFormat(L"QueryReg64Table - START\n" );
        int const arraysize = 400;
@@ -257,8 +250,6 @@ bool DeleteRegistryKey(HKEY RootKey, const wchar_t* KeyName)
 }
 
 
-
-
 //---------------------------------------
 //
 //---------------------------------------
@@ -289,40 +280,39 @@ bool SetRegistryKey(HKEY RootKey, const wchar_t* KeyName, 
const wchar_t* ValueNa
 bool DoRegEntries( MSIHANDLE& rhMSI, OPERATION op, MSIHANDLE& rhView)
 {
        OutputDebugStringFormat(L"DoRegEntries - START\n" );
-       
+
        MSIHANDLE hRecord;
-       
+
        long lRoot;
        wchar_t  szKey[255];
        wchar_t  szName[255];
        wchar_t  szValue[1024];
        wchar_t  szComponent[255];
 
-       /// read records until there are no more records
+       // read records until there are no more records
        while (MsiViewFetch(rhView,&hRecord) == ERROR_SUCCESS)
        {
                DWORD    dwKey = 255;
                DWORD    dwName = 255;
                DWORD    dwValue = 1024;
                DWORD    dwComponent = 255;
-               
+
                szKey[0] = '\0';
                szName[0] = '\0';
                szValue[0] = '\0';
                szComponent[0] = '\0';
-               
+
                lRoot = MsiRecordGetInteger(hRecord,2);
                MsiRecordGetString(hRecord,3,szKey,&dwKey);
-               
-               if (!MsiRecordIsNull(hRecord, 4)) 
+
+               if (!MsiRecordIsNull(hRecord, 4))
                        MsiRecordGetString(hRecord,4,szName,&dwName);
-               
+
                if (!MsiRecordIsNull(hRecord, 5))
                {
-                       MsiRecordGetString(hRecord,5,szValue,&dwValue);         
        
-                               
-                       
-       
+                       MsiRecordGetString(hRecord,5,szValue,&dwValue);
+
+
                        wchar_t* nPos = wcsstr(szValue , INSTALLLOCATION);
                        if ( NULL != nPos)
                        {
@@ -333,26 +323,26 @@ bool DoRegEntries( MSIHANDLE& rhMSI, OPERATION op, 
MSIHANDLE& rhView)
                                DWORD nPostfixSize = dwValue - wcslen( 
INSTALLLOCATION );
 
                                DWORD nNewValueBytes = (nPropSize + 
nPostfixSize + 1) * sizeof( wchar_t );
-                               wchar_t* newValue = reinterpret_cast<wchar_t*>( 
malloc( nNewValueBytes ) );
-                               ZeroMemory( newValue, nNewValueBytes );
+                               wchar_t* newValue = reinterpret_cast<wchar_t*>( 
malloc( nNewValueBytes ) );
+                               ZeroMemory( newValue, nNewValueBytes );
 
                                // prefix
                                wcsncpy(newValue, szValue, nPrefixSize);
-                               
+
                                // basis location
                                wcsncat(newValue, sBasisInstallLocation, 
nPropSize * sizeof( wchar_t ));
 
                                // postfix
                                wcsncat(newValue, nPos + ( wcslen( 
INSTALLLOCATION ) ), nPropSize * sizeof( wchar_t ));
-                               
+
                                wcsncpy(szValue, newValue, nNewValueBytes 
<=1024? nNewValueBytes: 1024);
 
                                free(newValue);
                        }
-                       
+
                }
-               
-       
+
+
                MsiRecordGetString(hRecord,6,szComponent,&dwComponent);
 
                OutputDebugStringFormat(L"****** DoRegEntries *******" );
@@ -392,7 +382,7 @@ bool DoRegEntries( MSIHANDLE& rhMSI, OPERATION op, 
MSIHANDLE& rhView)
                                        OutputDebugStringFormat(L"Unknown 
Root!" );
                                break;
                }
-               
+
                OutputDebugStringFormat(L"Key:");
                OutputDebugStringFormat( szKey );
                OutputDebugStringFormat(L"Name:");
@@ -405,14 +395,14 @@ bool DoRegEntries( MSIHANDLE& rhMSI, OPERATION op, 
MSIHANDLE& rhView)
                switch (op)
                {
                        case SET:
-                                       
+
                                        if (WriteRegistry(rhMSI, SET, 
szComponent))
                                        {
                                                
OutputDebugStringFormat(L"DoRegEntries - Write\n" );
                                                SetRegistryKey(key, szKey, 
szName, szValue);
                                        }
                                break;
-                       case REMOVE: 
+                       case REMOVE:
                                        OutputDebugStringFormat(L"DoRegEntries 
- PreRemove\n" );
                                        if (WriteRegistry(rhMSI, REMOVE, 
szComponent))
                                        {
@@ -424,10 +414,10 @@ bool DoRegEntries( MSIHANDLE& rhMSI, OPERATION op, 
MSIHANDLE& rhView)
        }
 
        MsiCloseHandle(rhView);
-       
-       
+
+
        OutputDebugStringFormat(L"DoRegEntries - ENDE\n" );
-       
+
        return true;
 }
 
@@ -442,7 +432,7 @@ bool Reg64(MSIHANDLE& rhMSI, OPERATION op)
                OutputDebugStringFormat(L"BASISINSTALLLOCATION is NULL\n" );
                return false;
        }
-       
+
        MSIHANDLE hView;
        MSIHANDLE hDatabase = MsiGetActiveDatabase(rhMSI);
 
@@ -462,7 +452,7 @@ extern "C" UINT __stdcall InstallReg64(MSIHANDLE hMSI)
 {
        OutputDebugStringFormat(L"InstallReg64\n" );
        Reg64(hMSI, SET);
-       return ERROR_SUCCESS;    
+       return ERROR_SUCCESS;
 }
 
 extern "C" UINT __stdcall DeinstallReg64(MSIHANDLE hMSI)
@@ -471,3 +461,5 @@ extern "C" UINT __stdcall DeinstallReg64(MSIHANDLE hMSI)
        Reg64(hMSI, REMOVE);
        return ERROR_SUCCESS;
 }
+
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/shell/source/win32/shlxthandler/infotips/infotips.cxx 
b/main/shell/source/win32/shlxthandler/infotips/infotips.cxx
index d1ef1632fe..aaa2478aa5 100644
--- a/main/shell/source/win32/shlxthandler/infotips/infotips.cxx
+++ b/main/shell/source/win32/shlxthandler/infotips/infotips.cxx
@@ -19,8 +19,6 @@
  *
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_shell.hxx"
 #include "internal/global.hxx"
@@ -39,7 +37,6 @@
 #include <utility>
 #include <stdlib.h>
 
-
 #define MAX_STRING 80
 #define KB 1024.0
 const std::wstring WSPACE = std::wstring(SPACE);
diff --git a/main/svtools/source/uno/unoevent.cxx 
b/main/svtools/source/uno/unoevent.cxx
index dc2cdfe4d4..dd52892e30 100644
--- a/main/svtools/source/uno/unoevent.cxx
+++ b/main/svtools/source/uno/unoevent.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,20 +7,18 @@
  * 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.
- * 
+ *
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_svtools.hxx"
 
@@ -48,10 +46,7 @@ using ::rtl::OUStringBuffer;
 const sal_Char sAPI_ServiceName[] = "com.sun.star.container.XNameReplace";
 const sal_Char sAPI_SvDetachedEventDescriptor[] = "SvDetachedEventDescriptor";
 
-//
 // SvBaseEventDescriptor
-//
-
 SvBaseEventDescriptor::SvBaseEventDescriptor( const SvEventDescription* 
pSupportedMacroItems ) :
                sEventType(RTL_CONSTASCII_USTRINGPARAM("EventType")),
                sMacroName(RTL_CONSTASCII_USTRINGPARAM("MacroName")),
@@ -249,7 +244,7 @@ void SvBaseEventDescriptor::getAnyFromMacro(Any& rAny,
                                break;
                        }
                        case EXTENDED_STYPE:
-                       {   
+                       {
                                // create sequence
                                Sequence<PropertyValue> aSequence(2);
                                Any aTmp;
@@ -272,7 +267,7 @@ void SvBaseEventDescriptor::getAnyFromMacro(Any& rAny,
                                rAny <<= aSequence;
                                bRetValueOK = sal_True;
                                break;
-                        }
+                       }
                        case JAVASCRIPT:
                        default:
                                DBG_ERROR("not implemented");
@@ -310,7 +305,7 @@ void SvBaseEventDescriptor::getMacroFromAny(
 
        // process ...
        sal_Bool bTypeOK = sal_False;
-       sal_Bool bNone = sal_False;             // true if EventType=="None"
+       sal_Bool bNone = sal_False; // true if EventType=="None"
        enum ScriptType eType = EXTENDED_STYPE;
        OUString sScriptVal;
        OUString sMacroVal;
@@ -375,7 +370,7 @@ void SvBaseEventDescriptor::getMacroFromAny(
                                SvxMacro aMacro(sMacroVal, sLibVal, eType);
                                rMacro = aMacro;
                        }
-                       else if (eType == EXTENDED_STYPE) 
+                       else if (eType == EXTENDED_STYPE)
                        {
                                SvxMacro aMacro(sScriptVal, sScript);
                                rMacro = aMacro;
@@ -396,13 +391,7 @@ void SvBaseEventDescriptor::getMacroFromAny(
 }
 
 
-
-
-//
 // SvEventDescriptor
-//
-
-
 SvEventDescriptor::SvEventDescriptor(
        XInterface& rParent,
        const SvEventDescription* pSupportedMacroItems) :
@@ -417,13 +406,13 @@ SvEventDescriptor::~SvEventDescriptor()
        // automatically release xParentRef !
 }
 
-void SvEventDescriptor::replaceByName( 
+void SvEventDescriptor::replaceByName(
        const sal_uInt16 nEvent,
        const SvxMacro& rMacro)
                throw(
-                       IllegalArgumentException, 
-                       NoSuchElementException, 
-                       WrappedTargetException, 
+                       IllegalArgumentException,
+                       NoSuchElementException,
+                       WrappedTargetException,
                        RuntimeException)
 {
        SvxMacroItem aItem(getMacroItemWhich());
@@ -432,12 +421,12 @@ void SvEventDescriptor::replaceByName(
        setMacroItem(aItem);
 }
 
-void SvEventDescriptor::getByName( 
+void SvEventDescriptor::getByName(
        SvxMacro& rMacro,
        const sal_uInt16 nEvent )
                throw(
-                       NoSuchElementException, 
-                       WrappedTargetException, 
+                       NoSuchElementException,
+                       WrappedTargetException,
                        RuntimeException)
 {
        const SvxMacroItem& rItem = getMacroItem();
@@ -451,14 +440,9 @@ void SvEventDescriptor::getByName(
 }
 
 
-
-
-//
 // SvDetachedEventDescriptor
-//
-
 SvDetachedEventDescriptor::SvDetachedEventDescriptor(
-       const SvEventDescription* pSupportedMacroItems) : 
+       const SvEventDescription* pSupportedMacroItems) :
        SvBaseEventDescriptor(pSupportedMacroItems),
        sImplName(RTL_CONSTASCII_USTRINGPARAM(sAPI_SvDetachedEventDescriptor))
 {
@@ -481,14 +465,14 @@ SvDetachedEventDescriptor::~SvDetachedEventDescriptor()
                        delete aMacros[i];
        }
 
-    delete [] aMacros;
+       delete [] aMacros;
 }
 
 sal_Int16 SvDetachedEventDescriptor::getIndex(const sal_uInt16 nID) const
 {
        // iterate over supported events
        sal_Int16 nIndex = 0;
-       while ( (mpSupportedMacroItems[nIndex].mnEvent != nID) && 
+       while ( (mpSupportedMacroItems[nIndex].mnEvent != nID) &&
                        (mpSupportedMacroItems[nIndex].mnEvent != 0)      )
        {
                nIndex++;
@@ -496,20 +480,20 @@ sal_Int16 SvDetachedEventDescriptor::getIndex(const 
sal_uInt16 nID) const
        return (mpSupportedMacroItems[nIndex].mnEvent == nID) ? nIndex : -1;
 }
 
-OUString SvDetachedEventDescriptor::getImplementationName() 
+OUString SvDetachedEventDescriptor::getImplementationName()
        throw( ::com::sun::star::uno::RuntimeException )
 {
        return sImplName;
 }
 
 
-void SvDetachedEventDescriptor::replaceByName( 
+void SvDetachedEventDescriptor::replaceByName(
        const sal_uInt16 nEvent,
        const SvxMacro& rMacro)
        throw(
-               IllegalArgumentException, 
-               NoSuchElementException, 
-               WrappedTargetException, 
+               IllegalArgumentException,
+               NoSuchElementException,
+               WrappedTargetException,
                RuntimeException)
 {
        sal_Int16 nIndex = getIndex(nEvent);
@@ -521,12 +505,12 @@ void SvDetachedEventDescriptor::replaceByName(
 }
 
 
-void SvDetachedEventDescriptor::getByName( 
+void SvDetachedEventDescriptor::getByName(
        SvxMacro& rMacro,
        const sal_uInt16 nEvent )
        throw(
-               NoSuchElementException, 
-               WrappedTargetException, 
+               NoSuchElementException,
+               WrappedTargetException,
                RuntimeException)
 {
        sal_Int16 nIndex = getIndex(nEvent);
@@ -537,8 +521,8 @@ void SvDetachedEventDescriptor::getByName(
                rMacro = (*aMacros[nIndex]);
 }
 
-sal_Bool SvDetachedEventDescriptor::hasByName( 
-       const sal_uInt16 nEvent ) const         /// item ID of event
+sal_Bool SvDetachedEventDescriptor::hasByName(
+       const sal_uInt16 nEvent ) const         // item ID of event
                throw(IllegalArgumentException)
 {
        sal_Int16 nIndex = getIndex(nEvent);
@@ -549,10 +533,7 @@ sal_Bool SvDetachedEventDescriptor::hasByName(
 }
 
 
-//
 // SvMacroTableEventDescriptor
-//
-
 SvMacroTableEventDescriptor::SvMacroTableEventDescriptor(const 
SvEventDescription* pSupportedMacroItems) :
        SvDetachedEventDescriptor(pSupportedMacroItems)
 {
@@ -597,3 +578,5 @@ void SvMacroTableEventDescriptor::copyMacrosIntoTable(
                }
        }
 }
+
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/vos/source/timer.cxx b/main/vos/source/timer.cxx
index a97a98b1e1..5089253b36 100644
--- a/main/vos/source/timer.cxx
+++ b/main/vos/source/timer.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,20 +7,18 @@
  * 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.
- * 
+ *
  *************************************************************/
 
-
-
 #include <osl/time.h>
 
 #include <vos/timer.hxx>
@@ -30,75 +28,67 @@
 #include <vos/conditn.hxx>
 
 
-/////////////////////////////////////////////////////////////////////////////
-//
 // Timer manager
-//
-
 class OTimerManagerCleanup;
 
 class vos::OTimerManager : public vos::OThread
 {
-    
+
 public:
 
-    ///
+       //
        OTimerManager();
-    
-       ///
+
+       //
        ~OTimerManager();
-    
-       /// register timer
-    sal_Bool SAL_CALL registerTimer(vos::OTimer* pTimer);
 
-       /// unregister timer
-    sal_Bool SAL_CALL unregisterTimer(vos::OTimer* pTimer);
+       // register timer
+       sal_Bool SAL_CALL registerTimer(vos::OTimer* pTimer);
+
+       // unregister timer
+       sal_Bool SAL_CALL unregisterTimer(vos::OTimer* pTimer);
 
-       /// lookup timer
-    sal_Bool SAL_CALL lookupTimer(const vos::OTimer* pTimer);
+       // lookup timer
+       sal_Bool SAL_CALL lookupTimer(const vos::OTimer* pTimer);
 
-       /// retrieves the "Singleton" TimerManager Instance
+       // retrieves the "Singleton" TimerManager Instance
        static OTimerManager* SAL_CALL getTimerManager();
 
-    
+
 protected:
-    
-       /// worker-function of thread
+
+       // worker-function of thread
        virtual void SAL_CALL run();
 
-    // Checking and triggering of a timer event
-    void SAL_CALL checkForTimeout();
+       // Checking and triggering of a timer event
+       void SAL_CALL checkForTimeout();
+
+       // cleanup Method
+       virtual void SAL_CALL onTerminated();
 
-    // cleanup Method
-    virtual void SAL_CALL onTerminated();
-    
        // sorted-queue data
        vos::OTimer*            m_pHead;
-    // List Protection
-    vos::OMutex                m_Lock;
-    // Signal the insertion of a timer
-    vos::OCondition    m_notEmpty;
+       // List Protection
+       vos::OMutex             m_Lock;
+       // Signal the insertion of a timer
+       vos::OCondition m_notEmpty;
 
-    // Synchronize access to OTimerManager
+       // Synchronize access to OTimerManager
        static vos::OMutex m_Access;
 
-    // "Singleton Pattern"
-    static vos::OTimerManager* m_pManager;
+       // "Singleton Pattern"
+       static vos::OTimerManager* m_pManager;
+
+       friend class OTimerManagerCleanup;
 
-    friend class OTimerManagerCleanup;
-    
 };
 
 using namespace vos;
 
-/////////////////////////////////////////////////////////////////////////////
-//
 // Timer class
-//
-
 VOS_IMPLEMENT_CLASSINFO(VOS_CLASSNAME(OTimer, vos),
-                        VOS_NAMESPACE(OTimer, vos),
-                        VOS_NAMESPACE(OObject, vos), 0);
+                                               VOS_NAMESPACE(OTimer, vos),
+                                               VOS_NAMESPACE(OObject, vos), 0);
 
 OTimer::OTimer()
 {
@@ -131,7 +121,7 @@ OTimer::OTimer(const TTimeValue& Time, const TTimeValue& 
Repeat)
 
 OTimer::~OTimer()
 {
-    stop();
+       stop();
 }
 
 void OTimer::start()
@@ -258,11 +248,7 @@ TTimeValue OTimer::getRemainingTime() const
 }
 
 
-/////////////////////////////////////////////////////////////////////////////
-//
 // Timer manager
-//
-
 OMutex vos::OTimerManager::m_Access;
 OTimerManager* vos::OTimerManager::m_pManager=0;
 
@@ -294,16 +280,16 @@ void OTimerManager::onTerminated()
 {
     delete this; // mfe: AAARRRGGGHHH!!!
 }
-    
+
 OTimerManager* OTimerManager::getTimerManager()
-{    
-       OGuard Guard(&m_Access); 
-       
+{
+       OGuard Guard(&m_Access);
+
        if (! m_pManager)
                new OTimerManager;
 
        return (m_pManager);
-}      
+}
 
 sal_Bool OTimerManager::registerTimer(OTimer* pTimer)
 {
@@ -313,28 +299,28 @@ sal_Bool OTimerManager::registerTimer(OTimer* pTimer)
        {
                return sal_False;
        }
-       
+
        OGuard Guard(&m_Lock);
 
        // try to find one with equal or lower remaining time.
        OTimer** ppIter = &m_pHead;
-       
-       while (*ppIter) 
+
+       while (*ppIter)
        {
                if (pTimer->expiresBefore(*ppIter))
-               {       
-                       // next element has higher remaining time, 
+               {
+                       // next element has higher remaining time,
                        // => insert new timer before
                        break;
                }
                ppIter= &((*ppIter)->m_pNext);
-       } 
-  
-       // next element has higher remaining time, 
+       }
+
+       // next element has higher remaining time,
        // => insert new timer before
        pTimer->m_pNext= *ppIter;
        *ppIter = pTimer;
-    
+
 
        if (pTimer == m_pHead)
        {
@@ -354,27 +340,27 @@ sal_Bool OTimerManager::unregisterTimer(OTimer* pTimer)
        {
                return sal_False;
        }
-       
+
        // lock access
        OGuard Guard(&m_Lock);
 
        OTimer** ppIter = &m_pHead;
 
-       while (*ppIter) 
+       while (*ppIter)
        {
                if (pTimer == (*ppIter))
-               {       
+               {
                        // remove timer from list
                        *ppIter = (*ppIter)->m_pNext;
                        return sal_True;
                }
                ppIter= &((*ppIter)->m_pNext);
-       } 
+       }
 
        return sal_False;
 }
 
-sal_Bool OTimerManager::lookupTimer(const OTimer* pTimer) 
+sal_Bool OTimerManager::lookupTimer(const OTimer* pTimer)
 {
        VOS_ASSERT(pTimer);
 
@@ -382,7 +368,7 @@ sal_Bool OTimerManager::lookupTimer(const OTimer* pTimer)
        {
                return sal_False;
        }
-       
+
        // lock access
        OGuard Guard(&m_Lock);
 
@@ -390,7 +376,7 @@ sal_Bool OTimerManager::lookupTimer(const OTimer* pTimer)
        for (OTimer* pIter = m_pHead; pIter != 0; pIter= pIter->m_pNext)
        {
                if (pIter == pTimer)
-        {    
+        {
                        return sal_True;
         }
        }
@@ -405,7 +391,7 @@ void OTimerManager::checkForTimeout()
 
        if ( m_pHead == 0 )
        {
-        m_Lock.release();        
+        m_Lock.release();
                return;
        }
 
@@ -417,9 +403,9 @@ void OTimerManager::checkForTimeout()
                m_pHead = pTimer->m_pNext;
 
         pTimer->acquire();
-        
+
                m_Lock.release();
-               
+
                pTimer->onShot();
 
                // restart timer if specified
@@ -429,14 +415,14 @@ void OTimerManager::checkForTimeout()
 
                        osl_getSystemTime(&Now);
 
-                       Now.Seconds += pTimer->m_RepeatDelta.Seconds;           
                
-                       Now.Nanosec += pTimer->m_RepeatDelta.Nanosec;           
                
+                       Now.Seconds += pTimer->m_RepeatDelta.Seconds;
+                       Now.Nanosec += pTimer->m_RepeatDelta.Nanosec;
 
                        pTimer->m_Expired = Now;
 
                        registerTimer(pTimer);
                }
-        pTimer->release();
+               pTimer->release();
        }
        else
        {
@@ -447,7 +433,7 @@ void OTimerManager::checkForTimeout()
        return;
 }
 
-void OTimerManager::run() 
+void OTimerManager::run()
 {
        setPriority(TPriority_BelowNormal);
 
@@ -456,37 +442,33 @@ void OTimerManager::run()
                TTimeValue              delay;
                TTimeValue*             pDelay=0;
 
-        
+
                m_Lock.acquire();
 
                if (m_pHead != 0)
-        {
+               {
                        delay = m_pHead->getRemainingTime();
-            pDelay=&delay;
-        }
-        else
-        {
-            pDelay=0;
-        }
-        
-        
-        m_notEmpty.reset();
+                       pDelay=&delay;
+               }
+               else
+               {
+                       pDelay=0;
+               }
 
-        m_Lock.release();
 
-        
-        m_notEmpty.wait(pDelay);
+               m_notEmpty.reset();
+
+               m_Lock.release();
 
-        checkForTimeout();
-       }
 
-}
+               m_notEmpty.wait(pDelay);
+
+               checkForTimeout();
+       }
 
+}
 
-/////////////////////////////////////////////////////////////////////////////
-//
 // Timer manager cleanup
-//
 
 // jbu:
 // The timer manager cleanup has been removed (no thread is killed anymore).
@@ -495,3 +477,5 @@ void OTimerManager::run()
 // process termination.
 // -> TODO : rewrite this file, so that the timerManager thread gets destroyed,
 //           when there are no timers anymore !
+
+/* vim: set noet sw=4 ts=4: */


Reply via email to