[Libreoffice-commits] .: Branch 'libreoffice-3-4' - sd/source

Petr Mladek pmladek at kemper.freedesktop.org
Wed Apr 27 11:39:04 PDT 2011


 sd/source/filter/eppt/epptso.cxx    |    2 +-
 sd/source/filter/eppt/pptx-text.cxx |    8 ++++++--
 sd/source/ui/dlg/paragr.cxx         |   14 ++++++++++++++
 sd/source/ui/inc/paragr.hxx         |    2 ++
 4 files changed, 23 insertions(+), 3 deletions(-)

New commits:
commit 4390710f2200b7f705b6a8d20163d30c657ba0d1
Author: Radek Doulik <rodo at novell.com>
Date:   Wed Apr 27 20:38:51 2011 +0200

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

diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 3be71ed..a193991 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 abc9755..9b2ca29 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 deb1725..9bc3f48 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 6ba6b2d..b93fb7d 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() {};


More information about the Libreoffice-commits mailing list