diff options
221 files changed, 1180 insertions, 1180 deletions
diff --git a/include/xmloff/XMLEventExport.hxx b/include/xmloff/XMLEventExport.hxx index 58740e0752b7..7980fb007d4e 100644 --- a/include/xmloff/XMLEventExport.hxx +++ b/include/xmloff/XMLEventExport.hxx @@ -69,7 +69,7 @@ class XMLOFF_DLLPUBLIC XMLEventExport public: XMLEventExport(SvXMLExport& rExport, - const XMLEventNameTranslation* pTranslationTable = NULL); + const XMLEventNameTranslation* pTranslationTable = nullptr); ~XMLEventExport(); /// register an EventExportHandler for a particular script type diff --git a/include/xmloff/nmspmap.hxx b/include/xmloff/nmspmap.hxx index a99c66270299..36d78f766b45 100644 --- a/include/xmloff/nmspmap.hxx +++ b/include/xmloff/nmspmap.hxx @@ -114,12 +114,12 @@ public: sal_uInt16 _GetKeyByAttrName( const OUString& rAttrName, OUString *pPrefix, OUString *pLocalName, - OUString *pNamespace = 0, + OUString *pNamespace = nullptr, bool bCache = true) const; /* This will replace the version with the unused 3rd default parameter */ sal_uInt16 _GetKeyByAttrName( const OUString& rAttrName, - OUString *pLocalName = 0, + OUString *pLocalName = nullptr, bool bCache = true) const; sal_uInt16 GetFirstKey() const; @@ -148,10 +148,10 @@ public: /* deprecated */ sal_uInt16 GetKeyByAttrName( const OUString& rAttrName, OUString *pPrefix, OUString *pLocalName, - OUString *pNamespace=0, + OUString *pNamespace=nullptr, sal_uInt16 nIdxGuess = USHRT_MAX ) const; /* deprecated */ sal_uInt16 GetKeyByAttrName( const OUString& rAttrName, - OUString *pLocalName = 0, + OUString *pLocalName = nullptr, sal_uInt16 nIdxGuess = USHRT_MAX ) const; }; diff --git a/include/xmloff/shapeexport.hxx b/include/xmloff/shapeexport.hxx index f754282eaa40..be7d2d261866 100644 --- a/include/xmloff/shapeexport.hxx +++ b/include/xmloff/shapeexport.hxx @@ -220,30 +220,30 @@ private: SAL_DLLPRIVATE void ImpExportGluePoints( const css::uno::Reference< css::drawing::XShape >& xShape ); // single shape exporters - SAL_DLLPRIVATE void ImpExportGroupShape( const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = NULL ); - SAL_DLLPRIVATE void ImpExport3DSceneShape( const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = NULL ); - SAL_DLLPRIVATE void ImpExportRectangleShape( const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = NULL ); - SAL_DLLPRIVATE void ImpExportLineShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = NULL ); - SAL_DLLPRIVATE void ImpExportEllipseShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = NULL ); - SAL_DLLPRIVATE void ImpExportPolygonShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = NULL ); - SAL_DLLPRIVATE void ImpExportTextBoxShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = NULL ); - SAL_DLLPRIVATE void ImpExportGraphicObjectShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = NULL ); - SAL_DLLPRIVATE void ImpExportChartShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = NULL, SvXMLAttributeList* pAttrList = NULL ); - SAL_DLLPRIVATE void ImpExportControlShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = NULL ); - SAL_DLLPRIVATE void ImpExportConnectorShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = NULL ); - SAL_DLLPRIVATE void ImpExportMeasureShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = NULL ); - SAL_DLLPRIVATE void ImpExportOLE2Shape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = NULL, SvXMLAttributeList* pAttrList = NULL ); - SAL_DLLPRIVATE void ImpExportPageShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = NULL ); - SAL_DLLPRIVATE void ImpExportCaptionShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = NULL ); - SAL_DLLPRIVATE void ImpExport3DShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = NULL ); - SAL_DLLPRIVATE void ImpExportFrameShape( const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = NULL ); - SAL_DLLPRIVATE void ImpExportPluginShape( const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = NULL ); - SAL_DLLPRIVATE void ImpExportAppletShape( const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = NULL ); - SAL_DLLPRIVATE void ImpExportCustomShape( const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = NULL ); - SAL_DLLPRIVATE void ImpExportMediaShape( const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = NULL ); - SAL_DLLPRIVATE void ImpExportTableShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = NULL ); + SAL_DLLPRIVATE void ImpExportGroupShape( const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr ); + SAL_DLLPRIVATE void ImpExport3DSceneShape( const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr ); + SAL_DLLPRIVATE void ImpExportRectangleShape( const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr ); + SAL_DLLPRIVATE void ImpExportLineShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr ); + SAL_DLLPRIVATE void ImpExportEllipseShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr ); + SAL_DLLPRIVATE void ImpExportPolygonShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr ); + SAL_DLLPRIVATE void ImpExportTextBoxShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr ); + SAL_DLLPRIVATE void ImpExportGraphicObjectShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr ); + SAL_DLLPRIVATE void ImpExportChartShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr, SvXMLAttributeList* pAttrList = nullptr ); + SAL_DLLPRIVATE void ImpExportControlShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr ); + SAL_DLLPRIVATE void ImpExportConnectorShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr ); + SAL_DLLPRIVATE void ImpExportMeasureShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr ); + SAL_DLLPRIVATE void ImpExportOLE2Shape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr, SvXMLAttributeList* pAttrList = nullptr ); + SAL_DLLPRIVATE void ImpExportPageShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr ); + SAL_DLLPRIVATE void ImpExportCaptionShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr ); + SAL_DLLPRIVATE void ImpExport3DShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr ); + SAL_DLLPRIVATE void ImpExportFrameShape( const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr ); + SAL_DLLPRIVATE void ImpExportPluginShape( const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr ); + SAL_DLLPRIVATE void ImpExportAppletShape( const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr ); + SAL_DLLPRIVATE void ImpExportCustomShape( const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr ); + SAL_DLLPRIVATE void ImpExportMediaShape( const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr ); + SAL_DLLPRIVATE void ImpExportTableShape(const css::uno::Reference< css::drawing::XShape >& xShape, XmlShapeType eShapeType, XMLShapeExportFlags nFeatures = SEF_DEFAULT, css::awt::Point* pRefPoint = nullptr ); public: - XMLShapeExport(SvXMLExport& rExp, SvXMLExportPropertyMapper *pExtMapper=0 ); + XMLShapeExport(SvXMLExport& rExp, SvXMLExportPropertyMapper *pExtMapper=nullptr ); virtual ~XMLShapeExport(); // This method collects all automatic styles for the given XShape @@ -254,8 +254,8 @@ public: void exportShape( const css::uno::Reference < css::drawing::XShape >& xShape, XMLShapeExportFlags nFeatures = SEF_DEFAULT, - css::awt::Point* pRefPoint = NULL, - SvXMLAttributeList* pAttrList = NULL + css::awt::Point* pRefPoint = nullptr, + SvXMLAttributeList* pAttrList = nullptr ); // This method collects all automatic styles for the shapes inside the given XShapes collection @@ -266,7 +266,7 @@ public: void exportShapes( const css::uno::Reference < css::drawing::XShapes >& xShapes, XMLShapeExportFlags nFeatures = SEF_DEFAULT, - css::awt::Point* pRefPoint = NULL + css::awt::Point* pRefPoint = nullptr ); /** initializes some internal structures for fast access to the given XShapes collection diff --git a/include/xmloff/shapeimport.hxx b/include/xmloff/shapeimport.hxx index b8c34d18fac4..c8dff3c350fe 100644 --- a/include/xmloff/shapeimport.hxx +++ b/include/xmloff/shapeimport.hxx @@ -310,7 +310,7 @@ protected: public: XMLShapeImportHelper( SvXMLImport& rImporter, const css::uno::Reference< css::frame::XModel>& rModel, - SvXMLImportPropertyMapper *pExtMapper=0 ); + SvXMLImportPropertyMapper *pExtMapper=nullptr ); virtual ~XMLShapeImportHelper(); diff --git a/include/xmloff/styleexp.hxx b/include/xmloff/styleexp.hxx index 2482397932c7..1f4cb92995c8 100644 --- a/include/xmloff/styleexp.hxx +++ b/include/xmloff/styleexp.hxx @@ -75,7 +75,7 @@ protected: const OUString& rXMLFamily, const rtl::Reference < SvXMLExportPropertyMapper >& rPropMapper, const css::uno::Reference< css::container::XNameAccess > & xStyles, - const OUString* pPrefix = 0L ); + const OUString* pPrefix = nullptr ); virtual void exportStyleAttributes( const css::uno::Reference< css::style::XStyle > & rStyle ); @@ -86,7 +86,7 @@ public: XMLStyleExport( SvXMLExport& rExp, const OUString& rPoolStyleName, - SvXMLAutoStylePoolP *pAutoStyleP=0 ); + SvXMLAutoStylePoolP *pAutoStyleP=nullptr ); virtual ~XMLStyleExport(); // void exportStyleFamily( @@ -110,13 +110,13 @@ public: const OUString& rFamily, const OUString& rXMLFamily, const rtl::Reference < SvXMLExportPropertyMapper >& rPropMapper, bool bUsed, sal_uInt16 nFamily = 0, - const OUString* pPrefix = 0L); + const OUString* pPrefix = nullptr); void exportStyleFamily( const sal_Char *pFamily, const OUString& rXMLFamily, const rtl::Reference < SvXMLExportPropertyMapper >& rPropMapper, bool bUsed, sal_uInt16 nFamily = 0, - const OUString* pPrefix = 0L); + const OUString* pPrefix = nullptr); }; #endif diff --git a/include/xmloff/txtimp.hxx b/include/xmloff/txtimp.hxx index dd3afd774505..a4bfbd08cd34 100644 --- a/include/xmloff/txtimp.hxx +++ b/include/xmloff/txtimp.hxx @@ -485,7 +485,7 @@ public: const OUString& rTargetFrameName, const OUString& rStyleName, const OUString& rVisitedStyleName, - XMLEventsImportContext* pEvents = NULL); + XMLEventsImportContext* pEvents = nullptr); void SetRuby( SvXMLImport& rImport, const css::uno::Reference< css::text::XTextCursor >& rCursor, @@ -497,7 +497,7 @@ public: /// return -1 if style is not found /// (may return whether data style uses the system language) sal_Int32 GetDataStyleKey( const OUString& sStyleName, - bool* pIsSystemLanguage = NULL ); + bool* pIsSystemLanguage = nullptr ); const SvxXMLListStyleContext *FindAutoListStyle( const OUString& rName ) const; @@ -696,7 +696,7 @@ public: // forwards to TextListHelper; these are used in many places /// push a list context on the list context stack - void PushListContext(XMLTextListBlockContext *i_pListBlock = 0); + void PushListContext(XMLTextListBlockContext *i_pListBlock = nullptr); /// pop the list context stack void PopListContext(); diff --git a/include/xmloff/txtparae.hxx b/include/xmloff/txtparae.hxx index 3bf3427e1d22..f8f411cf7041 100644 --- a/include/xmloff/txtparae.hxx +++ b/include/xmloff/txtparae.hxx @@ -250,7 +250,7 @@ public: bool& rbHyperlink, bool& rbHasCharStyle, bool& rbHasAutoStyle, - const XMLPropertyState** pAddState = NULL) const; + const XMLPropertyState** pAddState = nullptr) const; bool addHyperlinkAttributes( const css::uno::Reference< css::beans::XPropertySet > & rPropSet, const css::uno::Reference< css::beans::XPropertyState > & rPropState, @@ -266,15 +266,15 @@ protected: XMLShapeExportFlags addTextFrameAttributes( const css::uno::Reference< css::beans::XPropertySet >& rPropSet, bool bShape, - OUString *pMinHeightValue = 0, - OUString *pMinWidthValue = 0 ); + OUString *pMinHeightValue = nullptr, + OUString *pMinWidthValue = nullptr ); virtual void exportStyleAttributes( const css::uno::Reference< css::style::XStyle > & rStyle ) override; void exportPageFrames( bool bAutoStyles, bool bProgress ); void exportFrameFrames( bool bAutoStyles, bool bProgress, - const css::uno::Reference< css::text::XTextFrame > *pParentTxtFrame = 0 ); + const css::uno::Reference< css::text::XTextFrame > *pParentTxtFrame = nullptr ); void exportNumStyles( bool bUsed ); @@ -294,7 +294,7 @@ protected: const css::uno::Reference< css::text::XTextSection > & rBaseSection, bool bProgress, bool bExportParagraph = true, - const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet = 0, + const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet = nullptr, bool bExportLevels = true, TextPNS eExtensionNS = TextPNS::ODF); void exportParagraph( @@ -321,7 +321,7 @@ protected: const css::uno::Reference< css::text::XTextContent > & rTextContent, FrameType eTxpe, bool bAutoStyles, bool bProgress, bool bExportContent, - const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet = 0 ); + const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet = nullptr ); void _exportTextFrame( const css::uno::Reference< css::beans::XPropertySet > & rPropSet, const css::uno::Reference< css::beans::XPropertySetInfo > & rPropSetInfo, @@ -329,11 +329,11 @@ protected: inline void exportTextFrame( const css::uno::Reference< css::text::XTextContent > & rTextContent, bool bAutoStyles, bool bProgress, bool bExportContent, - const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet = 0 ); + const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet = nullptr ); inline void exportShape( const css::uno::Reference< css::text::XTextContent > & rTextContent, bool bAutoStyles, - const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet = 0 ); + const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet = nullptr ); void exportContour( const css::uno::Reference< css::beans::XPropertySet > & rPropSet, @@ -344,7 +344,7 @@ protected: inline void exportTextGraphic( const css::uno::Reference< css::text::XTextContent > & rTextContent, bool bAutoStyles, - const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet = 0 ); + const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet = nullptr ); virtual void _collectTextEmbeddedAutoStyles( const css::uno::Reference< css::beans::XPropertySet > & rPropSet ); @@ -354,7 +354,7 @@ protected: inline void exportTextEmbedded( const css::uno::Reference< css::text::XTextContent > & rTextContent, bool bAutoStyles, - const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet = 0 ); + const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet = nullptr ); /// export a footnote and styles void exportTextFootnote( @@ -445,18 +445,18 @@ public: sal_uInt16 nFamily, MultiPropertySetHelper& rPropSetHelper, const css::uno::Reference< css::beans::XPropertySet > & rPropSet, - const XMLPropertyState** pAddState = NULL ); + const XMLPropertyState** pAddState = nullptr ); void Add( sal_uInt16 nFamily, const css::uno::Reference< css::beans::XPropertySet > & rPropSet, - const XMLPropertyState** pAddState = NULL, bool bDontSeek = false ); + const XMLPropertyState** pAddState = nullptr, bool bDontSeek = false ); /// find style name for specified family and parent OUString Find( sal_uInt16 nFamily, const css::uno::Reference< css::beans::XPropertySet > & rPropSet, const OUString& rParent, - const XMLPropertyState** pAddState = NULL ) const; + const XMLPropertyState** pAddState = nullptr ) const; static SvXMLExportPropertyMapper *CreateShapeExtPropMapper( SvXMLExport& rExport ); diff --git a/include/xmloff/unoatrcn.hxx b/include/xmloff/unoatrcn.hxx index 59c2c2026e3b..1f81e9171321 100644 --- a/include/xmloff/unoatrcn.hxx +++ b/include/xmloff/unoatrcn.hxx @@ -47,7 +47,7 @@ private: const; public: - SvUnoAttributeContainer( SvXMLAttrContainerData* pContainer = NULL ); + SvUnoAttributeContainer( SvXMLAttrContainerData* pContainer = nullptr ); virtual ~SvUnoAttributeContainer(); SvXMLAttrContainerData* GetContainerImpl() const { return mpContainer; } diff --git a/include/xmloff/xmlement.hxx b/include/xmloff/xmlement.hxx index 844230297009..3300a93f32c0 100644 --- a/include/xmloff/xmlement.hxx +++ b/include/xmloff/xmlement.hxx @@ -34,7 +34,7 @@ struct SvXMLEnumMapEntry #define ENUM_STRING_MAP_ENTRY(name,tok) { name, sizeof(name)-1, tok } -#define ENUM_STRING_MAP_END() { NULL, 0, 0 } +#define ENUM_STRING_MAP_END() { nullptr, 0, 0 } /** Map a const sal_Char* (with length) to a sal_uInt16 value. * To be used with SvXMLUnitConverter::convertEnum(...) diff --git a/include/xmloff/xmlexp.hxx b/include/xmloff/xmlexp.hxx index 7698d01b3490..fbf4a19d8fb9 100644 --- a/include/xmloff/xmlexp.hxx +++ b/include/xmloff/xmlexp.hxx @@ -491,7 +491,7 @@ public: const OUString& rEmbeddedObjectURL ); OUString EncodeStyleName( const OUString& rName, - bool *pEncoded=0 ) const; + bool *pEncoded=nullptr ) const; // save linked sections? inline bool IsSaveLinkedSections() { return mbSaveLinkedSections; } diff --git a/include/xmloff/xmlexppr.hxx b/include/xmloff/xmlexppr.hxx index ad44774845e9..78f0678440bf 100644 --- a/include/xmloff/xmlexppr.hxx +++ b/include/xmloff/xmlexppr.hxx @@ -87,7 +87,7 @@ protected: const SvXMLUnitConverter& rUnitConverter, const SvXMLNamespaceMap& rNamespaceMap, SvXmlExportFlags nFlags, - const ::std::vector< XMLPropertyState > *pProperties = 0, + const ::std::vector< XMLPropertyState > *pProperties = nullptr, sal_uInt32 nIdx = 0 ) const; void exportElementItems( @@ -152,7 +152,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; /** this method is called for every item that has the @@ -162,7 +162,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; const rtl::Reference<XMLPropertySetMapper>& getPropertySetMapper() const; diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx index 04a6e7223828..353b0ac2db67 100644 --- a/include/xmloff/xmlimp.hxx +++ b/include/xmloff/xmlimp.hxx @@ -175,10 +175,10 @@ protected: const ::css::uno::Reference< ::css::xml::sax::XFastAttributeList >& xAttrList ); virtual XMLTextImportHelper* CreateTextImport(); - inline void ClearTextImport() { mxTextImport = 0; } + inline void ClearTextImport() { mxTextImport = nullptr; } virtual XMLShapeImportHelper* CreateShapeImport(); inline bool HasShapeImport() const { return mxShapeImport.is(); } - inline void ClearShapeImport() { mxShapeImport = 0; } + inline void ClearShapeImport() { mxShapeImport = nullptr; } static SchXMLImportHelper* CreateChartImport(); ::xmloff::OFormLayerXMLImport* CreateFormImport(); @@ -571,7 +571,7 @@ inline css::uno::Reference< css::util::XNumberFormatsSupplier > & SvXMLImport::G inline SvXMLNumFmtHelper* SvXMLImport::GetDataStylesImport() { - if ( mpNumImport == NULL) + if ( mpNumImport == nullptr) _CreateDataStylesImport(); return mpNumImport; diff --git a/include/xmloff/xmlimppr.hxx b/include/xmloff/xmlimppr.hxx index 8469fe3f0df5..7878e27c2a46 100644 --- a/include/xmloff/xmlimppr.hxx +++ b/include/xmloff/xmlimppr.hxx @@ -111,7 +111,7 @@ public: bool FillPropertySet( const ::std::vector< XMLPropertyState >& rProperties, const css::uno::Reference< css::beans::XPropertySet >& rPropSet, - _ContextID_Index_Pair* pSpecialContextIds = NULL ) const; + _ContextID_Index_Pair* pSpecialContextIds = nullptr ) const; void FillPropertySequence( const ::std::vector< XMLPropertyState >& aProperties, @@ -134,7 +134,7 @@ public: // parameter for use by txtstyli.cxx; allows efficient // catching the combined characters property - _ContextID_Index_Pair* pSpecialContextIds = NULL ); + _ContextID_Index_Pair* pSpecialContextIds = nullptr ); /** implementation helper for FillPropertySet: fill an XMultiPropertySet. * If unsuccessul, set return value. */ @@ -146,7 +146,7 @@ public: // parameters for use by txtstyli.cxx; allows efficient // catching the combined characters property - _ContextID_Index_Pair* pSpecialContextIds = NULL ); + _ContextID_Index_Pair* pSpecialContextIds = nullptr ); /** implementation helper for FillPropertySet: fill an XTolerantMultiPropertySet. * If unsuccessul, set return value. */ @@ -158,7 +158,7 @@ public: // parameters for use by txtstyli.cxx; allows efficient // catching the combined characters property - _ContextID_Index_Pair* pSpecialContextIds = NULL ); + _ContextID_Index_Pair* pSpecialContextIds = nullptr ); static void _PrepareForMultiPropertySet( diff --git a/include/xmloff/xmluconv.hxx b/include/xmloff/xmluconv.hxx index 2074622d8864..31ba45faa815 100644 --- a/include/xmloff/xmluconv.hxx +++ b/include/xmloff/xmluconv.hxx @@ -211,7 +211,7 @@ public: const css::uno::Sequence<css::beans::PropertyValue>& aProps); OUString encodeStyleName( const OUString& rName, - bool *pEncoded=0 ) const; + bool *pEncoded=nullptr ) const; /** convert string (hex) to number (sal_uInt32) */ static bool convertHex( sal_uInt32& nVal, const OUString& rValue ); diff --git a/xmloff/inc/MultiPropertySetHelper.hxx b/xmloff/inc/MultiPropertySetHelper.hxx index f6a248d33ddb..35650f5bc278 100644 --- a/xmloff/inc/MultiPropertySetHelper.hxx +++ b/xmloff/inc/MultiPropertySetHelper.hxx @@ -163,7 +163,7 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XMultiPropertySet> & ); - inline void resetValues() { pValues = 0; } + inline void resetValues() { pValues = nullptr; } }; diff --git a/xmloff/inc/XMLChartPropertySetMapper.hxx b/xmloff/inc/XMLChartPropertySetMapper.hxx index 90e6db8d8dea..1f88294e187b 100644 --- a/xmloff/inc/XMLChartPropertySetMapper.hxx +++ b/xmloff/inc/XMLChartPropertySetMapper.hxx @@ -60,14 +60,14 @@ private: virtual void handleElementItem( 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; /// this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_EXPORT flag set virtual void handleSpecialItem( SvXMLAttributeList& rAttrList, 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; public: diff --git a/xmloff/inc/animationimport.hxx b/xmloff/inc/animationimport.hxx index 8e406e9e5f2c..68c225342e0c 100644 --- a/xmloff/inc/animationimport.hxx +++ b/xmloff/inc/animationimport.hxx @@ -46,7 +46,7 @@ public: sal_uInt16 nPrfx, const OUString& rLocalName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList, - AnimationsImportHelperImpl* mpImpl = NULL ); + AnimationsImportHelperImpl* mpImpl = nullptr ); virtual ~AnimationNodeContext(); virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ) override; diff --git a/xmloff/inc/txtflde.hxx b/xmloff/inc/txtflde.hxx index 6178b190a165..a3b723e3770c 100644 --- a/xmloff/inc/txtflde.hxx +++ b/xmloff/inc/txtflde.hxx @@ -164,7 +164,7 @@ public: XMLTextFieldExport( SvXMLExport& rExp, /// XMLPropertyState for the combined characters field - XMLPropertyState* pCombinedCharState = NULL ); + XMLPropertyState* pCombinedCharState = nullptr ); virtual ~XMLTextFieldExport(); /// Export this field and the surrounding span element with the formatting. diff --git a/xmloff/inc/txtlists.hxx b/xmloff/inc/txtlists.hxx index 2ae38bad595b..b204eab460b8 100644 --- a/xmloff/inc/txtlists.hxx +++ b/xmloff/inc/txtlists.hxx @@ -43,7 +43,7 @@ class XMLTextListsHelper : private boost::noncopyable /// list stack for importing: /// push a list context on the list context stack - void PushListContext(XMLTextListBlockContext *i_pListBlock = 0); + void PushListContext(XMLTextListBlockContext *i_pListBlock = nullptr); void PushListContext(XMLNumberedParaContext *i_pNumberedParagraph); /// pop the list context stack void PopListContext(); @@ -120,8 +120,8 @@ class XMLTextListsHelper : private boost::noncopyable const OUString& i_ParentStyleName, const OUString& i_StyleName, sal_Int16 & io_rLevel, - bool* o_pRestartNumbering = 0, - bool* io_pSetDefaults = 0); + bool* o_pRestartNumbering = nullptr, + bool* io_pSetDefaults = nullptr); private: diff --git a/xmloff/qa/unit/uxmloff.cxx b/xmloff/qa/unit/uxmloff.cxx index 9ebf5671646a..7fc606e248a9 100644 --- a/xmloff/qa/unit/uxmloff.cxx +++ b/xmloff/qa/unit/uxmloff.cxx @@ -39,7 +39,7 @@ private: }; Test::Test() - : pExport( NULL ) + : pExport( nullptr ) { } @@ -76,7 +76,7 @@ void Test::testAutoStylePool() OUString aName = xPool->Add( XML_STYLE_FAMILY_TEXT_PARAGRAPH, "", aProperties ); // not that interesting but worth checking - bool bHack = (getenv("LIBO_ONEWAY_STABLE_ODF_EXPORT") != NULL); + bool bHack = (getenv("LIBO_ONEWAY_STABLE_ODF_EXPORT") != nullptr); if (bHack) CPPUNIT_ASSERT_MESSAGE( "style / naming changed", aName == "Bob" ); else diff --git a/xmloff/source/chart/PropertyMap.hxx b/xmloff/source/chart/PropertyMap.hxx index 4a22c479ab7c..e44ccef921a9 100644 --- a/xmloff/source/chart/PropertyMap.hxx +++ b/xmloff/source/chart/PropertyMap.hxx @@ -93,7 +93,7 @@ #define MAP_CONTEXT( a, ns, nm, t, c ) { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART, c, SvtSaveOptions::ODFVER_010, false } #define MAP_SPECIAL( a, ns, nm, t, c ) { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART | MID_FLAG_SPECIAL_ITEM, c, SvtSaveOptions::ODFVER_010, false } #define MAP_SPECIAL_ODF12( a, ns, nm, t, c ) { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART | MID_FLAG_SPECIAL_ITEM, c, SvtSaveOptions::ODFVER_012, false } -#define MAP_ENTRY_END { 0,0,0,xmloff::token::XML_TOKEN_INVALID,0,0,SvtSaveOptions::ODFVER_010, false } +#define MAP_ENTRY_END { nullptr,0,0,xmloff::token::XML_TOKEN_INVALID,0,0,SvtSaveOptions::ODFVER_010, false } // PropertyMap for Chart properties drawing- and // textproperties are added later using the chaining diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx index 6b2f271fcce3..67011a5ccb6a 100644 --- a/xmloff/source/chart/PropertyMaps.cxx +++ b/xmloff/source/chart/PropertyMaps.cxx @@ -171,7 +171,7 @@ const XMLPropertyHandler* XMLChartPropHdlFactory::GetPropertyHandler( sal_Int32 pHdl = new XMLEnumPropertyHdl(aLineStyleMap, cppu::UnoType<drawing::LineStyle>::get()); break; case XML_SCH_TYPE_LABEL_BORDER_OPACITY: - pHdl = new XMLOpacityPropertyHdl(NULL); + pHdl = new XMLOpacityPropertyHdl(nullptr); break; default: ; diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx index 9f8a0dea35c3..8d30f0845024 100644 --- a/xmloff/source/chart/SchXMLAxisContext.cxx +++ b/xmloff/source/chart/SchXMLAxisContext.cxx @@ -634,7 +634,7 @@ SvXMLImportContext* SchXMLAxisContext::CreateChildContext( const OUString& rLocalName, const Reference< xml::sax::XAttributeList >& xAttrList ) { - SvXMLImportContext* pContext = 0; + SvXMLImportContext* pContext = nullptr; const SvXMLTokenMap& rTokenMap = theAxisChildTokenMap::get(); switch( rTokenMap.Get( p_nPrefix, rLocalName )) diff --git a/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx b/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx index 32f61b1babad..7bb876410044 100644 --- a/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx +++ b/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx @@ -53,7 +53,7 @@ SchXMLCalculationSettingsContext::SchXMLCalculationSettingsContext( SvXMLImport& { util::DateTime aNullDate; const OUString sValue = xAttrList->getValueByIndex( i ); - ::sax::Converter::parseDateTime(aNullDate, 0, sValue); + ::sax::Converter::parseDateTime(aNullDate, nullptr, sValue); m_aNullDate <<= aNullDate; } } diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx index 0637caa9285c..fa953f59dbc8 100644 --- a/xmloff/source/chart/SchXMLChartContext.cxx +++ b/xmloff/source/chart/SchXMLChartContext.cxx @@ -867,7 +867,7 @@ void SchXMLChartContext::EndElement() // set autostyles for series and data points const SvXMLStylesContext* pStylesCtxt = mrImportHelper.GetAutoStylesContext(); - const SvXMLStyleContext* pStyle = NULL; + const SvXMLStyleContext* pStyle = nullptr; OUString sCurrStyleName; if( pStylesCtxt ) @@ -993,7 +993,7 @@ SvXMLImportContext* SchXMLChartContext::CreateChildContext( const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) { - SvXMLImportContext* pContext = 0; + SvXMLImportContext* pContext = nullptr; const SvXMLTokenMap& rTokenMap = mrImportHelper.GetChartElemTokenMap(); uno::Reference< chart::XChartDocument > xDoc = mrImportHelper.GetChartDocument(); uno::Reference< beans::XPropertySet > xProp( xDoc, uno::UNO_QUERY ); @@ -1115,10 +1115,10 @@ void SchXMLChartContext::InitChart( uno::Reference< chart2::XChartDocument > xNewDoc( mrImportHelper.GetChartDocument(), uno::UNO_QUERY ); if( xNewDoc.is()) { - xNewDoc->setFirstDiagram( 0 ); + xNewDoc->setFirstDiagram( nullptr ); uno::Reference< chart2::XTitled > xTitled( xNewDoc, uno::UNO_QUERY ); if( xTitled.is()) - xTitled->setTitleObject( 0 ); + xTitled->setTitleObject( nullptr ); } // Set the chart type via setting the diagram. @@ -1211,7 +1211,7 @@ SvXMLImportContext* SchXMLTitleContext::CreateChildContext( const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& ) { - SvXMLImportContext* pContext = 0; + SvXMLImportContext* pContext = nullptr; if( (nPrefix == XML_NAMESPACE_TEXT || nPrefix == XML_NAMESPACE_LO_EXT) && diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index d7e02b83b873..74a2ee3df26d 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -1193,7 +1193,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >& SvXMLElementExport aSet( mrExport, XML_NAMESPACE_TABLE, XML_CALCULATION_SETTINGS, true, true ); { OUStringBuffer sBuffer; - ::sax::Converter::convertDateTime(sBuffer, aNullDate, 0); + ::sax::Converter::convertDateTime(sBuffer, aNullDate, nullptr); mrExport.AddAttribute( XML_NAMESPACE_TABLE,XML_DATE_VALUE,sBuffer.makeStringAndClear()); SvXMLElementExport aNull( mrExport, XML_NAMESPACE_TABLE, XML_NULL_DATE, true, true ); } @@ -2292,7 +2292,7 @@ void SchXMLExportHelper_Impl::exportAxis( bool bExportContent ) { std::vector< XMLPropertyState > aPropertyStates; - SvXMLElementExport* pAxis = NULL; + SvXMLElementExport* pAxis = nullptr; // get property states for autostyles if( rAxisProps.is() && mxExpPropMapper.is() ) @@ -2337,9 +2337,9 @@ void SchXMLExportHelper_Impl::exportAxis( Reference< chart::XAxis > xAxis( rAxisProps, uno::UNO_QUERY ); if( xAxis.is() ) { - xTitleProps = bHasTitle ? xAxis->getAxisTitle() : 0; - xMajorGridProps = bHasMajorGrid ? xAxis->getMajorGrid() : 0; - xMinorGridProps = bHasMinorGrid ? xAxis->getMinorGrid() : 0; + xTitleProps = bHasTitle ? xAxis->getAxisTitle() : nullptr; + xMajorGridProps = bHasMajorGrid ? xAxis->getMajorGrid() : nullptr; + xMinorGridProps = bHasMinorGrid ? xAxis->getMinorGrid() : nullptr; } // axis-title @@ -2360,7 +2360,7 @@ void SchXMLExportHelper_Impl::exportAxis( { //close axis element delete pAxis; - pAxis = NULL; + pAxis = nullptr; } } @@ -2431,7 +2431,7 @@ void SchXMLExportHelper_Impl::exportAxes( Reference< ::com::sun::star::chart2::XAxis > xNewAxis = lcl_getAxis( xCooSys, XML_X ); if( xNewAxis.is() ) { - Reference< beans::XPropertySet > xAxisProps( xAxisSupp.is() ? xAxisSupp->getAxis(0) : 0, uno::UNO_QUERY ); + Reference< beans::XPropertySet > xAxisProps( xAxisSupp.is() ? xAxisSupp->getAxis(0) : nullptr, uno::UNO_QUERY ); if( mbHasCategoryLabels && bExportContent ) { Reference< chart2::data::XLabeledDataSequence > xCategories( lcl_getCategories( xNewDiagram ) ); @@ -2456,7 +2456,7 @@ void SchXMLExportHelper_Impl::exportAxes( xNewAxis = lcl_getAxis( xCooSys, XML_X, false ); if( xNewAxis.is() ) { - Reference< beans::XPropertySet > xAxisProps( xAxisSupp.is() ? xAxisSupp->getSecondaryAxis(0) : 0, uno::UNO_QUERY ); + Reference< beans::XPropertySet > xAxisProps( xAxisSupp.is() ? xAxisSupp->getSecondaryAxis(0) : nullptr, uno::UNO_QUERY ); exportAxis( XML_X, XML_SECONDARY_X, xAxisProps, xNewAxis, aCategoriesRange, bHasSecondaryXAxisTitle, false, false, bExportContent ); } @@ -2465,7 +2465,7 @@ void SchXMLExportHelper_Impl::exportAxes( xNewAxis = lcl_getAxis( xCooSys, XML_Y ); if( xNewAxis.is() ) { - Reference< beans::XPropertySet > xAxisProps( xAxisSupp.is() ? xAxisSupp->getAxis(1) : 0, uno::UNO_QUERY ); + Reference< beans::XPropertySet > xAxisProps( xAxisSupp.is() ? xAxisSupp->getAxis(1) : nullptr, uno::UNO_QUERY ); exportAxis( XML_Y, XML_PRIMARY_Y, xAxisProps, xNewAxis, aCategoriesRange, bHasYAxisTitle, bHasYAxisMajorGrid, bHasYAxisMinorGrid, bExportContent ); } @@ -2474,7 +2474,7 @@ void SchXMLExportHelper_Impl::exportAxes( xNewAxis = lcl_getAxis( xCooSys, XML_Y, false ); if( xNewAxis.is() ) { - Reference< beans::XPropertySet > xAxisProps( xAxisSupp.is() ? xAxisSupp->getSecondaryAxis(1) : 0, uno::UNO_QUERY ); + Reference< beans::XPropertySet > xAxisProps( xAxisSupp.is() ? xAxisSupp->getSecondaryAxis(1) : nullptr, uno::UNO_QUERY ); exportAxis( XML_Y, XML_SECONDARY_Y, xAxisProps, xNewAxis, aCategoriesRange, bHasSecondaryYAxisTitle, false, false, bExportContent ); } @@ -2483,7 +2483,7 @@ void SchXMLExportHelper_Impl::exportAxes( xNewAxis = lcl_getAxis( xCooSys, XML_Z ); if( xNewAxis.is() ) { - Reference< beans::XPropertySet > xAxisProps( xAxisSupp.is() ? xAxisSupp->getAxis(2) : 0, uno::UNO_QUERY ); + Reference< beans::XPropertySet > xAxisProps( xAxisSupp.is() ? xAxisSupp->getAxis(2) : nullptr, uno::UNO_QUERY ); exportAxis( XML_Z, XML_PRIMARY_Z, xAxisProps, xNewAxis, aCategoriesRange, bHasZAxisTitle, bHasZAxisMajorGrid, bHasZAxisMinorGrid, bExportContent ); } } @@ -2602,7 +2602,7 @@ void SchXMLExportHelper_Impl::exportSeries( Reference< chart2::data::XDataSource > xSource( aSeriesSeq[nSeriesIdx], uno::UNO_QUERY ); if( xSource.is()) { - SvXMLElementExport* pSeries = NULL; + SvXMLElementExport* pSeries = nullptr; Sequence< Reference< chart2::data::XLabeledDataSequence > > aSeqCnt( xSource->getDataSequences()); sal_Int32 nMainSequenceIndex = -1; @@ -2771,7 +2771,7 @@ void SchXMLExportHelper_Impl::exportSeries( { xYValuesForBubbleChart = xSequence->getValues(); if( !lcl_exportDomainForThisSequence( xYValuesForBubbleChart, aFirstYDomainRange, mrExport ) ) - xYValuesForBubbleChart = 0; + xYValuesForBubbleChart = nullptr; } } if( bIsScatterChart || bIsBubbleChart ) @@ -3160,7 +3160,7 @@ void SchXMLExportHelper_Impl::exportCandleStickSeries( mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_ATTACHED_AXIS, XML_PRIMARY_Y ); SvXMLElementExport aOpenSeries( mrExport, XML_NAMESPACE_CHART, XML_SERIES, true, true ); // export empty data points - exportDataPoints( 0, nSeriesLength, xDiagram, bExportContent ); + exportDataPoints( nullptr, nSeriesLength, xDiagram, bExportContent ); } // low @@ -3177,7 +3177,7 @@ void SchXMLExportHelper_Impl::exportCandleStickSeries( mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_ATTACHED_AXIS, XML_PRIMARY_Y ); SvXMLElementExport aLowSeries( mrExport, XML_NAMESPACE_CHART, XML_SERIES, true, true ); // export empty data points - exportDataPoints( 0, nSeriesLength, xDiagram, bExportContent ); + exportDataPoints( nullptr, nSeriesLength, xDiagram, bExportContent ); } // high @@ -3194,7 +3194,7 @@ void SchXMLExportHelper_Impl::exportCandleStickSeries( mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_ATTACHED_AXIS, XML_PRIMARY_Y ); SvXMLElementExport aHighSeries( mrExport, XML_NAMESPACE_CHART, XML_SERIES, true, true ); // export empty data points - exportDataPoints( 0, nSeriesLength, xDiagram, bExportContent ); + exportDataPoints( nullptr, nSeriesLength, xDiagram, bExportContent ); } // close @@ -3211,7 +3211,7 @@ void SchXMLExportHelper_Impl::exportCandleStickSeries( mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_ATTACHED_AXIS, XML_PRIMARY_Y ); SvXMLElementExport aCloseSeries( mrExport, XML_NAMESPACE_CHART, XML_SERIES, true, true ); // export empty data points - exportDataPoints( 0, nSeriesLength, xDiagram, bExportContent ); + exportDataPoints( nullptr, nSeriesLength, xDiagram, bExportContent ); } } else // autostyles diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx index d144a650f899..1190674642be 100644 --- a/xmloff/source/chart/SchXMLImport.cxx +++ b/xmloff/source/chart/SchXMLImport.cxx @@ -84,21 +84,21 @@ private: // attribute maps SchXMLImportHelper::SchXMLImportHelper() : - mpAutoStyles( 0 ), + mpAutoStyles( nullptr ), - mpChartDocElemTokenMap( 0 ), - mpTableElemTokenMap( 0 ), - mpChartElemTokenMap( 0 ), - mpPlotAreaElemTokenMap( 0 ), - mpSeriesElemTokenMap( 0 ), + mpChartDocElemTokenMap( nullptr ), + mpTableElemTokenMap( nullptr ), + mpChartElemTokenMap( nullptr ), + mpPlotAreaElemTokenMap( nullptr ), + mpSeriesElemTokenMap( nullptr ), - mpChartAttrTokenMap( 0 ), - mpPlotAreaAttrTokenMap( 0 ), - mpAutoStyleAttrTokenMap( 0 ), - mpCellAttrTokenMap( 0 ), - mpSeriesAttrTokenMap( 0 ), - mpPropMappingAttrTokenMap( 0 ), - mpRegEquationAttrTokenMap( 0 ) + mpChartAttrTokenMap( nullptr ), + mpPlotAreaAttrTokenMap( nullptr ), + mpAutoStyleAttrTokenMap( nullptr ), + mpCellAttrTokenMap( nullptr ), + mpSeriesAttrTokenMap( nullptr ), + mpPropMappingAttrTokenMap( nullptr ), + mpRegEquationAttrTokenMap( nullptr ) { } @@ -125,7 +125,7 @@ SvXMLImportContext* SchXMLImportHelper::CreateChartContext( const Reference< frame::XModel >& rChartModel, const Reference< xml::sax::XAttributeList >& ) { - SvXMLImportContext* pContext = 0; + SvXMLImportContext* pContext = nullptr; Reference< chart::XChartDocument > xDoc( rChartModel, uno::UNO_QUERY ); if( xDoc.is()) @@ -533,7 +533,7 @@ SchXMLImport::~SchXMLImport() throw () SvXMLImportContext *SchXMLImport::CreateContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList >& xAttrList ) { - SvXMLImportContext* pContext = 0; + SvXMLImportContext* pContext = nullptr; // accept <office:document> if( XML_NAMESPACE_OFFICE == nPrefix && diff --git a/xmloff/source/chart/SchXMLParagraphContext.hxx b/xmloff/source/chart/SchXMLParagraphContext.hxx index 1fa28cee100c..b49272a362af 100644 --- a/xmloff/source/chart/SchXMLParagraphContext.hxx +++ b/xmloff/source/chart/SchXMLParagraphContext.hxx @@ -38,7 +38,7 @@ public: SchXMLParagraphContext( SvXMLImport& rImport, const OUString& rLocalName, OUString& rText, - OUString * pOutId = 0 ); + OUString * pOutId = nullptr ); virtual ~SchXMLParagraphContext(); virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ) override; virtual void EndElement() override; diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index 9f5b9c0d79b7..a21f7a5f8c06 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx @@ -422,7 +422,7 @@ SvXMLImportContext* SchXMLPlotAreaContext::CreateChildContext( const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) { - SvXMLImportContext* pContext = 0; + SvXMLImportContext* pContext = nullptr; const SvXMLTokenMap& rTokenMap = mrImportHelper.GetPlotAreaElemTokenMap(); switch( rTokenMap.Get( nPrefix, rLocalName )) @@ -1203,7 +1203,7 @@ SvXMLImportContext* SchXMLStatisticsObjectContext::CreateChildContext( const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) { - SvXMLImportContext* pContext = 0; + SvXMLImportContext* pContext = nullptr; pContext = SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); return pContext; } diff --git a/xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx b/xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx index 8b723e371a9e..d8a765fe9015 100644 --- a/xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx +++ b/xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx @@ -89,7 +89,7 @@ SvXMLImportContext* SchXMLRegressionCurveObjectContext::CreateChildContext( const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) { - SvXMLImportContext* pContext = 0; + SvXMLImportContext* pContext = nullptr; if( nPrefix == XML_NAMESPACE_CHART && IsXMLToken( rLocalName, XML_EQUATION ) ) { diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx index 871797e34052..4f23d1508f83 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.cxx +++ b/xmloff/source/chart/SchXMLSeries2Context.cxx @@ -270,12 +270,12 @@ SchXMLSeries2Context::SchXMLSeries2Context( mrAxes( rAxes ), mrStyleList( rStyleList ), mrRegressionStyleList( rRegressionStyleList ), - m_xSeries(0), + m_xSeries(nullptr), mnSeriesIndex( nSeriesIndex ), mnDataPointIndex( 0 ), m_bStockHasVolume( bStockHasVolume ), m_rGlobalSeriesImportInfo(rGlobalSeriesImportInfo), - mpAttachedAxis( NULL ), + mpAttachedAxis( nullptr ), mnAttachedAxis( 0 ), maGlobalChartTypeName( aGlobalChartTypeName ), maSeriesChartTypeName( aGlobalChartTypeName ), @@ -639,7 +639,7 @@ SvXMLImportContext* SchXMLSeries2Context::CreateChildContext( const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& ) { - SvXMLImportContext* pContext = 0; + SvXMLImportContext* pContext = nullptr; const SvXMLTokenMap& rTokenMap = mrImportHelper.GetSeriesElemTokenMap(); switch( rTokenMap.Get( nPrefix, rLocalName )) @@ -879,7 +879,7 @@ void SchXMLSeries2Context::setStylesToRegressionCurves( try { OUString aServiceName; - XMLPropStyleContext* pPropStyleContext = NULL; + XMLPropStyleContext* pPropStyleContext = nullptr; if (!rCurrentStyleName.isEmpty()) { @@ -918,7 +918,7 @@ void SchXMLSeries2Context::setStylesToRegressionCurves( if( xRegCurve.is()) { Reference< beans::XPropertySet > xCurveProperties( xRegCurve, uno::UNO_QUERY ); - if( pPropStyleContext != NULL) + if( pPropStyleContext != nullptr) pPropStyleContext->FillPropertySet( xCurveProperties ); xRegCurve->setEquationProperties( iStyle->m_xEquationProperties ); diff --git a/xmloff/source/chart/SchXMLSeriesHelper.cxx b/xmloff/source/chart/SchXMLSeriesHelper.cxx index b2024ff90ed2..e2edd3f725a3 100644 --- a/xmloff/source/chart/SchXMLSeriesHelper.cxx +++ b/xmloff/source/chart/SchXMLSeriesHelper.cxx @@ -96,7 +96,7 @@ uno::Reference< chart2::XChartType > lcl_getChartTypeOfSeries( , const Reference< chart2::XDataSeries >& xSeries ) { if(!xDiagram.is()) - return 0; + return nullptr; //iterate through the model to find the given xSeries //the found parent indicates the charttype @@ -104,7 +104,7 @@ uno::Reference< chart2::XChartType > lcl_getChartTypeOfSeries( //iterate through all coordinate systems uno::Reference< chart2::XCoordinateSystemContainer > xCooSysContainer( xDiagram, uno::UNO_QUERY ); if( !xCooSysContainer.is()) - return 0; + return nullptr; uno::Sequence< uno::Reference< chart2::XCoordinateSystem > > aCooSysList( xCooSysContainer->getCoordinateSystems() ); for( sal_Int32 nCS = 0; nCS < aCooSysList.getLength(); ++nCS ) @@ -137,7 +137,7 @@ uno::Reference< chart2::XChartType > lcl_getChartTypeOfSeries( } } } - return 0; + return nullptr; } } diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx index dea1a00f6a06..a895c8e13da6 100644 --- a/xmloff/source/chart/SchXMLTableContext.cxx +++ b/xmloff/source/chart/SchXMLTableContext.cxx @@ -237,7 +237,7 @@ SvXMLImportContext *SchXMLTableContext::CreateChildContext( const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& ) { - SvXMLImportContext* pContext = 0; + SvXMLImportContext* pContext = nullptr; const SvXMLTokenMap& rTokenMap = mrImportHelper.GetTableElemTokenMap(); switch( rTokenMap.Get( nPrefix, rLocalName )) @@ -426,7 +426,7 @@ SvXMLImportContext* SchXMLTableColumnsContext::CreateChildContext( const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& ) { - SvXMLImportContext* pContext = 0; + SvXMLImportContext* pContext = nullptr; if( nPrefix == XML_NAMESPACE_TABLE && IsXMLToken( rLocalName, XML_TABLE_COLUMN ) ) @@ -520,7 +520,7 @@ SvXMLImportContext* SchXMLTableRowsContext::CreateChildContext( const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& ) { - SvXMLImportContext* pContext = 0; + SvXMLImportContext* pContext = nullptr; if( nPrefix == XML_NAMESPACE_TABLE && IsXMLToken( rLocalName, XML_TABLE_ROW ) ) @@ -563,7 +563,7 @@ SvXMLImportContext* SchXMLTableRowContext::CreateChildContext( const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& ) { - SvXMLImportContext* pContext = 0; + SvXMLImportContext* pContext = nullptr; // <table:table-cell> element if( nPrefix == XML_NAMESPACE_TABLE && @@ -676,7 +676,7 @@ SvXMLImportContext* SchXMLTableCellContext::CreateChildContext( const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& ) { - SvXMLImportContext* pContext = 0; + SvXMLImportContext* pContext = nullptr; // <text:list> element if( nPrefix == XML_NAMESPACE_TEXT && IsXMLToken( rLocalName, XML_LIST ) && mbReadText ) diff --git a/xmloff/source/chart/SchXMLTextListContext.cxx b/xmloff/source/chart/SchXMLTextListContext.cxx index 632df793811a..786200b9e81d 100644 --- a/xmloff/source/chart/SchXMLTextListContext.cxx +++ b/xmloff/source/chart/SchXMLTextListContext.cxx @@ -71,7 +71,7 @@ SvXMLImportContext* SchXMLListItemContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& ) { - SvXMLImportContext* pContext = 0; + SvXMLImportContext* pContext = nullptr; if( (nPrefix == XML_NAMESPACE_TEXT || nPrefix == XML_NAMESPACE_LO_EXT) && IsXMLToken( rLocalName, XML_P ) ) pContext = new SchXMLParagraphContext( GetImport(), rLocalName, m_rText ); @@ -110,7 +110,7 @@ SvXMLImportContext* SchXMLTextListContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& ) { - SvXMLImportContext* pContext = 0; + SvXMLImportContext* pContext = nullptr; if( nPrefix == XML_NAMESPACE_TEXT && IsXMLToken( rLocalName, XML_LIST_ITEM ) ) { m_aTextVector.push_back( OUString() ); diff --git a/xmloff/source/chart/SchXMLTools.hxx b/xmloff/source/chart/SchXMLTools.hxx index ed21ea23932c..004a2ab16bee 100644 --- a/xmloff/source/chart/SchXMLTools.hxx +++ b/xmloff/source/chart/SchXMLTools.hxx @@ -97,7 +97,7 @@ namespace SchXMLTools const OUString & rRangeAddress, sal_Int32 nCooSysIndex, sal_Int32 nDimensionIndex, - tSchXMLLSequencesPerIndex * pLSequencesPerIndex = 0 ); + tSchXMLLSequencesPerIndex * pLSequencesPerIndex = nullptr ); ::com::sun::star::uno::Any getPropertyFromContext( const OUString& rPropertyName, const XMLPropStyleContext * pPropStyleContext, const SvXMLStylesContext* pStylesCtxt ); diff --git a/xmloff/source/chart/XMLChartPropertyContext.cxx b/xmloff/source/chart/XMLChartPropertyContext.cxx index ce1b2ea5a22c..fb2c3c01f69a 100644 --- a/xmloff/source/chart/XMLChartPropertyContext.cxx +++ b/xmloff/source/chart/XMLChartPropertyContext.cxx @@ -49,7 +49,7 @@ SvXMLImportContext* XMLChartPropertyContext::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/chart/XMLChartStyleContext.cxx b/xmloff/source/chart/XMLChartStyleContext.cxx index b308c6597280..14517754e86e 100644 --- a/xmloff/source/chart/XMLChartStyleContext.cxx +++ b/xmloff/source/chart/XMLChartStyleContext.cxx @@ -115,7 +115,7 @@ SvXMLImportContext *XMLChartStyleContext::CreateChildContext( const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & xAttrList ) { - SvXMLImportContext* pContext = NULL; + SvXMLImportContext* pContext = nullptr; if( XML_NAMESPACE_STYLE == nPrefix || XML_NAMESPACE_LO_EXT == nPrefix ) { diff --git a/xmloff/source/chart/XMLLabelSeparatorContext.cxx b/xmloff/source/chart/XMLLabelSeparatorContext.cxx index bf7a9c3e043a..49eb4f5da6c6 100644 --- a/xmloff/source/chart/XMLLabelSeparatorContext.cxx +++ b/xmloff/source/chart/XMLLabelSeparatorContext.cxx @@ -52,7 +52,7 @@ SvXMLImportContext* XMLLabelSeparatorContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & /*xAttrList*/ ) { - SvXMLImportContext* pContext = NULL; + SvXMLImportContext* pContext = nullptr; if( xmloff::token::IsXMLToken( rLocalName, xmloff::token::XML_P ) ) { pContext = new SchXMLParagraphContext( GetImport(), diff --git a/xmloff/source/chart/XMLSymbolImageContext.cxx b/xmloff/source/chart/XMLSymbolImageContext.cxx index b448b922ae4a..92efdfc22336 100644 --- a/xmloff/source/chart/XMLSymbolImageContext.cxx +++ b/xmloff/source/chart/XMLSymbolImageContext.cxx @@ -94,7 +94,7 @@ SvXMLImportContext* XMLSymbolImageContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & xAttrList ) { - SvXMLImportContext* pContext = NULL; + SvXMLImportContext* pContext = nullptr; if( xmloff::token::IsXMLToken( rLocalName, xmloff::token::XML_BINARY_DATA ) ) { @@ -126,7 +126,7 @@ void XMLSymbolImageContext::EndElement() else if( mxBase64Stream.is() ) { sResolvedURL = GetImport().ResolveGraphicObjectURLFromBase64( mxBase64Stream ); - mxBase64Stream = 0; + mxBase64Stream = nullptr; } if( !sResolvedURL.isEmpty()) diff --git a/xmloff/source/chart/contexts.cxx b/xmloff/source/chart/contexts.cxx index e2ec978443a1..0090195b228d 100644 --- a/xmloff/source/chart/contexts.cxx +++ b/xmloff/source/chart/contexts.cxx @@ -93,7 +93,7 @@ SvXMLImportContext* SchXMLDocContext::CreateChildContext( const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) { - SvXMLImportContext* pContext = 0; + SvXMLImportContext* pContext = nullptr; const SvXMLTokenMap& rTokenMap = mrImportHelper.GetDocElemTokenMap(); SvXMLImportFlags nFlags = GetImport().getImportFlags(); @@ -182,7 +182,7 @@ SvXMLImportContext* SchXMLBodyContext::CreateChildContext( const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) { - SvXMLImportContext* pContext = 0; + SvXMLImportContext* pContext = nullptr; // <chart:chart> element if( nPrefix == XML_NAMESPACE_CHART && diff --git a/xmloff/source/chart/transporttypes.hxx b/xmloff/source/chart/transporttypes.hxx index cea1ece5cdff..c32a5428e213 100644 --- a/xmloff/source/chart/transporttypes.hxx +++ b/xmloff/source/chart/transporttypes.hxx @@ -201,7 +201,7 @@ struct DataRowPointStyle , sal_Int32 nAttachedAxis = 0 ) : meType( eType ), m_xSeries( xSeries ), - m_xOldAPISeries( 0 ), + m_xOldAPISeries( nullptr ), m_nPointIndex( nPointIndex ), m_nPointRepeat( nPointRepeat ), msStyleName( sStyleName ), diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx index 1800cdf47a9c..ead1ffdbd319 100644 --- a/xmloff/source/core/DocumentSettingsContext.cxx +++ b/xmloff/source/core/DocumentSettingsContext.cxx @@ -228,7 +228,7 @@ SvXMLImportContext *CreateSettingsContext(SvXMLImport& rImport, sal_uInt16 p_nPr const uno::Reference<xml::sax::XAttributeList>& xAttrList, beans::PropertyValue& rProp, XMLConfigBaseContext* pBaseContext) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; rProp.Name.clear(); sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; @@ -305,7 +305,7 @@ SvXMLImportContext *XMLDocumentSettingsContext::CreateChildContext( sal_uInt16 p const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; OUString sName; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; @@ -338,12 +338,12 @@ SvXMLImportContext *XMLDocumentSettingsContext::CreateChildContext( sal_uInt16 p if (IsXMLToken(aLocalConfigName, XML_VIEW_SETTINGS)) pContext = new XMLConfigItemSetContext(GetImport(), p_nPrefix, rLocalName, xAttrList, - m_pData->aViewProps, NULL); + m_pData->aViewProps, nullptr); else if (IsXMLToken(aLocalConfigName, XML_CONFIGURATION_SETTINGS)) pContext = new XMLConfigItemSetContext(GetImport(), p_nPrefix, rLocalName, xAttrList, - m_pData->aConfigProps, NULL); + m_pData->aConfigProps, nullptr); else { m_pData->aDocSpecificSettings.push_back( SettingsGroup( aLocalConfigName, uno::Any() ) ); @@ -353,7 +353,7 @@ SvXMLImportContext *XMLDocumentSettingsContext::CreateChildContext( sal_uInt16 p pContext = new XMLConfigItemSetContext(GetImport(), p_nPrefix, rLocalName, xAttrList, - settingsPos->aSettings, NULL); + settingsPos->aSettings, nullptr); } } } @@ -602,7 +602,7 @@ void XMLConfigItemContext::EndElement() else if (IsXMLToken(msType, XML_DATETIME)) { util::DateTime aDateTime; - ::sax::Converter::parseDateTime(aDateTime, 0, msValue); + ::sax::Converter::parseDateTime(aDateTime, nullptr, msValue); mrAny <<= aDateTime; } else if (IsXMLToken(msType, XML_BASE64BINARY)) diff --git a/xmloff/source/core/DomBuilderContext.cxx b/xmloff/source/core/DomBuilderContext.cxx index 77dfda09a611..75131e6c12a4 100644 --- a/xmloff/source/core/DomBuilderContext.cxx +++ b/xmloff/source/core/DomBuilderContext.cxx @@ -126,7 +126,7 @@ void DomBuilderContext::StartElement( OUString sNamespace; sal_uInt16 nNamespaceKey = GetImport().GetNamespaceMap()._GetKeyByAttrName( - rName, NULL, NULL, &sNamespace ); + rName, nullptr, nullptr, &sNamespace ); // create attribute node and set value Reference<XElement> xElement( mxNode, UNO_QUERY_THROW ); diff --git a/xmloff/source/core/RDFaExportHelper.cxx b/xmloff/source/core/RDFaExportHelper.cxx index bfce90499f81..42a25f024191 100644 --- a/xmloff/source/core/RDFaExportHelper.cxx +++ b/xmloff/source/core/RDFaExportHelper.cxx @@ -95,7 +95,7 @@ getRelativeReference(SvXMLExport const& rExport, OUString const& rURI) } RDFaExportHelper::RDFaExportHelper(SvXMLExport & i_rExport) - : m_rExport(i_rExport), m_xRepository(0), m_Counter(0) + : m_rExport(i_rExport), m_xRepository(nullptr), m_Counter(0) { const uno::Reference<rdf::XRepositorySupplier> xRS( m_rExport.GetModel(), uno::UNO_QUERY); diff --git a/xmloff/source/core/RDFaImportHelper.cxx b/xmloff/source/core/RDFaImportHelper.cxx index d2705e557260..96d784deb850 100644 --- a/xmloff/source/core/RDFaImportHelper.cxx +++ b/xmloff/source/core/RDFaImportHelper.cxx @@ -275,7 +275,7 @@ RDFaInserter::MakeURI( OUString const & i_rURI) const if (i_rURI.startsWith("_:")) // blank node { SAL_INFO("xmloff.core", "MakeURI: cannot create URI for blank node"); - return 0; + return nullptr; } else { @@ -286,7 +286,7 @@ RDFaInserter::MakeURI( OUString const & i_rURI) const catch (uno::Exception &) { SAL_WARN("xmloff.core", "MakeURI: cannot create URI"); - return 0; + return nullptr; } } } diff --git a/xmloff/source/core/SettingsExportHelper.cxx b/xmloff/source/core/SettingsExportHelper.cxx index 5bba8272628c..8b775aa8dd53 100644 --- a/xmloff/source/core/SettingsExportHelper.cxx +++ b/xmloff/source/core/SettingsExportHelper.cxx @@ -267,7 +267,7 @@ void XMLSettingsExportHelper::exportDateTime(const util::DateTime& aValue, const m_rContext.AddAttribute( XML_NAME, rName ); m_rContext.AddAttribute( XML_TYPE, XML_DATETIME ); OUStringBuffer sBuffer; - ::sax::Converter::convertDateTime(sBuffer, aValue, 0); + ::sax::Converter::convertDateTime(sBuffer, aValue, nullptr); m_rContext.StartElement( XML_CONFIG_ITEM, true ); m_rContext.Characters( sBuffer.makeStringAndClear() ); m_rContext.EndElement( false ); diff --git a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx index 8b597d5bfa3b..f17c59146951 100644 --- a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx +++ b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx @@ -65,7 +65,7 @@ const XMLServiceMapEntry_Impl aServiceMap[] = SERVICE_MAP_ENTRY( GRAPHICS, DRAW ), SERVICE_MAP_ENTRY( PRESENTATION, IMPRESS ), SERVICE_MAP_ENTRY( CHART, CHART ), - { XML_TOKEN_INVALID, 0, 0 } + { XML_TOKEN_INVALID, nullptr, 0 } }; class XMLEmbeddedObjectImportContext_Impl : public SvXMLImportContext @@ -213,7 +213,7 @@ XMLEmbeddedObjectImportContext::XMLEmbeddedObjectImportContext( "application/x-vnd.oasis.openoffice.", "application/vnd.oasis.opendocument.", "application/x-vnd.oasis.opendocument.", - NULL + nullptr }; for (int k=0; aTmp[k]; k++) { diff --git a/xmloff/source/core/attrlist.cxx b/xmloff/source/core/attrlist.cxx index 148b23e99cb4..f28a75c04fca 100644 --- a/xmloff/source/core/attrlist.cxx +++ b/xmloff/source/core/attrlist.cxx @@ -259,7 +259,7 @@ SvXMLAttributeList* SvXMLAttributeList::getImplementation( uno::Reference< uno:: xUT->getSomething( SvXMLAttributeList::getUnoTunnelId()))); } else - return NULL; + return nullptr; } // XUnoTunnel diff --git a/xmloff/source/core/facreg.cxx b/xmloff/source/core/facreg.cxx index be929c2f78a2..c9dbf27ddc57 100644 --- a/xmloff/source/core/facreg.cxx +++ b/xmloff/source/core/facreg.cxx @@ -49,7 +49,7 @@ extern "C" XMLOFF_DLLPUBLIC void * SAL_CALL xo_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { - void * pRet = 0; + void * pRet = nullptr; if( pServiceManager ) { uno::Reference< lang::XMultiServiceFactory > xMSF( static_cast< lang::XMultiServiceFactory * >( pServiceManager ) ); diff --git a/xmloff/source/core/nmspmap.cxx b/xmloff/source/core/nmspmap.cxx index 77fe129e1587..c5bfce108572 100644 --- a/xmloff/source/core/nmspmap.cxx +++ b/xmloff/source/core/nmspmap.cxx @@ -274,7 +274,7 @@ sal_uInt16 SvXMLNamespaceMap::_GetKeyByAttrName( OUString *pLocalName, bool bCache) const { - return _GetKeyByAttrName( rAttrName, 0, pLocalName, 0, bCache ); + return _GetKeyByAttrName( rAttrName, nullptr, pLocalName, nullptr, bCache ); } sal_uInt16 SvXMLNamespaceMap::_GetKeyByAttrName( const OUString& rAttrName, @@ -430,7 +430,7 @@ sal_uInt16 SvXMLNamespaceMap::GetKeyByAttrName( OUString *pLocalName, sal_uInt16 /*nIdxGuess*/) const { - return _GetKeyByAttrName( rAttrName, 0, pLocalName ); + return _GetKeyByAttrName( rAttrName, nullptr, pLocalName ); } sal_uInt16 SvXMLNamespaceMap::GetKeyByAttrName( const OUString& rAttrName, diff --git a/xmloff/source/core/unoatrcn.cxx b/xmloff/source/core/unoatrcn.cxx index 5c2bc39c8a53..b196291cc725 100644 --- a/xmloff/source/core/unoatrcn.cxx +++ b/xmloff/source/core/unoatrcn.cxx @@ -40,7 +40,7 @@ uno::Reference< uno::XInterface > SvUnoAttributeContainer_CreateInstance() SvUnoAttributeContainer::SvUnoAttributeContainer( SvXMLAttrContainerData* pContainer) : mpContainer( pContainer ) { - if( mpContainer == NULL ) + if( mpContainer == nullptr ) mpContainer = new SvXMLAttrContainerData; } diff --git a/xmloff/source/core/xmlerror.cxx b/xmloff/source/core/xmlerror.cxx index e5900b857772..738e1ac0d2c2 100644 --- a/xmloff/source/core/xmlerror.cxx +++ b/xmloff/source/core/xmlerror.cxx @@ -216,7 +216,7 @@ void XMLErrors::ThrowErrorAsSAXException(sal_Int32 nIdMask) Any aAny; aAny <<= rErr.aParams; throw SAXParseException( - rErr.sExceptionMessage, NULL, aAny, + rErr.sExceptionMessage, nullptr, aAny, rErr.sPublicId, rErr.sSystemId, rErr.nRow, rErr.nColumn ); } } diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 70d392db1678..a2b8ee1b40de 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -139,7 +139,7 @@ const XMLServiceMapEntry_Impl aServiceMap[] = SERVICE_MAP_ENTRY( DRAW ), // it must appear before Draw SERVICE_MAP_ENTRY( MATH ), SERVICE_MAP_ENTRY( CHART ), - { 0, 0, 0, 0 } + { nullptr, 0, nullptr, 0 } }; class SettingsExportFacade : public ::xmloff::XMLSettingsExportContext @@ -236,7 +236,7 @@ void SAL_CALL SvXMLExportEventListener::disposing( const lang::EventObject& ) if (pExport) { pExport->DisposingModel(); - pExport = NULL; + pExport = nullptr; } } @@ -448,11 +448,11 @@ SvXMLExport::SvXMLExport( mpNamespaceMap( new SvXMLNamespaceMap ), mpUnitConv( new SvXMLUnitConverter( xContext, util::MeasureUnit::MM_100TH, eDefaultMeasureUnit) ), - mpNumExport(0L), - mpProgressBarHelper( NULL ), - mpEventExport( NULL ), - mpImageMapExport( NULL ), - mpXMLErrors( NULL ), + mpNumExport(nullptr), + mpProgressBarHelper( nullptr ), + mpEventExport( nullptr ), + mpImageMapExport( nullptr ), + mpXMLErrors( nullptr ), mbExtended( false ), meClass( eClass ), mnExportFlags( nExportFlags ), @@ -479,11 +479,11 @@ SvXMLExport::SvXMLExport( mpNamespaceMap( new SvXMLNamespaceMap ), mpUnitConv( new SvXMLUnitConverter( xContext, util::MeasureUnit::MM_100TH, eDefaultMeasureUnit) ), - mpNumExport(0L), - mpProgressBarHelper( NULL ), - mpEventExport( NULL ), - mpImageMapExport( NULL ), - mpXMLErrors( NULL ), + mpNumExport(nullptr), + mpProgressBarHelper( nullptr ), + mpEventExport( nullptr ), + mpImageMapExport( nullptr ), + mpXMLErrors( nullptr ), mbExtended( false ), meClass( XML_TOKEN_INVALID ), mnExportFlags( SvXMLExportFlags::NONE ), @@ -518,11 +518,11 @@ SvXMLExport::SvXMLExport( mpUnitConv( new SvXMLUnitConverter( xContext, util::MeasureUnit::MM_100TH, SvXMLUnitConverter::GetMeasureUnit(eDefaultFieldUnit)) ), - mpNumExport(0L), - mpProgressBarHelper( NULL ), - mpEventExport( NULL ), - mpImageMapExport( NULL ), - mpXMLErrors( NULL ), + mpNumExport(nullptr), + mpProgressBarHelper( nullptr ), + mpEventExport( nullptr ), + mpImageMapExport( nullptr ), + mpXMLErrors( nullptr ), mbExtended( false ), meClass( XML_TOKEN_INVALID ), mnExportFlags( SvXMLExportFlags::NONE ), @@ -724,7 +724,7 @@ void SAL_CALL SvXMLExport::initialize( const uno::Sequence< uno::Any >& aArgumen mxHandler = xTmpDocHandler; *pAny >>= mxExtHandler; - if (mxNumberFormatsSupplier.is() && mpNumExport == NULL) + if (mxNumberFormatsSupplier.is() && mpNumExport == nullptr) mpNumExport = new SvXMLNumFmtExport(*this, mxNumberFormatsSupplier); } @@ -861,7 +861,7 @@ sal_Bool SAL_CALL SvXMLExport::filter( const uno::Sequence< beans::PropertyValue css::uno::Any ex(cppu::getCaughtException()); SetError( XMLERROR_FLAG_ERROR | XMLERROR_FLAG_SEVERE | XMLERROR_API, Sequence<OUString>(), - ex.getValueTypeName() + ": \"" + e.Message + "\"", NULL ); + ex.getValueTypeName() + ": \"" + e.Message + "\"", nullptr ); } // return true only if no error occurred @@ -1421,7 +1421,7 @@ sal_uInt32 SvXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass ) // office:version = ... if( !mbExtended ) { - const sal_Char* pVersion = 0; + const sal_Char* pVersion = nullptr; switch( getDefaultVersion() ) { case SvtSaveOptions::ODFVER_LATEST: pVersion = sXML_1_2; break; @@ -1943,7 +1943,7 @@ void SvXMLExport::exportAnnotationMeta(const uno::Reference<drawing::XShape>&) sal_Int32 SvXMLExport::dataStyleForceSystemLanguage(sal_Int32 nFormat) const { - return ( mpNumExport != NULL ) + return ( mpNumExport != nullptr ) ? mpNumExport->ForceSystemLanguage( nFormat ) : nFormat; } @@ -2086,10 +2086,10 @@ ProgressBarHelper* SvXMLExport::GetProgressBarHelper() XMLEventExport& SvXMLExport::GetEventExport() { - if( NULL == mpEventExport) + if( nullptr == mpEventExport) { // create EventExport on demand - mpEventExport = new XMLEventExport(*this, NULL); + mpEventExport = new XMLEventExport(*this, nullptr); // and register standard handlers + names OUString sStarBasic("StarBasic"); @@ -2105,7 +2105,7 @@ XMLEventExport& SvXMLExport::GetEventExport() XMLImageMapExport& SvXMLExport::GetImageMapExport() { // image map export, create on-demand - if( NULL == mpImageMapExport ) + if( nullptr == mpImageMapExport ) { mpImageMapExport = new XMLImageMapExport(*this); } @@ -2135,7 +2135,7 @@ SvXMLExport* SvXMLExport::getImplementation( uno::Reference< uno::XInterface > x xUT->getSomething( SvXMLExport::getUnoTunnelId()))); } else - return NULL; + return nullptr; } // XUnoTunnel @@ -2257,14 +2257,14 @@ void SvXMLExport::StartElement(const OUString& rName, { Sequence<OUString> aPars(1); aPars[0] = rName; - SetError( XMLERROR_SAX|XMLERROR_FLAG_WARNING, aPars, e.Message, NULL ); + SetError( XMLERROR_SAX|XMLERROR_FLAG_WARNING, aPars, e.Message, nullptr ); } catch (const SAXException& e) { Sequence<OUString> aPars(1); aPars[0] = rName; SetError( XMLERROR_SAX|XMLERROR_FLAG_ERROR|XMLERROR_FLAG_SEVERE, - aPars, e.Message, NULL ); + aPars, e.Message, nullptr ); } } ClearAttrList(); @@ -2283,14 +2283,14 @@ void SvXMLExport::Characters(const OUString& rChars) { Sequence<OUString> aPars(1); aPars[0] = rChars; - SetError( XMLERROR_SAX|XMLERROR_FLAG_WARNING, aPars, e.Message, NULL ); + SetError( XMLERROR_SAX|XMLERROR_FLAG_WARNING, aPars, e.Message, nullptr ); } catch (const SAXException& e) { Sequence<OUString> aPars(1); aPars[0] = rChars; SetError( XMLERROR_SAX|XMLERROR_FLAG_ERROR|XMLERROR_FLAG_SEVERE, - aPars, e.Message, NULL ); + aPars, e.Message, nullptr ); } } } @@ -2331,7 +2331,7 @@ void SvXMLExport::EndElement(const OUString& rName, Sequence<OUString> aPars(1); aPars[0] = rName; SetError( XMLERROR_SAX|XMLERROR_FLAG_ERROR|XMLERROR_FLAG_SEVERE, - aPars, e.Message, NULL ); + aPars, e.Message, nullptr ); } } } @@ -2351,7 +2351,7 @@ void SvXMLExport::IgnorableWhitespace() { Sequence<OUString> aPars(0); SetError( XMLERROR_SAX|XMLERROR_FLAG_ERROR|XMLERROR_FLAG_SEVERE, - aPars, e.Message, NULL ); + aPars, e.Message, nullptr ); } } } @@ -2375,7 +2375,7 @@ void SvXMLExport::SetError( mnErrorFlags |= SvXMLErrorFlags::DO_NOTHING; // create error list on demand - if ( mpXMLErrors == NULL ) + if ( mpXMLErrors == nullptr ) mpXMLErrors = new XMLErrors(); // save error information @@ -2386,7 +2386,7 @@ void SvXMLExport::SetError( sal_Int32 nId, const Sequence<OUString>& rMsgParams) { - SetError( nId, rMsgParams, "", NULL ); + SetError( nId, rMsgParams, "", nullptr ); } void SvXMLExport::DisposingModel() diff --git a/xmloff/source/core/xmlictxt.cxx b/xmloff/source/core/xmlictxt.cxx index ca897d080576..dafd6af90696 100644 --- a/xmloff/source/core/xmlictxt.cxx +++ b/xmloff/source/core/xmlictxt.cxx @@ -35,14 +35,14 @@ SvXMLImportContext::SvXMLImportContext( SvXMLImport& rImp, sal_uInt16 nPrfx, mrImport( rImp ), mnPrefix( nPrfx ), maLocalName( rLName ), - mpRewindMap( 0 ) + mpRewindMap( nullptr ) { } SvXMLImportContext::SvXMLImportContext( SvXMLImport& rImp ) : mrImport( rImp ), mnPrefix ( 0 ), - mpRewindMap( 0 ) + mpRewindMap( nullptr ) { } @@ -102,7 +102,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL SvXMLImportContext::cre (const OUString &, const OUString &, const uno::Reference< xml::sax::XFastAttributeList > &) throw (uno::RuntimeException, xml::sax::SAXException, std::exception) { - return 0; + return nullptr; } void SAL_CALL SvXMLImportContext::characters(const OUString &) diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 7998494d18f5..5d3c9fa84d4a 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -135,7 +135,7 @@ void SAL_CALL SvXMLImportEventListener::disposing( const lang::EventObject& ) if (pImport) { pImport->DisposingModel(); - pImport = NULL; + pImport = nullptr; } } @@ -301,8 +301,8 @@ public: SvXMLImport_Impl( const uno::Reference< uno::XComponentContext >& rxContext, OUString const & theImplementationName) - : hBatsFontConv( 0 ) - , hMathFontConv( 0 ) + : hBatsFontConv( nullptr ) + , hMathFontConv( nullptr ) , mbOwnGraphicResolver( false ) , mbOwnEmbeddedResolver( false ) , mbIsOOoXML(false) @@ -422,11 +422,11 @@ SvXMLImport::SvXMLImport( mpContexts( new SvXMLImportContexts_Impl ), mpFastContexts( new FastSvXMLImportContexts_Impl ), - mpNumImport( NULL ), - mpProgressBarHelper( NULL ), - mpEventImportHelper( NULL ), - mpXMLErrors( NULL ), - mpStyleMap(0), + mpNumImport( nullptr ), + mpProgressBarHelper( nullptr ), + mpEventImportHelper( nullptr ), + mpXMLErrors( nullptr ), + mpStyleMap(nullptr), mnImportFlags( nImportFlags ), mnErrorFlags(SvXMLErrorFlags::NO), mbIsFormsSupported( true ), @@ -553,7 +553,7 @@ void SAL_CALL SvXMLImport::endDocument() if (mpNumImport) { delete mpNumImport; - mpNumImport = NULL; + mpNumImport = nullptr; } if (mxImportInfo.is()) { @@ -606,7 +606,7 @@ void SAL_CALL SvXMLImport::endDocument() // The shape import helper does the z-order sorting in the dtor, // so it must be deleted here, too. - mxShapeImport = NULL; + mxShapeImport = nullptr; if( mpImpl->mbOwnGraphicResolver ) { @@ -622,10 +622,10 @@ void SAL_CALL SvXMLImport::endDocument() if( mpStyleMap ) { mpStyleMap->release(); - mpStyleMap = 0; + mpStyleMap = nullptr; } - if ( mpXMLErrors != NULL ) + if ( mpXMLErrors != nullptr ) { mpXMLErrors->ThrowErrorAsSAXException( XMLERROR_FLAG_SEVERE ); } @@ -635,7 +635,7 @@ void SAL_CALL SvXMLImport::startElement( const OUString& rName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) throw(xml::sax::SAXException, uno::RuntimeException, std::exception) { - SvXMLNamespaceMap *pRewindMap = 0; + SvXMLNamespaceMap *pRewindMap = nullptr; // SAL_INFO("svg", "startElement " << rName); // Process namespace attributes. This must happen before creating the // context, because namespace decaration apply to the element name itself. @@ -769,7 +769,7 @@ rName // Delete the current context. pContext->ReleaseRef(); - pContext = 0; + pContext = nullptr; // Rewind a namespace map. if( pRewindMap ) @@ -851,7 +851,7 @@ void SAL_CALL SvXMLImport::endFastElement (sal_Int32 Element) uno::Reference< XFastContextHandler > xContext = mpFastContexts->back(); mpFastContexts->pop_back(); xContext->endFastElement( Element ); - xContext = 0; + xContext = nullptr; } } @@ -942,7 +942,7 @@ void SAL_CALL SvXMLImport::setTargetDocument( const uno::Reference< lang::XCompo if( mpNumImport ) { delete mpNumImport; - mpNumImport = 0; + mpNumImport = nullptr; } } @@ -1723,7 +1723,7 @@ void SvXMLImport::_CreateNumberFormatsSupplier() void SvXMLImport::_CreateDataStylesImport() { - SAL_WARN_IF( mpNumImport != NULL, "xmloff.core", "data styles import already exists!" ); + SAL_WARN_IF( mpNumImport != nullptr, "xmloff.core", "data styles import already exists!" ); uno::Reference<util::XNumberFormatsSupplier> xNum = GetNumberFormatsSupplier(); if ( xNum.is() ) @@ -1781,7 +1781,7 @@ void SvXMLImport::SetError( mnErrorFlags |= SvXMLErrorFlags::DO_NOTHING; // create error list on demand - if ( mpXMLErrors == NULL ) + if ( mpXMLErrors == nullptr ) mpXMLErrors = new XMLErrors(); // save error information @@ -1794,7 +1794,7 @@ void SvXMLImport::SetError( sal_Int32 nId, const Sequence<OUString>& rMsgParams) { - SetError( nId, rMsgParams, "", NULL ); + SetError( nId, rMsgParams, "", nullptr ); } void SvXMLImport::SetError( @@ -1837,8 +1837,8 @@ void SvXMLImport::DisposingModel() if( mxMasterStyles.Is() ) static_cast<SvXMLStylesContext *>(&mxMasterStyles)->Clear(); - mxModel.set(0); - mxEventListener.set(NULL); + mxModel.set(nullptr); + mxEventListener.set(nullptr); } ::comphelper::UnoInterfaceToUniqueIdentifierMapper& SvXMLImport::getInterfaceToIdentifierMapper() diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index 97809c6887f3..3f46062204be 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -43,7 +43,7 @@ namespace xmloff { namespace token { #if OSL_DEBUG_LEVEL > 0 - #define TOKEN( s, e ) { sizeof(s)-1, s, NULL, e } + #define TOKEN( s, e ) { sizeof(s)-1, s, nullptr, e } #else #define TOKEN( s, e ) { sizeof(s)-1, s, NULL } #endif @@ -51,7 +51,7 @@ namespace xmloff { namespace token { struct XMLTokenEntry aTokenList[] = { #if OSL_DEBUG_LEVEL > 0 - { 0, NULL, NULL, XML_TOKEN_START }, + { 0, nullptr, nullptr, XML_TOKEN_START }, #else { 0, NULL, NULL }, // XML_TOKEN_START #endif @@ -3253,7 +3253,7 @@ namespace xmloff { namespace token { TOKEN( "min-decimal-places", XML_MIN_DECIMAL_PLACES ), #if OSL_DEBUG_LEVEL > 0 - { 0, NULL, NULL, XML_TOKEN_END } + { 0, nullptr, nullptr, XML_TOKEN_END } #else { 0, NULL, NULL /* XML_TOKEN_END */ } #endif diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx index e0652bbdbb12..9d0fc3cad9b4 100644 --- a/xmloff/source/core/xmluconv.cxx +++ b/xmloff/source/core/xmluconv.cxx @@ -433,7 +433,7 @@ bool SvXMLUnitConverter::convertDateTime( double& fDateTime, const OUString& rString, const com::sun::star::util::Date& aTempNullDate) { com::sun::star::util::DateTime aDateTime; - bool bSuccess = ::sax::Converter::parseDateTime(aDateTime, 0, rString); + bool bSuccess = ::sax::Converter::parseDateTime(aDateTime, nullptr, rString); if (bSuccess) { 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 ) ) diff --git a/xmloff/source/forms/controlpropertyhdl.cxx b/xmloff/source/forms/controlpropertyhdl.cxx index 25a4b1c8c59c..855df152f336 100644 --- a/xmloff/source/forms/controlpropertyhdl.cxx +++ b/xmloff/source/forms/controlpropertyhdl.cxx @@ -47,13 +47,13 @@ namespace xmloff //= OControlPropertyHandlerFactory OControlPropertyHandlerFactory::OControlPropertyHandlerFactory() - :m_pTextAlignHandler(NULL) - ,m_pControlBorderStyleHandler(NULL) - ,m_pControlBorderColorHandler(NULL) - ,m_pRotationAngleHandler(NULL) - ,m_pFontWidthHandler(NULL) - ,m_pFontEmphasisHandler(NULL) - ,m_pFontReliefHandler(NULL) + :m_pTextAlignHandler(nullptr) + ,m_pControlBorderStyleHandler(nullptr) + ,m_pControlBorderColorHandler(nullptr) + ,m_pRotationAngleHandler(nullptr) + ,m_pFontWidthHandler(nullptr) + ,m_pFontEmphasisHandler(nullptr) + ,m_pFontReliefHandler(nullptr) { } @@ -70,7 +70,7 @@ namespace xmloff const XMLPropertyHandler* OControlPropertyHandlerFactory::GetPropertyHandler(sal_Int32 _nType) const { - const XMLPropertyHandler* pHandler = NULL; + const XMLPropertyHandler* pHandler = nullptr; switch (_nType) { diff --git a/xmloff/source/forms/controlpropertymap.cxx b/xmloff/source/forms/controlpropertymap.cxx index 916b97e1e0fa..852c2d93d3da 100644 --- a/xmloff/source/forms/controlpropertymap.cxx +++ b/xmloff/source/forms/controlpropertymap.cxx @@ -36,7 +36,7 @@ namespace xmloff #define MAP_ASCII( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TEXT, context, SvtSaveOptions::ODFVER_010, false } #define MAP_CONST( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TEXT, context, SvtSaveOptions::ODFVER_010, false } #define MAP_CONST_P( name, prefix, token, type, context ){ name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_PARAGRAPH, context, SvtSaveOptions::ODFVER_010, false } -#define MAP_END() { NULL, 0, 0, XML_TOKEN_INVALID, 0, 0, SvtSaveOptions::ODFVER_010, false } +#define MAP_END() { nullptr, 0, 0, XML_TOKEN_INVALID, 0, 0, SvtSaveOptions::ODFVER_010, false } XMLPropertyMapEntry* getControlStylePropertyMap_Access( ) { diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx index 31da709100b2..f39a2281654f 100644 --- a/xmloff/source/forms/elementexport.cxx +++ b/xmloff/source/forms/elementexport.cxx @@ -92,7 +92,7 @@ namespace xmloff const Sequence< ScriptEventDescriptor >& _rEvents) :OPropertyExport(_rContext, _rxProps) ,m_aEvents(_rEvents) - ,m_pXMLElement(NULL) + ,m_pXMLElement(nullptr) { } @@ -148,7 +148,7 @@ namespace xmloff void OElementExport::implEndElement() { delete m_pXMLElement; - m_pXMLElement = NULL; + m_pXMLElement = nullptr; } void OElementExport::exportServiceNameAttribute() @@ -239,7 +239,7 @@ namespace xmloff ,m_nIncludeSpecial(0) ,m_nIncludeEvents(0) ,m_nIncludeBindings(0) - ,m_pOuterElement(NULL) + ,m_pOuterElement(nullptr) { OSL_ENSURE(m_xProps.is(), "OControlExport::OControlExport: invalid arguments!"); } @@ -456,7 +456,7 @@ namespace xmloff // see if this property can already be handled with an IPropertyHandler (which, on the long // term, should be the case for most, if not all, properties) const PropertyDescription* propDescription = metadata::getPropertyDescription( prop->Name ); - if ( propDescription == NULL ) + if ( propDescription == nullptr ) continue; // let the factory provide the concrete handler. Note that caching, if desired, is the task @@ -772,8 +772,8 @@ namespace xmloff if ((CCA_CURRENT_VALUE | CCA_VALUE) & m_nIncludeCommon) { - const sal_Char* pCurrentValuePropertyName = NULL; - const sal_Char* pValuePropertyName = NULL; + const sal_Char* pCurrentValuePropertyName = nullptr; + const sal_Char* pValuePropertyName = nullptr; // get the property names getValuePropertyNames(m_eType, m_nClassId, pCurrentValuePropertyName, pValuePropertyName); @@ -804,9 +804,9 @@ namespace xmloff pValueAttributeName, pValuePropertyName); - OSL_ENSURE((NULL == pValuePropertyName) == (0 == (CCA_VALUE & m_nIncludeCommon)), + OSL_ENSURE((nullptr == pValuePropertyName) == (0 == (CCA_VALUE & m_nIncludeCommon)), "OControlExport::exportCommonControlAttributes: no property found for the value attribute!"); - OSL_ENSURE((NULL == pCurrentValuePropertyName ) == (0 == (CCA_CURRENT_VALUE & m_nIncludeCommon)), + OSL_ENSURE((nullptr == pCurrentValuePropertyName ) == (0 == (CCA_CURRENT_VALUE & m_nIncludeCommon)), "OControlExport::exportCommonControlAttributes: no property found for the current-value attribute!"); #if OSL_DEBUG_LEVEL > 0 @@ -1190,13 +1190,13 @@ namespace xmloff // need to export the min value and the max value as attributes // It depends on the real type (FormComponentType) of the control, which properties hold these // values - const sal_Char* pMinValuePropertyName = NULL; - const sal_Char* pMaxValuePropertyName = NULL; + const sal_Char* pMinValuePropertyName = nullptr; + const sal_Char* pMaxValuePropertyName = nullptr; getValueLimitPropertyNames(m_nClassId, pMinValuePropertyName, pMaxValuePropertyName); - OSL_ENSURE((NULL == pMinValuePropertyName) == (0 == (SCA_MIN_VALUE & m_nIncludeSpecial)), + OSL_ENSURE((nullptr == pMinValuePropertyName) == (0 == (SCA_MIN_VALUE & m_nIncludeSpecial)), "OControlExport::exportCommonControlAttributes: no property found for the min value attribute!"); - OSL_ENSURE((NULL == pMaxValuePropertyName) == (0 == (SCA_MAX_VALUE & m_nIncludeSpecial)), + OSL_ENSURE((nullptr == pMaxValuePropertyName) == (0 == (SCA_MAX_VALUE & m_nIncludeSpecial)), "OControlExport::exportCommonControlAttributes: no property found for the max value attribute!"); // add the two attributes @@ -1409,7 +1409,7 @@ namespace xmloff XML_NAMESPACE_FORM, pOuterElementName, true, true) - : 0; + : nullptr; // add the attributes for the inner element exportInnerAttributes(); @@ -1425,12 +1425,12 @@ namespace xmloff // end the outer element if it exists delete m_pOuterElement; - m_pOuterElement = NULL; + m_pOuterElement = nullptr; } const sal_Char* OControlExport::getOuterXMLElementName() const { - return 0; + return nullptr; } const sal_Char* OControlExport::getXMLElementName() const @@ -1731,7 +1731,7 @@ namespace xmloff // is it a control bound to a calc cell? if ( FormCellBindingHelper::livesInSpreadsheetDocument( m_xProps ) ) { - FormCellBindingHelper aHelper( m_xProps, NULL ); + FormCellBindingHelper aHelper( m_xProps, nullptr ); { if ( FormCellBindingHelper::isCellBinding( aHelper.getCurrentBinding( ) ) ) { @@ -1771,7 +1771,7 @@ namespace xmloff { try { - FormCellBindingHelper aHelper( m_xProps, NULL ); + FormCellBindingHelper aHelper( m_xProps, nullptr ); Reference< XValueBinding > xBinding( aHelper.getCurrentBinding() ); OSL_ENSURE( xBinding.is(), "OControlExport::exportCellBindingAttributes: invalid bindable or invalid binding!" ); if ( xBinding.is() ) @@ -1835,7 +1835,7 @@ namespace xmloff OSL_ENSURE( xSource.is(), "OControlExport::exportCellListSourceRange: list source or sink!" ); if ( xSource.is() ) { - FormCellBindingHelper aHelper( m_xProps, NULL ); + FormCellBindingHelper aHelper( m_xProps, nullptr ); AddAttribute( OAttributeMetaData::getBindingAttributeNamespace( BA_LIST_CELL_RANGE ), diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index 202dab5f40cb..f3a40fa7dad8 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -121,7 +121,7 @@ namespace xmloff :OPropertyImport(_rImport, _nPrefix, _rName) ,m_rFormImport(_rImport) ,m_rEventManager(_rEventManager) - ,m_pStyleElement( NULL ) + ,m_pStyleElement( nullptr ) ,m_xParentContainer(_rxParentContainer) ,m_bImplicitGenericAttributeHandling( true ) { @@ -466,7 +466,7 @@ namespace xmloff Sequence< OUString > aNames = m_xParentContainer->getElementNames(); OUString sReturn; - const OUString* pNames = NULL; + const OUString* pNames = nullptr; const OUString* pNamesEnd = aNames.getConstArray() + aNames.getLength(); for (sal_Int32 i=0; i<32768; ++i) // the limit is nearly arbitrary ... { @@ -664,7 +664,7 @@ namespace xmloff OUString OControlImport::determineDefaultServiceName() const { - const sal_Char* pServiceName = NULL; + const sal_Char* pServiceName = nullptr; switch ( m_eElementType ) { case OControlElement::TEXT: @@ -688,7 +688,7 @@ namespace xmloff case OControlElement::DATE: pServiceName = "com.sun.star.form.component.DateField"; break; default: break; } - if ( pServiceName != NULL ) + if ( pServiceName != nullptr ) return OUString::createFromAscii( pServiceName ); return OUString(); } @@ -828,10 +828,10 @@ namespace xmloff return; } - const sal_Char* pValueProperty = NULL; - const sal_Char* pCurrentValueProperty = NULL; - const sal_Char* pMinValueProperty = NULL; - const sal_Char* pMaxValueProperty = NULL; + const sal_Char* pValueProperty = nullptr; + const sal_Char* pCurrentValueProperty = nullptr; + const sal_Char* pMinValueProperty = nullptr; + const sal_Char* pMaxValueProperty = nullptr; bool bRetrievedValues = false; bool bRetrievedValueLimits = false; @@ -993,8 +993,8 @@ namespace xmloff DBG_UNHANDLED_EXCEPTION(); } - const sal_Char* pValueProperty = NULL; - const sal_Char* pDefaultValueProperty = NULL; + const sal_Char* pValueProperty = nullptr; + const sal_Char* pDefaultValueProperty = nullptr; getRuntimeValuePropertyNames(m_eElementType, nClassId, pValueProperty, pDefaultValueProperty); if ( pDefaultValueProperty && pValueProperty ) { diff --git a/xmloff/source/forms/elementimport_impl.hxx b/xmloff/source/forms/elementimport_impl.hxx index d49859453bae..3677f230a281 100644 --- a/xmloff/source/forms/elementimport_impl.hxx +++ b/xmloff/source/forms/elementimport_impl.hxx @@ -42,7 +42,7 @@ inline SvXMLImportContext* OContainerImport< BASE >::CreateChildContext( else { OSL_FAIL("OContainerImport::CreateChildContext: don't have an element!"); - return NULL; + return nullptr; } } diff --git a/xmloff/source/forms/formattributes.cxx b/xmloff/source/forms/formattributes.cxx index e63d89c6d2dc..98a1c595c80a 100644 --- a/xmloff/source/forms/formattributes.cxx +++ b/xmloff/source/forms/formattributes.cxx @@ -217,7 +217,7 @@ namespace xmloff AttributeAssignments::const_iterator aPos = m_aKnownProperties.find(_rAttribName); if (m_aKnownProperties.end() != aPos) return &aPos->second; - return NULL; + return nullptr; } void OAttribute2Property::addStringProperty( diff --git a/xmloff/source/forms/formattributes.hxx b/xmloff/source/forms/formattributes.hxx index 3449606d23d6..4897f7d103a0 100644 --- a/xmloff/source/forms/formattributes.hxx +++ b/xmloff/source/forms/formattributes.hxx @@ -255,7 +255,7 @@ namespace xmloff const SvXMLEnumMapEntry* pEnumMap; // the enum map, if appliable bool bInverseSemantics; // for booleanss: attribute and property value have the same or an inverse semantics? - AttributeAssignment() : pEnumMap(NULL), bInverseSemantics(false) { } + AttributeAssignment() : pEnumMap(nullptr), bInverseSemantics(false) { } }; protected: @@ -288,7 +288,7 @@ namespace xmloff */ void addStringProperty( const sal_Char* _pAttributeName, const OUString& _rPropertyName, - const sal_Char* _pAttributeDefault = NULL); + const sal_Char* _pAttributeDefault = nullptr); /** add a attribute assignment referring to a boolean property to the map @@ -348,7 +348,7 @@ namespace xmloff void addEnumProperty( const sal_Char* _pAttributeName, const OUString& _rPropertyName, const sal_uInt16 _nAttributeDefault, const SvXMLEnumMapEntry* _pValueMap, - const ::com::sun::star::uno::Type* _pType = NULL); + const ::com::sun::star::uno::Type* _pType = nullptr); protected: /// some common code for the various add*Property methods diff --git a/xmloff/source/forms/formenums.cxx b/xmloff/source/forms/formenums.cxx index ecaba1cfd3dd..cd40badb9e9d 100644 --- a/xmloff/source/forms/formenums.cxx +++ b/xmloff/source/forms/formenums.cxx @@ -47,21 +47,21 @@ namespace xmloff const SvXMLEnumMapEntry* OEnumMapper::s_pEnumMap[OEnumMapper::KNOWN_ENUM_PROPERTIES] = { - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr }; const SvXMLEnumMapEntry* OEnumMapper::getEnumMap(EnumProperties _eProperty) diff --git a/xmloff/source/forms/formevents.cxx b/xmloff/source/forms/formevents.cxx index 579da052a786..37ce1c5dc717 100644 --- a/xmloff/source/forms/formevents.cxx +++ b/xmloff/source/forms/formevents.cxx @@ -60,7 +60,7 @@ namespace xmloff { "XDatabaseParameterListener::approveParameter",XML_NAMESPACE_FORM, "supplyparameter" }, // "on-supplyparameter" { "XSQLErrorListener::errorOccured", XML_NAMESPACE_DOM, "error" }, // "on-error" { "XAdjustmentListener::adjustmentValueChanged",XML_NAMESPACE_FORM, "adjust" }, // "on-adjust" - { 0, 0, 0 } + { nullptr, 0, nullptr } }; const XMLEventNameTranslation* g_pFormsEventTranslation = aEventTranslations; diff --git a/xmloff/source/forms/formlayerexport.cxx b/xmloff/source/forms/formlayerexport.cxx index 76971699819e..5a632c38109c 100644 --- a/xmloff/source/forms/formlayerexport.cxx +++ b/xmloff/source/forms/formlayerexport.cxx @@ -51,7 +51,7 @@ namespace xmloff OFormLayerXMLExport::~OFormLayerXMLExport() { delete m_pImpl; - m_pImpl = NULL; + m_pImpl = nullptr; } bool OFormLayerXMLExport::seekPage(const Reference< XDrawPage >& _rxDrawPage) @@ -118,7 +118,7 @@ namespace xmloff //= OOfficeFormsExport OOfficeFormsExport::OOfficeFormsExport( SvXMLExport& _rExp ) - :m_pImpl(NULL) + :m_pImpl(nullptr) { m_pImpl = new OFormsRootExport(_rExp); } diff --git a/xmloff/source/forms/formlayerimport.cxx b/xmloff/source/forms/formlayerimport.cxx index 5d496259a26e..00d64a06fe4d 100644 --- a/xmloff/source/forms/formlayerimport.cxx +++ b/xmloff/source/forms/formlayerimport.cxx @@ -33,7 +33,7 @@ namespace xmloff //= OFormLayerXMLExport OFormLayerXMLImport::OFormLayerXMLImport(SvXMLImport& _rImporter) - :m_pImpl(NULL) + :m_pImpl(nullptr) { m_pImpl = new OFormLayerXMLImport_Impl(_rImporter); } diff --git a/xmloff/source/forms/handler/form_handler_factory.cxx b/xmloff/source/forms/handler/form_handler_factory.cxx index b6a285100b1c..1444f9cb883b 100644 --- a/xmloff/source/forms/handler/form_handler_factory.cxx +++ b/xmloff/source/forms/handler/form_handler_factory.cxx @@ -28,14 +28,14 @@ namespace xmloff namespace { - static PPropertyHandler s_pVCLDateHandler = NULL; - static PPropertyHandler s_pVCLTimeHandler = NULL; + static PPropertyHandler s_pVCLDateHandler = nullptr; + static PPropertyHandler s_pVCLTimeHandler = nullptr; } //= FormHandlerFactory PPropertyHandler FormHandlerFactory::getFormPropertyHandler( const PropertyId i_propertyId ) { - PPropertyHandler pHandler( NULL ); + PPropertyHandler pHandler( nullptr ); switch ( i_propertyId ) { @@ -43,10 +43,10 @@ namespace xmloff case PID_DATE_MAX: case PID_DEFAULT_DATE: case PID_DATE: - if ( s_pVCLDateHandler.get() == NULL ) + if ( s_pVCLDateHandler.get() == nullptr ) { ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if ( s_pVCLDateHandler == NULL ) + if ( s_pVCLDateHandler == nullptr ) s_pVCLDateHandler = new VCLDateHandler(); } pHandler = s_pVCLDateHandler; @@ -56,10 +56,10 @@ namespace xmloff case PID_TIME_MAX: case PID_DEFAULT_TIME: case PID_TIME: - if ( s_pVCLTimeHandler.get() == NULL ) + if ( s_pVCLTimeHandler.get() == nullptr ) { ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); - if ( s_pVCLTimeHandler == NULL ) + if ( s_pVCLTimeHandler == nullptr ) s_pVCLTimeHandler = new VCLTimeHandler(); } pHandler = s_pVCLTimeHandler; diff --git a/xmloff/source/forms/handler/vcl_date_handler.cxx b/xmloff/source/forms/handler/vcl_date_handler.cxx index 0df8f14dd3ab..4dde7c21045f 100644 --- a/xmloff/source/forms/handler/vcl_date_handler.cxx +++ b/xmloff/source/forms/handler/vcl_date_handler.cxx @@ -59,7 +59,7 @@ namespace xmloff aDateTime.Year = aDate.Year; OUStringBuffer aBuffer; - ::sax::Converter::convertDateTime( aBuffer, aDateTime, 0 ); + ::sax::Converter::convertDateTime( aBuffer, aDateTime, nullptr ); return aBuffer.makeStringAndClear(); } @@ -67,7 +67,7 @@ namespace xmloff { DateTime aDateTime; Date aDate; - if (::sax::Converter::parseDateTime( aDateTime, 0, i_attributeValue )) + if (::sax::Converter::parseDateTime( aDateTime, nullptr, i_attributeValue )) { aDate.Day = aDateTime.Day; aDate.Month = aDateTime.Month; diff --git a/xmloff/source/forms/layerexport.cxx b/xmloff/source/forms/layerexport.cxx index f0145f1d60d7..bd689f750712 100644 --- a/xmloff/source/forms/layerexport.cxx +++ b/xmloff/source/forms/layerexport.cxx @@ -76,7 +76,7 @@ namespace xmloff OFormLayerXMLExport_Impl::OFormLayerXMLExport_Impl(SvXMLExport& _rContext) :m_rContext(_rContext) - ,m_pControlNumberStyles(NULL) + ,m_pControlNumberStyles(nullptr) { initializePropertyMaps(); diff --git a/xmloff/source/forms/layerimport.cxx b/xmloff/source/forms/layerimport.cxx index 97f4592080e9..87ccd96e9077 100644 --- a/xmloff/source/forms/layerimport.cxx +++ b/xmloff/source/forms/layerimport.cxx @@ -71,7 +71,7 @@ using namespace ::com::sun::star::sdb; //= OFormLayerXMLImport_Impl OFormLayerXMLImport_Impl::OFormLayerXMLImport_Impl(SvXMLImport& _rImporter) :m_rImporter(_rImporter) - ,m_pAutoStyles(NULL) + ,m_pAutoStyles(nullptr) { // build the attribute2property map // string properties which are exported as attributes @@ -345,7 +345,7 @@ const SvXMLStyleContext* OFormLayerXMLImport_Impl::getStyleElement(const OUStrin // did you use setAutoStyleContext? const SvXMLStyleContext* pControlStyle = - m_pAutoStyles ? m_pAutoStyles->FindStyleChildContext( XML_STYLE_FAMILY_TEXT_PARAGRAPH, _rStyleName ) : NULL; + m_pAutoStyles ? m_pAutoStyles->FindStyleChildContext( XML_STYLE_FAMILY_TEXT_PARAGRAPH, _rStyleName ) : nullptr; OSL_ENSURE( pControlStyle || !m_pAutoStyles, OStringBuffer("OFormLayerXMLImport_Impl::getStyleElement: did not find the style named \"").append(OUStringToOString(_rStyleName, RTL_TEXTENCODING_ASCII_US)).append("\"!").getStr() ); return pControlStyle; @@ -482,7 +482,7 @@ SvXMLImportContext* OFormLayerXMLImport_Impl::createOfficeFormsContext( SvXMLImportContext* OFormLayerXMLImport_Impl::createContext(const sal_uInt16 _nPrefix, const OUString& _rLocalName, const Reference< xml::sax::XAttributeList >&) { - SvXMLImportContext* pContext = NULL; + SvXMLImportContext* pContext = nullptr; if ( _rLocalName == "form" ) { if ( m_xCurrentPageFormsSupp.is() ) diff --git a/xmloff/source/forms/officeforms.cxx b/xmloff/source/forms/officeforms.cxx index e289e78671e2..a295ae7a9a33 100644 --- a/xmloff/source/forms/officeforms.cxx +++ b/xmloff/source/forms/officeforms.cxx @@ -53,7 +53,7 @@ namespace xmloff SvXMLImportContext* OFormsRootImport::CreateChildContext( sal_uInt16 _nPrefix, const OUString& _rLocalName, const Reference< XAttributeList>& xAttrList ) { - SvXMLImportContext* pRet = 0; + SvXMLImportContext* pRet = nullptr; try { pRet = GetImport().GetFormImport()->createContext( _nPrefix, _rLocalName, xAttrList ); @@ -118,7 +118,7 @@ namespace xmloff //= OFormsRootExport OFormsRootExport::OFormsRootExport( SvXMLExport& _rExp ) - :m_pImplElement(NULL) + :m_pImplElement(nullptr) { addModelAttributes(_rExp); diff --git a/xmloff/source/forms/property_description.hxx b/xmloff/source/forms/property_description.hxx index 3d6c9be3d79c..d16e3b045294 100644 --- a/xmloff/source/forms/property_description.hxx +++ b/xmloff/source/forms/property_description.hxx @@ -86,7 +86,7 @@ namespace xmloff PropertyDescription() :propertyName() ,attribute() - ,factory( NULL ) + ,factory( nullptr ) ,propertyId( PID_INVALID ) ,propertyGroup( NO_GROUP ) { diff --git a/xmloff/source/forms/property_meta_data.cxx b/xmloff/source/forms/property_meta_data.cxx index e5898f38a04b..496a929b5cc8 100644 --- a/xmloff/source/forms/property_meta_data.cxx +++ b/xmloff/source/forms/property_meta_data.cxx @@ -181,7 +181,7 @@ namespace xmloff { namespace metadata DescriptionsByName::const_iterator pos = rAllDescriptions.find( i_propertyName ); if ( pos != rAllDescriptions.end() ) return pos->second; - return NULL; + return nullptr; } void getPropertyGroup( const PropertyGroup i_propertyGroup, PropertyDescriptionList& o_propertyDescriptions ) diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx index 3627dd48c487..a78c8c6bd97d 100644 --- a/xmloff/source/forms/propertyexport.cxx +++ b/xmloff/source/forms/propertyexport.cxx @@ -99,7 +99,7 @@ namespace xmloff void OPropertyExport::exportRemainingProperties() { // the properties tag (will be created if we have at least one no-default property) - SvXMLElementExport* pPropertiesTag = NULL; + SvXMLElementExport* pPropertiesTag = nullptr; try { diff --git a/xmloff/source/forms/propertyexport.hxx b/xmloff/source/forms/propertyexport.hxx index 510eb960a4e1..c8f545ef140e 100644 --- a/xmloff/source/forms/propertyexport.hxx +++ b/xmloff/source/forms/propertyexport.hxx @@ -394,10 +394,10 @@ namespace xmloff dbg_implCheckProperty(name, &cppu::UnoType<type>::get()) #define DBG_CHECK_PROPERTY_NO_TYPE(name) \ - dbg_implCheckProperty(name, NULL) + dbg_implCheckProperty(name, nullptr) #define DBG_CHECK_PROPERTY_ASCII_NO_TYPE( name ) \ - dbg_implCheckProperty( OUString::createFromAscii( name ), NULL ) + dbg_implCheckProperty( OUString::createFromAscii( name ), nullptr ) #else #define DBG_CHECK_PROPERTY(name, type) #define DBG_CHECK_PROPERTY_NO_TYPE(name) diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx index d40003387a58..7ea93ac919b2 100644 --- a/xmloff/source/forms/propertyimport.cxx +++ b/xmloff/source/forms/propertyimport.cxx @@ -379,7 +379,7 @@ SvXMLImportContext* OPropertyElementsContext::CreateChildContext(sal_uInt16 _nPr void OPropertyElementsContext::Characters(const OUString& _rChars) { - OSL_ENSURE(0 == _rChars.trim(), "OPropertyElementsContext::Characters: non-whitespace characters detected!"); + OSL_ENSURE(nullptr == _rChars.trim(), "OPropertyElementsContext::Characters: non-whitespace characters detected!"); SvXMLImportContext::Characters(_rChars); } diff --git a/xmloff/source/forms/propertyimport.hxx b/xmloff/source/forms/propertyimport.hxx index f7acc6900e35..f31defc2bad9 100644 --- a/xmloff/source/forms/propertyimport.hxx +++ b/xmloff/source/forms/propertyimport.hxx @@ -45,7 +45,7 @@ namespace xmloff static ::com::sun::star::uno::Any convertString( const ::com::sun::star::uno::Type& _rExpectedType, const OUString& _rReadCharacters, - const SvXMLEnumMapEntry* _pEnumMap = NULL, + const SvXMLEnumMapEntry* _pEnumMap = nullptr, const bool _bInvertBoolean = false ); diff --git a/xmloff/source/forms/valueproperties.cxx b/xmloff/source/forms/valueproperties.cxx index 28603f685f5d..8f0c542af581 100644 --- a/xmloff/source/forms/valueproperties.cxx +++ b/xmloff/source/forms/valueproperties.cxx @@ -33,7 +33,7 @@ namespace xmloff sal_Char const * & _rpCurrentValuePropertyName, sal_Char const * & _rpValuePropertyName) { // reset the pointers in case we can't determine the property names - _rpCurrentValuePropertyName = _rpValuePropertyName = NULL; + _rpCurrentValuePropertyName = _rpValuePropertyName = nullptr; switch (_nFormComponentType) { case FormComponentType::TEXTFIELD: @@ -94,7 +94,7 @@ namespace xmloff void OValuePropertiesMetaData::getValueLimitPropertyNames(sal_Int16 _nFormComponentType, sal_Char const * & _rpMinValuePropertyName, sal_Char const * & _rpMaxValuePropertyName) { - _rpMinValuePropertyName = _rpMaxValuePropertyName = NULL; + _rpMinValuePropertyName = _rpMaxValuePropertyName = nullptr; switch (_nFormComponentType) { case FormComponentType::NUMERICFIELD: @@ -129,7 +129,7 @@ namespace xmloff sal_Char const * & _rpValuePropertyName, sal_Char const * & _rpDefaultValuePropertyName ) { // reset the pointers in case we can't determine the property names - _rpValuePropertyName = _rpDefaultValuePropertyName = NULL; + _rpValuePropertyName = _rpDefaultValuePropertyName = nullptr; switch (_nFormComponentType) { case FormComponentType::TEXTFIELD: diff --git a/xmloff/source/meta/MetaExportComponent.cxx b/xmloff/source/meta/MetaExportComponent.cxx index 951eb5554d28..7b6481109f20 100644 --- a/xmloff/source/meta/MetaExportComponent.cxx +++ b/xmloff/source/meta/MetaExportComponent.cxx @@ -134,7 +134,7 @@ sal_uInt32 XMLMetaExportComponent::exportDoc( enum XMLTokenEnum ) nPos = GetNamespaceMap().GetNextKey( nPos ); } - const sal_Char* pVersion = 0; + const sal_Char* pVersion = nullptr; switch( getDefaultVersion() ) { case SvtSaveOptions::ODFVER_LATEST: pVersion = "1.2"; break; diff --git a/xmloff/source/meta/xmlversion.cxx b/xmloff/source/meta/xmlversion.cxx index 236d03fa8ee6..de6fdec8bdfb 100644 --- a/xmloff/source/meta/xmlversion.cxx +++ b/xmloff/source/meta/xmlversion.cxx @@ -116,7 +116,7 @@ SvXMLImportContext *XMLVersionListImport::CreateContext( const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; if ( XML_NAMESPACE_FRAMEWORK == nPrefix && rLocalName == xmloff::token::GetXMLToken(xmloff::token::XML_VERSION_LIST) ) @@ -147,7 +147,7 @@ SvXMLImportContext *XMLVersionListContext::CreateChildContext( sal_uInt16 nPrefi const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; if ( nPrefix == XML_NAMESPACE_FRAMEWORK && rLocalName == xmloff::token::GetXMLToken(xmloff::token::XML_VERSION_ENTRY) ) diff --git a/xmloff/source/script/XMLEventExport.cxx b/xmloff/source/script/XMLEventExport.cxx index a27927c082af..f2b91227768c 100644 --- a/xmloff/source/script/XMLEventExport.cxx +++ b/xmloff/source/script/XMLEventExport.cxx @@ -68,8 +68,8 @@ XMLEventExport::~XMLEventExport() void XMLEventExport::AddHandler( const OUString& rName, XMLEventExportHandler* pHandler ) { - DBG_ASSERT(pHandler != NULL, "Need EventExportHandler"); - if (pHandler != NULL) + DBG_ASSERT(pHandler != nullptr, "Need EventExportHandler"); + if (pHandler != nullptr) { aHandlerMap[rName] = pHandler; } @@ -78,11 +78,11 @@ void XMLEventExport::AddHandler( const OUString& rName, void XMLEventExport::AddTranslationTable( const XMLEventNameTranslation* pTransTable ) { - if (NULL != pTransTable) + if (nullptr != pTransTable) { // put translation table into map for(const XMLEventNameTranslation* pTrans = pTransTable; - pTrans->sAPIName != NULL; + pTrans->sAPIName != nullptr; pTrans++) { aNameTranslationMap[OUString::createFromAscii(pTrans->sAPIName)] = @@ -346,7 +346,7 @@ const XMLEventNameTranslation aStandardEventTable[] = { "OnChange", XML_NAMESPACE_OFFICE, "content-changed" }, { "OnCalculate", XML_NAMESPACE_OFFICE, "calculated" }, - { NULL, 0, 0 } + { nullptr, 0, nullptr } }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/script/XMLEventImportHelper.cxx b/xmloff/source/script/XMLEventImportHelper.cxx index de147b6b778e..66d02be6be29 100644 --- a/xmloff/source/script/XMLEventImportHelper.cxx +++ b/xmloff/source/script/XMLEventImportHelper.cxx @@ -57,8 +57,8 @@ void XMLEventImportHelper::RegisterFactory( const OUString& rLanguage, XMLEventContextFactory* pFactory ) { - DBG_ASSERT(pFactory != NULL, "I need a factory."); - if (NULL != pFactory) + DBG_ASSERT(pFactory != nullptr, "I need a factory."); + if (nullptr != pFactory) { aFactoryMap[rLanguage] = pFactory; } @@ -67,11 +67,11 @@ void XMLEventImportHelper::RegisterFactory( void XMLEventImportHelper::AddTranslationTable( const XMLEventNameTranslation* pTransTable ) { - if (NULL != pTransTable) + if (nullptr != pTransTable) { // put translation table into map for(const XMLEventNameTranslation* pTrans = pTransTable; - pTrans->sAPIName != NULL; + pTrans->sAPIName != nullptr; pTrans++) { XMLEventName aName( pTrans->nPrefix, pTrans->sXMLName ); @@ -118,7 +118,7 @@ SvXMLImportContext* XMLEventImportHelper::CreateContext( const OUString& rXmlEventName, const OUString& rLanguage) { - SvXMLImportContext* pContext = NULL; + SvXMLImportContext* pContext = nullptr; // translate event name form xml to api OUString sMacroName; @@ -148,7 +148,7 @@ SvXMLImportContext* XMLEventImportHelper::CreateContext( } // default context (if no context was created above) - if( NULL == pContext ) + if( nullptr == pContext ) { pContext = new SvXMLImportContext(rImport, nPrefix, rLocalName); diff --git a/xmloff/source/script/XMLEventsImportContext.cxx b/xmloff/source/script/XMLEventsImportContext.cxx index 916e8b5dc0bb..3dd67b0ecd74 100644 --- a/xmloff/source/script/XMLEventsImportContext.cxx +++ b/xmloff/source/script/XMLEventsImportContext.cxx @@ -207,7 +207,7 @@ void XMLEventsImportContext::AddEventValues( GetImport().SetError(XMLERROR_FLAG_ERROR | XMLERROR_ILLEGAL_EVENT, - aMsgParams, rException.Message, 0); + aMsgParams, rException.Message, nullptr); } } } diff --git a/xmloff/source/script/xmlbasici.cxx b/xmloff/source/script/xmlbasici.cxx index 2a8eacaaa479..8e884c9c211b 100644 --- a/xmloff/source/script/xmlbasici.cxx +++ b/xmloff/source/script/xmlbasici.cxx @@ -49,7 +49,7 @@ SvXMLImportContext* XMLBasicImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList >& ) { - SvXMLImportContext* pContext = 0; + SvXMLImportContext* pContext = nullptr; if ( m_xHandler.is() ) pContext = new XMLBasicImportChildContext( GetImport(), nPrefix, rLocalName, diff --git a/xmloff/source/script/xmlscripti.cxx b/xmloff/source/script/xmlscripti.cxx index 242857038a8f..378dad89ed2d 100644 --- a/xmloff/source/script/xmlscripti.cxx +++ b/xmloff/source/script/xmlscripti.cxx @@ -74,7 +74,7 @@ SvXMLImportContext* XMLScriptChildContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList >& xAttrList ) { - SvXMLImportContext* pContext = NULL; + SvXMLImportContext* pContext = nullptr; if ( m_xDocumentScripts.is() ) { // document supports embedding scripts/macros @@ -112,7 +112,7 @@ SvXMLImportContext* XMLScriptContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLName, const Reference<XAttributeList>& xAttrList ) { - SvXMLImportContext* pContext = NULL; + SvXMLImportContext* pContext = nullptr; if ( nPrefix == XML_NAMESPACE_OFFICE ) { diff --git a/xmloff/source/style/FillStyleContext.cxx b/xmloff/source/style/FillStyleContext.cxx index de9fda1e593a..76f9dbeb24ad 100644 --- a/xmloff/source/style/FillStyleContext.cxx +++ b/xmloff/source/style/FillStyleContext.cxx @@ -138,7 +138,7 @@ XMLBitmapStyleContext::~XMLBitmapStyleContext() SvXMLImportContext* XMLBitmapStyleContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; if( (XML_NAMESPACE_OFFICE == nPrefix) && xmloff::token::IsXMLToken( rLocalName, xmloff::token::XML_BINARY_DATA ) ) { OUString sURL; @@ -168,7 +168,7 @@ void XMLBitmapStyleContext::EndElement() if( sURL.isEmpty() && mxBase64Stream.is() ) { sURL = GetImport().ResolveGraphicObjectURLFromBase64( mxBase64Stream ); - mxBase64Stream = 0; + mxBase64Stream = nullptr; maAny <<= sURL; } diff --git a/xmloff/source/style/MarkerStyle.cxx b/xmloff/source/style/MarkerStyle.cxx index 864eedf889a8..ba2a7f4f71b7 100644 --- a/xmloff/source/style/MarkerStyle.cxx +++ b/xmloff/source/style/MarkerStyle.cxx @@ -57,7 +57,7 @@ bool XMLMarkerStyleImport::importXML( bool bHasPathData = false; OUString aDisplayName; - SdXMLImExViewBox* pViewBox = NULL; + SdXMLImExViewBox* pViewBox = nullptr; SvXMLNamespaceMap& rNamespaceMap = rImport.GetNamespaceMap(); SvXMLUnitConverter& rUnitConverter = rImport.GetMM100UnitConverter(); @@ -97,7 +97,7 @@ bool XMLMarkerStyleImport::importXML( { basegfx::B2DPolyPolygon aPolyPolygon; - if(basegfx::tools::importFromSvgD(aPolyPolygon, strPathData, rImport.needFixPositionAfterZ(), 0)) + if(basegfx::tools::importFromSvgD(aPolyPolygon, strPathData, rImport.needFixPositionAfterZ(), nullptr)) { if(aPolyPolygon.count()) { diff --git a/xmloff/source/style/MultiPropertySetHelper.cxx b/xmloff/source/style/MultiPropertySetHelper.cxx index 33ea04d9577a..382a1908cc4e 100644 --- a/xmloff/source/style/MultiPropertySetHelper.cxx +++ b/xmloff/source/style/MultiPropertySetHelper.cxx @@ -40,15 +40,15 @@ using ::std::sort; MultiPropertySetHelper::MultiPropertySetHelper( const sal_Char** pNames ) : - pPropertyNames( NULL ), + pPropertyNames( nullptr ), nLength( 0 ), aPropertySequence(), - pSequenceIndex( NULL ), + pSequenceIndex( nullptr ), aValues(), - pValues( NULL ) + pValues( nullptr ) { // first count the elements - for( const sal_Char** pPtr = pNames; *pPtr != NULL; pPtr++ ) + for( const sal_Char** pPtr = pNames; *pPtr != nullptr; pPtr++ ) nLength++; // allocate array and create strings @@ -60,7 +60,7 @@ MultiPropertySetHelper::MultiPropertySetHelper( MultiPropertySetHelper::~MultiPropertySetHelper() { - pValues = NULL; // memory 'owned' by aValues + pValues = nullptr; // memory 'owned' by aValues delete[] pSequenceIndex; delete[] pPropertyNames; @@ -73,7 +73,7 @@ void MultiPropertySetHelper::hasProperties( DBG_ASSERT( rInfo.is(), "I'd really like an XPropertySetInfo here." ); // allocate sequence index - if ( NULL == pSequenceIndex ) + if ( nullptr == pSequenceIndex ) pSequenceIndex = new sal_Int16[nLength] ; // construct pSequenceIndex @@ -106,7 +106,7 @@ void MultiPropertySetHelper::hasProperties( bool MultiPropertySetHelper::checkedProperties() { - return (NULL != pSequenceIndex); + return (nullptr != pSequenceIndex); } diff --git a/xmloff/source/style/PageHeaderFooterContext.cxx b/xmloff/source/style/PageHeaderFooterContext.cxx index 155338cb335b..3a0526eeea07 100644 --- a/xmloff/source/style/PageHeaderFooterContext.cxx +++ b/xmloff/source/style/PageHeaderFooterContext.cxx @@ -54,7 +54,7 @@ SvXMLImportContext *PageHeaderFooterContext::CreateChildContext( sal_uInt16 nPre const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; if( XML_NAMESPACE_STYLE == nPrefix && IsXMLToken( rLName, XML_HEADER_FOOTER_PROPERTIES ) ) { diff --git a/xmloff/source/style/PageMasterExportPropMapper.cxx b/xmloff/source/style/PageMasterExportPropMapper.cxx index 8dd4b0266576..f556c0d42b72 100644 --- a/xmloff/source/style/PageMasterExportPropMapper.cxx +++ b/xmloff/source/style/PageMasterExportPropMapper.cxx @@ -101,29 +101,29 @@ struct XMLPropertyStateBuffer }; XMLPropertyStateBuffer::XMLPropertyStateBuffer() - : pPMMarginAll( NULL ) - , pPMMarginTop( NULL ) - , pPMMarginBottom( NULL ) - , pPMMarginLeft( NULL ) - , pPMMarginRight( NULL ) + : pPMMarginAll( nullptr ) + , pPMMarginTop( nullptr ) + , pPMMarginBottom( nullptr ) + , pPMMarginLeft( nullptr ) + , pPMMarginRight( nullptr ) , - pPMBorderAll( NULL ), - pPMBorderTop( NULL ), - pPMBorderBottom( NULL ), - pPMBorderLeft( NULL ), - pPMBorderRight( NULL ), - - pPMBorderWidthAll( NULL ), - pPMBorderWidthTop( NULL ), - pPMBorderWidthBottom( NULL ), - pPMBorderWidthLeft( NULL ), - pPMBorderWidthRight( NULL ), - - pPMPaddingAll( NULL ), - pPMPaddingTop( NULL ), - pPMPaddingBottom( NULL ), - pPMPaddingLeft( NULL ), - pPMPaddingRight( NULL ) + pPMBorderAll( nullptr ), + pPMBorderTop( nullptr ), + pPMBorderBottom( nullptr ), + pPMBorderLeft( nullptr ), + pPMBorderRight( nullptr ), + + pPMBorderWidthAll( nullptr ), + pPMBorderWidthTop( nullptr ), + pPMBorderWidthBottom( nullptr ), + pPMBorderWidthLeft( nullptr ), + pPMBorderWidthRight( nullptr ), + + pPMPaddingAll( nullptr ), + pPMPaddingTop( nullptr ), + pPMPaddingBottom( nullptr ), + pPMPaddingLeft( nullptr ), + pPMPaddingRight( nullptr ) { } @@ -263,8 +263,8 @@ void XMLPageMasterExportPropMapper::handleElementItem( default: assert(false); } - const Any* pPos = NULL; - const Any* pFilter = NULL; + const Any* pPos = nullptr; + const Any* pFilter = nullptr; sal_uInt32 nIndex(nIdx - 1); const XMLPropertyState& rFilter = (*pProperties)[nIndex]; if (getPropertySetMapper()->GetEntryContextId(rFilter.mnIndex) == nFilter) @@ -279,7 +279,7 @@ void XMLPageMasterExportPropMapper::handleElementItem( --nIndex; } sal_uInt32 nPropIndex = rProperty.mnIndex; - pThis->aBackgroundImageExport.exportXML( rProperty.maValue, pPos, pFilter, NULL, + pThis->aBackgroundImageExport.exportXML( rProperty.maValue, pPos, pFilter, nullptr, getPropertySetMapper()->GetEntryNameSpace( nPropIndex ), getPropertySetMapper()->GetEntryXMLName( nPropIndex ) ); } @@ -313,33 +313,33 @@ void XMLPageMasterExportPropMapper::ContextFilter( XMLPropertyStateBuffer aHeaderBuffer; XMLPropertyStateBuffer aFooterBuffer; - XMLPropertyState* pPMHeaderHeight = NULL; - XMLPropertyState* pPMHeaderMinHeight = NULL; - XMLPropertyState* pPMHeaderDynamic = NULL; + XMLPropertyState* pPMHeaderHeight = nullptr; + XMLPropertyState* pPMHeaderMinHeight = nullptr; + XMLPropertyState* pPMHeaderDynamic = nullptr; - XMLPropertyState* pPMFooterHeight = NULL; - XMLPropertyState* pPMFooterMinHeight = NULL; - XMLPropertyState* pPMFooterDynamic = NULL; + XMLPropertyState* pPMFooterHeight = nullptr; + XMLPropertyState* pPMFooterMinHeight = nullptr; + XMLPropertyState* pPMFooterDynamic = nullptr; - XMLPropertyState* pPMScaleTo = NULL; - XMLPropertyState* pPMScaleToPages = NULL; - XMLPropertyState* pPMScaleToX = NULL; - XMLPropertyState* pPMScaleToY = NULL; - XMLPropertyState* pPMStandardMode = NULL; - XMLPropertyState* pPMGridBaseWidth = NULL; + XMLPropertyState* pPMScaleTo = nullptr; + XMLPropertyState* pPMScaleToPages = nullptr; + XMLPropertyState* pPMScaleToX = nullptr; + XMLPropertyState* pPMScaleToY = nullptr; + XMLPropertyState* pPMStandardMode = nullptr; + XMLPropertyState* pPMGridBaseWidth = nullptr; // same as pPMGridSnapTo but for backward compatibility only - XMLPropertyState* pPMGridSnapToChars = NULL; - XMLPropertyState* pPMGridSnapTo = NULL; + XMLPropertyState* pPMGridSnapToChars = nullptr; + XMLPropertyState* pPMGridSnapTo = nullptr; - XMLPropertyState* pPrint = NULL; + XMLPropertyState* pPrint = nullptr; //UUUU - XMLPropertyState* pRepeatOffsetX = NULL; - XMLPropertyState* pRepeatOffsetY = NULL; - XMLPropertyState* pHeaderRepeatOffsetX = NULL; - XMLPropertyState* pHeaderRepeatOffsetY = NULL; - XMLPropertyState* pFooterRepeatOffsetX = NULL; - XMLPropertyState* pFooterRepeatOffsetY = NULL; + XMLPropertyState* pRepeatOffsetX = nullptr; + XMLPropertyState* pRepeatOffsetY = nullptr; + XMLPropertyState* pHeaderRepeatOffsetX = nullptr; + XMLPropertyState* pHeaderRepeatOffsetY = nullptr; + XMLPropertyState* pFooterRepeatOffsetX = nullptr; + XMLPropertyState* pFooterRepeatOffsetY = nullptr; rtl::Reference < XMLPropertySetMapper > aPropMapper(getPropertySetMapper()); diff --git a/xmloff/source/style/PageMasterExportPropMapper.hxx b/xmloff/source/style/PageMasterExportPropMapper.hxx index 99462120f2ae..bee90cb2b2ff 100644 --- a/xmloff/source/style/PageMasterExportPropMapper.hxx +++ b/xmloff/source/style/PageMasterExportPropMapper.hxx @@ -49,7 +49,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; virtual void handleSpecialItem( @@ -57,7 +57,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; }; diff --git a/xmloff/source/style/PageMasterImportContext.cxx b/xmloff/source/style/PageMasterImportContext.cxx index 08385cdbea35..f1f6fa31da4e 100644 --- a/xmloff/source/style/PageMasterImportContext.cxx +++ b/xmloff/source/style/PageMasterImportContext.cxx @@ -285,7 +285,7 @@ void PageStyleContext::FillPropertySet(const uno::Reference<beans::XPropertySet aSeq[0] = sStyleName; GetImport().SetError( XMLERROR_STYLE_PROP_VALUE | XMLERROR_FLAG_WARNING, - aSeq,e.Message,NULL); + aSeq,e.Message,nullptr); } break; } diff --git a/xmloff/source/style/PageMasterImportPropMapper.cxx b/xmloff/source/style/PageMasterImportPropMapper.cxx index b408c6a2c261..c6078c0b4d78 100644 --- a/xmloff/source/style/PageMasterImportPropMapper.cxx +++ b/xmloff/source/style/PageMasterImportPropMapper.cxx @@ -85,44 +85,44 @@ bool PageMasterImportPropertyMapper::handleSpecialItem( void PageMasterImportPropertyMapper::finished(std::vector< XMLPropertyState >& rProperties, sal_Int32 nStartIndex, sal_Int32 nEndIndex ) const { SvXMLImportPropertyMapper::finished(rProperties, nStartIndex, nEndIndex); - XMLPropertyState* pAllPaddingProperty = NULL; - XMLPropertyState* pPadding[4] = { NULL, NULL, NULL, NULL }; - XMLPropertyState* pNewPadding[4] = { NULL, NULL, NULL, NULL }; - XMLPropertyState* pAllBorderProperty = NULL; - XMLPropertyState* pBorders[4] = { NULL, NULL, NULL, NULL }; - XMLPropertyState* pNewBorders[4] = { NULL, NULL, NULL, NULL }; - XMLPropertyState* pAllBorderWidthProperty = NULL; - XMLPropertyState* pBorderWidths[4] = { NULL, NULL, NULL, NULL }; - XMLPropertyState* pAllHeaderPaddingProperty = NULL; - XMLPropertyState* pHeaderPadding[4] = { NULL, NULL, NULL, NULL }; - XMLPropertyState* pHeaderNewPadding[4] = { NULL, NULL, NULL, NULL }; - XMLPropertyState* pAllHeaderBorderProperty = NULL; - XMLPropertyState* pHeaderBorders[4] = { NULL, NULL, NULL, NULL }; - XMLPropertyState* pHeaderNewBorders[4] = { NULL, NULL, NULL, NULL }; - XMLPropertyState* pAllHeaderBorderWidthProperty = NULL; - XMLPropertyState* pHeaderBorderWidths[4] = { NULL, NULL, NULL, NULL }; - XMLPropertyState* pAllFooterPaddingProperty = NULL; - XMLPropertyState* pFooterPadding[4] = { NULL, NULL, NULL, NULL }; - XMLPropertyState* pFooterNewPadding[4] = { NULL, NULL, NULL, NULL }; - XMLPropertyState* pAllFooterBorderProperty = NULL; - XMLPropertyState* pFooterBorders[4] = { NULL, NULL, NULL, NULL }; - XMLPropertyState* pFooterNewBorders[4] = { NULL, NULL, NULL, NULL }; - XMLPropertyState* pAllFooterBorderWidthProperty = NULL; - XMLPropertyState* pFooterBorderWidths[4] = { NULL, NULL, NULL, NULL }; - XMLPropertyState* pHeaderHeight = NULL; - XMLPropertyState* pHeaderMinHeight = NULL; + XMLPropertyState* pAllPaddingProperty = nullptr; + XMLPropertyState* pPadding[4] = { nullptr, nullptr, nullptr, nullptr }; + XMLPropertyState* pNewPadding[4] = { nullptr, nullptr, nullptr, nullptr }; + XMLPropertyState* pAllBorderProperty = nullptr; + XMLPropertyState* pBorders[4] = { nullptr, nullptr, nullptr, nullptr }; + XMLPropertyState* pNewBorders[4] = { nullptr, nullptr, nullptr, nullptr }; + XMLPropertyState* pAllBorderWidthProperty = nullptr; + XMLPropertyState* pBorderWidths[4] = { nullptr, nullptr, nullptr, nullptr }; + XMLPropertyState* pAllHeaderPaddingProperty = nullptr; + XMLPropertyState* pHeaderPadding[4] = { nullptr, nullptr, nullptr, nullptr }; + XMLPropertyState* pHeaderNewPadding[4] = { nullptr, nullptr, nullptr, nullptr }; + XMLPropertyState* pAllHeaderBorderProperty = nullptr; + XMLPropertyState* pHeaderBorders[4] = { nullptr, nullptr, nullptr, nullptr }; + XMLPropertyState* pHeaderNewBorders[4] = { nullptr, nullptr, nullptr, nullptr }; + XMLPropertyState* pAllHeaderBorderWidthProperty = nullptr; + XMLPropertyState* pHeaderBorderWidths[4] = { nullptr, nullptr, nullptr, nullptr }; + XMLPropertyState* pAllFooterPaddingProperty = nullptr; + XMLPropertyState* pFooterPadding[4] = { nullptr, nullptr, nullptr, nullptr }; + XMLPropertyState* pFooterNewPadding[4] = { nullptr, nullptr, nullptr, nullptr }; + XMLPropertyState* pAllFooterBorderProperty = nullptr; + XMLPropertyState* pFooterBorders[4] = { nullptr, nullptr, nullptr, nullptr }; + XMLPropertyState* pFooterNewBorders[4] = { nullptr, nullptr, nullptr, nullptr }; + XMLPropertyState* pAllFooterBorderWidthProperty = nullptr; + XMLPropertyState* pFooterBorderWidths[4] = { nullptr, nullptr, nullptr, nullptr }; + XMLPropertyState* pHeaderHeight = nullptr; + XMLPropertyState* pHeaderMinHeight = nullptr; std::unique_ptr<XMLPropertyState> xHeaderDynamic; - XMLPropertyState* pFooterHeight = NULL; - XMLPropertyState* pFooterMinHeight = NULL; + XMLPropertyState* pFooterHeight = nullptr; + XMLPropertyState* pFooterMinHeight = nullptr; std::unique_ptr<XMLPropertyState> xFooterDynamic; - XMLPropertyState* pAllMarginProperty = NULL; - XMLPropertyState* pMargins[4] = { NULL, NULL, NULL, NULL }; + XMLPropertyState* pAllMarginProperty = nullptr; + XMLPropertyState* pMargins[4] = { nullptr, nullptr, nullptr, nullptr }; std::unique_ptr<XMLPropertyState> pNewMargins[4]; - XMLPropertyState* pAllHeaderMarginProperty = NULL; - XMLPropertyState* pHeaderMargins[4] = { NULL, NULL, NULL, NULL }; + XMLPropertyState* pAllHeaderMarginProperty = nullptr; + XMLPropertyState* pHeaderMargins[4] = { nullptr, nullptr, nullptr, nullptr }; std::unique_ptr<XMLPropertyState> pNewHeaderMargins[4]; - XMLPropertyState* pAllFooterMarginProperty = NULL; - XMLPropertyState* pFooterMargins[4] = { NULL, NULL, NULL, NULL }; + XMLPropertyState* pAllFooterMarginProperty = nullptr; + XMLPropertyState* pFooterMargins[4] = { nullptr, nullptr, nullptr, nullptr }; std::unique_ptr<XMLPropertyState> pNewFooterMargins[4]; std::vector< XMLPropertyState >::iterator aEnd = rProperties.end(); diff --git a/xmloff/source/style/PageMasterStyleMap.cxx b/xmloff/source/style/PageMasterStyleMap.cxx index 02c248d5249a..c904decfb8a3 100644 --- a/xmloff/source/style/PageMasterStyleMap.cxx +++ b/xmloff/source/style/PageMasterStyleMap.cxx @@ -269,7 +269,7 @@ const XMLPropertyMapEntry aXMLPageMasterStyleMap[] = HFMAP( "FooterFillBitmapOffsetX", XML_NAMESPACE_DRAW, XML_TILE_REPEAT_OFFSET, XML_SW_TYPE_BITMAPREPOFFSETX|MID_FLAG_MULTI_PROPERTY, CTF_PM_FOOTERREPEAT_OFFSET_X ), HFMAP( "FooterFillBitmapOffsetY", XML_NAMESPACE_DRAW, XML_TILE_REPEAT_OFFSET, XML_SW_TYPE_BITMAPREPOFFSETY|MID_FLAG_MULTI_PROPERTY, CTF_PM_FOOTERREPEAT_OFFSET_Y ), - { 0L, 0, 0, XML_EMPTY, 0, 0, SvtSaveOptions::ODFVER_010, false } // index 190 + { nullptr, 0, 0, XML_EMPTY, 0, 0, SvtSaveOptions::ODFVER_010, false } // index 190 }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/PagePropertySetContext.cxx b/xmloff/source/style/PagePropertySetContext.cxx index 9fa55fb4c47c..a75af1aa8901 100644 --- a/xmloff/source/style/PagePropertySetContext.cxx +++ b/xmloff/source/style/PagePropertySetContext.cxx @@ -73,7 +73,7 @@ SvXMLImportContext *PagePropertySetContext::CreateChildContext( default: break; } - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; switch( mxMapper->getPropertySetMapper() ->GetEntryContextId( rProp.mnIndex ) ) diff --git a/xmloff/source/style/SinglePropertySetInfoCache.cxx b/xmloff/source/style/SinglePropertySetInfoCache.cxx index aff0fa11761c..e1ca7281ee29 100644 --- a/xmloff/source/style/SinglePropertySetInfoCache.cxx +++ b/xmloff/source/style/SinglePropertySetInfoCache.cxx @@ -41,7 +41,7 @@ bool SinglePropertySetInfoCache::hasProperty( // getPropertySetInfo returns a new object; Such property set infos must not // be cached: WeakReference < XPropertySetInfo > xWeakInfo( rPropSetInfo ); - rPropSetInfo = 0; + rPropSetInfo = nullptr; rPropSetInfo = xWeakInfo; if( rPropSetInfo.is() ) { diff --git a/xmloff/source/style/StyleMap.cxx b/xmloff/source/style/StyleMap.cxx index 339f8e8e20c2..73ee7980d015 100644 --- a/xmloff/source/style/StyleMap.cxx +++ b/xmloff/source/style/StyleMap.cxx @@ -58,7 +58,7 @@ StyleMap* StyleMap::getImplementation(Reference<XInterface> xInterface) throw() return reinterpret_cast<StyleMap*>(xUnoTunnel->getSomething(StyleMap::getUnoTunnelId())); } - return 0; + return nullptr; } // XUnoTunnel diff --git a/xmloff/source/style/XMLBackgroundImageContext.cxx b/xmloff/source/style/XMLBackgroundImageContext.cxx index a0ee84b2b7de..06c736422785 100644 --- a/xmloff/source/style/XMLBackgroundImageContext.cxx +++ b/xmloff/source/style/XMLBackgroundImageContext.cxx @@ -353,7 +353,7 @@ SvXMLImportContext *XMLBackgroundImageContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const 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 ) ) @@ -384,7 +384,7 @@ void XMLBackgroundImageContext::EndElement() else if( xBase64Stream.is() ) { sURL = GetImport().ResolveGraphicObjectURLFromBase64( xBase64Stream ); - xBase64Stream = 0; + xBase64Stream = nullptr; } if( sURL.isEmpty() ) diff --git a/xmloff/source/style/XMLFontStylesContext.cxx b/xmloff/source/style/XMLFontStylesContext.cxx index a4ed61ae25ca..ebae761711e9 100644 --- a/xmloff/source/style/XMLFontStylesContext.cxx +++ b/xmloff/source/style/XMLFontStylesContext.cxx @@ -408,7 +408,7 @@ bool XMLFontStylesContext::FillProperties( const OUString& rName, if( pFontStyle ) pFontStyle->FillProperties( rProps, nFamilyNameIdx, nStyleNameIdx, nFamilyIdx, nPitchIdx, nCharsetIdx ); - return 0 != pFontStyle; + return nullptr != pFontStyle; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/impastpl.cxx b/xmloff/source/style/impastpl.cxx index 7c83433b2b34..8e6fe7c35c13 100644 --- a/xmloff/source/style/impastpl.cxx +++ b/xmloff/source/style/impastpl.cxx @@ -175,7 +175,7 @@ XMLAutoStylePoolProperties::XMLAutoStylePoolProperties( XMLAutoStyleFamily& rFam : maProperties( rProperties ), mnPos ( rFamilyData.mnCount ) { - static bool bHack = (getenv("LIBO_ONEWAY_STABLE_ODF_EXPORT") != NULL); + static bool bHack = (getenv("LIBO_ONEWAY_STABLE_ODF_EXPORT") != nullptr); if (bHack) { @@ -279,7 +279,7 @@ XMLAutoStylePoolParent::~XMLAutoStylePoolParent() bool XMLAutoStylePoolParent::Add( XMLAutoStyleFamily& rFamilyData, const vector< XMLPropertyState >& rProperties, OUString& rName, bool bDontSeek ) { bool bAdded = false; - XMLAutoStylePoolProperties *pProperties = 0; + XMLAutoStylePoolProperties *pProperties = nullptr; sal_Int32 nProperties = rProperties.size(); size_t i = 0; for (size_t n = m_PropertiesList.size(); i < n; ++i) @@ -594,7 +594,7 @@ struct AutoStylePoolExport const OUString* mpParent; XMLAutoStylePoolProperties* mpProperties; - AutoStylePoolExport() : mpParent(NULL), mpProperties(NULL) {} + AutoStylePoolExport() : mpParent(nullptr), mpProperties(nullptr) {} }; struct StyleComparator @@ -646,7 +646,7 @@ void SvXMLAutoStylePoolP_Impl::exportXML( } } - static bool bHack = (getenv("LIBO_ONEWAY_STABLE_ODF_EXPORT") != NULL); + static bool bHack = (getenv("LIBO_ONEWAY_STABLE_ODF_EXPORT") != nullptr); if (bHack) { diff --git a/xmloff/source/style/numehelp.cxx b/xmloff/source/style/numehelp.cxx index 546518a40da9..e6b025a984f4 100644 --- a/xmloff/source/style/numehelp.cxx +++ b/xmloff/source/style/numehelp.cxx @@ -44,7 +44,7 @@ using namespace xmloff::token; XMLNumberFormatAttributesExportHelper::XMLNumberFormatAttributesExportHelper( ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier >& xTempNumberFormatsSupplier) : xNumberFormats(xTempNumberFormatsSupplier.is() ? xTempNumberFormatsSupplier->getNumberFormats() : ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats > ()), - pExport(NULL), + pExport(nullptr), sStandardFormat(XML_STANDARDFORMAT), sType(XML_TYPE), msCurrencySymbol(XML_CURRENCYSYMBOL), diff --git a/xmloff/source/style/prhdlfac.cxx b/xmloff/source/style/prhdlfac.cxx index b60119da7164..888983c3aaf0 100644 --- a/xmloff/source/style/prhdlfac.cxx +++ b/xmloff/source/style/prhdlfac.cxx @@ -127,7 +127,7 @@ const XMLPropertyHandler* XMLPropertyHandlerFactory::GetPropertyHandler( sal_Int // Helper-methods to create and cache PropertyHandler const XMLPropertyHandler* XMLPropertyHandlerFactory::GetHdlCache( sal_Int32 nType ) const { - const XMLPropertyHandler* pRet = NULL; + const XMLPropertyHandler* pRet = nullptr; if( mpImpl->maHandlerCache.find( nType ) != mpImpl->maHandlerCache.end() ) pRet = mpImpl->maHandlerCache.find( nType )->second; @@ -157,7 +157,7 @@ const XMLPropertyHandler* XMLPropertyHandlerFactory::GetBasicHandler( sal_Int32 const XMLPropertyHandler* XMLPropertyHandlerFactory::CreatePropertyHandler( sal_Int32 nType ) { - XMLPropertyHandler* pPropHdl = NULL; + XMLPropertyHandler* pPropHdl = nullptr; switch( nType ) { diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx index 45723a99d87e..123ef7efc8f7 100644 --- a/xmloff/source/style/prstylei.cxx +++ b/xmloff/source/style/prstylei.cxx @@ -163,7 +163,7 @@ SvXMLImportContext *XMLPropStyleContext::CreateChildContext( const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; sal_uInt32 nFamily = 0; if( XML_NAMESPACE_STYLE == nPrefix || XML_NAMESPACE_LO_EXT == nPrefix ) @@ -478,7 +478,7 @@ void XMLPropStyleContext::Finish( bool bOverwrite ) GetImport().SetError( XMLERROR_FLAG_ERROR | XMLERROR_PARENT_STYLE_NOT_ALLOWED, - aSequence, e.Message, NULL ); + aSequence, e.Message, nullptr ); } } diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx index bfcc89c38ec5..e03c6e400e31 100644 --- a/xmloff/source/style/xmlexppr.cxx +++ b/xmloff/source/style/xmlexppr.cxx @@ -199,7 +199,7 @@ public: FilterPropertiesInfo_Impl::FilterPropertiesInfo_Impl() : nCount(0), aPropInfos(), - pApiNames( 0 ) + pApiNames( nullptr ) { aLastItr = aPropInfos.begin(); } @@ -219,7 +219,7 @@ void FilterPropertiesInfo_Impl::AddProperty( if( pApiNames ) { delete pApiNames; - pApiNames = NULL; + pApiNames = nullptr; } } @@ -354,7 +354,7 @@ void FilterPropertiesInfo_Impl::FillPropertyStateArray( else { Sequence < PropertyState > aStates; - const PropertyState *pStates = 0; + const PropertyState *pStates = nullptr; Reference< XPropertyState > xPropState( rPropSet, UNO_QUERY ); if( xPropState.is() ) { @@ -594,7 +594,7 @@ vector<XMLPropertyState> SvXMLExportPropertyMapper::_Filter( sal_Int32 nProps = mpImpl->mxPropMapper->GetEntryCount(); - FilterPropertiesInfo_Impl *pFilterInfo = 0; + FilterPropertiesInfo_Impl *pFilterInfo = nullptr; Impl::CacheType::iterator aIter = mpImpl->maCache.find(xInfo); if (aIter != mpImpl->maCache.end()) @@ -903,7 +903,7 @@ void SvXMLExportPropertyMapper::_exportXML( uno::Reference< container::XNameContainer > xAttrContainer; if( (rProperty.maValue >>= xAttrContainer) && xAttrContainer.is() ) { - SvXMLNamespaceMap *pNewNamespaceMap = 0; + SvXMLNamespaceMap *pNewNamespaceMap = nullptr; const SvXMLNamespaceMap *pNamespaceMap = &rNamespaceMap; uno::Sequence< OUString > aAttribNames( xAttrContainer->getElementNames() ); diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx index b85e0c7f7b71..5bb140a976bf 100644 --- a/xmloff/source/style/xmlimppr.cxx +++ b/xmloff/source/style/xmlimppr.cxx @@ -68,7 +68,7 @@ SvXMLImportPropertyMapper::SvXMLImportPropertyMapper( SvXMLImportPropertyMapper::~SvXMLImportPropertyMapper() { - mxNextMapper = 0; + mxNextMapper = nullptr; } void SvXMLImportPropertyMapper::ChainImportMapper( @@ -386,7 +386,7 @@ void SvXMLImportPropertyMapper::CheckSpecialContext( const sal_Int32 nPropFlags = maPropMapper->GetEntryFlags( nIdx ); // handle no-property and special items - if( ( pSpecialContextIds != NULL ) && + if( ( pSpecialContextIds != nullptr ) && ( ( 0 != ( nPropFlags & MID_FLAG_NO_PROPERTY_IMPORT ) ) || ( 0 != ( nPropFlags & MID_FLAG_SPECIAL_ITEM_IMPORT ) ) ) ) { @@ -496,7 +496,7 @@ bool SvXMLImportPropertyMapper::_FillPropertySet( aSeq[0] = rPropName; rImport.SetError( XMLERROR_STYLE_PROP_VALUE | XMLERROR_FLAG_ERROR, - aSeq, e.Message, NULL ); + aSeq, e.Message, nullptr ); } } catch ( const UnknownPropertyException& e ) @@ -506,7 +506,7 @@ bool SvXMLImportPropertyMapper::_FillPropertySet( aSeq[0] = rPropName; rImport.SetError( XMLERROR_STYLE_PROP_UNKNOWN | XMLERROR_FLAG_ERROR, - aSeq, e.Message, NULL ); + aSeq, e.Message, nullptr ); } catch ( const PropertyVetoException& e ) { @@ -515,7 +515,7 @@ bool SvXMLImportPropertyMapper::_FillPropertySet( aSeq[0] = rPropName; rImport.SetError( XMLERROR_STYLE_PROP_OTHER | XMLERROR_FLAG_ERROR, - aSeq, e.Message, NULL ); + aSeq, e.Message, nullptr ); } catch ( const WrappedTargetException& e ) { @@ -524,12 +524,12 @@ bool SvXMLImportPropertyMapper::_FillPropertySet( aSeq[0] = rPropName; rImport.SetError( XMLERROR_STYLE_PROP_OTHER | XMLERROR_FLAG_ERROR, - aSeq, e.Message, NULL ); + aSeq, e.Message, nullptr ); } } // handle no-property and special items - if( ( pSpecialContextIds != NULL ) && + if( ( pSpecialContextIds != nullptr ) && ( ( 0 != ( nPropFlags & MID_FLAG_NO_PROPERTY_IMPORT ) ) || ( 0 != ( nPropFlags & MID_FLAG_SPECIAL_ITEM_IMPORT ) ) ) ) { @@ -605,7 +605,7 @@ void SvXMLImportPropertyMapper::_PrepareForMultiPropertySet( } // handle no-property and special items - if( ( pSpecialContextIds != NULL ) && + if( ( pSpecialContextIds != nullptr ) && ( ( 0 != ( nPropFlags & MID_FLAG_NO_PROPERTY_IMPORT ) ) || ( 0 != ( nPropFlags & MID_FLAG_SPECIAL_ITEM_IMPORT ) ) ) ) { @@ -695,7 +695,7 @@ bool SvXMLImportPropertyMapper::_FillTolerantMultiPropertySet( Sequence<OUString> aNames; Sequence<Any> aValues; - _PrepareForMultiPropertySet(rProperties, Reference<XPropertySetInfo>(NULL), rPropMapper, pSpecialContextIds, + _PrepareForMultiPropertySet(rProperties, Reference<XPropertySetInfo>(nullptr), rPropMapper, pSpecialContextIds, aNames, aValues); // and, finally, try to set the values @@ -729,7 +729,7 @@ bool SvXMLImportPropertyMapper::_FillTolerantMultiPropertySet( }; rImport.SetError( XMLERROR_STYLE_PROP_OTHER | XMLERROR_FLAG_ERROR, - aSeq, sMessage, NULL ); + aSeq, sMessage, nullptr ); } } } diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index 6801d3c05fbf..136c3d24bf2e 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -229,9 +229,9 @@ SvXMLNumFmtExport::SvXMLNumFmtExport( const uno::Reference< util::XNumberFormatsSupplier >& rSupp ) : rExport( rExp ), sPrefix( OUString("N") ), - pFormatter( NULL ), - pCharClass( NULL ), - pLocaleData( NULL ) + pFormatter( nullptr ), + pCharClass( nullptr ), + pLocaleData( nullptr ) { // supplier must be SvNumberFormatsSupplierObj SvNumberFormatsSupplierObj* pObj = @@ -264,9 +264,9 @@ SvXMLNumFmtExport::SvXMLNumFmtExport( const OUString& rPrefix ) : rExport( rExp ), sPrefix( rPrefix ), - pFormatter( NULL ), - pCharClass( NULL ), - pLocaleData( NULL ) + pFormatter( nullptr ), + pCharClass( nullptr ), + pLocaleData( nullptr ) { // supplier must be SvNumberFormatsSupplierObj SvNumberFormatsSupplierObj* pObj = @@ -1743,7 +1743,7 @@ void SvXMLNumFmtExport::Export( bool bIsAutoStyle ) return; // no formatter -> no entries sal_uInt32 nKey; - const SvNumberformat* pFormat = NULL; + const SvNumberformat* pFormat = nullptr; bool bNext(pUsedList->GetFirstUsed(nKey)); while(bNext) { @@ -1797,7 +1797,7 @@ OUString SvXMLNumFmtExport::GetStyleName( sal_uInt32 nKey ) void SvXMLNumFmtExport::SetUsed( sal_uInt32 nKey ) { - DBG_ASSERT( pFormatter != NULL, "missing formatter" ); + DBG_ASSERT( pFormatter != nullptr, "missing formatter" ); if( !pFormatter ) return; @@ -1823,7 +1823,7 @@ void SvXMLNumFmtExport::SetWasUsed(const uno::Sequence<sal_Int32>& rWasUsed) static const SvNumberformat* lcl_GetFormat( SvNumberFormatter* pFormatter, sal_uInt32 nKey ) { - return ( pFormatter != NULL ) ? pFormatter->GetEntry( nKey ) : NULL; + return ( pFormatter != nullptr ) ? pFormatter->GetEntry( nKey ) : nullptr; } sal_uInt32 SvXMLNumFmtExport::ForceSystemLanguage( sal_uInt32 nKey ) @@ -1831,9 +1831,9 @@ sal_uInt32 SvXMLNumFmtExport::ForceSystemLanguage( sal_uInt32 nKey ) sal_uInt32 nRet = nKey; const SvNumberformat* pFormat = lcl_GetFormat( pFormatter, nKey ); - if( pFormat != NULL ) + if( pFormat != nullptr ) { - DBG_ASSERT( pFormatter != NULL, "format without formatter?" ); + DBG_ASSERT( pFormatter != nullptr, "format without formatter?" ); sal_Int32 nErrorPos; short nType = pFormat->GetType(); diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index c375a78824ef..a6fdf38bbf0d 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -361,11 +361,11 @@ SvXMLNumImpData::SvXMLNumImpData( SvNumberFormatter* pFmt, const uno::Reference<uno::XComponentContext>& rxContext ) : pFormatter(pFmt), - pStylesElemTokenMap(NULL), - pStyleElemTokenMap(NULL), - pStyleAttrTokenMap(NULL), - pStyleElemAttrTokenMap(NULL), - pLocaleData(NULL), + pStylesElemTokenMap(nullptr), + pStyleElemTokenMap(nullptr), + pStyleAttrTokenMap(nullptr), + pStyleElemAttrTokenMap(nullptr), + pLocaleData(nullptr), m_xContext(rxContext) { DBG_ASSERT( rxContext.is(), "got no service manager" ); @@ -1429,7 +1429,7 @@ SvXMLNumFormatContext::SvXMLNumFormatContext( SvXMLImport& rImport, const sal_Int32 nTempKey, SvXMLStylesContext& rStyles ) : SvXMLStyleContext( rImport, nPrfx, rLName, xAttrList, XML_STYLE_FAMILY_DATA_STYLE ), - pData( NULL ), + pData( nullptr ), pStyles( &rStyles ), aMyConditions(), nType( 0 ), @@ -1465,7 +1465,7 @@ SvXMLImportContext* SvXMLNumFormatContext::CreateChildContext( sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext* pContext = NULL; + SvXMLImportContext* pContext = nullptr; const SvXMLTokenMap& rTokenMap = pData->GetStyleElemTokenMap(); sal_uInt16 nToken = rTokenMap.Get( nPrfx, rLName ); @@ -1556,7 +1556,7 @@ sal_Int32 SvXMLNumFormatContext::CreateAndInsert( com::sun::star::uno::Reference { if (nKey <= -1) { - SvNumberFormatter* pFormatter = NULL; + SvNumberFormatter* pFormatter = nullptr; SvNumberFormatsSupplierObj* pObj = SvNumberFormatsSupplierObj::getImplementation( xFormatsSupplier ); if (pObj) @@ -2200,7 +2200,7 @@ SvXMLNumFmtHelper::SvXMLNumFmtHelper( { DBG_ASSERT( rxContext.is(), "got no service manager" ); - SvNumberFormatter* pFormatter = NULL; + SvNumberFormatter* pFormatter = nullptr; SvNumberFormatsSupplierObj* pObj = SvNumberFormatsSupplierObj::getImplementation( rSupp ); if (pObj) @@ -2231,7 +2231,7 @@ SvXMLStyleContext* SvXMLNumFmtHelper::CreateChildContext( SvXMLImport& rImport, const uno::Reference<xml::sax::XAttributeList>& xAttrList, SvXMLStylesContext& rStyles ) { - SvXMLStyleContext* pContext = NULL; + SvXMLStyleContext* pContext = nullptr; const SvXMLTokenMap& rTokenMap = pData->GetStylesElemTokenMap(); sal_uInt16 nToken = rTokenMap.Get( nPrefix, rLocalName ); diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx index 107fba272ec8..80d1419ca173 100644 --- a/xmloff/source/style/xmlnumi.cxx +++ b/xmloff/source/style/xmlnumi.cxx @@ -370,7 +370,7 @@ SvXMLImportContext *SvxXMLListLevelStyleContext_Impl::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; if( XML_NAMESPACE_STYLE == nPrefix && ( IsXMLToken( rLocalName, XML_LIST_LEVEL_PROPERTIES ) || IsXMLToken( rLocalName, XML_TEXT_PROPERTIES ) ) ) @@ -903,7 +903,7 @@ SvXMLImportContext* SvxXMLListLevelStyleAttrContext_Impl::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; if ( XML_NAMESPACE_STYLE == nPrefix && IsXMLToken( rLocalName, XML_LIST_LEVEL_LABEL_ALIGNMENT ) ) { @@ -1025,7 +1025,7 @@ SvxXMLListStyleContext::SvxXMLListStyleContext( SvXMLImport& rImport, , sIsPhysical( "IsPhysical" ) , sNumberingRules( "NumberingRules" ) , sIsContinuousNumbering( "IsContinuousNumbering" ) -, pLevelStyles( 0 ) +, pLevelStyles( nullptr ) , nLevels( 0 ) , bConsecutive( false ) , bOutline( bOutl ) @@ -1054,7 +1054,7 @@ SvXMLImportContext *SvxXMLListStyleContext::CreateChildContext( const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; if( XML_NAMESPACE_TEXT == nPrefix && ( bOutline diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx index 2e2dcdbff01f..e7b17eca94bd 100644 --- a/xmloff/source/style/xmlstyle.cxx +++ b/xmloff/source/style/xmlstyle.cxx @@ -213,7 +213,7 @@ public: SvXMLStyleIndex_Impl( sal_uInt16 nFam, const OUString& rName ) : sName( rName ), nFamily( nFam ), - pStyle ( 0 ) + pStyle ( nullptr ) { } @@ -259,7 +259,7 @@ class SvXMLStylesContext_Impl mutable sal_uInt32 m_nIndexCreated; #endif - void FlushIndex() { delete pIndices; pIndices = 0; } + void FlushIndex() { delete pIndices; pIndices = nullptr; } public: explicit SvXMLStylesContext_Impl( bool bAuto ); @@ -269,7 +269,7 @@ public: SvXMLStyleContext *GetStyle( size_t i ) { - return i < aStyles.size() ? aStyles[ i ] : 0; + return i < aStyles.size() ? aStyles[ i ] : nullptr; } inline void AddStyle( SvXMLStyleContext *pStyle ); @@ -282,7 +282,7 @@ public: }; SvXMLStylesContext_Impl::SvXMLStylesContext_Impl( bool bAuto ) : - pIndices( 0 ), + pIndices( nullptr ), bAutomaticStyle( bAuto ) #if OSL_DEBUG_LEVEL > 0 , m_nIndexCreated( 0 ) @@ -325,7 +325,7 @@ const SvXMLStyleContext *SvXMLStylesContext_Impl::FindStyleChildContext( sal_uIn const OUString& rName, bool bCreateIndex ) const { - const SvXMLStyleContext *pStyle = 0; + const SvXMLStyleContext *pStyle = nullptr; if( !pIndices && bCreateIndex && !aStyles.empty() ) { @@ -384,7 +384,7 @@ SvXMLStyleContext *SvXMLStylesContext::CreateStyleChildContext( sal_uInt16 p_nPr const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & xAttrList ) { - SvXMLStyleContext *pStyle = NULL; + SvXMLStyleContext *pStyle = nullptr; if(GetImport().GetDataStylesImport()) { @@ -502,7 +502,7 @@ SvXMLStyleContext *SvXMLStylesContext::CreateStyleStyleChildContext( sal_uInt16 nFamily, sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & xAttrList ) { - SvXMLStyleContext *pStyle = 0; + SvXMLStyleContext *pStyle = nullptr; switch( nFamily ) { @@ -536,7 +536,7 @@ SvXMLStyleContext *SvXMLStylesContext::CreateDefaultStyleStyleChildContext( sal_uInt16 /*nFamily*/, sal_uInt16 /*nPrefix*/, const OUString& /*rLocalName*/, const uno::Reference< xml::sax::XAttributeList > & ) { - return 0; + return nullptr; } bool SvXMLStylesContext::InsertStyleFamily( sal_uInt16 ) const @@ -782,7 +782,7 @@ SvXMLStylesContext::SvXMLStylesContext( SvXMLImport& rImport, sal_uInt16 nPrfx, msParaStyleServiceName( "com.sun.star.style.ParagraphStyle" ), msTextStyleServiceName( "com.sun.star.style.CharacterStyle" ), mpImpl( new SvXMLStylesContext_Impl( bAuto ) ), - mpStyleStylesElemTokenMap( 0 ) + mpStyleStylesElemTokenMap( nullptr ) { } @@ -796,7 +796,7 @@ SvXMLImportContext *SvXMLStylesContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; SvXMLStyleContext *pStyle = CreateStyleChildContext( nPrefix, rLocalName, xAttrList ); diff --git a/xmloff/source/style/xmltabi.cxx b/xmloff/source/style/xmltabi.cxx index 529efd96c62c..75c6d8d22113 100644 --- a/xmloff/source/style/xmltabi.cxx +++ b/xmloff/source/style/xmltabi.cxx @@ -177,7 +177,7 @@ SvxXMLTabStopImportContext::SvxXMLTabStopImportContext( const XMLPropertyState& rProp, ::std::vector< XMLPropertyState > &rProps ) : XMLElementPropertyContext( rImport, nPrfx, rLName, rProp, rProps ), - mpTabStops( NULL ) + mpTabStops( nullptr ) { } @@ -201,7 +201,7 @@ SvXMLImportContext *SvxXMLTabStopImportContext::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_TAB_STOP ) ) { diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx index 38824f85f494..5f75bd0f1a73 100644 --- a/xmloff/source/table/XMLTableExport.cxx +++ b/xmloff/source/table/XMLTableExport.cxx @@ -61,7 +61,7 @@ using namespace ::com::sun::star::style; #define _MAP(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_010, false } #define CMAP(name,prefix,token,type,context) _MAP(name,prefix,token,type|XML_TYPE_PROP_TABLE_COLUMN,context) #define RMAP(name,prefix,token,type,context) _MAP(name,prefix,token,type|XML_TYPE_PROP_TABLE_ROW,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 } const XMLPropertyMapEntry* getColumnPropertiesMap() { diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx index fd4e6d4ae2e9..d60c3af208f5 100644 --- a/xmloff/source/table/XMLTableImport.cxx +++ b/xmloff/source/table/XMLTableImport.cxx @@ -643,7 +643,7 @@ SvXMLImportContext * XMLCellImportContext::CreateChildContext( sal_uInt16 nPrefi } } - SvXMLImportContext * pContext = 0; + SvXMLImportContext * pContext = nullptr; // if we have a text cursor, lets try to import some text if( mxCursor.is() ) diff --git a/xmloff/source/text/XMLChangeElementImportContext.cxx b/xmloff/source/text/XMLChangeElementImportContext.cxx index 8ec1685882b2..3acd3a62f6c6 100644 --- a/xmloff/source/text/XMLChangeElementImportContext.cxx +++ b/xmloff/source/text/XMLChangeElementImportContext.cxx @@ -52,7 +52,7 @@ SvXMLImportContext* XMLChangeElementImportContext::CreateChildContext( const OUString& rLocalName, const Reference<XAttributeList> & xAttrList) { - SvXMLImportContext* pContext = NULL; + SvXMLImportContext* pContext = nullptr; if ( (XML_NAMESPACE_OFFICE == nPrefix) && IsXMLToken( rLocalName, XML_CHANGE_INFO) ) @@ -69,7 +69,7 @@ SvXMLImportContext* XMLChangeElementImportContext::CreateChildContext( GetImport(), nPrefix, rLocalName, xAttrList, XML_TEXT_TYPE_CHANGED_REGION); - if (NULL == pContext) + if (nullptr == pContext) { // no text element // illegal element content! TODO: discard this redline! diff --git a/xmloff/source/text/XMLChangeInfoContext.cxx b/xmloff/source/text/XMLChangeInfoContext.cxx index 4ec494314c0b..9b4f7959cb34 100644 --- a/xmloff/source/text/XMLChangeInfoContext.cxx +++ b/xmloff/source/text/XMLChangeInfoContext.cxx @@ -62,7 +62,7 @@ SvXMLImportContext* XMLChangeInfoContext::CreateChildContext( const OUString& rLocalName, const Reference<XAttributeList >& xAttrList ) { - SvXMLImportContext* pContext = NULL; + SvXMLImportContext* pContext = nullptr; if( XML_NAMESPACE_DC == nPrefix ) { diff --git a/xmloff/source/text/XMLChangedRegionImportContext.cxx b/xmloff/source/text/XMLChangedRegionImportContext.cxx index 0914e05c6a42..b63ea3d8fefb 100644 --- a/xmloff/source/text/XMLChangedRegionImportContext.cxx +++ b/xmloff/source/text/XMLChangedRegionImportContext.cxx @@ -100,7 +100,7 @@ SvXMLImportContext* XMLChangedRegionImportContext::CreateChildContext( const OUString& rLocalName, const Reference<XAttributeList> & xAttrList) { - SvXMLImportContext* pContext = NULL; + SvXMLImportContext* pContext = nullptr; if (XML_NAMESPACE_TEXT == nPrefix) { @@ -120,7 +120,7 @@ SvXMLImportContext* XMLChangedRegionImportContext::CreateChildContext( // else: it may be a text element, see below } - if (NULL == pContext) + if (nullptr == pContext) { // illegal element content! TODO: discard the redlines // for the moment -> use text @@ -129,7 +129,7 @@ SvXMLImportContext* XMLChangedRegionImportContext::CreateChildContext( xAttrList); // or default if text fail - if (NULL == pContext) + if (nullptr == pContext) { pContext = SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList); @@ -151,7 +151,7 @@ void XMLChangedRegionImportContext::EndElement() rHelper->DeleteParagraph(); GetImport().GetTextImport()->SetCursor(xOldCursor); - xOldCursor = NULL; + xOldCursor = nullptr; } } @@ -162,7 +162,7 @@ void XMLChangedRegionImportContext::SetChangeInfo( const OUString& rDate) { util::DateTime aDateTime; - if (::sax::Converter::parseDateTime(aDateTime, 0, rDate)) + if (::sax::Converter::parseDateTime(aDateTime, nullptr, rDate)) { GetImport().GetTextImport()->RedlineAdd( rType, sID, rAuthor, rComment, aDateTime, bMergeLastPara); diff --git a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx index 2f28e3b6c2fa..67fafeba9212 100644 --- a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx +++ b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx @@ -137,7 +137,7 @@ XMLFootnoteConfigurationImportContext::XMLFootnoteConfigurationImportContext( , sPropertyBeginNotice("BeginNotice") , sNumFormat("1") , sNumSync("false") -, pAttrTokenMap(NULL) +, pAttrTokenMap(nullptr) , nOffset(0) , nNumbering(FootnoteNumbering::PER_PAGE) , bPosition(false) @@ -208,7 +208,7 @@ static const SvXMLTokenMapEntry aTextFieldAttrTokenMap[] = const SvXMLTokenMap& XMLFootnoteConfigurationImportContext::GetFtnConfigAttrTokenMap() { - if (NULL == pAttrTokenMap) + if (nullptr == pAttrTokenMap) { pAttrTokenMap = new SvXMLTokenMap(aTextFieldAttrTokenMap); } @@ -294,7 +294,7 @@ SvXMLImportContext *XMLFootnoteConfigurationImportContext::CreateChildContext( const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) { - SvXMLImportContext* pContext = NULL; + SvXMLImportContext* pContext = nullptr; if (!bIsEndnote) { @@ -320,7 +320,7 @@ SvXMLImportContext *XMLFootnoteConfigurationImportContext::CreateChildContext( } // else: endnote -> default context - if (pContext == NULL) + if (pContext == nullptr) { // default: delegate to super class pContext = SvXMLStyleContext::CreateChildContext(nPrefix, diff --git a/xmloff/source/text/XMLFootnoteImportContext.cxx b/xmloff/source/text/XMLFootnoteImportContext.cxx index 440ff064e466..723b2ed4a228 100644 --- a/xmloff/source/text/XMLFootnoteImportContext.cxx +++ b/xmloff/source/text/XMLFootnoteImportContext.cxx @@ -179,7 +179,7 @@ SvXMLImportContext *XMLFootnoteImportContext::CreateChildContext( const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) { - SvXMLImportContext* pContext = NULL; + SvXMLImportContext* pContext = nullptr; SvXMLTokenMap aTokenMap(aFootnoteChildTokenMap); diff --git a/xmloff/source/text/XMLIndexBodyContext.cxx b/xmloff/source/text/XMLIndexBodyContext.cxx index 35e63a7dbfa2..b3ffb8a00256 100644 --- a/xmloff/source/text/XMLIndexBodyContext.cxx +++ b/xmloff/source/text/XMLIndexBodyContext.cxx @@ -47,12 +47,12 @@ SvXMLImportContext* XMLIndexBodyContext::CreateChildContext( const OUString& rLocalName, const Reference<XAttributeList> & xAttrList) { - SvXMLImportContext* pContext = NULL; + SvXMLImportContext* pContext = nullptr; // return text content (if possible) pContext = GetImport().GetTextImport()->CreateTextChildContext( GetImport(), nPrefix, rLocalName, xAttrList, XML_TEXT_TYPE_SECTION ); - if (NULL == pContext) + if (nullptr == pContext) { pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); } diff --git a/xmloff/source/text/XMLIndexMarkExport.cxx b/xmloff/source/text/XMLIndexMarkExport.cxx index d7f2a2d5dd01..6e88b5066c5f 100644 --- a/xmloff/source/text/XMLIndexMarkExport.cxx +++ b/xmloff/source/text/XMLIndexMarkExport.cxx @@ -78,7 +78,7 @@ void XMLIndexMarkExport::ExportIndexMark( /// index marks have no styles! if (!bAutoStyles) { - const enum XMLTokenEnum * pElements = NULL; + const enum XMLTokenEnum * pElements = nullptr; sal_Int8 nElementNo = -1; // get index mark @@ -152,11 +152,11 @@ void XMLIndexMarkExport::ExportIndexMark( } // export element - DBG_ASSERT(pElements != NULL, "illegal element array"); + DBG_ASSERT(pElements != nullptr, "illegal element array"); DBG_ASSERT(nElementNo >= 0, "illegal name array index"); DBG_ASSERT(nElementNo <= 2, "illegal name array index"); - if ((pElements != NULL) && (nElementNo != -1)) + if ((pElements != nullptr) && (nElementNo != -1)) { SvXMLElementExport aElem(rExport, XML_NAMESPACE_TEXT, diff --git a/xmloff/source/text/XMLIndexSourceBaseContext.cxx b/xmloff/source/text/XMLIndexSourceBaseContext.cxx index f7d29f44304e..8c318807ba56 100644 --- a/xmloff/source/text/XMLIndexSourceBaseContext.cxx +++ b/xmloff/source/text/XMLIndexSourceBaseContext.cxx @@ -233,7 +233,7 @@ SvXMLImportContext* XMLIndexSourceBaseContext::CreateChildContext( const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) { - SvXMLImportContext* pContext = NULL; + SvXMLImportContext* pContext = nullptr; if (XML_NAMESPACE_TEXT == nPrefix) { @@ -255,7 +255,7 @@ SvXMLImportContext* XMLIndexSourceBaseContext::CreateChildContext( // else: unknown namespace -> ignore // use default context - if (pContext == NULL) + if (pContext == nullptr) { pContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, xAttrList); diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx index bce9924d6946..a5b054586440 100644 --- a/xmloff/source/text/XMLIndexTOCContext.cxx +++ b/xmloff/source/text/XMLIndexTOCContext.cxx @@ -136,7 +136,7 @@ void XMLIndexTOCContext::StartElement( sal_Bool bProtected = sal_False; OUString sIndexName; OUString sXmlId; - XMLPropStyleContext* pStyle(NULL); + XMLPropStyleContext* pStyle(nullptr); for(sal_Int16 nAttr = 0; nAttr < nCount; nAttr++) { OUString sLocalName; @@ -217,7 +217,7 @@ void XMLIndexTOCContext::StartElement( aSeq[0] = GetLocalName(); GetImport().SetError( XMLERROR_FLAG_ERROR | XMLERROR_NO_INDEX_ALLOWED_HERE, - aSeq, e.Message, NULL ); + aSeq, e.Message, nullptr ); // set bValid to false, and return prematurely bValid = false; @@ -238,7 +238,7 @@ void XMLIndexTOCContext::StartElement( if( bValid ) GetImport().GetTextImport()->RedlineAdjustStartNodeCursor(true); - if (pStyle != NULL) + if (pStyle != nullptr) { pStyle->FillPropertySet( xTOCPropertySet ); } @@ -289,7 +289,7 @@ SvXMLImportContext* XMLIndexTOCContext::CreateChildContext( const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) { - SvXMLImportContext* pContext = NULL; + SvXMLImportContext* pContext = nullptr; if (bValid) { @@ -357,7 +357,7 @@ SvXMLImportContext* XMLIndexTOCContext::CreateChildContext( // else: not valid -> ignore // default: ignore - if (pContext == NULL) + if (pContext == nullptr) { pContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, xAttrList); diff --git a/xmloff/source/text/XMLIndexTemplateContext.cxx b/xmloff/source/text/XMLIndexTemplateContext.cxx index 01c334faeb04..30cdc6751699 100644 --- a/xmloff/source/text/XMLIndexTemplateContext.cxx +++ b/xmloff/source/text/XMLIndexTemplateContext.cxx @@ -105,14 +105,14 @@ XMLIndexTemplateContext::XMLIndexTemplateContext( , sLevelFormat("LevelFormat") , sParaStyleLevel("ParaStyleLevel") { - DBG_ASSERT( ((XML_TOKEN_INVALID != eLevelAttrName) && (NULL != pLevelNameMap)) - || ((XML_TOKEN_INVALID == eLevelAttrName) && (NULL == pLevelNameMap)), + DBG_ASSERT( ((XML_TOKEN_INVALID != eLevelAttrName) && (nullptr != pLevelNameMap)) + || ((XML_TOKEN_INVALID == eLevelAttrName) && (nullptr == pLevelNameMap)), "need both, attribute name and value map, or neither" ); - DBG_ASSERT( NULL != pOutlineLevelStylePropMap, "need property name map" ); - DBG_ASSERT( NULL != pAllowedTokenTypes, "need allowed tokens map" ); + DBG_ASSERT( nullptr != pOutlineLevelStylePropMap, "need property name map" ); + DBG_ASSERT( nullptr != pAllowedTokenTypes, "need allowed tokens map" ); // no map for outline-level? then use 1 - if (NULL == pLevelNameMap) + if (nullptr == pLevelNameMap) { nOutlineLevel = 1; bOutlineLevelOK = true; @@ -199,8 +199,8 @@ void XMLIndexTemplateContext::EndElement() const sal_Char* pStyleProperty = pOutlineLevelStylePropMap[nOutlineLevel]; - DBG_ASSERT(NULL != pStyleProperty, "need property name"); - if (NULL != pStyleProperty) + DBG_ASSERT(nullptr != pStyleProperty, "need property name"); + if (nullptr != pStyleProperty) { OUString sDisplayStyleName = GetImport().GetStyleDisplayName( @@ -255,7 +255,7 @@ SvXMLImportContext *XMLIndexTemplateContext::CreateChildContext( const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) { - SvXMLImportContext* pContext = NULL; + SvXMLImportContext* pContext = nullptr; if (XML_NAMESPACE_TEXT == nPrefix) { @@ -321,7 +321,7 @@ SvXMLImportContext *XMLIndexTemplateContext::CreateChildContext( } // ignore unknown - if (NULL == pContext) + if (nullptr == pContext) { return SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, xAttrList); @@ -355,10 +355,10 @@ const SvXMLEnumMapEntry aSvLevelNameTOCMap[] = }; const sal_Char* aLevelStylePropNameTOCMap[] = - { NULL, "ParaStyleLevel1", "ParaStyleLevel2", "ParaStyleLevel3", + { nullptr, "ParaStyleLevel1", "ParaStyleLevel2", "ParaStyleLevel3", "ParaStyleLevel4", "ParaStyleLevel5", "ParaStyleLevel6", "ParaStyleLevel7", "ParaStyleLevel8", "ParaStyleLevel9", - "ParaStyleLevel10", NULL }; + "ParaStyleLevel10", nullptr }; const sal_Bool aAllowedTokenTypesTOC[] = { @@ -397,8 +397,8 @@ const SvXMLEnumMapEntry aLevelNameAlphaMap[] = }; const sal_Char* aLevelStylePropNameAlphaMap[] = - { NULL, "ParaStyleSeparator", "ParaStyleLevel1", "ParaStyleLevel2", - "ParaStyleLevel3", NULL }; + { nullptr, "ParaStyleSeparator", "ParaStyleLevel1", "ParaStyleLevel2", + "ParaStyleLevel3", nullptr }; const sal_Bool aAllowedTokenTypesAlpha[] = { @@ -445,14 +445,14 @@ const SvXMLEnumMapEntry aLevelNameBibliographyMap[] = // TODO: replace with real property names, when available const sal_Char* aLevelStylePropNameBibliographyMap[] = { - NULL, "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", + nullptr, "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", - "ParaStyleLevel1", NULL }; + "ParaStyleLevel1", nullptr }; const sal_Bool aAllowedTokenTypesBibliography[] = { @@ -470,10 +470,10 @@ const sal_Bool aAllowedTokenTypesBibliography[] = // table, illustration and object index // no name map -const SvXMLEnumMapEntry* aLevelNameTableMap = NULL; +const SvXMLEnumMapEntry* aLevelNameTableMap = nullptr; const sal_Char* aLevelStylePropNameTableMap[] = - { NULL, "ParaStyleLevel1", NULL }; + { nullptr, "ParaStyleLevel1", nullptr }; const sal_Bool aAllowedTokenTypesTable[] = { diff --git a/xmloff/source/text/XMLLineNumberingImportContext.cxx b/xmloff/source/text/XMLLineNumberingImportContext.cxx index 125e6606c5c5..9f0ca2e5b643 100644 --- a/xmloff/source/text/XMLLineNumberingImportContext.cxx +++ b/xmloff/source/text/XMLLineNumberingImportContext.cxx @@ -228,7 +228,7 @@ void XMLLineNumberingImportContext::CreateAndInsert(bool) // set style name (if it exists) if ( GetImport().GetStyles()->FindStyleChildContext( - XML_STYLE_FAMILY_TEXT_TEXT, sStyleName ) != NULL ) + XML_STYLE_FAMILY_TEXT_TEXT, sStyleName ) != nullptr ) { aAny <<= GetImport().GetStyleDisplayName( XML_STYLE_FAMILY_TEXT_TEXT, sStyleName ); diff --git a/xmloff/source/text/XMLRedlineExport.cxx b/xmloff/source/text/XMLRedlineExport.cxx index cd4330fc77a1..f7b38efb5edf 100644 --- a/xmloff/source/text/XMLRedlineExport.cxx +++ b/xmloff/source/text/XMLRedlineExport.cxx @@ -82,7 +82,7 @@ XMLRedlineExport::XMLRedlineExport(SvXMLExport& rExp) , sMergeLastPara("MergeLastPara") , sChangePrefix("ct") , rExport(rExp) -, pCurrentChangesList(NULL) +, pCurrentChangesList(nullptr) { } @@ -113,7 +113,7 @@ void XMLRedlineExport::ExportChange( // only if we have no current list of changes. For the // main-document case, the autostyles are collected in // ExportChangesListAutoStyles(). - if (pCurrentChangesList != NULL) + if (pCurrentChangesList != nullptr) ExportChangeAutoStyle(rPropSet); } else @@ -197,7 +197,7 @@ void XMLRedlineExport::SetCurrentXText( void XMLRedlineExport::SetCurrentXText() { - pCurrentChangesList = NULL; + pCurrentChangesList = nullptr; } @@ -266,7 +266,7 @@ void XMLRedlineExport::ExportChangeAutoStyle( const Reference<XPropertySet> & rPropSet) { // record change (if changes should be recorded) - if (NULL != pCurrentChangesList) + if (nullptr != pCurrentChangesList) { // put redline in list if it's collapsed or the redline start Any aIsStart = rPropSet->getPropertyValue(sIsStart); @@ -480,7 +480,7 @@ void XMLRedlineExport::ExportChangeInfo( aAny >>= aDateTime; { OUStringBuffer sBuf; - ::sax::Converter::convertDateTime(sBuf, aDateTime, 0); + ::sax::Converter::convertDateTime(sBuf, aDateTime, nullptr); SvXMLElementExport aDateElem( rExport, XML_NAMESPACE_DC, XML_DATE, true, false ); @@ -521,7 +521,7 @@ void XMLRedlineExport::ExportChangeInfo( util::DateTime aDateTime; rVal.Value >>= aDateTime; OUStringBuffer sBuf; - ::sax::Converter::convertDateTime(sBuf, aDateTime, 0); + ::sax::Converter::convertDateTime(sBuf, aDateTime, nullptr); rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_CHG_DATE_TIME, sBuf.makeStringAndClear()); } diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx index 0c3201d9af83..371d7b637cd0 100644 --- a/xmloff/source/text/XMLSectionExport.cxx +++ b/xmloff/source/text/XMLSectionExport.cxx @@ -192,7 +192,7 @@ bool XMLSectionExport::GetIndex( { // first, reset result bool bRet = false; - rIndex = NULL; + rIndex = nullptr; // get section Properties Reference<XPropertySet> xSectionPropSet(rSection, UNO_QUERY); @@ -975,18 +975,18 @@ static const XMLTokenEnum* aTypeLevelNameMap[] = }; static const sal_Char* aLevelStylePropNameTOCMap[] = - { NULL, "ParaStyleLevel1", "ParaStyleLevel2", "ParaStyleLevel3", + { nullptr, "ParaStyleLevel1", "ParaStyleLevel2", "ParaStyleLevel3", "ParaStyleLevel4", "ParaStyleLevel5", "ParaStyleLevel6", "ParaStyleLevel7", "ParaStyleLevel8", "ParaStyleLevel9", - "ParaStyleLevel10", NULL }; + "ParaStyleLevel10", nullptr }; static const sal_Char* aLevelStylePropNameTableMap[] = - { NULL, "ParaStyleLevel1", NULL }; + { nullptr, "ParaStyleLevel1", nullptr }; static const sal_Char* aLevelStylePropNameAlphaMap[] = - { NULL, "ParaStyleSeparator", "ParaStyleLevel1", "ParaStyleLevel2", - "ParaStyleLevel3", NULL }; + { nullptr, "ParaStyleSeparator", "ParaStyleLevel1", "ParaStyleLevel2", + "ParaStyleLevel3", nullptr }; static const sal_Char* aLevelStylePropNameBibliographyMap[] = // TODO: replace with real property names, when available - { NULL, "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", + { nullptr, "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", @@ -994,7 +994,7 @@ static const sal_Char* aLevelStylePropNameBibliographyMap[] = "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", "ParaStyleLevel1", - NULL }; + nullptr }; static const sal_Char** aTypeLevelStylePropNameMap[] = { @@ -1073,8 +1073,8 @@ bool XMLSectionExport::ExportIndexTemplate( // paragraph level style name const sal_Char* pPropName( aTypeLevelStylePropNameMap[eType-TEXT_SECTION_TYPE_TOC][nOutlineLevel]); - OSL_ENSURE(NULL != pPropName, "can't find property name"); - if (NULL != pPropName) + OSL_ENSURE(nullptr != pPropName, "can't find property name"); + if (nullptr != pPropName) { Any aAny = rPropertySet->getPropertyValue( OUString::createFromAscii(pPropName)); diff --git a/xmloff/source/text/XMLSectionImportContext.cxx b/xmloff/source/text/XMLSectionImportContext.cxx index 7bc8c1c33eb5..fad99419775f 100644 --- a/xmloff/source/text/XMLSectionImportContext.cxx +++ b/xmloff/source/text/XMLSectionImportContext.cxx @@ -160,7 +160,7 @@ void XMLSectionImportContext::StartElement( XMLPropStyleContext* pStyle = rHelper-> FindSectionStyle(sStyleName); - if (pStyle != NULL) + if (pStyle != nullptr) { pStyle->FillPropertySet( xPropSet ); } @@ -356,7 +356,7 @@ SvXMLImportContext* XMLSectionImportContext::CreateChildContext( const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) { - SvXMLImportContext* pContext = NULL; + SvXMLImportContext* pContext = nullptr; // section-source (-dde) elements if ( (XML_NAMESPACE_TEXT == nPrefix) && @@ -381,7 +381,7 @@ SvXMLImportContext* XMLSectionImportContext::CreateChildContext( XML_TEXT_TYPE_SECTION ); // if that fails, default context - if (NULL == pContext) + if (nullptr == pContext) { pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); diff --git a/xmloff/source/text/XMLTextColumnsContext.cxx b/xmloff/source/text/XMLTextColumnsContext.cxx index e07aee0e70b0..c52afc85c945 100644 --- a/xmloff/source/text/XMLTextColumnsContext.cxx +++ b/xmloff/source/text/XMLTextColumnsContext.cxx @@ -280,8 +280,8 @@ XMLTextColumnsContext::XMLTextColumnsContext( , sSeparatorLineVerticalAlignment("SeparatorLineVerticalAlignment") , sAutomaticDistance("AutomaticDistance") , sSeparatorLineStyle("SeparatorLineStyle") -, pColumns( 0 ) -, pColumnSep( 0 ) +, pColumns( nullptr ) +, pColumnSep( nullptr ) , pColumnAttrTokenMap( new SvXMLTokenMap(aColAttrTokenMap) ) , pColumnSepAttrTokenMap( new SvXMLTokenMap(aColSepAttrTokenMap) ) , nCount( 0 ) @@ -337,7 +337,7 @@ SvXMLImportContext *XMLTextColumnsContext::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_COLUMN ) ) @@ -448,7 +448,7 @@ void XMLTextColumnsContext::EndElement( ) if( xPropSet.is() ) { Any aAny; - sal_Bool bOn = pColumnSep != 0; + sal_Bool bOn = pColumnSep != nullptr; aAny.setValue( &bOn, cppu::UnoType<bool>::get() ); xPropSet->setPropertyValue( sSeparatorLineIsOn, aAny ); diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx index 7680d1b5248d..4e2328669905 100644 --- a/xmloff/source/text/XMLTextFrameContext.cxx +++ b/xmloff/source/text/XMLTextFrameContext.cxx @@ -295,7 +295,7 @@ XMLTextFrameContourContext_Impl::XMLTextFrameContourContext_Impl( if( bPath ) { - basegfx::tools::importFromSvgD(aPolyPolygon, sD, GetImport().needFixPositionAfterZ(), 0); + basegfx::tools::importFromSvgD(aPolyPolygon, sD, GetImport().needFixPositionAfterZ(), nullptr); } else { @@ -607,7 +607,7 @@ void XMLTextFrameContext_Impl::Create( bool /*bHRefOrBase64*/ ) } // frame style - XMLPropStyleContext *pStyle = 0; + XMLPropStyleContext *pStyle = nullptr; if( !sStyleName.isEmpty() ) { pStyle = xTextImportHelper->FindAutoFrameStyle( sStyleName ); @@ -730,7 +730,7 @@ void XMLTextFrameContext_Impl::Create( bool /*bHRefOrBase64*/ ) else if( xBase64Stream.is() ) { sHRef = GetImport().ResolveGraphicObjectURLFromBase64( xBase64Stream ); - xBase64Stream = 0; + xBase64Stream = nullptr; } aAny <<= sHRef; xPropSet->setPropertyValue( sGraphicURL, aAny ); @@ -1142,7 +1142,7 @@ SvXMLImportContext *XMLTextFrameContext_Impl::CreateChildContext( const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; if( XML_NAMESPACE_DRAW == nPrefix ) { @@ -1379,7 +1379,7 @@ XMLTextFrameContext::XMLTextFrameContext( : SvXMLImportContext( rImport, nPrfx, rLName ) , MultiImageImportHelper() , m_xAttrList( new SvXMLAttributeList( xAttrList ) ) -, m_pHyperlink( 0 ) +, m_pHyperlink( nullptr ) // Implement Title/Description Elements UI (#i73249#) , m_sTitle() , m_sDesc() @@ -1406,7 +1406,7 @@ XMLTextFrameContext::XMLTextFrameContext( { rtl::Reference < XMLTextImportHelper > xTxtImport = GetImport().GetTextImport(); - XMLPropStyleContext* pStyle( 0L ); + XMLPropStyleContext* pStyle( nullptr ); pStyle = xTxtImport->FindAutoFrameStyle( aStyleName ); if ( pStyle && pStyle->GetParentName().isEmpty() ) { @@ -1468,7 +1468,7 @@ void XMLTextFrameContext::EndElement() pImpl->SetHyperlink( m_pHyperlink->GetHRef(), m_pHyperlink->GetName(), m_pHyperlink->GetTargetFrameName(), m_pHyperlink->GetMap() ); delete m_pHyperlink; - m_pHyperlink = 0; + m_pHyperlink = nullptr; } } @@ -1479,7 +1479,7 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext( const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; if( !m_xImplContext.Is() ) { @@ -1592,7 +1592,7 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext( m_xReplImplContext = pContext; } } - else if( 0 != dynamic_cast< const XMLTextFrameContext_Impl*>( m_xImplContext.get() )) + else if( nullptr != dynamic_cast< const XMLTextFrameContext_Impl*>( m_xImplContext.get() )) { // the child is a writer frame if( XML_NAMESPACE_SVG == p_nPrefix ) diff --git a/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx b/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx index 522f0a33da33..05a9a0374c1f 100644 --- a/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx +++ b/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx @@ -109,8 +109,8 @@ SvXMLImportContext *XMLTextFrameHyperlinkContext::CreateChildContext( const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = 0; - XMLTextFrameContext *pTextFrameContext = 0; + SvXMLImportContext *pContext = nullptr; + XMLTextFrameContext *pTextFrameContext = nullptr; if( XML_NAMESPACE_DRAW == nPrefix ) { diff --git a/xmloff/source/text/XMLTextHeaderFooterContext.cxx b/xmloff/source/text/XMLTextHeaderFooterContext.cxx index 7e274502e159..443b251ecf41 100644 --- a/xmloff/source/text/XMLTextHeaderFooterContext.cxx +++ b/xmloff/source/text/XMLTextHeaderFooterContext.cxx @@ -112,7 +112,7 @@ SvXMLImportContext *XMLTextHeaderFooterContext::CreateChildContext( const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; if( bInsertContent ) { if( !xOldTextCursor.is() ) diff --git a/xmloff/source/text/XMLTextListAutoStylePool.cxx b/xmloff/source/text/XMLTextListAutoStylePool.cxx index 6931cda00b73..617e2092832c 100644 --- a/xmloff/source/text/XMLTextListAutoStylePool.cxx +++ b/xmloff/source/text/XMLTextListAutoStylePool.cxx @@ -253,7 +253,7 @@ void XMLTextListAutoStylePool::exportXML() const sal_uInt32 i; for( i=0; i < nCount; i++ ) { - aExpEntries[i] = 0; + aExpEntries[i] = nullptr; } for( i=0; i < nCount; i++ ) { diff --git a/xmloff/source/text/XMLTextListBlockContext.cxx b/xmloff/source/text/XMLTextListBlockContext.cxx index f6847e46babd..afa975922ecc 100644 --- a/xmloff/source/text/XMLTextListBlockContext.cxx +++ b/xmloff/source/text/XMLTextListBlockContext.cxx @@ -63,9 +63,9 @@ XMLTextListBlockContext::XMLTextListBlockContext( static const char s_PropNameDefaultListId[] = "DefaultListId"; { // get the parent list block context (if any); this is a bit ugly... - XMLTextListBlockContext * pLB(0); - XMLTextListItemContext * pLI(0); - XMLNumberedParaContext * pNP(0); + XMLTextListBlockContext * pLB(nullptr); + XMLTextListItemContext * pLI(nullptr); + XMLNumberedParaContext * pNP(nullptr); rTxtImp.GetTextListHelper().ListContextTop(pLB, pLI, pNP); mxParentListBlock = pLB; } @@ -251,7 +251,7 @@ void XMLTextListBlockContext::EndElement() // Any paragraph following the list within the same list item must not // be numbered. - mrTxtImport.GetTextListHelper().SetListItem( 0 ); + mrTxtImport.GetTextListHelper().SetListItem( nullptr ); } SvXMLImportContext *XMLTextListBlockContext::CreateChildContext( @@ -259,7 +259,7 @@ SvXMLImportContext *XMLTextListBlockContext::CreateChildContext( const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; const SvXMLTokenMap& rTokenMap = mrTxtImport.GetTextListBlockElemTokenMap(); diff --git a/xmloff/source/text/XMLTextListItemContext.cxx b/xmloff/source/text/XMLTextListItemContext.cxx index 71dea66d6991..387dc1a92769 100644 --- a/xmloff/source/text/XMLTextListItemContext.cxx +++ b/xmloff/source/text/XMLTextListItemContext.cxx @@ -128,7 +128,7 @@ XMLTextListItemContext::~XMLTextListItemContext() void XMLTextListItemContext::EndElement() { // finish current list item - rTxtImport.GetTextListHelper().SetListItem( 0 ); + rTxtImport.GetTextListHelper().SetListItem( nullptr ); } SvXMLImportContext *XMLTextListItemContext::CreateChildContext( @@ -136,7 +136,7 @@ SvXMLImportContext *XMLTextListItemContext::CreateChildContext( const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; const SvXMLTokenMap& rTokenMap = rTxtImport.GetTextElemTokenMap(); bool bHeading = false; diff --git a/xmloff/source/text/XMLTextMarkImportContext.cxx b/xmloff/source/text/XMLTextMarkImportContext.cxx index f0d34582f180..35e54fff774a 100644 --- a/xmloff/source/text/XMLTextMarkImportContext.cxx +++ b/xmloff/source/text/XMLTextMarkImportContext.cxx @@ -141,7 +141,7 @@ static const char *lcl_getFormFieldmarkName(OUString &name) name == "ecma.office-open-xml.field.FORMDROPDOWN") return sFormDropDown; else - return NULL; + return nullptr; } static OUString lcl_getFieldmarkName(OUString const& name) @@ -207,7 +207,7 @@ void XMLTextMarkImportContext::EndElement() case TypeBookmark: { const char *formFieldmarkName=lcl_getFormFieldmarkName(m_sFieldName); - bool bImportAsField=((lcl_MarkType)nTmp==TypeFieldmark && formFieldmarkName!=NULL); //@TODO handle abbreviation cases.. + bool bImportAsField=((lcl_MarkType)nTmp==TypeFieldmark && formFieldmarkName!=nullptr); //@TODO handle abbreviation cases.. // export point bookmark const Reference<XInterface> xContent( CreateAndInsertMark(GetImport(), @@ -382,7 +382,7 @@ Reference<XTextContent> XMLTextMarkImportContext::CreateAndInsertMark( if (!xIfc.is()) { OSL_FAIL("CreateAndInsertMark: cannot create service?"); - return 0; + return nullptr; } // set name (unless there is no name (text:meta)) @@ -396,7 +396,7 @@ Reference<XTextContent> XMLTextMarkImportContext::CreateAndInsertMark( if (!sMarkName.isEmpty()) { OSL_FAIL("name given, but XNamed not supported?"); - return 0; + return nullptr; } } @@ -419,11 +419,11 @@ Reference<XTextContent> XMLTextMarkImportContext::CreateAndInsertMark( catch (com::sun::star::lang::IllegalArgumentException &) { OSL_FAIL("CreateAndInsertMark: cannot insert?"); - return 0; + return nullptr; } } } - return 0; + return nullptr; } bool XMLTextMarkImportContext::FindName( diff --git a/xmloff/source/text/XMLTextMasterPageContext.cxx b/xmloff/source/text/XMLTextMasterPageContext.cxx index 9d7290a3879e..514505d748f4 100644 --- a/xmloff/source/text/XMLTextMasterPageContext.cxx +++ b/xmloff/source/text/XMLTextMasterPageContext.cxx @@ -178,7 +178,7 @@ SvXMLImportContext *XMLTextMasterPageContext::CreateChildContext( const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; const SvXMLTokenMap& rTokenMap = GetImport().GetTextImport()->GetTextMasterPageElemTokenMap(); diff --git a/xmloff/source/text/XMLTextMasterStylesContext.cxx b/xmloff/source/text/XMLTextMasterStylesContext.cxx index d51d4fa0ca91..b86135651869 100644 --- a/xmloff/source/text/XMLTextMasterStylesContext.cxx +++ b/xmloff/source/text/XMLTextMasterStylesContext.cxx @@ -55,7 +55,7 @@ SvXMLStyleContext *XMLTextMasterStylesContext::CreateStyleChildContext( const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) { - SvXMLStyleContext *pContext = 0; + SvXMLStyleContext *pContext = nullptr; if( XML_NAMESPACE_STYLE == nPrefix && IsXMLToken( rLocalName, XML_MASTER_PAGE ) && @@ -76,7 +76,7 @@ SvXMLStyleContext *XMLTextMasterStylesContext::CreateStyleStyleChildContext( const OUString& /*rLocalName*/, const Reference< XAttributeList > & /*xAttrList*/ ) { - return 0; + return nullptr; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextNumRuleInfo.hxx b/xmloff/source/text/XMLTextNumRuleInfo.hxx index 9628e02fabd9..e5cbeaef175a 100644 --- a/xmloff/source/text/XMLTextNumRuleInfo.hxx +++ b/xmloff/source/text/XMLTextNumRuleInfo.hxx @@ -157,7 +157,7 @@ inline XMLTextNumRuleInfo& XMLTextNumRuleInfo::operator=( inline void XMLTextNumRuleInfo::Reset() { - mxNumRules = 0; + mxNumRules = nullptr; msNumRulesName.clear(); msListId.clear(); mnListStartValue = -1; diff --git a/xmloff/source/text/XMLTextPropertySetContext.cxx b/xmloff/source/text/XMLTextPropertySetContext.cxx index 308451e6a6f3..1dbe2f79c5f1 100644 --- a/xmloff/source/text/XMLTextPropertySetContext.cxx +++ b/xmloff/source/text/XMLTextPropertySetContext.cxx @@ -56,7 +56,7 @@ SvXMLImportContext *XMLTextPropertySetContext::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/text/XMLTextShapeStyleContext.cxx b/xmloff/source/text/XMLTextShapeStyleContext.cxx index 5a83eddd2f19..9b595ae888c2 100644 --- a/xmloff/source/text/XMLTextShapeStyleContext.cxx +++ b/xmloff/source/text/XMLTextShapeStyleContext.cxx @@ -83,7 +83,7 @@ SvXMLImportContext *XMLTextShapePropertySetContext_Impl::CreateChildContext( ::std::vector< XMLPropertyState > &rProperties, const XMLPropertyState& rProp ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; switch( mxMapper->getPropertySetMapper() ->GetEntryContextId( rProp.mnIndex ) ) @@ -162,7 +162,7 @@ SvXMLImportContext *XMLTextShapeStyleContext::CreateChildContext( const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; if( XML_NAMESPACE_STYLE == nPrefix || XML_NAMESPACE_LO_EXT == nPrefix ) { @@ -226,7 +226,7 @@ void XMLTextShapeStyleContext::CreateAndInsert( bool bOverwrite ) // set event suppplier and release reference to context Reference<XEventsSupplier> xEventsSupplier(xStyle, UNO_QUERY); static_cast<XMLEventsImportContext *>(&xEventContext)->SetEvents(xEventsSupplier); - xEventContext = 0; + xEventContext = nullptr; } } diff --git a/xmloff/source/text/XMLTrackedChangesImportContext.cxx b/xmloff/source/text/XMLTrackedChangesImportContext.cxx index aaa6f5f7e2fa..94f03e4b03f3 100644 --- a/xmloff/source/text/XMLTrackedChangesImportContext.cxx +++ b/xmloff/source/text/XMLTrackedChangesImportContext.cxx @@ -86,7 +86,7 @@ SvXMLImportContext* XMLTrackedChangesImportContext::CreateChildContext( const OUString& rLocalName, const Reference<XAttributeList> & xAttrList) { - SvXMLImportContext* pContext = NULL; + SvXMLImportContext* pContext = nullptr; if ( (XML_NAMESPACE_TEXT == nPrefix) && IsXMLToken( rLocalName, XML_CHANGED_REGION ) ) @@ -95,7 +95,7 @@ SvXMLImportContext* XMLTrackedChangesImportContext::CreateChildContext( nPrefix, rLocalName); } - if (NULL == pContext) + if (nullptr == pContext) { pContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, xAttrList); diff --git a/xmloff/source/text/txtexppr.cxx b/xmloff/source/text/txtexppr.cxx index 5db79f5bc7a4..35a63005a90b 100644 --- a/xmloff/source/text/txtexppr.cxx +++ b/xmloff/source/text/txtexppr.cxx @@ -71,7 +71,7 @@ void XMLTextExportPropertySetMapper::handleElementItem( case CTF_BACKGROUND_URL: { - const Any *pPos = 0, *pFilter = 0, *pTrans = 0; + const Any *pPos = nullptr, *pFilter = nullptr, *pTrans = nullptr; sal_uInt32 nPropIndex = rProperty.mnIndex; // these are all optional, so have to check them in order @@ -501,175 +501,175 @@ void XMLTextExportPropertySetMapper::ContextFilter( Reference< XPropertySet > rPropSet ) const { // filter font - XMLPropertyState *pFontNameState = 0; - XMLPropertyState *pFontFamilyNameState = 0; - XMLPropertyState *pFontStyleNameState = 0; - XMLPropertyState *pFontFamilyState = 0; - XMLPropertyState *pFontPitchState = 0; - XMLPropertyState *pFontCharsetState = 0; - XMLPropertyState *pFontNameCJKState = 0; - XMLPropertyState *pFontFamilyNameCJKState = 0; - XMLPropertyState *pFontStyleNameCJKState = 0; - XMLPropertyState *pFontFamilyCJKState = 0; - XMLPropertyState *pFontPitchCJKState = 0; - XMLPropertyState *pFontCharsetCJKState = 0; - XMLPropertyState *pFontNameCTLState = 0; - XMLPropertyState *pFontFamilyNameCTLState = 0; - XMLPropertyState *pFontStyleNameCTLState = 0; - XMLPropertyState *pFontFamilyCTLState = 0; - XMLPropertyState *pFontPitchCTLState = 0; - XMLPropertyState *pFontCharsetCTLState = 0; + XMLPropertyState *pFontNameState = nullptr; + XMLPropertyState *pFontFamilyNameState = nullptr; + XMLPropertyState *pFontStyleNameState = nullptr; + XMLPropertyState *pFontFamilyState = nullptr; + XMLPropertyState *pFontPitchState = nullptr; + XMLPropertyState *pFontCharsetState = nullptr; + XMLPropertyState *pFontNameCJKState = nullptr; + XMLPropertyState *pFontFamilyNameCJKState = nullptr; + XMLPropertyState *pFontStyleNameCJKState = nullptr; + XMLPropertyState *pFontFamilyCJKState = nullptr; + XMLPropertyState *pFontPitchCJKState = nullptr; + XMLPropertyState *pFontCharsetCJKState = nullptr; + XMLPropertyState *pFontNameCTLState = nullptr; + XMLPropertyState *pFontFamilyNameCTLState = nullptr; + XMLPropertyState *pFontStyleNameCTLState = nullptr; + XMLPropertyState *pFontFamilyCTLState = nullptr; + XMLPropertyState *pFontPitchCTLState = nullptr; + XMLPropertyState *pFontCharsetCTLState = nullptr; // filter char height point/percent - XMLPropertyState* pCharHeightState = NULL; - XMLPropertyState* pCharPropHeightState = NULL; - XMLPropertyState* pCharDiffHeightState = NULL; - XMLPropertyState* pCharHeightCJKState = NULL; - XMLPropertyState* pCharPropHeightCJKState = NULL; - XMLPropertyState* pCharDiffHeightCJKState = NULL; - XMLPropertyState* pCharHeightCTLState = NULL; - XMLPropertyState* pCharPropHeightCTLState = NULL; - XMLPropertyState* pCharDiffHeightCTLState = NULL; + XMLPropertyState* pCharHeightState = nullptr; + XMLPropertyState* pCharPropHeightState = nullptr; + XMLPropertyState* pCharDiffHeightState = nullptr; + XMLPropertyState* pCharHeightCJKState = nullptr; + XMLPropertyState* pCharPropHeightCJKState = nullptr; + XMLPropertyState* pCharDiffHeightCJKState = nullptr; + XMLPropertyState* pCharHeightCTLState = nullptr; + XMLPropertyState* pCharPropHeightCTLState = nullptr; + XMLPropertyState* pCharDiffHeightCTLState = nullptr; // filter left margin measure/percent - XMLPropertyState* pParaLeftMarginState = NULL; - XMLPropertyState* pParaLeftMarginRelState = NULL; + XMLPropertyState* pParaLeftMarginState = nullptr; + XMLPropertyState* pParaLeftMarginRelState = nullptr; // filter right margin measure/percent - XMLPropertyState* pParaRightMarginState = NULL; - XMLPropertyState* pParaRightMarginRelState = NULL; + XMLPropertyState* pParaRightMarginState = nullptr; + XMLPropertyState* pParaRightMarginRelState = nullptr; // filter first line indent measure/percent - XMLPropertyState* pParaFirstLineState = NULL; - XMLPropertyState* pParaFirstLineRelState = NULL; + XMLPropertyState* pParaFirstLineState = nullptr; + XMLPropertyState* pParaFirstLineRelState = nullptr; // filter ParaTopMargin/Relative - XMLPropertyState* pParaTopMarginState = NULL; - XMLPropertyState* pParaTopMarginRelState = NULL; + XMLPropertyState* pParaTopMarginState = nullptr; + XMLPropertyState* pParaTopMarginRelState = nullptr; // filter ParaTopMargin/Relative - XMLPropertyState* pParaBottomMarginState = NULL; - XMLPropertyState* pParaBottomMarginRelState = NULL; + XMLPropertyState* pParaBottomMarginState = nullptr; + XMLPropertyState* pParaBottomMarginRelState = nullptr; // filter (Left|Right|Top|Bottom|)BorderWidth - XMLPropertyState* pAllBorderWidthState = NULL; - XMLPropertyState* pLeftBorderWidthState = NULL; - XMLPropertyState* pRightBorderWidthState = NULL; - XMLPropertyState* pTopBorderWidthState = NULL; - XMLPropertyState* pBottomBorderWidthState = NULL; + XMLPropertyState* pAllBorderWidthState = nullptr; + XMLPropertyState* pLeftBorderWidthState = nullptr; + XMLPropertyState* pRightBorderWidthState = nullptr; + XMLPropertyState* pTopBorderWidthState = nullptr; + XMLPropertyState* pBottomBorderWidthState = nullptr; // filter (Left|Right|Top|)BorderDistance - XMLPropertyState* pAllBorderDistanceState = NULL; - XMLPropertyState* pLeftBorderDistanceState = NULL; - XMLPropertyState* pRightBorderDistanceState = NULL; - XMLPropertyState* pTopBorderDistanceState = NULL; - XMLPropertyState* pBottomBorderDistanceState = NULL; + XMLPropertyState* pAllBorderDistanceState = nullptr; + XMLPropertyState* pLeftBorderDistanceState = nullptr; + XMLPropertyState* pRightBorderDistanceState = nullptr; + XMLPropertyState* pTopBorderDistanceState = nullptr; + XMLPropertyState* pBottomBorderDistanceState = nullptr; // filter (Left|Right|Top|Bottom|)Border - XMLPropertyState* pAllBorderState = NULL; - XMLPropertyState* pLeftBorderState = NULL; - XMLPropertyState* pRightBorderState = NULL; - XMLPropertyState* pTopBorderState = NULL; - XMLPropertyState* pBottomBorderState = NULL; + XMLPropertyState* pAllBorderState = nullptr; + XMLPropertyState* pLeftBorderState = nullptr; + XMLPropertyState* pRightBorderState = nullptr; + XMLPropertyState* pTopBorderState = nullptr; + XMLPropertyState* pBottomBorderState = nullptr; // filter Char(Left|Right|Top|Bottom|)BorderWidth - XMLPropertyState* pCharAllBorderWidthState = NULL; - XMLPropertyState* pCharLeftBorderWidthState = NULL; - XMLPropertyState* pCharRightBorderWidthState = NULL; - XMLPropertyState* pCharTopBorderWidthState = NULL; - XMLPropertyState* pCharBottomBorderWidthState = NULL; + XMLPropertyState* pCharAllBorderWidthState = nullptr; + XMLPropertyState* pCharLeftBorderWidthState = nullptr; + XMLPropertyState* pCharRightBorderWidthState = nullptr; + XMLPropertyState* pCharTopBorderWidthState = nullptr; + XMLPropertyState* pCharBottomBorderWidthState = nullptr; // filter Char(Left|Right|Top|)BorderDistance - XMLPropertyState* pCharAllBorderDistanceState = NULL; - XMLPropertyState* pCharLeftBorderDistanceState = NULL; - XMLPropertyState* pCharRightBorderDistanceState = NULL; - XMLPropertyState* pCharTopBorderDistanceState = NULL; - XMLPropertyState* pCharBottomBorderDistanceState = NULL; + XMLPropertyState* pCharAllBorderDistanceState = nullptr; + XMLPropertyState* pCharLeftBorderDistanceState = nullptr; + XMLPropertyState* pCharRightBorderDistanceState = nullptr; + XMLPropertyState* pCharTopBorderDistanceState = nullptr; + XMLPropertyState* pCharBottomBorderDistanceState = nullptr; // filter Char(Left|Right|Top|Bottom|)Border - XMLPropertyState* pCharAllBorderState = NULL; - XMLPropertyState* pCharLeftBorderState = NULL; - XMLPropertyState* pCharRightBorderState = NULL; - XMLPropertyState* pCharTopBorderState = NULL; - XMLPropertyState* pCharBottomBorderState = NULL; + XMLPropertyState* pCharAllBorderState = nullptr; + XMLPropertyState* pCharLeftBorderState = nullptr; + XMLPropertyState* pCharRightBorderState = nullptr; + XMLPropertyState* pCharTopBorderState = nullptr; + XMLPropertyState* pCharBottomBorderState = nullptr; // filter height properties - XMLPropertyState* pHeightMinAbsState = NULL; - XMLPropertyState* pHeightMinRelState = NULL; - XMLPropertyState* pHeightAbsState = NULL; - XMLPropertyState* pHeightRelState = NULL; - XMLPropertyState* pSizeTypeState = NULL; + XMLPropertyState* pHeightMinAbsState = nullptr; + XMLPropertyState* pHeightMinRelState = nullptr; + XMLPropertyState* pHeightAbsState = nullptr; + XMLPropertyState* pHeightRelState = nullptr; + XMLPropertyState* pSizeTypeState = nullptr; // filter width properties - XMLPropertyState* pWidthMinAbsState = NULL; - XMLPropertyState* pWidthMinRelState = NULL; - XMLPropertyState* pWidthAbsState = NULL; - XMLPropertyState* pWidthRelState = NULL; - XMLPropertyState* pWidthTypeState = NULL; + XMLPropertyState* pWidthMinAbsState = nullptr; + XMLPropertyState* pWidthMinRelState = nullptr; + XMLPropertyState* pWidthAbsState = nullptr; + XMLPropertyState* pWidthRelState = nullptr; + XMLPropertyState* pWidthTypeState = nullptr; // wrap - XMLPropertyState* pWrapState = NULL; - XMLPropertyState* pWrapContourState = NULL; - XMLPropertyState* pWrapContourModeState = NULL; - XMLPropertyState* pWrapParagraphOnlyState = NULL; + XMLPropertyState* pWrapState = nullptr; + XMLPropertyState* pWrapContourState = nullptr; + XMLPropertyState* pWrapContourModeState = nullptr; + XMLPropertyState* pWrapParagraphOnlyState = nullptr; // anchor - XMLPropertyState* pAnchorTypeState = NULL; + XMLPropertyState* pAnchorTypeState = nullptr; // horizontal position and relation - XMLPropertyState* pHoriOrientState = NULL; - XMLPropertyState* pHoriOrientMirroredState = NULL; - XMLPropertyState* pHoriOrientRelState = NULL; - XMLPropertyState* pHoriOrientRelFrameState = NULL; - XMLPropertyState* pHoriOrientMirrorState = NULL; + XMLPropertyState* pHoriOrientState = nullptr; + XMLPropertyState* pHoriOrientMirroredState = nullptr; + XMLPropertyState* pHoriOrientRelState = nullptr; + XMLPropertyState* pHoriOrientRelFrameState = nullptr; + XMLPropertyState* pHoriOrientMirrorState = nullptr; // Horizontal position and relation for shapes (#i28749#) - XMLPropertyState* pShapeHoriOrientState = NULL; - XMLPropertyState* pShapeHoriOrientMirroredState = NULL; - XMLPropertyState* pShapeHoriOrientRelState = NULL; - XMLPropertyState* pShapeHoriOrientRelFrameState = NULL; - XMLPropertyState* pShapeHoriOrientMirrorState = NULL; + XMLPropertyState* pShapeHoriOrientState = nullptr; + XMLPropertyState* pShapeHoriOrientMirroredState = nullptr; + XMLPropertyState* pShapeHoriOrientRelState = nullptr; + XMLPropertyState* pShapeHoriOrientRelFrameState = nullptr; + XMLPropertyState* pShapeHoriOrientMirrorState = nullptr; // vertical position and relation - XMLPropertyState* pVertOrientState = NULL; - XMLPropertyState* pVertOrientAtCharState = NULL; - XMLPropertyState* pVertOrientRelState = NULL; - XMLPropertyState* pVertOrientRelPageState = NULL; - XMLPropertyState* pVertOrientRelFrameState = NULL; - XMLPropertyState* pVertOrientRelAsCharState = NULL; - XMLPropertyState* pRelWidthRel = NULL; - XMLPropertyState* pRelHeightRel = NULL; + XMLPropertyState* pVertOrientState = nullptr; + XMLPropertyState* pVertOrientAtCharState = nullptr; + XMLPropertyState* pVertOrientRelState = nullptr; + XMLPropertyState* pVertOrientRelPageState = nullptr; + XMLPropertyState* pVertOrientRelFrameState = nullptr; + XMLPropertyState* pVertOrientRelAsCharState = nullptr; + XMLPropertyState* pRelWidthRel = nullptr; + XMLPropertyState* pRelHeightRel = nullptr; // Vertical position and relation for shapes (#i28749#) - XMLPropertyState* pShapeVertOrientState = NULL; - XMLPropertyState* pShapeVertOrientAtCharState = NULL; - XMLPropertyState* pShapeVertOrientRelState = NULL; - XMLPropertyState* pShapeVertOrientRelPageState = NULL; - XMLPropertyState* pShapeVertOrientRelFrameState = NULL; + XMLPropertyState* pShapeVertOrientState = nullptr; + XMLPropertyState* pShapeVertOrientAtCharState = nullptr; + XMLPropertyState* pShapeVertOrientRelState = nullptr; + XMLPropertyState* pShapeVertOrientRelPageState = nullptr; + XMLPropertyState* pShapeVertOrientRelFrameState = nullptr; // filter underline color - XMLPropertyState* pUnderlineState = NULL; - XMLPropertyState* pUnderlineColorState = NULL; - XMLPropertyState* pUnderlineHasColorState = NULL; + XMLPropertyState* pUnderlineState = nullptr; + XMLPropertyState* pUnderlineColorState = nullptr; + XMLPropertyState* pUnderlineHasColorState = nullptr; // filter list style name - XMLPropertyState* pListStyleName = NULL; + XMLPropertyState* pListStyleName = nullptr; // filter fo:clip - XMLPropertyState* pClip11State = NULL; - XMLPropertyState* pClipState = NULL; + XMLPropertyState* pClip11State = nullptr; + XMLPropertyState* pClipState = nullptr; // filter fo:margin - XMLPropertyState* pAllParaMarginRel = NULL; - XMLPropertyState* pAllParaMargin = NULL; - XMLPropertyState* pAllMargin = NULL; + XMLPropertyState* pAllParaMarginRel = nullptr; + XMLPropertyState* pAllParaMargin = nullptr; + XMLPropertyState* pAllMargin = nullptr; //UUUU - XMLPropertyState* pRepeatOffsetX = NULL; - XMLPropertyState* pRepeatOffsetY = NULL; + XMLPropertyState* pRepeatOffsetX = nullptr; + XMLPropertyState* pRepeatOffsetY = nullptr; // character background and highlight - XMLPropertyState* pCharBackground = NULL; - XMLPropertyState* pCharHighlight = NULL; + XMLPropertyState* pCharBackground = nullptr; + XMLPropertyState* pCharHighlight = nullptr; bool bNeedsAnchor = false; @@ -1123,7 +1123,7 @@ void XMLTextExportPropertySetMapper::ContextFilter( } // list style name: remove list style if it is the default outline style - if( pListStyleName != NULL ) + if( pListStyleName != nullptr ) { OUString sListStyleName; pListStyleName->maValue >>= sListStyleName; @@ -1131,7 +1131,7 @@ void XMLTextExportPropertySetMapper::ContextFilter( pListStyleName->mnIndex = -1; } - if( pClipState != NULL && pClip11State != NULL ) + if( pClipState != nullptr && pClip11State != nullptr ) pClip11State->mnIndex = -1; // When both background attributes are available export the visible one diff --git a/xmloff/source/text/txtexppr.hxx b/xmloff/source/text/txtexppr.hxx index e1ba31dd3547..9ebd8825fc44 100644 --- a/xmloff/source/text/txtexppr.hxx +++ b/xmloff/source/text/txtexppr.hxx @@ -74,7 +74,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; virtual void handleSpecialItem( @@ -82,7 +82,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; }; diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index 0e96c953ff77..1b41b6b4fd2c 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -276,7 +276,7 @@ inline Sequence<OUString> const GetStringSequenceProperty( XMLTextFieldExport::XMLTextFieldExport( SvXMLExport& rExp, XMLPropertyState* pCombinedCharState) : rExport(rExp), - pUsedMasters(NULL), + pUsedMasters(nullptr), sServicePrefix("com.sun.star.text.textfield."), sFieldMasterPrefix("com.sun.star.text.FieldMaster."), sPresentationServicePrefix("com.sun.star.presentation.TextField."), @@ -758,7 +758,7 @@ void XMLTextFieldExport::ExportFieldAutoStyle( Reference<XPropertySet> xPropSet(rTextField, UNO_QUERY); // add field master to list of used field masters (if desired) - if (NULL != pUsedMasters) + if (nullptr != pUsedMasters) { Reference<XDependentTextField> xDepField(rTextField, UNO_QUERY); if (xDepField.is()) @@ -896,9 +896,9 @@ void XMLTextFieldExport::ExportFieldAutoStyle( case FIELD_ID_COMBINED_CHARACTERS: { // export text style with the addition of the combined characters - DBG_ASSERT(NULL != pCombinedCharactersPropertyState, + DBG_ASSERT(nullptr != pCombinedCharactersPropertyState, "need proper PropertyState for combined characters"); - const XMLPropertyState *aStates[] = { pCombinedCharactersPropertyState, 0 }; + const XMLPropertyState *aStates[] = { pCombinedCharactersPropertyState, nullptr }; GetExport().GetTextParagraphExport()->Add( XML_STYLE_FAMILY_TEXT_TEXT, xRangePropSet, aStates); @@ -984,11 +984,11 @@ void XMLTextFieldExport::ExportField( // special treatment for combined characters field, because it is // exported as a style - const XMLPropertyState* aStates[] = { pCombinedCharactersPropertyState, 0 }; + const XMLPropertyState* aStates[] = { pCombinedCharactersPropertyState, nullptr }; const XMLPropertyState **pStates = FIELD_ID_COMBINED_CHARACTERS == nToken ? aStates - : 0; + : nullptr; // find out whether we need to set the style or hyperlink bool bHasHyperlink; @@ -1753,7 +1753,7 @@ void XMLTextFieldExport::ExportFieldHelper( util::DateTime aDate( GetDateTimeProperty(sPropertyDateTimeValue, rPropSet) ); { OUStringBuffer aBuffer; - ::sax::Converter::convertDateTime(aBuffer, aDate, 0, true); + ::sax::Converter::convertDateTime(aBuffer, aDate, nullptr, true); SvXMLElementExport aDateElem( GetExport(), XML_NAMESPACE_DC, XML_DATE, true, false ); @@ -1903,10 +1903,10 @@ void XMLTextFieldExport::ExportFieldDeclarations( if (rText.is()) { // export only used masters - DBG_ASSERT(NULL != pUsedMasters, + DBG_ASSERT(nullptr != pUsedMasters, "field masters must be recorded in order to be " "written out separatly" ); - if (NULL != pUsedMasters) + if (nullptr != pUsedMasters) { map<Reference<XText>, set<OUString> > ::iterator aMapIter = pUsedMasters->find(rText); @@ -2205,7 +2205,7 @@ void XMLTextFieldExport::SetExportOnlyUsedFieldDeclarations( bool bExportOnlyUsed) { delete pUsedMasters; - pUsedMasters = NULL; + pUsedMasters = nullptr; // create used masters set (if none is used) if (bExportOnlyUsed) @@ -2674,7 +2674,7 @@ void XMLTextFieldExport::ProcessDateTime(enum XMLTokenEnum eName, } // date/time value - ::sax::Converter::convertDateTime(aBuffer, aDateTime, 0); + ::sax::Converter::convertDateTime(aBuffer, aDateTime, nullptr); // output attribute ProcessString(eName, aBuffer.makeStringAndClear(), true, nPrefix); @@ -2704,7 +2704,7 @@ void XMLTextFieldExport::ProcessTimeOrDateTime(enum XMLTokenEnum eName, OUStringBuffer aBuffer; // date/time value - ::sax::Converter::convertTimeOrDateTime(aBuffer, rTime, 0); + ::sax::Converter::convertTimeOrDateTime(aBuffer, rTime, nullptr); // output attribute ProcessString(eName, aBuffer.makeStringAndClear(), true, nPrefix); diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index e183b4f0e3fe..605b78c9f531 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -204,7 +204,7 @@ XMLTextFieldImportContext::XMLTextFieldImportContext( , sServicePrefix(sAPI_textfield_prefix) , bValid(false) { - DBG_ASSERT(NULL != pService, "Need service name!"); + DBG_ASSERT(nullptr != pService, "Need service name!"); sServiceName = OUString::createFromAscii(pService); } @@ -311,7 +311,7 @@ XMLTextFieldImportContext::CreateTextFieldImportContext( const OUString& rName, sal_uInt16 nToken) { - XMLTextFieldImportContext* pContext = NULL; + XMLTextFieldImportContext* pContext = nullptr; switch (nToken) { @@ -590,7 +590,7 @@ XMLTextFieldImportContext::CreateTextFieldImportContext( default: // ignore! May not even be a textfield. // (Reminder: This method is called inside default:-branch) - pContext = NULL; + pContext = nullptr; break; } @@ -1102,7 +1102,7 @@ void XMLTimeFieldImportContext::ProcessAttribute( { case XML_TOK_TEXTFIELD_TIME_VALUE: { - if (::sax::Converter::parseTimeOrDateTime(aDateTimeValue, 0, + if (::sax::Converter::parseTimeOrDateTime(aDateTimeValue, nullptr, sAttrValue)) { bTimeOK = true; @@ -1234,7 +1234,7 @@ void XMLDateFieldImportContext::ProcessAttribute( { case XML_TOK_TEXTFIELD_DATE_VALUE: { - if (::sax::Converter::parseDateTime(aDateTimeValue, 0, sAttrValue)) + if (::sax::Converter::parseDateTime(aDateTimeValue, nullptr, sAttrValue)) { bTimeOK = true; } @@ -1704,7 +1704,7 @@ void XMLSimpleDocInfoImportContext::PrepareField( const sal_Char* XMLSimpleDocInfoImportContext::MapTokenToServiceName( sal_uInt16 nToken) { - const sal_Char* pServiceName = NULL; + const sal_Char* pServiceName = nullptr; switch(nToken) { @@ -1759,7 +1759,7 @@ const sal_Char* XMLSimpleDocInfoImportContext::MapTokenToServiceName( default: OSL_FAIL("no docinfo field token"); - pServiceName = NULL; + pServiceName = nullptr; break; } @@ -2524,7 +2524,7 @@ void XMLCountFieldImportContext::PrepareField( const sal_Char* XMLCountFieldImportContext::MapTokenToServiceName( sal_uInt16 nToken) { - const sal_Char* pServiceName = NULL; + const sal_Char* pServiceName = nullptr; switch (nToken) { @@ -2550,7 +2550,7 @@ const sal_Char* XMLCountFieldImportContext::MapTokenToServiceName( pServiceName = sAPI_page_count; break; default: - pServiceName = NULL; + pServiceName = nullptr; OSL_FAIL("unknown count field!"); break; } @@ -2706,7 +2706,7 @@ SvXMLImportContext* XMLMacroFieldImportContext::CreateChildContext( const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) { - SvXMLImportContext* pContext = NULL; + SvXMLImportContext* pContext = nullptr; if ( (nPrefix == XML_NAMESPACE_OFFICE) && IsXMLToken( rLocalName, XML_EVENT_LISTENERS ) ) @@ -3480,7 +3480,7 @@ void XMLBibliographyFieldImportContext::PrepareField( const sal_Char* XMLBibliographyFieldImportContext::MapBibliographyFieldName( const OUString& sName) { - const sal_Char* pName = NULL; + const sal_Char* pName = nullptr; if (IsXMLToken(sName, XML_IDENTIFIER)) { @@ -3611,7 +3611,7 @@ const sal_Char* XMLBibliographyFieldImportContext::MapBibliographyFieldName( else { OSL_FAIL("Unknown bibliography info data"); - pName = NULL; + pName = nullptr; } return pName; @@ -3662,7 +3662,7 @@ SvXMLImportContext* XMLAnnotationImportContext::CreateChildContext( const OUString& rLocalName, const Reference<XAttributeList >& xAttrList ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; if( XML_NAMESPACE_DC == nPrefix ) { if( IsXMLToken( rLocalName, XML_CREATOR ) ) @@ -3818,7 +3818,7 @@ void XMLAnnotationImportContext::PrepareField( xPropertySet->setPropertyValue(sPropertyInitials, makeAny(sInitials)); util::DateTime aDateTime; - if (::sax::Converter::parseDateTime(aDateTime, 0, + if (::sax::Converter::parseDateTime(aDateTime, nullptr, aDateBuffer.makeStringAndClear())) { /* diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index 2fe66284aee6..8de29693ec40 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -1068,9 +1068,9 @@ void XMLTextImportHelper::SetCursor( const Reference < XTextCursor > & rCursor ) void XMLTextImportHelper::ResetCursor() { - m_xImpl->m_xCursor.set(0); - m_xImpl->m_xText.set(0); - m_xImpl->m_xCursorAsRange.set(0); + m_xImpl->m_xCursor.set(nullptr); + m_xImpl->m_xText.set(nullptr); + m_xImpl->m_xCursorAsRange.set(nullptr); } @@ -1202,7 +1202,7 @@ OUString XMLTextImportHelper::ConvertStarFonts( const OUString& rChars, { if( (rFlags & CONV_STAR_FONT_FLAGS_VALID) == 0 ) { - XMLTextStyleContext *pStyle = 0; + XMLTextStyleContext *pStyle = nullptr; sal_uInt16 nFamily = bPara ? XML_STYLE_FAMILY_TEXT_PARAGRAPH : XML_STYLE_FAMILY_TEXT_TEXT; if (!rStyleName.isEmpty() && m_xImpl->m_xAutoStyles.Is()) @@ -1412,7 +1412,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( const sal_uInt16 nFamily = bPara ? XML_STYLE_FAMILY_TEXT_PARAGRAPH : XML_STYLE_FAMILY_TEXT_TEXT; - XMLTextStyleContext *pStyle = 0; + XMLTextStyleContext *pStyle = nullptr; OUString sStyleName( rStyleName ); if (!sStyleName.isEmpty() && m_xImpl->m_xAutoStyles.Is()) { @@ -1458,9 +1458,9 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( Reference< XIndexReplace > const xNumRules( xPropSet->getPropertyValue(s_NumberingRules), UNO_QUERY); - XMLTextListBlockContext * pListBlock(0); - XMLTextListItemContext * pListItem(0); - XMLNumberedParaContext * pNumberedParagraph(0); + XMLTextListBlockContext * pListBlock(nullptr); + XMLTextListItemContext * pListItem(nullptr); + XMLNumberedParaContext * pNumberedParagraph(nullptr); GetTextListHelper().ListContextTop( pListBlock, pListItem, pNumberedParagraph); @@ -1480,7 +1480,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( } // consider text:style-override property of <text:list-item> xNewNumRules.set( - (pListItem != 0 && pListItem->HasNumRulesOverride()) + (pListItem != nullptr && pListItem->HasNumRulesOverride()) ? pListItem->GetNumRulesOverride() : pListBlock->GetNumRules() ); nLevel = static_cast<sal_Int8>(pListBlock->GetLevel()); @@ -1905,7 +1905,7 @@ void XMLTextImportHelper::SetOutlineStyles( bool bSetEmptyLevels ) static const char s_NumberingStyleName[] = "NumberingStyleName"; static const char s_HeadingStyleName [] = "HeadingStyleName"; - if ((m_xImpl->m_xOutlineStylesCandidates != 0 || bSetEmptyLevels) && + if ((m_xImpl->m_xOutlineStylesCandidates != nullptr || bSetEmptyLevels) && m_xImpl->m_xChapterNumbering.is() && !IsInsertMode()) { @@ -2035,7 +2035,7 @@ void XMLTextImportHelper::SetHyperlink( makeAny(rTargetFrameName)); } - if ( (pEvents != NULL) && + if ( (pEvents != nullptr) && xPropSetInfo->hasPropertyByName(s_HyperLinkEvents)) { // The API treats events at hyperlinks differently from most @@ -2108,7 +2108,7 @@ void XMLTextImportHelper::SetRuby( rStyleName, true ); XMLPropStyleContext *pStyle = const_cast<XMLPropStyleContext*>(dynamic_cast< const XMLPropStyleContext* >(pTempStyle)); - if (NULL != pStyle) + if (nullptr != pStyle) pStyle->FillPropertySet( xPropSet ); } @@ -2138,7 +2138,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( const Reference< XAttributeList > & xAttrList, XMLTextType eType ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; const SvXMLTokenMap& rTokenMap = GetTextElemTokenMap(); bool bHeading = false; @@ -2329,7 +2329,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTableChildContext( sal_uInt16 /*nPrefix*/, const OUString& /*rLocalName*/, const Reference< XAttributeList > & ) { - return 0; + return nullptr; } /// get data style key for use with NumberFormat property @@ -2357,7 +2357,7 @@ sal_Int32 XMLTextImportHelper::GetDataStyleKey(const OUString& sStyleName, SvXMLNumFormatContext* pNumStyle = const_cast<SvXMLNumFormatContext*>(dynamic_cast<const SvXMLNumFormatContext*>( pStyle ) ); if( pNumStyle ) { - if( pIsSystemLanguage != NULL ) + if( pIsSystemLanguage != nullptr ) *pIsSystemLanguage = pNumStyle->IsSystemLanguage(); // return key @@ -2369,7 +2369,7 @@ sal_Int32 XMLTextImportHelper::GetDataStyleKey(const OUString& sStyleName, const SvxXMLListStyleContext *XMLTextImportHelper::FindAutoListStyle( const OUString& rName ) const { - const SvxXMLListStyleContext *pStyle = 0; + const SvxXMLListStyleContext *pStyle = nullptr; if (m_xImpl->m_xAutoStyles.Is()) { const SvXMLStyleContext* pTempStyle = @@ -2384,7 +2384,7 @@ const SvxXMLListStyleContext *XMLTextImportHelper::FindAutoListStyle( const OUSt XMLPropStyleContext *XMLTextImportHelper::FindAutoFrameStyle( const OUString& rName ) const { - XMLPropStyleContext *pStyle = 0; + XMLPropStyleContext *pStyle = nullptr; if (m_xImpl->m_xAutoStyles.Is()) { const SvXMLStyleContext* pTempStyle = @@ -2400,7 +2400,7 @@ XMLPropStyleContext *XMLTextImportHelper::FindAutoFrameStyle( const OUString& rN XMLPropStyleContext* XMLTextImportHelper::FindSectionStyle( const OUString& rName ) const { - XMLPropStyleContext* pStyle = NULL; + XMLPropStyleContext* pStyle = nullptr; if (m_xImpl->m_xAutoStyles.Is()) { const SvXMLStyleContext* pTempStyle = @@ -2417,7 +2417,7 @@ XMLPropStyleContext* XMLTextImportHelper::FindSectionStyle( XMLPropStyleContext* XMLTextImportHelper::FindPageMaster( const OUString& rName ) const { - XMLPropStyleContext* pStyle = NULL; + XMLPropStyleContext* pStyle = nullptr; if (m_xImpl->m_xAutoStyles.Is()) { const SvXMLStyleContext* pTempStyle = diff --git a/xmloff/source/text/txtimppr.cxx b/xmloff/source/text/txtimppr.cxx index 17804337a0d0..4472cbac24aa 100644 --- a/xmloff/source/text/txtimppr.cxx +++ b/xmloff/source/text/txtimppr.cxx @@ -55,7 +55,7 @@ bool XMLTextImportPropertyMapper::handleSpecialItem( case CTF_FONTNAME: case CTF_FONTNAME_CJK: case CTF_FONTNAME_CTL: - if( GetImport().GetFontDecls() != NULL ) + if( GetImport().GetFontDecls() != nullptr ) { assert(( ( CTF_FONTFAMILYNAME == @@ -357,58 +357,58 @@ void XMLTextImportPropertyMapper::finished( bool bHasAnyWidth = false; bool bHasAnyMinWidth = false; - XMLPropertyState* pFontFamilyName = 0; - XMLPropertyState* pFontStyleName = 0; - XMLPropertyState* pFontFamily = 0; - XMLPropertyState* pFontPitch = 0; - XMLPropertyState* pFontCharSet = 0; - XMLPropertyState* pNewFontStyleName = 0; - XMLPropertyState* pNewFontFamily = 0; - XMLPropertyState* pNewFontPitch = 0; - XMLPropertyState* pNewFontCharSet = 0; - XMLPropertyState* pFontFamilyNameCJK = 0; - XMLPropertyState* pFontStyleNameCJK = 0; - XMLPropertyState* pFontFamilyCJK = 0; - XMLPropertyState* pFontPitchCJK = 0; - XMLPropertyState* pFontCharSetCJK = 0; - XMLPropertyState* pNewFontStyleNameCJK = 0; - XMLPropertyState* pNewFontFamilyCJK = 0; - XMLPropertyState* pNewFontPitchCJK = 0; - XMLPropertyState* pNewFontCharSetCJK = 0; - XMLPropertyState* pFontFamilyNameCTL = 0; - XMLPropertyState* pFontStyleNameCTL = 0; - XMLPropertyState* pFontFamilyCTL = 0; - XMLPropertyState* pFontPitchCTL = 0; - XMLPropertyState* pFontCharSetCTL = 0; - XMLPropertyState* pNewFontStyleNameCTL = 0; - XMLPropertyState* pNewFontFamilyCTL = 0; - XMLPropertyState* pNewFontPitchCTL = 0; - XMLPropertyState* pNewFontCharSetCTL = 0; - XMLPropertyState* pAllBorderDistance = 0; - XMLPropertyState* pBorderDistances[4] = { 0, 0, 0, 0 }; - XMLPropertyState* pNewBorderDistances[4] = { 0, 0, 0, 0 }; - XMLPropertyState* pAllBorder = 0; - XMLPropertyState* pBorders[4] = { 0, 0, 0, 0 }; - XMLPropertyState* pNewBorders[4] = { 0, 0, 0, 0 }; - XMLPropertyState* pAllBorderWidth = 0; - XMLPropertyState* pBorderWidths[4] = { 0, 0, 0, 0 }; - XMLPropertyState* pCharAllBorderDistance = 0; - XMLPropertyState* pCharBorderDistances[4] = { 0, 0, 0, 0 }; - XMLPropertyState* pCharNewBorderDistances[4] = { 0, 0, 0, 0 }; - XMLPropertyState* pCharAllBorder = 0; - XMLPropertyState* pCharBorders[4] = { 0, 0, 0, 0 }; - XMLPropertyState* pCharNewBorders[4] = { 0, 0, 0, 0 }; - XMLPropertyState* pCharAllBorderWidth = 0; - XMLPropertyState* pCharBorderWidths[4] = { 0, 0, 0, 0 }; - XMLPropertyState* pVertOrient = 0; - XMLPropertyState* pVertOrientRelAsChar = 0; - XMLPropertyState* pBackTransparency = NULL; // transparency in % - XMLPropertyState* pBackTransparent = NULL; // transparency as boolean - XMLPropertyState* pAllParaMargin = 0; - XMLPropertyState* pParaMargins[4] = { 0, 0, 0, 0 }; + XMLPropertyState* pFontFamilyName = nullptr; + XMLPropertyState* pFontStyleName = nullptr; + XMLPropertyState* pFontFamily = nullptr; + XMLPropertyState* pFontPitch = nullptr; + XMLPropertyState* pFontCharSet = nullptr; + XMLPropertyState* pNewFontStyleName = nullptr; + XMLPropertyState* pNewFontFamily = nullptr; + XMLPropertyState* pNewFontPitch = nullptr; + XMLPropertyState* pNewFontCharSet = nullptr; + XMLPropertyState* pFontFamilyNameCJK = nullptr; + XMLPropertyState* pFontStyleNameCJK = nullptr; + XMLPropertyState* pFontFamilyCJK = nullptr; + XMLPropertyState* pFontPitchCJK = nullptr; + XMLPropertyState* pFontCharSetCJK = nullptr; + XMLPropertyState* pNewFontStyleNameCJK = nullptr; + XMLPropertyState* pNewFontFamilyCJK = nullptr; + XMLPropertyState* pNewFontPitchCJK = nullptr; + XMLPropertyState* pNewFontCharSetCJK = nullptr; + XMLPropertyState* pFontFamilyNameCTL = nullptr; + XMLPropertyState* pFontStyleNameCTL = nullptr; + XMLPropertyState* pFontFamilyCTL = nullptr; + XMLPropertyState* pFontPitchCTL = nullptr; + XMLPropertyState* pFontCharSetCTL = nullptr; + XMLPropertyState* pNewFontStyleNameCTL = nullptr; + XMLPropertyState* pNewFontFamilyCTL = nullptr; + XMLPropertyState* pNewFontPitchCTL = nullptr; + XMLPropertyState* pNewFontCharSetCTL = nullptr; + XMLPropertyState* pAllBorderDistance = nullptr; + XMLPropertyState* pBorderDistances[4] = { nullptr, nullptr, nullptr, nullptr }; + XMLPropertyState* pNewBorderDistances[4] = { nullptr, nullptr, nullptr, nullptr }; + XMLPropertyState* pAllBorder = nullptr; + XMLPropertyState* pBorders[4] = { nullptr, nullptr, nullptr, nullptr }; + XMLPropertyState* pNewBorders[4] = { nullptr, nullptr, nullptr, nullptr }; + XMLPropertyState* pAllBorderWidth = nullptr; + XMLPropertyState* pBorderWidths[4] = { nullptr, nullptr, nullptr, nullptr }; + XMLPropertyState* pCharAllBorderDistance = nullptr; + XMLPropertyState* pCharBorderDistances[4] = { nullptr, nullptr, nullptr, nullptr }; + XMLPropertyState* pCharNewBorderDistances[4] = { nullptr, nullptr, nullptr, nullptr }; + XMLPropertyState* pCharAllBorder = nullptr; + XMLPropertyState* pCharBorders[4] = { nullptr, nullptr, nullptr, nullptr }; + XMLPropertyState* pCharNewBorders[4] = { nullptr, nullptr, nullptr, nullptr }; + XMLPropertyState* pCharAllBorderWidth = nullptr; + XMLPropertyState* pCharBorderWidths[4] = { nullptr, nullptr, nullptr, nullptr }; + XMLPropertyState* pVertOrient = nullptr; + XMLPropertyState* pVertOrientRelAsChar = nullptr; + XMLPropertyState* pBackTransparency = nullptr; // transparency in % + XMLPropertyState* pBackTransparent = nullptr; // transparency as boolean + XMLPropertyState* pAllParaMargin = nullptr; + XMLPropertyState* pParaMargins[4] = { nullptr, nullptr, nullptr, nullptr }; ::std::unique_ptr<XMLPropertyState> pNewParaMargins[4]; - XMLPropertyState* pAllMargin = 0; - XMLPropertyState* pMargins[4] = { 0, 0, 0, 0 }; + XMLPropertyState* pAllMargin = nullptr; + XMLPropertyState* pMargins[4] = { nullptr, nullptr, nullptr, nullptr }; ::std::unique_ptr<XMLPropertyState> pNewMargins[4]; XMLPropertyState* pFillStyle(nullptr); XMLPropertyState* pFillColor(nullptr); @@ -669,7 +669,7 @@ void XMLTextImportPropertyMapper::finished( } // #i5775# don't overwrite %transparency with binary transparency - if( ( pBackTransparency != NULL ) && ( pBackTransparent != NULL ) ) + if( ( pBackTransparency != nullptr ) && ( pBackTransparent != nullptr ) ) { if( ! *static_cast<sal_Bool const *>(pBackTransparent->maValue.getValue()) ) pBackTransparent->mnIndex = -1; diff --git a/xmloff/source/text/txtlists.cxx b/xmloff/source/text/txtlists.cxx index 5c2e13969593..f3f6c4e24e32 100644 --- a/xmloff/source/text/txtlists.cxx +++ b/xmloff/source/text/txtlists.cxx @@ -38,13 +38,13 @@ using namespace ::com::sun::star; XMLTextListsHelper::XMLTextListsHelper() - : mpProcessedLists( 0 ), + : mpProcessedLists( nullptr ), msLastProcessedListId(), msListStyleOfLastProcessedList(), // Inconsistent behavior regarding lists (#i92811#) - mpMapListIdToListStyleDefaultListId( 0 ), - mpContinuingLists( 0 ), - mpListStack( 0 ) + mpMapListIdToListStyleDefaultListId( nullptr ), + mpContinuingLists( nullptr ), + mpListStack( nullptr ) { } @@ -77,16 +77,16 @@ void XMLTextListsHelper::PushListContext( XMLTextListBlockContext *i_pListBlock) { mListStack.push(::boost::make_tuple(i_pListBlock, - static_cast<XMLTextListItemContext*>(0), - static_cast<XMLNumberedParaContext*>(0))); + static_cast<XMLTextListItemContext*>(nullptr), + static_cast<XMLNumberedParaContext*>(nullptr))); } void XMLTextListsHelper::PushListContext( XMLNumberedParaContext *i_pNumberedParagraph) { mListStack.push(::boost::make_tuple( - static_cast<XMLTextListBlockContext*>(0), - static_cast<XMLTextListItemContext*>(0), i_pNumberedParagraph)); + static_cast<XMLTextListBlockContext*>(nullptr), + static_cast<XMLTextListItemContext*>(nullptr), i_pNumberedParagraph)); } void XMLTextListsHelper::PopListContext() @@ -139,7 +139,7 @@ void XMLTextListsHelper::KeepListAsProcessed( const OUString& sListId, return; } - if ( mpProcessedLists == 0 ) + if ( mpProcessedLists == nullptr ) { mpProcessedLists = new tMapForLists(); } @@ -154,7 +154,7 @@ void XMLTextListsHelper::KeepListAsProcessed( const OUString& sListId, // Inconsistent behavior regarding lists (#i92811#) if ( !sListStyleDefaultListId.isEmpty()) { - if ( mpMapListIdToListStyleDefaultListId == 0 ) + if ( mpMapListIdToListStyleDefaultListId == nullptr ) { mpMapListIdToListStyleDefaultListId = new tMapForLists(); } @@ -172,7 +172,7 @@ void XMLTextListsHelper::KeepListAsProcessed( const OUString& sListId, bool XMLTextListsHelper::IsListProcessed( const OUString& sListId ) const { - if ( mpProcessedLists == 0 ) + if ( mpProcessedLists == nullptr ) { return false; } @@ -183,7 +183,7 @@ bool XMLTextListsHelper::IsListProcessed( const OUString& sListId ) const OUString XMLTextListsHelper::GetListStyleOfProcessedList( const OUString& sListId ) const { - if ( mpProcessedLists != 0 ) + if ( mpProcessedLists != nullptr ) { tMapForLists::const_iterator aIter = mpProcessedLists->find( sListId ); if ( aIter != mpProcessedLists->end() ) @@ -198,7 +198,7 @@ OUString XMLTextListsHelper::GetListStyleOfProcessedList( OUString XMLTextListsHelper::GetContinueListIdOfProcessedList( const OUString& sListId ) const { - if ( mpProcessedLists != 0 ) + if ( mpProcessedLists != nullptr ) { tMapForLists::const_iterator aIter = mpProcessedLists->find( sListId ); if ( aIter != mpProcessedLists->end() ) @@ -214,7 +214,7 @@ OUString XMLTextListsHelper::GetContinueListIdOfProcessedList( OUString XMLTextListsHelper::GenerateNewListId() const { - static bool bHack = (getenv("LIBO_ONEWAY_STABLE_ODF_EXPORT") != NULL); + static bool bHack = (getenv("LIBO_ONEWAY_STABLE_ODF_EXPORT") != nullptr); OUString sTmpStr( "list" ); if (bHack) @@ -233,7 +233,7 @@ OUString XMLTextListsHelper::GenerateNewListId() const } OUString sNewListId( sTmpStr ); - if ( mpProcessedLists != 0 ) + if ( mpProcessedLists != nullptr ) { long nHitCount = 0; while ( mpProcessedLists->find( sNewListId ) != mpProcessedLists->end() ) @@ -256,7 +256,7 @@ OUString XMLTextListsHelper::GetListIdForListBlock( XMLTextListBlockContext& rLi sListBlockListId = rListBlock.GetListId(); } - if ( mpMapListIdToListStyleDefaultListId != 0 ) + if ( mpMapListIdToListStyleDefaultListId != nullptr ) { if ( !sListBlockListId.isEmpty() ) { @@ -281,7 +281,7 @@ OUString XMLTextListsHelper::GetListIdForListBlock( XMLTextListBlockContext& rLi void XMLTextListsHelper::StoreLastContinuingList( const OUString& sListId, const OUString& sContinuingListId ) { - if ( mpContinuingLists == 0 ) + if ( mpContinuingLists == nullptr ) { mpContinuingLists = new tMapForContinuingLists(); } @@ -292,7 +292,7 @@ void XMLTextListsHelper::StoreLastContinuingList( const OUString& sListId, OUString XMLTextListsHelper::GetLastContinuingListId( const OUString& sListId ) const { - if ( mpContinuingLists != 0) + if ( mpContinuingLists != nullptr) { tMapForContinuingLists::const_iterator aIter = mpContinuingLists->find( sListId ); @@ -308,7 +308,7 @@ OUString XMLTextListsHelper::GetLastContinuingListId( void XMLTextListsHelper::PushListOnStack( const OUString& sListId, const OUString& sListStyleName ) { - if ( mpListStack == 0 ) + if ( mpListStack == nullptr ) { mpListStack = new tStackForLists(); } @@ -318,7 +318,7 @@ void XMLTextListsHelper::PushListOnStack( const OUString& sListId, } void XMLTextListsHelper::PopListFromStack() { - if ( mpListStack != 0 && + if ( mpListStack != nullptr && mpListStack->size() > 0 ) { mpListStack->pop_back(); @@ -327,7 +327,7 @@ void XMLTextListsHelper::PopListFromStack() bool XMLTextListsHelper::EqualsToTopListStyleOnStack( const OUString& sListId ) const { - return mpListStack != 0 && sListId == mpListStack->back().second; + return mpListStack != nullptr && sListId == mpListStack->back().second; } OUString @@ -377,7 +377,7 @@ XMLTextListsHelper::EnsureNumberedParagraph( // create default list style for top level sal_Int16 lev(0); rNPList.push_back(::std::make_pair(none, - MakeNumRule(i_rImport, 0, none, none, lev) )); + MakeNumRule(i_rImport, nullptr, none, none, lev) )); } // create num rule first because this might clamp the level... uno::Reference<container::XIndexReplace> xNumRules; @@ -387,7 +387,7 @@ XMLTextListsHelper::EnsureNumberedParagraph( const size_t parent( std::min(static_cast<size_t>(io_rLevel), rNPList.size()) - 1 ); xNumRules = MakeNumRule(i_rImport, - io_rLevel > 0 ? rNPList[parent].second : 0, + io_rLevel > 0 ? rNPList[parent].second : nullptr, io_rLevel > 0 ? rNPList[parent].first : none, i_StyleName, io_rLevel); } else { diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index fdca9f6e9097..97317ab595a8 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -188,7 +188,7 @@ namespace { framebound_map_t::const_iterator it = m_vFrameBoundsOf.find(rParentFrame); if(it == m_vFrameBoundsOf.end()) - return NULL; + return nullptr; return &(it->second); }; Reference<XEnumeration> createEnumeration() const @@ -278,7 +278,7 @@ static const sal_Char* aParagraphPropertyNamesAuto[] = "NumberingRules", "ParaConditionalStyleName", "ParaStyleName", - NULL + nullptr }; enum eParagraphPropertyNamesEnumAuto @@ -296,7 +296,7 @@ static const sal_Char* aParagraphPropertyNames[] = "ParaConditionalStyleName", "ParaStyleName", "TextSection", - NULL + nullptr }; enum eParagraphPropertyNamesEnum @@ -1164,17 +1164,17 @@ XMLTextParagraphExport::XMLTextParagraphExport( m_xImpl(new Impl), rAutoStylePool( rASP ), pBoundFrameSets(new BoundFrameSets(GetExport().GetModel())), - pFieldExport( 0 ), - pListElements( 0 ), + pFieldExport( nullptr ), + pListElements( nullptr ), pListAutoPool( new XMLTextListAutoStylePool( this->GetExport() ) ), - pSectionExport( NULL ), - pIndexMarkExport( NULL ), - pRedlineExport( NULL ), - pHeadingStyles( NULL ), + pSectionExport( nullptr ), + pIndexMarkExport( nullptr ), + pRedlineExport( nullptr ), + pHeadingStyles( nullptr ), bProgress( false ), bBlock( false ), bOpenRuby( false ), - mpTextListsHelper( 0 ), + mpTextListsHelper( nullptr ), maTextListsHelperStack(), sActualSize("ActualSize"), // Implement Title/Description Elements UI (#i73249#) @@ -1484,7 +1484,7 @@ bool XMLTextParagraphExport::collectTextAutoStylesOptimized( bool bIsProgress ) aAny = xAutoStylesEnum->nextElement(); Reference< XAutoStyle > xAutoStyle = *static_cast<Reference<XAutoStyle> const *>(aAny.getValue()); Reference < XPropertySet > xPSet( xAutoStyle, uno::UNO_QUERY ); - Add( nFamily, xPSet, 0, true ); + Add( nFamily, xPSet, nullptr, true ); } } } @@ -1701,11 +1701,11 @@ void XMLTextParagraphExport::exportText( // #96530# Export redlines at start & end of XText before & after // exporting the text content enumeration - if( !bAutoStyles && (pRedlineExport != NULL) ) + if( !bAutoStyles && (pRedlineExport != nullptr) ) pRedlineExport->ExportStartOrEndRedline( xPropertySet, true ); exportTextContentEnumeration( xParaEnum, bAutoStyles, xBaseSection, - bIsProgress, bExportParagraph, 0, bExportLevels, eExtensionNS ); - if( !bAutoStyles && (pRedlineExport != NULL) ) + bIsProgress, bExportParagraph, nullptr, bExportLevels, eExtensionNS ); + if( !bAutoStyles && (pRedlineExport != nullptr) ) pRedlineExport->ExportStartOrEndRedline( xPropertySet, false ); } @@ -1730,14 +1730,14 @@ void XMLTextParagraphExport::exportText( // #96530# Export redlines at start & end of XText before & after // exporting the text content enumeration Reference<XPropertySet> xPropertySet; - if( !bAutoStyles && (pRedlineExport != NULL) ) + if( !bAutoStyles && (pRedlineExport != nullptr) ) { xPropertySet.set(rText, uno::UNO_QUERY ); pRedlineExport->ExportStartOrEndRedline( xPropertySet, true ); } exportTextContentEnumeration( xParaEnum, bAutoStyles, rBaseSection, bIsProgress, bExportParagraph ); - if( !bAutoStyles && (pRedlineExport != NULL) ) + if( !bAutoStyles && (pRedlineExport != nullptr) ) pRedlineExport->ExportStartOrEndRedline( xPropertySet, false ); } @@ -1849,12 +1849,12 @@ bool XMLTextParagraphExport::exportTextContentEnumeration( if (! pSectionExport->IsMuteSection(xCurrentTextSection)) { // export start + end redlines (for wholly redlined tables) - if ((! bAutoStyles) && (NULL != pRedlineExport)) + if ((! bAutoStyles) && (nullptr != pRedlineExport)) pRedlineExport->ExportStartOrEndRedline(xTxtCntnt, true); exportTable( xTxtCntnt, bAutoStyles, bIsProgress ); - if ((! bAutoStyles) && (NULL != pRedlineExport)) + if ((! bAutoStyles) && (nullptr != pRedlineExport)) pRedlineExport->ExportStartOrEndRedline(xTxtCntnt, false); } else if( !bAutoStyles ) @@ -2267,7 +2267,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration( } else if (sType.equals(sRedline)) { - if (NULL != pRedlineExport) + if (nullptr != pRedlineExport) pRedlineExport->ExportChange(xPropSet, bAutoStyles); } else if (sType.equals(sRuby)) @@ -2541,7 +2541,7 @@ void XMLTextParagraphExport::exportTextMark( } // export element - DBG_ASSERT(pElements != NULL, "illegal element array"); + DBG_ASSERT(pElements != nullptr, "illegal element array"); DBG_ASSERT(nElement >= 0, "illegal element number"); DBG_ASSERT(nElement <= 2, "illegal element number"); SvXMLElementExport aElem(GetExport(), @@ -3585,7 +3585,7 @@ void XMLTextParagraphExport::exportUsedDeclarations( bool bOnlyUsed ) void XMLTextParagraphExport::exportTrackedChanges(bool bAutoStyles) { - if (NULL != pRedlineExport) + if (nullptr != pRedlineExport) pRedlineExport->ExportChangesList( bAutoStyles ); } @@ -3593,20 +3593,20 @@ void XMLTextParagraphExport::exportTrackedChanges( const Reference<XText> & rText, bool bAutoStyle) { - if (NULL != pRedlineExport) + if (nullptr != pRedlineExport) pRedlineExport->ExportChangesList(rText, bAutoStyle); } void XMLTextParagraphExport::recordTrackedChangesForXText( const Reference<XText> & rText ) { - if (NULL != pRedlineExport) + if (nullptr != pRedlineExport) pRedlineExport->SetCurrentXText(rText); } void XMLTextParagraphExport::recordTrackedChangesNoXText() { - if (NULL != pRedlineExport) + if (nullptr != pRedlineExport) pRedlineExport->SetCurrentXText(); } @@ -3769,7 +3769,7 @@ void XMLTextParagraphExport::PreventExportOfControlsInMuteSections( // if we don't have shapes or a form export, there's nothing to do return; } - DBG_ASSERT( pSectionExport != NULL, "We need the section export." ); + DBG_ASSERT( pSectionExport != nullptr, "We need the section export." ); Reference<XEnumeration> xShapesEnum = pBoundFrameSets->GetShapes()->createEnumeration(); if(!xShapesEnum.is()) @@ -3819,7 +3819,7 @@ void XMLTextParagraphExport::PushNewTextListsHelper() void XMLTextParagraphExport::PopTextListsHelper() { delete mpTextListsHelper; - mpTextListsHelper = 0; + mpTextListsHelper = nullptr; maTextListsHelperStack.pop_back(); if ( !maTextListsHelperStack.empty() ) { diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx index e99e4e617ac1..0c227ddabb2e 100644 --- a/xmloff/source/text/txtparai.cxx +++ b/xmloff/source/text/txtparai.cxx @@ -405,7 +405,7 @@ XMLImpHyperlinkContext_Impl::XMLImpHyperlinkContext_Impl( { // hyperlink without an URL is not imported. delete mpHint; - mpHint = NULL; + mpHint = nullptr; } else { @@ -415,7 +415,7 @@ XMLImpHyperlinkContext_Impl::XMLImpHyperlinkContext_Impl( XMLImpHyperlinkContext_Impl::~XMLImpHyperlinkContext_Impl() { - if( mpHint != NULL ) + if( mpHint != nullptr ) mpHint->SetEnd( GetImport().GetTextImport() ->GetCursorAsRange()->getStart() ); } @@ -1523,7 +1523,7 @@ XMLImpSpanContext_Impl::XMLImpSpanContext_Impl( ) : SvXMLImportContext( rImport, nPrfx, rLName ) , m_rHints( rHints ) -, pHint( 0 ) +, pHint( nullptr ) , rIgnoreLeadingSpace( rIgnLeadSpace ) , nStarFontsConvFlags( nSFConvFlags & (CONV_FROM_STAR_BATS|CONV_FROM_STAR_MATH) ) { @@ -1568,7 +1568,7 @@ SvXMLImportContext *XMLImpSpanContext_Impl::CreateChildContext( sal_uInt8 nStarFontsConvFlags ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; switch( nToken ) { @@ -1770,7 +1770,7 @@ SvXMLImportContext *XMLImpSpanContext_Impl::CreateChildContext( rImport, *rImport.GetTextImport().get(), nPrefix, rLocalName, nToken); // #108784# import draw elements (except control shapes in headers) - if( pContext == NULL && + if( pContext == nullptr && !( rImport.GetTextImport()->IsInHeaderFooter() && nPrefix == XML_NAMESPACE_DRAW && IsXMLToken( rLocalName, XML_CONTROL ) ) ) @@ -1837,7 +1837,7 @@ XMLParaContext::XMLParaContext( xStart( rImport.GetTextImport()->GetCursorAsRange()->getStart() ), m_bHaveAbout(false), nOutlineLevel( IsXMLToken( rLName, XML_H ) ? 1 : -1 ), - pHints( 0 ), + pHints( nullptr ), // Lost outline numbering in master document (#i73509#) mbOutlineLevelAttrFound( false ), bIgnoreLeadingSpace( true ), @@ -2348,7 +2348,7 @@ SvXMLImportContext *XMLNumberedParaContext::CreateChildContext( sal_uInt16 i_nPrefix, const OUString& i_rLocalName, const Reference< xml::sax::XAttributeList > & i_xAttrList ) { - SvXMLImportContext *pContext( 0 ); + SvXMLImportContext *pContext( nullptr ); if ( XML_NAMESPACE_TEXT == i_nPrefix || XML_NAMESPACE_LO_EXT == i_nPrefix ) diff --git a/xmloff/source/text/txtparaimphint.hxx b/xmloff/source/text/txtparaimphint.hxx index 78b7cdde8482..973942a60b74 100644 --- a/xmloff/source/text/txtparaimphint.hxx +++ b/xmloff/source/text/txtparaimphint.hxx @@ -119,13 +119,13 @@ public: XMLHyperlinkHint_Impl( const css::uno::Reference < css::text::XTextRange > & rPos ) : XMLHint_Impl( XML_HINT_HYPERLINK, rPos, rPos ), - pEvents( NULL ) + pEvents( nullptr ) { } virtual ~XMLHyperlinkHint_Impl() { - if (NULL != pEvents) + if (nullptr != pEvents) pEvents->ReleaseRef(); } @@ -146,7 +146,7 @@ public: void SetEventsContext( XMLEventsImportContext* pCtxt ) { pEvents = pCtxt; - if (pEvents != NULL) + if (pEvents != nullptr) pEvents->AddFirstRef(); } }; diff --git a/xmloff/source/text/txtprhdl.cxx b/xmloff/source/text/txtprhdl.cxx index f8496acd1bc5..8b54a2560ef8 100644 --- a/xmloff/source/text/txtprhdl.cxx +++ b/xmloff/source/text/txtprhdl.cxx @@ -1231,7 +1231,7 @@ public: const XMLPropertyHandler *XMLTextPropertyHandlerFactory_Impl::GetPropertyHandler ( sal_Int32 nType ) { - const XMLPropertyHandler* pHdl = 0; + const XMLPropertyHandler* pHdl = nullptr; switch( nType ) { case XML_TYPE_TEXT_DROPCAP: diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx index bcaf31712ae7..2cc88b1fa256 100644 --- a/xmloff/source/text/txtprmap.cxx +++ b/xmloff/source/text/txtprmap.cxx @@ -76,7 +76,7 @@ using namespace ::xmloff::token; #define MAP_EXT_I(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_012_EXT_COMPAT, true } #define M_END() \ - { NULL, 0, 0, XML_TOKEN_INVALID, 0, 0, SvtSaveOptions::ODFVER_010, false } + { nullptr, 0, 0, XML_TOKEN_INVALID, 0, 0, SvtSaveOptions::ODFVER_010, false } //UUUU #define _MAP(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_010, false } @@ -994,7 +994,7 @@ XMLPropertyMapEntry aXMLTableRowDefaultsMap[] = static XMLPropertyMapEntry *lcl_txtprmap_getMap( TextPropMap nType ) { - XMLPropertyMapEntry *pMap = 0; + XMLPropertyMapEntry *pMap = nullptr; switch( nType ) { case TextPropMap::TEXT: diff --git a/xmloff/source/text/txtsecte.cxx b/xmloff/source/text/txtsecte.cxx index ec59681eca21..0cac1350f7b0 100644 --- a/xmloff/source/text/txtsecte.cxx +++ b/xmloff/source/text/txtsecte.cxx @@ -186,7 +186,7 @@ void XMLTextParagraphExport::exportListAndSectionChange( while ((aOldForward != aOldStack.end()) && (*aOldForward != *aOld)) { - if ( !bAutoStyles && (NULL != pRedlineExport) ) + if ( !bAutoStyles && (nullptr != pRedlineExport) ) pRedlineExport->ExportStartOrEndRedline(*aOldForward, false); pSectionExport->ExportSectionEnd(*aOldForward, bAutoStyles); @@ -194,7 +194,7 @@ void XMLTextParagraphExport::exportListAndSectionChange( } if (aOldForward != aOldStack.end()) { - if ( !bAutoStyles && (NULL != pRedlineExport) ) + if ( !bAutoStyles && (nullptr != pRedlineExport) ) pRedlineExport->ExportStartOrEndRedline(*aOldForward, false); pSectionExport->ExportSectionEnd(*aOldForward, bAutoStyles); @@ -205,7 +205,7 @@ void XMLTextParagraphExport::exportListAndSectionChange( // (order: oldest to newest) while (aNew != aNewStack.rend()) { - if ( !bAutoStyles && (NULL != pRedlineExport) ) + if ( !bAutoStyles && (nullptr != pRedlineExport) ) pRedlineExport->ExportStartOrEndRedline(*aNew, true); pSectionExport->ExportSectionStart(*aNew, bAutoStyles); ++aNew; diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx index 3a34c29224ee..e7495a26ddbf 100644 --- a/xmloff/source/text/txtstyli.cxx +++ b/xmloff/source/text/txtstyli.cxx @@ -145,7 +145,7 @@ XMLTextStyleContext::XMLTextStyleContext( SvXMLImport& rImport, , bHasCombinedCharactersLetter( false ) // Inherited paragraph style lost information about unset numbering (#i69523#) , mbListStyleSet( false ) -, pEventContext( NULL ) +, pEventContext( nullptr ) { } @@ -158,7 +158,7 @@ SvXMLImportContext *XMLTextStyleContext::CreateChildContext( const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = 0; + SvXMLImportContext *pContext = nullptr; if( XML_NAMESPACE_STYLE == nPrefix ) { @@ -234,7 +234,7 @@ void XMLTextStyleContext::CreateAndInsert( bool bOverwrite ) } // tell the style about it's events (if applicable) - if (NULL != pEventContext) + if (nullptr != pEventContext) { // set event suppplier and release reference to context Reference<document::XEventsSupplier> xEventsSupplier(xStyle,UNO_QUERY); @@ -593,7 +593,7 @@ void XMLTextStyleContext::FillPropertySet( { Sequence< rtl::OUString > aSeq(1); aSeq[0] = sStyleName; - GetImport().SetError(XMLERROR_STYLE_PROP_VALUE | XMLERROR_FLAG_WARNING, aSeq, e.Message, NULL); + GetImport().SetError(XMLERROR_STYLE_PROP_VALUE | XMLERROR_FLAG_WARNING, aSeq, e.Message, nullptr); } break; } diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx index 9ee5e6933899..0a35e2d7eb99 100644 --- a/xmloff/source/text/txtvfldi.cxx +++ b/xmloff/source/text/txtvfldi.cxx @@ -780,7 +780,7 @@ SvXMLImportContext* XMLVariableDeclsImportContext::CreateChildContext( const Reference<xml::sax::XAttributeList> & xAttrList ) { enum XMLTokenEnum eElementName; - SvXMLImportContext* pImportContext = NULL; + SvXMLImportContext* pImportContext = nullptr; if( XML_NAMESPACE_TEXT == nPrefix ) { @@ -810,7 +810,7 @@ SvXMLImportContext* XMLVariableDeclsImportContext::CreateChildContext( } // if no context was created, use default context - if (NULL == pImportContext) { + if (nullptr == pImportContext) { pImportContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, xAttrList); diff --git a/xmloff/source/transform/ChartOASISTContext.cxx b/xmloff/source/transform/ChartOASISTContext.cxx index fb2a8752f234..2a7c507af1f8 100644 --- a/xmloff/source/transform/ChartOASISTContext.cxx +++ b/xmloff/source/transform/ChartOASISTContext.cxx @@ -50,7 +50,7 @@ void XMLChartOASISTransformerContext::StartElement( OUString aAddInName; Reference< XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = 0; + XMLMutableAttributeList *pMutableAttrList = nullptr; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { diff --git a/xmloff/source/transform/ChartOOoTContext.cxx b/xmloff/source/transform/ChartOOoTContext.cxx index e0fda02250d2..86d3e4841c7f 100644 --- a/xmloff/source/transform/ChartOOoTContext.cxx +++ b/xmloff/source/transform/ChartOOoTContext.cxx @@ -51,7 +51,7 @@ void XMLChartOOoTransformerContext::StartElement( sal_Int16 nClassName = -1; OUString aAddInName; Reference< XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = 0; + XMLMutableAttributeList *pMutableAttrList = nullptr; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { diff --git a/xmloff/source/transform/ChartPlotAreaOASISTContext.cxx b/xmloff/source/transform/ChartPlotAreaOASISTContext.cxx index 934bae429c89..95dc0763a234 100644 --- a/xmloff/source/transform/ChartPlotAreaOASISTContext.cxx +++ b/xmloff/source/transform/ChartPlotAreaOASISTContext.cxx @@ -74,7 +74,7 @@ XMLTransformerContext * XMLAxisOASISContext::CreateChildContext( const OUString& rQName, const Reference< xml::sax::XAttributeList >& xAttrList ) { - XMLTransformerContext * pContext = 0; + XMLTransformerContext * pContext = nullptr; if( XML_NAMESPACE_CHART == nPrefix && IsXMLToken( rLocalName, XML_CATEGORIES ) ) @@ -97,7 +97,7 @@ void XMLAxisOASISContext::StartElement( const Reference< xml::sax::XAttributeList >& rAttrList ) { Reference< xml::sax::XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = 0; + XMLMutableAttributeList *pMutableAttrList = nullptr; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { @@ -200,7 +200,7 @@ XMLTransformerContext * XMLChartPlotAreaOASISTContext::CreateChildContext( const OUString& rQName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) { - XMLTransformerContext *pContext = 0; + XMLTransformerContext *pContext = nullptr; if( XML_NAMESPACE_CHART == nPrefix && IsXMLToken( rLocalName, XML_AXIS ) ) diff --git a/xmloff/source/transform/ChartPlotAreaOOoTContext.cxx b/xmloff/source/transform/ChartPlotAreaOOoTContext.cxx index 753055d0f065..5df97537a1aa 100644 --- a/xmloff/source/transform/ChartPlotAreaOOoTContext.cxx +++ b/xmloff/source/transform/ChartPlotAreaOOoTContext.cxx @@ -61,7 +61,7 @@ void XMLAxisOOoContext::StartElement( const Reference< xml::sax::XAttributeList >& rAttrList ) { Reference< xml::sax::XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = 0; + XMLMutableAttributeList *pMutableAttrList = nullptr; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { @@ -132,7 +132,7 @@ XMLTransformerContext * XMLChartPlotAreaOOoTContext::CreateChildContext( const OUString& rQName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) { - XMLTransformerContext *pContext = 0; + XMLTransformerContext *pContext = nullptr; if( XML_NAMESPACE_CHART == nPrefix && IsXMLToken( rLocalName, XML_AXIS ) ) @@ -154,7 +154,7 @@ XMLTransformerContext * XMLChartPlotAreaOOoTContext::CreateChildContext( for( ; ! bFound && aIter != m_aChildContexts.end(); ++aIter ) { XMLAxisOOoContext * pAxisContext = (*aIter).get(); - if( pAxisContext != 0 ) + if( pAxisContext != nullptr ) { // iterate over attributes to find category axis Reference< xml::sax::XAttributeList > xNewAttrList( pAxisContext->GetAttrList()); diff --git a/xmloff/source/transform/ControlOASISTContext.cxx b/xmloff/source/transform/ControlOASISTContext.cxx index 1e528999c908..b2f570217a34 100644 --- a/xmloff/source/transform/ControlOASISTContext.cxx +++ b/xmloff/source/transform/ControlOASISTContext.cxx @@ -55,12 +55,12 @@ void XMLControlOASISTransformerContext::StartElement( OSL_ENSURE( pActions, "go no actions" ); Reference< XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = 0; + XMLMutableAttributeList *pMutableAttrList = nullptr; // GetTransformer().ProcessAttrList( xAttrList, OOO_SHAPE_ACTIONS, // sal_True ); XMLMutableAttributeList *pControlMutableAttrList = - m_bCreateControl ? new XMLMutableAttributeList : 0; + m_bCreateControl ? new XMLMutableAttributeList : nullptr; Reference< XAttributeList > xControlAttrList( pControlMutableAttrList ); sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; diff --git a/xmloff/source/transform/ControlOOoTContext.cxx b/xmloff/source/transform/ControlOOoTContext.cxx index 8f5708ae89ce..bff9ace673d3 100644 --- a/xmloff/source/transform/ControlOOoTContext.cxx +++ b/xmloff/source/transform/ControlOOoTContext.cxx @@ -54,7 +54,7 @@ XMLTransformerContext *XMLControlOOoTransformerContext::CreateChildContext( const OUString& rQName, const Reference< XAttributeList >& rAttrList ) { - XMLTransformerContext *pContext = 0; + XMLTransformerContext *pContext = nullptr; if( m_aElemQName.isEmpty() ) { diff --git a/xmloff/source/transform/CreateElemTContext.cxx b/xmloff/source/transform/CreateElemTContext.cxx index 8d1e8a54abcb..e39864636bde 100644 --- a/xmloff/source/transform/CreateElemTContext.cxx +++ b/xmloff/source/transform/CreateElemTContext.cxx @@ -51,7 +51,7 @@ void XMLCreateElemTransformerContext::StartElement( XMLTransformerContextVector aChildContexts; - XMLMutableAttributeList *pMutableAttrList = 0; + XMLMutableAttributeList *pMutableAttrList = nullptr; XMLTransformerActions *pActions = GetTransformer().GetUserDefinedActions( m_nActionMap ); OSL_ENSURE( pActions, "go no actions" ); diff --git a/xmloff/source/transform/DeepTContext.cxx b/xmloff/source/transform/DeepTContext.cxx index ae1c30691d14..50bf401d5d43 100644 --- a/xmloff/source/transform/DeepTContext.cxx +++ b/xmloff/source/transform/DeepTContext.cxx @@ -81,7 +81,7 @@ XMLTransformerContext *XMLPersElemContentTContext::CreateChildContext( const OUString& rQName, const Reference< XAttributeList >& ) { - XMLTransformerContext *pContext = 0; + XMLTransformerContext *pContext = nullptr; XMLTransformerActions::key_type aKey( nPrefix, rLocalName ); XMLTransformerActions::const_iterator aIter = @@ -138,7 +138,7 @@ XMLTransformerContext *XMLPersElemContentTContext::CreateChildContext( if( pContext && !pContext->IsPersistent() ) { delete pContext; - pContext = 0; + pContext = nullptr; } break; } diff --git a/xmloff/source/transform/DlgOASISTContext.cxx b/xmloff/source/transform/DlgOASISTContext.cxx index 5c4a92ab7a5c..af17e79a2ae0 100644 --- a/xmloff/source/transform/DlgOASISTContext.cxx +++ b/xmloff/source/transform/DlgOASISTContext.cxx @@ -49,7 +49,7 @@ void XMLDlgOASISTransformerContext::StartElement( OSL_ENSURE( pActions, "go no actions" ); Reference< XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = 0; + XMLMutableAttributeList *pMutableAttrList = nullptr; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) diff --git a/xmloff/source/transform/DocumentTContext.cxx b/xmloff/source/transform/DocumentTContext.cxx index 5c8fd85854b5..3ae6b0dfe5f3 100644 --- a/xmloff/source/transform/DocumentTContext.cxx +++ b/xmloff/source/transform/DocumentTContext.cxx @@ -57,7 +57,7 @@ void XMLDocumentTransformerContext::StartElement( const Reference< XAttributeLis GetTransformer().GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_OFFICE, GetXMLToken(XML_CLASS ) ) ); - XMLMutableAttributeList *pMutableAttrList = 0; + XMLMutableAttributeList *pMutableAttrList = nullptr; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { @@ -76,7 +76,7 @@ void XMLDocumentTransformerContext::StartElement( const Reference< XAttributeLis "application/x-vnd.oasis.openoffice.", "application/vnd.oasis.opendocument.", "application/x-vnd.oasis.document.", - NULL + nullptr }; for (int k=0; aTmp[k]; k++) { diff --git a/xmloff/source/transform/EventMap.cxx b/xmloff/source/transform/EventMap.cxx index 1db2a7332dbc..c7236ab6ed2b 100644 --- a/xmloff/source/transform/EventMap.cxx +++ b/xmloff/source/transform/EventMap.cxx @@ -89,7 +89,7 @@ XMLTransformerEventMapEntry aTransformerEventMap[] = { XML_NAMESPACE_FORM, "cursormove", "on-cursormove" }, { XML_NAMESPACE_FORM, "supplyparameter", "on-supplyparameter" }, { XML_NAMESPACE_FORM, "adjust", "on-adjust" }, - { 0, 0, 0 } + { 0, nullptr, nullptr } }; XMLTransformerEventMapEntry aFormTransformerEventMap[] = @@ -97,7 +97,7 @@ XMLTransformerEventMapEntry aFormTransformerEventMap[] = { XML_NAMESPACE_DOM, "mouseover", "on-mouseover" }, { XML_NAMESPACE_DOM, "mouseout", "on-mouseout" }, { XML_NAMESPACE_DOM, "DOMFocusOut", "on-blur" }, - { 0, 0, 0 } + { 0, nullptr, nullptr } }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/transform/EventOASISTContext.cxx b/xmloff/source/transform/EventOASISTContext.cxx index b7768a07621b..723fb671051a 100644 --- a/xmloff/source/transform/EventOASISTContext.cxx +++ b/xmloff/source/transform/EventOASISTContext.cxx @@ -177,10 +177,10 @@ void XMLEventOASISTransformerContext::StartElement( XMLTransformerActions *pActions = GetTransformer().GetUserDefinedActions( OASIS_EVENT_ACTIONS ); - SAL_WARN_IF( pActions == NULL, "xmloff.transform", "got no actions" ); + SAL_WARN_IF( pActions == nullptr, "xmloff.transform", "got no actions" ); Reference< XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = 0; + XMLMutableAttributeList *pMutableAttrList = nullptr; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { diff --git a/xmloff/source/transform/EventOOoTContext.cxx b/xmloff/source/transform/EventOOoTContext.cxx index daabf281ae81..d3b97b456c7b 100644 --- a/xmloff/source/transform/EventOOoTContext.cxx +++ b/xmloff/source/transform/EventOOoTContext.cxx @@ -140,7 +140,7 @@ void XMLEventOOoTransformerContext::StartElement( OUString aLocation, aMacroName; sal_Int16 nMacroName = -1; Reference< XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = 0; + XMLMutableAttributeList *pMutableAttrList = nullptr; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { diff --git a/xmloff/source/transform/FormPropOOoTContext.cxx b/xmloff/source/transform/FormPropOOoTContext.cxx index 816895700b7d..01b7aca2586f 100644 --- a/xmloff/source/transform/FormPropOOoTContext.cxx +++ b/xmloff/source/transform/FormPropOOoTContext.cxx @@ -156,7 +156,7 @@ XMLTransformerContext *XMLFormPropOOoTransformerContext::CreateChildContext( const OUString& rQName, const Reference< XAttributeList >& ) { - XMLTransformerContext *pContext = 0; + XMLTransformerContext *pContext = nullptr; if( XML_NAMESPACE_FORM == nPrefix && IsXMLToken( rLocalName, XML_PROPERTY_VALUE ) ) diff --git a/xmloff/source/transform/FrameOASISTContext.cxx b/xmloff/source/transform/FrameOASISTContext.cxx index 646c64f994f2..061a60b38948 100644 --- a/xmloff/source/transform/FrameOASISTContext.cxx +++ b/xmloff/source/transform/FrameOASISTContext.cxx @@ -111,7 +111,7 @@ XMLTransformerContext *XMLFrameOASISTransformerContext::CreateChildContext( const OUString& rQName, const Reference< XAttributeList >& rAttrList ) { - XMLTransformerContext *pContext = 0; + XMLTransformerContext *pContext = nullptr; if( m_bIgnoreElement ) { diff --git a/xmloff/source/transform/FrameOOoTContext.cxx b/xmloff/source/transform/FrameOOoTContext.cxx index e399554c09c0..f181f058bdc2 100644 --- a/xmloff/source/transform/FrameOOoTContext.cxx +++ b/xmloff/source/transform/FrameOOoTContext.cxx @@ -106,7 +106,7 @@ XMLTransformerContext *XMLFrameOOoTransformerContext::CreateChildContext( const OUString& rQName, const Reference< XAttributeList >& rAttrList ) { - XMLTransformerContext *pContext = 0; + XMLTransformerContext *pContext = nullptr; XMLTransformerActions *pActions = GetTransformer().GetUserDefinedActions( OOO_FRAME_ELEM_ACTIONS ); diff --git a/xmloff/source/transform/IgnoreTContext.cxx b/xmloff/source/transform/IgnoreTContext.cxx index 12c9f059447b..5174399b7d9b 100644 --- a/xmloff/source/transform/IgnoreTContext.cxx +++ b/xmloff/source/transform/IgnoreTContext.cxx @@ -59,7 +59,7 @@ XMLTransformerContext *XMLIgnoreTransformerContext::CreateChildContext( const OUString& rQName, const Reference< XAttributeList >& xAttrList ) { - XMLTransformerContext *pContext = 0; + XMLTransformerContext *pContext = nullptr; if( m_bIgnoreElements ) pContext = new XMLIgnoreTransformerContext( GetTransformer(), rQName, true, diff --git a/xmloff/source/transform/MergeElemTContext.cxx b/xmloff/source/transform/MergeElemTContext.cxx index 6f29b8e577b0..4b7d65417927 100644 --- a/xmloff/source/transform/MergeElemTContext.cxx +++ b/xmloff/source/transform/MergeElemTContext.cxx @@ -78,7 +78,7 @@ XMLTransformerContext *XMLParagraphTransformerContext::CreateChildContext( const OUString& rQName, const Reference< XAttributeList >& ) { - XMLTransformerContext *pContext = 0; + XMLTransformerContext *pContext = nullptr; pContext = new XMLIgnoreTransformerContext( GetTransformer(), rQName, true ); @@ -206,7 +206,7 @@ XMLTransformerContext *XMLMergeElemTransformerContext::CreateChildContext( const OUString& rQName, const Reference< XAttributeList >& rAttrList ) { - XMLTransformerContext *pContext = 0; + XMLTransformerContext *pContext = nullptr; if( !m_bStartElementExported ) { diff --git a/xmloff/source/transform/MutableAttrList.cxx b/xmloff/source/transform/MutableAttrList.cxx index 7839fead2c70..815585e01f95 100644 --- a/xmloff/source/transform/MutableAttrList.cxx +++ b/xmloff/source/transform/MutableAttrList.cxx @@ -51,7 +51,7 @@ XMLMutableAttributeList::XMLMutableAttributeList() : XMLMutableAttributeList::XMLMutableAttributeList( const Reference< XAttributeList> & rAttrList, bool bClone ) : m_xAttrList( rAttrList.is() ? rAttrList : new SvXMLAttributeList ), - m_pMutableAttrList( 0 ) + m_pMutableAttrList( nullptr ) { if( bClone ) GetMutableAttrList(); @@ -60,7 +60,7 @@ XMLMutableAttributeList::XMLMutableAttributeList( const Reference< XMLMutableAttributeList::~XMLMutableAttributeList() { - m_xAttrList = 0; + m_xAttrList = nullptr; } namespace diff --git a/xmloff/source/transform/NotesTContext.cxx b/xmloff/source/transform/NotesTContext.cxx index da886d976f95..9fbdf1f1b53b 100644 --- a/xmloff/source/transform/NotesTContext.cxx +++ b/xmloff/source/transform/NotesTContext.cxx @@ -63,7 +63,7 @@ void XMLNotesTransformerContext::StartElement( OSL_ENSURE( pActions, "go no actions" ); Reference< XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = 0; + XMLMutableAttributeList *pMutableAttrList = nullptr; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { @@ -159,7 +159,7 @@ XMLTransformerContext *XMLNotesTransformerContext::CreateChildContext( const OUString& rQName, const Reference< XAttributeList >& rAttrList ) { - XMLTransformerContext *pContext = 0; + XMLTransformerContext *pContext = nullptr; if( XML_NOTE == m_eTypeToken ) { if( XML_NAMESPACE_TEXT == nPrefix ) diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx index 3c222215f79a..928fe4aca463 100644 --- a/xmloff/source/transform/OOo2Oasis.cxx +++ b/xmloff/source/transform/OOo2Oasis.cxx @@ -1131,7 +1131,7 @@ void XMLDocumentTransformerContext_Impl::StartElement( m_aOldClass = GetTransformer().GetClass(); - XMLMutableAttributeList *pMutableAttrList = 0; + XMLMutableAttributeList *pMutableAttrList = nullptr; bool bOOo = false, bOOoW = false, bOOoC = false, bDOM=false, bDC = false, bSVG = false; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; @@ -1319,7 +1319,7 @@ void XMLTabStopOOoTContext_Impl::StartElement( OSL_ENSURE( pActions, "go no actions" ); Reference< XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = 0; + XMLMutableAttributeList *pMutableAttrList = nullptr; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { @@ -1579,7 +1579,7 @@ XMLTransformerContext *OOo2OasisTransformer::CreateUserDefinedContext( XMLTransformerActions *OOo2OasisTransformer::GetUserDefinedActions( sal_uInt16 n ) { - XMLTransformerActions *pActions = 0; + XMLTransformerActions *pActions = nullptr; if( n < MAX_OOO_ACTIONS ) { if( !m_aActions[n] ) @@ -1776,7 +1776,7 @@ OOo2OasisTransformer::OOo2OasisTransformer( const sal_Char *pImplName, const sal_Char *pSubServiceName ) throw() : XMLTransformerBase( aActionTable, aTokenMap ), - m_pEventMap( 0 ) + m_pEventMap( nullptr ) { if( pImplName ) m_aImplName = OUString::createFromAscii( pImplName ); @@ -1831,7 +1831,7 @@ OOo2OasisTransformer::OOo2OasisTransformer( const sal_Char *pImplName, GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_SVG), GetXMLToken(XML_N_SVG_COMPAT), XML_NAMESPACE_SVG ); for( sal_uInt16 i=0; i<MAX_OOO_ACTIONS; ++i ) - m_aActions[i] = 0; + m_aActions[i] = nullptr; } OOo2OasisTransformer::~OOo2OasisTransformer() throw() diff --git a/xmloff/source/transform/OOo2Oasis.hxx b/xmloff/source/transform/OOo2Oasis.hxx index 045f0e80803b..80a6a62d48f8 100644 --- a/xmloff/source/transform/OOo2Oasis.hxx +++ b/xmloff/source/transform/OOo2Oasis.hxx @@ -47,8 +47,8 @@ protected: virtual XMLTransformerActions *GetUserDefinedActions( sal_uInt16 n ) override; public: - OOo2OasisTransformer( const sal_Char *pImplName=0, - const sal_Char *pSubServiceName=0 ) throw(); + OOo2OasisTransformer( const sal_Char *pImplName=nullptr, + const sal_Char *pSubServiceName=nullptr ) throw(); virtual ~OOo2OasisTransformer() throw(); static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw(); diff --git a/xmloff/source/transform/Oasis2OOo.cxx b/xmloff/source/transform/Oasis2OOo.cxx index 178fddacafee..83fa687e19e6 100644 --- a/xmloff/source/transform/Oasis2OOo.cxx +++ b/xmloff/source/transform/Oasis2OOo.cxx @@ -1173,7 +1173,7 @@ void XMLTableTransformerContext_Impl::StartElement( { Reference< XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = 0; + XMLMutableAttributeList *pMutableAttrList = nullptr; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) @@ -1325,12 +1325,12 @@ void XMLTabStopOASISTContext_Impl::StartElement( { XMLTransformerActions *pActions = GetTransformer().GetUserDefinedActions( OASIS_TAB_STOP_ACTIONS ); - SAL_WARN_IF( NULL == pActions, "xmloff.transform", "got no actions" ); + SAL_WARN_IF( nullptr == pActions, "xmloff.transform", "got no actions" ); sal_Unicode cStyleLeaderChar = 0; sal_Int16 nLeaderText = -1; Reference< XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = 0; + XMLMutableAttributeList *pMutableAttrList = nullptr; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { @@ -1661,7 +1661,7 @@ XMLTransformerContext *Oasis2OOoTransformer::CreateUserDefinedContext( XMLTransformerActions *Oasis2OOoTransformer::GetUserDefinedActions( sal_uInt16 n ) { - XMLTransformerActions *pActions = 0; + XMLTransformerActions *pActions = nullptr; if( n < MAX_OASIS_ACTIONS ) { if( !m_aActions[n] ) @@ -1883,13 +1883,13 @@ OUString Oasis2OOoTransformer::GetEventName( const OUString& rName, GetNamespaceMap().GetKeyByAttrName( rName, &aMacroName ); return XMLEventOASISTransformerContext::GetEventName( nPrefix, aMacroName, *m_pEventMap, - bForm ? m_pFormEventMap : 0 ); + bForm ? m_pFormEventMap : nullptr ); } Oasis2OOoTransformer::Oasis2OOoTransformer() throw() : XMLTransformerBase( aActionTable, aTokenMap ), - m_pEventMap( 0 ), - m_pFormEventMap( 0 ) + m_pEventMap( nullptr ), + m_pFormEventMap( nullptr ) { GetNamespaceMap().Add( GetXMLToken(XML_NP_OFFICE), GetXMLToken(XML_N_OFFICE), XML_NAMESPACE_OFFICE ); GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_OFFICE), GetXMLToken(XML_N_OFFICE_OOO), XML_NAMESPACE_OFFICE ); @@ -1940,7 +1940,7 @@ Oasis2OOoTransformer::Oasis2OOoTransformer() throw() : GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_SVG), GetXMLToken(XML_N_SVG), XML_NAMESPACE_SVG ); for( sal_uInt16 i=0; i<MAX_OASIS_ACTIONS; ++i ) - m_aActions[i] = 0; + m_aActions[i] = nullptr; } Oasis2OOoTransformer::~Oasis2OOoTransformer() throw() diff --git a/xmloff/source/transform/PersAttrListTContext.cxx b/xmloff/source/transform/PersAttrListTContext.cxx index de44a8821349..82985eb85699 100644 --- a/xmloff/source/transform/PersAttrListTContext.cxx +++ b/xmloff/source/transform/PersAttrListTContext.cxx @@ -124,7 +124,7 @@ XMLTransformerContext *XMLPersAttrListTContext::CreateChildContext( void XMLPersAttrListTContext::StartElement( const Reference< XAttributeList >& rAttrList ) { - XMLMutableAttributeList *pMutableAttrList = 0; + XMLMutableAttributeList *pMutableAttrList = nullptr; Reference< XAttributeList > xAttrList( rAttrList ); if( m_nActionMap != INVALID_ACTIONS ) diff --git a/xmloff/source/transform/PersMixedContentTContext.cxx b/xmloff/source/transform/PersMixedContentTContext.cxx index 8cca8b1763d3..4e33a254ea1b 100644 --- a/xmloff/source/transform/PersMixedContentTContext.cxx +++ b/xmloff/source/transform/PersMixedContentTContext.cxx @@ -65,7 +65,7 @@ XMLTransformerContext *XMLPersTextTContext_Impl::CreateChildContext( const Reference< XAttributeList >& ) { OSL_ENSURE( false, "illegal call to CreateChildContext" ); - return 0; + return nullptr; } void XMLPersTextTContext_Impl::StartElement( diff --git a/xmloff/source/transform/StyleOASISTContext.cxx b/xmloff/source/transform/StyleOASISTContext.cxx index ded0dd78fee7..0edd0710efa4 100644 --- a/xmloff/source/transform/StyleOASISTContext.cxx +++ b/xmloff/source/transform/StyleOASISTContext.cxx @@ -117,7 +117,7 @@ XMLPropertiesTContext_Impl::~XMLPropertiesTContext_Impl() void XMLPropertiesTContext_Impl::StartElement( const Reference< XAttributeList >& rAttrList ) { - XMLTransformerActions *pActions = 0; + XMLTransformerActions *pActions = nullptr; sal_uInt16 nActionMap = aAttrActionMaps[m_ePropType]; if( nActionMap < MAX_OASIS_PROP_ACTIONS ) { @@ -127,7 +127,7 @@ void XMLPropertiesTContext_Impl::StartElement( if( pActions ) { - XMLMutableAttributeList *pAttrList = 0; + XMLMutableAttributeList *pAttrList = nullptr; if( !m_xAttrList.is() ) { pAttrList = new XMLMutableAttributeList(); @@ -766,7 +766,7 @@ XMLTransformerContext *XMLStyleOASISTContext::CreateChildContext( const OUString& rQName, const Reference< XAttributeList >& rAttrList ) { - XMLTransformerContext *pContext = 0; + XMLTransformerContext *pContext = nullptr; if( XML_NAMESPACE_STYLE == nPrefix || XML_NAMESPACE_LO_EXT == nPrefix ) { @@ -789,7 +789,7 @@ XMLTransformerContext *XMLStyleOASISTContext::CreateChildContext( if( m_xPropContext.is() && !m_bPersistent ) { m_xPropContext->Export(); - m_xPropContext = 0; + m_xPropContext = nullptr; } pContext = m_bPersistent @@ -810,7 +810,7 @@ void XMLStyleOASISTContext::StartElement( OSL_ENSURE( pActions, "go no actions" ); Reference< XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = 0; + XMLMutableAttributeList *pMutableAttrList = nullptr; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; sal_Int16 nFamilyAttr = -1; m_bControlStyle = false; @@ -919,7 +919,7 @@ void XMLStyleOASISTContext::EndElement() if( m_xPropContext.is() ) { m_xPropContext->Export(); - m_xPropContext = 0; + m_xPropContext = nullptr; } GetTransformer().GetDocHandler()->endElement( GetExportQName() ); } @@ -945,7 +945,7 @@ bool XMLStyleOASISTContext::IsPersistent() const XMLTransformerActions *XMLStyleOASISTContext::CreateTransformerActions( sal_uInt16 nType ) { - XMLTransformerActionInit *pInit = 0; + XMLTransformerActionInit *pInit = nullptr; switch( nType ) { @@ -990,7 +990,7 @@ XMLTransformerActions *XMLStyleOASISTContext::CreateTransformerActions( break; } - XMLTransformerActions *pActions = 0; + XMLTransformerActions *pActions = nullptr; if( pInit ) pActions = new XMLTransformerActions( pInit ); diff --git a/xmloff/source/transform/StyleOOoTContext.cxx b/xmloff/source/transform/StyleOOoTContext.cxx index a3c1a99795ff..63cac8910c35 100644 --- a/xmloff/source/transform/StyleOOoTContext.cxx +++ b/xmloff/source/transform/StyleOOoTContext.cxx @@ -269,7 +269,7 @@ XMLTypedPropertiesOOoTContext_Impl } } if( MAX_PROP_TYPES == nIndex ) - return 0; + return nullptr; if( !m_aPropContexts[nIndex].is() ) { @@ -395,13 +395,13 @@ void XMLPropertiesOOoTContext_Impl::StartElement( { Reference< XAttributeList > xAttrList( rAttrList ); - XMLTypedPropertiesOOoTContext_Impl * pIntervalMinorDivisorContext = 0; + XMLTypedPropertiesOOoTContext_Impl * pIntervalMinorDivisorContext = nullptr; double fIntervalMajor = 0.0; double fIntervalMinor = 0.0; bool bMoveProtect = false; bool bSizeProtect = false; OUString aProtectAttrValue; - XMLTypedPropertiesOOoTContext_Impl * pProtectContext = 0; + XMLTypedPropertiesOOoTContext_Impl * pProtectContext = nullptr; /* Attribute <style:mirror> has to be priority over attribute <style:draw>. The filter from OpenDocument file format to OpenOffice.org file format @@ -411,7 +411,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement( OUString aStyleMirrorAttrValue; bool bExistDrawMirror( false ); OUString aDrawMirrorAttrValue; - XMLTypedPropertiesOOoTContext_Impl* pMirrorContext( 0L ); + XMLTypedPropertiesOOoTContext_Impl* pMirrorContext( nullptr ); sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) @@ -1074,7 +1074,7 @@ XMLTransformerContext *XMLStyleOOoTContext::CreateChildContext( const OUString& rQName, const Reference< XAttributeList >& rAttrList ) { - XMLTransformerContext *pContext = 0; + XMLTransformerContext *pContext = nullptr; if( XML_NAMESPACE_STYLE == nPrefix && IsXMLToken( rLocalName, XML_PROPERTIES ) ) @@ -1142,7 +1142,7 @@ void XMLStyleOOoTContext::StartElement( OSL_ENSURE( pActions, "go no actions" ); Reference< XAttributeList > xAttrList( rAttrList ); - XMLMutableAttributeList *pMutableAttrList = 0; + XMLMutableAttributeList *pMutableAttrList = nullptr; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { @@ -1294,7 +1294,7 @@ bool XMLStyleOOoTContext::IsPersistent() const XMLTransformerActions *XMLStyleOOoTContext::CreateTransformerActions( sal_uInt16 nType ) { - XMLTransformerActionInit *pInit = 0; + XMLTransformerActionInit *pInit = nullptr; switch( nType ) { @@ -1354,7 +1354,7 @@ XMLTransformerActions *XMLStyleOOoTContext::CreateTransformerActions( break; } - XMLTransformerActions *pActions = 0; + XMLTransformerActions *pActions = nullptr; if( pInit ) pActions = new XMLTransformerActions( pInit ); diff --git a/xmloff/source/transform/TransformerBase.cxx b/xmloff/source/transform/TransformerBase.cxx index 31a7e8e4db9b..63c8b2b207ad 100644 --- a/xmloff/source/transform/TransformerBase.cxx +++ b/xmloff/source/transform/TransformerBase.cxx @@ -179,7 +179,7 @@ XMLTransformerContext *XMLTransformerBase::CreateContext( sal_uInt16 nPrefix, XMLTransformerActions *XMLTransformerBase::GetUserDefinedActions( sal_uInt16 ) { - return 0; + return nullptr; } XMLTransformerBase::XMLTransformerBase( XMLTransformerActionInit *pInit, @@ -225,14 +225,14 @@ void SAL_CALL XMLTransformerBase::startElement( const OUString& rName, const Reference< XAttributeList >& rAttrList ) throw(SAXException, RuntimeException, std::exception) { - SvXMLNamespaceMap *pRewindMap = 0; + SvXMLNamespaceMap *pRewindMap = nullptr; bool bRect = rName == "presentation:show-shape"; (void)bRect; // Process namespace attributes. This must happen before creating the // context, because namespace decaration apply to the element name itself. - XMLMutableAttributeList *pMutableAttrList = 0; + XMLMutableAttributeList *pMutableAttrList = nullptr; Reference< XAttributeList > xAttrList( rAttrList ); sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) @@ -342,7 +342,7 @@ rName SvXMLNamespaceMap *pRewindMap = xContext->GetRewindMap(); // Delete the current context. - xContext = 0; + xContext = nullptr; // Rewind a namespace map. if( pRewindMap ) @@ -508,7 +508,7 @@ XMLMutableAttributeList *XMLTransformerBase::ProcessAttrList( Reference< XAttributeList >& rAttrList, sal_uInt16 nActionMap, bool bClone ) { - XMLMutableAttributeList *pMutableAttrList = 0; + XMLMutableAttributeList *pMutableAttrList = nullptr; XMLTransformerActions *pActions = GetUserDefinedActions( nActionMap ); OSL_ENSURE( pActions, "go no actions" ); if( pActions ) @@ -1430,7 +1430,7 @@ const XMLTransformerContext *XMLTransformerBase::GetCurrentContext() const OSL_ENSURE( !m_pContexts->empty(), "empty stack" ); - return m_pContexts->empty() ? 0 : m_pContexts->back().get(); + return m_pContexts->empty() ? nullptr : m_pContexts->back().get(); } const XMLTransformerContext *XMLTransformerBase::GetAncestorContext( @@ -1443,7 +1443,7 @@ const XMLTransformerContext *XMLTransformerBase::GetAncestorContext( OSL_ENSURE( nSize >nPos+2 , "invalid context" ); - return nSize > nPos+2 ? (*m_pContexts)[nSize-(nPos+2)].get() : 0; + return nSize > nPos+2 ? (*m_pContexts)[nSize-(nPos+2)].get() : nullptr; } bool XMLTransformerBase::isWriter() const diff --git a/xmloff/source/transform/TransformerBase.hxx b/xmloff/source/transform/TransformerBase.hxx index b3672a7724a2..71b2ed3c971e 100644 --- a/xmloff/source/transform/TransformerBase.hxx +++ b/xmloff/source/transform/TransformerBase.hxx @@ -77,8 +77,8 @@ protected: const OUString& rQName ); public: - XMLTransformerBase( XMLTransformerActionInit *pInit=0, - ::xmloff::token::XMLTokenEnum *pTKMapInit=0 ) throw(); + XMLTransformerBase( XMLTransformerActionInit *pInit=nullptr, + ::xmloff::token::XMLTokenEnum *pTKMapInit=nullptr ) throw(); virtual ~XMLTransformerBase() throw(); // ::com::sun::star::xml::sax::XDocumentHandler diff --git a/xmloff/source/transform/TransformerContext.cxx b/xmloff/source/transform/TransformerContext.cxx index 562e4af4aa1e..61e3df984876 100644 --- a/xmloff/source/transform/TransformerContext.cxx +++ b/xmloff/source/transform/TransformerContext.cxx @@ -50,7 +50,7 @@ XMLTransformerContext::XMLTransformerContext( XMLTransformerBase& rImp, const OUString& rQName ) : m_rTransformer( rImp ), m_aQName( rQName ), - m_pRewindMap( 0 ) + m_pRewindMap( nullptr ) { } diff --git a/xmloff/source/transform/XMLFilterRegistration.cxx b/xmloff/source/transform/XMLFilterRegistration.cxx index c834c2e1b731..e87ea6ac985c 100644 --- a/xmloff/source/transform/XMLFilterRegistration.cxx +++ b/xmloff/source/transform/XMLFilterRegistration.cxx @@ -77,7 +77,7 @@ namespace ENUMERATE_SERVICE( XMLImpressContentImportOOO ), ENUMERATE_SERVICE( XMLImpressStylesImportOOO ), ENUMERATE_SERVICE( XMLImpressImportOOO ), - { NULL, NULL, NULL } + { nullptr, nullptr, nullptr } }; return aDescriptors; }; @@ -90,7 +90,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL xof_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { - void * pRet = NULL; + void * pRet = nullptr; if( pServiceManager ) { try diff --git a/xmloff/source/xforms/SchemaRestrictionContext.cxx b/xmloff/source/xforms/SchemaRestrictionContext.cxx index f9622aaa8bc0..b7ab05eee0e5 100644 --- a/xmloff/source/xforms/SchemaRestrictionContext.cxx +++ b/xmloff/source/xforms/SchemaRestrictionContext.cxx @@ -202,7 +202,7 @@ Any xforms_date( const OUString& rValue ) Any xforms_dateTime( const OUString& rValue ) { util::DateTime aDateTime; - bool const bSuccess = ::sax::Converter::parseDateTime(aDateTime, 0, rValue); + bool const bSuccess = ::sax::Converter::parseDateTime(aDateTime, nullptr, rValue); return bSuccess ? makeAny( aDateTime ) : Any(); } @@ -240,7 +240,7 @@ SvXMLImportContext* SchemaRestrictionContext::HandleChild( // determine property name + suitable converter OUString sPropertyName; - convert_t pConvert = NULL; + convert_t pConvert = nullptr; switch( nToken ) { case XML_LENGTH: @@ -355,7 +355,7 @@ SvXMLImportContext* SchemaRestrictionContext::HandleChild( CreateDataType(); if( mxDataType.is() && !sPropertyName.isEmpty() - && pConvert != NULL + && pConvert != nullptr && mxDataType->getPropertySetInfo()->hasPropertyByName(sPropertyName) ) { try diff --git a/xmloff/source/xforms/SchemaSimpleTypeContext.cxx b/xmloff/source/xforms/SchemaSimpleTypeContext.cxx index d0e1a8db4eed..671ef25c9d78 100644 --- a/xmloff/source/xforms/SchemaSimpleTypeContext.cxx +++ b/xmloff/source/xforms/SchemaSimpleTypeContext.cxx @@ -85,7 +85,7 @@ SvXMLImportContext* SchemaSimpleTypeContext::HandleChild( const OUString& rLocalName, const Reference<XAttributeList>& ) { - SvXMLImportContext* pContext = NULL; + SvXMLImportContext* pContext = nullptr; switch( nToken ) { case XML_RESTRICTION: @@ -97,7 +97,7 @@ SvXMLImportContext* SchemaSimpleTypeContext::HandleChild( OSL_FAIL( "Booo!" ); } - return ( pContext != NULL ) + return ( pContext != nullptr ) ? pContext : new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); } diff --git a/xmloff/source/xforms/TokenContext.cxx b/xmloff/source/xforms/TokenContext.cxx index 981c15e50659..8751b9d0771c 100644 --- a/xmloff/source/xforms/TokenContext.cxx +++ b/xmloff/source/xforms/TokenContext.cxx @@ -60,7 +60,7 @@ void TokenContext::StartElement( // - if in map: call HandleAttribute // - xmlns:... : ignore // - other: warning - DBG_ASSERT( mpAttributes != NULL, "no token map for attributes" ); + DBG_ASSERT( mpAttributes != nullptr, "no token map for attributes" ); SvXMLTokenMap aMap( mpAttributes ); sal_Int16 nCount = xAttributeList->getLength(); @@ -98,9 +98,9 @@ SvXMLImportContext* TokenContext::CreateChildContext( { // call HandleChild for elements in token map. Ignore other content. - SvXMLImportContext* pContext = NULL; + SvXMLImportContext* pContext = nullptr; - DBG_ASSERT( mpChildren != NULL, "no token map for child elements" ); + DBG_ASSERT( mpChildren != nullptr, "no token map for child elements" ); SvXMLTokenMap aMap( mpChildren ); sal_uInt16 nToken = aMap.Get( nPrefix, rLocalName ); if( nToken != XML_TOK_UNKNOWN ) @@ -110,7 +110,7 @@ SvXMLImportContext* TokenContext::CreateChildContext( } // error handling: create default context and generate warning - if( pContext == NULL ) + if( pContext == nullptr ) { GetImport().SetError( XMLERROR_UNKNOWN_ELEMENT, rLocalName ); pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); diff --git a/xmloff/source/xforms/TokenContext.hxx b/xmloff/source/xforms/TokenContext.hxx index b7bed1b64d40..8a8531063556 100644 --- a/xmloff/source/xforms/TokenContext.hxx +++ b/xmloff/source/xforms/TokenContext.hxx @@ -44,8 +44,8 @@ public: TokenContext( SvXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLocalName, - const SvXMLTokenMapEntry* pAttributes = NULL, - const SvXMLTokenMapEntry* pChildren = NULL ); + const SvXMLTokenMapEntry* pAttributes = nullptr, + const SvXMLTokenMapEntry* pChildren = nullptr ); virtual ~TokenContext(); diff --git a/xmloff/source/xforms/XFormsBindContext.cxx b/xmloff/source/xforms/XFormsBindContext.cxx index c7eb92855dfe..0e43c1db9e88 100644 --- a/xmloff/source/xforms/XFormsBindContext.cxx +++ b/xmloff/source/xforms/XFormsBindContext.cxx @@ -72,7 +72,7 @@ XFormsBindContext::XFormsBindContext( const Reference<XModel2>& xModel ) : TokenContext( rImport, nPrefix, rLocalName, aAttributeMap, aEmptyMap ), mxModel( xModel ), - mxBinding( NULL ) + mxBinding( nullptr ) { // attach binding to model mxBinding = mxModel->createBinding(); @@ -146,7 +146,7 @@ SvXMLImportContext* XFormsBindContext::HandleChild( const Reference<XAttributeList>& ) { OSL_FAIL( "no children supported" ); - return NULL; + return nullptr; } diff --git a/xmloff/source/xforms/XFormsInstanceContext.cxx b/xmloff/source/xforms/XFormsInstanceContext.cxx index e0503b7eb1f6..b75751fd22cc 100644 --- a/xmloff/source/xforms/XFormsInstanceContext.cxx +++ b/xmloff/source/xforms/XFormsInstanceContext.cxx @@ -80,7 +80,7 @@ SvXMLImportContext* XFormsInstanceContext::CreateChildContext( const OUString& rLocalName, const Reference<XAttributeList>& ) { - SvXMLImportContext* pContext = NULL; + SvXMLImportContext* pContext = nullptr; // only the first element child of an xforms:instance element // is used as an instance. The other children remainder must be @@ -99,7 +99,7 @@ SvXMLImportContext* XFormsInstanceContext::CreateChildContext( pContext = pInstance; } - DBG_ASSERT( pContext != NULL, "no context!" ); + DBG_ASSERT( pContext != nullptr, "no context!" ); return pContext; } @@ -144,7 +144,7 @@ SvXMLImportContext* XFormsInstanceContext::HandleChild( const Reference<XAttributeList>& ) { OSL_FAIL( "to be handled by CreateChildContext" ); - return NULL; + return nullptr; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/XFormsModelContext.cxx b/xmloff/source/xforms/XFormsModelContext.cxx index 10bd88b43797..ecede75093f4 100644 --- a/xmloff/source/xforms/XFormsModelContext.cxx +++ b/xmloff/source/xforms/XFormsModelContext.cxx @@ -105,7 +105,7 @@ SvXMLImportContext* XFormsModelContext::HandleChild( const OUString& rLocalName, const Reference<XAttributeList>& ) { - SvXMLImportContext* pContext = NULL; + SvXMLImportContext* pContext = nullptr; switch( nToken ) { diff --git a/xmloff/source/xforms/XFormsSubmissionContext.cxx b/xmloff/source/xforms/XFormsSubmissionContext.cxx index fb2398171069..c7bc2154905a 100644 --- a/xmloff/source/xforms/XFormsSubmissionContext.cxx +++ b/xmloff/source/xforms/XFormsSubmissionContext.cxx @@ -163,7 +163,7 @@ SvXMLImportContext* XFormsSubmissionContext::HandleChild( const Reference<XAttributeList>& ) { OSL_FAIL( "no children supported" ); - return NULL; + return nullptr; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/xforms/xformsexport.cxx b/xmloff/source/xforms/xformsexport.cxx index 1954b640a622..5ae21eee72dc 100644 --- a/xmloff/source/xforms/xformsexport.cxx +++ b/xmloff/source/xforms/xformsexport.cxx @@ -124,7 +124,7 @@ static void lcl_export( const Reference<XPropertySet>& rPropertySet, const ExportTable* pTable ); #define TABLE_ENTRY(NAME,NAMESPACE,TOKEN,CONVERTER) { NAME,sizeof(NAME)-1,XML_NAMESPACE_##NAMESPACE,xmloff::token::XML_##TOKEN, CONVERTER } -#define TABLE_END { NULL, 0, 0, 0, NULL } +#define TABLE_END { nullptr, 0, 0, 0, nullptr } // any conversion functions OUString xforms_string( const Any& ); @@ -442,7 +442,7 @@ static void lcl_exportDataTypeFacets( SvXMLExport& rExport, { Reference<XPropertySetInfo> xInfo = rPropertySet->getPropertySetInfo(); for( const ExportTable* pCurrent = pTable; - pCurrent->pPropertyName != NULL; + pCurrent->pPropertyName != nullptr; pCurrent++ ) { OUString sName( OUString::createFromAscii( pCurrent->pPropertyName ) ); @@ -605,7 +605,7 @@ static void lcl_export( const Reference<XPropertySet>& rPropertySet, const ExportTable* pTable ) { for( const ExportTable* pCurrent = pTable; - pCurrent->pPropertyName != NULL; + pCurrent->pPropertyName != nullptr; pCurrent++ ) { Any aAny = rPropertySet->getPropertyValue( @@ -685,7 +685,7 @@ void xforms_formatTime( OUStringBuffer& aBuffer, const com::sun::star::util::Tim void xforms_formatDateTime( OUStringBuffer& aBuffer, const util::DateTime& aDateTime ) { - ::sax::Converter::convertDateTime(aBuffer, aDateTime, 0); + ::sax::Converter::convertDateTime(aBuffer, aDateTime, nullptr); } OUString xforms_whitespace( const Any& rAny ) |