27#include <com/sun/star/beans/XPropertySet.hpp>
28#include <com/sun/star/beans/XIntrospectionAccess.hpp>
29#include <com/sun/star/container/XNamed.hpp>
30#include <com/sun/star/util/XProtectable.hpp>
31#include <com/sun/star/table/XCellRange.hpp>
32#include <com/sun/star/sheet/XSpreadsheetView.hpp>
33#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
34#include <com/sun/star/sheet/XCalculatable.hpp>
35#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
36#include <com/sun/star/sheet/XSheetCellRange.hpp>
37#include <com/sun/star/sheet/XSheetCellCursor.hpp>
38#include <com/sun/star/sheet/XSheetAnnotationsSupplier.hpp>
39#include <com/sun/star/sheet/XUsedAreaCursor.hpp>
40#include <com/sun/star/sheet/XSpreadsheets.hpp>
41#include <com/sun/star/sheet/XSheetOutline.hpp>
42#include <com/sun/star/sheet/XSheetPageBreak.hpp>
43#include <com/sun/star/sheet/XDataPilotTablesSupplier.hpp>
44#include <com/sun/star/sheet/XNamedRanges.hpp>
45#include <com/sun/star/frame/Desktop.hpp>
46#include <com/sun/star/table/XTableChartsSupplier.hpp>
47#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
48#include <com/sun/star/drawing/XControlShape.hpp>
49#include <com/sun/star/form/XFormsSupplier.hpp>
50#include <ooo/vba/excel/XApplication.hpp>
51#include <ooo/vba/excel/XlEnableSelection.hpp>
52#include <ooo/vba/excel/XlSheetVisibility.hpp>
53#include <ooo/vba/XControlProvider.hpp>
82#define STANDARDWIDTH 2267
83#define STANDARDHEIGHT 427
88static void getNewSpreadsheetName (OUString &aNewName, std::u16string_view aOldName,
const uno::Reference <sheet::XSpreadsheetDocument>& xSpreadDoc )
91 throw lang::IllegalArgumentException(
"getNewSpreadsheetName() xSpreadDoc is null", uno::Reference< uno::XInterface >(), 1 );
92 static const char aUnderScore[] =
"_";
94 aNewName = OUString::Concat(aOldName) + aUnderScore + OUString::number(currentNum) ;
98 aNewName = OUString::Concat(aOldName) + aUnderScore + OUString::number(++currentNum);
102static void removeAllSheets(
const uno::Reference <sheet::XSpreadsheetDocument>& xSpreadDoc,
const OUString& aSheetName)
104 if (!xSpreadDoc.is())
105 throw lang::IllegalArgumentException(
"removeAllSheets() xSpreadDoc is null", uno::Reference< uno::XInterface >(), 1 );
106 uno::Reference<sheet::XSpreadsheets> xSheets = xSpreadDoc->getSheets();
107 uno::Reference <container::XIndexAccess> xIndex( xSheets, uno::UNO_QUERY );
112 uno::Reference<container::XNameContainer> xNameContainer(xSheets,uno::UNO_QUERY_THROW);
113 for (sal_Int32
i = xIndex->getCount() -1;
i>= 1;
i--)
115 uno::Reference< sheet::XSpreadsheet > xSheet(xIndex->getByIndex(
i), uno::UNO_QUERY);
116 uno::Reference< container::XNamed > xNamed( xSheet, uno::UNO_QUERY_THROW );
117 xNameContainer->removeByName(xNamed->getName());
120 uno::Reference< sheet::XSpreadsheet > xSheet(xIndex->getByIndex(0), uno::UNO_QUERY);
121 uno::Reference< container::XNamed > xNamed( xSheet, uno::UNO_QUERY_THROW );
122 xNamed->setName(aSheetName);
125static uno::Reference<frame::XModel>
128 uno::Reference<frame::XModel>
xModel;
131 uno::Reference< uno::XComponentContext > xContext(
134 uno::Reference <frame::XDesktop2 > xComponentLoader = frame::Desktop::create(xContext);
136 uno::Reference<lang::XComponent > xComponent( xComponentLoader->loadComponentFromURL(
137 "private:factory/scalc",
139 uno::Sequence < css::beans::PropertyValue >() ) );
140 uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( xComponent, uno::UNO_QUERY_THROW );
142 xModel.set(xSpreadDoc,uno::UNO_QUERY_THROW);
144 catch ( uno::Exception & )
151 uno::Reference< sheet::XSpreadsheet > xSheet,
159 if (
args.getLength() < 3 )
160 throw lang::IllegalArgumentException();
163 args[2] >>= sSheetName;
165 uno::Reference< sheet::XSpreadsheetDocument > xSpreadDoc( mxModel, uno::UNO_QUERY_THROW );
166 uno::Reference< container::XNameAccess > xNameAccess( xSpreadDoc->getSheets(), uno::UNO_QUERY_THROW );
167 mxSheet.set( xNameAccess->getByName( sSheetName ), uno::UNO_QUERY_THROW );
177 return theScVbaWorksheetUnoTunnelId.
getSeq();
180uno::Reference< ov::excel::XWorksheet >
183 uno::Reference< sheet::XSheetCellCursor > xSheetCellCursor =
getSheet()->createCursor( );
184 uno::Reference<sheet::XUsedAreaCursor> xUsedCursor(xSheetCellCursor,uno::UNO_QUERY_THROW);
194 uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc(
xModel, uno::UNO_QUERY_THROW );
196 uno::Reference <sheet::XSpreadsheets> xSheets( xSpreadDoc->getSheets(), uno::UNO_SET_THROW );
197 uno::Reference <container::XIndexAccess> xIndex( xSheets, uno::UNO_QUERY_THROW );
198 uno::Reference< sheet::XSpreadsheet > xSheet(xIndex->getByIndex(0), uno::UNO_QUERY_THROW);
203 return uno::Reference< excel::XWorksheet >(
getUnoDocModule( aCodeName, pShell ), uno::UNO_QUERY_THROW );
206css::uno::Reference< ov::excel::XWorksheet >
209 OUString aCurrSheetName =
getName();
210 ScVbaWorksheet* pDestSheet = excel::getImplFromDocModuleWrapper<ScVbaWorksheet>( xSheet );
212 uno::Reference <sheet::XSpreadsheetDocument> xDestDoc( pDestSheet->
getModel(), uno::UNO_QUERY );
213 uno::Reference <sheet::XSpreadsheetDocument> xSrcDoc(
getModel(), uno::UNO_QUERY );
217 OUString aSheetName = xSheet->getName();
223 aSheetName = aCurrSheetName;
224 if ( bSheetExists && bDestSheetExists )
229 uno::Reference<sheet::XSpreadsheets> xSheets = xDestDoc->getSheets();
233 xSheets->copyByName(aCurrSheetName,aSheetName,nDest);
238 if ( pDestDocShell && pSrcDocShell )
239 pDestDocShell->
TransferTab( *pSrcDocShell, nSrc, nDest,
true,
true );
243 uno::Reference< excel::XApplication > xApplication(
Application(), uno::UNO_QUERY_THROW );
244 uno::Reference< excel::XWorksheet > xNewSheet( xApplication->Worksheets(
uno::Any( aSheetName ) ), uno::UNO_QUERY_THROW );
251 uno::Reference< container::XNamed > xNamed(
getSheet(), uno::UNO_QUERY_THROW );
252 return xNamed->getName();
258 uno::Reference< container::XNamed > xNamed(
getSheet(), uno::UNO_QUERY_THROW );
259 xNamed->setName( rName );
265 uno::Reference< beans::XPropertySet > xProps(
getSheet(), uno::UNO_QUERY_THROW );
267 xProps->getPropertyValue(
"IsVisible" ) >>=
bVisible;
268 using namespace ::ooo::vba::excel::XlSheetVisibility;
275 using namespace ::ooo::vba::excel::XlSheetVisibility;
279 case xlSheetVisible:
case 1:
287 case xlSheetVeryHidden:
292 throw uno::RuntimeException();
294 uno::Reference< beans::XPropertySet > xProps(
getSheet(), uno::UNO_QUERY_THROW );
307 uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc(
getModel(), uno::UNO_QUERY_THROW );
310 throw uno::RuntimeException(
"Sheet Name does not exist." );
312 uno::Reference< frame::XModel >
xModel(
getModel(), uno::UNO_SET_THROW );
315 bool bLockedCells =
false;
316 bool bUnlockedCells =
false;
323 return excel::XlEnableSelection::xlNoRestrictions;
325 return excel::XlEnableSelection::xlUnlockedCells;
326 return excel::XlEnableSelection::xlNoSelection;
333 if( (nSelection != excel::XlEnableSelection::xlNoRestrictions) &&
334 (nSelection != excel::XlEnableSelection::xlUnlockedCells) &&
335 (nSelection != excel::XlEnableSelection::xlNoSelection) )
340 uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc(
getModel(), uno::UNO_QUERY_THROW );
343 throw uno::RuntimeException(
"Sheet Name does not exist." );
345 uno::Reference< frame::XModel >
xModel(
getModel(), uno::UNO_SET_THROW );
349 bool bLockedCells =
false;
350 bool bUnlockedCells =
false;
351 if( nSelection == excel::XlEnableSelection::xlNoRestrictions )
354 bUnlockedCells =
true;
356 else if( nSelection == excel::XlEnableSelection::xlUnlockedCells )
358 bUnlockedCells =
true;
373 uno::Reference< frame::XModel >
xModel(
getModel(), uno::UNO_SET_THROW );
383 uno::Reference< frame::XModel >
xModel(
getModel(), uno::UNO_SET_THROW );
397 else if (!bAutoFilterMode)
406uno::Reference< excel::XRange >
409 uno::Reference< sheet::XSheetCellRange > xSheetCellRange(
getSheet(), uno::UNO_QUERY_THROW );
410 uno::Reference< sheet::XSheetCellCursor > xSheetCellCursor(
getSheet()->createCursorByRange( xSheetCellRange ), uno::UNO_SET_THROW );
411 uno::Reference<sheet::XUsedAreaCursor> xUsedCursor(xSheetCellCursor,uno::UNO_QUERY_THROW);
412 xUsedCursor->gotoStartOfUsedArea(
false );
413 xUsedCursor->gotoEndOfUsedArea(
true );
417uno::Reference< excel::XOutline >
420 uno::Reference<sheet::XSheetOutline> xOutline(
getSheet(),uno::UNO_QUERY_THROW);
424uno::Reference< excel::XPageSetup >
433 uno::Reference< sheet::XSheetPageBreak > xSheetPageBreak(
getSheet(),uno::UNO_QUERY_THROW);
443 uno::Reference< sheet::XSheetPageBreak > xSheetPageBreak(
getSheet(), uno::UNO_QUERY_THROW );
471 uno::Reference<util::XProtectable > xProtectable(
getSheet(), uno::UNO_QUERY_THROW);
472 return xProtectable->isProtected();
479 OUString aSheetName =
getName();
480 uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc(
getModel(), uno::UNO_QUERY_THROW );
484 uno::Reference< frame::XModel >
xModel(
getModel(), uno::UNO_SET_THROW );
502 uno::Reference< sheet::XSpreadsheetView > xSpreadsheet(
503 getModel()->getCurrentController(), uno::UNO_QUERY_THROW );
504 xSpreadsheet->setActiveSheet(
getSheet());
516 uno::Reference<excel::XWorksheet> xSheet;
517 OUString aCurrSheetName =
getName();
521 uno::Reference< sheet::XSheetCellCursor > xSheetCellCursor =
getSheet()->createCursor( );
522 uno::Reference<sheet::XUsedAreaCursor> xUsedCursor(xSheetCellCursor,uno::UNO_QUERY_THROW);
537 uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc(
getModel(), uno::UNO_QUERY_THROW );
544 uno::Reference<sheet::XSpreadsheets> xSheets = xSpreadDoc->getSheets();
545 xSheets->moveByName(aCurrSheetName,nDest);
552 uno::Reference<excel::XWorksheet> xSheet;
560 xNewSheet->Activate();
567 uno::Reference<excel::XRange> xRange(
Destination, uno::UNO_QUERY );
576 uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc(
getModel(), uno::UNO_QUERY_THROW );
577 OUString aSheetName =
getName();
583 uno::Reference<sheet::XSpreadsheets> xSheets = xSpreadDoc->getSheets();
584 uno::Reference<container::XNameContainer> xNameContainer(xSheets,uno::UNO_QUERY_THROW);
585 xNameContainer->removeByName(aSheetName);
589uno::Reference< excel::XWorksheet >
592 uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc(
getModel(), uno::UNO_QUERY_THROW );
593 uno::Reference <sheet::XSpreadsheets> xSheets( xSpreadDoc->getSheets(), uno::UNO_SET_THROW );
594 uno::Reference <container::XIndexAccess> xIndex( xSheets, uno::UNO_QUERY_THROW );
598 return uno::Reference< excel::XWorksheet >();
599 nIdx = nIdx + offset;
600 uno::Reference< sheet::XSpreadsheet > xSheet(xIndex->getByIndex(nIdx), uno::UNO_QUERY_THROW);
605uno::Reference< excel::XWorksheet >
611uno::Reference< excel::XWorksheet >
622 uno::Reference<util::XProtectable > xProtectable(
getSheet(), uno::UNO_QUERY_THROW);
625 xProtectable->protect( aPasswd );
631 uno::Reference<util::XProtectable > xProtectable(
getSheet(), uno::UNO_QUERY_THROW);
634 xProtectable->unprotect( aPasswd );
640 uno::Reference <sheet::XCalculatable> xReCalculate(
getModel(), uno::UNO_QUERY_THROW);
641 xReCalculate->calculate();
644uno::Reference< excel::XRange >
648, uno::Reference< table::XCellRange >(
getSheet(), uno::UNO_QUERY_THROW ) ) );
649 return xSheetRange->Range( Cell1, Cell2 );
660uno::Reference< excel::XRange >
663 uno::Reference< table::XCellRange > xRange(
getSheet(),uno::UNO_QUERY_THROW );
669uno::Reference< excel::XRange >
674 uno::Reference< table::XCellRange > xRange(
getSheet(), uno::UNO_QUERY_THROW );
675 uno::Reference< frame::XModel >
xModel(
getModel(), uno::UNO_SET_THROW );
680uno::Reference< excel::XRange >
686uno::Reference< excel::XRange >
697 uno::Reference< table::XTableChartsSupplier > xChartSupplier(
getSheet(), uno::UNO_QUERY_THROW );
698 uno::Reference< table::XTableCharts > xTableCharts = xChartSupplier->getCharts();
700 uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier(
mxSheet, uno::UNO_QUERY_THROW );
703 if (
Index.hasValue() )
705 uno::Reference< XCollection > xColl(
mxCharts, uno::UNO_QUERY_THROW );
716 uno::Reference< css::sheet::XSpreadsheet > xSheet =
getSheet();
717 uno::Reference< sheet::XDataPilotTablesSupplier > xTables(xSheet, uno::UNO_QUERY_THROW ) ;
718 uno::Reference< container::XIndexAccess > xIndexAccess( xTables->getDataPilotTables(), uno::UNO_QUERY_THROW );
721 if (
Index.hasValue() )
729 uno::Reference< css::sheet::XSpreadsheet > xSheet =
getSheet();
730 uno::Reference< sheet::XSheetAnnotationsSupplier > xAnnosSupp( xSheet, uno::UNO_QUERY_THROW );
731 uno::Reference< sheet::XSheetAnnotations > xAnnos( xAnnosSupp->getAnnotations(), uno::UNO_SET_THROW );
732 uno::Reference< container::XIndexAccess > xIndexAccess( xAnnos, uno::UNO_QUERY_THROW );
734 if (
Index.hasValue() )
754 css::uno::Reference<css::beans::XPropertySet> xProps(
getSheet(), css::uno::UNO_QUERY_THROW);
755 uno::Reference< sheet::XNamedRanges > xNamedRanges( xProps->getPropertyValue(
"NamedRanges"), uno::UNO_QUERY_THROW );
765 uno::Reference< sheet::XSpreadsheet > xSpreadsheet(
getSheet(), uno::UNO_SET_THROW );
766 uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( xSpreadsheet, uno::UNO_QUERY_THROW );
767 uno::Reference< drawing::XDrawPage > xDrawPage( xDrawPageSupplier->getDrawPage(), uno::UNO_SET_THROW );
768 uno::Reference< container::XIndexAccess > xIndexAccess( xDrawPage, uno::UNO_QUERY_THROW );
771 if(
Index.hasValue() )
779 uno::Reference< sheet::XSpreadsheet > xSpreadsheet(
getSheet(), uno::UNO_SET_THROW );
780 uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( xSpreadsheet, uno::UNO_QUERY_THROW );
781 uno::Reference< drawing::XShapes > xShapes( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
782 uno::Reference< container::XIndexAccess > xIndexAccess( xShapes, uno::UNO_QUERY_THROW );
795 if( !rxButtons.is() )
798 rxButtons->collectShapes();
800 return rxButtons->Item( rIndex,
uno::Any() );
801 return uno::Any( uno::Reference< XCollection >( rxButtons ) );
813 throw uno::RuntimeException();
819 throw uno::RuntimeException();
825 throw uno::RuntimeException();
831 throw uno::RuntimeException();
837 throw uno::RuntimeException();
849 throw uno::RuntimeException();
855 throw uno::RuntimeException();
861 uno::Reference< frame::XModel >
xModel(
getModel(), uno::UNO_SET_THROW );
882uno::Reference< beans::XIntrospectionAccess > SAL_CALL
885 return uno::Reference< beans::XIntrospectionAccess >();
889ScVbaWorksheet::invoke(
const OUString& ,
const uno::Sequence< uno::Any >& , uno::Sequence< ::sal_Int16 >& , uno::Sequence< uno::Any >& )
891 throw uno::RuntimeException(
"Unsupported");
902 uno::Reference< drawing::XControlShape > xControlShape(
getControlShape( aPropertyName ), uno::UNO_QUERY_THROW );
904 uno::Reference<lang::XMultiComponentFactory > xServiceManager(
mxContext->getServiceManager(), uno::UNO_SET_THROW );
905 uno::Reference< XControlProvider > xControlProvider( xServiceManager->createInstanceWithContext(
"ooo.vba.ControlProvider",
mxContext ), uno::UNO_QUERY_THROW );
906 uno::Reference< msforms::XControl > xControl( xControlProvider->createControl( xControlShape,
getModel() ) );
916uno::Reference< container::XNameAccess >
919 uno::Reference< container::XNameAccess > xFormControls;
922 uno::Reference< sheet::XSpreadsheet > xSpreadsheet(
getSheet(), uno::UNO_SET_THROW );
923 uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( xSpreadsheet, uno::UNO_QUERY_THROW );
924 uno::Reference< form::XFormsSupplier > xFormSupplier( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
925 uno::Reference< container::XIndexAccess > xIndexAccess( xFormSupplier->getForms(), uno::UNO_QUERY_THROW );
929 if( xIndexAccess->hasElements() )
930 xFormControls.set( xIndexAccess->getByIndex(0), uno::UNO_QUERY );
933 catch( uno::Exception& )
936 return xFormControls;
942 uno::Reference< container::XNameAccess > xFormControls(
getFormControls() );
943 if ( xFormControls.is() )
944 return xFormControls->hasByName(
aName );
960 uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier(
getSheet(), uno::UNO_QUERY_THROW );
961 uno::Reference< container::XIndexAccess > xIndexAccess( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
963 sal_Int32
nCount = xIndexAccess->getCount();
968 uno::Reference< drawing::XControlShape > xControlShape( aUnoObj, uno::UNO_QUERY );
969 if( xControlShape.is() )
971 uno::Reference< container::XNamed > xNamed( xControlShape->getControl(), uno::UNO_QUERY_THROW );
972 if(
sName == xNamed->getName() )
984 return "ScVbaWorksheet";
990 uno::Reference <sheet::XCalculatable> xCalculatable(
getModel(), uno::UNO_QUERY_THROW);
991 xCalculatable->enableAutomaticCalculation( bEnableCalculation);
996 uno::Reference <sheet::XCalculatable> xCalculatable(
getModel(), uno::UNO_QUERY_THROW);
997 return xCalculatable->isAutomaticCalculationEnabled();
1000uno::Sequence< OUString >
1005 "ooo.vba.excel.Worksheet"
1013 uno::Reference< beans::XPropertySet > xSheetProp(
mxSheet, uno::UNO_QUERY_THROW );
1014 return xSheetProp->getPropertyValue(
"CodeName").get< OUString >();
1020 uno::Reference< sheet::XCellRangeAddressable > xAddressable(
mxSheet, uno::UNO_QUERY_THROW );
1021 return xAddressable->getRangeAddress().Sheet;
1028 sal_Int32 nFrom = 0;
1029 bool bSelection =
false;
1033 if ( !( nFrom || nTo ) )
1036 uno::Reference< frame::XModel >
xModel(
getModel(), uno::UNO_SET_THROW );
1046extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
1048 css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any>
const& args)
css::uno::Reference< css::frame::XModel2 > mxModel
css::uno::Reference< css::uno::XComponentContext > mxContext
virtual css::uno::Any SAL_CALL Application() override
virtual css::uno::Reference< ov::XHelperInterface > SAL_CALL getParent() override
virtual VclPtr< AbstractScDataFormDlg > CreateScDataFormDlg(weld::Window *pParent, ScTabViewShell *pTabViewShell)=0
static SC_DLLPUBLIC ScAbstractDialogFactory * Create()
bool HasAutoFilter() const
void GetArea(SCTAB &rTab, SCCOL &rCol1, SCROW &rRow1, SCCOL &rCol2, SCROW &rRow2) const
void SetAutoFilter(bool bSet)
const ScDocument & GetDocument() const
void PostPaint(SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, PaintPartFlags nPart, sal_uInt16 nExtFlags=0)
sal_uLong TransferTab(ScDocShell &rSrcDocShell, SCTAB nSrcPos, SCTAB nDestPos, bool bInsertNew, bool bNotifyAndPaint)
SC_DLLPUBLIC bool RemoveFlagsTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, ScMF nFlags)
SC_DLLPUBLIC const ScTableProtection * GetTabProtection(SCTAB nTab) const
SC_DLLPUBLIC bool ApplyFlagsTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, ScMF nFlags)
const OUString & GetCodeName() const
SC_DLLPUBLIC void SetTabProtection(SCTAB nTab, const ScTableProtection *pProtect)
SC_DLLPUBLIC ScDBData * GetAnonymousDBData(SCTAB nTab)
sheet protection state container
bool isOptionEnabled(Option eOption) const
void setOption(Option eOption, bool bEnabled)
Represents a collection of hyperlinks of a worksheet or of a range.
static css::uno::Reference< ov::excel::XRange > CellsHelper(const ScDocument &rDoc, const css::uno::Reference< ov::XHelperInterface > &xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Reference< css::table::XCellRange > &xRange, const css::uno::Any &nRowIndex, const css::uno::Any &nColumnIndex)
virtual void SAL_CALL Paste(const css::uno::Any &Destination, const css::uno::Any &Link) override
virtual css::uno::Any SAL_CALL Evaluate(const OUString &Name) override
virtual void SAL_CALL setVisible(sal_Int32 nVisible) override
virtual css::uno::Any SAL_CALL invoke(const OUString &aFunctionName, const css::uno::Sequence< css::uno::Any > &aParams, css::uno::Sequence< ::sal_Int16 > &aOutParamIndex, css::uno::Sequence< css::uno::Any > &aOutParam) override
css::uno::Reference< ov::excel::XChartObjects > mxCharts
virtual void SAL_CALL Protect(const css::uno::Any &Password, const css::uno::Any &DrawingObjects, const css::uno::Any &Contents, const css::uno::Any &Scenarios, const css::uno::Any &UserInterfaceOnly) override
::rtl::Reference< ScVbaSheetObjectsBase > mxButtons[2]
virtual void SAL_CALL Copy(const css::uno::Any &Before, const css::uno::Any &After) override
virtual sal_Bool SAL_CALL hasProperty(const OUString &aName) override
virtual void SAL_CALL setName(const OUString &rName) override
virtual void SAL_CALL setEnableCalculation(sal_Bool EnableCalculation) override
virtual css::uno::Any SAL_CALL ChartObjects(const css::uno::Any &Index) override
virtual css::uno::Any SAL_CALL Spinners(const css::uno::Any &rIndex) override
virtual css::uno::Reference< ov::excel::XOutline > SAL_CALL Outline() override
virtual ::sal_Int32 SAL_CALL getStandardWidth() override
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId()
virtual css::uno::Any SAL_CALL OLEObjects(const css::uno::Any &Index) override
virtual sal_Int16 SAL_CALL getIndex() override
virtual css::uno::Sequence< OUString > getServiceNames() override
virtual ~ScVbaWorksheet() override
virtual css::uno::Reference< css::beans::XIntrospectionAccess > SAL_CALL getIntrospection() override
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getUsedRange() override
virtual sal_Bool SAL_CALL getProtectionMode() override
virtual void SAL_CALL Unprotect(const css::uno::Any &Password) override
virtual ::sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &rId) override
sal_Int16 getSheetID() const
virtual css::uno::Any SAL_CALL ListBoxes(const css::uno::Any &rIndex) override
virtual void SAL_CALL PrintOut(const css::uno::Any &From, const css::uno::Any &To, const css::uno::Any &Copies, const css::uno::Any &Preview, const css::uno::Any &ActivePrinter, const css::uno::Any &PrintToFile, const css::uno::Any &Collate, const css::uno::Any &PrToFileName, const css::uno::Any &IgnorePrintAreas) override
virtual sal_Bool SAL_CALL hasMethod(const OUString &aName) override
css::uno::Reference< ov::excel::XWorksheet > createSheetCopyInNewDoc(const OUString &)
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Rows(const css::uno::Any &aIndex) override
virtual OUString SAL_CALL getName() override
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Cells(const css::uno::Any &nRow, const css::uno::Any &nCol) override
virtual css::uno::Any SAL_CALL Buttons(const css::uno::Any &rIndex) override
virtual void SAL_CALL Delete() override
virtual sal_Bool SAL_CALL getProtectContents() override
virtual void SAL_CALL setEnableSelection(sal_Int32 nSelection) override
virtual css::uno::Any SAL_CALL Hyperlinks(const css::uno::Any &aIndex) override
virtual sal_Int32 SAL_CALL getEnableSelection() override
virtual css::uno::Any SAL_CALL Shapes(const css::uno::Any &aIndex) override
virtual css::uno::Any SAL_CALL Comments(const css::uno::Any &Index) override
const css::uno::Reference< css::frame::XModel > & getModel() const
css::uno::Reference< ov::excel::XHyperlinks > mxHlinks
virtual css::uno::Any SAL_CALL Names(const css::uno::Any &aIndex) override
virtual void SAL_CALL Activate() override
virtual ::sal_Int32 SAL_CALL getStandardHeight() override
virtual sal_Int32 SAL_CALL getVisible() override
virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL getNext() override
virtual void SAL_CALL ShowDataForm() override
css::uno::Reference< css::sheet::XSpreadsheet > mxSheet
virtual css::uno::Any SAL_CALL DropDowns(const css::uno::Any &rIndex) override
virtual void SAL_CALL setValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
virtual css::uno::Any SAL_CALL VPageBreaks(const css::uno::Any &aIndex) override
virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL getPrevious() override
virtual css::uno::Reference< ov::excel::XPageSetup > SAL_CALL PageSetup() override
virtual css::uno::Any SAL_CALL Labels(const css::uno::Any &rIndex) override
virtual css::uno::Any SAL_CALL GroupBoxes(const css::uno::Any &rIndex) override
virtual void SAL_CALL Select() override
css::uno::Reference< ov::excel::XWorksheet > getSheetAtOffset(SCTAB offset)
css::uno::Reference< ov::excel::XRange > getSheetRange()
css::uno::Reference< css::frame::XModel > mxModel
virtual void SAL_CALL setAutoFilterMode(sal_Bool bAutoFilterMode) override
virtual OUString getServiceImplName() override
css::uno::Any getButtons(const css::uno::Any &rIndex, bool bOptionButtons)
virtual OUString SAL_CALL getCodeName() override
virtual sal_Bool SAL_CALL getProtectDrawingObjects() override
virtual css::uno::Any SAL_CALL CheckBoxes(const css::uno::Any &rIndex) override
virtual void SAL_CALL Calculate() override
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Columns(const css::uno::Any &aIndex) override
virtual sal_Bool SAL_CALL getProtectScenarios() override
virtual sal_Bool SAL_CALL getEnableCalculation() override
css::uno::Reference< css::container::XNameAccess > getFormControls() const
virtual void SAL_CALL CheckSpelling(const css::uno::Any &CustomDictionary, const css::uno::Any &IgnoreUppercase, const css::uno::Any &AlwaysSuggest, const css::uno::Any &SpellingLang) override
css::uno::Reference< ov::excel::XWorksheet > createSheetCopy(css::uno::Reference< ov::excel::XWorksheet > const &xSheet, bool bAfter)
virtual void SAL_CALL Move(const css::uno::Any &Before, const css::uno::Any &After) override
virtual sal_Bool SAL_CALL getAutoFilterMode() override
virtual css::uno::Any SAL_CALL getValue(const OUString &aPropertyName) override
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Range(const css::uno::Any &Cell1, const css::uno::Any &Cell2) override
const css::uno::Reference< css::sheet::XSpreadsheet > & getSheet() const
virtual css::uno::Any SAL_CALL HPageBreaks(const css::uno::Any &aIndex) override
virtual css::uno::Any SAL_CALL PivotTables(const css::uno::Any &Index) override
virtual css::uno::Any SAL_CALL OptionButtons(const css::uno::Any &rIndex) override
ScVbaWorksheet(const css::uno::Reference< ov::XHelperInterface > &xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, css::uno::Reference< css::sheet::XSpreadsheet > xSheet, css::uno::Reference< css::frame::XModel > xModel)
virtual css::uno::Any SAL_CALL ScrollBars(const css::uno::Any &rIndex) override
css::uno::Any getControlShape(std::u16string_view sName)
static bool nameExists(const css::uno::Reference< css::sheet::XSpreadsheetDocument > &xSpreadDoc, std::u16string_view name, SCTAB &nTab)
weld::Window * GetFrameWeld() const
const css::uno::Sequence< sal_Int8 > & getSeq() const
std::deque< AttacherIndex_Impl > aIndex
Sequence< OUString > aServiceNames
sal_Int64 getSomethingImpl(const css::uno::Sequence< sal_Int8 > &rId, T *pThis, FallbackToGetSomethingOf< Base >={})
Reference< XComponentContext > getProcessComponentContext()
void setUpDocumentModules(const uno::Reference< sheet::XSpreadsheetDocument > &xDoc)
ScDocShell * getDocShell(const css::uno::Reference< css::frame::XModel > &xModel)
void implnPaste(const uno::Reference< frame::XModel > &xModel)
ScTabViewShell * getBestViewShell(const css::uno::Reference< css::frame::XModel > &xModel)
void implnCopy(const uno::Reference< frame::XModel > &xModel)
VBAHELPER_DLLPUBLIC void setDefaultPropByIntrospection(const css::uno::Any &aObj, const css::uno::Any &aValue)
css::uno::Reference< T > getXSomethingFromArgs(css::uno::Sequence< css::uno::Any > const &args, sal_Int32 nPos, bool bCanBeNull=true)
VBAHELPER_DLLPUBLIC void PrintOutHelper(SfxViewShell const *pViewShell, const css::uno::Any &From, const css::uno::Any &To, const css::uno::Any &Copies, const css::uno::Any &Preview, const css::uno::Any &ActivePrinter, const css::uno::Any &PrintToFile, const css::uno::Any &Collate, const css::uno::Any &PrToFileName, bool bSelection)
uno::Reference< XHelperInterface > getUnoDocModule(std::u16string_view aModName, SfxObjectShell const *pShell)
VBAHELPER_DLLPUBLIC void dispatchRequests(const css::uno::Reference< css::frame::XModel > &xModel, const OUString &aUrl)
#define ERRCODE_BASIC_BAD_PARAMETER
Reference< XModel > xModel
static void removeAllSheets(const uno::Reference< sheet::XSpreadsheetDocument > &xSpreadDoc, const OUString &aSheetName)
static void getNewSpreadsheetName(OUString &aNewName, std::u16string_view aOldName, const uno::Reference< sheet::XSpreadsheetDocument > &xSpreadDoc)
static uno::Reference< frame::XModel > openNewDoc(const OUString &aSheetName)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * Calc_ScVbaWorksheet_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &args)