diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-01-17 17:24:35 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-01-18 09:14:42 +0100 |
commit | 4a0f506f0d8c2a017f0cf880481d3c0c32a48909 (patch) | |
tree | 21f5bca49a9e1a76d95164b005dc4aa9b6b6f25c /framework/source/loadenv | |
parent | c407574416bca2360c4121930c6c6700e82092e3 (diff) |
framework: disable layout manager in hidden frames
The point of hidden frames is that they are not visible on the UI, only their
doc model / layout is accessible via the API or file format conversion. That
means that laying out the UI elements like menus and toolbars is pointless.
So change Frame::initialize() and Frame::setLayoutManager() to not enable the
layout manager for hidden frames. To do this, we need a new window style flag,
as both hidden and visible frames have an underlying hidden window at the time
the framework layout manager would be enabled.
Times for 200 hello world inputs: 5780 -> 5054 ms is spent in XHTML-load + ODT
export + close (87% of original).
Change-Id: I841507bbb62f8fc2979d20e2d579d0bb47b98f37
Reviewed-on: https://gerrit.libreoffice.org/48068
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'framework/source/loadenv')
-rw-r--r-- | framework/source/loadenv/loadenv.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 6fd8f5b54061..d5819ebb6675 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -87,6 +87,7 @@ #include <vcl/svapp.hxx> #include <cppuhelper/implbase.hxx> #include <comphelper/profilezone.hxx> +#include <classes/taskcreator.hxx> const char PROP_TYPES[] = "Types"; const char PROP_NAME[] = "Name"; @@ -989,7 +990,8 @@ bool LoadEnv::impl_loadContent() { if (! impl_furtherDocsAllowed()) return false; - m_xTargetFrame = m_xBaseFrame->findFrame(SPECIALTARGET_BLANK, 0); + TaskCreator aCreator(m_xContext); + m_xTargetFrame = aCreator.createTask(SPECIALTARGET_BLANK, m_lMediaDescriptor); m_bCloseFrameOnError = m_xTargetFrame.is(); } else |