diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2003-06-20 09:36:54 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2003-06-20 09:36:54 +0000 |
commit | df7d14e41ba4cf7207bc11fe8568ad37ed917dac (patch) | |
tree | 1841642fe438ba314bbfbf6e28651b1f4e7c16f2 /shell | |
parent | d40deaa0bd2c45e4375bef5d6e73bc01db529394 (diff) |
INTEGRATION: CWS setup12b (1.4.6); FILE MERGED
2003/06/18 07:35:29 dv 1.4.6.2: RESYNC: (1.4-1.5); FILE MERGED
2003/06/18 06:19:03 tra 1.4.6.1: #110274#hack for partially merged lng files, where some strings have a particular language and others don't
Diffstat (limited to 'shell')
-rw-r--r-- | shell/source/tools/lngconvex/lngconvex.cxx | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/shell/source/tools/lngconvex/lngconvex.cxx b/shell/source/tools/lngconvex/lngconvex.cxx index 899da2603b8b..fbcf0c61a809 100644 --- a/shell/source/tools/lngconvex/lngconvex.cxx +++ b/shell/source/tools/lngconvex/lngconvex.cxx @@ -613,6 +613,21 @@ inline void FileAppendRcFooter(std::ostream& os, std::istream& is) FileAppendFile(os, is); } +//########################################### +bool is_placeholder(const std::string& str) +{ + return ((str.length() > 1) && + ('%' == str[0]) && + ('%' == str[str.length() - 1])); +} + +//########################################### +void std_string_to_winrc_string(std::string& str) +{ + str = OUStringToWinResourceString( + rtl::OUString::createFromAscii(str.c_str())); +} + //------------------------------------------- /** Iterate all languages in the substitutor, replace the all placeholder and append the @@ -648,6 +663,15 @@ void InflateRcTemplateAndAppendToFile( std::string token; iss >> token; substitutor.Substitute(token); + + // #110274# HACK for partially merged + // *.lng files where some strings have + // a particular language that others + // don't have in order to keep the + // build + if (is_placeholder(token)) + std_string_to_winrc_string(token); + line += token; line += " "; } |