summaryrefslogtreecommitdiff
path: root/sw/source/core/edit/edtox.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/edit/edtox.cxx')
-rw-r--r--sw/source/core/edit/edtox.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx
index d6fb64577e11..230e45f71079 100644
--- a/sw/source/core/edit/edtox.cxx
+++ b/sw/source/core/edit/edtox.cxx
@@ -135,10 +135,9 @@ void SwEditShell::SetTOXBaseReadonly(const SwTOXBase& rTOXBase, BOOL bReadonly)
((SwTOXBase&)rTOXBase).SetProtected(bReadonly);
ASSERT( rTOXSect.SwSection::GetType() == TOX_CONTENT_SECTION, "not a TOXContentSection" );
- SwSection aSect(TOX_CONTENT_SECTION, rTOXSect.GetName());
- aSect = rTOXSect;
- aSect.SetProtect(bReadonly);
- ChgSection( GetSectionFmtPos( *rTOXSect.GetFmt() ), aSect, 0 );
+ SwSectionData aSectionData(rTOXSect);
+ aSectionData.SetProtectFlag(bReadonly);
+ UpdateSection( GetSectionFmtPos( *rTOXSect.GetFmt() ), aSectionData, 0 );
}
/* -----------------02.09.99 07:47-------------------