summaryrefslogtreecommitdiff
path: root/editeng/source
diff options
context:
space:
mode:
authorPranam Lashkari <lpranam@collabora.com>2024-08-30 03:18:22 +0200
committerPranam Lashkari <lpranam@collabora.com>2024-08-30 04:41:57 +0200
commit45330b2a16cc882ab0a7fe95dfe92879a15a7f96 (patch)
tree20959e7ace60c331861621ff018d77a7bba094a7 /editeng/source
parentad0925dc02cc7ac42dfd25ad433ba954e7fc04ef (diff)
Revert "Fix font color must not change depending on background"
Resolves tdf#159541-Fix font color must not change depending on background This reverts commit 8534ad7b7b9aae2520d731cf748ff0aadfe2f0ed. Reason for revert: not needed on this branch. incorrect automatic font color was chosen with certain background colors. the original patch was fix for a regression from ddb483509113e469b771320fea52f1b089574021. But that regressive patch doesn't exist on this branch and thus reverting this patch Change-Id: I0d1d24858243bac759feba2b1a71e5501e0aae72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172621 Reviewed-by: Pranam Lashkari <lpranam@collabora.com> Tested-by: Pranam Lashkari <lpranam@collabora.com>
Diffstat (limited to 'editeng/source')
-rw-r--r--editeng/source/editeng/impedit3.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index afef27787738..096550bde30d 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -4729,13 +4729,13 @@ Color ImpEditEngine::GetAutoColor() const
}
else
{
- aColor = GetColorConfig().GetColorValue(svtools::FONTCOLOR, false).nColor;
+ aColor = GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor;
- if ( aColor == COL_AUTO )
+ if ( GetBackgroundColor() != COL_AUTO )
{
- if ( GetBackgroundColor().IsDark() )
+ if ( GetBackgroundColor().IsDark() && aColor.IsDark() )
aColor = COL_WHITE;
- else
+ else if ( GetBackgroundColor().IsBright() && aColor.IsBright() )
aColor = COL_BLACK;
}
}