diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-01-02 17:16:02 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-01-06 20:34:00 +0100 |
commit | 08dc46adc1aa50deb645f7548a264e084d17f5f0 (patch) | |
tree | 3a5e4a604fc4293d892c1fdca1e9306b8ab179af | |
parent | bd14c414082236c4be8fef8eb488afbd3dd481c6 (diff) |
remove support for deprecated GtkAlignment
Change-Id: I29e21e9e4d9b80b8c8e331ed9cce76b2e7fe0f68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108689
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | bin/find-can-be-private-symbols.classes.results | 1 | ||||
-rw-r--r-- | bin/find-mergedlib-can-be-private.classes.results | 1 | ||||
-rwxr-xr-x | bin/gla11y | 1 | ||||
-rwxr-xr-x | bin/lint-ui.py | 11 | ||||
-rw-r--r-- | include/vcl/layout.hxx | 22 | ||||
-rw-r--r-- | vcl/source/window/builder.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/layout.cxx | 52 |
7 files changed, 0 insertions, 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<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString & m_pParserState->m_aExpanderWidgets.push_back(pExpander); xWindow = pExpander; } - else if (name == "GtkAlignment") - xWindow = VclPtr<VclAlignment>::Create(pParent); else if (name == "GtkButton" || (!m_bLegacy && name == "GtkToggleButton")) { VclPtr<Button> xButton; diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 1c503194b5ae..499ea856799d 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -1534,58 +1534,6 @@ void VclFrame::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) rJsonWriter.put("type", "frame"); } -Size VclAlignment::calculateRequisition() const -{ - Size aRet(m_nLeftPadding + m_nRightPadding, - m_nTopPadding + m_nBottomPadding); - - const vcl::Window *pChild = get_child(); - if (pChild && pChild->IsVisible()) - { - Size aChildSize = getLayoutRequisition(*pChild); - aRet.AdjustWidth(aChildSize.Width() ); - aRet.AdjustHeight(aChildSize.Height() ); - } - - return aRet; -} - -void VclAlignment::setAllocation(const Size &rAllocation) -{ - vcl::Window *pChild = get_child(); - if (!pChild || !pChild->IsVisible()) - return; - - Point aChildPos(m_nLeftPadding, m_nTopPadding); - - Size aAllocation; - aAllocation.setWidth( rAllocation.Width() - (m_nLeftPadding + m_nRightPadding) ); - aAllocation.setHeight( rAllocation.Height() - (m_nTopPadding + m_nBottomPadding) ); - - setLayoutAllocation(*pChild, aChildPos, aAllocation); -} - -bool VclAlignment::set_property(const OString &rKey, const OUString &rValue) -{ - if (rKey == "bottom-padding") - m_nBottomPadding = rValue.toInt32(); - else if (rKey == "left-padding") - m_nLeftPadding = rValue.toInt32(); - else if (rKey == "right-padding") - m_nRightPadding = rValue.toInt32(); - else if (rKey == "top-padding") - m_nTopPadding = rValue.toInt32(); - else - return VclBin::set_property(rKey, rValue); - return true; -} - -void VclAlignment::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) -{ - VclContainer::DumpAsPropertyTree(rJsonWriter); - rJsonWriter.put("type", "alignment"); -} - class DisclosureButton final : public CheckBox { virtual void ImplDrawCheckBoxState(vcl::RenderContext& rRenderContext) override |