diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-05-06 16:00:51 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-05-07 11:05:02 +0200 |
commit | edaa4785cd551031e3962bfb21a8d0a9aa14c233 (patch) | |
tree | 63a72b70796e89adbbd7a73dffe4849709644cd8 /editeng | |
parent | 8c1bba83384e835e7207fe8338f149ea8d77c3a9 (diff) |
SotStorage ctor takes as 3rd param a StorageMode (aka short)
The code in editeng, passing sal_True (= 1) into StorageMode, has been like that
ever since cd7096b4260149eb6fdd117ea0ba26b8116a41b2 "INTEGRATION: CWS
mav09: #i27773#: remove so3; new storage API" where SfxMedium ctor calls were
replaced with SotStorage ctor calls, keeping the argument lists intact. And at
least way-back 5a9184d9e270e0ec0fe4b378c5cfde54ede095fa "INTEGRATION: CWS
hedaburemove01: #72503# get rid of hedabu procedure: Moving headers to
sfx2/inc/sfx2 and correspondent necessary changes" had a SfxMedium ctor that
took as 3rd param a sal_Bool bDirect. That is, it looks like
cd7096b4260149eb6fdd117ea0ba26b8116a41b2 inadvertently carried the SfxMedium
bDirect arguments over as SotStorage StorageMode arguments.
Given further that even way-back e1e019fed3970b916b046e2d7be48ea786026fce
"INTEGRATION: CWS hedaburemove01: #72503# get rid of hedabu procedure: Moving
headers to sot/inc/sot and correspondent necessary changes" only defines
STORAGE_* values with values >= 0x02 (so sal_True would never have had any
effect), the best bet appears to just use the implicit default = 0 instead.
Change-Id: I3c19831433173657d3a3225c28398de7481fe036
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/misc/svxacorr.cxx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 59b0463d687a..14656b01a337 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -2201,7 +2201,7 @@ bool SvxAutoCorrectLanguageLists::AddToCplSttExceptList(const OUString& rNew) if( !rNew.isEmpty() && GetCplSttExceptList()->insert( rNew ).second ) { MakeUserStorage_Impl(); - SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True ); + SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE ); SaveExceptList_Imp( *pCplStt_ExcptLst, pXMLImplCplStt_ExcptLstStr, xStg ); @@ -2222,7 +2222,7 @@ bool SvxAutoCorrectLanguageLists::AddToWrdSttExceptList(const OUString& rNew) if( !rNew.isEmpty() && pExceptList && pExceptList->insert( rNew ).second ) { MakeUserStorage_Impl(); - SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True ); + SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE ); SaveExceptList_Imp( *pWrdStt_ExcptLst, pXMLImplWrdStt_ExcptLstStr, xStg ); @@ -2240,7 +2240,7 @@ SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadCplSttExceptList() { try { - SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, StreamMode::READ | StreamMode::SHARE_DENYNONE, sal_True ); + SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, StreamMode::READ | StreamMode::SHARE_DENYNONE ); OUString sTemp ( pXMLImplCplStt_ExcptLstStr ); if( xStg.Is() && xStg->IsContained( sTemp ) ) LoadXMLExceptList_Imp( pCplStt_ExcptLst, pXMLImplCplStt_ExcptLstStr, xStg ); @@ -2254,7 +2254,7 @@ SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadCplSttExceptList() void SvxAutoCorrectLanguageLists::SaveCplSttExceptList() { MakeUserStorage_Impl(); - SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True ); + SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE ); SaveExceptList_Imp( *pCplStt_ExcptLst, pXMLImplCplStt_ExcptLstStr, xStg ); @@ -2284,7 +2284,7 @@ SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadWrdSttExceptList() { try { - SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, StreamMode::READ | StreamMode::SHARE_DENYNONE, sal_True ); + SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, StreamMode::READ | StreamMode::SHARE_DENYNONE ); OUString sTemp ( pXMLImplWrdStt_ExcptLstStr ); if( xStg.Is() && xStg->IsContained( sTemp ) ) LoadXMLExceptList_Imp( pWrdStt_ExcptLst, pXMLImplWrdStt_ExcptLstStr, xStg ); @@ -2299,7 +2299,7 @@ SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadWrdSttExceptList() void SvxAutoCorrectLanguageLists::SaveWrdSttExceptList() { MakeUserStorage_Impl(); - SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True ); + SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE ); SaveExceptList_Imp( *pWrdStt_ExcptLst, pXMLImplWrdStt_ExcptLstStr, xStg ); @@ -2334,7 +2334,7 @@ void SvxAutoCorrectLanguageLists::RemoveStream_Imp( const OUString& rName ) { if( sShareAutoCorrFile != sUserAutoCorrFile ) { - SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True ); + SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE ); if( xStg.Is() && SVSTREAM_OK == xStg->GetError() && xStg->IsStream( rName ) ) { @@ -2399,8 +2399,8 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl() } if (bConvert && !bError) { - SotStorageRef xSrcStg = new SotStorage( aDest.GetMainURL( INetURLObject::DECODE_TO_IURI ), StreamMode::READ, sal_True ); - SotStorageRef xDstStg = new SotStorage( sUserAutoCorrFile, StreamMode::WRITE, sal_True ); + SotStorageRef xSrcStg = new SotStorage( aDest.GetMainURL( INetURLObject::DECODE_TO_IURI ), StreamMode::READ ); + SotStorageRef xDstStg = new SotStorage( sUserAutoCorrFile, StreamMode::WRITE ); if( xSrcStg.Is() && xDstStg.Is() ) { @@ -2508,7 +2508,7 @@ bool SvxAutoCorrectLanguageLists::MakeCombinedChanges( std::vector<SvxAutocorrWo GetAutocorrWordList(); MakeUserStorage_Impl(); - SotStorageRef xStorage = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True ); + SotStorageRef xStorage = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE ); bool bRet = xStorage.Is() && SVSTREAM_OK == xStorage->GetError(); @@ -2581,7 +2581,7 @@ bool SvxAutoCorrectLanguageLists::PutText( const OUString& rShort, const OUStrin GetAutocorrWordList(); MakeUserStorage_Impl(); - SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True ); + SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE ); bool bRet = xStg.Is() && SVSTREAM_OK == xStg->GetError(); @@ -2643,7 +2643,7 @@ bool SvxAutoCorrectLanguageLists::PutText( const OUString& rShort, SvxAutocorrWord* pNew = new SvxAutocorrWord( rShort, sLong, false ); if( pAutocorr_List->Insert( pNew ) ) { - SotStorageRef xStor = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True ); + SotStorageRef xStor = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE ); MakeBlocklist_Imp( *xStor ); } else @@ -2665,7 +2665,7 @@ bool SvxAutoCorrectLanguageLists::DeleteText( const OUString& rShort ) MakeUserStorage_Impl(); - SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True ); + SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE ); bool bRet = xStg.Is() && SVSTREAM_OK == xStg->GetError(); if( bRet ) { |