diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-12-18 12:06:16 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-12-18 12:34:40 +0100 |
commit | 180f0791daa3d3f959f4f70b9f83012bcbf47a64 (patch) | |
tree | ae1509f2bfaa697ec613032c4f26fc4b0e841c60 | |
parent | 783ba49aa0cd068c7e3dacdd3c13e9c37cf52e22 (diff) |
comphelper: Use appropriate OUString functions on string constants
Change-Id: Id1d5c3cf2f76dbb33606cec1c0f17d4a1f282247
-rw-r--r-- | dbaccess/source/filter/xml/xmlfilter.cxx | 2 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfilterjar.cxx | 4 | ||||
-rw-r--r-- | include/comphelper/documentconstants.hxx | 14 | ||||
-rw-r--r-- | include/comphelper/storagehelper.hxx | 12 | ||||
-rw-r--r-- | package/source/xstor/xfactory.cxx | 6 | ||||
-rw-r--r-- | package/source/zippackage/ZipPackage.cxx | 10 | ||||
-rw-r--r-- | package/source/zippackage/ZipPackageStream.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/core/api/ReportDefinition.cxx | 12 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportController.cxx | 8 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlwrap.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/dlg/TemplateScanner.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 4 | ||||
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/databases.cxx | 4 |
14 files changed, 39 insertions, 47 deletions
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx index 01b43d4793c0..76f8e843aea3 100644 --- a/dbaccess/source/filter/xml/xmlfilter.cxx +++ b/dbaccess/source/filter/xml/xmlfilter.cxx @@ -165,7 +165,7 @@ namespace dbaxml // so establishing the data connection (to a Calc sheet) // will be "faster". uno::Reference< frame::XModel > xModel(xFrameLoad->loadComponentFromURL( - aModuleOptions.GetFactoryEmptyDocumentURL( SvtModuleOptions::ClassifyFactoryByServiceName( aHelper.GetDocServiceNameFromMediaType(MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET) )), + aModuleOptions.GetFactoryEmptyDocumentURL( SvtModuleOptions::ClassifyFactoryByServiceName( aHelper.GetDocServiceNameFromMediaType(MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_ASCII) )), OUString(), // empty frame name 0, aArgs diff --git a/filter/source/xsltdialog/xmlfilterjar.cxx b/filter/source/xsltdialog/xmlfilterjar.cxx index a5956ceefc41..b56392e8b64d 100644 --- a/filter/source/xsltdialog/xmlfilterjar.cxx +++ b/filter/source/xsltdialog/xmlfilterjar.cxx @@ -151,7 +151,7 @@ bool XMLFilterJarHelper::savePackage( const OUString& rPackageURL, const XMLFilt // let ZipPackage be used ( no manifest.xml is required ) beans::NamedValue aArg; aArg.Name = "StorageFormat"; - aArg.Value <<= ZIP_STORAGE_FORMAT_STRING; + aArg.Value <<= OUString(ZIP_STORAGE_FORMAT_STRING); aArguments[ 1 ] <<= aArg; Reference< XHierarchicalNameAccess > xIfc( @@ -250,7 +250,7 @@ void XMLFilterJarHelper::openPackage( const OUString& rPackageURL, XMLFilterVect // let ZipPackage be used ( no manifest.xml is required ) beans::NamedValue aArg; aArg.Name = "StorageFormat"; - aArg.Value <<= ZIP_STORAGE_FORMAT_STRING; + aArg.Value <<= OUString(ZIP_STORAGE_FORMAT_STRING); aArguments[ 1 ] <<= aArg; Reference< XHierarchicalNameAccess > xIfc( diff --git a/include/comphelper/documentconstants.hxx b/include/comphelper/documentconstants.hxx index 940740f71e5d..7f7b48dbe721 100644 --- a/include/comphelper/documentconstants.hxx +++ b/include/comphelper/documentconstants.hxx @@ -61,16 +61,13 @@ #define MIMETYPE_OASIS_OPENDOCUMENT_REPORT_ASCII "application/vnd.sun.xml.report" #define MIMETYPE_OASIS_OPENDOCUMENT_REPORT_CHART_ASCII "application/vnd.sun.xml.report.chart" -#define MIMETYPE_OASIS_OPENDOCUMENT_TEXT OUString( MIMETYPE_OASIS_OPENDOCUMENT_TEXT_ASCII ) #define MIMETYPE_OASIS_OPENDOCUMENT_TEXT_WEB OUString( MIMETYPE_OASIS_OPENDOCUMENT_TEXT_WEB_ASCII ) #define MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL OUString( MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_ASCII ) #define MIMETYPE_OASIS_OPENDOCUMENT_DRAWING OUString( MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_ASCII ) #define MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION OUString( MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_ASCII ) -#define MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET OUString( MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_ASCII ) #define MIMETYPE_OASIS_OPENDOCUMENT_CHART OUString( MIMETYPE_OASIS_OPENDOCUMENT_CHART_ASCII ) #define MIMETYPE_OASIS_OPENDOCUMENT_FORMULA OUString( MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_ASCII ) #define MIMETYPE_OASIS_OPENDOCUMENT_DATABASE OUString( MIMETYPE_OASIS_OPENDOCUMENT_DATABASE_ASCII ) -#define MIMETYPE_OASIS_OPENDOCUMENT_REPORT OUString( MIMETYPE_OASIS_OPENDOCUMENT_REPORT_ASCII ) #define MIMETYPE_OASIS_OPENDOCUMENT_REPORT_CHART OUString( MIMETYPE_OASIS_OPENDOCUMENT_REPORT_CHART_ASCII ) // template formats of SO8 @@ -83,21 +80,16 @@ #define MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_TEMPLATE_ASCII "application/vnd.oasis.opendocument.formula-template" #define MIMETYPE_OASIS_OPENDOCUMENT_TEXT_TEMPLATE OUString( MIMETYPE_OASIS_OPENDOCUMENT_TEXT_TEMPLATE_ASCII ) -#define MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_TEMPLATE OUString( MIMETYPE_OASIS_OPENDOCUMENT_TEXT_GLOBAL_TEMPLATE_ASCII ) #define MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_TEMPLATE OUString( MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_TEMPLATE_ASCII ) -#define MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_TEMPLATE OUString( MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_TEMPLATE_ASCII ) #define MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_TEMPLATE OUString( MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_TEMPLATE_ASCII ) #define MIMETYPE_OASIS_OPENDOCUMENT_CHART_TEMPLATE OUString( MIMETYPE_OASIS_OPENDOCUMENT_CHART_TEMPLATE_ASCII ) #define MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_TEMPLATE OUString( MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_TEMPLATE_ASCII ) // ODF versions -#define ODFVER_010_TEXT_ASCII "1.0" -#define ODFVER_011_TEXT_ASCII "1.1" -#define ODFVER_012_TEXT_ASCII "1.2" +#define ODFVER_010_TEXT "1.0" +#define ODFVER_011_TEXT "1.1" +#define ODFVER_012_TEXT "1.2" -#define ODFVER_010_TEXT OUString( ODFVER_010_TEXT_ASCII ) -#define ODFVER_011_TEXT OUString( ODFVER_011_TEXT_ASCII ) -#define ODFVER_012_TEXT OUString( ODFVER_012_TEXT_ASCII ) #endif // filter flags diff --git a/include/comphelper/storagehelper.hxx b/include/comphelper/storagehelper.hxx index 8c10a4fd7ce4..38c664fd49b3 100644 --- a/include/comphelper/storagehelper.hxx +++ b/include/comphelper/storagehelper.hxx @@ -27,13 +27,13 @@ #include <comphelper/comphelperdllapi.h> -#define PACKAGE_STORAGE_FORMAT_STRING OUString( "PackageFormat" ) -#define ZIP_STORAGE_FORMAT_STRING OUString( "ZipFormat" ) -#define OFOPXML_STORAGE_FORMAT_STRING OUString( "OFOPXMLFormat" ) +#define PACKAGE_STORAGE_FORMAT_STRING "PackageFormat" +#define ZIP_STORAGE_FORMAT_STRING "ZipFormat" +#define OFOPXML_STORAGE_FORMAT_STRING "OFOPXMLFormat" -#define PACKAGE_ENCRYPTIONDATA_SHA256UTF8 OUString( "PackageSHA256UTF8EncryptionKey" ) -#define PACKAGE_ENCRYPTIONDATA_SHA1UTF8 OUString( "PackageSHA1UTF8EncryptionKey" ) -#define PACKAGE_ENCRYPTIONDATA_SHA1MS1252 OUString( "PackageSHA1MS1252EncryptionKey" ) +#define PACKAGE_ENCRYPTIONDATA_SHA256UTF8 "PackageSHA256UTF8EncryptionKey" +#define PACKAGE_ENCRYPTIONDATA_SHA1UTF8 "PackageSHA1UTF8EncryptionKey" +#define PACKAGE_ENCRYPTIONDATA_SHA1MS1252 "PackageSHA1MS1252EncryptionKey" namespace com { namespace sun { namespace star { namespace beans { struct NamedValue; } diff --git a/package/source/xstor/xfactory.cxx b/package/source/xstor/xfactory.cxx index 54905ab305dc..11391e4897e9 100644 --- a/package/source/xstor/xfactory.cxx +++ b/package/source/xstor/xfactory.cxx @@ -203,11 +203,11 @@ uno::Reference< uno::XInterface > SAL_CALL OStorageFactory::createInstanceWithAr sal_Int32 nFormatID = 0; if ( aDescr[nInd].Value >>= aFormatName ) { - if ( aFormatName.equals( PACKAGE_STORAGE_FORMAT_STRING ) ) + if ( aFormatName == PACKAGE_STORAGE_FORMAT_STRING ) nStorageType = embed::StorageFormats::PACKAGE; - else if ( aFormatName.equals( ZIP_STORAGE_FORMAT_STRING ) ) + else if ( aFormatName == ZIP_STORAGE_FORMAT_STRING ) nStorageType = embed::StorageFormats::ZIP; - else if ( aFormatName.equals( OFOPXML_STORAGE_FORMAT_STRING ) ) + else if ( aFormatName == OFOPXML_STORAGE_FORMAT_STRING ) nStorageType = embed::StorageFormats::OFOPXML; else throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 1 ); diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index 5f9c179820bc..c30ca99a66ad 100644 --- a/package/source/zippackage/ZipPackage.cxx +++ b/package/source/zippackage/ZipPackage.cxx @@ -679,11 +679,11 @@ void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments ) sal_Int32 nFormatID = 0; if ( aNamedValue.Value >>= aFormatName ) { - if ( aFormatName.equals( PACKAGE_STORAGE_FORMAT_STRING ) ) + if ( aFormatName == PACKAGE_STORAGE_FORMAT_STRING ) m_nFormat = embed::StorageFormats::PACKAGE; - else if ( aFormatName.equals( ZIP_STORAGE_FORMAT_STRING ) ) + else if ( aFormatName == ZIP_STORAGE_FORMAT_STRING ) m_nFormat = embed::StorageFormats::ZIP; - else if ( aFormatName.equals( OFOPXML_STORAGE_FORMAT_STRING ) ) + else if ( aFormatName == OFOPXML_STORAGE_FORMAT_STRING ) m_nFormat = embed::StorageFormats::OFOPXML; else throw lang::IllegalArgumentException(THROW_WHERE, uno::Reference< uno::XInterface >(), 1 ); @@ -1709,9 +1709,9 @@ void SAL_CALL ZipPackage::setPropertyValue( const OUString& aPropertyName, const bool bHasSHA1 = false; for ( sal_Int32 nInd = 0; nInd < aKeys.getLength(); nInd++ ) { - if ( aKeys[nInd].Name.equals( PACKAGE_ENCRYPTIONDATA_SHA256UTF8 ) ) + if ( aKeys[nInd].Name == PACKAGE_ENCRYPTIONDATA_SHA256UTF8 ) bHasSHA256 = true; - if ( aKeys[nInd].Name.equals( PACKAGE_ENCRYPTIONDATA_SHA1UTF8 ) ) + if ( aKeys[nInd].Name == PACKAGE_ENCRYPTIONDATA_SHA1UTF8 ) bHasSHA1 = true; } diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx index e22b234ee24a..9b5eb6926e7a 100644 --- a/package/source/zippackage/ZipPackageStream.cxx +++ b/package/source/zippackage/ZipPackageStream.cxx @@ -232,7 +232,7 @@ uno::Sequence< sal_Int8 > ZipPackageStream::GetEncryptionKey( bool bUseWinEncodi aNameToFind = PACKAGE_ENCRYPTIONDATA_SHA256UTF8; else if ( nKeyGenID == xml::crypto::DigestID::SHA1 ) { - aNameToFind = bUseWinEncoding ? PACKAGE_ENCRYPTIONDATA_SHA1MS1252 : PACKAGE_ENCRYPTIONDATA_SHA1UTF8; + aNameToFind = bUseWinEncoding ? OUString(PACKAGE_ENCRYPTIONDATA_SHA1MS1252) : OUString(PACKAGE_ENCRYPTIONDATA_SHA1UTF8); } else throw uno::RuntimeException(THROW_WHERE "No expected key is provided!" ); diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index 3931191c4c7b..cfd39fbf453b 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -596,7 +596,7 @@ struct OReportDefinitionImpl ,m_aCloseListener(_aMutex) ,m_aModifyListeners(_aMutex) ,m_aDocEventListeners(_aMutex) - ,m_sMimeType(MIMETYPE_OASIS_OPENDOCUMENT_TEXT) + ,m_sMimeType(MIMETYPE_OASIS_OPENDOCUMENT_TEXT_ASCII) ,m_sIdentifier(SERVICE_REPORTDEFINITION) // default visual area is 8 x 7 cm ,m_aVisualAreaSize( 8000, 7000 ) @@ -753,7 +753,7 @@ void OReportDefinition::init() OUString sMediaType; xStorProps->getPropertyValue("MediaType") >>= sMediaType; if ( sMediaType.isEmpty() ) - xStorProps->setPropertyValue("MediaType",uno::makeAny(MIMETYPE_OASIS_OPENDOCUMENT_REPORT)); + xStorProps->setPropertyValue("MediaType",uno::makeAny<OUString>(MIMETYPE_OASIS_OPENDOCUMENT_REPORT_ASCII)); } m_pImpl->m_pObjectContainer.reset( new comphelper::EmbeddedObjectContainer(m_pImpl->m_xStorage , static_cast<cppu::OWeakObject*>(this) ) ); } @@ -1458,8 +1458,8 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS static const char sPropName[] = "MediaType"; OUString sOldMediaType; xProp->getPropertyValue(sPropName) >>= sOldMediaType; - if ( !xProp->getPropertyValue(sPropName).hasValue() || sOldMediaType.isEmpty() || MIMETYPE_OASIS_OPENDOCUMENT_REPORT != sOldMediaType ) - xProp->setPropertyValue( sPropName, uno::makeAny(MIMETYPE_OASIS_OPENDOCUMENT_REPORT) ); + if ( !xProp->getPropertyValue(sPropName).hasValue() || sOldMediaType.isEmpty() || MIMETYPE_OASIS_OPENDOCUMENT_REPORT_ASCII != sOldMediaType ) + xProp->setPropertyValue( sPropName, uno::makeAny<OUString>(MIMETYPE_OASIS_OPENDOCUMENT_REPORT_ASCII) ); } /** property map for export info set */ @@ -2117,8 +2117,8 @@ void SAL_CALL OReportDefinition::setMimeType( const OUString& _mimetype ) throw uno::Sequence< OUString > SAL_CALL OReportDefinition::getAvailableMimeTypes( ) throw (lang::DisposedException, uno::Exception, uno::RuntimeException, std::exception) { uno::Sequence< OUString > s_aList(2); - s_aList[0] = MIMETYPE_OASIS_OPENDOCUMENT_TEXT; - s_aList[1] = MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET; + s_aList[0] = MIMETYPE_OASIS_OPENDOCUMENT_TEXT_ASCII; + s_aList[1] = MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_ASCII; return s_aList; } diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index 82962b3d427f..86274babe42f 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -415,11 +415,11 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const { case SID_RPT_TEXTDOCUMENT: aReturn.bEnabled = isEditable(); - aReturn.bChecked = (m_xReportDefinition.is() && m_xReportDefinition->getMimeType() == MIMETYPE_OASIS_OPENDOCUMENT_TEXT); + aReturn.bChecked = (m_xReportDefinition.is() && m_xReportDefinition->getMimeType() == MIMETYPE_OASIS_OPENDOCUMENT_TEXT_ASCII); break; case SID_RPT_SPREADSHEET: aReturn.bEnabled = isEditable(); - aReturn.bChecked = (m_xReportDefinition.is() && m_xReportDefinition->getMimeType() == MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET); + aReturn.bChecked = (m_xReportDefinition.is() && m_xReportDefinition->getMimeType() == MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_ASCII); break; case SID_REPORTHEADER_WITHOUT_UNDO: case SID_REPORTFOOTER_WITHOUT_UNDO: @@ -998,11 +998,11 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > { case SID_RPT_TEXTDOCUMENT: if ( m_xReportDefinition.is() ) - m_xReportDefinition->setMimeType( MIMETYPE_OASIS_OPENDOCUMENT_TEXT ); + m_xReportDefinition->setMimeType( MIMETYPE_OASIS_OPENDOCUMENT_TEXT_ASCII ); break; case SID_RPT_SPREADSHEET: if (m_xReportDefinition.is() ) - m_xReportDefinition->setMimeType( MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET ); + m_xReportDefinition->setMimeType( MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_ASCII ); break; case SID_REPORTHEADER_WITHOUT_UNDO: case SID_REPORTFOOTER_WITHOUT_UNDO: diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx index fb597e38ad6f..f40b731620fa 100644 --- a/sc/source/filter/xml/xmlwrap.cxx +++ b/sc/source/filter/xml/xmlwrap.cxx @@ -842,8 +842,8 @@ bool ScXMLImportWrapper::Export(bool bStylesOnly) OUString aVersion; if (( xPropSet->getPropertyValue( OUString("Version")) >>= aVersion ) - && !aVersion.equals(ODFVER_010_TEXT) - && !aVersion.equals(ODFVER_011_TEXT) ) + && aVersion != ODFVER_010_TEXT + && aVersion != ODFVER_011_TEXT ) { const uno::Reference< rdf::XDocumentMetadataAccess > xDMA( xModel, uno::UNO_QUERY_THROW ); diff --git a/sd/source/ui/dlg/TemplateScanner.cxx b/sd/source/ui/dlg/TemplateScanner.cxx index e376c5db6758..c84c16a701b5 100644 --- a/sd/source/ui/dlg/TemplateScanner.cxx +++ b/sd/source/ui/dlg/TemplateScanner.cxx @@ -253,7 +253,7 @@ TemplateScanner::State TemplateScanner::ScanEntry (void) // Check whether the entry is an impress template. If so // add a new entry to the resulting list (which is created // first if necessary). - if ( (sContentType == MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_TEMPLATE) + if ( (sContentType == MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_TEMPLATE_ASCII) || (sContentType == IMPRESS_XML_TEMPLATE_OASIS) || (sContentType == IMPRESS_BIN_TEMPLATE) || (sContentType == IMPRESS_XML_TEMPLATE) diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 30e91648d882..7bc7712f822a 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -1421,7 +1421,7 @@ void SfxObjectShell::ImplSign( bool bScriptingContent ) bool bNoSig = false; if ( IsModified() || !GetMedium() || GetMedium()->GetName().isEmpty() - || (!aODFVersion.equals( ODFVER_012_TEXT ) && !bHasSign) ) + || (aODFVersion != ODFVER_012_TEXT && !bHasSign) ) { // the document might need saving ( new, modified or in ODF1.1 format without signature ) diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 6decd9777461..9a8c9e79452b 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -385,7 +385,7 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto try { // older versions can not have this property set, it exists only starting from ODF1.2 - xProps->setPropertyValue("Version", uno::makeAny( ODFVER_012_TEXT ) ); + xProps->setPropertyValue("Version", uno::makeAny<OUString>( ODFVER_012_TEXT ) ); } catch( uno::Exception& ) { @@ -1185,7 +1185,7 @@ bool SfxObjectShell::SaveTo_Impl bTryToPreserveScriptSignature = pMedium->GetFilter() && pFilter && pMedium->GetFilter()->GetFilterName() == pFilter->GetFilterName(); bNoPreserveForOasis = ( - (aODFVersion.equals( ODFVER_012_TEXT ) && nVersion == SvtSaveOptions::ODFVER_011) || + (aODFVersion == ODFVER_012_TEXT && nVersion == SvtSaveOptions::ODFVER_011) || (aODFVersion.isEmpty() && nVersion >= SvtSaveOptions::ODFVER_012) ); } diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx index 1a918f3c036f..56c122aa2a3a 100644 --- a/xmlhelp/source/cxxhelp/provider/databases.cxx +++ b/xmlhelp/source/cxxhelp/provider/databases.cxx @@ -957,7 +957,7 @@ Reference< XHierarchicalNameAccess > Databases::jarFile( const OUString& jar, // let ZipPackage be used ( no manifest.xml is required ) beans::NamedValue aArg; aArg.Name = "StorageFormat"; - aArg.Value <<= ZIP_STORAGE_FORMAT_STRING; + aArg.Value <<= OUString(ZIP_STORAGE_FORMAT_STRING); aArguments[ 1 ] <<= aArg; Reference< XInterface > xIfc @@ -1756,7 +1756,7 @@ Reference< XHierarchicalNameAccess > JarFileIterator::implGetJarFromPackage // let ZipPackage be used ( no manifest.xml is required ) beans::NamedValue aArg; aArg.Name = "StorageFormat"; - aArg.Value <<= ZIP_STORAGE_FORMAT_STRING; + aArg.Value <<= OUString(ZIP_STORAGE_FORMAT_STRING); aArguments[ 1 ] <<= aArg; Reference< XMultiComponentFactory >xSMgr( m_xContext->getServiceManager(), UNO_QUERY ); |