目錄 / Table of Contents

Class OdfFormulaSupport

Namespace
OdfKit.Formula
Assembly
OdfKit.dll

Analyzes OpenFormula support coverage, preservation-safe serialization, and diagnostics. 提供 OpenFormula 支援範圍、保真序列化與診斷工具。

public static class OdfFormulaSupport
Inheritance
OdfFormulaSupport
Inherited Members

Properties

SmallGroupRequiredFunctions

Gets the mandatory function names for the OASIS OpenFormula Small Group evaluator. 取得 OASIS OpenFormula Small Group 評估器的強制函式名稱。

public static IReadOnlyList<string> SmallGroupRequiredFunctions { get; }

Property Value

IReadOnlyList<string>

Remarks

Function-name coverage alone does not prove evaluator conformance; syntax, limits, conversions, and semantics require separate verification. 僅有函式名稱涵蓋並不代表評估器合規;語法、限制、型別轉換及語意仍須分別驗證。

SupportedFunctions

Gets the table of functions supported by the default formula evaluator. 取得預設公式評估器支援的函式表。

public static IReadOnlyList<OdfFormulaFunctionInfo> SupportedFunctions { get; }

Property Value

IReadOnlyList<OdfFormulaFunctionInfo>

Methods

Analyze(string)

Analyzes whether a formula can be parsed and whether it contains functions unsupported by the default evaluator. 分析公式是否可剖析,以及是否包含預設評估器不支援的函式。

public static OdfFormulaAnalysis Analyze(string formula)

Parameters

formula string

The formula to analyze. / 要分析的公式。

Returns

OdfFormulaAnalysis

The formula analysis result. / 公式分析結果。

Analyze(string, OdfFormulaFunctionRegistry)

Analyzes formula support against the default evaluator and an application-defined function registry. 依預設評估器與應用程式自訂函式註冊表分析公式支援範圍。

public static OdfFormulaAnalysis Analyze(string formula, OdfFormulaFunctionRegistry functions)

Parameters

formula string

The formula to analyze. / 要分析的公式。

functions OdfFormulaFunctionRegistry

The application-defined function registry. / 應用程式自訂函式註冊表。

Returns

OdfFormulaAnalysis

The formula analysis result. / 公式分析結果。

GetConformanceReport(OdfFormulaConformanceGroup)

Reports cumulative mandatory-function coverage for the built-in evaluator. 報告內建評估器的累計強制函式覆蓋情形。

public static OdfFormulaConformanceReport GetConformanceReport(OdfFormulaConformanceGroup group)

Parameters

group OdfFormulaConformanceGroup

The conformance group. / 一致性群組。

Returns

OdfFormulaConformanceReport

The function coverage report. / 函式覆蓋報告。

GetConformanceReport(OdfFormulaConformanceGroup, OdfFormulaFunctionRegistry)

Reports cumulative mandatory-function coverage for the built-in evaluator and an application registry. 報告內建評估器與應用程式註冊表的累計強制函式覆蓋情形。

public static OdfFormulaConformanceReport GetConformanceReport(OdfFormulaConformanceGroup group, OdfFormulaFunctionRegistry functions)

Parameters

group OdfFormulaConformanceGroup

The conformance group. / 一致性群組。

functions OdfFormulaFunctionRegistry

The application-defined function registry. / 應用程式自訂函式註冊表。

Returns

OdfFormulaConformanceReport

The function coverage report. / 函式覆蓋報告。

GetMissingSmallGroupFunctions()

Returns mandatory Small-group functions that are unavailable from the built-in evaluator. 傳回預設評估器尚未提供的 Small Group 強制函式。

public static IReadOnlyList<string> GetMissingSmallGroupFunctions()

Returns

IReadOnlyList<string>

The missing function names. / 缺少的函式名稱。

GetMissingSmallGroupFunctions(OdfFormulaFunctionRegistry)

Returns mandatory Small-group functions unavailable from both the built-in evaluator and an application registry. 傳回預設評估器與應用程式註冊表皆未提供的 Small Group 強制函式。

public static IReadOnlyList<string> GetMissingSmallGroupFunctions(OdfFormulaFunctionRegistry functions)

Parameters

functions OdfFormulaFunctionRegistry

The application-defined function registry. / 應用程式自訂函式註冊表。

Returns

IReadOnlyList<string>

The missing function names. / 缺少的函式名稱。

GetRequiredFunctions(OdfFormulaConformanceGroup)

Gets cumulative mandatory function names for an OpenFormula evaluator group. 取得 OpenFormula 評估器群組的累計強制函式名稱。

public static IReadOnlyList<string> GetRequiredFunctions(OdfFormulaConformanceGroup group)

Parameters

group OdfFormulaConformanceGroup

The conformance group. / 一致性群組。

Returns

IReadOnlyList<string>

The immutable mandatory-function list. / 不可變的強制函式清單。

IsFunctionSupported(string)

Determines whether the default evaluator supports the specified function. 判斷預設評估器是否支援指定函式。

public static bool IsFunctionSupported(string name)

Parameters

name string

The function name. / 函式名稱。

Returns

bool

True when the function is supported; otherwise, false. / 若支援則為 true,否則為 false。

IsFunctionSupported(string, OdfFormulaFunctionRegistry)

Determines whether the default evaluator or an application registry supports the specified function. 判斷預設評估器或應用程式註冊表是否支援指定函式。

public static bool IsFunctionSupported(string name, OdfFormulaFunctionRegistry functions)

Parameters

name string

The function name. / 函式名稱。

functions OdfFormulaFunctionRegistry

The application-defined function registry. / 應用程式自訂函式註冊表。

Returns

bool

True when the function is supported; otherwise, false. / 若支援則為 true,否則為 false。

SerializePreservingUnsupported(string)

Returns the reserialized form for supported formulas, while preserving unsupported or unparsable formulas. 支援的公式會回傳重新序列化結果;不支援或無法剖析時保留原公式。

public static string SerializePreservingUnsupported(string formula)

Parameters

formula string

The formula to serialize. / 要序列化的公式。

Returns

string

A preservation-safe formula string. / 安全的公式字串。

SerializePreservingUnsupported(string, OdfFormulaFunctionRegistry)

Returns a preservation-safe serialized formula while recognizing application-defined functions. 在辨識應用程式自訂函式的情況下,傳回可安全保真的序列化公式。

public static string SerializePreservingUnsupported(string formula, OdfFormulaFunctionRegistry functions)

Parameters

formula string

The formula to serialize. / 要序列化的公式。

functions OdfFormulaFunctionRegistry

The application-defined function registry. / 應用程式自訂函式註冊表。

Returns

string

A preservation-safe formula string. / 安全的公式字串。