[Libreoffice-commits] .: 2 commits - lotuswordpro/source
Caolán McNamara
caolan at kemper.freedesktop.org
Fri Sep 23 09:15:01 PDT 2011
lotuswordpro/source/filter/xfilter/xfcell.cxx | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
New commits:
commit 822e94a1c96c1dadff606f33f545a402e2a1c674
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Sep 23 17:14:18 2011 +0100
ensure m_pOwnerRow is NULL
diff --git a/lotuswordpro/source/filter/xfilter/xfcell.cxx b/lotuswordpro/source/filter/xfilter/xfcell.cxx
index 8437275..25830c6 100644
--- a/lotuswordpro/source/filter/xfilter/xfcell.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfcell.cxx
@@ -65,6 +65,7 @@
XFCell::XFCell()
{
m_pSubTable = NULL;
+ m_pOwnerRow = NULL;
m_nCol = 0;
m_nColSpaned = 1;
m_nRepeated = 0;
commit eddbdb1938b981b64c923030bc6658ab281971b7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Sep 23 17:10:57 2011 +0100
cppcheck: don't dereference NULL pRow
diff --git a/lotuswordpro/source/filter/xfilter/xfcell.cxx b/lotuswordpro/source/filter/xfilter/xfcell.cxx
index be319ca..8437275 100644
--- a/lotuswordpro/source/filter/xfilter/xfcell.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfcell.cxx
@@ -173,12 +173,17 @@ void XFCell::SetValue(rtl::OUString value)
rtl::OUString XFCell::GetCellName()
{
- rtl::OUString name;
- XFRow *pRow = m_pOwnerRow;
+ XFRow *pRow = m_pOwnerRow;
+
+ if( !pRow )
+ return A2OUSTR("");
+
XFTable *pTable = pRow->GetOwnerTable();
- if( !pRow || !pTable )
+ if( !pTable )
return A2OUSTR("");
+
+ rtl::OUString name;
if( pTable->IsSubTable() )
{
name = pTable->GetTableName() + A2OUSTR(".") + Int32ToOUString(m_nCol) + A2OUSTR(".") + Int32ToOUString(pRow->GetRow());
More information about the Libreoffice-commits
mailing list