LibreOffice Module sw (master)  1
vbarange.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 #include "vbarange.hxx"
20 #include <vbahelper/vbahelper.hxx>
21 #include <basic/sberrors.hxx>
22 #include <tools/diagnose_ex.h>
23 #include "vbarangehelper.hxx"
24 #include <ooo/vba/word/WdBreakType.hpp>
25 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
26 #include <com/sun/star/style/BreakType.hpp>
27 #include <com/sun/star/text/ControlCharacter.hpp>
28 #include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
29 #include <com/sun/star/text/XTextRangeCompare.hpp>
30 #include <com/sun/star/text/XWordCursor.hpp>
31 #include <com/sun/star/text/XParagraphCursor.hpp>
32 #include <com/sun/star/text/XTextViewCursor.hpp>
33 #include <ooo/vba/word/WdUnits.hpp>
34 #include <ooo/vba/word/WdMovementType.hpp>
35 #include "vbaparagraphformat.hxx"
36 #include "vbastyle.hxx"
37 #include "vbafont.hxx"
38 #include "vbapalette.hxx"
39 #include "vbapagesetup.hxx"
40 #include "vbalistformat.hxx"
41 #include "vbarevisions.hxx"
42 #include "vbabookmarks.hxx"
43 #include "vbasections.hxx"
44 #include "vbafield.hxx"
45 #include "wordvbahelper.hxx"
46 
47 using namespace ::ooo::vba;
48 using namespace ::com::sun::star;
49 
50 SwVbaRange::SwVbaRange( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& rTextDocument, const uno::Reference< text::XTextRange >& rStart ) : SwVbaRange_BASE( rParent, rContext ), mxTextDocument( rTextDocument )
51 {
52  uno::Reference< text::XTextRange > xEnd;
53  initialize( rStart, xEnd );
54 }
55 
56 SwVbaRange::SwVbaRange( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& rTextDocument, const uno::Reference< text::XTextRange >& rStart, const uno::Reference< text::XTextRange >& rEnd ) : SwVbaRange_BASE( rParent, rContext ), mxTextDocument( rTextDocument )
57 {
58  initialize( rStart, rEnd );
59 }
60 
61 SwVbaRange::SwVbaRange( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< text::XTextDocument >& rTextDocument, const uno::Reference< text::XTextRange >& rStart, const uno::Reference< text::XTextRange >& rEnd, const uno::Reference< text::XText >& rText ) : SwVbaRange_BASE( rParent, rContext ),mxTextDocument( rTextDocument ), mxText( rText )
62 {
63  initialize( rStart, rEnd );
64 }
65 
67 {
68 }
69 
70 void SwVbaRange::initialize( const uno::Reference< text::XTextRange >& rStart, const uno::Reference< text::XTextRange >& rEnd )
71 {
72  if( !mxText.is() )
73  {
74  mxText = mxTextDocument->getText();
75  }
76 
78  if( !mxTextCursor.is() )
79  throw uno::RuntimeException("Fails to create text cursor" );
80  mxTextCursor->collapseToStart();
81 
82  if( rEnd.is() )
83  mxTextCursor->gotoRange( rEnd, true );
84  else
85  mxTextCursor->gotoEnd( true );
86 }
87 
88 uno::Reference< text::XTextRange > SAL_CALL
90 {
91  uno::Reference< text::XTextRange > xTextRange( mxTextCursor, uno::UNO_QUERY_THROW );
92  return xTextRange;
93 }
94 
100 OUString SAL_CALL
102 {
103  OUString aText = mxTextCursor->getString();
104  sal_Int32 nLen = aText.getLength();
105 
106  // FIXME: should add a line separator if the range includes the last paragraph
107  if( nLen == 0 )
108  {
109  if( mxTextCursor->isCollapsed() )
110  {
111  mxTextCursor->goRight( 1, true );
112  aText = mxTextCursor->getString();
113  mxTextCursor->collapseToStart();
114  }
115  else
116  {
117  uno::Reference< text::XTextRange > xStart = mxTextCursor->getStart();
118  uno::Reference< text::XTextRange > xEnd = mxTextCursor->getEnd();
119  mxTextCursor->collapseToEnd();
120  mxTextCursor->goRight( 1, true );
121  mxTextCursor->gotoRange( xStart, false );
122  mxTextCursor->gotoRange( xEnd, true );
123  }
124  }
125 
126  return aText;
127 }
128 
129 void SAL_CALL
130 SwVbaRange::setText( const OUString& rText )
131 {
132  // Emulate the MSWord behavior, Don't delete the bookmark
133  // which contains no text string in current inserting position,
134  OUString sName;
135  uno::Reference< text::XTextRange > xRange( mxTextCursor, uno::UNO_QUERY_THROW );
136  try
137  {
138  uno::Reference< text::XTextContent > xBookmark = SwVbaRangeHelper::findBookmarkByPosition( mxTextDocument, xRange->getStart() );
139  if( xBookmark.is() )
140  {
141  uno::Reference< container::XNamed > xNamed( xBookmark, uno::UNO_QUERY_THROW );
142  sName = xNamed->getName();
143  }
144  }
145  catch (const uno::Exception&)
146  {
147  // do nothing
148  }
149 
150  if( rText.indexOf( '\n' ) != -1 )
151  {
152  mxTextCursor->setString( OUString() );
153  // process CR in strings
154  SwVbaRangeHelper::insertString( xRange, mxText, rText, true );
155  }
156  else
157  {
158  mxTextCursor->setString( rText );
159  }
160 
161  // insert the bookmark if the bookmark is deleted during setting text string
162  if( !sName.isEmpty() )
163  {
164  uno::Reference< text::XBookmarksSupplier > xBookmarksSupplier( mxTextDocument, uno::UNO_QUERY_THROW );
165  uno::Reference< container::XNameAccess > xNameAccess( xBookmarksSupplier->getBookmarks(), uno::UNO_SET_THROW );
166  if( !xNameAccess->hasByName( sName ) )
167  {
168  uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW );
169  SwVbaBookmarks::addBookmarkByName( xModel, sName, xRange->getStart() );
170  }
171  }
172 }
173 
174 // FIXME: test is not pass
175 void SAL_CALL SwVbaRange::InsertBreak(const uno::Any& _breakType)
176 {
177  // default type is wdPageBreak;
178  sal_Int32 nBreakType = word::WdBreakType::wdPageBreak;
179  if( _breakType.hasValue() )
180  _breakType >>= nBreakType;
181 
182  style::BreakType eBreakType = style::BreakType_NONE;
183  switch( nBreakType )
184  {
185  case word::WdBreakType::wdPageBreak:
186  eBreakType = style::BreakType_PAGE_BEFORE;
187  break;
188  case word::WdBreakType::wdColumnBreak:
189  eBreakType = style::BreakType_COLUMN_AFTER;
190  break;
191  case word::WdBreakType::wdLineBreak:
192  case word::WdBreakType::wdLineBreakClearLeft:
193  case word::WdBreakType::wdLineBreakClearRight:
194  case word::WdBreakType::wdSectionBreakContinuous:
195  case word::WdBreakType::wdSectionBreakEvenPage:
196  case word::WdBreakType::wdSectionBreakNextPage:
197  case word::WdBreakType::wdSectionBreakOddPage:
198  case word::WdBreakType::wdTextWrappingBreak:
199  DebugHelper::basicexception( ERRCODE_BASIC_NOT_IMPLEMENTED, OUString() );
200  break;
201  default:
202  DebugHelper::basicexception( ERRCODE_BASIC_BAD_PARAMETER, OUString() );
203  }
204 
205  if( eBreakType != style::BreakType_NONE )
206  {
207  if( !mxTextCursor->isCollapsed() )
208  {
209  mxTextCursor->setString( OUString() );
210  mxTextCursor->collapseToStart();
211  }
212 
213  uno::Reference< beans::XPropertySet > xProp( mxTextCursor, uno::UNO_QUERY_THROW );
214  xProp->setPropertyValue("BreakType", uno::makeAny( eBreakType ) );
215  }
216 }
217 
218 void SAL_CALL
220 {
221  uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW );
222  uno::Reference< text::XTextViewCursor > xTextViewCursor = word::getXTextViewCursor( xModel );
223  xTextViewCursor->gotoRange( mxTextCursor->getStart(), false );
224  xTextViewCursor->gotoRange( mxTextCursor->getEnd(), true );
225 }
226 
227 void SAL_CALL
229 {
230  mxTextCursor->setString( "" );
232 }
233 
234 void SAL_CALL
236 {
237  uno::Reference< text::XTextRange > xTextRange = mxTextCursor->getStart();
238  mxText->insertControlCharacter( xTextRange, text::ControlCharacter::PARAGRAPH_BREAK, true );
239  mxTextCursor->gotoRange( xTextRange, true );
240 }
241 
242 void SAL_CALL
244 {
245  uno::Reference< text::XTextRange > xTextRange = mxTextCursor->getEnd();
246  mxText->insertControlCharacter( xTextRange, text::ControlCharacter::PARAGRAPH_BREAK, true );
247 }
248 
249 uno::Reference< word::XParagraphFormat > SAL_CALL
251 {
252  uno::Reference< beans::XPropertySet > xParaProps( mxTextCursor, uno::UNO_QUERY_THROW );
253  return uno::Reference< word::XParagraphFormat >( new SwVbaParagraphFormat( this, mxContext, xParaProps ) );
254 }
255 
256 void SAL_CALL
257 SwVbaRange::setParagraphFormat( const uno::Reference< word::XParagraphFormat >& /*rParagraphFormat*/ )
258 {
259  throw uno::RuntimeException("Not implemented" );
260 }
261 
262 void SwVbaRange::GetStyleInfo(OUString& aStyleName, OUString& aStyleType )
263 {
264  uno::Reference< beans::XPropertySet > xProp( mxTextCursor, uno::UNO_QUERY_THROW );
265  if( ( xProp->getPropertyValue("CharStyleName") >>= aStyleName ) && !aStyleName.isEmpty() )
266  {
267  aStyleType = "CharacterStyles";
268  }
269  else if( ( xProp->getPropertyValue("ParaStyleName") >>= aStyleName ) && !aStyleName.isEmpty() )
270  {
271  aStyleType = "ParagraphStyles";
272  }
273  if( aStyleType.isEmpty() )
274  {
275  DebugHelper::runtimeexception( ERRCODE_BASIC_INTERNAL_ERROR );
276  }
277 }
278 
279 uno::Any SAL_CALL
281 {
282  OUString aStyleName;
283  OUString aStyleType;
284  GetStyleInfo( aStyleName, aStyleType );
285  uno::Reference< style::XStyleFamiliesSupplier > xStyleSupplier( mxTextDocument, uno::UNO_QUERY_THROW);
286  uno::Reference< container::XNameAccess > xStylesAccess( xStyleSupplier->getStyleFamilies()->getByName( aStyleType ), uno::UNO_QUERY_THROW );
287  uno::Reference< beans::XPropertySet > xStyleProps( xStylesAccess->getByName( aStyleName ), uno::UNO_QUERY_THROW );
288  uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW );
289  return uno::makeAny( uno::Reference< word::XStyle >( new SwVbaStyle( this, mxContext, xModel, xStyleProps ) ) );
290 }
291 
292 void SAL_CALL
294 {
295  uno::Reference< beans::XPropertySet > xParaProps( mxTextCursor, uno::UNO_QUERY_THROW );
296  SwVbaStyle::setStyle( xParaProps, rStyle );
297 }
298 
299 uno::Reference< word::XFont > SAL_CALL
301 {
302  VbaPalette aColors;
303  return new SwVbaFont( mxParent, mxContext, aColors.getPalette(), uno::Reference< beans::XPropertySet >( getXTextRange(), uno::UNO_QUERY_THROW ) );
304 }
305 
306 uno::Reference< word::XListFormat > SAL_CALL
308 {
309  return uno::Reference< word::XListFormat >( new SwVbaListFormat( this, mxContext, getXTextRange() ) );
310 }
311 
312 ::sal_Int32 SAL_CALL SwVbaRange::getLanguageID()
313 {
314  uno::Reference< beans::XPropertySet > xParaProps( mxTextCursor, uno::UNO_QUERY_THROW );
315  return static_cast<sal_uInt16>(SwVbaStyle::getLanguageID( xParaProps ));
316 }
317 
318 void SAL_CALL SwVbaRange::setLanguageID( ::sal_Int32 _languageid )
319 {
320  uno::Reference< beans::XPropertySet > xParaProps( mxTextCursor, uno::UNO_QUERY_THROW );
321  SwVbaStyle::setLanguageID( xParaProps, LanguageType(_languageid) );
322 }
323 
324 uno::Any SAL_CALL
326 {
327  uno::Reference< beans::XPropertySet > xParaProps( mxTextCursor, uno::UNO_QUERY_THROW );
328  uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW );
329  OUString aPageStyleName;
330  xParaProps->getPropertyValue("PageStyleName") >>= aPageStyleName;
331  uno::Reference< style::XStyleFamiliesSupplier > xSytleFamSupp( xModel, uno::UNO_QUERY_THROW );
332  uno::Reference< container::XNameAccess > xSytleFamNames( xSytleFamSupp->getStyleFamilies(), uno::UNO_SET_THROW );
333  uno::Reference< container::XNameAccess > xPageStyles( xSytleFamNames->getByName("PageStyles"), uno::UNO_QUERY_THROW );
334  uno::Reference< beans::XPropertySet > xPageProps( xPageStyles->getByName( aPageStyleName ), uno::UNO_QUERY_THROW );
335  return uno::makeAny( uno::Reference< word::XPageSetup >( new SwVbaPageSetup( this, mxContext, xModel, xPageProps ) ) );
336 }
337 
338 ::sal_Int32 SAL_CALL SwVbaRange::getStart()
339 {
340  uno::Reference< text::XText > xText = mxTextDocument->getText();
341  return SwVbaRangeHelper::getPosition( xText, mxTextCursor->getStart() );
342 }
343 
344 void SAL_CALL SwVbaRange::setStart( ::sal_Int32 _start )
345 {
346  uno::Reference< text::XText > xText = mxTextDocument->getText();
347  uno::Reference< text::XTextRange > xStart = SwVbaRangeHelper::getRangeByPosition( xText, _start );
348  uno::Reference< text::XTextRange > xEnd = mxTextCursor->getEnd();
349 
350  mxTextCursor->gotoRange( xStart, false );
351  mxTextCursor->gotoRange( xEnd, true );
352 }
353 
354 ::sal_Int32 SAL_CALL SwVbaRange::getEnd()
355 {
356  uno::Reference< text::XText > xText = mxTextDocument->getText();
357  return SwVbaRangeHelper::getPosition( xText, mxTextCursor->getEnd() );
358 }
359 
360 void SAL_CALL SwVbaRange::setEnd( ::sal_Int32 _end )
361 {
362  uno::Reference< text::XText > xText = mxTextDocument->getText();
363  uno::Reference< text::XTextRange > xEnd = SwVbaRangeHelper::getRangeByPosition( xText, _end );
364 
365  mxTextCursor->collapseToStart();
366  mxTextCursor->gotoRange( xEnd, true );
367 }
368 
369 sal_Bool SAL_CALL SwVbaRange::InRange( const uno::Reference< ::ooo::vba::word::XRange >& Range )
370 {
371  SwVbaRange* pRange = dynamic_cast< SwVbaRange* >( Range.get() );
372  if( !pRange )
373  throw uno::RuntimeException();
374  uno::Reference< text::XTextRange > xTextRange = pRange->getXTextRange();
375  uno::Reference< text::XTextRangeCompare > xTRC( mxTextCursor->getText(), uno::UNO_QUERY_THROW );
376  if( xTRC->compareRegionStarts( xTextRange, getXTextRange() ) >= 0 && xTRC->compareRegionEnds( xTextRange, getXTextRange() ) <= 0 )
377  return true;
378  return false;
379 }
380 
381 uno::Any SAL_CALL
383 {
384  uno::Reference< text::XTextRange > xTextRange = getXTextRange();
385  uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW );
386  uno::Reference< XCollection > xCol( new SwVbaRevisions( mxParent, mxContext, xModel, xTextRange ) );
387  if ( index.hasValue() )
388  return xCol->Item( index, uno::Any() );
389  return uno::makeAny( xCol );
390 }
391 
392 uno::Any SAL_CALL
394 {
395  uno::Reference< text::XTextRange > xTextRange = getXTextRange();
396  uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW );
397  uno::Reference< XCollection > xCol( new SwVbaSections( mxParent, mxContext, xModel, xTextRange ) );
398  if ( index.hasValue() )
399  return xCol->Item( index, uno::Any() );
400  return uno::makeAny( xCol );
401 }
402 
403 uno::Any SAL_CALL
405 {
406  //FIXME: should be get the field in current range
407  uno::Reference< frame::XModel > xModel( mxTextDocument, uno::UNO_QUERY_THROW );
408  uno::Reference< XCollection > xCol( new SwVbaFields( mxParent, mxContext, xModel ) );
409  if ( index.hasValue() )
410  return xCol->Item( index, uno::Any() );
411  return uno::makeAny( xCol );
412 }
413 
414 OUString
416 {
417  return "SwVbaRange";
418 }
419 
420 uno::Sequence< OUString >
422 {
423  static uno::Sequence< OUString > const aServiceNames
424  {
425  "ooo.vba.word.Range"
426  };
427  return aServiceNames;
428 }
429 
430 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static css::uno::Reference< css::text::XTextContent > findBookmarkByPosition(const css::uno::Reference< css::text::XTextDocument > &xTextDoc, const css::uno::Reference< css::text::XTextRange > &xTextRange)
static css::uno::Reference< css::text::XTextCursor > initCursor(const css::uno::Reference< css::text::XTextRange > &rTextRange, const css::uno::Reference< css::text::XText > &rText)
virtual sal_Bool SAL_CALL InRange(const css::uno::Reference< ::ooo::vba::word::XRange > &Range) override
Definition: vbarange.cxx:369
virtual void SAL_CALL setText(const OUString &rText) override
Definition: vbarange.cxx:130
bool hasValue()
virtual css::uno::Any SAL_CALL Revisions(const css::uno::Any &aIndex) override
Definition: vbarange.cxx:382
virtual css::uno::Any SAL_CALL getStyle() override
Definition: vbarange.cxx:280
virtual void SAL_CALL setLanguageID(::sal_Int32 _languageid) override
Definition: vbarange.cxx:318
virtual ::sal_Int32 SAL_CALL getStart() override
Definition: vbarange.cxx:338
css::uno::Reference< css::text::XTextDocument > mxTextDocument
Definition: vbarange.hxx:35
static sal_Int32 getPosition(const css::uno::Reference< css::text::XText > &rText, const css::uno::Reference< css::text::XTextRange > &rTextRange)
static css::uno::Reference< css::text::XTextRange > getRangeByPosition(const css::uno::Reference< css::text::XText > &rText, sal_Int32 _position)
get a range in a xText by creating a cursor that iterates over the text.
#define ERRCODE_BASIC_NOT_IMPLEMENTED
virtual css::uno::Reference< ooo::vba::word::XParagraphFormat > SAL_CALL getParagraphFormat() override
Definition: vbarange.cxx:250
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getXTextRange() override
Definition: vbarange.cxx:89
uno::Reference< text::XTextViewCursor > getXTextViewCursor(const uno::Reference< frame::XModel > &xModel)
virtual ~SwVbaRange() override
Definition: vbarange.cxx:66
virtual css::uno::Reference< ooo::vba::word::XListFormat > SAL_CALL getListFormat() override
Definition: vbarange.cxx:307
virtual ::sal_Int32 SAL_CALL getEnd() override
Definition: vbarange.cxx:354
virtual css::uno::Reference< ooo::vba::word::XFont > SAL_CALL getFont() override
Definition: vbarange.cxx:300
virtual void SAL_CALL Select() override
Definition: vbarange.cxx:219
void GetStyleInfo(OUString &aStyleName, OUString &aStyleType)
Definition: vbarange.cxx:262
virtual css::uno::Any SAL_CALL PageSetup() override
Definition: vbarange.cxx:325
virtual void SAL_CALL InsertParagraphAfter() override
Definition: vbarange.cxx:243
static void insertString(css::uno::Reference< css::text::XTextRange > const &rTextRange, css::uno::Reference< css::text::XText > const &rText, const OUString &rStr, bool _bAbsorb)
virtual ::sal_Int32 SAL_CALL getLanguageID() override
Definition: vbastyle.cxx:64
virtual css::uno::Any SAL_CALL Fields(const css::uno::Any &aIndex) override
Definition: vbarange.cxx:404
OUString sName
virtual OUString SAL_CALL getText() override
The complexity in this method is because we need to workaround an issue that the last paragraph in a ...
Definition: vbarange.cxx:101
virtual ::sal_Int32 SAL_CALL getLanguageID() override
Definition: vbarange.cxx:312
const css::uno::Reference< css::container::XIndexAccess > & getPalette() const
Definition: vbapalette.hxx:32
unsigned char sal_Bool
virtual void SAL_CALL setStart(::sal_Int32 _start) override
Definition: vbarange.cxx:344
css::uno::WeakReference< ov::XHelperInterface > mxParent
static void setStyle(const css::uno::Reference< css::beans::XPropertySet > &xParaProps, const css::uno::Any &xStyle)
Definition: vbastyle.cxx:94
#define ERRCODE_BASIC_BAD_PARAMETER
virtual void SAL_CALL InsertParagraph() override
Definition: vbarange.cxx:228
css::uno::Reference< css::text::XTextCursor > mxTextCursor
Definition: vbarange.hxx:36
virtual OUString getServiceImplName() override
Definition: vbarange.cxx:415
static void addBookmarkByName(const css::uno::Reference< css::frame::XModel > &xModel, const OUString &rName, const css::uno::Reference< css::text::XTextRange > &rTextRange)
css::uno::Reference< css::uno::XComponentContext > mxContext
SwVbaRange(const css::uno::Reference< ooo::vba::XHelperInterface > &rParent, const css::uno::Reference< css::uno::XComponentContext > &rContext, const css::uno::Reference< css::text::XTextDocument > &rTextDocument, const css::uno::Reference< css::text::XTextRange > &rStart)
#define ERRCODE_BASIC_INTERNAL_ERROR
virtual css::uno::Any SAL_CALL Sections(const css::uno::Any &aIndex) override
Definition: vbarange.cxx:393
void initialize(const css::uno::Reference< css::text::XTextRange > &rStart, const css::uno::Reference< css::text::XTextRange > &rEnd)
Definition: vbarange.cxx:70
virtual css::uno::Sequence< OUString > getServiceNames() override
Definition: vbarange.cxx:421
virtual void SAL_CALL setEnd(::sal_Int32 _end) override
Definition: vbarange.cxx:360
css::uno::Reference< css::text::XText > mxText
Definition: vbarange.hxx:37
virtual void SAL_CALL setParagraphFormat(const css::uno::Reference< ooo::vba::word::XParagraphFormat > &rParagraphFormat) override
Definition: vbarange.cxx:257
virtual void SAL_CALL setStyle(const css::uno::Any &_xStyle) override
Definition: vbarange.cxx:293
Reference< XModel > xModel
virtual void SAL_CALL InsertBreak(const css::uno::Any &_breakType) override
Definition: vbarange.cxx:175
static void setLanguageID(const css::uno::Reference< css::beans::XPropertySet > &xTCProps, LanguageType _languageid)
virtual void SAL_CALL InsertParagraphBefore() override
Definition: vbarange.cxx:235