summaryrefslogtreecommitdiff
path: root/dtrans
diff options
context:
space:
mode:
authorTino Rachui <tra@openoffice.org>2001-03-19 12:03:00 +0000
committerTino Rachui <tra@openoffice.org>2001-03-19 12:03:00 +0000
commitb97f7daa1003c93eb546c17d2fc3790277d02956 (patch)
tree618a72fae1b461b7d493fa76002fb7817ee89261 /dtrans
parentfab5a6d72b7c6940a0bb60315354f2161a78db1a (diff)
*** empty log message ***
Diffstat (limited to 'dtrans')
-rw-r--r--dtrans/source/win32/dtobj/Fetc.hxx6
-rw-r--r--dtrans/source/win32/dtobj/FetcList.cxx176
-rw-r--r--dtrans/source/win32/dtobj/FetcList.hxx28
-rw-r--r--dtrans/source/win32/dtobj/XTDataObject.cxx87
-rw-r--r--dtrans/source/win32/dtobj/XTDataObject.hxx9
-rw-r--r--dtrans/source/win32/misc/ImplHelper.cxx36
-rw-r--r--dtrans/source/win32/mtaole/MtaOleClipb.cxx17
7 files changed, 212 insertions, 147 deletions
diff --git a/dtrans/source/win32/dtobj/Fetc.hxx b/dtrans/source/win32/dtobj/Fetc.hxx
index ecd9abea5302..c9b567c2228d 100644
--- a/dtrans/source/win32/dtobj/Fetc.hxx
+++ b/dtrans/source/win32/dtobj/Fetc.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Fetc.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: tra $ $Date: 2001-03-05 06:35:30 $
+ * last change: $Author: tra $ $Date: 2001-03-19 13:02:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -86,7 +86,7 @@ class CFormatEtc
public:
CFormatEtc( );
CFormatEtc( const FORMATETC& aFormatEtc );
- CFormatEtc( CLIPFORMAT cf, DWORD tymed, DVTARGETDEVICE* ptd = NULL, DWORD dwAspect = DVASPECT_CONTENT, LONG lindex = -1 );
+ CFormatEtc( CLIPFORMAT cf, DWORD tymed = TYMED_HGLOBAL, DVTARGETDEVICE* ptd = NULL, DWORD dwAspect = DVASPECT_CONTENT, LONG lindex = -1 );
CFormatEtc( const CFormatEtc& theOther );
~CFormatEtc( );
diff --git a/dtrans/source/win32/dtobj/FetcList.cxx b/dtrans/source/win32/dtobj/FetcList.cxx
index aaeadfcfff53..c0e0df266960 100644
--- a/dtrans/source/win32/dtobj/FetcList.cxx
+++ b/dtrans/source/win32/dtobj/FetcList.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: FetcList.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: tra $ $Date: 2001-03-19 09:11:24 $
+ * last change: $Author: tra $ $Date: 2001-03-19 13:02:38 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -259,10 +259,12 @@ CFormatRegistrar::CFormatRegistrar( const Reference< XMultiServiceFactory >& Ser
// ----------------------------------------------------------------------------------------
void SAL_CALL CFormatRegistrar::RegisterFormats(
- const Sequence< DataFlavor >& aFlavorList, CFormatEtcContainer& aFormatEtcContainer )
+ const Reference< XTransferable >& aXTransferable, CFormatEtcContainer& aFormatEtcContainer )
{
- sal_Int32 nFlavors = aFlavorList.getLength( );
- sal_Bool bSuccess = sal_False;
+ Sequence< DataFlavor > aFlavorList = aXTransferable->getTransferDataFlavors( );
+ sal_Int32 nFlavors = aFlavorList.getLength( );
+ sal_Bool bSuccess = sal_False;
+ sal_Bool bUnicodeRegistered = sal_False;
DataFlavor aFlavor;
for( sal_Int32 i = 0; i < nFlavors; i++ )
@@ -270,46 +272,59 @@ void SAL_CALL CFormatRegistrar::RegisterFormats(
aFlavor = aFlavorList[i];
CFormatEtc fetc = dataFlavorToFormatEtc( aFlavor );
- if ( needsToSynthesizeAccompanyFormats( fetc ) )
- {
- // we don't validate if the operation succeded
- // because an accompany format might have be
- // registered so that it's no problem if the
- // operation fails because of a duplicate format
- // e.g. text was already registered we have also
- // registered unicode text, if we later try to
- // register unicode text it will fail
+ if ( !needsToSynthesizeAccompanyFormats( fetc ) )
aFormatEtcContainer.addFormatEtc( fetc );
-
- synthesizeAndRegisterAccompanyFormats(
- fetc, aFlavor, aFormatEtcContainer );
- }
else
- aFormatEtcContainer.addFormatEtc( fetc );
+ {
+ // if we haven't registered any text format up to now
+ if ( isTextFormat( fetc.getClipformat() ) && !bUnicodeRegistered )
+ {
+ // if the transferable supports unicode text we ignore
+ // any further text format the transferable offers
+ // because we can create it from Unicode text in addition
+ // we register CF_TEXT for non unicode clients
+ if ( isUnicodeTextFormat( fetc.getClipformat() ) )
+ {
+ aFormatEtcContainer.addFormatEtc( fetc ); // add CF_UNICODE
+ aFormatEtcContainer.addFormatEtc( getFormatEtcForClipformat( CF_TEXT ) ); // add CF_TEXT
+ bUnicodeRegistered = sal_True;
+ }
+ else if ( !hasUnicodeFlavor( aXTransferable ) )
+ {
+ // we try to investigate the charset and make a valid
+ // windows codepage from this charset the default
+ // return value is the result of GetACP( )
+ OUString charset = getCharsetFromDataFlavor( aFlavor );
+ sal_uInt32 txtCP = getWinCPFromMimeCharset( charset );
+
+ // we try to get a Locale appropriate for this codepage
+ if ( findLocaleForTextCodePage( ) )
+ {
+ m_TxtCodePage = txtCP;
+
+ aFormatEtcContainer.addFormatEtc( getFormatEtcForClipformat( CF_UNICODETEXT ) );
+
+ if ( !IsOEMCP( m_TxtCodePage ) )
+ aFormatEtcContainer.addFormatEtc( getFormatEtcForClipformat( CF_TEXT ) );
+ else
+ aFormatEtcContainer.addFormatEtc( getFormatEtcForClipformat( CF_OEMTEXT ) );
+
+ aFormatEtcContainer.addFormatEtc( getFormatEtcForClipformat( CF_LOCALE ) );
+
+ // we save the flavor so it's easier when
+ // queried for it in XTDataObject::GetData(...)
+ m_RegisteredTextFlavor = aFlavor;
+ m_bHasSynthesizedLocale = sal_True;
+ }
+ }
+ }
+ else // Html (Hyper Text...)
+ {
+ }
+ }
}
}
-/*
- For all Flavors from Transferable
- if not is TextFlavor
- add Format to FormatList
- else if not UnicodeTextRegistred
- if isUnicodeText or Transferable Has Unicodetext
- add Unicode Format to FormatList
- add Text to FormatList
- UnicodeTextRegistered = true
- else
- if findLocaleForTextCharset successful
- add Unicode Format to FormatList
- add Text or OemText to FormatList
- add Locale to FormatList
- HasSynthesizedLocale = true
- save the TextFlavor so that access is easier in GetData
- end if
- end if
- end if
-*/
-
//------------------------------------------------------------------------
//
//------------------------------------------------------------------------
@@ -332,6 +347,15 @@ LCID SAL_CALL CFormatRegistrar::getSynthesizedLocale( ) const
//
//------------------------------------------------------------------------
+sal_uInt32 SAL_CALL CFormatRegistrar::getRegisteredTextCodePage( ) const
+{
+ return m_TxtCodePage;
+}
+
+//------------------------------------------------------------------------
+//
+//------------------------------------------------------------------------
+
inline
sal_Bool SAL_CALL CFormatRegistrar::isOemOrAnsiTextFormat( CLIPFORMAT cf ) const
{
@@ -383,64 +407,6 @@ sal_Bool SAL_CALL CFormatRegistrar::needsToSynthesizeAccompanyFormats( const CFo
//
//------------------------------------------------------------------------
-void SAL_CALL CFormatRegistrar::synthesizeAndRegisterAccompanyFormats(
- CFormatEtc& aFormatEtc, const DataFlavor& aFlavor, CFormatEtcContainer& aFormatEtcContainer )
-{
- CLIPFORMAT cf = aFormatEtc.getClipformat();
- OSL_ASSERT( isOemOrAnsiTextFormat(cf) || isUnicodeTextFormat(cf) );
-
- CFormatEtc fetc;
-
- if ( isOemOrAnsiTextFormat( cf ) )
- {
- OUString charset = getCharsetFromDataFlavor( aFlavor );
- if ( charset.getLength( ) )
- m_TxtCodePage = getWinCPFromMimeCharset( charset );
- else
- m_TxtCodePage = GetACP( );
-
- OSL_ASSERT( IsValidCodePage( m_TxtCodePage ) );
-
- if ( !isEqualCurrentSystemCodePage( m_TxtCodePage ) )
- {
- fetc = getFormatEtcForClipformat( CF_LOCALE );
-
- if ( findLocaleForTextCodePage( ) )
- {
- aFormatEtcContainer.addFormatEtc( fetc );
- m_bHasSynthesizedLocale = sal_True;
- }
- else // could not find a locale for this charset
- {
- // remove the locale if there is one
- // already registered
- aFormatEtcContainer.removeFormatEtc( fetc );
- m_bHasSynthesizedLocale = sal_False;
- }
- }
-
- // register may fail if we have already
- // registered CF_UNICODETEXT but
- // then it doesn't matter because in this
- // case CF_TEXT is already registered
- fetc = getFormatEtcForClipformat( CF_UNICODETEXT );
- aFormatEtcContainer.addFormatEtc( fetc );
- }
- else // CF_UNICODETEXT
- {
- // register may fail if we have already
- // registered CF_TEXT or CF_OEMTEXT but
- // then it doesn't matter because in this
- // case CF_UNICODETEXT is already registered
- fetc = getFormatEtcForClipformat( CF_TEXT );
- aFormatEtcContainer.addFormatEtc( fetc );
- }
-}
-
-//------------------------------------------------------------------------
-//
-//------------------------------------------------------------------------
-
OUString SAL_CALL CFormatRegistrar::getCharsetFromDataFlavor( const DataFlavor& aFlavor )
{
OUString charset;
@@ -486,6 +452,20 @@ CFormatEtc SAL_CALL CFormatRegistrar::getFormatEtcForClipformat( CLIPFORMAT aCli
//
//------------------------------------------------------------------------
+sal_Bool SAL_CALL CFormatRegistrar::hasUnicodeFlavor( const Reference< XTransferable >& aXTransferable ) const
+{
+ CFormatEtc fetc( CF_UNICODETEXT );
+
+ DataFlavor aFlavor =
+ m_DataFormatTranslator.getDataFlavorFromFormatEtc( aXTransferable, fetc );
+
+ return aXTransferable->isDataFlavorSupported( aFlavor );
+}
+
+//------------------------------------------------------------------------
+//
+//------------------------------------------------------------------------
+
inline
sal_Bool CFormatRegistrar::isEqualCurrentSystemCodePage( sal_uInt32 aCodePage ) const
{
diff --git a/dtrans/source/win32/dtobj/FetcList.hxx b/dtrans/source/win32/dtobj/FetcList.hxx
index fed592537147..8a61a9a1b601 100644
--- a/dtrans/source/win32/dtobj/FetcList.hxx
+++ b/dtrans/source/win32/dtobj/FetcList.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: FetcList.hxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: tra $ $Date: 2001-03-19 09:11:24 $
+ * last change: $Author: tra $ $Date: 2001-03-19 13:02:37 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -75,8 +75,8 @@
#include <cppuhelper/servicefactory.hxx>
#endif
-#ifndef _COM_SUN_STAR_DATATRANSFER_DATAFLAVOR_HPP_
-#include <com/sun/star/datatransfer/DataFlavor.hpp>
+#ifndef _COM_SUN_STAR_DATATRANSFER_XTRANSFERABLE_HPP_
+#include <com/sun/star/datatransfer/XTransferable.hpp>
#endif
#ifndef _FETC_HXX_
@@ -151,10 +151,13 @@ public:
CFormatRegistrar( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ServiceManager,
const CDataFormatTranslator& aDataFormatTranslator );
- void SAL_CALL RegisterFormats( const com::sun::star::uno::Sequence< com::sun::star::datatransfer::DataFlavor >& aFlavorList,
+ void SAL_CALL RegisterFormats( const com::sun::star::uno::Reference< com::sun::star::datatransfer::XTransferable >& aXTransferable,
CFormatEtcContainer& aFormatEtcContainer );
- sal_Bool SAL_CALL hasSynthesizedLocale( ) const;
- LCID SAL_CALL getSynthesizedLocale( ) const;
+
+ sal_Bool SAL_CALL hasSynthesizedLocale( ) const;
+ LCID SAL_CALL getSynthesizedLocale( ) const;
+ sal_uInt32 SAL_CALL getRegisteredTextCodePage( ) const;
+ com::sun::star::datatransfer::DataFlavor SAL_CALL getRegisteredTextFlavor( ) const;
private:
sal_Bool SAL_CALL isOemOrAnsiTextFormat( CLIPFORMAT cf ) const;
@@ -162,13 +165,13 @@ private:
sal_Bool SAL_CALL isTextFormat( CLIPFORMAT cf ) const;
CFormatEtc SAL_CALL dataFlavorToFormatEtc( const com::sun::star::datatransfer::DataFlavor& aFlavor ) const;
sal_Bool SAL_CALL needsToSynthesizeAccompanyFormats( const CFormatEtc& aFormatEtc ) const;
- void SAL_CALL synthesizeAndRegisterAccompanyFormats( CFormatEtc& aFormatEtc,
- const com::sun::star::datatransfer::DataFlavor& aFlavor,
- CFormatEtcContainer& aFormatEtcContainer );
+
sal_Bool SAL_CALL isEqualCurrentSystemCodePage( sal_uInt32 aCodePage ) const;
rtl::OUString SAL_CALL getCharsetFromDataFlavor( const com::sun::star::datatransfer::DataFlavor& aFlavor );
CFormatEtc SAL_CALL getFormatEtcForClipformat( CLIPFORMAT aClipformat ) const;
+ sal_Bool SAL_CALL hasUnicodeFlavor( const com::sun::star::uno::Reference< com::sun::star::datatransfer::XTransferable >& aXTransferable ) const;
+
sal_Bool SAL_CALL findLocaleForTextCodePage( );
static sal_Bool SAL_CALL isLocaleOemCodePage( LCID lcid, sal_uInt32 codepage );
@@ -178,8 +181,9 @@ private:
static BOOL CALLBACK EnumLocalesProc( LPSTR lpLocaleStr );
private:
- const CDataFormatTranslator& m_DataFormatTranslator;
- sal_Bool m_bHasSynthesizedLocale;
+ const CDataFormatTranslator& m_DataFormatTranslator;
+ sal_Bool m_bHasSynthesizedLocale;
+ com::sun::star::datatransfer::DataFlavor m_RegisteredTextFlavor;
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_SrvMgr;
diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx
index c762ff5920b8..f61ac0a0a3d7 100644
--- a/dtrans/source/win32/dtobj/XTDataObject.cxx
+++ b/dtrans/source/win32/dtobj/XTDataObject.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XTDataObject.cxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: tra $ $Date: 2001-03-16 16:31:24 $
+ * last change: $Author: tra $ $Date: 2001-03-19 13:02:38 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -132,7 +132,7 @@ CXTDataObject::CXTDataObject( const Reference< XMultiServiceFactory >& aServiceM
m_DataFormatTranslator( aServiceManager ),
m_FormatRegistrar( m_SrvMgr, m_DataFormatTranslator )
{
- m_FormatRegistrar.RegisterFormats( m_XTransferable->getTransferDataFlavors( ),
+ m_FormatRegistrar.RegisterFormats( m_XTransferable,
m_FormatEtcContainer );
}
@@ -208,13 +208,13 @@ STDMETHODIMP CXTDataObject::GetData( LPFORMATETC pFormatetc, LPSTGMEDIUM pmedium
}
catch(UnsupportedFlavorException&)
{
+ HRESULT hr = DV_E_FORMATETC;
+
if ( isSynthesizeableFormat( pFormatetc ) )
- {
- // synthesize format
- return S_OK;
- }
+ hr = renderSynthesizedFormatAndSetupStgMedium(
+ *pFormatetc, *pmedium );
- return DV_E_FORMATETC;
+ return hr;
}
catch( CInvalidFormatEtcException& ex )
{
@@ -405,6 +405,77 @@ void SAL_CALL CXTDataObject::renderAnyDataAndSetupStgMedium(
}
//------------------------------------------------------------------------
+//
+//------------------------------------------------------------------------
+
+HRESULT SAL_CALL CXTDataObject::renderSynthesizedFormatAndSetupStgMedium( FORMATETC& fetc, STGMEDIUM& stgmedium )
+{
+ HRESULT hr = S_OK;
+
+ try
+ {
+ if ( CF_UNICODETEXT == fetc.cfFormat )
+ // the transferable seems to have only text
+ renderSynthesizedUnicodeAndSetupStgMedium( fetc, stgmedium );
+ else if ( isOemOrAnsiTextFormat( fetc.cfFormat ) )
+ // the transferable seems to have only unicode text
+ renderSynthesizedTextAndSetupStgMedium( fetc, stgmedium );
+ else
+ // the transferable seems to have only text/html
+ renderSynthesizedHtmlAndSetupStgMedium( fetc, stgmedium );
+ }
+ catch(UnsupportedFlavorException&)
+ {
+ hr = DV_E_FORMATETC;
+ }
+ catch( CInvalidFormatEtcException& ex )
+ {
+ OSL_ENSURE( sal_False, "Unexpected exception" );
+ }
+ catch( CStgTransferException& ex )
+ {
+ return translateStgExceptionCode( ex.m_hr );
+ }
+ catch(...)
+ {
+ hr = E_UNEXPECTED;
+ }
+
+ return hr;
+}
+
+//------------------------------------------------------------------------
+//
+//------------------------------------------------------------------------
+
+void SAL_CALL CXTDataObject::renderSynthesizedUnicodeAndSetupStgMedium( FORMATETC& fetc, STGMEDIUM& stgmedium )
+{
+ OSL_ASSERT( CF_UNICODETEXT == fetc.cfFormat );
+
+ //m_FormatRegistrar.getRegisteredTextCodePage( );
+
+}
+
+//------------------------------------------------------------------------
+//
+//------------------------------------------------------------------------
+
+void SAL_CALL CXTDataObject::renderSynthesizedTextAndSetupStgMedium( FORMATETC& fetc, STGMEDIUM& stgmedium )
+{
+ OSL_ASSERT( isOemOrAnsiTextFormat( fetc.cfFormat ) );
+
+}
+
+//------------------------------------------------------------------------
+//
+//------------------------------------------------------------------------
+
+void SAL_CALL CXTDataObject::renderSynthesizedHtmlAndSetupStgMedium( FORMATETC& fetc, STGMEDIUM& stgmedium )
+{
+
+}
+
+//------------------------------------------------------------------------
// IDataObject->EnumFormatEtc
//------------------------------------------------------------------------
diff --git a/dtrans/source/win32/dtobj/XTDataObject.hxx b/dtrans/source/win32/dtobj/XTDataObject.hxx
index ef572f495080..409b68159057 100644
--- a/dtrans/source/win32/dtobj/XTDataObject.hxx
+++ b/dtrans/source/win32/dtobj/XTDataObject.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XTDataObject.hxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: tra $ $Date: 2001-03-16 16:31:24 $
+ * last change: $Author: tra $ $Date: 2001-03-19 13:02:38 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -152,6 +152,11 @@ private:
void SAL_CALL renderUnicodeAndSetupStgMedium( FORMATETC& fetc, STGMEDIUM& stgmedium );
void SAL_CALL renderAnyDataAndSetupStgMedium( FORMATETC& fetc, STGMEDIUM& stgmedium );
+ HRESULT SAL_CALL renderSynthesizedFormatAndSetupStgMedium( FORMATETC& fetc, STGMEDIUM& stgmedium );
+ void SAL_CALL renderSynthesizedUnicodeAndSetupStgMedium( FORMATETC& fetc, STGMEDIUM& stgmedium );
+ void SAL_CALL renderSynthesizedTextAndSetupStgMedium( FORMATETC& fetc, STGMEDIUM& stgmedium );
+ void SAL_CALL renderSynthesizedHtmlAndSetupStgMedium( FORMATETC& fetc, STGMEDIUM& stgmedium );
+
void SAL_CALL setupStgMedium( const FORMATETC& fetc,
CStgTransferHelper& stgTransHlp,
STGMEDIUM& stgmedium );
diff --git a/dtrans/source/win32/misc/ImplHelper.cxx b/dtrans/source/win32/misc/ImplHelper.cxx
index b72f6c64568b..0d7888cb6984 100644
--- a/dtrans/source/win32/misc/ImplHelper.cxx
+++ b/dtrans/source/win32/misc/ImplHelper.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ImplHelper.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: tra $ $Date: 2001-03-19 09:12:05 $
+ * last change: $Author: tra $ $Date: 2001-03-19 13:03:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -108,24 +108,28 @@ using ::rtl::OString;
sal_uInt32 SAL_CALL getWinCPFromMimeCharset( const OUString& charset )
{
- OString osCharset(
- charset.getStr( ), charset.getLength( ), RTL_TEXTENCODING_ASCII_US );
+ sal_uInt32 winCP = GetACP( );
- rtl_TextEncoding txtEnc =
- rtl_getTextEncodingFromMimeCharset( osCharset.getStr( ) );
+ if ( charset.getLength( ) )
+ {
+ OString osCharset(
+ charset.getStr( ), charset.getLength( ), RTL_TEXTENCODING_ASCII_US );
- sal_uInt32 winChrs = rtl_getBestWindowsCharsetFromTextEncoding( txtEnc );
+ rtl_TextEncoding txtEnc =
+ rtl_getTextEncodingFromMimeCharset( osCharset.getStr( ) );
- CHARSETINFO chrsInf;
- sal_Bool bRet = TranslateCharsetInfo(
- (DWORD*)winChrs, &chrsInf, TCI_SRCCHARSET );
+ sal_uInt32 winChrs = rtl_getBestWindowsCharsetFromTextEncoding( txtEnc );
- // if one of the above functions fails
- // we will return the current ANSI codepage
- // of this thread
- sal_uInt32 winCP = GetACP( );
- if ( bRet )
- winCP = chrsInf.ciACP;
+ CHARSETINFO chrsInf;
+ sal_Bool bRet = TranslateCharsetInfo(
+ (DWORD*)winChrs, &chrsInf, TCI_SRCCHARSET );
+
+ // if one of the above functions fails
+ // we will return the current ANSI codepage
+ // of this thread
+ if ( bRet )
+ winCP = chrsInf.ciACP;
+ }
return winCP;
}
diff --git a/dtrans/source/win32/mtaole/MtaOleClipb.cxx b/dtrans/source/win32/mtaole/MtaOleClipb.cxx
index 6b104ec91ff8..8d11cb4c13b2 100644
--- a/dtrans/source/win32/mtaole/MtaOleClipb.cxx
+++ b/dtrans/source/win32/mtaole/MtaOleClipb.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: MtaOleClipb.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: tra $ $Date: 2001-03-19 09:12:22 $
+ * last change: $Author: tra $ $Date: 2001-03-19 13:01:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -90,7 +90,7 @@ using osl::Condition;
// defines
//----------------------------------------------------------------
-#define HIDDEN_CB_WNDCLS_NAME L"MtaOleReqWnd_920896680C9449"
+#define HIDDEN_CB_WNDCLS_NAME "MtaOleReqWnd_920896680C9449"
#define CLIPSERVICE_DLL_NAME "sysdtrans.dll"
//--------------------------------------------------------
@@ -633,8 +633,9 @@ LRESULT CALLBACK CMtaOleClipboard::mtaOleReqWndProc( HWND hWnd, UINT uMsg, WPARA
void CMtaOleClipboard::createMtaOleReqWnd( )
{
- WNDCLASSEXW wcex;
- sal_Unicode szWndClsName[] = HIDDEN_CB_WNDCLS_NAME;
+ WNDCLASSEXA wcex;
+ //sal_Unicode szWndClsName[] = HIDDEN_CB_WNDCLS_NAME;
+ char szWndClsName[] = HIDDEN_CB_WNDCLS_NAME;
HINSTANCE hInst = GetModuleHandleA( CLIPSERVICE_DLL_NAME );
OSL_ENSURE( NULL != hInst, "The name of the clipboard service dll must have changed" );
@@ -646,10 +647,10 @@ void CMtaOleClipboard::createMtaOleReqWnd( )
wcex.hInstance = hInst;
wcex.lpszClassName = szWndClsName;
- ATOM atom = RegisterClassExW( &wcex );
+ ATOM atom = RegisterClassExA( &wcex );
if ( 0 != atom )
- m_hwndMtaOleReqWnd = CreateWindowExW(
- 0, szWndClsName, TEXT(""), 0, 0, 0, 0, 0, NULL, NULL, hInst, NULL );
+ m_hwndMtaOleReqWnd = CreateWindowExA(
+ 0, szWndClsName,"", 0, 0, 0, 0, 0, NULL, NULL, hInst, NULL );
}
//--------------------------------------------------------------------