Use OUStringLiteral

Change-Id: I6fd5f86288b303c8e3ce1cd072368df578e5e6a9
This commit is contained in:
Stephan Bergmann 2017-02-07 22:59:33 +01:00
parent d7a2e94e65
commit 07b51bc283

View File

@ -148,26 +148,24 @@ bool handleFile(
const OString& rPotDir, bool bInitPoFile ) const OString& rPotDir, bool bInitPoFile )
{ {
struct Command { struct Command {
char const * extension; OUString extension;
sal_Int32 extensionLength;
OString executable; OString executable;
bool positive; bool positive;
}; };
static Command const commands[] = { static Command const commands[] = {
{ RTL_CONSTASCII_STRINGPARAM(".src"), "transex3", false }, { ".src", "transex3", false },
{ RTL_CONSTASCII_STRINGPARAM(".hrc"), "transex3", true }, { ".hrc", "transex3", true },
{ RTL_CONSTASCII_STRINGPARAM(".ulf"), "ulfex", false }, { ".ulf", "ulfex", false },
{ RTL_CONSTASCII_STRINGPARAM(".xcu"), "cfgex", false }, { ".xcu", "cfgex", false },
{ RTL_CONSTASCII_STRINGPARAM(".xrm"), "xrmex", false }, { ".xrm", "xrmex", false },
{ RTL_CONSTASCII_STRINGPARAM("description.xml"), "xrmex", true }, { "description.xml", "xrmex", true },
{ RTL_CONSTASCII_STRINGPARAM(".xhp"), "helpex", false }, { ".xhp", "helpex", false },
{ RTL_CONSTASCII_STRINGPARAM(".properties"), "propex", false }, { ".properties", "propex", false },
{ RTL_CONSTASCII_STRINGPARAM(".ui"), "uiex", false }, { ".ui", "uiex", false },
{ RTL_CONSTASCII_STRINGPARAM(".tree"), "treex", false } }; { ".tree", "treex", false } };
for (size_t i = 0; i != SAL_N_ELEMENTS(commands); ++i) for (size_t i = 0; i != SAL_N_ELEMENTS(commands); ++i)
{ {
if (rUrl.endsWithAsciiL( if (rUrl.endsWith(commands[i].extension) &&
commands[i].extension, commands[i].extensionLength) &&
(commands[i].executable != "propex" || rUrl.indexOf("en_US") != -1)) (commands[i].executable != "propex" || rUrl.indexOf("en_US") != -1))
{ {
if (commands[i].positive ? passesPositiveList(rUrl) : passesNegativeList(rUrl)) if (commands[i].positive ? passesPositiveList(rUrl) : passesNegativeList(rUrl))