ooo-build r11504 - in branches/sled-10-ooo-build-2-3: . patches/src680
- From: rodo svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r11504 - in branches/sled-10-ooo-build-2-3: . patches/src680
- Date: Tue, 5 Feb 2008 13:21:23 +0000 (GMT)
Author: rodo
Date: Tue Feb 5 13:21:22 2008
New Revision: 11504
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11504&view=rev
Log:
2008-02-04 Radek Doulik <rodo novell com>
* patches/src680/apply: added
fix-ppt-linespacing-import-export.diff, n#355302, rodo, containing
the fixes below
* build/ooh680-m5/svx/source/svdraw/svdfppt.cxx (ApplyTo): use
fixed linespace by ppt import instead of "at least" linespacing
which doesn't exist in powerpoint
* build/ooh680-m5/svx/source/editeng/impedit3.cxx (CreateLines):
handle fixed linespacing
(CreateAndInsertEmptyLine): ditto
* build/ooh680-m5/sd/source/ui/dlg/paragr.cxx: enable fixed
linespacing in the impress paragraph dialog
* build/ooh680-m5/sd/source/filter/eppt/epptso.cxx
(ImplWriteParagraphs): do not export normal line height when fixed
linespacing is used
(ImplGetParagraphValues): handle the fixed linespacing
* build/ooh680-m5/sd/source/filter/eppt/eppt.hxx (class
ParagraphObj): added flag for fixed paragraph linespacing
Added:
branches/sled-10-ooo-build-2-3/patches/src680/fix-ppt-linespacing-import-export.diff
Modified:
branches/sled-10-ooo-build-2-3/ChangeLog
branches/sled-10-ooo-build-2-3/patches/src680/apply
Modified: branches/sled-10-ooo-build-2-3/patches/src680/apply
==============================================================================
--- branches/sled-10-ooo-build-2-3/patches/src680/apply (original)
+++ branches/sled-10-ooo-build-2-3/patches/src680/apply Tue Feb 5 13:21:22 2008
@@ -1944,3 +1944,4 @@
xmloff-input-field-reference.diff, n#346189, flr
sc-xclimpchangetrack-discard-bogus-formula-size.diff, n#355304, tml
sc-skip-pivot-charts.diff, n#355300, kyoshida
+fix-ppt-linespacing-import-export.diff, n#355302, rodo
Added: branches/sled-10-ooo-build-2-3/patches/src680/fix-ppt-linespacing-import-export.diff
==============================================================================
--- (empty file)
+++ branches/sled-10-ooo-build-2-3/patches/src680/fix-ppt-linespacing-import-export.diff Tue Feb 5 13:21:22 2008
@@ -0,0 +1,133 @@
+diff -rup ../ooh680-m1/sd/source/filter/eppt/eppt.hxx sd/source/filter/eppt/eppt.hxx
+--- ../ooh680-m1/sd/source/filter/eppt/eppt.hxx 2006-12-12 17:39:02.000000000 +0100
++++ sd/source/filter/eppt/eppt.hxx 2008-02-04 17:13:48.000000000 +0100
+@@ -739,6 +739,7 @@ class ParagraphObj : public List, public
+
+ sal_uInt16 mnTextAdjust;
+ sal_Int16 mnLineSpacing;
++ sal_Bool mbFixedLineSpacing;
+ sal_Int16 mnLineSpacingTop;
+ sal_Int16 mnLineSpacingBottom;
+ sal_Bool mbForbiddenRules;
+diff -rup ../ooh680-m1/sd/source/filter/eppt/epptso.cxx sd/source/filter/eppt/epptso.cxx
+--- ../ooh680-m1/sd/source/filter/eppt/epptso.cxx 2007-08-02 20:22:59.000000000 +0200
++++ sd/source/filter/eppt/epptso.cxx 2008-02-04 17:16:29.000000000 +0100
+@@ -1428,7 +1428,7 @@ void PPTWriter::ImplWriteParagraphs( SvS
+ }
+ 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 );
+@@ -2858,11 +2858,15 @@ void ParagraphObj::ImplGetParagraphValue
+ = *( (::com::sun::star::style::LineSpacing*)mAny.getValue() );
+ switch ( aLineSpacing.Mode )
+ {
++ case ::com::sun::star::style::LineSpacingMode::FIX :
++ mnLineSpacing = (sal_Int16)(-( aLineSpacing.Height ) );
++ mbFixedLineSpacing = 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 = FALSE;
++ break;
+
+ case ::com::sun::star::style::LineSpacingMode::PROP :
+ default:
+diff -rup ../ooh680-m1/sd/source/ui/dlg/paragr.cxx sd/source/ui/dlg/paragr.cxx
+--- ../ooh680-m1/sd/source/ui/dlg/paragr.cxx 2006-12-12 18:07:46.000000000 +0100
++++ sd/source/ui/dlg/paragr.cxx 2008-01-28 16:30:13.000000000 +0100
+@@ -53,6 +53,9 @@
+ #include <svx/flagsdef.hxx>
+ #include "paragr.hxx"
+ #include "sdresid.hxx"
++#ifndef _SFXINTITEM_HXX
++#include <svtools/intitem.hxx>
++#endif
+
+ /*************************************************************************
+ |*
+@@ -77,3 +80,17 @@ SdParagraphDlg::SdParagraphDlg( Window*
+ AddTabPage( RID_SVXPAGE_ALIGN_PARAGRAPH );
+ AddTabPage( RID_SVXPAGE_TABULATOR );
+ }
++
++void SdParagraphDlg::PageCreated( USHORT 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;
++ }
++}
+diff -rup ../ooh680-m1/sd/source/ui/inc/paragr.hxx sd/source/ui/inc/paragr.hxx
+--- ../ooh680-m1/sd/source/ui/inc/paragr.hxx 2005-09-09 07:48:22.000000000 +0200
++++ sd/source/ui/inc/paragr.hxx 2008-01-28 16:25:32.000000000 +0100
+@@ -53,6 +53,8 @@ class SdParagraphDlg : public SfxTabDial
+ private:
+ const SfxItemSet& rOutAttrs;
+
++ virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
++
+ public:
+ SdParagraphDlg( Window* pParent, const SfxItemSet* pAttr );
+ ~SdParagraphDlg() {};
+diff -rup ../ooh680-m1/svx/source/editeng/impedit3.cxx svx/source/editeng/impedit3.cxx
+--- ../ooh680-m1/svx/source/editeng/impedit3.cxx 2007-08-02 15:59:22.000000000 +0200
++++ svx/source/editeng/impedit3.cxx 2008-01-25 17:51:36.000000000 +0100
+@@ -1312,6 +1312,13 @@ sal_Bool ImpEditEngine::CreateLines( USH
+ pLine->SetHeight( nMinHeight, nTxtHeight );
+ }
+ }
++ else if ( rLSItem.GetLineSpaceRule() == SVX_LINE_SPACE_FIX )
++ {
++ sal_uInt16 nFixHeight = GetYValue( rLSItem.GetLineHeight() );
++ sal_uInt16 nTxtHeight = pLine->GetHeight();
++ pLine->SetMaxAscent( (sal_uInt16)(pLine->GetMaxAscent() + ( nFixHeight - nTxtHeight ) ) );
++ pLine->SetHeight( nFixHeight, nTxtHeight );
++ }
+ else if ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP )
+ {
+ if ( nPara || IsFixedCellHeight() || pLine->GetStartPortion() ) // Nicht die aller erste Zeile
+@@ -1654,6 +1668,14 @@ void ImpEditEngine::CreateAndInsertEmpty
+ pTmpLine->SetHeight( nMinHeight, nTxtHeight );
+ }
+ }
++ else if ( rLSItem.GetLineSpaceRule() == SVX_LINE_SPACE_FIX )
++ {
++ sal_uInt16 nFixHeight = rLSItem.GetLineHeight();
++ sal_uInt16 nTxtHeight = pTmpLine->GetHeight();
++
++ pTmpLine->SetMaxAscent( (sal_uInt16)(pTmpLine->GetMaxAscent() + ( nFixHeight - nTxtHeight ) ) );
++ pTmpLine->SetHeight( nFixHeight, nTxtHeight );
++ }
+ else if ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP )
+ {
+ USHORT nPara = GetParaPortions().GetPos( pParaPortion );
+diff -rup ../ooh680-m1/svx/source/svdraw/svdfppt.cxx svx/source/svdraw/svdfppt.cxx
+--- ../ooh680-m1/svx/source/svdraw/svdfppt.cxx 2008-01-08 10:24:29.000000000 +0100
++++ svx/source/svdraw/svdfppt.cxx 2008-02-04 12:10:08.000000000 +0100
+@@ -6326,9 +6326,11 @@ void PPTParagraphObj::ApplyTo( SfxItemSe
+ }
+ rSet.Put( SdrTextFixedCellHeightItem( TRUE ), SDRATTR_TEXT_USEFIXEDCELLHEIGHT );
+ SvxLineSpacingItem aItem( 200, EE_PARA_SBL );
+- if ( nVal2 <= 0 )
++ if ( nVal2 <= 0 ) {
+ aItem.SetLineHeight( (UINT16)( rManager.ScalePoint( -nVal2 ) / 8 ) );
+- else
++ aItem.GetLineSpaceRule() = SVX_LINE_SPACE_FIX;
++ aItem.GetInterLineSpaceRule() = SVX_INTER_LINE_SPACE_OFF;
++ } else
+ {
+ sal_uInt8 nPropLineSpace = (BYTE)nVal2;
+ aItem.SetPropLineSpace( nPropLineSpace );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]