diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-02-07 13:03:13 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-02-07 13:03:13 +0100 |
commit | 7edbe6529825f562e2eab0b7c19c8c0883ea4fea (patch) | |
tree | 6db96bb726c56fcfb500be239fbad0e4349a0e9c /editeng | |
parent | 62cad676e9beb9d94e8adee6033d7c11c35baf0c (diff) |
Clean up some OUString creation
Change-Id: I62d312436432939d28aced7cfc4a018adbd94c8c
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/misc/svxacorr.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 2f88eccafae5..fef8739e5f20 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -2124,12 +2124,11 @@ SvxAutocorrWordList* SvxAutoCorrectLanguageLists::LoadAutocorrWordList() try { uno::Reference < embed::XStorage > xStg = comphelper::OStorageHelper::GetStorageFromURL( sShareAutoCorrFile, embed::ElementModes::READ ); - OUString aXMLWordListName( pXMLImplAutocorr_ListStr, strlen(pXMLImplAutocorr_ListStr), RTL_TEXTENCODING_MS_1252 ); - uno::Reference < io::XStream > xStrm = xStg->openStreamElement( aXMLWordListName, embed::ElementModes::READ ); + uno::Reference < io::XStream > xStrm = xStg->openStreamElement( pXMLImplAutocorr_ListStr, embed::ElementModes::READ ); uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext(); xml::sax::InputSource aParserInput; - aParserInput.sSystemId = aXMLWordListName; + aParserInput.sSystemId = pXMLImplAutocorr_ListStr; aParserInput.aInputStream = xStrm->getInputStream(); // get parser @@ -2436,11 +2435,10 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl() bool SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SotStorage& rStg ) { - OUString sStrmName( pXMLImplAutocorr_ListStr, strlen(pXMLImplAutocorr_ListStr), RTL_TEXTENCODING_MS_1252 ); bool bRet = true, bRemove = !pAutocorr_List || pAutocorr_List->empty(); if( !bRemove ) { - tools::SvRef<SotStorageStream> refList = rStg.OpenSotStream( sStrmName, + tools::SvRef<SotStorageStream> refList = rStg.OpenSotStream( pXMLImplAutocorr_ListStr, ( StreamMode::READ | StreamMode::WRITE | StreamMode::SHARE_DENYWRITE ) ); if( refList.is() ) { @@ -2458,7 +2456,7 @@ bool SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SotStorage& rStg ) xWriter->setOutputStream(xOut); uno::Reference<xml::sax::XDocumentHandler> xHandler(xWriter, uno::UNO_QUERY); - rtl::Reference< SvXMLAutoCorrectExport > xExp( new SvXMLAutoCorrectExport( xContext, pAutocorr_List, sStrmName, xHandler ) ); + rtl::Reference< SvXMLAutoCorrectExport > xExp( new SvXMLAutoCorrectExport( xContext, pAutocorr_List, pXMLImplAutocorr_ListStr, xHandler ) ); xExp->exportDoc( XML_BLOCK_LIST ); @@ -2481,7 +2479,7 @@ bool SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SotStorage& rStg ) if( bRemove ) { - rStg.Remove( sStrmName ); + rStg.Remove( pXMLImplAutocorr_ListStr ); rStg.Commit(); } |