LibreOffice Module sw (master)  1
Static Public Member Functions | List of all members
SwIoSystem Class Reference

The following class is a wrapper for basic i/o functions of Writer 3.0. More...

#include <iodetect.hxx>

Static Public Member Functions

static SW_DLLPUBLIC std::shared_ptr< const SfxFilterGetFilterOfFormat (std::u16string_view rFormat, const SfxFilterContainer *pCnt=nullptr)
 find for an internal format name the corresponding filter entry More...
static std::shared_ptr< const SfxFilterGetFileFilter (const OUString &rFileName)
 Detect for the given file which filter should be used. More...
static bool IsValidStgFilter (SotStorage &, const SfxFilter &)
static bool IsValidStgFilter (const css::uno::Reference< css::embed::XStorage > &rStg, const SfxFilter &rFilter)
static SW_DLLPUBLIC rtl_TextEncoding GetTextEncoding (SvStream &)
static bool IsDetectableText (const char *pBuf, sal_uLong &rLen, rtl_TextEncoding *pCharSet, bool *pSwap, LineEnd *pLineEnd, bool *pBom)
static OUString GetSubStorageName (const SfxFilter &rFltr)

Detailed Description

The following class is a wrapper for basic i/o functions of Writer 3.0.

Everything is static. All filter names mentioned are Writer-internal names, i.e. the names in front of the equality sign in INSTALL.INI, like SWG or ASCII.

Definition at line 92 of file iodetect.hxx.

Member Function Documentation

std::shared_ptr< const SfxFilter > SwIoSystem::GetFileFilter ( const OUString &  rFileName)
std::shared_ptr< const SfxFilter > SwIoSystem::GetFilterOfFormat ( std::u16string_view  rFormat,
const SfxFilterContainer pCnt = nullptr 

find for an internal format name the corresponding filter entry

Definition at line 68 of file iodetect.cxx.

References SfxFilterContainer::GetName(), IsDocShellRegistered(), sSWRITER, and sSWRITERWEB.

Referenced by SwXMailMerge::execute(), SwDocShell::Execute(), GetFileFilter(), IMPL_LINK_NOARG(), and SwDoc::SplitDoc().

OUString SwIoSystem::GetSubStorageName ( const SfxFilter rFltr)

Definition at line 55 of file iodetect.cxx.

References FILTER_WW8, FILTER_XML, FILTER_XMLV, FILTER_XMLVW, SfxFilter::GetUserData(), and sWW6.

Referenced by IsValidStgFilter().

rtl_TextEncoding SwIoSystem::GetTextEncoding ( SvStream rStrm)

Definition at line 241 of file iodetect.cxx.

References aBuf, IsDetectableText(), SvStream::ReadBytes(), and SvStream::SeekRel().

Referenced by SwEditShell::ApplyAutoMark().

bool SwIoSystem::IsDetectableText ( const char *  pBuf,
sal_uLong rLen,
rtl_TextEncoding *  pCharSet,
bool *  pSwap,
LineEnd pLineEnd,
bool *  pBom 

Definition at line 257 of file iodetect.cxx.

References GetSystemLineEnd(), LINEEND_CR, LINEEND_CRLF, LINEEND_LF, match(), and n.

Referenced by GetTextEncoding().

bool SwIoSystem::IsValidStgFilter ( SotStorage rStg,
const SfxFilter rFilter 
bool SwIoSystem::IsValidStgFilter ( const css::uno::Reference< css::embed::XStorage > &  rStg,
const SfxFilter rFilter 

Definition at line 95 of file iodetect.cxx.

References SfxFilter::GetFormat(), and SotStorage::GetFormatID().

The documentation for this class was generated from the following files: