From 5a246765fced0099ae9071c8df98636638ee0b18 Mon Sep 17 00:00:00 2001 From: László Németh Date: Wed, 19 Jun 2013 12:11:10 +0200 Subject: fdo#65666 keep tabs in footnote settings of sections (backport) Change-Id: I7dc2f54e6e3a83de59e20fd568b46a3b25fb6b66 Reviewed-on: https://gerrit.libreoffice.org/4353 Reviewed-by: Andras Timar Tested-by: Andras Timar --- sw/source/ui/dialog/uiregionsw.cxx | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 7f476f10d29f..a19584738bb1 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -1969,11 +1969,16 @@ sal_Bool SwSectionFtnEndTabPage::FillItemSet( SfxItemSet& rSet ) switch( aFtn.GetValue() ) { case FTNEND_ATTXTEND_OWNNUMANDFMT: + { aFtn.SetNumType( aFtnNumViewBox.GetSelectedNumberingType() ); - aFtn.SetPrefix( aFtnPrefixED.GetText() ); - aFtn.SetSuffix( aFtnSuffixED.GetText() ); + String aPrefix( aFtnPrefixED.GetText() ); + aPrefix.SearchAndReplaceAllAscii("\\t", '\t'); // fdo#65666 + aFtn.SetPrefix( aPrefix ); + String aSuffix( aFtnSuffixED.GetText() ); + aSuffix.SearchAndReplaceAllAscii("\\t", '\t'); + aFtn.SetSuffix( aSuffix ); // no break; - + } case FTNEND_ATTXTEND_OWNNUMSEQ: aFtn.SetOffset( static_cast< sal_uInt16 >( aFtnOffsetFld.GetValue()-1 ) ); // no break; @@ -1990,11 +1995,16 @@ sal_Bool SwSectionFtnEndTabPage::FillItemSet( SfxItemSet& rSet ) switch( aEnd.GetValue() ) { case FTNEND_ATTXTEND_OWNNUMANDFMT: + { aEnd.SetNumType( aEndNumViewBox.GetSelectedNumberingType() ); - aEnd.SetPrefix( aEndPrefixED.GetText() ); - aEnd.SetSuffix( aEndSuffixED.GetText() ); + String aPrefix( aEndPrefixED.GetText() ); + aPrefix.SearchAndReplaceAllAscii("\\t", '\t'); + aEnd.SetPrefix( aPrefix ); + String aSuffix( aEndSuffixED.GetText() ); + aSuffix.SearchAndReplaceAllAscii("\\t", '\t'); + aEnd.SetSuffix( aSuffix ); // no break; - + } case FTNEND_ATTXTEND_OWNNUMSEQ: aEnd.SetOffset( static_cast< sal_uInt16 >( aEndOffsetFld.GetValue()-1 ) ); // no break; @@ -2061,8 +2071,8 @@ void SwSectionFtnEndTabPage::ResetState( sal_Bool bFtn, pNumViewBox->SelectNumberingType( rAttr.GetNumType() ); pOffsetFld->SetValue( rAttr.GetOffset() + 1 ); - pPrefixED->SetText( rAttr.GetPrefix() ); - pSuffixED->SetText( rAttr.GetSuffix() ); + pPrefixED->SetText( rAttr.GetPrefix().replaceAll("\t", "\\t") ); + pSuffixED->SetText( rAttr.GetSuffix().replaceAll("\t", "\\t") ); switch( eState ) { -- cgit v1.2.3