diff options
author | Justin Luth <jluth@mail.com> | 2022-07-21 13:56:30 -0400 |
---|---|---|
committer | Justin Luth <jluth@mail.com> | 2022-12-19 17:57:10 +0000 |
commit | be3d34b5d6b97c3eb12ab3f84ce2da2ef965a928 (patch) | |
tree | 54d4c4eafeffc090c9726007fde307e103421c0d /svx/source | |
parent | 97e93861dd5ed52d742355f043e9cd628c1bc8f8 (diff) |
[API CHANGE] tdf#85592: deprecate .uno:BackColor, use .uno:CharBackColor
EditEngine stuff uses CharBackColor, while SW used BackColor.
Deprecate the SW-only SID.
What does this do?
It allows the toolbar "Character Highlighting Color"
to work with both body text (previously BackColor)
and comment text(CharBackColor).
Otherwise, the toolbar item was disabled when moving into
a comment. (Shapes/Textboxes got their own formatting toolbar,
so those are unaffected.)
AFAIK, after this commit, SID_ATTR_CHAR_COLOR_BACKGROUND
should still work fine for API calls, or for customized toolbars.
That's why I didn't try to remove it completely - just deprecate.
Do I know what I am doing here?
No, although I'm fairly confident nontheless,
and I've had some good help from reviewers.
Change-Id: I0afcbdb1b91c872f6d47f3c82c573f3b9fea6dfc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137334
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/sidebar/text/TextPropertyPanel.cxx | 2 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx index 1b59a79aa6ed..d5bfc2a480df 100644 --- a/svx/source/sidebar/text/TextPropertyPanel.cxx +++ b/svx/source/sidebar/text/TextPropertyPanel.cxx @@ -145,7 +145,7 @@ void TextPropertyPanel::HandleContextChange ( mxToolBoxFontColor->set_visible(!bWriterText); mxToolBoxFontColorSw->set_visible(bWriterText); - mxToolBoxBackgroundColor->set_visible(bDrawText); + mxToolBoxBackgroundColor->set_visible(bWriterText || bDrawText); mxResetBar->set_visible(bWriterText || bCalcText); mxDefaultBar->set_visible(bDrawText); } diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index b1f54a303e13..4563010ac053 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -3512,7 +3512,7 @@ sal_uInt16 MapCommandToSlotId(const OUString& rCommand) return SID_ATTR_CHAR_COLOR; else if (rCommand == ".uno:FontColor") return SID_ATTR_CHAR_COLOR2; - else if (rCommand == ".uno:BackColor") + else if (rCommand == ".uno:BackColor") // deprecated - use CharBackColor return SID_ATTR_CHAR_COLOR_BACKGROUND; else if (rCommand == ".uno:CharBackColor") return SID_ATTR_CHAR_BACK_COLOR; @@ -3580,6 +3580,7 @@ void SvxColorToolBoxControl::update() addStatusListener( ".uno:CharColorExt"); break; + case SID_ATTR_CHAR_BACK_COLOR: case SID_ATTR_CHAR_COLOR_BACKGROUND: addStatusListener( ".uno:CharBackgroundExt"); break; |