LibreOffice Module sc (master)  1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
ScImportExport Class Reference

#include <impex.hxx>

Collaboration diagram for ScImportExport:
[legend]

Public Member Functions

 ScImportExport (ScDocument &)
 
 ScImportExport (ScDocument &, const OUString &)
 
 ScImportExport (ScDocument &, const ScAddress &)
 
 ScImportExport (ScDocument &, const ScRange &)
 ctor with a string (and bSingle=true) is also used for DdeSetData More...
 
 ~ScImportExport () COVERITY_NOEXCEPT_FALSE
 
void SetExtOptions (const ScAsciiOptions &rOpt)
 
void SetFilterOptions (const OUString &rFilterOptions)
 
bool IsRef () const
 
const ScRangeGetRange () const
 
void SetSeparator (sal_Unicode c)
 
void SetDelimiter (sal_Unicode c)
 
void SetFormulas (bool b)
 
void SetIncludeFiltered (bool b)
 
void SetStreamPath (const OUString &rPath)
 
bool ImportString (const OUString &, SotClipboardFormatId)
 
bool ExportString (OUString &, SotClipboardFormatId)
 
bool ExportByteString (OString &, rtl_TextEncoding, SotClipboardFormatId)
 
bool ImportStream (SvStream &, const OUString &rBaseURL, SotClipboardFormatId)
 
bool ExportStream (SvStream &, const OUString &rBaseURL, SotClipboardFormatId)
 
bool ExportData (const OUString &rMimeType, css::uno::Any &rValue)
 
bool IsOverflowRow () const
 
bool IsOverflowCol () const
 
bool IsOverflowCell () const
 
bool IsOverflow () const
 
const OUString & GetNonConvertibleChars () const
 
void SetApi (bool bApi)
 
void SetImportBroadcast (bool b)
 
void SetOverwriting (const bool bOverwriting)
 
void SetExportTextOptions (const ScExportTextOptions &options)
 

Static Public Member Functions

static void EmbeddedNullTreatment (OUString &rStr)
 
static bool IsFormatSupported (SotClipboardFormatId nFormat)
 
static const sal_UnicodeScanNextFieldFromString (const sal_Unicode *p, OUString &rField, sal_Unicode cStr, const sal_Unicode *pSeps, bool bMergeSeps, bool &rbIsQuoted, bool &rbOverflowCell, bool bRemoveSpace)
 
static void WriteUnicodeOrByteString (SvStream &rStrm, const OUString &rString, bool bZero=false)
 
static void WriteUnicodeOrByteEndl (SvStream &rStrm)
 
static void SetNoEndianSwap (SvStream &rStrm)
 only if stream is only used in own (!) memory More...
 

Private Member Functions

bool StartPaste ()
 
void EndPaste (bool bAutoRowHeight=true)
 
bool Doc2Text (SvStream &)
 
bool Text2Doc (SvStream &)
 
bool Doc2Sylk (SvStream &)
 
bool Sylk2Doc (SvStream &)
 
bool Doc2HTML (SvStream &, const OUString &)
 
bool Doc2RTF (SvStream &)
 
bool Doc2Dif (SvStream &)
 
bool Dif2Doc (SvStream &)
 
bool ExtText2Doc (SvStream &)
 
bool RTF2Doc (SvStream &, const OUString &rBaseURL)
 
bool HTML2Doc (SvStream &, const OUString &rBaseURL)
 

Private Attributes

ScDocShellpDocSh
 
ScDocumentrDoc
 
std::unique_ptr< ScDocument, o3tl::default_delete< ScDocument > > pUndoDoc
 
ScRange aRange
 
OUString aStreamPath
 
OUString aNonConvertibleChars
 
OUString maFilterOptions
 
sal_uInt32 nSizeLimit
 
SCROW nMaxImportRow
 
sal_Unicode cSep
 
sal_Unicode cStr
 
bool bFormulas
 
bool bIncludeFiltered
 
bool bAll
 
bool bSingle
 
bool bUndo
 
bool bOverflowRow
 
bool bOverflowCol
 
bool bOverflowCell
 
bool mbApi
 
bool mbImportBroadcast
 
bool mbOverwriting
 
ScExportTextOptions mExportTextOptions
 
std::unique_ptr< ScAsciiOptionspExtOptions
 

Detailed Description

Definition at line 47 of file impex.hxx.

Constructor & Destructor Documentation

ScImportExport::ScImportExport ( ScDocument r)

Definition at line 102 of file impex.cxx.

References pExtOptions, and pUndoDoc.

ScImportExport::ScImportExport ( ScDocument ,
const OUString &   
)
ScImportExport::ScImportExport ( ScDocument ,
const ScAddress  
)
ScImportExport::ScImportExport ( ScDocument r,
const ScRange rRange 
)

ctor with a string (and bSingle=true) is also used for DdeSetData

Definition at line 134 of file impex.cxx.

References ScRange::aEnd, aRange, ScRange::aStart, pExtOptions, pUndoDoc, ScAddress::SetTab(), and ScAddress::Tab().

