[Libreoffice-commits] .: writerperfect/source xmloff/source xmlsecurity/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Oct 8 14:27:27 PDT 2012


 writerperfect/source/filter/OdgGenerator.cxx                         |   41 ----------
 writerperfect/source/filter/TextRunStyle.cxx                         |    4 
 xmloff/source/core/SettingsExportHelper.cxx                          |   11 --
 xmloff/source/table/XMLTableImport.cxx                               |   10 --
 xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.hxx |   19 ----
 5 files changed, 85 deletions(-)

New commits:
commit d540c322cce4f00418466cf7715ecc2c2f1e95c5
Author: Marcos Paulo de Souza <marcos.souza.org at gmail.com>
Date:   Mon Oct 8 18:15:59 2012 -0300

    Remove more useless code inside "#if 0" blocks
    
    Change-Id: Ifb9f9d2211608b848a5de66e1d19c4815a755907
    Signed-off-by: Marcos Paulo de Souza <marcos.souza.org at gmail.com>
    Reviewed-on: https://gerrit.libreoffice.org/840
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/writerperfect/source/filter/OdgGenerator.cxx b/writerperfect/source/filter/OdgGenerator.cxx
index 0d39862..8661138 100644
--- a/writerperfect/source/filter/OdgGenerator.cxx
+++ b/writerperfect/source/filter/OdgGenerator.cxx
@@ -241,22 +241,6 @@ static inline double cubicBase(double t, double a, double b, double c, double d)
     return (1.0-t)*(1.0-t)*(1.0-t)*a + 3.0*(1.0-t)*(1.0-t)*t*b + 3.0*(1.0-t)*t*t*c + t*t*t*d;
 }
 
-#if 0
-static std::vector<double> cubicExtremes(double a, double b, double c, double d)
-{
-    std::vector<double> vec;
-    double u = -a + 2*b - c;
-    double v = sqrt((-a*(c-d) + b*b - b*(c+d) + c*c));
-    double w = -a + 3.0*b - 3.0*c + d;
-    if (w != 0.0)
-    {
-        vec.push_back((u-v)/w);
-        vec.push_back((u+v)/w);
-    }
-    return vec;
-}
-#endif
-
 static void getCubicBezierBBox(double x0, double y0, double x1, double y1, double x2, double y2, double x, double y,
                                double &xmin, double &ymin, double &xmax, double &ymax)
 {
@@ -265,29 +249,6 @@ static void getCubicBezierBBox(double x0, double y0, double x1, double y1, doubl
     ymin = y0 < y ? y0 : y;
     ymax = y0 > y ? y0 : y;
 
-#if 0
-    std::vector<double> extremes = cubicExtremes(x0, x1, x2, x);
-    for(std::vector<double>::iterator iterX = extremes.begin(); iterX != extremes.end(); ++iterX)
-    {
-        if(*iterX >= 0 && *iterX <= 1)
-        {
-            double tmpx = cubicBase(*iterX, x0, x1, x2, x);
-            xmin = tmpx < xmin ? tmpx : xmin;
-            xmax = tmpx > xmax ? tmpx : xmax;
-        }
-    }
-
-    extremes = cubicExtremes(y0, y1, y2, y);
-    for(std::vector<double>::iterator iterY = extremes.begin(); iterY != extremes.end(); ++iterY)
-    {
-        if(*iterY>=0.0 && *iterY<=1.0)
-        {
-            double tmpy = cubicBase(*iterY, y0, y1, y2, y);
-            ymin = tmpy < ymin ? tmpy : ymin;
-            ymax = tmpy > ymax ? tmpy : ymax;
-        }
-    }
-#else
     for (double t = 0.0; t <= 1.0; t+=0.01)
     {
         double tmpx = cubicBase(t, x0, x1, x2, x);
@@ -297,7 +258,6 @@ static void getCubicBezierBBox(double x0, double y0, double x1, double y1, doubl
         ymin = tmpy < ymin ? tmpy : ymin;
         ymax = tmpy > ymax ? tmpy : ymax;
     }
-#endif
 }
 
 
@@ -763,7 +723,6 @@ void OdgGenerator::startGraphics(const ::WPXPropertyList &propList)
 
 
     TagOpenElement *pStyleDrawingPagePropertiesOpenElement = new TagOpenElement("style:drawing-page-properties");
-    // pStyleDrawingPagePropertiesOpenElement->addAttribute("draw:background-size", "border");
     pStyleDrawingPagePropertiesOpenElement->addAttribute("draw:fill", "none");
     mpImpl->mPageAutomaticStyles.push_back(pStyleDrawingPagePropertiesOpenElement);
 
diff --git a/writerperfect/source/filter/TextRunStyle.cxx b/writerperfect/source/filter/TextRunStyle.cxx
index dbdecae..4c461f9 100644
--- a/writerperfect/source/filter/TextRunStyle.cxx
+++ b/writerperfect/source/filter/TextRunStyle.cxx
@@ -51,10 +51,6 @@ void ParagraphStyle::write(OdfDocumentHandler *pHandler) const
     WPXPropertyList::Iter i(mpPropList);
     for (i.rewind(); i.next(); )
     {
-#if 0
-        if (strcmp(i.key(), "style:list-style-name") == 0)
-            propList.insert("style:list-style-name", i()->getStr());
-#endif
         if (strncmp(i.key(), "fo:margin-",10) == 0)
         {
             if (strcmp(i.key(), "fo:margin-left") == 0 ||
diff --git a/xmloff/source/core/SettingsExportHelper.cxx b/xmloff/source/core/SettingsExportHelper.cxx
index 7d61bdd..1dadead 100644
--- a/xmloff/source/core/SettingsExportHelper.cxx
+++ b/xmloff/source/core/SettingsExportHelper.cxx
@@ -205,22 +205,11 @@ void XMLSettingsExportHelper::exportBool(const sal_Bool bValue, const rtl::OUStr
 
 void XMLSettingsExportHelper::exportByte(const sal_Int8 nValue, const rtl::OUString& rName) const
 {
-#if 0
-    DBG_ASSERT(!rName.isEmpty(), "no name");
-    m_rContext.AddAttribute( XML_NAME, rName );
-    m_rContext.AddAttribute( XML_TYPE, XML_BYTE );
-    m_rContext.StartElement( XML_CONFIG_ITEM, sal_True );
-    rtl::OUStringBuffer sBuffer;
-	::sax::Converter::convertNumber(sBuffer, sal_Int32(nValue));
-    m_rContext.Characters( sBuffer.makeStringAndClear() );
-    m_rContext.EndElement( sal_False );
-#else
     (void) nValue; (void) rName;
     OSL_ENSURE(false, "XMLSettingsExportHelper::exportByte(): #i114162#:\n"
         "config-items of type \"byte\" are not valid ODF, "
         "so storing them is disabled!\n"
         "Use a different type instead (e.g. \"short\").");
-#endif
 }
 void XMLSettingsExportHelper::exportShort(const sal_Int16 nValue, const rtl::OUString& rName) const
 {
diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx
index e564264..75ff917 100644
--- a/xmloff/source/table/XMLTableImport.cxx
+++ b/xmloff/source/table/XMLTableImport.cxx
@@ -472,16 +472,6 @@ SvXMLImportContext * XMLTableImportContext::ImportRow( sal_uInt16 nPrefix, const
                 {
                     msDefaultCellStyleName = sValue;
                 }
-#if 0
-                else if( IsXMLToken( aLocalName, XML_VISIBILITY ) )
-                {
-                    bVisibility = IsXMLToken( sValue, XML_VISIBLE );
-                }
-                else if( IsXMLToken( aLocalName, XML_NUMBER_ROWS_REPEATED ) )
-                {
-                    nRepeated = sValue.toInt32();
-                }
-#endif
             }
             else if ( (XML_NAMESPACE_XML == nPrefix2) &&
                  IsXMLToken(aLocalName, XML_ID)   )
diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.hxx b/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.hxx
index 438a0c2..9ee8e02 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.hxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/xmlsecuritycontext_mscryptimpl.hxx
@@ -74,14 +74,6 @@ class XMLSecurityContext_MSCryptImpl : public ::cppu::WeakImplHelper3<
         virtual void SAL_CALL setDefaultSecurityEnvironmentIndex( sal_Int32 nDefaultEnvIndex )
             throw (::com::sun::star::uno::RuntimeException);
 
-#if 0
-        virtual void SAL_CALL setSecurityEnvironment(
-            const ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XSecurityEnvironment >& aSecurityEnvironment
-        ) throw( com::sun::star::security::SecurityInfrastructureException) ;
-
-        virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XSecurityEnvironment > SAL_CALL getSecurityEnvironment()
-            throw(::com::sun::star::uno::RuntimeException);
-#endif
 
         //Methods from XInitialization
         virtual void SAL_CALL initialize(
@@ -107,17 +99,6 @@ class XMLSecurityContext_MSCryptImpl : public ::cppu::WeakImplHelper3<
 
         static ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > impl_createFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& aServiceManager ) ;
 
-#if 0
-        //Methods from XUnoTunnel
-        virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier )
-        throw (com::sun::star::uno::RuntimeException);
-
-        static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId() ;
-        static XMLSecurityContext_MSCryptImpl* getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xObj ) ;
-#endif
-
-        //Native mehtods
-        //virtual xmlSecKeysMngrPtr keysManager() throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
 } ;
 
 #endif  // _XMLSIGNATURECONTEXT_MSCRYPTIMPL_HXX_


More information about the Libreoffice-commits mailing list