Kaydet (Commit) e8f4bf9d authored tarafından Julien Nabet's avatar Julien Nabet

Add comment about this "weird assignment" in editdoc

See http://document-foundation-mail-archive.969070.n3.nabble.com/Fishy-assignment-in-editdoc-editeng-td4262109.html

Remove the previous comment less clear

Change-Id: I06b0bc3254068d58146d9582c2b69afbadbe56ee
Reviewed-on: https://gerrit.libreoffice.org/73062Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
üst 8e2bd8fb
......@@ -2025,10 +2025,12 @@ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, S
if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_RELIEF ) == SfxItemState::SET ) )
rFont.SetRelief( rSet.Get( EE_CHAR_RELIEF ).GetValue() );
// If comparing the entire font, or if checking before each alteration
// whether the value changes, remains relatively the same thing.
// So possible one MakeUniqFont more in the font, but as a result a quicker
// abortion of the query, or one must each time check bChanged.
// Operator == compares the individual members of the font if the impl pointer is
// not equal. If all members are the same, this assignment makes
// sure that both also point to the same internal instance of the font.
// To avoid this assignment, you would need to check in
// every if statement above whether or not the new value differs from the
// old value before making an assignment.
if ( rFont == aPrevFont )
rFont = aPrevFont; // => The same ImpPointer for IsSameInstance
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment