[Libreoffice-commits] core.git: dtrans/source

Stephan Bergmann sbergman at redhat.com
Sun Oct 1 06:57:33 UTC 2017


 dtrans/source/win32/dtobj/XTDataObject.cxx |   19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

New commits:
commit 0a478850dc29a61f36c04093f95027ac9260f0fa
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Sat Sep 30 22:42:43 2017 +0200

    loplugin:flatten (clang-cl, dtrans)
    
    Change-Id: I773640d233d5a80cb31dad5a8acff4e04afeedbd
    Reviewed-on: https://gerrit.libreoffice.org/42976
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx
index f9e681a4b399..3599f5589b52 100644
--- a/dtrans/source/win32/dtobj/XTDataObject.cxx
+++ b/dtrans/source/win32/dtobj/XTDataObject.cxx
@@ -299,18 +299,15 @@ STDMETHODIMP CXTDataObject::GetData( LPFORMATETC pFormatetc, LPSTGMEDIUM pmedium
 void SAL_CALL CXTDataObject::renderLocaleAndSetupStgMedium(
     FORMATETC const & fetc, STGMEDIUM& stgmedium )
 {
-    if ( m_FormatRegistrar.hasSynthesizedLocale( ) )
-    {
-        LCID lcid = CFormatRegistrar::getSynthesizedLocale( );
-        renderDataAndSetupStgMedium(
-            reinterpret_cast< sal_Int8* >( &lcid ),
-            fetc,
-            0,
-            sizeof( LCID ),
-            stgmedium );
-    }
-    else
+    if ( !m_FormatRegistrar.hasSynthesizedLocale( ) )
         throw CInvalidFormatEtcException( DV_E_FORMATETC );
+    LCID lcid = CFormatRegistrar::getSynthesizedLocale( );
+    renderDataAndSetupStgMedium(
+        reinterpret_cast< sal_Int8* >( &lcid ),
+        fetc,
+        0,
+        sizeof( LCID ),
+        stgmedium );
 }
 
 void SAL_CALL CXTDataObject::renderUnicodeAndSetupStgMedium(


More information about the Libreoffice-commits mailing list