Skip to content

Commit

Permalink
add phonetic properties to rich text hasher
Browse files Browse the repository at this point in the history
  • Loading branch information
tfussell committed Jan 7, 2020
1 parent dbc0ddd commit 4e5daa7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/xlnt/cell/rich_text.hpp
Expand Up @@ -172,6 +172,13 @@ class XLNT_API rich_text_hash
res ^= std::hash<std::string>()(r.first);
}

for (auto r : k.phonetic_runs())
{
auto encoded = r.text + " " + std::to_string(r.start) + " "
+ std::to_string(r.end) + " " + (r.preserve_space ? "preserve" : "");
res ^= std::hash<std::string>()(encoded);
}

return res;
}
};
Expand Down

0 comments on commit 4e5daa7

Please sign in to comment.