[Libreoffice-commits] .: 17 commits - filter/source
Jan Holesovsky
kendy at kemper.freedesktop.org
Mon Feb 7 17:08:49 PST 2011
filter/source/graphicfilter/itga/itga.cxx | 30 ++++++++++++++++++++++++++++++
filter/source/msfilter/escherex.cxx | 6 ++++++
filter/source/pdf/pdfexport.cxx | 6 +-----
3 files changed, 37 insertions(+), 5 deletions(-)
New commits:
commit c993adcbf987e1bd9fafc65148d03851dd5e3c25
Merge: e9a3b0d... 4d86423...
Author: Jan Holesovsky <kendy at suse.cz>
Date: Tue Feb 8 00:12:25 2011 +0100
Merge remote branch 'origin/libreoffice-3-3'
Conflicts:
writerfilter/source/dmapper/DomainMapper_Impl.cxx
commit 4d86423be75125185f7e220877839c68934bfedc
Author: Joseph Powers <jpowers27 at cox.net>
Date: Mon Feb 7 16:32:57 2011 +0000
cherry picked from 0679158ebb6c84863e6e0e2fe877ea06eba4a2d4
Move XServiceInfo.hpp from DEBUG to main.
Now that XServiceInfo is always used, it would be nice to always include
if defination. This fixes a compile error on mac.
PS: Also some trailing white space. The changed code all appears at the
top of the patch.
Signed-off-by: Noel Power <noel.power at novell.com>
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 47541e4..57b6bcc 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,6 +37,7 @@
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#include <com/sun/star/drawing/XShapes.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
#include <com/sun/star/style/LineNumberPosition.hpp>
#include <com/sun/star/style/NumberingType.hpp>
@@ -82,7 +83,6 @@
#if DEBUG
#include <stdio.h>
-#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/style/TabStop.hpp>
#endif
@@ -652,17 +652,17 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap )
#ifdef DEBUG_DOMAINMAPPER
dmapper_logger->startElement("finishParagraph");
#endif
-
+
ParagraphPropertyMap* pParaContext = dynamic_cast< ParagraphPropertyMap* >( pPropertyMap.get() );
TextAppendContext& rAppendContext = m_aTextAppendStack.top();
uno::Reference< text::XTextAppend > xTextAppend = rAppendContext.xTextAppend;
PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
-
+
#ifdef DEBUG_DOMAINMAPPER
dmapper_logger->attribute("isTextAppend", xTextAppend.is());
dmapper_logger->attribute("isIgnor", getTableManager().isIgnore());
-#endif
-
+#endif
+
if(xTextAppend.is() && ! getTableManager( ).isIgnore())
{
try
@@ -868,25 +868,25 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap )
uno::Reference< text::XTextRange > xTextRange =
xTextAppend->finishParagraph( aProperties );
getTableManager( ).handle(xTextRange);
-
+
// Set the anchor of the objects to the created paragraph
while ( m_aAnchoredStack.size( ) > 0 && !m_bIsInShape )
{
uno::Reference< text::XTextContent > xObj = m_aAnchoredStack.top( );
- try
+ try
{
#if DEBUG
rtl::OUString sText( xTextRange->getString( ) );
#endif
xObj->attach( xTextRange );
- }
+ }
catch ( uno::RuntimeException& )
{
// this is normal: the shape is already attached
- }
+ }
m_aAnchoredStack.pop( );
}
-
+
// Get the end of paragraph character inserted
uno::Reference< text::XTextCursor > xCur = xTextRange->getText( )->createTextCursor( );
xCur->gotoEnd( false );
@@ -1235,7 +1235,7 @@ void DomainMapper_Impl::CreateRedline( uno::Reference< text::XTextRange > xRange
pRedlineProperties[0].Value <<= pRedline->m_sAuthor;
pRedlineProperties[1].Name = rPropNameSupplier.GetName( PROP_REDLINE_DATE_TIME );
pRedlineProperties[1].Value <<= lcl_DateStringToDateTime( pRedline->m_sDate );
-
+
xRedline->makeRedline( sType, aRedlineProperties );
}
catch( const uno::Exception & rEx )
@@ -1251,7 +1251,7 @@ void DomainMapper_Impl::CheckParaRedline( uno::Reference< text::XTextRange > xRa
if ( m_pParaRedline.get( ) )
{
CreateRedline( xRange, m_pParaRedline );
- ResetParaRedline( );
+ ResetParaRedline( );
}
}
@@ -1262,9 +1262,9 @@ void DomainMapper_Impl::CheckRedline( uno::Reference< text::XTextRange > xRange
for (; pIt != m_aRedlines.end( ); pIt++ )
{
CreateRedline( xRange, *pIt );
-
+
// Adding the non-mod redlines to the temporary vector
- if ( pIt->get( ) && ( ( *pIt )->m_nToken & 0xffff ) != ooxml::OOXML_mod )
+ if ( pIt->get( ) && ( ( *pIt )->m_nToken & 0xffff ) != ooxml::OOXML_mod )
{
aCleaned.push_back( *pIt );
}
@@ -1325,7 +1325,7 @@ void DomainMapper_Impl::PopAnnotation()
void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape > xShape )
{
m_bIsInShape = true;
- try
+ try
{
// Add the shape to the text append stack
m_aTextAppendStack.push( uno::Reference< text::XTextAppend >( xShape, uno::UNO_QUERY_THROW ) );
@@ -1345,7 +1345,7 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
xProps->setPropertyValue(
rPropNameSupplier.GetName( PROP_OPAQUE ),
uno::makeAny( true ) );
- }
+ }
catch ( const uno::Exception& e )
{
#if DEBUG
@@ -2327,7 +2327,7 @@ void DomainMapper_Impl::PushFieldContext()
#ifdef DEBUG_DOMAINMAPPER
dmapper_logger->element("pushFieldContext");
#endif
-
+
uno::Reference< text::XTextAppend > xTextAppend = m_aTextAppendStack.top().xTextAppend;
//insert a dummy char to make sure the start range doesn't move together with the to-be-appended text
xTextAppend->appendTextPortion(::rtl::OUString( '-' ), uno::Sequence< beans::PropertyValue >() );
@@ -2370,7 +2370,7 @@ void FieldContext::AppendCommand(const ::rtl::OUString& rPart)
{
m_sCommand += rPart;
}
-
+
::std::vector<rtl::OUString> FieldContext::GetCommandParts() const
{
::std::vector<rtl::OUString> aResult;
@@ -2381,10 +2381,10 @@ void FieldContext::AppendCommand(const ::rtl::OUString& rPart)
{
OUString sToken = GetCommand().getToken(0, ' ', nIndex);
bool bInStringNext = bInString;
-
+
if (sToken.getLength() == 0)
continue;
-
+
if (sToken.getStr()[0] == '"')
{
bInStringNext = true;
@@ -2403,30 +2403,30 @@ void FieldContext::AppendCommand(const ::rtl::OUString& rPart)
sPart += OUString(' ');
sPart += sToken;
}
- else
+ else
{
sPart += sToken;
aResult.push_back(sPart);
}
}
- else
+ else
{
if (bInStringNext)
{
sPart = sToken;
}
- else
+ else
{
aResult.push_back(sToken);
}
}
-
+
bInString = bInStringNext;
}
-
+
return aResult;
}
-
+
/*-- 29.01.2007 11:33:15---------------------------------------------------
//collect the pieces of the command
-----------------------------------------------------------------------*/
@@ -2437,7 +2437,7 @@ void DomainMapper_Impl::AppendFieldCommand(::rtl::OUString& rPartOfCommand)
dmapper_logger->chars(rPartOfCommand);
dmapper_logger->endElement("appendFieldCommand");
#endif
-
+
FieldContextPtr pContext = m_aFieldStack.top();
OSL_ENSURE( pContext.get(), "no field context available");
if( pContext.get() )
@@ -2448,7 +2448,7 @@ void DomainMapper_Impl::AppendFieldCommand(::rtl::OUString& rPartOfCommand)
/*-- 13.12.2007 11:45:43---------------------------------------------------
-----------------------------------------------------------------------*/
-typedef std::multimap < sal_Int32, ::rtl::OUString > TOCStyleMap;
+typedef std::multimap < sal_Int32, ::rtl::OUString > TOCStyleMap;
const FieldConversionMap_t & lcl_GetFieldConversion()
{
@@ -2528,9 +2528,9 @@ if(!bFilled)
bFilled = true;
}
-
+
return aFieldConversionMap;
-}
+}
void DomainMapper_Impl::handleFieldAsk
(FieldContextPtr pContext,
@@ -2541,12 +2541,12 @@ void DomainMapper_Impl::handleFieldAsk
//doesn the command contain a variable name?
::rtl::OUString sVariable, sHint;
- sVariable = lcl_ExctractAskVariableAndHint( pContext->GetCommand(),
+ sVariable = lcl_ExctractAskVariableAndHint( pContext->GetCommand(),
sHint );
if(sVariable.getLength())
{
// determine field master name
- uno::Reference< beans::XPropertySet > xMaster =
+ uno::Reference< beans::XPropertySet > xMaster =
FindOrCreateFieldMaster
("com.sun.star.text.FieldMaster.SetExpression", sVariable );
@@ -2578,7 +2578,7 @@ void DomainMapper_Impl::handleAutoNum
uno::Reference< beans::XPropertySet > xFieldProperties)
{
//create a sequence field master "AutoNr"
- uno::Reference< beans::XPropertySet > xMaster =
+ uno::Reference< beans::XPropertySet > xMaster =
FindOrCreateFieldMaster
("com.sun.star.text.FieldMaster.SetExpression",
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutoNr") ));
@@ -2604,16 +2604,16 @@ void DomainMapper_Impl::handleAuthor
{
xFieldProperties->setPropertyValue
( rPropNameSupplier.GetName(PROP_FULL_NAME), uno::makeAny( true ));
- ::rtl::OUString sParam =
+ ::rtl::OUString sParam =
lcl_ExtractParameter(pContext->GetCommand(), sizeof(" AUTHOR") );
if(sParam.getLength())
{
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName( PROP_IS_FIXED ),
+ rPropNameSupplier.GetName( PROP_IS_FIXED ),
uno::makeAny( true ));
//PROP_CURRENT_PRESENTATION is set later anyway
}
-}
+}
void DomainMapper_Impl::handleDocProperty
(FieldContextPtr pContext,
@@ -2623,9 +2623,9 @@ void DomainMapper_Impl::handleAuthor
{
//some docproperties should be imported as document statistic fields, some as DocInfo fields
//others should be user fields
- ::rtl::OUString sParam =
+ ::rtl::OUString sParam =
lcl_ExtractParameter(pContext->GetCommand(), sizeof(" DOCPROPERTY") );
-
+
if(sParam.getLength())
{
#define SET_ARABIC 0x01
@@ -2663,12 +2663,12 @@ void DomainMapper_Impl::handleAuthor
//search for a field mapping
::rtl::OUString sFieldServiceName;
sal_uInt16 nMap = 0;
- for( ; nMap < sizeof(aDocProperties) / sizeof(DocPropertyMap);
+ for( ; nMap < sizeof(aDocProperties) / sizeof(DocPropertyMap);
++nMap )
{
if(sParam.equalsAscii(aDocProperties[nMap].pDocPropertyName))
{
- sFieldServiceName =
+ sFieldServiceName =
::rtl::OUString::createFromAscii
(aDocProperties[nMap].pServiceName);
break;
@@ -2680,7 +2680,7 @@ void DomainMapper_Impl::handleAuthor
if(!sFieldServiceName.getLength())
{
//create a custom property field
- sServiceName +=
+ sServiceName +=
::rtl::OUString::createFromAscii("DocInfo.Custom");
bIsCustomField = true;
}
@@ -2689,8 +2689,8 @@ void DomainMapper_Impl::handleAuthor
sServiceName += sFieldServiceName;
}
xFieldInterface = m_xTextFactory->createInstance(sServiceName);
- xFieldProperties =
- uno::Reference< beans::XPropertySet >( xFieldInterface,
+ xFieldProperties =
+ uno::Reference< beans::XPropertySet >( xFieldInterface,
uno::UNO_QUERY_THROW);
if( bIsCustomField )
xFieldProperties->setPropertyValue(
@@ -2703,7 +2703,7 @@ void DomainMapper_Impl::handleAuthor
uno::makeAny( style::NumberingType::ARABIC ));
else if(0 != (aDocProperties[nMap].nFlags & SET_FULL_NAME))
xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_FULL_NAME),
+ rPropNameSupplier.GetName(PROP_FULL_NAME),
uno::makeAny( true ));
}
}
@@ -2821,7 +2821,7 @@ void DomainMapper_Impl::handleToc
( bTableOfFigures ?
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM
("com.sun.star.text.IllustrationsIndex"))
- : sTOCServiceName),
+ : sTOCServiceName),
uno::UNO_QUERY_THROW);
xTOC->setPropertyValue(rPropNameSupplier.GetName( PROP_TITLE ), uno::makeAny(::rtl::OUString()));
if( !bTableOfFigures )
@@ -2934,14 +2934,14 @@ void DomainMapper_Impl::CloseFieldCommand()
#ifdef DEBUG_DOMAINMAPPER
dmapper_logger->element("closeFieldCommand");
#endif
-
+
FieldContextPtr pContext = m_aFieldStack.top();
OSL_ENSURE( pContext.get(), "no field context available");
if( pContext.get() )
{
m_bSetUserFieldContent = false;
FieldConversionMap_t aFieldConversionMap = lcl_GetFieldConversion();
-
+
try
{
uno::Reference< uno::XInterface > xFieldInterface;
@@ -2979,7 +2979,7 @@ void DomainMapper_Impl::CloseFieldCommand()
dmapper_logger->chars(sServiceName);
dmapper_logger->endElement("fieldService");
#endif
-
+
xFieldInterface = m_xTextFactory->createInstance(sServiceName);
xFieldProperties = uno::Reference< beans::XPropertySet >( xFieldInterface, uno::UNO_QUERY_THROW);
}
@@ -3061,11 +3061,11 @@ void DomainMapper_Impl::CloseFieldCommand()
break;
case FIELD_FILESIZE : break;
case FIELD_FORMULA : break;
- case FIELD_FORMCHECKBOX :
+ case FIELD_FORMCHECKBOX :
{
- FFDataHandler::Pointer_t
+ FFDataHandler::Pointer_t
pFFDataHandler(pContext->getFFDataHandler());
- FormControlHelper::Pointer_t
+ FormControlHelper::Pointer_t
pFormControlHelper(new FormControlHelper
(FIELD_FORMCHECKBOX,
m_xTextDocument, pFFDataHandler));
@@ -3097,16 +3097,16 @@ void DomainMapper_Impl::CloseFieldCommand()
::std::vector<rtl::OUString>::const_iterator aPartIt = aParts.begin();
OUString sURL;
-
- while (aPartIt != aItEnd)
+
+ while (aPartIt != aItEnd)
{
if (aPartIt->equalsAscii("\\l"))
{
aPartIt++;
-
+
if (aPartIt == aItEnd)
break;
-
+
sURL = OUString('#');
sURL += *aPartIt;
}
@@ -3118,18 +3118,18 @@ void DomainMapper_Impl::CloseFieldCommand()
aPartIt->equalsAscii("\\t"))
{
aPartIt++;
-
+
if (aPartIt == aItEnd)
break;
}
- else
+ else
{
sURL = *aPartIt;
}
aPartIt++;
}
-
+
if (sURL.getLength() > 0)
{
pContext->SetHyperlinkURL(sURL);
@@ -3273,7 +3273,7 @@ void DomainMapper_Impl::CloseFieldCommand()
case FIELD_USERNAME : //todo: user name is firstname + lastname
break;
case FIELD_TOC:
- handleToc(pContext, rPropNameSupplier, xFieldInterface, xFieldProperties,
+ handleToc(pContext, rPropNameSupplier, xFieldInterface, xFieldProperties,
::rtl::OUString::createFromAscii(aIt->second.cFieldServiceName));
break;
case FIELD_TC :
@@ -3352,7 +3352,7 @@ void DomainMapper_Impl::SetFieldResult( ::rtl::OUString& rResult )
dmapper_logger->startElement("setFieldResult");
dmapper_logger->chars(rResult);
#endif
-
+
FieldContextPtr pContext = m_aFieldStack.top();
OSL_ENSURE( pContext.get(), "no field context available");
if( pContext.get() )
@@ -3403,13 +3403,13 @@ void DomainMapper_Impl::SetFieldFFData(FFDataHandler::Pointer_t pFFDataHandler)
#ifdef DEBUG_DOMAINMAPPER
dmapper_logger->startElement("setFieldFFData");
#endif
-
+
FieldContextPtr pContext = m_aFieldStack.top();
if (pContext.get())
{
pContext->setFFDataHandler(pFFDataHandler);
}
-
+
#ifdef DEBUG_DOMAINMAPPER
dmapper_logger->endElement("setFieldFFData");
#endif
@@ -3423,7 +3423,7 @@ void DomainMapper_Impl::PopFieldContext()
#ifdef DEBUG_DOMAINMAPPER
dmapper_logger->element("popFieldContext");
#endif
-
+
FieldContextPtr pContext = m_aFieldStack.top();
OSL_ENSURE( pContext.get(), "no field context available");
if( pContext.get() )
@@ -3457,19 +3457,19 @@ void DomainMapper_Impl::PopFieldContext()
uno::Reference< text::XTextAppendAndConvert > xTextAppendAndConvert( xTextAppend, uno::UNO_QUERY_THROW );
xTextAppendAndConvert->appendTextContent( xToInsert, uno::Sequence< beans::PropertyValue >() );
}
- else
+ else
{
FormControlHelper::Pointer_t pFormControlHelper(pContext->getFormControlHelper());
if (pFormControlHelper.get() != NULL)
{
uno::Reference<text::XTextRange> xTxtRange(xCrsr, uno::UNO_QUERY);
pFormControlHelper->insertControl(xTxtRange);
- }
+ }
else if(pContext->GetHyperlinkURL().getLength())
{
PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
xCrsr->gotoEnd( true );
-
+
uno::Reference< beans::XPropertySet > xCrsrProperties( xCrsr, uno::UNO_QUERY_THROW );
xCrsrProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_HYPER_LINK_U_R_L), uno::
makeAny(pContext->GetHyperlinkURL()));
@@ -3700,7 +3700,7 @@ void DomainMapper_Impl::AddNewRedline( )
{
RedlineParamsPtr pNew( new RedlineParams );
pNew->m_nToken = ooxml::OOXML_mod;
- if ( !m_bIsParaChange )
+ if ( !m_bIsParaChange )
{
m_aRedlines.push_back( pNew );
}
@@ -3778,7 +3778,7 @@ void DomainMapper_Impl::ResetParaRedline( )
}
/*-- 22.09.2009 10:26:19---------------------------------------------------
-
+
-----------------------------------------------------------------------*/
void DomainMapper_Impl::ApplySettingsTable()
{
@@ -3793,8 +3793,8 @@ void DomainMapper_Impl::ApplySettingsTable()
}
catch(const uno::Exception& )
{
- }
- }
+ }
+ }
}
SectionPropertyMap * DomainMapper_Impl::GetSectionContext()
@@ -3807,7 +3807,7 @@ SectionPropertyMap * DomainMapper_Impl::GetSectionContext()
OSL_ENSURE(pContext.get(), "Section context is not in the stack!");
pSectionContext = dynamic_cast< SectionPropertyMap* >( pContext.get() );
}
-
+
return pSectionContext;
}
commit 8efa2697b2a2737ee5951358878a17203073ac49
Author: Noel Power <noel.power at novell.com>
Date: Mon Feb 7 12:01:46 2011 +0000
fix for bnc#655763
cherry picked from ae5d018c49d3ab61416cde7fb09c37bcce7d9566
reviewed in bug https://bugzilla.novell.com/show_bug.cgi?id=655763#c6
Signed-off-by: Cedric Bosdonnat <cbosdonnat at novell.com>
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index e89a40c..47541e4 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1338,9 +1338,10 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape
PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY_THROW );
- xProps->setPropertyValue(
- rPropNameSupplier.GetName( PROP_ANCHOR_TYPE ),
- uno::makeAny( text::TextContentAnchorType_AT_PARAGRAPH ) );
+ uno::Reference< lang::XServiceInfo > xSInfo( xShape, uno::UNO_QUERY_THROW );
+ bool bIsGraphic = xSInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.GraphicObjectShape" ) ) );
+
+ xProps->setPropertyValue( rPropNameSupplier.GetName( PROP_ANCHOR_TYPE ), bIsGraphic ? uno::makeAny( text::TextContentAnchorType_AS_CHARACTER ) : uno::makeAny( text::TextContentAnchorType_AT_PARAGRAPH ) );
xProps->setPropertyValue(
rPropNameSupplier.GetName( PROP_OPAQUE ),
uno::makeAny( true ) );
commit 780535edc21bc230a859d672b7408f10e2691a38
Author: Petr Mladek <pmladek at suse.cz>
Date: Wed Feb 2 17:09:03 2011 +0100
RTF export crasher (bnc#656503)
Signed off by Cedric
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index cc561b8..7a14c2f 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -4372,6 +4372,10 @@ sal_uInt32 EscherExGlobal::GenerateDrawingId()
sal_uInt32 EscherExGlobal::GenerateShapeId( sal_uInt32 nDrawingId, bool bIsInSpgr )
{
// drawing identifier is one-based
+ // make sure the drawing is valid (bnc#656503)
+ if ( nDrawingId == 0 )
+ return 0;
+ // create index from the identifier
size_t nDrawingIdx = nDrawingId - 1;
OSL_ENSURE( nDrawingIdx < maDrawingInfos.size(), "EscherExGlobal::GenerateShapeId - invalid drawing ID" );
if( nDrawingIdx >= maDrawingInfos.size() )
@@ -4472,6 +4476,8 @@ EscherEx::EscherEx( const EscherExGlobalRef& rxGlobal, SvStream& rOutStrm ) :
mxGlobal ( rxGlobal ),
mpOutStrm ( &rOutStrm ),
+ mnCurrentDg ( 0 ),
+
mnGroupLevel ( 0 ),
mnHellLayerId ( USHRT_MAX ),
commit ecda6f3b42d84e88d35d4d6bd4ea5cc32b9b8c89
Author: Takeshi Kurosawa <taken.spc at gmail.com>
Date: Thu Jan 27 14:31:57 2011 +0900
Use product name for EPS Creator header
(cherry picked from commit 2d07f1d678dc868687a9ae8c326b766e7def21c2)
Signed-off-by: Thorsten Behrens <tbehrens at novell.com>
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index 083e9df..dd127e0 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -44,6 +44,7 @@
#include <vcl/msgbox.hxx>
#include <vcl/cvtgrf.hxx>
#include <vcl/gradient.hxx>
+#include <unotools/configmgr.hxx>
#include <svl/solar.hrc>
#include <svtools/fltcall.hxx>
#include <svtools/FilterConfigItem.hxx>
@@ -54,6 +55,8 @@
#include <math.h>
+using namespace ::com::sun::star::uno;
+
#define POSTSCRIPT_BOUNDINGSEARCH 0x1000 // we only try to get the BoundingBox
// in the first 4096 bytes
@@ -459,7 +462,18 @@ void PSWriter::ImplWriteProlog( const Graphic* pPreview )
ImplWriteLong( aSizePoint.Width() );
ImplWriteLong( aSizePoint.Height() ,PS_RET );
ImplWriteLine( "%%Pages: 0" );
- ImplWriteLine( "%%Creator: Sun Microsystems, Inc." );
+ ::rtl::OUStringBuffer aCreator;
+ aCreator.appendAscii( RTL_CONSTASCII_STRINGPARAM( "%%Creator: " ) );
+ ::utl::ConfigManager& rMgr = ::utl::ConfigManager::GetConfigManager();
+ Any aProductName = rMgr.GetDirectConfigProperty( ::utl::ConfigManager::PRODUCTNAME );
+ ::rtl::OUString sProductName;
+ aProductName >>= sProductName;
+ aCreator.append( sProductName );
+ aProductName = rMgr.GetDirectConfigProperty( ::utl::ConfigManager::PRODUCTVERSION );
+ aProductName >>= sProductName;
+ aCreator.appendAscii( RTL_CONSTASCII_STRINGPARAM( " " ) );
+ aCreator.append( sProductName );
+ ImplWriteLine( ::rtl::OUStringToOString( aCreator.makeStringAndClear(), RTL_TEXTENCODING_UTF8 ).getStr() );
ImplWriteLine( "%%Title: none" );
ImplWriteLine( "%%CreationDate: none" );
diff --git a/filter/source/graphicfilter/eps/makefile.mk b/filter/source/graphicfilter/eps/makefile.mk
index 34c87f1..1c58e61 100644
--- a/filter/source/graphicfilter/eps/makefile.mk
+++ b/filter/source/graphicfilter/eps/makefile.mk
@@ -60,7 +60,7 @@ RESLIB1SRSFILES=$(SRS)$/$(TARGET).srs
.IF "$(L10N_framework)"==""
SHL1TARGET= eps$(DLLPOSTFIX)
SHL1IMPLIB= eps
-SHL1STDLIBS= $(TOOLSLIB) $(VCLLIB) $(VCLLIB) $(SVTOOLLIB) $(CPPULIB) $(SALLIB)
+SHL1STDLIBS= $(TOOLSLIB) $(VCLLIB) $(VCLLIB) $(SVTOOLLIB) $(CPPULIB) $(SALLIB) $(UNOTOOLSLIB)
SHL1LIBS= $(SLB)$/eps.lib
commit dd73734f0440787d84ddbe5737e7f996803dacf2
Author: Takeshi Kurosawa <taken.spc at gmail.com>
Date: Thu Jan 27 13:45:16 2011 +0900
Parse 'color' property (fdo#33551)
Parse 'color' property and store the value as currentColor.
(cherry picked from commit d4bac116d0c35d8811a048fdd991363a32df14ca)
Signed-off-by: Thorsten Behrens <tbehrens at novell.com>
diff --git a/filter/source/svg/svgreader.cxx b/filter/source/svg/svgreader.cxx
index 60f7bf4..cae3e10 100644
--- a/filter/source/svg/svgreader.cxx
+++ b/filter/source/svg/svgreader.cxx
@@ -990,6 +990,14 @@ struct AnnotatingVisitor
rParent.maStrokeGradient );
break;
}
+ case XML_COLOR:
+ {
+ if( aValueUtf8 == "inherit" )
+ maCurrState.maCurrentColor = maParentStates.back().maCurrentColor;
+ else
+ parseColor(aValueUtf8, maCurrState.maCurrentColor);
+ break;
+ }
case XML_TRANSFORM:
{
basegfx::B2DHomMatrix aTransform;
commit 9a7fcfcf49e393c02e8d115dfa4a40811582375f
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Sun Jan 30 10:22:38 2011 +0100
Use double instead of float
(cherry picked from commit c90c5d503543a960a05b43752a5dff9ccf4bcd30)
Signed-off-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/writerperfect/source/filter/DocumentCollector.cxx b/writerperfect/source/filter/DocumentCollector.cxx
index 5db1900..b8f848e 100644
--- a/writerperfect/source/filter/DocumentCollector.cxx
+++ b/writerperfect/source/filter/DocumentCollector.cxx
@@ -82,7 +82,7 @@ DocumentCollector::DocumentCollector(WPXInputStream *pInput, DocumentHandlerInte
mbUsed(false),
mWriterDocumentStates(),
mWriterListStates(),
- mfSectionSpaceAfter(0.0f),
+ mfSectionSpaceAfter(0.0),
miNumListStyles(0),
mpCurrentContentElements(&mBodyElements),
mpCurrentPageSpan(NULL),
diff --git a/writerperfect/source/filter/DocumentCollector.hxx b/writerperfect/source/filter/DocumentCollector.hxx
index 619bc1d..6d0d353 100644
--- a/writerperfect/source/filter/DocumentCollector.hxx
+++ b/writerperfect/source/filter/DocumentCollector.hxx
@@ -204,7 +204,7 @@ private:
// section styles
std::vector<SectionStyle *> mSectionStyles;
- float mfSectionSpaceAfter;
+ double mfSectionSpaceAfter;
// table styles
std::vector<TableStyle *> mTableStyles;
diff --git a/writerperfect/source/filter/FilterInternal.hxx b/writerperfect/source/filter/FilterInternal.hxx
index c53e83e..fcac328 100644
--- a/writerperfect/source/filter/FilterInternal.hxx
+++ b/writerperfect/source/filter/FilterInternal.hxx
@@ -31,9 +31,9 @@
#define WRITER_DEBUG_MSG(M)
#endif
-const float fDefaultSideMargin = 1.0f; // inches
-const float fDefaultPageWidth = 8.5f; // inches (OOo required default: we will handle this later)
-const float fDefaultPageHeight = 11.0f; // inches
+const double fDefaultSideMargin = 1.0; // inches
+const double fDefaultPageWidth = 8.5; // inches (OOo required default: we will handle this later)
+const double fDefaultPageHeight = 11.0; // inches
#endif
diff --git a/writerperfect/source/filter/ListStyle.cxx b/writerperfect/source/filter/ListStyle.cxx
index 248ea7d..a5c1780 100644
--- a/writerperfect/source/filter/ListStyle.cxx
+++ b/writerperfect/source/filter/ListStyle.cxx
@@ -73,11 +73,11 @@ void OrderedListLevelStyle::write(DocumentHandlerInterface *pHandler, int iLevel
listLevelStyleOpen.write(pHandler);
TagOpenElement stylePropertiesOpen("style:list-level-properties");
- if (mPropList["text:space-before"] && mPropList["text:space-before"]->getDouble() > 0.0f)
+ if (mPropList["text:space-before"] && mPropList["text:space-before"]->getDouble() > 0.0)
stylePropertiesOpen.addAttribute("text:space-before", mPropList["text:space-before"]->getStr());
- if (mPropList["text:min-label-width"] && mPropList["text:min-label-width"]->getDouble() > 0.0f)
+ if (mPropList["text:min-label-width"] && mPropList["text:min-label-width"]->getDouble() > 0.0)
stylePropertiesOpen.addAttribute("text:min-label-width", mPropList["text:min-label-width"]->getStr());
- if (mPropList["text:min-label-distance"] && mPropList["text:min-label-distance"]->getDouble() > 0.0f)
+ if (mPropList["text:min-label-distance"] && mPropList["text:min-label-distance"]->getDouble() > 0.0)
stylePropertiesOpen.addAttribute("text:min-label-distance", mPropList["text:min-label-distance"]->getStr());
stylePropertiesOpen.write(pHandler);
@@ -120,11 +120,11 @@ void UnorderedListLevelStyle::write(DocumentHandlerInterface *pHandler, int iLev
listLevelStyleOpen.write(pHandler);
TagOpenElement stylePropertiesOpen("style:list-level-properties");
- if (mPropList["text:space-before"] && mPropList["text:space-before"]->getDouble() > 0.0f)
+ if (mPropList["text:space-before"] && mPropList["text:space-before"]->getDouble() > 0.0)
stylePropertiesOpen.addAttribute("text:space-before", mPropList["text:space-before"]->getStr());
- if (mPropList["text:min-label-width"] && mPropList["text:min-label-width"]->getDouble() > 0.0f)
+ if (mPropList["text:min-label-width"] && mPropList["text:min-label-width"]->getDouble() > 0.0)
stylePropertiesOpen.addAttribute("text:min-label-width", mPropList["text:min-label-width"]->getStr());
- if (mPropList["text:min-label-distance"] && mPropList["text:min-label-distance"]->getDouble() > 0.0f)
+ if (mPropList["text:min-label-distance"] && mPropList["text:min-label-distance"]->getDouble() > 0.0)
stylePropertiesOpen.addAttribute("text:min-label-distance", mPropList["text:min-label-distance"]->getStr());
stylePropertiesOpen.addAttribute("style:font-name", "OpenSymbol");
stylePropertiesOpen.write(pHandler);
diff --git a/writerperfect/source/filter/SectionStyle.cxx b/writerperfect/source/filter/SectionStyle.cxx
index 5900549..f88b800 100644
--- a/writerperfect/source/filter/SectionStyle.cxx
+++ b/writerperfect/source/filter/SectionStyle.cxx
@@ -74,7 +74,7 @@ void SectionStyle::write(DocumentHandlerInterface *pHandler) const
else
{
columnProps.insert("fo:column-count", 0);
- columnProps.insert("fo:column-gap", 0.0f);
+ columnProps.insert("fo:column-gap", 0.0);
pHandler->startElement("style:columns", columnProps);
}
diff --git a/writerperfect/source/filter/TextRunStyle.cxx b/writerperfect/source/filter/TextRunStyle.cxx
index 740c2ce..7ee21ff 100644
--- a/writerperfect/source/filter/TextRunStyle.cxx
+++ b/writerperfect/source/filter/TextRunStyle.cxx
@@ -81,10 +81,10 @@ void ParagraphStyle::write(DocumentHandlerInterface *pHandler) const
propList.insert("fo:margin-top", i()->getStr());
if (strcmp(i.key(), "fo:margin-bottom") == 0)
{
- if (i()->getDouble() > 0.0f)
+ if (i()->getDouble() > 0.0)
propList.insert("fo:margin-bottom", i()->getStr());
else
- propList.insert("fo:margin-bottom", 0.0f);
+ propList.insert("fo:margin-bottom", 0.0);
}
if (strcmp(i.key(), "fo:line-height") == 0)
propList.insert("fo:line-height", i()->getStr());
@@ -149,7 +149,7 @@ void SpanStyle::write(DocumentHandlerInterface *pHandler) const
if (mPropList["fo:font-size"])
{
- if (mPropList["fo:font-size"]->getDouble() > 0.0f)
+ if (mPropList["fo:font-size"]->getDouble() > 0.0)
{
propList.insert("style:font-size-asian", mPropList["fo:font-size"]->getStr());
propList.insert("style:font-size-complex", mPropList["fo:font-size"]->getStr());
diff --git a/writerperfect/source/filter/WriterProperties.hxx b/writerperfect/source/filter/WriterProperties.hxx
index 757807e..3889b21 100644
--- a/writerperfect/source/filter/WriterProperties.hxx
+++ b/writerperfect/source/filter/WriterProperties.hxx
@@ -29,9 +29,9 @@
#define _WRITER_PROPERTIES_H
#define IMP_DEFAULT_SUPER_SUB_SCRIPT "58%"
-#define IMP_NUM_CENTIMETERES_PER_INCH 2.54f
+#define IMP_NUM_CENTIMETERES_PER_INCH 2.54
#define IMP_DEFAULT_FONT_NAME "Times New Roman"
-#define IMP_DEFAULT_FONT_SIZE 12.0f
+#define IMP_DEFAULT_FONT_SIZE 12.0
#define IMP_DEFAULT_FONT_PITCH "variable"
#endif
commit 9fd267985820db81454cce1b4a76752769b471b7
Author: Thomas Klausner <wiz at NetBSD.org>
Date: Sat Nov 6 00:30:42 2010 +0100
Use PYTHON as passed through by set_soenv.in.
diff --git a/filter/source/config/fragments/makefile.mk b/filter/source/config/fragments/makefile.mk
index d827b34..c97818b 100644
--- a/filter/source/config/fragments/makefile.mk
+++ b/filter/source/config/fragments/makefile.mk
@@ -182,7 +182,7 @@ $(ALL_FLAGS) : $(INCLUDE_FRAGMENTS)
.IF "$(SOLAR_JAVA)"==""
#cmc, hack to workaround the java build requirement
.IF "$(SYSTEM_PYTHON)" == "YES"
-MERGE:=python ../tools/merge/pyAltFCFGMerge
+MERGE:=$(PYTHON) ../tools/merge/pyAltFCFGMerge
.ELSE
MERGE:=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/python ../tools/merge/pyAltFCFGMerge
.ENDIF
commit 82102abd307f911c400735eb6f9b43fa69d221d8
Author: Noel Power <noel.power at novell.com>
Date: Tue Jan 18 12:58:17 2011 +0000
fdo#33237 remove debug line
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 7934d89..e89a40c 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -555,7 +555,6 @@ bool lcl_removeShape( const uno::Reference< text::XTextDocument >& rDoc, const
{
xDrawPage->remove( rShape );
}
- osl_trace("**** after removing shape ");
rAnchoredStack.pop();
rTextAppendStack.pop();
bRet = true;
commit 9c976ba4f8e1fd2bcd40412873e22728ed83d5bd
Author: Noel Power <noel.power at novell.com>
Date: Tue Jan 18 12:43:50 2011 +0000
fdo#33237# fix ole object import for writer (docx)
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 59a897f..7934d89 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -535,6 +535,38 @@ void DomainMapper_Impl::clearDeferredBreaks()
m_bIsColumnBreakDeferred = false;
m_bIsPageBreakDeferred = false;
}
+
+bool lcl_removeShape( const uno::Reference< text::XTextDocument >& rDoc, const uno::Reference< drawing::XShape >& rShape, TextContentStack& rAnchoredStack,TextAppendStack& rTextAppendStack )
+{
+ bool bRet = false;
+ // probably unecessary but just double check that indeed the top of Anchored stack
+ // does contain the shape we intend to remove
+ uno::Reference< drawing::XShape > xAnchorShape(rAnchoredStack.top( ), uno::UNO_QUERY );
+ if ( xAnchorShape == rShape )
+ {
+ // because we only want to process the embedded object and not the associated
+ // shape we need to get rid of that shape from the Draw page and Anchored and
+ // Append stacks so it wont be processed further
+ try
+ {
+ uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(rDoc, uno::UNO_QUERY_THROW);
+ uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
+ if ( xDrawPage.is() )
+ {
+ xDrawPage->remove( rShape );
+ }
+ osl_trace("**** after removing shape ");
+ rAnchoredStack.pop();
+ rTextAppendStack.pop();
+ bRet = true;
+ }
+ catch( uno::Exception& e )
+ {
+ }
+ }
+ return bRet;
+}
+
/*-------------------------------------------------------------------------
-----------------------------------------------------------------------*/
@@ -992,6 +1024,15 @@ void DomainMapper_Impl::appendOLE( const ::rtl::OUString& rStreamName, OLEHandle
uno::Reference< graphic::XGraphic > xGraphic = pOLEHandler->getReplacement();
xOLEProperties->setPropertyValue(PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_GRAPHIC ),
uno::makeAny(xGraphic));
+ // mimic the treatment of graphics here.. it seems anchoring as character
+ // gives a better ( visually ) result
+ xOLEProperties->setPropertyValue(PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_ANCHOR_TYPE ), uno::makeAny( text::TextContentAnchorType_AS_CHARACTER ) );
+ // remove ( if valid ) associated shape ( used for graphic replacement )
+ if ( m_bShapeContextAdded )
+ {
+ if ( lcl_removeShape( m_xTextDocument, pOLEHandler->getShape(), m_aAnchoredStack, m_aTextAppendStack ) )
+ m_bShapeContextAdded = false; // ensure PopShapeContext processing doesn't pop the append stack
+ }
//
appendTextContent( xOLE, uno::Sequence< beans::PropertyValue >() );
commit 8383f008c60c0615005f4bb22ae9ddaeca4540cf
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Tue Jan 18 11:12:52 2011 +0100
Fix a typo SolarMuexGuard -> SolarMutexGuard
signoff: Jan Holesovsky <kendy at suse.cz>
signoff: Thorsten Behrens <thb at documentfoundation.org>
signoff: Tor Lillqvist <tlillqvist at novell.com>
signoff: Petr Mladek <pmladek at suse.cz>
diff --git a/binfilter/bf_so3/source/ole/socli.cxx b/binfilter/bf_so3/source/ole/socli.cxx
index af79348..b6e2a93 100644
--- a/binfilter/bf_so3/source/ole/socli.cxx
+++ b/binfilter/bf_so3/source/ole/socli.cxx
@@ -107,7 +107,7 @@ STDMETHODIMP_(ULONG) CImpIOleClientSite::Release(void)
STDMETHODIMP CImpIOleClientSite::SaveObject(void)
{
- ::SolarMuexGuard aGuard;
+ ::SolarMutexGuard aGuard;
m_pTen->Update();
commit 247a91f1df71614fc8d9b2264d10f0952055c611
Author: Petr Mladek <pmladek at suse.cz>
Date: Tue Jan 11 23:05:56 2011 +0100
Please, ignore the previous message; it was for the libreoffice-3-3-0 branch
This is 'libreoffice-3-3' - the stable branch for the 3.3.x releases.
Only safe changes, reviewed by anoter person are allowed.
If you want to build something cool, unstable, and risky, use master.
commit 9628deac573830fdfbce2c402f8574379ac71a35
Author: Petr Mladek <pmladek at suse.cz>
Date: Tue Jan 11 22:39:07 2011 +0100
Branch libreoffice-3-3-0
This is 'libreoffice-3-3-0' - the stable branch for the 3.3.0 release.
Only very safe changes, reviewed by three people are allowed.
If you want to commit more complicated fix for the next 3.3.x release,
please use the 'libreoffice-3-3' branch.
If you want to build something cool, unstable, and risky, use master.
commit 9345035d890ad884b8cf86312eaa5b9201694120
Author: Petr Mladek <pmladek at suse.cz>
Date: Mon Jan 10 19:47:09 2011 +0100
Version 3.3.0.3, tag libreoffice-3.3.0.3 (3.3-rc3)
commit 39d45e8899421d247c3d7042231d6898d058aaf1
Author: Noel Power <noel.power at novell.com>
Date: Mon Jan 10 15:26:47 2011 +0000
fdo#32600# fix specific core dump on read
Seems like the REFERENCENAME record has some optional parts ( when Reserved is not eh expected 0x003E ) Ultimately thow we should get rid of filter/source/msfilter/msvbasic.cxx in favour of the oox filter.
(cherry picked from commit 3dafb0e3f67b676169238b565890d88258377eb4)
Signed-off-by: Thorsten Behrens <tbehrens at novell.com>
diff --git a/filter/source/msfilter/msvbasic.cxx b/filter/source/msfilter/msvbasic.cxx
index 41f4f5e..a36def5 100644
--- a/filter/source/msfilter/msvbasic.cxx
+++ b/filter/source/msfilter/msvbasic.cxx
@@ -435,7 +435,8 @@ ReferenceNameRecord() : Id( 0x16 ), SizeOfName( 0 ), Reserved( 0x3E ), SizeOfNam
void read( SvStream* pStream )
{
- OSL_TRACE("NameRecord [0x%x]", pStream->Tell() );
+ long nPos = pStream->Tell();
+ OSL_TRACE("NameRecord [0x%x]", nPos );
*pStream >> Id >> SizeOfName;
boost::scoped_array< sal_uInt8 > pName( new sal_uInt8[ SizeOfName ] );
@@ -443,7 +444,19 @@ void read( SvStream* pStream )
pStream->Read( pName.get(), SizeOfName );
Name = svt::BinFilterUtils::CreateOUStringFromStringArray( reinterpret_cast< const char* >( pName.get() ), SizeOfName );
- *pStream >> Reserved >> SizeOfNameUnicode;
+ nPos = pStream->Tell();
+ *pStream >> Reserved;
+
+ if ( Reserved != 0x3E )
+ {
+ // it seems the spec here is incorrect and the Unicode portion
+ // looks like it can be optional ( if 'Reserved' isn't the expected
+ // 0x34 ) - return stream here to point before Reserved
+ pStream->Seek( nPos );
+ return;
+ }
+
+ *pStream >> SizeOfNameUnicode;
boost::scoped_array< sal_uInt8 > pNameUnicode( new sal_uInt8[ SizeOfNameUnicode ] );
pStream->Read( pNameUnicode.get(), SizeOfNameUnicode );
commit ab4df2adfa27f4dcb35e61795123eee32de602fb
Author: Christian Lippka ORACLE <christian.lippka at oracle.com>
Date: Mon Jan 3 18:04:13 2011 +0100
impress208: #164349# small TGAReader improvement
diff --git a/filter/source/graphicfilter/itga/itga.cxx b/filter/source/graphicfilter/itga/itga.cxx
index c991d18..d989f9d 100644
--- a/filter/source/graphicfilter/itga/itga.cxx
+++ b/filter/source/graphicfilter/itga/itga.cxx
@@ -339,6 +339,9 @@ BOOL TGAReader::ImplReadBody()
nXCount = 0;
nY += nYAdd;
nYCount++;
+
+ if( nYCount >= mpFileHeader->nImageHeight )
+ return false; // invalid picture
}
}
}
@@ -361,6 +364,9 @@ BOOL TGAReader::ImplReadBody()
nXCount = 0;
nY += nYAdd;
nYCount++;
+
+ if( nYCount >= mpFileHeader->nImageHeight )
+ return false; // invalid picture
}
}
}
@@ -388,6 +394,9 @@ BOOL TGAReader::ImplReadBody()
nXCount = 0;
nY += nYAdd;
nYCount++;
+
+ if( nYCount >= mpFileHeader->nImageHeight )
+ return false; // invalid picture
}
}
}
@@ -408,6 +417,9 @@ BOOL TGAReader::ImplReadBody()
nXCount = 0;
nY += nYAdd;
nYCount++;
+
+ if( nYCount >= mpFileHeader->nImageHeight )
+ return false; // invalid picture
}
}
}
@@ -441,6 +453,9 @@ BOOL TGAReader::ImplReadBody()
nXCount = 0;
nY += nYAdd;
nYCount++;
+
+ if( nYCount >= mpFileHeader->nImageHeight )
+ return false; // invalid picture
}
}
}
@@ -458,6 +473,9 @@ BOOL TGAReader::ImplReadBody()
nXCount = 0;
nY += nYAdd;
nYCount++;
+
+ if( nYCount >= mpFileHeader->nImageHeight )
+ return false; // invalid picture
}
}
}
@@ -484,6 +502,9 @@ BOOL TGAReader::ImplReadBody()
nXCount = 0;
nY += nYAdd;
nYCount++;
+
+ if( nYCount >= mpFileHeader->nImageHeight )
+ return false; // invalid picture
}
}
}
@@ -501,6 +522,9 @@ BOOL TGAReader::ImplReadBody()
nXCount = 0;
nY += nYAdd;
nYCount++;
+
+ if( nYCount >= mpFileHeader->nImageHeight )
+ return false; // invalid picture
}
}
}
@@ -529,6 +553,9 @@ BOOL TGAReader::ImplReadBody()
nXCount = 0;
nY += nYAdd;
nYCount++;
+
+ if( nYCount >= mpFileHeader->nImageHeight )
+ return false; // invalid picture
}
}
}
@@ -549,6 +576,9 @@ BOOL TGAReader::ImplReadBody()
nXCount = 0;
nY += nYAdd;
nYCount++;
+
+ if( nYCount >= mpFileHeader->nImageHeight )
+ return false; // invalid picture
}
}
}
commit 318672980a79e294ff2c4871c79f3e17cb6af1a9
Author: Philipp Lohmann [pl] <Philipp.Lohmann at Oracle.COM>
Date: Wed Dec 15 13:24:33 2010 +0100
ooo33gsl13: #i116085# adjust PageRange handling in writer PDF export
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index e687727..a3bdc9b 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -789,7 +789,7 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue
pPDFExtOutDevData->SetIsReduceImageResolution( mbReduceImageResolution );
pPDFExtOutDevData->SetIsExportNamedDestinations( mbExportBmkToDest );
- Sequence< PropertyValue > aRenderOptions( 5 );
+ Sequence< PropertyValue > aRenderOptions( 6 );
aRenderOptions[ 0 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "RenderDevice" ) );
aRenderOptions[ 0 ].Value <<= Reference< awt::XDevice >( pXDevice );
aRenderOptions[ 1 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "ExportNotesPages" ) );
@@ -801,12 +801,8 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue
aRenderOptions[ 3 ].Value <<= sal_False;
aRenderOptions[ 4 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "IsSkipEmptyPages" ) );
aRenderOptions[ 4 ].Value <<= mbSkipEmptyPages;
- #if 0
- // #i113919# writer has to begun "PageRange" for itself changing its renderer count
- // we should unify this behavior but not for OOo 3.3
aRenderOptions[ 5 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) );
aRenderOptions[ 5 ].Value <<= aPageRange;
- #endif
if( aPageRange.getLength() || !aSelection.hasValue() )
{
More information about the Libreoffice-commits
mailing list