2015-07-17 20:51:37 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <com/sun/star/chart/ChartAxisLabelPosition.hpp>
|
2018-11-30 01:31:19 +01:00
|
|
|
#include <com/sun/star/chart2/AxisOrientation.hpp>
|
2015-07-17 20:51:37 +02:00
|
|
|
|
2019-12-09 13:04:04 +00:00
|
|
|
#include <vcl/svapp.hxx>
|
2020-09-06 20:11:57 +02:00
|
|
|
#include <sal/log.hxx>
|
2019-12-09 13:04:04 +00:00
|
|
|
|
2015-07-17 20:51:37 +02:00
|
|
|
#include "ChartAxisPanel.hxx"
|
2017-10-23 22:44:16 +02:00
|
|
|
#include <ChartController.hxx>
|
2022-01-20 16:04:37 +02:00
|
|
|
#include <ChartModel.hxx>
|
2022-02-05 14:58:07 +02:00
|
|
|
#include <Axis.hxx>
|
2015-07-17 20:51:37 +02:00
|
|
|
|
|
|
|
using namespace css;
|
|
|
|
using namespace css::uno;
|
|
|
|
|
2020-01-14 15:21:18 +02:00
|
|
|
namespace chart::sidebar {
|
2015-07-17 20:51:37 +02:00
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
2022-01-20 16:04:37 +02:00
|
|
|
bool isLabelShown(const rtl::Reference<::chart::ChartModel>& xModel,
|
2022-09-20 11:27:25 +02:00
|
|
|
std::u16string_view rCID)
|
2015-07-17 20:51:37 +02:00
|
|
|
{
|
2022-02-05 14:58:07 +02:00
|
|
|
rtl::Reference< ::chart::Axis > xAxis = ObjectIdentifier::getAxisForCID(rCID, xModel);
|
2015-07-17 20:51:37 +02:00
|
|
|
|
|
|
|
if (!xAxis.is())
|
|
|
|
return false;
|
|
|
|
|
2024-05-06 18:28:51 +02:00
|
|
|
uno::Any aAny = xAxis->getPropertyValue(u"DisplayLabels"_ustr);
|
2015-07-17 20:51:37 +02:00
|
|
|
if (!aAny.hasValue())
|
|
|
|
return false;
|
|
|
|
|
|
|
|
bool bVisible = false;
|
|
|
|
aAny >>= bVisible;
|
|
|
|
return bVisible;
|
|
|
|
}
|
|
|
|
|
2022-01-20 16:04:37 +02:00
|
|
|
void setLabelShown(const rtl::Reference<::chart::ChartModel>& xModel,
|
2022-09-20 11:27:25 +02:00
|
|
|
std::u16string_view rCID, bool bVisible)
|
2015-07-17 20:51:37 +02:00
|
|
|
{
|
2022-02-05 14:58:07 +02:00
|
|
|
rtl::Reference< ::chart::Axis > xAxis = ObjectIdentifier::getAxisForCID(rCID, xModel);
|
2015-07-17 20:51:37 +02:00
|
|
|
|
|
|
|
if (!xAxis.is())
|
|
|
|
return;
|
|
|
|
|
2024-05-06 18:28:51 +02:00
|
|
|
xAxis->setPropertyValue(u"DisplayLabels"_ustr, css::uno::Any(bVisible));
|
2015-07-17 20:51:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
struct AxisLabelPosMap
|
|
|
|
{
|
|
|
|
sal_Int32 nPos;
|
|
|
|
css::chart::ChartAxisLabelPosition ePos;
|
|
|
|
};
|
|
|
|
|
2020-06-30 18:31:56 +02:00
|
|
|
AxisLabelPosMap const aLabelPosMap[] = {
|
2015-07-17 20:51:37 +02:00
|
|
|
{ 0, css::chart::ChartAxisLabelPosition_NEAR_AXIS },
|
|
|
|
{ 1, css::chart::ChartAxisLabelPosition_NEAR_AXIS_OTHER_SIDE },
|
|
|
|
{ 2, css::chart::ChartAxisLabelPosition_OUTSIDE_START },
|
|
|
|
{ 3, css::chart::ChartAxisLabelPosition_OUTSIDE_END }
|
|
|
|
};
|
|
|
|
|
2022-01-20 16:04:37 +02:00
|
|
|
sal_Int32 getLabelPosition(const rtl::Reference<::chart::ChartModel>& xModel,
|
2022-09-20 11:27:25 +02:00
|
|
|
std::u16string_view rCID)
|
2015-07-17 20:51:37 +02:00
|
|
|
{
|
2022-02-05 14:58:07 +02:00
|
|
|
rtl::Reference< ::chart::Axis > xAxis = ObjectIdentifier::getAxisForCID(rCID, xModel);
|
2015-07-17 20:51:37 +02:00
|
|
|
|
|
|
|
if (!xAxis.is())
|
|
|
|
return 0;
|
|
|
|
|
2024-05-06 18:28:51 +02:00
|
|
|
uno::Any aAny = xAxis->getPropertyValue(u"LabelPosition"_ustr);
|
2015-07-17 20:51:37 +02:00
|
|
|
if (!aAny.hasValue())
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
css::chart::ChartAxisLabelPosition ePos;
|
|
|
|
aAny >>= ePos;
|
2018-10-16 15:03:01 +02:00
|
|
|
for (AxisLabelPosMap const & i : aLabelPosMap)
|
2015-07-17 20:51:37 +02:00
|
|
|
{
|
2016-04-21 11:03:55 +02:00
|
|
|
if (i.ePos == ePos)
|
|
|
|
return i.nPos;
|
2015-07-17 20:51:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2022-01-20 16:04:37 +02:00
|
|
|
void setLabelPosition(const rtl::Reference<::chart::ChartModel>& xModel,
|
2022-09-20 11:27:25 +02:00
|
|
|
std::u16string_view rCID, sal_Int32 nPos)
|
2015-07-17 20:51:37 +02:00
|
|
|
{
|
2022-02-05 14:58:07 +02:00
|
|
|
rtl::Reference< ::chart::Axis > xAxis = ObjectIdentifier::getAxisForCID(rCID, xModel);
|
2015-07-17 20:51:37 +02:00
|
|
|
|
|
|
|
if (!xAxis.is())
|
|
|
|
return;
|
|
|
|
|
|
|
|
css::chart::ChartAxisLabelPosition ePos;
|
2018-10-16 15:03:01 +02:00
|
|
|
for (AxisLabelPosMap const & i : aLabelPosMap)
|
2015-07-17 20:51:37 +02:00
|
|
|
{
|
2016-04-21 11:03:55 +02:00
|
|
|
if (i.nPos == nPos)
|
|
|
|
ePos = i.ePos;
|
2015-07-17 20:51:37 +02:00
|
|
|
}
|
|
|
|
|
2024-05-06 18:28:51 +02:00
|
|
|
xAxis->setPropertyValue(u"LabelPosition"_ustr, css::uno::Any(ePos));
|
2015-07-17 20:51:37 +02:00
|
|
|
}
|
|
|
|
|
2022-01-20 16:04:37 +02:00
|
|
|
bool isReverse(const rtl::Reference<::chart::ChartModel>& xModel,
|
2022-09-20 11:27:25 +02:00
|
|
|
std::u16string_view rCID)
|
2015-07-17 20:51:37 +02:00
|
|
|
{
|
2022-02-08 20:41:22 +02:00
|
|
|
rtl::Reference< Axis > xAxis =
|
2019-07-19 09:50:11 +02:00
|
|
|
ObjectIdentifier::getAxisForCID(rCID, xModel);
|
2015-07-17 20:51:37 +02:00
|
|
|
|
|
|
|
if (!xAxis.is())
|
|
|
|
return false;
|
|
|
|
|
|
|
|
css::chart2::ScaleData aData = xAxis->getScaleData();
|
|
|
|
|
|
|
|
return aData.Orientation == css::chart2::AxisOrientation_REVERSE;
|
|
|
|
}
|
|
|
|
|
2022-01-20 16:04:37 +02:00
|
|
|
void setReverse(const rtl::Reference<::chart::ChartModel>& xModel,
|
2022-09-20 11:27:25 +02:00
|
|
|
std::u16string_view rCID, bool bReverse)
|
2015-07-17 20:51:37 +02:00
|
|
|
{
|
2022-02-08 20:41:22 +02:00
|
|
|
rtl::Reference< Axis > xAxis =
|
2019-07-19 09:50:11 +02:00
|
|
|
ObjectIdentifier::getAxisForCID(rCID, xModel);
|
2015-07-17 20:51:37 +02:00
|
|
|
|
|
|
|
if (!xAxis.is())
|
|
|
|
return;
|
|
|
|
|
|
|
|
css::chart2::ScaleData aData = xAxis->getScaleData();
|
|
|
|
if (bReverse)
|
|
|
|
aData.Orientation = css::chart2::AxisOrientation_REVERSE;
|
|
|
|
else
|
|
|
|
aData.Orientation = css::chart2::AxisOrientation_MATHEMATICAL;
|
|
|
|
|
|
|
|
xAxis->setScaleData(aData);
|
|
|
|
}
|
|
|
|
|
2016-04-12 10:50:29 +02:00
|
|
|
OUString getCID(const css::uno::Reference<css::frame::XModel>& xModel)
|
2015-07-17 20:51:37 +02:00
|
|
|
{
|
|
|
|
css::uno::Reference<css::frame::XController> xController(xModel->getCurrentController());
|
|
|
|
css::uno::Reference<css::view::XSelectionSupplier> xSelectionSupplier(xController, css::uno::UNO_QUERY);
|
|
|
|
if (!xSelectionSupplier.is())
|
|
|
|
return OUString();
|
|
|
|
|
|
|
|
uno::Any aAny = xSelectionSupplier->getSelection();
|
|
|
|
assert(aAny.hasValue());
|
|
|
|
OUString aCID;
|
|
|
|
aAny >>= aCID;
|
2018-11-22 15:51:18 +01:00
|
|
|
#if defined DBG_UTIL && !defined NDEBUG
|
2015-07-17 20:51:37 +02:00
|
|
|
ObjectType eType = ObjectIdentifier::getObjectType(aCID);
|
2020-09-06 20:11:57 +02:00
|
|
|
if(eType != OBJECTTYPE_AXIS)
|
|
|
|
SAL_WARN("chart2","Selected item is not an axis");
|
2015-07-17 20:51:37 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
return aCID;
|
|
|
|
}
|
|
|
|
|
2022-01-20 16:04:37 +02:00
|
|
|
void setAxisRotation(const rtl::Reference<::chart::ChartModel>& xModel,
|
2022-09-20 11:27:25 +02:00
|
|
|
std::u16string_view rCID, double nVal)
|
2015-10-23 00:34:55 +02:00
|
|
|
{
|
2022-02-05 14:58:07 +02:00
|
|
|
rtl::Reference< ::chart::Axis > xAxis =
|
|
|
|
ObjectIdentifier::getAxisForCID(rCID, xModel);
|
2015-10-23 00:34:55 +02:00
|
|
|
|
|
|
|
if (!xAxis.is())
|
|
|
|
return;
|
|
|
|
|
2024-05-06 18:28:51 +02:00
|
|
|
xAxis->setPropertyValue(u"TextRotation"_ustr, css::uno::Any(nVal));
|
2015-10-23 00:34:55 +02:00
|
|
|
}
|
|
|
|
|
2022-01-20 16:04:37 +02:00
|
|
|
double getAxisRotation(const rtl::Reference<::chart::ChartModel>& xModel,
|
2022-09-20 11:27:25 +02:00
|
|
|
std::u16string_view rCID)
|
2015-10-23 00:34:55 +02:00
|
|
|
{
|
2022-02-05 14:58:07 +02:00
|
|
|
rtl::Reference< ::chart::Axis > xAxis =
|
|
|
|
ObjectIdentifier::getAxisForCID(rCID, xModel);
|
2015-10-23 00:34:55 +02:00
|
|
|
|
|
|
|
if (!xAxis.is())
|
|
|
|
return 0;
|
|
|
|
|
2024-05-06 18:28:51 +02:00
|
|
|
css::uno::Any aAny = xAxis->getPropertyValue(u"TextRotation"_ustr);
|
2015-10-23 00:34:55 +02:00
|
|
|
double nVal = 0;
|
|
|
|
aAny >>= nVal;
|
|
|
|
return nVal;
|
|
|
|
}
|
|
|
|
|
2015-07-17 20:51:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
ChartAxisPanel::ChartAxisPanel(
|
2021-03-04 17:22:14 +00:00
|
|
|
weld::Widget* pParent,
|
2015-07-17 20:51:37 +02:00
|
|
|
ChartController* pController)
|
2024-05-06 18:28:51 +02:00
|
|
|
: PanelLayout(pParent, u"ChartAxisPanel"_ustr, u"modules/schart/ui/sidebaraxis.ui"_ustr)
|
|
|
|
, mxCBShowLabel(m_xBuilder->weld_check_button(u"checkbutton_show_label"_ustr))
|
|
|
|
, mxCBReverse(m_xBuilder->weld_check_button(u"checkbutton_reverse"_ustr))
|
|
|
|
, mxLBLabelPos(m_xBuilder->weld_combo_box(u"comboboxtext_label_position"_ustr))
|
|
|
|
, mxGridLabel(m_xBuilder->weld_widget(u"label_props"_ustr))
|
|
|
|
, mxNFRotation(m_xBuilder->weld_metric_spin_button(u"spinbutton1"_ustr, FieldUnit::DEGREE))
|
2022-01-20 16:04:37 +02:00
|
|
|
, mxModel(pController->getChartModel())
|
2019-12-20 15:06:23 +00:00
|
|
|
, mxModifyListener(new ChartSidebarModifyListener(this))
|
|
|
|
, mxSelectionListener(new ChartSidebarSelectionListener(this, OBJECTTYPE_AXIS))
|
|
|
|
, mbModelValid(true)
|
2015-07-17 20:51:37 +02:00
|
|
|
{
|
|
|
|
Initialize();
|
|
|
|
}
|
|
|
|
|
|
|
|
ChartAxisPanel::~ChartAxisPanel()
|
|
|
|
{
|
2021-05-19 17:36:48 +01:00
|
|
|
doUpdateModel(nullptr);
|
2015-07-17 20:51:37 +02:00
|
|
|
|
2019-12-20 15:06:23 +00:00
|
|
|
mxCBShowLabel.reset();
|
|
|
|
mxCBReverse.reset();
|
2015-07-17 20:51:37 +02:00
|
|
|
|
2019-12-20 15:06:23 +00:00
|
|
|
mxLBLabelPos.reset();
|
|
|
|
mxGridLabel.reset();
|
2015-07-17 20:51:37 +02:00
|
|
|
|
2019-12-20 15:06:23 +00:00
|
|
|
mxNFRotation.reset();
|
2015-07-17 20:51:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void ChartAxisPanel::Initialize()
|
|
|
|
{
|
2022-01-20 16:04:37 +02:00
|
|
|
mxModel->addModifyListener(mxModifyListener);
|
2015-07-23 16:20:36 +02:00
|
|
|
|
|
|
|
css::uno::Reference<css::view::XSelectionSupplier> xSelectionSupplier(mxModel->getCurrentController(), css::uno::UNO_QUERY);
|
|
|
|
if (xSelectionSupplier.is())
|
|
|
|
xSelectionSupplier->addSelectionChangeListener(mxSelectionListener);
|
2015-07-17 20:51:37 +02:00
|
|
|
|
|
|
|
updateData();
|
|
|
|
|
2021-05-20 17:27:49 +01:00
|
|
|
Link<weld::Toggleable&,void> aLink = LINK(this, ChartAxisPanel, CheckBoxHdl);
|
2019-12-20 15:06:23 +00:00
|
|
|
mxCBShowLabel->connect_toggled(aLink);
|
|
|
|
mxCBReverse->connect_toggled(aLink);
|
2015-07-17 20:51:37 +02:00
|
|
|
|
2019-12-20 15:06:23 +00:00
|
|
|
Link<weld::MetricSpinButton&, void> aSpinButtonLink = LINK(this, ChartAxisPanel, TextRotationHdl);
|
|
|
|
mxNFRotation->connect_value_changed(aSpinButtonLink);
|
2015-10-23 00:34:55 +02:00
|
|
|
|
2019-12-20 15:06:23 +00:00
|
|
|
mxLBLabelPos->connect_changed(LINK(this, ChartAxisPanel, ListBoxHdl));
|
2015-07-17 20:51:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void ChartAxisPanel::updateData()
|
|
|
|
{
|
2015-07-31 17:34:56 +02:00
|
|
|
if (!mbModelValid)
|
|
|
|
return;
|
|
|
|
|
2015-07-17 20:51:37 +02:00
|
|
|
OUString aCID = getCID(mxModel);
|
2020-09-06 20:11:57 +02:00
|
|
|
ObjectType eType = ObjectIdentifier::getObjectType(aCID);
|
|
|
|
if (eType!=OBJECTTYPE_AXIS)
|
|
|
|
return;
|
|
|
|
|
2015-07-17 20:51:37 +02:00
|
|
|
SolarMutexGuard aGuard;
|
|
|
|
|
2019-12-20 15:06:23 +00:00
|
|
|
mxCBShowLabel->set_active(isLabelShown(mxModel, aCID));
|
|
|
|
mxCBReverse->set_active(isReverse(mxModel, aCID));
|
2015-07-17 21:29:06 +02:00
|
|
|
|
2019-12-20 15:06:23 +00:00
|
|
|
mxLBLabelPos->set_active(getLabelPosition(mxModel, aCID));
|
|
|
|
mxNFRotation->set_value(getAxisRotation(mxModel, aCID), FieldUnit::DEGREE);
|
2015-07-17 20:51:37 +02:00
|
|
|
}
|
|
|
|
|
2021-03-04 17:22:14 +00:00
|
|
|
std::unique_ptr<PanelLayout> ChartAxisPanel::Create (
|
|
|
|
weld::Widget* pParent,
|
2015-07-17 20:51:37 +02:00
|
|
|
ChartController* pController)
|
|
|
|
{
|
2015-11-10 10:11:17 +01:00
|
|
|
if (pParent == nullptr)
|
2024-05-06 18:28:51 +02:00
|
|
|
throw lang::IllegalArgumentException(u"no parent Window given to ChartAxisPanel::Create"_ustr, nullptr, 0);
|
2021-03-04 17:22:14 +00:00
|
|
|
return std::make_unique<ChartAxisPanel>(pParent, pController);
|
2015-07-17 20:51:37 +02:00
|
|
|
}
|
|
|
|
|
2021-03-04 17:22:14 +00:00
|
|
|
void ChartAxisPanel::DataChanged(const DataChangedEvent& rEvent)
|
2015-07-17 20:51:37 +02:00
|
|
|
{
|
2021-03-04 17:22:14 +00:00
|
|
|
PanelLayout::DataChanged(rEvent);
|
2015-07-17 20:51:37 +02:00
|
|
|
updateData();
|
|
|
|
}
|
|
|
|
|
|
|
|
void ChartAxisPanel::HandleContextChange(
|
2016-06-17 23:54:00 +02:00
|
|
|
const vcl::EnumContext& )
|
2015-07-17 20:51:37 +02:00
|
|
|
{
|
|
|
|
updateData();
|
|
|
|
}
|
|
|
|
|
|
|
|
void ChartAxisPanel::NotifyItemUpdate(
|
|
|
|
sal_uInt16 /*nSID*/,
|
|
|
|
SfxItemState /*eState*/,
|
2019-10-18 11:45:12 +02:00
|
|
|
const SfxPoolItem* /*pState*/ )
|
2015-07-17 20:51:37 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void ChartAxisPanel::modelInvalid()
|
|
|
|
{
|
2015-07-31 17:34:56 +02:00
|
|
|
mbModelValid = false;
|
2015-07-17 20:51:37 +02:00
|
|
|
}
|
|
|
|
|
2023-12-07 09:12:15 +00:00
|
|
|
void ChartAxisPanel::doUpdateModel(const rtl::Reference<::chart::ChartModel>& xModel)
|
2015-07-23 01:20:45 +02:00
|
|
|
{
|
2015-07-31 17:34:56 +02:00
|
|
|
if (mbModelValid)
|
|
|
|
{
|
2022-01-20 16:04:37 +02:00
|
|
|
mxModel->removeModifyListener(mxModifyListener);
|
2015-07-23 01:20:45 +02:00
|
|
|
|
2021-05-19 17:36:48 +01:00
|
|
|
css::uno::Reference<css::view::XSelectionSupplier> oldSelectionSupplier(
|
|
|
|
mxModel->getCurrentController(), css::uno::UNO_QUERY);
|
|
|
|
if (oldSelectionSupplier.is()) {
|
|
|
|
oldSelectionSupplier->removeSelectionChangeListener(mxSelectionListener);
|
|
|
|
}
|
updateModel must remove the SelectionChangeListener from the old controller
...and not just add it to the new controller. It caused
> $ SAL_USE_VCLPLUGIN=gen make UITest_chart UITEST_TEST_NAME=chartLegend.chartLegend.test_chart_display_legend_dialog
to fail with
> ==346284==ERROR: AddressSanitizer: heap-use-after-free on address 0x61a00049cca8 at pc 0x7f8496747751 bp 0x7fff7c483f10 sp 0x7fff7c483f08
> READ of size 8 at 0x61a00049cca8 thread T0
> #0 in chart::sidebar::ChartSidebarSelectionListener::selectionChanged(com::sun::star::lang::EventObject const&) at chart2/source/controller/sidebar/ChartSidebarSelectionListener.cxx:66:15
> #1 in chart::ChartController::impl_notifySelectionChangeListeners() at chart2/source/controller/main/ChartController_Window.cxx:1740:28
> #2 in chart::ChartController::impl_selectObjectAndNotiy() at chart2/source/controller/main/ChartController_Window.cxx:1756:5
> #3 in chart::ChartController::modeChanged(com::sun::star::util::ModeChangeEvent const&) at chart2/source/controller/main/ChartController.cxx:538:31
> #4 in chart::ChartView::impl_notifyModeChangeListener(rtl::OUString const&) at chart2/source/view/main/ChartView.cxx:2653:32
> #5 in chart::ChartView::impl_updateView(bool) at chart2/source/view/main/ChartView.cxx:2561:9
> #6 in chart::ChartView::update() at chart2/source/view/main/ChartView.cxx:2687:5
> #7 in chart::ChartController::execute_Paint(OutputDevice&, tools::Rectangle const&) at chart2/source/controller/main/ChartController_Window.cxx:485:25
> #8 in chart::ChartWindow::Paint(OutputDevice&, tools::Rectangle const&) at chart2/source/controller/main/ChartWindow.cxx:99:30
> #9 in PaintHelper::DoPaint(vcl::Region const*) at vcl/source/window/paint.cxx:309:24
> #10 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:613:17
> #11 in PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:549:30
> #12 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:619:1
> #13 in PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:549:30
> #14 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:619:1
> #15 in PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:549:30
> #16 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:619:1
> #17 in PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:549:30
> #18 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:619:1
> #19 in PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:549:30
> #20 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:619:1
> #21 in PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:549:30
> #22 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:619:1
> #23 in PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:549:30
> #24 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:619:1
> #25 in PaintHelper::~PaintHelper() at vcl/source/window/paint.cxx:549:30
> #26 in vcl::Window::ImplCallPaint(vcl::Region const*, ImplPaintFlags) at vcl/source/window/paint.cxx:619:1
> #27 in vcl::Window::ImplCallOverlapPaint() at vcl/source/window/paint.cxx:637:9
> #28 in vcl::Window::ImplHandlePaintHdl(Timer*) at vcl/source/window/paint.cxx:660:9
> #29 in vcl::Window::LinkStubImplHandlePaintHdl(void*, Timer*) at vcl/source/window/paint.cxx:641:1
> #30 in Link<Timer*, void>::Call(Timer*) const at include/tools/link.hxx:111:45
> #31 in Timer::Invoke() at vcl/source/app/timer.cxx:75:21
> #32 in Scheduler::ProcessTaskScheduling() at vcl/source/app/scheduler.cxx:478:20
> #33 in Scheduler::CallbackTaskScheduling() at vcl/source/app/scheduler.cxx:287:5
> #34 in SalTimer::CallCallback() at vcl/inc/saltimer.hxx:54:13
> #35 in X11SalData::Timeout() at vcl/unx/generic/app/saldata.cxx:551:41
> #36 in SalXLib::CheckTimeout(bool) at vcl/unx/generic/app/saldata.cxx:635:17
> #37 in SalXLib::Yield(bool, bool) at vcl/unx/generic/app/saldata.cxx:716:25
> #38 in X11SalInstance::DoYield(bool, bool) at vcl/unx/generic/app/salinst.cxx:182:20
> #39 in ImplYield(bool, bool) at vcl/source/app/svapp.cxx:454:48
> #40 in Application::Yield() at vcl/source/app/svapp.cxx:518:5
> #41 in Application::Execute() at vcl/source/app/svapp.cxx:433:9
> #42 in desktop::Desktop::Main() at desktop/source/app/app.cxx:1602:17
> #43 in ImplSVMain() at vcl/source/app/svmain.cxx:196:35
> #44 in SVMain() at vcl/source/app/svmain.cxx:228:12
> #45 in soffice_main at desktop/source/app/sofficemain.cxx:107:12
> #46 in sal_main at desktop/source/app/main.c:48:15
> #47 in main at desktop/source/app/main.c:47:1
> 0x61a00049cca8 is located 1064 bytes inside of 1160-byte region [0x61a00049c880,0x61a00049cd08)
> freed by thread T0 here:
> #0 in operator delete(void*, unsigned long) at compiler-rt/lib/asan/asan_new_delete.cpp:172:3
> #1 in chart::sidebar::ChartLinePanel::~ChartLinePanel() at chart2/source/controller/sidebar/ChartLinePanel.cxx:143:1
> #2 in VclReferenceBase::release() const at include/vcl/vclreferencebase.hxx:40:13
> #3 in rtl::Reference<vcl::Window>::~Reference() at include/rtl/ref.hxx:92:22
> #4 in VclPtr<vcl::Window>::disposeAndClear() at include/vcl/vclptr.hxx:208:5
> #5 in sfx2::sidebar::SidebarPanelBase::disposing() at sfx2/source/sidebar/SidebarPanelBase.cxx:81:15
> #6 in cppu::WeakComponentImplHelperBase::dispose() at cppuhelper/source/implbase.cxx:102:17
> #7 in cppu::PartialWeakComponentImplHelper<com::sun::star::ui::XContextChangeEventListener, com::sun::star::ui::XUIElement, com::sun::star::ui::XToolPanel, com::sun::star::ui::XSidebarPanel, com::sun::star::ui::XUpdateModel>::dispose() at include/cppuhelper/compbase.hxx:90:36
> #8 in sfx2::sidebar::Panel::dispose() at sfx2/source/sidebar/Panel.cxx:106:25
> #9 in VclReferenceBase::disposeOnce() at vcl/source/outdev/vclreferencebase.cxx:38:5
> #10 in VclPtr<sfx2::sidebar::Panel>::disposeAndClear() at include/vcl/vclptr.hxx:206:19
> #11 in sfx2::sidebar::Deck::dispose() at sfx2/source/sidebar/Deck.cxx:92:17
> #12 in VclReferenceBase::disposeOnce() at vcl/source/outdev/vclreferencebase.cxx:38:5
> #13 in VclPtr<sfx2::sidebar::Deck>::disposeAndClear() at include/vcl/vclptr.hxx:206:19
> #14 in sfx2::sidebar::SidebarController::CreateDeck(rtl::OUString const&, sfx2::sidebar::Context const&, bool) at sfx2/source/sidebar/SidebarController.cxx:664:19
> #15 in sfx2::sidebar::SidebarController::SwitchToDeck(sfx2::sidebar::DeckDescriptor const&, sfx2::sidebar::Context const&) at sfx2/source/sidebar/SidebarController.cxx:822:5
> #16 in sfx2::sidebar::SidebarController::UpdateConfigurations() at sfx2/source/sidebar/SidebarController.cxx:569:9
> #17 in sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, SfxViewFrame const*)::$_3::operator()() const at sfx2/source/sidebar/SidebarController.cxx:140:52
> #18 in void std::__invoke_impl<void, sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, SfxViewFrame const*)::$_3&>(std::__invoke_other, sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, SfxViewFrame const*)::$_3&) at include/c++/10.0.1/bits/invoke.h:60:14
> #19 in std::enable_if<is_invocable_r_v<void, sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, SfxViewFrame const*)::$_3&>, void>::type std::__invoke_r<void, sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, SfxViewFrame const*)::$_3&>(sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, SfxViewFrame const*)::$_3&) at include/c++/10.0.1/bits/invoke.h:110:2
> #20 in std::_Function_handler<void (), sfx2::sidebar::SidebarController::SidebarController(sfx2::sidebar::SidebarDockingWindow*, SfxViewFrame const*)::$_3>::_M_invoke(std::_Any_data const&) at include/c++/10.0.1/bits/std_function.h:291:9
> #21 in std::function<void ()>::operator()() const at include/c++/10.0.1/bits/std_function.h:622:14
> #22 in sfx2::sidebar::AsynchronousCall::HandleUserCall(void*) at sfx2/source/sidebar/AsynchronousCall.cxx:66:9
> #23 in sfx2::sidebar::AsynchronousCall::LinkStubHandleUserCall(void*, void*) at sfx2/source/sidebar/AsynchronousCall.cxx:62:1
> #24 in Link<void*, void>::Call(void*) const at include/tools/link.hxx:111:45
> #25 in ImplHandleUserEvent(ImplSVEvent*) at vcl/source/window/winproc.cxx:2009:30
> #26 in ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) at vcl/source/window/winproc.cxx:2562:13
> #27 in SalFrame::CallCallback(SalEvent, void const*) const at vcl/inc/salframe.hxx:306:29
> #28 in SalGenericDisplay::ProcessEvent(SalUserEventList::SalUserEvent) at vcl/unx/generic/app/gendisp.cxx:66:22
> #29 in SalUserEventList::DispatchUserEvents(bool) at vcl/source/app/salusereventlist.cxx:108:17
> #30 in SalGenericDisplay::DispatchInternalEvent(bool) at vcl/unx/generic/app/gendisp.cxx:51:12
> #31 in SalX11Display::Yield() at vcl/unx/generic/app/saldisp.cxx:1918:9
> #32 in DisplayYield(int, void*) at vcl/unx/generic/app/saldisp.cxx:414:13
> #33 in (anonymous namespace)::YieldEntry::HandleNextEvent() const at vcl/unx/generic/app/saldata.cxx:566:38
> #34 in SalXLib::Yield(bool, bool) at vcl/unx/generic/app/saldata.cxx:662:25
> #35 in X11SalInstance::DoYield(bool, bool) at vcl/unx/generic/app/salinst.cxx:182:20
> #36 in ImplYield(bool, bool) at vcl/source/app/svapp.cxx:454:48
> #37 in Application::Yield() at vcl/source/app/svapp.cxx:518:5
> #38 in Dialog::Execute() at vcl/source/window/dialog.cxx:1032:9
> #39 in SalInstanceDialog::run() at vcl/source/app/salvtables.cxx:1480:23
> #40 in weld::DialogController::run() at include/vcl/weld.hxx:2196:47
> #41 in chart::ChartController::executeDispatch_OpenLegendDialog() at chart2/source/controller/main/ChartController_Insert.cxx:227:18
> #42 in chart::ChartController::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at chart2/source/controller/main/ChartController.cxx:1130:15
> #43 in ChartUIObject::PostCommand(void*) at chart2/source/controller/uitest/uiobject.cxx:76:41
> #44 in ChartUIObject::LinkStubPostCommand(void*, void*) at chart2/source/controller/uitest/uiobject.cxx:72:1
> #45 in Link<void*, void>::Call(void*) const at include/tools/link.hxx:111:45
> #46 in ImplHandleUserEvent(ImplSVEvent*) at vcl/source/window/winproc.cxx:2009:30
> #47 in ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) at vcl/source/window/winproc.cxx:2562:13
> #48 in SalFrame::CallCallback(SalEvent, void const*) const at vcl/inc/salframe.hxx:306:29
> #49 in SalGenericDisplay::ProcessEvent(SalUserEventList::SalUserEvent) at vcl/unx/generic/app/gendisp.cxx:66:22
> #50 in SalUserEventList::DispatchUserEvents(bool) at vcl/source/app/salusereventlist.cxx:108:17
> #51 in SalGenericDisplay::DispatchInternalEvent(bool) at vcl/unx/generic/app/gendisp.cxx:51:12
> #52 in SalX11Display::Yield() at vcl/unx/generic/app/saldisp.cxx:1918:9
> #53 in DisplayYield(int, void*) at vcl/unx/generic/app/saldisp.cxx:414:13
> #54 in (anonymous namespace)::YieldEntry::HandleNextEvent() const at vcl/unx/generic/app/saldata.cxx:566:38
> #55 in SalXLib::Yield(bool, bool) at vcl/unx/generic/app/saldata.cxx:662:25
> #56 in X11SalInstance::DoYield(bool, bool) at vcl/unx/generic/app/salinst.cxx:182:20
> #57 in ImplYield(bool, bool) at vcl/source/app/svapp.cxx:454:48
> #58 in Application::Reschedule(bool) at vcl/source/app/svapp.cxx:467:12
> #59 in (anonymous namespace)::ExecuteWrapper::ExecuteActionHdl(Timer*) at vcl/source/uitest/uno/uiobject_uno.cxx:91:13
> #60 in (anonymous namespace)::ExecuteWrapper::LinkStubExecuteActionHdl(void*, Timer*) at vcl/source/uitest/uno/uiobject_uno.cxx:78:1
> #61 in Link<Timer*, void>::Call(Timer*) const at include/tools/link.hxx:111:45
> #62 in Timer::Invoke() at vcl/source/app/timer.cxx:75:21
> #63 in Scheduler::ProcessTaskScheduling() at vcl/source/app/scheduler.cxx:478:20
> #64 in Scheduler::CallbackTaskScheduling() at vcl/source/app/scheduler.cxx:287:5
> #65 in SalTimer::CallCallback() at vcl/inc/saltimer.hxx:54:13
> #66 in X11SalData::Timeout() at vcl/unx/generic/app/saldata.cxx:551:41
> #67 in SalXLib::CheckTimeout(bool) at vcl/unx/generic/app/saldata.cxx:635:17
> #68 in SalXLib::Yield(bool, bool) at vcl/unx/generic/app/saldata.cxx:716:25
> #69 in X11SalInstance::DoYield(bool, bool) at vcl/unx/generic/app/salinst.cxx:182:20
> #70 in ImplYield(bool, bool) at vcl/source/app/svapp.cxx:454:48
> #71 in Application::Yield() at vcl/source/app/svapp.cxx:518:5
> #72 in Application::Execute() at vcl/source/app/svapp.cxx:433:9
> #73 in desktop::Desktop::Main() at desktop/source/app/app.cxx:1602:17
> #74 in ImplSVMain() at vcl/source/app/svmain.cxx:196:35
> #75 in SVMain() at vcl/source/app/svmain.cxx:228:12
> #76 in soffice_main at desktop/source/app/sofficemain.cxx:107:12
> #77 in sal_main at desktop/source/app/main.c:48:15
> #78 in main at desktop/source/app/main.c:47:1
> previously allocated by thread T0 here:
> #0 in operator new(unsigned long) at compiler-rt/lib/asan/asan_new_delete.cpp:99:3
> #1 in VclPtr<chart::sidebar::ChartLinePanel> VclPtr<chart::sidebar::ChartLinePanel>::Create<vcl::Window*&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, chart::ChartController*&>(vcl::Window*&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, chart::ChartController*&) at include/vcl/vclptr.hxx:129:42
> #2 in chart::sidebar::ChartLinePanel::Create(vcl::Window*, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, chart::ChartController*) at chart2/source/controller/sidebar/ChartLinePanel.cxx:117:12
> #3 in chart::sidebar::ChartPanelFactory::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at chart2/source/controller/sidebar/Chart2PanelFactory.cxx:107:22
> #4 in non-virtual thunk to chart::sidebar::ChartPanelFactory::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at chart2/source/controller/sidebar/Chart2PanelFactory.cxx
> #5 in (anonymous namespace)::UIElementFactoryManager::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/uifactory/uielementfactorymanager.cxx:437:39
> #6 in non-virtual thunk to (anonymous namespace)::UIElementFactoryManager::createUIElement(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/uifactory/uielementfactorymanager.cxx
> #7 in sfx2::sidebar::SidebarController::CreateUIElement(com::sun::star::uno::Reference<com::sun::star::awt::XWindowPeer> const&, rtl::OUString const&, bool, sfx2::sidebar::Context const&) at sfx2/source/sidebar/SidebarController.cxx:967:32
> #8 in sfx2::sidebar::SidebarController::CreatePanel(rtl::OUString const&, vcl::Window*, bool, sfx2::sidebar::Context const&, VclPtr<sfx2::sidebar::Deck> const&) at sfx2/source/sidebar/SidebarController.cxx:908:43
> #9 in sfx2::sidebar::SidebarController::CreatePanels(rtl::OUString const&, sfx2::sidebar::Context const&) at sfx2/source/sidebar/SidebarController.cxx:720:41
> #10 in sfx2::sidebar::SidebarController::CreateDeck(rtl::OUString const&, sfx2::sidebar::Context const&, bool) at sfx2/source/sidebar/SidebarController.cxx:672:5
> #11 in sfx2::sidebar::SidebarController::SwitchToDeck(sfx2::sidebar::DeckDescriptor const&, sfx2::sidebar::Context const&) at sfx2/source/sidebar/SidebarController.cxx:822:5
> #12 in sfx2::sidebar::SidebarController::UpdateConfigurations() at sfx2/source/sidebar/SidebarController.cxx:569:9
> #13 in sfx2::sidebar::SidebarController::notifyContextChangeEvent(com::sun::star::ui::ContextChangeEventObject const&) at sfx2/source/sidebar/SidebarController.cxx:323:9
> #14 in (anonymous namespace)::ContextChangeEventMultiplexer::addContextChangeEventListener(com::sun::star::uno::Reference<com::sun::star::ui::XContextChangeEventListener> const&, com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&) at framework/source/services/ContextChangeEventMultiplexer.cxx:176:29
> #15 in sfx2::sidebar::SidebarController::registerSidebarForFrame(sfx2::sidebar::SidebarController*, com::sun::star::uno::Reference<com::sun::star::frame::XController> const&) at sfx2/source/sidebar/SidebarController.cxx:213:19
> #16 in chart::ChartController::attachFrame(com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) at chart2/source/controller/main/ChartController.cxx:400:9
> #17 in chart::ChartFrameLoader::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) at chart2/source/controller/main/ChartFrameloader.cxx:133:22
> #18 in framework::LoadEnv::impl_loadContent() at framework/source/loadenv/loadenv.cxx:1157:37
> #19 in framework::LoadEnv::start() at framework/source/loadenv/loadenv.cxx:395:20
> #20 in framework::LoadEnv::startLoading(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, rtl::OUString const&, int, LoadEnvFeatures) at framework/source/loadenv/loadenv.cxx:300:5
> #21 in framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/loadenv/loadenv.cxx:169:14
> #22 in (anonymous namespace)::XFrameImpl::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/services/frame.cxx:590:16
> #23 in non-virtual thunk to (anonymous namespace)::XFrameImpl::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at framework/source/services/frame.cxx
> #24 in DocumentHolder::LoadDocToFrame(bool) at embeddedobj/source/general/docholder.cxx:984:31
> #25 in DocumentHolder::ShowInplace(com::sun::star::uno::Reference<com::sun::star::awt::XWindowPeer> const&, com::sun::star::awt::Rectangle const&, com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider> const&) at embeddedobj/source/general/docholder.cxx:477:15
> #26 in OCommonEmbeddedObject::SwitchStateTo_Impl(int) at embeddedobj/source/commonembedding/embedobj.cxx:252:42
> #27 in OCommonEmbeddedObject::changeState(int) at embeddedobj/source/commonembedding/embedobj.cxx:451:17
> #28 in OCommonEmbeddedObject::doVerb(int) at embeddedobj/source/commonembedding/embedobj.cxx:537:9
> #29 in SfxInPlaceClient::DoVerb(long) at sfx2/source/view/ipclient.cxx:950:40
> #30 in ScTabViewShell::ActivateObject(SdrOle2Obj*, long) at sc/source/ui/view/tabvwshb.cxx:205:29
> #31 in ScGridWinUIObject::execute(rtl::OUString const&, std::__debug::map<rtl::OUString const, rtl::OUString, std::less<rtl::OUString const>, std::allocator<std::pair<rtl::OUString const, rtl::OUString> > > const&) at sc/source/ui/uitest/uiobject.cxx:175:29
> #32 in UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0::operator()() const at vcl/source/uitest/uno/uiobject_uno.cxx:124:16
> #33 in void std::__invoke_impl<void, UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&>(std::__invoke_other, UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&) at include/c++/10.0.1/bits/invoke.h:60:14
> #34 in std::enable_if<is_invocable_r_v<void, UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&>, void>::type std::__invoke_r<void, UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&>(UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0&) at include/c++/10.0.1/bits/invoke.h:110:2
> #35 in std::_Function_handler<void (), UIObjectUnoObj::executeAction(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&)::$_0>::_M_invoke(std::_Any_data const&) at include/c++/10.0.1/bits/std_function.h:291:9
> #36 in std::function<void ()>::operator()() const at include/c++/10.0.1/bits/std_function.h:622:14
> #37 in (anonymous namespace)::ExecuteWrapper::ExecuteActionHdl(Timer*) at vcl/source/uitest/uno/uiobject_uno.cxx:83:13
> #38 in (anonymous namespace)::ExecuteWrapper::LinkStubExecuteActionHdl(void*, Timer*) at vcl/source/uitest/uno/uiobject_uno.cxx:78:1
> #39 in Link<Timer*, void>::Call(Timer*) const at include/tools/link.hxx:111:45
> #40 in Timer::Invoke() at vcl/source/app/timer.cxx:75:21
> #41 in Scheduler::ProcessTaskScheduling() at vcl/source/app/scheduler.cxx:478:20
> #42 in Scheduler::CallbackTaskScheduling() at vcl/source/app/scheduler.cxx:287:5
> #43 in SalTimer::CallCallback() at vcl/inc/saltimer.hxx:54:13
> #44 in X11SalData::Timeout() at vcl/unx/generic/app/saldata.cxx:551:41
> #45 in SalXLib::CheckTimeout(bool) at vcl/unx/generic/app/saldata.cxx:635:17
> #46 in SalXLib::Yield(bool, bool) at vcl/unx/generic/app/saldata.cxx:716:25
> #47 in X11SalInstance::DoYield(bool, bool) at vcl/unx/generic/app/salinst.cxx:182:20
> #48 in ImplYield(bool, bool) at vcl/source/app/svapp.cxx:454:48
> #49 in Application::Yield() at vcl/source/app/svapp.cxx:518:5
> #50 in Application::Execute() at vcl/source/app/svapp.cxx:433:9
> #51 in desktop::Desktop::Main() at desktop/source/app/app.cxx:1602:17
> #52 in ImplSVMain() at vcl/source/app/svmain.cxx:196:35
> #53 in SVMain() at vcl/source/app/svmain.cxx:228:12
> #54 in soffice_main at desktop/source/app/sofficemain.cxx:107:12
> #55 in sal_main at desktop/source/app/main.c:48:15
> #56 in main at desktop/source/app/main.c:47:1
The changes that were necessary to fix that scenario are those in
ChartAreaPanel.cxx and ChartLinePanel.cxx, but the other updateModel
implementations look equally broken.
Change-Id: I064fb701dc10e7cb7ef7ea5839f7dd1ae8d0ebba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91467
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-04-01 10:39:04 +02:00
|
|
|
}
|
|
|
|
|
2015-07-23 01:20:45 +02:00
|
|
|
mxModel = xModel;
|
2021-05-19 17:36:48 +01:00
|
|
|
mbModelValid = mxModel.is();
|
|
|
|
|
|
|
|
if (!mbModelValid)
|
|
|
|
return;
|
2015-07-23 01:20:45 +02:00
|
|
|
|
2022-01-20 16:04:37 +02:00
|
|
|
mxModel->addModifyListener(mxModifyListener);
|
2015-07-23 16:20:36 +02:00
|
|
|
|
|
|
|
css::uno::Reference<css::view::XSelectionSupplier> xSelectionSupplier(mxModel->getCurrentController(), css::uno::UNO_QUERY);
|
|
|
|
if (xSelectionSupplier.is())
|
|
|
|
xSelectionSupplier->addSelectionChangeListener(mxSelectionListener);
|
|
|
|
}
|
|
|
|
|
2021-05-19 17:36:48 +01:00
|
|
|
void ChartAxisPanel::updateModel(css::uno::Reference<css::frame::XModel> xModel)
|
|
|
|
{
|
2022-01-20 16:04:37 +02:00
|
|
|
::chart::ChartModel* pModel = dynamic_cast<::chart::ChartModel*>(xModel.get());
|
|
|
|
assert(!xModel || pModel);
|
|
|
|
doUpdateModel(pModel);
|
2021-05-19 17:36:48 +01:00
|
|
|
}
|
|
|
|
|
2015-07-23 16:20:36 +02:00
|
|
|
void ChartAxisPanel::selectionChanged(bool bCorrectType)
|
|
|
|
{
|
|
|
|
if (bCorrectType)
|
|
|
|
updateData();
|
|
|
|
}
|
|
|
|
|
2021-05-20 17:27:49 +01:00
|
|
|
IMPL_LINK(ChartAxisPanel, CheckBoxHdl, weld::Toggleable&, rCheckbox, void)
|
2015-07-17 20:51:37 +02:00
|
|
|
{
|
|
|
|
OUString aCID = getCID(mxModel);
|
2019-12-20 15:06:23 +00:00
|
|
|
bool bChecked = rCheckbox.get_active();
|
2015-07-17 20:51:37 +02:00
|
|
|
|
2019-12-20 15:06:23 +00:00
|
|
|
if (&rCheckbox == mxCBShowLabel.get())
|
2015-07-29 15:55:54 +02:00
|
|
|
{
|
2019-12-20 15:06:23 +00:00
|
|
|
mxGridLabel->set_sensitive(bChecked);
|
2015-07-17 20:51:37 +02:00
|
|
|
setLabelShown(mxModel, aCID, bChecked);
|
2015-07-29 15:55:54 +02:00
|
|
|
}
|
2019-12-20 15:06:23 +00:00
|
|
|
else if (&rCheckbox == mxCBReverse.get())
|
2015-07-17 20:51:37 +02:00
|
|
|
setReverse(mxModel, aCID, bChecked);
|
|
|
|
}
|
|
|
|
|
2019-12-20 15:06:23 +00:00
|
|
|
IMPL_LINK_NOARG(ChartAxisPanel, ListBoxHdl, weld::ComboBox&, void)
|
2015-07-17 20:51:37 +02:00
|
|
|
{
|
|
|
|
OUString aCID = getCID(mxModel);
|
2019-12-20 15:06:23 +00:00
|
|
|
sal_Int32 nPos = mxLBLabelPos->get_active();
|
2015-07-17 20:51:37 +02:00
|
|
|
|
|
|
|
setLabelPosition(mxModel, aCID, nPos);
|
|
|
|
}
|
|
|
|
|
2019-12-20 15:06:23 +00:00
|
|
|
IMPL_LINK(ChartAxisPanel, TextRotationHdl, weld::MetricSpinButton&, rMetricField, void)
|
2015-10-23 00:34:55 +02:00
|
|
|
{
|
|
|
|
OUString aCID = getCID(mxModel);
|
2019-12-20 15:06:23 +00:00
|
|
|
double nVal = rMetricField.get_value(FieldUnit::DEGREE);
|
2015-10-23 00:34:55 +02:00
|
|
|
setAxisRotation(mxModel, aCID, nVal);
|
|
|
|
}
|
|
|
|
|
2020-01-14 15:21:18 +02:00
|
|
|
} // end of namespace ::chart::sidebar
|
2015-07-17 20:51:37 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|