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

2018-10-20 Thread Libreoffice Gerrit user
 vcl/source/gdi/pdfwriter_impl2.cxx |   11 ---
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit c078e432903bfdcabed6ae86d585aeae82716cd1
Author: Mike Kaganski 
AuthorDate: Sun Oct 21 07:01:53 2018 +0200
Commit: Mike Kaganski 
CommitDate: Sun Oct 21 08:38:41 2018 +0200

tdf#120703 (PVS): 920d4463f6e59b815852c173e2974ffc7b4bb284 follow-up

V519 The 'o_rKeyLength' variable is assigned values twice successively.
 Perhaps this is a mistake. Check lines: 1276, 1279.

V519 The 'o_rRC4KeyLength' variable is assigned values twice successively.
 Perhaps this is a mistake. Check lines: 1277, 1280.

Change-Id: I1dc4ba9097996201d97ef323113ed0b11f3cb913
Reviewed-on: https://gerrit.libreoffice.org/62120
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx 
b/vcl/source/gdi/pdfwriter_impl2.cxx
index 1cd4f81993c5..1572248e8263 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -1253,17 +1253,14 @@ sal_Int32 PDFWriterImpl::computeAccessPermissions( 
const vcl::PDFWriter::PDFEncr
 according to the table 3.15, pdf v 1.4 */
 sal_Int32 nAccessPermissions = 0xf0c0;
 
-/* check permissions for 40 bit security case */
+o_rKeyLength = SECUR_128BIT_KEY;
+o_rRC4KeyLength = 16; // for this value see PDF spec v 1.4, algorithm 3.1 
step 4, where n is 16,
+  // thus maximum permitted value is 16
+
 nAccessPermissions |= ( i_rProperties.CanPrintTheDocument ) ?  1 << 2 : 0;
 nAccessPermissions |= ( i_rProperties.CanModifyTheContent ) ? 1 << 3 : 0;
 nAccessPermissions |= ( i_rProperties.CanCopyOrExtract ) ?   1 << 4 : 0;
 nAccessPermissions |= ( i_rProperties.CanAddOrModify ) ? 1 << 5 : 0;
-o_rKeyLength = SECUR_40BIT_KEY;
-o_rRC4KeyLength = SECUR_40BIT_KEY+5; // for this value see PDF spec v 1.4, 
algorithm 3.1 step 4, where n is 5
-
-o_rKeyLength = SECUR_128BIT_KEY;
-o_rRC4KeyLength = 16; // for this value see PDF spec v 1.4, algorithm 3.1 
step 4, where n is 16, thus maximum
-// permitted value is 16
 nAccessPermissions |= ( i_rProperties.CanFillInteractive ) ? 1 << 
8 : 0;
 nAccessPermissions |= ( i_rProperties.CanExtractForAccessibility ) ? 1 << 
9 : 0;
 nAccessPermissions |= ( i_rProperties.CanAssemble ) ?1 << 
10 : 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: icon-themes/karasa_jaga

2018-10-20 Thread Libreoffice Gerrit user
 dev/null   |binary
 icon-themes/karasa_jaga/chart2/res/net_52x60.png   |binary
 icon-themes/karasa_jaga/chart2/res/netfill_52x60.png   |binary
 icon-themes/karasa_jaga/chart2/res/netlinepoint_52x60.png  |binary
 icon-themes/karasa_jaga/chart2/res/netlinepointstack_52x60.png |binary
 icon-themes/karasa_jaga/chart2/res/netpoint_52x60.png  |binary
 icon-themes/karasa_jaga/chart2/res/netpointstack_52x60.png |binary
 icon-themes/karasa_jaga/chart2/res/netstack_52x60.png  |binary
 icon-themes/karasa_jaga/chart2/res/netstackfill_52x60.png  |binary
 icon-themes/karasa_jaga/cmd/32/accepttrackedchange.png |binary
 icon-themes/karasa_jaga/cmd/32/accepttrackedchanges.png|binary
 icon-themes/karasa_jaga/cmd/32/assignmacro.png |binary
 icon-themes/karasa_jaga/cmd/32/dbaddrelation.png   |binary
 icon-themes/karasa_jaga/cmd/lc_accepttrackedchange.png |binary
 icon-themes/karasa_jaga/cmd/lc_accepttrackedchanges.png|binary
 icon-themes/karasa_jaga/cmd/lc_assignmacro.png |binary
 icon-themes/karasa_jaga/cmd/lc_dbaddrelation.png   |binary
 icon-themes/karasa_jaga/cmd/sc_accepttrackedchange.png |binary
 icon-themes/karasa_jaga/cmd/sc_accepttrackedchanges.png|binary
 icon-themes/karasa_jaga/cmd/sc_assignmacro.png |binary
 icon-themes/karasa_jaga/links.txt  |   15 
--
 icon-themes/karasa_jaga/res/minus.png  |binary
 icon-themes/karasa_jaga/res/plus.png   |binary
 23 files changed, 6 insertions(+), 9 deletions(-)

New commits:
commit 3e2268d46f1a716e91a1c81774622028bc8e3d70
Author: Rizal Muttaqin 
AuthorDate: Sat Oct 20 10:59:29 2018 +0700
Commit: andreas_kainz 
CommitDate: Sun Oct 21 08:35:13 2018 +0200

KJ: Fix  track changes icons related to tdf#119073, add assign macro, fix 
net chart

Change-Id: I74d05744632d5d54e439a2a3e144fa2daf4ae1b3
Reviewed-on: https://gerrit.libreoffice.org/62036
Tested-by: Jenkins
Reviewed-by: andreas_kainz 

diff --git a/icon-themes/karasa_jaga/chart2/res/net_52x60.png 
b/icon-themes/karasa_jaga/chart2/res/net_52x60.png
index 0c2fd32ede26..af1fb0383f2c 100644
Binary files a/icon-themes/karasa_jaga/chart2/res/net_52x60.png and 
b/icon-themes/karasa_jaga/chart2/res/net_52x60.png differ
diff --git a/icon-themes/karasa_jaga/chart2/res/netfill_52x60.png 
b/icon-themes/karasa_jaga/chart2/res/netfill_52x60.png
index 68d1cf93daae..33bf9b736882 100644
Binary files a/icon-themes/karasa_jaga/chart2/res/netfill_52x60.png and 
b/icon-themes/karasa_jaga/chart2/res/netfill_52x60.png differ
diff --git a/icon-themes/karasa_jaga/chart2/res/netlinepoint_52x60.png 
b/icon-themes/karasa_jaga/chart2/res/netlinepoint_52x60.png
index 058f48bbbed5..7276883d6e93 100644
Binary files a/icon-themes/karasa_jaga/chart2/res/netlinepoint_52x60.png and 
b/icon-themes/karasa_jaga/chart2/res/netlinepoint_52x60.png differ
diff --git a/icon-themes/karasa_jaga/chart2/res/netlinepointstack_52x60.png 
b/icon-themes/karasa_jaga/chart2/res/netlinepointstack_52x60.png
index 1457b2c01293..ac5c6259250a 100644
Binary files a/icon-themes/karasa_jaga/chart2/res/netlinepointstack_52x60.png 
and b/icon-themes/karasa_jaga/chart2/res/netlinepointstack_52x60.png differ
diff --git a/icon-themes/karasa_jaga/chart2/res/netpoint_52x60.png 
b/icon-themes/karasa_jaga/chart2/res/netpoint_52x60.png
index a08a83600669..81f0607de1b2 100644
Binary files a/icon-themes/karasa_jaga/chart2/res/netpoint_52x60.png and 
b/icon-themes/karasa_jaga/chart2/res/netpoint_52x60.png differ
diff --git a/icon-themes/karasa_jaga/chart2/res/netpointstack_52x60.png 
b/icon-themes/karasa_jaga/chart2/res/netpointstack_52x60.png
index 0660e474d987..5890813ef991 100644
Binary files a/icon-themes/karasa_jaga/chart2/res/netpointstack_52x60.png and 
b/icon-themes/karasa_jaga/chart2/res/netpointstack_52x60.png differ
diff --git a/icon-themes/karasa_jaga/chart2/res/netstack_52x60.png 
b/icon-themes/karasa_jaga/chart2/res/netstack_52x60.png
index 104cc5f0f596..1bd02adebc4e 100644
Binary files a/icon-themes/karasa_jaga/chart2/res/netstack_52x60.png and 
b/icon-themes/karasa_jaga/chart2/res/netstack_52x60.png differ
diff --git a/icon-themes/karasa_jaga/chart2/res/netstackfill_52x60.png 
b/icon-themes/karasa_jaga/chart2/res/netstackfill_52x60.png
index 6bb1bcc6e1d2..cb9486d7f78c 100644
Binary files a/icon-themes/karasa_jaga/chart2/res/netstackfill_52x60.png and 
b/icon-themes/karasa_jaga/chart2/res/netstackfill_52x60.png differ
diff --git a/icon-themes/karasa_jaga/cmd/32/accepttrackedchange.png 
b/icon-themes/karasa_jaga/cmd/32/accepttrackedchange.png
new file mode 100644
index ..915b5f97fd28
Binary files /dev/null and 
b/icon-themes/karasa_jaga/cmd/32/accepttrackedchange.png differ
diff --git a/icon-themes/karasa_jaga/cmd/32/accepttrackedchanges.png 
b/

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

2018-10-20 Thread Libreoffice Gerrit user
 io/source/stm/streamhelper.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 24e4b37987ccd410b6d6672151d84c790cdb7e56
Author: Mike Kaganski 
AuthorDate: Sat Oct 20 22:42:29 2018 +0200
Commit: Mike Kaganski 
CommitDate: Sun Oct 21 08:02:01 2018 +0200

tdf#120703 (PVS): handle failed realloc

V701 realloc() possible leak: when realloc() fails in allocating memory,
 original pointer 'm_p' is lost. Consider assigning realloc() to a
 temporary pointer.

Change-Id: Ic298927a266da4d543f3856a1c9f97ba1f6fe941
Reviewed-on: https://gerrit.libreoffice.org/62092
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 

diff --git a/io/source/stm/streamhelper.cxx b/io/source/stm/streamhelper.cxx
index 0ef0d3e1f7ae..c382cae96390 100644
--- a/io/source/stm/streamhelper.cxx
+++ b/io/source/stm/streamhelper.cxx
@@ -75,8 +75,10 @@ void MemRingBuffer::resizeBuffer( sal_Int32 nMinSize )
 }
 
 if( nNewLen != m_nBufferLen ) {
-m_p = static_cast(std::realloc( m_p , nNewLen ));
-if( !m_p ) {
+   if (auto p = static_cast(std::realloc(m_p, nNewLen)))
+m_p = p;
+else
+{
 throw css::io::BufferSizeExceededException(
 "MemRingBuffer::resizeBuffer BufferSizeExceededException");
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-20 Thread Libreoffice Gerrit user
 desktop/win32/source/guistdio/guistdio.inc |  123 +++--
 vcl/source/filter/igif/decode.cxx  |   11 ++
 2 files changed, 76 insertions(+), 58 deletions(-)

New commits:
commit 79e837d8e2fb961cd4825566f07aabf031fddb5f
Author: Mike Kaganski 
AuthorDate: Sun Oct 21 00:34:25 2018 +0200
Commit: Mike Kaganski 
CommitDate: Sun Oct 21 07:08:05 2018 +0200

tdf#120703 (PVS): handle failed (re)allocations

V769 The 'readBuf' pointer in the 'readBuf + readAll' expression could be 
nullptr.
 In such case, resulting value will be senseless and it should not be 
used.
 Check lines: 171, 166.

V701 realloc() possible leak: when realloc() fails in allocating memory, 
original
 pointer 'readBuf' is lost. Consider assigning realloc() to a temporary
 pointer.

Change-Id: I2e15a1abb79516dd42d6425646bb54eab5b8
Reviewed-on: https://gerrit.libreoffice.org/62117
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/desktop/win32/source/guistdio/guistdio.inc 
b/desktop/win32/source/guistdio/guistdio.inc
index eb1b9cda1639..ea466769d517 100644
--- a/desktop/win32/source/guistdio/guistdio.inc
+++ b/desktop/win32/source/guistdio/guistdio.inc
@@ -26,6 +26,7 @@
 
 #include 
 #include 
+#include 
 
 #ifdef UNOPKG
 
@@ -147,70 +148,80 @@ DWORD WINAPI InputThread( LPVOID pParam )
 {
 DWORD   dwRead = 0;
 HANDLE  hWritePipe = static_cast(pParam);
-
-//We need to read in the complete input until we encounter a new line 
before
-//converting to Unicode. This is necessary because the input string can use
-//characters of one, two, and more bytes. If the last character is not
-//complete, then it will not be converted properly.
-
-//Find out how a new line (0xd 0xa) looks like with the used code page.
-//Characters may have one or multiple bytes and different byte ordering
-//can be used (little and big endian);
-int cNewLine = WideCharToMultiByte(
-GetConsoleCP(), 0, L"\r\n", 2, nullptr, 0, nullptr, nullptr);
-char * mbBuff = new char[cNewLine];
-WideCharToMultiByte(
-GetConsoleCP(), 0, L"\r\n", 2, mbBuff, cNewLine, nullptr, nullptr);
-
-const DWORD dwBufferSize = 256;
-char* readBuf = static_cast(malloc(dwBufferSize));
-int readAll = 0;
-DWORD curBufSize = dwBufferSize;
-
-while ( ReadFile( GetStdHandle( STD_INPUT_HANDLE ),
-  readBuf + readAll,
-  curBufSize - readAll, &dwRead, nullptr ) )
+char* readBuf = nullptr;
+try
 {
-readAll += dwRead;
-int lastBufSize = curBufSize;
-//Grow the buffer if necessary
-if (readAll > curBufSize * 0.7)
+//We need to read in the complete input until we encounter a new line 
before
+//converting to Unicode. This is necessary because the input string 
can use
+//characters of one, two, and more bytes. If the last character is not
+//complete, then it will not be converted properly.
+
+//Find out how a new line (0xd 0xa) looks like with the used code page.
+//Characters may have one or multiple bytes and different byte ordering
+//can be used (little and big endian);
+int cNewLine = WideCharToMultiByte(
+GetConsoleCP(), 0, L"\r\n", 2, nullptr, 0, nullptr, nullptr);
+auto mbBuff = o3tl::make_unique(cNewLine);
+WideCharToMultiByte(
+GetConsoleCP(), 0, L"\r\n", 2, mbBuff.get(), cNewLine, nullptr, 
nullptr);
+
+const DWORD dwBufferSize = 256;
+readBuf = static_cast(malloc(dwBufferSize));
+if (!readBuf)
+throw std::bad_alloc();
+int readAll = 0;
+DWORD curBufSize = dwBufferSize;
+
+while ( ReadFile( GetStdHandle( STD_INPUT_HANDLE ),
+  readBuf + readAll,
+  curBufSize - readAll, &dwRead, nullptr ) )
 {
-curBufSize *= 2;
-readBuf = static_cast(realloc(readBuf, curBufSize));
-}
+readAll += dwRead;
+int lastBufSize = curBufSize;
+//Grow the buffer if necessary
+if (readAll > curBufSize * 0.7)
+{
+curBufSize *= 2;
+if (auto p = static_cast(realloc(readBuf, curBufSize)))
+readBuf = p;
+else
+{
+throw std::bad_alloc();
+}
+}
 
-//If the buffer was filled completely then
-//there could be more input coming. But if we read from the console
-//and the console input fits exactly in the buffer, then the next
-//ReadFile would block until the users presses return, etc.
-//Therefore we check if last character is a new line.
-//To test this, set dwBufferSize to 4 and enter "no". This should 
produce
-//4 bytes with most code pages.
-if ( readAll 

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

2018-10-20 Thread Libreoffice Gerrit user
 ucb/source/ucp/ftp/ftpurl.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 86fd9622fb8066e1b3a41971cdf7ad76539d313c
Author: Mike Kaganski 
AuthorDate: Sat Oct 20 22:58:47 2018 +0200
Commit: Mike Kaganski 
CommitDate: Sun Oct 21 07:07:23 2018 +0200

tdf#120703 (PVS): handle failed realloc

V701 realloc() possible leak: when realloc() fails in allocating memory,
 original pointer 'm_pBuffer' is lost. Consider assigning realloc()
 to a temporary pointer.

Change-Id: I8a18e1472072456bfe9f32d822f185cabd24d6ed
Reviewed-on: https://gerrit.libreoffice.org/62114
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 

diff --git a/ucb/source/ucp/ftp/ftpurl.cxx b/ucb/source/ucp/ftp/ftpurl.cxx
index 38e4afe3345a..01c2eb292860 100644
--- a/ucb/source/ucp/ftp/ftpurl.cxx
+++ b/ucb/source/ucp/ftp/ftpurl.cxx
@@ -88,7 +88,10 @@ int MemoryContainer::append(
 m_nLen+=1024;
 } while(m_nLen < tmp);
 
-m_pBuffer = std::realloc(m_pBuffer,m_nLen);
+if (auto p = std::realloc(m_pBuffer, m_nLen))
+m_pBuffer = p;
+else
+return 0;
 }
 
 memcpy(static_cast(m_pBuffer)+m_nWritePos,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3-desktop' - configure.ac

2018-10-20 Thread Libreoffice Gerrit user
 configure.ac |   12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 35196c456ae1ffb9d826c8ec3b8967d6656779f0
Author: Stephan Bergmann 
AuthorDate: Tue Sep 18 08:39:21 2018 +0200
Commit: Andras Timar 
CommitDate: Sun Oct 21 06:47:40 2018 +0200

macOS SDK 10.14 is out

Reviewed-on: https://gerrit.libreoffice.org/60657
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit a8eb515599526b5b69647a842b2889b6f56de2c8)

Change-Id: Iab7bc66db94fe02bb3714234d68b3e2fc3569fdf

diff --git a/configure.ac b/configure.ac
index 7b11377cad1a..6c9f89128e2a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2744,8 +2744,7 @@ if test $_os = Darwin; then
 # higher than or equal to the minimum required should be found.
 
 AC_MSG_CHECKING([what Mac OS X SDK to use])
-
-for _macosx_sdk in $with_macosx_sdk 10.8 10.9 10.10 10.11 10.12 10.13; do
+for _macosx_sdk in $with_macosx_sdk 10.8 10.9 10.10 10.11 10.12 10.13 
10.14; do
 MACOSX_SDK_PATH=`xcrun --sdk macosx${_macosx_sdk} --show-sdk-path 2> 
/dev/null`
 if test -d "$MACOSX_SDK_PATH"; then
 with_macosx_sdk="${_macosx_sdk}"
@@ -2782,6 +2781,9 @@ if test $_os = Darwin; then
 10.13)
 MACOSX_SDK_VERSION=101300
 ;;
+10.14)
+MACOSX_SDK_VERSION=101400
+;;
 *)
 AC_MSG_ERROR([with-macosx-sdk $with_macosx_sdk is not a supported 
value, supported values are 10.8--13])
 ;;
@@ -2821,6 +2823,9 @@ if test $_os = Darwin; then
 10.13)
 MAC_OS_X_VERSION_MIN_REQUIRED="101300"
 ;;
+10.14)
+MAC_OS_X_VERSION_MIN_REQUIRED="101400"
+;;
 *)
 AC_MSG_ERROR([with-macosx-version-min-required 
$with_macosx_version_min_required is not a supported value, supported values 
are 10.8--13])
 ;;
@@ -2864,6 +2869,9 @@ if test $_os = Darwin; then
 10.13)
 MAC_OS_X_VERSION_MAX_ALLOWED="101300"
 ;;
+10.14)
+MAC_OS_X_VERSION_MAX_ALLOWED="101400"
+;;
 *)
 AC_MSG_ERROR([with-macosx-version-max-allowed 
$with_macosx_version_max_allowed is not a supported value, supported values are 
10.8--13])
 ;;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - configure.ac

2018-10-20 Thread Libreoffice Gerrit user
 configure.ac |   11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit c6af7bc0bd426ec459197c0b52db0a113fb5cd80
Author: Stephan Bergmann 
AuthorDate: Tue Sep 18 08:39:21 2018 +0200
Commit: Andras Timar 
CommitDate: Sun Oct 21 00:13:08 2018 +0200

macOS SDK 10.14 is out

Reviewed-on: https://gerrit.libreoffice.org/60657
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit a8eb515599526b5b69647a842b2889b6f56de2c8)

Change-Id: Iab7bc66db94fe02bb3714234d68b3e2fc3569fdf

diff --git a/configure.ac b/configure.ac
index c71ea1672658..932d8c73a6f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2618,7 +2618,7 @@ if test $_os = Darwin -o $_os = iOS; then
 # higher than or equal to the minimum required should be found.
 
 AC_MSG_CHECKING([what Mac OS X SDK to use])
-for _macosx_sdk in $with_macosx_sdk 10.13 10.12; do
+for _macosx_sdk in ${with_macosx_sdk-10.14 10.13 10.12}; do
 MACOSX_SDK_PATH=`xcrun --sdk macosx${_macosx_sdk} --show-sdk-path 2> 
/dev/null`
 if test -d "$MACOSX_SDK_PATH"; then
 with_macosx_sdk="${_macosx_sdk}"
@@ -2662,6 +2662,9 @@ if test $_os = Darwin -o $_os = iOS; then
 10.13)
 MACOSX_SDK_VERSION=101300
 ;;
+10.14)
+MACOSX_SDK_VERSION=101400
+;;
 *)
 AC_MSG_ERROR([with-macosx-sdk $with_macosx_sdk is not a supported 
value, supported values are 10.9--13])
 ;;
@@ -2698,6 +2701,9 @@ if test $_os = Darwin -o $_os = iOS; then
 10.13)
 MAC_OS_X_VERSION_MIN_REQUIRED="101300"
 ;;
+10.14)
+MAC_OS_X_VERSION_MIN_REQUIRED="101400"
+;;
 *)
 AC_MSG_ERROR([with-macosx-version-min-required 
$with_macosx_version_min_required is not a supported value, supported values 
are 10.9--13])
 ;;
@@ -2739,6 +2745,9 @@ if test $_os = Darwin -o $_os = iOS; then
 10.13)
 MAC_OS_X_VERSION_MAX_ALLOWED="101300"
 ;;
+10.14)
+MAC_OS_X_VERSION_MAX_ALLOWED="101400"
+;;
 *)
 AC_MSG_ERROR([with-macosx-version-max-allowed 
$with_macosx_version_max_allowed is not a supported value, supported values are 
10.9--13])
 ;;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


CppCheck Report Update

2018-10-20 Thread cppcheck.libreoff...@gmail.com

A new cppcheck report is available at : 
http://dev-builds.libreoffice.org/cppcheck_reports/master/


Note:
The script generating this report was run at :
2018-21-10 02:53:45 with user buildslave at host vm140 as 
/home/buildslave/source/dev-tools/cppcheck/cppcheck-report.sh -s 
/home/buildslave/source/libo-core -c /home/buildslave/source/cppcheck -w 
/home/buildslave/tmp/www

It can be found and improved here:

https://gerrit.libreoffice.org/gitweb?p=dev-tools.git;a=blob;f=cppcheck/cppcheck-report.sh


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: sal/osl

2018-10-20 Thread Libreoffice Gerrit user
 sal/osl/w32/security.cxx |  106 +++
 1 file changed, 63 insertions(+), 43 deletions(-)

New commits:
commit 3846561f79cf9065abd9ca83c9fbfbe7e52e28e2
Author: Mike Kaganski 
AuthorDate: Sat Oct 20 22:24:26 2018 +0200
Commit: Mike Kaganski 
CommitDate: Sun Oct 21 00:31:19 2018 +0200

tdf#120703 (PVS)

V522 There might be dereferencing of a potential null pointer 'pSecImpl'.
Check lines: 81, 79.
Check lines: 116, 114.
Check lines: 175, 173.

V522 There might be dereferencing of a potential null pointer 
'pSecImpl->m_pNetResource'.
 Check lines: 176, 175.

V701 realloc() possible leak: when realloc() fails in allocating memory, 
original
 pointer 'pInfoBuffer' is lost. Consider assigning realloc() to a 
temporary
 pointer.

V724 Converting type 'BOOL' to type 'sal_Bool' can lead to a loss of 
high-order
 bits. Non-zero value can become 'FALSE'.

V522 There might be dereferencing of a potential null pointer 'Ident'.
 Check lines: 345, 340.

V614 Potentially uninitialized buffer 'Name' used. Consider checking the 
second
 actual argument of the 'rtl_uString_newFromStr' function.

