summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2022-06-02 22:42:20 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2022-06-08 18:17:17 +0200
commitea5a0918c8c32309821ab239c4b95f4d6a3b5c12 (patch)
tree04ff84b7c076a2f178e90d0eb32eb1731b10fd3c /reportdesign
parentd4123356c61db269651e950a0a2cc93e6d801c90 (diff)
VCL add vcl::WindowPosSize abstract class
... and use it to remove a duplicate and simplify code. Should mostly be a refactoring, which was mainly done by some larger sed calls, except for the new API calls, which helped shrinking some LOC. All data is also now private. Originally two of the "replaced" "classes" had unsigned width and height and one had signed. Noel pointed out, that during calculations, the value might get negative temporarly, so this now settles with signed values. Still the set size should never be negative and this is enforced this way. Not sure that is what Noel had in mind. This also includes: - rename WindowState => WindowData - rename WindowStateMask => WindowDataMask - rename WindowStateState => WindowState - move WindowState and WindowDataMask to vcl/windowstate.hxx - move WindowData(Mask) and WindowState into vcl namespace - readability: replace or'ed WindowState enums with "meta" enums + add "meta" WindowState enums PosSize and PosSizeState Change-Id: Icd16cfb498531aa7238ddbde83fcb0ed6d9e4f77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135426 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/ui/dlg/Formula.cxx2
-rw-r--r--reportdesign/source/ui/report/DesignView.cxx4
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx2
3 files changed, 4 insertions, 4 deletions
diff --git a/reportdesign/source/ui/dlg/Formula.cxx b/reportdesign/source/ui/dlg/Formula.cxx
index f2b95e0df1b7..a0b866031631 100644
--- a/reportdesign/source/ui/dlg/Formula.cxx
+++ b/reportdesign/source/ui/dlg/Formula.cxx
@@ -87,7 +87,7 @@ FormulaDialog::~FormulaDialog()
if ( m_xAddField )
{
SvtViewOptions aDlgOpt( EViewType::Window, HID_RPT_FIELD_SEL_WIN );
- aDlgOpt.SetWindowState(OStringToOUString(m_xAddField->getDialog()->get_window_state(WindowStateMask::X | WindowStateMask::Y | WindowStateMask::State | WindowStateMask::Minimized), RTL_TEXTENCODING_ASCII_US));
+ aDlgOpt.SetWindowState(OStringToOUString(m_xAddField->getDialog()->get_window_state(vcl::WindowDataMask::Pos | vcl::WindowDataMask::State | vcl::WindowDataMask::Minimized), RTL_TEXTENCODING_ASCII_US));
if (m_xAddField->getDialog()->get_visible())
m_xAddField->response(RET_CANCEL);
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx
index ab213479b9f6..b34c8c944fd8 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -136,7 +136,7 @@ void ODesignView::dispose()
if ( m_xAddField )
{
SvtViewOptions aDlgOpt( EViewType::Window, UID_RPT_RPT_APP_VIEW );
- aDlgOpt.SetWindowState(OStringToOUString(m_xAddField->getDialog()->get_window_state(WindowStateMask::All), RTL_TEXTENCODING_ASCII_US));
+ aDlgOpt.SetWindowState(OStringToOUString(m_xAddField->getDialog()->get_window_state(vcl::WindowDataMask::All), RTL_TEXTENCODING_ASCII_US));
if (m_xAddField->getDialog()->get_visible())
m_xAddField->response(RET_CANCEL);
@@ -146,7 +146,7 @@ void ODesignView::dispose()
if ( m_xReportExplorer )
{
SvtViewOptions aDlgOpt(EViewType::Window, OStringToOUString(m_xReportExplorer->get_help_id(), RTL_TEXTENCODING_UTF8));
- aDlgOpt.SetWindowState(OStringToOUString(m_xReportExplorer->getDialog()->get_window_state(WindowStateMask::All), RTL_TEXTENCODING_ASCII_US));
+ aDlgOpt.SetWindowState(OStringToOUString(m_xReportExplorer->getDialog()->get_window_state(vcl::WindowDataMask::All), RTL_TEXTENCODING_ASCII_US));
if (m_xReportExplorer->getDialog()->get_visible())
m_xReportExplorer->response(RET_CANCEL);
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 7f20a0040c6e..7c588a99791c 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -294,7 +294,7 @@ void OReportController::disposing()
if ( m_xGroupsFloater )
{
SvtViewOptions aDlgOpt(EViewType::Window, OStringToOUString(m_xGroupsFloater->get_help_id(), RTL_TEXTENCODING_UTF8));
- aDlgOpt.SetWindowState(OStringToOUString(m_xGroupsFloater->getDialog()->get_window_state(WindowStateMask::All), RTL_TEXTENCODING_ASCII_US));
+ aDlgOpt.SetWindowState(OStringToOUString(m_xGroupsFloater->getDialog()->get_window_state(vcl::WindowDataMask::All), RTL_TEXTENCODING_ASCII_US));
if (m_xGroupsFloater->getDialog()->get_visible())
m_xGroupsFloater->response(RET_CANCEL);
m_xGroupsFloater.reset();