[Libreoffice-commits] core.git: solenv/clang-format

2020-01-28 Thread Batuhan Taskaya (via logerrit)
 solenv/clang-format/blacklist |   26 --
 1 file changed, 26 deletions(-)

New commits:
commit 958c35bf761cfc05dfd9a2557ed30d5b1457c3ba
Author: Batuhan Taskaya 
AuthorDate: Tue Jan 28 10:19:24 2020 +0300
Commit: Muhammet Kara 
CommitDate: Tue Jan 28 14:37:21 2020 +0100

tdf#123936: remove non-existent files from blacklist

Change-Id: If2f6971dd49440a050bfbb42ba7eace75c780218
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87572
Reviewed-by: Muhammet Kara 
Tested-by: Muhammet Kara 

diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 6823ec4187a5..08cbe76219c2 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -44,8 +44,6 @@ accessibility/inc/extended/accessibletabbarpage.hxx
 accessibility/inc/extended/accessibletabbarpagelist.hxx
 accessibility/inc/extended/accessibletablistbox.hxx
 accessibility/inc/extended/accessibletablistboxtable.hxx
-accessibility/inc/extended/listboxaccessible.hxx
-accessibility/inc/extended/textwindowaccessibility.hxx
 accessibility/inc/helper/IComboListBoxHelper.hxx
 accessibility/inc/helper/accresmgr.hxx
 accessibility/inc/helper/characterattributeshelper.hxx
@@ -113,8 +111,6 @@ accessibility/source/extended/accessibletabbarpage.cxx
 accessibility/source/extended/accessibletabbarpagelist.cxx
 accessibility/source/extended/accessibletablistbox.cxx
 accessibility/source/extended/accessibletablistboxtable.cxx
-accessibility/source/extended/listboxaccessible.cxx
-accessibility/source/extended/textwindowaccessibility.cxx
 accessibility/source/helper/IComboListBoxHelper.cxx
 accessibility/source/helper/acc_factory.cxx
 accessibility/source/helper/accresmgr.cxx
@@ -647,13 +643,9 @@ bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx
 bridges/source/cpp_uno/gcc3_solaris_sparc/share.hxx
 bridges/source/cpp_uno/gcc3_solaris_sparc/uno2cpp.cxx
 bridges/source/cpp_uno/msvc_win32_intel/cpp2uno.cxx
-bridges/source/cpp_uno/msvc_win32_intel/dllinit.cxx
-bridges/source/cpp_uno/msvc_win32_intel/except.cxx
 bridges/source/cpp_uno/msvc_win32_intel/msci.hxx
 bridges/source/cpp_uno/msvc_win32_intel/uno2cpp.cxx
 bridges/source/cpp_uno/msvc_win32_x86-64/cpp2uno.cxx
-bridges/source/cpp_uno/msvc_win32_x86-64/dllinit.cxx
-bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
 bridges/source/cpp_uno/msvc_win32_x86-64/mscx.hxx
 bridges/source/cpp_uno/msvc_win32_x86-64/uno2cpp.cxx
 bridges/source/cpp_uno/shared/bridge.cxx
@@ -1602,8 +1594,6 @@ comphelper/source/misc/proxyaggregation.cxx
 comphelper/source/misc/random.cxx
 comphelper/source/misc/sequenceashashmap.cxx
 comphelper/source/misc/servicedecl.cxx
-comphelper/source/misc/serviceinfohelper.cxx
-comphelper/source/misc/sharedmutex.cxx
 comphelper/source/misc/simplefileaccessinteraction.cxx
 comphelper/source/misc/solarmutex.cxx
 comphelper/source/misc/stillreadwriteinteraction.cxx
@@ -1921,8 +1911,6 @@ connectivity/inc/pch/precompiled_firebird_sdbc.cxx
 connectivity/inc/pch/precompiled_firebird_sdbc.hxx
 connectivity/inc/pch/precompiled_flat.cxx
 connectivity/inc/pch/precompiled_flat.hxx
-connectivity/inc/pch/precompiled_mysql.cxx
-connectivity/inc/pch/precompiled_mysql.hxx
 connectivity/inc/pch/precompiled_odbc.cxx
 connectivity/inc/pch/precompiled_odbc.hxx
 connectivity/inc/pch/precompiled_postgresql-sdbc-impl.cxx
