20 #include <config_feature_opencl.h>
31 #include <svx/svxids.hrc>
34 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
36 #include <officecfg/Office/Common.hxx>
37 #include <officecfg/Office/Calc.hxx>
56 #include <com/sun/star/beans/PropertyAttribute.hpp>
57 #include <com/sun/star/util/Date.hpp>
58 #include <com/sun/star/sheet/XNamedRanges.hpp>
59 #include <com/sun/star/sheet/XLabelRanges.hpp>
60 #include <com/sun/star/sheet/XSelectedSheetsSupplier.hpp>
61 #include <com/sun/star/sheet/XUnnamedDatabaseRanges.hpp>
62 #include <com/sun/star/i18n/XForbiddenCharacters.hpp>
63 #include <com/sun/star/script/XLibraryContainer.hpp>
64 #include <com/sun/star/lang/XInitialization.hpp>
65 #include <com/sun/star/lang/ServiceNotRegisteredException.hpp>
66 #include <com/sun/star/document/XDocumentEventBroadcaster.hpp>
67 #include <com/sun/star/document/IndexedPropertyValues.hpp>
68 #include <com/sun/star/script/XInvocation.hpp>
69 #include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
70 #include <com/sun/star/beans/XFastPropertySet.hpp>
77 #if HAVE_FEATURE_OPENCL
87 #include <docfunc.hxx>
117 #include <unonames.hxx>
119 #include <editsh.hxx>
120 #include <drawsh.hxx>
128 #include <strings.hrc>
133 #define SC_UNO_VBAGLOBNAME "VBAGlobalConstantName"
186 {
u"", 0, css::uno::Type(), 0, 0 }
188 return aDocOptPropertyMap_Impl;
202 {
u"", 0, css::uno::Type(), 0, 0 }
204 return aColumnsPropertyMap_Impl;
220 {
u"", 0, css::uno::Type(), 0, 0 }
222 return aRowsPropertyMap_Impl;
225 #define SCMODELOBJ_SERVICE "com.sun.star.sheet.SpreadsheetDocument"
226 #define SCDOCSETTINGS_SERVICE "com.sun.star.sheet.SpreadsheetDocumentSettings"
227 #define SCDOC_SERVICE "com.sun.star.document.OfficeDocument"
250 sal_Int32 nNumProps= 10, nIdx = 0;
252 m_aUIProperties.resize(nNumProps);
255 m_aUIProperties[nIdx].Name =
"OptionsUIFile";
256 m_aUIProperties[nIdx++].Value <<= OUString(
"modules/scalc/ui/printeroptions.ui");
260 OUString aAppGroupname(
ScResId( SCSTR_PRINTOPT_PRODNAME ) );
262 m_aUIProperties[nIdx++].Value = setGroupControlOpt(
"tabcontrol-page2", aAppGroupname, OUString());
265 m_aUIProperties[nIdx++].Value = setSubgroupControlOpt(
"pages",
ScResId( SCSTR_PRINTOPT_PAGES ), OUString());
268 m_aUIProperties[nIdx++].Value = setBoolControlOpt(
"suppressemptypages",
ScResId( SCSTR_PRINTOPT_SUPPRESSEMPTY ),
269 ".HelpID:vcl:PrintDialog:IsSuppressEmptyPages:CheckBox",
270 "IsSuppressEmptyPages",
275 m_aUIProperties[nIdx++].Value = setSubgroupControlOpt(
"printrange",
ScResId( SCSTR_PRINTOPT_PAGES ),
280 uno::Sequence< OUString > aChoices{
281 ScResId( SCSTR_PRINTOPT_ALLSHEETS ),
282 ScResId( SCSTR_PRINTOPT_SELECTEDSHEETS ),
283 ScResId( SCSTR_PRINTOPT_SELECTEDCELLS )};
284 uno::Sequence< OUString > aHelpIds{
285 ".HelpID:vcl:PrintDialog:PrintContent:ListBox"};
286 m_aUIProperties[nIdx++].Value = setChoiceListControlOpt(
"printextrabox", OUString(),
287 aHelpIds,
"PrintContent",
288 aChoices, nContent );
292 m_aUIProperties[nIdx++].Value = setSubgroupControlOpt(
"fromwhich",
ScResId( SCSTR_PRINTOPT_FROMWHICH ),
297 OUString aPrintRangeName(
"PrintRange" );
298 aChoices.realloc( 2 );
299 aHelpIds.realloc( 2 );
300 uno::Sequence< OUString > aWidgetIds( 2 );
301 aChoices[0] =
ScResId( SCSTR_PRINTOPT_PRINTALLPAGES );
302 aHelpIds[0] =
".HelpID:vcl:PrintDialog:PrintRange:RadioButton:0";
303 aWidgetIds[0] =
"rbAllPages";
304 aChoices[1] =
ScResId( SCSTR_PRINTOPT_PRINTPAGES );
305 aHelpIds[1] =
".HelpID:vcl:PrintDialog:PrintRange:RadioButton:1";
306 aWidgetIds[1] =
"rbRangePages";
307 m_aUIProperties[nIdx++].Value = setChoiceRadiosControlOpt(aWidgetIds, OUString(),
315 m_aUIProperties[nIdx++].Value = setEditControlOpt(
"pagerange", OUString(),
316 ".HelpID:vcl:PrintDialog:PageRange:Edit",
317 "PageRange", OUString(), aPageRangeOpt);
320 m_aUIProperties[ nIdx++ ].Value = setChoiceListControlOpt(
"evenoddbox",
322 uno::Sequence<OUString>(),
324 uno::Sequence<OUString>(),
326 uno::Sequence< sal_Bool >(),
329 assert(nIdx == nNumProps);
340 for (beans::PropertyValue & rPropValue : m_aUIProperties)
342 uno::Sequence<beans::PropertyValue> aUIProp;
343 if ( rPropValue.Value >>= aUIProp )
345 for (
auto& rProp : aUIProp)
347 OUString
aName = rProp.Name;
348 if ( aName ==
"Property" )
350 beans::PropertyValue aPropertyValue;
351 if ( rProp.Value >>= aPropertyValue )
353 if ( aPropertyValue.Name ==
"PrintContent" )
355 aPropertyValue.Value <<= nContent;
356 rProp.Value <<= aPropertyValue;
358 else if ( aPropertyValue.Name ==
"IsSuppressEmptyPages" )
360 aPropertyValue.Value <<= bSuppress;
361 rProp.Value <<= aPropertyValue;
366 rPropValue.Value <<= aUIProp;
381 if(!rDoc.GetDrawLayer())
386 return *rDoc.GetDrawLayer();
410 xNumberAgg->setDelegator(uno::Reference<uno::XInterface>());
426 uno::Reference<util::XNumberFormatsSupplier> xFormatter(
429 xNumberAgg.set(uno::Reference<uno::XAggregation>( xFormatter, uno::UNO_QUERY ));
434 xFormatter =
nullptr;
437 xNumberAgg->setDelegator( static_cast<cppu::OWeakObject*>(
this) );
504 constexpr
size_t nMaxIter = 5;
507 pViewShell && nIter < nMaxIter;
510 if (pViewShell->GetDocId() != rDocId)
526 int nOutputWidth,
int nOutputHeight,
527 int nTilePosX,
int nTilePosY,
546 pViewData = pActiveViewData;
561 pGridWindow->
PaintTile( rDevice, nOutputWidth, nOutputHeight,
562 nTilePosX, nTilePosY, nTileWidth, nTileHeight );
565 nTilePosX, nTilePosY, nTileWidth, nTileHeight);
594 const bool bIsSelected =
false;
596 OUString aPartInfo =
"{ \"visible\": \"" +
597 OUString::number(static_cast<unsigned int>(bIsVisible)) +
598 "\", \"selected\": \"" +
599 OUString::number(static_cast<unsigned int>(bIsSelected)) +
616 return (pViewData->
GetDocument().
GetHashCode(nPart, nHashCode) ? OUString::number(nHashCode) : OUString());
634 pWindow = pViewData->GetActiveWin();
637 vcl::Window* pChartWindow = aChartHelper.GetWindow();
639 pWindow = pChartWindow;
661 const double fPPTX = pViewData->
GetPPTX();
662 const double fPPTY = pViewData->
GetPPTY();
664 auto GetColWidthPx = [pThisDoc, fPPTX, nTab](
SCCOL nCol) {
665 const sal_uInt16 nSize = pThisDoc->
GetColWidth(nCol, nTab);
672 if (nDocWidthPixel > 0 && nDocHeightPixel > 0)
675 aSize.
setWidth(nDocWidthPixel / fPPTX);
676 aSize.
setHeight(nDocHeightPixel / fPPTY);
716 nCount, nButtons, nModifier,
722 if (nType != LOK_MOUSEEVENT_MOUSEMOVE)
731 LokMouseEventData aMouseEventData(nType, aPos, nCount, MouseEventModifiers::SIMPLECLICK,
732 nButtons, nModifier);
750 bool bHandled =
false;
764 case LOK_SETTEXTSELECTION_START:
767 case LOK_SETTEXTSELECTION_END:
770 case LOK_SETTEXTSELECTION_RESET:
780 else if (pDrawView && pDrawView->
IsTextEdit())
789 case LOK_SETTEXTSELECTION_START:
792 case LOK_SETTEXTSELECTION_END:
795 case LOK_SETTEXTSELECTION_RESET:
823 uno::Reference<datatransfer::XTransferable> xTransferable;
826 xTransferable = pShell->GetEditView()->GetTransferable();
835 xTransferable = pDrawShell->GetDrawView()->CopyToTransferable();
839 if (!xTransferable.is())
842 return xTransferable;
859 double fPPTX = pViewData->
GetPPTX();
860 double fPPTY = pViewData->
GetPPTY();
867 int nPixelX = nX * fPPTX;
868 int nPixelY = nY * fPPTY;
872 case LOK_SETGRAPHICSELECTION_START:
880 case LOK_SETGRAPHICSELECTION_END:
948 const Fraction newZoomY(nTilePixelHeight_ * TWIPS_PER_PIXEL, nTileTwipHeight_);
953 pViewData->
SetZoom(newZoomX, newZoomY,
true);
960 pDrawView->resetGridOffsetsForAllSdrPageViews();
978 bool bFiltered,
bool bGroups)
1005 rJsonWriter.
put(
"commandName",
".uno:CellCursor");
1015 return PointerStyle::Arrow;
1019 return PointerStyle::Arrow;
1029 pChangeTrack->GetChangeTrackInfo(rJson);
1046 comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs))
1073 std::vector<sc::NoteEntry> aNotes;
1076 auto commentsNode = rJsonWriter.
startNode(
"comments");
1079 auto commentNode = rJsonWriter.
startNode(
"");
1081 rJsonWriter.
put(
"id", aNote.mpNote->GetId());
1082 rJsonWriter.
put(
"tab", aNote.maPos.Tab());
1083 rJsonWriter.
put(
"author", aNote.mpNote->GetAuthor());
1084 rJsonWriter.
put(
"dateTime", aNote.mpNote->GetDate());
1085 rJsonWriter.
put(
"text", aNote.mpNote->GetText());
1092 SCCOL nX = aNote.maPos.Col();
1093 SCROW nY = aNote.maPos.Row();
1099 double fPPTX = pViewData->
GetPPTX();
1100 double fPPTY = pViewData->
GetPPTY();
1102 Size(nSizeXPix / fPPTX, nSizeYPix / fPPTY));
1104 rJsonWriter.
put(
"cellPos", aRect.toString());
1115 std::vector<sc::NoteEntry> aNotes;
1118 auto commentsNode = rJsonWriter.
startNode(
"commentsPos");
1121 auto commentNode = rJsonWriter.
startNode(
"");
1123 rJsonWriter.
put(
"id", aNote.mpNote->GetId());
1124 rJsonWriter.
put(
"tab", aNote.maPos.Tab());
1131 SCCOL nX = aNote.maPos.Col();
1132 SCROW nY = aNote.maPos.Row();
1138 double fPPTX = pViewData->
GetPPTX();
1139 double fPPTY = pViewData->
GetPPTY();
1141 Size(nSizeXPix / fPPTX, nSizeYPix / fPPTY));
1143 rJsonWriter.
put(
"cellPos", aRect.toString());
1153 assert(!rFunctionName.isEmpty());
1162 for (
const beans::PropertyValue&
rValue : rArguments)
1164 if (
rValue.Name ==
".uno:SpellOnline" &&
rValue.Value.has<
bool>())
1176 SC_MOD()->SetInputOptions(aInputOptions);
1217 aRet =
xNumberAgg->queryAggregation( rType );
1235 static const uno::Sequence<uno::Type>
aTypes = [&]()
1237 uno::Sequence<uno::Type> aAggTypes;
1245 aAggTypes = (*xNumProv)->getTypes();
1251 uno::Sequence<uno::Type>
1276 return css::uno::Sequence<sal_Int8>();
1284 if ( nId == SfxHintId::Dying )
1290 comphelper::getUnoTunnelImplementation<SvNumberFormatsSupplierObj>(
1291 uno::Reference<util::XNumberFormatsSupplier>(
xNumberAgg, uno::UNO_QUERY) );
1299 else if ( nId == SfxHintId::DataChanged )
1343 return css::uno::Reference< ::css::chart2::data::XDataProvider > (
1364 for (
const beans::PropertyValue& rProp : rOptions)
1366 const OUString & rPropName = rProp.Name;
1370 uno::Reference<awt::XDevice> xRenderDevice(rProp.Value, uno::UNO_QUERY);
1371 if ( xRenderDevice.is() )
1373 VCLXDevice* pDevice = comphelper::getUnoTunnelImplementation<VCLXDevice>( xRenderDevice );
1392 sal_Int32 nNumeric = 0;
1394 bool bRangeValid =
false;
1395 bool bRectValid =
false;
1403 rTargetRange = aAddress;
1412 ( nNumeric = rTarget.toInt32() ) > 0 && nNumeric <= rDoc.
MaxRow()+1 )
1415 rTargetRange =
ScAddress( 0, static_cast<SCROW>(nNumeric-1), nSourceTab );
1418 else if ( rDoc.
GetTable( rTarget, nNameTab ) )
1432 for (
SCTAB i=0;
i<nTabCount && !bRangeValid;
i++)
1435 OSL_ENSURE(pPage,
"Page ?");
1440 while (pObject && !bRangeValid)
1445 rTargetRange = rDoc.
GetRange(
i, rTargetRect );
1446 bRangeValid = bRectValid =
true;
1448 pObject = aIter.
Next();
1454 if ( bRangeValid && !bRectValid )
1466 const uno::Sequence< beans::PropertyValue >& rOptions,
1469 bool& rbRenderToGraphic )
const
1471 OSL_ENSURE( !rMark.
IsMarked() && !rMark.
IsMultiMarked(),
"FillRenderMarkData: MarkData must be empty" );
1472 OSL_ENSURE(
pDocShell,
"FillRenderMarkData: DocShell must be set" );
1476 uno::Reference<frame::XController> xView;
1479 bool bSelectedSheetsOnly =
false;
1480 bool bSuppressEmptyPages =
true;
1482 bool bHasPrintContent =
false;
1483 sal_Int32 nPrintContent = 0;
1484 sal_Int32 nPrintRange = 0;
1485 sal_Int32 nEOContent = 0;
1486 OUString aPageRange;
1488 for(
const auto& rOption : rOptions )
1490 if ( rOption.Name ==
"IsOnlySelectedSheets" )
1492 rOption.Value >>= bSelectedSheetsOnly;
1494 else if ( rOption.Name ==
"IsSuppressEmptyPages" )
1496 rOption.Value >>= bSuppressEmptyPages;
1498 else if ( rOption.Name ==
"PageRange" )
1500 rOption.Value >>= aPageRange;
1502 else if ( rOption.Name ==
"PrintRange" )
1504 rOption.Value >>= nPrintRange;
1506 else if ( rOption.Name ==
"EvenOdd" )
1508 rOption.Value >>= nEOContent;
1510 else if ( rOption.Name ==
"PrintContent" )
1512 bHasPrintContent =
true;
1513 rOption.Value >>= nPrintContent;
1515 else if ( rOption.Name ==
"View" )
1517 rOption.Value >>= xView;
1519 else if ( rOption.Name ==
"RenderToGraphic" )
1521 rOption.Value >>= rbRenderToGraphic;
1526 if ( bHasPrintContent )
1527 bSelectedSheetsOnly = ( nPrintContent != 0 );
1529 uno::Reference<uno::XInterface> xInterface(aSelection, uno::UNO_QUERY);
1530 if ( xInterface.is() )
1532 ScCellRangesBase* pSelObj = comphelper::getUnoTunnelImplementation<ScCellRangesBase>( xInterface );
1533 uno::Reference< drawing::XShapes > xShapes( xInterface, uno::UNO_QUERY );
1536 bool bSheet = ( comphelper::getUnoTunnelImplementation<ScTableSheetObj>( xInterface ) !=
nullptr );
1557 if ( bCursor || bSheet )
1570 else if( xShapes.is() )
1574 uno::Reference< drawing::XShape > xShape( xShapes->getByIndex(0), uno::UNO_QUERY );
1591 else if ( comphelper::getUnoTunnelImplementation<ScModelObj>( xInterface ) ==
this )
1597 for (
SCTAB nTab = 0; nTab < nTabCount; nTab++)
1606 uno::Reference<sheet::XSelectedSheetsSupplier> xSelectedSheets(xView, uno::UNO_QUERY);
1607 if (bSelectedSheetsOnly && xSelectedSheets.is())
1609 const uno::Sequence<sal_Int32> aSelected = xSelectedSheets->getSelectedSheets();
1612 for (
const auto& rSelected : aSelected)
1614 SCTAB nSelected =
static_cast<SCTAB>(rSelected);
1616 aSelectedTabs.insert(nSelected);
1627 if ( nPrintRange == 1 )
1628 rPagesStr = aPageRange;
1636 const uno::Sequence<beans::PropertyValue>& rOptions)
1641 throw lang::DisposedException( OUString(),
1642 static_cast< sheet::XSpreadsheetDocument* >(
this) );
1648 bool bRenderToGraphic =
false;
1649 if ( !
FillRenderMarkData( aSelection, rOptions, aMark, aStatus, aPagesStr, bRenderToGraphic ) )
1665 sal_Int32 nContent = 0;
1666 sal_Int32 nEOContent = 0;
1667 bool bSinglePageSheets =
false;
1668 for (
const auto&
rValue : rOptions)
1670 if (
rValue.Name ==
"PrintRange" )
1672 rValue.Value >>= nContent;
1674 else if (
rValue.Name ==
"SinglePageSheets" )
1676 rValue.Value >>= bSinglePageSheets;
1678 else if (
rValue.Name ==
"EvenOdd" )
1680 rValue.Value >>= nEOContent;
1684 if (bSinglePageSheets)
1689 bool bIsPrintEvenPages = (nEOContent != 1 && nContent == 0) || nContent != 0;
1690 bool bIsPrintOddPages = (nEOContent != 2 && nContent == 0) || nContent != 0;
1692 for ( sal_Int32 nPage = 1; nPage <= nPages; nPage++ )
1698 sal_Int32 nSelectCount =
static_cast<sal_Int32
>(
maValidPages.size() );
1700 if ( nEOContent == 1 || nEOContent == 2 )
1701 return nSelectCount;
1703 if ( !aPagesStr.isEmpty() )
1706 nSelectCount = aRangeEnum.
size();
1708 return (nSelectCount > 0) ? nSelectCount : 1;
1711 static sal_Int32
lcl_GetRendererNum( sal_Int32 nSelRenderer,
const OUString& rPagesStr, sal_Int32 nTotalPages )
1713 if ( rPagesStr.isEmpty() )
1714 return nSelRenderer;
1719 for ( ; nSelRenderer > 0 && aIter != aEnd; --nSelRenderer )
1731 const uno::Any& aSelection,
const uno::Sequence<beans::PropertyValue>& rOptions )
1736 throw lang::DisposedException( OUString(),
1737 static_cast< sheet::XSpreadsheetDocument* >(
this) );
1745 bool bRenderToGraphic =
false;
1746 bool bSinglePageSheets =
false;
1747 if (
FillRenderMarkData( aSelection, rOptions, aMark, aStatus, aPagesStr, bRenderToGraphic ) )
1756 for (
const auto&
rValue : rOptions)
1758 if (
rValue.Name ==
"SinglePageSheets" )
1760 rValue.Value >>= bSinglePageSheets;
1765 if (bSinglePageSheets)
1770 if ( nRenderer < 0 )
1772 if ( nSelRenderer != 0 )
1773 throw lang::IllegalArgumentException();
1777 awt::Size aPageSize;
1780 assert( aMark.IsMarked());
1782 aMark.GetMarkArea( aRange );
1784 aRange.aStart.Col(), aRange.aStart.Row(),
1785 aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aStart.Tab()));
1786 aPageSize.Width = aMMRect.
GetWidth();
1791 SCTAB const nCurTab = 0;
1793 Size aTwips = aDefaultFunc.GetPageSize();
1814 if (bSinglePageSheets)
1815 nTab = nSelRenderer;
1823 const ScRange* pSelRange =
nullptr;
1824 if ( bSinglePageSheets )
1826 awt::Size aPageSize;
1838 table::CellRangeAddress aRangeAddress( nTab,
1845 aPageSize.Width = aMMRect.GetWidth();
1846 aPageSize.Height = aMMRect.GetHeight();
1848 awt::Size aCalcPageSize ( aMMRect.GetSize().Width(), aMMRect.GetSize().Height() );
1849 awt::Point aCalcPagePos( aMMRect.getX(), aMMRect.getY() );
1851 uno::Sequence<beans::PropertyValue> aSequence(5);
1852 beans::PropertyValue* pArray = aSequence.getArray();
1854 pArray[0].Value <<= aPageSize;
1857 pArray[1].Value <<=
true;
1859 pArray[2].Value <<= aRangeAddress;
1861 pArray[3].Value <<= aCalcPageSize;
1863 pArray[4].Value <<= aCalcPagePos;
1872 else if ( aMark.IsMarked() )
1874 aMark.GetMarkArea( aRange );
1875 pSelRange = &aRange;
1878 awt::Size aPageSize;
1879 bool bWasCellRange =
false;
1883 bWasCellRange =
true;
1884 aCellRange = aRange;
1888 aPageSize.Width = aMMRect.
GetWidth();
1893 std::unique_ptr<ScPrintFunc, o3tl::default_delete<ScPrintFunc>> pPrintFunc;
1898 pPrintFuncCache->GetFirstAttr(nTab), nTotalPages, pSelRange, &aStatus.GetOptions()));
1899 pPrintFunc->SetRenderFlag(
true );
1901 sal_Int32 nContent = 0;
1902 sal_Int32 nEOContent = 0;
1903 for (
const auto&
rValue : rOptions)
1905 if (
rValue.Name ==
"PrintRange" )
1907 rValue.Value >>= nContent;
1909 else if (
rValue.Name ==
"EvenOdd" )
1911 rValue.Value >>= nEOContent;
1918 bool bOddOrEven = (nContent == 0 && nEOContent == 1) || (nContent == 1 && nEOContent == 2);
1925 aPage.
Select( nRenderer+1 );
1930 (
void)pPrintFunc->DoPrint( aPage, nTabStart, nDisplayStart,
false,
nullptr );
1932 bWasCellRange = pPrintFunc->GetLastSourceRange( aCellRange );
1933 Size aTwips = pPrintFunc->GetPageSize();
1946 uno::Sequence<beans::PropertyValue> aSequence(nPropCount);
1947 beans::PropertyValue* pArray = aSequence.getArray();
1949 pArray[0].Value <<= aPageSize;
1952 pArray[1].Value <<=
true;
1953 if ( bWasCellRange )
1955 table::CellRangeAddress aRangeAddress( nTab,
1962 awt::Size aCalcPageSize ( aMMRect.GetSize().Width(), aMMRect.GetSize().Height() );
1963 awt::Point aCalcPagePos( aMMRect.getX(), aMMRect.getY() );
1966 pArray[2].Value <<= aRangeAddress;
1968 pArray[3].Value <<= aCalcPageSize;
1970 pArray[4].Value <<= aCalcPagePos;
1982 const uno::Sequence<beans::PropertyValue>& rOptions )
1987 throw lang::DisposedException( OUString(),
1988 static_cast< sheet::XSpreadsheetDocument* >(
this) );
1994 bool bRenderToGraphic =
false;
1995 bool bSinglePageSheets =
false;
1996 if ( !
FillRenderMarkData( aSelection, rOptions, aMark, aStatus, aPagesStr, bRenderToGraphic ) )
1997 throw lang::IllegalArgumentException();
2005 for (
const auto&
rValue : rOptions)
2007 if (
rValue.Name ==
"SinglePageSheets" )
2009 rValue.Value >>= bSinglePageSheets;
2014 if (bSinglePageSheets)
2018 if ( nRenderer < 0 )
2019 throw lang::IllegalArgumentException();
2023 throw lang::IllegalArgumentException();
2028 const ScRange* pSelRange =
nullptr;
2029 if ( bSinglePageSheets )
2031 awt::Size aPageSize;
2034 rDoc.
GetDataStart( nSelRenderer, nStartCol, nStartRow );
2046 aPageSize.Width = aMMRect.
GetWidth();
2051 if (nVisTab != nSelRenderer)
2053 nVisTab = nSelRenderer;
2061 else if ( aMark.IsMarked() )
2063 aMark.GetMarkArea( aRange );
2064 pSelRange = &aRange;
2075 aViewData.SetTabNo( aRange.
aStart.
Tab() );
2078 const double nPrintFactor = 1.0;
2087 struct DrawViewKeeper
2089 std::unique_ptr<FmFormView> mpDrawView;
2095 mpDrawView->HideSdrPage();
2111 aDrawViewKeeper.mpDrawView.reset(
new FmFormView(
2114 aDrawViewKeeper.mpDrawView->ShowSdrPage(aDrawViewKeeper.mpDrawView->GetModel()->GetPage(nTab));
2115 aDrawViewKeeper.mpDrawView->SetPrintPreview();
2122 std::unique_ptr<ScPrintFunc, o3tl::default_delete<ScPrintFunc>> pPrintFunc;
2129 pPrintFunc->SetDrawView( aDrawViewKeeper.mpDrawView.get() );
2130 pPrintFunc->SetRenderFlag(
true );
2132 pPrintFunc->SetExclusivelyDrawOleAndDrawObjects();
2134 sal_Int32 nContent = 0;
2135 sal_Int32 nEOContent = 0;
2136 for (
const auto&
rValue : rOptions)
2138 if (
rValue.Name ==
"PrintRange" )
2140 rValue.Value >>= nContent;
2142 else if (
rValue.Name ==
"EvenOdd" )
2144 rValue.Value >>= nEOContent;
2151 bool bOddOrEven = (nContent == 0 && nEOContent == 1) || (nContent == 0 && nEOContent == 2);
2158 aPage.
Select( nRenderer+1 );
2164 if ( nRenderer == nTabStart )
2172 sal_Int32 nDestID = pPDFData->
CreateDest( aArea );
2174 rDoc.
GetName( nTab, aTabName );
2183 rDoc.
GetName( nTab, aTabName );
2189 (
void)pPrintFunc->DoPrint( aPage, nTabStart, nDisplayStart,
true,
nullptr );
2204 std::vector< vcl::PDFExtOutDevBookmarkEntry >& rBookmarks = pPDFData->
GetBookmarks();
2205 for (
const auto& rBookmark : rBookmarks )
2207 OUString aBookmark = rBookmark.aBookmark;
2208 if ( aBookmark.toChar() ==
'#' )
2212 OUString aTarget( aBookmark.copy( 1 ) );
2216 bool bIsSheet =
false;
2217 bool bValid =
lcl_ParseTarget( aTarget, aTargetRange, aTargetRect, bIsSheet, rDoc, nTab );
2221 sal_Int32 nPage = -1;
2235 if (
pPrintFuncCache->FindLocation( aTargetRange.aStart, aLocation ) )
2237 nPage = aLocation.
nPage;
2259 if ( nX1 > aLocationPixel.
Right() ) nX1 = aLocationPixel.
Right();
2260 if ( nX2 > aLocationPixel.
Right() ) nX2 = aLocationPixel.
Right();
2261 if ( nY1 > aLocationPixel.
Bottom() ) nY1 = aLocationPixel.
Bottom();
2262 if ( nY2 > aLocationPixel.
Bottom() ) nY2 = aLocationPixel.
Bottom();
2278 pPDFData->
SetLinkURL( rBookmark.nLinkId, aBookmark );
2299 bool bLocked =
false;
2329 sal_uInt16 nRet = 0;
2369 OSL_FAIL(
"no DocShell");
2383 OSL_FAIL(
"no DocShell");
2393 OSL_FAIL(
"no DocShell");
2399 bool bEnabled(bEnabledIn);
2412 OSL_FAIL(
"no DocShell");
2435 throw lang::IllegalArgumentException();
2445 OSL_FAIL(
"no DocShell");
2457 OSL_FAIL(
"no DocShell");
2464 const table::CellAddress& aFormulaPosition,
2465 const table::CellAddress& aVariablePosition,
2466 const OUString& aGoalValue )
2469 sheet::GoalResult aResult;
2470 aResult.Divergence = DBL_MAX;
2475 double fValue = 0.0;
2476 bool bFound = rDoc.
Solver(
2477 static_cast<SCCOL>(aFormulaPosition.Column), static_cast<SCROW>(aFormulaPosition.Row), aFormulaPosition.Sheet,
2478 static_cast<SCCOL>(aVariablePosition.Column), static_cast<SCROW>(aVariablePosition.Row), aVariablePosition.Sheet,
2479 aGoalValue, fValue );
2480 aResult.Result = fValue;
2482 aResult.Divergence = 0.0;
2499 pNew->SetParam( *pParam );
2505 const uno::Reference<sheet::XConsolidationDescriptor>& xDescriptor )
2514 xImpl->setFunction( xDescriptor->getFunction() );
2515 xImpl->setSources( xDescriptor->getSources() );
2516 xImpl->setStartOutputPosition( xDescriptor->getStartOutputPosition() );
2517 xImpl->setUseColumnHeaders( xDescriptor->getUseColumnHeaders() );
2518 xImpl->setUseRowHeaders( xDescriptor->getUseRowHeaders() );
2519 xImpl->setInsertLinks( xDescriptor->getInsertLinks() );
2549 xRet.set( xCont, uno::UNO_QUERY_THROW );
2551 uno::Sequence< beans::PropertyValue >
aSeq;
2555 OUString sOUName(sName);
2557 aSeq[0].Value <<= sOUName;
2560 aSeq[1].Value <<= nPosLeft;
2563 aSeq[2].Value <<= nPosTop;
2564 xCont->insertByIndex( 0, uno::makeAny( aSeq ) );
2577 static uno::Reference<beans::XPropertySetInfo> aRef(
2583 const OUString& aPropertyName,
const uno::Any& aValue )
2605 bHardRecalc =
false;
2609 lang::Locale aLocale;
2610 if ( aValue >>= aLocale )
2621 if ( aValue >>= sCodeName )
2626 lang::Locale aLocale;
2627 if ( aValue >>= aLocale )
2637 lang::Locale aLocale;
2638 if ( aValue >>= aLocale )
2654 pBindings->
Invalidate( SID_FM_OPEN_READONLY );
2664 pBindings->
Invalidate( SID_FM_AUTOCONTROLFOCUS );
2676 ? officecfg::Office::Common::Undo::Steps::get() : 0);
2682 bool bChangeAllowed =
true;
2683 if (!bRecordChangesEnabled)
2704 else if ( aPropertyName ==
"BuildId" )
2708 else if ( aPropertyName ==
"SavedObject" )
2711 aValue >>= aObjName;
2712 if ( !aObjName.isEmpty() )
2720 if ( aNewOpt != rOldOpt )
2749 lang::Locale aLocale;
2763 lang::Locale aLocale;
2772 lang::Locale aLocale;
2817 aRet <<= bOpenInDesign;
2824 aRet <<= bAutoControlFocus;
2849 aRet <<= OUString(
"ThisExcelDoc" );
2891 aRet <<= uno::Reference< awt::XDevice >( pXDev );
2893 else if ( aPropertyName ==
"BuildId" )
2897 else if ( aPropertyName ==
"InternalDocument" )
2915 OUString const & aServiceSpecifier,
2920 uno::Reference<uno::XInterface> xRet;
2922 if ( nType != ServiceType::INVALID )
2928 case ServiceType::GRADTAB: xRet.set(xDrawGradTab);
break;
2929 case ServiceType::HATCHTAB: xRet.set(xDrawHatchTab);
break;
2930 case ServiceType::BITMAPTAB: xRet.set(xDrawBitmapTab);
break;
2931 case ServiceType::TRGRADTAB: xRet.set(xDrawTrGradTab);
break;
2932 case ServiceType::MARKERTAB: xRet.set(xDrawMarkerTab);
break;
2933 case ServiceType::DASHTAB: xRet.set(xDrawDashTab);
break;
2934 case ServiceType::CHDATAPROV: xRet.set(xChartDataProv);
break;
2935 case ServiceType::VBAOBJECTPROVIDER: xRet.set(xObjProvider);
break;
2942 ( nType != ServiceType::CHDATAPROV ||
2943 ( pDocShell->GetCreateMode() != SfxObjectCreateMode::INTERNAL ));
2948 if ( !xRet.is() && bCreate )
2955 case ServiceType::GRADTAB: xDrawGradTab.set(xRet);
break;
2956 case ServiceType::HATCHTAB: xDrawHatchTab.set(xRet);
break;
2957 case ServiceType::BITMAPTAB: xDrawBitmapTab.set(xRet);
break;
2958 case ServiceType::TRGRADTAB: xDrawTrGradTab.set(xRet);
break;
2959 case ServiceType::MARKERTAB: xDrawMarkerTab.set(xRet);
break;
2960 case ServiceType::DASHTAB: xDrawDashTab.set(xRet);
break;
2961 case ServiceType::CHDATAPROV: xChartDataProv.set(xRet);
break;
2962 case ServiceType::VBAOBJECTPROVIDER: xObjProvider.set(xRet);
break;
2974 xRet = arguments ==
nullptr
2977 aServiceSpecifier, *arguments);
2980 catch ( lang::ServiceNotRegisteredException & )
2987 uno::Reference<drawing::XShape> xShape( xRet, uno::UNO_QUERY );
2999 const OUString& aServiceSpecifier )
3002 return create(aServiceSpecifier,
nullptr);
3006 const OUString& ServiceSpecifier,
3007 const uno::Sequence<uno::Any>& aArgs )
3012 uno::Reference<uno::XInterface> xInt(
create(ServiceSpecifier, &aArgs));
3014 if ( aArgs.hasElements() )
3018 uno::Reference<lang::XInitialization> xInit( xInt, uno::UNO_QUERY );
3020 xInit->initialize( aArgs );
3037 return "ScModelObj";
3056 const uno::Sequence<sal_Int8 >& rId )
3058 if ( isUnoTunnelId<ScModelObj>(rId) )
3060 return sal::static_int_cast<sal_Int64>(
reinterpret_cast<sal_IntPtr
>(
this));
3063 if ( isUnoTunnelId<SfxObjectShell>(rId) )
3065 return sal::static_int_cast<sal_Int64>(
reinterpret_cast<sal_IntPtr
>(
pDocShell ));
3079 if(
auto xTunnelAgg =
o3tl::tryAccess<uno::Reference<lang::XUnoTunnel>>(
3082 return (*xTunnelAgg)->getSomething( rId );
3092 return theScModelObjUnoTunnelId.
getSeq();
3119 const uno::Sequence< beans::PropertyValue >& rProperties )
3123 util::ChangesEvent
aEvent;
3124 aEvent.Source.set( static_cast< cppu::OWeakObject* >(
this ) );
3125 aEvent.Base <<= aEvent.Source;
3127 size_t nRangeCount = rRanges.
size();
3128 aEvent.Changes.realloc( static_cast< sal_Int32 >( nRangeCount ) );
3131 uno::Reference< table::XCellRange > xRangeObj;
3143 util::ElementChange& rChange = aEvent.Changes[
static_cast< sal_Int32
>(
nIndex ) ];
3144 rChange.Accessor <<= rOperation;
3145 rChange.Element <<= rProperties;
3146 rChange.ReplacedElement <<= xRangeObj;
3154 static_cast< util::XChangesListener*
>( aIter.
next() )->changesOccurred( aEvent );
3156 catch( uno::Exception& )
3164 if ( !(rOperation ==
"cell-change" &&
pDocShell) )
3171 for (
const SCTAB& nTab : aMarkData)
3173 if (nTab >= nTabCount)
3182 size_t nRangeCount = rRanges.
size();
3189 size_t nTabRangeCount = aTabRanges.
size();
3190 if ( nTabRangeCount > 0 )
3192 uno::Reference<uno::XInterface>
xTarget;
3193 if ( nTabRangeCount == 1 )
3195 ScRange const & rRange = aTabRanges[ 0 ];
3204 uno::Sequence<uno::Any> aParams(1);
3205 aParams[0] <<= xTarget;
3208 uno::Sequence<sal_Int16> aOutArgsIndex;
3209 uno::Sequence<uno::Any> aOutArgs;
3229 for (
SCTAB nTab = 0; nTab < nTabCount; nTab++)
3238 uno::Sequence<uno::Any> aParams;
3239 uno::Sequence<sal_Int16> aOutArgsIndex;
3240 uno::Sequence<uno::Any> aOutArgs;
3247 uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents( rDoc.
GetVbaEventProcessor(), uno::UNO_SET_THROW );
3248 uno::Sequence< uno::Any > aArgs( 1 );
3249 aArgs[ 0 ] <<= nTab;
3252 catch( uno::Exception& )
3276 officecfg::Office::Common::Misc::UseOpenCL::set(bEnable, batch);
3284 #if HAVE_FEATURE_OPENCL
3285 sc::FormulaGroupInterpreter::switchOpenCLDevice(OUString(),
true);
3300 SC_MOD()->SetFormulaOptions(aOptions);
3301 #if !HAVE_FEATURE_OPENCL
3304 sc::FormulaGroupInterpreter::switchOpenCLDevice(OUString(),
true, bForce);
3315 SC_MOD()->SetFormulaOptions(aOptions);
3320 if(nPlatform < 0 || nDevice < 0)
3321 throw uno::RuntimeException();
3323 #if !HAVE_FEATURE_OPENCL
3324 throw uno::RuntimeException();
3326 std::vector<OpenCLPlatformInfo> aPlatformInfo;
3327 sc::FormulaGroupInterpreter::fillOpenCLInfo(aPlatformInfo);
3329 throw uno::RuntimeException();
3332 throw uno::RuntimeException();
3334 OUString aDeviceString = aPlatformInfo[nPlatform].maVendor +
" " + aPlatformInfo[nPlatform].maDevices[nDevice].maName;
3335 sc::FormulaGroupInterpreter::switchOpenCLDevice(aDeviceString,
false);
3341 #if !HAVE_FEATURE_OPENCL
3344 sal_Int32 nPlatformId;
3345 sal_Int32 nDeviceId;
3346 sc::FormulaGroupInterpreter::getOpenCLDeviceInfo(nDeviceId, nPlatformId);
3353 #if !HAVE_FEATURE_OPENCL
3356 sal_Int32 nPlatformId;
3357 sal_Int32 nDeviceId;
3358 sc::FormulaGroupInterpreter::getOpenCLDeviceInfo(nDeviceId, nPlatformId);
3365 #if !HAVE_FEATURE_OPENCL
3366 return uno::Sequence<sheet::opencl::OpenCLPlatform>();
3368 std::vector<OpenCLPlatformInfo> aPlatformInfo;
3369 sc::FormulaGroupInterpreter::fillOpenCLInfo(aPlatformInfo);
3371 uno::Sequence<sheet::opencl::OpenCLPlatform> aRet(aPlatformInfo.size());
3372 for(
size_t i = 0;
i < aPlatformInfo.size(); ++
i)
3374 aRet[
i].Name = aPlatformInfo[
i].maName;
3375 aRet[
i].Vendor = aPlatformInfo[
i].maVendor;
3377 aRet[
i].Devices.realloc(aPlatformInfo[
i].maDevices.size());
3378 for(
size_t j = 0; j < aPlatformInfo[
i].maDevices.size(); ++j)
3381 aRet[
i].Devices[j].Name = rDevice.
maName;
3382 aRet[
i].Devices[j].Vendor = rDevice.
maVendor;
3383 aRet[
i].Devices[j].Driver = rDevice.
maDriver;
3394 void setOpcodeSubsetTest(
bool bFlag)
3397 officecfg::Office::Calc::Formula::Calculation::OpenCLSubsetOnly::set(bFlag, batch);
3405 setOpcodeSubsetTest(
true);
3410 setOpcodeSubsetTest(
false);
3415 return officecfg::Office::Calc::Formula::Calculation::OpenCLSubsetOnly::get();
3421 officecfg::Office::Calc::Formula::Calculation::OpenCLMinimumDataSize::set(number, batch);
3427 return officecfg::Office::Calc::Formula::Calculation::OpenCLMinimumDataSize::get();
3448 if ( rHint.
GetId() == SfxHintId::Dying )
3459 OSL_ENSURE(pDrawLayer,
"Cannot create Draw-Layer");
3460 if ( pDrawLayer && nIndex >= 0 && nIndex < pDocShell->GetDocument().GetTableCount() )
3462 SdrPage* pPage = pDrawLayer->
GetPage(static_cast<sal_uInt16>(nIndex));
3463 OSL_ENSURE(pPage,
"Draw-Page not found");
3466 return uno::Reference<drawing::XDrawPage> (pPage->
getUnoPage(), uno::UNO_QUERY);
3478 uno::Reference<drawing::XDrawPage> xRet;
3484 aNewName,
true,
true ) )
3493 SvxDrawPage* pImp = comphelper::getUnoTunnelImplementation<SvxDrawPage>( xPage );
3520 throw lang::IndexOutOfBoundsException();
3522 return uno::makeAny(xPage);
3555 if ( rHint.
GetId() == SfxHintId::Dying )
3565 if (
pDocShell && nIndex >= 0 && nIndex < pDocShell->GetDocument().GetTableCount() )
3591 throw uno::RuntimeException();
3605 throw uno::RuntimeException();
3609 const OUString& aCopy, sal_Int16 nDestination )
3622 SCTAB nResultTab =
static_cast<SCTAB>(nDestination);
3624 if (nResultTab >= nTabCount)
3625 nResultTab = nTabCount - 1;
3633 throw uno::RuntimeException();
3640 bool bIllArg =
false;
3646 uno::Reference<uno::XInterface> xInterface(aElement, uno::UNO_QUERY);
3647 if ( xInterface.is() )
3649 ScTableSheetObj* pSheetObj = comphelper::getUnoTunnelImplementation<ScTableSheetObj>( xInterface );
3654 if ( rDoc.
GetTable( aName, nDummy ) )
3657 throw container::ElementExistException();
3676 throw lang::IllegalArgumentException();
3678 throw uno::RuntimeException();
3686 bool bIllArg =
false;
3692 uno::Reference<uno::XInterface> xInterface(aElement, uno::UNO_QUERY);
3693 if ( xInterface.is() )
3695 ScTableSheetObj* pSheetObj = comphelper::getUnoTunnelImplementation<ScTableSheetObj>( xInterface );
3702 throw container::NoSuchElementException();
3724 throw lang::IllegalArgumentException();
3726 throw uno::RuntimeException();
3738 throw container::NoSuchElementException();
3743 throw uno::RuntimeException();
3747 const uno::Reference < sheet::XSpreadsheetDocument > & xDocSrc,
3748 const OUString& srcName,
const sal_Int32 nDestPosition )
3754 if ( !xDocSrc.is() )
3755 throw uno::RuntimeException();
3756 ScModelObj* pObj = comphelper::getUnoTunnelImplementation<ScModelObj>(xDocSrc);
3761 if ( !pDocShellSrc->GetDocument().GetTable( srcName, nIndexSrc ) )
3762 throw lang::IllegalArgumentException();
3766 SCTAB nIndexDest =
static_cast<SCTAB>(nDestPosition);
3767 if (nIndexDest > nCount || nIndexDest < 0)
3768 throw lang::IndexOutOfBoundsException();
3772 *pDocShellSrc, nIndexSrc, nIndexDest,
true,
true );
3784 throw lang::IndexOutOfBoundsException();
3786 return xSheet->getCellByPosition(nColumn, nRow);
3794 throw lang::IndexOutOfBoundsException();
3796 return xSheet->getCellRangeByPosition(nLeft, nTop, nRight, nBottom);
3802 uno::Sequence < uno::Reference < table::XCellRange > > xRet;
3807 throw lang::IllegalArgumentException();
3811 throw lang::IllegalArgumentException();
3813 xRet.realloc(nCount);
3846 throw lang::IndexOutOfBoundsException();
3848 return uno::makeAny(xSheet);
3872 throw container::NoSuchElementException();
3874 return uno::makeAny(xSheet);
3885 uno::Sequence<OUString>
aSeq(nCount);
3886 OUString* pAry = aSeq.getArray();
3894 return uno::Sequence<OUString>();
3910 pDocShell( pDocSh ),
3928 if ( dynamic_cast<const ScUpdateRefHint*>(&rHint) )
3932 else if ( rHint.
GetId() == SfxHintId::Dying )
3975 throw uno::RuntimeException();
3994 throw uno::RuntimeException();
4018 throw lang::IndexOutOfBoundsException();
4020 return uno::makeAny(xColumn);
4041 throw container::NoSuchElementException();
4043 return uno::makeAny(xColumn);
4050 uno::Sequence<OUString>
aSeq(nCount);
4051 OUString* pAry = aSeq.getArray();
4074 static uno::Reference<beans::XPropertySetInfo> aRef(
4080 const OUString& aPropertyName,
const uno::Any& aValue )
4084 throw uno::RuntimeException();
4091 sal_Int32 nNewWidth = 0;
4092 if ( aValue >>= nNewWidth )
4127 throw uno::RuntimeException();
4167 pDocShell( pDocSh ),
4172 pDocShell->GetDocument().AddUnoObject(*
this);
4185 if ( dynamic_cast<const ScUpdateRefHint*>(&rHint) )
4189 else if ( rHint.
GetId() == SfxHintId::Dying )
4222 throw uno::RuntimeException();
4238 throw uno::RuntimeException();
4262 throw lang::IndexOutOfBoundsException();
4264 return uno::makeAny(xRow);
4284 static uno::Reference<beans::XPropertySetInfo> aRef(
4290 const OUString& aPropertyName,
const uno::Any& aValue )
4294 throw uno::RuntimeException();
4302 sal_Int32 nNewHeight = 0;
4324 sal_Int32 nNewHeight = 0;
4325 if ( aValue >>= nNewHeight )
4381 xRangeObj->setPropertyValue( aPropertyName, aValue );
4389 throw uno::RuntimeException();
4435 aAny = xRangeObj->getPropertyValue( aPropertyName );
4455 const OUString& ,
const uno::Any& )
4467 pDocShell( pDocSh ),
4470 pDocShell->GetDocument().AddUnoObject(*
this);
4485 if ( rHint.
GetId() == SfxHintId::Dying )
4515 const table::CellAddress& aPosition,
const OUString& rText )
4520 OSL_ENSURE( aPosition.Sheet ==
nTab,
"addAnnotation with a wrong Sheet" );
4521 ScAddress aPos( static_cast<SCCOL>(aPosition.Column), static_cast<SCROW>(aPosition.Row),
nTab );
4536 aMarkData.SetMultiMarkArea(
ScRange(aPos) );
4550 return new ScIndexEnumeration(
this,
"com.sun.star.sheet.CellAnnotationsEnumeration");
4572 if (!xAnnotation.is())
4573 throw lang::IndexOutOfBoundsException();
4575 return uno::makeAny(xAnnotation);
4591 pDocShell( pDocSh ),
4607 if ( dynamic_cast<const ScUpdateRefHint*>(&rHint) )
4611 else if ( rHint.
GetId() == SfxHintId::Dying )
4630 if (aTabName == rName)
4643 if (
pDocShell && nIndex >= 0 && nIndex < nCount )
4659 const uno::Sequence<table::CellRangeAddress>& aRanges,
4660 const OUString& aComment )
4669 for (
const table::CellRangeAddress& rRange : aRanges)
4671 OSL_ENSURE( rRange.Sheet ==
nTab,
"addScenario with a wrong Tab" );
4672 ScRange aRange( static_cast<SCCOL>(rRange.StartColumn), static_cast<SCROW>(rRange.StartRow),
nTab,
4673 static_cast<SCCOL>(rRange.EndColumn), static_cast<SCROW>(rRange.EndRow),
nTab );
4675 aMarkData.SetMultiMarkArea( aRange );
4713 while (nNext < nTabCount && rDoc.
IsScenario(nNext))
4728 throw lang::IndexOutOfBoundsException();
4730 return uno::makeAny(xScen);
4750 throw container::NoSuchElementException();
4752 return uno::makeAny(xScen);
4759 uno::Sequence<OUString>
aSeq(nCount);
4765 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.
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
static Type GetProviderType(const OUString &rServiceName)
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.
virtual void SAL_CALL acquire() override
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
#define SCMODELOBJ_SERVICE
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
#define SC_UNO_ISADJUSTHEIGHTENABLED
virtual css::uno::Type SAL_CALL getElementType() override
XElementAccess.
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
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
static bool HitAny(const Point &aPos)
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
virtual void SAL_CALL release() override
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.
virtual void SAL_CALL unlockControllers() override
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
ScDocShell * GetDocShell() const
void setWidth(tools::Long nWidth)
ScInterpreterContext & GetThreadedContext() const
#define SC_UNO_ITERENABLED
static void PaintAllChartsOnTile(VirtualDevice &rDevice, int nOutputWidth, int nOutputHeight, int nTilePosX, int nTilePosY, tools::Long nTileWidth, tools::Long nTileHeight)
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments(const OUString &ServiceSpecifier, const css::uno::Sequence< css::uno::Any > &Arguments) override
virtual void setTextSelection(int nType, int nX, int nY) override
virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getViewData() override
XViewDataSupplier.
ScFormatSaveData * GetFormatSaveData()
const css::uno::Reference< css::script::vba::XVBAEventProcessor > & GetVbaEventProcessor() const
static weld::Window * GetActiveDialogParent()