Kaydet (Commit) 0ce9c4f9 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: fdo#69049 Format in 'Outline Numbering' not saved anymore

Change-Id: Ibd129d989a32eec2f63413d1ed09962ad3b38c68
üst c61b2066
......@@ -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();
......
......@@ -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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment