summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2015-10-12 07:45:01 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-10-12 06:52:56 +0000
commitccc5ea08d64c38a9ce925d448c3010aca19ed35c (patch)
treee50c45ee596185f9a030641465796394c71ad410 /desktop
parent898aff0d190b09d16cce866909b64cf023cba43f (diff)
cppcheck:variableScope
Change-Id: I037feb335499629300309851dcda3bb661f03d4f Reviewed-on: https://gerrit.libreoffice.org/19316 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/migration/services/wordbookmigration.cxx12
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;
}
}