summaryrefslogtreecommitdiff
path: root/filter/source/msfilter
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2020-05-12 12:47:31 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2020-05-14 09:59:11 +0200
commit9c4048b1883f1dc9fdd621ffa2bb06ff9fe19d14 (patch)
treedb3ffad81acdc538d6377cbb16177345399cc53c /filter/source/msfilter
parent68af4f050c5768ce30357cbc5f40e7bc031518c4 (diff)
tdf#79082 Improve ppt tab import/export
Import/export the paragraph tabs without any text offset, tabs are relative to the text box anyway. Change-Id: Ife3b762e7581548e65500c16259a4481cc07a88f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94101 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'filter/source/msfilter')
-rw-r--r--filter/source/msfilter/svdfppt.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index f36872724d3c..9734c6d3464f 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -6288,13 +6288,11 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, std::optional< sal_Int16 >& rS
sal_uInt32 nLatestManTab = 0;
GetAttrib( PPT_ParaAttr_TextOfs, nTextOfs2, nDestinationInstance );
GetAttrib( PPT_ParaAttr_BulletOfs, nTab, nDestinationInstance );
- GetAttrib( PPT_ParaAttr_BulletOn, i, nDestinationInstance );
GetAttrib( PPT_ParaAttr_DefaultTab, nDefaultTab, nDestinationInstance );
+
SvxTabStopItem aTabItem( 0, 0, SvxTabAdjust::Default, EE_PARA_TABS );
if ( GetTabCount() )
{
- //paragraph offset = MIN(first_line_offset, hanging_offset)
- sal_uInt32 nParaOffset = std::min(nTextOfs2, nTab);
for ( i = 0; i < GetTabCount(); i++ )
{
SvxTabAdjust eTabAdjust;
@@ -6306,8 +6304,7 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, std::optional< sal_Int16 >& rS
case 3 : eTabAdjust = SvxTabAdjust::Decimal; break;
default : eTabAdjust = SvxTabAdjust::Left;
}
- if ( nTab > nParaOffset )//If tab stop greater than paragraph offset
- aTabItem.Insert( SvxTabStop( ( ( (long( nTab - nTextOfs2 )) * 2540 ) / 576 ), eTabAdjust ) );
+ aTabItem.Insert(SvxTabStop(convertMasterUnitToTwip(nTab), eTabAdjust));
}
nLatestManTab = nTab;
}
@@ -6320,7 +6317,7 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, std::optional< sal_Int16 >& rS
nTab = nDefaultTab * ( 1 + nTab );
for ( i = 0; ( i < 20 ) && ( nTab < 0x1b00 ); i++ )
{
- aTabItem.Insert( SvxTabStop( static_cast<sal_uInt16>( ( ( nTab - nTextOfs2 ) * 2540 ) / 576 ) ) );
+ aTabItem.Insert( SvxTabStop( convertMasterUnitToTwip(nTab)));
nTab += nDefaultTab;
}
}