[PATCH 4/4] More dead code removal

Wol anthony at youngman.org.uk
Sun Nov 28 08:44:32 PST 2010


---
 reportdesign/source/filter/xml/dbloader2.cxx       |    2 +-
 reportdesign/source/filter/xml/xmlExport.cxx       |   82 +++----------------
 .../source/filter/xml/xmlExportDocumentHandler.cxx |    5 +-
 reportdesign/source/filter/xml/xmlHelper.cxx       |   16 ----
 .../source/filter/xml/xmlImportDocumentHandler.cxx |    8 +-
 reportdesign/source/filter/xml/xmlStyleImport.cxx  |    1 -
 reportdesign/source/filter/xml/xmlSubDocument.cxx  |    5 +-
 reportdesign/source/filter/xml/xmlTable.cxx        |    4 +-
 reportdesign/source/filter/xml/xmlfilter.cxx       |   34 ++-------
 9 files changed, 28 insertions(+), 129 deletions(-)

diff --git a/reportdesign/source/filter/xml/dbloader2.cxx b/reportdesign/source/filter/xml/dbloader2.cxx
index 8cfac9f..eb6c253 100644
--- a/reportdesign/source/filter/xml/dbloader2.cxx
+++ b/reportdesign/source/filter/xml/dbloader2.cxx
@@ -77,7 +77,7 @@ ORptTypeDetection::ORptTypeDetection(Reference< XComponentContext > const & xCon
                     if ( sMediaType.equalsAscii(MIMETYPE_OASIS_OPENDOCUMENT_REPORT_ASCII) )
                         return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StarBaseReport"));
                     ::comphelper::disposeComponent(xProp);
-                } // if ( xProp.is() )
+                }
             } 
             catch(Exception&)
             {
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx
index 8c49955..f9186b9 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -284,7 +284,6 @@ ORptExport::ORptExport(const Reference< XMultiServiceFactory >& _rxMSF,sal_uInt1
     xTableStylesPropertySetMapper1->AddMapperEntry(xTableStylesPropertySetMapper2);
     
     m_xTableStylesExportPropertySetMapper = new SvXMLExportPropertyMapper(xTableStylesPropertySetMapper1);
-    //m_xTableStylesExportPropertySetMapper->ChainExportMapper(xTableStylesPropertySetMapper2);
 
     m_xCellStylesPropertySetMapper = OXMLHelper::GetCellStylePropertyMap();
     m_xCellStylesExportPropertySetMapper = new OSpecialHanldeXMLExportPropertyMapper(m_xCellStylesPropertySetMapper);
@@ -298,7 +297,6 @@ ORptExport::ORptExport(const Reference< XMultiServiceFactory >& _rxMSF,sal_uInt1
 
     UniReference < XMLPropertySetMapper > xPropMapper(new XMLTextPropertySetMapper( TEXT_PROP_MAP_PARA ));
     m_xParaPropMapper = new OSpecialHanldeXMLExportPropertyMapper( xPropMapper);
-    // m_xParaPropMapper->ChainExportMapper(XMLTextParagraphExport::CreateParaExtPropMapper(*this));
 
     ::rtl::OUString sFamily( GetXMLToken(XML_PARAGRAPH) );
     ::rtl::OUString aPrefix( String( 'P' ) );
@@ -405,13 +403,12 @@ void ORptExport::exportReport(const Reference<XReportDefinition>& _xReportDefini
     {
         exportFunctions(_xReportDefinition->getFunctions().get());
         exportGroupsExpressionAsFunction(_xReportDefinition->getGroups());
-        //exportMasterDetailFields(_xReportDefinition.get());
         
         if ( _xReportDefinition->getReportHeaderOn() )
         {
             SvXMLElementExport aGroupSection(*this,XML_NAMESPACE_REPORT, XML_REPORT_HEADER, sal_True, sal_True);
             exportSection(_xReportDefinition->getReportHeader());
-        } // if ( _xReportDefinition->getReportHeaderOn() )
+        }
         if ( _xReportDefinition->getPageHeaderOn() )
         {
             ::rtl::OUStringBuffer sValue;
@@ -422,7 +419,7 @@ void ORptExport::exportReport(const Reference<XReportDefinition>& _xReportDefini
         
             SvXMLElementExport aGroupSection(*this,XML_NAMESPACE_REPORT, XML_PAGE_HEADER, sal_True, sal_True);
             exportSection(_xReportDefinition->getPageHeader(),true);
-        } // if ( _xReportDefinition->getPageHeaderOn() )
+        }
 
         exportGroup(_xReportDefinition,0);
 
@@ -435,13 +432,13 @@ void ORptExport::exportReport(const Reference<XReportDefinition>& _xReportDefini
                 AddAttribute(XML_NAMESPACE_REPORT, XML_PAGE_PRINT_OPTION,sValue.makeStringAndClear());
             SvXMLElementExport aGroupSection(*this,XML_NAMESPACE_REPORT, XML_PAGE_FOOTER, sal_True, sal_True);
             exportSection(_xReportDefinition->getPageFooter(),true);
-        } // if ( _xReportDefinition->getPageFooterOn() )
+        }
         if ( _xReportDefinition->getReportFooterOn() )
         {
             SvXMLElementExport aGroupSection(*this,XML_NAMESPACE_REPORT, XML_REPORT_FOOTER, sal_True, sal_True);
             exportSection(_xReportDefinition->getReportFooter());
-        } // if ( _xReportDefinition->getReportFooterOn() )
-    }	
+        }
+    }
 }
 // -----------------------------------------------------------------------------
 void ORptExport::exportComponent(const Reference<XReportComponent>& _xReportComponent)
@@ -472,7 +469,7 @@ void ORptExport::exportFormatConditions(const Reference<XReportControlModel>& _x
 
             exportStyleName(xCond.get(),GetAttrList(),m_sCellStyle);
             SvXMLElementExport aElem(*this,XML_NAMESPACE_REPORT, XML_FORMAT_CONDITION, sal_True, sal_True);
-        } // for (sal_Int32 i = 0; i < nCount ; ++i)
+        }
     } 
     catch(uno::Exception&)
     {
@@ -500,7 +497,7 @@ void ORptExport::exportReportElement(const Reference<XReportControlModel>& _xRep
     {
         exportFormula(XML_FORMULA,sExpr);
         SvXMLElementExport aPrintExpr(*this,XML_NAMESPACE_REPORT, XML_CONDITIONAL_PRINT_EXPRESSION, sal_True, sal_True);
-    } // if ( sExpr.getLength() )
+    }
 
     // only export when parent exists
     uno::Reference< report::XSection> xParent(_xReportElement->getParent(),uno::UNO_QUERY);
@@ -719,7 +716,7 @@ void ORptExport::exportReportComponentAutoStyles(const Reference<XSection>& _xPr
                     {
                         uno::Reference< report::XFormatCondition > xCond(xFormattedField->getByIndex(j),uno::UNO_QUERY);
                         exportAutoStyle(xCond.get(),xFormattedField);
-                    } // for (sal_Int32 j = 0; j < nCount ; ++j)
+                    }
                 } 
                 catch(uno::Exception&)
                 {
@@ -971,7 +968,7 @@ void ORptExport::exportContainer(const Reference< XSection>& _xSection)
                                     exportSection(xSection);
                             }
                         }
-                    } // if ( aColIter->xElement.is() )
+                    }
                     else if ( !bShapeHandled )
                     {
                         bShapeHandled = true;
@@ -989,7 +986,7 @@ void ORptExport::exportContainer(const Reference< XSection>& _xSection)
                     }
                     
                 }
