本文整理汇总了C#中ITsString.get_Properties方法的典型用法代码示例。如果您正苦于以下问题:C# ITsString.get_Properties方法的具体用法?C# ITsString.get_Properties怎么用?C# ITsString.get_Properties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITsString
的用法示例。
在下文中一共展示了ITsString.get_Properties方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetAdjustedTsString
/// -------------------------------------------------------------------------------------
/// <summary>
/// Make sure that all runs of the given ts string will fit within the given height.
/// </summary>
/// <param name="tss">(Potentially) unadjusted TsString -- may have some pre-existing
/// adjustments, but if it does, we (probably) ignore those and recheck every run</param>
/// <param name="dympMaxHeight">The maximum height (in millipoints) of the Ts String.</param>
/// <param name="styleSheet"></param>
/// <param name="writingSystemFactory"></param>
/// -------------------------------------------------------------------------------------
public static ITsString GetAdjustedTsString(ITsString tss, int dympMaxHeight,
IVwStylesheet styleSheet, ILgWritingSystemFactory writingSystemFactory)
{
if (dympMaxHeight == 0)
return tss;
ITsStrBldr bldr = null;
int runCount = tss.RunCount;
for (int irun = 0; irun < runCount; irun++)
{
ITsTextProps props = tss.get_Properties(irun);
int var;
int wsTmp = props.GetIntPropValues((int)FwTextPropType.ktptWs,
out var);
string styleName =
props.GetStrPropValue((int)FwTextStringProp.kstpNamedStyle);
int height;
string name;
float sizeInPoints;
using (Font f = GetFontForStyle(styleName, styleSheet, wsTmp, writingSystemFactory))
{
height = GetFontHeight(f);
name = f.Name;
sizeInPoints = f.SizeInPoints;
}
int curHeight = height;
// incrementally reduce the size of the font until the text can fit
while (curHeight > dympMaxHeight)
{
using (var f = new Font(name, sizeInPoints - 0.25f))
{
curHeight = GetFontHeight(f);
name = f.Name;
sizeInPoints = f.SizeInPoints;
}
}
if (curHeight != height)
{
// apply formatting to the problem run
if (bldr == null)
bldr = tss.GetBldr();
int iStart = tss.get_MinOfRun(irun);
int iEnd = tss.get_LimOfRun(irun);
bldr.SetIntPropValues(iStart, iEnd,
(int)FwTextPropType.ktptFontSize,
(int)FwTextPropVar.ktpvMilliPoint, (int)(sizeInPoints * 1000.0f));
}
}
if (bldr != null)
return bldr.GetString();
else
return tss;
}
示例2: Accept
public bool Accept(ITsString tssKey)
{
// Fail fast if text doesn't match exactly.
if (!MatchText(tssKey.Length == 0 ? "" : tssKey.Text))
return false;
// Writing system must also match.
int crun = tssKey.RunCount;
for (int irun = 0; irun < crun; irun++)
{
int nVar;
if (tssKey.get_Properties(irun).GetIntPropValues((int)FwTextPropType.ktptWs, out nVar) != m_ws)
return false;
}
return true;
}
示例3: WriteTsStringContent
private void WriteTsStringContent(TextWriter w, ITsString tss)
{
for (var irun = 0; irun < tss.RunCount; ++irun)
{
var ttp = tss.get_Properties(irun);
int nvar;
var ws = ttp.GetIntPropValues((int)FwTextPropType.ktptWs, out nvar);
var sLang = m_cache.WritingSystemFactory.GetStrFromWs(ws);
var style = ttp.GetStrPropValue((int)FwTextPropType.ktptNamedStyle);
w.Write("<span lang=\"{0}\"", MakeSafeAndNormalizedAttribute(sLang));
if (!String.IsNullOrEmpty(style))
w.Write(" class=\"{0}\"", MakeSafeAndNormalizedAttribute(style));
w.Write(">{0}</span>", MakeSafeAndNormalizedXml(tss.get_RunText(irun)));
}
}
示例4: GetOwnedORCs
/// ------------------------------------------------------------------------------------
/// <summary>
/// Gets the owned ORCs from the given ITsString.
/// </summary>
/// <param name="tss">The given ITsString.</param>
/// <returns>ITsString of the ORCs in tss, if any.</returns>
/// ------------------------------------------------------------------------------------
public static ITsString GetOwnedORCs(ITsString tss)
{
ITsStrBldr tssBldr = TsStrBldrClass.Create();
for (int iRun = 0; iRun < tss.RunCount; iRun++)
{
FwObjDataTypes objDataType;
GetOwnedGuidFromRun(tss, iRun, out objDataType);
if (objDataType == FwObjDataTypes.kodtOwnNameGuidHot || objDataType == FwObjDataTypes.kodtGuidMoveableObjDisp)
{
tssBldr.ReplaceRgch(tssBldr.Length, tssBldr.Length, tss.get_RunText(iRun), 1, tss.get_Properties(iRun));
}
}
return tssBldr.GetString();
}
示例5: GetDiffsInTsStrings
/// <summary>
/// Get an indication of the range of characters that differ between two TsStrings.
/// Return null if they are equal
/// If they are not, ichMin indicates the first different character (or the length of the shorter string).
/// cvIns indicates how many characters must be inserted at ichMin, after deleting cvDel, to get tssNew.
/// Character properties as well as values are considered.
/// If it is ambiguous where the difference occurs, we first try to interpret the difference in a way
/// that equates to inserting or deleting a complete word, otherwise, prefer to find the longest common
/// string at the start.
/// </summary>
public static TsStringDiffInfo GetDiffsInTsStrings(ITsString tssOld, ITsString tssNew)
{
int ichMin = -1;
// no diff found
int cchOld = 0;
int crunOld = 0;
int crunNew = 0;
int cchNew = 0;
if (tssNew != null)
{
cchNew = tssNew.Length;
crunNew = tssNew.RunCount;
}
if (tssOld != null)
{
cchOld = tssOld.Length;
crunOld = tssOld.RunCount;
}
int crunBoth = Math.Min(crunOld, crunNew);
// Set ivMin to the index of the first character that is different or has different
// properties.
for (int irun = 0; irun < crunBoth; irun++)
{
if (tssOld.get_Properties(irun) != tssNew.get_Properties(irun))
{
ichMin = tssNew.get_MinOfRun(irun);
// previous runs are all OK.
break;
// difference at start of this run.
}
int ichMinRun = StringUtils.FirstDiff(tssOld.get_RunText(irun), tssNew.get_RunText(irun));
if (ichMinRun >= 0)
{
ichMin = tssNew.get_MinOfRun(irun) + ichMinRun;
break;
}
}
if (ichMin < 0)
{
// no difference found as far as crunBoth.
if (crunNew > crunBoth)
{
// All the additional length of tssNew is inserted.
return new TsStringDiffInfo(cchOld, cchNew - cchOld, 0);
}
if (crunOld > crunBoth)
{
// All the additional length of tssOld is deleted.
return new TsStringDiffInfo(cchNew, 0, cchOld - cchNew);
}
// same number of runs are identical; strings are equal
return null;
}
// There is a difference at ichMin.
// A default assumption is that the remainder of both strings differs.
//int cchEndBoth = Math.Min(cvIns, cvDel); // max characters that could be equal at end.
int irunOld = crunOld - 1;
int irunNew = crunNew - 1;
int cchSameEnd = 0;
for (; irunOld >= 0 && irunNew >= 0; irunOld--, irunNew--)
{
if (tssOld.get_Properties(irunOld) != tssNew.get_Properties(irunNew))
{
// difference at end of this run. All the text beyond this run (if any) must have matched.
break;
}
int cchSameRun = StringUtils.LastDiff(tssOld.get_RunText(irunOld), tssNew.get_RunText(irunNew));
if (cchSameRun >= 0)
{
// End of equal bit is cchSame from the ends of the two runs
cchSameEnd = cchOld - tssOld.get_LimOfRun(irunOld) + cchSameRun;
break;
}
// Same to start of this run.
cchSameEnd = cchOld - tssOld.get_MinOfRun(irunOld);
}
int cvIns = cchNew - ichMin - cchSameEnd;
int cvDel = cchOld - ichMin - cchSameEnd;
// It's possible, e.g., with "abc. def." and "abc. insert. def.", that the matching range we find
// starting from the end overlaps the matching range we find starting at the start (we find a match
// at the start up to the end of "abc. ", and from the end to the start of ". def").
// In such a case, it's ambiguous where the actual difference is (we might have inserted either
// "insert. " or ". insert"), but we definitely don't want to return any negative numbers,
// and we choose to make the longer match at the start.
// On the other hand, if the two strings are "xxxabc xxxdef" and "xxxdef", we could have deleted
// "xxxabc " or "abc xxx", and we'd prefer the first interpretation.
ITsString longerString = null;
// only used and valid if cvIns or cvDel < 0
int offsetIchMin = 0;
if (cvIns < 0)
//.........这里部分代码省略.........
示例6: VerifyTss
void VerifyTss(ITsString tss, Run[] runs)
{
Assert.That(tss.RunCount, Is.EqualTo(runs.Length));
for (int i = 0; i < runs.Length; i++)
{
Assert.That(tss.get_RunText(i), Is.EqualTo(runs[i].Text));
var props = tss.get_Properties(i);
int nvar;
Assert.That(props.GetIntPropValues((int)FwTextPropType.ktptWs, out nvar), Is.EqualTo(runs[i].Ws));
var style = props.GetStrPropValue((int)FwTextPropType.ktptNamedStyle);
if (string.IsNullOrEmpty(runs[i].Style))
Assert.That(string.IsNullOrEmpty(style), Is.True);
else
Assert.That(style, Is.EqualTo(runs[i].Style));
}
}
示例7: Replacement
private string Replacement(ITsString oldTss)
{
var replacement = m_action.NewSpelling;
if (m_action.PreserveCase)
{
int var;
int ws = oldTss.get_Properties(0).GetIntPropValues((int)FwTextPropType.ktptWs, out var);
CaseFunctions cf = m_action.GetCaseFunctionFor(ws);
if (cf.StringCase(oldTss.Text) == StringCaseStatus.title)
replacement = cf.ToTitle(replacement);
}
return replacement;
}
示例8: FindRefRunMinLim
/// ------------------------------------------------------------------------------------
/// <summary>
/// Retrieve the extent of the current run if it is a chapter (optionally) or verse
/// number.
/// </summary>
/// <param name="tss">paragraph</param>
/// <param name="iRun">run index</param>
/// <param name="fCheckForChapter">true if we want to include searching for chapters
/// </param>
/// <param name="ichMin">output: index at beginning of run</param>
/// <param name="ichLim">output: index at limit of run</param>
/// <param name="fIsVerseNumber">output: <c>true</c> if this run is a verse number run
/// </param>
/// <returns><c>true</c> if this run is a verse number/bridge (or chapter, if checking
/// for that); <c>false</c> if not</returns>
/// ------------------------------------------------------------------------------------
private bool FindRefRunMinLim(ITsString tss, int iRun, bool fCheckForChapter,
out int ichMin, out int ichLim, out bool fIsVerseNumber)
{
ichMin = -1;
ichLim = -1;
// Check current run to see if it's a verse (or chapter) number.
ITsTextProps ttp = tss.get_Properties(iRun);
fIsVerseNumber = StStyle.IsStyle(ttp, ScrStyleNames.VerseNumber);
bool fIsChapterNumber = false;
if (!fIsVerseNumber && fCheckForChapter)
fIsChapterNumber = StStyle.IsStyle(ttp, ScrStyleNames.ChapterNumber);
if (fIsVerseNumber || fIsChapterNumber)
{
ichMin = tss.get_MinOfRun(iRun);
ichLim = tss.get_LimOfRun(iRun);
}
return (fIsVerseNumber || fIsChapterNumber);
}
示例9: RemoveDuplicateVerseNumbersInPara
/// ------------------------------------------------------------------------------------
/// <summary>
/// Remove any duplicate chapter/verse number(s) following the new verse number, in the
/// given paragraph or back translation.
/// </summary>
/// <param name="hvoObj">The id of the para or translation being modified</param>
/// <param name="propTag">The flid (Contents or Translation)</param>
/// <param name="tss">The structured string or the para or trans to remove in</param>
/// <param name="wsAlt">The writing system, if a back translation multiString alt</param>
/// <param name="removeChapter">The chapter number to remove, or 0 if none</param>
/// <param name="removeUpToVerse">The maximum verse number to remove</param>
/// <param name="ich">The character offset at which we start looking for dups</param>
/// <returns><c>true</c> if we're all done removing, <c>false</c> if caller needs to
/// check subsequent paragraphs
/// </returns>
/// ------------------------------------------------------------------------------------
private bool RemoveDuplicateVerseNumbersInPara(int hvoObj, int propTag, ITsString tss,
int wsAlt, int removeChapter, int removeUpToVerse, int ich)
{
bool fAllDone = false;
while (ich < tss.Length)
{
int iRun = tss.get_RunAt(ich);
ITsTextProps ttp = tss.get_Properties(iRun);
if (removeChapter > 0 &&
ttp.GetStrPropValue((int)FwTextPropType.ktptNamedStyle) ==
ScrStyleNames.ChapterNumber)
{
// Process this chapter number run
string chapterNumberText = tss.get_RunText(iRun);
int chapterNum = ScrReference.ChapterToInt(chapterNumberText);
if (chapterNum == removeChapter)
{
// Target chapter found. Remove!
int cchDel = chapterNumberText.Length;
int dummy;
ReplaceInParaOrBt(hvoObj, propTag, wsAlt, null, null,
ich, ich + cchDel, ref tss, out dummy);
// since we removed an entire run, we must adjust our current iRun
if (iRun > 0)
--iRun;
}
//If we found a chapter beyond our target chapter, we are done.
else if (chapterNum > removeChapter)
return true;
}
else if (ttp.GetStrPropValue((int)FwTextPropType.ktptNamedStyle) ==
ScrStyleNames.VerseNumber)
{
// Process this verse number run
string verseNumberText = tss.get_RunText(iRun);
string bridgeJoiner = m_scr.BridgeForWs(wsAlt);
// get binary values of this verse number run
int startNumber, endNumber; //numbers in this verse number run
ScrReference.VerseToInt(verseNumberText, out startNumber, out endNumber);
// and the bridge-joiner index, if any
int bridgeJoinerIndex = verseNumberText.IndexOf(bridgeJoiner, StringComparison.Ordinal);
if (startNumber <= removeUpToVerse)
{
// Target verse(s) found. Remove!
int cchDel;
int dummy;
if (endNumber <= removeUpToVerse)
{
//remove all of verseNumberText
cchDel = verseNumberText.Length;
ReplaceInParaOrBt(hvoObj, propTag, wsAlt, null, null,
ich, ich + cchDel,
ref tss, out dummy);
// since we removed an entire run, we must adjust our current iRun
if (iRun > 0)
--iRun;
if (endNumber == removeUpToVerse)
fAllDone = true;
}
else if (endNumber == removeUpToVerse + 1)
{
// reduce to a single verse (ending verse)
Debug.Assert(bridgeJoinerIndex > -1);
cchDel = bridgeJoinerIndex + bridgeJoiner.Length;
ReplaceInParaOrBt(hvoObj, propTag, wsAlt, null, null,
ich, ich + cchDel,
ref tss, out dummy);
fAllDone = true;
}
else // endNumber > removeUpToVerse + 1
{
// set beginning of bridge to max+1
Debug.Assert(bridgeJoinerIndex > -1);
cchDel = bridgeJoinerIndex;
string maxPlusOne = m_scr.ConvertToString(removeUpToVerse + 1);
//.........这里部分代码省略.........
示例10: FindFirstFootnoteInString
/// ------------------------------------------------------------------------------------
/// <summary>
/// Searches TsString forwards for first footnote reference.
/// </summary>
/// <param name="cache"></param>
/// <param name="tss"></param>
/// <param name="ich">Character index to start search.</param>
/// <param name="fSkipCurrentPosition">If <c>true</c> we search forward starting with the
/// run after ich, otherwise we start with the current run.</param>
/// <returns>First footnote in string after ich, or <c>null</c> if footnote can't be found.</returns>
/// ------------------------------------------------------------------------------------
public static ScrFootnote FindFirstFootnoteInString(FdoCache cache, ITsString tss,
ref int ich, bool fSkipCurrentPosition)
{
int irun = tss.get_RunAt(ich);
int runCount = tss.RunCount;
ITsTextProps tprops;
int footnoteHvo;
if (fSkipCurrentPosition)
irun++;
while (irun < runCount)
{
tprops = tss.get_Properties(irun);
footnoteHvo = GetFootnoteFromProps(cache, tprops);
if (footnoteHvo > 0)
{
ich = tss.get_LimOfRun(irun);
return new ScrFootnote(cache, footnoteHvo);
}
irun++;
}
return null;
}
示例11: VerifyBackColor
private void VerifyBackColor(ITsString tss, int[] colors)
{
Assert.That(tss.RunCount, Is.EqualTo(colors.Length));
for (int irun = 0; irun < tss.RunCount; irun++)
{
int nVar;
Assert.That(tss.get_Properties(irun).GetIntPropValues((int)FwTextPropType.ktptBackColor, out nVar), Is.EqualTo(colors[irun]));
if (colors[irun] == -1)
Assert.That(nVar, Is.EqualTo(-1));
else
Assert.That(nVar, Is.EqualTo((int)FwTextPropVar.ktpvDefault));
}
}
示例12: VerifyNoBackColor
private void VerifyNoBackColor(ITsString tss)
{
for (int irun = 0; irun < tss.RunCount; irun++)
{
int nVar;
Assert.That(tss.get_Properties(irun).GetIntPropValues((int)FwTextPropType.ktptBackColor, out nVar), Is.EqualTo(-1));
Assert.That(nVar, Is.EqualTo(-1));
}
}
示例13: ValidToReplaceSelWithTss
/// ------------------------------------------------------------------------------------
/// <summary>
/// Determines whether the given TsString can be pasted in the context of the target
/// selection. An old DN-style embedded picture can only be pasted into paragraph
/// contents.
/// </summary>
/// <param name="vwselTargetLocation">selection to be replaced by paste operation</param>
/// <param name="tss">The TsString from the clipboard</param>
/// <returns><c>true</c> if the given string does not contain any embedded strings or if
/// the target location is a paragraph contents field.</returns>
/// ------------------------------------------------------------------------------------
protected override bool ValidToReplaceSelWithTss(IVwSelection vwselTargetLocation, ITsString tss)
{
// REVIEW (EberhardB): Do we still support DN-style embedded pictures?
//+ Begin fix for Raid bug 897B
// Check for an embedded picture.
int crun = tss.RunCount;
bool fHasPicture = false;
ITsTextProps ttp;
for (int irun = 0; irun < crun; ++irun)
{
ttp = tss.get_Properties(irun);
string str = ttp.GetStrPropValue((int)FwTextStringProp.kstpObjData);
if (str != null)
{
char chType = str[0];
if (chType == (int)FwObjDataTypes.kodtPictOddHot ||
chType == (int)FwObjDataTypes.kodtPictEvenHot)
{
fHasPicture = true;
break;
}
}
}
if (fHasPicture)
{
// Vars to call TextSelInfo and find out whether it is a structured
// text field.
ITsString tssDummy;
int ich;
bool fAssocPrev;
int hvoObj;
int tag;
int wsTmp;
vwselTargetLocation.TextSelInfo(false, out tssDummy, out ich, out fAssocPrev,
out hvoObj, out tag, out wsTmp);
if (tag != StTxtParaTags.kflidContents)
{
// TODO (EberhardB): This seems to be Notebook specific!
MessageBox.Show(ResourceHelper.GetResourceString("kstidPicsMultiPara"));
return false;
}
}
//- End fix for Raid bug 897B
return base.ValidToReplaceSelWithTss(vwselTargetLocation, tss);
}
示例14: Initialize
/// <summary>
/// This sets the original wordform and morph-broken word into the dialog.
/// </summary>
public void Initialize(ITsString tssWord, string sMorphs, ILgWritingSystemFactory wsf,
FdoCache cache, StringTable stringTable, IVwStylesheet stylesheet)
{
CheckDisposed();
Debug.Assert(tssWord != null);
Debug.Assert(wsf != null);
ITsTextProps ttp = tssWord.get_Properties(0);
Debug.Assert(ttp != null);
int var;
int ws = ttp.GetIntPropValues((int)FwTextPropType.ktptWs, out var);
Debug.Assert(ws != 0);
ILgWritingSystem wsVern = wsf.get_EngineOrNull(ws);
Debug.Assert(wsVern != null);
m_txtMorphs.WritingSystemFactory = wsf;
m_txtMorphs.WritingSystemCode = ws;
m_txtMorphs.Text = sMorphs;
m_sMorphs = sMorphs;
// Fix the help strings to use the actual MorphType markers.
IMoMorphType mmtStem;
IMoMorphType mmtPrefix;
IMoMorphType mmtSuffix;
IMoMorphType mmtInfix;
IMoMorphType mmtBoundStem;
IMoMorphType mmtProclitic;
IMoMorphType mmtEnclitic;
IMoMorphType mmtSimulfix;
IMoMorphType mmtSuprafix ;
var morphTypeRepo = cache.ServiceLocator.GetInstance<IMoMorphTypeRepository>();
morphTypeRepo.GetMajorMorphTypes(out mmtStem, out mmtPrefix, out mmtSuffix, out mmtInfix,
out mmtBoundStem, out mmtProclitic, out mmtEnclitic, out mmtSimulfix, out mmtSuprafix);
// Format the labels according to the MoMorphType Prefix/Postfix values.
string sExample1 = stringTable.GetString("EditMorphBreaks-Example1", "DialogStrings");
string sExample2 = stringTable.GetString("EditMorphBreaks-Example2", "DialogStrings");
string sStemExample = stringTable.GetString("EditMorphBreaks-stemExample", "DialogStrings");
string sAffixExample = stringTable.GetString("EditMorphBreaks-affixExample", "DialogStrings");
m_lblHelp2Example1.Text = String.Format(sExample1, mmtStem.Prefix ?? "", mmtStem.Postfix ?? "");
m_lblHelp2Example2.Text = String.Format(sExample2, mmtSuffix.Prefix ?? "", mmtSuffix.Postfix ?? "");
m_lblBreakStemExample.Text = String.Format(sStemExample, mmtStem.Prefix ?? "", mmtStem.Postfix ?? "");
m_lblBreakBoundStemExample.Text = String.Format(sStemExample, mmtBoundStem.Prefix ?? "", mmtBoundStem.Postfix ?? "");
m_lblBreakPrefixExample.Text = String.Format(sAffixExample,
mmtPrefix.Prefix == null ? "" : " " + mmtPrefix.Prefix,
mmtPrefix.Postfix == null ? "" : mmtPrefix.Postfix + " ");
m_lblBreakSuffixExample.Text = String.Format(sAffixExample,
mmtSuffix.Prefix == null ? "" : " " + mmtSuffix.Prefix,
mmtSuffix.Postfix == null ? "" : mmtSuffix.Postfix + " ");
m_lblBreakInfixExample.Text = String.Format(sAffixExample,
mmtInfix.Prefix == null ? "" : " " + mmtInfix.Prefix,
mmtInfix.Postfix == null ? "" : mmtInfix.Postfix + " ");
m_lblBreakProcliticExample.Text = String.Format(sAffixExample,
mmtProclitic.Prefix == null ? "" : " " + mmtProclitic.Prefix,
mmtProclitic.Postfix == null ? "" : mmtProclitic.Postfix + " ");
m_lblBreakEncliticExample.Text = String.Format(sAffixExample,
mmtEnclitic.Prefix == null ? "" : " " + mmtEnclitic.Prefix,
mmtEnclitic.Postfix == null ? "" : mmtEnclitic.Postfix + " ");
m_lblBreakSimulfixExample.Text = String.Format(sAffixExample,
mmtSimulfix.Prefix == null ? "" : " " + mmtSimulfix.Prefix,
mmtSimulfix.Postfix == null ? "" : mmtSimulfix.Postfix + " ");
m_lblBreakSuprafixExample.Text = String.Format(sAffixExample,
mmtSuprafix.Prefix == null ? "" : " " + mmtSuprafix.Prefix,
mmtSuprafix.Postfix == null ? "" : mmtSuprafix.Postfix + " ");
m_morphBreakContextMenu = new MorphBreakHelperMenu(m_txtMorphs, m_helpTopicProvider, cache, stringTable);
m_txtMorphs.AdjustForStyleSheet(this, null, stylesheet);
m_morphBreakHelper.Height = m_txtMorphs.Height;
}
示例15: CheckFinalSpaceInReferenceLabel
/// ------------------------------------------------------------------------------------
/// <summary>
/// Checks the final space in reference label.
/// </summary>
/// ------------------------------------------------------------------------------------
private void CheckFinalSpaceInReferenceLabel(ITsString tss)
{
int iRun = tss.RunCount - 1;
Assert.AreEqual(" ", tss.get_RunText(iRun));
ITsTextProps ttp = tss.get_Properties(iRun);
Assert.AreEqual(null, ttp.GetStrPropValue((int)FwTextPropType.ktptNamedStyle));
int var;
Assert.AreEqual(Cache.DefaultUserWs,
ttp.GetIntPropValues((int)FwTextPropType.ktptWs, out var));
}