ScImportExport::~ScImportExport ( )

Definition at line 195 of file impex.cxx.

References pExtOptions, and pUndoDoc.

Member Function Documentation

bool ScImportExport::Dif2Doc ( SvStream rStrm)
private
bool ScImportExport::Doc2Dif ( SvStream rStrm)
private

Definition at line 2253 of file impex.cxx.

References aRange, ScFormatFilter::Get(), rDoc, and ScFormatFilterPlugin::ScExportDif().

Referenced by ExportStream().

bool ScImportExport::Doc2HTML ( SvStream rStrm,
const OUString &  rBaseURL 
)
private
bool ScImportExport::Doc2RTF ( SvStream rStrm)
private
bool ScImportExport::Doc2Sylk ( SvStream rStrm)
private
bool ScImportExport::Doc2Text ( SvStream rStrm)
private
void ScImportExport::EmbeddedNullTreatment ( OUString &  rStr)
static

Definition at line 1533 of file impex.cxx.

Referenced by ExtText2Doc(), and ScImportAsciiDlg::GetLine().

void ScImportExport::EndPaste ( bool  bAutoRowHeight = true)
private
bool ScImportExport::ExportByteString ( OString &  rText,
rtl_TextEncoding  eEnc,
SotClipboardFormatId  nFmt 
)
bool ScImportExport::ExportData ( const OUString &  rMimeType,
css::uno::Any &  rValue 
)
bool ScImportExport::ExportStream ( SvStream rStrm,
const OUString &  rBaseURL,
SotClipboardFormatId  nFmt 
)
bool ScImportExport::ExportString ( OUString &  rText,
SotClipboardFormatId  nFmt 
)
bool ScImportExport::ExtText2Doc ( SvStream rStrm)
private
const OUString& ScImportExport::GetNonConvertibleChars ( ) const
inline

Definition at line 139 of file impex.hxx.

Referenced by ScDocShell::ConvertTo().

const ScRange& ScImportExport::GetRange ( ) const
inline

Definition at line 102 of file impex.hxx.

bool ScImportExport::HTML2Doc ( SvStream rStrm,
const OUString &  rBaseURL 
)
private
bool ScImportExport::ImportStream ( SvStream rStrm,
const OUString &  rBaseURL,
SotClipboardFormatId  nFmt 
)
bool ScImportExport::ImportString ( const OUString &  rText,
SotClipboardFormatId  nFmt 
)

no swapping in memory

Definition at line 301 of file impex.cxx.

References ImportStream(), and SetNoEndianSwap().

bool ScImportExport::IsFormatSupported ( SotClipboardFormatId  nFormat)
static

Definition at line 219 of file impex.cxx.

Referenced by ScTransferObj::GetData(), and ScViewFunc::PasteDataFormat().

bool ScImportExport::IsOverflow ( ) const
inline

Definition at line 137 of file impex.hxx.

bool ScImportExport::IsOverflowCell ( ) const
inline

Definition at line 136 of file impex.hxx.

Referenced by ScDocShell::ConvertFrom().

bool ScImportExport::IsOverflowCol ( ) const
inline

Definition at line 135 of file impex.hxx.

Referenced by ScDocShell::ConvertFrom().

bool ScImportExport::IsOverflowRow ( ) const
inline

Definition at line 134 of file impex.hxx.

Referenced by ScDocShell::ConvertFrom().

bool ScImportExport::IsRef ( ) const
inline

Definition at line 100 of file impex.hxx.

Referenced by ScServerObject::GetData().

bool ScImportExport::RTF2Doc ( SvStream rStrm,
const OUString &  rBaseURL 
)
private
const sal_Unicode * ScImportExport::ScanNextFieldFromString ( const sal_Unicode p,
OUString &  rField,
sal_Unicode  cStr,
const sal_Unicode pSeps,
bool  bMergeSeps,
bool &  rbIsQuoted,
bool &  rbOverflowCell,
bool  bRemoveSpace 
)
static
void ScImportExport::SetApi ( bool  bApi)
inline

Definition at line 141 of file impex.hxx.

Referenced by ScCellShell::ExecuteDB().

void ScImportExport::SetDelimiter ( sal_Unicode  c)
inline

Definition at line 117 of file impex.hxx.

Referenced by ScCellShell::ExecuteDB().

void ScImportExport::SetExportTextOptions ( const ScExportTextOptions options)
inline
void ScImportExport::SetExtOptions ( const ScAsciiOptions rOpt)
void ScImportExport::SetFilterOptions ( const OUString &  rFilterOptions)

Definition at line 214 of file impex.cxx.

References maFilterOptions.

Referenced by ScDocShell::ConvertTo().

void ScImportExport::SetFormulas ( bool  b)
inline
void ScImportExport::SetImportBroadcast ( bool  b)
inline

Definition at line 142 of file impex.hxx.

Referenced by ScCellShell::ExecuteDB().

void ScImportExport::SetIncludeFiltered ( bool  b)
inline

Definition at line 119 of file impex.hxx.

Referenced by ScTransferObj::GetData().

void ScImportExport::SetNoEndianSwap ( SvStream rStrm)
static

only if stream is only used in own (!) memory

Definition at line 542 of file impex.cxx.

References SvStream::SetEndian().

Referenced by ScCellShell::ExecuteDB(), ExportByteString(), ExportString(), and ImportString().

void ScImportExport::SetOverwriting ( const bool  bOverwriting)
inline

Definition at line 143 of file impex.hxx.

Referenced by ScCellShell::ExecuteDB().

void ScImportExport::SetSeparator ( sal_Unicode  c)
inline

Definition at line 116 of file impex.hxx.

Referenced by ScServerObject::GetData().

void ScImportExport::SetStreamPath ( const OUString &  rPath)
inline

Definition at line 121 of file impex.hxx.

Referenced by ScDocShell::ConvertTo().

bool ScImportExport::StartPaste ( )
private
bool ScImportExport::Sylk2Doc ( SvStream rStrm)
private
bool ScImportExport::Text2Doc ( SvStream rStrm)
private
void ScImportExport::WriteUnicodeOrByteEndl ( SvStream rStrm)
static
void ScImportExport::WriteUnicodeOrByteString ( SvStream rStrm,
const OUString &  rString,
bool  bZero = false 
)
static

Member Data Documentation

OUString ScImportExport::aNonConvertibleChars
private

Definition at line 54 of file impex.hxx.

Referenced by Doc2HTML().

ScRange ScImportExport::aRange
private
OUString ScImportExport::aStreamPath
private

Definition at line 53 of file impex.hxx.

Referenced by Doc2HTML().

bool ScImportExport::bAll
private

Definition at line 62 of file impex.hxx.

Referenced by Doc2HTML(), ExportStream(), and StartPaste().

bool ScImportExport::bFormulas
private

Definition at line 60 of file impex.hxx.

Referenced by Doc2Sylk(), and Doc2Text().

bool ScImportExport::bIncludeFiltered
private

Definition at line 61 of file impex.hxx.

Referenced by Doc2Text().

bool ScImportExport::bOverflowCell
private

Definition at line 67 of file impex.hxx.

Referenced by ExtText2Doc(), and Text2Doc().

bool ScImportExport::bOverflowCol
private

Definition at line 66 of file impex.hxx.

Referenced by ExtText2Doc(), Sylk2Doc(), and Text2Doc().

bool ScImportExport::bOverflowRow
private

Definition at line 65 of file impex.hxx.

Referenced by ExtText2Doc(), Sylk2Doc(), and Text2Doc().

bool ScImportExport::bSingle
private

Definition at line 63 of file impex.hxx.

Referenced by ExportStream(), Sylk2Doc(), and Text2Doc().

bool ScImportExport::bUndo
private

Definition at line 64 of file impex.hxx.

Referenced by ExtText2Doc(), and StartPaste().

sal_Unicode ScImportExport::cSep
private

Definition at line 58 of file impex.hxx.

Referenced by SetExtOptions(), and Text2Doc().

sal_Unicode ScImportExport::cStr
private

Definition at line 59 of file impex.hxx.

Referenced by Doc2Text(), ExtText2Doc(), SetExtOptions(), and Text2Doc().

OUString ScImportExport::maFilterOptions
private

Definition at line 55 of file impex.hxx.

Referenced by Doc2HTML(), and SetFilterOptions().

bool ScImportExport::mbApi
private

Definition at line 68 of file impex.hxx.

Referenced by ExtText2Doc().

bool ScImportExport::mbImportBroadcast
private

Definition at line 69 of file impex.hxx.

Referenced by ExtText2Doc(), and Text2Doc().

bool ScImportExport::mbOverwriting
private

Definition at line 70 of file impex.hxx.

Referenced by ExtText2Doc().

ScExportTextOptions ScImportExport::mExportTextOptions
private

Definition at line 73 of file impex.hxx.

Referenced by Doc2Text().

SCROW ScImportExport::nMaxImportRow
private

Definition at line 57 of file impex.hxx.

Referenced by Sylk2Doc().

sal_uInt32 ScImportExport::nSizeLimit
private

Definition at line 56 of file impex.hxx.

Referenced by Doc2Text(), and ExportByteString().

ScDocShell* ScImportExport::pDocSh
private

Definition at line 49 of file impex.hxx.

Referenced by EndPaste(), ExtText2Doc(), HTML2Doc(), StartPaste(), and Text2Doc().

std::unique_ptr<ScAsciiOptions> ScImportExport::pExtOptions
private

Definition at line 75 of file impex.hxx.

Referenced by ExtText2Doc(), HTML2Doc(), ScImportExport(), SetExtOptions(), and ~ScImportExport().

std::unique_ptr<ScDocument, o3tl::default_delete<ScDocument> > ScImportExport::pUndoDoc
private

Definition at line 51 of file impex.hxx.

Referenced by EndPaste(), ScImportExport(), StartPaste(), and ~ScImportExport().

ScDocument& ScImportExport::rDoc
private

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