@@ -3718,8 +3706,6 @@ desktop/win32/source/applauncher/simpress.cxx
 desktop/win32/source/applauncher/smath.cxx
 desktop/win32/source/applauncher/sweb.cxx
 desktop/win32/source/applauncher/swriter.cxx
-desktop/win32/source/guiloader/genericloader.cxx
-desktop/win32/source/guistdio/unopkgio.cxx
 desktop/win32/source/loader.cxx
 desktop/win32/source/loader.hxx
 desktop/win32/source/unoinfo.cxx
@@ -4997,12 +4983,10 @@ fpicker/source/win32/VistaFilePickerImpl.cxx
 fpicker/source/win32/VistaFilePickerImpl.hxx
 fpicker/source/win32/WinImplHelper.cxx
 fpicker/source/win32/WinImplHelper.hxx
-fpicker/source/win32/afxres.h
 fpicker/source/win32/asyncrequests.cxx
 fpicker/source/win32/asyncrequests.hxx
 fpicker/source/win32/comptr.hxx
 fpicker/source/win32/platform_vista.h
-fpicker/source/win32/resource.h
 fpicker/source/win32/resourceprovider.cxx
 fpicker/source/win32/resourceprovider.hxx
 fpicker/source/win32/shared.hxx
@@ -5082,7 +5066,6 @@ framework/inc/stdtypes.h
 framework/inc/targets.h
 framework/inc/taskcreatordefs.hxx
 framework/inc/threadhelp/gate.hxx
-framework/inc/threadhelp/transactionbase.hxx
 framework/inc/threadhelp/transactionguard.hxx
 framework/inc/threadhelp/transactionmanager.hxx
 framework/inc/uiconfiguration/globalsettings.hxx
@@ -5870,7 +5853,6 @@ include/comphelper/sequence.hxx
 include/comphelper/sequenceashashmap.hxx
 include/comphelper/servicedecl.hxx
 include/comphelper/servicehelper.hxx
-include/comphelper/serviceinfohelper.hxx
 include/comphelper/sharedmutex.hxx
 include/comphelper/simplefileaccessinteraction.hxx
 include/comphelper/solarmutex.hxx
@@ -17549,7 +17531,6 @@ vcl/opengl/win/WinDeviceInfo.cxx

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

2020-01-27 Thread Batuhan Taskaya (via logerrit)
 svx/source/tbxctrls/extrusioncontrols.cxx |   12 
 1 file changed, 4 insertions(+), 8 deletions(-)

New commits:
commit d39ad9cdd5f02b01d4d7b747a9c20168cbe915eb
Author: Batuhan Taskaya 
AuthorDate: Mon Jan 27 11:54:10 2020 +0300
Commit: Muhammet Kara 
CommitDate: Mon Jan 27 22:07:38 2020 +0100

tdf#88205: Adapt uses of css::uno::Sequence to use initializer_list ctor

Change-Id: Ic2013a741fc1288ff04f7cfc3617fd4689a7db0b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87497
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx 
b/svx/source/tbxctrls/extrusioncontrols.cxx
index 5984873ba50e..3ada4301154a 100644
--- a/svx/source/tbxctrls/extrusioncontrols.cxx
+++ b/svx/source/tbxctrls/extrusioncontrols.cxx
@@ -303,8 +303,7 @@ OUString ExtrusionDirectionControl::getImplementationName()
 
 Sequence< OUString > ExtrusionDirectionControl::getSupportedServiceNames()
 {
-Sequence aSNS { "com.sun.star.frame.ToolbarController" };
-return aSNS;
+return { "com.sun.star.frame.ToolbarController" };
 }
 
 
@@ -562,8 +561,7 @@ OUString ExtrusionDepthController::getImplementationName()
 
 Sequence< OUString > ExtrusionDepthController::getSupportedServiceNames()
 {
-Sequence aSNS { "com.sun.star.frame.ToolbarController" };
-return aSNS;
+return { "com.sun.star.frame.ToolbarController" };
 }
 
 
