18 , m_nEncoding(RTL_TEXTENCODING_DONTKNOW)
56 auto pTemp =
static_cast<const SmTextNode*
>(pNode);
57 SAL_INFO(
"starmath.rtf",
"Text: " << pTemp->GetText());
58 for (sal_Int32
i = 0;
i < pTemp->GetText().
getLength();
i++)
60 sal_uInt16 nChar = pTemp->GetText()[
i];
183 auto txtnode =
static_cast<const SmTextNode*
>(node);
184 if (txtnode->GetText().isEmpty())
186 assert(txtnode->GetText().getLength() == 1);
188 OUString aValue(chr);
258 if (subsup->GetSubSup(
CSUB))
269 SAL_INFO(
"starmath.rtf",
"TODO: " << __func__ <<
" unhandled oper type");
299 else if ((flags & (1 <<
RSUB)) == 1 <<
RSUB)
304 flags &= ~(1 <<
RSUB);
315 else if ((flags & (1 <<
RSUP)) == 1 <<
RSUP)
320 flags &= ~(1 <<
RSUP);
350 else if ((flags & (1 <<
CSUB)) == (1 <<
CSUB))
355 flags &= ~(1 <<
CSUB);
366 else if ((flags & (1 <<
CSUP)) == (1 <<
CSUP))
371 flags &= ~(1 <<
CSUP);
383 SAL_INFO(
"starmath.rtf",
"TODO: " << __func__ <<
" unhandled subsup type");
389 for (
size_t row = 0; row < pNode->
GetNumRows(); ++row)
411 std::vector<const SmNode*> subnodes;
415 bool separatorWritten =
false;
416 for (
size_t i = 0;
i < body->GetNumSubNodes(); ++
i)
424 if (!separatorWritten)
429 separatorWritten =
true;
433 subnodes.push_back(subnode);
437 subnodes.push_back(pNode->
Body());
442 for (
const SmNode* subnode : subnodes)
472 .append(
top ?
"top" :
"bot")
475 .append(
top ?
"bot" :
"top")
490 SAL_INFO(
"starmath.rtf",
"TODO: " << __func__ <<
" unhandled vertical brace type");
::boost::spirit::classic::rule< ScannerT > argument
const SmNode * Body() const
Gets the body data ( the nodes affected by the attribute ).
const SmNode * Attribute() const
Gets the attribute data.
Node for brace construction.
const SmMathSymbolNode * OpeningBrace() const
Returns the node containing the data of the opening brace.
const SmNode * Body() const
Returns the node containing the data of what is between braces.
const SmMathSymbolNode * ClosingBrace() const
Returns the node containing the data of the closing brace.
sal_uInt16 GetNumRows() const
Gets the number of rows of the matrix.
sal_uInt16 GetNumCols() const
Gets the number of columns of the matrix.
virtual size_t GetNumSubNodes() const =0
Gets the number of subnodes.
const SmToken & GetToken() const
Gets the token.
virtual SmNode * GetSubNode(size_t nIndex)=0
Gets the subnode of index nIndex.
SmNodeType GetType() const
Gets the node type.
const SmNode * GetSymbol() const
Returns the node with the operator data.
const SmNode * Body() const
Returns the node containing the data inside the root.
const SmNode * Argument() const
Returns the node containing the data of the order of the root.
void HandleBlank() override
OStringBuffer * m_pBuffer
void HandleText(const SmNode *pNode, int nLevel) override
void HandleVerticalStack(const SmNode *pNode, int nLevel) override
void HandleMatrix(const SmMatrixNode *pNode, int nLevel) override
void HandleFractions(const SmNode *pNode, int nLevel, const char *type) override
rtl_TextEncoding m_nEncoding
void HandleVerticalBrace(const SmVerticalBraceNode *pNode, int nLevel) override
void HandleBrace(const SmBraceNode *pNode, int nLevel) override
void HandleSubSupScriptInternal(const SmSubSupNode *pNode, int nLevel, int flags) override
void ConvertFromStarMath(OStringBuffer &rBuffer, rtl_TextEncoding nEncoding)
void HandleAttribute(const SmAttributeNode *pNode, int nLevel) override
SmRtfExport(const SmNode *pIn)
void HandleRoot(const SmRootNode *pNode, int nLevel) override
void HandleOperator(const SmOperNode *pNode, int nLevel) override
virtual SmNode * GetSubNode(size_t nIndex) override
Gets the subnode of index nIndex.
Super- and subscript node.
const SmNode * GetBody() const
Returns the node with the data of what has to be superindex or subindex.
const SmNode * GetSubSup(SmSubSup eSubSup) const
Gets the node with the data of what has to be superindex or subindex.
static sal_Unicode ConvertSymbolToUnicode(sal_Unicode nIn)
Converts the character from StarMath's private area symbols to a matching Unicode character,...
Node for vertical brace construction.
const SmMathSymbolNode * Brace() const
Returns the node containing the data of the brace.
const SmNode * Script() const
Returns the node containing the data of what is in the brace.
const SmNode * Body() const
Returns the node containing the data of what the brace is pointing for.
Base class implementing writing of formulas to Word.
void HandleAllSubNodes(const SmNode *pNode, int nLevel)
const SmNode * GetTree() const
void HandleNode(const SmNode *pNode, int nLevel)
sal_uInt8 m_pBuffer[RTL_DIGEST_LENGTH_SHA1]
#define SAL_INFO(area, stream)
RttiCompleteObjectLocator col
double getLength(const B2DPolygon &rCandidate)
OString OutString(std::u16string_view rStr, rtl_TextEncoding eDestEnc, bool bUnicode=true)
static OString mathSymbolToString(const SmNode *node)
#define LO_STRING_SVTOOLS_RTF_MSUBHIDE
#define LO_STRING_SVTOOLS_RTF_MBORDERBOX
#define LO_STRING_SVTOOLS_RTF_MSSUP
#define LO_STRING_SVTOOLS_RTF_MF
#define LO_STRING_SVTOOLS_RTF_MMR
#define LO_STRING_SVTOOLS_RTF_MBAR
#define LO_STRING_SVTOOLS_RTF_MRADPR
#define LO_STRING_SVTOOLS_RTF_MRAD
#define LO_STRING_SVTOOLS_RTF_MNOR
#define LO_STRING_SVTOOLS_RTF_MFUNC
#define LO_STRING_SVTOOLS_RTF_MSTRIKEH
#define LO_STRING_SVTOOLS_RTF_MHIDELEFT
#define LO_STRING_SVTOOLS_RTF_MDEGHIDE
#define LO_STRING_SVTOOLS_RTF_MSPRE
#define LO_STRING_SVTOOLS_RTF_MGROUPCHRPR
#define LO_STRING_SVTOOLS_RTF_MACCPR
#define LO_STRING_SVTOOLS_RTF_MVERTJC
#define LO_STRING_SVTOOLS_RTF_MLIM
#define LO_STRING_SVTOOLS_RTF_MBORDERBOXPR
#define LO_STRING_SVTOOLS_RTF_MFPR
#define LO_STRING_SVTOOLS_RTF_MDPR
#define LO_STRING_SVTOOLS_RTF_MSUPHIDE
#define LO_STRING_SVTOOLS_RTF_MHIDEBOT
#define LO_STRING_SVTOOLS_RTF_MD
#define LO_STRING_SVTOOLS_RTF_MSSUBSUP
#define LO_STRING_SVTOOLS_RTF_MNARYPR
#define LO_STRING_SVTOOLS_RTF_ME
#define LO_STRING_SVTOOLS_RTF_MTYPE
#define LO_STRING_SVTOOLS_RTF_MSUP
#define LO_STRING_SVTOOLS_RTF_MHIDERIGHT
#define LO_STRING_SVTOOLS_RTF_MOMATH
#define LO_STRING_SVTOOLS_RTF_MHIDETOP
#define LO_STRING_SVTOOLS_RTF_MFNAME
#define LO_STRING_SVTOOLS_RTF_MDEG
#define LO_STRING_SVTOOLS_RTF_MDEN
#define LO_STRING_SVTOOLS_RTF_MNARY
#define LO_STRING_SVTOOLS_RTF_MBARPR
#define LO_STRING_SVTOOLS_RTF_MR
#define LO_STRING_SVTOOLS_RTF_MLIMLOW
#define LO_STRING_SVTOOLS_RTF_MGROUPCHR
#define LO_STRING_SVTOOLS_RTF_MBEGCHR
#define LO_STRING_SVTOOLS_RTF_MNUM
#define OOO_STRING_SVTOOLS_RTF_IGNORE
#define LO_STRING_SVTOOLS_RTF_MLIMUPP
#define LO_STRING_SVTOOLS_RTF_MPOS
#define LO_STRING_SVTOOLS_RTF_MENDCHR
#define LO_STRING_SVTOOLS_RTF_MM
#define LO_STRING_SVTOOLS_RTF_MEQARR
#define LO_STRING_SVTOOLS_RTF_MSUB
#define LO_STRING_SVTOOLS_RTF_MSEPCHR
#define LO_STRING_SVTOOLS_RTF_MSSUB
#define LO_STRING_SVTOOLS_RTF_MACC
#define LO_STRING_SVTOOLS_RTF_MCHR