[Libreoffice-commits] core.git: vcl/source

2023-10-12 Thread Deepika Goyal (via logerrit)
 vcl/source/app/svdata.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 0cd703c699334ed96a5743aae977207ba9a2a74b
Author: Deepika Goyal 
AuthorDate: Tue Oct 10 16:37:33 2023 +0400
Commit: Ilmari Lauhakangas 
CommitDate: Thu Oct 12 19:10:19 2023 +0200

tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro

Change-Id: I4c655d7700373636cc00c42d6214976b8aa9aee4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157790
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas 
Reviewed-by: Ilmari Lauhakangas 

diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index 75dc09e28e4a..e919bfda7c3d 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -268,7 +268,7 @@ const FieldUnitStringList& ImplGetFieldUnits()
 ImplSVData* pSVData = ImplGetSVData();
 if( pSVData->maCtrlData.maFieldUnitStrings.empty() )
 {
-sal_uInt32 nUnits = SAL_N_ELEMENTS(SV_FUNIT_STRINGS);
+sal_uInt32 nUnits = std::size(SV_FUNIT_STRINGS);
 pSVData->maCtrlData.maFieldUnitStrings.reserve( nUnits );
 for (sal_uInt32 i = 0; i < nUnits; i++)
 {
@@ -283,7 +283,7 @@ namespace vcl
 {
 FieldUnit EnglishStringToMetric(std::u16string_view rEnglishMetricString)
 {
-sal_uInt32 nUnits = SAL_N_ELEMENTS(SV_FUNIT_STRINGS);
+sal_uInt32 nUnits = std::size(SV_FUNIT_STRINGS);
 for (sal_uInt32 i = 0; i < nUnits; ++i)
 {
 if (o3tl::equalsAscii(rEnglishMetricString, 
SV_FUNIT_STRINGS[i].first.getId()))


[Libreoffice-commits] core.git: vcl/inc

2023-08-22 Thread Deepika Goyal (via logerrit)
 vcl/inc/unx/gtk/atkbridge.hxx  |5 +
 vcl/inc/unx/gtk/gtkbackend.hxx |5 +
 vcl/inc/unx/gtk/gtkdata.hxx|4 +---
 vcl/inc/unx/gtk/gtkframe.hxx   |4 +---
 vcl/inc/unx/gtk/gtkgdi.hxx |4 +---
 5 files changed, 5 insertions(+), 17 deletions(-)

New commits:
commit 3297c1912f40450f92b67ad592ac255e1cd21749
Author: Deepika Goyal 
AuthorDate: Thu Aug 17 18:06:43 2023 +0400
Commit: Julien Nabet 
CommitDate: Tue Aug 22 14:13:49 2023 +0200

tdf#143148 Use pragma once in vcl

Change-Id: I99ef7d219a427989397d7d7dc75e1e0ebc8e22d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155812
Reviewed-by: Julien Nabet 
Tested-by: Jenkins

diff --git a/vcl/inc/unx/gtk/atkbridge.hxx b/vcl/inc/unx/gtk/atkbridge.hxx
index 49c422dacfbd..19e37baab5cf 100644
--- a/vcl/inc/unx/gtk/atkbridge.hxx
+++ b/vcl/inc/unx/gtk/atkbridge.hxx
@@ -17,14 +17,11 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_VCL_INC_UNX_GTK_ATKBRIDGE_HXX
-#define INCLUDED_VCL_INC_UNX_GTK_ATKBRIDGE_HXX
+#pragma once
 
 #include 
 
 bool InitAtkBridge();
 void DeInitAtkBridge();
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/unx/gtk/gtkbackend.hxx b/vcl/inc/unx/gtk/gtkbackend.hxx
index 03b2e021313b..1317ad6f72b1 100644
--- a/vcl/inc/unx/gtk/gtkbackend.hxx
+++ b/vcl/inc/unx/gtk/gtkbackend.hxx
@@ -7,8 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#ifndef INCLUDED_VCL_INC_UNX_GTK_GTKBACKEND_HXX
-#define INCLUDED_VCL_INC_UNX_GTK_GTKBACKEND_HXX
+#pragma once
 
 #include 
 #if defined(GDK_WINDOWING_X11)
@@ -28,6 +27,4 @@ bool DLSYM_GDK_IS_X11_DISPLAY(GdkDisplay* pDisplay);
 bool DLSYM_GDK_IS_WAYLAND_DISPLAY(GdkDisplay* pDisplay);
 #endif
 
-#endif // INCLUDED_VCL_INC_UNX_GTK_GTKBACKEND_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx
index 04c1485963f5..704490e821d4 100644
--- a/vcl/inc/unx/gtk/gtkdata.hxx
+++ b/vcl/inc/unx/gtk/gtkdata.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_VCL_INC_UNX_GTK_GTKDATA_HXX
-#define INCLUDED_VCL_INC_UNX_GTK_GTKDATA_HXX
+#pragma once
 
 #define GLIB_DISABLE_DEPRECATION_WARNINGS
 #include 
@@ -364,6 +363,5 @@ GtkSalDisplay *GtkSalData::GetGtkDisplay() const
 return static_cast(GetDisplay());
 }
 
-#endif // INCLUDED_VCL_INC_UNX_GTK_GTKDATA_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index be9a6a2dda83..abbe36807bbc 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_VCL_INC_UNX_GTK_GTKFRAME_HXX
-#define INCLUDED_VCL_INC_UNX_GTK_GTKFRAME_HXX
+#pragma once
 
 #include 
 #include 
@@ -691,6 +690,5 @@ enum GdkAnchorHints
 };
 #endif
 
-#endif // INCLUDED_VCL_INC_UNX_GTK_GTKFRAME_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/unx/gtk/gtkgdi.hxx b/vcl/inc/unx/gtk/gtkgdi.hxx
index 2fc66ace5ece..9d8bb26ce787 100644
--- a/vcl/inc/unx/gtk/gtkgdi.hxx
+++ b/vcl/inc/unx/gtk/gtkgdi.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_VCL_INC_UNX_GTK_GTKGDI_HXX
-#define INCLUDED_VCL_INC_UNX_GTK_GTKGDI_HXX
+#pragma once
 
 #include 
 
@@ -242,6 +241,5 @@ private:
 static bool style_loaded;
 };
 
-#endif // INCLUDED_VCL_INC_UNX_GTK_GTKGDI_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */