Bugzilla – Attachment 58823 Details for
Bug 45522
Crash when copying table between Writer and other LibreOffice programs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
avoid the first crash, but will still crash later on
sw.check.table.haslayout.patch (text/plain), 1.44 KB, created by
Caolán McNamara
on 2012-03-21 08:31:59 UTC
(
hide
)
Description:
avoid the first crash, but will still crash later on
Filename:
MIME Type:
Creator:
Caolán McNamara
Created:
2012-03-21 08:31:59 UTC
Size:
1.44 KB
patch
obsolete
>diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx >index e97de42..6473986 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 3c0b4c1..c5f0d09 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 72993ba..7df6abc 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); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 45522
:
56487
| 58823