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

2019-11-22 Thread Miklos Vajna (via logerrit)
 vcl/README |   39 +++
 1 file changed, 39 insertions(+)

New commits:
commit a0fdbc49e66244d0c43c8b035ff17a0fd62506a3
Author: Miklos Vajna 
AuthorDate: Fri Nov 22 14:56:56 2019 +0100
Commit: Miklos Vajna 
CommitDate: Fri Nov 22 19:41:03 2019 +0100

vcl: add brief doc on SolarMutexGuard

Muhammet points out this is not really written down anywhere.

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

diff --git a/vcl/README b/vcl/README
index 83c5d044bdd2..e0944688f2f3 100644
--- a/vcl/README
+++ b/vcl/README
@@ -201,3 +201,42 @@ To de-compress the contents of a PDF file written by a 
release build or
 other programs, use the "pdfunzip" tool:
 
 bin/run pdfunzip input.pdf output.pdf
+
+=== SolarMutexGuard ===
+
+The solar mutex is the "big kernel lock" of LibreOffice, a global one. It's a
+recursive mutex, so it's allowed to take the lock on the same thread multiple
+times, and only the last unlock will actually release the mutex.
+
+UNO methods on components can be called from multiple threads, while the
+majority of the codebase is not prepared for multi-threading. One way to get
+around this mismatch is to create a SolarMutexGuard instance at the start of
+each & every UNO method implementation, but only when it is necessary:
+
+- Only acquire the SolarMutex if you actually need it (e.g., not in functions
+  that return static information).
+
+- Only around the code that actually needs it (i.e., never call out with it
+  locked).
+
+This way you ensure that code (not prepared for multithreading) is still
+executed only on a single thread.
+
+In case you expect that your caller takes the solar mutex, then you can use
+the DBG_TESTSOLARMUTEX() macro to assert that in dbgutil builds.
+
+Event listeners are a special (but frequent) case of the "never call out with
+a mutex (SolarMutex or other) locked" fundamental rule:
+
+- UNO methods can be called from multiple threads, so most implementations
+  take the solar mutex as their first action when necessary.
+
+- This can be problematic if later calling out (an event handler is called),
+  where the called function may be an UNO method implementation as well and
+  may be invoked on a different thread.
+
+- So we try to not own the solar mutex, whenever we call out (invoke event
+  listeners).
+
+In short, never hold any mutex unless necessary, especially not when calling
+out.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2018-08-22 Thread Libreoffice Gerrit user
 vcl/README |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 190e0bafbebd5abad48eba72a5632a8dd49c6bab
Author: Michael Stahl 
AuthorDate: Wed Aug 22 16:20:58 2018 +0200
Commit: Michael Stahl 
CommitDate: Wed Aug 22 16:22:57 2018 +0200

vcl: README claims VCL expands like Borland's VCL, not StarOffice's

Change-Id: I41b013dc3666dc990b63f1de34fe80fcc129ecc8
Reviewed-on: https://gerrit.libreoffice.org/59455
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/vcl/README b/vcl/README
index d7d36044630a..ae0408b830a2 100644
--- a/vcl/README
+++ b/vcl/README
@@ -1,4 +1,6 @@
-Visual Components Library is responsible for the widgets (windowing, buttons, 
controls, file-pickers etc.) operating system abstraction, including basic 
rendering (e.g. the output device).
+Visual Class Library is responsible for the widgets (windowing, buttons, 
controls, file-pickers etc.), operating system abstraction, including basic 
rendering (e.g. the output device).
+
+It should not be confused with Borland's Visual Component Library, which is 
entirely unrelated.
 
 VCL provides a graphical toolkit similar to gtk+, Qt, SWING etc.
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-07 Thread Michael Stahl
 vcl/README |   16 +++-
 1 file changed, 11 insertions(+), 5 deletions(-)

New commits:
commit 6394c89fbb07713ce04608ffd031f91a890bb853
Author: Michael Stahl 
Date:   Wed Feb 7 13:51:05 2018 +0100

vcl: adapt README to reality

diff --git a/vcl/README b/vcl/README
index b122e8218410..d7d36044630a 100644
--- a/vcl/README
+++ b/vcl/README
@@ -26,22 +26,28 @@ quartz/
 win/
+ Windows backend
 
+qt5/
+   + Qt5 (under construction)
+
 unx/
+ X11 backend and its sub-platforms
 
-   plugadapt/
-   + pluggable framework to select correct unx backend
gtk/
+ GTK2 support
gtk3/
-   + GTK3.2+ support
-   kde/
-   + KDE3 support
+   + GTK3 support
kde4/
+ KDE4 support
+   kde5/
+   + KDE5 support (under construction)
+   gtk3_kde5/
+   + GTK3 support with KDE5 file pickers (until kde5 is finished)
generic/
+ raw X11 support
 
