summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore/unostyle.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/unocore/unostyle.cxx')
-rw-r--r--sw/source/core/unocore/unostyle.cxx11
1 files changed, 1 insertions, 10 deletions
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index e6ee4dac0e1b..9b3dc09f8e7a 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -85,7 +85,6 @@
#include <com/sun/star/document/XEventsSupplier.hpp>
#include <com/sun/star/io/XInputStream.hpp>
#include <istyleaccess.hxx>
-#include <GetMetricVal.hxx>
#include <fmtfsize.hxx>
#include <numrule.hxx>
#include <tblafmt.hxx>
@@ -2687,15 +2686,7 @@ void SAL_CALL SwXStyle::setAllPropertiesToDefault()
SwPageDesc& rPageDesc = m_pDoc->GetPageDesc(nPgDscPos);
rPageDesc.ResetAllMasterAttr();
- SvxLRSpaceItem aLR(RES_LR_SPACE);
- sal_Int32 nSize = GetMetricVal(CM_1) * 2;
- aLR.SetLeft(nSize);
- aLR.SetLeft(nSize);
- SvxULSpaceItem aUL(RES_UL_SPACE);
- aUL.SetUpper(static_cast<sal_uInt16>(nSize));
- aUL.SetLower(static_cast<sal_uInt16>(nSize));
- pPageFormat->SetFormatAttr(aLR);
- pPageFormat->SetFormatAttr(aUL);
+ pPageFormat->SetPageFormatToDefault();
SwPageDesc* pStdPgDsc = m_pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool(RES_POOLPAGE_STANDARD);
std::shared_ptr<SwFormatFrameSize> aFrameSz(std::make_shared<SwFormatFrameSize>(SwFrameSize::Fixed));