summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-11-08 22:26:45 +0100
committerMichael Stahl <mstahl@redhat.com>2014-11-08 23:01:42 +0100
commitf8482195dfdebc820ea4d4c2a0cb9dc698172efe (patch)
tree2ec808da149a32706aef4310e9f56e75387f15a0
parent65d762d8ca0545d2f77da24f9cefa5b3148ef384 (diff)
sw: SwChapterNumRules::bModified has become pointless
Change-Id: I7d4937dab947b14d4885c548cd7a96ebaba23c60
-rw-r--r--sw/source/uibase/config/uinums.cxx32
-rw-r--r--sw/source/uibase/inc/uinums.hxx1
2 files changed, 13 insertions, 20 deletions
diff --git a/sw/source/uibase/config/uinums.cxx b/sw/source/uibase/config/uinums.cxx
index 025ad2f6c8c8..449d1dfa2418 100644
--- a/sw/source/uibase/config/uinums.cxx
+++ b/sw/source/uibase/config/uinums.cxx
@@ -47,33 +47,28 @@ using namespace ::com::sun::star;
SwChapterNumRules::SwChapterNumRules()
: sFileName(OUString(CHAPTER_FILENAME))
- ,
- bModified( false )
{
Init();
}
void SwChapterNumRules::Save()
{
- if( bModified )
+ INetURLObject aURL;
+ SvtPathOptions aPathOpt;
+ 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)
{
- INetURLObject aURL;
- SvtPathOptions aPathOpt;
- 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)
- {
- sw::ExportStoredChapterNumberingRules(*this, *pStream, sFileName);
+ sw::ExportStoredChapterNumberingRules(*this, *pStream, sFileName);
- pStream->Flush();
+ pStream->Flush();
- aMedium.Commit();
- }
+ aMedium.Commit();
}
}
@@ -106,7 +101,6 @@ void SwChapterNumRules::CreateEmptyNumRule(sal_uInt16 const nIndex)
void SwChapterNumRules::ApplyNumRules(const SwNumRulesWithName &rCopy, sal_uInt16 nIdx)
{
- bModified = true;
assert(nIdx < nMaxRules);
if( !pNumRules[nIdx] )
pNumRules[nIdx] = new SwNumRulesWithName( rCopy );
diff --git a/sw/source/uibase/inc/uinums.hxx b/sw/source/uibase/inc/uinums.hxx
index d01edec9c45b..60a9d23ccdbc 100644
--- a/sw/source/uibase/inc/uinums.hxx
+++ b/sw/source/uibase/inc/uinums.hxx
@@ -86,7 +86,6 @@ public:
protected:
SwNumRulesWithName *pNumRules[ MAX_NUM_RULES ];
OUString sFileName;
- bool bModified;
void Init();
void Save();