summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2016-02-02 19:19:19 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-02-03 02:17:32 +0000
commitbd76d319bbda17f242e64b042027077e84c0f1d9 (patch)
tree56461ec91801dfd18af86929dca04ea6505ba533 /dbaccess
parent32096592fcf067d50e22090135b542325f5e3e62 (diff)
remove bogus nullprt checks for pContext
reported by Cppcheck Change-Id: I737c2bd7be197ef9d0b29b922acd8021fefb7af6 Signed-off-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-on: https://gerrit.libreoffice.org/22059 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/filter/xml/xmlfilter.cxx17
1 files changed, 8 insertions, 9 deletions
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index 702ac846d6f3..5453f39ce916 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -700,15 +700,14 @@ const SvXMLTokenMap& ODBFilter::GetColumnElemTokenMap() const
SvXMLImportContext* ODBFilter::CreateStylesContext(sal_uInt16 _nPrefix,const OUString& rLocalName,
const uno::Reference< XAttributeList>& xAttrList, bool bIsAutoStyle )
{
- SvXMLImportContext *pContext = nullptr;
- if (!pContext)
- {
- pContext = new OTableStylesContext(*this, _nPrefix, rLocalName, xAttrList, bIsAutoStyle);
- if (bIsAutoStyle)
- SetAutoStyles(static_cast<SvXMLStylesContext*>(pContext));
- else
- SetStyles(static_cast<SvXMLStylesContext*>(pContext));
- }
+ SvXMLImportContext *pContext;
+
+ pContext = new OTableStylesContext(*this, _nPrefix, rLocalName, xAttrList, bIsAutoStyle);
+ if (bIsAutoStyle)
+ SetAutoStyles(static_cast<SvXMLStylesContext*>(pContext));
+ else
+ SetStyles(static_cast<SvXMLStylesContext*>(pContext));
+
return pContext;
}