[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - include/xmloff sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Feb 17 10:05:17 UTC 2019


 include/xmloff/odffields.hxx        |    2 +-
 sw/source/core/text/itrform2.cxx    |    4 +++-
 sw/source/uibase/shells/textfld.cxx |    4 ++--
 3 files changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 8c9aa1c4188417cca592047c2994082c14add2d2
Author:     Tamás Zolnai <tamas.zolnai at collabora.com>
AuthorDate: Thu Feb 14 12:33:39 2019 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Sun Feb 17 11:04:52 2019 +0100

    MSForms: Make Drop-Down form field to have a default size
    
    Similar to MSO Drop-down form field and LO Input List.
    
    Change-Id: Idba278d8c2a2106b6f3cc22d8b9f8570f45bfae9
    Reviewed-on: https://gerrit.libreoffice.org/67908
    Tested-by: Jenkins
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
    (cherry picked from commit d24fe1116ddd9eec3a0884c7b222455c44bd6eb4)
    Reviewed-on: https://gerrit.libreoffice.org/67923
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/include/xmloff/odffields.hxx b/include/xmloff/odffields.hxx
index bbc1becb6576..27525fb39374 100644
--- a/include/xmloff/odffields.hxx
+++ b/include/xmloff/odffields.hxx
@@ -22,7 +22,7 @@
 
 
 #define ODF_FORMTEXT "vnd.oasis.opendocument.field.FORMTEXT"
-#define ODF_FORMTEXT_DEFAULT_LENGTH 5
+#define ODF_FORMFIELD_DEFAULT_LENGTH 5
 
 #define ODF_FORMCHECKBOX "vnd.oasis.opendocument.field.FORMCHECKBOX"
 #define ODF_FORMCHECKBOX_HELPTEXT "Checkbox_HelpText"
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index e762ab1f5842..93f4aa72df4b 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -856,7 +856,9 @@ namespace sw { namespace mark {
             if (nCurrentIdx < vListEntries.getLength())
                 return vListEntries[nCurrentIdx];
         }
-        return OUString();
+
+        sal_Unicode vEnSpaces[ODF_FORMFIELD_DEFAULT_LENGTH] = {8194, 8194, 8194, 8194, 8194};
+        return OUString(vEnSpaces, ODF_FORMFIELD_DEFAULT_LENGTH);
     }
 } }
 
diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx
index 4b6735b1e998..56d4df1c119c 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -735,8 +735,8 @@ FIELD_INSERT:
                 if(pCursorPos)
                 {
                     // Insert five enspace into the text field so the field has extent
-                    sal_Unicode vEnSpaces[ODF_FORMTEXT_DEFAULT_LENGTH] = {8194, 8194, 8194, 8194, 8194};
-                    bool bSuccess = rSh.GetDoc()->getIDocumentContentOperations().InsertString(*pCursorPos, OUString(vEnSpaces, ODF_FORMTEXT_DEFAULT_LENGTH));
+                    sal_Unicode vEnSpaces[ODF_FORMFIELD_DEFAULT_LENGTH] = {8194, 8194, 8194, 8194, 8194};
+                    bool bSuccess = rSh.GetDoc()->getIDocumentContentOperations().InsertString(*pCursorPos, OUString(vEnSpaces, ODF_FORMFIELD_DEFAULT_LENGTH));
                     if(bSuccess)
                     {
                         IDocumentMarkAccess* pMarksAccess = rSh.GetDoc()->getIDocumentMarkAccess();


More information about the Libreoffice-commits mailing list