DisplayTextFormatterSupport

DisplayTextFormatterSupport

概要

DisplayTextFormatterSupport は Aspose.Cells の C++ 用 FOSS に含まれるクラスです。

数値、テキスト、日付/時刻の表示テキスト書式設定のための内部ヘルパーメソッド。

このクラスは C++ プログラムで DisplayTextFormatterSupport オブジェクトを操作するための 17 のメソッドを提供します。利用可能なメソッドは ContainsNumericPlaceholder、ConvertToDouble、DisplayTextFormatterSupport、EvaluateCondition、ExpandSectionPattern、GetAbsoluteNumericValue、IsNumericValue、ParseSections、SanitizeNumericSection、SelectDateTimeSection、SelectNumericSection、SelectTextSection、および追加の 5 つのメソッドです。Aspose.Cells の C++ 用 FOSS パッケージをインストールすれば、すべての公開メンバーは任意の C++ アプリケーションから利用可能です。

メソッド

シグネチャ説明
DisplayTextFormatterSupport()この DisplayTextFormatterSupport インスタンスで DisplayTextFormatterSupport を呼び出します。
SelectNumericSection(sections: std::vector<DisplayFormatSectionInfo>, numericValue: double, useAbsoluteValue: bool) → std::optional<DisplayFormatSectionInfo>解析されたフォーマットコードから適切な数値セクションを選択します。sections が空の場合は std::nullopt を返します。
SelectTextSection(sections: std::vector<DisplayFormatSectionInfo>) → std::optional<DisplayFormatSectionInfo>テキストセクション(4 番目のセクション、または最初に ‘@’ を含むセクション)を選択します。テキストセクションが見つからない場合は std::nullopt を返します。
SelectDateTimeSection(sections: std::vector<DisplayFormatSectionInfo>) → std::optional<DisplayFormatSectionInfo>最初の 3 つのうちで最初の空でない日付/時刻セクションを選択します。すべてが空の場合は std::nullopt を返します。
ParseSections(formatCode: std::string_view) → std::vector<DisplayFormatSectionInfo>フォーマットコードをセクション記述子に解析します。
SplitSections(formatCode: std::string_view) → std::vector<std::string>引用されておらずエスケープされていないセミコロンでフォーマットコードを分割します。
TryParseSectionCondition(section: std::string_view, conditionOperator: std::string, conditionValue: double) → boolセクション文字列から条件(演算子+値)を解析しようとします。
TryParseConditionToken(token: std::string_view, conditionOperator: std::string, conditionValue: double) → bool「>=10」のような条件トークンを解析しようとします。
EvaluateCondition(conditionOperator: std::string_view, numericValue: double, conditionValue: double) → boolnumericValue と conditionValue の比較を評価します。
ShouldUseAbsoluteValue(section: std::string_view, numericValue: double) → boolフォーマット時に負の数の絶対値を使用すべきかどうかを判定します(つまり、パターンに明示的な ‘-’ 記号がない場合)。
SanitizeNumericSection(section: std::string_view) → std::string数値セクションからディレクティブの角括弧、引用エスケープ、プレースホルダー文字を除去し、クリーンな文字列(端がトリムされた状態)を返します。
StripDirectiveBrackets(section: std::string_view, preserveElapsedTokens: bool) → std::stringセクション文字列から角括弧で囲まれたディレクティブトークンを削除します。
ContainsNumericPlaceholder(pattern: std::string_view) → boolパターンに数値プレースホルダー文字が含まれている場合は true を返します。
ExpandSectionPattern(pattern: std::string_view, valueText: std::string_view, replaceTextPlaceholder: bool) → std::stringテキストプレースホルダーを置換し、フォーマットエスケープを除去することで、セクションパターンを展開します。
IsNumericValue(value: CellValue) → boolCellValue が数値型(int または double)を保持している場合は true を返します。
ConvertToDouble(value: CellValue) → double数値の CellValue を double に変換します。値が数値でない場合は std::invalid_argument をスローします。
GetAbsoluteNumericValue(value: CellValue) → CellValue絶対数値を返します。数値でない値は変更せずに返されます。

参照

 日本語