summaryrefslogtreecommitdiff
path: root/sd/source
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
commit6c2e69fbd092dfb12c30efdaa98f5fd7a1db77c1 (patch)
tree9921e3256a87b570eae95e566e2fbbf88555da1c /sd/source
parentca5176aecc9c245f969b9677be1879ca94084ab5 (diff)
fix-ppt-linespacing-import-export.diff: fix ppt import (bnc#355302)
Diffstat (limited to 'sd/source')
-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 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/ui/dlg/paragr.cxx b/sd/source/ui/dlg/paragr.cxx
index 75b21600b07b..36751843fb0f 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 af801492672d..89d77c7b9d54 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() {};