27#include <com/sun/star/lang/XMultiServiceFactory.hpp>
28#include <com/sun/star/report/XFormattedField.hpp>
29#include <com/sun/star/report/XFixedText.hpp>
30#include <com/sun/star/text/ControlCharacter.hpp>
33#include <osl/diagnose.h>
48 OXMLFixedContent* _pFixedContent,
49 const uno::Reference< xml::sax::XFastAttributeList > & xAttrList,
54 OXMLFixedContent* _pFixedContent,
56 OXMLCharContent(
const OXMLCharContent&) =
delete;
57 OXMLCharContent& operator=(
const OXMLCharContent&) =
delete;
59 virtual void InsertControlCharacter(sal_Int16 _nControl)
override;
60 virtual void InsertString(
const OUString& _sString)
override;
65OXMLCharContent::OXMLCharContent(
67 OXMLFixedContent* _pFixedContent,
68 const uno::Reference< xml::sax::XFastAttributeList > & xAttrList,
76OXMLCharContent::OXMLCharContent(
78 OXMLFixedContent* _pFixedContent,
85void OXMLCharContent::InsertControlCharacter(sal_Int16 _nControl)
89 case ControlCharacter::LINE_BREAK:
93 OSL_FAIL(
"Not supported control character");
98void OXMLCharContent::InsertString(
const OUString& _sString)
111,m_bFormattedField(false)
124 const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList )
130 static constexpr char16_t s_sStringConcat[] =
u" & ";
139 xContext =
new OXMLCharContent(
m_rImport,
this, xAttrList,
144 xContext =
new OXMLCharContent(
m_rImport,
this,
145 ControlCharacter::LINE_BREAK );
149 xContext =
new OXMLCharContent(
m_rImport,
this, xAttrList,
153 m_sPageText += OUString::Concat(s_sStringConcat) +
" PageNumber()";
157 m_sPageText += OUString::Concat(s_sStringConcat) +
" PageCount()";
171 const Reference<XMultiServiceFactory> xFactor(
m_rImport.GetModel(),uno::UNO_QUERY);
175 Reference< report::XFormattedField > xControl(xInt,uno::UNO_QUERY);
177 OSL_ENSURE(xControl.is(),
"Could not create FormattedField!");
183 Reference< XFixedText > xControl(xFactor->createInstance(
SERVICE_FIXEDTEXT),uno::UNO_QUERY);
184 OSL_ENSURE(xControl.is(),
"Could not create FixedContent!");
199 if ( !rChars.isEmpty() )
201 static const char s_Quote[] =
"\"";
void setComponent(const css::uno::Reference< css::report::XReportComponent > &_xComponent)
OXMLFixedContent * m_pInP
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
virtual void SAL_CALL characters(const OUString &rChars) override
virtual ~OXMLFixedContent() override
OXMLFixedContent(const OXMLFixedContent &)=delete
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 void SAL_CALL endFastElement(sal_Int32 nElement) override
css::uno::Reference< css::report::XReportComponent > m_xReportComponent
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
void addCell(const css::uno::Reference< css::report::XReportComponent > &_xElement)
constexpr OUStringLiteral SERVICE_FIXEDTEXT
constexpr OUStringLiteral SERVICE_FORMATTEDFIELD
#define PROGRESS_BAR_STEP
OXMLFixedContent * m_pFixedContent
#define XML_ELEMENT(prefix, name)