[calligra] libs/kotext/styles: Correctly roundtrip use-window-color.

C. Boemann cbo at boemann.dk
Sat Mar 24 17:10:56 GMT 2012


ok to backport

On Saturday 24 March 2012 07:12:09 Thorsten Zachmann wrote:
> Git commit 10128edd6776b25e493ccd919792b6877cdca52d by Thorsten Zachmann.
> Committed on 24/03/2012 at 06:51.
> Pushed by zachmann into branch 'master'.
> 
> Correctly roundtrip use-window-color.
> 
> Before the patch when saving the document attached to bug 296666
> additionally to the use-window-color also a fo:color was saved. However
> this attributes needs to be stripped when a inherited style sets the
> use-window-color
> 
> BUG: 296666
> 
> Please review so I can backport to 2.4 branch.
> 
> Roundtrip tested with my odp and odt test set.
> 
> CCMAIL: calligra-devel at kde.org
> 
> M  +4    -0    libs/kotext/styles/KoCharacterStyle.cpp
> 
> http://commits.kde.org/calligra/10128edd6776b25e493ccd919792b6877cdca52d
> 
> diff --git a/libs/kotext/styles/KoCharacterStyle.cpp
> b/libs/kotext/styles/KoCharacterStyle.cpp index 73b6910..115d6b4 100644
> --- a/libs/kotext/styles/KoCharacterStyle.cpp
> +++ b/libs/kotext/styles/KoCharacterStyle.cpp
> @@ -482,6 +482,10 @@ void KoCharacterStyle::applyStyle(QTextCharFormat
> &format) const if (it.key() == QTextFormat::ForegroundBrush) {
>                 
> clearProperty.append(KoCharacterStyle::UseWindowFontColor); }
> +            else if (it.key() == KoCharacterStyle::UseWindowFontColor) {
> +                clearProperty.append(QTextFormat::ForegroundBrush);
> +            }
> +
>          }
>          ++it;
>      }
> 
> _______________________________________________
> calligra-devel mailing list
> calligra-devel at kde.org
> https://mail.kde.org/mailman/listinfo/calligra-devel



More information about the calligra-devel mailing list