1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#include "vbasheetobject.hxx"
#include <com/sun/star/awt/TextAlign.hpp>
#include <com/sun/star/container/XIndexContainer.hpp>
#include <com/sun/star/drawing/XControlShape.hpp>
#include <com/sun/star/script/ScriptEventDescriptor.hpp>
#include <com/sun/star/script/XEventAttacherManager.hpp>
#include <com/sun/star/style/VerticalAlignment.hpp>
#include <ooo/vba/excel/Constants.hpp>
#include <ooo/vba/excel/XlOrientation.hpp>
#include <ooo/vba/excel/XlPlacement.hpp>
#include <rtl/ustrbuf.hxx>
#include <filter/msfilter/msvbahelper.hxx>
#include <oox/helper/helper.hxx>
#include <svx/unoshape.hxx>
#include "vbafont.hxx"
#include "drwlayer.hxx"
using ::rtl::OUString;
using namespace ::com::sun::star;
using namespace ::ooo::vba;
// ============================================================================
ScVbaButtonCharacters::ScVbaButtonCharacters(
const uno::Reference< XHelperInterface >& rxParent,
const uno::Reference< uno::XComponentContext >& rxContext,
const uno::Reference< beans::XPropertySet >& rxPropSet,
const ScVbaPalette& rPalette,
const uno::Any& rStart,
const uno::Any& rLength ) throw (uno::RuntimeException) :
ScVbaButtonCharacters_BASE( rxParent, rxContext ),
maPalette( rPalette ),
mxPropSet( rxPropSet, uno::UNO_SET_THROW )
{
// extract optional start parameter (missing or invalid -> from beginning)
if( !(rStart >>= mnStart) || (mnStart < 1) )
mnStart = 1;
--mnStart; // VBA is 1-based, rtl string is 0-based
// extract optional length parameter (missing or invalid -> to end)
if( !(rLength >>= mnLength) || (mnLength < 1) )
mnLength = SAL_MAX_INT32;
}
ScVbaButtonCharacters::~ScVbaButtonCharacters()
{
}
// XCharacters attributes
OUString SAL_CALL ScVbaButtonCharacters::getCaption() throw (uno::RuntimeException)
{
// ignore invalid mnStart and/or mnLength members
OUString aString = getFullString();
sal_Int32 nStart = ::std::min( mnStart, aString.getLength() );
sal_Int32 nLength = ::std::min( mnLength, aString.getLength() - nStart );
return aString.copy( nStart, nLength );
}
void SAL_CALL ScVbaButtonCharacters::setCaption( const OUString& rCaption ) throw (uno::RuntimeException)
{
/* Replace the covered text with the passed text, ignore invalid mnStart
and/or mnLength members. This operation does not affect the mnLength
parameter. If the inserted text is longer than mnLength, the additional
characters are not covered by this object. If the inserted text is
shorter than mnLength, other uncovered characters from the original
string will be covered now, thus may be changed with subsequent
operations. */
OUString aString = getFullString();
sal_Int32 nStart = ::std::min( mnStart, aString.getLength() );
sal_Int32 nLength = ::std::min( mnLength, aString.getLength() - nStart );
setFullString( aString.replaceAt( nStart, nLength, rCaption ) );
}
sal_Int32 SAL_CALL ScVbaButtonCharacters::getCount() throw (uno::RuntimeException)
{
// always return the total length of the caption
return getFullString().getLength();
}
OUString SAL_CALL ScVbaButtonCharacters::getText() throw (uno::RuntimeException)
{
// Text attribute same as Caption attribute?
return getCaption();
}
void SAL_CALL ScVbaButtonCharacters::setText( const OUString& rText ) throw (uno::RuntimeException)
{
// Text attribute same as Caption attribute?
setCaption( rText );
}
uno::Reference< excel::XFont > SAL_CALL ScVbaButtonCharacters::getFont() throw (uno::RuntimeException)
{
return new ScVbaFont( this, mxContext, maPalette, mxPropSet, 0, true );
}
void SAL_CALL ScVbaButtonCharacters::setFont( const uno::Reference< excel::XFont >& /*rxFont*/ ) throw (uno::RuntimeException)
{
// TODO
}
// XCharacters methods
void SAL_CALL ScVbaButtonCharacters::Insert( const OUString& rString ) throw (uno::RuntimeException)
{
/* The Insert() operation is in fact "replace covered characters", at
least for buttons... It seems there is no easy way to really insert a
substring. This operation does not affect the mnLength parameter. */
setCaption( rString );
}
void SAL_CALL ScVbaButtonCharacters::Delete() throw (uno::RuntimeException)
{
/* The Delete() operation is nothing else than "replace with empty string".
This does not affect the mnLength parameter, multiple calls of Delete()
will remove characters as long as there are some more covered by this
object. */
setCaption( OUString() );
}
// XHelperInterface
VBAHELPER_IMPL_XHELPERINTERFACE( ScVbaButtonCharacters, "ooo.vba.excel.Characters" )
// private
OUString ScVbaButtonCharacters::getFullString() const throw (uno::RuntimeException)
{
return mxPropSet->getPropertyValue( CREATE_OUSTRING( "Label" ) ).get< OUString >();
}
void ScVbaButtonCharacters::setFullString( const OUString& rString ) throw (uno::RuntimeException)
{
mxPropSet->setPropertyValue( CREATE_OUSTRING( "Label" ), uno::Any( rString ) );
}
// ============================================================================
ScVbaSheetObjectBase::ScVbaSheetObjectBase(
const uno::Reference< XHelperInterface >& rxParent,
const uno::Reference< uno::XComponentContext >& rxContext,
const uno::Reference< frame::XModel >& rxModel,
const uno::Reference< drawing::XShape >& rxShape ) throw (uno::RuntimeException) :
ScVbaSheetObject_BASE( rxParent, rxContext ),
maPalette( rxModel ),
mxModel( rxModel, uno::UNO_SET_THROW ),
mxShape( rxShape, uno::UNO_SET_THROW ),
mxShapeProps( rxShape, uno::UNO_QUERY_THROW )
{
}
// XSheetObject attributes
double SAL_CALL ScVbaSheetObjectBase::getLeft() throw (uno::RuntimeException)
{
return HmmToPoints( mxShape->getPosition().X );
}
void SAL_CALL ScVbaSheetObjectBase::setLeft( double fLeft ) throw (uno::RuntimeException)
{
if( fLeft < 0.0 )
throw uno::RuntimeException();
mxShape->setPosition( awt::Point( PointsToHmm( fLeft ), mxShape->getPosition().Y ) );
}
double SAL_CALL ScVbaSheetObjectBase::getTop() throw (uno::RuntimeException)
{
return HmmToPoints( mxShape->getPosition().Y );
}
void SAL_CALL ScVbaSheetObjectBase::setTop( double fTop ) throw (uno::RuntimeException)
{
if( fTop < 0.0 )
throw uno::RuntimeException();
mxShape->setPosition( awt::Point( mxShape->getPosition().X, PointsToHmm( fTop ) ) );
}
double SAL_CALL ScVbaSheetObjectBase::getWidth() throw (uno::RuntimeException)
{
return HmmToPoints( mxShape->getSize().Width );
}
void SAL_CALL ScVbaSheetObjectBase::setWidth( double fWidth ) throw (uno::RuntimeException)
{
if( fWidth <= 0.0 )
throw uno::RuntimeException();
mxShape->setSize( awt::Size( PointsToHmm( fWidth ), mxShape->getSize().Height ) );
}
double SAL_CALL ScVbaSheetObjectBase::getHeight() throw (uno::RuntimeException)
{
return HmmToPoints( mxShape->getSize().Height );
}
void SAL_CALL ScVbaSheetObjectBase::setHeight( double fHeight ) throw (uno::RuntimeException)
{
if( fHeight <= 0.0 )
throw uno::RuntimeException();
mxShape->setSize( awt::Size( mxShape->getSize().Width, PointsToHmm( fHeight ) ) );
}
OUString SAL_CALL ScVbaSheetObjectBase::getName() throw (uno::RuntimeException)
{
return mxShapeProps->getPropertyValue( CREATE_OUSTRING( "Name" ) ).get< OUString >();
}
void SAL_CALL ScVbaSheetObjectBase::setName( const OUString& rName ) throw (uno::RuntimeException)
{
mxShapeProps->setPropertyValue( CREATE_OUSTRING( "Name" ), uno::Any( rName ) );
}
sal_Int32 SAL_CALL ScVbaSheetObjectBase::getPlacement() throw (uno::RuntimeException)
{
sal_Int32 nRet = excel::XlPlacement::xlMoveAndSize;
#if 0 // TODO: not working at the moment.
SvxShape* pShape = SvxShape::getImplementation( mxShape );
if(pShape)
{
SdrObject* pObj = pShape->GetSdrObject();
if (pObj)
{
ScAnchorType eType = ScDrawLayer::GetAnchor(pObj);
if (eType == SCA_PAGE)
nRet = excel::XlPlacement::xlFreeFloating;
}
}
#endif
return nRet;
}
void SAL_CALL ScVbaSheetObjectBase::setPlacement( sal_Int32 /*nPlacement*/ ) throw (uno::RuntimeException)
{
#if 0 // TODO: not working at the moment.
SvxShape* pShape = SvxShape::getImplementation( mxShape );
if(pShape)
{
SdrObject* pObj = pShape->GetSdrObject();
if (pObj)
{
ScAnchorType eType = SCA_CELL;
if ( nPlacement == excel::XlPlacement::xlFreeFloating )
eType = SCA_PAGE;
// xlMove is not supported, treated as SCA_CELL (xlMoveAndSize)
ScDrawLayer::SetAnchor(pObj, eType);
}
}
#endif
}
sal_Bool SAL_CALL ScVbaSheetObjectBase::getPrintObject() throw (uno::RuntimeException)
{
// not supported
return sal_True;
}
void SAL_CALL ScVbaSheetObjectBase::setPrintObject( sal_Bool /*bPrintObject*/ ) throw (uno::RuntimeException)
{
// not supported
}
// private
void ScVbaSheetObjectBase::setDefaultProperties( sal_Int32 nIndex ) throw (uno::RuntimeException)
{
OUString aName = ::rtl::OUStringBuffer( implGetBaseName() ).append( sal_Unicode( ' ' ) ).append( nIndex + 1 ).makeStringAndClear();
setName( aName );
implSetDefaultProperties();
}
void ScVbaSheetObjectBase::implSetDefaultProperties() throw (uno::RuntimeException)
{
}
// ============================================================================
ScVbaControlObjectBase::ScVbaControlObjectBase(
const uno::Reference< XHelperInterface >& rxParent,
const uno::Reference< uno::XComponentContext >& rxContext,
const uno::Reference< frame::XModel >& rxModel,
const uno::Reference< container::XIndexContainer >& rxFormIC,
const uno::Reference< drawing::XControlShape >& rxControlShape,
ListenerType eListenerType ) throw (uno::RuntimeException) :
ScVbaControlObject_BASE( rxParent, rxContext, rxModel, uno::Reference< drawing::XShape >( rxControlShape, uno::UNO_QUERY_THROW ) ),
mxFormIC( rxFormIC, uno::UNO_SET_THROW ),
mxControlProps( rxControlShape->getControl(), uno::UNO_QUERY_THROW )
{
// set listener and event name to be used for OnAction attribute
switch( eListenerType )
{
case LISTENER_ACTION:
maListenerType = CREATE_OUSTRING( "XActionListener" );
maEventMethod = CREATE_OUSTRING( "actionPerformed" );
break;
case LISTENER_MOUSE:
maListenerType = CREATE_OUSTRING( "XMouseListener" );
maEventMethod = CREATE_OUSTRING( "mouseReleased" );
break;
case LISTENER_TEXT:
maListenerType = CREATE_OUSTRING( "XTextListener" );
maEventMethod = CREATE_OUSTRING( "textChanged" );
break;
case LISTENER_VALUE:
maListenerType = CREATE_OUSTRING( "XAdjustmentListener" );
maEventMethod = CREATE_OUSTRING( "adjustmentValueChanged" );
break;
case LISTENER_CHANGE:
maListenerType = CREATE_OUSTRING( "XChangeListener" );
maEventMethod = CREATE_OUSTRING( "changed" );
break;
// no default, to let the compiler complain about missing case
}
}
// XSheetObject attributes
OUString SAL_CALL ScVbaControlObjectBase::getName() throw (uno::RuntimeException)
{
return mxControlProps->getPropertyValue( CREATE_OUSTRING( "Name" ) ).get< OUString >();
}
void SAL_CALL ScVbaControlObjectBase::setName( const OUString& rName ) throw (uno::RuntimeException)
{
mxControlProps->setPropertyValue( CREATE_OUSTRING( "Name" ), uno::Any( rName ) );
}
OUString SAL_CALL ScVbaControlObjectBase::getOnAction() throw (uno::RuntimeException)
{
uno::Reference< script::XEventAttacherManager > xEventMgr( mxFormIC, uno::UNO_QUERY_THROW );
sal_Int32 nIndex = getModelIndexInForm();
uno::Sequence< script::ScriptEventDescriptor > aEvents = xEventMgr->getScriptEvents( nIndex );
if( aEvents.hasElements() )
{
const script::ScriptEventDescriptor* pEvent = aEvents.getConstArray();
const script::ScriptEventDescriptor* pEventEnd = pEvent + aEvents.getLength();
const OUString aScriptType = CREATE_OUSTRING( "Script" );
for( ; pEvent < pEventEnd; ++pEvent )
if( (pEvent->ListenerType == maListenerType) && (pEvent->EventMethod == maEventMethod) && (pEvent->ScriptType == aScriptType) )
return extractMacroName( pEvent->ScriptCode );
}
return OUString();
}
void SAL_CALL ScVbaControlObjectBase::setOnAction( const OUString& rMacroName ) throw (uno::RuntimeException)
{
uno::Reference< script::XEventAttacherManager > xEventMgr( mxFormIC, uno::UNO_QUERY_THROW );
sal_Int32 nIndex = getModelIndexInForm();
// first, remove a registered event (try/catch just in case implementation throws)
try { xEventMgr->revokeScriptEvent( nIndex, maListenerType, maEventMethod, OUString() ); } catch( uno::Exception& ) {}
// if a macro name has been passed, try to attach it to the event
if( rMacroName.getLength() > 0 )
{
MacroResolvedInfo aResolvedMacro = resolveVBAMacro( getSfxObjShell( mxModel ), rMacroName );
if( !aResolvedMacro.mbFound )
throw uno::RuntimeException();
script::ScriptEventDescriptor aDescriptor;
aDescriptor.ListenerType = maListenerType;
aDescriptor.EventMethod = maEventMethod;
aDescriptor.ScriptType = CREATE_OUSTRING( "Script" );
aDescriptor.ScriptCode = makeMacroURL( aResolvedMacro.msResolvedMacro );
xEventMgr->registerScriptEvent( nIndex, aDescriptor );
}
}
sal_Bool SAL_CALL ScVbaControlObjectBase::getPrintObject() throw (uno::RuntimeException)
{
return mxControlProps->getPropertyValue( CREATE_OUSTRING( "Printable" ) ).get< sal_Bool >();
}
void SAL_CALL ScVbaControlObjectBase::setPrintObject( sal_Bool bPrintObject ) throw (uno::RuntimeException)
{
mxControlProps->setPropertyValue( CREATE_OUSTRING( "Printable" ), uno::Any( bPrintObject ) );
}
// XControlObject attributes
sal_Bool SAL_CALL ScVbaControlObjectBase::getAutoSize() throw (uno::RuntimeException)
{
// not supported
return false;
}
void SAL_CALL ScVbaControlObjectBase::setAutoSize( sal_Bool /*bAutoSize*/ ) throw (uno::RuntimeException)
{
// not supported
}
// private
sal_Int32 ScVbaControlObjectBase::getModelIndexInForm() const throw (uno::RuntimeException)
{
for( sal_Int32 nIndex = 0, nCount = mxFormIC->getCount(); nIndex < nCount; ++nIndex )
{
uno::Reference< beans::XPropertySet > xProps( mxFormIC->getByIndex( nIndex ), uno::UNO_QUERY_THROW );
if( mxControlProps.get() == xProps.get() )
return nIndex;
}
throw uno::RuntimeException();
}
// ============================================================================
ScVbaButton::ScVbaButton(
const uno::Reference< XHelperInterface >& rxParent,
const uno::Reference< uno::XComponentContext >& rxContext,
const uno::Reference< frame::XModel >& rxModel,
const uno::Reference< container::XIndexContainer >& rxFormIC,
const uno::Reference< drawing::XControlShape >& rxControlShape ) throw (uno::RuntimeException) :
ScVbaButton_BASE( rxParent, rxContext, rxModel, rxFormIC, rxControlShape, LISTENER_ACTION )
{
}
// XButton attributes
OUString SAL_CALL ScVbaButton::getCaption() throw (uno::RuntimeException)
{
return mxControlProps->getPropertyValue( CREATE_OUSTRING( "Label" ) ).get< OUString >();
}
void SAL_CALL ScVbaButton::setCaption( const OUString& rCaption ) throw (uno::RuntimeException)
{
mxControlProps->setPropertyValue( CREATE_OUSTRING( "Label" ), uno::Any( rCaption ) );
}
uno::Reference< excel::XFont > SAL_CALL ScVbaButton::getFont() throw (uno::RuntimeException)
{
return new ScVbaFont( this, mxContext, maPalette, mxControlProps, 0, true );
}
void SAL_CALL ScVbaButton::setFont( const uno::Reference< excel::XFont >& /*rxFont*/ ) throw (uno::RuntimeException)
{
// TODO
}
sal_Int32 SAL_CALL ScVbaButton::getHorizontalAlignment() throw (uno::RuntimeException)
{
switch( mxControlProps->getPropertyValue( CREATE_OUSTRING( "Align" ) ).get< sal_Int16 >() )
{
case awt::TextAlign::LEFT: return excel::Constants::xlLeft;
case awt::TextAlign::RIGHT: return excel::Constants::xlRight;
case awt::TextAlign::CENTER: return excel::Constants::xlCenter;
}
return excel::Constants::xlCenter;
}
void SAL_CALL ScVbaButton::setHorizontalAlignment( sal_Int32 nAlign ) throw (uno::RuntimeException)
{
sal_Int32 nAwtAlign = awt::TextAlign::CENTER;
switch( nAlign )
{
case excel::Constants::xlLeft: nAwtAlign = awt::TextAlign::LEFT; break;
case excel::Constants::xlRight: nAwtAlign = awt::TextAlign::RIGHT; break;
case excel::Constants::xlCenter: nAwtAlign = awt::TextAlign::CENTER; break;
}
// form controls expect short value
mxControlProps->setPropertyValue( CREATE_OUSTRING( "Align" ), uno::Any( static_cast< sal_Int16 >( nAwtAlign ) ) );
}
sal_Int32 SAL_CALL ScVbaButton::getVerticalAlignment() throw (uno::RuntimeException)
{
switch( mxControlProps->getPropertyValue( CREATE_OUSTRING( "VerticalAlign" ) ).get< style::VerticalAlignment >() )
{
case style::VerticalAlignment_TOP: return excel::Constants::xlTop;
case style::VerticalAlignment_BOTTOM: return excel::Constants::xlBottom;
case style::VerticalAlignment_MIDDLE: return excel::Constants::xlCenter;
default:;
}
return excel::Constants::xlCenter;
}
void SAL_CALL ScVbaButton::setVerticalAlignment( sal_Int32 nAlign ) throw (uno::RuntimeException)
{
style::VerticalAlignment eAwtAlign = style::VerticalAlignment_MIDDLE;
switch( nAlign )
{
case excel::Constants::xlTop: eAwtAlign = style::VerticalAlignment_TOP; break;
case excel::Constants::xlBottom: eAwtAlign = style::VerticalAlignment_BOTTOM; break;
case excel::Constants::xlCenter: eAwtAlign = style::VerticalAlignment_MIDDLE; break;
}
mxControlProps->setPropertyValue( CREATE_OUSTRING( "VerticalAlign" ), uno::Any( eAwtAlign ) );
}
sal_Int32 SAL_CALL ScVbaButton::getOrientation() throw (uno::RuntimeException)
{
// not supported
return excel::XlOrientation::xlHorizontal;
}
void SAL_CALL ScVbaButton::setOrientation( sal_Int32 /*nOrientation*/ ) throw (uno::RuntimeException)
{
// not supported
}
// XButton methods
uno::Reference< excel::XCharacters > SAL_CALL ScVbaButton::Characters( const uno::Any& rStart, const uno::Any& rLength ) throw (uno::RuntimeException)
{
return new ScVbaButtonCharacters( this, mxContext, mxControlProps, maPalette, rStart, rLength );
}
// XHelperInterface
VBAHELPER_IMPL_XHELPERINTERFACE( ScVbaButton, "ooo.vba.excel.Button" )
// private
OUString ScVbaButton::implGetBaseName() const
{
return CREATE_OUSTRING( "Button" );
}
void ScVbaButton::implSetDefaultProperties() throw (uno::RuntimeException)
{
setCaption( getName() );
}
// ============================================================================
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|