diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2023-08-14 22:28:16 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2023-08-23 23:17:00 +0200 |
commit | 37203cb43758048134584f7d52efbc9b3dc59f65 (patch) | |
tree | de6f381f047ad9573abc4d0f2d4fd6498c84fa2f /cui | |
parent | ad873064b0135e4e00389cd38c7de688286c1fa1 (diff) |
Fix setting ComplexColor for lines/strokes through the dialog
Setting the line/stroke color through the (tab) dialog did not
work as the complex colors was not set to the XLineColorItem.
Change-Id: Ie1404264f2f82964fe3a5507a6f61ba269254134
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155683
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/tabpages/tpline.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index cbb6a6c1a6d1..37fe8ef913b0 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -456,8 +456,10 @@ bool SvxLineTabPage::FillItemSet( SfxItemSet* rAttrs ) // Line color if (m_xLbColor->IsValueChangedFromSaved()) { - NamedColor aColor = m_xLbColor->GetSelectedEntry(); - XLineColorItem aItem(aColor.m_aName, aColor.m_aColor); + NamedColor aNamedColor = m_xLbColor->GetSelectedEntry(); + XLineColorItem aItem(aNamedColor.m_aName, aNamedColor.m_aColor); + aItem.setComplexColor(aNamedColor.getComplexColor()); + pOld = GetOldItem( *rAttrs, XATTR_LINECOLOR ); if ( !pOld || !( *static_cast<const XLineColorItem*>(pOld) == aItem ) ) { @@ -758,8 +760,10 @@ void SvxLineTabPage::FillXLSet_Impl() m_rXLSet.Put( XLineEndWidthItem( GetCoreValue( *m_xMtrEndWidth, m_ePoolUnit ) ) ); m_rXLSet.Put( XLineWidthItem( GetCoreValue( *m_xMtrLineWidth, m_ePoolUnit ) ) ); - NamedColor aColor = m_xLbColor->GetSelectedEntry(); - m_rXLSet.Put(XLineColorItem(aColor.m_aName, aColor.m_aColor)); + NamedColor aNamedColor = m_xLbColor->GetSelectedEntry(); + XLineColorItem aLineColor(aNamedColor.m_aName, aNamedColor.m_aColor); + aLineColor.setComplexColor(aNamedColor.getComplexColor()); + m_rXLSet.Put(aLineColor); // Centered line end if( m_xTsbCenterStart->get_state() == TRISTATE_TRUE ) |