diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2020-02-25 19:06:32 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-02-29 12:04:55 +0100 |
commit | db7df91ea05f9093955583f165e32e218364fec3 (patch) | |
tree | 435c5dfcb81b721964718da123d0e45021679235 /reportdesign/source | |
parent | 32d08f86d20b2f7e44f6b0506feee90fb7138d33 (diff) |
tdf#130878 Report does not show label-fields
The critical part was
(1) calling m_pFixedContent->Characters instead of
m_pFixedContent->characters in OXMLCharContent
(2) calling OXMLReportElementBase::EndElement instead of
OXMLReportElementBase::endFastElement in OXMLFixedContent
Also
(3) add a bunch of debugging logging to help find this
(4) fix various characters() methods that can no longer
rely on being called once for text content in a node
Change-Id: Ib8ea88c5ff377311ca70e4292cad6d1f7f7c7323
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89589
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign/source')
25 files changed, 64 insertions, 33 deletions
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; } } |