f41
David Tardon 14 years ago
parent cf86fd0b56
commit b955b9c68f

20
.gitignore vendored

@ -130,3 +130,23 @@
/libreoffice-translations-3.4.0.2.tar.bz2
/libreoffice-ure-3.4.0.2.tar.bz2
/libreoffice-writer-3.4.0.2.tar.bz2
/libreoffice-artwork-3.4.1.1.tar.bz2
/libreoffice-base-3.4.1.1.tar.bz2
/libreoffice-bootstrap-3.4.1.1.tar.bz2
/libreoffice-calc-3.4.1.1.tar.bz2
/libreoffice-components-3.4.1.1.tar.bz2
/libreoffice-extensions-3.4.1.1.tar.bz2
/libreoffice-extras-3.4.1.1.tar.bz2
/libreoffice-filters-3.4.1.1.tar.bz2
/libreoffice-help-3.4.1.1.tar.bz2
/libreoffice-impress-3.4.1.1.tar.bz2
/libreoffice-libs-core-3.4.1.1.tar.bz2
/libreoffice-libs-extern-3.4.1.1.tar.bz2
/libreoffice-libs-extern-sys-3.4.1.1.tar.bz2
/libreoffice-libs-gui-3.4.1.1.tar.bz2
/libreoffice-postprocess-3.4.1.1.tar.bz2
/libreoffice-sdk-3.4.1.1.tar.bz2
/libreoffice-testing-3.4.1.1.tar.bz2
/libreoffice-translations-3.4.1.1.tar.bz2
/libreoffice-ure-3.4.1.1.tar.bz2
/libreoffice-writer-3.4.1.1.tar.bz2

