27#if __has_warning("-Wdeprecated-register")
28#pragma GCC diagnostic push
29#pragma GCC diagnostic ignored "-Wdeprecated-register"
34#if __has_warning("-Wdeprecated-register")
35#pragma GCC diagnostic pop
41using namespace css::xml::sax;
55 const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList );
57 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
58 sal_Int32 Element,
const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList )
override;
65 const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList );
76 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
77 sal_Int32 Element,
const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList )
override;
88 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
89 sal_Int32,
const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList )
override;
100 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
102 const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList )
override;
113 virtual void SAL_CALL characters(
const OUString & aChars )
override;
115 virtual ~SwXMLTextBlockParContext()
override;
135 return Sequence< sal_Int8 >();
142 const struct xmltoken* pToken = TextBlockTokens::in_word_set( pTag,
nLength );
161 return Sequence< sal_Int8 >();
168 const struct xmltoken* pToken = BlockListTokens::in_word_set( pTag,
nLength );
172SwXMLBlockListContext::SwXMLBlockListContext(
175 , m_rLocalRef(rImport)
181uno::Reference< ::xml::sax::XFastContextHandler > SAL_CALL
182SwXMLBlockListContext::createFastChildContext( sal_Int32 Element,
183 const uno::Reference< xml::sax::XFastAttributeList > & xAttrList )
186 return new SwXMLBlockContext(m_rLocalRef, xAttrList);
190SwXMLBlockContext::SwXMLBlockContext(
192 const uno::Reference< xml::sax::XFastAttributeList > & xAttrList ) :
196 OUString aShort, aLong, aPackageName;
197 bool bTextOnly =
false;
213 if (aShort.isEmpty() || aLong.isEmpty() || aPackageName.isEmpty())
220 , m_rLocalRef(rImport)
224uno::Reference< ::xml::sax::XFastContextHandler > SAL_CALL
225SwXMLTextBlockDocumentContext::createFastChildContext( sal_Int32 Element,
226 const uno::Reference< xml::sax::XFastAttributeList > & )
229 return new SwXMLTextBlockBodyContext(m_rLocalRef);
235 , m_rLocalRef(rImport)
239uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
240SwXMLTextBlockTextContext::createFastChildContext( sal_Int32 Element,
241 const uno::Reference< xml::sax::XFastAttributeList > & )
244 return new SwXMLTextBlockParContext(m_rLocalRef);
250 , m_rLocalRef(rImport)
254uno::Reference < xml::sax::XFastContextHandler > SAL_CALL
255SwXMLTextBlockBodyContext::createFastChildContext( sal_Int32 Element,
256 const uno::Reference< xml::sax::XFastAttributeList > & )
259 return new SwXMLTextBlockTextContext(m_rLocalRef);
261 return new SwXMLTextBlockParContext(m_rLocalRef);
267 , m_rLocalRef(rImport)
271void SAL_CALL SwXMLTextBlockParContext::characters(
const OUString & aChars )
273 m_rLocalRef.m_rText += aChars;
276SwXMLTextBlockParContext::~SwXMLTextBlockParContext()
278 if (m_rLocalRef.m_bTextOnly)
279 m_rLocalRef.m_rText +=
"\015";
282 if (!m_rLocalRef.m_rText.endsWith(
" "))
283 m_rLocalRef.m_rText +=
" ";
289 const uno::Reference< uno::XComponentContext >& rContext,
292 m_rBlockList (rBlocks)
302 const uno::Reference< xml::sax::XFastAttributeList > & xAttrList )
305 return new SwXMLBlockListContext( *
this, xAttrList );
310 const uno::Reference< uno::XComponentContext >& rContext,
314 m_bTextOnly ( bNewTextOnly ),
325 const uno::Reference< xml::sax::XFastAttributeList > & )
329 return new SwXMLTextBlockDocumentContext( *
this );
@ OFFICE_DOCUMENT_CONTENT
OUString uppercase(const OUString &rStr, sal_Int32 nPos, sal_Int32 nCount) const
void SetName(const OUString &rName)
Return physical file name.
virtual ~SwXMLBlockListImport() noexcept override
virtual SvXMLImportContext * CreateFastContext(sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
SwXMLBlockListImport(const css::uno::Reference< css::uno::XComponentContext > &rContext, SwXMLTextBlocks &rBlocks)
SwXMLTextBlocks & getBlockList()
sal_Int32 SAL_CALL getTokenFromUTF8(const css::uno::Sequence< sal_Int8 > &Identifier) override
virtual sal_Int32 getTokenDirect(const char *pTag, sal_Int32 nLength) const override
virtual ~SwXMLBlockListTokenHandler() override
css::uno::Sequence< sal_Int8 > SAL_CALL getUTF8Identifier(sal_Int32 Token) override
SwXMLBlockListTokenHandler()
virtual SvXMLImportContext * CreateFastContext(sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
virtual void SAL_CALL endDocument() override
SwXMLTextBlockImport(const css::uno::Reference< css::uno::XComponentContext > &rContext, OUString &rNewText, bool bNewTextOnly)
virtual ~SwXMLTextBlockImport() noexcept override
sal_Int32 SAL_CALL getTokenFromUTF8(const css::uno::Sequence< sal_Int8 > &Identifier) override
css::uno::Sequence< sal_Int8 > SAL_CALL getUTF8Identifier(sal_Int32 Token) override
virtual sal_Int32 getTokenDirect(const char *pTag, sal_Int32 nLength) const override
virtual ~SwXMLTextBlockTokenHandler() override
SwXMLTextBlockTokenHandler()
void AddName(const OUString &, const OUString &, const OUString &, bool bOnlyText)
CharClass & GetAppCharClass()
bool IsXMLToken(std::u16string_view rString, enum XMLTokenEnum eToken)