From 2ab40e9ecc9092e2227a30e43a7fc319f8632a17 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 8 Nov 2021 11:36:27 +0200 Subject: use more OUStringLiteral in MediaDescriptor Change-Id: I0567d103db8db401c737fed98483912a39352929 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124835 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sc/source/ui/unoobj/exceldetect.cxx | 12 ++++++------ sc/source/ui/unoobj/scdetect.cxx | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'sc/source/ui') diff --git a/sc/source/ui/unoobj/exceldetect.cxx b/sc/source/ui/unoobj/exceldetect.cxx index a56497f5cde3..a50f9994f4d2 100644 --- a/sc/source/ui/unoobj/exceldetect.cxx +++ b/sc/source/ui/unoobj/exceldetect.cxx @@ -131,13 +131,13 @@ OUString ScExcelBiffDetect::detect( uno::Sequence& lDescri { MediaDescriptor aMediaDesc(lDescriptor); OUString aType; - aMediaDesc[MediaDescriptor::PROP_TYPENAME()] >>= aType; + aMediaDesc[MediaDescriptor::PROP_TYPENAME] >>= aType; if (aType.isEmpty()) // Type is not given. We can't proceed. return OUString(); aMediaDesc.addInputStream(); - uno::Reference xInStream(aMediaDesc[MediaDescriptor::PROP_INPUTSTREAM()], uno::UNO_QUERY); + uno::Reference xInStream(aMediaDesc[MediaDescriptor::PROP_INPUTSTREAM], uno::UNO_QUERY); if (!xInStream.is()) // No input stream. return OUString(); @@ -149,7 +149,7 @@ OUString ScExcelBiffDetect::detect( uno::Sequence& lDescri // BIFF8 is expected to contain a stream named "Workbook". return OUString(); - aMediaDesc[MediaDescriptor::PROP_FILTERNAME()] <<= isTemplate(aType) ? OUString("MS Excel 97 Vorlage/Template") : OUString("MS Excel 97"); + aMediaDesc[MediaDescriptor::PROP_FILTERNAME] <<= isTemplate(aType) ? OUString("MS Excel 97 Vorlage/Template") : OUString("MS Excel 97"); } else if (aType == "calc_MS_Excel_95" || aType == "calc_MS_Excel_95_VorlageTemplate") @@ -158,7 +158,7 @@ OUString ScExcelBiffDetect::detect( uno::Sequence& lDescri if (!hasStream(xInStream, "Book")) return OUString(); - aMediaDesc[MediaDescriptor::PROP_FILTERNAME()] <<= isTemplate(aType) ? OUString("MS Excel 95 Vorlage/Template") : OUString("MS Excel 95"); + aMediaDesc[MediaDescriptor::PROP_FILTERNAME] <<= isTemplate(aType) ? OUString("MS Excel 95 Vorlage/Template") : OUString("MS Excel 95"); } else if (aType == "calc_MS_Excel_5095" || aType == "calc_MS_Excel_5095_VorlageTemplate") @@ -167,7 +167,7 @@ OUString ScExcelBiffDetect::detect( uno::Sequence& lDescri if (!hasStream(xInStream, "Book")) return OUString(); - aMediaDesc[MediaDescriptor::PROP_FILTERNAME()] <<= isTemplate(aType) ? OUString("MS Excel 5.0/95 Vorlage/Template") : OUString("MS Excel 5.0/95"); + aMediaDesc[MediaDescriptor::PROP_FILTERNAME] <<= isTemplate(aType) ? OUString("MS Excel 5.0/95 Vorlage/Template") : OUString("MS Excel 5.0/95"); } else if (aType == "calc_MS_Excel_40" || aType == "calc_MS_Excel_40_VorlageTemplate") @@ -176,7 +176,7 @@ OUString ScExcelBiffDetect::detect( uno::Sequence& lDescri if (!isExcel40(xInStream)) return OUString(); - aMediaDesc[MediaDescriptor::PROP_FILTERNAME()] <<= isTemplate(aType) ? OUString("MS Excel 4.0 Vorlage/Template") : OUString("MS Excel 4.0"); + aMediaDesc[MediaDescriptor::PROP_FILTERNAME] <<= isTemplate(aType) ? OUString("MS Excel 4.0 Vorlage/Template") : OUString("MS Excel 4.0"); } else diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx index efe6d3c8993b..08d265a38397 100644 --- a/sc/source/ui/unoobj/scdetect.cxx +++ b/sc/source/ui/unoobj/scdetect.cxx @@ -264,8 +264,8 @@ static bool lcl_MayBeDBase( SvStream& rStream ) OUString SAL_CALL ScFilterDetect::detect( uno::Sequence& lDescriptor ) { MediaDescriptor aMediaDesc( lDescriptor ); - OUString aTypeName = aMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_TYPENAME(), OUString() ); - uno::Reference< io::XInputStream > xStream ( aMediaDesc[MediaDescriptor::PROP_INPUTSTREAM()], uno::UNO_QUERY ); + OUString aTypeName = aMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_TYPENAME, OUString() ); + uno::Reference< io::XInputStream > xStream ( aMediaDesc[MediaDescriptor::PROP_INPUTSTREAM], uno::UNO_QUERY ); if ( !xStream.is() ) return OUString(); @@ -323,7 +323,7 @@ OUString SAL_CALL ScFilterDetect::detect( uno::Sequence& l if (!pFilter) return OUString(); - aMediaDesc[MediaDescriptor::PROP_FILTERNAME()] <<= pFilter->GetName(); + aMediaDesc[MediaDescriptor::PROP_FILTERNAME] <<= pFilter->GetName(); aMediaDesc >> lDescriptor; return aTypeName; } -- cgit