chart2/source/inc/LabeledDataSequence.hxx |    2 -
 sw/source/core/swg/SwXMLTextBlocks1.cxx   |   37 ++++++++++++++++++++----------
 2 files changed, 25 insertions(+), 14 deletions(-)

New commits:
commit 4d020dfe1439e963f0b2367ba984c2eb6eb153a5
Author:     Noel Grandin <[email protected]>
AuthorDate: Tue Feb 21 16:14:36 2023 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Tue Feb 21 18:48:12 2023 +0000

    tdf#153728 Can't assign macro to autotext
    
    regression from
        commit b8f932e1df1efb230230ab1f1b9c8cfc822a0f4c
        Author: Noel Grandin <[email protected]>
        Date:   Thu Jan 9 12:01:55 2020 +0200
        convert XMLAutoTextEventImport to FastParser APIs
    
    Change-Id: I924c2c95a258917b0003171b71c23a65a6b623d3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147399
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/sw/source/core/swg/SwXMLTextBlocks1.cxx 
b/sw/source/core/swg/SwXMLTextBlocks1.cxx
index 3517d3670316..e8a2b088e67c 100644
--- a/sw/source/core/swg/SwXMLTextBlocks1.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks1.cxx
@@ -195,9 +195,6 @@ ErrCode SwXMLTextBlocks::GetMacroTable( sal_uInt16 nIdx,
         uno::Reference< uno::XComponentContext > xContext =
             comphelper::getProcessComponentContext();
 
-        // get parser
-        uno::Reference< xml::sax::XParser > xParser = 
xml::sax::Parser::create( xContext );
-
         // create descriptor and reference to it. Either
         // both or neither must be kept because of the
         // reference counting!
@@ -209,21 +206,37 @@ ErrCode SwXMLTextBlocks::GetMacroTable( sal_uInt16 nIdx,
         OUString sFilterComponent = bOasis
             ? 
OUString("com.sun.star.comp.Writer.XMLOasisAutotextEventsImporter")
             : OUString("com.sun.star.comp.Writer.XMLAutotextEventsImporter");
-        uno::Reference< xml::sax::XDocumentHandler > xFilter(
+        uno::Reference< XInterface > xFilterInt =
             
xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
-                sFilterComponent, aFilterArguments, xContext),
-            UNO_QUERY );
-        OSL_ENSURE( xFilter.is(), "can't instantiate autotext-events filter");
-        if ( !xFilter.is() )
-            return ERR_SWG_READ_ERROR;
+                sFilterComponent, aFilterArguments, xContext);
 
-        // connect parser and filter
-        xParser->setDocumentHandler( xFilter );
 
         // parse the stream
         try
         {
-            xParser->parseStream( aParserInput );
+            Reference<css::xml::sax::XFastParser> xFastParser(xFilterInt, 
UNO_QUERY);
+            Reference<css::xml::sax::XFastDocumentHandler> 
xFastDocHandler(xFilterInt, UNO_QUERY);
+            if (xFastParser)
+            {
+                xFastParser->parseStream(aParserInput);
+            }
+            else if (xFastDocHandler)
+            {
+                Reference<css::xml::sax::XFastParser> xParser
+                    = css::xml::sax::FastParser::create(xContext);
+                xParser->setFastDocumentHandler(xFastDocHandler);
+                xParser->parseStream(aParserInput);
+            }
+            else
+            {
+                Reference<css::xml::sax::XDocumentHandler> 
xDocHandler(xFilterInt, UNO_QUERY);
+                OSL_ENSURE( xDocHandler.is(), "can't instantiate 
autotext-events filter");
+                if ( !xDocHandler.is() )
+                    return ERR_SWG_READ_ERROR;
+                Reference<css::xml::sax::XParser> xParser = 
css::xml::sax::Parser::create(xContext);
+                xParser->setDocumentHandler(xDocHandler);
+                xParser->parseStream(aParserInput);
+            }
         }
         catch( xml::sax::SAXParseException& )
         {
commit 0f158508a4bea01ff47dacbcdd21ad1bca026721
Author:     Noel Grandin <[email protected]>
AuthorDate: Tue Feb 21 14:02:01 2023 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Tue Feb 21 18:48:01 2023 +0000

    BaseMutex is unused in LabeledDataSequence
    
    Change-Id: If6f5a6e2954e28008c8c690557f15124452c05d3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147404
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/chart2/source/inc/LabeledDataSequence.hxx 
b/chart2/source/inc/LabeledDataSequence.hxx
index 7c9593bd0dc5..ab5338420be3 100644
--- a/chart2/source/inc/LabeledDataSequence.hxx
+++ b/chart2/source/inc/LabeledDataSequence.hxx
@@ -18,7 +18,6 @@
  */
 #pragma once
 
-#include <cppuhelper/basemutex.hxx>
 #include <cppuhelper/implbase.hxx>
 
 #include <com/sun/star/chart2/data/XLabeledDataSequence2.hpp>
@@ -42,7 +41,6 @@ typedef cppu::WeakImplHelper<
 }
 
 class OOO_DLLPUBLIC_CHARTTOOLS LabeledDataSequence final :
-        public cppu::BaseMutex,
         public impl::LabeledDataSequence_Base
 {
 public:

Reply via email to