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