20#include <com/sun/star/frame/XDesktop.hpp>
21#include <com/sun/star/lang/XServiceInfo.hpp>
22#include <com/sun/star/script/BasicErrorException.hpp>
23#include <com/sun/star/sheet/XCalculatable.hpp>
24#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
25#include <com/sun/star/sheet/XNamedRanges.hpp>
26#include <com/sun/star/sheet/XSpreadsheetView.hpp>
27#include <com/sun/star/task/XStatusIndicatorSupplier.hpp>
28#include <com/sun/star/task/XStatusIndicator.hpp>
29#include <com/sun/star/util/PathSettings.hpp>
30#include <com/sun/star/view/XSelectionSupplier.hpp>
31#include <ooo/vba/XCommandBars.hpp>
32#include <ooo/vba/excel/XApplicationOutgoing.hpp>
33#include <ooo/vba/excel/XlCalculation.hpp>
34#include <ooo/vba/excel/XlMousePointer.hpp>
35#include <ooo/vba/office/MsoShapeType.hpp>
36#include <ooo/vba/office/MsoAutoShapeType.hpp>
37#include <ooo/vba/office/MsoFileDialogType.hpp>
61#include <osl/file.hxx>
80#include <unonames.hxx>
94using ::com::sun::star::uno::Reference;
95using ::com::sun::star::uno::UNO_QUERY_THROW;
96using ::com::sun::star::uno::UNO_QUERY;
111 mbDisplayAlerts( true ),
112 mbEnableEvents( true ),
113 mbExcel4Menus( false ),
114 mbDisplayNoteIndicator( true ),
115 mbShowWindowsInTaskbar( true ),
116 mbEnableCancelKey( false )
128class ScVbaApplicationOutgoingConnectionPoint :
public cppu::WeakImplHelper<XConnectionPoint>
137 sal_uInt32 SAL_CALL Advise(
const uno::Reference< XSink >& Sink )
override;
138 void SAL_CALL Unadvise( sal_uInt32 Cookie )
override;
151 SC_MOD()->RegisterAutomationApplicationEventsCaller( uno::Reference< XSinkCaller >(
this) );
159 if (nNumber < 1 || nNumber >
mvSinks.size())
162 mvSinks[nNumber-1] = uno::Reference< XSink >();
167 mrAppSettings( ScVbaStaticAppSettings() ),
178 return ScVbaStaticAppSettings().mbEnableEvents;
185 return xWSF->getExactName( aApproximateName );
188uno::Reference< beans::XIntrospectionAccess > SAL_CALL
192 return xWSF->getIntrospection();
196ScVbaApplication::invoke(
const OUString& FunctionName,
const uno::Sequence< uno::Any >& Params, uno::Sequence< sal_Int16 >& OutParamIndex, uno::Sequence< uno::Any >& OutParam)
204 aAny = xWSF->invoke( FunctionName, Params, OutParamIndex, OutParam );
206 catch (
const uno::Exception&)
208 aAny <<= script::BasicErrorException( OUString(), uno::Reference< uno::XInterface >(), 1000, OUString() );
217 xWSF->setValue( PropertyName,
Value );
224 return xWSF->getValue( PropertyName );
231 return xWSF->hasMethod(
Name );
238 return xWSF->hasProperty(
Name );
241uno::Reference< excel::XWorkbook >
246 if( xWorkbook.is() )
return xWorkbook;
251uno::Reference< excel::XWorkbook > SAL_CALL
256 if( xWorkbook.is() )
return xWorkbook;
261uno::Reference< XAssistant > SAL_CALL
272 Reference< view::XSelectionSupplier > xSelSupp(
xModel->getCurrentController(), UNO_QUERY_THROW );
273 Reference< beans::XPropertySet > xPropSet( xSelSupp, UNO_QUERY_THROW );
279 uno::Reference<uno::XInterface> aSelection(xSelSupp->getSelection(), uno::UNO_QUERY);
280 xPropSet->setPropertyValue(
aPropName, aOldVal );
282 if (!aSelection.is())
284 throw uno::RuntimeException(
"failed to obtain current selection" );
287 uno::Reference< lang::XServiceInfo > xServiceInfo( aSelection, uno::UNO_QUERY_THROW );
292 uno::Reference< drawing::XShapes > xShapes( aSelection, uno::UNO_QUERY_THROW );
293 uno::Reference< container::XIndexAccess > xIndexAccess( xShapes, uno::UNO_QUERY_THROW );
294 uno::Reference< drawing::XShape > xShape( xIndexAccess->getByIndex(0), uno::UNO_QUERY_THROW );
299 if (
nType == office::MsoShapeType::msoAutoShape )
308 uno::Reference< lang::XServiceInfo > xShapeServiceInfo( xShape, uno::UNO_QUERY_THROW );
309 if ( xShapeServiceInfo->supportsService(
"com.sun.star.drawing.Text") )
311 return uno::Any( uno::Reference< msforms::XTextBoxShape >(
315 else if (
nType == office::MsoShapeType::msoLine )
322 else if( xServiceInfo->supportsService(
"com.sun.star.sheet.SheetCellRange") ||
323 xServiceInfo->supportsService(
"com.sun.star.sheet.SheetCellRanges") )
325 uno::Reference< table::XCellRange > xRange( aSelection, ::uno::UNO_QUERY);
328 uno::Reference< sheet::XSheetCellRangeContainer > xRanges( aSelection, ::uno::UNO_QUERY);
341uno::Reference< excel::XRange >
344 uno::Reference< sheet::XSpreadsheetView > xView(
getCurrentDocument()->getCurrentController(), uno::UNO_QUERY_THROW );
345 uno::Reference< table::XCellRange > xRange( xView->getActiveSheet(), ::uno::UNO_QUERY_THROW);
348 throw uno::RuntimeException(
"No ViewShell available" );
351 sal_Int32 nCursorX = rTabView.
GetCurX();
352 sal_Int32 nCursorY = rTabView.
GetCurY();
362 uno::Reference<excel::XFileDialog> xDialog(
new ScVbaFileDialog(
this,
mxContext, office::MsoFileDialogType::msoFileDialogFilePicker));
363 xDialog->setTitle(aTitle);
364 xDialog->setAllowMultiSelect(aMultiSelect);
366 bool bMultiSelect =
false;
367 aMultiSelect >>= bMultiSelect;
369 if (xDialog->Show() == 0)
375 uno::Reference<excel::XFileDialogSelectedItems> xItems = xDialog->getSelectedItems();
380 throw uno::RuntimeException(
"Unexpected XFileDialogSelectedItems implementation");
382 auto const & rItemVector = pItems->getItems();
387 if (!rItemVector.empty())
388 aPath = rItemVector.at(0);
411 DialogType >>=
nType;
425 if (
aIndex.getValueTypeClass() == uno::TypeClass_VOID )
437 uno::Reference< excel::XWorkbook > xWorkbook(
getActiveWorkbook(), uno::UNO_SET_THROW );
438 return xWorkbook->Worksheets(
aIndex );
463 return xDialogs->Item(
aIndex );
466uno::Reference< excel::XWindow > SAL_CALL
470 uno::Reference< frame::XController >
xController(
xModel->getCurrentController(), uno::UNO_SET_THROW );
471 uno::Reference< XHelperInterface > xParent(
getActiveWorkbook(), uno::UNO_QUERY_THROW );
494 return uno::Any( !getDisplayStatusBar() );
511 bool bDefault =
false;
513 uno::Reference< task::XStatusIndicatorSupplier > xStatusIndicatorSupplier(
xModel->getCurrentController(), uno::UNO_QUERY_THROW );
514 uno::Reference< task::XStatusIndicator > xStatusIndicator( xStatusIndicatorSupplier->getStatusIndicator(), uno::UNO_SET_THROW );
515 if( _statusbar >>= sText )
517 setDisplayStatusBar(
true );
518 if ( !sText.isEmpty() )
519 xStatusIndicator->start( sText, 100 );
521 xStatusIndicator->end();
523 else if( _statusbar >>= bDefault )
527 xStatusIndicator->end();
528 setDisplayStatusBar(
true );
532 throw uno::RuntimeException(
"Invalid parameter. It should be a string or False" );
539 uno::Reference<sheet::XCalculatable> xCalc(
getCurrentDocument(), uno::UNO_QUERY_THROW);
540 if(xCalc->isAutomaticCalculationEnabled())
541 return excel::XlCalculation::xlCalculationAutomatic;
543 return excel::XlCalculation::xlCalculationManual;
550 uno::Reference< sheet::XCalculatable > xCalc(
getCurrentDocument(), uno::UNO_QUERY_THROW);
553 case excel::XlCalculation::xlCalculationManual:
554 xCalc->enableAutomaticCalculation(
false);
556 case excel::XlCalculation::xlCalculationAutomatic:
557 case excel::XlCalculation::xlCalculationSemiautomatic:
558 xCalc->enableAutomaticCalculation(
true);
567 if (
aIndex.getValueTypeClass() == uno::TypeClass_VOID )
577 aRef->PutDouble( time );
578 aArgs->Put(aRef.
get(), 1);
601 uno::Reference< beans::XPropertySet > xPropertySet(
xModel, uno::UNO_QUERY_THROW );
602 uno::Reference< sheet::XNamedRanges > xNamedRanges( xPropertySet->getPropertyValue(
603 "NamedRanges" ), uno::UNO_QUERY_THROW );
606 if (
aIndex.getValueTypeClass() == uno::TypeClass_VOID )
613uno::Reference< excel::XWorksheet > SAL_CALL
616 uno::Reference< excel::XWorksheet >
result;
618 if ( xWorkbook.is() )
620 uno::Reference< excel::XWorksheet > xWorksheet =
621 xWorkbook->getActiveSheet();
622 if ( xWorksheet.is() )
631 throw uno::RuntimeException(
"No activeSheet available" );
651 bool bScroll =
false;
656 bool aScroll =
false;
657 if( !(
Scroll >>= aScroll) )
658 throw uno::RuntimeException(
"second parameter should be boolean" );
668 uno::Reference< sheet::XSpreadsheetView > xSpreadsheet(
669 xModel->getCurrentController(), uno::UNO_QUERY_THROW );
680 xVbaSheetRange->Select();
685 xWindow->SmallScroll(
uno::Any(
static_cast<sal_Int16
>(xVbaSheetRange->getRow() - 1) ),
686 uno::Any(
static_cast<sal_Int16
>(nValueY) ),
687 uno::Any(
static_cast<sal_Int16
>(xVbaSheetRange->getColumn() - 1) ),
688 uno::Any(
static_cast<sal_Int16
>(nValueX) ) );
693 xVbaSheetRange->Select();
697 catch (
const uno::RuntimeException&)
705 throw uno::RuntimeException(
"invalid reference for range name, it should be procedure name" );
709 uno::Reference< excel::XRange > xRange;
712 uno::Reference< excel::XRange > xVbaRange(
Reference, uno::UNO_QUERY );
715 if ( xVbaRange.is() )
725 xWindow->SmallScroll(
uno::Any(
static_cast<sal_Int16
>(xVbaRange->getRow() - 1) ),
726 uno::Any(
static_cast<sal_Int16
>(nValueY) ),
727 uno::Any(
static_cast<sal_Int16
>(xVbaRange->getColumn() - 1) ),
728 uno::Any(
static_cast<sal_Int16
>(nValueX) ) );
739 throw uno::RuntimeException(
"invalid reference or name" );
747 switch( nPointerStyle )
749 case PointerStyle::Arrow:
750 return excel::XlMousePointer::xlNorthwestArrow;
751 case PointerStyle::Null:
752 return excel::XlMousePointer::xlDefault;
753 case PointerStyle::Wait:
754 return excel::XlMousePointer::xlWait;
755 case PointerStyle::Text:
756 return excel::XlMousePointer::xlIBeam;
758 return excel::XlMousePointer::xlDefault;
770 case excel::XlMousePointer::xlNorthwestArrow:
775 case excel::XlMousePointer::xlWait:
776 case excel::XlMousePointer::xlIBeam:
783 case excel::XlMousePointer::xlDefault:
789 throw uno::RuntimeException(
"Unknown value for Cursor pointer" );
794 catch (
const uno::Exception&)
805 return "Microsoft Excel";
884 uno::Reference< sheet::XSpreadsheetView > xView(
getCurrentDocument()->getCurrentController(), uno::UNO_QUERY_THROW );
885 uno::Reference< beans::XPropertySet > xProps( xView, uno::UNO_QUERY );
886 xProps->setPropertyValue(
"HasVerticalScrollBar",
uno::Any( bSet ) );
887 xProps->setPropertyValue(
"HasHorizontalScrollBar",
uno::Any( bSet ) );
929 return SC_MOD()->GetDocOptions().IsIter();
935 uno::Reference< lang::XMultiComponentFactory >
xSMgr(
936 mxContext->getServiceManager(), uno::UNO_SET_THROW );
938 uno::Reference< frame::XDesktop > xDesktop
939 (
xSMgr->createInstanceWithContext(
"com.sun.star.frame.Desktop" ,
mxContext), uno::UNO_QUERY_THROW );
940 uno::Reference< container::XEnumeration > xComponents = xDesktop->getComponents()->createEnumeration();
941 while ( xComponents->hasMoreElements() )
943 uno::Reference< lang::XServiceInfo > xServiceInfo( xComponents->nextElement(), uno::UNO_QUERY );
944 if ( xServiceInfo.is() && xServiceInfo->supportsService(
"com.sun.star.sheet.SpreadsheetDocument" ) )
946 uno::Reference< beans::XPropertySet > xProps( xServiceInfo, uno::UNO_QUERY );
953 SC_MOD()->SetDocOptions( aOpts );
960 uno::Reference< sheet::XCalculatable > xCalculatable(
getCurrentDocument(), uno::UNO_QUERY_THROW );
961 xCalculatable->calculateAll();
967 static uno::Reference< util::XPathSettings > xPathSettings( util::PathSettings::create( xContext ) );
968 return xPathSettings;
978 xProps->getPropertyValue( _sPathType ) >>= sUrl;
981 sal_Int32
nIndex = sUrl.lastIndexOf(
';' ) ;
983 sUrl = sUrl.copy(
nIndex + 1 );
984 ::osl::File::getSystemPathFromFileURL( sUrl, sRetPath );
986 catch (
const uno::Exception&)
998 osl::FileBase::getFileURLFromSystemPath( DefaultFilePath,
aURL );
999 xProps->setWork(
aURL );
1033#elif defined(MACOSX)
1039 return OUString(
"Unknown");
1047typedef ::std::list< ScRange > ListOfScRange;
1054void lclAddToListOfScRange( ListOfScRange& rList,
const uno::Any& rArg )
1059 uno::Reference< excel::XRange > xRange( rArg, uno::UNO_QUERY_THROW );
1060 uno::Reference< XCollection > xCol( xRange->Areas(
uno::Any() ), uno::UNO_QUERY_THROW );
1061 for( sal_Int32 nIdx = 1, nCount = xCol->getCount(); nIdx <= nCount; ++nIdx )
1063 uno::Reference< excel::XRange > xAreaRange( xCol->Item(
uno::Any( nIdx ),
uno::Any() ), uno::UNO_QUERY_THROW );
1064 uno::Reference< sheet::XCellRangeAddressable > xAddressable( xAreaRange->getCellRange(), uno::UNO_QUERY_THROW );
1067 rList.push_back( aScRange );
1096 if( (n1T == n2T) && (n1B == n2B) )
1099 if( ((n1L < n2L) && (n2L - 1 <= n1R)) || ((n2L < n1L) && (n1L - 1 <= n2R)) )
1109 if( (n1L == n2L) && (n1R == n2R) )
1112 if( ((n1T < n2T) && (n2T + 1 <= n1B)) || ((n2T < n1T) && (n1T + 1 <= n2B)) )
1127void lclJoinRanges( ListOfScRange& rList )
1129 ListOfScRange::iterator aOuterIt = rList.begin();
1130 while( aOuterIt != rList.end() )
1132 bool bAnyErased =
false;
1133 ListOfScRange::iterator aInnerIt = rList.begin();
1134 while( aInnerIt != rList.end() )
1136 bool bInnerErased =
false;
1138 if( (aOuterIt != aInnerIt) && lclTryJoin( *aOuterIt, *aInnerIt ) )
1141 aInnerIt = rList.erase( aInnerIt );
1142 bInnerErased = bAnyErased =
true;
1160void lclIntersectRanges( ListOfScRange& rList,
const uno::Any& rArg )
1163 ListOfScRange aList2;
1164 lclAddToListOfScRange( aList2, rArg );
1166 if( rList.empty() || aList2.empty() )
1170 ListOfScRange aList1;
1171 aList1.swap( rList );
1173 lclJoinRanges( aList2 );
1175 for(
const auto& rOuterItem : aList1 )
1177 for(
const auto& rInnerItem : aList2 )
1179 if( rOuterItem.Intersects( rInnerItem ) )
1182 std::max( rOuterItem.aStart.Col(), rInnerItem.aStart.Col() ),
1183 std::max( rOuterItem.aStart.Row(), rInnerItem.aStart.Row() ),
1184 std::max( rOuterItem.aStart.Tab(), rInnerItem.aStart.Tab() ),
1185 std::min( rOuterItem.aEnd.Col(), rInnerItem.aEnd.Col() ),
1186 std::min( rOuterItem.aEnd.Row(), rInnerItem.aEnd.Row() ),
1187 std::min( rOuterItem.aEnd.Tab(), rInnerItem.aEnd.Tab() ) );
1188 rList.push_back( aIsectRange );
1193 lclJoinRanges( rList );
1200uno::Reference< excel::XRange > lclCreateVbaRange(
1201 const uno::Reference< uno::XComponentContext >& rxContext,
1202 const uno::Reference< frame::XModel >& rxModel,
1203 const ListOfScRange& rList )
1207 throw uno::RuntimeException();
1210 for(
const auto& rItem : rList )
1213 if( aCellRanges.
size() == 1 )
1215 uno::Reference< table::XCellRange > xRange(
new ScCellRangeObj( pDocShell, aCellRanges.
front() ) );
1218 if( aCellRanges.
size() > 1 )
1220 uno::Reference< sheet::XSheetCellRangeContainer > xRanges(
new ScCellRangesObj( pDocShell, aCellRanges ) );
1229 const uno::Reference< excel::XRange >& rArg1,
const uno::Reference< excel::XRange >& rArg2,
1238 if( !rArg1.is() || !rArg2.is() )
1242 ListOfScRange aList;
1243 lclAddToListOfScRange( aList,
uno::Any( rArg1 ) );
1244 lclJoinRanges( aList );
1247 lclIntersectRanges( aList,
uno::Any( rArg2 ) );
1248 lclIntersectRanges( aList, rArg3 );
1249 lclIntersectRanges( aList, rArg4 );
1250 lclIntersectRanges( aList, rArg5 );
1251 lclIntersectRanges( aList, rArg6 );
1252 lclIntersectRanges( aList, rArg7 );
1253 lclIntersectRanges( aList, rArg8 );
1254 lclIntersectRanges( aList, rArg9 );
1255 lclIntersectRanges( aList, rArg10 );
1256 lclIntersectRanges( aList, rArg11 );
1257 lclIntersectRanges( aList, rArg12 );
1258 lclIntersectRanges( aList, rArg13 );
1259 lclIntersectRanges( aList, rArg14 );
1260 lclIntersectRanges( aList, rArg15 );
1261 lclIntersectRanges( aList, rArg16 );
1262 lclIntersectRanges( aList, rArg17 );
1263 lclIntersectRanges( aList, rArg18 );
1264 lclIntersectRanges( aList, rArg19 );
1265 lclIntersectRanges( aList, rArg20 );
1266 lclIntersectRanges( aList, rArg21 );
1267 lclIntersectRanges( aList, rArg22 );
1268 lclIntersectRanges( aList, rArg23 );
1269 lclIntersectRanges( aList, rArg24 );
1270 lclIntersectRanges( aList, rArg25 );
1271 lclIntersectRanges( aList, rArg26 );
1272 lclIntersectRanges( aList, rArg27 );
1273 lclIntersectRanges( aList, rArg28 );
1274 lclIntersectRanges( aList, rArg29 );
1275 lclIntersectRanges( aList, rArg30 );
1282 const uno::Reference< excel::XRange >& rArg1,
const uno::Reference< excel::XRange >& rArg2,
1291 if( !rArg1.is() || !rArg2.is() )
1294 ListOfScRange aList;
1295 lclAddToListOfScRange( aList,
uno::Any( rArg1 ) );
1296 lclAddToListOfScRange( aList,
uno::Any( rArg2 ) );
1297 lclAddToListOfScRange( aList, rArg3 );
1298 lclAddToListOfScRange( aList, rArg4 );
1299 lclAddToListOfScRange( aList, rArg5 );
1300 lclAddToListOfScRange( aList, rArg6 );
1301 lclAddToListOfScRange( aList, rArg7 );
1302 lclAddToListOfScRange( aList, rArg8 );
1303 lclAddToListOfScRange( aList, rArg9 );
1304 lclAddToListOfScRange( aList, rArg10 );
1305 lclAddToListOfScRange( aList, rArg11 );
1306 lclAddToListOfScRange( aList, rArg12 );
1307 lclAddToListOfScRange( aList, rArg13 );
1308 lclAddToListOfScRange( aList, rArg14 );
1309 lclAddToListOfScRange( aList, rArg15 );
1310 lclAddToListOfScRange( aList, rArg16 );
1311 lclAddToListOfScRange( aList, rArg17 );
1312 lclAddToListOfScRange( aList, rArg18 );
1313 lclAddToListOfScRange( aList, rArg19 );
1314 lclAddToListOfScRange( aList, rArg20 );
1315 lclAddToListOfScRange( aList, rArg21 );
1316 lclAddToListOfScRange( aList, rArg22 );
1317 lclAddToListOfScRange( aList, rArg23 );
1318 lclAddToListOfScRange( aList, rArg24 );
1319 lclAddToListOfScRange( aList, rArg25 );
1320 lclAddToListOfScRange( aList, rArg26 );
1321 lclAddToListOfScRange( aList, rArg27 );
1322 lclAddToListOfScRange( aList, rArg28 );
1323 lclAddToListOfScRange( aList, rArg29 );
1324 lclAddToListOfScRange( aList, rArg30 );
1327 lclJoinRanges( aList );
1348 bool bVolatile =
true;
1349 aVolatile >>= bVolatile;
1373 reqList.
Put( sfxFormBar );
1377 bRes = pItem->GetValue();
1389 SfxRequest aReq( FID_TOGGLEINPUTLINE, SfxCallMode::SLOT, reqList );
1410uno::Reference< frame::XModel >
1419 uno::Reference< XCommandBars > xCommandBars( CommandBars(
uno::Any() ), uno::UNO_QUERY_THROW );
1432 uno::Reference< excel::XWorksheet > xWorksheet =
getActiveSheet();
1433 if ( xWorksheet.is() )
1446 catch( container::NoSuchElementException& )
1493 return "{82154425-0FBF-11d4-8313-005004526AB4}";
1501 return "{82154426-0FBF-11D4-8313-005004526AB4}";
1507 TypeAndIID aResult =
1509 "{82154427-0FBF-11D4-8313-005004526AB4}"
1515uno::Reference<XConnectionPoint> SAL_CALL
1518 uno::Reference<XConnectionPoint> xCP(
new ScVbaApplicationOutgoingConnectionPoint(
this));
1537 return "ScVbaApplication";
1540uno::Sequence< OUString >
1545 "ooo.vba.excel.Application"
1551extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
1553 css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any>
const& )
1561ScVbaApplicationOutgoingConnectionPoint::ScVbaApplicationOutgoingConnectionPoint(
ScVbaApplication* pApp ) :
1568ScVbaApplicationOutgoingConnectionPoint::Advise(
const uno::Reference< XSink >& Sink )
1570 return mpApp->AddSink(Sink);
1574ScVbaApplicationOutgoingConnectionPoint::Unadvise( sal_uInt32 Cookie )
1576 mpApp->RemoveSink( Cookie );
constexpr OUStringLiteral sImplementationName
SfxApplication * SfxGetpApp()
virtual SbxVariable * Find(const OUString &, SbxClassType)
void SetParameters(SbxArray *p)
const OUString & GetName(SbxNameType=SbxNameType::NONE) const
static SC_DLLPUBLIC void Init()
DLL-init/exit-code must be linked to the DLL only.
const ScDocument & GetDocument() const
void UpdateAllRowHeights(const ScMarkData *pTabMark=nullptr)
SC_DLLPUBLIC ScMacroManager * GetMacroManager()
bool IsAdjustHeightLocked() const
SC_DLLPUBLIC void UnlockAdjustHeight()
SC_DLLPUBLIC void SetUserFuncVolatile(const OUString &sName, bool isVolatile)
void push_back(const ScRange &rRange)
bool Contains(const ScAddress &) const
is Address& fully in Range?
void Execute(SfxRequest &rReq)
void GetState(SfxItemSet &rSet)
ScViewData & GetViewData()
static void FillScRange(ScRange &rScRange, const css::table::CellRangeAddress &rApiRange)
virtual double SAL_CALL InchesToPoints(double Inches) override
virtual void SAL_CALL GoTo(const css::uno::Any &Reference, const css::uno::Any &Scroll) override
virtual css::uno::Any SAL_CALL getStatusBar() override
virtual void SAL_CALL setWindowState(const css::uno::Any &rWindowState) override
virtual double SAL_CALL CentimetersToPoints(double Centimeters) override
virtual ov::TypeAndIID SAL_CALL GetConnectionPoint() override
virtual css::uno::Any SAL_CALL getWindowState() override
virtual css::uno::Any SAL_CALL getValue(const OUString &PropertyName) override
virtual OUString getServiceImplName() override
virtual OUString SAL_CALL getTemplatesPath() override
ScVbaAppSettings & mrAppSettings
virtual css::uno::Any SAL_CALL MenuBars(const css::uno::Any &aIndex) override
virtual void SAL_CALL setValue(const OUString &PropertyName, const css::uno::Any &Value) override
virtual css::uno::Reference< ov::excel::XWorkbook > SAL_CALL getActiveWorkbook() override
virtual OUString SAL_CALL getName() override
OUString getOfficePath(const OUString &sPath)
virtual css::uno::Any SAL_CALL Dialogs(const css::uno::Any &DialogIndex) override
virtual void SAL_CALL setCursor(::sal_Int32 _cursor) override
virtual css::uno::Any SAL_CALL getCutCopyMode() override
virtual css::uno::Any SAL_CALL Worksheets(const css::uno::Any &aIndex) override
virtual css::uno::Any SAL_CALL GetOpenFilename(const css::uno::Any &FileFilter, const css::uno::Any &FilterIndex, const css::uno::Any &Title, const css::uno::Any &ButtonText, const css::uno::Any &MultiSelect) override
std::vector< css::uno::Reference< ooo::vba::XSink > > mvSinks
virtual sal_Bool SAL_CALL getDisplayNoteIndicator() override
virtual void SAL_CALL setDisplayFormulaBar(sal_Bool _displayformulabar) override
virtual void SAL_CALL setIteration(sal_Bool bSet) override
virtual sal_Bool SAL_CALL getShowWindowsInTaskbar() override
virtual css::uno::Any SAL_CALL Windows(const css::uno::Any &aIndex) override
virtual void SAL_CALL CallSinks(const OUString &Method, css::uno::Sequence< css::uno::Any > &Arguments) override
virtual css::uno::Reference< ov::excel::XWorkbook > SAL_CALL getThisWorkbook() override
virtual css::uno::Any SAL_CALL getSelection() override
virtual void SAL_CALL setDisplayFullScreen(sal_Bool bSet) override
virtual css::uno::Reference< ov::excel::XWindow > SAL_CALL getActiveWindow() override
virtual OUString SAL_CALL getIID() override
virtual css::uno::Reference< ov::XAssistant > SAL_CALL getAssistant() override
virtual sal_Bool SAL_CALL getIteration() override
virtual void SAL_CALL setDisplayNoteIndicator(sal_Bool bSet) override
virtual void SAL_CALL setStatusBar(const css::uno::Any &_statusbar) override
virtual void SAL_CALL setScreenUpdating(sal_Bool bUpdate) override
virtual OUString SAL_CALL getExactName(const OUString &aApproximateName) override
virtual void SAL_CALL setShowWindowsInTaskbar(sal_Bool bSet) override
virtual sal_Bool SAL_CALL getDisplayFormulaBar() override
ScVbaApplication(const css::uno::Reference< css::uno::XComponentContext > &m_xContext)
sal_uInt32 AddSink(const css::uno::Reference< ooo::vba::XSink > &xSink)
virtual css::uno::Sequence< OUString > getServiceNames() override
virtual css::uno::Reference< ov::XConnectionPoint > SAL_CALL FindConnectionPoint() override
virtual css::uno::Any SAL_CALL FileDialog(const css::uno::Any &DialogType) override
virtual void SAL_CALL OnKey(const OUString &Key, const css::uno::Any &Procedure) override
virtual sal_Bool SAL_CALL getDisplayFullScreen() override
virtual void SAL_CALL wait(double time) override
virtual css::uno::Any SAL_CALL Names(const css::uno::Any &aIndex) override
virtual css::uno::Any SAL_CALL Range(const css::uno::Any &Cell1, const css::uno::Any &Cell2) override
virtual OUString SAL_CALL GetIIDForClassItselfNotCoclass() override
virtual css::uno::Any SAL_CALL Rows(const css::uno::Any &aIndex) override
virtual void SAL_CALL setEnableCancelKey(sal_Bool bEnable) override
virtual void SAL_CALL setDisplayAlerts(sal_Bool displayAlerts) override
virtual void SAL_CALL Undo() override
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getActiveCell() override
virtual css::uno::Any SAL_CALL WorksheetFunction() override
virtual sal_Bool SAL_CALL getDisplayExcel4Menus() override
virtual void SAL_CALL Calculate() override
virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL getActiveSheet() override
virtual void SAL_CALL setDefaultFilePath(const OUString &DefaultFilePath) override
css::uno::Reference< ov::excel::XFileDialog > m_xFileDialog
virtual void SAL_CALL setEnableEvents(sal_Bool bEnable) override
virtual OUString SAL_CALL getPathSeparator() override
virtual css::uno::Any SAL_CALL invoke(const OUString &FunctionName, const css::uno::Sequence< css::uno::Any > &Params, css::uno::Sequence< sal_Int16 > &OutParamIndex, css::uno::Sequence< css::uno::Any > &OutParam) override
virtual css::uno::Reference< css::frame::XModel > getCurrentDocument() override
virtual css::uno::Reference< css::beans::XIntrospectionAccess > SAL_CALL getIntrospection() override
virtual css::uno::Any SAL_CALL Workbooks(const css::uno::Any &aIndex) override
virtual void SAL_CALL Volatile(const css::uno::Any &Volatile) override
virtual css::uno::Any SAL_CALL International(sal_Int32 Index) override
virtual sal_Bool SAL_CALL getEnableEvents() override
static bool getDocumentEventsEnabled()
Returns true, if VBA document events are enabled.
virtual sal_Bool SAL_CALL getEnableCancelKey() override
virtual void SAL_CALL setDisplayExcel4Menus(sal_Bool bSet) override
virtual void SAL_CALL setDisplayScrollBars(sal_Bool bSet) override
virtual OUString SAL_CALL getDefaultFilePath() override
virtual sal_Bool SAL_CALL hasMethod(const OUString &Name) override
void RemoveSink(sal_uInt32 nNumber)
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Union(const css::uno::Reference< ov::excel::XRange > &Arg1, const css::uno::Reference< ov::excel::XRange > &Arg2, const css::uno::Any &Arg3, const css::uno::Any &Arg4, const css::uno::Any &Arg5, const css::uno::Any &Arg6, const css::uno::Any &Arg7, const css::uno::Any &Arg8, const css::uno::Any &Arg9, const css::uno::Any &Arg10, const css::uno::Any &Arg11, const css::uno::Any &Arg12, const css::uno::Any &Arg13, const css::uno::Any &Arg14, const css::uno::Any &Arg15, const css::uno::Any &Arg16, const css::uno::Any &Arg17, const css::uno::Any &Arg18, const css::uno::Any &Arg19, const css::uno::Any &Arg20, const css::uno::Any &Arg21, const css::uno::Any &Arg22, const css::uno::Any &Arg23, const css::uno::Any &Arg24, const css::uno::Any &Arg25, const css::uno::Any &Arg26, const css::uno::Any &Arg27, const css::uno::Any &Arg28, const css::uno::Any &Arg29, const css::uno::Any &Arg30) override
virtual ~ScVbaApplication() override
virtual void SAL_CALL setCalculation(::sal_Int32 _calculation) override
virtual sal_Bool SAL_CALL getDisplayScrollBars() override
virtual OUString SAL_CALL getOperatingSystem() override
virtual void SAL_CALL setCutCopyMode(const css::uno::Any &_cutcopymode) override
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Intersect(const css::uno::Reference< ov::excel::XRange > &Arg1, const css::uno::Reference< ov::excel::XRange > &Arg2, const css::uno::Any &Arg3, const css::uno::Any &Arg4, const css::uno::Any &Arg5, const css::uno::Any &Arg6, const css::uno::Any &Arg7, const css::uno::Any &Arg8, const css::uno::Any &Arg9, const css::uno::Any &Arg10, const css::uno::Any &Arg11, const css::uno::Any &Arg12, const css::uno::Any &Arg13, const css::uno::Any &Arg14, const css::uno::Any &Arg15, const css::uno::Any &Arg16, const css::uno::Any &Arg17, const css::uno::Any &Arg18, const css::uno::Any &Arg19, const css::uno::Any &Arg20, const css::uno::Any &Arg21, const css::uno::Any &Arg22, const css::uno::Any &Arg23, const css::uno::Any &Arg24, const css::uno::Any &Arg25, const css::uno::Any &Arg26, const css::uno::Any &Arg27, const css::uno::Any &Arg28, const css::uno::Any &Arg29, const css::uno::Any &Arg30) override
virtual OUString SAL_CALL getLibraryPath() override
virtual css::uno::Any SAL_CALL Evaluate(const OUString &Name) override
virtual css::uno::Any SAL_CALL Caller(const css::uno::Any &aIndex) override
virtual ::sal_Int32 SAL_CALL getCursor() override
virtual sal_Bool SAL_CALL getDisplayAlerts() override
virtual ::sal_Int32 SAL_CALL getCalculation() override
virtual sal_Bool SAL_CALL hasProperty(const OUString &Name) override
static css::uno::Reference< ov::excel::XRange > getRangeObjectForName(const css::uno::Reference< css::uno::XComponentContext > &xContext, const OUString &sRangeName, ScDocShell *pDocSh, formula::FormulaGrammar::AddressConvention eConv)
static css::uno::Reference< ov::excel::XRange > ApplicationRange(const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Any &Cell1, const css::uno::Any &Cell2)
virtual sal_Int32 SAL_CALL getType() override
static sal_Int32 getAutoShapeType(const css::uno::Reference< css::drawing::XShape > &rShape)
SCROW GetPosY(ScVSplitPos eWhich, SCTAB nForTab=-1) const
bool IsVScrollMode() const
ScSplitPos GetActivePart() const
bool IsHScrollMode() const
SCCOL GetPosX(ScHSplitPos eWhich, SCTAB nForTab=-1) const
static bool IsFullScreen(const SfxViewShell &rViewShell)
Returns true, if the passed view shell is in full screen mode.
static StarBASIC * GetBasic()
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
vcl::Window * GetWindow() const
static SbMethod * GetActiveMethod(sal_uInt16 nLevel=0)
virtual void SAL_CALL setScreenUpdating(sal_Bool bUpdate) override
virtual void SAL_CALL OnKey(const OUString &Key, const css::uno::Any &Procedure) override
css::uno::Type const & get()
#define SAL_PATHDELIMITER
#define DBG_UNHANDLED_EXCEPTION(...)
std::deque< AttacherIndex_Impl > aIndex
Reference< XMultiServiceFactory > xSMgr
Sequence< OUString > aServiceNames
tools::SvRef< SvBaseLink > xSink
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
ScTabViewShell * getCurrentBestViewShell(const uno::Reference< uno::XComponentContext > &xContext)
ScDocShell * getDocShell(const css::uno::Reference< css::frame::XModel > &xModel)
ScTabViewShell * getBestViewShell(const css::uno::Reference< css::frame::XModel > &xModel)
uno::Reference< XHelperInterface > getUnoSheetModuleObj(const uno::Reference< table::XCellRange > &xRange)
VBAHELPER_DLLPUBLIC css::uno::Reference< XHelperInterface > getVBADocument(const css::uno::Reference< css::frame::XModel > &xModel)
VBAHELPER_DLLPUBLIC void dispatchRequests(const css::uno::Reference< css::frame::XModel > &xModel, const OUString &aUrl)
VBAHELPER_DLLPUBLIC css::uno::Reference< css::frame::XModel > getThisExcelDoc(const css::uno::Reference< css::uno::XComponentContext > &xContext)
VBAHELPER_DLLPUBLIC css::uno::Reference< css::frame::XModel > getCurrentExcelDoc(const css::uno::Reference< css::uno::XComponentContext > &xContext)
VBAHELPER_DLLPUBLIC PointerStyle getPointerStyle(const css::uno::Reference< css::frame::XModel > &)
void dispatchExecute(SfxViewShell const *pViewShell, sal_uInt16 nSlot)
VBAHELPER_DLLPUBLIC void setCursorHelper(const css::uno::Reference< css::frame::XModel > &xModel, PointerStyle nPointer, bool bOverWrite)
#define ERRCODE_BASIC_BAD_PARAMETER
#define ERRCODE_BASIC_METHOD_FAILED
Any sbxToUnoValue(const SbxValue *pVar)
Global application settings shared by all open workbooks.
bool mbDisplayNoteIndicator
bool mbShowWindowsInTaskbar
Reference< XController > xController
Reference< XModel > xModel
constexpr OUStringLiteral SC_UNO_FILTERED_RANGE_SELECTION
constexpr OUStringLiteral SC_UNO_ITERENABLED
static uno::Reference< util::XPathSettings > const & lcl_getPathSettingsService(const uno::Reference< uno::XComponentContext > &xContext)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * Calc_ScVbaApplication_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
cppu::ImplInheritanceHelper< VbaApplicationBase, ov::excel::XApplication, ov::XSinkCaller > ScVbaApplication_BASE
ScHSplitPos WhichH(ScSplitPos ePos)
ScVSplitPos WhichV(ScSplitPos ePos)