cid#1692494: silence Argument cannot be negative

Change-Id: Ic908ddb4acb81850f6e0183bcf543e656a17aa44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207949
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
Xisco Fauli
2026-07-10 23:06:23 +02:00
parent e3a3958242
commit 9a6197c869
+11 -8
View File
@@ -119,15 +119,18 @@ void SdPresLayoutDlg::GetAttr(SfxItemSet& rOutAttrs)
OUString aLayoutName;
if( bLoad )
if (nIndex >= 0)
{
aLayoutName = maName + "#" + maLayoutNames.at(nIndex);
}
else if (nIndex >= 0)
{
aLayoutName = maLayoutNames.at(nIndex);
if( aLayoutName == maStrNone )
aLayoutName.clear(); // that way we encode "- nothing -" (see below)
if( bLoad )
{
aLayoutName = maName + "#" + maLayoutNames.at(nIndex);
}
else
{
aLayoutName = maLayoutNames.at(nIndex);
if( aLayoutName == maStrNone )
aLayoutName.clear(); // that way we encode "- nothing -" (see below)
}
}
rOutAttrs.Put( SfxStringItem( ATTR_PRESLAYOUT_NAME, aLayoutName ) );