[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - desktop/source

Mike Kaganski mike.kaganski at collabora.com
Tue Aug 22 14:57:01 UTC 2017


 desktop/source/app/cmdlinehelp.cxx |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit ae5accf8e7280c83e95d64cdfbe6fb0729a67b8d
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date:   Mon Aug 21 09:51:16 2017 +0300

    tdf#111908: only freopen if we try to use another console
    
    Change-Id: If513faa4aac03b4c41759445e34cc965ece0b48e
    Reviewed-on: https://gerrit.libreoffice.org/41378
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
    (cherry picked from commit 7766135f1ca11f942eb5b9ccc7828d55acfbe28f)
    Reviewed-on: https://gerrit.libreoffice.org/41379
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/desktop/source/app/cmdlinehelp.cxx b/desktop/source/app/cmdlinehelp.cxx
index 83baa1df21ab..46910379e7bc 100644
--- a/desktop/source/app/cmdlinehelp.cxx
+++ b/desktop/source/app/cmdlinehelp.cxx
@@ -209,18 +209,18 @@ namespace desktop
                             SetConsoleScreenBufferSize(hOut, cinfo.dwSize);
                         }
                     }
-                }
 
-                freopen("CON", "r", stdin);
-                freopen("CON", "w", stdout);
-                freopen("CON", "w", stderr);
+                    freopen("CON", "r", stdin);
+                    freopen("CON", "w", stdout);
+                    freopen("CON", "w", stderr);
 
-                std::ios::sync_with_stdio(true);
+                    std::ios::sync_with_stdio(true);
 
-                // In case we use parent's console, emit an empty string
-                // to avoid output on a line with command prompt
-                if (mConsoleMode == attached)
-                    fprintf(stdout, "\n");
+                    // In case we use parent's console, emit an empty string
+                    // to avoid output on a line with command prompt
+                    if (mConsoleMode == attached)
+                        fprintf(stdout, "\n");
+                }
             }
 
             ~lcl_Console()


More information about the Libreoffice-commits mailing list