@@ -800,8 +798,7 @@ OUString ExtrusionLightingControl::getImplementationName()
 
 Sequence< OUString > ExtrusionLightingControl::getSupportedServiceNames()
 {
-Sequence aSNS { "com.sun.star.frame.ToolbarController" };
-return aSNS;
+return { "com.sun.star.frame.ToolbarController" };
 }
 
 
@@ -939,8 +936,7 @@ OUString ExtrusionSurfaceControl::getImplementationName()
 
 Sequence< OUString > ExtrusionSurfaceControl::getSupportedServiceNames()
 {
-Sequence aSNS { "com.sun.star.frame.ToolbarController" };
-return aSNS;
+return { "com.sun.star.frame.ToolbarController" };
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: bin/find-clang-format.py

2020-01-27 Thread Batuhan Taskaya (via logerrit)
 bin/find-clang-format.py |   67 +++
 1 file changed, 67 insertions(+)

New commits:
commit 09680b09b2f49e7a37d8b941822f053b5179bf6d
Author: Batuhan Taskaya 
AuthorDate: Sun Jan 26 20:09:35 2020 +0300
Commit: Noel Grandin 
CommitDate: Mon Jan 27 19:09:19 2020 +0100

tdf#123936: bin/find-clang-format.py for finding files to be formatted

- bin/find-clang-format.py created for finding ignored files that can
be formatted with clang-format, outputs to stdout with this format:

 (size: /)
: amount of additions or removals, depends on which
one is bigger

- An environment variable can be used to set threshold (CLANG_THRESHOLD),
default for that variable is %5.

- Script automatically passes given arguments to the clang-format

Change-Id: I63651fdd1ed2d2354546726cac7560db4b77381f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87460
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/bin/find-clang-format.py b/bin/find-clang-format.py
new file mode 100755
index ..067b5b0899be
--- /dev/null
+++ b/bin/find-clang-format.py
@@ -0,0 +1,67 @@
+#!/usr/bin/env python3
+
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+import os
+from difflib import unified_diff
+from pathlib import Path
+from subprocess import PIPE, Popen
+
+BLACKLIST = Path("solenv/clang-format/blacklist")
+THRESHOLD = os.getenv("CLANG_THRESHOLD", 5)
+CLANG_BINARY = Path(os.getenv("CLANG_FORMAT", "/opt/lo/bin/clang-format"))
+
+
+def calculate_diff_size(diff):
+additions, removals = 0, 0
+# ignore first 2 item in the sequnece
+# which are +++ and ---
+for line in diff[2:]:
+if line.startswith("+"):
+additions += 1
+elif line.startswith("-"):
+removals += 1
+return max((additions, removals))
+
+
+def format_stream(path, *extra_args):
+process = Popen(
+[CLANG_BINARY, *extra_args], stdout=PIPE, stderr=PIPE, stdin=PIPE,
+)
+stdout, stderr = process.communicate(input=path.read_bytes())
+if stderr:
+print("", str(path))
+print(stderr.decode())
+print("")
+exit(1)
+stdout = stdout.decode()
+return stdout
+
+
+def main(*args):
+if not CLANG_BINARY.exists():
+print("Couldn't find clang-format on {!s}".format(CLANG_BINARY))
+exit(1)
+
+for path in BLACKLIST.read_text().splitlines():
+path = Path(path)
+if not path.exists():
+continue
+
+original = path.read_text()
+new = format_stream(path, *args)
+originalsize = len(original.splitlines())
+diff = unified_diff(original.splitlines(), new.splitlines(), n=0)
+diffsize = calculate_diff_size(tuple(diff))
+if diffsize <= (originalsize * 5) // 100:
+print(path, "(size: {}/{})".format(diffsize, originalsize))
+
+
+if __name__ == "__main__":
+import sys
+
+main(*sys.argv[1:])
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-01-27 Thread Batuhan Taskaya (via logerrit)
 connectivity/source/drivers/postgresql/pq_driver.cxx |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit ae9b25af849a63e8f9f41b8030c4947d6a59d358
Author: Batuhan Taskaya 
AuthorDate: Mon Jan 27 10:59:05 2020 +0300
Commit: Stephan Bergmann 
CommitDate: Mon Jan 27 16:09:37 2020 +0100

tdf#54938: Adapt supportsService implementations to cppu::supportsService

Change-Id: I4478002b733ba54c16b5ca428c4a85b7cbc46c05
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87484
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/connectivity/source/drivers/postgresql/pq_driver.cxx 
b/connectivity/source/drivers/postgresql/pq_driver.cxx
index 27eae6a34403..99571112cd90 100644
--- a/connectivity/source/drivers/postgresql/pq_driver.cxx
+++ b/connectivity/source/drivers/postgresql/pq_driver.cxx
@@ -192,10 +192,7 @@ public:
 }
 sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override
 {
-for( int i = 0 ; i < m_serviceNames.getLength() ; i ++ )
-if( m_serviceNames[i] == ServiceName )
-return true;
-return false;
+return cppu::supportsService(this, ServiceName);
 }
 Sequence< OUString > SAL_CALL getSupportedServiceNames() override
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-01-27 Thread Batuhan Taskaya (via logerrit)
 svx/source/form/datanavi.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4efdf5e5145c96116d7ef76a0bbade57865447f7