-            } // for (sal_Int32 i = 0 ; i< nCount ; ++i)
+            }
             if ( nEmptyCellColSpan )
             {
                 {
@@ -1037,21 +1034,6 @@ void ORptExport::exportContainer(const Reference< XSection>& _xSection)
     ::rtl::OUString sFormula = _sFormula;
     if ( _sFormula.equalsAsciiL("rpt:",4) )
         sFormula = ::rtl::OUString();
-    //sal_Int32 nLength = _sFormula.getLength();
-    //if ( nLength )
-    //{
-    //    sal_Int32 nPos = 0;
-    //    if ( _sFormula.matchAsciiL("=",1) != 0 )
-    //    {
-    //        nPos = 1;
-    //        --nLength;
-    //    }
-    //    bool bFormula = _sFormula.indexOf('[') != -1 || _sFormula.indexOf('(') != -1;
-    //    if ( bFormula )
-    //        sFormula = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("rpt:")) + _sFormula.copy(nPos,nLength);
-    //    else
-    //        sFormula = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("field:[")) + _sFormula.copy(nPos,nLength) + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("]"));;
-    //}
     return sFormula;
 }
 // -----------------------------------------------------------------------------
@@ -1157,7 +1139,7 @@ sal_Bool ORptExport::exportGroup(const Reference<XReportDefinition>& _xReportDef
                             AddAttribute(XML_NAMESPACE_REPORT, XML_REPEAT_SECTION,XML_TRUE );
                         SvXMLElementExport aGroupSection(*this,XML_NAMESPACE_REPORT, XML_GROUP_FOOTER, sal_True, sal_True);
                         exportSection(xSection);
-                    } // if ( xGroup->getFooterOn() )
+                    }
                 }
             }
             else if ( _bExportAutoStyle )
@@ -1259,37 +1241,6 @@ void ORptExport::exportAutoStyle(XPropertySet* _xProp,const Reference<XFormatted
     }
     else
     {
-        //sal_Int32 nTextAlignIndex = m_xCellStylesExportPropertySetMapper->getPropertySetMapper()->FindEntryIndex( CTF_SD_SHAPE_PARA_ADJUST );
-        //if ( nTextAlignIndex != -1 )
-        //{
-        //    ::std::vector< XMLPropertyState >::iterator aIter = aPropertyStates.begin();
-        //    ::std::vector< XMLPropertyState >::iterator aEnd = aPropertyStates.end();
-        //    for (; aIter != aEnd; ++aIter)
-        //    {
-        //        if ( aIter->mnIndex == nTextAlignIndex )
-        //        {
-        //            sal_Int16 nTextAlign = 0;
-        //            aIter->maValue >>= nTextAlign;
-        //            switch(nTextAlign)
-        //            {
-        //                case awt::TextAlign::LEFT:
-        //                    nTextAlign = style::ParagraphAdjust_LEFT;
-        //                    break;
-        //                case awt::TextAlign::CENTER:
-        //                    nTextAlign = style::ParagraphAdjust_CENTER;
-        //                    break;
-        //                case awt::TextAlign::RIGHT:
-        //                    nTextAlign = style::ParagraphAdjust_RIGHT;
-        //                    break;
-        //                default:
-        //                    OSL_ENSURE(0,"Illegal text alignment value!");
-        //                    break;
-        //            }
-        //            aIter->maValue <<= nTextAlign;
-        //            break;
-        //        }
-        //    }
-        //}
         const Reference<XFormattedField> xFormattedField(_xProp,uno::UNO_QUERY);
         if ( (_xParentFormattedField.is() || xFormattedField.is()) && !aPropertyStates.empty() )
         {
@@ -1306,8 +1257,7 @@ void ORptExport::exportAutoStyle(XPropertySet* _xProp,const Reference<XFormatted
             }
         }
     }
-    
-    
+
     if ( !aPropertyStates.empty() )
         m_aAutoStyleNames.insert( TPropertyStyleMap::value_type(_xProp,GetAutoStylePool()->Add( XML_STYLE_FAMILY_TABLE_CELL, aPropertyStates )));
 }
@@ -1421,13 +1371,7 @@ void ORptExport::_ExportAutoStyles()
                                         ,GetMM100UnitConverter()
                                         ,GetNamespaceMap()
         );
-        
-        
-        /*GetAutoStylePool()->exportXML(XML_STYLE_FAMILY_REPORT_ID
-                                        ,GetDocHandler()
-                                        ,GetMM100UnitConverter()
-                                        ,GetNamespaceMap()
-        );*/
+
         exportDataStyles();
         GetShapeExport()->exportAutoStyles();
     }
diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
index 7d1f3e2..c6012ea 100644
--- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
@@ -168,7 +168,6 @@ void SAL_CALL ExportDocumentHandler::startElement(const ::rtl::OUString & _sName
         {
             { XML_TABLE, sdb::CommandType::TABLE },
             { XML_QUERY, sdb::CommandType::QUERY },
-            // { XML_COMMAND, CommandType::COMMAND }, // default
             { XML_TOKEN_INVALID, 0 }
         };
         if ( SvXMLUnitConverter::convertEnum( sValue, static_cast<sal_uInt16>(m_xDatabaseDataProvider->getCommandType()),aXML_CommnadTypeEnumMap ) )
@@ -415,7 +414,7 @@ void ExportDocumentHandler::exportTableRows()
                 bRemoveString = false;
                 pCellAtt->RemoveAttribute(sValueType);
                 pCellAtt->AddAttribute(sValueType,s_sFloat);
-            } // if ( i == 0 )
+            }
             m_xDelegatee->startElement(sP,NULL);
             m_xDelegatee->endElement(sP);
             m_xDelegatee->endElement(sCell);
@@ -447,7 +446,7 @@ void ExportDocumentHandler::exportTableRows()
         m_xDelegatee->endElement(sFtext);
         m_xDelegatee->endElement(sP);
         m_xDelegatee->endElement(sCell);
-    } // for(sal_Int32 i = 0; i < nCount ; ++i)
+    }
 
     m_xDelegatee->endElement(sRow);
 }
diff --git a/reportdesign/source/filter/xml/xmlHelper.cxx b/reportdesign/source/filter/xml/xmlHelper.cxx
index 584d702..89f9b6b 100644
--- a/reportdesign/source/filter/xml/xmlHelper.cxx
+++ b/reportdesign/source/filter/xml/xmlHelper.cxx
@@ -179,7 +179,6 @@ const XMLPropertyMapEntry* OXMLHelper::GetTableStyleProps()
     {
         MAP_CONST_T(  PROPERTY_BACKCOLOR,      FO,     BACKGROUND_COLOR,        XML_TYPE_COLORTRANSPARENT|MID_FLAG_MULTI_PROPERTY, 0 ),
         MAP_CONST_T(  PROPERTY_BACKTRANSPARENT,FO,     BACKGROUND_COLOR,        XML_TYPE_ISTRANSPARENT | MID_FLAG_MERGE_ATTRIBUTE, 0 ),
-        // MAP_CONST_T(  PROPERTY_KEEPTOGETHER,   STYLE,  MAY_BREAK_BETWEEN_ROWS,  XML_TYPE_BOOL     , 0 ),
         MAP_END()
     };
     return aXMLTableStylesProperties;
