Tag: odbmacros_2_5 User: fs Date: 2008-02-26 14:15:34+0000 Modified: dba/dbaccess/source/ui/misc/linkeddocuments.cxx
Log: #i49133# openForMail is deprecated, use the new 'Hidden' argument instead File Changes: Directory: /dba/dbaccess/source/ui/misc/ ======================================== File [changed]: linkeddocuments.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/misc/linkeddocuments.cxx?r1=1.27.16.1&r2=1.27.16.2 Delta lines: +28 -20 --------------------- --- linkeddocuments.cxx 2008-02-20 13:28:03+0000 1.27.16.1 +++ linkeddocuments.cxx 2008-02-26 14:15:32+0000 1.27.16.2 @@ -4,9 +4,9 @@ * * $RCSfile: linkeddocuments.cxx,v $ * - * $Revision: 1.27.16.1 $ + * $Revision: 1.27.16.2 $ * - * last change: $Author: fs $ $Date: 2008/02/20 13:28:03 $ + * last change: $Author: fs $ $Date: 2008/02/26 14:15:32 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -48,6 +48,9 @@ #include "dbustrings.hrc" #endif #include <comphelper/classids.hxx> +#ifndef COMPHELPER_NAMEDVALUECOLLECTION_HXX +#include <comphelper/namedvaluecollection.hxx> +#endif #ifndef _COM_SUN_STAR_LANG_XSINGLESERVICEFACTORY_HPP_ #include <com/sun/star/lang/XSingleServiceFactory.hpp> #endif @@ -232,25 +235,30 @@ return xRet; WaitObject aWaitCursor( m_pDialogParent ); - Sequence< PropertyValue > aArguments(2); - aArguments[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OpenMode")); - switch(_eOpenMode) + ::comphelper::NamedValueCollection aArguments; + ::rtl::OUString sOpenMode; + switch ( _eOpenMode ) { case OPEN_NORMAL: - aArguments[0].Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("open")); + sOpenMode = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "open" ) ); break; + + case OPEN_FORMAIL: + aArguments.put( "Hidden", true ); + // fall through + case OPEN_DESIGN: - aArguments[0].Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("openDesign")); + sOpenMode = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "openDesign" ) ); break; - case OPEN_FORMAIL: - aArguments[0].Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("openForMail")); + + default: + OSL_ENSURE( false, "OLinkedDocumentsAccess::implOpen: invalid open mode!" ); break; } + aArguments.put( "OpenMode", sOpenMode ); - aArguments[1].Name = PROPERTY_ACTIVE_CONNECTION; - aArguments[1].Value <<= m_xConnection; - OSL_ENSURE(m_xDocumentContainer.is(), "OLinkedDocumentsAccess::OLinkedDocumentsAccess: invalid document container!"); + aArguments.put( (::rtl::OUString)PROPERTY_ACTIVE_CONNECTION, m_xConnection ); try { Reference<XHierarchicalNameContainer> xHier(m_xDocumentContainer,UNO_QUERY); @@ -258,7 +266,7 @@ { _xDefinition.set(xHier->getByHierarchicalName(_rLinkName),UNO_QUERY); } - xRet = xComponentLoader->loadComponentFromURL(_rLinkName,::rtl::OUString(),0,aArguments); + xRet = xComponentLoader->loadComponentFromURL( _rLinkName, ::rtl::OUString(), 0, aArguments.getPropertyValues() ); } catch(Exception& e) { --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
