[Libreoffice-commits] core.git: include/o3tl lotuswordpro/source

2022-03-16 Thread psidiumcode (via logerrit)
 include/o3tl/unit_conversion.hxx   |2 +-
 lotuswordpro/source/filter/lwpsilverbullet.hxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 5b320aa058504becae6ac6746926b481b326a24d
Author: psidiumcode 
AuthorDate: Tue Mar 15 21:43:46 2022 +0200
Commit: Hossein 
CommitDate: Wed Mar 16 09:13:23 2022 +0100

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

Change-Id: Ia711e939f769c6a2257bd1fb3607b315f931a0ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131634
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/include/o3tl/unit_conversion.hxx b/include/o3tl/unit_conversion.hxx
index 7f67882f7e3d..67830f0d16d7 100644
--- a/include/o3tl/unit_conversion.hxx
+++ b/include/o3tl/unit_conversion.hxx
@@ -179,7 +179,7 @@ constexpr m_and_d mdBaseLen[] = {
 { 254 * 210, 10 * 1440 }, // ch => mm
 { 254 * 312, 10 * 1440 }, // line => mm
 };
-static_assert(SAL_N_ELEMENTS(mdBaseLen) == static_cast(Length::count),
+static_assert(std::size(mdBaseLen) == static_cast(Length::count),
   "mdBaseL must have an entry for each unit in o3tl::Length");
 
 // The resulting multipliers and divisors array
diff --git a/lotuswordpro/source/filter/lwpsilverbullet.hxx 
b/lotuswordpro/source/filter/lwpsilverbullet.hxx
index 5c2f51247b31..8c68a960eedc 100644
--- a/lotuswordpro/source/filter/lwpsilverbullet.hxx
+++ b/lotuswordpro/source/filter/lwpsilverbullet.hxx
@@ -149,7 +149,7 @@ private:
 inline const OUString& LwpSilverBullet::GetBulletStyleName() const { return 
m_strStyleName; }
 inline bool LwpSilverBullet::IsLesserLevel(sal_uInt16 nPos)
 {
-if (nPos < SAL_N_ELEMENTS(m_pResetPositionFlags))
+if (nPos < std::size(m_pResetPositionFlags))
 return ((m_pResetPositionFlags[nPos] & LESSERLEVEL) != 0);
 return false;
 }


[Libreoffice-commits] core.git: dbaccess/inc dbaccess/source

2022-02-17 Thread psidiumcode (via logerrit)
 dbaccess/inc/core_resource.hxx  |5 +
 dbaccess/inc/dbadllapi.hxx  |5 +
 dbaccess/source/inc/OAuthenticationContinuation.hxx |5 +
 dbaccess/source/inc/apitools.hxx|5 +
 dbaccess/source/inc/dsntypes.hxx|5 +
 dbaccess/source/inc/stringconstants.hxx |5 +
 6 files changed, 6 insertions(+), 24 deletions(-)

New commits:
commit b69dc9faac1bc5409f43160228703108a002ed11
Author: psidiumcode 
AuthorDate: Tue Feb 15 23:20:06 2022 +0200
Commit: Ilmari Lauhakangas 
CommitDate: Thu Feb 17 19:05:45 2022 +0100

tdf#143148 Use pragma once instead of include guards

Change-Id: I5a946c9db1b3ca91fa9d59d0d742c9b30782ed00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129978
Tested-by: Ilmari Lauhakangas 
Reviewed-by: Ilmari Lauhakangas 

diff --git a/dbaccess/inc/core_resource.hxx b/dbaccess/inc/core_resource.hxx
index 99cbb34d6d2a..0f7a6ba3eef7 100644
--- a/dbaccess/inc/core_resource.hxx
+++ b/dbaccess/inc/core_resource.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_DBACCESS_SOURCE_CORE_INC_CORE_RESOURCE_HXX
-#define INCLUDED_DBACCESS_SOURCE_CORE_INC_CORE_RESOURCE_HXX
+#pragma once
 
 #include 
 #include "dbadllapi.hxx"
@@ -66,6 +65,4 @@ namespace dbaccess
 };
 }
 
-#endif // INCLUDED_DBACCESS_SOURCE_CORE_INC_CORE_RESOURCE_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/inc/dbadllapi.hxx b/dbaccess/inc/dbadllapi.hxx
index 6388e579b36a..d742b9a3b1e9 100644
--- a/dbaccess/inc/dbadllapi.hxx
+++ b/dbaccess/inc/dbadllapi.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_DBACCESS_SOURCE_INC_DBADLLAPI_HXX
-#define INCLUDED_DBACCESS_SOURCE_INC_DBADLLAPI_HXX
+#pragma once
 
 #include 
 
@@ -30,6 +29,4 @@
 #define OOO_DLLPUBLIC_DBA SAL_DLLPUBLIC_IMPORT
 #endif
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/inc/OAuthenticationContinuation.hxx 
b/dbaccess/source/inc/OAuthenticationContinuation.hxx
index 0812c46f8baa..d1eac7b54a23 100644
--- a/dbaccess/source/inc/OAuthenticationContinuation.hxx
+++ b/dbaccess/source/inc/OAuthenticationContinuation.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_DBACCESS_SOURCE_INC_OAUTHENTICATIONCONTINUATION_HXX
-#define INCLUDED_DBACCESS_SOURCE_INC_OAUTHENTICATIONCONTINUATION_HXX
+#pragma once
 
 #include 
 
@@ -65,6 +64,4 @@ public:
 
 }   // namespace dbaccess
 
-#endif // INCLUDED_DBACCESS_SOURCE_INC_OAUTHENTICATIONCONTINUATION_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/inc/apitools.hxx b/dbaccess/source/inc/apitools.hxx
index 17e002761e0b..7438c08725dc 100644
--- a/dbaccess/source/inc/apitools.hxx
+++ b/dbaccess/source/inc/apitools.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_DBACCESS_SOURCE_INC_APITOOLS_HXX
-#define INCLUDED_DBACCESS_SOURCE_INC_APITOOLS_HXX
+#pragma once
 
 #include 
 
@@ -50,6 +49,4 @@ public:
 
 };
 
-#endif // INCLUDED_DBACCESS_SOURCE_INC_APITOOLS_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/inc/dsntypes.hxx b/dbaccess/source/inc/dsntypes.hxx
index 871db0a1fe27..875d781d1fd1 100644
--- a/dbaccess/source/inc/dsntypes.hxx
+++ b/dbaccess/source/inc/dsntypes.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_DBACCESS_SOURCE_INC_DSNTYPES_HXX
-#define INCLUDED_DBACCESS_SOURCE_INC_DSNTYPES_HXX
+#pragma once
 
 #include 
 
@@ -216,6 +215,4 @@ inline ODsnTypeCollection::TypeIterator 
ODsnTypeCollection::end() const { return
 
 }   // namespace dbaccess
 
-#endif // INCLUDED_DBACCESS_SOURCE_INC_DSNTYPES_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/inc/stringconstants.hxx 
b/dbaccess/source/inc/stringconstants.hxx
index 9b7e732fee8f..1f20962a78a3 100644
--- a/dbaccess/source/inc/stringconstants.hxx
+++ b/dbaccess/source/inc/stringconstants.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_DBACCESS_SOURCE_INC_STRINGCONSTANTS_HRC
-#define INCLUDED_DBACCESS_SOURCE_INC_STRINGCONSTANTS_HRC
+#pragma once
 
 // property ids
 
@@ -169,6 +168,4 @@
 #define PROPERTY_ID_PROPCHANGE_NOTIFY   146
 #define PROPERTY_ID_AUTOGROW147
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */