mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
refactoring math
This commit is contained in:
@ -111,7 +111,7 @@ namespace odf_writer
|
||||
|
||||
odf_math_context::odf_math_context(odf_conversion_context *odf_context)
|
||||
: impl_(new odf_math_context::Impl(odf_context)),
|
||||
lvl_of_me(0), style_flag(true), counter(0), symbol_counter(0), annotation_flag(true), annotation_oper_flag(false), matrix_row_counter(0)
|
||||
lvl_of_me(0), style_flag(true), counter(0), symbol_counter(0), matrix_row_counter(0)
|
||||
{
|
||||
mo = { L'+', L'-', L'±', L'∓', L'∙', L'×', L'∗', L'÷', L'/', L'≂', L'⊕', L'⊖', L'⊙', L'⊗', L'⊘', L'∘', L'¬', L'∧', L'∨', // un/bi operators
|
||||
L'=', L'≠', L'<', L'≤', L'>', L'≥', L'≪', L'≫', L'≈', L'~', L'≃', L'≡', L'∝', L'∥', L'⟂', L'|', L'∤', L'→', L'⊷', // relations
|
||||
@ -129,22 +129,6 @@ namespace odf_writer
|
||||
//{L'', L''}, { L'', L'' }, { L'', L'' }, { L'', L'' }, { L'', L'' }, { L'', L'' }, { L'', L'' }
|
||||
};
|
||||
|
||||
annotation_diak_symbols = { {L"˙",L"dot"}, {L"¨",L"ddot"}, {L"⃛",L"dddot"}, {L"˄", L"hat"}, {L"ˇ",L"check"}, {L"´",L"acute"}, {L"ˋ",L"grave"}, {L"˘",L"breve"},
|
||||
{L"~",L"tilde"},{L"¯",L"overline"},{L"→",L"vec"}, {L"⇀",L"harpoon"}, {L"-",L"underline"}/*, {L"",L""}, {L"",L""}, {L"",L""}, {L"",L""}, {L"",L""}, {L"",L""},{L"",L""},
|
||||
{L"",L""}*/
|
||||
};
|
||||
|
||||
annotation_operators = { {L"∫",L"int"}, {L"∬", L"iint "}, {L"∭", L"iiint "}, {L"∮", L"lint "}, {L"∯", L"llint "},
|
||||
{L"∰", L"lllint "}, {L"∑", L"sum "}, {L"∏", L"prod "}, {L"∐", L"coprod "}
|
||||
|
||||
};
|
||||
|
||||
annotation_brackets_begin = { {L"(", L"("}, {L"[", L"["}, {L"{", L"lbrace"}, {L"⟨", L"langle"}, {L"〈", L"langle"}, {L"⌊", L"lfloor"}, {L"⌈", L"lceil"}, {L"|", L"lline"}, {L"‖", L"ldline"},
|
||||
{L"]", L"]"}, {L"⟦", L"ldbracket"}
|
||||
};
|
||||
annotation_brackets_end = { {L")", L")"}, {L"]", L"]"}, {L"}", L"rbrace"}, {L"⟩", L"rangle"}, {L"〉", L"rangle"},{L"⌋", L"rfloor"}, {L"⌉", L"rceil"}, {L"|", L"rline"}, {L"‖", L"rdline"},
|
||||
{L"[", L"["}, {L"⟧", L"rdbracket"}
|
||||
};
|
||||
lvl_counter = 1;
|
||||
lvl_up_counter = 1;
|
||||
lvl_down_counter = -1;
|
||||
|
||||
@ -112,7 +112,6 @@ namespace cpdoccore {
|
||||
void end_element();
|
||||
|
||||
std::vector<std::vector<std::wstring>> brackets;
|
||||
std::wstring annotation;
|
||||
int lvl_of_me = 0;
|
||||
int matrix_row_counter = 0;
|
||||
std::vector<int> end_counter;
|
||||
@ -129,13 +128,7 @@ namespace cpdoccore {
|
||||
double size = 0;
|
||||
std::set<wchar_t> mo;
|
||||
std::map<std::wstring, std::wstring> diak_symbols;
|
||||
bool annotation_flag;
|
||||
bool annotation_oper_flag;
|
||||
std::map<std::wstring, std::wstring> annotation_operators;
|
||||
std::map<std::wstring, std::wstring> annotation_brackets_begin;
|
||||
std::map<std::wstring, std::wstring> annotation_brackets_end;
|
||||
std::map<std::wstring, std::wstring> annotation_diak_symbols;
|
||||
//std::pair<std::set<std::string>, bool> annotation_from_to_operators;
|
||||
|
||||
void end_math();
|
||||
|
||||
std::wofstream debug_stream;
|
||||
|
||||
Reference in New Issue
Block a user