20#ifndef INCLUDED_EDITENG_UNOEDPRX_HXX
21#define INCLUDED_EDITENG_UNOEDPRX_HXX
23#include <config_options.h>
39 virtual sal_Int32
GetTextLen( sal_Int32 nParagraph )
const override;
45 virtual void GetPortions( sal_Int32 nPara, std::vector<sal_Int32>& rList )
const override;
49 virtual OUString
GetStyleSheet(sal_Int32 nPara)
const override;
50 virtual void SetStyleSheet(sal_Int32 nPara,
const OUString& rStyleName)
override;
62 virtual OUString
CalcFieldValue(
const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32
nPos, std::optional<Color>& rpTxtColor, std::optional<Color>& rpFldColor, std::optional<FontLineStyle>& rpFldLineStyle )
override;
65 virtual bool IsValid()
const override;
68 virtual sal_Int32
GetFieldCount( sal_Int32 nPara )
const override;
76 virtual bool GetWordIndices( sal_Int32 nPara, sal_Int32
nIndex, sal_Int32& nStart, sal_Int32& nEnd )
const override;
77 virtual bool GetAttributeRun( sal_Int32& nStartIndex, sal_Int32& nEndIndex, sal_Int32 nPara, sal_Int32
nIndex,
bool bInCell =
false )
const override;
78 virtual sal_Int32
GetLineCount( sal_Int32 nPara )
const override;
79 virtual sal_Int32
GetLineLen( sal_Int32 nPara, sal_Int32 nLine )
const override;
80 virtual void GetLineBoundaries( sal_Int32 &rStart, sal_Int32 &rEnd, sal_Int32 nParagraph, sal_Int32 nLine )
const override;
86 virtual sal_Int16
GetDepth( sal_Int32 nPara )
const override;
87 virtual bool SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth )
override;
123 virtual bool IsValid()
const override;
130 virtual bool Copy()
override;
131 virtual bool Cut()
override;
132 virtual bool Paste()
override;
141class UNLESS_MERGELIBS(EDITENG_DLLPUBLIC) SvxEditSourceAdapter final :
public SvxEditSource
144 SvxEditSourceAdapter();
145 virtual ~SvxEditSourceAdapter()
override;
147 virtual std::unique_ptr<SvxEditSource>
Clone()
const override;
156 void SetEditSource( ::std::unique_ptr< SvxEditSource > && pAdaptee );
158 bool IsValid()
const {
return mbEditSourceValid;}
161 SvxEditSourceAdapter(
const SvxEditSourceAdapter& ) =
delete;
162 SvxEditSourceAdapter&
operator= (
const SvxEditSourceAdapter& ) =
delete;
164 ::std::unique_ptr< SvxEditSource > mpAdaptee;
171 bool mbEditSourceValid;
virtual void QuickSetAttribs(const SfxItemSet &rSet, const ESelection &rSel) override
virtual bool QuickFormatDoc(bool bFull=false) override
Updates the formatting.
virtual OUString CalcFieldValue(const SvxFieldItem &rField, sal_Int32 nPara, sal_Int32 nPos, std::optional< Color > &rpTxtColor, std::optional< Color > &rpFldColor, std::optional< FontLineStyle > &rpFldLineStyle) override
virtual LanguageType GetLanguage(sal_Int32, sal_Int32) const override
Query language of character at given position on the underlying edit engine.
virtual SfxItemSet GetParaAttribs(sal_Int32 nPara) const override
virtual bool Delete(const ESelection &) override
Delete given text range and reformat text.
virtual sal_Int32 GetTextLen(sal_Int32 nParagraph) const override
virtual void RemoveAttribs(const ESelection &rSelection) override
virtual void GetPortions(sal_Int32 nPara, std::vector< sal_Int32 > &rList) const override
virtual sal_Int32 GetFieldCount(sal_Int32 nPara) const override
Query number of fields in the underlying edit engine.
virtual OUString GetText(const ESelection &rSel) const override
virtual EBulletInfo GetBulletInfo(sal_Int32 nPara) const override
Query information regarding bullets for given paragraph on the underlying edit engine.
virtual MapMode GetMapMode() const override
Query the map mode of the underlying EditEngine/Outliner.
virtual SfxItemSet GetAttribs(const ESelection &rSel, EditEngineAttribs nOnlyHardAttrib=EditEngineAttribs::All) const override
virtual void GetLineBoundaries(sal_Int32 &rStart, sal_Int32 &rEnd, sal_Int32 nParagraph, sal_Int32 nLine) const override
Query bounds of line in paragraph.
virtual void SetParaAttribs(sal_Int32 nPara, const SfxItemSet &rSet) override
bool HaveTextBullet(sal_Int32 nPara) const
virtual void QuickInsertLineBreak(const ESelection &rSel) override
bool IsEditable(const ESelection &rSelection) const
Query whether all text in given selection is editable.
sal_Int32 CalcEditEngineIndex(sal_Int32 nPara, sal_Int32 nLogicalIndex)
virtual bool GetWordIndices(sal_Int32 nPara, sal_Int32 nIndex, sal_Int32 &nStart, sal_Int32 &nEnd) const override
Get the start and the end index of the word at the given index.
virtual void SetStyleSheet(sal_Int32 nPara, const OUString &rStyleName) override
virtual bool GetIndexAtPoint(const Point &, sal_Int32 &nPara, sal_Int32 &nIndex) const override
Query paragraph and character index of the character at the given point.
virtual bool InsertText(const OUString &, const ESelection &) override
Insert/Replace given text in given range and reformat text.
SvxTextForwarder * mpTextForwarder
virtual bool GetAttributeRun(sal_Int32 &nStartIndex, sal_Int32 &nEndIndex, sal_Int32 nPara, sal_Int32 nIndex, bool bInCell=false) const override
Query range of similar attributes.
virtual bool IsValid() const override
Query state of forwarder.
virtual void FieldClicked(const SvxFieldItem &rField) override
virtual SfxItemState GetItemState(const ESelection &rSel, sal_uInt16 nWhich) const override
virtual void AppendParagraph() override
virtual bool SetDepth(sal_Int32 nPara, sal_Int16 nNewDepth) override
Set the outline depth of given paragraph.
virtual EFieldInfo GetFieldInfo(sal_Int32 nPara, sal_uInt16 nField) const override
Query information for given field number in the underlying edit engine.
virtual sal_Int32 GetLineCount(sal_Int32 nPara) const override
Query number of lines in the formatted paragraph.
virtual tools::Rectangle GetCharBounds(sal_Int32 nPara, sal_Int32 nIndex) const override
Query the bounding rectangle of the given character.
virtual sal_Int32 AppendTextPortion(sal_Int32 nPara, const OUString &rText, const SfxItemSet &rSet) override
virtual sal_Int32 GetLineNumberAtIndex(sal_Int32 nPara, sal_Int32 nIndex) const override
Query the line number for an index in the paragraphs text.
virtual SfxItemPool * GetPool() const override
virtual sal_Int16 GetDepth(sal_Int32 nPara) const override
Get the outline depth of given paragraph.
virtual void CopyText(const SvxTextForwarder &rSource) override
virtual tools::Rectangle GetParaBounds(sal_Int32 nPara) const override
Query the bounding rectangle of the given paragraph.
virtual OutputDevice * GetRefDevice() const override
Query the reference output device of the underlying EditEngine/Outliner.
virtual OUString GetStyleSheet(sal_Int32 nPara) const override
virtual sal_Int32 GetParagraphCount() const override
SvxAccessibleTextAdapter()
virtual const SfxItemSet * GetEmptyItemSetPtr() override
virtual ~SvxAccessibleTextAdapter() override
bool HaveImageBullet(sal_Int32 nPara) const
void SetForwarder(SvxTextForwarder &)
virtual sal_Int32 GetLineLen(sal_Int32 nPara, sal_Int32 nLine) const override
Query line length.
virtual void QuickInsertText(const OUString &rText, const ESelection &rSel) override
virtual void QuickInsertField(const SvxFieldItem &rFld, const ESelection &rSel) override
virtual Point PixelToLogic(const Point &rPoint, const MapMode &rMapMode) const override
Convert from screen to logical, EditEngine-relative coordinates.
void SetForwarder(SvxEditViewForwarder &, SvxAccessibleTextAdapter &)
SvxEditViewForwarder * mpViewForwarder
virtual ~SvxAccessibleTextEditViewAdapter() override
virtual bool IsValid() const override
Query state of forwarder.
virtual bool Cut() override
Cut current selection to clipboard.
virtual Point LogicToPixel(const Point &rPoint, const MapMode &rMapMode) const override
Convert from logical, EditEngine-relative coordinates to screen coordinates.
virtual bool Paste() override
Paste clipboard into current selection.
virtual bool SetSelection(const ESelection &rSelection) override
Set selection in view.
SvxAccessibleTextAdapter * mpTextForwarder
SvxAccessibleTextEditViewAdapter()
virtual bool GetSelection(ESelection &rSelection) const override
Query current selection.
virtual bool Copy() override
Copy current selection to clipboard.
Wrapper class for unified EditEngine/Outliner access.
virtual SvxTextForwarder * GetTextForwarder()=0
Query the text forwarder.
virtual void UpdateData()=0
Write back data to model.
virtual std::unique_ptr< SvxEditSource > Clone() const =0
Returns a new reference to the same object. This is a shallow copy.
virtual SvxEditViewForwarder * GetEditViewForwarder(bool bCreate=false)
Query the edit view forwarder.
SvxEditSource & operator=(SvxEditSource const &)=default
virtual SvxViewForwarder * GetViewForwarder()
Query the view forwarder.
virtual SfxBroadcaster & GetBroadcaster() const
Returns broadcaster the underlying edit engine's events are sent from.
Encapsulates EditView and OutlinerView for the purpose of unified EditEngine/Outliner access.
This item stores a field (SvxFieldData).
Contains an EditEngine or an Outliner and unifies access to them.
Encapsulates the document view for the purpose of unified EditEngine/Outliner access.
EditEngineAttribs
values for: SfxItemSet GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEn...