hwpfilter/source/hwpeq.cxx | 16 ++++++++-------- officecfg/registry/data/org/openoffice/Setup.xcu | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-)
New commits: commit a27e9e32ca9d67402706d1d970f3aaa04d746904 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Apr 24 12:54:51 2023 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Apr 24 16:04:29 2023 +0200 tdf#154698 allow "XML Form Document" to be localized like "Base: Relation Design" can be Change-Id: Ic4bebd0636da1eb598e667f7aa51b201ecf9cc27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150935 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/officecfg/registry/data/org/openoffice/Setup.xcu b/officecfg/registry/data/org/openoffice/Setup.xcu index bc1a855e216c..cb7c13ebe715 100644 --- a/officecfg/registry/data/org/openoffice/Setup.xcu +++ b/officecfg/registry/data/org/openoffice/Setup.xcu @@ -404,7 +404,7 @@ <value>swxform</value> </prop> <prop oor:name="ooSetupFactoryUIName"> - <value>XML Form Document</value> + <value xml:lang="en-US">XML Form Document</value> </prop> <prop oor:name="ooSetupFactoryWindowStateConfigRef"> <value>XFormsWindowState</value> commit 3e3a220a1516fae7a038aec63388c97c8cc5c694 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Apr 24 09:41:05 2023 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Apr 24 16:04:19 2023 +0200 cid#1524749 Copy into fixed size buffer Change-Id: I0a4d11fc15c9e7603f6c46c2075373722722b437 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150905 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/hwpfilter/source/hwpeq.cxx b/hwpfilter/source/hwpeq.cxx index 71e3f8984d25..93469f68828f 100644 --- a/hwpfilter/source/hwpeq.cxx +++ b/hwpfilter/source/hwpeq.cxx @@ -708,17 +708,17 @@ static char eq2ltxconv(OString& sstr, std::istream *strm, const char *sentinel) make_keyword(key, token); const hwpeq *eq = nullptr; if( (eq = lookup_eqn(key)) != nullptr ) { + const bool bUpperFollowingChar = ( (eq->flag & EQ_CASE) + && rtl::isAsciiUpperCase(static_cast<unsigned char>(token[0])) ); + if( eq->latex ) - strcpy(key, eq->latex); + token = eq->latex; else { - key[0] = '\\'; - strcpy(key + 1, eq->key); + token = OString::Concat("\\") + eq->key; } - if( (eq->flag & EQ_CASE) - && rtl::isAsciiUpperCase(static_cast<unsigned char>(token[0])) ) - key[1] = sal::static_int_cast<char>( - rtl::toAsciiUpperCase(static_cast<unsigned char>(key[1]))); - token = key; + + if (bUpperFollowingChar) + token = token.replaceAt(1, 1, token.copy(1, 1).toAsciiUpperCase()); } if( token[0] == '{' ) { // grouping