34 if (c >=
'0' && c <=
'9')
38 else if (c >=
'A' && c <=
'F')
42 else if (c >=
'a' && c <=
'f')
57 OUString res = OStringToOUString(original, RTL_TEXTENCODING_UTF8);
58 for (sal_Int32
i = 0;;)
60 i = res.indexOf(
"\\u",
i);
66 if (res.getLength() -
i >= 4)
70 for (sal_Int32 j = 0; j != 4; ++j)
72 auto const n = getHexValue(res[
i + j]);
83 res = res.replaceAt(
i, 6, rtl::OUStringChar(c));
94 assert(stmtComponents.size() > 2);
95 auto wordIter = stmtComponents.begin();
97 if (*wordIter ==
"CREATE" || *wordIter ==
"ALTER")
99 if (*wordIter ==
"CACHED")
101 if (*wordIter ==
"TABLE")
105 if (wordIter->indexOf(
"\"") >= 0)
107 size_t nAposBegin = sSql.find(
'"');
108 size_t nAposEnd = nAposBegin;
109 bool bProperEndAposFound =
false;
110 while (!bProperEndAposFound)
112 nAposEnd = sSql.find(
'"', nAposEnd + 1);
113 if (nAposEnd == std::u16string_view::npos)
115 SAL_WARN(
"dbaccess",
"no matching \"");
118 if (sSql[nAposEnd - 1] !=
u'\\')
119 bProperEndAposFound =
true;
121 std::u16string_view
result = sSql.substr(nAposBegin, nAposEnd - nAposBegin + 1);
127 sal_Int32 nParenPos = wordIter->indexOf(
"(");
129 return wordIter->copy(0, nParenPos);
136 if (
sName.size() > 30)
138 static constexpr OUStringLiteral NAME_TOO_LONG
139 =
u"Firebird 3 doesn't support object (table, field) names "
140 "of more than 30 characters; please shorten your object "
141 "names in the original file and try again.";
143 ::comphelper::getProcessComponentContext());
#define SAL_WARN(area, stream)
std::vector< OUString > split(std::u16string_view rStr, sal_Unicode cSeparator)
OUString getTableNameFromStmt(std::u16string_view sSql)
OUString convertToUTF8(std::string_view original)
void ensureFirebirdTableLength(std::u16string_view sName)