[Libreoffice-commits] core.git: include/vcl vcl/source

Noel Grandin noelgrandin at gmail.com
Wed Sep 9 01:10:00 PDT 2015


 include/vcl/field.hxx           |    3 ---
 vcl/source/control/field.cxx    |   36 ------------------------------------
 vcl/source/control/field2.cxx   |   12 ------------
 vcl/source/control/longcurr.cxx |   14 --------------
 4 files changed, 65 deletions(-)

New commits:
commit 61afb4bebafe6e615611e74b17ce0fc43648813f
Author: Noel Grandin <noelgrandin at gmail.com>
Date:   Sun Sep 6 18:41:59 2015 +0200

    remove unused Link<> field
    
    Change-Id: I8832a303ae2ac384e49488835df6b2d145ebbfcd
    Reviewed-on: https://gerrit.libreoffice.org/18430
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/include/vcl/field.hxx b/include/vcl/field.hxx
index d5503cd..e6e117e 100644
--- a/include/vcl/field.hxx
+++ b/include/vcl/field.hxx
@@ -43,7 +43,6 @@ class VCL_DLLPUBLIC FormatterBase
 private:
     VclPtr<Edit>            mpField;
     LocaleDataWrapper*      mpLocaleDataWrapper;
-    Link<>                  maErrorLink;
     bool                    mbReformat;
     bool                    mbStrictFormat;
     bool                    mbEmptyFieldValue;
@@ -83,8 +82,6 @@ public:
 
     const AllSettings&      GetFieldSettings() const;
 
-    const Link<>&           GetErrorHdl() const                 { return maErrorLink; }
-
     void                    SetEmptyFieldValue();
     bool                    IsEmptyFieldValue() const;
 
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index cb6b46b..41a72a9 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -495,18 +495,6 @@ bool NumericFormatter::ImplNumericReformat( const OUString& rStr, sal_Int64& rVa
     {
         sal_Int64 nTempVal = ClipAgainstMinMax(rValue);
 
-        if ( GetErrorHdl().IsSet() && (rValue != nTempVal) )
-        {
-            mnCorrectedValue = nTempVal;
-            if ( !GetErrorHdl().Call( this ) )
-            {
-                mnCorrectedValue = 0;
-                return false;
-            }
-            else
-                mnCorrectedValue = 0;
-        }
-
         rOutStr = CreateFieldText( nTempVal );
         return true;
     }
@@ -1396,18 +1384,6 @@ bool MetricFormatter::ImplMetricReformat( const OUString& rStr, double& rValue,
         else if ( nTempVal < GetMin())
             nTempVal = (double)GetMin();
 
-        if ( GetErrorHdl().IsSet() && (rValue != nTempVal) )
-        {
-            mnCorrectedValue = (sal_Int64)nTempVal;
-            if ( !GetErrorHdl().Call( this ) )
-            {
-                mnCorrectedValue = 0;
-                return false;
-            }
-            else
-                mnCorrectedValue = 0;
-        }
-
         rOutStr = CreateFieldText( (sal_Int64)nTempVal );
         return true;
     }
@@ -1950,18 +1926,6 @@ bool CurrencyFormatter::ImplCurrencyReformat( const OUString& rStr, OUString& rO
         else if ( nTempVal < GetMin())
             nTempVal = GetMin();
 
-        if ( GetErrorHdl().IsSet() && (nValue != nTempVal) )
-        {
-            mnCorrectedValue = nTempVal;
-            if ( !GetErrorHdl().Call( this ) )
-            {
-                mnCorrectedValue = 0;
-                return false;
-            }
-            else
-                mnCorrectedValue = 0;
-        }
-
         rOutStr = CreateFieldText( nTempVal );
         return true;
     }
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index f47d6c4..b3241e1 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -1114,12 +1114,6 @@ bool DateFormatter::ImplDateReformat( const OUString& rStr, OUString& rOutStr, c
     else if ( aTempDate < GetMin() )
         aTempDate = GetMin();
 
-    if ( GetErrorHdl().IsSet() && (aDate != aTempDate) )
-    {
-        if( !GetErrorHdl().Call( this ) )
-            return false;
-    }
-
     rOutStr = ImplGetDateAsText( aTempDate, rSettings );
 
     return true;
@@ -2159,12 +2153,6 @@ bool TimeFormatter::ImplTimeReformat( const OUString& rStr, OUString& rOutStr )
     else if ( aTempTime < GetMin() )
         aTempTime = GetMin();
 
-    if ( GetErrorHdl().IsSet() && (aTime != aTempTime) )
-    {
-        if ( !GetErrorHdl().Call( this ) )
-            return false;
-    }
-
     bool bSecond = false;
     bool b100Sec = false;
     if ( meFormat != TimeFieldFormat::F_NONE )
diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx
index ae9178b..adc4626 100644
--- a/vcl/source/control/longcurr.cxx
+++ b/vcl/source/control/longcurr.cxx
@@ -277,20 +277,6 @@ bool ImplLongCurrencyReformat( const OUString& rStr, BigInt nMin, BigInt nMax,
         else if ( nTempVal < nMin )
             nTempVal = nMin;
 
-        if ( rFormatter.GetErrorHdl().IsSet() && (nValue != nTempVal) )
-        {
-            rFormatter.mnCorrectedValue = nTempVal;
-            if ( !rFormatter.GetErrorHdl().Call( &rFormatter ) )
-            {
-                rFormatter.mnCorrectedValue = 0;
-                return false;
-            }
-            else
-            {
-                rFormatter.mnCorrectedValue = 0;
-            }
-        }
-
         rOutStr = ImplGetCurr( rLocaleDataWrapper, nTempVal, nDecDigits, rFormatter.GetCurrencySymbol(), rFormatter.IsUseThousandSep() );
         return true;
     }


More information about the Libreoffice-commits mailing list