summaryrefslogtreecommitdiff
path: root/sfx2/source/doc
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/doc')
-rw-r--r--sfx2/source/doc/DocumentMetadataAccess.cxx30
-rw-r--r--sfx2/source/doc/Metadatable.cxx44
-rw-r--r--sfx2/source/doc/SfxDocumentMetaData.cxx34
-rw-r--r--sfx2/source/doc/docfac.cxx10
-rw-r--r--sfx2/source/doc/docfile.cxx44
-rw-r--r--sfx2/source/doc/docfilt.cxx4
-rw-r--r--sfx2/source/doc/docinsert.cxx18
-rw-r--r--sfx2/source/doc/docstoragemodifylistener.cxx2
-rw-r--r--sfx2/source/doc/doctempl.cxx28
-rw-r--r--sfx2/source/doc/doctemplates.cxx14
-rw-r--r--sfx2/source/doc/docundomanager.cxx12
-rw-r--r--sfx2/source/doc/frmdescr.cxx2
-rw-r--r--sfx2/source/doc/graphhelp.cxx6
-rw-r--r--sfx2/source/doc/guisaveas.cxx12
-rw-r--r--sfx2/source/doc/iframe.cxx4
-rw-r--r--sfx2/source/doc/new.cxx4
-rw-r--r--sfx2/source/doc/objcont.cxx2
-rw-r--r--sfx2/source/doc/objembed.cxx10
-rw-r--r--sfx2/source/doc/objitem.cxx2
-rw-r--r--sfx2/source/doc/objmisc.cxx18
-rw-r--r--sfx2/source/doc/objserv.cxx10
-rw-r--r--sfx2/source/doc/objstor.cxx32
-rw-r--r--sfx2/source/doc/objxtor.cxx50
-rw-r--r--sfx2/source/doc/oleprops.cxx12
-rw-r--r--sfx2/source/doc/ownsubfilterservice.cxx2
-rw-r--r--sfx2/source/doc/plugin.cxx2
-rw-r--r--sfx2/source/doc/printhelper.cxx20
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx60
-rw-r--r--sfx2/source/doc/templatedlg.cxx4
29 files changed, 246 insertions, 246 deletions
diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx
index 6be319040305..eecca2634303 100644
--- a/sfx2/source/doc/DocumentMetadataAccess.cxx
+++ b/sfx2/source/doc/DocumentMetadataAccess.cxx
@@ -287,7 +287,7 @@ static void
addFile(struct DocumentMetadataAccess_Impl & i_rImpl,
uno::Reference<rdf::XURI> const& i_xType,
OUString const & i_rPath,
- const uno::Sequence < uno::Reference< rdf::XURI > > * i_pTypes = 0)
+ const uno::Sequence < uno::Reference< rdf::XURI > > * i_pTypes = nullptr)
{
try {
const uno::Reference<rdf::XURI> xURI( getURIForStream(
@@ -310,7 +310,7 @@ addFile(struct DocumentMetadataAccess_Impl & i_rImpl,
throw;
} catch (const uno::Exception & e) {
throw lang::WrappedTargetRuntimeException(
- "addFile: exception", /*this*/0, uno::makeAny(e));
+ "addFile: exception", /*this*/nullptr, uno::makeAny(e));
}
}
@@ -353,13 +353,13 @@ removeFile(struct DocumentMetadataAccess_Impl & i_rImpl,
getURI<rdf::URIs::PKG_HASPART>(i_rImpl.m_xContext),
i_xPart.get());
i_rImpl.m_xManifest->removeStatements(i_xPart.get(),
- getURI<rdf::URIs::RDF_TYPE>(i_rImpl.m_xContext), 0);
+ getURI<rdf::URIs::RDF_TYPE>(i_rImpl.m_xContext), nullptr);
} catch (const uno::RuntimeException &) {
throw;
} catch (const uno::Exception & e) {
throw lang::WrappedTargetRuntimeException(
"removeFile: exception",
- 0, uno::makeAny(e));
+ nullptr, uno::makeAny(e));
}
}
@@ -370,7 +370,7 @@ getAllParts(struct DocumentMetadataAccess_Impl & i_rImpl)
try {
const uno::Reference<container::XEnumeration> xEnum(
i_rImpl.m_xManifest->getStatements( i_rImpl.m_xBaseURI.get(),
- getURI<rdf::URIs::PKG_HASPART>(i_rImpl.m_xContext), 0),
+ getURI<rdf::URIs::PKG_HASPART>(i_rImpl.m_xContext), nullptr),
uno::UNO_SET_THROW);
while (xEnum->hasMoreElements()) {
rdf::Statement stmt;
@@ -388,7 +388,7 @@ getAllParts(struct DocumentMetadataAccess_Impl & i_rImpl)
} catch (const uno::Exception & e) {
throw lang::WrappedTargetRuntimeException(
"getAllParts: exception",
- 0, uno::makeAny(e));
+ nullptr, uno::makeAny(e));
}
}
@@ -410,7 +410,7 @@ isPartOfType(struct DocumentMetadataAccess_Impl & i_rImpl,
} catch (const uno::Exception & e) {
throw lang::WrappedTargetRuntimeException(
"isPartOfType: exception",
- 0, uno::makeAny(e));
+ nullptr, uno::makeAny(e));
}
}
@@ -449,7 +449,7 @@ handleError( ucb::InteractiveAugmentedIOException const & i_rException,
if (!i_xHandler.is()) {
throw lang::WrappedTargetException(
"DocumentMetadataAccess::loadMetadataFromStorage: exception",
- /* *this*/ 0, uno::makeAny(i_rException));
+ /* *this*/ nullptr, uno::makeAny(i_rException));
}
::rtl::Reference< ::comphelper::OInteractionRequest > pRequest(
@@ -473,7 +473,7 @@ handleError( ucb::InteractiveAugmentedIOException const & i_rException,
OSL_ENSURE(pAbort->wasSelected(), "no continuation selected?");
throw lang::WrappedTargetException(
"DocumentMetadataAccess::loadMetadataFromStorage: exception",
- /* *this*/ 0, uno::makeAny(i_rException));
+ /* *this*/ nullptr, uno::makeAny(i_rException));
}
}
@@ -589,7 +589,7 @@ retry:
} catch (const uno::Exception & e) {
throw lang::WrappedTargetRuntimeException(
"importFile: exception",
- 0, uno::makeAny(e));
+ nullptr, uno::makeAny(e));
}
}
@@ -712,7 +712,7 @@ retry:
i_rImpl.m_xManifest.set(xManifestGraph.is() ? xManifestGraph :
i_rImpl.m_xRepository->createGraph(xManifest), uno::UNO_SET_THROW);
const uno::Reference<container::XEnumeration> xEnum(
- i_rImpl.m_xManifest->getStatements(0,
+ i_rImpl.m_xManifest->getStatements(nullptr,
getURI<rdf::URIs::RDF_TYPE>(i_rImpl.m_xContext),
getURI<rdf::URIs::PKG_DOCUMENT>(i_rImpl.m_xContext).get()));
@@ -729,7 +729,7 @@ retry:
throw lang::WrappedTargetRuntimeException(
OUString(
"DocumentMetadataAccess::loadMetadataFromStorage: "
- "exception"), 0, rterr);
+ "exception"), nullptr, rterr);
}
if (err) {
@@ -752,7 +752,7 @@ static void init(struct DocumentMetadataAccess_Impl & i_rImpl)
getURI<rdf::URIs::PKG_DOCUMENT>(i_rImpl.m_xContext).get());
} catch (const uno::Exception & e) {
throw lang::WrappedTargetRuntimeException(
- "init: unexpected exception", 0,
+ "init: unexpected exception", nullptr,
uno::makeAny(e));
}
@@ -856,13 +856,13 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, std::exception)
const OUString baseURI( m_pImpl->m_xBaseURI->getStringValue() );
const OUString name( i_xURI->getStringValue() );
if (!name.match(baseURI)) {
- return 0;
+ return nullptr;
}
const OUString relName( name.copy(baseURI.getLength()) );
OUString path;
OUString idref;
if (!splitXmlId(relName, path, idref)) {
- return 0;
+ return nullptr;
}
return getElementByMetadataReference( beans::StringPair(path, idref) );
diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx
index 77cf9533aa39..f64da90a2146 100644
--- a/sfx2/source/doc/Metadatable.cxx
+++ b/sfx2/source/doc/Metadatable.cxx
@@ -297,7 +297,7 @@ public:
virtual bool IsInContent() const override { return m_isInContent; }
virtual css::uno::Reference< css::rdf::XMetadatable > MakeUnoObject() override
{ OSL_FAIL("MetadatableClipboard::MakeUnoObject"); throw; }
- void OriginNoLongerInBusinessAnymore() { m_pReg = 0; }
+ void OriginNoLongerInBusinessAnymore() { m_pReg = nullptr; }
};
// XmlIdRegistryClipboard --------------------------------------------
@@ -366,7 +366,7 @@ XmlIdRegistry::GetElementByMetadataReference(
{
Metadatable* pObject( LookupElement(i_rReference.First,
i_rReference.Second) );
- return pObject ? pObject->MakeUnoObject() : 0;
+ return pObject ? pObject->MakeUnoObject() : nullptr;
}
beans::StringPair
@@ -390,7 +390,7 @@ template< typename T >
/*static*/ OUString create_id(const
std::unordered_map< OUString, T, OUStringHash > & i_rXmlIdMap)
{
- static bool bHack = (getenv("LIBO_ONEWAY_STABLE_ODF_EXPORT") != NULL);
+ static bool bHack = (getenv("LIBO_ONEWAY_STABLE_ODF_EXPORT") != nullptr);
const OUString prefix(s_prefix);
typename std::unordered_map< OUString, T, OUStringHash >
::const_iterator iter;
@@ -512,7 +512,7 @@ XmlIdRegistryDocument::XmlIdRegistry_Impl::LookupElementList(
}
else
{
- return 0;
+ return nullptr;
}
}
@@ -524,7 +524,7 @@ XmlIdRegistryDocument::XmlIdRegistry_Impl::LookupElement(
if (!isValidXmlId(i_rStreamName, i_rIdref))
{
throw lang::IllegalArgumentException(OUString(
- "illegal XmlId"), 0, 0);
+ "illegal XmlId"), nullptr, 0);
}
const XmlIdList_t * pList( LookupElementList(i_rStreamName, i_rIdref) );
@@ -540,7 +540,7 @@ XmlIdRegistryDocument::XmlIdRegistry_Impl::LookupElement(
return *iter;
}
}
- return 0;
+ return nullptr;
}
bool
@@ -680,14 +680,14 @@ XmlIdRegistryDocument::TryRegisterMetadatable(Metadatable & i_rObject,
if (!isValidXmlId(i_rStreamName, i_rIdref))
{
throw lang::IllegalArgumentException(OUString(
- "illegal XmlId"), 0, 0);
+ "illegal XmlId"), nullptr, 0);
}
if (i_rObject.IsInContent()
? !isContentFile(i_rStreamName)
: !isStylesFile(i_rStreamName))
{
throw lang::IllegalArgumentException(OUString(
- "illegal XmlId: wrong stream"), 0, 0);
+ "illegal XmlId: wrong stream"), nullptr, 0);
}
OUString old_path;
@@ -964,7 +964,7 @@ rmIter(ClipboardXmlIdMap_t & i_rXmlIdMap,
? i_rIter->second.first : i_rIter->second.second;
if (rMeta == &i_rObject)
{
- rMeta = 0;
+ rMeta = nullptr;
}
if (!i_rIter->second.first && !i_rIter->second.second)
{
@@ -983,7 +983,7 @@ XmlIdRegistryClipboard::XmlIdRegistry_Impl::LookupEntry(
if (!isValidXmlId(i_rStreamName, i_rIdref))
{
throw lang::IllegalArgumentException(OUString(
- "illegal XmlId"), 0, 0);
+ "illegal XmlId"), nullptr, 0);
}
const ClipboardXmlIdMap_t::const_iterator iter( m_XmlIdMap.find(i_rIdref) );
@@ -997,7 +997,7 @@ XmlIdRegistryClipboard::XmlIdRegistry_Impl::LookupEntry(
}
else
{
- return 0;
+ return nullptr;
}
}
@@ -1007,7 +1007,7 @@ XmlIdRegistryClipboard::XmlIdRegistry_Impl::LookupElement(
const OUString & i_rIdref) const
{
Metadatable * const * ppEntry = LookupEntry(i_rStreamName, i_rIdref);
- return ppEntry ? *ppEntry : 0;
+ return ppEntry ? *ppEntry : nullptr;
}
bool
@@ -1060,8 +1060,8 @@ XmlIdRegistryClipboard::XmlIdRegistry_Impl::TryInsertMetadatable(
else
{
m_XmlIdMap.insert(::std::make_pair(i_rIdref, bContent
- ? ::std::make_pair( &i_rObject, static_cast<Metadatable*>(0) )
- : ::std::make_pair( static_cast<Metadatable*>(0), &i_rObject )));
+ ? ::std::make_pair( &i_rObject, static_cast<Metadatable*>(nullptr) )
+ : ::std::make_pair( static_cast<Metadatable*>(nullptr), &i_rObject )));
return true;
}
}
@@ -1112,14 +1112,14 @@ XmlIdRegistryClipboard::TryRegisterMetadatable(Metadatable & i_rObject,
if (!isValidXmlId(i_rStreamName, i_rIdref))
{
throw lang::IllegalArgumentException(OUString(
- "illegal XmlId"), 0, 0);
+ "illegal XmlId"), nullptr, 0);
}
if (i_rObject.IsInContent()
? !isContentFile(i_rStreamName)
: !isStylesFile(i_rStreamName))
{
throw lang::IllegalArgumentException(OUString(
- "illegal XmlId: wrong stream"), 0, 0);
+ "illegal XmlId: wrong stream"), nullptr, 0);
}
OUString old_path;
@@ -1177,8 +1177,8 @@ XmlIdRegistryClipboard::RegisterMetadatableAndCreateID(Metadatable & i_rObject)
OSL_ENSURE(m_pImpl->m_XmlIdMap.find(id) == m_pImpl->m_XmlIdMap.end(),
"created id is in use");
m_pImpl->m_XmlIdMap.insert(::std::make_pair(id, isInContent
- ? ::std::make_pair( &i_rObject, static_cast<Metadatable*>(0) )
- : ::std::make_pair( static_cast<Metadatable*>(0), &i_rObject )));
+ ? ::std::make_pair( &i_rObject, static_cast<Metadatable*>(nullptr) )
+ : ::std::make_pair( static_cast<Metadatable*>(nullptr), &i_rObject )));
// N.B.: if i_rObject had a latent XmlId, then we implicitly delete the
// MetadatableClipboard and thus the latent XmlId here
m_pImpl->m_XmlIdReverseMap[&i_rObject] = RMapEntry(stream, id);
@@ -1249,7 +1249,7 @@ XmlIdRegistryClipboard::RegisterCopyClipboard(Metadatable & i_rCopy,
if (!isValidXmlId(i_rReference.First, i_rReference.Second))
{
throw lang::IllegalArgumentException(OUString(
- "illegal XmlId"), 0, 0);
+ "illegal XmlId"), nullptr, 0);
}
if (!i_isLatent)
@@ -1272,7 +1272,7 @@ XmlIdRegistryClipboard::SourceLink(Metadatable const& i_rObject)
{
OUString path;
OUString idref;
- const MetadatableClipboard * pLink( 0 );
+ const MetadatableClipboard * pLink( nullptr );
m_pImpl->LookupXmlId(i_rObject, path, idref, pLink);
return pLink;
}
@@ -1295,7 +1295,7 @@ void Metadatable::RemoveMetadataReference()
{
m_pReg->UnregisterMetadatable( *this );
m_pReg->RemoveXmlIdForElement( *this );
- m_pReg = 0;
+ m_pReg = nullptr;
}
}
catch (const uno::Exception &)
@@ -1340,7 +1340,7 @@ void Metadatable::SetMetadataReference( const css::beans::StringPair & i_rRefere
{
throw lang::IllegalArgumentException(
OUString("Metadatable::"
- "SetMetadataReference: argument is invalid"), /*this*/0, 0);
+ "SetMetadataReference: argument is invalid"), /*this*/nullptr, 0);
}
}
}
diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx
index a51996f89e66..13b413c9b50d 100644
--- a/sfx2/source/doc/SfxDocumentMetaData.cxx
+++ b/sfx2/source/doc/SfxDocumentMetaData.cxx
@@ -324,7 +324,7 @@ protected:
void SAL_CALL init(css::uno::Reference<css::xml::dom::XDocument> i_xDom);
/// update element in DOM tree
void SAL_CALL updateElement(const char *i_name,
- std::vector<std::pair<const char *, OUString> >* i_pAttrs = 0);
+ std::vector<std::pair<const char *, OUString> >* i_pAttrs = nullptr);
/// update user-defined meta data and attributes in DOM tree
void SAL_CALL updateUserDefinedAndAttributes();
/// create empty DOM tree (XDocument)
@@ -349,7 +349,7 @@ protected:
/// set text of a list of standard meta data elements (multiple occ.)
bool SAL_CALL setMetaList(const char* i_name,
const css::uno::Sequence< OUString > & i_rValue,
- AttrVector const* = 0);
+ AttrVector const* = nullptr);
void createUserDefined();
};
@@ -422,7 +422,7 @@ const char* s_stdStatAttrs[] = {
"meta:syllable-count",
"meta:non-whitespace-character-count",
"meta:cell-count",
- 0
+ nullptr
};
// NB: keep these two arrays in sync!
@@ -442,7 +442,7 @@ const char* s_stdStats[] = {
"SyllableCount",
"NonWhitespaceCharacterCount",
"CellCount",
- 0
+ nullptr
};
const char* s_stdMeta[] = {
@@ -463,13 +463,13 @@ const char* s_stdMeta[] = {
"meta:editing-cycles", // nonNegativeInteger
"meta:editing-duration", // duration
"meta:document-statistic", // ... // note: statistic is singular, no s!
- 0
+ nullptr
};
const char* s_stdMetaList[] = {
"meta:keyword", // string*
"meta:user-defined", // ...*
- 0
+ nullptr
};
const char* s_nsXLink = "http://www.w3.org/1999/xlink";
@@ -534,7 +534,7 @@ textToDateOrDateTime(css::util::Date & io_rd, css::util::DateTime & io_rdt,
bool SAL_CALL
textToDateTime(css::util::DateTime & io_rdt, const OUString& i_text) throw ()
{
- if (::sax::Converter::parseDateTime(io_rdt, 0, i_text)) {
+ if (::sax::Converter::parseDateTime(io_rdt, nullptr, i_text)) {
return true;
} else {
SAL_WARN_IF(!i_text.isEmpty(), "sfx.doc", "Invalid date: " << i_text);
@@ -555,7 +555,7 @@ textToDateTimeDefault(const OUString& i_text) throw ()
// convert date to string
OUString SAL_CALL
dateToText(css::util::Date const& i_rd,
- sal_Int16 const*const pTimeZone = 0) throw ()
+ sal_Int16 const*const pTimeZone = nullptr) throw ()
{
if (isValidDate(i_rd)) {
OUStringBuffer buf;
@@ -570,7 +570,7 @@ dateToText(css::util::Date const& i_rd,
// convert date/time to string
OUString SAL_CALL
dateTimeToText(css::util::DateTime const& i_rdt,
- sal_Int16 const*const pTimeZone = 0) throw ()
+ sal_Int16 const*const pTimeZone = nullptr) throw ()
{
if (isValidDateTime(i_rdt)) {
OUStringBuffer buf;
@@ -809,7 +809,7 @@ SfxDocumentMetaData::setMetaList(const char* i_name,
// throw (css::uno::RuntimeException)
{
checkInit();
- DBG_ASSERT((i_pAttrs == 0) ||
+ DBG_ASSERT((i_pAttrs == nullptr) ||
(static_cast<size_t>(i_rValue.getLength()) == i_pAttrs->size()),
"SfxDocumentMetaData::setMetaList: invalid args");
@@ -822,7 +822,7 @@ SfxDocumentMetaData::setMetaList(const char* i_name,
// if nothing changed, do nothing
// alas, this does not check for permutations, or attributes...
- if ((0 == i_pAttrs)) {
+ if ((nullptr == i_pAttrs)) {
if (static_cast<size_t>(i_rValue.getLength()) == vec.size()) {
bool isEqual(true);
for (sal_Int32 i = 0; i < i_rValue.getLength(); ++i) {
@@ -868,7 +868,7 @@ SfxDocumentMetaData::setMetaList(const char* i_name,
css::uno::Reference<css::xml::dom::XNode> xTextNode(
m_xDoc->createTextNode(i_rValue[i]), css::uno::UNO_QUERY_THROW);
// set attributes
- if (i_pAttrs != 0) {
+ if (i_pAttrs != nullptr) {
for (std::vector<std::pair<const char*, OUString> >
::const_iterator it = (*i_pAttrs)[i].begin();
it != (*i_pAttrs)[i].end(); ++it) {
@@ -1018,7 +1018,7 @@ SfxDocumentMetaData::updateElement(const char *i_name,
xNode.clear();
}
// add new element
- if (0 != i_pAttrs) {
+ if (nullptr != i_pAttrs) {
css::uno::Reference<css::xml::dom::XElement> xElem(
m_xDoc->createElementNS(getNameSpace(i_name), name),
css::uno::UNO_QUERY_THROW);
@@ -1217,7 +1217,7 @@ void SAL_CALL SfxDocumentMetaData::init(
// select nodes for elements of which we only handle one occurrence
- for (const char **pName = s_stdMeta; *pName != 0; ++pName) {
+ for (const char **pName = s_stdMeta; *pName != nullptr; ++pName) {
OUString name = OUString::createFromAscii(*pName);
// NB: If a document contains more than one occurrence of a
// meta-data element, we arbitrarily pick one of them here.
@@ -1233,7 +1233,7 @@ void SAL_CALL SfxDocumentMetaData::init(
}
// select nodes for elements of which we handle all occurrences
- for (const char **pName = s_stdMetaList; *pName != 0; ++pName) {
+ for (const char **pName = s_stdMetaList; *pName != nullptr; ++pName) {
OUString name = OUString::createFromAscii(*pName);
css::uno::Reference<css::xml::dom::XNodeList> nodes =
xPath->selectNodeList(m_xParent, "child::" + name);
@@ -1718,7 +1718,7 @@ SfxDocumentMetaData::getDocumentStatistics() throw (css::uno::RuntimeException,
::osl::MutexGuard g(m_aMutex);
checkInit();
::std::vector<css::beans::NamedValue> stats;
- for (size_t i = 0; s_stdStats[i] != 0; ++i) {
+ for (size_t i = 0; s_stdStats[i] != nullptr; ++i) {
const char * aName = s_stdStatAttrs[i];
OUString text = getMetaAttr("meta:document-statistic", aName);
if (text.isEmpty()) continue;
@@ -1749,7 +1749,7 @@ SfxDocumentMetaData::setDocumentStatistics(
for (sal_Int32 i = 0; i < the_value.getLength(); ++i) {
const OUString name = the_value[i].Name;
// inefficently search for matching attribute
- for (size_t j = 0; s_stdStats[j] != 0; ++j) {
+ for (size_t j = 0; s_stdStats[j] != nullptr; ++j) {
if (name.equalsAscii(s_stdStats[j])) {
const css::uno::Any any = the_value[i].Value;
sal_Int32 val = 0;
diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx
index 4630a83f3028..e6225a998a86 100644
--- a/sfx2/source/doc/docfac.cxx
+++ b/sfx2/source/doc/docfac.cxx
@@ -71,9 +71,9 @@ struct SfxObjectFactory_Impl
SvGlobalName aClassName;
SfxObjectFactory_Impl() :
- pNameResId ( NULL ),
- pFilterContainer ( NULL ),
- pModule ( NULL ),
+ pNameResId ( nullptr ),
+ pFilterContainer ( nullptr ),
+ pModule ( nullptr ),
nImageId ( 0 ),
bTemplateInitialized( false )
{}
@@ -327,7 +327,7 @@ const SfxFilter* SfxObjectFactory::GetTemplateFilter() const
sal_uInt16 nVersion=0;
SfxFilterMatcher aMatcher ( OUString::createFromAscii( pShortName ) );
SfxFilterMatcherIter aIter( aMatcher );
- const SfxFilter *pFilter = 0;
+ const SfxFilter *pFilter = nullptr;
const SfxFilter *pTemp = aIter.First();
while ( pTemp )
{
@@ -416,7 +416,7 @@ SfxViewFactory* SfxObjectFactory::GetViewFactoryByViewName( const OUString& i_rV
)
return &rViewFac;
}
- return NULL;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 8aeda012a4af..563803abafd1 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -243,7 +243,7 @@ public:
~SfxMedium_Impl();
OUString getFilterMimeType()
- { return m_pFilter == 0 ? OUString() : m_pFilter->GetMimeType(); }
+ { return m_pFilter == nullptr ? OUString() : m_pFilter->GetMimeType(); }
};
@@ -269,15 +269,15 @@ SfxMedium_Impl::SfxMedium_Impl( SfxMedium* pAntiImplP ) :
m_bRemote(false),
m_bInputStreamIsReadOnly(false),
m_bInCheckIn(false),
- m_pSet(NULL),
- m_pURLObj(NULL),
- m_pFilter(NULL),
+ m_pSet(nullptr),
+ m_pURLObj(nullptr),
+ m_pFilter(nullptr),
pAntiImpl( pAntiImplP ),
- m_pInStream(NULL),
- m_pOutStream(NULL),
- pOrigFilter( 0 ),
+ m_pInStream(nullptr),
+ m_pOutStream(nullptr),
+ pOrigFilter( nullptr ),
aExpireTime( Date( Date::SYSTEM ) + 10, tools::Time( tools::Time::SYSTEM ) ),
- pTempFile( NULL ),
+ pTempFile( nullptr ),
nLastStorageError( 0 ),
m_nSignatureState( SignatureState::NOSIGNATURES )
{
@@ -502,7 +502,7 @@ SvStream* SfxMedium::GetInStream()
{
pImp->m_eError = ERRCODE_IO_ACCESSDENIED;
delete pImp->m_pInStream;
- pImp->m_pInStream = NULL;
+ pImp->m_pInStream = nullptr;
}
else
return pImp->m_pInStream;
@@ -511,7 +511,7 @@ SvStream* SfxMedium::GetInStream()
GetMedium_Impl();
if ( GetError() )
- return NULL;
+ return nullptr;
return pImp->m_pInStream;
}
@@ -613,7 +613,7 @@ bool SfxMedium::CloseOutStream_Impl()
}
delete pImp->m_pOutStream;
- pImp->m_pOutStream = NULL;
+ pImp->m_pOutStream = nullptr;
}
if ( !pImp->m_pInStream )
@@ -1367,7 +1367,7 @@ uno::Reference < embed::XStorage > SfxMedium::GetStorage( bool bCreateTempIfNo )
if( ( pImp->nLastStorageError = GetError() ) != SVSTREAM_OK )
{
- pImp->xStorage = 0;
+ pImp->xStorage = nullptr;
if ( pImp->m_pInStream )
pImp->m_pInStream->Seek(0);
return uno::Reference< embed::XStorage >();
@@ -1749,7 +1749,7 @@ bool SfxMedium::TransactedTransferForFS_Impl( const INetURLObject& aSource,
{
pImp->pTempFile->EnableKillingFile();
delete pImp->pTempFile;
- pImp->pTempFile = NULL;
+ pImp->pTempFile = nullptr;
}
}
else if ( bTransactStarted )
@@ -1896,7 +1896,7 @@ void SfxMedium::Transfer_Impl()
{
pImp->pTempFile->EnableKillingFile();
delete pImp->pTempFile;
- pImp->pTempFile = NULL;
+ pImp->pTempFile = nullptr;
}
}
catch( const Exception& )
@@ -2374,7 +2374,7 @@ void SfxMedium::GetMedium_Impl()
// in case the temporary file exists the streams should be initialized from it,
// but the original MediaDescriptor should not be changed
- bool bFromTempFile = ( pImp->pTempFile != NULL );
+ bool bFromTempFile = ( pImp->pTempFile != nullptr );
if ( !bFromTempFile )
{
@@ -2524,7 +2524,7 @@ void SfxMedium::Init_Impl()
const SfxStringItem* pSalvageItem = SfxItemSet::GetItem<SfxStringItem>(pImp->m_pSet, SID_DOC_SALVAGE, false);
if ( pSalvageItem && pSalvageItem->GetValue().isEmpty() )
{
- pSalvageItem = NULL;
+ pSalvageItem = nullptr;
pImp->m_pSet->ClearItem( SID_DOC_SALVAGE );
}
@@ -2643,7 +2643,7 @@ SfxMedium::GetInteractionHandler( bool bGetAlways )
// create default handler and cache it!
Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
pImp->xInteraction.set(
- task::InteractionHandler::createWithParent(xContext, 0), UNO_QUERY_THROW );
+ task::InteractionHandler::createWithParent(xContext, nullptr), UNO_QUERY_THROW );
return pImp->xInteraction;
}
@@ -2881,7 +2881,7 @@ void SfxMedium::SetPhysicalName_Impl( const OUString& rNameP )
if( pImp->pTempFile )
{
delete pImp->pTempFile;
- pImp->pTempFile = NULL;
+ pImp->pTempFile = nullptr;
}
if ( !pImp->m_aName.isEmpty() || !rNameP.isEmpty() )
@@ -2911,11 +2911,11 @@ void SfxMedium::CompleteReOpen()
bool bUseInteractionHandler = pImp->bUseInteractionHandler;
pImp->bUseInteractionHandler = false;
- ::utl::TempFile* pTmpFile = NULL;
+ ::utl::TempFile* pTmpFile = nullptr;
if ( pImp->pTempFile )
{
pTmpFile = pImp->pTempFile;
- pImp->pTempFile = NULL;
+ pImp->pTempFile = nullptr;
pImp->m_aName.clear();
}
@@ -2957,7 +2957,7 @@ SfxMedium::SfxMedium(const OUString &rName, const OUString &rReferer, StreamMode
{
pImp->m_pSet = pInSet;
SfxItemSet * s = GetItemSet();
- if (s->GetItem(SID_REFERER) == 0) {
+ if (s->GetItem(SID_REFERER) == nullptr) {
s->Put(SfxStringItem(SID_REFERER, rReferer));
}
pImp->m_pFilter = pFlt;
@@ -2975,7 +2975,7 @@ SfxMedium::SfxMedium( const uno::Sequence<beans::PropertyValue>& aArgs ) :
OUString aFilterProvider, aFilterName;
{
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
if (pImp->m_pSet->HasItem(SID_FILTER_PROVIDER, &pItem))
aFilterProvider = static_cast<const SfxStringItem*>(pItem)->GetValue();
diff --git a/sfx2/source/doc/docfilt.cxx b/sfx2/source/doc/docfilt.cxx
index 916efc78a98f..bcafad22c3ab 100644
--- a/sfx2/source/doc/docfilt.cxx
+++ b/sfx2/source/doc/docfilt.cxx
@@ -140,7 +140,7 @@ const SfxFilter* SfxFilter::GetFilterByName( const OUString& rName )
OUString SfxFilter::GetTypeFromStorage( const SotStorage& rStg )
{
- const char* pType=0;
+ const char* pType=nullptr;
if ( rStg.IsStream( "WordDocument" ) )
{
if ( rStg.IsStream( "0Table" ) || rStg.IsStream( "1Table" ) )
@@ -211,7 +211,7 @@ OUString SfxFilter::GetTypeFromStorage(
// template filters shouldn't be detected if not explicitly asked for
nDont |= SfxFilterFlags::TEMPLATEPATH;
- const SfxFilter* pFilter = 0;
+ const SfxFilter* pFilter = nullptr;
if (!aName.isEmpty())
// get preselected Filter if it matches the desired filter flags
pFilter = aMatcher.GetFilter4FilterName( aName, nMust, nDont );
diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx
index 8c479a95f4cb..ca097d5136af 100644
--- a/sfx2/source/doc/docinsert.cxx
+++ b/sfx2/source/doc/docinsert.cxx
@@ -55,8 +55,8 @@ DocumentInserter::DocumentInserter(
? (SFXWB_INSERT|SFXWB_MULTISELECTION)
: SFXWB_INSERT )
, m_nError ( ERRCODE_NONE )
- , m_pFileDlg ( NULL )
- , m_pItemSet ( NULL )
+ , m_pFileDlg ( nullptr )
+ , m_pItemSet ( nullptr )
{
}
@@ -80,7 +80,7 @@ void DocumentInserter::StartExecuteModal( const Link<sfx2::FileDialogHelper*,voi
SfxMedium* DocumentInserter::CreateMedium()
{
- SfxMedium* pMedium = NULL;
+ SfxMedium* pMedium = nullptr;
if (!m_nError && m_pItemSet && !m_pURLList.empty())
{
DBG_ASSERT( m_pURLList.size() == 1, "DocumentInserter::CreateMedium(): invalid URL list count" );
@@ -89,21 +89,21 @@ SfxMedium* DocumentInserter::CreateMedium()
sURL, SFX_STREAM_READONLY,
SfxGetpApp()->GetFilterMatcher().GetFilter4FilterName( m_sFilter ), m_pItemSet );
pMedium->UseInteractionHandler( true );
- SfxFilterMatcher* pMatcher = NULL;
+ SfxFilterMatcher* pMatcher = nullptr;
if ( !m_sDocFactory.isEmpty() )
pMatcher = new SfxFilterMatcher( m_sDocFactory );
else
pMatcher = new SfxFilterMatcher();
- const SfxFilter* pFilter = NULL;
+ const SfxFilter* pFilter = nullptr;
sal_uInt32 nError = pMatcher->DetectFilter( *pMedium, &pFilter, false );
if ( nError == ERRCODE_NONE && pFilter )
pMedium->SetFilter( pFilter );
else
DELETEZ( pMedium );
- if ( pMedium && CheckPasswd_Impl( 0, SfxGetpApp()->GetPool(), pMedium ) == ERRCODE_ABORT )
- pMedium = NULL;
+ if ( pMedium && CheckPasswd_Impl( nullptr, SfxGetpApp()->GetPool(), pMedium ) == ERRCODE_ABORT )
+ pMedium = nullptr;
DELETEZ( pMatcher );
}
@@ -125,14 +125,14 @@ SfxMediumList* DocumentInserter::CreateMediumList()
pMedium->UseInteractionHandler( true );
SfxFilterMatcher aMatcher( m_sDocFactory );
- const SfxFilter* pFilter = NULL;
+ const SfxFilter* pFilter = nullptr;
sal_uInt32 nError = aMatcher.DetectFilter( *pMedium, &pFilter, false );
if ( nError == ERRCODE_NONE && pFilter )
pMedium->SetFilter( pFilter );
else
DELETEZ( pMedium );
- if( pMedium && CheckPasswd_Impl( 0, SfxGetpApp()->GetPool(), pMedium ) != ERRCODE_ABORT )
+ if( pMedium && CheckPasswd_Impl( nullptr, SfxGetpApp()->GetPool(), pMedium ) != ERRCODE_ABORT )
pMediumList->push_back( pMedium );
else
delete pMedium;
diff --git a/sfx2/source/doc/docstoragemodifylistener.cxx b/sfx2/source/doc/docstoragemodifylistener.cxx
index c632159a9a28..fe54cebd2e21 100644
--- a/sfx2/source/doc/docstoragemodifylistener.cxx
+++ b/sfx2/source/doc/docstoragemodifylistener.cxx
@@ -55,7 +55,7 @@ namespace sfx2
void DocumentStorageModifyListener::dispose()
{
::osl::Guard< comphelper::SolarMutex > aGuard( m_rMutex );
- m_pDocument = NULL;
+ m_pDocument = nullptr;
}
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index 056ca1c7b388..c792d25890fe 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -181,7 +181,7 @@ public:
void AddEntry( const OUString& rTitle,
const OUString& rTargetURL,
- size_t *pPos = NULL );
+ size_t *pPos = nullptr );
void DeleteEntry( size_t nIndex );
int Compare( RegionData_Impl* pCompareWith ) const;
@@ -265,7 +265,7 @@ public:
typedef tools::SvRef<SfxDocTemplate_Impl> SfxDocTemplate_ImplRef;
#endif
-SfxDocTemplate_Impl *gpTemplateData = 0;
+SfxDocTemplate_Impl *gpTemplateData = nullptr;
@@ -423,7 +423,7 @@ const OUString& SfxDocumentTemplates::GetName
if ( pImp->Construct() )
{
- DocTempl_EntryData_Impl *pEntry = NULL;
+ DocTempl_EntryData_Impl *pEntry = nullptr;
RegionData_Impl *pRegion = pImp->GetRegion( nRegion );
if ( pRegion )
@@ -462,7 +462,7 @@ OUString SfxDocumentTemplates::GetPath
if ( !pImp->Construct() )
return OUString();
- DocTempl_EntryData_Impl *pEntry = NULL;
+ DocTempl_EntryData_Impl *pEntry = nullptr;
RegionData_Impl *pRegion = pImp->GetRegion( nRegion );
if ( pRegion )
@@ -1130,7 +1130,7 @@ bool SfxDocumentTemplates::GetFull
if ( ! pImp->Construct() )
return false;
- DocTempl_EntryData_Impl* pEntry = NULL;
+ DocTempl_EntryData_Impl* pEntry = nullptr;
const sal_uInt16 nCount = GetRegionCount();
for ( sal_uInt16 i = 0; i < nCount; ++i )
@@ -1150,7 +1150,7 @@ bool SfxDocumentTemplates::GetFull
}
}
- return ( pEntry != NULL );
+ return ( pEntry != nullptr );
}
@@ -1188,8 +1188,8 @@ bool SfxDocumentTemplates::GetLogicNames
aFullPath.SetURL( rPath );
OUString aPath( aFullPath.GetMainURL( INetURLObject::NO_DECODE ) );
- RegionData_Impl *pData = NULL;
- DocTempl_EntryData_Impl *pEntry = NULL;
+ RegionData_Impl *pData = nullptr;
+ DocTempl_EntryData_Impl *pEntry = nullptr;
bool bFound = false;
sal_uIntPtr nCount = GetRegionCount();
@@ -1247,7 +1247,7 @@ SfxDocumentTemplates::~SfxDocumentTemplates()
*/
{
- pImp = NULL;
+ pImp = nullptr;
}
void SfxDocumentTemplates::Update( bool _bSmart )
@@ -1467,7 +1467,7 @@ DocTempl_EntryData_Impl* RegionData_Impl::GetEntry( const OUString& rName ) cons
if ( bFound )
return maEntries[ nPos ];
else
- return NULL;
+ return nullptr;
}
@@ -1475,7 +1475,7 @@ DocTempl_EntryData_Impl* RegionData_Impl::GetEntry( size_t nIndex ) const
{
if ( nIndex < maEntries.size() )
return maEntries[ nIndex ];
- return NULL;
+ return nullptr;
}
@@ -1511,7 +1511,7 @@ SfxDocTemplate_Impl::~SfxDocTemplate_Impl()
{
Clear();
- gpTemplateData = NULL;
+ gpTemplateData = nullptr;
}
@@ -1534,7 +1534,7 @@ RegionData_Impl* SfxDocTemplate_Impl::GetRegion( size_t nIndex ) const
{
if ( nIndex < maRegions.size() )
return maRegions[ nIndex ];
- return NULL;
+ return nullptr;
}
@@ -1547,7 +1547,7 @@ RegionData_Impl* SfxDocTemplate_Impl::GetRegion( const OUString& rName )
if( pData->GetTitle() == rName )
return pData;
}
- return NULL;
+ return nullptr;
}
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 3d8b29098cd0..843b9d3602f8 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -305,7 +305,7 @@ public:
void update( bool bUpdateNow );
void doUpdate();
- void finished() { mpUpdater = NULL; }
+ void finished() { mpUpdater = nullptr; }
};
@@ -401,7 +401,7 @@ void SfxDocTplService_Impl::init_Impl()
{
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
uno::Reference < task::XInteractionHandler > xInteractionHandler(
- task::InteractionHandler::createWithParent(xContext, 0), uno::UNO_QUERY_THROW );
+ task::InteractionHandler::createWithParent(xContext, nullptr), uno::UNO_QUERY_THROW );
maCmdEnv = new TplTaskEnvironment( xInteractionHandler );
::osl::ClearableMutexGuard aGuard( maMutex );
@@ -1101,7 +1101,7 @@ SfxDocTplService_Impl::SfxDocTplService_Impl( const uno::Reference< XComponentCo
: maRelocator(xContext)
{
mxContext = xContext;
- mpUpdater = NULL;
+ mpUpdater = nullptr;
mbIsInitialized = false;
mbLocaleSet = false;
}
@@ -2298,7 +2298,7 @@ uno::Reference< ucb::XContent > SAL_CALL SfxDocTplService::getContent()
if ( pImp->init() )
return pImp->getContent().get();
else
- return NULL;
+ return nullptr;
}
@@ -2421,7 +2421,7 @@ void SAL_CALL Updater_Impl::onTerminated()
}
-WaitWindow_Impl::WaitWindow_Impl() : WorkWindow(NULL, WB_BORDER | WB_3DLOOK)
+WaitWindow_Impl::WaitWindow_Impl() : WorkWindow(nullptr, WB_BORDER | WB_3DLOOK)
{
Rectangle aRect = Rectangle(0, 0, 300, 30000);
mnTextStyle = DrawTextFlags::Center | DrawTextFlags::VCenter | DrawTextFlags::WordBreak | DrawTextFlags::MultiLine;
@@ -2551,7 +2551,7 @@ void SfxDocTplService_Impl::addFsysGroup( GroupList_Impl& rList,
if ( aTitle.isEmpty() )
return;
- GroupData_Impl* pGroup = NULL;
+ GroupData_Impl* pGroup = nullptr;
for ( size_t i = 0, n = rList.size(); i < n; ++i )
{
if ( rList[ i ]->getTitle() == aTitle )
@@ -2805,7 +2805,7 @@ DocTemplates_EntryData_Impl* GroupData_Impl::addEntry( const OUString& rTitle,
const OUString& rType,
const OUString& rHierURL )
{
- DocTemplates_EntryData_Impl* pData = NULL;
+ DocTemplates_EntryData_Impl* pData = nullptr;
bool EntryFound = false;
for ( size_t i = 0, n = maEntries.size(); i < n; ++i )
diff --git a/sfx2/source/doc/docundomanager.cxx b/sfx2/source/doc/docundomanager.cxx
index 1f381af8f98e..d58ec02f2dbc 100644
--- a/sfx2/source/doc/docundomanager.cxx
+++ b/sfx2/source/doc/docundomanager.cxx
@@ -102,7 +102,7 @@ namespace sfx2
{
aUndoHelper.disposing();
ENSURE_OR_RETURN_VOID( pUndoManager, "DocumentUndoManager_Impl::disposing: already disposed!" );
- pUndoManager = NULL;
+ pUndoManager = nullptr;
}
void invalidateXDo_nolck();
@@ -110,9 +110,9 @@ namespace sfx2
private:
static IUndoManager* impl_retrieveUndoManager( SfxBaseModel& i_baseModel )
{
- IUndoManager* pUndoManager( NULL );
+ IUndoManager* pUndoManager( nullptr );
SfxObjectShell* pObjectShell = i_baseModel.GetObjectShell();
- if ( pObjectShell != NULL )
+ if ( pObjectShell != nullptr )
pUndoManager = pObjectShell->GetUndoManager();
if ( !pUndoManager )
throw NotInitializedException( OUString(), *&i_baseModel );
@@ -123,13 +123,13 @@ namespace sfx2
::svl::IUndoManager& DocumentUndoManager_Impl::getImplUndoManager()
{
- ENSURE_OR_THROW( pUndoManager != NULL, "DocumentUndoManager_Impl::getImplUndoManager: no access to the doc's UndoManager implementation!" );
+ ENSURE_OR_THROW( pUndoManager != nullptr, "DocumentUndoManager_Impl::getImplUndoManager: no access to the doc's UndoManager implementation!" );
#if OSL_DEBUG_LEVEL > 0
// in a non-product build, assert if the current UndoManager at the shell is not the same we obtained
// (and cached) at construction time
SfxObjectShell* pObjectShell = rAntiImpl.getBaseModel().GetObjectShell();
- OSL_ENSURE( ( pObjectShell != NULL ) && ( pUndoManager == pObjectShell->GetUndoManager() ),
+ OSL_ENSURE( ( pObjectShell != nullptr ) && ( pUndoManager == pObjectShell->GetUndoManager() ),
"DocumentUndoManager_Impl::getImplUndoManager: the UndoManager changed meanwhile - what about our listener?" );
#endif
@@ -148,7 +148,7 @@ namespace sfx2
SfxModelGuard aGuard( rAntiImpl );
const SfxObjectShell* pDocShell = getObjectShell();
- ENSURE_OR_THROW( pDocShell != NULL, "lcl_invalidateUndo: no access to the doc shell!" );
+ ENSURE_OR_THROW( pDocShell != nullptr, "lcl_invalidateUndo: no access to the doc shell!" );
SfxViewFrame* pViewFrame = SfxViewFrame::GetFirst( pDocShell );
while ( pViewFrame )
{
diff --git a/sfx2/source/doc/frmdescr.cxx b/sfx2/source/doc/frmdescr.cxx
index 8ce26e51fdcb..a8d7dbc14331 100644
--- a/sfx2/source/doc/frmdescr.cxx
+++ b/sfx2/source/doc/frmdescr.cxx
@@ -32,7 +32,7 @@ struct SfxFrameDescriptor_Impl
SfxItemSet* pArgs;
bool bEditable;
- SfxFrameDescriptor_Impl() : pWallpaper( NULL ), pArgs( NULL ), bEditable( true ) {}
+ SfxFrameDescriptor_Impl() : pWallpaper( nullptr ), pArgs( nullptr ), bEditable( true ) {}
~SfxFrameDescriptor_Impl()
{
delete pWallpaper;
diff --git a/sfx2/source/doc/graphhelp.cxx b/sfx2/source/doc/graphhelp.cxx
index f4ad0b23df4d..082074877270 100644
--- a/sfx2/source/doc/graphhelp.cxx
+++ b/sfx2/source/doc/graphhelp.cxx
@@ -59,7 +59,7 @@ using namespace css;
SvMemoryStream* GraphicHelper::getFormatStrFromGDI_Impl( const GDIMetaFile* pGDIMeta, ConvertDataFormat nFormat )
{
- SvMemoryStream* pResult = NULL;
+ SvMemoryStream* pResult = nullptr;
if ( pGDIMeta )
{
SvMemoryStream* pStream = new SvMemoryStream( 65535, 65535 );
@@ -78,7 +78,7 @@ SvMemoryStream* GraphicHelper::getFormatStrFromGDI_Impl( const GDIMetaFile* pGDI
void* GraphicHelper::getEnhMetaFileFromGDI_Impl( const GDIMetaFile* pGDIMeta )
{
(void)pGDIMeta; // unused
- void* pResult = NULL;
+ void* pResult = nullptr;
#ifdef WNT
if ( pGDIMeta )
@@ -113,7 +113,7 @@ void* GraphicHelper::getWinMetaFileFromGDI_Impl( const GDIMetaFile* pGDIMeta, co
{
(void)pGDIMeta; // unused
(void)aMetaSize; // unused
- void* pResult = NULL;
+ void* pResult = nullptr;
#ifdef WNT
if ( pGDIMeta )
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index f2545a08f6d2..adab5fb16766 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -334,8 +334,8 @@ ModelData_Impl::ModelData_Impl( SfxStoringHelper& aOwner,
const uno::Sequence< beans::PropertyValue >& aMediaDescr )
: m_pOwner( &aOwner )
, m_xModel( xModel )
-, m_pDocumentPropsHM( NULL )
-, m_pModulePropsHM( NULL )
+, m_pDocumentPropsHM( nullptr )
+, m_pModulePropsHM( nullptr )
, m_aMediaDescrHM( aMediaDescr )
, m_bRecommendReadOnly( false )
{
@@ -379,7 +379,7 @@ void ModelData_Impl::FreeDocumentProps()
if ( m_pDocumentPropsHM )
{
delete m_pDocumentPropsHM;
- m_pDocumentPropsHM = NULL;
+ m_pDocumentPropsHM = nullptr;
}
}
@@ -484,7 +484,7 @@ void ModelData_Impl::CheckInteractionHandler()
{
try {
m_aMediaDescrHM[ OUString("InteractionHandler") ]
- <<= task::InteractionHandler::createWithParent( comphelper::getProcessComponentContext(), 0);
+ <<= task::InteractionHandler::createWithParent( comphelper::getProcessComponentContext(), nullptr);
}
catch( const uno::Exception& )
{
@@ -1016,7 +1016,7 @@ bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
GetMediaDescr().getAsConstPropertyValueList(),
aDialogParams );
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
if ( bPreselectPassword && aDialogParams.GetItemState( SID_ENCRYPTIONDATA, true, &pItem ) != SfxItemState::SET )
{
// the file dialog preselects the password checkbox if the provided mediadescriptor has encryption data entry
@@ -1858,7 +1858,7 @@ bool SfxStoringHelper::WarnUnacceptableFormat( const uno::Reference< frame::XMod
vcl::Window* SfxStoringHelper::GetModelWindow( const uno::Reference< frame::XModel >& xModel )
{
- vcl::Window* pWin = 0;
+ vcl::Window* pWin = nullptr;
try {
if ( xModel.is() )
{
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index 320ec3449a8c..692d1ee5dd2a 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -221,7 +221,7 @@ void SAL_CALL IFrameObject::cancel() throw( css::uno::RuntimeException, std::exc
uno::Reference < util::XCloseable > xClose( mxFrame, uno::UNO_QUERY );
if ( xClose.is() )
xClose->close( sal_True );
- mxFrame = 0;
+ mxFrame = nullptr;
}
catch (const uno::Exception&)
{
@@ -408,7 +408,7 @@ void SAL_CALL IFrameObject::removeVetoableChangeListener(const OUString&, const
::sal_Int16 SAL_CALL IFrameObject::execute() throw (css::uno::RuntimeException, std::exception)
{
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- VclAbstractDialog* pDlg = pFact->CreateEditObjectDialog( NULL, ".uno:InsertObjectFloatingFrame", mxObj );
+ VclAbstractDialog* pDlg = pFact->CreateEditObjectDialog( nullptr, ".uno:InsertObjectFloatingFrame", mxObj );
if ( pDlg )
pDlg->Execute();
return 0;
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index 5bc866fc27b4..163899e73638 100644
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -182,7 +182,7 @@ IMPL_LINK_NOARG_TYPED(SfxNewFileDialog_Impl, Update, Idle*, void)
if (!nEntry)
{
m_pPreviewWin->Invalidate();
- m_pPreviewWin->SetObjectShell( 0);
+ m_pPreviewWin->SetObjectShell( nullptr);
return;
}
@@ -229,7 +229,7 @@ IMPL_LINK_NOARG_TYPED(SfxNewFileDialog_Impl, Update, Idle*, void)
Application::SetDefDialogParent(pParent);
if (!xDocShell.Is())
{
- m_pPreviewWin->SetObjectShell(0);
+ m_pPreviewWin->SetObjectShell(nullptr);
return;
}
}
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index 10ebf6ea7439..9ccef662938d 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -306,7 +306,7 @@ std::set<Color> SfxObjectShell::GetDocColors()
SfxStyleSheetBasePool* SfxObjectShell::GetStyleSheetPool()
{
- return 0;
+ return nullptr;
}
struct Styles_Impl
diff --git a/sfx2/source/doc/objembed.cxx b/sfx2/source/doc/objembed.cxx
index cb05205e2908..49d0518fdd9b 100644
--- a/sfx2/source/doc/objembed.cxx
+++ b/sfx2/source/doc/objembed.cxx
@@ -44,7 +44,7 @@ using namespace ::com::sun::star;
// TODO/LATER: this workaround must be replaced by API in future if possible
SfxObjectShell* SfxObjectShell::GetParentShellByModel_Impl()
{
- SfxObjectShell* pResult = NULL;
+ SfxObjectShell* pResult = nullptr;
try {
uno::Reference< container::XChild > xChildModel( GetModel(), uno::UNO_QUERY );
@@ -73,7 +73,7 @@ Printer* SfxObjectShell::GetDocumentPrinter()
SfxObjectShell* pParent = GetParentShellByModel_Impl();
if ( pParent )
return pParent->GetDocumentPrinter();
- return NULL;
+ return nullptr;
}
@@ -82,7 +82,7 @@ OutputDevice* SfxObjectShell::GetDocumentRefDev()
SfxObjectShell* pParent = GetParentShellByModel_Impl();
if ( pParent )
return pParent->GetDocumentRefDev();
- return NULL;
+ return nullptr;
}
@@ -203,7 +203,7 @@ void SfxObjectShell::DoDraw_Impl( OutputDevice* pDev,
aMapMode.SetScaleY( rScaleY );
// Target in Pixels
- Point aOrg = pDev->LogicToLogic( rViewPos, NULL, &aMapMode );
+ Point aOrg = pDev->LogicToLogic( rViewPos, nullptr, &aMapMode );
Point aDelta = aOrg - aVisArea.TopLeft();
// Origin moved according to the viewable area
@@ -227,7 +227,7 @@ void SfxObjectShell::DoDraw_Impl( OutputDevice* pDev,
if( pMtf->IsRecord() && pDev->GetOutDevType() != OUTDEV_PRINTER )
pMtf->Stop();
else
- pMtf = NULL;
+ pMtf = nullptr;
}
if( pDev->IsClipRegion() && pDev->GetOutDevType() != OUTDEV_PRINTER )
{
diff --git a/sfx2/source/doc/objitem.cxx b/sfx2/source/doc/objitem.cxx
index f3ba9cae2a56..66154237224c 100644
--- a/sfx2/source/doc/objitem.cxx
+++ b/sfx2/source/doc/objitem.cxx
@@ -73,7 +73,7 @@ bool SfxObjectShellItem::PutValue( const css::uno::Any& rVal, sal_uInt8 /*nMembe
}
}
- pObjSh = 0;
+ pObjSh = nullptr;
return true;
}
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index e707ef7ab945..1e740d7cb0bc 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -403,7 +403,7 @@ bool SfxObjectShell::IsReadOnlyMedium() const
bool SfxObjectShell::IsOriginallyReadOnlyMedium() const
{
- return pMedium == 0 || pMedium->IsOriginallyReadOnly();
+ return pMedium == nullptr || pMedium->IsOriginallyReadOnly();
}
@@ -454,7 +454,7 @@ void SfxObjectShell::SetReadOnly()
bool SfxObjectShell::IsReadOnly() const
{
- return pImp->bReadOnlyUI || pMedium == 0;
+ return pImp->bReadOnlyUI || pMedium == nullptr;
}
@@ -1337,9 +1337,9 @@ void SfxObjectShell::TemplateDisconnectionAfterLoad()
// setting the new storage the medium will be based on
pTmpMedium->SetStorage_Impl( xTmpStor );
- pMedium = 0;
+ pMedium = nullptr;
bool ok = DoSaveCompleted( pTmpMedium );
- assert(pMedium != 0);
+ assert(pMedium != nullptr);
if( ok )
{
const SfxStringItem* pSalvageItem = SfxItemSet::GetItem<SfxStringItem>(pMedium->GetItemSet(), SID_DOC_SALVAGE, false);
@@ -1456,13 +1456,13 @@ void AutoReloadTimer_Impl::Invoke()
SfxStringItem(SID_REFERER, pObjSh->GetMedium()->GetName()));
}
SfxRequest aReq( SID_RELOAD, SfxCallMode::SLOT, aSet );
- pObjSh->Get_Impl()->pReloadTimer = 0;
+ pObjSh->Get_Impl()->pReloadTimer = nullptr;
delete this;
pFrame->ExecReload_Impl( aReq );
return;
}
- pObjSh->Get_Impl()->pReloadTimer = 0;
+ pObjSh->Get_Impl()->pReloadTimer = nullptr;
delete this;
}
@@ -1570,7 +1570,7 @@ ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& _rxScriptCon
std::unique_ptr< VclAbstractDialog > pScriptErrDlg;
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
if ( pFact )
- pScriptErrDlg.reset( pFact->CreateScriptErrorDialog( NULL, aException ) );
+ pScriptErrDlg.reset( pFact->CreateScriptErrorDialog( nullptr, aException ) );
OSL_ENSURE( pScriptErrDlg.get(), "SfxObjectShell::CallXScript: no script error dialog!" );
if ( pScriptErrDlg.get() )
@@ -1748,7 +1748,7 @@ bool SfxObjectShell::AdjustMacroMode( const OUString& /*rScriptType*/, bool bSup
vcl::Window* SfxObjectShell::GetDialogParent( SfxMedium* pLoadingMedium )
{
- vcl::Window* pWindow = 0;
+ vcl::Window* pWindow = nullptr;
SfxItemSet* pSet = pLoadingMedium ? pLoadingMedium->GetItemSet() : GetMedium()->GetItemSet();
const SfxUnoFrameItem* pUnoItem = SfxItemSet::GetItem<SfxUnoFrameItem>(pSet, SID_FILLFRAME, false);
if ( pUnoItem )
@@ -1759,7 +1759,7 @@ vcl::Window* SfxObjectShell::GetDialogParent( SfxMedium* pLoadingMedium )
if ( !pWindow )
{
- SfxFrame* pFrame = 0;
+ SfxFrame* pFrame = nullptr;
const SfxFrameItem* pFrameItem = SfxItemSet::GetItem<SfxFrameItem>(pSet, SID_DOCFRAME, false);
if( pFrameItem && pFrameItem->GetFrame() )
// get target frame from ItemSet
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 0d7b367c5475..5cfada6db559 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -177,7 +177,7 @@ class SfxInstanceCloseGuard_Impl
public:
SfxInstanceCloseGuard_Impl()
- : m_pPreventer( NULL )
+ : m_pPreventer( nullptr )
{}
~SfxInstanceCloseGuard_Impl();
@@ -398,7 +398,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
if( SID_SIGNATURE == nId || SID_MACRO_SIGNATURE == nId )
{
- if ( QueryHiddenInformation( HiddenWarningFact::WhenSigning, NULL ) == RET_YES )
+ if ( QueryHiddenInformation( HiddenWarningFact::WhenSigning, nullptr ) == RET_YES )
( SID_SIGNATURE == nId ) ? SignDocumentContent() : SignScriptingContent();
return;
}
@@ -492,7 +492,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
// creating dialog is done via virtual method; application will
// add its own statistics page
- ScopedVclPtr<SfxDocumentInfoDialog> pDlg(CreateDocumentInfoDialog(0, aSet));
+ ScopedVclPtr<SfxDocumentInfoDialog> pDlg(CreateDocumentInfoDialog(nullptr, aSet));
if ( RET_OK == pDlg->Execute() )
{
const SfxDocumentInfoItem* pDocInfoItem = SfxItemSet::GetItem<SfxDocumentInfoItem>(pDlg->GetOutputItemSet(), SID_DOCINFO, false);
@@ -607,7 +607,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
{
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
uno::Reference< task::XInteractionHandler2 > xInteract(
- task::InteractionHandler::createWithParent(xContext, 0) );
+ task::InteractionHandler::createWithParent(xContext, nullptr) );
SfxUnoAnyItem aInteractionItem( SID_INTERACTIONHANDLER, uno::makeAny( xInteract ) );
if ( nId == SID_SAVEDOC )
@@ -645,7 +645,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
SfxStoringHelper aHelper;
- if ( QueryHiddenInformation( bIsPDFExport ? HiddenWarningFact::WhenCreatingPDF : HiddenWarningFact::WhenSaving, NULL ) == RET_YES )
+ if ( QueryHiddenInformation( bIsPDFExport ? HiddenWarningFact::WhenCreatingPDF : HiddenWarningFact::WhenSaving, nullptr ) == RET_YES )
{
aHelper.GUIStoreModel( GetModel(),
OUString::createFromAscii( pSlot->GetUnoName() ),
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index e9bb92a45352..e2bf783055c9 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -739,7 +739,7 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
else
SetError( pMed->GetLastStorageCreationState(), OSL_LOG_PREFIX );
}
- else if ( GetError() == ERRCODE_NONE && InitNew(0) )
+ else if ( GetError() == ERRCODE_NONE && InitNew(nullptr) )
{
// Name vor ConvertFrom setzen, damit GetSbxObject() schon funktioniert
bHasName = true;
@@ -767,7 +767,7 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
{
bSetProperty = false;
}
- bOk = ImportFrom(*pMedium, 0);
+ bOk = ImportFrom(*pMedium, nullptr);
if(bSetProperty)
{
try
@@ -1680,7 +1680,7 @@ bool SfxObjectShell::SaveTo_Impl
// if the old medium already disconnected from document storage, the storage still must
// be switched if backup file is used
if ( bNeedsDisconnectionOnFail )
- ConnectTmpStorage_Impl( pImp->m_xDocStorage, NULL );
+ ConnectTmpStorage_Impl( pImp->m_xDocStorage, nullptr );
}
else if (!pMedium->GetName().isEmpty()
|| ( pMedium->HasStorage_Impl() && pMedium->WillDisposeStorageOnClose_Impl() ) )
@@ -1701,7 +1701,7 @@ bool SfxObjectShell::SaveTo_Impl
// in case the document storage was connected to backup temporarely it must be disconnected now
if ( bNeedsDisconnectionOnFail )
- ConnectTmpStorage_Impl( pImp->m_xDocStorage, NULL );
+ ConnectTmpStorage_Impl( pImp->m_xDocStorage, nullptr );
}
}
@@ -1944,7 +1944,7 @@ bool SfxObjectShell::DoSaveAs( SfxMedium& rMedium )
if ( pImp->bPreserveVersions )
rMedium.TransferVersionList_Impl( *pMedium );
- bool bRet = SaveTo_Impl( rMedium, NULL );
+ bool bRet = SaveTo_Impl( rMedium, nullptr );
if ( !bRet )
SetError(rMedium.GetErrorCode(), OSL_LOG_PREFIX );
return bRet;
@@ -1967,7 +1967,7 @@ bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed )
pMedium->CanDisposeStorage_Impl( true );
}
- const SfxFilter *pFilter = pMedium ? pMedium->GetFilter() : 0;
+ const SfxFilter *pFilter = pMedium ? pMedium->GetFilter() : nullptr;
if ( pNewMed )
{
if( bMedChanged )
@@ -2042,11 +2042,11 @@ bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed )
bOk = SaveCompletedChildren( false );
}
else
- bOk = SaveCompleted( NULL );
+ bOk = SaveCompleted( nullptr );
}
// either Save or ConvertTo
else
- bOk = SaveCompleted( NULL );
+ bOk = SaveCompleted( nullptr );
}
if ( bOk && pNewMed )
@@ -2587,7 +2587,7 @@ bool SfxObjectShell::Save_Impl( const SfxItemSet* pSet )
{
const SfxStringItem* pFilterItem = SfxItemSet::GetItem<SfxStringItem>(GetMedium()->GetItemSet(), SID_FILTER_NAME, false);
OUString aFilterName;
- const SfxFilter *pFilter = NULL;
+ const SfxFilter *pFilter = nullptr;
if ( pFilterItem )
pFilter = SfxFilterMatcher( OUString::createFromAscii( GetFactory().GetShortName()) ).GetFilter4FilterName( aFilterName );
@@ -2620,7 +2620,7 @@ bool SfxObjectShell::CommonSaveAs_Impl(const INetURLObject& aURL, const OUString
if ( aURL != INetURLObject( OUString( "private:stream" ) ) )
{
// Is there already a Document with this name?
- SfxObjectShell* pDoc = 0;
+ SfxObjectShell* pDoc = nullptr;
for ( SfxObjectShell* pTmp = SfxObjectShell::GetFirst();
pTmp && !pDoc;
pTmp = SfxObjectShell::GetNext(*pTmp) )
@@ -2785,7 +2785,7 @@ bool SfxObjectShell::PreDoSaveAs_Impl(const OUString& rFileName, const OUString&
pMergedParams->ClearItem( SID_DOC_SALVAGE );
// create a medium for the target URL
- SfxMedium *pNewFile = new SfxMedium( rFileName, STREAM_READWRITE | StreamMode::SHARE_DENYWRITE | StreamMode::TRUNC, 0, pMergedParams );
+ SfxMedium *pNewFile = new SfxMedium( rFileName, STREAM_READWRITE | StreamMode::SHARE_DENYWRITE | StreamMode::TRUNC, nullptr, pMergedParams );
// set filter; if no filter is given, take the default filter of the factory
if ( !aFilterName.isEmpty() )
@@ -2814,7 +2814,7 @@ bool SfxObjectShell::PreDoSaveAs_Impl(const OUString& rFileName, const OUString&
// Save the document ( first as temporary file, then transfer to the target URL by committing the medium )
bool bOk = false;
- if ( !pNewFile->GetErrorCode() && SaveTo_Impl( *pNewFile, NULL ) )
+ if ( !pNewFile->GetErrorCode() && SaveTo_Impl( *pNewFile, nullptr ) )
{
// transfer a possible error from the medium to the document
SetError( pNewFile->GetErrorCode(), OSL_LOG_PREFIX );
@@ -3207,7 +3207,7 @@ bool SfxObjectShell::SaveCompleted( const uno::Reference< embed::XStorage >& xSt
uno::Reference< embed::XStorage > xOldStorageHolder;
// check for wrong creation of object container
- bool bHasContainer = ( pImp->mpObjectContainer != 0 );
+ bool bHasContainer = ( pImp->mpObjectContainer != nullptr );
if ( !xStorage.is() || xStorage == GetStorage() )
{
@@ -3228,7 +3228,7 @@ bool SfxObjectShell::SaveCompleted( const uno::Reference< embed::XStorage >& xSt
{
// make sure that until the storage is assigned the object
// container is not created by accident!
- DBG_ASSERT( bHasContainer == (pImp->mpObjectContainer != 0), "Wrong storage in object container!" );
+ DBG_ASSERT( bHasContainer == (pImp->mpObjectContainer != nullptr), "Wrong storage in object container!" );
xOldStorageHolder = pImp->m_xDocStorage;
pImp->m_xDocStorage = xStorage;
bSendNotification = true;
@@ -3350,7 +3350,7 @@ bool SfxObjectShell::SwitchPersistance( const uno::Reference< embed::XStorage >&
{
bool bResult = false;
// check for wrong creation of object container
- bool bHasContainer = ( pImp->mpObjectContainer != 0 );
+ bool bHasContainer = ( pImp->mpObjectContainer != nullptr );
if ( xStorage.is() )
{
if ( pImp->mpObjectContainer )
@@ -3365,7 +3365,7 @@ bool SfxObjectShell::SwitchPersistance( const uno::Reference< embed::XStorage >&
if ( bResult )
{
// make sure that until the storage is assigned the object container is not created by accident!
- DBG_ASSERT( bHasContainer == (pImp->mpObjectContainer != 0), "Wrong storage in object container!" );
+ DBG_ASSERT( bHasContainer == (pImp->mpObjectContainer != nullptr), "Wrong storage in object container!" );
if ( pImp->m_xDocStorage != xStorage )
DoSaveCompleted( new SfxMedium( xStorage, GetMedium()->GetBaseURL() ) );
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index e9c5731bee02..4db56613247c 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -206,10 +206,10 @@ TYPEINIT1(SfxObjectShell, SfxShell);
SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell )
- :mpObjectContainer(0)
+ :mpObjectContainer(nullptr)
,rDocShell( _rDocShell )
,aMacroMode( *this )
- ,pProgress( 0)
+ ,pProgress( nullptr)
,nTime( DateTime::SYSTEM )
,nVisualDocumentNumber( USHRT_MAX)
,nDocumentSignatureState( SignatureState::UNKNOWN )
@@ -245,15 +245,15 @@ SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell )
,m_bConfigOptionsChecked( false )
,lErr(ERRCODE_NONE)
,nEventId ( 0)
- ,pReloadTimer ( 0)
- ,pMarkData( 0 )
+ ,pReloadTimer ( nullptr)
+ ,pMarkData( nullptr )
,nLoadedFlags ( SfxLoadedFlags::ALL )
,nFlagsInProgress( SfxLoadedFlags::NONE )
,bModalMode( false )
,bRunningMacro( false )
,bReloadAvailable( false )
,nAutoLoadLocks( 0 )
- ,pModule( 0 )
+ ,pModule( nullptr )
,eFlags( SfxObjectShellFlags::UNDEFINED )
,bReadOnlyUI( false )
,nStyleFilter( 0 )
@@ -283,8 +283,8 @@ SfxObjectShell_Impl::~SfxObjectShell_Impl()
SfxObjectShell::SfxObjectShell( const SfxModelFlags i_nCreationFlags )
: pImp(new SfxObjectShell_Impl(*this))
- , pMedium(0)
- , pStyleSheetPool(0)
+ , pMedium(nullptr)
+ , pStyleSheetPool(nullptr)
, eCreateMode(SfxObjectCreateMode::STANDARD)
, bHasName(false)
, bIsInGenerateThumbnail (false)
@@ -314,8 +314,8 @@ SfxObjectShell::SfxObjectShell( const SfxModelFlags i_nCreationFlags )
*/
SfxObjectShell::SfxObjectShell(SfxObjectCreateMode eMode)
: pImp(new SfxObjectShell_Impl(*this))
- , pMedium(0)
- , pStyleSheetPool(0)
+ , pMedium(nullptr)
+ , pStyleSheetPool(nullptr)
, eCreateMode(eMode)
, bHasName(false)
, bIsInGenerateThumbnail(false)
@@ -332,7 +332,7 @@ SfxObjectShell::~SfxObjectShell()
// Never call GetInPlaceObject(), the access to the derivative branch
// SfxInternObject is not allowed because of a compiler bug
SfxObjectShell::CloseInternal();
- pImp->pBaseModel.set( NULL );
+ pImp->pBaseModel.set( nullptr );
DELETEX(AutoReloadTimer_Impl, pImp->pReloadTimer );
@@ -341,12 +341,12 @@ SfxObjectShell::~SfxObjectShell()
pSfxApp->ReleaseIndex(pImp->nVisualDocumentNumber);
// Destroy Basic-Manager
- pImp->aBasicManager.reset( NULL );
+ pImp->aBasicManager.reset( nullptr );
if ( pSfxApp->GetDdeService() )
pSfxApp->RemoveDdeTopic( this );
- pImp->pBaseModel.set( NULL );
+ pImp->pBaseModel.set( nullptr );
// don't call GetStorage() here, in case of Load Failure it's possible that a storage was never assigned!
if ( pMedium && pMedium->HasStorage_Impl() && pMedium->GetStorage( false ) == pImp->m_xDocStorage )
@@ -492,7 +492,7 @@ SfxObjectShell* SfxObjectShell::GetFirst
return pSh;
}
- return 0;
+ return nullptr;
}
@@ -524,7 +524,7 @@ SfxObjectShell* SfxObjectShell::GetNext
( !bOnlyVisible || SfxViewFrame::GetFirst( pSh )))
return pSh;
}
- return 0;
+ return nullptr;
}
@@ -532,7 +532,7 @@ SfxObjectShell* SfxObjectShell::GetNext
SfxObjectShell* SfxObjectShell::Current()
{
SfxViewFrame *pFrame = SfxViewFrame::Current();
- return pFrame ? pFrame->GetObjectShell() : 0;
+ return pFrame ? pFrame->GetObjectShell() : nullptr;
}
@@ -622,13 +622,13 @@ bool SfxObjectShell::PrepareClose
{
SfxStringItem aItem( SID_DOCINFO_COMMENTS, SfxResId(STR_AUTOMATICVERSION).toString() );
SfxBoolItem aWarnItem( SID_FAIL_ON_WARNING, bUI );
- const SfxPoolItem* ppArgs[] = { &aItem, &aWarnItem, 0 };
+ const SfxPoolItem* ppArgs[] = { &aItem, &aWarnItem, nullptr };
pPoolItem = pFrame->GetBindings().ExecuteSynchron( SID_SAVEDOC, ppArgs );
}
else
{
SfxBoolItem aWarnItem( SID_FAIL_ON_WARNING, bUI );
- const SfxPoolItem* ppArgs[] = { &aWarnItem, 0 };
+ const SfxPoolItem* ppArgs[] = { &aWarnItem, nullptr };
pPoolItem = pFrame->GetBindings().ExecuteSynchron( IsReadOnlyMedium() ? SID_SAVEASDOC : SID_SAVEDOC, ppArgs );
}
@@ -672,7 +672,7 @@ namespace
"lcl_getBasicManagerForDocument: no Basic, but providing ourself as script container?" );
}
- BasicManager* pBasMgr = NULL;
+ BasicManager* pBasMgr = nullptr;
if ( xForeignDocument.is() )
pBasMgr = ::basic::BasicManagerRepository::getDocumentBasicManager( xForeignDocument );
@@ -683,7 +683,7 @@ namespace
BasicManager* SfxObjectShell::GetBasicManager() const
{
- BasicManager* pBasMgr = NULL;
+ BasicManager* pBasMgr = nullptr;
#if HAVE_FEATURE_SCRIPTING
try
{
@@ -803,7 +803,7 @@ StarBASIC* SfxObjectShell::GetBasic() const
return NULL;
#else
BasicManager * pMan = GetBasicManager();
- return pMan ? pMan->GetLib(0) : NULL;
+ return pMan ? pMan->GetLib(0) : nullptr;
#endif
}
@@ -877,7 +877,7 @@ SfxObjectShell* SfxObjectShell::GetObjectShell()
uno::Sequence< OUString > SfxObjectShell::GetEventNames()
{
- static uno::Sequence< OUString >* pEventNameContainer = NULL;
+ static uno::Sequence< OUString >* pEventNameContainer = nullptr;
if ( !pEventNameContainer )
{
@@ -901,7 +901,7 @@ css::uno::Reference< css::frame::XModel > SfxObjectShell::GetModel() const
void SfxObjectShell::SetBaseModel( SfxBaseModel* pModel )
{
- OSL_ENSURE( !pImp->pBaseModel.is() || pModel == NULL, "Model already set!" );
+ OSL_ENSURE( !pImp->pBaseModel.is() || pModel == nullptr, "Model already set!" );
pImp->pBaseModel.set( pModel );
if ( pImp->pBaseModel.is() )
{
@@ -1075,7 +1075,7 @@ SfxObjectShell* SfxObjectShell::CreateObject( const OUString& rServiceName, SfxO
}
}
- return 0;
+ return nullptr;
}
Reference<lang::XComponent> SfxObjectShell::CreateAndLoadComponent( const SfxItemSet& rSet, SfxFrame* pFrame )
@@ -1119,7 +1119,7 @@ SfxObjectShell* SfxObjectShell::GetShellFromComponent( const Reference<lang::XCo
Sequence <sal_Int8> aSeq( SvGlobalName( SFX_GLOBAL_CLASSID ).GetByteSequence() );
sal_Int64 nHandle = xTunnel->getSomething( aSeq );
if (!nHandle)
- return NULL;
+ return nullptr;
return reinterpret_cast< SfxObjectShell* >(sal::static_int_cast< sal_IntPtr >( nHandle ));
}
@@ -1127,7 +1127,7 @@ SfxObjectShell* SfxObjectShell::GetShellFromComponent( const Reference<lang::XCo
{
}
- return NULL;
+ return nullptr;
}
void SfxObjectShell::SetInitialized_Impl( const bool i_fromInitNew )
diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx
index d3c2156458c4..0d160dc86c62 100644
--- a/sfx2/source/doc/oleprops.cxx
+++ b/sfx2/source/doc/oleprops.cxx
@@ -783,7 +783,7 @@ bool SfxOleSection::GetInt32Value( sal_Int32& rnValue, sal_Int32 nPropId ) const
dynamic_cast< const SfxOleInt32Property* >( xProp.get() );
if( pProp )
rnValue = pProp->GetValue();
- return pProp != 0;
+ return pProp != nullptr;
}
bool SfxOleSection::GetDoubleValue( double& rfValue, sal_Int32 nPropId ) const
@@ -793,7 +793,7 @@ bool SfxOleSection::GetDoubleValue( double& rfValue, sal_Int32 nPropId ) const
dynamic_cast< const SfxOleDoubleProperty* >( xProp.get() );
if( pProp )
rfValue = pProp->GetValue();
- return pProp != 0;
+ return pProp != nullptr;
}
bool SfxOleSection::GetBoolValue( bool& rbValue, sal_Int32 nPropId ) const
@@ -803,7 +803,7 @@ bool SfxOleSection::GetBoolValue( bool& rbValue, sal_Int32 nPropId ) const
dynamic_cast< const SfxOleBoolProperty* >( xProp.get() );
if( pProp )
rbValue = pProp->GetValue();
- return pProp != 0;
+ return pProp != nullptr;
}
bool SfxOleSection::GetStringValue( OUString& rValue, sal_Int32 nPropId ) const
@@ -813,7 +813,7 @@ bool SfxOleSection::GetStringValue( OUString& rValue, sal_Int32 nPropId ) const
dynamic_cast< const SfxOleStringPropertyBase* >( xProp.get() );
if( pProp )
rValue = pProp->GetValue();
- return pProp != 0;
+ return pProp != nullptr;
}
bool SfxOleSection::GetFileTimeValue( util::DateTime& rValue, sal_Int32 nPropId ) const
@@ -828,7 +828,7 @@ bool SfxOleSection::GetFileTimeValue( util::DateTime& rValue, sal_Int32 nPropId
else
rValue = pProp->GetValue();
}
- return pProp != 0;
+ return pProp != nullptr;
}
bool SfxOleSection::GetDateValue( util::Date& rValue, sal_Int32 nPropId ) const
@@ -843,7 +843,7 @@ bool SfxOleSection::GetDateValue( util::Date& rValue, sal_Int32 nPropId ) const
else
rValue = pProp->GetValue();
}
- return pProp != 0;
+ return pProp != nullptr;
}
void SfxOleSection::SetProperty( SfxOlePropertyRef xProp )
diff --git a/sfx2/source/doc/ownsubfilterservice.cxx b/sfx2/source/doc/ownsubfilterservice.cxx
index 5a787d84fb24..fbff13da869b 100644
--- a/sfx2/source/doc/ownsubfilterservice.cxx
+++ b/sfx2/source/doc/ownsubfilterservice.cxx
@@ -58,7 +58,7 @@ public:
OwnSubFilterService::OwnSubFilterService(const css::uno::Sequence< css::uno::Any >& aArguments)
throw (uno::Exception, uno::RuntimeException)
- : m_pObjectShell( NULL )
+ : m_pObjectShell( nullptr )
{
if ( aArguments.getLength() != 2 )
throw lang::IllegalArgumentException();
diff --git a/sfx2/source/doc/plugin.cxx b/sfx2/source/doc/plugin.cxx
index fd8c866fd0ca..2a8bd68f4817 100644
--- a/sfx2/source/doc/plugin.cxx
+++ b/sfx2/source/doc/plugin.cxx
@@ -218,7 +218,7 @@ void SAL_CALL PluginObject::cancel() throw( css::uno::RuntimeException, std::exc
uno::Reference< lang::XComponent > xComp( mxPlugin, uno::UNO_QUERY );
if (xComp.is())
xComp->dispose();
- mxPlugin = 0;
+ mxPlugin = nullptr;
}
void SAL_CALL PluginObject::close( sal_Bool /*bDeliverOwnership*/ ) throw( css::util::CloseVetoException, css::uno::RuntimeException, std::exception )
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index aef48becf548..39593395f85a 100644
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -67,7 +67,7 @@ struct IMPL_PrintListener_DataContainer : public SfxListener
css::uno::Sequence< css::beans::PropertyValue > m_aPrintOptions;
explicit IMPL_PrintListener_DataContainer( ::osl::Mutex& aMutex)
- : m_pObjectShell ( 0 )
+ : m_pObjectShell ( nullptr )
, m_aInterfaceContainer ( aMutex )
{
}
@@ -131,7 +131,7 @@ Sequence< css::beans::PropertyValue > SAL_CALL SfxPrintJob_Impl::getPrinter() th
Reference< css::view::XPrintable > SAL_CALL SfxPrintJob_Impl::getPrintable() throw (RuntimeException, std::exception)
{
- Reference < view::XPrintable > xPrintable( m_pData->m_pObjectShell.Is() ? m_pData->m_pObjectShell->GetModel() : NULL, UNO_QUERY );
+ Reference < view::XPrintable > xPrintable( m_pData->m_pObjectShell.Is() ? m_pData->m_pObjectShell->GetModel() : nullptr, UNO_QUERY );
return xPrintable;
}
@@ -258,8 +258,8 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SfxPrintHelper::getPrinter() thro
SolarMutexGuard aGuard;
// search for any view of this document that is currently printing
- const Printer *pPrinter = NULL;
- SfxViewFrame *pViewFrm = m_pData->m_pObjectShell.Is() ? SfxViewFrame::GetFirst( m_pData->m_pObjectShell, false ) : 0;
+ const Printer *pPrinter = nullptr;
+ SfxViewFrame *pViewFrm = m_pData->m_pObjectShell.Is() ? SfxViewFrame::GetFirst( m_pData->m_pObjectShell, false ) : nullptr;
SfxViewFrame* pFirst = pViewFrm;
while ( pViewFrm && !pPrinter )
{
@@ -319,7 +319,7 @@ void SfxPrintHelper::impl_setPrinter(const uno::Sequence< beans::PropertyValue >
{
// Get old Printer
SfxViewFrame *pViewFrm = m_pData->m_pObjectShell.Is() ?
- SfxViewFrame::GetFirst( m_pData->m_pObjectShell, false ) : 0;
+ SfxViewFrame::GetFirst( m_pData->m_pObjectShell, false ) : nullptr;
if ( !pViewFrm )
return;
@@ -455,8 +455,8 @@ void SAL_CALL SfxPrintHelper::setPrinter(const uno::Sequence< beans::PropertyVal
// object already disposed?
SolarMutexGuard aGuard;
- SfxViewShell* pViewSh = NULL;
- SfxPrinter* pPrinter = NULL;
+ SfxViewShell* pViewSh = nullptr;
+ SfxPrinter* pPrinter = nullptr;
SfxPrinterChangeFlags nChangeFlags = SfxPrinterChangeFlags::NONE;
impl_setPrinter(rPrinter,pPrinter,nChangeFlags,pViewSh);
// set new printer
@@ -575,7 +575,7 @@ class ImplUCBPrintWatcher : public ::osl::Thread
// kill the temp file!
delete *ppTempFile;
- *ppTempFile = NULL;
+ *ppTempFile = nullptr;
}
};
@@ -596,7 +596,7 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
// get view for sfx printing capabilities
SfxViewFrame *pViewFrm = m_pData->m_pObjectShell.Is() ?
- SfxViewFrame::GetFirst( m_pData->m_pObjectShell, false ) : 0;
+ SfxViewFrame::GetFirst( m_pData->m_pObjectShell, false ) : nullptr;
if ( !pViewFrm )
return;
SfxViewShell* pView = pViewFrm->GetViewShell();
@@ -610,7 +610,7 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
// a local one we can suppress this special handling. Because then vcl makes all
// right for us.
OUString sUcbUrl;
- ::utl::TempFile* pUCBPrintTempFile = NULL;
+ ::utl::TempFile* pUCBPrintTempFile = nullptr;
uno::Sequence < beans::PropertyValue > aCheckedArgs( rOptions.getLength() );
sal_Int32 nProps = 0;
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 3a702be52cbd..3e10656578ce 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -230,7 +230,7 @@ struct IMPL_SfxBaseModel_DataContainer : public ::sfx2::IModifiableDocument
, m_bInitialized ( false )
, m_bExternalTitle ( false )
, m_bModifiedSinceLastSave( false )
- , m_pStorageModifyListen ( NULL )
+ , m_pStorageModifyListen ( nullptr )
, m_xTitleHelper ()
, m_xNumberedControllers ()
, m_xDocumentMetadata () // lazy
@@ -264,7 +264,7 @@ struct IMPL_SfxBaseModel_DataContainer : public ::sfx2::IModifiableDocument
OSL_ENSURE(m_pObjectShell, "GetDMA: no object shell?");
if (!m_pObjectShell)
{
- return 0;
+ return nullptr;
}
const Reference<XComponentContext> xContext(
@@ -285,7 +285,7 @@ struct IMPL_SfxBaseModel_DataContainer : public ::sfx2::IModifiableDocument
OSL_ENSURE(xContent.is(), "GetDMA: cannot create DocumentContent");
if (!xContent.is())
{
- return 0;
+ return nullptr;
}
uri = xContent->getIdentifier()->getContentIdentifier();
OSL_ENSURE(!uri.isEmpty(), "GetDMA: empty uri?");
@@ -305,7 +305,7 @@ struct IMPL_SfxBaseModel_DataContainer : public ::sfx2::IModifiableDocument
return (m_pObjectShell)
? new ::sfx2::DocumentMetadataAccess(
::comphelper::getProcessComponentContext(), *m_pObjectShell)
- : 0;
+ : nullptr;
}
};
@@ -329,13 +329,13 @@ public:
void SAL_CALL SfxPrintHelperListener_Impl::disposing( const lang::EventObject& ) throw ( RuntimeException, std::exception )
{
- m_pData->m_xPrintable = 0;
+ m_pData->m_xPrintable = nullptr;
}
void SAL_CALL SfxPrintHelperListener_Impl::printJobEvent( const view::PrintJobEvent& rEvent ) throw (RuntimeException, std::exception)
{
::cppu::OInterfaceContainerHelper* pContainer = m_pData->m_aInterfaceContainer.getContainer( cppu::UnoType<view::XPrintJobListener>::get());
- if ( pContainer!=NULL )
+ if ( pContainer!=nullptr )
{
::cppu::OInterfaceIteratorHelper pIterator(*pContainer);
while (pIterator.hasMoreElements())
@@ -406,7 +406,7 @@ SfxOwnFramesLocker::~SfxOwnFramesLocker()
vcl::Window* SfxOwnFramesLocker::GetVCLWindow( const Reference< frame::XFrame >& xFrame )
{
- vcl::Window* pWindow = NULL;
+ vcl::Window* pWindow = nullptr;
if ( xFrame.is() )
{
@@ -463,7 +463,7 @@ SfxSaveGuard::SfxSaveGuard(const Reference< frame::XModel >& xModel
bool bRejectConcurrentSaveRequest)
: m_xModel (xModel)
, m_pData (pData )
- , m_pFramesLock(0 )
+ , m_pFramesLock(nullptr )
{
if ( m_pData->m_bClosed )
throw lang::DisposedException("Object already disposed.");
@@ -482,7 +482,7 @@ SfxSaveGuard::SfxSaveGuard(const Reference< frame::XModel >& xModel
SfxSaveGuard::~SfxSaveGuard()
{
SfxOwnFramesLocker* pFramesLock = m_pFramesLock;
- m_pFramesLock = 0;
+ m_pFramesLock = nullptr;
delete pFramesLock;
m_pData->m_bSaving = false;
@@ -515,7 +515,7 @@ SfxBaseModel::SfxBaseModel( SfxObjectShell *pObjectShell )
, m_bSupportEmbeddedScripts( pObjectShell && pObjectShell->Get_Impl() && !pObjectShell->Get_Impl()->m_bNoBasicCapabilities )
, m_bSupportDocRecovery( pObjectShell && pObjectShell->Get_Impl() && pObjectShell->Get_Impl()->m_bDocRecoverySupport )
{
- if ( pObjectShell != NULL )
+ if ( pObjectShell != nullptr )
{
StartListening( *pObjectShell ) ;
}
@@ -526,7 +526,7 @@ SfxBaseModel::~SfxBaseModel()
{
//In SvxDrawingLayerImport when !xTargetDocument the fallback SvxUnoDrawingModel created there
//never gets disposed called on it, so m_pData leaks.
- delete m_pData, m_pData = 0;
+ delete m_pData, m_pData = nullptr;
}
// XInterface
@@ -763,13 +763,13 @@ void SAL_CALL SfxBaseModel::dispose() throw(RuntimeException, std::exception)
if ( m_pData->m_pStorageModifyListen.is() )
{
m_pData->m_pStorageModifyListen->dispose();
- m_pData->m_pStorageModifyListen = NULL;
+ m_pData->m_pStorageModifyListen = nullptr;
}
if ( m_pData->m_pDocumentUndoManager.is() )
{
m_pData->m_pDocumentUndoManager->disposing();
- m_pData->m_pDocumentUndoManager = NULL;
+ m_pData->m_pDocumentUndoManager = nullptr;
}
lang::EventObject aEvent( static_cast<frame::XModel *>(this) );
@@ -791,7 +791,7 @@ void SAL_CALL SfxBaseModel::dispose() throw(RuntimeException, std::exception)
// force disposed exception whenever someone tries to access our
// instance while in the dtor.
IMPL_SfxBaseModel_DataContainer* pData = m_pData;
- m_pData = 0;
+ m_pData = nullptr;
delete pData;
}
@@ -1368,7 +1368,7 @@ void SAL_CALL SfxBaseModel::close( sal_Bool bDeliverOwnership ) throw (util::Clo
Reference< XInterface > xSelfHold( static_cast< ::cppu::OWeakObject* >(this) );
lang::EventObject aSource ( static_cast< ::cppu::OWeakObject* >(this) );
::cppu::OInterfaceContainerHelper* pContainer = m_pData->m_aInterfaceContainer.getContainer( cppu::UnoType<util::XCloseListener>::get());
- if (pContainer!=NULL)
+ if (pContainer!=nullptr)
{
::cppu::OInterfaceIteratorHelper pIterator(*pContainer);
while (pIterator.hasMoreElements())
@@ -1396,7 +1396,7 @@ void SAL_CALL SfxBaseModel::close( sal_Bool bDeliverOwnership ) throw (util::Clo
// no own objections against closing!
m_pData->m_bClosing = true;
pContainer = m_pData->m_aInterfaceContainer.getContainer( cppu::UnoType<util::XCloseListener>::get());
- if (pContainer!=NULL)
+ if (pContainer!=nullptr)
{
::cppu::OInterfaceIteratorHelper pCloseIterator(*pContainer);
while (pCloseIterator.hasMoreElements())
@@ -2373,7 +2373,7 @@ Reference< document::XEmbeddedScripts > SAL_CALL SfxBaseModel::getScriptContaine
Reference< container::XChild > xDocAsChild( xDocument, UNO_QUERY );
if ( !xDocAsChild.is() )
{
- xDocument = NULL;
+ xDocument = nullptr;
break;
}
@@ -2384,7 +2384,7 @@ Reference< document::XEmbeddedScripts > SAL_CALL SfxBaseModel::getScriptContaine
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
- xDocumentScripts = NULL;
+ xDocumentScripts = nullptr;
}
return xDocumentScripts;
@@ -2699,7 +2699,7 @@ SfxMedium* SfxBaseModel::handleLoadError( sal_uInt32 nError, SfxMedium* pMedium
// for whatever reason document now has another medium
OSL_FAIL("Document has rejected the medium?!");
delete pMedium;
- pMedium = NULL;
+ pMedium = nullptr;
}
if ( !bWarning ) // #i30711# don't abort loading if it's only a warning
@@ -2876,7 +2876,7 @@ void SfxBaseModel::changing()
SfxObjectShell* SfxBaseModel::GetObjectShell() const
{
- return m_pData ? static_cast<SfxObjectShell*>(m_pData->m_pObjectShell) : 0;
+ return m_pData ? static_cast<SfxObjectShell*>(m_pData->m_pObjectShell) : nullptr;
}
@@ -2891,7 +2891,7 @@ bool SfxBaseModel::IsInitialized() const
return false;
}
- return m_pData->m_pObjectShell->GetMedium() != NULL;
+ return m_pData->m_pObjectShell->GetMedium() != nullptr;
}
void SfxBaseModel::MethodEntryCheck( const bool i_mustBeInitialized ) const
@@ -2904,7 +2904,7 @@ void SfxBaseModel::MethodEntryCheck( const bool i_mustBeInitialized ) const
bool SfxBaseModel::impl_isDisposed() const
{
- return ( m_pData == NULL ) ;
+ return ( m_pData == nullptr ) ;
}
@@ -2913,7 +2913,7 @@ bool SfxBaseModel::impl_isDisposed() const
OUString SfxBaseModel::GetMediumFilterName_Impl()
{
- const SfxFilter* pFilter = NULL;
+ const SfxFilter* pFilter = nullptr;
SfxMedium* pMedium = m_pData->m_pObjectShell->GetMedium();
if ( pMedium )
pFilter = pMedium->GetFilter();
@@ -3282,7 +3282,7 @@ void SfxBaseModel::notifyEvent( const document::EventObject& aEvent ) const
/** returns true if someone added a XEventListener to this XEventBroadcaster */
bool SfxBaseModel::hasEventListeners() const
{
- return !impl_isDisposed() && (NULL != m_pData->m_aInterfaceContainer.getContainer( cppu::UnoType<document::XEventListener>::get()) );
+ return !impl_isDisposed() && (nullptr != m_pData->m_aInterfaceContainer.getContainer( cppu::UnoType<document::XEventListener>::get()) );
}
void SAL_CALL SfxBaseModel::addPrintJobListener( const Reference< view::XPrintJobListener >& xListener ) throw (RuntimeException, std::exception)
@@ -4162,7 +4162,7 @@ namespace sfx { namespace intern {
void takeFrameOwnership( SfxFrame* i_pFrame )
{
OSL_PRECOND( !m_aWeakFrame, "ViewCreationGuard::takeFrameOwnership: already have a frame!" );
- OSL_PRECOND( i_pFrame != NULL, "ViewCreationGuard::takeFrameOwnership: invalid frame!" );
+ OSL_PRECOND( i_pFrame != nullptr, "ViewCreationGuard::takeFrameOwnership: invalid frame!" );
m_aWeakFrame = i_pFrame;
}
@@ -4176,7 +4176,7 @@ namespace sfx { namespace intern {
{
if ( m_aWeakFrame && !m_aWeakFrame->GetCurrentDocument() )
{
- m_aWeakFrame->SetFrameInterface_Impl( NULL );
+ m_aWeakFrame->SetFrameInterface_Impl( nullptr );
m_aWeakFrame->DoClose();
}
}
@@ -4190,7 +4190,7 @@ namespace sfx { namespace intern {
SfxViewFrame* SfxBaseModel::FindOrCreateViewFrame_Impl( const Reference< XFrame >& i_rFrame, ::sfx::intern::ViewCreationGuard& i_rGuard ) const
{
- SfxViewFrame* pViewFrame = NULL;
+ SfxViewFrame* pViewFrame = nullptr;
for ( pViewFrame = SfxViewFrame::GetFirst( GetObjectShell(), false );
pViewFrame;
pViewFrame= SfxViewFrame::GetNext( *pViewFrame, GetObjectShell(), false )
@@ -4209,8 +4209,8 @@ SfxViewFrame* SfxBaseModel::FindOrCreateViewFrame_Impl( const Reference< XFrame
{
if ( pCheckFrame->GetFrameInterface() == i_rFrame )
{
- if ( ( pCheckFrame->GetCurrentViewFrame() != NULL )
- || ( pCheckFrame->GetCurrentDocument() != NULL )
+ if ( ( pCheckFrame->GetCurrentViewFrame() != nullptr )
+ || ( pCheckFrame->GetCurrentDocument() != nullptr )
)
// Note that it is perfectly letgitimate that during loading into an XFrame which already contains
// a document, there exist two SfxFrame instances bound to this XFrame - the old one, which will be
@@ -4265,7 +4265,7 @@ Reference< frame::XController2 > SAL_CALL SfxBaseModel::createViewController(
xPreviousController.clear();
}
SfxViewShell* pOldViewShell = SfxViewShell::Get( xPreviousController );
- OSL_ENSURE( !xPreviousController.is() || ( pOldViewShell != NULL ),
+ OSL_ENSURE( !xPreviousController.is() || ( pOldViewShell != nullptr ),
"SfxBaseModel::createViewController: invalid old controller!" );
// a guard which will clean up in case of failure
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 5b133a61bcbe..9408f99310be 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -633,7 +633,7 @@ IMPL_LINK_TYPED(SfxTemplateManagerDlg, RepositoryMenuSelectHdl, Menu*, pMenu, bo
{
sal_uInt16 nRepoId = nMenuId - MNI_REPOSITORY_BASE;
- TemplateRepository *pRepository = NULL;
+ TemplateRepository *pRepository = nullptr;
for (size_t i = 0, n = maRepositories.size(); i < n; ++i)
{
@@ -690,7 +690,7 @@ IMPL_LINK_TYPED(SfxTemplateManagerDlg, OpenTemplateHdl, ThumbnailViewItem*, pIte
aArgs[2].Name = "UpdateDocMode";
aArgs[2].Value <<= UpdateDocMode::ACCORDING_TO_CONFIG;
aArgs[3].Name = "InteractionHandler";
- aArgs[3].Value <<= task::InteractionHandler::createWithParent( ::comphelper::getProcessComponentContext(), 0 );
+ aArgs[3].Value <<= task::InteractionHandler::createWithParent( ::comphelper::getProcessComponentContext(), nullptr );
TemplateViewItem *pTemplateItem = static_cast<TemplateViewItem*>(pItem);