[Libreoffice-commits] core.git: cui/source

pv2k vidhey96 at gmail.com
Sat Aug 12 02:41:42 UTC 2017


 cui/source/tabpages/tpgradnt.cxx |   16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

New commits:
commit bfdd81f72c817ad5cb3fb0ec8636f3a8f08e9170
Author: pv2k <vidhey96 at gmail.com>
Date:   Wed Jun 14 22:26:13 2017 +0530

    tdf#105966 Solved Increment:Automatic checkbox problem in Area->Gradient tab
    
    Change-Id: I7025b63df830853867b1b6dd17b7985ec16be83b
    Reviewed-on: https://gerrit.libreoffice.org/38882
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>

diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index aa58716c61cf..2e38b9db1db0 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -244,7 +244,8 @@ bool SvxGradientTabPage::FillItemSet( SfxItemSet* rSet )
                     (sal_uInt16) m_pMtrCenterY->GetValue(),
                     (sal_uInt16) m_pMtrBorder->GetValue(),
                     (sal_uInt16) m_pMtrColorFrom->GetValue(),
-                    (sal_uInt16) m_pMtrColorTo->GetValue() ));
+                    (sal_uInt16) m_pMtrColorTo->GetValue(),
+                    (sal_uInt16) m_pMtrIncrement->GetValue() ));
     }
 
     sal_uInt16 nValue = 0;
@@ -340,7 +341,8 @@ void SvxGradientTabPage::ModifiedHdl_Impl( void const * pControl )
                           (sal_uInt16) m_pMtrCenterY->GetValue(),
                           (sal_uInt16) m_pMtrBorder->GetValue(),
                           (sal_uInt16) m_pMtrColorFrom->GetValue(),
-                          (sal_uInt16) m_pMtrColorTo->GetValue() );
+                          (sal_uInt16) m_pMtrColorTo->GetValue(),
+                          (sal_uInt16) m_pMtrIncrement->GetValue() );
 
     // enable/disable controls
     if( pControl == m_pLbGradientType || pControl == this )
@@ -415,7 +417,8 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickAddHdl_Impl, Button*, void)
                               (sal_uInt16) m_pMtrCenterY->GetValue(),
                               (sal_uInt16) m_pMtrBorder->GetValue(),
                               (sal_uInt16) m_pMtrColorFrom->GetValue(),
-                              (sal_uInt16) m_pMtrColorTo->GetValue() );
+                              (sal_uInt16) m_pMtrColorTo->GetValue(),
+                              (sal_uInt16) m_pMtrIncrement->GetValue() );
 
         m_pGradientList->Insert(o3tl::make_unique<XGradientEntry>(aXGradient, aName), nCount);
 
@@ -453,7 +456,8 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickModifyHdl_Impl, Button*, void)
                               (sal_uInt16) m_pMtrCenterY->GetValue(),
                               (sal_uInt16) m_pMtrBorder->GetValue(),
                               (sal_uInt16) m_pMtrColorFrom->GetValue(),
-                              (sal_uInt16) m_pMtrColorTo->GetValue() );
+                              (sal_uInt16) m_pMtrColorTo->GetValue(),
+                              (sal_uInt16) m_pMtrIncrement->GetValue() );
 
         m_pGradientList->Replace(o3tl::make_unique<XGradientEntry>(aXGradient, aName), nPos);
 
@@ -573,8 +577,8 @@ void SvxGradientTabPage::ChangeGradientHdl_Impl()
     if( pGradient )
     {
         css::awt::GradientStyle eXGS = pGradient->GetGradientStyle();
-        sal_uInt16 nValue = static_cast<const XGradientStepCountItem&>( m_rOutAttrs.Get( XATTR_GRADIENTSTEPCOUNT ) ).GetValue();
-        if(nValue == 0)
+        sal_uInt16 nValue = pGradient->GetSteps();
+        if( nValue == 0 )
         {
             m_pCbIncrement->SetState(TRISTATE_TRUE);
             m_pMtrIncrement->Disable();


More information about the Libreoffice-commits mailing list