summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2021-04-21 22:45:48 +0200
committerLászló Németh <nemeth@numbertext.org>2021-05-05 13:48:48 +0200
commit134fb0fdecb898b1568f57e8c9dc8c3528b0d1e0 (patch)
tree18ced39f503a19d34bf92c7f8d77c7ba9afde92b /cui/source
parentb8c5236b444a9fbb1d419b95faf2ab2a71913efe (diff)
tdf#141935 svx cui: apply line cap setting of line styles
Only line dash pattern of the selected line style was applied on the selected line or shape using the 1) Line Style popup menu of Drawing toolbar and sidebar pane Properties and 2) Style popup menu of Line pane of Line setting dialog window. Now both line dash and line cap settings are applied, supporting the usage of the new "rounded" preset styles and the old not "rounded" versions. Follow-up to commit b9b2c6a98fec798fc0ec76ec3cd407724f19dcac "tdf#141933 add preset dash styles with round cap". Change-Id: Ib3f64afcdcb50545166d40476a03a4b45f7d0b8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114461 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/tabpages/tpline.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index 796eda3c51f2..1edf9a56d0bf 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -1312,6 +1312,18 @@ void SvxLineTabPage::ClickInvisibleHdl_Impl()
}
else
{
+ // set cap style associated to the line style
+ sal_Int32 nPos = m_xLbLineStyle->get_active();
+ if( nPos > 1 && m_pDashList->Count() > static_cast<tools::Long>( nPos - 2 ) )
+ {
+ css::drawing::DashStyle eStyle =
+ m_pDashList->GetDash( nPos - 2 )->GetDash().GetDashStyle();
+ if ( eStyle == drawing::DashStyle_RECT || eStyle == drawing::DashStyle_RECTRELATIVE)
+ m_xLBCapStyle->set_active(0);
+ else
+ m_xLBCapStyle->set_active(1);
+ }
+
m_xBoxColor->set_sensitive(true);
m_xBoxWidth->set_sensitive(true);