diff options
Diffstat (limited to 'xmloff/source/draw')
24 files changed, 193 insertions, 193 deletions
diff --git a/xmloff/source/draw/EnhancedCustomShapeToken.cxx b/xmloff/source/draw/EnhancedCustomShapeToken.cxx index 680355665177..9bcdb8f1aa65 100644 --- a/xmloff/source/draw/EnhancedCustomShapeToken.cxx +++ b/xmloff/source/draw/EnhancedCustomShapeToken.cxx @@ -25,7 +25,7 @@ namespace xmloff { namespace EnhancedCustomShapeToken { typedef std::unordered_map< const char*, EnhancedCustomShapeTokenEnum, rtl::CStringHash, rtl::CStringEqual> TypeNameHashMap; -static TypeNameHashMap* pHashMap = NULL; +static TypeNameHashMap* pHashMap = nullptr; static ::osl::Mutex& getHashMapMutex() { static osl::Mutex s_aHashMapProtection; diff --git a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx index e300a2c1fd85..ed81d6ef4ce9 100644 --- a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx +++ b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx @@ -58,7 +58,7 @@ XMLGraphicsDefaultStyle::~XMLGraphicsDefaultStyle() SvXMLImportContext *XMLGraphicsDefaultStyle::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; if( XML_NAMESPACE_STYLE == nPrefix || XML_NAMESPACE_LO_EXT == nPrefix ) { diff --git a/xmloff/source/draw/XMLImageMapContext.cxx b/xmloff/source/draw/XMLImageMapContext.cxx index e312595d6303..24daf511706d 100644 --- a/xmloff/source/draw/XMLImageMapContext.cxx +++ b/xmloff/source/draw/XMLImageMapContext.cxx @@ -183,7 +183,7 @@ XMLImageMapObjectContext::XMLImageMapObjectContext( bIsActive(true), bValid(false) { - DBG_ASSERT(NULL != pServiceName, + DBG_ASSERT(nullptr != pServiceName, "Please supply the image map object service name"); Reference<XMultiServiceFactory> xFactory(GetImport().GetModel(),UNO_QUERY); @@ -653,7 +653,7 @@ XMLImageMapContext::XMLImageMapContext( catch(const com::sun::star::uno::Exception& e) { uno::Sequence<OUString> aSeq(0); - rImport.SetError( XMLERROR_FLAG_WARNING | XMLERROR_API, aSeq, e.Message, NULL ); + rImport.SetError( XMLERROR_FLAG_WARNING | XMLERROR_API, aSeq, e.Message, nullptr ); } } @@ -666,7 +666,7 @@ SvXMLImportContext *XMLImageMapContext::CreateChildContext( const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) { - SvXMLImportContext* pContext = NULL; + SvXMLImportContext* pContext = nullptr; if ( XML_NAMESPACE_DRAW == nPrefix ) { diff --git a/xmloff/source/draw/XMLNumberStyles.cxx b/xmloff/source/draw/XMLNumberStyles.cxx index 8706d68d3b1b..0fce93fde052 100644 --- a/xmloff/source/draw/XMLNumberStyles.cxx +++ b/xmloff/source/draw/XMLNumberStyles.cxx @@ -40,26 +40,26 @@ struct SdXMLDataStyleNumber } aSdXMLDataStyleNumbers[] = { - { XML_DAY, false, false, false, NULL }, - { XML_DAY, true, false, false, NULL }, - { XML_MONTH, true, false, false, NULL }, - { XML_MONTH, false, true, false, NULL }, - { XML_MONTH, true, true, false, NULL }, - { XML_YEAR, false, false, false, NULL }, - { XML_YEAR, true, false, false, NULL }, - { XML_DAY_OF_WEEK, false, false, false, NULL }, - { XML_DAY_OF_WEEK, true, false, false, NULL }, + { XML_DAY, false, false, false, nullptr }, + { XML_DAY, true, false, false, nullptr }, + { XML_MONTH, true, false, false, nullptr }, + { XML_MONTH, false, true, false, nullptr }, + { XML_MONTH, true, true, false, nullptr }, + { XML_YEAR, false, false, false, nullptr }, + { XML_YEAR, true, false, false, nullptr }, + { XML_DAY_OF_WEEK, false, false, false, nullptr }, + { XML_DAY_OF_WEEK, true, false, false, nullptr }, { XML_TEXT, false, false, false, "." }, { XML_TEXT, false, false, false, " " }, { XML_TEXT, false, false, false, ", " }, { XML_TEXT, false, false, false, ". " }, - { XML_HOURS, false, false, false, NULL }, - { XML_MINUTES, false, false, false, NULL }, + { XML_HOURS, false, false, false, nullptr }, + { XML_MINUTES, false, false, false, nullptr }, { XML_TEXT, false, false, false, ":" }, - { XML_AM_PM, false, false, false, NULL }, - { XML_SECONDS, false, false, false, NULL }, - { XML_SECONDS, false, false, true, NULL }, - { XML_TOKEN_INVALID, false, false, false, NULL } + { XML_AM_PM, false, false, false, nullptr }, + { XML_SECONDS, false, false, false, nullptr }, + { XML_SECONDS, false, false, true, nullptr }, + { XML_TOKEN_INVALID, false, false, false, nullptr } }; // date @@ -336,7 +336,7 @@ static void SdXMLExportDataStyleNumber( SdXMLExport& rExport, SdXMLDataStyleNumb } } -static void SdXMLExportStyle( SdXMLExport& rExport, const SdXMLFixedDataStyle* pStyle, const SdXMLFixedDataStyle* pStyle2 = NULL ) +static void SdXMLExportStyle( SdXMLExport& rExport, const SdXMLFixedDataStyle* pStyle, const SdXMLFixedDataStyle* pStyle2 = nullptr ) { OUString sAttrValue; @@ -372,7 +372,7 @@ static void SdXMLExportStyle( SdXMLExport& rExport, const SdXMLFixedDataStyle* p } pStyle = pStyle2; - pStyle2 = NULL; + pStyle2 = nullptr; } while( pStyle ); } @@ -625,7 +625,7 @@ void SdXMLNumberFormatImportContext::add( OUString& rNumberStyle, bool bLong, bo (pStyleMember->mbLong == bLong) && (pStyleMember->mbTextual == bTextual) && (pStyleMember->mbDecimal02 == bDecimal02) && - ( ( (pStyleMember->mpText == NULL) && (rText.isEmpty()) ) || + ( ( (pStyleMember->mpText == nullptr) && (rText.isEmpty()) ) || ( pStyleMember->mpText && (rText.equalsAscii( pStyleMember->mpText ) ) ) ) ) ) { mnElements[mnIndex++] = nIndex + 1; diff --git a/xmloff/source/draw/XMLReplacementImageContext.cxx b/xmloff/source/draw/XMLReplacementImageContext.cxx index 80e075b04dc8..bf70fee4cfc6 100644 --- a/xmloff/source/draw/XMLReplacementImageContext.cxx +++ b/xmloff/source/draw/XMLReplacementImageContext.cxx @@ -89,7 +89,7 @@ void XMLReplacementImageContext::EndElement() else if( m_xBase64Stream.is() ) { sHRef = GetImport().ResolveGraphicObjectURLFromBase64( m_xBase64Stream ); - m_xBase64Stream = 0; + m_xBase64Stream = nullptr; } Reference < XPropertySetInfo > xPropSetInfo = @@ -103,7 +103,7 @@ SvXMLImportContext *XMLReplacementImageContext::CreateChildContext( const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; if( XML_NAMESPACE_OFFICE == nPrefix && IsXMLToken( rLocalName, ::xmloff::token::XML_BINARY_DATA ) && diff --git a/xmloff/source/draw/XMLShapePropertySetContext.cxx b/xmloff/source/draw/XMLShapePropertySetContext.cxx index f4f988024dfb..a3e75e13008f 100644 --- a/xmloff/source/draw/XMLShapePropertySetContext.cxx +++ b/xmloff/source/draw/XMLShapePropertySetContext.cxx @@ -74,7 +74,7 @@ SvXMLImportContext *XMLShapePropertySetContext::CreateChildContext( ::std::vector< XMLPropertyState > &rProperties, const XMLPropertyState& rProp ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; switch( mxMapper->getPropertySetMapper()->GetEntryContextId( rProp.mnIndex ) ) { diff --git a/xmloff/source/draw/XMLShapeStyleContext.cxx b/xmloff/source/draw/XMLShapeStyleContext.cxx index fe1b6b9bd1db..9a8888d9dd82 100644 --- a/xmloff/source/draw/XMLShapeStyleContext.cxx +++ b/xmloff/source/draw/XMLShapeStyleContext.cxx @@ -92,7 +92,7 @@ SvXMLImportContext *XMLShapeStyleContext::CreateChildContext( const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; if( XML_NAMESPACE_STYLE == nPrefix || XML_NAMESPACE_LO_EXT == nPrefix ) { @@ -247,7 +247,7 @@ void XMLShapeStyleContext::FillPropertySet( const Reference< beans::XPropertySet Sequence<OUString> const seq{ sStyleName }; GetImport().SetError( XMLERROR_STYLE_PROP_VALUE | XMLERROR_FLAG_WARNING, - seq, "empty style name reference", NULL ); + seq, "empty style name reference", nullptr ); break; } @@ -269,7 +269,7 @@ void XMLShapeStyleContext::FillPropertySet( const Reference< beans::XPropertySet aSeq[0] = sStyleName; GetImport().SetError( XMLERROR_STYLE_PROP_VALUE | XMLERROR_FLAG_WARNING, - aSeq, e.Message, NULL ); + aSeq, e.Message, nullptr ); } break; } @@ -294,7 +294,7 @@ void XMLShapeStyleContext::FillPropertySet( const Reference< beans::XPropertySet Sequence<OUString> aSeq; GetImport().SetError( XMLERROR_STYLE_PROP_VALUE | XMLERROR_FLAG_WARNING, - aSeq, e.Message, NULL ); + aSeq, e.Message, nullptr ); } break; } diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx index 92c5031d2b5e..547bd6929946 100644 --- a/xmloff/source/draw/animationexport.cxx +++ b/xmloff/source/draw/animationexport.cxx @@ -465,7 +465,7 @@ const SvXMLEnumMapEntry* getAnimationsEnumMap( sal_uInt16 nMap ) } OSL_FAIL( "xmloff::getAnimationsEnumMap(), invalid map!" ); - return NULL; + return nullptr; } const struct ImplAttributeNameConversion* getAnimationAttributeNamesConversionList() @@ -492,7 +492,7 @@ const struct ImplAttributeNameConversion* getAnimationAttributeNamesConversionLi { XML_VISIBILITY, "Visibility" }, { XML_OPACITY, "Opacity" }, { XML_DIM, "DimColor" }, - { XML_TOKEN_INVALID, NULL } + { XML_TOKEN_INVALID, nullptr } }; return gImplConversionList; @@ -559,7 +559,7 @@ AnimationsExporterImpl::~AnimationsExporterImpl() if(mpSdPropHdlFactory) { mpSdPropHdlFactory->release(); - mpSdPropHdlFactory = 0L; + mpSdPropHdlFactory = nullptr; } } diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx index a012696d3238..d6f89e55d392 100644 --- a/xmloff/source/draw/animationimport.cxx +++ b/xmloff/source/draw/animationimport.cxx @@ -130,8 +130,8 @@ public: AnimationsImportHelperImpl::AnimationsImportHelperImpl( SvXMLImport& rImport ) : mrImport( rImport ), - mpAnimationNodeTokenMap( NULL ), - mpAnimationNodeAttributeTokenMap( NULL ), + mpAnimationNodeTokenMap( nullptr ), + mpAnimationNodeAttributeTokenMap( nullptr ), mastrHSL( "hsl" ) { } @@ -144,7 +144,7 @@ AnimationsImportHelperImpl::~AnimationsImportHelperImpl() const SvXMLTokenMap& AnimationsImportHelperImpl::getAnimationNodeTokenMap() { - if( mpAnimationNodeTokenMap == NULL ) + if( mpAnimationNodeTokenMap == nullptr ) { static const SvXMLTokenMapEntry aAnimationNodeTokenMap[] = { @@ -223,7 +223,7 @@ enum AnimationNodeAttributes const SvXMLTokenMap& AnimationsImportHelperImpl::getAnimationNodeAttributeTokenMap() { - if( mpAnimationNodeAttributeTokenMap == NULL ) + if( mpAnimationNodeAttributeTokenMap == nullptr ) { static const SvXMLTokenMapEntry aAnimationNodeAttributeTokenMap[] = { @@ -632,7 +632,7 @@ AnimationNodeContext::AnimationNodeContext( AnimationsImportHelperImpl* pHelper /* = NULL */ ) : SvXMLImportContext(rImport, nPrfx, rLocalName), mpHelper( pHelper ), - mbRootContext( pHelper == NULL ) + mbRootContext( pHelper == nullptr ) { try { @@ -645,7 +645,7 @@ AnimationNodeContext::AnimationNodeContext( { sal_Int16 nPresetClass = EffectPresetClass::CUSTOM; - const sal_Char* pServiceName = 0; + const sal_Char* pServiceName = nullptr; sal_Int16 nNodeType = (sal_Int16)mpHelper->getAnimationNodeTokenMap().Get( nPrfx, rLocalName ); switch( nNodeType ) @@ -692,7 +692,7 @@ AnimationNodeContext::AnimationNodeContext( } break; default: - pServiceName = 0; + pServiceName = nullptr; } if( pServiceName ) @@ -1326,7 +1326,7 @@ void SAL_CALL AnimationsImport::release() throw () SvXMLImportContext *AnimationsImport::CreateContext(sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& xAttrList) { - SvXMLImportContext* pContext = 0; + SvXMLImportContext* pContext = nullptr; if( (XML_NAMESPACE_ANIMATION == nPrefix) && IsXMLToken( rLocalName, XML_SEQ ) ) { diff --git a/xmloff/source/draw/animexp.cxx b/xmloff/source/draw/animexp.cxx index e174de1d34f0..13d665a8574a 100644 --- a/xmloff/source/draw/animexp.cxx +++ b/xmloff/source/draw/animexp.cxx @@ -265,7 +265,7 @@ XMLAnimationsExporter::XMLAnimationsExporter( XMLShapeExport* pShapeExp ) XMLAnimationsExporter::~XMLAnimationsExporter() { delete mpImpl; - mpImpl = NULL; + mpImpl = nullptr; } void XMLAnimationsExporter::prepare( Reference< XShape > xShape, SvXMLExport& ) diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx index 4214cac4ec6e..1794fceb9d75 100644 --- a/xmloff/source/draw/sdpropls.cxx +++ b/xmloff/source/draw/sdpropls.cxx @@ -79,7 +79,7 @@ using namespace ::xmloff::token; #define DPMAP(name,prefix,token,type,context) _MAP(name,prefix,token,type|XML_TYPE_PROP_DRAWING_PAGE,context) #define TMAP(name,prefix,token,type,context) _MAP(name,prefix,token,type|XML_TYPE_PROP_TEXT,context) #define PMAP(name,prefix,token,type,context) _MAP(name,prefix,token,type|XML_TYPE_PROP_PARAGRAPH,context) -#define MAP_END() { 0L, 0, 0, XML_EMPTY, 0 ,0, SvtSaveOptions::ODFVER_010, false } +#define MAP_END() { nullptr, 0, 0, XML_EMPTY, 0 ,0, SvtSaveOptions::ODFVER_010, false } // entry list for graphic properties @@ -855,12 +855,12 @@ bool XMLSdHeaderFooterVisibilityTypeHdl::exportXML( } XMLSdPropHdlFactory::XMLSdPropHdlFactory( uno::Reference< frame::XModel > xModel, SvXMLImport& rImport ) -: mxModel( xModel ), mpExport(0), mpImport( &rImport ) +: mxModel( xModel ), mpExport(nullptr), mpImport( &rImport ) { } XMLSdPropHdlFactory::XMLSdPropHdlFactory( uno::Reference< frame::XModel > xModel, SvXMLExport& rExport ) -: mxModel( xModel ), mpExport( &rExport ), mpImport(0) +: mxModel( xModel ), mpExport( &rExport ), mpImport(nullptr) { } @@ -1190,45 +1190,45 @@ void XMLShapeExportPropertyMapper::ContextFilter( std::vector< XMLPropertyState >& rProperties, uno::Reference< beans::XPropertySet > rPropSet ) const { - XMLPropertyState* pRepeatOffsetX = NULL; - XMLPropertyState* pRepeatOffsetY = NULL; - XMLPropertyState* pTextAnimationBlinking = NULL; - XMLPropertyState* pTextAnimationKind = NULL; + XMLPropertyState* pRepeatOffsetX = nullptr; + XMLPropertyState* pRepeatOffsetY = nullptr; + XMLPropertyState* pTextAnimationBlinking = nullptr; + XMLPropertyState* pTextAnimationKind = nullptr; // #FontWork# - XMLPropertyState* pFontWorkStyle = NULL; - XMLPropertyState* pFontWorkAdjust = NULL; - XMLPropertyState* pFontWorkDistance = NULL; - XMLPropertyState* pFontWorkStart = NULL; - XMLPropertyState* pFontWorkMirror = NULL; - XMLPropertyState* pFontWorkOutline = NULL; - XMLPropertyState* pFontWorkShadow = NULL; - XMLPropertyState* pFontWorkShadowColor = NULL; - XMLPropertyState* pFontWorkShadowOffsetx = NULL; - XMLPropertyState* pFontWorkShadowOffsety = NULL; - XMLPropertyState* pFontWorkForm = NULL; - XMLPropertyState* pFontWorkHideform = NULL; - XMLPropertyState* pFontWorkShadowTransparence = NULL; + XMLPropertyState* pFontWorkStyle = nullptr; + XMLPropertyState* pFontWorkAdjust = nullptr; + XMLPropertyState* pFontWorkDistance = nullptr; + XMLPropertyState* pFontWorkStart = nullptr; + XMLPropertyState* pFontWorkMirror = nullptr; + XMLPropertyState* pFontWorkOutline = nullptr; + XMLPropertyState* pFontWorkShadow = nullptr; + XMLPropertyState* pFontWorkShadowColor = nullptr; + XMLPropertyState* pFontWorkShadowOffsetx = nullptr; + XMLPropertyState* pFontWorkShadowOffsety = nullptr; + XMLPropertyState* pFontWorkForm = nullptr; + XMLPropertyState* pFontWorkHideform = nullptr; + XMLPropertyState* pFontWorkShadowTransparence = nullptr; // OLE - XMLPropertyState* pOLEVisAreaLeft = NULL; - XMLPropertyState* pOLEVisAreaTop = NULL; - XMLPropertyState* pOLEVisAreaWidth = NULL; - XMLPropertyState* pOLEVisAreaHeight = NULL; - XMLPropertyState* pOLEIsInternal = NULL; + XMLPropertyState* pOLEVisAreaLeft = nullptr; + XMLPropertyState* pOLEVisAreaTop = nullptr; + XMLPropertyState* pOLEVisAreaWidth = nullptr; + XMLPropertyState* pOLEVisAreaHeight = nullptr; + XMLPropertyState* pOLEIsInternal = nullptr; // caption - XMLPropertyState* pCaptionIsEscRel = NULL; - XMLPropertyState* pCaptionEscRel = NULL; - XMLPropertyState* pCaptionEscAbs = NULL; + XMLPropertyState* pCaptionIsEscRel = nullptr; + XMLPropertyState* pCaptionEscRel = nullptr; + XMLPropertyState* pCaptionEscAbs = nullptr; // filter fo:clip - XMLPropertyState* pClip11State = NULL; - XMLPropertyState* pClipState = NULL; + XMLPropertyState* pClip11State = nullptr; + XMLPropertyState* pClipState = nullptr; - XMLPropertyState* pShapeWritingMode = NULL; - XMLPropertyState* pTextWritingMode = NULL; - XMLPropertyState* pControlWritingMode = NULL; + XMLPropertyState* pShapeWritingMode = nullptr; + XMLPropertyState* pTextWritingMode = nullptr; + XMLPropertyState* pControlWritingMode = nullptr; // filter properties for( std::vector< XMLPropertyState >::iterator aIter = rProperties.begin(); @@ -1268,7 +1268,7 @@ void XMLShapeExportPropertyMapper::ContextFilter( if( text::WritingMode_LR_TB == eWritingMode ) { property->mnIndex = -1; - pShapeWritingMode = 0; + pShapeWritingMode = nullptr; } } } @@ -1504,7 +1504,7 @@ void XMLShapeExportPropertyMapper::ContextFilter( pCaptionIsEscRel->mnIndex = -1; } - if( pClipState != NULL && pClip11State != NULL ) + if( pClipState != nullptr && pClip11State != nullptr ) pClip11State->mnIndex = -1; SvXMLExportPropertyMapper::ContextFilter(bEnableFoFontFamily, rProperties, rPropSet); @@ -1571,13 +1571,13 @@ void XMLPageExportPropertyMapper::ContextFilter( std::vector< XMLPropertyState >& rProperties, uno::Reference< beans::XPropertySet > rPropSet ) const { - XMLPropertyState* pRepeatOffsetX = NULL; - XMLPropertyState* pRepeatOffsetY = NULL; - XMLPropertyState* pTransType = NULL; - XMLPropertyState* pTransDuration = NULL; - XMLPropertyState* pDateTimeUpdate = NULL; - XMLPropertyState* pDateTimeFormat = NULL; - XMLPropertyState* pTransitionFadeColor = NULL; + XMLPropertyState* pRepeatOffsetX = nullptr; + XMLPropertyState* pRepeatOffsetY = nullptr; + XMLPropertyState* pTransType = nullptr; + XMLPropertyState* pTransDuration = nullptr; + XMLPropertyState* pDateTimeUpdate = nullptr; + XMLPropertyState* pDateTimeFormat = nullptr; + XMLPropertyState* pTransitionFadeColor = nullptr; sal_Int16 nTransitionType = 0; diff --git a/xmloff/source/draw/sdpropls.hxx b/xmloff/source/draw/sdpropls.hxx index d93db557f2a7..7d84ffd11679 100644 --- a/xmloff/source/draw/sdpropls.hxx +++ b/xmloff/source/draw/sdpropls.hxx @@ -93,7 +93,7 @@ public: SvXMLExport& rExport, const XMLPropertyState& rProperty, SvXmlExportFlags nFlags, - const ::std::vector< XMLPropertyState >* pProperties = 0, + const ::std::vector< XMLPropertyState >* pProperties = nullptr, sal_uInt32 nIdx = 0 ) const override; @@ -104,7 +104,7 @@ public: const XMLPropertyState& rProperty, const SvXMLUnitConverter& rUnitConverter, const SvXMLNamespaceMap& rNamespaceMap, - const ::std::vector< XMLPropertyState > *pProperties = 0, + const ::std::vector< XMLPropertyState > *pProperties = nullptr, sal_uInt32 nIdx = 0 ) const override; }; @@ -127,7 +127,7 @@ public: SvXMLExport& rExport, const XMLPropertyState& rProperty, SvXmlExportFlags nFlags, - const ::std::vector< XMLPropertyState >* pProperties = 0, + const ::std::vector< XMLPropertyState >* pProperties = nullptr, sal_uInt32 nIdx = 0 ) const override; }; diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index 9283b168fc10..a614e6767c6c 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -400,11 +400,11 @@ SdXMLExport::SdXMLExport( mpPageMasterInfoList(new ImpXMLEXPPageMasterList()), mpPageMasterUsageList(new ImpXMLEXPPageMasterList()), mpNotesPageMasterUsageList(new ImpXMLEXPPageMasterList()), - mpHandoutPageMaster(NULL), + mpHandoutPageMaster(nullptr), mpAutoLayoutInfoList(new ImpXMLAutoLayoutInfoList()), - mpSdPropHdlFactory(0L), - mpPropertySetMapper(0L), - mpPresPagePropsMapper(0L), + mpSdPropHdlFactory(nullptr), + mpPropertySetMapper(nullptr), + mpPresPagePropsMapper(nullptr), mbIsDraw(bIsDraw), msPageLayoutNames( "PageLayoutNames" ) { @@ -657,21 +657,21 @@ SdXMLExport::~SdXMLExport() if(mpSdPropHdlFactory) { mpSdPropHdlFactory->release(); - mpSdPropHdlFactory = 0L; + mpSdPropHdlFactory = nullptr; } // cleanup mapper, decrease refcount. Should lead to destruction. if(mpPropertySetMapper) { mpPropertySetMapper->release(); - mpPropertySetMapper = 0L; + mpPropertySetMapper = nullptr; } // cleanup presPage mapper, decrease refcount. Should lead to destruction. if(mpPresPagePropsMapper) { mpPresPagePropsMapper->release(); - mpPresPagePropsMapper = 0L; + mpPresPagePropsMapper = nullptr; } // clear evtl. temporary page master infos @@ -679,14 +679,14 @@ SdXMLExport::~SdXMLExport() { // note: all items in this list are also in mpPageMasterInfoList delete mpPageMasterUsageList; - mpPageMasterUsageList = 0L; + mpPageMasterUsageList = nullptr; } if(mpNotesPageMasterUsageList) { // note: all items in this list are also in mpPageMasterInfoList delete mpNotesPageMasterUsageList; - mpNotesPageMasterUsageList = 0L; + mpNotesPageMasterUsageList = nullptr; } if(mpPageMasterInfoList) @@ -695,7 +695,7 @@ SdXMLExport::~SdXMLExport() delete mpPageMasterInfoList->at( i ); mpPageMasterInfoList->clear(); delete mpPageMasterInfoList; - mpPageMasterInfoList = 0L; + mpPageMasterInfoList = nullptr; } // clear auto-layout infos @@ -705,7 +705,7 @@ SdXMLExport::~SdXMLExport() delete mpAutoLayoutInfoList->at( i ); mpAutoLayoutInfoList->clear(); delete mpAutoLayoutInfoList; - mpAutoLayoutInfoList = 0L; + mpAutoLayoutInfoList = nullptr; } } @@ -757,7 +757,7 @@ bool SdXMLExport::ImpPrepAutoLayoutInfo(const Reference<XDrawPage>& xPage, OUStr { if(ImpXMLAutoLayoutInfo::IsCreateNecessary(nType)) { - ImpXMLEXPPageMasterInfo* pInfo = 0L; + ImpXMLEXPPageMasterInfo* pInfo = nullptr; // get master-page info Reference < drawing::XMasterPageTarget > xMasterPageInt(xPage, UNO_QUERY); @@ -1293,7 +1293,7 @@ void SdXMLExport::ImpPrepPageMasterInfos() for (sal_Int32 nMPageId = 0; nMPageId < mnDocMasterPageCount; nMPageId++) { Reference< XDrawPage > xMasterPage( mxDocMasterPages->getByIndex(nMPageId), UNO_QUERY ); - ImpXMLEXPPageMasterInfo* pNewInfo = 0L; + ImpXMLEXPPageMasterInfo* pNewInfo = nullptr; if(xMasterPage.is()) pNewInfo = ImpGetOrCreatePageMasterInfo(xMasterPage); @@ -1303,7 +1303,7 @@ void SdXMLExport::ImpPrepPageMasterInfos() // look for page master of handout page if(IsImpress()) { - pNewInfo = NULL; + pNewInfo = nullptr; Reference< presentation::XPresentationPage > xPresPage(xMasterPage, UNO_QUERY); if(xPresPage.is()) { @@ -1401,7 +1401,7 @@ ImpXMLEXPPageMasterInfo* SdXMLExport::ImpGetPageMasterInfoByName(const OUString& } } } - return 0L; + return nullptr; } void SdXMLExport::ImpPrepDrawPageInfos() @@ -1904,7 +1904,7 @@ void SdXMLExport::_ExportContent() if( xAnimExport.is() ) xAnimExport->exportAnimations( *this ); - xAnimExport = NULL; + xAnimExport = nullptr; GetShapeExport()->setAnimationsExporter( xAnimExport ); } @@ -2065,7 +2065,7 @@ void SdXMLExport::exportPresentationSettings() Reference< container::XNameContainer > xShows; Sequence< OUString > aShowNames; - const OUString* pShowNames = NULL; + const OUString* pShowNames = nullptr; sal_Int32 nShowCount = 0; Reference< XCustomPresentationSupplier > xSup( GetModel(), UNO_QUERY ); @@ -2708,7 +2708,7 @@ void SdXMLExport::exportAnnotations( const Reference<XDrawPage>& xDrawPage ) { // date time com::sun::star::util::DateTime aDate( xAnnotation->getDateTime() ); - ::sax::Converter::convertDateTime(sStringBuffer, aDate, 0, true); + ::sax::Converter::convertDateTime(sStringBuffer, aDate, nullptr, true); SvXMLElementExport aDateElem( *this, XML_NAMESPACE_DC, XML_DATE, true, false ); Characters(sStringBuffer.makeStringAndClear()); } diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx index 88d036da02f9..e4409d1dd955 100644 --- a/xmloff/source/draw/sdxmlimp.cxx +++ b/xmloff/source/draw/sdxmlimp.cxx @@ -128,7 +128,7 @@ SvXMLImportContext *SdXMLDocContext_Impl::CreateChildContext( const OUString& rLocalName, const uno::Reference<xml::sax::XAttributeList>& xAttrList) { - SvXMLImportContext* pContext = 0L; + SvXMLImportContext* pContext = nullptr; const SvXMLTokenMap& rTokenMap = GetSdImport().GetDocElemTokenMap(); switch(rTokenMap.Get(nPrefix, rLocalName)) @@ -285,17 +285,17 @@ SdXMLImport::SdXMLImport( OUString const & implementationName, bool bIsDraw, SvXMLImportFlags nImportFlags ) : SvXMLImport( xContext, implementationName, nImportFlags ), - mpMasterStylesContext(0L), - mpDocElemTokenMap(0L), - mpBodyElemTokenMap(0L), - mpStylesElemTokenMap(0L), - mpMasterPageElemTokenMap(0L), - mpMasterPageAttrTokenMap(0L), - mpPageMasterAttrTokenMap(0L), - mpPageMasterStyleAttrTokenMap(0L), - mpDrawPageAttrTokenMap(0L), - mpDrawPageElemTokenMap(0L), - mpPresentationPlaceholderAttrTokenMap(0L), + mpMasterStylesContext(nullptr), + mpDocElemTokenMap(nullptr), + mpBodyElemTokenMap(nullptr), + mpStylesElemTokenMap(nullptr), + mpMasterPageElemTokenMap(nullptr), + mpMasterPageAttrTokenMap(nullptr), + mpPageMasterAttrTokenMap(nullptr), + mpPageMasterStyleAttrTokenMap(nullptr), + mpDrawPageAttrTokenMap(nullptr), + mpDrawPageElemTokenMap(nullptr), + mpPresentationPlaceholderAttrTokenMap(nullptr), mnNewPageCount(0L), mnNewMasterPageCount(0L), mbIsDraw(bIsDraw), @@ -637,7 +637,7 @@ SvXMLImportContext *SdXMLImport::CreateContext(sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference<xml::sax::XAttributeList>& xAttrList) { - SvXMLImportContext* pContext = 0; + SvXMLImportContext* pContext = nullptr; if(XML_NAMESPACE_OFFICE == nPrefix && ( IsXMLToken( rLocalName, XML_DOCUMENT_STYLES ) || @@ -665,14 +665,14 @@ SvXMLImportContext *SdXMLImport::CreateContext(sal_uInt16 nPrefix, SvXMLImportContext *SdXMLImport::CreateMetaContext(const OUString& rLocalName, const uno::Reference<xml::sax::XAttributeList>&) { - SvXMLImportContext* pContext = 0L; + SvXMLImportContext* pContext = nullptr; if (getImportFlags() & SvXMLImportFlags::META) { uno::Reference<document::XDocumentPropertiesSupplier> xDPS( GetModel(), uno::UNO_QUERY_THROW); uno::Reference<document::XDocumentProperties> const xDocProps( - (IsStylesOnlyMode()) ? 0 : xDPS->getDocumentProperties()); + (IsStylesOnlyMode()) ? nullptr : xDPS->getDocumentProperties()); pContext = new SvXMLMetaDocumentContext(*this, XML_NAMESPACE_OFFICE, rLocalName, xDocProps); @@ -689,7 +689,7 @@ SvXMLImportContext *SdXMLImport::CreateMetaContext(const OUString& rLocalName, SvXMLImportContext *SdXMLImport::CreateBodyContext(const OUString& rLocalName, const uno::Reference<xml::sax::XAttributeList>&) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; pContext = new SdXMLBodyContext(*this, XML_NAMESPACE_OFFICE, rLocalName); return pContext; } @@ -745,7 +745,7 @@ SvXMLImportContext *SdXMLImport::CreateFontDeclsContext(const OUString& rLocalNa SvXMLImportContext *SdXMLImport::CreateScriptContext( const OUString& rLocalName ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; pContext = new XMLScriptContext( *this, XML_NAMESPACE_OFFICE, rLocalName, @@ -853,13 +853,13 @@ void SdXMLImport::SetStatistics( const uno::Sequence<beans::NamedValue> & i_rStats) { static const char* s_stats[] = - { "ObjectCount", 0 }; + { "ObjectCount", nullptr }; SvXMLImport::SetStatistics(i_rStats); sal_uInt32 nCount(10); for (sal_Int32 i = 0; i < i_rStats.getLength(); ++i) { - for (const char** pStat = s_stats; *pStat != 0; ++pStat) { + for (const char** pStat = s_stats; *pStat != nullptr; ++pStat) { if (i_rStats[i].Name.equalsAscii(*pStat)) { sal_Int32 val = 0; if (i_rStats[i].Value >>= val) { diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 676e5a670883..705c64f3bb3d 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -3115,11 +3115,11 @@ static void lcl_CopyStream( ::comphelper::OStorageHelper::GetStreamAtPackageURL(xTarget, rPath, embed::ElementModes::WRITE | embed::ElementModes::TRUNCATE, proxy)); uno::Reference<io::XOutputStream> const xOutStream( - (xStream.is()) ? xStream->getOutputStream() : 0); + (xStream.is()) ? xStream->getOutputStream() : nullptr); if (!xOutStream.is()) { SAL_WARN("xmloff", "no output stream"); - throw uno::Exception("no output stream",0); + throw uno::Exception("no output stream",nullptr); } uno::Reference< beans::XPropertySet > const xStreamProps(xStream, uno::UNO_QUERY); diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx index 1e4ce7c8bdf6..688d8c62b51c 100644 --- a/xmloff/source/draw/shapeimport.cxx +++ b/xmloff/source/draw/shapeimport.cxx @@ -111,24 +111,24 @@ XMLShapeImportHelper::XMLShapeImportHelper( SvXMLImport& rImporter, const uno::Reference< frame::XModel>& rModel, SvXMLImportPropertyMapper *pExtMapper ) -: mpPageContext(NULL), +: mpPageContext(nullptr), mxModel(rModel), - mpPropertySetMapper(0L), - mpPresPagePropsMapper(0L), - mpStylesContext(0L), - mpAutoStylesContext(0L), - mpGroupShapeElemTokenMap(0L), - mpFrameShapeElemTokenMap(0L), - mp3DSceneShapeElemTokenMap(0L), - mp3DObjectAttrTokenMap(0L), - mp3DPolygonBasedAttrTokenMap(0L), - mp3DCubeObjectAttrTokenMap(0L), - mp3DSphereObjectAttrTokenMap(0L), - mp3DSceneShapeAttrTokenMap(0L), - mp3DLightAttrTokenMap(0L), - mpPathShapeAttrTokenMap(0L), - mpPolygonShapeAttrTokenMap(0L), + mpPropertySetMapper(nullptr), + mpPresPagePropsMapper(nullptr), + mpStylesContext(nullptr), + mpAutoStylesContext(nullptr), + mpGroupShapeElemTokenMap(nullptr), + mpFrameShapeElemTokenMap(nullptr), + mp3DSceneShapeElemTokenMap(nullptr), + mp3DObjectAttrTokenMap(nullptr), + mp3DPolygonBasedAttrTokenMap(nullptr), + mp3DCubeObjectAttrTokenMap(nullptr), + mp3DSphereObjectAttrTokenMap(nullptr), + mp3DSceneShapeAttrTokenMap(nullptr), + mp3DLightAttrTokenMap(nullptr), + mpPathShapeAttrTokenMap(nullptr), + mpPolygonShapeAttrTokenMap(nullptr), msStartShape("StartShape"), msEndShape("EndShape"), msStartGluePointIndex("StartGluePointIndex"), @@ -137,7 +137,7 @@ XMLShapeImportHelper::XMLShapeImportHelper( mrImporter( rImporter ) { mpImpl = new XMLShapeImportHelperImpl(); - mpImpl->mpSortContext = 0; + mpImpl->mpSortContext = nullptr; // #88546# init to sal_False mpImpl->mbHandleProgressBar = false; @@ -182,21 +182,21 @@ XMLShapeImportHelper::~XMLShapeImportHelper() if(mpSdPropHdlFactory) { mpSdPropHdlFactory->release(); - mpSdPropHdlFactory = 0L; + mpSdPropHdlFactory = nullptr; } // cleanup mapper, decrease refcount. Should lead to destruction. if(mpPropertySetMapper) { mpPropertySetMapper->release(); - mpPropertySetMapper = 0L; + mpPropertySetMapper = nullptr; } // cleanup presPage mapper, decrease refcount. Should lead to destruction. if(mpPresPagePropsMapper) { mpPresPagePropsMapper->release(); - mpPresPagePropsMapper = 0L; + mpPresPagePropsMapper = nullptr; } delete mpGroupShapeElemTokenMap; @@ -405,7 +405,7 @@ SvXMLShapeContext* XMLShapeImportHelper::Create3DSceneChildContext( const uno::Reference< xml::sax::XAttributeList>& xAttrList, uno::Reference< drawing::XShapes >& rShapes) { - SdXMLShapeContext *pContext = 0L; + SdXMLShapeContext *pContext = nullptr; if(rShapes.is()) { @@ -482,7 +482,7 @@ SvXMLShapeContext* XMLShapeImportHelper::CreateGroupChildContext( uno::Reference< drawing::XShapes >& rShapes, bool bTemporaryShape) { - SdXMLShapeContext *pContext = 0L; + SdXMLShapeContext *pContext = nullptr; const SvXMLTokenMap& rTokenMap = GetGroupShapeElemTokenMap(); sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; @@ -615,7 +615,7 @@ SvXMLShapeContext* XMLShapeImportHelper::CreateFrameChildContext( uno::Reference< drawing::XShapes >& rShapes, const uno::Reference< xml::sax::XAttributeList>& rFrameAttrList) { - SdXMLShapeContext *pContext = 0L; + SdXMLShapeContext *pContext = nullptr; const SvXMLTokenMap& rTokenMap = GetFrameShapeElemTokenMap(); @@ -700,7 +700,7 @@ SvXMLImportContext *XMLShapeImportHelper::CreateFrameChildContext( const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext * pContext = NULL; + SvXMLImportContext * pContext = nullptr; SdXMLFrameShapeContext *pFrameContext = dynamic_cast<SdXMLFrameShapeContext*>( pThisContext ); if( pFrameContext ) @@ -778,7 +778,7 @@ public: sal_Int32 mnCurrentZ; ShapeSortContext* mpParentContext; - ShapeSortContext( uno::Reference< drawing::XShapes >& rShapes, ShapeSortContext* pParentContext = NULL ); + ShapeSortContext( uno::Reference< drawing::XShapes >& rShapes, ShapeSortContext* pParentContext = nullptr ); void popGroupAndSort(); private: @@ -895,7 +895,7 @@ void XMLShapeImportHelper::pushGroupForSorting( uno::Reference< drawing::XShapes void XMLShapeImportHelper::popGroupAndSort() { DBG_ASSERT( mpImpl->mpSortContext, "No context to sort!" ); - if( mpImpl->mpSortContext == NULL ) + if( mpImpl->mpSortContext == nullptr ) return; try @@ -1097,7 +1097,7 @@ void XMLShapeImportHelper::startPage( com::sun::star::uno::Reference< com::sun:: void XMLShapeImportHelper::endPage( com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes ) { DBG_ASSERT( mpPageContext && (mpPageContext->mxShapes == rShapes), "wrong call to endPage(), no startPage called or wrong page" ); - if( NULL == mpPageContext ) + if( nullptr == mpPageContext ) return; restoreConnections(); diff --git a/xmloff/source/draw/ximp3dobject.cxx b/xmloff/source/draw/ximp3dobject.cxx index 4a18d432bb36..48f960eb3ae7 100644 --- a/xmloff/source/draw/ximp3dobject.cxx +++ b/xmloff/source/draw/ximp3dobject.cxx @@ -358,7 +358,7 @@ void SdXML3DPolygonBasedShapeContext::StartElement(const uno::Reference< xml::sa // import 2d tools::PolyPolygon from svg:d basegfx::B2DPolyPolygon aPolyPolygon; - if(basegfx::tools::importFromSvgD(aPolyPolygon, maPoints, GetImport().needFixPositionAfterZ(), 0)) + if(basegfx::tools::importFromSvgD(aPolyPolygon, maPoints, GetImport().needFixPositionAfterZ(), nullptr)) { // convert to 3D PolyPolygon const basegfx::B3DPolyPolygon aB3DPolyPolygon( diff --git a/xmloff/source/draw/ximp3dscene.cxx b/xmloff/source/draw/ximp3dscene.cxx index 2bb82e0b1631..507dbbb2000f 100644 --- a/xmloff/source/draw/ximp3dscene.cxx +++ b/xmloff/source/draw/ximp3dscene.cxx @@ -162,7 +162,7 @@ SvXMLImportContext* SdXML3DSceneShapeContext::CreateChildContext( sal_uInt16 nPr const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext* pContext = 0L; + SvXMLImportContext* pContext = nullptr; // #i68101# if( nPrefix == XML_NAMESPACE_SVG && diff --git a/xmloff/source/draw/ximpbody.cxx b/xmloff/source/draw/ximpbody.cxx index 266135be6276..2fea4682020f 100644 --- a/xmloff/source/draw/ximpbody.cxx +++ b/xmloff/source/draw/ximpbody.cxx @@ -214,7 +214,7 @@ SvXMLImportContext *SdXMLDrawPageContext::CreateChildContext( sal_uInt16 nPrefix const OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext *pContext = 0L; + SvXMLImportContext *pContext = nullptr; const SvXMLTokenMap& rTokenMap = GetSdImport().GetDrawPageElemTokenMap(); // some special objects inside draw:page context @@ -294,7 +294,7 @@ SvXMLImportContext *SdXMLBodyContext::CreateChildContext( const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext *pContext = 0L; + SvXMLImportContext *pContext = nullptr; const SvXMLTokenMap& rTokenMap = GetSdImport().GetBodyElemTokenMap(); switch(rTokenMap.Get(nPrefix, rLocalName)) diff --git a/xmloff/source/draw/ximpgrp.cxx b/xmloff/source/draw/ximpgrp.cxx index 4d62c92cf2c6..4c6eca23b826 100644 --- a/xmloff/source/draw/ximpgrp.cxx +++ b/xmloff/source/draw/ximpgrp.cxx @@ -47,7 +47,7 @@ SvXMLImportContext* SdXMLGroupShapeContext::CreateChildContext( sal_uInt16 nPref const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext* pContext = 0L; + SvXMLImportContext* pContext = nullptr; // #i68101# if( nPrefix == XML_NAMESPACE_SVG && diff --git a/xmloff/source/draw/ximpnote.cxx b/xmloff/source/draw/ximpnote.cxx index ae6e0892f726..d144f7e668a5 100644 --- a/xmloff/source/draw/ximpnote.cxx +++ b/xmloff/source/draw/ximpnote.cxx @@ -97,7 +97,7 @@ SvXMLImportContext *SdXMLNotesContext::CreateChildContext( sal_uInt16 nPrefix, const uno::Reference< xml::sax::XAttributeList>& xAttrList ) { // OK, notes page is set on base class, objects can be imported on notes page - SvXMLImportContext *pContext = 0L; + SvXMLImportContext *pContext = nullptr; // some special objects inside presentation:notes context diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx index 3d33780220cf..bcf1871d274f 100644 --- a/xmloff/source/draw/ximppage.cxx +++ b/xmloff/source/draw/ximppage.cxx @@ -130,7 +130,7 @@ DrawAnnotationContext::DrawAnnotationContext( SvXMLImport& rImport, sal_uInt16 n SvXMLImportContext * DrawAnnotationContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ) { - SvXMLImportContext * pContext = NULL; + SvXMLImportContext * pContext = nullptr; if( mxAnnotation.is() ) { @@ -190,7 +190,7 @@ void DrawAnnotationContext::EndElement() mxAnnotation->setAuthor( maAuthorBuffer.makeStringAndClear() ); util::DateTime aDateTime; - if (::sax::Converter::parseDateTime(aDateTime, 0, + if (::sax::Converter::parseDateTime(aDateTime, nullptr, maDateBuffer.makeStringAndClear())) { mxAnnotation->setDateTime(aDateTime); @@ -240,7 +240,7 @@ SvXMLImportContext* SdXMLGenericPageContext::CreateChildContext( sal_uInt16 nPre const OUString& rLocalName, const Reference< xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext* pContext = 0L; + SvXMLImportContext* pContext = nullptr; if( nPrefix == XML_NAMESPACE_PRESENTATION && IsXMLToken( rLocalName, XML_ANIMATIONS ) ) { @@ -485,7 +485,7 @@ void SdXMLGenericPageContext::SetPageMaster( OUString& rsPageMasterName ) // #80012# GetStylesContext() replaced with GetAutoStylesContext() const SvXMLStylesContext* pAutoStyles = GetSdImport().GetShapeImport()->GetAutoStylesContext(); - const SvXMLStyleContext* pStyle = pAutoStyles ? pAutoStyles->FindStyleChildContext(XML_STYLE_FAMILY_SD_PAGEMASTERCONEXT_ID, rsPageMasterName) : NULL; + const SvXMLStyleContext* pStyle = pAutoStyles ? pAutoStyles->FindStyleChildContext(XML_STYLE_FAMILY_SD_PAGEMASTERCONEXT_ID, rsPageMasterName) : nullptr; if(pStyle && dynamic_cast<const SdXMLPageMasterContext*>(pStyle) != nullptr) { diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index 57edea2ea5bd..7ce09b5c4d8d 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -174,7 +174,7 @@ SvXMLImportContext *SdXMLShapeContext::CreateChildContext( sal_uInt16 p_nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext * pContext = NULL; + SvXMLImportContext * pContext = nullptr; // #i68101# if( p_nPrefix == XML_NAMESPACE_SVG && @@ -526,7 +526,7 @@ void SdXMLShapeContext::AddShape(OUString const & serviceName) uno::Sequence<OUString> aSeq( 1 ); aSeq[0] = serviceName; GetImport().SetError( XMLERROR_FLAG_ERROR | XMLERROR_API, - aSeq, e.Message, NULL ); + aSeq, e.Message, nullptr ); } } } @@ -605,13 +605,13 @@ void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */) do { - XMLPropStyleContext* pDocStyle = NULL; + XMLPropStyleContext* pDocStyle = nullptr; // set style on shape if(maDrawStyleName.isEmpty()) break; - const SvXMLStyleContext* pStyle = 0L; + const SvXMLStyleContext* pStyle = nullptr; bool bAutoStyle(false); if(GetImport().GetShapeImport()->GetAutoStylesContext()) @@ -725,12 +725,12 @@ void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */) if( maTextStyleName.isEmpty() ) break; - if( NULL == GetImport().GetShapeImport()->GetAutoStylesContext()) + if( nullptr == GetImport().GetShapeImport()->GetAutoStylesContext()) break; const SvXMLStyleContext* pTempStyle = GetImport().GetShapeImport()->GetAutoStylesContext()->FindStyleChildContext(XML_STYLE_FAMILY_TEXT_PARAGRAPH, maTextStyleName); XMLPropStyleContext* pStyle = const_cast<XMLPropStyleContext*>(dynamic_cast<const XMLPropStyleContext*>( pTempStyle ) ); // use temp var, PTR_CAST is a bad macro, FindStyleChildContext will be called twice - if( pStyle == NULL ) + if( pStyle == nullptr ) break; // set PropertySet on object @@ -1489,7 +1489,7 @@ void SdXMLPathShapeContext::StartElement(const uno::Reference< xml::sax::XAttrib basegfx::B2DPolyPolygon aPolyPolygon; - if(basegfx::tools::importFromSvgD(aPolyPolygon, maD, GetImport().needFixPositionAfterZ(), 0)) + if(basegfx::tools::importFromSvgD(aPolyPolygon, maD, GetImport().needFixPositionAfterZ(), nullptr)) { if(aPolyPolygon.count()) { @@ -1975,7 +1975,7 @@ void SdXMLConnectorShapeContext::processAttribute( sal_uInt16 nPrefix, const OUS { basegfx::B2DPolyPolygon aPolyPolygon; - if(basegfx::tools::importFromSvgD(aPolyPolygon, rValue, GetImport().needFixPositionAfterZ(), 0)) + if(basegfx::tools::importFromSvgD(aPolyPolygon, rValue, GetImport().needFixPositionAfterZ(), nullptr)) { if(aPolyPolygon.count()) { @@ -2549,7 +2549,7 @@ SvXMLImportContext* SdXMLGraphicObjectShapeContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference<xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext* pContext = NULL; + SvXMLImportContext* pContext = nullptr; if( (XML_NAMESPACE_OFFICE == nPrefix) && xmloff::token::IsXMLToken( rLocalName, xmloff::token::XML_BINARY_DATA ) ) @@ -2565,7 +2565,7 @@ SvXMLImportContext* SdXMLGraphicObjectShapeContext::CreateChildContext( } // delegate to parent class if no context could be created - if ( NULL == pContext ) + if ( nullptr == pContext ) pContext = SdXMLShapeContext::CreateChildContext(nPrefix, rLocalName, xAttrList); @@ -2587,7 +2587,7 @@ SdXMLChartShapeContext::SdXMLChartShapeContext( uno::Reference< drawing::XShapes >& rShapes, bool bTemporaryShape) : SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, bTemporaryShape ), - mpChartContext( NULL ) + mpChartContext( nullptr ) { } @@ -2679,7 +2679,7 @@ SvXMLImportContext * SdXMLChartShapeContext::CreateChildContext( sal_uInt16 nPre if( mpChartContext ) return mpChartContext->CreateChildContext( nPrefix, rLocalName, xAttrList ); - return NULL; + return nullptr; } TYPEINIT1( SdXMLObjectShapeContext, SdXMLShapeContext ); @@ -2855,7 +2855,7 @@ SvXMLImportContext* SdXMLObjectShapeContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference<xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext* pContext = NULL; + SvXMLImportContext* pContext = nullptr; if((XML_NAMESPACE_OFFICE == nPrefix) && IsXMLToken(rLocalName, XML_BINARY_DATA)) { @@ -3525,7 +3525,7 @@ SvXMLImportContext *SdXMLFrameShapeContext::CreateChildContext( sal_uInt16 nPref const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext * pContext = 0; + SvXMLImportContext * pContext = nullptr; if( !mxImplContext.Is() ) { @@ -3697,7 +3697,7 @@ void SdXMLFrameShapeContext::EndElement() } } - mxImplContext = 0; + mxImplContext = nullptr; SdXMLShapeContext::EndElement(); } @@ -3931,7 +3931,7 @@ SvXMLImportContext* SdXMLCustomShapeContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference<xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext* pContext = NULL; + SvXMLImportContext* pContext = nullptr; if ( XML_NAMESPACE_DRAW == nPrefix ) { if ( IsXMLToken( rLocalName, XML_ENHANCED_GEOMETRY ) ) @@ -3942,7 +3942,7 @@ SvXMLImportContext* SdXMLCustomShapeContext::CreateChildContext( } } // delegate to parent class if no context could be created - if ( NULL == pContext ) + if ( nullptr == pContext ) pContext = SdXMLShapeContext::CreateChildContext( nPrefix, rLocalName, xAttrList); return pContext; diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx index f6758f3e8566..dc2de24d8d8b 100644 --- a/xmloff/source/draw/ximpstyl.cxx +++ b/xmloff/source/draw/ximpstyl.cxx @@ -98,7 +98,7 @@ SvXMLImportContext *SdXMLDrawingPagePropertySetContext::CreateChildContext( ::std::vector< XMLPropertyState > &rProperties, const XMLPropertyState& rProp ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; switch( mxMapper->getPropertySetMapper()->GetEntryContextId( rProp.mnIndex ) ) { @@ -178,7 +178,7 @@ SvXMLImportContext *SdXMLDrawingPageStyleContext::CreateChildContext( const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; if( XML_NAMESPACE_STYLE == nPrefix && IsXMLToken( rLocalName, XML_DRAWING_PAGE_PROPERTIES ) ) @@ -389,7 +389,7 @@ SdXMLPageMasterContext::SdXMLPageMasterContext( const OUString& rLName, const uno::Reference< xml::sax::XAttributeList>& xAttrList) : SvXMLStyleContext(rImport, nPrfx, rLName, xAttrList, XML_STYLE_FAMILY_SD_PAGEMASTERCONEXT_ID), - mpPageMasterStyle( 0L ) + mpPageMasterStyle( nullptr ) { // set family to something special at SvXMLStyleContext // for differences in search-methods @@ -420,7 +420,7 @@ SdXMLPageMasterContext::~SdXMLPageMasterContext() if(mpPageMasterStyle) { mpPageMasterStyle->ReleaseRef(); - mpPageMasterStyle = 0L; + mpPageMasterStyle = nullptr; } } @@ -429,7 +429,7 @@ SvXMLImportContext *SdXMLPageMasterContext::CreateChildContext( const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) { - SvXMLImportContext* pContext = 0; + SvXMLImportContext* pContext = nullptr; if(nPrefix == XML_NAMESPACE_STYLE && IsXMLToken( rLocalName, XML_PAGE_LAYOUT_PROPERTIES) ) { @@ -484,7 +484,7 @@ SvXMLImportContext *SdXMLPresentationPageLayoutContext::CreateChildContext( const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) { - SvXMLImportContext* pContext = 0; + SvXMLImportContext* pContext = nullptr; if(nPrefix == XML_NAMESPACE_PRESENTATION && IsXMLToken( rLocalName, XML_PLACEHOLDER ) ) { @@ -892,7 +892,7 @@ SvXMLImportContext* SdXMLMasterPageContext::CreateChildContext( const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext* pContext = 0; + SvXMLImportContext* pContext = nullptr; const SvXMLTokenMap& rTokenMap = GetSdImport().GetMasterPageElemTokenMap(); // some special objects inside style:masterpage context @@ -971,7 +971,7 @@ SvXMLStyleContext* SdXMLStylesContext::CreateStyleChildContext( const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList) { - SvXMLStyleContext* pContext = 0; + SvXMLStyleContext* pContext = nullptr; const SvXMLTokenMap& rStyleTokenMap = GetSdImport().GetStylesElemTokenMap(); switch(rStyleTokenMap.Get(nPrefix, rLocalName)) @@ -1041,7 +1041,7 @@ SvXMLStyleContext* SdXMLStylesContext::CreateStyleStyleChildContext( const OUString& rLocalName, const uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList) { - SvXMLStyleContext* pContext = 0; + SvXMLStyleContext* pContext = nullptr; switch( nFamily ) { @@ -1068,7 +1068,7 @@ SvXMLStyleContext* SdXMLStylesContext::CreateDefaultStyleStyleChildContext( const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) { - SvXMLStyleContext* pContext = 0; + SvXMLStyleContext* pContext = nullptr; switch( nFamily ) { @@ -1403,7 +1403,7 @@ void SdXMLStylesContext::ImpSetGraphicStyles( uno::Reference< container::XNameAc catch(const 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, nullptr ); } } @@ -1443,7 +1443,7 @@ void SdXMLStylesContext::ImpSetGraphicStyles( uno::Reference< container::XNameAc catch( const 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, nullptr ); } } } @@ -1491,7 +1491,7 @@ SvXMLImportContext* SdXMLMasterStylesContext::CreateChildContext( const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList) { - SvXMLImportContext* pContext = 0; + SvXMLImportContext* pContext = nullptr; if(nPrefix == XML_NAMESPACE_STYLE && IsXMLToken( rLocalName, XML_MASTER_PAGE ) ) |