summaryrefslogtreecommitdiff
path: root/reportdesign/source/ui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-27 07:22:21 +0200
committerCaolán McNamara <caolanm@redhat.com>2018-10-27 20:10:03 +0200
commit646a6307b9a31376d85fa3ed12a314118d41d7cc (patch)
treea43fb1d36df08f2f3f9c78cde361edce99b848c1 /reportdesign/source/ui
parent97ed3b93e1def081a535de14cc3c3644363cbd45 (diff)
loplugin:unusedmethods
Change-Id: I66ef078794ed1eb44dbfa854c589545e5f9ba78e Reviewed-on: https://gerrit.libreoffice.org/62407 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'reportdesign/source/ui')
-rw-r--r--reportdesign/source/ui/dlg/PageNumber.cxx50
-rw-r--r--reportdesign/source/ui/inc/PageNumber.hxx2
2 files changed, 1 insertions, 51 deletions
diff --git a/reportdesign/source/ui/dlg/PageNumber.cxx b/reportdesign/source/ui/dlg/PageNumber.cxx
index 4821b7ac9d52..62462180cfa6 100644
--- a/reportdesign/source/ui/dlg/PageNumber.cxx
+++ b/reportdesign/source/ui/dlg/PageNumber.cxx
@@ -38,9 +38,8 @@ using namespace ::comphelper;
OPageNumberDialog::OPageNumberDialog(weld::Window* pParent,
const uno::Reference< report::XReportDefinition >& _xHoldAlive,
- OReportController* _pController)
+ OReportController* )
: GenericDialogController(pParent, "modules/dbreport/ui/pagenumberdialog.ui", "PageNumberDialog")
- , m_pController(_pController)
, m_xHoldAlive(_xHoldAlive)
, m_xPageN(m_xBuilder->weld_radio_button("pagen"))
, m_xPageNofM(m_xBuilder->weld_radio_button("pagenofm"))
@@ -56,53 +55,6 @@ OPageNumberDialog::~OPageNumberDialog()
{
}
-void OPageNumberDialog::execute()
-{
- short nRet = m_xDialog->run();
- if (nRet == RET_OK)
- {
- try
- {
- sal_Int32 nControlMaxSize = 3000;
- sal_Int32 nPosX = 0;
- sal_Int32 nPos2X = 0;
- awt::Size aRptSize = getStyleProperty<awt::Size>(m_xHoldAlive,PROPERTY_PAPERSIZE);
- switch (m_xAlignmentLst->get_active())
- {
- case 0: // left
- nPosX = getStyleProperty<sal_Int32>(m_xHoldAlive,PROPERTY_LEFTMARGIN);
- break;
- case 1: // middle
- nPosX = getStyleProperty<sal_Int32>(m_xHoldAlive,PROPERTY_LEFTMARGIN) + (aRptSize.Width - getStyleProperty<sal_Int32>(m_xHoldAlive,PROPERTY_LEFTMARGIN) - getStyleProperty<sal_Int32>(m_xHoldAlive,PROPERTY_RIGHTMARGIN) - nControlMaxSize) / 2;
- break;
- case 2: // right
- nPosX = (aRptSize.Width - getStyleProperty<sal_Int32>(m_xHoldAlive,PROPERTY_RIGHTMARGIN) - nControlMaxSize);
- break;
- case 3: // inner
- case 4: // outer
- nPosX = getStyleProperty<sal_Int32>(m_xHoldAlive,PROPERTY_LEFTMARGIN);
- nPos2X = (aRptSize.Width - getStyleProperty<sal_Int32>(m_xHoldAlive,PROPERTY_RIGHTMARGIN) - nControlMaxSize);
- break;
- default:
- break;
- }
- if (m_xAlignmentLst->get_active() > 2)
- nPosX = nPos2X;
-
- uno::Sequence<beans::PropertyValue> aValues( comphelper::InitPropertySequence({
- { PROPERTY_POSITION, uno::Any(awt::Point(nPosX,0)) },
- { PROPERTY_PAGEHEADERON, uno::Any(m_xTopPage->get_active()) },
- { PROPERTY_STATE, uno::Any(m_xPageNofM->get_active()) }
- }));
-
- m_pController->executeChecked(SID_INSERT_FLD_PGNUMBER,aValues);
- }
- catch(uno::Exception&)
- {
- }
- }
-}
-
} // rptui
diff --git a/reportdesign/source/ui/inc/PageNumber.hxx b/reportdesign/source/ui/inc/PageNumber.hxx
index 8a5150698e2d..92fd4cc549f8 100644
--- a/reportdesign/source/ui/inc/PageNumber.hxx
+++ b/reportdesign/source/ui/inc/PageNumber.hxx
@@ -32,7 +32,6 @@ class OReportController;
\************************************************************************/
class OPageNumberDialog : public weld::GenericDialogController
{
- ::rptui::OReportController* m_pController;
css::uno::Reference< css::report::XReportDefinition>
m_xHoldAlive;
std::unique_ptr<weld::RadioButton> m_xPageN;
@@ -49,7 +48,6 @@ public:
const css::uno::Reference< css::report::XReportDefinition>& _xHoldAlive,
::rptui::OReportController* _pController);
virtual ~OPageNumberDialog() override;
- void execute();
};
} // namespace rptui