diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-11-13 08:52:41 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-11-14 11:13:24 +0100 |
commit | 24cad6a6490b245bd88ec3e3c87195628914f6a2 (patch) | |
tree | 12d9e7ec629054f5ad0a6990783d3e639449afeb | |
parent | 8061c8c70b7ffcd8f472d2f5b909911f2095fec7 (diff) |
Move MediaDescriptor from comphelper to unotools
...so it will be able to use SvtSecurityOptions internally.
Change-Id: Id7433247e8fc53651935578510bedbcca5aa2ac9
80 files changed, 346 insertions, 360 deletions
diff --git a/avmedia/source/framework/soundhandler.cxx b/avmedia/source/framework/soundhandler.cxx index b9e76a2c052f..06658e9ad948 100644 --- a/avmedia/source/framework/soundhandler.cxx +++ b/avmedia/source/framework/soundhandler.cxx @@ -19,7 +19,7 @@ #include "soundhandler.hxx" -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <com/sun/star/io/XInputStream.hpp> #include <com/sun/star/frame/DispatchResultState.hpp> @@ -267,10 +267,10 @@ void SAL_CALL SoundHandler::dispatchWithNotification(const css::util::URL& { //close streams otherwise on windows we can't reopen the file in the //media player when we pass the url to directx as it'll already be open - ::comphelper::MediaDescriptor aDescriptor(lDescriptor); + utl::MediaDescriptor aDescriptor(lDescriptor); css::uno::Reference< css::io::XInputStream > xInputStream = - aDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_INPUTSTREAM(), + aDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_INPUTSTREAM(), css::uno::Reference< css::io::XInputStream >()); if (xInputStream.is()) xInputStream->closeInput(); } @@ -344,8 +344,8 @@ OUString SAL_CALL SoundHandler::detect( css::uno::Sequence< css::beans::Property OUString sTypeName; // Analyze given descriptor to find filename or input stream or ... - ::comphelper::MediaDescriptor aDescriptor(lDescriptor); - OUString sURL = aDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_URL(), OUString()); + utl::MediaDescriptor aDescriptor(lDescriptor); + OUString sURL = aDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_URL(), OUString()); if ( (sURL.getLength() ) && @@ -357,7 +357,7 @@ OUString SAL_CALL SoundHandler::detect( css::uno::Sequence< css::beans::Property // a) look for given extension of url to map our type decision HARD CODED!!! // b) return preferred type every time... it's easy :-) sTypeName = "wav_Wave_Audio_File"; - aDescriptor[::comphelper::MediaDescriptor::PROP_TYPENAME()] <<= sTypeName; + aDescriptor[utl::MediaDescriptor::PROP_TYPENAME()] <<= sTypeName; aDescriptor >> lDescriptor; } diff --git a/chart2/inc/pch/precompiled_chartcontroller.hxx b/chart2/inc/pch/precompiled_chartcontroller.hxx index 60b8d4e9a613..d4493754bf04 100644 --- a/chart2/inc/pch/precompiled_chartcontroller.hxx +++ b/chart2/inc/pch/precompiled_chartcontroller.hxx @@ -157,7 +157,6 @@ #include <com/sun/star/util/XUpdatable.hpp> #include <com/sun/star/view/XSelectionSupplier.hpp> #include <comphelper/InlineContainer.hxx> -#include <comphelper/mediadescriptor.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/property.hxx> #include <comphelper/servicehelper.hxx> @@ -301,6 +300,7 @@ #include <tools/gen.hxx> #include <unotools/configitem.hxx> #include <unotools/lingucfg.hxx> +#include <unotools/mediadescriptor.hxx> #include <unotools/pathoptions.hxx> #include <unotools/streamwrap.hxx> #include <unotools/syslocale.hxx> diff --git a/chart2/inc/pch/precompiled_chartcore.hxx b/chart2/inc/pch/precompiled_chartcore.hxx index 30deeb9d30e2..9aaa7efe5ffa 100644 --- a/chart2/inc/pch/precompiled_chartcore.hxx +++ b/chart2/inc/pch/precompiled_chartcore.hxx @@ -209,7 +209,6 @@ #include <comphelper/classids.hxx> #include <comphelper/documentconstants.hxx> #include <comphelper/genericpropertyset.hxx> -#include <comphelper/mediadescriptor.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/propertysetinfo.hxx> #include <comphelper/scopeguard.hxx> diff --git a/chart2/source/controller/main/ChartFrameloader.cxx b/chart2/source/controller/main/ChartFrameloader.cxx index 8c1c609dcdff..8f2f027136f9 100644 --- a/chart2/source/controller/main/ChartFrameloader.cxx +++ b/chart2/source/controller/main/ChartFrameloader.cxx @@ -21,7 +21,7 @@ #include "servicenames.hxx" #include "MediaDescriptorHelper.hxx" #include "macros.hxx" -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <com/sun/star/document/XImporter.hpp> #include <com/sun/star/document/XFilter.hpp> #include <com/sun/star/frame/XLoadable.hpp> @@ -78,9 +78,9 @@ APPHELPER_XSERVICEINFO_IMPL(ChartFrameLoader,CHART_FRAMELOADER_SERVICE_IMPLEMENT uno::Reference< frame::XModel > xModel; bool bHaveLoadedModel = false; - comphelper::MediaDescriptor aMediaDescriptor(rMediaDescriptor); + utl::MediaDescriptor aMediaDescriptor(rMediaDescriptor); { - comphelper::MediaDescriptor::const_iterator aIt( aMediaDescriptor.find( aMediaDescriptor.PROP_MODEL())); + utl::MediaDescriptor::const_iterator aIt( aMediaDescriptor.find( aMediaDescriptor.PROP_MODEL())); if( aIt != aMediaDescriptor.end()) { xModel.set( (*aIt).second.get< uno::Reference< frame::XModel > >()); @@ -136,7 +136,7 @@ APPHELPER_XSERVICEINFO_IMPL(ChartFrameLoader,CHART_FRAMELOADER_SERVICE_IMPLEMENT if(!bHaveLoadedModel) try { - comphelper::MediaDescriptor::const_iterator aIt( aMediaDescriptor.find( aMediaDescriptor.PROP_URL())); + utl::MediaDescriptor::const_iterator aIt( aMediaDescriptor.find( aMediaDescriptor.PROP_URL())); if( aIt != aMediaDescriptor.end()) { OUString aURL( (*aIt).second.get< OUString >()); diff --git a/chart2/source/model/filter/XMLFilter.cxx b/chart2/source/model/filter/XMLFilter.cxx index 6dc08718f0ea..cee36faa2378 100644 --- a/chart2/source/model/filter/XMLFilter.cxx +++ b/chart2/source/model/filter/XMLFilter.cxx @@ -21,7 +21,6 @@ #include "macros.hxx" #include "MediaDescriptorHelper.hxx" #include "ContainerHelper.hxx" -#include <comphelper/mediadescriptor.hxx> // for ERRCODE_SFX_GENERAL etc. // header contains only macros diff --git a/comphelper/Library_comphelper.mk b/comphelper/Library_comphelper.mk index 4fdada8f7cfa..e388a7fafce3 100644 --- a/comphelper/Library_comphelper.mk +++ b/comphelper/Library_comphelper.mk @@ -91,7 +91,6 @@ $(eval $(call gb_Library_add_exception_objects,comphelper,\ comphelper/source/misc/interaction \ comphelper/source/misc/listenernotification \ comphelper/source/misc/logging \ - comphelper/source/misc/mediadescriptor \ comphelper/source/misc/mimeconfighelper \ comphelper/source/misc/namedvaluecollection \ comphelper/source/misc/numberedcollection \ diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx index c553759bd582..ba4ec618306f 100644 --- a/dbaccess/source/core/dataaccess/ModelImpl.cxx +++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx @@ -44,7 +44,6 @@ #include <com/sun/star/util/NumberFormatsSupplier.hpp> #include <comphelper/interaction.hxx> -#include <comphelper/mediadescriptor.hxx> #include <comphelper/seqstream.hxx> #include <comphelper/sequence.hxx> #include <connectivity/dbexception.hxx> diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index 7d2bb79a22ef..0b7dd0afa964 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -66,7 +66,6 @@ #include <comphelper/enumhelper.hxx> #include <comphelper/genericpropertyset.hxx> #include <comphelper/interaction.hxx> -#include <comphelper/mediadescriptor.hxx> #include <comphelper/namedvaluecollection.hxx> #include <comphelper/numberedcollection.hxx> #include <comphelper/property.hxx> diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx index 48e035c75801..941443a3f173 100644 --- a/dbaccess/source/core/dataaccess/documentdefinition.cxx +++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx @@ -25,7 +25,6 @@ #include <osl/diagnose.h> #include <comphelper/property.hxx> #include <comphelper/sequence.hxx> -#include <comphelper/mediadescriptor.hxx> #include <comphelper/namedvaluecollection.hxx> #include <comphelper/classids.hxx> #include <com/sun/star/frame/XUntitledNumbers.hpp> diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx index 6072124df86b..c33332ca64b2 100644 --- a/desktop/source/app/dispatchwatcher.cxx +++ b/desktop/source/app/dispatchwatcher.cxx @@ -48,7 +48,7 @@ #include <com/sun/star/frame/XStorable.hpp> #include <tools/urlobj.hxx> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <vector> #include <osl/thread.hxx> @@ -231,7 +231,7 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch if ( !aDispatchRequest.aPreselectedFactory.isEmpty() ) { - aArgs[nCount-1].Name = ::comphelper::MediaDescriptor::PROP_DOCUMENTSERVICE(); + aArgs[nCount-1].Name = utl::MediaDescriptor::PROP_DOCUMENTSERVICE(); aArgs[nCount-1].Value <<= aDispatchRequest.aPreselectedFactory; } diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx index efb4051474fb..c6258e6cb227 100644 --- a/filter/source/config/cache/typedetection.cxx +++ b/filter/source/config/cache/typedetection.cxx @@ -370,14 +370,14 @@ OUString SAL_CALL TypeDetection::queryTypeByDescriptor(css::uno::Sequence< css:: throw (css::uno::RuntimeException) { // make the descriptor more useable :-) - ::comphelper::MediaDescriptor stlDescriptor(lDescriptor); + utl::MediaDescriptor stlDescriptor(lDescriptor); // SAFE -> ---------------------------------- ::osl::ResettableMutexGuard aLock(m_aLock); //******************************************* // parse given URL to split it into e.g. main and jump marks ... - OUString sURL = stlDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_URL(), OUString()); + OUString sURL = stlDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_URL(), OUString()); #if OSL_DEBUG_LEVEL > 0 if (stlDescriptor.find( "FileName" ) != stlDescriptor.end()) @@ -390,13 +390,13 @@ OUString SAL_CALL TypeDetection::queryTypeByDescriptor(css::uno::Sequence< css:: xParser->parseStrict(aURL); OUString aSelectedFilter = stlDescriptor.getUnpackedValueOrDefault( - comphelper::MediaDescriptor::PROP_FILTERNAME(), OUString()); + utl::MediaDescriptor::PROP_FILTERNAME(), OUString()); if (!aSelectedFilter.isEmpty()) { // Caller specified the filter type. Honor it. Just get the default // type for that filter, and bail out. if (impl_validateAndSetFilterOnDescriptor(stlDescriptor, aSelectedFilter)) - return stlDescriptor[comphelper::MediaDescriptor::PROP_TYPENAME()].get<OUString>(); + return stlDescriptor[utl::MediaDescriptor::PROP_TYPENAME()].get<OUString>(); } FlatDetection lFlatTypes; @@ -466,13 +466,13 @@ OUString SAL_CALL TypeDetection::queryTypeByDescriptor(css::uno::Sequence< css:: -void TypeDetection::impl_checkResultsAndAddBestFilter(::comphelper::MediaDescriptor& rDescriptor, +void TypeDetection::impl_checkResultsAndAddBestFilter(utl::MediaDescriptor& rDescriptor, OUString& sType ) { // a) // Dont overwrite a might preselected filter! OUString sFilter = rDescriptor.getUnpackedValueOrDefault( - ::comphelper::MediaDescriptor::PROP_FILTERNAME(), + utl::MediaDescriptor::PROP_FILTERNAME(), OUString()); if (!sFilter.isEmpty()) return; @@ -481,7 +481,7 @@ void TypeDetection::impl_checkResultsAndAddBestFilter(::comphelper::MediaDescrip // check a preselected document service too. // Then we have to search a suitable filter witin this module. OUString sDocumentService = rDescriptor.getUnpackedValueOrDefault( - ::comphelper::MediaDescriptor::PROP_DOCUMENTSERVICE(), + utl::MediaDescriptor::PROP_DOCUMENTSERVICE(), OUString()); if (!sDocumentService.isEmpty()) { @@ -528,8 +528,8 @@ void TypeDetection::impl_checkResultsAndAddBestFilter(::comphelper::MediaDescrip if (!sFilter.isEmpty()) { - rDescriptor[::comphelper::MediaDescriptor::PROP_TYPENAME() ] <<= sRealType; - rDescriptor[::comphelper::MediaDescriptor::PROP_FILTERNAME()] <<= sFilter; + rDescriptor[utl::MediaDescriptor::PROP_TYPENAME() ] <<= sRealType; + rDescriptor[utl::MediaDescriptor::PROP_FILTERNAME()] <<= sFilter; sType = sRealType; return; } @@ -559,8 +559,8 @@ void TypeDetection::impl_checkResultsAndAddBestFilter(::comphelper::MediaDescrip // <- SAFE // no exception => found valid type and filter => set it on the given descriptor - rDescriptor[::comphelper::MediaDescriptor::PROP_TYPENAME() ] <<= sType ; - rDescriptor[::comphelper::MediaDescriptor::PROP_FILTERNAME()] <<= sFilter; + rDescriptor[utl::MediaDescriptor::PROP_TYPENAME() ] <<= sType ; + rDescriptor[utl::MediaDescriptor::PROP_FILTERNAME()] <<= sFilter; return; } catch(const css::uno::Exception&) @@ -614,8 +614,8 @@ void TypeDetection::impl_checkResultsAndAddBestFilter(::comphelper::MediaDescrip if (!sFilter.isEmpty()) { - rDescriptor[::comphelper::MediaDescriptor::PROP_TYPENAME() ] <<= sType ; - rDescriptor[::comphelper::MediaDescriptor::PROP_FILTERNAME()] <<= sFilter; + rDescriptor[utl::MediaDescriptor::PROP_TYPENAME() ] <<= sType ; + rDescriptor[utl::MediaDescriptor::PROP_FILTERNAME()] <<= sFilter; return; } } @@ -797,7 +797,7 @@ OUString TypeDetection::impl_getTypeFromFilter(const OUString& rFilterName) } void TypeDetection::impl_getAllFormatTypes( - const util::URL& aParsedURL, comphelper::MediaDescriptor& rDescriptor, FlatDetection& rFlatTypes) + const util::URL& aParsedURL, utl::MediaDescriptor& rDescriptor, FlatDetection& rFlatTypes) { rFlatTypes.clear(); @@ -858,19 +858,19 @@ void TypeDetection::impl_getAllFormatTypes( rFlatTypes.unique(EqualByType()); // Mark pre-selected type (if any) to have it prioritized. - OUString sSelectedType = rDescriptor.getUnpackedValueOrDefault(comphelper::MediaDescriptor::PROP_TYPENAME(), OUString()); + OUString sSelectedType = rDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_TYPENAME(), OUString()); if (!sSelectedType.isEmpty()) impl_getPreselectionForType(sSelectedType, aParsedURL, rFlatTypes, false); // Mark all types preferred by the current document service, to have it prioritized. - OUString sSelectedDoc = rDescriptor.getUnpackedValueOrDefault(comphelper::MediaDescriptor::PROP_DOCUMENTSERVICE(), OUString()); + OUString sSelectedDoc = rDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_DOCUMENTSERVICE(), OUString()); if (!sSelectedDoc.isEmpty()) impl_getPreselectionForDocumentService(sSelectedDoc, aParsedURL, rFlatTypes); } -OUString TypeDetection::impl_detectTypeFlatAndDeep( ::comphelper::MediaDescriptor& rDescriptor , +OUString TypeDetection::impl_detectTypeFlatAndDeep( utl::MediaDescriptor& rDescriptor , const FlatDetection& lFlatTypes , sal_Bool bAllowDeep , OUStringList& rUsedDetectors, @@ -957,12 +957,12 @@ OUString TypeDetection::impl_detectTypeFlatAndDeep( ::comphelper::MediaDesc // <- SAFE ---------------------------------- } -void TypeDetection::impl_seekStreamToZero(comphelper::MediaDescriptor& rDescriptor) +void TypeDetection::impl_seekStreamToZero(utl::MediaDescriptor& rDescriptor) { // try to seek to 0 ... // But because XSeekable is an optional interface ... try it only .-) css::uno::Reference< css::io::XInputStream > xStream = rDescriptor.getUnpackedValueOrDefault( - ::comphelper::MediaDescriptor::PROP_INPUTSTREAM(), + utl::MediaDescriptor::PROP_INPUTSTREAM(), css::uno::Reference< css::io::XInputStream >()); css::uno::Reference< css::io::XSeekable > xSeek(xStream, css::uno::UNO_QUERY); if (xSeek.is()) @@ -982,7 +982,7 @@ void TypeDetection::impl_seekStreamToZero(comphelper::MediaDescriptor& rDescript } OUString TypeDetection::impl_askDetectService(const OUString& sDetectService, - ::comphelper::MediaDescriptor& rDescriptor ) + utl::MediaDescriptor& rDescriptor ) { // Open the stream and add it to the media descriptor if this method is called for the first time. // All following requests to this method will detect, that there already exists a stream .-) @@ -1068,21 +1068,21 @@ OUString TypeDetection::impl_askDetectService(const OUString& sDet -OUString TypeDetection::impl_askUserForTypeAndFilterIfAllowed(::comphelper::MediaDescriptor& rDescriptor) +OUString TypeDetection::impl_askUserForTypeAndFilterIfAllowed(utl::MediaDescriptor& rDescriptor) { css::uno::Reference< css::task::XInteractionHandler > xInteraction = - rDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_INTERACTIONHANDLER(), + rDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_INTERACTIONHANDLER(), css::uno::Reference< css::task::XInteractionHandler >()); if (!xInteraction.is()) return OUString(); OUString sURL = - rDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_URL(), + rDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_URL(), OUString()); css::uno::Reference< css::io::XInputStream > xStream = - rDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_INPUTSTREAM(), + rDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_INPUTSTREAM(), css::uno::Reference< css::io::XInputStream >()); // Dont distrub the user for "non existing files - means empty URLs" or @@ -1118,7 +1118,7 @@ OUString TypeDetection::impl_askUserForTypeAndFilterIfAllowed(::comphelper::Medi return OUString(); OUString sType; - rDescriptor[::comphelper::MediaDescriptor::PROP_TYPENAME()] >>= sType; + rDescriptor[utl::MediaDescriptor::PROP_TYPENAME()] >>= sType; return sType; } catch(const css::uno::Exception&) @@ -1129,12 +1129,12 @@ OUString TypeDetection::impl_askUserForTypeAndFilterIfAllowed(::comphelper::Medi -void TypeDetection::impl_openStream(::comphelper::MediaDescriptor& rDescriptor) +void TypeDetection::impl_openStream(utl::MediaDescriptor& rDescriptor) throw (css::uno::Exception) { sal_Bool bSuccess = sal_False; - OUString sURL = rDescriptor.getUnpackedValueOrDefault( ::comphelper::MediaDescriptor::PROP_URL(), OUString() ); - sal_Bool bRequestedReadOnly = rDescriptor.getUnpackedValueOrDefault( ::comphelper::MediaDescriptor::PROP_READONLY(), sal_False ); + OUString sURL = rDescriptor.getUnpackedValueOrDefault( utl::MediaDescriptor::PROP_URL(), OUString() ); + sal_Bool bRequestedReadOnly = rDescriptor.getUnpackedValueOrDefault( utl::MediaDescriptor::PROP_READONLY(), sal_False ); if ( !sURL.isEmpty() && ::utl::LocalFileHelper::IsLocalFile( INetURLObject( sURL ).GetMainURL( INetURLObject::NO_DECODE ) ) ) { // OOo uses own file locking mechanics in case of local file @@ -1154,16 +1154,16 @@ void TypeDetection::impl_openStream(::comphelper::MediaDescriptor& rDescriptor) // this argument should be either removed or an additional argument should be added so that application // can separate the case when the user explicitly requests readonly document. // The current solution is to remove it here. - rDescriptor.erase( ::comphelper::MediaDescriptor::PROP_READONLY() ); + rDescriptor.erase( utl::MediaDescriptor::PROP_READONLY() ); } } -void TypeDetection::impl_removeTypeFilterFromDescriptor(::comphelper::MediaDescriptor& rDescriptor) +void TypeDetection::impl_removeTypeFilterFromDescriptor(utl::MediaDescriptor& rDescriptor) { - ::comphelper::MediaDescriptor::iterator pItType = rDescriptor.find(::comphelper::MediaDescriptor::PROP_TYPENAME() ); - ::comphelper::MediaDescriptor::iterator pItFilter = rDescriptor.find(::comphelper::MediaDescriptor::PROP_FILTERNAME()); + utl::MediaDescriptor::iterator pItType = rDescriptor.find(utl::MediaDescriptor::PROP_TYPENAME() ); + utl::MediaDescriptor::iterator pItFilter = rDescriptor.find(utl::MediaDescriptor::PROP_FILTERNAME()); if (pItType != rDescriptor.end()) rDescriptor.erase(pItType); if (pItFilter != rDescriptor.end()) @@ -1172,14 +1172,14 @@ void TypeDetection::impl_removeTypeFilterFromDescriptor(::comphelper::MediaDescr -sal_Bool TypeDetection::impl_validateAndSetTypeOnDescriptor( ::comphelper::MediaDescriptor& rDescriptor, +sal_Bool TypeDetection::impl_validateAndSetTypeOnDescriptor( utl::MediaDescriptor& rDescriptor, const OUString& sType ) { // SAFE -> ::osl::ResettableMutexGuard aLock(m_aLock); if (m_rCache->hasItem(FilterCache::E_TYPE, sType)) { - rDescriptor[::comphelper::MediaDescriptor::PROP_TYPENAME()] <<= sType; + rDescriptor[utl::MediaDescriptor::PROP_TYPENAME()] <<= sType; return sal_True; } aLock.clear(); @@ -1192,7 +1192,7 @@ sal_Bool TypeDetection::impl_validateAndSetTypeOnDescriptor( ::comphelper:: -sal_Bool TypeDetection::impl_validateAndSetFilterOnDescriptor( ::comphelper::MediaDescriptor& rDescriptor, +sal_Bool TypeDetection::impl_validateAndSetFilterOnDescriptor( utl::MediaDescriptor& rDescriptor, const OUString& sFilter ) { try @@ -1209,8 +1209,8 @@ sal_Bool TypeDetection::impl_validateAndSetFilterOnDescriptor( ::comphelper // <- SAFE // found valid type and filter => set it on the given descriptor - rDescriptor[::comphelper::MediaDescriptor::PROP_TYPENAME() ] <<= sType ; - rDescriptor[::comphelper::MediaDescriptor::PROP_FILTERNAME()] <<= sFilter; + rDescriptor[utl::MediaDescriptor::PROP_TYPENAME() ] <<= sType ; + rDescriptor[utl::MediaDescriptor::PROP_FILTERNAME()] <<= sFilter; return sal_True; } catch(const css::container::NoSuchElementException&){} diff --git a/filter/source/config/cache/typedetection.hxx b/filter/source/config/cache/typedetection.hxx index f7f75dbfd38a..e9f8113c111e 100644 --- a/filter/source/config/cache/typedetection.hxx +++ b/filter/source/config/cache/typedetection.hxx @@ -22,7 +22,7 @@ #include "basecontainer.hxx" #include <com/sun/star/document/XTypeDetection.hpp> #include <com/sun/star/lang/XSingleServiceFactory.hpp> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <cppuhelper/implbase1.hxx> @@ -77,7 +77,7 @@ private: * Get all format types that we handle. */ void impl_getAllFormatTypes( - const com::sun::star::util::URL& aParsedURL, comphelper::MediaDescriptor& rDescriptor, + const com::sun::star::util::URL& aParsedURL, utl::MediaDescriptor& rDescriptor, FlatDetection& rFlatTypes); //--------------------------------------- @@ -126,7 +126,7 @@ private: An empty value if detection failed. .... but see rLastChance for additional returns! */ - OUString impl_detectTypeFlatAndDeep( ::comphelper::MediaDescriptor& rDescriptor , + OUString impl_detectTypeFlatAndDeep( utl::MediaDescriptor& rDescriptor , const FlatDetection& lFlatTypes , sal_Bool bAllowDeep , OUStringList& rUsedDetectors, @@ -144,7 +144,7 @@ private: @param rDescriptor a stl representation of the MediaDescriptor as in/out parameter. */ - void impl_seekStreamToZero(comphelper::MediaDescriptor& rDescriptor); + void impl_seekStreamToZero(utl::MediaDescriptor& rDescriptor); //--------------------------------------- @@ -166,7 +166,7 @@ private: a stl representation of the MediaDescriptor as in/out parameter. */ OUString impl_askDetectService(const OUString& sDetectService, - ::comphelper::MediaDescriptor& rDescriptor ); + utl::MediaDescriptor& rDescriptor ); //--------------------------------------- @@ -183,7 +183,7 @@ private: @return [string] a valid type name or an empty string if user canceled interaction. */ - OUString impl_askUserForTypeAndFilterIfAllowed(::comphelper::MediaDescriptor& rDescriptor); + OUString impl_askUserForTypeAndFilterIfAllowed(utl::MediaDescriptor& rDescriptor); //--------------------------------------- @@ -220,7 +220,7 @@ private: Note: If an interactionHandler is part of the given descriptor too, it was already used. Means: let the exception pass trough the top most interface method! */ - void impl_openStream(::comphelper::MediaDescriptor& rDescriptor) + void impl_openStream(utl::MediaDescriptor& rDescriptor) throw (css::uno::Exception); //--------------------------------------- @@ -243,7 +243,7 @@ private: @return TRUE the specified type and its registrations was valid(!) and could be set on the descriptor. */ - sal_Bool impl_validateAndSetTypeOnDescriptor( ::comphelper::MediaDescriptor& rDescriptor, + sal_Bool impl_validateAndSetTypeOnDescriptor( utl::MediaDescriptor& rDescriptor, const OUString& sType ); //--------------------------------------- @@ -265,7 +265,7 @@ private: @return TRUE the specified type and its registrations was valid(!) and could be set on the descriptor. */ - sal_Bool impl_validateAndSetFilterOnDescriptor( ::comphelper::MediaDescriptor& rDescriptor, + sal_Bool impl_validateAndSetFilterOnDescriptor( utl::MediaDescriptor& rDescriptor, const OUString& sFilter ); //--------------------------------------- @@ -281,7 +281,7 @@ private: reference to the MediaDescriptor (represented by an easy-to-use stl interface!), which should be patched. */ - void impl_removeTypeFilterFromDescriptor(::comphelper::MediaDescriptor& rDescriptor); + void impl_removeTypeFilterFromDescriptor(utl::MediaDescriptor& rDescriptor); //--------------------------------------- @@ -315,7 +315,7 @@ private: rDescriptor will be changed by selecting another filter. (see code) */ - void impl_checkResultsAndAddBestFilter(::comphelper::MediaDescriptor& rDescriptor, + void impl_checkResultsAndAddBestFilter(utl::MediaDescriptor& rDescriptor, OUString& sType ); //------------------------------------------- diff --git a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx index 200dc04cdf58..492407ad334f 100644 --- a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx +++ b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx @@ -45,7 +45,7 @@ #include <com/sun/star/container/XNameAccess.hpp> #include <comphelper/processfactory.hxx> #include <comphelper/sequenceashashmap.hxx> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <comphelper/genericpropertyset.hxx> #include <comphelper/propertysetinfo.hxx> @@ -77,9 +77,9 @@ sal_Bool SAL_CALL XmlFilterAdaptor::importImpl( const Sequence< ::com::sun::star sal_Int32 nSteps= 0; sal_Int32 nProgressRange = 4; - comphelper::MediaDescriptor aMediaMap(aDescriptor); + utl::MediaDescriptor aMediaMap(aDescriptor); Reference< XStatusIndicator > xStatusIndicator(aMediaMap.getUnpackedValueOrDefault( - comphelper::MediaDescriptor::PROP_STATUSINDICATOR(), Reference< XStatusIndicator >())); + utl::MediaDescriptor::PROP_STATUSINDICATOR(), Reference< XStatusIndicator >())); if (xStatusIndicator.is()){ xStatusIndicator->start(OUString( "Loading :" ),nProgressRange); @@ -203,9 +203,9 @@ sal_Bool SAL_CALL XmlFilterAdaptor::exportImpl( const Sequence< ::com::sun::star // Status Bar sal_Int32 nSteps= 1; sal_Int32 nProgressRange(3); - comphelper::MediaDescriptor aMediaMap(aDescriptor); + utl::MediaDescriptor aMediaMap(aDescriptor); Reference< XStatusIndicator > xStatusIndicator(aMediaMap.getUnpackedValueOrDefault( - comphelper::MediaDescriptor::PROP_STATUSINDICATOR(), Reference< XStatusIndicator >())); + utl::MediaDescriptor::PROP_STATUSINDICATOR(), Reference< XStatusIndicator >())); if (xStatusIndicator.is()) xStatusIndicator->start(OUString( "Saving :" ),nProgressRange); diff --git a/framework/inc/pch/precompiled_fwk.hxx b/framework/inc/pch/precompiled_fwk.hxx index 8796f37a2539..4095d2a2c629 100644 --- a/framework/inc/pch/precompiled_fwk.hxx +++ b/framework/inc/pch/precompiled_fwk.hxx @@ -250,7 +250,6 @@ #include <comphelper/enumhelper.hxx> #include <comphelper/extract.hxx> #include <comphelper/interaction.hxx> -#include <comphelper/mediadescriptor.hxx> #include <comphelper/namedvaluecollection.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/sequence.hxx> @@ -337,6 +336,7 @@ #include <unotools/configpaths.hxx> #include <unotools/historyoptions.hxx> #include <unotools/localfilehelper.hxx> +#include <unotools/mediadescriptor.hxx> #include <unotools/moduleoptions.hxx> #include <unotools/pathoptions.hxx> #include <unotools/streamwrap.hxx> diff --git a/framework/inc/services/autorecovery.hxx b/framework/inc/services/autorecovery.hxx index d960b2e4efeb..65d769151a98 100644 --- a/framework/inc/services/autorecovery.hxx +++ b/framework/inc/services/autorecovery.hxx @@ -41,7 +41,7 @@ #include <com/sun/star/task/XStatusIndicator.hpp> #include <com/sun/star/util/XModifyListener.hpp> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <vcl/timer.hxx> #include <vcl/evntpost.hxx> #include <cppuhelper/implbase5.hxx> @@ -800,13 +800,13 @@ class AutoRecovery : // attention! Must be the first base class to guarentee ri //--------------------------------------- // TODO document me void implts_openOneDoc(const OUString& sURL , - ::comphelper::MediaDescriptor& lDescriptor, + utl::MediaDescriptor& lDescriptor, AutoRecovery::TDocumentInfo& rInfo ); //--------------------------------------- // TODO document me void implts_generateNewTempURL(const OUString& sBackupPath , - ::comphelper::MediaDescriptor& rMediaDescriptor, + utl::MediaDescriptor& rMediaDescriptor, AutoRecovery::TDocumentInfo& rInfo ); //--------------------------------------- @@ -1006,11 +1006,11 @@ class AutoRecovery : // attention! Must be the first base class to guarentee ri is used to set the new created progress as parameter on these set. */ void impl_establishProgress(const AutoRecovery::TDocumentInfo& rInfo , - ::comphelper::MediaDescriptor& rArgs , + utl::MediaDescriptor& rArgs , const css::uno::Reference< css::frame::XFrame >& xNewFrame); void impl_forgetProgress(const AutoRecovery::TDocumentInfo& rInfo , - ::comphelper::MediaDescriptor& rArgs , + utl::MediaDescriptor& rArgs , const css::uno::Reference< css::frame::XFrame >& xNewFrame); //--------------------------------------- diff --git a/framework/source/dispatch/oxt_handler.cxx b/framework/source/dispatch/oxt_handler.cxx index 3f020dbec9fe..6af1cb8be911 100644 --- a/framework/source/dispatch/oxt_handler.cxx +++ b/framework/source/dispatch/oxt_handler.cxx @@ -22,7 +22,7 @@ #include <threadhelp/writeguard.hxx> #include <threadhelp/readguard.hxx> #include <services.h> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <com/sun/star/io/XInputStream.hpp> #include <com/sun/star/frame/DispatchResultState.hpp> @@ -181,8 +181,8 @@ OUString SAL_CALL Oxt_Handler::detect( css::uno::Sequence< css::beans::PropertyV OUString sTypeName; // Analyze given descriptor to find filename or input stream or ... - ::comphelper::MediaDescriptor aDescriptor( lDescriptor ); - OUString sURL = aDescriptor.getUnpackedValueOrDefault( ::comphelper::MediaDescriptor::PROP_URL(), OUString() ); + utl::MediaDescriptor aDescriptor( lDescriptor ); + OUString sURL = aDescriptor.getUnpackedValueOrDefault( utl::MediaDescriptor::PROP_URL(), OUString() ); long nLength = sURL.getLength(); if ( ( nLength > 4 ) && sURL.matchIgnoreAsciiCase( ".oxt", nLength-4 ) ) @@ -193,7 +193,7 @@ OUString SAL_CALL Oxt_Handler::detect( css::uno::Sequence< css::beans::PropertyV // a) look for given extension of url to map our type decision HARD CODED!!! // b) return preferred type every time... it's easy :-) sTypeName = "oxt_OpenOffice_Extension"; - aDescriptor[::comphelper::MediaDescriptor::PROP_TYPENAME()] <<= sTypeName; + aDescriptor[utl::MediaDescriptor::PROP_TYPENAME()] <<= sTypeName; aDescriptor >> lDescriptor; } diff --git a/framework/source/helper/statusindicatorfactory.cxx b/framework/source/helper/statusindicatorfactory.cxx index b2e3762449af..08619ba3fc9c 100644 --- a/framework/source/helper/statusindicatorfactory.cxx +++ b/framework/source/helper/statusindicatorfactory.cxx @@ -41,7 +41,7 @@ #include <toolkit/helper/vclunohelper.hxx> #include <comphelper/sequenceashashmap.hxx> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <vcl/svapp.hxx> #include <osl/mutex.hxx> @@ -392,9 +392,9 @@ void StatusIndicatorFactory::implts_makeParentVisibleIfAllowed() xModel = xController->getModel(); if (xModel.is()) { - ::comphelper::MediaDescriptor lDocArgs(xModel->getArgs()); + utl::MediaDescriptor lDocArgs(xModel->getArgs()); bHiddenDoc = lDocArgs.getUnpackedValueOrDefault( - ::comphelper::MediaDescriptor::PROP_HIDDEN(), + utl::MediaDescriptor::PROP_HIDDEN(), (sal_Bool)sal_False); } } diff --git a/framework/source/inc/loadenv/loadenv.hxx b/framework/source/inc/loadenv/loadenv.hxx index dee4f0b435de..a2f258ec9b2a 100644 --- a/framework/source/inc/loadenv/loadenv.hxx +++ b/framework/source/inc/loadenv/loadenv.hxx @@ -35,7 +35,7 @@ #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/util/URL.hpp> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <comphelper/sequenceashashmap.hxx> #include <cppuhelper/implbase2.hxx> @@ -148,7 +148,7 @@ private: @descr Inside this struct e.g. the URL, its type and filter name, the stream or a model directly are saved. */ - ::comphelper::MediaDescriptor m_lMediaDescriptor; + utl::MediaDescriptor m_lMediaDescriptor; /** @short because the mediadescriptor contains the complete URL ... but some functionality need the structured version, we hold it twice :-(. @@ -370,7 +370,7 @@ public: /** TODO document me ... */ static void initializeUIDefaults( const css::uno::Reference< css::uno::XComponentContext >& i_rxContext, - ::comphelper::MediaDescriptor& io_lMediaDescriptor, + utl::MediaDescriptor& io_lMediaDescriptor, const bool _bUIMode, QuietInteraction** o_ppQuiteInteraction ); diff --git a/framework/source/layoutmanager/helpers.cxx b/framework/source/layoutmanager/helpers.cxx index 5cc82710aed0..6531b129dc0c 100644 --- a/framework/source/layoutmanager/helpers.cxx +++ b/framework/source/layoutmanager/helpers.cxx @@ -31,7 +31,7 @@ #include <com/sun/star/ui/XUIElement.hpp> #include <comphelper/processfactory.hxx> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <vcl/svapp.hxx> #include <toolkit/helper/vclunohelper.hxx> @@ -274,8 +274,8 @@ sal_Bool implts_isPreviewModel( const uno::Reference< frame::XModel >& xModel ) { if ( xModel.is() ) { - ::comphelper::MediaDescriptor aDesc( xModel->getArgs() ); - return aDesc.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_PREVIEW(), (sal_Bool)sal_False); + utl::MediaDescriptor aDesc( xModel->getArgs() ); + return aDesc.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_PREVIEW(), (sal_Bool)sal_False); } else return sal_False; diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 9d1999149635..ede067e2f05c 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -71,7 +71,6 @@ #include <toolkit/helper/vclunohelper.hxx> #include <toolkit/awt/vclxwindow.hxx> #include <toolkit/awt/vclxmenu.hxx> -#include <comphelper/mediadescriptor.hxx> #include <comphelper/uno3.hxx> #include <rtl/instance.hxx> #include <unotools/cmdoptions.hxx> diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 373c9b3d6ce5..a9b2dcbfed43 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -210,18 +210,18 @@ css::uno::Reference< css::lang::XComponent > LoadEnv::loadComponentFromURL(const } //----------------------------------------------- -::comphelper::MediaDescriptor impl_mergeMediaDescriptorWithMightExistingModelArgs(const css::uno::Sequence< css::beans::PropertyValue >& lOutsideDescriptor) +utl::MediaDescriptor impl_mergeMediaDescriptorWithMightExistingModelArgs(const css::uno::Sequence< css::beans::PropertyValue >& lOutsideDescriptor) { - ::comphelper::MediaDescriptor lDescriptor(lOutsideDescriptor); + utl::MediaDescriptor lDescriptor(lOutsideDescriptor); css::uno::Reference< css::frame::XModel > xModel = lDescriptor.getUnpackedValueOrDefault( - ::comphelper::MediaDescriptor::PROP_MODEL (), + utl::MediaDescriptor::PROP_MODEL (), css::uno::Reference< css::frame::XModel > ()); if (xModel.is ()) { - ::comphelper::MediaDescriptor lModelDescriptor(xModel->getArgs()); - ::comphelper::MediaDescriptor::iterator pIt = lModelDescriptor.find( ::comphelper::MediaDescriptor::PROP_MACROEXECUTIONMODE() ); + utl::MediaDescriptor lModelDescriptor(xModel->getArgs()); + utl::MediaDescriptor::iterator pIt = lModelDescriptor.find( utl::MediaDescriptor::PROP_MACROEXECUTIONMODE() ); if ( pIt != lModelDescriptor.end() ) - lDescriptor[::comphelper::MediaDescriptor::PROP_MACROEXECUTIONMODE()] = pIt->second; + lDescriptor[utl::MediaDescriptor::PROP_MACROEXECUTIONMODE()] = pIt->second; } return lDescriptor; @@ -269,7 +269,7 @@ void LoadEnv::initializeLoading(const OUString& // make URL part of the MediaDescriptor // It doesn't mater, if it is already an item of it. // It must be the same value ... so we can overwrite it :-) - m_lMediaDescriptor[::comphelper::MediaDescriptor::PROP_URL()] <<= sURL; + m_lMediaDescriptor[utl::MediaDescriptor::PROP_URL()] <<= sURL; // parse it - because some following code require that m_aURL.Complete = sURL; @@ -279,10 +279,10 @@ void LoadEnv::initializeLoading(const OUString& // BTW: Split URL and JumpMark ... // Because such mark is an explicit value of the media descriptor! if (!m_aURL.Mark.isEmpty()) - m_lMediaDescriptor[::comphelper::MediaDescriptor::PROP_JUMPMARK()] <<= m_aURL.Mark; + m_lMediaDescriptor[utl::MediaDescriptor::PROP_JUMPMARK()] <<= m_aURL.Mark; // By the way: remove the old and deprecated value "FileName" from the descriptor! - ::comphelper::MediaDescriptor::iterator pIt = m_lMediaDescriptor.find(::comphelper::MediaDescriptor::PROP_FILENAME()); + utl::MediaDescriptor::iterator pIt = m_lMediaDescriptor.find(utl::MediaDescriptor::PROP_FILENAME()); if (pIt != m_lMediaDescriptor.end()) m_lMediaDescriptor.erase(pIt); @@ -295,8 +295,8 @@ void LoadEnv::initializeLoading(const OUString& // UI mode const bool bUIMode = ( ( m_eFeature & E_WORK_WITH_UI ) == E_WORK_WITH_UI ) && - ( m_lMediaDescriptor.getUnpackedValueOrDefault( ::comphelper::MediaDescriptor::PROP_HIDDEN() , sal_False ) == sal_False ) && - ( m_lMediaDescriptor.getUnpackedValueOrDefault( ::comphelper::MediaDescriptor::PROP_PREVIEW(), sal_False ) == sal_False ); + ( m_lMediaDescriptor.getUnpackedValueOrDefault( utl::MediaDescriptor::PROP_HIDDEN() , sal_False ) == sal_False ) && + ( m_lMediaDescriptor.getUnpackedValueOrDefault( utl::MediaDescriptor::PROP_PREVIEW(), sal_False ) == sal_False ); initializeUIDefaults( m_xContext, @@ -311,7 +311,7 @@ void LoadEnv::initializeLoading(const OUString& void LoadEnv::initializeUIDefaults( const css::uno::Reference< css::uno::XComponentContext >& i_rxContext, - ::comphelper::MediaDescriptor& io_lMediaDescriptor, const bool i_bUIMode, + utl::MediaDescriptor& io_lMediaDescriptor, const bool i_bUIMode, QuietInteraction** o_ppQuietInteraction ) { css::uno::Reference< css::task::XInteractionHandler > xInteractionHandler; @@ -345,17 +345,17 @@ void LoadEnv::initializeUIDefaults( const css::uno::Reference< css::uno::XCompon if ( (xInteractionHandler.is() ) && - (io_lMediaDescriptor.find(::comphelper::MediaDescriptor::PROP_INTERACTIONHANDLER()) == io_lMediaDescriptor.end()) + (io_lMediaDescriptor.find(utl::MediaDescriptor::PROP_INTERACTIONHANDLER()) == io_lMediaDescriptor.end()) ) { - io_lMediaDescriptor[::comphelper::MediaDescriptor::PROP_INTERACTIONHANDLER()] <<= xInteractionHandler; + io_lMediaDescriptor[utl::MediaDescriptor::PROP_INTERACTIONHANDLER()] <<= xInteractionHandler; } - if (io_lMediaDescriptor.find(::comphelper::MediaDescriptor::PROP_MACROEXECUTIONMODE()) == io_lMediaDescriptor.end()) - io_lMediaDescriptor[::comphelper::MediaDescriptor::PROP_MACROEXECUTIONMODE()] <<= nMacroMode; + if (io_lMediaDescriptor.find(utl::MediaDescriptor::PROP_MACROEXECUTIONMODE()) == io_lMediaDescriptor.end()) + io_lMediaDescriptor[utl::MediaDescriptor::PROP_MACROEXECUTIONMODE()] <<= nMacroMode; - if (io_lMediaDescriptor.find(::comphelper::MediaDescriptor::PROP_UPDATEDOCMODE()) == io_lMediaDescriptor.end()) - io_lMediaDescriptor[::comphelper::MediaDescriptor::PROP_UPDATEDOCMODE()] <<= nUpdateMode; + if (io_lMediaDescriptor.find(utl::MediaDescriptor::PROP_UPDATEDOCMODE()) == io_lMediaDescriptor.end()) + io_lMediaDescriptor[utl::MediaDescriptor::PROP_UPDATEDOCMODE()] <<= nUpdateMode; } @@ -613,11 +613,11 @@ LoadEnv::EContentType LoadEnv::classifyContent(const OUString& return E_CAN_BE_LOADED; // using of an existing input stream - ::comphelper::MediaDescriptor stlMediaDescriptor(lMediaDescriptor); - ::comphelper::MediaDescriptor::const_iterator pIt; + utl::MediaDescriptor stlMediaDescriptor(lMediaDescriptor); + utl::MediaDescriptor::const_iterator pIt; if (ProtocolCheck::isProtocol(sURL,ProtocolCheck::E_PRIVATE_STREAM)) { - pIt = stlMediaDescriptor.find(::comphelper::MediaDescriptor::PROP_INPUTSTREAM()); + pIt = stlMediaDescriptor.find(utl::MediaDescriptor::PROP_INPUTSTREAM()); css::uno::Reference< css::io::XInputStream > xStream; if (pIt != stlMediaDescriptor.end()) pIt->second >>= xStream; @@ -630,7 +630,7 @@ LoadEnv::EContentType LoadEnv::classifyContent(const OUString& // using of a full featured document if (ProtocolCheck::isProtocol(sURL,ProtocolCheck::E_PRIVATE_OBJECT)) { - pIt = stlMediaDescriptor.find(::comphelper::MediaDescriptor::PROP_MODEL()); + pIt = stlMediaDescriptor.find(utl::MediaDescriptor::PROP_MODEL()); css::uno::Reference< css::frame::XModel > xModel; if (pIt != stlMediaDescriptor.end()) pIt->second >>= xModel; @@ -816,9 +816,9 @@ void LoadEnv::impl_detectTypeAndFilter() { // Orcus type detected. Skip the normal type detection process. m_lMediaDescriptor << lDescriptor; - m_lMediaDescriptor[comphelper::MediaDescriptor::PROP_TYPENAME()] <<= sType; - m_lMediaDescriptor[comphelper::MediaDescriptor::PROP_FILTERNAME()] <<= sFilter; - m_lMediaDescriptor[comphelper::MediaDescriptor::PROP_FILTERPROVIDER()] <<= OUString("orcus"); + m_lMediaDescriptor[utl::MediaDescriptor::PROP_TYPENAME()] <<= sType; + m_lMediaDescriptor[utl::MediaDescriptor::PROP_FILTERNAME()] <<= sFilter; + m_lMediaDescriptor[utl::MediaDescriptor::PROP_FILTERPROVIDER()] <<= OUString("orcus"); return; } @@ -838,10 +838,10 @@ void LoadEnv::impl_detectTypeAndFilter() // detection was successfully => update the descriptor member of this class m_lMediaDescriptor << lDescriptor; - m_lMediaDescriptor[::comphelper::MediaDescriptor::PROP_TYPENAME()] <<= sType; + m_lMediaDescriptor[utl::MediaDescriptor::PROP_TYPENAME()] <<= sType; // Is there an already detected (may be preselected) filter? // see below ... - sFilter = m_lMediaDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_FILTERNAME(), OUString()); + sFilter = m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_FILTERNAME(), OUString()); aWriteLock.unlock(); // <- SAFE @@ -866,7 +866,7 @@ void LoadEnv::impl_detectTypeAndFilter() { // SAFE -> aWriteLock.lock(); - m_lMediaDescriptor[::comphelper::MediaDescriptor::PROP_FILTERNAME()] <<= sFilter; + m_lMediaDescriptor[utl::MediaDescriptor::PROP_FILTERNAME()] <<= sFilter; aWriteLock.unlock(); // <- SAFE } @@ -901,9 +901,9 @@ void LoadEnv::impl_detectTypeAndFilter() // SAFE -> aWriteLock.lock(); // Don't overwrite external decisions! See comments before ... - ::comphelper::MediaDescriptor::const_iterator pAsTemplateItem = m_lMediaDescriptor.find(::comphelper::MediaDescriptor::PROP_ASTEMPLATE()); + utl::MediaDescriptor::const_iterator pAsTemplateItem = m_lMediaDescriptor.find(utl::MediaDescriptor::PROP_ASTEMPLATE()); if (pAsTemplateItem == m_lMediaDescriptor.end()) - m_lMediaDescriptor[::comphelper::MediaDescriptor::PROP_ASTEMPLATE()] <<= sal_True; + m_lMediaDescriptor[utl::MediaDescriptor::PROP_ASTEMPLATE()] <<= sal_True; aWriteLock.unlock(); // <- SAFE } @@ -917,7 +917,7 @@ sal_Bool LoadEnv::impl_handleContent() ReadGuard aReadLock(m_aLock); // the type must exist inside the descriptor ... otherwise this class is implemented wrong :-) - OUString sType = m_lMediaDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_TYPENAME(), OUString()); + OUString sType = m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_TYPENAME(), OUString()); if (sType.isEmpty()) throw LoadEnvException(LoadEnvException::ID_INVALID_MEDIADESCRIPTOR); @@ -1027,7 +1027,7 @@ sal_Bool LoadEnv::impl_furtherDocsAllowed() // SAFE -> aReadLock.lock(); css::uno::Reference< css::task::XInteractionHandler > xInteraction = m_lMediaDescriptor.getUnpackedValueOrDefault( - ::comphelper::MediaDescriptor::PROP_INTERACTIONHANDLER(), + utl::MediaDescriptor::PROP_INTERACTIONHANDLER(), css::uno::Reference< css::task::XInteractionHandler >()); aReadLock.unlock(); // <- SAFE @@ -1138,10 +1138,10 @@ sal_Bool LoadEnv::impl_loadContent() // So we prevent our code against wrong using. Why? // It could be, that using of this progress could make trouble. e.g. He make window visible ... // but shouldn't do that. But if no indicator is available ... nobody has a chance to do that! - sal_Bool bHidden = m_lMediaDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_HIDDEN() , sal_False ); - sal_Bool bMinimized = m_lMediaDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_MINIMIZED() , sal_False ); - sal_Bool bPreview = m_lMediaDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_PREVIEW() , sal_False ); - css::uno::Reference< css::task::XStatusIndicator > xProgress = m_lMediaDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_STATUSINDICATOR(), css::uno::Reference< css::task::XStatusIndicator >()); + sal_Bool bHidden = m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_HIDDEN() , sal_False ); + sal_Bool bMinimized = m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_MINIMIZED() , sal_False ); + sal_Bool bPreview = m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_PREVIEW() , sal_False ); + css::uno::Reference< css::task::XStatusIndicator > xProgress = m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_STATUSINDICATOR(), css::uno::Reference< css::task::XStatusIndicator >()); if (!bHidden && !bMinimized && !bPreview && !xProgress.is()) { @@ -1151,7 +1151,7 @@ sal_Bool LoadEnv::impl_loadContent() { xProgress = xProgressFactory->createStatusIndicator(); if (xProgress.is()) - m_lMediaDescriptor[::comphelper::MediaDescriptor::PROP_STATUSINDICATOR()] <<= xProgress; + m_lMediaDescriptor[utl::MediaDescriptor::PROP_STATUSINDICATOR()] <<= xProgress; } } @@ -1221,7 +1221,7 @@ css::uno::Reference< css::uno::XInterface > LoadEnv::impl_searchLoader() // Otherwise ... // We need this type information to locate an registered frame loader // Without such information we can't work! - OUString sType = m_lMediaDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_TYPENAME(), OUString()); + OUString sType = m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_TYPENAME(), OUString()); if (sType.isEmpty()) throw LoadEnvException(LoadEnvException::ID_INVALID_MEDIADESCRIPTOR); @@ -1306,9 +1306,9 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchAlreadyLoaded() // or better its not allowed for some requests in general :-) if ( ( ! TargetHelper::matchSpecialTarget(m_sTarget, TargetHelper::E_DEFAULT) ) || - (m_lMediaDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_ASTEMPLATE() , sal_False) == sal_True) || -// (m_lMediaDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_HIDDEN() , sal_False) == sal_True) || - (m_lMediaDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_OPENNEWVIEW(), sal_False) == sal_True) + (m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_ASTEMPLATE() , sal_False) == sal_True) || +// (m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_HIDDEN() , sal_False) == sal_True) || + (m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_OPENNEWVIEW(), sal_False) == sal_True) ) { return css::uno::Reference< css::frame::XFrame >(); @@ -1337,7 +1337,7 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchAlreadyLoaded() // Note: To detect if a document was already loaded before // we check URLs here only. But might the existing and the required // document has different versions! Then its URLs are the same ... - sal_Int16 nNewVersion = m_lMediaDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_VERSION(), (sal_Int16)(-1)); + sal_Int16 nNewVersion = m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_VERSION(), (sal_Int16)(-1)); // will be used to save the first hidden frame referring the searched model // Normally we are interested on visible frames ... but if there is no such visible @@ -1384,9 +1384,9 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchAlreadyLoaded() // and decide if its really the same then the one will be. // It must be visible and must use the same file revision ... // or must not have any file revision set (-1 == -1!) - ::comphelper::MediaDescriptor lOldDocDescriptor(xModel->getArgs()); + utl::MediaDescriptor lOldDocDescriptor(xModel->getArgs()); - if (lOldDocDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_VERSION(), (sal_Int32)(-1)) != nNewVersion) + if (lOldDocDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_VERSION(), (sal_Int32)(-1)) != nNewVersion) { xTask.clear (); continue; @@ -1395,7 +1395,7 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchAlreadyLoaded() // Hidden frames are special. // They will be used as "last chance" if there is no visible frame pointing to the same model. // Safe the result but continue with current loop might be looking for other visible frames. - ::sal_Bool bIsHidden = lOldDocDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_HIDDEN(), sal_False); + ::sal_Bool bIsHidden = lOldDocDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_HIDDEN(), sal_False); if ( ( bIsHidden ) && ( ! xHiddenTask.is()) @@ -1466,7 +1466,7 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchRecycleTarget() // It doesn't matter if somewhere wants to create a new view // or open a new untitled document ... // The only exception form that - hidden frames! - if (m_lMediaDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_HIDDEN(), sal_False) == sal_True) + if (m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_HIDDEN(), sal_False) == sal_True) return css::uno::Reference< css::frame::XFrame >(); css::uno::Reference< css::frame::XFramesSupplier > xSupplier( css::frame::Desktop::create( m_xContext ), css::uno::UNO_QUERY); @@ -1483,8 +1483,8 @@ css::uno::Reference< css::frame::XFrame > LoadEnv::impl_searchRecycleTarget() // These states indicates a wish for creation of a new view in general. if ( - (m_lMediaDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_ASTEMPLATE() , sal_False) == sal_True) || - (m_lMediaDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_OPENNEWVIEW(), sal_False) == sal_True) + (m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_ASTEMPLATE() , sal_False) == sal_True) || + (m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_OPENNEWVIEW(), sal_False) == sal_True) ) { return css::uno::Reference< css::frame::XFrame >(); @@ -1602,8 +1602,8 @@ void LoadEnv::impl_reactForLoadingState() // Note: We show new created frames here only. // We dont hide already visible frames here ... css::uno::Reference< css::awt::XWindow > xWindow = m_xTargetFrame->getContainerWindow(); - sal_Bool bHidden = m_lMediaDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_HIDDEN(), sal_False); - sal_Bool bMinimized = m_lMediaDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_MINIMIZED(), sal_False); + sal_Bool bHidden = m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_HIDDEN(), sal_False); + sal_Bool bMinimized = m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_MINIMIZED(), sal_False); if (bMinimized) { @@ -1623,7 +1623,7 @@ void LoadEnv::impl_reactForLoadingState() // Note: Only if an existing property "FrameName" is given by this media descriptor, // it should be used. Otherwise we should do nothing. May be the outside code has already // set a frame name on the target! - ::comphelper::MediaDescriptor::const_iterator pFrameName = m_lMediaDescriptor.find(::comphelper::MediaDescriptor::PROP_FRAMENAME()); + utl::MediaDescriptor::const_iterator pFrameName = m_lMediaDescriptor.find(utl::MediaDescriptor::PROP_FRAMENAME()); if (pFrameName != m_lMediaDescriptor.end()) { OUString sFrameName; @@ -1722,7 +1722,7 @@ void LoadEnv::impl_makeFrameWindowVisible(const css::uno::Reference< css::awt::X if ( pWindow ) { bool const preview( m_lMediaDescriptor.getUnpackedValueOrDefault( - ::comphelper::MediaDescriptor::PROP_PREVIEW(), sal_False) ); + utl::MediaDescriptor::PROP_PREVIEW(), sal_False) ); bool bForceFrontAndFocus(false); if ( !preview ) @@ -1788,7 +1788,7 @@ void LoadEnv::impl_applyPersistentWindowState(const css::uno::Reference< css::aw // no filter -> no module -> no persistent window state OUString sFilter = m_lMediaDescriptor.getUnpackedValueOrDefault( - ::comphelper::MediaDescriptor::PROP_FILTERNAME(), + utl::MediaDescriptor::PROP_FILTERNAME(), OUString()); if (sFilter.isEmpty()) return; diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index d628c1c18dd5..0c7e3b2d6ed3 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -68,7 +68,7 @@ #include <com/sun/star/task/XStatusIndicatorFactory.hpp> #include <comphelper/configurationhelper.hxx> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <comphelper/namedvaluecollection.hxx> #include <comphelper/processfactory.hxx> #include <vcl/svapp.hxx> @@ -1651,11 +1651,11 @@ void AutoRecovery::implts_registerDocument(const css::uno::Reference< css::frame aCacheLock.unlock(); - ::comphelper::MediaDescriptor lDescriptor(xDocument->getArgs()); + utl::MediaDescriptor lDescriptor(xDocument->getArgs()); // check if this document must be ignored for recovery ! // Some use cases dont wish support for AutoSave/Recovery ... as e.g. OLE-Server / ActiveX Control etcpp. - sal_Bool bNoAutoSave = lDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_NOAUTOSAVE(), (sal_Bool)(sal_False)); + sal_Bool bNoAutoSave = lDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_NOAUTOSAVE(), (sal_Bool)(sal_False)); if (bNoAutoSave) return; @@ -1714,7 +1714,7 @@ void AutoRecovery::implts_registerDocument(const css::uno::Reference< css::frame // and save an information about the real used filter by this document. // We save this document with DefaultFilter ... and load it with the RealFilter. implts_specifyDefaultFilterAndExtension(aNew); - aNew.RealFilter = lDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_FILTERNAME() , OUString()); + aNew.RealFilter = lDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_FILTERNAME() , OUString()); // Further we must know, if this document base on a template. // Then we must load it in a different way. @@ -1902,17 +1902,17 @@ void AutoRecovery::implts_markDocumentAsSaved(const css::uno::Reference< css::fr rInfo.OldTempURL = ""; rInfo.NewTempURL = ""; - ::comphelper::MediaDescriptor lDescriptor(rInfo.Document->getArgs()); - rInfo.RealFilter = lDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_FILTERNAME(), OUString()); + utl::MediaDescriptor lDescriptor(rInfo.Document->getArgs()); + rInfo.RealFilter = lDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_FILTERNAME(), OUString()); css::uno::Reference< css::frame::XTitle > xDocTitle(xDocument, css::uno::UNO_QUERY); if (xDocTitle.is ()) rInfo.Title = xDocTitle->getTitle (); else { - rInfo.Title = lDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_TITLE() , OUString()); + rInfo.Title = lDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_TITLE() , OUString()); if (rInfo.Title.isEmpty()) - rInfo.Title = lDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_DOCUMENTTITLE(), OUString()); + rInfo.Title = lDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_DOCUMENTTITLE(), OUString()); } rInfo.UsedForSaving = sal_False; @@ -2103,8 +2103,8 @@ sal_Bool lc_checkIfSaveForbiddenByArguments(AutoRecovery::TDocumentInfo& rInfo) if (! rInfo.Document.is()) return sal_True; - ::comphelper::MediaDescriptor lDescriptor(rInfo.Document->getArgs()); - sal_Bool bNoAutoSave = lDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_NOAUTOSAVE(), (sal_Bool)(sal_False)); + utl::MediaDescriptor lDescriptor(rInfo.Document->getArgs()); + sal_Bool bNoAutoSave = lDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_NOAUTOSAVE(), (sal_Bool)(sal_False)); return bNoAutoSave; } @@ -2299,29 +2299,29 @@ void AutoRecovery::implts_saveOneDoc(const OUString& if (!rInfo.Document.is()) return; - ::comphelper::MediaDescriptor lOldArgs(rInfo.Document->getArgs()); + utl::MediaDescriptor lOldArgs(rInfo.Document->getArgs()); implts_generateNewTempURL(sBackupPath, lOldArgs, rInfo); // if the document was loaded with a password, it should be // stored with password - ::comphelper::MediaDescriptor lNewArgs; - OUString sPassword = lOldArgs.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_PASSWORD(), OUString()); + utl::MediaDescriptor lNewArgs; + OUString sPassword = lOldArgs.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_PASSWORD(), OUString()); if (!sPassword.isEmpty()) - lNewArgs[::comphelper::MediaDescriptor::PROP_PASSWORD()] <<= sPassword; + lNewArgs[utl::MediaDescriptor::PROP_PASSWORD()] <<= sPassword; // Further it must be saved using the default file format of that application. // Otherwhise we will some data lost. if (!rInfo.DefaultFilter.isEmpty()) - lNewArgs[::comphelper::MediaDescriptor::PROP_FILTERNAME()] <<= rInfo.DefaultFilter; + lNewArgs[utl::MediaDescriptor::PROP_FILTERNAME()] <<= rInfo.DefaultFilter; // prepare frame/document/mediadescriptor in a way, that it uses OUR progress .-) if (xExternalProgress.is()) - lNewArgs[::comphelper::MediaDescriptor::PROP_STATUSINDICATOR()] <<= xExternalProgress; + lNewArgs[utl::MediaDescriptor::PROP_STATUSINDICATOR()] <<= xExternalProgress; impl_establishProgress(rInfo, lNewArgs, css::uno::Reference< css::frame::XFrame >()); // #i66598# use special handling of property "DocumentBaseURL" (it must be an empty string!) // for make hyperlinks working - lNewArgs[::comphelper::MediaDescriptor::PROP_DOCUMENTBASEURL()] <<= OUString(); + lNewArgs[utl::MediaDescriptor::PROP_DOCUMENTBASEURL()] <<= OUString(); // try to save this document as a new temp file everytimes. // Mark AutoSave state as "INCOMPLETE" if it failed. @@ -2458,17 +2458,17 @@ AutoRecovery::ETimerType AutoRecovery::implts_openDocs(const DispatchParams& aPa continue; } - ::comphelper::MediaDescriptor lDescriptor; + utl::MediaDescriptor lDescriptor; // its an UI feature - so the "USER" itself must be set as referer - lDescriptor[::comphelper::MediaDescriptor::PROP_REFERRER()] <<= OUString(REFERRER_USER); - lDescriptor[::comphelper::MediaDescriptor::PROP_SALVAGEDFILE()] <<= OUString(); + lDescriptor[utl::MediaDescriptor::PROP_REFERRER()] <<= OUString(REFERRER_USER); + lDescriptor[utl::MediaDescriptor::PROP_SALVAGEDFILE()] <<= OUString(); // recovered documents are loaded hidden, and shown all at once, later - lDescriptor[::comphelper::MediaDescriptor::PROP_HIDDEN()] <<= true; + lDescriptor[utl::MediaDescriptor::PROP_HIDDEN()] <<= true; if (aParams.m_xProgress.is()) - lDescriptor[::comphelper::MediaDescriptor::PROP_STATUSINDICATOR()] <<= aParams.m_xProgress; + lDescriptor[utl::MediaDescriptor::PROP_STATUSINDICATOR()] <<= aParams.m_xProgress; sal_Bool bBackupWasTried = ( ((rInfo.DocumentState & AutoRecovery::E_TRY_LOAD_BACKUP ) == AutoRecovery::E_TRY_LOAD_BACKUP) || // temp. state! @@ -2503,13 +2503,13 @@ AutoRecovery::ETimerType AutoRecovery::implts_openDocs(const DispatchParams& aPa else if (!rInfo.TemplateURL.isEmpty()) { sLoadOriginalURL = rInfo.TemplateURL; - lDescriptor[::comphelper::MediaDescriptor::PROP_ASTEMPLATE()] <<= sal_True; - lDescriptor[::comphelper::MediaDescriptor::PROP_TEMPLATENAME()] <<= rInfo.TemplateURL; + lDescriptor[utl::MediaDescriptor::PROP_ASTEMPLATE()] <<= sal_True; + lDescriptor[utl::MediaDescriptor::PROP_TEMPLATENAME()] <<= rInfo.TemplateURL; } else if (!rInfo.FactoryURL.isEmpty()) { sLoadOriginalURL = rInfo.FactoryURL; - lDescriptor[::comphelper::MediaDescriptor::PROP_ASTEMPLATE()] <<= sal_True; + lDescriptor[utl::MediaDescriptor::PROP_ASTEMPLATE()] <<= sal_True; } // A "Salvaged" item must exists every time. The core can make something special then for recovery. @@ -2519,7 +2519,7 @@ AutoRecovery::ETimerType AutoRecovery::implts_openDocs(const DispatchParams& aPa { sURL = sLoadBackupURL; rInfo.DocumentState |= AutoRecovery::E_TRY_LOAD_BACKUP; - lDescriptor[::comphelper::MediaDescriptor::PROP_SALVAGEDFILE()] <<= sLoadOriginalURL; + lDescriptor[utl::MediaDescriptor::PROP_SALVAGEDFILE()] <<= sLoadOriginalURL; } else if (!sLoadOriginalURL.isEmpty()) { @@ -2569,8 +2569,8 @@ AutoRecovery::ETimerType AutoRecovery::implts_openDocs(const DispatchParams& aPa if (!rInfo.RealFilter.isEmpty()) { - ::comphelper::MediaDescriptor lPatchDescriptor(rInfo.Document->getArgs()); - lPatchDescriptor[::comphelper::MediaDescriptor::PROP_FILTERNAME()] <<= rInfo.RealFilter; + utl::MediaDescriptor lPatchDescriptor(rInfo.Document->getArgs()); + lPatchDescriptor[utl::MediaDescriptor::PROP_FILTERNAME()] <<= rInfo.RealFilter; rInfo.Document->attachResource(rInfo.Document->getURL(), lPatchDescriptor.getAsConstPropertyValueList()); // do *not* use sURL here. In case this points to the recovery file, it has already been passed // to recoverFromFile. Also, passing it here is logically wrong, as attachResource is intended @@ -2615,7 +2615,7 @@ AutoRecovery::ETimerType AutoRecovery::implts_openDocs(const DispatchParams& aPa //----------------------------------------------- void AutoRecovery::implts_openOneDoc(const OUString& sURL , - ::comphelper::MediaDescriptor& lDescriptor, + utl::MediaDescriptor& lDescriptor, AutoRecovery::TDocumentInfo& rInfo ) { // SAFE -> ---------------------------------- @@ -2636,9 +2636,9 @@ void AutoRecovery::implts_openOneDoc(const OUString& sURL , // put the filter name into the descriptor - we're not going to involve any type detection, so // the document might be lost without the FilterName property if ( (rInfo.DocumentState & AutoRecovery::E_TRY_LOAD_ORIGINAL) == AutoRecovery::E_TRY_LOAD_ORIGINAL) - lDescriptor[ ::comphelper::MediaDescriptor::PROP_FILTERNAME() ] <<= rInfo.RealFilter; + lDescriptor[ utl::MediaDescriptor::PROP_FILTERNAME() ] <<= rInfo.RealFilter; else - lDescriptor[ ::comphelper::MediaDescriptor::PROP_FILTERNAME() ] <<= rInfo.DefaultFilter; + lDescriptor[ utl::MediaDescriptor::PROP_FILTERNAME() ] <<= rInfo.DefaultFilter; if ( sURL == rInfo.FactoryURL ) { @@ -2657,7 +2657,7 @@ void AutoRecovery::implts_openOneDoc(const OUString& sURL , Reference< XDocumentRecovery > xDocRecover( xModel, UNO_QUERY_THROW ); xDocRecover->recoverFromFile( sURL, - lDescriptor.getUnpackedValueOrDefault( ::comphelper::MediaDescriptor::PROP_SALVAGEDFILE(), OUString() ), + lDescriptor.getUnpackedValueOrDefault( utl::MediaDescriptor::PROP_SALVAGEDFILE(), OUString() ), lDescriptor.getAsConstPropertyValueList() ); @@ -2740,7 +2740,7 @@ void AutoRecovery::implts_openOneDoc(const OUString& sURL , //----------------------------------------------- void AutoRecovery::implts_generateNewTempURL(const OUString& sBackupPath , - ::comphelper::MediaDescriptor& /*rMediaDescriptor*/, + utl::MediaDescriptor& /*rMediaDescriptor*/, AutoRecovery::TDocumentInfo& rInfo ) { // SAFE -> ---------------------------------- @@ -3468,7 +3468,7 @@ void AutoRecovery::impl_showFullDiscError() //----------------------------------------------- void AutoRecovery::impl_establishProgress(const AutoRecovery::TDocumentInfo& rInfo , - ::comphelper::MediaDescriptor& rArgs , + utl::MediaDescriptor& rArgs , const css::uno::Reference< css::frame::XFrame >& xNewFrame) { // external well known frame must be preferred (because it was created by ourself @@ -3491,7 +3491,7 @@ void AutoRecovery::impl_establishProgress(const AutoRecovery::TDocumentInfo& // Only if there is no progress, we can create our own one. css::uno::Reference< css::task::XStatusIndicator > xInternalProgress; css::uno::Reference< css::task::XStatusIndicator > xExternalProgress = rArgs.getUnpackedValueOrDefault( - ::comphelper::MediaDescriptor::PROP_STATUSINDICATOR(), + utl::MediaDescriptor::PROP_STATUSINDICATOR(), css::uno::Reference< css::task::XStatusIndicator >() ); // Normaly a progress is set from outside (e.g. by the CrashSave/Recovery dialog, which uses our dispatch API). @@ -3529,12 +3529,12 @@ void AutoRecovery::impl_establishProgress(const AutoRecovery::TDocumentInfo& // But inside the MediaDescriptor we must set our own create progress ... // in case there is not already another progress set. - rArgs.createItemIfMissing(::comphelper::MediaDescriptor::PROP_STATUSINDICATOR(), xInternalProgress); + rArgs.createItemIfMissing(utl::MediaDescriptor::PROP_STATUSINDICATOR(), xInternalProgress); } //----------------------------------------------- void AutoRecovery::impl_forgetProgress(const AutoRecovery::TDocumentInfo& rInfo , - ::comphelper::MediaDescriptor& rArgs , + utl::MediaDescriptor& rArgs , const css::uno::Reference< css::frame::XFrame >& xNewFrame) { // external well known frame must be preferred (because it was created by ourself @@ -3559,7 +3559,7 @@ void AutoRecovery::impl_forgetProgress(const AutoRecovery::TDocumentInfo& xFrameProps->setPropertyValue(FRAME_PROPNAME_INDICATORINTERCEPTION, css::uno::makeAny(css::uno::Reference< css::task::XStatusIndicator >())); // forget progress inside list of arguments. - ::comphelper::MediaDescriptor::iterator pArg = rArgs.find(::comphelper::MediaDescriptor::PROP_STATUSINDICATOR()); + utl::MediaDescriptor::iterator pArg = rArgs.find(utl::MediaDescriptor::PROP_STATUSINDICATOR()); if (pArg != rArgs.end()) { rArgs.erase(pArg); diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index db552106ef36..4c64d0ff3e56 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -59,7 +59,7 @@ #include <svtools/toolboxcontroller.hxx> #include <unotools/cmdoptions.hxx> #include <toolkit/helper/vclunohelper.hxx> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <comphelper/processfactory.hxx> #include <svtools/miscopt.hxx> #include <svl/imageitm.hxx> @@ -1652,9 +1652,9 @@ sal_Bool ToolBarManager::IsPluginMode() const if ( xModel.is() ) { Sequence< PropertyValue > aSeq = xModel->getArgs(); - comphelper::MediaDescriptor aMediaDescriptor( aSeq ); + utl::MediaDescriptor aMediaDescriptor( aSeq ); bPluginMode = aMediaDescriptor.getUnpackedValueOrDefault< sal_Bool >( - comphelper::MediaDescriptor::PROP_VIEWONLY(), sal_False ); + utl::MediaDescriptor::PROP_VIEWONLY(), sal_False ); } } diff --git a/hwpfilter/CppunitTest_hwpfilter_test_hwpfilter.mk b/hwpfilter/CppunitTest_hwpfilter_test_hwpfilter.mk index 07ae9f88d281..0098ebb9cf94 100644 --- a/hwpfilter/CppunitTest_hwpfilter_test_hwpfilter.mk +++ b/hwpfilter/CppunitTest_hwpfilter_test_hwpfilter.mk @@ -35,6 +35,7 @@ $(eval $(call gb_CppunitTest_use_ure,hwpfilter_test_hwpfilter)) $(eval $(call gb_CppunitTest_use_components,hwpfilter_test_hwpfilter,\ configmgr/source/configmgr \ + framework/util/fwk \ hwpfilter/source/hwp \ ucb/source/core/ucb1 \ ucb/source/ucp/file/ucpfile1 \ diff --git a/hwpfilter/Library_hwp.mk b/hwpfilter/Library_hwp.mk index 059e8b4841dd..7ee4ec7f24fe 100644 --- a/hwpfilter/Library_hwp.mk +++ b/hwpfilter/Library_hwp.mk @@ -16,6 +16,7 @@ $(eval $(call gb_Library_use_libraries,hwp,\ cppu \ cppuhelper \ sal \ + utl \ $(gb_UWINAPI) \ )) diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx index 29fa1a10f0bf..e752ae70ca3c 100644 --- a/hwpfilter/source/hwpreader.cxx +++ b/hwpfilter/source/hwpreader.cxx @@ -125,11 +125,11 @@ HwpReader::~HwpReader() sal_Bool HwpReader::filter(const Sequence< PropertyValue >& rDescriptor) throw(RuntimeException) { - comphelper::MediaDescriptor aDescriptor(rDescriptor); + utl::MediaDescriptor aDescriptor(rDescriptor); aDescriptor.addInputStream(); Reference< XInputStream > xInputStream( - aDescriptor[comphelper::MediaDescriptor::PROP_INPUTSTREAM()], UNO_QUERY_THROW); + aDescriptor[utl::MediaDescriptor::PROP_INPUTSTREAM()], UNO_QUERY_THROW); HStream stream; Sequence < sal_Int8 > aBuffer; diff --git a/hwpfilter/source/hwpreader.hxx b/hwpfilter/source/hwpreader.hxx index bb04fdd4ba6e..b7214c766210 100644 --- a/hwpfilter/source/hwpreader.hxx +++ b/hwpfilter/source/hwpreader.hxx @@ -54,7 +54,7 @@ using namespace ::com::sun::star::xml::sax; #include <assert.h> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include "hwpfile.h" #include "hcode.h" @@ -273,11 +273,11 @@ OUString HwpImportFilter::detect( ::com::sun::star::uno::Sequence< ::com::sun::s { OUString sTypeName; - comphelper::MediaDescriptor aDescriptor(rDescriptor); + utl::MediaDescriptor aDescriptor(rDescriptor); aDescriptor.addInputStream(); Reference< XInputStream > xInputStream( - aDescriptor[comphelper::MediaDescriptor::PROP_INPUTSTREAM()], UNO_QUERY); + aDescriptor[utl::MediaDescriptor::PROP_INPUTSTREAM()], UNO_QUERY); if (xInputStream.is()) { diff --git a/include/oox/core/filterbase.hxx b/include/oox/core/filterbase.hxx index 8d1836f9ce6f..6280f9d0001c 100644 --- a/include/oox/core/filterbase.hxx +++ b/include/oox/core/filterbase.hxx @@ -55,6 +55,8 @@ namespace com { namespace sun { namespace star { namespace comphelper { class IDocPasswordVerifier; +} +namespace utl { class MediaDescriptor; } @@ -141,7 +143,7 @@ public: ::comphelper::SequenceAsHashMap& getFilterData() const; /** Returns the media descriptor. */ - ::comphelper::MediaDescriptor& getMediaDescriptor() const; + utl::MediaDescriptor& getMediaDescriptor() const; /** Returns the URL of the imported or exported file. */ const OUString& getFileUrl() const; @@ -253,11 +255,11 @@ public: // ------------------------------------------------------------------------ protected: virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > - implGetInputStream( ::comphelper::MediaDescriptor& rMediaDesc ) const; + implGetInputStream( utl::MediaDescriptor& rMediaDesc ) const; virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > - implGetOutputStream( ::comphelper::MediaDescriptor& rMediaDesc ) const; + implGetOutputStream( utl::MediaDescriptor& rMediaDesc ) const; - virtual bool implFinalizeExport( ::comphelper::MediaDescriptor& rMediaDescriptor ); + virtual bool implFinalizeExport( utl::MediaDescriptor& rMediaDescriptor ); ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > getMainDocumentStream( ) const; diff --git a/include/oox/core/filterdetect.hxx b/include/oox/core/filterdetect.hxx index c3379a340c6a..4caaaf7a1316 100644 --- a/include/oox/core/filterdetect.hxx +++ b/include/oox/core/filterdetect.hxx @@ -33,7 +33,7 @@ namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } } -namespace comphelper { class MediaDescriptor; } +namespace utl { class MediaDescriptor; } namespace oox { class AttributeList; } @@ -118,7 +118,7 @@ public: its input stream is returned. */ ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > - extractUnencryptedPackage( ::comphelper::MediaDescriptor& rMediaDesc ) const; + extractUnencryptedPackage( utl::MediaDescriptor& rMediaDesc ) const; // com.sun.star.lang.XServiceInfo interface ------------------------------- diff --git a/include/oox/core/xmlfilterbase.hxx b/include/oox/core/xmlfilterbase.hxx index 648b50da97aa..87234fb22328 100644 --- a/include/oox/core/xmlfilterbase.hxx +++ b/include/oox/core/xmlfilterbase.hxx @@ -233,12 +233,12 @@ public: protected: virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > - implGetInputStream( ::comphelper::MediaDescriptor& rMediaDesc ) const; + implGetInputStream( utl::MediaDescriptor& rMediaDesc ) const; virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > - implGetOutputStream( ::comphelper::MediaDescriptor& rMediaDesc ) const; + implGetOutputStream( utl::MediaDescriptor& rMediaDesc ) const; - virtual bool implFinalizeExport( ::comphelper::MediaDescriptor& rMediaDescriptor ); + virtual bool implFinalizeExport( utl::MediaDescriptor& rMediaDescriptor ); private: virtual StorageRef implCreateStorage( diff --git a/include/comphelper/mediadescriptor.hxx b/include/unotools/mediadescriptor.hxx index 4cc457e1f5c8..2a0cb0fefa1d 100644 --- a/include/comphelper/mediadescriptor.hxx +++ b/include/unotools/mediadescriptor.hxx @@ -17,21 +17,20 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_COMPHELPER_MEDIADESCRIPTOR_HXX -#define INCLUDED_COMPHELPER_MEDIADESCRIPTOR_HXX +#ifndef INCLUDED_UNOTOOLS_MEDIADESCRIPTOR_HXX +#define INCLUDED_UNOTOOLS_MEDIADESCRIPTOR_HXX #include <comphelper/docpasswordrequest.hxx> #include <comphelper/sequenceashashmap.hxx> #include <rtl/ustring.hxx> -#include <comphelper/comphelperdllapi.h> +#include <unotools/unotoolsdllapi.h> namespace com { namespace sun { namespace star { namespace io { class XInputStream; } } } } +namespace comphelper { class IDocPasswordVerifier; } -namespace comphelper{ - -class IDocPasswordVerifier; +namespace utl { /** @short can be used to work with a ::com::sun::star::document::MediaDescriptor struct. @@ -43,7 +42,7 @@ class IDocPasswordVerifier; @attention This class isnt threadsafe and must be guarded from outside! */ -class COMPHELPER_DLLPUBLIC MediaDescriptor : public SequenceAsHashMap +class UNOTOOLS_DLLPUBLIC MediaDescriptor : public comphelper::SequenceAsHashMap { public: @@ -260,8 +259,8 @@ class COMPHELPER_DLLPUBLIC MediaDescriptor : public SequenceAsHashMap found, or the user has chossen to cancel password input. */ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > requestAndVerifyDocPassword( - IDocPasswordVerifier& rVerifier, - DocPasswordRequestType eRequestType, + comphelper::IDocPasswordVerifier& rVerifier, + comphelper::DocPasswordRequestType eRequestType, const ::std::vector< OUString >* pDefaultPasswords = 0 ); //------------------------------------------- @@ -288,7 +287,7 @@ class COMPHELPER_DLLPUBLIC MediaDescriptor : public SequenceAsHashMap @throw [css::lang::IllegalArgumentException] if the given PostData stream is <NULL/>. */ - COMPHELPER_DLLPRIVATE sal_Bool impl_openStreamWithPostData( + SAL_DLLPRIVATE sal_Bool impl_openStreamWithPostData( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& _rxPostData ) throw(::com::sun::star::uno::RuntimeException); @@ -314,7 +313,7 @@ class COMPHELPER_DLLPUBLIC MediaDescriptor : public SequenceAsHashMap @throw [css::uno::RuntimeException] if the MediaDescriptor seems to be invalid! */ - COMPHELPER_DLLPRIVATE sal_Bool impl_openStreamWithURL( + SAL_DLLPRIVATE sal_Bool impl_openStreamWithURL( const OUString& sURL, sal_Bool bLockFile ) throw(::com::sun::star::uno::RuntimeException); @@ -336,11 +335,11 @@ class COMPHELPER_DLLPUBLIC MediaDescriptor : public SequenceAsHashMap @return TRUE, if the stream was already part of the descriptor or could be created as new item. FALSE otherwise. */ - COMPHELPER_DLLPRIVATE sal_Bool impl_addInputStream( sal_Bool bLockFile ); + SAL_DLLPRIVATE sal_Bool impl_addInputStream( sal_Bool bLockFile ); }; -} // namespace comphelper +} -#endif // INCLUDED_COMPHELPER_MEDIADESCRIPTOR_HXX +#endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/inc/pch/precompiled_oox.hxx b/oox/inc/pch/precompiled_oox.hxx index 9fc576d0afc2..f997388a1129 100644 --- a/oox/inc/pch/precompiled_oox.hxx +++ b/oox/inc/pch/precompiled_oox.hxx @@ -327,7 +327,6 @@ #include <com/sun/star/xml/sax/XLocator.hpp> #include <comphelper/configurationhelper.hxx> #include <comphelper/docpasswordhelper.hxx> -#include <comphelper/mediadescriptor.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/seqstream.hxx> #include <comphelper/sequenceashashmap.hxx> @@ -395,6 +394,7 @@ #include <unotools/fltrcfg.hxx> #include <unotools/fontcvt.hxx> #include <unotools/fontdefs.hxx> +#include <unotools/mediadescriptor.hxx> #include <unotools/streamwrap.hxx> #include <vcl/cvtgrf.hxx> #include <vcl/graph.hxx> diff --git a/oox/source/core/filterbase.cxx b/oox/source/core/filterbase.cxx index 1eee8458bbf1..30a54d85eb0e 100644 --- a/oox/source/core/filterbase.cxx +++ b/oox/source/core/filterbase.cxx @@ -26,7 +26,7 @@ #include <com/sun/star/task/XInteractionHandler.hpp> #include <com/sun/star/drawing/XShape.hpp> #include <comphelper/docpasswordhelper.hxx> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <osl/mutex.hxx> #include <rtl/instance.hxx> #include <rtl/uri.hxx> @@ -52,7 +52,7 @@ using namespace ::com::sun::star::task; using namespace ::com::sun::star::uno; using ::com::sun::star::container::XNameAccess; -using ::comphelper::MediaDescriptor; +using utl::MediaDescriptor; using ::comphelper::SequenceAsHashMap; using ::oox::ole::OleObjectHelper; using ::oox::ole::VbaProject; diff --git a/oox/source/core/filterdetect.cxx b/oox/source/core/filterdetect.cxx index 2dbb73cd4c43..0c68966fe815 100644 --- a/oox/source/core/filterdetect.cxx +++ b/oox/source/core/filterdetect.cxx @@ -22,7 +22,7 @@ #include <com/sun/star/io/TempFile.hpp> #include <com/sun/star/io/XStream.hpp> #include <comphelper/docpasswordhelper.hxx> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <cppuhelper/supportsservice.hxx> #include "oox/core/fastparser.hxx" @@ -44,7 +44,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::xml::sax; using namespace ::com::sun::star::uri; -using comphelper::MediaDescriptor; +using utl::MediaDescriptor; using comphelper::SequenceAsHashMap; using comphelper::IDocPasswordVerifier; using comphelper::DocPasswordVerifierResult; diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index 109e9b1f3076..98c88863a21b 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -26,7 +26,7 @@ #include <com/sun/star/xml/sax/XFastParser.hpp> #include <com/sun/star/xml/sax/XFastSAXSerializable.hpp> #include <com/sun/star/document/XDocumentProperties.hpp> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <sax/fshelper.hxx> #include <rtl/strbuf.hxx> #include <rtl/ustrbuf.hxx> @@ -70,7 +70,7 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::xml::sax; -using ::comphelper::MediaDescriptor; +using utl::MediaDescriptor; using ::sax_fastparser::FSHelperPtr; using ::sax_fastparser::FastSerializerHelper; diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx index a39711914515..d0dd3495140f 100644 --- a/oox/source/dump/dumperbase.cxx +++ b/oox/source/dump/dumperbase.cxx @@ -47,7 +47,6 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::ucb; using namespace ::com::sun::star::uno; -using ::comphelper::MediaDescriptor; using ::oox::core::FilterBase; namespace { diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 429472be9ddb..311b2dc75f1b 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include "oox/core/xmlfilterbase.hxx" #include "oox/export/shapes.hxx" #include "oox/export/utils.hxx" @@ -103,7 +103,6 @@ using ::oox::core::XmlFilterBase; using ::com::sun::star::chart2::XChartDocument; using ::com::sun::star::frame::XModel; using ::com::sun::star::sheet::XSpreadsheetDocument; -using ::comphelper::MediaDescriptor; using ::sax_fastparser::FSHelperPtr; #define IDS(x) OString(OStringLiteral(#x " ") + OString::number( mnShapeIdMax++ )).getStr() @@ -1321,7 +1320,7 @@ ShapeExport& ShapeExport::WriteOLE2Shape( Reference< XShape > xShape ) // export the embedded document Sequence< PropertyValue > rMedia(1); - rMedia[0].Name = MediaDescriptor::PROP_STREAMFOROUTPUT(); + rMedia[0].Name = utl::MediaDescriptor::PROP_STREAMFOROUTPUT(); rMedia[0].Value <<= xOutStream; Reference< XExporter > xExporter( diff --git a/reportdesign/inc/ReportDefinition.hxx b/reportdesign/inc/ReportDefinition.hxx index b4842117ab97..47f2d5a4d7cf 100644 --- a/reportdesign/inc/ReportDefinition.hxx +++ b/reportdesign/inc/ReportDefinition.hxx @@ -57,7 +57,7 @@ namespace rptui { class OReportModel; } -namespace comphelper +namespace utl { class MediaDescriptor; } @@ -147,7 +147,7 @@ namespace reportdesign void notifyEvent(const OUString& _sEventName); void init(); - void fillArgs(::comphelper::MediaDescriptor& _aDescriptor); + void fillArgs(utl::MediaDescriptor& _aDescriptor); ::com::sun::star::uno::Reference< ::com::sun::star::frame::XTitle > impl_getTitleHelper_throw(); ::com::sun::star::uno::Reference< ::com::sun::star::frame::XUntitledNumbers > impl_getUntitledHelper_throw(); diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index d88832fd36e2..1b72bb5e270e 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -82,7 +82,7 @@ #include <comphelper/broadcasthelper.hxx> #include <comphelper/documentconstants.hxx> #include <comphelper/genericpropertyset.hxx> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <comphelper/mimeconfighelper.hxx> #include <comphelper/namecontainer.hxx> #include <comphelper/namedvaluecollection.hxx> @@ -203,7 +203,7 @@ void lcl_setModelReadOnly(const uno::Reference< embed::XStorage >& _xStorage,::b _rModel->SetReadOnly((nOpenMode & embed::ElementModes::WRITE) != embed::ElementModes::WRITE); } -void lcl_stripLoadArguments( ::comphelper::MediaDescriptor& _rDescriptor, uno::Sequence< beans::PropertyValue >& _rArgs ) +void lcl_stripLoadArguments( utl::MediaDescriptor& _rDescriptor, uno::Sequence< beans::PropertyValue >& _rArgs ) { _rDescriptor.erase( OUString( "StatusIndicator" ) ); _rDescriptor.erase( OUString( "InteractionHandler" ) ); @@ -211,7 +211,7 @@ void lcl_stripLoadArguments( ::comphelper::MediaDescriptor& _rDescriptor, uno::S _rDescriptor >> _rArgs; } // ----------------------------------------------------------------------------- -void lcl_extractAndStartStatusIndicator( const ::comphelper::MediaDescriptor& _rDescriptor, uno::Reference< task::XStatusIndicator >& _rxStatusIndicator, +void lcl_extractAndStartStatusIndicator( const utl::MediaDescriptor& _rDescriptor, uno::Reference< task::XStatusIndicator >& _rxStatusIndicator, uno::Sequence< uno::Any >& _rCallArgs ) { try @@ -1263,7 +1263,7 @@ void SAL_CALL OReportDefinition::close( ::sal_Bool _bDeliverOwnership ) throw (u ::osl::MutexGuard aGuard(m_aMutex); ::connectivity::checkDisposed( ReportDefinitionBase::rBHelper.bDisposed ); - ::comphelper::MediaDescriptor aDescriptor( _aArguments ); + utl::MediaDescriptor aDescriptor( _aArguments ); m_pImpl->m_pUndoManager->GetSfxUndoManager().EnableUndo( false ); try @@ -1280,7 +1280,7 @@ void SAL_CALL OReportDefinition::close( ::sal_Bool _bDeliverOwnership ) throw (u return sal_True; } // ----------------------------------------------------------------------------- -void OReportDefinition::fillArgs(::comphelper::MediaDescriptor& _aDescriptor) +void OReportDefinition::fillArgs(utl::MediaDescriptor& _aDescriptor) { uno::Sequence<beans::PropertyValue> aComponentData; aComponentData = _aDescriptor.getUnpackedValueOrDefault("ComponentData",aComponentData); @@ -1383,7 +1383,7 @@ void OReportDefinition::impl_loadFromStorage_nolck_throw( const uno::Reference< { m_pImpl->m_xStorage = _xStorageToLoadFrom; - ::comphelper::MediaDescriptor aDescriptor( _aMediaDescriptor ); + utl::MediaDescriptor aDescriptor( _aMediaDescriptor ); fillArgs(aDescriptor); aDescriptor.createItemIfMissing(OUString("Storage"),uno::makeAny(_xStorageToLoadFrom)); @@ -1412,7 +1412,7 @@ void OReportDefinition::impl_loadFromStorage_nolck_throw( const uno::Reference< uno::Reference<XComponent> xComponent(static_cast<OWeakObject*>(this),uno::UNO_QUERY); xImporter->setTargetDocument(xComponent); - ::comphelper::MediaDescriptor aTemp; + utl::MediaDescriptor aTemp; aTemp << aDelegatorArguments; xFilter->filter(aTemp.getAsConstPropertyValueList()); @@ -1443,7 +1443,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS // create XStatusIndicator uno::Reference<task::XStatusIndicator> xStatusIndicator; uno::Sequence< uno::Any > aDelegatorArguments; - ::comphelper::MediaDescriptor aDescriptor( _aMediaDescriptor ); + utl::MediaDescriptor aDescriptor( _aMediaDescriptor ); lcl_extractAndStartStatusIndicator( aDescriptor, xStatusIndicator, aDelegatorArguments ); // properties diff --git a/reportdesign/source/filter/xml/xmlHelper.cxx b/reportdesign/source/filter/xml/xmlHelper.cxx index 30830c5501ba..b11bd0f85fc6 100644 --- a/reportdesign/source/filter/xml/xmlHelper.cxx +++ b/reportdesign/source/filter/xml/xmlHelper.cxx @@ -23,7 +23,6 @@ #include <xmloff/controlpropertyhdl.hxx> #include <connectivity/dbtools.hxx> #include <comphelper/propertysethelper.hxx> -#include <comphelper/mediadescriptor.hxx> #include <comphelper/genericpropertyset.hxx> #include <com/sun/star/style/ParagraphAdjust.hpp> #include <com/sun/star/awt/TextAlign.hpp> diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx index 1cdc9c46c4c2..bc50f664d2c7 100644 --- a/reportdesign/source/filter/xml/xmlfilter.cxx +++ b/reportdesign/source/filter/xml/xmlfilter.cxx @@ -40,7 +40,7 @@ #include <comphelper/processfactory.hxx> #include <comphelper/genericpropertyset.hxx> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <cppuhelper/supportsservice.hxx> #include <xmloff/ProgressBarHelper.hxx> #include <sfx2/docfile.hxx> @@ -538,7 +538,7 @@ sal_Bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor ) { MAP_LEN( "StreamRelPath"), 0, &::getCppuType( (OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 }, { NULL, 0, 0, NULL, 0, 0 } }; - ::comphelper::MediaDescriptor aDescriptor(rDescriptor); + utl::MediaDescriptor aDescriptor(rDescriptor); uno::Reference<beans::XPropertySet> xProp = comphelper::GenericPropertySet_CreateInstance(new comphelper::PropertySetInfo(pMap)); const OUString sVal( aDescriptor.getUnpackedValueOrDefault(aDescriptor.PROP_DOCUMENTBASEURL(),OUString()) ); xProp->setPropertyValue("BaseURI", uno::makeAny(sVal)); diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index 50a4aea4a0c2..9820d40153b5 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -41,7 +41,7 @@ #include "reportformula.hxx" #include <comphelper/documentconstants.hxx> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/property.hxx> #include <comphelper/sequenceashashmap.hxx> @@ -1685,7 +1685,7 @@ void OReportController::impl_initialize( ) m_xFormatter.set(util::NumberFormatter::create(m_xContext), UNO_QUERY_THROW); m_xFormatter->attachNumberFormatsSupplier(Reference< XNumberFormatsSupplier>(m_xReportDefinition,uno::UNO_QUERY)); - ::comphelper::MediaDescriptor aDescriptor( m_xReportDefinition->getArgs() ); + utl::MediaDescriptor aDescriptor( m_xReportDefinition->getArgs() ); OUString sHierarchicalDocumentName; sHierarchicalDocumentName = aDescriptor.getUnpackedValueOrDefault("HierarchicalDocumentName",sHierarchicalDocumentName); diff --git a/sc/Library_scd.mk b/sc/Library_scd.mk index f479646a9ece..4d02ae1839ae 100644 --- a/sc/Library_scd.mk +++ b/sc/Library_scd.mk @@ -31,6 +31,7 @@ $(eval $(call gb_Library_use_libraries,scd,\ svt \ tl \ ucbhelper \ + utl \ vcl \ $(gb_UWINAPI) \ )) diff --git a/sc/inc/pch/precompiled_scfilt.hxx b/sc/inc/pch/precompiled_scfilt.hxx index 46f709c8bd71..f82b6259e8ec 100644 --- a/sc/inc/pch/precompiled_scfilt.hxx +++ b/sc/inc/pch/precompiled_scfilt.hxx @@ -332,7 +332,6 @@ #include <com/sun/star/util/XProtectable.hpp> #include <comphelper/classids.hxx> #include <comphelper/docpasswordhelper.hxx> -#include <comphelper/mediadescriptor.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/sequenceashashmap.hxx> #include <comphelper/string.hxx> @@ -525,6 +524,7 @@ #include <unotools/fltrcfg.hxx> #include <unotools/fontcvt.hxx> #include <unotools/localedatawrapper.hxx> +#include <unotools/mediadescriptor.hxx> #include <unotools/moduleoptions.hxx> #include <unotools/saveopt.hxx> #include <unotools/streamwrap.hxx> diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx index d3c6ee421cd4..b5e99299eead 100644 --- a/sc/source/filter/excel/excel.cxx +++ b/sc/source/filter/excel/excel.cxx @@ -26,7 +26,6 @@ #include <sot/storage.hxx> #include <sot/exchange.hxx> #include <tools/globname.hxx> -#include <comphelper/mediadescriptor.hxx> #include <comphelper/processfactory.hxx> #include <com/sun/star/beans/NamedValue.hpp> #include <com/sun/star/document/XFilter.hpp> diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx index 5b4ba0d1ed83..32ed8ca116fb 100644 --- a/sc/source/filter/excel/excimp8.cxx +++ b/sc/source/filter/excel/excimp8.cxx @@ -23,7 +23,6 @@ #include <scitems.hxx> #include <comphelper/processfactory.hxx> -#include <comphelper/mediadescriptor.hxx> #include <unotools/fltrcfg.hxx> #include <vcl/wmf.hxx> diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 95d2bea61207..d22ae6652a91 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -106,7 +106,6 @@ #include "namebuff.hxx" #include <boost/shared_ptr.hpp> -#include <comphelper/mediadescriptor.hxx> #include <sfx2/docfile.hxx> using ::com::sun::star::uno::makeAny; diff --git a/sc/source/filter/oox/viewsettings.cxx b/sc/source/filter/oox/viewsettings.cxx index 7df163de334a..9d1fba171b46 100644 --- a/sc/source/filter/oox/viewsettings.cxx +++ b/sc/source/filter/oox/viewsettings.cxx @@ -27,7 +27,7 @@ #include <com/sun/star/document/IndexedPropertyValues.hpp> #include <com/sun/star/document/XViewDataSupplier.hpp> #include <com/sun/star/document/NamedPropertyValues.hpp> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include "oox/core/filterbase.hxx" #include "oox/helper/attributelist.hxx" #include "oox/helper/containerhelper.hxx" diff --git a/sc/source/filter/oox/workbooksettings.cxx b/sc/source/filter/oox/workbooksettings.cxx index 363184799fe9..da2595c680fd 100644 --- a/sc/source/filter/oox/workbooksettings.cxx +++ b/sc/source/filter/oox/workbooksettings.cxx @@ -22,7 +22,7 @@ #include <com/sun/star/sheet/XCalculatable.hpp> #include <com/sun/star/util/Date.hpp> #include <com/sun/star/util/XNumberFormatsSupplier.hpp> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include "oox/core/filterbase.hxx" #include "oox/helper/attributelist.hxx" #include "oox/helper/propertyset.hxx" @@ -41,7 +41,6 @@ using namespace ::com::sun::star::sheet; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::util; -using ::comphelper::MediaDescriptor; using ::oox::core::CodecHelper; // ============================================================================ diff --git a/sc/source/ui/collab/sccollaboration.cxx b/sc/source/ui/collab/sccollaboration.cxx index 422f50064f56..7dd6ef9eba2e 100644 --- a/sc/source/ui/collab/sccollaboration.cxx +++ b/sc/source/ui/collab/sccollaboration.cxx @@ -12,7 +12,7 @@ #include "docsh.hxx" #include "sendfunc.hxx" #include <com/sun/star/document/XDocumentRecovery.hpp> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <unotools/tempfile.hxx> #include <unotools/localfilehelper.hxx> @@ -50,9 +50,9 @@ void ScCollaboration::SaveAndSendFile( TpContact* pContact ) const OUString aFileURL; ::utl::LocalFileHelper::ConvertPhysicalNameToURL( aTmpPath, aFileURL ); - ::comphelper::MediaDescriptor aDescriptor; + utl::MediaDescriptor aDescriptor; // some issue with hyperlinks: - aDescriptor[::comphelper::MediaDescriptor::PROP_DOCUMENTBASEURL()] <<= OUString(); + aDescriptor[utl::MediaDescriptor::PROP_DOCUMENTBASEURL()] <<= OUString(); try { css::uno::Reference< css::document::XDocumentRecovery > xDocRecovery( mpScDocShell->GetBaseModel(), css::uno::UNO_QUERY_THROW); diff --git a/sc/source/ui/unoobj/exceldetect.cxx b/sc/source/ui/unoobj/exceldetect.cxx index e87d27a7b736..5440c621ebdb 100644 --- a/sc/source/ui/unoobj/exceldetect.cxx +++ b/sc/source/ui/unoobj/exceldetect.cxx @@ -17,11 +17,11 @@ #include "sfx2/app.hxx" #include "sfx2/docfile.hxx" #include "sfx2/sfxsids.hrc" -#include "comphelper/mediadescriptor.hxx" +#include "unotools/mediadescriptor.hxx" #include "sot/storage.hxx" using namespace com::sun::star; -using comphelper::MediaDescriptor; +using utl::MediaDescriptor; ScExcelBiffDetect::ScExcelBiffDetect( const uno::Reference<uno::XComponentContext>& /*xContext*/ ) {} ScExcelBiffDetect::~ScExcelBiffDetect() {} diff --git a/scripting/Library_scriptframe.mk b/scripting/Library_scriptframe.mk index 416c6490050c..5b37df720211 100644 --- a/scripting/Library_scriptframe.mk +++ b/scripting/Library_scriptframe.mk @@ -27,6 +27,7 @@ $(eval $(call gb_Library_use_libraries,scriptframe,\ sal \ tl \ ucbhelper \ + utl \ $(gb_UWINAPI) \ )) diff --git a/scripting/source/provider/BrowseNodeFactoryImpl.cxx b/scripting/source/provider/BrowseNodeFactoryImpl.cxx index e9c510545bf6..79326b5149c3 100644 --- a/scripting/source/provider/BrowseNodeFactoryImpl.cxx +++ b/scripting/source/provider/BrowseNodeFactoryImpl.cxx @@ -24,7 +24,7 @@ #include <cppuhelper/exc_hlp.hxx> #include <cppuhelper/implbase1.hxx> #include <cppuhelper/supportsservice.hxx> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <com/sun/star/lang/XMultiComponentFactory.hpp> #include <com/sun/star/frame/XModel.hpp> @@ -332,10 +332,10 @@ Sequence< Reference< browse::XBrowseNode > > getAllBrowseNodes( const Reference< css::uno::Reference< css::frame::XController > xCurrentController = model->getCurrentController(); if( xCurrentController.is() ) { - comphelper::MediaDescriptor aMD( model->getArgs() ); + utl::MediaDescriptor aMD( model->getArgs() ); sal_Bool bDefault = false; - sal_Bool bHidden = aMD.getUnpackedValueOrDefault( comphelper::MediaDescriptor::PROP_HIDDEN(), bDefault ); - sal_Bool bPreview = aMD.getUnpackedValueOrDefault( comphelper::MediaDescriptor::PROP_PREVIEW(), bDefault ); + sal_Bool bHidden = aMD.getUnpackedValueOrDefault( utl::MediaDescriptor::PROP_HIDDEN(), bDefault ); + sal_Bool bPreview = aMD.getUnpackedValueOrDefault( utl::MediaDescriptor::PROP_PREVIEW(), bDefault ); if( !bHidden && !bPreview ) { Reference< document::XEmbeddedScripts > xScripts( model, UNO_QUERY ); diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx index 5ac608d9250f..9521901b3045 100644 --- a/sd/inc/pch/precompiled_sd.hxx +++ b/sd/inc/pch/precompiled_sd.hxx @@ -352,7 +352,6 @@ #include <comphelper/expandmacro.hxx> #include <comphelper/extract.hxx> #include <comphelper/genericpropertyset.hxx> -#include <comphelper/mediadescriptor.hxx> #include <comphelper/namedvaluecollection.hxx> #include <comphelper/oslfile2streamwrap.hxx> #include <comphelper/processfactory.hxx> @@ -838,6 +837,7 @@ #include <unotools/linguprops.hxx> #include <unotools/localedatawrapper.hxx> #include <unotools/localfilehelper.hxx> +#include <unotools/mediadescriptor.hxx> #include <unotools/moduleoptions.hxx> #include <unotools/pathoptions.hxx> #include <unotools/saveopt.hxx> diff --git a/sd/source/ui/framework/factories/BasicToolBarFactory.cxx b/sd/source/ui/framework/factories/BasicToolBarFactory.cxx index 5a2c061087c7..02b7c3f11ee6 100644 --- a/sd/source/ui/framework/factories/BasicToolBarFactory.cxx +++ b/sd/source/ui/framework/factories/BasicToolBarFactory.cxx @@ -22,7 +22,7 @@ #include "ViewTabBar.hxx" #include "framework/FrameworkHelper.hxx" -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <com/sun/star/lang/IllegalArgumentException.hpp> #include "DrawController.hxx" @@ -128,9 +128,9 @@ void SAL_CALL BasicToolBarFactory::initialize (const Sequence<Any>& aArguments) if (pController != NULL) mpViewShellBase = pController->GetViewShellBase(); - ::comphelper::MediaDescriptor aDescriptor (mxController->getModel()->getArgs()); + utl::MediaDescriptor aDescriptor (mxController->getModel()->getArgs()); if ( ! aDescriptor.getUnpackedValueOrDefault( - ::comphelper::MediaDescriptor::PROP_PREVIEW(), + utl::MediaDescriptor::PROP_PREVIEW(), sal_False)) { // Register the factory for its supported tool bars. diff --git a/sd/source/ui/remotecontrol/Communicator.cxx b/sd/source/ui/remotecontrol/Communicator.cxx index d8e081301922..4b2dc84d37e3 100644 --- a/sd/source/ui/remotecontrol/Communicator.cxx +++ b/sd/source/ui/remotecontrol/Communicator.cxx @@ -12,7 +12,6 @@ #include <com/sun/star/frame/Desktop.hpp> #include <comphelper/processfactory.hxx> #include <comphelper/documentinfo.hxx> -#include <comphelper/mediadescriptor.hxx> #include <config_version.h> #include <rtl/string.hxx> #include <rtl/strbuf.hxx> diff --git a/sfx2/inc/pch/precompiled_sfx.hxx b/sfx2/inc/pch/precompiled_sfx.hxx index cf955e951c8a..8a145d642dc8 100644 --- a/sfx2/inc/pch/precompiled_sfx.hxx +++ b/sfx2/inc/pch/precompiled_sfx.hxx @@ -66,7 +66,6 @@ #include <com/sun/star/xml/sax/Writer.hpp> #include <com/sun/star/xml/sax/XSAXSerializable.hpp> #include <com/sun/star/xml/xpath/XPathAPI.hpp> -#include <comphelper/mediadescriptor.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/sequenceasvector.hxx> #include <comphelper/storagehelper.hxx> @@ -534,7 +533,6 @@ #include <comphelper/flagguard.hxx> #include <comphelper/interaction.hxx> #include <comphelper/makesequence.hxx> -#include <comphelper/mediadescriptor.hxx> #include <comphelper/mimeconfighelper.hxx> #include <comphelper/namedvaluecollection.hxx> #include <comphelper/numberedcollection.hxx> @@ -775,6 +773,7 @@ #include <unotools/localedatawrapper.hxx> #include <unotools/localfilehelper.hxx> #include <unotools/localisationoptions.hxx> +#include <unotools/mediadescriptor.hxx> #include <unotools/misccfg.hxx> #include <unotools/moduleoptions.hxx> #include <unotools/pathoptions.hxx> diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx index ea8184a42a57..547a6344594b 100644 --- a/sfx2/source/appl/fileobj.cxx +++ b/sfx2/source/appl/fileobj.cxx @@ -33,7 +33,7 @@ #include <com/sun/star/uno/Sequence.hxx> #include <sfx2/docfac.hxx> #include <com/sun/star/document/XTypeDetection.hpp> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <comphelper/processfactory.hxx> #include <sfx2/linkmgr.hxx> #include <sfx2/opengrf.hxx> @@ -392,8 +392,8 @@ OUString impl_getFilter( const OUString& _rURL ) css::uno::UNO_QUERY ); if ( xTypeDetection.is() ) { - ::comphelper::MediaDescriptor aDescr; - aDescr[ ::comphelper::MediaDescriptor::PROP_URL() ] <<= OUString( _rURL ); + utl::MediaDescriptor aDescr; + aDescr[ utl::MediaDescriptor::PROP_URL() ] <<= OUString( _rURL ); css::uno::Sequence< css::beans::PropertyValue > aDescrList = aDescr.getAsConstPropertyValueList(); OUString sType = xTypeDetection->queryTypeByDescriptor( aDescrList, sal_True ); diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index 67e4ecb0481a..daee557adadb 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -72,7 +72,7 @@ #include <com/sun/star/ucb/XContent.hpp> #include <unotools/pathoptions.hxx> #include <unotools/moduleoptions.hxx> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <tools/urlobj.hxx> #include <rtl/instance.hxx> @@ -440,19 +440,19 @@ sal_uInt32 SfxFilterMatcher::GuessFilterControlDefaultUI( SfxMedium& rMedium, c // stream exists => deep detection (with preselection ... if possible) if (xInStream.is()) { - ::comphelper::MediaDescriptor aDescriptor; + utl::MediaDescriptor aDescriptor; - aDescriptor[::comphelper::MediaDescriptor::PROP_URL() ] <<= sURL; - aDescriptor[::comphelper::MediaDescriptor::PROP_INPUTSTREAM() ] <<= xInStream; - aDescriptor[::comphelper::MediaDescriptor::PROP_INTERACTIONHANDLER()] <<= rMedium.GetInteractionHandler(); + aDescriptor[utl::MediaDescriptor::PROP_URL() ] <<= sURL; + aDescriptor[utl::MediaDescriptor::PROP_INPUTSTREAM() ] <<= xInStream; + aDescriptor[utl::MediaDescriptor::PROP_INTERACTIONHANDLER()] <<= rMedium.GetInteractionHandler(); if ( !m_rImpl.aName.isEmpty() ) - aDescriptor[::comphelper::MediaDescriptor::PROP_DOCUMENTSERVICE()] <<= m_rImpl.aName; + aDescriptor[utl::MediaDescriptor::PROP_DOCUMENTSERVICE()] <<= m_rImpl.aName; if ( pOldFilter ) { - aDescriptor[::comphelper::MediaDescriptor::PROP_TYPENAME() ] <<= OUString( pOldFilter->GetTypeName() ); - aDescriptor[::comphelper::MediaDescriptor::PROP_FILTERNAME()] <<= OUString( pOldFilter->GetFilterName() ); + aDescriptor[utl::MediaDescriptor::PROP_TYPENAME() ] <<= OUString( pOldFilter->GetTypeName() ); + aDescriptor[utl::MediaDescriptor::PROP_FILTERNAME()] <<= OUString( pOldFilter->GetFilterName() ); } uno::Sequence< beans::PropertyValue > lDescriptor = aDescriptor.getAsConstPropertyValueList(); diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx index a726242eeabb..99b4c7240c7e 100644 --- a/sfx2/source/dialog/mailmodel.cxx +++ b/sfx2/source/dialog/mailmodel.cxx @@ -65,7 +65,6 @@ #include <tools/urlobj.hxx> #include <unotools/useroptions.hxx> #include <comphelper/extract.hxx> -#include <comphelper/mediadescriptor.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/sequenceashashmap.hxx> #include <comphelper/sequenceasvector.hxx> diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx index 489d5c7416af..1b823cc42893 100644 --- a/sfx2/source/doc/DocumentMetadataAccess.cxx +++ b/sfx2/source/doc/DocumentMetadataAccess.cxx @@ -40,7 +40,7 @@ #include <comphelper/interaction.hxx> #include <comphelper/makesequence.hxx> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <comphelper/sequenceasvector.hxx> #include <comphelper/storagehelper.hxx> @@ -552,7 +552,7 @@ readStream(struct DocumentMetadataAccess_Impl & i_rImpl, try { OUString mimeType; xDirProps->getPropertyValue( - ::comphelper::MediaDescriptor::PROP_MEDIATYPE() ) + utl::MediaDescriptor::PROP_MEDIATYPE() ) >>= mimeType; if (mimeType.matchAsciiL(s_odfmime, sizeof(s_odfmime) - 1)) { @@ -655,7 +655,7 @@ writeStream(struct DocumentMetadataAccess_Impl & i_rImpl, try { OUString mimeType; xDirProps->getPropertyValue( - ::comphelper::MediaDescriptor::PROP_MEDIATYPE() ) + utl::MediaDescriptor::PROP_MEDIATYPE() ) >>= mimeType; if (mimeType.matchAsciiL(s_odfmime, sizeof(s_odfmime) - 1)) { OSL_TRACE("writeStream: " @@ -1275,13 +1275,13 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, lang::WrappedTargetException) { uno::Reference<io::XInputStream> xIn; - ::comphelper::MediaDescriptor md(i_rMedium); + utl::MediaDescriptor md(i_rMedium); OUString URL; - md[ ::comphelper::MediaDescriptor::PROP_URL() ] >>= URL; + md[ utl::MediaDescriptor::PROP_URL() ] >>= URL; OUString BaseURL; - md[ ::comphelper::MediaDescriptor::PROP_DOCUMENTBASEURL() ] >>= BaseURL; + md[ utl::MediaDescriptor::PROP_DOCUMENTBASEURL() ] >>= BaseURL; if (md.addInputStream()) { - md[ ::comphelper::MediaDescriptor::PROP_INPUTSTREAM() ] >>= xIn; + md[ utl::MediaDescriptor::PROP_INPUTSTREAM() ] >>= xIn; } if (!xIn.is() && URL.isEmpty()) { throw lang::IllegalArgumentException(OUString( @@ -1324,7 +1324,7 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, } } uno::Reference<task::XInteractionHandler> xIH; - md[ ::comphelper::MediaDescriptor::PROP_INTERACTIONHANDLER() ] >>= xIH; + md[ utl::MediaDescriptor::PROP_INTERACTIONHANDLER() ] >>= xIH; loadMetadataFromStorage(xStorage, xBaseURI, xIH); } @@ -1334,9 +1334,9 @@ DocumentMetadataAccess::storeMetadataToMedium( throw (uno::RuntimeException, lang::IllegalArgumentException, lang::WrappedTargetException) { - ::comphelper::MediaDescriptor md(i_rMedium); + utl::MediaDescriptor md(i_rMedium); OUString URL; - md[ ::comphelper::MediaDescriptor::PROP_URL() ] >>= URL; + md[ utl::MediaDescriptor::PROP_URL() ] >>= URL; if (URL.isEmpty()) { throw lang::IllegalArgumentException(OUString( "DocumentMetadataAccess::storeMetadataToMedium: " @@ -1360,15 +1360,15 @@ throw (uno::RuntimeException, lang::IllegalArgumentException, "cannot get Storage"), *this); } // set MIME type of the storage - ::comphelper::MediaDescriptor::const_iterator iter - = md.find(::comphelper::MediaDescriptor::PROP_MEDIATYPE()); + utl::MediaDescriptor::const_iterator iter + = md.find(utl::MediaDescriptor::PROP_MEDIATYPE()); if (iter != md.end()) { uno::Reference< beans::XPropertySet > xProps(xStorage, uno::UNO_QUERY_THROW); try { // this is NOT supported in FileSystemStorage xProps->setPropertyValue( - ::comphelper::MediaDescriptor::PROP_MEDIATYPE(), + utl::MediaDescriptor::PROP_MEDIATYPE(), iter->second); } catch (const uno::Exception &) { } } diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx index f62bea6e0b3c..4f51051d1492 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -64,7 +64,7 @@ #include <cppuhelper/basemutex.hxx> #include <cppuhelper/interfacecontainer.hxx> #include <comphelper/storagehelper.hxx> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <comphelper/sequenceasvector.hxx> #include <sot/storage.hxx> #include <sfx2/docfile.hxx> @@ -2028,13 +2028,13 @@ SfxDocumentMetaData::loadFromMedium(const OUString & URL, css::lang::WrappedTargetException, css::io::IOException) { css::uno::Reference<css::io::XInputStream> xIn; - ::comphelper::MediaDescriptor md(Medium); + utl::MediaDescriptor md(Medium); // if we have an URL parameter, it replaces the one in the media descriptor if (!URL.isEmpty()) { - md[ ::comphelper::MediaDescriptor::PROP_URL() ] <<= URL; + md[ utl::MediaDescriptor::PROP_URL() ] <<= URL; } if (sal_True == md.addInputStream()) { - md[ ::comphelper::MediaDescriptor::PROP_INPUTSTREAM() ] >>= xIn; + md[ utl::MediaDescriptor::PROP_INPUTSTREAM() ] >>= xIn; } css::uno::Reference<css::embed::XStorage> xStorage; try { @@ -2069,9 +2069,9 @@ SfxDocumentMetaData::storeToMedium(const OUString & URL, throw (css::uno::RuntimeException, css::lang::WrappedTargetException, css::io::IOException) { - ::comphelper::MediaDescriptor md(Medium); + utl::MediaDescriptor md(Medium); if (!URL.isEmpty()) { - md[ ::comphelper::MediaDescriptor::PROP_URL() ] <<= URL; + md[ utl::MediaDescriptor::PROP_URL() ] <<= URL; } SfxMedium aMedium(md.getAsConstPropertyValueList()); css::uno::Reference<css::embed::XStorage> xStorage @@ -2084,13 +2084,13 @@ SfxDocumentMetaData::storeToMedium(const OUString & URL, *this); } // set MIME type of the storage - ::comphelper::MediaDescriptor::const_iterator iter - = md.find(::comphelper::MediaDescriptor::PROP_MEDIATYPE()); + utl::MediaDescriptor::const_iterator iter + = md.find(utl::MediaDescriptor::PROP_MEDIATYPE()); if (iter != md.end()) { css::uno::Reference< css::beans::XPropertySet > xProps(xStorage, css::uno::UNO_QUERY_THROW); xProps->setPropertyValue( - ::comphelper::MediaDescriptor::PROP_MEDIATYPE(), + utl::MediaDescriptor::PROP_MEDIATYPE(), iter->second); } storeToStorage(xStorage, md.getAsConstPropertyValueList()); diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 1aacb92e1018..0dd46584b46b 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -87,7 +87,7 @@ #include <osl/file.hxx> #include <comphelper/storagehelper.hxx> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <comphelper/docpasswordhelper.hxx> #include <tools/inetmime.hxx> #include <unotools/ucblockbytes.hxx> @@ -2250,13 +2250,13 @@ void SfxMedium::GetLockingStream_Impl() // open the original document uno::Sequence< beans::PropertyValue > xProps; TransformItems( SID_OPENDOC, *GetItemSet(), xProps ); - comphelper::MediaDescriptor aMedium( xProps ); + utl::MediaDescriptor aMedium( xProps ); aMedium.addInputStreamOwnLock(); uno::Reference< io::XInputStream > xInputStream; - aMedium[comphelper::MediaDescriptor::PROP_STREAM()] >>= pImp->m_xLockingStream; - aMedium[comphelper::MediaDescriptor::PROP_INPUTSTREAM()] >>= xInputStream; + aMedium[utl::MediaDescriptor::PROP_STREAM()] >>= pImp->m_xLockingStream; + aMedium[utl::MediaDescriptor::PROP_INPUTSTREAM()] >>= xInputStream; if ( !pImp->pTempFile && pImp->m_aName.isEmpty() ) { @@ -2336,7 +2336,7 @@ void SfxMedium::GetMedium_Impl() else { TransformItems( SID_OPENDOC, *GetItemSet(), xProps ); - comphelper::MediaDescriptor aMedium( xProps ); + utl::MediaDescriptor aMedium( xProps ); if ( pImp->m_xLockingStream.is() && !bFromTempFile ) { @@ -2347,8 +2347,8 @@ void SfxMedium::GetMedium_Impl() { if ( bFromTempFile ) { - aMedium[comphelper::MediaDescriptor::PROP_URL()] <<= OUString( aFileName ); - aMedium.erase( comphelper::MediaDescriptor::PROP_READONLY() ); + aMedium[utl::MediaDescriptor::PROP_URL()] <<= OUString( aFileName ); + aMedium.erase( utl::MediaDescriptor::PROP_READONLY() ); aMedium.addInputStream(); } else if ( ::utl::LocalFileHelper::IsLocalFile( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ) ) @@ -2363,8 +2363,8 @@ void SfxMedium::GetMedium_Impl() // the check is done in LockOrigFileOnDemand() for file and non-file URLs //TODO/MBA: what happens if property is not there?! - aMedium[comphelper::MediaDescriptor::PROP_STREAM()] >>= pImp->xStream; - aMedium[comphelper::MediaDescriptor::PROP_INPUTSTREAM()] >>= pImp->xInputStream; + aMedium[utl::MediaDescriptor::PROP_STREAM()] >>= pImp->xStream; + aMedium[utl::MediaDescriptor::PROP_INPUTSTREAM()] >>= pImp->xInputStream; } GetContent(); diff --git a/sw/inc/pch/precompiled_msword.hxx b/sw/inc/pch/precompiled_msword.hxx index fbfa48288c76..44cddc2c7868 100644 --- a/sw/inc/pch/precompiled_msword.hxx +++ b/sw/inc/pch/precompiled_msword.hxx @@ -94,7 +94,6 @@ #include <com/sun/star/xml/sax/XSAXSerializable.hpp> #include <comphelper/docpasswordrequest.hxx> #include <comphelper/extract.hxx> -#include <comphelper/mediadescriptor.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/sequenceashashmap.hxx> #include <comphelper/storagehelper.hxx> @@ -267,6 +266,7 @@ #include <unotools/fontcvt.hxx> #include <unotools/localedatawrapper.hxx> #include <unotools/localfilehelper.hxx> +#include <unotools/mediadescriptor.hxx> #include <unotools/pathoptions.hxx> #include <unotools/saveopt.hxx> #include <unotools/streamwrap.hxx> diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx index 1285a3e2fdef..8b7bf4bf7bb9 100644 --- a/sw/inc/pch/precompiled_sw.hxx +++ b/sw/inc/pch/precompiled_sw.hxx @@ -447,7 +447,6 @@ #include <comphelper/flagguard.hxx> #include <comphelper/genericpropertyset.hxx> #include <comphelper/makesequence.hxx> -#include <comphelper/mediadescriptor.hxx> #include <comphelper/namedvaluecollection.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/scoped_disposing_ptr.hxx> @@ -1020,6 +1019,7 @@ #include <unotools/linguprops.hxx> #include <unotools/localedatawrapper.hxx> #include <unotools/localfilehelper.hxx> +#include <unotools/mediadescriptor.hxx> #include <unotools/misccfg.hxx> #include <unotools/moduleoptions.hxx> #include <unotools/pathoptions.hxx> diff --git a/sw/source/core/docnode/retrieveinputstream.cxx b/sw/source/core/docnode/retrieveinputstream.cxx index 050bd2645404..1e4fa27535cb 100644 --- a/sw/source/core/docnode/retrieveinputstream.cxx +++ b/sw/source/core/docnode/retrieveinputstream.cxx @@ -18,7 +18,7 @@ */ #include <retrieveinputstream.hxx> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <com/sun/star/io/XStream.hpp> /* class for a thread to retrieve an input stream given by an URL @@ -52,16 +52,16 @@ void SwAsyncRetrieveInputStreamThread::threadFunction() com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue > xProps( 1 ); xProps[0].Name = "URL"; xProps[0].Value <<= OUString( mrLinkedURL ); - comphelper::MediaDescriptor aMedium( xProps ); + utl::MediaDescriptor aMedium( xProps ); aMedium.addInputStream(); com::sun::star::uno::Reference<com::sun::star::io::XInputStream> xInputStream; - aMedium[comphelper::MediaDescriptor::PROP_INPUTSTREAM()] >>= xInputStream; + aMedium[utl::MediaDescriptor::PROP_INPUTSTREAM()] >>= xInputStream; if ( !xInputStream.is() ) { com::sun::star::uno::Reference<com::sun::star::io::XStream> xStream; - aMedium[comphelper::MediaDescriptor::PROP_STREAM()] >>= xStream; + aMedium[utl::MediaDescriptor::PROP_STREAM()] >>= xStream; if ( xStream.is() ) { xInputStream = xStream->getInputStream(); diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx index 9f8e0ca57a7f..32c9da99e48c 100644 --- a/sw/source/core/docnode/swbaslnk.cxx +++ b/sw/source/core/docnode/swbaslnk.cxx @@ -23,7 +23,6 @@ #include <osl/thread.hxx> #include <salhelper/condition.hxx> -#include <comphelper/mediadescriptor.hxx> #include <sfx2/docfile.hxx> #include <sfx2/lnkbase.hxx> #include <sfx2/objsh.hxx> diff --git a/sw/source/core/layout/dumpfilter.cxx b/sw/source/core/layout/dumpfilter.cxx index 7249a4307b75..fb0800612afb 100644 --- a/sw/source/core/layout/dumpfilter.cxx +++ b/sw/source/core/layout/dumpfilter.cxx @@ -14,7 +14,7 @@ #include <rootfrm.hxx> #include <unotxdoc.hxx> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <libxml/xmlwriter.h> @@ -97,11 +97,11 @@ namespace sw { sal_Bool bRet = sal_False; - comphelper::MediaDescriptor aMediaDesc = aDescriptor; + utl::MediaDescriptor aMediaDesc = aDescriptor; // Get the output stream uno::Reference< io::XOutputStream > xOut = aMediaDesc.getUnpackedValueOrDefault( - comphelper::MediaDescriptor::PROP_OUTPUTSTREAM(), + utl::MediaDescriptor::PROP_OUTPUTSTREAM(), uno::Reference< io::XOutputStream >() ); // Actually get the SwRootFrm to call dumpAsXml diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index b294aace08ab..5b3d1a829f77 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -77,7 +77,7 @@ #include <redline.hxx> #include <numrule.hxx> #include <comphelper/storagehelper.hxx> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <comphelper/sequenceashashmap.hxx> #include <SwNodeNum.hxx> #include <fmtmeta.hxx> @@ -966,23 +966,23 @@ void InsertFile(SwUnoCrsr* pUnoCrsr, SfxMedium* pMed = 0; SwDoc* pDoc = pUnoCrsr->GetDoc(); SwDocShell* pDocSh = pDoc->GetDocShell(); - comphelper::MediaDescriptor aMediaDescriptor( rOptions ); + utl::MediaDescriptor aMediaDescriptor( rOptions ); OUString sFileName = rURL; OUString sFilterName, sFilterOptions, sPassword, sBaseURL; uno::Reference < io::XStream > xStream; uno::Reference < io::XInputStream > xInputStream; if( sFileName.isEmpty() ) - aMediaDescriptor[comphelper::MediaDescriptor::PROP_URL()] >>= sFileName; + aMediaDescriptor[utl::MediaDescriptor::PROP_URL()] >>= sFileName; if( sFileName.isEmpty() ) - aMediaDescriptor[comphelper::MediaDescriptor::PROP_FILENAME()] >>= sFileName; - aMediaDescriptor[comphelper::MediaDescriptor::PROP_INPUTSTREAM()] >>= xInputStream; - aMediaDescriptor[comphelper::MediaDescriptor::PROP_STREAM()] >>= xStream; - aMediaDescriptor[comphelper::MediaDescriptor::PROP_INPUTSTREAM()] >>= xInputStream; - aMediaDescriptor[comphelper::MediaDescriptor::PROP_FILTERNAME()] >>= sFilterName; - aMediaDescriptor[comphelper::MediaDescriptor::PROP_FILTEROPTIONS()] >>= sFilterOptions; - aMediaDescriptor[comphelper::MediaDescriptor::PROP_PASSWORD()] >>= sPassword; - aMediaDescriptor[comphelper::MediaDescriptor::PROP_DOCUMENTBASEURL() ] >>= sBaseURL; + aMediaDescriptor[utl::MediaDescriptor::PROP_FILENAME()] >>= sFileName; + aMediaDescriptor[utl::MediaDescriptor::PROP_INPUTSTREAM()] >>= xInputStream; + aMediaDescriptor[utl::MediaDescriptor::PROP_STREAM()] >>= xStream; + aMediaDescriptor[utl::MediaDescriptor::PROP_INPUTSTREAM()] >>= xInputStream; + aMediaDescriptor[utl::MediaDescriptor::PROP_FILTERNAME()] >>= sFilterName; + aMediaDescriptor[utl::MediaDescriptor::PROP_FILTEROPTIONS()] >>= sFilterOptions; + aMediaDescriptor[utl::MediaDescriptor::PROP_PASSWORD()] >>= sPassword; + aMediaDescriptor[utl::MediaDescriptor::PROP_DOCUMENTBASEURL() ] >>= sBaseURL; if ( !xInputStream.is() && xStream.is() ) xInputStream = xStream->getInputStream(); diff --git a/sw/source/filter/ww8/rtfexportfilter.cxx b/sw/source/filter/ww8/rtfexportfilter.cxx index 05d30d604711..d7d86f915e2e 100644 --- a/sw/source/filter/ww8/rtfexportfilter.cxx +++ b/sw/source/filter/ww8/rtfexportfilter.cxx @@ -24,10 +24,9 @@ #include <editsh.hxx> #include <unotxdoc.hxx> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <unotools/ucbstreamhelper.hxx> -using namespace ::comphelper; using namespace ::com::sun::star; RtfExportFilter::RtfExportFilter( const uno::Reference< uno::XComponentContext >& xCtx) : @@ -44,9 +43,9 @@ sal_Bool RtfExportFilter::filter( const uno::Sequence< beans::PropertyValue >& a { SAL_INFO("sw.rtf", OSL_THIS_FUNC); - MediaDescriptor aMediaDesc = aDescriptor; + utl::MediaDescriptor aMediaDesc = aDescriptor; ::uno::Reference< io::XStream > xStream = - aMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_STREAMFOROUTPUT(), uno::Reference< io::XStream >() ); + aMediaDesc.getUnpackedValueOrDefault( utl::MediaDescriptor::PROP_STREAMFOROUTPUT(), uno::Reference< io::XStream >() ); m_pStream = utl::UcbStreamHelper::CreateStream( xStream, sal_True ); m_aWriter.SetStream(m_pStream); diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index c4d72b965201..4eedc95aca35 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -127,12 +127,10 @@ using namespace nsHdFtFlags; #include <com/sun/star/ucb/SimpleFileAccess.hpp> #include <com/sun/star/script/vba/XVBACompatibility.hpp> -#include <comphelper/mediadescriptor.hxx> +#include <comphelper/sequenceashashmap.hxx> #include <oox/ole/vbaproject.hxx> #include <oox/ole/olestorage.hxx> -using ::comphelper::MediaDescriptor; - //#define VT_EMPTY 0 //#define VT_I4 3 //#define VT_LPSTR 30 diff --git a/unotools/Library_utl.mk b/unotools/Library_utl.mk index 2f14d75f3073..94da2bd4c467 100644 --- a/unotools/Library_utl.mk +++ b/unotools/Library_utl.mk @@ -99,6 +99,7 @@ $(eval $(call gb_Library_add_exception_objects,utl,\ unotools/source/misc/eventlisteneradapter \ unotools/source/misc/fontcvt \ unotools/source/misc/fontdefs \ + unotools/source/misc/mediadescriptor \ unotools/source/misc/sharedunocomponent \ unotools/source/misc/syslocale \ unotools/source/streaming/streamhelper \ diff --git a/comphelper/source/misc/mediadescriptor.cxx b/unotools/source/misc/mediadescriptor.cxx index 44665c5b956a..0eadb025c390 100644 --- a/comphelper/source/misc/mediadescriptor.cxx +++ b/unotools/source/misc/mediadescriptor.cxx @@ -18,7 +18,7 @@ */ #include <comphelper/docpasswordhelper.hxx> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <comphelper/namedvaluecollection.hxx> #include <comphelper/stillreadwriteinteraction.hxx> @@ -46,7 +46,7 @@ #include <ucbhelper/activedatasink.hxx> #include <comphelper/processfactory.hxx> -namespace comphelper{ +namespace utl { namespace { @@ -372,7 +372,7 @@ sal_Bool MediaDescriptor::isStreamReadOnly() const bReadOnly = sal_True; else { - ::ucbhelper::Content aContent(xContent, css::uno::Reference< css::ucb::XCommandEnvironment >(), getProcessComponentContext()); + ::ucbhelper::Content aContent(xContent, css::uno::Reference< css::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext()); aContent.getPropertyValue(CONTENTPROP_ISREADONLY) >>= bReadOnly; } } @@ -390,9 +390,9 @@ sal_Bool MediaDescriptor::isStreamReadOnly() const css::uno::Any MediaDescriptor::getComponentDataEntry( const OUString& rName ) const { css::uno::Any aEntry; - SequenceAsHashMap::const_iterator aPropertyIter = find( PROP_COMPONENTDATA() ); + comphelper::SequenceAsHashMap::const_iterator aPropertyIter = find( PROP_COMPONENTDATA() ); if( aPropertyIter != end() ) - return NamedValueCollection( aPropertyIter->second ).get( rName ); + return comphelper::NamedValueCollection( aPropertyIter->second ).get( rName ); return css::uno::Any(); } @@ -409,7 +409,7 @@ void MediaDescriptor::setComponentDataEntry( const OUString& rName, const css::u if( bHasNamedValues || bHasPropValues ) { // insert or overwrite the passed value - SequenceAsHashMap aCompDataMap( rCompDataAny ); + comphelper::SequenceAsHashMap aCompDataMap( rCompDataAny ); aCompDataMap[ rName ] = rValue; // write back the sequence (restore sequence with correct element type) rCompDataAny = aCompDataMap.getAsConstAny( bHasPropValues ); @@ -424,7 +424,7 @@ void MediaDescriptor::setComponentDataEntry( const OUString& rName, const css::u void MediaDescriptor::clearComponentDataEntry( const OUString& rName ) { - SequenceAsHashMap::iterator aPropertyIter = find( PROP_COMPONENTDATA() ); + comphelper::SequenceAsHashMap::iterator aPropertyIter = find( PROP_COMPONENTDATA() ); if( aPropertyIter != end() ) { css::uno::Any& rCompDataAny = aPropertyIter->second; @@ -434,7 +434,7 @@ void MediaDescriptor::clearComponentDataEntry( const OUString& rName ) if( bHasNamedValues || bHasPropValues ) { // remove the value with the passed name - SequenceAsHashMap aCompDataMap( rCompDataAny ); + comphelper::SequenceAsHashMap aCompDataMap( rCompDataAny ); aCompDataMap.erase( rName ); // write back the sequence, or remove it completely if it is empty if( aCompDataMap.empty() ) @@ -446,8 +446,8 @@ void MediaDescriptor::clearComponentDataEntry( const OUString& rName ) } ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > MediaDescriptor::requestAndVerifyDocPassword( - IDocPasswordVerifier& rVerifier, - DocPasswordRequestType eRequestType, + comphelper::IDocPasswordVerifier& rVerifier, + comphelper::DocPasswordRequestType eRequestType, const ::std::vector< OUString >* pDefaultPasswords ) { css::uno::Sequence< css::beans::NamedValue > aMediaEncData = getUnpackedValueOrDefault( @@ -460,7 +460,7 @@ void MediaDescriptor::clearComponentDataEntry( const OUString& rName ) PROP_URL(), OUString() ); bool bIsDefaultPassword = false; - css::uno::Sequence< css::beans::NamedValue > aEncryptionData = DocPasswordHelper::requestAndVerifyDocPassword( + css::uno::Sequence< css::beans::NamedValue > aEncryptionData = comphelper::DocPasswordHelper::requestAndVerifyDocPassword( rVerifier, aMediaEncData, aMediaPassword, xInteractHandler, aDocumentName, eRequestType, pDefaultPasswords, &bIsDefaultPassword ); erase( PROP_PASSWORD() ); @@ -561,7 +561,7 @@ sal_Bool MediaDescriptor::impl_openStreamWithPostData( const css::uno::Reference xSeek->seek( 0 ); // a content for the URL - ::ucbhelper::Content aContent( sURL, xCommandEnv, getProcessComponentContext() ); + ::ucbhelper::Content aContent( sURL, xCommandEnv, comphelper::getProcessComponentContext() ); // use post command css::ucb::PostCommandArgument2 aPostArgument; @@ -601,7 +601,7 @@ sal_Bool MediaDescriptor::impl_openStreamWithURL( const OUString& sURL, sal_Bool MediaDescriptor::PROP_INTERACTIONHANDLER(), css::uno::Reference< css::task::XInteractionHandler >()); - StillReadWriteInteraction* pInteraction = new StillReadWriteInteraction(xOrgInteraction); + comphelper::StillReadWriteInteraction* pInteraction = new comphelper::StillReadWriteInteraction(xOrgInteraction); css::uno::Reference< css::task::XInteractionHandler > xInteraction(static_cast< css::task::XInteractionHandler* >(pInteraction), css::uno::UNO_QUERY); css::uno::Reference< css::ucb::XProgressHandler > xProgress; @@ -614,7 +614,7 @@ sal_Bool MediaDescriptor::impl_openStreamWithURL( const OUString& sURL, sal_Bool css::uno::Reference< css::ucb::XContent > xContent; try { - aContent = ::ucbhelper::Content(sURL, xCommandEnv, getProcessComponentContext()); + aContent = ::ucbhelper::Content(sURL, xCommandEnv, comphelper::getProcessComponentContext()); xContent = aContent.get(); } catch(const css::uno::RuntimeException&) diff --git a/vbahelper/source/vbahelper/vbadocumentsbase.cxx b/vbahelper/source/vbahelper/vbadocumentsbase.cxx index 2ab6b6bf95cf..b57ef0e8737b 100644 --- a/vbahelper/source/vbahelper/vbadocumentsbase.cxx +++ b/vbahelper/source/vbahelper/vbadocumentsbase.cxx @@ -19,7 +19,7 @@ #include "vbahelper/vbadocumentsbase.hxx" -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <comphelper/processfactory.hxx> #include <cppuhelper/implbase1.hxx> #include <cppuhelper/implbase3.hxx> @@ -251,8 +251,8 @@ uno::Any VbaDocumentsBase::createDocument() throw (uno::RuntimeException) throw uno::RuntimeException( "Not implemented" , uno::Reference< uno::XInterface >() ); // prepare the media descriptor - ::comphelper::MediaDescriptor aMediaDesc; - aMediaDesc[ ::comphelper::MediaDescriptor::PROP_MACROEXECUTIONMODE() ] <<= document::MacroExecMode::USE_CONFIG; + utl::MediaDescriptor aMediaDesc; + aMediaDesc[ utl::MediaDescriptor::PROP_MACROEXECUTIONMODE() ] <<= document::MacroExecMode::USE_CONFIG; aMediaDesc.setComponentDataEntry( "ApplyFormDesignMode" , uno::Any( false ) ); // create the new document diff --git a/writerfilter/CppunitTest_writerfilter_rtftok.mk b/writerfilter/CppunitTest_writerfilter_rtftok.mk index 13691197ded2..7bec367ca163 100644 --- a/writerfilter/CppunitTest_writerfilter_rtftok.mk +++ b/writerfilter/CppunitTest_writerfilter_rtftok.mk @@ -38,6 +38,7 @@ $(eval $(call gb_CppunitTest_use_ure,writerfilter_rtftok)) $(eval $(call gb_CppunitTest_use_components,writerfilter_rtftok,\ configmgr/source/configmgr \ + framework/util/fwk \ i18npool/util/i18npool \ svtools/util/svt \ ucb/source/core/ucb1 \ diff --git a/writerfilter/inc/pch/precompiled_writerfilter.hxx b/writerfilter/inc/pch/precompiled_writerfilter.hxx index 9ae342eb5337..61ee41570e04 100644 --- a/writerfilter/inc/pch/precompiled_writerfilter.hxx +++ b/writerfilter/inc/pch/precompiled_writerfilter.hxx @@ -154,7 +154,6 @@ #include <com/sun/star/xml/sax/XParser.hpp> #include <comphelper/classids.hxx> #include <comphelper/embeddedobjectcontainer.hxx> -#include <comphelper/mediadescriptor.hxx> #include <comphelper/servicehelper.hxx> #include <comphelper/storagehelper.hxx> #include <comphelper/string.hxx> @@ -221,6 +220,7 @@ #include <tools/stream.hxx> #include <unotools/fontdefs.hxx> #include <unotools/localfilehelper.hxx> +#include <unotools/mediadescriptor.hxx> #include <unotools/streamwrap.hxx> #include <unotools/ucbstreamhelper.hxx> #include <vcl/embeddedfontshelper.hxx> diff --git a/writerfilter/source/filter/ImportFilter.cxx b/writerfilter/source/filter/ImportFilter.cxx index e9a429cc515e..b7bcfb956f2e 100644 --- a/writerfilter/source/filter/ImportFilter.cxx +++ b/writerfilter/source/filter/ImportFilter.cxx @@ -23,7 +23,7 @@ #include <com/sun/star/drawing/XDrawPageSupplier.hpp> #include <com/sun/star/io/XInputStream.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <cppuhelper/supportsservice.hxx> #include <oox/core/filterdetect.hxx> #include <dmapper/DomainMapper.hxx> @@ -41,7 +41,7 @@ #include <oox/helper/graphichelper.hxx> using namespace ::rtl; using namespace ::com::sun::star; -using ::comphelper::MediaDescriptor; +using utl::MediaDescriptor; diff --git a/writerfilter/source/filter/RtfFilter.cxx b/writerfilter/source/filter/RtfFilter.cxx index ee78bf1d6ce9..54bc27b49db5 100644 --- a/writerfilter/source/filter/RtfFilter.cxx +++ b/writerfilter/source/filter/RtfFilter.cxx @@ -22,7 +22,7 @@ #include <osl/module.hxx> #include <tools/solar.h> #include <RtfFilter.hxx> -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <cppuhelper/supportsservice.hxx> #include <dmapper/DomainMapper.hxx> #include <rtftok/RTFDocument.hxx> @@ -39,7 +39,7 @@ using namespace ::rtl; using namespace ::cppu; using namespace ::com::sun::star; -using ::comphelper::MediaDescriptor; +using utl::MediaDescriptor; RtfFilter::RtfFilter( const uno::Reference< uno::XComponentContext >& rxContext) : m_xContext( rxContext ) diff --git a/xmloff/inc/pch/precompiled_xo.hxx b/xmloff/inc/pch/precompiled_xo.hxx index c61203d8c67f..6eaff6c2ffb3 100644 --- a/xmloff/inc/pch/precompiled_xo.hxx +++ b/xmloff/inc/pch/precompiled_xo.hxx @@ -489,7 +489,6 @@ #include <comphelper/documentconstants.hxx> #include <comphelper/extract.hxx> #include <comphelper/genericpropertyset.hxx> -#include <comphelper/mediadescriptor.hxx> #include <comphelper/namecontainer.hxx> #include <comphelper/namedvaluecollection.hxx> #include <comphelper/processfactory.hxx> @@ -563,6 +562,7 @@ #include <unotools/datetime.hxx> #include <unotools/docinfohelper.hxx> #include <unotools/fontcvt.hxx> +#include <unotools/mediadescriptor.hxx> #include <unotools/saveopt.hxx> #include <unotools/streamwrap.hxx> #include <unotools/syslocale.hxx> diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx index b8b7851a1c5c..18cd1bc27390 100644 --- a/xmloff/source/chart/SchXMLChartContext.cxx +++ b/xmloff/source/chart/SchXMLChartContext.cxx @@ -25,7 +25,7 @@ #include "SchXMLTableContext.hxx" #include "SchXMLSeries2Context.hxx" #include "SchXMLTools.hxx" -#include <comphelper/mediadescriptor.hxx> +#include <unotools/mediadescriptor.hxx> #include <tools/debug.hxx> #include <xmloff/xmlnmspe.hxx> #include <xmloff/xmlement.hxx> @@ -636,9 +636,9 @@ static void lcl_ApplyDataFromRectangularRangeToDiagram( uno::Reference< frame::XModel > xModel(xNewDoc, uno::UNO_QUERY ); if( xModel.is() ) { - comphelper::MediaDescriptor aMediaDescriptor( xModel->getArgs() ); + utl::MediaDescriptor aMediaDescriptor( xModel->getArgs() ); - comphelper::MediaDescriptor::const_iterator aIt( + utl::MediaDescriptor::const_iterator aIt( aMediaDescriptor.find( OUString( "HierarchicalDocumentName" ))); if( aIt != aMediaDescriptor.end() ) { |