1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 29*cdf0e10cSrcweir #include "precompiled_linguistic.hxx" 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir #include "linguistic/misc.hxx" 32*cdf0e10cSrcweir 33*cdf0e10cSrcweir #include "sprophelp.hxx" 34*cdf0e10cSrcweir #include "linguistic/lngprops.hxx" 35*cdf0e10cSrcweir #include <tools/debug.hxx> 36*cdf0e10cSrcweir 37*cdf0e10cSrcweir #include <com/sun/star/linguistic2/LinguServiceEvent.hpp> 38*cdf0e10cSrcweir #include <com/sun/star/linguistic2/LinguServiceEventFlags.hpp> 39*cdf0e10cSrcweir #include <com/sun/star/linguistic2/XLinguServiceEventListener.hpp> 40*cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp> 41*cdf0e10cSrcweir #include <osl/mutex.hxx> 42*cdf0e10cSrcweir 43*cdf0e10cSrcweir //using namespace utl; 44*cdf0e10cSrcweir using namespace osl; 45*cdf0e10cSrcweir using namespace rtl; 46*cdf0e10cSrcweir using namespace com::sun::star; 47*cdf0e10cSrcweir using namespace com::sun::star::beans; 48*cdf0e10cSrcweir using namespace com::sun::star::lang; 49*cdf0e10cSrcweir using namespace com::sun::star::uno; 50*cdf0e10cSrcweir using namespace com::sun::star::linguistic2; 51*cdf0e10cSrcweir using namespace linguistic; 52*cdf0e10cSrcweir 53*cdf0e10cSrcweir 54*cdf0e10cSrcweir #define A2OU(x) ::rtl::OUString::createFromAscii( x ) 55*cdf0e10cSrcweir 56*cdf0e10cSrcweir /////////////////////////////////////////////////////////////////////////// 57*cdf0e10cSrcweir 58*cdf0e10cSrcweir 59*cdf0e10cSrcweir PropertyChgHelper::PropertyChgHelper( 60*cdf0e10cSrcweir const Reference< XInterface > & rxSource, 61*cdf0e10cSrcweir Reference< XPropertySet > &rxPropSet, 62*cdf0e10cSrcweir const char *pPropNames[], USHORT nPropCount ) : 63*cdf0e10cSrcweir xMyEvtObj (rxSource), 64*cdf0e10cSrcweir xPropSet (rxPropSet), 65*cdf0e10cSrcweir aPropNames (nPropCount), 66*cdf0e10cSrcweir aLngSvcEvtListeners (GetLinguMutex()) 67*cdf0e10cSrcweir { 68*cdf0e10cSrcweir OUString *pName = aPropNames.getArray(); 69*cdf0e10cSrcweir for (INT32 i = 0; i < nPropCount; ++i) 70*cdf0e10cSrcweir { 71*cdf0e10cSrcweir pName[i] = A2OU( pPropNames[i] ); 72*cdf0e10cSrcweir } 73*cdf0e10cSrcweir } 74*cdf0e10cSrcweir 75*cdf0e10cSrcweir 76*cdf0e10cSrcweir PropertyChgHelper::PropertyChgHelper( const PropertyChgHelper &rHelper ) : 77*cdf0e10cSrcweir aLngSvcEvtListeners (GetLinguMutex()) 78*cdf0e10cSrcweir { 79*cdf0e10cSrcweir xPropSet = rHelper.xPropSet; 80*cdf0e10cSrcweir aPropNames = rHelper.aPropNames; 81*cdf0e10cSrcweir AddAsPropListener(); 82*cdf0e10cSrcweir 83*cdf0e10cSrcweir xMyEvtObj = rHelper.xMyEvtObj; 84*cdf0e10cSrcweir } 85*cdf0e10cSrcweir 86*cdf0e10cSrcweir 87*cdf0e10cSrcweir PropertyChgHelper::~PropertyChgHelper() 88*cdf0e10cSrcweir { 89*cdf0e10cSrcweir } 90*cdf0e10cSrcweir 91*cdf0e10cSrcweir 92*cdf0e10cSrcweir void PropertyChgHelper::AddAsPropListener() 93*cdf0e10cSrcweir { 94*cdf0e10cSrcweir if (xPropSet.is()) 95*cdf0e10cSrcweir { 96*cdf0e10cSrcweir INT32 nLen = aPropNames.getLength(); 97*cdf0e10cSrcweir const OUString *pPropName = aPropNames.getConstArray(); 98*cdf0e10cSrcweir for (INT32 i = 0; i < nLen; ++i) 99*cdf0e10cSrcweir { 100*cdf0e10cSrcweir if (pPropName[i].getLength()) 101*cdf0e10cSrcweir xPropSet->addPropertyChangeListener( pPropName[i], this ); 102*cdf0e10cSrcweir } 103*cdf0e10cSrcweir } 104*cdf0e10cSrcweir } 105*cdf0e10cSrcweir 106*cdf0e10cSrcweir void PropertyChgHelper::RemoveAsPropListener() 107*cdf0e10cSrcweir { 108*cdf0e10cSrcweir if (xPropSet.is()) 109*cdf0e10cSrcweir { 110*cdf0e10cSrcweir INT32 nLen = aPropNames.getLength(); 111*cdf0e10cSrcweir const OUString *pPropName = aPropNames.getConstArray(); 112*cdf0e10cSrcweir for (INT32 i = 0; i < nLen; ++i) 113*cdf0e10cSrcweir { 114*cdf0e10cSrcweir if (pPropName[i].getLength()) 115*cdf0e10cSrcweir xPropSet->removePropertyChangeListener( pPropName[i], this ); 116*cdf0e10cSrcweir } 117*cdf0e10cSrcweir } 118*cdf0e10cSrcweir } 119*cdf0e10cSrcweir 120*cdf0e10cSrcweir 121*cdf0e10cSrcweir void PropertyChgHelper::LaunchEvent( const LinguServiceEvent &rEvt ) 122*cdf0e10cSrcweir { 123*cdf0e10cSrcweir cppu::OInterfaceIteratorHelper aIt( aLngSvcEvtListeners ); 124*cdf0e10cSrcweir while (aIt.hasMoreElements()) 125*cdf0e10cSrcweir { 126*cdf0e10cSrcweir Reference< XLinguServiceEventListener > xRef( aIt.next(), UNO_QUERY ); 127*cdf0e10cSrcweir if (xRef.is()) 128*cdf0e10cSrcweir xRef->processLinguServiceEvent( rEvt ); 129*cdf0e10cSrcweir } 130*cdf0e10cSrcweir } 131*cdf0e10cSrcweir 132*cdf0e10cSrcweir 133*cdf0e10cSrcweir void SAL_CALL PropertyChgHelper::disposing( const EventObject& rSource ) 134*cdf0e10cSrcweir throw(RuntimeException) 135*cdf0e10cSrcweir { 136*cdf0e10cSrcweir MutexGuard aGuard( GetLinguMutex() ); 137*cdf0e10cSrcweir if (rSource.Source == xPropSet) 138*cdf0e10cSrcweir { 139*cdf0e10cSrcweir RemoveAsPropListener(); 140*cdf0e10cSrcweir xPropSet = NULL; 141*cdf0e10cSrcweir aPropNames.realloc( 0 ); 142*cdf0e10cSrcweir } 143*cdf0e10cSrcweir } 144*cdf0e10cSrcweir 145*cdf0e10cSrcweir 146*cdf0e10cSrcweir sal_Bool SAL_CALL 147*cdf0e10cSrcweir PropertyChgHelper::addLinguServiceEventListener( 148*cdf0e10cSrcweir const Reference< XLinguServiceEventListener >& rxListener ) 149*cdf0e10cSrcweir throw(RuntimeException) 150*cdf0e10cSrcweir { 151*cdf0e10cSrcweir MutexGuard aGuard( GetLinguMutex() ); 152*cdf0e10cSrcweir 153*cdf0e10cSrcweir BOOL bRes = FALSE; 154*cdf0e10cSrcweir if (rxListener.is()) 155*cdf0e10cSrcweir { 156*cdf0e10cSrcweir INT32 nCount = aLngSvcEvtListeners.getLength(); 157*cdf0e10cSrcweir bRes = aLngSvcEvtListeners.addInterface( rxListener ) != nCount; 158*cdf0e10cSrcweir } 159*cdf0e10cSrcweir return bRes; 160*cdf0e10cSrcweir } 161*cdf0e10cSrcweir 162*cdf0e10cSrcweir 163*cdf0e10cSrcweir sal_Bool SAL_CALL 164*cdf0e10cSrcweir PropertyChgHelper::removeLinguServiceEventListener( 165*cdf0e10cSrcweir const Reference< XLinguServiceEventListener >& rxListener ) 166*cdf0e10cSrcweir throw(RuntimeException) 167*cdf0e10cSrcweir { 168*cdf0e10cSrcweir MutexGuard aGuard( GetLinguMutex() ); 169*cdf0e10cSrcweir 170*cdf0e10cSrcweir BOOL bRes = FALSE; 171*cdf0e10cSrcweir if (rxListener.is()) 172*cdf0e10cSrcweir { 173*cdf0e10cSrcweir INT32 nCount = aLngSvcEvtListeners.getLength(); 174*cdf0e10cSrcweir bRes = aLngSvcEvtListeners.removeInterface( rxListener ) != nCount; 175*cdf0e10cSrcweir } 176*cdf0e10cSrcweir return bRes; 177*cdf0e10cSrcweir } 178*cdf0e10cSrcweir 179*cdf0e10cSrcweir /////////////////////////////////////////////////////////////////////////// 180*cdf0e10cSrcweir 181*cdf0e10cSrcweir static const char *aSP[] = 182*cdf0e10cSrcweir { 183*cdf0e10cSrcweir UPN_IS_GERMAN_PRE_REFORM, 184*cdf0e10cSrcweir UPN_IS_IGNORE_CONTROL_CHARACTERS, 185*cdf0e10cSrcweir UPN_IS_USE_DICTIONARY_LIST, 186*cdf0e10cSrcweir UPN_IS_SPELL_UPPER_CASE, 187*cdf0e10cSrcweir UPN_IS_SPELL_WITH_DIGITS, 188*cdf0e10cSrcweir UPN_IS_SPELL_CAPITALIZATION 189*cdf0e10cSrcweir }; 190*cdf0e10cSrcweir 191*cdf0e10cSrcweir 192*cdf0e10cSrcweir PropertyHelper_Spell::PropertyHelper_Spell( 193*cdf0e10cSrcweir const Reference< XInterface > & rxSource, 194*cdf0e10cSrcweir Reference< XPropertySet > &rxPropSet ) : 195*cdf0e10cSrcweir PropertyChgHelper ( rxSource, rxPropSet, aSP, sizeof(aSP) / sizeof(aSP[0]) ) 196*cdf0e10cSrcweir { 197*cdf0e10cSrcweir SetDefault(); 198*cdf0e10cSrcweir INT32 nLen = GetPropNames().getLength(); 199*cdf0e10cSrcweir if (rxPropSet.is() && nLen) 200*cdf0e10cSrcweir { 201*cdf0e10cSrcweir const OUString *pPropName = GetPropNames().getConstArray(); 202*cdf0e10cSrcweir for (INT32 i = 0; i < nLen; ++i) 203*cdf0e10cSrcweir { 204*cdf0e10cSrcweir BOOL *pbVal = NULL, 205*cdf0e10cSrcweir *pbResVal = NULL; 206*cdf0e10cSrcweir 207*cdf0e10cSrcweir if (A2OU( UPN_IS_GERMAN_PRE_REFORM ) == pPropName[i]) 208*cdf0e10cSrcweir { 209*cdf0e10cSrcweir pbVal = &bIsGermanPreReform; 210*cdf0e10cSrcweir pbResVal = &bResIsGermanPreReform; 211*cdf0e10cSrcweir } 212*cdf0e10cSrcweir else if (A2OU( UPN_IS_IGNORE_CONTROL_CHARACTERS ) == pPropName[i]) 213*cdf0e10cSrcweir { 214*cdf0e10cSrcweir pbVal = &bIsIgnoreControlCharacters; 215*cdf0e10cSrcweir pbResVal = &bResIsIgnoreControlCharacters; 216*cdf0e10cSrcweir } 217*cdf0e10cSrcweir else if (A2OU( UPN_IS_USE_DICTIONARY_LIST ) == pPropName[i]) 218*cdf0e10cSrcweir { 219*cdf0e10cSrcweir pbVal = &bIsUseDictionaryList; 220*cdf0e10cSrcweir pbResVal = &bResIsUseDictionaryList; 221*cdf0e10cSrcweir } 222*cdf0e10cSrcweir else if (A2OU( UPN_IS_SPELL_UPPER_CASE ) == pPropName[i]) 223*cdf0e10cSrcweir { 224*cdf0e10cSrcweir pbVal = &bIsSpellUpperCase; 225*cdf0e10cSrcweir pbResVal = &bResIsSpellUpperCase; 226*cdf0e10cSrcweir } 227*cdf0e10cSrcweir else if (A2OU( UPN_IS_SPELL_WITH_DIGITS ) == pPropName[i]) 228*cdf0e10cSrcweir { 229*cdf0e10cSrcweir pbVal = &bIsSpellWithDigits; 230*cdf0e10cSrcweir pbResVal = &bResIsSpellWithDigits; 231*cdf0e10cSrcweir } 232*cdf0e10cSrcweir else if (A2OU( UPN_IS_SPELL_CAPITALIZATION ) == pPropName[i]) 233*cdf0e10cSrcweir { 234*cdf0e10cSrcweir pbVal = &bIsSpellCapitalization; 235*cdf0e10cSrcweir pbResVal = &bResIsSpellCapitalization; 236*cdf0e10cSrcweir } 237*cdf0e10cSrcweir 238*cdf0e10cSrcweir if (pbVal && pbResVal) 239*cdf0e10cSrcweir { 240*cdf0e10cSrcweir rxPropSet->getPropertyValue( pPropName[i] ) >>= *pbVal; 241*cdf0e10cSrcweir *pbResVal = *pbVal; 242*cdf0e10cSrcweir } 243*cdf0e10cSrcweir } 244*cdf0e10cSrcweir } 245*cdf0e10cSrcweir } 246*cdf0e10cSrcweir 247*cdf0e10cSrcweir 248*cdf0e10cSrcweir PropertyHelper_Spell::~PropertyHelper_Spell() 249*cdf0e10cSrcweir { 250*cdf0e10cSrcweir } 251*cdf0e10cSrcweir 252*cdf0e10cSrcweir 253*cdf0e10cSrcweir void PropertyHelper_Spell::SetDefault() 254*cdf0e10cSrcweir { 255*cdf0e10cSrcweir bResIsGermanPreReform = bIsGermanPreReform = FALSE; 256*cdf0e10cSrcweir bResIsIgnoreControlCharacters = bIsIgnoreControlCharacters = TRUE; 257*cdf0e10cSrcweir bResIsUseDictionaryList = bIsUseDictionaryList = TRUE; 258*cdf0e10cSrcweir bResIsSpellUpperCase = bIsSpellUpperCase = FALSE; 259*cdf0e10cSrcweir bResIsSpellWithDigits = bIsSpellWithDigits = FALSE; 260*cdf0e10cSrcweir bResIsSpellCapitalization = bIsSpellCapitalization = TRUE; 261*cdf0e10cSrcweir } 262*cdf0e10cSrcweir 263*cdf0e10cSrcweir 264*cdf0e10cSrcweir void SAL_CALL 265*cdf0e10cSrcweir PropertyHelper_Spell::propertyChange( const PropertyChangeEvent& rEvt ) 266*cdf0e10cSrcweir throw(RuntimeException) 267*cdf0e10cSrcweir { 268*cdf0e10cSrcweir MutexGuard aGuard( GetLinguMutex() ); 269*cdf0e10cSrcweir 270*cdf0e10cSrcweir if (GetPropSet().is() && rEvt.Source == GetPropSet()) 271*cdf0e10cSrcweir { 272*cdf0e10cSrcweir INT16 nLngSvcFlags = 0; 273*cdf0e10cSrcweir BOOL bSCWA = FALSE, // SPELL_CORRECT_WORDS_AGAIN ? 274*cdf0e10cSrcweir bSWWA = FALSE; // SPELL_WRONG_WORDS_AGAIN ? 275*cdf0e10cSrcweir 276*cdf0e10cSrcweir BOOL *pbVal = NULL; 277*cdf0e10cSrcweir switch (rEvt.PropertyHandle) 278*cdf0e10cSrcweir { 279*cdf0e10cSrcweir case UPH_IS_IGNORE_CONTROL_CHARACTERS : 280*cdf0e10cSrcweir { 281*cdf0e10cSrcweir pbVal = &bIsIgnoreControlCharacters; 282*cdf0e10cSrcweir break; 283*cdf0e10cSrcweir } 284*cdf0e10cSrcweir case UPH_IS_GERMAN_PRE_REFORM : 285*cdf0e10cSrcweir { 286*cdf0e10cSrcweir pbVal = &bIsGermanPreReform; 287*cdf0e10cSrcweir bSCWA = bSWWA = TRUE; 288*cdf0e10cSrcweir break; 289*cdf0e10cSrcweir } 290*cdf0e10cSrcweir case UPH_IS_USE_DICTIONARY_LIST : 291*cdf0e10cSrcweir { 292*cdf0e10cSrcweir pbVal = &bIsUseDictionaryList; 293*cdf0e10cSrcweir bSCWA = bSWWA = TRUE; 294*cdf0e10cSrcweir break; 295*cdf0e10cSrcweir } 296*cdf0e10cSrcweir case UPH_IS_SPELL_UPPER_CASE : 297*cdf0e10cSrcweir { 298*cdf0e10cSrcweir pbVal = &bIsSpellUpperCase; 299*cdf0e10cSrcweir bSCWA = FALSE == *pbVal; // FALSE->TRUE change? 300*cdf0e10cSrcweir bSWWA = !bSCWA; // TRUE->FALSE change? 301*cdf0e10cSrcweir break; 302*cdf0e10cSrcweir } 303*cdf0e10cSrcweir case UPH_IS_SPELL_WITH_DIGITS : 304*cdf0e10cSrcweir { 305*cdf0e10cSrcweir pbVal = &bIsSpellWithDigits; 306*cdf0e10cSrcweir bSCWA = FALSE == *pbVal; // FALSE->TRUE change? 307*cdf0e10cSrcweir bSWWA = !bSCWA; // TRUE->FALSE change? 308*cdf0e10cSrcweir break; 309*cdf0e10cSrcweir } 310*cdf0e10cSrcweir case UPH_IS_SPELL_CAPITALIZATION : 311*cdf0e10cSrcweir { 312*cdf0e10cSrcweir pbVal = &bIsSpellCapitalization; 313*cdf0e10cSrcweir bSCWA = FALSE == *pbVal; // FALSE->TRUE change? 314*cdf0e10cSrcweir bSWWA = !bSCWA; // TRUE->FALSE change? 315*cdf0e10cSrcweir break; 316*cdf0e10cSrcweir } 317*cdf0e10cSrcweir default: 318*cdf0e10cSrcweir DBG_ERROR( "unknown property" ); 319*cdf0e10cSrcweir } 320*cdf0e10cSrcweir if (pbVal) 321*cdf0e10cSrcweir rEvt.NewValue >>= *pbVal; 322*cdf0e10cSrcweir 323*cdf0e10cSrcweir if (bSCWA) 324*cdf0e10cSrcweir nLngSvcFlags |= LinguServiceEventFlags::SPELL_CORRECT_WORDS_AGAIN; 325*cdf0e10cSrcweir if (bSWWA) 326*cdf0e10cSrcweir nLngSvcFlags |= LinguServiceEventFlags::SPELL_WRONG_WORDS_AGAIN; 327*cdf0e10cSrcweir if (nLngSvcFlags) 328*cdf0e10cSrcweir { 329*cdf0e10cSrcweir LinguServiceEvent aEvt( GetEvtObj(), nLngSvcFlags ); 330*cdf0e10cSrcweir LaunchEvent( aEvt ); 331*cdf0e10cSrcweir } 332*cdf0e10cSrcweir } 333*cdf0e10cSrcweir } 334*cdf0e10cSrcweir 335*cdf0e10cSrcweir 336*cdf0e10cSrcweir void PropertyHelper_Spell::SetTmpPropVals( const PropertyValues &rPropVals ) 337*cdf0e10cSrcweir { 338*cdf0e10cSrcweir // set return value to default value unless there is an 339*cdf0e10cSrcweir // explicitly supplied temporary value 340*cdf0e10cSrcweir bResIsGermanPreReform = bIsGermanPreReform; 341*cdf0e10cSrcweir bResIsIgnoreControlCharacters = bIsIgnoreControlCharacters; 342*cdf0e10cSrcweir bResIsUseDictionaryList = bIsUseDictionaryList; 343*cdf0e10cSrcweir bResIsSpellUpperCase = bIsSpellUpperCase; 344*cdf0e10cSrcweir bResIsSpellWithDigits = bIsSpellWithDigits; 345*cdf0e10cSrcweir bResIsSpellCapitalization = bIsSpellCapitalization; 346*cdf0e10cSrcweir // 347*cdf0e10cSrcweir INT32 nLen = rPropVals.getLength(); 348*cdf0e10cSrcweir if (nLen) 349*cdf0e10cSrcweir { 350*cdf0e10cSrcweir const PropertyValue *pVal = rPropVals.getConstArray(); 351*cdf0e10cSrcweir for (INT32 i = 0; i < nLen; ++i) 352*cdf0e10cSrcweir { 353*cdf0e10cSrcweir BOOL *pbResVal = NULL; 354*cdf0e10cSrcweir switch (pVal[i].Handle) 355*cdf0e10cSrcweir { 356*cdf0e10cSrcweir case UPH_IS_GERMAN_PRE_REFORM : pbResVal = &bResIsGermanPreReform; break; 357*cdf0e10cSrcweir case UPH_IS_IGNORE_CONTROL_CHARACTERS : pbResVal = &bResIsIgnoreControlCharacters; break; 358*cdf0e10cSrcweir case UPH_IS_USE_DICTIONARY_LIST : pbResVal = &bResIsUseDictionaryList; break; 359*cdf0e10cSrcweir case UPH_IS_SPELL_UPPER_CASE : pbResVal = &bResIsSpellUpperCase; break; 360*cdf0e10cSrcweir case UPH_IS_SPELL_WITH_DIGITS : pbResVal = &bResIsSpellWithDigits; break; 361*cdf0e10cSrcweir case UPH_IS_SPELL_CAPITALIZATION : pbResVal = &bResIsSpellCapitalization; break; 362*cdf0e10cSrcweir default: 363*cdf0e10cSrcweir DBG_ERROR( "unknown property" ); 364*cdf0e10cSrcweir } 365*cdf0e10cSrcweir if (pbResVal) 366*cdf0e10cSrcweir pVal[i].Value >>= *pbResVal; 367*cdf0e10cSrcweir } 368*cdf0e10cSrcweir } 369*cdf0e10cSrcweir } 370*cdf0e10cSrcweir 371*cdf0e10cSrcweir /////////////////////////////////////////////////////////////////////////// 372*cdf0e10cSrcweir 373