From ec6fe7d32d1433589124a45afa4accd7caaf030c Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 2 Mar 2021 14:12:20 +0000 Subject: make Analog Clock sidebar extension demo work MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit from... https://wiki.openoffice.org/wiki/Sidebar_for_Developers#Example:_Analog_Clock_Extension http://people.apache.org/~af/clock/AnalogClock.oxt presumably compatibility was broken at: commit e66be44b69ee2a1b99bda32af93ea453c669b319 Date: Sun Jun 2 04:46:58 2013 +0200 sidebar: Restrict the minimal width of the sidebar. Change-Id: Id1531d4531a3e9bceb3d37a9e74a7a06497098e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111868 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- sfx2/source/sidebar/DeckLayouter.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'sfx2') diff --git a/sfx2/source/sidebar/DeckLayouter.cxx b/sfx2/source/sidebar/DeckLayouter.cxx index f90ec176b2d0..bebc75e726ad 100644 --- a/sfx2/source/sidebar/DeckLayouter.cxx +++ b/sfx2/source/sidebar/DeckLayouter.cxx @@ -433,7 +433,16 @@ void GetRequestedSizes ( << " Maximum: " << rItem.maLayoutSize.Maximum); } - sal_Int32 nWidth = xPanel->getMinimalWidth(); + sal_Int32 nWidth = rMinimalWidth; + try + { + // The demo sidebar extension "Analog Clock" fails with + // java.lang.AbstractMethodError here + nWidth = xPanel->getMinimalWidth(); + } + catch (...) + { + } uno::Reference xDesktop = frame::Desktop::create(comphelper::getProcessComponentContext()); -- cgit