summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2018-06-24 17:38:05 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2018-06-25 15:15:28 +0200
commit415368daf3047a6dfb2577822a72f65df7374df8 (patch)
treeb883c4c87da9ded977ad02ece257e9289739d8eb /svx
parentf220bce256a799e0df45e2419f59e8714b9972e9 (diff)
tdf#117987 tdf#118138 Compare with the currently used color
... when deciding whether to toggle highlighting. Had to move the whole thing into sw, as otherwise there is no way to correctly handle the "brush" mode (as the toolbox controller in svx has no way to know in advance which text will be selected by the user). Change-Id: Id2dec4c3647332e82260d12da1311b249f5b9c12 Reviewed-on: https://gerrit.libreoffice.org/56358 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> (cherry picked from commit 2fd31c75b677b145cf56404348857e60befcabff) Reviewed-on: https://gerrit.libreoffice.org/56375
Diffstat (limited to 'svx')
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx9
1 files changed, 1 insertions, 8 deletions
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 9b67a77d87ba..f73b61cc77ba 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -2773,7 +2773,6 @@ com_sun_star_comp_svx_FontNameToolBoxControl_get_implementation(
SvxColorToolBoxControl::SvxColorToolBoxControl( const css::uno::Reference<css::uno::XComponentContext>& rContext ) :
ImplInheritanceHelper( rContext, nullptr, OUString() ),
m_bSplitButton(true),
- m_bIsNoFill(false),
m_nSlotId(0),
m_aColorSelectFunction(PaletteManager::DispatchColorCommand)
{
@@ -2898,9 +2897,6 @@ VclPtr<vcl::Window> SvxColorToolBoxControl::createPopupWindow( vcl::Window* pPar
IMPL_LINK(SvxColorToolBoxControl, SelectedHdl, const NamedColor&, rColor, void)
{
- if (m_xBtnUpdater->GetCurrentColor() != rColor.first)
- m_bIsNoFill = false;
-
m_xBtnUpdater->Update(rColor.first);
if (m_xPaletteManager)
m_xPaletteManager->SetLastColor(rColor.first);
@@ -2963,11 +2959,8 @@ void SvxColorToolBoxControl::execute(sal_Int16 /*nSelectModifier*/)
Color aColor = m_xPaletteManager->GetLastColor();
auto aArgs( comphelper::InitPropertySequence( {
- { m_aCommandURL.copy(5), css::uno::makeAny( COL_TRANSPARENT ) }
+ { m_aCommandURL.copy(5), css::uno::makeAny(aColor) }
} ) );
- if (!m_bIsNoFill)
- aArgs[0].Value <<= sal_Int32( m_xPaletteManager->GetLastColor() );
- m_bIsNoFill = !m_bIsNoFill;
dispatchCommand( aCommand, aArgs );
OUString sColorName = ("#" + aColor.AsRGBHexString().toAsciiUpperCase());