[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - include/sfx2 sfx2/source

2019-07-08 Thread Mike Kaganski (via logerrit)
 include/sfx2/docfile.hxx |3 +
 include/sfx2/strings.hrc |3 +
 sfx2/source/doc/docfile.cxx  |   73 ++-
 sfx2/source/view/viewfrm.cxx |   41 
 4 files changed, 84 insertions(+), 36 deletions(-)

New commits:
commit 45bb41b169844ed913b42833a1c130c2d92678ec
Author: Mike Kaganski 
AuthorDate: Fri Jul 5 17:56:38 2019 +1000
Commit: Mike Kaganski 
CommitDate: Tue Jul 9 07:59:20 2019 +0200

Show who has locked the document when reopening a read-only document

Pass the locking data from SfxMedium::LockOrigFileOnDemand, to allow
clients to show it themselves when required.

Change-Id: I6afe46a1896e1b60771c080efa2f58794dbed8a6
Reviewed-on: https://gerrit.libreoffice.org/75113
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
Reviewed-on: https://gerrit.libreoffice.org/75137
Tested-by: Mike Kaganski 
Reviewed-on: https://gerrit.libreoffice.org/75285
Tested-by: Jenkins CollaboraOffice 

diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx
index eae58edf0823..5e53c412763b 100644
--- a/include/sfx2/docfile.hxx
+++ b/include/sfx2/docfile.hxx
@@ -169,7 +169,8 @@ public:
 FailedLockFile, // there was only lock file that prevented success - 
no syslock or IO error
 Succeeded,
 };
-LockFileResult  LockOrigFileOnDemand( bool bLoading, bool bNoUI, bool 
bTryIgnoreLockFile = false );
+LockFileResult LockOrigFileOnDemand(bool bLoading, bool bNoUI, bool 
bTryIgnoreLockFile = false,
+LockFileEntry* pLockData = nullptr);
 voidDisableUnlockWebDAV( bool bDisableUnlockWebDAV = true 
);
 voidUnlockFile( bool bReleaseLockStream );
 /// Lets Transfer_Impl() not fsync the output file.
diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc
index 597afd21836f..7508ce813e0f 100644
--- a/include/sfx2/strings.hrc
+++ b/include/sfx2/strings.hrc
@@ -239,7 +239,8 @@
 #define STR_ERROR_SEND_MAIL_CODE
NC_("STR_ERROR_SEND_MAIL_CODE", "An error occurred in sending the message. 
Possible errors could be a missing user account or a defective setup.\n\nError 
code is $1")
 #define STR_ERROR_SEND_MAIL_HEADER  
NC_("STR_ERROR_SEND_MAIL_HEADER", "Error sending mail")
 #define STR_QUERY_OPENASTEMPLATE
NC_("STR_QUERY_OPENASTEMPLATE", "This document cannot be edited, possibly due 
to missing access rights. Do you want to edit a copy of the document?")
-#define STR_QUERY_OPENASTEMPLATE_ALLOW_IGNORE   
NC_("STR_QUERY_OPENASTEMPLATE_ALLOW_IGNORE", "This document cannot be edited, 
because it is locked in another session. Do you want to edit a copy of the 
document?\n\nYou can also try to ignore the lock and open the file for 
editing.")
+#define STR_QUERY_OPENASTEMPLATE_LOCKED 
NC_("STR_QUERY_OPENASTEMPLATE_LOCKED", "This document cannot be edited, because 
it is locked in another session.%LOCKINFO\nDo you want to edit a copy of the 
document?")
+#define STR_QUERY_OPENASTEMPLATE_ALLOW_IGNORE   
NC_("STR_QUERY_OPENASTEMPLATE_ALLOW_IGNORE", "You can also try to ignore the 
lock and open the file for editing.")
 #define STR_QUERY_OPENASTEMPLATE_OPENCOPY_BTN   
NC_("STR_QUERY_OPENASTEMPLATE_OPENCOPY_BTN", "Open ~Copy")
 #define STR_QUERY_OPENASTEMPLATE_OPEN_BTN   
NC_("STR_QUERY_OPENASTEMPLATE_OPEN_BTN", "~Open")
 #define STR_REPAIREDDOCUMENTNC_("STR_REPAIREDDOCUMENT", " 
(repaired document)")
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index ed96ed98395b..012481c849fd 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -1063,7 +1063,9 @@ namespace
 
 // sets SID_DOC_READONLY if the document cannot be opened for editing
 // if user cancel the loading the ERROR_ABORT is set
-SfxMedium::LockFileResult SfxMedium::LockOrigFileOnDemand( bool bLoading, bool 
bNoUI, bool bTryIgnoreLockFile )
+SfxMedium::LockFileResult SfxMedium::LockOrigFileOnDemand(bool bLoading, bool 
bNoUI,
+  bool 
bTryIgnoreLockFile,
+  LockFileEntry* 
pLockData)
 {
 #if !HAVE_FEATURE_MULTIUSER_ENVIRONMENT
 (void) bLoading;
@@ -1114,37 +1116,47 @@ SfxMedium::LockFileResult 
SfxMedium::LockOrigFileOnDemand( bool bLoading, bool b
 catch ( ucb::InteractiveLockingLockedException& )
 {
 // received when the resource is already locked
-// get the lock owner, using a special ucb.webdav 
property
-// the owner property retrieved here is  what the 
other principal send the server
-// when activating the lock.
-// See 
http://tools.ietf.org/html/rfc4918#section-14.17 for details
-LockFileEn

[Libreoffice-commits] core.git: configure.ac

2019-07-08 Thread Tomaž Vajngerl (via logerrit)
 configure.ac |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 99e6eaf28c3cceb4fbf5292b255354dd1bdbe471
Author: Tomaž Vajngerl 
AuthorDate: Tue Jul 9 11:44:21 2019 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Jul 9 11:57:56 2019 +0900

use the specific header file for the SSE/AVX in intrin. detection

x86intrin.h is only available for gcc/clang, specific headers are
available in all compilers (if they support that specific intrin.
at all)

Change-Id: Ic6dec052c150032f67ae76e0ca362c4bc77b55b0

diff --git a/configure.ac b/configure.ac
index b9785d895366..b76d977924ea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6759,7 +6759,7 @@ if test "$GCC" = "yes"; then
 save_CXXFLAGS=$CXXFLAGS
 CXXFLAGS="$CXXFLAGS -msse2"
 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-#include 
+#include 
 int main () {
 volatile __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
 c = _mm_xor_si128 (a, b);
@@ -6782,7 +6782,7 @@ if test "$GCC" = "yes"; then
 save_CXXFLAGS=$CXXFLAGS
 CXXFLAGS="$CXXFLAGS -mssse3"
 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-#include 
+#include 
 int main () {
 volatile __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
 c = _mm_maddubs_epi16 (a, b);
@@ -6805,7 +6805,7 @@ if test "$GCC" = "yes"; then
 save_CXXFLAGS=$CXXFLAGS
 CXXFLAGS="$CXXFLAGS -mavx"
 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-#include 
+#include 
 int main () {
 volatile __m256 a = _mm256_set1_ps (0.0f), b = _mm256_set1_ps 
(0.0f), c;
 c = _mm256_xor_ps(a, b);
@@ -6828,7 +6828,7 @@ if test "$GCC" = "yes"; then
 save_CXXFLAGS=$CXXFLAGS
 CXXFLAGS="$CXXFLAGS -mavx2"
 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-#include 
+#include 
 int main () {
 volatile __m256i a = _mm256_set1_epi32 (0), b = _mm256_set1_epi32 
(0), c;
 c = _mm256_maddubs_epi16(a, b);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-08 Thread Andrea Gelmini (via logerrit)
 sw/source/core/inc/pagefrm.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b7fa764f39631605d1ba1b5dba17373b82df2378
Author: Andrea Gelmini 
AuthorDate: Mon Jul 8 13:33:02 2019 +
Commit: Jens Carl 
CommitDate: Tue Jul 9 04:56:21 2019 +0200

Fix typo

Change-Id: I1395f7ee7f766504d0d1d58f01f32cac9b47d6cc
Reviewed-on: https://gerrit.libreoffice.org/75223
Tested-by: Jenkins
Reviewed-by: Jens Carl 

diff --git a/sw/source/core/inc/pagefrm.hxx b/sw/source/core/inc/pagefrm.hxx
index cde37465f8c0..0a3782cca408 100644
--- a/sw/source/core/inc/pagefrm.hxx
+++ b/sw/source/core/inc/pagefrm.hxx
@@ -313,7 +313,7 @@ public:
 
 const SwRect PrtWithoutHeaderAndFooter() const;
 
-// in case this is am empty page, this function returns the 'reference' 
page
+// in case this is an empty page, this function returns the 'reference' 
page
 const SwPageFrame& GetFormatPage() const;
 
 /// If in header or footer area, it also indicates the exact area in 
rControl.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: include/editeng

2019-07-08 Thread Andrea Gelmini (via logerrit)
 include/editeng/unoedhlp.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 570119ac367880799291cefe10dc12c12165bfc1
Author: Andrea Gelmini 
AuthorDate: Mon Jul 8 10:44:42 2019 +
Commit: Jens Carl 
CommitDate: Tue Jul 9 04:55:43 2019 +0200

Fix typo

Change-Id: I03ab598b2d1e0b5c5969e8bb9e2700c6ada8864a
Reviewed-on: https://gerrit.libreoffice.org/75269
Tested-by: Jenkins
Reviewed-by: Jens Carl 

diff --git a/include/editeng/unoedhlp.hxx b/include/editeng/unoedhlp.hxx
index 45f51e9b38e6..fdb4f910ac4a 100644
--- a/include/editeng/unoedhlp.hxx
+++ b/include/editeng/unoedhlp.hxx
@@ -63,7 +63,7 @@ public:
 /** Translates EditEngine notifications into broadcastable hints
 
 @param aNotify
-Notification object send by the EditEngine.
+Notification object sent by the EditEngine.
 
 @return the translated hint
  */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-08 Thread Andrea Gelmini (via logerrit)
 basegfx/source/polygon/b2dtrapezoid.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 70c1499a42a65e3bd1f90b76b3d366414dc96c08
Author: Andrea Gelmini 
AuthorDate: Mon Jul 8 10:44:50 2019 +
Commit: Jens Carl 
CommitDate: Tue Jul 9 04:54:00 2019 +0200

Fix typo

Change-Id: I176857689f0594ba2814b419a0ec1f8ce3423c2a
Reviewed-on: https://gerrit.libreoffice.org/75260
Tested-by: Jenkins
Reviewed-by: Jens Carl 

diff --git a/basegfx/source/polygon/b2dtrapezoid.cxx 
b/basegfx/source/polygon/b2dtrapezoid.cxx
index 12877ef4b153..3997feed01eb 100644
--- a/basegfx/source/polygon/b2dtrapezoid.cxx
+++ b/basegfx/source/polygon/b2dtrapezoid.cxx
@@ -527,7 +527,7 @@ namespace basegfx
 }
 
 // Moved the edge construction to a 3rd run: doing it in 
the 2nd run is
-// possible(and i used it), but requires a working 
vector::reserve()
+// possible (and I used it), but requires a working 
vector::reserve()
 // implementation, else the vector will be reallocated and 
the pointers
 // in the edges may be wrong. Security first here.
 sal_uInt32 nStartIndex(0);
@@ -631,7 +631,7 @@ namespace basegfx
 {
 // Should not happen: No 2nd edge; consume the single 
edge
 // to not have an endless loop and start next. During 
development
-// i constantly had breakpoints here, so I am sure 
enough to add an
+// I constantly had breakpoints here, so I am sure 
enough to add an
 // assertion here
 OSL_FAIL("Trapezoid decomposer in illegal state (!)");
 maTrDeEdgeEntries.pop_front();
@@ -645,7 +645,7 @@ namespace basegfx
 {
 // Should not happen: We have a 2nd edge, but YStart 
is on another
 // line; consume the single edge to not have an 
endless loop and start
-// next. During development i constantly had 
breakpoints here, so I am
+// next. During development I constantly had 
breakpoints here, so I am
 // sure enough to add an assertion here
 OSL_FAIL("Trapezoid decomposer in illegal state (!)");
 maTrDeEdgeEntries.pop_front();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: include/editeng

2019-07-08 Thread Andrea Gelmini (via logerrit)
 include/editeng/AccessibleContextBase.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ef1e659aed3936bcb128f0ed3c9c1ddc8a14782d
Author: Andrea Gelmini 
AuthorDate: Mon Jul 8 10:44:44 2019 +
Commit: Jens Carl 
CommitDate: Tue Jul 9 04:53:02 2019 +0200

Fix typo

Change-Id: I8319d3350fd5c9f6738ad6329dbd8a2252809515
Reviewed-on: https://gerrit.libreoffice.org/75266
Tested-by: Jenkins
Reviewed-by: Jens Carl 

diff --git a/include/editeng/AccessibleContextBase.hxx 
b/include/editeng/AccessibleContextBase.hxx
index 50f27af5cef1..1293c31e2d32 100644
--- a/include/editeng/AccessibleContextBase.hxx
+++ b/include/editeng/AccessibleContextBase.hxx
@@ -245,7 +245,7 @@ public:
 
 //=  XTypeProvider  ===
 
-/** Returns a implementation id.
+/** Returns an implementation id.
 */
 virtual css::uno::Sequence SAL_CALL
 getImplementationId() override;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: include/editeng

2019-07-08 Thread Andrea Gelmini (via logerrit)
 include/editeng/AccessibleComponentBase.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3ae7373800121f33d2a4bd363aaf6be39cbf4a4b
Author: Andrea Gelmini 
AuthorDate: Mon Jul 8 10:44:45 2019 +
Commit: Jens Carl 
CommitDate: Tue Jul 9 04:52:32 2019 +0200

Fix typo

Change-Id: I20328956a55aa717b898ff5f77d4353de4182de5
Reviewed-on: https://gerrit.libreoffice.org/75265
Tested-by: Jenkins
Reviewed-by: Jens Carl 

diff --git a/include/editeng/AccessibleComponentBase.hxx 
b/include/editeng/AccessibleComponentBase.hxx
index 50a9155933a1..d3c5805ef75a 100644
--- a/include/editeng/AccessibleComponentBase.hxx
+++ b/include/editeng/AccessibleComponentBase.hxx
@@ -30,7 +30,7 @@ namespace com::sun::star::accessibility { class XAccessible; }
 namespace accessibility {
 
 /** @descr
-This base class provides (will provice) a base implementation of the
+This base class provides (will provide) a base implementation of the
 XAccessibleComponent and the
 XAccessibleExtendedComponent for all shapes.  For
 more detailed documentation about the methods refer to the interface
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: include/drawinglayer

2019-07-08 Thread Andrea Gelmini (via logerrit)
 include/drawinglayer/primitive3d/baseprimitive3d.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4cd5a3fb17db08d59ea19c5cb0b0395d791ac5df
Author: Andrea Gelmini 
AuthorDate: Mon Jul 8 10:44:47 2019 +
Commit: Jens Carl 
CommitDate: Tue Jul 9 04:51:43 2019 +0200

Fix typo

Change-Id: Ia580a674e6204fe81b919db67def8b7834f4c0db
Reviewed-on: https://gerrit.libreoffice.org/75263
Tested-by: Jenkins
Reviewed-by: Jens Carl 

diff --git a/include/drawinglayer/primitive3d/baseprimitive3d.hxx 
b/include/drawinglayer/primitive3d/baseprimitive3d.hxx
index dc419df482cb..4e93523f8e8e 100644
--- a/include/drawinglayer/primitive3d/baseprimitive3d.hxx
+++ b/include/drawinglayer/primitive3d/baseprimitive3d.hxx
@@ -31,7 +31,7 @@
 
 /** defines for DeclPrimitive3DIDBlock and ImplPrimitive3DIDBlock
 Added to be able to simply change identification stuff later, e.g. add
-a identification string and/or ID to the interface and to the 
implementation
+an identification string and/or ID to the interface and to the 
implementation
 ATM used to delclare implement getPrimitive3DID()
  */
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: include/drawinglayer

2019-07-08 Thread Andrea Gelmini (via logerrit)
 include/drawinglayer/processor3d/defaultprocessor3d.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ebf60fdb52884f23572fad5826c853e949424884
Author: Andrea Gelmini 
AuthorDate: Mon Jul 8 10:44:46 2019 +
Commit: Jens Carl 
CommitDate: Tue Jul 9 04:51:15 2019 +0200

Fix typo

Change-Id: If4e37c0d4b93ba42e95dd1977e2ae53cd7452ce2
Reviewed-on: https://gerrit.libreoffice.org/75264
Tested-by: Jenkins
Reviewed-by: Jens Carl 

diff --git a/include/drawinglayer/processor3d/defaultprocessor3d.hxx 
b/include/drawinglayer/processor3d/defaultprocessor3d.hxx
index 1de9bb89cf81..6e4548b94710 100644
--- a/include/drawinglayer/processor3d/defaultprocessor3d.hxx
+++ b/include/drawinglayer/processor3d/defaultprocessor3d.hxx
@@ -59,7 +59,7 @@ namespace drawinglayer
 {
 /** DefaultProcessor3D class
 
-This processor renders all feeded primitives to a 2D raster where 
for all
+This processor renders all fed primitives to a 2D raster where for 
all
 primitives the two basic methods rasterconvertB3DPolygon for 
hairlines and
 rasterconvertB3DPolyPolygon for filled geometry is called. It is a 
baseclass to
 e.g. base a Z-Buffer supported renderer on the 3D primitive 
processing.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-08 Thread Andrea Gelmini (via logerrit)
 sc/source/core/data/formulacell.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 648e18cc9dde5ae1b4f3747b0c4f0dbcc7e90a8b
Author: Andrea Gelmini 
AuthorDate: Mon Jul 8 13:43:16 2019 +
Commit: Jens Carl 
CommitDate: Tue Jul 9 04:50:24 2019 +0200

Fix typo

Change-Id: I5fee961beeb7cc18f767a61a3b7d65bb4e07f47c
Reviewed-on: https://gerrit.libreoffice.org/75257
Tested-by: Jenkins
Reviewed-by: Jens Carl 

diff --git a/sc/source/core/data/formulacell.cxx 
b/sc/source/core/data/formulacell.cxx
index 365f4151aca6..abea9faf0318 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -3265,7 +3265,7 @@ bool ScFormulaCell::UpdateReferenceOnShift(
 bRecompile = (eRelNameRef == RelNameRef::DOUBLE);
 }
 // Reference changed and new listening needed?
-// Except in Insert/Delete without specialties.
+// Except in Insert/Delete without specialities.
 bNewListening = (bRefModified || bRecompile
 || (bValChanged && bInDeleteUndo) || bHasRelName);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-08 Thread Mike Kaganski (via logerrit)
 tools/source/misc/cpuid.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 11d0cc07433206d5cc52fdfa7e91c2e28ef276ca
Author: Mike Kaganski 
AuthorDate: Tue Jul 9 04:41:51 2019 +0200
Commit: Mike Kaganski 
CommitDate: Tue Jul 9 04:43:09 2019 +0200

Fix Android build after commit fc0850d2784eaa79257cf1ea8c5d078c5241b5bf

The second parameter is unused

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

diff --git a/tools/source/misc/cpuid.cxx b/tools/source/misc/cpuid.cxx
index c4d4b8147595..41791be27897 100644
--- a/tools/source/misc/cpuid.cxx
+++ b/tools/source/misc/cpuid.cxx
@@ -28,7 +28,7 @@ void getCpuId(uint32_t array[4], uint32_t nInfoType)
 __cpuid_count(nInfoType, 0, *(array + 0), *(array + 1), *(array + 2), 
*(array + 3));
 }
 #else
-void getCpuId(uint32_t array[4], uint32_t nInfoType)
+void getCpuId(uint32_t array[4], uint32_t /*nInfoType*/)
 {
array[0] = array[1] =  array[2] = array[3] = 0;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-08 Thread Mike Kaganski (via logerrit)
 sc/source/core/inc/arraysumfunctor.hxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 1f25fd18f006c89c5e387b4ca8546025bc3a969b
Author: Mike Kaganski 
AuthorDate: Tue Jul 9 12:13:13 2019 +1000
Commit: Mike Kaganski 
CommitDate: Tue Jul 9 04:30:26 2019 +0200

Fix Windows x64 build after commit f43f9b99603736a4d54f550052509eb5f4d04b45

... and Windows x32, if it's built with sse2 baseline (will be the default
when we drop support for Windows 7).

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

diff --git a/sc/source/core/inc/arraysumfunctor.hxx 
b/sc/source/core/inc/arraysumfunctor.hxx
index 05977c026361..b4da4d9d4064 100644
--- a/sc/source/core/inc/arraysumfunctor.hxx
+++ b/sc/source/core/inc/arraysumfunctor.hxx
@@ -19,8 +19,12 @@
 #include 
 
 #if defined(LO_SSE2_AVAILABLE)
+#ifdef _WIN32
+#include 
+#else
 #include 
 #endif
+#endif
 
 namespace sc
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-08 Thread Tomaž Vajngerl (via logerrit)
 tools/source/misc/cpuid.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fc0850d2784eaa79257cf1ea8c5d078c5241b5bf
Author: Tomaž Vajngerl 
AuthorDate: Tue Jul 9 10:47:20 2019 +0900
Commit: Tomaž Vajngerl 
CommitDate: Tue Jul 9 10:49:33 2019 +0900

fix android build - fallback getCpuId only had one parameter

Change-Id: I91c679506aad727c7f536e79e79a720db860b5ae

diff --git a/tools/source/misc/cpuid.cxx b/tools/source/misc/cpuid.cxx
index e8699cbdf51c..c4d4b8147595 100644
--- a/tools/source/misc/cpuid.cxx
+++ b/tools/source/misc/cpuid.cxx
@@ -28,7 +28,7 @@ void getCpuId(uint32_t array[4], uint32_t nInfoType)
 __cpuid_count(nInfoType, 0, *(array + 0), *(array + 1), *(array + 2), 
*(array + 3));
 }
 #else
-void getCpuId(uint32_t array[4])
+void getCpuId(uint32_t array[4], uint32_t nInfoType)
 {
array[0] = array[1] =  array[2] = array[3] = 0;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: config_host.mk.in configure.ac include/tools sc/source tools/CppunitTest_tools_test.mk tools/qa tools/source

2019-07-08 Thread Tomaž Vajngerl (via logerrit)
 config_host.mk.in  |1 
 configure.ac   |  102 
 include/tools/cpuid.hxx|   71 ---
 include/tools/simd.hxx |   30 
 include/tools/simdsupport.hxx  |   62 +
 sc/source/core/data/formulacell.cxx|2 
 sc/source/core/inc/arraysumfunctor.hxx |   15 +---
 tools/CppunitTest_tools_test.mk|4 +
 tools/qa/cppunit/test_cpuid.cxx|   74 
 tools/source/misc/cpuid.cxx|  119 +
 10 files changed, 434 insertions(+), 46 deletions(-)

New commits:
commit f43f9b99603736a4d54f550052509eb5f4d04b45
Author: Tomaž Vajngerl 
AuthorDate: Mon May 8 10:47:04 2017 +0200
Commit: Tomaž Vajngerl 
CommitDate: Tue Jul 9 02:46:43 2019 +0200

CPU intrinsics detection (SSE, AVX)

Adds CPU intrinsics detection in configure pass for compile time
detection and "cpuid" runtime detection of which CPU instruction
sets are available on the user device.

Change-Id: I0ee4d0b22a7c51f72796d43e7383a31d03b437ad
Reviewed-on: https://gerrit.libreoffice.org/75175
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/config_host.mk.in b/config_host.mk.in
index 5c7038211a11..9bde2ff2a214 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -648,6 +648,7 @@ export ZLIB_LIBS=$(gb_SPACE)@ZLIB_LIBS@
 export ZMF_CFLAGS=$(gb_SPACE)@ZMF_CFLAGS@
 export ZMF_LIBS=$(gb_SPACE)@ZMF_LIBS@
 export USE_AVMEDIA_DUMMY=@USE_AVMEDIA_DUMMY@
+export INTRINSICS_CXXFLAGS=@INTRINSICS_CXXFLAGS@
 
 # lang-related stuff
 include $(BUILDDIR)/config_$(gb_Side)_lang.mk
diff --git a/configure.ac b/configure.ac
index ba079753729f..b9785d895366 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6748,6 +6748,108 @@ fi
 AC_SUBST([HAVE_BROKEN_GCC_WMAYBE_UNINITIALIZED])
 
 dnl ===
+dnl CPU Intrinsincs support - SSE, AVX
+dnl ===
+
+INTRINSICS_CXXFLAGS=""
+
+if test "$GCC" = "yes"; then
+AC_MSG_CHECKING([whether $CXX can compile SSE2 intrinsics])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS -msse2"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+#include 
+int main () {
+volatile __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
+c = _mm_xor_si128 (a, b);
+return 0;
+}
+])],
+[can_compile_sse2=yes],
+[can_compile_sse2=no])
+AC_LANG_POP([C++])
+CXXFLAGS=$save_CXXFLAGS
+AC_MSG_RESULT([${can_compile_sse2}])
+if test "${can_compile_sse2}" = "yes" ; then
+INTRINSICS_CXXFLAGS="-msse2"
+else
+AC_MSG_WARN([cannot compile SSE2 intrinsics])
+fi
+
+AC_MSG_CHECKING([whether $CXX can compile SSSE3 intrinsics])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS -mssse3"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+#include 
+int main () {
+volatile __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
+c = _mm_maddubs_epi16 (a, b);
+return 0;
+}
+])],
+[can_compile_ssse3=yes],
+[can_compile_ssse3=no])
+AC_LANG_POP([C++])
+CXXFLAGS=$save_CXXFLAGS
+AC_MSG_RESULT([${can_compile_ssse3}])
+if test "${can_compile_ssse3}" = "yes" ; then
+INTRINSICS_CXXFLAGS="-mssse3"
+else
+AC_MSG_WARN([cannot compile SSSE3 intrinsics])
+fi
+
+AC_MSG_CHECKING([whether $CXX can compile AVX intrinsics])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS -mavx"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+#include 
+int main () {
+volatile __m256 a = _mm256_set1_ps (0.0f), b = _mm256_set1_ps 
(0.0f), c;
+c = _mm256_xor_ps(a, b);
+return 0;
+}
+])],
+[can_compile_avx=yes],
+[can_compile_avx=no])
+AC_LANG_POP([C++])
+CXXFLAGS=$save_CXXFLAGS
+AC_MSG_RESULT([${can_compile_avx}])
+if test "${can_compile_avx}" = "yes" ; then
+INTRINSICS_CXXFLAGS="-mavx"
+else
+AC_MSG_WARN([cannot compile AVX intrinsics])
+fi
+
+AC_MSG_CHECKING([whether $CXX can compile AVX2 intrinsics])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS -mavx2"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+#include 
+int main () {
+volatile __m256i a = _mm256_set1_epi32 (0), b = _mm256_set1_epi32 
(0), c;
+c = _mm256_maddubs_epi16(a, b);
+return 0;
+}
+])],
+[can_compile_avx2=yes],
+[can_compile_avx2=no])
+AC_LANG_POP([C++])
+CXXFLAGS=$save_CXXFLAGS
+AC_MSG_RESULT([${can_compile_avx2}])
+if test "${can_compile_avx2}" = "yes" ; then
+INTRINSICS_CXXFLAGS="

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

2019-07-08 Thread Mike Kaganski (via logerrit)
 sal/osl/w32/time.cxx |   36 
 1 file changed, 20 insertions(+), 16 deletions(-)

New commits:
commit f65905dd0ff464774f338db44d69925f98e1766c
Author: Mike Kaganski 
AuthorDate: Tue Jul 9 01:09:35 2019 +0200
Commit: Mike Kaganski 
CommitDate: Tue Jul 9 02:03:44 2019 +0200

Optimize osl_getSystemTime on Windows

Make OffTime static const; don't cast from FILETIME to __int64 (see

https://docs.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-filetime
for explanation: "it can cause alignment faults on 64-bit Windows").
Instead, cast in opposite direction: from 8-byte-aligned 64-bit integer
to FILETIME.

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

diff --git a/sal/osl/w32/time.cxx b/sal/osl/w32/time.cxx
index 135aab368fc8..ae499dcf8a8c 100644
--- a/sal/osl/w32/time.cxx
+++ b/sal/osl/w32/time.cxx
@@ -29,9 +29,7 @@
 
 sal_Bool SAL_CALL osl_getSystemTime(TimeValue* pTimeVal)
 {
-SYSTEMTIME SystemTime;
-FILETIME   CurTime, OffTime;
-__int64Value;
+unsigned __int64 CurTime;
 
 typedef VOID (WINAPI *GetSystemTimePreciseAsFileTime_PROC)(LPFILETIME);
 
@@ -46,25 +44,31 @@ sal_Bool SAL_CALL osl_getSystemTime(TimeValue* pTimeVal)
 
 // use ~1 microsecond resolution if available
 if (pGetSystemTimePreciseAsFileTime)
-pGetSystemTimePreciseAsFileTime(&CurTime);
+
pGetSystemTimePreciseAsFileTime(reinterpret_cast(&CurTime));
 else
 {
+SYSTEMTIME SystemTime;
 GetSystemTime(&SystemTime);
-SystemTimeToFileTime(&SystemTime, &CurTime);
+SystemTimeToFileTime(&SystemTime, 
reinterpret_cast(&CurTime));
 }
 
-SystemTime.wYear = 1970;
-SystemTime.wMonth= 1;
-SystemTime.wDayOfWeek= 0;
-SystemTime.wDay  = 1;
-SystemTime.wHour = 0;
-SystemTime.wMinute   = 0;
-SystemTime.wSecond   = 0;
-SystemTime.wMilliseconds = 0;
-
-SystemTimeToFileTime(&SystemTime, &OffTime);
+static const unsigned __int64 OffTime = [] {
+SYSTEMTIME SystemTime;
+SystemTime.wYear = 1970;
+SystemTime.wMonth = 1;
+SystemTime.wDayOfWeek = 0;
+SystemTime.wDay = 1;
+SystemTime.wHour = 0;
+SystemTime.wMinute = 0;
+SystemTime.wSecond = 0;
+SystemTime.wMilliseconds = 0;
+
+unsigned __int64 ft;
+SystemTimeToFileTime(&SystemTime, reinterpret_cast(&ft));
+return ft;
+}();
 
-Value = *reinterpret_cast<__int64 *>(&CurTime) - *reinterpret_cast<__int64 
*>(&OffTime);
+const unsigned __int64 Value = CurTime - OffTime;
 
 pTimeVal->Seconds  = static_cast(Value / 1000L);
 pTimeVal->Nanosec  = static_cast((Value % 1000L) * 100);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-08 Thread Mike Kaganski (via logerrit)
 ucb/source/ucp/webdav-neon/NeonLockStore.cxx |7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

New commits:
commit e22adfad195c22e98a47fd09c439ec96da247488
Author: Mike Kaganski 
AuthorDate: Tue Jul 9 00:01:02 2019 +0200
Commit: Mike Kaganski 
CommitDate: Tue Jul 9 01:14:24 2019 +0200

Use constexpr ctor to simplify TimeValue initialization

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

diff --git a/ucb/source/ucp/webdav-neon/NeonLockStore.cxx 
b/ucb/source/ucp/webdav-neon/NeonLockStore.cxx
index 8ac218915a4d..a4d25b4b1e31 100644
--- a/ucb/source/ucp/webdav-neon/NeonLockStore.cxx
+++ b/ucb/source/ucp/webdav-neon/NeonLockStore.cxx
@@ -72,16 +72,13 @@ void TickerThread::execute()
 int nCount = nNth;
 while ( !m_bFinish )
 {
-if ( nCount-- <= 0 )
+if (--nCount < 0)
 {
 m_rLockStore.refreshLocks();
 nCount = nNth;
 }
 
-TimeValue aTV;
-aTV.Seconds = 0;
-aTV.Nanosec = 10 / nNth;
-salhelper::Thread::wait( aTV );
+salhelper::Thread::wait(TimeValue(0, 10 / nNth));
 }
 
 SAL_INFO( "ucb.ucp.webdav", "TickerThread: stop." );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: sd/uiconfig

2019-07-08 Thread andreas kainz (via logerrit)
 sd/uiconfig/sdraw/ui/notebookbar_compact.ui|2 +-
 sd/uiconfig/simpress/ui/notebookbar_compact.ui |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ec1a3d9dcefd619a1dba3de3903efaf32fff4cdc
Author: andreas kainz 
AuthorDate: Mon Jul 8 23:37:10 2019 +0200
Commit: andreas_kainz 
CommitDate: Tue Jul 9 01:01:37 2019 +0200

NB tabbed_compact sd apps fix wrong DrawText command

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

diff --git a/sd/uiconfig/sdraw/ui/notebookbar_compact.ui 
b/sd/uiconfig/sdraw/ui/notebookbar_compact.ui
index aa63fb1d9d15..725b9e60b5cd 100644
--- a/sd/uiconfig/sdraw/ui/notebookbar_compact.ui
+++ b/sd/uiconfig/sdraw/ui/notebookbar_compact.ui
@@ -5065,7 +5065,7 @@
   
 True
 False
-.uno:DrawText
+.uno:Text
   
   
 False
diff --git a/sd/uiconfig/simpress/ui/notebookbar_compact.ui 
b/sd/uiconfig/simpress/ui/notebookbar_compact.ui
index 34416a75e6cb..591a2c68674e 100644
--- a/sd/uiconfig/simpress/ui/notebookbar_compact.ui
+++ b/sd/uiconfig/simpress/ui/notebookbar_compact.ui
@@ -5338,7 +5338,7 @@
   
 True
 False
-.uno:DrawText
+.uno:Text
   
   
 False
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-08 Thread Arkadiy Illarionov (via logerrit)
 sw/source/uibase/docvw/edtwin.cxx |7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

New commits:
commit ec00f4ed642344364b6de7afa3f03501fec05994
Author: Arkadiy Illarionov 
AuthorDate: Mon Jul 8 22:39:49 2019 +0300
Commit: Arkadiy Illarionov 
CommitDate: Tue Jul 9 00:25:23 2019 +0200

Replace array with initializer list in QuickHelpData::FillStrArr

1e4fa857873c0bc728143087ec692c4b75aaf820 follow-up

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

diff --git a/sw/source/uibase/docvw/edtwin.cxx 
b/sw/source/uibase/docvw/edtwin.cxx
index efd52d8ab2c9..692b1acddca0 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -5967,11 +5967,7 @@ void QuickHelpData::FillStrArr( SwWrtShell const & rSh, 
const OUString& rWord )
 (*pCalendar)->LoadDefaultCalendar( rSh.GetCurLang() );
 
 // Add matching calendar month and day names
-const std::array, 2> aCalendarItems = {
-(*pCalendar)->getMonths(),
-(*pCalendar)->getDays()
-};
-for ( const auto& aNames : aCalendarItems )
+for ( const auto& aNames : { (*pCalendar)->getMonths(), 
(*pCalendar)->getDays() } )
 {
 for ( const auto& rName : aNames )
 {
@@ -6056,7 +6052,6 @@ void QuickHelpData::FillStrArr( SwWrtShell const & rSh, 
const OUString& rWord )
 m_aHelpStrings.push_back( aCompletedString );
 }
 }
-
 }
 
 namespace {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: officecfg/registry sd/uiconfig sd/UIConfig_simpress.mk sw/UIConfig_swriter.mk

2019-07-08 Thread andreas kainz (via logerrit)
 officecfg/registry/data/org/openoffice/Office/UI/ToolbarMode.xcu |   36 
 sd/UIConfig_simpress.mk  |1 
 sd/uiconfig/simpress/ui/notebookbar_single.ui|11701 
++
 sw/UIConfig_swriter.mk   |2 
 4 files changed, 11739 insertions(+), 1 deletion(-)

New commits:
commit bf51da67987aee9c626a5d3627e8c2ab8df1e7fd
Author: andreas kainz 
AuthorDate: Mon Jul 8 22:41:08 2019 +0200
Commit: andreas_kainz 
CommitDate: Tue Jul 9 00:08:08 2019 +0200

NB add contextual single support for impress

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

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/ToolbarMode.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/ToolbarMode.xcu
index 327dd474457c..cf81f0991787 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/ToolbarMode.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/ToolbarMode.xcu
@@ -724,6 +724,42 @@
 Arrow
   
 
+
+  
+Contextual Single
+  
+  
+true
+  
+  
+false
+  
+  
+6
+  
+  
+notebookbar_single.ui
+  
+  
+
+
+  
+  
+
+
+  
+  
+
+  UIItemID,propertyName,propertyValue
+
+  
+  
+Arrow
+  
+  
+true
+  
+
 
   
 Contextual groups
diff --git a/sd/UIConfig_simpress.mk b/sd/UIConfig_simpress.mk
index 4f4ca1f024b2..5f85b4c8a7bc 100644
--- a/sd/UIConfig_simpress.mk
+++ b/sd/UIConfig_simpress.mk
@@ -131,6 +131,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/simpress,\
sd/uiconfig/simpress/ui/navigatorpanel \
sd/uiconfig/simpress/ui/notebookbar \
sd/uiconfig/simpress/ui/notebookbar_compact \
+   sd/uiconfig/simpress/ui/notebookbar_single \
sd/uiconfig/simpress/ui/notebookbar_groups \
sd/uiconfig/simpress/ui/notebookbar_groupedbar_full \
sd/uiconfig/simpress/ui/notebookbar_groupedbar_compact \
diff --git a/sd/uiconfig/simpress/ui/notebookbar_single.ui 
b/sd/uiconfig/simpress/ui/notebookbar_single.ui
new file mode 100644
index ..24d7b4da4998
--- /dev/null
+++ b/sd/uiconfig/simpress/ui/notebookbar_single.ui
@@ -0,0 +1,11701 @@
+
+
+
+  
+  
+  
+True
+False
+
+  
+True
+False
+center
+True
+vertical
+
+  
+True
+False
+
+  
+True
+False
+center
+
+  
+True
+False
+5
+4
+4
+False
+
+  
+True
+False
+True
+.uno:Undo
+  
+  
+False
+True
+  
+
+
+  
+True
+False
+True
+.uno:Paste
+  
+  
+False
+True
+  
+
+  
+  
+False
+True
+0
+  
+
+  
+  
+False
+True
+0
+  
+
+
+  
+True
+False
+vertical
+
+  
+False
+center
+
+  
+True
+False
+center
+
+  
+True
+False
+5
+5
+vertical
+  
+  
+False
+True
+5
+0
+  
+
+
+  
+True
+False
+   

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

2019-07-08 Thread Mike Kaganski (via logerrit)
 ucb/source/ucp/webdav-neon/NeonLockStore.cxx |   13 -
 ucb/source/ucp/webdav-neon/NeonLockStore.hxx |2 ++
 ucb/source/ucp/webdav-neon/NeonSession.cxx   |1 +
 3 files changed, 15 insertions(+), 1 deletion(-)

New commits:
commit 94e4695bcfcb9356d37942c47359b94531ef7b95
Author: Mike Kaganski 
AuthorDate: Mon Jul 8 23:47:12 2019 +1000
Commit: Mike Kaganski 
CommitDate: Mon Jul 8 23:56:50 2019 +0200

tdf#126279 related: remove locks from NeonLockStore after NE_AUTH error

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

diff --git a/ucb/source/ucp/webdav-neon/NeonLockStore.cxx 
b/ucb/source/ucp/webdav-neon/NeonLockStore.cxx
index 13b24f7b665d..8ac218915a4d 100644
--- a/ucb/source/ucp/webdav-neon/NeonLockStore.cxx
+++ b/ucb/source/ucp/webdav-neon/NeonLockStore.cxx
@@ -151,7 +151,7 @@ void NeonLockStore::stopTicker(osl::ClearableMutexGuard & 
rGuard)
 
 rGuard.clear();
 
-if (pTickerThread.is())
+if (pTickerThread.is() && pTickerThread->getIdentifier() != 
osl::Thread::getCurrentIdentifier())
 pTickerThread->join(); // without m_aMutex locked (to prevent deadlock)
 }
 
@@ -196,6 +196,13 @@ void NeonLockStore::removeLock( NeonLock * pLock )
 stopTicker(aGuard);
 }
 
+void NeonLockStore::removeLockDeferred(NeonLock* pLock)
+{
+osl::MutexGuard aGuard(m_aMutex);
+
+m_aRemoveDeferred.push_back(pLock);
+}
+
 void NeonLockStore::refreshLocks()
 {
 osl::MutexGuard aGuard( m_aMutex );
@@ -228,6 +235,10 @@ void NeonLockStore::refreshLocks()
 }
 }
 }
+// removeLock will not need to actually release the lock, because this is 
run from TickerThread
+for (auto pLock : m_aRemoveDeferred)
+removeLock(pLock);
+m_aRemoveDeferred.clear();
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-neon/NeonLockStore.hxx 
b/ucb/source/ucp/webdav-neon/NeonLockStore.hxx
index 0cee2063fd31..86fccb68a50f 100644
--- a/ucb/source/ucp/webdav-neon/NeonLockStore.hxx
+++ b/ucb/source/ucp/webdav-neon/NeonLockStore.hxx
@@ -66,6 +66,7 @@ class NeonLockStore
 ne_lock_store * const m_pNeonLockStore;
 rtl::Reference< TickerThread > m_pTickerThread;
 LockInfoMapm_aLockInfoMap;
+std::vector m_aRemoveDeferred;
 
 public:
 NeonLockStore();
@@ -82,6 +83,7 @@ public:
   sal_Int32 nLastChanceToSendRefreshRequest );
 
 void removeLock( NeonLock * pLock );
+void removeLockDeferred(NeonLock* pLock);
 
 void refreshLocks();
 
diff --git a/ucb/source/ucp/webdav-neon/NeonSession.cxx 
b/ucb/source/ucp/webdav-neon/NeonSession.cxx
index cd8b31f9d359..ed0d43723d05 100644
--- a/ucb/source/ucp/webdav-neon/NeonSession.cxx
+++ b/ucb/source/ucp/webdav-neon/NeonSession.cxx
@@ -1679,6 +1679,7 @@ bool NeonSession::LOCK( NeonLock * pLock,
 {
 // tdf#126279: see handling of NE_AUTH in HandleError
 m_bNeedNewSession = true;
+m_aNeonLockStore.removeLockDeferred(pLock);
 }
 return false;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-08 Thread Jan-Marek Glogowski (via logerrit)
 vcl/source/control/tabctrl.cxx |  114 +
 1 file changed, 59 insertions(+), 55 deletions(-)

New commits:
commit d55654fa962002b2f78b44a01dc4aa25428b1ca2
Author: Jan-Marek Glogowski 
AuthorDate: Mon Jul 8 16:11:14 2019 +
Commit: Jan-Marek Glogowski 
CommitDate: Mon Jul 8 22:29:33 2019 +0200

tdf#126266 adjust calculations for invisble tabs

This skips invisible tabs in many more places and at least fixes
the osx bug of the missing tabs of the NBB. It also fixes the
multiple highlighted tabs assertion for multiple rows from
TabControl::ImplGetItem.

I'm quite sure the tab rect calculation for multiple rows still
has the wrong height, so there might be minor overlapping.

Change-Id: I3a0a06ee73204b98e367563700fce4a49c066c1a
Reviewed-on: https://gerrit.libreoffice.org/75230
Tested-by: Xisco Faulí 
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 9f51159dd7f0..a63a63d04a56 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -366,6 +366,29 @@ namespace MinimumRaggednessWrap
 }
 };
 
+static void lcl_AdjustSingleLineTabs(long nMaxWidth, ImplTabCtrlData 
*pTabCtrlData)
+{
+if (!ImplGetSVData()->maNWFData.mbCenteredTabs)
+return;
+
+int nRightSpace = nMaxWidth; // space left on the right by the tabs
+for (auto const& item : pTabCtrlData->maItemList)
+{
+if (!item.m_bVisible)
+continue;
+nRightSpace -= item.maRect.Right() - item.maRect.Left();
+}
+nRightSpace /= 2;
+
+for (auto& item : pTabCtrlData->maItemList)
+{
+if (!item.m_bVisible)
+continue;
+item.maRect.AdjustLeft(nRightSpace);
+item.maRect.AdjustRight(nRightSpace);
+}
+}
+
 bool TabControl::ImplPlaceTabs( long nWidth )
 {
 if ( nWidth <= 0 )
@@ -385,7 +408,9 @@ bool TabControl::ImplPlaceTabs( long nWidth )
 std::vector aWidths;
 for (auto & item : mpTabCtrlData->maItemList)
 {
-aWidths.push_back(ImplGetItemSize( &item, nMaxWidth ).Width());
+if (!item.m_bVisible)
+continue;
+aWidths.push_back(ImplGetItemSize(&item, nMaxWidth).Width());
 }
 
 //aBreakIndexes will contain the indexes of the last tab on each row
@@ -405,7 +430,6 @@ bool TabControl::ImplPlaceTabs( long nWidth )
 nLinePosAry[0] = 0;
 
 size_t nIndex = 0;
-sal_uInt16 nPos = 0;
 
 for (auto & item : mpTabCtrlData->maItemList)
 {
@@ -430,7 +454,7 @@ bool TabControl::ImplPlaceTabs( long nWidth )
 nY += aSize.Height();
 nLines++;
 nLineWidthAry[nLines] = 0;
-nLinePosAry[nLines] = nPos;
+nLinePosAry[nLines] = nIndex;
 }
 
 tools::Rectangle aNewRect( Point( nX, nY ), aSize );
@@ -446,14 +470,20 @@ bool TabControl::ImplPlaceTabs( long nWidth )
 if (item.id() == mnCurPageId)
 nCurLine = nLines;
 
-++nPos;
 ++nIndex;
 }
 
