diff options
Diffstat (limited to 'desktop/source/migration/services/wordbookmigration.cxx')
-rw-r--r-- | desktop/source/migration/services/wordbookmigration.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/desktop/source/migration/services/wordbookmigration.cxx b/desktop/source/migration/services/wordbookmigration.cxx index 0f4427ce8bde..768d517e6915 100644 --- a/desktop/source/migration/services/wordbookmigration.cxx +++ b/desktop/source/migration/services/wordbookmigration.cxx @@ -146,15 +146,11 @@ namespace migration #define MAX_HEADER_LENGTH 16 bool IsUserWordbook( const OUString& rFile ) { - static const sal_Char* pVerStr2 = "WBSWG2"; - static const sal_Char* pVerStr5 = "WBSWG5"; - static const sal_Char* pVerStr6 = "WBSWG6"; - static const sal_Char* pVerOOo7 = "OOoUserDict1"; - bool bRet = false; SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( OUString(rFile), STREAM_STD_READ ); if ( pStream && !pStream->GetError() ) { + static const sal_Char* pVerOOo7 = "OOoUserDict1"; sal_Size nSniffPos = pStream->Tell(); static sal_Size nVerOOo7Len = sal::static_int_cast< sal_Size >(strlen( pVerOOo7 )); sal_Char pMagicHeader[MAX_HEADER_LENGTH]; @@ -172,9 +168,9 @@ bool IsUserWordbook( const OUString& rFile ) { pStream->Read(pMagicHeader, nLen); pMagicHeader[nLen] = '\0'; - if ( !strcmp(pMagicHeader, pVerStr2) - || !strcmp(pMagicHeader, pVerStr5) - || !strcmp(pMagicHeader, pVerStr6) ) + if ( !strcmp(pMagicHeader, "WBSWG2") + || !strcmp(pMagicHeader, "WBSWG5") + || !strcmp(pMagicHeader, "WBSWG6") ) bRet = true; } } |