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_extensions.hxx" 30*cdf0e10cSrcweir #include "editpropertyhandler.hxx" 31*cdf0e10cSrcweir #include "formstrings.hxx" 32*cdf0e10cSrcweir #include "formmetadata.hxx" 33*cdf0e10cSrcweir 34*cdf0e10cSrcweir /** === begin UNO includes === **/ 35*cdf0e10cSrcweir #include <com/sun/star/inspection/XObjectInspectorUI.hpp> 36*cdf0e10cSrcweir /** === end UNO includes === **/ 37*cdf0e10cSrcweir #include <tools/debug.hxx> 38*cdf0e10cSrcweir 39*cdf0e10cSrcweir #define TEXTTYPE_SINGLELINE 0 40*cdf0e10cSrcweir #define TEXTTYPE_MULTILINE 1 41*cdf0e10cSrcweir #define TEXTTYPE_RICHTEXT 2 42*cdf0e10cSrcweir 43*cdf0e10cSrcweir //------------------------------------------------------------------------ 44*cdf0e10cSrcweir extern "C" void SAL_CALL createRegistryInfo_EditPropertyHandler() 45*cdf0e10cSrcweir { 46*cdf0e10cSrcweir ::pcr::EditPropertyHandler::registerImplementation(); 47*cdf0e10cSrcweir } 48*cdf0e10cSrcweir 49*cdf0e10cSrcweir //........................................................................ 50*cdf0e10cSrcweir namespace pcr 51*cdf0e10cSrcweir { 52*cdf0e10cSrcweir //........................................................................ 53*cdf0e10cSrcweir 54*cdf0e10cSrcweir using namespace ::com::sun::star::uno; 55*cdf0e10cSrcweir using namespace ::com::sun::star::lang; 56*cdf0e10cSrcweir using namespace ::com::sun::star::beans; 57*cdf0e10cSrcweir using namespace ::com::sun::star::script; 58*cdf0e10cSrcweir using namespace ::com::sun::star::frame; 59*cdf0e10cSrcweir using namespace ::com::sun::star::inspection; 60*cdf0e10cSrcweir 61*cdf0e10cSrcweir //==================================================================== 62*cdf0e10cSrcweir //= EditPropertyHandler 63*cdf0e10cSrcweir //==================================================================== 64*cdf0e10cSrcweir DBG_NAME( EditPropertyHandler ) 65*cdf0e10cSrcweir //-------------------------------------------------------------------- 66*cdf0e10cSrcweir EditPropertyHandler::EditPropertyHandler( const Reference< XComponentContext >& _rxContext ) 67*cdf0e10cSrcweir :EditPropertyHandler_Base( _rxContext ) 68*cdf0e10cSrcweir { 69*cdf0e10cSrcweir DBG_CTOR( EditPropertyHandler, NULL ); 70*cdf0e10cSrcweir } 71*cdf0e10cSrcweir 72*cdf0e10cSrcweir //-------------------------------------------------------------------- 73*cdf0e10cSrcweir EditPropertyHandler::~EditPropertyHandler( ) 74*cdf0e10cSrcweir { 75*cdf0e10cSrcweir DBG_DTOR( EditPropertyHandler, NULL ); 76*cdf0e10cSrcweir } 77*cdf0e10cSrcweir 78*cdf0e10cSrcweir //-------------------------------------------------------------------- 79*cdf0e10cSrcweir ::rtl::OUString SAL_CALL EditPropertyHandler::getImplementationName_static( ) throw (RuntimeException) 80*cdf0e10cSrcweir { 81*cdf0e10cSrcweir return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.extensions.EditPropertyHandler" ) ); 82*cdf0e10cSrcweir } 83*cdf0e10cSrcweir 84*cdf0e10cSrcweir //-------------------------------------------------------------------- 85*cdf0e10cSrcweir Sequence< ::rtl::OUString > SAL_CALL EditPropertyHandler::getSupportedServiceNames_static( ) throw (RuntimeException) 86*cdf0e10cSrcweir { 87*cdf0e10cSrcweir Sequence< ::rtl::OUString > aSupported( 1 ); 88*cdf0e10cSrcweir aSupported[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.inspection.EditPropertyHandler" ) ); 89*cdf0e10cSrcweir return aSupported; 90*cdf0e10cSrcweir } 91*cdf0e10cSrcweir 92*cdf0e10cSrcweir //-------------------------------------------------------------------- 93*cdf0e10cSrcweir Any SAL_CALL EditPropertyHandler::getPropertyValue( const ::rtl::OUString& _rPropertyName ) throw (UnknownPropertyException, RuntimeException) 94*cdf0e10cSrcweir { 95*cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_aMutex ); 96*cdf0e10cSrcweir PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) ); 97*cdf0e10cSrcweir 98*cdf0e10cSrcweir Any aReturn; 99*cdf0e10cSrcweir try 100*cdf0e10cSrcweir { 101*cdf0e10cSrcweir switch ( nPropId ) 102*cdf0e10cSrcweir { 103*cdf0e10cSrcweir case PROPERTY_ID_SHOW_SCROLLBARS: 104*cdf0e10cSrcweir { 105*cdf0e10cSrcweir sal_Bool bHasVScroll = sal_False; 106*cdf0e10cSrcweir m_xComponent->getPropertyValue( PROPERTY_VSCROLL ) >>= bHasVScroll; 107*cdf0e10cSrcweir sal_Bool bHasHScroll = sal_False; 108*cdf0e10cSrcweir m_xComponent->getPropertyValue( PROPERTY_HSCROLL ) >>= bHasHScroll; 109*cdf0e10cSrcweir 110*cdf0e10cSrcweir aReturn <<= (sal_Int32)( ( bHasVScroll ? 2 : 0 ) + ( bHasHScroll ? 1 : 0 ) ); 111*cdf0e10cSrcweir } 112*cdf0e10cSrcweir break; 113*cdf0e10cSrcweir 114*cdf0e10cSrcweir case PROPERTY_ID_TEXTTYPE: 115*cdf0e10cSrcweir { 116*cdf0e10cSrcweir sal_Int32 nTextType = TEXTTYPE_SINGLELINE; 117*cdf0e10cSrcweir sal_Bool bRichText = sal_False; 118*cdf0e10cSrcweir OSL_VERIFY( m_xComponent->getPropertyValue( PROPERTY_RICHTEXT ) >>= bRichText ); 119*cdf0e10cSrcweir if ( bRichText ) 120*cdf0e10cSrcweir nTextType = TEXTTYPE_RICHTEXT; 121*cdf0e10cSrcweir else 122*cdf0e10cSrcweir { 123*cdf0e10cSrcweir sal_Bool bMultiLine = sal_False; 124*cdf0e10cSrcweir OSL_VERIFY( m_xComponent->getPropertyValue( PROPERTY_MULTILINE ) >>= bMultiLine ); 125*cdf0e10cSrcweir if ( bMultiLine ) 126*cdf0e10cSrcweir nTextType = TEXTTYPE_MULTILINE; 127*cdf0e10cSrcweir else 128*cdf0e10cSrcweir nTextType = TEXTTYPE_SINGLELINE; 129*cdf0e10cSrcweir } 130*cdf0e10cSrcweir aReturn <<= nTextType; 131*cdf0e10cSrcweir } 132*cdf0e10cSrcweir break; 133*cdf0e10cSrcweir 134*cdf0e10cSrcweir 135*cdf0e10cSrcweir default: 136*cdf0e10cSrcweir DBG_ERROR( "EditPropertyHandler::getPropertyValue: cannot handle this property!" ); 137*cdf0e10cSrcweir break; 138*cdf0e10cSrcweir } 139*cdf0e10cSrcweir } 140*cdf0e10cSrcweir catch( const Exception& ) 141*cdf0e10cSrcweir { 142*cdf0e10cSrcweir OSL_ENSURE( sal_False, "EditPropertyHandler::getPropertyValue: caught an exception!" ); 143*cdf0e10cSrcweir } 144*cdf0e10cSrcweir 145*cdf0e10cSrcweir return aReturn; 146*cdf0e10cSrcweir } 147*cdf0e10cSrcweir 148*cdf0e10cSrcweir //-------------------------------------------------------------------- 149*cdf0e10cSrcweir void SAL_CALL EditPropertyHandler::setPropertyValue( const ::rtl::OUString& _rPropertyName, const Any& _rValue ) throw (UnknownPropertyException, RuntimeException) 150*cdf0e10cSrcweir { 151*cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_aMutex ); 152*cdf0e10cSrcweir PropertyId nPropId( impl_getPropertyId_throw( _rPropertyName ) ); 153*cdf0e10cSrcweir 154*cdf0e10cSrcweir try 155*cdf0e10cSrcweir { 156*cdf0e10cSrcweir switch ( nPropId ) 157*cdf0e10cSrcweir { 158*cdf0e10cSrcweir case PROPERTY_ID_SHOW_SCROLLBARS: 159*cdf0e10cSrcweir { 160*cdf0e10cSrcweir sal_Int32 nScrollbars = 0; 161*cdf0e10cSrcweir _rValue >>= nScrollbars; 162*cdf0e10cSrcweir 163*cdf0e10cSrcweir sal_Bool bHasVScroll = 0 != ( nScrollbars & 2 ); 164*cdf0e10cSrcweir sal_Bool bHasHScroll = 0 != ( nScrollbars & 1 ); 165*cdf0e10cSrcweir 166*cdf0e10cSrcweir m_xComponent->setPropertyValue( PROPERTY_VSCROLL, makeAny( (sal_Bool)bHasVScroll ) ); 167*cdf0e10cSrcweir m_xComponent->setPropertyValue( PROPERTY_HSCROLL, makeAny( (sal_Bool)bHasHScroll ) ); 168*cdf0e10cSrcweir } 169*cdf0e10cSrcweir break; 170*cdf0e10cSrcweir 171*cdf0e10cSrcweir case PROPERTY_ID_TEXTTYPE: 172*cdf0e10cSrcweir { 173*cdf0e10cSrcweir sal_Bool bMultiLine = sal_False; 174*cdf0e10cSrcweir sal_Bool bRichText = sal_False; 175*cdf0e10cSrcweir sal_Int32 nTextType = TEXTTYPE_SINGLELINE; 176*cdf0e10cSrcweir OSL_VERIFY( _rValue >>= nTextType ); 177*cdf0e10cSrcweir switch ( nTextType ) 178*cdf0e10cSrcweir { 179*cdf0e10cSrcweir case TEXTTYPE_SINGLELINE: bMultiLine = bRichText = sal_False; break; 180*cdf0e10cSrcweir case TEXTTYPE_MULTILINE: bMultiLine = sal_True; bRichText = sal_False; break; 181*cdf0e10cSrcweir case TEXTTYPE_RICHTEXT: bMultiLine = sal_True; bRichText = sal_True; break; 182*cdf0e10cSrcweir default: 183*cdf0e10cSrcweir OSL_ENSURE( sal_False, "EditPropertyHandler::setPropertyValue: invalid text type!" ); 184*cdf0e10cSrcweir } 185*cdf0e10cSrcweir 186*cdf0e10cSrcweir m_xComponent->setPropertyValue( PROPERTY_MULTILINE, makeAny( bMultiLine ) ); 187*cdf0e10cSrcweir m_xComponent->setPropertyValue( PROPERTY_RICHTEXT, makeAny( bRichText ) ); 188*cdf0e10cSrcweir } 189*cdf0e10cSrcweir break; 190*cdf0e10cSrcweir 191*cdf0e10cSrcweir default: 192*cdf0e10cSrcweir OSL_ENSURE( sal_False, "EditPropertyHandler::setPropertyValue: cannot handle this id!" ); 193*cdf0e10cSrcweir } 194*cdf0e10cSrcweir } 195*cdf0e10cSrcweir catch( const Exception& ) 196*cdf0e10cSrcweir { 197*cdf0e10cSrcweir OSL_ENSURE( sal_False, "EditPropertyHandler::setPropertyValue: caught an exception!" ); 198*cdf0e10cSrcweir } 199*cdf0e10cSrcweir } 200*cdf0e10cSrcweir 201*cdf0e10cSrcweir //-------------------------------------------------------------------- 202*cdf0e10cSrcweir bool EditPropertyHandler::implHaveBothScrollBarProperties() const 203*cdf0e10cSrcweir { 204*cdf0e10cSrcweir // have a "Scrollbars" property if the object supports both "HScroll" and "VScroll" 205*cdf0e10cSrcweir Reference< XPropertySetInfo > xPSI; 206*cdf0e10cSrcweir if ( m_xComponent.is() ) 207*cdf0e10cSrcweir xPSI = m_xComponent->getPropertySetInfo(); 208*cdf0e10cSrcweir 209*cdf0e10cSrcweir return xPSI.is() 210*cdf0e10cSrcweir && xPSI->hasPropertyByName( PROPERTY_HSCROLL ) 211*cdf0e10cSrcweir && xPSI->hasPropertyByName( PROPERTY_VSCROLL ); 212*cdf0e10cSrcweir } 213*cdf0e10cSrcweir 214*cdf0e10cSrcweir //-------------------------------------------------------------------- 215*cdf0e10cSrcweir bool EditPropertyHandler::implHaveTextTypeProperty() const 216*cdf0e10cSrcweir { 217*cdf0e10cSrcweir // have a "Scrollbars" property if the object supports both "HScroll" and "VScroll" 218*cdf0e10cSrcweir Reference< XPropertySetInfo > xPSI; 219*cdf0e10cSrcweir if ( m_xComponent.is() ) 220*cdf0e10cSrcweir xPSI = m_xComponent->getPropertySetInfo(); 221*cdf0e10cSrcweir 222*cdf0e10cSrcweir return xPSI.is() 223*cdf0e10cSrcweir && xPSI->hasPropertyByName( PROPERTY_RICHTEXT ) 224*cdf0e10cSrcweir && xPSI->hasPropertyByName( PROPERTY_MULTILINE ); 225*cdf0e10cSrcweir } 226*cdf0e10cSrcweir 227*cdf0e10cSrcweir //-------------------------------------------------------------------- 228*cdf0e10cSrcweir Sequence< Property > SAL_CALL EditPropertyHandler::doDescribeSupportedProperties() const 229*cdf0e10cSrcweir { 230*cdf0e10cSrcweir ::std::vector< Property > aProperties; 231*cdf0e10cSrcweir 232*cdf0e10cSrcweir if ( implHaveBothScrollBarProperties() ) 233*cdf0e10cSrcweir addInt32PropertyDescription( aProperties, PROPERTY_SHOW_SCROLLBARS ); 234*cdf0e10cSrcweir 235*cdf0e10cSrcweir if ( implHaveTextTypeProperty() ) 236*cdf0e10cSrcweir addInt32PropertyDescription( aProperties, PROPERTY_TEXTTYPE ); 237*cdf0e10cSrcweir 238*cdf0e10cSrcweir if ( aProperties.empty() ) 239*cdf0e10cSrcweir return Sequence< Property >(); 240*cdf0e10cSrcweir return Sequence< Property >( &(*aProperties.begin()), aProperties.size() ); 241*cdf0e10cSrcweir } 242*cdf0e10cSrcweir 243*cdf0e10cSrcweir //-------------------------------------------------------------------- 244*cdf0e10cSrcweir Sequence< ::rtl::OUString > SAL_CALL EditPropertyHandler::getSupersededProperties( ) throw (RuntimeException) 245*cdf0e10cSrcweir { 246*cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_aMutex ); 247*cdf0e10cSrcweir ::std::vector< ::rtl::OUString > aSuperseded; 248*cdf0e10cSrcweir if ( implHaveBothScrollBarProperties() ) 249*cdf0e10cSrcweir { 250*cdf0e10cSrcweir aSuperseded.push_back( PROPERTY_HSCROLL ); 251*cdf0e10cSrcweir aSuperseded.push_back( PROPERTY_VSCROLL ); 252*cdf0e10cSrcweir } 253*cdf0e10cSrcweir if ( implHaveTextTypeProperty() ) 254*cdf0e10cSrcweir { 255*cdf0e10cSrcweir aSuperseded.push_back( PROPERTY_RICHTEXT ); 256*cdf0e10cSrcweir aSuperseded.push_back( PROPERTY_MULTILINE ); 257*cdf0e10cSrcweir } 258*cdf0e10cSrcweir if ( aSuperseded.empty() ) 259*cdf0e10cSrcweir return Sequence< ::rtl::OUString >(); 260*cdf0e10cSrcweir return Sequence< ::rtl::OUString >( &(*aSuperseded.begin()), aSuperseded.size() ); 261*cdf0e10cSrcweir } 262*cdf0e10cSrcweir 263*cdf0e10cSrcweir //-------------------------------------------------------------------- 264*cdf0e10cSrcweir Sequence< ::rtl::OUString > SAL_CALL EditPropertyHandler::getActuatingProperties( ) throw (RuntimeException) 265*cdf0e10cSrcweir { 266*cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_aMutex ); 267*cdf0e10cSrcweir ::std::vector< ::rtl::OUString > aInterestingActuatingProps; 268*cdf0e10cSrcweir if ( implHaveTextTypeProperty() ) 269*cdf0e10cSrcweir aInterestingActuatingProps.push_back( PROPERTY_TEXTTYPE ); 270*cdf0e10cSrcweir aInterestingActuatingProps.push_back( PROPERTY_MULTILINE ); 271*cdf0e10cSrcweir return Sequence< ::rtl::OUString >( &(*aInterestingActuatingProps.begin()), aInterestingActuatingProps.size() );; 272*cdf0e10cSrcweir } 273*cdf0e10cSrcweir 274*cdf0e10cSrcweir //-------------------------------------------------------------------- 275*cdf0e10cSrcweir void SAL_CALL EditPropertyHandler::actuatingPropertyChanged( const ::rtl::OUString& _rActuatingPropertyName, const Any& _rNewValue, const Any& /*_rOldValue*/, const Reference< XObjectInspectorUI >& _rxInspectorUI, sal_Bool ) throw (NullPointerException, RuntimeException) 276*cdf0e10cSrcweir { 277*cdf0e10cSrcweir if ( !_rxInspectorUI.is() ) 278*cdf0e10cSrcweir throw NullPointerException(); 279*cdf0e10cSrcweir 280*cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_aMutex ); 281*cdf0e10cSrcweir PropertyId nActuatingPropId( impl_getPropertyId_throw( _rActuatingPropertyName ) ); 282*cdf0e10cSrcweir switch ( nActuatingPropId ) 283*cdf0e10cSrcweir { 284*cdf0e10cSrcweir case PROPERTY_ID_TEXTTYPE: 285*cdf0e10cSrcweir { 286*cdf0e10cSrcweir sal_Int32 nTextType = TEXTTYPE_SINGLELINE; 287*cdf0e10cSrcweir getPropertyValue( PROPERTY_TEXTTYPE ) >>= nTextType; 288*cdf0e10cSrcweir 289*cdf0e10cSrcweir if ( impl_isSupportedProperty_nothrow( PROPERTY_ID_WORDBREAK ) ) 290*cdf0e10cSrcweir _rxInspectorUI->enablePropertyUI( PROPERTY_WORDBREAK, nTextType == TEXTTYPE_RICHTEXT ); 291*cdf0e10cSrcweir _rxInspectorUI->enablePropertyUI( PROPERTY_MAXTEXTLEN, nTextType != TEXTTYPE_RICHTEXT ); 292*cdf0e10cSrcweir _rxInspectorUI->enablePropertyUI( PROPERTY_ECHO_CHAR, nTextType == TEXTTYPE_SINGLELINE ); 293*cdf0e10cSrcweir _rxInspectorUI->enablePropertyUI( PROPERTY_FONT, nTextType != TEXTTYPE_RICHTEXT ); 294*cdf0e10cSrcweir _rxInspectorUI->enablePropertyUI( PROPERTY_ALIGN, nTextType != TEXTTYPE_RICHTEXT ); 295*cdf0e10cSrcweir _rxInspectorUI->enablePropertyUI( PROPERTY_DEFAULT_TEXT, nTextType != TEXTTYPE_RICHTEXT ); 296*cdf0e10cSrcweir _rxInspectorUI->enablePropertyUI( PROPERTY_SHOW_SCROLLBARS, nTextType != TEXTTYPE_SINGLELINE ); 297*cdf0e10cSrcweir _rxInspectorUI->enablePropertyUI( PROPERTY_LINEEND_FORMAT, nTextType != TEXTTYPE_SINGLELINE ); 298*cdf0e10cSrcweir _rxInspectorUI->enablePropertyUI( PROPERTY_VERTICAL_ALIGN, nTextType == TEXTTYPE_SINGLELINE ); 299*cdf0e10cSrcweir 300*cdf0e10cSrcweir _rxInspectorUI->showCategory( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Data" ) ), nTextType != TEXTTYPE_RICHTEXT ); 301*cdf0e10cSrcweir } 302*cdf0e10cSrcweir break; 303*cdf0e10cSrcweir 304*cdf0e10cSrcweir case PROPERTY_ID_MULTILINE: 305*cdf0e10cSrcweir { 306*cdf0e10cSrcweir sal_Bool bIsMultiline = sal_False; 307*cdf0e10cSrcweir _rNewValue >>= bIsMultiline; 308*cdf0e10cSrcweir 309*cdf0e10cSrcweir _rxInspectorUI->enablePropertyUI( PROPERTY_SHOW_SCROLLBARS, bIsMultiline ); 310*cdf0e10cSrcweir _rxInspectorUI->enablePropertyUI( PROPERTY_ECHO_CHAR, !bIsMultiline ); 311*cdf0e10cSrcweir _rxInspectorUI->enablePropertyUI( PROPERTY_LINEEND_FORMAT, bIsMultiline ); 312*cdf0e10cSrcweir } 313*cdf0e10cSrcweir break; 314*cdf0e10cSrcweir 315*cdf0e10cSrcweir default: 316*cdf0e10cSrcweir OSL_ENSURE( sal_False, "EditPropertyHandler::actuatingPropertyChanged: cannot handle this id!" ); 317*cdf0e10cSrcweir } 318*cdf0e10cSrcweir } 319*cdf0e10cSrcweir 320*cdf0e10cSrcweir //........................................................................ 321*cdf0e10cSrcweir } // namespace pcr 322*cdf0e10cSrcweir //........................................................................ 323*cdf0e10cSrcweir 324