CWS-TOOLING: integrate CWS dv19

This commit is contained in:
obo 2010-07-29 12:41:44 +02:00
commit 2ae7ed978e
2 changed files with 35 additions and 5 deletions

7
extensions/source/update/check/updatecheckjob.cxx Normal file → Executable file
View file

@ -327,13 +327,14 @@ void SAL_CALL UpdateCheckJob::queryTermination( lang::EventObject const & )
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void SAL_CALL UpdateCheckJob::notifyTermination( lang::EventObject const & rEvt ) void SAL_CALL UpdateCheckJob::notifyTermination( lang::EventObject const & )
throw ( uno::RuntimeException ) throw ( uno::RuntimeException )
{ {
if ( m_pInitThread.get() != 0 ) if ( m_pInitThread.get() != 0 )
{
m_pInitThread->setTerminating(); m_pInitThread->setTerminating();
m_pInitThread->join();
disposing( rEvt ); }
} }
} // anonymous namespace } // anonymous namespace

View file

@ -116,14 +116,43 @@ static BOOL CheckExtensionInRegistry( LPCSTR lpSubKey )
{ // We will replace registration for word pad { // We will replace registration for word pad
bRet = true; bRet = true;
} }
if ( strncmp( szBuffer, "OpenOffice.org.", 15 ) == 0 ) else if ( strncmp( szBuffer, "OpenOffice.org.", 15 ) == 0 )
{ // We will replace registration for our own types, too { // We will replace registration for our own types, too
bRet = true; bRet = true;
} }
if ( strncmp( szBuffer, "ooostub.", 8 ) == 0 ) else if ( strncmp( szBuffer, "ooostub.", 8 ) == 0 )
{ // We will replace registration for ooostub, too { // We will replace registration for ooostub, too
bRet = true; bRet = true;
} }
else
{
OutputDebugStringFormat( " Checking OpenWithList of [%s].\n", lpSubKey );
HKEY hSubKey;
lResult = RegOpenKeyExA( hKey, "OpenWithList", 0, KEY_ENUMERATE_SUB_KEYS, &hSubKey );
if ( ERROR_SUCCESS == lResult )
{
DWORD nIndex = 0;
while ( ERROR_SUCCESS == lResult )
{
nSize = sizeof( szBuffer );
lResult = RegEnumKeyExA( hSubKey, nIndex++, szBuffer, &nSize, NULL, NULL, NULL, NULL );
if ( ERROR_SUCCESS == lResult )
{
OutputDebugStringFormat( " Found value [%s] in OpenWithList of [%s].\n", szBuffer, lpSubKey );
if ( strncmp( szBuffer, "WordPad.exe", 11 ) == 0 )
{ // We will replace registration for word pad
bRet = true;
}
else if ( nSize > 0 )
bRet = false;
}
}
}
else
{
OutputDebugStringFormat( " No OpenWithList found!\n" );
}
}
} }
else // no default value found -> return TRUE to register for that key else // no default value found -> return TRUE to register for that key
bRet = true; bRet = true;