Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
etorth committed Dec 1, 2024
1 parent cc45d88 commit e72d250
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions client/src/xmlparagraphleaf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ XMLParagraphLeaf::XMLParagraphLeaf(tinyxml2::XMLNode *pNode)
, m_event(BEVENT_OFF)
{
if(type() == LEAF_UTF8STR){
m_utf8CharOff = utf8f::buildUTF8Off(UTF8Text());
m_utf8CharOff = utf8f::buildUTF8Off(utf8Text());
if(auto par = m_node->Parent(); par && par->ToElement()){
std::string tagName = par->ToElement()->Name();
std::transform(tagName.begin(), tagName.end(), tagName.begin(), [](unsigned char c)
Expand Down Expand Up @@ -208,8 +208,8 @@ std::tuple<tinyxml2::XMLNode *, tinyxml2::XMLNode *> XMLParagraphLeaf::split(int
tinyxml2::XMLNode *node1 = nullptr;
tinyxml2::XMLNode *node2 = nullptr;

const auto text1 = std::string(UTF8Text() , m_utf8CharOff.at(cursor));
const auto text2 = std::string(UTF8Text() + m_utf8CharOff.at(cursor));
const auto text1 = std::string(utf8Text() , m_utf8CharOff.at(cursor));
const auto text2 = std::string(utf8Text() + m_utf8CharOff.at(cursor));

if(m_node->GetDocument() == &doc1){
node1 = m_node;
Expand All @@ -229,7 +229,7 @@ std::tuple<tinyxml2::XMLNode *, tinyxml2::XMLNode *> XMLParagraphLeaf::split(int
node2->SetValue(text2.c_str());

if(node1 == m_node || node2 == m_node){
m_utf8CharOff = utf8f::buildUTF8Off(UTF8Text());
m_utf8CharOff = utf8f::buildUTF8Off(utf8Text());
}

return {node1, node2};
Expand Down
2 changes: 1 addition & 1 deletion client/src/xmlparagraphleaf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class XMLParagraphLeaf
return const_cast<std::vector<int> &>(static_cast<const XMLParagraphLeaf *>(this)->utf8CharOffRef());
}

const char *UTF8Text() const
const char *utf8Text() const
{
if(type() != LEAF_UTF8STR){
return nullptr;
Expand Down
2 changes: 1 addition & 1 deletion client/src/xmltypeset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ std::string XMLTypeset::getText(bool textOnly) const
switch(auto leafType = m_paragraph->leaf(i).type()){
case LEAF_UTF8STR:
{
plainString += m_paragraph->leaf(i).UTF8Text();
plainString += m_paragraph->leaf(i).utf8Text();
break;
}
case LEAF_IMAGE:
Expand Down

0 comments on commit e72d250

Please sign in to comment.