diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-11-04 13:13:24 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-11-04 20:44:53 +0000 |
commit | 0ce9c4f910afb2bf1ac0aec97ef49598493ac3a5 (patch) | |
tree | c5d9152528f18dd7e011615e22f569b15f3159b1 | |
parent | c61b2066660fb0130f0b0f9f51b48e3799625b83 (diff) |
Resolves: fdo#69049 Format in 'Outline Numbering' not saved anymore
Change-Id: Ibd129d989a32eec2f63413d1ed09962ad3b38c68
-rw-r--r-- | sc/source/core/tool/autoform.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/config/uinums.cxx | 22 |
2 files changed, 17 insertions, 7 deletions
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx index 88f7b5849b70..e9265b95388a 100644 --- a/sc/source/core/tool/autoform.cxx +++ b/sc/source/core/tool/autoform.cxx @@ -1070,7 +1070,7 @@ bool ScAutoFormat::Save() SvtPathOptions aPathOpt; aURL.SetSmartURL( aPathOpt.GetUserConfigPath() ); aURL.setFinalSlash(); - aURL.Append( OUString( sAutoTblFmtName ) ); + aURL.Append(sAutoTblFmtName); SfxMedium aMedium( aURL.GetMainURL(INetURLObject::NO_DECODE), STREAM_WRITE ); SvStream* pStream = aMedium.GetOutStream(); diff --git a/sw/source/uibase/config/uinums.cxx b/sw/source/uibase/config/uinums.cxx index 107ce2a9cb6f..0fe448d4d0f7 100644 --- a/sw/source/uibase/config/uinums.cxx +++ b/sw/source/uibase/config/uinums.cxx @@ -67,13 +67,23 @@ SwBaseNumRules::~SwBaseNumRules() { if( bModified ) { + INetURLObject aURL; SvtPathOptions aPathOpt; - OUString sNm( aPathOpt.GetUserConfigPath() + "/" + sFileName ); - INetURLObject aTempObj(sNm); - sNm = aTempObj.GetFull(); - SfxMedium aStrm( sNm, STREAM_WRITE | STREAM_TRUNC | - STREAM_SHARE_DENYALL ); - Store( *aStrm.GetOutStream() ); + aURL.SetSmartURL( aPathOpt.GetUserConfigPath() ); + aURL.setFinalSlash(); + aURL.Append(sFileName); + + SfxMedium aMedium( aURL.GetMainURL(INetURLObject::NO_DECODE), STREAM_WRITE ); + SvStream* pStream = aMedium.GetOutStream(); + bool bRet = (pStream && pStream->GetError() == 0); + if (bRet) + { + Store( *pStream ); + + pStream->Flush(); + + aMedium.Commit(); + } } for( sal_uInt16 i = 0; i < nMaxRules; ++i ) |