Kaydet (Commit) 72111620 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Clean up uses of rtl_ustr_ascii_shortenedCompareIgnoreAsciiCase_WithLength

Change-Id: Ie37614dac882bfe05f8ce595ae6b20326dce872e
üst 2f527738
......@@ -574,12 +574,9 @@ uno::Reference< io::XStream > OStorageHelper::GetStreamAtPackageURL(
const OUString& rURL, sal_uInt32 const nOpenMode,
LifecycleProxy & rNastiness)
{
static char const s_PkgScheme[] = "vnd.sun.star.Package:";
if (0 == rtl_ustr_ascii_shortenedCompareIgnoreAsciiCase_WithLength(
rURL.getStr(), rURL.getLength(),
s_PkgScheme, SAL_N_ELEMENTS(s_PkgScheme) - 1))
OUString path;
if (rURL.startsWithIgnoreAsciiCase("vnd.sun.star.Package:", &path))
{
OUString const path(rURL.copy(SAL_N_ELEMENTS(s_PkgScheme)-1));
return GetStreamAtPath(xParentStorage, path, nOpenMode, rNastiness);
}
return 0;
......
......@@ -321,13 +321,11 @@ OUString extractTableFromInsert( const OUString & sql )
int i = 0;
while (i < sql.getLength() && isWhitespace(sql[i])) { i++; }
if( 0 == rtl_ustr_ascii_shortenedCompareIgnoreAsciiCase_WithLength(
&sql.getStr()[i], sql.getLength() - i, "insert" , 6 ) )
if( sql.matchIgnoreAsciiCase("insert", i) )
{
i += 6;
while (i < sql.getLength() && isWhitespace(sql[i])) { i++; }
if( 0 == rtl_ustr_ascii_shortenedCompareIgnoreAsciiCase_WithLength(
&sql.getStr()[i], sql.getLength() - i, "into" , 4 ) )
if( sql.matchIgnoreAsciiCase("into", i) )
{
i +=4;
while (i < sql.getLength() && isWhitespace(sql[i])) { i++; }
......
......@@ -3126,16 +3126,13 @@ static void lcl_CopyStream(
proxy.commitStorages();
}
static char const s_PkgScheme[] = "vnd.sun.star.Package:";
static OUString
lcl_StoreMediaAndGetURL(SvXMLExport & rExport,
uno::Reference<beans::XPropertySet> const& xPropSet,
OUString const& rURL)
{
if (0 == rtl_ustr_ascii_shortenedCompareIgnoreAsciiCase_WithLength(
rURL.getStr(), rURL.getLength(),
s_PkgScheme, SAL_N_ELEMENTS(s_PkgScheme) - 1))
OUString urlPath;
if (rURL.startsWithIgnoreAsciiCase("vnd.sun.star.Package:", &urlPath))
{
try // video is embedded
{
......@@ -3152,9 +3149,6 @@ lcl_StoreMediaAndGetURL(SvXMLExport & rExport,
return OUString();
}
OUString const urlPath(
rURL.copy(SAL_N_ELEMENTS(s_PkgScheme)-1));
lcl_CopyStream(xInStream, xTarget, rURL);
return urlPath;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment