[Libreoffice-commits] .: xmloff/source

Kohei Yoshida kohei at kemper.freedesktop.org
Thu Feb 17 07:53:52 PST 2011


 xmloff/source/draw/animationexport.cxx |   46 ---------------------------------
 xmloff/source/draw/animationimport.cxx |   32 ----------------------
 xmloff/source/draw/eventimp.cxx        |    4 --
 xmloff/source/draw/sdpropls.cxx        |    5 ---
 xmloff/source/draw/sdxmlexp.cxx        |    6 ----
 xmloff/source/draw/sdxmlimp.cxx        |    9 ------
 xmloff/source/draw/shapeexport.cxx     |    9 ------
 xmloff/source/draw/shapeimport.cxx     |    6 ----
 xmloff/source/draw/xexptran.cxx        |    5 ---
 xmloff/source/draw/ximp3dobject.hxx    |    4 --
 xmloff/source/draw/ximpstyl.cxx        |   36 -------------------------
 11 files changed, 1 insertion(+), 161 deletions(-)

New commits:
commit 68275eab69e2c5d6fa2129cc1f34ee258e1da770
Author: Bálint Dózsa <dozsabalint at gmail.com>
Date:   Thu Feb 17 10:32:07 2011 +0100

    Remove dead codes

diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx
index a91de97..95b7179 100644
--- a/xmloff/source/draw/animationexport.cxx
+++ b/xmloff/source/draw/animationexport.cxx
@@ -1492,37 +1492,6 @@ void AnimationsExporterImpl::convertValue( XMLTokenEnum eAttributeName, OUString
         {
             if( rValue >>= aString )
             {
-                /*
-                const sal_Char* pSource[] = { "$X", "$Y", "$Width", "$Height", NULL };
-                const sal_Char* pDest[] = { "$x", "$y", "$width", "$height", NULL };
-                const sal_Int32 nLength[] = { 2, 2, 6, 7, 0 };
-
-                sal_Int32 nIndex = 0;
-                while( (nIndex = aString.indexOf( (sal_Unicode)'$', nIndex )) != -1  )
-                {
-                    const sal_Char** ps = pSource;
-                    const sal_Char** pd = pDest;
-                    const sal_Int32* pl = nLength;
-
-                    while( *ps )
-                    {
-                        if( aString.matchAsciiL( *ps, *pl, nIndex ) )
-                        {
-                            const OUString aNew( OUString::createFromAscii( *pd ) );
-                            aString = aString.replaceAt( nIndex, *pl, aNew );
-                            nIndex += aNew.getLength();
-                            break;
-                        }
-
-                        ps++;
-                        pd++;
-                        pl++;
-                    }
-
-                    if( *ps == 0 )
-                        nIndex++;
-                }
-                */
                 sTmp.append( aString );
             }
             else if( rValue.getValueType() == ::getCppuType((const double*)0) )
@@ -1564,21 +1533,6 @@ void AnimationsExporterImpl::convertValue( XMLTokenEnum eAttributeName, OUString
             sTmp.append( aString );
         }
     }
-
-/*	
-    if( rValue.getValueType() == ::getCppuType((const double*)0) )
-    {
-        sTmp.append( *(static_cast< const double* >( rValue.getValue() )) );
-    }
-    else if( rValue.getValueType() == ::getCppuType((const OUString*)0) )
-    {
-        sTmp.append( *(static_cast< const OUString* >( rValue.getValue() )) );
-    }
-    else
-    {
-        DBG_ERROR( "xmloff::AnimationsExporterImpl::convertValue(), invalid value type!" );
-    }
-*/
 }
 
 void AnimationsExporterImpl::convertTiming( OUStringBuffer& sTmp, const Any& rValue ) const
diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx
index ed298e5..b691566 100644
--- a/xmloff/source/draw/animationimport.cxx
+++ b/xmloff/source/draw/animationimport.cxx
@@ -481,38 +481,6 @@ Any AnimationsImportHelperImpl::convertValue( XMLTokenEnum eAttributeName, const
             pHandler->importXML( rValue, aAny, mrImport.GetMM100UnitConverter() );
 
         return aAny;
-
-/*
-        if( rValue.getLength() == 0 )
-        {
-            Any aAny;
-            return aAny;
-        }
-        else if( rValue.indexOf( '#' ) == 0 )
-        {
-            // color
-            Color aColor;
-            SvXMLUnitConverter::convertColor( aColor, rValue );
-
-            return makeAny( static_cast< sal_Int32 >( aColor.GetRGBColor() ) );
-        }
-        else if( rValue.indexOf( '$' ) != -1 )
-        {
-            // formula
-            return makeAny( rValue );
-        }
-        else
-        {
-            if( isDouble( rValue ) )
-            {
-                return makeAny( rValue.toDouble() );
-            }
-            else
-            {
-                return makeAny( rValue );
-            }
-        }
-*/
     }
 }
 
diff --git a/xmloff/source/draw/eventimp.cxx b/xmloff/source/draw/eventimp.cxx
index 33d9e99..9bcad5d 100644
--- a/xmloff/source/draw/eventimp.cxx
+++ b/xmloff/source/draw/eventimp.cxx
@@ -262,10 +262,6 @@ SdXMLEventContext::SdXMLEventContext( SvXMLImport& rImp,  sal_uInt16 nPrfx, cons
             {
                 msMacroName = sValue;
             }
-//			else if( IsXMLToken( aLocalName, XML_LIBRARY ) )
-//			{
-//				msLibrary = sValue;
-//			}
             break;
 
         case XML_NAMESPACE_XLINK:
diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx
index c1317e9..a98aaef 100644
--- a/xmloff/source/draw/sdpropls.cxx
+++ b/xmloff/source/draw/sdpropls.cxx
@@ -530,7 +530,6 @@ SvXMLEnumMapEntry  aXML_TexGenerationY_EnumMap[] =
 SvXMLEnumMapEntry  aXML_TexKind_EnumMap[] =
 {
     { XML_LUMINANCE,	drawing::TextureKind_LUMINANCE },
-//    { XML_INTENSITY,	drawing::TextureKind_INTENSITY },
     { XML_COLOR,		drawing::TextureKind_COLOR },
     { XML_TOKEN_INVALID, 0 }
 };
@@ -1661,10 +1660,6 @@ void XMLPageExportPropertyMapper::ContextFilter(
                 }
                 break;
             case CTF_PAGE_VISIBLE:
-//			case CTF_HEADER_VISIBLE:
-//			case CTF_FOOTER_VISIBLE:
-//			case CTF_PAGE_NUMBER_VISIBLE:
-//			case CTF_DATE_TIME_VISIBLE:
                 {
                     sal_Bool bVisible = false;
                     (*property).maValue >>= bVisible;
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 5b5f0e4..58ffcce 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -2629,18 +2629,12 @@ void SdXMLExport::GetViewSettings(uno::Sequence<beans::PropertyValue>& rProps)
     beans::PropertyValue* pProps = rProps.getArray();
     if(pProps)
     {
-//		SvXMLElementExport aViewSettingsElem(*this, XML_NAMESPACE_DRAW, XML_VIEW_SETTINGS, sal_True, sal_True);
-
         Reference< beans::XPropertySet > xPropSet( GetModel(), UNO_QUERY );
         if( !xPropSet.is() )
             return;
 
         awt::Rectangle aVisArea;
         xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "VisibleArea" ) ) ) >>= aVisArea;
-/*
-        sal_Int16 nMapUnit;
-        xPropSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "MapUnit" ) ) ) >>= nMapUnit;
-*/
 
         sal_uInt16 i = 0;
         pProps[i].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VisibleAreaTop"));
diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx
index 6b91345..077e2bc 100644
--- a/xmloff/source/draw/sdxmlimp.cxx
+++ b/xmloff/source/draw/sdxmlimp.cxx
@@ -451,15 +451,6 @@ void SAL_CALL SdXMLImport::initialize( const uno::Sequence< uno::Any >& aArgumen
 
 SdXMLImport::~SdXMLImport() throw ()
 {
-// #80365# removed ending of progress bar here, this was an old implementation
-// and maybe removed on demand
-//	// stop progress view
-//	if(mxStatusIndicator.is())
-//	{
-//		mxStatusIndicator->end();
-//		mxStatusIndicator->reset();
-//	}
-
     // Styles or AutoStyles context?
     if(mpMasterStylesContext)
         mpMasterStylesContext->ReleaseRef();
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index cf61486..82c050d 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -164,11 +164,7 @@ uno::Reference< drawing::XShape > XMLShapeExport::checkForCustomShapeReplacement
                     aEngine = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.EnhancedCustomShapeEngine" ) );
 
                 uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
-        /*
-                uno::Reference< drawing::XShape > aXShape = GetXShapeForSdrObject( (SdrObjCustomShape*)pCustomShape );
-                if ( !aXShape.is() )
-                    aXShape = new SvxCustomShape( (SdrObjCustomShape*)pCustomShape );
-        */
+
                 if ( aEngine.getLength() && xFactory.is() )
                 {
                     uno::Sequence< uno::Any > aArgument( 1 );
@@ -227,7 +223,6 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap
     ImpCalcShapeType(xShape, aShapeInfo.meShapeType);
 
     const bool bObjSupportsText =
-//		aShapeInfo.meShapeType != XmlShapeTypeDrawControlShape &&
         aShapeInfo.meShapeType != XmlShapeTypeDrawChartShape &&
         aShapeInfo.meShapeType != XmlShapeTypePresChartShape &&
         aShapeInfo.meShapeType != XmlShapeTypeDrawOLE2Shape &&
@@ -1002,7 +997,6 @@ void XMLShapeExport::exportAutoStyles()
     // export all autostyle infos
 
     // ...for graphic
-//	if(IsFamilyGraphicUsed())
     {
         GetExport().GetAutoStylePool()->exportXML(
             XML_STYLE_FAMILY_SD_GRAPHICS_ID
@@ -1013,7 +1007,6 @@ void XMLShapeExport::exportAutoStyles()
     }
 
     // ...for presentation
-//	if(IsFamilyPresentationUsed())
     {
         GetExport().GetAutoStylePool()->exportXML(
             XML_STYLE_FAMILY_SD_PRESENTATION_ID
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx
index b312f9d..e5b476b 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -182,12 +182,6 @@ XMLShapeImportHelper::XMLShapeImportHelper(
     mpPropertySetMapper->ChainImportMapper(XMLTextImportHelper::CreateParaExtPropMapper(rImporter));
     mpPropertySetMapper->ChainImportMapper(XMLTextImportHelper::CreateParaDefaultExtPropMapper(rImporter));
 
-/*
-    // chain form attributes
-    const UniReference< SvXMLImportPropertyMapper> xFormMapper( rImporter.GetFormImport()->getStylePropertyMapper().getBodyPtr() );
-    mpPropertySetMapper->ChainImportMapper(xFormMapper);
-*/
-
     // construct PresPagePropsMapper
     xMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLSDPresPageProps, mpSdPropHdlFactory);
     mpPresPagePropsMapper = new SvXMLImportPropertyMapper( xMapper, rImporter );
diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx
index 833b957..71d5fc3 100644
--- a/xmloff/source/draw/xexptran.cxx
+++ b/xmloff/source/draw/xexptran.cxx
@@ -2606,11 +2606,6 @@ SdXMLImExSvgDElement::SdXMLImExSvgDElement(const OUString& rNew,
 
                     // #104076# remember closed state of current polygon
                     mbIsClosed = true;
-
-                    // closed: add first point again
-                    // sal_Int32 nX(pInnerSequence[0].X);
-                    // sal_Int32 nY(pInnerSequence[0].Y);
-                    // Imp_AddExportPoints(nX, nY, pInnerSequence, pInnerFlags, nInnerIndex++, drawing::PolygonFlags_NORMAL);
                     
                     break;
                 }
diff --git a/xmloff/source/draw/ximp3dobject.hxx b/xmloff/source/draw/ximp3dobject.hxx
index 482927c..c18e02b 100644
--- a/xmloff/source/draw/ximp3dobject.hxx
+++ b/xmloff/source/draw/ximp3dobject.hxx
@@ -50,10 +50,6 @@ protected:
     com::sun::star::drawing::HomogenMatrix mxHomMat;
     BOOL						mbSetTransform;
 
-/*
-    void SetStyle();
-    void AddShape(com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape);
-*/
 public:
     TYPEINFO();
 
diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx
index cfa1f9e..0d29c66 100644
--- a/xmloff/source/draw/ximpstyl.cxx
+++ b/xmloff/source/draw/ximpstyl.cxx
@@ -1019,14 +1019,8 @@ SdXMLStylesContext::SdXMLStylesContext(
 :	SvXMLStylesContext(rImport, nPrfx, rLName, xAttrList),
     mbIsAutoStyle(bIsAutoStyle)
 {
-    // #110680#
-    // Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
     Reference< lang::XMultiServiceFactory > xMSF = rImport.getServiceFactory();
-
     mpNumFormatter = new SvNumberFormatter( xMSF, LANGUAGE_SYSTEM );
-
-    // #110680#
-    // mpNumFmtHelper = new SvXMLNumFmtHelper( mpNumFormatter );
     mpNumFmtHelper = new SvXMLNumFmtHelper( mpNumFormatter, xMSF );
 }
 
@@ -1166,21 +1160,6 @@ SvXMLStyleContext* SdXMLStylesContext::CreateDefaultStyleStyleChildContext(
 
 sal_uInt16 SdXMLStylesContext::GetFamily( const OUString& rFamily ) const
 {
-//	if(rFamily.getLength())
-//	{
-//		if(rFamily.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_GRAPHICS_NAME))))
-//			return XML_STYLE_FAMILY_SD_GRAPHICS_ID;
-//
-//		if(rFamily.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_PRESENTATION_NAME))))
-//			return XML_STYLE_FAMILY_SD_PRESENTATION_ID;
-//
-//		if(rFamily.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_POOL_NAME))))
-//			return XML_STYLE_FAMILY_SD_POOL_ID;
-//
-//		if(rFamily.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_SD_DRAWINGPAGE_NAME))))
-//			return XML_STYLE_FAMILY_SD_DRAWINGPAGE_ID;
-//	}
-
     // call base class
     return SvXMLStylesContext::GetFamily(rFamily);
 }
@@ -1192,20 +1171,6 @@ UniReference< SvXMLImportPropertyMapper > SdXMLStylesContext::GetImportPropertyM
 {
     UniReference < SvXMLImportPropertyMapper > xMapper;
 
-//	if(XML_STYLE_FAMILY_SD_GRAPHICS_ID == nFamily
-//		|| XML_STYLE_FAMILY_SD_PRESENTATION_ID == nFamily
-//		|| XML_STYLE_FAMILY_SD_POOL_ID == nFamily)
-//	{
-//		if(!xPropImpPropMapper.is())
-//		{
-//			UniReference< XMLShapeImportHelper > aImpHelper = ((SvXMLImport&)GetImport()).GetShapeImport();
-//			((SdXMLStylesContext*)this)->xPropImpPropMapper =
-//				new SvXMLImportPropertyMapper(aImpHelper->GetPropertySetMapper());
-//		}
-//		xMapper = xPropImpPropMapper;
-//		return xMapper;
-//	}
-
     switch( nFamily )
     {
     case XML_STYLE_FAMILY_SD_DRAWINGPAGE_ID:
@@ -1265,7 +1230,6 @@ void SdXMLStylesContext::EndElement()
             if(pStyle && pStyle->ISA(XMLShapeStyleContext))
             {
                 XMLShapeStyleContext* pDocStyle = (XMLShapeStyleContext*)pStyle;
-//				pDocStyle->Filter();
 
                 SvXMLStylesContext* pStylesContext = GetSdImport().GetShapeImport()->GetStylesContext();
                 if( pStylesContext )


More information about the Libreoffice-commits mailing list