@@ -199,10 +198,7 @@ const XMLPropertyMapEntry* OXMLHelper::GetColumnStyleProps()
 {
     static const XMLPropertyMapEntry aXMLColumnStylesProperties[] =
     {
-        //MAP( "IsManualPageBreak", XML_NAMESPACE_FO, XML_BREAK_BEFORE, XML_TYPE_PROP_TABLE_COLUMN|XML_SC_TYPE_BREAKBEFORE, 0),
-        //MAP( "IsVisible", XML_NAMESPACE_TABLE, XML_DISPLAY, XML_TYPE_PROP_TABLE_COLUMN|XML_SC_TYPE_EQUAL|MID_FLAG_SPECIAL_ITEM, CTF_SC_ISVISIBLE ),
         MAP_CONST_S(    "Width",                 STYLE,     COLUMN_WIDTH,           XML_TYPE_PROP_TABLE_COLUMN|XML_TYPE_MEASURE, 0 ),
-    //	MAP( "OptimalWidth", XML_NAMESPACE_STYLE, XML_USE_OPTIMAL_COLUMN_WIDTH, XML_TYPE_PROP_TABLE_COLUMN|XML_TYPE_BOOL, 0),
         MAP_END()
     };
     return aXMLColumnStylesProperties;
@@ -212,7 +208,6 @@ const SvXMLEnumMapEntry* OXMLHelper::GetReportPrintOptions()
 {
     static SvXMLEnumMapEntry s_aXML_EnumMap[] =
     {
-         // { XML_ALL_PAGES,							report::ReportPrintOption::ALL_PAGES }, // default
         { XML_NOT_WITH_REPORT_HEADER,				report::ReportPrintOption::NOT_WITH_REPORT_HEADER },
         { XML_NOT_WITH_REPORT_FOOTER,				report::ReportPrintOption::NOT_WITH_REPORT_FOOTER },
         { XML_NOT_WITH_REPORT_HEADER_NOR_FOOTER,	report::ReportPrintOption::NOT_WITH_REPORT_HEADER_FOOTER },
@@ -225,7 +220,6 @@ const SvXMLEnumMapEntry* OXMLHelper::GetForceNewPageOptions()
 {
     static SvXMLEnumMapEntry s_aXML_EnumMap[] =
     {
-        // { XML_NONE,					report::ForceNewPage::NONE }, // default
         { XML_BEFORE_SECTION,		report::ForceNewPage::BEFORE_SECTION },
         { XML_AFTER_SECTION,		report::ForceNewPage::AFTER_SECTION },
         { XML_BEFORE_AFTER_SECTION,	report::ForceNewPage::BEFORE_AFTER_SECTION },
@@ -238,7 +232,6 @@ const SvXMLEnumMapEntry* OXMLHelper::GetKeepTogetherOptions()
 {
     static SvXMLEnumMapEntry s_aXML_EnumMap[] =
     {
-        // { XML_NO,					report::KeepTogether::NO }, // default
         { XML_WHOLE_GROUP,			report::KeepTogether::WHOLE_GROUP },
         { XML_WITH_FIRST_DETAIL,	report::KeepTogether::WITH_FIRST_DETAIL },
         { XML_TOKEN_INVALID, 0 }
@@ -252,7 +245,6 @@ const SvXMLEnumMapEntry* OXMLHelper::GetCommandTypeOptions()
     {
         { XML_TABLE, CommandType::TABLE },
         { XML_QUERY, CommandType::QUERY },
-        // { XML_COMMAND, CommandType::COMMAND }, // default
         { XML_TOKEN_INVALID, 0 }
     };
     return s_aXML_EnumMap;
@@ -300,13 +292,6 @@ void OXMLHelper::copyStyleElements(const bool _bOld,const ::rtl::OUString& _sSty
             {PROPERTY_FONTKERNING,		static_cast<sal_uInt16>(PROPERTY_FONTKERNING.length),		PROPERTY_ID_FONTKERNING,		&::getCppuType(&aFont.Kerning)		,PropertyAttribute::BOUND,0},
             {PROPERTY_CHARWORDMODE,     static_cast<sal_uInt16>(PROPERTY_CHARWORDMODE.length),	    PROPERTY_ID_FONTWORDLINEMODE,	&::getCppuType(&aFont.WordLineMode)	,PropertyAttribute::BOUND,0},
             {PROPERTY_FONTTYPE,			static_cast<sal_uInt16>(PROPERTY_FONTTYPE.length),			PROPERTY_ID_FONTTYPE,			&::getCppuType(&aFont.Type)			,PropertyAttribute::BOUND,0},
-            //{PROPERTY_BACKGROUNDCOLOR,	static_cast<sal_uInt16>(PROPERTY_BACKGROUNDCOLOR.length),	PROPERTY_ID_BACKGROUNDCOLOR,	&::getCppuType(&nBackgroundColor)	,PropertyAttribute::BOUND,0},,
-            //{PROPERTY_PARAADJUST,			static_cast<sal_uInt16>(PROPERTY_PARAADJUST.length),				PROPERTY_ID_ALIGN,				&::getCppuType(&nAlign)				,PropertyAttribute::BOUND,0},,          
-            //{PROPERTY_CONTROLBORDER,			static_cast<sal_uInt16>(PROPERTY_CONTROLBORDER.length),			PROPERTY_ID_BORDER,				&::getCppuType(&aFont.Type)			,PropertyAttribute::BOUND,0},,         
-            //{PROPERTY_CONTROLBORDERCOLOR,		static_cast<sal_uInt16>(PROPERTY_CONTROLBORDERCOLOR.length),		PROPERTY_ID_BORDERCOLOR,		&::getCppuType(&aFont.Type)			,PropertyAttribute::BOUND,0},,    
-            //{PROPERTY_CHARCOLOR,		static_cast<sal_uInt16>(PROPERTY_TEXTCOLOR.length),			PROPERTY_ID_TEXTCOLOR,			&::getCppuType(&aFont.Type)			,PropertyAttribute::BOUND,0},,      
-            //{PROPERTY_FORMATKEY,		static_cast<sal_uInt16>(PROPERTY_FORMATKEY.length),			PROPERTY_ID_FORMATKEY,			&::getCppuType(&aFont.Type)			,PropertyAttribute::BOUND,0},,      
-            //{PROPERTY_CHARUNDERLINECOLOR,	static_cast<sal_uInt16>(PROPERTY_CHARUNDERLINECOLOR.length),		PROPERTY_ID_TEXTLINECOLOR,		&::getCppuType(&aFont.Type)			,PropertyAttribute::BOUND,0},,  
             { NULL, 0, 0, NULL, 0, 0 }
         };
         try
@@ -406,7 +391,6 @@ const SvXMLEnumMapEntry* OXMLHelper::GetImageScaleOptions()
 {
        static SvXMLEnumMapEntry s_aXML_EnumMap[] =
        {
-               // { XML_NONE,          awt::ImageScaleMode::None }, // default
                { XML_ISOTROPIC,        awt::ImageScaleMode::Isotropic },
                { XML_ANISOTROPIC,      awt::ImageScaleMode::Anisotropic },
                { XML_TOKEN_INVALID, 0 }
diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
index decca01..0b30051 100644
--- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
@@ -192,7 +192,6 @@ void SAL_CALL ImportDocumentHandler::startElement(const ::rtl::OUString & _sName
         }
         catch(uno::Exception&)
         {
-            // OSL_ENSURE(0,"Exception catched while filling the report definition props");
         }
         m_xDelegatee->startElement(lcl_createAttribute(XML_NP_OFFICE,XML_CHART),NULL);
         bExport = false;
@@ -264,7 +263,7 @@ void SAL_CALL ImportDocumentHandler::startElement(const ::rtl::OUString & _sName
                 bHasCategories = sValue.equalsAscii("both");
                 break;
             }
-        } // for(sal_Int16 i = 0; i < nLength; ++i)
+        }
         beans::PropertyValue* pArgIter = m_aArguments.getArray();
         beans::PropertyValue* pArgEnd  = pArgIter + m_aArguments.getLength();
         for(;pArgIter != pArgEnd;++pArgIter)
@@ -274,8 +273,7 @@ void SAL_CALL ImportDocumentHandler::startElement(const ::rtl::OUString & _sName
                 pArgIter->Value <<= bHasCategories;
                 break;
             }
-        } // for(;pArgIter != pArgEnd;++pArgIter)
-
+        }
 
         SvXMLAttributeList* pList = new SvXMLAttributeList();
         xNewAttribs = pList;
@@ -358,7 +356,7 @@ void SAL_CALL ImportDocumentHandler::initialize( const uno::Sequence< uno::Any >
 
         uno::Reference< chart2::data::XDataReceiver > xReceiver(m_xModel,uno::UNO_QUERY_THROW);
         xReceiver->attachDataProvider(m_xDatabaseDataProvider.get());
-    } // if ( !m_xDatabaseDataProvider.is() )
+    }
 
     m_aArguments = m_xDatabaseDataProvider->detectArguments(NULL);
     
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx b/reportdesign/source/filter/xml/xmlStyleImport.cxx
index 8e38218..8586401 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.cxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx
@@ -257,7 +257,6 @@ UniReference < SvXMLImportPropertyMapper >
                 {
                     UniReference < XMLPropertyHandlerFactory> xFac = new ::xmloff::OControlPropertyHandlerFactory();
                     m_xTableImpPropMapper = new SvXMLImportPropertyMapper( new XMLPropertySetMapper(OXMLHelper::GetTableStyleProps(), xFac), m_rImport );
-                    //m_xTableImpPropMapper = new SvXMLImportPropertyMapper( rImport.GetTableStylesPropertySetMapper(), m_rImport );
                 }
                 xMapper = m_xTableImpPropMapper;
             }
diff --git a/reportdesign/source/filter/xml/xmlSubDocument.cxx b/reportdesign/source/filter/xml/xmlSubDocument.cxx
index 9bfc178..d19f9b4 100644
--- a/reportdesign/source/filter/xml/xmlSubDocument.cxx
+++ b/reportdesign/source/filter/xml/xmlSubDocument.cxx
@@ -120,9 +120,6 @@ void OXMLSubDocument::EndElement()
         m_xComponent.set(m_pContainer->getSection()->getByIndex(m_nCurrentCount),uno::UNO_QUERY);
         if ( m_xComponent.is() )
         {
-            // #i94115# this is no longer need.
-            // m_pContainer->addCell(m_xComponent.get());
-    
             if ( !m_aMasterFields.empty() )
                 m_xComponent->setMasterFields(Sequence< ::rtl::OUString>(&*m_aMasterFields.begin(),m_aMasterFields.size()));
             if ( !m_aDetailFields.empty() )
@@ -143,7 +140,7 @@ void OXMLSubDocument::EndElement()
                         uno::Reference< report::XFormatCondition > xNewCond = xComponentModel->createFormatCondition();
                         ::comphelper::copyProperties(xCond.get(),xNewCond.get());
                         xComponentModel->insertByIndex(xComponentModel->getCount(),uno::makeAny(xNewCond));
-                    } // for (sal_Int32 i = 0; i < nCount ; ++i)
+                    }
                 } 
                 catch(uno::Exception&)
                 {
diff --git a/reportdesign/source/filter/xml/xmlTable.cxx b/reportdesign/source/filter/xml/xmlTable.cxx
index e9ba7ac..f52db55 100644
--- a/reportdesign/source/filter/xml/xmlTable.cxx
+++ b/reportdesign/source/filter/xml/xmlTable.cxx
@@ -192,7 +192,7 @@ void OXMLTable::EndElement()
                         pAutoStyle->FillPropertySet(m_xSection.get());
                     }
                 }
