From 06e5db9ab658ba7137bb3c186c53b64347fc76a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Timm?= Date: Fri, 6 Jul 2007 09:11:44 +0000 Subject: [PATCH] INTEGRATION: CWS oj14 (1.6.24); FILE MERGED 2007/04/05 08:08:00 lla 1.6.24.4: #146843# remove confighelper.hxx 2006/11/07 08:43:42 oj 1.6.24.3: RESYNC: (1.7-1.10); FILE MERGED 2006/07/04 07:25:55 oj 1.6.24.2: RESYNC: (1.6-1.7); FILE MERGED 2006/03/20 08:42:53 oj 1.6.24.1: use mimeconfighelper --- embeddedobj/source/msole/xdialogcreator.cxx | 56 ++++++++++++--------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/embeddedobj/source/msole/xdialogcreator.cxx b/embeddedobj/source/msole/xdialogcreator.cxx index 34854a809f95..c4a7fcfcebbf 100644 --- a/embeddedobj/source/msole/xdialogcreator.cxx +++ b/embeddedobj/source/msole/xdialogcreator.cxx @@ -4,9 +4,9 @@ * * $RCSfile: xdialogcreator.cxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: obo $ $Date: 2006-10-13 11:31:52 $ + * last change: $Author: rt $ $Date: 2007-07-06 10:11:44 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -65,10 +65,16 @@ #include #include "platform.h" -#include +#ifndef _COMPHELPER_MIMECONFIGHELPER_HXX_ +#include +#endif + +#include "xdialogcreator.hxx" +#include "oleembobj.hxx" +// LLA: tip from FS +// #include #include #include -#include #ifdef WNT @@ -98,39 +104,39 @@ typedef UINT STDAPICALLTYPE OleUIInsertObjectA_Type(LPOLEUIINSERTOBJECTA); using namespace ::com::sun::star; - +using namespace ::comphelper; //------------------------------------------------------------------------- uno::Sequence< sal_Int8 > GetRelatedInternalID_Impl( const uno::Sequence< sal_Int8 >& aClassID ) { // Writer - if ( ClassIDsEqual( aClassID, GetSequenceClassID( SO3_SW_OLE_EMBED_CLASSID_60 ) ) - || ClassIDsEqual( aClassID, GetSequenceClassID( SO3_SW_OLE_EMBED_CLASSID_8 ) ) ) - return GetSequenceClassID( SO3_SW_CLASSID_60 ); + if ( MimeConfigurationHelper::ClassIDsEqual( aClassID, MimeConfigurationHelper::GetSequenceClassID( SO3_SW_OLE_EMBED_CLASSID_60 ) ) + || MimeConfigurationHelper::ClassIDsEqual( aClassID, MimeConfigurationHelper::GetSequenceClassID( SO3_SW_OLE_EMBED_CLASSID_8 ) ) ) + return MimeConfigurationHelper::GetSequenceClassID( SO3_SW_CLASSID_60 ); // Calc - if ( ClassIDsEqual( aClassID, GetSequenceClassID( SO3_SC_OLE_EMBED_CLASSID_60 ) ) - || ClassIDsEqual( aClassID, GetSequenceClassID( SO3_SC_OLE_EMBED_CLASSID_8 ) ) ) - return GetSequenceClassID( SO3_SC_CLASSID_60 ); + if ( MimeConfigurationHelper::ClassIDsEqual( aClassID, MimeConfigurationHelper::GetSequenceClassID( SO3_SC_OLE_EMBED_CLASSID_60 ) ) + || MimeConfigurationHelper::ClassIDsEqual( aClassID, MimeConfigurationHelper::GetSequenceClassID( SO3_SC_OLE_EMBED_CLASSID_8 ) ) ) + return MimeConfigurationHelper::GetSequenceClassID( SO3_SC_CLASSID_60 ); // Impress - if ( ClassIDsEqual( aClassID, GetSequenceClassID( SO3_SIMPRESS_OLE_EMBED_CLASSID_60 ) ) - || ClassIDsEqual( aClassID, GetSequenceClassID( SO3_SIMPRESS_OLE_EMBED_CLASSID_8 ) ) ) - return GetSequenceClassID( SO3_SIMPRESS_CLASSID_60 ); + if ( MimeConfigurationHelper::ClassIDsEqual( aClassID, MimeConfigurationHelper::GetSequenceClassID( SO3_SIMPRESS_OLE_EMBED_CLASSID_60 ) ) + || MimeConfigurationHelper::ClassIDsEqual( aClassID, MimeConfigurationHelper::GetSequenceClassID( SO3_SIMPRESS_OLE_EMBED_CLASSID_8 ) ) ) + return MimeConfigurationHelper::GetSequenceClassID( SO3_SIMPRESS_CLASSID_60 ); // Draw - if ( ClassIDsEqual( aClassID, GetSequenceClassID( SO3_SDRAW_OLE_EMBED_CLASSID_60 ) ) - || ClassIDsEqual( aClassID, GetSequenceClassID( SO3_SDRAW_OLE_EMBED_CLASSID_8 ) ) ) - return GetSequenceClassID( SO3_SDRAW_CLASSID_60 ); + if ( MimeConfigurationHelper::ClassIDsEqual( aClassID, MimeConfigurationHelper::GetSequenceClassID( SO3_SDRAW_OLE_EMBED_CLASSID_60 ) ) + || MimeConfigurationHelper::ClassIDsEqual( aClassID, MimeConfigurationHelper::GetSequenceClassID( SO3_SDRAW_OLE_EMBED_CLASSID_8 ) ) ) + return MimeConfigurationHelper::GetSequenceClassID( SO3_SDRAW_CLASSID_60 ); // Chart - if ( ClassIDsEqual( aClassID, GetSequenceClassID( SO3_SCH_OLE_EMBED_CLASSID_60 ) ) - || ClassIDsEqual( aClassID, GetSequenceClassID( SO3_SCH_OLE_EMBED_CLASSID_8 ) ) ) - return GetSequenceClassID( SO3_SCH_CLASSID_60 ); + if ( MimeConfigurationHelper::ClassIDsEqual( aClassID, MimeConfigurationHelper::GetSequenceClassID( SO3_SCH_OLE_EMBED_CLASSID_60 ) ) + || MimeConfigurationHelper::ClassIDsEqual( aClassID, MimeConfigurationHelper::GetSequenceClassID( SO3_SCH_OLE_EMBED_CLASSID_8 ) ) ) + return MimeConfigurationHelper::GetSequenceClassID( SO3_SCH_CLASSID_60 ); // Math - if ( ClassIDsEqual( aClassID, GetSequenceClassID( SO3_SM_OLE_EMBED_CLASSID_60 ) ) - || ClassIDsEqual( aClassID, GetSequenceClassID( SO3_SM_OLE_EMBED_CLASSID_8 ) ) ) - return GetSequenceClassID( SO3_SM_CLASSID_60 ); + if ( MimeConfigurationHelper::ClassIDsEqual( aClassID, MimeConfigurationHelper::GetSequenceClassID( SO3_SM_OLE_EMBED_CLASSID_60 ) ) + || MimeConfigurationHelper::ClassIDsEqual( aClassID, MimeConfigurationHelper::GetSequenceClassID( SO3_SM_OLE_EMBED_CLASSID_8 ) ) ) + return MimeConfigurationHelper::GetSequenceClassID( SO3_SM_CLASSID_60 ); return aClassID; } @@ -222,7 +228,7 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia if ( !xEmbCreator.is() ) throw uno::RuntimeException(); - uno::Sequence< sal_Int8 > aClassID = GetSequenceClassID( io.clsid.Data1, + uno::Sequence< sal_Int8 > aClassID = MimeConfigurationHelper::GetSequenceClassID( io.clsid.Data1, io.clsid.Data2, io.clsid.Data3, io.clsid.Data4[0], @@ -255,7 +261,7 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia // TODO: use config helper for type detection uno::Reference< embed::XEmbedObjectCreator > xEmbCreator; - ConfigurationHelper aHelper( m_xFactory ); + ::comphelper::MimeConfigurationHelper aHelper( m_xFactory ); if ( aHelper.AddFilterNameCheckOwnFile( aMediaDescr ) ) xEmbCreator = uno::Reference< embed::XEmbedObjectCreator >(