Kaydet (Commit) bfc73ffe authored tarafından Matteo Casalin's avatar Matteo Casalin

Optimize: getToken()+comparison+copy() ==> startsWith()

Change-Id: Ic0e343f80ef91aad9baef8cc48648207b0365c68
Reviewed-on: https://gerrit.libreoffice.org/66642
Tested-by: Jenkins
Reviewed-by: 's avatarMatteo Casalin <matteo.casalin@yahoo.com>
üst d423829d
......@@ -57,10 +57,10 @@ Image::Image(uno::Reference<graphic::XGraphic> const & rxGraphic)
Image::Image(const OUString & rFileUrl)
{
sal_Int32 nIndex = 0;
if (rFileUrl.getToken( 0, '/', nIndex ) == "private:graphicrepository")
OUString sImageName;
if (rFileUrl.startsWith("private:graphicrepository/", &sImageName))
{
mpImplData = std::make_shared<ImplImage>(rFileUrl.copy(nIndex));
mpImplData = std::make_shared<ImplImage>(sImageName);
}
else
{
......
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