summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2024-08-02 08:23:45 +0200
committerMiklos Vajna <vmiklos@collabora.com>2024-08-02 10:37:31 +0200
commitcfd3b14fd4e1ee889dd356523e5cdaa639786d37 (patch)
tree18e100bbb76dd242fb8c5ae3eabec02eb80800ed /sw/inc
parente747986af4dbb6b48957092dadce26a95b910a82 (diff)
tdf#162295 DOCX import: optimize the check if the header/footer is empty
The original DOCX bugdoc has some 813 shapes and 150 sections, which means that isContentEmpty() in the domain mapper is a significant cost. We don't have layout at import time, so checking if a shape has its anchor in this header/footer is still expensive, but using internal sw API makes the 2 other checks constant and the shape check is faster this way. - old cost: 16638 ms - new cost: 11910 ms (72% of baseline) Change-Id: I22f75ef82b0e2f618e425e076377eea3640b83cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171390 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/cmdid.h1
-rw-r--r--sw/inc/unoprnms.hxx1
2 files changed, 2 insertions, 0 deletions
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index bd36f0bdd3b3..1e2cc3d10991 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -678,6 +678,7 @@ class SwUINumRuleItem;
#define FN_UNO_GRAPHIC_PREVIEW (FN_EXTRA2 + 130)
#define FN_UNO_LINEBREAK (FN_EXTRA2 + 131)
#define FN_UNO_CONTENT_CONTROL (FN_EXTRA2 + 132)
+#define FN_UNO_IS_CONTENT_EMPTY (FN_EXTRA2 + 133)
// Area: Help
// Region: Traveling & Selection
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 7ed25b929247..e3d7e073c24d 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -939,6 +939,7 @@ inline constexpr OUString UNO_NAME_DATE_STRING = u"DateString"_ustr;
inline constexpr OUString UNO_NAME_PARA_ID = u"ParaId"_ustr;
inline constexpr OUString UNO_NAME_PARA_ID_PARENT = u"ParaIdParent"_ustr;
inline constexpr OUString UNO_NAME_CONTENT_CONTROL_TYPE = u"ContentControlType"_ustr;
+inline constexpr OUString UNO_NAME_IS_CONTENT_EMPTY = u"IsContentEmpty"_ustr;
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */