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

#include <editutil.hxx>

Collaboration diagram for ScEditUtil:
[legend]

Public Member Functions

 ScEditUtil (ScDocument *pDocument, SCCOL nX, SCROW nY, SCTAB nZ, const Point &rCellPos, OutputDevice *pDevice, double nScaleX, double nScaleY, const Fraction &rX, const Fraction &rY, bool bPrintTwips=false)
 
tools::Rectangle GetEditArea (const ScPatternAttr *pPattern, bool bForceToTop)
 
tools::Long GetIndent (const ScPatternAttr *pPattern) const
 
void GetMargins (const ScPatternAttr *pPattern, tools::Long &nLeftMargin, tools::Long &nTopMargin, tools::Long &nRightMargin, tools::Long &BottomMargin) const
 

Static Public Member Functions

static OUString ModifyDelimiters (const OUString &rOld)
 
static OUString GetSpaceDelimitedString (const EditEngine &rEngine)
 Retrieves string with paragraphs delimited by spaces. More...
 
static OUString GetMultilineString (const EditEngine &rEngine)
 Retrieves string with paragraphs delimited by new lines ('
'). More...
 
static OUString GetMultilineString (const EditTextObject &rEdit)
 
static SC_DLLPUBLIC OUString GetString (const EditTextObject &rEditText, const ScDocument *pDoc)
 Retrieves string with paragraphs delimited by new lines ('
'). More...
 
static std::unique_ptr< EditTextObjectCreateURLObjectFromURL (ScDocument &rDoc, const OUString &rURL, const OUString &rText)
 
static void RemoveCharAttribs (EditTextObject &rEditText, const ScPatternAttr &rAttr)
 
static std::unique_ptr< EditTextObjectClone (const EditTextObject &rSrc, ScDocument &rDestDoc)
 
static OUString GetCellFieldValue (const SvxFieldData &rFieldData, const ScDocument *pDoc, std::optional< Color > *ppTextColor, std::optional< FontLineStyle > *ppFldLineStyle)
 

Private Attributes

ScDocumentpDoc
 
SCCOL nCol
 
SCROW nRow
 
SCTAB nTab
 
Point aCellPos
 
VclPtr< OutputDevicepDev
 
double nPPTX
 
double nPPTY
 
Fraction aZoomX
 
Fraction aZoomY
 
bool bInPrintTwips
 

Detailed Description

Definition at line 36 of file editutil.hxx.

Constructor & Destructor Documentation

◆ ScEditUtil()

ScEditUtil::ScEditUtil ( ScDocument pDocument,
SCCOL  nX,
SCROW  nY,
SCTAB  nZ,
const Point rCellPos,
OutputDevice pDevice,
double  nScaleX,
double  nScaleY,
const Fraction rX,
const Fraction rY,
bool  bPrintTwips = false 
)

Definition at line 56 of file editutil.cxx.

Member Function Documentation

◆ Clone()

std::unique_ptr< EditTextObject > ScEditUtil::Clone ( const EditTextObject rSrc,
ScDocument rDestDoc 
)
static

◆ CreateURLObjectFromURL()

std::unique_ptr< EditTextObject > ScEditUtil::CreateURLObjectFromURL ( ScDocument rDoc,
const OUString &  rURL,
const OUString &  rText 
)
static

◆ GetCellFieldValue()

OUString ScEditUtil::GetCellFieldValue ( const SvxFieldData rFieldData,
const ScDocument pDoc,
std::optional< Color > *  ppTextColor,
std::optional< FontLineStyle > *  ppFldLineStyle 
)
static

◆ GetEditArea()

tools::Rectangle ScEditUtil::GetEditArea ( const ScPatternAttr pPattern,
bool  bForceToTop 
)

◆ GetIndent()

tools::Long ScEditUtil::GetIndent ( const ScPatternAttr pPattern) const

◆ GetMargins()

void ScEditUtil::GetMargins ( const ScPatternAttr pPattern,
tools::Long nLeftMargin,
tools::Long nTopMargin,
tools::Long nRightMargin,
tools::Long BottomMargin 
) const

◆ GetMultilineString() [1/2]

OUString ScEditUtil::GetMultilineString ( const EditEngine rEngine)
static

Retrieves string with paragraphs delimited by new lines ('
').

Definition at line 109 of file editutil.cxx.

References lcl_GetDelimitedString().

Referenced by ScInputHandler::DataChanged(), ScViewFunc::EnterData(), GetEditText(), ScAutoNameCache::GetNameOccurrences(), GetString(), IMPL_LINK_NOARG(), and ScInputHandler::NotifyChange().

◆ GetMultilineString() [2/2]

OUString ScEditUtil::GetMultilineString ( const EditTextObject rEdit)
static

Definition at line 114 of file editutil.cxx.

References lcl_GetDelimitedString().

◆ GetSpaceDelimitedString()

OUString ScEditUtil::GetSpaceDelimitedString ( const EditEngine rEngine)
static

Retrieves string with paragraphs delimited by spaces.

Definition at line 105 of file editutil.cxx.

References lcl_GetDelimitedString().

Referenced by ScHeaderFooterTextObj::getString().

◆ GetString()

OUString ScEditUtil::GetString ( const EditTextObject rEditText,
const ScDocument pDoc 
)
static

Retrieves string with paragraphs delimited by new lines ('
').

Parameters
pDocIf not NULL, use pDoc->GetEditEngine() to retrieve field content. If NULL, a static mutex-guarded ScFieldEditEngine is used that is not capable of resolving document specific fields; avoid.

Definition at line 119 of file editutil.cxx.

References aMutex, GetMultilineString(), ScGlobal::GetStaticFieldEditEngine(), EditTextObject::HasField(), pDoc, and EditEngine::SetText().

Referenced by ScColumn::CopyStaticToDocument(), ScTable::FillAutoSimple(), ScTable::FillSeries(), XclExpChTrCellContent::GetCellData(), ScChangeActionContent::GetStringOfCell(), ScChangeActionContent::GetValueString(), ScValidationData::IsDataValid(), lcl_GetCellContent(), ScColumn::ResolveStaticReference(), and ScChangeTrackingExportHelper::WriteEditCell().

◆ ModifyDelimiters()

OUString ScEditUtil::ModifyDelimiters ( const OUString &  rOld)
static

◆ RemoveCharAttribs()

void ScEditUtil::RemoveCharAttribs ( EditTextObject rEditText,
const ScPatternAttr rAttr 
)
static

Member Data Documentation

◆ aCellPos

Point ScEditUtil::aCellPos
private

Definition at line 42 of file editutil.hxx.

Referenced by GetEditArea().

◆ aZoomX

Fraction ScEditUtil::aZoomX
private

Definition at line 46 of file editutil.hxx.

Referenced by GetEditArea().

◆ aZoomY

Fraction ScEditUtil::aZoomY
private

Definition at line 47 of file editutil.hxx.

Referenced by GetEditArea().

◆ bInPrintTwips

bool ScEditUtil::bInPrintTwips
private

Definition at line 48 of file editutil.hxx.

Referenced by GetEditArea(), GetIndent(), and GetMargins().

◆ nCol

SCCOL ScEditUtil::nCol
private

Definition at line 39 of file editutil.hxx.

Referenced by GetEditArea(), GetIndent(), and GetMargins().

◆ nPPTX

double ScEditUtil::nPPTX
private

Definition at line 44 of file editutil.hxx.

Referenced by GetEditArea(), GetIndent(), and GetMargins().

◆ nPPTY

double ScEditUtil::nPPTY
private

Definition at line 45 of file editutil.hxx.

Referenced by GetEditArea(), and GetMargins().

◆ nRow

SCROW ScEditUtil::nRow
private

Definition at line 40 of file editutil.hxx.

Referenced by GetEditArea(), GetIndent(), and GetMargins().

◆ nTab

SCTAB ScEditUtil::nTab
private

Definition at line 41 of file editutil.hxx.

Referenced by GetCellFieldValue(), GetEditArea(), GetIndent(), and GetMargins().

◆ pDev

VclPtr<OutputDevice> ScEditUtil::pDev
private

Definition at line 43 of file editutil.hxx.

Referenced by GetEditArea().

◆ pDoc

ScDocument* ScEditUtil::pDoc
private

Definition at line 38 of file editutil.hxx.

Referenced by GetCellFieldValue(), GetEditArea(), GetIndent(), GetMargins(), and GetString().


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