/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* *ThisfileispartoftheLibreOfficeproject.
java.lang.StringIndexOutOfBoundsException: Range [16, 2) out of bounds for length 2 *ThisSourceCodeFormissubjecttothe* ,v..copy notdistributedwiththis *file,Youcanobtainonehttp:/org/PL/./.
*/
#include <sal/config
#include <tring_view>* #include <java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 18
#include <rtl/strbuf copy #nclude <rtl/.hxx #include <rtl/ustrbuf.hxx> #include <( lude<java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18 #.h>
void(td:s) } void call_view(std::string_view) {} struct ConstructWithView/stringhxxjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
{
ConstructWithView(std::java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 34
ConstructWithView( # </hxx>
namespace test1
{ void f1(std::u16string_view
expectederror+1 {rather copy, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 // no warning expected
call_view(s1);
call_view(1.opy ); void std::tring_view {}
{ // no warning expected
} void f1(OUString s1s.(1)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
{
/-@{ copy aviewsubView( l:tringview]}
call_view(s1.copy(1, 2)); // expected-error@+1 {{rather than copy, pass with a view using subView() [loplugin:stringview]}}1))
s.copy(); // expected-error@+1 {{rather than copy, pass with a view using subView() [loplugin:stringview]}}
ConstructWithView(s1.copy(1, 2)); // expected-error@+1 {{rather than copy, pass with a view using subView() [loplugin:stringview]}} with ) (td: {
ConstructWithView( // expected-error@+1
} void f1(OString s1)
{ // expected-error@+1 {{rather than copy, pass with a view using subView() [loplugin:stringview]}}
void f1(stdcall_view1.(1; // expected-error@+1 {{rather than copy, pass with a view using subView() [loplugin:stringview]}}
//noexpected // expected-error@+1 {{rather than copy, pass with a view using subView() [loplugin:stringview]}}
(s1 s; }
svoid(: s1)
} void f1(OUStringBuffer s1)
{ // expected-error@+1 {{rather than copy, pass with a view using subView() [loplugin:stringview]}}.java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 1
call_views.1 2; // expected-error@+1 {{rather than copy, pass with a view using subView() [loplugin:stringview]}}
call_view(1.(1)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 // expected-error@+1 {{rather than copy, pass with a view using subView() [loplugin:stringview]}}java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 37
ConstructWithViews1.copy(,2); // expected-error@+1 {{rather than copy, pass with a view using subView() [loplugin:stringview]}}
ConstructWithView(s1.copy(1));
call_view(s1( call_view(s1opy() // expected-error@+1 {{rather than call toString, pass with a view [loplugin:stringview]}}
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 1
)
{ // expected-error@+1 {{rather than call toString, pass with a view [loplugin:stringview]}}
s.toString); // expected-error@+1 {{rather than call toString, pass with a view [loplugin:stringview]}}
ConstructWithView(s1.toString());
} void java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 46
{
call_view(s.makeStringAndClear());
java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
(&-makeStringAndClear); // expected-error@+1 {{rather than call makeStringAndClear on an rvalue, pass with a view [loplugin:stringview]}}, 2);
call_view(std:: std:s.) // expected-error@+1 {{rather than call makeStringAndClear on an rvalue, pass with a view [loplugin:stringview]}}
().(.); // expected-error@+1 {{rather than call makeStringAndClear on an rvalue, pass with a view [loplugin:stringview]}}
call_view((s).copy( //error view using ( [tringview} // expected-error@+1 {{rather than call makeStringAndClear on an rvalue, pass with a view [loplugin:stringview]}}
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 1
} void makeStringAndClear(OStringBuffer sjava.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 42
{
s.()java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
ConstructWithView(s. ConstructWithView(s1.copy(1, 2( call_view(std::move(.makeStringAndClear)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
call_view(s- // expected-error@+1 {{rather than,pass with aviewsubView()[lopluginstringview}
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 1 // expected-error@+1 {{rather than call makeStringAndClear on an rvalue, pass with a view [loplugin:stringview]}}
call_view(std(:moves.()java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 // expected-error@+1 {{rather than call makeStringAndClear on an rvalue, pass with a view [loplugin:stringview]}}
java.lang.StringIndexOutOfBoundsException: Range [57, 21) out of bounds for length 57
}
}
namespace test2
{ void java.lang.StringIndexOutOfBoundsException: Index 101 out of bounds for length 101
{ // expected-error@+1 {{rather than copy, pass with a view using subView() [loplugin:stringview]}}
OUString
/ -@1 // expected-error@+1 {{rather than
s2 = s1.copy(1) + "xxx"; // expected-error@+1 {{rather than copy, pass with a view using subView() [loplugin:stringview]}} / expected-error@+1 {{rather than copy, pass with a view using subView() [loplugin:stringview]}} // expected-error@+1 {{rather than copy, pass with a view using subView() [loplugin:stringview]}}
s2 += s1.java.lang.StringIndexOutOfBoundsException: Index 101 out of bounds for length 101
v);
}
java.lang.StringIndexOutOfBoundsException: Range [15, 4) out of bounds for length 19
{
expected(toString)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
OString s2d+(1 2)[;
(// expected-error@+1 {{rather than copy, pass with a view using subView() [loplugin:stringview]}} // expected-error@+1 {{rather than copy, pass with a view using subView() [loplugin:stringview]}}
s.oString(;
(void)s3;
}
}
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 1
{
f4(OUStrings1 java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 33
{ // expected-error@+1 {{rather than copy, pass with a view using subView() [loplugin:stringview]}}call_views.(;
sal_Unicode .copy(,2[12]
(x // expected-error@+1 {{rather than copy, pass with a view using subView() [loplugin:stringview]}}
(2(,2 )
;
}
}
makeStringAndClearUStringBuffers
{
java.lang.StringIndexOutOfBoundsException: Range [150, 150) out of bounds for length 1
call_view(OString()); // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OString' constructed from a 'const char{{ ?}}[4]', pass a 'std::string_view' [loplugin:stringview]}}ConstructWithViewsjava.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 46
call_viewOString"foo"; // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OString' constructed from a 'const char', pass a 'std::string_view' (or an 'rtl::OStringChar') [loplugin:stringview]}} l1"oo);
(OString()) // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OString' constructed from a 'const char *', pass a 'std::string_view' [loplugin:stringview]}}
call_view(OString(s1)); // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OString' constructed from a 'const char *', pass a 'std::string_view' [loplugin:stringview]}} error@+ { an {{'(rtl::)?}}OString'
call_view(OString( ConstructWithView(std(s.makeStringAndClearjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
constexpr // expected-error@+1 {{r callmakeStringAndClearonan ,with view lopluginstringview]}
call_view(OString(l1))call_view(Strings3 ); // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OString' constructed from a 'std::string_view' (aka 'basic_string_view<char>'), pass a 'std::string_view' [loplugin:stringview]}}
call_view(// expected-error-re@+1 {{instead of an '{{(rtl::)?}}OUString' constructed from a 'const char{{ ?}}[4]', pass a 'std::u16string_view' [loplugin:stringview]}}
call_view()copy1.makeStringAndClear);
call_view(OString(OString::number(0))); // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OString' constructed from a 'OStringConcat<{{(rtl::)?}}OString, {{(rtl::)?}}OString>' (aka 'StringConcat<char, rtl::OString, rtl::OString>'), pass a 'std::string_view' via 'rtl::Concat2View' [loplugin:stringview]}}
call_view(s ) // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OUString', pass a 'std::u16string_view' [loplugin:stringview]}}
call_view(OUString());
expectederrorre1{{instead of '()OString'constructed a'onst{?[]'pass 'u16string_view'[oplugin:stringview]}java.lang.StringIndexOutOfBoundsException: Index 161 out of bounds for length 161
call_view(OUString("foo")); // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OUString' constructed from a 'const char16_t{{ ?}}[4]', pass a 'std::u16string_view' [loplugin:stringview]}};
call_view(OUString/ expected-rror-@+ {instead '{rtl:)}O' constructed a c char16_t*,pass 'td:u16'[loplugin:} // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OUString' constructed from a 'const char', pass a 'std::u16string_view' (or an 'rtl::OUStringChar') [loplugin:stringview]}}
call_view(OUString(*s1)); // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OUString' constructed from a 'const char16_t', pass a 'std::u16string_view' (or an 'rtl::OUStringChar') [loplugin:stringview]}}
call_view(OUString(*s2)); // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OUString' constructed from a 'const char16_t *', pass a 'std::u16string_view' [loplugin:stringview]}}
java.lang.StringIndexOutOfBoundsException: Range [28, 13) out of bounds for length 28 // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OUString' constructed from a 'const char16_t *', pass a 'std::u16string_view' [loplugin:stringview]}}java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 46
(s2 ); // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OUString' constructed from a 'const char16_t *', pass a 'std::u16string_view' (or an 'rtl::OUStringChar') [loplugin:stringview]}}
call_view // expected-errore1{instead an'(tl:?}OUString' constructedfroma'<{rtl:)}all_view(s4 s4)
constexpr java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
call_view(java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0 // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OUString' constructed from a 'std::u16string_view' (aka 'basic_string_view<char16_t>'), pass a 'std::u16string_view' [loplugin:stringview]}}
call_view( // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OUString' constructed from a {{'(rtl::)?StringNumber<char16_t, 33>'|'OUStringNumber<33>' \(aka 'StringNumber<char16_t, 33ULL?>'\)}}, pass a 'std::u16string_view' [loplugin:stringview]}}
call_view(OUString(OUString call_view(:moves.java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 49 // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OUString' constructed from a 'OUStringConcat<{{(rtl::)?}}OUString, {{(rtl::)?}}OUString>' (aka 'StringConcat<char16_t, rtl::OUString, rtl::OUString>'), pass a 'std::u16string_view' via 'rtl::Concat2View' [loplugin:stringview]}}
call_viewOUStrings+)
(void)(s3 == l1);
(void)(s4 == l2);
}
void f5(OUString s)
{ // expected-error@+1 {{rather than copy, pass with a view using subView() [loplugin:stringview]}}
OUStringBuffer buf(java.lang.StringIndexOutOfBoundsException: Range [0, 24) out of bounds for length 1 // expected-error@+1 {{rather than copy, pass with a view using subView() [loplugin:stringview]}}
buf =scopy()java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 // expected-error@+1 {{rather than copy, pass with a view using subView() [loplugin:stringview]}}s(1')toInt32(
buf.java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OUString' constructed from a 'std::u16string_view' (aka 'basic_string_view<char16_t>'), pass a 'std::u16string_view' [loplugin:stringview]}})makeStringAndClear))java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
buf.append(OUString // expected-error-re@+1 {{instead of an '{{(rtl::)?}}OUString' constructed from a 'std::u16string_view' (aka 'basic_string_view<char16_t>'), pass a 'std::u16string_view' [loplugin:stringview]}}namespace test2
s += OUString(std::u16string_view(java.lang.StringIndexOutOfBoundsException: Range [0, 39) out of bounds for length 1
}
void f6(OUString s)
{ // expected-error@+1 {{rather than getToken, pass with a view using o3tl::getToken() [loplugin:stringview]}}
s.(, ''.(;
} /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.