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 ) );
216 sal_uInt64* pValues )
223 sal_uInt64* pValues )
226 OUString* pNames = aNames.getArray();
229 for(
n = 0;
n < nCnt; ++
n )
230 pNames[
n ] = OUString::createFromAscii( ppNames[
n ] );
233 if( nCnt == aValues.getLength() )
235 const Any* pAnyValues = aValues.getConstArray();
236 for(
n = 0;
n < nCnt; ++
n )
237 pValues[
n ] = pAnyValues[
n ].hasValue()
238 ? *o3tl::doAccess<sal_uInt64>(pAnyValues[
n ])
243 for(
n = 0;
n < nCnt; ++
n )
265 aSz.reset(pFrameSizeItem->
Clone());
279 bool bOnlyOneNode =
true;
291 pFirstTextNd = pTextNd;
292 else if( pFirstTextNd != pTextNd )
295 bOnlyOneNode =
false;
307 if( nMinFrame <
MINLAY && pFirstTextNd )
315 nMinFrame, nMaxFrame, nAbsMinCnts );
323 for(
int i = 0;
i < 2; ++
i )
330 nMinFrame += nWidthTmp;
331 nMaxFrame += nWidthTmp;
333 nLine = SvxBoxItemLine::RIGHT;
342 if( nWidth > o3tl::narrowing<sal_uInt16>(nMaxFrame) )
344 else if( nWidth > o3tl::narrowing<sal_uInt16>(nMinFrame) )
352 aSz->SetWidth( nWidth );
353 if(
MINFLY > aSz->GetHeight() )
355 rFlySet.
Put( std::move(aSz) );
359 std::unique_ptr<SwFormatFrameSize> aSz(pFrameSizeItem->
Clone());
361 rFlySet.
Put( std::move(aSz) );
370 rtl_TextEncoding eCode;
374const CharSetNameMap *GetCharSetNameMap()
376 static const CharSetNameMap aMapArr[] =
378# define IMPLENTRY(X) { RTL_TEXTENCODING_##X, #X }
479rtl_TextEncoding CharSetFromName(std::u16string_view rChrSetStr)
481 const CharSetNameMap *pStart = GetCharSetNameMap();
482 rtl_TextEncoding nRet = pStart->eCode;
484 for(
const CharSetNameMap *pMap = pStart; pMap->pName; ++pMap)
493 OSL_ENSURE(nRet != pStart->eCode,
"TXT: That was an unknown language!");
501OUString NameFromCharSet(rtl_TextEncoding nChrSet)
503 const CharSetNameMap *pStart = GetCharSetNameMap();
504 const char *pRet = pStart->pName;
506 for(
const CharSetNameMap *pMap = pStart; pMap->pName; ++pMap)
508 if (nChrSet == pMap->eCode)
515 OSL_ENSURE(pRet != pStart->pName,
"TXT: That was an unknown language!");
517 return OUString::createFromAscii(pRet);
612#ifdef DISABLE_DYNLOADING
628#ifndef DISABLE_DYNLOADING
633 return (*pFunction)();
644#ifndef DISABLE_DYNLOADING
648 (*pFunction)( rFltName, rBaseURL, xRet );
658#ifndef DISABLE_DYNLOADING
662 return (*pFunction)();
672#ifndef DISABLE_DYNLOADING
676 (*pFunction)( rFltName, rBaseURL, xRet );
686#ifndef DISABLE_DYNLOADING
690 return (*pFunction)();
703#ifndef DISABLE_DYNLOADING
706 return ErrCode(pFunction( rDoc, rStor, bSaveInto, rStorageName ));
715#ifndef DISABLE_DYNLOADING
718 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()