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 = "XActionListener";
40 constexpr OUStringLiteral gaEventMethod = "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.
234  SvxShape* pShape = comphelper::getUnoTunnelImplementation<SvxShape>( mxShape );
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.
252  SvxShape* pShape = comphelper::getUnoTunnelImplementation<SvxShape>( mxShape );
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 OUString aScriptType = "Script";
327  const script::ScriptEventDescriptor* pEvent = std::find_if(aEvents.begin(), aEvents.end(),
328  [&aScriptType](const script::ScriptEventDescriptor& rEvent) {
329  return (rEvent.ListenerType == gaListenerType)
330  && (rEvent.EventMethod == gaEventMethod)
331  && (rEvent.ScriptType == aScriptType);
332  });
333  if (pEvent != aEvents.end())
334  return extractMacroName( pEvent->ScriptCode );
335  }
336  return OUString();
337 }
338 
340 {
342  return;
344  mbNotifyMacroEventRead = true;
345 }
346 
347 void SAL_CALL ScVbaControlObjectBase::setOnAction( const OUString& rMacroName )
348 {
349  uno::Reference< script::XEventAttacherManager > xEventMgr( mxFormIC, uno::UNO_QUERY_THROW );
350  sal_Int32 nIndex = getModelIndexInForm();
351 
352  // first, remove a registered event (try/catch just in case implementation throws)
353  try { xEventMgr->revokeScriptEvent( nIndex, gaListenerType, gaEventMethod, OUString() ); } catch( uno::Exception& ) {}
354 
355  // if a macro name has been passed, try to attach it to the event
356  if( !rMacroName.isEmpty() )
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 }
370 
372 {
373  return mxControlProps->getPropertyValue( "Printable" ).get<bool>();
374 }
375 
377 {
378  mxControlProps->setPropertyValue( "Printable", uno::Any( bPrintObject ) );
379 }
380 
381 // XControlObject attributes
382 
384 {
385  // not supported
386  return false;
387 }
388 
389 void SAL_CALL ScVbaControlObjectBase::setAutoSize( sal_Bool /*bAutoSize*/ )
390 {
391  // not supported
392 }
393 
394 // private
395 
397 {
398  for( sal_Int32 nIndex = 0, nCount = mxFormIC->getCount(); nIndex < nCount; ++nIndex )
399  {
400  uno::Reference< beans::XPropertySet > xProps( mxFormIC->getByIndex( nIndex ), uno::UNO_QUERY_THROW );
401  if( mxControlProps.get() == xProps.get() )
402  return nIndex;
403  }
404  throw uno::RuntimeException();
405 }
406 
408  const uno::Reference< XHelperInterface >& rxParent,
409  const uno::Reference< uno::XComponentContext >& rxContext,
410  const uno::Reference< frame::XModel >& rxModel,
411  const uno::Reference< container::XIndexContainer >& rxFormIC,
412  const uno::Reference< drawing::XControlShape >& rxControlShape ) :
413  ScVbaButton_BASE( rxParent, rxContext, rxModel, rxFormIC, rxControlShape )
414 {
415 }
416 
417 // XButton attributes
418 
419 OUString SAL_CALL ScVbaButton::getCaption()
420 {
421  return mxControlProps->getPropertyValue( "Label" ).get< OUString >();
422 }
423 
424 void SAL_CALL ScVbaButton::setCaption( const OUString& rCaption )
425 {
426  mxControlProps->setPropertyValue( "Label", uno::Any( rCaption ) );
427 }
428 
429 uno::Reference< excel::XFont > SAL_CALL ScVbaButton::getFont()
430 {
431  return new ScVbaFont( this, mxContext, maPalette, mxControlProps, nullptr, true );
432 }
433 
434 void SAL_CALL ScVbaButton::setFont( const uno::Reference< excel::XFont >& /*rxFont*/ )
435 {
436  // TODO
437 }
438 
440 {
441  switch( mxControlProps->getPropertyValue( "Align" ).get< sal_Int16 >() )
442  {
443  case awt::TextAlign::LEFT: return excel::Constants::xlLeft;
444  case awt::TextAlign::RIGHT: return excel::Constants::xlRight;
445  case awt::TextAlign::CENTER: return excel::Constants::xlCenter;
446  }
447  return excel::Constants::xlCenter;
448 }
449 
450 void SAL_CALL ScVbaButton::setHorizontalAlignment( sal_Int32 nAlign )
451 {
452  sal_Int32 nAwtAlign = awt::TextAlign::CENTER;
453  switch( nAlign )
454  {
455  case excel::Constants::xlLeft: nAwtAlign = awt::TextAlign::LEFT; break;
456  case excel::Constants::xlRight: nAwtAlign = awt::TextAlign::RIGHT; break;
457  case excel::Constants::xlCenter: nAwtAlign = awt::TextAlign::CENTER; break;
458  }
459  // form controls expect short value
460  mxControlProps->setPropertyValue( "Align", uno::Any( static_cast< sal_Int16 >( nAwtAlign ) ) );
461 }
462 
464 {
465  switch( mxControlProps->getPropertyValue( "VerticalAlign" ).get< style::VerticalAlignment >() )
466  {
467  case style::VerticalAlignment_TOP: return excel::Constants::xlTop;
468  case style::VerticalAlignment_BOTTOM: return excel::Constants::xlBottom;
469  case style::VerticalAlignment_MIDDLE: return excel::Constants::xlCenter;
470  default:;
471  }
472  return excel::Constants::xlCenter;
473 }
474 
475 void SAL_CALL ScVbaButton::setVerticalAlignment( sal_Int32 nAlign )
476 {
477  style::VerticalAlignment eAwtAlign = style::VerticalAlignment_MIDDLE;
478  switch( nAlign )
479  {
480  case excel::Constants::xlTop: eAwtAlign = style::VerticalAlignment_TOP; break;
481  case excel::Constants::xlBottom: eAwtAlign = style::VerticalAlignment_BOTTOM; break;
482  case excel::Constants::xlCenter: eAwtAlign = style::VerticalAlignment_MIDDLE; break;
483  }
484  mxControlProps->setPropertyValue( "VerticalAlign", uno::Any( eAwtAlign ) );
485 }
486 
487 sal_Int32 SAL_CALL ScVbaButton::getOrientation()
488 {
489  // not supported
490  return excel::XlOrientation::xlHorizontal;
491 }
492 
493 void SAL_CALL ScVbaButton::setOrientation( sal_Int32 /*nOrientation*/ )
494 {
495  // not supported
496 }
497 
499 {
500  return mxControlProps->getPropertyValue( "State" );
501 }
502 
503 void SAL_CALL ScVbaButton::setValue( const uno::Any &nValue )
504 {
505  return mxControlProps->setPropertyValue( "State", nValue );
506 }
507 
508 OUString SAL_CALL ScVbaButton::getText()
509 {
510  return mxControlProps->getPropertyValue( "Label" ).get< OUString >();
511 }
512 
513 void SAL_CALL ScVbaButton::setText( const OUString &aText )
514 {
515  return mxControlProps->setPropertyValue( "Label", uno::Any( aText ) );
516 }
517 
518 // XButton methods
519 
520 uno::Reference< excel::XCharacters > SAL_CALL ScVbaButton::Characters( const uno::Any& rStart, const uno::Any& rLength )
521 {
522  return new ScVbaButtonCharacters( this, mxContext, mxControlProps, maPalette, rStart, rLength );
523 }
524 
525 // XHelperInterface
526 
527 VBAHELPER_IMPL_XHELPERINTERFACE( ScVbaButton, "ooo.vba.excel.Button" )
528 
529 // private
530 
531 OUString ScVbaButton::implGetBaseName() const
532 {
533  return "Button";
534 }
535 
537 {
538  setCaption( getName() );
539 }
540 
541 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual sal_Bool SAL_CALL getPrintObject() override
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
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:382
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
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 makeMacroURL(const OUString &sMacroName)
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
OUString const aScriptType
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