[Libreoffice-commits] core.git: desktop/unx jvmfwk/source

2022-09-19 Thread Caolán McNamara (via logerrit)
 desktop/unx/source/start.c  |   19 +--
 jvmfwk/source/framework.cxx |7 ++-
 2 files changed, 23 insertions(+), 3 deletions(-)

New commits:
commit 6352710e02c12783280afccb3b5e03aab7948f19
Author: Caolán McNamara 
AuthorDate: Mon Sep 19 13:19:30 2022 +0100
Commit: Caolán McNamara 
CommitDate: Mon Sep 19 18:28:33 2022 +0200

try harder to remove "OSL_PIPE" pipe on SIGTERM

a) When oosplash got SIGTERM it used SIGKILL on soffice.bin, (concealed
behind osl_terminateProcess) so soffice.bin has no chance to cleanup.

Try SIGTERM, followed by SIGKILL if that doesn't work, to give
soffice.bin a chance.

b) java intercepts SIGTERM so if JNI_CreateJavaVM was called then
our SIGTERM handler doesn't get called. Add -Xrs to jvm args to
avoid this.

Change-Id: I09f93d8093bc7c094482eda73b4eadc5a6cebb83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140152
Reviewed-by: Stephan Bergmann 
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index f959565665cc..ca2579c33a18 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -722,8 +722,23 @@ static void sigterm_handler(int ignored)
 (void) ignored;
 
 if (g_pProcess) {
-osl_terminateProcess(g_pProcess); // forward signal to soffice.bin
-osl_joinProcess(g_pProcess);
+int SigTermSucceded = 0;
+oslProcessInfo info;
+info.Size = sizeof(oslProcessInfo);
+
+// forward SIGTERM to soffice.bin and give it a chance to 
semi-gracefully exit
+// enough to remove named pipe
+if (osl_getProcessInfo(g_pProcess, osl_Process_IDENTIFIER, ) == 
osl_Process_E_None) {
+TimeValue delay = { 1, 0 }; // 1 sec
+SigTermSucceded = kill(info.Ident, SIGTERM) == 0 &&
+  osl_joinProcessWithTimeout(g_pProcess, ) 
== osl_Process_E_None;
+}
+
+// didn't work, SIGKILL instead
+if (!SigTermSucceded) {
+osl_terminateProcess(g_pProcess); // uses SIGKILL to terminate 
soffice.bin
+osl_joinProcess(g_pProcess);
+}
 }
 
 _exit(255);
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index 8aa85082b838..5f83e7be739e 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -229,7 +229,7 @@ javaFrameworkError jfw_startVM(
 //options dialog
 std::unique_ptr sarJOptions(
 new JavaVMOption[
-arOptions.size() + (sUserClassPath.isEmpty() ? 1 : 2) + 
vmParams.size()]);
+arOptions.size() + (sUserClassPath.isEmpty() ? 2 : 3) + 
vmParams.size()]);
 JavaVMOption * arOpt = sarJOptions.get();
 if (! arOpt)
 return JFW_E_ERROR;
