1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: unotext.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _SVX_UNOTEXT_HXX
32 #define _SVX_UNOTEXT_HXX
35 #include <tools/link.hxx>
38 #ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_
39 #include <com/sun/star/container/XNameContainer.hpp>
41 #ifndef _COM_SUN_STAR_TEXT_XTEXTRANGE_HPP_
42 #include <com/sun/star/text/XTextRange.hpp>
44 #ifndef _COM_SUN_STAR_TEXT_XTEXT_HPP_
45 #include <com/sun/star/text/XText.hpp>
47 #ifndef _SMART_COM_SUN_STAR_CONTAINER_XENUMERATIONACCESS
48 #include <com/sun/star/container/XEnumerationAccess.hpp>
50 #ifndef _COM_SUN_STAR_TEXT_XTEXTRANGEMOVER_HPP_
51 #include <com/sun/star/text/XTextRangeMover.hpp>
53 #ifndef _COM_SUN_STAR_TEXT_XTEXTCURSOR_HPP_
54 #include <com/sun/star/text/XTextCursor.hpp>
56 #ifndef _COM_SUN_STAR_LANG_XTYPEPROVIDER_HPP_
57 #include <com/sun/star/lang/XTypeProvider.hpp>
59 #ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
60 #include <com/sun/star/beans/XPropertySet.hpp>
62 #ifndef _COM_SUN_STAR_BEANS_XPROPERTYSTATE_HPP_
63 #include <com/sun/star/beans/XPropertyState.hpp>
65 #ifndef _COM_SUN_STAR_BEANS_XMULTIPROPERTYSET_HPP_
66 #include <com/sun/star/beans/XMultiPropertySet.hpp>
68 #ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_
69 #include <com/sun/star/lang/Locale.hpp>
72 #ifndef _CPPUHELPER_WEAK_HXX_
73 #include <cppuhelper/weak.hxx>
75 #ifndef _CPPUHELPER_WEAKAGG_HXX_
76 #include <cppuhelper/weakagg.hxx>
79 #ifndef _SFX_ITEMPROP_HXX
80 #include <bf_svtools/itemprop.hxx>
83 #ifndef _MyEDITDATA_HXX // ESelection
84 #include <bf_svx/editdata.hxx>
87 #ifndef _SVX_UNOEDSRC_HXX
88 #include <bf_svx/unoedsrc.hxx>
91 #ifndef _SFXITEMSET_HXX //autog
92 #include <bf_svtools/itemset.hxx>
95 #ifndef _SFXITEMPOOL_HXX //auto
96 #include <bf_svtools/itempool.hxx>
99 #ifndef _SVX_SVXENUM_HXX //autogen
100 #include <bf_svx/svxenum.hxx>
103 #ifndef _OUTLINER_HXX //autogen
104 #include <bf_svx/outliner.hxx>
107 #ifndef _SVX_UNOFOROU_HXX //autogen
108 #include <bf_svx/unoforou.hxx>
111 #include <bf_svx/unoprnms.hxx>
114 #include <bf_svx/eeitem.hxx>
117 #ifndef _COM_SUN_STAR_TEXT_XTEXTFIELD_HPP_
118 #include <com/sun/star/text/XTextField.hpp>
120 #ifndef _COM_SUN_STAR_CONTAINER_XINDEXREPLACE_HPP_
121 #include <com/sun/star/container/XIndexReplace.hpp>
123 #ifndef _COM_SUN_STAR_AWT_FONTSLANT_HPP_
124 #include <com/sun/star/awt/FontSlant.hpp>
126 #ifndef _COM_SUN_STAR_AWT_FONTDESCRIPTOR_HPP_
127 #include <com/sun/star/awt/FontDescriptor.hpp>
129 #ifndef _COM_SUN_STAR_STYLE_LINESPACING_HPP_
130 #include <com/sun/star/style/LineSpacing.hpp>
132 #ifndef _COM_SUN_STAR_STYLE_TABSTOP_HPP_
133 #include <com/sun/star/style/TabStop.hpp>
135 #ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_
136 #include <com/sun/star/lang/XUnoTunnel.hpp>
138 #ifndef _COM_SUN_STAR_TEXT_XTEXTRANGE_HPP_
139 #include <com/sun/star/text/XTextRange.hpp>
142 #ifndef _CPPUHELPER_INTERFACECONTAINER_H_
143 #include <cppuhelper/interfacecontainer.h>
145 #ifndef _OSL_MUTEX_HXX_
146 #include <osl/mutex.hxx>
149 #include <comphelper/servicehelper.hxx>
152 #if defined(__SUNPRO_CC) && (__SUNPRO_CC == 0x500)
153 #define SEQTYPE(x) (new ::com::sun::star::uno::Type( x ))
155 #define SEQTYPE(x) &(x)
159 #include <bf_svx/unoprov.hxx>
160 #include <bf_svx/unomid.hxx>
161 namespace binfilter
{
163 #define WID_FONTDESC 3900
164 #define WID_NUMLEVEL 3901
165 #define WID_PORTIONTYPE 3903
167 #define SVX_UNOEDIT_NUMBERING_PROPERTIE \
168 {MAP_CHAR_LEN(UNO_NAME_NUMBERING_RULES), EE_PARA_NUMBULLET, &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace>*)0), 0, 0 }, \
169 {MAP_CHAR_LEN(UNO_NAME_NUMBERING), EE_PARA_BULLETSTATE,&::getBooleanCppuType(), 0, 0 }
171 #define SVX_UNOEDIT_OUTLINER_PROPERTIES \
172 SVX_UNOEDIT_NUMBERING_PROPERTIE, \
173 {MAP_CHAR_LEN(UNO_NAME_NUMBERING_LEVEL), WID_NUMLEVEL, &::getCppuType((const sal_Int16*)0), 0, 0 }
175 #define SVX_UNOEDIT_CHAR_PROPERTIES \
176 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_HEIGHT), EE_CHAR_FONTHEIGHT, &::getCppuType((const float*)0), 0, MID_FONTHEIGHT|CONVERT_TWIPS }, \
177 { MAP_CHAR_LEN("CharScaleWidth"), EE_CHAR_FONTWIDTH, &::getCppuType((const sal_Int16*)0), 0, 0 }, \
178 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTNAME), EE_CHAR_FONTINFO, &::getCppuType((const ::rtl::OUString*)0), 0, MID_FONT_FAMILY_NAME },\
179 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTSTYLENAME),EE_CHAR_FONTINFO, &::getCppuType((const ::rtl::OUString*)0), 0, MID_FONT_STYLE_NAME }, \
180 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTFAMILY), EE_CHAR_FONTINFO, &::getCppuType((const sal_Int16*)0), 0, MID_FONT_FAMILY }, \
181 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTCHARSET), EE_CHAR_FONTINFO, &::getCppuType((const sal_Int16*)0), 0, MID_FONT_CHAR_SET }, \
182 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTPITCH), EE_CHAR_FONTINFO, &::getCppuType((const sal_Int16*)0), 0, MID_FONT_PITCH }, \
183 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_POSTURE), EE_CHAR_ITALIC, &::getCppuType((const ::com::sun::star::awt::FontSlant*)0),0, MID_POSTURE }, \
184 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_WEIGHT), EE_CHAR_WEIGHT, &::getCppuType((const float*)0), 0, MID_WEIGHT }, \
185 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_LOCALE), EE_CHAR_LANGUAGE, &::getCppuType((const ::com::sun::star::lang::Locale*)0),0, MID_LANG_LOCALE }, \
186 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_COLOR), EE_CHAR_COLOR, &::getCppuType((const sal_Int32*)0), 0, 0 }, \
187 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_ESCAPEMENT), EE_CHAR_ESCAPEMENT, &::getCppuType((const sal_Int16*)0), 0, MID_ESC }, \
188 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_UNDERLINE), EE_CHAR_UNDERLINE, &::getCppuType((const sal_Int16*)0), 0, MID_UNDERLINE }, \
189 { MAP_CHAR_LEN("CharUnderlineColor"), EE_CHAR_UNDERLINE, &::getCppuType((const sal_Int32*)0), 0, MID_UL_COLOR }, \
190 { MAP_CHAR_LEN("CharUnderlineHasColor"), EE_CHAR_UNDERLINE, &::getBooleanCppuType(), 0, MID_UL_HASCOLOR } , \
191 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_CROSSEDOUT), EE_CHAR_STRIKEOUT, &::getBooleanCppuType(), 0, MID_CROSSED_OUT }, \
192 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_STRIKEOUT), EE_CHAR_STRIKEOUT, &::getCppuType((const sal_Int16*)0), 0, MID_CROSS_OUT}, \
193 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_SHADOWED), EE_CHAR_SHADOW, &::getBooleanCppuType(), 0, 0 }, \
194 { MAP_CHAR_LEN("CharContoured"), EE_CHAR_OUTLINE, &::getBooleanCppuType(), 0, 0 }, \
195 { MAP_CHAR_LEN("CharEscapementHeight"), EE_CHAR_ESCAPEMENT, &::getCppuType((const sal_Int8*)0), 0, MID_ESC_HEIGHT },\
196 { MAP_CHAR_LEN("CharAutoKerning"), EE_CHAR_PAIRKERNING,&::getBooleanCppuType(), 0, 0 } , \
197 { MAP_CHAR_LEN("CharKerning"), EE_CHAR_KERNING, &::getCppuType((const sal_Int16*)0) , 0, 0 }, \
198 { MAP_CHAR_LEN("CharWordMode"), EE_CHAR_WLM, &::getBooleanCppuType(), 0, 0 }, \
199 { MAP_CHAR_LEN("CharEmphasis"), EE_CHAR_EMPHASISMARK,&::getCppuType((const sal_Int16*)0), 0, MID_EMPHASIS},\
200 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_HEIGHT_ASIAN), EE_CHAR_FONTHEIGHT_CJK, &::getCppuType((const float*)0), 0, MID_FONTHEIGHT|CONVERT_TWIPS }, \
201 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTNAME_ASIAN), EE_CHAR_FONTINFO_CJK, &::getCppuType((const ::rtl::OUString*)0), 0, MID_FONT_FAMILY_NAME },\
202 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTSTYLENAME_ASIAN), EE_CHAR_FONTINFO_CJK, &::getCppuType((const ::rtl::OUString*)0), 0, MID_FONT_STYLE_NAME }, \
203 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTFAMILY_ASIAN), EE_CHAR_FONTINFO_CJK, &::getCppuType((const sal_Int16*)0), 0, MID_FONT_FAMILY }, \
204 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTCHARSET_ASIAN), EE_CHAR_FONTINFO_CJK, &::getCppuType((const sal_Int16*)0), 0, MID_FONT_CHAR_SET }, \
205 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTPITCH_ASIAN), EE_CHAR_FONTINFO_CJK, &::getCppuType((const sal_Int16*)0), 0, MID_FONT_PITCH }, \
206 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_POSTURE_ASIAN), EE_CHAR_ITALIC_CJK, &::getCppuType((const ::com::sun::star::awt::FontSlant*)0),0, MID_POSTURE }, \
207 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_WEIGHT_ASIAN), EE_CHAR_WEIGHT_CJK, &::getCppuType((const float*)0), 0, MID_WEIGHT }, \
208 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_LOCALE_ASIAN), EE_CHAR_LANGUAGE_CJK, &::getCppuType((const ::com::sun::star::lang::Locale*)0),0, MID_LANG_LOCALE }, \
209 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_HEIGHT_COMPLEX), EE_CHAR_FONTHEIGHT_CTL, &::getCppuType((const float*)0), 0, MID_FONTHEIGHT|CONVERT_TWIPS }, \
210 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTNAME_COMPLEX), EE_CHAR_FONTINFO_CTL, &::getCppuType((const ::rtl::OUString*)0), 0, MID_FONT_FAMILY_NAME },\
211 {MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTSTYLENAME_COMPLEX),EE_CHAR_FONTINFO_CTL, &::getCppuType((const ::rtl::OUString*)0), 0, MID_FONT_STYLE_NAME }, \
212 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTFAMILY_COMPLEX), EE_CHAR_FONTINFO_CTL, &::getCppuType((const sal_Int16*)0), 0, MID_FONT_FAMILY }, \
213 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTCHARSET_COMPLEX), EE_CHAR_FONTINFO_CTL, &::getCppuType((const sal_Int16*)0), 0, MID_FONT_CHAR_SET }, \
214 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_FONTPITCH_COMPLEX), EE_CHAR_FONTINFO_CTL, &::getCppuType((const sal_Int16*)0), 0, MID_FONT_PITCH }, \
215 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_POSTURE_COMPLEX), EE_CHAR_ITALIC_CTL, &::getCppuType((const ::com::sun::star::awt::FontSlant*)0),0, MID_POSTURE }, \
216 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_WEIGHT_COMPLEX), EE_CHAR_WEIGHT_CTL, &::getCppuType((const float*)0), 0, MID_WEIGHT }, \
217 { MAP_CHAR_LEN(UNO_NAME_EDIT_CHAR_LOCALE_COMPLEX), EE_CHAR_LANGUAGE_CTL, &::getCppuType((const ::com::sun::star::lang::Locale*)0),0, MID_LANG_LOCALE }, \
218 { MAP_CHAR_LEN("CharRelief" ), EE_CHAR_RELIEF, &::getCppuType((const sal_Int16*)0), 0, MID_RELIEF }
220 #define SVX_UNOEDIT_FONT_PROPERTIES \
221 {MAP_CHAR_LEN(UNO_NAME_EDIT_FONT_DESCRIPTOR), WID_FONTDESC, &::getCppuType((const ::com::sun::star::awt::FontDescriptor*)0), 0, MID_FONT_FAMILY_NAME }
223 #define SVX_UNOEDIT_PARA_PROPERTIES \
224 {MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_ADJUST), EE_PARA_JUST, &::getCppuType((const sal_Int16*)0), 0, MID_PARA_ADJUST }, \
225 {MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_BMARGIN), EE_PARA_ULSPACE, &::getCppuType((const sal_Int32*)0), 0, MID_LO_MARGIN|SFX_METRIC_ITEM }, \
226 {MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_IS_HYPHEN), EE_PARA_HYPHENATE, &::getBooleanCppuType(), 0, 0 }, \
227 {MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_LASTLINEADJ), EE_PARA_JUST, &::getCppuType((const sal_Int16*)0), 0, MID_LAST_LINE_ADJUST }, \
228 {MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_LMARGIN), EE_PARA_LRSPACE, &::getCppuType((const sal_Int32*)0), 0, MID_TXT_LMARGIN|SFX_METRIC_ITEM }, \
229 {MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_LINESPACING), EE_PARA_SBL, &::getCppuType((const ::com::sun::star::style::LineSpacing*)0), 0, 0 }, \
230 {MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_RMARGIN), EE_PARA_LRSPACE, &::getCppuType((const sal_Int32*)0), 0, MID_R_MARGIN|SFX_METRIC_ITEM }, \
231 {MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_TAPSTOPS), EE_PARA_TABS, SEQTYPE(::getCppuType((const ::com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop >*)0)), 0, 0 }, \
232 {MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_TMARGIN), EE_PARA_ULSPACE, &::getCppuType((const sal_Int32*)0), 0, MID_UP_MARGIN|SFX_METRIC_ITEM },\
233 {MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_FIRST_LINE_INDENT), EE_PARA_LRSPACE, &::getCppuType((const sal_Int32*)0), 0, MID_FIRST_LINE_INDENT|SFX_METRIC_ITEM}, \
234 {MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_IS_HANGING_PUNCTUATION),EE_PARA_HANGINGPUNCTUATION, &::getBooleanCppuType(), 0 ,0 }, \
235 {MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_IS_CHARACTER_DISTANCE), EE_PARA_ASIANCJKSPACING, &::getBooleanCppuType(), 0 ,0 }, \
236 {MAP_CHAR_LEN(UNO_NAME_EDIT_PARA_IS_FORBIDDEN_RULES), EE_PARA_FORBIDDENRULES, &::getBooleanCppuType(), 0 ,0 },\
237 {MAP_CHAR_LEN("WritingMode"), EE_PARA_WRITINGDIR, &::getCppuType((const sal_Int16*)0), 0, 0 }
239 SvxAdjust
ConvertUnoAdjust( unsigned short nAdjust
) throw();
240 unsigned short ConvertUnoAdjust( SvxAdjust eAdjust
) throw();
243 class SvxTextForwarder
;
245 class SvxTextEditSource
;
249 void GetSelection( struct ESelection
& rSel
, SvxTextForwarder
* pForwarder
) throw();
250 void CheckSelection( struct ESelection
& rSel
, SvxTextForwarder
* pForwarder
) throw();
252 // ====================================================================
253 // Diese Klasse implementiert eine SvxEditSource und einen SvxTextForwarder
254 // und macht ansonsten rein garnichts
255 // ====================================================================
257 class SvxDummyTextSource
: public SvxEditSource
, public SvxTextForwarder
262 virtual ~SvxDummyTextSource();
263 virtual SvxEditSource
* Clone() const;
264 virtual SvxTextForwarder
* GetTextForwarder();
265 virtual void UpdateData();
268 virtual sal_uInt16
GetParagraphCount() const;
269 virtual sal_uInt16
GetTextLen( sal_uInt16 nParagraph
) const;
270 virtual String
GetText( const ESelection
& rSel
) const;
271 virtual SfxItemSet
GetAttribs( const ESelection
& rSel
, BOOL bOnlyHardAttrib
= 0 ) const;
272 virtual SfxItemSet
GetParaAttribs( sal_uInt16 nPara
) const;
273 virtual void SetParaAttribs( sal_uInt16 nPara
, const SfxItemSet
& rSet
);
274 virtual void GetPortions( sal_uInt16 nPara
, SvUShorts
& rList
) const;
276 sal_uInt16
GetItemState( const ESelection
& rSel
, sal_uInt16 nWhich
) const;
277 sal_uInt16
GetItemState( sal_uInt16 nPara
, sal_uInt16 nWhich
) const;
279 virtual SfxItemPool
* GetPool() const;
281 virtual void QuickInsertText( const String
& rText
, const ESelection
& rSel
);
282 virtual void QuickInsertField( const SvxFieldItem
& rFld
, const ESelection
& rSel
);
283 virtual void QuickSetAttribs( const SfxItemSet
& rSet
, const ESelection
& rSel
);
284 virtual void QuickInsertLineBreak( const ESelection
& rSel
);
286 virtual XubString
CalcFieldValue( const SvxFieldItem
& rField
, sal_uInt16 nPara
, sal_uInt16 nPos
, Color
*& rpTxtColor
, Color
*& rpFldColor
);
287 virtual sal_Bool
IsValid() const;
289 virtual void SetNotifyHdl( const Link
& );
290 virtual LanguageType
GetLanguage( USHORT
, USHORT
) const;
291 virtual USHORT
GetFieldCount( USHORT nPara
) const;
292 virtual EFieldInfo
GetFieldInfo( USHORT nPara
, USHORT nField
) const;
293 virtual EBulletInfo
GetBulletInfo( USHORT nPara
) const;
294 virtual Rectangle
GetCharBounds( USHORT nPara
, USHORT nIndex
) const;
295 virtual Rectangle
GetParaBounds( USHORT nPara
) const;
296 virtual MapMode
GetMapMode() const;
297 virtual OutputDevice
* GetRefDevice() const;
298 virtual sal_Bool
GetIndexAtPoint( const Point
&, USHORT
& nPara
, USHORT
& nIndex
) const;
299 virtual sal_Bool
GetWordIndices( USHORT nPara
, USHORT nIndex
, USHORT
& nStart
, USHORT
& nEnd
) const;
300 virtual sal_Bool
GetAttributeRun( USHORT
& nStartIndex
, USHORT
& nEndIndex
, USHORT nPara
, USHORT nIndex
) const;
301 virtual USHORT
GetLineCount( USHORT nPara
) const;
302 virtual USHORT
GetLineLen( USHORT nPara
, USHORT nLine
) const;
303 virtual sal_Bool
Delete( const ESelection
& );
304 virtual sal_Bool
InsertText( const String
&, const ESelection
& );
305 virtual sal_Bool
QuickFormatDoc( BOOL bFull
=FALSE
);
306 virtual USHORT
GetDepth( USHORT nPara
) const;
307 virtual sal_Bool
SetDepth( USHORT nPara
, USHORT nNewDepth
);
311 // ====================================================================
313 class SvxUnoTextRangeBase
: public ::com::sun::star::text::XTextRange
,
314 public ::com::sun::star::beans::XPropertySet
,
315 public ::com::sun::star::beans::XMultiPropertySet
,
316 public ::com::sun::star::beans::XPropertyState
,
317 public ::com::sun::star::lang::XServiceInfo
,
318 public ::com::sun::star::lang::XUnoTunnel
322 SvxEditSource
* pEditSource
;
323 ESelection aSelection
;
324 SvxItemPropertySet aPropSet
;
327 virtual void SAL_CALL
_setPropertyValue( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Any
& aValue
, sal_Int32 nPara
= -1 ) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
328 virtual ::com::sun::star::uno::Any SAL_CALL
_getPropertyValue( const ::rtl::OUString
& PropertyName
, sal_Int32 nPara
= -1 ) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
330 virtual void SAL_CALL
_setPropertyValues( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyNames
, const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
>& aValues
, sal_Int32 nPara
= -1 ) throw (::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
331 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
> SAL_CALL
_getPropertyValues( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyNames
, sal_Int32 nPara
= -1 ) throw (::com::sun::star::uno::RuntimeException
);
333 virtual ::com::sun::star::beans::PropertyState SAL_CALL
_getPropertyState( const ::rtl::OUString
& PropertyName
, sal_Int32 nPara
= -1 ) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::uno::RuntimeException
);
334 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyState
> SAL_CALL
_getPropertyStates( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyName
, sal_Int32 nPara
= -1 ) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::uno::RuntimeException
);
335 virtual void SAL_CALL
_setPropertyToDefault( const ::rtl::OUString
& PropertyName
, sal_Int32 nPara
= -1 ) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::uno::RuntimeException
);
337 void SetEditSource( SvxEditSource
* _pEditSource
) throw();
339 virtual void getPropertyValue( const SfxItemPropertyMap
* pMap
, ::com::sun::star::uno::Any
& rAny
, const SfxItemSet
& rSet
) throw(::com::sun::star::beans::UnknownPropertyException
);
340 virtual void setPropertyValue( const SfxItemPropertyMap
* pMap
, const ::com::sun::star::uno::Any
& rValue
, const ESelection
& rSelection
, const SfxItemSet
& rOldSet
, SfxItemSet
& rNewSet
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::IllegalArgumentException
);
343 SvxUnoTextRangeBase( const SfxItemPropertyMap
* _pMap
) throw();
344 SvxUnoTextRangeBase( const SvxEditSource
* pSource
, const SfxItemPropertyMap
* _pMap
) throw();
345 SvxUnoTextRangeBase( const SvxUnoTextRangeBase
& rRange
) throw();
346 virtual ~SvxUnoTextRangeBase() throw();
349 const ESelection
& GetSelection() const throw() { CheckSelection( ((SvxUnoTextRangeBase
*)this)->aSelection
, pEditSource
->GetTextForwarder() ); return aSelection
; };
350 void SetSelection( const ESelection
& rSelection
) throw();
352 virtual void CollapseToStart(void) throw();
353 virtual void CollapseToEnd(void) throw();
354 virtual sal_Bool
IsCollapsed(void) throw();
355 virtual sal_Bool
GoLeft(sal_Int16 nCount
, sal_Bool Expand
) throw();
356 virtual sal_Bool
GoRight(sal_Int16 nCount
, sal_Bool Expand
) throw();
357 virtual void GotoStart(sal_Bool Expand
) throw();
358 virtual void GotoEnd(sal_Bool Expand
) throw();
360 const SfxItemPropertyMap
* getPropertyMap() const throw() { return aPropSet
.getPropertyMap(); }
361 SvxEditSource
* GetEditSource() const throw() { return pEditSource
; }
363 static sal_Bool
SetPropertyValueHelper( const SfxItemSet
& rOldSet
, const SfxItemPropertyMap
* pMap
, const ::com::sun::star::uno::Any
& aValue
, SfxItemSet
& rNewSet
, const ESelection
* pSelection
= NULL
, SvxTextEditSource
* pEditSource
= NULL
) throw( ::com::sun::star::uno::RuntimeException
);
364 static sal_Bool
GetPropertyValueHelper( SfxItemSet
& rSet
, const SfxItemPropertyMap
* pMap
, ::com::sun::star::uno::Any
& aAny
, const ESelection
* pSelection
= NULL
, SvxTextEditSource
* pEditSource
= NULL
) throw( ::com::sun::star::uno::RuntimeException
);
366 void attachField( const SvxFieldData
* pData
) throw();
368 UNO3_GETIMPLEMENTATION_DECL( SvxUnoTextRangeBase
)
370 // ::com::sun::star::text::XTextRange
371 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextRange
> SAL_CALL
getStart() throw(::com::sun::star::uno::RuntimeException
);
372 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextRange
> SAL_CALL
getEnd() throw(::com::sun::star::uno::RuntimeException
);
373 virtual ::rtl::OUString SAL_CALL
getString() throw(::com::sun::star::uno::RuntimeException
);
374 virtual void SAL_CALL
setString( const ::rtl::OUString
& aString
) throw(::com::sun::star::uno::RuntimeException
);
376 // ::com::sun::star::beans::XPropertySet
377 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException
);
378 virtual void SAL_CALL
setPropertyValue( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Any
& aValue
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
379 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue( const ::rtl::OUString
& PropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
380 virtual void SAL_CALL
addPropertyChangeListener( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertyChangeListener
>& xListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
381 virtual void SAL_CALL
removePropertyChangeListener( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertyChangeListener
>& aListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
382 virtual void SAL_CALL
addVetoableChangeListener( const ::rtl::OUString
& PropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XVetoableChangeListener
>& aListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
383 virtual void SAL_CALL
removeVetoableChangeListener( const ::rtl::OUString
& PropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XVetoableChangeListener
>& aListener
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
386 virtual void SAL_CALL
setPropertyValues( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyNames
, const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
>& aValues
) throw (::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
387 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
> SAL_CALL
getPropertyValues( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyNames
) throw (::com::sun::star::uno::RuntimeException
);
388 virtual void SAL_CALL
addPropertiesChangeListener( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyNames
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertiesChangeListener
>& xListener
) throw (::com::sun::star::uno::RuntimeException
);
389 virtual void SAL_CALL
removePropertiesChangeListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertiesChangeListener
>& xListener
) throw (::com::sun::star::uno::RuntimeException
);
390 virtual void SAL_CALL
firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyNames
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertiesChangeListener
>& xListener
) throw (::com::sun::star::uno::RuntimeException
);
392 // ::com::sun::star::beans::XPropertyState
393 virtual ::com::sun::star::beans::PropertyState SAL_CALL
getPropertyState( const ::rtl::OUString
& PropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::uno::RuntimeException
);
394 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyState
> SAL_CALL
getPropertyStates( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::uno::RuntimeException
);
395 virtual void SAL_CALL
setPropertyToDefault( const ::rtl::OUString
& PropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::uno::RuntimeException
);
396 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyDefault( const ::rtl::OUString
& aPropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
398 // ::com::sun::star::lang::XServiceInfo
399 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
) throw(::com::sun::star::uno::RuntimeException
);
400 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException
);
403 // ====================================================================
405 class SvxUnoTextBase
;
406 class SvxUnoTextRange
: public SvxUnoTextRangeBase
,
407 public ::com::sun::star::lang::XTypeProvider
,
408 public ::cppu::OWeakAggObject
411 ::com::sun::star::uno::Reference
< ::com::sun::star::text::XText
> xParentText
;
415 static ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> maTypeSequence
;
418 SvxUnoTextRange( const SvxUnoTextBase
& rParent
, sal_Bool bPortion
= sal_False
) throw();
419 virtual ~SvxUnoTextRange() throw();
421 // ::com::sun::star::uno::XInterface
422 virtual ::com::sun::star::uno::Any SAL_CALL
queryAggregation( const ::com::sun::star::uno::Type
& rType
) throw(::com::sun::star::uno::RuntimeException
);
423 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface( const ::com::sun::star::uno::Type
& rType
) throw(::com::sun::star::uno::RuntimeException
);
424 virtual void SAL_CALL
acquire() throw();
425 virtual void SAL_CALL
release() throw();
427 // ::com::sun::star::text::XTextRange
428 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::text::XText
> SAL_CALL
getText() throw(::com::sun::star::uno::RuntimeException
);
430 // ::com::sun::star::lang::XServiceInfo
431 virtual ::rtl::OUString SAL_CALL
getImplementationName() throw(::com::sun::star::uno::RuntimeException
);
433 // ::com::sun::star::lang::XTypeProvider
434 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
getTypes( ) throw(::com::sun::star::uno::RuntimeException
);
435 virtual ::com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId( ) throw(::com::sun::star::uno::RuntimeException
);
438 class SvxUnoTextBase
: public SvxUnoTextRangeBase
,
439 public ::com::sun::star::text::XText
,
440 public ::com::sun::star::container::XEnumerationAccess
,
441 public ::com::sun::star::text::XTextRangeMover
,
442 public ::com::sun::star::lang::XTypeProvider
445 ::com::sun::star::uno::Reference
< ::com::sun::star::text::XText
> xParentText
;
446 static ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> maTypeSequence
;
449 SvxUnoTextBase( const SfxItemPropertyMap
* _pMap
) throw();
450 SvxUnoTextBase( const SvxEditSource
* pSource
, const SfxItemPropertyMap
* _pMap
, ::com::sun::star::uno::Reference
< ::com::sun::star::text::XText
> xParent
) throw();
451 SvxUnoTextBase( const SvxUnoTextBase
& rText
) throw();
452 virtual ~SvxUnoTextBase() throw();
454 UNO3_GETIMPLEMENTATION_DECL( SvxUnoTextBase
)
456 static ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
getStaticTypes() throw();
458 sal_Bool
queryAggregation( const ::com::sun::star::uno::Type
& rType
, ::com::sun::star::uno::Any
& rAny
);
460 // ::com::sun::star::uno::XInterface
461 virtual ::com::sun::star::uno::Any SAL_CALL
queryAggregation( const ::com::sun::star::uno::Type
& rType
) throw(::com::sun::star::uno::RuntimeException
);
463 // ::com::sun::star::text::XSimpleText
464 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextCursor
> SAL_CALL
createTextCursor( ) throw(::com::sun::star::uno::RuntimeException
);
465 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextCursor
> SAL_CALL
createTextCursorByRange( const ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextRange
>& aTextPosition
) throw(::com::sun::star::uno::RuntimeException
);
466 virtual void SAL_CALL
insertString( const ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextRange
>& xRange
, const ::rtl::OUString
& aString
, sal_Bool bAbsorb
) throw(::com::sun::star::uno::RuntimeException
);
467 virtual void SAL_CALL
insertControlCharacter( const ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextRange
>& xRange
, sal_Int16 nControlCharacter
, sal_Bool bAbsorb
) throw(::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::uno::RuntimeException
);
469 // ::com::sun::star::text::XText
470 virtual void SAL_CALL
insertTextContent( const ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextRange
>& xRange
, const ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextContent
>& xContent
, sal_Bool bAbsorb
) throw(::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::uno::RuntimeException
);
471 virtual void SAL_CALL
removeTextContent( const ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextContent
>& xContent
) throw(::com::sun::star::container::NoSuchElementException
, ::com::sun::star::uno::RuntimeException
);
472 virtual ::rtl::OUString SAL_CALL
getString() throw(::com::sun::star::uno::RuntimeException
);
473 virtual void SAL_CALL
setString( const ::rtl::OUString
& aString
) throw(::com::sun::star::uno::RuntimeException
);
475 // ::com::sun::star::text::XTextRange
476 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::text::XText
> SAL_CALL
getText( ) throw(::com::sun::star::uno::RuntimeException
);
477 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextRange
> SAL_CALL
getStart() throw(::com::sun::star::uno::RuntimeException
);
478 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextRange
> SAL_CALL
getEnd() throw(::com::sun::star::uno::RuntimeException
);
480 // ::com::sun::star::container::XEnumerationAccess
481 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XEnumeration
> SAL_CALL
createEnumeration( ) throw(::com::sun::star::uno::RuntimeException
);
483 // ::com::sun::star::container::XElementAccess
484 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType( ) throw(::com::sun::star::uno::RuntimeException
);
485 virtual sal_Bool SAL_CALL
hasElements( ) throw(::com::sun::star::uno::RuntimeException
);
487 // ::com::sun::star::text::XTextRangeMover
488 virtual void SAL_CALL
moveTextRange( const ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextRange
>& xRange
, sal_Int16 nParagraphs
) throw(::com::sun::star::uno::RuntimeException
);
490 // ::com::sun::star::lang::XServiceInfo
491 virtual ::rtl::OUString SAL_CALL
getImplementationName() throw(::com::sun::star::uno::RuntimeException
);
492 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException
);
494 // ::com::sun::star::lang::XTypeProvider
495 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
getTypes( ) throw(::com::sun::star::uno::RuntimeException
);
496 virtual ::com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId( ) throw(::com::sun::star::uno::RuntimeException
);
499 // ====================================================================
500 class SvxUnoText
: public SvxUnoTextBase
,
501 public ::cppu::OWeakAggObject
504 SvxUnoText( const SvxEditSource
* pSource
, const SfxItemPropertyMap
* _pMap
, ::com::sun::star::uno::Reference
< ::com::sun::star::text::XText
> xParent
) throw();
505 SvxUnoText( const SvxUnoText
& rText
) throw();
506 virtual ~SvxUnoText() throw();
509 static const ::com::sun::star::uno::Sequence
< sal_Int8
> & getUnoTunnelId() throw();
510 virtual sal_Int64 SAL_CALL
getSomething( const ::com::sun::star::uno::Sequence
< sal_Int8
>& aIdentifier
) throw(::com::sun::star::uno::RuntimeException
);
512 // ::com::sun::star::uno::XInterface
513 virtual ::com::sun::star::uno::Any SAL_CALL
queryAggregation( const ::com::sun::star::uno::Type
& rType
) throw(::com::sun::star::uno::RuntimeException
);
514 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface( const ::com::sun::star::uno::Type
& rType
) throw(::com::sun::star::uno::RuntimeException
);
515 virtual void SAL_CALL
acquire() throw();
516 virtual void SAL_CALL
release() throw();
518 // ::com::sun::star::lang::XTypeProvider
519 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
getTypes( ) throw(::com::sun::star::uno::RuntimeException
);
520 virtual ::com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId( ) throw(::com::sun::star::uno::RuntimeException
);
523 // ====================================================================
525 #include <cppuhelper/implbase1.hxx>
527 class SvxUnoTextContentEnumeration
: public ::cppu::WeakAggImplHelper1
< ::com::sun::star::container::XEnumeration
>
530 ::com::sun::star::uno::Reference
< ::com::sun::star::text::XText
> xParentText
;
531 SvxEditSource
* pEditSource
;
532 sal_uInt16 nNextParagraph
;
533 const SvxUnoTextBase
& rText
;
536 SvxUnoTextContentEnumeration( const SvxUnoTextBase
& _rText
) throw();
537 virtual ~SvxUnoTextContentEnumeration() throw();
539 // ::com::sun::star::container::XEnumeration
540 virtual sal_Bool SAL_CALL
hasMoreElements( ) throw(::com::sun::star::uno::RuntimeException
);
541 virtual ::com::sun::star::uno::Any SAL_CALL
nextElement( ) throw(::com::sun::star::container::NoSuchElementException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
544 // ====================================================================
545 }//end of namespace binfilter
546 #ifndef _COM_SUN_STAR_TEXT_XTEXTCONTENT_HPP_
547 #include <com/sun/star/text/XTextContent.hpp>
549 namespace binfilter
{
551 class SvxUnoTextContent
: public SvxUnoTextRangeBase
,
552 public ::com::sun::star::text::XTextContent
,
553 public ::com::sun::star::container::XEnumerationAccess
,
554 public ::com::sun::star::lang::XTypeProvider
,
555 public ::cppu::OWeakAggObject
558 ::com::sun::star::uno::Reference
< ::com::sun::star::text::XText
> xParentText
;
559 sal_uInt16 nParagraph
;
560 const SvxUnoTextBase
& rParentText
;
563 ::osl::Mutex aDisposeContainerMutex
;
564 ::cppu::OInterfaceContainerHelper aDisposeListeners
;
568 static ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> maTypeSequence
;
571 SvxUnoTextContent( const SvxUnoTextBase
& rText
, sal_uInt16 nPara
) throw();
572 SvxUnoTextContent( const SvxUnoTextContent
& rContent
) throw();
573 virtual ~SvxUnoTextContent() throw();
575 // ::com::sun::star::uno::XInterface
576 virtual ::com::sun::star::uno::Any SAL_CALL
queryAggregation( const ::com::sun::star::uno::Type
& rType
) throw(::com::sun::star::uno::RuntimeException
);
577 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface( const ::com::sun::star::uno::Type
& rType
) throw(::com::sun::star::uno::RuntimeException
);
578 virtual void SAL_CALL
acquire() throw();
579 virtual void SAL_CALL
release() throw();
581 // ::com::sun::star::text::XTextRange
582 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::text::XText
> SAL_CALL
getText( ) throw(::com::sun::star::uno::RuntimeException
);
584 // ::com::sun::star::text::XTextContent -> ::com::sun::star::lang::XComponent
585 virtual void SAL_CALL
attach( const ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextRange
>& xTextRange
) throw(::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::uno::RuntimeException
);
586 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextRange
> SAL_CALL
getAnchor( ) throw(::com::sun::star::uno::RuntimeException
);
588 // ::com::sun::star::lang::XComponent
589 virtual void SAL_CALL
dispose() throw(::com::sun::star::uno::RuntimeException
);
590 virtual void SAL_CALL
addEventListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XEventListener
>& xListener
) throw(::com::sun::star::uno::RuntimeException
);
591 virtual void SAL_CALL
removeEventListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XEventListener
>& aListener
) throw(::com::sun::star::uno::RuntimeException
);
593 // ::com::sun::star::container::XEnumerationAccess
594 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XEnumeration
> SAL_CALL
createEnumeration( ) throw(::com::sun::star::uno::RuntimeException
);
596 // ::com::sun::star::container::XElementAccess
597 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType() throw(::com::sun::star::uno::RuntimeException
);
598 virtual sal_Bool SAL_CALL
hasElements() throw(::com::sun::star::uno::RuntimeException
);
600 // ::com::sun::star::beans::XPropertySet
601 virtual void SAL_CALL
setPropertyValue( const ::rtl::OUString
& aPropertyName
, const ::com::sun::star::uno::Any
& aValue
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
602 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue( const ::rtl::OUString
& PropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
605 virtual void SAL_CALL
setPropertyValues( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyNames
, const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
>& aValues
) throw (::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
606 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
> SAL_CALL
getPropertyValues( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyNames
) throw (::com::sun::star::uno::RuntimeException
);
608 // ::com::sun::star::beans::XPropertyState
609 virtual ::com::sun::star::beans::PropertyState SAL_CALL
getPropertyState( const ::rtl::OUString
& PropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::uno::RuntimeException
);
610 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyState
> SAL_CALL
getPropertyStates( const ::com::sun::star::uno::Sequence
< ::rtl::OUString
>& aPropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::uno::RuntimeException
);
611 virtual void SAL_CALL
setPropertyToDefault( const ::rtl::OUString
& PropertyName
) throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::uno::RuntimeException
);
613 // ::com::sun::star::lang::XServiceInfo
614 virtual ::rtl::OUString SAL_CALL
getImplementationName() throw(::com::sun::star::uno::RuntimeException
);
615 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException
);
617 // ::com::sun::star::lang::XTypeProvider
618 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
getTypes( ) throw(::com::sun::star::uno::RuntimeException
);
619 virtual ::com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId( ) throw(::com::sun::star::uno::RuntimeException
);
623 // ====================================================================
625 class SvxUnoTextRangeEnumeration
: public ::cppu::WeakAggImplHelper1
< ::com::sun::star::container::XEnumeration
>
628 SvxEditSource
* pEditSource
;
629 ::com::sun::star::uno::Reference
< ::com::sun::star::text::XText
> xParentText
;
630 const SvxUnoTextBase
& rParentText
;
631 sal_uInt16 nParagraph
;
632 SvUShorts
* pPortions
;
633 sal_uInt16 nNextPortion
;
636 SvxUnoTextRangeEnumeration( const SvxUnoTextBase
& rText
, sal_uInt16 nPara
) throw();
637 virtual ~SvxUnoTextRangeEnumeration() throw();
639 // ::com::sun::star::container::XEnumeration
640 virtual sal_Bool SAL_CALL
hasMoreElements( ) throw(::com::sun::star::uno::RuntimeException
);
641 virtual ::com::sun::star::uno::Any SAL_CALL
nextElement( ) throw(::com::sun::star::container::NoSuchElementException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
644 // ====================================================================
646 class SvxUnoTextCursor
: public SvxUnoTextRangeBase
,
647 public ::com::sun::star::text::XTextCursor
,
648 public ::com::sun::star::lang::XTypeProvider
,
649 public ::cppu::OWeakAggObject
652 ::com::sun::star::uno::Reference
< ::com::sun::star::text::XText
> xParentText
;
655 static ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> maTypeSequence
;
658 SvxUnoTextCursor( const SvxUnoTextBase
& rText
) throw();
659 SvxUnoTextCursor( const SvxUnoTextCursor
& rCursor
) throw();
660 virtual ~SvxUnoTextCursor() throw();
662 // ::com::sun::star::uno::XInterface
663 virtual ::com::sun::star::uno::Any SAL_CALL
queryAggregation( const ::com::sun::star::uno::Type
& rType
) throw(::com::sun::star::uno::RuntimeException
);
664 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface( const ::com::sun::star::uno::Type
& rType
) throw(::com::sun::star::uno::RuntimeException
);
665 virtual void SAL_CALL
acquire() throw();
666 virtual void SAL_CALL
release() throw();
668 // ::com::sun::star::text::XTextRange
669 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::text::XText
> SAL_CALL
getText() throw(::com::sun::star::uno::RuntimeException
);
670 virtual ::rtl::OUString SAL_CALL
getString() throw(::com::sun::star::uno::RuntimeException
);
671 virtual void SAL_CALL
setString( const ::rtl::OUString
& aString
) throw(::com::sun::star::uno::RuntimeException
);
672 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextRange
> SAL_CALL
getStart() throw(::com::sun::star::uno::RuntimeException
);
673 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextRange
> SAL_CALL
getEnd() throw(::com::sun::star::uno::RuntimeException
);
675 // ::com::sun::star::text::XTextCursor -> ::com::sun::star::text::XTextRange
676 virtual void SAL_CALL
collapseToStart( ) throw(::com::sun::star::uno::RuntimeException
);
677 virtual void SAL_CALL
collapseToEnd( ) throw(::com::sun::star::uno::RuntimeException
);
678 virtual sal_Bool SAL_CALL
isCollapsed( ) throw(::com::sun::star::uno::RuntimeException
);
679 virtual sal_Bool SAL_CALL
goLeft( sal_Int16 nCount
, sal_Bool bExpand
) throw(::com::sun::star::uno::RuntimeException
);
680 virtual sal_Bool SAL_CALL
goRight( sal_Int16 nCount
, sal_Bool bExpand
) throw(::com::sun::star::uno::RuntimeException
);
681 virtual void SAL_CALL
gotoStart( sal_Bool bExpand
) throw(::com::sun::star::uno::RuntimeException
);
682 virtual void SAL_CALL
gotoEnd( sal_Bool bExpand
) throw(::com::sun::star::uno::RuntimeException
);
683 virtual void SAL_CALL
gotoRange( const ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextRange
>& xRange
, sal_Bool bExpand
) throw(::com::sun::star::uno::RuntimeException
);
685 // ::com::sun::star::lang::XServiceInfo
686 virtual ::rtl::OUString SAL_CALL
getImplementationName() throw(::com::sun::star::uno::RuntimeException
);
687 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
) throw(::com::sun::star::uno::RuntimeException
);
688 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException
);
690 // ::com::sun::star::lang::XTypeProvider
691 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
getTypes( ) throw(::com::sun::star::uno::RuntimeException
);
692 virtual ::com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId( ) throw(::com::sun::star::uno::RuntimeException
);
696 const SfxItemPropertyMap
* ImplGetSvxUnoOutlinerTextCursorPropertyMap();
697 const SfxItemPropertyMap
* ImplGetSvxTextPortionPropertyMap();
699 }//end of namespace binfilter