Author: Batuhan Taskaya 
AuthorDate: Sun Jan 26 16:54:29 2020 +0300
Commit: Muhammet Kara 
CommitDate: Mon Jan 27 14:28:34 2020 +0100

tdf#75280: Use sal_uLong instead of sal_uIntPtr

Change-Id: I05f91b0a0ee2782b9a7cc4b6815d17a70c542111
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87443
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 3078bd0fa0f6..657d22ab289c 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -882,7 +882,7 @@ namespace svxform
 
 _rEntry->getPropertyValue( PN_SUBMISSION_BIND ) >>= sTemp;
 OUString sEntry = SvxResId( RID_STR_DATANAV_SUBM_BIND ) + 
sTemp;
-sal_uIntPtr nPos = 0;
+sal_uLong nPos = 0;
 SvTreeListEntry* pChild = m_pItemList->GetEntry( pEntry, 
nPos++ );
 m_pItemList->SetEntryText( pChild, sEntry );
 _rEntry->getPropertyValue( PN_SUBMISSION_REF ) >>= sTemp;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-01-25 Thread Batuhan Taskaya (via logerrit)
 dbaccess/source/sdbtools/connection/datasourcemetadata.hxx |5 +
 dbaccess/source/sdbtools/connection/objectnames.hxx|5 +
 dbaccess/source/sdbtools/connection/tablename.hxx  |5 +
 dbaccess/source/sdbtools/inc/connectiondependent.hxx   |5 +
 dbaccess/source/sdbtools/inc/connectiontools.hxx   |5 +
 pyuno/inc/pyuno.hxx|4 +---
 6 files changed, 6 insertions(+), 23 deletions(-)

New commits:
commit 44139efb6a64735d3c6fe1f1b0f0007eff3a7504
Author: Batuhan Taskaya 
AuthorDate: Sat Jan 25 14:58:32 2020 +0300
Commit: Muhammet Kara 
CommitDate: Sat Jan 25 19:09:34 2020 +0100

tdf#124176: Use pragma once instead of include guards

Change-Id: Ic35fce6fbc9c41a004f93952df83496ca1809004
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87380
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 

diff --git a/dbaccess/source/sdbtools/connection/datasourcemetadata.hxx 
b/dbaccess/source/sdbtools/connection/datasourcemetadata.hxx
index 7b7fa365b7c9..232f97f601ae 100644
--- a/dbaccess/source/sdbtools/connection/datasourcemetadata.hxx
+++ b/dbaccess/source/sdbtools/connection/datasourcemetadata.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_DBACCESS_SOURCE_SDBTOOLS_CONNECTION_DATASOURCEMETADATA_HXX
-#define INCLUDED_DBACCESS_SOURCE_SDBTOOLS_CONNECTION_DATASOURCEMETADATA_HXX
+#pragma once
 
 #include 
 
@@ -67,6 +66,4 @@ namespace sdbtools
 
 } // namespace sdbtools
 
