fpspreadsheet: Move conditional format list from worksheet to workbook (to facilitate handling for ODS).

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7503 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2020-06-30 10:45:14 +00:00
parent ea76276469
commit b80085c78d
5 changed files with 123 additions and 91 deletions

View File

@@ -194,6 +194,7 @@ function CombineTextAndRichTextParams(AText: String;
procedure SplitTextAndRichTextParams(AValue: String;
out AText: String; out ARichText: TsRichTextParams);
function SplitStr(const AText: String; ADelimiter: Char): TStringArray;
function SafeQuoteStr(AString: String): String;
function UnquoteStr(AString: String): String;
function InitSearchParams(ASearchText: String = ''; AOptions: TsSearchOptions = [];
@@ -2371,6 +2372,25 @@ begin
end;
end;
{@@ ----------------------------------------------------------------------------
Makes sure that the string is encloed by quotes (").
Avoids duplicate quotation.
-------------------------------------------------------------------------------}
function SafeQuoteStr(AString: String): String;
begin
if AString = '' then
Result := '""'
else
if Length(AString) = 1 then
Result := '"' + AString + '"'
else
begin
Result := AString;
if AString[1] <> '"' then Result := '"' + Result;
if AString[Length(AString)] <> '"' then Result := Result + '"';
end;
end;
{@@ ----------------------------------------------------------------------------
Removes quotation characters which enclose a string
-------------------------------------------------------------------------------}