diff options
author | Mathias Bauer <mba@openoffice.org> | 2010-04-17 20:34:49 +0200 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2010-04-17 20:34:49 +0200 |
commit | 18895204b0169bf07236499248a218e82a72dff3 (patch) | |
tree | 8619ddf932c487cd1512f78d9e253b7490e34b51 /svtools/source/misc/ehdl.cxx | |
parent | e1577335e0c88e269995ff9164da981d800eb6bb (diff) | |
parent | 0768a7d2726ce4f0772b52d95eeb23143336655c (diff) |
CWS gnumake2: rebase to DEV300_m76; fix build problems
Diffstat (limited to 'svtools/source/misc/ehdl.cxx')
-rw-r--r-- | svtools/source/misc/ehdl.cxx | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/svtools/source/misc/ehdl.cxx b/svtools/source/misc/ehdl.cxx index 36bf73c27903..9b832a253a74 100644 --- a/svtools/source/misc/ehdl.cxx +++ b/svtools/source/misc/ehdl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ehdl.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -321,16 +318,21 @@ BOOL SfxErrorHandler::GetClassString(ULONG lClassId, String &rStr) const */ { - - ResId aId(RID_ERRHDL, *pMgr); - ErrorResource_Impl aEr(aId, (USHORT)lClassId); - if(aEr) + BOOL bRet = FALSE; + com::sun::star::lang::Locale aLocale( Application::GetSettings().GetUILocale() ); + ResMgr* pResMgr = ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(ofa), aLocale ); + if( pResMgr ) { - rStr=((ResString)aEr).GetString(); - return TRUE; + ResId aId(RID_ERRHDL, *pResMgr ); + ErrorResource_Impl aEr(aId, (USHORT)lClassId); + if(aEr) + { + rStr=((ResString)aEr).GetString(); + bRet = TRUE; + } } - else - return FALSE; + delete pResMgr; + return bRet; } //------------------------------------------------------------------------- @@ -379,10 +381,10 @@ BOOL SfxErrorHandler::GetErrorString( BOOL bRet = FALSE; rStr=String(SvtResId(RID_ERRHDL_CLASS)); - ResId *pResId = new ResId(nId, *pMgr); + ResId aResId(nId, *pMgr); { - ErrorResource_Impl aEr(*pResId, (USHORT)lErrId); + ErrorResource_Impl aEr(aResId, (USHORT)lErrId); if(aEr) { ResString aErrorString(aEr); @@ -408,7 +410,6 @@ BOOL SfxErrorHandler::GetErrorString( rStr.SearchAndReplace(String::CreateFromAscii( "$(CLASS)" ),aErrStr); } - delete pResId; return bRet; } |