[PATCH] headless: more work in vcl
Riccardo Magliocchetti
riccardo.magliocchetti at gmail.com
Tue Feb 21 05:55:10 PST 2012
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
--------------090106070400040508030101--
More information about the LibreOffice
mailing list