From 08dc46adc1aa50deb645f7548a264e084d17f5f0 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 2 Jan 2021 17:16:02 +0000 Subject: remove support for deprecated GtkAlignment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I29e21e9e4d9b80b8c8e331ed9cce76b2e7fe0f68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108689 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- bin/find-can-be-private-symbols.classes.results | 1 - bin/find-mergedlib-can-be-private.classes.results | 1 - bin/gla11y | 1 - bin/lint-ui.py | 11 ----- include/vcl/layout.hxx | 22 ---------- vcl/source/window/builder.cxx | 2 - vcl/source/window/layout.cxx | 52 ----------------------- 7 files changed, 90 deletions(-) diff --git a/bin/find-can-be-private-symbols.classes.results b/bin/find-can-be-private-symbols.classes.results index fa75e6edb01b..0ddaeba94322 100644 --- a/bin/find-can-be-private-symbols.classes.results +++ b/bin/find-can-be-private-symbols.classes.results @@ -147,7 +147,6 @@ SyntaxHighlighter::Tokenizer SystemWindow::ImplData TBCExtraInfo TBCGeneralInfo -VclAlignment VclBin VclBuilder::MenuAndId VclBuilder::ParserState diff --git a/bin/find-mergedlib-can-be-private.classes.results b/bin/find-mergedlib-can-be-private.classes.results index 77df8bb4457e..7a05b3697567 100644 --- a/bin/find-mergedlib-can-be-private.classes.results +++ b/bin/find-mergedlib-can-be-private.classes.results @@ -197,7 +197,6 @@ VCLXEdit VCLXMenuBar VCLXSpinField ValueSet -VclAlignment VclBin VclBuilder::MenuAndId VclBuilder::ParserState diff --git a/bin/gla11y b/bin/gla11y index 7883a6233199..7376f672d866 100755 --- a/bin/gla11y +++ b/bin/gla11y @@ -85,7 +85,6 @@ widgets_ignored = widgets_toplevel + [ 'GtkExpander', 'GtkViewport', 'GtkScrolledWindow', - 'GtkAlignment', 'GtkRevealer', 'GtkSearchBar', 'GtkHeaderBar', diff --git a/bin/lint-ui.py b/bin/lint-ui.py index 7bbf46a2a113..c04eba63bb76 100755 --- a/bin/lint-ui.py +++ b/bin/lint-ui.py @@ -142,17 +142,6 @@ def check_frames(root): if len(frame_alignments) > 0: lint_assert(False, "Deprecated GtkAlignment in GtkFrame with id = '" + frame.attrib['id'] + "'", frame) -def check_alignment_top_padding(alignment): - top_padding_properties = alignment.findall("./property[@name='top_padding']") - assert len(top_padding_properties) <= 1 - # TODO reenable when we are ready to fix - # if len(top_padding_properties) < 1: - # lint_assert(False, "No GtkAlignment 'top_padding' set. Should probably be " + ALIGNMENT_TOP_PADDING, alignment) - #if len(top_padding_properties) == 1: - # top_padding = top_padding_properties[0] - # lint_assert(top_padding.text == ALIGNMENT_TOP_PADDING, - # "GtkAlignment 'top_padding' should be " + ALIGNMENT_TOP_PADDING, alignment) - def check_title_labels(root): labels = root.findall(".//child[@type='label']") for label in labels: diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx index 5c4a60c4f5e8..9a896915b1ed 100644 --- a/include/vcl/layout.hxx +++ b/include/vcl/layout.hxx @@ -449,28 +449,6 @@ private: virtual OUString getDefaultAccessibleName() const override; }; -class UNLESS_MERGELIBS(VCL_DLLPUBLIC) VclAlignment final : public VclBin -{ -public: - VclAlignment(vcl::Window *pParent) - : VclBin(pParent) - , m_nBottomPadding(0) - , m_nLeftPadding(0) - , m_nRightPadding(0) - , m_nTopPadding(0) - { - } - virtual bool set_property(const OString &rKey, const OUString &rValue) override; - virtual void DumpAsPropertyTree(tools::JsonWriter&) override; -private: - virtual Size calculateRequisition() const override; - virtual void setAllocation(const Size &rAllocation) override; - sal_Int32 m_nBottomPadding; - sal_Int32 m_nLeftPadding; - sal_Int32 m_nRightPadding; - sal_Int32 m_nTopPadding; -}; - class DisclosureButton; class CheckBox; diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 7834d9f9deed..7456e4bbfece 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -1857,8 +1857,6 @@ VclPtr VclBuilder::makeObject(vcl::Window *pParent, const OString & m_pParserState->m_aExpanderWidgets.push_back(pExpander); xWindow = pExpander; } - else if (name == "GtkAlignment") - xWindow = VclPtr::Create(pParent); else if (name == "GtkButton" || (!m_bLegacy && name == "GtkToggleButton")) { VclPtr