https://bugs.documentfoundation.org/show_bug.cgi?id=160225
Julien Nabet <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] See Also| |https://bugs.documentfounda | |tion.org/show_bug.cgi?id=92 | |768 --- Comment #3 from Julien Nabet <[email protected]> --- On pc Debian x86-64 with master sources updated today, I could reproduce this. I noticed that if I don't use sidebar but "Insert Axis Title" from right click in chart then removed X Axis Title/Y Axis Title by clicking on the title and typed DEL, "duplicate sheet" was ok. "Insert Axis Title" is done with "createTitle" which is called from: #0 chart::TitleHelper::createTitle(chart::TitleHelper::eTitleType, rtl::OUString const&, rtl::Reference<chart::ChartModel> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, chart::ReferenceSizeProvider*) (eTitleType=chart::TitleHelper::X_AXIS_TITLE, rTitleText="X Axis Title", xModel=rtl::Reference to 0x55bd93a4dde0, xContext=uno::Reference to (cppu::(anonymous namespace)::ComponentContext *) 0x55bd90a7d8f8, pRefSizeProvider=0x7fffd867eea0) at chart2/source/tools/TitleHelper.cxx:206 #1 0x00007f1439ab7222 in chart::ChartController::executeDispatch_InsertAxisTitle() (this=0x55bd9a2ff0c0) at chart2/source/controller/main/ChartController_Insert.cxx:844 #2 0x00007f1439a96c0d in chart::ChartController::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (this=0x55bd9a2ff0c0, rURL=..., rArgs=empty uno::Sequence) at chart2/source/controller/main/ChartController.cxx:1217 #3 0x00007f1439b3bdd3 in chart::ControllerCommandDispatch::dispatch(com::sun::star::util::URL const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (this=0x55bd9837d8a0, URL=..., Arguments=empty uno::Sequence) at chart2/source/controller/main/ControllerCommandDispatch.cxx:777 Removing title is done with "removeTitle" called from: #0 chart::TitleHelper::removeTitle(chart::TitleHelper::eTitleType, rtl::Reference<chart::ChartModel> const&) (nTitleIndex=chart::TitleHelper::X_AXIS_TITLE, xModel=rtl::Reference to 0x55bd93a4dde0) at chart2/source/tools/TitleHelper.cxx:384 #1 0x00007f1439ad3dae in chart::ChartController::executeDispatch_Delete() (this=0x55bd9a2ff0c0) at chart2/source/controller/main/ChartController_Tools.cxx:621 #2 0x00007f1439aec211 in chart::ChartController::execute_KeyInput(KeyEvent const&) (this=0x55bd9a2ff0c0, rKEvt=...) at chart2/source/controller/main/ChartController_Window.cxx:1602 #3 0x00007f1439b16c54 in chart::ChartWindow::KeyInput(KeyEvent const&) (this=0x55bd9ac5bf60, rKEvt=...) at chart2/source/controller/main/ChartWindow.cxx:176 But when using sidebar "createTitle" is called from: #0 chart::TitleHelper::createTitle(chart::TitleHelper::eTitleType, rtl::OUString const&, rtl::Reference<chart::ChartModel> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, chart::ReferenceSizeProvider*) (eTitleType=chart::TitleHelper::X_AXIS_TITLE, rTitleText="Title", xModel=rtl::Reference to 0x55bd93a4dde0, xContext=uno::Reference to (cppu::(anonymous namespace)::ComponentContext *) 0x55bd90a7d8f8, pRefSizeProvider=0x0) at chart2/source/tools/TitleHelper.cxx:206 #1 0x00007f143a36ca69 in chart::TitleHelper::createOrShowTitle(chart::TitleHelper::eTitleType, rtl::OUString const&, rtl::Reference<chart::ChartModel> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (eTitleType=chart::TitleHelper::X_AXIS_TITLE, rTitleText="Title", xModel=rtl::Reference to 0x55bd93a4dde0, xContext=uno::Reference to (cppu::(anonymous namespace)::ComponentContext *) 0x55bd90a7d8f8) at chart2/source/tools/TitleHelper.cxx:195 #2 0x00007f1439b959b7 in chart::sidebar::ChartElementsPanel::setTitleVisible(chart::TitleHelper::eTitleType, bool) (this=0x55bd9a754650, eTitle=chart::TitleHelper::X_AXIS_TITLE, bVisible=true) at chart2/source/controller/sidebar/ChartElementsPanel.cxx:653 #3 0x00007f1439b95060 in chart::sidebar::ChartElementsPanel::CheckBoxHdl(weld::Toggleable&) (this=0x55bd9a754650, rCheckBox=...) at chart2/source/controller/sidebar/ChartElementsPanel.cxx:593 and "removeTitle" never called because we call "hideTitle" instead from: 648 void ChartElementsPanel::setTitleVisible(TitleHelper::eTitleType eTitle, bool bVisible) 649 { 650 if (bVisible) 651 { 652 OUString aText = eTitle == TitleHelper::SUB_TITLE ? maTextSubTitle : maTextTitle; 653 TitleHelper::createOrShowTitle(eTitle, aText, mxModel, comphelper::getProcessComponentContext()); 654 } 655 else 656 { 657 TitleHelper::hideTitle(eTitle, mxModel); 658 } 659 } See https://opengrok.libreoffice.org/xref/core/chart2/source/controller/sidebar/ChartElementsPanel.cxx?r=950d8b64#657 If we call removeTitle instead, it works. But hideTitle has been add with tdf#92768 so we don't lose the text and the formatting. So the goal is to find the find to set the visibility of the title to true or false when duplicating sheet. -- You are receiving this mail because: You are the assignee for the bug.