@@ -248,6 +248,11 @@ javaFrameworkError jfw_startVM(
 arOpt[index].extraInfo = nullptr;
 ++index;
 
+// Don't intercept SIGTERM
+arOpt[index].optionString = const_cast("-Xrs");
+arOpt[index].extraInfo = nullptr;
+++index;
+
 //add the options set by options dialog
 for (auto const & vmParam : vmParams)
 {


[Libreoffice-commits] core.git: desktop/unx

2022-06-03 Thread Stephan Bergmann (via logerrit)
 desktop/unx/source/start.c |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 9c130462fd9b3515c3c71428bfc109285ed6ea0b
Author: Stephan Bergmann 
AuthorDate: Fri Jun 3 10:25:26 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Jun 3 15:08:19 2022 +0200

Improve some C code mixing size_t and ssize_t

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

diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index a83db69e5c66..f959565665cc 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -471,13 +471,14 @@ static sal_Bool send_args(int fd, rtl_uString const 
*pCwdPath)
 }
 
 nLen = rtl_string_getLength(pOut) + 1;
-bResult = (write(fd, rtl_string_getStr(pOut), nLen) == (ssize_t) nLen);
+ssize_t n = write(fd, rtl_string_getStr(pOut), nLen);
+bResult = (n >= 0 && (size_t) n == nLen);
 
 if ( bResult )
 {
 char resp[SAL_N_ELEMENTS("InternalIPC::ProcessingDone")];
-ssize_t n = read(fd, resp, SAL_N_ELEMENTS(resp));
-bResult = n == (ssize_t) SAL_N_ELEMENTS(resp)
+n = read(fd, resp, SAL_N_ELEMENTS(resp));
+bResult = n == SAL_N_ELEMENTS(resp)
 && (memcmp(
 resp, "InternalIPC::ProcessingDone",
 SAL_N_ELEMENTS(resp))


[Libreoffice-commits] core.git: desktop/unx vcl/headless vcl/unx

2021-12-29 Thread Ismael Luceno (via logerrit)
 desktop/unx/source/start.c   |2 +-
 vcl/headless/svpinst.cxx |2 +-
 vcl/unx/generic/dtrans/X11_selection.cxx |4 
 3 files changed, 2 insertions(+), 6 deletions(-)

New commits:
commit 4242c7b91887236375e08e2b6b24de0cecbf1626
Author: Ismael Luceno 
AuthorDate: Tue Dec 28 23:24:08 2021 +0100
Commit: Jan-Marek Glogowski 
CommitDate: Wed Dec 29 13:05:46 2021 +0100

Always use , no modern system needs 

This was standardized in IEEE 1003.1-2001, so more than 20 years old.

Verified following systems using online resources:
- FreeBSD 3.0 (1998)
- NetBSD 1.3 (1998)
- OpenBSD 2.0 (1996)
- CentOS 5.0 (2007)
- Debian 4.0 (2007)
- IRIX 6.5.30 (2006)
- SunOS 4.1.3 (1992)
- SUSE 10.2 (2008)
- Red Hat 5.0 (1998)

So the check used for BSDs on vcl/unx/generic/dtrans/X11_selection.cxx
was never correct.

On GNU/Linux specifically,  is provided since glibc 2.0 (1997).

musl libc produces the following warning if the non-standard header is
included:

/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect 
#include  to  [-Wcpp]

Change-Id: Ia8f4b9e1ee069f86abe03140c18a77d17336d09c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127666
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index 385761a81230..a83db69e5c66 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -18,7 +18,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index a42b788a8249..181e01782214 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -27,7 +27,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #include 
 #include 
diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx 
b/vcl/unx/generic/dtrans/X11_selection.cxx
index 8d3298aead3a..1c6ec92f1b87 100644
--- a/vcl/unx/generic/dtrans/X11_selection.cxx
+++ b/vcl/unx/generic/dtrans/X11_selection.cxx
@@ -34,11 +34,7 @@
 #include 
 #include 
 
-#if defined(NETBSD) || defined (FREEBSD) || defined(OPENBSD)
-#include 
-#else
 #include 
-#endif
 
 #include 
 


[Libreoffice-commits] core.git: desktop/unx

2021-06-08 Thread Stephan Bergmann (via logerrit)
 desktop/unx/source/file_image_unx.c |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 489102d28e9c67773d72eedfc4e663f51fe331ea
Author: Stephan Bergmann 
AuthorDate: Tue Jun 8 10:04:13 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Jun 8 10:57:29 2021 +0200

Silence -Wunused-but-set-variable (Clang 13 trunk) on volatile variable

(see the comments starting at 
"[Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable" that 
warning
on volatile variables is intentional)

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

diff --git a/desktop/unx/source/file_image_unx.c 
b/desktop/unx/source/file_image_unx.c
index ec229f95ff98..4294a57611aa 100644
--- a/desktop/unx/source/file_image_unx.c
+++ b/desktop/unx/source/file_image_unx.c
@@ -97,6 +97,7 @@ int file_image_pagein (file_image * image)
 c ^= ((volatile const char*)(image->m_base))[idx];
 }
 c ^= ((volatile const char*)(image->m_base))[image->m_size-1];
+(void)c; // silence Clang 13 trunk -Wunused-but-set-variable
 
 return 0;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/unx jvmfwk/plugins

2020-07-02 Thread Stephan Bergmann (via logerrit)
 desktop/unx/source/start.c   |4 +++-
 jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx |1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 269a161b3855fcdfde084bd0d786f212cbdd2af0
Author: Stephan Bergmann 
AuthorDate: Thu Jul 2 13:36:03 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Jul 2 16:52:41 2020 +0200

tdf#129264: Make javaldx always print a line upon successful execution

...where "do not use a JRE" (implying that the printed line consists of 
just a
terminating newline) is a sufficient condition for a successful execution, 
too.

(Also, it appears that extend_library_path in desktop/unx/source/start.c 
would
have introduced unwanted empty segments into the path environment variable 
when
the line printed by javaldx consisted of just a terminating newline.)

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

diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index f95cfe4d1eaa..76f3adcb6e9c 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -700,7 +700,9 @@ static void exec_javaldx(Args *args)
 *chomp = '\0';
 }
 
-extend_library_path(newpath);
+if (newpath[0] != '\0') {
+extend_library_path(newpath);
+}
 
 if (javaldx)
 osl_freeProcessHandle(javaldx);
diff --git a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx 
b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
index f7c295ec1728..3e8acd674626 100644
--- a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
+++ b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx
@@ -59,6 +59,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
 if (errcode == JFW_E_NONE && !bEnabled)
 {
 //Do not do any preparation because that may only slow startup 
time.
+fprintf(stdout, "\n");
 return 0;
 }
 else if (errcode != JFW_E_NONE && errcode != JFW_E_DIRECT_MODE)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/unx uitest/libreoffice

2020-06-08 Thread Stephan Bergmann (via logerrit)
 desktop/unx/source/start.c   |4 +++-
 uitest/libreoffice/connection.py |2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 7b379661e6b99d103411a21b256a38fdc5357961
Author: Stephan Bergmann 
AuthorDate: Mon Jun 8 07:37:21 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Jun 8 08:50:54 2020 +0200

Reliably terminate soffice.bin when terminating soffice

d58a3e5f85d44efc9d21dd56329a3ef20cb3692f "Reliably terminate soffice when
connect throws an exception" had been a partial thinko:  When kill()'ing 
(i.e.,
sending SIGKILL on POSIX) soffice (aka oosplash exec'ed from it), the
soffice.bin forked from it can still keep on running.

So terminate() (i.e., send SIGTERM on POSIX) soffice aka ooslpash, and in 
its
sigterm_handler actually wait for the soffice.bin process.  (Where the 
latter
should just be a saftey measure.  At least on POSIX, osl_terminateProcess as
called from the oosplash sigterm_handler sends a SIGKILL, so should swiftly 
and
reliably kill the soffice.bin process.)

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

diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index e3e5441bf97e..f95cfe4d1eaa 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -718,8 +718,10 @@ static void sigterm_handler(int ignored)
 {
 (void) ignored;
 
-if (g_pProcess)
+if (g_pProcess) {
 osl_terminateProcess(g_pProcess); // forward signal to soffice.bin
+osl_joinProcess(g_pProcess);
+}
 
 _exit(255);
 }
diff --git a/uitest/libreoffice/connection.py b/uitest/libreoffice/connection.py
index 9de92e77312f..68330b47d6cf 100644
--- a/uitest/libreoffice/connection.py
+++ b/uitest/libreoffice/connection.py
@@ -57,7 +57,7 @@ class OfficeConnection:
 success = True
 finally:
 if not success and self.soffice:
-self.soffice.kill()
+self.soffice.terminate()
 self.soffice.wait()
 self.soffice = None
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/unx instsetoo_native/CustomTarget_setup.mk instsetoo_native/util

2017-11-23 Thread heiko tietze
 desktop/unx/source/splashx.c|   19 ---
 instsetoo_native/CustomTarget_setup.mk  |2 ++
 instsetoo_native/util/openoffice.lst.in |2 ++
 3 files changed, 20 insertions(+), 3 deletions(-)

New commits:
commit e27e6720ac1f7bb1e44872a7fd3cca5f3340b16a
Author: heiko tietze 
Date:   Wed Nov 22 19:05:29 2017 +0100

tdf#90794 Position of progress bar on high res screens

Introduced two new consts

Change-Id: I15e01eabe9fd3225c36d06cbb59310a07a30f2c1
Reviewed-on: https://gerrit.libreoffice.org/45105
Reviewed-by: Heiko Tietze 
Tested-by: Heiko Tietze 

diff --git a/desktop/unx/source/splashx.c b/desktop/unx/source/splashx.c
index 6bb98f965a91..8a1064e3673c 100644
--- a/desktop/unx/source/splashx.c
+++ b/desktop/unx/source/splashx.c
@@ -55,6 +55,8 @@ struct splash
 Colormap color_map;
 Window win;
 GC gc;
+//true when intro-highres loaded successfully
+sal_Bool bHasHiDpiImage;
 
 // Progress bar values
 // taken from desktop/source/splash/splash.cxx
@@ -611,12 +613,15 @@ static void splash_load_image( struct splash* splash, 
rtl_uString* pUAppPath )
 goto cleanup; /* success */
 
 /* load high resolution splash image */
+splash->bHasHiDpiImage = sal_False;
 if (isHiDPI(splash))
 {
-/* TODO- change progress bar parameters after getting size of 
intro-highres.png */
 strcpy (pSuffix, "intro-highres" IMG_SUFFIX);
 if ( splash_load_bmp( splash, pBuffer ) )
+{
+splash->bHasHiDpiImage = sal_True;
 goto cleanup; /* success */
+}
 }
 /* load standard resolution splash image */
 strcpy (pSuffix, "intro" IMG_SUFFIX);
@@ -655,8 +660,16 @@ static void splash_load_defaults( struct splash* splash, 
rtl_uString* pAppPath,
 get_bootstrap_value( logo,  1, handle, "Logo" );
 get_bootstrap_value( bar,   3, handle, "ProgressBarColor" );
 get_bootstrap_value( frame, 3, handle, "ProgressFrameColor" );
-get_bootstrap_value( pos,   2, handle, "ProgressPosition" );
-get_bootstrap_value( size,  2, handle, "ProgressSize" );
+if (isHiDPI(splash) && splash->bHasHiDpiImage)
+{
+   get_bootstrap_value( pos,   2, handle, "ProgressPositionHigh" );
+   get_bootstrap_value( size,  2, handle, "ProgressSizeHigh" );
+}
+else
+{
+   get_bootstrap_value( pos,   2, handle, "ProgressPosition" );
+   get_bootstrap_value( size,  2, handle, "ProgressSize" );
+}
 
 if ( logo[0] == 0 )
 {
diff --git a/instsetoo_native/CustomTarget_setup.mk 
b/instsetoo_native/CustomTarget_setup.mk
index ee90c17c31c0..95de9f7202fa 100644
--- a/instsetoo_native/CustomTarget_setup.mk
+++ b/instsetoo_native/CustomTarget_setup.mk
@@ -126,6 +126,8 @@ $(call 
gb_CustomTarget_get_workdir,instsetoo_native/setup)/$(call gb_Helper_get_
&& echo 'ProgressFrameColor=102,102,102' \
&& echo 'ProgressPosition=35,153' \
&& echo 'ProgressSize=444,8' \
+   && echo 'ProgressPositionHigh=46,212' \
+   && echo 'ProgressSizeHigh=617,12' \
&& echo 'ProgressTextBaseline=145' \
&& echo 'ProgressTextColor=255,255,255' \
&& echo 'SecureUserConfig=true' \
diff --git a/instsetoo_native/util/openoffice.lst.in 
b/instsetoo_native/util/openoffice.lst.in
index 442cfca66c54..24bb9761f7f0 100644
--- a/instsetoo_native/util/openoffice.lst.in
+++ b/instsetoo_native/util/openoffice.lst.in
@@ -17,7 +17,9 @@ Globals
 SOLSUREPACKAGEPREFIX libreoffice
 PROGRESSBARCOLOR 0,0,0
 PROGRESSSIZE 444,8
+PROGRESSSIZEHIGH 617,12
 PROGRESSPOSITION 35,153
+PROGRESSPOSITIONHIGH 46,212
 PROGRESSFRAMECOLOR 102,102,102
 PROGRESSTEXTBASELINE 145
 PROGRESSTEXTCOLOR 255,255,255
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/unx

2017-08-29 Thread Chris Sherlock
 desktop/unx/source/start.c |   32 
 1 file changed, 16 insertions(+), 16 deletions(-)

New commits:
commit 9806359e65a4d33fdcfd968914cecfe388217738
Author: Chris Sherlock 
Date:   Tue Aug 29 23:53:04 2017 +1000

revert "convert all sal_Bool to bool in start.c"

Didn't realise this was introduced in a version of C that was later than our
minimum version...

Reverts 59a25f6f82656d34735168036f7c5f923a505ce1

Change-Id: I6b6656f510251e4f3f70e499ff8a7729ee6fcc90

diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index 681fe15e2882..b1c769075075 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -81,7 +81,7 @@ child_info_destroy(ChildInfo *info)
 free (info);
 }
 
-static ChildInfo * child_spawn(Args *args, bool bAllArgs, bool bWithStatus)
+static ChildInfo * child_spawn(Args *args, sal_Bool bAllArgs, sal_Bool 
bWithStatus)
 {
 rtl_uString *pApp = NULL, *pTmp = NULL;
 rtl_uString **ppArgs;
@@ -150,7 +150,7 @@ static ChildInfo * child_spawn(Args *args, bool bAllArgs, 
bool bWithStatus)
 return info;
 }
 
-static bool child_exited_wait(ChildInfo *info, bool bShortWait)
+static sal_Bool child_exited_wait(ChildInfo *info, sal_Bool bShortWait)
 {
 TimeValue t = { 0, 250 /* ms */ * 1000 * 1000 };
 if (!bShortWait)
@@ -405,12 +405,12 @@ static rtl_uString *escape_path(rtl_uString *pToEscape)
 }
 
 /* Send args to the LO instance (using the 'fd' file descriptor) */
-static bool send_args(int fd, rtl_uString *pCwdPath)
+static sal_Bool send_args(int fd, rtl_uString *pCwdPath)
 {
 rtl_uString *pBuffer = NULL, *pTmp = NULL;
 sal_Int32 nCapacity = 1000;
 rtl_String *pOut = NULL;
-bool bResult;
+sal_Bool bResult;
 size_t nLen;
 rtl_uString *pEscapedCwdPath = escape_path(pCwdPath);
 sal_uInt32 nArg = 0;
@@ -727,7 +727,7 @@ void sigterm_handler(int ignored)
 
 SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
 {
-bool bSentArgs = false;
+sal_Bool bSentArgs = sal_False;
 const char* pUsePlugin;
 rtl_uString *pPipePath = NULL;
 Args *args;
@@ -756,12 +756,12 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
 
 #ifndef ENABLE_QUICKSTART_LIBPNG
 /* we can't load and render it anyway */
-args->bInhibitSplash = true;
+args->bInhibitSplash = sal_True;
 #endif
 
 pUsePlugin = getenv("SAL_USE_VCLPLUGIN");
 if (pUsePlugin && !strcmp(pUsePlugin, "svp"))
-args->bInhibitSplash = true;
+args->bInhibitSplash = sal_True;
 
 if (!args->bInhibitPipe && !getenv("LIBO_FLATPAK"))
 {
@@ -793,8 +793,8 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
 /* we have to prepare for, and exec the binary */
 int nPercent = 0;
 ChildInfo *info;
-bool bAllArgs = true;
-bool bShortWait, bRestart;
+sal_Bool bAllArgs = sal_True;
+sal_Bool bShortWait, bRestart;
 
 /* sanity check pieces */
 system_checks();
@@ -815,10 +815,10 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
 
 do
 {
-bRestart = false;
+bRestart = sal_False;
 
 /* fast updates if we have somewhere to update it to */
-bShortWait = splash ? true : false;
+bShortWait = splash ? sal_True : sal_False;
 
 /* Periodically update the splash & the percent according
to what status_fd says, poll quickly only while starting */
@@ -836,7 +836,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
 {
 splash_destroy(splash);
 splash = NULL;
-bShortWait = false;
+bShortWait = sal_False;
 }
 }
 
@@ -846,12 +846,12 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
 switch (status)
 {
 case EXITHELPER_CRASH_WITH_RESTART: // re-start with just 
-env: parameters
-bRestart = true;
-bAllArgs = false;
+bRestart = sal_True;
+bAllArgs = sal_False;
 break;
 case EXITHELPER_NORMAL_RESTART: // re-start with all arguments
-bRestart = true;
-bAllArgs = true;
+bRestart = sal_True;
+bAllArgs = sal_True;
 break;
 default:
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/unx

2017-08-29 Thread Chris Sherlock
 desktop/unx/source/start.c |   86 ++---
 1 file changed, 43 insertions(+), 43 deletions(-)

New commits:
commit 06c3fd26fbb1ab086be938bb3b61794472b80782
Author: Chris Sherlock 
Date:   Tue Aug 29 23:49:41 2017 +1000

revert 36e31c6a6fbbeebd4825f318ebae2ea6c7e6719f

Change-Id: If5039ab54df40f263a947c83fceba4d844467a88

diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index d864e3f4a9fd..681fe15e2882 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -44,7 +44,7 @@
 /* Easier conversions: rtl_uString to rtl_String */
 static rtl_String *ustr_to_str(rtl_uString *pStr)
 {
-rtl_String *pOut = nullptr;
+rtl_String *pOut = NULL;
 
 rtl_uString2String(, rtl_uString_getStr(pStr),
 rtl_uString_getLength(pStr), osl_getThreadTextEncoding(), 
OUSTRING_TO_OSTRING_CVTFLAGS);
@@ -55,7 +55,7 @@ static rtl_String *ustr_to_str(rtl_uString *pStr)
 /* Easier conversions: char * to rtl_uString */
 static rtl_uString *charp_to_ustr(const char *pStr)
 {
-rtl_uString *pOut = nullptr;
+rtl_uString *pOut = NULL;
 
 rtl_string2UString(, pStr, strlen(pStr), osl_getThreadTextEncoding(), 
OSTRING_TO_OUSTRING_CVTFLAGS);
 
@@ -83,7 +83,7 @@ child_info_destroy(ChildInfo *info)
 
 static ChildInfo * child_spawn(Args *args, bool bAllArgs, bool bWithStatus)
 {
-rtl_uString *pApp = nullptr, *pTmp = nullptr;
+rtl_uString *pApp = NULL, *pTmp = NULL;
 rtl_uString **ppArgs;
 sal_uInt32 nArgs, i;
 ChildInfo *info;
@@ -106,7 +106,7 @@ static ChildInfo * child_spawn(Args *args, bool bAllArgs, 
bool bWithStatus)
 rtl_uString_newFromAscii(, "soffice.bin");
 rtl_uString_newConcat(, pApp, pTmp);
 rtl_uString_release(pTmp);
-pTmp = nullptr;
+pTmp = NULL;
 
 /* copy args */
 nArgs = bAllArgs ? args->nArgsTotal : args->nArgsEnv;
@@ -128,9 +128,9 @@ static ChildInfo * child_spawn(Args *args, bool bAllArgs, 
bool bWithStatus)
 /* start the main process */
 nError = osl_executeProcess(pApp, ppArgs, nArgs,
 osl_Process_NORMAL,
-nullptr,
-nullptr,
-nullptr, 0,
+NULL,
+NULL,
+NULL, 0,
 >child );
 
 if (pTmp)
@@ -196,7 +196,7 @@ static rtl_uString *get_app_path(const char *pAppExec)
 len = rtl_uString_getLength(pResult);
 if (len > 0 && rtl_uString_getStr(pResult)[len - 1] != '/')
 {
-rtl_uString *pSlash = nullptr;
+rtl_uString *pSlash = NULL;
 rtl_uString_newFromAscii(, "/");
 rtl_uString_newConcat(, pResult, pSlash);
 rtl_uString_release(pSlash);
@@ -208,26 +208,26 @@ static rtl_uString *get_app_path(const char *pAppExec)
 /* Compute the OOo md5 hash from 'pText' */
 static rtl_uString *get_md5hash(rtl_uString *pText)
 {
-rtl_uString *pResult = nullptr;
+rtl_uString *pResult = NULL;
 sal_Int32 nCapacity = 100;
-unsigned char *pData = nullptr;
+unsigned char *pData = NULL;
 sal_uInt32 nSize = 0;
 rtlDigest digest;
 sal_uInt32 md5_key_len = 0;
-sal_uInt8* md5_buf = nullptr;
+sal_uInt8* md5_buf = NULL;
 sal_uInt32 i = 0;
 
 if ( !pText )
-return nullptr;
+return NULL;
 
 pData = (unsigned char *)rtl_uString_getStr(pText);
 nSize = rtl_uString_getLength(pText) * sizeof(sal_Unicode);
 if (!pData)
-return nullptr;
+return NULL;
 
 digest = rtl_digest_create(rtl_Digest_AlgorithmMD5);
 if (!digest)
-return nullptr;
+return NULL;
 
 md5_key_len = rtl_digest_queryLength(digest);
 md5_buf = (sal_uInt8 *)calloc(md5_key_len, sizeof(sal_uInt8));
@@ -258,10 +258,10 @@ static rtl_uString *get_md5hash(rtl_uString *pText)
 /* Construct the pipe name */
 static rtl_uString *get_pipe_path(rtl_uString *pAppPath)
 {
-rtl_uString *pPath = nullptr, *pTmp = nullptr, *pUserInstallation = 
nullptr;
-rtl_uString *pResult = nullptr, *pBasePath = nullptr, 
*pAbsUserInstallation = nullptr;
+rtl_uString *pPath = NULL, *pTmp = NULL, *pUserInstallation = NULL;
+rtl_uString *pResult = NULL, *pBasePath = NULL, *pAbsUserInstallation = 
NULL;
 rtlBootstrapHandle handle;
-rtl_uString *pMd5hash = nullptr;
+rtl_uString *pMd5hash = NULL;
 sal_Unicode pUnicode[RTL_USTR_MAX_VALUEOFINT32];
 
 /* setup bootstrap filename */
@@ -275,7 +275,7 @@ static rtl_uString *get_pipe_path(rtl_uString *pAppPath)
 handle = rtl_bootstrap_args_open(pPath);
 
 rtl_uString_newFromAscii(, "UserInstallation");
-rtl_bootstrap_get_from_handle(handle, pTmp, , nullptr);
+rtl_bootstrap_get_from_handle(handle, pTmp, , NULL);
 
 rtl_bootstrap_args_close(handle);
 
@@ -367,7 +367,7 @@ static int connect_pipe(rtl_uString *pPipePath)
 /* 

[Libreoffice-commits] core.git: desktop/unx

2017-03-08 Thread David Tardon
 desktop/unx/source/pagein.c |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 01bf741a79241829b0d5c048e8f45e3cf6914d3e
Author: David Tardon 
Date:   Wed Mar 8 10:37:38 2017 +0100

WaE: include needed header

"error: In the GNU C Library, "major" is defined
by . For historical compatibility, it is
currently defined by  as well, but we plan to
remove this soon. To use "major", include 
directly. If you did not intend to use a system-defined macro
"major", you should undefine it after including ."

Change-Id: I7f5741d4c2eae277e316c5fc97aa73b9430fbdc1

diff --git a/desktop/unx/source/pagein.c b/desktop/unx/source/pagein.c
index 56baffa..a401419 100644
--- a/desktop/unx/source/pagein.c
+++ b/desktop/unx/source/pagein.c
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 /* do_pagein */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/unx

2017-01-13 Thread Caolán McNamara
 desktop/unx/source/splashx.c |  182 ++-
 1 file changed, 96 insertions(+), 86 deletions(-)

New commits:
commit ebf541f7c5f080fa3a6f363ec8e823cc37c0c6b2
Author: Caolán McNamara 
Date:   Fri Jan 13 12:43:09 2017 +

refactor this to open the display just once

and use the https://wiki.gnome.org/HowDoI/HiDpi
HiDPI detection rules.

all of this does nothing in practice, cause there is
no hidpi splashscreen image

Change-Id: I609faab0f207d71fd4a17bb54ef688bdd623eaea

diff --git a/desktop/unx/source/splashx.c b/desktop/unx/source/splashx.c
index c474099..43b178b 100644
--- a/desktop/unx/source/splashx.c
+++ b/desktop/unx/source/splashx.c
@@ -43,6 +43,10 @@ struct splash
 Display* display;
 int screen;
 int depth;
+int display_width;
+int display_height;
+int display_x_pos;
+int display_y_pos;
 Visual* visual;
 
 int width;
@@ -388,24 +392,14 @@ static void suppress_decorations(struct splash* splash)
 }
 
 /**
- * Create the window for the splash screen
+ * Connects to the display and initiales splash with the screen details
  *
  * @return Success: 1; Failure: 0
  */
-static int splash_create_window( struct splash* splash, int argc, char** argv )
+static int splash_init_display( struct splash* splash, int argc, char** argv )
 {
 char *display_name = NULL;
 int i;
-Window root_win;
-int display_width = 0;
-int display_height = 0;
-int display_x_pos = 0;
-int display_y_pos = 0;
-unsigned long value_mask = 0;
-XGCValues values;
-const char* name = "LibreOffice";
-const char* icon = "icon"; // FIXME
-XSizeHints size_hints;
 #ifdef USE_XINERAMA
 int n_xinerama_screens = 1;
 XineramaScreenInfo* p_screens = NULL;
@@ -437,9 +431,10 @@ static int splash_create_window( struct splash* splash, 
int argc, char** argv )
 splash->color_map = DefaultColormap( splash->display, splash->screen );
 splash->visual = DefaultVisual( splash->display, splash->screen );
 
-root_win = RootWindow( splash->display, splash->screen );
-display_width = DisplayWidth( splash->display, splash->screen );
-display_height = DisplayHeight( splash->display, splash->screen );
+splash->display_width = DisplayWidth( splash->display, splash->screen );
+splash->display_height = DisplayHeight( splash->display, splash->screen );
+splash->display_x_pos = 0;
+splash->display_y_pos = 0;
 
 #ifdef USE_XINERAMA
 p_screens = XineramaQueryScreens( splash->display, _xinerama_screens );
@@ -449,20 +444,38 @@ static int splash_create_window( struct splash* splash, 
int argc, char** argv )
 {
 if ( p_screens[i].screen_number == splash->screen )
 {
-display_width = p_screens[i].width;
-display_height = p_screens[i].height;
-display_x_pos = p_screens[i].x_org;
-display_y_pos = p_screens[i].y_org;
+splash->display_width = p_screens[i].width;
+splash->display_height = p_screens[i].height;
+splash->display_x_pos = p_screens[i].x_org;
+splash->display_y_pos = p_screens[i].y_org;
 break;
 }
 }
 XFree( p_screens );
 }
 #endif
+return 1;
+}
+
+/**
+ * Create the window for the splash screen
+ *
+ * @return Success: 1; Failure: 0
+ */
+static int splash_create_window(struct splash* splash)
+{
+Window root_win;
+unsigned long value_mask = 0;
+XGCValues values;
+const char* name = "LibreOffice";
+const char* icon = "icon"; // FIXME
+XSizeHints size_hints;
+
+root_win = RootWindow( splash->display, splash->screen );
 
 splash->win = XCreateSimpleWindow( splash->display, root_win,
-(display_x_pos + (display_width - splash->width)/2),
-(display_y_pos + (display_height - splash->height)/2),
+(splash->display_x_pos + (splash->display_width - 
splash->width)/2),
+(splash->display_y_pos + (splash->display_height - 
splash->height)/2),
 splash->width, splash->height, 0,
 BlackPixel( splash->display, splash->screen ), BlackPixel( 
splash->display, splash->screen ) );
 
@@ -481,8 +494,8 @@ static int splash_create_window( struct splash* splash, int 
argc, char** argv )
 splash->gc = XCreateGC( splash->display, splash->win, value_mask,  
);
 
 size_hints.flags = PPosition | PSize | PMinSize | PMaxSize;
-size_hints.x = display_x_pos;
-size_hints.y = display_y_pos;
+size_hints.x = splash->display_x_pos;
+size_hints.y = splash->display_y_pos;
 size_hints.width = splash->width;
 size_hints.height = splash->height;
 size_hints.min_width = splash->width;
@@ -531,29 +544,28 @@ static rtl_String* ustr_to_str( rtl_uString* pStr )
 return pOut;
 }
 
-static sal_Bool getScreenSize(int* display_width, int* display_height)

[Libreoffice-commits] core.git: desktop/unx

2017-01-13 Thread Abhilash Singh
 desktop/unx/source/splashx.c |   49 +++
 desktop/unx/source/splashx.h |1 
 2 files changed, 45 insertions(+), 5 deletions(-)

New commits:
commit f424c8f053797bc9d559865f52822d9cbf33ae3f
Author: Abhilash Singh 
Date:   Wed Dec 14 22:18:44 2016 +0530

tdf#90794 Fix the Linux HiDPI start screen

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

diff --git a/desktop/unx/source/splashx.c b/desktop/unx/source/splashx.c
index d227ff5..c474099 100644
--- a/desktop/unx/source/splashx.c
+++ b/desktop/unx/source/splashx.c
@@ -531,6 +531,32 @@ static rtl_String* ustr_to_str( rtl_uString* pStr )
 return pOut;
 }
 
+static sal_Bool getScreenSize(int* display_width, int* display_height)
+{
+Display* bDisplay = NULL;
+Screen* bScreen = NULL;
+
+bDisplay = XOpenDisplay( NULL );
+if ( !bDisplay )
+{
+fprintf( stderr, "Failed to open default display.\n" );
+return sal_False;
+}
+
+bScreen = DefaultScreenOfDisplay( bDisplay );
+if ( !bScreen )
+{
+fprintf( stderr, "Failed to obtain the default screen of given 
display.\n" );
+return sal_False;
+}
+
+*display_width = bScreen->width;
+*display_height = bScreen->height;
+
+XCloseDisplay( bDisplay );
+return sal_True;
+}
+
 #define IMG_SUFFIX   ".png"
 
 static void splash_load_image( struct splash* splash, rtl_uString* pUAppPath )
@@ -540,7 +566,7 @@ static void splash_load_image( struct splash* splash, 
rtl_uString* pUAppPath )
  * now the splash screen will have to get along with language-territory. */
 
 char *pBuffer, *pSuffix, *pLocale;
-int nLocSize;
+int nLocSize, display_width, display_height;
 rtl_Locale *pLoc = NULL;
 rtl_String *pLang, *pCountry, *pAppPath;
 
@@ -570,9 +596,24 @@ static void splash_load_image( struct splash* splash, 
rtl_uString* pUAppPath )
 if ( splash_load_bmp( splash, pBuffer ) )
 goto cleanup;
 
-strcpy (pSuffix, "intro" IMG_SUFFIX);
-if ( splash_load_bmp( splash, pBuffer ) )
-goto cleanup;
+if ( getScreenSize( _width, _height ) == sal_True )
+{
+//load high resolution splash image
+if ( display_width > 1920 && display_height > 1024 ) // suggest better 
display size limits?
+{
+//TODO- change progress bar parameters after getting size of 
intro-highres.png
+strcpy (pSuffix, "intro-highres" IMG_SUFFIX);
+if ( splash_load_bmp( splash, pBuffer ) )
+goto cleanup;
+}
+//load low resolution splash image
+else
+{
+strcpy (pSuffix, "intro" IMG_SUFFIX);
+if ( splash_load_bmp( splash, pBuffer ) )
+goto cleanup;
+}
+}
 
 fprintf (stderr, "Failed to find intro image\n");
 
diff --git a/desktop/unx/source/splashx.h b/desktop/unx/source/splashx.h
index a74be00..4e9c72c 100644
--- a/desktop/unx/source/splashx.h
+++ b/desktop/unx/source/splashx.h
@@ -9,7 +9,6 @@
 #ifndef INCLUDED_DESKTOP_UNX_SOURCE_SPLASHX_H
 #define INCLUDED_DESKTOP_UNX_SOURCE_SPLASHX_H
 
-
 #include 
 
 #ifdef __cplusplus
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/unx

2016-05-02 Thread Stephan Bergmann
 desktop/unx/source/pagein.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 74a1b26ffb576205bbdc5e94aeb503306eb6aabc
Author: Stephan Bergmann 
Date:   Mon May 2 08:21:56 2016 +0200

-Werror,-Wlogical-not-parentheses

Change-Id: I0ed6445964523b17ca5635d4d26cd429ff60c294

diff --git a/desktop/unx/source/pagein.c b/desktop/unx/source/pagein.c
index 03b26dc..181637f 100644
--- a/desktop/unx/source/pagein.c
+++ b/desktop/unx/source/pagein.c
@@ -52,7 +52,7 @@ int isRotational(char const * path)
 struct stat out;
 int major, minor;
 char type;
-if( !stat( path ,  ) == 0)
+if(stat( path ,  ) == -1)
 return 1;
 major = major(out.st_dev);
 minor = 0; /* minor(out.st_dev); only the device itself has a queue */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/unx

2016-05-01 Thread Nurhak ALTIN
 desktop/unx/source/pagein.c |   29 +
 1 file changed, 29 insertions(+)

New commits:
commit a42169cdae80f88e1c4b52c333e928d239d917f5
Author: Nurhak ALTIN 
Date:   Sun May 1 10:45:30 2016 +0300

tdf#99311 Detect SSDs in pagein

Avoid doing the pagein work if we can detect a non-rotational disk.

Change-Id: I1ce11050d7ed2a805568343cd385f2612d7c8939
Reviewed-on: https://gerrit.libreoffice.org/24560
Tested-by: Jenkins 
Reviewed-by: Michael Meeks 

diff --git a/desktop/unx/source/pagein.c b/desktop/unx/source/pagein.c
index 7db52d8..03b26dc 100644
--- a/desktop/unx/source/pagein.c
+++ b/desktop/unx/source/pagein.c
@@ -24,6 +24,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 /* do_pagein */
 static void do_pagein (const char * filename)
@@ -42,11 +44,38 @@ static void do_pagein (const char * filename)
 file_image_close ();
 }
 
+int isRotational(char const * path)
+{
+#ifdef LINUX
+FILE * fp = NULL;
+char fullpath[4096];
+struct stat out;
+int major, minor;
+char type;
+if( !stat( path ,  ) == 0)
+return 1;
+major = major(out.st_dev);
+minor = 0; /* minor(out.st_dev); only the device itself has a queue */
+sprintf(fullpath,"/sys/dev/block/%d:%d/queue/rotational",major,minor);
+if ((fp = fopen (fullpath, "r")))
+{
+if (fgets(, 1, fp))
+{
+fclose(fp);
+return type == '1';
+}
+}
+#endif
+return 1;
+}
+
 void pagein_execute(char const * path, char const * file)
 {
 char fullpath[4096];
 char *p = NULL;
 FILE   * fp = NULL;
+if(!isRotational(path))
+return;
 memset(fullpath, 0, sizeof(fullpath));
 strncpy (fullpath, path, 3000);
 if (!(p = strrchr (fullpath, '/')))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/unx

2016-04-07 Thread Bjoern Michaelsen
 desktop/unx/source/file_image_unx.c |   30 +++---
 1 file changed, 11 insertions(+), 19 deletions(-)

New commits:
commit 71aa80300c89c726254049f775d1c48518b6dfe4
Author: Bjoern Michaelsen 
Date:   Thu Apr 7 01:32:05 2016 +0200

refactor pagein, as it still seems to cause rare crashes

Change-Id: I51e6cdf79c19c3709e00dc10175527ec6583a758
Reviewed-on: https://gerrit.libreoffice.org/23872
Tested-by: Jenkins 
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/desktop/unx/source/file_image_unx.c 
b/desktop/unx/source/file_image_unx.c
index 522c491..ec229f9 100644
--- a/desktop/unx/source/file_image_unx.c
+++ b/desktop/unx/source/file_image_unx.c
@@ -74,37 +74,29 @@ cleanup_and_leave:
  */
 int file_image_pagein (file_image * image)
 {
-file_imagew;
-long  s;
-size_tk;
-// force touching of each page despite the optimizer
+long s = -1;
 volatile char c =0;
+size_t idx;
 
 if (image == NULL)
 return EINVAL;
-
-if ((w.m_base = image->m_base) == NULL)
+if (image->m_base == NULL)
 return EINVAL;
-if ((w.m_size = image->m_size) == 0)
+if (image->m_size == 0)
 return 0;
 
-if (madvise (w.m_base, w.m_size, MADV_WILLNEED) == -1)
+if (madvise (image->m_base, image->m_size, MADV_WILLNEED) == -1)
 return errno;
 
-if ((s = sysconf (_SC_PAGESIZE)) == -1)
+s = sysconf (_SC_PAGESIZE);
+if (s == -1)
 s = 0x1000;
-
-k = (size_t)(s);
-while (w.m_size > k)
-{
-c ^= ((char*)(w.m_base))[0];
-w.m_base  = (char*)(w.m_base) + k;
-w.m_size -= k;
-}
-if (w.m_size > 0)
+// force touching of each page despite the optimizer
+for(idx = 0; idx < image->m_size; idx += (size_t)s)
 {
-c ^= ((char*)(w.m_base))[0];
+c ^= ((volatile const char*)(image->m_base))[idx];
 }
+c ^= ((volatile const char*)(image->m_base))[image->m_size-1];
 
 return 0;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/unx

2016-03-21 Thread Stephan Bergmann
 desktop/unx/source/start.c |   37 -
 1 file changed, 37 deletions(-)

New commits:
commit 3d952e795a2101d2bfd2c0dcd6047049c38e6f54
Author: Stephan Bergmann 
Date:   Mon Mar 21 17:38:35 2016 +0100

No, I don't want to see that "bootstap" typo on every start of soffice

Silly of 221144f9c995fe30adf577c02f756b3123fb2550 "tdf#91794 
OSL_DEBUG_LEVEL > 1
removed (desktop)" to make that output conditional on just 
OSL_DEBUG_LEVEL>0.
Can't use sal/log.hxx here, and demand for this debug output is probably 
rare to
non-existant, so just remove it.

Change-Id: Ie8c7846f785c7875375af215934c71ff28085458

diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index c867bf3..a988fc8 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -64,21 +64,6 @@ charp_to_ustr( const char *pStr )
 return pOut;
 }
 
-/* Easier debugging of rtl_uString values. */
-#if OSL_DEBUG_LEVEL > 0
-static void ustr_debug( const char *pMessage, rtl_uString *pStr )
-{
-rtl_String *pOut = ustr_to_str( pStr );
-
-fprintf( stderr, "%s: %s\n", pMessage, rtl_string_getStr( pOut ) );
-
-rtl_string_release( pOut );
-return;
-}
-#else
-#define ustr_debug(a, b) {}
-#endif
-
 typedef struct {
 intstatus_fd;
 oslProcess child;
@@ -158,7 +143,6 @@ child_spawn ( Args *args, sal_Bool bAllArgs, sal_Bool 
bWithStatus )
 if ( nError != osl_Process_E_None )
 {
 fprintf( stderr, "ERROR %d forking process\n", nError );
-ustr_debug( "", pApp );
 rtl_uString_release( pApp );
 _exit (1);
 }
@@ -236,19 +220,10 @@ get_md5hash( rtl_uString *pText )
 sal_uInt32 md5_key_len = 0;
 sal_uInt8* md5_buf = NULL;
 sal_uInt32 i = 0;
-#if OSL_DEBUG_LEVEL > 0
-rtl_String *pOut;
-#endif
 
 if ( !pText )
 return NULL;
 
-#if OSL_DEBUG_LEVEL > 0
-pOut = ustr_to_str( pText );
-fprintf (stderr, "Generate pipe md5 for '%s'\n", pOut->buffer);
-rtl_string_release( pOut );
-#endif
-
 pData = (unsigned char *)rtl_uString_getStr( pText );
 nSize = rtl_uString_getLength( pText ) * sizeof( sal_Unicode );
 if ( !pData )
@@ -301,8 +276,6 @@ get_pipe_path( rtl_uString *pAppPath )
 rtl_uString_newFromAscii( , SAL_CONFIGFILE( "bootstrap" ) );
 rtl_uString_newConcat( , pPath, pTmp );
 
-ustr_debug( "bootstap", pPath );
-
 /* read userinstallation value */
 handle = rtl_bootstrap_args_open( pPath );
 
@@ -317,7 +290,6 @@ get_pipe_path( rtl_uString *pAppPath )
 rtl_uString_newFromString (, pUserInstallation);
 
 /* create the pipe name */
-ustr_debug( "user installation", pAbsUserInstallation );
 pMd5hash = get_md5hash( pAbsUserInstallation );
 if ( !pMd5hash )
 rtl_uString_new(  );
@@ -344,8 +316,6 @@ get_pipe_path( rtl_uString *pAppPath )
 
 rtl_uString_newConcat( , pResult, pMd5hash );
 
-ustr_debug( "result", pResult );
-
 /* cleanup */
 rtl_uString_release( pMd5hash );
 rtl_uString_release( pPath );
@@ -493,8 +463,6 @@ send_args( int fd, rtl_uString *pCwdPath )
 rtl_uString_release( pEscapedTmp );
 }
 
-ustr_debug( "Pass args", pBuffer );
-
 if ( !rtl_convertUStringToString(
  , rtl_uString_getStr( pBuffer ),
  rtl_uString_getLength( pBuffer ), RTL_TEXTENCODING_UTF8,
@@ -779,7 +747,6 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv )
 fprintf( stderr, "ERROR: Can't read app link\n" );
 exit( 1 );
 }
-ustr_debug( "App path", args->pAppPath );
 
 #ifndef ENABLE_QUICKSTART_LIBPNG
 /* we can't load and render it anyway */
@@ -813,10 +780,6 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv )
 
 close( fd );
 }
-#if OSL_DEBUG_LEVEL > 0
-else
-ustr_debug( "Failed to connect to pipe", pPipePath );
-#endif
 }
 
 if ( !bSentArgs )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-02 Thread Hank Leininger
 desktop/unx/source/start.c |9 +++--
 sal/osl/unx/pipe.cxx   |4 ++--
 2 files changed, 9 insertions(+), 4 deletions(-)

New commits:
commit 87c011134031374cf9104ec2fc39ef121d8a6802
Author: Hank Leininger 
Date:   Fri Feb 26 20:23:03 2016 -0500

tdf#98210 do not require R_OK for pipe dir

Also better error handling if pipe dirs are really not usable.

Change-Id: I1c865b9a9f1f08d2cffd07343494feca585ec75e
Reviewed-on: https://gerrit.libreoffice.org/22727
Tested-by: Jenkins 
Reviewed-by: jan iversen 

diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index 525fe22..b072f0f 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -323,10 +323,15 @@ get_pipe_path( rtl_uString *pAppPath )
 if ( !pMd5hash )
 rtl_uString_new(  );
 
-if ( access( PIPEDEFAULTPATH, R_OK|W_OK ) == 0 )
+if ( access( PIPEDEFAULTPATH, W_OK ) == 0 )
 rtl_uString_newFromAscii( , PIPEDEFAULTPATH );
-else
+else if ( access( PIPEALTERNATEPATH, W_OK ) == 0 )
 rtl_uString_newFromAscii( , PIPEALTERNATEPATH );
+else
+{
+fprintf( stderr, "ERROR: no valid pipe path found.\n" );
+exit( 1 );
+}
 
 rtl_uString_newFromAscii( , "/OSL_PIPE_" );
 rtl_uString_newConcat( , pResult, pTmp );
diff --git a/sal/osl/unx/pipe.cxx b/sal/osl/unx/pipe.cxx
index 9321395..37ac7ec 100644
--- a/sal/osl/unx/pipe.cxx
+++ b/sal/osl/unx/pipe.cxx
@@ -166,11 +166,11 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char 
*pszPipeName, oslPipeOptions
 bool bNameTooLong = false;
 oslPipe  pPipe;
 
-if (access(PIPEDEFAULTPATH, R_OK|W_OK) == 0)
+if (access(PIPEDEFAULTPATH, W_OK) == 0)
 {
 strncpy(name, PIPEDEFAULTPATH, sizeof(name));
 }
-else if (access(PIPEALTERNATEPATH, R_OK|W_OK) == 0)
+else if (access(PIPEALTERNATEPATH, W_OK) == 0)
 {
 strncpy(name, PIPEALTERNATEPATH, sizeof(name));
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/unx

2016-01-19 Thread Stephan Bergmann
 desktop/unx/source/splashx.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ef219e719116fd02030503d4711b22894b9208c9
Author: Stephan Bergmann 
Date:   Tue Jan 19 10:43:55 2016 +0100

-Werror=strict-aliasing (GCC 6)

Change-Id: I080315852db2f6e852f63f3965a2b7bf91529168

diff --git a/desktop/unx/source/splashx.c b/desktop/unx/source/splashx.c
index e26c530..d10ee89 100644
--- a/desktop/unx/source/splashx.c
+++ b/desktop/unx/source/splashx.c
@@ -304,7 +304,7 @@ static void create_pixmap(struct splash* splash)
 else if ( bpp == 24 )
 {
 if ( machine_byte_order == byte_order && byte_order == LSBFirst )
-COPY_IN_OUT( 3, *( (color_t *)out ) = *( (color_t *)(  ) 
); out += 3; )
+COPY_IN_OUT( 3, memcpy(out, , sizeof (color_t)); out += 
3; )
 else if ( machine_byte_order == byte_order && byte_order == 
MSBFirst )
 COPY_IN_OUT( 3, tmp = pixel;
  *( (uint8_t *)out ) = *( (uint8_t *)() + 
1 );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/unx

2015-10-07 Thread Julien Nabet
 desktop/unx/source/splashx.c |4 
 1 file changed, 4 insertions(+)

New commits:
commit a614568c4356fe37ba132972e6f3649d606e2c9a
Author: Julien Nabet 
Date:   Tue Oct 6 22:27:00 2015 +0200

tdf#94829: Splash screen sets invalid XSizeHints

Change-Id: I70b86624b4d34eb6cb8f2efee0305539f6689335
Reviewed-on: https://gerrit.libreoffice.org/19219
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 

diff --git a/desktop/unx/source/splashx.c b/desktop/unx/source/splashx.c
index 44e6b8c..ce57afe 100644
--- a/desktop/unx/source/splashx.c
+++ b/desktop/unx/source/splashx.c
@@ -481,6 +481,10 @@ static int splash_create_window( struct splash* splash, 
int argc, char** argv )
 splash->gc = XCreateGC( splash->display, splash->win, value_mask,  
);
 
 size_hints.flags = PPosition | PSize | PMinSize | PMaxSize;
+size_hints.x = display_x_pos;
+size_hints.y = display_y_pos;
+size_hints.width = splash->width;
+size_hints.height = splash->height;
 size_hints.min_width = splash->width;
 size_hints.max_width = splash->width;
 size_hints.min_height = splash->height;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/unx

2015-10-05 Thread Arnaud Versini
 desktop/unx/source/start.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 2c96382b324bce348853dac5631daf680d739f98
Author: Arnaud Versini 
Date:   Sun Oct 4 11:42:20 2015 +0200

Add new line after error message during startup

Change-Id: Ieaf81a3b9491141805722ea60c6a8ddfe94ecda3
Reviewed-on: https://gerrit.libreoffice.org/19120
Tested-by: Jenkins 
Reviewed-by: David Tardon 

diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index b9aa828..8803909 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -158,7 +158,7 @@ child_spawn ( Args *args, sal_Bool bAllArgs, sal_Bool 
bWithStatus )
 
 if ( nError != osl_Process_E_None )
 {
-fprintf( stderr, "ERROR %d forking process", nError );
+fprintf( stderr, "ERROR %d forking process\n", nError );
 ustr_debug( "", pApp );
 rtl_uString_release( pApp );
 _exit (1);
@@ -497,7 +497,7 @@ send_args( int fd, rtl_uString *pCwdPath )
  ( RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR
| RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR ) ) )
 {
-fprintf( stderr, "ERROR: cannot convert arguments to UTF-8" );
+fprintf( stderr, "ERROR: cannot convert arguments to UTF-8\n" );
 exit( 1 );
 }
 
@@ -594,7 +594,7 @@ system_checks( void )
 /* check proc is mounted - lots of things fail otherwise */
 if ( stat( "/proc/version",  ) != 0 )
 {
-fprintf( stderr, "ERROR: /proc not mounted - LibreOffice is unlikely 
to work well if at all" );
+fprintf( stderr, "ERROR: /proc not mounted - LibreOffice is unlikely 
to work well if at all\n" );
 exit( 1 );
 }
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/unx rsc/source

2015-03-26 Thread Varun
 desktop/unx/source/file_image_unx.c |2 +-
 rsc/source/rscpp/cpp6.c |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 69c2825708d1e78225ad2f515b792734443d8247
Author: Varun varun.dh...@studentpartner.com
Date:   Sat Mar 7 16:41:40 2015 +0530

tdf#39440 cppcheck cleanliness, Fixing basic cpp errors

Initialized a non-initialized integer variable which is widely used in if 
else

Change-Id: Ibd99c0baa4cd3d4d409310a9a70dc7b421f6a8b2
Reviewed-on: https://gerrit.libreoffice.org/14780
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/desktop/unx/source/file_image_unx.c 
b/desktop/unx/source/file_image_unx.c
index eb3c0d5..fb67778 100644
--- a/desktop/unx/source/file_image_unx.c
+++ b/desktop/unx/source/file_image_unx.c
@@ -76,7 +76,7 @@ int file_image_pagein (file_image * image)
 long  s;
 size_tk;
 // force touching of each page despite the optimizer
-volatile char c = 0;
+volatile char c =0;
 
 if (image == 0)
 return EINVAL;
diff --git a/rsc/source/rscpp/cpp6.c b/rsc/source/rscpp/cpp6.c
index b94c81f..74340dd 100644
--- a/rsc/source/rscpp/cpp6.c
+++ b/rsc/source/rscpp/cpp6.c
@@ -584,7 +584,7 @@ DEFBUF* defendel(char* name, int delete)
 DEFBUF** prevp;
 char* np;
 int nhash;
-int temp;
+int temp=0;
 int size;
 
 for (nhash = 0, np = name; *np != EOS;)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/unx

2015-03-16 Thread Michaël Lefèvre
 desktop/unx/source/args.c |   33 -
 1 file changed, 16 insertions(+), 17 deletions(-)

New commits:
commit 81886532bf6cfce93f3d7fdd73150d9dd1abbcfb
Author: Michaël Lefèvre lefevr...@yahoo.fr
Date:   Fri Mar 13 16:15:01 2015 +0100

CppCheck cleaning : remove unused struct member

Change-Id: I07ebb82b71d6019a35b7cd2757464dab269d2098
Reviewed-on: https://gerrit.libreoffice.org/14855
Tested-by: Jenkins c...@libreoffice.org
Reviewed-by: Noel Grandin noelgran...@gmail.com

diff --git a/desktop/unx/source/args.c b/desktop/unx/source/args.c
index f4c75d5..34d3064 100644
--- a/desktop/unx/source/args.c
+++ b/desktop/unx/source/args.c
@@ -21,7 +21,6 @@ is_env_arg (rtl_uString *str)
 
 static struct {
 const char   *name;
-unsigned int  bTwoArgs : 1;
 unsigned int  bInhibitSplash : 1;
 unsigned int  bInhibitPagein : 1;
 unsigned int  bInhibitJavaLdx : 1;
@@ -29,31 +28,31 @@ static struct {
 const char   *pPageinType;
 } pArgDescr[] = {
 /* have a trailing argument */
-{ pt, 1, 0, 0, 0, 0, NULL },
-{ display,1, 0, 0, 0, 0, NULL },
+{ pt, 0, 0, 0, 0, NULL },
+{ display,0, 0, 0, 0, NULL },
 
 /* no splash */
-{ nologo, 0, 1, 0, 0, 0, NULL },
-{ headless,   0, 1, 0, 0, 0, NULL },
-{ invisible,  0, 1, 0, 0, 0, NULL },
-{ quickstart, 0, 1, 0, 0, 0, NULL },
-{ minimized,  0, 1, 0, 0, 0, NULL },
-{ convert-to,  0, 1, 0, 0, 0, NULL },
+{ nologo, 1, 0, 0, 0, NULL },
+{ headless,   1, 0, 0, 0, NULL },
+{ invisible,  1, 0, 0, 0, NULL },
+{ quickstart, 1, 0, 0, 0, NULL },
+{ minimized,  1, 0, 0, 0, NULL },
+{ convert-to, 1, 0, 0, 0, NULL },
 
 /* pagein bits */
-{ writer, 0, 0, 0, 0, 0, pagein-writer  },
-{ calc,   0, 0, 0, 0, 0, pagein-calc},
-{ draw,   0, 0, 0, 0, 0, pagein-draw},
-{ impress,0, 0, 0, 0, 0, pagein-impress },
+{ writer, 0, 0, 0, 0, pagein-writer  },
+{ calc,   0, 0, 0, 0, pagein-calc},
+{ draw,   0, 0, 0, 0, pagein-draw},
+{ impress,0, 0, 0, 0, pagein-impress },
 
 /* Do not send --help/--version over the pipe, as their output shall go to
the calling process's stdout (ideally, this would also happen in the
presence of unknown options); also prevent splash/pagein/javaldx 
overhead
(as these options will be processed early in soffice_main): */
-{ version,0, 1, 1, 1, 1, NULL },
-{ help,   0, 1, 1, 1, 1, NULL },
-{ h,  0, 1, 1, 1, 1, NULL },
-{ ?,  0, 1, 1, 1, 1, NULL },
+{ version,1, 1, 1, 1, NULL },
+{ help,   1, 1, 1, 1, NULL },
+{ h,  1, 1, 1, 1, NULL },
+{ ?,  1, 1, 1, 1, NULL },
 };
 
 Args *args_parse (void)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/unx

2015-01-01 Thread Miklos Vajna
 desktop/unx/source/args.c |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 58f48448cfb24bd6baa95a8e09e9739fcd3cb485
Author: Miklos Vajna vmik...@collabora.co.uk
Date:   Thu Jan 1 13:39:14 2015 +0100

desktop: adapt pArgDescr to CommandLineArgs::ParseCommandLine_Impl()

Commit fe5527f1c6dc259af464a0593e86a2da2983b7ed (desktop, sysui: let
--convert-to imply --headless, 2014-12-22) changed
CommandLineArgs::ParseCommandLine_Impl(), so that --convert-to implies
--headless. However, that worked only when ./soffice.bin was launched;
when the ./soffice wrapper started oosplash, then a logo was still
shown, as oosplash has its own list of switches that disable the splash
screen.

Fix the inconsistency by adding convert-to to oosplash's list as well.

Change-Id: I47e30db3b658f179f10e8a447b5d7cea083fcc60

diff --git a/desktop/unx/source/args.c b/desktop/unx/source/args.c
index 77fe3d8..f4c75d5 100644
--- a/desktop/unx/source/args.c
+++ b/desktop/unx/source/args.c
@@ -38,6 +38,7 @@ static struct {
 { invisible,  0, 1, 0, 0, 0, NULL },
 { quickstart, 0, 1, 0, 0, 0, NULL },
 { minimized,  0, 1, 0, 0, 0, NULL },
+{ convert-to,  0, 1, 0, 0, 0, NULL },
 
 /* pagein bits */
 { writer, 0, 0, 0, 0, 0, pagein-writer  },
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/unx

2014-12-02 Thread Stephan Bergmann
 desktop/unx/source/splashx.c |   12 ++--
 1 file changed, 2 insertions(+), 10 deletions(-)

New commits:
commit eaddcb8a517d6f39ca8036e9e021e40f88c7d98c
Author: Stephan Bergmann sberg...@redhat.com
Date:   Tue Dec 2 21:37:24 2014 +0100

Use OSL_LIT/BIGENDIAN

...one of which is guaranteed to be defined

Change-Id: Icb02826f8da03ad0d605ec11f07bf60f30d1a3d0

diff --git a/desktop/unx/source/splashx.c b/desktop/unx/source/splashx.c
index a300a02..db9e01e 100644
--- a/desktop/unx/source/splashx.c
+++ b/desktop/unx/source/splashx.c
@@ -243,18 +243,10 @@ static void create_pixmap(struct splash* splash)
 int bytes_per_line = image-bytes_per_line;
 int bpp = image-bits_per_pixel;
 int byte_order = image-byte_order;
-#if defined( _LITTLE_ENDIAN )
+#if defined OSL_LITENDIAN
 int machine_byte_order = LSBFirst;
-#elif defined( _BIG_ENDIAN )
+#else /* OSL_BIGENDIAN */
 int machine_byte_order = MSBFirst;
-#else
-{
-fprintf( stderr, Unsupported machine endianity.\n );
-XFreeGC( splash-display, pixmap_gc );
-XFreePixmap( splash-display, pixmap );
-XDestroyImage( image );
-return;
-}
 #endif
 
 char *data = malloc( splash-height * bytes_per_line );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/unx

2013-10-17 Thread Samuel Mehrbrodt
 desktop/unx/source/splashx.c |   23 +++
 1 file changed, 15 insertions(+), 8 deletions(-)

New commits:
commit 5d4558da5f4b5ee61589fd2b9acaf4eff9b515f5
Author: Samuel Mehrbrodt s.mehrbr...@gmail.com
Date:   Thu Oct 3 14:51:58 2013 +0200

fdo#58982 Center the splash screen in dual-monitor setup

The problem was that the position of the screen was not considered.

Change-Id: I1b2feb916952a4175bfff0675a884477407a702c
Reviewed-on: https://gerrit.libreoffice.org/6119
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/desktop/unx/source/splashx.c b/desktop/unx/source/splashx.c
index a154a06..24b2152 100644
--- a/desktop/unx/source/splashx.c
+++ b/desktop/unx/source/splashx.c
@@ -425,8 +425,11 @@ static void suppress_decorations(struct splash* splash)
 suppress_decorations_motif(splash); // FIXME: Unconditional until 
Metacity/compiz's SPLASH handling is fixed
 }
 
-// Create the window
-// Return: 1 - success, 0 - failure
+/**
+ * Create the window for the splash screen
+ *
+ * @return Success: 1; Failure: 0
+ */
 static int splash_create_window( struct splash* splash, int argc, char** argv )
 {
 char *display_name = NULL;
@@ -434,6 +437,8 @@ static int splash_create_window( struct splash* splash, int 
argc, char** argv )
 Window root_win;
 int display_width = 0;
 int display_height = 0;
+int display_x_pos = 0;
+int display_y_pos = 0;
 unsigned long value_mask = 0;
 XGCValues values;
 const char* name = LibreOffice;
@@ -478,13 +483,14 @@ static int splash_create_window( struct splash* splash, 
int argc, char** argv )
 p_screens = XineramaQueryScreens( splash-display, n_xinerama_screens );
 if( p_screens )
 {
-int j = 0;
-for( ; j  n_xinerama_screens; j++ )
+for( i=0; i  n_xinerama_screens; i++ )
 {
-if ( p_screens[j].screen_number == splash-screen )
+if ( p_screens[i].screen_number == splash-screen )
 {
-display_width = p_screens[j].width;
-display_height = p_screens[j].height;
+display_width = p_screens[i].width;
+display_height = p_screens[i].height;
+display_x_pos = p_screens[i].x_org;
+display_y_pos = p_screens[i].y_org;
 break;
 }
 }
@@ -493,7 +499,8 @@ static int splash_create_window( struct splash* splash, int 
argc, char** argv )
 #endif
 
 splash-win = XCreateSimpleWindow( splash-display, root_win,
-( display_width - splash-width ) / 2, ( display_height - 
splash-height ) / 2,
+(display_x_pos + (display_width - splash-width)/2),
+(display_y_pos + (display_height - splash-height)/2),
 splash-width, splash-height, 0,
 BlackPixel( splash-display, splash-screen ), BlackPixel( 
splash-display, splash-screen ) );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/unx

2013-09-09 Thread Tor Lillqvist
 desktop/unx/source/start.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit c4bfd42c3c4bbff2704b56013af5e0603eec5364
Author: Tor Lillqvist t...@collabora.com
Date:   Mon Sep 9 11:33:09 2013 +0300

Be less verbose in a plain debug build

Change-Id: Ieffdf077372f56016fa735ce0266c9e6e6a1fe1d

diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index 645cae68..77464b1 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -907,7 +907,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv )
 #endif
 }
 
-#if OSL_DEBUG_LEVEL  0
+#if OSL_DEBUG_LEVEL  1
 fprintf (stderr, Exited with code '%d'\n, child_get_exit_code 
(info));
 #endif
 
@@ -915,14 +915,14 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv )
 g_pProcess = 0; // reset
 switch (status) {
 case EXITHELPER_CRASH_WITH_RESTART: // re-start with just -env: 
parameters
-#if OSL_DEBUG_LEVEL  0
+#if OSL_DEBUG_LEVEL  1
 fprintf (stderr, oosplash: re-start with just -env: params 
!\n);
 #endif
 bRestart = sal_True;
 bAllArgs = sal_False;
 break;
 case EXITHELPER_NORMAL_RESTART: // re-start with all arguments
-#if OSL_DEBUG_LEVEL  0
+#if OSL_DEBUG_LEVEL  1
 fprintf (stderr, oosplash: re-start with all params !\n);
 #endif
 bRestart = sal_True;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/unx

2013-05-14 Thread Norbert Thiebaud
 desktop/unx/source/start.c |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit e5b2edfb93adcd65b00eaa0eb8b5cfa6760e7034
Author: Norbert Thiebaud nthieb...@gmail.com
Date:   Tue May 14 04:48:49 2013 -0500

coverity#982969 Resource leak

Change-Id: Iabf637be4b704de4165c5cefb6a19687a1b5637a
Reviewed-on: https://gerrit.libreoffice.org/3902
Reviewed-by: Bosdonnat Cedric cedric.bosdon...@free.fr
Tested-by: Bosdonnat Cedric cedric.bosdon...@free.fr

diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index 040110e..a488f95 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -380,8 +380,10 @@ connect_pipe( rtl_uString *pPipePath )
 #endif
 
 if ( connect( fd, (struct sockaddr *)addr, len )  0 )
-return -1;
-
+{
+close(fd);
+fd = -1;
+}
 return fd;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/unx

2013-03-27 Thread Thomas Arnhold
 desktop/unx/source/splashx.c |   12 
 1 file changed, 12 deletions(-)

New commits:
commit 71907bb06ae6fc3c0ea1485b6ed0efaed196a57a
Author: Thomas Arnhold tho...@arnhold.org
Date:   Wed Mar 27 11:49:40 2013 +0100

-Wunused-macros

Change-Id: Ia147a72a4bbd5cec45a2a74b721a81ff8c4340c2

diff --git a/desktop/unx/source/splashx.c b/desktop/unx/source/splashx.c
index 2a5f654..339218c 100644
--- a/desktop/unx/source/splashx.c
+++ b/desktop/unx/source/splashx.c
@@ -99,18 +99,6 @@ struct splash
 #define PROGRESS_YOFFSET 18
 #define PROGRESS_BARSPACE 2
 
-#define UINT8( x )  ( (unsigned int)( ( (uint8_t *)( x ) )[0] ) )
-
-#define UINT16( x ) (   ( (unsigned int)( ( (uint8_t *)( x ) )[0] ) ) + \
-  ( ( (unsigned int)( ( (uint8_t *)( x ) )[1] ) )  8 ) )
-
-#define UINT32( x ) (   ( (unsigned int)( ( (uint8_t *)( x ) )[0] ) ) + \
-  ( ( (unsigned int)( ( (uint8_t *)( x ) )[1] ) )  8  ) 
+ \
-  ( ( (unsigned int)( ( (uint8_t *)( x ) )[2] ) )  16 ) 
+ \
-  ( ( (unsigned int)( ( (uint8_t *)( x ) )[3] ) )  24 ) )
-
-#define MAX( x, y ) ( ( (x)  (y) )? (x): (y) )
-
 /* libpng-1.2.41 */
 #ifndef PNG_TRANSFORM_GRAY_TO_RGB
 #  define PNG_TRANSFORM_GRAY_TO_RGB   0x2000
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/unx

2013-03-27 Thread Tor Lillqvist
 desktop/unx/source/splashx.c |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 0ac88c0bbc95465a08d14be0033a136a14c56557
Author: Tor Lillqvist t...@iki.fi
Date:   Wed Mar 27 13:06:39 2013 +0200

WaE: macro is not used: USE_LIBPNG

Change-Id: I900d4957d964332ef97cb389d17206438f94743c

diff --git a/desktop/unx/source/splashx.c b/desktop/unx/source/splashx.c
index 339218c..2f7d548 100644
--- a/desktop/unx/source/splashx.c
+++ b/desktop/unx/source/splashx.c
@@ -36,8 +36,6 @@
 #include X11/extensions/Xinerama.h
 #endif
 
-#define USE_LIBPNG
-
 #include osl/endian.h
 #include fcntl.h
 #include stdint.h
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/unx

2013-03-12 Thread Tor Lillqvist
 desktop/unx/source/start.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 221b845d01fbb11d321b653e4f9676d7ade0d85f
Author: Tor Lillqvist t...@iki.fi
Date:   Tue Mar 12 14:02:16 2013 +0200

Need relative path to where exithelper.h is

Change-Id: If503e364700428ec3eac3d6f86e0388860cec10d

diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index 7366a93..a8a0bb5 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -50,7 +50,7 @@
 #include sal/main.h
 
 #include args.h
-#include exithelper.h
+#include ../../source/inc/exithelper.h
 #include splashx.h
 
 #define PIPEDEFAULTPATH  /tmp
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/unx

2013-03-12 Thread Tor Lillqvist
 desktop/unx/source/officeloader/officeloader.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 28b0168b4235040e5ef6dae9ffa400aaf9292e34
Author: Tor Lillqvist t...@iki.fi
Date:   Tue Mar 12 14:30:57 2013 +0200

No namespace desktop visible or needed in this source file any more

Change-Id: Id8174bd2bd50afa510ff60dcca63d8c560769f61

diff --git a/desktop/unx/source/officeloader/officeloader.cxx 
b/desktop/unx/source/officeloader/officeloader.cxx
index 621555b..ffeb643 100644
--- a/desktop/unx/source/officeloader/officeloader.cxx
+++ b/desktop/unx/source/officeloader/officeloader.cxx
@@ -24,7 +24,6 @@
 
 #include ../../../source/inc/exithelper.h
 
-using namespace desktop;
 using ::rtl::OUString;
 
 SAL_IMPLEMENT_MAIN()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits