summaryrefslogtreecommitdiff
path: root/include/vcl/window.hxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-01-17 17:24:35 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-01-18 09:14:42 +0100
commit4a0f506f0d8c2a017f0cf880481d3c0c32a48909 (patch)
tree21f5bca49a9e1a76d95164b005dc4aa9b6b6f25c /include/vcl/window.hxx
parentc407574416bca2360c4121930c6c6700e82092e3 (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 'include/vcl/window.hxx')
-rw-r--r--include/vcl/window.hxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 34dca718c4c0..528ba110bd04 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -470,9 +470,14 @@ enum class WindowExtendedStyle {
NONE = 0x0000,
Document = 0x0001,
DocModified = 0x0002,
+ /**
+ * This is a frame window that is requested to be hidden (not just "not yet
+ * shown").
+ */
+ DocHidden = 0x0004,
};
namespace o3tl {
- template<> struct typed_flags<WindowExtendedStyle> : is_typed_flags<WindowExtendedStyle, 0x0003> {};
+ template<> struct typed_flags<WindowExtendedStyle> : is_typed_flags<WindowExtendedStyle, 0x0007> {};
};
namespace vcl {