-            } // if ( m_sStyleName.getLength() )
+            }
             // set height
             ::std::vector<sal_Int32>::iterator aIter = m_aHeight.begin();
             ::std::vector<sal_Int32>::iterator aEnd = m_aHeight.end();
@@ -278,7 +278,7 @@ void OXMLTable::EndElement()
                 }
                 nPosY += m_aHeight[i];
             }
-        } // if ( m_xComponent.is() )
+        }
     }
     catch(Exception&)
     {
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx
index d14c811..7038b9c 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -516,13 +516,12 @@ sal_Bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
             try
             {
                 xStorage = pMedium->GetStorage();
-                //	nError = pMedium->GetError();
             }
             catch(const Exception&)
             {
             }
-        } // if( pMedium )
-    } // if ( bRet = (sFileName.getLength() != 0) )
+        }
+    }
     sal_Bool bRet = xStorage.is();
     if ( bRet )
     {
@@ -745,17 +744,13 @@ const SvXMLTokenMap& ORptFilter::GetDocElemTokenMap() const
         static __FAR_DATA SvXMLTokenMapEntry aElemTokenMap[]=
         {
             { XML_NAMESPACE_OFFICE, XML_SETTINGS,			XML_TOK_DOC_SETTINGS	},
-            //{ XML_NAMESPACE_OOO,    XML_SETTINGS,			XML_TOK_DOC_SETTINGS	},
             { XML_NAMESPACE_OFFICE, XML_STYLES,				XML_TOK_DOC_STYLES		},
-            //{ XML_NAMESPACE_OOO,    XML_STYLES,				XML_TOK_DOC_STYLES		},
             { XML_NAMESPACE_OFFICE, XML_AUTOMATIC_STYLES,	XML_TOK_DOC_AUTOSTYLES	},
-            //{ XML_NAMESPACE_OOO,    XML_AUTOMATIC_STYLES,	XML_TOK_DOC_AUTOSTYLES	},
             { XML_NAMESPACE_OFFICE, XML_REPORT,				XML_TOK_DOC_REPORT		},
             { XML_NAMESPACE_OOO,    XML_REPORT,				XML_TOK_DOC_REPORT		},
             { XML_NAMESPACE_OFFICE, XML_FONT_FACE_DECLS,	XML_TOK_DOC_FONTDECLS	},
             { XML_NAMESPACE_OFFICE, XML_MASTER_STYLES,	    XML_TOK_DOC_MASTERSTYLES	},
             { XML_NAMESPACE_OFFICE, XML_DOCUMENT_META,	    XML_TOK_DOC_META	    },
-            //{ XML_NAMESPACE_OOO,    XML_FONT_FACE_DECLS,	XML_TOK_DOC_FONTDECLS	},
             XML_TOKEN_MAP_END
         };
         m_pDocElemTokenMap.reset(new SvXMLTokenMap( aElemTokenMap ));
@@ -801,9 +796,9 @@ const SvXMLTokenMap& ORptFilter::GetFormatElemTokenMap() const
     {
         static __FAR_DATA SvXMLTokenMapEntry aElemTokenMap[]=
         {
-            { XML_NAMESPACE_REPORT,	XML_ENABLED						,   XML_TOK_ENABLED		                },
-            { XML_NAMESPACE_REPORT,	XML_FORMULA					    ,   XML_TOK_FORMULA		                },
-            { XML_NAMESPACE_REPORT,	XML_STYLE_NAME  			    ,   XML_TOK_FORMAT_STYLE_NAME		    },
+            { XML_NAMESPACE_REPORT, XML_ENABLED     , XML_TOK_ENABLED           },
+            { XML_NAMESPACE_REPORT, XML_FORMULA     , XML_TOK_FORMULA           },
+            { XML_NAMESPACE_REPORT, XML_STYLE_NAME  , XML_TOK_FORMAT_STYLE_NAME },
             XML_TOKEN_MAP_END
         };
         m_pFormatElemTokenMap.reset(new SvXMLTokenMap( aElemTokenMap ));
@@ -829,7 +824,6 @@ const SvXMLTokenMap& ORptFilter::GetGroupElemTokenMap() const
             { XML_NAMESPACE_REPORT,	XML_SORT_ASCENDING				,	XML_TOK_SORT_ASCENDING				},
             { XML_NAMESPACE_REPORT,	XML_KEEP_TOGETHER				,	XML_TOK_GROUP_KEEP_TOGETHER			},
             { XML_NAMESPACE_REPORT,	XML_FUNCTION    				,	XML_TOK_GROUP_FUNCTION				},
-            //{ XML_NAMESPACE_REPORT,	XML_			,	XML_TOK_			},
             XML_TOKEN_MAP_END
         };
         m_pGroupElemTokenMap.reset(new SvXMLTokenMap( aElemTokenMap ));
@@ -995,10 +989,8 @@ SvXMLImportContext* ORptFilter::CreateStylesContext(const ::rtl::OUString& rLoca
     {
         pContext = new OReportStylesContext(*this, XML_NAMESPACE_OFFICE, rLocalName, xAttrList, bIsAutoStyle);
         if (bIsAutoStyle)
-            //xAutoStyles = pContext;
             SetAutoStyles((SvXMLStylesContext*)pContext);
         else
-            //xStyles = pContext;
             SetStyles((SvXMLStylesContext*)pContext);
     }
     return pContext;
@@ -1042,20 +1034,6 @@ void ORptFilter::FinishStyles()
 // -----------------------------------------------------------------------------
 ::rtl::OUString ORptFilter::convertFormula(const ::rtl::OUString& _sFormula)
 {
-    //sal_Int32 nLen = _sFormula.getLength();
-    //if ( nLen )
-    //{
-    //    const static ::rtl::OUString s_sField(RTL_CONSTASCII_USTRINGPARAM("field:["));
-    //    sal_Int32 nPos = _sFormula.indexOf(s_sField);
-    //    if ( nPos == -1 )
-    //        nPos = 4; // "rpt:"
-    //    else
-    //    {
-    //        nPos = s_sField.getLength();
-    //        --nLen; // eat "]"
-    //    }
-    //    return _sFormula.copy(nPos,nLen-nPos);
-    //}
     return _sFormula;
 }
 // -----------------------------------------------------------------------------
@@ -1129,7 +1107,7 @@ sal_Bool ORptFilter::isOldFormat() const
         {
             xProp->getPropertyValue(s_sOld) >>= bOldFormat;
         }
-    } // if ( xProp.is() )
+    }
     return bOldFormat;
 }
 
-- 
1.7.2.2


--------------000608010305070809020909--


More information about the LibreOffice mailing list