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:
@@ -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 ) );
|
||||
|
||||
Reference in New Issue
Block a user