chart2/source/controller/chartapiwrapper/TitleWrapper.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 9661b094e10602148c3cf68bcce01f4a6714bedd
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Sun Mar 17 09:31:22 2024 +0100
Commit:     Julien Nabet <serval2...@yahoo.fr>
CommitDate: Sun Mar 17 11:14:23 2024 +0100

    tdf#160225, related tdf#92768: hide axis title not taken into account 
when...
    
    duplicating sheet or when saving a file and reopen it.
    
    When creating a title for an axis, "createTitle" is called.
    Before tdf#92768 "support hiding title objects", when unchecking "axis 
title" in sidebar,
    the title was removed (via "removeTitle")
    But since tdf#92768, "hideTitle" is called instead.
    
    The pb is "Visible" attribute wasn't registered in 
StaticTitleWrapperPropertyArray.
    So when duplicating sheet after having created a title and hidden it,
    when duplicating sheet, the new sheet had the title visible.
    In the same way if, after having created a title and hidden it,
    you save the file and reopen it, the title is displayed.
    
    Change-Id: I980505ec02906e673dd60a60e4d9837928bf8876
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164938
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>

diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
index 75d6c9e98f1f..9c802462ff09 100644
--- a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
@@ -127,6 +127,7 @@ namespace
 enum
 {
     PROP_TITLE_STRING,
+    PROP_TITLE_VISIBLE,
     PROP_TITLE_TEXT_ROTATION,
     PROP_TITLE_TEXT_STACKED
 };
@@ -140,6 +141,12 @@ void lcl_AddPropertiesToVector(
                   beans::PropertyAttribute::BOUND
                   | beans::PropertyAttribute::MAYBEVOID );
 
+    rOutProperties.emplace_back( "Visible",
+                  PROP_TITLE_VISIBLE,
+                  cppu::UnoType<OUString>::get(),
+                  beans::PropertyAttribute::BOUND
+                  | beans::PropertyAttribute::MAYBEVOID );
+
     rOutProperties.emplace_back( "TextRotation",
                   PROP_TITLE_TEXT_ROTATION,
                   cppu::UnoType<sal_Int32>::get(),

Reply via email to