@ -1,264 +0,0 @@
diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx
index 32f2126..05de4cf 100644
--- a/vcl/inc/vcl/salgdi.hxx
+++ b/vcl/inc/vcl/salgdi.hxx
@@ -37,6 +37,7 @@
#include "osl/thread.hxx"
#include "vcl/outdev.hxx"
#include "vcl/salnativewidgets.hxx"
+#include "sallayout.hxx"
#include <map>
@@ -298,8 +299,8 @@ public:
Int32Vector& rWidths,
Ucs2UIntMap& rUnicodeEnc ) = 0;
- virtual sal_Bool GetGlyphBoundRect( long nIndex, Rectangle& ) = 0;
- virtual sal_Bool GetGlyphOutline( long nIndex, basegfx::B2DPolyPolygon& ) = 0;
+ virtual sal_Bool GetGlyphBoundRect( sal_GlyphId nIndex, Rectangle& ) = 0;
+ virtual sal_Bool GetGlyphOutline( sal_GlyphId nIndex, basegfx::B2DPolyPolygon& ) = 0;
virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) = 0;
virtual void DrawServerFontLayout( const ServerFontLayout& ) = 0;
diff --git a/vcl/inc/unx/pspgraphics.h b/vcl/inc/unx/pspgraphics.h
index 29f9251..f5787b1 100644
--- a/vcl/unx/inc/pspgraphics.h
+++ b/vcl/unx/inc/pspgraphics.h
@@ -123,8 +123,8 @@ public:
bool bVertical,
Int32Vector& rWidths,
Ucs2UIntMap& rUnicodeEnc );
- virtual sal_Bool GetGlyphBoundRect( long nIndex, Rectangle& );
- virtual sal_Bool GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& );
+ virtual sal_Bool GetGlyphBoundRect( sal_GlyphId nIndex, Rectangle& );
+ virtual sal_Bool GetGlyphOutline( sal_GlyphId nIndex, ::basegfx::B2DPolyPolygon& );
virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
virtual void DrawServerFontLayout( const ServerFontLayout& );
virtual bool supportsOperation( OutDevSupportType ) const;
diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h
index a7c2fa1..d03d1df 100644
--- a/vcl/unx/inc/salgdi.h
+++ b/vcl/unx/inc/salgdi.h
@@ -287,8 +287,8 @@ public:
bool bVertical,
Int32Vector& rWidths,
Ucs2UIntMap& rUnicodeEnc );
- virtual sal_Bool GetGlyphBoundRect( long nIndex, Rectangle& );
- virtual sal_Bool GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& );
+ virtual sal_Bool GetGlyphBoundRect( sal_GlyphId nIndex, Rectangle& );
+ virtual sal_Bool GetGlyphOutline( sal_GlyphId nIndex, ::basegfx::B2DPolyPolygon& );
virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
virtual void DrawServerFontLayout( const ServerFontLayout& );
virtual bool supportsOperation( OutDevSupportType ) const;
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index 647cc22..f30251d 100755
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -6112,7 +6112,7 @@ void OutputDevice::forceFallbackFontToFit(SalLayout &rFallback, ImplFontEntry &r
if( !rFallback.GetNextGlyphs( 1, &nLGlyph, aPos, nStart ) )
break;
- int nFontTag = nFallbackLevel << GF_FONTSHIFT;
+ sal_GlyphId nFontTag = nFallbackLevel << GF_FONTSHIFT;
nLGlyph |= nFontTag;
// get bounding rectangle of individual glyph
diff --git a/vcl/unx/generic/gdi/pspgraphics.cxx b/vcl/unx/generic/gdi/pspgraphics.cxx
index ba2319c..8e66c93 100644
--- a/vcl/unx/source/gdi/pspgraphics.cxx
+++ b/vcl/unx/source/gdi/pspgraphics.cxx
@@ -941,7 +941,7 @@ sal_uLong PspGraphics::GetKernPairs( sal_uLong nPairs, ImplKernPairData *pKernPa
return nHavePairs;
}
-sal_Bool PspGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect )
+sal_Bool PspGraphics::GetGlyphBoundRect( sal_GlyphId nGlyphIndex, Rectangle& rRect )
{
int nLevel = nGlyphIndex >> GF_FONTSHIFT;
if( nLevel >= MAX_FALLBACK )
@@ -951,13 +951,13 @@ sal_Bool PspGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect )
if( !pSF )
return sal_False;
- nGlyphIndex &= ~GF_FONTMASK;
+ nGlyphIndex &= GF_IDXMASK;
const GlyphMetric& rGM = pSF->GetGlyphMetric( nGlyphIndex );
rRect = Rectangle( rGM.GetOffset(), rGM.GetSize() );
return sal_True;
}
-sal_Bool PspGraphics::GetGlyphOutline( long nGlyphIndex,
+sal_Bool PspGraphics::GetGlyphOutline( sal_GlyphId nGlyphIndex,
::basegfx::B2DPolyPolygon& rB2DPolyPoly )
{
int nLevel = nGlyphIndex >> GF_FONTSHIFT;
@@ -968,7 +968,7 @@ sal_Bool PspGraphics::GetGlyphOutline( long nGlyphIndex,
if( !pSF )
return sal_False;
- nGlyphIndex &= ~GF_FONTMASK;
+ nGlyphIndex &= GF_IDXMASK;
if( pSF->GetGlyphOutline( nGlyphIndex, rB2DPolyPoly ) )
return sal_True;
diff --git a/vcl/unx/generic/gdi/salgdi3.cxx b/vcl/unx/generic/gdi/salgdi3.cxx
index 2615438..a90fd1c 100644
--- a/vcl/unx/source/gdi/salgdi3.cxx
+++ b/vcl/unx/source/gdi/salgdi3.cxx
@@ -1149,17 +1149,17 @@ X11SalGraphics::GetKernPairs( sal_uLong nPairs, ImplKernPairData *pKernPairs )
// ---------------------------------------------------------------------------
-sal_Bool X11SalGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect )
+sal_Bool X11SalGraphics::GetGlyphBoundRect( sal_GlyphId nGlyphIndex, Rectangle& rRect )
{
int nLevel = nGlyphIndex >> GF_FONTSHIFT;
- if( nLevel < 0 || nLevel >= MAX_FALLBACK )
+ if( nLevel >= MAX_FALLBACK )
return sal_False;
ServerFont* pSF = mpServerFont[ nLevel ];
if( !pSF )
return sal_False;
- nGlyphIndex &= ~GF_FONTMASK;
+ nGlyphIndex &= GF_IDXMASK;
const GlyphMetric& rGM = pSF->GetGlyphMetric( nGlyphIndex );
rRect = Rectangle( rGM.GetOffset(), rGM.GetSize() );
return sal_True;
@@ -1167,7 +1167,7 @@ sal_Bool X11SalGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect )
// ---------------------------------------------------------------------------
-sal_Bool X11SalGraphics::GetGlyphOutline( long nGlyphIndex,
+sal_Bool X11SalGraphics::GetGlyphOutline( sal_GlyphId nGlyphIndex,
::basegfx::B2DPolyPolygon& rPolyPoly )
{
int nLevel = nGlyphIndex >> GF_FONTSHIFT;
@@ -1178,7 +1178,7 @@ sal_Bool X11SalGraphics::GetGlyphOutline( long nGlyphIndex,
if( !pSF )
return sal_False;
- nGlyphIndex &= ~GF_FONTMASK;
+ nGlyphIndex &= GF_IDXMASK;
if( pSF->GetGlyphOutline( nGlyphIndex, rPolyPoly ) )
return sal_True;
diff --git a/vcl/unx/headless/svpgdi.hxx b/vcl/unx/headless/svpgdi.hxx
index 37eac08..640eb43 100644
--- a/vcl/unx/headless/svpgdi.hxx
+++ b/vcl/unx/headless/svpgdi.hxx
@@ -111,8 +111,8 @@ public:
bool bVertical,
Int32Vector& rWidths,
Ucs2UIntMap& rUnicodeEnc );
- virtual sal_Bool GetGlyphBoundRect( long nIndex, Rectangle& );
- virtual sal_Bool GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& );
+ virtual sal_Bool GetGlyphBoundRect( sal_GlyphId nIndex, Rectangle& );
+ virtual sal_Bool GetGlyphOutline( sal_GlyphId nIndex, ::basegfx::B2DPolyPolygon& );
virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
virtual void DrawServerFontLayout( const ServerFontLayout& );
virtual bool supportsOperation( OutDevSupportType ) const;
diff --git a/vcl/unx/headless/svppspgraphics.cxx b/vcl/unx/headless/svppspgraphics.cxx
index c9c1a7d..f44c445 100644
--- a/vcl/unx/headless/svppspgraphics.cxx
+++ b/vcl/unx/headless/svppspgraphics.cxx
@@ -848,7 +848,7 @@ sal_uLong PspGraphics::GetKernPairs( sal_uLong nPairs, ImplKernPairData *pKernPa
return nHavePairs;
}
-sal_Bool PspGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect )
+sal_Bool PspGraphics::GetGlyphBoundRect( sal_GlyphId nGlyphIndex, Rectangle& rRect )
{
int nLevel = nGlyphIndex >> GF_FONTSHIFT;
if( nLevel >= MAX_FALLBACK )
@@ -858,13 +858,13 @@ sal_Bool PspGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect )
if( !pSF )
return sal_False;
- nGlyphIndex &= ~GF_FONTMASK;
+ nGlyphIndex &= GF_IDXMASK;
const GlyphMetric& rGM = pSF->GetGlyphMetric( nGlyphIndex );
rRect = Rectangle( rGM.GetOffset(), rGM.GetSize() );
return sal_True;
}
-sal_Bool PspGraphics::GetGlyphOutline( long nGlyphIndex,
+sal_Bool PspGraphics::GetGlyphOutline( sal_GlyphId nGlyphIndex,
::basegfx::B2DPolyPolygon& rB2DPolyPoly )
{
int nLevel = nGlyphIndex >> GF_FONTSHIFT;
@@ -875,7 +875,7 @@ sal_Bool PspGraphics::GetGlyphOutline( long nGlyphIndex,
if( !pSF )
return sal_False;
- nGlyphIndex &= ~GF_FONTMASK;
+ nGlyphIndex &= GF_IDXMASK;
if( pSF->GetGlyphOutline( nGlyphIndex, rB2DPolyPoly ) )
return sal_True;
diff --git a/vcl/unx/headless/svppspgraphics.hxx b/vcl/unx/headless/svppspgraphics.hxx
index 6245496..2c03386 100644
--- a/vcl/unx/headless/svppspgraphics.hxx
+++ b/vcl/unx/headless/svppspgraphics.hxx
@@ -125,8 +125,8 @@ public:
bool bVertical,
Int32Vector& rWidths,
Ucs2UIntMap& rUnicodeEnc );
- virtual sal_Bool GetGlyphBoundRect( long nIndex, Rectangle& );
- virtual sal_Bool GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& );
+ virtual sal_Bool GetGlyphBoundRect( sal_GlyphId nIndex, Rectangle& );
+ virtual sal_Bool GetGlyphOutline( sal_GlyphId nIndex, ::basegfx::B2DPolyPolygon& );
virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
virtual void DrawServerFontLayout( const ServerFontLayout& );
virtual bool supportsOperation( OutDevSupportType ) const;
diff --git a/vcl/unx/headless/svptext.cxx b/vcl/unx/headless/svptext.cxx
index 24e0f1b..a077685 100644
--- a/vcl/unx/headless/svptext.cxx
+++ b/vcl/unx/headless/svptext.cxx
@@ -460,7 +460,7 @@ void SvpSalGraphics::GetGlyphWidths( const ImplFontData* pFont,
// ---------------------------------------------------------------------------
-sal_Bool SvpSalGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect )
+sal_Bool SvpSalGraphics::GetGlyphBoundRect( sal_GlyphId nGlyphIndex, Rectangle& rRect )
{
int nLevel = nGlyphIndex >> GF_FONTSHIFT;
if( nLevel >= MAX_FALLBACK )
@@ -470,7 +470,7 @@ sal_Bool SvpSalGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect )
if( !pSF )
return sal_False;
- nGlyphIndex &= ~GF_FONTMASK;
+ nGlyphIndex &= GF_IDXMASK;
const GlyphMetric& rGM = pSF->GetGlyphMetric( nGlyphIndex );
rRect = Rectangle( rGM.GetOffset(), rGM.GetSize() );
return sal_True;
@@ -478,7 +478,7 @@ sal_Bool SvpSalGraphics::GetGlyphBoundRect( long nGlyphIndex, Rectangle& rRect )
// ---------------------------------------------------------------------------
-sal_Bool SvpSalGraphics::GetGlyphOutline( long nGlyphIndex, B2DPolyPolygon& rPolyPoly )
+sal_Bool SvpSalGraphics::GetGlyphOutline( sal_GlyphId nGlyphIndex, B2DPolyPolygon& rPolyPoly )
{
int nLevel = nGlyphIndex >> GF_FONTSHIFT;
if( nLevel >= MAX_FALLBACK )
@@ -488,7 +488,7 @@ sal_Bool SvpSalGraphics::GetGlyphOutline( long nGlyphIndex, B2DPolyPolygon& rPol
if( !pSF )
return sal_False;
- nGlyphIndex &= ~GF_FONTMASK;
+ nGlyphIndex &= GF_IDXMASK;
if( pSF->GetGlyphOutline( nGlyphIndex, rPolyPoly ) )
return sal_True;
@@ -524,7 +524,7 @@ void SvpSalGraphics::DrawServerFontLayout( const ServerFontLayout& rSalLayout )
continue;
// get the glyph's alpha mask and adjust the drawing position
- nGlyphIndex &= ~GF_FONTMASK;
+ nGlyphIndex &= GF_IDXMASK;
B2IPoint aDstPoint( aPos.X(), aPos.Y() );
BitmapDeviceSharedPtr aAlphaMask
= rGlyphPeer.GetGlyphBmp( *pSF, nGlyphIndex, m_eTextFmt, aDstPoint );

@ -1,99 +0,0 @@
From 65e841076a947bcf115526e609de78e6952332e7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Wed, 8 Jun 2011 11:05:37 +0100
Subject: [PATCH] Resolves: rhbz#699909 crash in export of .doc in
lcl_getFieldId
---
sw/source/filter/ww8/wrtw8nds.cxx | 26 +++++++++++++++-----------
1 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 114f4a6..183fe59 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -121,7 +121,9 @@ using namespace nsFieldFlags;
static String lcl_getFieldCode( const IFieldmark* pFieldmark ) {
OSL_ENSURE(pFieldmark!=NULL, "where is my fieldmark???");
- if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMTEXT ) ) ) {
+ if ( !pFieldmark) {
+ return String();
+ } else if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMTEXT ) ) ) {
return String::CreateFromAscii(" FORMTEXT ");
} else if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMDROPDOWN ) ) ) {
return String::CreateFromAscii(" FORMDROPDOWN ");
@@ -140,7 +142,9 @@ static String lcl_getFieldCode( const IFieldmark* pFieldmark ) {
ww::eField lcl_getFieldId( const IFieldmark* pFieldmark ) {
OSL_ENSURE(pFieldmark!=NULL, "where is my fieldmark???");
- if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMTEXT ) ) ) {
+ if ( !pFieldmark ) {
+ return ww::eUNKNOWN;
+ } else if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMTEXT ) ) ) {
return ww::eFORMTEXT;
} else if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMDROPDOWN ) ) ) {
return ww::eFORMDROPDOWN;
@@ -1840,11 +1844,11 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
::sw::mark::IFieldmark const * const pFieldmark = pMarkAccess->getFieldmarkFor( aPosition );
OSL_ENSURE( pFieldmark, "Looks like this doc is broken...; where is the Fieldmark for the FIELDSTART??" );
- if ( pFieldmark->GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMTEXT ) ) )
+ if ( pFieldmark && pFieldmark->GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMTEXT ) ) )
AppendBookmark( pFieldmark->GetName(), false );
ww::eField eFieldId = lcl_getFieldId( pFieldmark );
String sCode = lcl_getFieldCode( pFieldmark );
- if ( pFieldmark->GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_UNHANDLED ) ) )
+ if ( pFieldmark && pFieldmark->GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_UNHANDLED ) ) )
{
IFieldmark::parameter_map_t::const_iterator it = pFieldmark->GetParameters()->find(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODF_ID_PARAM )) );
@@ -1865,13 +1869,13 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
}
}
OutputField( NULL, eFieldId, sCode, WRITEFIELD_START | WRITEFIELD_CMD_START );
- if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMTEXT ) ) )
+ if ( pFieldmark && pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMTEXT ) ) )
WriteFormData( *pFieldmark );
- else if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_HYPERLINK ) ) )
+ else if ( pFieldmark && pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_HYPERLINK ) ) )
WriteHyperlinkData( *pFieldmark );
OutputField( NULL, lcl_getFieldId( pFieldmark ), String(), WRITEFIELD_CMD_END );
- if ( pFieldmark->GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_UNHANDLED ) ) )
+ if ( pFieldmark && pFieldmark->GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_UNHANDLED ) ) )
{
// Check for the presence of a linked OLE object
IFieldmark::parameter_map_t::const_iterator it = pFieldmark->GetParameters()->find(
@@ -1893,7 +1897,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
OSL_ENSURE( pFieldmark, "Looks like this doc is broken...; where is the Fieldmark for the FIELDEND??" );
ww::eField eFieldId = lcl_getFieldId( pFieldmark );
- if ( pFieldmark->GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_UNHANDLED ) ) )
+ if ( pFieldmark && pFieldmark->GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_UNHANDLED ) ) )
{
IFieldmark::parameter_map_t::const_iterator it = pFieldmark->GetParameters()->find(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODF_ID_PARAM )) );
@@ -1906,7 +1910,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
}
OutputField( NULL, eFieldId, String(), WRITEFIELD_CLOSE );
- if ( pFieldmark->GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMTEXT ) ) )
+ if ( pFieldmark && pFieldmark->GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMTEXT ) ) )
AppendBookmark( pFieldmark->GetName(), false );
}
else if ( ch == CH_TXT_ATR_FORMELEMENT )
@@ -1915,8 +1919,8 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
::sw::mark::IFieldmark const * const pFieldmark = pMarkAccess->getFieldmarkFor( aPosition );
OSL_ENSURE( pFieldmark, "Looks like this doc is broken...; where is the Fieldmark for the FIELDSTART??" );
- bool isDropdownOrCheckbox = pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMDROPDOWN ) ) ||
- pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMCHECKBOX ) );
+ bool isDropdownOrCheckbox = pFieldmark && (pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMDROPDOWN ) ) ||
+ pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMCHECKBOX ) ));
if ( isDropdownOrCheckbox )
AppendBookmark( pFieldmark->GetName(), 0 );
--
1.7.5.2

