LibreOffice Module sc (master)  1
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
ScConversionEngineBase Class Referenceabstract

Base class for special type of edit engines, i.e. More...

#include <spelleng.hxx>

Inheritance diagram for ScConversionEngineBase:
[legend]
Collaboration diagram for ScConversionEngineBase:
[legend]

Public Member Functions

 ScConversionEngineBase (SfxItemPool *pEnginePool, ScViewData &rViewData, ScDocument *pUndoDoc, ScDocument *pRedoDoc)
 
virtual ~ScConversionEngineBase () override
 
virtual void ConvertAll (EditView &rEditView)=0
 Derived classes implement to convert all cells in the selection or sheet. More...
 
bool IsAnyModified () const
 Returns true, if at least one cell has been modified. More...
 
bool IsFinished () const
 Returns true, if the entire document/selection has been finished. More...
 
- Public Member Functions inherited from ScEditEngineDefaulter
 ScEditEngineDefaulter (SfxItemPool *pEnginePool, bool bDeleteEnginePool=false)
 bDeleteEnginePool: Engine becomes the owner of the pool and deletes it on destruction More...
 
 ScEditEngineDefaulter (const ScEditEngineDefaulter &rOrg)
 If rOrg.bDeleteEnginePool: pool gets cloned and will be deleted on destruction. More...
 
virtual ~ScEditEngineDefaulter () override
 
void SetDefaults (const SfxItemSet &rDefaults, bool bRememberCopy=true)
 Creates a copy of SfxItemSet if bRememberCopy set. More...
 
void SetDefaults (std::unique_ptr< SfxItemSet > pDefaults)
 Becomes the owner of the SfxItemSet. More...
 
void SetDefaultItem (const SfxPoolItem &rItem)
 Set the item in the default ItemSet which is created if it doesn't exist yet. More...
 
const SfxItemSetGetDefaults ()
 Returns the stored defaults, used to find non-default character attributes. More...
 
void SetTextCurrentDefaults (const EditTextObject &rTextObject)
 SetText and apply defaults already set. More...
 
void SetTextNewDefaults (const EditTextObject &rTextObject, const SfxItemSet &rDefaults, bool bRememberCopy=true)
 Current defaults are not applied, new defaults are applied. More...
 
void SetTextNewDefaults (const EditTextObject &rTextObject, std::unique_ptr< SfxItemSet > pDefaults)
 Current defaults are not applied, new defaults are applied. More...
 
void SetTextCurrentDefaults (const OUString &rText)
 SetText and apply defaults already set. More...
 
void SetTextNewDefaults (const OUString &rText, const SfxItemSet &rDefaults)
 Current defaults are not applied, new defaults are applied. More...
 
void SetTextNewDefaults (const OUString &rText, std::unique_ptr< SfxItemSet > pDefaults)
 Current defaults are not applied, new defaults are applied. More...
 
void RemoveParaAttribs ()
 Paragraph attributes that are not defaults are copied to character attributes and all paragraph attributes reset. More...
 
void RepeatDefaults ()
 Re-apply existing defaults if set, same as in SetText, but without EnableUndo/SetUpdateMode. More...
 
- Public Member Functions inherited from EditEngine
EditSelection InsertText (css::uno::Reference< css::datatransfer::XTransferable > const &rxDataObj, const OUString &rBaseURL, const EditPaM &rPaM, bool bUseSpecial)
 
 EditEngine (SfxItemPool *pItemPool)
 
virtual ~EditEngine ()
 
const SfxItemSetGetEmptyItemSet () const
 
void SetDefTab (sal_uInt16 nDefTab)
 
void SetRefDevice (OutputDevice *pRefDef)
 
OutputDeviceGetRefDevice () const
 
void SetRefMapMode (const MapMode &rMapMode)
 
MapMode const & GetRefMapMode () const
 
void SetUpdateMode (bool bUpdate, bool bRestoring=false)
 
bool GetUpdateMode () const
 
void SetBackgroundColor (const Color &rColor)
 
Color const & GetBackgroundColor () const
 
Color GetAutoColor () const
 
void EnableAutoColor (bool b)
 
void ForceAutoColor (bool b)
 
bool IsForceAutoColor () const
 
void InsertView (EditView *pEditView, size_t nIndex=EE_APPEND)
 
EditViewRemoveView (EditView *pEditView)
 
void RemoveView (size_t nIndex)
 
EditViewGetView (size_t nIndex=0) const
 
size_t GetViewCount () const
 
bool HasView (EditView *pView) const
 
EditViewGetActiveView () const
 
void SetActiveView (EditView *pView)
 
void SetPaperSize (const Size &rSize)
 
const SizeGetPaperSize () const
 
void SetVertical (bool bVertical)
 
bool IsVertical () const
 
bool IsTopToBottom () const
 
bool GetDirectVertical () const
 
void SetRotation (TextRotation nRotation)
 
TextRotation GetRotation () const
 
void SetFixedCellHeight (bool bUseFixedCellHeight)
 
void SetDefaultHorizontalTextDirection (EEHorizontalTextDirection eHTextDir)
 
EEHorizontalTextDirection GetDefaultHorizontalTextDirection () const
 
SvtScriptType GetScriptType (const ESelection &rSelection) const
 
LanguageType GetLanguage (const EditPaM &rPaM) const
 
LanguageType GetLanguage (sal_Int32 nPara, sal_Int32 nPos) const
 
void TransliterateText (const ESelection &rSelection, TransliterationFlags nTransliterationMode)
 
EditSelection TransliterateText (const EditSelection &rSelection, TransliterationFlags nTransliterationMode)
 
void SetAsianCompressionMode (CharCompressType nCompression)
 
void SetKernAsianPunctuation (bool bEnabled)
 
void SetAddExtLeading (bool b)
 
void SetPolygon (const basegfx::B2DPolyPolygon &rPolyPolygon)
 
void SetPolygon (const basegfx::B2DPolyPolygon &rPolyPolygon, const basegfx::B2DPolyPolygon *pLinePolyPolygon)
 
void ClearPolygon ()
 
const SizeGetMinAutoPaperSize () const
 
void SetMinAutoPaperSize (const Size &rSz)
 
const SizeGetMaxAutoPaperSize () const
 
void SetMaxAutoPaperSize (const Size &rSz)
 
OUString GetText (LineEnd eEnd=LINEEND_LF) const
 
OUString GetText (const ESelection &rSelection) const
 
sal_uInt32 GetTextLen () const
 
sal_uInt32 GetTextHeight () const
 
sal_uInt32 GetTextHeightNTP () const
 
sal_uInt32 CalcTextWidth ()
 
OUString GetText (sal_Int32 nParagraph) const
 
sal_Int32 GetTextLen (sal_Int32 nParagraph) const
 
sal_uInt32 GetTextHeight (sal_Int32 nParagraph) const
 
sal_Int32 GetParagraphCount () const
 
sal_Int32 GetLineCount (sal_Int32 nParagraph) const
 
sal_Int32 GetLineLen (sal_Int32 nParagraph, sal_Int32 nLine) const
 
void GetLineBoundaries (sal_Int32 &rStart, sal_Int32 &rEnd, sal_Int32 nParagraph, sal_Int32 nLine) const
 
sal_Int32 GetLineNumberAtIndex (sal_Int32 nPara, sal_Int32 nIndex) const
 
sal_uInt32 GetLineHeight (sal_Int32 nParagraph)
 
tools::Rectangle GetParaBounds (sal_Int32 nPara)
 
ParagraphInfos GetParagraphInfos (sal_Int32 nPara)
 
sal_Int32 FindParagraph (long nDocPosY)
 
EPosition FindDocPosition (const Point &rDocPos) const
 
tools::Rectangle GetCharacterBounds (const EPosition &rPos) const
 
OUString GetWord (sal_Int32 nPara, sal_Int32 nIndex)
 
ESelection GetWord (const ESelection &rSelection, sal_uInt16 nWordType) const
 
void Clear ()
 
void SetText (const OUString &rStr)
 
std::unique_ptr< EditTextObjectCreateTextObject ()
 
std::unique_ptr< EditTextObjectGetEmptyTextObject () const
 
std::unique_ptr< EditTextObjectCreateTextObject (sal_Int32 nPara, sal_Int32 nParas=1)
 
std::unique_ptr< EditTextObjectCreateTextObject (const ESelection &rESelection)
 
void SetText (const EditTextObject &rTextObject)
 
void RemoveParagraph (sal_Int32 nPara)
 
void InsertParagraph (sal_Int32 nPara, const EditTextObject &rTxtObj, const bool bAppend=false)
 
void InsertParagraph (sal_Int32 nPara, const OUString &rText)
 
void SetText (sal_Int32 nPara, const OUString &rText)
 
virtual void SetParaAttribs (sal_Int32 nPara, const SfxItemSet &rSet)
 
const SfxItemSetGetParaAttribs (sal_Int32 nPara) const
 
void SetCharAttribs (sal_Int32 nPara, const SfxItemSet &rSet)
 
void GetCharAttribs (sal_Int32 nPara, std::vector< EECharAttrib > &rLst) const
 
SfxItemSet GetAttribs (sal_Int32 nPara, sal_Int32 nStart, sal_Int32 nEnd, GetAttribsFlags nFlags=GetAttribsFlags::ALL) const
 
SfxItemSet GetAttribs (const ESelection &rSel, EditEngineAttribs nOnlyHardAttrib=EditEngineAttribs::All)
 
bool HasParaAttrib (sal_Int32 nPara, sal_uInt16 nWhich) const
 
const SfxPoolItemGetParaAttrib (sal_Int32 nPara, sal_uInt16 nWhich)
 
const T & GetParaAttrib (sal_Int32 nPara, TypedWhichId< T > nWhich)
 
vcl::Font GetStandardFont (sal_Int32 nPara)
 
SvxFont GetStandardSvxFont (sal_Int32 nPara)
 
void RemoveAttribs (const ESelection &rSelection, bool bRemoveParaAttribs, sal_uInt16 nWhich)
 
void ShowParagraph (sal_Int32 nParagraph, bool bShow)
 
SfxUndoManagerGetUndoManager ()
 
SfxUndoManagerSetUndoManager (SfxUndoManager *pNew)
 
void UndoActionStart (sal_uInt16 nId)
 
void UndoActionStart (sal_uInt16 nId, const ESelection &rSel)
 
void UndoActionEnd ()
 
bool IsInUndo () const
 
void EnableUndo (bool bEnable)
 
bool IsUndoEnabled () const
 
bool HasTriedMergeOnLastAddUndo () const
 
void ClearModifyFlag ()
 
void SetModified ()
 
bool IsModified () const
 
void SetModifyHdl (const Link< LinkParamNone *, void > &rLink)
 
Link< LinkParamNone *, void > const & GetModifyHdl () const
 
bool IsInSelectionMode () const
 
void StripPortions ()
 
void GetPortions (sal_Int32 nPara, std::vector< sal_Int32 > &rList)
 
long GetFirstLineStartX (sal_Int32 nParagraph)
 
Point GetDocPosTopLeft (sal_Int32 nParagraph)
 
Point GetDocPos (const Point &rPaperPos) const
 
bool IsTextPos (const Point &rPaperPos, sal_uInt16 nBorder)
 
void Draw (OutputDevice *pOutDev, const tools::Rectangle &rOutRect)
 
void Draw (OutputDevice *pOutDev, const tools::Rectangle &rOutRect, const Point &rStartDocPos)
 
void Draw (OutputDevice *pOutDev, const tools::Rectangle &rOutRect, const Point &rStartDocPos, bool bClip)
 
void Draw (OutputDevice *pOutDev, const Point &rStartPos, short nOrientation=0)
 
ErrCode Read (SvStream &rInput, const OUString &rBaseURL, EETextFormat, SvKeyValueIterator *pHTTPHeaderAttrs=nullptr)
 
void Write (SvStream &rOutput, EETextFormat)
 
void SetStatusEventHdl (const Link< EditStatus &, void > &rLink)
 
Link< EditStatus &, void > const & GetStatusEventHdl () const
 
void SetNotifyHdl (const Link< EENotify &, void > &rLink)
 
Link< EENotify &, void > const & GetNotifyHdl () const
 
void SetRtfImportHdl (const Link< RtfImportInfo &, void > &rLink)
 
const Link< RtfImportInfo &, void > & GetRtfImportHdl () const
 
void SetHtmlImportHdl (const Link< HtmlImportInfo &, void > &rLink)
 
const Link< HtmlImportInfo &, void > & GetHtmlImportHdl () const
 
bool IsFlatMode () const
 
void SetFlatMode (bool bFlat)
 
void SetControlWord (EEControlBits nWord)
 
EEControlBits GetControlWord () const
 
void QuickSetAttribs (const SfxItemSet &rSet, const ESelection &rSel)
 
void QuickMarkInvalid (const ESelection &rSel)
 
void QuickFormatDoc (bool bFull=false)
 
void QuickInsertField (const SvxFieldItem &rFld, const ESelection &rSel)
 
void QuickInsertLineBreak (const ESelection &rSel)
 
void QuickInsertText (const OUString &rText, const ESelection &rSel)
 
void QuickDelete (const ESelection &rSel)
 
void QuickMarkToBeRepainted (sal_Int32 nPara)
 
void SetGlobalCharStretching (sal_uInt16 nX, sal_uInt16 nY)
 
void GetGlobalCharStretching (sal_uInt16 &rX, sal_uInt16 &rY) const
 
void SetEditTextObjectPool (SfxItemPool *pPool)
 
SfxItemPoolGetEditTextObjectPool () const
 
void SetStyleSheetPool (SfxStyleSheetPool *pSPool)
 
SfxStyleSheetPoolGetStyleSheetPool ()
 
void SetStyleSheet (const EditSelection &aSel, SfxStyleSheet *pStyle)
 
void SetStyleSheet (sal_Int32 nPara, SfxStyleSheet *pStyle)
 
const SfxStyleSheetGetStyleSheet (sal_Int32 nPara) const
 
SfxStyleSheetGetStyleSheet (sal_Int32 nPara)
 
void SetWordDelimiters (const OUString &rDelimiters)
 
const OUString & GetWordDelimiters () const
 
void EraseVirtualDevice ()
 
void SetSpeller (css::uno::Reference< css::linguistic2::XSpellChecker1 > const &xSpeller)
 
css::uno::Reference< css::linguistic2::XSpellChecker1 > const & GetSpeller ()
 
void SetHyphenator (css::uno::Reference< css::linguistic2::XHyphenator > const &xHyph)
 
void GetAllMisspellRanges (std::vector< editeng::MisspellRanges > &rRanges) const
 
void SetAllMisspellRanges (const std::vector< editeng::MisspellRanges > &rRanges)
 
void SetDefaultLanguage (LanguageType eLang)
 
LanguageType GetDefaultLanguage () const
 
bool HasOnlineSpellErrors () const
 
void CompleteOnlineSpelling ()
 
bool ShouldCreateBigTextObject () const
 
EESpellState HasSpellErrors ()
 
void ClearSpellErrors ()
 
bool HasText (const SvxSearchItem &rSearchItem)
 
bool SpellSentence (EditView const &rEditView, svx::SpellPortions &rToFill)
 
void PutSpellingToSentenceStart (EditView const &rEditView)
 
void ApplyChangedSentence (EditView const &rEditView, const svx::SpellPortions &rNewPortions, bool bRecheck)
 
bool HasConvertibleTextPortion (LanguageType nLang)
 
virtual bool ConvertNextDocument ()
 
bool UpdateFields ()
 
bool UpdateFieldsOnly ()
 
void RemoveFields (const std::function< bool(const SvxFieldData *)> &isFieldData=[](const SvxFieldData *){return true;})
 
sal_uInt16 GetFieldCount (sal_Int32 nPara) const
 
EFieldInfo GetFieldInfo (sal_Int32 nPara, sal_uInt16 nField) const
 
bool IsRightToLeft (sal_Int32 nPara) const
 
css::uno::Reference< css::datatransfer::XTransferable > CreateTransferable (const ESelection &rSelection) const
 
void SetBeginMovingParagraphsHdl (const Link< MoveParagraphsInfo &, void > &rLink)
 
void SetEndMovingParagraphsHdl (const Link< MoveParagraphsInfo &, void > &rLink)
 
void SetBeginPasteOrDropHdl (const Link< PasteOrDropInfos &, void > &rLink)
 
void SetEndPasteOrDropHdl (const Link< PasteOrDropInfos &, void > &rLink)
 
virtual void PaintingFirstLine (sal_Int32 nPara, const Point &rStartPos, long nBaseLineY, const Point &rOrigin, short nOrientation, OutputDevice *pOutDev)
 
virtual void ParagraphInserted (sal_Int32 nNewParagraph)
 
virtual void ParagraphDeleted (sal_Int32 nDeletedParagraph)
 
virtual void ParagraphConnected (sal_Int32 nLeftParagraph, sal_Int32 nRightParagraph)
 
virtual void ParaAttribsChanged (sal_Int32 nParagraph)
 
virtual void StyleSheetChanged (SfxStyleSheet *pStyle)
 
void ParagraphHeightChanged (sal_Int32 nPara)
 
virtual void DrawingText (const Point &rStartPos, const OUString &rText, sal_Int32 nTextStart, sal_Int32 nTextLen, const long *pDXArray, const SvxFont &rFont, sal_Int32 nPara, sal_uInt8 nRightToLeft, const EEngineData::WrongSpellVector *pWrongSpellVector, const SvxFieldData *pFieldData, bool bEndOfLine, bool bEndOfParagraph, const css::lang::Locale *pLocale, const Color &rOverlineColor, const Color &rTextLineColor)
 
virtual void DrawingTab (const Point &rStartPos, long nWidth, const OUString &rChar, const SvxFont &rFont, sal_Int32 nPara, sal_uInt8 nRightToLeft, bool bEndOfLine, bool bEndOfParagraph, const Color &rOverlineColor, const Color &rTextLineColor)
 
virtual OUString GetUndoComment (sal_uInt16 nUndoId) const
 
virtual bool SpellNextDocument ()
 
virtual void FieldClicked (const SvxFieldItem &rField)
 
virtual OUString CalcFieldValue (const SvxFieldItem &rField, sal_Int32 nPara, sal_Int32 nPos, std::optional< Color > &rTxtColor, std::optional< Color > &rFldColor)
 
virtual const SvxNumberFormatGetNumberFormat (sal_Int32 nPara) const
 
virtual tools::Rectangle GetBulletArea (sal_Int32 nPara)
 
void SetBeginDropHdl (const Link< EditView *, void > &rLink)
 
Link< EditView *, void > const & GetBeginDropHdl () const
 
void SetEndDropHdl (const Link< EditView *, void > &rLink)
 
Link< EditView *, void > const & GetEndDropHdl () const
 
void SetFirstWordCapitalization (bool bCapitalize)
 
void SetReplaceLeadingSingleQuotationMark (bool bReplace)
 
EditDocGetEditDoc ()
 
const EditDocGetEditDoc () const
 
void dumpAsXmlEditDoc (xmlTextWriterPtr pWriter) const
 
ParaPortionListGetParaPortions ()
 
const ParaPortionListGetParaPortions () const
 
bool IsFormatted () const
 
bool IsHtmlImportHandlerSet () const
 
bool IsRtfImportHandlerSet () const
 
bool IsImportRTFStyleSheetsSet () const
 
void CallRtfImportHandler (RtfImportInfo &rInfo)
 
void CallHtmlImportHandler (HtmlImportInfo &rInfo)
 
void ParaAttribsToCharAttribs (ContentNode *pNode)
 
EditPaM CreateEditPaM (const EPaM &rEPaM)
 
EditPaM ConnectParagraphs (ContentNode *pLeft, ContentNode *pRight, bool bBackward)
 
EditPaM InsertField (const EditSelection &rEditSelection, const SvxFieldItem &rFld)
 
EditPaM InsertText (const EditSelection &aCurEditSelection, const OUString &rStr)
 
EditSelection InsertText (const EditTextObject &rTextObject, const EditSelection &rSel)
 
EditPaM InsertParaBreak (const EditSelection &rEditSelection)
 
EditPaM InsertLineBreak (const EditSelection &rEditSelection)
 
EditPaM CursorLeft (const EditPaM &rPaM, sal_uInt16 nCharacterIteratorMode=css::i18n::CharacterIteratorMode::SKIPCELL)
 
EditPaM CursorRight (const EditPaM &rPaM, sal_uInt16 nCharacterIteratorMode=css::i18n::CharacterIteratorMode::SKIPCELL)
 
void SeekCursor (ContentNode *pNode, sal_Int32 nPos, SvxFont &rFont)
 
EditPaM DeleteSelection (const EditSelection &rSel)
 
ESelection CreateESelection (const EditSelection &rSel)
 
EditSelection CreateSelection (const ESelection &rSel)
 
const SfxItemSetGetBaseParaAttribs (sal_Int32 nPara) const
 
void SetParaAttribsOnly (sal_Int32 nPara, const SfxItemSet &rSet)
 
void SetAttribs (const EditSelection &rSel, const SfxItemSet &rSet, SetAttribsMode nSpecial=SetAttribsMode::NONE)
 
OUString GetSelected (const EditSelection &rSel) const
 
EditPaM DeleteSelected (const EditSelection &rSel)
 
SvtScriptType GetScriptType (const EditSelection &rSel) const
 
void RemoveParaPortion (sal_Int32 nNode)
 
void SetCallParaInsertedOrDeleted (bool b)
 
bool IsCallParaInsertedOrDeleted () const
 
void AppendDeletedNodeInfo (DeletedNodeInfo *pInfo)
 
void UpdateSelections ()
 
void InsertContent (ContentNode *pNode, sal_Int32 nPos)
 
EditPaM SplitContent (sal_Int32 nNode, sal_Int32 nSepPos)
 
EditPaM ConnectContents (sal_Int32 nLeftNode, bool bBackward)
 
void InsertFeature (const EditSelection &rEditSelection, const SfxPoolItem &rItem)
 
EditSelection MoveParagraphs (const Range &rParagraphs, sal_Int32 nNewPos)
 
void RemoveCharAttribs (sal_Int32 nPara, sal_uInt16 nWhich=0, bool bRemoveFeatures=false)
 
void RemoveCharAttribs (const EditSelection &rSel, bool bRemoveParaAttribs, sal_uInt16 nWhich)
 
ViewsTypeGetEditViews ()
 
const ViewsTypeGetEditViews () const
 
void SetUndoMode (bool b)
 
void FormatAndUpdate (EditView *pCurView, bool bCalledFromUndo=false)
 
void Undo (EditView *pView)
 
void Redo (EditView *pView)
 
sal_Int32 GetOverflowingParaNum () const
 
sal_Int32 GetOverflowingLineNum () const
 
void ClearOverflowingParaNum ()
 
bool IsPageOverflow ()
 
void DisableAttributeExpanding ()
 
void SetLOKSpecialPaperSize (const Size &rSize)
 
const SizeGetLOKSpecialPaperSize () const
 

Protected Member Functions

bool FindNextConversionCell ()
 Implementation of cell iteration. More...
 
void RestoreCursorPos ()
 Restores the initial cursor position. More...
 
virtual bool NeedsConversion ()=0
 Derived classes return, if the current text needs conversion (i.e. More...
 
virtual bool ShowTableWrapDialog ()
 Derived classes may show a query box that asks whether to restart at top of the sheet. More...
 
virtual void ShowFinishDialog ()
 Derived classes may show a message box stating that the conversion is finished. More...
 
- Protected Member Functions inherited from ScEnginePoolHelper
 ScEnginePoolHelper (SfxItemPool *pEnginePool, bool bDeleteEnginePool)
 
 ScEnginePoolHelper (const ScEnginePoolHelper &rOrg)
 
virtual ~ScEnginePoolHelper ()
 

Protected Attributes

ScViewDatamrViewData
 
ScDocShellmrDocShell
 
ScDocumentmrDoc
 
- Protected Attributes inherited from ScEnginePoolHelper
SfxItemPoolpEnginePool
 
SfxItemSetpDefaults
 
bool bDeleteEnginePool
 
bool bDeleteDefaults
 

Private Member Functions

void FillFromCell (SCCOL nCol, SCROW nRow, SCTAB nTab)
 Fills the edit engine from a document cell. More...
 

Private Attributes

ScSelectionState maSelState
 
ScDocumentmpUndoDoc
 Selection data of the document. More...
 
ScDocumentmpRedoDoc
 Document stores all old cells for UNDO action. More...
 
LanguageType meCurrLang
 Document stores all new cells for REDO action. More...
 
SCCOL mnStartCol
 Current cell language. More...
 
SCROW mnStartRow
 Initial column index. More...
 
SCTAB mnStartTab
 Initial row index. More...
 
SCCOL mnCurrCol
 Initial sheet index. More...
 
SCROW mnCurrRow
 Current column index. More...
 
bool mbIsAnyModified
 Current row index. More...
 
bool mbInitialState
 true = At least one cell has been changed. More...
 
bool mbWrappedInTable
 true = Not searched for a cell yet. More...
 
bool mbFinished
 true = Already restarted at top of the sheet. More...
 

Additional Inherited Members

- Public Types inherited from EditEngine
typedef std::vector< EditView * > ViewsType
 
- Static Public Member Functions inherited from EditEngine
static void SetForbiddenCharsTable (const std::shared_ptr< SvxForbiddenCharactersTable > &xForbiddenChars)
 
static SfxItemPoolCreatePool ()
 
static SfxItemPoolGetGlobalItemPool ()
 
static bool DoesKeyChangeText (const KeyEvent &rKeyEvent)
 
static bool DoesKeyMoveCursor (const KeyEvent &rKeyEvent)
 
static bool IsSimpleCharInput (const KeyEvent &rKeyEvent)
 
static void SetFontInfoInItemSet (SfxItemSet &rItemSet, const vcl::Font &rFont)
 
static void SetFontInfoInItemSet (SfxItemSet &rItemSet, const SvxFont &rFont)
 
static vcl::Font CreateFontFromItemSet (const SfxItemSet &rItemSet, SvtScriptType nScriptType)
 
static SvxFont CreateSvxFontFromItemSet (const SfxItemSet &rItemSet)
 
static bool IsPrintable (sal_Unicode c)
 
static bool HasValidData (const css::uno::Reference< css::datatransfer::XTransferable > &rTransferable)
 
static void DumpData (const EditEngine *pEE, bool bInfoBox)
 

Detailed Description

Base class for special type of edit engines, i.e.

for spell checker and text conversion.

Definition at line 34 of file spelleng.hxx.

Constructor & Destructor Documentation

ScConversionEngineBase::ScConversionEngineBase ( SfxItemPool pEnginePool,
ScViewData rViewData,
ScDocument pUndoDoc,
ScDocument pRedoDoc 
)
explicit
ScConversionEngineBase::~ScConversionEngineBase ( )
overridevirtual

Definition at line 74 of file spelleng.cxx.

Member Function Documentation

virtual void ScConversionEngineBase::ConvertAll ( EditView rEditView)
pure virtual

Derived classes implement to convert all cells in the selection or sheet.

Implemented in ScTextConversionEngine, and ScSpellingEngine.

void ScConversionEngineBase::FillFromCell ( SCCOL  nCol,
SCROW  nRow,
SCTAB  nTab 
)
private
bool ScConversionEngineBase::FindNextConversionCell ( )
protected

Implementation of cell iteration.

Finds a cell that needs conversion.

Returns
true = Current cell needs conversion (i.e. spelling error found).

Definition at line 78 of file spelleng.cxx.

References ScTabView::AlignToCursor(), ATTR_FONT_LANGUAGE(), CELLTYPE_EDIT, CELLTYPE_NONE, EditEngine::ClearModifyFlag(), ScDocument::CopyCellToDocument(), EditEngine::CreateTextObject(), ScPatternAttr::FillEditItemSet(), FillFromCell(), ScDocument::GetAttr(), ScDocument::GetCellType(), ScSelectionState::GetEditSelection(), EditEngine::GetEditTextObjectPool(), EditEngine::GetEmptyItemSet(), AllSettings::GetLanguageTag(), LanguageTag::getLanguageType(), ScViewData::GetMarkData(), ScDocument::GetNextSpellingCell(), ScDocument::GetPattern(), ScMarkData::GetSelectCount(), ScSelectionState::GetSelectionType(), Application::GetSettings(), ScViewData::GetSpellingView(), ScDocument::GetString(), ScDocument::GetTableCount(), ScMarkData::GetTableSelect(), EditEngine::GetText(), ScViewData::GetView(), ScViewData::GetViewShell(), EditEngine::IsModified(), LANGUAGE_SYSTEM, ScTabView::MakeEditView(), maSelState, ScDocument::MaxCol(), ScDocument::MaxRow(), mbFinished, mbInitialState, mbIsAnyModified, mbWrappedInTable, meCurrLang, mnCurrCol, mnCurrRow, mnStartCol, mnStartRow, mnStartTab, mpRedoDoc, mpUndoDoc, mrDoc, mrDocShell, mrViewData, NeedsConversion(), ScDocShell::PostPaintCell(), SC_FOLLOW_JUMP, SC_SELECTTYPE_SHEET, ScTabView::SetCursor(), EditEngine::SetDefaultLanguage(), ScEditEngineDefaulter::SetDefaults(), ScDocument::SetEditText(), EditView::SetSelection(), ScDocument::SetString(), ShowFinishDialog(), and ShowTableWrapDialog().

Referenced by ScSpellingEngine::ConvertAll(), ScTextConversionEngine::ConvertAll(), ScTextConversionEngine::ConvertNextDocument(), and ScSpellingEngine::SpellNextDocument().

bool ScConversionEngineBase::IsAnyModified ( ) const
inline

Returns true, if at least one cell has been modified.

Definition at line 47 of file spelleng.hxx.

References mbIsAnyModified.

bool ScConversionEngineBase::IsFinished ( ) const
inline

Returns true, if the entire document/selection has been finished.

Definition at line 49 of file spelleng.hxx.

References mbFinished.

virtual bool ScConversionEngineBase::NeedsConversion ( )
protectedpure virtual

Derived classes return, if the current text needs conversion (i.e.

spelling error found).

Returns
true = Current edit text needs conversion.

Implemented in ScTextConversionEngine, and ScSpellingEngine.

Referenced by FindNextConversionCell().

void ScConversionEngineBase::RestoreCursorPos ( )
protected
void ScConversionEngineBase::ShowFinishDialog ( )
protectedvirtual

Derived classes may show a message box stating that the conversion is finished.

Default here is no dialog.

Reimplemented in ScSpellingEngine.

Definition at line 239 of file spelleng.cxx.

Referenced by FindNextConversionCell().

bool ScConversionEngineBase::ShowTableWrapDialog ( )
protectedvirtual

Derived classes may show a query box that asks whether to restart at top of the sheet.

Default here is no dialog and restart always.

Returns
true = Restart at top, false = Stop the conversion.

Reimplemented in ScSpellingEngine.

Definition at line 233 of file spelleng.cxx.

Referenced by FindNextConversionCell().

Member Data Documentation

ScSelectionState ScConversionEngineBase::maSelState
private

Definition at line 80 of file spelleng.hxx.

Referenced by FindNextConversionCell(), RestoreCursorPos(), and ScConversionEngineBase().

bool ScConversionEngineBase::mbFinished
private

true = Already restarted at top of the sheet.

Definition at line 92 of file spelleng.hxx.

Referenced by FindNextConversionCell(), and IsFinished().

bool ScConversionEngineBase::mbInitialState
private

true = At least one cell has been changed.

Definition at line 90 of file spelleng.hxx.

Referenced by FindNextConversionCell().

bool ScConversionEngineBase::mbIsAnyModified
private

Current row index.

Definition at line 89 of file spelleng.hxx.

Referenced by FindNextConversionCell(), and IsAnyModified().

bool ScConversionEngineBase::mbWrappedInTable
private

true = Not searched for a cell yet.

Definition at line 91 of file spelleng.hxx.

Referenced by FindNextConversionCell().

LanguageType ScConversionEngineBase::meCurrLang
private

Document stores all new cells for REDO action.

Definition at line 83 of file spelleng.hxx.

Referenced by FindNextConversionCell().

SCCOL ScConversionEngineBase::mnCurrCol
private

Initial sheet index.

Definition at line 87 of file spelleng.hxx.

Referenced by FindNextConversionCell(), and ScConversionEngineBase().

SCROW ScConversionEngineBase::mnCurrRow
private

Current column index.

Definition at line 88 of file spelleng.hxx.

Referenced by FindNextConversionCell(), and ScConversionEngineBase().

SCCOL ScConversionEngineBase::mnStartCol
private

Current cell language.

Definition at line 84 of file spelleng.hxx.

Referenced by FindNextConversionCell(), and ScConversionEngineBase().

SCROW ScConversionEngineBase::mnStartRow
private

Initial column index.

Definition at line 85 of file spelleng.hxx.

Referenced by FindNextConversionCell(), and ScConversionEngineBase().

SCTAB ScConversionEngineBase::mnStartTab
private

Initial row index.

Definition at line 86 of file spelleng.hxx.

Referenced by FindNextConversionCell(), and ScConversionEngineBase().

ScDocument* ScConversionEngineBase::mpRedoDoc
private

Document stores all old cells for UNDO action.

Definition at line 82 of file spelleng.hxx.

Referenced by FindNextConversionCell().

ScDocument* ScConversionEngineBase::mpUndoDoc
private

Selection data of the document.

Definition at line 81 of file spelleng.hxx.

Referenced by FindNextConversionCell().

ScDocument& ScConversionEngineBase::mrDoc
protected

Definition at line 77 of file spelleng.hxx.

Referenced by FillFromCell(), and FindNextConversionCell().

ScDocShell& ScConversionEngineBase::mrDocShell
protected

Definition at line 76 of file spelleng.hxx.

Referenced by FindNextConversionCell().

ScViewData& ScConversionEngineBase::mrViewData
protected

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