Kaydet (Commit) 6c2e69fb authored tarafından Radek Doulik's avatar Radek Doulik Kaydeden (comit) Petr Mladek

fix-ppt-linespacing-import-export.diff: fix ppt import (bnc#355302)

üst ca5176ae
......@@ -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 );
......
......@@ -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:
......
......@@ -192,4 +192,18 @@ SdParagraphDlg::SdParagraphDlg( Window* pParent, const SfxItemSet* pAttr )
AddTabPage( RID_SVXPAGE_TABULATOR );
}
void SdParagraphDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
switch( nId )
{
case RID_SVXPAGE_STD_PARAGRAPH:
aSet.Put(SfxUInt32Item(SID_SVXSTDPARAGRAPHTABPAGE_ABSLINEDIST, MM50/2));
rPage.PageCreated(aSet);
break;
default:
break;
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -44,6 +44,8 @@ class SdParagraphDlg : public SfxTabDialog
private:
const SfxItemSet& rOutAttrs;
virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
public:
SdParagraphDlg( Window* pParent, const SfxItemSet* pAttr );
~SdParagraphDlg() {};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment