[Libreoffice-commits] core.git: writerfilter/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jun 30 12:33:52 UTC 2021
writerfilter/source/dmapper/NumberingManager.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 5ba64bba76ca1d23191300d1b5080cc091d432de
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Jun 29 11:28:53 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Jun 30 14:33:18 2021 +0200
tdf#135316 make regex object static const
so we only compile it once, shaves 1% off load time
Change-Id: I8e6e20205659582901ffb8d4496ce44906146204
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118157
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 62706d1a5614..764aace41808 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -687,7 +687,7 @@ void ListsManager::lcl_attribute( Id nName, Value& rVal )
// DOCX level-text contains levels definition in format "%1.%2.%3"
// we need to convert it to LO internal representation: "%1%.%2%.%3%"
- std::regex aTokenRegex("(%\\d)");
+ static const std::regex aTokenRegex("(%\\d)");
sLevelText = std::regex_replace(sLevelText, aTokenRegex, "$1%");
pCurrentLvl->SetBulletChar( OUString::fromUtf8(sLevelText) );
}
More information about the Libreoffice-commits
mailing list