Kaydet (Commit) 7ef4457b authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Revert "fdo#80403: Writer specific AutoCorr use FastParser"

This reverts commit c1e90457 (plus follow-up
c940d4d3 "loplugin:saloverride" and
5f0f3d4e "Work around
-Werror,-Wdeprecated-register"), it broke JunitTest_sw_unoapi.

Change-Id: I21499f8a7810eef637bb51a30380ae60b3d915cd
üst b21f2439
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_CustomTarget_CustomTarget,sw/generated))
sw_SRC := $(SRCDIR)/sw/source/core/swg
sw_PL := $(SRCDIR)/solenv/bin/gentoken.pl
sw_INC := $(call gb_CustomTarget_get_workdir,sw/generated)
$(sw_INC)/TextBlockTokens.gperf : $(sw_SRC)/TextBlockTokens.txt $(sw_PL)
mkdir -p $(sw_INC)
$(PERL) $(sw_PL) $(sw_SRC)/TextBlockTokens.txt $(sw_INC)/TextBlockTokens.gperf
$(sw_INC)/BlockListTokens.gperf : $(sw_SRC)/BlockListTokens.txt $(sw_PL)
mkdir -p $(sw_INC)
$(PERL) $(sw_PL) $(sw_SRC)/BlockListTokens.txt $(sw_INC)/BlockListTokens.gperf
$(sw_INC)/tokens.cxx : $(sw_INC)/TextBlockTokens.gperf $(sw_INC)/BlockListTokens.gperf
$(GPERF) --compare-strncmp --readonly-tables --output-file=$(sw_INC)/tokens.cxx \
--class-name=TextBlockTokens --word-array-name=textBlockList --enum $(sw_INC)/TextBlockTokens.gperf
$(GPERF) --compare-strncmp --readonly-tables -T $(sw_INC)/BlockListTokens.gperf \
--class-name=BlockListTokens --word-array-name=blockListList >> $(sw_INC)/tokens.cxx
sed -i -e "s/(char\*)0/(char\*)0, XML_TOKEN_INVALID/g" $(sw_INC)/tokens.cxx
sed -i -e "/^#line/d" $(sw_INC)/tokens.cxx
$(call gb_CustomTarget_get_target,sw/generated) : $(sw_INC)/tokens.cxx
# vim: set noet sw=4 ts=4:
...@@ -36,7 +36,6 @@ $(eval $(call gb_Library_set_include,sw,\ ...@@ -36,7 +36,6 @@ $(eval $(call gb_Library_set_include,sw,\
$(eval $(call gb_Library_use_custom_headers,sw,\ $(eval $(call gb_Library_use_custom_headers,sw,\
officecfg/registry \ officecfg/registry \
sw/generated \
)) ))
$(eval $(call gb_Library_use_sdk_api,sw)) $(eval $(call gb_Library_use_sdk_api,sw))
......
...@@ -21,7 +21,6 @@ $(eval $(call gb_Module_Module,sw)) ...@@ -21,7 +21,6 @@ $(eval $(call gb_Module_Module,sw))
$(eval $(call gb_Module_add_targets,sw,\ $(eval $(call gb_Module_add_targets,sw,\
$(call gb_Helper_optional,DESKTOP,Executable_tiledrendering) \ $(call gb_Helper_optional,DESKTOP,Executable_tiledrendering) \
CustomTarget_generated \
Library_msword \ Library_msword \
Library_sw \ Library_sw \
Library_swd \ Library_swd \
......
...@@ -21,14 +21,6 @@ ...@@ -21,14 +21,6 @@
#define INCLUDED_SW_SOURCE_CORE_INC_SWXMLBLOCKIMPORT_HXX #define INCLUDED_SW_SOURCE_CORE_INC_SWXMLBLOCKIMPORT_HXX
#include <xmloff/xmlimp.hxx> #include <xmloff/xmlimp.hxx>
#include <xmloff/nmspmap.hxx>
#include <xmloff/xmlnmspe.hxx>
#include <com/sun/star/xml/sax/XFastTokenHandler.hpp>
#include <com/sun/star/xml/sax/FastToken.hpp>
#include <sax/fastattribs.hxx>
using namespace css::xml::sax;
using namespace xmloff::token;
class SwXMLTextBlocks; class SwXMLTextBlocks;
class SwXMLBlockListImport : public SvXMLImport class SwXMLBlockListImport : public SvXMLImport
...@@ -39,8 +31,10 @@ private: ...@@ -39,8 +31,10 @@ private:
protected: protected:
// This method is called after the namespace map has been updated, but // This method is called after the namespace map has been updated, but
// before a context for the current element has been pushed. // before a context for the current element has been pushed.
virtual SvXMLImportContext* CreateFastContext( sal_Int32 Element, virtual SvXMLImportContext *CreateContext( sal_uInt16 nPrefix,
const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ) SAL_OVERRIDE; const OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList > & xAttrList ) SAL_OVERRIDE;
public: public:
SwXMLBlockListImport( SwXMLBlockListImport(
...@@ -63,8 +57,10 @@ private: ...@@ -63,8 +57,10 @@ private:
protected: protected:
// This method is called after the namespace map has been updated, but // This method is called after the namespace map has been updated, but
// before a context for the current element has been pushed. // before a context for the current element has been pushed.
virtual SvXMLImportContext* CreateFastContext( sal_Int32 Element, virtual SvXMLImportContext *CreateContext( sal_uInt16 nPrefix,
const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ) SAL_OVERRIDE; const OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList > & xAttrList ) SAL_OVERRIDE;
public: public:
bool bTextOnly; bool bTextOnly;
...@@ -83,62 +79,6 @@ public: ...@@ -83,62 +79,6 @@ public:
throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
}; };
enum SwXMLTextBlockToken : sal_Int32
{
OFFICE_BODY = FastToken::NAMESPACE | XML_NAMESPACE_OFFICE | XML_BODY,
OFFICE_TEXT = FastToken::NAMESPACE | XML_NAMESPACE_OFFICE | XML_TEXT,
OFFICE_DOCUMENT = FastToken::NAMESPACE | XML_NAMESPACE_OFFICE | XML_DOCUMENT,
OFFICE_DOCUMENT_CONTENT = FastToken::NAMESPACE | XML_NAMESPACE_OFFICE | XML_DOCUMENT_CONTENT,
TEXT_P = FastToken::NAMESPACE | XML_NAMESPACE_TEXT | XML_P
};
class SwXMLTextBlockTokenHandler : public
cppu::WeakImplHelper1< css::xml::sax::XFastTokenHandler >,
public sax_fastparser::FastTokenHandlerBase
{
public:
SwXMLTextBlockTokenHandler();
virtual ~SwXMLTextBlockTokenHandler();
//XFastTokenHandler
sal_Int32 SAL_CALL getTokenFromUTF8( const css::uno::Sequence< sal_Int8 >& Identifier )
throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
css::uno::Sequence< sal_Int8 > SAL_CALL getUTF8Identifier( sal_Int32 Token )
throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
//Much fast direct C++ shortcut to the method that matters
virtual sal_Int32 getTokenDirect( const char *pTag, sal_Int32 nLength ) const SAL_OVERRIDE;
};
enum SwXMLBlockListToken : sal_Int32
{
ABBREVIATED_NAME = FastToken::NAMESPACE | XML_NAMESPACE_BLOCKLIST | XML_ABBREVIATED_NAME,
BLOCK = FastToken::NAMESPACE | XML_NAMESPACE_BLOCKLIST | XML_BLOCK,
BLOCK_LIST = FastToken::NAMESPACE | XML_NAMESPACE_BLOCKLIST | XML_BLOCK_LIST,
LIST_NAME = FastToken::NAMESPACE | XML_NAMESPACE_BLOCKLIST | XML_LIST_NAME,
NAME = FastToken::NAMESPACE | XML_NAMESPACE_BLOCKLIST | XML_NAME,
PACKAGE_NAME = FastToken::NAMESPACE | XML_NAMESPACE_BLOCKLIST | XML_PACKAGE_NAME,
UNFORMATTED_TEXT = FastToken::NAMESPACE | XML_NAMESPACE_BLOCKLIST | XML_UNFORMATTED_TEXT
};
class SwXMLBlockListTokenHandler : public
cppu::WeakImplHelper1< css::xml::sax::XFastTokenHandler >,
public sax_fastparser::FastTokenHandlerBase
{
public:
SwXMLBlockListTokenHandler();
virtual ~SwXMLBlockListTokenHandler();
//XFastTokenHandler
sal_Int32 SAL_CALL getTokenFromUTF8( const css::uno::Sequence< sal_Int8 >& Identifier )
throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
css::uno::Sequence< sal_Int8 > SAL_CALL getUTF8Identifier( sal_Int32 Token )
throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
//Much fast direct C++ shortcut to the method that matters
virtual sal_Int32 getTokenDirect( const char *pTag, sal_Int32 nLength ) const SAL_OVERRIDE;
};
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
abbreviated-name
block
block-list
list-name
name
package-name
unformatted-text
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment