Kaydet (Commit) d540c322 authored tarafından Marcos Paulo de Souza's avatar Marcos Paulo de Souza Kaydeden (comit) Markus Mohrhard

Remove more useless code inside "#if 0" blocks

Change-Id: Ifb9f9d2211608b848a5de66e1d19c4815a755907
Signed-off-by: 's avatarMarcos Paulo de Souza <marcos.souza.org@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/840Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst c08f23ce
...@@ -241,22 +241,6 @@ static inline double cubicBase(double t, double a, double b, double c, double d) ...@@ -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; 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, 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) double &xmin, double &ymin, double &xmax, double &ymax)
{ {
...@@ -265,29 +249,6 @@ static void getCubicBezierBBox(double x0, double y0, double x1, double y1, doubl ...@@ -265,29 +249,6 @@ static void getCubicBezierBBox(double x0, double y0, double x1, double y1, doubl
ymin = y0 < y ? y0 : y; ymin = y0 < y ? y0 : y;
ymax = 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) for (double t = 0.0; t <= 1.0; t+=0.01)
{ {
double tmpx = cubicBase(t, x0, x1, x2, x); double tmpx = cubicBase(t, x0, x1, x2, x);
...@@ -297,7 +258,6 @@ static void getCubicBezierBBox(double x0, double y0, double x1, double y1, doubl ...@@ -297,7 +258,6 @@ static void getCubicBezierBBox(double x0, double y0, double x1, double y1, doubl
ymin = tmpy < ymin ? tmpy : ymin; ymin = tmpy < ymin ? tmpy : ymin;
ymax = tmpy > ymax ? tmpy : ymax; ymax = tmpy > ymax ? tmpy : ymax;
} }
#endif
} }
...@@ -763,7 +723,6 @@ void OdgGenerator::startGraphics(const ::WPXPropertyList &propList) ...@@ -763,7 +723,6 @@ void OdgGenerator::startGraphics(const ::WPXPropertyList &propList)
TagOpenElement *pStyleDrawingPagePropertiesOpenElement = new TagOpenElement("style:drawing-page-properties"); TagOpenElement *pStyleDrawingPagePropertiesOpenElement = new TagOpenElement("style:drawing-page-properties");
// pStyleDrawingPagePropertiesOpenElement->addAttribute("draw:background-size", "border");
pStyleDrawingPagePropertiesOpenElement->addAttribute("draw:fill", "none"); pStyleDrawingPagePropertiesOpenElement->addAttribute("draw:fill", "none");
mpImpl->mPageAutomaticStyles.push_back(pStyleDrawingPagePropertiesOpenElement); mpImpl->mPageAutomaticStyles.push_back(pStyleDrawingPagePropertiesOpenElement);
......
...@@ -51,10 +51,6 @@ void ParagraphStyle::write(OdfDocumentHandler *pHandler) const ...@@ -51,10 +51,6 @@ void ParagraphStyle::write(OdfDocumentHandler *pHandler) const
WPXPropertyList::Iter i(mpPropList); WPXPropertyList::Iter i(mpPropList);
for (i.rewind(); i.next(); ) 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 (strncmp(i.key(), "fo:margin-",10) == 0)
{ {
if (strcmp(i.key(), "fo:margin-left") == 0 || if (strcmp(i.key(), "fo:margin-left") == 0 ||
......
...@@ -205,22 +205,11 @@ void XMLSettingsExportHelper::exportBool(const sal_Bool bValue, const rtl::OUStr ...@@ -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 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; (void) nValue; (void) rName;
OSL_ENSURE(false, "XMLSettingsExportHelper::exportByte(): #i114162#:\n" OSL_ENSURE(false, "XMLSettingsExportHelper::exportByte(): #i114162#:\n"
"config-items of type \"byte\" are not valid ODF, " "config-items of type \"byte\" are not valid ODF, "
"so storing them is disabled!\n" "so storing them is disabled!\n"
"Use a different type instead (e.g. \"short\")."); "Use a different type instead (e.g. \"short\").");
#endif
} }
void XMLSettingsExportHelper::exportShort(const sal_Int16 nValue, const rtl::OUString& rName) const void XMLSettingsExportHelper::exportShort(const sal_Int16 nValue, const rtl::OUString& rName) const
{ {
......
...@@ -472,16 +472,6 @@ SvXMLImportContext * XMLTableImportContext::ImportRow( sal_uInt16 nPrefix, const ...@@ -472,16 +472,6 @@ SvXMLImportContext * XMLTableImportContext::ImportRow( sal_uInt16 nPrefix, const
{ {
msDefaultCellStyleName = sValue; 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) && else if ( (XML_NAMESPACE_XML == nPrefix2) &&
IsXMLToken(aLocalName, XML_ID) ) IsXMLToken(aLocalName, XML_ID) )
......
...@@ -74,14 +74,6 @@ class XMLSecurityContext_MSCryptImpl : public ::cppu::WeakImplHelper3< ...@@ -74,14 +74,6 @@ class XMLSecurityContext_MSCryptImpl : public ::cppu::WeakImplHelper3<
virtual void SAL_CALL setDefaultSecurityEnvironmentIndex( sal_Int32 nDefaultEnvIndex ) virtual void SAL_CALL setDefaultSecurityEnvironmentIndex( sal_Int32 nDefaultEnvIndex )
throw (::com::sun::star::uno::RuntimeException); 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 //Methods from XInitialization
virtual void SAL_CALL initialize( virtual void SAL_CALL initialize(
...@@ -107,17 +99,6 @@ class XMLSecurityContext_MSCryptImpl : public ::cppu::WeakImplHelper3< ...@@ -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 ) ; 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_ #endif // _XMLSIGNATURECONTEXT_MSCRYPTIMPL_HXX_
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment