Line data Source code
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 <com/sun/star/container/XNamed.hpp>
20 : #include <com/sun/star/view/XSelectionSupplier.hpp>
21 : #include <com/sun/star/text/WrapTextMode.hpp>
22 : #include <ooo/vba/msforms/XShapeRange.hpp>
23 : #include <ooo/vba/office/MsoAutoShapeType.hpp>
24 : #include <ooo/vba/office/MsoTextOrientation.hpp>
25 : #include <com/sun/star/lang/XServiceInfo.hpp>
26 : #include <com/sun/star/text/XText.hpp>
27 : #include <com/sun/star/text/XTextDocument.hpp>
28 : #include <com/sun/star/text/XTextContent.hpp>
29 : #include <com/sun/star/text/TextContentAnchorType.hpp>
30 : #include <com/sun/star/text/HoriOrientation.hpp>
31 : #include <com/sun/star/text/VertOrientation.hpp>
32 : #include <com/sun/star/text/RelOrientation.hpp>
33 : #include <com/sun/star/text/SizeType.hpp>
34 : #include <com/sun/star/text/WritingMode.hpp>
35 : #include <com/sun/star/drawing/LineStyle.hpp>
36 :
37 : #include <vbahelper/vbahelper.hxx>
38 : #include <vbahelper/vbashape.hxx>
39 : #include <vbahelper/vbashapes.hxx>
40 : #include <vbahelper/vbashaperange.hxx>
41 :
42 : using namespace ::ooo::vba;
43 : using namespace ::com::sun::star;
44 :
45 0 : class VbShapeEnumHelper : public EnumerationHelper_BASE
46 : {
47 : uno::Reference<msforms::XShapes > m_xParent;
48 : uno::Reference<container::XIndexAccess > m_xIndexAccess;
49 : sal_Int32 nIndex;
50 : public:
51 0 : VbShapeEnumHelper( const uno::Reference< msforms::XShapes >& xParent, const uno::Reference< container::XIndexAccess >& xIndexAccess ) : m_xParent( xParent ), m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {}
52 0 : virtual ::sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException)
53 : {
54 0 : return ( nIndex < m_xIndexAccess->getCount() );
55 : }
56 0 : virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
57 : {
58 0 : ScVbaShapes* pShapes = dynamic_cast< ScVbaShapes* >(m_xParent.get());
59 0 : if ( pShapes && hasMoreElements() )
60 0 : return pShapes->createCollectionObject( m_xIndexAccess->getByIndex( nIndex++ ) );
61 0 : throw container::NoSuchElementException();
62 : }
63 :
64 : };
65 :
66 42 : void ScVbaShapes::initBaseCollection()
67 : {
68 42 : if ( m_xNameAccess.is() ) // already has NameAccess
69 42 : return;
70 : // no NameAccess then use ShapeCollectionHelper
71 42 : XNamedObjectCollectionHelper< drawing::XShape >::XNamedVec mShapes;
72 42 : sal_Int32 nLen = m_xIndexAccess->getCount();
73 42 : mShapes.reserve( nLen );
74 174 : for ( sal_Int32 index=0; index<nLen; ++index )
75 132 : mShapes.push_back( uno::Reference< drawing::XShape >( m_xIndexAccess->getByIndex( index ) , uno::UNO_QUERY ) );
76 84 : uno::Reference< container::XIndexAccess > xShapes( new XNamedObjectCollectionHelper< drawing::XShape >( mShapes ) );
77 42 : m_xIndexAccess.set( xShapes, uno::UNO_QUERY );
78 84 : m_xNameAccess.set( xShapes, uno::UNO_QUERY );
79 : }
80 :
81 42 : ScVbaShapes::ScVbaShapes( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess > xShapes, const uno::Reference< frame::XModel>& xModel ): ScVbaShapes_BASE( xParent, xContext, xShapes, sal_True ), m_nNewShapeCount(0), m_xModel( xModel )
82 : {
83 42 : m_xShapes.set( xShapes, uno::UNO_QUERY_THROW );
84 42 : m_xDrawPage.set( xShapes, uno::UNO_QUERY_THROW );
85 42 : initBaseCollection();
86 42 : }
87 :
88 : uno::Reference< container::XEnumeration >
89 0 : ScVbaShapes::createEnumeration() throw (uno::RuntimeException)
90 : {
91 0 : return new VbShapeEnumHelper( this, m_xIndexAccess );
92 : }
93 :
94 : uno::Any
95 33 : ScVbaShapes::createCollectionObject( const css::uno::Any& aSource ) throw (uno::RuntimeException)
96 : {
97 33 : if( aSource.hasValue() )
98 : {
99 33 : uno::Reference< drawing::XShape > xShape( aSource, uno::UNO_QUERY_THROW );
100 33 : return uno::makeAny( uno::Reference< msforms::XShape >( new ScVbaShape( getParent(), mxContext, xShape, m_xShapes, m_xModel, ScVbaShape::getType( xShape ) ) ) );
101 : }
102 0 : return uno::Any();
103 : }
104 :
105 : uno::Type
106 0 : ScVbaShapes::getElementType() throw (uno::RuntimeException)
107 : {
108 0 : return ooo::vba::msforms::XShape::static_type(0);
109 : }
110 :
111 : OUString
112 0 : ScVbaShapes::getServiceImplName()
113 : {
114 0 : return OUString("ScVbaShapes");
115 : }
116 :
117 : uno::Sequence< OUString >
118 0 : ScVbaShapes::getServiceNames()
119 : {
120 0 : static uno::Sequence< OUString > aServiceNames;
121 0 : if ( aServiceNames.getLength() == 0 )
122 : {
123 0 : aServiceNames.realloc( 1 );
124 0 : aServiceNames[ 0 ] = "ooo.vba.msform.Shapes";
125 : }
126 0 : return aServiceNames;
127 : }
128 :
129 : css::uno::Reference< css::container::XIndexAccess >
130 6 : ScVbaShapes::getShapesByArrayIndices( const uno::Any& Index ) throw (uno::RuntimeException)
131 : {
132 6 : if ( Index.getValueTypeClass() != uno::TypeClass_SEQUENCE )
133 0 : throw uno::RuntimeException();
134 :
135 6 : uno::Reference< script::XTypeConverter > xConverter = getTypeConverter(mxContext);
136 12 : uno::Any aConverted;
137 6 : aConverted = xConverter->convertTo( Index, getCppuType((uno::Sequence< uno::Any >*)0) );
138 :
139 12 : uno::Sequence< uno::Any > sIndices;
140 6 : aConverted >>= sIndices;
141 12 : XNamedObjectCollectionHelper< drawing::XShape >::XNamedVec mShapes;
142 6 : sal_Int32 nElems = sIndices.getLength();
143 16 : for( sal_Int32 index = 0; index < nElems; ++index )
144 : {
145 10 : uno::Reference< drawing::XShape > xShape;
146 10 : if ( sIndices[ index ].getValueTypeClass() == uno::TypeClass_STRING )
147 : {
148 3 : OUString sName;
149 3 : sIndices[ index ] >>= sName;
150 3 : xShape.set( m_xNameAccess->getByName( sName ), uno::UNO_QUERY );
151 : }
152 : else
153 : {
154 7 : sal_Int32 nIndex = 0;
155 7 : sIndices[ index ] >>= nIndex;
156 : // adjust for 1 based mso indexing
157 7 : xShape.set( m_xIndexAccess->getByIndex( nIndex - 1 ), uno::UNO_QUERY );
158 :
159 : }
160 : // populate map with drawing::XShapes
161 10 : if ( xShape.is() )
162 10 : mShapes.push_back( xShape );
163 10 : }
164 6 : uno::Reference< container::XIndexAccess > xIndexAccess( new XNamedObjectCollectionHelper< drawing::XShape >( mShapes ) );
165 12 : return xIndexAccess;
166 : }
167 :
168 : uno::Any SAL_CALL
169 33 : ScVbaShapes::Item( const uno::Any& Index, const uno::Any& Index2 ) throw (uno::RuntimeException)
170 : {
171 : // I don't think we need to support Array of indices for shapes
172 : /*
173 : if ( Index.getValueTypeClass() == uno::TypeClass_SEQUENCE )
174 : {
175 : uno::Reference< container::XIndexAccess > xIndexAccess( getShapesByArrayIndices( Index ) );
176 : // return new collection instance
177 : uno::Reference< XCollection > xShapesCollection( new ScVbaShapes( this->getParent(), mxContext, xIndexAccess ) );
178 : return uno::makeAny( xShapesCollection );
179 : }
180 : */
181 33 : return ScVbaShapes_BASE::Item( Index, Index2 );
182 : }
183 :
184 : uno::Reference< msforms::XShapeRange > SAL_CALL
185 6 : ScVbaShapes::Range( const uno::Any& shapes ) throw (css::uno::RuntimeException)
186 : {
187 : // shapes, can be an index or an array of indices
188 6 : uno::Reference< container::XIndexAccess > xShapes;
189 6 : if ( shapes.getValueTypeClass() == uno::TypeClass_SEQUENCE )
190 3 : xShapes = getShapesByArrayIndices( shapes );
191 : else
192 : {
193 : // wrap single index into a sequence
194 3 : uno::Sequence< uno::Any > sIndices(1);
195 3 : sIndices[ 0 ] = shapes;
196 6 : uno::Any aIndex;
197 3 : aIndex <<= sIndices;
198 6 : xShapes = getShapesByArrayIndices( aIndex );
199 : }
200 6 : return new ScVbaShapeRange( getParent(), mxContext, xShapes, m_xDrawPage, m_xModel );
201 : }
202 :
203 : void SAL_CALL
204 1 : ScVbaShapes::SelectAll() throw (uno::RuntimeException)
205 : {
206 1 : uno::Reference< view::XSelectionSupplier > xSelectSupp( m_xModel->getCurrentController(), uno::UNO_QUERY_THROW );
207 : try
208 : {
209 2 : xSelectSupp->select( uno::makeAny( m_xShapes ) );
210 : }
211 : // viewuno.cxx ScTabViewObj::select will throw IllegalArgumentException
212 : // if one of the shapes is no 'markable' e.g. a button
213 : // the method still works
214 1 : catch(const lang::IllegalArgumentException&)
215 : {
216 1 : }
217 1 : }
218 :
219 : uno::Reference< drawing::XShape >
220 2 : ScVbaShapes::createShape( OUString service ) throw (css::uno::RuntimeException)
221 : {
222 2 : uno::Reference< lang::XMultiServiceFactory > xMSF( m_xModel, uno::UNO_QUERY_THROW );
223 2 : uno::Reference< drawing::XShape > xShape( xMSF->createInstance( service ), uno::UNO_QUERY_THROW );
224 2 : return xShape;
225 : }
226 :
227 : uno::Any
228 1 : ScVbaShapes::AddRectangle( sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight, uno::Any aRange ) throw (css::uno::RuntimeException)
229 : {
230 1 : OUString sCreateShapeName( "com.sun.star.drawing.RectangleShape" );
231 1 : sal_Int32 nXPos = Millimeter::getInHundredthsOfOneMillimeter( startX );
232 1 : sal_Int32 nYPos = Millimeter::getInHundredthsOfOneMillimeter( startY );
233 1 : sal_Int32 nWidth = Millimeter::getInHundredthsOfOneMillimeter( nLineWidth );
234 1 : sal_Int32 nHeight = Millimeter::getInHundredthsOfOneMillimeter( nLineHeight );
235 :
236 2 : uno::Reference< drawing::XShape > xShape( createShape( sCreateShapeName ), uno::UNO_QUERY_THROW );
237 1 : m_xShapes->add( xShape );
238 :
239 2 : OUString sName(createName( "Rectangle" ));
240 1 : setDefaultShapeProperties( xShape );
241 1 : setShape_NameProperty( xShape, sName );
242 :
243 1 : awt::Point aMovePositionIfRange(0, 0);
244 1 : awt::Point position;
245 1 : position.X = nXPos - aMovePositionIfRange.X;
246 1 : position.Y = nYPos - aMovePositionIfRange.Y;
247 1 : xShape->setPosition( position );
248 :
249 1 : awt::Size size;
250 1 : size.Height = nHeight;
251 1 : size.Width = nWidth;
252 1 : xShape->setSize( size );
253 :
254 1 : ScVbaShape *pScVbaShape = new ScVbaShape( getParent(), mxContext, xShape, m_xShapes, m_xModel, ScVbaShape::getType( xShape ) );
255 1 : pScVbaShape->setRange( aRange );
256 2 : return uno::makeAny( uno::Reference< msforms::XShape > ( pScVbaShape ) );
257 : }
258 :
259 : uno::Any
260 0 : ScVbaShapes::AddEllipse( sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight, uno::Any aRange ) throw (css::uno::RuntimeException)
261 : {
262 0 : OUString sCreateShapeName( "com.sun.star.drawing.EllipseShape" );
263 0 : sal_Int32 nXPos = Millimeter::getInHundredthsOfOneMillimeter( startX );
264 0 : sal_Int32 nYPos = Millimeter::getInHundredthsOfOneMillimeter( startY );
265 0 : sal_Int32 nWidth = Millimeter::getInHundredthsOfOneMillimeter( nLineWidth );
266 0 : sal_Int32 nHeight = Millimeter::getInHundredthsOfOneMillimeter( nLineHeight );
267 :
268 0 : uno::Reference< drawing::XShape > xShape( createShape( sCreateShapeName ), uno::UNO_QUERY_THROW );
269 0 : m_xShapes->add( xShape );
270 :
271 0 : awt::Point aMovePositionIfRange( 0, 0 );
272 : //TODO helperapi using a writer document
273 : /*
274 : XDocument xDocument = (XDocument)getParent();
275 : if (AnyConverter.isVoid(_aRange))
276 : {
277 : _aRange = xDocument.Range(new Integer(0), new Integer(1));
278 : // Top&Left in Word is Top&Left of the paper and not the writeable area.
279 : aMovePositionIfRange = calculateTopLeftMargin((HelperInterfaceAdaptor)xDocument);
280 : }
281 :
282 : setShape_AnchorTypeAndRangeProperty(xShape, _aRange);
283 : */
284 0 : OUString name(createName( "Oval" ));
285 0 : setDefaultShapeProperties(xShape);
286 0 : setShape_NameProperty(xShape, name);
287 :
288 0 : awt::Point position;
289 0 : position.X = nXPos - aMovePositionIfRange.X;
290 0 : position.Y = nYPos - aMovePositionIfRange.Y;
291 0 : xShape->setPosition(position);
292 :
293 0 : awt::Size size;
294 0 : size.Height = nHeight;
295 0 : size.Width = nWidth;
296 0 : xShape->setSize(size);
297 :
298 0 : ScVbaShape *pScVbaShape = new ScVbaShape( getParent(), mxContext, xShape, m_xShapes, m_xModel, ScVbaShape::getType( xShape ) );
299 0 : pScVbaShape->setRange( aRange );
300 0 : return uno::makeAny( uno::Reference< msforms::XShape > ( pScVbaShape ) );
301 : }
302 :
303 : //helpeapi calc
304 : uno::Any SAL_CALL
305 1 : ScVbaShapes::AddLine( sal_Int32 StartX, sal_Int32 StartY, sal_Int32 endX, sal_Int32 endY ) throw (uno::RuntimeException)
306 : {
307 1 : sal_Int32 nLineWidth = endX - StartX;
308 1 : sal_Int32 nLineHeight = endY - StartY;
309 :
310 1 : sal_Int32 nHeight = Millimeter::getInHundredthsOfOneMillimeter( nLineHeight );
311 1 : sal_Int32 nWidth = Millimeter::getInHundredthsOfOneMillimeter( nLineWidth );
312 1 : sal_Int32 nXPos = Millimeter::getInHundredthsOfOneMillimeter( StartX );
313 1 : sal_Int32 nYPos = Millimeter::getInHundredthsOfOneMillimeter( StartY );
314 :
315 1 : uno::Reference< drawing::XShape > xShape( createShape( "com.sun.star.drawing.LineShape" ), uno::UNO_QUERY_THROW );
316 1 : m_xShapes->add( xShape );
317 :
318 1 : awt::Point aMovePositionIfRange( 0, 0 );
319 :
320 2 : OUString name(createName( "Line" ));
321 1 : setDefaultShapeProperties(xShape);
322 1 : setShape_NameProperty(xShape, name);
323 :
324 1 : awt::Point position;
325 1 : position.X = nXPos - aMovePositionIfRange.X;
326 1 : position.Y = nYPos - aMovePositionIfRange.Y;
327 1 : xShape->setPosition(position);
328 :
329 1 : awt::Size size;
330 1 : size.Height = nHeight;
331 1 : size.Width = nWidth;
332 1 : xShape->setSize(size);
333 :
334 1 : ScVbaShape *pScVbaShape = new ScVbaShape( getParent(), mxContext, xShape, m_xShapes, m_xModel, ScVbaShape::getType( xShape ) );
335 2 : return uno::makeAny( uno::Reference< msforms::XShape > ( pScVbaShape ) );
336 : }
337 :
338 : uno::Any SAL_CALL
339 1 : ScVbaShapes::AddShape( sal_Int32 _nType, sal_Int32 _nLeft, sal_Int32 _nTop, sal_Int32 _nWidth, sal_Int32 _nHeight ) throw (uno::RuntimeException)
340 : {
341 1 : uno::Any _aAnchor;
342 1 : if (_nType == office::MsoAutoShapeType::msoShapeRectangle)
343 : {
344 1 : return AddRectangle(_nLeft, _nTop, _nWidth, _nHeight, _aAnchor);
345 : }
346 0 : else if (_nType == office::MsoAutoShapeType::msoShapeOval)
347 : {
348 0 : return AddEllipse(_nLeft, _nTop, _nWidth, _nHeight, _aAnchor);
349 : }
350 0 : return uno::Any();
351 : }
352 :
353 : uno::Any SAL_CALL
354 0 : ScVbaShapes::AddTextbox( sal_Int32 _nOrientation, sal_Int32 _nLeft, sal_Int32 _nTop, sal_Int32 _nWidth, sal_Int32 _nHeight ) throw (uno::RuntimeException)
355 : {
356 0 : uno::Reference< lang::XServiceInfo > xServiceInfo( m_xModel, uno::UNO_QUERY_THROW );
357 0 : if( xServiceInfo->supportsService( "com.sun.star.text.TextDocument" ) )
358 : {
359 0 : return AddTextboxInWriter( _nOrientation, _nLeft, _nTop, _nWidth, _nHeight );
360 : }
361 0 : throw uno::RuntimeException( "Not implemented" , uno::Reference< uno::XInterface >() );
362 : }
363 :
364 : uno::Any
365 0 : ScVbaShapes::AddTextboxInWriter( sal_Int32 /*_nOrientation*/, sal_Int32 _nLeft, sal_Int32 _nTop, sal_Int32 _nWidth, sal_Int32 _nHeight ) throw (uno::RuntimeException)
366 : {
367 0 : OUString sCreateShapeName( "com.sun.star.drawing.TextShape" );
368 0 : sal_Int32 nXPos = Millimeter::getInHundredthsOfOneMillimeter( _nLeft );
369 0 : sal_Int32 nYPos = Millimeter::getInHundredthsOfOneMillimeter( _nTop );
370 0 : sal_Int32 nWidth = Millimeter::getInHundredthsOfOneMillimeter( _nWidth );
371 0 : sal_Int32 nHeight = Millimeter::getInHundredthsOfOneMillimeter( _nHeight );
372 :
373 0 : uno::Reference< drawing::XShape > xShape( createShape( sCreateShapeName ), uno::UNO_QUERY_THROW );
374 0 : m_xShapes->add( xShape );
375 :
376 0 : setDefaultShapeProperties(xShape);
377 :
378 0 : OUString sName(createName( "Text Box" ));
379 0 : setShape_NameProperty( xShape, sName );
380 :
381 0 : awt::Size size;
382 0 : size.Height = nHeight;
383 0 : size.Width = nWidth;
384 0 : xShape->setSize(size);
385 :
386 0 : uno::Reference< beans::XPropertySet > xShapeProps( xShape, uno::UNO_QUERY_THROW );
387 0 : xShapeProps->setPropertyValue( "AnchorType", uno::makeAny( text::TextContentAnchorType_AT_PAGE ) );
388 0 : xShapeProps->setPropertyValue( "HoriOrientRelation", uno::makeAny( text::RelOrientation::PAGE_LEFT ) );
389 0 : xShapeProps->setPropertyValue( "HoriOrient", uno::makeAny( text::HoriOrientation::NONE ) );
390 0 : xShapeProps->setPropertyValue( "HoriOrientPosition", uno::makeAny( nXPos ) );
391 :
392 0 : xShapeProps->setPropertyValue( "VertOrientRelation", uno::makeAny( text::RelOrientation::PAGE_FRAME ) );
393 0 : xShapeProps->setPropertyValue( "VertOrient", uno::makeAny( text::VertOrientation::NONE ) );
394 0 : xShapeProps->setPropertyValue( "VertOrientPosition", uno::makeAny( nYPos ) );
395 :
396 : // set to visible
397 0 : drawing::LineStyle aLineStyle = drawing::LineStyle_SOLID;
398 0 : xShapeProps->setPropertyValue( "LineStyle", uno::makeAny( aLineStyle ) );
399 : // set to font
400 0 : sal_Int16 nLayerId = 1;
401 0 : OUString sLayerName("Heaven");
402 0 : xShapeProps->setPropertyValue( "LayerID", uno::makeAny( nLayerId ) );
403 0 : xShapeProps->setPropertyValue( "LayerName", uno::makeAny( sLayerName ) );
404 :
405 :
406 0 : ScVbaShape *pScVbaShape = new ScVbaShape( getParent(), mxContext, xShape, m_xShapes, m_xModel, ScVbaShape::getType( xShape ) );
407 0 : return uno::makeAny( uno::Reference< msforms::XShape > ( pScVbaShape ) );
408 : }
409 :
410 : void
411 2 : ScVbaShapes::setDefaultShapeProperties( uno::Reference< drawing::XShape > xShape ) throw (uno::RuntimeException)
412 : {
413 2 : uno::Reference< beans::XPropertySet > xPropertySet( xShape, uno::UNO_QUERY_THROW );
414 2 : xPropertySet->setPropertyValue( "FillStyle", uno::makeAny( OUString("SOLID") ) );
415 2 : xPropertySet->setPropertyValue( "FillColor", uno::makeAny( sal_Int32(0xFFFFFF) ) );
416 2 : xPropertySet->setPropertyValue( "TextWordWrap", uno::makeAny( text::WrapTextMode_THROUGHT ) );
417 : //not find in OOo2.3
418 : //xPropertySet->setPropertyValue("Opaque", uno::makeAny( sal_True ) );
419 2 : }
420 :
421 : void
422 2 : ScVbaShapes::setShape_NameProperty( uno::Reference< css::drawing::XShape > xShape, OUString sName )
423 : {
424 2 : uno::Reference< beans::XPropertySet > xPropertySet( xShape, uno::UNO_QUERY_THROW );
425 : try
426 : {
427 2 : xPropertySet->setPropertyValue( "Name", uno::makeAny( sName ) );
428 : }
429 0 : catch(const script::BasicErrorException&)
430 : {
431 2 : }
432 2 : }
433 :
434 : OUString
435 2 : ScVbaShapes::createName( OUString sName )
436 : {
437 2 : sal_Int32 nActNumber = 1 + m_nNewShapeCount;
438 2 : m_nNewShapeCount++;
439 2 : sName += OUString::valueOf( nActNumber );
440 2 : return sName;
441 186 : }
442 :
443 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|