LibreOffice Module sc (master)  1
vbasheetobject.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 
20 #include "vbasheetobject.hxx"
21 #include <com/sun/star/awt/TextAlign.hpp>
22 #include <com/sun/star/beans/XPropertySet.hpp>
23 #include <com/sun/star/container/XIndexContainer.hpp>
24 #include <com/sun/star/drawing/XControlShape.hpp>
25 #include <com/sun/star/frame/XModel.hpp>
26 #include <com/sun/star/script/ScriptEventDescriptor.hpp>
27 #include <com/sun/star/script/XEventAttacherManager.hpp>
28 #include <com/sun/star/style/VerticalAlignment.hpp>
30 #include <ooo/vba/excel/Constants.hpp>
31 #include <ooo/vba/excel/XlOrientation.hpp>
32 #include <ooo/vba/excel/XlPlacement.hpp>
34 #include "vbafont.hxx"
35 
36 using namespace ::com::sun::star;
37 using namespace ::ooo::vba;
38 
39 constexpr OUStringLiteral gaListenerType = u"XActionListener";
40 constexpr OUStringLiteral gaEventMethod = u"actionPerformed";
41 
42 
44  const uno::Reference< XHelperInterface >& rxParent,
45  const uno::Reference< uno::XComponentContext >& rxContext,
46  const uno::Reference< beans::XPropertySet >& rxPropSet,
47  const ScVbaPalette& rPalette,
48  const uno::Any& rStart,
49  const uno::Any& rLength ) :
50  ScVbaButtonCharacters_BASE( rxParent, rxContext ),
51  maPalette( rPalette ),
52  mxPropSet( rxPropSet, uno::UNO_SET_THROW )
53 {
54  // extract optional start parameter (missing or invalid -> from beginning)
55  if( !(rStart >>= mnStart) || (mnStart < 1) )
56  mnStart = 1;
57  --mnStart; // VBA is 1-based, rtl string is 0-based
58 
59  // extract optional length parameter (missing or invalid -> to end)
60  if( !(rLength >>= mnLength) || (mnLength < 1) )
62 }
63 
65 {
66 }
67 
68 // XCharacters attributes
69 
71 {
72  // ignore invalid mnStart and/or mnLength members
73  OUString aString = getFullString();
74  sal_Int32 nStart = ::std::min( mnStart, aString.getLength() );
75  sal_Int32 nLength = ::std::min( mnLength, aString.getLength() - nStart );
76  return aString.copy( nStart, nLength );
77 }
78 
79 void SAL_CALL ScVbaButtonCharacters::setCaption( const OUString& rCaption )
80 {
81  /* Replace the covered text with the passed text, ignore invalid mnStart
82  and/or mnLength members. This operation does not affect the mnLength
83  parameter. If the inserted text is longer than mnLength, the additional
84  characters are not covered by this object. If the inserted text is
85  shorter than mnLength, other uncovered characters from the original
86  string will be covered now, thus may be changed with subsequent
87  operations. */
88  OUString aString = getFullString();
89  sal_Int32 nStart = ::std::min( mnStart, aString.getLength() );
90  sal_Int32 nLength = ::std::min( mnLength, aString.getLength() - nStart );
91  setFullString( aString.replaceAt( nStart, nLength, rCaption ) );
92 }
93 
94 sal_Int32 SAL_CALL ScVbaButtonCharacters::getCount()
95 {
96  // always return the total length of the caption
97  return getFullString().getLength();
98 }
99 
101 {
102  // Text attribute same as Caption attribute?
103  return getCaption();
104 }
105 
106 void SAL_CALL ScVbaButtonCharacters::setText( const OUString& rText )
107 {
108  // Text attribute same as Caption attribute?
109  setCaption( rText );
110 }
111 
112 uno::Reference< excel::XFont > SAL_CALL ScVbaButtonCharacters::getFont()
113 {
114  return new ScVbaFont( this, mxContext, maPalette, mxPropSet, nullptr, true );
115 }
116 
117 void SAL_CALL ScVbaButtonCharacters::setFont( const uno::Reference< excel::XFont >& /*rxFont*/ )
118 {
119  // TODO
120 }
121 
122 // XCharacters methods
123 
124 void SAL_CALL ScVbaButtonCharacters::Insert( const OUString& rString )
125 {
126  /* The Insert() operation is in fact "replace covered characters", at
127  least for buttons... It seems there is no easy way to really insert a
128  substring. This operation does not affect the mnLength parameter. */
129  setCaption( rString );
130 }
131 
133 {
134  /* The Delete() operation is nothing else than "replace with empty string".
135  This does not affect the mnLength parameter, multiple calls of Delete()
136  will remove characters as long as there are some more covered by this
137  object. */
138  setCaption( OUString() );
139 }
140 
141 // XHelperInterface
142 
143 VBAHELPER_IMPL_XHELPERINTERFACE( ScVbaButtonCharacters, "ooo.vba.excel.Characters" )
144 
145 // private
146 
147 OUString ScVbaButtonCharacters::getFullString() const
148 {
149  return mxPropSet->getPropertyValue( "Label" ).get< OUString >();
150 }
151 
152 void ScVbaButtonCharacters::setFullString( const OUString& rString )
153 {
154  mxPropSet->setPropertyValue( "Label", uno::Any( rString ) );
155 }
156 
158  const uno::Reference< XHelperInterface >& rxParent,
159  const uno::Reference< uno::XComponentContext >& rxContext,
160  const uno::Reference< frame::XModel >& rxModel,
161  const uno::Reference< drawing::XShape >& rxShape ) :
162  ScVbaSheetObject_BASE( rxParent, rxContext ),
163  maPalette( rxModel ),
164  mxModel( rxModel, uno::UNO_SET_THROW ),
165  mxShape( rxShape, uno::UNO_SET_THROW ),
166  mxShapeProps( rxShape, uno::UNO_QUERY_THROW )
167 {
168 }
169 
170 // XSheetObject attributes
171 
173 {
174  return HmmToPoints( mxShape->getPosition().X );
175 }
176 
177 void SAL_CALL ScVbaSheetObjectBase::setLeft( double fLeft )
178 {
179  if( fLeft < 0.0 )
180  throw uno::RuntimeException();
181  mxShape->setPosition( awt::Point( PointsToHmm( fLeft ), mxShape->getPosition().Y ) );
182 }
183 
185 {
186  return HmmToPoints( mxShape->getPosition().Y );
187 }
188 
189 void SAL_CALL ScVbaSheetObjectBase::setTop( double fTop )
190 {
191  if( fTop < 0.0 )
192  throw uno::RuntimeException();
193  mxShape->setPosition( awt::Point( mxShape->getPosition().X, PointsToHmm( fTop ) ) );
194 }
195 
197 {
198  return HmmToPoints( mxShape->getSize().Width );
199 }
200 
201 void SAL_CALL ScVbaSheetObjectBase::setWidth( double fWidth )
202 {
203  if( fWidth <= 0.0 )
204  throw uno::RuntimeException();
205  mxShape->setSize( awt::Size( PointsToHmm( fWidth ), mxShape->getSize().Height ) );
206 }
207 
209 {
210  return HmmToPoints( mxShape->getSize().Height );
211 }
212 
213 void SAL_CALL ScVbaSheetObjectBase::setHeight( double fHeight )
214 {
215  if( fHeight <= 0.0 )
216  throw uno::RuntimeException();
217  mxShape->setSize( awt::Size( mxShape->getSize().Width, PointsToHmm( fHeight ) ) );
218 }
219 
220 OUString SAL_CALL ScVbaSheetObjectBase::getName()
221 {
222  return mxShapeProps->getPropertyValue( "Name" ).get< OUString >();
223 }
224 
225 void SAL_CALL ScVbaSheetObjectBase::setName( const OUString& rName )
226 {
227  mxShapeProps->setPropertyValue( "Name", uno::Any( rName ) );
228 }
229 
231 {
232  sal_Int32 const nRet = excel::XlPlacement::xlMoveAndSize;
233 #if 0 // TODO: not working at the moment.
235  if(pShape)
236  {
237  SdrObject* pObj = pShape->GetSdrObject();
238  if (pObj)
239  {
240  ScAnchorType eType = ScDrawLayer::GetAnchor(pObj);
241  if (eType == SCA_PAGE)
242  nRet = excel::XlPlacement::xlFreeFloating;
243  }
244  }
245 #endif
246  return nRet;
247 }
248 
249 void SAL_CALL ScVbaSheetObjectBase::setPlacement( sal_Int32 /*nPlacement*/ )
250 {
251 #if 0 // TODO: not working at the moment.
253  if(pShape)
254  {
255  SdrObject* pObj = pShape->GetSdrObject();
256  if (pObj)
257  {
259  if ( nPlacement == excel::XlPlacement::xlFreeFloating )
260  eType = SCA_PAGE;
261 
262  // xlMove is not supported, treated as SCA_CELL (xlMoveAndSize)
263 
264  ScDrawLayer::SetAnchor(pObj, eType);
265  }
266  }
267 #endif
268 }
269 
271 {
272  // not supported
273  return true;
274 }
275 
276 void SAL_CALL ScVbaSheetObjectBase::setPrintObject( sal_Bool /*bPrintObject*/ )
277 {
278  // not supported
279 }
280 
281 // private
282 
284 {
285  OUString aName = implGetBaseName() + OUStringChar(' ') + OUString::number( nIndex + 1 );
286  setName( aName );
288 }
289 
291 {
292 }
293 
295  const uno::Reference< XHelperInterface >& rxParent,
296  const uno::Reference< uno::XComponentContext >& rxContext,
297  const uno::Reference< frame::XModel >& rxModel,
298  const uno::Reference< container::XIndexContainer >& rxFormIC,
299  const uno::Reference< drawing::XControlShape >& rxControlShape ) :
300  ScVbaControlObject_BASE( rxParent, rxContext, rxModel, uno::Reference< drawing::XShape >( rxControlShape, uno::UNO_QUERY_THROW ) ),
301  mxFormIC( rxFormIC, uno::UNO_SET_THROW ),
302  mxControlProps( rxControlShape->getControl(), uno::UNO_QUERY_THROW ),
303  mbNotifyMacroEventRead(false)
304 {
305 }
306 
307 // XSheetObject attributes
308 
310 {
311  return mxControlProps->getPropertyValue( "Name" ).get< OUString >();
312 }
313 
314 void SAL_CALL ScVbaControlObjectBase::setName( const OUString& rName )
315 {
316  mxControlProps->setPropertyValue( "Name", uno::Any( rName ) );
317 }
318 
320 {
321  uno::Reference< script::XEventAttacherManager > xEventMgr( mxFormIC, uno::UNO_QUERY_THROW );
322  sal_Int32 nIndex = getModelIndexInForm();
323  const uno::Sequence< script::ScriptEventDescriptor > aEvents = xEventMgr->getScriptEvents( nIndex );
324  if( aEvents.hasElements() )
325  {
326  const script::ScriptEventDescriptor* pEvent = std::find_if(aEvents.begin(), aEvents.end(),
327  [](const script::ScriptEventDescriptor& rEvent) {
328  return (rEvent.ListenerType == gaListenerType)
329  && (rEvent.EventMethod == gaEventMethod)
330  && (rEvent.ScriptType == "Script");
331  });
332  if (pEvent != aEvents.end())
333  return extractMacroName( pEvent->ScriptCode );
334  }
335  return OUString();
336 }
337 
339 {
341  return;
343  mbNotifyMacroEventRead = true;
344 }
345 
346 void SAL_CALL ScVbaControlObjectBase::setOnAction( const OUString& rMacroName )
347 {
348  uno::Reference< script::XEventAttacherManager > xEventMgr( mxFormIC, uno::UNO_QUERY_THROW );
349  sal_Int32 nIndex = getModelIndexInForm();
350 
351  // first, remove a registered event (try/catch just in case implementation throws)
352  try { xEventMgr->revokeScriptEvent( nIndex, gaListenerType, gaEventMethod, OUString() ); } catch( uno::Exception& ) {}
353 
354  // if a macro name has been passed, try to attach it to the event
355  if( rMacroName.isEmpty() )
356  return;
357 
358  MacroResolvedInfo aResolvedMacro = resolveVBAMacro( getSfxObjShell( mxModel ), rMacroName );
359  if( !aResolvedMacro.mbFound )
360  throw uno::RuntimeException();
361  script::ScriptEventDescriptor aDescriptor;
362  aDescriptor.ListenerType = gaListenerType;
363  aDescriptor.EventMethod = gaEventMethod;
364  aDescriptor.ScriptType = "Script";
365  aDescriptor.ScriptCode = makeMacroURL( aResolvedMacro.msResolvedMacro );
367  xEventMgr->registerScriptEvent( nIndex, aDescriptor );
368 }
369 
371 {
372  return mxControlProps->getPropertyValue( "Printable" ).get<bool>();
373 }
374 
376 {
377  mxControlProps->setPropertyValue( "Printable", uno::Any( bPrintObject ) );
378 }
379 
380 // XControlObject attributes
381 
383 {
384  // not supported
385  return false;
386 }
387 
388 void SAL_CALL ScVbaControlObjectBase::setAutoSize( sal_Bool /*bAutoSize*/ )
389 {
390  // not supported
391 }
392 
393 // private
394 
396 {
397  for( sal_Int32 nIndex = 0, nCount = mxFormIC->getCount(); nIndex < nCount; ++nIndex )
398  {
399  uno::Reference< beans::XPropertySet > xProps( mxFormIC->getByIndex( nIndex ), uno::UNO_QUERY_THROW );
400  if( mxControlProps.get() == xProps.get() )
401  return nIndex;
402  }
403  throw uno::RuntimeException();
404 }
405 
407  const uno::Reference< XHelperInterface >& rxParent,
408  const uno::Reference< uno::XComponentContext >& rxContext,
409  const uno::Reference< frame::XModel >& rxModel,
410  const uno::Reference< container::XIndexContainer >& rxFormIC,
411  const uno::Reference< drawing::XControlShape >& rxControlShape ) :
412  ScVbaButton_BASE( rxParent, rxContext, rxModel, rxFormIC, rxControlShape )
413 {
414 }
415 
416 // XButton attributes
417 
418 OUString SAL_CALL ScVbaButton::getCaption()
419 {
420  return mxControlProps->getPropertyValue( "Label" ).get< OUString >();
421 }
422 
423 void SAL_CALL ScVbaButton::setCaption( const OUString& rCaption )
424 {
425  mxControlProps->setPropertyValue( "Label", uno::Any( rCaption ) );
426 }
427 
428 uno::Reference< excel::XFont > SAL_CALL ScVbaButton::getFont()
429 {
430  return new ScVbaFont( this, mxContext, maPalette, mxControlProps, nullptr, true );
431 }
432 
433 void SAL_CALL ScVbaButton::setFont( const uno::Reference< excel::XFont >& /*rxFont*/ )
434 {
435  // TODO
436 }
437 
439 {
440  switch( mxControlProps->getPropertyValue( "Align" ).get< sal_Int16 >() )
441  {
442  case awt::TextAlign::LEFT: return excel::Constants::xlLeft;
443  case awt::TextAlign::RIGHT: return excel::Constants::xlRight;
444  case awt::TextAlign::CENTER: return excel::Constants::xlCenter;
445  }
446  return excel::Constants::xlCenter;
447 }
448 
449 void SAL_CALL ScVbaButton::setHorizontalAlignment( sal_Int32 nAlign )
450 {
451  sal_Int32 nAwtAlign = awt::TextAlign::CENTER;
452  switch( nAlign )
453  {
454  case excel::Constants::xlLeft: nAwtAlign = awt::TextAlign::LEFT; break;
455  case excel::Constants::xlRight: nAwtAlign = awt::TextAlign::RIGHT; break;
456  case excel::Constants::xlCenter: nAwtAlign = awt::TextAlign::CENTER; break;
457  }
458  // form controls expect short value
459  mxControlProps->setPropertyValue( "Align", uno::Any( static_cast< sal_Int16 >( nAwtAlign ) ) );
460 }
461 
463 {
464  switch( mxControlProps->getPropertyValue( "VerticalAlign" ).get< style::VerticalAlignment >() )
465  {
466  case style::VerticalAlignment_TOP: return excel::Constants::xlTop;
467  case style::VerticalAlignment_BOTTOM: return excel::Constants::xlBottom;
468  case style::VerticalAlignment_MIDDLE: return excel::Constants::xlCenter;
469  default:;
470  }
471  return excel::Constants::xlCenter;
472 }
473 
474 void SAL_CALL ScVbaButton::setVerticalAlignment( sal_Int32 nAlign )
475 {
476  style::VerticalAlignment eAwtAlign = style::VerticalAlignment_MIDDLE;
477  switch( nAlign )
478  {
479  case excel::Constants::xlTop: eAwtAlign = style::VerticalAlignment_TOP; break;
480  case excel::Constants::xlBottom: eAwtAlign = style::VerticalAlignment_BOTTOM; break;
481  case excel::Constants::xlCenter: eAwtAlign = style::VerticalAlignment_MIDDLE; break;
482  }
483  mxControlProps->setPropertyValue( "VerticalAlign", uno::Any( eAwtAlign ) );
484 }
485 
486 sal_Int32 SAL_CALL ScVbaButton::getOrientation()
487 {
488  // not supported
489  return excel::XlOrientation::xlHorizontal;
490 }
491 
492 void SAL_CALL ScVbaButton::setOrientation( sal_Int32 /*nOrientation*/ )
493 {
494  // not supported
495 }
496 
498 {
499  return mxControlProps->getPropertyValue( "State" );
500 }
501 
502 void SAL_CALL ScVbaButton::setValue( const uno::Any &nValue )
503 {
504  return mxControlProps->setPropertyValue( "State", nValue );
505 }
506 
507 OUString SAL_CALL ScVbaButton::getText()
508 {
509  return mxControlProps->getPropertyValue( "Label" ).get< OUString >();
510 }
511 
512 void SAL_CALL ScVbaButton::setText( const OUString &aText )
513 {
514  return mxControlProps->setPropertyValue( "Label", uno::Any( aText ) );
515 }
516 
517 // XButton methods
518 
519 uno::Reference< excel::XCharacters > SAL_CALL ScVbaButton::Characters( const uno::Any& rStart, const uno::Any& rLength )
520 {
521  return new ScVbaButtonCharacters( this, mxContext, mxControlProps, maPalette, rStart, rLength );
522 }
523 
524 // XHelperInterface
525 
526 VBAHELPER_IMPL_XHELPERINTERFACE( ScVbaButton, "ooo.vba.excel.Button" )
527 
528 // private
529 
530 OUString ScVbaButton::implGetBaseName() const
531 {
532  return "Button";
533 }
534 
536 {
537  setCaption( getName() );
538 }
539 
540 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual sal_Bool SAL_CALL getPrintObject() override
OUString makeMacroURL(std::u16string_view sMacroName)
sal_Int32 nIndex
ScVbaControlObjectBase(const css::uno::Reference< ov::XHelperInterface > &rxParent, const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Reference< css::frame::XModel > &rxModel, const css::uno::Reference< css::container::XIndexContainer > &rxFormIC, const css::uno::Reference< css::drawing::XControlShape > &rxControlShape)
virtual void SAL_CALL setPrintObject(sal_Bool bPrintObject) override
virtual sal_Int32 SAL_CALL getOrientation() override
sal_Int32 PointsToHmm(double fPoints)
virtual void SAL_CALL setTop(double fTop) override
virtual sal_Bool SAL_CALL getPrintObject() override
virtual void SAL_CALL setName(const OUString &rName) override
uno::Reference< uno::XComponentContext > mxContext
virtual OUString SAL_CALL getText() override
static SdrObject * getSdrObjectFromXShape(const css::uno::Reference< css::uno::XInterface > &xInt)
virtual void implSetDefaultProperties() override
Reference
css::uno::Reference< css::frame::XModel2 > mxModel
virtual css::uno::Reference< ov::excel::XFont > SAL_CALL getFont() override
virtual double SAL_CALL getLeft() override
virtual void SAL_CALL setValue(const css::uno::Any &nValue) override
virtual sal_Int32 SAL_CALL getVerticalAlignment() override
virtual double SAL_CALL getHeight() override
virtual void SAL_CALL setCaption(const OUString &rCaption) override
constexpr OUStringLiteral gaListenerType
#define VBAHELPER_IMPL_XHELPERINTERFACE(classname, servicename)
virtual OUString SAL_CALL getName() override
uno::Reference< drawing::XShape > const mxShape
ScVbaButton(const css::uno::Reference< ov::XHelperInterface > &rxParent, const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Reference< css::frame::XModel > &rxModel, const css::uno::Reference< css::container::XIndexContainer > &rxFormIC, const css::uno::Reference< css::drawing::XControlShape > &rxControlShape)
void setDefaultProperties(sal_Int32 nIndex)
Sets default properties after a new object has been created.
virtual void SAL_CALL setName(const OUString &rName) override
int nCount
virtual void SAL_CALL setHeight(double fHeight) override
virtual void implSetDefaultProperties()
Derived classes set default properties for new drawing objects.
virtual void SAL_CALL setVerticalAlignment(sal_Int32 nAlign) override
virtual sal_Int32 SAL_CALL getHorizontalAlignment() override
virtual double SAL_CALL getTop() override
virtual OUString SAL_CALL getOnAction() override
virtual void SAL_CALL Insert(const OUString &rString) override
ScVbaSheetObjectBase(const css::uno::Reference< ov::XHelperInterface > &rxParent, const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Reference< css::frame::XModel > &rxModel, const css::uno::Reference< css::drawing::XShape > &rxShape)
void setFullString(const OUString &rString)
virtual void SAL_CALL setPlacement(sal_Int32 nPlacement) override
virtual void SAL_CALL setLeft(double fLeft) override
DocumentType eType
::cppu::ImplInheritanceHelper< ScVbaControlObjectBase, ov::excel::XButton > ScVbaButton_BASE
virtual OUString implGetBaseName() const =0
Derived classes return the base name used for new objects.
css::uno::Reference< css::drawing::XShape > mxShape
ScAnchorType
Definition: global.hxx:383
virtual sal_Bool SAL_CALL getAutoSize() override
constexpr OUStringLiteral gaEventMethod
#define SAL_MAX_INT32
virtual OUString SAL_CALL getCaption() override
virtual OUString SAL_CALL getText() override
virtual void SAL_CALL setOnAction(const OUString &rMacroName) override
virtual void SAL_CALL setText(const OUString &rText) override
virtual sal_Int32 SAL_CALL getCount() override
::cppu::ImplInheritanceHelper< ScVbaSheetObjectBase, ov::excel::XControlObject > ScVbaControlObject_BASE
float u
unsigned char sal_Bool
css::uno::Reference< css::beans::XPropertySet > mxControlProps
css::uno::Reference< ov::excel::XCharacters > SAL_CALL Characters(const css::uno::Any &rStart, const css::uno::Any &rLength) override
OUString extractMacroName(const OUString &rMacroUrl)
virtual double SAL_CALL getWidth() override
sal_Int32 getModelIndexInForm() const
double HmmToPoints(sal_Int32 nHmm)
virtual void SAL_CALL setAutoSize(sal_Bool bAutoSize) override
void NotifyMacroEventRead()
Notify that the document contains a macro event handler.
virtual void SAL_CALL setFont(const css::uno::Reference< ov::excel::XFont > &rxFont) override
virtual ~ScVbaButtonCharacters() override
virtual css::uno::Any SAL_CALL getValue() override
css::uno::Reference< css::uno::XComponentContext > mxContext
virtual css::uno::Reference< ov::excel::XFont > SAL_CALL getFont() override
OUString getFullString() const
css::uno::Reference< css::container::XIndexContainer > mxFormIC
virtual void SAL_CALL Delete() override
virtual void SAL_CALL setFont(const css::uno::Reference< ov::excel::XFont > &rxFont) override
OUString aName
virtual void SAL_CALL setCaption(const OUString &rCaption) override
virtual void SAL_CALL setText(const OUString &aText) override
css::uno::Reference< css::beans::XPropertySet > mxPropSet
virtual OUString SAL_CALL getCaption() override
SdrObject * GetSdrObject() const
virtual void SAL_CALL setHorizontalAlignment(sal_Int32 nAlign) override
Simple implementation of the Characters symbol for drawing button objects.
virtual OUString SAL_CALL getName() override
virtual void SAL_CALL setWidth(double fWidth) override
sal_Int32 nLength
css::uno::Reference< css::beans::XPropertySet > mxShapeProps
ScVbaButtonCharacters(const css::uno::Reference< ov::XHelperInterface > &rxParent, const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Reference< css::beans::XPropertySet > &rxPropSet, const ScVbaPalette &rPalette, const css::uno::Any &rStart, const css::uno::Any &rLength)
COMPHELPER_DLLPUBLIC void notifyMacroEventRead(const css::uno::Reference< css::frame::XModel > &_rxDocument)
virtual sal_Int32 SAL_CALL getPlacement() override
SfxObjectShell * getSfxObjShell(const uno::Reference< frame::XModel > &xModel)
virtual void SAL_CALL setPrintObject(sal_Bool bPrintObject) override
OUString resolveVBAMacro(SfxObjectShell const *pShell, const OUString &rLibName, const OUString &rModuleName, const OUString &rMacroName)
virtual void SAL_CALL setOrientation(sal_Int32 nOrientation) override