X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/351c06476dc470bb8b7e59d121d19306ee37cef5..8fd7108e7cfd6d3564a71ab5f49c391613e27798:/src/richtext/richtextbuffer.cpp diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index 40c6c9e7b7..d68e8fc61f 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -688,6 +688,7 @@ void wxRichTextParagraphLayoutBox::Copy(const wxRichTextParagraphLayoutBox& obj) wxRichTextBox::Copy(obj); m_partialParagraph = obj.m_partialParagraph; + m_defaultAttributes = obj.m_defaultAttributes; } /// Get/set the size for the given range. @@ -8170,18 +8171,6 @@ bool wxRichTextImageBlock::Load(wxImage& image) return success; } -// Array used in DecToHex conversion routine. -static char hexArray[] = "0123456789ABCDEF"; - -// Convert decimal integer to 2-character hex string -inline void wxRichTextDecToHex(int dec, char* buf) -{ - int firstDigit = (int)(dec/16.0); - int secondDigit = (int)(dec - (firstDigit*16.0)); - buf[0] = hexArray[firstDigit]; - buf[1] = hexArray[secondDigit]; -} - // Write data in hex to a stream bool wxRichTextImageBlock::WriteHex(wxOutputStream& stream) { @@ -8205,7 +8194,7 @@ bool wxRichTextImageBlock::WriteHex(wxOutputStream& stream) char* b = buf; for (i = 0; i < (n/2); i++) { - wxRichTextDecToHex(m_data[j], b); + wxDecToHex(m_data[j], b, b+1); b += 2; j ++; }