Change-Id: Ieadc914d0f15e9c01621f8d7b5a7f8c0778c4498
Reviewed-on: https://gerrit.libreoffice.org/62090
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/sal/osl/w32/security.cxx b/sal/osl/w32/security.cxx
index 2082301d2156..ebd3754705dd 100644
--- a/sal/osl/w32/security.cxx
+++ b/sal/osl/w32/security.cxx
@@ -77,12 +77,13 @@ static bool getUserNameImpl(oslSecurity Security, 
rtl_uString **strName, bool bI
 oslSecurity SAL_CALL osl_getCurrentSecurity(void)
 {
 oslSecurityImpl* pSecImpl = static_cast(malloc(sizeof(oslSecurityImpl)));
-
-pSecImpl->m_pNetResource = nullptr;
-pSecImpl->m_User[0] = '\0';
-pSecImpl->m_hToken = nullptr;
-pSecImpl->m_hProfile = nullptr;
-
+if (pSecImpl)
+{
+pSecImpl->m_pNetResource = nullptr;
+pSecImpl->m_User[0] = '\0';
+pSecImpl->m_hToken = nullptr;
+pSecImpl->m_hProfile = nullptr;
+}
 return pSecImpl;
 }
 
@@ -112,14 +113,15 @@ oslSecurityError SAL_CALL osl_loginUser( rtl_uString 
*strUserName, rtl_uString *
&hUserToken))
 {
 oslSecurityImpl* pSecImpl = static_cast(malloc(sizeof(oslSecurityImpl)));
-
-pSecImpl->m_pNetResource = nullptr;
-pSecImpl->m_hToken = hUserToken;
-pSecImpl->m_hProfile = nullptr;
-wcscpy(o3tl::toW(pSecImpl->m_User), o3tl::toW(strUser));
-
+if (pSecImpl)
+{
+pSecImpl->m_pNetResource = nullptr;
+pSecImpl->m_hToken = hUserToken;
+pSecImpl->m_hProfile = nullptr;
+wcscpy(o3tl::toW(pSecImpl->m_User), o3tl::toW(strUser));
+}
 *pSecurity = pSecImpl;
-ret = osl_Security_E_None;
+ret = pSecImpl ? osl_Security_E_None : osl_Security_E_Unknown;
 }
 else
 {
@@ -171,17 +173,25 @@ oslSecurityError SAL_CALL 
osl_loginUserOnFileServer(rtl_uString *strUserName,
 if ((err == NO_ERROR) || (err == ERROR_ALREADY_ASSIGNED))
 {
 oslSecurityImpl* pSecImpl = static_cast(malloc(sizeof(oslSecurityImpl)));
-
-pSecImpl->m_pNetResource = static_cast(malloc(sizeof(NETRESOURCE)));
-*pSecImpl->m_pNetResource = netResource;
-
-pSecImpl->m_hToken = nullptr;
-pSecImpl->m_hProfile = nullptr;
-wcscpy(o3tl::toW(pSecImpl->m_User), 
o3tl::toW(rtl_uString_getStr(strUserName)));
-
+if (pSecImpl)
+{
+pSecImpl->m_pNetResource = static_cast(malloc(sizeof(NETRESOURCE)));
+if (pSecImpl->m_pNetResource)
+{
+*pSecImpl->m_pNetResource = netResource;
+pSecImpl->m_hToken = nullptr;
+pSecImpl->m_hProfile = nullptr;
+wcscpy(o3tl::toW(pSecImpl->m_User), 
o3tl::toW(rtl_uString_getStr(strUserName)));
+}
+else
+{
+free(pSecImpl);
+pSecImpl = nullptr;
+}
+}
 *pSecurity = pSecImpl;
 
-ret = osl_Security_E_None;
+ret = pSecImpl ? osl_Security_E_None : osl_Security_E_Unknown;
 }
 else
 {
@@ -291,7 +301,14 @@ sal_Bool SAL_CALL osl_getUserIdent(oslSecurity Security, 
rtl_uString **strIdent)
 {
 if (GetLastError() == ERROR_INSUFFICIENT_BUFFER)
 {
-pInfoBuffer = static_cast(realloc(pInfoBuffer, 
nInfoBuffer));
+if (auto p = static_cast(realloc(pInfoBuffer, 
nInfoBuffer)))
+pInfoBuffer = p;
+else
+{
+free(pInfoBuffer);
+pInfoBuffer = nullptr;
+break;
+}
 }
 el

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - 15 commits - basic/source configure.ac connectivity/source sc/inc scripting/source sc/source svl/source svtools/source sw/qa sw/sourc

2018-10-20 Thread Libreoffice Gerrit user
 basic/source/runtime/dllmgr-x64.cxx|2 
 configure.ac   |2 
 connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx |2 
 sc/inc/dbdata.hxx  |3 
 sc/source/core/tool/dbdata.cxx |6 -
 sc/source/ui/view/gridwin.cxx  |2 
 scripting/source/pyprov/pythonscript.py|   30 
 svl/source/numbers/zformat.cxx |4 -
 svtools/source/brwbox/editbrowsebox.cxx|   22 +-
 sw/qa/extras/rtfexport/data/tdf112520.docx |binary
 sw/qa/extras/rtfexport/rtfexport3.cxx  |   21 ++
 sw/qa/extras/ww8export/data/fdo53985.doc   |binary
 sw/qa/extras/ww8export/data/tdf37778_readonlySection.doc   |binary
 sw/qa/extras/ww8export/ww8export3.cxx  |   34 
++
 sw/source/filter/ww8/rtfsdrexport.cxx  |   12 ++-
 sw/source/filter/ww8/rtfsdrexport.hxx  |2 
 sw/source/filter/ww8/wrtw8sty.cxx  |4 -
 sw/source/filter/ww8/wrtww8.cxx|   11 ---
 sw/source/filter/ww8/ww8par.cxx|   30 ++--
 sw/source/uibase/docvw/edtwin2.cxx |2 
 xmlscript/source/xmldlg_imexp/xmldlg_export.cxx|2 
 21 files changed, 138 insertions(+), 53 deletions(-)

New commits:
commit 3a31948ae3f2fff1a010efe34d1fcd94e4a1829f
Author: Andras Timar 
AuthorDate: Sun Oct 21 00:01:21 2018 +0200
Commit: Andras Timar 
CommitDate: Sun Oct 21 00:01:21 2018 +0200

Bump version to 6.0-13

Change-Id: If4337153f8b0edb424132ab60b50dc5a89ca25ee

diff --git a/configure.ac b/configure.ac
index 07718c3e912e..c71ea1672658 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([Collabora Office],[6.0.10.12],[],[],[https://collaboraoffice.com/])
+AC_INIT([Collabora Office],[6.0.10.13],[],[],[https://collaboraoffice.com/])
 
 AC_PREREQ([2.59])
 
commit 0507a1578da0de9cebda999ec4d916d3bc8b290c
Author: Justin Luth 
AuthorDate: Thu Oct 18 09:38:47 2018 +0300
Commit: Andras Timar 
CommitDate: Sat Oct 20 23:00:44 2018 +0200

sw mso export: PROTECT_FORM shouldn't force section to protected

PROTECT_FORM maps to enforcement = true, not "everything is protected".
"The enforcement of this property is determined by the documentProtection
element (§17.15.1.29), as it is possible to specify protection
without turning it on."

So, sections should retain their protected on/off status
regardless of the value of PROTECT_FORM. My guess was
that this was to offset the fact that DOCX import did not
import protected status, so this helped to protect the
sections that should not be unprotected. A followup
patch will address the import side.

patch initially developed to support tdf#120499.

Change-Id: I8ff6d31711651a4827cbb8520fd68e88273d6799
Reviewed-on: https://gerrit.libreoffice.org/61905
Tested-by: Jenkins
Reviewed-by: Justin Luth 
(cherry picked from commit fa667b6dc410f3af57ef436cc117352c829f95e7)

diff --git a/sw/qa/extras/ww8export/ww8export3.cxx 
b/sw/qa/extras/ww8export/ww8export3.cxx
index 84f9e2f2d6cf..d5a888e60dd6 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -63,7 +63,6 @@ DECLARE_WW8EXPORT_TEST(testFdo53985, "fdo53985.doc")
 uno::Reference xSect(xSections->getByIndex(0), 
uno::UNO_QUERY);
 CPPUNIT_ASSERT_EQUAL_MESSAGE("Section1 is protected", true, 
getProperty(xSect, "IsProtected"));
 xSect.set(xSections->getByIndex(3), uno::UNO_QUERY);
-if ( !mbExported )
 CPPUNIT_ASSERT_EQUAL_MESSAGE("Section4 is protected", false, 
getProperty(xSect, "IsProtected"));
 }
 
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx 
b/sw/source/filter/ww8/wrtw8sty.cxx
index 30a8b68d6145..c1eb9f8cdf4c 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -1530,9 +1530,7 @@ void MSWordExportBase::SectionProperties( const 
WW8_SepInfo& rSepInfo, WW8_PdAtt
 AttrOutput().SectFootnoteEndnotePr();
 
 // forms
-bool formProtection = m_pDoc->getIDocumentSettingAccess().get( 
DocumentSettingId::PROTECT_FORM );
-formProtection |= rSepInfo.IsProtected();
-AttrOutput().SectionFormProtection( formProtection );
+AttrOutput().SectionFormProtection( rSepInfo.IsProtected() );
 
 // line numbers
 const SwLineNumberInfo& rLnNumInfo = m_pDoc->GetLineNumberInfo();
commit 587527b4738e1f99e49959a

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3-desktop' - 2 commits - configure.ac scripting/source

2018-10-20 Thread Libreoffice Gerrit user
 configure.ac|2 +-
 scripting/source/pyprov/pythonscript.py |   30 --
 2 files changed, 29 insertions(+), 3 deletions(-)

New commits:
commit 6201ab17a66ce552e0a0d647a4c04ad64d3dd56b
Author: Andras Timar 
AuthorDate: Sat Oct 20 23:23:17 2018 +0200
Commit: Andras Timar 
CommitDate: Sat Oct 20 23:23:17 2018 +0200

Bump version to 5.3-58

Change-Id: I466c8a5c7ac025751179f3eca6d4223589abad4a

diff --git a/configure.ac b/configure.ac
index 0df4964221eb..7b11377cad1a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([Collabora Office],[5.3.10.57],[],[],[https://collaboraoffice.com/])
+AC_INIT([Collabora Office],[5.3.10.58],[],[],[https://collaboraoffice.com/])
 
 AC_PREREQ([2.59])
 
commit a9d81dd30d809b9c5ce2d3e4752039f19be70494
Author: Caolán McNamara 
AuthorDate: Thu Oct 18 20:39:23 2018 +0100
Commit: Andras Timar 
CommitDate: Sat Oct 20 23:22:37 2018 +0200

keep pyuno script processing below base uri

Change-Id: Icc13fb7193fb1e7c50e0df286161a10b4ed636c7
Reviewed-on: https://gerrit.libreoffice.org/61969
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit b1c85cdb37a47998f8ab135fbc96f186334b171c)

diff --git a/scripting/source/pyprov/pythonscript.py 
b/scripting/source/pyprov/pythonscript.py
index e312c6a52fbf..a2c9e70f9d54 100644
--- a/scripting/source/pyprov/pythonscript.py
+++ b/scripting/source/pyprov/pythonscript.py
@@ -25,6 +25,7 @@ import imp
 import time
 import ast
 import platform
+from com.sun.star.uri.RelativeUriExcessParentSegments import RETAIN
 
 try:
 unicode
@@ -212,8 +213,33 @@ class MyUriHelper:
 
 def scriptURI2StorageUri( self, scriptURI ):
 try:
-myUri = self.m_uriRefFac.parse(scriptURI)
-ret = self.m_baseUri + "/" + myUri.getName().replace( "|", "/" )
+# base path to the python script location
+sBaseUri = self.m_baseUri + "/"
+xBaseUri = self.m_uriRefFac.parse(sBaseUri)
+
+# path to the .py file + "$functionname, arguments, etc
+xStorageUri = self.m_uriRefFac.parse(scriptURI)
+sStorageUri = xStorageUri.getName().replace( "|", "/" );
+
+# path to the .py file, relative to the base
+sFileUri = sStorageUri[0:sStorageUri.find("$")]
+xFileUri = self.m_uriRefFac.parse(sFileUri)
+if not xFileUri:
+message = "pythonscript: invalid relative uri '" + sFileUri+ 
"'"
+log.debug( message )
+raise RuntimeException( message )
+
+# absolute path to the .py file
+xAbsScriptUri = self.m_uriRefFac.makeAbsolute(xBaseUri, xFileUri, 
True, RETAIN)
+sAbsScriptUri = xAbsScriptUri.getUriReference()
+
+# ensure py file is under the base path
+if not sAbsScriptUri.startswith(sBaseUri):
+message = "pythonscript: storage uri '" + sAbsScriptUri + "' 
not in base uri '" + self.m_baseUri + "'"
+log.debug( message )
+raise RuntimeException( message )
+
+ret = sBaseUri + sStorageUri
 log.debug( "converting scriptURI="+scriptURI + " to storageURI=" + 
ret )
 return ret
 except UnoException as e:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-20 Thread Libreoffice Gerrit user
 winaccessibility/source/UAccCOM/AccTable.cxx |7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit cc21f1ab22328ddf2bd82a77d81dbee69c847e5e
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 14:11:56 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 21:51:46 2018 +0200

dubious SysAllocString check

Change-Id: I1aece8321b12351b5e8a2d5c33e513531cbc95a1
Reviewed-on: https://gerrit.libreoffice.org/62007
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/winaccessibility/source/UAccCOM/AccTable.cxx 
b/winaccessibility/source/UAccCOM/AccTable.cxx
index dcd4ad2d65d7..6a872b277dc0 100644
--- a/winaccessibility/source/UAccCOM/AccTable.cxx
+++ b/winaccessibility/source/UAccCOM/AccTable.cxx
@@ -132,9 +132,9 @@ STDMETHODIMP CAccTable::get_columnDescription(long column, 
BSTR * description)
 const ::rtl::OUString& ouStr = 
GetXInterface()->getAccessibleColumnDescription(column);
 // #CHECK#
 
-SAFE_SYSFREESTRING(*description);//??
+SAFE_SYSFREESTRING(*description);
 *description = SysAllocString(o3tl::toW(ouStr.getStr()));
-if(description==nullptr)
+if (*description==nullptr)
 return E_FAIL;
 return S_OK;
 
@@ -353,9 +353,8 @@ STDMETHODIMP CAccTable::get_rowDescription(long row, BSTR * 
description)
 
 SAFE_SYSFREESTRING(*description);
 *description = SysAllocString(o3tl::toW(ouStr.getStr()));
-if(description==nullptr)
+if (*description==nullptr)
 return E_FAIL;
-
 return S_OK;
 
 LEAVE_PROTECTED_BLOCK
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-20 Thread Libreoffice Gerrit user
 winaccessibility/source/UAccCOM/MAccessible.cxx |   52 
 winaccessibility/source/UAccCOM/MAccessible.h   |8 +--
 2 files changed, 32 insertions(+), 28 deletions(-)

New commits:
commit 9f8f804f089a40fc2fc0b43690a4b9d529217d32
Author: Mike Kaganski 
AuthorDate: Sat Oct 20 14:51:58 2018 +0200
Commit: Mike Kaganski 
CommitDate: Sat Oct 20 21:39:48 2018 +0200

tdf#120703 (PVS)

V745 A 'wchar_t *' type string is incorrectly converted to 'BSTR' type 
string.
 Consider using 'SysAllocString' function.

V560 A part of conditional expression is always false: !ppdispParent.

V595 The 'm_pIParent' pointer was utilized before it was verified against 
nullptr.
 Check lines: 673, 675.

V745 A 'wchar_t *' type string is incorrectly converted to 'BSTR' type 
string.
 Consider using 'SysAllocString' function.

V530 The return value of function 'SysAllocString' is required to be 
utilized.

V1032 The pointer '& pChildXAcc' is cast to a more strictly aligned pointer
 type.

V512 A call of the 'GetUNOInterface' function will lead to overflow of the 
buffer
 '& pChildXAcc'.

V547 Expression 'pSeq' is always true.

V547 Expression 'pChild' is always true.

V512 A call of the 'GetUNOInterface' function will lead to overflow of the 
buffer
 '& pTempUNO'.

V1032 The pointer '& pTempUNO' is cast to a more strictly aligned pointer 
type.

V716 Suspicious type conversion in return statement: returned HRESULT, but 
function
 actually returns BOOL.

Change-Id: I2185992dad0127144416783e25476d05c0365b74
Reviewed-on: https://gerrit.libreoffice.org/62075
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx 
b/winaccessibility/source/UAccCOM/MAccessible.cxx
index 1801cf61929e..8c7f4fa6aec1 100644
--- a/winaccessibility/source/UAccCOM/MAccessible.cxx
+++ b/winaccessibility/source/UAccCOM/MAccessible.cxx
@@ -195,23 +195,19 @@ CMAccessible::~CMAccessible()
 if(m_pszName!=nullptr)
 {
 SAFE_SYSFREESTRING(m_pszName);
-m_pszName=nullptr;
 }
 if(m_pszValue!=nullptr)
 {
 SAFE_SYSFREESTRING(m_pszValue);
-m_pszValue=nullptr;
 }
 if(m_pszDescription!=nullptr)
 {
 SAFE_SYSFREESTRING(m_pszDescription);
-m_pszDescription=nullptr;
 }
 
 if(m_pszActionDescription!=nullptr)
 {
 SAFE_SYSFREESTRING(m_pszActionDescription);
-m_pszActionDescription=nullptr;
 }
 
 if(m_pIParent)
@@ -252,7 +248,7 @@ STDMETHODIMP CMAccessible::get_accParent(IDispatch 
**ppdispParent)
 else if(m_hwnd)
 {
 HRESULT hr = AccessibleObjectFromWindow(m_hwnd, OBJID_WINDOW, 
IID_IAccessible, reinterpret_cast(ppdispParent));
-if( ! SUCCEEDED( hr ) || ! ppdispParent )
+if (!SUCCEEDED(hr) || !*ppdispParent)
 {
 return S_FALSE;
 }
@@ -671,9 +667,9 @@ STDMETHODIMP CMAccessible::get_accKeyboardShortcut(VARIANT 
varChild, BSTR *pszKe
 VARIANT varParentRole;
 VariantInit( &varParentRole );
 
-m_pIParent->get_accRole(varChild, &varParentRole);
-
-if( m_pIParent && varParentRole.lVal == 
ROLE_SYSTEM_COMBOBOX ) // edit in comboBox
+if (m_pIParent
+&& SUCCEEDED(m_pIParent->get_accRole(varChild, 
&varParentRole))
+&& varParentRole.lVal == ROLE_SYSTEM_COMBOBOX) 
// edit in comboBox
 {
 m_pIParent->get_accKeyboardShortcut(varChild, 
pszKeyboardShortcut);
 return S_OK;
@@ -1436,7 +1432,10 @@ IMAccessible* 
CMAccessible::GetNavigateChildForDM(VARIANT varCur, short flags)
 }
 
 IMAccessible* pCurChild = nullptr;
-XAccessible* pChildXAcc = nullptr;
+union {
+XAccessible* pChildXAcc;
+hyper nHyper = 0;
+};
 Reference pRChildXAcc;
 XAccessibleContext* pChildContext = nullptr;
 int index = 0,delta=0;
@@ -1455,7 +1454,7 @@ IMAccessible* CMAccessible::GetNavigateChildForDM(VARIANT 
varCur, short flags)
 {
 return nullptr;
 }
-pCurChild->GetUNOInterface(reinterpret_cast(&pChildXAcc));
+pCurChild->GetUNOInterface(&nHyper);
 if(pChildXAcc==nullptr)
 {
 return nullptr;
@@ -1907,12 +1906,11 @@ STDMETHODIMP CMAccessible:: get_groupPosition(long 
__RPC_FAR *groupLevel,long __
 if ( xGroupPosition.is() )
 {
 Sequence< sal_Int32 > rSeq = xGroupPosition->getGroupPosition( 
makeAny( pRContext ) );
-sal_Int32* pSeq = rSeq.getArray();
-if ( pSeq )
+if (rSeq.getLeng

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

2018-10-20 Thread Libreoffice Gerrit user
 sfx2/source/doc/sfxbasemodel.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f93e29fe7e1207825520b145d8b6c48c958d2ab7
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 17:45:01 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 21:23:00 2018 +0200

const this up

Change-Id: I878ba62345925a8396b0b2a5f38f069148c8a6b5
Reviewed-on: https://gerrit.libreoffice.org/62071
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index e29eb13f37e1..c1953d91739c 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -2101,7 +2101,7 @@ Sequence< datatransfer::DataFlavor > SAL_CALL 
SfxBaseModel::getTransferDataFlavo
 {
 SfxModelGuard aGuard( *this );
 
-sal_Int32 nSuppFlavors = GraphicHelper::supportsMetaFileHandle_Impl() ? 10 
: 8;
+const sal_Int32 nSuppFlavors = 
GraphicHelper::supportsMetaFileHandle_Impl() ? 10 : 8;
 Sequence< datatransfer::DataFlavor > aFlavorSeq( nSuppFlavors );
 
 aFlavorSeq[0].MimeType =
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-20 Thread Libreoffice Gerrit user
 svl/source/svdde/ddesvr.cxx |   23 ---
 1 file changed, 4 insertions(+), 19 deletions(-)

New commits:
commit aa3b2f90a62678c8e594830277a32e3ad742e826
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 17:42:40 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 20:47:29 2018 +0200

result of DdeQueryStringW unused

since

commit 88e3b846b8a4bd4ce5507d1bc5441ee4167e5326
Date:   Wed Apr 6 11:28:44 2016 +0200

remove some dead bits of DDE

Change-Id: I66b2f8365e3fed15391ff0fe2eb3c874b5054e91
Reviewed-on: https://gerrit.libreoffice.org/62070
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx
index e79f26063237..1848342b893b 100644
--- a/svl/source/svdde/ddesvr.cxx
+++ b/svl/source/svdde/ddesvr.cxx
@@ -356,29 +356,14 @@ DdeTopic* DdeInternal::FindTopic( DdeService& rService, 
HSZ hTopic )
 {
 std::vector::iterator iter;
 std::vector &rTopics = rService.aTopics;
-bool bContinue = false;
 DdeInstData* pInst = ImpGetInstData();
 assert(pInst);
 
-do
-{   // middle check loop
-for ( iter = rTopics.begin(); iter != rTopics.end(); ++iter )
-{
-if ( *(*iter)->pName == hTopic )
-return *iter;
-}
-
-bContinue = !bContinue;
-if( !bContinue )
-break;
-
-// Let's query our subclass
-WCHAR chBuf[250];
-
DdeQueryStringW(pInst->hDdeInstSvr,hTopic,chBuf,SAL_N_ELEMENTS(chBuf),CP_WINUNICODE
 );
-bContinue = false;
-// We need to search again
+for ( iter = rTopics.begin(); iter != rTopics.end(); ++iter )
+{
+if ( *(*iter)->pName == hTopic )
+return *iter;
 }
-while( bContinue );
 
 return nullptr;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-20 Thread Libreoffice Gerrit user
 winaccessibility/source/service/AccObject.cxx |   92 --
 1 file changed, 43 insertions(+), 49 deletions(-)

New commits:
commit 974f3183221130bfdf93eb8821539a5554909e5c
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 17:26:48 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 20:28:20 2018 +0200

pvs-studio: pointer was utilized before it was verified against nullptr

Change-Id: Ib677c60019f7ce7d26809e50489f04a457b4c224
Reviewed-on: https://gerrit.libreoffice.org/62066
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/winaccessibility/source/service/AccObject.cxx 
b/winaccessibility/source/service/AccObject.cxx
index abcaaf7c2a67..608a1978409c 100644
--- a/winaccessibility/source/service/AccObject.cxx
+++ b/winaccessibility/source/service/AccObject.cxx
@@ -872,43 +872,40 @@ void AccObject::UpdateState()
 
 short Role = m_accRole;
 
-if( m_pIMAcc )
+switch(m_accRole)
 {
-switch(m_accRole)
+case LABEL:
+case STATIC:
+m_pIMAcc->IncreaseState( STATE_SYSTEM_READONLY );
+break;
+case TEXT:
+// 2. editable combobox -> readonly -- bridge
+case EMBEDDED_OBJECT:
+case END_NOTE:
+case FOOTER:
+case FOOTNOTE:
+case GRAPHIC:
+case HEADER:
+case HEADING:
+
+//Image Map
+case PARAGRAPH:
+case PASSWORD_TEXT:
+case SHAPE:
+case SPIN_BOX:
+case TABLE:
+case TABLE_CELL:
+case TEXT_FRAME:
+case DATE_EDITOR:
+case DOCUMENT:
+case COLUMN_HEADER:
 {
-case LABEL:
-case STATIC:
-m_pIMAcc->IncreaseState( STATE_SYSTEM_READONLY );
-break;
-case TEXT:
-// 2. editable combobox -> readonly -- bridge
-case EMBEDDED_OBJECT:
-case END_NOTE:
-case FOOTER:
-case FOOTNOTE:
-case GRAPHIC:
-case HEADER:
-case HEADING:
-
-//Image Map
-case PARAGRAPH:
-case PASSWORD_TEXT:
-case SHAPE:
-case SPIN_BOX:
-case TABLE:
-case TABLE_CELL:
-case TEXT_FRAME:
-case DATE_EDITOR:
-case DOCUMENT:
-case COLUMN_HEADER:
-{
-if(!isEditable)
-m_pIMAcc->IncreaseState( STATE_SYSTEM_READONLY );
-}
-break;
-default:
-break;
+if(!isEditable)
+m_pIMAcc->IncreaseState( STATE_SYSTEM_READONLY );
 }
+break;
+default:
+break;
 }
 
 if( isEnable )
@@ -970,24 +967,21 @@ void AccObject::UpdateState()
 }
 }
 
-if( m_pIMAcc )
+switch(m_accRole)
 {
-switch(m_accRole)
-{
-case POPUP_MENU:
-case MENU:
-if( pContext->getAccessibleChildCount() > 0 )
-m_pIMAcc->IncreaseState( STATE_SYSTEM_HASPOPUP );
-break;
-case PASSWORD_TEXT:
-m_pIMAcc->IncreaseState( STATE_SYSTEM_PROTECTED );
-break;
-default:
-break;
-}
+case POPUP_MENU:
+case MENU:
+if( pContext->getAccessibleChildCount() > 0 )
+m_pIMAcc->IncreaseState( STATE_SYSTEM_HASPOPUP );
+break;
+case PASSWORD_TEXT:
+m_pIMAcc->IncreaseState( STATE_SYSTEM_PROTECTED );
+break;
+default:
+break;
 }
-
 }
+
 /**
* update location information from uno to com
* @param
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-20 Thread Libreoffice Gerrit user
 winaccessibility/source/service/AccDescendantManagerEventListener.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a8a0d0fa151aee294fc3744c6fbc0729b2a7bcee
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 17:32:06 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 20:28:03 2018 +0200

pvs-studio: pointer was utilized before it was verified against nullptr

Change-Id: I601d30f8222f7c666eab4727c84e612484e01eed
Reviewed-on: https://gerrit.libreoffice.org/62067
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git 
a/winaccessibility/source/service/AccDescendantManagerEventListener.cxx 
b/winaccessibility/source/service/AccDescendantManagerEventListener.cxx
index 3f865cd2e27d..c8fc771ae503 100644
--- a/winaccessibility/source/service/AccDescendantManagerEventListener.cxx
+++ b/winaccessibility/source/service/AccDescendantManagerEventListener.cxx
@@ -183,7 +183,7 @@ bool 
AccDescendantManagerEventListener::NotifyChildEvent(short nWinEvent,const A
 XAccessible* pAcc = xChild.get();
 pAgent->NotifyAccEvent(nWinEvent, pAcc);
 
-if (pAgent && pAgent->IsStateManageDescendant(m_xAccessible.get())
+if (pAgent->IsStateManageDescendant(m_xAccessible.get())
 && (nWinEvent == UM_EVENT_SELECTION_CHANGED_REMOVE))
 {
 pAgent->DeleteAccObj( pAcc );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-20 Thread Libreoffice Gerrit user
 vcl/win/gdi/gdiimpl.cxx |   11 ---
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit 5d0b961b1962474fd5c5be9a6a064114a710bc1b
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 17:34:39 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 19:55:51 2018 +0200

use std::unique_ptr

Change-Id: I8645d1d0776f7b7f2cd6e6d18f387210c6e126d9
Reviewed-on: https://gerrit.libreoffice.org/62068
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx
index 3962c4d4a52d..1ba590cc803e 100644
--- a/vcl/win/gdi/gdiimpl.cxx
+++ b/vcl/win/gdi/gdiimpl.cxx
@@ -579,14 +579,14 @@ void ImplDrawBitmap( HDC hDC, const SalTwoRect& rPosAry, 
const WinSalBitmap& rSa
 {
 HGLOBAL hDrawDIB;
 HBITMAP hDrawDDB = rSalBitmap.ImplGethDDB();
-WinSalBitmap*   pTmpSalBmp = nullptr;
+std::unique_ptr xTmpSalBmp;
 boolbPrintDDB = ( bPrinter && hDrawDDB );
 
 if( bPrintDDB )
 {
-pTmpSalBmp = new WinSalBitmap;
-pTmpSalBmp->Create( rSalBitmap, rSalBitmap.GetBitCount() );
-hDrawDIB = pTmpSalBmp->ImplGethDIB();
+xTmpSalBmp.reset(new WinSalBitmap);
+xTmpSalBmp->Create( rSalBitmap, rSalBitmap.GetBitCount() );
+hDrawDIB = xTmpSalBmp->ImplGethDIB();
 }
 else
 hDrawDIB = rSalBitmap.ImplGethDIB();
@@ -670,9 +670,6 @@ void ImplDrawBitmap( HDC hDC, const SalTwoRect& rPosAry, 
const WinSalBitmap& rSa
 
 ImplReleaseCachedDC( CACHED_HDC_DRAW );
 }
-
-if( bPrintDDB )
-delete pTmpSalBmp;
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - xmloff/source xmlsecurity/source

2018-10-20 Thread Libreoffice Gerrit user
 xmloff/source/style/xmlexppr.cxx   |6 ---
 xmloff/source/style/xmlnumfe.cxx   |8 ++--
 xmloff/source/style/xmlnumfi.cxx   |   32 ++---
 xmloff/source/style/xmlnumi.cxx|5 --
 xmloff/source/text/txtparai.cxx|   10 ++---
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx |7 +--
 6 files changed, 25 insertions(+), 43 deletions(-)

New commits:
commit 2efbeea3f2625f62e08e78789de25ca5783d5e5d
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 16:39:06 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 19:54:20 2018 +0200

pvs-studio: loop-variable-too-small

Change-Id: Ie4aafecd17cf53ab3cbab2003b59da374d06e06b
Reviewed-on: https://gerrit.libreoffice.org/62058
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx
index 4f8292ed26dd..5cb4f9b02e1d 100644
--- a/xmloff/source/style/xmlexppr.cxx
+++ b/xmloff/source/style/xmlexppr.cxx
@@ -999,13 +999,9 @@ void SvXMLExportPropertyMapper::exportElementItems(
 SvXmlExportFlags nFlags,
 const std::vector& rIndexArray ) const
 {
-const sal_uInt16 nCount = rIndexArray.size();
-
 bool bItemsExported = false;
-for( sal_uInt16 nIndex = 0; nIndex < nCount; nIndex++ )
+for (const sal_uInt16 nElement : rIndexArray)
 {
-const sal_uInt16 nElement = rIndexArray[nIndex];
-
 OSL_ENSURE( 0 != (mpImpl->mxPropMapper->GetEntryFlags(
 rProperties[nElement].mnIndex ) & 
MID_FLAG_ELEMENT_ITEM_EXPORT),
 "wrong mid flag!" );
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index b83ae01fb358..81df9f5262a9 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -601,8 +601,8 @@ void SvXMLNumFmtExport::WriteNumberElement_Impl(
 
 //  number:embedded-text as child elements
 
-sal_uInt16 nEntryCount = rEmbeddedEntries.size();
-for (sal_uInt16 nEntry=0; nEntryaName == rName )
-return pObj->nKey;  // found
+if (rObj.aName == rName)
+return rObj.nKey;  // found
 }
 return NUMBERFORMAT_ENTRY_NOT_FOUND;
 }
@@ -373,11 +371,9 @@ void SvXMLNumImpData::AddKey( sal_uInt32 nKey, const 
OUString& rName, bool bRemo
 //  if there is already an entry for this key without the 
bRemoveAfterUse flag,
 //  clear the flag for this entry, too
 
-sal_uInt16 nCount = m_NameEntries.size();
-for (sal_uInt16 i=0; inKey == nKey && !pObj->bRemoveAfterUse )
+if (rObj.nKey == nKey && !rObj.bRemoveAfterUse)
 {
 bRemoveAfterUse = false;// clear flag for new entry
 break;
@@ -395,13 +391,11 @@ void SvXMLNumImpData::AddKey( sal_uInt32 nKey, const 
OUString& rName, bool bRemo
 
 void SvXMLNumImpData::SetUsed( sal_uInt32 nKey )
 {
-sal_uInt16 nCount = m_NameEntries.size();
-for (sal_uInt16 i=0; inKey == nKey )
+if (rObj.nKey == nKey)
 {
-pObj->bRemoveAfterUse = false;  // used -> don't remove
+rObj.bRemoveAfterUse = false;  // used -> don't remove
 
 //  continue searching - there may be several entries for the same 
key
 //  (with different names), the format must not be deleted if any 
one of
@@ -419,15 +413,13 @@ void SvXMLNumImpData::RemoveVolatileFormats()
 if ( !pFormatter )
 return;
 
-sal_uInt16 nCount = m_NameEntries.size();
-for (sal_uInt16 i=0; ibRemoveAfterUse )
+if (rObj.bRemoveAfterUse )
 {
-const SvNumberformat* pFormat = pFormatter->GetEntry(pObj->nKey);
+const SvNumberformat* pFormat = pFormatter->GetEntry(rObj.nKey);
 if (pFormat && (pFormat->GetType() & SvNumFormatType::DEFINED))
-pFormatter->DeleteEntry( pObj->nKey );
+pFormatter->DeleteEntry(rObj.nKey);
 }
 }
 }
diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx
index 3b60ce724f19..6b36f2edccd2 100644
--- a/xmloff/source/style/xmlnumi.cxx
+++ b/xmloff/source/style/xmlnumi.cxx
@@ -1062,12 +1062,9 @@ void SvxXMLListStyleContext::FillUnoNumRule(
 {
 if( pLevelStyles && rNumRule.is() )
 {
-sal_uInt16 nCount = pLevelStyles->size();
 sal_Int32 l_nLevels = rNumRule->getCount();
-for( sal_uInt16 i=0; i < nCount; i++ )
+for (const auto& pLevelStyle : *pLevelStyles)
 {
-SvxXMLListLevelStyleContext_Impl *pLevelStyle =
-(*pLevelStyles)[i].get();
 sal_Int32 nLevel = pLevelStyle->GetLevel();
 if( nLevel >= 0 && nLevel < l_nLevels )
 {
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/

[Libreoffice-commits] core.git: 2 commits - winaccessibility/source xmloff/source

2018-10-20 Thread Libreoffice Gerrit user
 winaccessibility/source/UAccCOM/MAccessible.cxx |7 +--
 xmloff/source/style/numehelp.cxx|   14 --
 2 files changed, 9 insertions(+), 12 deletions(-)

New commits:
commit f90c2001eb8f6d41e90fa347bf5a707bbefb6f43
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 16:55:19 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 19:53:39 2018 +0200

pvs-studio: Expression '!bWasSetTypeAttribute' is always true.

Change-Id: I605bbc117426bba3dae9a8ec3ffc45967edbf7c4
Reviewed-on: https://gerrit.libreoffice.org/62060
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/xmloff/source/style/numehelp.cxx b/xmloff/source/style/numehelp.cxx
index b678d559a277..db9e1d8dac6e 100644
--- a/xmloff/source/style/numehelp.cxx
+++ b/xmloff/source/style/numehelp.cxx
@@ -105,11 +105,8 @@ void 
XMLNumberFormatAttributesExportHelper::WriteAttributes(SvXMLExport& rXMLExp
 case util::NumberFormat::SCIENTIFIC:
 case util::NumberFormat::FRACTION:
 {
-if (!bWasSetTypeAttribute)
-{
-rXMLExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, 
XML_FLOAT);
-bWasSetTypeAttribute = true;
-}
+rXMLExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, 
XML_FLOAT);
+bWasSetTypeAttribute = true;
 SAL_FALLTHROUGH;
 }
 case util::NumberFormat::PERCENT:
@@ -374,11 +371,8 @@ void 
XMLNumberFormatAttributesExportHelper::WriteAttributes(
 case util::NumberFormat::SCIENTIFIC:
 case util::NumberFormat::FRACTION:
 {
-if (!bWasSetTypeAttribute)
-{
-pExport->AddAttribute(sAttrValType, XML_FLOAT);
-bWasSetTypeAttribute = true;
-}
+pExport->AddAttribute(sAttrValType, XML_FLOAT);
+bWasSetTypeAttribute = true;
 SAL_FALLTHROUGH;
 }
 case util::NumberFormat::PERCENT:
commit c2b33fec70f0f4c79584db119ecd565af3a5b28e
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 17:22:42 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 19:53:27 2018 +0200

pvs-studio: 'memcpy' function will lead to underflow of the buffer

Change-Id: I285d5ddcc8906d1e38c6b58c625dc7c894ad433a
Reviewed-on: https://gerrit.libreoffice.org/62064
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx 
b/winaccessibility/source/UAccCOM/MAccessible.cxx
index 0a75d9a4e5a8..1801cf61929e 100644
--- a/winaccessibility/source/UAccCOM/MAccessible.cxx
+++ b/winaccessibility/source/UAccCOM/MAccessible.cxx
@@ -2898,10 +2898,13 @@ void CMAccessible::ConvertAnyToVariant(const 
css::uno::Any &rAnyVal, VARIANT *pv
 break;
 
 case TypeClass_BOOLEAN:
+{
+bool bBoolean(false);
+rAnyVal >>= bBoolean;
 pvData->vt = VT_BOOL;
-memcpy(&pvData->boolVal, rAnyVal.getValue(), sizeof(sal_Bool));
+pvData->boolVal = bBoolean; // boolVal is a VARIANT_BOOL, a 16bit 
field
 break;
-
+}
 case TypeClass_BYTE:
 pvData->vt = VT_UI1;
 memcpy(&pvData->bVal, rAnyVal.getValue(), sizeof(sal_Int8));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - xmloff/source xmlsecurity/source

2018-10-20 Thread Libreoffice Gerrit user
 xmloff/source/style/xmlimppr.cxx |2 +-
 xmlsecurity/source/xmlsec/mscrypt/akmngr.cxx |8 
 2 files changed, 1 insertion(+), 9 deletions(-)

New commits:
commit 0b8682d83e9e5a9832383aff011af5429ddd7e71
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 16:15:01 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 19:52:52 2018 +0200

pvs-studio: Expression 'keyStore != nullptr' is always true.

Change-Id: I70a78f731a01f3344bf6c874995d367d26bf2397
Reviewed-on: https://gerrit.libreoffice.org/62052
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/xmlsecurity/source/xmlsec/mscrypt/akmngr.cxx 
b/xmlsecurity/source/xmlsec/mscrypt/akmngr.cxx
index aafd7d10a66c..4054777afa1e 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/akmngr.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/akmngr.cxx
@@ -55,14 +55,6 @@ xmlSecKeysMngrPtr MSCryptoAppliedKeysMngrCreate()
 return nullptr ;
 }
 
-/*-
- * At present, MS Crypto engine do not provide a way to setup a key store.
- */
-if (keyStore != nullptr)
-{
-/*TODO: binding key store.*/
-}
-
 keyMngr = xmlSecKeysMngrCreate() ;
 if (keyMngr == nullptr)
 {
commit 5fa9076a2926b2a54f001f78eea5ce0183466b61
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 16:50:50 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 19:52:38 2018 +0200

pvs-studio: An excessive check can be simplified

Change-Id: Idaa511d4ccf3d8542bdf6a1dcee4fa54c6d2315f
Reviewed-on: https://gerrit.libreoffice.org/62059
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx
index 8ebaa88d3fde..f14e64628618 100644
--- a/xmloff/source/style/xmlimppr.cxx
+++ b/xmloff/source/style/xmlimppr.cxx
@@ -585,7 +585,7 @@ void SvXMLImportPropertyMapper::PrepareForMultiPropertySet_(
 if ( ( 0 == ( nPropFlags & MID_FLAG_NO_PROPERTY ) ) &&
  ( ( 0 != ( nPropFlags & MID_FLAG_MUST_EXIST ) ) ||
!rPropSetInfo.is() ||
-   (rPropSetInfo.is() && rPropSetInfo->hasPropertyByName( 
rPropName )) ) )
+   rPropSetInfo->hasPropertyByName(rPropName) ) )
 {
 // save property into property pair structure
 aPropertyPairs.emplace_back( &rPropName, &rProp.maValue );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - xmloff/source xmlsecurity/source

2018-10-20 Thread Libreoffice Gerrit user
 xmloff/source/text/txtparae.cxx   |4 ++--
 xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx |5 -
 2 files changed, 2 insertions(+), 7 deletions(-)

New commits:
commit 014dec7fea06189d79c635e8df35e1f48edf7ef5
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 16:36:44 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 19:52:26 2018 +0200

pvs-studio: rework expression

Change-Id: Ibcbeef3eba53df790c1860e6e4066de67bdda0bc
Reviewed-on: https://gerrit.libreoffice.org/62057
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 95a3e89c6f2d..4d1d196189ed 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -654,7 +654,7 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily,
 ; // section styles have no parents
 break;
 }
-if( (aPropStates.size() - nIgnoreProps) > 0 )
+if (aPropStates.size() - nIgnoreProps)
 {
 GetAutoStylePool().Add( nFamily, sParent, aPropStates, bDontSeek );
 if( !sCondParent.isEmpty() && sParent != sCondParent )
@@ -848,7 +848,7 @@ OUString XMLTextParagraphExport::FindTextStyleAndHyperlink(
 ppAddStates++;
 }
 }
-if( (aPropStates.size() - nIgnoreProps) > 0 )
+if (aPropStates.size() - nIgnoreProps)
 {
 // erase the character style, otherwise the autostyle cannot be found!
 // erase the hyperlink, otherwise the autostyle cannot be found!
commit cdf8d7a1d88865b26cab11f01cc6307a4033f1dd
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 16:05:00 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 19:52:12 2018 +0200

pvs-studio: new does not return nullptr

Change-Id: I3ba9048a4563e7c8e6930ae67d5a076a829d6b81
Reviewed-on: https://gerrit.libreoffice.org/62049
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx 
b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
index b8783440ea10..d44d093641c1 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
@@ -369,8 +369,6 @@ css::uno::Sequence< css::uno::Reference< 
css::security::XCertificateExtension >
 xExtn = reinterpret_cast(new 
SanExtensionImpl());
 else
 xExtn = new CertificateExtension_XmlSecImpl;
-if( xExtn == nullptr )
-throw RuntimeException() ;
 
 xExtn->setCertExtn( pExtn->Value.pbData, pExtn->Value.cbData, 
reinterpret_cast(pExtn->pszObjId), strlen( pExtn->pszObjId ), 
pExtn->fCritical ) ;
 
@@ -394,9 +392,6 @@ css::uno::Reference< css::security::XCertificateExtension > 
SAL_CALL X509Certifi
 //TODO: Compare the oid
 if( false ) {
 xExtn = new CertificateExtension_XmlSecImpl;
-if( xExtn == nullptr )
-throw RuntimeException() ;
-
 xExtn->setCertExtn( pExtn->Value.pbData, pExtn->Value.cbData, 
reinterpret_cast(pExtn->pszObjId), strlen( pExtn->pszObjId ), 
pExtn->fCritical ) ;
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - xmlsecurity/source

2018-10-20 Thread Libreoffice Gerrit user
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx|   63 
--
 xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx |4 
 2 files changed, 33 insertions(+), 34 deletions(-)

New commits:
commit fc6dd83ba24a9fed9c61caddfba701d6835bc80c
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 16:13:27 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 19:51:39 2018 +0200

pvs-studio: Expression 'pCertContext' is always true.

Change-Id: Iefd9b082e44dc22e9bd7fb2856f44c8db6d8482f
Reviewed-on: https://gerrit.libreoffice.org/62051
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git 
a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx 
b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
index 2a545ba568b5..5e6dfcb93a99 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
@@ -589,8 +589,8 @@ uno::Reference< XCertificate > 
SecurityEnvironment_MSCryptImpl::getCertificate(
 if( certInfo.Issuer.pbData ) free( certInfo.Issuer.pbData ) ;
 
 if( pCertContext != nullptr ) {
-xcert = MswcryCertContextToXCert( pCertContext ) ;
-if( pCertContext ) CertFreeCertificateContext( pCertContext ) ;
+xcert = MswcryCertContextToXCert(pCertContext);
+CertFreeCertificateContext(pCertContext);
 } else {
 xcert = nullptr ;
 }
commit f9ccf6216022dcaf70bd01e51feb5c88b5f03731
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 16:22:08 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 19:51:27 2018 +0200

rework to check cPath against nullptr only on !WNT

Change-Id: Iaca0d47b07f4b31b70ddeccb87f0f84019be81cd
Reviewed-on: https://gerrit.libreoffice.org/62055
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx 
b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 61300fdf6156..98f9bd1da127 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -501,41 +501,40 @@ IMPL_STATIC_LINK(DigitalSignaturesDialog, 
CertMgrButtonHdl, Button*, pButton, vo
 #else
 const OUString aGUIServers[] = { OUString("kleopatra"), 
OUString("seahorse"),  OUString("gpa"), OUString("kgpg") };
 const char* cPath = getenv("PATH");
+if (!cPath)
+return;
 #endif
 
-if (cPath)
+OUString aPath(cPath, strlen(cPath), osl_getThreadTextEncoding());
+OUString sFoundGUIServer, sExecutable;
+
+for ( auto const &rServer : aGUIServers )
+{
+osl::FileBase::RC searchError = osl::File::searchFileURL(rServer, 
aPath, sFoundGUIServer );
+if (searchError == osl::FileBase::E_None)
+{
+osl::File::getSystemPathFromFileURL( sFoundGUIServer, sExecutable 
);
+break;
+}
+
+}
+
+if ( !sExecutable.isEmpty() )
+{
+uno::Reference< uno::XComponentContext > xContext =
+::comphelper::getProcessComponentContext();
+uno::Reference< css::system::XSystemShellExecute > xSystemShell(
+ css::system::SystemShellExecute::create(xContext) );
+
+xSystemShell->execute( sExecutable, OUString(),
+css::system::SystemShellExecuteFlags::DEFAULTS );
+}
+else
 {
-   OUString aPath(cPath, strlen(cPath), osl_getThreadTextEncoding());
-   OUString sFoundGUIServer, sExecutable;
-
-   for ( auto const &rServer : aGUIServers )
-   {
-   osl::FileBase::RC searchError = osl::File::searchFileURL(rServer, 
aPath, sFoundGUIServer );
-   if (searchError == osl::FileBase::E_None)
-   {
-   osl::File::getSystemPathFromFileURL( sFoundGUIServer, 
sExecutable );
-   break;
-   }
-
-   }
-
-   if ( !sExecutable.isEmpty() )
-   {
-   uno::Reference< uno::XComponentContext > xContext =
-   ::comphelper::getProcessComponentContext();
-   uno::Reference< css::system::XSystemShellExecute > xSystemShell(
-css::system::SystemShellExecute::create(xContext) );
-
-   xSystemShell->execute( sExecutable, OUString(),
-   css::system::SystemShellExecuteFlags::DEFAULTS );
-   }
-   else
-   {
-   std::unique_ptr 
xInfoBox(Application::CreateMessageDialog(pButton->GetFrameWeld(),
- VclMessageType::Info, 
VclButtonsType::Ok,
- 
XsResId(STR_XMLSECDLG_NO_CERT_MANAGER)));
-   xInfoBox->run();
-   }
+std::unique_ptr 
xInfoBox(Application::CreateMessageDialog(pButton->GetFrameWeld(),
+  VclMessageT

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

2018-10-20 Thread Libreoffice Gerrit user
 xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx |   10 
+++---
 1 file changed, 3 insertions(+), 7 deletions(-)

New commits:
commit 71c804a05eb07fa21482ca298486ed70c63907ad
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 16:10:45 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 19:51:53 2018 +0200

pvs-studio: The 'store' variable is assigned values twice successively.

Change-Id: I532bf99935c2f4d3b58f84013bc545791208
Reviewed-on: https://gerrit.libreoffice.org/62050
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git 
a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx 
b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
index 5e6dfcb93a99..4ba5ad8a4417 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
@@ -735,14 +735,12 @@ uno::Reference< XCertificate > 
SecurityEnvironment_MSCryptImpl::createCertificat
 }
 
 uno::Reference< XCertificate > 
SecurityEnvironment_MSCryptImpl::createCertificateFromAscii( const OUString& 
asciiCertificate ) {
-xmlChar* chCert ;
-xmlSecSize certSize ;
 
 OString oscert = OUStringToOString( asciiCertificate , 
RTL_TEXTENCODING_ASCII_US ) ;
 
-chCert = xmlStrndup( reinterpret_cast(oscert.getStr()), 
static_cast(oscert.getLength()) ) ;
+xmlChar* chCert = xmlStrndup( reinterpret_cast(oscert.getStr()), static_cast(oscert.getLength()) ) ;
 
-certSize = xmlSecBase64Decode( chCert, chCert, xmlStrlen( chCert ) ) ;
+xmlSecSize certSize = xmlSecBase64Decode( chCert, chCert, xmlStrlen( 
chCert ) ) ;
 
 uno::Sequence< sal_Int8 > rawCert( certSize ) ;
 for( xmlSecSize i = 0 ; i < certSize ; i ++ )
@@ -757,9 +755,7 @@ uno::Reference< XCertificate > 
SecurityEnvironment_MSCryptImpl::createCertificat
 static HCERTSTORE getCertStoreForIntermediatCerts(
 const uno::Sequence< uno::Reference< css::security::XCertificate > >& 
seqCerts)
 {
-HCERTSTORE store = nullptr;
-store = CertOpenStore(
-CERT_STORE_PROV_MEMORY, 0, NULL, 0, nullptr);
+HCERTSTORE store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, NULL, 0, 
nullptr);
 if (store == nullptr)
 return nullptr;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - xmlhelp/source xmlsecurity/source

2018-10-20 Thread Libreoffice Gerrit user
 xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx  |1 -
 xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx |   11 +--
 2 files changed, 5 insertions(+), 7 deletions(-)

New commits:
commit 83c82bbb73dec5e3ba82e81b09824cd223e575a7
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 16:18:35 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 19:51:14 2018 +0200

pvs-studio: A part of conditional expression is always true: bSigValid.

Change-Id: I4da53c79bb9e47548338d3e348677049e664bf8d
Reviewed-on: https://gerrit.libreoffice.org/62053
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx 
b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 6a5a5936c833..61300fdf6156 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -571,7 +571,6 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
 OUString aDescription;
 OUString aType;
 
-bool bSigValid = false;
 bool bCertValid = false;
 if( xCert.is() )
 {
@@ -622,7 +621,7 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
 aType = "PDF";
 }
 
-bSigValid = ( rInfo.nStatus == 
css::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED );
+bool bSigValid = rInfo.nStatus == 
css::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED;
 
 if ( bSigValid )
 {
@@ -638,7 +637,7 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
 {
 aImage = m_pSigsInvalidImg->GetImage();
 }
-else if (bSigValid && !bCertValid)
+else if (!bCertValid)
 {
 aImage = m_pSigsNotvalidatedImg->GetImage();
 }
@@ -647,20 +646,20 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
 // If there is no storage, then it's pointless to check storage
 // stream references.
 else if (maSignatureManager.meSignatureMode == 
DocumentSignatureMode::Content
-&& bSigValid && bCertValid && (maSignatureManager.mxStore.is() 
&& !DocumentSignatureHelper::isOOo3_2_Signature(
+&& bCertValid && (maSignatureManager.mxStore.is() && 
!DocumentSignatureHelper::isOOo3_2_Signature(
 maSignatureManager.maCurrentSignatureInformations[n])))
 {
 aImage = m_pSigsNotvalidatedImg->GetImage();
 bAllNewSignatures = false;
 }
 else if (maSignatureManager.meSignatureMode == 
DocumentSignatureMode::Content
-&& bSigValid && bCertValid && 
DocumentSignatureHelper::isOOo3_2_Signature(
+&& bCertValid && DocumentSignatureHelper::isOOo3_2_Signature(
 maSignatureManager.maCurrentSignatureInformations[n]))
 {
 aImage = m_pSigsValidImg->GetImage();
 }
 else if (maSignatureManager.meSignatureMode == 
DocumentSignatureMode::Macros
-&& bSigValid && bCertValid)
+&& bCertValid)
 {
 aImage = m_pSigsValidImg->GetImage();
 }
commit 5145882f8f33ce2588722ae7439fc47d1cdcaaf6
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 17:01:05 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 19:51:00 2018 +0200

pvs-studio: The 'aIndexFolderResultVector' variable is used after it was 
moved

Change-Id: I565f22594a371188c4a6eff5f405946ec1e04d95
Reviewed-on: https://gerrit.libreoffice.org/62061
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx 
b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
index 92e20e6049d0..66ccaf747696 100644
--- a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
+++ b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
@@ -237,7 +237,6 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< 
uno::XComponentConte
 }
 
 aIndexFolderResultVectorVector.push_back( 
std::move(aIndexFolderResultVector) );
-aIndexFolderResultVector.clear();
 }
 catch (const Exception &e)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: writerperfect/qa

2018-10-20 Thread Libreoffice Gerrit user
 writerperfect/qa/unit/EPUBExportTest.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 993d92d5cbb8f63a630ca615112a6abbefdf8a16
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 17:02:50 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 19:50:08 2018 +0200

pvs-studio: Possible overflow

Change-Id: Ifa213fd6b719683afae9633615f69db894cd9c18
Reviewed-on: https://gerrit.libreoffice.org/62062
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/writerperfect/qa/unit/EPUBExportTest.cxx 
b/writerperfect/qa/unit/EPUBExportTest.cxx
index ecca84410866..be8302dc520e 100644
--- a/writerperfect/qa/unit/EPUBExportTest.cxx
+++ b/writerperfect/qa/unit/EPUBExportTest.cxx
@@ -284,7 +284,7 @@ void EPUBExportTest::testMimetype()
 SvMemoryStream aMemoryStream;
 aMemoryStream.WriteStream(aFileStream);
 OString aExpected("application/epub+zip");
-CPPUNIT_ASSERT(aMemoryStream.GetSize() > static_cast(38 + 
aExpected.getLength()));
+CPPUNIT_ASSERT(aMemoryStream.GetSize() > 
static_cast(aExpected.getLength()) + 38);
 
 OString aActual(static_cast(aMemoryStream.GetData()) + 38, 
aExpected.getLength());
 // This failed: actual data was some garbage, not the uncompressed mime 
type.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-20 Thread Libreoffice Gerrit user
 winaccessibility/source/service/AccObject.cxx |6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

New commits:
commit 3421107a2bb5defc99a59fd0683a7b3014bc5444
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 17:24:16 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 19:49:52 2018 +0200

unused pUNumberString buffer

Change-Id: Ib17f5344b9bdf3710a49fc054dd96d5998e6b822
Reviewed-on: https://gerrit.libreoffice.org/62065
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/winaccessibility/source/service/AccObject.cxx 
b/winaccessibility/source/service/AccObject.cxx
index eabed2cc219b..abcaaf7c2a67 100644
--- a/winaccessibility/source/service/AccObject.cxx
+++ b/winaccessibility/source/service/AccObject.cxx
@@ -380,9 +380,6 @@ void AccObject::UpdateDefaultAction( )
*/
 void  AccObject::SetValue( Any pAny )
 {
-unsigned short pUNumberString[100];
-memset( pUNumberString, 0 , sizeof( pUNumberString) );
-
 if( nullptr == m_pIMAcc || !m_xAccContextRef.is() )
 {
 assert(false);
@@ -423,9 +420,8 @@ void  AccObject::SetValue( Any pAny )
 }
 
 return;
-
-
 }
+
 ::rtl::OUString AccObject::GetMAccessibleValueFromAny(Any pAny)
 {
 ::rtl::OUString strValue;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


After loplugin:staticvar in sw, Jenkins_Windows_Dbg failing

2018-10-20 Thread Luke Benes
After 
https://cgit.freedesktop.org/libreoffice/core/commit/?id=4ba5b003b594f9eb6c9b185208bdb72aef8273d0
loplugin:staticvar in sw

 Jenkins_Windows_Dbg failing with

9  NEXT
C:/cygwin/home/tdf/lode/jenkins/workspace/lo_tb_master_win_dbg/sw/source/filter/html/svxcss1.cxx(3166):
 error C2065: ´CSS1PropEntryCompare´: undeclared identifier
7049  NEXTmake: *** [Makefile:286: build] Error 2

https://tinderbox.libreoffice.org/cgi-bin/gunzip.cgi?tree=MASTER&brief-log=1540039069.23076
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


debug build breaks in sw/source/filter/html/svxcss1.cxx(3166): error C2065: "CSS1PropEntryCompare"

2018-10-20 Thread Oliver Brinzing

Hi,

i have a build break building master: 190a1394c2dd2aa338559c99a23ec3c62d29a2eb.

[...]
[CXX] sw/source/filter/html/wrthtml.cxx
[CXX] sw/source/filter/writer/writer.cxx
D:/sources/libo-core/sw/source/filter/html/svxcss1.cxx(3166): error C2065: 
"CSS1PropEntryCompare":
nicht deklarierter Bezeichner
make[1]: *** [D:/sources/libo-core/solenv/gbuild/LinkTarget.mk:291: 
D:/sources/libo-core/workdir/CxxObject/sw/source/filter/html/svxcss1.o] Error 2

make[1]: *** Waiting for unfinished jobs
make: *** [Makefile:286: build] Error 2

line 3166 assertion fails:
assert( std::is_sorted( std::begin(aCSS1PropFnTab), std::end(aCSS1PropFnTab), 
CSS1PropEntryCompare ) );

i build with "--enable-debug", but do not use "--enable-dbgutil"

code has changed a few hours ago
https://gerrit.libreoffice.org/gitweb?p=core.git;a=commitdiff;h=4ba5b003b594f9eb6c9b185208bdb72aef8273d0

Regards
Oliver

--

#ifdef DBG_UTIL
static bool CSS1PropEntryCompare( const CSS1PropEntry &lhs, const CSS1PropEntry 
&rhs)
{
return strcmp(lhs.pName, rhs.pName) < 0;
}
#endif

void SvxCSS1Parser::ParseProperty( const OUString& rProperty,
   const CSS1Expression *pExpr )
{
OSL_ENSURE( pItemSet, "DeclarationParsed() without ItemSet" );

static bool bSortedPropFns = false;

if( !bSortedPropFns )
{
assert( std::is_sorted( std::begin(aCSS1PropFnTab), 
std::end(aCSS1PropFnTab),
CSS1PropEntryCompare ) );
bSortedPropFns = true;
}

auto it = std::lower_bound( std::begin(aCSS1PropFnTab), 
std::end(aCSS1PropFnTab), rProperty,
CSS1PropEntryFindCompare );
if( it != std::end(aCSS1PropFnTab) && 
!CSS1PropEntryFindCompare(*it,rProperty)  )
{
it->pFunc( pExpr, *pItemSet, *pPropInfo, *this );
}
}
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


New Defects reported by Coverity Scan for LibreOffice

2018-10-20 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.
1 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent 
build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)


** CID 1440400:  Resource leaks  (CTOR_DTOR_LEAK)
/sw/source/uibase/dbui/mailmergehelper.cxx: 549 in 
AddressPreview::AddressPreview(std::unique_ptr>)()



*** CID 1440400:  Resource leaks  (CTOR_DTOR_LEAK)
/sw/source/uibase/dbui/mailmergehelper.cxx: 549 in 
AddressPreview::AddressPreview(std::unique_ptr>)()
543 }
544 return sAddress.makeStringAndClear();
545 }
546 
547 AddressPreview::AddressPreview(std::unique_ptr 
xWindow)
548 : m_xVScrollBar(std::move(xWindow))
>>> CID 1440400:  Resource leaks  (CTOR_DTOR_LEAK)
>>> Allocating memory by calling "new SwAddressPreview_Impl".
549 , pImpl(new SwAddressPreview_Impl())
550 {
551 m_xVScrollBar->set_user_managed_scrolling();
552 m_xVScrollBar->connect_vadjustment_changed(LINK(this, 
AddressPreview, ScrollHdl));
553 }
554 



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB72ibeUH-2F-2F1Lhi9AZq3dRu-2F4-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyfMvAD-2B4zVnyq0pz6UPDkb8dpFeaCou3K53ghLodOcIJ3KbY09rjje7p7AjGcZ4tNBeJlcauNAEMQJDABeB3jRzCMBCNyIYdWxA5PBkm4xeMdfNWHpT8JYajeWX2vSm5hqZ8eLlS0JrufJsWU4FYYRC4tOfBgwZyd1h7uDPS6VFI-3D

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - basic/source

2018-10-20 Thread Libreoffice Gerrit user
 basic/source/runtime/dllmgr-x64.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7951138541caabcd25fccaa8f9ebb0226ce2ce12
Author: Mike Kaganski 
AuthorDate: Fri Oct 19 14:54:28 2018 +0200
Commit: Eike Rathke 
CommitDate: Sat Oct 20 14:43:29 2018 +0200

tdf#120706: nullptr dereference

Change-Id: I55814a6b4cdfda93a51621b5b31c166507a7e7a6
Reviewed-on: https://gerrit.libreoffice.org/62005
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 49d304c4f6635381a27b60a8944744cc81ff1e91)
Reviewed-on: https://gerrit.libreoffice.org/62028
Reviewed-by: Eike Rathke 

diff --git a/basic/source/runtime/dllmgr-x64.cxx 
b/basic/source/runtime/dllmgr-x64.cxx
index 2c311861122a..85af90b53f79 100644
--- a/basic/source/runtime/dllmgr-x64.cxx
+++ b/basic/source/runtime/dllmgr-x64.cxx
@@ -475,7 +475,7 @@ ErrCode call(
 OUString const & dll, ProcData const & proc, SbxArray * arguments,
 SbxVariable & result)
 {
-if (arguments->Count() > 20)
+if (arguments && arguments->Count() > 20)
 return ERRCODE_BASIC_NOT_IMPLEMENTED;
 
 std::vector< char > stack;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: embeddedobj/source sw/source

2018-10-20 Thread Libreoffice Gerrit user
 embeddedobj/source/msole/oleembed.cxx |5 +
 sw/source/core/view/vnew.cxx  |8 
 2 files changed, 5 insertions(+), 8 deletions(-)

New commits:
commit 27b0d7237a7e2f32897fa52820c3aa382f6683e9
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 14:34:17 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 14:29:59 2018 +0200

clarify this code a little

Change-Id: I10a9f29add5cefa866cbe87e5c6164738ca57d04
Reviewed-on: https://gerrit.libreoffice.org/62019
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/embeddedobj/source/msole/oleembed.cxx 
b/embeddedobj/source/msole/oleembed.cxx
index 7f84b91ead18..72fb031d84a1 100644
--- a/embeddedobj/source/msole/oleembed.cxx
+++ b/embeddedobj/source/msole/oleembed.cxx
@@ -837,11 +837,8 @@ void SAL_CALL OleEmbeddedObject::doVerb( sal_Int32 nVerbID 
)
 uno::Reference< embed::XEmbeddedObject > xWrappedObject = m_xWrappedObject;
 if ( xWrappedObject.is() )
 {
-// open content in the window not in-place
-nVerbID = embed::EmbedVerbs::MS_OLEVERB_OPEN;
-
 // the object was converted to OOo embedded object, the current 
implementation is now only a wrapper
-xWrappedObject->doVerb( nVerbID );
+xWrappedObject->doVerb(embed::EmbedVerbs::MS_OLEVERB_OPEN); // open 
content in the window not in-place
 return;
 }
 // end wrapping related part 
diff --git a/sw/source/core/view/vnew.cxx b/sw/source/core/view/vnew.cxx
index f3ae2154993e..ba029c6c9f77 100644
--- a/sw/source/core/view/vnew.cxx
+++ b/sw/source/core/view/vnew.cxx
@@ -178,9 +178,9 @@ SwViewShell::SwViewShell( SwDoc& rDocument, vcl::Window 
*pWindow,
 // i#38810 Do not reset modified state of document,
 // if it's already been modified.
 const bool bIsDocModified( mxDoc->getIDocumentState().IsModified() );
-pOutput = mpOut;
+OutputDevice* pOrigOut = mpOut;
 Init( pNewOpt );// may change the Outdev (InitPrt())
-mpOut = pOutput;
+mpOut = pOrigOut;
 
 // initialize print preview layout after layout
 // is created in  - called above.
@@ -253,9 +253,9 @@ SwViewShell::SwViewShell( SwViewShell& rShell, vcl::Window 
*pWindow,
 
 bool bModified = mxDoc->getIDocumentState().IsModified();
 
-pOutput = mpOut;
+OutputDevice* pOrigOut = mpOut;
 Init( rShell.GetViewOptions() ); // might change Outdev (InitPrt())
-mpOut = pOutput;
+mpOut = pOrigOut;
 
 if ( mbPreview )
 mpImp->InitPagePreviewLayout();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-20 Thread Libreoffice Gerrit user
 include/vcl/graphicfilter.hxx|2 
 vcl/source/filter/graphicfilter2.cxx |   94 ---
 2 files changed, 46 insertions(+), 50 deletions(-)

New commits:
commit f0edf93fce53a726fec5167139513bc8420728e7
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 14:31:59 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 14:27:32 2018 +0200

ImpDetectPCX 2nd arg always overwritten

Change-Id: I0ec1e71d40c34f021003330c4dd0a8d5ee2b6ce2
Reviewed-on: https://gerrit.libreoffice.org/62018
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx
index d14ee7754699..fe084136ce5a 100644
--- a/include/vcl/graphicfilter.hxx
+++ b/include/vcl/graphicfilter.hxx
@@ -152,7 +152,7 @@ class VCL_DLLPUBLIC GraphicDescriptor final
 boolImpDetectGIF( SvStream& rStm, bool bExtendedInfo );
 boolImpDetectJPG( SvStream& rStm, bool bExtendedInfo );
 boolImpDetectPCD( SvStream& rStm, bool bExtendedInfo );
-boolImpDetectPCX( SvStream& rStm, bool bExtendedInfo );
+boolImpDetectPCX( SvStream& rStm );
 boolImpDetectPNG( SvStream& rStm, bool bExtendedInfo );
 boolImpDetectTIF( SvStream& rStm, bool bExtendedInfo );
 boolImpDetectXBM( SvStream& rStm, bool bExtendedInfo );
diff --git a/vcl/source/filter/graphicfilter2.cxx 
b/vcl/source/filter/graphicfilter2.cxx
index 32ad4b51947a..17b16f69abcb 100644
--- a/vcl/source/filter/graphicfilter2.cxx
+++ b/vcl/source/filter/graphicfilter2.cxx
@@ -67,7 +67,7 @@ bool GraphicDescriptor::Detect( bool bExtendedInfo )
 else if ( ImpDetectBMP( rStm, bExtendedInfo ) ) bRet = true;
 else if ( ImpDetectPNG( rStm, bExtendedInfo ) ) bRet = true;
 else if ( ImpDetectTIF( rStm, bExtendedInfo ) ) bRet = true;
-else if ( ImpDetectPCX( rStm, bExtendedInfo ) ) bRet = true;
+else if ( ImpDetectPCX( rStm ) ) bRet = true;
 else if ( ImpDetectDXF( rStm, bExtendedInfo ) ) bRet = true;
 else if ( ImpDetectMET( rStm, bExtendedInfo ) ) bRet = true;
 else if ( ImpDetectSVM( rStm, bExtendedInfo ) ) bRet = true;
@@ -433,13 +433,12 @@ bool GraphicDescriptor::ImpDetectPCD( SvStream& rStm, 
bool )
 return bRet;
 }
 
-bool GraphicDescriptor::ImpDetectPCX( SvStream& rStm, bool bExtendedInfo )
+bool GraphicDescriptor::ImpDetectPCX( SvStream& rStm )
 {
 // ! Because 0x0a can be interpreted as LF too ...
 // we can't be sure that this special sign represent a PCX file only.
 // Every Ascii file is possible here :-(
 // We must detect the whole header.
-bExtendedInfo = true;
 
 boolbRet = false;
 sal_uInt8   cByte = 0;
@@ -453,61 +452,58 @@ bool GraphicDescriptor::ImpDetectPCX( SvStream& rStm, 
bool bExtendedInfo )
 nFormat = GraphicFileFormat::PCX;
 bRet = true;
 
-if ( bExtendedInfo )
-{
-sal_uInt16  nTemp16;
-sal_uInt16  nXmin;
-sal_uInt16  nXmax;
-sal_uInt16  nYmin;
-sal_uInt16  nYmax;
-sal_uInt16  nDPIx;
-sal_uInt16  nDPIy;
+sal_uInt16  nTemp16;
+sal_uInt16  nXmin;
+sal_uInt16  nXmax;
+sal_uInt16  nYmin;
+sal_uInt16  nYmax;
+sal_uInt16  nDPIx;
+sal_uInt16  nDPIy;
 
-rStm.SeekRel( 1 );
+rStm.SeekRel( 1 );
 
-// compression
-rStm.ReadUChar( cByte );
+// compression
+rStm.ReadUChar( cByte );
 
-bRet = (cByte==0 || cByte ==1);
-if (bRet)
-{
-// Bits/Pixel
-rStm.ReadUChar( cByte );
-nBitsPerPixel = cByte;
+bRet = (cByte==0 || cByte ==1);
+if (bRet)
+{
+// Bits/Pixel
+rStm.ReadUChar( cByte );
+nBitsPerPixel = cByte;
 
-// image dimensions
-rStm.ReadUInt16( nTemp16 );
-nXmin = nTemp16;
-rStm.ReadUInt16( nTemp16 );
-nYmin = nTemp16;
-rStm.ReadUInt16( nTemp16 );
-nXmax = nTemp16;
-rStm.ReadUInt16( nTemp16 );
-nYmax = nTemp16;
+// image dimensions
+rStm.ReadUInt16( nTemp16 );
+nXmin = nTemp16;
+rStm.ReadUInt16( nTemp16 );
+nYmin = nTemp16;
+rStm.ReadUInt16( nTemp16 );
+nXmax = nTemp16;
+rStm.ReadUInt16( nTemp16 );
+nYmax = nTemp16;
 
-aPixSize.setWidth( nXmax - nXmin + 1 );
-aPixSize.setHeight( nYmax - nYmin + 1 );
+aPixSize.setWidth( nXmax - nXmin + 1 );
+aPixSize.setHeight( nYmax - nYmin + 1 );
 
-// resolution
-rStm.ReadUInt16( nTemp16 );
- 

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - cui/source default_images/svx

2018-10-20 Thread Libreoffice Gerrit user
 cui/source/options/optsave.src |4 ++--
 default_images/svx/res/tr10432.png |binary
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 8df668da4c2897614e5d08b6f7a7c43365c55738
Author: Matthias Seidel 
AuthorDate: Sat Oct 20 11:27:12 2018 +
Commit: Matthias Seidel 
CommitDate: Sat Oct 20 11:27:12 2018 +

Moved ODF warning a bit

This warning was "pushed out" of the dialog with r1602143

diff --git a/cui/source/options/optsave.src b/cui/source/options/optsave.src
index e743cc50ae88..e803303f6c9b 100644
--- a/cui/source/options/optsave.src
+++ b/cui/source/options/optsave.src
@@ -224,13 +224,13 @@ TabPage RID_SFXPAGE_SAVE
 };
 FixedImage FI_ODF_WARNING
 {
-Pos = MAP_APPFONT ( 12, 174 ) ;
+Pos = MAP_APPFONT ( 12, 177 ) ;
 Size = MAP_APPFONT ( 8, 8 ) ;
 Hide = TRUE ;
 };
 FixedText FT_WARN
 {
-Pos = MAP_APPFONT ( 23, 174 ) ;
+Pos = MAP_APPFONT ( 23, 177 ) ;
 Size = MAP_APPFONT ( 239, 8 ) ;
 Hide = TRUE ;
 Text [ en-US ] = "Not using ODF 1.2 Extended may cause information to 
be lost." ;
commit 3ac78ab3a0df02edd8984664c6df6c7a8131ced1
Author: Matthias Seidel 
AuthorDate: Sat Oct 20 11:10:40 2018 +
Commit: Matthias Seidel 
CommitDate: Sat Oct 20 11:10:40 2018 +

Replaced Orb in options dialog with flat one

diff --git a/default_images/svx/res/tr10432.png 
b/default_images/svx/res/tr10432.png
index 296c6f4c58b1..fa8ddfddb07f 100644
Binary files a/default_images/svx/res/tr10432.png and 
b/default_images/svx/res/tr10432.png differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: chart2/source chart2/uiconfig include/sfx2 include/vcl sd/uiconfig sfx2/source vcl/source vcl/unx

2018-10-20 Thread Libreoffice Gerrit user
 chart2/source/controller/dialogs/dlg_ObjectProperties.cxx|  368 +--
 chart2/source/controller/inc/dlg_ObjectProperties.hxx|   10 
 chart2/source/controller/main/ChartController_Insert.cxx |   18 
 chart2/source/controller/main/ChartController_Properties.cxx |   12 
 chart2/uiconfig/ui/attributedialog.ui|   33 
 include/sfx2/tabdlg.hxx  |   15 
 include/vcl/weld.hxx |1 
 sd/uiconfig/simpress/ui/templatedialog.ui|4 
 sfx2/source/dialog/tabdlg.cxx|   41 -
 vcl/source/app/salvtables.cxx|   23 
 vcl/unx/gtk3/gtk3gtkinst.cxx |   16 
 11 files changed, 290 insertions(+), 251 deletions(-)

New commits:
commit 8947c9b1d8cd407131fdfb6fc3c77c8532e9d2a0
Author: Caolán McNamara 
AuthorDate: Thu Oct 18 13:00:41 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 13:52:34 2018 +0200

weld SchAttribTabDlg

Change-Id: Ia53547b7b42a3ff8848085ab8f8d214259d5cc7b
Reviewed-on: https://gerrit.libreoffice.org/61959
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx 
b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
index 47315d30a9ce..114d0cf97612 100644
--- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
+++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
@@ -318,13 +318,12 @@ void 
SchAttribTabDlg::SetAxisMinorStepWidthForErrorBarDecimals( double fMinorSte
 m_fAxisMinorStepWidthForErrorBarDecimals = fMinorStepWidth;
 }
 
-SchAttribTabDlg::SchAttribTabDlg(vcl::Window* pParent,
+SchAttribTabDlg::SchAttribTabDlg(weld::Window* pParent,
  const SfxItemSet* pAttr,
  const ObjectPropertiesDialogParameter* 
pDialogParameter,
  const ViewElementListProvider* 
pViewElementListProvider,
- const uno::Reference< 
util::XNumberFormatsSupplier >& xNumberFormatsSupplier
- )
-: SfxTabDialog(pParent, "AttributeDialog", 
"modules/schart/ui/attributedialog.ui", pAttr)
+ const uno::Reference< 
util::XNumberFormatsSupplier >& xNumberFormatsSupplier)
+: SfxTabDialogController(pParent, "modules/schart/ui/attributedialog.ui", 
"AttributeDialog", pAttr)
 , nDlgType(nNoArrowNoShadowDlg)
 , m_pParameter( pDialogParameter )
 , m_pViewElementListProvider( pViewElementListProvider )
@@ -335,89 +334,89 @@ SchAttribTabDlg::SchAttribTabDlg(vcl::Window* pParent,
 NumberFormatterWrapper aNumberFormatterWrapper( xNumberFormatsSupplier );
 m_pNumberFormatter = aNumberFormatterWrapper.getSvNumberFormatter();
 
-SetText( pDialogParameter->getLocalizedName() );
+m_xDialog->set_title(pDialogParameter->getLocalizedName());
 
 SvtCJKOptions aCJKOptions;
 
 switch (pDialogParameter->getObjectType())
 {
 case OBJECTTYPE_TITLE:
-AddTabPage(RID_SVXPAGE_LINE, SchResId(STR_PAGE_BORDER));
-AddTabPage(RID_SVXPAGE_AREA, SchResId(STR_PAGE_AREA));
-AddTabPage(RID_SVXPAGE_TRANSPARENCE, 
SchResId(STR_PAGE_TRANSPARENCY));
-AddTabPage(RID_SVXPAGE_CHAR_NAME, SchResId(STR_PAGE_FONT));
-AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, 
SchResId(STR_PAGE_FONT_EFFECTS));
-AddTabPage(TP_ALIGNMENT, SchResId(STR_PAGE_ALIGNMENT), 
SchAlignmentTabPage::Create);
+AddTabPage("border", SchResId(STR_PAGE_BORDER), RID_SVXPAGE_LINE);
+AddTabPage("area", SchResId(STR_PAGE_AREA), RID_SVXPAGE_AREA);
+AddTabPage("transparent", SchResId(STR_PAGE_TRANSPARENCY), 
RID_SVXPAGE_TRANSPARENCE);
+AddTabPage("fontname", SchResId(STR_PAGE_FONT), 
RID_SVXPAGE_CHAR_NAME);
+AddTabPage("effects", SchResId(STR_PAGE_FONT_EFFECTS), 
RID_SVXPAGE_CHAR_EFFECTS);
+AddTabPage("alignment", SchResId(STR_PAGE_ALIGNMENT), 
SchAlignmentTabPage::Create, nullptr);
 if( aCJKOptions.IsAsianTypographyEnabled() )
-AddTabPage(RID_SVXPAGE_PARA_ASIAN, SchResId(STR_PAGE_ASIAN));
+AddTabPage("asian", SchResId(STR_PAGE_ASIAN), 
RID_SVXPAGE_PARA_ASIAN);
 break;
 
 case OBJECTTYPE_LEGEND:
-AddTabPage(RID_SVXPAGE_LINE, SchResId(STR_PAGE_BORDER));
-AddTabPage(RID_SVXPAGE_AREA, SchResId(STR_PAGE_AREA));
-AddTabPage(RID_SVXPAGE_TRANSPARENCE, 
SchResId(STR_PAGE_TRANSPARENCY));
-AddTabPage(RID_SVXPAGE_CHAR_NAME, SchResId(STR_PAGE_FONT));
-AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, 
SchResId(STR_PAGE_FONT_EFFECTS));
-AddTabPage(TP_LEGEND_POS, SchResId(STR_PAGE_POSITION), 
SchLegendPosTabPage::Create);
-if( aCJKOptions.IsAsianTypographyEnabled()

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

2018-10-20 Thread Libreoffice Gerrit user
 vcl/source/window/menu.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b361413eef7e46f340d921708faca9986c63c9f8
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 12:55:00 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 13:50:58 2018 +0200

wrong pointer check

since...

commit 2636ab883adbcb1f6593787934c6d6d3fff67c21
Date:   Mon Sep 15 20:13:54 2014 +0200

vcl menu: Rename CloseStartedFrom() to ClosePopup() + adapt code.

Change-Id: Ie30f6d907907551e23e592b8502107e75c333f2e
Reviewed-on: https://gerrit.libreoffice.org/61997
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 699ba937ee95..ba1138205a29 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2701,7 +2701,7 @@ void PopupMenu::ClosePopup(Menu* pMenu)
 {
 MenuFloatingWindow* p = dynamic_cast(ImplGetWindow());
 PopupMenu *pPopup = dynamic_cast(pMenu);
-if (p && pMenu)
+if (p && pPopup)
 p->KillActivePopup(pPopup);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-20 Thread Libreoffice Gerrit user
 include/svx/fmgridif.hxx   |9 +
 svx/source/fmcomp/fmgridif.cxx |4 ++--
 2 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 9f46a103cbc7d3d7f7c1754d1aabfad6260d260f
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 14:26:36 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 13:50:28 2018 +0200

ensure m_aMutex ctor called before m_aMutex used

Change-Id: I3d05831947b955b63f351180193bcf1585589c25
Reviewed-on: https://gerrit.libreoffice.org/62012
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/svx/fmgridif.hxx b/include/svx/fmgridif.hxx
index f031f3f15565..9fc562afd695 100644
--- a/include/svx/fmgridif.hxx
+++ b/include/svx/fmgridif.hxx
@@ -336,6 +336,11 @@ class SAL_WARN_UNUSED SVX_DLLPUBLIC FmXGridPeer:
 css::form::XResetListener,
 css::view::XSelectionSupplier>
 {
+protected:
+css::uno::Reference< css::uno::XComponentContext >m_xContext;
+::osl::Mutex  m_aMutex;
+
+private:
 css::uno::Reference< css::container::XIndexContainer >m_xColumns;
 css::uno::Reference< css::sdbc::XRowSet > m_xCursor;
 ::comphelper::OInterfaceContainerHelper2   m_aModifyListeners,
@@ -362,10 +367,6 @@ class SAL_WARN_UNUSED SVX_DLLPUBLIC FmXGridPeer:
 friend class GridListenerDelegator;
 std::unique_ptr  m_pGridListener;
 
-protected:
-css::uno::Reference< css::uno::XComponentContext >m_xContext;
-::osl::Mutex  m_aMutex;
-
 public:
 FmXGridPeer(const css::uno::Reference< css::uno::XComponentContext >&);
 virtual ~FmXGridPeer() override;
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index 30b2aa76cfa3..a00d153fb648 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -1030,7 +1030,8 @@ using namespace fmgridif;
 
 
 FmXGridPeer::FmXGridPeer(const Reference< XComponentContext >& _rxContext)
-:m_aModifyListeners(m_aMutex)
+:m_xContext(_rxContext)
+,m_aModifyListeners(m_aMutex)
 ,m_aUpdateListeners(m_aMutex)
 ,m_aContainerListeners(m_aMutex)
 ,m_aSelectionListeners(m_aMutex)
@@ -1038,7 +1039,6 @@ FmXGridPeer::FmXGridPeer(const Reference< 
XComponentContext >& _rxContext)
 ,m_aMode( getDataModeIdentifier() )
 ,m_nCursorListening(0)
 ,m_bInterceptingDispatch(false)
-,m_xContext(_rxContext)
 {
 // Create must be called after this constructor
 m_pGridListener.reset( new GridListenerDelegator( this ) );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sal/rtl

2018-10-20 Thread Libreoffice Gerrit user
 sal/rtl/cipher.cxx |   13 -
 sal/rtl/digest.cxx |   16 
 2 files changed, 16 insertions(+), 13 deletions(-)

New commits:
commit b893e3a63f899e276ebb5c88c9458ebed2eb08a0
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 13:26:12 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 13:50:00 2018 +0200

use rtl_secureZeroMemory when we're zeroing temporaries before returning

Change-Id: I0c3efa394511e479d925f5320977d071e8301f8d
Reviewed-on: https://gerrit.libreoffice.org/62002
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sal/rtl/cipher.cxx b/sal/rtl/cipher.cxx
index df0631b928d7..70a26cd3fe62 100644
--- a/sal/rtl/cipher.cxx
+++ b/sal/rtl/cipher.cxx
@@ -659,8 +659,8 @@ static rtlCipherError BF_init(
 key->m_P[i] ^= D;
 }
 
-DL = 0;
-DR = 0;
+rtl_secureZeroMemory(&DL, sizeof(DL));
+rtl_secureZeroMemory(&DR, sizeof(DR));
 
 for (i = 0; i < CIPHER_ROUNDS_BF + 2; i += 2)
 {
@@ -808,7 +808,8 @@ static void BF_updateECB(
 
 RTL_CIPHER_HTONL64(DL, DR, pBuffer, nLength);
 }
-DL = DR = 0;
+rtl_secureZeroMemory(&DL, sizeof(DL));
+rtl_secureZeroMemory(&DR, sizeof(DR));
 }
 
 static void BF_updateCBC(
@@ -857,7 +858,8 @@ static void BF_updateCBC(
 
 RTL_CIPHER_HTONL64(DL, DR, pBuffer, nLength);
 }
-DL = DR = 0;
+rtl_secureZeroMemory(&DL, sizeof(DL));
+rtl_secureZeroMemory(&DR, sizeof(DR));
 }
 
 static void BF_updateCFB(
@@ -880,7 +882,8 @@ static void BF_updateCFB(
 BF_encode(&(ctx->m_key), &IVL, &IVR);
 RTL_CIPHER_HTONL64(IVL, IVR, iv, 8);
 
-IVL = IVR = 0;
+rtl_secureZeroMemory(&IVL, sizeof(IVL));
+rtl_secureZeroMemory(&IVR, sizeof(IVR));
 }
 
 if (direction == rtl_Cipher_DirectionEncode)
diff --git a/sal/rtl/digest.cxx b/sal/rtl/digest.cxx
index 3bd2dfa214dd..706d1ffc5c67 100644
--- a/sal/rtl/digest.cxx
+++ b/sal/rtl/digest.cxx
@@ -283,7 +283,7 @@ static void updateMD2(DigestContextMD2 *ctx)
 }
 
 memcpy(sp1, state, 16 * sizeof(sal_uInt32));
-memset(state, 0, 48 * sizeof(sal_uInt32));
+rtl_secureZeroMemory(state, 48 * sizeof(sal_uInt32));
 }
 
 static void endMD2(DigestContextMD2 *ctx)
@@ -320,7 +320,7 @@ rtlDigestError SAL_CALL rtl_digest_MD2(
 if (result == rtl_Digest_E_None)
 result = rtl_digest_getMD2(&digest, pBuffer, nBufLen);
 
-memset(&digest, 0, sizeof(digest));
+rtl_secureZeroMemory(&digest, sizeof(digest));
 return result;
 }
 
@@ -658,7 +658,7 @@ rtlDigestError SAL_CALL rtl_digest_MD5(
 if (result == rtl_Digest_E_None)
 result = rtl_digest_getMD5(&digest, pBuffer, nBufLen);
 
-memset(&digest, 0, sizeof(digest));
+rtl_secureZeroMemory(&digest, sizeof(digest));
 return result;
 }
 
@@ -1101,7 +1101,7 @@ rtlDigestError SAL_CALL rtl_digest_SHA(
 if (result == rtl_Digest_E_None)
 result = rtl_digest_getSHA(&digest, pBuffer, nBufLen);
 
-memset(&digest, 0, sizeof(digest));
+rtl_secureZeroMemory(&digest, sizeof(digest));
 return result;
 }
 
@@ -1261,7 +1261,7 @@ rtlDigestError SAL_CALL rtl_digest_SHA1(
 if (result == rtl_Digest_E_None)
 result = rtl_digest_getSHA1(&digest, pBuffer, nBufLen);
 
-memset(&digest, 0, sizeof(digest));
+rtl_secureZeroMemory(&digest, sizeof(digest));
 return result;
 }
 
@@ -1476,7 +1476,7 @@ rtlDigestError SAL_CALL rtl_digest_HMAC_MD5(
 result = rtl_digest_getHMAC_MD5(&digest, pBuffer, nBufLen);
 }
 
-memset(&digest, 0, sizeof(digest));
+rtl_secureZeroMemory(&digest, sizeof(digest));
 return result;
 }
 
@@ -1672,7 +1672,7 @@ rtlDigestError SAL_CALL rtl_digest_HMAC_SHA1(
 result = rtl_digest_getHMAC_SHA1(&digest, pBuffer, nBufLen);
 }
 
-memset(&digest, 0, sizeof(digest));
+rtl_secureZeroMemory(&digest, sizeof(digest));
 return result;
 }
 
@@ -1872,7 +1872,7 @@ rtlDigestError SAL_CALL rtl_digest_PBKDF2(
 rtl_secureZeroMemory(T, DIGEST_CBLOCK_PBKDF2);
 }
 
-memset(&digest, 0, sizeof(digest));
+rtl_secureZeroMemory(&digest, sizeof(digest));
 return rtl_Digest_E_None;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-20 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/docxattributeoutput.cxx |   13 ++---
 1 file changed, 2 insertions(+), 11 deletions(-)

New commits:
commit 7f0b7410e84a222d8fbee7c4fadd3b40028a068d
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 13:03:36 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 13:49:14 2018 +0200

permissionIdAndName is empty in permission-for-user case

merge the two identical branches and make it do what it probably wants to do

Change-Id: I38390a18fcd90349c6bd86f14c67850166b6aeaa
Reviewed-on: https://gerrit.libreoffice.org/62001
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index a759adc24d1a..a71ab90cc5b3 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1558,17 +1558,8 @@ void DocxAttributeOutput::DoWritePermissionTagEnd(const 
OUString & permission)
 {
 OUString permissionIdAndName;
 
-if (permission.startsWith("permission-for-group:", &permissionIdAndName))
-{
-const sal_Int32 sparatorIndex = permissionIdAndName.indexOf(':');
-const OUString permissionId   = permissionIdAndName.copy(0, 
sparatorIndex);
-const OString rId = 
OUStringToOString(BookmarkToWord(permissionId), RTL_TEXTENCODING_UTF8).getStr();
-
-m_pSerializer->singleElementNS(XML_w, XML_permEnd,
-FSNS(XML_w, XML_id), rId.getStr(),
-FSEND);
-}
-else // if (permission.startsWith("permission-for-user:", 
&permissionIdAndName))
+if (permission.startsWith("permission-for-group:", &permissionIdAndName) ||
+permission.startsWith("permission-for-user:", &permissionIdAndName))
 {
 const sal_Int32 sparatorIndex = permissionIdAndName.indexOf(':');
 const OUString permissionId   = permissionIdAndName.copy(0, 
sparatorIndex);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-20 Thread Libreoffice Gerrit user
 canvas/source/directx/dx_impltools.cxx |2 +-
 canvas/source/directx/dx_vcltools.cxx  |6 +++---
 canvas/source/directx/dx_vcltools.hxx  |2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 281e5f982008741bb6f7f03c578e47e342f4543e
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 10:14:47 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 13:49:41 2018 +0200

new/delete mismatch

Change-Id: I910366753d1d365e0388262c98fca12d000e83e5
Reviewed-on: https://gerrit.libreoffice.org/61979
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/canvas/source/directx/dx_impltools.cxx 
b/canvas/source/directx/dx_impltools.cxx
index ea235cfe08de..27fc270f94c7 100644
--- a/canvas/source/directx/dx_impltools.cxx
+++ b/canvas/source/directx/dx_impltools.cxx
@@ -504,7 +504,7 @@ namespace dxcanvas
 aBmpData.Height  = rRawRGBAData.mnHeight;
 aBmpData.Stride  = 4*aBmpData.Width; // bottom-up format
 aBmpData.PixelFormat = PixelFormat32bppARGB;
-aBmpData.Scan0   = rRawRGBAData.mpBitmapData.get();
+aBmpData.Scan0   = 
const_cast(rRawRGBAData.maBitmapData.data());
 
 const Gdiplus::Rect aRect( 0,0,aBmpData.Width,aBmpData.Height );
 if( Gdiplus::Ok != pBitmap->LockBits( &aRect,
diff --git a/canvas/source/directx/dx_vcltools.cxx 
b/canvas/source/directx/dx_vcltools.cxx
index b8e511a09260..07a71b330ae9 100644
--- a/canvas/source/directx/dx_vcltools.cxx
+++ b/canvas/source/directx/dx_vcltools.cxx
@@ -155,7 +155,7 @@ namespace dxcanvas
 RawRGBABitmap aBmpData;
 aBmpData.mnWidth = aBmpSize.Width();
 aBmpData.mnHeight= aBmpSize.Height();
-aBmpData.mpBitmapData.reset( new sal_uInt8[ 
4*aBmpData.mnWidth*aBmpData.mnHeight ] );
+
aBmpData.maBitmapData.resize(4*aBmpData.mnWidth*aBmpData.mnHeight);
 
 Bitmap aBitmap( rBmpEx.GetBitmap() );
 
@@ -200,7 +200,7 @@ namespace dxcanvas
   "Unsupported alpha scanline format" );
 
 BitmapColor aCol;
-sal_uInt8*  pCurrOutput( aBmpData.mpBitmapData.get() );
+sal_uInt8*  pCurrOutput(aBmpData.maBitmapData.data());
 int x, y;
 
 for( y=0; ympBitmapData;
+std::vector  maBitmapData;
 };
 
 bool drawVCLBitmapFromXBitmap( const std::shared_ptr< 
Gdiplus::Graphics >& rGraphics,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-20 Thread Libreoffice Gerrit user
 connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2b2769177e368651943d3cedc0c18708c0a811ce
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 10:30:25 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 13:48:47 2018 +0200

copy and paste error

Change-Id: I30a8fb0568f00253f8d7a55eab51279f639b33cc
Reviewed-on: https://gerrit.libreoffice.org/61982
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx 
b/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx
index 5fb717fe3741..a1575c728298 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx
@@ -780,7 +780,7 @@ Reference SAL_CALL 
ODatabaseMetaData::getColumns(const Any& /*catalo
 nColumnSize = sColumnType.copy(6, 1).toInt32(); // 'year(' length 
is 5
 else if (sDataType.equalsIgnoreAsciiCase("date"))
 nColumnSize = 10;
-else if (sDataType.equalsIgnoreAsciiCase("date"))
+else if (sDataType.equalsIgnoreAsciiCase("time"))
 nColumnSize = 8;
 else if (sDataType.equalsIgnoreAsciiCase("datetime")
  || sDataType.equalsIgnoreAsciiCase("timestamp"))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - basegfx/source winaccessibility/source

2018-10-20 Thread Libreoffice Gerrit user
 basegfx/source/inc/hommatrixtemplate.hxx|   17 ++---
 winaccessibility/source/UAccCOM/MAccessible.cxx |4 ++--
 2 files changed, 12 insertions(+), 9 deletions(-)

New commits:
commit a43712a9232eea1a439be95e8a30ee833dd4bff4
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 14:02:04 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 13:48:17 2018 +0200

check for self assign

Change-Id: I1d8ae37c3f3fc41d5ec65bb246e891d76f7ff544
Reviewed-on: https://gerrit.libreoffice.org/62006
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/basegfx/source/inc/hommatrixtemplate.hxx 
b/basegfx/source/inc/hommatrixtemplate.hxx
index b7106f6fb22d..667e7ecdb3b0 100644
--- a/basegfx/source/inc/hommatrixtemplate.hxx
+++ b/basegfx/source/inc/hommatrixtemplate.hxx
@@ -119,14 +119,17 @@ namespace basegfx
 
 ImplHomMatrixTemplate& operator=(const ImplHomMatrixTemplate& 
rToBeCopied)
 {
-// complete initialization using copy
-for(sal_uInt16 a(0); a < (RowSize - 1); a++)
+if (this != &rToBeCopied)
 {
-memcpy(&maLine[a], &rToBeCopied.maLine[a], 
sizeof(ImplMatLine< RowSize >));
-}
-if(rToBeCopied.mpLine)
-{
-mpLine.reset( new ImplMatLine< RowSize >((RowSize - 1), 
rToBeCopied.mpLine.get()) );
+// complete initialization using copy
+for(sal_uInt16 a(0); a < (RowSize - 1); a++)
+{
+memcpy(&maLine[a], &rToBeCopied.maLine[a], 
sizeof(ImplMatLine< RowSize >));
+}
+if(rToBeCopied.mpLine)
+{
+mpLine.reset( new ImplMatLine< RowSize >((RowSize - 
1), rToBeCopied.mpLine.get()) );
+}
 }
 return *this;
 }
commit d585e572b5d4fc7113c0d0380f16427c1e3448d8
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 14:14:20 2018 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 20 13:48:06 2018 +0200

alloc should have been free

Change-Id: I325a815ff17446bc389f889a028f5e2ced57d7e7
Reviewed-on: https://gerrit.libreoffice.org/62008
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx 
b/winaccessibility/source/UAccCOM/MAccessible.cxx
index 1f6e36531d17..0a75d9a4e5a8 100644
--- a/winaccessibility/source/UAccCOM/MAccessible.cxx
+++ b/winaccessibility/source/UAccCOM/MAccessible.cxx
@@ -1075,7 +1075,7 @@ STDMETHODIMP CMAccessible::put_accValue(VARIANT varChild, 
BSTR szValue)
 {
 if(varChild.lVal==CHILDID_SELF)
 {
-SysAllocString(m_pszValue);
+SAFE_SYSFREESTRING(m_pszValue);
 m_pszValue=SysAllocString(szValue);
 return S_OK;
 }
@@ -1109,7 +1109,7 @@ STDMETHODIMP CMAccessible::Put_XAccName(const OLECHAR 
__RPC_FAR *pszName)
 return E_INVALIDARG;
 }
 
-SAFE_SYSFREESTRING(m_pszName);//??
+SAFE_SYSFREESTRING(m_pszName);
 m_pszName = SysAllocString(pszName);
 if(m_pszName==nullptr)
 return E_FAIL;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: configure.ac download.lst external/icu

2018-10-20 Thread Libreoffice Gerrit user
 configure.ac|2 -
 download.lst|8 ++--
 external/icu/icu4c-android.patch.1  |   53 ++--
 external/icu/icu4c-clang-cl.patch.1 |2 -
 external/icu/icu4c-khmerbreakengine.patch.1 |   24 ++--
 5 files changed, 45 insertions(+), 44 deletions(-)

New commits:
commit 190a1394c2dd2aa338559c99a23ec3c62d29a2eb
Author: Eike Rathke 
AuthorDate: Sat Oct 20 01:57:10 2018 +0200
Commit: Eike Rathke 
CommitDate: Sat Oct 20 13:08:31 2018 +0200

Upgrade to ICU 63.1

Change-Id: I3b73fca39f51809f608dd78865c2566357a7b8a1
Reviewed-on: https://gerrit.libreoffice.org/62034
Tested-by: Jenkins
Reviewed-by: Eike Rathke 

diff --git a/configure.ac b/configure.ac
index a20e0be6c688..334c4c10759a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9106,7 +9106,7 @@ SYSTEM_GENBRK=
 SYSTEM_GENCCODE=
 SYSTEM_GENCMN=
 
-ICU_MAJOR=62
+ICU_MAJOR=63
 ICU_MINOR=1
 ICU_RECLASSIFIED_PREPEND_SET_EMPTY="TRUE"
 ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER="TRUE"
diff --git a/download.lst b/download.lst
index 48bf64aa74f2..46afd8e9cd89 100644
--- a/download.lst
+++ b/download.lst
@@ -104,10 +104,10 @@ export HUNSPELL_SHA256SUM := 
3cd9ceb062fe5814f668e4f22b2fa6e3ba0b339b921739541ce
 export HUNSPELL_TARBALL := hunspell-1.6.2.tar.gz
 export HYPHEN_SHA256SUM := 
304636d4eccd81a14b6914d07b84c79ebb815288c76fe027b9ebff6ff24d5705
 export HYPHEN_TARBALL := 5ade6ae2a99bc1e9e57031ca88d36dad-hyphen-2.8.8.tar.gz
-export ICU_SHA256SUM := 
3dd9868d666350dda66a6e305eecde9d479fb70b30d5b55d78a1deffb97d5aa3
-export ICU_TARBALL := icu4c-62_1-src.tgz
-export ICU_DATA_SHA256SUM := 
93bcaf58cfa9223972da79cb8e0f94819ace4995db6041b84f4d9bd810246d1d
-export ICU_DATA_TARBALL := icu4c-62_1-data.zip
+export ICU_SHA256SUM := 
05c490b69454fce5860b7e8e2821231674af0a11d7ef2febea9a32512998cb9d
+export ICU_TARBALL := icu4c-63_1-src.tgz
+export ICU_DATA_SHA256SUM := 
9bef2bf28ec4fdc86a3bd88d7ac4d509fef6dfbe9c6798299e55b9d4343e960c
+export ICU_DATA_TARBALL := icu4c-63_1-data.zip
 export JFREEREPORT_FLOW_ENGINE_SHA256SUM := 
233f66e8d25c5dd971716d4200203a612a407649686ef3b52075d04b4c9df0dd
 export JFREEREPORT_FLOW_ENGINE_TARBALL := 
ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip
 export JFREEREPORT_FLUTE_SHA256SUM := 
1b5b24f7bc543c0362b667692f78db8bab4ed6dafc6172f104d0bd3757d8a133
diff --git a/external/icu/icu4c-android.patch.1 
b/external/icu/icu4c-android.patch.1
index 1f1fdcff2fb9..b012b0c11cd2 100644
--- a/external/icu/icu4c-android.patch.1
+++ b/external/icu/icu4c-android.patch.1
@@ -1,9 +1,9 @@
 diff -ur icu.org/source/common/unicode/platform.h 
icu/source/common/unicode/platform.h
 icu.org/source/common/unicode/platform.h   2017-03-22 20:06:26.0 
+0100
-+++ icu/source/common/unicode/platform.h   2017-04-21 22:32:31.656693147 
+0200
-@@ -818,7 +818,7 @@
- #elif defined(U_STATIC_IMPLEMENTATION)
- #   define U_EXPORT
+--- icu.org/source/common/unicode/platform.h   2018-10-02 00:39:56.0 
+0200
 icu/source/common/unicode/platform.h   2018-10-20 00:36:24.598886605 
+0200
+@@ -789,7 +789,7 @@
+ #elif defined(_MSC_VER) || (__has_declspec_attribute(dllexport) && 
__has_declspec_attribute(dllimport))
+ #   define U_EXPORT __declspec(dllexport)
  #elif defined(__GNUC__)
 -#   define U_EXPORT __attribute__((visibility("default")))
 +#   define U_EXPORT
@@ -11,8 +11,8 @@ diff -ur icu.org/source/common/unicode/platform.h 
icu/source/common/unicode/plat
 || (defined(__SUNPRO_C) && __SUNPRO_C >= 0x550) 
  #   define U_EXPORT __global
 diff -ur icu.org/source/config/mh-linux icu/source/config/mh-linux
 icu.org/source/config/mh-linux 2016-06-15 20:58:17.0 +0200
-+++ icu/source/config/mh-linux 2017-04-21 22:32:31.653693154 +0200
+--- icu.org/source/config/mh-linux 2018-09-29 02:34:41.0 +0200
 icu/source/config/mh-linux 2018-10-20 00:33:36.558130876 +0200
 @@ -27,7 +27,7 @@
  
  ## Compiler switch to embed a library name
@@ -23,9 +23,9 @@ diff -ur icu.org/source/config/mh-linux 
icu/source/config/mh-linux
  #SH# LD_SONAME=
  
 diff -ur icu.org/source/configure icu/source/configure
 icu.org/source/configure   2017-04-07 09:40:30.0 +0200
-+++ icu/source/configure   2017-04-21 22:32:31.656693147 +0200
-@@ -5134,7 +5134,7 @@
+--- icu.org/source/configure   2018-10-02 00:39:56.0 +0200
 icu/source/configure   2018-10-20 00:33:36.559130874 +0200
+@@ -5207,7 +5207,7 @@
else
icu_cv_host_frag=mh-linux-va
fi ;;
@@ -34,7 +34,7 @@ diff -ur icu.org/source/configure icu/source/configure
  i[34567]86-*-cygwin)
if test "$GCC" = yes; then
icu_cv_host_frag=mh-cygwin
-@@ -6358,6 +6358,10 @@
+@@ -6400,6 +6400,10 @@
  # Check to see if genccode can generate simple assembly.
  GENCCODE_ASSEMBLY=
  case "${host}" in
@@ -45,7 +45,7 @@ diff -ur icu.org/source/configure icu/source/configure
  *-linux*|*-kfreebsd*-g

[Libreoffice-commits] online.git: test/integration-http-server.cpp wsd/LOOLWSD.cpp wsd/Storage.cpp wsd/Storage.hpp

2018-10-20 Thread Libreoffice Gerrit user
 test/integration-http-server.cpp |1 -
 wsd/LOOLWSD.cpp  |4 ++--
 wsd/Storage.cpp  |5 -
 wsd/Storage.hpp  |2 --
 4 files changed, 2 insertions(+), 10 deletions(-)

New commits:
commit 343ba48d27d6cc3bacf6d7927d9b615cd2cf98ce
Author: Tamás Zolnai 
AuthorDate: Sat Oct 20 12:55:55 2018 +0200
Commit: Tamás Zolnai 
CommitDate: Sat Oct 20 12:55:55 2018 +0200

Revert "Enable convert-to features for wopi hosts"

This reverts commit 8dd28ed6649bbd9506ca097547f898e5d4f1bddd.

diff --git a/test/integration-http-server.cpp b/test/integration-http-server.cpp
index ef8476c9e..e8eb1197e 100644
--- a/test/integration-http-server.cpp
+++ b/test/integration-http-server.cpp
@@ -173,7 +173,6 @@ void HTTPServerTest::testCapabilities()
 
 Poco::JSON::Object::Ptr convert_to = 
features->get("convert-to").extract();
 CPPUNIT_ASSERT(convert_to->has("available"));
-CPPUNIT_ASSERT(convert_to->get("available"));
 }
 }
 
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 4e87c6125..90c3e31ba 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2256,7 +2256,7 @@ private:
 
 std::string format = (form.has("format") ? form.get("format") : 
"");
 
-if (!allowPostFrom(socket->clientAddress()) || 
StorageBase::alowedWopiHost(socket->clientAddress()) )
+if (!allowPostFrom(socket->clientAddress()))
 {
 LOG_ERR("client address DENY: " << socket->clientAddress());
 
@@ -2717,7 +2717,7 @@ private:
 Poco::JSON::Object::Ptr features = 
jsonFile.extract();
 Poco::JSON::Object::Ptr convert_to = 
features->get("convert-to").extract();
 
-Poco::Dynamic::Var available = allowPostFrom(socket->clientAddress()) 
|| StorageBase::alowedWopiHost(socket->clientAddress());
+Poco::Dynamic::Var available = allowPostFrom(socket->clientAddress());
 convert_to->set("available", available);
 
 std::ostringstream ostrJSON;
diff --git a/wsd/Storage.cpp b/wsd/Storage.cpp
index 722893abd..3ceaf673e 100644
--- a/wsd/Storage.cpp
+++ b/wsd/Storage.cpp
@@ -141,11 +141,6 @@ void StorageBase::initialize()
 #endif
 }
 
-bool StorageBase::alowedWopiHost(const std::string& uri)
-{
-return WopiEnabled && WopiHosts.match(Poco::URI(uri).getHost());
-}
-
 #ifndef MOBILEAPP
 
 bool isLocalhost(const std::string& targetHost)
diff --git a/wsd/Storage.hpp b/wsd/Storage.hpp
index a2025a4fd..1e9544c2e 100644
--- a/wsd/Storage.hpp
+++ b/wsd/Storage.hpp
@@ -174,8 +174,6 @@ public:
 static std::unique_ptr create(const Poco::URI& uri,
const std::string& jailRoot,
const std::string& jailPath);
-
-static bool alowedWopiHost(const std::string& uri);
 protected:
 
 /// Returns the root path of the jail directory of docs.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-20 Thread Libreoffice Gerrit user
 sdext/source/pdfimport/pdfparse/pdfentries.cxx |   40 +++--
 1 file changed, 24 insertions(+), 16 deletions(-)

New commits:
commit 77e4f5e2b31292ca635aa807f701ba39ac521531
Author: Mike Kaganski 
AuthorDate: Sat Oct 20 11:26:52 2018 +0200
Commit: Mike Kaganski 
CommitDate: Sat Oct 20 12:48:49 2018 +0200

tdf#120703 (PVS)

V1023 A pointer without owner is added to the 'm_aSubElements' container by 
the
  'emplace_back' method. A memory leak will occur in case of an 
exception.

V560 A part of conditional expression is always true: !pNum.

V701 realloc() possible leak: when realloc() fails in allocating memory, 
original
 pointer '* pOutBuf' is lost. Consider assigning realloc() to a 
temporary
 pointer.

V586 The 'delete' operator is called twice for deallocation of the same 
memory
 space.

V581 The conditional expressions of the 'if' statements situated alongside 
each
 other are identical. Check lines: 867, 869.

Change-Id: I2832bf7228914b48cf2c5178ed9c0719b53c883c
Reviewed-on: https://gerrit.libreoffice.org/62040
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/sdext/source/pdfimport/pdfparse/pdfentries.cxx 
b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
index c5e2c4203d8f..7d176ebdfc16 100644
--- a/sdext/source/pdfimport/pdfparse/pdfentries.cxx
+++ b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
@@ -21,6 +21,7 @@
 #include 
 
 #include 
+#include 
 
 #include 
 #include 
@@ -531,7 +532,7 @@ void PDFDict::insertValue( const OString& rName, PDFEntry* 
pValue )
 if( it == m_aMap.end() )
 {
 // new name/value, pair, append it
-m_aSubElements.emplace_back( new PDFName( rName ) );
+m_aSubElements.emplace_back(o3tl::make_unique(rName));
 m_aSubElements.emplace_back( pValue );
 }
 else
@@ -628,7 +629,7 @@ unsigned int PDFStream::getDictLength( const PDFContainer* 
pContainer ) const
 if( pRef )
 {
 int nEle = pContainer->m_aSubElements.size();
-for( int i = 0; i < nEle && ! pNum; i++ )
+for (int i = 0; i < nEle; i++)
 {
 PDFObject* pObj = 
dynamic_cast(pContainer->m_aSubElements[i].get());
 if( pObj &&
@@ -729,10 +730,15 @@ static void unzipToBuffer( char* pBegin, unsigned int 
nLen,
 
 const unsigned int buf_increment_size = 16384;
 
-*pOutBuf = static_cast(std::realloc( *pOutBuf, 
buf_increment_size ));
-aZStr.next_out  = reinterpret_cast(*pOutBuf);
-aZStr.avail_out = buf_increment_size;
-*pOutLen = buf_increment_size;
+if (auto p = static_cast(std::realloc(*pOutBuf, 
buf_increment_size)))
+{
+*pOutBuf = p;
+aZStr.next_out = reinterpret_cast(*pOutBuf);
+aZStr.avail_out = buf_increment_size;
+*pOutLen = buf_increment_size;
+}
+else
+err = Z_MEM_ERROR;
 while( err != Z_STREAM_END && err >= Z_OK && aZStr.avail_in )
 {
 err = inflate( &aZStr, Z_NO_FLUSH );
@@ -741,10 +747,15 @@ static void unzipToBuffer( char* pBegin, unsigned int 
nLen,
 if( err != Z_STREAM_END )
 {
 const int nNewAlloc = *pOutLen + buf_increment_size;
-*pOutBuf = static_cast(std::realloc( *pOutBuf, 
nNewAlloc ));
-aZStr.next_out = reinterpret_cast(*pOutBuf + *pOutLen);
-aZStr.avail_out = buf_increment_size;
-*pOutLen = nNewAlloc;
+if (auto p = static_cast(std::realloc(*pOutBuf, 
nNewAlloc)))
+{
+*pOutBuf = p;
+aZStr.next_out = reinterpret_cast(*pOutBuf + 
*pOutLen);
+aZStr.avail_out = buf_increment_size;
+*pOutLen = nNewAlloc;
+}
+else
+err = Z_MEM_ERROR;
 }
 }
 }
@@ -845,7 +856,6 @@ bool PDFObject::emit( EmitContext& rWriteContext ) const
 pFilter = 
dynamic_cast(pArray->m_aSubElements.front().get());
 if (pFilter && pFilter->m_aName == 
"FlateDecode")
 {
-delete pFilter;
 pArray->m_aSubElements.erase( 
pArray->m_aSubElements.begin() );
 }
 }
@@ -864,11 +874,9 @@ bool PDFObject::emit( EmitContext& rWriteContext ) const
 delete pClone;
 // write stream
 if( bRet )
-rWriteContext.write( "stream\n", 7 );
-if( bRet )
-bRet = rWriteContext.write( pOutBytes, nOutBytes );
-if( bRet )
-bRet = rWriteContext.write( "\nendstream\nendobj\n", 18 );
+bRet = rWriteContext.write("stream\n", 7)
+

[Libreoffice-commits] online.git: 3 commits - capabilities.json common/Common.hpp discovery.xml test/DeltaTests.cpp test/integration-http-server.cpp wsd/LOOLWSD.cpp wsd/Storage.cpp wsd/Storage.hpp

2018-10-20 Thread Libreoffice Gerrit user
 capabilities.json|5 ++
 common/Common.hpp|2 +
 discovery.xml|4 ++
 test/DeltaTests.cpp  |2 -
 test/integration-http-server.cpp |   74 +
 wsd/LOOLWSD.cpp  |   78 ---
 wsd/Storage.cpp  |5 ++
 wsd/Storage.hpp  |2 +
 8 files changed, 165 insertions(+), 7 deletions(-)

New commits:
commit 683cedb17a32b75e10ae4ed11d996779f65ef87c
Author: Tamás Zolnai 
AuthorDate: Fri Oct 19 18:14:14 2018 +0200
Commit: Tamás Zolnai 
CommitDate: Fri Oct 19 18:15:22 2018 +0200

Delta test: avoid dumping out useless data

Change-Id: I05bbd05b3ee1e0a5b0687b7b6c981938a1493946

diff --git a/test/DeltaTests.cpp b/test/DeltaTests.cpp
index d3f020d25..6e230e17b 100644
--- a/test/DeltaTests.cpp
+++ b/test/DeltaTests.cpp
@@ -70,8 +70,6 @@ std::vector DeltaTests::applyDelta(
 CPPUNIT_ASSERT(delta.size() >= 4);
 CPPUNIT_ASSERT(delta[0] == 'D');
 
-std::cout << "apply delta of size " << delta.size() << "\n";
-
 // start with the same state.
 std::vector output = pixmap;
 CPPUNIT_ASSERT_EQUAL(output.size(), size_t(pixmap.size()));
commit 8dd28ed6649bbd9506ca097547f898e5d4f1bddd
Author: Tamás Zolnai 
AuthorDate: Fri Oct 19 18:15:02 2018 +0200
Commit: Tamás Zolnai 
CommitDate: Fri Oct 19 18:15:22 2018 +0200

Enable convert-to features for wopi hosts

Change-Id: I8aa37c61f3df5356fb7a14d93cda6279e7ec3cf1

diff --git a/test/integration-http-server.cpp b/test/integration-http-server.cpp
index e8eb1197e..ef8476c9e 100644
--- a/test/integration-http-server.cpp
+++ b/test/integration-http-server.cpp
@@ -173,6 +173,7 @@ void HTTPServerTest::testCapabilities()
 
 Poco::JSON::Object::Ptr convert_to = 
features->get("convert-to").extract();
 CPPUNIT_ASSERT(convert_to->has("available"));
+CPPUNIT_ASSERT(convert_to->get("available"));
 }
 }
 
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 90c3e31ba..4e87c6125 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2256,7 +2256,7 @@ private:
 
 std::string format = (form.has("format") ? form.get("format") : 
"");
 
-if (!allowPostFrom(socket->clientAddress()))
+if (!allowPostFrom(socket->clientAddress()) || 
StorageBase::alowedWopiHost(socket->clientAddress()) )
 {
 LOG_ERR("client address DENY: " << socket->clientAddress());
 
@@ -2717,7 +2717,7 @@ private:
 Poco::JSON::Object::Ptr features = 
jsonFile.extract();
 Poco::JSON::Object::Ptr convert_to = 
features->get("convert-to").extract();
 
-Poco::Dynamic::Var available = allowPostFrom(socket->clientAddress());
+Poco::Dynamic::Var available = allowPostFrom(socket->clientAddress()) 
|| StorageBase::alowedWopiHost(socket->clientAddress());
 convert_to->set("available", available);
 
 std::ostringstream ostrJSON;
diff --git a/wsd/Storage.cpp b/wsd/Storage.cpp
index 3ceaf673e..722893abd 100644
--- a/wsd/Storage.cpp
+++ b/wsd/Storage.cpp
@@ -141,6 +141,11 @@ void StorageBase::initialize()
 #endif
 }
 
+bool StorageBase::alowedWopiHost(const std::string& uri)
+{
+return WopiEnabled && WopiHosts.match(Poco::URI(uri).getHost());
+}
+
 #ifndef MOBILEAPP
 
 bool isLocalhost(const std::string& targetHost)
diff --git a/wsd/Storage.hpp b/wsd/Storage.hpp
index 1e9544c2e..a2025a4fd 100644
--- a/wsd/Storage.hpp
+++ b/wsd/Storage.hpp
@@ -174,6 +174,8 @@ public:
 static std::unique_ptr create(const Poco::URI& uri,
const std::string& jailRoot,
const std::string& jailPath);
+
+static bool alowedWopiHost(const std::string& uri);
 protected:
 
 /// Returns the root path of the jail directory of docs.
commit 0bb8b7c7a8a05ec95a7668c42b8b53c6f4da07c6
Author: Tamás Zolnai 
AuthorDate: Fri Oct 19 18:14:48 2018 +0200
Commit: Tamás Zolnai 
CommitDate: Fri Oct 19 18:15:22 2018 +0200

Add /hosting/capabilities endpoint to advertise online features

Add an entry to discovery.xml with the urlsrc where capabilities end
point can be found. Use json format to send back the feature list.

Change-Id: I390a53d956d53ca79e5a8090aead7f4131ec4ca0

diff --git a/capabilities.json b/capabilities.json
new file mode 100644
index 0..32ed3801f
--- /dev/null
+++ b/capabilities.json
@@ -0,0 +1,5 @@
+{
+  "convert-to": {
+"available": false
+  }
+}
diff --git a/common/Common.hpp b/common/Common.hpp
index c7e246b88..013b30798 100644
--- a/common/Common.hpp
+++ b/common/Common.hpp
@@ -36,6 +36,8 @@ constexpr const char CHILD_URI[] = "/loolws/child?";
 constexpr const char NEW_CHILD_URI[] = "/loolws/newchild";
 constexpr const char LO_JAIL_SUBPATH[] = "lo";
 
+constexpr const char CAPABILITIES_END_POINT[] = "/hosting/capabilities";
+
 /// The HTTP re

[Libreoffice-commits] core.git: framework/source sd/source

2018-10-20 Thread Libreoffice Gerrit user
 framework/source/uiconfiguration/CommandImageResolver.cxx |2 +-
 sd/source/ui/slidesorter/model/SlsPageEnumeration.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 22f08ed485dfd34e52b7976840404def5f0292d4
Author: Andrea Gelmini 
AuthorDate: Thu Oct 18 11:35:44 2018 +0200
Commit: Christian Lohmaier 
CommitDate: Sat Oct 20 11:50:51 2018 +0200

Fix typos

Change-Id: I57ff252f8326818a57fdf10218210f70b100e088
Reviewed-on: https://gerrit.libreoffice.org/61928
Reviewed-by: Christian Lohmaier 
Tested-by: Christian Lohmaier 

diff --git a/framework/source/uiconfiguration/CommandImageResolver.cxx 
b/framework/source/uiconfiguration/CommandImageResolver.cxx
index 7e0d504083ad..c95ddeb56e76 100644
--- a/framework/source/uiconfiguration/CommandImageResolver.cxx
+++ b/framework/source/uiconfiguration/CommandImageResolver.cxx
@@ -60,7 +60,7 @@ OUString lclConvertToCanonicalName(const OUString& rFileName)
 return aBuffer.makeStringAndClear();
 }
 
-} // end anonymouse namespace
+} // end anonymous namespace
 
 CommandImageResolver::CommandImageResolver()
 {
diff --git a/sd/source/ui/slidesorter/model/SlsPageEnumeration.cxx 
b/sd/source/ui/slidesorter/model/SlsPageEnumeration.cxx
index 9b2915024085..4b4c7f13409d 100644
--- a/sd/source/ui/slidesorter/model/SlsPageEnumeration.cxx
+++ b/sd/source/ui/slidesorter/model/SlsPageEnumeration.cxx
@@ -67,7 +67,7 @@ private:
 void AdvanceToNextValidElement();
 };
 
-} // end of anonymouse namespace
+} // end of anonymous namespace
 
 namespace sd { namespace slidesorter { namespace model {
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sc/source

2018-10-20 Thread Libreoffice Gerrit user
 sc/source/ui/view/gridwin.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 392ec204197c723b4dff4f7091df5afb46b5b9db
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 09:56:30 2018 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Sat Oct 20 10:49:49 2018 +0200

copy and paste error

Change-Id: If352e7a0f6e8dab2a9acc9aa2cde56b40cedb50c
Reviewed-on: https://gerrit.libreoffice.org/61993
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index eb812f7fb215..b2bd86673130 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5605,7 +5605,7 @@ OString ScGridWindow::getCellCursor(const Fraction& 
rZoomX, const Fraction& rZoo
 SCROW nY = pViewData->GetCurY();
 
 Fraction defaultZoomX = pViewData->GetZoomX();
-Fraction defaultZoomY = pViewData->GetZoomX();
+Fraction defaultZoomY = pViewData->GetZoomY();
 
 pViewData->SetZoom(rZoomX, rZoomY, true);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sw/source

2018-10-20 Thread Libreoffice Gerrit user
 sw/source/filter/ww8/ww8par.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit fe6a98ed8fe863dd5a5aee5becb6e989c1f6a457
Author: Caolán McNamara 
AuthorDate: Tue Oct 16 09:57:36 2018 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Sat Oct 20 10:48:07 2018 +0200

ofz#10994 move the reset of trailing fly paras to before redline processing

Change-Id: I906c29848acc3917f76cb8c21e0bd581e0ded421
Reviewed-on: https://gerrit.libreoffice.org/61821
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index e2a18452cf90..bcc16adc2d98 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -5324,6 +5324,9 @@ ErrCode SwWW8ImplReader::CoreLoad(WW8Glossary const 
*pGloss)
 // stacks etc. are destroyed, and before fields
 // are updated
 m_aExtraneousParas.delete_all_from_doc();
+// ofz#10994 remove any trailing fly paras before processing redlines
+m_xWFlyPara.reset();
+m_xSFlyPara.reset();
 m_xRedlineStack->closeall(*m_pPaM->GetPoint());
 while (!m_aFrameRedlines.empty())
 m_aFrameRedlines.pop();
@@ -5417,9 +5420,6 @@ ErrCode SwWW8ImplReader::CoreLoad(WW8Glossary const 
*pGloss)
 
 UpdateFields();
 
-m_xWFlyPara.reset();
-m_xSFlyPara.reset();
-
 // delete the pam before the call for hide all redlines (Bug 73683)
 if (m_bNewDoc)
   m_rDoc.getIDocumentRedlineAccess().SetRedlineFlags(eMode);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: i18nlangtag/source include/i18nlangtag svtools/source

2018-10-20 Thread Libreoffice Gerrit user
 i18nlangtag/source/languagetag/languagetag.cxx |2 +-
 include/i18nlangtag/languagetag.hxx|2 +-
 svtools/source/misc/langtab.cxx|2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 06eb767c39d8e42698ce8497d0d3fb867c2b
Author: Stephan Bergmann 
AuthorDate: Fri Oct 19 15:53:45 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Sat Oct 20 10:39:28 2018 +0200

Turn LanguageTag::ScriptType into scoped enum

...to avoid -Werror,-Wshadow from Clang trunk with
 "Improve -Wshadow warnings with 
enumerators",
warning about shadowing of UNKNOWN in e.g. enum ESCHER_BlibType in
include/filter/msfilter/escherex.hxx

Change-Id: Id6608474e76730be4c439f480c31f661b8b5748e
Reviewed-on: https://gerrit.libreoffice.org/62013
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/i18nlangtag/source/languagetag/languagetag.cxx 
b/i18nlangtag/source/languagetag/languagetag.cxx
index ba3d82cce475..c0e27492f912 100644
--- a/i18nlangtag/source/languagetag/languagetag.cxx
+++ b/i18nlangtag/source/languagetag/languagetag.cxx
@@ -673,7 +673,7 @@ LanguageTag::ScriptType LanguageTag::getOnTheFlyScriptType( 
LanguageType nRegist
 if (itID != rMapLangID.end())
 return (*itID).second->getScriptType();
 else
-return UNKNOWN;
+return ScriptType::UNKNOWN;
 }
 
 
diff --git a/include/i18nlangtag/languagetag.hxx 
b/include/i18nlangtag/languagetag.hxx
index 9f3dc877d9de..08fc60dac933 100644
--- a/include/i18nlangtag/languagetag.hxx
+++ b/include/i18nlangtag/languagetag.hxx
@@ -62,7 +62,7 @@ public:
 These need to correspond to the ExtraLanguages.ScriptType template
 property in officecfg/registry/schema/org/openoffice/VCL.xcs
  */
-enum ScriptType
+enum class ScriptType
 {
 UNKNOWN = 0,
 WESTERN = 1,  // Copies css::i18n::ScriptType for strong types
diff --git a/svtools/source/misc/langtab.cxx b/svtools/source/misc/langtab.cxx
index da486b63b90c..5ba340c2efc3 100644
--- a/svtools/source/misc/langtab.cxx
+++ b/svtools/source/misc/langtab.cxx
@@ -186,7 +186,7 @@ SvtLanguageTableImpl::SvtLanguageTableImpl()
 {
 LanguageTag aLang(rBcp47);
 LanguageType nLangType = aLang.getLanguageType();
-if (nType <= LanguageTag::ScriptType::RTL && nType > 
LanguageTag::ScriptType::UNKNOWN)
+if (nType <= sal_Int32(LanguageTag::ScriptType::RTL) && nType > 
sal_Int32(LanguageTag::ScriptType::UNKNOWN))
 aLang.setScriptType(LanguageTag::ScriptType(nType));
 sal_uInt32 nPos = FindIndex(nLangType);
 if (nPos == RESARRAY_INDEX_NOTFOUND)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-10-20 Thread Libreoffice Gerrit user
 extensions/source/activex/SODispatchInterceptor.cxx |8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 07a70e84f21ef2a69d8b7a69a1bd3844a0c362f5
Author: Mike Kaganski 
AuthorDate: Sat Oct 20 08:23:10 2018 +0200
Commit: Mike Kaganski 
CommitDate: Sat Oct 20 09:24:13 2018 +0200

tdf#120703 (PVS): compare BSTR to wchar_t[] directly

V505 The 'alloca' function is used inside the loop. This can quickly 
overflow
 stack.

Change-Id: I57773664000df0f5329f957674661a2313205223
Reviewed-on: https://gerrit.libreoffice.org/62038
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/extensions/source/activex/SODispatchInterceptor.cxx 
b/extensions/source/activex/SODispatchInterceptor.cxx
index ed610c56da8f..8cfe36c9e981 100644
--- a/extensions/source/activex/SODispatchInterceptor.cxx
+++ b/extensions/source/activex/SODispatchInterceptor.cxx
@@ -76,8 +76,7 @@ STDMETHODIMP SODispatchInterceptor::queryDispatch( IDispatch 
FAR* aURL,
 
 if( aTargetUrl.vt != VT_BSTR  ) return E_FAIL;
 
-USES_CONVERSION;
-if( !strncmp( OLE2T( aTargetUrl.bstrVal ), ".uno:OpenHyperlink", 18 ) )
+if (!wcsncmp(aTargetUrl.bstrVal, L".uno:OpenHyperlink", 18))
 {
 CComQIPtr< IDispatch, &IID_IDispatch > pIDisp( this );
 if( pIDisp )
@@ -167,8 +166,7 @@ STDMETHODIMP SODispatchInterceptor::dispatch( IDispatch 
FAR* aURL, SAFEARRAY FAR
 if( pValue.vt != VT_BSTR || pValue.bstrVal == nullptr )
 return E_FAIL;
 
-USES_CONVERSION;
-if( !strncmp( OLE2T( pValue.bstrVal ), ".uno:OpenHyperlink", 18 ) )
+if (!wcsncmp(pValue.bstrVal, L".uno:OpenHyperlink", 18))
 {
 long nLB = 0, nUB = 0;
 // long nDim = SafeArrayGetDim( aArgs );
@@ -193,7 +191,7 @@ STDMETHODIMP SODispatchInterceptor::dispatch( IDispatch 
FAR* aURL, SAFEARRAY FAR
 
 if( pValues[0].vt == VT_BSTR && pValues[1].vt == VT_BSTR )
 {
-if( !strncmp( OLE2T( pValues[0].bstrVal ), "URL", 3 ) )
+if (!wcsncmp(pValues[0].bstrVal, L"URL", 3))
 {
 EnterCriticalSection( &mMutex );
 if( m_xParentControl )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits