[Libreoffice-commits] core.git: Branch 'libreoffice-6-3-1' - sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Aug 21 13:06:50 UTC 2019


 sw/source/ui/fldui/fldvar.cxx |   16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

New commits:
commit 5ad70db9902659065cc45727f80c54ed3772a83f
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Aug 19 20:57:39 2019 +0100
Commit:     Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Wed Aug 21 15:05:58 2019 +0200

    Resolves: tdf#127021 not all formatting options shown for set variable
    
    because we need to call SwNumFormatTreeView::clear to flag we
    want them added
    
    following that we then need to insert the extra entries before those
    now inserted stock ones
    
    Change-Id: Iccbd3a6b2c9fd48ad823b9dcc7cdfca87d29873c
    Reviewed-on: https://gerrit.libreoffice.org/77769
    Tested-by: Julien Nabet <serval2412 at yahoo.fr>
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>
    (cherry picked from commit 1e8ac689396f7779e4b1e82378f2f61e12be9bfc)
    Reviewed-on: https://gerrit.libreoffice.org/77879
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    Tested-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index 0f304387ab58..b56f88bd4470 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -680,7 +680,7 @@ void SwFieldVarPage::FillFormatLB(sal_uInt16 nTypeId)
     // fill Format-Listbox
     m_xFormatLB->freeze();
     m_xFormatLB->clear();
-    rWidget.clear();
+    m_xNumFormatLB->clear(); // flags list as dirty and needing refilling with stock entries
     bool bSpecialFormat = false;
 
     if( TYP_GETREFPAGEFLD != nTypeId )
@@ -714,8 +714,9 @@ void SwFieldVarPage::FillFormatLB(sal_uInt16 nTypeId)
         {
             if (!IsFieldEdit() || bSpecialFormat)
             {
-                rWidget.append(OUString::number(NUMBERFORMAT_ENTRY_NOT_FOUND), SwResId(FMT_MARK_TEXT));
-                rWidget.append(OUString::number(NUMBERFORMAT_ENTRY_NOT_FOUND), SwResId(FMT_USERVAR_CMD));
+                OUString sId(OUString::number(NUMBERFORMAT_ENTRY_NOT_FOUND));
+                rWidget.insert(0, SwResId(FMT_MARK_TEXT), &sId, nullptr, nullptr);
+                rWidget.insert(1, SwResId(FMT_USERVAR_CMD), &sId, nullptr, nullptr);
             }
         }
         break;
@@ -724,20 +725,23 @@ void SwFieldVarPage::FillFormatLB(sal_uInt16 nTypeId)
         {
             if (!IsFieldEdit() || bSpecialFormat)
             {
-                rWidget.append(OUString::number(NUMBERFORMAT_ENTRY_NOT_FOUND), SwResId(FMT_SETVAR_TEXT));
+                OUString sId(OUString::number(NUMBERFORMAT_ENTRY_NOT_FOUND));
+                rWidget.insert(0, SwResId(FMT_SETVAR_TEXT), &sId, nullptr, nullptr);
             }
         }
         break;
 
         case TYP_FORMELFLD:
         {
-            rWidget.append(OUString::number(NUMBERFORMAT_ENTRY_NOT_FOUND), SwResId(FMT_GETVAR_NAME));
+            OUString sId(OUString::number(NUMBERFORMAT_ENTRY_NOT_FOUND));
+            rWidget.insert(0, SwResId(FMT_GETVAR_NAME), &sId, nullptr, nullptr);
         }
         break;
 
         case TYP_GETFLD:
         {
-            rWidget.append(OUString::number(NUMBERFORMAT_ENTRY_NOT_FOUND), SwResId(FMT_GETVAR_NAME));
+            OUString sId(OUString::number(NUMBERFORMAT_ENTRY_NOT_FOUND));
+            rWidget.insert(0, SwResId(FMT_GETVAR_NAME), &sId, nullptr, nullptr);
         }
         break;
     }


More information about the Libreoffice-commits mailing list