Tag: cws_src680_dba24 User: fs Date: 05/03/03 03:30:24 Modified: /dba/dbaccess/source/filter/xml/ dbloader2.cxx
Log: #i43975# properly determine the Interactive flag when creating a new database document File Changes: Directory: /dba/dbaccess/source/filter/xml/ =========================================== File [changed]: dbloader2.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/filter/xml/dbloader2.cxx?r1=1.5.18.4&r2=1.5.18.5 Delta lines: +28 -3 -------------------- --- dbloader2.cxx 23 Feb 2005 07:41:48 -0000 1.5.18.4 +++ dbloader2.cxx 3 Mar 2005 11:30:21 -0000 1.5.18.5 @@ -2,9 +2,9 @@ * * $RCSfile: dbloader2.cxx,v $ * - * $Revision: 1.5.18.4 $ + * $Revision: 1.5.18.5 $ * - * last change: $Author: oj $ $Date: 2005/02/23 07:41:48 $ + * last change: $Author: fs $ $Date: 2005/03/03 11:30:21 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -125,6 +125,9 @@ #ifndef _COM_SUN_STAR_DOCUMENT_XFILTER_HPP_ #include <com/sun/star/document/XFilter.hpp> #endif +#ifndef _COM_SUN_STAR_UTIL_XURLTRANSFORMER_HPP_ +#include <com/sun/star/util/XURLTransformer.hpp> +#endif #ifndef _COM_SUN_STAR_REGISTRY_XREGISTRYKEY_HPP_ #include <com/sun/star/registry/XRegistryKey.hpp> @@ -186,6 +189,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::ucb; using namespace ::com::sun::star::io; +using namespace ::com::sun::star::util; using namespace ::com::sun::star::frame; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; @@ -416,7 +420,28 @@ aCreationArgs[0] <<= NamedValue(INFO_POOLURL,makeAny(rURL)); } else - bInteractive = rURL.match(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("?Interactive")), SvtModuleOptions().GetFactoryEmptyDocumentURL(SvtModuleOptions::E_DATABASE).getLength() ); + { + try + { + Reference< XURLTransformer > xTransformer( + m_xServiceFactory->createInstance( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ) ) ), + UNO_QUERY + ); + OSL_ENSURE( xTransformer.is(), "DBContentLoader::load: could not create an URLTransformer!" ); + if ( xTransformer.is() ) + { + URL aURL; + aURL.Complete = m_aURL; + xTransformer->parseStrict( aURL ); + bInteractive = aURL.Arguments.equalsAscii( "Interactive" ); + } + } + catch( const Exception& ) + { + OSL_ENSURE( sal_False, "DBContentLoader::load: caught an exception while analyzing the URL!" ); + } + } xDocumentDataSource.set(xDatabaseContext->createInstanceWithArguments(aCreationArgs),UNO_QUERY_THROW); xModel.set(xDocumentDataSource->getDatabaseDocument(),UNO_QUERY); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
