24#include <com/sun/star/ucb/XAnyCompareFactory.hpp>
25#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
26#include <com/sun/star/lang/Locale.hpp>
27#include <com/sun/star/lang/XMultiServiceFactory.hpp>
28#include <com/sun/star/xml/sax/Writer.hpp>
29#include <com/sun/star/frame/XModel.hpp>
31#include <com/sun/star/uno/Sequence.hxx>
47#include <unomodel.hxx>
75: mpEditEngine( pEditEngine )
113 return mxImpl->GetTextForwarder();
129 if( aServiceSpecifier ==
"com.sun.star.text.NumberingRules" )
131 return uno::Reference< uno::XInterface >(
134 if ( aServiceSpecifier ==
"com.sun.star.text.textfield.DateTime"
135 || aServiceSpecifier ==
"com.sun.star.text.TextField.DateTime"
138 return cppu::getXWeak(
new SvxUnoTextField( text::textfield::Type::DATE ));
141 if( aServiceSpecifier ==
"com.sun.star.text.TextField.URL" )
143 return cppu::getXWeak(
new SvxUnoTextField(text::textfield::Type::URL));
170 uno::Reference< container::XNameAccess > xStyles;
214 uno::Reference< frame::XController > xRet;
224 uno::Reference< XInterface > xRet;
244class SvxXMLTextExportComponent :
public SvXMLExport
247 SvxXMLTextExportComponent(
248 const css::uno::Reference< css::uno::XComponentContext >& rContext,
251 const css::uno::Reference< css::xml::sax::XDocumentHandler >& rHandler );
259 css::uno::Reference< css::text::XText >
mxText;
264SvxXMLTextExportComponent::SvxXMLTextExportComponent(
265 const css::uno::Reference< css::uno::XComponentContext >& xContext,
268 const css::uno::Reference< css::xml::sax::XDocumentHandler > & xHandler)
286 pUnoText->SetSelection( rSel );
298 uno::Reference<uno::XComponentContext> xContext( ::comphelper::getProcessComponentContext() );
301 uno::Reference< xml::sax::XWriter > xWriter = xml::sax::Writer::create( xContext );
313 xWriter->setOutputStream( xOut );
318 uno::Reference< xml::sax::XDocumentHandler > xHandler(xWriter, UNO_QUERY_THROW);
321 xExporter->exportDoc();
330 catch(
const uno::Exception& )
337void SvxXMLTextExportComponent::ExportAutoStyles_()
341 xTextExport->collectTextAutoStyles( mxText );
342 xTextExport->exportTextAutoStyles();
345void SvxXMLTextExportComponent::ExportContent_()
349 xTextExport->exportText( mxText );
352void SvxXMLTextExportComponent::ExportMasterStyles_() {}
static SfxItemPool & GetGlobalItemPool()
virtual void ExportContent_()=0
virtual void ExportAutoStyles_()=0
virtual void ExportMasterStyles_()=0
SvxEditEngineSourceImpl(EditEngine *pEditEngine)
SvxTextForwarder * GetTextForwarder()
virtual ~SvxEditEngineSourceImpl() override
EditEngine * mpEditEngine
std::unique_ptr< SvxTextForwarder > mpTextForwarder
virtual std::unique_ptr< SvxEditSource > Clone() const override
Returns a new reference to the same object. This is a shallow copy.
virtual void UpdateData() override
Write back data to model.
virtual SvxTextForwarder * GetTextForwarder() override
Query the text forwarder.
rtl::Reference< SvxEditEngineSourceImpl > mxImpl
SvxEditEngineSource(EditEngine *pEditEngine)
virtual ~SvxEditEngineSource() override
virtual void SAL_CALL setCurrentController(const css::uno::Reference< css::frame::XController > &xController) override
virtual css::uno::Reference< css::frame::XController > SAL_CALL getCurrentController() override
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getStyleFamilies() override
virtual void SAL_CALL unlockControllers() override
virtual void SAL_CALL connectController(const css::uno::Reference< css::frame::XController > &xController) override
virtual void SAL_CALL dispose() override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance(const OUString &aServiceSpecifier) override
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getArgs() override
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames() override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getCurrentSelection() override
virtual sal_Bool SAL_CALL attachResource(const OUString &aURL, const css::uno::Sequence< css::beans::PropertyValue > &aArgs) override
virtual sal_Bool SAL_CALL hasControllersLocked() override
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
virtual void SAL_CALL disconnectController(const css::uno::Reference< css::frame::XController > &xController) override
virtual css::uno::Reference< css::ucb::XAnyCompare > SAL_CALL createAnyCompareByName(const OUString &PropertyName) override
virtual void SAL_CALL lockControllers() override
virtual OUString SAL_CALL getURL() override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments(const OUString &ServiceSpecifier, const css::uno::Sequence< css::uno::Any > &Arguments) override
Contains an EditEngine or an Outliner and unifies access to them.
css::uno::Type const & get()
#define TOOLS_WARN_EXCEPTION(area, stream)
constexpr TypedWhichId< SfxBoolItem > EE_PARA_BULLETSTATE(EE_PARA_START+9)
constexpr TypedWhichId< SfxInt16Item > EE_PARA_OUTLLEVEL(EE_PARA_START+11)
constexpr TypedWhichId< SvxNumBulletItem > EE_PARA_NUMBULLET(EE_PARA_START+5)
Sequence< sal_Int8 > aSeq
Reference< text::XText > mxText
uno::Reference< uno::XInterface > SvxUnoTextCreateTextField(std::u16string_view ServiceSpecifier)
css::uno::Reference< css::container::XIndexReplace > SvxCreateNumRule(const SvxNumRule &rRule)
Reference< XAnyCompare > SvxCreateNumRuleCompare() noexcept
constexpr OUStringLiteral UNO_NAME_NUMBERING
constexpr OUStringLiteral UNO_NAME_NUMBERING_LEVEL
constexpr OUStringLiteral UNO_NAME_NUMBERING_RULES
#define SVX_UNOEDIT_CHAR_PROPERTIES
#define SVX_UNOEDIT_PARA_PROPERTIES
#define SVX_UNOEDIT_FONT_PROPERTIES
void SvxWriteXML(EditEngine &rEditEngine, SvStream &rStream, const ESelection &rSel)
this function exports the selected content of an edit engine into a xml stream