summaryrefslogtreecommitdiff
path: root/sd/source/filter
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/filter')
-rw-r--r--sd/source/filter/eppt/epptso.cxx2
-rw-r--r--sd/source/filter/eppt/pptx-text.cxx8
-rw-r--r--sd/source/filter/ppt/propread.cxx9
-rw-r--r--sd/source/filter/sdfilter.cxx3
4 files changed, 17 insertions, 5 deletions
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 0466af7e6418..5b904608da9c 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -772,7 +772,7 @@ void PPTWriter::ImplWriteParagraphs( SvStream& rOut, TextObj& rTextObj )
}
else
{
- if ( pPortion && pPortion->mnCharHeight > (sal_uInt16)( ((double)-nLineSpacing) * 0.001 * 72.0 / 2.54 ) ) // 1/100mm to point
+ if ( !pPara->mbFixedLineSpacing && pPortion && pPortion->mnCharHeight > (sal_uInt16)( ((double)-nLineSpacing) * 0.001 * 72.0 / 2.54 ) ) // 1/100mm to point
nLineSpacing = nNormalSpacing;
else
nLineSpacing = (sal_Int16)( (double)nLineSpacing / 4.40972 );
diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index abc9755be9af..9b2ca2925bc2 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -1118,11 +1118,15 @@ void ParagraphObj::ImplGetParagraphValues( PPTExBulletProvider& rBuProv, sal_Boo
= *( (::com::sun::star::style::LineSpacing*)mAny.getValue() );
switch ( aLineSpacing.Mode )
{
+ case ::com::sun::star::style::LineSpacingMode::FIX :
+ mnLineSpacing = (sal_Int16)(-( aLineSpacing.Height ) );
+ mbFixedLineSpacing = sal_True;
+ break;
case ::com::sun::star::style::LineSpacingMode::MINIMUM :
case ::com::sun::star::style::LineSpacingMode::LEADING :
- case ::com::sun::star::style::LineSpacingMode::FIX :
mnLineSpacing = (sal_Int16)(-( aLineSpacing.Height ) );
- break;
+ mbFixedLineSpacing = sal_False;
+ break;
case ::com::sun::star::style::LineSpacingMode::PROP :
default:
diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx
index 150acf381c4d..961c779a95a0 100644
--- a/sd/source/filter/ppt/propread.cxx
+++ b/sd/source/filter/ppt/propread.cxx
@@ -503,8 +503,12 @@ void Section::Read( SvStorageStream *pStrm )
break;
case VT_LPWSTR :
+ {
*pStrm >> nTemp;
- nPropSize += ( nTemp << 1 ) + 4;
+ // looks like these are aligned to 4 bytes
+ sal_uInt32 nLength = nPropOfs + nSecOfs + nPropSize + ( nTemp << 1 ) + 4;
+ nPropSize += ( nTemp << 1 ) + 4 + (nLength % 4);
+ }
break;
case VT_BLOB_OBJECT :
@@ -540,6 +544,9 @@ void Section::Read( SvStorageStream *pStrm )
break;
}
pStrm->Seek( nPropOfs + nSecOfs );
+ // make sure we don't overflow the section size
+ if( nPropSize > nSecSize - nSecOfs )
+ nPropSize = nSecSize - nSecOfs;
sal_uInt8* pBuf = new sal_uInt8[ nPropSize ];
pStrm->Read( pBuf, nPropSize );
AddProperty( nPropId, pBuf, nPropSize );
diff --git a/sd/source/filter/sdfilter.cxx b/sd/source/filter/sdfilter.cxx
index c92ccfb06351..56b13fe9247c 100644
--- a/sd/source/filter/sdfilter.cxx
+++ b/sd/source/filter/sdfilter.cxx
@@ -93,7 +93,8 @@ extern "C" { static void SAL_CALL thisModule() {} }
::osl::Module* SdFilter::OpenLibrary( const ::rtl::OUString& rLibraryName ) const
{
std::auto_ptr< osl::Module > mod(new osl::Module);
- return mod->loadRelative(&thisModule, ImplGetFullLibraryName(rLibraryName))
+ return mod->loadRelative(&thisModule, ImplGetFullLibraryName(rLibraryName),
+ SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY)
? mod.release() : 0;
}