28 printf(
"file generated=%s\n", pcFile);
29 m_f = fopen(pcFile,
"w");
39 fprintf(
m_f,
"%d", nb);
44 fprintf(
m_f,
"%x", nb);
49 fprintf(
m_f,
"%s", str);
54 for(
size_t i = 0;
i < str.size();
i++)
55 fprintf(
m_f,
"0x%x, ", str[
i]);
60 for(
size_t i = 0;
i < str.size();
i++)
61 fprintf(
m_f,
"\\x%04x", str[
i]);
67 const char* locale = aRefLocale.getStr();
68 fprintf(
m_f,
"extern const OUString * SAL_CALL %s%s(sal_Int16& count);\n", func, locale);
69 fprintf(
m_f,
"const OUString * SAL_CALL %s%s(sal_Int16& count)\n{\n", func,
theLocale.c_str());
70 fprintf(
m_f,
"\treturn %s%s(count);\n}\n", func, locale);
76 const char* locale = aRefLocale.getStr();
77 fprintf(
m_f,
"extern OUString const * SAL_CALL %s%s(sal_Int16& count, const sal_Unicode*& from, const sal_Unicode*& to);\n", func, locale);
78 fprintf(
m_f,
"OUString const * SAL_CALL %s%s(sal_Int16& count, const sal_Unicode*& from, const sal_Unicode*& to)\n{\n", func,
theLocale.c_str());
79 fprintf(
m_f,
"\tto = %s;\n",
to);
80 fprintf(
m_f,
"\tconst sal_Unicode* tmp;\n");
81 fprintf(
m_f,
"\treturn %s%s(count, from, tmp);\n}\n", func, locale);
86 fprintf(
m_f,
"OUString const * SAL_CALL %s%s(sal_Int16& count)\n{\n", func,
theLocale.c_str());
87 fprintf(
m_f,
"\tcount = %s;\n",
count);
88 fprintf(
m_f,
"\treturn (OUString const *)%s;\n}\n", array);
93 fprintf(
m_f,
"OUString const * SAL_CALL %s%s(sal_Int16& count, const sal_Unicode*& from, const sal_Unicode*& to)\n{\n", func,
theLocale.c_str());
94 fprintf(
m_f,
"\tcount = %s;\n",
count);
95 fprintf(
m_f,
"\tfrom = %s;\n",
from);
96 fprintf(
m_f,
"\tto = %s;\n",
to);
97 fprintf(
m_f,
"\treturn (const OUString *)%s;\n}\n", array);
102 fprintf(
m_f,
"const OUString ** SAL_CALL %s%s( sal_Int16& nStyles, sal_Int16& nAttributes )\n{\n", func,
theLocale.c_str());
103 fprintf(
m_f,
"\tnStyles = %s;\n", style);
104 fprintf(
m_f,
"\tnAttributes = %s;\n", attr);
105 fprintf(
m_f,
"\treturn (const OUString **)%s;\n}\n", array);
111 const char* locale = aRefLocale.getStr();
112 fprintf(
m_f,
"extern const OUString ** SAL_CALL %s%s(sal_Int16& nStyles, sal_Int16& nAttributes);\n", func, locale);
113 fprintf(
m_f,
"const OUString ** SAL_CALL %s%s(sal_Int16& nStyles, sal_Int16& nAttributes)\n{\n", func,
theLocale.c_str());
114 fprintf(
m_f,
"\treturn %s%s(nStyles, nAttributes);\n}\n", func, locale);
119 fprintf(
m_f,
"const OUString *** SAL_CALL %s%s( sal_Int16& nStyles, sal_Int16& nLevels, sal_Int16& nAttributes )\n{\n", func,
theLocale.c_str());
120 fprintf(
m_f,
"\tnStyles = %s;\n", style);
121 fprintf(
m_f,
"\tnLevels = %s;\n", levels);
122 fprintf(
m_f,
"\tnAttributes = %s;\n", attr);
123 fprintf(
m_f,
"\treturn (const OUString ***) %s;\n}\n", array);
129 const char* locale = aRefLocale.getStr();
130 fprintf(
m_f,
"extern const OUString *** SAL_CALL %s%s(sal_Int16& nStyles, sal_Int16& nLevels, sal_Int16& nAttributes);\n", func, locale);
131 fprintf(
m_f,
"const OUString *** SAL_CALL %s%s(sal_Int16& nStyles, sal_Int16& nLevels, sal_Int16& nAttributes)\n{\n", func,
theLocale.c_str());
132 fprintf(
m_f,
"\treturn %s%s(nStyles, nLevels, nAttributes);\n}\n", func, locale);
137 fprintf(
m_f,
"static constexpr OUStringLiteral %s%d = u\"\\x%x\";\n", pAsciiStr,
count, val);
142 bool bBool = str ==
u"true";
143 fprintf(
m_f,
"static constexpr OUStringLiteral default%s%d = u\"\\x%x\";\n", pAsciiStr,
count, bBool);
149 fprintf(
m_f,
"static constexpr OUStringLiteral %s = u\"", pAsciiStr);
151 fprintf(
m_f,
"\";\n");
156 fprintf(
m_f,
"static const sal_Unicode %s%d[] = {", pAsciiStr,
count);
158 fprintf(
m_f,
"0x0};\n");
163 fprintf(
m_f,
"static constexpr OUStringLiteral %s%d = u\"", pAsciiStr,
count);
165 fprintf(
m_f,
"\";\n");
170 fprintf(
m_f,
"static constexpr OUStringLiteral %s%d%d = u\"", pAsciiStr, count0, count1);
172 fprintf(
m_f,
"\";\n");
177 fprintf(
m_f,
"static constexpr OUStringLiteral %s%s%d = u\"", pTagStr, pAsciiStr,
count);
179 fprintf(
m_f,
"\";\n");
184 fprintf(
m_f,
"static constexpr OUStringLiteral %s%s%d%d = u\"", pTagStr, pAsciiStr, count0, count1);
186 fprintf(
m_f,
"\";\n");
void writeOUStringRefFunction(const char *func, std::u16string_view useLocale) const
void writeOUStringFunction3(const char *func, const char *style, const char *levels, const char *attr, const char *array) const
void writeOUStringFunction2(const char *func, const char *style, const char *attr, const char *array) const
void writeOUStringLiteralIntParameter(const char *pAsciiStr, const sal_Int16 count, sal_Int16 val) const
bool writeOUStringLiteralDefaultParameter(const char *pAsciiStr, std::u16string_view str, sal_Int16 count) const
void writeOUStringLiteralParameter(const char *pAsciiStr, std::u16string_view aChars) const
void writeOUStringRefFunction3(const char *func, std::u16string_view useLocale) const
void writeOUStringLiteralCharacters(std::u16string_view str) const
void writeOUStringFunction(const char *func, const char *count, const char *array) const
void writeStringCharacters(std::u16string_view str) const
void writeAsciiString(const char *str) const
void writeInt(sal_Int16 nb) const
void writeParameter(const char *pAsciiStr, std::u16string_view aChars, sal_Int16 count) const
OFileWriter(const char *pcFile, const char *locale)
void writeHexInt(sal_Int16 nb) const
void writeOUStringRefFunction2(const char *func, std::u16string_view useLocale) const
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)