diff options
Diffstat (limited to 'xmloff/source/draw')
61 files changed, 584 insertions, 809 deletions
diff --git a/xmloff/source/draw/EnhancedCustomShapeToken.cxx b/xmloff/source/draw/EnhancedCustomShapeToken.cxx index 8f97a89007..2b02915545 100644 --- a/xmloff/source/draw/EnhancedCustomShapeToken.cxx +++ b/xmloff/source/draw/EnhancedCustomShapeToken.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. @@ -219,3 +220,5 @@ rtl::OUString EASGet( const EnhancedCustomShapeTokenEnum eToken ) } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx index 55bdab987c..f4b1e0e6fa 100644 --- a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx +++ b/xmloff/source/draw/XMLGraphicsDefaultStyle.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. @@ -34,9 +35,7 @@ #include "xmloff/xmlnmspe.hxx" #include <xmloff/xmltoken.hxx> -#ifndef _XMLOFF_FAMILIES_HXX #include <xmloff/families.hxx> -#endif #include "XMLShapePropertySetContext.hxx" #include <xmloff/XMLGraphicsDefaultStyle.hxx> @@ -127,3 +126,4 @@ void XMLGraphicsDefaultStyle::SetDefaults() } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/XMLImageMapContext.cxx b/xmloff/source/draw/XMLImageMapContext.cxx index a6b74ca40a..7b143ac41d 100644 --- a/xmloff/source/draw/XMLImageMapContext.cxx +++ b/xmloff/source/draw/XMLImageMapContext.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. @@ -31,17 +32,13 @@ #include <rtl/ustrbuf.hxx> #include <com/sun/star/uno/Reference.h> #include <com/sun/star/beans/XPropertySet.hpp> -#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSETINFO_HPP #include <com/sun/star/beans/XPropertySetInfo.hpp> -#endif #include <com/sun/star/xml/sax/XAttributeList.hpp> #include <com/sun/star/container/XIndexContainer.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/drawing/PointSequenceSequence.hpp> -#ifndef _COM_SUN_STAR_DOCUMENT_XEVENTSSUPPLIER_HPP #include <com/sun/star/document/XEventsSupplier.hpp> -#endif #include <com/sun/star/awt/Rectangle.hpp> #include <xmloff/xmltoken.hxx> #include <xmloff/xmlimp.hxx> @@ -91,7 +88,7 @@ enum XMLImageMapToken XML_TOK_IMAP_TARGET }; -static __FAR_DATA SvXMLTokenMapEntry aImageMapObjectTokenMap[] = +static SvXMLTokenMapEntry aImageMapObjectTokenMap[] = { { XML_NAMESPACE_XLINK, XML_HREF, XML_TOK_IMAP_URL }, { XML_NAMESPACE_OFFICE, XML_NAME, XML_TOK_IMAP_NAME }, @@ -721,3 +718,4 @@ void XMLImageMapContext::EndElement() xPropertySet->setPropertyValue(sImageMap, uno::makeAny( xImageMap ) ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/XMLImageMapExport.cxx b/xmloff/source/draw/XMLImageMapExport.cxx index 13495df8ac..3e28543678 100644 --- a/xmloff/source/draw/XMLImageMapExport.cxx +++ b/xmloff/source/draw/XMLImageMapExport.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. @@ -37,9 +38,7 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/container/XIndexContainer.hpp> -#ifndef _COM_SUN_STAR_DOCUMENT_XEVENTSSUPPLIER_HPP #include <com/sun/star/document/XEventsSupplier.hpp> -#endif #include <com/sun/star/awt/Rectangle.hpp> #include <com/sun/star/awt/Point.hpp> #include <com/sun/star/awt/Size.hpp> @@ -384,3 +383,5 @@ void XMLImageMapExport::ExportPolygon( mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_POINTS, aPoints.GetExportString()); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/XMLNumberStyles.cxx b/xmloff/source/draw/XMLNumberStyles.cxx index 01ed62f1d0..a4c7315d2a 100644 --- a/xmloff/source/draw/XMLNumberStyles.cxx +++ b/xmloff/source/draw/XMLNumberStyles.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. @@ -741,3 +742,5 @@ SvXMLImportContext * SdXMLNumberFormatImportContext::CreateChildContext( USHORT { return new SdXMLNumberFormatMemberImportContext( GetImport(), nPrefix, rLocalName, xAttrList, this, SvXMLNumFormatContext::CreateChildContext( nPrefix, rLocalName, xAttrList ) ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/XMLNumberStylesExport.hxx b/xmloff/source/draw/XMLNumberStylesExport.hxx index b9de191017..e2fbec51e5 100644 --- a/xmloff/source/draw/XMLNumberStylesExport.hxx +++ b/xmloff/source/draw/XMLNumberStylesExport.hxx @@ -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. @@ -51,3 +52,4 @@ public: #endif // _XMLOFF_NUMBERSTYLESEXPORT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/XMLReplacementImageContext.cxx b/xmloff/source/draw/XMLReplacementImageContext.cxx index 6b51e9ccdb..db1abfb844 100644 --- a/xmloff/source/draw/XMLReplacementImageContext.cxx +++ b/xmloff/source/draw/XMLReplacementImageContext.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. @@ -134,3 +135,4 @@ SvXMLImportContext *XMLReplacementImageContext::CreateChildContext( } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/XMLShapePropertySetContext.cxx b/xmloff/source/draw/XMLShapePropertySetContext.cxx index 59a30c99b1..18e8c8d746 100644 --- a/xmloff/source/draw/XMLShapePropertySetContext.cxx +++ b/xmloff/source/draw/XMLShapePropertySetContext.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. @@ -28,9 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#ifndef _XMLOFF_XMLSHAPEPROPERTYSETCONTEXT_HXX_ #include "XMLShapePropertySetContext.hxx" -#endif #include <xmloff/xmlimp.hxx> #include <xmloff/xmlnumi.hxx> #include "xmltabi.hxx" @@ -114,3 +113,5 @@ SvXMLImportContext *XMLShapePropertySetContext::CreateChildContext( return pContext; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/XMLShapeStyleContext.cxx b/xmloff/source/draw/XMLShapeStyleContext.cxx index 6d3a1f9d5e..3e8299d62e 100644 --- a/xmloff/source/draw/XMLShapeStyleContext.cxx +++ b/xmloff/source/draw/XMLShapeStyleContext.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. @@ -324,3 +325,4 @@ void XMLShapeStyleContext::Finish( sal_Bool /*bOverwrite*/ ) { } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx index 72eef3acc0..fb0843e09a 100644 --- a/xmloff/source/draw/animationexport.cxx +++ b/xmloff/source/draw/animationexport.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. @@ -525,11 +526,11 @@ public: Reference< XInterface > getParagraphTarget( const ParagraphTarget* pTarget ) const; - void convertPath( OUStringBuffer& sTmp, const Any& rPath ); - void convertValue( XMLTokenEnum eAttributeName, OUStringBuffer& sTmp, const Any& rValue ); - void convertTiming( OUStringBuffer& sTmp, const Any& rTiming ); - void convertSource( OUStringBuffer& sTmp, const Any& rSource ); - void convertTarget( OUStringBuffer& sTmp, const Any& rTarget ); + void convertPath( OUStringBuffer& sTmp, const Any& rPath ) const; + void convertValue( XMLTokenEnum eAttributeName, OUStringBuffer& sTmp, const Any& rValue ) const; + void convertTiming( OUStringBuffer& sTmp, const Any& rTiming ) const; + void convertSource( OUStringBuffer& sTmp, const Any& rSource ) const; + void convertTarget( OUStringBuffer& sTmp, const Any& rTarget ) const; void prepareValue( const Any& rValue ); @@ -1436,7 +1437,7 @@ Reference< XInterface > AnimationsExporterImpl::getParagraphTarget( const Paragr return xRef; } -void AnimationsExporterImpl::convertPath( OUStringBuffer& sTmp, const Any& rPath ) +void AnimationsExporterImpl::convertPath( OUStringBuffer& sTmp, const Any& rPath ) const { OUString aStr; rPath >>= aStr; @@ -1444,7 +1445,7 @@ void AnimationsExporterImpl::convertPath( OUStringBuffer& sTmp, const Any& rPath sTmp = aStr; } -void AnimationsExporterImpl::convertValue( XMLTokenEnum eAttributeName, OUStringBuffer& sTmp, const Any& rValue ) +void AnimationsExporterImpl::convertValue( XMLTokenEnum eAttributeName, OUStringBuffer& sTmp, const Any& rValue ) const { if( !rValue.hasValue() ) return; @@ -1580,7 +1581,7 @@ void AnimationsExporterImpl::convertValue( XMLTokenEnum eAttributeName, OUString */ } -void AnimationsExporterImpl::convertTiming( OUStringBuffer& sTmp, const Any& rValue ) +void AnimationsExporterImpl::convertTiming( OUStringBuffer& sTmp, const Any& rValue ) const { if( !rValue.hasValue() ) return; @@ -1647,12 +1648,12 @@ void AnimationsExporterImpl::convertTiming( OUStringBuffer& sTmp, const Any& rVa } } -void AnimationsExporterImpl::convertSource( OUStringBuffer& sTmp, const Any& rSource ) +void AnimationsExporterImpl::convertSource( OUStringBuffer& sTmp, const Any& rSource ) const { convertTarget( sTmp, rSource ); } -void AnimationsExporterImpl::convertTarget( OUStringBuffer& sTmp, const Any& rTarget ) +void AnimationsExporterImpl::convertTarget( OUStringBuffer& sTmp, const Any& rTarget ) const { if( !rTarget.hasValue() ) return; @@ -1780,3 +1781,5 @@ void AnimationsExporter::exportAnimations( Reference< XAnimationNode > xRootNode } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx index 8e4e6c3685..90a1dbd261 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 }, @@ -529,8 +530,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 ) ); } @@ -873,7 +874,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 +919,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 ) ) ); } @@ -1511,7 +1512,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 +1522,4 @@ Sequence< OUString > SAL_CALL AnimationsImport::getSupportedServiceNames() throw } // namespace xmloff +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/animexp.cxx b/xmloff/source/draw/animexp.cxx index 5f1a43a771..b7e7b6b56e 100644 --- a/xmloff/source/draw/animexp.cxx +++ b/xmloff/source/draw/animexp.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. @@ -544,10 +545,12 @@ void XMLAnimationsExporter::exportAnimations( SvXMLExport& rExport ) } } - aIter++; + ++aIter; } while( aIter != aEnd ); } mpImpl->maEffects.clear(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx index 37d519e09e..38d77b1139 100644 --- a/xmloff/source/draw/animimp.cxx +++ b/xmloff/source/draw/animimp.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. @@ -692,3 +693,5 @@ SvXMLImportContext * XMLAnimationsContext::CreateChildContext( USHORT nPrefix, c { return new XMLAnimationsEffectContext( GetImport(), nPrefix, rLocalName, xAttrList, mpImpl ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/descriptionimp.cxx b/xmloff/source/draw/descriptionimp.cxx index e8325b87cc..a70fe2717a 100644 --- a/xmloff/source/draw/descriptionimp.cxx +++ b/xmloff/source/draw/descriptionimp.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. @@ -91,3 +92,4 @@ void SdXMLDescriptionContext::Characters( const ::rtl::OUString& rChars ) msText += rChars; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/descriptionimp.hxx b/xmloff/source/draw/descriptionimp.hxx index c2ee2cdea2..7ba7f9c294 100644 --- a/xmloff/source/draw/descriptionimp.hxx +++ b/xmloff/source/draw/descriptionimp.hxx @@ -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. @@ -58,3 +59,4 @@ public: #endif // _XMLOFF_EVENTIMP_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/eventimp.cxx b/xmloff/source/draw/eventimp.cxx index 29ed9d6704..15d998b891 100644 --- a/xmloff/source/draw/eventimp.cxx +++ b/xmloff/source/draw/eventimp.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. @@ -64,7 +65,7 @@ using namespace ::xmloff::token; /////////////////////////////////////////////////////////////////////// -SvXMLEnumMapEntry __READONLY_DATA aXML_EventActions_EnumMap[] = +SvXMLEnumMapEntry const aXML_EventActions_EnumMap[] = { { XML_NONE, ClickAction_NONE }, { XML_PREVIOUS_PAGE, ClickAction_PREVPAGE }, @@ -101,9 +102,6 @@ public: sal_Bool mbValid; sal_Bool mbScript; -#ifdef ISSUE66550_HLINK_FOR_SHAPES - sal_Bool mbActionEvent; -#endif ClickAction meClickAction; XMLEffect meEffect; XMLEffectDirection meDirection; @@ -115,9 +113,6 @@ public: OUString msMacroName; OUString msBookmark; OUString msLanguage; -#ifdef ISSUE66550_HLINK_FOR_SHAPES - OUString msHyperURL; -#endif }; /////////////////////////////////////////////////////////////////////// @@ -176,18 +171,11 @@ TYPEINIT1( SdXMLEventContext, SvXMLImportContext ); SdXMLEventContext::SdXMLEventContext( SvXMLImport& rImp, sal_uInt16 nPrfx, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList, const Reference< XShape >& rxShape ) : SvXMLImportContext(rImp, nPrfx, rLocalName), -#ifdef ISSUE66550_HLINK_FOR_SHAPES - mxShape( rxShape ), mbScript( sal_False ), mbActionEvent( sal_False ), meClickAction( ClickAction_NONE ), -#else mxShape( rxShape ), mbScript( sal_False ), meClickAction( ClickAction_NONE ), -#endif meEffect( EK_none ), meDirection( ED_none ), mnStartScale( 100 ), meSpeed( AnimationSpeed_MEDIUM ), mnVerb(0), mbPlayFull( sal_False ) { static const OUString sXMLClickName( RTL_CONSTASCII_USTRINGPARAM( "click" ) ); -#ifdef ISSUE66550_HLINK_FOR_SHAPES - static const OUString sXMLActionName( RTL_CONSTASCII_USTRINGPARAM( "action" ) ); -#endif if( nPrfx == XML_NAMESPACE_PRESENTATION && IsXMLToken( rLocalName, XML_EVENT_LISTENER ) ) { @@ -258,12 +246,7 @@ SdXMLEventContext::SdXMLEventContext( SvXMLImport& rImp, sal_uInt16 nPrfx, cons sEventName = sValue; sal_uInt16 nScriptPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sValue, &sEventName ); -#ifdef ISSUE66550_HLINK_FOR_SHAPES - mbValid = XML_NAMESPACE_DOM == nScriptPrefix && ( sEventName == sXMLClickName || sEventName == sXMLActionName ); - mbActionEvent = mbValid && (sEventName == sXMLActionName); -#else mbValid = XML_NAMESPACE_DOM == nScriptPrefix && sEventName == sXMLClickName; -#endif } else if( IsXMLToken( aAttrLocalName, XML_LANGUAGE ) ) { @@ -292,12 +275,6 @@ SdXMLEventContext::SdXMLEventContext( SvXMLImport& rImp, sal_uInt16 nPrfx, cons { msMacroName = sValue; } -#ifdef ISSUE66550_HLINK_FOR_SHAPES - else if ( mbActionEvent ) - { - msHyperURL = sValue; - } -#endif else { const rtl::OUString &rTmp = @@ -343,26 +320,6 @@ void SdXMLEventContext::EndElement() OUString sAPIEventName; uno::Sequence< beans::PropertyValue > aProperties; -#ifdef ISSUE66550_HLINK_FOR_SHAPES - if( mbActionEvent ) - { - sAPIEventName = OUString( RTL_CONSTASCII_USTRINGPARAM( "OnAction" ) ); - aProperties.realloc( 2 ); - beans::PropertyValue* pProperty = aProperties.getArray(); - - pProperty->Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "EventType" ) ); - pProperty->Handle = -1; - pProperty->Value <<= OUString( RTL_CONSTASCII_USTRINGPARAM( "Action" ) ); - pProperty->State = beans::PropertyState_DIRECT_VALUE; - ++pProperty; - pProperty->Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) ); - pProperty->Handle = -1; - pProperty->Value <<= msHyperURL; - pProperty->State = beans::PropertyState_DIRECT_VALUE; - } - else -#endif - { sAPIEventName = OUString( RTL_CONSTASCII_USTRINGPARAM( "OnClick" ) ); if( mbScript ) @@ -547,8 +504,6 @@ void SdXMLEventContext::EndElement() break; } } - } - xEvents->replaceByName( sAPIEventName, uno::Any( aProperties ) ); } while(0); @@ -573,3 +528,5 @@ SvXMLImportContext * SdXMLEventsContext::CreateChildContext( USHORT nPrfx, const { return new SdXMLEventContext( GetImport(), nPrfx, rLocalName, xAttrList, mxShape ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/eventimp.hxx b/xmloff/source/draw/eventimp.hxx index c6029b4a3c..9041b01163 100644 --- a/xmloff/source/draw/eventimp.hxx +++ b/xmloff/source/draw/eventimp.hxx @@ -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. @@ -55,3 +56,4 @@ public: #endif // _XMLOFF_EVENTIMP_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/layerexp.cxx b/xmloff/source/draw/layerexp.cxx index 2bc690cf69..3a7ea11a93 100644 --- a/xmloff/source/draw/layerexp.cxx +++ b/xmloff/source/draw/layerexp.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. @@ -107,3 +108,5 @@ void SdXMLayerExporter::exportLayer( SvXMLExport& rExport ) } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/layerexp.hxx b/xmloff/source/draw/layerexp.hxx index 6c8cfe14b0..69d45cb8ba 100644 --- a/xmloff/source/draw/layerexp.hxx +++ b/xmloff/source/draw/layerexp.hxx @@ -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. @@ -38,3 +39,4 @@ public: #endif // _XMLOFF_ANIMEXP_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/layerimp.cxx b/xmloff/source/draw/layerimp.cxx index f527bdf799..e70193a7e2 100644 --- a/xmloff/source/draw/layerimp.cxx +++ b/xmloff/source/draw/layerimp.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. @@ -178,3 +179,5 @@ SvXMLImportContext * SdXMLLayerSetContext::CreateChildContext( USHORT nPrefix, c { return new SdXMLLayerContext( GetImport(), nPrefix, rLocalName, xAttrList, mxLayerManager ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/layerimp.hxx b/xmloff/source/draw/layerimp.hxx index 5360faaff4..b914d5ddde 100644 --- a/xmloff/source/draw/layerimp.hxx +++ b/xmloff/source/draw/layerimp.hxx @@ -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. @@ -56,3 +57,4 @@ public: #endif // _XMLOFF_ANIMIMP_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/numithdl.cxx b/xmloff/source/draw/numithdl.cxx index cd90ac90cb..7a72d32116 100644 --- a/xmloff/source/draw/numithdl.cxx +++ b/xmloff/source/draw/numithdl.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. @@ -61,3 +62,4 @@ sal_Bool XMLNumRulePropHdl::exportXML( ::rtl::OUString& /*rStrExpValue*/, const return sal_False; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/numithdl.hxx b/xmloff/source/draw/numithdl.hxx index c009b456b9..49bc519a0d 100644 --- a/xmloff/source/draw/numithdl.hxx +++ b/xmloff/source/draw/numithdl.hxx @@ -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. @@ -50,3 +51,5 @@ public: }; #endif // _XMLOFF_PROPERTYHANDLER_NUMRULE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/propimp0.cxx b/xmloff/source/draw/propimp0.cxx index 996aee9b1e..085398bbe6 100644 --- a/xmloff/source/draw/propimp0.cxx +++ b/xmloff/source/draw/propimp0.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. @@ -270,3 +271,5 @@ sal_Bool XMLDateTimeFormatHdl::exportXML( rtl::OUString& rStrExpValue, const ::c return sal_False; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/propimp0.hxx b/xmloff/source/draw/propimp0.hxx index 5a9c4f4980..9998a95c1e 100644 --- a/xmloff/source/draw/propimp0.hxx +++ b/xmloff/source/draw/propimp0.hxx @@ -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. @@ -76,3 +77,5 @@ public: #endif // _PROPIMP0_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx index 06b5448440..6f3ba340f4 100644 --- a/xmloff/source/draw/sdpropls.cxx +++ b/xmloff/source/draw/sdpropls.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. @@ -39,9 +40,7 @@ #include <com/sun/star/drawing/RectanglePoint.hpp> #include <com/sun/star/drawing/CircleKind.hpp> -#ifndef _COM_SUN_STAR_DRAWING_BitmapMode_HPP_ #include <com/sun/star/drawing/BitmapMode.hpp> -#endif #include <com/sun/star/text/WritingMode.hpp> #include <xmloff/EnumPropertyHdl.hxx> #include <xmloff/NamedBoolPropertyHdl.hxx> @@ -574,7 +573,7 @@ SvXMLEnumMapEntry aXML_WritingMode_EnumMap[] = { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_TextAnimation_Enum[] = +SvXMLEnumMapEntry const pXML_TextAnimation_Enum[] = { { XML_NONE, drawing::TextAnimationKind_NONE }, { XML_BLINKING, drawing::TextAnimationKind_BLINK }, // will be filtered @@ -584,7 +583,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_TextAnimation_Enum[] = { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_TextAnimation_Blinking_Enum[] = +SvXMLEnumMapEntry const pXML_TextAnimation_Blinking_Enum[] = { { XML_FALSE, drawing::TextAnimationKind_NONE }, { XML_TRUE, drawing::TextAnimationKind_BLINK }, @@ -594,7 +593,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_TextAnimation_Blinking_Enum[] = { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_TextAnimationDirection_Enum[] = +SvXMLEnumMapEntry const pXML_TextAnimationDirection_Enum[] = { { XML_LEFT, drawing::TextAnimationDirection_LEFT }, { XML_RIGHT, drawing::TextAnimationDirection_RIGHT }, // will be filtered @@ -603,7 +602,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_TextAnimationDirection_Enum[] = { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_TextAlign_Enum[] = +SvXMLEnumMapEntry const pXML_TextAlign_Enum[] = { { XML_LEFT, drawing::TextHorizontalAdjust_LEFT }, { XML_CENTER, drawing::TextHorizontalAdjust_CENTER }, @@ -612,7 +611,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_TextAlign_Enum[] = { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_VerticalAlign_Enum[] = +SvXMLEnumMapEntry const pXML_VerticalAlign_Enum[] = { { XML_TOP, drawing::TextVerticalAdjust_TOP }, { XML_MIDDLE, drawing::TextVerticalAdjust_CENTER }, @@ -621,16 +620,16 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_VerticalAlign_Enum[] = { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_FitToSize_Enum[] = +SvXMLEnumMapEntry const pXML_FitToSize_Enum[] = { { XML_FALSE, drawing::TextFitToSizeType_NONE }, { XML_TRUE, drawing::TextFitToSizeType_PROPORTIONAL }, - { XML_TRUE, drawing::TextFitToSizeType_ALLLINES }, - { XML_TRUE, drawing::TextFitToSizeType_RESIZEATTR }, + { XML_ALL, drawing::TextFitToSizeType_ALLLINES }, + { XML_SHRINK_TO_FIT,drawing::TextFitToSizeType_AUTOFIT }, { XML_TOKEN_INVALID, 0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_MeasureUnit_Enum[] = +SvXMLEnumMapEntry const pXML_MeasureUnit_Enum[] = { { XML_AUTOMATIC, 0 }, { XML_UNIT_MM, 1 }, @@ -645,7 +644,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_MeasureUnit_Enum[] = { XML_TOKEN_INVALID,0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_Measure_HAlign_Enum[] = +SvXMLEnumMapEntry const pXML_Measure_HAlign_Enum[] = { { XML_AUTOMATIC, drawing::MeasureTextHorzPos_AUTO }, { XML_LEFT_OUTSIDE, drawing::MeasureTextHorzPos_LEFTOUTSIDE }, @@ -654,7 +653,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_Measure_HAlign_Enum[] = { XML_TOKEN_INVALID,0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_Measure_VAlign_Enum[] = +SvXMLEnumMapEntry const pXML_Measure_VAlign_Enum[] = { { XML_AUTOMATIC, drawing::MeasureTextVertPos_AUTO }, { XML_ABOVE, drawing::MeasureTextVertPos_EAST }, @@ -664,7 +663,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_Measure_VAlign_Enum[] = }; // #FontWork# -SvXMLEnumMapEntry __READONLY_DATA pXML_Fontwork_Style_Enum[] = +SvXMLEnumMapEntry const pXML_Fontwork_Style_Enum[] = { { XML_ROTATE, 0 }, //XFT_ROTATE, { XML_UPRIGHT, 1 }, //XFT_UPRIGHT, @@ -674,7 +673,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_Fontwork_Style_Enum[] = { XML_TOKEN_INVALID,0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_Fontwork_Adjust_Enum[] = +SvXMLEnumMapEntry const pXML_Fontwork_Adjust_Enum[] = { { XML_LEFT, 0 }, //XFT_LEFT, { XML_RIGHT, 1 }, //XFT_RIGHT, @@ -683,7 +682,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_Fontwork_Adjust_Enum[] = { XML_TOKEN_INVALID,0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_Fontwork_Shadow_Enum[] = +SvXMLEnumMapEntry const pXML_Fontwork_Shadow_Enum[] = { { XML_NORMAL, 0 }, //XFTSHADOW_NORMAL, { XML_SLANT, 1 }, //XFTSHADOW_SLANT, @@ -691,7 +690,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_Fontwork_Shadow_Enum[] = { XML_TOKEN_INVALID,0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_Fontwork_Form_Enum[] = +SvXMLEnumMapEntry const pXML_Fontwork_Form_Enum[] = { { XML_NONE, 0 }, //XFTFORM_NONE, { XML_TOPCIRCLE, 1 }, //XFTFORM_TOPCIRC, @@ -709,7 +708,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_Fontwork_Form_Enum[] = { XML_TOKEN_INVALID,0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_Caption_Esc_Dir_Enum[] = +SvXMLEnumMapEntry const pXML_Caption_Esc_Dir_Enum[] = { { XML_HORIZONTAL, 0 }, //SDRCAPT_ESCHORIZONTAL, { XML_VERTICAL, 1 }, //SDRCAPT_ESCVERTICAL, @@ -717,7 +716,7 @@ SvXMLEnumMapEntry __READONLY_DATA pXML_Caption_Esc_Dir_Enum[] = { XML_TOKEN_INVALID,0 } }; -SvXMLEnumMapEntry __READONLY_DATA pXML_Caption_Type_Enum[] = +SvXMLEnumMapEntry const pXML_Caption_Type_Enum[] = { { XML_STRAIGHT_LINE, 0 }, //SDRCAPT_TYPE1, { XML_ANGLED_LINE, 1 }, //SDRCAPT_TYPE2, @@ -1762,3 +1761,4 @@ void XMLPageExportPropertyMapper::handleElementItem( } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/sdpropls.hxx b/xmloff/source/draw/sdpropls.hxx index 37c22dc056..82a3567ca5 100644 --- a/xmloff/source/draw/sdpropls.hxx +++ b/xmloff/source/draw/sdpropls.hxx @@ -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. @@ -332,3 +333,5 @@ public: }; #endif // _SDPROPLS_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index 002a7a1368..fd368ef4ae 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -1,10 +1,11 @@ +/* -*- 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 + * Copyright 2000, 2010 Oracle and/or its affiliates. * * This file is part of OpenOffice.org. * @@ -68,9 +69,7 @@ #include <com/sun/star/beans/XPropertyState.hpp> #include "xexptran.hxx" -#ifndef _CPPUHELPER_IMPLBASE1_HXX #include <cppuhelper/implbase1.hxx> -#endif #include <comphelper/extract.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> #include "PropertySetMerger.hxx" @@ -205,8 +204,6 @@ void ImpXMLEXPPageMasterInfo::SetName(const OUString& rStr) msName = rStr; } -DECLARE_LIST(ImpXMLEXPPageMasterList, ImpXMLEXPPageMasterInfo*) - ////////////////////////////////////////////////////////////////////////////// #define IMP_AUTOLAYOUT_INFO_MAX (35L) @@ -406,12 +403,10 @@ ImpXMLAutoLayoutInfo::ImpXMLAutoLayoutInfo(sal_uInt16 nTyp, ImpXMLEXPPageMasterI maPresRect.SetSize(aLayoutSize); } -DECLARE_LIST(ImpXMLAutoLayoutInfoList, ImpXMLAutoLayoutInfo*) - ////////////////////////////////////////////////////////////////////////////// // #110680# -SdXMLExport::SdXMLExport( +SdXMLExport::SdXMLExport( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, sal_Bool bIsDraw, sal_uInt16 nExportFlags ) : SvXMLExport( xServiceFactory, MAP_CM, bIsDraw ? XML_DRAWING : XML_PRESENTATION, nExportFlags ), @@ -419,11 +414,11 @@ SdXMLExport::SdXMLExport( mnDocDrawPageCount(0L), mnShapeStyleInfoIndex(0L), mnObjectCount(0L), - mpPageMasterInfoList(new ImpXMLEXPPageMasterList(1, 4, 4)), - mpPageMasterUsageList(new ImpXMLEXPPageMasterList(1, 4, 4)), - mpNotesPageMasterUsageList(new ImpXMLEXPPageMasterList(1, 4, 4)), + mpPageMasterInfoList(new ImpXMLEXPPageMasterList()), + mpPageMasterUsageList(new ImpXMLEXPPageMasterList()), + mpNotesPageMasterUsageList(new ImpXMLEXPPageMasterList()), mpHandoutPageMaster(NULL), - mpAutoLayoutInfoList(new ImpXMLAutoLayoutInfoList(1, 4, 4)), + mpAutoLayoutInfoList(new ImpXMLAutoLayoutInfoList()), mpSdPropHdlFactory(0L), mpPropertySetMapper(0L), mpPresPagePropsMapper(0L), @@ -628,24 +623,24 @@ void SAL_CALL SdXMLExport::setSourceDocument( const Reference< lang::XComponent // add namespaces _GetNamespaceMap().Add( GetXMLToken(XML_NP_PRESENTATION), - GetXMLToken(XML_N_PRESENTATION), + GetXMLToken(XML_N_PRESENTATION), XML_NAMESPACE_PRESENTATION); _GetNamespaceMap().Add( GetXMLToken(XML_NP_SMIL), - GetXMLToken(XML_N_SMIL_COMPAT), + GetXMLToken(XML_N_SMIL_COMPAT), XML_NAMESPACE_SMIL); _GetNamespaceMap().Add( GetXMLToken(XML_NP_ANIMATION), - GetXMLToken(XML_N_ANIMATION), + GetXMLToken(XML_N_ANIMATION), XML_NAMESPACE_ANIMATION); if( getDefaultVersion() > SvtSaveOptions::ODFVER_012 ) { _GetNamespaceMap().Add( GetXMLToken(XML_NP_OFFICE_EXT), - GetXMLToken(XML_N_OFFICE_EXT), + GetXMLToken(XML_N_OFFICE_EXT), XML_NAMESPACE_OFFICE_EXT); _GetNamespaceMap().Add( @@ -692,7 +687,7 @@ sal_uInt32 SdXMLExport::ImpRecursiveObjectCount(Reference< drawing::XShapes > xS ////////////////////////////////////////////////////////////////////////////// -__EXPORT SdXMLExport::~SdXMLExport() +SdXMLExport::~SdXMLExport() { // cleanup factory, decrease refcount. Should lead to destruction. if(mpSdPropHdlFactory) @@ -716,34 +711,40 @@ __EXPORT SdXMLExport::~SdXMLExport() } // clear evtl. temporary page master infos - if(mpPageMasterInfoList) - { - while(mpPageMasterInfoList->Count()) - delete mpPageMasterInfoList->Remove(mpPageMasterInfoList->Count() - 1L); - delete mpPageMasterInfoList; - mpPageMasterInfoList = 0L; - } if(mpPageMasterUsageList) { + // note: all items in this list are also in mpPageMasterInfoList delete mpPageMasterUsageList; mpPageMasterUsageList = 0L; } + if(mpNotesPageMasterUsageList) { + // note: all items in this list are also in mpPageMasterInfoList delete mpNotesPageMasterUsageList; mpNotesPageMasterUsageList = 0L; } + if(mpPageMasterInfoList) + { + for ( size_t i = 0, n = mpPageMasterInfoList->size(); i < n; ++i ) + delete mpPageMasterInfoList->at( i ); + mpPageMasterInfoList->clear(); + delete mpPageMasterInfoList; + mpPageMasterInfoList = 0L; + } + // clear auto-layout infos if(mpAutoLayoutInfoList) { - while(mpAutoLayoutInfoList->Count()) - delete mpAutoLayoutInfoList->Remove(mpAutoLayoutInfoList->Count() - 1L); + for ( size_t i = 0, n = mpAutoLayoutInfoList->size(); i < n; ++i ) + delete mpAutoLayoutInfoList->at( i ); + mpAutoLayoutInfoList->clear(); delete mpAutoLayoutInfoList; mpAutoLayoutInfoList = 0L; } -// #82003# status indicator stop is called exclusively +// #82003# status indicator stop is called exclusively // from SdXMLFilter::Export() now. // // stop progress view @@ -806,35 +807,6 @@ void SAL_CALL ImpDefaultMapper::removeVetoableChangeListener( const OUString&, c ////////////////////////////////////////////////////////////////////////////// -/* moved to shapeexport.cxx -void SdXMLExport::ImpWriteObjGraphicStyleInfos() -{ - XMLStyleExport aStEx(*this, OUString(), GetAutoStylePool().get()); - const UniReference< SvXMLExportPropertyMapper > aMapperRef( GetPropertySetMapper() ); - - // write graphic family default style - Reference< lang::XMultiServiceFactory > xFact( GetModel(), UNO_QUERY ); - if( xFact.is() ) - { - try - { - Reference< beans::XPropertySet > xDefaults( xFact->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.Defaults") ) ), UNO_QUERY ); - if( xDefaults.is() ) - { - aStEx.exportDefaultStyle( xDefaults, OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_NAME)), aMapperRef ); - - // write graphic family styles - aStEx.exportStyleFamily(XML_STYLE_FAMILY_SD_GRAPHICS_NAME, OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_NAME)), aMapperRef, FALSE, XML_STYLE_FAMILY_SD_GRAPHICS_ID); - } - } - catch( lang::ServiceNotRegisteredException& ) - { - } - } -} -*/ -////////////////////////////////////////////////////////////////////////////// - void SdXMLExport::ImpPrepAutoLayoutInfos() { if(IsImpress()) @@ -905,21 +877,21 @@ BOOL SdXMLExport::ImpPrepAutoLayoutInfo(const Reference<XDrawPage>& xPage, OUStr ImpXMLAutoLayoutInfo* pNew = new ImpXMLAutoLayoutInfo(nType, pInfo); BOOL bDidExist(FALSE); - for(sal_uInt32 nCnt = 0L; !bDidExist && nCnt < mpAutoLayoutInfoList->Count(); nCnt++) + for( size_t nCnt = 0; !bDidExist && nCnt < mpAutoLayoutInfoList->size(); nCnt++) { - if(*mpAutoLayoutInfoList->GetObject(nCnt) == *pNew) + if( *mpAutoLayoutInfoList->at( nCnt ) == *pNew) { delete pNew; - pNew = mpAutoLayoutInfoList->GetObject(nCnt); + pNew = mpAutoLayoutInfoList->at( nCnt ); bDidExist = TRUE; } } if(!bDidExist) { - mpAutoLayoutInfoList->Insert(pNew, LIST_APPEND); + mpAutoLayoutInfoList->push_back( pNew ); OUString sNewName = OUString(RTL_CONSTASCII_USTRINGPARAM("AL")); - sNewName += OUString::valueOf(sal_Int32(mpAutoLayoutInfoList->Count() - 1)); + sNewName += OUString::valueOf(sal_Int32( mpAutoLayoutInfoList->size() - 1 )); sNewName += OUString(RTL_CONSTASCII_USTRINGPARAM("T")); sNewName += OUString::valueOf(sal_Int32(nType)); pNew->SetLayoutName(sNewName); @@ -938,11 +910,11 @@ BOOL SdXMLExport::ImpPrepAutoLayoutInfo(const Reference<XDrawPage>& xPage, OUStr void SdXMLExport::ImpWriteAutoLayoutInfos() { - if(mpAutoLayoutInfoList->Count()) + if( !mpAutoLayoutInfoList->empty() ) { - for(sal_uInt32 nCnt = 0L; nCnt < mpAutoLayoutInfoList->Count(); nCnt++) + for(size_t nCnt = 0; nCnt < mpAutoLayoutInfoList->size(); nCnt++) { - ImpXMLAutoLayoutInfo* pInfo = mpAutoLayoutInfoList->GetObject(nCnt); + ImpXMLAutoLayoutInfo* pInfo = mpAutoLayoutInfoList->at( nCnt ); if(pInfo) { // prepare presentation-page layout attributes, style-name @@ -1380,19 +1352,20 @@ ImpXMLEXPPageMasterInfo* SdXMLExport::ImpGetOrCreatePageMasterInfo( Reference< X ImpXMLEXPPageMasterInfo* pNewInfo = new ImpXMLEXPPageMasterInfo(*this, xMasterPage); // compare with prev page-master infos - for(sal_uInt32 a = 0; !bDoesExist && a < mpPageMasterInfoList->Count(); a++) + for( size_t a = 0; !bDoesExist && a < mpPageMasterInfoList->size(); a++) { - if(mpPageMasterInfoList->GetObject(a) - && *mpPageMasterInfoList->GetObject(a) == *pNewInfo) + if ( mpPageMasterInfoList->at(a) + && *mpPageMasterInfoList->at(a) == *pNewInfo + ) { delete pNewInfo; - pNewInfo = mpPageMasterInfoList->GetObject(a); + pNewInfo = mpPageMasterInfoList->at(a); bDoesExist = true; } } // add entry when not found same page-master infos if(!bDoesExist) - mpPageMasterInfoList->Insert(pNewInfo, LIST_APPEND); + mpPageMasterInfoList->push_back( pNewInfo ); return pNewInfo; } @@ -1424,7 +1397,7 @@ void SdXMLExport::ImpPrepPageMasterInfos() if(xMasterPage.is()) pNewInfo = ImpGetOrCreatePageMasterInfo(xMasterPage); - mpPageMasterUsageList->Insert(pNewInfo, LIST_APPEND); + mpPageMasterUsageList->push_back( pNewInfo ); // look for page master of handout page if(IsImpress()) @@ -1439,7 +1412,7 @@ void SdXMLExport::ImpPrepPageMasterInfos() pNewInfo = ImpGetOrCreatePageMasterInfo(xNotesPage); } } - mpNotesPageMasterUsageList->Insert( pNewInfo, LIST_APPEND ); + mpNotesPageMasterUsageList->push_back( pNewInfo ); } } } @@ -1450,9 +1423,9 @@ void SdXMLExport::ImpPrepPageMasterInfos() void SdXMLExport::ImpWritePageMasterInfos() { // write created page-masters, create names for these - for(sal_uInt32 nCnt = 0L; nCnt < mpPageMasterInfoList->Count(); nCnt++) + for( size_t nCnt = 0; nCnt < mpPageMasterInfoList->size(); nCnt++) { - ImpXMLEXPPageMasterInfo* pInfo = mpPageMasterInfoList->GetObject(nCnt); + ImpXMLEXPPageMasterInfo* pInfo = mpPageMasterInfoList->at(nCnt); if(pInfo) { // create name @@ -1511,11 +1484,11 @@ void SdXMLExport::ImpWritePageMasterInfos() ImpXMLEXPPageMasterInfo* SdXMLExport::ImpGetPageMasterInfoByName(const OUString& rName) { - if(rName.getLength() && mpPageMasterInfoList->Count()) + if(rName.getLength() && !mpPageMasterInfoList->empty()) { - for(sal_uInt32 nCnt = 0L; nCnt < mpPageMasterInfoList->Count(); nCnt++) + for( size_t nCnt = 0; nCnt < mpPageMasterInfoList->size(); nCnt++) { - ImpXMLEXPPageMasterInfo* pInfo = mpPageMasterInfoList->GetObject(nCnt); + ImpXMLEXPPageMasterInfo* pInfo = mpPageMasterInfoList->at(nCnt); if(pInfo) { if(pInfo->GetMasterPageName().getLength() && rName.equals(pInfo->GetMasterPageName())) @@ -1561,7 +1534,7 @@ static OUString findOrAppendImpl( std::vector< OUString >& rVector, const OUStri // search rVector if there is already a string that equals rText std::vector< OUString >::iterator aIter; sal_Int32 nIndex; - for( nIndex = 1, aIter = rVector.begin(); aIter != rVector.end(); aIter++, nIndex++ ) + for( nIndex = 1, aIter = rVector.begin(); aIter != rVector.end(); ++aIter, ++nIndex ) { if( (*aIter) == rText ) break; @@ -1583,7 +1556,7 @@ static OUString findOrAppendImpl( std::vector< DateTimeDeclImpl >& rVector, cons // search rVector if there is already a DateTimeDeclImpl with rText,bFixed and nFormat std::vector< DateTimeDeclImpl >::iterator aIter; sal_Int32 nIndex; - for( nIndex = 1, aIter = rVector.begin(); aIter != rVector.end(); aIter++, nIndex++ ) + for( nIndex = 1, aIter = rVector.begin(); aIter != rVector.end(); ++aIter, ++nIndex ) { const DateTimeDeclImpl& rDecl = (*aIter); if( (rDecl.mbFixed == bFixed ) && @@ -1619,7 +1592,7 @@ HeaderFooterPageSettingsImpl SdXMLExport::ImpPrepDrawPageHeaderFooterDecls( cons HeaderFooterPageSettingsImpl aSettings; if( xDrawPage.is() ) try - { + { Reference< XPropertySet > xSet( xDrawPage, UNO_QUERY_THROW ); Reference< XPropertySetInfo > xInfo( xSet->getPropertySetInfo() ); @@ -1679,7 +1652,7 @@ void SdXMLExport::ImpWriteHeaderFooterDecls() const OUString aPrefix( OUString::createFromAscii( gpStrHeaderTextPrefix ) ); std::vector< OUString >::iterator aIter; sal_Int32 nIndex; - for( nIndex = 1, aIter = maHeaderDeclsVector.begin(); aIter != maHeaderDeclsVector.end(); aIter++, nIndex++ ) + for( nIndex = 1, aIter = maHeaderDeclsVector.begin(); aIter != maHeaderDeclsVector.end(); ++aIter, ++nIndex ) { sBuffer.append( aPrefix ); sBuffer.append( nIndex ); @@ -1696,7 +1669,7 @@ void SdXMLExport::ImpWriteHeaderFooterDecls() const OUString aPrefix( OUString::createFromAscii( gpStrFooterTextPrefix ) ); std::vector< OUString >::iterator aIter; sal_Int32 nIndex; - for( nIndex = 1, aIter = maFooterDeclsVector.begin(); aIter != maFooterDeclsVector.end(); aIter++, nIndex++ ) + for( nIndex = 1, aIter = maFooterDeclsVector.begin(); aIter != maFooterDeclsVector.end(); ++aIter, ++nIndex ) { sBuffer.append( aPrefix ); sBuffer.append( nIndex ); @@ -1713,7 +1686,7 @@ void SdXMLExport::ImpWriteHeaderFooterDecls() const OUString aPrefix( OUString::createFromAscii( gpStrDateTimeTextPrefix ) ); std::vector< DateTimeDeclImpl >::iterator aIter; sal_Int32 nIndex; - for( nIndex = 1, aIter = maDateTimeDeclsVector.begin(); aIter != maDateTimeDeclsVector.end(); aIter++, nIndex++ ) + for( nIndex = 1, aIter = maDateTimeDeclsVector.begin(); aIter != maDateTimeDeclsVector.end(); ++aIter, ++nIndex ) { const DateTimeDeclImpl& rDecl = (*aIter); @@ -1722,7 +1695,7 @@ void SdXMLExport::ImpWriteHeaderFooterDecls() AddAttribute( XML_NAMESPACE_PRESENTATION, XML_NAME, sBuffer.makeStringAndClear()); AddAttribute( XML_NAMESPACE_PRESENTATION, XML_SOURCE, rDecl.mbFixed ? XML_FIXED : XML_CURRENT_DATE ); - + if( !rDecl.mbFixed ) AddAttribute( XML_NAMESPACE_STYLE, XML_DATA_STYLE_NAME, getDataStyleName( rDecl.mnFormat ) ); @@ -1825,7 +1798,7 @@ void SdXMLExport::ImpPrepMasterPageInfos() { Reference< presentation::XHandoutMasterSupplier > xHandoutSupp( GetModel(), UNO_QUERY ); if( xHandoutSupp.is() ) - { + { Reference< XDrawPage > xHandoutPage( xHandoutSupp->getHandoutMasterPage() ); if( xHandoutPage.is() ) { @@ -1882,7 +1855,7 @@ void SdXMLExport::SetProgress(sal_Int32 nProg) void SdXMLExport::_ExportMeta() { uno::Sequence<beans::NamedValue> stats(1); - stats[0] = beans::NamedValue(::rtl::OUString::createFromAscii("ObjectCount"), + stats[0] = beans::NamedValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ObjectCount" )), uno::makeAny(mnObjectCount)); // update document statistics at the model @@ -1921,7 +1894,7 @@ void SdXMLExport::_ExportContent() // draw:style-name (presentation page attributes AND background attributes) if( maDrawPagesStyleNames[nPageInd].getLength() ) - AddAttribute(XML_NAMESPACE_DRAW, XML_STYLE_NAME, + AddAttribute(XML_NAMESPACE_DRAW, XML_STYLE_NAME, maDrawPagesStyleNames[nPageInd]); // draw:master-page-name @@ -1934,7 +1907,7 @@ void SdXMLExport::_ExportContent() Reference < container::XNamed > xMasterNamed(xUsedMasterPage, UNO_QUERY); if(xMasterNamed.is()) { - AddAttribute(XML_NAMESPACE_DRAW, XML_MASTER_PAGE_NAME, + AddAttribute(XML_NAMESPACE_DRAW, XML_MASTER_PAGE_NAME, EncodeStyleName( xMasterNamed->getName()) ); } } @@ -2566,15 +2539,15 @@ void SdXMLExport::_ExportMasterStyles() { sal_Bool bEncoded = sal_False; sMasterPageName = xNamed->getName(); - AddAttribute(XML_NAMESPACE_STYLE, XML_NAME, + AddAttribute(XML_NAMESPACE_STYLE, XML_NAME, EncodeStyleName( sMasterPageName, &bEncoded )); if( bEncoded ) - AddAttribute( + AddAttribute( XML_NAMESPACE_STYLE, XML_DISPLAY_NAME, sMasterPageName ); } - ImpXMLEXPPageMasterInfo* pInfo = mpPageMasterUsageList->GetObject(nMPageId); + ImpXMLEXPPageMasterInfo* pInfo = mpPageMasterUsageList->at( nMPageId ); if(pInfo) { OUString sString = pInfo->GetName(); @@ -2583,7 +2556,7 @@ void SdXMLExport::_ExportMasterStyles() // draw:style-name (background attributes) if( maMasterPagesStyleNames[nMPageId].getLength() ) - AddAttribute(XML_NAMESPACE_DRAW, XML_STYLE_NAME, + AddAttribute(XML_NAMESPACE_DRAW, XML_STYLE_NAME, maMasterPagesStyleNames[nMPageId]); // write masterpage @@ -2609,7 +2582,7 @@ void SdXMLExport::_ExportMasterStyles() Reference< drawing::XShapes > xShapes(xNotesPage, UNO_QUERY); if(xShapes.is()) { - ImpXMLEXPPageMasterInfo* pMasterInfo = mpNotesPageMasterUsageList->GetObject(nMPageId); + ImpXMLEXPPageMasterInfo* pMasterInfo = mpNotesPageMasterUsageList->at( nMPageId ); if(pMasterInfo) { OUString sString = pMasterInfo->GetName(); @@ -2628,7 +2601,7 @@ void SdXMLExport::_ExportMasterStyles() } } } - exportAnnotations( xMasterPage ); + exportAnnotations( xMasterPage ); } } } @@ -2654,7 +2627,7 @@ void SdXMLExport::exportFormsElement( Reference< XDrawPage > xDrawPage ) void SdXMLExport::GetViewSettings(uno::Sequence<beans::PropertyValue>& rProps) { - rProps.realloc(4); + rProps.realloc(4); beans::PropertyValue* pProps = rProps.getArray(); if(pProps) { @@ -2763,7 +2736,7 @@ OUString SdXMLExport::getNavigationOrder( const Reference< XDrawPage >& xDrawPag Reference< XIndexAccess > xNavOrder( xSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "NavigationOrder" ) ) ), UNO_QUERY_THROW ); Reference< XIndexAccess > xZOrderAccess( xDrawPage, UNO_QUERY ); - + // only export navigation order if it is different from the z-order if( (xNavOrder.get() != xZOrderAccess.get()) && (xNavOrder->getCount() == xDrawPage->getCount()) ) { @@ -2817,7 +2790,7 @@ void SdXMLExport::exportAnnotations( const Reference<XDrawPage>& xDrawPage ) // do not export in ODF 1.2 or older if( getDefaultVersion() <= SvtSaveOptions::ODFVER_012 ) return; - + Reference< XAnnotationAccess > xAnnotationAccess( xDrawPage, UNO_QUERY ); if( xAnnotationAccess.is() ) try { @@ -2985,9 +2958,11 @@ OUString SAL_CALL SdXMLExport::getImplementationName() throw( uno::RuntimeExcept return XMLImpressMetaExportOasis_getImplementationName(); case EXPORT_OASIS|EXPORT_SETTINGS: return XMLImpressSettingsExportOasis_getImplementationName(); - + default: return XMLImpressExportOOO_getImplementationName(); } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/sdxmlexp_impl.hxx b/xmloff/source/draw/sdxmlexp_impl.hxx index e80bb005c2..bc7bba544e 100644 --- a/xmloff/source/draw/sdxmlexp_impl.hxx +++ b/xmloff/source/draw/sdxmlexp_impl.hxx @@ -1,10 +1,11 @@ +/* -*- 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 + * Copyright 2000, 2010 Oracle and/or its affiliates. * * This file is part of OpenOffice.org. * @@ -30,13 +31,14 @@ #include <xmloff/xmlexp.hxx> - #include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/task/XStatusIndicator.hpp> #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/drawing/XDrawPage.hpp> #include <comphelper/stl_types.hxx> +#include <vector> + ////////////////////////////////////////////////////////////////////////////// class SvXMLUnitConverter; @@ -48,16 +50,18 @@ class OUStringsSort_Impl; class Rectangle; class ImpPresPageDrawStylePropMapper; -class ImpXMLEXPPageMasterList; class ImpXMLEXPPageMasterInfo; class ImpXMLDrawPageInfoList; -class ImpXMLAutoLayoutInfoList; +class ImpXMLAutoLayoutInfo; class SvXMLAutoStylePoolP; class XMLSdPropHdlFactory; class ImpXMLShapeStyleInfo; class XMLShapeExportPropertyMapper; class XMLPageExportPropertyMapper; +typedef ::std::vector< ImpXMLEXPPageMasterInfo* > ImpXMLEXPPageMasterList; +typedef ::std::vector< ImpXMLAutoLayoutInfo* > ImpXMLAutoLayoutInfoList; + ////////////////////////////////////////////////////////////////////////////// enum XmlPlaceholder @@ -192,7 +196,7 @@ protected: public: // #110680# - SdXMLExport( + SdXMLExport( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory, sal_Bool bIsDraw, sal_uInt16 nExportFlags = EXPORT_ALL ); virtual ~SdXMLExport(); @@ -226,3 +230,4 @@ public: #endif // _SDXMLEXP_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx index 3483e48ed4..2cb3bcbe28 100644 --- a/xmloff/source/draw/sdxmlimp.cxx +++ b/xmloff/source/draw/sdxmlimp.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. @@ -30,15 +31,11 @@ #include <tools/string.hxx> -#ifndef _XMLOFF_XMLMETAI_HXX #include <xmloff/xmlscripti.hxx> -#endif #include "sdxmlimp_impl.hxx" #include "ximpbody.hxx" -#ifndef _SFX_XMLMETAI_HXX #include <xmloff/xmlmetai.hxx> -#endif #include "ximpstyl.hxx" #include "xmloff/xmlnmspe.hxx" #include <xmloff/xmltoken.hxx> @@ -505,7 +502,7 @@ const SvXMLTokenMap& SdXMLImport::GetDocElemTokenMap() { if(!mpDocElemTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry aDocElemTokenMap[] = + static SvXMLTokenMapEntry aDocElemTokenMap[] = { { XML_NAMESPACE_OFFICE, XML_FONT_FACE_DECLS, XML_TOK_DOC_FONTDECLS }, { XML_NAMESPACE_OFFICE, XML_STYLES, XML_TOK_DOC_STYLES }, @@ -530,7 +527,7 @@ const SvXMLTokenMap& SdXMLImport::GetBodyElemTokenMap() { if(!mpBodyElemTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry aBodyElemTokenMap[] = + static SvXMLTokenMapEntry aBodyElemTokenMap[] = { { XML_NAMESPACE_DRAW, XML_PAGE, XML_TOK_BODY_PAGE }, { XML_NAMESPACE_PRESENTATION, XML_SETTINGS, XML_TOK_BODY_SETTINGS }, @@ -553,7 +550,7 @@ const SvXMLTokenMap& SdXMLImport::GetStylesElemTokenMap() { if(!mpStylesElemTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry aStylesElemTokenMap[] = + static SvXMLTokenMapEntry aStylesElemTokenMap[] = { { XML_NAMESPACE_STYLE, XML_PAGE_LAYOUT, XML_TOK_STYLES_PAGE_MASTER }, { XML_NAMESPACE_STYLE, XML_PRESENTATION_PAGE_LAYOUT, XML_TOK_STYLES_PRESENTATION_PAGE_LAYOUT }, @@ -573,7 +570,7 @@ const SvXMLTokenMap& SdXMLImport::GetMasterPageElemTokenMap() { if(!mpMasterPageElemTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry aMasterPageElemTokenMap[] = + static SvXMLTokenMapEntry aMasterPageElemTokenMap[] = { { XML_NAMESPACE_STYLE, XML_STYLE, XML_TOK_MASTERPAGE_STYLE }, { XML_NAMESPACE_PRESENTATION, XML_NOTES, XML_TOK_MASTERPAGE_NOTES }, @@ -592,7 +589,7 @@ const SvXMLTokenMap& SdXMLImport::GetMasterPageAttrTokenMap() { if(!mpMasterPageAttrTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry aMasterPageAttrTokenMap[] = + static SvXMLTokenMapEntry aMasterPageAttrTokenMap[] = { { XML_NAMESPACE_STYLE, XML_NAME, XML_TOK_MASTERPAGE_NAME }, { XML_NAMESPACE_STYLE, XML_DISPLAY_NAME, XML_TOK_MASTERPAGE_DISPLAY_NAME }, @@ -617,7 +614,7 @@ const SvXMLTokenMap& SdXMLImport::GetPageMasterAttrTokenMap() { if(!mpPageMasterAttrTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry aPageMasterAttrTokenMap[] = + static SvXMLTokenMapEntry aPageMasterAttrTokenMap[] = { { XML_NAMESPACE_STYLE, XML_NAME, XML_TOK_PAGEMASTER_NAME }, XML_TOKEN_MAP_END @@ -635,7 +632,7 @@ const SvXMLTokenMap& SdXMLImport::GetPageMasterStyleAttrTokenMap() { if(!mpPageMasterStyleAttrTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry aPageMasterStyleAttrTokenMap[] = + static SvXMLTokenMapEntry aPageMasterStyleAttrTokenMap[] = { { XML_NAMESPACE_FO, XML_MARGIN_TOP, XML_TOK_PAGEMASTERSTYLE_MARGIN_TOP }, { XML_NAMESPACE_FO, XML_MARGIN_BOTTOM, XML_TOK_PAGEMASTERSTYLE_MARGIN_BOTTOM }, @@ -659,7 +656,7 @@ const SvXMLTokenMap& SdXMLImport::GetDrawPageAttrTokenMap() { if(!mpDrawPageAttrTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry aDrawPageAttrTokenMap[] = + static SvXMLTokenMapEntry aDrawPageAttrTokenMap[] = { { XML_NAMESPACE_DRAW, XML_NAME, XML_TOK_DRAWPAGE_NAME }, { XML_NAMESPACE_DRAW, XML_STYLE_NAME, XML_TOK_DRAWPAGE_STYLE_NAME }, @@ -687,7 +684,7 @@ const SvXMLTokenMap& SdXMLImport::GetDrawPageElemTokenMap() { if(!mpDrawPageElemTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry aDrawPageElemTokenMap[] = + static SvXMLTokenMapEntry aDrawPageElemTokenMap[] = { { XML_NAMESPACE_PRESENTATION, XML_NOTES, XML_TOK_DRAWPAGE_NOTES }, { XML_NAMESPACE_ANIMATION, XML_PAR, XML_TOK_DRAWPAGE_PAR }, @@ -707,7 +704,7 @@ const SvXMLTokenMap& SdXMLImport::GetPresentationPlaceholderAttrTokenMap() { if(!mpPresentationPlaceholderAttrTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry aPresentationPlaceholderAttrTokenMap[] = + static SvXMLTokenMapEntry aPresentationPlaceholderAttrTokenMap[] = { { XML_NAMESPACE_PRESENTATION, XML_OBJECT, XML_TOK_PRESENTATIONPLACEHOLDER_OBJECTNAME }, { XML_NAMESPACE_SVG, XML_X, XML_TOK_PRESENTATIONPLACEHOLDER_X }, @@ -743,8 +740,8 @@ SvXMLImportContext *SdXMLImport::CreateContext(USHORT nPrefix, } else if ( (XML_NAMESPACE_OFFICE == nPrefix) && ( IsXMLToken(rLocalName, XML_DOCUMENT)) ) { uno::Reference<xml::sax::XDocumentHandler> xDocBuilder( - mxServiceFactory->createInstance(::rtl::OUString::createFromAscii( - "com.sun.star.xml.dom.SAXDocumentBuilder")), + mxServiceFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.xml.dom.SAXDocumentBuilder"))), uno::UNO_QUERY_THROW); uno::Reference<document::XDocumentPropertiesSupplier> xDPS( GetModel(), uno::UNO_QUERY_THROW); @@ -768,8 +765,8 @@ SvXMLImportContext *SdXMLImport::CreateMetaContext(const OUString& rLocalName, if (!IsStylesOnlyMode() && (getImportFlags() & IMPORT_META)) { uno::Reference<xml::sax::XDocumentHandler> xDocBuilder( - mxServiceFactory->createInstance(::rtl::OUString::createFromAscii( - "com.sun.star.xml.dom.SAXDocumentBuilder")), + mxServiceFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.xml.dom.SAXDocumentBuilder"))), uno::UNO_QUERY_THROW); uno::Reference<document::XDocumentPropertiesSupplier> xDPS( GetModel(), uno::UNO_QUERY_THROW); @@ -1099,3 +1096,5 @@ void SdXMLImport::AddDateTimeDecl( const ::rtl::OUString& rName, const ::rtl::OU } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/sdxmlimp_impl.hxx b/xmloff/source/draw/sdxmlimp_impl.hxx index 0bc22d9ae9..f0c10ae38b 100644 --- a/xmloff/source/draw/sdxmlimp_impl.hxx +++ b/xmloff/source/draw/sdxmlimp_impl.hxx @@ -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. @@ -34,9 +35,7 @@ #include <xmloff/xmltkmap.hxx> #include <com/sun/star/container/XNameAccess.hpp> -#ifndef __SGI_STL_VECTOR #include <vector> -#endif #include <xmloff/xmlimp.hxx> ////////////////////////////////////////////////////////////////////////////// @@ -337,3 +336,5 @@ public: }; #endif // _SDXMLIMP_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 41c6ffa9ce..0b8b9eefcc 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.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. @@ -90,11 +91,6 @@ XMLShapeExport::XMLShapeExport(SvXMLExport& rExp, msStartShape( RTL_CONSTASCII_USTRINGPARAM("StartShape") ), msEndShape( RTL_CONSTASCII_USTRINGPARAM("EndShape") ), msOnClick( RTL_CONSTASCII_USTRINGPARAM("OnClick") ), -#ifdef ISSUE66550_HLINK_FOR_SHAPES - msOnAction( RTL_CONSTASCII_USTRINGPARAM("OnAction") ), - msAction( RTL_CONSTASCII_USTRINGPARAM("Action") ), - msURL( RTL_CONSTASCII_USTRINGPARAM("URL") ), -#endif msEventType( RTL_CONSTASCII_USTRINGPARAM("EventType") ), msPresentation( RTL_CONSTASCII_USTRINGPARAM("Presentation") ), msMacroName( RTL_CONSTASCII_USTRINGPARAM("MacroName") ), @@ -177,10 +173,10 @@ uno::Reference< drawing::XShape > XMLShapeExport::checkForCustomShapeReplacement { uno::Sequence< uno::Any > aArgument( 1 ); uno::Sequence< beans::PropertyValue > aPropValues( 2 ); - aPropValues[ 0 ].Name = rtl::OUString::createFromAscii( "CustomShape" ); + aPropValues[ 0 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "CustomShape" )); aPropValues[ 0 ].Value <<= xShape; sal_Bool bForceGroupWithText = sal_True; - aPropValues[ 1 ].Name = rtl::OUString::createFromAscii( "ForceGroupWithText" ); + aPropValues[ 1 ].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ForceGroupWithText" )); aPropValues[ 1 ].Value <<= bForceGroupWithText; aArgument[ 0 ] <<= aPropValues; uno::Reference< uno::XInterface > xInterface( xFactory->createInstanceWithArguments( aEngine, aArgument ) ); @@ -364,7 +360,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap { if( aIter->mnIndex != -1 ) nCount++; - aIter++; + ++aIter; } } @@ -433,7 +429,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap { if( aIter->mnIndex != -1 ) nCount++; - aIter++; + ++aIter; } if( nCount ) @@ -511,7 +507,6 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap /////////////////////////////////////////////////////////////////////// -// --> OD 2008-05-08 #refactorlists# namespace { class NewTextListsHelper @@ -588,9 +583,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape return; } - // --> OD 2008-05-08 #refactorlists# NewTextListsHelper aNewTextListsHelper( mrExport ); - // <-- const ImplXMLShapeExportInfo& aShapeInfo = aShapeInfoVector[nZIndex]; @@ -623,16 +616,13 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape if( mxAnimationsExporter.is() ) mxAnimationsExporter->collect( xShape, mrExport ); - // ------------------------------- - // export shapes name if he has one - // --> OD 2006-03-13 #i51726# - // Export of the shape name for text documents only if the OpenDocument - // file format is written - exceptions are group shapes. - // Note: Writer documents in OpenOffice.org file format doesn't contain - // any names for shapes, except for group shapes. - // ------------------------------- + /* Export shapes name if he has one (#i51726#) + Export of the shape name for text documents only if the OpenDocument + file format is written - exceptions are group shapes. + Note: Writer documents in OpenOffice.org file format doesn't contain + any names for shapes, except for group shapes. + */ { - // --> OD 2006-03-10 #i51726# if ( ( GetExport().GetModelType() != SvtModuleOptions::E_WRITER && GetExport().GetModelType() != SvtModuleOptions::E_WRITERWEB && GetExport().GetModelType() != SvtModuleOptions::E_WRITERGLOBAL ) || @@ -649,7 +639,6 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_NAME, aName ); } } - // <-- } // ------------------ @@ -696,7 +685,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape { uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY ); OUString aLayerName; - xProps->getPropertyValue( OUString::createFromAscii( "LayerName" ) ) >>= aLayerName; + xProps->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "LayerName" )) ) >>= aLayerName; mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_LAYER, aLayerName ); } @@ -1301,3 +1290,5 @@ const rtl::Reference< XMLTableExport >& XMLShapeExport::GetShapeTableExport() return mxShapeTableExport; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/shapeexport2.cxx b/xmloff/source/draw/shapeexport2.cxx index 8445b0b0fb..4fb5839a0e 100644 --- a/xmloff/source/draw/shapeexport2.cxx +++ b/xmloff/source/draw/shapeexport2.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. @@ -40,9 +41,7 @@ #include <com/sun/star/media/ZoomLevel.hpp> #include "anim.hxx" -#ifndef _XMLOFF_SHAPEEXPORT_HXX #include <xmloff/shapeexport.hxx> -#endif #include "sdpropls.hxx" #include <tools/debug.hxx> #include <tools/urlobj.hxx> @@ -89,16 +88,17 @@ void XMLShapeExport::ImpExportNewTrans(const uno::Reference< beans::XPropertySet void XMLShapeExport::ImpExportNewTrans_GetB2DHomMatrix(::basegfx::B2DHomMatrix& rMatrix, const uno::Reference< beans::XPropertySet >& xPropSet) { - // --> OD 2004-08-09 #i28749# - Get <TransformationInHoriL2R>, if it exist - // and if the document is exported into the OpenOffice.org file format. - // This property only exists at service com::sun::star::text::Shape - the - // Writer UNO service for shapes. - // This code is needed, because the positioning attributes in the - // OpenOffice.org file format are given in horizontal left-to-right layout - // regardless the layout direction the shape is in. In the OASIS Open Office - // file format the positioning attributes are correctly given in the layout - // direction the shape is in. Thus, this code provides the conversion from - // the OASIS Open Office file format to the OpenOffice.org file format. + /* Get <TransformationInHoriL2R>, if it exist + and if the document is exported into the OpenOffice.org file format. + This property only exists at service com::sun::star::text::Shape - the + Writer UNO service for shapes. + This code is needed, because the positioning attributes in the + OpenOffice.org file format are given in horizontal left-to-right layout + regardless the layout direction the shape is in. In the OASIS Open Office + file format the positioning attributes are correctly given in the layout + direction the shape is in. Thus, this code provides the conversion from + the OASIS Open Office file format to the OpenOffice.org file format. (#i28749#) + */ uno::Any aAny; if ( ( GetExport().getExportFlags() & EXPORT_OASIS ) == 0 && xPropSet->getPropertySetInfo()->hasPropertyByName( @@ -110,7 +110,6 @@ void XMLShapeExport::ImpExportNewTrans_GetB2DHomMatrix(::basegfx::B2DHomMatrix& { aAny = xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Transformation"))); } - // <-- drawing::HomogenMatrix3 aMatrix; aAny >>= aMatrix; @@ -293,9 +292,6 @@ const sal_Int32 FOUND_CLICKEVENTTYPE = 0x00000080; const sal_Int32 FOUND_MACRO = 0x00000100; const sal_Int32 FOUND_LIBRARY = 0x00000200; const sal_Int32 FOUND_ACTIONEVENTTYPE = 0x00000400; -#ifdef ISSUE66550_HLINK_FOR_SHAPES -const sal_Int32 FOUND_URL = 0x00000800; -#endif } // namespace @@ -385,33 +381,6 @@ void XMLShapeExport::ImpExportEvents( const uno::Reference< drawing::XShape >& x } } -#ifdef ISSUE66550_HLINK_FOR_SHAPES - // extract properties from "OnAction" event ------------------------------- - - OUString aActionEventType; - OUString aHyperURL; - - uno::Sequence< beans::PropertyValue > aActionProperties; - if( xEvents->hasByName( msOnAction ) && (xEvents->getByName( msOnAction ) >>= aActionProperties) ) - { - const beans::PropertyValue* pProperty = aActionProperties.getConstArray(); - const beans::PropertyValue* pPropertyEnd = pProperty + aActionProperties.getLength(); - for( ; pProperty != pPropertyEnd; ++pProperty ) - { - if( ( ( nFound & FOUND_ACTIONEVENTTYPE ) == 0 ) && pProperty->Name == msEventType ) - { - if( pProperty->Value >>= aActionEventType ) - nFound |= FOUND_ACTIONEVENTTYPE; - } - else if( ( ( nFound & FOUND_URL ) == 0 ) && ( pProperty->Name == msURL ) ) - { - if( pProperty->Value >>= aHyperURL ) - nFound |= FOUND_URL; - } - } - } -#endif - // create the XML elements if( aClickEventType == msPresentation ) @@ -563,15 +532,9 @@ void XMLShapeExport::ImpExportEvents( const uno::Reference< drawing::XShape >& x SvXMLElementExport aEventElemt(mrExport, XML_NAMESPACE_SCRIPT, XML_EVENT_LISTENER, sal_True, sal_True); } } -#ifdef ISSUE66550_HLINK_FOR_SHAPES - else if( aClickEventType == msScript || aActionEventType == msAction ) - { - if( nFound & ( FOUND_MACRO | FOUND_URL ) ) -#else else if( aClickEventType == msScript ) { if( nFound & FOUND_MACRO ) -#endif { SvXMLElementExport aEventsElemt(mrExport, XML_NAMESPACE_OFFICE, XML_EVENT_LISTENERS, sal_True, sal_True); if ( nFound & FOUND_MACRO ) @@ -586,18 +549,6 @@ void XMLShapeExport::ImpExportEvents( const uno::Reference< drawing::XShape >& x SvXMLElementExport aEventElemt(mrExport, XML_NAMESPACE_SCRIPT, XML_EVENT_LISTENER, sal_True, sal_True); } -#ifdef ISSUE66550_HLINK_FOR_SHAPES - if ( nFound & FOUND_URL ) - { - OUString aEventQName( - mrExport.GetNamespaceMap().GetQNameByKey( - XML_NAMESPACE_DOM, OUString( RTL_CONSTASCII_USTRINGPARAM( "action" ) ) ) ); - mrExport.AddAttribute( XML_NAMESPACE_SCRIPT, XML_EVENT_NAME, aEventQName ); - mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, aHyperURL ); - - SvXMLElementExport aEventElemt(mrExport, XML_NAMESPACE_PRESENTATION, XML_EVENT_LISTENER, sal_True, sal_True); - } -#endif } } } @@ -613,8 +564,8 @@ void XMLShapeExport::ImpExportDescription( const uno::Reference< drawing::XShape OUString aDescription; uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY_THROW ); - xProps->getPropertyValue( OUString::createFromAscii( "Title" ) ) >>= aTitle; - xProps->getPropertyValue( OUString::createFromAscii( "Description" ) ) >>= aDescription; + xProps->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "Title" )) ) >>= aTitle; + xProps->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "Description" )) ) >>= aDescription; if(aTitle.getLength()) { @@ -1193,7 +1144,7 @@ void XMLShapeExport::ImpExportGraphicObjectShape( { if( aStr[ 0 ] == '#' ) { - aStreamURL = OUString::createFromAscii( "vnd.sun.star.Package:" ); + aStreamURL = OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.Package:" )); aStreamURL = aStreamURL.concat( aStr.copy( 1, aStr.getLength() - 1 ) ); } @@ -1335,17 +1286,18 @@ void XMLShapeExport::ImpExportConnectorShape( awt::Point aStart(0,0); awt::Point aEnd(1,1); - // --> OD 2004-08-09 #i36248# - Get <StartPositionInHoriL2R> and - // <EndPositionInHoriL2R>, if they exist and if the document is exported - // into the OpenOffice.org file format. - // These properties only exist at service com::sun::star::text::Shape - the - // Writer UNO service for shapes. - // This code is needed, because the positioning attributes in the - // OpenOffice.org file format are given in horizontal left-to-right layout - // regardless the layout direction the shape is in. In the OASIS Open Office - // file format the positioning attributes are correctly given in the layout - // direction the shape is in. Thus, this code provides the conversion from - // the OASIS Open Office file format to the OpenOffice.org file format. + /* Get <StartPositionInHoriL2R> and + <EndPositionInHoriL2R>, if they exist and if the document is exported + into the OpenOffice.org file format. + These properties only exist at service com::sun::star::text::Shape - the + Writer UNO service for shapes. + This code is needed, because the positioning attributes in the + OpenOffice.org file format are given in horizontal left-to-right layout + regardless the layout direction the shape is in. In the OASIS Open Office + file format the positioning attributes are correctly given in the layout + direction the shape is in. Thus, this code provides the conversion from + the OASIS Open Office file format to the OpenOffice.org file format. (#i36248#) + */ if ( ( GetExport().getExportFlags() & EXPORT_OASIS ) == 0 && xProps->getPropertySetInfo()->hasPropertyByName( OUString(RTL_CONSTASCII_USTRINGPARAM("StartPositionInHoriL2R"))) && @@ -1360,7 +1312,6 @@ void XMLShapeExport::ImpExportConnectorShape( xProps->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("StartPosition"))) >>= aStart; xProps->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("EndPosition"))) >>= aEnd; } - // <-- if( pRefPoint ) { @@ -1507,17 +1458,18 @@ void XMLShapeExport::ImpExportMeasureShape( awt::Point aStart(0,0); awt::Point aEnd(1,1); - // --> OD 2004-08-09 #i36248# - Get <StartPositionInHoriL2R> and - // <EndPositionInHoriL2R>, if they exist and if the document is exported - // into the OpenOffice.org file format. - // These properties only exist at service com::sun::star::text::Shape - the - // Writer UNO service for shapes. - // This code is needed, because the positioning attributes in the - // OpenOffice.org file format are given in horizontal left-to-right layout - // regardless the layout direction the shape is in. In the OASIS Open Office - // file format the positioning attributes are correctly given in the layout - // direction the shape is in. Thus, this code provides the conversion from - // the OASIS Open Office file format to the OpenOffice.org file format. + /* Get <StartPositionInHoriL2R> and + <EndPositionInHoriL2R>, if they exist and if the document is exported + into the OpenOffice.org file format. + These properties only exist at service com::sun::star::text::Shape - the + Writer UNO service for shapes. + This code is needed, because the positioning attributes in the + OpenOffice.org file format are given in horizontal left-to-right layout + regardless the layout direction the shape is in. In the OASIS Open Office + file format the positioning attributes are correctly given in the layout + direction the shape is in. Thus, this code provides the conversion from + the OASIS Open Office file format to the OpenOffice.org file format. (#i36248#) + */ if ( ( GetExport().getExportFlags() & EXPORT_OASIS ) == 0 && xProps->getPropertySetInfo()->hasPropertyByName( OUString(RTL_CONSTASCII_USTRINGPARAM("StartPositionInHoriL2R"))) && @@ -1532,7 +1484,6 @@ void XMLShapeExport::ImpExportMeasureShape( xProps->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("StartPosition"))) >>= aStart; xProps->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("EndPosition"))) >>= aEnd; } - // <-- if( pRefPoint ) { @@ -1642,7 +1593,7 @@ void XMLShapeExport::ImpExportOLE2Shape( { // OOo internal links have no storage persistance, URL is stored in the XML file // the result LinkURL is empty in case the object is not a link - xPropSet->getPropertyValue( OUString::createFromAscii( "LinkURL" ) ) >>= sURL; + xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "LinkURL" )) ) >>= sURL; } xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM( "PersistName" ) ) ) >>= sPersistName; @@ -2054,3 +2005,5 @@ void XMLShapeExport::ImpExportMediaShape( } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/shapeexport3.cxx b/xmloff/source/draw/shapeexport3.cxx index c1ac8988c3..41558e2513 100644 --- a/xmloff/source/draw/shapeexport3.cxx +++ b/xmloff/source/draw/shapeexport3.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. @@ -37,9 +38,7 @@ #include <com/sun/star/drawing/DoubleSequence.hpp> #include <tools/gen.hxx> -#ifndef _XMLOFF_SHAPEEXPORT_HXX #include <xmloff/shapeexport.hxx> -#endif #include "sdpropls.hxx" #include <tools/debug.hxx> #include <rtl/ustrbuf.hxx> @@ -496,3 +495,5 @@ void XMLShapeExport::export3DLamps( const com::sun::star::uno::Reference< com::s } ////////////////////////////////////////////////////////////////////////////// + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/shapeexport4.cxx b/xmloff/source/draw/shapeexport4.cxx index 644f66a77a..e5d36fc70d 100644 --- a/xmloff/source/draw/shapeexport4.cxx +++ b/xmloff/source/draw/shapeexport4.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. @@ -44,9 +45,7 @@ #include <com/sun/star/table/XColumnRowRange.hpp> -#ifndef _XMLOFF_SHAPEEXPORT_HXX #include <xmloff/shapeexport.hxx> -#endif #include "sdpropls.hxx" #include <tools/debug.hxx> #include <rtl/ustrbuf.hxx> @@ -58,9 +57,7 @@ #include <com/sun/star/container/XIdentifierContainer.hpp> #include <com/sun/star/drawing/ShadeMode.hpp> #include <com/sun/star/drawing/EnhancedCustomShapeParameterType.hpp> -#ifndef _COM_SUN_STAR_DRAWING_ENHANCEDCUSTOMSHAPEPARAMETERPARI_HPP_ #include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp> -#endif #include <com/sun/star/drawing/EnhancedCustomShapeGluePointType.hpp> #include <com/sun/star/drawing/EnhancedCustomShapeTextFrame.hpp> #include <com/sun/star/drawing/EnhancedCustomShapeSegment.hpp> @@ -1242,3 +1239,5 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape DBG_ERROR( "xmloff::XMLShapeExport::ImpExportTableShape(), exception caught!" ); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx index 792c7606f0..c6f62831cc 100644 --- a/xmloff/source/draw/shapeimport.cxx +++ b/xmloff/source/draw/shapeimport.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. @@ -37,9 +38,7 @@ #include <list> -#ifndef _XMLOFF_SHAPEIMPORT_HXX #include <xmloff/shapeimport.hxx> -#endif #include <xmloff/xmltkmap.hxx> #include "xmloff/xmlnmspe.hxx" #include <xmloff/xmltoken.hxx> @@ -232,16 +231,7 @@ XMLShapeImportHelper::~XMLShapeImportHelper() if(mpGroupShapeElemTokenMap) delete mpGroupShapeElemTokenMap; if(mpFrameShapeElemTokenMap) delete mpFrameShapeElemTokenMap; -/* - if(mpShapeAttrTokenMap) delete mpShapeAttrTokenMap; - if(mpRectShapeAttrTokenMap) delete mpRectShapeAttrTokenMap; - if(mpLineShapeAttrTokenMap) delete mpLineShapeAttrTokenMap; - if(mpEllipseShapeAttrTokenMap) delete mpEllipseShapeAttrTokenMap; - if(mpTextBoxShapeAttrTokenMap) delete mpTextBoxShapeAttrTokenMap; - if(mpControlShapeAttrTokenMap) delete mpControlShapeAttrTokenMap; - if(mpPageShapeAttrTokenMap) delete mpPageShapeAttrTokenMap; - if(mpGraphicObjectShapeAttrTokenMap) delete mpGraphicObjectShapeAttrTokenMap; -*/ + if(mpPolygonShapeAttrTokenMap) delete mpPolygonShapeAttrTokenMap; if(mpPathShapeAttrTokenMap) delete mpPathShapeAttrTokenMap; if(mp3DSceneShapeElemTokenMap) delete mp3DSceneShapeElemTokenMap; @@ -276,7 +266,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::GetGroupShapeElemTokenMap() { if(!mpGroupShapeElemTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry aGroupShapeElemTokenMap[] = + static SvXMLTokenMapEntry aGroupShapeElemTokenMap[] = { { XML_NAMESPACE_DRAW, XML_G, XML_TOK_GROUP_GROUP }, { XML_NAMESPACE_DRAW, XML_RECT, XML_TOK_GROUP_RECT }, @@ -316,7 +306,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::GetFrameShapeElemTokenMap() { if(!mpFrameShapeElemTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry aFrameShapeElemTokenMap[] = + static SvXMLTokenMapEntry aFrameShapeElemTokenMap[] = { { XML_NAMESPACE_DRAW, XML_TEXT_BOX, XML_TOK_FRAME_TEXT_BOX }, { XML_NAMESPACE_DRAW, XML_IMAGE, XML_TOK_FRAME_IMAGE }, @@ -342,7 +332,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::Get3DSceneShapeElemTokenMap() { if(!mp3DSceneShapeElemTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry a3DSceneShapeElemTokenMap[] = + static SvXMLTokenMapEntry a3DSceneShapeElemTokenMap[] = { { XML_NAMESPACE_DR3D, XML_SCENE, XML_TOK_3DSCENE_3DSCENE }, { XML_NAMESPACE_DR3D, XML_CUBE, XML_TOK_3DSCENE_3DCUBE }, @@ -359,38 +349,13 @@ const SvXMLTokenMap& XMLShapeImportHelper::Get3DSceneShapeElemTokenMap() } ////////////////////////////////////////////////////////////////////////////// -/* - -const SvXMLTokenMap& XMLShapeImportHelper::GetShapeAttrTokenMap() -{ - if(!mpShapeAttrTokenMap) - { - static __FAR_DATA SvXMLTokenMapEntry aShapeAttrTokenMap[] = -{ - { XML_NAMESPACE_DRAW, XML_NAME, XML_TOK_SHAPE_NAME }, - { XML_NAMESPACE_DRAW, XML_STYLE_NAME, XML_TOK_SHAPE_DRAWSTYLE_NAME_GRAPHICS }, - { XML_NAMESPACE_PRESENTATION, XML_CLASS, XML_TOK_SHAPE_PRESENTATION_CLASS }, - { XML_NAMESPACE_PRESENTATION, XML_STYLE_NAME, XML_TOK_SHAPE_DRAWSTYLE_NAME_PRESENTATION }, - { XML_NAMESPACE_SVG, XML_TRANSFORM, XML_TOK_SHAPE_TRANSFORM }, - { XML_NAMESPACE_PRESENTATION, XML_PLACEHOLDER, XML_TOK_SHAPE_IS_PLACEHOLDER }, - { XML_NAMESPACE_PRESENTATION, XML_USER_TRANSFORMED, XML_TOK_SHAPE_IS_USER_TRANSFORMED }, - XML_TOKEN_MAP_END -}; - - mpShapeAttrTokenMap = new SvXMLTokenMap(aShapeAttrTokenMap); - } - - return *mpShapeAttrTokenMap; -} -*/ -////////////////////////////////////////////////////////////////////////////// const SvXMLTokenMap& XMLShapeImportHelper::Get3DObjectAttrTokenMap() { if(!mp3DObjectAttrTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry a3DObjectAttrTokenMap[] = + static SvXMLTokenMapEntry a3DObjectAttrTokenMap[] = { { XML_NAMESPACE_DRAW, XML_STYLE_NAME, XML_TOK_3DOBJECT_DRAWSTYLE_NAME }, { XML_NAMESPACE_DR3D, XML_TRANSFORM, XML_TOK_3DOBJECT_TRANSFORM }, @@ -410,7 +375,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::Get3DPolygonBasedAttrTokenMap() { if(!mp3DPolygonBasedAttrTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry a3DPolygonBasedAttrTokenMap[] = + static SvXMLTokenMapEntry a3DPolygonBasedAttrTokenMap[] = { { XML_NAMESPACE_SVG, XML_VIEWBOX, XML_TOK_3DPOLYGONBASED_VIEWBOX }, { XML_NAMESPACE_SVG, XML_D, XML_TOK_3DPOLYGONBASED_D }, @@ -430,7 +395,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::Get3DCubeObjectAttrTokenMap() { if(!mp3DCubeObjectAttrTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry a3DCubeObjectAttrTokenMap[] = + static SvXMLTokenMapEntry a3DCubeObjectAttrTokenMap[] = { { XML_NAMESPACE_DR3D, XML_MIN_EDGE, XML_TOK_3DCUBEOBJ_MINEDGE }, { XML_NAMESPACE_DR3D, XML_MAX_EDGE, XML_TOK_3DCUBEOBJ_MAXEDGE }, @@ -450,7 +415,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::Get3DSphereObjectAttrTokenMap() { if(!mp3DSphereObjectAttrTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry a3DSphereObjectAttrTokenMap[] = + static SvXMLTokenMapEntry a3DSphereObjectAttrTokenMap[] = { { XML_NAMESPACE_DR3D, XML_CENTER, XML_TOK_3DSPHEREOBJ_CENTER }, { XML_NAMESPACE_DR3D, XML_SIZE, XML_TOK_3DSPHEREOBJ_SIZE }, @@ -464,81 +429,13 @@ const SvXMLTokenMap& XMLShapeImportHelper::Get3DSphereObjectAttrTokenMap() } ////////////////////////////////////////////////////////////////////////////// -/* - -const SvXMLTokenMap& XMLShapeImportHelper::GetRectShapeAttrTokenMap() -{ - if(!mpRectShapeAttrTokenMap) - { - static __FAR_DATA SvXMLTokenMapEntry aRectShapeAttrTokenMap[] = -{ - { XML_NAMESPACE_SVG, XML_X, XML_TOK_RECTSHAPE_X }, - { XML_NAMESPACE_SVG, XML_Y, XML_TOK_RECTSHAPE_Y }, - { XML_NAMESPACE_SVG, XML_WIDTH, XML_TOK_RECTSHAPE_WIDTH }, - { XML_NAMESPACE_SVG, XML_HEIGHT, XML_TOK_RECTSHAPE_HEIGHT }, - { XML_NAMESPACE_DRAW, XML_CORNER_RADIUS, XML_TOK_RECTSHAPE_CORNER_RADIUS }, - XML_TOKEN_MAP_END -}; - - mpRectShapeAttrTokenMap = new SvXMLTokenMap(aRectShapeAttrTokenMap); - } - - return *mpRectShapeAttrTokenMap; -} - -////////////////////////////////////////////////////////////////////////////// - - -const SvXMLTokenMap& XMLShapeImportHelper::GetLineShapeAttrTokenMap() -{ - if(!mpLineShapeAttrTokenMap) - { - static __FAR_DATA SvXMLTokenMapEntry aLineShapeAttrTokenMap[] = -{ - { XML_NAMESPACE_SVG, XML_X1, XML_TOK_LINESHAPE_X1 }, - { XML_NAMESPACE_SVG, XML_Y1, XML_TOK_LINESHAPE_Y1 }, - { XML_NAMESPACE_SVG, XML_X2, XML_TOK_LINESHAPE_X2 }, - { XML_NAMESPACE_SVG, XML_Y2, XML_TOK_LINESHAPE_Y2 }, - XML_TOKEN_MAP_END -}; - - mpLineShapeAttrTokenMap = new SvXMLTokenMap(aLineShapeAttrTokenMap); - } - - return *mpLineShapeAttrTokenMap; -} - -////////////////////////////////////////////////////////////////////////////// - - -const SvXMLTokenMap& XMLShapeImportHelper::GetEllipseShapeAttrTokenMap() -{ - if(!mpEllipseShapeAttrTokenMap) - { - static __FAR_DATA SvXMLTokenMapEntry aEllipseShapeAttrTokenMap[] = -{ - { XML_NAMESPACE_SVG, XML_RX, XML_TOK_ELLIPSESHAPE_RX }, - { XML_NAMESPACE_SVG, XML_RY, XML_TOK_ELLIPSESHAPE_RY }, - { XML_NAMESPACE_SVG, XML_CX, XML_TOK_ELLIPSESHAPE_CX }, - { XML_NAMESPACE_SVG, XML_CY, XML_TOK_ELLIPSESHAPE_CY }, - { XML_NAMESPACE_SVG, XML_R, XML_TOK_ELLIPSESHAPE_R }, - XML_TOKEN_MAP_END -}; - - mpEllipseShapeAttrTokenMap = new SvXMLTokenMap(aEllipseShapeAttrTokenMap); - } - - return *mpEllipseShapeAttrTokenMap; -} -////////////////////////////////////////////////////////////////////////////// -*/ const SvXMLTokenMap& XMLShapeImportHelper::GetPolygonShapeAttrTokenMap() { if(!mpPolygonShapeAttrTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry aPolygonShapeAttrTokenMap[] = + static SvXMLTokenMapEntry aPolygonShapeAttrTokenMap[] = { { XML_NAMESPACE_SVG, XML_VIEWBOX, XML_TOK_POLYGONSHAPE_VIEWBOX }, { XML_NAMESPACE_DRAW, XML_POINTS, XML_TOK_POLYGONSHAPE_POINTS }, @@ -558,7 +455,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::GetPathShapeAttrTokenMap() { if(!mpPathShapeAttrTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry aPathShapeAttrTokenMap[] = + static SvXMLTokenMapEntry aPathShapeAttrTokenMap[] = { { XML_NAMESPACE_SVG, XML_VIEWBOX, XML_TOK_PATHSHAPE_VIEWBOX }, { XML_NAMESPACE_SVG, XML_D, XML_TOK_PATHSHAPE_D }, @@ -570,51 +467,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::GetPathShapeAttrTokenMap() return *mpPathShapeAttrTokenMap; } -/* -////////////////////////////////////////////////////////////////////////////// - - -const SvXMLTokenMap& XMLShapeImportHelper::GetTextBoxShapeAttrTokenMap() -{ - if(!mpTextBoxShapeAttrTokenMap) - { - static __FAR_DATA SvXMLTokenMapEntry aTextBoxShapeAttrTokenMap[] = -{ - { XML_NAMESPACE_SVG, XML_X, XML_TOK_TEXTBOXSHAPE_X }, - { XML_NAMESPACE_SVG, XML_Y, XML_TOK_TEXTBOXSHAPE_Y }, - { XML_NAMESPACE_SVG, XML_WIDTH, XML_TOK_TEXTBOXSHAPE_WIDTH }, - { XML_NAMESPACE_SVG, XML_HEIGHT, XML_TOK_TEXTBOXSHAPE_HEIGHT }, - XML_TOKEN_MAP_END -}; - mpTextBoxShapeAttrTokenMap = new SvXMLTokenMap(aTextBoxShapeAttrTokenMap); - } - - return *mpTextBoxShapeAttrTokenMap; -} - -////////////////////////////////////////////////////////////////////////////// - - -const SvXMLTokenMap& XMLShapeImportHelper::GetControlShapeAttrTokenMap() -{ - if(!mpControlShapeAttrTokenMap) - { - static __FAR_DATA SvXMLTokenMapEntry aControlShapeAttrTokenMap[] = -{ - { XML_NAMESPACE_SVG, XML_X, XML_TOK_CONTROLSHAPE_X }, - { XML_NAMESPACE_SVG, XML_Y, XML_TOK_CONTROLSHAPE_Y }, - { XML_NAMESPACE_SVG, XML_WIDTH, XML_TOK_CONTROLSHAPE_WIDTH }, - { XML_NAMESPACE_SVG, XML_HEIGHT, XML_TOK_CONTROLSHAPE_HEIGHT }, - XML_TOKEN_MAP_END -}; - - mpControlShapeAttrTokenMap = new SvXMLTokenMap(aControlShapeAttrTokenMap); - } - - return *mpControlShapeAttrTokenMap; -} -*/ ////////////////////////////////////////////////////////////////////////////// @@ -622,7 +475,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::Get3DSceneShapeAttrTokenMap() { if(!mp3DSceneShapeAttrTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry a3DSceneShapeAttrTokenMap[] = + static SvXMLTokenMapEntry a3DSceneShapeAttrTokenMap[] = { { XML_NAMESPACE_DR3D, XML_TRANSFORM, XML_TOK_3DSCENESHAPE_TRANSFORM }, { XML_NAMESPACE_DR3D, XML_VRP, XML_TOK_3DSCENESHAPE_VRP }, @@ -651,7 +504,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::Get3DLightAttrTokenMap() { if(!mp3DLightAttrTokenMap) { - static __FAR_DATA SvXMLTokenMapEntry a3DLightAttrTokenMap[] = + static SvXMLTokenMapEntry a3DLightAttrTokenMap[] = { { XML_NAMESPACE_DR3D, XML_DIFFUSE_COLOR, XML_TOK_3DLIGHT_DIFFUSE_COLOR }, { XML_NAMESPACE_DR3D, XML_DIRECTION, XML_TOK_3DLIGHT_DIRECTION }, @@ -667,52 +520,8 @@ const SvXMLTokenMap& XMLShapeImportHelper::Get3DLightAttrTokenMap() } ////////////////////////////////////////////////////////////////////////////// -/* - -const SvXMLTokenMap& XMLShapeImportHelper::GetPageShapeAttrTokenMap() -{ - if(!mpPageShapeAttrTokenMap) - { - static __FAR_DATA SvXMLTokenMapEntry aPageShapeAttrTokenMap[] = -{ - { XML_NAMESPACE_SVG, XML_X, XML_TOK_PAGESHAPE_X }, - { XML_NAMESPACE_SVG, XML_Y, XML_TOK_PAGESHAPE_Y }, - { XML_NAMESPACE_SVG, XML_WIDTH, XML_TOK_PAGESHAPE_WIDTH }, - { XML_NAMESPACE_SVG, XML_HEIGHT, XML_TOK_PAGESHAPE_HEIGHT }, - XML_TOKEN_MAP_END -}; - - mpPageShapeAttrTokenMap = new SvXMLTokenMap(aPageShapeAttrTokenMap); - } - - return *mpPageShapeAttrTokenMap; -} - -////////////////////////////////////////////////////////////////////////////// -const SvXMLTokenMap& XMLShapeImportHelper::GetGraphicObjectShapeAttrTokenMap() -{ - if(!mpGraphicObjectShapeAttrTokenMap) - { - static __FAR_DATA SvXMLTokenMapEntry aGraphicObjectShapeAttrTokenMap[] = -{ - { XML_NAMESPACE_SVG, XML_X, XML_TOK_GOSHAPE_X }, - { XML_NAMESPACE_SVG, XML_Y, XML_TOK_GOSHAPE_Y }, - { XML_NAMESPACE_SVG, XML_WIDTH, XML_TOK_GOSHAPE_WIDTH }, - { XML_NAMESPACE_SVG, XML_HEIGHT, XML_TOK_GOSHAPE_HEIGHT }, - { XML_NAMESPACE_XLINK, XML_HREF, XML_TOK_GOSHAPE_URL }, - XML_TOKEN_MAP_END -}; - - mpGraphicObjectShapeAttrTokenMap = new SvXMLTokenMap(aGraphicObjectShapeAttrTokenMap); - } - - return *mpGraphicObjectShapeAttrTokenMap; -} -*/ -////////////////////////////////////////////////////////////////////////////// - SvXMLShapeContext* XMLShapeImportHelper::Create3DSceneChildContext( SvXMLImport& rImport, USHORT p_nPrefix, @@ -1053,18 +862,19 @@ void XMLShapeImportHelper::finishShape( const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >&, com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >&) { - // --> OD 2004-08-10 #i28749#, #i36248# - set property <PositionLayoutDir> - // to <PositionInHoriL2R>, if it exists and the import states that - // the shape positioning attributes are in horizontal left-to-right - // layout. This is the case for the OpenOffice.org file format. - // This setting is done for Writer documents, because the property - // only exists at service com::sun::star::text::Shape - the Writer - // UNO service for shapes. - // The value indicates that the positioning attributes are given - // in horizontal left-to-right layout. The property is evaluated - // during the first positioning of the shape in order to convert - // the shape position given in the OpenOffice.org file format to - // the one for the OASIS Open Office file format. + /* Set property <PositionLayoutDir> + to <PositionInHoriL2R>, if it exists and the import states that + the shape positioning attributes are in horizontal left-to-right + layout. This is the case for the OpenOffice.org file format. + This setting is done for Writer documents, because the property + only exists at service com::sun::star::text::Shape - the Writer + UNO service for shapes. + The value indicates that the positioning attributes are given + in horizontal left-to-right layout. The property is evaluated + during the first positioning of the shape in order to convert + the shape position given in the OpenOffice.org file format to + the one for the OASIS Open Office file format. (#i28749#, #i36248#) + */ uno::Reference< beans::XPropertySet > xPropSet(rShape, uno::UNO_QUERY); if ( xPropSet.is() ) { @@ -1134,7 +944,7 @@ void ShapeSortContext::moveShape( sal_Int32 nSourcePos, sal_Int32 nDestPos ) DBG_ASSERT( (*aIter).nIs >= nDestPos, "Shape sorting failed" ); (*aIter).nIs++; } - aIter++; + ++aIter; } aIter = maUnsortedList.begin(); @@ -1147,7 +957,7 @@ void ShapeSortContext::moveShape( sal_Int32 nSourcePos, sal_Int32 nDestPos ) DBG_ASSERT( (*aIter).nIs >= nDestPos, "shape sorting failed" ); (*aIter).nIs++; } - aIter++; + ++aIter; } } } @@ -1379,7 +1189,7 @@ void XMLShapeImportHelper::moveGluePointMapping( const com::sun::star::uno::Refe { if ( (*aShapeIdIter).second != -1 ) (*aShapeIdIter).second += n; - aShapeIdIter++; + ++aShapeIdIter; } } } @@ -1464,3 +1274,5 @@ void SvXMLShapeContext::setHyperlink( const OUString& rHyperlink ) { msHyperlink = rHyperlink; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/viewcontext.cxx b/xmloff/source/draw/viewcontext.cxx index d98d8ea171..1a9845fe23 100644 --- a/xmloff/source/draw/viewcontext.cxx +++ b/xmloff/source/draw/viewcontext.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. @@ -89,3 +90,5 @@ void SdXMLViewSettingsContext::EndElement() xProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "VisibleArea" ) ), aAny ); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/viewcontext.hxx b/xmloff/source/draw/viewcontext.hxx index 73682f6930..af92bdbabc 100644 --- a/xmloff/source/draw/viewcontext.hxx +++ b/xmloff/source/draw/viewcontext.hxx @@ -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. @@ -52,3 +53,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx index 5820f854ff..6a5e866fe2 100644 --- a/xmloff/source/draw/xexptran.cxx +++ b/xmloff/source/draw/xexptran.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. @@ -424,14 +425,14 @@ const OUString& SdXMLImExTransform2D::GetExportString(const SvXMLUnitConverter& { case IMP_SDXMLEXP_TRANSOBJ2D_ROTATE : { - aNewString += OUString::createFromAscii("rotate ("); + aNewString += OUString(RTL_CONSTASCII_USTRINGPARAM( "rotate (" )); Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj2DRotate*)pObj)->mfRotate); aNewString += aClosingBrace; break; } case IMP_SDXMLEXP_TRANSOBJ2D_SCALE : { - aNewString += OUString::createFromAscii("scale ("); + aNewString += OUString(RTL_CONSTASCII_USTRINGPARAM( "scale (" )); Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj2DScale*)pObj)->maScale.getX()); aNewString += aEmptySpace; Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj2DScale*)pObj)->maScale.getY()); @@ -440,7 +441,7 @@ const OUString& SdXMLImExTransform2D::GetExportString(const SvXMLUnitConverter& } case IMP_SDXMLEXP_TRANSOBJ2D_TRANSLATE : { - aNewString += OUString::createFromAscii("translate ("); + aNewString += OUString(RTL_CONSTASCII_USTRINGPARAM( "translate (" )); Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj2DTranslate*)pObj)->maTranslate.getX(), true); aNewString += aEmptySpace; Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj2DTranslate*)pObj)->maTranslate.getY(), true); @@ -449,21 +450,21 @@ const OUString& SdXMLImExTransform2D::GetExportString(const SvXMLUnitConverter& } case IMP_SDXMLEXP_TRANSOBJ2D_SKEWX : { - aNewString += OUString::createFromAscii("skewX ("); + aNewString += OUString(RTL_CONSTASCII_USTRINGPARAM( "skewX (" )); Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj2DSkewX*)pObj)->mfSkewX); aNewString += aClosingBrace; break; } case IMP_SDXMLEXP_TRANSOBJ2D_SKEWY : { - aNewString += OUString::createFromAscii("skewY ("); + aNewString += OUString(RTL_CONSTASCII_USTRINGPARAM( "skewY (" )); Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj2DSkewY*)pObj)->mfSkewY); aNewString += aClosingBrace; break; } case IMP_SDXMLEXP_TRANSOBJ2D_MATRIX : { - aNewString += OUString::createFromAscii("matrix ("); + aNewString += OUString(RTL_CONSTASCII_USTRINGPARAM( "matrix (" )); // a Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj2DMatrix*)pObj)->maMatrix.get(0, 0)); @@ -530,12 +531,12 @@ void SdXMLImExTransform2D::SetString(const OUString& rNew, const SvXMLUnitConver const OUString aStr(msString.getStr(), (sal_uInt16)msString.getLength()); const sal_Int32 nLen(aStr.getLength()); - const OUString aString_rotate(OUString::createFromAscii("rotate")); - const OUString aString_scale(OUString::createFromAscii("scale")); - const OUString aString_translate(OUString::createFromAscii("translate")); - const OUString aString_skewX(OUString::createFromAscii("skewX")); - const OUString aString_skewY(OUString::createFromAscii("skewY")); - const OUString aString_matrix(OUString::createFromAscii("matrix")); + const OUString aString_rotate(RTL_CONSTASCII_USTRINGPARAM( "rotate" )); + const OUString aString_scale(RTL_CONSTASCII_USTRINGPARAM( "scale" )); + const OUString aString_translate(RTL_CONSTASCII_USTRINGPARAM( "translate" )); + const OUString aString_skewX(RTL_CONSTASCII_USTRINGPARAM( "skewX" )); + const OUString aString_skewY(RTL_CONSTASCII_USTRINGPARAM( "skewY" )); + const OUString aString_matrix(RTL_CONSTASCII_USTRINGPARAM( "matrix" )); sal_Int32 nPos(0); @@ -900,28 +901,28 @@ const OUString& SdXMLImExTransform3D::GetExportString(const SvXMLUnitConverter& { case IMP_SDXMLEXP_TRANSOBJ3D_ROTATE_X : { - aNewString += OUString::createFromAscii("rotatex ("); + aNewString += OUString(RTL_CONSTASCII_USTRINGPARAM( "rotatex (" )); Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DRotateX*)pObj)->mfRotateX); aNewString += aClosingBrace; break; } case IMP_SDXMLEXP_TRANSOBJ3D_ROTATE_Y : { - aNewString += OUString::createFromAscii("rotatey ("); + aNewString += OUString(RTL_CONSTASCII_USTRINGPARAM( "rotatey (" )); Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DRotateY*)pObj)->mfRotateY); aNewString += aClosingBrace; break; } case IMP_SDXMLEXP_TRANSOBJ3D_ROTATE_Z : { - aNewString += OUString::createFromAscii("rotatez ("); + aNewString += OUString(RTL_CONSTASCII_USTRINGPARAM( "rotatez (" )); Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DRotateZ*)pObj)->mfRotateZ); aNewString += aClosingBrace; break; } case IMP_SDXMLEXP_TRANSOBJ3D_SCALE : { - aNewString += OUString::createFromAscii("scale ("); + aNewString += OUString(RTL_CONSTASCII_USTRINGPARAM( "scale (" )); Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DScale*)pObj)->maScale.getX()); aNewString += aEmptySpace; Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DScale*)pObj)->maScale.getY()); @@ -932,7 +933,7 @@ const OUString& SdXMLImExTransform3D::GetExportString(const SvXMLUnitConverter& } case IMP_SDXMLEXP_TRANSOBJ3D_TRANSLATE : { - aNewString += OUString::createFromAscii("translate ("); + aNewString += OUString(RTL_CONSTASCII_USTRINGPARAM( "translate (" )); Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DTranslate*)pObj)->maTranslate.getX(), true); aNewString += aEmptySpace; Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DTranslate*)pObj)->maTranslate.getY(), true); @@ -943,7 +944,7 @@ const OUString& SdXMLImExTransform3D::GetExportString(const SvXMLUnitConverter& } case IMP_SDXMLEXP_TRANSOBJ3D_MATRIX : { - aNewString += OUString::createFromAscii("matrix ("); + aNewString += OUString(RTL_CONSTASCII_USTRINGPARAM( "matrix (" )); // a Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DMatrix*)pObj)->maMatrix.get(0, 0)); @@ -1034,12 +1035,12 @@ void SdXMLImExTransform3D::SetString(const OUString& rNew, const SvXMLUnitConver const OUString aStr(msString.getStr(), (sal_uInt16)msString.getLength()); const sal_Int32 nLen(aStr.getLength()); - const OUString aString_rotatex(OUString::createFromAscii("rotatex")); - const OUString aString_rotatey(OUString::createFromAscii("rotatey")); - const OUString aString_rotatez(OUString::createFromAscii("rotatez")); - const OUString aString_scale(OUString::createFromAscii("scale")); - const OUString aString_translate(OUString::createFromAscii("translate")); - const OUString aString_matrix(OUString::createFromAscii("matrix")); + const OUString aString_rotatex(RTL_CONSTASCII_USTRINGPARAM( "rotatex" )); + const OUString aString_rotatey(RTL_CONSTASCII_USTRINGPARAM( "rotatey" )); + const OUString aString_rotatez(RTL_CONSTASCII_USTRINGPARAM( "rotatez" )); + const OUString aString_scale(RTL_CONSTASCII_USTRINGPARAM( "scale" )); + const OUString aString_translate(RTL_CONSTASCII_USTRINGPARAM( "translate" )); + const OUString aString_matrix(RTL_CONSTASCII_USTRINGPARAM( "matrix" )); sal_Int32 nPos(0); @@ -2358,6 +2359,7 @@ SdXMLImExSvgDElement::SdXMLImExSvgDElement(const OUString& rNew, } DBG_ASSERT(!bEllipticalArc, "XMLIMP: non-interpreted tags in svg:d element!"); + (void)bEllipticalArc; if(nNumPolys) { @@ -3115,3 +3117,5 @@ SdXMLImExSvgDElement::SdXMLImExSvgDElement(const OUString& rNew, } // eof + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximp3dobject.cxx b/xmloff/source/draw/ximp3dobject.cxx index 860bc6b3e5..64cc139a67 100644 --- a/xmloff/source/draw/ximp3dobject.cxx +++ b/xmloff/source/draw/ximp3dobject.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. @@ -123,66 +124,6 @@ void SdXML3DObjectContext::EndElement() SdXMLShapeContext::EndElement(); } -////////////////////////////////////////////////////////////////////////////// -/* -void SdXML3DObjectContext::AddShape(uno::Reference< drawing::XShape >& xShape) -{ - if(xShape.is() && mxShapes.is()) - { - // set shape local - mxShape = xShape; - - // add new shape to parent - mxShapes->add( xShape ); - } -} -*/ -////////////////////////////////////////////////////////////////////////////// -/* -void SdXML3DObjectContext::SetStyle() -{ - // set style on shape - if(maDrawStyleName.getLength() && mxShape.is()) - { - const SvXMLStyleContext* pStyle = 0L; - sal_Bool bAutoStyle(FALSE); - - if(GetImport().GetShapeImport()->GetAutoStylesContext()) - pStyle = GetImport().GetShapeImport()->GetAutoStylesContext()->FindStyleChildContext( - XML_STYLE_FAMILY_SD_GRAPHICS_ID, maDrawStyleName); - - if(pStyle) - bAutoStyle = TRUE; - - if(!pStyle && GetImport().GetShapeImport()->GetStylesContext()) - pStyle = GetImport().GetShapeImport()->GetStylesContext()-> - FindStyleChildContext(XML_STYLE_FAMILY_SD_GRAPHICS_ID, maDrawStyleName); - - if(pStyle && pStyle->ISA(XMLShapeStyleContext)) - { - uno::Reference< beans::XPropertySet > xPropSet(mxShape, uno::UNO_QUERY); - if(xPropSet.is()) - { - XMLShapeStyleContext* pDocStyle = (XMLShapeStyleContext*)pStyle; - - if(pDocStyle->GetStyle().is()) - { - // set style on object - uno::Any aAny; - aAny <<= pDocStyle->GetStyle(); - xPropSet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Style")), aAny); - } - - if(bAutoStyle) - { - // set PropertySet on object - pDocStyle->FillPropertySet(xPropSet); - } - } - } - } -} -*/ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -611,3 +552,5 @@ void SdXML3DExtrudeObjectShapeContext::EndElement() } // EOF + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximp3dobject.hxx b/xmloff/source/draw/ximp3dobject.hxx index a7ad16fffe..482927c5ab 100644 --- a/xmloff/source/draw/ximp3dobject.hxx +++ b/xmloff/source/draw/ximp3dobject.hxx @@ -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. @@ -177,3 +178,5 @@ public: }; #endif // _XIMP3DOBJECT_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximp3dscene.cxx b/xmloff/source/draw/ximp3dscene.cxx index a31c0cec27..319e253257 100644 --- a/xmloff/source/draw/ximp3dscene.cxx +++ b/xmloff/source/draw/ximp3dscene.cxx @@ -1,10 +1,11 @@ +/* -*- 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 + * Copyright 2000, 2010 Oracle and/or its affiliates. * * This file is part of OpenOffice.org. * @@ -46,16 +47,16 @@ using namespace ::xmloff::token; ////////////////////////////////////////////////////////////////////////////// // dr3d:3dlight context -SdXML3DLightContext::SdXML3DLightContext( - SvXMLImport& rImport, +SdXML3DLightContext::SdXML3DLightContext( + SvXMLImport& rImport, sal_uInt16 nPrfx, - const rtl::OUString& rLName, + const rtl::OUString& rLName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList) : SvXMLImportContext( rImport, nPrfx, rLName), maDiffuseColor(0x00000000), maDirection(0.0, 0.0, 1.0), - mbEnabled(FALSE), - mbSpecular(FALSE) + mbEnabled(false), + mbSpecular(false) { // read attributes for the 3DScene sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; @@ -101,13 +102,13 @@ SdXML3DLightContext::~SdXML3DLightContext() TYPEINIT1( SdXML3DSceneShapeContext, SdXMLShapeContext ); -SdXML3DSceneShapeContext::SdXML3DSceneShapeContext( +SdXML3DSceneShapeContext::SdXML3DSceneShapeContext( SvXMLImport& rImport, - USHORT nPrfx, + USHORT nPrfx, const OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, uno::Reference< drawing::XShapes >& rShapes, - sal_Bool bTemporaryShapes) + sal_Bool bTemporaryShapes) : SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, bTemporaryShapes ), SdXML3DSceneAttributesHelper( rImport ) { } @@ -124,7 +125,7 @@ void SdXML3DSceneShapeContext::StartElement(const uno::Reference< xml::sax::XAtt { // create new 3DScene shape and add it to rShapes, use it // as base for the new 3DScene import - AddShape( "com.sun.star.drawing.Shape3DSceneObject" ); + AddShape( "com.sun.star.drawing.Shape3DSceneObject" ); if( mxShape.is() ) { SetStyle(); @@ -187,7 +188,7 @@ SvXMLImportContext* SdXML3DSceneShapeContext::CreateChildContext( USHORT nPrefix SvXMLImportContext* pContext = 0L; // #i68101# - if( nPrefix == XML_NAMESPACE_SVG && + if( nPrefix == XML_NAMESPACE_SVG && (IsXMLToken( rLocalName, XML_TITLE ) || IsXMLToken( rLocalName, XML_DESC ) ) ) { pContext = new SdXMLDescriptionContext( GetImport(), nPrefix, rLocalName, xAttrList, mxShape ); @@ -231,7 +232,7 @@ SdXML3DSceneAttributesHelper::SdXML3DSceneAttributesHelper( SvXMLImport& rImport mnShadowSlant(0), mxShadeMode(drawing::ShadeMode_SMOOTH), maAmbientColor(0x00666666), - mbLightingMode(FALSE), + mbLightingMode(false), maVRP(0.0, 0.0, 1.0), maVPN(0.0, 0.0, 1.0), maVUP(0.0, 1.0, 0.0), @@ -244,8 +245,9 @@ SdXML3DSceneAttributesHelper::SdXML3DSceneAttributesHelper( SvXMLImport& rImport SdXML3DSceneAttributesHelper::~SdXML3DSceneAttributesHelper() { // release remembered light contexts, they are no longer needed - while(maList.Count()) - maList.Remove(maList.Count() - 1)->ReleaseRef(); + for ( size_t i = maList.size(); i > 0; ) + maList[ --i ]->ReleaseRef(); + maList.clear(); } /** creates a 3d ligth context and adds it to the internal list for later processing */ @@ -257,7 +259,7 @@ SvXMLImportContext * SdXML3DSceneAttributesHelper::create3DLightContext( sal_uIn if(pContext) { pContext->AddRef(); - maList.Insert((SdXML3DLightContext*)pContext, LIST_APPEND); + maList.push_back( (SdXML3DLightContext*)pContext ); } return pContext; @@ -291,7 +293,7 @@ void SdXML3DSceneAttributesHelper::processSceneAttribute( sal_uInt16 nPrefix, co { ::basegfx::B3DVector aNewVec; mrImport.GetMM100UnitConverter().convertB3DVector(aNewVec, rValue); - + if(aNewVec != maVPN) { maVPN = aNewVec; @@ -303,7 +305,7 @@ void SdXML3DSceneAttributesHelper::processSceneAttribute( sal_uInt16 nPrefix, co { ::basegfx::B3DVector aNewVec; mrImport.GetMM100UnitConverter().convertB3DVector(aNewVec, rValue); - + if(aNewVec != maVUP) { maVUP = aNewVec; @@ -395,15 +397,15 @@ void SdXML3DSceneAttributesHelper::setSceneAttributes( const com::sun::star::uno aAny <<= mbLightingMode; xPropSet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DSceneTwoSidedLighting")), aAny); - if(maList.Count()) + if( !maList.empty() ) { uno::Any aAny2; uno::Any aAny3; // set lights - for(sal_uInt32 a(0L); a < maList.Count(); a++) + for( size_t a = 0; a < maList.size(); a++) { - SdXML3DLightContext* pCtx = (SdXML3DLightContext*)maList.GetObject(a); + SdXML3DLightContext* pCtx = (SdXML3DLightContext*)maList[ a ]; // set anys aAny <<= pCtx->GetDiffuseColor().GetColor(); @@ -495,3 +497,5 @@ void SdXML3DSceneAttributesHelper::setSceneAttributes( const com::sun::star::uno aAny <<= mxPrjMode; xPropSet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("D3DScenePerspective")), aAny); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximp3dscene.hxx b/xmloff/source/draw/ximp3dscene.hxx index 0a408182e2..24d0bd1aad 100644 --- a/xmloff/source/draw/ximp3dscene.hxx +++ b/xmloff/source/draw/ximp3dscene.hxx @@ -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. @@ -79,3 +80,5 @@ public: #endif // _XIMPGROUP_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpbody.cxx b/xmloff/source/draw/ximpbody.cxx index 3742134b2d..fb54f83222 100644 --- a/xmloff/source/draw/ximpbody.cxx +++ b/xmloff/source/draw/ximpbody.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. @@ -386,3 +387,5 @@ SvXMLImportContext *SdXMLBodyContext::CreateChildContext( return pContext; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpbody.hxx b/xmloff/source/draw/ximpbody.hxx index efc088105a..1fe2a5b4d1 100644 --- a/xmloff/source/draw/ximpbody.hxx +++ b/xmloff/source/draw/ximpbody.hxx @@ -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. @@ -77,3 +78,5 @@ public: #endif // _XIMPBODY_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx index 2b1f0220af..9767acfb52 100644 --- a/xmloff/source/draw/ximpcustomshape.cxx +++ b/xmloff/source/draw/ximpcustomshape.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. @@ -86,7 +87,7 @@ const SvXMLEnumMapEntry aXML_GluePointEnumMap[] = void GetBool( std::vector< com::sun::star::beans::PropertyValue >& rDest, const rtl::OUString& rValue, const EnhancedCustomShapeTokenEnum eDestProp ) { - sal_Bool bAttrBool; + bool bAttrBool; if ( SvXMLUnitConverter::convertBool( bAttrBool, rValue ) ) { beans::PropertyValue aProp; @@ -316,10 +317,10 @@ sal_Bool GetNextParameter( com::sun::star::drawing::EnhancedCustomShapeParameter if ( bNumberRequired ) { sal_Int32 nStartIndex = nIndex; + sal_Int32 nEIndex = 0; // index of "E" in double - sal_Bool bM = sal_False; // set if the value is negative sal_Bool bE = sal_False; // set if a double is including a "E" statement - sal_Bool bEM = sal_False; // set if a double is including a "E-"statement + sal_Bool bENum = sal_False; // there is at least one number after "E" sal_Bool bDot = sal_False; // set if there is a dot included sal_Bool bEnd = sal_False; // set for each value that can not be part of a double/integer @@ -347,11 +348,16 @@ sal_Bool GetNextParameter( com::sun::star::drawing::EnhancedCustomShapeParameter else { if ( nStartIndex == nIndex ) - bM = sal_True; + bValid = sal_True; else if ( bE ) - bEM = sal_True; - else - bValid = sal_False; + { + if ( nEIndex + 1 == nIndex ) + bValid = sal_True; + else if ( bENum ) + bEnd = sal_True; + else + bValid = sal_False; + } } } break; @@ -364,7 +370,10 @@ sal_Bool GetNextParameter( com::sun::star::drawing::EnhancedCustomShapeParameter else { if ( !bE ) + { bE = sal_True; + nEIndex = nIndex; + } else bEnd = sal_True; } @@ -380,6 +389,10 @@ sal_Bool GetNextParameter( com::sun::star::drawing::EnhancedCustomShapeParameter case '7' : case '8' : case '9' : + { + if ( bE && ! bENum ) + bENum = sal_True; + } break; default: bEnd = sal_True; @@ -882,7 +895,7 @@ void XMLEnhancedCustomShapeContext::StartElement( const uno::Reference< xml::sax double fFactor = SvXMLExportHelper::GetConversionFactor( aUnitStr, MAP_100TH_MM, eSrcUnit ); if ( ( fFactor != 1.0 ) && ( fFactor != 0.0 ) ) { - double fDepth; + double fDepth(0.0); if ( rDepth.Value >>= fDepth ) { fDepth /= fFactor; @@ -1164,7 +1177,7 @@ void XMLEnhancedCustomShapeContext::EndElement() while( aEquationNameIter != aEquationNameEnd ) { (*pH)[ *aEquationNameIter ] = (sal_Int32)( aEquationNameIter - maEquationNames.begin() ); - aEquationNameIter++; + ++aEquationNameIter; } // resolve equation @@ -1195,7 +1208,7 @@ void XMLEnhancedCustomShapeContext::EndElement() } } while( nIndexOf != -1 ); - aEquationIter++; + ++aEquationIter; } // Path @@ -1236,7 +1249,7 @@ void XMLEnhancedCustomShapeContext::EndElement() default: break; } - aPathIter++; + ++aPathIter; } std::vector< beans::PropertyValues >::iterator aHandleIter = maHandles.begin(); std::vector< beans::PropertyValues >::iterator aHandleEnd = maHandles.end(); @@ -1273,7 +1286,7 @@ void XMLEnhancedCustomShapeContext::EndElement() } pValues++; } - aHandleIter++; + ++aHandleIter; } delete pH; } @@ -1382,3 +1395,5 @@ SvXMLImportContext* XMLEnhancedCustomShapeContext::CreateChildContext( USHORT nP } return SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpcustomshape.hxx b/xmloff/source/draw/ximpcustomshape.hxx index 159bd5c985..12c0a6ac40 100644 --- a/xmloff/source/draw/ximpcustomshape.hxx +++ b/xmloff/source/draw/ximpcustomshape.hxx @@ -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. @@ -75,3 +76,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpgrp.cxx b/xmloff/source/draw/ximpgrp.cxx index 2eb4700d95..13924dd305 100644 --- a/xmloff/source/draw/ximpgrp.cxx +++ b/xmloff/source/draw/ximpgrp.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. @@ -128,3 +129,4 @@ void SdXMLGroupShapeContext::EndElement() } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpgrp.hxx b/xmloff/source/draw/ximpgrp.hxx index 1a4b5326dc..d0f2d2883f 100644 --- a/xmloff/source/draw/ximpgrp.hxx +++ b/xmloff/source/draw/ximpgrp.hxx @@ -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. @@ -70,3 +71,5 @@ public: #endif // _XIMPGROUP_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximplink.cxx b/xmloff/source/draw/ximplink.cxx index 5260690e5b..1ea1764d42 100644 --- a/xmloff/source/draw/ximplink.cxx +++ b/xmloff/source/draw/ximplink.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. @@ -100,3 +101,4 @@ void SdXMLShapeLinkContext::EndElement() } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximplink.hxx b/xmloff/source/draw/ximplink.hxx index 1ff631f8b5..8d9ca87889 100644 --- a/xmloff/source/draw/ximplink.hxx +++ b/xmloff/source/draw/ximplink.hxx @@ -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. @@ -64,3 +65,5 @@ public: #endif // _XIMPLINK_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpnote.cxx b/xmloff/source/draw/ximpnote.cxx index 5bb6d9fe4c..9f8999be8d 100644 --- a/xmloff/source/draw/ximpnote.cxx +++ b/xmloff/source/draw/ximpnote.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. @@ -140,3 +141,5 @@ void SdXMLNotesContext::EndElement() { SdXMLGenericPageContext::EndElement(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpnote.hxx b/xmloff/source/draw/ximpnote.hxx index 7d810431f0..bf6108373d 100644 --- a/xmloff/source/draw/ximpnote.hxx +++ b/xmloff/source/draw/ximpnote.hxx @@ -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. @@ -56,3 +57,5 @@ public: #endif // _XIMPNOTES_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx index 97729795d4..be830b502f 100644 --- a/xmloff/source/draw/ximppage.cxx +++ b/xmloff/source/draw/ximppage.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. @@ -645,3 +646,5 @@ void SdXMLGenericPageContext::SetNavigationOrder() DBG_ERROR("xmloff::SdXMLGenericPageContext::SetNavigationOrder(), unexpected exception cought while importing shape navigation order!"); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximppage.hxx b/xmloff/source/draw/ximppage.hxx index 2ec9dcc8dd..96f8fd5bc6 100644 --- a/xmloff/source/draw/ximppage.hxx +++ b/xmloff/source/draw/ximppage.hxx @@ -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. @@ -94,3 +95,5 @@ public: #endif // _XIMPGROUP_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index ba2d8cdb1f..94448e9450 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -1,10 +1,11 @@ +/* -*- 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 + * Copyright 2000, 2010 Oracle and/or its affiliates. * * This file is part of OpenOffice.org. * @@ -86,10 +87,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <tools/string.hxx> #include <com/sun/star/drawing/XEnhancedCustomShapeDefaulter.hpp> - -// --> OD 2006-02-22 #b6382898# #include <com/sun/star/text/XTextDocument.hpp> -// <-- using ::rtl::OUString; using ::rtl::OUStringBuffer; @@ -187,7 +185,7 @@ SvXMLImportContext *SdXMLShapeContext::CreateChildContext( USHORT p_nPrefix, SvXMLImportContext * pContext = NULL; // #i68101# - if( p_nPrefix == XML_NAMESPACE_SVG && + if( p_nPrefix == XML_NAMESPACE_SVG && (IsXMLToken( rLocalName, XML_TITLE ) || IsXMLToken( rLocalName, XML_DESC ) ) ) { pContext = new SdXMLDescriptionContext( GetImport(), p_nPrefix, rLocalName, xAttrList, mxShape ); @@ -497,23 +495,22 @@ void SdXMLShapeContext::AddShape(const char* pServiceName ) { try { - // --> OD 2006-02-22 #b6382898# - // Since fix for issue i33294 the Writer model doesn't support - // com.sun.star.drawing.OLE2Shape anymore. - // To handle Draw OLE objects it's decided to import these - // objects as com.sun.star.drawing.OLE2Shape and convert these - // objects after the import into com.sun.star.drawing.GraphicObjectShape. + /* Since fix for issue i33294 the Writer model doesn't support + com.sun.star.drawing.OLE2Shape anymore. + To handle Draw OLE objects it's decided to import these + objects as com.sun.star.drawing.OLE2Shape and convert these + objects after the import into com.sun.star.drawing.GraphicObjectShape. + */ uno::Reference< drawing::XShape > xShape; if ( OUString::createFromAscii(pServiceName).compareToAscii( "com.sun.star.drawing.OLE2Shape" ) == 0 && uno::Reference< text::XTextDocument >(GetImport().GetModel(), uno::UNO_QUERY).is() ) { - xShape = uno::Reference< drawing::XShape >(xServiceFact->createInstance(OUString::createFromAscii("com.sun.star.drawing.temporaryForXMLImportOLE2Shape")), uno::UNO_QUERY); + xShape = uno::Reference< drawing::XShape >(xServiceFact->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.temporaryForXMLImportOLE2Shape"))), uno::UNO_QUERY); } else { xShape = uno::Reference< drawing::XShape >(xServiceFact->createInstance(OUString::createFromAscii(pServiceName)), uno::UNO_QUERY); } - // <-- if( xShape.is() ) AddShape( xShape ); } @@ -1834,8 +1831,8 @@ void SdXMLConnectorShapeContext::processAttribute( sal_uInt16 nPrefix, const ::r { SdXMLImExViewBox aViewBox( 0, 0, 1, 1 ); awt::Point aPoint( 0, 0 ); - awt::Size aSize( 1, 1 ); - + awt::Size aSize( 1, 1 ); + SdXMLImExSvgDElement aPoints( rValue, aViewBox, aPoint, aSize, GetImport().GetMM100UnitConverter() ); @@ -2212,7 +2209,7 @@ void SdXMLCaptionShapeContext::StartElement(const uno::Reference< xml::sax::XAtt uno::Reference< beans::XPropertySet > xProps( mxShape, uno::UNO_QUERY ); // SJ: If AutoGrowWidthItem is set, SetTransformation will lead to the wrong SnapRect - // because NbcAdjustTextFrameWidthAndHeight() is called (text is set later and center alignment + // because NbcAdjustTextFrameWidthAndHeight() is called (text is set later and center alignment // is the default setting, so the top left reference point that is used by the caption point is // no longer correct) There are two ways to solve this problem, temporarily disabling the // autogrowwith as we are doing here or to apply the CaptionPoint after setting text @@ -2225,7 +2222,7 @@ void SdXMLCaptionShapeContext::StartElement(const uno::Reference< xml::sax::XAtt if ( bIsAutoGrowWidth ) xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("TextAutoGrowWidth")), uno::makeAny( sal_False ) ); } - + // set pos, size, shear and rotate SetTransformation(); if( xProps.is() ) @@ -2849,7 +2846,7 @@ void SdXMLAppletShapeContext::EndElement() aAny <<= aRect; xProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "VisibleArea" ) ), aAny ); } - + if( maParams.getLength() ) { aAny <<= maParams; @@ -3087,17 +3084,17 @@ void SdXMLPluginShapeContext::EndElement() else { // in case we have a media object - + OUString sTempRef; - + // check for package URL if( GetImport().IsPackageURL( maHref ) ) { - sTempRef = OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.Package:" ) ); + sTempRef = OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.Package:" ) ); } - + sTempRef += maHref; - + xProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "MediaURL" ) ), uno::makeAny( sTempRef ) ); for( sal_Int32 nParam = 0; nParam < maParams.getLength(); ++nParam ) @@ -3334,9 +3331,16 @@ SvXMLImportContext *SdXMLFrameShapeContext::CreateChildContext( USHORT nPrefix, if( !mxImplContext.Is() ) { - pContext = GetImport().GetShapeImport()->CreateFrameChildContext( + + SvXMLShapeContext* pShapeContext= GetImport().GetShapeImport()->CreateFrameChildContext( GetImport(), nPrefix, rLocalName, xAttrList, mxShapes, mxAttrList ); + pContext = pShapeContext; + + // propagate the hyperlink to child context + if ( msHyperlink.getLength() > 0 ) + pShapeContext->setHyperlink( msHyperlink ); + mxImplContext = pContext; mbSupportsReplacement = IsXMLToken( rLocalName, XML_OBJECT ) || IsXMLToken( rLocalName, XML_OBJECT_OLE ); @@ -3361,7 +3365,7 @@ SvXMLImportContext *SdXMLFrameShapeContext::CreateChildContext( USHORT nPrefix, } } } - else if( + else if( ( nPrefix == XML_NAMESPACE_SVG && // #i68101# (IsXMLToken( rLocalName, XML_TITLE ) || IsXMLToken( rLocalName, XML_DESC ) ) ) || (nPrefix == XML_NAMESPACE_OFFICE && IsXMLToken( rLocalName, XML_EVENT_LISTENERS ) ) || @@ -3697,7 +3701,7 @@ void SdXMLTableShapeContext::StartElement( const ::com::sun::star::uno::Referenc catch( Exception& ) { DBG_ERROR("SdXMLTableShapeContext::StartElement(), exception caught!"); - } + } } } @@ -3769,3 +3773,4 @@ SvXMLImportContext* SdXMLTableShapeContext::CreateChildContext( USHORT nPrefix, return SdXMLShapeContext::CreateChildContext(nPrefix, rLocalName, xAttrList); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpshap.hxx b/xmloff/source/draw/ximpshap.hxx index 17b7c7a420..e17a35cf86 100644 --- a/xmloff/source/draw/ximpshap.hxx +++ b/xmloff/source/draw/ximpshap.hxx @@ -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. @@ -662,3 +663,5 @@ private: }; #endif // _XIMPSHAPE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpshow.cxx b/xmloff/source/draw/ximpshow.cxx index 7bdb523f60..28a208cb77 100644 --- a/xmloff/source/draw/ximpshow.cxx +++ b/xmloff/source/draw/ximpshow.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. @@ -280,3 +281,4 @@ SvXMLImportContext * SdXMLShowsContext::CreateChildContext( USHORT p_nPrefix, co return new SvXMLImportContext( GetImport(), p_nPrefix, rLocalName ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpshow.hxx b/xmloff/source/draw/ximpshow.hxx index 4536ccca3e..a8086a0212 100644 --- a/xmloff/source/draw/ximpshow.hxx +++ b/xmloff/source/draw/ximpshow.hxx @@ -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. @@ -55,3 +56,4 @@ public: #endif // _XMLOFF_XIMPSHOW_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx index 23d9c79392..385a3961cb 100644 --- a/xmloff/source/draw/ximpstyl.cxx +++ b/xmloff/source/draw/ximpstyl.cxx @@ -1,10 +1,11 @@ +/* -*- 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 + * Copyright 2000, 2010 Oracle and/or its affiliates. * * This file is part of OpenOffice.org. * @@ -98,7 +99,7 @@ SdXMLDrawingPagePropertySetContext::SdXMLDrawingPagePropertySetContext( const uno::Reference< xml::sax::XAttributeList > & xAttrList, ::std::vector< XMLPropertyState > &rProps, const UniReference < SvXMLImportPropertyMapper > &rMap ) : - SvXMLPropertySetContext( rImport, nPrfx, rLName, xAttrList, + SvXMLPropertySetContext( rImport, nPrfx, rLName, xAttrList, XML_TYPE_PROP_DRAWING_PAGE, rProps, rMap ) { } @@ -136,12 +137,12 @@ SvXMLImportContext *SdXMLDrawingPagePropertySetContext::CreateChildContext( break; } } - + if( !pContext ) pContext = SvXMLPropertySetContext::CreateChildContext( p_nPrefix, rLocalName, - xAttrList, + xAttrList, rProperties, rProp ); - + return pContext; } @@ -153,9 +154,9 @@ public: TYPEINFO(); SdXMLDrawingPageStyleContext( - SvXMLImport& rImport, - sal_uInt16 nPrfx, - const rtl::OUString& rLName, + SvXMLImport& rImport, + sal_uInt16 nPrfx, + const rtl::OUString& rLName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList, SvXMLStylesContext& rStyles, sal_uInt16 nFamily = XML_STYLE_FAMILY_SD_DRAWINGPAGE_ID); @@ -177,9 +178,9 @@ public: TYPEINIT1( SdXMLDrawingPageStyleContext, XMLPropStyleContext ); SdXMLDrawingPageStyleContext::SdXMLDrawingPageStyleContext( - SvXMLImport& rImport, - sal_uInt16 nPrfx, - const OUString& rLName, + SvXMLImport& rImport, + sal_uInt16 nPrfx, + const OUString& rLName, const uno::Reference< xml::sax::XAttributeList >& xAttrList, SvXMLStylesContext& rStyles, sal_uInt16 nFamily) @@ -209,7 +210,7 @@ SvXMLImportContext *SdXMLDrawingPageStyleContext::CreateChildContext( GetProperties(), xImpPrMap ); } - + if( !pContext ) pContext = XMLPropStyleContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); @@ -242,12 +243,12 @@ void SdXMLDrawingPageStyleContext::Finish( sal_Bool bOverwrite ) sal_Int32 nStyle = 0; SdXMLNumberFormatImportContext* pSdNumStyle = - PTR_CAST( SdXMLNumberFormatImportContext, + PTR_CAST( SdXMLNumberFormatImportContext, GetStyles()->FindStyleChildContext( XML_STYLE_FAMILY_DATA_STYLE, sStyleName, sal_True ) ); if( pSdNumStyle ) nStyle = pSdNumStyle->GetDrawKey(); - + (*property).maValue <<= nStyle; } break; @@ -321,11 +322,11 @@ void SdXMLDrawingPageStyleContext::FillPropertySet( TYPEINIT1( SdXMLPageMasterStyleContext, SvXMLStyleContext ); -SdXMLPageMasterStyleContext::SdXMLPageMasterStyleContext( +SdXMLPageMasterStyleContext::SdXMLPageMasterStyleContext( SdXMLImport& rImport, - sal_uInt16 nPrfx, + sal_uInt16 nPrfx, const OUString& rLName, - const uno::Reference< xml::sax::XAttributeList>& xAttrList) + const uno::Reference< xml::sax::XAttributeList>& xAttrList) : SvXMLStyleContext(rImport, nPrfx, rLName, xAttrList, XML_STYLE_FAMILY_SD_PAGEMASTERSTYLECONEXT_ID), mnBorderBottom( 0L ), mnBorderLeft( 0L ), @@ -335,7 +336,7 @@ SdXMLPageMasterStyleContext::SdXMLPageMasterStyleContext( mnHeight( 0L ), meOrientation(GetSdImport().IsDraw() ? view::PaperOrientation_PORTRAIT : view::PaperOrientation_LANDSCAPE) { - // set family to something special at SvXMLStyleContext + // set family to something special at SvXMLStyleContext // for differences in search-methods sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; @@ -402,15 +403,15 @@ SdXMLPageMasterStyleContext::~SdXMLPageMasterStyleContext() TYPEINIT1( SdXMLPageMasterContext, SvXMLStyleContext ); -SdXMLPageMasterContext::SdXMLPageMasterContext( +SdXMLPageMasterContext::SdXMLPageMasterContext( SdXMLImport& rImport, - sal_uInt16 nPrfx, + sal_uInt16 nPrfx, const OUString& rLName, - const uno::Reference< xml::sax::XAttributeList>& xAttrList) + const uno::Reference< xml::sax::XAttributeList>& xAttrList) : SvXMLStyleContext(rImport, nPrfx, rLName, xAttrList, XML_STYLE_FAMILY_SD_PAGEMASTERCONEXT_ID), mpPageMasterStyle( 0L ) { - // set family to something special at SvXMLStyleContext + // set family to something special at SvXMLStyleContext // for differences in search-methods sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; @@ -447,8 +448,8 @@ SdXMLPageMasterContext::~SdXMLPageMasterContext() ////////////////////////////////////////////////////////////////////////////// -SvXMLImportContext *SdXMLPageMasterContext::CreateChildContext( - sal_uInt16 nPrefix, +SvXMLImportContext *SdXMLPageMasterContext::CreateChildContext( + sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) { @@ -466,7 +467,7 @@ SvXMLImportContext *SdXMLPageMasterContext::CreateChildContext( mpPageMasterStyle = (SdXMLPageMasterStyleContext*)pContext; } } - + // call base class if(!pContext) pContext = SvXMLStyleContext::CreateChildContext(nPrefix, rLocalName, xAttrList); @@ -480,14 +481,14 @@ SvXMLImportContext *SdXMLPageMasterContext::CreateChildContext( TYPEINIT1( SdXMLPresentationPageLayoutContext, SvXMLStyleContext ); SdXMLPresentationPageLayoutContext::SdXMLPresentationPageLayoutContext( - SdXMLImport& rImport, - sal_uInt16 nPrfx, - const OUString& rLName, + SdXMLImport& rImport, + sal_uInt16 nPrfx, + const OUString& rLName, const uno::Reference< xml::sax::XAttributeList >& xAttrList) : SvXMLStyleContext(rImport, nPrfx, rLName, xAttrList, XML_STYLE_FAMILY_SD_PRESENTATIONPAGELAYOUT_ID), mnTypeId( 20 ) // AUTOLAYOUT_NONE { - // set family to somethiong special at SvXMLStyleContext + // set family to somethiong special at SvXMLStyleContext // for differences in search-methods sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; @@ -508,8 +509,8 @@ SdXMLPresentationPageLayoutContext::~SdXMLPresentationPageLayoutContext() { } -SvXMLImportContext *SdXMLPresentationPageLayoutContext::CreateChildContext( - sal_uInt16 nPrefix, +SvXMLImportContext *SdXMLPresentationPageLayoutContext::CreateChildContext( + sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) { @@ -518,14 +519,14 @@ SvXMLImportContext *SdXMLPresentationPageLayoutContext::CreateChildContext( if(nPrefix == XML_NAMESPACE_PRESENTATION && IsXMLToken( rLocalName, XML_PLACEHOLDER ) ) { // presentation:placeholder inside style:presentation-page-layout context - pContext = new SdXMLPresentationPlaceholderContext( + pContext = new SdXMLPresentationPlaceholderContext( GetSdImport(), nPrefix, rLocalName, xAttrList); // remember SdXMLPresentationPlaceholderContext for later evaluation if(pContext) { pContext->AddRef(); - maList.Insert((SdXMLPresentationPlaceholderContext*)pContext, LIST_APPEND); + maList.push_back( (SdXMLPresentationPlaceholderContext*)pContext ); } } @@ -541,12 +542,12 @@ void SdXMLPresentationPageLayoutContext::EndElement() // build presentation page layout type here // calc mnTpeId due to content of maList // at the moment only use number of types used there - if(maList.Count()) + if( !maList.empty() ) { - SdXMLPresentationPlaceholderContext* pObj0 = maList.GetObject(0); + SdXMLPresentationPlaceholderContext* pObj0 = maList[ 0 ]; if(pObj0->GetName().equals(OUString(RTL_CONSTASCII_USTRINGPARAM("handout")))) { - switch( maList.Count() ) + switch( maList.size() ) { case 1: mnTypeId = 22; // AUTOLAYOUT_HANDOUT1 @@ -569,7 +570,7 @@ void SdXMLPresentationPageLayoutContext::EndElement() } else { - switch(maList.Count()) + switch( maList.size() ) { case 1: { @@ -585,8 +586,8 @@ void SdXMLPresentationPageLayoutContext::EndElement() } case 2: { - SdXMLPresentationPlaceholderContext* pObj1 = maList.GetObject(1); - + SdXMLPresentationPlaceholderContext* pObj1 = maList[ 1 ]; + if(pObj1->GetName().equals( OUString(RTL_CONSTASCII_USTRINGPARAM("subtitle")))) { @@ -634,8 +635,8 @@ void SdXMLPresentationPageLayoutContext::EndElement() } case 3: { - SdXMLPresentationPlaceholderContext* pObj1 = maList.GetObject(1); - SdXMLPresentationPlaceholderContext* pObj2 = maList.GetObject(2); + SdXMLPresentationPlaceholderContext* pObj1 = maList[ 1 ]; + SdXMLPresentationPlaceholderContext* pObj2 = maList[ 2 ]; if(pObj1->GetName().equals( OUString(RTL_CONSTASCII_USTRINGPARAM("outline")))) @@ -689,7 +690,7 @@ void SdXMLPresentationPageLayoutContext::EndElement() OUString(RTL_CONSTASCII_USTRINGPARAM("vertical_outline")))) { // AUTOLAYOUT_VERTICAL_TITLE_TEXT_CHART - mnTypeId = 27; + mnTypeId = 27; } else { @@ -706,8 +707,8 @@ void SdXMLPresentationPageLayoutContext::EndElement() } case 4: { - SdXMLPresentationPlaceholderContext* pObj1 = maList.GetObject(1); - SdXMLPresentationPlaceholderContext* pObj2 = maList.GetObject(2); + SdXMLPresentationPlaceholderContext* pObj1 = maList[ 1 ]; + SdXMLPresentationPlaceholderContext* pObj2 = maList[ 2 ]; if(pObj1->GetName().equals( OUString(RTL_CONSTASCII_USTRINGPARAM("object")))) @@ -743,7 +744,7 @@ void SdXMLPresentationPageLayoutContext::EndElement() break; } - case 7: + case 7: { mnTypeId = 33; // AUTOLAYOUT_6CLIPART break; @@ -757,17 +758,18 @@ void SdXMLPresentationPageLayoutContext::EndElement() } // release remembered contexts, they are no longer needed - while(maList.Count()) - maList.Remove(maList.Count() - 1)->ReleaseRef(); + for ( size_t i = maList.size(); i > 0; ) + maList[ --i ]->ReleaseRef(); + maList.clear(); } } ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -SdXMLPresentationPlaceholderContext::SdXMLPresentationPlaceholderContext( - SdXMLImport& rImport, - sal_uInt16 nPrfx, const +SdXMLPresentationPlaceholderContext::SdXMLPresentationPlaceholderContext( + SdXMLImport& rImport, + sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference< xml::sax::XAttributeList>& xAttrList) : SvXMLImportContext( rImport, nPrfx, rLName), @@ -827,12 +829,12 @@ SdXMLPresentationPlaceholderContext::~SdXMLPresentationPlaceholderContext() TYPEINIT1( SdXMLMasterPageContext, SdXMLGenericPageContext ); -SdXMLMasterPageContext::SdXMLMasterPageContext( +SdXMLMasterPageContext::SdXMLMasterPageContext( SdXMLImport& rImport, - sal_uInt16 nPrfx, + sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference< xml::sax::XAttributeList>& xAttrList, - uno::Reference< drawing::XShapes >& rShapes) + uno::Reference< drawing::XShapes >& rShapes) : SdXMLGenericPageContext( rImport, nPrfx, rLName, xAttrList, rShapes ) { const sal_Bool bHandoutMaster = IsXMLToken( rLName, XML_HANDOUT_MASTER ); @@ -943,7 +945,7 @@ void SdXMLMasterPageContext::EndElement() ////////////////////////////////////////////////////////////////////////////// -SvXMLImportContext* SdXMLMasterPageContext::CreateChildContext( +SvXMLImportContext* SdXMLMasterPageContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList>& xAttrList ) @@ -959,11 +961,11 @@ SvXMLImportContext* SdXMLMasterPageContext::CreateChildContext( if(GetSdImport().GetShapeImport()->GetStylesContext()) { // style:style inside master-page context -> presentation style - XMLShapeStyleContext* pNew = new XMLShapeStyleContext( - GetSdImport(), nPrefix, rLocalName, xAttrList, - *GetSdImport().GetShapeImport()->GetStylesContext(), + XMLShapeStyleContext* pNew = new XMLShapeStyleContext( + GetSdImport(), nPrefix, rLocalName, xAttrList, + *GetSdImport().GetShapeImport()->GetStylesContext(), XML_STYLE_FAMILY_SD_PRESENTATION_ID); - + // add this style to the outer StylesContext class for later processing if(pNew) { @@ -1010,10 +1012,10 @@ TYPEINIT1( SdXMLStylesContext, SvXMLStyleContext ); SdXMLStylesContext::SdXMLStylesContext( SdXMLImport& rImport, - sal_uInt16 nPrfx, + sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference< xml::sax::XAttributeList >& xAttrList, - sal_Bool bIsAutoStyle) + sal_Bool bIsAutoStyle) : SvXMLStylesContext(rImport, nPrfx, rLName, xAttrList), mbIsAutoStyle(bIsAutoStyle) { @@ -1038,8 +1040,8 @@ SdXMLStylesContext::~SdXMLStylesContext() ////////////////////////////////////////////////////////////////////////////// -SvXMLStyleContext* SdXMLStylesContext::CreateStyleChildContext( - sal_uInt16 nPrefix, +SvXMLStyleContext* SdXMLStylesContext::CreateStyleChildContext( + sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList) { @@ -1109,9 +1111,9 @@ SvXMLStyleContext* SdXMLStylesContext::CreateStyleChildContext( ////////////////////////////////////////////////////////////////////////////// -SvXMLStyleContext* SdXMLStylesContext::CreateStyleStyleChildContext( +SvXMLStyleContext* SdXMLStylesContext::CreateStyleStyleChildContext( sal_uInt16 nFamily, - sal_uInt16 nPrefix, + sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList) { @@ -1190,7 +1192,7 @@ UniReference< SvXMLImportPropertyMapper > SdXMLStylesContext::GetImportPropertyM { UniReference < SvXMLImportPropertyMapper > xMapper; -// if(XML_STYLE_FAMILY_SD_GRAPHICS_ID == nFamily +// if(XML_STYLE_FAMILY_SD_GRAPHICS_ID == nFamily // || XML_STYLE_FAMILY_SD_PRESENTATION_ID == nFamily // || XML_STYLE_FAMILY_SD_POOL_ID == nFamily) // { @@ -1217,7 +1219,7 @@ UniReference< SvXMLImportPropertyMapper > SdXMLStylesContext::GetImportPropertyM xMapper = xPresImpPropMapper; break; } - + case XML_STYLE_FAMILY_TABLE_COLUMN: case XML_STYLE_FAMILY_TABLE_ROW: case XML_STYLE_FAMILY_TABLE_CELL: @@ -1325,7 +1327,7 @@ void SdXMLStylesContext::SetMasterPageStyles(SdXMLMasterPageContext& rMaster) co } ////////////////////////////////////////////////////////////////////////////// -// Process styles list: +// Process styles list: // set graphic styles (all with family="graphics"). Remember xStyle at list element. // void SdXMLStylesContext::ImpSetGraphicStyles() const @@ -1470,7 +1472,7 @@ void SdXMLStylesContext::ImpSetGraphicStyles( uno::Reference< container::XNameAc catch( Exception& e) { uno::Sequence<OUString> aSeq(0); - const_cast<SdXMLImport*>(&GetSdImport())->SetError( XMLERROR_FLAG_WARNING | XMLERROR_API, aSeq, e.Message, NULL ); + const_cast<SdXMLImport*>(&GetSdImport())->SetError( XMLERROR_FLAG_WARNING | XMLERROR_API, aSeq, e.Message, NULL ); } } @@ -1510,7 +1512,7 @@ void SdXMLStylesContext::ImpSetGraphicStyles( uno::Reference< container::XNameAc catch( Exception& e ) { uno::Sequence<OUString> aSeq(0); - const_cast<SdXMLImport*>(&GetSdImport())->SetError( XMLERROR_FLAG_WARNING | XMLERROR_API, aSeq, e.Message, NULL ); + const_cast<SdXMLImport*>(&GetSdImport())->SetError( XMLERROR_FLAG_WARNING | XMLERROR_API, aSeq, e.Message, NULL ); } } } @@ -1541,8 +1543,8 @@ uno::Reference< container::XNameAccess > SdXMLStylesContext::getPageLayouts() co // TYPEINIT1( SdXMLMasterStylesContext, SvXMLImportContext ); -SdXMLMasterStylesContext::SdXMLMasterStylesContext( - SdXMLImport& rImport, +SdXMLMasterStylesContext::SdXMLMasterStylesContext( + SdXMLImport& rImport, sal_uInt16 nPrfx, const rtl::OUString& rLName) : SvXMLImportContext( rImport, nPrfx, rLName) @@ -1551,13 +1553,14 @@ SdXMLMasterStylesContext::SdXMLMasterStylesContext( SdXMLMasterStylesContext::~SdXMLMasterStylesContext() { - while(maMasterPageList.Count()) - maMasterPageList.Remove(maMasterPageList.Count() - 1)->ReleaseRef(); + for ( size_t i = maMasterPageList.size(); i > 0; ) + maMasterPageList[ --i ]->ReleaseRef(); + maMasterPageList.clear(); } -SvXMLImportContext* SdXMLMasterStylesContext::CreateChildContext( - sal_uInt16 nPrefix, - const rtl::OUString& rLocalName, +SvXMLImportContext* SdXMLMasterStylesContext::CreateChildContext( + sal_uInt16 nPrefix, + const rtl::OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList) { SvXMLImportContext* pContext = 0; @@ -1590,13 +1593,13 @@ SvXMLImportContext* SdXMLMasterStylesContext::CreateChildContext( uno::Reference< drawing::XShapes > xNewShapes(xNewMasterPage, uno::UNO_QUERY); if(xNewShapes.is() && GetSdImport().GetShapeImport()->GetStylesContext()) { - pContext = new SdXMLMasterPageContext(GetSdImport(), + pContext = new SdXMLMasterPageContext(GetSdImport(), nPrefix, rLocalName, xAttrList, xNewShapes); if(pContext) { pContext->AddRef(); - maMasterPageList.Insert((SdXMLMasterPageContext*)pContext, LIST_APPEND); + maMasterPageList.push_back( (SdXMLMasterPageContext*)pContext ); } } } @@ -1611,7 +1614,7 @@ SvXMLImportContext* SdXMLMasterStylesContext::CreateChildContext( uno::Reference< drawing::XShapes > xHandoutPage( xHandoutSupp->getHandoutMasterPage(), uno::UNO_QUERY ); if(xHandoutPage.is() && GetSdImport().GetShapeImport()->GetStylesContext()) { - pContext = new SdXMLMasterPageContext(GetSdImport(), + pContext = new SdXMLMasterPageContext(GetSdImport(), nPrefix, rLocalName, xAttrList, xHandoutPage); } } @@ -1690,3 +1693,4 @@ void SdXMLHeaderFooterDeclContext::Characters( const ::rtl::OUString& rChars ) maStrText += rChars; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpstyl.hxx b/xmloff/source/draw/ximpstyl.hxx index 9bfd0cd209..f36586bc2b 100644 --- a/xmloff/source/draw/ximpstyl.hxx +++ b/xmloff/source/draw/ximpstyl.hxx @@ -1,10 +1,11 @@ +/* -*- 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 + * Copyright 2000, 2010 Oracle and/or its affiliates. * * This file is part of OpenOffice.org. * @@ -33,6 +34,7 @@ #include "ximppage.hxx" #include <xmloff/xmlstyle.hxx> #include <com/sun/star/view/PaperOrientation.hpp> +#include <vector> class SvNumberFormatter; class SvXMLNumFmtHelper; @@ -56,10 +58,10 @@ class SdXMLPageMasterStyleContext: public SvXMLStyleContext public: TYPEINFO(); - SdXMLPageMasterStyleContext( - SdXMLImport& rImport, + SdXMLPageMasterStyleContext( + SdXMLImport& rImport, sal_uInt16 nPrfx, - const rtl::OUString& rLName, + const rtl::OUString& rLName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList); virtual ~SdXMLPageMasterStyleContext(); @@ -86,14 +88,14 @@ class SdXMLPageMasterContext: public SvXMLStyleContext public: TYPEINFO(); - SdXMLPageMasterContext( - SdXMLImport& rImport, + SdXMLPageMasterContext( + SdXMLImport& rImport, sal_uInt16 nPrfx, - const rtl::OUString& rLName, + const rtl::OUString& rLName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList); virtual ~SdXMLPageMasterContext(); - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const rtl::OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList ); @@ -114,15 +116,15 @@ class SdXMLMasterPageContext: public SdXMLGenericPageContext public: TYPEINFO(); - SdXMLMasterPageContext( - SdXMLImport& rImport, + SdXMLMasterPageContext( + SdXMLImport& rImport, sal_uInt16 nPrfx, - const rtl::OUString& rLName, + const rtl::OUString& rLName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList, com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes); virtual ~SdXMLMasterPageContext(); - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const rtl::OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList ); @@ -133,7 +135,7 @@ public: const rtl::OUString& GetDisplayName() const { return msDisplayName; } }; -DECLARE_LIST(ImpMasterPageList, SdXMLMasterPageContext*) +typedef ::std::vector< SdXMLMasterPageContext* > ImpMasterPageList; ////////////////////////////////////////////////////////////////////////////// // presentation:placeholder context @@ -150,10 +152,10 @@ class SdXMLPresentationPlaceholderContext: public SvXMLImportContext SdXMLImport& GetSdImport() { return (SdXMLImport&)GetImport(); } public: - SdXMLPresentationPlaceholderContext( - SdXMLImport& rImport, + SdXMLPresentationPlaceholderContext( + SdXMLImport& rImport, sal_uInt16 nPrfx, - const rtl::OUString& rLName, + const rtl::OUString& rLName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList); virtual ~SdXMLPresentationPlaceholderContext(); @@ -163,7 +165,7 @@ public: sal_Int32 GetWidth() const { return mnWidth; } sal_Int32 GetHeight() const { return mnHeight; } }; -DECLARE_LIST(ImpPlaceholderList, SdXMLPresentationPlaceholderContext*) +typedef ::std::vector< SdXMLPresentationPlaceholderContext* > ImpPlaceholderList; ////////////////////////////////////////////////////////////////////////////// // style:presentation-page-layout context @@ -181,13 +183,13 @@ public: TYPEINFO(); SdXMLPresentationPageLayoutContext( - SdXMLImport& rImport, - sal_uInt16 nPrfx, - const rtl::OUString& rLName, + SdXMLImport& rImport, + sal_uInt16 nPrfx, + const rtl::OUString& rLName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList); virtual ~SdXMLPresentationPageLayoutContext(); - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const rtl::OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList ); @@ -210,18 +212,18 @@ class SdXMLStylesContext : public SvXMLStylesContext void ImpSetGraphicStyles() const; void ImpSetCellStyles() const; - void ImpSetGraphicStyles( com::sun::star::uno::Reference< com::sun::star::container::XNameAccess >& xPageStyles, + void ImpSetGraphicStyles( com::sun::star::uno::Reference< com::sun::star::container::XNameAccess >& xPageStyles, sal_uInt16 nFamily, const UniString& rPrefix) const; protected: - virtual SvXMLStyleContext* CreateStyleChildContext( - sal_uInt16 nPrefix, + virtual SvXMLStyleContext* CreateStyleChildContext( + sal_uInt16 nPrefix, const rtl::OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList); - virtual SvXMLStyleContext *CreateStyleStyleChildContext( + virtual SvXMLStyleContext *CreateStyleStyleChildContext( sal_uInt16 nFamily, - sal_uInt16 nPrefix, + sal_uInt16 nPrefix, const rtl::OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList); @@ -234,8 +236,8 @@ public: TYPEINFO(); SdXMLStylesContext( - SdXMLImport& rImport, - sal_uInt16 nPrfx, + SdXMLImport& rImport, + sal_uInt16 nPrfx, const rtl::OUString& rLName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList, sal_Bool bIsAutoStyle); @@ -259,19 +261,19 @@ class SdXMLMasterStylesContext : public SvXMLImportContext const SdXMLImport& GetSdImport() const { return (const SdXMLImport&)GetImport(); } SdXMLImport& GetSdImport() { return (SdXMLImport&)GetImport(); } - + public: TYPEINFO(); - SdXMLMasterStylesContext( - SdXMLImport& rImport, + SdXMLMasterStylesContext( + SdXMLImport& rImport, sal_uInt16 nPrfx, const rtl::OUString& rLName); virtual ~SdXMLMasterStylesContext(); - virtual SvXMLImportContext* CreateChildContext( - sal_uInt16 nPrefix, - const rtl::OUString& rLocalName, + virtual SvXMLImportContext* CreateChildContext( + sal_uInt16 nPrefix, + const rtl::OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList ); const ImpMasterPageList& GetMasterPageList() const { return maMasterPageList; } @@ -300,3 +302,5 @@ private: #endif // _XIMPSTYLE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |