20#ifndef INCLUDED_EDITENG_UNOTEXT_HXX
21#define INCLUDED_EDITENG_UNOTEXT_HXX
24#include <com/sun/star/text/XTextRange.hpp>
25#include <com/sun/star/text/XTextContent.hpp>
26#include <com/sun/star/container/XEnumerationAccess.hpp>
27#include <com/sun/star/text/XTextRangeMover.hpp>
28#include <com/sun/star/text/XTextCursor.hpp>
29#include <com/sun/star/lang/XTypeProvider.hpp>
30#include <com/sun/star/lang/XServiceInfo.hpp>
31#include <com/sun/star/beans/XPropertySet.hpp>
32#include <com/sun/star/beans/XPropertyState.hpp>
33#include <com/sun/star/beans/XMultiPropertySet.hpp>
34#include <com/sun/star/text/XTextRangeCompare.hpp>
35#include <com/sun/star/beans/XMultiPropertyStates.hpp>
36#include <com/sun/star/text/XTextAppend.hpp>
37#include <com/sun/star/text/XTextCopy.hpp>
38#include <com/sun/star/container/XIndexReplace.hpp>
39#include <com/sun/star/awt/FontSlant.hpp>
40#include <com/sun/star/awt/FontDescriptor.hpp>
41#include <com/sun/star/style/LineSpacing.hpp>
42#include <com/sun/star/style/TabStop.hpp>
43#include <com/sun/star/lang/XUnoTunnel.hpp>
44#include <com/sun/star/util/XComplexColor.hpp>
48#include <osl/diagnose.hxx>
53#include <svl/solar.hrc>
63#define WID_FONTDESC OWN_ATTR_VALUE_START
64#define WID_PORTIONTYPE OWN_ATTR_VALUE_START+2
65#define WID_NUMBERINGSTARTVALUE OWN_ATTR_VALUE_START+3
66#define WID_PARAISNUMBERINGRESTART OWN_ATTR_VALUE_START+4
67#define WID_PARASTYLENAME OWN_ATTR_VALUE_START+5
69#define SVX_UNOEDIT_NUMBERING_PROPERTY \
70 { UNO_NAME_NUMBERING_RULES, EE_PARA_NUMBULLET, cppu::UnoType<css::container::XIndexReplace>::get(), 0, 0 }, \
71 { UNO_NAME_NUMBERING, EE_PARA_BULLETSTATE,cppu::UnoType<bool>::get(), 0, 0 }
73#define SVX_UNOEDIT_OUTLINER_PROPERTIES \
74 SVX_UNOEDIT_NUMBERING_PROPERTY, \
75 { UNO_NAME_NUMBERING_LEVEL, EE_PARA_OUTLLEVEL, ::cppu::UnoType<sal_Int16>::get(), 0, 0 }, \
76 {u"NumberingStartValue", WID_NUMBERINGSTARTVALUE, ::cppu::UnoType<sal_Int16>::get(), 0, 0 }, \
77 {u"ParaIsNumberingRestart", WID_PARAISNUMBERINGRESTART, cppu::UnoType<bool>::get(), 0, 0 }
79#define SVX_UNOEDIT_CHAR_PROPERTIES \
80 { UNO_NAME_EDIT_CHAR_HEIGHT, EE_CHAR_FONTHEIGHT, cppu::UnoType<float>::get(), 0, MID_FONTHEIGHT|CONVERT_TWIPS }, \
81 { u"CharScaleWidth", EE_CHAR_FONTWIDTH, ::cppu::UnoType<sal_Int16>::get(), 0, 0 }, \
82 { UNO_NAME_EDIT_CHAR_FONTNAME, EE_CHAR_FONTINFO, ::cppu::UnoType<OUString>::get(), 0, MID_FONT_FAMILY_NAME },\
83 { UNO_NAME_EDIT_CHAR_FONTSTYLENAME,EE_CHAR_FONTINFO, ::cppu::UnoType<OUString>::get(), 0, MID_FONT_STYLE_NAME }, \
84 { UNO_NAME_EDIT_CHAR_FONTFAMILY, EE_CHAR_FONTINFO, ::cppu::UnoType<sal_Int16>::get(), 0, MID_FONT_FAMILY }, \
85 { UNO_NAME_EDIT_CHAR_FONTCHARSET, EE_CHAR_FONTINFO, ::cppu::UnoType<sal_Int16>::get(), 0, MID_FONT_CHAR_SET }, \
86 { UNO_NAME_EDIT_CHAR_FONTPITCH, EE_CHAR_FONTINFO, ::cppu::UnoType<sal_Int16>::get(), 0, MID_FONT_PITCH }, \
87 { UNO_NAME_EDIT_CHAR_POSTURE, EE_CHAR_ITALIC, ::cppu::UnoType<css::awt::FontSlant>::get(),0, MID_POSTURE }, \
88 { UNO_NAME_EDIT_CHAR_WEIGHT, EE_CHAR_WEIGHT, cppu::UnoType<float>::get(), 0, MID_WEIGHT }, \
89 { UNO_NAME_EDIT_CHAR_LOCALE, EE_CHAR_LANGUAGE, ::cppu::UnoType<css::lang::Locale>::get(),0, MID_LANG_LOCALE }, \
90 { UNO_NAME_EDIT_CHAR_COLOR, EE_CHAR_COLOR, ::cppu::UnoType<sal_Int32>::get(), 0, MID_COLOR_RGB }, \
91 { UNO_NAME_EDIT_CHAR_TRANSPARENCE,EE_CHAR_COLOR, ::cppu::UnoType<sal_Int16>::get(), 0, MID_COLOR_ALPHA }, \
92 { UNO_NAME_EDIT_CHAR_COLOR_THEME, EE_CHAR_COLOR, ::cppu::UnoType<sal_Int16>::get(), 0, MID_COLOR_THEME_INDEX }, \
93 { UNO_NAME_EDIT_CHAR_COLOR_TINT_OR_SHADE, EE_CHAR_COLOR, ::cppu::UnoType<sal_Int16>::get(), 0, MID_COLOR_TINT_OR_SHADE }, \
94 { UNO_NAME_EDIT_CHAR_COLOR_LUM_MOD, EE_CHAR_COLOR, ::cppu::UnoType<sal_Int16>::get(), 0, MID_COLOR_LUM_MOD }, \
95 { UNO_NAME_EDIT_CHAR_COLOR_LUM_OFF, EE_CHAR_COLOR, ::cppu::UnoType<sal_Int16>::get(), 0, MID_COLOR_LUM_OFF }, \
96 { UNO_NAME_EDIT_CHAR_COMPLEX_COLOR, EE_CHAR_COLOR, ::cppu::UnoType<css::util::XComplexColor>::get(), 0, MID_COMPLEX_COLOR }, \
97 { UNO_NAME_EDIT_CHAR_BACKGROUND_COLOR, EE_CHAR_BKGCOLOR, ::cppu::UnoType<sal_Int32>::get(), 0, MID_COLOR_RGB }, \
98 { UNO_NAME_EDIT_CHAR_BACKGROUND_COMPLEX_COLOR, EE_CHAR_BKGCOLOR, ::cppu::UnoType<css::util::XComplexColor>::get(), 0, MID_COMPLEX_COLOR }, \
99 { UNO_NAME_EDIT_CHAR_BACKGROUND_TRANSPARENT, EE_CHAR_BKGCOLOR, ::cppu::UnoType<bool>::get(), 0, MID_GRAPHIC_TRANSPARENT }, \
100 { UNO_NAME_EDIT_CHAR_ESCAPEMENT, EE_CHAR_ESCAPEMENT, ::cppu::UnoType<sal_Int16>::get(), 0, MID_ESC }, \
101 { UNO_NAME_EDIT_CHAR_UNDERLINE, EE_CHAR_UNDERLINE, ::cppu::UnoType<sal_Int16>::get(), 0, MID_TL_STYLE }, \
102 { u"CharUnderlineColor", EE_CHAR_UNDERLINE, ::cppu::UnoType<sal_Int32>::get(), 0, MID_TL_COLOR }, \
103 { u"CharUnderlineHasColor", EE_CHAR_UNDERLINE, cppu::UnoType<bool>::get(), 0, MID_TL_HASCOLOR } , \
104 { UNO_NAME_EDIT_CHAR_OVERLINE, EE_CHAR_OVERLINE, ::cppu::UnoType<sal_Int16>::get(), 0, MID_TL_STYLE }, \
105 { u"CharOverlineColor", EE_CHAR_OVERLINE, ::cppu::UnoType<sal_Int32>::get(), 0, MID_TL_COLOR }, \
106 { u"CharOverlineHasColor", EE_CHAR_OVERLINE, cppu::UnoType<bool>::get(), 0, MID_TL_HASCOLOR } , \
107 { UNO_NAME_EDIT_CHAR_CROSSEDOUT, EE_CHAR_STRIKEOUT, cppu::UnoType<bool>::get(), 0, MID_CROSSED_OUT }, \
108 { UNO_NAME_EDIT_CHAR_STRIKEOUT, EE_CHAR_STRIKEOUT, ::cppu::UnoType<sal_Int16>::get(), 0, MID_CROSS_OUT}, \
109 { UNO_NAME_EDIT_CHAR_CASEMAP, EE_CHAR_CASEMAP, ::cppu::UnoType<sal_Int16>::get(), 0, 0 }, \
110 { UNO_NAME_EDIT_CHAR_SHADOWED, EE_CHAR_SHADOW, cppu::UnoType<bool>::get(), 0, 0 }, \
111 { u"CharContoured", EE_CHAR_OUTLINE, cppu::UnoType<bool>::get(), 0, 0 }, \
112 { u"CharEscapementHeight", EE_CHAR_ESCAPEMENT, cppu::UnoType<sal_Int8>::get(), 0, MID_ESC_HEIGHT },\
113 { u"CharAutoKerning", EE_CHAR_PAIRKERNING,cppu::UnoType<bool>::get(), 0, 0 } , \
114 { u"CharKerning", EE_CHAR_KERNING, ::cppu::UnoType<sal_Int16>::get() , 0, 0 }, \
115 { u"CharWordMode", EE_CHAR_WLM, cppu::UnoType<bool>::get(), 0, 0 }, \
116 { u"CharEmphasis", EE_CHAR_EMPHASISMARK, ::cppu::UnoType<sal_Int16>::get(), 0, MID_EMPHASIS},\
117 { UNO_NAME_EDIT_CHAR_HEIGHT_ASIAN, EE_CHAR_FONTHEIGHT_CJK, cppu::UnoType<float>::get(), 0, MID_FONTHEIGHT|CONVERT_TWIPS }, \
118 { UNO_NAME_EDIT_CHAR_FONTNAME_ASIAN, EE_CHAR_FONTINFO_CJK, ::cppu::UnoType<OUString>::get(), 0, MID_FONT_FAMILY_NAME },\
119 { UNO_NAME_EDIT_CHAR_FONTSTYLENAME_ASIAN, EE_CHAR_FONTINFO_CJK, ::cppu::UnoType<OUString>::get(), 0, MID_FONT_STYLE_NAME }, \
120 { UNO_NAME_EDIT_CHAR_FONTFAMILY_ASIAN, EE_CHAR_FONTINFO_CJK, ::cppu::UnoType<sal_Int16>::get(), 0, MID_FONT_FAMILY }, \
121 { UNO_NAME_EDIT_CHAR_FONTCHARSET_ASIAN, EE_CHAR_FONTINFO_CJK, ::cppu::UnoType<sal_Int16>::get(), 0, MID_FONT_CHAR_SET }, \
122 { UNO_NAME_EDIT_CHAR_FONTPITCH_ASIAN, EE_CHAR_FONTINFO_CJK, ::cppu::UnoType<sal_Int16>::get(), 0, MID_FONT_PITCH }, \
123 { UNO_NAME_EDIT_CHAR_POSTURE_ASIAN, EE_CHAR_ITALIC_CJK, ::cppu::UnoType<css::awt::FontSlant>::get(),0, MID_POSTURE }, \
124 { UNO_NAME_EDIT_CHAR_WEIGHT_ASIAN, EE_CHAR_WEIGHT_CJK, cppu::UnoType<float>::get(), 0, MID_WEIGHT }, \
125 { UNO_NAME_EDIT_CHAR_LOCALE_ASIAN, EE_CHAR_LANGUAGE_CJK, ::cppu::UnoType<css::lang::Locale>::get(),0, MID_LANG_LOCALE }, \
126 { UNO_NAME_EDIT_CHAR_HEIGHT_COMPLEX, EE_CHAR_FONTHEIGHT_CTL, cppu::UnoType<float>::get(), 0, MID_FONTHEIGHT|CONVERT_TWIPS }, \
127 { UNO_NAME_EDIT_CHAR_FONTNAME_COMPLEX, EE_CHAR_FONTINFO_CTL, ::cppu::UnoType<OUString>::get(), 0, MID_FONT_FAMILY_NAME },\
128 { UNO_NAME_EDIT_CHAR_FONTSTYLENAME_COMPLEX,EE_CHAR_FONTINFO_CTL, ::cppu::UnoType<OUString>::get(), 0, MID_FONT_STYLE_NAME }, \
129 { UNO_NAME_EDIT_CHAR_FONTFAMILY_COMPLEX, EE_CHAR_FONTINFO_CTL, ::cppu::UnoType<sal_Int16>::get(), 0, MID_FONT_FAMILY }, \
130 { UNO_NAME_EDIT_CHAR_FONTCHARSET_COMPLEX, EE_CHAR_FONTINFO_CTL, ::cppu::UnoType<sal_Int16>::get(), 0, MID_FONT_CHAR_SET }, \
131 { UNO_NAME_EDIT_CHAR_FONTPITCH_COMPLEX, EE_CHAR_FONTINFO_CTL, ::cppu::UnoType<sal_Int16>::get(), 0, MID_FONT_PITCH }, \
132 { UNO_NAME_EDIT_CHAR_POSTURE_COMPLEX, EE_CHAR_ITALIC_CTL, ::cppu::UnoType<css::awt::FontSlant>::get(),0, MID_POSTURE }, \
133 { UNO_NAME_EDIT_CHAR_WEIGHT_COMPLEX, EE_CHAR_WEIGHT_CTL, cppu::UnoType<float>::get(), 0, MID_WEIGHT }, \
134 { UNO_NAME_EDIT_CHAR_LOCALE_COMPLEX, EE_CHAR_LANGUAGE_CTL, ::cppu::UnoType<css::lang::Locale>::get(),0, MID_LANG_LOCALE }, \
135 { u"CharRelief", EE_CHAR_RELIEF, ::cppu::UnoType<sal_Int16>::get(), 0, MID_RELIEF }, \
136 { u"CharInteropGrabBag", EE_CHAR_GRABBAG, cppu::UnoType<css::uno::Sequence<css::beans::PropertyValue >>::get(), 0, 0}
139#define SVX_UNOEDIT_FONT_PROPERTIES \
140 { UNO_NAME_EDIT_FONT_DESCRIPTOR, WID_FONTDESC, cppu::UnoType<css::awt::FontDescriptor>::get(), 0, MID_FONT_FAMILY_NAME }
142#define SVX_UNOEDIT_PARA_PROPERTIES \
143 { UNO_NAME_EDIT_PARA_ADJUST, EE_PARA_JUST, ::cppu::UnoType<sal_Int16>::get(), 0, MID_PARA_ADJUST }, \
144 { UNO_NAME_EDIT_PARA_BMARGIN, EE_PARA_ULSPACE, ::cppu::UnoType<sal_Int32>::get(), 0, MID_LO_MARGIN, PropertyMoreFlags::METRIC_ITEM }, \
145 { UNO_NAME_EDIT_PARA_IS_HYPHEN, EE_PARA_HYPHENATE, ::cppu::UnoType<bool>::get(), 0, 0 }, \
146 {u"ParaHyphenationNoCaps", EE_PARA_HYPHENATE_NO_CAPS, ::cppu::UnoType<bool>::get(), 0, 0 }, \
147 {u"ParaHyphenationNoLastWord", EE_PARA_HYPHENATE_NO_LAST_WORD, ::cppu::UnoType<bool>::get(), 0, 0 }, \
148 { UNO_NAME_EDIT_PARA_LASTLINEADJ, EE_PARA_JUST, ::cppu::UnoType<sal_Int16>::get(), 0, MID_LAST_LINE_ADJUST }, \
149 { UNO_NAME_EDIT_PARA_LMARGIN, EE_PARA_LRSPACE, ::cppu::UnoType<sal_Int32>::get(), 0, MID_TXT_LMARGIN, PropertyMoreFlags::METRIC_ITEM }, \
150 { UNO_NAME_EDIT_PARA_LINESPACING, EE_PARA_SBL, cppu::UnoType<css::style::LineSpacing>::get(), 0, CONVERT_TWIPS}, \
151 { UNO_NAME_EDIT_PARA_RMARGIN, EE_PARA_LRSPACE, ::cppu::UnoType<sal_Int32>::get(), 0, MID_R_MARGIN, PropertyMoreFlags::METRIC_ITEM }, \
152 { UNO_NAME_EDIT_PARA_TABSTOPS, EE_PARA_TABS, cppu::UnoType<css::uno::Sequence< css::style::TabStop >>::get(), 0, 0 }, \
153 { UNO_NAME_EDIT_PARA_TABSTOP_DEFAULT_DISTANCE, EE_PARA_TABS, ::cppu::UnoType<sal_Int32>::get(), 0, MID_TABSTOP_DEFAULT_DISTANCE }, \
154 { UNO_NAME_EDIT_PARA_TMARGIN, EE_PARA_ULSPACE, ::cppu::UnoType<sal_Int32>::get(), 0, MID_UP_MARGIN, PropertyMoreFlags::METRIC_ITEM },\
155 { UNO_NAME_EDIT_PARA_FIRST_LINE_INDENT, EE_PARA_LRSPACE, ::cppu::UnoType<sal_Int32>::get(), 0, MID_FIRST_LINE_INDENT, PropertyMoreFlags::METRIC_ITEM}, \
156 { UNO_NAME_EDIT_PARA_IS_HANGING_PUNCTUATION,EE_PARA_HANGINGPUNCTUATION, cppu::UnoType<bool>::get(), 0 ,0 }, \
157 { UNO_NAME_EDIT_PARA_IS_CHARACTER_DISTANCE, EE_PARA_ASIANCJKSPACING, cppu::UnoType<bool>::get(), 0 ,0 }, \
158 { UNO_NAME_EDIT_PARA_IS_FORBIDDEN_RULES, EE_PARA_FORBIDDENRULES, cppu::UnoType<bool>::get(), 0 ,0 },\
159 {u"WritingMode", EE_PARA_WRITINGDIR, ::cppu::UnoType<sal_Int16>::get(), 0, 0 }
178 virtual std::unique_ptr<SvxEditSource>
Clone()
const override;
184 virtual sal_Int32
GetTextLen( sal_Int32 nParagraph )
const override;
190 virtual void GetPortions( sal_Int32 nPara, std::vector<sal_Int32>& rList )
const override;
192 virtual OUString
GetStyleSheet(sal_Int32 nPara)
const override;
193 virtual void SetStyleSheet(sal_Int32 nPara,
const OUString& rStyleName)
override;
205 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;
208 virtual bool IsValid()
const override;
211 virtual sal_Int32
GetFieldCount( sal_Int32 nPara )
const override;
219 virtual bool GetWordIndices( sal_Int32 nPara, sal_Int32
nIndex, sal_Int32& nStart, sal_Int32& nEnd )
const override;
220 virtual bool GetAttributeRun( sal_Int32& nStartIndex, sal_Int32& nEndIndex, sal_Int32 nPara, sal_Int32
nIndex,
bool bInCell =
false )
const override;
221 virtual sal_Int32
GetLineCount( sal_Int32 nPara )
const override;
222 virtual sal_Int32
GetLineLen( sal_Int32 nPara, sal_Int32 nLine )
const override;
223 virtual void GetLineBoundaries( sal_Int32 &rStart, sal_Int32 &rEnd, sal_Int32 nParagraph, sal_Int32 nLine )
const override;
228 virtual sal_Int16
GetDepth( sal_Int32 nPara )
const override;
229 virtual bool SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth )
override;
242 class AccessibleEditableTextPara;
247 public css::text::XTextRange,
248 public css::beans::XPropertySet,
249 public css::beans::XMultiPropertySet,
250 public css::beans::XMultiPropertyStates,
251 public css::beans::XPropertyState,
252 public css::lang::XServiceInfo,
253 public css::text::XTextRangeCompare,
254 public css::lang::XUnoTunnel,
255 private osl::DebugBase<SvxUnoTextRangeBase>
259 friend class ::accessibility::AccessibleEditableTextPara;
271 void _setPropertyValue(
const OUString& aPropertyName,
const css::uno::Any& aValue, sal_Int32 nPara = -1 );
275 css::uno::Any _getPropertyValue(
const OUString& PropertyName, sal_Int32 nPara = -1 );
281 void _setPropertyValues(
const css::uno::Sequence< OUString >& aPropertyNames,
const css::uno::Sequence< css::uno::Any >& aValues, sal_Int32 nPara = -1 );
283 css::uno::Sequence< css::uno::Any > _getPropertyValues(
const css::uno::Sequence< OUString >& aPropertyNames, sal_Int32 nPara = -1 );
290 css::beans::PropertyState _getPropertyState( std::u16string_view PropertyName, sal_Int32 nPara = -1 );
293 css::uno::Sequence< css::beans::PropertyState > _getPropertyStates(
const css::uno::Sequence< OUString >& aPropertyName, sal_Int32 nPara = -1 );
299 void _setPropertyToDefault(
const OUString& PropertyName, sal_Int32 nPara = -1 );
314 SvxUnoTextRangeBase(
const SvxUnoTextRangeBase& rRange);
315 virtual ~SvxUnoTextRangeBase() noexcept;
322 CheckSelection(
const_cast<SvxUnoTextRangeBase*
>(
this)->maSelection, pForwarder);
325 void SetSelection(
const ESelection& rSelection )
noexcept;
327 void CollapseToStart() noexcept;
328 void CollapseToEnd() noexcept;
329 bool IsCollapsed() noexcept;
330 bool GoLeft(sal_Int32 nCount,
bool Expand) noexcept;
331 bool GoRight(sal_Int32 nCount,
bool Expand) noexcept;
332 void GotoStart(
bool Expand) noexcept;
333 void GotoEnd(
bool Expand) noexcept;
343 void attachField( std::unique_ptr<SvxFieldData> pData )
noexcept;
348 virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getStart()
override;
349 virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getEnd()
override;
350 virtual OUString SAL_CALL
getString()
override;
351 virtual void SAL_CALL setString(
const OUString& aString )
override;
354 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo()
override;
355 virtual void SAL_CALL
setPropertyValue(
const OUString& aPropertyName,
const css::uno::Any& aValue )
override;
356 virtual css::uno::Any SAL_CALL
getPropertyValue(
const OUString& PropertyName )
override;
357 virtual void SAL_CALL addPropertyChangeListener(
const OUString& aPropertyName,
const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener )
override;
358 virtual void SAL_CALL removePropertyChangeListener(
const OUString& aPropertyName,
const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener )
override;
359 virtual void SAL_CALL addVetoableChangeListener(
const OUString& PropertyName,
const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener )
override;
360 virtual void SAL_CALL removeVetoableChangeListener(
const OUString& PropertyName,
const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener )
override;
363 virtual void SAL_CALL setPropertyValues(
const css::uno::Sequence< OUString >& aPropertyNames,
const css::uno::Sequence< css::uno::Any >& aValues )
override;
364 virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues(
const css::uno::Sequence< OUString >& aPropertyNames )
override;
365 virtual void SAL_CALL addPropertiesChangeListener(
const css::uno::Sequence< OUString >& aPropertyNames,
const css::uno::Reference< css::beans::XPropertiesChangeListener >& xListener )
override;
366 virtual void SAL_CALL removePropertiesChangeListener(
const css::uno::Reference< css::beans::XPropertiesChangeListener >& xListener )
override;
367 virtual void SAL_CALL firePropertiesChangeEvent(
const css::uno::Sequence< OUString >& aPropertyNames,
const css::uno::Reference< css::beans::XPropertiesChangeListener >& xListener )
override;
370 virtual css::beans::PropertyState SAL_CALL getPropertyState(
const OUString& PropertyName )
override;
371 virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates(
const css::uno::Sequence< OUString >& aPropertyName )
override;
372 virtual void SAL_CALL setPropertyToDefault(
const OUString& PropertyName )
override;
373 virtual css::uno::Any SAL_CALL getPropertyDefault(
const OUString& aPropertyName )
override;
377 virtual void SAL_CALL setAllPropertiesToDefault()
override;
378 virtual void SAL_CALL setPropertiesToDefault(
const css::uno::Sequence< OUString >& aPropertyNames )
override;
379 virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyDefaults(
const css::uno::Sequence< OUString >& aPropertyNames )
override;
382 virtual ::sal_Int16 SAL_CALL compareRegionStarts(
const css::uno::Reference< css::text::XTextRange >& xR1,
const css::uno::Reference< css::text::XTextRange >& xR2 )
override;
383 virtual ::sal_Int16 SAL_CALL compareRegionEnds(
const css::uno::Reference< css::text::XTextRange >& xR1,
const css::uno::Reference< css::text::XTextRange >& xR2 )
override;
388 static css::uno::Sequence< OUString > getSupportedServiceNames_Static( );
394 public css::lang::XTypeProvider,
409 virtual
void SAL_CALL
acquire() noexcept override;
410 virtual
void SAL_CALL
release() noexcept override;
413 virtual css::
uno::Reference< css::text::XText > SAL_CALL getText() override;
416 virtual OUString SAL_CALL getImplementationName() override;
424 public css::text::XTextAppend,
425 public css::text::XTextCopy,
426 public css::container::XEnumerationAccess,
427 public css::text::XTextRangeMover,
428 public css::lang::XTypeProvider
441 css::
uno::Reference< css::text::XTextCursor > createTextCursorBySelection( const
ESelection& rSel );
448 virtual css::
uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursor( ) override;
449 virtual css::
uno::Reference< css::text::XTextCursor > SAL_CALL createTextCursorByRange( const css::
uno::Reference< css::text::XTextRange >& aTextPosition ) override;
450 virtual
void SAL_CALL insertString( const css::
uno::Reference< css::text::XTextRange >& xRange, const OUString& aString,
sal_Bool bAbsorb ) override;
451 virtual
void SAL_CALL insertControlCharacter( const css::
uno::Reference< css::text::XTextRange >& xRange, sal_Int16 nControlCharacter,
sal_Bool bAbsorb ) override;
454 virtual
void SAL_CALL insertTextContent( const css::
uno::Reference< css::text::XTextRange >& xRange, const css::
uno::Reference< css::text::XTextContent >& xContent,
sal_Bool bAbsorb ) override;
455 virtual
void SAL_CALL removeTextContent( const css::
uno::Reference< css::text::XTextContent >& xContent ) override;
456 virtual OUString SAL_CALL getString() override;
457 virtual
void SAL_CALL setString( const OUString& aString ) override;
460 virtual css::
uno::Reference< css::text::XText > SAL_CALL getText( ) override;
461 virtual css::
uno::Reference< css::text::XTextRange > SAL_CALL getStart() override;
462 virtual css::
uno::Reference< css::text::XTextRange > SAL_CALL getEnd() override;
465 virtual css::
uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration( ) override;
468 virtual css::
uno::
Type SAL_CALL getElementType( ) override;
469 virtual
sal_Bool SAL_CALL hasElements( ) override;
472 virtual
void SAL_CALL moveTextRange( const css::
uno::Reference< css::text::XTextRange >& xRange, sal_Int16 nParagraphs ) override;
475 virtual css::
uno::Reference< css::text::XTextRange > SAL_CALL finishParagraph( const css::
uno::Sequence< css::beans::PropertyValue >& CharacterAndParagraphProperties ) override;
476 virtual css::
uno::Reference< css::text::XTextRange > SAL_CALL finishParagraphInsert( const css::
uno::Sequence< css::beans::PropertyValue >& CharacterAndParagraphProperties, const css::
uno::Reference< css::text::XTextRange >& xInsertPosition ) override;
479 virtual css::
uno::Reference< css::text::XTextRange > SAL_CALL appendTextPortion( const OUString& Text, const css::
uno::Sequence< css::beans::PropertyValue >& CharacterAndParagraphProperties ) override;
481 virtual css::
uno::Reference< css::text::XTextRange > SAL_CALL insertTextPortion( const OUString& Text, const css::
uno::Sequence< css::beans::PropertyValue >& CharacterAndParagraphProperties, const css::
uno::Reference< css::text::XTextRange>& rTextRange ) override;
484 virtual
void SAL_CALL copyText( const css::
uno::Reference< css::text::XTextCopy >& xSource ) override;
487 virtual OUString SAL_CALL getImplementationName() override;
488 virtual css::
uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
489 static css::
uno::Sequence< OUString > SAL_CALL getSupportedServiceNames_Static( );
507 static const css::
uno::Sequence<
sal_Int8 > & getUnoTunnelId() noexcept;
508 virtual sal_Int64 SAL_CALL getSomething( const css::
uno::Sequence<
sal_Int8 >& aIdentifier ) override;
513 virtual
void SAL_CALL
acquire() noexcept override;
514 virtual
void SAL_CALL
release() noexcept override;
523 public css::text::XTextContent,
524 public css::container::XEnumerationAccess,
525 public css::lang::XTypeProvider,
540 using SvxUnoTextRangeBase::setPropertyValue;
541 using SvxUnoTextRangeBase::getPropertyValue;
551 virtual
void SAL_CALL
acquire() noexcept override;
552 virtual
void SAL_CALL
release() noexcept override;
555 virtual css::
uno::Reference< css::text::XText > SAL_CALL getText( ) override;
558 virtual
void SAL_CALL attach( const css::
uno::Reference< css::text::XTextRange >& xTextRange ) override;
559 virtual css::
uno::Reference< css::text::XTextRange > SAL_CALL getAnchor( ) override;
562 virtual
void SAL_CALL dispose() override;
563 virtual
void SAL_CALL addEventListener( const css::
uno::Reference< css::lang::XEventListener >& xListener ) override;
564 virtual
void SAL_CALL removeEventListener( const css::
uno::Reference< css::lang::XEventListener >& aListener ) override;
567 virtual css::
uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration( ) override;
570 virtual css::
uno::
Type SAL_CALL getElementType() override;
571 virtual
sal_Bool SAL_CALL hasElements() override;
574 virtual
void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::
uno::Any& aValue ) override;
575 virtual css::
uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
578 virtual
void SAL_CALL setPropertyValues( const css::
uno::Sequence< OUString >& aPropertyNames, const css::
uno::Sequence< css::
uno::Any >& aValues ) override;
579 virtual css::
uno::Sequence< css::
uno::Any > SAL_CALL getPropertyValues( const css::
uno::Sequence< OUString >& aPropertyNames ) override;
582 virtual css::beans::PropertyState SAL_CALL getPropertyState( const OUString& PropertyName ) override;
583 virtual css::
uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates( const css::
uno::Sequence< OUString >& aPropertyName ) override;
584 virtual
void SAL_CALL setPropertyToDefault( const OUString& PropertyName ) override;
587 virtual OUString SAL_CALL getImplementationName() override;
588 virtual css::
uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
633 public css::text::XTextCursor,
634 public css::lang::XTypeProvider,
648 virtual
void SAL_CALL
acquire() noexcept override;
649 virtual
void SAL_CALL
release() noexcept override;
652 virtual css::
uno::Reference< css::text::XText > SAL_CALL getText() override;
653 virtual OUString SAL_CALL getString() override;
654 virtual
void SAL_CALL setString( const OUString& aString ) override;
655 virtual css::
uno::Reference< css::text::XTextRange > SAL_CALL getStart() override;
656 virtual css::
uno::Reference< css::text::XTextRange > SAL_CALL getEnd() override;
659 virtual
void SAL_CALL collapseToStart( ) override;
660 virtual
void SAL_CALL collapseToEnd( ) override;
661 virtual
sal_Bool SAL_CALL isCollapsed( ) override;
662 virtual
sal_Bool SAL_CALL goLeft( sal_Int16 nCount,
sal_Bool bExpand ) override;
663 virtual
sal_Bool SAL_CALL goRight( sal_Int16 nCount,
sal_Bool bExpand ) override;
664 virtual
void SAL_CALL gotoStart(
sal_Bool bExpand ) override;
665 virtual
void SAL_CALL gotoEnd(
sal_Bool bExpand ) override;
666 virtual
void SAL_CALL gotoRange( const css::
uno::Reference< css::text::XTextRange >& xRange,
sal_Bool bExpand ) override;
669 virtual OUString SAL_CALL getImplementationName() override;
670 virtual
sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
671 virtual css::
uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
virtual tools::Rectangle GetCharBounds(sal_Int32 nPara, sal_Int32 nIndex) const override
Query the bounding rectangle of the given character.
virtual void UpdateData() override
Write back data to model.
virtual EBulletInfo GetBulletInfo(sal_Int32 nPara) const override
Query information regarding bullets for given paragraph on the underlying edit engine.
virtual bool SetDepth(sal_Int32 nPara, sal_Int16 nNewDepth) override
Set the outline depth of given paragraph.
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 OUString GetText(const ESelection &rSel) const override
virtual sal_Int32 GetFieldCount(sal_Int32 nPara) const override
Query number of fields in the underlying edit engine.
virtual sal_Int32 GetLineCount(sal_Int32 nPara) const override
Query number of lines in the formatted paragraph.
virtual MapMode GetMapMode() const override
Query the map mode of the underlying EditEngine/Outliner.
virtual sal_Int32 AppendTextPortion(sal_Int32 nPara, const OUString &rText, const SfxItemSet &rSet) override
virtual sal_Int16 GetDepth(sal_Int32 nPara) const override
Get the outline depth of given paragraph.
virtual OutputDevice * GetRefDevice() const override
Query the reference output device of the underlying EditEngine/Outliner.
virtual void AppendParagraph() override
virtual void GetPortions(sal_Int32 nPara, std::vector< sal_Int32 > &rList) const override
virtual void QuickInsertLineBreak(const ESelection &rSel) override
virtual bool Delete(const ESelection &) override
Delete given text range and reformat text.
virtual const SfxItemSet * GetEmptyItemSetPtr() override
virtual ~SvxDummyTextSource() override
SfxItemState GetItemState(const ESelection &rSel, sal_uInt16 nWhich) const 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 OUString GetStyleSheet(sal_Int32 nPara) const override
virtual void SetParaAttribs(sal_Int32 nPara, const SfxItemSet &rSet) override
virtual sal_Int32 GetTextLen(sal_Int32 nParagraph) const override
virtual tools::Rectangle GetParaBounds(sal_Int32 nPara) const override
Query the bounding rectangle of the given paragraph.
virtual SfxItemSet GetAttribs(const ESelection &rSel, EditEngineAttribs nOnlyHardAttrib=EditEngineAttribs::All) const override
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 void FieldClicked(const SvxFieldItem &rField) override
virtual bool IsValid() const override
Query state of forwarder.
virtual bool InsertText(const OUString &, const ESelection &) override
Insert/Replace given text in given range and reformat text.
virtual void QuickSetAttribs(const SfxItemSet &rSet, const ESelection &rSel) override
virtual sal_Int32 GetParagraphCount() const override
virtual void QuickInsertField(const SvxFieldItem &rFld, const ESelection &rSel) 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 void GetLineBoundaries(sal_Int32 &rStart, sal_Int32 &rEnd, sal_Int32 nParagraph, sal_Int32 nLine) const override
Query bounds of line in paragraph.
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 std::unique_ptr< SvxEditSource > Clone() const override
Returns a new reference to the same object. This is a shallow copy.
virtual void QuickInsertText(const OUString &rText, const ESelection &rSel) override
virtual bool QuickFormatDoc(bool bFull=false) override
Updates the formatting.
virtual void RemoveAttribs(const ESelection &rSelection) override
virtual void SetStyleSheet(sal_Int32 nPara, const OUString &rStyleName) override
virtual sal_Int32 GetLineLen(sal_Int32 nPara, sal_Int32 nLine) const override
Query line length.
virtual void CopyText(const SvxTextForwarder &rSource) 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 SfxItemPool * GetPool() const override
virtual SvxTextForwarder * GetTextForwarder() override
Query the text forwarder.
virtual EFieldInfo GetFieldInfo(sal_Int32 nPara, sal_uInt16 nField) const override
Query information for given field number in the underlying edit engine.
Wrapper class for unified EditEngine/Outliner access.
This item stores a field (SvxFieldData).
Contains an EditEngine or an Outliner and unifies access to them.
css::uno::Reference< css::text::XText > xParentText
SvxUnoTextBase(const SvxEditSource *pSource, const SvxItemPropertySet *_pSet, css::uno::Reference< css::text::XText > const &xParent)
SvxUnoTextContentEnumeration(const SvxUnoTextBase &_rText, const ESelection &rSel) noexcept
std::vector< rtl::Reference< SvxUnoTextContent > > maContents
std::unique_ptr< SvxEditSource > mpEditSource
virtual css::uno::Any SAL_CALL nextElement() override
virtual sal_Bool SAL_CALL hasMoreElements() override
virtual ~SvxUnoTextContentEnumeration() noexcept override
css::uno::Reference< css::text::XText > mxParentText
sal_Int32 mnNextParagraph
const SvxUnoTextBase & mrParentText
::comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > maDisposeListeners
css::uno::Reference< css::text::XText > mxParentText
std::mutex maDisposeContainerMutex
css::uno::Reference< css::text::XText > mxParentText
SvxUnoText(const SvxEditSource *pSource, const SvxItemPropertySet *_pSet, css::uno::Reference< css::text::XText > const &xParent) noexcept
virtual void SAL_CALL acquire() SAL_NOEXCEPT SAL_OVERRIDE
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() SAL_OVERRIDE
virtual void SAL_CALL release() SAL_NOEXCEPT SAL_OVERRIDE
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() SAL_OVERRIDE
virtual css::uno::Any SAL_CALL queryAggregation(css::uno::Type const &rType) SAL_OVERRIDE
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) SAL_OVERRIDE
class SAL_WARN_UNUSED SAL_LOPLUGIN_ANNOTATE("crosscast") SwContentIndexReg
#define EDITENG_DLLPUBLIC
EditEngineAttribs
values for: SfxItemSet GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEn...
OUString getString(const Any &_rAny)
css::uno::Sequence< OUString > getSupportedServiceNames()
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
VBAHELPER_DLLPUBLIC bool setPropertyValue(css::uno::Sequence< css::beans::PropertyValue > &aProp, const OUString &aName, const css::uno::Any &aValue)
bool getPropertyValue(ValueType &rValue, css::uno::Reference< css::beans::XPropertySet > const &xPropSet, OUString const &propName)
#define UNO3_GETIMPLEMENTATION_DECL(classname)
o3tl::span< const SfxItemPropertyMapEntry > ImplGetSvxTextPortionPropertyMap()
EDITENG_DLLPUBLIC const SvxItemPropertySet * ImplGetSvxUnoOutlinerTextCursorSvxPropertySet()
const SvxItemPropertySet * ImplGetSvxTextPortionSvxPropertySet()
EDITENG_DLLPUBLIC void GetSelection(struct ESelection &rSel, SvxTextForwarder const *pForwarder) noexcept
EDITENG_DLLPUBLIC void CheckSelection(struct ESelection &rSel, SvxTextForwarder const *pForwarder) noexcept
o3tl::span< const SfxItemPropertyMapEntry > ImplGetSvxUnoOutlinerTextCursorPropertyMap()