/// <summary> /// Creates a text properties object using the specified writing system, old writing system, and a character /// style. The writing system value may be zero which means no writing system is specified. The style may be null. /// If the writing system is zero, then the old writing system must also be zero. An exception will be thrown otherwise. /// </summary> public ITsTextProps MakeProps(string bstrStyle, int ws, int ows) { ThrowIfWSInvalid("ws", ws); var intProps = new Dictionary <int, TsIntPropValue> { { (int)FwTextPropType.ktptWs, new TsIntPropValue(ows, ws) } }; Dictionary <int, string> strProps = null; if (!string.IsNullOrEmpty(bstrStyle)) { strProps = new Dictionary <int, string> { { (int)FwTextPropType.ktptNamedStyle, bstrStyle } }; } return(TsTextProps.GetInternedTextProps(intProps, strProps)); }
internal TsString(string text, int ws) : this(text, TsTextProps.GetInternedTextProps(ws)) { }
/// <summary> /// Creates an <see cref="ITsTextProps"/> from the current state. The number of TextProps may be less then /// the number pushed or inserted do to the compression of like, adjacent values. /// </summary> public ITsTextProps GetTextProps() { return(TsTextProps.GetInternedTextProps(IntProperties, StringProperties)); }