summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-03-21 17:15:06 +0100
committerMichael Stahl <mstahl@redhat.com>2012-03-21 17:16:44 +0100
commit5c3dd5af41bc801ee6023513399c01c632dc7779 (patch)
tree8756145c695871bfba8a025e76f334172679f92a /sw
parentdfa1983b5dcce0d74db76ea08b5d6334a82320b4 (diff)
fdo#45522: WW8TableInfo::processSwTable: check that table has layout
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/swtable.hxx2
-rw-r--r--sw/source/core/table/swtable.cxx7
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.cxx3
3 files changed, 10 insertions, 2 deletions
diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx
index e97de4260cee..6473986640d2 100644
--- a/sw/inc/swtable.hxx
+++ b/sw/inc/swtable.hxx
@@ -326,6 +326,8 @@ public:
#ifdef DBG_UTIL
void CheckConsistency() const;
#endif
+
+ bool HasLayout() const;
};
class SW_DLLPUBLIC SwTableLine: public SwClient // Client of FrmFmt.
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 3c0b4c156542..c5f0d0926db2 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -2800,6 +2800,13 @@ void SwTable::RegisterToFormat( SwFmt& rFmt )
rFmt.Add( this );
}
+bool SwTable::HasLayout() const
+{
+ const SwFrmFmt* pFrmFmt = GetFrmFmt();
+ //a table in a clipboard document doesn't have any layout information
+ return pFrmFmt && SwIterator<SwTabFrm,SwFmt>::FirstElement(*pFrmFmt);
+}
+
void SwTableLine::RegisterToFormat( SwFmt& rFmt )
{
rFmt.Add( this );
diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx
index 72993babe56a..7df6abc30693 100644
--- a/sw/source/filter/ww8/WW8TableInfo.cxx
+++ b/sw/source/filter/ww8/WW8TableInfo.cxx
@@ -631,8 +631,7 @@ void WW8TableInfo::processSwTable(const SwTable * pTable)
WW8TableNodeInfo * pPrev = NULL;
- SwFrmFmt * pFrmFmt = pTable->GetFrmFmt();
- if (pFrmFmt != NULL && pTable->IsTblComplex())
+ if (pTable->IsTblComplex() && pTable->HasLayout())
{
pPrev = processSwTableByLayout(pTable);