20 #include <config_feature_opencl.h>
35 #include <svx/svxids.hrc>
37 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
39 #include <officecfg/Office/Common.hxx>
40 #include <officecfg/Office/Calc.hxx>
58 #include <com/sun/star/beans/PropertyAttribute.hpp>
59 #include <com/sun/star/util/Date.hpp>
60 #include <com/sun/star/sheet/XNamedRanges.hpp>
61 #include <com/sun/star/sheet/XLabelRanges.hpp>
62 #include <com/sun/star/sheet/XSelectedSheetsSupplier.hpp>
63 #include <com/sun/star/sheet/XUnnamedDatabaseRanges.hpp>
64 #include <com/sun/star/i18n/XForbiddenCharacters.hpp>
65 #include <com/sun/star/script/XLibraryContainer.hpp>
66 #include <com/sun/star/lang/XInitialization.hpp>
67 #include <com/sun/star/lang/ServiceNotRegisteredException.hpp>
68 #include <com/sun/star/document/XDocumentEventBroadcaster.hpp>
69 #include <com/sun/star/document/IndexedPropertyValues.hpp>
70 #include <com/sun/star/script/XInvocation.hpp>
71 #include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
72 #include <com/sun/star/beans/XFastPropertySet.hpp>
79 #if HAVE_FEATURE_OPENCL
90 #include <docfunc.hxx>
120 #include <unonames.hxx>
122 #include <editsh.hxx>
123 #include <drawsh.hxx>
131 #include <strings.hrc>
189 {
u"", 0, css::uno::Type(), 0, 0 }
191 return aDocOptPropertyMap_Impl;
205 {
u"", 0, css::uno::Type(), 0, 0 }
207 return aColumnsPropertyMap_Impl;
223 {
u"", 0, css::uno::Type(), 0, 0 }
225 return aRowsPropertyMap_Impl;
230 constexpr OUStringLiteral
SCDOC_SERVICE =
u"com.sun.star.document.OfficeDocument";
253 sal_Int32 nNumProps= 10, nIdx = 0;
255 m_aUIProperties.resize(nNumProps);
258 m_aUIProperties[nIdx].Name =
"OptionsUIFile";
259 m_aUIProperties[nIdx++].Value <<= OUString(
"modules/scalc/ui/printeroptions.ui");
263 OUString aAppGroupname(
ScResId( SCSTR_PRINTOPT_PRODNAME ) );
265 m_aUIProperties[nIdx++].Value = setGroupControlOpt(
"tabcontrol-page2", aAppGroupname, OUString());
268 m_aUIProperties[nIdx++].Value = setSubgroupControlOpt(
"pages",
ScResId( SCSTR_PRINTOPT_PAGES ), OUString());
271 m_aUIProperties[nIdx++].Value = setBoolControlOpt(
"suppressemptypages",
ScResId( SCSTR_PRINTOPT_SUPPRESSEMPTY ),
272 ".HelpID:vcl:PrintDialog:IsSuppressEmptyPages:CheckBox",
273 "IsSuppressEmptyPages",
278 m_aUIProperties[nIdx++].Value = setSubgroupControlOpt(
"printrange",
ScResId( SCSTR_PRINTOPT_PAGES ),
283 uno::Sequence< OUString > aChoices{
284 ScResId( SCSTR_PRINTOPT_ALLSHEETS ),
285 ScResId( SCSTR_PRINTOPT_SELECTEDSHEETS ),
286 ScResId( SCSTR_PRINTOPT_SELECTEDCELLS )};
287 uno::Sequence< OUString > aHelpIds{
288 ".HelpID:vcl:PrintDialog:PrintContent:ListBox"};
289 m_aUIProperties[nIdx++].Value = setChoiceListControlOpt(
"printextrabox", OUString(),
290 aHelpIds,
"PrintContent",
291 aChoices, nContent );
295 m_aUIProperties[nIdx++].Value = setSubgroupControlOpt(
"fromwhich",
ScResId( SCSTR_PRINTOPT_FROMWHICH ),
300 OUString aPrintRangeName(
"PrintRange" );
301 aChoices = {
ScResId( SCSTR_PRINTOPT_PRINTALLPAGES ),
ScResId( SCSTR_PRINTOPT_PRINTPAGES ) };
302 aHelpIds = {
".HelpID:vcl:PrintDialog:PrintRange:RadioButton:0",
303 ".HelpID:vcl:PrintDialog:PrintRange:RadioButton:1" };
304 uno::Sequence< OUString > aWidgetIds{
"rbAllPages",
"rbRangePages" };
305 m_aUIProperties[nIdx++].Value = setChoiceRadiosControlOpt(aWidgetIds, OUString(),
313 m_aUIProperties[nIdx++].Value = setEditControlOpt(
"pagerange", OUString(),
314 ".HelpID:vcl:PrintDialog:PageRange:Edit",
315 "PageRange", OUString(), aPageRangeOpt);
318 m_aUIProperties[ nIdx++ ].Value = setChoiceListControlOpt(
"evenoddbox",
320 uno::Sequence<OUString>(),
322 uno::Sequence<OUString>(),
324 uno::Sequence< sal_Bool >(),
327 assert(nIdx == nNumProps);
338 for (beans::PropertyValue & rPropValue : m_aUIProperties)
340 uno::Sequence<beans::PropertyValue> aUIProp;
341 if ( rPropValue.Value >>= aUIProp )
343 for (
auto& rProp : asNonConstRange(aUIProp))
345 OUString
aName = rProp.Name;
346 if ( aName ==
"Property" )
348 beans::PropertyValue aPropertyValue;
349 if ( rProp.Value >>= aPropertyValue )
351 if ( aPropertyValue.Name ==
"PrintContent" )
353 aPropertyValue.Value <<= nContent;
354 rProp.Value <<= aPropertyValue;
356 else if ( aPropertyValue.Name ==
"IsSuppressEmptyPages" )
358 aPropertyValue.Value <<= bSuppress;
359 rProp.Value <<= aPropertyValue;
364 rPropValue.Value <<= aUIProp;
379 if(!rDoc.GetDrawLayer())
384 return *rDoc.GetDrawLayer();
408 xNumberAgg->setDelegator(uno::Reference<uno::XInterface>());
424 uno::Reference<util::XNumberFormatsSupplier> xFormatter(
427 xNumberAgg.set(uno::Reference<uno::XAggregation>( xFormatter, uno::UNO_QUERY ));
432 xFormatter =
nullptr;
435 xNumberAgg->setDelegator( static_cast<cppu::OWeakObject*>(
this) );
502 constexpr
size_t nMaxIter = 5;
505 pViewShell && nIter < nMaxIter;
508 if (pViewShell->GetDocId() != rDocId)
524 int nOutputWidth,
int nOutputHeight,
525 int nTilePosX,
int nTilePosY,
544 pViewData = pActiveViewData;
559 pGridWindow->
PaintTile( rDevice, nOutputWidth, nOutputHeight,
560 nTilePosX, nTilePosY, nTileWidth, nTileHeight );
567 Size aOutputSize(nOutputWidth, nOutputHeight);
603 const bool bIsSelected =
false;
606 OUString aPartInfo =
"{ \"visible\": \"" +
607 OUString::number(static_cast<unsigned int>(bIsVisible)) +
608 "\", \"selected\": \"" +
609 OUString::number(static_cast<unsigned int>(bIsSelected)) +
610 "\", \"rtllayout\": \"" +
611 OUString::number(static_cast<unsigned int>(bIsRTLLayout)) +
628 return (pViewData->
GetDocument().
GetHashCode(nPart, nHashCode) ? OUString::number(nHashCode) : OUString());
646 pWindow = pViewData->GetActiveWin();
649 vcl::Window* pChartWindow = aChartHelper.GetWindow();
651 pWindow = pChartWindow;
673 const double fPPTX = pViewData->
GetPPTX();
674 const double fPPTY = pViewData->
GetPPTY();
676 auto GetColWidthPx = [pThisDoc, fPPTX, nTab](
SCCOL nCol) {
677 const sal_uInt16 nSize = pThisDoc->
GetColWidth(nCol, nTab);
684 if (nDocWidthPixel > 0 && nDocHeightPixel > 0)
687 aSize.
setWidth(nDocWidthPixel / fPPTX);
688 aSize.
setHeight(nDocHeightPixel / fPPTY);
732 int nDrawX = bDrawNegativeX ? -nX : nX;
734 nCount, nButtons, nModifier,
740 Point aPointTwip(nX, nY);
741 Point aPointTwipDraw(nDrawX, nY);
745 if (nType != LOK_MOUSEEVENT_MOUSEMOVE)
753 Point aPointHMMDraw(bDrawNegativeX ? -aPointHMM.X() : aPointHMM.X(), aPointHMM.Y());
755 SdrPage* pPage = pDrawLayer->GetPage(sal_uInt16(nTab));
768 MouseEvent aData(aPosition, nCount, MouseEventModifiers::SIMPLECLICK, nButtons, nModifier);
772 case LOK_MOUSEEVENT_MOUSEBUTTONDOWN:
773 aEvent = VclEventId::WindowMouseButtonDown;
775 case LOK_MOUSEEVENT_MOUSEBUTTONUP:
776 aEvent = VclEventId::WindowMouseButtonUp;
778 case LOK_MOUSEEVENT_MOUSEMOVE:
779 aEvent = VclEventId::WindowMouseMove;
801 bool bHandled =
false;
815 case LOK_SETTEXTSELECTION_START:
818 case LOK_SETTEXTSELECTION_END:
821 case LOK_SETTEXTSELECTION_RESET:
831 else if (pDrawView && pDrawView->
IsTextEdit())
840 case LOK_SETTEXTSELECTION_START:
843 case LOK_SETTEXTSELECTION_END:
846 case LOK_SETTEXTSELECTION_RESET:
874 uno::Reference<datatransfer::XTransferable> xTransferable;
877 xTransferable = pShell->GetEditView()->GetTransferable();
886 xTransferable = pDrawShell->GetDrawView()->CopyToTransferable();
890 if (!xTransferable.is())
893 return xTransferable;
910 double fPPTX = pViewData->
GetPPTX();
911 double fPPTY = pViewData->
GetPPTY();
918 int nPixelX = nX * fPPTX;
919 int nPixelY = nY * fPPTY;
923 case LOK_SETGRAPHICSELECTION_START:
931 case LOK_SETGRAPHICSELECTION_END:
1021 constexpr
double fEps = 1
E-08;
1023 if (pViewData->
GetZoomX() == newZoomX && pViewData->
GetZoomY() == newZoomY && fDeltaPPTX < fEps && fDeltaPPTY < fEps)
1026 pViewData->
SetZoom(newZoomX, newZoomY,
true);
1033 pDrawView->resetGridOffsetsForAllSdrPageViews();
1051 bool bFiltered,
bool bGroups)
1078 rJsonWriter.
put(
"commandName",
".uno:CellCursor");
1088 return PointerStyle::Arrow;
1092 return PointerStyle::Arrow;
1102 pChangeTrack->GetChangeTrackInfo(rJson);
1119 comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs))
1146 std::vector<sc::NoteEntry> aNotes;
1149 auto commentsNode = rJsonWriter.
startArray(
"comments");
1154 rJsonWriter.
put(
"id", aNote.mpNote->GetId());
1155 rJsonWriter.
put(
"tab", aNote.maPos.Tab());
1156 rJsonWriter.
put(
"author", aNote.mpNote->GetAuthor());
1157 rJsonWriter.
put(
"dateTime", aNote.mpNote->GetDate());
1158 rJsonWriter.
put(
"text", aNote.mpNote->GetText());
1165 SCCOL nX = aNote.maPos.Col();
1166 SCROW nY = aNote.maPos.Row();
1172 double fPPTX = pViewData->
GetPPTX();
1173 double fPPTY = pViewData->
GetPPTY();
1175 Size(nSizeXPix / fPPTX, nSizeYPix / fPPTY));
1177 rJsonWriter.
put(
"cellPos", aRect.toString());
1188 std::vector<sc::NoteEntry> aNotes;
1191 auto commentsNode = rJsonWriter.
startArray(
"commentsPos");
1196 rJsonWriter.
put(
"id", aNote.mpNote->GetId());
1197 rJsonWriter.
put(
"tab", aNote.maPos.Tab());
1204 SCCOL nX = aNote.maPos.Col();
1205 SCROW nY = aNote.maPos.Row();
1211 double fPPTX = pViewData->
GetPPTX();
1212 double fPPTY = pViewData->
GetPPTY();
1214 Size(nSizeXPix / fPPTX, nSizeYPix / fPPTY));
1216 rJsonWriter.
put(
"cellPos", aRect.toString());
1226 assert(!rFunctionName.isEmpty());
1238 SC_MOD()->SetAppOptions(aAppOptions);
1240 for (
const beans::PropertyValue& rValue : rArguments)
1242 if (rValue.Name ==
".uno:SpellOnline" && rValue.Value.has<
bool>())
1254 SC_MOD()->SetInputOptions(aInputOptions);
1262 officecfg::Office::Common::Save::Document::WarnAlienFormat::set(
false, xChanges);
1297 aRet =
xNumberAgg->queryAggregation( rType );
1315 static const uno::Sequence<uno::Type>
aTypes = [&]()
1317 uno::Sequence<uno::Type> aAggTypes;
1325 aAggTypes = (*xNumProv)->getTypes();
1331 uno::Sequence<uno::Type>
1356 return css::uno::Sequence<sal_Int8>();
1364 if ( nId == SfxHintId::Dying )
1370 comphelper::getFromUnoTunnel<SvNumberFormatsSupplierObj>(
1371 uno::Reference<util::XNumberFormatsSupplier>(
xNumberAgg, uno::UNO_QUERY) );
1379 else if ( nId == SfxHintId::DataChanged )
1423 return css::uno::Reference< ::css::chart2::data::XDataProvider > (
1444 for (
const beans::PropertyValue& rProp : rOptions)
1446 const OUString & rPropName = rProp.Name;
1450 uno::Reference<awt::XDevice> xRenderDevice(rProp.Value, uno::UNO_QUERY);
1451 if ( xRenderDevice.is() )
1453 VCLXDevice* pDevice = comphelper::getFromUnoTunnel<VCLXDevice>( xRenderDevice );
1472 sal_Int32 nNumeric = 0;
1474 bool bRangeValid =
false;
1475 bool bRectValid =
false;
1483 rTargetRange = aAddress;
1492 ( nNumeric = rTarget.toInt32() ) > 0 && nNumeric <= rDoc.
MaxRow()+1 )
1495 rTargetRange =
ScAddress( 0, static_cast<SCROW>(nNumeric-1), nSourceTab );
1498 else if ( rDoc.
GetTable( rTarget, nNameTab ) )
1512 for (
SCTAB i=0;
i<nTabCount && !bRangeValid;
i++)
1515 OSL_ENSURE(pPage,
"Page ?");
1520 while (pObject && !bRangeValid)
1525 rTargetRange = rDoc.
GetRange(
i, rTargetRect );
1526 bRangeValid = bRectValid =
true;
1528 pObject = aIter.
Next();
1534 if ( bRangeValid && !bRectValid )
1546 const uno::Sequence< beans::PropertyValue >& rOptions,
1549 bool& rbRenderToGraphic )
const
1551 OSL_ENSURE( !rMark.
IsMarked() && !rMark.
IsMultiMarked(),
"FillRenderMarkData: MarkData must be empty" );
1552 OSL_ENSURE(
pDocShell,
"FillRenderMarkData: DocShell must be set" );
1556 uno::Reference<frame::XController> xView;
1559 bool bSelectedSheetsOnly =
false;
1560 bool bSuppressEmptyPages =
true;
1562 bool bHasPrintContent =
false;
1563 sal_Int32 nPrintContent = 0;
1564 sal_Int32 nPrintRange = 0;
1565 sal_Int32 nEOContent = 0;
1566 OUString aPageRange;
1568 for(
const auto& rOption : rOptions )
1570 if ( rOption.Name ==
"IsOnlySelectedSheets" )
1572 rOption.Value >>= bSelectedSheetsOnly;
1574 else if ( rOption.Name ==
"IsSuppressEmptyPages" )
1576 rOption.Value >>= bSuppressEmptyPages;
1578 else if ( rOption.Name ==
"PageRange" )
1580 rOption.Value >>= aPageRange;
1582 else if ( rOption.Name ==
"PrintRange" )
1584 rOption.Value >>= nPrintRange;
1586 else if ( rOption.Name ==
"EvenOdd" )
1588 rOption.Value >>= nEOContent;
1590 else if ( rOption.Name ==
"PrintContent" )
1592 bHasPrintContent =
true;
1593 rOption.Value >>= nPrintContent;
1595 else if ( rOption.Name ==
"View" )
1597 rOption.Value >>= xView;
1599 else if ( rOption.Name ==
"RenderToGraphic" )
1601 rOption.Value >>= rbRenderToGraphic;
1606 if ( bHasPrintContent )
1607 bSelectedSheetsOnly = ( nPrintContent != 0 );
1609 uno::Reference<uno::XInterface> xInterface(aSelection, uno::UNO_QUERY);
1610 if ( xInterface.is() )
1612 ScCellRangesBase* pSelObj = comphelper::getFromUnoTunnel<ScCellRangesBase>( xInterface );
1613 uno::Reference< drawing::XShapes > xShapes( xInterface, uno::UNO_QUERY );
1616 bool bSheet = ( comphelper::getFromUnoTunnel<ScTableSheetObj>( xInterface ) !=
nullptr );
1636 if ( bCursor || bSheet )
1649 else if( xShapes.is() )
1653 uno::Reference< drawing::XShape > xShape( xShapes->getByIndex(0), uno::UNO_QUERY );
1670 else if ( comphelper::getFromUnoTunnel<ScModelObj>( xInterface ) ==
this )
1676 for (
SCTAB nTab = 0; nTab < nTabCount; nTab++)
1685 uno::Reference<sheet::XSelectedSheetsSupplier> xSelectedSheets(xView, uno::UNO_QUERY);
1686 if (bSelectedSheetsOnly &&
pDocShell && xSelectedSheets.is())
1688 const uno::Sequence<sal_Int32> aSelected = xSelectedSheets->getSelectedSheets();
1691 for (
const auto& rSelected : aSelected)
1693 SCTAB nSelected =
static_cast<SCTAB>(rSelected);
1695 aSelectedTabs.insert(nSelected);
1706 if ( nPrintRange == 1 )
1707 rPagesStr = aPageRange;
1715 const uno::Sequence<beans::PropertyValue>& rOptions)
1720 throw lang::DisposedException( OUString(),
1721 static_cast< sheet::XSpreadsheetDocument* >(
this) );
1727 bool bRenderToGraphic =
false;
1728 if ( !
FillRenderMarkData( aSelection, rOptions, aMark, aStatus, aPagesStr, bRenderToGraphic ) )
1744 sal_Int32 nContent = 0;
1745 sal_Int32 nEOContent = 0;
1746 bool bSinglePageSheets =
false;
1747 for (
const auto& rValue : rOptions)
1749 if ( rValue.Name ==
"PrintRange" )
1751 rValue.Value >>= nContent;
1753 else if ( rValue.Name ==
"SinglePageSheets" )
1755 rValue.Value >>= bSinglePageSheets;
1757 else if ( rValue.Name ==
"EvenOdd" )
1759 rValue.Value >>= nEOContent;
1763 if (bSinglePageSheets)
1768 bool bIsPrintEvenPages = (nEOContent != 1 && nContent == 0) || nContent != 0;
1769 bool bIsPrintOddPages = (nEOContent != 2 && nContent == 0) || nContent != 0;
1771 for ( sal_Int32 nPage = 1; nPage <= nPages; nPage++ )
1777 sal_Int32 nSelectCount =
static_cast<sal_Int32
>(
maValidPages.size() );
1779 if ( nEOContent == 1 || nEOContent == 2 )
1780 return nSelectCount;
1782 if ( !aPagesStr.isEmpty() )
1785 nSelectCount = aRangeEnum.
size();
1787 return (nSelectCount > 0) ? nSelectCount : 1;
1790 static sal_Int32
lcl_GetRendererNum( sal_Int32 nSelRenderer, std::u16string_view rPagesStr, sal_Int32 nTotalPages )
1792 if ( rPagesStr.empty() )
1793 return nSelRenderer;
1798 for ( ; nSelRenderer > 0 && aIter != aEnd; --nSelRenderer )
1810 const uno::Any& aSelection,
const uno::Sequence<beans::PropertyValue>& rOptions )
1815 throw lang::DisposedException( OUString(),
1816 static_cast< sheet::XSpreadsheetDocument* >(
this) );
1824 bool bRenderToGraphic =
false;
1825 bool bSinglePageSheets =
false;
1826 if (
FillRenderMarkData( aSelection, rOptions, aMark, aStatus, aPagesStr, bRenderToGraphic ) )
1835 for (
const auto& rValue : rOptions)
1837 if ( rValue.Name ==
"SinglePageSheets" )
1839 rValue.Value >>= bSinglePageSheets;
1844 if (bSinglePageSheets)
1849 if ( nRenderer < 0 )
1851 if ( nSelRenderer != 0 )
1852 throw lang::IllegalArgumentException();
1856 awt::Size aPageSize;
1859 assert( aMark.IsMarked());
1860 const ScRange& aRange = aMark.GetMarkArea();
1862 aRange.aStart.Col(), aRange.aStart.Row(),
1863 aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aStart.Tab()));
1864 aPageSize.Width = aMMRect.
GetWidth();
1869 SCTAB const nCurTab = 0;
1871 Size aTwips = aDefaultFunc.GetPageSize();
1892 if (bSinglePageSheets)
1893 nTab = nSelRenderer;
1901 const ScRange* pSelRange =
nullptr;
1902 if ( bSinglePageSheets )
1915 table::CellRangeAddress aRangeAddress( nTab,
1922 const awt::Size aPageSize(aMMRect.GetWidth(), aMMRect.GetHeight());
1923 const awt::Point aCalcPagePos(aMMRect.Left(), aMMRect.Top());
1925 uno::Sequence<beans::PropertyValue> aSequence
1942 else if ( aMark.IsMarked() )
1944 aRange = aMark.GetMarkArea();
1945 pSelRange = &aRange;
1948 awt::Size aPageSize;
1949 bool bWasCellRange =
false;
1953 bWasCellRange =
true;
1954 aCellRange = aRange;
1958 aPageSize.Width = aMMRect.
GetWidth();
1963 std::unique_ptr<ScPrintFunc, o3tl::default_delete<ScPrintFunc>> pPrintFunc;
1968 pPrintFuncCache->GetFirstAttr(nTab), nTotalPages, pSelRange, &aStatus.GetOptions()));
1969 pPrintFunc->SetRenderFlag(
true );
1971 sal_Int32 nContent = 0;
1972 sal_Int32 nEOContent = 0;
1973 for (
const auto& rValue : rOptions)
1975 if ( rValue.Name ==
"PrintRange" )
1977 rValue.Value >>= nContent;
1979 else if ( rValue.Name ==
"EvenOdd" )
1981 rValue.Value >>= nEOContent;
1988 bool bOddOrEven = (nContent == 0 && nEOContent == 1) || (nContent == 1 && nEOContent == 2);
1995 aPage.
Select( nRenderer+1 );
2000 (
void)pPrintFunc->DoPrint( aPage, nTabStart, nDisplayStart,
false,
nullptr );
2002 bWasCellRange = pPrintFunc->GetLastSourceRange( aCellRange );
2003 Size aTwips = pPrintFunc->GetPageSize();
2016 uno::Sequence<beans::PropertyValue> aSequence(nPropCount);
2017 beans::PropertyValue* pArray = aSequence.getArray();
2019 pArray[0].Value <<= aPageSize;
2022 pArray[1].Value <<=
true;
2023 if ( bWasCellRange )
2025 table::CellRangeAddress aRangeAddress( nTab,
2032 const awt::Size aCalcPageSize(aMMRect.GetWidth(), aMMRect.GetHeight());
2033 const awt::Point aCalcPagePos(aMMRect.Left(), aMMRect.Top());
2036 pArray[2].Value <<= aRangeAddress;
2038 pArray[3].Value <<= aCalcPageSize;
2040 pArray[4].Value <<= aCalcPagePos;
2052 const uno::Sequence<beans::PropertyValue>& rOptions )
2057 throw lang::DisposedException( OUString(),
2058 static_cast< sheet::XSpreadsheetDocument* >(
this) );
2064 bool bRenderToGraphic =
false;
2065 bool bSinglePageSheets =
false;
2066 if ( !
FillRenderMarkData( aSelection, rOptions, aMark, aStatus, aPagesStr, bRenderToGraphic ) )
2067 throw lang::IllegalArgumentException();
2075 for (
const auto& rValue : rOptions)
2077 if ( rValue.Name ==
"SinglePageSheets" )
2079 rValue.Value >>= bSinglePageSheets;
2084 if (bSinglePageSheets)
2088 if ( nRenderer < 0 )
2089 throw lang::IllegalArgumentException();
2093 throw lang::IllegalArgumentException();
2098 const ScRange* pSelRange =
nullptr;
2099 if ( bSinglePageSheets )
2101 awt::Size aPageSize;
2104 rDoc.
GetDataStart( nSelRenderer, nStartCol, nStartRow );
2116 aPageSize.Width = aMMRect.
GetWidth();
2121 if (nVisTab != nSelRenderer)
2123 nVisTab = nSelRenderer;
2131 else if ( aMark.IsMarked() )
2133 aRange = aMark.GetMarkArea();
2134 pSelRange = &aRange;
2145 aViewData.SetTabNo( aRange.
aStart.
Tab() );
2148 const double nPrintFactor = 1.0;
2157 struct DrawViewKeeper
2159 std::unique_ptr<FmFormView> mpDrawView;
2165 mpDrawView->HideSdrPage();
2181 aDrawViewKeeper.mpDrawView.reset(
new FmFormView(
2184 aDrawViewKeeper.mpDrawView->ShowSdrPage(aDrawViewKeeper.mpDrawView->GetModel()->GetPage(nTab));
2185 aDrawViewKeeper.mpDrawView->SetPrintPreview();
2192 std::unique_ptr<ScPrintFunc, o3tl::default_delete<ScPrintFunc>> pPrintFunc;
2199 pPrintFunc->SetDrawView( aDrawViewKeeper.mpDrawView.get() );
2200 pPrintFunc->SetRenderFlag(
true );
2202 pPrintFunc->SetExclusivelyDrawOleAndDrawObjects();
2204 sal_Int32 nContent = 0;
2205 sal_Int32 nEOContent = 0;
2206 for (
const auto& rValue : rOptions)
2208 if ( rValue.Name ==
"PrintRange" )
2210 rValue.Value >>= nContent;
2212 else if ( rValue.Name ==
"EvenOdd" )
2214 rValue.Value >>= nEOContent;
2221 bool bOddOrEven = (nContent == 0 && nEOContent == 1) || (nContent == 0 && nEOContent == 2);
2228 aPage.
Select( nRenderer+1 );
2234 if ( nRenderer == nTabStart )
2242 sal_Int32 nDestID = pPDFData->
CreateDest( aArea );
2244 rDoc.
GetName( nTab, aTabName );
2253 rDoc.
GetName( nTab, aTabName );
2259 (
void)pPrintFunc->DoPrint( aPage, nTabStart, nDisplayStart,
true,
nullptr );
2274 std::vector< vcl::PDFExtOutDevBookmarkEntry >& rBookmarks = pPDFData->
GetBookmarks();
2275 for (
const auto& rBookmark : rBookmarks )
2277 OUString aBookmark = rBookmark.aBookmark;
2278 if ( aBookmark.toChar() ==
'#' )
2282 OUString aTarget( aBookmark.copy( 1 ) );
2286 bool bIsSheet =
false;
2287 bool bValid =
lcl_ParseTarget( aTarget, aTargetRange, aTargetRect, bIsSheet, rDoc, nTab );
2291 sal_Int32 nPage = -1;
2305 if (
pPrintFuncCache->FindLocation( aTargetRange.aStart, aLocation ) )
2307 nPage = aLocation.
nPage;
2329 if ( nX1 > aLocationPixel.
Right() ) nX1 = aLocationPixel.
Right();
2330 if ( nX2 > aLocationPixel.
Right() ) nX2 = aLocationPixel.
Right();
2331 if ( nY1 > aLocationPixel.
Bottom() ) nY1 = aLocationPixel.
Bottom();
2332 if ( nY2 > aLocationPixel.
Bottom() ) nY2 = aLocationPixel.
Bottom();
2348 pPDFData->
SetLinkURL( rBookmark.nLinkId, aBookmark );
2369 bool bLocked =
false;
2399 sal_uInt16 nRet = 0;
2439 OSL_FAIL(
"no DocShell");
2453 OSL_FAIL(
"no DocShell");
2463 OSL_FAIL(
"no DocShell");
2469 bool bEnabled(bEnabledIn);
2482 OSL_FAIL(
"no DocShell");
2505 throw lang::IllegalArgumentException();
2515 OSL_FAIL(
"no DocShell");
2527 OSL_FAIL(
"no DocShell");
2534 const table::CellAddress& aFormulaPosition,
2535 const table::CellAddress& aVariablePosition,
2536 const OUString& aGoalValue )
2539 sheet::GoalResult aResult;
2540 aResult.Divergence = DBL_MAX;
2545 double fValue = 0.0;
2546 bool bFound = rDoc.
Solver(
2547 static_cast<SCCOL>(aFormulaPosition.Column), static_cast<SCROW>(aFormulaPosition.Row), aFormulaPosition.Sheet,
2548 static_cast<SCCOL>(aVariablePosition.Column), static_cast<SCROW>(aVariablePosition.Row), aVariablePosition.Sheet,
2549 aGoalValue, fValue );
2550 aResult.Result = fValue;
2552 aResult.Divergence = 0.0;
2569 pNew->SetParam( *pParam );
2575 const uno::Reference<sheet::XConsolidationDescriptor>& xDescriptor )
2584 xImpl->setFunction( xDescriptor->getFunction() );
2585 xImpl->setSources( xDescriptor->getSources() );
2586 xImpl->setStartOutputPosition( xDescriptor->getStartOutputPosition() );
2587 xImpl->setUseColumnHeaders( xDescriptor->getUseColumnHeaders() );
2588 xImpl->setUseRowHeaders( xDescriptor->getUseRowHeaders() );
2589 xImpl->setInsertLinks( xDescriptor->getInsertLinks() );
2619 xRet.set( xCont, uno::UNO_QUERY_THROW );
2625 uno::Sequence< beans::PropertyValue >
aSeq{
2643 static uno::Reference<beans::XPropertySetInfo> aRef(
2649 const OUString& aPropertyName,
const uno::Any& aValue )
2671 bHardRecalc =
false;
2675 lang::Locale aLocale;
2676 if ( aValue >>= aLocale )
2687 if ( aValue >>= sCodeName )
2692 lang::Locale aLocale;
2693 if ( aValue >>= aLocale )
2703 lang::Locale aLocale;
2704 if ( aValue >>= aLocale )
2720 pBindings->
Invalidate( SID_FM_OPEN_READONLY );
2730 pBindings->
Invalidate( SID_FM_AUTOCONTROLFOCUS );
2742 ? officecfg::Office::Common::Undo::Steps::get() : 0);
2748 bool bChangeAllowed =
true;
2749 if (!bRecordChangesEnabled)
2770 else if ( aPropertyName ==
"BuildId" )
2774 else if ( aPropertyName ==
"SavedObject" )
2777 aValue >>= aObjName;
2778 if ( !aObjName.isEmpty() )
2786 if ( aNewOpt != rOldOpt )
2815 lang::Locale aLocale;
2829 lang::Locale aLocale;
2838 lang::Locale aLocale;
2883 aRet <<= bOpenInDesign;
2890 aRet <<= bAutoControlFocus;
2915 aRet <<= OUString(
"ThisExcelDoc" );
2957 aRet <<= uno::Reference< awt::XDevice >( pXDev );
2959 else if ( aPropertyName ==
"BuildId" )
2963 else if ( aPropertyName ==
"InternalDocument" )
2981 OUString const & aServiceSpecifier,
2986 uno::Reference<uno::XInterface> xRet;
2988 if ( nType != ServiceType::INVALID )
2994 case ServiceType::GRADTAB: xRet.set(xDrawGradTab);
break;
2995 case ServiceType::HATCHTAB: xRet.set(xDrawHatchTab);
break;
2996 case ServiceType::BITMAPTAB: xRet.set(xDrawBitmapTab);
break;
2997 case ServiceType::TRGRADTAB: xRet.set(xDrawTrGradTab);
break;
2998 case ServiceType::MARKERTAB: xRet.set(xDrawMarkerTab);
break;
2999 case ServiceType::DASHTAB: xRet.set(xDrawDashTab);
break;
3000 case ServiceType::CHDATAPROV: xRet.set(xChartDataProv);
break;
3001 case ServiceType::VBAOBJECTPROVIDER: xRet.set(xObjProvider);
break;
3008 ( nType != ServiceType::CHDATAPROV ||
3009 ( pDocShell->GetCreateMode() != SfxObjectCreateMode::INTERNAL ));
3014 if ( !xRet.is() && bCreate )
3021 case ServiceType::GRADTAB: xDrawGradTab.set(xRet);
break;
3022 case ServiceType::HATCHTAB: xDrawHatchTab.set(xRet);
break;
3023 case ServiceType::BITMAPTAB: xDrawBitmapTab.set(xRet);
break;
3024 case ServiceType::TRGRADTAB: xDrawTrGradTab.set(xRet);
break;
3025 case ServiceType::MARKERTAB: xDrawMarkerTab.set(xRet);
break;
3026 case ServiceType::DASHTAB: xDrawDashTab.set(xRet);
break;
3027 case ServiceType::CHDATAPROV: xChartDataProv.set(xRet);
break;
3028 case ServiceType::VBAOBJECTPROVIDER: xObjProvider.set(xRet);
break;
3040 xRet = arguments ==
nullptr
3043 aServiceSpecifier, *arguments);
3046 catch ( lang::ServiceNotRegisteredException & )
3053 uno::Reference<drawing::XShape> xShape( xRet, uno::UNO_QUERY );
3065 const OUString& aServiceSpecifier )
3068 return create(aServiceSpecifier,
nullptr);
3072 const OUString& ServiceSpecifier,
3073 const uno::Sequence<uno::Any>& aArgs )
3078 uno::Reference<uno::XInterface> xInt(
create(ServiceSpecifier, &aArgs));
3080 if ( aArgs.hasElements() )
3084 uno::Reference<lang::XInitialization> xInit( xInt, uno::UNO_QUERY );
3086 xInit->initialize( aArgs );
3103 return "ScModelObj";
3122 const uno::Sequence<sal_Int8 >& rId )
3124 if ( comphelper::isUnoTunnelId<ScModelObj>(rId) )
3129 if ( comphelper::isUnoTunnelId<SfxObjectShell>(rId) )
3145 if(
auto xTunnelAgg =
o3tl::tryAccess<uno::Reference<lang::XUnoTunnel>>(
3148 return (*xTunnelAgg)->getSomething( rId );
3158 return theScModelObjUnoTunnelId.
getSeq();
3185 const uno::Sequence< beans::PropertyValue >& rProperties )
3189 util::ChangesEvent
aEvent;
3190 aEvent.Source.set( static_cast< cppu::OWeakObject* >(
this ) );
3191 aEvent.Base <<= aEvent.Source;
3193 size_t nRangeCount = rRanges.
size();
3194 aEvent.Changes.realloc( static_cast< sal_Int32 >( nRangeCount ) );
3195 auto pChanges = aEvent.Changes.getArray();
3198 uno::Reference< table::XCellRange > xRangeObj;
3210 util::ElementChange& rChange = pChanges[
static_cast< sal_Int32
>(
nIndex ) ];
3211 rChange.Accessor <<= rOperation;
3212 rChange.Element <<= rProperties;
3213 rChange.ReplacedElement <<= xRangeObj;
3221 aIter.
next()->changesOccurred( aEvent );
3223 catch( uno::Exception& )
3231 if ( !(rOperation ==
"cell-change" &&
pDocShell) )
3238 for (
const SCTAB& nTab : aMarkData)
3240 if (nTab >= nTabCount)
3249 size_t nRangeCount = rRanges.
size();
3256 size_t nTabRangeCount = aTabRanges.
size();
3257 if ( nTabRangeCount > 0 )
3259 uno::Reference<uno::XInterface>
xTarget;
3260 if ( nTabRangeCount == 1 )
3262 ScRange const & rRange = aTabRanges[ 0 ];
3269 xTarget.set( static_cast<cppu::OWeakObject*>(
new ScCellRangesObj(
pDocShell, aTabRanges ) ) );
3271 uno::Sequence<uno::Any> aParams{
uno::Any(xTarget) };
3274 uno::Sequence<sal_Int16> aOutArgsIndex;
3275 uno::Sequence<uno::Any> aOutArgs;
3295 for (
SCTAB nTab = 0; nTab < nTabCount; nTab++)
3304 uno::Sequence<uno::Any> aParams;
3305 uno::Sequence<sal_Int16> aOutArgsIndex;
3306 uno::Sequence<uno::Any> aOutArgs;
3313 uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents( rDoc.
GetVbaEventProcessor(), uno::UNO_SET_THROW );
3314 uno::Sequence< uno::Any > aArgs{
uno::Any(nTab) };
3317 catch( uno::Exception& )
3341 officecfg::Office::Common::Misc::UseOpenCL::set(bEnable, batch);
3349 #if HAVE_FEATURE_OPENCL
3350 sc::FormulaGroupInterpreter::switchOpenCLDevice(OUString(),
true);
3365 SC_MOD()->SetFormulaOptions(aOptions);
3366 #if !HAVE_FEATURE_OPENCL
3369 sc::FormulaGroupInterpreter::switchOpenCLDevice(OUString(),
true, bForce);
3380 SC_MOD()->SetFormulaOptions(aOptions);
3385 if(nPlatform < 0 || nDevice < 0)
3386 throw uno::RuntimeException();
3388 #if !HAVE_FEATURE_OPENCL
3389 throw uno::RuntimeException();
3391 std::vector<OpenCLPlatformInfo> aPlatformInfo;
3392 sc::FormulaGroupInterpreter::fillOpenCLInfo(aPlatformInfo);
3394 throw uno::RuntimeException();
3397 throw uno::RuntimeException();
3399 OUString aDeviceString = aPlatformInfo[nPlatform].maVendor +
" " + aPlatformInfo[nPlatform].maDevices[nDevice].maName;
3400 sc::FormulaGroupInterpreter::switchOpenCLDevice(aDeviceString,
false);
3406 #if !HAVE_FEATURE_OPENCL
3409 sal_Int32 nPlatformId;
3410 sal_Int32 nDeviceId;
3411 sc::FormulaGroupInterpreter::getOpenCLDeviceInfo(nDeviceId, nPlatformId);
3418 #if !HAVE_FEATURE_OPENCL
3421 sal_Int32 nPlatformId;
3422 sal_Int32 nDeviceId;
3423 sc::FormulaGroupInterpreter::getOpenCLDeviceInfo(nDeviceId, nPlatformId);
3430 #if !HAVE_FEATURE_OPENCL
3431 return uno::Sequence<sheet::opencl::OpenCLPlatform>();
3433 std::vector<OpenCLPlatformInfo> aPlatformInfo;
3434 sc::FormulaGroupInterpreter::fillOpenCLInfo(aPlatformInfo);
3436 uno::Sequence<sheet::opencl::OpenCLPlatform> aRet(aPlatformInfo.size());
3437 auto aRetRange = asNonConstRange(aRet);
3438 for(
size_t i = 0;
i < aPlatformInfo.size(); ++
i)
3440 aRetRange[
i].Name = aPlatformInfo[
i].maName;
3441 aRetRange[
i].Vendor = aPlatformInfo[
i].maVendor;
3443 aRetRange[
i].Devices.realloc(aPlatformInfo[
i].maDevices.size());
3444 auto pDevices = aRetRange[
i].Devices.getArray();
3445 for(
size_t j = 0; j < aPlatformInfo[
i].maDevices.size(); ++j)
3448 pDevices[j].Name = rDevice.
maName;
3449 pDevices[j].Vendor = rDevice.
maVendor;
3450 pDevices[j].Driver = rDevice.
maDriver;
3461 void setOpcodeSubsetTest(
bool bFlag)
3464 officecfg::Office::Calc::Formula::Calculation::OpenCLSubsetOnly::set(bFlag, batch);
3472 setOpcodeSubsetTest(
true);
3477 setOpcodeSubsetTest(
false);
3482 return officecfg::Office::Calc::Formula::Calculation::OpenCLSubsetOnly::get();
3488 officecfg::Office::Calc::Formula::Calculation::OpenCLMinimumDataSize::set(number, batch);
3494 return officecfg::Office::Calc::Formula::Calculation::OpenCLMinimumDataSize::get();
3515 if ( rHint.
GetId() == SfxHintId::Dying )
3526 OSL_ENSURE(pDrawLayer,
"Cannot create Draw-Layer");
3527 if ( pDrawLayer && nIndex >= 0 && nIndex < pDocShell->GetDocument().GetTableCount() )
3529 SdrPage* pPage = pDrawLayer->
GetPage(static_cast<sal_uInt16>(nIndex));
3530 OSL_ENSURE(pPage,
"Draw-Page not found");
3533 return uno::Reference<drawing::XDrawPage> (pPage->
getUnoPage(), uno::UNO_QUERY);
3545 uno::Reference<drawing::XDrawPage> xRet;
3551 aNewName,
true,
true ) )
3560 SvxDrawPage* pImp = comphelper::getFromUnoTunnel<SvxDrawPage>( xPage );
3587 throw lang::IndexOutOfBoundsException();
3621 if ( rHint.
GetId() == SfxHintId::Dying )
3631 if (
pDocShell && nIndex >= 0 && nIndex < pDocShell->GetDocument().GetTableCount() )
3657 throw uno::RuntimeException();
3671 throw uno::RuntimeException();
3675 const OUString& aCopy, sal_Int16 nDestination )
3688 SCTAB nResultTab =
static_cast<SCTAB>(nDestination);
3690 if (nResultTab >= nTabCount)
3691 nResultTab = nTabCount - 1;
3699 throw uno::RuntimeException();
3706 bool bIllArg =
false;
3712 uno::Reference<uno::XInterface> xInterface(aElement, uno::UNO_QUERY);
3713 if ( xInterface.is() )
3715 ScTableSheetObj* pSheetObj = comphelper::getFromUnoTunnel<ScTableSheetObj>( xInterface );
3720 if ( rDoc.
GetTable( aName, nDummy ) )
3723 throw container::ElementExistException();
3742 throw lang::IllegalArgumentException();
3744 throw uno::RuntimeException();
3752 bool bIllArg =
false;
3758 uno::Reference<uno::XInterface> xInterface(aElement, uno::UNO_QUERY);
3759 if ( xInterface.is() )
3761 ScTableSheetObj* pSheetObj = comphelper::getFromUnoTunnel<ScTableSheetObj>( xInterface );
3768 throw container::NoSuchElementException();
3790 throw lang::IllegalArgumentException();
3792 throw uno::RuntimeException();
3804 throw container::NoSuchElementException();
3809 throw uno::RuntimeException();
3813 const uno::Reference < sheet::XSpreadsheetDocument > & xDocSrc,
3814 const OUString& srcName,
const sal_Int32 nDestPosition )
3820 if ( !xDocSrc.is() )
3821 throw uno::RuntimeException();
3822 ScModelObj* pObj = comphelper::getFromUnoTunnel<ScModelObj>(xDocSrc);
3827 if ( !pDocShellSrc->GetDocument().GetTable( srcName, nIndexSrc ) )
3828 throw lang::IllegalArgumentException();
3832 SCTAB nIndexDest =
static_cast<SCTAB>(nDestPosition);
3833 if (nIndexDest > nCount || nIndexDest < 0)
3834 throw lang::IndexOutOfBoundsException();
3838 *pDocShellSrc, nIndexSrc, nIndexDest,
true,
true );
3850 throw lang::IndexOutOfBoundsException();
3852 return xSheet->getCellByPosition(nColumn, nRow);
3860 throw lang::IndexOutOfBoundsException();
3862 return xSheet->getCellRangeByPosition(nLeft, nTop, nRight, nBottom);
3868 uno::Sequence < uno::Reference < table::XCellRange > > xRet;
3873 throw lang::IllegalArgumentException();
3877 throw lang::IllegalArgumentException();
3879 xRet.realloc(nCount);
3880 auto pRet = xRet.getArray();
3913 throw lang::IndexOutOfBoundsException();
3938 throw container::NoSuchElementException();
3951 uno::Sequence<OUString>
aSeq(nCount);
3952 OUString* pAry = aSeq.getArray();
3960 return uno::Sequence<OUString>();
3976 pDocShell( pDocSh ),
3994 if ( dynamic_cast<const ScUpdateRefHint*>(&rHint) )
3998 else if ( rHint.
GetId() == SfxHintId::Dying )
4041 throw uno::RuntimeException();
4060 throw uno::RuntimeException();
4084 throw lang::IndexOutOfBoundsException();
4106 throw container::NoSuchElementException();
4115 uno::Sequence<OUString>
aSeq(nCount);
4116 OUString* pAry = aSeq.getArray();
4138 static uno::Reference<beans::XPropertySetInfo> aRef(
4144 const OUString& aPropertyName,
const uno::Any& aValue )
4148 throw uno::RuntimeException();
4155 sal_Int32 nNewWidth = 0;
4156 if ( aValue >>= nNewWidth )
4191 throw uno::RuntimeException();
4231 pDocShell( pDocSh ),
4236 pDocShell->GetDocument().AddUnoObject(*
this);
4249 if ( dynamic_cast<const ScUpdateRefHint*>(&rHint) )
4253 else if ( rHint.
GetId() == SfxHintId::Dying )
4286 throw uno::RuntimeException();
4302 throw uno::RuntimeException();
4326 throw lang::IndexOutOfBoundsException();
4346 static uno::Reference<beans::XPropertySetInfo> aRef(
4352 const OUString& aPropertyName,
const uno::Any& aValue )
4356 throw uno::RuntimeException();
4364 sal_Int32 nNewHeight = 0;
4386 sal_Int32 nNewHeight = 0;
4387 if ( aValue >>= nNewHeight )
4443 xRangeObj->setPropertyValue( aPropertyName, aValue );
4451 throw uno::RuntimeException();
4497 aAny = xRangeObj->getPropertyValue( aPropertyName );
4517 const OUString& ,
const uno::Any& )
4529 pDocShell( pDocSh ),
4532 pDocShell->GetDocument().AddUnoObject(*
this);
4547 if ( rHint.
GetId() == SfxHintId::Dying )
4577 const table::CellAddress& aPosition,
const OUString& rText )
4582 OSL_ENSURE( aPosition.Sheet ==
nTab,
"addAnnotation with a wrong Sheet" );
4583 ScAddress aPos( static_cast<SCCOL>(aPosition.Column), static_cast<SCROW>(aPosition.Row),
nTab );
4598 aMarkData.SetMultiMarkArea(
ScRange(aPos) );
4612 return new ScIndexEnumeration(
this,
"com.sun.star.sheet.CellAnnotationsEnumeration");
4634 if (!xAnnotation.is())
4635 throw lang::IndexOutOfBoundsException();
4652 pDocShell( pDocSh ),
4668 if ( dynamic_cast<const ScUpdateRefHint*>(&rHint) )
4672 else if ( rHint.
GetId() == SfxHintId::Dying )
4691 if (aTabName == rName)
4704 if (
pDocShell && nIndex >= 0 && nIndex < nCount )
4720 const uno::Sequence<table::CellRangeAddress>& aRanges,
4721 const OUString& aComment )
4730 for (
const table::CellRangeAddress& rRange : aRanges)
4732 OSL_ENSURE( rRange.Sheet ==
nTab,
"addScenario with a wrong Tab" );
4733 ScRange aRange( static_cast<SCCOL>(rRange.StartColumn), static_cast<SCROW>(rRange.StartRow),
nTab,
4734 static_cast<SCCOL>(rRange.EndColumn), static_cast<SCROW>(rRange.EndRow),
nTab );
4736 aMarkData.SetMultiMarkArea( aRange );
4774 while (nNext < nTabCount && rDoc.
IsScenario(nNext))
4789 throw lang::IndexOutOfBoundsException();
4810 throw container::NoSuchElementException();
4819 uno::Sequence<OUString>
aSeq(nCount);
4825 OUString* pAry = aSeq.getArray();
virtual css::sheet::GoalResult SAL_CALL seekGoal(const css::table::CellAddress &aFormulaPosition, const css::table::CellAddress &aVariablePosition, const OUString &aGoalValue) override
XGoalSeek.
OUString AsRGBHexString() const
SC_DLLPUBLIC bool IsDocProtected() const
Stores the selection in the ScPrintFuncCache so it is only used for the same selection again...
virtual void SAL_CALL lockControllers() override
ScPrintSelectionMode GetMode() const
SC_DLLPUBLIC bool GetPrintArea(SCTAB nTab, SCCOL &rEndCol, SCROW &rEndRow, bool bNotes=true) const
#define SC_UNO_IGNORECASE
SCTAB nTab
Collection belongs to the sheet.
SfxViewFrame * GetViewFrame() const
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override
OUString const & getRuntimeUID() const
virtual sal_Int32 SAL_CALL getFormulaCellNumberLimit() override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
XPropertySet.
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
XEnumerationAccess.
bool GetScenarioIndex_Impl(std::u16string_view rName, SCTAB &rIndex)
bool setGraphicSelection(int nType, int nX, int nY, double fScaleX=1.0, double fScaleY=1.0)
virtual void SAL_CALL disableOpcodeSubsetTest() override
void SetAutoComplete(bool bNew)
constexpr sal_Int32 STD_EXTRA_WIDTH
#define SC_UNO_ISADJUSTHEIGHTENABLED
virtual css::uno::Type SAL_CALL getElementType() override
XElementAccess.
tools::Long GetOutOffYPixel() const
void SetDigitLanguage(LanguageType)
void setGrabBagItem(const css::uno::Any &rVal)
static void notifyOtherViews(const SfxViewShell *pThisView, int nType, std::string_view rKey, const OString &rPayload)
#define SC_UNO_SPELLONLINE
css::uno::Reference< css::uno::XInterface > create(OUString const &aServiceSpecifier, css::uno::Sequence< css::uno::Any > const *arguments)
virtual void SAL_CALL enableAutomaticDeviceSelection(sal_Bool bForce) override
bool hasValidSignatures() const
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
XNameAccess.
void setOpenCLConfigToDefault()
virtual void SAL_CALL addChangesListener(const css::uno::Reference< css::util::XChangesListener > &aListener) override
XChangesNotifier.
virtual void getCellCursor(tools::JsonWriter &rJsonWriter) override
virtual void MouseButtonDown(const MouseEvent &rMEvt) override
#define PROP_UNO_CALCASSHOWN
ScDocShell * GetDocShell() const
virtual void SAL_CALL lockControllers() override
SC_DLLPUBLIC bool GetDataStart(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow) const
virtual void SAL_CALL unprotect(const OUString &aPassword) override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance(const OUString &aServiceSpecifier) override
XMultiServiceFactory.
void SetConsolidateDlgData(std::unique_ptr< ScConsolidateParam > pData)
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override
static bool HasValidData(const css::uno::Reference< css::datatransfer::XTransferable > &rTransferable)
SfxPrinter * GetPrinter(bool bCreateIfNotExist=true)
virtual css::uno::Reference< css::sheet::XSpreadsheets > SAL_CALL getSheets() override
XSpreadsheetDocument.
virtual void SAL_CALL enableOpenCL(sal_Bool bEnable) override
bool Unprotect(SCTAB nTab, const OUString &rPassword, bool bApi)
#define SC_UNONAME_VISFLAG
Iterator begin(const o3tl::sorted_vector< sal_Int32 > *i_pPossibleValues=nullptr) const
virtual void SAL_CALL removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) override
virtual void completeFunction(const OUString &rFunctionName) override
SC_DLLPUBLIC CRFlags GetColFlags(SCCOL nCol, SCTAB nTab) const
OUString ScResId(TranslateId aId)
SC_DLLPUBLIC ScColumnsRange GetAllocatedColumnsRange(SCTAB nTab, SCCOL nColBegin, SCCOL nColEnd) const
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getLinks() override
XLinkTargetSupplier.
SC_DLLPUBLIC bool DeleteContents(const ScMarkData &rMark, InsertDeleteFlags nFlags, bool bRecord, bool bApi)
rtl::Reference< ScTableColumnObj > GetObjectByIndex_Impl(sal_Int32 nIndex) const
virtual sal_Int32 SAL_CALL getCount() override
XIndexAccess.
SC_DLLPUBLIC bool IsNegativePage(SCTAB nTab) const
virtual void SAL_CALL unlockControllers() override
constexpr auto toTwips(N number, Length from)
static bool MakeRangeFromName(const OUString &rName, const ScDocument &rDoc, SCTAB nCurTab, ScRange &rRange, RutlNameScope eScope=RUTL_NAMES, ScAddress::Details const &rDetails=ScAddress::detailsOOOa1, bool bUseDetailsPos=false)
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
ScDocShell * GetDocShell() const
void setWidth(tools::Long nWidth)
ScInterpreterContext & GetThreadedContext() const