[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/source

Caolán McNamara caolanm at redhat.com
Wed Apr 19 14:02:00 UTC 2017


 include/vcl/stdtext.hxx    |    5 -----
 vcl/inc/svids.hrc          |    1 -
 vcl/source/app/stdtext.cxx |   13 +------------
 3 files changed, 1 insertion(+), 18 deletions(-)

New commits:
commit 2a53bf858dd1719d5aa15e22d0f91bf9924ffe86
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Apr 19 14:48:38 2017 +0100

    only one use of GetStandardText
    
    Change-Id: I384e3ccb6bfaf491a4616ee89c714a510f1f670b

diff --git a/include/vcl/stdtext.hxx b/include/vcl/stdtext.hxx
index 39a2175408ca..260e85d973fb 100644
--- a/include/vcl/stdtext.hxx
+++ b/include/vcl/stdtext.hxx
@@ -25,11 +25,6 @@
 
 namespace vcl { class Window; }
 
-#define STANDARD_TEXT_FIRST                     STANDARD_TEXT_SERVICE_NOT_AVAILABLE
-#define STANDARD_TEXT_SERVICE_NOT_AVAILABLE     ((sal_uInt16)0)
-
-OUString VCL_DLLPUBLIC GetStandardText(sal_uInt16 nStdText);
-
 void VCL_DLLPUBLIC ShowServiceNotAvailableError(vcl::Window* pParent, const OUString& rServiceName, bool bError);
 
 #endif // INCLUDED_VCL_STDTEXT_HXX
diff --git a/vcl/inc/svids.hrc b/vcl/inc/svids.hrc
index 1fba0b44f9b7..8d1f06dbb8f9 100644
--- a/vcl/inc/svids.hrc
+++ b/vcl/inc/svids.hrc
@@ -132,7 +132,6 @@
 #define SV_BUTTONTEXT_CONNECT                       10131
 #define SV_BUTTONTEXT_SCREENSHOT                    10132
 
-#define SV_STDTEXT_FIRST                            SV_STDTEXT_SERVICENOTAVAILABLE
 #define SV_STDTEXT_SERVICENOTAVAILABLE              10210
 
 #define SV_STDTEXT_DONTASKAGAIN                     10212
diff --git a/vcl/source/app/stdtext.cxx b/vcl/source/app/stdtext.cxx
index d30784625d32..db9d16326933 100644
--- a/vcl/source/app/stdtext.cxx
+++ b/vcl/source/app/stdtext.cxx
@@ -23,21 +23,10 @@
 #include <svids.hrc>
 #include <svdata.hxx>
 
-OUString GetStandardText( sal_uInt16 nStdText )
-{
-    ResMgr* pResMgr = ImplGetResMgr();
-    if (pResMgr)
-    {
-        return ResId(nStdText-STANDARD_TEXT_FIRST+SV_STDTEXT_FIRST, *pResMgr).
-            toString();
-    }
-    return OUString();
-}
-
 void ShowServiceNotAvailableError(vcl::Window* pParent,
     const OUString& rServiceName, bool bError)
 {
-    OUString aText  = GetStandardText(STANDARD_TEXT_SERVICE_NOT_AVAILABLE).
+    OUString aText  = VclResId(SV_STDTEXT_SERVICENOTAVAILABLE).toString().
         replaceAll("%s", rServiceName);
     ScopedVclPtrInstance< MessageDialog > aBox( pParent, aText, bError ? VclMessageType::Error : VclMessageType::Warning );
     aBox->Execute();


More information about the Libreoffice-commits mailing list