-#endif // INCLUDED_DBACCESS_SOURCE_SDBTOOLS_CONNECTION_DATASOURCEMETADATA_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/sdbtools/connection/objectnames.hxx 
b/dbaccess/source/sdbtools/connection/objectnames.hxx
index 9c42bd67b98f..439db0967101 100644
--- a/dbaccess/source/sdbtools/connection/objectnames.hxx
+++ b/dbaccess/source/sdbtools/connection/objectnames.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_DBACCESS_SOURCE_SDBTOOLS_CONNECTION_OBJECTNAMES_HXX
-#define INCLUDED_DBACCESS_SOURCE_SDBTOOLS_CONNECTION_OBJECTNAMES_HXX
+#pragma once
 
 #include 
 
@@ -72,6 +71,4 @@ namespace sdbtools
 
 } // namespace sdbtools
 
-#endif // INCLUDED_DBACCESS_SOURCE_SDBTOOLS_CONNECTION_OBJECTNAMES_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/sdbtools/connection/tablename.hxx 
b/dbaccess/source/sdbtools/connection/tablename.hxx
index 4b2f4313344f..3a7ece21a182 100644
--- a/dbaccess/source/sdbtools/connection/tablename.hxx
+++ b/dbaccess/source/sdbtools/connection/tablename.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_DBACCESS_SOURCE_SDBTOOLS_CONNECTION_TABLENAME_HXX
-#define INCLUDED_DBACCESS_SOURCE_SDBTOOLS_CONNECTION_TABLENAME_HXX
+#pragma once
 
 #include 
 
@@ -82,6 +81,4 @@ namespace sdbtools
 
 } // namespace sdbtools
 
-#endif // INCLUDED_DBACCESS_SOURCE_SDBTOOLS_CONNECTION_TABLENAME_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/sdbtools/inc/connectiondependent.hxx 
b/dbaccess/source/sdbtools/inc/connectiondependent.hxx
index 37fb95b16588..d315d70187fb 100644
--- a/dbaccess/source/sdbtools/inc/connectiondependent.hxx
+++ b/dbaccess/source/sdbtools/inc/connectiondependent.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_DBACCESS_SOURCE_SDBTOOLS_CONNECTION_CONNECTIONDEPENDENT_HXX
-#define INCLUDED_DBACCESS_SOURCE_SDBTOOLS_CONNECTION_CONNECTIONDEPENDENT_HXX
+#pragma once
 
 #include 
 #include 
@@ -133,6 +132,4 @@ namespace sdbtools
 
 } // namespace sdbtools
 
-#endif // INCLUDED_DBACCESS_SOURCE_SDBTOOLS_CONNECTION_CONNECTIONDEPENDENT_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/sdbtools/inc/connectiontools.hxx 
b/dbaccess/source/sdbtools/inc/connectiontools.hxx
index 5e4837112b3f..a3dd610f861e 100644
--- a/dbaccess/source/sdbtools/inc/connectiontools.hxx
+++ b/dbaccess/source/sdbtools/inc/connectiontools.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_DBACCESS_SOURCE_SDBTOOLS_CONNECTION_CONNECTIONTOOLS_HXX
-#define INCLUDED_DBACCESS_SOURCE_SDBTOOLS_CONNECTION_CONNECTIONTOOLS_HXX
+#pragma once
 
 #include "connectiondependent.hxx"
 
@@ -81,6 +80,4 @@ namespace sdbtools
 
 } // namespace sdbtools
 
-#endif // INCLUDED_DBACCESS_SOURCE_SDBTOOLS_CONNECTION_CONNECTIONTOOLS_HXX
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/pyuno/inc/pyuno.hxx b/pyuno/inc/pyuno.hxx
index e2cdc5f0329e..e50dde9bb119 100644
--- a/pyuno/inc/pyuno.hxx
+++ b/pyuno/inc/pyuno.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_PYUNO_INC_PYUNO_HXX
-#define INCLUDED_PYUNO_INC_PYUNO_HX

Batuhan Taskaya license statement

2020-01-25 Thread Batuhan Taskaya
All of my past & future contributions to LibreOffice may be licensed under
the MPLv2/LGPLv3+ dual license.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Batuhan Taskaya license statement

2019-11-15 Thread Batuhan Taskaya
   All of my past & future contributions to LibreOffice may be
   licensed under the MPLv2/LGPLv3+ dual license.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice