summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorHeiko Tietze <tietze.heiko@gmail.com>2020-09-01 10:45:05 +0200
committerMaxim Monastirsky <momonasmon@gmail.com>2020-09-18 01:11:18 +0200
commit705226338beeabd214f260c00f1a6db2cfb52475 (patch)
tree3643bda35f5878ef39cdb4548bcd8f8d7e42ec15 /cui/source
parent90a5b6844409ee46b8cb4d87ad8446994a546575 (diff)
Resolves tdf#97918 - Individual UNO commands for distribution options
New UNO commands added, SID_DISTRIBUTE_DLG bend to dropdown, ui removed Menus and toolbars adjusted Change-Id: Ic0a3cc299f745a1a0cd18edead1f410ff57a1f1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102272 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/factory/dlgfact.cxx21
-rw-r--r--cui/source/factory/dlgfact.hxx18
-rw-r--r--cui/source/inc/dstribut.hxx69
-rw-r--r--cui/source/tabpages/dstribut.cxx152
4 files changed, 0 insertions, 260 deletions
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 01925f1fdb0a..731303dc50a3 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -30,7 +30,6 @@
#include <svx/svxids.hrc>
#include <numfmt.hxx>
#include <splitcelldlg.hxx>
-#include <dstribut.hxx>
#include <cuiimapwnd.hxx>
#include <cui/cuicharmap.hxx>
#include <srchxtra.hxx>
@@ -110,11 +109,6 @@ short CuiAbstractSingleTabController_Impl::Execute()
return m_xDlg->run();
}
-short AbstractSvxDistributeDialog_Impl::Execute()
-{
- return m_xDlg->run();
-}
-
short AbstractHangulHanjaConversionDialog_Impl::Execute()
{
return m_xDlg->run();
@@ -397,15 +391,6 @@ void CuiAbstractSingleTabController_Impl::SetText(const OUString& rStr)
m_xDlg->set_title(rStr);
}
-SvxDistributeHorizontal AbstractSvxDistributeDialog_Impl::GetDistributeHor()const
-{
- return m_xDlg->GetDistributeHor();
-}
-SvxDistributeVertical AbstractSvxDistributeDialog_Impl::GetDistributeVer()const
-{
- return m_xDlg->GetDistributeVer();
-}
-
void AbstractHangulHanjaConversionDialog_Impl::EndDialog(sal_Int32 nResult)
{
m_xDlg->response(nResult);
@@ -1075,12 +1060,6 @@ VclPtr<AbstractSvxCaptionDialog> AbstractDialogFactory_Impl::CreateCaptionDialog
return VclPtr<AbstractSvxCaptionDialog_Impl>::Create(std::make_shared<SvxCaptionTabDialog>(pParent, pView, nAnchorTypes));
}
-VclPtr<AbstractSvxDistributeDialog> AbstractDialogFactory_Impl::CreateSvxDistributeDialog(weld::Window* pParent,
- const SfxItemSet& rAttr)
-{
- return VclPtr<AbstractSvxDistributeDialog_Impl>::Create(std::make_unique<SvxDistributeDialog>(pParent, rAttr, SvxDistributeHorizontal::NONE, SvxDistributeVertical::NONE));
-}
-
VclPtr<AbstractHangulHanjaConversionDialog> AbstractDialogFactory_Impl::CreateHangulHanjaConversionDialog(weld::Window* pParent)
{
return VclPtr<AbstractHangulHanjaConversionDialog_Impl>::Create(std::make_unique<HangulHanjaConversionDialog>(pParent));
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index d0072f6349c9..fd11ee459d73 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -38,7 +38,6 @@
#include <cuitbxform.hxx>
#include <dlgname.hxx>
#include <DiagramDialog.hxx>
-#include <dstribut.hxx>
#include <hangulhanjadlg.hxx>
#include <hyphen.hxx>
#include <insdlg.hxx>
@@ -162,21 +161,6 @@ public:
virtual OString GetScreenshotId() const override;
};
-class SvxDistributeDialog;
-class AbstractSvxDistributeDialog_Impl: public AbstractSvxDistributeDialog
-{
- std::unique_ptr<SvxDistributeDialog> m_xDlg;
-public:
- explicit AbstractSvxDistributeDialog_Impl(std::unique_ptr<SvxDistributeDialog> p)
- : m_xDlg(std::move(p))
- {
- }
- virtual short Execute() override;
-public:
- virtual SvxDistributeHorizontal GetDistributeHor() const override;
- virtual SvxDistributeVertical GetDistributeVer() const override;
-};
-
class AbstractHangulHanjaConversionDialog_Impl: public AbstractHangulHanjaConversionDialog
{
private:
@@ -799,8 +783,6 @@ public:
CreateCaptionDialog(weld::Window* pParent,
const SdrView* pView,
SvxAnchorIds nAnchorTypes = SvxAnchorIds::NONE) override;
- virtual VclPtr<AbstractSvxDistributeDialog>
- CreateSvxDistributeDialog(weld::Window* pParent, const SfxItemSet& rAttr) override;
virtual VclPtr<SfxAbstractInsertObjectDialog>
CreateInsertObjectDialog(weld::Window* pParent, const OUString& rCommand,
const css::uno::Reference < css::embed::XStorage >& xStor,
diff --git a/cui/source/inc/dstribut.hxx b/cui/source/inc/dstribut.hxx
deleted file mode 100644
index 847f36ba74a2..000000000000
--- a/cui/source/inc/dstribut.hxx
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#pragma once
-
-#include <sfx2/tabdlg.hxx>
-#include <svx/dstribut_enum.hxx>
-#include <vcl/weld.hxx>
-
-class SvxDistributePage : public SfxTabPage
-{
- SvxDistributeHorizontal m_eDistributeHor;
- SvxDistributeVertical m_eDistributeVer;
-
- std::unique_ptr<weld::RadioButton> m_xBtnHorNone;
- std::unique_ptr<weld::RadioButton> m_xBtnHorLeft;
- std::unique_ptr<weld::RadioButton> m_xBtnHorCenter;
- std::unique_ptr<weld::RadioButton> m_xBtnHorDistance;
- std::unique_ptr<weld::RadioButton> m_xBtnHorRight;
- std::unique_ptr<weld::RadioButton> m_xBtnVerNone;
- std::unique_ptr<weld::RadioButton> m_xBtnVerTop;
- std::unique_ptr<weld::RadioButton> m_xBtnVerCenter;
- std::unique_ptr<weld::RadioButton> m_xBtnVerDistance;
- std::unique_ptr<weld::RadioButton> m_xBtnVerBottom;
-
-public:
- SvxDistributePage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs,
- SvxDistributeHorizontal eHor,
- SvxDistributeVertical eVer);
- virtual ~SvxDistributePage() override;
-
- virtual bool FillItemSet(SfxItemSet*) override;
- virtual void Reset(const SfxItemSet*) override;
-
- SvxDistributeHorizontal GetDistributeHor() const { return m_eDistributeHor; }
- SvxDistributeVertical GetDistributeVer() const { return m_eDistributeVer; }
-};
-
-class SvxDistributeDialog : public SfxSingleTabDialogController
-{
- SvxDistributePage* mpPage;
-
-public:
- SvxDistributeDialog(weld::Window* pParent, const SfxItemSet& rAttr,
- SvxDistributeHorizontal eHor,
- SvxDistributeVertical eVer);
- virtual ~SvxDistributeDialog() override;
-
- SvxDistributeHorizontal GetDistributeHor() const { return mpPage->GetDistributeHor(); }
- SvxDistributeVertical GetDistributeVer() const { return mpPage->GetDistributeVer(); }
-};
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/tabpages/dstribut.cxx b/cui/source/tabpages/dstribut.cxx
deleted file mode 100644
index e1653ca4d65e..000000000000
--- a/cui/source/tabpages/dstribut.cxx
+++ /dev/null
@@ -1,152 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <sfx2/basedlgs.hxx>
-#include <dstribut.hxx>
-
-/*************************************************************************
-|*
-|* Dialog
-|*
-\************************************************************************/
-
-SvxDistributeDialog::SvxDistributeDialog(weld::Window* pParent,
- const SfxItemSet& rInAttrs, SvxDistributeHorizontal eHor,
- SvxDistributeVertical eVer)
- : SfxSingleTabDialogController(pParent, &rInAttrs, "cui/ui/distributiondialog.ui",
- "DistributionDialog")
-{
- SetTabPage(std::make_unique<SvxDistributePage>(get_content_area(), this, rInAttrs, eHor, eVer));
- mpPage = static_cast<SvxDistributePage*>(GetTabPage());
-}
-
-SvxDistributeDialog::~SvxDistributeDialog()
-{
-}
-
-/*************************************************************************
-|*
-|* Tabpage
-|*
-\************************************************************************/
-
-SvxDistributePage::SvxDistributePage(weld::Container* pPage, weld::DialogController* pController,
- const SfxItemSet& rInAttrs, SvxDistributeHorizontal eHor,
- SvxDistributeVertical eVer)
- : SfxTabPage(pPage, pController, "cui/ui/distributionpage.ui", "DistributionPage",
- &rInAttrs)
- , m_eDistributeHor(eHor)
- , m_eDistributeVer(eVer)
- , m_xBtnHorNone(m_xBuilder->weld_radio_button("hornone"))
- , m_xBtnHorLeft(m_xBuilder->weld_radio_button("horleft"))
- , m_xBtnHorCenter(m_xBuilder->weld_radio_button("horcenter"))
- , m_xBtnHorDistance(m_xBuilder->weld_radio_button("hordistance"))
- , m_xBtnHorRight(m_xBuilder->weld_radio_button("horright"))
- , m_xBtnVerNone(m_xBuilder->weld_radio_button("vernone"))
- , m_xBtnVerTop(m_xBuilder->weld_radio_button("vertop"))
- , m_xBtnVerCenter(m_xBuilder->weld_radio_button("vercenter"))
- , m_xBtnVerDistance(m_xBuilder->weld_radio_button("verdistance"))
- , m_xBtnVerBottom(m_xBuilder->weld_radio_button("verbottom"))
-{
-}
-
-SvxDistributePage::~SvxDistributePage()
-{
-}
-
-/*************************************************************************
-|*
-|* read the delivered Item-Set
-|*
-\************************************************************************/
-
-void SvxDistributePage::Reset(const SfxItemSet* )
-{
- m_xBtnHorNone->set_active(false);
- m_xBtnHorLeft->set_active(false);
- m_xBtnHorCenter->set_active(false);
- m_xBtnHorDistance->set_active(false);
- m_xBtnHorRight->set_active(false);
-
- switch(m_eDistributeHor)
- {
- case SvxDistributeHorizontal::NONE : m_xBtnHorNone->set_active(true); break;
- case SvxDistributeHorizontal::Left : m_xBtnHorLeft->set_active(true); break;
- case SvxDistributeHorizontal::Center : m_xBtnHorCenter->set_active(true); break;
- case SvxDistributeHorizontal::Distance : m_xBtnHorDistance->set_active(true); break;
- case SvxDistributeHorizontal::Right : m_xBtnHorRight->set_active(true); break;
- }
-
- m_xBtnVerNone->set_active(false);
- m_xBtnVerTop->set_active(false);
- m_xBtnVerCenter->set_active(false);
- m_xBtnVerDistance->set_active(false);
- m_xBtnVerBottom->set_active(false);
-
- switch(m_eDistributeVer)
- {
- case SvxDistributeVertical::NONE : m_xBtnVerNone->set_active(true); break;
- case SvxDistributeVertical::Top : m_xBtnVerTop->set_active(true); break;
- case SvxDistributeVertical::Center : m_xBtnVerCenter->set_active(true); break;
- case SvxDistributeVertical::Distance : m_xBtnVerDistance->set_active(true); break;
- case SvxDistributeVertical::Bottom : m_xBtnVerBottom->set_active(true); break;
- }
-}
-
-/*************************************************************************
-|*
-|* Fill the delivered Item-Set with dialogbox-attributes
-|*
-\************************************************************************/
-
-bool SvxDistributePage::FillItemSet( SfxItemSet* )
-{
- SvxDistributeHorizontal eDistributeHor(SvxDistributeHorizontal::NONE);
- SvxDistributeVertical eDistributeVer(SvxDistributeVertical::NONE);
-
- if(m_xBtnHorLeft->get_active())
- eDistributeHor = SvxDistributeHorizontal::Left;
- else if(m_xBtnHorCenter->get_active())
- eDistributeHor = SvxDistributeHorizontal::Center;
- else if(m_xBtnHorDistance->get_active())
- eDistributeHor = SvxDistributeHorizontal::Distance;
- else if(m_xBtnHorRight->get_active())
- eDistributeHor = SvxDistributeHorizontal::Right;
-
- if(m_xBtnVerTop->get_active())
- eDistributeVer = SvxDistributeVertical::Top;
- else if(m_xBtnVerCenter->get_active())
- eDistributeVer = SvxDistributeVertical::Center;
- else if(m_xBtnVerDistance->get_active())
- eDistributeVer = SvxDistributeVertical::Distance;
- else if(m_xBtnVerBottom->get_active())
- eDistributeVer = SvxDistributeVertical::Bottom;
-
- if(eDistributeHor != m_eDistributeHor || eDistributeVer != m_eDistributeVer)
- {
- m_eDistributeHor = eDistributeHor;
- m_eDistributeVer = eDistributeVer;
- return true;
- }
-
- return false;
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */