summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadek Doulik <rodo@novell.com>2011-04-27 20:38:51 +0200
committerPetr Mladek <pmladek@suse.cz>2011-04-27 20:38:51 +0200
commit4390710f2200b7f705b6a8d20163d30c657ba0d1 (patch)
tree283a1ef100d3f21833913843e354bcb7e70e6f29
parent29c3930b93a95a2a0c4fd33552b002e98fac325d (diff)
fix-ppt-linespacing-import-export.diff: fix ppt import (bnc#355302)
-rw-r--r--sd/source/filter/eppt/epptso.cxx2
-rw-r--r--sd/source/filter/eppt/pptx-text.cxx8
-rw-r--r--sd/source/ui/dlg/paragr.cxx14
-rw-r--r--sd/source/ui/inc/paragr.hxx2
4 files changed, 23 insertions, 3 deletions
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 3be71ed2f..a19399126 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 abc9755be..9b2ca2925 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/ui/dlg/paragr.cxx b/sd/source/ui/dlg/paragr.cxx
index deb172572..9bc3f48dc 100644
--- a/sd/source/ui/dlg/paragr.cxx
+++ b/sd/source/ui/dlg/paragr.cxx
@@ -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: */
diff --git a/sd/source/ui/inc/paragr.hxx b/sd/source/ui/inc/paragr.hxx
index 6ba6b2d96..b93fb7d9b 100644
--- a/sd/source/ui/inc/paragr.hxx
+++ b/sd/source/ui/inc/paragr.hxx
@@ -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() {};