[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sd/source

Henry Castro (via logerrit) logerrit at kemper.freedesktop.org
Fri Oct 25 00:31:52 UTC 2019


 sd/source/ui/sidebar/SlideBackground.cxx |   11 +++++++++++
 sd/source/ui/sidebar/SlideBackground.hxx |    1 +
 2 files changed, 12 insertions(+)

New commits:
commit 1512734da8a1b3a447ea92da280e7a802e09ff74
Author:     Henry Castro <hcastro at collabora.com>
AuthorDate: Thu Oct 24 16:46:09 2019 -0400
Commit:     Henry Castro <hcastro at collabora.com>
CommitDate: Fri Oct 25 02:30:54 2019 +0200

    lok: ensure that the paper size list box control has selected items in
    
    the slide background panel.
    
    When a client side request the property tree data on the background
    panel the paper size list control has no selected items yet.
    
    I was tempted to force update the selected item in "Slide Background::
    Initialize", however, I am not sure why it is not initialized the list box.
    This is done after an asynchronous update, maybe it is because the
    impress document is not initialized yet. anybody knows?.
    
    I prefer not to have side effects, so let's force initialization on in
    the tiled rendering case when the function SlideBackground::DumpAsPropertyTree is called.
    
    Change-Id: I596b75da46f2180342cb50bde03ee0ff1d414f05
    Reviewed-on: https://gerrit.libreoffice.org/81481
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Henry Castro <hcastro at collabora.com>

diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx
index 5628d851597d..1b25b1bcdbe7 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -248,6 +248,17 @@ void SlideBackground::Initialize()
     UpdateMarginBox();
 }
 
+boost::property_tree::ptree SlideBackground::DumpAsPropertyTree()
+{
+    if (mpPaperSizeBox->GetSelectedEntryCount() == 0)
+    {
+        mpBindings->Update(SID_ATTR_PAGE_SIZE);
+    }
+
+    boost::property_tree::ptree aTree(Control::DumpAsPropertyTree());
+    return aTree;
+}
+
 void SlideBackground::HandleContextChange(
     const vcl::EnumContext& rContext)
 {
diff --git a/sd/source/ui/sidebar/SlideBackground.hxx b/sd/source/ui/sidebar/SlideBackground.hxx
index 136e8cbdc556..4c09bdaca757 100644
--- a/sd/source/ui/sidebar/SlideBackground.hxx
+++ b/sd/source/ui/sidebar/SlideBackground.hxx
@@ -77,6 +77,7 @@ public:
         const bool bIsEnabled) override;
     virtual void HandleContextChange(
         const vcl::EnumContext& rContext) override;
+    virtual boost::property_tree::ptree DumpAsPropertyTree() override;
 
 private:
 


More information about the Libreoffice-commits mailing list