[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - sw/source

László Németh nemeth at numbertext.org
Wed Jun 19 07:15:52 PDT 2013


 sw/source/ui/dialog/uiregionsw.cxx |   26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

New commits:
commit 5a246765fced0099ae9071c8df98636638ee0b18
Author: László Németh <nemeth at numbertext.org>
Date:   Wed Jun 19 12:11:10 2013 +0200

    fdo#65666 keep tabs in footnote settings of sections (backport)
    
    Change-Id: I7dc2f54e6e3a83de59e20fd568b46a3b25fb6b66
    Reviewed-on: https://gerrit.libreoffice.org/4353
    Reviewed-by: Andras Timar <atimar at suse.com>
    Tested-by: Andras Timar <atimar at suse.com>

diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 7f476f1..a195847 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 )
     {


More information about the Libreoffice-commits mailing list