+   plugadapt/
+   + pluggable framework to select correct unx backend
+
dtrans/
+ "data transfer" - clipboard handling
+ 
http://stackoverflow.com/questions/3261379/getting-html-source-or-rich-text-from-the-x-clipboard
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-02-20 Thread Chris Sherlock
 vcl/README |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 1acf8bb1d82414d1fb97adfe6eebfc27a9cd4ae0
Author: Chris Sherlock 
Date:   Sun Feb 21 00:39:30 2016 +1100

vcl: README update - generic was moved some time ago to unx

Change-Id: I463db3f1e0d00fba6e2b83d2e29d381e7df4bd25

diff --git a/vcl/README b/vcl/README
index c162b15..ebf8ee4 100644
--- a/vcl/README
+++ b/vcl/README
@@ -8,9 +8,6 @@ source/
 inc/
+ cross-platform abstraction headers
 
-generic/
-   + shared helper code for *some* of the backends, actually built into 
vcl.
-
 headless/
+ a backend renderer that draws to bitmaps
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-01-18 Thread Chris Sherlock
 vcl/README |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 75fe34c492925fa2bbf67f92515e2bede2c36d71
Author: Chris Sherlock 
Date:   Tue Jan 19 11:15:58 2016 +1100

vcl: define what svp stands for in README

Change-Id: I6473f08eaac5eba5aaf1b00cfd2ee36f651e8b22

diff --git a/vcl/README b/vcl/README
index 94367de8..c162b15 100644
--- a/vcl/README
+++ b/vcl/README
@@ -70,6 +70,8 @@ portable C++ class library for GUIs, with very old roots, 
that was
 developed by StarDivision. Nowadays it is not used by anything except
 LibreOffice (and OpenOffice).
 
+"svp" stands for "StarView Plugin".
+
 == COM threading ==
 
 The way COM is used in LO generally:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-02-17 Thread Jan Holesovsky
 vcl/README |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit f807ece8857457860042501b293f9f065c17fd0b
Author: Jan Holesovsky ke...@collabora.com
Date:   Mon Feb 17 23:40:48 2014 +0100

Clipboard content dumping tool to README.

Found it by chance, don't want to lose the link ;-)

Change-Id: Ie3a1c253a287a8e3ff6f82e75176e22305a03b39

diff --git a/vcl/README b/vcl/README
index e4cc922..c1fc0bf 100644
--- a/vcl/README
+++ b/vcl/README
@@ -45,6 +45,12 @@ unx/
generic/
+ raw X11 support
 
+   dtrans/
+   + data transfer - clipboard handling
+   + 
http://stackoverflow.com/questions/3261379/getting-html-source-or-rich-text-from-the-x-clipboard
+ for tips how to show the current content of the
+ clipboard
+
 
 How the platform abstraction works
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-12-19 Thread Khaled Hosny
 vcl/README |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 6c5c79e2032ecc980e6774656a67ca67ce45b108
Author: Khaled Hosny khaledho...@eglug.org
Date:   Thu Dec 19 15:25:40 2013 +0200

Public headers are long moved from here

Change-Id: I672f0348167a6347a609ad9f56b99ed056f7b4b1

diff --git a/vcl/README b/vcl/README
index 5d3a760..72f02e0 100644
--- a/vcl/README
+++ b/vcl/README
@@ -7,8 +7,6 @@ source/
 
 inc/
+ cross-platform abstraction headers
-   vcl/
-   + public headers (public to the rest of LibreOffice, that is)
 
 generic/
+ shared helper code for *some* of the backends, actually built into 
vcl.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-03-05 Thread Chris
 vcl/README |4 
 1 file changed, 4 insertions(+)

New commits:
commit b3b2a4a3f32527a3066d77e2a51c03339db21244
Author: Chris chris.sherloc...@gmail.com
Date:   Tue Mar 5 22:44:38 2013 +1100

Update README to explain what SV stands for in the source.

Change-Id: I0d0a71a6e74ca2d90487313e33cf82ea7bcac063
Reviewed-on: https://gerrit.libreoffice.org/2532
Reviewed-by: Thomas Arnhold tho...@arnhold.org
Tested-by: Thomas Arnhold tho...@arnhold.org

diff --git a/vcl/README b/vcl/README
index f373bad..effde51 100644
--- a/vcl/README
+++ b/vcl/README
@@ -47,3 +47,7 @@ How the platform abstraction works
  SalFrames, SalVirtualDevices, SalPrinters,
  Timers, the SolarMutexe, DragDrop and other
  objects, as well as the primary event loop wrapper.
+
+Note: references to SV in the code are in relation to StarView, which is a
+portable C++ class library for GUIs, with very old roots, that was developed
+by StarDivision.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits