X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/351c06476dc470bb8b7e59d121d19306ee37cef5..143591e943c40bd8264cca2a70d8d8688b224ba7:/src/richtext/richtextbuffer.cpp diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index 40c6c9e7b7..84c330f04e 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. @@ -6322,7 +6323,7 @@ void wxRichTextAction::UpdateAppearance(long caretPosition, bool sendUpdateEvent m_ctrl->Refresh(false); if (sendUpdateEvent) - m_ctrl->SendTextUpdatedEvent(); + wxTextCtrl::SendTextUpdatedEvent(m_ctrl); } } } @@ -6561,6 +6562,9 @@ bool wxTextAttrEqPartial(const wxTextAttrEx& attr1, const wxTextAttrEx& attr2, i attr1.GetFont().GetUnderlined() != attr2.GetFont().GetUnderlined()) return false; + if ((flags & wxTEXT_ATTR_URL) && attr1.GetURL() != attr2.GetURL()) + return false; + if ((flags & wxTEXT_ATTR_ALIGNMENT) && attr1.GetAlignment() != attr2.GetAlignment()) return false; @@ -6667,6 +6671,9 @@ bool wxTextAttrEqPartial(const wxTextAttrEx& attr1, const wxRichTextAttr& attr2, attr1.GetFont().GetUnderlined() != attr2.GetFontUnderlined()) return false; + if ((flags & wxTEXT_ATTR_URL) && attr1.GetURL() != attr2.GetURL()) + return false; + if ((flags & wxTEXT_ATTR_ALIGNMENT) && attr1.GetAlignment() != attr2.GetAlignment()) return false; @@ -8170,18 +8177,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 +8200,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 ++; }