diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-03-30 08:54:30 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-03-30 10:45:24 +0200 |
commit | 6340862e0c0eaff3ef1cf5161b2115a858a4ae4a (patch) | |
tree | b90fbcd8aa7f821dbe8ad47676500e23b3e52122 /sw/source | |
parent | 852c4f8cded79435bd69675e9e9a10034b385219 (diff) |
Simplify SwFormat::SetPageFormatToDefault
Change-Id: I5a85a3f32cd88cb8306d54e2fafa4156056cc577
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113334
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/attr/format.cxx | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx index cfbf3a2ba77e..d5c3a3833f0d 100644 --- a/sw/source/core/attr/format.cxx +++ b/sw/source/core/attr/format.cxx @@ -693,16 +693,9 @@ void SwFormat::DelDiffs( const SfxItemSet& rSet ) void SwFormat::SetPageFormatToDefault() { - - SvxLRSpaceItem aLR(RES_LR_SPACE); const sal_Int32 nSize = o3tl::convert(2, o3tl::Length::cm, o3tl::Length::twip); - aLR.SetLeft(nSize); - aLR.SetRight(nSize); - SvxULSpaceItem aUL(RES_UL_SPACE); - aUL.SetUpper(static_cast<sal_uInt16>(nSize)); - aUL.SetLower(static_cast<sal_uInt16>(nSize)); - SetFormatAttr(aLR); - SetFormatAttr(aUL); + SetFormatAttr(SvxLRSpaceItem(nSize, nSize, nSize, 0, RES_LR_SPACE)); + SetFormatAttr(SvxULSpaceItem(nSize, nSize, RES_UL_SPACE)); } /** SwFormat::IsBackgroundTransparent |