-if ( nLines )
-{ // two or more lines
+if (nLines) // two or more lines
+{
 long nLineHeightAry[100];
-long nIH = mpTabCtrlData->maItemList[0].maRect.Bottom()-2;
+long nIH = 0;
+for (const auto& item : mpTabCtrlData->maItemList)
+{
+if (!item.m_bVisible)
+continue;
+nIH = item.maRect.Bottom() - 1;
+break;
+}
 
 for ( sal_uInt16 i = 0; i < nLines+1; i++ )
 {
@@ -474,6 +504,9 @@ bool TabControl::ImplPlaceTabs( long nWidth )
 
 for (auto & item : mpTabCtrlData->maItemList)
 {
+if (!item.m_bVisible)
+continue;
+
 if ( i == nLinePosAry[n] )
 {
 if ( n == nLines+1 )
@@ -497,7 +530,7 @@ bool TabControl::ImplPlaceTabs( long nWidth )
 item.maRect.AdjustLeft(nIDX );
 item.maRect.AdjustRight(nIDX + nDX );
 item.maRect.SetTop( nLineHeightAry[n-1] );
-item.maRect.SetBottom( nLineHeightAry[n-1] + nIH );
+item.maRect.SetBottom(nLineHeightAry[n-1] + nIH - 1);
 nIDX += nDX;
 
 if ( nModDX )
@@ -510,22 +543,8 @@ bool TabControl::ImplPlaceTabs( long nWidth )
 i++;
 }
 }
-else
-{ // only one line
-if(ImplGetSVData()->maNWFData.mbCenteredTabs)
-{
-int nRightSpace = nMaxWidth;//space left on the right by the tabs
-for (auto const& item : mpTabCtrlData->maItemList)
-{
-nRightSpace -= item.maRect.Right()-item.maRect.Left();
-}
-for (auto & item : mpTabCtrlData->maItemList)
-{
-item.maRect.AdjustLeft(nRightSpace / 2 );
-item.maRect.AdjustRight(nRightSpace / 2 );
-}
-}
-}
+else // only one line
+

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - i18npool/Library_i18npool.mk

2019-07-08 Thread Damjan Jovanovic (via logerrit)
 i18npool/Library_i18npool.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e3336e2088ba1dd1d07be81188ad5696fbaad193
Author: Damjan Jovanovic 
AuthorDate: Mon Jul 8 19:51:50 2019 +
Commit: Damjan Jovanovic 
CommitDate: Mon Jul 8 19:51:50 2019 +

Don't include icuversion.mk if it wasn't delivered (when using system ICU).

Fixes:
#i128148# build in trunk fails because of icu.

Patch by: me

diff --git a/i18npool/Library_i18npool.mk b/i18npool/Library_i18npool.mk
index caa159764bed..25892a581575 100644
--- a/i18npool/Library_i18npool.mk
+++ b/i18npool/Library_i18npool.mk
@@ -144,7 +144,7 @@ 
$(WORKDIR)/CustomTarget/i18npool/source/collator/lrl_include.hxx : $(wildcard $(
 
 
 # fdo#31271 ")" reclassified in more recent ICU/Unicode Standards
-include $(OUTDIR)/inc/icuversion.mk
+-include $(OUTDIR)/inc/icuversion.mk
 ICU_RECLASSIFIED_BRACKET := $(shell [ ${ICU_MAJOR} -ge 5 -o \( ${ICU_MAJOR} 
-eq 4 -a ${ICU_MINOR} -ge 4 \) ] && echo YES)
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-08 Thread Arkadiy Illarionov (via logerrit)
 ucb/source/ucp/file/filrow.cxx |   37 -
 1 file changed, 8 insertions(+), 29 deletions(-)

New commits:
commit b35ae1efee703c0faa0cbf5ed4c1949456d83099
Author: Arkadiy Illarionov 
AuthorDate: Sat Jul 6 19:15:13 2019 +0300
Commit: Arkadiy Illarionov 
CommitDate: Mon Jul 8 21:47:50 2019 +0200

tdf#39593 Reduce copy-paste in XRow_impl::get* some more

Add value initialization to template

Change-Id: I89ff656bfd5df56ead7e976ff3b532ddb662c374
Reviewed-on: https://gerrit.libreoffice.org/75169
Tested-by: Jenkins
Reviewed-by: Arkadiy Illarionov 

diff --git a/ucb/source/ucp/file/filrow.cxx b/ucb/source/ucp/file/filrow.cxx
index 67845ea426d7..60081f340c54 100644
--- a/ucb/source/ucp/file/filrow.cxx
+++ b/ucb/source/ucp/file/filrow.cxx
@@ -112,10 +112,7 @@ XRow_impl::getBoolean(
 {
 if( isIndexOutOfBounds( columnIndex ) )
 throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
-bool  Value( false );
-osl::MutexGuard aGuard( m_aMutex );
-m_nWasNull = ::convert( m_pMyShell,m_xTypeConverter,m_aValueMap[ 
--columnIndex ],Value );
-return Value;
+return getValue(columnIndex);
 }
 
 
@@ -125,10 +122,7 @@ XRow_impl::getByte(
 {
 if( isIndexOutOfBounds( columnIndex ) )
 throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
-sal_Int8  Value( 0 );
-osl::MutexGuard aGuard( m_aMutex );
-m_nWasNull = ::convert( m_pMyShell,m_xTypeConverter,m_aValueMap[ 
--columnIndex ],Value );
-return Value;
+return getValue(columnIndex);
 }
 
 sal_Int16 SAL_CALL
@@ -137,10 +131,7 @@ XRow_impl::getShort(
 {
 if( isIndexOutOfBounds( columnIndex ) )
 throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
-sal_Int16  Value( 0 );
-osl::MutexGuard aGuard( m_aMutex );
-m_nWasNull = ::convert( 
m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value );
-return Value;
+return getValue(columnIndex);
 }
 
 
@@ -150,10 +141,7 @@ XRow_impl::getInt(
 {
 if( isIndexOutOfBounds( columnIndex ) )
 throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
-sal_Int32  Value( 0 );
-osl::MutexGuard aGuard( m_aMutex );
-m_nWasNull = ::convert( 
m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value );
-return Value;
+return getValue(columnIndex);
 }
 
 sal_Int64 SAL_CALL
@@ -162,10 +150,7 @@ XRow_impl::getLong(
 {
 if( isIndexOutOfBounds( columnIndex ) )
 throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
-sal_Int64  Value( 0 );
-osl::MutexGuard aGuard( m_aMutex );
-m_nWasNull = ::convert( 
m_pMyShell,m_xTypeConverter,m_aValueMap[ --columnIndex ],Value );
-return Value;
+return getValue(columnIndex);
 }
 
 float SAL_CALL
@@ -174,10 +159,7 @@ XRow_impl::getFloat(
 {
 if( isIndexOutOfBounds( columnIndex ) )
 throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
-float  Value( 0 );
-osl::MutexGuard aGuard( m_aMutex );
-m_nWasNull = ::convert( m_pMyShell,m_xTypeConverter,m_aValueMap[ 
--columnIndex ],Value );
-return Value;
+return getValue(columnIndex);
 }
 
 double SAL_CALL
@@ -186,10 +168,7 @@ XRow_impl::getDouble(
 {
 if( isIndexOutOfBounds( columnIndex ) )
 throw sdbc::SQLException( THROW_WHERE, uno::Reference< uno::XInterface 
>(), OUString(), 0, uno::Any() );
-double  Value( 0 );
-osl::MutexGuard aGuard( m_aMutex );
-m_nWasNull = ::convert( m_pMyShell,m_xTypeConverter,m_aValueMap[ 
--columnIndex ],Value );
-return Value;
+return getValue(columnIndex);
 }
 
 uno::Sequence< sal_Int8 > SAL_CALL
@@ -308,7 +287,7 @@ XRow_impl::isIndexOutOfBounds(sal_Int32 nIndex)
 template
 T XRow_impl::getValue(sal_Int32 columnIndex)
 {
-T aValue;
+T aValue{};
 osl::MutexGuard aGuard( m_aMutex );
 m_nWasNull = ::convert( m_pMyShell, m_xTypeConverter, m_aValueMap[ 
--columnIndex ], aValue );
 return aValue;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-08 Thread Arkadiy Illarionov (via logerrit)
 sw/source/core/unocore/unoidx.cxx |  125 +++---
 1 file changed, 51 insertions(+), 74 deletions(-)

New commits:
commit 499c54334a40ae969e3c7c85590a991a53b8de2e
Author: Arkadiy Illarionov 
AuthorDate: Sat Jul 6 17:45:51 2019 +0300
Commit: Arkadiy Illarionov 
CommitDate: Mon Jul 8 21:46:36 2019 +0200

tdf#39593 Replace copy-pasted functions with template

Change-Id: If61852ec6294a7b411fe506b46c6bea3c000b055
Reviewed-on: https://gerrit.libreoffice.org/75168
Tested-by: Jenkins
Reviewed-by: Arkadiy Illarionov 

diff --git a/sw/source/core/unocore/unoidx.cxx 
b/sw/source/core/unocore/unoidx.cxx
index 48ac53e30dcd..d8c0f3a538c2 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -71,39 +71,16 @@
 using namespace ::com::sun::star;
 
 /// @throws lang::IllegalArgumentException
-static OUString
-lcl_AnyToString(uno::Any const& rVal)
-{
-OUString sRet;
-if(!(rVal >>= sRet))
-{
-throw lang::IllegalArgumentException();
-}
-return sRet;
-}
-
-/// @throws lang::IllegalArgumentException
-static sal_Int16
-lcl_AnyToInt16(uno::Any const& rVal)
-{
-sal_Int16 nRet = 0;
-if(!(rVal >>= nRet))
-{
-throw lang::IllegalArgumentException();
-}
-return nRet;
-}
-
-/// @throws lang::IllegalArgumentException
-static bool
-lcl_AnyToBool(uno::Any const& rVal)
+template
+static T
+lcl_AnyToType(uno::Any const& rVal)
 {
-bool bRet = false;
-if(!(rVal >>= bRet))
+T aRet{};
+if(!(rVal >>= aRet))
 {
 throw lang::IllegalArgumentException();
 }
-return bRet;
+return aRet;
 }
 
 /// @throws lang::IllegalArgumentException
@@ -111,7 +88,7 @@ template
 static void lcl_AnyToBitMask(uno::Any const& rValue,
 T & rBitMask, const T nBit)
 {
-rBitMask = lcl_AnyToBool(rValue)
+rBitMask = lcl_AnyToType(rValue)
 ? (rBitMask |  nBit)
 : (rBitMask & ~nBit);
 }
@@ -650,19 +627,19 @@ SwXDocumentIndex::setPropertyValue(
 break;
 case WID_LEVEL:
 {
-rTOXBase.SetLevel(lcl_AnyToInt16(rValue));
+rTOXBase.SetLevel(lcl_AnyToType(rValue));
 }
 break;
 case WID_TOC_BOOKMARK:
 {
-   rTOXBase.SetBookmarkName(lcl_AnyToString(rValue));
+   rTOXBase.SetBookmarkName(lcl_AnyToType(rValue));
nCreate = SwTOXElement::Bookmark;
rTOXBase.SetCreate(nCreate);
 }
 break;
 case WID_INDEX_ENTRY_TYPE:
 {
-rTOXBase.SetEntryTypeName(lcl_AnyToString(rValue));
+rTOXBase.SetEntryTypeName(lcl_AnyToType(rValue));
 nCreate = SwTOXElement::IndexEntryType;
 rTOXBase.SetCreate(nCreate);
 }
@@ -688,14 +665,14 @@ SwXDocumentIndex::setPropertyValue(
   lcl_AnyToBitMask(rValue, nCreate, SwTOXElement::TableLeader);
 break ;
 case WID_CREATE_FROM_CHAPTER:
-rTOXBase.SetFromChapter(lcl_AnyToBool(rValue));
+rTOXBase.SetFromChapter(lcl_AnyToType(rValue));
 break;
 case WID_CREATE_FROM_LABELS:
-rTOXBase.SetFromObjectNames(! lcl_AnyToBool(rValue));
+rTOXBase.SetFromObjectNames(! lcl_AnyToType(rValue));
 break;
 case WID_PROTECTED:
 {
-bool bSet = lcl_AnyToBool(rValue);
+bool bSet = lcl_AnyToType(rValue);
 rTOXBase.SetProtected(bSet);
 if (pSectionFormat)
 {
@@ -731,19 +708,19 @@ SwXDocumentIndex::setPropertyValue(
 break;
 case WID_IS_COMMA_SEPARATED:
 bForm = true;
-aForm.SetCommaSeparated(lcl_AnyToBool(rValue));
+aForm.SetCommaSeparated(lcl_AnyToType(rValue));
 break;
 case WID_LABEL_CATEGORY:
 {
 // convert file-format/API/external programmatic english name
 // to internal UI name before usage
 rTOXBase.SetSequenceName( SwStyleNameMapper::GetSpecialExtraUIName(
-lcl_AnyToString(rValue) ) );
+lcl_AnyToType(rValue) ) );
 }
 break;
 case WID_LABEL_DISPLAY_TYPE:
 {
-const sal_Int16 nVal = lcl_AnyToInt16(rValue);
+const sal_Int16 nVal = lcl_AnyToType(rValue);
 sal_uInt16 nSet = CAPTION_COMPLETE;
 switch (nVal)
 {
@@ -763,12 +740,12 @@ SwXDocumentIndex::setPropertyValue(
 }
 break;
 case WID_USE_LEVEL_FROM_SOURCE:
-rTOXBase.SetLevelFromChapter(lcl_AnyToBool(rValue));
+rTOXBase.SetLevelFromChapter(lcl_AnyToType(rValue));
 break;
 case WID_MAIN_ENTRY_CHARACTER_STYLE_NAME:
 {
 OUString aString;
-SwStyleNameMapper::FillUIName(lcl_AnyToString(rValue),
+SwStyleNameMapper::FillUIName(lcl_AnyToType(rValue),
 aString, SwGetPoolIdFrom

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

2019-07-08 Thread Noel Grandin (via logerrit)
 basctl/source/dlged/dlged.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit c6ec8248adea412770e61db13885f6d9fd09099c
Author: Noel Grandin 
AuthorDate: Mon Jul 8 12:15:03 2019 +0200
Commit: Noel Grandin 
CommitDate: Mon Jul 8 21:29:51 2019 +0200

use DrawBitmapEx in DlgEditor::Print

Change-Id: Ie61c63f46d037fddd6ce1d0c260c98998d6de71c
Reviewed-on: https://gerrit.libreoffice.org/75210
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 045640691e6f..c318ba8739d7 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -1170,8 +1170,8 @@ void DlgEditor::Print( Printer* pPrinter, const OUString& 
rTitle )// not wor
 
 lcl_PrintHeader( pPrinter, rTitle );
 
-Bitmap aDlg;
-Size aBmpSz( pPrinter->PixelToLogic( aDlg.GetSizePixel() ) );
+BitmapEx aDlgEx;
+Size aBmpSz( pPrinter->PixelToLogic( aDlgEx.GetSizePixel() ) );
 double nPaperSzWidth = aPaperSz.Width();
 double nPaperSzHeight = aPaperSz.Height();
 double nBmpSzWidth = aBmpSz.Width();
@@ -1198,7 +1198,7 @@ void DlgEditor::Print( Printer* pPrinter, const OUString& 
rTitle )// not wor
 aPosOffs.AdjustX(Print::nLeftMargin );
 aPosOffs.AdjustY(Print::nTopMargin );
 
-pPrinter->DrawBitmap( aPosOffs, aOutputSz, aDlg );
+pPrinter->DrawBitmapEx( aPosOffs, aOutputSz, aDlgEx );
 
 pPrinter->SetMapMode( aOldMap );
 pPrinter->SetFont( aOldFont );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-08 Thread Noel Grandin (via logerrit)
 oox/source/export/drawingml.cxx |4 +---
 svx/source/dialog/dlgctrl.cxx   |   38 +++---
 2 files changed, 20 insertions(+), 22 deletions(-)

New commits:
commit 15148b351a6cb79dd6826d0b44a33fd4fb103e60
Author: Noel Grandin 
AuthorDate: Mon Jul 8 12:39:52 2019 +0200
Commit: Noel Grandin 
CommitDate: Mon Jul 8 21:29:35 2019 +0200

use BitmapEx in SvxRectCtl::Paint

Change-Id: I149c0f77d907f5b53d2989c46ac9757e73091cd1
Reviewed-on: https://gerrit.libreoffice.org/75216
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index d639900f05b9..7a9b7186a257 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -334,30 +334,30 @@ void SvxRectCtl::Paint(vcl::RenderContext& 
rRenderContext, const tools::Rectangl
 // CompletelyDisabled() added to have a disabled state for SvxRectCtl
 if (IsCompletelyDisabled())
 {
-rRenderContext.DrawBitmap(aPtLT - aToCenter, aDstBtnSize, aBtnPnt3, 
aBtnSize, rBitmap.GetBitmap());
-rRenderContext.DrawBitmap(aPtMT - aToCenter, aDstBtnSize, aBtnPnt3, 
aBtnSize, rBitmap.GetBitmap());
-rRenderContext.DrawBitmap(aPtRT - aToCenter, aDstBtnSize, aBtnPnt3, 
aBtnSize, rBitmap.GetBitmap());
-rRenderContext.DrawBitmap(aPtLM - aToCenter, aDstBtnSize, aBtnPnt3, 
aBtnSize, rBitmap.GetBitmap());
-rRenderContext.DrawBitmap(aPtMM - aToCenter, aDstBtnSize, aBtnPnt3, 
aBtnSize, rBitmap.GetBitmap());
-rRenderContext.DrawBitmap(aPtRM - aToCenter, aDstBtnSize, aBtnPnt3, 
aBtnSize, rBitmap.GetBitmap());
-rRenderContext.DrawBitmap(aPtLB - aToCenter, aDstBtnSize, aBtnPnt3, 
aBtnSize, rBitmap.GetBitmap());
-rRenderContext.DrawBitmap(aPtMB - aToCenter, aDstBtnSize, aBtnPnt3, 
aBtnSize, rBitmap.GetBitmap());
-rRenderContext.DrawBitmap(aPtRB - aToCenter, aDstBtnSize, aBtnPnt3, 
aBtnSize, rBitmap.GetBitmap());
+rRenderContext.DrawBitmapEx(aPtLT - aToCenter, aDstBtnSize, aBtnPnt3, 
aBtnSize, rBitmap);
+rRenderContext.DrawBitmapEx(aPtMT - aToCenter, aDstBtnSize, aBtnPnt3, 
aBtnSize, rBitmap);
+rRenderContext.DrawBitmapEx(aPtRT - aToCenter, aDstBtnSize, aBtnPnt3, 
aBtnSize, rBitmap);
+rRenderContext.DrawBitmapEx(aPtLM - aToCenter, aDstBtnSize, aBtnPnt3, 
aBtnSize, rBitmap);
+rRenderContext.DrawBitmapEx(aPtMM - aToCenter, aDstBtnSize, aBtnPnt3, 
aBtnSize, rBitmap);
+rRenderContext.DrawBitmapEx(aPtRM - aToCenter, aDstBtnSize, aBtnPnt3, 
aBtnSize, rBitmap);
+rRenderContext.DrawBitmapEx(aPtLB - aToCenter, aDstBtnSize, aBtnPnt3, 
aBtnSize, rBitmap);
+rRenderContext.DrawBitmapEx(aPtMB - aToCenter, aDstBtnSize, aBtnPnt3, 
aBtnSize, rBitmap);
+rRenderContext.DrawBitmapEx(aPtRB - aToCenter, aDstBtnSize, aBtnPnt3, 
aBtnSize, rBitmap);
 }
 else
 {
-rRenderContext.DrawBitmap(aPtLT - aToCenter, aDstBtnSize, (bNoHorz || 
bNoVert)?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap.GetBitmap());
-rRenderContext.DrawBitmap(aPtMT - aToCenter, aDstBtnSize, 
bNoVert?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap.GetBitmap());
-rRenderContext.DrawBitmap(aPtRT - aToCenter, aDstBtnSize, (bNoHorz || 
bNoVert)?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap.GetBitmap());
-rRenderContext.DrawBitmap(aPtLM - aToCenter, aDstBtnSize, 
bNoHorz?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap.GetBitmap());
+rRenderContext.DrawBitmapEx(aPtLT - aToCenter, aDstBtnSize, (bNoHorz 
|| bNoVert)?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
+rRenderContext.DrawBitmapEx(aPtMT - aToCenter, aDstBtnSize, 
bNoVert?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
+rRenderContext.DrawBitmapEx(aPtRT - aToCenter, aDstBtnSize, (bNoHorz 
|| bNoVert)?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
+rRenderContext.DrawBitmapEx(aPtLM - aToCenter, aDstBtnSize, 
bNoHorz?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
 
 // Center for rectangle and line
-rRenderContext.DrawBitmap(aPtMM - aToCenter, aDstBtnSize, aBtnPnt1, 
aBtnSize, rBitmap.GetBitmap());
+rRenderContext.DrawBitmapEx(aPtMM - aToCenter, aDstBtnSize, aBtnPnt1, 
aBtnSize, rBitmap);
 
-rRenderContext.DrawBitmap(aPtRM - aToCenter, aDstBtnSize, 
bNoHorz?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap.GetBitmap());
-rRenderContext.DrawBitmap(aPtLB - aToCenter, aDstBtnSize, (bNoHorz || 
bNoVert)?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap.GetBitmap());
-rRenderContext.DrawBitmap(aPtMB - aToCenter, aDstBtnSize, 
bNoVert?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap.GetBitmap());
-rRenderContext.DrawBitmap(aPtRB - aToCenter, aDstBtnSize, (bNoHorz || 
bNoVert)?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap.GetBitmap());
+rRenderContext.DrawBitmapEx(aPtRM - aToCenter, aDstBtnSize, 
bNoHorz?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
+rRenderContext.DrawBitmapEx(aPtLB - aToCenter, aDstBtnSize, (bNoHorz 
|| bNoVert)?aBtnPnt3:aBtnPnt1, aBtnSize, rBitmap);
+rRenderContext.DrawBi

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

2019-07-08 Thread Noel Grandin (via logerrit)
 include/tools/gen.hxx  |   10 +-
 sfx2/source/control/recentdocsviewitem.cxx |3 +--
 tools/source/generic/gen.cxx   |   15 +++
 3 files changed, 17 insertions(+), 11 deletions(-)

New commits:
commit 31bd8c4a4a4752dcff12ee35636193f79a6d6137
Author: Noel Grandin 
AuthorDate: Mon Jul 8 14:50:12 2019 +0200
Commit: Noel Grandin 
CommitDate: Mon Jul 8 21:29:01 2019 +0200

no need to use AlphaMask in RecentDocsViewItem

since it's purely opaque

Change-Id: Id9df52f860946cfd4c30c406d5748224a2a4f4df
Reviewed-on: https://gerrit.libreoffice.org/75226
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sfx2/source/control/recentdocsviewitem.cxx 
b/sfx2/source/control/recentdocsviewitem.cxx
index 85d84ddc699d..908a679a5629 100644
--- a/sfx2/source/control/recentdocsviewitem.cxx
+++ b/sfx2/source/control/recentdocsviewitem.cxx
@@ -91,8 +91,7 @@ RecentDocsViewItem::RecentDocsViewItem(sfx2::RecentDocsView 
&rView, const OUStri
 }
 
 // create empty, and copy the default thumbnail in
-sal_uInt8 nAlpha = 255;
-aThumbnail = BitmapEx(Bitmap(aThumbnailSize, 24), 
AlphaMask(aThumbnailSize, &nAlpha));
+aThumbnail = BitmapEx(aThumbnailSize, 24);
 
 aThumbnail.CopyPixel(
 ::tools::Rectangle(Point((aThumbnailSize.Width() - 
aExtSize.Width()) / 2, (aThumbnailSize.Height() - aExtSize.Height()) / 2), 
aExtSize),
commit 9e8c6c81f2f5d3df850353ee92a5b6e52546d6c6
Author: Noel Grandin 
AuthorDate: Mon Jul 8 16:40:05 2019 +0200
Commit: Noel Grandin 
CommitDate: Mon Jul 8 21:28:49 2019 +0200

make tools::Rectangle::expandBy respect empty state

and make non-inline so it is easy to disable this for debugging, if need
be

Change-Id: Ib383bb990ddcd835ff37e98893e44156287e0488
Reviewed-on: https://gerrit.libreoffice.org/75227
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx
index 0d9a81ebdcee..56af47582a7f 100644
--- a/include/tools/gen.hxx
+++ b/include/tools/gen.hxx
@@ -470,7 +470,7 @@ public:
 /**
  * Expands the rectangle in all directions by the input value.
  */
-inline void expand(long nExpandBy);
+void expand(long nExpandBy);
 inline void shrink(long nShrinkBy);
 
 /**
@@ -722,14 +722,6 @@ inline Rectangle operator - ( const Rectangle& rRect, 
const Point& rPt )
 }
 }
 
-inline void tools::Rectangle::expand(long nExpandBy)
-{
-nLeft   -= nExpandBy;
-nTop-= nExpandBy;
-nRight  += nExpandBy;
-nBottom += nExpandBy;
-}
-
 inline void tools::Rectangle::shrink(long nShrinkBy)
 {
 nLeft   += nShrinkBy;
diff --git a/tools/source/generic/gen.cxx b/tools/source/generic/gen.cxx
index 3593801579ac..53bb2680c5c8 100644
--- a/tools/source/generic/gen.cxx
+++ b/tools/source/generic/gen.cxx
@@ -233,4 +233,19 @@ OString tools::Rectangle::toString() const
 return ss.str().c_str();
 }
 
+void tools::Rectangle::expand(long nExpandBy)
+{
+nLeft   -= nExpandBy;
+nTop-= nExpandBy;
+if (nRight == RECT_EMPTY)
+nRight = nLeft + nExpandBy - 1;
+else
+nRight += nExpandBy;
+if (nBottom == RECT_EMPTY)
+nBottom = nTop + nExpandBy - 1;
+else
+nBottom += nExpandBy;
+}
+
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Re: Reveal code, old macros convert them to LO

2019-07-08 Thread Uwe Brauer

> On 7/7/19 4:35 PM, Wols Lists wrote:

> I now possess a copy of the offending .docx document and the PDF
> version of it. (It contains 1.6MB, so it will take some time.)
> Tomorrow, I will be determining what is necessary to fix it. Rather
> than guess as to what would be required, I will find out. I think this
> would be much more useful for others.  I will report back when I am
> finished.

I will be grateful, but I am afraid this document is beyond help,
however I have to deal with it, that is to modify and to save so that
other MS Word users can read and print it.




smime.p7s
Description: S/MIME cryptographic signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

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

2019-07-08 Thread Arkadiy Illarionov (via logerrit)
 sw/qa/extras/globalfilter/globalfilter.cxx |7 +--
 sw/qa/extras/inc/bordertest.hxx|7 +--
 sw/qa/extras/inc/swmodeltestbase.hxx   |   13 +-
 sw/qa/extras/mailmerge/mailmerge.cxx   |8 +--
 sw/qa/extras/tiledrendering/tiledrendering.cxx |2 
 sw/qa/extras/uiwriter/uiwriter.cxx |   27 ++--
 sw/source/core/access/acchyperlink.cxx |5 --
 sw/source/core/access/accpara.cxx  |   53 ++---
 sw/source/core/access/accselectionhelper.cxx   |8 ---
 sw/source/core/doc/docglos.cxx |   10 ++--
 sw/source/core/doc/docxforms.cxx   |6 --
 sw/source/core/edit/edlingu.cxx|   32 +--
 sw/source/core/fields/authfld.cxx  |   23 +-
 sw/source/core/fields/flddropdown.cxx  |4 -
 sw/source/core/unocore/SwXTextDefaults.cxx |6 --
 sw/source/core/unocore/unochart.cxx|   46 -
 sw/source/core/unocore/unocoll.cxx |   13 ++
 sw/source/core/unocore/unocrsrhelper.cxx   |4 -
 sw/source/core/unocore/unodraw.cxx |   16 ++-
 sw/source/core/unocore/unoevent.cxx|4 -
 sw/source/core/unocore/unoflatpara.cxx |8 +--
 sw/source/core/unocore/unoframe.cxx|   10 +---
 sw/source/core/unocore/unoidx.cxx  |8 +--
 sw/source/core/unocore/unoobj.cxx  |   31 ++
 sw/source/core/unocore/unoparagraph.cxx|   17 ++--
 sw/source/core/unocore/unoport.cxx |7 ---
 sw/source/core/unocore/unosett.cxx |   15 ++-
 sw/source/core/unocore/unosrch.cxx |9 +---
 sw/source/core/unocore/unostyle.cxx|   12 ++---
 sw/source/core/unocore/unotext.cxx |   31 +-
 sw/source/core/unocore/unotextmarkup.cxx   |   27 
 31 files changed, 176 insertions(+), 293 deletions(-)

New commits:
commit 3e8989d47e3116a99d4b9f6d03800464ff235de8
Author: Arkadiy Illarionov 
AuthorDate: Sat Jul 6 17:07:05 2019 +0300
Commit: Arkadiy Illarionov 
CommitDate: Mon Jul 8 21:23:39 2019 +0200

Simplify Sequence iterations in sw/qa/* and sw/source/core/*

Use range-based loops, STL and comphelper functions

Change-Id: I5bd910a86bd80c553cd4a0c044a8eb61084f77ae
Reviewed-on: https://gerrit.libreoffice.org/75167
Tested-by: Jenkins
Reviewed-by: Arkadiy Illarionov 

diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx 
b/sw/qa/extras/globalfilter/globalfilter.cxx
index 012e16eb3de2..337d182b4809 100644
--- a/sw/qa/extras/globalfilter/globalfilter.cxx
+++ b/sw/qa/extras/globalfilter/globalfilter.cxx
@@ -634,9 +634,8 @@ void Test::testMSCharBackgroundEditing()
 xRun->setPropertyValue("CharHighlight", 
uno::makeAny(static_cast(COL_TRANSPARENT)));
 // Remove shading marker
 uno::Sequence aGrabBag = 
getProperty >(xRun,"CharInteropGrabBag");
-for (int j = 0; j < aGrabBag.getLength(); ++j)
+for (beans::PropertyValue& rProp : aGrabBag)
 {
-beans::PropertyValue& rProp = aGrabBag[j];
 if (rProp.Name == "CharShadingMarker")
 {
 CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), 
true, rProp.Value.get());
@@ -1207,7 +1206,7 @@ void Test::testDropDownFormField()
 {
 pListEntries->second >>= vListEntries;
 
-if(vListEntries.getLength())
+if(vListEntries.hasElements())
 {
 auto pResult = pParameters->find(ODF_FORMDROPDOWN_RESULT);
 if (pResult != pParameters->end())
@@ -1220,7 +1219,7 @@ void Test::testDropDownFormField()
 // The first one is empty
 if(nIndex == 0)
 {
-CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), 
sal_Int32(0), vListEntries.getLength());
+CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), 
!vListEntries.hasElements());
 CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), 
sal_Int32(-1), nSelection);
 }
 else // The second one has list and also a selected item
diff --git a/sw/qa/extras/inc/bordertest.hxx b/sw/qa/extras/inc/bordertest.hxx
index b1376ee36530..52776c38e012 100644
--- a/sw/qa/extras/inc/bordertest.hxx
+++ b/sw/qa/extras/inc/bordertest.hxx
@@ -155,7 +155,6 @@ public:
 {
 uno::Reference const 
xTextTable(xServiceInfo, uno::UNO_QUERY_THROW);
 uno::Sequence const cells = 
xTextTable->getCellNames();
-sal_Int32 nLength = cells.getLength();
 
 if(currentTable == sal_Int32(1))
 tempMap = &map1;
@@ -174,13 +173,13 @@ public:
 
 BorderLineMap::iterator it = tempMap->begin();
 
-for (sal_Int32 i = 0; i < nL

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4-0' - loleaflet/js loleaflet/reference.html loleaflet/src

2019-07-08 Thread Szymon Kłos (via logerrit)
 loleaflet/js/main.js |4 ++-
 loleaflet/reference.html |   24 +-
 loleaflet/src/control/Control.Menubar.js |   33 +++
 loleaflet/src/map/handler/Map.WOPI.js|   25 +++
 4 files changed, 84 insertions(+), 2 deletions(-)

New commits:
commit f9edddaf2e07d61b399ca2b0484fa7ba3daeb1e8
Author: Szymon Kłos 
AuthorDate: Thu Jun 6 17:51:48 2019 +0200
Commit: Andras Timar 
CommitDate: Mon Jul 8 21:07:00 2019 +0200

Add API to remove menu items

Change-Id: I59f2e3e1ed467f58bcd56db945e0d4807c1cff6e
Reviewed-on: https://gerrit.libreoffice.org/74128
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 
(cherry picked from commit 16ba97e7ae4a06932bdd63dbf32dd9e09b6b227e)
Reviewed-on: https://gerrit.libreoffice.org/75228
(cherry picked from commit 5105f3b95117c88d91a882fb4fef5356b5e45e68)
Reviewed-on: https://gerrit.libreoffice.org/75242

diff --git a/loleaflet/js/main.js b/loleaflet/js/main.js
index 15e859606..54180dcaf 100644
--- a/loleaflet/js/main.js
+++ b/loleaflet/js/main.js
@@ -68,7 +68,9 @@ var map = L.map('map', {
 });
 
 // Controls /
-map.addControl(L.control.menubar());
+var menubar = L.control.menubar();
+map.menubar = menubar;
+map.addControl(menubar);
 setupToolbar(map);
 map.addControl(L.control.scroll());
 map.addControl(L.control.alertDialog());
diff --git a/loleaflet/reference.html b/loleaflet/reference.html
index 58bdb351b..8350a9fe9 100644
--- a/loleaflet/reference.html
+++ b/loleaflet/reference.html
@@ -3136,12 +3136,34 @@ WOPI host to editor
id: 


-   Hides a button from the toolbar.
+   Shows a button from the toolbar.
id is the button ID as defined in the
https://opengrok.libreoffice.org/search?project=online&q=&defs=createToolbar";>createToolbar
function in https://opengrok.libreoffice.org/xref/online/loleaflet/js/toolbar.js";>loleaflet/js/toolbar.js.


+   
+   Hide_Menu_Item
+   
+   id: 
+   
+   
+   Hides an item from the menu.
+   id is the item ID as defined in the
+   https://opengrok.libreoffice.org/xref/online/loleaflet/src/control/Control.Menubar.js";>loleaflet/src/control/Control.Menubar.js.
+   
+   
+   
+   Show_Menu_Item
+   
+   id: 
+   
+   
+   Shows an item from the menu.
+   id is the item ID as defined in the
+   https://opengrok.libreoffice.org/xref/online/loleaflet/src/control/Control.Menubar.js";>loleaflet/src/control/Control.Menubar.js.
+   
+   
 
 Editor to WOPI host
 
diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index 32591f830..1d03ac4b5 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -986,6 +986,39 @@ L.Control.Menubar = L.Control.extend({
return itemList;
},
 
+   _getItems: function() {
+   return 
$(this._menubarCont).children().children('ul').children('li').add($(this._menubarCont).children('li'));
+   },
+
+   _getItem: function(targetId) {
+   var items = this._getItems();
+   var found = $(items).filter(function() {
+   var item = this;
+   var id = $(item).attr('id');
+   if (id && id == 'menu-' + targetId) {
+   return true;
+   }
+   return false
+   });
+   return found.length ? found : null;
+   },
+
+   hasItem: function(targetId) {
+   return this._getItem(targetId) != null;
+   },
+
+   hideItem: function(targetId) {
+   var item = this._getItem(targetId);
+   if (item)
+   $(item).css('display', 'none');
+   },
+
+   showItem: function(targetId) {
+   var item = this._getItem(targetId);
+   if (item)
+   $(item).css('display', '');
+   },
+
_initializeMenu: function(menu) {
var menuHtml = this._createMenu(menu);
for (var i in menuHtml) {
diff --git a/loleaflet/src/map/handler/Map.WOPI.js 
b/loleaflet/src/map/handler/Map.WOPI.js
index ff9200086..42a84aa7d 100644
--- a/loleaflet/src/map/handler/Map.WOPI.js
+++ b/loleaflet/src/map/handler/Map.WOPI.js
@@ -218,6 +218,31 @@ L.Map.WOPI = L.Handler.extend({
w2ui['editbar'].hide(msg.Values.id);
}

[Libreoffice-commits] online.git: net/Socket.cpp test/UnitHTTP.cpp

2019-07-08 Thread Andras Timar (via logerrit)
 net/Socket.cpp|4 +++-
 test/UnitHTTP.cpp |5 +++--
 2 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit f4dbe43c3ec0d4c1b6353d3d506f609665df5f84
Author: Andras Timar 
AuthorDate: Mon Jul 8 18:20:19 2019 +0200
Commit: Andras Timar 
CommitDate: Mon Jul 8 21:05:46 2019 +0200

keep the project buildable with poco 1.7.8

Change-Id: I87957a0b928f92f02ce72b7e6a2a575f2e5bad8d
Reviewed-on: https://gerrit.libreoffice.org/75231
Reviewed-by: Michael Meeks 
Tested-by: Andras Timar 

diff --git a/net/Socket.cpp b/net/Socket.cpp
index 8205519c9..17ceb3858 100644
--- a/net/Socket.cpp
+++ b/net/Socket.cpp
@@ -694,7 +694,9 @@ bool StreamSocket::parseHeader(const char *clientName,
 if (map)
 map->_messageSize += contentLength;
 
-if (request.getExpectContinue() && !_sentHTTPContinue)
+const std::string& expect = request.get("Expect", "");
+bool getExpectContinue =  !expect.empty() && Poco::icompare(expect, 
"100-continue") == 0;
+if (getExpectContinue && !_sentHTTPContinue)
 {
 LOG_TRC("#" << getFD() << " got Expect: 100-continue, sending 
Continue");
 // FIXME: should validate authentication headers early too.
diff --git a/test/UnitHTTP.cpp b/test/UnitHTTP.cpp
index 5439124af..70bda0733 100644
--- a/test/UnitHTTP.cpp
+++ b/test/UnitHTTP.cpp
@@ -19,6 +19,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -52,10 +53,10 @@ public:
 switch(i)
 {
 case 0:
-request.setExpectContinue(false);
+request.erase("Expect");
 break;
 case 1:
-request.setExpectContinue(true);
+request.set("Expect", "100-continue");
 break;
 default:
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4-0' - net/Socket.cpp test/UnitHTTP.cpp

2019-07-08 Thread Andras Timar (via logerrit)
 net/Socket.cpp|4 +++-
 test/UnitHTTP.cpp |5 +++--
 2 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 06f3f9f0342bf18113f78b86740bb32d75de9ebd
Author: Andras Timar 
AuthorDate: Mon Jul 8 18:20:19 2019 +0200
Commit: Andras Timar 
CommitDate: Mon Jul 8 21:05:57 2019 +0200

keep the project buildable with poco 1.7.8

Change-Id: I87957a0b928f92f02ce72b7e6a2a575f2e5bad8d
Reviewed-on: https://gerrit.libreoffice.org/75241
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/net/Socket.cpp b/net/Socket.cpp
index 5b863c8ae..03b839d48 100644
--- a/net/Socket.cpp
+++ b/net/Socket.cpp
@@ -498,7 +498,9 @@ bool StreamSocket::parseHeader(const char *clientName,
 if (map)
 map->_messageSize += contentLength;
 
-if (request.getExpectContinue() && !_sentHTTPContinue)
+const std::string& expect = request.get("Expect", "");
+bool getExpectContinue =  !expect.empty() && Poco::icompare(expect, 
"100-continue") == 0;
+if (getExpectContinue && !_sentHTTPContinue)
 {
 LOG_TRC("#" << getFD() << " got Expect: 100-continue, sending 
Continue");
 // FIXME: should validate authentication headers early too.
diff --git a/test/UnitHTTP.cpp b/test/UnitHTTP.cpp
index e86593f22..1bd3f5437 100644
--- a/test/UnitHTTP.cpp
+++ b/test/UnitHTTP.cpp
@@ -19,6 +19,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -52,10 +53,10 @@ public:
 switch(i)
 {
 case 0:
-request.setExpectContinue(false);
+request.erase("Expect");
 break;
 case 1:
-request.setExpectContinue(true);
+request.set("Expect", "100-continue");
 break;
 default:
 break;
___
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.2' - postprocess/Module_postprocess.mk

2019-07-08 Thread Andras Timar (via logerrit)
 postprocess/Module_postprocess.mk |4 
 1 file changed, 4 insertions(+)

New commits:
commit fb8cd9b80932f139972d5c55887d8e3da0287317
Author: Andras Timar 
AuthorDate: Thu Jan 24 10:28:07 2019 +
Commit: Andras Timar 
CommitDate: Mon Jul 8 20:11:45 2019 +0200

disable a few failing unit tests in MPLv2 subset

Change-Id: If7595983f7bf2d990687a64659a63a8a66b120bd

diff --git a/postprocess/Module_postprocess.mk 
b/postprocess/Module_postprocess.mk
index b02faf7b9310..4671cbc84508 100644
--- a/postprocess/Module_postprocess.mk
+++ b/postprocess/Module_postprocess.mk
@@ -49,8 +49,12 @@ $(eval $(call gb_Module_add_check_targets,postprocess,\
 endif
 endif
 
+# Implementation com.sun.star.xml.security.SEInitializer_Gpg
+# does not provide a constructor or factory in case of MPLv2 subset
+ifneq ($(MPL_SUBSET),TRUE)
 $(eval $(call gb_Module_add_check_targets,postprocess,\
CppunitTest_services \
 ))
+endif
 
 # vim: set noet sw=4 ts=4:
___
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.2' - sw/qa

2019-07-08 Thread Andras Timar (via logerrit)
 sw/qa/extras/tiledrendering/tiledrendering.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 3350167d53cd4b25213c716d1a23dcbbbe8b21f9
Author: Andras Timar 
AuthorDate: Mon Jul 8 19:41:42 2019 +0200
Commit: Andras Timar 
CommitDate: Mon Jul 8 19:41:42 2019 +0200

Fix sw_tiledrendering test failure (again, a new one)

Change-Id: Icfda3c2f087b6297fe22f6d30ff41aceb3c70088

diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index bd7d3c6b0b87..04069f6f904b 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -2427,6 +2427,8 @@ void SwTiledRenderingTest::testAnchorTypes()
 // Without the accompanying fix in place, this test would have failed, 
setting the anchor type
 // to other than as/at-char was possible.
 CPPUNIT_ASSERT(!aSet.HasItem(FN_TOOL_ANCHOR_PAGE));
+
+comphelper::LibreOfficeKit::setActive(false);
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(SwTiledRenderingTest);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - translations

2019-07-08 Thread Andras Timar (via logerrit)
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fe34686967e6dd94b9d76bca94a1efe99f5888a0
Author: Andras Timar 
AuthorDate: Mon Jul 8 19:00:08 2019 +0200
Commit: Gerrit Code Review 
CommitDate: Mon Jul 8 19:00:37 2019 +0200

Update git submodules

* Update translations from branch 'libreoffice-6-3'
  - Updated Slovenian translation

Change-Id: Ib5225208f8d08e85fdb98ac1f7d3a240849bab4f

diff --git a/translations b/translations
index f893ad2c20db..4055332cbb79 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit f893ad2c20dbc92205bcfaa2a85e76c6a17dee24
+Subproject commit 4055332cbb79537287218fada3b2fd9db3ea8bb1
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] translations.git: Branch 'libreoffice-6-3' - source/sl

2019-07-08 Thread Andras Timar (via logerrit)
 source/sl/cui/messages.po  |4 
 source/sl/filter/messages.po   |   72 -
 source/sl/helpcontent2/source/text/sbasic/guide.po |4 
 source/sl/helpcontent2/source/text/sbasic/shared.po|4 
 source/sl/helpcontent2/source/text/scalc/01.po |4 
 source/sl/helpcontent2/source/text/shared/01.po|4 
 source/sl/helpcontent2/source/text/shared/guide.po |4 
 source/sl/helpcontent2/source/text/shared/optionen.po  |4 
 source/sl/helpcontent2/source/text/swriter/01.po   |4 
 source/sl/instsetoo_native/inc_openoffice/windows/msi_languages.po |4 
 source/sl/officecfg/registry/data/org/openoffice/Office/UI.po  |4 
 source/sl/sc/messages.po   |  303 ++---
 source/sl/scp2/source/winexplorerext.po|4 
 source/sl/sd/messages.po   |  582 
--
 source/sl/shell/messages.po|4 
 source/sl/sw/messages.po   |  343 ++---
 16 files changed, 672 insertions(+), 676 deletions(-)

New commits:
commit 4055332cbb79537287218fada3b2fd9db3ea8bb1
Author: Andras Timar 
AuthorDate: Mon Jul 8 19:00:08 2019 +0200
Commit: Andras Timar 
CommitDate: Mon Jul 8 19:00:16 2019 +0200

Updated Slovenian translation

Change-Id: Ib5225208f8d08e85fdb98ac1f7d3a240849bab4f

diff --git a/source/sl/cui/messages.po b/source/sl/cui/messages.po
index 1f0de2d0c5d..9d381c8d898 100644
--- a/source/sl/cui/messages.po
+++ b/source/sl/cui/messages.po
@@ -3,14 +3,14 @@ msgid ""
 msgstr ""
 "Project-Id-Version: LibreOffice 6.3\n"
 "Report-Msgid-Bugs-To: 
https://bugs.libreoffice.org/enter_bug.cgi?product=LibreOffice&bug_status=UNCONFIRMED&component=UI\n";
-"POT-Creation-Date: 2019-06-30 18:39+0200\n"
+"POT-Creation-Date: 2019-07-08 14:25+0200\n"
 "PO-Revision-Date: 2019-07-01 00:39+0200\n"
 "Last-Translator: Martin Srebotnjak \n"
 "Language-Team: sl.libreoffice.org\n"
-"Language: sl\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: sl\n"
 "Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || 
n%100==4 ? 2 : 3);\n"
 "X-Generator: Virtaal 0.7.1\n"
 "X-Accelerator-Marker: ~\n"
diff --git a/source/sl/filter/messages.po b/source/sl/filter/messages.po
index d62254f1aca..fc9f1806d02 100644
--- a/source/sl/filter/messages.po
+++ b/source/sl/filter/messages.po
@@ -3,8 +3,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: LibreOffice 6.3\n"
 "Report-Msgid-Bugs-To: 
https://bugs.libreoffice.org/enter_bug.cgi?product=LibreOffice&bug_status=UNCONFIRMED&component=UI\n";
-"POT-Creation-Date: 2019-05-15 10:34+0200\n"
-"PO-Revision-Date: 2019-07-05 09:35+0200\n"
+"POT-Creation-Date: 2019-07-08 14:25+0200\n"
+"PO-Revision-Date: 2019-07-08 15:33+0200\n"
 "Last-Translator: Martin Srebotnjak \n"
 "Language-Team: sl.libreoffice.org\n"
 "Language: sl\n"
@@ -422,111 +422,121 @@ msgid "Creates a PDF that is easily editable in 
%PRODUCTNAME"
 msgstr "Omogoči enostavno urejanje tega dokumenta PDF v %PRODUCTNAME"
 
 #: filter/uiconfig/ui/pdfgeneralpage.ui:466
-msgctxt "pdfgeneralpage|pdfa"
-msgid "Archive P_DF/A-2b (ISO 19005-2)"
-msgstr "Arhivski P_DF/A-2b (ISO 19005-2)"
-
-#: filter/uiconfig/ui/pdfgeneralpage.ui:470
-msgctxt "pdfgeneralpage|pdfa|tooltip_text"
-msgid "Creates an ISO 19005-2 compliant PDF file, ideal for long-term document 
preservation"
-msgstr "Ustvari datoteko PDF, skladno s standardom ISO 19005-2, ki je idealna 
za dolgotrajno hrambo in arhiviranje dokumentov."
-
-#: filter/uiconfig/ui/pdfgeneralpage.ui:482
 msgctxt "pdfgeneralpage|tagged"
 msgid "_Tagged PDF (add document structure)"
 msgstr "_Označeni PDF (dodaj strukturo dokumenta)"
 
-#: filter/uiconfig/ui/pdfgeneralpage.ui:486
+#: filter/uiconfig/ui/pdfgeneralpage.ui:470
 msgctxt "pdfgeneralpage|tagged|tooltip_text"
 msgid "Includes a document's content structure information in a PDF"
 msgstr "Vključuje strukturo vsebine dokumenta v PDF"
 
-#: filter/uiconfig/ui/pdfgeneralpage.ui:498
+#: filter/uiconfig/ui/pdfgeneralpage.ui:482
 msgctxt "pdfgeneralpage|forms"
 msgid "_Create PDF form"
 msgstr "_Ustvari obrazec PDF"
 
-#: filter/uiconfig/ui/pdfgeneralpage.ui:502
+#: filter/uiconfig/ui/pdfgeneralpage.ui:486
 msgctxt "pdfgeneralpage|forms|tooltip_text"
 msgid "Creates a PDF with fields that can be filled out"
 msgstr "Ustvari PDF s polji, ki jih je mogoče izpolniti"
 
-#: filter/uiconfig/ui/pdfgeneralpage.ui:527
+#: filter/uiconfig/ui/pdfgeneralpage.ui:511
 msgctxt "pdfgeneralpage|label7"
 msgid "Submit _format:"
 msgstr "Pošlji _obliko:"
 
-#: filter/uiconfig/ui/pdfgeneralpage.ui:542
+#: filter/uiconfig/ui/pdfgeneralpage.ui:526
 msgctxt "pdfgeneralpage|format"
 msgid "FDF"
 msgstr "FDF"
 
-#: filt

Re: tinderbox Win-x86_64_42 failing

2019-07-08 Thread Eike Rathke
Hi,

On Saturday, 2019-07-06 20:25:04 +0200, Jan-Marek Glogowski wrote:

> I opened a bug report with all the relevant information:
> https://bugs.documentfoundation.org/show_bug.cgi?id=126255
> 
> IMHO the unit test should test the existence of the linked file instead of 
> "..".

No, the test is about writing the relative link as relative IRI, see
explanation in
https://bugs.documentfoundation.org/show_bug.cgi?id=126255#c5

Should be fixed with
https://git.libreoffice.org/core/+/7ec598639a900e21ea472a85057aadee10796778%5E%21

and test enabled again with
https://git.libreoffice.org/core/+/1458d43690684c5ce6ed4409bef34a23cfbab7f2%5E%21

  Eike

-- 
GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A


signature.asc
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

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

2019-07-08 Thread Eike Rathke (via logerrit)
 sc/qa/unit/subsequent_export-test.cxx |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 1458d43690684c5ce6ed4409bef34a23cfbab7f2
Author: Eike Rathke 
AuthorDate: Mon Jul 8 13:49:01 2019 +0200
Commit: Eike Rathke 
CommitDate: Mon Jul 8 17:20:22 2019 +0200

Revert "tdf#126255 disable broken relative link unit test"

This reverts commit dfdd2b0126a677960946c5ff2b905e95b978b2d5.

Wrong assumptions about xlink:href, see
https://bugs.documentfoundation.org/show_bug.cgi?id=126255#c5

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

diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index b2bc00573688..473be4c8593b 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -3080,12 +3080,10 @@ void ScExportTest::testRelativePathsODS()
 
 xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, 
"content.xml", FORMAT_ODS);
 CPPUNIT_ASSERT(pDoc);
-// FIXME: make sure that the URL is relative and actually points to the 
existing document
-#if 0
 OUString aURL = getXPath(pDoc,
 
"/office:document-content/office:body/office:spreadsheet/table:table/table:table-row[2]/table:table-cell[2]/text:p/text:a",
 "href");
+// make sure that the URL is relative
 CPPUNIT_ASSERT(aURL.startsWith(".."));
-#endif
 }
 
 namespace {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-08 Thread Eike Rathke (via logerrit)
 sc/qa/unit/data/ods/fdo79305.ods |binary
 1 file changed

New commits:
commit 7ec598639a900e21ea472a85057aadee10796778
Author: Eike Rathke 
AuthorDate: Mon Jul 8 13:48:28 2019 +0200
Commit: Eike Rathke 
CommitDate: Mon Jul 8 17:19:58 2019 +0200

Resolves: tdf#126255 correct xlink:href to escape package, tdf#79305 related

The test document wasn't adapted to contain the extra ../ to
escape the ODF package. So instead of
xlink:href="../xlsx/databar.xlsx" it must be
xlink:href="../../xlsx/databar.xlsx"

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

diff --git a/sc/qa/unit/data/ods/fdo79305.ods b/sc/qa/unit/data/ods/fdo79305.ods
index c6f011c4fcde..247c9020e1e3 100644
Binary files a/sc/qa/unit/data/ods/fdo79305.ods and 
b/sc/qa/unit/data/ods/fdo79305.ods differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

GSOC Report Week 6

2019-07-08 Thread Rasmus Jonsson
Last week I finished up a lot of the things that were due for the first
evaluation/ phase of the project.

* Make the information screen work properly
  * Display correct URL
  * Mix better with LibreOffice slideshow (still not perfect)
* Various minor additions to the run scripts
* Set default values for presentations (timing, transitions,
  always-fullscreen)
* When only playing one (1) presentation, loop it
* Control panel Play/Stop buttons work as intended; indicate currently
  playing presentation
* Started work on the "Impress JS" sub-project. (There's already a
  project with this name, so a new name is needed)

Thorsten suggested to create a JavaScript-/web-based Impress Remote to
use with this project. I've divided it into three parts:

A "LibreSign"-specific (LibreOffice Appliances GSOC 2019 i.e. this
project) web application.
A JavaScript library implementing the Impress Remote Protocol.
A Python WebSocket server also implementing the Impress Remote Protocol
and acting as a relay between the clients and LibreOffice.

The intended use is primarily for "LibreSign", to be able to control
slideshows without installing the Impress Remote app. 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

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

2019-07-08 Thread Jim Raykowski (via logerrit)
 sw/source/uibase/docvw/HeaderFooterWin.cxx |5 ++---
 sw/source/uibase/wrtsh/wrtsh1.cxx  |2 ++
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit fea249a4d883231bf6f6eda7146b0a86f8e591a3
Author: Jim Raykowski 
AuthorDate: Tue Jul 2 08:54:02 2019 -0800
Commit: Michael Stahl 
CommitDate: Mon Jul 8 16:46:12 2019 +0200

tdf#125863 Rework tdf#107593 so header footer delete doesn't crash

Header footer delete from the last page when last page is unneeded
(stack level 24 SwRootFrame::RemoveSuperfluous /// remove pages that are
not needed at all) causes SwFrameMenuButtonBase::dispose() which sets
m_pFrame to nullptr which causes crash when IsEmptyHeaderFooter calls
GetPageFrame(). Doing ToggleHeaderFooterEdit() when header or footer
deletion is accepted in SwWrtShell::ChangeHeaderOrFooter avoids the
crash. SwHeaderFooterWin is also disposed which would make the
GrabFocusToDocument crash if it got that far so use the shell window
which is still valid here to GrabFocusToDocument.

Change-Id: Iaced23e6716442671c5ea29b79be178f4fc836d3
Reviewed-on: https://gerrit.libreoffice.org/75010
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 
(cherry picked from commit 151eae314358f9ee0df017cb89fbc8c87c969cdb)
Reviewed-on: https://gerrit.libreoffice.org/75205
Tested-by: Jenkins

diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx 
b/sw/source/uibase/docvw/HeaderFooterWin.cxx
index e22530d780ea..45d84a630281 100644
--- a/sw/source/uibase/docvw/HeaderFooterWin.cxx
+++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx
@@ -448,9 +448,8 @@ void SwHeaderFooterWin::ExecuteCommand(const OString& 
rIdent)
 else if (rIdent == "delete")
 {
 rSh.ChangeHeaderOrFooter( rStyleName, m_bIsHeader, false, true );
-if ( IsEmptyHeaderFooter() )
-rSh.ToggleHeaderFooterEdit();
-GrabFocusToDocument();
+// warning: "this" may be disposed now
+rSh.GetWin()->GrabFocusToDocument();
 }
 else if (rIdent == "insert_pagenumber")
 {
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx 
b/sw/source/uibase/wrtsh/wrtsh1.cxx
index cf2074b93467..16acb2c7cc5f 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -1818,6 +1818,8 @@ void SwWrtShell::ChangeHeaderOrFooter(
 
 bExecute = nResult == RET_YES;
 StartAllAction();
+if (nResult == RET_YES)
+ToggleHeaderFooterEdit();
 }
 if( bExecute )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-08 Thread Jim Raykowski (via logerrit)
 sw/source/uibase/docvw/HeaderFooterWin.cxx |5 ++---
 sw/source/uibase/wrtsh/wrtsh1.cxx  |2 ++
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 3597e95c6ec921fff04fc6387ff9427be54302bc
Author: Jim Raykowski 
AuthorDate: Tue Jul 2 08:54:02 2019 -0800
Commit: Michael Stahl 
CommitDate: Mon Jul 8 16:46:21 2019 +0200

tdf#125863 Rework tdf#107593 so header footer delete doesn't crash

Header footer delete from the last page when last page is unneeded
(stack level 24 SwRootFrame::RemoveSuperfluous /// remove pages that are
not needed at all) causes SwFrameMenuButtonBase::dispose() which sets
m_pFrame to nullptr which causes crash when IsEmptyHeaderFooter calls
GetPageFrame(). Doing ToggleHeaderFooterEdit() when header or footer
deletion is accepted in SwWrtShell::ChangeHeaderOrFooter avoids the
crash. SwHeaderFooterWin is also disposed which would make the
GrabFocusToDocument crash if it got that far so use the shell window
which is still valid here to GrabFocusToDocument.

Change-Id: Iaced23e6716442671c5ea29b79be178f4fc836d3
Reviewed-on: https://gerrit.libreoffice.org/75010
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 
(cherry picked from commit 151eae314358f9ee0df017cb89fbc8c87c969cdb)
Reviewed-on: https://gerrit.libreoffice.org/75206
Tested-by: Jenkins

diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx 
b/sw/source/uibase/docvw/HeaderFooterWin.cxx
index 9e66daab2a24..f645ca6028f7 100644
--- a/sw/source/uibase/docvw/HeaderFooterWin.cxx
+++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx
@@ -434,9 +434,8 @@ void SwHeaderFooterWin::ExecuteCommand(const OString& 
rIdent)
 else if (rIdent == "delete")
 {
 rSh.ChangeHeaderOrFooter( rStyleName, m_bIsHeader, false, true );
-if ( IsEmptyHeaderFooter() )
-rSh.ToggleHeaderFooterEdit();
-GrabFocusToDocument();
+// warning: "this" may be disposed now
+rSh.GetWin()->GrabFocusToDocument();
 }
 else if (rIdent == "insert_pagenumber")
 {
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx 
b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 233947209bbe..5be78634068c 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -1795,6 +1795,8 @@ void SwWrtShell::ChangeHeaderOrFooter(
 
 bExecute = nResult == RET_YES;
 StartAllAction();
+if (nResult == RET_YES)
+ToggleHeaderFooterEdit();
 }
 if( bExecute )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-08 Thread Noel Grandin (via logerrit)
 cui/source/tabpages/backgrnd.cxx  |   16 
 extensions/source/scanner/sanedlg.cxx |8 
 2 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 3eeb5e19e73978b394d2610b776fbc7efbfa0c26
Author: Noel Grandin 
AuthorDate: Mon Jul 8 12:18:42 2019 +0200
Commit: Noel Grandin 
CommitDate: Mon Jul 8 16:02:01 2019 +0200

use BitmapEx in BackgroundPreviewImpl

Change-Id: Iecbb528c526389d7eed0205c06a21c3cd0753644
Reviewed-on: https://gerrit.libreoffice.org/75211
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 1bec48871dfb..5b70f37d88e0 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -117,7 +117,7 @@ public:
 void setBmp(bool bBmp);
 
 voidNotifyChange(const Color&  rColor);
-voidNotifyChange(const Bitmap* pBitmap);
+voidNotifyChange(const BitmapEx* pBitmap);
 voidSetFillColor(const Color& rColor) { aColor = rColor; }
 
 protected:
@@ -130,7 +130,7 @@ private:
 void recalcDrawPos();
 
 boolbIsBmp;
-std::unique_ptr pBitmap;
+std::unique_ptr pBitmap;
 Point   aDrawPos;
 SizeaDrawSize;
 ::tools::Rectangle aDrawRect;
@@ -168,14 +168,14 @@ void BackgroundPreviewImpl::NotifyChange( const Color& 
rColor )
 }
 }
 
-void BackgroundPreviewImpl::NotifyChange( const Bitmap* pNewBitmap )
+void BackgroundPreviewImpl::NotifyChange( const BitmapEx* pNewBitmap )
 {
 if (bIsBmp && (pNewBitmap || pBitmap))
 {
 if (pNewBitmap && pBitmap)
 *pBitmap = *pNewBitmap;
 else if (pNewBitmap && !pBitmap)
-pBitmap.reset( new Bitmap(*pNewBitmap) );
+pBitmap.reset( new BitmapEx(*pNewBitmap) );
 else if (!pNewBitmap)
 pBitmap.reset();
 
@@ -248,7 +248,7 @@ void BackgroundPreviewImpl::Paint(vcl::RenderContext& 
rRenderContext, const ::to
 if (bIsBmp)
 {
 if (pBitmap)
-rRenderContext.DrawBitmap(aDrawPos, aDrawSize, *pBitmap);
+rRenderContext.DrawBitmapEx(aDrawPos, aDrawSize, *pBitmap);
 else
 {
 Size aSize(GetOutputSizePixel());
@@ -998,7 +998,7 @@ IMPL_LINK(SvxBackgroundTabPage, FileClickHdl_Impl, 
weld::ToggleButton&, rBox, vo
 
 if ( bIsGraphicValid )
 {
-Bitmap aBmp = aBgdGraphic.GetBitmapEx().GetBitmap();
+BitmapEx aBmp = aBgdGraphic.GetBitmapEx();
 m_xPreview2->NotifyChange( &aBmp );
 }
 else
@@ -1106,7 +1106,7 @@ IMPL_LINK( SvxBackgroundTabPage, LoadIdleHdl_Impl, 
Timer*, pIdle, void )
 
 if (m_xBtnPreview->get_active() && bIsGraphicValid)
 {
-Bitmap aBmp = aBgdGraphic.GetBitmapEx().GetBitmap();
+BitmapEx aBmp = aBgdGraphic.GetBitmapEx();
 m_xPreview2->NotifyChange( &aBmp );
 }
 else
@@ -1317,7 +1317,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const 
SvxBrushItem& rBgdAttr,
 
 if (m_xBtnPreview->get_active() && bIsGraphicValid)
 {
-Bitmap aBmp = aBgdGraphic.GetBitmapEx().GetBitmap();
+BitmapEx aBmp = aBgdGraphic.GetBitmapEx();
 m_xPreview2->NotifyChange( &aBmp );
 }
 else
commit 5a60a01af104b48aa9569ecb6204c865db74df9e
Author: Noel Grandin 
AuthorDate: Mon Jul 8 12:22:51 2019 +0200
Commit: Noel Grandin 
CommitDate: Mon Jul 8 16:01:52 2019 +0200

use BitmapEx in ScanPreview

Change-Id: Ief3dc627ad0e0096eb8d3ef4dc4e538fa34cb703
Reviewed-on: https://gerrit.libreoffice.org/75212
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/extensions/source/scanner/sanedlg.cxx 
b/extensions/source/scanner/sanedlg.cxx
index 2f9d710a41e7..0a7bdb2565c3 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -75,7 +75,7 @@ private:
 enum DragDirection { TopLeft, Top, TopRight, Right, BottomRight, Bottom,
  BottomLeft, Left };
 
-BitmapmaPreviewBitmap;
+BitmapEx  maPreviewBitmapEx;
 tools::Rectangle maPreviewRect;
 Point maTopLeft, maBottomRight;
 Point maMinTopLeft, maMaxBottomRight;
@@ -193,7 +193,7 @@ public:
 void UpdatePreviewBounds();
 void SetBitmap(SvStream &rStream)
 {
-ReadDIB(maPreviewBitmap, rStream, true);
+ReadDIBBitmapEx(maPreviewBitmapEx, rStream, true);
 }
 virtual Size GetOptimalSize() const override
 {
@@ -928,7 +928,7 @@ void ScanPreview::UpdatePreviewBounds()
 }
 else
 {
-Size aBMSize( maPreviewBitmap.GetSizePixel() );
+Size aBMSize( maPreviewBitmapEx.GetSizePixel() );
 if( aBMSize.Width() > aBMSize.Height() && aBMSize.Width() )
 {
 int nVHeight

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

2019-07-08 Thread Noel Grandin (via logerrit)
 filter/source/graphicfilter/ios2met/ios2met.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit f6b87a7d64cd7c979ebbe032166ef256d4f0d844
Author: Noel Grandin 
AuthorDate: Mon Jul 8 12:25:02 2019 +0200
Commit: Noel Grandin 
CommitDate: Mon Jul 8 15:51:34 2019 +0200

use BitmapEx in OS2METReader

Change-Id: I03750087174488f1debb2c33e55effe956a59e1d
Reviewed-on: https://gerrit.libreoffice.org/75213
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx 
b/filter/source/graphicfilter/ios2met/ios2met.cxx
index 56ca5ac3c241..f1d8e5661083 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -246,7 +246,7 @@ struct OSFont {
 struct OSBitmap {
 OSBitmap * pSucc;
 sal_uInt32 nID;
-Bitmap aBitmap;
+BitmapEx   aBitmapEx;
 
 // required during reading of the bitmap:
 SvStream * pBMP; // pointer to temporary Windows-BMP file or NULL
@@ -990,7 +990,7 @@ void OS2METReader::ReadBitBlt()
 while (pB!=nullptr && pB->nID!=nID) pB=pB->pSucc;
 if (pB!=nullptr) {
 SetRasterOp(aAttr.ePatMix);
-pVirDev->DrawBitmap(aP1,aSize,pB->aBitmap);
+pVirDev->DrawBitmapEx(aP1,aSize,pB->aBitmapEx);
 }
 }
 
@@ -2486,7 +2486,7 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, 
sal_uInt16 nFieldSize)
 }
 pBitmapList->pBMP->Seek(0);
 
-ReadDIB(pBitmapList->aBitmap, *(pBitmapList->pBMP), false);
+ReadDIBBitmapEx(pBitmapList->aBitmapEx, *(pBitmapList->pBMP), 
false);
 
 if (pBitmapList->pBMP->GetError()!=ERRCODE_NONE) {
 pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-08 Thread Noel Grandin (via logerrit)
 sd/source/ui/tools/PreviewRenderer.cxx |6 +++---
 svtools/source/misc/embedhlp.cxx   |2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 6b736710c08a272c8fd1b741c380032363b527b4
Author: Noel Grandin 
AuthorDate: Mon Jul 8 12:29:58 2019 +0200
Commit: Noel Grandin 
CommitDate: Mon Jul 8 15:50:13 2019 +0200

use BitmapEx in PreviewRenderer::ScaleBitmap

Change-Id: I9f94c9cceb3c1828b9b1d21ac064dae2c12565c8
Reviewed-on: https://gerrit.libreoffice.org/75214
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sd/source/ui/tools/PreviewRenderer.cxx 
b/sd/source/ui/tools/PreviewRenderer.cxx
index b3eb95402df3..8f5d2dd73609 100644
--- a/sd/source/ui/tools/PreviewRenderer.cxx
+++ b/sd/source/ui/tools/PreviewRenderer.cxx
@@ -451,12 +451,12 @@ Image PreviewRenderer::ScaleBitmap (
 mpPreviewDevice->DrawRect (::tools::Rectangle(Point(0,0), aFrameSize));
 
 // Paint the bitmap scaled to the desired width.
-BitmapEx aScaledBitmap (rBitmapEx.GetBitmap());
+BitmapEx aScaledBitmap(rBitmapEx);
 aScaledBitmap.Scale (aPreviewSize, BmpScaleFlag::BestQuality);
-mpPreviewDevice->DrawBitmap (
+mpPreviewDevice->DrawBitmapEx (
 Point(1,1),
 aPreviewSize,
-aScaledBitmap.GetBitmap());
+aScaledBitmap);
 
 // Get the resulting bitmap.
 aPreview = Image(mpPreviewDevice->GetBitmapEx(Point(0,0), aFrameSize));
commit 44718954e78c88442ff6654d3e13ba69188e2d38
Author: Noel Grandin 
AuthorDate: Mon Jul 8 12:33:40 2019 +0200
Commit: Noel Grandin 
CommitDate: Mon Jul 8 15:50:00 2019 +0200

use BitmapEx in EmbeddedObjectRef::DrawPaintReplacement

Change-Id: Ia15a34abaf941ae4af34dbb3cb93a7525a746cd1
Reviewed-on: https://gerrit.libreoffice.org/75215
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index eace6d8e927a..beb765409a35 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -709,7 +709,7 @@ void EmbeddedObjectRef::DrawPaintReplacement( const 
tools::Rectangle &rRect, con
 nWidth = nW;
 }
 
-pOut->DrawBitmap(aP, Size( nWidth, nHeight ), aBmp.GetBitmap());
+pOut->DrawBitmapEx(aP, Size( nWidth, nHeight ), aBmp);
 }
 
 pOut->IntersectClipRegion( rRect );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-08 Thread Gabor Kelemen (via logerrit)
 sc/inc/globstr.hrc |1 +
 sc/source/filter/excel/xichart.cxx |2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit bf726e66fecffc05d61b9c6d97dfa82fee9ab2c8
Author: Gabor Kelemen 
AuthorDate: Mon Jul 8 11:32:33 2019 +0200
Commit: Katarina Behrens 
CommitDate: Mon Jul 8 15:29:31 2019 +0200

tdf#126192 (Related) Translate automatic chart axis labels in xls

Automatic axis labels in xls format are created on a different code
path than the ones in OOXML, translate these too

Change-Id: Id1e8a10accf765d40d71c4fcdfec2c1acee832a2
Reviewed-on: https://gerrit.libreoffice.org/75202
Tested-by: Jenkins
Reviewed-by: Katarina Behrens 

diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index e0bc77c3a260..38d182613fdb 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -353,6 +353,7 @@
 #define STR_FUNCTIONLIST_MORE   NC_("STR_FUNCTIONLIST_MORE", 
"More...")
 #define STR_ERR_INVALID_AREANC_("STR_ERR_INVALID_AREA", 
"Invalid range")
 #define STR_CHARTTITLE  NC_("STR_CHARTTITLE", "Chart 
Title")
+#define STR_AXISTITLE   NC_("STR_AXISTITLE", "Axis 
Title")
 // Templates for data pilot tables.
 #define STR_PIVOT_STYLENAME_INNER   
NC_("STR_PIVOT_STYLE_INNER", "Pivot Table Value")
 #define STR_PIVOT_STYLENAME_RESULT  
NC_("STR_PIVOT_STYLE_RESULT", "Pivot Table Result")
diff --git a/sc/source/filter/excel/xichart.cxx 
b/sc/source/filter/excel/xichart.cxx
index 6c003d53d0d4..cbdedcaa09bc 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -3586,7 +3586,7 @@ void XclImpChAxesSet::Finalize()
 
 // finalize axis titles
 const XclImpChText* pDefText = GetChartData().GetDefaultText( 
EXC_CHTEXTTYPE_AXISTITLE );
-OUString aAutoTitle("Axis Title");
+OUString aAutoTitle(ScResId(STR_AXISTITLE));
 lclFinalizeTitle( mxXAxisTitle, pDefText, aAutoTitle );
 lclFinalizeTitle( mxYAxisTitle, pDefText, aAutoTitle );
 lclFinalizeTitle( mxZAxisTitle, pDefText, aAutoTitle );
___
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' - sw/inc

2019-07-08 Thread Miklos Vajna (via logerrit)
 sw/inc/postithelper.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1e4d55f2663f95375f0f864bed232e5600c3d7ca
Author: Miklos Vajna 
AuthorDate: Mon Jul 8 14:34:35 2019 +0200
Commit: Miklos Vajna 
CommitDate: Mon Jul 8 14:45:57 2019 +0200

sw: fix gcc-4.8 build

Change-Id: Ic912a3760ab0faa2db647a74a9290edd04a1de0e
Reviewed-on: https://gerrit.libreoffice.org/75221
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx
index 2a4d5699e426..1ac716d91e38 100644
--- a/sw/inc/postithelper.hxx
+++ b/sw/inc/postithelper.hxx
@@ -34,7 +34,7 @@ class SwEditWin;
 namespace sw { namespace annotation {
 class SwAnnotationWin;
 } }
-namespace sw::mark { class IMark; }
+namespace sw { namespace mark { class IMark; } }
 
 struct SwPosition;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-08 Thread Noel Grandin (via logerrit)
 svx/source/svdraw/svdhdl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1165f4008ecadf03685776884f5222ad71814cf4
Author: Noel Grandin 
AuthorDate: Mon Jul 8 11:51:03 2019 +0200
Commit: Noel Grandin 
CommitDate: Mon Jul 8 14:43:32 2019 +0200

no need to use intermediate Bitmap constructor here anymore

Change-Id: Idc08d1a6a40313c24eb06ce68579c3e5020d8259
Reviewed-on: https://gerrit.libreoffice.org/75209
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index 2bbb535fe3f6..9dbab10e315b 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -898,7 +898,7 @@ std::unique_ptr 
SdrHdl::CreateOverlayObject(
 // so that the hit test works for this case.
 if (aBmpEx.IsEmpty())
 {
-aBmpEx = BitmapEx(Bitmap(Size(13, 13), 24));
+aBmpEx = BitmapEx(Size(13, 13), 24);
 aBmpEx.Erase(COL_BLACK);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-08 Thread Noel Grandin (via logerrit)
 include/vcl/bitmapex.hxx   |1 +
 include/vcl/outdev.hxx |4 +++-
 svx/source/svdraw/svdoashp.cxx |   32 +---
 vcl/source/outdev/bitmap.cxx   |   24 
 4 files changed, 33 insertions(+), 28 deletions(-)

New commits:
commit 207c368f4bfdbef8fde8efbf75f4fdcf7e0917ba
Author: Noel Grandin 
AuthorDate: Mon Jul 8 11:45:11 2019 +0200
Commit: Noel Grandin 
CommitDate: Mon Jul 8 14:30:22 2019 +0200

use BitmapEx in ImpCreateShadowObjectClone

Change-Id: I7737c8b19dca787eab70b733d07a34a5e5f01c9c
Reviewed-on: https://gerrit.libreoffice.org/75208
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/vcl/bitmapex.hxx b/include/vcl/bitmapex.hxx
index 478b9fdefea9..1067c0c45b52 100644
--- a/include/vcl/bitmapex.hxx
+++ b/include/vcl/bitmapex.hxx
@@ -468,6 +468,7 @@ public:
 
 private:
 friend class ImpGraphic;
+friend class OutputDevice;
 friend bool VCL_DLLPUBLIC WriteDIBBitmapEx(const BitmapEx& rSource, 
SvStream& rOStm);
 friend void ReadRawDIB();
 friend bool VCL_DLLPUBLIC ReadRawDIB(BitmapEx& rTarget, const unsigned 
char* pBuf,
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index b3159396f9a4..0b92e735914f 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1468,7 +1468,9 @@ public:
 const basegfx::B2DHomMatrix& 
rTransformation,
 const BitmapEx& rBitmapEx);
 
-
+voidDrawShadowBitmapEx(
+const BitmapEx& rBitmapEx,
+::Color aShadowColor);
 protected:
 
 virtual voidDrawDeviceBitmap(
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 45d8db33a2b3..603bedcf9924 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -354,35 +354,13 @@ static SdrObject* ImpCreateShadowObjectClone(const 
SdrObject& rOriginal, const S
 {
 GraphicObject 
aGraphicObject(rOriginalSet.Get(XATTR_FILLBITMAP).GetGraphicObject());
 const BitmapEx 
aBitmapEx(aGraphicObject.GetGraphic().GetBitmapEx());
-Bitmap aBitmap(aBitmapEx.GetBitmap());
 
-if(!aBitmap.IsEmpty())
+if(!aBitmapEx.IsEmpty())
 {
-Bitmap::ScopedReadAccess pReadAccess(aBitmap);
-
-if(pReadAccess)
-{
-ScopedVclPtr 
pVirDev(VclPtr::Create());
-pVirDev->SetOutputSizePixel(aBitmap.GetSizePixel());
-
-for(long y(0); y < pReadAccess->Height(); y++)
-{
-for(long x(0); x < pReadAccess->Width(); x++)
-{
-const BitmapColor aColor = 
pReadAccess->GetColor(y, x);
-sal_uInt16 
nLuminance(static_cast(aColor.GetLuminance()) + 1);
-const Color aDestColor(
-static_cast((nLuminance * 
static_cast(aShadowColor.GetRed())) >> 8),
-static_cast((nLuminance * 
static_cast(aShadowColor.GetGreen())) >> 8),
-static_cast((nLuminance * 
static_cast(aShadowColor.GetBlue())) >> 8));
-pVirDev->DrawPixel(Point(x,y), aDestColor);
-}
-}
-
-pReadAccess.reset();
-
-
aGraphicObject.SetGraphic(Graphic(pVirDev->GetBitmapEx(Point(0,0), 
aBitmap.GetSizePixel(;
-}
+ScopedVclPtr 
pVirDev(VclPtr::Create());
+pVirDev->SetOutputSizePixel(aBitmapEx.GetSizePixel());
+pVirDev->DrawShadowBitmapEx(aBitmapEx, aShadowColor);
+
aGraphicObject.SetGraphic(Graphic(pVirDev->GetBitmapEx(Point(0,0), 
aBitmapEx.GetSizePixel(;
 }
 
 aTempSet.Put(XFillBitmapItem(aGraphicObject));
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 5322a0a29cea..b33a5dfcefa6 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -1299,6 +1299,30 @@ void OutputDevice::DrawTransformedBitmapEx(
 }
 }
 
+void OutputDevice::DrawShadowBitmapEx(
+const BitmapEx& rBitmapEx,
+::Color aShadowColor)
+{
+Bitmap::ScopedReadAccess 
pReadAccess(const_cast(rBitmapEx.maBitmap));
+
+if(!pReadAccess)
+return;
+
+for(long y(0); y < pReadAccess->Height(); y++)
+{
+for(long x(0); x < pReadAccess->Width(); x++)
+{
+const BitmapColor aColor = pReadAccess->GetColor(y, x);
+sal_uInt16 
nLuminance(static_cast(aColor.GetLuminance()) + 1);
+const Color aDestColor(
+static_cast((nLuminance * 
static_cast(aShadowColor.GetRed())) >> 8),
+static_cast((nLuminance * 
sta

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

2019-07-08 Thread Mike Kaganski (via logerrit)
 ucb/source/ucp/webdav-neon/NeonSession.cxx |   16 ++--
 1 file changed, 14 insertions(+), 2 deletions(-)

New commits:
commit 351b730e012fd4562f341967f740f8146aa0538e
Author: Mike Kaganski 
AuthorDate: Mon Jul 8 16:25:16 2019 +1000
Commit: Mike Kaganski 
CommitDate: Mon Jul 8 14:01:26 2019 +0200

tdf#126279: reinitialize session after NE_AUTH errors in (UN)LOCK

This just fixes the crash; but there's still a problem left/TODO, because
the lock is kept registered with NeonLockStore; following attempts to lock
and unlock fail.

The NE_AUTH error is returned from this call stack:

neon.dll!clean_session(auth_session * sess) Line 275
at 
C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\neon\src\ne_auth.c(275)
neon.dll!ah_post_send(ne_request_s * req, void * cookie, const ne_status * 
status) Line 1554
at 
C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\neon\src\ne_auth.c(1554)
neon.dll!ne_end_request(ne_request_s * req) Line 1399
at 
C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\neon\src\ne_request.c(1399)
neon.dll!ne_xml_dispatch_request(ne_request_s * req, ne_xml_parser_s * 
parser) Line 105
at 
C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\neon\src\ne_xmlreq.c(105)
neon.dll!ne_lock_refresh(ne_session_s * sess, ne_lock * lock) Line 849
at 
C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\neon\src\ne_locks.c(849)
ucpdav1.dll!webdav_ucp::NeonSession::LOCK(ne_lock * pLock, long & 
rlastChanceToSendRefreshRequest) Line 1663
at 
C:\cygwin\home\user\lode\dev\core\ucb\source\ucp\webdav-neon\NeonSession.cxx(1663)
ucpdav1.dll!webdav_ucp::NeonLockStore::refreshLocks() Line 216
at 
C:\cygwin\home\user\lode\dev\core\ucb\source\ucp\webdav-neon\NeonLockStore.cxx(216)
ucpdav1.dll!webdav_ucp::TickerThread::execute() Line 78
at 
C:\cygwin\home\user\lode\dev\core\ucb\source\ucp\webdav-neon\NeonLockStore.cxx(78)
salhelper3MSC.dll!salhelper::Thread::run() Line 40
at C:\cygwin\home\user\lode\dev\core\salhelper\source\thread.cxx(40)
salhelper3MSC.dll!threadFunc(void * param) Line 186
at C:\cygwin\home\user\lode\dev\core\include\osl\thread.hxx(186)
sal3.dll!oslWorkerWrapperFunction(void * pData) Line 58
at C:\cygwin\home\user\lode\dev\core\sal\osl\w32\thread.cxx(58)
ucrtbased.dll!thread_start(void * const 
parameter) Line 97
at minkernel\crts\ucrt\src\appcrt\startup\thread.cpp(97)
kernel32.dll!BaseThreadInitThunk()
ntdll.dll!RtlUserThreadStart()

If not reinitialized, then on next access, it SEGFAULTs (hostname is 
nullptr):

neon.dll!ne_addr_resolve(const char * hostname, int flags) Line 926
at 
C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\neon\src\ne_socket.c(926)
neon.dll!canonical_hostname(const char * serverName) Line 382
at 
C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\neon\src\ne_sspi.c(382)
neon.dll!ne_sspi_create_context(void * * context, char * serverName, int 
ntlm) Line 423
at 
C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\neon\src\ne_sspi.c(423)
neon.dll!continue_sspi(auth_session * sess, int ntlm, const char * hdr, int 
attempt, auth_challenge * parms, ne_buffer * * errmsg) Line 639
at 
C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\neon\src\ne_auth.c(639)
neon.dll!sspi_challenge(auth_session * sess, int attempt, auth_challenge * 
parms, ne_buffer * * errmsg) Line 675
at 
C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\neon\src\ne_auth.c(675)
neon.dll!auth_challenge(auth_session * sess, int attempt, const char * 
value) Line 1419
at 
C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\neon\src\ne_auth.c(1419)
neon.dll!ah_post_send(ne_request_s * req, void * cookie, const ne_status * 
status) Line 1550
at 
C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\neon\src\ne_auth.c(1550)
neon.dll!ne_end_request(ne_request_s * req) Line 1399
at 
C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\neon\src\ne_request.c(1399)
neon.dll!ne_request_dispatch(ne_request_s * req) Line 1458
at 
C:\cygwin\home\user\lode\dev\core\workdir\UnpackedTarball\neon\src\ne_request.c(1458)
ucpdav1.dll!webdav_ucp::NeonSession::OPTIONS(const rtl::OUString & inPath, 
webdav_ucp::DAVOptions & rOptions, const webdav_ucp::DAVRequestEnvironment & 
rEnv) Line 913
at 
C:\cygwin\home\user\lode\dev\core\ucb\source\ucp\webdav-neon\NeonSession.cxx(913)
ucpdav1.dll!webdav_ucp::DAVResourceAccess::OPTIONS(webdav_ucp::DAVOptions & 
rOptions, const 
com::sun::star::uno::Reference & 
xEnv) Line 187
at 
C:\cygwin\home\user\lode\dev\core\ucb\source\ucp\webdav-neon\DAVResourceAccess.cxx(187)
ucpdav1.dll

[Libreoffice-commits] core.git: solenv/gbuild

2019-07-08 Thread Jan-Marek Glogowski (via logerrit)
 solenv/gbuild/extensions/post_GbuildToJson.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 460461ae4244ef034c5579d6452dda6e8bda49e4
Author: Jan-Marek Glogowski 
AuthorDate: Mon Jul 8 08:55:06 2019 +
Commit: Miklos Vajna 
CommitDate: Mon Jul 8 13:57:11 2019 +0200

Fix gbuildtojson target

The gbuildtojson target re-defines a lot of Make defines, including
gb_Module_add_moduledir, so gb_Module__add_moduledir_impl needs at
least the same fix then gb_Module__modulefile to work correctly
with multiple directory levels.

Regression from commit 368c996b24e0 ("Make font-based unit test
depend on instdir fonts").

Change-Id: I281389a79e064829db6f1231951b233ea0a7371c
Reviewed-on: https://gerrit.libreoffice.org/75197
Reviewed-by: Miklos Vajna 
Tested-by: Miklos Vajna 

diff --git a/solenv/gbuild/extensions/post_GbuildToJson.mk 
b/solenv/gbuild/extensions/post_GbuildToJson.mk
index c80a662f46c8..a14f6a9145e3 100644
--- a/solenv/gbuild/extensions/post_GbuildToJson.mk
+++ b/solenv/gbuild/extensions/post_GbuildToJson.mk
@@ -189,7 +189,7 @@ gb_Module_add_l10n_target =
 gb_GbuildToJson_BLACKLISTEDMODULES := cli_ure jurt external
 
 define gb_Module__add_moduledir_impl
-include $(patsubst $(1):%,%,$(filter 
$(1):%,$(gb_Module_MODULELOCATIONS)))/$(2)/Module_$(2).mk
+include $(patsubst $(1):%,%,$(filter 
$(1):%,$(gb_Module_MODULELOCATIONS)))/$(2)/Module_$(notdir $(2)).mk
 $(call gb_Module_get_target,$(1)) : $$(firstword $$(gb_Module_TARGETSTACK))
 gb_Module_TARGETSTACK := $$(wordlist 2,$$(words 
$$(gb_Module_TARGETSTACK)),$$(gb_Module_TARGETSTACK))
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - oox/source

2019-07-08 Thread Grzegorz Araminowicz (via logerrit)
 oox/source/drawingml/diagram/diagramlayoutatoms.cxx|3 +--
 oox/source/drawingml/diagram/diagramlayoutatoms.hxx|   12 +---
 oox/source/drawingml/diagram/layoutatomvisitorbase.cxx |2 --
 oox/source/drawingml/diagram/layoutatomvisitorbase.hxx |4 +---
 oox/source/drawingml/diagram/layoutatomvisitors.cxx|   15 +--
 5 files changed, 12 insertions(+), 24 deletions(-)

New commits:
commit ca042fea20d86aad2deac34d88010b0ab185c901
Author: Grzegorz Araminowicz 
AuthorDate: Sun Jul 7 11:31:22 2019 +0200
Commit: Miklos Vajna 
CommitDate: Mon Jul 8 13:46:28 2019 +0200

Revert "SmartArt: support multiple levels of shapes in LayoutNodes"

As we have presentation node - shape mapping, keeping shape level 
information is no longer needed.

This reverts commit 596a03b65e1b870be671ea1a44f4fba9fc66e4ae.

Change-Id: Ibde1b4afde41778304138253c1548422c5b173c3
Reviewed-on: https://gerrit.libreoffice.org/75173
Tested-by: Jenkins
Reviewed-by: Grzegorz Araminowicz 
Reviewed-on: https://gerrit.libreoffice.org/75204
Reviewed-by: Miklos Vajna 

diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx 
b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index a981dd99138c..f3c3f52dce04 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -419,8 +419,7 @@ sal_Int32 AlgAtom::getConnectorType()
 }
 
 void AlgAtom::layoutShape( const ShapePtr& rShape,
-   const std::vector& rConstraints,
-   sal_Int32 /*nShapeLevel*/ )
+   const std::vector& rConstraints )
 {
 switch(mnType)
 {
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.hxx 
b/oox/source/drawingml/diagram/diagramlayoutatoms.hxx
index eafe8ce1f1ae..d77a98135c02 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.hxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.hxx
@@ -161,8 +161,7 @@ public:
 void addParam( sal_Int32 nType, sal_Int32 nVal )
 { maMap[nType]=nVal; }
 void layoutShape( const ShapePtr& rShape,
-  const std::vector& rConstraints,
-  sal_Int32 nShapeLevel );
+  const std::vector& rConstraints );
 
 void setAspectRatio(double fAspectRatio) { mfAspectRatio = fAspectRatio; }
 
@@ -237,7 +236,6 @@ class LayoutNode
 {
 public:
 typedef std::map VarMap;
-typedef std::map> ShapeLevelMap;
 
 LayoutNode(const Diagram& rDgm) : LayoutAtom(*this), mrDgm(rDgm), 
mnChildOrder(0) {}
 const Diagram& getDiagram() const
@@ -255,10 +253,10 @@ public:
 { mpExistingShape = pShape; }
 const ShapePtr& getExistingShape() const
 { return mpExistingShape; }
-const ShapeLevelMap& getNodeShapes() const
+const std::vector & getNodeShapes() const
 { return mpNodeShapes; }
-void addNodeShape(const ShapePtr& pShape, sal_Int32 nLevel)
-{ mpNodeShapes[nLevel].push_back(pShape); }
+void addNodeShape(const ShapePtr& pShape)
+{ mpNodeShapes.push_back(pShape); }
 
 bool setupShape( const ShapePtr& rShape,
  const dgm::Point* pPresNode ) const;
@@ -271,7 +269,7 @@ private:
 OUString msMoveWith;
 OUString msStyleLabel;
 ShapePtr mpExistingShape;
-ShapeLevelMapmpNodeShapes;
+std::vectormpNodeShapes;
 sal_Int32mnChildOrder;
 };
 
diff --git a/oox/source/drawingml/diagram/layoutatomvisitorbase.cxx 
b/oox/source/drawingml/diagram/layoutatomvisitorbase.cxx
index c8761ffa3d67..98206433653a 100644
--- a/oox/source/drawingml/diagram/layoutatomvisitorbase.cxx
+++ b/oox/source/drawingml/diagram/layoutatomvisitorbase.cxx
@@ -131,11 +131,9 @@ void LayoutAtomVisitorBase::visit(LayoutNode& rAtom)
 
 const dgm::Point* pPreviousNode = mpCurrentNode;
 mpCurrentNode = pNewNode;
-mnCurrLevel++;
 
 defaultVisit(rAtom);
 
-mnCurrLevel--;
 mpCurrentNode = pPreviousNode;
 }
 
diff --git a/oox/source/drawingml/diagram/layoutatomvisitorbase.hxx 
b/oox/source/drawingml/diagram/layoutatomvisitorbase.hxx
index 25f2b4dea54b..7007cf283070 100644
--- a/oox/source/drawingml/diagram/layoutatomvisitorbase.hxx
+++ b/oox/source/drawingml/diagram/layoutatomvisitorbase.hxx
@@ -50,8 +50,7 @@ public:
 mpCurrentNode(pRootPoint),
 mnCurrIdx(0),
 mnCurrStep(0),
-mnCurrCnt(0),
-mnCurrLevel(0)
+mnCurrCnt(0)
 {}
 
 void defaultVisit(LayoutAtom const& rAtom);
@@ -68,7 +67,6 @@ protected:
 sal_Int32 mnCurrIdx;
 sal_Int32 mnCurrStep;
 sal_Int32 mnCurrCnt;
-sal_Int32 mnCurrLevel;
 };
 
 class ShallowPresNameVisitor : public LayoutAtomVisitorBase
diff --git a/oox/source/drawingml/diagram/layoutatomvisitors.cxx 
b/oox/source/drawingml/diagram/layoutatomvisitors.cxx
index b721330334

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sw/qa sw/source

2019-07-08 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/tiledrendering/tiledrendering.cxx |   20 
 sw/source/ui/frmdlg/frmpage.cxx|8 
 sw/source/uibase/inc/basesh.hxx|2 +-
 sw/source/uibase/shells/basesh.cxx |   10 ++
 4 files changed, 39 insertions(+), 1 deletion(-)

New commits:
commit d309bb98618391c78a73177c5af16e23a2631cb4
Author: Miklos Vajna 
AuthorDate: Fri Jul 5 12:48:07 2019 +0200
Commit: Miklos Vajna 
CommitDate: Mon Jul 8 13:46:04 2019 +0200

sw lok: hide UI to set Word-incompatible anchor types

Let's make it a bit harder for users to hurt themselves, at least in
Online. Affects the context/popup menu and the dialog of frames.

This is similar to how certain border types are hidden on the UI,
depending on if MSO supports them. Though that goes a bit further and
disables those types even on the desktop.

(cherry picked from commit 4154d281fbecaadf6cd118c00cc6cff929e339a4)

Conflicts:
sw/source/ui/frmdlg/frmpage.cxx

Change-Id: I6b9205ef3df8a7bc15fbcf787d134743c09e98da
Reviewed-on: https://gerrit.libreoffice.org/75196
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mike Kaganski 

diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 93ff00e5eb84..9b2984b7af9f 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -43,6 +43,7 @@
 #include 
 #include 
 #include 
+#include 
 
 static char const DATA_DIRECTORY[] = "/sw/qa/extras/tiledrendering/data/";
 
@@ -113,6 +114,7 @@ public:
 void testVisCursorInvalidation();
 void testDeselectCustomShape();
 void testSemiTransparent();
+void testAnchorTypes();
 
 CPPUNIT_TEST_SUITE(SwTiledRenderingTest);
 CPPUNIT_TEST(testRegisterCallback);
@@ -170,6 +172,7 @@ public:
 CPPUNIT_TEST(testVisCursorInvalidation);
 CPPUNIT_TEST(testDeselectCustomShape);
 CPPUNIT_TEST(testSemiTransparent);
+CPPUNIT_TEST(testAnchorTypes);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -2438,6 +2441,23 @@ void SwTiledRenderingTest::testSemiTransparent()
 CPPUNIT_ASSERT_GREATEREQUAL(190, static_cast(aColor.GetBlue()));
 }
 
+void SwTiledRenderingTest::testAnchorTypes()
+{
+comphelper::LibreOfficeKit::setActive();
+SwXTextDocument* pXTextDocument = createDoc("shape.fodt");
+SwDoc* pDoc = pXTextDocument->GetDocShell()->GetDoc();
+SwView* pView = pXTextDocument->GetDocShell()->GetView();
+pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, 
SfxCallMode::SYNCHRON);
+SfxItemSet aSet(pDoc->GetAttrPool(), svl::Items{});
+SfxBoolItem aItem(FN_TOOL_ANCHOR_PAGE);
+aSet.Put(aItem);
+auto pShell = dynamic_cast(pView->GetCurShell());
+pShell->GetState(aSet);
+// Without the accompanying fix in place, this test would have failed, 
setting the anchor type
+// to other than as/at-char was possible.
+CPPUNIT_ASSERT(!aSet.HasItem(FN_TOOL_ANCHOR_PAGE));
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SwTiledRenderingTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index a69f8c59d6d8..815bf8b21d59 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -69,6 +69,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 using namespace ::com::sun::star;
@@ -718,6 +719,13 @@ SwFramePage::SwFramePage(vcl::Window *pParent, const 
SfxItemSet &rSet)
 
 m_pAutoWidthCB->SetClickHdl( LINK( this, SwFramePage, AutoWidthClickHdl ) 
);
 m_pAutoHeightCB->SetClickHdl( LINK( this, SwFramePage, AutoHeightClickHdl 
) );
+
+if (comphelper::LibreOfficeKit::isActive())
+{
+m_pAnchorAtPageRB->Hide();
+m_pAnchorAtParaRB->Hide();
+m_pAnchorAtFrameRB->Hide();
+}
 }
 
 SwFramePage::~SwFramePage()
diff --git a/sw/source/uibase/inc/basesh.hxx b/sw/source/uibase/inc/basesh.hxx
index 17d0a8336601..41efce245c32 100644
--- a/sw/source/uibase/inc/basesh.hxx
+++ b/sw/source/uibase/inc/basesh.hxx
@@ -36,7 +36,7 @@ class SfxItemSet;
 class SwCursorShell;
 
 struct DBTextStruct_Impl;
-class SAL_DLLPUBLIC_RTTI SwBaseShell: public SfxShell
+class SW_DLLPUBLIC SwBaseShell: public SfxShell
 {
 SwView  &rView;
 
diff --git a/sw/source/uibase/shells/basesh.cxx 
b/sw/source/uibase/shells/basesh.cxx
index 3d418e58070b..f3820f141fa9 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -108,6 +108,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -1656,6 +1657,15 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
 rSet.DisableItem(nWhich);
 else if(nWhich != FN_TOOL_ANCHOR)
 rSet.Put(SfxBoolItem(nWhich, bSet));
+
+if (comphelper::LibreOfficeKit::isActive())
+{
+

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

2019-07-08 Thread Roman Kuznetsov (via logerrit)
 sc/inc/strings.hrc |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ac870a45ffde14cfdf4406df16d6bb51d08bc171
Author: Roman Kuznetsov 
AuthorDate: Thu Jul 4 14:27:21 2019 +0200
Commit: Roman Kuznetsov 
CommitDate: Mon Jul 8 13:25:03 2019 +0200

tdf#124840 Text for confirming updating external links should be

"Allow updating" instead "Enable Content"

Change-Id: Ife53dafc1b72ebe8665a5c74a75e422a54f56136
Reviewed-on: https://gerrit.libreoffice.org/75081
Tested-by: Jenkins
Reviewed-by: Roman Kuznetsov 

diff --git a/sc/inc/strings.hrc b/sc/inc/strings.hrc
index d5685ed3c626..4e92de3d7091 100644
--- a/sc/inc/strings.hrc
+++ b/sc/inc/strings.hrc
@@ -362,7 +362,7 @@
 #define STR_MESSAGE_OUTPUT_TOO_LONG 
NC_("STR_MESSAGE_OUTPUT_TOO_LONG", "Output is too long to write into the 
sheet.")
 #define STR_INPUT_DATA_RANGE
NC_("STR_INPUT_DATA_RANGE", "Input data range")
 /*infobar for allowing links to update or not*/
-#define STR_ENABLE_CONTENT  NC_("STR_ENABLE_CONTENT", 
"Enable Content")
+#define STR_ENABLE_CONTENT  NC_("STR_ENABLE_CONTENT", 
"Allow updating")
 /*Insert image dialog*/
 #define STR_ANCHOR_TO_CELL  NC_("STR_ANCHOR_TO_CELL", 
"To cell")
 #define STR_ANCHOR_TO_CELL_RESIZE   
NC_("STR_ANCHOR_TO_CELL_RESIZE", "To cell (resize with cell)")
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Re: How do various apps and DEs handle the primary selection?

2019-07-08 Thread Jan-Marek Glogowski
I CC'd some Calc devs. Maybe they know a bit more about this "select after
paste" behavior.

Am 08.07.19 um 12:29 schrieb Luboš Luňák:
> On Monday 08 of July 2019, Jan-Marek Glogowski wrote:

[snip lot of background info - thanks for that]

>  As for tdf#104717, my understanding of what happens is:
> - after the first Ctrl+V, Calc pastes the new cell content
> - as a part of that, it also selects the cell
> - since the cell is selected, Calc also sets PRIMARY
> - Klipper detects a change in PRIMARY, since it's set to synchronize it with 
> CLIPBOARD, it sets CLIPBOARD to the contents of PRIMARY; Klipper does not 
> support the advanced types Calc uses for representing cells, this only keeps 
> it as plain text
> - => next Ctrl+V pastes just the plain text

Yup. You're right.

>  I see several ways of handling this:
> 
> 1) Do not set PRIMARY for cell selections. I was originally going to say that 
> pasting those cells with MMB doesn't work anyway, but to my surprise it 
> actually does. Still, does somebody actually use that? And even if somebody 
> does that inside LO, will they use it to MMB the cell contents into another 
> app? I'm not aware of anything else using the mouse-select+MMB-paste 
> mechanism for anything else than text. Based on this assumption I made 
> #gerrit72369, and not setting PRIMARY at all would further remove 
> interferences with tools like Klipper.

Gerrit 72369 is obsolete, as I rewrote the whole Qt5Clipboard to work async /
lazy, so no stuff is copied, just delivered / generated on request. And this way
we offer all the mime-types also on MMB paste.

Since the clipboard is "cheap" this way, I don't see a point to reduce the
available mime types to text/plain only.

> 2) Make Klipper handle all data types. Well, not really, I consider this 
> unfeasible, but for completeness. It'd fix the content loss during 
> synchronizing, but it'd lead to horrible performance problems of needless 
> copying data all over the place.

Also my opinion. Most data is just generated on demand and doesn't exist until
someone requests it from the clipboard. Copying all mime types would become very
expensive for large selections, eventually.

> 3) Remove Klipper synchronization. I myself don't use it, but some people 
> apparently do, although I can't say how popular it is. The point of the 
> option is to remove the confusion of two different clipboards, making them 
> appear as one. It makes sense to some people, my take is that most people 
> don't even know mouse selecting should do something with clipboards, so for 
> those it doesn't matter, and those that do this exit should also actually 
> learn how to use it. So it can be shrugged off as NOTOURBUG (and I expect 
> whoever maintains Klipper now will probably shrug it off too).

No idea, but the result is this bug report. Doesn't help if "both sides of the
bug" just claim NOTOURBUG :-)

> 4) Your patch. If I understand it correctly, it still keeps makes the new 
> cells selected in the UI, it just avoids setting PRIMARY. I think that would 
> kind of work, but it seems hackish.

Yuo're right. I have the impression that the "select after paste" is a known
feature of spreadsheet applications. gnumeric does the same. Now that is just a
sample size of two, but I can't do any better here. This is very uncommon, but
Eike mentioned in a comment of my patch that he couldn't MMB paste anymore,
after a normal paste, which is the whole point of the patch.

> 5) Don't select the pasted cells, not even in the UI. If I Ctrl+V in a text 
> editor, the pasted text doesn't become selected either. This should 
> (hopefully?) be simple, consistent and avoid the problem too.

As for 4). I have no way to evaluate, if people rely on the "select after paste"
feature, or if this is just some historical stuff, which can be dropped.

>  I think the best one is 5), closely followed by 1).

IMHO 5) would definitely be the most consistent solution. 1) wouldn't help with
the problem. 4) seems to be the best compromise to avoid the bug and keep most
of the former behavior.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: tdf#74702 2/2

2019-07-08 Thread Michael Stahl

On 08.07.19 13:06, Tomaž Vajngerl wrote:

Hi,

On 06.07.19 19:59, Adrien Ollier wrote:



Well IMHO the problem that you even have to think about this is that 
OutputDevice is a enormous class, and then you have to deal with another 
even more enormous subclass vcl::Window, which should never be a 
subclass of OutputDevice in the first place. However the work to change 
that is quite big and non-trivial. 


i rarely work with VCL's implementation so i can't really have an 
informed opinion but if you say that delegation instead of inheritance 
would be an improvement here i'm all for it.

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

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/source

2019-07-08 Thread Noel Grandin (via logerrit)
 vcl/source/gdi/impgraph.cxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 875f65ad5240b891ed1e5b3e17946816a4afe98a
Author: Noel Grandin 
AuthorDate: Thu Jul 4 15:05:41 2019 +0200
Commit: Xisco Faulí 
CommitDate: Mon Jul 8 13:11:43 2019 +0200

tdf#121740 improve ppt load time on windows, reduce image swapout

Reduces load time of this file by 10%.

This logic is here since
  commit 8ab086b6cc054501bfbf7ef6fa509c393691e860
  Date:   Mon Sep 18 16:07:07 2000 +
  initial import
and there does not seem to be any good reason to immediately trigger a 
swapout.

Our balancing logic will perform a swapout as necessary.

Change-Id: I02592dfd3bde1a00bcca2fcbcd4d38aacc8f3de4
Reviewed-on: https://gerrit.libreoffice.org/75086
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit f2c3ea4f54d634ab54702d6fe07ccd4d4d76bdc1)
Reviewed-on: https://gerrit.libreoffice.org/75203
Reviewed-by: Xisco Faulí 

diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 5a621025423f..195e40d1a45a 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -1652,9 +1652,6 @@ void ImpGraphic::ImplSetLink(const 
std::shared_ptr& rGfxLink)
 ensureAvailable();
 
 mpGfxLink = rGfxLink;
-
-if (mpGfxLink && mpGfxLink->IsNative())
-mpGfxLink->SwapOut();
 }
 
 GfxLink ImpGraphic::ImplGetLink()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Re: tdf#74702 2/2

2019-07-08 Thread Tomaž Vajngerl
Hi,

On 06.07.19 19:59, Adrien Ollier wrote:
> 


Well IMHO the problem that you even have to think about this is that
OutputDevice is a enormous class, and then you have to deal with another
even more enormous subclass vcl::Window, which should never be a subclass
of OutputDevice in the first place. However the work to change that is
quite big and non-trivial. Once that is done I'm sure the need that a user
needs to know with what subclass of OutputDevice it deals with will be
mostly gone. Until then I'm also comfortable with the status quo and still
have the enum and work with conditions for the outside use. From inside the
hierarchy of course it is better to use polymorphism.

Regards, Tomaž
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

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

2019-07-08 Thread Noel Grandin (via logerrit)
 include/vcl/bitmapex.hxx |8 
 include/vcl/dibtools.hxx |2 +-
 svx/source/svdraw/svdpdf.cxx |2 +-
 vcl/source/gdi/bitmapex.cxx  |8 
 vcl/source/gdi/dibtools.cxx  |4 ++--
 5 files changed, 20 insertions(+), 4 deletions(-)

New commits:
commit 7707cba0bd3f1d544ead634282f8d3415af0cd5e
Author: Noel Grandin 
AuthorDate: Mon Jul 8 11:25:15 2019 +0200
Commit: Noel Grandin 
CommitDate: Mon Jul 8 12:58:51 2019 +0200

use BitmapEx in ImpSdrPdfImport::ImportImage

Change-Id: I80e197ffcda4ebc5d50e611b7a4a5c3fd84fc839
Reviewed-on: https://gerrit.libreoffice.org/75201
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/vcl/bitmapex.hxx b/include/vcl/bitmapex.hxx
index 71da7cb45dc8..478b9fdefea9 100644
--- a/include/vcl/bitmapex.hxx
+++ b/include/vcl/bitmapex.hxx
@@ -22,6 +22,7 @@
 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -47,6 +48,7 @@ public:
 explicitBitmapEx( const OUString& rIconName );
 BitmapEx( const BitmapEx& rBitmapEx );
 BitmapEx( const BitmapEx& rBitmapEx, Point aSrc, Size 
aSize );
+BitmapEx( Size aSize, sal_uInt16 nBitCount );
 explicitBitmapEx( const Bitmap& rBmp );
 BitmapEx( const Bitmap& rBmp, const Bitmap& rMask );
 BitmapEx( const Bitmap& rBmp, const AlphaMask& 
rAlphaMask );
@@ -467,6 +469,12 @@ public:
 private:
 friend class ImpGraphic;
 friend bool VCL_DLLPUBLIC WriteDIBBitmapEx(const BitmapEx& rSource, 
SvStream& rOStm);
+friend void ReadRawDIB();
+friend bool VCL_DLLPUBLIC ReadRawDIB(BitmapEx& rTarget, const unsigned 
char* pBuf,
+const ScanlineFormat nFormat,
+const int nHeight,
+const int nStride);
+
 void  loadFromIconTheme( const OUString& rIconName );
 
 Bitmap  maBitmap;
diff --git a/include/vcl/dibtools.hxx b/include/vcl/dibtools.hxx
index c5fa662ebb73..6064491f8ec3 100644
--- a/include/vcl/dibtools.hxx
+++ b/include/vcl/dibtools.hxx
@@ -55,7 +55,7 @@ bool VCL_DLLPUBLIC ReadDIBV5(
 SvStream& rIStm);
 
 bool VCL_DLLPUBLIC ReadRawDIB(
-Bitmap& rTarget,
+BitmapEx& rTarget,
 const unsigned char* pBuf,
 const ScanlineFormat nFormat,
 const int nHeight,
diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index 687c3e260341..552575442039 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -992,7 +992,7 @@ void ImpSdrPdfImport::ImportImage(FPDF_PAGEOBJECT 
pPageObject, int /*nPageObject
 const int nWidth = FPDFBitmap_GetWidth(bitmap.get());
 const int nHeight = FPDFBitmap_GetHeight(bitmap.get());
 const int nStride = FPDFBitmap_GetStride(bitmap.get());
-Bitmap aBitmap(Size(nWidth, nHeight), 24);
+BitmapEx aBitmap(Size(nWidth, nHeight), 24);
 
 switch (format)
 {
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index 3faaf3fd96e1..4bfbfeb5a2ff 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -85,6 +85,14 @@ BitmapEx::BitmapEx( const BitmapEx& rBitmapEx, Point aSrc, 
Size aSize )
 CopyPixel( aDestRect, aSrcRect, &rBitmapEx );
 }
 
+BitmapEx::BitmapEx( Size aSize, sal_uInt16 nBitCount )
+: meTransparent(TransparentType::NONE)
+, mbAlpha(false)
+{
+maBitmap = Bitmap( aSize, nBitCount );
+SetSizePixel(aSize);
+}
+
 BitmapEx::BitmapEx( const OUString& rIconName )
 : meTransparent(TransparentType::NONE)
 , mbAlpha(false)
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index c8f64318f0fd..965a403a0d7d 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -1839,13 +1839,13 @@ bool ReadDIBV5(
 }
 
 bool ReadRawDIB(
-Bitmap& rTarget,
+BitmapEx& rTarget,
 const unsigned char* pBuf,
 const ScanlineFormat nFormat,
 const int nHeight,
 const int nStride)
 {
-BitmapScopedWriteAccess pWriteAccess(rTarget.AcquireWriteAccess(), 
rTarget);
+BitmapScopedWriteAccess 
pWriteAccess(rTarget.maBitmap.AcquireWriteAccess(), rTarget.maBitmap);
 for (int nRow = 0; nRow < nHeight; ++nRow)
 {
 pWriteAccess->CopyScanline(nRow, pBuf + (nStride * nRow), nFormat, 
nStride);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Re: How do various apps and DEs handle the primary selection?

2019-07-08 Thread Michael Stahl

On 08.07.19 12:46, Jan-Marek Glogowski wrote:

Hi Miklos

Am 08.07.19 um 09:22 schrieb Miklos Vajna:

On Mon, Jul 08, 2019 at 01:07:38AM +0200, Jan-Marek Glogowski 
 wrote:

And Writer clears it when a Shell closes, while Calc (~ScTabView) and Draw
(:~View) clear it when the view is closed. But I'm a bit confused by the terms
Shell and View and then there is even a ViewShell...


A "shell" on its own is not clear. An object shell usually refers to an
SfxObjectShell sublcass, there is one instance for one opened document.
If you go to Window -> New Window, you can have multiple views for the
same document. Then you get multiple SfxViewShell subclasses.


I like the term "usually" in the first sentence ;-)


In the Writer case, the subclasses are called SwDocShell and SwView.


My understanding has been, that a View displays stuff and a Shell manages input
for the View; kind of. Can there be a Shell without a View? Does that even make
sense?


iirc it's possible but i forgot what the corner case was...


And then there is "class SwViewShell : public sw::Ring" with no
SfxShell anywhere I can see it.


it's not related to SfxShell but to SfxViewShell... via SwView being a 
subclass of SfxViewShell and SwView::m_pWrtShell


but note that there can be instances of SwViewShell too that aren't 
subclassed and thus have no SwView, e.g. for the print preview.

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

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

2019-07-08 Thread Noel Grandin (via logerrit)
 svx/source/tbxctrls/fontworkgallery.cxx|4 ++--
 ucb/source/ucp/webdav-neon/NeonSession.cxx |3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)

New commits:
commit f7e4a52411255b61e8fcc4172e67c9f86cf25e36
Author: Noel Grandin 
AuthorDate: Mon Jul 8 11:12:02 2019 +0200
Commit: Noel Grandin 
CommitDate: Mon Jul 8 12:54:09 2019 +0200

fix loop variable type

it's not a std::vector, it's a std::vector

Change-Id: I4a315f98bab4c432d6b136cb7bad75cf29899e66
Reviewed-on: https://gerrit.libreoffice.org/75200
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/svx/source/tbxctrls/fontworkgallery.cxx 
b/svx/source/tbxctrls/fontworkgallery.cxx
index aa832961b0b8..7d9c5b974438 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -146,7 +146,7 @@ void FontWorkGalleryDialog::fillFavorites(sal_uInt16 
nThemeId)
 aThumbSize.AdjustWidth( -12 );
 aThumbSize.AdjustHeight( -12 );
 
-std::vector< Bitmap * >::size_type nFavCount = 
maFavoritesHorizontal.size();
+auto nFavCount = maFavoritesHorizontal.size();
 
 // ValueSet favorites
 if( nFavCount > (nColCount * nLineCount) )
@@ -158,7 +158,7 @@ void FontWorkGalleryDialog::fillFavorites(sal_uInt16 
nThemeId)
 
 maCtlFavorites.Clear();
 
-for( std::vector::size_type nFavorite = 1; nFavorite <= 
nFavCount; nFavorite++ )
+for( size_t nFavorite = 1; nFavorite <= nFavCount; nFavorite++ )
 {
 OUString aStr(SvxResId(RID_SVXFLOAT3D_FAVORITE));
 aStr += " ";
commit ed920b71b846a25472bc290e1613b0b6dd76f5f4
Author: Mike Kaganski 
AuthorDate: Mon Jul 8 09:14:31 2019 +0200
Commit: Mike Kaganski 
CommitDate: Mon Jul 8 12:53:57 2019 +0200

Simplify lastChanceToSendRefreshRequest calculation

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

diff --git a/ucb/source/ucp/webdav-neon/NeonSession.cxx 
b/ucb/source/ucp/webdav-neon/NeonSession.cxx
index a075268806c8..7ee9c56d4807 100644
--- a/ucb/source/ucp/webdav-neon/NeonSession.cxx
+++ b/ucb/source/ucp/webdav-neon/NeonSession.cxx
@@ -1526,8 +1526,7 @@ namespace
 sal_Int32 calltime = aEnd.Seconds - rStart.Seconds;
 if ( calltime <= timeout )
 {
-lastChanceToSendRefreshRequest
-= aEnd.Seconds + timeout - calltime;
+lastChanceToSendRefreshRequest = rStart.Seconds + timeout;
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-08 Thread Noel Grandin (via logerrit)
 svx/source/customshapes/EnhancedCustomShape2d.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit d342cad2749ca68b1f72bf318fbd403adb7a758f
Author: Noel Grandin 
AuthorDate: Mon Jul 8 11:00:00 2019 +0200
Commit: Noel Grandin 
CommitDate: Mon Jul 8 12:49:53 2019 +0200

use BitmapEx in EnhancedCustomShape2d::AdaptObjColor

instead of Bitmap

Change-Id: Ibcdef2a076f29590f1a8a43f90b1cec95e75d413
Reviewed-on: https://gerrit.libreoffice.org/75199
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx 
b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 22eb1cba2c53..b2effd4649f5 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -2793,11 +2793,11 @@ void EnhancedCustomShape2d::AdaptObjColor(
 {
 if ( nColorCount || 0.0 != dBrightness )
 {
-Bitmap 
aBitmap(rObj.GetMergedItem(XATTR_FILLBITMAP).GetGraphicObject().GetGraphic().GetBitmapEx().GetBitmap());
+BitmapEx 
aBitmap(rObj.GetMergedItem(XATTR_FILLBITMAP).GetGraphicObject().GetGraphic().GetBitmapEx());
 
-aBitmap.Adjust(
-static_cast< short > ( GetLuminanceChange(
-std::min(nColorIndex, nColorCount-1;
+short nLuminancePercent = static_cast< short > ( 
GetLuminanceChange(
+std::min(nColorIndex, nColorCount-1)));
+aBitmap.Adjust( nLuminancePercent, 0, 0, 0, 0 );
 
 rObj.SetMergedItem(XFillBitmapItem(OUString(), 
Graphic(aBitmap)));
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-08 Thread Noel Grandin (via logerrit)
 accessibility/source/standard/vclxaccessiblestatusbaritem.cxx |7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

New commits:
commit 77e260f915e0c77ddb1e915e9fd27ab0bdccc763
Author: Noel Grandin 
AuthorDate: Mon Jul 8 11:22:12 2019 +0200
Commit: Noel Grandin 
CommitDate: Mon Jul 8 12:48:13 2019 +0200

tdf#121793 speedup VCLXAccessibleStatusBarItem::GetItemText

no need to do a full layout to get the item text. Saves about 15% of the
CPU load off

Change-Id: I07eaf6bc64ec90d81057b8360725e0b052c6dca7
Reviewed-on: https://gerrit.libreoffice.org/75198
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx 
b/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx
index cf3b20773f5b..f80d04940d21 100644
--- a/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx
+++ b/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx
@@ -122,13 +122,8 @@ void VCLXAccessibleStatusBarItem::SetItemText( const 
OUString& sItemText )
 OUString VCLXAccessibleStatusBarItem::GetItemText()
 {
 OUString sText;
-vcl::ControlLayoutData aLayoutData;
 if ( m_pStatusBar )
-{
-tools::Rectangle aItemRect = m_pStatusBar->GetItemRect( m_nItemId );
-m_pStatusBar->RecordLayoutData( &aLayoutData, aItemRect );
-sText = aLayoutData.m_aDisplayText;
-}
+sText = m_pStatusBar->GetItemText( m_nItemId );
 
 return sText;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Re: tdf#74702 2/2

2019-07-08 Thread Luboš Luňák
On Monday 08 of July 2019, Michael Stahl wrote:
> On 06.07.19 19:59, Adrien Ollier wrote:


 Please do not split emails randomly into halves, it just makes it confusing.

> well there are some options:
>
> 1) keep tag enums
> + conditions are fast
> - violates the purity of object-oriented dogma


   - makes it easier to miss places that need handling

> 2) use dynamic_cast instead
> - slow
> +- it is semi-object-oriented (at first glance you're making use
>of subtyping but in reality it's not)


 1) and 2) are more or less the same, just with different tradeoffs.

...

>> I hope that all of you understand that it is important you to know this 
information so that you do not break all my work.


 This is not getting priorities right. The point of the work should be to 
improve things. If your work makes it a misery for everybody else, then it's 
the wrong way around, and people will generally resist/fail to do it anyway.

 You either need a different approach, or accept that #74702 may not actually 
be an improvement.

-- 
 Luboš Luňák
 l.lu...@collabora.com
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: How do various apps and DEs handle the primary selection?

2019-07-08 Thread Jan-Marek Glogowski
Hi Miklos

Am 08.07.19 um 09:22 schrieb Miklos Vajna:
> On Mon, Jul 08, 2019 at 01:07:38AM +0200, Jan-Marek Glogowski 
>  wrote:
>> And Writer clears it when a Shell closes, while Calc (~ScTabView) and Draw
>> (:~View) clear it when the view is closed. But I'm a bit confused by the 
>> terms
>> Shell and View and then there is even a ViewShell...
> 
> A "shell" on its own is not clear. An object shell usually refers to an
> SfxObjectShell sublcass, there is one instance for one opened document.
> If you go to Window -> New Window, you can have multiple views for the
> same document. Then you get multiple SfxViewShell subclasses.

I like the term "usually" in the first sentence ;-)

> In the Writer case, the subclasses are called SwDocShell and SwView.

My understanding has been, that a View displays stuff and a Shell manages input
for the View; kind of. Can there be a Shell without a View? Does that even make
sense?

And then there is "class SwViewShell : public sw::Ring" with no
SfxShell anywhere I can see it.

> BTW, did you try 'make gbuildtojson' recently? :-) It was broken on
> master in this range:
> 
> git log 
> 4154d281fbecaadf6cd118c00cc6cff929e339a4..1e4fa857873c0bc728143087ec692c4b75aaf820
>  -- solenv

Should be fixed by https://gerrit.libreoffice.org/#/c/75197 AFAI can verify.

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

Re: How do various apps and DEs handle the primary selection?

2019-07-08 Thread Luboš Luňák
On Monday 08 of July 2019, Jan-Marek Glogowski wrote:
> Hi
>
> I'm trying to gather information how various apps handle the primary
> selection, so I can fix tdf#104717 [1]. There is already a patch for that
> in Gerrit[2].
...
> IMHO we shouldn't handle the primary selection lifetime different from the
> clipboard lifetime. When selecting stuff, the primary should stay alive,
> even if I close the document or module, just like the normal clipboard. I
> don't see a point of clearing the selection at all, except on application
> shutdown, when the application won't be able to serve it anymore.
>
> How do other applications you know handle the primary selection?

 Variously. I don't think there's an official document on how the X11 
selections should work from the UI point of view. At least I'm not aware of 
that, and I'm saying that as somebody who used to practically maintain KDE's 
Klipper for about a decade and a number of times sent patches for Qt's 
QClipboard class.

 I think the idea is sort of that the PRIMARY selection is _the_ selection in 
the desktop. Just one in the entire desktop, which means that if you open two 
documents and  select text in both of them, there should be still just one 
visual representation, the one that is the X11 selection (i.e. making another 
selection removes the previous one, including the UI representation, you can 
see this e.g. if you try it with 2 xterm's). That's however rather silly and 
confusing from the usability point of view, as if the X11 clipboard handling 
wasn't confusing enough as it is, so often apps do not reset the previous UI 
representation or do other things slightly differently (and let's not forget 
that there are many apps that are buggy). So from this strict point of view, 
LO does everything properly. But from the practical point of view, I think 
that's a bad way of doing it. IMO people generally don't want their text 
editor UI selection to disappear just because they selected some text in some 
other app or dialog.

 As for tdf#104717, my understanding of what happens is:
- after the first Ctrl+V, Calc pastes the new cell content
- as a part of that, it also selects the cell
- since the cell is selected, Calc also sets PRIMARY
- Klipper detects a change in PRIMARY, since it's set to synchronize it with 
CLIPBOARD, it sets CLIPBOARD to the contents of PRIMARY; Klipper does not 
support the advanced types Calc uses for representing cells, this only keeps 
it as plain text
- => next Ctrl+V pastes just the plain text

 I see several ways of handling this:

1) Do not set PRIMARY for cell selections. I was originally going to say that 
pasting those cells with MMB doesn't work anyway, but to my surprise it 
actually does. Still, does somebody actually use that? And even if somebody 
does that inside LO, will they use it to MMB the cell contents into another 
app? I'm not aware of anything else using the mouse-select+MMB-paste 
mechanism for anything else than text. Based on this assumption I made 
#gerrit72369, and not setting PRIMARY at all would further remove 
interferences with tools like Klipper.

2) Make Klipper handle all data types. Well, not really, I consider this 
unfeasible, but for completeness. It'd fix the content loss during 
synchronizing, but it'd lead to horrible performance problems of needless 
copying data all over the place.

3) Remove Klipper synchronization. I myself don't use it, but some people 
apparently do, although I can't say how popular it is. The point of the 
option is to remove the confusion of two different clipboards, making them 
appear as one. It makes sense to some people, my take is that most people 
don't even know mouse selecting should do something with clipboards, so for 
those it doesn't matter, and those that do this exit should also actually 
learn how to use it. So it can be shrugged off as NOTOURBUG (and I expect 
whoever maintains Klipper now will probably shrug it off too).

4) Your patch. If I understand it correctly, it still keeps makes the new 
cells selected in the UI, it just avoids setting PRIMARY. I think that would 
kind of work, but it seems hackish.

5) Don't select the pasted cells, not even in the UI. If I Ctrl+V in a text 
editor, the pasted text doesn't become selected either. This should 
(hopefully?) be simple, consistent and avoid the problem too.

 I think the best one is 5), closely followed by 1).

-- 
 Luboš Luňák
 l.lu...@collabora.com
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

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

2019-07-08 Thread Gabor Kelemen (via logerrit)
 sw/qa/extras/uiwriter/uiwriter.cxx   |5 +
 sw/source/ui/chrdlg/drpcps.cxx   |2 ++
 sw/source/ui/dialog/uiregionsw.cxx   |1 +
 sw/source/ui/frmdlg/column.cxx   |3 +++
 sw/source/ui/frmdlg/frmpage.cxx  |2 ++
 sw/source/ui/frmdlg/wrap.cxx |1 +
 sw/source/ui/index/swuiidxmrk.cxx|1 +
 sw/source/ui/misc/bookmark.cxx   |1 +
 sw/source/uibase/config/fontcfg.cxx  |1 +
 sw/source/uibase/dochdl/gloshdl.cxx  |1 +
 sw/source/uibase/inc/DashedLine.hxx  |1 -
 sw/source/uibase/inc/DropDownFormFieldDialog.hxx |1 -
 sw/source/uibase/inc/HeaderFooterWin.hxx |1 +
 sw/source/uibase/inc/ascfldlg.hxx|2 --
 sw/source/uibase/inc/autoformatpreview.hxx   |5 -
 sw/source/uibase/inc/basesh.hxx  |2 --
 sw/source/uibase/inc/bookmark.hxx|4 +---
 sw/source/uibase/inc/cfgitems.hxx|1 -
 sw/source/uibase/inc/cnttab.hxx  |6 ++
 sw/source/uibase/inc/colex.hxx   |1 -
 sw/source/uibase/inc/colmgr.hxx  |2 ++
 sw/source/uibase/inc/column.hxx  |2 --
 sw/source/uibase/inc/condedit.hxx|1 -
 sw/source/uibase/inc/content.hxx |3 +--
 sw/source/uibase/inc/convert.hxx |1 +
 sw/source/uibase/inc/cption.hxx  |1 -
 sw/source/uibase/inc/dbtree.hxx  |1 -
 sw/source/uibase/inc/dbui.hxx|2 ++
 sw/source/uibase/inc/drawbase.hxx|1 +
 sw/source/uibase/inc/drawsh.hxx  |2 ++
 sw/source/uibase/inc/drpcps.hxx  |4 ++--
 sw/source/uibase/inc/edtwin.hxx  |1 -
 sw/source/uibase/inc/fldedt.hxx  |4 +++-
 sw/source/uibase/inc/fldmgr.hxx  |3 +--
 sw/source/uibase/inc/fldwrap.hxx |4 
 sw/source/uibase/inc/fontcfg.hxx |1 -
 sw/source/uibase/inc/frmdlg.hxx  |2 +-
 sw/source/uibase/inc/frmmgr.hxx  |5 ++---
 sw/source/uibase/inc/frmpage.hxx |2 --
 sw/source/uibase/inc/gloshdl.hxx |2 ++
 sw/source/uibase/inc/gloslst.hxx |2 ++
 sw/source/uibase/inc/glossary.hxx|8 +---
 sw/source/uibase/inc/grfsh.hxx   |7 ++-
 sw/source/uibase/inc/hyp.hxx |1 -
 sw/source/uibase/inc/imaildsplistener.hxx|1 +
 sw/source/uibase/inc/initui.hxx  |3 ---
 sw/source/uibase/shells/basesh.cxx   |1 +
 sw/source/uibase/uiview/view2.cxx|1 +
 sw/source/uibase/utlui/glbltree.cxx  |1 +
 49 files changed, 59 insertions(+), 52 deletions(-)

New commits:
commit 3889e2f2a1f5f87e972e67900b5ff5ef1289479d
Author: Gabor Kelemen 
AuthorDate: Tue Jun 25 18:51:16 2019 +0200
Commit: Miklos Vajna 
CommitDate: Mon Jul 8 12:11:17 2019 +0200

tdf#42949 Fix IWYU warnings in sw/source/uibase/inc/[a-j]*

New IWYU and recent developments in f-u-i helped to identify
some non self contained files, those were fixed too.

Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I4b7209de739c164be1cfce360f43a1885867a12a
Reviewed-on: https://gerrit.libreoffice.org/74910
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index d09783cebb8b..471d726e9626 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -57,6 +57,10 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -71,6 +75,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index db8f40fdf8a5..752d2825a33d 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -35,8 +35,10 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/sw/source/ui/dialog/uiregionsw.cxx 
b/sw/source/ui/dialog/uiregionsw.cxx
index b3c9a6ccb837..ff02fca679af 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -48,6 +48,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 9690c0b833c7..6e12124f9602 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -35,6 +35,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -52,7 +53,

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - oox/source sd/qa

2019-07-08 Thread Grzegorz Araminowicz (via logerrit)
 oox/source/drawingml/diagram/diagramlayoutatoms.cxx |   55 
 sd/qa/unit/import-tests-smartart.cxx|5 +
 2 files changed, 5 insertions(+), 55 deletions(-)

New commits:
commit dc063e223cc12df52fa377d4009b30b46c62acaf
Author: Grzegorz Araminowicz 
AuthorDate: Thu Jul 4 16:16:47 2019 +0200
Commit: Miklos Vajna 
CommitDate: Mon Jul 8 12:10:08 2019 +0200

SmartArt: remove calculateHierChildOffsetScale() from org chart algorithm

Its purpose was to center subtree if sibling parent has no children.
It was not working correctly for complex charts causing shapes to overlap.
Without it chart is still readable (just sometimes not centered).
Remove it for now until more universal solution is found.

Change-Id: I397bd4264d6ce0fadf5c5fa1352f22e72d5d163a
Reviewed-on: https://gerrit.libreoffice.org/75092
Tested-by: Jenkins
Reviewed-by: Grzegorz Araminowicz 
Reviewed-on: https://gerrit.libreoffice.org/75138
Reviewed-by: Miklos Vajna 

diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx 
b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
index 6a8ffd2c4b3e..a981dd99138c 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx
@@ -105,51 +105,6 @@ bool containsDataNodeType(const oox::drawingml::ShapePtr& 
pShape, sal_Int32 nTyp
 return false;
 }
 
-/**
- * Calculates the offset and scaling for pShape (laid out with the hierChild
- * algorithm) based on the siblings of pParent.
- */
-void calculateHierChildOffsetScale(const oox::drawingml::ShapePtr& pShape,
-   const oox::drawingml::LayoutNode* pParent, 
sal_Int32& rXOffset,
-   double& rWidthScale, sal_Int32 nLevel)
-{
-if (!pParent)
-return;
-
-auto pShapes = pParent->getNodeShapes().find(nLevel - 1);
-if (pShapes == pParent->getNodeShapes().end())
-return;
-
-const std::vector& rParents = pShapes->second;
-for (size_t nParent = 0; nParent < rParents.size(); ++nParent)
-{
-const oox::drawingml::ShapePtr& pParentShape = rParents[nParent];
-const std::vector& rChildren = 
pParentShape->getChildren();
-if (std::none_of(rChildren.begin(), rChildren.end(),
- [pShape](const oox::drawingml::ShapePtr& pChild) { 
return pChild == pShape; }))
-// This is not our parent.
-continue;
-
-if (nParent > 0)
-{
-if (rParents[nParent - 1]->getChildren().size() == 1)
-{
-// Previous sibling of our parent has no children: can use that
-// space, so shift to the left and scale up.
-rWidthScale += 1.0;
-rXOffset -= pShape->getSize().Width;
-}
-}
-if (nParent < rParents.size() - 1)
-{
-if (rParents[nParent + 1]->getChildren().size() == 1)
-// Next sibling of our parent has no children: can use that
-// space, so scale up.
-rWidthScale += 1.0;
-}
-}
-}
-
 /// Sets the position and size of a connector inside a hierChild algorithm.
 void setHierChildConnPosSize(const oox::drawingml::ShapePtr& pShape)
 {
@@ -465,7 +420,7 @@ sal_Int32 AlgAtom::getConnectorType()
 
 void AlgAtom::layoutShape( const ShapePtr& rShape,
const std::vector& rConstraints,
-   sal_Int32 nShapeLevel )
+   sal_Int32 /*nShapeLevel*/ )
 {
 switch(mnType)
 {
@@ -750,11 +705,6 @@ void AlgAtom::layoutShape( const ShapePtr& rShape,
 std::swap(rChildren[1], rChildren[2]);
 }
 
-sal_Int32 nXOffset = 0;
-double fWidthScale = 1.0;
-if (mnType == XML_hierChild)
-calculateHierChildOffsetScale(rShape, 
getLayoutNode().getParentLayoutNode(), nXOffset, fWidthScale, nShapeLevel);
-
 awt::Size aChildSize = rShape->getSize();
 if (nDir == XML_fromT)
 {
@@ -763,11 +713,10 @@ void AlgAtom::layoutShape( const ShapePtr& rShape,
 else
 aChildSize.Width /= nCount;
 aChildSize.Height *= fHeightScale;
-aChildSize.Width *= fWidthScale;
 awt::Size aConnectorSize = aChildSize;
 aConnectorSize.Width = 1;
 
-awt::Point aChildPos(nXOffset, 0);
+awt::Point aChildPos(0, 0);
 for (auto& pChild : rShape->getChildren())
 {
 pChild->setPosition(aChildPos);
diff --git a/sd/qa/unit/import-tests-smartart.cxx 
b/sd/qa/unit/import-tests-smartart.cxx
index fde35bd0a48d..e40b364d6b58 100644
--- a/sd/qa/unit/import-tests-smartart.cxx
+++ b/sd/qa/unit/import-tests-smartart.cxx
@@ -832,7 +832,7 @@ void SdImportTestSmartArt::testOrgChart()
 CPPUNIT_ASSERT(xEmployee2Shape.is

Re: tdf#74702 2/2

2019-07-08 Thread Michael Stahl

On 06.07.19 19:59, Adrien Ollier wrote:
So to close bug #74702, we require to keep the real type of any 
OutputDevice* a function gets as argument.


If we are in a function g(OutputDevice*), we must rewind to its caller 
f(OutputDevice*), and so on until a(OutputDevice*) which is called after 
creation of an instance of a subclass of OutputDevice.


As you understand, it is very hard because there are many and many 
functions to modify and to rewind to get the real type of the 
OutputDevice* (OutputDevice subclass) that was passed as parameter.



An alternative is to use dynamic_cast and test the result. This solution 
does not require so much changes but is less elegant and efficient.



Community, which solution do you prefer?


oh no, i stopped reading your other mail too early, you don't agree...

well there are some options:

1) keep tag enums
   + conditions are fast
   - violates the purity of object-oriented dogma
2) use dynamic_cast instead
   - slow
   +- it is semi-object-oriented (at first glance you're making use
  of subtyping but in reality it's not)
3) virtual operator subclass*() + overrides + conditionals
   - if you think the other options are ugly, you haven't seen this one
 in action
4) add more virtuals to OutputDevice, call them from g()
   + object oriented
   - the logic may not "belong" to OutputDevice
   - every time one of those virtuals changes you'll have to rebuild
 ~4000 objects and wait an hour
5) visitor pattern
   + very object oriented, straight from design patterns book
   - lots of additional complexity, logic is distributed around multiple
 functions (that's another way of writing "very object oriented"?)
6) multi-methods
   + rather simple & elegant
   - haha, we dont use CLOS

I could try the first solution but to do so I need you to understand 
that keeping the real type of an object is crucial, essential. And to 
get this achevied, I need your cooperation for modifying functions that 
do not return the real type of an newly created object into a function 
that returns the real type of the object.


Example is OutputDevice*Application::GetDefaultDevice()which calls 
ImplGetDefaultWindow()which returns a vcl::Window*.


Application::GetDefaultDevice​ should return a vcl::Window*so that 
functions that act differently for Windows can be used instead of 
functions that take any OutputDevicebut that are in trouble when they 
require to do something special with Windows.


in this particular case it might be possible to change it, but i bet 
you'll find other functions that may return several different subclasses 
of OutputDevice, and overloading in C++ has the limitation that you 
can't overload the return type, so you'd be out of luck then.

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

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

2019-07-08 Thread Sumit Chauhan (via logerrit)
 include/svx/sidebar/AreaPropertyPanelBase.hxx |2 ++
 svx/source/sidebar/area/AreaPropertyPanelBase.cxx |   18 ++
 2 files changed, 20 insertions(+)

New commits:
commit 347afce3a997291313fd88843ba248ccbbcb3990
Author: Sumit Chauhan 
AuthorDate: Sat Feb 9 13:16:50 2019 +0530
Commit: Samuel Mehrbrodt 
CommitDate: Mon Jul 8 11:49:00 2019 +0200

tdf#120495 Providing self adapting height to the Area section of Sidebar

This problem comes when we switch between different fill tabs in area 
sidebar and
this patch solves the issue.

Change-Id: I09936e600214394d26a27d26d47be3ef9942b65f
Reviewed-on: https://gerrit.libreoffice.org/67577
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/include/svx/sidebar/AreaPropertyPanelBase.hxx 
b/include/svx/sidebar/AreaPropertyPanelBase.hxx
index 1614077bbb55..0f568600563d 100644
--- a/include/svx/sidebar/AreaPropertyPanelBase.hxx
+++ b/include/svx/sidebar/AreaPropertyPanelBase.hxx
@@ -39,6 +39,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class XFillFloatTransparenceItem;
 class XFillTransparenceItem;
@@ -146,6 +147,7 @@ protected:
 Image   maImgLinear;
 
 VclPtr   mxTrGrPopup;
+VclPtrmpPanel;
 
 std::unique_ptr< XFillFloatTransparenceItem >   mpFloatTransparenceItem;
 std::unique_ptr< SfxUInt16Item >mpTransparanceItem;
diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx 
b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
index 93d2881820a8..6298b6f9d7f0 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -105,6 +105,7 @@ AreaPropertyPanelBase::AreaPropertyPanelBase(
 get(mpLbFillGradTo, "fillgrad2");
 get(mpGradientStyle, "gradientstyle");
 get(mpBmpImport, "bmpimport");
+mpPanel = dynamic_cast(pParent);
 
 Initialize();
 }
@@ -131,6 +132,7 @@ void AreaPropertyPanelBase::dispose()
 mpLbFillGradTo.clear();
 mpGradientStyle.clear();
 mpBmpImport.clear();
+mpPanel.clear();
 
 PanelLayout::dispose();
 }
@@ -441,6 +443,8 @@ IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillTypeHdl, 
ListBox&, void)
 {
 mpLbFillType->Selected();
 }
+if(mpPanel)
+mpPanel->TriggerDeckLayouting();
 }
 
 IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillColorHdl, SvxColorListBox&, 
void)
@@ -603,6 +607,8 @@ void AreaPropertyPanelBase::SelectFillAttrHdl_Impl()
 break;
 }
 }
+if(mpPanel)
+mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::ImpUpdateTransparencies()
@@ -858,6 +864,8 @@ void AreaPropertyPanelBase::updateFillStyle(bool bDisabled, 
bool bDefaultOrSet,
 mpToolBoxColor->Hide();
 meLastXFS = static_cast(-1);
 mpStyleItem.reset();
+if(mpPanel)
+mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::updateFillGradient(bool bDisabled, bool 
bDefaultOrSet, const SfxPoolItem* pState)
@@ -897,6 +905,8 @@ void AreaPropertyPanelBase::updateFillGradient(bool 
bDisabled, bool bDefaultOrSe
 mpLbFillGradTo->SetNoSelection();
 }
 }
+if(mpPanel)
+mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::updateFillHatch(bool bDisabled, bool 
bDefaultOrSet, const SfxPoolItem* pState)
@@ -928,6 +938,8 @@ void AreaPropertyPanelBase::updateFillHatch(bool bDisabled, 
bool bDefaultOrSet,
 mpLbFillAttr->SetNoSelection();
 }
 }
+if(mpPanel)
+mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::updateFillColor(bool bDefaultOrSet, const 
SfxPoolItem* pState)
@@ -945,6 +957,8 @@ void AreaPropertyPanelBase::updateFillColor(bool 
bDefaultOrSet, const SfxPoolIte
 mpLbFillType->SelectEntryPos(SOLID);
 Update();
 }
+if(mpPanel)
+mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::updateFillBitmap(bool bDisabled, bool 
bDefaultOrSet, const SfxPoolItem* pState)
@@ -978,6 +992,8 @@ void AreaPropertyPanelBase::updateFillBitmap(bool 
bDisabled, bool bDefaultOrSet,
 mpLbFillAttr->SetNoSelection();
 }
 }
+if(mpPanel)
+mpPanel->TriggerDeckLayouting();
 }
 
 void AreaPropertyPanelBase::NotifyItemUpdate(
@@ -1244,6 +1260,8 @@ void AreaPropertyPanelBase::Update()
 OSL_ENSURE(false, "Non supported FillType (!)");
 break;
 }
+if(mpPanel)
+mpPanel->TriggerDeckLayouting();
 }
 
 IMPL_LINK_NOARG(AreaPropertyPanelBase, ModifyTransSliderHdl, Slider*, void)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Re: tdf#74702 1/2

2019-07-08 Thread Michael Stahl

On 06.07.19 19:59, Adrien Ollier wrote:

Hello Community,

I am writing this very important e-mail because I need the collaboration 
of each of you.


I am working on bug #74072 
 whose aim is 
to remove the OutDevType enumeration. OutDevType was introduced to know 
the real type of an OutputDevice 
 at any 
moment because some functions need the real type of the OutputDevice.


But using this enum is not the good way for doing that. So far, I could 
quite easily correct this in the OutputDevice's functions by introducing 
virtual methods. There are still a few OutputDevice's methods that use 
OutDevType (through GetOutDevType()) but the big majority of remaining 
functions take an OutputDevice as argument and virtual functions can't help.
The only good way for not using OutDevType can be summarized in this 
simple sentence:
"If a function needs to know the real type of an object, keep the real 
type of the object."


Suppose we have the following hierarchy of classes:

class A {/* ... */};
class B : public A {/* ... */};
class C : public A {/* ... */};

And suppose we have the following function:

int g(A* pA);

But g behaves differently according to pA is a A*, a B* or a C*. Instead 
of introducing an enum to know if pA is a A*, a B* or a C*, the good 
solution is to have three functions:


int g(A* pA);
int g(B* pB);
int g(C* pC);


mixing ad-hoc and inclusion polymorphism in this way, i.e., overloading 
across subtypes, is a really bad idea.  (and the undisciplined 
overloading in languages like C++/Java is quite error prone in general 
and i'd rather discourage its use).




This requires to keep the real type of the variable object before calling g.
So we must NOT write this:
A* myVar = new B{};
g(myVar); // calls g(A*)

Instead, we MUST write:
B* myVar = new B{};
g(myVar); // calls g(B*)

But if g() is called by a function f(), f() also requires to keep the 
real type of the variable. And if f() is called by e(), e() also needs 
to keep the real type of myVar. And can continue until the first 
function a() which calls g() by waterfall effect.


which is of course silly because the result is quite contorted function 
abstractions and it's trivially easy to call the wrong (superclass) 
overload by mistake... so you agree that it's a really bad idea :)

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

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

2019-07-08 Thread Miklos Vajna (via logerrit)
 vcl/source/window/menu.cxx  |2 
 vcl/source/window/menubarwindow.cxx |  422 ++--
 vcl/source/window/menubarwindow.hxx |   20 -
 3 files changed, 222 insertions(+), 222 deletions(-)

New commits:
commit b9e0a129fa28338613a56b99ef7f2ff588350ebb
Author: Miklos Vajna 
AuthorDate: Mon Jul 8 09:03:14 2019 +0200
Commit: Miklos Vajna 
CommitDate: Mon Jul 8 11:28:20 2019 +0200

vcl: prefix members of MenuBarWindow

See tdf#94879 for motivation.

Change-Id: I1b84376b550a2b8dd57cc1046077578efbee7bed
Reviewed-on: https://gerrit.libreoffice.org/75191
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 87440cf3825d..498851d34341 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2538,7 +2538,7 @@ bool MenuBar::ImplHandleCmdEvent( const CommandEvent& 
rCEvent )
 if (rCEvent.GetCommand() == CommandEventId::ModKeyChange && 
ImplGetSVData()->maNWFData.mbAutoAccel)
 {
 const CommandModKeyData* pCData = rCEvent.GetModKeyData ();
-if (pWin->nHighlightedItem == ITEMPOS_INVALID)
+if (pWin->m_nHighlightedItem == ITEMPOS_INVALID)
 {
 if (pCData && pCData->IsMod2() && pCData->IsDown())
 pWin->SetMBWHideAccel(false);
diff --git a/vcl/source/window/menubarwindow.cxx 
b/vcl/source/window/menubarwindow.cxx
index fdfa26bd70b4..2cff7f1f52cd 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -114,37 +114,37 @@ void DecoToolBox::SetImages( long nMaxHeight, bool bForce 
)
 
 MenuBarWindow::MenuBarWindow( vcl::Window* pParent ) :
 Window( pParent, 0 ),
-aCloseBtn(VclPtr::Create(this)),
-aFloatBtn(VclPtr::Create(this, WB_NOPOINTERFOCUS | 
WB_SMALLSTYLE | WB_RECTSTYLE)),
-aHideBtn(VclPtr::Create(this, WB_NOPOINTERFOCUS | 
WB_SMALLSTYLE | WB_RECTSTYLE))
+m_aCloseBtn(VclPtr::Create(this)),
+m_aFloatBtn(VclPtr::Create(this, WB_NOPOINTERFOCUS | 
WB_SMALLSTYLE | WB_RECTSTYLE)),
+m_aHideBtn(VclPtr::Create(this, WB_NOPOINTERFOCUS | 
WB_SMALLSTYLE | WB_RECTSTYLE))
 {
 SetType(WindowType::MENUBARWINDOW);
-pMenu = nullptr;
-pActivePopup = nullptr;
-nHighlightedItem = ITEMPOS_INVALID;
-nRolloveredItem = ITEMPOS_INVALID;
+m_pMenu = nullptr;
+m_pActivePopup = nullptr;
+m_nHighlightedItem = ITEMPOS_INVALID;
+m_nRolloveredItem = ITEMPOS_INVALID;
 mbAutoPopup = true;
-bIgnoreFirstMove = true;
+m_bIgnoreFirstMove = true;
 SetMBWHideAccel(true);
 SetMBWMenuKey(false);
 
-aCloseBtn->maImage = Image(StockImage::Yes, SV_RESID_BITMAP_CLOSEDOC);
+m_aCloseBtn->maImage = Image(StockImage::Yes, SV_RESID_BITMAP_CLOSEDOC);
 
-aCloseBtn->SetOutStyle(TOOLBOX_STYLE_FLAT);
-aCloseBtn->SetBackground();
-aCloseBtn->SetPaintTransparent(true);
-aCloseBtn->SetParentClipMode(ParentClipMode::NoClip);
+m_aCloseBtn->SetOutStyle(TOOLBOX_STYLE_FLAT);
+m_aCloseBtn->SetBackground();
+m_aCloseBtn->SetPaintTransparent(true);
+m_aCloseBtn->SetParentClipMode(ParentClipMode::NoClip);
 
-aCloseBtn->InsertItem(IID_DOCUMENTCLOSE, aCloseBtn->maImage);
-aCloseBtn->SetSelectHdl(LINK(this, MenuBarWindow, CloseHdl));
-aCloseBtn->AddEventListener(LINK(this, MenuBarWindow, ToolboxEventHdl));
-aCloseBtn->SetQuickHelpText(IID_DOCUMENTCLOSE, 
VclResId(SV_HELPTEXT_CLOSEDOCUMENT));
+m_aCloseBtn->InsertItem(IID_DOCUMENTCLOSE, m_aCloseBtn->maImage);
+m_aCloseBtn->SetSelectHdl(LINK(this, MenuBarWindow, CloseHdl));
+m_aCloseBtn->AddEventListener(LINK(this, MenuBarWindow, ToolboxEventHdl));
+m_aCloseBtn->SetQuickHelpText(IID_DOCUMENTCLOSE, 
VclResId(SV_HELPTEXT_CLOSEDOCUMENT));
 
-aFloatBtn->SetSymbol( SymbolType::FLOAT );
-aFloatBtn->SetQuickHelpText(VclResId(SV_HELPTEXT_RESTORE));
+m_aFloatBtn->SetSymbol( SymbolType::FLOAT );
+m_aFloatBtn->SetQuickHelpText(VclResId(SV_HELPTEXT_RESTORE));
 
-aHideBtn->SetSymbol( SymbolType::HIDE );
-aHideBtn->SetQuickHelpText(VclResId(SV_HELPTEXT_MINIMIZE));
+m_aHideBtn->SetSymbol( SymbolType::HIDE );
+m_aHideBtn->SetQuickHelpText(VclResId(SV_HELPTEXT_MINIMIZE));
 
 ImplInitStyleSettings();
 
@@ -158,41 +158,41 @@ MenuBarWindow::~MenuBarWindow()
 
 void MenuBarWindow::dispose()
 {
-aCloseBtn->RemoveEventListener(LINK(this, MenuBarWindow, ToolboxEventHdl));
+m_aCloseBtn->RemoveEventListener(LINK(this, MenuBarWindow, 
ToolboxEventHdl));
 RemoveEventListener(LINK(this, MenuBarWindow, ShowHideListener));
 
 mpParentPopup.disposeAndClear();
-aHideBtn.disposeAndClear();
-aFloatBtn.disposeAndClear();
-aCloseBtn.disposeAndClear();
-pMenu.clear();
-pActivePopup.clear();
-xSaveFocusId.clear();
+m_aHideBtn.disposeAndClear();
+m_aFloatBtn.disposeAndClear();
+m_aCloseBtn.disposeAndClear();
+m_pMenu.clear();
+m_pActivePopup.cl

GSOC19 Week6 Report

2019-07-08 Thread ahmed El-Shreif
Hello,

here is my week 6 report:
https://ahmedelshreif.blogspot.com/2019/07/week-6-report.html

waiting for all your feedbacks.

Thanks in advance
Ahmed ElShreif
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

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

2019-07-08 Thread Noel Grandin (via logerrit)
 comphelper/source/streaming/memorystream.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9b7729c6e224dfbe89e309aab8e8fd392fc234ad
Author: Noel Grandin 
AuthorDate: Mon Jul 8 09:30:13 2019 +0200
Commit: Noel Grandin 
CommitDate: Mon Jul 8 10:44:34 2019 +0200

revert part of "small optimisations"

from
commit ad1e790d76492ca4465114ad17e32912242db34f
Date:   Fri Jul 5 14:12:24 2019 +0200
small optimisations
I had in mind that resize() always changes capacity to the specified
value, but it actually follows the normal capacity expansion strategy
for vector

Change-Id: Idf677825d0f1f95b87110a3789ba95356d3771aa
Reviewed-on: https://gerrit.libreoffice.org/75193
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/comphelper/source/streaming/memorystream.cxx 
b/comphelper/source/streaming/memorystream.cxx
index 4477cd068188..741c4346d310 100644
--- a/comphelper/source/streaming/memorystream.cxx
+++ b/comphelper/source/streaming/memorystream.cxx
@@ -197,7 +197,7 @@ void SAL_CALL UNOMemoryStream::writeBytes( const Sequence< 
sal_Int8 >& aData )
 }
 
 if( static_cast< sal_Int32 >( nNewSize ) > static_cast< sal_Int32 >( 
maData.size() ) )
-maData.insert( maData.end(), nNewSize - maData.size(), 0 );
+maData.resize( nNewSize );
 
 sal_Int8* pData = &(*maData.begin());
 sal_Int8* pCursor = &(pData[mnCursor]);
___
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' - sw/qa sw/source

2019-07-08 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/uiwriter/uiwriter2.cxx |   18 --
 sw/source/uibase/wrtsh/wrtsh1.cxx   |   33 ++---
 2 files changed, 30 insertions(+), 21 deletions(-)

New commits:
commit a1545a9f642aa4b3d4c4baafc1951e851b6a6ab5
Author: Miklos Vajna 
AuthorDate: Thu Jul 4 17:40:09 2019 +0200
Commit: Miklos Vajna 
CommitDate: Mon Jul 8 10:32:52 2019 +0200

sw comments on frames: fix comment insert for as-char frame at para start

This adapts SwWrtShell::InsertPostIt() to behave similar to commit
86fd893e32ef7a737b2c4b60e0938146b102fc07 (sw comments on frames: delete
comment of frame when deleting frame, 2019-07-03), i.e. instead of
hoping that the cursor will be at the end of paragraph and traveling
back, just set the cursor to the remembered anchor position.

This is cleaner, and as a side-effect also fixes the scenario when
creating a comment on an as-char image, which happens to be at the start
of the paragraph.

Change-Id: Iedca0feb62242677b6e8b69ef7b813d6da72c8eb
Reviewed-on: https://gerrit.libreoffice.org/75093
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins
(cherry picked from commit b382025abcd05ff75dd2cbe46df76213d4913f00)
Reviewed-on: https://gerrit.libreoffice.org/75123
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mike Kaganski 

diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx 
b/sw/qa/extras/uiwriter/uiwriter2.cxx
index bc1fe510dc03..7f161e0d9369 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -492,6 +492,12 @@ void SwUiWriterTest2::testImageComment()
 SwDoc* pDoc = createDoc("image-comment.odt");
 SwView* pView = pDoc->GetDocShell()->GetView();
 
+// Test document has "beforeafter", remove the content before the 
image.
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+pWrtShell->SttEndDoc(/*bStart=*/true);
+pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 6, 
/*bBasicCall=*/false);
+pWrtShell->Delete();
+
 // Select the image.
 pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, 
SfxCallMode::SYNCHRON);
 
@@ -501,17 +507,17 @@ void SwUiWriterTest2::testImageComment()
 // Verify that the comment is around the image.
 // Without the accompanying fix in place, this test would have failed, as 
FN_POSTIT was disabled
 // in the frame shell.
+// Then this test would have failed, as in case the as-char anchored image 
was at the start of
+// the paragraph, the comment of the image covered the character after the 
image, not the image.
 uno::Reference xPara = getParagraph(1);
-CPPUNIT_ASSERT_EQUAL(OUString("Text"),
- getProperty(getRun(xPara, 1), 
"TextPortionType"));
 CPPUNIT_ASSERT_EQUAL(OUString("Annotation"),
- getProperty(getRun(xPara, 2), 
"TextPortionType"));
+ getProperty(getRun(xPara, 1), 
"TextPortionType"));
 CPPUNIT_ASSERT_EQUAL(OUString("Frame"),
- getProperty(getRun(xPara, 3), 
"TextPortionType"));
+ getProperty(getRun(xPara, 2), 
"TextPortionType"));
 CPPUNIT_ASSERT_EQUAL(OUString("AnnotationEnd"),
- getProperty(getRun(xPara, 4), 
"TextPortionType"));
+ getProperty(getRun(xPara, 3), 
"TextPortionType"));
 CPPUNIT_ASSERT_EQUAL(OUString("Text"),
- getProperty(getRun(xPara, 5), 
"TextPortionType"));
+ getProperty(getRun(xPara, 4), 
"TextPortionType"));
 
 // Insert content to the comment, and select the image again.
 SfxStringItem aItem(FN_INSERT_STRING, "x");
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx 
b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 88fcc174dab8..183f964c9d25 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -1885,6 +1885,21 @@ void SwWrtShell::InsertPostIt(SwFieldMgr& rFieldMgr, 
SfxRequest& rReq)
 {
 SwFlyFrame* pFly = GetSelectedFlyFrame();
 
+// Remember the anchor of the selected object before deletion.
+std::unique_ptr pAnchor;
+if (pFly)
+{
+SwFrameFormat* pFormat = pFly->GetFormat();
+if (pFormat)
+{
+RndStdIds eAnchorId = pFormat->GetAnchor().GetAnchorId();
+if ((eAnchorId == RndStdIds::FLY_AS_CHAR || eAnchorId == 
RndStdIds::FLY_AT_CHAR) && pFormat->GetAnchor().GetContentAnchor())
+{
+pAnchor.reset(new 
SwPosition(*pFormat->GetAnchor().GetContentAnchor()));
+}
+}
+}
+
 // A frame is selected, end frame selection.
 EnterStdMode();
 GetView().AttrChangedNotify(this);
@@ -1893,6 +1908,7 @@ void SwWrtShell::InsertPostIt(SwFieldMgr& rFieldMgr, 
SfxRequest& rR

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - 2 commits - sw/qa sw/source

2019-07-08 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/uiwriter/uiwriter2.cxx |   12 
 sw/source/uibase/frmdlg/frmmgr.cxx  |5 +
 sw/source/uibase/wrtsh/delete.cxx   |   11 ---
 3 files changed, 25 insertions(+), 3 deletions(-)

New commits:
commit a59cec34225893f352b4fb6d6c416ade0717eccd
Author: Miklos Vajna 
AuthorDate: Thu Jul 4 15:50:31 2019 +0200
Commit: Miklos Vajna 
CommitDate: Mon Jul 8 10:32:38 2019 +0200

sw: insert image: set anchor to as-char by default

See the mailing list thread at

https://www.mail-archive.com/search?l=mid&q=999e55c8-5d15-1014-e6f9-9f3d19d00...@collabora.com
(minutes of ESC call ..., 2019-05-09) for motivation, this is meant to
improve Word compatibility, by not defaulting to the at-paragraph anchor
type, which is unavailable in Word.

See tdf#45778 and tdf#87720 for related bugs.

(cherry picked from commit 4f40bf6a79de6d60da0a5090cdfeda6242e889f0)

[ Testcase not backported, testPasteListener is missing on cp-6.2 and we
would extend that. ]

Conflicts:
sw/qa/extras/unowriter/unowriter.cxx

Change-Id: I2699ce04dce02e8436dc3af3b2cc8778f8dc476c
Reviewed-on: https://gerrit.libreoffice.org/75122
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mike Kaganski 

diff --git a/sw/source/uibase/frmdlg/frmmgr.cxx 
b/sw/source/uibase/frmdlg/frmmgr.cxx
index 2bf04a3cce44..184b4177fbb3 100644
--- a/sw/source/uibase/frmdlg/frmmgr.cxx
+++ b/sw/source/uibase/frmdlg/frmmgr.cxx
@@ -84,6 +84,11 @@ SwFlyFrameAttrMgr::SwFlyFrameAttrMgr( bool bNew, SwWrtShell* 
pSh, Frmmgr_Type nT
 m_aSet.Put( SwFormatFrameSize( ATT_MIN_SIZE, DFLT_WIDTH, DFLT_HEIGHT 
));
 if ( 0 != ::GetHtmlMode(pSh->GetView().GetDocShell()) )
 m_aSet.Put( SwFormatHoriOrient( 0, text::HoriOrientation::LEFT, 
text::RelOrientation::PRINT_AREA ) );
+
+if (nType == Frmmgr_Type::GRF || nType == Frmmgr_Type::OLE)
+{
+m_aSet.Put(SwFormatAnchor(RndStdIds::FLY_AS_CHAR));
+}
 }
 else if ( nType == Frmmgr_Type::NONE )
 {
commit a878adbe0f5e032e34b43d3fdc0c6a7c7659dc6c
Author: Miklos Vajna 
AuthorDate: Thu Jul 4 10:23:50 2019 +0200
Commit: Miklos Vajna 
CommitDate: Mon Jul 8 10:32:25 2019 +0200

sw comments on frames: delete comment of as-char frame when deleting frame

Also make sure that we only recognize postit fields as comments, not
other fields.

Change-Id: I31c8e5d46bb7681710734c5a0b8a26c3a70f417e
Reviewed-on: https://gerrit.libreoffice.org/75072
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins
(cherry picked from commit dcfe6eaee16cac0aff4a66efbe19c69431579485)
Reviewed-on: https://gerrit.libreoffice.org/75121
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mike Kaganski 

diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx 
b/sw/qa/extras/uiwriter/uiwriter2.cxx
index 7a6ccec9adfc..bc1fe510dc03 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -512,6 +512,18 @@ void SwUiWriterTest2::testImageComment()
  getProperty(getRun(xPara, 4), 
"TextPortionType"));
 CPPUNIT_ASSERT_EQUAL(OUString("Text"),
  getProperty(getRun(xPara, 5), 
"TextPortionType"));
+
+// Insert content to the comment, and select the image again.
+SfxStringItem aItem(FN_INSERT_STRING, "x");
+pView->GetViewFrame()->GetDispatcher()->ExecuteList(FN_INSERT_STRING, 
SfxCallMode::SYNCHRON,
+{ &aItem });
+pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, 
SfxCallMode::SYNCHRON);
+// Now delete the image.
+pView->GetViewFrame()->GetDispatcher()->Execute(SID_DELETE, 
SfxCallMode::SYNCHRON);
+// Without the accompanying fix in place, this test would have failed with 
'Expected: 0; Actual:
+// 1', i.e. the comment of the image was not deleted when the image was 
deleted.
+CPPUNIT_ASSERT_EQUAL(static_cast(0),
+ 
pDoc->getIDocumentMarkAccess()->getAnnotationMarksCount());
 }
 
 void SwUiWriterTest2::testImageCommentAtChar()
diff --git a/sw/source/uibase/wrtsh/delete.cxx 
b/sw/source/uibase/wrtsh/delete.cxx
index 0d060586645c..9bbf81bf21c0 100644
--- a/sw/source/uibase/wrtsh/delete.cxx
+++ b/sw/source/uibase/wrtsh/delete.cxx
@@ -26,6 +26,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 
 inline void SwWrtShell::OpenMark()
@@ -377,9 +379,11 @@ long SwWrtShell::DelRight()
 if (pFly)
 {
 SwFrameFormat* pFormat = pFly->GetFormat();
-if (pFormat && pFormat->GetAnchor().GetAnchorId() == 
RndStdIds::FLY_AT_CHAR)
+if (pFormat)
 {
-if (pFormat->GetAnchor().GetContentAnchor())
+RndStdIds eAnchorId = pFormat->GetAnchor().GetAnchorId();
+if ((eAnchorId == RndStdIds::FLY_AS_CHAR ||

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - 2 commits - sw/qa sw/source

2019-07-08 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/uiwriter/uiwriter2.cxx   |   13 +
 sw/qa/extras/ww8export/data/image-comment-at-char.doc |binary
 sw/qa/extras/ww8export/ww8export3.cxx |   17 +++
 sw/source/filter/basflt/fltshell.cxx  |   11 
 sw/source/filter/ww8/wrtw8sty.cxx |   25 +--
 sw/source/filter/ww8/wrtww8.cxx   |3 -
 sw/source/filter/ww8/wrtww8.hxx   |7 ++-
 sw/source/uibase/wrtsh/delete.cxx |   40 ++
 8 files changed, 108 insertions(+), 8 deletions(-)

New commits:
commit 8570cc04a47ba3172899a57d12ed89d4c2a69012
Author: Miklos Vajna 
AuthorDate: Wed Jul 3 14:05:05 2019 +0200
Commit: Miklos Vajna 
CommitDate: Mon Jul 8 10:31:41 2019 +0200

sw comments on frames: delete comment of frame when deleting frame

Also group the two actions together, so only 1 undo action is visible to
the user, not 2.

(cherry picked from commit 86fd893e32ef7a737b2c4b60e0938146b102fc07)

Conflicts:
sw/qa/extras/uiwriter/uiwriter2.cxx
sw/source/uibase/wrtsh/delete.cxx

Change-Id: Idba5a63b1653e96db4f9567a38b3f4ca740eb1df
Reviewed-on: https://gerrit.libreoffice.org/75120
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mike Kaganski 

diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx 
b/sw/qa/extras/uiwriter/uiwriter2.cxx
index daa813247bf4..7a6ccec9adfc 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -12,6 +12,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -539,6 +540,18 @@ void SwUiWriterTest2::testImageCommentAtChar()
  getProperty(getRun(xPara, 4), 
"TextPortionType"));
 CPPUNIT_ASSERT_EQUAL(OUString("Text"),
  getProperty(getRun(xPara, 5), 
"TextPortionType"));
+
+// Insert content to the comment, and select the image again.
+SfxStringItem aItem(FN_INSERT_STRING, "x");
+pView->GetViewFrame()->GetDispatcher()->ExecuteList(FN_INSERT_STRING, 
SfxCallMode::SYNCHRON,
+{ &aItem });
+pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, 
SfxCallMode::SYNCHRON);
+// Now delete the image.
+pView->GetViewFrame()->GetDispatcher()->Execute(SID_DELETE, 
SfxCallMode::SYNCHRON);
+// Without the accompanying fix in place, this test would have failed with 
'Expected: 0; Actual:
+// 1', i.e. the comment of the image was not deleted when the image was 
deleted.
+CPPUNIT_ASSERT_EQUAL(static_cast(0),
+ 
pDoc->getIDocumentMarkAccess()->getAnnotationMarksCount());
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest2);
diff --git a/sw/source/uibase/wrtsh/delete.cxx 
b/sw/source/uibase/wrtsh/delete.cxx
index f18af272eaf3..0d060586645c 100644
--- a/sw/source/uibase/wrtsh/delete.cxx
+++ b/sw/source/uibase/wrtsh/delete.cxx
@@ -23,6 +23,10 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 
 
 inline void SwWrtShell::OpenMark()
 {
@@ -367,8 +371,44 @@ long SwWrtShell::DelRight()
 // #108205# Remember object's position.
 Point aTmpPt = GetObjRect().TopLeft();
 
+// Remember the anchof of the selected object before deletion.
+std::unique_ptr pAnchor;
+SwFlyFrame* pFly = GetSelectedFlyFrame();
+if (pFly)
+{
+SwFrameFormat* pFormat = pFly->GetFormat();
+if (pFormat && pFormat->GetAnchor().GetAnchorId() == 
RndStdIds::FLY_AT_CHAR)
+{
+if (pFormat->GetAnchor().GetContentAnchor())
+{
+pAnchor.reset(new 
SwPosition(*pFormat->GetAnchor().GetContentAnchor()));
+}
+}
+}
+
+// Group deletion of the object and its comment together.
+mxDoc->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
+
 DelSelectedObj();
 
+if (pAnchor)
+{
+SwTextNode* pTextNode = pAnchor->nNode.GetNode().GetTextNode();
+if (pTextNode)
+{
+const SwTextField* pField(
+
pTextNode->GetFieldTextAttrAt(pAnchor->nContent.GetIndex(), true));
+if (pField)
+{
+// Remove the comment of the deleted object.
+*GetCurrentShellCursor().GetPoint() = *pAnchor;
+DelRight();
+}
+}
+}
+
+mxDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::EMPTY, nullptr);
+
 // #108205# Set cursor to remembered position.
 SetCursor(&aTmpPt);
 
commit 720176cef0e5a563fd295963241594c92ac0126a
Author: Miklos Vajna 
AuthorDate

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

2019-07-08 Thread Samuel Mehrbrodt (via logerrit)
 sd/source/ui/view/drviews7.cxx |   14 ++
 sd/source/ui/view/drviewsf.cxx |   35 ++-
 2 files changed, 32 insertions(+), 17 deletions(-)

New commits:
commit 1c6218df32838dc77da8e15dc5ce47eadad1a13f
Author: Samuel Mehrbrodt 
AuthorDate: Mon Jul 8 08:22:33 2019 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Mon Jul 8 10:28:45 2019 +0200

Related tdf#98575 Allow editing link even when URL field is not selected

When the cursor is directly before or behind the URL field,
just extend the selection so that the link is editable.

Change-Id: I80afe40a1c40e2a02ec6adb18dbdb27b6e39c7d1
Reviewed-on: https://gerrit.libreoffice.org/75190
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index 1e663a8e4b61..801a70d2042a 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -1454,16 +1454,14 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
 OutlinerView* pOLV = mpDrawView->GetTextEditOutlinerView();
 if (pOLV)
 {
-const SvxFieldItem* pFieldItem = pOLV->GetFieldAtSelection();
+const SvxFieldItem* pFieldItem = 
pOLV->GetFieldUnderMousePointer();
+if (!pFieldItem)
+pFieldItem = pOLV->GetFieldAtSelection();
 if (pFieldItem)
 {
-ESelection aSel = pOLV->GetSelection();
-if ( abs( aSel.nEndPos - aSel.nStartPos ) == 1 )
-{
-const SvxFieldData* pField = pFieldItem->GetField();
-if ( dynamic_cast< const SvxURLField *>( pField ) !=  
nullptr )
-bDisableEditHyperlink = false;
-}
+const SvxFieldData* pField = pFieldItem->GetField();
+if (dynamic_cast(pField))
+bDisableEditHyperlink = false;
 }
 }
 }
diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx
index 0d5081cbfd17..dc6d8f97c3f2 100644
--- a/sd/source/ui/view/drviewsf.cxx
+++ b/sd/source/ui/view/drviewsf.cxx
@@ -93,17 +93,34 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet)
 const SvxFieldItem* pFieldItem = pOLV->GetFieldAtSelection();
 if (pFieldItem)
 {
+// Make sure the whole field is selected
 ESelection aSel = pOLV->GetSelection();
-if ( abs( aSel.nEndPos - aSel.nStartPos ) == 1 )
+if (aSel.nStartPos == aSel.nEndPos)
 {
-const SvxFieldData* pField = pFieldItem->GetField();
-if( auto pUrlField = dynamic_cast< const SvxURLField *>( 
pField ) )
-{
-aHLinkItem.SetName(pUrlField->GetRepresentation());
-aHLinkItem.SetURL(pUrlField->GetURL());
-aHLinkItem.SetTargetFrame(pUrlField->GetTargetFrame());
-bField = true;
-}
+aSel.nEndPos++;
+pOLV->SetSelection(aSel);
+}
+}
+if (!pFieldItem)
+{
+// Cursor probably behind the field - extend selection to 
select the field
+ESelection aSel = pOLV->GetSelection();
+if (aSel.nStartPos == aSel.nEndPos)
+{
+aSel.nStartPos--;
+pOLV->SetSelection(aSel);
+pFieldItem = pOLV->GetFieldAtSelection();
+}
+}
+if (pFieldItem)
+{
+const SvxFieldData* pField = pFieldItem->GetField();
+if( auto pUrlField = dynamic_cast< const SvxURLField *>( 
pField ) )
+{
+aHLinkItem.SetName(pUrlField->GetRepresentation());
+aHLinkItem.SetURL(pUrlField->GetURL());
+aHLinkItem.SetTargetFrame(pUrlField->GetTargetFrame());
+bField = true;
 }
 }
 if (!bField)
___
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.2' - sw/qa sw/source

2019-07-08 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/tiledrendering/tiledrendering.cxx |   20 
 sw/source/ui/frmdlg/frmpage.cxx|8 
 sw/source/uibase/inc/basesh.hxx|2 +-
 sw/source/uibase/shells/basesh.cxx |   10 ++
 4 files changed, 39 insertions(+), 1 deletion(-)

New commits:
commit c393afd00abcff65ce091baff83541e8a65348d9
Author: Miklos Vajna 
AuthorDate: Fri Jul 5 12:48:07 2019 +0200
Commit: Miklos Vajna 
CommitDate: Mon Jul 8 10:01:34 2019 +0200

sw lok: hide UI to set Word-incompatible anchor types

Let's make it a bit harder for users to hurt themselves, at least in
Online. Affects the context/popup menu and the dialog of frames.

This is similar to how certain border types are hidden on the UI,
depending on if MSO supports them. Though that goes a bit further and
disables those types even on the desktop.

(cherry picked from commit 4154d281fbecaadf6cd118c00cc6cff929e339a4)

Change-Id: I6b9205ef3df8a7bc15fbcf787d134743c09e98da

diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index ef15c30f8e79..bd7d3c6b0b87 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -42,6 +42,7 @@
 #include 
 #include 
 #include 
+#include 
 
 static char const DATA_DIRECTORY[] = "/sw/qa/extras/tiledrendering/data/";
 
@@ -110,6 +111,7 @@ public:
 void testDeleteNodeRedlineCallback();
 void testVisCursorInvalidation();
 void testSemiTransparent();
+void testAnchorTypes();
 
 CPPUNIT_TEST_SUITE(SwTiledRenderingTest);
 CPPUNIT_TEST(testRegisterCallback);
@@ -166,6 +168,7 @@ public:
 CPPUNIT_TEST(testDeleteNodeRedlineCallback);
 CPPUNIT_TEST(testVisCursorInvalidation);
 CPPUNIT_TEST(testSemiTransparent);
+CPPUNIT_TEST(testAnchorTypes);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -2409,6 +2412,23 @@ void SwTiledRenderingTest::testSemiTransparent()
 comphelper::LibreOfficeKit::setActive(false);
 }
 
+void SwTiledRenderingTest::testAnchorTypes()
+{
+comphelper::LibreOfficeKit::setActive();
+SwXTextDocument* pXTextDocument = createDoc("shape.fodt");
+SwDoc* pDoc = pXTextDocument->GetDocShell()->GetDoc();
+SwView* pView = pXTextDocument->GetDocShell()->GetView();
+pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, 
SfxCallMode::SYNCHRON);
+SfxItemSet aSet(pDoc->GetAttrPool(), svl::Items{});
+SfxBoolItem aItem(FN_TOOL_ANCHOR_PAGE);
+aSet.Put(aItem);
+auto pShell = dynamic_cast(pView->GetCurShell());
+pShell->GetState(aSet);
+// Without the accompanying fix in place, this test would have failed, 
setting the anchor type
+// to other than as/at-char was possible.
+CPPUNIT_ASSERT(!aSet.HasItem(FN_TOOL_ANCHOR_PAGE));
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SwTiledRenderingTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 163c8a80b582..e3451afbbef3 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -71,6 +71,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 using namespace ::com::sun::star;
@@ -702,6 +703,13 @@ SwFramePage::SwFramePage(TabPageParent pParent, const 
SfxItemSet &rSet)
 
 m_xAutoWidthCB->connect_toggled(LINK(this, SwFramePage, 
AutoWidthClickHdl));
 m_xAutoHeightCB->connect_toggled(LINK(this, SwFramePage, 
AutoHeightClickHdl));
+
+if (comphelper::LibreOfficeKit::isActive())
+{
+m_xAnchorAtPageRB->hide();
+m_xAnchorAtParaRB->hide();
+m_xAnchorAtFrameRB->hide();
+}
 }
 
 SwFramePage::~SwFramePage()
