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

This class provides methods to create an XclExpString. More...

#include <xehelper.hxx>

Public Member Functions

 XclExpStringHelper (const XclExpStringHelper &)=delete
 removes copy constructor More...
 
const XclExpStringHelperoperator= (const XclExpStringHelper &)=delete
 remove copy-assignment operator More...
 
 XclExpStringHelper ()=delete
 We don't want anybody to instantiate this class, since it is just a collection of static methods. More...
 

Static Public Member Functions

static XclExpStringRef CreateString (const XclExpRoot &rRoot, const OUString &rString, XclStrFlags nFlags=XclStrFlags::NONE, sal_uInt16 nMaxLen=EXC_STR_MAXLEN)
 Creates a new unformatted string from the passed string. More...
 
static XclExpStringRef CreateString (const XclExpRoot &rRoot, sal_Unicode cChar, XclStrFlags nFlags=XclStrFlags::NONE, sal_uInt16 nMaxLen=EXC_STR_MAXLEN)
 Creates a new unformatted string from the passed character. More...
 
static void AppendString (XclExpString &rXclString, const XclExpRoot &rRoot, const OUString &rString)
 Appends an unformatted string to an Excel string object. More...
 
static void AppendChar (XclExpString &rXclString, const XclExpRoot &rRoot, sal_Unicode cChar)
 Appends a character to an Excel string object. More...
 
static XclExpStringRef CreateCellString (const XclExpRoot &rRoot, const OUString &rString, const ScPatternAttr *pCellAttr, XclStrFlags nFlags=XclStrFlags::NONE, sal_uInt16 nMaxLen=EXC_STR_MAXLEN)
 Creates a new formatted string from a Calc string cell. More...
 
static XclExpStringRef CreateCellString (const XclExpRoot &rRoot, const EditTextObject &rEditText, const ScPatternAttr *pCellAttr, XclExpHyperlinkHelper &rLinkHelper, XclStrFlags nFlags=XclStrFlags::NONE, sal_uInt16 nMaxLen=EXC_STR_MAXLEN)
 Creates a new formatted string from a Calc edit cell. More...
 
static XclExpStringRef CreateString (const XclExpRoot &rRoot, const SdrTextObj &rTextObj, XclStrFlags nFlags=XclStrFlags::NONE)
 Creates a new formatted string from a drawing text box. More...
 
static XclExpStringRef CreateString (const XclExpRoot &rRoot, const EditTextObject &rEditObj, XclStrFlags nFlags=XclStrFlags::NONE)
 Creates a new formatted string from an edit text string. More...
 
static sal_Int16 GetLeadingScriptType (const XclExpRoot &rRoot, const OUString &rString)
 Returns the script type first text portion different to WEAK, or the system default script type, if there is only weak script in the passed string. More...
 

Detailed Description

This class provides methods to create an XclExpString.

The string can be created from an edit engine text object or directly from a Calc edit cell.

Definition at line 212 of file xehelper.hxx.

Constructor & Destructor Documentation

XclExpStringHelper::XclExpStringHelper ( const XclExpStringHelper )
delete

removes copy constructor

XclExpStringHelper::XclExpStringHelper ( )
delete

We don't want anybody to instantiate this class, since it is just a collection of static methods.

Member Function Documentation

void XclExpStringHelper::AppendChar ( XclExpString rXclString,
const XclExpRoot rRoot,
sal_Unicode  cChar 
)
static

Appends a character to an Excel string object.

Selects the correct Append() function depending on the current BIFF version contained in the passed XclExpRoot object.

Parameters
rXclStringThe Excel string object.
rStringThe source string.

Definition at line 553 of file xehelper.cxx.

References XclExpString::Append(), XclExpString::AppendByte(), EXC_BIFF8, XclRoot::GetBiff(), and XclRoot::GetTextEncoding().

Referenced by CreateString().

void XclExpStringHelper::AppendString ( XclExpString rXclString,
const XclExpRoot rRoot,
const OUString &  rString 
)
static

Appends an unformatted string to an Excel string object.

Selects the correct Append() function depending on the current BIFF version contained in the passed XclExpRoot object.

Parameters
rXclStringThe Excel string object.
rStringThe source string.

Definition at line 545 of file xehelper.cxx.

References XclExpString::Append(), XclExpString::AppendByte(), EXC_BIFF8, XclRoot::GetBiff(), and XclRoot::GetTextEncoding().

Referenced by XclExpChSourceLink::AppendString(), and XclExpChSourceLink::ConvertStringSequence().

XclExpStringRef XclExpStringHelper::CreateCellString ( const XclExpRoot rRoot,
const OUString &  rString,
const ScPatternAttr pCellAttr,
XclStrFlags  nFlags = XclStrFlags::NONE,
sal_uInt16  nMaxLen = EXC_STR_MAXLEN 
)
static

Creates a new formatted string from a Calc string cell.

Creates a Unicode string or a byte string, depending on the current BIFF version contained in the passed XclExpRoot object. May create a formatted string object, if the cell text contains different script types.

Parameters
rStringCellThe Calc string cell object.
pCellAttrThe set item containing the cell formatting.
nFlagsModifiers for string export.
nMaxLenThe maximum number of characters to store in this string.
Returns
The new string object (shared pointer).

Definition at line 561 of file xehelper.cxx.

Referenced by XclExpChTrCellContent::GetCellData(), and XclExpLabelCell::XclExpLabelCell().

XclExpStringRef XclExpStringHelper::CreateCellString ( const XclExpRoot rRoot,
const EditTextObject rEditText,
const ScPatternAttr pCellAttr,
XclExpHyperlinkHelper rLinkHelper,
XclStrFlags  nFlags = XclStrFlags::NONE,
sal_uInt16  nMaxLen = EXC_STR_MAXLEN 
)
static

Creates a new formatted string from a Calc edit cell.

Creates a Unicode string or a byte string, depending on the current BIFF version contained in the passed XclExpRoot object.

Parameters
rEditCellThe Calc edit cell object.
pCellAttrThe set item containing the cell formatting.
rLinkHelperHelper object for hyperlink conversion.
nFlagsModifiers for string export.
nMaxLenThe maximum number of characters to store in this string.
Returns
The new string object (shared pointer).

Definition at line 568 of file xehelper.cxx.

References ScPatternAttr::FillToEditItemSet(), ScDocument::GetDefPattern(), XclRoot::GetDoc(), XclRoot::GetEditEngine(), EditEngine::GetEmptyItemSet(), SfxSetItem::GetItemSet(), EditEngine::GetUpdateMode(), ScEditEngineDefaulter::SetDefaults(), ScEditEngineDefaulter::SetTextCurrentDefaults(), and EditEngine::SetUpdateMode().

XclExpStringRef XclExpStringHelper::CreateString ( const XclExpRoot rRoot,
const OUString &  rString,
XclStrFlags  nFlags = XclStrFlags::NONE,
sal_uInt16  nMaxLen = EXC_STR_MAXLEN 
)
static

Creates a new unformatted string from the passed string.

Creates a Unicode string or a byte string, depending on the current BIFF version contained in the passed XclExpRoot object.

Parameters
rStringThe source string.
nFlagsModifiers for string export.
nMaxLenThe maximum number of characters to store in this string.
Returns
The new string object (shared pointer).

Definition at line 526 of file xehelper.cxx.

References EXC_BIFF8, XclRoot::GetBiff(), and XclRoot::GetTextEncoding().

Referenced by XclExpChSourceLink::ConvertString(), XclExpChSourceLink::ConvertStringSequence(), CreateString(), and XclExpNote::XclExpNote().

XclExpStringRef XclExpStringHelper::CreateString ( const XclExpRoot rRoot,
sal_Unicode  cChar,
XclStrFlags  nFlags = XclStrFlags::NONE,
sal_uInt16  nMaxLen = EXC_STR_MAXLEN 
)
static

Creates a new unformatted string from the passed character.

Creates a Unicode string or a byte string, depending on the current BIFF version contained in the passed XclExpRoot object.

Parameters
cCharThe source character. The NUL character is explicitly allowed.
nFlagsModifiers for string export.
nMaxLenThe maximum number of characters to store in this string.
Returns
The new string object (shared pointer).

Definition at line 537 of file xehelper.cxx.

References AppendChar(), CreateString(), and EMPTY_OUSTRING.

XclExpStringRef XclExpStringHelper::CreateString ( const XclExpRoot rRoot,
const SdrTextObj rTextObj,
XclStrFlags  nFlags = XclStrFlags::NONE 
)
static

Creates a new formatted string from a drawing text box.

Creates a Unicode string or a byte string, depending on the current BIFF version contained in the passed XclExpRoot object.

Parameters
rTextObjThe text box object.
nFlagsModifiers for string export.
Returns
The new string object (shared pointer).

Definition at line 593 of file xehelper.cxx.

References CreateString(), EMPTY_OUSTRING, EXC_FONT_APP, EXC_MAXRECSIZE_BIFF8, EXC_STR_MAXLEN, XclRoot::GetDrawEditEngine(), SdrTextObj::GetOutlinerParaObject(), EditEngine::GetUpdateMode(), EditEngine::SetText(), and EditEngine::SetUpdateMode().

XclExpStringRef XclExpStringHelper::CreateString ( const XclExpRoot rRoot,
const EditTextObject rEditObj,
XclStrFlags  nFlags = XclStrFlags::NONE 
)
static

Creates a new formatted string from an edit text string.

Parameters
rEditObjThe edittext object.
nFlagsModifiers for string export.
Returns
The new string object.

Definition at line 623 of file xehelper.cxx.

References EXC_FONT_APP, EXC_MAXRECSIZE_BIFF8, EXC_STR_MAXLEN, XclRoot::GetDrawEditEngine(), EditEngine::GetUpdateMode(), EditEngine::SetText(), and EditEngine::SetUpdateMode().

sal_Int16 XclExpStringHelper::GetLeadingScriptType ( const XclExpRoot rRoot,
const OUString &  rString 
)
static

Returns the script type first text portion different to WEAK, or the system default script type, if there is only weak script in the passed string.

Definition at line 643 of file xehelper.cxx.

References ScDocument::GetBreakIterator(), XclRoot::GetDefApiScript(), and XclRoot::GetDoc().

Referenced by XclExpChSourceLink::ConvertStringSequence(), and XclExpFormulaCell::XclExpFormulaCell().

const XclExpStringHelper& XclExpStringHelper::operator= ( const XclExpStringHelper )
delete

remove copy-assignment operator


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