[Libreoffice-commits] core.git: Branch 'libreoffice-5-2-0' - dtrans/source

Markus Mohrhard markus.mohrhard at googlemail.com
Mon Jul 18 14:24:50 UTC 2016


 dtrans/source/win32/ftransl/ftransl.cxx      |   26 +++++++++++++-------------
 dtrans/source/win32/ftransl/ftransl.hxx      |    6 ++----
 dtrans/source/win32/ftransl/ftranslentry.cxx |    2 +-
 3 files changed, 16 insertions(+), 18 deletions(-)

New commits:
commit 625dde21d5652504bd9992a65b26d9358bfe1dea
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Tue Jul 12 15:23:31 2016 +0200

    avoid name clash for CDataFormatTranslator in ftransl, tdf#100872
    
    E.g.
    http://crashreport.libreoffice.org/stats/signature/com::sun::star::datatransfer::DataFormatTranslator::create%28com::sun::star::uno::Reference%3Ccom::sun::star::uno::XComponentContext%3E%20const%20&%29
    
    Change-Id: I55d7fc9a83526de0cc5f838f0ee2c7e4649dbe6b
    Reviewed-on: https://gerrit.libreoffice.org/27157
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    (cherry picked from commit 37204431c68a4725b4539fa35e9fcea4fe94c166)
    Reviewed-on: https://gerrit.libreoffice.org/27182
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/dtrans/source/win32/ftransl/ftransl.cxx b/dtrans/source/win32/ftransl/ftransl.cxx
index 073255e..9247f28 100644
--- a/dtrans/source/win32/ftransl/ftransl.cxx
+++ b/dtrans/source/win32/ftransl/ftransl.cxx
@@ -103,12 +103,12 @@ FormatEntry::FormatEntry(
 
 // ctor
 
-CDataFormatTranslator::CDataFormatTranslator( const Reference< XComponentContext >& rxContext ) :
+CDataFormatTranslatorUNO::CDataFormatTranslatorUNO( const Reference< XComponentContext >& rxContext ) :
     m_xContext( rxContext )
 {
 }
 
-Any SAL_CALL CDataFormatTranslator::getSystemDataTypeFromDataFlavor( const DataFlavor& aDataFlavor )
+Any SAL_CALL CDataFormatTranslatorUNO::getSystemDataTypeFromDataFlavor( const DataFlavor& aDataFlavor )
     throw( RuntimeException )
 {
     Any aAny;
@@ -163,7 +163,7 @@ Any SAL_CALL CDataFormatTranslator::getSystemDataTypeFromDataFlavor( const DataF
     return aAny;
 }
 
-DataFlavor SAL_CALL CDataFormatTranslator::getDataFlavorFromSystemDataType( const Any& aSysDataType )
+DataFlavor SAL_CALL CDataFormatTranslatorUNO::getDataFlavorFromSystemDataType( const Any& aSysDataType )
     throw( RuntimeException )
 {
     OSL_PRECOND( aSysDataType.hasValue( ), "Empty system data type delivered" );
@@ -192,14 +192,14 @@ DataFlavor SAL_CALL CDataFormatTranslator::getDataFlavorFromSystemDataType( cons
 
 // XServiceInfo
 
-OUString SAL_CALL CDataFormatTranslator::getImplementationName(  )
+OUString SAL_CALL CDataFormatTranslatorUNO::getImplementationName(  )
     throw( RuntimeException )
 {
     return OUString( IMPL_NAME );
 }
 
 //  XServiceInfo
-sal_Bool SAL_CALL CDataFormatTranslator::supportsService( const OUString& ServiceName )
+sal_Bool SAL_CALL CDataFormatTranslatorUNO::supportsService( const OUString& ServiceName )
     throw( RuntimeException )
 {
     return cppu::supportsService(this, ServiceName);
@@ -207,7 +207,7 @@ sal_Bool SAL_CALL CDataFormatTranslator::supportsService( const OUString& Servic
 
 //  XServiceInfo
 
-Sequence< OUString > SAL_CALL CDataFormatTranslator::getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL CDataFormatTranslatorUNO::getSupportedServiceNames( )
     throw( RuntimeException )
 {
     return DataFormatTranslator_getSupportedServiceNames( );
@@ -472,7 +472,7 @@ static const std::vector< FormatEntry > g_TranslTable {
         FormatEntry("application/x-openoffice-dummy4;windows_formatname=\"SO_DUMMYFORMAT_4\"", "SO_DUMMYFORMAT_4", NULL, CF_INVALID, CPPUTYPE_DEFAULT),
     };
 
-void SAL_CALL CDataFormatTranslator::findDataFlavorForStandardFormatId( sal_Int32 aStandardFormatId, DataFlavor& aDataFlavor ) const
+void SAL_CALL CDataFormatTranslatorUNO::findDataFlavorForStandardFormatId( sal_Int32 aStandardFormatId, DataFlavor& aDataFlavor ) const
 {
     /*
         we break the for loop if we find the first CF_INVALID
@@ -494,7 +494,7 @@ void SAL_CALL CDataFormatTranslator::findDataFlavorForStandardFormatId( sal_Int3
     }
 }
 
-void SAL_CALL CDataFormatTranslator::findDataFlavorForNativeFormatName( const OUString& aNativeFormatName, DataFlavor& aDataFlavor ) const
+void SAL_CALL CDataFormatTranslatorUNO::findDataFlavorForNativeFormatName( const OUString& aNativeFormatName, DataFlavor& aDataFlavor ) const
 {
     vector< FormatEntry >::const_iterator citer_end = g_TranslTable.end( );
     for ( vector< FormatEntry >::const_iterator citer = g_TranslTable.begin( );
@@ -509,7 +509,7 @@ void SAL_CALL CDataFormatTranslator::findDataFlavorForNativeFormatName( const OU
     }
 }
 
-void SAL_CALL CDataFormatTranslator::findStandardFormatIdForCharset( const OUString& aCharset, Any& aAny ) const
+void SAL_CALL CDataFormatTranslatorUNO::findStandardFormatIdForCharset( const OUString& aCharset, Any& aAny ) const
 {
     if ( aCharset.equalsIgnoreAsciiCase( "utf-16" ) )
         aAny <<= static_cast< sal_Int32 >( CF_UNICODETEXT );
@@ -521,7 +521,7 @@ void SAL_CALL CDataFormatTranslator::findStandardFormatIdForCharset( const OUStr
     }
 }
 
-void SAL_CALL CDataFormatTranslator::setStandardFormatIdForNativeFormatName( const OUString& aNativeFormatName, Any& aAny ) const
+void SAL_CALL CDataFormatTranslatorUNO::setStandardFormatIdForNativeFormatName( const OUString& aNativeFormatName, Any& aAny ) const
 {
     vector< FormatEntry >::const_iterator citer_end = g_TranslTable.end( );
     for ( vector< FormatEntry >::const_iterator citer = g_TranslTable.begin( ); citer != citer_end; ++citer )
@@ -535,7 +535,7 @@ void SAL_CALL CDataFormatTranslator::setStandardFormatIdForNativeFormatName( con
     }
 }
 
-void SAL_CALL CDataFormatTranslator::findStdFormatIdOrNativeFormatNameForFullMediaType(
+void SAL_CALL CDataFormatTranslatorUNO::findStdFormatIdOrNativeFormatNameForFullMediaType(
     const Reference< XMimeContentTypeFactory >& aRefXMimeFactory,
     const OUString& aFullMediaType,
     Any& aAny ) const
@@ -561,12 +561,12 @@ void SAL_CALL CDataFormatTranslator::findStdFormatIdOrNativeFormatNameForFullMed
     }
 }
 
-inline sal_Bool CDataFormatTranslator::isTextPlainMediaType( const OUString& fullMediaType ) const
+inline sal_Bool CDataFormatTranslatorUNO::isTextPlainMediaType( const OUString& fullMediaType ) const
 {
     return fullMediaType.equalsIgnoreAsciiCase("text/plain");
 }
 
-DataFlavor SAL_CALL CDataFormatTranslator::mkDataFlv(const OUString& cnttype, const OUString& hpname, Type dtype)
+DataFlavor SAL_CALL CDataFormatTranslatorUNO::mkDataFlv(const OUString& cnttype, const OUString& hpname, Type dtype)
 {
     DataFlavor dflv;
     dflv.MimeType             = cnttype;
diff --git a/dtrans/source/win32/ftransl/ftransl.hxx b/dtrans/source/win32/ftransl/ftransl.hxx
index 6d1f0ea..abf486f 100644
--- a/dtrans/source/win32/ftransl/ftransl.hxx
+++ b/dtrans/source/win32/ftransl/ftransl.hxx
@@ -39,15 +39,13 @@
 #pragma warning(pop)
 #endif
 
-// CDataFormatTranslator
-
-class CDataFormatTranslator : public
+class CDataFormatTranslatorUNO : public
     cppu::WeakImplHelper< css::datatransfer::XDataFormatTranslator,
                           css::lang::XServiceInfo >
 {
 
 public:
-    explicit CDataFormatTranslator( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
+    explicit CDataFormatTranslatorUNO( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
 
     // XDataFormatTranslator
 
diff --git a/dtrans/source/win32/ftransl/ftranslentry.cxx b/dtrans/source/win32/ftransl/ftranslentry.cxx
index a81b2d0..5174d2c 100644
--- a/dtrans/source/win32/ftransl/ftranslentry.cxx
+++ b/dtrans/source/win32/ftransl/ftranslentry.cxx
@@ -52,7 +52,7 @@ namespace
 
     Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceFactory >& rServiceManager )
     {
-        return Reference< XInterface >( static_cast< XDataFormatTranslator* >( new CDataFormatTranslator( comphelper::getComponentContext(rServiceManager) ) ) );
+        return Reference< XInterface >( static_cast< XDataFormatTranslator* >( new CDataFormatTranslatorUNO( comphelper::getComponentContext(rServiceManager) ) ) );
     }
 }
 


More information about the Libreoffice-commits mailing list