[Libreoffice-commits] .: Branch 'libreoffice-3-4' - 2 commits - sw/source
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Fri May 13 08:28:56 PDT 2011
sw/source/core/doc/doccomp.cxx | 6 +++---
sw/source/core/table/swtable.cxx | 15 +++++++++++++--
2 files changed, 16 insertions(+), 5 deletions(-)
New commits:
commit 5f64fa0976c59fcbb7c199d9dac856f08f99e2a4
Author: Michael Stahl <mst at openoffice.org>
Date: Fri May 13 17:28:08 2011 +0200
sw34bf06: doccomp.cxx: fix some resource management problems
Signed-off-by: Cédric Bosdonnat <cedric.bosdonnat.ooo at free.fr>
diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx
index a8f2233..8630801 100644
--- a/sw/source/core/doc/doccomp.cxx
+++ b/sw/source/core/doc/doccomp.cxx
@@ -606,8 +606,8 @@ Compare::MovedData::MovedData( CompareData& rData, sal_Char* pDiscard )
Compare::MovedData::~MovedData()
{
- delete pIndex;
- delete pLineNum;
+ delete [] pIndex;
+ delete [] pLineNum;
}
// Suche die verschobenen Lines
@@ -626,7 +626,7 @@ Compare::CompareSequence::CompareSequence(
Compare::CompareSequence::~CompareSequence()
{
- delete pMemory;
+ delete [] pMemory;
}
void Compare::CompareSequence::Compare( sal_uLong nStt1, sal_uLong nEnd1,
commit f9c747ad060054494bb7b4ca6e8002615fd669d0
Author: Michael Stahl <mst at openoffice.org>
Date: Fri May 13 17:25:30 2011 +0200
sw34bf06: #i117825#: try to reduce collateral damage from #i104949# fix
only ignore text:variable-set fields that are hidden and at start of
para.
Signed-off-by: Cédric Bosdonnat <cedric.bosdonnat.ooo at free.fr>
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 39c8566..854678a 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -2561,6 +2561,7 @@ sal_uLong SwTableBox::IsValidNumTxtNd( sal_Bool bCheckAttr ) const
// Flys/Felder/..
if( pHts )
{
+ xub_StrLen nNextSetField = 0;
for( sal_uInt16 n = 0; n < pHts->Count(); ++n )
{
const SwTxtAttr* pAttr = (*pHts)[ n ];
@@ -2568,11 +2569,21 @@ sal_uLong SwTableBox::IsValidNumTxtNd( sal_Bool bCheckAttr ) const
*pAttr->GetStart() ||
*pAttr->GetAnyEnd() < rTxt.Len() )
{
- if ( pAttr->Which() == RES_TXTATR_FIELD )
+ if ((*pAttr->GetStart() == nNextSetField) &&
+ (pAttr->Which() == RES_TXTATR_FIELD))
{
+ // #i104949# hideous hack for report builder:
+ // it inserts hidden variable-set fields at
+ // the beginning of para in cell, but they
+ // should not turn cell into text cell
const SwField* pField = pAttr->GetFld().GetFld();
- if ( pField && pField->GetTypeId() == TYP_SETFLD )
+ if (pField &&
+ (pField->GetTypeId() == TYP_SETFLD) &&
+ (0 != (static_cast<SwSetExpField const*>
+ (pField)->GetSubType() &
+ nsSwExtendedSubType::SUB_INVISIBLE)))
{
+ nNextSetField = *pAttr->GetStart() + 1;
continue;
}
}
More information about the Libreoffice-commits
mailing list