Kaydet (Commit) 6415b0c4 authored tarafından Miklos Vajna's avatar Miklos Vajna

sw: fix warning in SwTextShell::GetState()

warn:sw.core:31398:31398:sw/source/core/bastyp/index.cxx:322: SwIndex::operator--() wraps around

Change-Id: I5c37a6b5e1fe24bc3b6b84e762bad6577583f3d8
Reviewed-on: https://gerrit.libreoffice.org/68127
Tested-by: Jenkins
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.com>
üst b1f4bc27
......@@ -1950,7 +1950,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
// Enable it if we have a valid object other than what form shell knows
SwPosition aPos(*GetShell().GetCursor()->GetPoint());
sw::mark::IFieldmark* pFieldBM = GetShell().getIDocumentMarkAccess()->getFieldmarkFor(aPos);
if ( !pFieldBM )
if ( !pFieldBM && aPos.nContent.GetIndex() > 0)
{
--aPos.nContent;
pFieldBM = GetShell().getIDocumentMarkAccess()->getFieldmarkFor(aPos);
......
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