44#include <osl/diagnose.h>
60#include <printopt.hxx>
68#include <com/sun/star/document/XDocumentProperties.hpp>
74bool lcl_GetBool(
const SfxItemSet* pSet, sal_uInt16 nWhich)
79sal_uInt16 lcl_GetUShort(
const SfxItemSet* pSet, sal_uInt16 nWhich)
84bool lcl_GetShow(
const SfxItemSet* pSet, sal_uInt16 nWhich)
152 return pLine ? ( pLine->GetScaledWidth() ) : 0;
177 SfxStyleFamily::Page );
182 OSL_FAIL(
"Template not found" );
202 : pDocShell ( pShell ),
203 rDoc(pDocShell->GetDocument()),
204 pPrinter ( pNewPrinter ),
205 pDrawView ( nullptr ),
207 nPageStart ( nPage ),
210 bFromPrintState ( false ),
211 bSourceRangeValid ( false ),
212 bPrintCurrentTable ( false ),
213 bMultiArea ( false ),
214 mbHasPrintRange(true),
217 bPrintAreaValid ( false ),
230 : pDocShell ( pShell ),
231 rDoc(pDocShell->GetDocument()),
232 pPrinter ( pNewPrinter ),
233 pDrawView ( nullptr ),
234 pUserArea ( nullptr ),
235 bSourceRangeValid ( false ),
236 bPrintCurrentTable ( false ),
237 bMultiArea ( false ),
238 mbHasPrintRange(true),
239 pPageData ( nullptr )
280 : pDocShell ( pShell ),
281 rDoc(pDocShell->GetDocument()),
282 pPrinter ( nullptr ),
283 pDrawView ( nullptr ),
285 nPageStart ( nPage ),
288 bFromPrintState ( false ),
289 bSourceRangeValid ( false ),
290 bPrintCurrentTable ( false ),
291 bMultiArea ( false ),
292 mbHasPrintRange(true),
295 bPrintAreaValid ( false ),
296 pPageData ( nullptr )
307 : pDocShell ( pShell ),
308 rDoc(pDocShell->GetDocument()),
309 pPrinter ( nullptr ),
310 pDrawView ( nullptr ),
311 pUserArea ( nullptr ),
312 bSourceRangeValid ( false ),
313 bPrintCurrentTable ( false ),
314 bMultiArea ( false ),
315 mbHasPrintRange(true),
316 pPageData ( nullptr )
399 OSL_ENSURE(
false,
"vector access error for maPageEndX (!)");
409 OSL_ENSURE(
false,
"vector access error for maPageEndY (!)");
444 for (
SCCOL nX=nX1; nX<=nX2; nX++)
475 bool bDoGrid, bNullVal, bFormula;
517 nX1 = pViewData->
GetPosX(eHWhich);
518 nY1 = pViewData->
GetPosY(eVWhich);
543 double nScaleX =
static_cast<double>(nDevSizeX) / nTwipsSizeX;
544 double nScaleY =
static_cast<double>(nDevSizeY) / nTwipsSizeY;
595 if ( bMetaFile &&
pDev->IsVirtual() )
604 if (!bMetaFile && pViewData)
611 if (!bMetaFile && pViewData)
612 pDev->SetMapMode(aMode);
621 if (!bMetaFile && pViewData)
628 if (!bMetaFile && pViewData)
629 pDev->SetMapMode(aMode);
664 if ( pHFSet ==
nullptr )
668 rParam.
pBack =
nullptr;
681 rParam.
nLeft = nTmp < 0 ? 0 : sal_uInt16(nTmp);
683 rParam.
nRight = nTmp < 0 ? 0 : sal_uInt16(nTmp);
708 bool bChangeCol =
true;
709 bool bChangeRow =
true;
725 bool bForcedChangeRow =
false;
735 const SCROW nFuzzy = 23*42;
736 if (nPAEndRow + nFuzzy <
nEndRow)
738 bForcedChangeRow =
true;
747 if ( bChangeCol && bChangeRow )
749 else if ( bChangeCol )
751 else if ( bChangeRow )
758 if (bForcedChangeRow)
782 if (!bChangeCol)
nEndCol = nOldEndCol;
783 if (!bChangeRow)
nEndRow = nOldEndRow;
803 OSL_ENSURE(
aPageSize.
Width(),
"UpdateHFHeight without aPageSize");
886 OSL_FAIL(
"PageSize Null ?!?!?");
903 pHeaderSet = &pHeaderSetItem->GetItemSet();
918 pFooterSet = &pFooterSetItem->GetItemSet();
934 reinterpret_cast<const SfxPoolItem**
>(&pScaleItem) );
935 if ( SfxItemState::DEFAULT == eState )
939 reinterpret_cast<const SfxPoolItem**
>(&pScaleToItem) );
940 if ( SfxItemState::DEFAULT == eState )
944 reinterpret_cast<const SfxPoolItem**
>(&pScaleToPagesItem) );
945 if ( SfxItemState::DEFAULT == eState )
948 OSL_ENSURE( pScaleItem && pScaleToItem && pScaleToPagesItem,
"Missing ScaleItem! :-/" );
965 if ( pScaleItem && pScaleToItem && pScaleToPagesItem )
967 sal_uInt16 nScaleAll = pScaleItem->
GetValue();
968 sal_uInt16 nScaleToPages = pScaleToPagesItem->
GetValue();
1013 if (!bPrintEntireSheet && !nPrintRangeCount)
1026 else if (bHasPrintRange)
1145 const bool bNotInside = !rOut.
Contains( rGrf );
1160 OUString
const & referer )
1167 const MapMode aMapMM( MapUnit::Map100thMM );
1179 Size aDrawSize = aGrfSize;
1226 (aObject.
GetType() == GraphicType::Bitmap || aObject.
GetType() == GraphicType::Default) )
1250 const double k1( 50 );
1251 const double k2( 7 );
1253 const double Abitmap( k1/k2 * aSize.
Width()*aSize.
Height() );
1256 ::std::max( 128,
static_cast<int>( sqrt(sqrt( Abitmap)) + .5 ) ) );
1271 default: OSL_ENSURE(
false,
"new Graphic position?" );
1274 if ( bDraw && aGrf.
Overlaps( rOut ) )
1291 pBorderData =
nullptr;
1293 if (!pBorderData && !pBackground && !pShadow)
1302 if ( pShadow && pShadow->
GetLocation() != SvxShadowLocation::NONE )
1310 Size(nScrW-nLeft-nRight, nScrH-nTop-nBottom) );
1322 if (nEffHeight<=0 || nEffWidth<=0)
1343 pDev->SetLineColor();
1344 pDev->DrawRect(aFrameRect);
1348 if ( pShadow && pShadow->
GetLocation() != SvxShadowLocation::NONE )
1351 pDev->SetLineColor();
1356 case SvxShadowLocation::TopLeft:
1358 aFrameRect.
Left()-nShadowX, aFrameRect.
Top()-nShadowY,
1359 aFrameRect.
Right()-nShadowX, aFrameRect.
Top() ) );
1361 aFrameRect.
Left()-nShadowX, aFrameRect.
Top()-nShadowY,
1362 aFrameRect.
Left(), aFrameRect.
Bottom()-nShadowY ) );
1364 case SvxShadowLocation::TopRight:
1366 aFrameRect.
Left()+nShadowX, aFrameRect.
Top()-nShadowY,
1367 aFrameRect.
Right()+nShadowX, aFrameRect.
Top() ) );
1369 aFrameRect.
Right(), aFrameRect.
Top()-nShadowY,
1370 aFrameRect.
Right()+nShadowX, aFrameRect.
Bottom()-nShadowY ) );
1372 case SvxShadowLocation::BottomLeft:
1374 aFrameRect.
Left()-nShadowX, aFrameRect.
Bottom(),
1375 aFrameRect.
Right()-nShadowX, aFrameRect.
Bottom()+nShadowY ) );
1377 aFrameRect.
Left()-nShadowX, aFrameRect.
Top()+nShadowY,
1378 aFrameRect.
Left(), aFrameRect.
Bottom()+nShadowY ) );
1380 case SvxShadowLocation::BottomRight:
1382 aFrameRect.
Left()+nShadowX, aFrameRect.
Bottom(),
1383 aFrameRect.
Right()+nShadowX, aFrameRect.
Bottom()+nShadowY ) );
1385 aFrameRect.
Right(), aFrameRect.
Top()+nShadowY,
1386 aFrameRect.
Right()+nShadowX, aFrameRect.
Bottom()+nShadowY ) );
1399 pBorderDoc->InitUndo(
rDoc, 0,0,
true,
true );
1400 pBorderDoc->ApplyAttr( 0,0,0, *pBorderData );
1403 pBorderDoc->FillInfo( aTabInfo, 0,0, 0,0, 0,
1405 OSL_ENSURE(aTabInfo.
mnArrCount,
"nArrCount == 0");
1407 aTabInfo.
mpRowInfo[1].nHeight =
static_cast<sal_uInt16
>(nEffHeight);
1408 aTabInfo.
mpRowInfo[0].basicCellInfo(0).nWidth =
1409 aTabInfo.
mpRowInfo[1].basicCellInfo(0).nWidth =
static_cast<sal_uInt16
>(nEffWidth);
1434 for (nCol=nX1; nCol<=nX2; nCol++)
1442 for (nCol=nX1; nCol<=nX2; nCol++)
1456 tools::Long nAddY = ( nHeight - nTextHeight ) / 2;
1459 nTextPosX -= nWidth;
1460 pDev->DrawText(
Point( nTextPosX,nPosY+nAddY ), aText );
1486 for (
SCROW nRow=nY1; nRow<=nY2; nRow++)
1496 aText = OUString::number( nRow+1 );
1500 tools::Long nAddY = ( nHeight - nTextHeight ) / 2;
1501 pDev->DrawText(
Point( nPosX+nAddX,nPosY+nAddY ), aText );
1519 for (
SCCOL nCol=nX1; nCol<=nX2; nCol++)
1526 rLocationData.
AddColHeaders( aCellRect, nX1, nX2, bRepCol );
1546 rLocationData.
AddRowHeaders( aCellRect, nY1, nY2, bRepRow );
1561 for (nCol=0; nCol<nX1; nCol++)
1566 aMMOffset +=
Point( nLogStX, nLogStY );
1576 for (nCol=nX1; nCol<=nX2; nCol++)
1587 bRepCol, bRepRow, aDrawMapMode );
1592 bool bShLeft,
bool bShTop,
bool bShRight,
bool bShBottom )
1596 if ( nX2 < nX1 || nY2 < nY1 )
1632 if(!bHideAllDrawingLayer)
1670 pDev->SetClipRegion();
1687 if(!bHideAllDrawingLayer)
1700 return nPageUsage == SvxPageUsage::Mirror && (nPageNo & 1);
1711 bLeft = (nPageNo & 1) != 0;
1779 Point aStart( nLineStartX, nStartY );
1808 Point aBorderStart( nLineStartX, nStartY );
1855 Point aDraw = aStart;
1869 Point aDraw = aStart;
1883 Point aDraw = aStart;
1890 pDev->SetClipRegion();
1893 if ( pLocationData )
1912 pDev->SetFont(aMarkFont);
1917 if ( nMarkLen > aDataSize.
Width() / 2 )
1918 nMarkLen = aDataSize.
Width() / 2;
1931 if ( nNoteStart +
nCount < nSize)
1953 if ( pLocationData )
1961 nPosY += nTextHeight;
1988 pDev->SetLineColor();
1989 pDev->SetFillColor(aBackgroundColor);
2011 OSL_FAIL(
"StartPage does not exist anymore" );
2014 if ( bDoPrint || pLocationData )
2021 PrintHF( nPageNo,
true, nHeaderY, bDoPrint, pLocationData );
2026 PrintHF( nPageNo,
false, nFooterY, bDoPrint, pLocationData );
2034 OSL_FAIL(
"EndPage does not exist anymore" );
2057 pDev->SetLineColor();
2058 pDev->SetFillColor(aBackgroundColor);
2098 OSL_FAIL(
"StartPage does not exist anymore" );
2106 PrintHF( nPageNo,
true, nHeaderY, bDoPrint, pLocationData );
2111 PrintHF( nPageNo,
false, nFooterY, bDoPrint, pLocationData );
2122 for (
i=nX1;
i<=nX2;
i++)
2141 else if ( bLayoutRTL )
2210 nInnerStartX += nHeaderWidth + nRepeatWidth + nContentWidth;
2215 nInnerStartX += nOffsetOneX / 2;
2221 tools::Long nRepStartX = nInnerStartX + nHeaderWidth * nLayoutSign;
2222 tools::Long nRepStartY = nInnerStartY + nHeaderHeight;
2223 tools::Long nDataX = nRepStartX + nRepeatWidth * nLayoutSign;
2225 tools::Long nEndX = nDataX + nContentWidth * nLayoutSign;
2234 nInnerStartX -= nHeaderWidth;
2235 nRepStartX -= nRepeatWidth;
2236 nDataX -= nContentWidth;
2239 nEndX += nHeaderWidth + nRepeatWidth + nContentWidth;
2264 DrawBorder( nStartX, nStartY, nBorderEndX-nStartX, nBorderEndY-nStartY,
2274 if (bDoRepCol && bDoRepRow)
2278 nRepStartX,nRepStartY,
true,
true,
false,
false );
2279 if ( pLocationData )
2281 nRepStartX,nRepStartY,
true,
true, *pLocationData );
2287 true, !bDoRepRow,
false,
true );
2288 if ( pLocationData )
2295 !bDoRepCol,
true,
true,
false );
2296 if ( pLocationData )
2303 PrintArea( nX1,nY1, nX2,nY2, nDataX,nDataY, !bDoRepCol,!bDoRepRow,
true,
true );
2304 if ( pLocationData )
2305 LocateArea( nX1,nY1, nX2,nY2, nDataX,nDataY,
false,
false, *pLocationData );
2318 pDev->SetLineColor( aGridColor );
2319 pDev->SetFillColor();
2327 pDev->SetFont(aFont);
2333 if ( pLocationData )
2338 if ( pLocationData )
2339 LocateColHdr( nX1,nX2, nDataX,nInnerStartY,
false, *pLocationData );
2344 if ( pLocationData )
2349 if ( pLocationData )
2350 LocateRowHdr( nY1,nY2, nInnerStartX,nDataY,
false, *pLocationData );
2371 pDev->SetLineColor( aGridColor );
2372 pDev->SetFillColor();
2379 OSL_FAIL(
"EndPage does not exist anymore" );
2445 for (
SCTAB nTab=0; nTab<nTabCount; nTab++)
2461 bool bAreaOk =
false;
2495 for (sal_uInt16
i=0;
i<nRCount;
i++)
2532 bool bError =
false;
2536 sal_uInt16 nRepeats = 1;
2542 for (sal_uInt16 nStep=0; nStep<nRepeats; nStep++)
2544 bool bDoThis =
true;
2580 nNoteAdd =
PrintNotes( nPages, nNoteNr,
false,
nullptr );
2583 nNoteNr += nNoteAdd;
2600 Fraction aZoomFract( nEffZoom,10000 );
2627 pPrinter->SetOrientation(
bLandscape ? Orientation::Landscape : Orientation::Portrait );
2644 MapMode aLocalMode( MapUnit::MapTwip );
2645 pPrinter->SetMapMode( aLocalMode );
2646 pPrinter->SetPaperSizeUser( aEnumSize );
2647 pPrinter->SetMapMode( aPrinterMode );
2650 pPrinter->SetPaperBin( nPaperBin );
2661 OSL_ENSURE(
pDev,
"Device == NULL");
2669 if ( pLocationData )
2681 sal_uInt16 nRepeats = 1;
2684 for (sal_uInt16 nStep=0; nStep<nRepeats; nStep++)
2704 OSL_ENSURE(nCountX < m_aRanges.m_xPageEndX->
size(),
"vector access error for aPageEndX (!)");
2709 nY1 = rPageRow.GetStartRow();
2710 nY2 = rPageRow.GetEndRow();
2713 if ( rPageRanges.
IsSelected( nPageNo+nStartPage+1 ) )
2715 PrintPage( nPageNo+nDisplayStart, nX1, nY1, nX2, nY2,
2716 bDoPrint, pLocationData );
2730 nY1 = rPageRow.GetStartRow();
2731 nY2 = rPageRow.GetEndRow();
2735 OSL_ENSURE(nCountX < m_aRanges.m_xPageEndX->
size(),
"vector access error for aPageEndX");
2739 if ( rPageRanges.
IsSelected( nPageNo+nStartPage+1 ) )
2741 PrintPage( nPageNo+nDisplayStart, nX1, nY1, nX2, nY2,
2742 bDoPrint, pLocationData );
2759 if ( nPageNo+nStartPage <= nEndPage )
2761 bool bPageSelected = rPageRanges.
IsSelected( nPageNo+nStartPage+1 );
2762 nNoteAdd =
PrintNotes( nPageNo+nStartPage, nNoteNr, bDoPrint && bPageSelected,
2763 ( bPageSelected ? pLocationData :
nullptr ) );
2766 nNoteNr += nNoteAdd;
2789 const ScRange* pThisRange =
nullptr;
2817 sal_uInt16 nMinPages = 0;
2818 std::set<SCROW> aRowBreaks;
2819 std::set<SCCOL> aColBreaks;
2822 nMinPages = (aRowBreaks.size() + 1) * (aColBreaks.size() + 1);
2826 nPagesToFit = std::max(nMinPages, nPagesToFit);
2829 sal_uInt16 nLastFitZoom = 0, nLastNonFitZoom = 0;
2844 nLastFitZoom =
nZoom;
2847 if (nLastFitZoom ==
nZoom)
2853 if (
nZoom - nLastFitZoom <= 1)
2855 nZoom = nLastFitZoom;
2860 nLastNonFitZoom =
nZoom;
2874 sal_uInt16 nMinPagesW = 0, nMinPagesH = 0;
2875 std::set<SCROW> aRowBreaks;
2876 std::set<SCCOL> aColBreaks;
2879 nMinPagesW = aColBreaks.size() + 1;
2880 nMinPagesH = aRowBreaks.size() + 1;
2884 nW = std::max(nMinPagesW, nW);
2885 nH = std::max(nMinPagesH, nH);
2888 sal_uInt16 nLastFitZoom = 0, nLastNonFitZoom = 0;
2903 nLastFitZoom =
nZoom;
2906 if (nLastFitZoom ==
nZoom)
2912 if (
nZoom - nLastFitZoom <= 1)
2914 nZoom = nLastFitZoom;
2919 nLastNonFitZoom =
nZoom;
2928 nLastFitZoom =
nZoom;
2930 if (
nZoom < nLastFitZoom)
2936 nZoom = nLastFitZoom;
2999 return aDocPageSize;
3009 SCCOL nStartCol,
const std::vector< SCCOL >& rPageEndX )
3011 size_t nPagesX = rPageRowEntry.
GetPagesX();
3015 bool bLeftIsEmpty =
false;
3019 for (
size_t i=0;
i<nPagesX;
i++)
3021 OSL_ENSURE(
i < rPageEndX.size(),
"vector access error for aPageEndX");
3022 SCCOL nEndCol = rPageEndX[
i];
3023 if ( rDoc.
IsPrintEmpty( nStartCol, nStartRow, nEndCol, nEndRow, nPrintTab,
3024 bLeftIsEmpty, &aTempRange, &aTempRect ) )
3027 bLeftIsEmpty =
true;
3030 bLeftIsEmpty =
false;
3032 nStartCol = nEndCol+1;
3100 bool bVisCol =
false;
3107 OSL_ENSURE(m_nPagesX < m_xPageEndX->
size(),
"vector access error for aPageEndX");
3117 OSL_ENSURE(m_nPagesX < m_xPageEndX->
size(),
"vector access error for aPageEndX");
3122 bool bVisRow =
false;
3124 SCROW nLastVisibleRow = -1;
3127 SCROW nNextPageBreak = pRowBreakIter->first();
3130 nNextPageBreak = pRowBreakIter->next();
3134 bool bPageBreak = (nNextPageBreak == nRow);
3136 nNextPageBreak = pRowBreakIter->next();
3140 OSL_ENSURE(m_nTotalY < m_xPageEndY->
size(),
"vector access error for rPageEndY");
3146 auto& rPageRow = (*m_xPageRows)[
m_nPagesY];
3147 rPageRow.SetStartRow(nPageStartRow);
3148 rPageRow.SetEndRow(nRow - 1);
3155 nPageStartRow = nRow;
3159 if (nRow <= nLastVisibleRow)
3167 SCROW nLastRow = -1;
3171 nLastVisibleRow = nLastRow;
3177 std::min(nLastRow, nNextPageBreak - 1));
3184 OSL_ENSURE(m_nTotalY < m_xPageEndY->
size(),
"vector access error for maPageEndY");
3190 auto& rPageRow = (*m_xPageRows)[
m_nPagesY];
3191 rPageRow.SetStartRow(nPageStartRow);
css::chart::ChartAxisLabelPosition ePos
void ScColToAlpha(OUStringBuffer &rBuf, SCCOL nCol)
append alpha representation of column to buffer
const SCROW SCROW_REPEAT_NONE
const SCCOL SCCOL_REPEAT_NONE
size_t SCSIZE
size_t typedef to be able to find places where code was changed from USHORT to size_t and is used to ...
sal_uInt16 GetValue() const
static rtl::Reference< SfxItemPool > CreatePool()
GraphicType GetType() const
void DrawTiled(OutputDevice &rOut, const tools::Rectangle &rArea, const Size &rSize, const Size &rOffset, int nTileCacheSize1D=128)
bool IsSupportedGraphic() const
MapMode GetPrefMapMode() const
void Draw(OutputDevice &rOutDev, const Point &rDestPt) const
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
OUString GetLastName(DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
const Fraction & GetScaleX() const
MapUnit GetMapUnit() const
const Fraction & GetScaleY() const
const Range & GetTotalRange() const
bool IsSelected(sal_Int32 nIndex) const
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
OutDevType GetOutDevType() const
void IntersectClipRegion(const tools::Rectangle &rRect)
constexpr tools::Long Y() const
void setX(tools::Long nX)
void setY(tools::Long nY)
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
SC_DLLPUBLIC void Format(OStringBuffer &r, ScRefFlags nFlags, const ScDocument *pDocument=nullptr, const Details &rDetails=detailsOOOa1) const
void UpdatePendingRowHeights(SCTAB nUpdateTab, bool bBefore=false)
void PostPaint(SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, PaintPartFlags nPart, sal_uInt16 nExtFlags=0)
double GetOutputFactor() const
SC_DLLPUBLIC sal_uInt16 GetRowHeight(SCROW nRow, SCTAB nTab, bool bHiddenAsZero=true) const
bool IsPrintEmpty(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bLeftIsEmpty=false, ScRange *pLastRange=nullptr, tools::Rectangle *pLastMM=nullptr) const
SC_DLLPUBLIC ScRange GetRange(SCTAB nTab, const tools::Rectangle &rMMRect, bool bHiddenAsZero=true) const
SC_DLLPUBLIC sal_uInt16 GetColWidth(SCCOL nCol, SCTAB nTab, bool bHiddenAsZero=true) const
void UpdatePageBreaks(SCTAB nTab, const ScRange *pUserArea=nullptr)
SC_DLLPUBLIC bool ExtendMerge(SCCOL nStartCol, SCROW nStartRow, SCCOL &rEndCol, SCROW &rEndRow, SCTAB nTab, bool bRefresh=false)
tools::Long GetScaledRowHeight(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, double fScale) const
SC_DLLPUBLIC bool HasColNotes(SCCOL nCol, SCTAB nTab) const
SC_DLLPUBLIC SCCOL MaxCol() const
SC_DLLPUBLIC bool GetPrintAreaVer(SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, SCROW &rEndRow, bool bNotes) const
SC_DLLPUBLIC ScDocumentPool * GetPool()
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
SC_DLLPUBLIC SCROW MaxRow() const
SC_DLLPUBLIC ScPostIt * GetNote(const ScAddress &rPos)
void FillInfo(ScTableInfo &rTabInfo, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab, double fColScale, double fRowScale, bool bPageMode, bool bFormulaMode, const ScMarkData *pMarkData=nullptr)
SC_DLLPUBLIC const ScRange * GetPrintRange(SCTAB nTab, sal_uInt16 nPos)
ScRowBreakIterator * GetRowBreakIterator(SCTAB nTab) const
SC_DLLPUBLIC OutputDevice * GetRefDevice()
SC_DLLPUBLIC const ScViewOptions & GetViewOptions() const
SC_DLLPUBLIC OUString GetPageStyle(SCTAB nTab) const
SC_DLLPUBLIC bool HasPrintRange()
SC_DLLPUBLIC bool GetPrintAreaHor(SCTAB nTab, SCROW nStartRow, SCROW nEndRow, SCCOL &rEndCol) const
SC_DLLPUBLIC ScBreakType HasColBreak(SCCOL nCol, SCTAB nTab) const
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
SC_DLLPUBLIC bool RowHidden(SCROW nRow, SCTAB nTab, SCROW *pFirstRow=nullptr, SCROW *pLastRow=nullptr) const
SC_DLLPUBLIC bool HasNote(const ScAddress &rPos) const
SC_DLLPUBLIC void GetAllColBreaks(std::set< SCCOL > &rBreaks, SCTAB nTab, bool bPage, bool bManual) const
SC_DLLPUBLIC bool HasAttrib(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, HasAttrFlags nMask) const
void GetEmbedded(ScRange &rRange) const
void SetPageSize(SCTAB nTab, const Size &rSize)
SC_DLLPUBLIC std::optional< ScRange > GetRepeatColRange(SCTAB nTab)
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
void ApplyAsianEditSettings(ScEditEngineDefaulter &rEngine)
SC_DLLPUBLIC std::optional< ScRange > GetRepeatRowRange(SCTAB nTab)
SC_DLLPUBLIC bool ColHidden(SCCOL nCol, SCTAB nTab, SCCOL *pFirstCol=nullptr, SCCOL *pLastCol=nullptr) const
SC_DLLPUBLIC bool GetPrintArea(SCTAB nTab, SCCOL &rEndCol, SCROW &rEndRow, bool bNotes=true) const
SC_DLLPUBLIC void GetAllRowBreaks(std::set< SCROW > &rBreaks, SCTAB nTab, bool bPage, bool bManual) const
SC_DLLPUBLIC bool IsVisible(SCTAB nTab) const
SC_DLLPUBLIC bool IsLayoutRTL(SCTAB nTab) const
SC_DLLPUBLIC bool HasTable(SCTAB nTab) const
SfxPrinter * GetPrinter(bool bCreateIfNotExist=true)
SC_DLLPUBLIC sal_uInt16 GetPrintRangeCount(SCTAB nTab)
bool IsPrintEntireSheet(SCTAB nTab) const
Returns true, if the specified sheet is always printed.
SC_DLLPUBLIC bool GetName(SCTAB nTab, OUString &rName) const
void ExtendPrintArea(OutputDevice *pDev, SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL &rEndCol, SCROW nEndRow) const
Find the maximum column position that contains printable data for the specified row range.
void SetRepeatArea(SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCROW nEndRow)
SC_DLLPUBLIC tools::Rectangle GetMMRect(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero=true) const
SC_DLLPUBLIC SCTAB GetTableCount() const
void SetEmbedded(const ScRange &rRange)
static OUString ModifyDelimiters(const OUString &rOld)
static bool IsSystemRTL()
tools::Long GetScrH() const
void PostPrintDrawingLayer(const Point &rMMOffset)
void DrawStrings(bool bPixelToLogic=false)
void PrintDrawingLayer(SdrLayerID nLayer, const Point &rMMOffset)
void DrawSparklines(vcl::RenderContext &rRenderContext)
void SetShowNullValues(bool bSet)
void DrawFrame(vcl::RenderContext &rRenderContext)
void DrawExtraShadow(bool bLeft, bool bTop, bool bRight, bool bBottom)
void DrawBackground(vcl::RenderContext &rRenderContext)
void SetGridColor(const Color &rColor)
void DrawEdit(bool bPixelToLogic)
void DrawGrid(vcl::RenderContext &rRenderContext, bool bGrid, bool bPage, bool bMergeCover=false)
Point PrePrintDrawingLayer(tools::Long nLogStX, tools::Long nLogStY)
void SetMetaFileMode(bool bNewMode)
void SetRefDevice(OutputDevice *pRDev)
void SetUseStyleColor(bool bSet)
void SetShowFormulas(bool bSet)
void SetDrawView(FmFormView *pNew)
tools::Long GetScrW() const
ScPrintRangeData & GetData(size_t i)
const EditTextObject * GetCenterArea() const
const EditTextObject * GetLeftArea() const
const EditTextObject * GetRightArea() const
Contains the "scale to width/height" attribute in page styles.
sal_uInt16 GetHeight() const
sal_uInt16 GetWidth() const
static void fillFont(vcl::Font &rFont, const SfxItemSet &rItemSet, ScAutoFontColorMode eAutoMode, const OutputDevice *pOutDev=nullptr, const Fraction *pScale=nullptr, const SfxItemSet *pCondSet=nullptr, SvtScriptType nScript=SvtScriptType::NONE, const Color *pBackConfigColor=nullptr, const Color *pTextConfigColor=nullptr)
const SfxPoolItem & GetItem(sal_uInt16 nWhichP) const
void FillEditItemSet(SfxItemSet *pEditSet, const SfxItemSet *pCondSet=nullptr) const
Converts all Calc items contained in the own item set to edit engine items and puts them into pEditSe...
Additional class containing cell annotation data.
void AddColHeaders(const tools::Rectangle &rRect, SCCOL nStartCol, SCCOL nEndCol, bool bRepCol)
void AddCellRange(const tools::Rectangle &rRect, const ScRange &rRange, bool bRepCol, bool bRepRow, const MapMode &rDrawMap)
void SetPrintTab(SCTAB nNew)
void AddNoteMark(const tools::Rectangle &rRect, const ScAddress &rPos)
void AddRowHeaders(const tools::Rectangle &rRect, SCROW nStartRow, SCROW nEndRow, bool bRepRow)
void SetCellMapMode(const MapMode &rMapMode)
void AddHeaderFooter(const tools::Rectangle &rRect, bool bHeader, bool bLeft)
void AddNoteText(const tools::Rectangle &rRect, const ScAddress &rPos)
tools::Long TextHeight(const EditTextObject *pObject)
void SetRenderFlag(bool bFlag)
void InitParam(const ScPrintOptions *pOptions)
const SvxBoxItem * pBorderItem
void PrintArea(SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, tools::Long nScrX, tools::Long nScrY, bool bShLeft, bool bShTop, bool bShRight, bool bShBottom)
void PrintHF(tools::Long nPageNo, bool bHeader, tools::Long nStartY, bool bDoPrint, ScPreviewLocationData *pLocationData)
void LocateArea(SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, tools::Long nScrX, tools::Long nScrY, bool bRepCol, bool bRepRow, ScPreviewLocationData &rLocationData)
bool GetLastSourceRange(ScRange &rRange) const
std::vector< ScAddress > aNotePosList
tools::Long DoPrint(const MultiSelection &rPageRanges, tools::Long nStartPage, tools::Long nDisplayStart, bool bDoPrint, ScPreviewLocationData *pLocationData)
void SetOffset(const Point &rOfs)
void SetDrawView(FmFormView *pNew)
void LocateColHdr(SCCOL nX1, SCCOL nX2, tools::Long nScrX, tools::Long nScrY, bool bRepCol, ScPreviewLocationData &rLocationData)
const SvxShadowItem * pShadowItem
VclPtr< SfxPrinter > pPrinter
void LocateRowHdr(SCROW nY1, SCROW nY2, tools::Long nScrX, tools::Long nScrY, bool bRepRow, ScPreviewLocationData &rLocationData)
tools::Long DoNotes(tools::Long nNoteStart, bool bDoPrint, ScPreviewLocationData *pLocationData)
std::unique_ptr< ScHeaderEditEngine > pEditEngine
ScHeaderFieldData aFieldData
tools::Rectangle aPageRect
const ScRange * pUserArea
bool IsMirror(tools::Long nPageNo)
void SetDateTime(const DateTime &)
void PrintPage(tools::Long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, bool bDoPrint, ScPreviewLocationData *pLocationData)
static void DrawToDev(ScDocument &rDoc, OutputDevice *pDev, double nPrintFactor, const tools::Rectangle &rBound, ScViewData *pViewData, bool bMetaFile)
ScPrintFunc(ScDocShell *pShell, SfxPrinter *pNewPrinter, SCTAB nTab, tools::Long nPage=0, tools::Long nDocP=0, const ScRange *pArea=nullptr, const ScPrintOptions *pOptions=nullptr, ScPageBreakData *pData=nullptr)
const SfxItemSet * pParamSet
void SetClearFlag(bool bFlag)
ScPageAreaParam aAreaParam
VclPtr< OutputDevice > pDev
void PrintRowHdr(SCROW nY1, SCROW nY2, tools::Long nScrX, tools::Long nScrY)
void SetManualZoom(sal_uInt16 nNewZoom)
void UpdateHFHeight(ScPrintHFParam &rParam)
ScPageBreakData * pPageData
std::unique_ptr< SfxItemSet > pEditDefaults
void Construct(const ScPrintOptions *pOptions)
void GetPrintState(ScPrintState &rState, bool bSavePageRanges=false)
const SvxBrushItem * pBackgroundItem
void CalcZoom(sal_uInt16 nRangeNo)
void PrintColHdr(SCCOL nX1, SCCOL nX2, tools::Long nScrX, tools::Long nScrY)
bool AdjustPrintArea(bool bNew)
sc::PrintPageRanges m_aRanges
tools::Long PrintNotes(tools::Long nPageNo, tools::Long nNoteStart, bool bDoPrint, ScPreviewLocationData *pLocationData)
bool IsLeft(tools::Long nPageNo)
void GetScaleData(Size &rPhysSize, tools::Long &rDocHdr, tools::Long &rDocFtr)
void DrawBorder(tools::Long nScrX, tools::Long nScrY, tools::Long nScrW, tools::Long nScrH, const SvxBoxItem *pBorderData, const SvxBrushItem *pBackground, const SvxShadowItem *pShadow)
tools::Long CountNotePages()
void ApplyPrintSettings()
void SetUseStyleColor(bool bFlag)
void ResetBreaks(SCTAB nTab)
ScPageTableParam aTableParam
void SetExclusivelyDrawOleAndDrawObjects()
bool GetSkipEmpty() const
bool GetForceBreaks() const
void SetTopDown(bool bSet)
void SetAutomatic(bool bSet)
void SetPrintRange(const ScRange &rNew)
void SetPagesY(size_t nCount, const SCROW *pEnd)
void SetPagesX(size_t nCount, const SCCOL *pEnd)
static constexpr SCROW NOT_FOUND
SCROW GetPosY(ScVSplitPos eWhich, SCTAB nForTab=-1) const
const MapMode & GetLogicMode(ScSplitPos eWhich)
SCROW VisibleCellsY(ScVSplitPos eWhichY) const
ScSplitPos GetActivePart() const
SCCOL VisibleCellsX(ScHSplitPos eWhichX) const
SCCOL GetPosX(ScHSplitPos eWhich, SCTAB nForTab=-1) const
bool GetOption(ScViewOption eOpt) const
const SdrPage * GetPage(sal_uInt16 nPgNum) const
void setHideOle(bool bNew)
void setHideFormControl(bool bNew)
bool getHideFormControl() const
void SetPrintPreview(bool bOn=true)
void setHideDraw(bool bNew)
SdrModel & GetModel() const
bool getHideChart() const
void setHideChart(bool bNew)
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
SfxItemPool * GetPool() const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
const INetURLObject & GetURLObject() const
const OUString & GetName() const
css::uno::Reference< css::document::XDocumentProperties > getDocProperties() const
SfxMedium * GetMedium() const
OUString GetTitle(sal_uInt16 nMaxLen=0) const
std::unique_ptr< SfxPoolItem > CloneSetWhich(sal_uInt16 nNewWhich) const
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
virtual SfxItemSet & GetItemSet()
constexpr tools::Long Height() const
tools::Long AdjustHeight(tools::Long n)
void setWidth(tools::Long nWidth)
tools::Long AdjustWidth(tools::Long n)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
const editeng::SvxBorderLine * GetTop() const
const editeng::SvxBorderLine * GetRight() const
const editeng::SvxBorderLine * GetLeft() const
sal_Int16 GetDistance(SvxBoxItemLine nLine, bool bAllowNegative=false) const
const editeng::SvxBorderLine * GetBottom() const
const Color & GetColor() const
const Graphic * GetGraphic(OUString const &referer=OUString()) const
SvxGraphicPosition GetGraphicPos() const
tools::Long GetRight() const
tools::Long GetLeft() const
SvxNumType GetNumType() const
SvxPageUsage GetPageUsage() const
static Paper GetSvxPaper(const Size &rSize, MapUnit eUnit)
static Size GetPaperSize(Paper ePaper, MapUnit eUnit=MapUnit::MapTwip)
sal_uInt16 GetWidth() const
const Color & GetColor() const
sal_uInt16 CalcShadowSpace(SvxShadowItemSide nShadow) const
SvxShadowLocation GetLocation() const
sal_uInt16 GetUpper() const
sal_uInt16 GetLower() const
reference_type * get() const
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
std::unique_ptr< ScDocument, o3tl::default_delete< ScDocument > > ScDocumentUniquePtr
constexpr TypedWhichId< SvxAdjustItem > EE_PARA_JUST(EE_PARA_START+16)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT(EE_CHAR_START+2)
constexpr TypedWhichId< SvxColorItem > EE_CHAR_COLOR(EE_CHAR_START+0)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT_CTL(EE_CHAR_START+20)
constexpr TypedWhichId< SvxFrameDirectionItem > EE_PARA_WRITINGDIR(EE_PARA_START+0)
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT_CJK(EE_CHAR_START+19)
EmbeddedObjectRef * pObject
constexpr SdrLayerID SC_LAYER_FRONT(0)
constexpr SdrLayerID SC_LAYER_INTERN(2)
constexpr SdrLayerID SC_LAYER_BACK(1)
if(aStr !=aBuf) UpdateName_Impl(m_xFollowLb.get()
std::unique_ptr< sal_Int32[]> pData
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
CAUTION! The following defines must be in the same namespace as the respective type.
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
constexpr auto HMM_PER_TWIPS
ScAutoFontColorMode
how to treat COL_AUTO in GetFont:
@ Print
black or white, depending on background
@ Display
from style settings, or black/white if needed
static void lcl_DrawGraphic(const Graphic &rGraphic, vcl::RenderContext &rOutDev, const tools::Rectangle &rGrf, const tools::Rectangle &rOut)
static void lcl_FillHFParam(ScPrintHFParam &rParam, const SfxItemSet *pHFSet)
static void lcl_HidePrint(const ScTableInfo &rTabInfo, SCCOL nX1, SCCOL nX2)
static void lcl_SetHidden(const ScDocument &rDoc, SCTAB nPrintTab, ScPageRowEntry &rPageRowEntry, SCCOL nStartCol, const std::vector< SCCOL > &rPageEndX)
static tools::Long lcl_LineTotal(const ::editeng::SvxBorderLine *pLine)
constexpr sal_Int64 PRINT_HEADER_HEIGHT
constexpr sal_Int64 PRINT_HEADER_WIDTH
OUString ScResId(TranslateId aId)
constexpr TypedWhichId< SfxUInt16Item > ATTR_PAGE_SCALE(175)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_SHARED(166)
constexpr TypedWhichId< SvxFontHeightItem > ATTR_FONT_HEIGHT(101)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_FOOTERLEFT(179)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_HEADERLEFT(178)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_HORCENTER(162)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_DYNAMIC(165)
constexpr TypedWhichId< SvxSizeItem > ATTR_PAGE_SIZE(161)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_NULLVALS(187)
constexpr TypedWhichId< ScPatternAttr > ATTR_PATTERN(156)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_VERCENTER(163)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_HEADERS(170)
constexpr TypedWhichId< SvxSetItem > ATTR_PAGE_HEADERSET(184)
constexpr TypedWhichId< SvxFontHeightItem > ATTR_CJK_FONT_HEIGHT(112)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_FORMULAS(186)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_FOOTERRIGHT(181)
constexpr TypedWhichId< SvxULSpaceItem > ATTR_ULSPACE(158)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_GRID(169)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_TOPDOWN(174)
constexpr TypedWhichId< ScViewObjectModeItem > ATTR_PAGE_CHARTS(171)
constexpr TypedWhichId< ScViewObjectModeItem > ATTR_PAGE_OBJECTS(172)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_HEADERRIGHT(180)
constexpr TypedWhichId< SvxBrushItem > ATTR_BACKGROUND(148)
constexpr TypedWhichId< SvxPaperBinItem > ATTR_PAGE_PAPERBIN(160)
constexpr TypedWhichId< SfxUInt16Item > ATTR_PAGE_FIRSTPAGENO(177)
constexpr TypedWhichId< SvxShadowItem > ATTR_SHADOW(152)
constexpr TypedWhichId< SvxPageItem > ATTR_PAGE(159)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_NOTES(168)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_HEADERFIRST(182)
constexpr TypedWhichId< SvxBoxItem > ATTR_BORDER(150)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_FOOTERFIRST(183)
constexpr TypedWhichId< ScPageScaleToItem > ATTR_PAGE_SCALETO(188)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_SHARED_FIRST(167)
constexpr TypedWhichId< ScProtectionAttr > ATTR_PROTECTION(149)
constexpr TypedWhichId< SfxUInt16Item > ATTR_PAGE_SCALETOPAGES(176)
constexpr TypedWhichId< SvxSetItem > ATTR_PAGE_FOOTERSET(185)
constexpr TypedWhichId< ScViewObjectModeItem > ATTR_PAGE_DRAWINGS(173)
constexpr TypedWhichId< SvxFontHeightItem > ATTR_CTL_FONT_HEIGHT(117)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_ON(164)
constexpr TypedWhichId< SvxLRSpaceItem > ATTR_LRSPACE(157)
ScCellInfo & cellInfo(SCCOL nCol)
ScBasicCellInfo & basicCellInfo(SCCOL nCol)
const SfxItemSet * pConditionSet
const ScPatternAttr * pPatternAttr
const SvxBoxItem * pBorder
const SvxShadowItem * pShadow
const SvxBrushItem * pBack
const ScPageHFItem * pRight
const ScPageHFItem * pLeft
const ScPageHFItem * pFirst
std::shared_ptr< std::vector< SCROW > > xPageEndY
sc::PrintPageRangesInput aPrintPageRangesInput
std::shared_ptr< std::map< size_t, ScPageRowEntry > > xPageRows
std::shared_ptr< std::vector< SCCOL > > xPageEndX
std::unique_ptr< RowInfo[]> mpRowInfo
ScHSplitPos WhichH(ScSplitPos ePos)
ScVSplitPos WhichV(ScSplitPos ePos)