diff options
Diffstat (limited to 'linguistic/workben/sprophelp.cxx')
-rwxr-xr-x[-rw-r--r--] | linguistic/workben/sprophelp.cxx | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/linguistic/workben/sprophelp.cxx b/linguistic/workben/sprophelp.cxx index dcfa1d240cde..f9b3441889d2 100644..100755 --- a/linguistic/workben/sprophelp.cxx +++ b/linguistic/workben/sprophelp.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,6 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_linguistic.hxx" +#include <sal/macros.h> #include "linguistic/misc.hxx" #include "sprophelp.hxx" @@ -40,9 +42,7 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <osl/mutex.hxx> -//using namespace utl; using namespace osl; -using namespace rtl; using namespace com::sun::star; using namespace com::sun::star::beans; using namespace com::sun::star::lang; @@ -50,8 +50,9 @@ using namespace com::sun::star::uno; using namespace com::sun::star::linguistic2; using namespace linguistic; +using ::rtl::OUString; -#define A2OU(x) ::rtl::OUString::createFromAscii( x ) +#define A2OU(x) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( x )) /////////////////////////////////////////////////////////////////////////// @@ -68,7 +69,7 @@ PropertyChgHelper::PropertyChgHelper( OUString *pName = aPropNames.getArray(); for (INT32 i = 0; i < nPropCount; ++i) { - pName[i] = A2OU( pPropNames[i] ); + pName[i] = ::rtl::OUString::createFromAscii( pPropNames[i] ); } } @@ -192,7 +193,7 @@ static const char *aSP[] = PropertyHelper_Spell::PropertyHelper_Spell( const Reference< XInterface > & rxSource, Reference< XPropertySet > &rxPropSet ) : - PropertyChgHelper ( rxSource, rxPropSet, aSP, sizeof(aSP) / sizeof(aSP[0]) ) + PropertyChgHelper ( rxSource, rxPropSet, aSP, SAL_N_ELEMENTS(aSP)) { SetDefault(); INT32 nLen = GetPropNames().getLength(); @@ -315,7 +316,7 @@ void SAL_CALL break; } default: - DBG_ERROR( "unknown property" ); + OSL_FAIL( "unknown property" ); } if (pbVal) rEvt.NewValue >>= *pbVal; @@ -343,7 +344,7 @@ void PropertyHelper_Spell::SetTmpPropVals( const PropertyValues &rPropVals ) bResIsSpellUpperCase = bIsSpellUpperCase; bResIsSpellWithDigits = bIsSpellWithDigits; bResIsSpellCapitalization = bIsSpellCapitalization; - // + INT32 nLen = rPropVals.getLength(); if (nLen) { @@ -360,7 +361,7 @@ void PropertyHelper_Spell::SetTmpPropVals( const PropertyValues &rPropVals ) case UPH_IS_SPELL_WITH_DIGITS : pbResVal = &bResIsSpellWithDigits; break; case UPH_IS_SPELL_CAPITALIZATION : pbResVal = &bResIsSpellCapitalization; break; default: - DBG_ERROR( "unknown property" ); + OSL_FAIL( "unknown property" ); } if (pbResVal) pVal[i].Value >>= *pbResVal; @@ -370,3 +371,4 @@ void PropertyHelper_Spell::SetTmpPropVals( const PropertyValues &rPropVals ) /////////////////////////////////////////////////////////////////////////// +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |