summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorHossein <hossein@libreoffice.org>2021-08-16 00:53:12 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2021-08-16 08:24:57 +0200
commitf34146b7d5d0bb66c805504a691cb70d5b3da6b2 (patch)
tree5b81fff47c79ba7a73c891192e6c320351281598 /desktop
parent5aac78e5fb241050a86714687e9ff8804588ae3c (diff)
Cleaning up decleration and initialization of unique_ptr variables
Cleaning up decleration and initialization of unique_ptr variables pPageSizeItem, pPageLRMarginItem, and pPageULMarginItem according to the request: https://gerrit.libreoffice.org/c/core/+/120456 Change-Id: I0cf5149308fe06c10403bfb82ca6a1786096bf3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120520 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx15
1 files changed, 4 insertions, 11 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 9ca61d6c0a4d..be1682047ab9 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -805,9 +805,7 @@ void ExecuteMarginULChange(
void ExecuteOrientationChange()
{
std::unique_ptr<SvxPageItem> pPageItem(new SvxPageItem(SID_ATTR_PAGE));
- std::unique_ptr<SvxSizeItem> pPageSizeItem(new SvxSizeItem(SID_ATTR_PAGE_SIZE));
- std::unique_ptr<SvxLongLRSpaceItem> pPageLRMarginItem(new SvxLongLRSpaceItem( 0, 0, SID_ATTR_PAGE_LRSPACE ));
- std::unique_ptr<SvxLongULSpaceItem> pPageULMarginItem(new SvxLongULSpaceItem( 0, 0, SID_ATTR_PAGE_ULSPACE ));
+
// 1mm in twips rounded
// This should be in sync with MINBODY in sw/source/uibase/sidebar/PageMarginControl.hxx
constexpr tools::Long MINBODY = 56;
@@ -823,18 +821,13 @@ void ExecuteOrientationChange()
SfxViewFrame::Current()->GetBindings().GetDispatcher()->QueryState(SID_ATTR_PAGE_SIZE, pItem);
- pPageSizeItem.reset(&pItem->Clone()->StaticWhichCast(SID_ATTR_PAGE_SIZE));
-
-
+ std::unique_ptr<SvxSizeItem> pPageSizeItem(&pItem->Clone()->StaticWhichCast(SID_ATTR_PAGE_SIZE));
SfxViewFrame::Current()->GetBindings().GetDispatcher()->QueryState(SID_ATTR_PAGE_LRSPACE, pItem);
- pPageLRMarginItem.reset(&pItem->Clone()->StaticWhichCast(SID_ATTR_PAGE_LRSPACE));
-
-
+ std::unique_ptr<SvxLongLRSpaceItem> pPageLRMarginItem(&pItem->Clone()->StaticWhichCast(SID_ATTR_PAGE_LRSPACE));
SfxViewFrame::Current()->GetBindings().GetDispatcher()->QueryState(SID_ATTR_PAGE_ULSPACE, pItem);
- pPageULMarginItem.reset(&pItem->Clone()->StaticWhichCast(SID_ATTR_PAGE_ULSPACE));
-
+ std::unique_ptr<SvxLongULSpaceItem> pPageULMarginItem(&pItem->Clone()->StaticWhichCast(SID_ATTR_PAGE_ULSPACE));
{
bool bIsLandscape = false;