"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "sc/source/filter/xml/xmlcvali.cxx" between
libreoffice-7.0.6.1.tar.xz and libreoffice-7.0.6.2.tar.xz

About: LibreOffice source code (core). "Still" packages (released version).

xmlcvali.cxx  (libreoffice-7.0.6.1.tar.xz):xmlcvali.cxx  (libreoffice-7.0.6.2.tar.xz)
skipping to change at line 65 skipping to change at line 65
css::sheet::ValidationAlertStyle GetAlertStyle() const; css::sheet::ValidationAlertStyle GetAlertStyle() const;
void SetFormula( OUString& rFormula, OUString& rFormulaNmsp, FormulaGrammar: :Grammar& reGrammar, void SetFormula( OUString& rFormula, OUString& rFormulaNmsp, FormulaGrammar: :Grammar& reGrammar,
const OUString& rCondition, const OUString& rGlobNmsp, FormulaGrammar::G rammar eGlobGrammar, bool bHasNmsp ) const; const OUString& rCondition, const OUString& rGlobNmsp, FormulaGrammar::G rammar eGlobGrammar, bool bHasNmsp ) const;
void GetCondition( ScMyImportValidation& rValidation ) const; void GetCondition( ScMyImportValidation& rValidation ) const;
public: public:
ScXMLContentValidationContext( ScXMLImport& rImport, ScXMLContentValidationContext( ScXMLImport& rImport,
const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList ); const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList );
virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix,
const OUString& rLocalName,
const css::uno::Reference<css::xml::sax::XA
ttributeList>& xAttrList ) override;
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL c reateFastChildContext( virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL c reateFastChildContext(
sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttri buteList >& xAttrList ) override; sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttri buteList >& xAttrList ) override;
virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override; virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
void SetHelpMessage(const OUString& sTitle, const OUString& sMessage, const bool bDisplay); void SetHelpMessage(const OUString& sTitle, const OUString& sMessage, const bool bDisplay);
void SetErrorMessage(const OUString& sTitle, const OUString& sMessage, const OUString& sMessageType, const bool bDisplay); void SetErrorMessage(const OUString& sTitle, const OUString& sMessage, const OUString& sMessageType, const bool bDisplay);
void SetErrorMacro(const bool bExecute); void SetErrorMacro(const bool bExecute);
}; };
skipping to change at line 90 skipping to change at line 94
bool bDisplay; bool bDisplay;
ScXMLContentValidationContext* pValidationContext; ScXMLContentValidationContext* pValidationContext;
public: public:
ScXMLHelpMessageContext( ScXMLImport& rImport, ScXMLHelpMessageContext( ScXMLImport& rImport,
const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList, const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLContentValidationContext* pValidationContext); ScXMLContentValidationContext* pValidationContext);
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL c virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix,
reateFastChildContext( const OUString& rLocalName,
sal_Int32 nElement, const css::uno::Reference<css::xml::sax::XA
const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrLis ttributeList>& xAttrList ) override;
t ) override;
virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override; virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
}; };
class ScXMLErrorMessageContext : public ScXMLImportContext class ScXMLErrorMessageContext : public ScXMLImportContext
{ {
OUString sTitle; OUString sTitle;
OUStringBuffer sMessage; OUStringBuffer sMessage;
OUString sMessageType; OUString sMessageType;
sal_Int32 nParagraphCount; sal_Int32 nParagraphCount;
bool bDisplay; bool bDisplay;
ScXMLContentValidationContext* pValidationContext; ScXMLContentValidationContext* pValidationContext;
public: public:
ScXMLErrorMessageContext( ScXMLImport& rImport, ScXMLErrorMessageContext( ScXMLImport& rImport,
const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList, const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLContentValidationContext* pValidationContext); ScXMLContentValidationContext* pValidationContext);
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL c virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix,
reateFastChildContext( const OUString& rLocalName,
sal_Int32 nElement, const css::uno::Reference<css::xml::sax::XA
const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrLis ttributeList>& xAttrList ) override;
t ) override;
virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override; virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
}; };
class ScXMLErrorMacroContext : public ScXMLImportContext class ScXMLErrorMacroContext : public ScXMLImportContext
{ {
bool bExecute; bool bExecute;
ScXMLContentValidationContext* pValidationContext; ScXMLContentValidationContext* pValidationContext;
public: public:
ScXMLErrorMacroContext( ScXMLImport& rImport, ScXMLErrorMacroContext( ScXMLImport& rImport,
const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList, const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList,
ScXMLContentValidationContext* pValidationContext); ScXMLContentValidationContext* pValidationContext);
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL c virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix,
reateFastChildContext( const OUString& rLocalName,
sal_Int32 nElement, const css::uno::Reference<css::xml::sax::XA
const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrLis ttributeList>& xAttrList ) override;
t ) override;
virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override; virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
}; };
} }
ScXMLContentValidationsContext::ScXMLContentValidationsContext( ScXMLImport& rIm port ) : ScXMLContentValidationsContext::ScXMLContentValidationsContext( ScXMLImport& rIm port ) :
ScXMLImportContext( rImport ) ScXMLImportContext( rImport )
{ {
// here are no attributes // here are no attributes
} }
skipping to change at line 217 skipping to change at line 221
{ {
// Read old wrong value, fdo#72548 // Read old wrong value, fdo#72548
nShowList = sheet::TableValidationVisibility::SORTEDASCENDIN G; nShowList = sheet::TableValidationVisibility::SORTEDASCENDIN G;
} }
break; break;
} }
} }
} }
} }
SvXMLImportContextRef ScXMLContentValidationContext::CreateChildContext( sal_uIn
t16 nPrefix,
const OUString& rLName,
const css::uno::Reference<css::xml::
sax::XAttributeList>& /*xAttrList*/ )
{
SvXMLImportContext *pContext = nullptr;
const SvXMLTokenMap& rTokenMap = GetScImport().GetContentValidationElemToken
Map();
switch( rTokenMap.Get( nPrefix, rLName ) )
{
case XML_TOK_CONTENT_VALIDATION_ELEM_EVENT_LISTENERS:
pContext = new XMLEventsImportContext( GetImport(), nPrefix, rLName
);
xEventContext = pContext;
break;
}
return pContext;
}
uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLContentValidationC ontext::createFastChildContext( uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLContentValidationC ontext::createFastChildContext(
sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xA ttrList ) sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xA ttrList )
{ {
SvXMLImportContext *pContext = nullptr; SvXMLImportContext *pContext = nullptr;
sax_fastparser::FastAttributeList *pAttribList = sax_fastparser::FastAttributeList *pAttribList =
&sax_fastparser::castToFastAttributeList( xAttrList ); &sax_fastparser::castToFastAttributeList( xAttrList );
switch (nElement) switch (nElement)
{ {
case XML_ELEMENT( TABLE, XML_HELP_MESSAGE ): case XML_ELEMENT( TABLE, XML_HELP_MESSAGE ):
pContext = new ScXMLHelpMessageContext( GetScImport(), pAttribList, this ); pContext = new ScXMLHelpMessageContext( GetScImport(), pAttribList, this );
break; break;
case XML_ELEMENT( TABLE, XML_ERROR_MESSAGE ): case XML_ELEMENT( TABLE, XML_ERROR_MESSAGE ):
pContext = new ScXMLErrorMessageContext( GetScImport(), pAttribList, thi s); pContext = new ScXMLErrorMessageContext( GetScImport(), pAttribList, thi s);
break; break;
case XML_ELEMENT( TABLE, XML_ERROR_MACRO ): case XML_ELEMENT( TABLE, XML_ERROR_MACRO ):
pContext = new ScXMLErrorMacroContext( GetScImport(), pAttribList, this) ; pContext = new ScXMLErrorMacroContext( GetScImport(), pAttribList, this) ;
break; break;
case XML_ELEMENT(OFFICE, XML_EVENT_LISTENERS):
pContext = new XMLEventsImportContext( GetImport() );
xEventContext = pContext;
} }
return pContext; return pContext;
} }
sheet::ValidationAlertStyle ScXMLContentValidationContext::GetAlertStyle() const sheet::ValidationAlertStyle ScXMLContentValidationContext::GetAlertStyle() const
{ {
if (IsXMLToken(sErrorMessageType, XML_MACRO)) if (IsXMLToken(sErrorMessageType, XML_MACRO))
return sheet::ValidationAlertStyle_MACRO; return sheet::ValidationAlertStyle_MACRO;
if (IsXMLToken(sErrorMessageType, XML_STOP)) if (IsXMLToken(sErrorMessageType, XML_STOP))
skipping to change at line 439 skipping to change at line 458
sTitle = aIter.toString(); sTitle = aIter.toString();
break; break;
case XML_ELEMENT( TABLE, XML_DISPLAY ): case XML_ELEMENT( TABLE, XML_DISPLAY ):
bDisplay = IsXMLToken(aIter, XML_TRUE); bDisplay = IsXMLToken(aIter, XML_TRUE);
break; break;
} }
} }
} }
} }
css::uno::Reference< css::xml::sax::XFastContextHandler > ScXMLHelpMessageContex SvXMLImportContextRef ScXMLHelpMessageContext::CreateChildContext( sal_uInt16 nP
t::createFastChildContext( refix,
sal_Int32 nElement, const OUString& rLName,
const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*xAttrL const css::uno::Reference<css::xml::
ist*/ ) sax::XAttributeList>& /*xAttrList*/ )
{ {
SvXMLImportContext *pContext = nullptr; SvXMLImportContext *pContext = nullptr;
switch( nElement ) const SvXMLTokenMap& rTokenMap = GetScImport().GetContentValidationMessageEl
emTokenMap();
switch( rTokenMap.Get( nPrefix, rLName ) )
{ {
case XML_ELEMENT(TEXT, XML_P): case XML_TOK_P:
{ {
if(nParagraphCount) if(nParagraphCount)
sMessage.append('\n'); sMessage.append('\n');
++nParagraphCount; ++nParagraphCount;
pContext = new ScXMLContentContext( GetScImport(), sMessage ); pContext = new ScXMLContentContext( GetScImport(), nPrefix, rLName, sMessage);
} }
break; break;
} }
return pContext; return pContext;
} }
void SAL_CALL ScXMLHelpMessageContext::endFastElement( sal_Int32 /*nElement*/ ) void SAL_CALL ScXMLHelpMessageContext::endFastElement( sal_Int32 /*nElement*/ )
{ {
pValidationContext->SetHelpMessage(sTitle, sMessage.makeStringAndClear(), bD isplay); pValidationContext->SetHelpMessage(sTitle, sMessage.makeStringAndClear(), bD isplay);
skipping to change at line 496 skipping to change at line 516
sMessageType = aIter.toString(); sMessageType = aIter.toString();
break; break;
case XML_ELEMENT( TABLE, XML_DISPLAY ): case XML_ELEMENT( TABLE, XML_DISPLAY ):
bDisplay = IsXMLToken(aIter, XML_TRUE); bDisplay = IsXMLToken(aIter, XML_TRUE);
break; break;
} }
} }
} }
} }
css::uno::Reference< css::xml::sax::XFastContextHandler > ScXMLErrorMessageConte SvXMLImportContextRef ScXMLErrorMessageContext::CreateChildContext( sal_uInt16 n
xt::createFastChildContext( Prefix,
sal_Int32 nElement, const OUString& rLName,
const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*xAttrL const css::uno::Reference<css::xml::
ist*/ ) sax::XAttributeList>& /*xAttrList*/ )
{ {
SvXMLImportContext *pContext = nullptr; SvXMLImportContext *pContext = nullptr;
switch( nElement ) const SvXMLTokenMap& rTokenMap = GetScImport().GetContentValidationMessageEl
emTokenMap();
switch( rTokenMap.Get( nPrefix, rLName ) )
{ {
case XML_ELEMENT(TEXT, XML_P): case XML_TOK_P:
{ {
if(nParagraphCount) if(nParagraphCount)
sMessage.append('\n'); sMessage.append('\n');
++nParagraphCount; ++nParagraphCount;
pContext = new ScXMLContentContext( GetScImport(), sMessage); pContext = new ScXMLContentContext( GetScImport(), nPrefix, rLName, sMessage);
} }
break; break;
} }
return pContext; return pContext;
} }
void SAL_CALL ScXMLErrorMessageContext::endFastElement( sal_Int32 /*nElement*/ ) void SAL_CALL ScXMLErrorMessageContext::endFastElement( sal_Int32 /*nElement*/ )
{ {
pValidationContext->SetErrorMessage(sTitle, sMessage.makeStringAndClear(), s MessageType, bDisplay); pValidationContext->SetErrorMessage(sTitle, sMessage.makeStringAndClear(), s MessageType, bDisplay);
skipping to change at line 545 skipping to change at line 566
case XML_ELEMENT( TABLE, XML_NAME ): case XML_ELEMENT( TABLE, XML_NAME ):
break; break;
case XML_ELEMENT( TABLE, XML_EXECUTE ): case XML_ELEMENT( TABLE, XML_EXECUTE ):
bExecute = IsXMLToken(aIter, XML_TRUE); bExecute = IsXMLToken(aIter, XML_TRUE);
break; break;
} }
} }
} }
} }
css::uno::Reference< css::xml::sax::XFastContextHandler > ScXMLErrorMacroContex SvXMLImportContextRef ScXMLErrorMacroContext::CreateChildContext( sal_uInt16 nPr
t::createFastChildContext( efix,
sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttribute const OUString& rLName,
List >& /*xAttrList*/ ) const css::uno::Reference<css::xml::
sax::XAttributeList>& /* xAttrList */ )
{ {
SvXMLImportContext *pContext = nullptr; SvXMLImportContext *pContext = nullptr;
if (nElement == XML_ELEMENT(SCRIPT, XML_EVENTS)) if ((nPrefix == XML_NAMESPACE_SCRIPT) && IsXMLToken(rLName, XML_EVENTS))
{ {
pContext = new XMLEventsImportContext(GetImport()); pContext = new XMLEventsImportContext(GetImport(), nPrefix, rLName);
} }
return pContext; return pContext;
} }
void SAL_CALL ScXMLErrorMacroContext::endFastElement( sal_Int32 /*nElement*/ ) void SAL_CALL ScXMLErrorMacroContext::endFastElement( sal_Int32 /*nElement*/ )
{ {
pValidationContext->SetErrorMacro( bExecute ); pValidationContext->SetErrorMacro( bExecute );
} }
 End of changes. 17 change blocks. 
40 lines changed or deleted 66 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)