diff options
author | Henry Castro <hcastro@collabora.com> | 2019-10-24 16:46:09 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2019-10-25 02:31:15 +0200 |
commit | 2d748207d343bf97fac34261cafeaefd9d5fc74f (patch) | |
tree | e69fcfcb45828788ba4e6d143c38c96e58f8326c /sd | |
parent | 628a64895455efe2252fecdee270d08987e295c1 (diff) |
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/81483
Tested-by: Jenkins
Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/sidebar/SlideBackground.cxx | 11 | ||||
-rw-r--r-- | sd/source/ui/sidebar/SlideBackground.hxx | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx index f6f520d0bf38..68f670f923a3 100644 --- a/sd/source/ui/sidebar/SlideBackground.cxx +++ b/sd/source/ui/sidebar/SlideBackground.cxx @@ -231,6 +231,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 a78a1a9b5723..3a48860b7d78 100644 --- a/sd/source/ui/sidebar/SlideBackground.hxx +++ b/sd/source/ui/sidebar/SlideBackground.hxx @@ -70,6 +70,7 @@ public: const SfxPoolItem* pState) override; virtual void HandleContextChange( const vcl::EnumContext& rContext) override; + virtual boost::property_tree::ptree DumpAsPropertyTree() override; private: |