diff --git a/sw/source/uibase/inc/basesh.hxx b/sw/source/uibase/inc/basesh.hxx
index 17d0a8336601..41efce245c32 100644
--- a/sw/source/uibase/inc/basesh.hxx
+++ b/sw/source/uibase/inc/basesh.hxx
@@ -36,7 +36,7 @@ class SfxItemSet;
 class SwCursorShell;
 
 struct DBTextStruct_Impl;
-class SAL_DLLPUBLIC_RTTI SwBaseShell: public SfxShell
+class SW_DLLPUBLIC SwBaseShell: public SfxShell
 {
 SwView  &rView;
 
diff --git a/sw/source/uibase/shells/basesh.cxx 
b/sw/source/uibase/shells/basesh.cxx
index 1b885e9a635f..eb1fa1a53c83 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -107,6 +107,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -1650,6 +1651,15 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
 rSet.DisableItem(nWhich);
 else if(nWhich != SID_ANCHOR_MENU)
 rSet.Put(SfxBoolItem(nWhich, bSet));
+
+if (comphelper::LibreOfficeKit::isActive())
+{
+if (nWhich == FN_TOOL_ANCHOR_PAGE || nWhich == 
FN_TOOL_ANCHOR_PARAGRAPH
+|| nWhich == FN_TOOL_ANCHOR_FRAME)
+{
+  

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

2019-07-08 Thread Takeshi Abe (via logerrit)
 sc/inc/conditio.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 86876ff86ef19af20e1c7202e029bbde44051a07
Author: Takeshi Abe 
AuthorDate: Sun Jun 23 19:32:41 2019 +0900
Commit: Tor Lillqvist 
CommitDate: Mon Jul 8 10:03:25 2019 +0200

sc: the type is not Data, but Date

Change-Id: I32105e1f40ddb0c206d62f30f66054b7dbe803d0
Reviewed-on: https://gerrit.libreoffice.org/74594
Reviewed-by: Julien Nabet 
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 
Tested-by: Tor Lillqvist 

diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx
index 49c05fbbb3c7..42448174ca52 100644
--- a/sc/inc/conditio.hxx
+++ b/sc/inc/conditio.hxx
@@ -280,7 +280,7 @@ inline std::basic_ostream & operator 
<<(std::basic_ostream(rType) << ")";
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-07-08 Thread Samuel Mehrbrodt (via logerrit)
 vcl/source/window/seleng.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c554afd565ea515decd483a9068f6590c5316dce
Author: Samuel Mehrbrodt 
AuthorDate: Fri Jul 5 12:40:16 2019 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Mon Jul 8 10:01:18 2019 +0200

Right clicking in text should move the cursor

Currently the cursor stays at the old position when you right click
in a different position in the text.
This causes some issues, e.g. when you right click on a hyperlink in
draw, you don't get the context menu for the link if the cursor is not
on the link (see tdf#98575 for related bug).

So generally, when right clicking on a piece of text, move the cursor
to where the click happened.

The new behavior is now matching the behavior of Word, PowerPoint, etc.

Change-Id: I5e0ac37b7ac6c859d3056c5b8ed453f97c747360
Reviewed-on: https://gerrit.libreoffice.org/75127
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx
index 84481d6e1933..cb3b19056bcd 100644
--- a/vcl/source/window/seleng.cxx
+++ b/vcl/source/window/seleng.cxx
@@ -115,7 +115,7 @@ void SelectionEngine::CursorPosChanging( bool bShift, bool 
bMod1 )
 bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt )
 {
 nFlags &= ~SelectionEngineFlags::CMDEVT;
-if ( !pFunctionSet || rMEvt.GetClicks() > 1 || rMEvt.IsRight() )
+if ( !pFunctionSet || rMEvt.GetClicks() > 1 )
 return false;
 
 sal_uInt16 nModifier = rMEvt.GetModifier() | nLockedMods;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] libvisio.git: src/lib src/test

2019-07-08 Thread Libreoffice Gerrit user
 src/lib/VSDFieldList.cpp   |   68 ++---
 src/test/data/tdf76829-datetime-format.vsd |binary
 src/test/data/tdf76829-numeric-format.vsd  |binary
 src/test/importtest.cpp|   10 +++-
 4 files changed, 60 insertions(+), 18 deletions(-)

New commits:
commit f96f3ee3a44d6c7af28e1eb67c8da9d36012b113
Author: Bartosz Kosiorek 
AuthorDate: Thu Jul 4 09:42:40 2019 +0200
Commit: Miklos Vajna 
CommitDate: Mon Jul 8 09:28:24 2019 +0200

tdf#76829 tdf#98291 Visio: Fix number conversion to string

The method 'doubleToString' is copied from librevenge:

https://sourceforge.net/p/libwpd/librevenge/ci/master/tree/src/lib/RVNGProperty.cpp#l35

Method duplication allows to do not break ABI of librevenge.

Change-Id: Ie1bce018cf2e1fd38af07db4d19445d1bffe9005
Reviewed-on: https://gerrit.libreoffice.org/75070
Reviewed-by: Miklos Vajna 
Tested-by: Miklos Vajna 

diff --git a/src/lib/VSDFieldList.cpp b/src/lib/VSDFieldList.cpp
index 05482d0..f6fc62d 100644
--- a/src/lib/VSDFieldList.cpp
+++ b/src/lib/VSDFieldList.cpp
@@ -68,6 +68,33 @@ librevenge::RVNGString 
libvisio::VSDNumericField::datetimeToString(const char *f
   return result;
 }
 
+// This method is copied from:
+// 
https://sourceforge.net/p/libwpd/librevenge/ci/master/tree/src/lib/RVNGProperty.cpp#l35
+// to avoid ABI breakage. If upstream file was modified, please update method 
accordingly.
+static librevenge::RVNGString doubleToString(const double value, const char* 
format)
+{
+  librevenge::RVNGString tempString;
+  if (value < 0.0001 && value > -0.0001)
+tempString.sprintf(format, 0.0);
+  else
+tempString.sprintf(format, value);
+#ifndef __ANDROID__
+  std::string decimalPoint(localeconv()->decimal_point);
+#else
+  std::string decimalPoint(".");
+#endif
+  if ((decimalPoint.size() == 0) || (decimalPoint == "."))
+return tempString;
+  std::string stringValue(tempString.cstr());
+  if (!stringValue.empty())
+  {
+std::string::size_type pos;
+while ((pos = stringValue.find(decimalPoint)) != std::string::npos)
+  stringValue.replace(pos,decimalPoint.size(),".");
+  }
+  return librevenge::RVNGString(stringValue.c_str());
+}
+
 librevenge::RVNGString libvisio::VSDNumericField::getString(const 
std::map &)
 {
   if (m_format == VSD_FIELD_FORMAT_Unknown)
@@ -79,16 +106,7 @@ librevenge::RVNGString 
libvisio::VSDNumericField::getString(const std::map 
pProp{librevenge::RVNGPropertyFactory::newIntProp(m_number)};
-  return pProp ? pProp->getStr() : librevenge::RVNGString();
-}
-std::unique_ptr 
pProp{librevenge::RVNGPropertyFactory::newDoubleProp(m_number)};
-return pProp ? pProp->getStr() : librevenge::RVNGString();
+return doubleToString(m_number, "%.4g");
   }
   case VSD_FIELD_FORMAT_0PlNoUnits:
   case VSD_FIELD_FORMAT_0PlDefUnits:
@@ -98,12 +116,30 @@ librevenge::RVNGString 
libvisio::VSDNumericField::getString(const std::map 
pProp{librevenge::RVNGPropertyFactory::newIntProp(m_number)};
 return pProp ? pProp->getStr() : librevenge::RVNGString();
   }
-  //TODO VSD_FIELD_FORMAT_1PlNoUnits  4 Format string: 0.0
-  //TODO VSD_FIELD_FORMAT_1PlDefUnits  5 Format string: 0.0 u
-  //TODO VSD_FIELD_FORMAT_2PlNoUnits  6 Format string: 0.00
-  //TODO VSD_FIELD_FORMAT_2PlDefUnits  7 Format string: 0.00 u
-  //TODO VSD_FIELD_FORMAT_3PlNoUnits  8 Format string: 0.000
-  //TODO VSD_FIELD_FORMAT_3PlDefUnits  9 Format string: 0.000 u
+
+  case VSD_FIELD_FORMAT_1PlNoUnits:
+  case VSD_FIELD_FORMAT_1PlDefUnits:
+  {
+// 4 Format string: 0.0 Example: 30060.9
+// 5 Format string: 0.0 u Example: 30060.9 cm
+return doubleToString(m_number, "%.1f");
+  }
+
+  case VSD_FIELD_FORMAT_2PlNoUnits:
+  case VSD_FIELD_FORMAT_2PlDefUnits:
+  {
+// 6 Format string: 0.00 Example: 30061.92
+// 7 Format string: 0.00 u Example: 30061.92 cm
+return doubleToString(m_number, "%.2f");
+  }
+
+  case VSD_FIELD_FORMAT_3PlNoUnits:
+  case VSD_FIELD_FORMAT_3PlDefUnits:
+  {
+// 8 Format string: 0.000 Example: 30061.916
+// 9 Format string: 0.000 u Example: 30061.916 cm
+return doubleToString(m_number, "%.3f");
+  }
   //TODO VSD_FIELD_FORMAT_FeetAndInches  10 Format string: <,FEET/INCH>0.000 u
   //TODO VSD_FIELD_FORMAT_Radians  11 Format string: <,rad>0. u
   //TODO VSD_FIELD_FORMAT_Degrees  12 Format string: <,deg>0.# u
diff --git a/src/test/data/tdf76829-datetime-format.vsd 
b/src/test/data/tdf76829-datetime-format.vsd
index c9237fe..f6eed7c 100644
Binary files a/src/test/data/tdf76829-datetime-format.vsd and 
b/src/test/data/tdf76829-datetime-format.vsd differ
diff --git a/src/test/data/tdf76829-numeric-format.vsd 
b/src/test/data/tdf76829-numeric-format.vsd
index a1c24cc..db9596d 100644
Binary files a/src/test/data/tdf76829-numeric-format.vsd and 
b/src/test/data/tdf76829-numeric-format.vsd differ
diff --git a/src/test/importtest.cpp b/src/test/importtest.cpp
index 13b665f..100338d 100644
--- a/src/test/impo

Re: How do various apps and DEs handle the primary selection?

2019-07-08 Thread Miklos Vajna
Hi Jan-Marek,

On Mon, Jul 08, 2019 at 01:07:38AM +0200, Jan-Marek Glogowski 
 wrote:
> And Writer clears it when a Shell closes, while Calc (~ScTabView) and Draw
> (:~View) clear it when the view is closed. But I'm a bit confused by the terms
> Shell and View and then there is even a ViewShell...

A "shell" on its own is not clear. An object shell usually refers to an
SfxObjectShell sublcass, there is one instance for one opened document.
If you go to Window -> New Window, you can have multiple views for the
same document. Then you get multiple SfxViewShell subclasses.

In the Writer case, the subclasses are called SwDocShell and SwView.

BTW, did you try 'make gbuildtojson' recently? :-) It was broken on
master in this range:

git log 
4154d281fbecaadf6cd118c00cc6cff929e339a4..1e4fa857873c0bc728143087ec692c4b75aaf820
 -- solenv

Perhaps it rings a bell for you.

Thanks,

Miklos


signature.asc
Description: Digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

[Libreoffice-commits] online.git: wsd/README

2019-07-08 Thread Miklos Vajna (via logerrit)
 wsd/README |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0bd44822e1493499c8ccf3699d23eccfdc7076e1
Author: Miklos Vajna 
AuthorDate: Mon Jul 8 09:06:00 2019 +0200
Commit: Miklos Vajna 
CommitDate: Mon Jul 8 09:06:23 2019 +0200

wsd: update outdated link in README

Version number is one thing, but missing Leap made this even more
confusing.

diff --git a/wsd/README b/wsd/README
index 5e54a7c21..6a854c1cd 100644
--- a/wsd/README
+++ b/wsd/README
@@ -16,7 +16,7 @@ location of your choice.
 
 On openSUSE, you can use:
 
-zypper ar 
http://download.opensuse.org/repositories/devel:/libraries:/c_c++/openSUSE_13.2/devel:libraries:c_c++.repo
+zypper ar 
http://download.opensuse.org/repositories/devel:/libraries:/c_c++/openSUSE_Leap_15.1/devel:libraries:c_c++.repo
 zypper in poco-devel libcap-progs
 
 On Debian 8 (Linux x86_64) you can use in /etc/apt/sources.list:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits