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

Stephan Bergmann sbergman at redhat.com
Wed Jul 8 08:55:07 PDT 2015


 svx/source/sidebar/shadow/ShadowPropertyPanel.cxx |   56 +++++++++++-----------
 svx/source/sidebar/shadow/ShadowPropertyPanel.hxx |    2 
 2 files changed, 29 insertions(+), 29 deletions(-)

New commits:
commit feab17bc3626b5d1585d91ce006b4b9105483c1f
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Jul 8 17:54:36 2015 +0200

    various warnings
    
    Change-Id: Id3a56d628088f19424bd6e0c8bf23b0ac6c64d25

diff --git a/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx b/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx
index bfb1d0a..a027abc 100644
--- a/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx
+++ b/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx
@@ -28,6 +28,35 @@ using namespace css;
 using namespace css::uno;
 using sfx2::sidebar::Theme;
 
+namespace {
+
+sal_uInt32 ParseText(OUString const & sTmp)
+{
+    if (sTmp.isEmpty())
+        return 0;
+    sal_Unicode nChar = sTmp[0];
+    if( nChar == '-' )
+    {
+        if (sTmp.getLength() < 2)
+            return 0;
+        nChar = sTmp[1];
+    }
+
+    if( (nChar < '0') || (nChar > '9') )
+        return 0;
+
+    const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
+    const sal_Unicode cSep = rLocaleWrapper.getNumDecimalSep()[0];
+
+    rtl_math_ConversionStatus eStatus;
+    double fTmp = rtl::math::stringToDouble( sTmp, cSep, 0, &eStatus);
+    if (eStatus != rtl_math_ConversionStatus_Ok)
+        return 0;
+
+    return fTmp;
+}
+
+}
 
 namespace svx { namespace sidebar {
 
@@ -171,33 +200,6 @@ IMPL_LINK_NOARG(ShadowPropertyPanel, ModifyShadowDistanceHdl)
     return 0;
 }
 
-sal_uInt32 ShadowPropertyPanel::ParseText(OUString sTmp)
-{
-    if (sTmp.isEmpty())
-        return 0;
-    sal_Unicode nChar = sTmp[0];
-    if( nChar == '-' )
-    {
-        if (sTmp.getLength() < 2)
-            return 0;
-        nChar = sTmp[1];
-    }
-
-    if( (nChar < '0') || (nChar > '9') )
-        return 0;
-
-    const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
-    const sal_Unicode cSep = rLocaleWrapper.getNumDecimalSep()[0];
-
-    rtl_math_ConversionStatus eStatus;
-    double fTmp = rtl::math::stringToDouble( sTmp, cSep, 0, &eStatus);
-    if (eStatus != rtl_math_ConversionStatus_Ok)
-        return 0;
-
-    return fTmp;
-
-}
-
 void ShadowPropertyPanel::UpdateControls()
 {
     if(mpShowShadow->GetState() == TRISTATE_FALSE)
diff --git a/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx b/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx
index c32f327..520e03d 100644
--- a/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx
+++ b/svx/source/sidebar/shadow/ShadowPropertyPanel.hxx
@@ -65,7 +65,6 @@ private:
     VclPtr<Slider>        mpShadowTransSlider;
     VclPtr<MetricField>   mpShadowTransMetric;
     XColorListRef         pColorList;
-    bool bDisabled;
 
     ::sfx2::sidebar::ControllerItem maShadowController;
     ::sfx2::sidebar::ControllerItem maShadowTransController;
@@ -83,7 +82,6 @@ private:
     void InsertAngleValues();
     void SetTransparencyValue(long);
     void UpdateControls();
-    sal_uInt32 ParseText(OUString pStr);
     DECL_LINK(ClickShadowHdl, void*);
     DECL_LINK(ModifyShadowColorHdl, void*);
     DECL_LINK(ModifyShadowTransMetricHdl, void*);


More information about the Libreoffice-commits mailing list