37#include <osl/module.hxx>
38#include <rtl/bootstrap.hxx>
40#include <osl/diagnose.h>
84 (*fnGetWriter)( rNm, rBaseURL, xWrt );
118 if( rEntry.bDelReader && rEntry.pReader )
120 delete rEntry.pReader;
121 rEntry.pReader =
nullptr;
127#ifndef DISABLE_DYNLOADING
133 OUString url(
"$LO_LIB_DIR/" SVLIBRARY(
"msword"));
134 rtl::Bootstrap::expandMacros(url);
135 bool ok =
msword_.load( url, SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY );
136 SAL_WARN_IF(!ok,
"sw",
"failed to load msword library");
139 return msword_.getFunctionSymbol( OUString::createFromAscii( pSymbol ) );
230 sal_uInt64* pValues )
237 sal_uInt64* pValues )
240 OUString* pNames = aNames.getArray();
243 for(
n = 0;
n < nCnt; ++
n )
244 pNames[
n ] = OUString::createFromAscii( ppNames[
n ] );
247 if( nCnt == aValues.getLength() )
249 const Any* pAnyValues = aValues.getConstArray();
250 for(
n = 0;
n < nCnt; ++
n )
251 pValues[
n ] = pAnyValues[
n ].hasValue()
252 ? *o3tl::doAccess<sal_uInt64>(pAnyValues[
n ])
257 for(
n = 0;
n < nCnt; ++
n )
279 aSz.reset(pFrameSizeItem->
Clone());
293 bool bOnlyOneNode =
true;
305 pFirstTextNd = pTextNd;
306 else if( pFirstTextNd != pTextNd )
309 bOnlyOneNode =
false;
321 if( nMinFrame <
MINLAY && pFirstTextNd )
329 nMinFrame, nMaxFrame, nAbsMinCnts );
337 for(
int i = 0;
i < 2; ++
i )
344 nMinFrame += nWidthTmp;
345 nMaxFrame += nWidthTmp;
347 nLine = SvxBoxItemLine::RIGHT;
356 if( nWidth > o3tl::narrowing<sal_uInt16>(nMaxFrame) )
358 else if( nWidth > o3tl::narrowing<sal_uInt16>(nMinFrame) )
366 aSz->SetWidth( nWidth );
367 if(
MINFLY > aSz->GetHeight() )
369 rFlySet.
Put( std::move(aSz) );
373 std::unique_ptr<SwFormatFrameSize> aSz(pFrameSizeItem->
Clone());
375 rFlySet.
Put( std::move(aSz) );
384 rtl_TextEncoding eCode;
388const CharSetNameMap *GetCharSetNameMap()
390 static const CharSetNameMap aMapArr[] =
392# define IMPLENTRY(X) { RTL_TEXTENCODING_##X, #X }
493rtl_TextEncoding CharSetFromName(
const OUString& rChrSetStr)
495 const CharSetNameMap *pStart = GetCharSetNameMap();
496 rtl_TextEncoding nRet = pStart->eCode;
498 for(
const CharSetNameMap *pMap = pStart; pMap->pName; ++pMap)
500 if(rChrSetStr.equalsIgnoreAsciiCaseAscii(pMap->pName))
507 OSL_ENSURE(nRet != pStart->eCode,
"TXT: That was an unknown language!");
515OUString NameFromCharSet(rtl_TextEncoding nChrSet)
517 const CharSetNameMap *pStart = GetCharSetNameMap();
518 const char *pRet = pStart->pName;
520 for(
const CharSetNameMap *pMap = pStart; pMap->pName; ++pMap)
522 if (nChrSet == pMap->eCode)
529 OSL_ENSURE(pRet != pStart->pName,
"TXT: That was an unknown language!");
531 return OUString::createFromAscii(pRet);
552 m_eCharSet = CharSetFromName(OUString(sToken));
626#ifdef DISABLE_DYNLOADING
642#ifndef DISABLE_DYNLOADING
647 return (*pFunction)();
658#ifndef DISABLE_DYNLOADING
662 (*pFunction)( rFltName, rBaseURL, xRet );
672#ifndef DISABLE_DYNLOADING
676 return (*pFunction)();
686#ifndef DISABLE_DYNLOADING
690 (*pFunction)( rFltName, rBaseURL, xRet );
700#ifndef DISABLE_DYNLOADING
704 return (*pFunction)();
717#ifndef DISABLE_DYNLOADING
720 return ErrCode(pFunction( rDoc, rStor, bSaveInto, rStorageName ));
729#ifndef DISABLE_DYNLOADING
732 return ErrCode(pFunction( rDocS ));
const PropertyValue * pValues
static OUString convertToBcp47(LanguageType nLangID)
static LanguageType convertToLanguageTypeWithFallback(const OUString &rBcp47)
virtual void SetFltName(const OUString &rFltNm)
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const=0
virtual SwReaderType GetReaderType() override
virtual void SetFltName(const OUString &r) override
virtual bool IsStgWriter() const override
const editeng::SvxBorderLine * GetLine(SvxBoxItemLine nLine) const
sal_Int16 GetDistance(SvxBoxItemLine nLine, bool bAllowNegative=false) const
tools::Long GetHeight() const
tools::Long GetWidth() const
void WriteUserData(OUString &) const
rtl_TextEncoding m_eCharSet
void ReadUserData(std::u16string_view)
Marks a character position inside a document model content node (SwContentNode)
virtual void Notify(const css::uno::Sequence< OUString > &aPropertyNames) override
virtual void ImplCommit() override
void GetValues(sal_uInt16 nCnt, const char **ppNames, sal_uInt64 *pValues)
SwFilterOptions(sal_uInt16 nCnt, const char **ppNames, sal_uInt64 *pValues)
Marks a node in the document model.
SwNodeOffset GetIndex() const
Base class of the Writer document model elements.
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
SwNodeOffset GetIndex() const
SwTableNode * FindTableNode()
Search table node, in which it is.
const SwEndNode * EndOfSectionNode() const
const SwTable & GetTable() const
SwTableFormat * GetFrameFormat()
SwTextNode is a paragraph in the document model.
void EraseText(const SwContentIndex &rIdx, const sal_Int32 nCount=SAL_MAX_INT32, const SwInsertFlags nMode=SwInsertFlags::DEFAULT)
delete text content ATTENTION: must not be called with a range that overlaps the start of an attribut...
OUString InsertText(const OUString &rStr, const SwContentIndex &rIdx, const SwInsertFlags nMode=SwInsertFlags::DEFAULT)
insert text content
void GetMinMaxSize(SwNodeOffset nIndex, sal_uLong &rMin, sal_uLong &rMax, sal_uLong &rAbs) const
Is in itratr.
virtual bool IsStgWriter() const
sal_uInt16 GetOutWidth() const
sal_uInt16 GetInWidth() const
oslGenericFunction GetMswordLibSymbol(const char *pSymbol)
static css::uno::Sequence< css::uno::Any > GetProperties(css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const css::uno::Sequence< OUString > &rNames, bool bAllLocales)
static Reader * GetDOCXReader()
sal_uInt32(* GetSaveWarning)(SfxObjectShell &)
sal_uInt32(* SaveOrDel)(SfxObjectShell &, SotStorage &, sal_Bool, const OUString &)
static Reader * GetWW8Reader()
void CalculateFlySize(SfxItemSet &rFlySet, const SwNode &rAnchor, SwTwips nPageWidth)
ErrCode SaveOrDelMSVBAStorage(SfxObjectShell &rDoc, SotStorage &rStor, bool bSaveInto, const OUString &rStorageName)
void GetRTFWriter(std::u16string_view rFltName, const OUString &rBaseURL, WriterRef &xRet)
ErrCode GetSaveWarningOfMSVBAStorage(SfxObjectShell &rDocS)
void GetWW8Writer(std::u16string_view rFltName, const OUString &rBaseURL, WriterRef &xRet)
Reader * SwGetReaderXML()
static Reader * GetRTFReader()
static SwReaderWriterEntry aReaderWriter[]
static void SetFltPtr(sal_uInt16 rPos, Reader *pReader)
constexpr TypedWhichId< SwFormatFrameSize > RES_FRM_SIZE(89)
constexpr TypedWhichId< SvxBoxItem > RES_BOX(112)
constexpr TypedWhichId< SwFormatContent > RES_CNTNT(101)
SwIoDetect aFilterDetect[]
#define SAL_WARN_IF(condition, area, stream)
sw::Filters & getFilters()
void GetWriter(std::u16string_view rFltName, const OUString &rBaseURL, WriterRef &xRet)
Return writer based on the name.
Reader * GetReader(const OUString &rFltName)
Return reader based on the name.
bool equalsIgnoreAsciiCase(std::u16string_view s1, std::u16string_view s2)
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
Dialog to specify the properties of date form field.
SAL_DLLPUBLIC_EXPORT void ExportRTF(std::u16string_view rFltName, const OUString &rBaseURL, WriterRef &xRet)
Reader *(* FnGetReader)()
tools::SvRef< Writer > WriterRef
void(* FnGetWriter)(std::u16string_view, const OUString &rBaseURL, WriterRef &)
Reader * GetReader()
Get access to the reader.
void GetWriter(std::u16string_view rNm, const OUString &rBaseURL, WriterRef &xWrt) const
Get access to the writer.
SAL_DLLPUBLIC_EXPORT Reader * ImportDOCX()
SAL_DLLPUBLIC_EXPORT Reader * ImportRTF()
void GetASCWriter(std::u16string_view rFltNm, const OUString &, WriterRef &xRet)
void GetHTMLWriter(std::u16string_view rFilterOptions, const OUString &rBaseURL, WriterRef &xRet)
SAL_DLLPUBLIC_EXPORT sal_uInt32 SaveOrDelMSVBAStorage_ww8(SfxObjectShell &rDoc, SotStorage &rStor, sal_Bool bSaveInto, const OUString &rStorageName)
SAL_DLLPUBLIC_EXPORT sal_uInt32 GetSaveWarningOfMSVBAStorage_ww8(SfxObjectShell &rDocS)
SAL_DLLPUBLIC_EXPORT void ExportDOC(std::u16string_view rFltName, const OUString &rBaseURL, WriterRef &xRet)
void GetXMLWriter(std::u16string_view, const OUString &rBaseURL, WriterRef &xRet)
SAL_DLLPUBLIC_EXPORT Reader * ImportDOC()