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