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

Fix loop test and evaluate token count just once

Change-Id: I354cbb729eed9b78c4af3d684513c3338be4f532
üst 6055922e
......@@ -710,7 +710,8 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
pSectionData->SetType(FILE_LINK_SECTION);
}
OUString sSectLink(pSectionData->GetLinkFileName());
while (3 < comphelper::string::getTokenCount(sSectLink, sfx2::cTokenSeparator))
for (sal_Int32 i = comphelper::string::getTokenCount(sSectLink, sfx2::cTokenSeparator);
i < 3; ++i)
{
sSectLink += OUString(sfx2::cTokenSeparator);
}
......
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