diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-08 11:36:27 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-08 11:31:36 +0100 |
commit | 2ab40e9ecc9092e2227a30e43a7fc319f8632a17 (patch) | |
tree | 4a81335b8b08e02273ad32ec39da6f92e2469740 /sfx2 | |
parent | 7cbc8a8d866225f513b90b69bcc29cb6f230d65b (diff) |
use more OUStringLiteral in MediaDescriptor
Change-Id: I0567d103db8db401c737fed98483912a39352929
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124835
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/fileobj.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/bastyp/fltfnc.cxx | 14 | ||||
-rw-r--r-- | sfx2/source/doc/DocumentMetadataAccess.cxx | 18 | ||||
-rw-r--r-- | sfx2/source/doc/SfxDocumentMetaData.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 14 |
5 files changed, 30 insertions, 30 deletions
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx index f420e2704a8c..11464dceb64a 100644 --- a/sfx2/source/appl/fileobj.cxx +++ b/sfx2/source/appl/fileobj.cxx @@ -212,7 +212,7 @@ static OUString impl_getFilter( const OUString& _rURL ) if ( xTypeDetection.is() ) { utl::MediaDescriptor aDescr; - aDescr[ utl::MediaDescriptor::PROP_URL() ] <<= _rURL; + aDescr[ utl::MediaDescriptor::PROP_URL ] <<= _rURL; css::uno::Sequence< css::beans::PropertyValue > aDescrList = aDescr.getAsConstPropertyValueList(); OUString sType = xTypeDetection->queryTypeByDescriptor( aDescrList, true ); diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index 00a9b3d517e6..5aa4cb57a688 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -376,23 +376,23 @@ ErrCode SfxFilterMatcher::GuessFilterControlDefaultUI( SfxMedium& rMedium, std: { utl::MediaDescriptor aDescriptor; - aDescriptor[utl::MediaDescriptor::PROP_URL() ] <<= sURL; - aDescriptor[utl::MediaDescriptor::PROP_INPUTSTREAM() ] <<= xInStream; - aDescriptor[utl::MediaDescriptor::PROP_INTERACTIONHANDLER()] <<= rMedium.GetInteractionHandler(); + aDescriptor[utl::MediaDescriptor::PROP_URL ] <<= sURL; + aDescriptor[utl::MediaDescriptor::PROP_INPUTSTREAM ] <<= xInStream; + aDescriptor[utl::MediaDescriptor::PROP_INTERACTIONHANDLER] <<= rMedium.GetInteractionHandler(); SfxStringItem const * it = static_cast<SfxStringItem const *>( rMedium.GetItemSet()->GetItem(SID_REFERER)); if (it != nullptr) { - aDescriptor[utl::MediaDescriptor::PROP_REFERRER()] + aDescriptor[utl::MediaDescriptor::PROP_REFERRER] <<= it->GetValue(); } if ( !m_rImpl.aName.isEmpty() ) - aDescriptor[utl::MediaDescriptor::PROP_DOCUMENTSERVICE()] <<= m_rImpl.aName; + aDescriptor[utl::MediaDescriptor::PROP_DOCUMENTSERVICE] <<= m_rImpl.aName; if ( pOldFilter ) { - aDescriptor[utl::MediaDescriptor::PROP_TYPENAME() ] <<= pOldFilter->GetTypeName(); - aDescriptor[utl::MediaDescriptor::PROP_FILTERNAME()] <<= pOldFilter->GetFilterName(); + aDescriptor[utl::MediaDescriptor::PROP_TYPENAME ] <<= pOldFilter->GetTypeName(); + aDescriptor[utl::MediaDescriptor::PROP_FILTERNAME] <<= pOldFilter->GetFilterName(); } uno::Sequence< beans::PropertyValue > lDescriptor = aDescriptor.getAsConstPropertyValueList(); diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx index 33c60ec0b268..160dfce000f5 100644 --- a/sfx2/source/doc/DocumentMetadataAccess.cxx +++ b/sfx2/source/doc/DocumentMetadataAccess.cxx @@ -612,7 +612,7 @@ readStream(struct DocumentMetadataAccess_Impl & i_rImpl, try { OUString mimeType; xDirProps->getPropertyValue( - utl::MediaDescriptor::PROP_MEDIATYPE() ) + utl::MediaDescriptor::PROP_MEDIATYPE ) >>= mimeType; if (mimeType.startsWith(s_odfmime)) { SAL_WARN("sfx", "readStream: refusing to recurse into embedded document"); @@ -707,7 +707,7 @@ writeStream(struct DocumentMetadataAccess_Impl & i_rImpl, try { OUString mimeType; xDirProps->getPropertyValue( - utl::MediaDescriptor::PROP_MEDIATYPE() ) + utl::MediaDescriptor::PROP_MEDIATYPE ) >>= mimeType; if (mimeType.startsWith(s_odfmime)) { SAL_WARN("sfx", "writeStream: refusing to recurse into embedded document"); @@ -1262,11 +1262,11 @@ DocumentMetadataAccess::loadMetadataFromMedium( uno::Reference<io::XInputStream> xIn; utl::MediaDescriptor md(i_rMedium); OUString URL; - md[ utl::MediaDescriptor::PROP_URL() ] >>= URL; + md[ utl::MediaDescriptor::PROP_URL ] >>= URL; OUString BaseURL; - md[ utl::MediaDescriptor::PROP_DOCUMENTBASEURL() ] >>= BaseURL; + md[ utl::MediaDescriptor::PROP_DOCUMENTBASEURL ] >>= BaseURL; if (md.addInputStream()) { - md[ utl::MediaDescriptor::PROP_INPUTSTREAM() ] >>= xIn; + md[ utl::MediaDescriptor::PROP_INPUTSTREAM ] >>= xIn; } if (!xIn.is() && URL.isEmpty()) { throw lang::IllegalArgumentException( @@ -1309,7 +1309,7 @@ DocumentMetadataAccess::loadMetadataFromMedium( } } uno::Reference<task::XInteractionHandler> xIH; - md[ utl::MediaDescriptor::PROP_INTERACTIONHANDLER() ] >>= xIH; + md[ utl::MediaDescriptor::PROP_INTERACTIONHANDLER ] >>= xIH; loadMetadataFromStorage(xStorage, xBaseURI, xIH); } @@ -1319,7 +1319,7 @@ DocumentMetadataAccess::storeMetadataToMedium( { utl::MediaDescriptor md(i_rMedium); OUString URL; - md[ utl::MediaDescriptor::PROP_URL() ] >>= URL; + md[ utl::MediaDescriptor::PROP_URL ] >>= URL; if (URL.isEmpty()) { throw lang::IllegalArgumentException( "DocumentMetadataAccess::storeMetadataToMedium: " @@ -1344,14 +1344,14 @@ DocumentMetadataAccess::storeMetadataToMedium( } // set MIME type of the storage utl::MediaDescriptor::const_iterator iter - = md.find(utl::MediaDescriptor::PROP_MEDIATYPE()); + = 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( - utl::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 2c57215c39fd..1abdb68d778d 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -1864,11 +1864,11 @@ SfxDocumentMetaData::loadFromMedium(const OUString & URL, utl::MediaDescriptor md(Medium); // if we have a URL parameter, it replaces the one in the media descriptor if (!URL.isEmpty()) { - md[ utl::MediaDescriptor::PROP_URL() ] <<= URL; - md[ utl::MediaDescriptor::PROP_READONLY() ] <<= true; + md[ utl::MediaDescriptor::PROP_URL ] <<= URL; + md[ utl::MediaDescriptor::PROP_READONLY ] <<= true; } if (md.addInputStream()) { - md[ utl::MediaDescriptor::PROP_INPUTSTREAM() ] >>= xIn; + md[ utl::MediaDescriptor::PROP_INPUTSTREAM ] >>= xIn; } css::uno::Reference<css::embed::XStorage> xStorage; try { @@ -1904,7 +1904,7 @@ SfxDocumentMetaData::storeToMedium(const OUString & URL, { utl::MediaDescriptor md(Medium); if (!URL.isEmpty()) { - md[ utl::MediaDescriptor::PROP_URL() ] <<= URL; + md[ utl::MediaDescriptor::PROP_URL ] <<= URL; } SfxMedium aMedium(md.getAsConstPropertyValueList()); css::uno::Reference<css::embed::XStorage> xStorage @@ -1918,12 +1918,12 @@ SfxDocumentMetaData::storeToMedium(const OUString & URL, } // set MIME type of the storage utl::MediaDescriptor::const_iterator iter - = md.find(utl::MediaDescriptor::PROP_MEDIATYPE()); + = 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( - utl::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 374ca83a81eb..4c6770255e46 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -2727,8 +2727,8 @@ void SfxMedium::GetLockingStream_Impl() aMedium.addInputStreamOwnLock(); uno::Reference< io::XInputStream > xInputStream; - aMedium[utl::MediaDescriptor::PROP_STREAM()] >>= pImpl->m_xLockingStream; - aMedium[utl::MediaDescriptor::PROP_INPUTSTREAM()] >>= xInputStream; + aMedium[utl::MediaDescriptor::PROP_STREAM] >>= pImpl->m_xLockingStream; + aMedium[utl::MediaDescriptor::PROP_INPUTSTREAM] >>= xInputStream; if ( !pImpl->pTempFile && pImpl->m_aName.isEmpty() ) { @@ -2819,8 +2819,8 @@ void SfxMedium::GetMedium_Impl() { if ( bFromTempFile ) { - aMedium[utl::MediaDescriptor::PROP_URL()] <<= aFileName; - aMedium.erase( utl::MediaDescriptor::PROP_READONLY() ); + aMedium[utl::MediaDescriptor::PROP_URL] <<= aFileName; + aMedium.erase( utl::MediaDescriptor::PROP_READONLY ); aMedium.addInputStream(); } else if ( GetURLObject().GetProtocol() == INetProtocol::File ) @@ -2834,7 +2834,7 @@ void SfxMedium::GetMedium_Impl() // the interaction handler to be used by the authentication dialog if ( GetURLObject().isAnyKnownWebDAVScheme() ) { - aMedium[utl::MediaDescriptor::PROP_AUTHENTICATIONHANDLER()] <<= GetInteractionHandler( true ); + aMedium[utl::MediaDescriptor::PROP_AUTHENTICATIONHANDLER] <<= GetInteractionHandler( true ); } aMedium.addInputStream(); } @@ -2842,8 +2842,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[utl::MediaDescriptor::PROP_STREAM()] >>= pImpl->xStream; - aMedium[utl::MediaDescriptor::PROP_INPUTSTREAM()] >>= pImpl->xInputStream; + aMedium[utl::MediaDescriptor::PROP_STREAM] >>= pImpl->xStream; + aMedium[utl::MediaDescriptor::PROP_INPUTSTREAM] >>= pImpl->xInputStream; } GetContent(); |