Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hello,

provide HeadlessSalSystem::ShowNativeDialog() instead of having
it if-zeroed.
Then remove LIBO_HEADLESS ifdefery from unx/generic/plugadapt/salplug.cxx which we are not building anymore.

Please review

--
Riccardo Magliocchetti
From dbf94f72ab9bcf472e59daf4229ade6eb9f5d584 Mon Sep 17 00:00:00 2001
From: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
Date: Tue, 21 Feb 2012 14:55:10 +0100
Subject: [PATCH] headless: more work in vcl

Provide HeadlessSalSystem::ShowNativeDialog() instead of having
it if-zeroed.
Then remove LIBO_HEADLESS ifdefery from unx/generic/plugadapt/salplug.cxx
which we are not building anymore.
---
 vcl/headless/headlessinst.cxx         |    8 +++-----
 vcl/unx/generic/plugadapt/salplug.cxx |    4 ++--
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/vcl/headless/headlessinst.cxx b/vcl/headless/headlessinst.cxx
index bde892f..439de86 100644
--- a/vcl/headless/headlessinst.cxx
+++ b/vcl/headless/headlessinst.cxx
@@ -49,22 +49,20 @@ HeadlessSalInstance::~HeadlessSalInstance()
 }
 
 class HeadlessSalSystem : public SvpSalSystem {
-#if 0
 public:
-    AndroidSalSystem() : SvpSalSystem() {}
-    virtual ~AndroidSalSystem() {}
+    HeadlessSalSystem() : SvpSalSystem() {}
+    virtual ~HeadlessSalSystem() {}
     virtual int ShowNativeDialog( const rtl::OUString& rTitle,
                                   const rtl::OUString& rMessage,
                                   const std::list< rtl::OUString >& rButtons,
                                   int nDefButton )
     {
         (void)rButtons; (void)nDefButton;
-        __android_log_print(ANDROID_LOG_INFO, "LibreOffice - dialog '%s': '%s'",
+        ::fprintf(stdout, "LibreOffice - dialog '%s': '%s'",
                             rtl::OUStringToOString(rTitle, RTL_TEXTENCODING_ASCII_US).getStr(),
                             rtl::OUStringToOString(rMessage, RTL_TEXTENCODING_ASCII_US).getStr());
         return 0;
     }
-#endif
 };
 
 SalSystem *HeadlessSalInstance::CreateSalSystem()
diff --git a/vcl/unx/generic/plugadapt/salplug.cxx b/vcl/unx/generic/plugadapt/salplug.cxx
index 1ce60de..1d9a5ba 100644
--- a/vcl/unx/generic/plugadapt/salplug.cxx
+++ b/vcl/unx/generic/plugadapt/salplug.cxx
@@ -53,7 +53,7 @@ static oslModule pCloseModule = NULL;
 static SalInstance* tryInstance( const OUString& rModuleBase, bool bForce = false )
 {
     SalInstance* pInst = NULL;
-#if !defined(ANDROID) || !defined(LIBO_HEADLESS)
+#if !defined(ANDROID)
     // Disable gtk3 plugin load except in experimental mode for now.
     if( !bForce &&
         rModuleBase.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "gtk3" ) ) &&
@@ -129,7 +129,7 @@ static SalInstance* tryInstance( const OUString& rModuleBase, bool bForce = fals
     return pInst;
 }
 
-#if !defined(ANDROID) || !defined(LIBO_HEADLESS)
+#if !defined(ANDROID)
 
 static DesktopType get_desktop_environment()
 {
-- 
1.7.5.4


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.