[Libreoffice-commits] .: Branch 'libreoffice-3-3' - vcl/unx

Jan Holesovsky kendy at kemper.freedesktop.org
Tue Feb 22 05:39:34 PST 2011


 vcl/unx/inc/saldata.hxx        |    5 ++---
 vcl/unx/source/app/saldata.cxx |    8 +++++++-
 2 files changed, 9 insertions(+), 4 deletions(-)

New commits:
commit 18a79a536aa38479517b1fd29eaf5e15da05d8dd
Author: Michael Meeks <michael.meeks at novell.com>
Date:   Tue Feb 22 12:05:55 2011 +0000

    fix fdo#32640 - un-necessary reverse lookup on startup
    
    Signed-off-by: Jan Holesovsky <kendy at suse.cz>

diff --git a/vcl/unx/inc/saldata.hxx b/vcl/unx/inc/saldata.hxx
index 4164a0f..83a8ce7 100644
--- a/vcl/unx/inc/saldata.hxx
+++ b/vcl/unx/inc/saldata.hxx
@@ -87,9 +87,8 @@ public:
     void					StartTimer( ULONG nMS );
     inline	void			StopTimer();
     void					Timeout() const;
-    
-    const rtl::OUString&    GetLocalHostName() const
-    { return maLocalHostName; }
+
+    const rtl::OUString&    GetLocalHostName();
 
     static int XErrorHdl( Display*, XErrorEvent* );
     static int XIOErrorHdl( Display* );
diff --git a/vcl/unx/source/app/saldata.cxx b/vcl/unx/source/app/saldata.cxx
index bfe96f7..3840844 100644
--- a/vcl/unx/source/app/saldata.cxx
+++ b/vcl/unx/source/app/saldata.cxx
@@ -272,7 +272,13 @@ X11SalData::X11SalData()
     m_pPlugin		= NULL;
 
     hMainThread_	= pthread_self();
-    osl_getLocalHostname( &maLocalHostName.pData );
+}
+
+const rtl::OUString& X11SalData::GetLocalHostName()
+{
+    if (!maLocalHostName.getLength())
+            osl_getLocalHostname( &maLocalHostName.pData );
+    return maLocalHostName;
 }
 
 X11SalData::~X11SalData()


More information about the Libreoffice-commits mailing list