Remove carriage return characters from textboxes
This commit is contained in:
parent
06d9fb68f3
commit
244a4fa718
5 changed files with 14 additions and 4 deletions
|
|
@ -45,9 +45,13 @@ class TextData {
|
|||
struct Paragraph {
|
||||
std::string text;
|
||||
ParagraphStyleData pStyleData;
|
||||
template<typename Archive> void serialize(Archive& a) {
|
||||
template<typename Archive> void save(Archive& a) const {
|
||||
a(text, pStyleData);
|
||||
}
|
||||
template<typename Archive> void load(Archive& a) {
|
||||
a(text, pStyleData);
|
||||
std::erase(text, '\r'); // Remove \r characters from older versions
|
||||
}
|
||||
};
|
||||
std::string get_serialized() const;
|
||||
static TextData deserialize_string(std::string& s);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue