summaryrefslogtreecommitdiff
path: root/xmloff/source/draw/animationimport.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/draw/animationimport.cxx')
-rw-r--r--xmloff/source/draw/animationimport.cxx58
1 files changed, 14 insertions, 44 deletions
diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx
index 1b425786f5c0..0b4ec5178206 100644
--- a/xmloff/source/draw/animationimport.cxx
+++ b/xmloff/source/draw/animationimport.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.
@@ -165,7 +166,7 @@ const SvXMLTokenMap& AnimationsImportHelperImpl::getAnimationNodeTokenMap()
{
if( mpAnimationNodeTokenMap == NULL )
{
- static __FAR_DATA SvXMLTokenMapEntry aAnimationNodeTokenMap[] =
+ static SvXMLTokenMapEntry aAnimationNodeTokenMap[] =
{
{ XML_NAMESPACE_ANIMATION, XML_PAR, (sal_uInt16)AnimationNodeType::PAR },
{ XML_NAMESPACE_ANIMATION, XML_SEQ, (sal_uInt16)AnimationNodeType::SEQ },
@@ -244,7 +245,7 @@ const SvXMLTokenMap& AnimationsImportHelperImpl::getAnimationNodeAttributeTokenM
{
if( mpAnimationNodeAttributeTokenMap == NULL )
{
- static __FAR_DATA SvXMLTokenMapEntry aAnimationNodeAttributeTokenMap[] =
+ static SvXMLTokenMapEntry aAnimationNodeAttributeTokenMap[] =
{
{ XML_NAMESPACE_SMIL, XML_BEGIN, (sal_uInt16)ANA_Begin },
{ XML_NAMESPACE_SMIL, XML_DUR, (sal_uInt16)ANA_Dur },
@@ -396,7 +397,7 @@ Any AnimationsImportHelperImpl::convertTarget( const OUString& rValue )
}
catch( RuntimeException& )
{
- DBG_ERROR( "xmloff::AnimationsImportImpl::convertTarget(), RuntimeException catched!" );
+ OSL_FAIL( "xmloff::AnimationsImportImpl::convertTarget(), RuntimeException catched!" );
}
Any aAny;
@@ -480,38 +481,6 @@ Any AnimationsImportHelperImpl::convertValue( XMLTokenEnum eAttributeName, const
pHandler->importXML( rValue, aAny, mrImport.GetMM100UnitConverter() );
return aAny;
-
-/*
- if( rValue.getLength() == 0 )
- {
- Any aAny;
- return aAny;
- }
- else if( rValue.indexOf( '#' ) == 0 )
- {
- // color
- Color aColor;
- SvXMLUnitConverter::convertColor( aColor, rValue );
-
- return makeAny( static_cast< sal_Int32 >( aColor.GetRGBColor() ) );
- }
- else if( rValue.indexOf( '$' ) != -1 )
- {
- // formula
- return makeAny( rValue );
- }
- else
- {
- if( isDouble( rValue ) )
- {
- return makeAny( rValue.toDouble() );
- }
- else
- {
- return makeAny( rValue );
- }
- }
-*/
}
}
@@ -529,8 +498,8 @@ Sequence< Any > AnimationsImportHelperImpl::convertValueSequence( XMLTokenEnum e
// fill the sequence
Any* pValues = aValues.getArray();
- sal_Int32 nIndex, nElement;
- for( nIndex = 0, nElement = 0; nElements && (nIndex >= 0); nElements-- )
+ sal_Int32 nIndex;
+ for( nIndex = 0; nElements && (nIndex >= 0); nElements-- )
{
*pValues++ = convertValue( eAttributeName, rValue.getToken( 0, ';', nIndex ) );
}
@@ -598,7 +567,7 @@ Any AnimationsImportHelperImpl::convertTiming( const OUString& rValue )
}
else
{
- DBG_ERROR("AnimationsImportHelperImpl::convertTiming(), unknown event trigger!");
+ OSL_FAIL("AnimationsImportHelperImpl::convertTiming(), unknown event trigger!");
}
aAny <<= aEvent;
@@ -772,7 +741,7 @@ AnimationNodeContext::AnimationNodeContext(
}
catch( RuntimeException& )
{
- DBG_ERROR( "xmloff::AnimationsImportImpl::AnimationsImportImpl(), RuntimeException catched!" );
+ OSL_FAIL( "xmloff::AnimationsImportImpl::AnimationsImportImpl(), RuntimeException catched!" );
}
}
@@ -873,7 +842,7 @@ void AnimationNodeContext::init_node( const ::com::sun::star::uno::Reference< :
break;
case ANA_AutoReverse:
{
- sal_Bool bTemp;
+ bool bTemp;
if( SvXMLUnitConverter::convertBool( bTemp, rValue ) )
mxNode->setAutoReverse( bTemp );
}
@@ -918,7 +887,7 @@ void AnimationNodeContext::init_node( const ::com::sun::star::uno::Reference< :
break;
case ANA_After_Effect:
{
- sal_Bool bTemp;
+ bool bTemp;
if( SvXMLUnitConverter::convertBool( bTemp, rValue ) )
aUserData.push_back( NamedValue( GetXMLToken( XML_AFTER_EFFECT ), makeAny( bTemp ) ) );
}
@@ -1290,7 +1259,7 @@ void AnimationNodeContext::init_node( const ::com::sun::star::uno::Reference< :
}
catch( RuntimeException& )
{
- DBG_ERROR( "xmloff::AnimationNodeContext::StartElement(), RuntimeException catched!" );
+ OSL_FAIL( "xmloff::AnimationNodeContext::StartElement(), RuntimeException catched!" );
}
}
@@ -1477,7 +1446,7 @@ void AnimationNodeContext::postProcessRootNode( SvXMLImport& /*rImport*/, const
}
catch( Exception& )
{
- DBG_ERROR("xmloff::AnimationsImport::postProcessRootNode(), exception caught!");
+ OSL_FAIL("xmloff::AnimationsImport::postProcessRootNode(), exception caught!");
}
}
@@ -1511,7 +1480,7 @@ OUString SAL_CALL AnimationsImport::getImplementationName() throw(RuntimeExcepti
sal_Bool SAL_CALL AnimationsImport::supportsService( const OUString& ServiceName ) throw(RuntimeException)
{
- return ServiceName.equalsAscii( "com.sun.star.comp.Xmloff.AnimationsImport" );
+ return ServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.comp.Xmloff.AnimationsImport" ) );
}
Sequence< OUString > SAL_CALL AnimationsImport::getSupportedServiceNames() throw(RuntimeException)
@@ -1521,3 +1490,4 @@ Sequence< OUString > SAL_CALL AnimationsImport::getSupportedServiceNames() throw
} // namespace xmloff
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */