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

Markus Mohrhard markus.mohrhard at googlemail.com
Tue Aug 2 14:48:56 UTC 2016


 dtrans/source/win32/ftransl/ftransl.cxx      |   28 +++++++++++++--------------
 dtrans/source/win32/ftransl/ftransl.hxx      |    4 +--
 dtrans/source/win32/ftransl/ftranslentry.cxx |    2 -
 3 files changed, 17 insertions(+), 17 deletions(-)

New commits:
commit e3ba28a55334c1eaa32714db7caad538486078fe
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
    
    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)
    
    Conflicts:
    	dtrans/source/win32/ftransl/ftransl.hxx
    
    Change-Id: I55d7fc9a83526de0cc5f838f0ee2c7e4649dbe6b
    Reviewed-on: https://gerrit.libreoffice.org/27180
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/dtrans/source/win32/ftransl/ftransl.cxx b/dtrans/source/win32/ftransl/ftransl.cxx
index 968c2f6..4660ccf 100644
--- a/dtrans/source/win32/ftransl/ftransl.cxx
+++ b/dtrans/source/win32/ftransl/ftransl.cxx
@@ -94,13 +94,13 @@ FormatEntry::FormatEntry(
 
 // ctor
 
-CDataFormatTranslator::CDataFormatTranslator( const Reference< XComponentContext >& rxContext ) :
+CDataFormatTranslatorUNO::CDataFormatTranslatorUNO( const Reference< XComponentContext >& rxContext ) :
     m_xContext( rxContext )
 {
     initTranslationTable( );
 }
 
-Any SAL_CALL CDataFormatTranslator::getSystemDataTypeFromDataFlavor( const DataFlavor& aDataFlavor )
+Any SAL_CALL CDataFormatTranslatorUNO::getSystemDataTypeFromDataFlavor( const DataFlavor& aDataFlavor )
     throw( RuntimeException )
 {
     Any aAny;
@@ -155,7 +155,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" );
@@ -184,14 +184,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);
@@ -199,7 +199,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( );
@@ -212,7 +212,7 @@ Sequence< OUString > SAL_CALL CDataFormatTranslator::getSupportedServiceNames( )
 // format number we can stop if we find the first
 // CF_INVALID
 
-void SAL_CALL CDataFormatTranslator::initTranslationTable()
+void SAL_CALL CDataFormatTranslatorUNO::initTranslationTable()
 {
     //SotClipboardFormatId::DIF
     m_TranslTable.push_back(FormatEntry("application/x-openoffice-dif;windows_formatname=\"DIF\"", "DIF", "DIF", CF_DIF, CPPUTYPE_DEFAULT));
@@ -465,7 +465,7 @@ void SAL_CALL CDataFormatTranslator::initTranslationTable()
     m_TranslTable.push_back(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
@@ -487,7 +487,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 = m_TranslTable.end( );
     for ( vector< FormatEntry >::const_iterator citer = m_TranslTable.begin( );
@@ -502,7 +502,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 );
@@ -514,7 +514,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 = m_TranslTable.end( );
     for ( vector< FormatEntry >::const_iterator citer = m_TranslTable.begin( ); citer != citer_end; ++citer )
@@ -528,7 +528,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
@@ -554,12 +554,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 07e202c..1acb863 100644
--- a/dtrans/source/win32/ftransl/ftransl.hxx
+++ b/dtrans/source/win32/ftransl/ftransl.hxx
@@ -58,13 +58,13 @@ struct FormatEntry
 
 // CDataFormatTranslator
 
-class CDataFormatTranslator : public
+class CDataFormatTranslatorUNO : public
     cppu::WeakImplHelper< css::datatransfer::XDataFormatTranslator,
                           css::lang::XServiceInfo >
 {
 
 public:
-    CDataFormatTranslator( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
+    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