diff options
author | Christian Lippka <cl@openoffice.org> | 2001-06-05 13:52:32 +0000 |
---|---|---|
committer | Christian Lippka <cl@openoffice.org> | 2001-06-05 13:52:32 +0000 |
commit | 2a73246bbed50a37f55574b1eae415376bc86972 (patch) | |
tree | 90180b417508fe2bb083212a1b53b41897351634 /svx/source/unoedit | |
parent | ac14e72d25a490c06657c0aff2839f0865da169b (diff) |
#87442# fixed _getPropertyStates for empty portions
Diffstat (limited to 'svx/source/unoedit')
-rw-r--r-- | svx/source/unoedit/unofored.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/svx/source/unoedit/unofored.cxx b/svx/source/unoedit/unofored.cxx index 470966c54fa8..ab53c8d180ea 100644 --- a/svx/source/unoedit/unofored.cxx +++ b/svx/source/unoedit/unofored.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unofored.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: cl $ $Date: 2001-01-23 11:54:34 $ + * last change: $Author: cl $ $Date: 2001-06-05 14:52:32 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -200,10 +200,11 @@ USHORT GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& rSe struct EECharAttrib aAttrib = aAttribs.GetObject( nAttrib ); DBG_ASSERT( aAttrib.pAttr, "GetCharAttribs gives corrupt data" ); - if( aAttrib.nStart >= nEndPos ) + const sal_Bool bEmptyPortion = aAttrib.nStart == aAttrib.nEnd; + if( (!bEmptyPortion && (aAttrib.nStart >= nEndPos)) || (bEmptyPortion && (aAttrib.nStart > nEndPos)) ) break; // break if we are already behind our selektion - if( aAttrib.nEnd <= nPos ) + if( (!bEmptyPortion && (aAttrib.nEnd <= nPos)) || (bEmptyPortion && (aAttrib.nEnd < nPos)) ) continue; // or if the attribute ends before our selektion if( aAttrib.pAttr->Which() != nWhich ) |