diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2014-04-09 01:37:37 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2014-04-09 11:37:21 +0300 |
commit | d7a713fe6b65961b9683eae576f1766633f1f2e2 (patch) | |
tree | 68d207148b971cb1c1453174117c4925eec80dc5 /sc | |
parent | 2f4d7b63df15d8cd4713e800332a3b05bb068cc4 (diff) |
Write MediaDescriptor back
Otherwise setting the filter name has no effect.
Change-Id: I333c8d2be66537a2c83b2aa3e40cdef61a5ac970
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/unoobj/exceldetect.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sc/source/ui/unoobj/exceldetect.cxx b/sc/source/ui/unoobj/exceldetect.cxx index 985482dab145..525d2ac749c6 100644 --- a/sc/source/ui/unoobj/exceldetect.cxx +++ b/sc/source/ui/unoobj/exceldetect.cxx @@ -145,41 +145,41 @@ OUString ScExcelBiffDetect::detect( uno::Sequence<beans::PropertyValue>& lDescri return OUString(); aMediaDesc[MediaDescriptor::PROP_FILTERNAME()] <<= isTemplate(aType) ? OUString("MS Excel 97 Vorlage/Template") : OUString("MS Excel 97"); - return aType; } - if (aType == "calc_MS_Excel_95" || aType == "calc_MS_Excel_95_VorlageTemplate") + else if (aType == "calc_MS_Excel_95" || aType == "calc_MS_Excel_95_VorlageTemplate") { // See if this stream is a Excel 95 (BIFF5) stream. if (!hasStream(xInStream, "Book")) return OUString(); aMediaDesc[MediaDescriptor::PROP_FILTERNAME()] <<= isTemplate(aType) ? OUString("MS Excel 95 Vorlage/Template") : OUString("MS Excel 95"); - return aType; } - if (aType == "calc_MS_Excel_5095" || aType == "calc_MS_Excel_5095_VorlageTemplate") + else if (aType == "calc_MS_Excel_5095" || aType == "calc_MS_Excel_5095_VorlageTemplate") { // See if this stream is a Excel 5.0/95 stream. 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"); - return aType; } - if (aType == "calc_MS_Excel_40" || aType == "calc_MS_Excel_40_VorlageTemplate") + else if (aType == "calc_MS_Excel_40" || aType == "calc_MS_Excel_40_VorlageTemplate") { // See if this stream is a Excel 4.0 stream. if (!isExcel40(xInStream)) return OUString(); aMediaDesc[MediaDescriptor::PROP_FILTERNAME()] <<= isTemplate(aType) ? OUString("MS Excel 4.0 Vorlage/Template") : OUString("MS Excel 4.0"); - return aType; } - // failed! - return OUString(); + else + // Nothing to detect. + return OUString(); + + aMediaDesc >> lDescriptor; + return aType; } uno::Sequence<OUString> ScExcelBiffDetect::impl_getStaticSupportedServiceNames() |