@ -1,46 +0,0 @@
From 5bc702e5487ba931b2707770a5e25a883bd89b76 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Fri, 27 May 2011 15:33:40 +0100
Subject: [PATCH] Resolves: rhbz#707317 avoid crash in getRowSpan (cherry
picked from commit
23c4f82e9084f8b15f149b074a8ad4ff6a7a4204)
---
sw/source/core/crsr/swcrsr.cxx | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 4f646d2..c27d8f7 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -1665,8 +1665,7 @@ sal_Bool SwCursor::LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
{
// Set cursor to start/end of covered cell:
SwTableBox* pTableBox = pOldTabBoxSttNode->GetTblBox();
- const long nRowSpan = pTableBox->getRowSpan();
- if ( nRowSpan > 1 )
+ if ( pTableBox && pTableBox->getRowSpan() > 1 )
{
pTableBox = & pTableBox->FindEndOfRowSpan( pOldTabSttNode->GetTable(), (sal_uInt16)(pTableBox->getRowSpan() + mnRowSpanOffset ) );
SwNodeIndex& rPtIdx = GetPoint()->nNode;
@@ -1953,7 +1952,7 @@ sal_Bool SwCursor::GoPrevNextCell( sal_Bool bNext, sal_uInt16 nCnt )
// proceeding:
if ( mnRowSpanOffset )
{
- if ( pTableBox->getRowSpan() > 1 )
+ if ( pTableBox && pTableBox->getRowSpan() > 1 )
{
pTableBox = & pTableBox->FindEndOfRowSpan( pTblNd->GetTable(), (sal_uInt16)(pTableBox->getRowSpan() + mnRowSpanOffset) );
SwNodeIndex aNewIdx( *pTableBox->GetSttNd() );
@@ -1976,7 +1975,7 @@ sal_Bool SwCursor::GoPrevNextCell( sal_Bool bNext, sal_uInt16 nCnt )
pTableBoxStartNode = rPtIdx.GetNode().FindTableBoxStartNode();
pTableBox = pTableBoxStartNode->GetTblBox();
- if ( pTableBox->getRowSpan() < 1 )
+ if ( pTableBox && pTableBox->getRowSpan() < 1 )
{
mnRowSpanOffset = pTableBox->getRowSpan();
// move cursor to non-covered cell:
--
1.7.5.1

@ -1,29 +0,0 @@
From 3860483d8cb9e259ca3f68347ba0e35f7bfb1739 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Thu, 2 Jun 2011 11:39:43 +0100
Subject: [PATCH] Resolves: rhbz#710004 band-aid for immediate crash in
IsAlignPossible (cherry picked from commit
d6839fa9aaac82892b5af2bc00c9ad196c9ff4bb)
---
sw/source/core/frmedt/feshview.cxx | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index ef9becd..87bc266 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -2566,8 +2566,9 @@ sal_Bool SwFEShell::IsAlignPossible() const
{
SdrObject *pO = Imp()->GetDrawView()->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj();
SwDrawContact *pC = (SwDrawContact*)GetUserCall(pO);
+ OSL_ENSURE( pC, "No SwDrawContact!");
//only as character bound drawings can be aligned
- bRet = (pC->GetFmt()->GetAnchor().GetAnchorId() == FLY_AS_CHAR);
+ bRet = pC ? (pC->GetFmt()->GetAnchor().GetAnchorId() == FLY_AS_CHAR) : sal_False;
}
if ( bRet )
return Imp()->GetDrawView()->IsAlignPossible();
--
1.7.5.2

@ -1,111 +0,0 @@
From b883b506e2d4dca419838b56915c58a0030d5b98 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Tue, 7 Jun 2011 12:37:08 +0100
Subject: [PATCH] Resolves: rhbz#710556 don't crash on missing graphics
---
oox/source/export/drawingml.cxx | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 4e94e90..7cf8d98 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -469,7 +469,7 @@ OUString DrawingML::WriteImage( const Graphic& rGraphic )
{
GfxLink aLink = rGraphic.GetLink ();
OUString sMediaType;
- const char* sExtension = NULL;
+ const char* pExtension = "";
OUString sRelId;
SvMemoryStream aStream;
@@ -479,42 +479,42 @@ OUString DrawingML::WriteImage( const Graphic& rGraphic )
switch ( aLink.GetType() ) {
case GFX_LINK_TYPE_NATIVE_GIF:
sMediaType = US( "image/gif" );
- sExtension = ".gif";
+ pExtension = ".gif";
break;
case GFX_LINK_TYPE_NATIVE_JPG:
sMediaType = US( "image/jpeg" );
- sExtension = ".jpeg";
+ pExtension = ".jpeg";
break;
case GFX_LINK_TYPE_NATIVE_PNG:
sMediaType = US( "image/png" );
- sExtension = ".png";
+ pExtension = ".png";
break;
case GFX_LINK_TYPE_NATIVE_TIF:
sMediaType = US( "image/tiff" );
- sExtension = ".tiff";
+ pExtension = ".tiff";
break;
case GFX_LINK_TYPE_NATIVE_WMF:
sMediaType = US( "image/x-wmf" );
- sExtension = ".wmf";
+ pExtension = ".wmf";
break;
case GFX_LINK_TYPE_NATIVE_MET:
sMediaType = US( "image/x-met" );
- sExtension = ".met";
+ pExtension = ".met";
break;
case GFX_LINK_TYPE_NATIVE_PCT:
sMediaType = US( "image/x-pict" );
- sExtension = ".pct";
+ pExtension = ".pct";
break;
default: {
GraphicType aType = rGraphic.GetType();
if ( aType == GRAPHIC_BITMAP ) {
GraphicConverter::Export( aStream, rGraphic, CVT_PNG );
sMediaType = US( "image/png" );
- sExtension = ".png";
+ pExtension = ".png";
} else if ( aType == GRAPHIC_GDIMETAFILE ) {
GraphicConverter::Export( aStream, rGraphic, CVT_EMF );
sMediaType = US( "image/x-emf" );
- sExtension = ".emf";
+ pExtension = ".emf";
} else {
OSL_TRACE( "unhandled graphic type" );
break;
@@ -526,7 +526,7 @@ OUString DrawingML::WriteImage( const Graphic& rGraphic )
}
}
- const char *pComponent = NULL;
+ const char *pComponent = "";
switch ( meDocumentType )
{
case DOCUMENT_DOCX: pComponent = "word"; break;
@@ -538,13 +538,13 @@ OUString DrawingML::WriteImage( const Graphic& rGraphic )
.appendAscii( pComponent )
.appendAscii( "/media/image" )
.append( (sal_Int32) mnImageCounter )
- .appendAscii( sExtension )
+ .appendAscii( pExtension )
.makeStringAndClear(),
sMediaType );
xOutStream->writeBytes( Sequence< sal_Int8 >( (const sal_Int8*) aData, nDataSize ) );
xOutStream->closeOutput();
- const char *pImagePrefix = NULL;
+ const char *pImagePrefix = "";
switch ( meDocumentType )
{
case DOCUMENT_DOCX:
@@ -561,7 +561,7 @@ OUString DrawingML::WriteImage( const Graphic& rGraphic )
OUStringBuffer()
.appendAscii( pImagePrefix )
.append( (sal_Int32) mnImageCounter ++ )
- .appendAscii( sExtension )
+ .appendAscii( pExtension )
.makeStringAndClear() );
return sRelId;
--
1.7.5.2

@ -1,35 +0,0 @@
From 73a9de430716486d4bd7d535df257fb50889a12b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= <cedric.bosdonnat.ooo@free.fr>
Date: Wed, 8 Jun 2011 10:06:23 +0200
Subject: [PATCH] fdo#37584: Make a real copy of the text where to count words
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Const-casting a reference doesn't create a copy of it and then the
spaces replacement made by the WordCount was also made on the actual
text node. Use String::Copy() to actually copy the text and safely
operate on it.
(cherry picked from commit 135cf4fdbec71e8d93edc0339e8617d50766f151)
Signed-off-by: Caolán McNamara <caolanm@redhat.com>
---
sw/source/core/txtnode/txtedt.cxx | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index d4c02b6..08d0c6b 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -1814,7 +1814,7 @@ void SwTxtNode::CountWords( SwDocStat& rStat,
}
// make a copy of the text
- String& rTextCopy = const_cast<String&>(m_Text);
+ String rTextCopy = m_Text.Copy( );
// mask out the redlined and hidden text with ' '
const xub_Unicode cChar(' ');
--
1.7.5.2

@ -18,8 +18,8 @@
Summary: Free Software Productivity Suite
Name: libreoffice
Epoch: 1
Version: 3.4.0.2
Release: 5%{?dist}
Version: 3.4.1.1
Release: 1%{?dist}
License: LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and (CDDL or GPLv2) and Public Domain
Group: Applications/Productivity
URL: http://www.documentfoundation.org/develop
@ -92,13 +92,7 @@ Patch13: 0001-bubble-down-configure-test-findings-on-visibility.patch
Patch14: vbahelper.visibility.patch
Patch15: 0001-rhbz-702635-set-correct-page-number-when-exporting-s.patch
Patch16: 0001-handle-NULL-display-gracefully.patch
Patch17: 0001-Resolves-rhbz-707317-avoid-crash-in-getRowSpan.patch
Patch18: 0001-Resolves-rhbz-710004-band-aid-for-immediate-crash-in.patch
Patch19: 0001-Resolves-rhbz-710556-don-t-crash-on-missing-graphics.patch
Patch20: 0001-Related-rhbz-652604-better-survive-exceptions-thrown.patch
Patch21: 0001-Resolves-rhbz-699909-crash-in-export-of-.doc-in-lcl_.patch
Patch22: 0001-fdo-37584-Make-a-real-copy-of-the-text-where-to-coun.patch
Patch23: 0001-Resolves-fdo-37668-bitwise-operations-on-signed-numb.patch
Patch17: 0001-Related-rhbz-652604-better-survive-exceptions-thrown.patch
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%define instdir %{_libdir}
@ -716,13 +710,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc
%patch14 -p0 -b .vbahelper.visibility.patch
%patch15 -p1 -b .rhbz702635-set-correct-page-number-when-exporting-s.patch
%patch16 -p1 -b .handle-NULL-display-gracefully.patch
%patch17 -p1 -b .rhbz707317-avoid-crash-in-getRowSpan.patch
%patch18 -p1 -b .rhbz710004-band-aid-for-immediate-crash-in.patch
%patch19 -p1 -b .rhbz710556-don-t-crash-on-missing-graphics.patch
%patch20 -p1 -b .rhbz652604-better-survive-exceptions-thrown.patch
%patch21 -p1 -b .rhbz699909-crash-in-export-of-.doc-in-lcl_.patch
%patch22 -p1 -b .fdo37584-Make-a-real-copy-of-the-text-where-to-coun.patch
%patch23 -p1 -b .fdo37668-bitwise-operations-on-signed-numb.patch
%patch17 -p1 -b .rhbz652604-better-survive-exceptions-thrown.patch
# these are horribly incomplete--empty translations and copied english
# strings with spattering of translated strings
@ -2002,6 +1990,15 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%{basisinstdir}/program/kde-open-url
%changelog
* Wed Jun 15 2011 David Tardon <dtardon@redhat.com> - 3.4.1.1-1
- 3.4.1 RC1
- drop integrated 0001-Resolves-rhbz-707317-avoid-crash-in-getRowSpan.patch
- drop integrated 0001-Resolves-rhbz-710004-band-aid-for-immediate-crash-in.patch
- drop integrated 0001-Resolves-rhbz-710556-don-t-crash-on-missing-graphics.patch
- drop integrated 0001-Resolves-rhbz-699909-crash-in-export-of-.doc-in-lcl_.patch
- drop integrated 0001-fdo-37584-Make-a-real-copy-of-the-text-where-to-coun.patch
- drop integrated 0001-Resolves-fdo-37668-bitwise-operations-on-signed-numb.patch
* Thu Jun 09 2011 Caolán McNamara <caolanm@redhat.com> - 3.4.0.2-5
- Resolves: rhbz#699909 crash in export of .doc in lcl_getField
- Resolves: fdo#37584 Make a real copy of the text

@ -8,25 +8,25 @@ a7983f859eafb2677d7ff386a023bc40 a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.
ada24d37d8d638b3d8a9985e80bc2978 ada24d37d8d638b3d8a9985e80bc2978-source-9.0.0.7-bj.zip
b4cae0700aa1c2aef7eb7f345365e6f1 b4cae0700aa1c2aef7eb7f345365e6f1-translate-toolkit-1.8.1.tar.bz2
fdb27bfe2dbe2e7b57ae194d9bf36bab fdb27bfe2dbe2e7b57ae194d9bf36bab-SampleICC-1.3.2.tar.gz
7427ddd5ae63b6ee7aa868201dfbccaa libreoffice-artwork-3.4.0.2.tar.bz2
a78a8e08731213da02c65060cedc5589 libreoffice-base-3.4.0.2.tar.bz2
596da255e2728faccc8f2361171270ec libreoffice-bootstrap-3.4.0.2.tar.bz2
8ed9803a34d13da1764e7523d550d6b0 libreoffice-calc-3.4.0.2.tar.bz2
9be46d7c4bf3a60ee8dd0a5ef3638f82 libreoffice-components-3.4.0.2.tar.bz2
b60db802866ab71c485de42e6382d1bb libreoffice-extensions-3.4.0.2.tar.bz2
09e374cf3bd8f07a043883393012d69b libreoffice-extras-3.4.0.2.tar.bz2
af9f25aa04dc4ef7b797f7bcc743877c libreoffice-filters-3.4.0.2.tar.bz2
ad29de786d76d67759f9d2dd574b29be libreoffice-help-3.4.0.2.tar.bz2
ff13a8ac0ea324122b75773fd80a9245 libreoffice-impress-3.4.0.2.tar.bz2
6eb8f53e01da7a945ee4cd42b7297732 libreoffice-libs-core-3.4.0.2.tar.bz2
90df27d4cbf490668ce4f03ff7dba521 libreoffice-libs-extern-3.4.0.2.tar.bz2
c0ea197183564c49306a1c79ca571e51 libreoffice-libs-extern-sys-3.4.0.2.tar.bz2
91e69ed3c0be542fa7f69ca3da2d7808 libreoffice-libs-gui-3.4.0.2.tar.bz2
a21bbbc0cf9b482a78357b7b6132e799 libreoffice-artwork-3.4.1.1.tar.bz2
d9ccdb2b53de8e16d7bb3215b9e97d7a libreoffice-base-3.4.1.1.tar.bz2
d3aa4a8e05f8b5c3ccf4f945b82b32a2 libreoffice-bootstrap-3.4.1.1.tar.bz2
eb03b6627f2a2240eca089c925692259 libreoffice-calc-3.4.1.1.tar.bz2
190c9b25a7193b7ca98d6f6d09cd20d2 libreoffice-components-3.4.1.1.tar.bz2
45b632fb71b123b699c9e89f9db6632a libreoffice-extensions-3.4.1.1.tar.bz2
19b3e65676e8e8839a4dd884a74e83e4 libreoffice-extras-3.4.1.1.tar.bz2
79a955fd38d0eedca7db146c5a985041 libreoffice-filters-3.4.1.1.tar.bz2
9b9b80ff14a3c6f430cc1fee4551c53e libreoffice-help-3.4.1.1.tar.bz2
c592798d08cccfb14f6cda95eb542d7b libreoffice-impress-3.4.1.1.tar.bz2
1f98cbec964a9563b72962c943af3545 libreoffice-libs-core-3.4.1.1.tar.bz2
01aa850fa07e4440706dcea0def5c27a libreoffice-libs-extern-3.4.1.1.tar.bz2
9765abf75b58c5dbdf82a953af8c6de4 libreoffice-libs-extern-sys-3.4.1.1.tar.bz2
1f07e271d64606116c84c7adbc90a324 libreoffice-libs-gui-3.4.1.1.tar.bz2
74939c9ea525374776f09bf972ede99f libreoffice-multiliblauncher.sh
a81c787b2e5469c2acc9f335b2c9e52f libreoffice-postprocess-3.4.0.2.tar.bz2
ee1c78af6553657614b1a43adf4750ac libreoffice-sdk-3.4.0.2.tar.bz2
c970d6212618fc9b34526907eb030ce6 libreoffice-testing-3.4.0.2.tar.bz2
04d1a5a05aed8d217a5e45ba6759b4be libreoffice-translations-3.4.0.2.tar.bz2
6d25488c81af09d87015bf487243042f libreoffice-ure-3.4.0.2.tar.bz2
9a39234a49516b7035309e28dd4f0784 libreoffice-writer-3.4.0.2.tar.bz2
877cf0733c202936f8b918b9ad423f0d libreoffice-postprocess-3.4.1.1.tar.bz2
231f5a392ab78167a5a7ab7bc922a421 libreoffice-sdk-3.4.1.1.tar.bz2
9452301d1eee5fc3bb4758e003829075 libreoffice-testing-3.4.1.1.tar.bz2
43af29dc34ef5679e16cd1e672e47229 libreoffice-translations-3.4.1.1.tar.bz2
1bc390b972bbe27f513956af37e60538 libreoffice-ure-3.4.1.1.tar.bz2
974b73ed0add1d6e325b9da4e3ca5c5d libreoffice-writer-3.4.1.1.tar.bz2
03c019658ec49050c8103ba0f10b5067 redhat-langpacks.tar.gz

Loading…
Cancel
Save