50 #include <stlpool.hxx>
56 #include <globstr.hrc>
59 #include <printopt.hxx>
67 #include <com/sun/star/document/XDocumentProperties.hpp>
73 bool lcl_GetBool(
const SfxItemSet* pSet, sal_uInt16 nWhich)
78 sal_uInt16 lcl_GetUShort(
const SfxItemSet* pSet, sal_uInt16 nWhich)
83 bool lcl_GetShow(
const SfxItemSet* pSet, sal_uInt16 nWhich)
151 return pLine ? ( pLine->GetScaledWidth() ) : 0;
176 SfxStyleFamily::Page );
181 OSL_FAIL(
"Template not found" );
201 : pDocShell ( pShell ),
202 rDoc(pDocShell->GetDocument()),
203 pPrinter ( pNewPrinter ),
204 pDrawView ( nullptr ),
206 nPageStart ( nPage ),
209 bFromPrintState ( false ),
210 bSourceRangeValid ( false ),
211 bPrintCurrentTable ( false ),
212 bMultiArea ( false ),
213 mbHasPrintRange(true),
216 bPrintAreaValid ( false ),
226 : pDocShell ( pShell ),
227 rDoc(pDocShell->GetDocument()),
228 pPrinter ( pNewPrinter ),
229 pDrawView ( nullptr ),
230 pUserArea ( nullptr ),
231 bSourceRangeValid ( false ),
232 bPrintCurrentTable ( false ),
233 bMultiArea ( false ),
234 mbHasPrintRange(true),
235 pPageData ( nullptr )
270 : pDocShell ( pShell ),
271 rDoc(pDocShell->GetDocument()),
272 pPrinter ( nullptr ),
273 pDrawView ( nullptr ),
275 nPageStart ( nPage ),
278 bFromPrintState ( false ),
279 bSourceRangeValid ( false ),
280 bPrintCurrentTable ( false ),
281 bMultiArea ( false ),
282 mbHasPrintRange(true),
285 bPrintAreaValid ( false ),
286 pPageData ( nullptr )
294 : pDocShell ( pShell ),
295 rDoc(pDocShell->GetDocument()),
296 pPrinter ( nullptr ),
297 pDrawView ( nullptr ),
298 pUserArea ( nullptr ),
299 bSourceRangeValid ( false ),
300 bPrintCurrentTable ( false ),
301 bMultiArea ( false ),
302 mbHasPrintRange(true),
303 pPageData ( nullptr )
380 OSL_ENSURE(
false,
"vector access error for maPageEndX (!)");
390 OSL_ENSURE(
false,
"vector access error for maPageEndY (!)");
425 for (
SCCOL nX=nX1; nX<=nX2; nX++)
455 bool bDoGrid, bNullVal, bFormula;
497 nX1 = pViewData->
GetPosX(eHWhich);
498 nY1 = pViewData->
GetPosY(eVWhich);
523 double nScaleX =
static_cast<double>(nDevSizeX) / nTwipsSizeX;
524 double nScaleY =
static_cast<double>(nDevSizeY) / nTwipsSizeY;
538 rDoc.
FillInfo( aTabInfo, nX1, nY1, nX2, nY2, nTab,
539 nScaleX, nScaleY,
false, bFormula );
554 nScrX, nScrY, nX1, nY1, nX2, nY2, nScaleX, nScaleY );
568 pDrawView->
ShowSdrPage(pDrawView->GetModel()->GetPage(nTab));
569 pDrawView->SetPrintPreview();
584 if (!bMetaFile && pViewData)
591 if (!bMetaFile && pViewData)
600 if (!bMetaFile && pViewData)
607 if (!bMetaFile && pViewData)
610 aOutputData.
DrawGrid(*pDev,
true,
false);
643 if ( pHFSet ==
nullptr )
647 rParam.
pBack =
nullptr;
659 rParam.
nLeft = nTmp < 0 ? 0 : sal_uInt16(nTmp);
661 rParam.
nRight = nTmp < 0 ? 0 : sal_uInt16(nTmp);
686 bool bChangeCol =
true;
687 bool bChangeRow =
true;
703 bool bForcedChangeRow =
false;
713 const SCROW nFuzzy = 23*42;
714 if (nPAEndRow + nFuzzy <
nEndRow)
716 bForcedChangeRow =
true;
725 if ( bChangeCol && bChangeRow )
727 else if ( bChangeCol )
729 else if ( bChangeRow )
736 if (bForcedChangeRow)
760 if (!bChangeCol)
nEndCol = nOldEndCol;
761 if (!bChangeRow)
nEndRow = nOldEndRow;
781 OSL_ENSURE(
aPageSize.
Width(),
"UpdateHFHeight without aPageSize");
858 OSL_FAIL(
"PageSize Null ?!?!?");
874 reinterpret_cast<const SfxPoolItem**>(&pHeaderSetItem) ) == SfxItemState::SET )
876 pHeaderSet = &pHeaderSetItem->GetItemSet();
890 reinterpret_cast<const SfxPoolItem**>(&pFooterSetItem) ) == SfxItemState::SET )
892 pFooterSet = &pFooterSetItem->GetItemSet();
908 reinterpret_cast<const SfxPoolItem**>(&pScaleItem) );
909 if ( SfxItemState::DEFAULT == eState )
913 reinterpret_cast<const SfxPoolItem**>(&pScaleToItem) );
914 if ( SfxItemState::DEFAULT == eState )
918 reinterpret_cast<const SfxPoolItem**>(&pScaleToPagesItem) );
919 if ( SfxItemState::DEFAULT == eState )
922 OSL_ENSURE( pScaleItem && pScaleToItem && pScaleToPagesItem,
"Missing ScaleItem! :-/" );
939 if ( pScaleItem && pScaleToItem && pScaleToPagesItem )
941 sal_uInt16 nScaleAll = pScaleItem->
GetValue();
942 sal_uInt16 nScaleToPages = pScaleToPagesItem->
GetValue();
987 if (!bPrintEntireSheet && !nPrintRangeCount)
1000 else if (bHasPrintRange)
1119 const bool bNotInside = !rOut.
IsInside( rGrf );
1134 OUString
const & referer )
1141 const MapMode aMapMM( MapUnit::Map100thMM );
1153 Size aDrawSize = aGrfSize;
1164 aPos.setX( rOrg.
Right() - aGrfSize.
Width() );
1168 aPos.setX( rOrg.
Left() );
1174 aPos.setX( rOrg.
Right() - aGrfSize.
Width() );
1178 aPos.setX( rOrg.
Left() );
1184 aPos.setX( rOrg.
Right() - aGrfSize.
Width() );
1200 (aObject.
GetType() == GraphicType::Bitmap || aObject.
GetType() == GraphicType::Default) )
1224 const double k1( 50 );
1225 const double k2( 7 );
1227 const double Abitmap( k1/k2 * aSize.Width()*aSize.Height() );
1230 ::std::max( 128, static_cast<int>( sqrt(sqrt( Abitmap)) + .5 ) ) );
1245 default: OSL_ENSURE( !pOut,
"new Graphic position?" );
1248 if ( bDraw && aGrf.
IsOver( rOut ) )
1265 pBorderData =
nullptr;
1267 if (!pBorderData && !pBackground && !pShadow)
1276 if ( pShadow && pShadow->
GetLocation() != SvxShadowLocation::NONE )
1284 Size(nScrW-nLeft-nRight, nScrH-nTop-nBottom) );
1296 if (nEffHeight<=0 || nEffWidth<=0)
1322 if ( pShadow && pShadow->
GetLocation() != SvxShadowLocation::NONE )
1330 case SvxShadowLocation::TopLeft:
1332 aFrameRect.
Left()-nShadowX, aFrameRect.
Top()-nShadowY,
1333 aFrameRect.
Right()-nShadowX, aFrameRect.
Top() ) );
1335 aFrameRect.
Left()-nShadowX, aFrameRect.
Top()-nShadowY,
1336 aFrameRect.
Left(), aFrameRect.
Bottom()-nShadowY ) );
1338 case SvxShadowLocation::TopRight:
1340 aFrameRect.
Left()+nShadowX, aFrameRect.
Top()-nShadowY,
1341 aFrameRect.
Right()+nShadowX, aFrameRect.
Top() ) );
1343 aFrameRect.
Right(), aFrameRect.
Top()-nShadowY,
1344 aFrameRect.
Right()+nShadowX, aFrameRect.
Bottom()-nShadowY ) );
1346 case SvxShadowLocation::BottomLeft:
1348 aFrameRect.
Left()-nShadowX, aFrameRect.
Bottom(),
1349 aFrameRect.
Right()-nShadowX, aFrameRect.
Bottom()+nShadowY ) );
1351 aFrameRect.
Left()-nShadowX, aFrameRect.
Top()+nShadowY,
1352 aFrameRect.
Left(), aFrameRect.
Bottom()+nShadowY ) );
1354 case SvxShadowLocation::BottomRight:
1356 aFrameRect.
Left()+nShadowX, aFrameRect.
Bottom(),
1357 aFrameRect.
Right()+nShadowX, aFrameRect.
Bottom()+nShadowY ) );
1359 aFrameRect.
Right(), aFrameRect.
Top()+nShadowY,
1360 aFrameRect.
Right()+nShadowX, aFrameRect.
Bottom()+nShadowY ) );
1373 pBorderDoc->InitUndo(
rDoc, 0,0,
true,
true );
1374 pBorderDoc->ApplyAttr( 0,0,0, *pBorderData );
1377 pBorderDoc->FillInfo( aTabInfo, 0,0, 0,0, 0,
1379 OSL_ENSURE(aTabInfo.
mnArrCount,
"nArrCount == 0");
1381 aTabInfo.
mpRowInfo[1].nHeight =
static_cast<sal_uInt16
>(nEffHeight);
1382 aTabInfo.
mpRowInfo[0].pCellInfo[1].nWidth =
1383 aTabInfo.
mpRowInfo[1].pCellInfo[1].nWidth =
static_cast<sal_uInt16
>(nEffWidth);
1389 aOutputData.DrawFrame(*
pDev);
1408 for (nCol=nX1; nCol<=nX2; nCol++)
1416 for (nCol=nX1; nCol<=nX2; nCol++)
1430 tools::Long nAddY = ( nHeight - nTextHeight ) / 2;
1433 nTextPosX -= nWidth;
1460 for (
SCROW nRow=nY1; nRow<=nY2; nRow++)
1470 aText = OUString::number( nRow+1 );
1474 tools::Long nAddY = ( nHeight - nTextHeight ) / 2;
1493 for (
SCCOL nCol=nX1; nCol<=nX2; nCol++)
1500 rLocationData.
AddColHeaders( aCellRect, nX1, nX2, bRepCol );
1520 rLocationData.
AddRowHeaders( aCellRect, nY1, nY2, bRepRow );
1535 for (nCol=0; nCol<nX1; nCol++)
1539 Point aMMOffset( aTwipOffset );
1540 aMMOffset.setX( static_cast<tools::Long>(aMMOffset.X() *
HMM_PER_TWIPS) );
1541 aMMOffset.setY( static_cast<tools::Long>(aMMOffset.Y() *
HMM_PER_TWIPS) );
1542 aMMOffset +=
Point( nLogStX, nLogStY );
1552 for (nCol=nX1; nCol<=nX2; nCol++)
1563 bRepCol, bRepRow, aDrawMapMode );
1568 bool bShLeft,
bool bShTop,
bool bShRight,
bool bShBottom )
1572 if ( nX2 < nX1 || nY2 < nY1 )
1608 if(!bHideAllDrawingLayer)
1662 if(!bHideAllDrawingLayer)
1675 return nPageUsage == SvxPageUsage::Mirror && (nPageNo & 1);
1686 bLeft = (nPageNo & 1) != 0;
1753 Point aStart( nLineStartX, nStartY );
1759 aStart.AdjustX(nLeft );
1760 aStart.AdjustY(nTop );
1769 aStart.AdjustX(nLeft );
1770 aStart.AdjustY(nTop );
1782 Point aBorderStart( nLineStartX, nStartY );
1829 Point aDraw = aStart;
1832 aDraw.AdjustY(nDif / 2 );
1843 Point aDraw = aStart;
1846 aDraw.AdjustY(nDif / 2 );
1857 Point aDraw = aStart;
1860 aDraw.AdjustY(nDif / 2 );
1867 if ( pLocationData )
1891 if ( nMarkLen > aDataSize.
Width() / 2 )
1892 nMarkLen = aDataSize.
Width() / 2;
1905 if ( nNoteStart + nCount < nSize)
1927 if ( pLocationData )
1935 nPosY += nTextHeight;
1985 OSL_FAIL(
"StartPage does not exist anymore" );
1988 if ( bDoPrint || pLocationData )
1995 PrintHF( nPageNo,
true, nHeaderY, bDoPrint, pLocationData );
2000 PrintHF( nPageNo,
false, nFooterY, bDoPrint, pLocationData );
2008 OSL_FAIL(
"EndPage does not exist anymore" );
2072 OSL_FAIL(
"StartPage does not exist anymore" );
2080 PrintHF( nPageNo,
true, nHeaderY, bDoPrint, pLocationData );
2085 PrintHF( nPageNo,
false, nFooterY, bDoPrint, pLocationData );
2096 for (i=nX1; i<=nX2; i++)
2115 else if ( bLayoutRTL )
2184 nInnerStartX += nHeaderWidth + nRepeatWidth + nContentWidth;
2189 nInnerStartX += nOffsetOneX / 2;
2195 tools::Long nRepStartX = nInnerStartX + nHeaderWidth * nLayoutSign;
2196 tools::Long nRepStartY = nInnerStartY + nHeaderHeight;
2197 tools::Long nDataX = nRepStartX + nRepeatWidth * nLayoutSign;
2199 tools::Long nEndX = nDataX + nContentWidth * nLayoutSign;
2208 nInnerStartX -= nHeaderWidth;
2209 nRepStartX -= nRepeatWidth;
2210 nDataX -= nContentWidth;
2213 nEndX += nHeaderWidth + nRepeatWidth + nContentWidth;
2238 DrawBorder( nStartX, nStartY, nBorderEndX-nStartX, nBorderEndY-nStartY,
2248 if (bDoRepCol && bDoRepRow)
2252 nRepStartX,nRepStartY,
true,
true,
false,
false );
2253 if ( pLocationData )
2255 nRepStartX,nRepStartY,
true,
true, *pLocationData );
2261 true, !bDoRepRow,
false,
true );
2262 if ( pLocationData )
2269 !bDoRepCol,
true,
true,
false );
2270 if ( pLocationData )
2277 PrintArea( nX1,nY1, nX2,nY2, nDataX,nDataY, !bDoRepCol,!bDoRepRow,
true,
true );
2278 if ( pLocationData )
2279 LocateArea( nX1,nY1, nX2,nY2, nDataX,nDataY,
false,
false, *pLocationData );
2300 aPattern.GetFont( aFont, eColorMode,
pDev );
2307 if ( pLocationData )
2312 if ( pLocationData )
2313 LocateColHdr( nX1,nX2, nDataX,nInnerStartY,
false, *pLocationData );
2318 if ( pLocationData )
2323 if ( pLocationData )
2324 LocateRowHdr( nY1,nY2, nInnerStartX,nDataY,
false, *pLocationData );
2353 OSL_FAIL(
"EndPage does not exist anymore" );
2419 for (
SCTAB nTab=0; nTab<nTabCount; nTab++)
2435 bool bAreaOk =
false;
2469 for (sal_uInt16
i=0;
i<nRCount;
i++)
2512 bool bError =
false;
2516 sal_uInt16 nRepeats = 1;
2522 for (sal_uInt16 nStep=0; nStep<nRepeats; nStep++)
2524 bool bDoThis =
true;
2560 nNoteAdd =
PrintNotes( nPages, nNoteNr,
false,
nullptr );
2563 nNoteNr += nNoteAdd;
2579 Fraction aZoomFract( nEffZoom,10000 );
2585 aHorFract =
Fraction( static_cast<tools::Long>( nEffZoom / nFact ), 10000 );
2593 Point aTwipsOfs( static_cast<tools::Long>( -
aOffset.X() / nScaleX + 0.5 ), static_cast<tools::Long>( -
aOffset.Y() /
nScaleY + 0.5 ) );
2606 pPrinter->SetOrientation(
bLandscape ? Orientation::Landscape : Orientation::Portrait );
2623 MapMode aLocalMode( MapUnit::MapTwip );
2624 pPrinter->SetMapMode( aLocalMode );
2625 pPrinter->SetPaperSizeUser( aEnumSize );
2626 pPrinter->SetMapMode( aPrinterMode );
2629 pPrinter->SetPaperBin( nPaperBin );
2640 OSL_ENSURE(
pDev,
"Device == NULL");
2648 if ( pLocationData )
2660 sal_uInt16 nRepeats = 1;
2663 for (sal_uInt16 nStep=0; nStep<nRepeats; nStep++)
2692 if ( rPageRanges.
IsSelected( nPageNo+nStartPage+1 ) )
2694 PrintPage( nPageNo+nDisplayStart, nX1, nY1, nX2, nY2,
2695 bDoPrint, pLocationData );
2718 if ( rPageRanges.
IsSelected( nPageNo+nStartPage+1 ) )
2720 PrintPage( nPageNo+nDisplayStart, nX1, nY1, nX2, nY2,
2721 bDoPrint, pLocationData );
2738 if ( nPageNo+nStartPage <= nEndPage )
2740 bool bPageSelected = rPageRanges.
IsSelected( nPageNo+nStartPage+1 );
2741 nNoteAdd =
PrintNotes( nPageNo+nStartPage, nNoteNr, bDoPrint && bPageSelected,
2742 ( bPageSelected ? pLocationData :
nullptr ) );
2745 nNoteNr += nNoteAdd;
2768 const ScRange* pThisRange =
nullptr;
2796 sal_uInt16 nMinPages = 0;
2797 std::set<SCROW> aRowBreaks;
2798 std::set<SCCOL> aColBreaks;
2801 nMinPages = (aRowBreaks.size() + 1) * (aColBreaks.size() + 1);
2805 nPagesToFit = std::max(nMinPages, nPagesToFit);
2808 sal_uInt16 nLastFitZoom = 0, nLastNonFitZoom = 0;
2823 nLastFitZoom =
nZoom;
2826 if (nLastFitZoom ==
nZoom)
2832 if (
nZoom - nLastFitZoom <= 1)
2834 nZoom = nLastFitZoom;
2839 nLastNonFitZoom =
nZoom;
2853 sal_uInt16 nMinPagesW = 0, nMinPagesH = 0;
2854 std::set<SCROW> aRowBreaks;
2855 std::set<SCCOL> aColBreaks;
2858 nMinPagesW = aColBreaks.size() + 1;
2859 nMinPagesH = aRowBreaks.size() + 1;
2863 nW = std::max(nMinPagesW, nW);
2864 nH = std::max(nMinPagesH, nH);
2867 sal_uInt16 nLastFitZoom = 0, nLastNonFitZoom = 0;
2882 nLastFitZoom =
nZoom;
2885 if (nLastFitZoom ==
nZoom)
2891 if (
nZoom - nLastFitZoom <= 1)
2893 nZoom = nLastFitZoom;
2898 nLastNonFitZoom =
nZoom;
2907 nLastFitZoom =
nZoom;
2909 if (
nZoom < nLastFitZoom)
2915 nZoom = nLastFitZoom;
2978 return aDocPageSize;
2988 SCCOL nStartCol,
const std::vector< SCCOL >& rPageEndX )
2990 size_t nPagesX = rPageRowEntry.
GetPagesX();
2994 bool bLeftIsEmpty =
false;
2998 for (
size_t i=0;
i<nPagesX;
i++)
3000 OSL_ENSURE(
i < rPageEndX.size(),
"vector access error for aPageEndX");
3001 SCCOL nEndCol = rPageEndX[
i];
3002 if ( rDoc.
IsPrintEmpty( nPrintTab, nStartCol, nStartRow, nEndCol, nEndRow,
3003 bLeftIsEmpty, &aTempRange, &aTempRect ) )
3006 bLeftIsEmpty =
true;
3009 bLeftIsEmpty =
false;
3011 nStartCol = nEndCol+1;
3031 bool bSkipEmpty,
bool bPrintArea,
3059 bool bSkipEmpty,
bool bPrintArea,
3066 nStartRow, nEndRow, nStartCol, nEndCol,
3067 nPrintTab, rDocSize))
3080 ScRange aRange(nStartCol, nStartRow, nPrintTab, nEndCol, nEndRow, nPrintTab);
3088 const size_t nRealCnt = nEndRow - nStartRow + 1;
3109 bool bVisCol =
false;
3110 for (
SCCOL i = nStartCol;
i <= nEndCol;
i++)
3114 if (
i > nStartCol && bVisCol && bPageBreak)
3131 bool bVisRow =
false;
3132 SCROW nPageStartRow = nStartRow;
3133 SCROW nLastVisibleRow = -1;
3136 SCROW nNextPageBreak = pRowBreakIter->first();
3139 nNextPageBreak = pRowBreakIter->next();
3141 for (
SCROW nRow = nStartRow; nRow <= nEndRow; ++nRow)
3143 bool bPageBreak = (nNextPageBreak == nRow);
3145 nNextPageBreak = pRowBreakIter->next();
3147 if (nRow > nStartRow && bVisRow && bPageBreak)
3153 if (!bSkipEmpty || !rDoc.
IsPrintEmpty(nPrintTab, nStartCol, nPageStartRow, nEndCol, nRow-1))
3164 nPageStartRow = nRow;
3168 if (nRow <= nLastVisibleRow)
3176 SCROW nLastRow = -1;
3177 if (!rDoc.
RowHidden(nRow, nPrintTab,
nullptr, &nLastRow))
3180 nLastVisibleRow = nLastRow;
3194 if (!bSkipEmpty || !rDoc.
IsPrintEmpty(nPrintTab, nStartCol, nPageStartRow, nEndCol, nEndRow))
static bool IsSystemRTL()
SC_DLLPUBLIC bool GetPrintArea(SCTAB nTab, SCCOL &rEndCol, SCROW &rEndRow, bool bNotes=true) const
const Fraction & GetScaleX() const
void DrawText(const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, MetricVector *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pLayoutCache=nullptr)
std::unique_ptr< RowInfo[]> mpRowInfo
OutDevType GetOutDevType() const
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)
sal_uInt16 GetHeight() const
void UpdatePageBreaks(SCTAB nTab, const ScRange *pUserArea=nullptr)
SC_DLLPUBLIC void Format(OStringBuffer &r, ScRefFlags nFlags, const ScDocument *pDocument=nullptr, const Details &rDetails=detailsOOOa1) const
static void lcl_DrawGraphic(const Graphic &rGraphic, vcl::RenderContext *pOut, const tools::Rectangle &rGrf, const tools::Rectangle &rOut)
void GetPrintState(ScPrintState &rState, bool bSavePageRanges=false)
void GetScaleData(Size &rPhysSize, tools::Long &rDocHdr, tools::Long &rDocFtr)
std::vector< SCROW > aPageEndY
SC_DLLPUBLIC const ScRange * GetRepeatColRange(SCTAB nTab)
void DrawFrame(vcl::RenderContext &rRenderContext)
void UpdatePendingRowHeights(SCTAB nUpdateTab, bool bBefore=false)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_DYNAMIC(165)
SC_DLLPUBLIC bool HasPrintRange()
constexpr TypedWhichId< SvxSizeItem > ATTR_PAGE_SIZE(161)
ScVSplitPos WhichV(ScSplitPos ePos)
constexpr TypedWhichId< ScPatternAttr > ATTR_PATTERN(156)
void CalcZoom(sal_uInt16 nRangeNo)
void SetShowNullValues(bool bSet)
void SetManualZoom(sal_uInt16 nNewZoom)
void SetUseStyleColor(bool bFlag)
sal_uInt16 GetLower() const
constexpr TypedWhichId< SvxBoxItem > ATTR_BORDER(150)
constexpr TypedWhichId< ScViewObjectModeItem > ATTR_PAGE_DRAWINGS(172)
void setWidth(tools::Long nWidth)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_GRID(168)
void SetUseStyleColor(bool bSet)
OUString GetTitle(sal_uInt16 nMaxLen=0) const
virtual bool IsVirtual() const
#define PRINT_HEADER_WIDTH
Point PrePrintDrawingLayer(tools::Long nLogStX, tools::Long nLogStY)
Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
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)
static void DrawToDev(ScDocument &rDoc, OutputDevice *pDev, double nPrintFactor, const tools::Rectangle &rBound, ScViewData *pViewData, bool bMetaFile)
void SetRepeatArea(SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCROW nEndRow)
bool IsLeft(tools::Long nPageNo)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_FORMULAS(183)
void PrintPage(tools::Long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, bool bDoPrint, ScPreviewLocationData *pLocationData)
constexpr TypedWhichId< SfxUInt16Item > ATTR_PAGE_SCALETOPAGES(175)
const OUString & GetName() const
tools::Long GetRight() const
const EditTextObject * GetCenterArea() const
ScHSplitPos WhichH(ScSplitPos ePos)
void ResetBreaks(SCTAB nTab)
double GetOutputFactor() const
void ScColToAlpha(OUStringBuffer &rBuf, SCCOL nCol)
append alpha representation of column to buffer
void AddNoteText(const tools::Rectangle &rRect, const ScAddress &rPos)
const SvxShadowItem * pShadow
bool IsSupportedGraphic() const
const SfxItemSet * pParamSet
sal_uInt16 GetValue() const
ScPrintRangeData & GetData(size_t i)
void PrintRowHdr(SCROW nY1, SCROW nY2, tools::Long nScrX, tools::Long nScrY)
const ScPageHFItem * pRight
sal_uInt16 GetDistance(SvxBoxItemLine nLine) const
const ContentProperties & rData
const MapMode & GetMapMode() const
tools::Long TextHeight(const EditTextObject *pObject)
constexpr SdrLayerID SC_LAYER_BACK(1)
ScSplitPos GetActivePart() const
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 IntersectClipRegion(const tools::Rectangle &rRect)
void SetShowFormulas(bool bSet)
constexpr TypedWhichId< SvxAdjustItem > EE_PARA_JUST(EE_PARA_START+15)
OUString GetLastName(DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
virtual SfxItemSet & GetItemSet()
bool GetLastSourceRange(ScRange &rRange) const
constexpr TypedWhichId< ScProtectionAttr > ATTR_PROTECTION(149)
void GetEmbedded(ScRange &rRange) const
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_NULLVALS(184)
SC_DLLPUBLIC ScRange GetRange(SCTAB nTab, const tools::Rectangle &rMMRect, bool bHiddenAsZero=true) const
void ApplyAsianEditSettings(ScEditEngineDefaulter &rEngine)
const editeng::SvxBorderLine * GetRight() const
EmbeddedObjectRef * pObject
css::chart::ChartAxisLabelPosition ePos
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
SCCOL GetPosX(ScHSplitPos eWhich, SCTAB nForTab=-1) const
SC_DLLPUBLIC bool HasAttrib(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, HasAttrFlags nMask) const
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT(EE_CHAR_START+2)
constexpr TypedWhichId< SvxFrameDirectionItem > EE_PARA_WRITINGDIR(EE_PARA_START+0)
constexpr TypedWhichId< ScPageScaleToItem > ATTR_PAGE_SCALETO(185)
css::uno::Reference< css::document::XDocumentProperties > getDocProperties() const
SC_DLLPUBLIC sal_uInt16 GetRowHeight(SCROW nRow, SCTAB nTab, bool bHiddenAsZero=true) const
tools::Rectangle aPageRect
std::vector< ScAddress > aNotePosList
SC_DLLPUBLIC ScDocumentPool * GetPool()
ScPageTableParam aTableParam
SfxPrinter * GetPrinter(bool bCreateIfNotExist=true)
SC_DLLPUBLIC bool GetPrintAreaVer(SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, SCROW &rEndRow, bool bNotes) const
SC_DLLPUBLIC ScPostIt * GetNote(const ScAddress &rPos)
Notes.
SvxGraphicPosition GetGraphicPos() const
SvxNumType GetNumType() const
SvxShadowLocation GetLocation() const
const ScRange * pUserArea
SC_DLLPUBLIC SCROW MaxRow() const
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 ...
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
const Fraction & GetScaleY() const
constexpr TypedWhichId< SvxShadowItem > ATTR_SHADOW(152)
SC_DLLPUBLIC SCTAB GetTableCount() const
Additional class containing cell annotation data.
SCCOL VisibleCellsX(ScHSplitPos eWhichX) const
void DrawExtraShadow(bool bLeft, bool bTop, bool bRight, bool bBottom)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_VERCENTER(163)
void AddNoteMark(const tools::Rectangle &rRect, const ScAddress &rPos)
void LocateColHdr(SCCOL nX1, SCCOL nX2, tools::Long nScrX, tools::Long nScrY, bool bRepCol, ScPreviewLocationData &rLocationData)
void InitParam(const ScPrintOptions *pOptions)
const SvxBoxItem * pBorder
bool IsSelected(sal_Int32 nIndex) const
SC_DLLPUBLIC bool HasTable(SCTAB nTab) const
void SetDrawView(FmFormView *pNew)
SC_DLLPUBLIC const ScRange * GetPrintRange(SCTAB nTab, sal_uInt16 nPos)
const Graphic * GetGraphic(OUString const &referer=OUString()) const
tools::Long DoPrint(const MultiSelection &rPageRanges, tools::Long nStartPage, tools::Long nDisplayStart, bool bDoPrint, ScPreviewLocationData *pLocationData)
ScPageAreaParam aAreaParam
void AddHeaderFooter(const tools::Rectangle &rRect, bool bHeader, bool bLeft)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_HEADERS(169)
SCROW GetPosY(ScVSplitPos eWhich, SCTAB nForTab=-1) const
void DrawLine(const Point &rStartPt, const Point &rEndPt)
bool IsPrintEntireSheet(SCTAB nTab) const
Returns true, if the specified sheet is always printed.
bool GetForceBreaks() const
constexpr TypedWhichId< SvxPaperBinItem > ATTR_PAGE_PAPERBIN(160)
void setHideOle(bool bNew)
void DrawRect(const tools::Rectangle &rRect)
tools::Long PrintNotes(tools::Long nPageNo, tools::Long nNoteStart, bool bDoPrint, ScPreviewLocationData *pLocationData)
const SfxPoolItem & GetItem(sal_uInt16 nWhichP) const
SCROW VisibleCellsY(ScVSplitPos eWhichY) const
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_FOOTERLEFT(178)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_TOPDOWN(173)
sc::PrintPageRanges m_aRanges
bool IsPrintEmpty(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool bLeftIsEmpty=false, ScRange *pLastRange=nullptr, tools::Rectangle *pLastMM=nullptr) const
const Color & GetColor() const
const Color & GetColor() const
static void lcl_HidePrint(const ScTableInfo &rTabInfo, SCCOL nX1, SCCOL nX2)
sal_uInt16 GetWidth() const
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
const editeng::SvxBorderLine * GetTop() const
SC_DLLPUBLIC SCCOL MaxCol() const
tools::Long CountNotePages()
SC_DLLPUBLIC bool ColHidden(SCCOL nCol, SCTAB nTab, SCCOL *pFirstCol=nullptr, SCCOL *pLastCol=nullptr) const
SC_DLLPUBLIC sal_uInt16 GetPrintRangeCount(SCTAB nTab)
const ScPatternAttr * pPatternAttr
tools::Long DoNotes(tools::Long nNoteStart, bool bDoPrint, ScPreviewLocationData *pLocationData)
void Draw(OutputDevice *pOutDev, const Point &rDestPt) const
constexpr TypedWhichId< SvxFontHeightItem > ATTR_CJK_FONT_HEIGHT(112)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const editeng::SvxBorderLine * GetLeft() const
constexpr TypedWhichId< SvxSetItem > ATTR_PAGE_FOOTERSET(182)
void LocateArea(SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, tools::Long nScrX, tools::Long nScrY, bool bRepCol, bool bRepRow, ScPreviewLocationData &rLocationData)
std::unique_ptr< ScDocument, o3tl::default_delete< ScDocument > > ScDocumentUniquePtr
SC_DLLPUBLIC void GetAllColBreaks(std::set< SCCOL > &rBreaks, SCTAB nTab, bool bPage, bool bManual) const
sal_uInt16 CalcShadowSpace(SvxShadowItemSide nShadow) const
sal_uLong GetScaledRowHeight(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, double fScale, const sal_uLong *pnMaxHeight=nullptr) 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...
Size GetOutputSize() const
void DrawGrid(vcl::RenderContext &rRenderContext, bool bGrid, bool bPage)
tools::Long GetLeft() const
tools::Long Width() const
bool getHideFormControl() const
void DrawBackground(vcl::RenderContext &rRenderContext)
OUString ScResId(const char *pId)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_HORCENTER(162)
bool GetOption(ScViewOption eOpt) const
void ApplyPrintSettings()
SC_DLLPUBLIC OUString GetPageStyle(SCTAB nTab) const
void DrawStrings(bool bPixelToLogic=false)
bool IsMirror(tools::Long nPageNo)
constexpr TypedWhichId< ScViewObjectModeItem > ATTR_PAGE_OBJECTS(171)
void LocateRowHdr(SCROW nY1, SCROW nY2, tools::Long nScrX, tools::Long nScrY, bool bRepRow, ScPreviewLocationData &rLocationData)
ScPageBreakData * pPageData
MapUnit GetMapUnit() const
SC_DLLPUBLIC tools::Rectangle GetMMRect(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero=true) const
static Size GetPaperSize(Paper ePaper, MapUnit eUnit=MapUnit::MapTwip)
void AddColHeaders(const tools::Rectangle &rRect, SCCOL nStartCol, SCCOL nEndCol, bool bRepCol)
VclPtr< SfxPrinter > pPrinter
constexpr TypedWhichId< SvxFontHeightItem > ATTR_CTL_FONT_HEIGHT(117)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_HEADERRIGHT(179)
void SetOffset(const Point &rOfs)
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
const SvxBoxItem * pBorderItem
constexpr TypedWhichId< SvxLRSpaceItem > ATTR_LRSPACE(157)
std::unique_ptr< SfxPoolItem > CloneSetWhich(sal_uInt16 nNewWhich) const
void PostPaint(SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, PaintPartFlags nPart, sal_uInt16 nExtFlags=0)
SC_DLLPUBLIC bool ExtendMerge(SCCOL nStartCol, SCROW nStartRow, SCCOL &rEndCol, SCROW &rEndRow, SCTAB nTab, bool bRefresh=false)
SfxItemPool * GetPool() const
SC_DLLPUBLIC bool HasNote(const ScAddress &rPos) const
sc::PrintPageRangesInput aPrintPageRangesInput
const SCROW SCROW_REPEAT_NONE
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_FOOTERRIGHT(180)
void SetGridColor(const Color &rColor)
void SetPrintTab(SCTAB nNew)
GraphicType GetType() const
std::vector< ScPageRowEntry > aPageRows
const SvxBrushItem * pBackgroundItem
SC_DLLPUBLIC const ScViewOptions & GetViewOptions() const
ScAutoFontColorMode
how to treat COL_AUTO in GetFont:
void PrintColHdr(SCCOL nX1, SCCOL nX2, tools::Long nScrX, tools::Long nScrY)
static SfxItemPool * CreatePool()
ScHeaderFieldData aFieldData
bool AdjustPrintArea(bool bNew)
Point PixelToLogic(const Point &rDevicePt) const
constexpr TypedWhichId< SvxBrushItem > ATTR_BACKGROUND(148)
void SetDateTime(const DateTime &)
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
void AddRowHeaders(const tools::Rectangle &rRect, SCROW nStartRow, SCROW nEndRow, bool bRepRow)
static tools::Long lcl_LineTotal(const ::editeng::SvxBorderLine *pLine)
SvxPageUsage GetPageUsage() const
void SetEmbedded(const ScRange &rRange)
static constexpr SCROW NOT_FOUND
bool getHideChart() const
void PrintHF(tools::Long nPageNo, bool bHeader, tools::Long nStartY, bool bDoPrint, ScPreviewLocationData *pLocationData)
SC_DLLPUBLIC OutputDevice * GetRefDevice()
void SetDrawView(FmFormView *pNew)
Contains the "scale to width/height" attribute in page styles.
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT_CTL(EE_CHAR_START+20)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
SC_DLLPUBLIC const ScRange * GetRepeatRowRange(SCTAB nTab)
MapMode GetPrefMapMode() const
SC_DLLPUBLIC bool GetPrintAreaHor(SCTAB nTab, SCROW nStartRow, SCROW nEndRow, SCCOL &rEndCol) const
#define PRINT_HEADER_HEIGHT
VclPtr< OutputDevice > pDev
const Range & GetTotalRange() const
const EditTextObject * GetRightArea() const
void PostPrintDrawingLayer(const Point &rMMOffset)
void SetFont(const vcl::Font &rNewFont)
const EditTextObject * GetLeftArea() const
void Construct(const ScPrintOptions *pOptions)
ScRowBreakIterator * GetRowBreakIterator(SCTAB nTab) const
void AddCellRange(const tools::Rectangle &rRect, const ScRange &rRange, bool bRepCol, bool bRepRow, const MapMode &rDrawMap)
void DrawTiled(OutputDevice *pOut, const tools::Rectangle &rArea, const Size &rSize, const Size &rOffset, int nTileCacheSize1D=128)
constexpr SdrLayerID SC_LAYER_FRONT(0)
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_WHITE
tools::Long GetTextHeight() const
SC_DLLPUBLIC ScBreakType HasColBreak(SCCOL nCol, SCTAB nTab) const
constexpr TypedWhichId< SvxColorItem > EE_CHAR_COLOR(EE_CHAR_START+0)
constexpr TypedWhichId< ScViewObjectModeItem > ATTR_PAGE_CHARTS(170)
black or white, depending on background
void setHideFormControl(bool bNew)
constexpr SdrLayerID SC_LAYER_INTERN(2)
tools::Long AdjustWidth(tools::Long n)
SC_DLLPUBLIC bool HasColNotes(SCCOL nCol, SCTAB nTab) const
static OUString ModifyDelimiters(const OUString &rOld)
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 GetTextWidth(const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
tools::Long Height() const
const INetURLObject & GetURLObject() const
constexpr TypedWhichId< SvxULSpaceItem > ATTR_ULSPACE(158)
const SvxShadowItem * pShadowItem
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_BLACK
constexpr TypedWhichId< SvxPageItem > ATTR_PAGE(159)
tools::Long AdjustHeight(tools::Long n)
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
const SvxBrushItem * pBack
std::unique_ptr< ScHeaderEditEngine > pEditEngine
tools::Long GetScrH() const
SC_DLLPUBLIC bool IsLayoutRTL(SCTAB nTab) const
from style settings, or black/white if needed
SC_DLLPUBLIC bool RowHidden(SCROW nRow, SCTAB nTab, SCROW *pFirstRow=nullptr, SCROW *pLastRow=nullptr) const
void setHideDraw(bool bNew)
static void lcl_FillHFParam(ScPrintHFParam &rParam, const SfxItemSet *pHFSet)
void SetCellMapMode(const MapMode &rMapMode)
void setHeight(tools::Long nHeight)
tools::Long GetScrW() const
void setHideChart(bool bNew)
reference_type * get() const
SC_DLLPUBLIC bool IsVisible(SCTAB nTab) const
constexpr TypedWhichId< SvxSetItem > ATTR_PAGE_HEADERSET(181)
std::vector< SCCOL > aPageEndX
constexpr TypedWhichId< SvxFontHeightItem > EE_CHAR_FONTHEIGHT_CJK(EE_CHAR_START+19)
void SetClearFlag(bool bFlag)
void SetMetaFileMode(bool bNewMode)
static void lcl_SetHidden(const ScDocument &rDoc, SCTAB nPrintTab, ScPageRowEntry &rPageRowEntry, SCCOL nStartCol, const std::vector< SCCOL > &rPageEndX)
bool GetSkipEmpty() const
const MapMode & GetLogicMode(ScSplitPos eWhich)
if(!pCandidateA->getEnd().equal(pCandidateB->getStart()))
SC_DLLPUBLIC void GetAllRowBreaks(std::set< SCROW > &rBreaks, SCTAB nTab, bool bPage, bool bManual) const
void DrawEdit(bool bPixelToLogic)
void UpdateHFHeight(ScPrintHFParam &rParam)
void SetRenderFlag(bool bFlag)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_ON(164)
void SetRefDevice(OutputDevice *pRDev)
void SetPageSize(SCTAB nTab, const Size &rSize)
constexpr TypedWhichId< SfxUInt16Item > ATTR_PAGE_SCALE(174)
SC_DLLPUBLIC sal_uInt16 GetColWidth(SCCOL nCol, SCTAB nTab, bool bHiddenAsZero=true) const
void Push(PushFlags nFlags=PushFlags::ALL)
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_NOTES(167)
constexpr TypedWhichId< SvxFontHeightItem > ATTR_FONT_HEIGHT(101)
constexpr TypedWhichId< ScPageHFItem > ATTR_PAGE_HEADERLEFT(177)
void SetExclusivelyDrawOleAndDrawObjects()
const ScPageHFItem * pLeft
SC_DLLPUBLIC bool GetName(SCTAB nTab, OUString &rName) const
const editeng::SvxBorderLine * GetBottom() const
const SCCOL SCCOL_REPEAT_NONE
constexpr TypedWhichId< SfxUInt16Item > ATTR_PAGE_FIRSTPAGENO(176)
constexpr TypedWhichId< SfxBoolItem > ATTR_PAGE_SHARED(166)
sal_uInt16 GetUpper() const
const SfxItemSet * pConditionSet
std::unique_ptr< SfxItemSet > pEditDefaults
void PrintDrawingLayer(SdrLayerID nLayer, const Point &rMMOffset)
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...
sal_uInt16 GetWidth() const
static Paper GetSvxPaper(const Size &rSize, MapUnit eUnit)
SfxMedium * GetMedium() const