diff options
29 files changed, 73 insertions, 35 deletions
diff --git a/dbaccess/source/filter/xml/xmlComponent.cxx b/dbaccess/source/filter/xml/xmlComponent.cxx index c842d0c3ccd8..33bc12f00731 100644 --- a/dbaccess/source/filter/xml/xmlComponent.cxx +++ b/dbaccess/source/filter/xml/xmlComponent.cxx @@ -70,7 +70,7 @@ OXMLComponent::OXMLComponent( ODBFilter& rImport m_bAsTemplate = sValue == s_sTRUE; break; default: - SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getNameFromToken(aIter.getToken()) << " value=" << aIter.toString()); + SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getNameFromToken(aIter.getToken()) << "=" << aIter.toString()); } } if ( !m_sHREF.isEmpty() && !m_sName.isEmpty() && _xParentContainer.is() ) diff --git a/dbaccess/source/filter/xml/xmlTable.cxx b/dbaccess/source/filter/xml/xmlTable.cxx index 92c8fb680ff7..edcc68618f13 100644 --- a/dbaccess/source/filter/xml/xmlTable.cxx +++ b/dbaccess/source/filter/xml/xmlTable.cxx @@ -81,7 +81,7 @@ OXMLTable::OXMLTable( ODBFilter& _rImport m_bApplyOrder = sValue == "true"; break; default: - SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getNameFromToken(aIter.getToken()) << " value=" << aIter.toString()); + SAL_WARN("dbaccess", "unknown attribute " << SvXMLImport::getNameFromToken(aIter.getToken()) << "=" << aIter.toString()); } } uno::Sequence<uno::Any> aArguments(comphelper::InitAnyPropertySequence( diff --git a/reportdesign/source/filter/xml/xmlCell.cxx b/reportdesign/source/filter/xml/xmlCell.cxx index 395c3afbd610..1ea03cd47a11 100644 --- a/reportdesign/source/filter/xml/xmlCell.cxx +++ b/reportdesign/source/filter/xml/xmlCell.cxx @@ -30,6 +30,7 @@ #include <com/sun/star/report/XShape.hpp> #include <com/sun/star/report/XFixedLine.hpp> #include <com/sun/star/table/BorderLine2.hpp> +#include <sal/log.hxx> #include <strings.hxx> #include "xmlTable.hxx" #include "xmlFormattedField.hxx" @@ -76,6 +77,7 @@ OXMLCell::OXMLCell( ORptFilter& rImport m_pContainer->setRowSpanned(sValue.toInt32()); break; default: + SAL_WARN("reportdesign", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << sValue); break; } } diff --git a/reportdesign/source/filter/xml/xmlColumn.cxx b/reportdesign/source/filter/xml/xmlColumn.cxx index 8796c3c66bad..92bf2e01da1e 100644 --- a/reportdesign/source/filter/xml/xmlColumn.cxx +++ b/reportdesign/source/filter/xml/xmlColumn.cxx @@ -24,6 +24,7 @@ #include <xmloff/xmlnmspe.hxx> #include <xmloff/nmspmap.hxx> #include <xmloff/ProgressBarHelper.hxx> +#include <sal/log.hxx> #include "xmlEnums.hxx" #include "xmlCell.hxx" #include "xmlStyleImport.hxx" @@ -64,6 +65,7 @@ OXMLRowColumn::OXMLRowColumn( ORptFilter& rImport fillStyle(sValue); break; default: + SAL_WARN("reportdesign", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << " = " << sValue); break; } } diff --git a/reportdesign/source/filter/xml/xmlComponent.cxx b/reportdesign/source/filter/xml/xmlComponent.cxx index d63ccd713853..b269143356f5 100644 --- a/reportdesign/source/filter/xml/xmlComponent.cxx +++ b/reportdesign/source/filter/xml/xmlComponent.cxx @@ -29,6 +29,7 @@ #include <ucbhelper/content.hxx> #include <com/sun/star/awt/FontDescriptor.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> +#include <sal/log.hxx> namespace rptxml { @@ -59,6 +60,8 @@ OXMLComponent::OXMLComponent( ORptFilter& _rImport case XML_ELEMENT(DRAW, XML_NAME): m_xComponent->setName(sValue); break; + default: + SAL_WARN("reportdesign", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << sValue); } } catch(const Exception&) diff --git a/reportdesign/source/filter/xml/xmlComponent.hxx b/reportdesign/source/filter/xml/xmlComponent.hxx index efe4849aa705..27b76ff796b9 100644 --- a/reportdesign/source/filter/xml/xmlComponent.hxx +++ b/reportdesign/source/filter/xml/xmlComponent.hxx @@ -38,6 +38,8 @@ namespace rptxml ,const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ,const css::uno::Reference< css::report::XReportComponent >& _xComponent ); + virtual void SAL_CALL startFastElement( + sal_Int32 /*nElement*/, const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*xAttrList*/ ) override {} virtual ~OXMLComponent() override; }; diff --git a/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx b/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx index 7826f121a57e..4c8132d30636 100644 --- a/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx +++ b/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx @@ -25,6 +25,7 @@ #include "xmlControlProperty.hxx" #include "xmlComponent.hxx" #include <strings.hxx> +#include <sal/log.hxx> namespace rptxml { @@ -54,6 +55,7 @@ OXMLCondPrtExpr::OXMLCondPrtExpr( ORptFilter& _rImport m_xComponent->setPropertyValue(PROPERTY_CONDITIONALPRINTEXPRESSION,uno::makeAny(ORptFilter::convertFormula(sValue))); break; default: + SAL_WARN("reportdesign", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << " = " << sValue); break; } @@ -73,7 +75,12 @@ OXMLCondPrtExpr::~OXMLCondPrtExpr() void OXMLCondPrtExpr::characters( const OUString& rChars ) { - m_xComponent->setPropertyValue(PROPERTY_CONDITIONALPRINTEXPRESSION,makeAny(rChars)); + m_aCharBuffer.append(rChars); +} + +void OXMLCondPrtExpr::endFastElement( sal_Int32 ) +{ + m_xComponent->setPropertyValue(PROPERTY_CONDITIONALPRINTEXPRESSION,makeAny(m_aCharBuffer.makeStringAndClear())); } } // namespace rptxml diff --git a/reportdesign/source/filter/xml/xmlCondPrtExpr.hxx b/reportdesign/source/filter/xml/xmlCondPrtExpr.hxx index 7842e95c71d7..44460e4b0fdd 100644 --- a/reportdesign/source/filter/xml/xmlCondPrtExpr.hxx +++ b/reportdesign/source/filter/xml/xmlCondPrtExpr.hxx @@ -21,6 +21,7 @@ #include <xmloff/xmlictxt.hxx> #include <com/sun/star/beans/XPropertySet.hpp> +#include <rtl/ustrbuf.hxx> namespace rptxml { @@ -28,6 +29,7 @@ namespace rptxml class OXMLCondPrtExpr : public SvXMLImportContext { css::uno::Reference< css::beans::XPropertySet > m_xComponent; + OUStringBuffer m_aCharBuffer; OXMLCondPrtExpr(const OXMLCondPrtExpr&) = delete; void operator =(const OXMLCondPrtExpr&) = delete; public: @@ -40,9 +42,8 @@ namespace rptxml virtual void SAL_CALL startFastElement( sal_Int32 /*nElement*/, const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*xAttrList*/ ) override {} - // This method is called for all characters that are contained in the - // current element. The default is to ignore them. virtual void SAL_CALL characters( const OUString& rChars ) override; + virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override; }; } // namespace rptxml diff --git a/reportdesign/source/filter/xml/xmlControlProperty.cxx b/reportdesign/source/filter/xml/xmlControlProperty.cxx index 19b0c77aa67a..cf91373a369f 100644 --- a/reportdesign/source/filter/xml/xmlControlProperty.cxx +++ b/reportdesign/source/filter/xml/xmlControlProperty.cxx @@ -37,6 +37,7 @@ #include <unotools/datetime.hxx> #include <com/sun/star/util/DateTime.hpp> #include <rtl/math.hxx> +#include <sal/log.hxx> #define TYPE_DATE 1 #define TYPE_TIME 2 @@ -99,6 +100,7 @@ OXMLControlProperty::OXMLControlProperty( ORptFilter& rImport m_aSetting.Name = sValue; break; default: + SAL_WARN("reportdesign", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << " = " << sValue); break; } } @@ -136,6 +138,8 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > OXMLControlProperty::c void OXMLControlProperty::endFastElement(sal_Int32 ) { + if ( m_pContainer ) + m_pContainer->addValue(m_aCharBuffer.makeStringAndClear()); if ( !m_aSetting.Name.isEmpty() && m_xControl.is() ) { if ( m_bIsList && !m_aSequence.hasElements() ) @@ -153,8 +157,7 @@ void OXMLControlProperty::endFastElement(sal_Int32 ) void OXMLControlProperty::characters( const OUString& rChars ) { - if ( m_pContainer ) - m_pContainer->addValue(rChars); + m_aCharBuffer.append(rChars); } void OXMLControlProperty::addValue(const OUString& _sValue) diff --git a/reportdesign/source/filter/xml/xmlControlProperty.hxx b/reportdesign/source/filter/xml/xmlControlProperty.hxx index b1b2c051aba7..41d6c759ab1d 100644 --- a/reportdesign/source/filter/xml/xmlControlProperty.hxx +++ b/reportdesign/source/filter/xml/xmlControlProperty.hxx @@ -25,6 +25,7 @@ #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/util/Date.hpp> #include <com/sun/star/util/Time.hpp> +#include <rtl/ustrbuf.hxx> namespace rptxml { @@ -37,6 +38,7 @@ namespace rptxml OXMLControlProperty* m_pContainer; css::uno::Type m_aPropType; // the type of the property the instance imports currently bool m_bIsList; + OUStringBuffer m_aCharBuffer; ORptFilter& GetOwnImport(); static css::uno::Any convertString(const css::uno::Type& _rExpectedType, const OUString& _rReadCharacters); diff --git a/reportdesign/source/filter/xml/xmlFixedContent.cxx b/reportdesign/source/filter/xml/xmlFixedContent.cxx index 3836e7ab06b1..b5514c08ca16 100644 --- a/reportdesign/source/filter/xml/xmlFixedContent.cxx +++ b/reportdesign/source/filter/xml/xmlFixedContent.cxx @@ -87,7 +87,7 @@ void OXMLCharContent::InsertControlCharacter(sal_Int16 _nControl) switch( _nControl ) { case ControlCharacter::LINE_BREAK: - m_pFixedContent->Characters("\n"); + m_pFixedContent->characters("\n"); break; default: OSL_FAIL("Not supported control character"); @@ -97,7 +97,7 @@ void OXMLCharContent::InsertControlCharacter(sal_Int16 _nControl) void OXMLCharContent::InsertString(const OUString& _sString) { - m_pFixedContent->Characters(_sString); + m_pFixedContent->characters(_sString); } @@ -119,11 +119,11 @@ OXMLFixedContent::~OXMLFixedContent() } -css::uno::Reference< css::xml::sax::XFastContextHandler > OXMLFixedContent::createFastChildContext_( +css::uno::Reference< css::xml::sax::XFastContextHandler > OXMLFixedContent::createFastChildContext( sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ) { - css::uno::Reference< css::xml::sax::XFastContextHandler > xContext = OXMLReportElementBase::createFastChildContext_(nElement,xAttrList); + css::uno::Reference< css::xml::sax::XFastContextHandler > xContext = OXMLReportElementBase::createFastChildContext(nElement,xAttrList); if (xContext) return xContext; @@ -163,7 +163,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > OXMLFixedContent::crea return xContext; } -void OXMLFixedContent::endFastElement(sal_Int32 ) +void OXMLFixedContent::endFastElement(sal_Int32 nElement) { if ( m_pInP ) { @@ -189,7 +189,7 @@ void OXMLFixedContent::endFastElement(sal_Int32 ) m_pContainer->addCell(m_xReportComponent); m_rCell.setComponent(m_xReportComponent); - OXMLReportElementBase::EndElement(); + OXMLReportElementBase::endFastElement(nElement); } } diff --git a/reportdesign/source/filter/xml/xmlFixedContent.hxx b/reportdesign/source/filter/xml/xmlFixedContent.hxx index c4e1520be9a9..8baf242e62fa 100644 --- a/reportdesign/source/filter/xml/xmlFixedContent.hxx +++ b/reportdesign/source/filter/xml/xmlFixedContent.hxx @@ -35,10 +35,6 @@ namespace rptxml OXMLFixedContent* m_pInP; // if set then we are in text-p element bool m_bFormattedField; - protected: - virtual css::uno::Reference< css::xml::sax::XFastContextHandler > createFastChildContext_( sal_Int32 nElement, - const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ) override; - private: OXMLFixedContent(const OXMLFixedContent&) = delete; OXMLFixedContent& operator =(const OXMLFixedContent&) = delete; public: @@ -49,6 +45,10 @@ namespace rptxml ,OXMLFixedContent* _pInP = nullptr); virtual ~OXMLFixedContent() override; + virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( + sal_Int32 nElement, + const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ) override; + // This method is called for all characters that are contained in the // current element. The default is to ignore them. virtual void SAL_CALL characters( const OUString& rChars ) override; diff --git a/reportdesign/source/filter/xml/xmlFormatCondition.cxx b/reportdesign/source/filter/xml/xmlFormatCondition.cxx index 580651197e9e..849292ec6ab6 100644 --- a/reportdesign/source/filter/xml/xmlFormatCondition.cxx +++ b/reportdesign/source/filter/xml/xmlFormatCondition.cxx @@ -28,6 +28,7 @@ #include <com/sun/star/beans/PropertyAttribute.hpp> #include <strings.hxx> #include "xmlStyleImport.hxx" +#include <sal/log.hxx> namespace rptxml { @@ -67,6 +68,7 @@ OXMLFormatCondition::OXMLFormatCondition( ORptFilter& rImport, m_sStyleName = sValue; break; default: + SAL_WARN("reportdesign", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << " = " << sValue); break; } } diff --git a/reportdesign/source/filter/xml/xmlFormattedField.cxx b/reportdesign/source/filter/xml/xmlFormattedField.cxx index b5a646722d23..0b2fb71a4443 100644 --- a/reportdesign/source/filter/xml/xmlFormattedField.cxx +++ b/reportdesign/source/filter/xml/xmlFormattedField.cxx @@ -27,6 +27,7 @@ #include <xmloff/xmluconv.hxx> #include "xmlReportElement.hxx" #include "xmlComponent.hxx" +#include <sal/log.hxx> namespace rptxml @@ -60,6 +61,7 @@ OXMLFormattedField::OXMLFormattedField( ORptFilter& rImport _xComponent->setDataField("rpt:PageNumber()"); break; default: + SAL_WARN("reportdesign", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << " = " << sValue); break; } } diff --git a/reportdesign/source/filter/xml/xmlFunction.cxx b/reportdesign/source/filter/xml/xmlFunction.cxx index 8bda678e3c91..8a8787c6c4b1 100644 --- a/reportdesign/source/filter/xml/xmlFunction.cxx +++ b/reportdesign/source/filter/xml/xmlFunction.cxx @@ -24,6 +24,7 @@ #include "xmlHelper.hxx" #include "xmlEnums.hxx" #include <strings.hxx> +#include <sal/log.hxx> namespace rptxml { @@ -74,6 +75,7 @@ OXMLFunction::OXMLFunction( ORptFilter& _rImport m_xFunction->setDeepTraversing(sValue == s_sTRUE); break; default: + SAL_WARN("reportdesign", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << " = " << sValue); break; } } diff --git a/reportdesign/source/filter/xml/xmlGroup.cxx b/reportdesign/source/filter/xml/xmlGroup.cxx index fdeb2b00f462..570ed1a75e0a 100644 --- a/reportdesign/source/filter/xml/xmlGroup.cxx +++ b/reportdesign/source/filter/xml/xmlGroup.cxx @@ -30,6 +30,7 @@ #include <ucbhelper/content.hxx> #include <com/sun/star/report/GroupOn.hpp> #include <com/sun/star/report/KeepTogether.hpp> +#include <sal/log.hxx> namespace rptxml { @@ -160,6 +161,7 @@ OXMLGroup::OXMLGroup( ORptFilter& _rImport m_xGroup->setKeepTogether(lcl_getKeepTogetherOption(sValue)); break; default: + SAL_WARN("reportdesign", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << sValue); break; } } diff --git a/reportdesign/source/filter/xml/xmlImage.cxx b/reportdesign/source/filter/xml/xmlImage.cxx index a0b559730e68..fc1ee6e84fcf 100644 --- a/reportdesign/source/filter/xml/xmlImage.cxx +++ b/reportdesign/source/filter/xml/xmlImage.cxx @@ -89,6 +89,7 @@ OXMLImage::OXMLImage( ORptFilter& rImport, _xComponent->setDataField(ORptFilter::convertFormula(sValue)); break; default: + SAL_WARN("reportdesign", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << " = " << sValue); break; } } diff --git a/reportdesign/source/filter/xml/xmlMasterFields.cxx b/reportdesign/source/filter/xml/xmlMasterFields.cxx index 2816be32cbe2..11d73c1f9155 100644 --- a/reportdesign/source/filter/xml/xmlMasterFields.cxx +++ b/reportdesign/source/filter/xml/xmlMasterFields.cxx @@ -24,6 +24,7 @@ #include <xmloff/ProgressBarHelper.hxx> #include "xmlEnums.hxx" #include "xmlReport.hxx" +#include <sal/log.hxx> namespace rptxml @@ -55,6 +56,7 @@ OXMLMasterFields::OXMLMasterFields( ORptFilter& rImport, sDetailField = sValue; break; default: + SAL_WARN("reportdesign", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << " = " << sValue); break; } } diff --git a/reportdesign/source/filter/xml/xmlReport.cxx b/reportdesign/source/filter/xml/xmlReport.cxx index 96d08acb4f58..485dcf218989 100644 --- a/reportdesign/source/filter/xml/xmlReport.cxx +++ b/reportdesign/source/filter/xml/xmlReport.cxx @@ -77,6 +77,7 @@ OXMLReport::OXMLReport( ORptFilter& rImport, m_xReportDefinition->setFilter(sValue); break; case XML_ELEMENT(REPORT, XML_CAPTION): + case XML_ELEMENT(OFFICE, XML_CAPTION): m_xReportDefinition->setCaption(sValue); break; case XML_ELEMENT(REPORT, XML_ESCAPE_PROCESSING): @@ -89,6 +90,7 @@ OXMLReport::OXMLReport( ORptFilter& rImport, m_xReportDefinition->setName(sValue); break; default: + SAL_WARN("reportdesign", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << " = " << sValue); break; } } @@ -126,7 +128,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > OXMLReport::createFast sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) { - css::uno::Reference< css::xml::sax::XFastContextHandler > xContext = createFastChildContext_(nElement,xAttrList); + css::uno::Reference< css::xml::sax::XFastContextHandler > xContext = OXMLReportElementBase::createFastChildContext(nElement,xAttrList); if (xContext) return xContext; diff --git a/reportdesign/source/filter/xml/xmlReport.hxx b/reportdesign/source/filter/xml/xmlReport.hxx index e6d4627e3297..7b010d9e74c2 100644 --- a/reportdesign/source/filter/xml/xmlReport.hxx +++ b/reportdesign/source/filter/xml/xmlReport.hxx @@ -25,7 +25,7 @@ namespace rptxml { class ORptFilter; - class OXMLReport : public OXMLReportElementBase, public IMasterDetailFieds + class OXMLReport final : public OXMLReportElementBase, public IMasterDetailFieds { css::uno::Reference< css::report::XReportDefinition > m_xReportDefinition; ::std::vector< OUString> m_aMasterFields; diff --git a/reportdesign/source/filter/xml/xmlReportElement.cxx b/reportdesign/source/filter/xml/xmlReportElement.cxx index f3740970b84a..b4d80b42490c 100644 --- a/reportdesign/source/filter/xml/xmlReportElement.cxx +++ b/reportdesign/source/filter/xml/xmlReportElement.cxx @@ -26,6 +26,7 @@ #include "xmlComponent.hxx" #include "xmlCondPrtExpr.hxx" #include "xmlFormatCondition.hxx" +#include <sal/log.hxx> namespace rptxml @@ -62,6 +63,7 @@ OXMLReportElement::OXMLReportElement( ORptFilter& rImport, m_xComponent->setPrintRepeatedValues(sValue == s_sTRUE); break; default: + SAL_WARN("reportdesign", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << " = " << sValue); break; } } diff --git a/reportdesign/source/filter/xml/xmlReportElementBase.cxx b/reportdesign/source/filter/xml/xmlReportElementBase.cxx index 122395abc6a5..b7fe4f4950e8 100644 --- a/reportdesign/source/filter/xml/xmlReportElementBase.cxx +++ b/reportdesign/source/filter/xml/xmlReportElementBase.cxx @@ -51,14 +51,6 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > OXMLReportElementBase: sal_Int32 nElement, const Reference< XFastAttributeList > & xAttrList ) { - css::uno::Reference< css::xml::sax::XFastContextHandler > xContext = createFastChildContext_(nElement,xAttrList); - return xContext; -} - -css::uno::Reference< css::xml::sax::XFastContextHandler > OXMLReportElementBase::createFastChildContext_( - sal_Int32 nElement, - const Reference< XFastAttributeList > & xAttrList ) -{ css::uno::Reference< css::xml::sax::XFastContextHandler > xContext; switch( nElement ) diff --git a/reportdesign/source/filter/xml/xmlReportElementBase.hxx b/reportdesign/source/filter/xml/xmlReportElementBase.hxx index ab60557e0b2a..9d4f03f25b4e 100644 --- a/reportdesign/source/filter/xml/xmlReportElementBase.hxx +++ b/reportdesign/source/filter/xml/xmlReportElementBase.hxx @@ -46,8 +46,6 @@ namespace rptxml OXMLTable* m_pContainer; css::uno::Reference< css::report::XReportComponent > m_xReportComponent; - virtual css::uno::Reference< css::xml::sax::XFastContextHandler > createFastChildContext_( sal_Int32 nElement, - const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ); public: OXMLReportElementBase( ORptFilter& rImport diff --git a/reportdesign/source/filter/xml/xmlSection.cxx b/reportdesign/source/filter/xml/xmlSection.cxx index 07646370ea29..fd84df264dfa 100644 --- a/reportdesign/source/filter/xml/xmlSection.cxx +++ b/reportdesign/source/filter/xml/xmlSection.cxx @@ -31,6 +31,7 @@ #include <com/sun/star/report/ReportPrintOption.hpp> #include <strings.hxx> #include "xmlTable.hxx" +#include <sal/log.hxx> namespace rptxml @@ -79,9 +80,8 @@ OXMLSection::OXMLSection( ORptFilter& rImport, case XML_ELEMENT(REPORT, XML_REPEAT_SECTION): m_xSection->setRepeatSection(sValue == s_sTRUE ); break; - default: - OSL_FAIL("OXMLSection: Unknown attribute!"); + SAL_WARN("reportdesign", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << " = " << sValue); } } } diff --git a/reportdesign/source/filter/xml/xmlSubDocument.cxx b/reportdesign/source/filter/xml/xmlSubDocument.cxx index 7b09d5a1b6b7..fabbb67f2187 100644 --- a/reportdesign/source/filter/xml/xmlSubDocument.cxx +++ b/reportdesign/source/filter/xml/xmlSubDocument.cxx @@ -80,11 +80,11 @@ SvXMLImportContextRef OXMLSubDocument::CreateChildContext( sal_uInt16 nPrefix, return xContext; } -css::uno::Reference< css::xml::sax::XFastContextHandler > OXMLSubDocument::createFastChildContext_( +css::uno::Reference< css::xml::sax::XFastContextHandler > OXMLSubDocument::createFastChildContext( sal_Int32 nElement, const Reference< XFastAttributeList > & xAttrList ) { - css::uno::Reference< css::xml::sax::XFastContextHandler > xContext = OXMLReportElementBase::createFastChildContext_(nElement,xAttrList); + css::uno::Reference< css::xml::sax::XFastContextHandler > xContext = OXMLReportElementBase::createFastChildContext(nElement,xAttrList); if (xContext) return xContext; diff --git a/reportdesign/source/filter/xml/xmlSubDocument.hxx b/reportdesign/source/filter/xml/xmlSubDocument.hxx index 38a4007ea5f8..14f7fffdcf42 100644 --- a/reportdesign/source/filter/xml/xmlSubDocument.hxx +++ b/reportdesign/source/filter/xml/xmlSubDocument.hxx @@ -39,8 +39,6 @@ namespace rptxml OXMLSubDocument(const OXMLSubDocument&) = delete; void operator =(const OXMLSubDocument&) = delete; - virtual css::uno::Reference< css::xml::sax::XFastContextHandler > createFastChildContext_( sal_Int32 nElement, - const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ) override; public: OXMLSubDocument( ORptFilter& rImport @@ -49,6 +47,10 @@ namespace rptxml ,OXMLCell* _pCellParent); virtual ~OXMLSubDocument() override; + virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( + sal_Int32 nElement, + const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ) override; + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/reportdesign/source/filter/xml/xmlTable.cxx b/reportdesign/source/filter/xml/xmlTable.cxx index a2f0ab6d7e81..8cb0c38771ba 100644 --- a/reportdesign/source/filter/xml/xmlTable.cxx +++ b/reportdesign/source/filter/xml/xmlTable.cxx @@ -35,6 +35,7 @@ #include <connectivity/dbtools.hxx> #include <com/sun/star/report/XShape.hpp> #include <com/sun/star/report/XFixedLine.hpp> +#include <sal/log.hxx> #include <numeric> @@ -101,6 +102,7 @@ OXMLTable::OXMLTable( ORptFilter& rImport m_sStyleName = sValue; break; default: + SAL_WARN("reportdesign", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << " = " << sValue); break; } } diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx index 80bff5e9fef6..f70995763c4c 100644 --- a/sax/source/fastparser/fastparser.cxx +++ b/sax/source/fastparser/fastparser.cxx @@ -1190,8 +1190,12 @@ void FastSaxParserImpl::callbackStartElement(const xmlChar *localName , const xm if( nAttributeToken != FastToken::DONTKNOW ) rEvent.mxAttributes->add( nAttributeToken, XML_CAST( attributes[ i + 3 ] ), attributes[ i + 4 ] - attributes[ i + 3 ] ); else + { + SAL_WARN("xmloff", "unknown attribute " << XML_CAST( attributes[ i ] ) << "=" << + OString( XML_CAST( attributes[ i + 3 ] ), attributes[ i + 4 ] - attributes[ i + 3 ] )); rEvent.mxAttributes->addUnknown( XML_CAST( attributes[ i ] ), OString( XML_CAST( attributes[ i + 3 ] ), attributes[ i + 4 ] - attributes[ i + 3 ] )); + } } } @@ -1260,6 +1264,7 @@ void FastSaxParserImpl::addUnknownElementWithPrefix(const xmlChar **attributes, OString aQualifiedName = (rPrefix.isEmpty())? rLocalName : rPrefix + ":" + rLocalName; xAttributes->addUnknown( aNamespaceURI, aQualifiedName, OString( XML_CAST( attributes[ i + 3 ] ), attributes[ i + 4 ] - attributes[ i + 3 ] )); + SAL_WARN("xmloff", "unknown element " << aQualifiedName << " " << aNamespaceURI); } void FastSaxParserImpl::callbackEndElement() diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx index 5983682863e0..9e51b647cf98 100644 --- a/xmloff/source/text/txtparai.cxx +++ b/xmloff/source/text/txtparai.cxx @@ -170,6 +170,8 @@ XMLCharContext::XMLCharContext( m_nCount = static_cast<sal_uInt16>(nTmp); } } + else + SAL_WARN("xmloff", "unknown attribute " << SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << " = " << aIter.toString()); } } } |