22#include <com/sun/star/document/XFilter.hpp>
23#include <com/sun/star/document/XImporter.hpp>
24#include <com/sun/star/frame/XModel.hpp>
25#include <com/sun/star/lang/XMultiServiceFactory.hpp>
59 uno::Reference<uno::XInterface> xInterface(xMultiServiceFactory->createInstance(
"com.sun.star.comp.Writer.WriterFilter"), uno::UNO_SET_THROW);
62 uno::Reference<lang::XComponent> xDstDoc(pDocShell->
GetModel(), uno::UNO_QUERY_THROW);
63 uno::Reference<document::XImporter> xImporter(xInterface, uno::UNO_QUERY_THROW);
64 xImporter->setTargetDocument(xDstDoc);
79 {
"TextInsertModeRange",
uno::Any(uno::Reference<text::XTextRange>(xInsertTextRange)) }
83 uno::Reference<document::XFilter> xFilter(xInterface, uno::UNO_QUERY_THROW);
86 xFilter->filter(aDescriptor);
88 catch (uno::Exception
const&)
111 uno::Reference<lang::XMultiServiceFactory> xMultiServiceFactory(
114 uno::Reference<uno::XInterface> xInterface(
115 xMultiServiceFactory->createInstance(
"com.sun.star.comp.Writer.WriterFilter" ),
116 uno::UNO_SET_THROW );
118 uno::Reference<document::XFilter> xFilter( xInterface, uno::UNO_QUERY_THROW );
119 uno::Reference<document::XImporter> xImporter( xFilter, uno::UNO_QUERY_THROW );
124 uno::Reference<lang::XComponent> xDstDoc( xDocSh->
GetModel(), uno::UNO_QUERY_THROW );
125 xImporter->setTargetDocument( xDstDoc );
131 {
"ReadGlossaries",
uno::Any(
true) }
134 if( xFilter->filter( aDescriptor ) )
150 const OUString aOldURL( rBlocks.
GetBaseURL() );
157 bool bIsAutoText =
false;
169 SwPaM aPam( aStart );
182 SwPaM aPam( aStart );
186 if(
nullptr == pCNd )
201 if(
nullptr == pCNd )
214 OUString sShortcut = aLNm;
217 sal_Int32 nStart = 0;
218 sal_uInt16 nCurPos = rBlocks.
GetIndex( sShortcut );
220 while( sal_uInt16(-1) != nCurPos )
223 sShortcut = aLNm + OUString::number( ++nStart );
224 nCurPos = rBlocks.
GetIndex( sShortcut );
@ CheckPosInFly
check if target position is in fly anchored at source range
virtual bool SplitNode(const SwPosition &rPos, bool bChkTableStart)=0
Split a node at rPos (implemented only for TextNode).
virtual bool CopyRange(SwPaM &rPam, SwPosition &rPos, SwCopyFlags flags) const =0
Copy a selected content range to a position.
virtual SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return "Auto-Collection with ID.
css::uno::Reference< css::frame::XModel3 > GetModel() const
void SetLoading(SfxLoadedFlags nFlags)
virtual sal_Int32 Len() const
Wrapper for the UNO DOCX import filter (in writerfilter) for autotext purposes.
virtual bool HasGlossaries() const override
static bool MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks)
virtual SwReaderType GetReaderType() override
virtual bool ReadGlossaries(SwTextBlocks &rBlocks, bool bSaveRelFiles) const override
virtual ErrCode Read(SwDoc &, const OUString &, SwPaM &, const OUString &) override
IDocumentContentOperations const & getIDocumentContentOperations() const
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
bool SetTextFormatColl(const SwPaM &rRg, SwTextFormatColl *pFormat, const bool bReset=true, const bool bResetListAttrs=false, SwRootFrame const *pLayout=nullptr)
Add 4th optional parameter <bResetListAttrs>.
SwDocShell * GetDocShell()
Marks a node in the document model.
SwNodeOffset GetIndex() const
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
const SwStartNode * StartOfSectionNode() const
SwNodeOffset EndOfSectionIndex() const
SwContentNode * GetContentNode()
const SwEndNode * EndOfSectionNode() const
SwTextNode * MakeTextNode(SwNode &rWhere, SwTextFormatColl *pColl, bool bNewFrames=true)
Implementations of "Make...Node" are in the given .cxx-files.
SwNode & GetEndOfContent() const
Regular ContentSection (i.e. the BodyText).
PaM is Point and Mark: a selection of the document model.
SwNode & GetPointNode() const
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
const SwPosition * GetPoint() const
bool BeginPutDoc(const OUString &, const OUString &)
void EndPutMuchBlockEntries()
OUString GetBaseURL() const
bool StartPutMuchBlockEntries()
sal_uInt16 GetIndex(const OUString &) const
void SetBaseURL(const OUString &rURL)
Represents the style of a paragraph.
const OUString & GetText() const
#define TOOLS_WARN_EXCEPTION(area, stream)
Reference< XMultiServiceFactory > getProcessServiceFactory()
css::uno::Sequence< css::beans::PropertyValue > InitPropertySequence(::std::initializer_list< ::std::pair< OUString, css::uno::Any > > vInit)
o3tl::strong_int< sal_Int32, struct Tag_SwNodeOffset > SwNodeOffset
@ RES_POOLCOLL_STANDARD
Standard.
Marks a position in the document model.
void Adjust(SwNodeOffset nDelta)
Adjust node position, and resets content position to zero.
void Assign(const SwNode &rNd, SwNodeOffset nDelta, sal_Int32 nContentOffset=0)
These all set both nNode and nContent.
SAL_DLLPUBLIC_EXPORT Reader * ImportDOCX()
constexpr OUStringLiteral AUTOTEXT_GALLERY
#define ERR_SWG_READ_ERROR