summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:15:32 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:25 +0100
commit3cdda9af2c12a9ae2a1f0bdf8ca898f1f5c69bfb (patch)
treeba25525cbc9661509d8f01e93164e0febb8a0894
parent7702e3128768f1b4b8a1ee9e87e397887e151af4 (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: I61e494952df8cc40fff3ccad0936adf06035dbeb
-rw-r--r--filter/qa/cppunit/filters-dxf-test.cxx2
-rw-r--r--filter/qa/cppunit/filters-eps-test.cxx2
-rw-r--r--filter/qa/cppunit/filters-met-test.cxx2
-rw-r--r--filter/qa/cppunit/filters-pcd-test.cxx2
-rw-r--r--filter/qa/cppunit/filters-pcx-test.cxx2
-rw-r--r--filter/qa/cppunit/filters-pict-test.cxx2
-rw-r--r--filter/qa/cppunit/filters-ppm-test.cxx2
-rw-r--r--filter/qa/cppunit/filters-psd-test.cxx2
-rw-r--r--filter/qa/cppunit/filters-ras-test.cxx2
-rw-r--r--filter/qa/cppunit/filters-tga-test.cxx2
-rw-r--r--filter/qa/cppunit/filters-tiff-test.cxx2
-rw-r--r--filter/qa/cppunit/xslt-test.cxx4
-rw-r--r--filter/source/config/cache/basecontainer.cxx4
-rw-r--r--filter/source/config/cache/filtercache.cxx10
-rw-r--r--filter/source/config/cache/registration.cxx4
-rw-r--r--filter/source/flash/swfexporter.cxx8
-rw-r--r--filter/source/flash/swffilter.cxx4
-rw-r--r--filter/source/flash/swfuno.cxx2
-rw-r--r--filter/source/flash/swfwriter.cxx18
-rw-r--r--filter/source/flash/swfwriter.hxx4
-rw-r--r--filter/source/flash/swfwriter1.cxx12
-rw-r--r--filter/source/graphic/Services.cxx2
-rw-r--r--filter/source/graphicfilter/egif/egif.cxx6
-rw-r--r--filter/source/graphicfilter/egif/giflzwc.cxx16
-rw-r--r--filter/source/graphicfilter/eos2met/eos2met.cxx22
-rw-r--r--filter/source/graphicfilter/epbm/epbm.cxx2
-rw-r--r--filter/source/graphicfilter/epgm/epgm.cxx2
-rw-r--r--filter/source/graphicfilter/epict/epict.cxx10
-rw-r--r--filter/source/graphicfilter/eppm/eppm.cxx2
-rw-r--r--filter/source/graphicfilter/eps/eps.cxx56
-rw-r--r--filter/source/graphicfilter/eras/eras.cxx2
-rw-r--r--filter/source/graphicfilter/etiff/etiff.cxx16
-rw-r--r--filter/source/graphicfilter/expm/expm.cxx2
-rw-r--r--filter/source/graphicfilter/icgm/bitmap.cxx10
-rw-r--r--filter/source/graphicfilter/icgm/bitmap.hxx6
-rw-r--r--filter/source/graphicfilter/icgm/bundles.cxx8
-rw-r--r--filter/source/graphicfilter/icgm/cgm.cxx22
-rw-r--r--filter/source/graphicfilter/icgm/chart.cxx2
-rw-r--r--filter/source/graphicfilter/icgm/class0.cxx6
-rw-r--r--filter/source/graphicfilter/icgm/class4.cxx4
-rw-r--r--filter/source/graphicfilter/icgm/class7.cxx6
-rw-r--r--filter/source/graphicfilter/icgm/elements.cxx2
-rw-r--r--filter/source/graphicfilter/icgm/outact.cxx2
-rw-r--r--filter/source/graphicfilter/idxf/dxf2mtf.cxx32
-rw-r--r--filter/source/graphicfilter/idxf/dxfblkrd.cxx10
-rw-r--r--filter/source/graphicfilter/idxf/dxfentrd.cxx12
-rw-r--r--filter/source/graphicfilter/idxf/dxfentrd.hxx2
-rw-r--r--filter/source/graphicfilter/idxf/dxfreprd.cxx6
-rw-r--r--filter/source/graphicfilter/idxf/dxftblrd.cxx38
-rw-r--r--filter/source/graphicfilter/ieps/ieps.cxx18
-rw-r--r--filter/source/graphicfilter/ios2met/ios2met.cxx152
-rw-r--r--filter/source/graphicfilter/ipbm/ipbm.cxx8
-rw-r--r--filter/source/graphicfilter/ipcd/ipcd.cxx10
-rw-r--r--filter/source/graphicfilter/ipcx/ipcx.cxx2
-rw-r--r--filter/source/graphicfilter/ipict/ipict.cxx20
-rw-r--r--filter/source/graphicfilter/ipsd/ipsd.cxx16
-rw-r--r--filter/source/graphicfilter/iras/iras.cxx2
-rw-r--r--filter/source/graphicfilter/itga/itga.cxx12
-rw-r--r--filter/source/graphicfilter/itiff/ccidecom.cxx10
-rw-r--r--filter/source/graphicfilter/itiff/itiff.cxx42
-rw-r--r--filter/source/graphicfilter/itiff/lzwdecom.cxx6
-rw-r--r--filter/source/msfilter/escherex.cxx36
-rw-r--r--filter/source/msfilter/eschesdo.cxx28
-rw-r--r--filter/source/msfilter/eschesdo.hxx2
-rw-r--r--filter/source/msfilter/mscodec.cxx6
-rw-r--r--filter/source/msfilter/msdffimp.cxx106
-rw-r--r--filter/source/msfilter/msoleexp.cxx4
-rw-r--r--filter/source/msfilter/mstoolbar.cxx2
-rw-r--r--filter/source/msfilter/msvbahelper.cxx10
-rw-r--r--filter/source/msfilter/rtfutil.cxx4
-rw-r--r--filter/source/msfilter/services.cxx4
-rw-r--r--filter/source/msfilter/svdfppt.cxx138
-rw-r--r--filter/source/msfilter/svxmsbas2.cxx2
-rw-r--r--filter/source/msfilter/util.cxx4
-rw-r--r--filter/source/msfilter/viscache.hxx6
-rw-r--r--filter/source/odfflatxml/OdfFlatXml.cxx4
-rw-r--r--filter/source/pdf/impdialog.cxx28
-rw-r--r--filter/source/pdf/pdfexport.cxx8
-rw-r--r--filter/source/pdf/pdffilter.cxx2
-rw-r--r--filter/source/pdf/pdfuno.cxx2
-rw-r--r--filter/source/placeware/uno.cxx2
-rw-r--r--filter/source/placeware/zip.cxx2
-rw-r--r--filter/source/storagefilterdetect/fdcomp.cxx4
-rw-r--r--filter/source/svg/svgexport.cxx34
-rw-r--r--filter/source/svg/svgfilter.cxx26
-rw-r--r--filter/source/svg/svgfilter.hxx2
-rw-r--r--filter/source/svg/svgreader.cxx4
-rw-r--r--filter/source/svg/svgwriter.cxx48
-rw-r--r--filter/source/svg/svgwriter.hxx16
-rw-r--r--filter/source/svg/tokenmap.cxx4
-rw-r--r--filter/source/t602/filterenv.cxx2
-rw-r--r--filter/source/t602/t602filter.cxx8
-rw-r--r--filter/source/xmlfilteradaptor/genericfilter.cxx2
-rw-r--r--filter/source/xmlfilterdetect/fdcomp.cxx4
-rw-r--r--filter/source/xsltdialog/typedetectionexport.cxx2
-rw-r--r--filter/source/xsltdialog/typedetectionimport.cxx6
-rw-r--r--filter/source/xsltdialog/xmlfilterdialogcomponent.cxx10
-rw-r--r--filter/source/xsltdialog/xmlfiltersettingsdialog.cxx8
-rw-r--r--filter/source/xsltdialog/xmlfiltersettingsdialog.hxx2
-rw-r--r--filter/source/xsltdialog/xmlfiltertabdialog.cxx2
-rw-r--r--filter/source/xsltdialog/xmlfiltertestdialog.cxx8
-rw-r--r--filter/source/xsltdialog/xmlfiltertestdialog.hxx2
-rw-r--r--filter/source/xsltfilter/LibXSLTTransformer.cxx28
-rw-r--r--filter/source/xsltfilter/OleHandler.cxx2
-rw-r--r--filter/source/xsltfilter/XSLTFilter.cxx2
-rw-r--r--include/filter/msfilter/escherex.hxx22
-rw-r--r--include/filter/msfilter/msdffimp.hxx30
-rw-r--r--include/filter/msfilter/msvbahelper.hxx2
-rw-r--r--include/filter/msfilter/rtfutil.hxx2
-rw-r--r--include/filter/msfilter/svdfppt.hxx20
110 files changed, 699 insertions, 699 deletions
diff --git a/filter/qa/cppunit/filters-dxf-test.cxx b/filter/qa/cppunit/filters-dxf-test.cxx
index 3331cb16d729..c2ebdb96c915 100644
--- a/filter/qa/cppunit/filters-dxf-test.cxx
+++ b/filter/qa/cppunit/filters-dxf-test.cxx
@@ -54,7 +54,7 @@ bool DxfFilterTest::load(const OUString &,
{
SvFileStream aFileStream(rURL, StreamMode::READ);
Graphic aGraphic;
- return idxGraphicImport(aFileStream, aGraphic, NULL);
+ return idxGraphicImport(aFileStream, aGraphic, nullptr);
}
void DxfFilterTest::testCVEs()
diff --git a/filter/qa/cppunit/filters-eps-test.cxx b/filter/qa/cppunit/filters-eps-test.cxx
index ced5eed0334d..984a30d81c7b 100644
--- a/filter/qa/cppunit/filters-eps-test.cxx
+++ b/filter/qa/cppunit/filters-eps-test.cxx
@@ -54,7 +54,7 @@ bool EpsFilterTest::load(const OUString &,
{
SvFileStream aFileStream(rURL, StreamMode::READ);
Graphic aGraphic;
- return ipsGraphicImport(aFileStream, aGraphic, NULL);
+ return ipsGraphicImport(aFileStream, aGraphic, nullptr);
}
void EpsFilterTest::testCVEs()
diff --git a/filter/qa/cppunit/filters-met-test.cxx b/filter/qa/cppunit/filters-met-test.cxx
index af0c8a671305..ee990d38379d 100644
--- a/filter/qa/cppunit/filters-met-test.cxx
+++ b/filter/qa/cppunit/filters-met-test.cxx
@@ -54,7 +54,7 @@ bool MetFilterTest::load(const OUString &,
{
SvFileStream aFileStream(rURL, StreamMode::READ);
Graphic aGraphic;
- return imeGraphicImport(aFileStream, aGraphic, NULL);
+ return imeGraphicImport(aFileStream, aGraphic, nullptr);
}
void MetFilterTest::testCVEs()
diff --git a/filter/qa/cppunit/filters-pcd-test.cxx b/filter/qa/cppunit/filters-pcd-test.cxx
index e794c27f4870..c7f3e7cab583 100644
--- a/filter/qa/cppunit/filters-pcd-test.cxx
+++ b/filter/qa/cppunit/filters-pcd-test.cxx
@@ -54,7 +54,7 @@ bool PcdFilterTest::load(const OUString &,
{
SvFileStream aFileStream(rURL, StreamMode::READ);
Graphic aGraphic;
- return icdGraphicImport(aFileStream, aGraphic, NULL);
+ return icdGraphicImport(aFileStream, aGraphic, nullptr);
}
void PcdFilterTest::testCVEs()
diff --git a/filter/qa/cppunit/filters-pcx-test.cxx b/filter/qa/cppunit/filters-pcx-test.cxx
index 5e0cc41043ed..bc7ef55d5691 100644
--- a/filter/qa/cppunit/filters-pcx-test.cxx
+++ b/filter/qa/cppunit/filters-pcx-test.cxx
@@ -54,7 +54,7 @@ bool PcxFilterTest::load(const OUString &,
{
SvFileStream aFileStream(rURL, StreamMode::READ);
Graphic aGraphic;
- return ipxGraphicImport(aFileStream, aGraphic, NULL);
+ return ipxGraphicImport(aFileStream, aGraphic, nullptr);
}
void PcxFilterTest::testCVEs()
diff --git a/filter/qa/cppunit/filters-pict-test.cxx b/filter/qa/cppunit/filters-pict-test.cxx
index 8ccdf6816e5b..ab4170a32fcf 100644
--- a/filter/qa/cppunit/filters-pict-test.cxx
+++ b/filter/qa/cppunit/filters-pict-test.cxx
@@ -68,7 +68,7 @@ bool PictFilterTest::load(const OUString &,
{
SvFileStream aFileStream(rURL, StreamMode::READ);
Graphic aGraphic;
- return iptGraphicImport(aFileStream, aGraphic, NULL);
+ return iptGraphicImport(aFileStream, aGraphic, nullptr);
}
void PictFilterTest::testCVEs()
diff --git a/filter/qa/cppunit/filters-ppm-test.cxx b/filter/qa/cppunit/filters-ppm-test.cxx
index 2935ecabcaa3..349f09d155bc 100644
--- a/filter/qa/cppunit/filters-ppm-test.cxx
+++ b/filter/qa/cppunit/filters-ppm-test.cxx
@@ -54,7 +54,7 @@ bool PpmFilterTest::load(const OUString &,
{
SvFileStream aFileStream(rURL, StreamMode::READ);
Graphic aGraphic;
- return ipbGraphicImport(aFileStream, aGraphic, NULL);
+ return ipbGraphicImport(aFileStream, aGraphic, nullptr);
}
void PpmFilterTest::testCVEs()
diff --git a/filter/qa/cppunit/filters-psd-test.cxx b/filter/qa/cppunit/filters-psd-test.cxx
index 741c6b8d2a53..27a696a18b18 100644
--- a/filter/qa/cppunit/filters-psd-test.cxx
+++ b/filter/qa/cppunit/filters-psd-test.cxx
@@ -54,7 +54,7 @@ bool PsdFilterTest::load(const OUString &,
{
SvFileStream aFileStream(rURL, StreamMode::READ);
Graphic aGraphic;
- return ipdGraphicImport(aFileStream, aGraphic, NULL);
+ return ipdGraphicImport(aFileStream, aGraphic, nullptr);
}
void PsdFilterTest::testCVEs()
diff --git a/filter/qa/cppunit/filters-ras-test.cxx b/filter/qa/cppunit/filters-ras-test.cxx
index 6c4e57d6388f..8af8660ea695 100644
--- a/filter/qa/cppunit/filters-ras-test.cxx
+++ b/filter/qa/cppunit/filters-ras-test.cxx
@@ -54,7 +54,7 @@ bool RasFilterTest::load(const OUString &,
{
SvFileStream aFileStream(rURL, StreamMode::READ);
Graphic aGraphic;
- return iraGraphicImport(aFileStream, aGraphic, NULL);
+ return iraGraphicImport(aFileStream, aGraphic, nullptr);
}
void RasFilterTest::testCVEs()
diff --git a/filter/qa/cppunit/filters-tga-test.cxx b/filter/qa/cppunit/filters-tga-test.cxx
index caaa957cfd8b..91697181fdf3 100644
--- a/filter/qa/cppunit/filters-tga-test.cxx
+++ b/filter/qa/cppunit/filters-tga-test.cxx
@@ -54,7 +54,7 @@ bool TgaFilterTest::load(const OUString &,
{
SvFileStream aFileStream(rURL, StreamMode::READ);
Graphic aGraphic;
- return itgGraphicImport(aFileStream, aGraphic, NULL);
+ return itgGraphicImport(aFileStream, aGraphic, nullptr);
}
void TgaFilterTest::testCVEs()
diff --git a/filter/qa/cppunit/filters-tiff-test.cxx b/filter/qa/cppunit/filters-tiff-test.cxx
index eb12ff75739f..e2c6d5e36c5f 100644
--- a/filter/qa/cppunit/filters-tiff-test.cxx
+++ b/filter/qa/cppunit/filters-tiff-test.cxx
@@ -54,7 +54,7 @@ bool TiffFilterTest::load(const OUString &,
{
SvFileStream aFileStream(rURL, StreamMode::READ);
Graphic aGraphic;
- return itiGraphicImport(aFileStream, aGraphic, NULL);
+ return itiGraphicImport(aFileStream, aGraphic, nullptr);
}
void TiffFilterTest::testCVEs()
diff --git a/filter/qa/cppunit/xslt-test.cxx b/filter/qa/cppunit/xslt-test.cxx
index 6c696801be07..49757197dc31 100644
--- a/filter/qa/cppunit/xslt-test.cxx
+++ b/filter/qa/cppunit/xslt-test.cxx
@@ -75,7 +75,7 @@ void XsltFilterTest::testXsltCopyNew()
osl_getTempDirURL(&tempDirURL.pData);
oslFileHandle tempFile;
OUString tempURL;
- osl::File::RC rc = osl::File::createTempFile(0, &tempFile, &tempURL);
+ osl::File::RC rc = osl::File::createTempFile(nullptr, &tempFile, &tempURL);
CPPUNIT_ASSERT(osl::FileBase::E_None == rc);
osl_closeFile(tempFile); // close it so xSFA can open it on WNT
@@ -132,7 +132,7 @@ void XsltFilterTest::testXsltCopyOld()
osl_getTempDirURL(&tempDirURL.pData);
oslFileHandle tempFile;
OUString tempURL;
- osl::File::RC rc = osl::File::createTempFile(0, &tempFile, &tempURL);
+ osl::File::RC rc = osl::File::createTempFile(nullptr, &tempFile, &tempURL);
CPPUNIT_ASSERT(osl::FileBase::E_None == rc);
osl_closeFile(tempFile); // close it so xSFA can open it on WNT
diff --git a/filter/source/config/cache/basecontainer.cxx b/filter/source/config/cache/basecontainer.cxx
index 03f8c0f08ee8..82cea598684c 100644
--- a/filter/source/config/cache/basecontainer.cxx
+++ b/filter/source/config/cache/basecontainer.cxx
@@ -51,7 +51,7 @@ namespace
BaseContainer::BaseContainer()
: BaseLock ( )
, m_rCache ( )
- , m_pFlushCache(NULL )
+ , m_pFlushCache(nullptr )
, m_eType()
, m_lListener (m_aLock)
{
@@ -512,7 +512,7 @@ void SAL_CALL BaseContainer::flush()
}
delete m_pFlushCache;
- m_pFlushCache = NULL;
+ m_pFlushCache = nullptr;
css::uno::Reference< css::util::XRefreshable > xRefreshBroadcaster = m_xRefreshBroadcaster;
diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx
index f4b0874c91ac..dacad0981133 100644
--- a/filter/source/config/cache/filtercache.cxx
+++ b/filter/source/config/cache/filtercache.cxx
@@ -801,7 +801,7 @@ css::uno::Reference< css::uno::XInterface > FilterCache::impl_openConfig(EConfig
::osl::ResettableMutexGuard aLock(m_aLock);
OUString sPath ;
- css::uno::Reference< css::uno::XInterface >* pConfig = 0;
+ css::uno::Reference< css::uno::XInterface >* pConfig = nullptr;
css::uno::Reference< css::uno::XInterface > xOld ;
OString sRtlLog ;
@@ -847,7 +847,7 @@ css::uno::Reference< css::uno::XInterface > FilterCache::impl_openConfig(EConfig
}
break;
- default : throw css::uno::RuntimeException("These configuration node is not supported here for open!", 0);
+ default : throw css::uno::RuntimeException("These configuration node is not supported here for open!", nullptr);
}
{
@@ -1264,7 +1264,7 @@ void FilterCache::impl_addItem2FlushList( EItemType eType,
const OUString& sItem)
throw(css::uno::Exception)
{
- OUStringList* pList = 0;
+ OUStringList* pList = nullptr;
switch(eType)
{
case E_TYPE :
@@ -1283,7 +1283,7 @@ void FilterCache::impl_addItem2FlushList( EItemType eType,
pList = &m_lChangedContentHandlers;
break;
- default : throw css::uno::RuntimeException("unsupported item type", 0);
+ default : throw css::uno::RuntimeException("unsupported item type", nullptr);
}
OUStringList::const_iterator pItem = ::std::find(pList->begin(), pList->end(), sItem);
@@ -1736,7 +1736,7 @@ CacheItemList::iterator FilterCache::impl_loadItemOnDemand( EItemType
const OUString& sItem)
throw(css::uno::Exception)
{
- CacheItemList* pList = 0;
+ CacheItemList* pList = nullptr;
css::uno::Reference< css::uno::XInterface > xConfig ;
OUString sSet ;
diff --git a/filter/source/config/cache/registration.cxx b/filter/source/config/cache/registration.cxx
index d9e4318ce194..e847faa1a228 100644
--- a/filter/source/config/cache/registration.cxx
+++ b/filter/source/config/cache/registration.cxx
@@ -38,7 +38,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL
void* /* pRegistryKey */ )
{
if ((!pImplementationName) || (!pServiceManager ))
- return NULL;
+ return nullptr;
css::uno::Reference< css::lang::XMultiServiceFactory >
xSMGR = static_cast< css::lang::XMultiServiceFactory* >(pServiceManager);
@@ -82,7 +82,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL
return xFactory.get();
}
- return NULL;
+ return nullptr;
}
} // namespace config
diff --git a/filter/source/flash/swfexporter.cxx b/filter/source/flash/swfexporter.cxx
index 76ddbde5e6b6..883496556a97 100644
--- a/filter/source/flash/swfexporter.cxx
+++ b/filter/source/flash/swfexporter.cxx
@@ -102,7 +102,7 @@ FlashExporter::FlashExporter(
, mxSelectedDrawPage(rxSelectedDrawPage)
, mbExportSelection(false)
- , mpWriter(NULL)
+ , mpWriter(nullptr)
, mnDocWidth(0)
, mnDocHeight(0)
, mnJPEGcompressMode(nJPEGCompressMode)
@@ -127,7 +127,7 @@ FlashExporter::~FlashExporter()
void FlashExporter::Flush()
{
delete mpWriter;
- mpWriter = NULL;
+ mpWriter = nullptr;
maPagesMap.clear();
}
@@ -290,7 +290,7 @@ bool FlashExporter::exportSlides( Reference< XDrawPage > xDrawPage, Reference< X
try
{
- if( NULL == mpWriter )
+ if( nullptr == mpWriter )
{
xPropSet->getPropertyValue( "Width" ) >>= mnDocWidth;
xPropSet->getPropertyValue( "Height" ) >>= mnDocHeight;
@@ -324,7 +324,7 @@ sal_uInt16 FlashExporter::exportBackgrounds( Reference< XDrawPage > xDrawPage, R
if( !xDrawPage.is() || !xPropSet.is() )
return 0;
- if( NULL == mpWriter )
+ if( nullptr == mpWriter )
{
xPropSet->getPropertyValue( "Width" ) >>= mnDocWidth;
xPropSet->getPropertyValue( "Height" ) >>= mnDocHeight;
diff --git a/filter/source/flash/swffilter.cxx b/filter/source/flash/swffilter.cxx
index c72256516e43..2975e08c4812 100644
--- a/filter/source/flash/swffilter.cxx
+++ b/filter/source/flash/swffilter.cxx
@@ -369,7 +369,7 @@ bool FlashExportFilter::ExportAsMultipleFiles(const Sequence< PropertyValue >& a
fullpath = swfdirpath + STR("/backgroundconfig.txt");
- oslFileHandle xBackgroundConfig( 0 );
+ oslFileHandle xBackgroundConfig( nullptr );
// AS: Only export the background config if we're exporting all of the pages, otherwise we'll
// screw it up.
@@ -454,7 +454,7 @@ bool FlashExportFilter::ExportAsMultipleFiles(const Sequence< PropertyValue >& a
bool FlashExportFilter::ExportAsSingleFile(const Sequence< PropertyValue >& aDescriptor)
{
- Reference < XOutputStream > xOutputStream = findPropertyValue<Reference<XOutputStream> >(aDescriptor, "OutputStream", 0);
+ Reference < XOutputStream > xOutputStream = findPropertyValue<Reference<XOutputStream> >(aDescriptor, "OutputStream", nullptr);
Sequence< PropertyValue > aFilterData;
if (!xOutputStream.is() )
diff --git a/filter/source/flash/swfuno.cxx b/filter/source/flash/swfuno.cxx
index f09ca4bd36b1..9956662cdf0f 100644
--- a/filter/source/flash/swfuno.cxx
+++ b/filter/source/flash/swfuno.cxx
@@ -36,7 +36,7 @@ extern "C"
SAL_DLLPUBLIC_EXPORT void * SAL_CALL flash_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ )
{
- void * pRet = 0;
+ void * pRet = nullptr;
if( pServiceManager )
{
diff --git a/filter/source/flash/swfwriter.cxx b/filter/source/flash/swfwriter.cxx
index c705cab74981..fe1e67f29256 100644
--- a/filter/source/flash/swfwriter.cxx
+++ b/filter/source/flash/swfwriter.cxx
@@ -42,9 +42,9 @@ static sal_Int32 map100thmm( sal_Int32 n100thMM )
Writer::Writer( sal_Int32 nTWIPWidthOutput, sal_Int32 nTWIPHeightOutput, sal_Int32 nDocWidthInput, sal_Int32 nDocHeightInput, sal_Int32 nJPEGcompressMode )
-: mpClipPolyPolygon( NULL ),
- mpTag( NULL ),
- mpSprite( NULL ),
+: mpClipPolyPolygon( nullptr ),
+ mpTag( nullptr ),
+ mpSprite( nullptr ),
mnNextId( 1 ),
mnGlobalTransparency(0),
mnJPEGCompressMode(nJPEGcompressMode)
@@ -208,7 +208,7 @@ void Writer::endSprite()
mvSpriteStack.pop();
}
else
- mpSprite = NULL;
+ mpSprite = nullptr;
}
}
@@ -222,7 +222,7 @@ void Writer::placeShape( sal_uInt16 nID, sal_uInt16 nDepth, sal_Int32 x, sal_Int
aBits.writeUB( sal_uInt32(nClip != 0), 1 ); // Has Clip Actions?
aBits.writeUB( 0, 1 ); // reserved
- aBits.writeUB( sal_uInt32(pName != NULL), 1 ); // has a name
+ aBits.writeUB( sal_uInt32(pName != nullptr), 1 ); // has a name
aBits.writeUB( 0, 1 ); // no ratio
aBits.writeUB( 0, 1 ); // no color transform
aBits.writeUB( 1, 1 ); // has a matrix
@@ -261,7 +261,7 @@ void Writer::removeShape( sal_uInt16 nDepth )
void Writer::startTag( sal_uInt8 nTagId )
{
- DBG_ASSERT( mpTag == NULL, "Last tag was not ended");
+ DBG_ASSERT( mpTag == nullptr, "Last tag was not ended");
mpTag = new Tag( nTagId );
}
@@ -275,13 +275,13 @@ void Writer::endTag()
if( mpSprite && ( (nTag == TAG_END) || (nTag == TAG_SHOWFRAME) || (nTag == TAG_DOACTION) || (nTag == TAG_STARTSOUND) || (nTag == TAG_PLACEOBJECT) || (nTag == TAG_PLACEOBJECT2) || (nTag == TAG_REMOVEOBJECT2) || (nTag == TAG_FRAMELABEL) ) )
{
mpSprite->addTag( mpTag );
- mpTag = NULL;
+ mpTag = nullptr;
}
else
{
mpTag->write( *mpMovieStream );
delete mpTag;
- mpTag = NULL;
+ mpTag = nullptr;
}
}
@@ -292,7 +292,7 @@ void Writer::showFrame()
startTag( TAG_SHOWFRAME );
endTag();
- if(NULL == mpSprite)
+ if(nullptr == mpSprite)
mnFrames++;
}
diff --git a/filter/source/flash/swfwriter.hxx b/filter/source/flash/swfwriter.hxx
index 2ef8ba2f51e4..b362082ef7d5 100644
--- a/filter/source/flash/swfwriter.hxx
+++ b/filter/source/flash/swfwriter.hxx
@@ -301,7 +301,7 @@ public:
// control tags
/** inserts a place shape tag into the movie stream or the current sprite */
- void placeShape( sal_uInt16 nID, sal_uInt16 nDepth, sal_Int32 x, sal_Int32 y, sal_uInt16 nClipDepth = 0, const char* pName = NULL );
+ void placeShape( sal_uInt16 nID, sal_uInt16 nDepth, sal_Int32 x, sal_Int32 y, sal_uInt16 nClipDepth = 0, const char* pName = nullptr );
/** inserts a remove shape tag into the movie stream or the current sprite */
void removeShape( sal_uInt16 nDepth );
@@ -348,7 +348,7 @@ private:
void Impl_writeText( const Point& rPos, const OUString& rText, const long* pDXArray, long nWidth );
void Impl_writeText( const Point& rPos, const OUString& rText, const long* pDXArray, long nWidth, Color aTextColor );
void Impl_writeGradientEx( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient );
- void Impl_writeLine( const Point& rPt1, const Point& rPt2, const Color* pLineColor = NULL );
+ void Impl_writeLine( const Point& rPt1, const Point& rPt2, const Color* pLineColor = nullptr );
void Impl_writeRect( const Rectangle& rRect, long nRadX, long nRadY );
void Impl_writeEllipse( const Point& rCenter, long nRadX, long nRadY );
bool Impl_writeFilling( SvtGraphicFill& rFilling );
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index c7cf0383fa32..28bae703090e 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -351,7 +351,7 @@ void Writer::Impl_writeGradientEx( const tools::PolyPolygon& rPolyPoly, const Gr
Impl_writeActions( aTmpMtf );
}
- setClipping( NULL );
+ setClipping( nullptr );
}
}
}
@@ -839,7 +839,7 @@ sal_uInt16 Writer::defineBitmap( const BitmapEx &bmpSource, sal_Int32 nJPEGQuali
}
// Figure out JPEG size
- const sal_uInt8* pJpgData = NULL;;
+ const sal_uInt8* pJpgData = nullptr;;
sal_uInt32 nJpgDataLength = 0xffffffff;
Graphic aGraphic( bmpSource );
@@ -1624,7 +1624,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
if( pA->GetComment().equalsIgnoreAsciiCase("XGRAD_SEQ_BEGIN") )
{
- const MetaGradientExAction* pGradAction = NULL;
+ const MetaGradientExAction* pGradAction = nullptr;
bool bDone = false;
while( !bDone && ( ++i < nCount ) )
@@ -1764,14 +1764,14 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
case( MetaActionType::TEXT ):
{
const MetaTextAction* pA = static_cast<const MetaTextAction*>(pAction);
- Impl_writeText( pA->GetPoint(), pA->GetText().copy( pA->GetIndex(), pA->GetLen() ), NULL, 0);
+ Impl_writeText( pA->GetPoint(), pA->GetText().copy( pA->GetIndex(), pA->GetLen() ), nullptr, 0);
}
break;
case( MetaActionType::TEXTRECT ):
{
const MetaTextRectAction* pA = static_cast<const MetaTextRectAction*>(pAction);
- Impl_writeText( pA->GetRect().TopLeft(), pA->GetText(), NULL, 0 );
+ Impl_writeText( pA->GetRect().TopLeft(), pA->GetText(), nullptr, 0 );
}
break;
@@ -1785,7 +1785,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
case( MetaActionType::STRETCHTEXT ):
{
const MetaStretchTextAction* pA = static_cast<const MetaStretchTextAction*>(pAction);
- Impl_writeText( pA->GetPoint(), pA->GetText().copy( pA->GetIndex(), pA->GetLen() ), NULL, pA->GetWidth() );
+ Impl_writeText( pA->GetPoint(), pA->GetText().copy( pA->GetIndex(), pA->GetLen() ), nullptr, pA->GetWidth() );
}
break;
diff --git a/filter/source/graphic/Services.cxx b/filter/source/graphic/Services.cxx
index 87d0268f557f..c8073888c58f 100644
--- a/filter/source/graphic/Services.cxx
+++ b/filter/source/graphic/Services.cxx
@@ -48,7 +48,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL graphicfilter_component_getFactor
{
return component_getFactoryHelper( pImplementationName, graphicExportDialog );
}
- return NULL;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/egif/egif.cxx b/filter/source/graphicfilter/egif/egif.cxx
index e9c209d1c5b6..51f47babab4f 100644
--- a/filter/source/graphicfilter/egif/egif.cxx
+++ b/filter/source/graphicfilter/egif/egif.cxx
@@ -75,7 +75,7 @@ public:
GIFWriter::GIFWriter(SvStream &rStream)
: m_rGIF(rStream)
- , m_pAcc(NULL)
+ , m_pAcc(nullptr)
, nMinPercent(0)
, nMaxPercent(0)
, nLastPercent(0)
@@ -111,7 +111,7 @@ bool GIFWriter::WriteGIF(const Graphic& rGraphic, FilterConfigItem* pFilterConfi
bStatus = true;
nLastPercent = 0;
nInterlaced = 0;
- m_pAcc = NULL;
+ m_pAcc = nullptr;
if ( pFilterConfigItem )
nInterlaced = pFilterConfigItem->ReadInt32( "Interlaced", 0 );
@@ -285,7 +285,7 @@ bool GIFWriter::CreateAccess( const BitmapEx& rBmpEx )
void GIFWriter::DestroyAccess()
{
Bitmap::ReleaseAccess( m_pAcc );
- m_pAcc = NULL;
+ m_pAcc = nullptr;
}
diff --git a/filter/source/graphicfilter/egif/giflzwc.cxx b/filter/source/graphicfilter/egif/giflzwc.cxx
index f845c9c18b7a..d74fa0db4bfc 100644
--- a/filter/source/graphicfilter/egif/giflzwc.cxx
+++ b/filter/source/graphicfilter/egif/giflzwc.cxx
@@ -126,7 +126,7 @@ struct GIFLZWCTreeNode
GIFLZWCompressor::GIFLZWCompressor()
- : pIDOS(NULL), pTable(NULL), pPrefix(NULL), nDataSize(0), nClearCode(0),
+ : pIDOS(nullptr), pTable(nullptr), pPrefix(nullptr), nDataSize(0), nClearCode(0),
nEOICode(0), nTableSize(0), nCodeSize(0)
{
}
@@ -135,7 +135,7 @@ GIFLZWCompressor::GIFLZWCompressor()
GIFLZWCompressor::~GIFLZWCompressor()
{
- if (pIDOS!=NULL) EndCompression();
+ if (pIDOS!=nullptr) EndCompression();
}
@@ -161,11 +161,11 @@ void GIFLZWCompressor::StartCompression( SvStream& rGIF, sal_uInt16 nPixelSize )
for (i=0; i<4096; i++)
{
- pTable[i].pBrother = pTable[i].pFirstChild = NULL;
+ pTable[i].pBrother = pTable[i].pFirstChild = nullptr;
pTable[i].nValue = (sal_uInt8) ( pTable[i].nCode = i );
}
- pPrefix = NULL;
+ pPrefix = nullptr;
pIDOS->WriteBits( nClearCode,nCodeSize );
}
}
@@ -190,7 +190,7 @@ void GIFLZWCompressor::Compress( sal_uInt8* pSrc, sal_uLong nSize )
{
nSize--;
nV=*pSrc++;
- for( p=pPrefix->pFirstChild; p!=NULL; p=p->pBrother )
+ for( p=pPrefix->pFirstChild; p!=nullptr; p=p->pBrother )
{
if (p->nValue==nV)
break;
@@ -207,7 +207,7 @@ void GIFLZWCompressor::Compress( sal_uInt8* pSrc, sal_uLong nSize )
pIDOS->WriteBits(nClearCode,nCodeSize);
for (i=0; i<nClearCode; i++)
- pTable[i].pFirstChild=NULL;
+ pTable[i].pFirstChild=nullptr;
nCodeSize=nDataSize+1;
nTableSize=nEOICode+1;
@@ -221,7 +221,7 @@ void GIFLZWCompressor::Compress( sal_uInt8* pSrc, sal_uLong nSize )
p->pBrother=pPrefix->pFirstChild;
pPrefix->pFirstChild=p;
p->nValue=nV;
- p->pFirstChild=NULL;
+ p->pFirstChild=nullptr;
}
pPrefix=pTable+nV;
@@ -242,7 +242,7 @@ void GIFLZWCompressor::EndCompression()
pIDOS->WriteBits( nEOICode,nCodeSize );
delete[] pTable;
delete pIDOS;
- pIDOS=NULL;
+ pIDOS=nullptr;
}
}
diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx b/filter/source/graphicfilter/eos2met/eos2met.cxx
index 485cb68cca37..b0c44d0a4ec0 100644
--- a/filter/source/graphicfilter/eos2met/eos2met.cxx
+++ b/filter/source/graphicfilter/eos2met/eos2met.cxx
@@ -185,7 +185,7 @@ private:
void WriteChrSets();
sal_uInt8 FindChrSet(const vcl::Font & rFont);
- void WriteColorAttributeTable(sal_uInt32 nFieldId=4, BitmapPalette* pPalette=NULL,
+ void WriteColorAttributeTable(sal_uInt32 nFieldId=4, BitmapPalette* pPalette=nullptr,
sal_uInt8 nBasePartFlags=0x40, sal_uInt8 nBasePartLCTID=0);
void WriteImageObject(const Bitmap & rBitmap);
@@ -239,16 +239,16 @@ public:
METWriter()
: bStatus(false)
, nLastPercent( 0 )
- , pMET(NULL)
+ , pMET(nullptr)
, nActualFieldStartPos( 0 )
, nNumberOfDataFields( 0 )
, eGDIRasterOp( ROP_OVERPAINT )
- , pGDIStack(NULL)
+ , pGDIStack(nullptr)
, eMETMix( ROP_OVERPAINT )
, nMETStrokeLineWidth(0)
, nMETChrAngle(0)
, nMETChrSet( 0 )
- , pChrSetList(NULL)
+ , pChrSetList(nullptr)
, nNextChrSetId( 0 )
, nActBitmapId( 0 )
, nNumberOfActions( 0 )
@@ -256,7 +256,7 @@ public:
, nWrittenActions( 0 )
, nWrittenBitmaps( 0 )
, nActBitmapPercent( 0 )
- , pCompDev(NULL)
+ , pCompDev(nullptr)
{
pCompDev = reinterpret_cast< OutputDevice* >( Application::GetAppWindow() );
if( !pCompDev )
@@ -440,7 +440,7 @@ sal_uInt8 METWriter::FindChrSet(const vcl::Font & rFont)
{
METChrSet* pCS;
- for (pCS=pChrSetList; pCS!=NULL; pCS=pCS->pSucc)
+ for (pCS=pChrSetList; pCS!=nullptr; pCS=pCS->pSucc)
{
if (pCS->aName==rFont.GetName() && pCS->eWeight==rFont.GetWeight() )
return pCS->nSet;
@@ -457,7 +457,7 @@ void METWriter::WriteChrSets()
METChrSet * pCS;
sal_uInt8 nbyte;
- for (pCS=pChrSetList; pCS!=NULL; pCS=pCS->pSucc)
+ for (pCS=pChrSetList; pCS!=nullptr; pCS=pCS->pSucc)
{
WriteFieldIntroducer(0x58,MapCodFntMagic,0,0);
@@ -520,7 +520,7 @@ void METWriter::WriteColorAttributeTable(sal_uInt32 nFieldId, BitmapPalette* pPa
//--- The Field 'Color Attribute Table':
WriteFieldIntroducer(0,BlkColAtrMagic,0,0);
pMET->WriteUChar( nBasePartFlags ).WriteUChar( 0x00 ).WriteUChar( nBasePartLCTID ); // 'Base Part'
- if (pPalette!=NULL)
+ if (pPalette!=nullptr)
{
nIndex=0;
while (nIndex<pPalette->GetEntryCount())
@@ -1897,7 +1897,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
METSetChrSet(FindChrSet(aGDIFont));
aStr = pA->GetText().copy(pA->GetIndex(),pA->GetLen());
- if( pA->GetDXArray()!=NULL )
+ if( pA->GetDXArray()!=nullptr )
{
Point aPt2;
@@ -2521,7 +2521,7 @@ bool METWriter::WriteMET( const GDIMetaFile& rMTF, SvStream& rTargetStream, Filt
aGDIFont=vcl::Font();
aGDIMapMode=MapMode();
aGDIClipRect=Rectangle();
- pGDIStack=NULL;
+ pGDIStack=nullptr;
aMETColor=Color(COL_BLACK);
aMETBackgroundColor=Color(COL_WHITE);
eMETMix=ROP_OVERPAINT;
@@ -2529,7 +2529,7 @@ bool METWriter::WriteMET( const GDIMetaFile& rMTF, SvStream& rTargetStream, Filt
aMETChrCellSize=Size(0,0);
nMETChrAngle=0;
nMETChrSet=0x00;
- pChrSetList=NULL;
+ pChrSetList=nullptr;
nNextChrSetId=1;
nNumberOfActions=0;
nNumberOfBitmaps=0;
diff --git a/filter/source/graphicfilter/epbm/epbm.cxx b/filter/source/graphicfilter/epbm/epbm.cxx
index 284798c7b8d9..90cc26ec6d2c 100644
--- a/filter/source/graphicfilter/epbm/epbm.cxx
+++ b/filter/source/graphicfilter/epbm/epbm.cxx
@@ -58,7 +58,7 @@ PBMWriter::PBMWriter(SvStream &rPBM)
: m_rOStm(rPBM)
, mbStatus(true)
, mnMode(0)
- , mpAcc(NULL)
+ , mpAcc(nullptr)
, mnWidth(0)
, mnHeight(0)
{
diff --git a/filter/source/graphicfilter/epgm/epgm.cxx b/filter/source/graphicfilter/epgm/epgm.cxx
index 81d216300654..144ac025c1c7 100644
--- a/filter/source/graphicfilter/epgm/epgm.cxx
+++ b/filter/source/graphicfilter/epgm/epgm.cxx
@@ -57,7 +57,7 @@ PGMWriter::PGMWriter(SvStream &rStream)
: m_rOStm(rStream)
, mbStatus(true)
, mnMode(0)
- , mpAcc(NULL)
+ , mpAcc(nullptr)
, mnWidth(0)
, mnHeight(0)
{
diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx
index 0ff8ce948dcb..2d4248d9b0c5 100644
--- a/filter/source/graphicfilter/epict/epict.cxx
+++ b/filter/source/graphicfilter/epict/epict.cxx
@@ -866,7 +866,7 @@ void PictWriter::WriteOpcode_Poly(PictDrawingMethod eMethod, const tools::Polygo
void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, const Bitmap & rBitmap)
{
- BitmapReadAccess* pAcc = NULL;
+ BitmapReadAccess* pAcc = nullptr;
Bitmap aBitmap( rBitmap );
sal_uLong nWidth, nHeight, nDstRowBytes, nx, nc, ny, nCount, nColTabSize, i;
@@ -884,7 +884,7 @@ void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize,
if ( !bStatus )
return;
- if ( ( pAcc = aBitmap.AcquireReadAccess() ) == NULL )
+ if ( ( pAcc = aBitmap.AcquireReadAccess() ) == nullptr )
return;
nBitsPerPixel = aBitmap.GetBitCount();
@@ -1308,7 +1308,7 @@ void PictWriter::SetAttrForText()
void PictWriter::WriteTextArray(Point & rPoint, const OUString& rString, const long* pDXAry)
{
- if ( pDXAry == NULL )
+ if ( pDXAry == nullptr )
WriteOpcode_Text( rPoint, rString, false );
else
{
@@ -2212,7 +2212,7 @@ bool PictWriter::WritePict(const GDIMetaFile & rMTF, SvStream & rTargetStream, F
aMap72.SetScaleY( aDPIFrac );
aTargetMapMode = aMap72;
- pAttrStack=NULL;
+ pAttrStack=nullptr;
bDstBkPatValid=false;
bDstTxFaceValid=false;
@@ -2241,7 +2241,7 @@ bool PictWriter::WritePict(const GDIMetaFile & rMTF, SvStream & rTargetStream, F
WriteOpcode_EndOfFile();
UpdateHeader();
- while (pAttrStack!=NULL) {
+ while (pAttrStack!=nullptr) {
pAt=pAttrStack;
pAttrStack=pAt->pSucc;
delete pAt;
diff --git a/filter/source/graphicfilter/eppm/eppm.cxx b/filter/source/graphicfilter/eppm/eppm.cxx
index e72a1c742f96..5e9cb90dc7ee 100644
--- a/filter/source/graphicfilter/eppm/eppm.cxx
+++ b/filter/source/graphicfilter/eppm/eppm.cxx
@@ -57,7 +57,7 @@ PPMWriter::PPMWriter(SvStream &rStrm)
: m_rOStm(rStrm)
, mbStatus(true)
, mnMode(0)
- , mpAcc(NULL)
+ , mpAcc(nullptr)
, mnWidth(0)
, mnHeight(0)
{
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index 8cdb782a0735..c2d9bfb60a6d 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -161,7 +161,7 @@ private:
css::uno::Reference< css::task::XStatusIndicator > xStatusIndicator;
- void ImplWriteProlog( const Graphic* pPreviewEPSI = NULL );
+ void ImplWriteProlog( const Graphic* pPreviewEPSI = nullptr );
void ImplWriteEpilog();
void ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev );
@@ -213,7 +213,7 @@ private:
void ImplText( const OUString& rUniString, const Point& rPos, const long* pDXArry, sal_Int32 nWidth, VirtualDevice& rVDev );
void ImplSetAttrForText( const Point & rPoint );
void ImplWriteCharacter( sal_Char );
- void ImplWriteString( const OString&, VirtualDevice& rVDev, const long* pDXArry = NULL, bool bStretch = false );
+ void ImplWriteString( const OString&, VirtualDevice& rVDev, const long* pDXArry = nullptr, bool bStretch = false );
void ImplDefineFont( const char*, const char* );
void ImplClosePathDraw( sal_uLong nMode = PS_RET );
@@ -254,15 +254,15 @@ PSWriter::PSWriter()
, mbCompression(false)
, mnPreview(0)
, mnTextMode(0)
- , mpPS(NULL)
- , pMTF(NULL)
- , pAMTF(NULL)
+ , mpPS(nullptr)
+ , pMTF(nullptr)
+ , pAMTF(nullptr)
, pVDev()
, nBoundingX1(0)
, nBoundingY1(0)
, nBoundingX2(0)
, nBoundingY2(0)
- , pGDIStack(NULL)
+ , pGDIStack(nullptr)
, mnCursorPos(0)
, aColor()
, bLineColor(false)
@@ -283,10 +283,10 @@ PSWriter::PSWriter()
, maFont()
, maLastFont()
, nChrSet(0)
- , pChrSetList(NULL)
+ , pChrSetList(nullptr)
, nNextChrSetId(0)
- , pTable(NULL)
- , pPrefix(NULL)
+ , pTable(nullptr)
+ , pPrefix(nullptr)
, nDataSize(0)
, nClearCode(0)
, nEOICode(0)
@@ -296,7 +296,7 @@ PSWriter::PSWriter()
, dwShift(0)
, xStatusIndicator()
{
- pAMTF = NULL;
+ pAMTF = nullptr;
}
@@ -430,7 +430,7 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
nBoundingX2 = pMTF->GetPrefSize().Width();
nBoundingY2 = pMTF->GetPrefSize().Height();
- pGDIStack = NULL;
+ pGDIStack = nullptr;
aColor = Color( COL_TRANSPARENT );
bLineColor = true;
aLineColor = Color( COL_BLACK );
@@ -447,12 +447,12 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
bRegionChanged = false;
nChrSet = 0x00;
- pChrSetList = NULL;
+ pChrSetList = nullptr;
nNextChrSetId = 1;
if( pMTF->GetActionSize() )
{
- ImplWriteProlog( ( mnPreview & EPS_PREVIEW_EPSI ) ? &rGraphic : NULL );
+ ImplWriteProlog( ( mnPreview & EPS_PREVIEW_EPSI ) ? &rGraphic : nullptr );
mnCursorPos = 0;
ImplWriteActions( *pMTF, *pVDev.get() );
ImplWriteEpilog();
@@ -809,7 +809,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
OUString aUniStr = pA->GetText().copy( pA->GetIndex(), pA->GetLen() );
Point aPoint( pA->GetPoint() );
- ImplText( aUniStr, aPoint, NULL, 0, rVDev );
+ ImplText( aUniStr, aPoint, nullptr, 0, rVDev );
}
break;
@@ -825,7 +825,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
OUString aUniStr = pA->GetText().copy( pA->GetIndex(), pA->GetLen() );
Point aPoint( pA->GetPoint() );
- ImplText( aUniStr, aPoint, NULL, pA->GetWidth(), rVDev );
+ ImplText( aUniStr, aPoint, nullptr, pA->GetWidth(), rVDev );
}
break;
@@ -846,7 +846,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
aBitmap.Convert( BMP_CONVERSION_8BIT_GREYS );
Point aPoint = static_cast<const MetaBmpAction*>(pMA)->GetPoint();
Size aSize( rVDev.PixelToLogic( aBitmap.GetSizePixel() ) );
- ImplBmp( &aBitmap, NULL, aPoint, aSize.Width(), aSize.Height() );
+ ImplBmp( &aBitmap, nullptr, aPoint, aSize.Width(), aSize.Height() );
}
break;
@@ -857,7 +857,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
aBitmap.Convert( BMP_CONVERSION_8BIT_GREYS );
Point aPoint = static_cast<const MetaBmpScaleAction*>(pMA)->GetPoint();
Size aSize = static_cast<const MetaBmpScaleAction*>(pMA)->GetSize();
- ImplBmp( &aBitmap, NULL, aPoint, aSize.Width(), aSize.Height() );
+ ImplBmp( &aBitmap, nullptr, aPoint, aSize.Width(), aSize.Height() );
}
break;
@@ -870,7 +870,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
aBitmap.Convert( BMP_CONVERSION_8BIT_GREYS );
Point aPoint = static_cast<const MetaBmpScalePartAction*>(pMA)->GetDestPoint();
Size aSize = static_cast<const MetaBmpScalePartAction*>(pMA)->GetDestSize();
- ImplBmp( &aBitmap, NULL, aPoint, aSize.Width(), aSize.Height() );
+ ImplBmp( &aBitmap, nullptr, aPoint, aSize.Width(), aSize.Height() );
}
break;
@@ -972,7 +972,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
ImplBmp( &aBitmap, &aMask, Point( aRect.Left(), aRect.Top() ), aRect.GetWidth(), aRect.GetHeight() );
}
else
- ImplBmp( &aBitmap, NULL, Point( aRect.Left(), aRect.Top() ), aRect.GetWidth(), aRect.GetHeight() );
+ ImplBmp( &aBitmap, nullptr, Point( aRect.Left(), aRect.Top() ), aRect.GetWidth(), aRect.GetHeight() );
// wallpaper Style
@@ -1167,7 +1167,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
sal_uLong nSize = aGfxLink.GetDataSize();
sal_uLong nParseThis = POSTSCRIPT_BOUNDINGSEARCH;
if ( nSize < 64 ) // assuming eps is larger than 64 bytes
- pSource = NULL;
+ pSource = nullptr;
if ( nParseThis > nSize )
nParseThis = nSize;
@@ -1263,7 +1263,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
const MetaCommentAction* pA = static_cast<const MetaCommentAction*>(pMA);
if ( pA->GetComment().equalsIgnoreAsciiCase("XGRAD_SEQ_BEGIN") )
{
- const MetaGradientExAction* pGradAction = NULL;
+ const MetaGradientExAction* pGradAction = nullptr;
while( ++nCurAction < nCount )
{
MetaAction* pAction = rMtf.GetAction( nCurAction );
@@ -2183,7 +2183,7 @@ void PSWriter::ImplText( const OUString& rUniString, const Point& rPos, const lo
else if ( ( mnTextMode == 1 ) || ( mnTextMode == 2 ) ) // normal text output
{
if ( mnTextMode == 2 ) // forcing output one complete text packet, by
- pDXArry = NULL; // ignoring the kerning array
+ pDXArry = nullptr; // ignoring the kerning array
ImplSetAttrForText( rPos );
OString aStr(OUStringToOString(rUniString,
maFont.GetCharSet()));
@@ -2684,10 +2684,10 @@ void PSWriter::StartCompression()
for ( i = 0; i < 4096; i++ )
{
- pTable[ i ].pBrother = pTable[ i ].pFirstChild = NULL;
+ pTable[ i ].pBrother = pTable[ i ].pFirstChild = nullptr;
pTable[ i ].nValue = (sal_uInt8)( pTable[ i ].nCode = i );
}
- pPrefix = NULL;
+ pPrefix = nullptr;
WriteBits( nClearCode, nCodeSize );
}
@@ -2706,7 +2706,7 @@ void PSWriter::Compress( sal_uInt8 nCompThis )
else
{
nV = nCompThis;
- for( p = pPrefix->pFirstChild; p != NULL; p = p->pBrother )
+ for( p = pPrefix->pFirstChild; p != nullptr; p = p->pBrother )
{
if ( p->nValue == nV )
break;
@@ -2723,7 +2723,7 @@ void PSWriter::Compress( sal_uInt8 nCompThis )
WriteBits( nClearCode, nCodeSize );
for ( i = 0; i < nClearCode; i++ )
- pTable[ i ].pFirstChild = NULL;
+ pTable[ i ].pFirstChild = nullptr;
nCodeSize = nDataSize + 1;
nTableSize = nEOICode + 1;
@@ -2737,7 +2737,7 @@ void PSWriter::Compress( sal_uInt8 nCompThis )
p->pBrother = pPrefix->pFirstChild;
pPrefix->pFirstChild = p;
p->nValue = nV;
- p->pFirstChild = NULL;
+ p->pFirstChild = nullptr;
}
pPrefix = pTable + nV;
@@ -2772,7 +2772,7 @@ sal_uInt8* PSWriter::ImplSearchEntry( sal_uInt8* pSource, sal_uInt8 const * pDes
return pSource;
pSource++;
}
- return NULL;
+ return nullptr;
}
diff --git a/filter/source/graphicfilter/eras/eras.cxx b/filter/source/graphicfilter/eras/eras.cxx
index c3e0be6f0d33..ea4c1448e48d 100644
--- a/filter/source/graphicfilter/eras/eras.cxx
+++ b/filter/source/graphicfilter/eras/eras.cxx
@@ -59,7 +59,7 @@ public:
RASWriter::RASWriter(SvStream &rStream)
: m_rOStm(rStream)
, mbStatus(true)
- , mpAcc(NULL)
+ , mpAcc(nullptr)
, mnWidth(0)
, mnHeight(0)
, mnColors(0)
diff --git a/filter/source/graphicfilter/etiff/etiff.cxx b/filter/source/graphicfilter/etiff/etiff.cxx
index 2c8c2df6b9b4..239c66d2c4e9 100644
--- a/filter/source/graphicfilter/etiff/etiff.cxx
+++ b/filter/source/graphicfilter/etiff/etiff.cxx
@@ -119,7 +119,7 @@ TIFFWriter::TIFFWriter(SvStream &rStream)
: m_rOStm(rStream)
, mnStreamOfs(0)
, mbStatus(true)
- , mpAcc(NULL)
+ , mpAcc(nullptr)
, mnWidth(0)
, mnHeight(0)
, mnColors(0)
@@ -135,8 +135,8 @@ TIFFWriter::TIFFWriter(SvStream &rStream)
, mnPalPos(0)
, mnBitmapPos(0)
, mnStripByteCountPos(0)
- , pTable(NULL)
- , pPrefix(NULL)
+ , pTable(nullptr)
+ , pPrefix(nullptr)
, nDataSize(0)
, nClearCode(0)
, nEOICode(0)
@@ -527,11 +527,11 @@ void TIFFWriter::StartCompression()
for ( i = 0; i < 4096; i++)
{
- pTable[ i ].pBrother = pTable[ i ].pFirstChild = NULL;
+ pTable[ i ].pBrother = pTable[ i ].pFirstChild = nullptr;
pTable[ i ].nValue = (sal_uInt8)( pTable[ i ].nCode = i );
}
- pPrefix = NULL;
+ pPrefix = nullptr;
WriteBits( nClearCode, nCodeSize );
}
@@ -550,7 +550,7 @@ void TIFFWriter::Compress( sal_uInt8 nCompThis )
else
{
nV = nCompThis;
- for( p = pPrefix->pFirstChild; p != NULL; p = p->pBrother )
+ for( p = pPrefix->pFirstChild; p != nullptr; p = p->pBrother )
{
if ( p->nValue == nV )
break;
@@ -567,7 +567,7 @@ void TIFFWriter::Compress( sal_uInt8 nCompThis )
WriteBits( nClearCode, nCodeSize );
for ( i = 0; i < nClearCode; i++ )
- pTable[ i ].pFirstChild = NULL;
+ pTable[ i ].pFirstChild = nullptr;
nCodeSize = nDataSize + 1;
nTableSize = nEOICode + 1;
@@ -581,7 +581,7 @@ void TIFFWriter::Compress( sal_uInt8 nCompThis )
p->pBrother = pPrefix->pFirstChild;
pPrefix->pFirstChild = p;
p->nValue = nV;
- p->pFirstChild = NULL;
+ p->pFirstChild = nullptr;
}
pPrefix = pTable + nV;
diff --git a/filter/source/graphicfilter/expm/expm.cxx b/filter/source/graphicfilter/expm/expm.cxx
index 55f44691f089..524f1ddac9c0 100644
--- a/filter/source/graphicfilter/expm/expm.cxx
+++ b/filter/source/graphicfilter/expm/expm.cxx
@@ -59,7 +59,7 @@ XPMWriter::XPMWriter(SvStream& rOStm)
: m_rOStm(rOStm)
, mbStatus(true)
, mbTrans(false)
- , mpAcc(NULL)
+ , mpAcc(nullptr)
, mnWidth(0)
, mnHeight(0)
, mnColors(0)
diff --git a/filter/source/graphicfilter/icgm/bitmap.cxx b/filter/source/graphicfilter/icgm/bitmap.cxx
index b8acf4f2215d..2243ed849f4f 100644
--- a/filter/source/graphicfilter/icgm/bitmap.cxx
+++ b/filter/source/graphicfilter/icgm/bitmap.cxx
@@ -45,7 +45,7 @@ void CGMBitmap::ImplGetBitmap( CGMBitmapDescriptor& rDesc )
if ( ImplGetDimensions( rDesc ) && rDesc.mpBuf )
{
rDesc.mpBitmap = new Bitmap( Size( rDesc.mnX, rDesc.mnY ), (sal_uInt16)rDesc.mnDstBitsPerPixel );
- if ( ( rDesc.mpAcc = rDesc.mpBitmap->AcquireWriteAccess() ) != NULL )
+ if ( ( rDesc.mpAcc = rDesc.mpBitmap->AcquireWriteAccess() ) != nullptr )
{
// the picture may either be read from left to right or right to left, from top to bottom ...
@@ -204,14 +204,14 @@ void CGMBitmap::ImplGetBitmap( CGMBitmapDescriptor& rDesc )
if ( rDesc.mpAcc )
{
Bitmap::ReleaseAccess( rDesc.mpAcc );
- rDesc.mpAcc = NULL;
+ rDesc.mpAcc = nullptr;
}
if ( !rDesc.mbStatus )
{
if ( rDesc.mpBitmap )
{
delete rDesc.mpBitmap;
- rDesc.mpBitmap = NULL;
+ rDesc.mpBitmap = nullptr;
}
}
}
@@ -367,7 +367,7 @@ CGMBitmap* CGMBitmap::GetNext()
{
ImplInsert( *(pCGMTempBitmap->pCGMBitmapDescriptor), *(pCGMBitmapDescriptor) );
delete pCGMTempBitmap;
- return NULL;
+ return nullptr;
}
CGMBitmapDescriptor* pTempBD = pCGMBitmapDescriptor;
@@ -376,7 +376,7 @@ CGMBitmap* CGMBitmap::GetNext()
return pCGMTempBitmap;
}
else
- return NULL;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/graphicfilter/icgm/bitmap.hxx b/filter/source/graphicfilter/icgm/bitmap.hxx
index d60a7d825009..96639d12ebcd 100644
--- a/filter/source/graphicfilter/icgm/bitmap.hxx
+++ b/filter/source/graphicfilter/icgm/bitmap.hxx
@@ -47,9 +47,9 @@ class CGMBitmapDescriptor
sal_uInt32 mnCompressionMode;
CGMBitmapDescriptor()
- : mpBuf(NULL)
- , mpBitmap(NULL)
- , mpAcc(NULL)
+ : mpBuf(nullptr)
+ , mpBitmap(nullptr)
+ , mpAcc(nullptr)
, mbStatus(false)
, mbVMirror(false)
, mbHMirror(false)
diff --git a/filter/source/graphicfilter/icgm/bundles.cxx b/filter/source/graphicfilter/icgm/bundles.cxx
index 6062b9b3a9c5..f59182d7a7f2 100644
--- a/filter/source/graphicfilter/icgm/bundles.cxx
+++ b/filter/source/graphicfilter/icgm/bundles.cxx
@@ -84,9 +84,9 @@ FillBundle& FillBundle::operator=( FillBundle& rSource )
};
FontEntry::FontEntry() :
- pFontName ( NULL ),
+ pFontName ( nullptr ),
eCharSetType ( CST_CCOMPLETE ),
- pCharSetValue ( NULL ),
+ pCharSetValue ( nullptr ),
nFontType ( 0 )
{
}
@@ -148,7 +148,7 @@ FontEntry* CGMFList::GetFontEntry( sal_uInt32 nIndex )
sal_uInt32 nInd = nIndex;
if ( nInd )
nInd--;
- return ( nInd < aFontEntryList.size() ) ? aFontEntryList[ nInd ] : NULL;
+ return ( nInd < aFontEntryList.size() ) ? aFontEntryList[ nInd ] : nullptr;
}
@@ -167,7 +167,7 @@ static sal_Int8* ImplSearchEntry( sal_Int8* pSource, sal_Int8 const * pDest, sal
return pSource;
pSource++;
}
- return NULL;
+ return nullptr;
}
void CGMFList::InsertName( sal_uInt8* pSource, sal_uInt32 nSize )
diff --git a/filter/source/graphicfilter/icgm/cgm.cxx b/filter/source/graphicfilter/icgm/cgm.cxx
index 5a7395fffd06..ead44f8fc411 100644
--- a/filter/source/graphicfilter/icgm/cgm.cxx
+++ b/filter/source/graphicfilter/icgm/cgm.cxx
@@ -44,7 +44,7 @@ CGM::CGM( sal_uInt32 nMode, uno::Reference< frame::XModel > const & rModel )
, mnXFraction(0)
, mnYFraction(0)
, mbAngReverse(false)
- , mpGraphic(NULL)
+ , mpGraphic(nullptr)
, mbStatus(true)
, mbMetaFile(false)
, mbIsFinished(false)
@@ -53,20 +53,20 @@ CGM::CGM( sal_uInt32 nMode, uno::Reference< frame::XModel > const & rModel )
, mbFigure(false)
, mbFirstOutPut(false)
, mnAct4PostReset(0)
- , mpBitmapInUse(NULL)
- , mpChart(NULL)
+ , mpBitmapInUse(nullptr)
+ , mpChart(nullptr)
, mpOutAct(new CGMImpressOutAct(*this, rModel))
- , mpSource(NULL)
- , mpEndValidSource(NULL)
+ , mpSource(nullptr)
+ , mpEndValidSource(nullptr)
, mnParaSize(0)
, mnActCount(0)
- , mpBuf(NULL)
+ , mpBuf(nullptr)
, mnMode(nMode | CGM_EXPORT_IMPRESS)
, mnEscape(0)
, mnElementClass(0)
, mnElementID(0)
, mnElementSize(0)
- , mpGDIMetaFile(NULL)
+ , mpGDIMetaFile(nullptr)
{
pElement = new CGMElements( *this );
pCopyOfE = new CGMElements( *this );
@@ -102,7 +102,7 @@ sal_uInt32 CGM::ImplGetUI16( sal_uInt32 /*nAlign*/ )
{
sal_uInt8* pSource = mpSource + mnParaSize;
if (pSource + 2 > mpEndValidSource)
- throw css::uno::Exception("attempt to read past end of input", 0);
+ throw css::uno::Exception("attempt to read past end of input", nullptr);
mnParaSize += 2;
return ( pSource[ 0 ] << 8 ) + pSource[ 1 ];
};
@@ -116,7 +116,7 @@ sal_Int32 CGM::ImplGetI( sal_uInt32 nPrecision )
{
sal_uInt8* pSource = mpSource + mnParaSize;
if (pSource + nPrecision > mpEndValidSource)
- throw css::uno::Exception("attempt to read past end of input", 0);
+ throw css::uno::Exception("attempt to read past end of input", nullptr);
mnParaSize += nPrecision;
switch( nPrecision )
{
@@ -148,7 +148,7 @@ sal_uInt32 CGM::ImplGetUI( sal_uInt32 nPrecision )
{
sal_uInt8* pSource = mpSource + mnParaSize;
if (pSource + nPrecision > mpEndValidSource)
- throw css::uno::Exception("attempt to read past end of input", 0);
+ throw css::uno::Exception("attempt to read past end of input", nullptr);
mnParaSize += nPrecision;
switch( nPrecision )
{
@@ -203,7 +203,7 @@ double CGM::ImplGetFloat( RealPrecision eRealPrecision, sal_uInt32 nRealSize )
#endif
if (mpSource + mnParaSize + nRealSize > mpEndValidSource)
- throw css::uno::Exception("attempt to read past end of input", 0);
+ throw css::uno::Exception("attempt to read past end of input", nullptr);
if ( bCompatible )
{
diff --git a/filter/source/graphicfilter/icgm/chart.cxx b/filter/source/graphicfilter/icgm/chart.cxx
index f5e179afd4de..73961fe64e14 100644
--- a/filter/source/graphicfilter/icgm/chart.cxx
+++ b/filter/source/graphicfilter/icgm/chart.cxx
@@ -49,7 +49,7 @@ void CGMChart::DeleteTextEntry( TextEntry* pTextEntry )
if ( pTextEntry )
{
delete pTextEntry->pText;
- for ( TextAttribute* pTAttr = pTextEntry->pAttribute; pTAttr != NULL ; )
+ for ( TextAttribute* pTAttr = pTextEntry->pAttribute; pTAttr != nullptr ; )
{
TextAttribute* pTempTAttr = pTAttr;
pTAttr = pTAttr->pNextAttribute;
diff --git a/filter/source/graphicfilter/icgm/class0.cxx b/filter/source/graphicfilter/icgm/class0.cxx
index 76691416eb73..12305f9c8bc6 100644
--- a/filter/source/graphicfilter/icgm/class0.cxx
+++ b/filter/source/graphicfilter/icgm/class0.cxx
@@ -40,7 +40,7 @@ void CGM::ImplDoClass0()
// do anything with the bitmap
mpOutAct->DrawBitmap( pBmpDesc );
delete mpBitmapInUse;
- mpBitmapInUse = NULL;
+ mpBitmapInUse = nullptr;
}
mbIsFinished = true;
mbPictureBody = false;
@@ -59,7 +59,7 @@ void CGM::ImplDoClass0()
mbPicture = mbFirstOutPut = true;
mbFigure = false;
mnAct4PostReset = 0;
- if ( mpChart == NULL ) // normal CGM Files determines "BeginPic"
+ if ( mpChart == nullptr ) // normal CGM Files determines "BeginPic"
mpOutAct->InsertPage(); // as the next slide
}
}
@@ -77,7 +77,7 @@ void CGM::ImplDoClass0()
// do anything with the bitmap
mpOutAct->DrawBitmap( pBmpDesc );
delete mpBitmapInUse;
- mpBitmapInUse = NULL;
+ mpBitmapInUse = nullptr;
}
mpOutAct->EndFigure(); // close potential figures
mpOutAct->EndGrouping(); // finish potential groups
diff --git a/filter/source/graphicfilter/icgm/class4.cxx b/filter/source/graphicfilter/icgm/class4.cxx
index c5c05db5f99a..fbd800c38779 100644
--- a/filter/source/graphicfilter/icgm/class4.cxx
+++ b/filter/source/graphicfilter/icgm/class4.cxx
@@ -116,10 +116,10 @@ void CGM::ImplDoClass4()
// do anything with the bitmap
mpOutAct->DrawBitmap( pBmpDesc );
delete mpBitmapInUse;
- mpBitmapInUse = NULL;
+ mpBitmapInUse = nullptr;
}
- if ( ( mpChart == NULL ) || mpChart->IsAnnotation() )
+ if ( ( mpChart == nullptr ) || mpChart->IsAnnotation() )
{
switch ( mnElementID )
{
diff --git a/filter/source/graphicfilter/icgm/class7.cxx b/filter/source/graphicfilter/icgm/class7.cxx
index 7a9c79a81169..21951e8fc79f 100644
--- a/filter/source/graphicfilter/icgm/class7.cxx
+++ b/filter/source/graphicfilter/icgm/class7.cxx
@@ -41,7 +41,7 @@ void CGM::ImplDoClass7()
{
case 0x000 : /*AppData - Beginning of File Opcodes*/
{
- if ( mpChart == NULL )
+ if ( mpChart == nullptr )
mpChart = new CGMChart( *this );
mpChart->mnCurrentFileType = pAppData[ 3 ];
}
@@ -120,14 +120,14 @@ void CGM::ImplDoClass7()
memcpy( pTextEntry->pText, pAppData, nLen );
pAppData += nLen;
- TextAttribute* pTextOld = 0;
+ TextAttribute* pTextOld = nullptr;
for ( sal_uInt16 i = 0; i < nAttributes; i++ )
{
TextAttribute* pTextAttr = new TextAttribute;
*pTextAttr = *reinterpret_cast<TextAttribute*>( pAppData );
- pTextAttr->pNextAttribute = NULL;
+ pTextAttr->pNextAttribute = nullptr;
if ( i == 0 )
pTextEntry->pAttribute = pTextAttr;
else
diff --git a/filter/source/graphicfilter/icgm/elements.cxx b/filter/source/graphicfilter/icgm/elements.cxx
index fc85f2870ac3..2be1308355aa 100644
--- a/filter/source/graphicfilter/icgm/elements.cxx
+++ b/filter/source/graphicfilter/icgm/elements.cxx
@@ -341,7 +341,7 @@ Bundle* CGMElements::GetBundle( BundleList& rList, long nIndex )
return rList[ i ];
}
}
- return NULL;
+ return nullptr;
}
diff --git a/filter/source/graphicfilter/icgm/outact.cxx b/filter/source/graphicfilter/icgm/outact.cxx
index c731fbb40815..028ed60463a4 100644
--- a/filter/source/graphicfilter/icgm/outact.cxx
+++ b/filter/source/graphicfilter/icgm/outact.cxx
@@ -33,7 +33,7 @@ CGMOutAct::CGMOutAct( CGM& rCGM )
mpFlags = new sal_uInt8[ 0x2000 ];
mnIndex = 0;
- mpGradient = NULL;
+ mpGradient = nullptr;
}
CGMOutAct::~CGMOutAct()
diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.cxx b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
index 7ca557a00893..d8fbfdb83371 100644
--- a/filter/source/graphicfilter/idxf/dxf2mtf.cxx
+++ b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
@@ -33,7 +33,7 @@ sal_uLong DXF2GDIMetaFile::CountEntities(const DXFEntities & rEntities)
sal_uLong nRes;
nRes=0;
- for (pBE=rEntities.pFirst; pBE!=NULL; pBE=pBE->pSucc) nRes++;
+ for (pBE=rEntities.pFirst; pBE!=nullptr; pBE=pBE->pSucc) nRes++;
return nRes;
}
@@ -56,7 +56,7 @@ long DXF2GDIMetaFile::GetEntityColor(const DXFBasicEntity & rE)
nColor=nParentLayerColor;
} else {
pLayer=pDXF->aTables.SearchLayer(rE.m_sLayer);
- if (pLayer!=NULL) nColor=pLayer->nColor;
+ if (pLayer!=nullptr) nColor=pLayer->nColor;
else nColor=nParentLayerColor;
}
}
@@ -70,7 +70,7 @@ DXFLineInfo DXF2GDIMetaFile::LTypeToDXFLineInfo(OString const& rLineType)
DXFLineInfo aDXFLineInfo;
pLT = pDXF->aTables.SearchLType(rLineType);
- if (pLT==NULL || pLT->nDashCount == 0) {
+ if (pLT==nullptr || pLT->nDashCount == 0) {
aDXFLineInfo.eStyle = LINE_SOLID;
}
else {
@@ -129,7 +129,7 @@ DXFLineInfo DXF2GDIMetaFile::GetEntityDXFLineInfo(const DXFBasicEntity & rE)
aDXFLineInfo=aParentLayerDXFLineInfo;
} else {
const DXFLayer * pLayer=pDXF->aTables.SearchLayer(rE.m_sLayer);
- if (pLayer!=NULL) {
+ if (pLayer!=nullptr) {
aDXFLineInfo = LTypeToDXFLineInfo(pLayer->m_sLineType);
}
else aDXFLineInfo=aParentLayerDXFLineInfo;
@@ -438,7 +438,7 @@ void DXF2GDIMetaFile::DrawInsertEntity(const DXFInsertEntity & rE, const DXFTran
{
const DXFBlock * pB;
pB=pDXF->aBlocks.Search(rE.m_sName);
- if (pB!=NULL) {
+ if (pB!=nullptr) {
DXFTransform aDXFTransform1(1.0,1.0,1.0,DXFVector(0.0,0.0,0.0)-pB->aBasePoint);
DXFTransform aDXFTransform2(rE.fXScale,rE.fYScale,rE.fZScale,rE.fRotAngle,rE.aP0);
DXFTransform aT(
@@ -455,7 +455,7 @@ void DXF2GDIMetaFile::DrawInsertEntity(const DXFInsertEntity & rE, const DXFTran
aBlockDXFLineInfo=GetEntityDXFLineInfo(rE);
if (rE.m_sLayer.getLength() > 1) {
DXFLayer * pLayer=pDXF->aTables.SearchLayer(rE.m_sLayer);
- if (pLayer!=NULL) {
+ if (pLayer!=nullptr) {
nParentLayerColor=pLayer->nColor;
aParentLayerDXFLineInfo = LTypeToDXFLineInfo(pLayer->m_sLineType);
}
@@ -501,7 +501,7 @@ void DXF2GDIMetaFile::DrawPolyLineEntity(const DXFPolyLineEntity & rE, const DXF
nPolySize=0;
pBE=rE.pSucc;
- while (pBE!=NULL && pBE->eType==DXF_VERTEX) {
+ while (pBE!=nullptr && pBE->eType==DXF_VERTEX) {
nPolySize++;
pBE=pBE->pSucc;
}
@@ -648,7 +648,7 @@ void DXF2GDIMetaFile::DrawDimensionEntity(const DXFDimensionEntity & rE, const D
{
const DXFBlock * pB;
pB=pDXF->aBlocks.Search(rE.m_sPseudoBlock);
- if (pB!=NULL) {
+ if (pB!=nullptr) {
DXFTransform aT(
DXFTransform(1.0,1.0,1.0,DXFVector(0.0,0.0,0.0)-pB->aBasePoint),
rTransform
@@ -663,7 +663,7 @@ void DXF2GDIMetaFile::DrawDimensionEntity(const DXFDimensionEntity & rE, const D
aBlockDXFLineInfo=GetEntityDXFLineInfo(rE);
if (rE.m_sLayer.getLength() > 1) {
DXFLayer * pLayer=pDXF->aTables.SearchLayer(rE.m_sLayer);
- if (pLayer!=NULL) {
+ if (pLayer!=nullptr) {
nParentLayerColor=pLayer->nColor;
aParentLayerDXFLineInfo = LTypeToDXFLineInfo(pLayer->m_sLineType);
}
@@ -686,7 +686,7 @@ void DXF2GDIMetaFile::DrawEntities(const DXFEntities & rEntities,
const DXFBasicEntity * pE=rEntities.pFirst;
- while (pE!=NULL && bStatus) {
+ while (pE!=nullptr && bStatus) {
if (pE->nSpace==0) {
if (pE->aExtrusion.fz==1.0) {
pT=&rTransform;
@@ -749,8 +749,8 @@ void DXF2GDIMetaFile::DrawEntities(const DXFEntities & rEntities,
DXF2GDIMetaFile::DXF2GDIMetaFile()
- : pVirDev(NULL)
- , pDXF(NULL)
+ : pVirDev(nullptr)
+ , pDXF(nullptr)
, bStatus(false)
, OptPointsPerCircle(0)
, nMinPercent(0)
@@ -797,7 +797,7 @@ bool DXF2GDIMetaFile::Convert(const DXFRepresentation & rDXF, GDIMetaFile & rMTF
aBlockDXFLineInfo.fDistance = 0;
pLayer=pDXF->aTables.SearchLayer("0");
- if (pLayer!=NULL) {
+ if (pLayer!=nullptr) {
nParentLayerColor=pLayer->nColor & 0xff;
aParentLayerDXFLineInfo = LTypeToDXFLineInfo(pLayer->m_sLineType);
}
@@ -820,12 +820,12 @@ bool DXF2GDIMetaFile::Convert(const DXFRepresentation & rDXF, GDIMetaFile & rMTF
aActFont = pVirDev->GetFont();
pVPort=pDXF->aTables.SearchVPort("*ACTIVE");
- if (pVPort!=NULL) {
+ if (pVPort!=nullptr) {
if (pVPort->aDirection.fx==0 && pVPort->aDirection.fy==0)
- pVPort=NULL;
+ pVPort=nullptr;
}
- if (pVPort==NULL) {
+ if (pVPort==nullptr) {
if (pDXF->aBoundingBox.bEmpty)
bStatus=false;
else {
diff --git a/filter/source/graphicfilter/idxf/dxfblkrd.cxx b/filter/source/graphicfilter/idxf/dxfblkrd.cxx
index 00f8e4f4fee5..d16428f3e850 100644
--- a/filter/source/graphicfilter/idxf/dxfblkrd.cxx
+++ b/filter/source/graphicfilter/idxf/dxfblkrd.cxx
@@ -28,7 +28,7 @@
DXFBlock::DXFBlock()
- : pSucc(NULL)
+ : pSucc(nullptr)
, nFlags(0)
{
}
@@ -73,7 +73,7 @@ void DXFBlock::Read(DXFGroupReader & rDGR)
DXFBlocks::DXFBlocks()
{
- pFirst=NULL;
+ pFirst=nullptr;
}
@@ -88,7 +88,7 @@ void DXFBlocks::Read(DXFGroupReader & rDGR)
DXFBlock * pB, * * ppSucc;
ppSucc=&pFirst;
- while (*ppSucc!=NULL) ppSucc=&((*ppSucc)->pSucc);
+ while (*ppSucc!=nullptr) ppSucc=&((*ppSucc)->pSucc);
for (;;) {
while (rDGR.GetG()!=0) rDGR.Read();
@@ -108,7 +108,7 @@ void DXFBlocks::Read(DXFGroupReader & rDGR)
DXFBlock * DXFBlocks::Search(OString const& rName) const
{
DXFBlock * pB;
- for (pB=pFirst; pB!=NULL; pB=pB->pSucc) {
+ for (pB=pFirst; pB!=nullptr; pB=pB->pSucc) {
if (rName == pB->m_sName) break;
}
return pB;
@@ -119,7 +119,7 @@ void DXFBlocks::Clear()
{
DXFBlock * ptmp;
- while (pFirst!=NULL) {
+ while (pFirst!=nullptr) {
ptmp=pFirst;
pFirst=ptmp->pSucc;
delete ptmp;
diff --git a/filter/source/graphicfilter/idxf/dxfentrd.cxx b/filter/source/graphicfilter/idxf/dxfentrd.cxx
index 0291d5be8f85..755b9df2bc78 100644
--- a/filter/source/graphicfilter/idxf/dxfentrd.cxx
+++ b/filter/source/graphicfilter/idxf/dxfentrd.cxx
@@ -28,7 +28,7 @@ DXFBasicEntity::DXFBasicEntity(DXFEntityType eThisType)
, m_sLineType("BYLAYER")
{
eType=eThisType;
- pSucc=NULL;
+ pSucc=nullptr;
fElevation=0;
fThickness=0;
nColor=256;
@@ -411,7 +411,7 @@ DXFLWPolyLineEntity::DXFLWPolyLineEntity() :
fConstantWidth( 0.0 ),
fStartWidth( 0.0 ),
fEndWidth( 0.0 ),
- pP( NULL )
+ pP( nullptr )
{
}
@@ -571,7 +571,7 @@ DXFBoundaryPathData::DXFBoundaryPathData() :
nEdgeCount( 0 ),
bIsPolyLine( true ),
nPointIndex( 0 ),
- pP( NULL )
+ pP( nullptr )
{
}
@@ -662,7 +662,7 @@ DXFHatchEntity::DXFHatchEntity() :
nHatchPatternDefinitionLines( 0 ),
fPixelSize( 1.0 ),
nNumberOfSeedPoints( 0 ),
- pBoundaryPathData( NULL )
+ pBoundaryPathData( nullptr )
{
}
@@ -803,7 +803,7 @@ void DXFEntities::Read(DXFGroupReader & rDGR)
DXFBasicEntity * pE, * * ppSucc;
ppSucc=&pFirst;
- while (*ppSucc!=NULL) ppSucc=&((*ppSucc)->pSucc);
+ while (*ppSucc!=nullptr) ppSucc=&((*ppSucc)->pSucc);
while (rDGR.GetG()!=0) rDGR.Read();
@@ -847,7 +847,7 @@ void DXFEntities::Clear()
{
DXFBasicEntity * ptmp;
- while (pFirst!=NULL) {
+ while (pFirst!=nullptr) {
ptmp=pFirst;
pFirst=ptmp->pSucc;
delete ptmp;
diff --git a/filter/source/graphicfilter/idxf/dxfentrd.hxx b/filter/source/graphicfilter/idxf/dxfentrd.hxx
index 603d43fd4356..638f3ad12ee9 100644
--- a/filter/source/graphicfilter/idxf/dxfentrd.hxx
+++ b/filter/source/graphicfilter/idxf/dxfentrd.hxx
@@ -528,7 +528,7 @@ public:
inline DXFEntities::DXFEntities()
{
- pFirst=NULL;
+ pFirst=nullptr;
}
diff --git a/filter/source/graphicfilter/idxf/dxfreprd.cxx b/filter/source/graphicfilter/idxf/dxfreprd.cxx
index c276e58e8766..6c1993e91997 100644
--- a/filter/source/graphicfilter/idxf/dxfreprd.cxx
+++ b/filter/source/graphicfilter/idxf/dxfreprd.cxx
@@ -244,7 +244,7 @@ void DXFRepresentation::CalcBoundingBox(const DXFEntities & rEntities,
DXFBoundingBox & rBox)
{
DXFBasicEntity * pBE=rEntities.pFirst;
- while (pBE!=NULL) {
+ while (pBE!=nullptr) {
switch (pBE->eType) {
case DXF_LINE: {
const DXFLineEntity * pE = static_cast<const DXFLineEntity*>(pBE);
@@ -315,7 +315,7 @@ void DXFRepresentation::CalcBoundingBox(const DXFEntities & rEntities,
DXFBoundingBox aBox;
DXFVector aP;
pB=aBlocks.Search(pE->m_sName);
- if (pB==NULL) break;
+ if (pB==nullptr) break;
CalcBoundingBox(*pB,aBox);
if (aBox.bEmpty) break;
aP.fx=(aBox.fMinX-pB->aBasePoint.fx)*pE->fXScale+pE->aP0.fx;
@@ -357,7 +357,7 @@ void DXFRepresentation::CalcBoundingBox(const DXFEntities & rEntities,
DXFBoundingBox aBox;
DXFVector aP;
pB = aBlocks.Search(pE->m_sPseudoBlock);
- if (pB==NULL) break;
+ if (pB==nullptr) break;
CalcBoundingBox(*pB,aBox);
if (aBox.bEmpty) break;
aP.fx=aBox.fMinX-pB->aBasePoint.fx;
diff --git a/filter/source/graphicfilter/idxf/dxftblrd.cxx b/filter/source/graphicfilter/idxf/dxftblrd.cxx
index 26d96dd3a653..1d2f8b483428 100644
--- a/filter/source/graphicfilter/idxf/dxftblrd.cxx
+++ b/filter/source/graphicfilter/idxf/dxftblrd.cxx
@@ -24,7 +24,7 @@
//----------------------------------DXFLType-----------------------------------
DXFLType::DXFLType()
- : pSucc(NULL)
+ : pSucc(nullptr)
, nFlags(0)
, nDashCount(0)
, fPatternLength(0.0)
@@ -81,7 +81,7 @@ void DXFLType::Read(DXFGroupReader & rDGR)
DXFLayer::DXFLayer()
{
- pSucc=NULL;
+ pSucc=nullptr;
nFlags=0;
nColor=-1;
}
@@ -112,7 +112,7 @@ void DXFLayer::Read(DXFGroupReader & rDGR)
DXFStyle::DXFStyle()
{
- pSucc=NULL;
+ pSucc=nullptr;
nFlags=0;
fHeight=0.0;
fWidthFak=1.0;
@@ -162,7 +162,7 @@ void DXFStyle::Read(DXFGroupReader & rDGR)
DXFVPort::DXFVPort()
{
- pSucc=NULL;
+ pSucc=nullptr;
nFlags=0;
fMinX=0;
@@ -250,10 +250,10 @@ void DXFVPort::Read(DXFGroupReader & rDGR)
DXFTables::DXFTables()
{
- pLTypes=NULL;
- pLayers=NULL;
- pStyles=NULL;
- pVPorts=NULL;
+ pLTypes=nullptr;
+ pLayers=nullptr;
+ pStyles=nullptr;
+ pVPorts=nullptr;
}
@@ -271,16 +271,16 @@ void DXFTables::Read(DXFGroupReader & rDGR)
DXFVPort * * ppVP, * pVP;
ppLT=&pLTypes;
- while(*ppLT!=NULL) ppLT=&((*ppLT)->pSucc);
+ while(*ppLT!=nullptr) ppLT=&((*ppLT)->pSucc);
ppLa=&pLayers;
- while(*ppLa!=NULL) ppLa=&((*ppLa)->pSucc);
+ while(*ppLa!=nullptr) ppLa=&((*ppLa)->pSucc);
ppSt=&pStyles;
- while(*ppSt!=NULL) ppSt=&((*ppSt)->pSucc);
+ while(*ppSt!=nullptr) ppSt=&((*ppSt)->pSucc);
ppVP=&pVPorts;
- while(*ppVP!=NULL) ppVP=&((*ppVP)->pSucc);
+ while(*ppVP!=nullptr) ppVP=&((*ppVP)->pSucc);
for (;;) {
while (rDGR.GetG()!=0) rDGR.Read();
@@ -322,22 +322,22 @@ void DXFTables::Clear()
DXFStyle * pSt;
DXFVPort * pVP;
- while (pStyles!=NULL) {
+ while (pStyles!=nullptr) {
pSt=pStyles;
pStyles=pSt->pSucc;
delete pSt;
}
- while (pLayers!=NULL) {
+ while (pLayers!=nullptr) {
pLa=pLayers;
pLayers=pLa->pSucc;
delete pLa;
}
- while (pLTypes!=NULL) {
+ while (pLTypes!=nullptr) {
pLT=pLTypes;
pLTypes=pLT->pSucc;
delete pLT;
}
- while (pVPorts!=NULL) {
+ while (pVPorts!=nullptr) {
pVP=pVPorts;
pVPorts=pVP->pSucc;
delete pVP;
@@ -348,7 +348,7 @@ void DXFTables::Clear()
DXFLType * DXFTables::SearchLType(OString const& rName) const
{
DXFLType * p;
- for (p=pLTypes; p!=NULL; p=p->pSucc) {
+ for (p=pLTypes; p!=nullptr; p=p->pSucc) {
if (rName == p->m_sName) break;
}
return p;
@@ -358,7 +358,7 @@ DXFLType * DXFTables::SearchLType(OString const& rName) const
DXFLayer * DXFTables::SearchLayer(OString const& rName) const
{
DXFLayer * p;
- for (p=pLayers; p!=NULL; p=p->pSucc) {
+ for (p=pLayers; p!=nullptr; p=p->pSucc) {
if (rName == p->m_sName) break;
}
return p;
@@ -368,7 +368,7 @@ DXFLayer * DXFTables::SearchLayer(OString const& rName) const
DXFVPort * DXFTables::SearchVPort(OString const& rName) const
{
DXFVPort * p;
- for (p=pVPorts; p!=NULL; p=p->pSucc) {
+ for (p=pVPorts; p!=nullptr; p=p->pSucc) {
if (rName == p->m_sName) break;
}
return p;
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index 67554054531e..714720bf6385 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -65,7 +65,7 @@ static sal_uInt8* ImplSearchEntry( sal_uInt8* pSource, sal_uInt8 const * pDest,
return pSource;
pSource++;
}
- return NULL;
+ return nullptr;
}
@@ -181,7 +181,7 @@ static oslProcessError runProcessWithPathSearch(const OUString &rProgName,
#else
result = osl_executeProcess_WithRedirectedIO(rProgName.pData,
pArgs, nArgs, osl_Process_SEARCHPATH | osl_Process_HIDDEN,
- pSecurity, 0, 0, 0, pProcess, pIn, pOut, pErr);
+ pSecurity, nullptr, nullptr, 0, pProcess, pIn, pOut, pErr);
#endif
osl_freeSecurityHandle( pSecurity );
return result;
@@ -227,9 +227,9 @@ static bool RenderAsEMF(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &r
arg1.pData, arg2.pData, arg3.pData, input.pData, output.pData
};
oslProcess aProcess;
- oslFileHandle pIn = NULL;
- oslFileHandle pOut = NULL;
- oslFileHandle pErr = NULL;
+ oslFileHandle pIn = nullptr;
+ oslFileHandle pOut = nullptr;
+ oslFileHandle pErr = nullptr;
oslProcessError eErr = runProcessWithPathSearch(
"pstoedit" EXESUFFIX,
args, sizeof(args)/sizeof(rtl_uString *),
@@ -295,9 +295,9 @@ static bool RenderAsBMPThroughHelper(const sal_uInt8* pBuf, sal_uInt32 nBytesRea
Graphic &rGraphic, const OUString &rProgName, rtl_uString *pArgs[], size_t nArgs)
{
oslProcess aProcess;
- oslFileHandle pIn = NULL;
- oslFileHandle pOut = NULL;
- oslFileHandle pErr = NULL;
+ oslFileHandle pIn = nullptr;
+ oslFileHandle pOut = nullptr;
+ oslFileHandle pErr = nullptr;
oslProcessError eErr = runProcessWithPathSearch(rProgName,
pArgs, nArgs,
&aProcess, &pIn, &pOut, &pErr);
@@ -435,7 +435,7 @@ void CreateMtfReplacementAction( GDIMetaFile& rMtf, SvStream& rStrm, sal_uInt32
rMtf.AddAction( static_cast<MetaAction*>( new MetaCommentAction( aComment, 0, static_cast<const sal_uInt8*>(aReplacement.GetData()), aReplacement.Tell() ) ) );
}
else
- rMtf.AddAction( static_cast<MetaAction*>( new MetaCommentAction( aComment, 0, NULL, 0 ) ) );
+ rMtf.AddAction( static_cast<MetaAction*>( new MetaCommentAction( aComment, 0, nullptr, 0 ) ) );
}
//there is no preview -> make a red box
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
index 92bfb4684ead..9ec66e92268c 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -307,7 +307,7 @@ struct OSAttr
// //... aViewWindow;
OSAttr()
- : pSucc(NULL)
+ : pSucc(nullptr)
, nPushOrder(0)
, nIvAttrA(0)
, nIvAttrP(0)
@@ -433,24 +433,24 @@ public:
OS2METReader::OS2METReader()
: ErrorCode(0)
- , pOS2MET(NULL)
- , pVirDev(NULL)
+ , pOS2MET(nullptr)
+ , pVirDev(nullptr)
, nOrigPos(0)
, aBoundingRect()
, aCalcBndRect()
, aGlobMapMode()
, bCoord32(false)
- , pPaletteStack(NULL)
+ , pPaletteStack(nullptr)
, aLineInfo()
- , pAreaStack(NULL)
- , pPathStack(NULL)
- , pPathList(NULL)
- , pFontList(NULL)
- , pBitmapList(NULL)
+ , pAreaStack(nullptr)
+ , pPathStack(nullptr)
+ , pPathList(nullptr)
+ , pFontList(nullptr)
+ , pBitmapList(nullptr)
, aDefAttr()
, aAttr()
- , pAttrStack(NULL)
- , pOrdFile(NULL)
+ , pAttrStack(nullptr)
+ , pOrdFile(nullptr)
{
}
@@ -504,7 +504,7 @@ void OS2METReader::AddPointsToArea(const tools::Polygon & rPoly)
{
sal_uInt16 nOldSize, nNewSize,i;
- if (pAreaStack==NULL || rPoly.GetSize()==0) return;
+ if (pAreaStack==nullptr || rPoly.GetSize()==0) return;
tools::PolyPolygon * pPP=&(pAreaStack->aPPoly);
if (pPP->Count()==0 || pAreaStack->bClosed) pPP->Insert(rPoly);
else {
@@ -525,7 +525,7 @@ void OS2METReader::AddPointsToPath(const tools::Polygon & rPoly)
{
sal_uInt16 nOldSize, nNewSize,i;
- if (pPathStack==NULL || rPoly.GetSize()==0) return;
+ if (pPathStack==nullptr || rPoly.GetSize()==0) return;
tools::PolyPolygon * pPP=&(pPathStack->aPPoly);
if (pPP->Count()==0 /*|| pPathStack->bClosed==sal_True*/) pPP->Insert(rPoly);
else {
@@ -547,8 +547,8 @@ void OS2METReader::AddPointsToPath(const tools::Polygon & rPoly)
void OS2METReader::CloseFigure()
{
- if (pAreaStack!=NULL) pAreaStack->bClosed=true;
- else if (pPathStack!=NULL) pPathStack->bClosed=true;
+ if (pAreaStack!=nullptr) pAreaStack->bClosed=true;
+ else if (pPathStack!=nullptr) pPathStack->bClosed=true;
}
void OS2METReader::PushAttr(sal_uInt16 nPushOrder)
@@ -564,7 +564,7 @@ void OS2METReader::PopAttr()
{
OSAttr * p=pAttrStack;
- if (p==NULL) return;
+ if (p==nullptr) return;
switch (p->nPushOrder) {
case GOrdPIvAtr:
@@ -725,16 +725,16 @@ void OS2METReader::SetRasterOp(RasterOp eROP)
void OS2METReader::SetPalette0RGB(sal_uInt16 nIndex, sal_uLong nCol)
{
- if (pPaletteStack==NULL) {
+ if (pPaletteStack==nullptr) {
pPaletteStack=new OSPalette;
- pPaletteStack->pSucc=NULL;
- pPaletteStack->p0RGB=NULL;
+ pPaletteStack->pSucc=nullptr;
+ pPaletteStack->p0RGB=nullptr;
pPaletteStack->nSize=0;
}
- if (pPaletteStack->p0RGB==NULL || nIndex>=pPaletteStack->nSize) {
+ if (pPaletteStack->p0RGB==nullptr || nIndex>=pPaletteStack->nSize) {
sal_uInt32 * pOld0RGB=pPaletteStack->p0RGB;
size_t nOldSize = pPaletteStack->nSize;
- if (pOld0RGB==NULL) nOldSize=0;
+ if (pOld0RGB==nullptr) nOldSize=0;
pPaletteStack->nSize=2*(nIndex+1);
if (pPaletteStack->nSize<256) pPaletteStack->nSize=256;
pPaletteStack->p0RGB = new sal_uInt32[pPaletteStack->nSize];
@@ -751,7 +751,7 @@ void OS2METReader::SetPalette0RGB(sal_uInt16 nIndex, sal_uLong nCol)
sal_uInt32 OS2METReader::GetPalette0RGB(sal_uInt32 nIndex)
{
- if (pPaletteStack!=NULL && pPaletteStack->p0RGB!=NULL &&
+ if (pPaletteStack!=nullptr && pPaletteStack->p0RGB!=nullptr &&
pPaletteStack->nSize>nIndex) nIndex=pPaletteStack->p0RGB[nIndex];
return nIndex;
}
@@ -834,8 +834,8 @@ void OS2METReader::ReadLine(bool bGivenPos, sal_uInt16 nOrderLen)
else aPolygon.SetPoint(ReadPoint(),i);
}
aAttr.aCurPos=aPolygon.GetPoint(nPolySize-1);
- if (pAreaStack!=NULL) AddPointsToArea(aPolygon);
- else if (pPathStack!=NULL) AddPointsToPath(aPolygon);
+ if (pAreaStack!=nullptr) AddPointsToArea(aPolygon);
+ else if (pPathStack!=nullptr) AddPointsToPath(aPolygon);
else
{
SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle );
@@ -872,8 +872,8 @@ void OS2METReader::ReadRelLine(bool bGivenPos, sal_uInt16 nOrderLen)
aPolygon.SetPoint(aP0,i);
}
aAttr.aCurPos=aPolygon.GetPoint(nPolySize-1);
- if (pAreaStack!=NULL) AddPointsToArea(aPolygon);
- else if (pPathStack!=NULL) AddPointsToPath(aPolygon);
+ if (pAreaStack!=nullptr) AddPointsToArea(aPolygon);
+ else if (pPathStack!=nullptr) AddPointsToPath(aPolygon);
else
{
SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle );
@@ -958,8 +958,8 @@ void OS2METReader::ReadBitBlt()
aSize=Size(aP2.X()-aP1.X(),aP2.Y()-aP1.Y());
pB=pBitmapList;
- while (pB!=NULL && pB->nID!=nID) pB=pB->pSucc;
- if (pB!=NULL) {
+ while (pB!=nullptr && pB->nID!=nID) pB=pB->pSucc;
+ if (pB!=nullptr) {
SetRasterOp(aAttr.ePatMix);
pVirDev->DrawBitmap(aP1,aSize,pB->aBitmap);
}
@@ -974,8 +974,8 @@ void OS2METReader::ReadChrStr(bool bGivenPos, bool bMove, bool bExtra, sal_uInt1
Size aSize;
pF = pFontList;
- while (pF!=NULL && pF->nID!=aAttr.nChrSet) pF=pF->pSucc;
- if (pF!=NULL)
+ while (pF!=nullptr && pF->nID!=aAttr.nChrSet) pF=pF->pSucc;
+ if (pF!=nullptr)
aFont = pF->aFont;
aFont.SetColor(aAttr.aChrCol);
aFont.SetSize(Size(0,aAttr.aChrCellSize.Height()));
@@ -1003,7 +1003,7 @@ void OS2METReader::ReadChrStr(bool bGivenPos, bool bMove, bool bExtra, sal_uInt1
nLen = nOrderLen-4;
}
if (nLen > pOS2MET->remainingSize())
- throw css::uno::Exception("attempt to read past end of input", 0);
+ throw css::uno::Exception("attempt to read past end of input", nullptr);
std::unique_ptr<char[]> pChr(new char[nLen+1]);
for (i=0; i<nLen; i++)
pOS2MET->ReadChar( pChr[i] );
@@ -1109,7 +1109,7 @@ void OS2METReader::ReadFullArc(bool bGivenPos, sal_uInt16 nOrderSize)
aCenter.X()+nP,aCenter.Y()+nQ);
aCalcBndRect.Union(aRect);
- if (pAreaStack!=NULL) {
+ if (pAreaStack!=nullptr) {
ChangeBrush(aAttr.aPatCol,aAttr.aPatBgCol,aAttr.bFill);
SetRasterOp(aAttr.ePatMix);
if ((pAreaStack->nFlags&0x40)!=0)
@@ -1269,9 +1269,9 @@ void OS2METReader::ReadBezier(bool bGivenPos, sal_uInt16 nOrderLen)
aAttr.aCurPos = aPolygon[ nNumPoints - 1 ];
- if (pAreaStack!=NULL)
+ if (pAreaStack!=nullptr)
AddPointsToArea(aPolygon);
- else if (pPathStack!=NULL)
+ else if (pPathStack!=nullptr)
AddPointsToPath(aPolygon);
else
{
@@ -1294,8 +1294,8 @@ void OS2METReader::ReadFillet(bool bGivenPos, sal_uInt16 nOrderLen)
else aPolygon.SetPoint(ReadPoint(),i);
}
aAttr.aCurPos=aPolygon.GetPoint(nNumPoints-1);
- if (pAreaStack!=NULL) AddPointsToArea(aPolygon);
- else if (pPathStack!=NULL) AddPointsToPath(aPolygon);
+ if (pAreaStack!=nullptr) AddPointsToArea(aPolygon);
+ else if (pPathStack!=nullptr) AddPointsToPath(aPolygon);
else {
SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle );
SetRasterOp(aAttr.eLinMix);
@@ -1317,8 +1317,8 @@ void OS2METReader::ReadFilletSharp(bool bGivenPos, sal_uInt16 nOrderLen)
aPolygon.SetPoint(aAttr.aCurPos,0);
for (i=1; i<nNumPoints; i++) aPolygon.SetPoint(ReadPoint(),i);
aAttr.aCurPos=aPolygon.GetPoint(nNumPoints-1);
- if (pAreaStack!=NULL) AddPointsToArea(aPolygon);
- else if (pPathStack!=NULL) AddPointsToPath(aPolygon);
+ if (pAreaStack!=nullptr) AddPointsToArea(aPolygon);
+ else if (pPathStack!=nullptr) AddPointsToPath(aPolygon);
else
{
SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle );
@@ -1535,12 +1535,12 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
}
case GOrdEndPth: {
OSPath * p, * pprev, * psucc;
- if (pPathStack==NULL) break;
- p=pPathList; pprev=NULL;
- while (p!=NULL) {
+ if (pPathStack==nullptr) break;
+ p=pPathList; pprev=nullptr;
+ while (p!=nullptr) {
psucc=p->pSucc;
if (p->nID==pPathStack->nID) {
- if (pprev==NULL) pPathList=psucc; else pprev->pSucc=psucc;
+ if (pprev==nullptr) pPathList=psucc; else pprev->pSucc=psucc;
delete p;
}
else pprev=p;
@@ -1611,10 +1611,10 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
OSPath* p=pPathList;
pOS2MET->SeekRel(2);
pOS2MET->ReadUInt32( nID );
- while (p!=NULL && p->nID!=nID)
+ while (p!=nullptr && p->nID!=nID)
p=p->pSucc;
- if( p!=NULL )
+ if( p!=nullptr )
{
SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle );
SetRasterOp(aAttr.eLinMix);
@@ -1635,9 +1635,9 @@ void OS2METReader::ReadOrder(sal_uInt16 nOrderID, sal_uInt16 nOrderLen)
OSPath * p=pPathList;
pOS2MET->SeekRel(2);
pOS2MET->ReadUInt32( nID );
- if (nID==0) p=NULL;
- while (p!=NULL && p->nID!=nID) p=p->pSucc;
- if (p!=NULL) pVirDev->SetClipRegion(vcl::Region(p->aPPoly));
+ if (nID==0) p=nullptr;
+ while (p!=nullptr && p->nID!=nID) p=p->pSucc;
+ if (p!=nullptr) pVirDev->SetClipRegion(vcl::Region(p->aPPoly));
else pVirDev->SetClipRegion();
break;
}
@@ -2170,7 +2170,7 @@ void OS2METReader::ReadDsc(sal_uInt16 nDscID, sal_uInt16 /*nDscLen*/)
void OS2METReader::ReadImageData(sal_uInt16 nDataID, sal_uInt16 nDataLen)
{
- OSBitmap * p=pBitmapList; if (p==NULL) return;
+ OSBitmap * p=pBitmapList; if (p==nullptr) return;
switch (nDataID) {
@@ -2204,7 +2204,7 @@ void OS2METReader::ReadImageData(sal_uInt16 nDataID, sal_uInt16 nDataLen)
case 0xfe92: { // Image Data
// At the latest we now need the temporary BMP file and
// inside this file we need the header and the palette.
- if (p->pBMP==NULL) {
+ if (p->pBMP==nullptr) {
p->pBMP=new SvMemoryStream();
p->pBMP->SetEndian(SvStreamEndian::LITTLE);
if (p->nWidth==0 || p->nHeight==0 || p->nBitsPerPixel==0) {
@@ -2393,7 +2393,7 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize)
// create new bitmap by now: (will be filled later)
OSBitmap * pB=new OSBitmap;
pB->pSucc=pBitmapList; pBitmapList=pB;
- pB->pBMP=NULL; pB->nWidth=0; pB->nHeight=0; pB->nBitsPerPixel=0;
+ pB->pBMP=nullptr; pB->nWidth=0; pB->nHeight=0; pB->nBitsPerPixel=0;
pB->nMapPos=0;
// determine ID of the bitmap:
sal_uInt8 i,nbyte,nbyte2;
@@ -2406,12 +2406,12 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize)
// put new palette on the palette stack: (will be filled later)
OSPalette * pP=new OSPalette;
pP->pSucc=pPaletteStack; pPaletteStack=pP;
- pP->p0RGB=NULL; pP->nSize=0;
+ pP->p0RGB=nullptr; pP->nSize=0;
break;
}
case EndImgObjMagic: {
// read temporary Windows BMP file:
- if (pBitmapList==NULL || pBitmapList->pBMP==NULL ||
+ if (pBitmapList==nullptr || pBitmapList->pBMP==nullptr ||
pBitmapList->pBMP->GetError()!=0) {
pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
ErrorCode=5;
@@ -2425,12 +2425,12 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize)
pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
ErrorCode=6;
}
- delete pBitmapList->pBMP; pBitmapList->pBMP=NULL;
+ delete pBitmapList->pBMP; pBitmapList->pBMP=nullptr;
// kill palette from stack:
OSPalette * pP=pPaletteStack;
- if (pP!=NULL) {
+ if (pP!=nullptr) {
pPaletteStack=pP->pSucc;
- if (pP->p0RGB!=NULL) delete[] pP->p0RGB;
+ if (pP->p0RGB!=nullptr) delete[] pP->p0RGB;
delete pP;
}
break;
@@ -2475,7 +2475,7 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize)
sal_uInt16 nOrderID, nOrderLen;
sal_uInt8 nbyte;
- if (pOrdFile==NULL) break;
+ if (pOrdFile==nullptr) break;
// In pOrdFile all "DatGrfObj" fields were collected so that the
// therein contained "Orders" are continuous and not segmented by fields.
@@ -2530,7 +2530,7 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize)
pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
ErrorCode=10;
}
- delete pOrdFile; pOrdFile=NULL;
+ delete pOrdFile; pOrdFile=nullptr;
break;
}
case DscGrfObjMagic: {
@@ -2549,7 +2549,7 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize)
break;
}
case DatGrfObjMagic: {
- if (pOrdFile==NULL) {
+ if (pOrdFile==nullptr) {
pOrdFile = new SvMemoryStream;
pOrdFile->SetEndian(SvStreamEndian::LITTLE);
}
@@ -2578,13 +2578,13 @@ void OS2METReader::ReadOS2MET( SvStream & rStreamOS2MET, GDIMetaFile & rGDIMetaF
SvStreamEndian nOrigNumberFormat = pOS2MET->GetEndian();
bCoord32 = true;
- pPaletteStack=NULL;
- pAreaStack=NULL;
- pPathStack=NULL;
- pPathList=NULL;
- pFontList=NULL;
- pBitmapList=NULL;
- pAttrStack=NULL;
+ pPaletteStack=nullptr;
+ pAreaStack=nullptr;
+ pPathStack=nullptr;
+ pPathList=nullptr;
+ pFontList=nullptr;
+ pBitmapList=nullptr;
+ pAttrStack=nullptr;
aDefAttr.aLinCol =Color(COL_BLACK);
aDefAttr.aLinBgCol =Color(COL_WHITE);
@@ -2625,7 +2625,7 @@ void OS2METReader::ReadOS2MET( SvStream & rStreamOS2MET, GDIMetaFile & rGDIMetaF
aAttr=aDefAttr;
- pOrdFile=NULL;
+ pOrdFile=nullptr;
pVirDev = VclPtr<VirtualDevice>::Create();
pVirDev->EnableOutput(false);
@@ -2710,49 +2710,49 @@ void OS2METReader::ReadOS2MET( SvStream & rStreamOS2MET, GDIMetaFile & rGDIMetaF
rGDIMetaFile.SetPrefSize( aCalcBndRect.GetSize() );
}
- if (pOrdFile!=NULL) delete pOrdFile;
+ if (pOrdFile!=nullptr) delete pOrdFile;
- while (pAreaStack!=NULL) {
+ while (pAreaStack!=nullptr) {
OSArea * p=pAreaStack;
pAreaStack=p->pSucc;
delete p;
}
- while (pPathStack!=NULL) {
+ while (pPathStack!=nullptr) {
OSPath * p=pPathStack;
pPathStack=p->pSucc;
delete p;
}
- while (pPathList!=NULL) {
+ while (pPathList!=nullptr) {
OSPath * p=pPathList;
pPathList=p->pSucc;
delete p;
}
- while (pFontList!=NULL) {
+ while (pFontList!=nullptr) {
OSFont * p=pFontList;
pFontList=p->pSucc;
delete p;
}
- while (pBitmapList!=NULL) {
+ while (pBitmapList!=nullptr) {
OSBitmap * p=pBitmapList;
pBitmapList=p->pSucc;
- if (p->pBMP!=NULL) delete p->pBMP;
+ if (p->pBMP!=nullptr) delete p->pBMP;
delete p;
}
- while (pAttrStack!=NULL) {
+ while (pAttrStack!=nullptr) {
OSAttr * p=pAttrStack;
pAttrStack=p->pSucc;
delete p;
}
- while (pPaletteStack!=NULL) {
+ while (pPaletteStack!=nullptr) {
OSPalette * p=pPaletteStack;
pPaletteStack=p->pSucc;
- if (p->p0RGB!=NULL) delete[] p->p0RGB;
+ if (p->p0RGB!=nullptr) delete[] p->p0RGB;
delete p;
}
diff --git a/filter/source/graphicfilter/ipbm/ipbm.cxx b/filter/source/graphicfilter/ipbm/ipbm.cxx
index 17d93bee1ab9..a7f5d1137ffc 100644
--- a/filter/source/graphicfilter/ipbm/ipbm.cxx
+++ b/filter/source/graphicfilter/ipbm/ipbm.cxx
@@ -57,7 +57,7 @@ PBMReader::PBMReader(SvStream & rPBM)
, mbRemark(false)
, mbRaw(true)
, mnMode(0)
- , mpAcc(NULL)
+ , mpAcc(nullptr)
, mnWidth(0)
, mnHeight(0)
, mnCol(0)
@@ -107,7 +107,7 @@ bool PBMReader::ReadPBM(Graphic & rGraphic )
else
maBmp = Bitmap( Size( mnWidth, mnHeight ), 8);
- if ( ( mpAcc = maBmp.AcquireWriteAccess() ) == 0 )
+ if ( ( mpAcc = maBmp.AcquireWriteAccess() ) == nullptr )
return false;
mnCol = (sal_uInt16)mnMaxVal + 1;
if ( mnCol > 256 )
@@ -122,7 +122,7 @@ bool PBMReader::ReadPBM(Graphic & rGraphic )
break;
case 2 :
maBmp = Bitmap( Size( mnWidth, mnHeight ), 24 );
- if ( ( mpAcc = maBmp.AcquireWriteAccess() ) == 0 )
+ if ( ( mpAcc = maBmp.AcquireWriteAccess() ) == nullptr )
return false;
break;
}
@@ -132,7 +132,7 @@ bool PBMReader::ReadPBM(Graphic & rGraphic )
if ( mpAcc )
{
- Bitmap::ReleaseAccess( mpAcc ), mpAcc = NULL;
+ Bitmap::ReleaseAccess( mpAcc ), mpAcc = nullptr;
}
if ( mbStatus )
rGraphic = maBmp;
diff --git a/filter/source/graphicfilter/ipcd/ipcd.cxx b/filter/source/graphicfilter/ipcd/ipcd.cxx
index 1341a42ca9ac..bb8da45282ef 100644
--- a/filter/source/graphicfilter/ipcd/ipcd.cxx
+++ b/filter/source/graphicfilter/ipcd/ipcd.cxx
@@ -80,7 +80,7 @@ public:
: bStatus(false)
, nLastPercent(0)
, m_rPCD(rStream)
- , mpAcc(NULL)
+ , mpAcc(nullptr)
, nOrientation(0)
, eResolution(PCDRES_BASE16)
, nWidth(0)
@@ -156,12 +156,12 @@ bool PCDReader::ReadPCD( Graphic & rGraphic, FilterConfigItem* pConfigItem )
nBMPHeight = nWidth;
}
aBmp = Bitmap( Size( nBMPWidth, nBMPHeight ), 24 );
- if ( ( mpAcc = aBmp.AcquireWriteAccess() ) == 0 )
+ if ( ( mpAcc = aBmp.AcquireWriteAccess() ) == nullptr )
return false;
ReadImage();
- Bitmap::ReleaseAccess( mpAcc ), mpAcc = NULL;
+ Bitmap::ReleaseAccess( mpAcc ), mpAcc = nullptr;
rGraphic = aBmp;
}
return bStatus;
@@ -219,8 +219,8 @@ void PCDReader::ReadImage()
pCbN=static_cast<sal_uInt8*>(rtl_allocateMemory( nW2+1 ));
pCrN=static_cast<sal_uInt8*>(rtl_allocateMemory( nW2+1 ));
- if ( pL0 == NULL || pL1 == NULL || pCb == NULL || pCr == NULL ||
- pL0N == NULL || pL1N == NULL || pCbN == NULL || pCrN == NULL)
+ if ( pL0 == nullptr || pL1 == nullptr || pCb == nullptr || pCr == nullptr ||
+ pL0N == nullptr || pL1N == nullptr || pCbN == nullptr || pCrN == nullptr)
{
rtl_freeMemory(static_cast<void*>(pL0) );
rtl_freeMemory(static_cast<void*>(pL1) );
diff --git a/filter/source/graphicfilter/ipcx/ipcx.cxx b/filter/source/graphicfilter/ipcx/ipcx.cxx
index dd802c714288..33308a028c08 100644
--- a/filter/source/graphicfilter/ipcx/ipcx.cxx
+++ b/filter/source/graphicfilter/ipcx/ipcx.cxx
@@ -100,7 +100,7 @@ bool PCXReader::ReadPCX(Graphic & rGraphic)
{
aBmp = Bitmap( Size( nWidth, nHeight ), nDestBitsPerPixel );
Bitmap::ScopedWriteAccess pAcc(aBmp);
- if ( pAcc == 0 )
+ if ( pAcc == nullptr )
return false;
if ( nDestBitsPerPixel <= 8 )
diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx
index e19042e0c7a5..d682ec6716c1 100644
--- a/filter/source/graphicfilter/ipict/ipict.cxx
+++ b/filter/source/graphicfilter/ipict/ipict.cxx
@@ -242,8 +242,8 @@ private:
public:
PictReader()
- : pPict(NULL)
- , pVirDev(NULL)
+ : pPict(nullptr)
+ , pVirDev(nullptr)
, nOrigPos(0)
, IsVersion2(false)
, eActROP(ROP_OVERPAINT)
@@ -486,7 +486,7 @@ sal_uLong PictReader::ReadPixPattern(PictReader::Pattern &pattern)
pPict->ReadUInt16( nPatType );
if (nPatType==1) {
pattern.read(*pPict);
- nDataSize=ReadPixMapEtc(aBMP,false,true,NULL,NULL,false,false);
+ nDataSize=ReadPixMapEtc(aBMP,false,true,nullptr,nullptr,false,false);
// CHANGEME: use average pixmap colors to update the pattern, ...
if (nDataSize!=0xffffffff) nDataSize+=10;
}
@@ -703,8 +703,8 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, bool bBaseAddr, bool bColo
Rectangle* pDestRect, bool bMode, bool bMaskRgn )
{
Bitmap aBitmap;
- BitmapWriteAccess* pAcc = NULL;
- BitmapReadAccess* pReadAcc = NULL;
+ BitmapWriteAccess* pAcc = nullptr;
+ BitmapReadAccess* pReadAcc = nullptr;
sal_uInt16 nColTabSize;
sal_uInt16 nRowBytes, nBndX, nBndY, nWidth, nHeight, nPackType,
nPixelSize, nCmpCount, nCmpSize;
@@ -746,7 +746,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, bool bBaseAddr, bool bColo
nDstBitCount = 4;
aBitmap = Bitmap( Size( nWidth, nHeight ), nDstBitCount );
- if ( ( pAcc = aBitmap.AcquireWriteAccess() ) == NULL )
+ if ( ( pAcc = aBitmap.AcquireWriteAccess() ) == nullptr )
BITMAPERROR;
if ( bColorTable )
@@ -778,7 +778,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, bool bBaseAddr, bool bColo
nPixelSize = nCmpCount = nCmpSize = 1;
nDataSize += 10;
aBitmap = Bitmap( Size( nWidth, nHeight ), 1 );
- if ( ( pAcc = aBitmap.AcquireWriteAccess() ) == NULL )
+ if ( ( pAcc = aBitmap.AcquireWriteAccess() ) == nullptr )
BITMAPERROR;
pAcc->SetPaletteEntryCount( 2 );
pAcc->SetPaletteColor( 0, BitmapColor( 0xff, 0xff, 0xff ) );
@@ -786,7 +786,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, bool bBaseAddr, bool bColo
}
// conditionally read source rectangle:
- if ( pSrcRect != 0)
+ if ( pSrcRect != nullptr)
{
sal_uInt16 nTop, nLeft, nBottom, nRight;
pPict->ReadUInt16( nTop ).ReadUInt16( nLeft ).ReadUInt16( nBottom ).ReadUInt16( nRight );
@@ -795,7 +795,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, bool bBaseAddr, bool bColo
}
// conditionally read destination rectangle:
- if ( pDestRect != 0 )
+ if ( pDestRect != nullptr )
{
Point aTL, aBR;
aTL = ReadPoint();
@@ -996,7 +996,7 @@ sal_uLong PictReader::ReadPixMapEtc( Bitmap &rBitmap, bool bBaseAddr, bool bColo
size_t nCount;
sal_uLong nSrcBitsPos;
BitmapColor aBitmapColor;
- if ( ( pReadAcc = aBitmap.AcquireReadAccess() ) == NULL )
+ if ( ( pReadAcc = aBitmap.AcquireReadAccess() ) == nullptr )
BITMAPERROR;
if ( nRowBytes != 4*nWidth )
BITMAPERROR;
diff --git a/filter/source/graphicfilter/ipsd/ipsd.cxx b/filter/source/graphicfilter/ipsd/ipsd.cxx
index 1816dea388c0..a8ec8d5e337b 100644
--- a/filter/source/graphicfilter/ipsd/ipsd.cxx
+++ b/filter/source/graphicfilter/ipsd/ipsd.cxx
@@ -86,17 +86,17 @@ public:
PSDReader::PSDReader(SvStream &rStream)
: m_rPSD(rStream)
- , mpFileHeader(NULL)
+ , mpFileHeader(nullptr)
, mnXResFixed(0)
, mnYResFixed(0)
, mbStatus(true)
, mbTransparent(false)
- , mpReadAcc(NULL)
- , mpWriteAcc(NULL)
- , mpMaskWriteAcc(NULL)
+ , mpReadAcc(nullptr)
+ , mpWriteAcc(nullptr)
+ , mpMaskWriteAcc(nullptr)
, mnDestBitDepth(0)
, mbCompression(false)
- , mpPalette(NULL)
+ , mpPalette(nullptr)
{
}
@@ -120,14 +120,14 @@ bool PSDReader::ReadPSD(Graphic & rGraphic )
Size aBitmapSize( mpFileHeader->nColumns, mpFileHeader->nRows );
maBmp = Bitmap( aBitmapSize, mnDestBitDepth );
- if ( ( mpWriteAcc = maBmp.AcquireWriteAccess() ) == NULL )
+ if ( ( mpWriteAcc = maBmp.AcquireWriteAccess() ) == nullptr )
mbStatus = false;
- if ( ( mpReadAcc = maBmp.AcquireReadAccess() ) == NULL )
+ if ( ( mpReadAcc = maBmp.AcquireReadAccess() ) == nullptr )
mbStatus = false;
if ( mbTransparent && mbStatus )
{
maMaskBmp = Bitmap( aBitmapSize, 1 );
- if ( ( mpMaskWriteAcc = maMaskBmp.AcquireWriteAccess() ) == NULL )
+ if ( ( mpMaskWriteAcc = maMaskBmp.AcquireWriteAccess() ) == nullptr )
mbStatus = false;
}
if ( mpPalette && mbStatus )
diff --git a/filter/source/graphicfilter/iras/iras.cxx b/filter/source/graphicfilter/iras/iras.cxx
index df06ad4e4601..814166874585 100644
--- a/filter/source/graphicfilter/iras/iras.cxx
+++ b/filter/source/graphicfilter/iras/iras.cxx
@@ -107,7 +107,7 @@ bool RASReader::ReadRAS(Graphic & rGraphic)
maBmp = Bitmap( Size( mnWidth, mnHeight ), mnDstBitsPerPix );
Bitmap::ScopedWriteAccess pAcc(maBmp);
- if ( pAcc == 0 )
+ if ( pAcc == nullptr )
return false;
if ( mnDstBitsPerPix <= 8 ) // paletten bildchen
diff --git a/filter/source/graphicfilter/itga/itga.cxx b/filter/source/graphicfilter/itga/itga.cxx
index ed7722393201..2a06bd5c6758 100644
--- a/filter/source/graphicfilter/itga/itga.cxx
+++ b/filter/source/graphicfilter/itga/itga.cxx
@@ -109,11 +109,11 @@ public:
TGAReader::TGAReader(SvStream &rTGA)
: m_rTGA(rTGA)
- , mpAcc(NULL)
- , mpFileHeader(NULL)
- , mpFileFooter(NULL)
- , mpExtension(NULL)
- , mpColorMap(NULL)
+ , mpAcc(nullptr)
+ , mpFileHeader(nullptr)
+ , mpFileFooter(nullptr)
+ , mpExtension(nullptr)
+ , mpColorMap(nullptr)
, mbStatus(true)
, mnTGAVersion(1)
, mnDestBitDepth(8)
@@ -161,7 +161,7 @@ bool TGAReader::ReadTGA(Graphic & rGraphic)
mbStatus = false;
if ( mpAcc )
- Bitmap::ReleaseAccess ( mpAcc), mpAcc = NULL;
+ Bitmap::ReleaseAccess ( mpAcc), mpAcc = nullptr;
if ( mbStatus )
rGraphic = aBitmap;
diff --git a/filter/source/graphicfilter/itiff/ccidecom.cxx b/filter/source/graphicfilter/itiff/ccidecom.cxx
index b7f455eeb674..df96e6eb1409 100644
--- a/filter/source/graphicfilter/itiff/ccidecom.cxx
+++ b/filter/source/graphicfilter/itiff/ccidecom.cxx
@@ -569,15 +569,15 @@ const CCIHuffmanTableEntry CCIUncompTableSave[CCIUncompTableSize]={
CCIDecompressor::CCIDecompressor( sal_uLong nOpts, sal_uInt32 nImageWidth ) :
bTableBad ( false ),
bStatus ( false ),
- pByteSwap ( NULL ),
- pIStream ( NULL ),
+ pByteSwap ( nullptr ),
+ pIStream ( nullptr ),
nEOLCount ( 0 ),
nWidth ( nImageWidth ),
nOptions ( nOpts ),
bFirstEOL ( false ),
nInputBitsBuf( 0 ),
nInputBitsBufSize( 0 ),
- pLastLine ( NULL ),
+ pLastLine ( nullptr ),
nLastLineSize( 0 )
{
if ( nOpts & CCI_OPTION_INVERSEBITORDER )
@@ -671,9 +671,9 @@ bool CCIDecompressor::DecompressScanline( sal_uInt8 * pTarget, sal_uLong nTarget
// should the situation arise, generate a white previous line for 2D:
if ( nOptions & CCI_OPTION_2D )
{
- if ( pLastLine == NULL || nLastLineSize != ( ( nTargetBits + 7 ) >> 3 ) )
+ if ( pLastLine == nullptr || nLastLineSize != ( ( nTargetBits + 7 ) >> 3 ) )
{
- if ( pLastLine == NULL )
+ if ( pLastLine == nullptr )
delete[] pLastLine;
nLastLineSize = ( nTargetBits + 7 ) >> 3;
pLastLine = new sal_uInt8[ nLastLineSize ];
diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx
index 49e2d14bdc1b..c33212569b5c 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -126,11 +126,11 @@ public:
TIFFReader()
: bStatus(false)
, nLastPercent(0)
- , pTIFF(NULL)
- , pAcc(NULL)
+ , pTIFF(nullptr)
+ , pAcc(nullptr)
, nDstBitsPerPixel(0)
- , pAlphaMask(NULL)
- , pMaskAcc(NULL)
+ , pAlphaMask(nullptr)
+ , pMaskAcc(nullptr)
, nOrigPos(0)
, nEndOfFile(0)
, nDataType(0)
@@ -146,12 +146,12 @@ public:
, nCellWidth(1)
, nCellLength(1)
, nFillOrder(1)
- , pStripOffsets(NULL)
+ , pStripOffsets(nullptr)
, nNumStripOffsets(0)
, nOrientation(1)
, nSamplesPerPixel(1)
, nRowsPerStrip(0xffffffff)
- , pStripByteCounts(NULL)
+ , pStripByteCounts(nullptr)
, nNumStripByteCounts(0)
, nMinSampleValue(0)
, nMaxSampleValue(0)
@@ -162,13 +162,13 @@ public:
, nGroup4Options(0)
, nResolutionUnit(2)
, nPredictor(0)
- , pColorMap(NULL)
+ , pColorMap(nullptr)
, nNumColors(0)
, nPlanes(0)
, nStripsPerPlane(0)
, nBytesPerRow(0)
{
- pMap[ 0 ] = pMap[ 1 ] = pMap[ 2 ] = pMap[ 3 ] = NULL;
+ pMap[ 0 ] = pMap[ 1 ] = pMap[ 2 ] = pMap[ 3 ] = nullptr;
}
~TIFFReader()
@@ -371,7 +371,7 @@ void TIFFReader::ReadTagData( sal_uInt16 nTagType, sal_uInt32 nDataLen)
case 0x0111: { // Strip Offset(s)
sal_uLong nOldNumSO, i, * pOldSO;
pOldSO = pStripOffsets;
- if ( pOldSO == NULL )
+ if ( pOldSO == nullptr )
nNumStripOffsets = 0;
nOldNumSO = nNumStripOffsets;
nDataLen += nOldNumSO;
@@ -387,7 +387,7 @@ void TIFFReader::ReadTagData( sal_uInt16 nTagType, sal_uInt32 nDataLen)
}
catch (const std::bad_alloc &)
{
- pStripOffsets = NULL;
+ pStripOffsets = nullptr;
nNumStripOffsets = 0;
}
if ( pStripOffsets )
@@ -420,7 +420,7 @@ void TIFFReader::ReadTagData( sal_uInt16 nTagType, sal_uInt32 nDataLen)
case 0x0117: { // Strip Byte Counts
sal_uLong nOldNumSBC, i, * pOldSBC;
pOldSBC = pStripByteCounts;
- if ( pOldSBC == NULL )
+ if ( pOldSBC == nullptr )
nNumStripByteCounts = 0; // to be on the safe side
nOldNumSBC = nNumStripByteCounts;
nDataLen += nOldNumSBC;
@@ -436,7 +436,7 @@ void TIFFReader::ReadTagData( sal_uInt16 nTagType, sal_uInt32 nDataLen)
}
catch (const std::bad_alloc &)
{
- pStripByteCounts = NULL;
+ pStripByteCounts = nullptr;
nNumStripByteCounts = 0;
}
if ( pStripByteCounts )
@@ -1074,7 +1074,7 @@ bool TIFFReader::ConvertScanline(sal_Int32 nY)
}
}
else if ( ( nSamplesPerPixel == 2 ) && ( nBitsPerSample == 8 ) &&
- ( nPlanarConfiguration == 1 ) && ( pColorMap == 0 ) ) // grayscale
+ ( nPlanarConfiguration == 1 ) && ( pColorMap == nullptr ) ) // grayscale
{
if ( nMaxSampleValue > nMinSampleValue )
{
@@ -1098,7 +1098,7 @@ void TIFFReader::MakePalCol()
if ( nDstBitsPerPixel <= 8 )
{
sal_uLong i, nVal, n0RGB;
- if ( pColorMap == NULL )
+ if ( pColorMap == nullptr )
pColorMap = new sal_uLong[ 256 ];
if ( nPhotometricInterpretation <= 1 )
{
@@ -1291,11 +1291,11 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
nPredictor = 1;
nNumColors = 0;
- pAcc = NULL;
- pColorMap = NULL;
- pStripOffsets = NULL;
- pStripByteCounts = NULL;
- pMap[ 0 ] = pMap[ 1 ] = pMap[ 2 ] = pMap[ 3 ] = NULL;
+ pAcc = nullptr;
+ pColorMap = nullptr;
+ pStripOffsets = nullptr;
+ pStripByteCounts = nullptr;
+ pMap[ 0 ] = pMap[ 1 ] = pMap[ 2 ] = pMap[ 3 ] = nullptr;
pTIFF->ReadUInt16( nNumTags );
nPos = pTIFF->Tell();
@@ -1382,7 +1382,7 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
}
catch (const std::bad_alloc &)
{
- pMap[ j ] = NULL;
+ pMap[ j ] = nullptr;
bStatus = false;
break;
}
@@ -1412,7 +1412,7 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
{
if ( pAlphaMask )
pAlphaMask->ReleaseAccess( pMaskAcc );
- pMaskAcc = NULL;
+ pMaskAcc = nullptr;
}
if ( bStatus )
diff --git a/filter/source/graphicfilter/itiff/lzwdecom.cxx b/filter/source/graphicfilter/itiff/lzwdecom.cxx
index f07fb22aec47..508fd84e7a54 100644
--- a/filter/source/graphicfilter/itiff/lzwdecom.cxx
+++ b/filter/source/graphicfilter/itiff/lzwdecom.cxx
@@ -26,13 +26,13 @@
#define MAX_TABLE_SIZE 4096
LZWDecompressor::LZWDecompressor()
- : pIStream(NULL)
+ : pIStream(nullptr)
, nTableSize(0)
, bEOIFound(false)
, bInvert(false)
, bFirst(true)
, nOldCode(0)
- , pOutBufData(NULL)
+ , pOutBufData(nullptr)
, nOutBufDataLen(0)
, nInputBitsBuf(0)
, nInputBitsBufSize(0)
@@ -86,7 +86,7 @@ sal_uLong LZWDecompressor::Decompress(sal_uInt8 * pTarget, sal_uLong nMaxCount)
{
sal_uLong nCount;
- if (pIStream==NULL) return 0;
+ if (pIStream==nullptr) return 0;
nCount=0;
for (;;) {
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index eb8e2134cd26..fee5ad8d7981 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -176,7 +176,7 @@ EscherPropertyContainer::~EscherPropertyContainer()
void EscherPropertyContainer::AddOpt( sal_uInt16 nPropID, sal_uInt32 nPropValue, bool bBlib )
{
- AddOpt( nPropID, bBlib, nPropValue, NULL, 0 );
+ AddOpt( nPropID, bBlib, nPropValue, nullptr, 0 );
}
void EscherPropertyContainer::AddOpt( sal_uInt16 nPropID, const OUString& rString )
@@ -423,7 +423,7 @@ void EscherPropertyContainer::CreateGradientProperties(
const css::uno::Reference< css::beans::XPropertySet > & rXPropSet , bool bTransparentGradient)
{
css::uno::Any aAny;
- css::awt::Gradient const * pGradient = NULL;
+ css::awt::Gradient const * pGradient = nullptr;
sal_uInt32 nFillType = ESCHER_FillShadeScale;
sal_Int32 nAngle = 0;
@@ -1264,7 +1264,7 @@ bool EscherPropertyContainer::CreateOLEGraphicProperties(
if ( rXShape.is() )
{
SdrObject* pSdrOLE2( GetSdrObjectFromXShape( rXShape ) ); // SJ: leaving unoapi, because currently there is
- if ( pSdrOLE2 && 0 != dynamic_cast<const SdrOle2Obj* > (pSdrOLE2) ) // no access to the native graphic object
+ if ( pSdrOLE2 && nullptr != dynamic_cast<const SdrOle2Obj* > (pSdrOLE2) ) // no access to the native graphic object
{
const Graphic* pGraphic = static_cast<SdrOle2Obj*>(pSdrOLE2)->GetGraphic();
if ( pGraphic )
@@ -1706,7 +1706,7 @@ bool EscherPropertyContainer::CreateGraphicProperties(
if ( pGraphicProvider && pPicOutStrm && pShapeBoundRect )
{
Rectangle aRect( Point( 0, 0 ), pShapeBoundRect->GetSize() );
- const sal_uInt32 nBlibId(pGraphicProvider->GetBlibID(*pPicOutStrm, aUniqueId, aRect, NULL, pGraphicAttr.get()));
+ const sal_uInt32 nBlibId(pGraphicProvider->GetBlibID(*pPicOutStrm, aUniqueId, aRect, nullptr, pGraphicAttr.get()));
if(nBlibId)
{
@@ -1729,7 +1729,7 @@ bool EscherPropertyContainer::CreateGraphicProperties(
SvMemoryStream aMemStrm;
Rectangle aRect;
- if ( aProvider.GetBlibID( aMemStrm, aUniqueId, aRect, NULL, pGraphicAttr.get(), bOOxmlExport ) )
+ if ( aProvider.GetBlibID( aMemStrm, aUniqueId, aRect, nullptr, pGraphicAttr.get(), bOOxmlExport ) )
{
// grab BLIP from stream and insert directly as complex property
// ownership of stream memory goes to complex property
@@ -1849,7 +1849,7 @@ tools::PolyPolygon EscherPropertyContainer::GetPolyPolygon( const css::uno::Any&
// get pointer to inner sequences
css::drawing::PointSequence const * pOuterSequence = pSourcePolyPolygon->getConstArray();
- bNoError = pOuterSequence != NULL;
+ bNoError = pOuterSequence != nullptr;
if ( bNoError )
{
sal_uInt16 a, b, nInnerSequenceCount;
@@ -1858,13 +1858,13 @@ tools::PolyPolygon EscherPropertyContainer::GetPolyPolygon( const css::uno::Any&
for( a = 0; a < nOuterSequenceCount; a++ )
{
css::drawing::PointSequence const * pInnerSequence = pOuterSequence++;
- bNoError = pInnerSequence != NULL;
+ bNoError = pInnerSequence != nullptr;
if ( bNoError )
{
// get pointer to arrays
css::awt::Point const * pArray =
pInnerSequence->getConstArray();
- if ( pArray != NULL )
+ if ( pArray != nullptr )
{
nInnerSequenceCount = (sal_uInt16)pInnerSequence->getLength();
aPolygon = tools::Polygon( nInnerSequenceCount );
@@ -1884,14 +1884,14 @@ tools::PolyPolygon EscherPropertyContainer::GetPolyPolygon( const css::uno::Any&
css::drawing::PointSequence const * pInnerSequence =
static_cast<css::drawing::PointSequence const *>(rAny.getValue());
- bNoError = pInnerSequence != NULL;
+ bNoError = pInnerSequence != nullptr;
if ( bNoError )
{
sal_uInt16 a, nInnerSequenceCount;
// get pointer to arrays
css::awt::Point const * pArray = pInnerSequence->getConstArray();
- if ( pArray != NULL )
+ if ( pArray != nullptr )
{
nInnerSequenceCount = (sal_uInt16)pInnerSequence->getLength();
aPolygon = tools::Polygon( nInnerSequenceCount );
@@ -2488,7 +2488,7 @@ void ConvertEnhancedCustomShapeEquation( SdrObjCustomShape* pCustoShape,
{
std::shared_ptr< EnhancedCustomShape::ExpressionNode > aExpressNode(
EnhancedCustomShape::FunctionParser::parseFunction( sEquationSource[ i ], aCustoShape2d ) );
- css::drawing::EnhancedCustomShapeParameter aPara( aExpressNode->fillNode( rEquations, NULL, 0 ) );
+ css::drawing::EnhancedCustomShapeParameter aPara( aExpressNode->fillNode( rEquations, nullptr, 0 ) );
if ( aPara.Type != css::drawing::EnhancedCustomShapeParameterType::EQUATION )
{
EnhancedCustomShapeEquation aEquation;
@@ -3998,7 +3998,7 @@ EscherBlibEntry::EscherBlibEntry( sal_uInt32 nPictureOffset, const GraphicObject
maPrefMapMode ( rObject.GetPrefMapMode() ),
mbIsEmpty ( true )
{
- mbIsNativeGraphicPossible = ( pGraphicAttr == NULL );
+ mbIsNativeGraphicPossible = ( pGraphicAttr == nullptr );
meBlibType = UNKNOWN;
mnSize = 0;
@@ -4099,7 +4099,7 @@ bool EscherBlibEntry::operator==( const EscherBlibEntry& rEscherBlibEntry ) cons
EscherGraphicProvider::EscherGraphicProvider( sal_uInt32 nFlags ) :
mnFlags ( nFlags ),
- mpBlibEntrys ( NULL ),
+ mpBlibEntrys ( nullptr ),
mnBlibBufSize ( 0 ),
mnBlibEntrys ( 0 )
{
@@ -4252,7 +4252,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin
GfxLink aGraphicLink;
SvMemoryStream aStream;
- const sal_uInt8* pGraphicAry = NULL;
+ const sal_uInt8* pGraphicAry = nullptr;
if ( p_EscherBlibEntry->mbIsNativeGraphicPossible && aGraphic.IsLink() )
{
@@ -4464,7 +4464,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin
rPicOutStrm.WriteUInt32( nPos - nAtomSize );
rPicOutStrm.Seek( nPos );
}
- nBlibId = ImplInsertBlib( p_EscherBlibEntry ), p_EscherBlibEntry = NULL;
+ nBlibId = ImplInsertBlib( p_EscherBlibEntry ), p_EscherBlibEntry = nullptr;
}
}
delete p_EscherBlibEntry;
@@ -4828,7 +4828,7 @@ void EscherSolverContainer::WriteSolver( SvStream& rStrm )
EscherExGlobal::EscherExGlobal( sal_uInt32 nGraphicProvFlags ) :
EscherGraphicProvider( nGraphicProvFlags ),
- mpPicStrm( 0 ),
+ mpPicStrm( nullptr ),
mbHasDggCont( false ),
mbPicStrmQueried( false )
{
@@ -4947,7 +4947,7 @@ SvStream* EscherExGlobal::QueryPictureStream()
SvStream* EscherExGlobal::ImplQueryPictureStream()
{
- return 0;
+ return nullptr;
}
// Implementation of an empty stream that silently succeeds, but does nothing.
@@ -5272,7 +5272,7 @@ void EscherEx::AddClientAnchor( const Rectangle& rRect )
EscherExHostAppData* EscherEx::EnterAdditionalTextGroup()
{
- return NULL;
+ return nullptr;
}
sal_uInt32 EscherEx::EnterGroup( const OUString& rShapeName, const Rectangle* pBoundRect )
diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx
index 8388e52c2b78..16ea2f18063b 100644
--- a/filter/source/msfilter/eschesdo.cxx
+++ b/filter/source/msfilter/eschesdo.cxx
@@ -65,8 +65,8 @@ ImplEESdrWriter::ImplEESdrWriter( EscherEx& rEx )
, maMapModeSrc(MAP_100TH_MM)
// PowerPoint: 576 dpi, WinWord: 1440 dpi, Excel: 1440 dpi
, maMapModeDest( MAP_INCH, Point(), Fraction( 1, EES_MAP_FRACTION ), Fraction( 1, EES_MAP_FRACTION ) )
- , mpPicStrm(NULL)
- , mpHostAppData(NULL)
+ , mpPicStrm(nullptr)
+ , mpHostAppData(nullptr)
, mnPagesWritten(0)
, mnShapeMasterTitle(0)
, mnShapeMasterBody(0)
@@ -167,7 +167,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
sal_uInt32 nGrpShapeID = 0;
do {
- mpHostAppData = mpEscherEx->StartShape( rObj.GetShapeRef(), (mpEscherEx->GetGroupLevel() > 1) ? &rObj.GetRect() : 0 );
+ mpHostAppData = mpEscherEx->StartShape( rObj.GetShapeRef(), (mpEscherEx->GetGroupLevel() > 1) ? &rObj.GetRect() : nullptr );
if ( mpHostAppData && mpHostAppData->DontWriteShape() )
break;
@@ -246,7 +246,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
// #i51348# shape name
if (!aShapeName.isEmpty())
aPropOpt.AddOpt( ESCHER_Prop_wzName, aShapeName );
- if ( InteractionInfo* pInteraction = mpHostAppData ? mpHostAppData->GetInteractionInfo():NULL )
+ if ( InteractionInfo* pInteraction = mpHostAppData ? mpHostAppData->GetInteractionInfo():nullptr )
{
const std::unique_ptr< SvMemoryStream >& pMemStrm = pInteraction->getHyperlinkRecord();
if ( pMemStrm.get() )
@@ -710,7 +710,7 @@ void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj,
sal_uInt16 nShapeType = 0;
do
{
- mpHostAppData = mpEscherEx->StartShape( rObj.GetShapeRef(), (mpEscherEx->GetGroupLevel() > 1) ? &rObj.GetRect() : 0 );
+ mpHostAppData = mpEscherEx->StartShape( rObj.GetShapeRef(), (mpEscherEx->GetGroupLevel() > 1) ? &rObj.GetRect() : nullptr );
if ( mpHostAppData && mpHostAppData->DontWriteShape() )
break;
@@ -857,8 +857,8 @@ void ImplEESdrWriter::ImplWritePage(
ImplEscherExSdr::ImplEscherExSdr( EscherEx& rEx )
:
ImplEESdrWriter( rEx ),
- mpSdrPage( NULL ),
- mpSolverContainer( NULL )
+ mpSdrPage( nullptr ),
+ mpSolverContainer( nullptr )
{
}
@@ -880,7 +880,7 @@ bool ImplEscherExSdr::ImplInitPage( const SdrPage& rPage )
// eventually write SolverContainer of current page, deletes the Solver
ImplFlushSolverContainer();
- mpSdrPage = NULL;
+ mpSdrPage = nullptr;
mXDrawPage = pSvxDrawPage = new SvxFmDrawPage( const_cast<SdrPage*>(&rPage) );
mXShapes.set( mXDrawPage, UNO_QUERY );
if ( !mXShapes.is() )
@@ -894,7 +894,7 @@ bool ImplEscherExSdr::ImplInitPage( const SdrPage& rPage )
else
pSvxDrawPage = SvxDrawPage::getImplementation(mXDrawPage);
- return pSvxDrawPage != 0;
+ return pSvxDrawPage != nullptr;
} while ( false );
return false;
@@ -908,7 +908,7 @@ bool ImplEscherExSdr::ImplInitUnoShapes( const Reference< XShapes >& rxShapes )
if( !rxShapes.is() )
return false;
- mpSdrPage = 0;
+ mpSdrPage = nullptr;
mXDrawPage.clear();
mXShapes = rxShapes;
@@ -926,7 +926,7 @@ void ImplEscherExSdr::ImplExitPage()
mpEscherEx->LeaveGroup();
ImplFlushSolverContainer();
- mpSdrPage = NULL; // reset page for next init
+ mpSdrPage = nullptr; // reset page for next init
}
@@ -936,7 +936,7 @@ void ImplEscherExSdr::ImplFlushSolverContainer()
{
mpSolverContainer->WriteSolver( mpEscherEx->GetStream() );
delete mpSolverContainer;
- mpSolverContainer = NULL;
+ mpSolverContainer = nullptr;
}
}
@@ -981,7 +981,7 @@ void EscherEx::EndSdrObjectPage()
EscherExHostAppData* EscherEx::StartShape( const Reference< XShape >& /* rShape */, const Rectangle* /*pChildAnchor*/ )
{
- return NULL;
+ return nullptr;
}
void EscherEx::EndShape( sal_uInt16 /* nShapeType */, sal_uInt32 /* nShapeID */ )
@@ -1007,7 +1007,7 @@ sal_uInt32 EscherEx::AddDummyShape()
// static
const SdrObject* EscherEx::GetSdrObject( const Reference< XShape >& rShape )
{
- const SdrObject* pRet = 0;
+ const SdrObject* pRet = nullptr;
const SvxShape* pSvxShape = SvxShape::getImplementation( rShape );
DBG_ASSERT( pSvxShape, "EscherEx::GetSdrObject: no SvxShape" );
if( pSvxShape )
diff --git a/filter/source/msfilter/eschesdo.hxx b/filter/source/msfilter/eschesdo.hxx
index 4e97311998f6..3acb304189d4 100644
--- a/filter/source/msfilter/eschesdo.hxx
+++ b/filter/source/msfilter/eschesdo.hxx
@@ -159,7 +159,7 @@ protected:
const Point& rTextRefPoint );
sal_uInt32 ImplEnterAdditionalTextGroup(
const css::uno::Reference< css::drawing::XShape >& rShape,
- const Rectangle* pBoundRect = NULL );
+ const Rectangle* pBoundRect = nullptr );
public:
diff --git a/filter/source/msfilter/mscodec.cxx b/filter/source/msfilter/mscodec.cxx
index dc1c211add59..87dbf70af132 100644
--- a/filter/source/msfilter/mscodec.cxx
+++ b/filter/source/msfilter/mscodec.cxx
@@ -253,11 +253,11 @@ MSCodec_Std97::MSCodec_Std97 ()
{
m_hCipher = rtl_cipher_create (
rtl_Cipher_AlgorithmARCFOUR, rtl_Cipher_ModeStream);
- OSL_ASSERT(m_hCipher != 0);
+ OSL_ASSERT(m_hCipher != nullptr);
m_hDigest = rtl_digest_create (
rtl_Digest_AlgorithmMD5);
- OSL_ASSERT(m_hDigest != 0);
+ OSL_ASSERT(m_hDigest != nullptr);
(void)memset (m_pDigestValue, 0, sizeof(m_pDigestValue));
(void)memset (m_pDocId, 0, sizeof(m_pDocId));
@@ -409,7 +409,7 @@ bool MSCodec_Std97::InitCipher (sal_uInt32 nCounter)
// Initialize Cipher with KeyData (for decoding).
result = rtl_cipher_init (
m_hCipher, rtl_Cipher_DirectionBoth,
- pKeyData, RTL_DIGEST_LENGTH_MD5, 0, 0);
+ pKeyData, RTL_DIGEST_LENGTH_MD5, nullptr, 0);
// Erase KeyData array and leave.
rtl_secureZeroMemory (pKeyData, sizeof(pKeyData));
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 2a682fed6628..f637f668aff7 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -213,7 +213,7 @@ void Impl_OlePres::Write( SvStream & rStm )
DffPropertyReader::DffPropertyReader( const SvxMSDffManager& rMan )
: rManager(rMan)
- , pDefaultPropSet(NULL)
+ , pDefaultPropSet(nullptr)
, mnFix16Angle(0)
, mbRotateGranientFillWithAngle(false)
{
@@ -1229,7 +1229,7 @@ void ApplyRectangularGradientAsBitmap( const SvxMSDffManager& rManager, SvStream
{
const_cast< SvxMSDffManager& >( rManager ).maShapeRecords.Current()->SeekToBegOfRecord( rIn );
DffPropertyReader aSecPropSet( rManager );
- aSecPropSet.ReadPropSet( rIn, NULL );
+ aSecPropSet.ReadPropSet( rIn, nullptr );
sal_Int32 nSecFillProperties = aSecPropSet.GetPropertyValue( DFF_Prop_fNoFillHitTest, 0x200020 );
bRotateWithShape = ( nSecFillProperties & 0x0020 );
}
@@ -2906,7 +2906,7 @@ DffRecordList::DffRecordList( DffRecordList* pList ) :
nCount ( 0 ),
nCurrent ( 0 ),
pPrev ( pList ),
- pNext ( NULL )
+ pNext ( nullptr )
{
if ( pList )
pList->pNext = this;
@@ -2918,13 +2918,13 @@ DffRecordList::~DffRecordList()
}
DffRecordManager::DffRecordManager() :
- DffRecordList ( NULL ),
+ DffRecordList ( nullptr ),
pCList ( static_cast<DffRecordList*>(this) )
{
}
DffRecordManager::DffRecordManager( SvStream& rIn ) :
- DffRecordList ( NULL ),
+ DffRecordList ( nullptr ),
pCList ( static_cast<DffRecordList*>(this) )
{
Consume( rIn );
@@ -2964,14 +2964,14 @@ void DffRecordManager::Consume( SvStream& rIn, bool bAppend, sal_uInt32 nStOfs )
void DffRecordManager::Clear()
{
pCList = static_cast<DffRecordList*>(this);
- delete pNext, pNext = NULL;
+ delete pNext, pNext = nullptr;
nCurrent = 0;
nCount = 0;
}
DffRecordHeader* DffRecordManager::Current()
{
- DffRecordHeader* pRet = NULL;
+ DffRecordHeader* pRet = nullptr;
if ( pCList->nCurrent < pCList->nCount )
pRet = &pCList->mHd[ pCList->nCurrent ];
return pRet;
@@ -2979,7 +2979,7 @@ DffRecordHeader* DffRecordManager::Current()
DffRecordHeader* DffRecordManager::First()
{
- DffRecordHeader* pRet = NULL;
+ DffRecordHeader* pRet = nullptr;
pCList = static_cast<DffRecordList*>(this);
if ( pCList->nCount )
{
@@ -2991,7 +2991,7 @@ DffRecordHeader* DffRecordManager::First()
DffRecordHeader* DffRecordManager::Next()
{
- DffRecordHeader* pRet = NULL;
+ DffRecordHeader* pRet = nullptr;
sal_uInt32 nC = pCList->nCurrent + 1;
if ( nC < pCList->nCount )
{
@@ -3009,7 +3009,7 @@ DffRecordHeader* DffRecordManager::Next()
DffRecordHeader* DffRecordManager::Prev()
{
- DffRecordHeader* pRet = NULL;
+ DffRecordHeader* pRet = nullptr;
sal_uInt32 nCur = pCList->nCurrent;
if ( !nCur && pCList->pPrev )
{
@@ -3026,7 +3026,7 @@ DffRecordHeader* DffRecordManager::Prev()
DffRecordHeader* DffRecordManager::Last()
{
- DffRecordHeader* pRet = NULL;
+ DffRecordHeader* pRet = nullptr;
while ( pCList->pNext )
pCList = pCList->pNext;
sal_uInt32 nCnt = pCList->nCount;
@@ -3080,7 +3080,7 @@ DffRecordHeader* DffRecordManager::GetRecordHeader( sal_uInt16 nRecId, DffSeekTo
pHd = Next();
}
if ( pHd->nRecType != nRecId )
- pHd = NULL;
+ pHd = nullptr;
}
}
if ( !pHd )
@@ -3191,7 +3191,7 @@ void SvxMSDffManager::SetModel(SdrModel* pModel, long nApplicationScale)
}
else
{
- pModel = 0;
+ pModel = nullptr;
nMapMul = nMapDiv = nMapXOfs = nMapYOfs = nEmuMul = nEmuDiv = nPntMul = nPntDiv = 0;
bNeedMap = false;
}
@@ -3263,7 +3263,7 @@ bool SvxMSDffManager::SeekToRec( SvStream& rSt, sal_uInt16 nRecId, sal_uLong nMa
else
{
bRet = true;
- if ( pRecHd != NULL )
+ if ( pRecHd != nullptr )
*pRecHd = aHd;
else
{
@@ -3775,7 +3775,7 @@ static void lcl_ApplyCropping( const DffPropSet& rPropSet, SfxItemSet* pSet, Gra
SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, const DffObjData& rObjData )
{
- SdrObject* pRet = NULL;
+ SdrObject* pRet = nullptr;
OUString aFileName;
OUString aLinkFileName, aLinkFilterName;
Rectangle aVisArea;
@@ -3826,7 +3826,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
// the writer is doing its own cropping, so this part affects only impress and calc,
// unless we're inside a group, in which case writer doesn't crop either
if (( GetSvxMSDffSettings() & SVXMSDFF_SETTINGS_CROP_BITMAPS ) || rObjData.nCalledByGroup != 0 )
- lcl_ApplyCropping( *this, ( rObjData.nSpFlags & SP_FOLESHAPE ) == 0 ? &rSet : NULL, aGraf );
+ lcl_ApplyCropping( *this, ( rObjData.nSpFlags & SP_FOLESHAPE ) == 0 ? &rSet : nullptr, aGraf );
if ( IsProperty( DFF_Prop_pictureTransparent ) )
{
@@ -4028,7 +4028,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
SdrObject* SvxMSDffManager::ImportObj( SvStream& rSt, void* pClientData,
Rectangle& rClientRect, const Rectangle& rGlobalChildRect, int nCalledByGroup, sal_Int32* pShapeId )
{
- SdrObject* pRet = NULL;
+ SdrObject* pRet = nullptr;
DffRecordHeader aObjHd;
bool bOk = ReadDffRecordHeader(rSt, aObjHd);
if (bOk && aObjHd.nRecType == DFF_msofbtSpgrContainer)
@@ -4047,7 +4047,7 @@ SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& r
Rectangle& rClientRect, const Rectangle& rGlobalChildRect,
int nCalledByGroup, sal_Int32* pShapeId )
{
- SdrObject* pRet = NULL;
+ SdrObject* pRet = nullptr;
if( pShapeId )
*pShapeId = 0;
@@ -4158,7 +4158,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
Rectangle& rClientRect, const Rectangle& rGlobalChildRect,
int nCalledByGroup, sal_Int32* pShapeId )
{
- SdrObject* pRet = NULL;
+ SdrObject* pRet = nullptr;
if( pShapeId )
*pShapeId = 0;
@@ -4231,7 +4231,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
maShapeRecords.Current()->SeekToBegOfRecord( rSt );
delete pSecPropSet;
pSecPropSet = new DffPropertyReader( *this );
- pSecPropSet->ReadPropSet( rSt, NULL );
+ pSecPropSet->ReadPropSet( rSt, nullptr );
}
aObjData.bChildAnchor = maShapeRecords.SeekToContent( rSt, DFF_msofbtChildAnchor, SEEK_FROM_CURRENT_AND_RESTART );
@@ -4697,8 +4697,8 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
// connectors
MSO_ConnectorStyle eConnectorStyle = (MSO_ConnectorStyle)GetPropertyValue( DFF_Prop_cxstyle, mso_cxstyleStraight );
- static_cast<SdrEdgeObj*>(pRet)->ConnectToNode(true, NULL);
- static_cast<SdrEdgeObj*>(pRet)->ConnectToNode(false, NULL);
+ static_cast<SdrEdgeObj*>(pRet)->ConnectToNode(true, nullptr);
+ static_cast<SdrEdgeObj*>(pRet)->ConnectToNode(false, nullptr);
Point aPoint1( aObjData.aBoundRect.TopLeft() );
Point aPoint2( aObjData.aBoundRect.BottomRight() );
@@ -5060,7 +5060,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
// text frame, also Title or Outline
SdrObject* pOrgObj = pObj;
- SdrRectObj* pTextObj = 0;
+ SdrRectObj* pTextObj = nullptr;
sal_uInt32 nTextId = GetPropertyValue( DFF_Prop_lTxid, 0 );
if( nTextId )
{
@@ -5090,7 +5090,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
if (bTextFrame)
{
SdrObject::Free( pObj );
- pObj = pOrgObj = 0;
+ pObj = pOrgObj = nullptr;
}
// Distance of Textbox to it's surrounding Customshape
@@ -5358,7 +5358,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
SfxItemSet aSet( pSdrModel->GetItemPool() );
ApplyAttributes( rSt, aSet, rObjData );
- const SfxPoolItem* pPoolItem=NULL;
+ const SfxPoolItem* pPoolItem=nullptr;
SfxItemState eState = aSet.GetItemState( XATTR_FILLCOLOR,
false, &pPoolItem );
if( SfxItemState::DEFAULT == eState )
@@ -5398,7 +5398,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
if (SeekToContent(DFF_Prop_pWrapPolygonVertices, rSt))
{
delete pTextImpRec->pWrapPolygon;
- pTextImpRec->pWrapPolygon = NULL;
+ pTextImpRec->pWrapPolygon = nullptr;
sal_uInt16 nNumElemVert(0), nNumElemMemVert(0), nElemSizeVert(0);
rSt.ReadUInt16( nNumElemVert ).ReadUInt16( nNumElemMemVert ).ReadUInt16( nElemSizeVert );
bool bOk = false;
@@ -5547,8 +5547,8 @@ void SvxMSDffManager::RemoveFromShapeOrder( SdrObject* pObject ) const
if( rOrder.pObj == pObject )
{
- rOrder.pObj = 0;
- rOrder.pFly = 0;
+ rOrder.pObj = nullptr;
+ rOrder.pFly = nullptr;
rOrder.nTxBxComp = 0;
}
}
@@ -5567,7 +5567,7 @@ SvxMSDffManager::SvxMSDffManager(SvStream& rStCtrl_,
SvStream* pStData2_,
bool bSkipImages )
:DffPropertyReader( *this ),
- pFormModel( NULL ),
+ pFormModel( nullptr ),
m_pBLIPInfos( new SvxMSDffBLIPInfos ),
m_xShapeInfosByTxBxComp( new SvxMSDffShapeInfos_ByTxBxComp ),
m_pShapeOrders( new SvxMSDffShapeOrders ),
@@ -5584,7 +5584,7 @@ SvxMSDffManager::SvxMSDffManager(SvStream& rStCtrl_,
pStData2( pStData2_ ),
nSvxMSDffSettings( 0 ),
nSvxMSDffOLEConvFlags( 0 ),
- pSecPropSet( NULL ),
+ pSecPropSet( nullptr ),
mnDefaultColor( mnDefaultColor_),
mbTracing( false ),
mbSkipImages (bSkipImages)
@@ -5616,7 +5616,7 @@ SvxMSDffManager::SvxMSDffManager(SvStream& rStCtrl_,
SvxMSDffManager::SvxMSDffManager( SvStream& rStCtrl_, const OUString& rBaseURL )
:DffPropertyReader( *this ),
- pFormModel( NULL ),
+ pFormModel( nullptr ),
m_pBLIPInfos( new SvxMSDffBLIPInfos ),
m_xShapeInfosByTxBxComp( new SvxMSDffShapeInfos_ByTxBxComp ),
m_pShapeOrders( new SvxMSDffShapeOrders ),
@@ -5628,16 +5628,16 @@ SvxMSDffManager::SvxMSDffManager( SvStream& rStCtrl_, const OUString& rBaseURL )
mnDrawingsSaved(0),
mnIdClusters(0),
rStCtrl( rStCtrl_ ),
- pStData( 0 ),
- pStData2( 0 ),
+ pStData( nullptr ),
+ pStData2( nullptr ),
nSvxMSDffSettings( 0 ),
nSvxMSDffOLEConvFlags( 0 ),
- pSecPropSet( NULL ),
+ pSecPropSet( nullptr ),
mnDefaultColor( COL_DEFAULT ),
mbTracing( false ),
mbSkipImages(false)
{
- SetModel( NULL, 0 );
+ SetModel( nullptr, 0 );
}
SvxMSDffManager::~SvxMSDffManager()
@@ -6221,7 +6221,7 @@ bool SvxMSDffManager::GetShape(sal_uLong nId, SdrObject*& rpShape,
rStCtrl.Seek( nOldPosCtrl );
if( &rStCtrl != pStData && pStData )
pStData->Seek( nOldPosData );
- return ( 0 != rpShape );
+ return ( nullptr != rpShape );
}
return false;
}
@@ -6550,7 +6550,7 @@ SdrObject* SvxMSDffManager::ImportOLE( long nOLEId,
const int /* _nCalledByGroup */,
sal_Int64 nAspect ) const
{
- SdrObject* pRet = 0;
+ SdrObject* pRet = nullptr;
OUString sStorageName;
tools::SvRef<SotStorage> xSrcStg;
ErrCode nError = ERRCODE_NONE;
@@ -6825,7 +6825,7 @@ const char* GetInternalServerName_Impl( const SvGlobalName& aGlobName )
else if ( aGlobName == SvGlobalName( SO3_SCH_OLE_EMBED_CLASSID_60 )
|| aGlobName == SvGlobalName( SO3_SCH_OLE_EMBED_CLASSID_8 ) )
return "schart";
- return 0;
+ return nullptr;
}
OUString GetFilterNameFromClassID_Impl( const SvGlobalName& aGlobName )
@@ -6916,7 +6916,7 @@ css::uno::Reference < css::embed::XEmbeddedObject > SvxMSDffManager::CheckForCo
{ OLE_POWERPOINT_2_STARIMPRESS, "simpress", // PowerPoint slide
0x64818d11L, 0x4f9b, 0x11cf,
0x86,0xea,0x00,0xaa,0x00,0xb9,0x29,0xe8 },
- { 0, 0,
+ { 0, nullptr,
0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0 }
};
@@ -6941,7 +6941,7 @@ css::uno::Reference < css::embed::XEmbeddedObject > SvxMSDffManager::CheckForCo
if ( sStarName.getLength() )
{
//TODO/MBA: check if (and when) storage and stream will be destroyed!
- const SfxFilter* pFilter = 0;
+ const SfxFilter* pFilter = nullptr;
std::unique_ptr<SvMemoryStream> xMemStream (new SvMemoryStream);
if ( pName )
{
@@ -7072,7 +7072,7 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage(
sal_Int64 nRecommendedAspect )
{
sal_Int64 nAspect = nRecommendedAspect;
- SdrOle2Obj* pRet = 0;
+ SdrOle2Obj* pRet = nullptr;
if( rSrcStorage.Is() && xDestStorage.is() && rStorageName.getLength() )
{
comphelper::EmbeddedObjectContainer aCnt( xDestStorage );
@@ -7267,16 +7267,16 @@ bool SvxMSDffManager::SetPropValue( const uno::Any& rAny, const uno::Reference<
}
SvxMSDffImportRec::SvxMSDffImportRec()
- : pObj( 0 ),
- pWrapPolygon(0),
- pClientAnchorBuffer( 0 ),
+ : pObj( nullptr ),
+ pWrapPolygon(nullptr),
+ pClientAnchorBuffer( nullptr ),
nClientAnchorLen( 0 ),
- pClientDataBuffer( 0 ),
+ pClientDataBuffer( nullptr ),
nClientDataLen( 0 ),
nXAlign( 0 ), // position n cm from left
- pXRelTo( NULL ), // relative to column
+ pXRelTo( nullptr ), // relative to column
nYAlign( 0 ), // position n cm below
- pYRelTo( NULL ), // relative to paragraph
+ pYRelTo( nullptr ), // relative to paragraph
nLayoutInTableCell( 0 ), // element is laid out in table cell
nFlags( 0 ),
nTextRotationAngle( 0 ),
@@ -7313,9 +7313,9 @@ SvxMSDffImportRec::SvxMSDffImportRec()
SvxMSDffImportRec::SvxMSDffImportRec(const SvxMSDffImportRec& rCopy)
: pObj( rCopy.pObj ),
nXAlign( rCopy.nXAlign ),
- pXRelTo( NULL ),
+ pXRelTo( nullptr ),
nYAlign( rCopy.nYAlign ),
- pYRelTo( NULL ),
+ pYRelTo( nullptr ),
nLayoutInTableCell( rCopy.nLayoutInTableCell ),
nFlags( rCopy.nFlags ),
nTextRotationAngle( rCopy.nTextRotationAngle ),
@@ -7365,7 +7365,7 @@ SvxMSDffImportRec::SvxMSDffImportRec(const SvxMSDffImportRec& rCopy)
nClientAnchorLen );
}
else
- pClientAnchorBuffer = 0;
+ pClientAnchorBuffer = nullptr;
nClientDataLen = rCopy.nClientDataLen;
if( rCopy.nClientDataLen )
@@ -7376,12 +7376,12 @@ SvxMSDffImportRec::SvxMSDffImportRec(const SvxMSDffImportRec& rCopy)
nClientDataLen );
}
else
- pClientDataBuffer = 0;
+ pClientDataBuffer = nullptr;
if (rCopy.pWrapPolygon)
pWrapPolygon = new tools::Polygon(*rCopy.pWrapPolygon);
else
- pWrapPolygon = 0;
+ pWrapPolygon = nullptr;
}
SvxMSDffImportRec::~SvxMSDffImportRec()
@@ -7416,7 +7416,7 @@ void SvxMSDffManager::removeShapeId( SdrObject* pShape )
SdrObject* SvxMSDffManager::getShapeForId( sal_Int32 nShapeId )
{
SvxMSDffShapeIdContainer::iterator aIter( maShapeIdContainer.find(nShapeId) );
- return aIter != maShapeIdContainer.end() ? (*aIter).second : 0;
+ return aIter != maShapeIdContainer.end() ? (*aIter).second : nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/msfilter/msoleexp.cxx b/filter/source/msfilter/msoleexp.cxx
index cae2d6ee6e8f..240849ca63f7 100644
--- a/filter/source/msfilter/msoleexp.cxx
+++ b/filter/source/msfilter/msoleexp.cxx
@@ -122,7 +122,7 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef& rObj, SotSt
{
SvGlobalName aOwnGlobalName;
SvGlobalName aObjName( rObj->getClassID() );
- const SfxFilter* pExpFilter = NULL;
+ const SfxFilter* pExpFilter = nullptr;
{
static struct _ObjExpType {
sal_uInt32 nFlag;
@@ -154,7 +154,7 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef& rObj, SotSt
{{SO3_SDRAW_CLASSID_60}, {SO3_SDRAW_CLASSID_50}, // SJ: !!!! SO3_SDRAW_CLASSID is only available up from
{SO3_SDRAW_CLASSID_60}, {SO3_SDRAW_CLASSID_50 }}}, // ver 5.0, it is purpose to have double entrys here.
- { 0xffff,0,
+ { 0xffff,nullptr,
{{SO3_SDRAW_CLASSID_60}, {SO3_SDRAW_CLASSID_50},
{SO3_SDRAW_CLASSID_60}, {SO3_SDRAW_CLASSID_50}}}
};
diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx
index e0e45bbeb136..be74c017f0cf 100644
--- a/filter/source/msfilter/mstoolbar.cxx
+++ b/filter/source/msfilter/mstoolbar.cxx
@@ -62,7 +62,7 @@ void CustomToolBarImportHelper::applyIcons()
sal_uInt16 nColor = ui::ImageType::COLOR_NORMAL;
vcl::Window* topwin = Application::GetActiveTopWindow();
- if ( topwin != NULL && topwin->GetDisplayBackground().GetColor().IsDark() )
+ if ( topwin != nullptr && topwin->GetDisplayBackground().GetColor().IsDark() )
nColor = css::ui::ImageType::COLOR_HIGHCONTRAST;
ScaleImage( images[ 0 ], 16 );
diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx
index 8667270e2f61..b55eadd69029 100644
--- a/filter/source/msfilter/msvbahelper.cxx
+++ b/filter/source/msfilter/msvbahelper.cxx
@@ -76,7 +76,7 @@ OUString trimMacroName( const OUString& rMacroName )
SfxObjectShell* findShellForUrl( const OUString& sMacroURLOrPath )
{
- SfxObjectShell* pFoundShell=NULL;
+ SfxObjectShell* pFoundShell=nullptr;
SfxObjectShell* pShell = SfxObjectShell::GetFirst();
INetURLObject aObj;
aObj.SetURL( sMacroURLOrPath );
@@ -234,7 +234,7 @@ bool hasMacro( SfxObjectShell* pShell, const OUString& sLibrary, OUString& sMod,
OUString getDefaultProjectName( SfxObjectShell* pShell )
{
OUString aPrjName;
- if( BasicManager* pBasicMgr = pShell ? pShell->GetBasicManager() : 0 )
+ if( BasicManager* pBasicMgr = pShell ? pShell->GetBasicManager() : nullptr )
{
aPrjName = pBasicMgr->GetName();
if( aPrjName.isEmpty() )
@@ -310,7 +310,7 @@ MacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, const OUString& Macro
OUString sDocUrlOrPath = aMacroName.copy( 0, nDocSepIndex );
aMacroName = aMacroName.copy( nDocSepIndex + 1 );
SAL_INFO("filter.ms", "doc search, current shell is " << pShell);
- SfxObjectShell* pFoundShell = 0;
+ SfxObjectShell* pFoundShell = nullptr;
if( bSearchGlobalTemplates )
{
SvtPathOptions aPathOpt;
@@ -527,7 +527,7 @@ uno::Reference< uno::XInterface > SAL_CALL VBAMacroResolver_createInstance( cons
VBAMacroResolver::VBAMacroResolver() :
- mpObjShell( 0 )
+ mpObjShell( nullptr )
{
}
@@ -753,7 +753,7 @@ void applyShortCutKeyBinding ( const uno::Reference< frame::XModel >& rxModel, c
OUString aMacroName = MacroName.trim();
if( aMacroName.startsWith("!") )
MacroName = aMacroName.copy(1).trim();
- SfxObjectShell* pShell = NULL;
+ SfxObjectShell* pShell = nullptr;
if ( rxModel.is() )
{
uno::Reference< lang::XUnoTunnel > xObjShellTunnel( rxModel, uno::UNO_QUERY_THROW );
diff --git a/filter/source/msfilter/rtfutil.cxx b/filter/source/msfilter/rtfutil.cxx
index f833fb13e288..e5c07e364e33 100644
--- a/filter/source/msfilter/rtfutil.cxx
+++ b/filter/source/msfilter/rtfutil.cxx
@@ -42,7 +42,7 @@ OString OutChar(sal_Unicode c, int* pUCMode, rtl_TextEncoding eDestEnc, bool* pS
if (pSuccess)
*pSuccess = true;
OStringBuffer aBuf;
- const sal_Char* pStr = 0;
+ const sal_Char* pStr = nullptr;
// 0x0b instead of \n, etc because of the replacements in SwWW8AttrIter::GetSnippet()
switch (c)
{
@@ -127,7 +127,7 @@ OString OutString(const OUString& rStr, rtl_TextEncoding eDestEnc, bool bUnicode
OStringBuffer aBuf;
int nUCMode = 1;
for (sal_Int32 n = 0; n < rStr.getLength(); ++n)
- aBuf.append(OutChar(rStr[n], &nUCMode, eDestEnc, 0, bUnicode));
+ aBuf.append(OutChar(rStr[n], &nUCMode, eDestEnc, nullptr, bUnicode));
if (nUCMode != 1)
{
aBuf.append(OOO_STRING_SVTOOLS_RTF_UC);
diff --git a/filter/source/msfilter/services.cxx b/filter/source/msfilter/services.cxx
index ec63f5089ba9..9ef19e882e23 100644
--- a/filter/source/msfilter/services.cxx
+++ b/filter/source/msfilter/services.cxx
@@ -25,12 +25,12 @@ using namespace ::com::sun::star::uno;
namespace {
#define IMPLEMENTATION_ENTRY( className ) \
- { &className##_createInstance, &className##_getImplementationName, &className##_getSupportedServiceNames, ::cppu::createSingleComponentFactory, 0, 0 }
+ { &className##_createInstance, &className##_getImplementationName, &className##_getSupportedServiceNames, ::cppu::createSingleComponentFactory, nullptr, 0 }
static ::cppu::ImplementationEntry const spServices[] =
{
IMPLEMENTATION_ENTRY( ::ooo::vba::VBAMacroResolver ),
- { 0, 0, 0, 0, 0, 0 }
+ { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
};
#undef IMPLEMENTATION_ENTRY
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 19c333f684cc..4ceacdbe19e6 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -489,15 +489,15 @@ SvStream& ReadPptOEPlaceholderAtom( SvStream& rIn, PptOEPlaceholderAtom& rAtom )
}
PptSlidePersistEntry::PptSlidePersistEntry() :
- pStyleSheet ( NULL ),
- pHeaderFooterEntry ( NULL ),
- pSolverContainer ( NULL ),
+ pStyleSheet ( nullptr ),
+ pHeaderFooterEntry ( nullptr ),
+ pSolverContainer ( nullptr ),
nSlidePersistStartOffset( 0 ),
nSlidePersistEndOffset ( 0 ),
nBackgroundOffset ( 0 ),
nDrawingDgId ( 0xffffffff ),
- pPresentationObjects ( NULL ),
- pBObj ( NULL ),
+ pPresentationObjects ( nullptr ),
+ pBObj ( nullptr ),
bBObjIsTemporary ( true ),
ePageKind ( PPT_MASTERPAGE ),
bNotesMaster ( false ),
@@ -542,7 +542,7 @@ SdrEscherImport::~SdrEscherImport()
const PptSlideLayoutAtom* SdrEscherImport::GetSlideLayoutAtom() const
{
- return NULL;
+ return nullptr;
}
bool SdrEscherImport::ReadString( OUString& rStr ) const
@@ -579,7 +579,7 @@ bool SdrEscherImport::SeekToShape( SvStream& /*rSt*/, void* /*pClientData*/, sal
PptFontEntityAtom* SdrEscherImport::GetFontEnityAtom( sal_uInt32 nNum ) const
{
- PptFontEntityAtom* pRetValue = NULL;
+ PptFontEntityAtom* pRetValue = nullptr;
if (m_pFonts && (nNum < m_pFonts->size()))
pRetValue = (*m_pFonts)[ nNum ].get();
return pRetValue;
@@ -840,7 +840,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
aTextObj.SetVertical( bVerticalText );
if ( pRet )
{
- bool bDeleteSource = aTextObj.GetOEPlaceHolderAtom() != 0;
+ bool bDeleteSource = aTextObj.GetOEPlaceHolderAtom() != nullptr;
if ( bDeleteSource && dynamic_cast<const SdrGrafObj* >(pRet) == nullptr // we are not allowed to get
&& dynamic_cast<const SdrObjGroup* >(pRet) == nullptr // grouped placeholder objects
&& dynamic_cast<const SdrOle2Obj* >(pRet) == nullptr )
@@ -1041,7 +1041,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
eTextKind = OBJ_RECT;
}
}
- SdrObject* pTObj = NULL;
+ SdrObject* pTObj = nullptr;
bool bWordWrap = (MSO_WrapMode)GetPropertyValue( DFF_Prop_WrapText, mso_wrapSquare ) != mso_wrapNone;
bool bFitShapeToText = ( GetPropertyValue( DFF_Prop_FitTextToShape, 0 ) & 2 ) != 0;
@@ -1053,14 +1053,14 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
else
bAutoGrowWidth = true;
pTObj = pRet;
- pRet = NULL;
+ pRet = nullptr;
}
else
{
if ( dynamic_cast<const SdrObjCustomShape* >(pRet) != nullptr )
{
SdrObject::Free( pRet );
- pRet = NULL;
+ pRet = nullptr;
}
pTObj = new SdrRectObj( eTextKind != OBJ_RECT ? eTextKind : OBJ_TEXT );
pTObj->SetModel( pSdrModel );
@@ -1303,9 +1303,9 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const OUString& rBaseURL ) :
SdrEscherImport ( rParam, rBaseURL ),
bOk ( rStCtrl.GetErrorCode() == SVSTREAM_OK ),
- pPersistPtr ( NULL ),
+ pPersistPtr ( nullptr ),
nPersistPtrAnz ( 0 ),
- pDefaultSheet ( NULL ),
+ pDefaultSheet ( nullptr ),
m_pMasterPages ( nullptr ),
m_pSlidePages ( nullptr ),
m_pNotePages ( nullptr ),
@@ -1507,7 +1507,7 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const O
m_pMasterPages->insert(m_pMasterPages->begin(), std::move(pE));
DffRecordHeader* pSlideListWithTextHd = aDocRecManager.GetRecordHeader( PPT_PST_SlideListWithText );
- PptSlidePersistEntry* pPreviousPersist = NULL;
+ PptSlidePersistEntry* pPreviousPersist = nullptr;
for (sal_uInt16 nPageListNum = 0;
pSlideListWithTextHd && nPageListNum < 3; ++nPageListNum)
{
@@ -1643,7 +1643,7 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const O
}
}
}
- if ( ( rStCtrl.GetError() != 0 ) || ( pDefaultSheet == NULL ) )
+ if ( ( rStCtrl.GetError() != 0 ) || ( pDefaultSheet == nullptr ) )
bOk = false;
pPPTStyleSheet = pDefaultSheet;
rStCtrl.Seek( 0 );
@@ -1788,7 +1788,7 @@ SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId,
const int /*_nCalledByGroup*/,
sal_Int64 /*nAspect*/ ) const
{
- SdrObject* pRet = NULL;
+ SdrObject* pRet = nullptr;
sal_uInt32 nOldPos = rStCtrl.Tell();
@@ -1847,7 +1847,7 @@ SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId,
if ( bSuccess )
{
std::unique_ptr<SvStream> pDest(::utl::UcbStreamHelper::CreateStream( aTmpFile.GetURL(), StreamMode::READ ));
- Storage* pObjStor = pDest ? new Storage( *pDest, true ) : NULL;
+ Storage* pObjStor = pDest ? new Storage( *pDest, true ) : nullptr;
if ( pObjStor )
{
tools::SvRef<SotStorage> xObjStor( new SotStorage( pObjStor ) );
@@ -1960,7 +1960,7 @@ SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId,
SvMemoryStream* SdrPowerPointImport::ImportExOleObjStg( sal_uInt32 nPersistPtr, sal_uInt32& nOleId ) const
{
- SvMemoryStream* pRet = NULL;
+ SvMemoryStream* pRet = nullptr;
if ( nPersistPtr && ( nPersistPtr < nPersistPtrAnz ) )
{
sal_uInt32 nOldPos, nOfs = pPersistPtr[ nPersistPtr ];
@@ -1979,7 +1979,7 @@ SvMemoryStream* SdrPowerPointImport::ImportExOleObjStg( sal_uInt32 nPersistPtr,
aZCodec.BeginCompression();
aZCodec.Decompress( rStCtrl, *pRet );
if ( !aZCodec.EndCompression() )
- delete pRet, pRet = NULL;
+ delete pRet, pRet = nullptr;
}
}
rStCtrl.Seek( nOldPos );
@@ -2090,7 +2090,7 @@ void SdrPowerPointImport::SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOpt
pHd = aDocRecManager.GetRecordHeader( PPT_PST_ExObjList );
if ( pHd )
{
- DffRecordHeader* pExEmbed = NULL;
+ DffRecordHeader* pExEmbed = nullptr;
pHd->SeekToBegOfRecord( rStCtrl );
std::unique_ptr<DffRecordManager> pExObjListManager(new DffRecordManager( rStCtrl ));
@@ -2192,13 +2192,13 @@ PptSlidePersistList* SdrPowerPointImport::GetPageList(PptPageKind ePageKind) con
return m_pSlidePages;
if ( ePageKind == PPT_NOTEPAGE )
return m_pNotePages;
- return NULL;
+ return nullptr;
}
SdrOutliner* SdrPowerPointImport::GetDrawOutliner( SdrTextObj* pSdrText )
{
if ( !pSdrText )
- return NULL;
+ return nullptr;
else
return &pSdrText->ImpGetDrawOutliner();
}
@@ -2209,8 +2209,8 @@ SdrObject* SdrPowerPointImport::ReadObjText( PPTTextObj* pTextObj, SdrObject* pS
SdrTextObj* pText = dynamic_cast<SdrTextObj*>( pSdrObj );
if ( pText )
{
- if ( !ApplyTextObj( pTextObj, pText, pPage, NULL, NULL ) )
- pSdrObj = NULL;
+ if ( !ApplyTextObj( pTextObj, pText, pPage, nullptr, nullptr ) )
+ pSdrObj = nullptr;
}
return pSdrObj;
}
@@ -2235,7 +2235,7 @@ SdrObject* SdrPowerPointImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj*
rOutliner.SetStyleSheet( 0, pSheet );
}
rOutliner.SetVertical( pTextObj->GetVertical() );
- const PPTParagraphObj* pPreviousParagraph = NULL;
+ const PPTParagraphObj* pPreviousParagraph = nullptr;
for ( PPTParagraphObj* pPara = pTextObj->First(); pPara; pPara = pTextObj->Next() )
{
sal_uInt32 nTextSize = pPara->GetTextSize();
@@ -2457,7 +2457,7 @@ void SdrPowerPointImport::SetPageNum( sal_uInt16 nPageNum, PptPageKind eKind )
eAktPageKind = eKind;
nAktPageNum = nPageNum;
- pPPTStyleSheet = NULL;
+ pPPTStyleSheet = nullptr;
bool bHasMasterPage = true;
sal_uInt16 nMasterIndex = 0;
@@ -2477,7 +2477,7 @@ void SdrPowerPointImport::SetPageNum( sal_uInt16 nPageNum, PptPageKind eKind )
if ( pPageList && nMasterIndex < pPageList->size() )
{
PptSlidePersistEntry* pMasterPersist = &(*pPageList)[ nMasterIndex ];
- if ( ( pMasterPersist->pStyleSheet == NULL ) && pMasterPersist->aSlideAtom.nMasterId )
+ if ( ( pMasterPersist->pStyleSheet == nullptr ) && pMasterPersist->aSlideAtom.nMasterId )
{
nMasterIndex = m_pMasterPages->FindPage( pMasterPersist->aSlideAtom.nMasterId );
if ( nMasterIndex != PPTSLIDEPERSIST_ENTRY_NOTFOUND )
@@ -2539,7 +2539,7 @@ bool SdrPowerPointImport::GetColorFromPalette( sal_uInt16 nNum, Color& rColor )
PptSlidePersistList* pPageList2 = GetPageList( PPT_MASTERPAGE );
if ( pPageList2 )
{
- PptSlidePersistEntry* pMasterPersist = NULL;
+ PptSlidePersistEntry* pMasterPersist = nullptr;
if ( eAktPageKind == PPT_MASTERPAGE )
pMasterPersist = &(*pPageList2)[ nAktPageNum ];
else
@@ -2605,7 +2605,7 @@ bool SdrPowerPointImport::SeekToShape( SvStream& rSt, void* pClientData, sal_uIn
if ( const_cast<SdrPowerPointImport*>(this)->maShapeRecords.SeekToContent( rSt, DFF_msofbtClientData, SEEK_FROM_CURRENT_AND_RESTART ) )
{
sal_uInt32 nStreamPos = rSt.Tell();
- PPTTextObj aTextObj( rSt, (SdrPowerPointImport&)*this, rPersistEntry, NULL );
+ PPTTextObj aTextObj( rSt, (SdrPowerPointImport&)*this, rPersistEntry, nullptr );
if ( aTextObj.Count() || aTextObj.GetOEPlaceHolderAtom() )
{
sal_uInt32 nShapePos = 0;
@@ -2870,7 +2870,7 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry*
Rectangle aEmpty;
aShapeHd.SeekToBegOfRecord( rStCtrl );
sal_Int32 nShapeId;
- aProcessData.pTableRowProperties = NULL;
+ aProcessData.pTableRowProperties = nullptr;
SdrObject* pObj = ImportObj( rStCtrl, static_cast<void*>(&aProcessData), aEmpty, aEmpty, 0, &nShapeId );
if ( pObj )
{
@@ -2927,7 +2927,7 @@ const PptSlideLayoutAtom* SdrPowerPointImport::GetSlideLayoutAtom() const
assert( !pPageList->is_null( nAktPageNum ) );
return &(*pPageList)[ nAktPageNum ].aSlideAtom.aLayout;
}
- return NULL;
+ return nullptr;
}
bool SdrPowerPointImport::IsNoteOrHandout( sal_uInt16 nPageNum, PptPageKind /*ePageKind*/) const
@@ -2980,7 +2980,7 @@ sal_uInt16 SdrPowerPointImport::GetMasterPageIndex( sal_uInt16 nPageNum, PptPage
SdrObject* SdrPowerPointImport::ImportPageBackgroundObject( const SdrPage& rPage, sal_uInt32& nBgFileOffset, bool bForce )
{
- SdrObject* pRet = NULL;
+ SdrObject* pRet = nullptr;
bool bCreateObj = bForce;
std::unique_ptr<SfxItemSet> pSet;
sal_uLong nFPosMerk = rStCtrl.Tell(); // remember FilePos for restoring it later
@@ -3161,7 +3161,7 @@ SvStream& ReadPPTExtParaLevel( SvStream& rIn, PPTExtParaLevel& rLevel )
bool PPTExtParaProv::GetGraphic( sal_uInt32 nInstance, Graphic& rGraph ) const
{
bool bRetValue = false;
- PPTBuGraEntry* pPtr = NULL;
+ PPTBuGraEntry* pPtr = nullptr;
if ( nInstance < aBuGraList.size() )
{
pPtr = aBuGraList[ nInstance ];
@@ -3618,7 +3618,7 @@ void PPTNumberFormatCreator::GetNumberFormat( SdrPowerPointImport& rManager, Svx
nBulletOfs = rParaLevel.mnBulletOfs;
boost::optional< sal_Int16 > oStartNumbering;
- ImplGetExtNumberFormat( rManager, rNumberFormat, nLevel, nInstance, 0xffffffff, oStartNumbering, rCharLevel.mnFontHeight, NULL );
+ ImplGetExtNumberFormat( rManager, rNumberFormat, nLevel, nInstance, 0xffffffff, oStartNumbering, rCharLevel.mnFontHeight, nullptr );
if ( ( rNumberFormat.GetNumberingType() != SVX_NUM_BITMAP ) && ( nBulletHeight > 0x7fff ) )
nBulletHeight = rCharLevel.mnFontHeight ? ((-((sal_Int16)nBulletHeight)) * 100 ) / rCharLevel.mnFontHeight : 100;
ImplGetNumberFormat( rManager, rNumberFormat, nLevel );
@@ -4046,8 +4046,8 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd
mpParaSheet[ TSS_TYPE_NOTES ] = new PPTParaSheet( TSS_TYPE_NOTES );
mpParaSheet[ TSS_TYPE_UNUSED ] = new PPTParaSheet( TSS_TYPE_UNUSED );
mpParaSheet[ TSS_TYPE_TEXT_IN_SHAPE ] = new PPTParaSheet( TSS_TYPE_TEXT_IN_SHAPE );
- mpCharSheet[ TSS_TYPE_QUARTERBODY ] = mpCharSheet[ TSS_TYPE_HALFBODY ] = mpCharSheet[ TSS_TYPE_TITLE ] = mpCharSheet[ TSS_TYPE_SUBTITLE ] = NULL;
- mpParaSheet[ TSS_TYPE_QUARTERBODY ] = mpParaSheet[ TSS_TYPE_HALFBODY ] = mpParaSheet[ TSS_TYPE_TITLE ] = mpParaSheet[ TSS_TYPE_SUBTITLE ] = NULL;
+ mpCharSheet[ TSS_TYPE_QUARTERBODY ] = mpCharSheet[ TSS_TYPE_HALFBODY ] = mpCharSheet[ TSS_TYPE_TITLE ] = mpCharSheet[ TSS_TYPE_SUBTITLE ] = nullptr;
+ mpParaSheet[ TSS_TYPE_QUARTERBODY ] = mpParaSheet[ TSS_TYPE_HALFBODY ] = mpParaSheet[ TSS_TYPE_TITLE ] = mpParaSheet[ TSS_TYPE_SUBTITLE ] = nullptr;
/* SJ: try to locate the txMasterStyleAtom in the Environment
@@ -4411,7 +4411,7 @@ PPTParaPropSet& PPTParaPropSet::operator=( PPTParaPropSet& rParaPropSet )
PPTCharPropSet::PPTCharPropSet(sal_uInt32 nParagraph)
: mnOriginalTextPos(0)
, mnParagraph(nParagraph)
- , mpFieldItem(NULL)
+ , mpFieldItem(nullptr)
, pCharSet(new ImplPPTCharPropSet)
{
mnHylinkOrigColor = 0;
@@ -4431,7 +4431,7 @@ PPTCharPropSet::PPTCharPropSet( const PPTCharPropSet& rCharPropSet )
mnParagraph = rCharPropSet.mnParagraph;
mnOriginalTextPos = rCharPropSet.mnOriginalTextPos;
maString = rCharPropSet.maString;
- mpFieldItem = ( rCharPropSet.mpFieldItem ) ? new SvxFieldItem( *rCharPropSet.mpFieldItem ) : NULL;
+ mpFieldItem = ( rCharPropSet.mpFieldItem ) ? new SvxFieldItem( *rCharPropSet.mpFieldItem ) : nullptr;
mnLanguage[ 0 ] = rCharPropSet.mnLanguage[ 0 ];
mnLanguage[ 1 ] = rCharPropSet.mnLanguage[ 1 ];
mnLanguage[ 2 ] = rCharPropSet.mnLanguage[ 2 ];
@@ -4449,7 +4449,7 @@ PPTCharPropSet::PPTCharPropSet( const PPTCharPropSet& rCharPropSet, sal_uInt32 n
mnParagraph = nParagraph;
mnOriginalTextPos = rCharPropSet.mnOriginalTextPos;
maString = rCharPropSet.maString;
- mpFieldItem = ( rCharPropSet.mpFieldItem ) ? new SvxFieldItem( *rCharPropSet.mpFieldItem ) : NULL;
+ mpFieldItem = ( rCharPropSet.mpFieldItem ) ? new SvxFieldItem( *rCharPropSet.mpFieldItem ) : nullptr;
mnLanguage[ 0 ] = mnLanguage[ 1 ] = mnLanguage[ 2 ] = 0;
}
@@ -4472,7 +4472,7 @@ PPTCharPropSet& PPTCharPropSet::operator=( const PPTCharPropSet& rCharPropSet )
mnOriginalTextPos = rCharPropSet.mnOriginalTextPos;
mnParagraph = rCharPropSet.mnParagraph;
maString = rCharPropSet.maString;
- mpFieldItem = ( rCharPropSet.mpFieldItem ) ? new SvxFieldItem( *rCharPropSet.mpFieldItem ) : NULL;
+ mpFieldItem = ( rCharPropSet.mpFieldItem ) ? new SvxFieldItem( *rCharPropSet.mpFieldItem ) : nullptr;
}
return *this;
}
@@ -4515,7 +4515,7 @@ PPTRuler::PPTRuler()
: nRefCount(1)
, nFlags(0)
, nDefaultTab(0x240)
- , pTab(NULL)
+ , pTab(nullptr)
, nTabCount(0)
{
memset(nTextOfs, 0, sizeof(nTextOfs));
@@ -5436,7 +5436,7 @@ bool PPTPortionObj::GetAttrib( sal_uInt32 nAttr, sal_uInt32& rRetValue, sal_uInt
else
{
const PPTCharLevel& rCharLevel = mrStyleSheet.mpCharSheet[ mnInstance ]->maCharLevel[ mnDepth ];
- PPTCharLevel* pCharLevel = NULL;
+ PPTCharLevel* pCharLevel = nullptr;
if ( ( nDestinationInstance == 0xffffffff )
|| ( mnDepth && ( ( mnInstance == TSS_TYPE_SUBTITLE ) || ( mnInstance == TSS_TYPE_TEXT_IN_SHAPE ) ) ) )
bIsHardAttribute = true;
@@ -5504,7 +5504,7 @@ bool PPTPortionObj::GetAttrib( sal_uInt32 nAttr, sal_uInt32& rRetValue, sal_uInt
void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, sal_uInt32 nDestinationInstance )
{
- ApplyTo( rSet, rManager, nDestinationInstance, NULL );
+ ApplyTo( rSet, rManager, nDestinationInstance, nullptr );
}
void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, sal_uInt32 nDestinationInstance, const PPTTextObj* pTextObj )
@@ -5654,7 +5654,7 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, s
const SfxItemSet* pItemSet = pTextObj->GetBackground();
if ( pItemSet )
{
- const SfxPoolItem* pFillStyleItem = NULL;
+ const SfxPoolItem* pFillStyleItem = nullptr;
pItemSet->GetItemState( XATTR_FILLSTYLE, false, &pFillStyleItem );
if ( pFillStyleItem )
{
@@ -5663,7 +5663,7 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, s
{
case drawing::FillStyle_SOLID :
{
- const SfxPoolItem* pFillColorItem = NULL;
+ const SfxPoolItem* pFillColorItem = nullptr;
pItemSet->GetItemState( XATTR_FILLCOLOR, false, &pFillColorItem );
if ( pFillColorItem )
aDefColor = static_cast<const XColorItem*>(pFillColorItem)->GetColorValue();
@@ -5671,7 +5671,7 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, s
break;
case drawing::FillStyle_GRADIENT :
{
- const SfxPoolItem* pGradientItem = NULL;
+ const SfxPoolItem* pGradientItem = nullptr;
pItemSet->GetItemState( XATTR_FILLGRADIENT, false, &pGradientItem );
if ( pGradientItem )
aDefColor = static_cast<const XFillGradientItem*>(pGradientItem)->GetGradientValue().GetStartColor();
@@ -5735,11 +5735,11 @@ SvxFieldItem* PPTPortionObj::GetTextField()
{
if ( mpFieldItem )
return new SvxFieldItem( *mpFieldItem );
- return NULL;
+ return nullptr;
}
PPTParagraphObj::PPTParagraphObj( const PPTStyleSheet& rStyleSheet, sal_uInt32 nInstance, sal_uInt16 nDepth ) :
- PPTNumberFormatCreator ( NULL ),
+ PPTNumberFormatCreator ( nullptr ),
mrStyleSheet ( rStyleSheet ),
mnInstance ( nInstance ),
mbTab ( true ), // style sheets always have to get the right tabulator setting
@@ -5755,7 +5755,7 @@ PPTParagraphObj::PPTParagraphObj( PPTStyleTextPropReader& rPropReader,
const PPTStyleSheet& rStyleSheet,
sal_uInt32 nInstance, PPTTextRulerInterpreter& rRuler ) :
PPTParaPropSet ( *rPropReader.aParaPropList[nCurParaPos] ),
- PPTNumberFormatCreator ( NULL ),
+ PPTNumberFormatCreator ( nullptr ),
PPTTextRulerInterpreter ( rRuler ),
mrStyleSheet ( rStyleSheet ),
mnInstance ( nInstance ),
@@ -5894,7 +5894,7 @@ bool PPTParagraphObj::GetAttrib( sal_uInt32 nAttr, sal_uInt32& rRetValue, sal_uI
{
const PPTParaLevel& rParaLevel = mrStyleSheet.mpParaSheet[ mnInstance ]->maParaLevel[ pParaSet->mnDepth ];
- PPTParaLevel* pParaLevel = NULL;
+ PPTParaLevel* pParaLevel = nullptr;
if ( ( nDestinationInstance == 0xffffffff )
|| ( pParaSet->mnDepth && ( ( mnInstance == TSS_TYPE_SUBTITLE ) || ( mnInstance == TSS_TYPE_TEXT_IN_SHAPE ) ) ) )
bIsHardAttribute = true;
@@ -6304,7 +6304,7 @@ PPTPortionObj* PPTParagraphObj::First()
{
mnCurrentObject = 0;
if (m_PortionList.empty())
- return NULL;
+ return nullptr;
return m_PortionList.front().get();
}
@@ -6312,7 +6312,7 @@ PPTPortionObj* PPTParagraphObj::Next()
{
sal_uInt32 i = mnCurrentObject + 1;
if (i >= m_PortionList.size())
- return NULL;
+ return nullptr;
mnCurrentObject++;
return m_PortionList[i].get();
}
@@ -6390,11 +6390,11 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
mpImplTextObj->mnRefCount = 1;
mpImplTextObj->mnShapeId = 0;
mpImplTextObj->mnShapeMaster = 0;
- mpImplTextObj->mpPlaceHolderAtom = NULL;
+ mpImplTextObj->mpPlaceHolderAtom = nullptr;
mpImplTextObj->mnDestinationInstance = mpImplTextObj->mnInstance = 4;
mpImplTextObj->mnCurrentObject = 0;
mpImplTextObj->mnParagraphCount = 0;
- mpImplTextObj->mpParagraphList = NULL;
+ mpImplTextObj->mpParagraphList = nullptr;
mpImplTextObj->mnTextFlags = 0;
mpImplTextObj->meShapeType = ( pObjData && pObjData->bShapeType ) ? pObjData->eShapeType : mso_sptMin;
@@ -6405,7 +6405,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
DffRecordHeader aShapeContainerHd;
ReadDffRecordHeader( rIn, aShapeContainerHd );
- if ( ( pObjData == NULL ) || ( pObjData->bShapeType ) )
+ if ( ( pObjData == nullptr ) || ( pObjData->bShapeType ) )
{
PPTExtParaProv* pExtParaProv = rSdrPowerPointImport.pPPTStyleSheet->pExtParaProv;
if ( pObjData )
@@ -6517,7 +6517,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
}
// now pHd points to the right SlideListWithText Container
PptSlidePersistList* pPageList = rSdrPowerPointImport.GetPageList( rSdrPowerPointImport.eAktPageKind );
- PptSlidePersistEntry* pE = NULL;
+ PptSlidePersistEntry* pE = nullptr;
if ( pPageList && ( rSdrPowerPointImport.nAktPageNum < pPageList->size() ) )
pE = &(*pPageList)[ rSdrPowerPointImport.nAktPageNum ];
if ( (!pE) || (!pE->nSlidePersistStartOffset) || ( pE->aPersistAtom.nSlideId != nSlideId ) )
@@ -6666,7 +6666,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
{
ReadDffRecordHeader( rIn, aTextHd );
sal_uInt16 nVal = 0;
- PPTFieldEntry* pEntry = NULL;
+ PPTFieldEntry* pEntry = nullptr;
switch ( aTextHd.nRecType )
{
case PPT_PST_DateTimeMCAtom :
@@ -6773,7 +6773,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
}
}
}
- if ( pEntry->pString == NULL )
+ if ( pEntry->pString == nullptr )
{
// Handle as previously
pEntry->pField1 = new SvxFieldItem( SvxDateField( Date( Date::SYSTEM ), SVXDATETYPE_FIX ), EE_FEATURE_FIELD );
@@ -6886,7 +6886,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
if ( (*FE)->pField2 )
{
PPTCharPropSet* pNewCPS = new PPTCharPropSet( *pSet );
- pNewCPS->mpFieldItem = (*FE)->pField2, (*FE)->pField2 = NULL;
+ pNewCPS->mpFieldItem = (*FE)->pField2, (*FE)->pField2 = nullptr;
aCharPropList.insert( aCharPropList.begin() + n + 1, pNewCPS );
pNewCPS = new PPTCharPropSet( *pSet );
@@ -6901,7 +6901,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
}
if ( (*FE)->pField1 )
{
- pSet->mpFieldItem = (*FE)->pField1, (*FE)->pField1 = NULL;
+ pSet->mpFieldItem = (*FE)->pField1, (*FE)->pField1 = nullptr;
}
else if ( (*FE)->pString )
pSet->maString = *(*FE)->pString;
@@ -6913,7 +6913,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
sal_uInt32 nHyperLen = (*FE)->nTextRangeEnd - nPos;
if ( nHyperLen )
{
- PPTCharPropSet* pBefCPS = NULL;
+ PPTCharPropSet* pBefCPS = nullptr;
if ( nCount )
{
pBefCPS = new PPTCharPropSet( *pSet );
@@ -6980,7 +6980,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
}
nIdx++;
}
- delete (*FE)->pField1, (*FE)->pField1 = NULL;
+ delete (*FE)->pField1, (*FE)->pField1 = nullptr;
if ( pBefCPS )
{
@@ -7046,7 +7046,7 @@ PPTParagraphObj* PPTTextObj::First()
{
mpImplTextObj->mnCurrentObject = 0;
if ( !mpImplTextObj->mnParagraphCount )
- return NULL;
+ return nullptr;
return mpImplTextObj->mpParagraphList[ 0 ];
}
@@ -7054,7 +7054,7 @@ PPTParagraphObj* PPTTextObj::Next()
{
sal_uInt32 i = mpImplTextObj->mnCurrentObject + 1;
if ( i >= mpImplTextObj->mnParagraphCount )
- return NULL;
+ return nullptr;
mpImplTextObj->mnCurrentObject++;
return mpImplTextObj->mpParagraphList[ i ];
}
@@ -7064,7 +7064,7 @@ const SfxItemSet* PPTTextObj::GetBackground() const
if ( mpImplTextObj->mrPersistEntry.pBObj )
return &mpImplTextObj->mrPersistEntry.pBObj->GetMergedItemSet();
else
- return NULL;
+ return nullptr;
}
void PPTTextObj::ImplClear()
@@ -7606,9 +7606,9 @@ SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTab
// check connections to the group object
if ( pPtr->pAObj == pGroup )
- pPtr->pAObj = NULL;
+ pPtr->pAObj = nullptr;
if ( pPtr->pBObj == pGroup )
- pPtr->pBObj = NULL;
+ pPtr->pBObj = nullptr;
// check connections to all its subobjects
SdrObjListIter aIter( *pGroup, IM_DEEPWITHGROUPS );
@@ -7616,9 +7616,9 @@ SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTab
{
SdrObject* pPartObj = aIter.Next();
if ( pPtr->pAObj == pPartObj )
- pPtr->pAObj = NULL;
+ pPtr->pAObj = nullptr;
if ( pPtr->pBObj == pPartObj )
- pPtr->pBObj = NULL;
+ pPtr->pBObj = nullptr;
}
//In MS, the one_row_one_col table is made up of five
//shape,the connector is connected to some part of a
diff --git a/filter/source/msfilter/svxmsbas2.cxx b/filter/source/msfilter/svxmsbas2.cxx
index e2a4ce64af12..0c04ff77e172 100644
--- a/filter/source/msfilter/svxmsbas2.cxx
+++ b/filter/source/msfilter/svxmsbas2.cxx
@@ -37,7 +37,7 @@ ErrCode SvxImportMSVBasic::SaveOrDelMSVBAStorage( bool bSaveInto,
STREAM_READWRITE | StreamMode::NOCREATE | StreamMode::SHARE_DENYALL ) );
if( xVBAStg.Is() && !xVBAStg->GetError() )
{
- xVBAStg = 0;
+ xVBAStg = nullptr;
if( bSaveInto )
{
#if HAVE_FEATURE_SCRIPTING
diff --git a/filter/source/msfilter/util.cxx b/filter/source/msfilter/util.cxx
index aa5556818bf7..42b3b926afae 100644
--- a/filter/source/msfilter/util.cxx
+++ b/filter/source/msfilter/util.cxx
@@ -1178,11 +1178,11 @@ static struct {
};
typedef std::unordered_map< const char*, const char*, rtl::CStringHash, rtl::CStringEqual> CustomShapeTypeTranslationHashMap;
-static CustomShapeTypeTranslationHashMap* pCustomShapeTypeTranslationHashMap = NULL;
+static CustomShapeTypeTranslationHashMap* pCustomShapeTypeTranslationHashMap = nullptr;
const char* GetOOXMLPresetGeometry( const char* sShapeType )
{
- if( pCustomShapeTypeTranslationHashMap == NULL )
+ if( pCustomShapeTypeTranslationHashMap == nullptr )
{
pCustomShapeTypeTranslationHashMap = new CustomShapeTypeTranslationHashMap ();
for( unsigned int i = 0; i < SAL_N_ELEMENTS(pCustomShapeTypeTranslationTable); ++i )
diff --git a/filter/source/msfilter/viscache.hxx b/filter/source/msfilter/viscache.hxx
index 40dc36b7089e..cf91eda47103 100644
--- a/filter/source/msfilter/viscache.hxx
+++ b/filter/source/msfilter/viscache.hxx
@@ -40,11 +40,11 @@ public:
explicit Impl_OlePres( SotClipboardFormatId nF )
: nFormat( nF )
, nAspect( ASPECT_CONTENT )
- , pBmp( NULL )
- , pMtf( NULL )
+ , pBmp( nullptr )
+ , pMtf( nullptr )
, nAdvFlags( 0x2 ) // in Dokument gefunden
, nJobLen( 0 )
- , pJob( NULL )
+ , pJob( nullptr )
{}
~Impl_OlePres()
{
diff --git a/filter/source/odfflatxml/OdfFlatXml.cxx b/filter/source/odfflatxml/OdfFlatXml.cxx
index 199d8a729144..8022178efd2b 100644
--- a/filter/source/odfflatxml/OdfFlatXml.cxx
+++ b/filter/source/odfflatxml/OdfFlatXml.cxx
@@ -223,7 +223,7 @@ odfflatxml_component_getFactory( const sal_Char* pImplementationName,
void* /* pRegistryKey */ )
{
if ((!pImplementationName) || (!pServiceManager))
- return NULL;
+ return nullptr;
css::uno::Reference< css::lang::XMultiServiceFactory >
xSMGR = static_cast< css::lang::XMultiServiceFactory* >(pServiceManager);
@@ -242,7 +242,7 @@ odfflatxml_component_getFactory( const sal_Char* pImplementationName,
return xFactory.get();
}
- return NULL;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index e9976c5ea534..1fe1474e9ca7 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -245,14 +245,14 @@ ImpPDFTabDialog::ImpPDFTabDialog(vcl::Window* pParent, Sequence< PropertyValue >
mbSignPDF = maConfigItem.ReadBool( "SignPDF", false );
//queue the tab pages for later creation (created when first shown)
- mnSigningPageId = AddTabPage("digitalsignatures", ImpPDFTabSigningPage::Create, 0);
- mnSecurityPageId = AddTabPage("security", ImpPDFTabSecurityPage::Create, 0);
- mnLinksPage = AddTabPage("links", ImpPDFTabLinksPage::Create, 0);
- mnInterfacePageId = AddTabPage("userinterface", ImpPDFTabViewerPage::Create, 0);
- mnViewPageId = AddTabPage("initialview", ImpPDFTabOpnFtrPage::Create, 0);
+ mnSigningPageId = AddTabPage("digitalsignatures", ImpPDFTabSigningPage::Create, nullptr);
+ mnSecurityPageId = AddTabPage("security", ImpPDFTabSecurityPage::Create, nullptr);
+ mnLinksPage = AddTabPage("links", ImpPDFTabLinksPage::Create, nullptr);
+ mnInterfacePageId = AddTabPage("userinterface", ImpPDFTabViewerPage::Create, nullptr);
+ mnViewPageId = AddTabPage("initialview", ImpPDFTabOpnFtrPage::Create, nullptr);
//last queued is the first to be displayed (or so it seems..)
- mnGeneralPageId = AddTabPage("general", ImpPDFTabGeneralPage::Create, 0 );
+ mnGeneralPageId = AddTabPage("general", ImpPDFTabGeneralPage::Create, nullptr );
//get the string property value (from sfx2/source/dialog/mailmodel.cxx) to overwrite the text for the Ok button
OUString sOkButtonText = maConfigItem.ReadString( "_OkButtonString", OUString() );
@@ -278,7 +278,7 @@ ImpPDFTabSecurityPage* ImpPDFTabDialog::getSecurityPage() const
{
return static_cast<ImpPDFTabSecurityPage*>(pSecurityPage);
}
- return NULL;
+ return nullptr;
}
ImpPDFTabLinksPage* ImpPDFTabDialog::getLinksPage() const
@@ -288,7 +288,7 @@ ImpPDFTabLinksPage* ImpPDFTabDialog::getLinksPage() const
{
return static_cast<ImpPDFTabLinksPage*>(pLinksPage);
}
- return NULL;
+ return nullptr;
}
ImpPDFTabGeneralPage* ImpPDFTabDialog::getGeneralPage() const
@@ -298,7 +298,7 @@ ImpPDFTabGeneralPage* ImpPDFTabDialog::getGeneralPage() const
{
return static_cast<ImpPDFTabGeneralPage*>(pGeneralPage);
}
- return NULL;
+ return nullptr;
}
IMPL_LINK_NOARG_TYPED(ImpPDFTabDialog, CancelHdl, Button*, void)
@@ -513,7 +513,7 @@ ImpPDFTabGeneralPage::ImpPDFTabGeneralPage(vcl::Window* pParent, const SfxItemSe
, mbExportFormFieldsUserSelection(false)
, mbIsPresentation(false)
, mbIsWriter(false)
- , mpaParent(0)
+ , mpaParent(nullptr)
{
get(mpRbAll, "all");
get(mpRbRange, "range");
@@ -805,7 +805,7 @@ IMPL_LINK_NOARG_TYPED(ImpPDFTabGeneralPage, ToggleAddStreamHdl, CheckBox&, void)
IMPL_LINK_NOARG_TYPED(ImpPDFTabGeneralPage, ToggleExportPDFAHdl, CheckBox&, void)
{
//set the security page status (and its controls as well)
- ImpPDFTabSecurityPage* pSecPage = mpaParent ? mpaParent->getSecurityPage() : NULL;
+ ImpPDFTabSecurityPage* pSecPage = mpaParent ? mpaParent->getSecurityPage() : nullptr;
if (pSecPage)
{
pSecPage->ImplPDFASecurityControl(!mpCbPDFA1b->IsChecked());
@@ -834,7 +834,7 @@ IMPL_LINK_NOARG_TYPED(ImpPDFTabGeneralPage, ToggleExportPDFAHdl, CheckBox&, void
}
// PDF/A-1 doesn't allow launch action, so enable/disable the selection on
// Link page
- ImpPDFTabLinksPage* pLinksPage = mpaParent ? mpaParent->getLinksPage() : NULL;
+ ImpPDFTabLinksPage* pLinksPage = mpaParent ? mpaParent->getLinksPage() : nullptr;
if (pLinksPage)
pLinksPage->ImplPDFALinkControl(!mpCbPDFA1b->IsChecked());
@@ -1319,7 +1319,7 @@ void ImpPDFTabSecurityPage::enablePermissionControls()
{
bool bIsPDFASel = false;
ImpPDFTabDialog* pParent = static_cast<ImpPDFTabDialog*>(GetTabDialog());
- ImpPDFTabGeneralPage* pGeneralPage = pParent ? pParent->getGeneralPage() : NULL;
+ ImpPDFTabGeneralPage* pGeneralPage = pParent ? pParent->getGeneralPage() : nullptr;
if (pGeneralPage)
{
bIsPDFASel = pGeneralPage->IsPdfaSelected();
@@ -1544,7 +1544,7 @@ IMPL_LINK_NOARG_TYPED(ImpPDFTabLinksPage, ClickRbOpnLnksBrowserHdl, Button*, voi
}
ImplErrorDialog::ImplErrorDialog(const std::set< vcl::PDFWriter::ErrorCode >& rErrors)
- : MessageDialog(NULL, "WarnPDFDialog", "filter/ui/warnpdfdialog.ui")
+ : MessageDialog(nullptr, "WarnPDFDialog", "filter/ui/warnpdfdialog.ui")
{
get(m_pErrors, "errors");
get(m_pExplanation, "message");
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 0e82712b275b..3ad411e98bce 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -165,8 +165,8 @@ bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter,
bool bRet = false;
try
{
- Any* pFirstPage = NULL;
- Any* pLastPage = NULL;
+ Any* pFirstPage = nullptr;
+ Any* pLastPage = nullptr;
bool bExportNotesPages = false;
@@ -810,7 +810,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
if ( pOut )
{
- DBG_ASSERT( pOut->GetExtOutDevData() == NULL, "PDFExport: ExtOutDevData already set!!!" );
+ DBG_ASSERT( pOut->GetExtOutDevData() == nullptr, "PDFExport: ExtOutDevData already set!!!" );
std::unique_ptr<vcl::PDFExtOutDevData> pPDFExtOutDevData(new vcl::PDFExtOutDevData( *pOut ));
pOut->SetExtOutDevData( pPDFExtOutDevData.get() );
pPDFExtOutDevData->SetIsExportNotes( mbExportNotes );
@@ -928,7 +928,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
bRet = pPDFWriter->Emit();
aErrors = pPDFWriter->GetErrors();
}
- pOut->SetExtOutDevData( NULL );
+ pOut->SetExtOutDevData( nullptr );
if( bReChangeToNormalView )
{
try
diff --git a/filter/source/pdf/pdffilter.cxx b/filter/source/pdf/pdffilter.cxx
index 793b9449abe9..86af0bba5e05 100644
--- a/filter/source/pdf/pdffilter.cxx
+++ b/filter/source/pdf/pdffilter.cxx
@@ -157,7 +157,7 @@ public:
IMPL_LINK_TYPED( FocusWindowWaitCursor, DestroyedLink, VclWindowEvent&, rEvent, void )
{
if( rEvent.GetId() == VCLEVENT_OBJECT_DYING )
- m_pFocusWindow = NULL;
+ m_pFocusWindow = nullptr;
}
sal_Bool SAL_CALL PDFFilter::filter( const Sequence< PropertyValue >& rDescriptor )
diff --git a/filter/source/pdf/pdfuno.cxx b/filter/source/pdf/pdfuno.cxx
index 72a324e6ff03..94c8769120f0 100644
--- a/filter/source/pdf/pdfuno.cxx
+++ b/filter/source/pdf/pdfuno.cxx
@@ -37,7 +37,7 @@ extern "C"
SAL_DLLPUBLIC_EXPORT void* SAL_CALL pdffilter_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{
OUString aImplName( OUString::createFromAscii( pImplName ) );
- void* pRet = 0;
+ void* pRet = nullptr;
if( pServiceManager )
{
diff --git a/filter/source/placeware/uno.cxx b/filter/source/placeware/uno.cxx
index 4241fbfc6d07..7f0a5eee5fc1 100644
--- a/filter/source/placeware/uno.cxx
+++ b/filter/source/placeware/uno.cxx
@@ -37,7 +37,7 @@ extern "C"
SAL_DLLPUBLIC_EXPORT void * SAL_CALL placeware_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ )
{
- void * pRet = 0;
+ void * pRet = nullptr;
OUString implName = OUString::createFromAscii( pImplName );
if ( pServiceManager && implName.equals(PlaceWareExportFilter_getImplementationName()) )
diff --git a/filter/source/placeware/zip.cxx b/filter/source/placeware/zip.cxx
index 840d7a94025c..585d749fd529 100644
--- a/filter/source/placeware/zip.cxx
+++ b/filter/source/placeware/zip.cxx
@@ -83,7 +83,7 @@ void PlacewareZipFile::copyAndCRC(ZipEntry *e, osl::File& rFile)
char buf[2048];
sal_uInt64 n, nWritten;
- e->crc = rtl_crc32( 0, 0L, 0 );
+ e->crc = rtl_crc32( 0, nullptr, 0 );
while( !isError() )
{
diff --git a/filter/source/storagefilterdetect/fdcomp.cxx b/filter/source/storagefilterdetect/fdcomp.cxx
index ec2d9052e04d..36c64b12e292 100644
--- a/filter/source/storagefilterdetect/fdcomp.cxx
+++ b/filter/source/storagefilterdetect/fdcomp.cxx
@@ -20,8 +20,8 @@ namespace {
static cppu::ImplementationEntry const services[] = {
{ &StorageFilterDetect_createInstance, &StorageFilterDetect_getImplementationName,
&StorageFilterDetect_getSupportedServiceNames,
- &cppu::createSingleComponentFactory, 0, 0 },
- { 0, 0, 0, 0, 0, 0 }
+ &cppu::createSingleComponentFactory, nullptr, 0 },
+ { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
};
}
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 76e647923697..0400609071c5 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -372,7 +372,7 @@ SVGExport::~SVGExport()
ObjectRepresentation::ObjectRepresentation() :
- mpMtf( NULL )
+ mpMtf( nullptr )
{
}
@@ -389,7 +389,7 @@ ObjectRepresentation::ObjectRepresentation( const Reference< XInterface >& rxObj
ObjectRepresentation::ObjectRepresentation( const ObjectRepresentation& rPresentation ) :
mxObject( rPresentation.mxObject ),
- mpMtf( rPresentation.mpMtf ? new GDIMetaFile( *rPresentation.mpMtf ) : NULL )
+ mpMtf( rPresentation.mpMtf ? new GDIMetaFile( *rPresentation.mpMtf ) : nullptr )
{
}
@@ -408,7 +408,7 @@ ObjectRepresentation& ObjectRepresentation::operator=( const ObjectRepresentatio
if (this == &rPresentation)
return *this;
mxObject = rPresentation.mxObject;
- delete mpMtf, ( mpMtf = rPresentation.mpMtf ? new GDIMetaFile( *rPresentation.mpMtf ) : NULL );
+ delete mpMtf, ( mpMtf = rPresentation.mpMtf ? new GDIMetaFile( *rPresentation.mpMtf ) : nullptr );
return *this;
}
@@ -611,7 +611,7 @@ bool SVGFilter::implExport( const Sequence< PropertyValue >& rDescriptor )
}
catch( ... )
{
- delete mpSVGDoc, mpSVGDoc = NULL;
+ delete mpSVGDoc, mpSVGDoc = nullptr;
OSL_FAIL( "Exception caught" );
}
@@ -631,10 +631,10 @@ bool SVGFilter::implExport( const Sequence< PropertyValue >& rDescriptor )
}
}
- delete mpSVGWriter, mpSVGWriter = NULL;
- mpSVGExport = NULL; // pointed object is released by xSVGExport dtor at the end of this scope
- delete mpSVGFontExport, mpSVGFontExport = NULL;
- delete mpObjects, mpObjects = NULL;
+ delete mpSVGWriter, mpSVGWriter = nullptr;
+ mpSVGExport = nullptr; // pointed object is released by xSVGExport dtor at the end of this scope
+ delete mpSVGFontExport, mpSVGFontExport = nullptr;
+ delete mpObjects, mpObjects = nullptr;
mbPresentation = false;
}
}
@@ -881,7 +881,7 @@ bool SVGFilter::implExportDocument()
implGenerateScript();
}
- delete mpSVGDoc, mpSVGDoc = NULL;
+ delete mpSVGDoc, mpSVGDoc = nullptr;
bRet = true;
}
}
@@ -1128,7 +1128,7 @@ bool SVGFilter::implGenerateMetaData()
// text fields are used only for generating meta info so we don't need them anymore
for( size_t i = 0; i < aFieldSet.size(); ++i )
{
- if( aFieldSet[i] != NULL )
+ if( aFieldSet[i] != nullptr )
{
delete aFieldSet[i];
}
@@ -1661,7 +1661,7 @@ bool SVGFilter::implExportShapes( const Reference< XShapes >& rxShapes,
if( ( rxShapes->getByIndex( i ) >>= xShape ) && xShape.is() )
bRet = implExportShape( xShape, bMaster ) || bRet;
- xShape = NULL;
+ xShape = nullptr;
}
return bRet;
@@ -1720,7 +1720,7 @@ bool SVGFilter::implExportShape( const Reference< XShape >& rxShape,
if( rMtf.GetActionSize() )
{ // for text field shapes we set up text-adjust attributes
// and set visibility to hidden
- const OUString* pElementId = NULL;
+ const OUString* pElementId = nullptr;
if( mbPresentation )
{
bool bIsPageNumber = ( aShapeClass == "Slide_Number" );
@@ -1796,7 +1796,7 @@ bool SVGFilter::implExportShape( const Reference< XShape >& rxShape,
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "id", rShapeId );
}
- const GDIMetaFile* pEmbeddedBitmapsMtf = NULL;
+ const GDIMetaFile* pEmbeddedBitmapsMtf = nullptr;
if( mEmbeddedBitmapActionMap.find( rxShape ) != mEmbeddedBitmapActionMap.end() )
{
pEmbeddedBitmapsMtf = &( mEmbeddedBitmapActionMap[ rxShape ].GetRepresentation() );
@@ -1919,7 +1919,7 @@ bool SVGFilter::implCreateObjectsFromShapes( const Reference< XDrawPage > & rxPa
if( ( rxShapes->getByIndex( i ) >>= xShape ) && xShape.is() )
bRet = implCreateObjectsFromShape( rxPage, xShape ) || bRet;
- xShape = NULL;
+ xShape = nullptr;
}
return bRet;
@@ -2159,8 +2159,8 @@ IMPL_LINK_TYPED( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo, void )
static const OUString aDateTimeId( aOOOAttrDateTimeField );
static const OUString aVariableDateTimeId( aOOOAttrDateTimeField + "-variable" );
- const UCharSet * pCharSet = NULL;
- UCharSetMap * pCharSetMap = NULL;
+ const UCharSet * pCharSet = nullptr;
+ UCharSetMap * pCharSetMap = nullptr;
if( bHasCharSetMap )
{
pCharSetMap = &( mTextFieldCharSets[ mCreateOjectsCurrentMasterPage ] );
@@ -2298,7 +2298,7 @@ IMPL_LINK_TYPED( SVGFilter, CalcFieldHdl, EditFieldInfo*, pInfo, void )
}
if( bFieldProcessed )
{
- if( pCharSet != NULL )
+ if( pCharSet != nullptr )
{
UCharSet::const_iterator aChar = pCharSet->begin();
for( ; aChar != pCharSet->end(); ++aChar )
diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx
index f11399ec1632..15523b36d133 100644
--- a/filter/source/svg/svgfilter.cxx
+++ b/filter/source/svg/svgfilter.cxx
@@ -62,16 +62,16 @@ namespace
SVGFilter::SVGFilter( const Reference< XComponentContext >& rxCtx ) :
mxContext( rxCtx ),
- mpSVGDoc( NULL ),
- mpSVGExport( NULL ),
- mpSVGFontExport( NULL ),
- mpSVGWriter( NULL ),
- mpDefaultSdrPage( NULL ),
- mpSdrModel( NULL ),
+ mpSVGDoc( nullptr ),
+ mpSVGExport( nullptr ),
+ mpSVGFontExport( nullptr ),
+ mpSVGWriter( nullptr ),
+ mpDefaultSdrPage( nullptr ),
+ mpSdrModel( nullptr ),
mbPresentation( false ),
mbSinglePage( false ),
mnVisiblePage( -1 ),
- mpObjects( NULL ),
+ mpObjects( nullptr ),
mxSrcDoc(),
mxDstDoc(),
mxDefaultPage(),
@@ -84,11 +84,11 @@ SVGFilter::SVGFilter( const Reference< XComponentContext >& rxCtx ) :
SVGFilter::~SVGFilter()
{
- DBG_ASSERT( mpSVGDoc == NULL, "mpSVGDoc not destroyed" );
- DBG_ASSERT( mpSVGExport == NULL, "mpSVGExport not destroyed" );
- DBG_ASSERT( mpSVGFontExport == NULL, "mpSVGFontExport not destroyed" );
- DBG_ASSERT( mpSVGWriter == NULL, "mpSVGWriter not destroyed" );
- DBG_ASSERT( mpObjects == NULL, "mpObjects not destroyed" );
+ DBG_ASSERT( mpSVGDoc == nullptr, "mpSVGDoc not destroyed" );
+ DBG_ASSERT( mpSVGExport == nullptr, "mpSVGExport not destroyed" );
+ DBG_ASSERT( mpSVGFontExport == nullptr, "mpSVGFontExport not destroyed" );
+ DBG_ASSERT( mpSVGWriter == nullptr, "mpSVGWriter not destroyed" );
+ DBG_ASSERT( mpObjects == nullptr, "mpObjects not destroyed" );
}
sal_Bool SAL_CALL SVGFilter::filter( const Sequence< PropertyValue >& rDescriptor )
@@ -419,7 +419,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL svgfilter_component_getFactory(
{
return component_getFactoryHelper( pImplName, svgWriter );
}
- return NULL;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/source/svg/svgfilter.hxx b/filter/source/svg/svgfilter.hxx
index b2f850dfd236..5120caeeadca 100644
--- a/filter/source/svg/svgfilter.hxx
+++ b/filter/source/svg/svgfilter.hxx
@@ -144,7 +144,7 @@ public:
bool operator==( const ObjectRepresentation& rPresentation ) const;
const Reference< XInterface >& GetObject() const { return mxObject; }
- bool HasRepresentation() const { return mpMtf != NULL; }
+ bool HasRepresentation() const { return mpMtf != nullptr; }
const GDIMetaFile& GetRepresentation() const { return *mpMtf; }
};
diff --git a/filter/source/svg/svgreader.cxx b/filter/source/svg/svgreader.cxx
index 009425a8a4e3..c19aa6e9ca4a 100644
--- a/filter/source/svg/svgreader.cxx
+++ b/filter/source/svg/svgreader.cxx
@@ -1261,7 +1261,7 @@ struct ShapeWritingVisitor
+OUString::number(y1)+"L"+OUString::number(x2)+","
+OUString::number(y2);
basegfx::B2DPolyPolygon aPoly;
- basegfx::tools::importFromSvgD(aPoly, sLinePath, false, NULL);
+ basegfx::tools::importFromSvgD(aPoly, sLinePath, false, nullptr);
writePathShape(xAttrs,
xUnoAttrs,
@@ -1351,7 +1351,7 @@ struct ShapeWritingVisitor
{
OUString sPath = xElem->hasAttribute("d") ? xElem->getAttribute("d") : "";
basegfx::B2DPolyPolygon aPoly;
- basegfx::tools::importFromSvgD(aPoly, sPath, false, NULL);
+ basegfx::tools::importFromSvgD(aPoly, sPath, false, nullptr);
if ((maCurrState.meStrokeType == NONE) &&
(maCurrState.meFillType != NONE) &&
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 9c6a3f511646..f33cb4d0561f 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -96,8 +96,8 @@ static sal_Char const XML_UNO_NAME_NRULE_BULLET_CHAR[] = "BulletChar";
SVGAttributeWriter::SVGAttributeWriter( SVGExport& rExport, SVGFontExport& rFontExport )
: mrExport( rExport )
, mrFontExport( rFontExport )
- , mpElemFont( NULL )
- , mpElemPaint( NULL )
+ , mpElemFont( nullptr )
+ , mpElemPaint( nullptr )
, maLineJoin(basegfx::B2DLineJoin::NONE)
, maLineCap(css::drawing::LineCap_BUTT)
{
@@ -371,7 +371,7 @@ void SVGAttributeWriter::endFontSettings()
if( mpElemFont )
{
delete mpElemFont;
- mpElemFont = NULL;
+ mpElemFont = nullptr;
}
}
@@ -405,8 +405,8 @@ void SVGAttributeWriter::setFontFamily()
SVGTextWriter::SVGTextWriter( SVGExport& rExport )
: mrExport( rExport ),
- mpContext( NULL ),
- mpVDev( NULL ),
+ mpContext( nullptr ),
+ mpVDev( nullptr ),
mbIsTextShapeStarted( false ),
mrTextShape(),
msShapeId(),
@@ -414,11 +414,11 @@ SVGTextWriter::SVGTextWriter( SVGExport& rExport )
mrCurrentTextParagraph(),
mrTextPortionEnumeration(),
mrCurrentTextPortion(),
- mpTextEmbeddedBitmapMtf( NULL ),
- mpTargetMapMode( NULL ),
- mpTextShapeElem( NULL ),
- mpTextParagraphElem( NULL ),
- mpTextPositionElem( NULL ),
+ mpTextEmbeddedBitmapMtf( nullptr ),
+ mpTargetMapMode( nullptr ),
+ mpTextShapeElem( nullptr ),
+ mpTextParagraphElem( nullptr ),
+ mpTextPositionElem( nullptr ),
mnLeftTextPortionLength( 0 ),
maTextPos(0,0),
mnTextWidth(0),
@@ -1201,7 +1201,7 @@ void SVGTextWriter::endTextShape()
if( mpTextShapeElem )
{
delete mpTextShapeElem;
- mpTextShapeElem = NULL;
+ mpTextShapeElem = nullptr;
}
mbIsTextShapeStarted = false;
// these need to be invoked after the <text> element has been closed
@@ -1258,7 +1258,7 @@ void SVGTextWriter::endTextParagraph()
if( mpTextParagraphElem )
{
delete mpTextParagraphElem;
- mpTextParagraphElem = NULL;
+ mpTextParagraphElem = nullptr;
}
}
@@ -1281,7 +1281,7 @@ void SVGTextWriter::endTextPosition()
if( mpTextPositionElem )
{
delete mpTextPositionElem;
- mpTextPositionElem = NULL;
+ mpTextPositionElem = nullptr;
}
}
@@ -1667,7 +1667,7 @@ SVGActionWriter::SVGActionWriter( SVGExport& rExport, SVGFontExport& rFontExport
mnCurPatternId( 1 ),
mrExport( rExport ),
mrFontExport( rFontExport ),
- mpContext( NULL ),
+ mpContext( nullptr ),
maTextWriter( rExport ),
mnInnerMtfCount( 0 ),
mbClipAttrChanged( false ),
@@ -2099,7 +2099,7 @@ void SVGActionWriter::ImplWritePattern( const tools::PolyPolygon& rPolyPoly,
mpVDev->AddHatchActions( rPolyPoly, *pHatch, aTmpMtf );
else if ( pGradient )
mpVDev->AddGradientActions( rPolyPoly.GetBoundRect(), *pGradient, aTmpMtf );
- ImplWriteActions( aTmpMtf, nWriteFlags, NULL );
+ ImplWriteActions( aTmpMtf, nWriteFlags, nullptr );
}
}
}
@@ -2121,7 +2121,7 @@ void SVGActionWriter::ImplWriteGradientEx( const tools::PolyPolygon& rPolyPoly,
}
else
{
- ImplWritePattern( rPolyPoly, NULL, &rGradient, nWriteFlags );
+ ImplWritePattern( rPolyPoly, nullptr, &rGradient, nWriteFlags );
}
}
@@ -2329,7 +2329,7 @@ void SVGActionWriter::ImplWriteMask( GDIMetaFile& rMtf,
SvXMLElementExport aElemG( mrExport, XML_NAMESPACE_NONE, aXMLElemG, true, true );
mpVDev->Push();
- ImplWriteActions( rMtf, nWriteFlags, NULL );
+ ImplWriteActions( rMtf, nWriteFlags, nullptr );
mpVDev->Pop();
}
}
@@ -2682,11 +2682,11 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
}
#endif
mbIsPlaceholderShape = false;
- if( ( pElementId != NULL ) && ( *pElementId == sPlaceholderTag ) )
+ if( ( pElementId != nullptr ) && ( *pElementId == sPlaceholderTag ) )
{
mbIsPlaceholderShape = true;
// since we utilize pElementId in an improper way we reset it to NULL before to go on
- pElementId = NULL;
+ pElementId = nullptr;
}
for( sal_uLong nCurAction = 0, nCount = rMtf.GetActionSize(); nCurAction < nCount; nCurAction++ )
@@ -2923,7 +2923,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
if( nWriteFlags & SVGWRITER_WRITE_FILL )
{
const MetaHatchAction* pA = static_cast<const MetaHatchAction*>(pAction);
- ImplWritePattern( pA->GetPolyPolygon(), &pA->GetHatch(), NULL, nWriteFlags );
+ ImplWritePattern( pA->GetPolyPolygon(), &pA->GetHatch(), nullptr, nWriteFlags );
}
}
break;
@@ -2993,7 +2993,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
if( ( pA->GetComment().equalsIgnoreAsciiCase("XGRAD_SEQ_BEGIN") ) &&
( nWriteFlags & SVGWRITER_WRITE_FILL ) )
{
- const MetaGradientExAction* pGradAction = NULL;
+ const MetaGradientExAction* pGradAction = nullptr;
bool bDone = false;
while( !bDone && ( ++nCurAction < nCount ) )
@@ -3461,7 +3461,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
vcl::Font aFont = ImplSetCorrectFontHeight();
mpContext->SetFontAttr( aFont );
- ImplWriteText( pA->GetPoint(), aText, NULL, 0 );
+ ImplWriteText( pA->GetPoint(), aText, nullptr, 0 );
}
else
{
@@ -3484,7 +3484,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
vcl::Font aFont = ImplSetCorrectFontHeight();
mpContext->SetFontAttr( aFont );
- ImplWriteText( pA->GetRect().TopLeft(), pA->GetText(), NULL, 0 );
+ ImplWriteText( pA->GetRect().TopLeft(), pA->GetText(), nullptr, 0 );
}
maTextWriter.writeTextPortion( pA->GetRect().TopLeft(), pA->GetText() );
}
@@ -3531,7 +3531,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
{
vcl::Font aFont = ImplSetCorrectFontHeight();
mpContext->SetFontAttr( aFont );
- ImplWriteText( pA->GetPoint(), aText, NULL, pA->GetWidth() );
+ ImplWriteText( pA->GetPoint(), aText, nullptr, pA->GetWidth() );
}
else
{
diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx
index 3509871e7833..1175a265de3a 100644
--- a/filter/source/svg/svgwriter.hxx
+++ b/filter/source/svg/svgwriter.hxx
@@ -112,7 +112,7 @@ public:
void AddColorAttr( const char* pColorAttrName, const char* pColorOpacityAttrName, const Color& rColor );
void AddGradientDef( const Rectangle& rObjRect,const Gradient& rGradient, OUString& rGradientId );
void AddPaintAttr( const Color& rLineColor, const Color& rFillColor,
- const Rectangle* pObjBoundRect = NULL, const Gradient* pFillGradient = NULL );
+ const Rectangle* pObjBoundRect = nullptr, const Gradient* pFillGradient = nullptr );
void SetFontAttr( const vcl::Font& rFont );
void startFontSettings();
@@ -311,7 +311,7 @@ private:
delete maContextStack.top();
maContextStack.pop();
}
- mpContext = (maContextStack.empty() ? NULL : maContextStack.top());
+ mpContext = (maContextStack.empty() ? nullptr : maContextStack.top());
maTextWriter.setContext( mpContext );
}
@@ -322,7 +322,7 @@ private:
tools::Polygon& ImplMap( const tools::Polygon& rPoly, tools::Polygon& rDstPoly ) const;
tools::PolyPolygon& ImplMap( const tools::PolyPolygon& rPolyPoly, tools::PolyPolygon& rDstPolyPoly ) const;
- void ImplWriteLine( const Point& rPt1, const Point& rPt2, const Color* pLineColor = NULL,
+ void ImplWriteLine( const Point& rPt1, const Point& rPt2, const Color* pLineColor = nullptr,
bool bApplyMapping = true );
void ImplWriteRect( const Rectangle& rRect, long nRadX = 0, long nRadY = 0,
bool bApplyMapping = true );
@@ -348,8 +348,8 @@ private:
void ImplWriteActions( const GDIMetaFile& rMtf,
sal_uInt32 nWriteFlags,
const OUString* pElementId,
- const Reference< XShape >* pXShape = NULL,
- const GDIMetaFile* pTextEmbeddedBitmapMtf = NULL );
+ const Reference< XShape >* pXShape = nullptr,
+ const GDIMetaFile* pTextEmbeddedBitmapMtf = nullptr );
vcl::Font ImplSetCorrectFontHeight() const;
@@ -367,9 +367,9 @@ public:
const Size& rSize100thmm,
const GDIMetaFile& rMtf,
sal_uInt32 nWriteFlags,
- const OUString* pElementId = NULL,
- const Reference< XShape >* pXShape = NULL,
- const GDIMetaFile* pTextEmbeddedBitmapMtf = NULL );
+ const OUString* pElementId = nullptr,
+ const Reference< XShape >* pXShape = nullptr,
+ const GDIMetaFile* pTextEmbeddedBitmapMtf = nullptr );
};
class SVGWriter : public cppu::WeakImplHelper< XSVGWriter >
diff --git a/filter/source/svg/tokenmap.cxx b/filter/source/svg/tokenmap.cxx
index 05fefc0ca301..57084c85e0c9 100644
--- a/filter/source/svg/tokenmap.cxx
+++ b/filter/source/svg/tokenmap.cxx
@@ -56,7 +56,7 @@ sal_Int32 getTokenId( const OUString& sIdent )
const char* getTokenName( sal_Int32 nTokenId )
{
if( nTokenId >= XML_TOKEN_COUNT )
- return NULL;
+ return nullptr;
const xmltoken* pCurr=wordlist;
const xmltoken* pEnd=wordlist+sizeof(wordlist)/sizeof(*wordlist);
@@ -67,7 +67,7 @@ const char* getTokenName( sal_Int32 nTokenId )
++pCurr;
}
- return NULL;
+ return nullptr;
}
} // namespace svgi
diff --git a/filter/source/t602/filterenv.cxx b/filter/source/t602/filterenv.cxx
index cfa263527a6c..959d4af6e9e9 100644
--- a/filter/source/t602/filterenv.cxx
+++ b/filter/source/t602/filterenv.cxx
@@ -37,7 +37,7 @@ extern "C"
SAL_DLLPUBLIC_EXPORT void * SAL_CALL t602filter_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ )
{
- void * pRet = 0;
+ void * pRet = nullptr;
OUString implName = OUString::createFromAscii( pImplName );
if ( pServiceManager && implName.equals(T602ImportFilter_getImplementationName()) )
diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx
index 79ce86731a37..715dc912309d 100644
--- a/filter/source/t602/t602filter.cxx
+++ b/filter/source/t602/t602filter.cxx
@@ -134,14 +134,14 @@ inistruct ini;
T602ImportFilter::T602ImportFilter(const css::uno::Reference<css::lang::XMultiServiceFactory > &r )
: mxMSF(r)
- , mpAttrList(NULL)
+ , mpAttrList(nullptr)
, node(START)
{
}
T602ImportFilter::T602ImportFilter(css::uno::Reference<css::io::XInputStream> xInputStream)
: mxInputStream(xInputStream)
- , mpAttrList(NULL)
+ , mpAttrList(nullptr)
, node(START)
{
}
@@ -913,7 +913,7 @@ Reference< XInterface > SAL_CALL T602ImportFilter_createInstance( const Referenc
}
T602ImportFilterDialog::T602ImportFilterDialog(const css::uno::Reference<css::lang::XMultiServiceFactory > &r ) :
- mxMSF( r ), mpResMgr( NULL ) {}
+ mxMSF( r ), mpResMgr( nullptr ) {}
T602ImportFilterDialog::~T602ImportFilterDialog()
{
@@ -1090,7 +1090,7 @@ bool T602ImportFilterDialog::OptionsDlg()
Reference < XToolkit > xToolkit = Toolkit::create( rComponentContext );
dialog->setVisible( false );
- dialog->createPeer( xToolkit, NULL );
+ dialog->createPeer( xToolkit, nullptr );
bool ret = ( dialog->execute() != 0 );
if ( ret ) {
diff --git a/filter/source/xmlfilteradaptor/genericfilter.cxx b/filter/source/xmlfilteradaptor/genericfilter.cxx
index fea9c732907c..57c5a61dcd03 100644
--- a/filter/source/xmlfilteradaptor/genericfilter.cxx
+++ b/filter/source/xmlfilteradaptor/genericfilter.cxx
@@ -33,7 +33,7 @@ extern "C"
SAL_DLLPUBLIC_EXPORT void * SAL_CALL xmlfa_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ )
{
- void * pRet = 0;
+ void * pRet = nullptr;
OUString implName = OUString::createFromAscii( pImplName );
if ( pServiceManager && implName.equals(XmlFilterAdaptor_getImplementationName()) )
{
diff --git a/filter/source/xmlfilterdetect/fdcomp.cxx b/filter/source/xmlfilterdetect/fdcomp.cxx
index 2f4e10e13cef..1ff35c429e5d 100644
--- a/filter/source/xmlfilterdetect/fdcomp.cxx
+++ b/filter/source/xmlfilterdetect/fdcomp.cxx
@@ -30,8 +30,8 @@ namespace {
static cppu::ImplementationEntry const services[] = {
{ &FilterDetect_createInstance, &FilterDetect_getImplementationName,
&FilterDetect_getSupportedServiceNames,
- &cppu::createSingleComponentFactory, 0, 0 },
- { 0, 0, 0, 0, 0, 0 }
+ &cppu::createSingleComponentFactory, nullptr, 0 },
+ { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
};
}
diff --git a/filter/source/xsltdialog/typedetectionexport.cxx b/filter/source/xsltdialog/typedetectionexport.cxx
index 0c5133f79991..eef44cf08101 100644
--- a/filter/source/xsltdialog/typedetectionexport.cxx
+++ b/filter/source/xsltdialog/typedetectionexport.cxx
@@ -234,7 +234,7 @@ void TypeDetectionExporter::addProperty( Reference< XWriter > xHandler, const OU
xHandler->ignorableWhitespace ( sWhiteSpace );
xHandler->startElement( sProp, xAttrList );
- xAttrList = NULL;
+ xAttrList = nullptr;
xHandler->ignorableWhitespace ( sWhiteSpace );
xHandler->startElement( sValue,xAttrList );
xHandler->characters( rValue );
diff --git a/filter/source/xsltdialog/typedetectionimport.cxx b/filter/source/xsltdialog/typedetectionimport.cxx
index 1efd61d9c9e6..8c19851a15d8 100644
--- a/filter/source/xsltdialog/typedetectionimport.cxx
+++ b/filter/source/xsltdialog/typedetectionimport.cxx
@@ -137,7 +137,7 @@ Node* TypeDetectionImporter::findTypeNode( const OUString& rType )
return (*aIter);
}
- return NULL;
+ return nullptr;
}
filter_info_impl* TypeDetectionImporter::createFilterForNode( Node * pNode )
@@ -185,7 +185,7 @@ filter_info_impl* TypeDetectionImporter::createFilterForNode( Node * pNode )
bool bOk = true;
- if( pTypeNode == NULL )
+ if( pTypeNode == nullptr )
bOk = false;
if( pFilter->maFilterName.isEmpty() )
@@ -212,7 +212,7 @@ filter_info_impl* TypeDetectionImporter::createFilterForNode( Node * pNode )
if( !bOk )
{
delete pFilter;
- pFilter = NULL;
+ pFilter = nullptr;
}
return pFilter;
diff --git a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
index c8d36a723fdb..89cd8385cd8e 100644
--- a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
+++ b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
@@ -114,7 +114,7 @@ private:
namespace
{
- static ResMgr* pXSLTResMgr = NULL;
+ static ResMgr* pXSLTResMgr = nullptr;
}
ResMgr* getXSLTDialogResMgr()
@@ -125,7 +125,7 @@ ResMgr* getXSLTDialogResMgr()
XMLFilterDialogComponent::XMLFilterDialogComponent( const css::uno::Reference< XComponentContext >& rxContext ) :
OComponentHelper( maMutex ),
mxContext( rxContext ),
- mpDialog( NULL )
+ mpDialog( nullptr )
{
Reference< XDesktop2 > xDesktop = Desktop::create( rxContext );
Reference< XTerminateListener > xListener( this );
@@ -271,7 +271,7 @@ void SAL_CALL XMLFilterDialogComponent::disposing()
if (pXSLTResMgr)
{
delete pXSLTResMgr;
- pXSLTResMgr = NULL;
+ pXSLTResMgr = nullptr;
}
}
@@ -319,7 +319,7 @@ sal_Int16 SAL_CALL XMLFilterDialogComponent::execute( ) throw(RuntimeException,
{
::SolarMutexGuard aGuard;
- if( NULL == pXSLTResMgr )
+ if( nullptr == pXSLTResMgr )
{
pXSLTResMgr = ResMgr::CreateResMgr( "xsltdlg", Application::GetSettings().GetUILanguageTag() );
}
@@ -365,7 +365,7 @@ extern "C"
SAL_DLLPUBLIC_EXPORT void * SAL_CALL xsltdlg_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ )
{
- void * pRet = 0;
+ void * pRet = nullptr;
if( pServiceManager )
{
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index f5e506b4e49b..4d3e83573083 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -186,9 +186,9 @@ void XMLFilterSettingsDialog::updateStates()
{
SvTreeListEntry* pSelectedEntry = m_pFilterListBox->FirstSelected();
- bool bHasSelection = pSelectedEntry != NULL;
+ bool bHasSelection = pSelectedEntry != nullptr;
- bool bMultiSelection = bHasSelection && (m_pFilterListBox->NextSelected( pSelectedEntry ) != NULL );
+ bool bMultiSelection = bHasSelection && (m_pFilterListBox->NextSelected( pSelectedEntry ) != nullptr );
bool bIsReadonly = false;
bool bIsDefault = false;
if(pSelectedEntry)
@@ -448,7 +448,7 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi
}
}
- filter_info_impl* pFilterEntry( NULL );
+ filter_info_impl* pFilterEntry( nullptr );
if( bOk )
{
@@ -1286,7 +1286,7 @@ const application_info_impl* getApplicationInfo( const OUString& rServiceName )
return (*aIter);
}
}
- return NULL;
+ return nullptr;
}
OUString getApplicationUIName( const OUString& rServiceName )
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx
index 6b4e8d238cd9..5d700704444b 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx
@@ -115,7 +115,7 @@ private:
void initFilterList();
void disposeFilterList();
- bool insertOrEdit( filter_info_impl* pNewInfo, const filter_info_impl* pOldInfo = NULL );
+ bool insertOrEdit( filter_info_impl* pNewInfo, const filter_info_impl* pOldInfo = nullptr );
OUString createUniqueFilterName( const OUString& rUIName );
OUString createUniqueTypeName( const OUString& rTypeName );
diff --git a/filter/source/xsltdialog/xmlfiltertabdialog.cxx b/filter/source/xsltdialog/xmlfiltertabdialog.cxx
index 0d39fdd42aca..9f9c3e785e5a 100644
--- a/filter/source/xsltdialog/xmlfiltertabdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertabdialog.cxx
@@ -97,7 +97,7 @@ bool XMLFilterTabDialog::onOk()
sal_uInt16 nErrorPage = 0;
sal_uInt16 nErrorId = 0;
- vcl::Window* pFocusWindow = NULL;
+ vcl::Window* pFocusWindow = nullptr;
OUString aReplace1;
OUString aReplace2;
diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
index 2071a134ed20..3aac59642e8b 100644
--- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
@@ -137,7 +137,7 @@ XMLFilterTestDialog::XMLFilterTestDialog(vcl::Window* pParent,
const Reference<XComponentContext>& rxContext)
: ModalDialog(pParent, "TestXMLFilterDialog", "filter/ui/testxmlfilter.ui")
, mxContext(rxContext)
- , m_pFilterInfo(NULL)
+ , m_pFilterInfo(nullptr)
{
get(m_pExport, "export");
get(m_pFTExportXSLTFile, "exportxsltfile");
@@ -278,7 +278,7 @@ void XMLFilterTestDialog::updateCurrentDocumentButtonState( Reference< XComponen
void XMLFilterTestDialog::initDialog()
{
DBG_ASSERT( m_pFilterInfo, "i need a filter I can test!" );
- if( NULL == m_pFilterInfo )
+ if( nullptr == m_pFilterInfo )
return;
OUString aTitle( m_sDialogTitle );
@@ -417,7 +417,7 @@ void XMLFilterTestDialog::onExportBrowse()
m_sExportRecentFile = aDlg.GetPath();
Reference< XDesktop2 > xLoader = Desktop::create( mxContext );
- Reference< XInteractionHandler2 > xInter = InteractionHandler::createWithParent(mxContext, 0);
+ Reference< XInteractionHandler2 > xInter = InteractionHandler::createWithParent(mxContext, nullptr);
OUString aFrame( "_default" );
Sequence< PropertyValue > aArguments(1);
aArguments[0].Name = "InteractionHandler";
@@ -599,7 +599,7 @@ void XMLFilterTestDialog::import( const OUString& rURL )
try
{
Reference< XDesktop2 > xLoader = Desktop::create( mxContext );
- Reference< XInteractionHandler2 > xInter = InteractionHandler::createWithParent(mxContext, 0);
+ Reference< XInteractionHandler2 > xInter = InteractionHandler::createWithParent(mxContext, nullptr);
OUString aFrame( "_default" );
Sequence< PropertyValue > aArguments(2);
diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.hxx b/filter/source/xsltdialog/xmlfiltertestdialog.hxx
index c5ee4201e52b..09998d0d58ac 100644
--- a/filter/source/xsltdialog/xmlfiltertestdialog.hxx
+++ b/filter/source/xsltdialog/xmlfiltertestdialog.hxx
@@ -41,7 +41,7 @@ public:
void test( const filter_info_impl& rFilterInfo );
- void updateCurrentDocumentButtonState( css::uno::Reference< css::lang::XComponent > * pRef = NULL );
+ void updateCurrentDocumentButtonState( css::uno::Reference< css::lang::XComponent > * pRef = nullptr );
private:
DECL_LINK_TYPED(ClickHdl_Impl, Button *, void );
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx
index 12de44a50565..1cb6fa7d70ee 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.cxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx
@@ -123,7 +123,7 @@ namespace XSLT
static void *
init(xsltTransformContextPtr, const xmlChar*)
{
- return NULL;
+ return nullptr;
}
static void
insertByName(xmlXPathParserContextPtr ctxt, int nargs)
@@ -136,7 +136,7 @@ namespace XSLT
return;
}
tctxt = xsltXPathGetTransformContext(ctxt);
- if (tctxt == NULL) {
+ if (tctxt == nullptr) {
xsltGenericError(xsltGenericErrorContext,
"xsltExtFunctionTest: failed to get the transformation context\n");
return;
@@ -145,7 +145,7 @@ namespace XSLT
// idea to pass the OleHandler than by attaching it to tctxt->_private. See also
// below.
data = tctxt->_private;
- if (data == NULL) {
+ if (data == nullptr) {
xsltGenericError(xsltGenericErrorContext,
"xsltExtFunctionTest: failed to get module data\n");
return;
@@ -182,7 +182,7 @@ namespace XSLT
}
tctxt = xsltXPathGetTransformContext(ctxt);
- if (tctxt == NULL) {
+ if (tctxt == nullptr) {
xsltGenericError(xsltGenericErrorContext,
"xsltExtFunctionTest: failed to get the transformation context\n");
return;
@@ -190,7 +190,7 @@ namespace XSLT
// XXX: someone with better knowledge of libxslt might come up with a better
// idea to pass the OleHandler than by attaching it to tctxt->_private
data = tctxt->_private;
- if (data == NULL) {
+ if (data == nullptr) {
xsltGenericError(xsltGenericErrorContext,
"xsltExtFunctionTest: failed to get module data\n");
return;
@@ -216,7 +216,7 @@ namespace XSLT
Reader::read(char * buffer, int len)
{
// const char *ptr = (const char *) context;
- if (buffer == NULL || len < 0)
+ if (buffer == nullptr || len < 0)
return (-1);
sal_Int32 n;
css::uno::Reference<XInputStream> xis = this->m_transformer->getInputStream();
@@ -231,7 +231,7 @@ namespace XSLT
int
Reader::write(const char * buffer, int len)
{
- if (buffer == NULL || len < 0)
+ if (buffer == nullptr || len < 0)
return -1;
if (len > 0)
{
@@ -271,7 +271,7 @@ namespace XSLT
void
Reader::execute()
{
- OSL_ASSERT(m_transformer != NULL);
+ OSL_ASSERT(m_transformer != nullptr);
OSL_ASSERT(m_transformer->getInputStream().is());
OSL_ASSERT(m_transformer->getOutputStream().is());
OSL_ASSERT(!m_transformer->getStyleSheetURL().isEmpty());
@@ -284,14 +284,14 @@ namespace XSLT
params[paramIndex++] = (*pit).first;
params[paramIndex++] = (*pit).second.getStr();
}
- params[paramIndex] = NULL;
+ params[paramIndex] = nullptr;
xmlDocPtr doc = xmlReadIO(&ParserInputBufferCallback::on_read,
&ParserInputBufferCallback::on_close,
- static_cast<void*> (this), NULL, NULL, 0);
+ static_cast<void*> (this), nullptr, nullptr, 0);
xsltStylesheetPtr styleSheet = xsltParseStylesheetFile(
reinterpret_cast<const xmlChar *>(m_transformer->getStyleSheetURL().getStr()));
- xmlDocPtr result = NULL;
- xsltTransformContextPtr tcontext = NULL;
+ xmlDocPtr result = nullptr;
+ xsltTransformContextPtr tcontext = nullptr;
exsltRegisterAll();
registerExtensionModule();
#if OSL_DEBUG_LEVEL > 1
@@ -304,7 +304,7 @@ namespace XSLT
tcontext = xsltNewTransformContext(styleSheet, doc);
tcontext->_private = static_cast<void *> (oh.get());
xsltQuoteUserParams(tcontext, &params[0]);
- result = xsltApplyStylesheetUser(styleSheet, doc, 0, 0, 0,
+ result = xsltApplyStylesheetUser(styleSheet, doc, nullptr, nullptr, nullptr,
tcontext);
}
@@ -342,7 +342,7 @@ namespace XSLT
Reader::registerExtensionModule()
{
const xmlChar* oleModuleURI = reinterpret_cast<const xmlChar *>(EXT_MODULE_OLE_URI);
- xsltRegisterExtModule(oleModuleURI, &ExtFuncOleCB::init, NULL);
+ xsltRegisterExtModule(oleModuleURI, &ExtFuncOleCB::init, nullptr);
xsltRegisterExtModuleFunction(
reinterpret_cast<const xmlChar*>("insertByName"),
oleModuleURI,
diff --git a/filter/source/xsltfilter/OleHandler.cxx b/filter/source/xsltfilter/OleHandler.cxx
index dbf10e04a30b..e0d083aef727 100644
--- a/filter/source/xsltfilter/OleHandler.cxx
+++ b/filter/source/xsltfilter/OleHandler.cxx
@@ -59,7 +59,7 @@ namespace XSLT
void SAL_CALL OleHandler::ensureCreateRootStorage()
{
- if (m_storage == NULL || m_rootStream == NULL)
+ if (m_storage == nullptr || m_rootStream == nullptr)
{
m_rootStream = createTempFile();
Sequence<Any> args(1);
diff --git a/filter/source/xsltfilter/XSLTFilter.cxx b/filter/source/xsltfilter/XSLTFilter.cxx
index dc478cef6336..6a1f849eaa8a 100644
--- a/filter/source/xsltfilter/XSLTFilter.cxx
+++ b/filter/source/xsltfilter/XSLTFilter.cxx
@@ -562,7 +562,7 @@ extern "C"
SAL_DLLPUBLIC_EXPORT void * SAL_CALL xsltfilter_component_getFactory(const sal_Char * pImplName,
void * pServiceManager, void * /* pRegistryKey */)
{
- void * pRet = 0;
+ void * pRet = nullptr;
if (pServiceManager)
{
diff --git a/include/filter/msfilter/escherex.hxx b/include/filter/msfilter/escherex.hxx
index 852202b5817d..78210d97552e 100644
--- a/include/filter/msfilter/escherex.hxx
+++ b/include/filter/msfilter/escherex.hxx
@@ -668,7 +668,7 @@ public:
sal_uInt32 nPictureOffset,
const GraphicObject& rObj,
const OString& rId,
- const GraphicAttr* pAttr = NULL
+ const GraphicAttr* pAttr = nullptr
);
~EscherBlibEntry();
@@ -700,16 +700,16 @@ protected:
public:
- sal_uInt32 GetBlibStoreContainerSize( SvStream* pMergePicStreamBSE = NULL ) const;
- void WriteBlibStoreContainer( SvStream& rStrm, SvStream* pMergePicStreamBSE = NULL );
+ sal_uInt32 GetBlibStoreContainerSize( SvStream* pMergePicStreamBSE = nullptr ) const;
+ void WriteBlibStoreContainer( SvStream& rStrm, SvStream* pMergePicStreamBSE = nullptr );
bool WriteBlibStoreEntry(SvStream& rStrm, sal_uInt32 nBlipId,
bool bWritePictureOffset, sal_uInt32 nResize = 0);
sal_uInt32 GetBlibID(
SvStream& rPicOutStream,
const OString& rGraphicId,
const Rectangle& rBoundRect,
- const css::awt::Rectangle* pVisArea = NULL,
- const GraphicAttr* pGrafikAttr = NULL,
+ const css::awt::Rectangle* pVisArea = nullptr,
+ const GraphicAttr* pGrafikAttr = nullptr,
const bool ooxmlExport = false
);
bool HasGraphics() const { return mnBlibEntrys != 0; };
@@ -885,7 +885,7 @@ public:
sal_uInt32 nFlags,
bool bBezier,
css::awt::Rectangle& rGeoRect,
- tools::Polygon* pPolygon = NULL
+ tools::Polygon* pPolygon = nullptr
);
static sal_uInt32 GetGradientColor(
@@ -1046,8 +1046,8 @@ private:
bool bDontWriteShape;
public:
- EscherExHostAppData() : pClientAnchor(0), pClientData(0),
- pClientTextbox(0), pInteractionInfo(0), bDontWriteShape(false)
+ EscherExHostAppData() : pClientAnchor(nullptr), pClientData(nullptr),
+ pClientTextbox(nullptr), pInteractionInfo(nullptr), bDontWriteShape(false)
{}
void SetInteractionInfo( InteractionInfo* p )
@@ -1215,7 +1215,7 @@ public:
/// If pPicStreamMergeBSE is known, the BLIPs from this stream are being
/// merged into the MsofbtBSE Records of the EscherStream like it's
/// required for Excel (and maybe Word?)
- void Flush( SvStream* pPicStreamMergeBSE = NULL );
+ void Flush( SvStream* pPicStreamMergeBSE = nullptr );
/** Inserts the passed number of bytes at the current position of the
output stream.
@@ -1264,8 +1264,8 @@ public:
void AddChildAnchor( const Rectangle& rRectangle );
void AddClientAnchor( const Rectangle& rRectangle );
- virtual sal_uInt32 EnterGroup( const OUString& rShapeName, const Rectangle* pBoundRect = 0 );
- sal_uInt32 EnterGroup( const Rectangle* pBoundRect = NULL );
+ virtual sal_uInt32 EnterGroup( const OUString& rShapeName, const Rectangle* pBoundRect = nullptr );
+ sal_uInt32 EnterGroup( const Rectangle* pBoundRect = nullptr );
sal_uInt32 GetGroupLevel() const { return mnGroupLevel; };
bool SetGroupSnapRect( sal_uInt32 nGroupLevel, const Rectangle& rRect );
bool SetGroupLogicRect( sal_uInt32 nGroupLevel, const Rectangle& rRect );
diff --git a/include/filter/msfilter/msdffimp.hxx b/include/filter/msfilter/msdffimp.hxx
index 2a9a644c3bb8..6578a458e440 100644
--- a/include/filter/msfilter/msdffimp.hxx
+++ b/include/filter/msfilter/msdffimp.hxx
@@ -176,9 +176,9 @@ struct SvxMSDffConnectorRule
, ncptiB(0)
, nSpFlagsA( 0 )
, nSpFlagsB( 0 )
- , pAObj( NULL )
- , pBObj( NULL )
- , pCObj( NULL )
+ , pAObj( nullptr )
+ , pBObj( nullptr )
+ , pCObj( nullptr )
{};
};
@@ -487,7 +487,7 @@ protected:
DffObjData& rData,
void* pData,
Rectangle& rTextRect,
- SdrObject* pObj = NULL);
+ SdrObject* pObj = nullptr);
virtual bool GetColorFromPalette(sal_uInt16 nNum, Color& rColor) const;
// Fontwork objects use a new implementation of ReadObjText because the old
@@ -527,12 +527,12 @@ public:
static bool SeekToRec( SvStream& rSt,
sal_uInt16 nRecId,
sal_uLong nMaxFilePos,
- DffRecordHeader* pRecHd = NULL,
+ DffRecordHeader* pRecHd = nullptr,
sal_uLong nSkipCount = 0 );
bool SeekToRec2( sal_uInt16 nRecId1,
sal_uInt16 nRecId2,
sal_uLong nMaxFilePos,
- DffRecordHeader* pRecHd = NULL,
+ DffRecordHeader* pRecHd = nullptr,
sal_uLong nSkipCount = 0 ) const;
static OUString MSDFFReadZString( SvStream& rIn,
@@ -571,10 +571,10 @@ public:
const OUString& rBaseURL,
sal_uInt32 nOffsDgg,
SvStream* pStData,
- SdrModel* pSdrModel_ = 0,
+ SdrModel* pSdrModel_ = nullptr,
long nApplicationScale = 0,
ColorData mnDefaultColor_ = COL_DEFAULT,
- SvStream* pStData2_ = 0,
+ SvStream* pStData2_ = nullptr,
bool bSkipImages = false );
// in PPT the parameters DGGContainerOffset and PicStream are provided by an
@@ -616,7 +616,7 @@ public:
@return true if successful, false otherwise
*/
- bool GetBLIP( sal_uLong nIdx, Graphic& rData, Rectangle* pVisArea = NULL );
+ bool GetBLIP( sal_uLong nIdx, Graphic& rData, Rectangle* pVisArea = nullptr );
// TODO: provide proper documentation here
/** read a BLIP out of a already positioned stream
@@ -628,7 +628,7 @@ public:
@return true if successful, false otherwise
*/
- static bool GetBLIPDirect(SvStream& rBLIPStream, Graphic& rData, Rectangle* pVisArea = NULL );
+ static bool GetBLIPDirect(SvStream& rBLIPStream, Graphic& rData, Rectangle* pVisArea = nullptr );
bool GetShape(sal_uLong nId, SdrObject*& rpData, SvxMSDffImportData& rData);
@@ -637,21 +637,21 @@ public:
Rectangle& rClientRect,
const Rectangle& rGlobalChildRect,
int nCalledByGroup = 0,
- sal_Int32* pShapeId = NULL);
+ sal_Int32* pShapeId = nullptr);
SdrObject* ImportGroup( const DffRecordHeader& rHd,
SvStream& rSt,
void* pData,
Rectangle& rClientRect,
const Rectangle& rGlobalChildRect,
int nCalledByGroup = 0,
- sal_Int32* pShapeId = NULL );
+ sal_Int32* pShapeId = nullptr );
SdrObject* ImportShape( const DffRecordHeader& rHd,
SvStream& rSt,
void* pData,
Rectangle& rClientRect,
const Rectangle& rGlobalChildRect,
int nCalledByGroup = 0,
- sal_Int32* pShapeId = NULL);
+ sal_Int32* pShapeId = nullptr);
Rectangle GetGlobalChildAnchor( const DffRecordHeader& rHd,
SvStream& rSt,
@@ -672,7 +672,7 @@ public:
void StoreShapeOrder(sal_uLong nId,
sal_uLong nTxBx,
SdrObject* pObject,
- SwFlyFrameFormat* pFly = 0,
+ SwFlyFrameFormat* pFly = nullptr,
short nHdFtSection = 0) const;
void ExchangeInShapeOrder(SdrObject* pOldObject,
@@ -755,7 +755,7 @@ struct SvxMSDffShapeOrder
// the shape order array. The Text-Box number and the object
// pointer are only stored if the shape is really imported.
explicit SvxMSDffShapeOrder( sal_uLong nId ):
- nShapeId( nId ), nTxBxComp( 0 ), pFly( 0 ), nHdFtSection( 0 ), pObj( 0 ){}
+ nShapeId( nId ), nTxBxComp( 0 ), pFly( nullptr ), nHdFtSection( 0 ), pObj( nullptr ){}
bool operator==( const SvxMSDffShapeOrder& rEntry ) const
{ return (nTxBxComp == rEntry.nTxBxComp); }
diff --git a/include/filter/msfilter/msvbahelper.hxx b/include/filter/msfilter/msvbahelper.hxx
index fe380bbfd3d3..acd6e593460a 100644
--- a/include/filter/msfilter/msvbahelper.hxx
+++ b/include/filter/msfilter/msvbahelper.hxx
@@ -38,7 +38,7 @@ struct MSFILTER_DLLPUBLIC MacroResolvedInfo
OUString msResolvedMacro;
bool mbFound;
- inline explicit MacroResolvedInfo( SfxObjectShell* pDocContext = 0 ) : mpDocContext( pDocContext ), mbFound( false ) {}
+ inline explicit MacroResolvedInfo( SfxObjectShell* pDocContext = nullptr ) : mpDocContext( pDocContext ), mbFound( false ) {}
};
MSFILTER_DLLPUBLIC OUString makeMacroURL( const OUString& sMacroName );
diff --git a/include/filter/msfilter/rtfutil.hxx b/include/filter/msfilter/rtfutil.hxx
index b9a1de290b09..4628287d8c12 100644
--- a/include/filter/msfilter/rtfutil.hxx
+++ b/include/filter/msfilter/rtfutil.hxx
@@ -23,7 +23,7 @@ namespace rtfutil {
MSFILTER_DLLPUBLIC OString OutHex(sal_uLong nHex, sal_uInt8 nLen);
/// Handles correct unicode and legacy export of a single character.
-MSFILTER_DLLPUBLIC OString OutChar(sal_Unicode c, int *pUCMode, rtl_TextEncoding eDestEnc, bool* pSuccess = 0, bool bUnicode = true);
+MSFILTER_DLLPUBLIC OString OutChar(sal_Unicode c, int *pUCMode, rtl_TextEncoding eDestEnc, bool* pSuccess = nullptr, bool bUnicode = true);
/**
* Handles correct unicode and legacy export of a string.
diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx
index 793b80e67715..710eee35c0a6 100644
--- a/include/filter/msfilter/svdfppt.hxx
+++ b/include/filter/msfilter/svdfppt.hxx
@@ -490,7 +490,7 @@ struct MSFILTER_DLLPUBLIC PPTFieldEntry
SvxFieldItem* pField2;
OUString* pString;
- PPTFieldEntry() : nPos( 0 ), nTextRangeEnd( 0 ), pField1( NULL ), pField2( NULL ), pString( NULL ) {};
+ PPTFieldEntry() : nPos( 0 ), nTextRangeEnd( 0 ), pField1( nullptr ), pField2( nullptr ), pString( nullptr ) {};
~PPTFieldEntry();
void SetDateTime( sal_uInt32 nType );
@@ -515,7 +515,7 @@ struct MSFILTER_DLLPUBLIC HeaderFooterEntry
const PptSlidePersistEntry& rSlidePersist
);
- explicit HeaderFooterEntry( const PptSlidePersistEntry* pMaster = NULL );
+ explicit HeaderFooterEntry( const PptSlidePersistEntry* pMaster = nullptr );
~HeaderFooterEntry();
};
@@ -529,7 +529,7 @@ struct ProcessData
ProcessData( PptSlidePersistEntry& rP, SdPageCapsule pP ) :
rPersistEntry ( rP ),
pPage ( pP ),
- pTableRowProperties ( NULL ) {};
+ pTableRowProperties ( nullptr ) {};
~ProcessData() { delete[] pTableRowProperties; };
};
@@ -569,8 +569,8 @@ protected:
protected:
using SdrEscherImport::ReadObjText;
- bool SeekToAktPage(DffRecordHeader* pRecHd=NULL) const;
- bool SeekToDocument(DffRecordHeader* pRecHd=NULL) const;
+ bool SeekToAktPage(DffRecordHeader* pRecHd=nullptr) const;
+ bool SeekToDocument(DffRecordHeader* pRecHd=nullptr) const;
static bool SeekToContentOfProgTag(
sal_Int32 nVersion,
SvStream& rSt,
@@ -629,7 +629,7 @@ public:
PptPageKind ePageKind = PPT_SLIDEPAGE
) const;
- void ImportPage( SdrPage* pPage, const PptSlidePersistEntry* pMasterPersist = NULL );
+ void ImportPage( SdrPage* pPage, const PptSlidePersistEntry* pMasterPersist = nullptr );
virtual bool GetColorFromPalette(sal_uInt16 nNum, Color& rColor) const override;
virtual bool SeekToShape( SvStream& rSt, void* pClientData, sal_uInt32 nId ) const override;
virtual const PptSlideLayoutAtom* GetSlideLayoutAtom() const override;
@@ -689,7 +689,7 @@ struct PPTTextSpecInfoAtomInterpreter
SvStream& rIn,
const DffRecordHeader& rRecHd,
sal_uInt16 nRecordType,
- const PPTTextSpecInfo* pTextSpecDefault = NULL
+ const PPTTextSpecInfo* pTextSpecDefault = nullptr
);
};
@@ -1234,13 +1234,13 @@ struct ImplPPTTextObj
: mnRefCount(0)
, mnShapeId(0)
, mnShapeMaster(0)
- , mpPlaceHolderAtom(NULL)
+ , mpPlaceHolderAtom(nullptr)
, mnInstance(0)
, mnDestinationInstance(0)
, meShapeType(mso_sptMin)
, mnCurrentObject(0)
, mnParagraphCount(0)
- , mpParagraphList(NULL)
+ , mpParagraphList(nullptr)
, mrPersistEntry ( rPersistEntry )
, mnTextFlags(0) {};
};
@@ -1309,7 +1309,7 @@ public:
{};
bool ReadOCXStream( tools::SvRef<SotStorage>& rSrc1,
css::uno::Reference<
- css::drawing::XShape > *pShapeRef=0,
+ css::drawing::XShape > *pShapeRef=nullptr,
bool bFloatingCtrl=false );
virtual bool InsertControl(
const css::uno::Reference< css::form::XFormComponent > &rFComp,