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_svx.hxx" 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir #include <com/sun/star/lang/DisposedException.hpp> 32*cdf0e10cSrcweir 33*cdf0e10cSrcweir #include "cell.hxx" 34*cdf0e10cSrcweir #include "tablerow.hxx" 35*cdf0e10cSrcweir #include "tableundo.hxx" 36*cdf0e10cSrcweir #include "svx/svdmodel.hxx" 37*cdf0e10cSrcweir #include "svx/svdotable.hxx" 38*cdf0e10cSrcweir 39*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 40*cdf0e10cSrcweir 41*cdf0e10cSrcweir using ::rtl::OUString; 42*cdf0e10cSrcweir using namespace ::com::sun::star::uno; 43*cdf0e10cSrcweir using namespace ::com::sun::star::lang; 44*cdf0e10cSrcweir using namespace ::com::sun::star::container; 45*cdf0e10cSrcweir using namespace ::com::sun::star::table; 46*cdf0e10cSrcweir using namespace ::com::sun::star::beans; 47*cdf0e10cSrcweir 48*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 49*cdf0e10cSrcweir 50*cdf0e10cSrcweir namespace sdr { namespace table { 51*cdf0e10cSrcweir 52*cdf0e10cSrcweir const sal_Int32 Property_Height = 0; 53*cdf0e10cSrcweir const sal_Int32 Property_OptimalHeight = 1; 54*cdf0e10cSrcweir const sal_Int32 Property_IsVisible = 2; 55*cdf0e10cSrcweir const sal_Int32 Property_IsStartOfNewPage = 3; 56*cdf0e10cSrcweir 57*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 58*cdf0e10cSrcweir // TableRow 59*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 60*cdf0e10cSrcweir 61*cdf0e10cSrcweir TableRow::TableRow( const TableModelRef& xTableModel, sal_Int32 nRow, sal_Int32 nColumns ) 62*cdf0e10cSrcweir : TableRowBase( getStaticPropertySetInfo() ) 63*cdf0e10cSrcweir , mxTableModel( xTableModel ) 64*cdf0e10cSrcweir , mnRow( nRow ) 65*cdf0e10cSrcweir , mnHeight( 0 ) 66*cdf0e10cSrcweir , mbOptimalHeight( sal_True ) 67*cdf0e10cSrcweir , mbIsVisible( sal_True ) 68*cdf0e10cSrcweir , mbIsStartOfNewPage( sal_False ) 69*cdf0e10cSrcweir { 70*cdf0e10cSrcweir if( nColumns < 20 ) 71*cdf0e10cSrcweir maCells.reserve( 20 ); 72*cdf0e10cSrcweir 73*cdf0e10cSrcweir if( nColumns ) 74*cdf0e10cSrcweir { 75*cdf0e10cSrcweir maCells.resize( nColumns ); 76*cdf0e10cSrcweir while( nColumns-- ) 77*cdf0e10cSrcweir maCells[ nColumns ] = mxTableModel->createCell(); 78*cdf0e10cSrcweir } 79*cdf0e10cSrcweir } 80*cdf0e10cSrcweir 81*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 82*cdf0e10cSrcweir 83*cdf0e10cSrcweir TableRow::~TableRow() 84*cdf0e10cSrcweir { 85*cdf0e10cSrcweir } 86*cdf0e10cSrcweir 87*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 88*cdf0e10cSrcweir 89*cdf0e10cSrcweir void TableRow::dispose() 90*cdf0e10cSrcweir { 91*cdf0e10cSrcweir mxTableModel.clear(); 92*cdf0e10cSrcweir if( !maCells.empty() ) 93*cdf0e10cSrcweir { 94*cdf0e10cSrcweir CellVector::iterator aIter( maCells.begin() ); 95*cdf0e10cSrcweir while( aIter != maCells.end() ) 96*cdf0e10cSrcweir (*aIter++)->dispose(); 97*cdf0e10cSrcweir CellVector().swap(maCells); 98*cdf0e10cSrcweir } 99*cdf0e10cSrcweir } 100*cdf0e10cSrcweir 101*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 102*cdf0e10cSrcweir 103*cdf0e10cSrcweir void TableRow::throwIfDisposed() const throw (::com::sun::star::uno::RuntimeException) 104*cdf0e10cSrcweir { 105*cdf0e10cSrcweir if( !mxTableModel.is() ) 106*cdf0e10cSrcweir throw DisposedException(); 107*cdf0e10cSrcweir } 108*cdf0e10cSrcweir 109*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 110*cdf0e10cSrcweir 111*cdf0e10cSrcweir TableRow& TableRow::operator=( const TableRow& r ) 112*cdf0e10cSrcweir { 113*cdf0e10cSrcweir mnHeight = r.mnHeight; 114*cdf0e10cSrcweir mbOptimalHeight = r.mbOptimalHeight; 115*cdf0e10cSrcweir mbIsVisible = r.mbIsVisible; 116*cdf0e10cSrcweir mbIsStartOfNewPage = r.mbIsStartOfNewPage; 117*cdf0e10cSrcweir maName = r.maName; 118*cdf0e10cSrcweir 119*cdf0e10cSrcweir return *this; 120*cdf0e10cSrcweir } 121*cdf0e10cSrcweir 122*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 123*cdf0e10cSrcweir 124*cdf0e10cSrcweir void TableRow::insertColumns( sal_Int32 nIndex, sal_Int32 nCount, CellVector::iterator* pIter /* = 0 */ ) 125*cdf0e10cSrcweir { 126*cdf0e10cSrcweir throwIfDisposed(); 127*cdf0e10cSrcweir if( nCount ) 128*cdf0e10cSrcweir { 129*cdf0e10cSrcweir if( nIndex >= static_cast< sal_Int32 >( maCells.size() ) ) 130*cdf0e10cSrcweir nIndex = static_cast< sal_Int32 >( maCells.size() ); 131*cdf0e10cSrcweir if ( pIter ) 132*cdf0e10cSrcweir maCells.insert( maCells.begin() + nIndex, *pIter, (*pIter) + nCount ); 133*cdf0e10cSrcweir else 134*cdf0e10cSrcweir { 135*cdf0e10cSrcweir maCells.reserve( maCells.size() + nCount ); 136*cdf0e10cSrcweir for ( sal_Int32 i = 0; i < nCount; i++ ) 137*cdf0e10cSrcweir maCells.insert( maCells.begin() + nIndex + i, mxTableModel->createCell() ); 138*cdf0e10cSrcweir } 139*cdf0e10cSrcweir } 140*cdf0e10cSrcweir } 141*cdf0e10cSrcweir 142*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 143*cdf0e10cSrcweir 144*cdf0e10cSrcweir void TableRow::removeColumns( sal_Int32 nIndex, sal_Int32 nCount ) 145*cdf0e10cSrcweir { 146*cdf0e10cSrcweir throwIfDisposed(); 147*cdf0e10cSrcweir if( (nCount >= 0) && ( nIndex >= 0) ) 148*cdf0e10cSrcweir { 149*cdf0e10cSrcweir if( (nIndex + nCount) < static_cast< sal_Int32 >( maCells.size() ) ) 150*cdf0e10cSrcweir { 151*cdf0e10cSrcweir CellVector::iterator aBegin( maCells.begin() ); 152*cdf0e10cSrcweir while( nIndex-- && (aBegin != maCells.end()) ) 153*cdf0e10cSrcweir aBegin++; 154*cdf0e10cSrcweir 155*cdf0e10cSrcweir if( nCount > 1 ) 156*cdf0e10cSrcweir { 157*cdf0e10cSrcweir CellVector::iterator aEnd( aBegin ); 158*cdf0e10cSrcweir while( nCount-- && (aEnd != maCells.end()) ) 159*cdf0e10cSrcweir aEnd++; 160*cdf0e10cSrcweir maCells.erase( aBegin, aEnd ); 161*cdf0e10cSrcweir } 162*cdf0e10cSrcweir else 163*cdf0e10cSrcweir { 164*cdf0e10cSrcweir maCells.erase( aBegin ); 165*cdf0e10cSrcweir } 166*cdf0e10cSrcweir } 167*cdf0e10cSrcweir else 168*cdf0e10cSrcweir { 169*cdf0e10cSrcweir maCells.resize( nIndex ); 170*cdf0e10cSrcweir } 171*cdf0e10cSrcweir } 172*cdf0e10cSrcweir } 173*cdf0e10cSrcweir 174*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 175*cdf0e10cSrcweir // XCellRange 176*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 177*cdf0e10cSrcweir 178*cdf0e10cSrcweir Reference< XCell > SAL_CALL TableRow::getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow ) throw (IndexOutOfBoundsException, RuntimeException) 179*cdf0e10cSrcweir { 180*cdf0e10cSrcweir throwIfDisposed(); 181*cdf0e10cSrcweir if( nRow != 0 ) 182*cdf0e10cSrcweir throw IndexOutOfBoundsException(); 183*cdf0e10cSrcweir 184*cdf0e10cSrcweir return mxTableModel->getCellByPosition( nColumn, mnRow ); 185*cdf0e10cSrcweir } 186*cdf0e10cSrcweir 187*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 188*cdf0e10cSrcweir 189*cdf0e10cSrcweir Reference< XCellRange > SAL_CALL TableRow::getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom ) throw (IndexOutOfBoundsException, RuntimeException) 190*cdf0e10cSrcweir { 191*cdf0e10cSrcweir throwIfDisposed(); 192*cdf0e10cSrcweir if( (nLeft >= 0 ) && (nTop == 0) && (nRight >= nLeft) && (nBottom == 0) ) 193*cdf0e10cSrcweir { 194*cdf0e10cSrcweir return mxTableModel->getCellRangeByPosition( nLeft, mnRow, nRight, mnRow ); 195*cdf0e10cSrcweir } 196*cdf0e10cSrcweir throw IndexOutOfBoundsException(); 197*cdf0e10cSrcweir } 198*cdf0e10cSrcweir 199*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 200*cdf0e10cSrcweir 201*cdf0e10cSrcweir Reference< XCellRange > SAL_CALL TableRow::getCellRangeByName( const OUString& /*aRange*/ ) throw (RuntimeException) 202*cdf0e10cSrcweir { 203*cdf0e10cSrcweir throwIfDisposed(); 204*cdf0e10cSrcweir return Reference< XCellRange >(); 205*cdf0e10cSrcweir } 206*cdf0e10cSrcweir 207*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 208*cdf0e10cSrcweir // XNamed 209*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 210*cdf0e10cSrcweir 211*cdf0e10cSrcweir OUString SAL_CALL TableRow::getName() throw (RuntimeException) 212*cdf0e10cSrcweir { 213*cdf0e10cSrcweir return maName; 214*cdf0e10cSrcweir } 215*cdf0e10cSrcweir 216*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 217*cdf0e10cSrcweir 218*cdf0e10cSrcweir void SAL_CALL TableRow::setName( const OUString& aName ) throw (RuntimeException) 219*cdf0e10cSrcweir { 220*cdf0e10cSrcweir maName = aName; 221*cdf0e10cSrcweir } 222*cdf0e10cSrcweir 223*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 224*cdf0e10cSrcweir // XFastPropertySet 225*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 226*cdf0e10cSrcweir 227*cdf0e10cSrcweir void SAL_CALL TableRow::setFastPropertyValue( sal_Int32 nHandle, const Any& aValue ) throw (UnknownPropertyException, PropertyVetoException, IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, RuntimeException) 228*cdf0e10cSrcweir { 229*cdf0e10cSrcweir bool bOk = false; 230*cdf0e10cSrcweir bool bChange = false; 231*cdf0e10cSrcweir 232*cdf0e10cSrcweir TableRowUndo* pUndo = 0; 233*cdf0e10cSrcweir 234*cdf0e10cSrcweir SdrModel* pModel = mxTableModel->getSdrTableObj()->GetModel(); 235*cdf0e10cSrcweir 236*cdf0e10cSrcweir const bool bUndo = mxTableModel.is() && mxTableModel->getSdrTableObj() && mxTableModel->getSdrTableObj()->IsInserted() && pModel && pModel->IsUndoEnabled(); 237*cdf0e10cSrcweir 238*cdf0e10cSrcweir if( bUndo ) 239*cdf0e10cSrcweir { 240*cdf0e10cSrcweir TableRowRef xThis( this ); 241*cdf0e10cSrcweir pUndo = new TableRowUndo( xThis ); 242*cdf0e10cSrcweir } 243*cdf0e10cSrcweir 244*cdf0e10cSrcweir switch( nHandle ) 245*cdf0e10cSrcweir { 246*cdf0e10cSrcweir case Property_Height: 247*cdf0e10cSrcweir { 248*cdf0e10cSrcweir sal_Int32 nHeight = mnHeight; 249*cdf0e10cSrcweir bOk = aValue >>= nHeight; 250*cdf0e10cSrcweir if( bOk && (mnHeight != nHeight) ) 251*cdf0e10cSrcweir { 252*cdf0e10cSrcweir mnHeight = nHeight; 253*cdf0e10cSrcweir mbOptimalHeight = mnHeight == 0; 254*cdf0e10cSrcweir bChange = true; 255*cdf0e10cSrcweir } 256*cdf0e10cSrcweir break; 257*cdf0e10cSrcweir } 258*cdf0e10cSrcweir 259*cdf0e10cSrcweir case Property_OptimalHeight: 260*cdf0e10cSrcweir { 261*cdf0e10cSrcweir sal_Bool bOptimalHeight = mbOptimalHeight; 262*cdf0e10cSrcweir bOk = aValue >>= bOptimalHeight; 263*cdf0e10cSrcweir if( bOk && (mbOptimalHeight != bOptimalHeight) ) 264*cdf0e10cSrcweir { 265*cdf0e10cSrcweir mbOptimalHeight = bOptimalHeight; 266*cdf0e10cSrcweir if( bOptimalHeight ) 267*cdf0e10cSrcweir mnHeight = 0; 268*cdf0e10cSrcweir bChange = true; 269*cdf0e10cSrcweir } 270*cdf0e10cSrcweir break; 271*cdf0e10cSrcweir } 272*cdf0e10cSrcweir case Property_IsVisible: 273*cdf0e10cSrcweir { 274*cdf0e10cSrcweir sal_Bool bIsVisible = mbIsVisible; 275*cdf0e10cSrcweir bOk = aValue >>= bIsVisible; 276*cdf0e10cSrcweir if( bOk && (mbIsVisible != bIsVisible) ) 277*cdf0e10cSrcweir { 278*cdf0e10cSrcweir mbIsVisible = bIsVisible; 279*cdf0e10cSrcweir bChange = true; 280*cdf0e10cSrcweir } 281*cdf0e10cSrcweir break; 282*cdf0e10cSrcweir } 283*cdf0e10cSrcweir 284*cdf0e10cSrcweir case Property_IsStartOfNewPage: 285*cdf0e10cSrcweir { 286*cdf0e10cSrcweir sal_Bool bIsStartOfNewPage = mbIsStartOfNewPage; 287*cdf0e10cSrcweir bOk = aValue >>= bIsStartOfNewPage; 288*cdf0e10cSrcweir if( bOk && (mbIsStartOfNewPage != bIsStartOfNewPage) ) 289*cdf0e10cSrcweir { 290*cdf0e10cSrcweir mbIsStartOfNewPage = bIsStartOfNewPage; 291*cdf0e10cSrcweir bChange = true; 292*cdf0e10cSrcweir } 293*cdf0e10cSrcweir break; 294*cdf0e10cSrcweir } 295*cdf0e10cSrcweir default: 296*cdf0e10cSrcweir throw UnknownPropertyException(); 297*cdf0e10cSrcweir } 298*cdf0e10cSrcweir if( !bOk ) 299*cdf0e10cSrcweir throw IllegalArgumentException(); 300*cdf0e10cSrcweir 301*cdf0e10cSrcweir if( bChange ) 302*cdf0e10cSrcweir { 303*cdf0e10cSrcweir if( pUndo ) 304*cdf0e10cSrcweir { 305*cdf0e10cSrcweir pModel->AddUndo( pUndo ); 306*cdf0e10cSrcweir pUndo = 0; 307*cdf0e10cSrcweir } 308*cdf0e10cSrcweir mxTableModel->setModified(sal_True); 309*cdf0e10cSrcweir } 310*cdf0e10cSrcweir 311*cdf0e10cSrcweir if( pUndo ) 312*cdf0e10cSrcweir delete pUndo; 313*cdf0e10cSrcweir } 314*cdf0e10cSrcweir 315*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 316*cdf0e10cSrcweir 317*cdf0e10cSrcweir Any SAL_CALL TableRow::getFastPropertyValue( sal_Int32 nHandle ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException) 318*cdf0e10cSrcweir { 319*cdf0e10cSrcweir switch( nHandle ) 320*cdf0e10cSrcweir { 321*cdf0e10cSrcweir case Property_Height: return Any( mnHeight ); 322*cdf0e10cSrcweir case Property_OptimalHeight: return Any( mbOptimalHeight ); 323*cdf0e10cSrcweir case Property_IsVisible: return Any( mbIsVisible ); 324*cdf0e10cSrcweir case Property_IsStartOfNewPage: return Any( mbIsStartOfNewPage ); 325*cdf0e10cSrcweir default: throw UnknownPropertyException(); 326*cdf0e10cSrcweir } 327*cdf0e10cSrcweir } 328*cdf0e10cSrcweir 329*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 330*cdf0e10cSrcweir 331*cdf0e10cSrcweir rtl::Reference< ::comphelper::FastPropertySetInfo > TableRow::getStaticPropertySetInfo() 332*cdf0e10cSrcweir { 333*cdf0e10cSrcweir static rtl::Reference< ::comphelper::FastPropertySetInfo > xInfo; 334*cdf0e10cSrcweir if( !xInfo.is() ) 335*cdf0e10cSrcweir { 336*cdf0e10cSrcweir ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); 337*cdf0e10cSrcweir if( !xInfo.is() ) 338*cdf0e10cSrcweir { 339*cdf0e10cSrcweir comphelper::PropertyVector aProperties(6); 340*cdf0e10cSrcweir 341*cdf0e10cSrcweir aProperties[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "Height" ) ); 342*cdf0e10cSrcweir aProperties[0].Handle = Property_Height; 343*cdf0e10cSrcweir aProperties[0].Type = ::getCppuType((const sal_Int32*)0); 344*cdf0e10cSrcweir aProperties[0].Attributes = 0; 345*cdf0e10cSrcweir 346*cdf0e10cSrcweir aProperties[1].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "OptimalHeight" ) ); 347*cdf0e10cSrcweir aProperties[1].Handle = Property_OptimalHeight; 348*cdf0e10cSrcweir aProperties[1].Type = ::getBooleanCppuType(); 349*cdf0e10cSrcweir aProperties[1].Attributes = 0; 350*cdf0e10cSrcweir 351*cdf0e10cSrcweir aProperties[2].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "IsVisible" ) ); 352*cdf0e10cSrcweir aProperties[2].Handle = Property_IsVisible; 353*cdf0e10cSrcweir aProperties[2].Type = ::getBooleanCppuType(); 354*cdf0e10cSrcweir aProperties[2].Attributes = 0; 355*cdf0e10cSrcweir 356*cdf0e10cSrcweir aProperties[3].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "IsStartOfNewPage" ) ); 357*cdf0e10cSrcweir aProperties[3].Handle = Property_IsStartOfNewPage; 358*cdf0e10cSrcweir aProperties[3].Type = ::getBooleanCppuType(); 359*cdf0e10cSrcweir aProperties[3].Attributes = 0; 360*cdf0e10cSrcweir 361*cdf0e10cSrcweir aProperties[4].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "Size" ) ); 362*cdf0e10cSrcweir aProperties[4].Handle = Property_Height; 363*cdf0e10cSrcweir aProperties[4].Type = ::getCppuType((const sal_Int32*)0); 364*cdf0e10cSrcweir aProperties[4].Attributes = 0; 365*cdf0e10cSrcweir 366*cdf0e10cSrcweir aProperties[5].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "OptimalSize" ) ); 367*cdf0e10cSrcweir aProperties[5].Handle = Property_OptimalHeight; 368*cdf0e10cSrcweir aProperties[5].Type = ::getBooleanCppuType(); 369*cdf0e10cSrcweir aProperties[5].Attributes = 0; 370*cdf0e10cSrcweir 371*cdf0e10cSrcweir xInfo.set( new ::comphelper::FastPropertySetInfo(aProperties) ); 372*cdf0e10cSrcweir } 373*cdf0e10cSrcweir } 374*cdf0e10cSrcweir 375*cdf0e10cSrcweir return xInfo; 376*cdf0e10cSrcweir } 377*cdf0e10cSrcweir 378*cdf0e10cSrcweir // ----------------------------------------------------------------------------- 379*cdf0e10cSrcweir 380*cdf0e10cSrcweir 381*cdf0e10cSrcweir } } 382