vcl/workben/vcldemo.cxx |   17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

New commits:
commit 272b30f8fab429ddf5d276ce14589358c4bbd630
Author:     Ashok <ashokemai...@yahoo.com>
AuthorDate: Tue Aug 6 11:05:10 2024 -0700
Commit:     Hossein <hoss...@libreoffice.org>
CommitDate: Wed Aug 14 23:42:49 2024 +0200

    Simplify initialization of font name vector in vcldemo
    
    Replace the classic For loop with vector initializers.
    
    Change-Id: I60ee577ef395127e99148a32e02009e0cc1c1d51
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171568
    Reviewed-by: Hossein <hoss...@libreoffice.org>
    Tested-by: Hossein <hoss...@libreoffice.org>
    Tested-by: Jenkins

diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 8fd54dfb4560..215fd92a2d7c 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -411,7 +411,14 @@ public:
             else
                 aText = "Click any rect to zoom!!!!";
 
-            std::vector<OUString> aFontNames;
+            std::vector<OUString> aFontNames =
+            {
+                u"Times"_ustr,
+                u"Liberation Sans"_ustr,
+                u"Arial"_ustr,
+                u"Linux Biolinum G"_ustr,
+                u"Linux Libertine Display G"_ustr
+            };
 
             static Color const nCols[] = {
                 COL_BLACK, COL_BLUE, COL_GREEN, COL_CYAN, COL_RED, COL_MAGENTA,
@@ -419,14 +426,6 @@ public:
                 COL_LIGHTCYAN, COL_LIGHTRED, COL_LIGHTMAGENTA, COL_YELLOW, 
COL_WHITE
             };
 
-            // a few fonts to start with
-            const char *pNames[] = {
-                "Times", "Liberation Sans", "Arial", "Linux Biolinum G", 
"Linux Libertine Display G"
-              };
-
-            for (size_t i = 0; i < SAL_N_ELEMENTS(pNames); i++)
-                aFontNames.push_back(OUString::createFromAscii(pNames[i]));
-
             if (bClip && !bRotate)
             {
                 // only show the first quarter of the text

Reply via email to