944f104
From 32c6389cceda63391ff372987834fb7b0a25339a Mon Sep 17 00:00:00 2001
944f104
From: Juergen Funk <juergen.funk_ml@cib.de>
944f104
Date: Sat, 5 Dec 2015 01:37:13 +0100
944f104
Subject: [PATCH 1/5] unused vcl::IsWindowSystemAvailable
944f104
944f104
Change-Id: Ie903a6fe3237319661662c0533c23528766ffd08
944f104
Reviewed-on: https://gerrit.libreoffice.org/20404
944f104
Tested-by: Jenkins <ci@libreoffice.org>
944f104
Reviewed-by: Tor Lillqvist <tml@collabora.com>
944f104
Tested-by: Tor Lillqvist <tml@collabora.com>
944f104
(cherry picked from commit 6ded842ac4a0e06efcfcc312775d25063201eb68)
944f104
---
944f104
 include/vcl/svapp.hxx                     |  7 -------
944f104
 unusedcode.easy                           |  1 -
944f104
 vcl/osx/salinst.cxx                       | 10 ----------
944f104
 vcl/unx/generic/gdi/x11windowprovider.cxx | 16 ----------------
944f104
 vcl/win/source/app/saldata.cxx            |  9 ---------
944f104
 5 files changed, 43 deletions(-)
944f104
944f104
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
944f104
index a8b813b..c5b52ca 100644
944f104
--- a/include/vcl/svapp.hxx
944f104
+++ b/include/vcl/svapp.hxx
944f104
@@ -1649,13 +1649,6 @@ inline void Application::EndYield()
944f104
     PostUserEvent( Link<void*,void>() );
944f104
 }
944f104
 
944f104
-namespace vcl
944f104
-{
944f104
-
944f104
-VCL_DLLPUBLIC bool IsWindowSystemAvailable();
944f104
-
944f104
-}
944f104
-
944f104
 #endif // _APP_HXX
944f104
 
944f104
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
944f104
diff --git a/unusedcode.easy b/unusedcode.easy
944f104
index bce941f..89f4028 100644
944f104
--- a/unusedcode.easy
944f104
+++ b/unusedcode.easy
944f104
@@ -93,7 +93,6 @@ sd::LeftDrawPaneShell::RegisterInterface(SfxModule*)
944f104
 sd::LeftImpressPaneShell::RegisterInterface(SfxModule*)
944f104
 std::_Rb_tree<rtl::OUString, std::pair<rtl::OUString const, (anonymous namespace)::TemplateId>, std::_Select1st<std::pair<rtl::OUString const, (anonymous namespace)::TemplateId> >, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, (anonymous namespace)::TemplateId> > >::_M_move_data(std::_Rb_tree<rtl::OUString, std::pair<rtl::OUString const, (anonymous namespace)::TemplateId>, std::_Select1st<std::pair<rtl::OUString const, (anonymous namespace)::TemplateId> >, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, (anonymous namespace)::TemplateId> > >&, std::integral_constant<bool, true>)
944f104
 std::__cxx1998::vector<rtl::Reference<oox::xls::(anonymous namespace)::WorkerThread>, std::allocator<rtl::Reference<oox::xls::(anonymous namespace)::WorkerThread> > >::reserve(unsigned long)
944f104
-vcl::IsWindowSystemAvailable()
944f104
 vcl::MapChar(vcl::_TrueTypeFont*, unsigned short, bool)
944f104
 vcl::Region::IsInside(Rectangle const&) const
944f104
 vcl::RenderSettings::PushAndApply(OutputDevice&)
944f104
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
944f104
index b7467be..4bfe5bc 100644
944f104
--- a/vcl/osx/salinst.cxx
944f104
+++ b/vcl/osx/salinst.cxx
944f104
@@ -1097,15 +1097,5 @@ NSImage* CreateNSImage( const Image& rImage )
944f104
     return pImage;
944f104
 }
944f104
 
944f104
-namespace vcl
944f104
-{
944f104
-
944f104
-bool IsWindowSystemAvailable()
944f104
-{
944f104
-    // Yes I know the parens are not needed. I like them in cases like this. So sue me.
944f104
-    return ([NSScreen screens] != nil && [[NSScreen screens] count] > 0);
944f104
-}
944f104
-
944f104
-} // namespace vcl
944f104
 
944f104
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
944f104
diff --git a/vcl/unx/generic/gdi/x11windowprovider.cxx b/vcl/unx/generic/gdi/x11windowprovider.cxx
944f104
index 4f507c3..5f7d289 100644
944f104
--- a/vcl/unx/generic/gdi/x11windowprovider.cxx
944f104
+++ b/vcl/unx/generic/gdi/x11windowprovider.cxx
944f104
@@ -68,21 +68,5 @@ Display *OpenX11Display(OString& rDisplay)
944f104
     return pDisp;
944f104
 }
944f104
 
944f104
-namespace vcl
944f104
-{
944f104
-
944f104
-bool IsWindowSystemAvailable()
944f104
-{
944f104
-    Display *pDisp;
944f104
-    OString aDisplay;
944f104
-
944f104
-    pDisp = OpenX11Display(aDisplay);
944f104
-    if (pDisp)
944f104
-        XCloseDisplay(pDisp);
944f104
-
944f104
-    return (pDisp != nullptr);
944f104
-}
944f104
-
944f104
-} // namespace vcl
944f104
 
944f104
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
944f104
diff --git a/vcl/win/source/app/saldata.cxx b/vcl/win/source/app/saldata.cxx
944f104
index 18256ee..2a04b33 100644
944f104
--- a/vcl/win/source/app/saldata.cxx
944f104
+++ b/vcl/win/source/app/saldata.cxx
944f104
@@ -74,15 +74,6 @@ int ImplSalWICompareAscii( const wchar_t* pStr1, const char* pStr2 )
944f104
     return nRet;
944f104
 }
944f104
 
944f104
-namespace vcl
944f104
-{
944f104
-
944f104
-bool IsWindowSystemAvailable()
944f104
-{
944f104
-    return true; // FIXME: we want this to return false if logged in
944f104
-                 // to some Cygwin ssh session for instance
944f104
-}
944f104
 
944f104
-} // namespace vcl
944f104
 
944f104
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
944f104
-- 
944f104
2.7.1
944f104