47#include <document.hxx>
52#include <progress.hxx>
77#define SC_AUTHORCOLORCOUNT 9
87 rOpt(
SC_MOD()->GetAppOptions() ),
88 rUsers( rTrack.GetUserCollection() ),
132 size_t nPos = std::distance(
rUsers.begin(), it);
144 double nPixelPerTwipsX,
double nPixelPerTwipsY,
147 mpRefDevice( pNewDev ),
148 pFmtDevice( pNewDev ),
149 mrTabInfo( rTabInfo ),
150 pRowInfo( rTabInfo.mpRowInfo.
get() ),
151 nArrCount( rTabInfo.mnArrCount ),
161 mnPPTX( nPixelPerTwipsX ),
162 mnPPTY( nPixelPerTwipsY ),
163 pViewShell( nullptr ),
164 pDrawView( nullptr ),
169 bPagebreakMode( false ),
170 bSolidBackground( false ),
171 mbUseStyleColor( false ),
173 mbSyntaxMode( false ),
175 mbShowNullValues( true ),
176 mbShowFormulas( false ),
177 bShowSpellErrors( false ),
178 bMarkClipped( false ),
180 bAnyClipped( false ),
182 mpTargetPaintWindow(nullptr),
183 mpSpellCheckCxt(nullptr)
310 bool bDashed =
false;
341 bWorksInPixels =
true;
356 nOneX = aOnePixel.
Width();
357 nOneY = aOnePixel.
Height();
373 for (nX=
nX1; nX<=
nX2; nX++)
378 nPosX += nWidth * nLayoutSign;
384 while (nCol <= mpDoc->MaxCol())
394 if (nBreak != nBreakOld)
398 if (
static_cast<int>(nBreak))
418 if ( nX<mpDoc->MaxCol() && !bSingle )
420 bSingle = ( nWidthXplus1 == 0 );
421 for (nArrY=1; nArrY+1<
nArrCount && !bSingle; nArrY++)
423 if (
pRowInfo[nArrY].cellInfo(nX+1).bHOverlapped)
425 if (
pRowInfo[nArrY].cellInfo(nX).bHideGrid)
432 if ( nX<mpDoc->MaxCol() && bSingle )
434 SCCOL nVisX = nX + 1;
439 for (nArrY=1; nArrY+1<
nArrCount; nArrY++)
464 if ((pThisRowInfo->
bChanged && !bHOver && !bMergeCover) || (bHOver && bMergeCover))
466 aGrid.
AddVerLine(bWorksInPixels, nPosX-nSignedOneX, nPosY, nNextY-nOneY, bDashed);
471 else if (!bMergeCover)
481 bool bHiddenRow =
true;
482 SCROW nHiddenEndRow = -1;
484 for (nArrY=1; nArrY+1<
nArrCount; nArrY++)
486 SCSIZE nArrYplus1 = nArrY+1;
488 SCROW nYplus1 = nY+1;
497 if (
i > nHiddenEndRow)
511 if (nBreakOld != nBreak)
515 if (
static_cast<int>(nBreak))
534 bSingle = !bNextYisNextRow;
537 if (
pRowInfo[nArrYplus1].cellInfo(
i).bVOverlapped)
543 if ( bSingle && nY<mpDoc->MaxRow() )
557 if ( bNextYisNextRow )
570 if ((!bVOver && !bMergeCover) || (bVOver && bMergeCover))
572 aGrid.
AddHorLine(bWorksInPixels, nPosX, nNextX-nSignedOneX, nPosY-nOneY, bDashed);
578 else if (!bMergeCover)
596 sal_uInt16 nRangeCount = sal::static_int_cast<sal_uInt16>(pPageData->
GetCount());
610 pThisRowInfo->
nRowNo <= nEndY )
612 for (
SCCOL nX=nStartX; nX<=nEndX; nX++)
636 for (
SCCOL nX=0; nX<=nRotMax; nX++)
662 if(nTargetX >= 0 && nTargetY >= 0)
699 if ( nRot180 == 9000 )
729 pPattern = pDoc->
GetPattern( nCol, nRow, nTab );
737 while ( nCol < pDoc->MaxCol() &&
lcl_GetRotateDir( pDoc, nCol, nRow, nTab ) == nDir &&
741 pPattern = pDoc->
GetPattern( nCol, nRow, nTab );
751 SCCOL nX1,
SCCOL nX2,
bool bShowProt,
bool bPagebreakMode )
760 for ( nX=nX1; nX<=nX2; nX++ )
764 if ( !pPat1 || !pPat2 ||
771 for ( nX=nX1; nX<=nX2; nX++ )
777 for ( nX=nX1; nX<=nX2; nX++ )
781 if ( bPagebreakMode )
782 for ( nX=nX1; nX<=nX2; nX++ )
786 for ( nX=nX1; nX<=nX2; nX++ )
790 if( (pCol1 && !pCol2) || (!pCol1 && pCol2) )
793 if (pCol1 && (*pCol1 != *pCol2))
799 if( (pInfo1 && !pInfo2) || (!pInfo1 && pInfo2) )
802 if (pInfo1 && (*pInfo1 != *pInfo2))
809 if(pIconSet1 || pIconSet2)
822 mpDev->SetLineColor(aBgColor);
823 mpDev->SetFillColor(aBgColor);
833const double lclCornerRectTransparency = 40.0;
843 if(pOldDataBarInfo->
mnZero)
851 nPosZero = aPaintRect.
Left();
860 else if(pOldDataBarInfo->
mnLength > 0)
862 aPaintRect.
SetLeft( nPosZero );
872 Gradient aGradient(css::awt::GradientStyle_LINEAR, pOldDataBarInfo->
maColor, COL_TRANSPARENT);
873 aGradient.SetSteps(255);
876 aGradient.SetAngle(2700_deg10);
878 aGradient.SetAngle(900_deg10);
887 rRenderContext.
DrawRect(aPaintRect);
891 if(!(pOldDataBarInfo->
mnZero && pOldDataBarInfo->
mnZero != 100))
894 Point aPoint1(nPosZero, rRect.
Top());
896 LineInfo aLineInfo(LineStyle::Dash, 1);
897 aLineInfo.SetDashCount( 4 );
898 aLineInfo.SetDistance( 3 );
899 aLineInfo.SetDashLen( 3 );
902 rRenderContext.
DrawLine(aPoint1, aPoint2, aLineInfo);
917 const BitmapEx& rIcon = getIcon(rIconSetBitmapMap, eType, nIndex);
935 double fRatio =
static_cast<double>(aSize.
Width()) / aSize.
Height();
938 rRenderContext.
Push();
941 rRenderContext.
Pop();
953 if (pOldColor && (pBackground || pOldColor != pColor || pOldDataBarInfo || pDataBarInfo || pIconSetInfo || pOldIconSetInfo))
955 rRect.
SetRight( nPosX-nSignedOneX );
956 if( !pOldColor->IsTransparent() )
961 if( pOldDataBarInfo )
962 drawDataBars(rRenderContext, pOldDataBarInfo, rRect, nOneX, nOneY);
963 if( pOldIconSetInfo )
964 drawIconSets(rRenderContext, pOldIconSetInfo, rRect, nOneX, nOneY, rIconSetBitmapMap);
966 rRect.
SetLeft( nPosX - nSignedOneX );
969 if ( pOldBackground && (pColor ||pBackground != pOldBackground || pOldDataBarInfo || pDataBarInfo || pIconSetInfo || pOldIconSetInfo) )
971 rRect.
SetRight( nPosX-nSignedOneX );
981 if( pOldDataBarInfo )
982 drawDataBars(rRenderContext, pOldDataBarInfo, rRect, nOneX, nOneY);
983 if( pOldIconSetInfo )
984 drawIconSets(rRenderContext, pOldIconSetInfo, rRect, nOneX, nOneY, rIconSetBitmapMap);
986 rRect.
SetLeft( nPosX - nSignedOneX );
989 if (!pOldBackground && !pOldColor && (pDataBarInfo || pIconSetInfo))
991 rRect.
SetRight( nPosX -nSignedOneX );
992 rRect.
SetLeft( nPosX - nSignedOneX );
998 if (!pOldColor || *pOldColor != *pColor)
1001 pOldBackground =
nullptr;
1003 else if(pBackground)
1005 pOldBackground = pBackground;
1010 pOldDataBarInfo = pDataBarInfo;
1012 pOldDataBarInfo =
nullptr;
1015 pOldIconSetInfo = pIconSetInfo;
1017 pOldIconSetInfo =
nullptr;
1029 bool bWorksInPixels =
false;
1031 bWorksInPixels =
true;
1035 if (!bWorksInPixels)
1057 auto pProtectedBackground = std::make_shared<SvxBrushItem>( aProtectedColor,
ATTR_BACKGROUND );
1088 aRect =
tools::Rectangle(nPosX, nPosY - nOneY, nPosX, nPosY - nOneY + nRowHeight);
1094 std::optional<Color> pOldColor;
1097 SCCOL nMergedCols = 1;
1098 SCCOL nOldMerged = 0;
1100 for (
SCCOL nX=
nX1; nX + nMergedCols <=
nX2 + 1; nX += nOldMerged)
1104 nOldMerged = nMergedCols;
1113 nMergedCols = std::max<SCCOL>(1, pMerge->
GetColMerge());
1116 for (
SCCOL nMerged = 0; nMerged < nMergedCols; ++nMerged)
1118 SCCOL nCol = nX+nOldMerged+nMerged;
1124 if (nNewPosX == nPosX)
1139 pBackground = pProtectedBackground.get();
1144 pBackground =
nullptr;
1150 pBackground = pProtectedBackground.get();
1160 std::optional<Color>
const & pColor = pInfo->
mxColorScale;
1168 drawCells(rRenderContext, pColor, pBackground, pOldColor, pOldBackground, aRect, nPosXLogic, nLayoutSign, nOneXLogic, nOneYLogic, pDataBarInfo, pOldDataBarInfo, pIconSetInfo, pOldIconSetInfo,
mpDoc->
GetIconSetBitmapMap());
1177 drawCells(rRenderContext, std::optional<Color>(),
nullptr, pOldColor, pOldBackground, aRect, nPosXLogic, nLayoutSign, nOneXLogic, nOneYLogic,
nullptr, pOldDataBarInfo,
nullptr, pOldIconSetInfo,
mpDoc->
GetIconSetBitmapMap());
1182 nPosY += nRowHeight;
1193 mpDev->SetLineColor();
1197 Color aAutoTextColor;
1198 if ( bCellContrast )
1213 bool bCornerY = ( nArrY == 0 ) || ( nArrY+1 ==
nArrCount );
1214 bool bSkipY = ( nArrY==0 && !bTop ) || ( nArrY+1 ==
nArrCount && !bBottom );
1219 if ( pThisRowInfo->
bChanged && !bSkipY )
1224 bool bCornerX = ( nCol==
nX1-1 || nCol==
nX2+1 );
1225 bool bSkipX = ( nCol==
nX1-1 && !bLeft ) || ( nCol==
nX2+1 && !bRight );
1227 for (sal_uInt16 nPass=0; nPass<2; nPass++)
1232 if ( pAttr && !bSkipX )
1239 if ( (nPass==0 && bCornerX) || (nPass==1 && bCornerY) )
1251 while (nWx<
nX2 && !
pRowInfo[0].basicCellInfo(nWx).nWidth)
1258 nPosX + ( nThisWidth - 1 ) * nLayoutSign,
1259 nPosY +
pRowInfo[nArrY].nHeight - 1 );
1263 if (nSizeX >= nMaxWidth) nSizeX = nMaxWidth-1;
1265 if (nSizeY >= nRowHeight) nSizeY = nRowHeight-1;
1267 nSizeX *= nLayoutSign;
1276 case SvxShadowLocation::BottomRight: eLoc = SvxShadowLocation::BottomLeft;
break;
1277 case SvxShadowLocation::BottomLeft: eLoc = SvxShadowLocation::BottomRight;
break;
1278 case SvxShadowLocation::TopRight: eLoc = SvxShadowLocation::TopLeft;
break;
1279 case SvxShadowLocation::TopLeft: eLoc = SvxShadowLocation::TopRight;
break;
1290 if (eLoc == SvxShadowLocation::TopLeft || eLoc == SvxShadowLocation::TopRight)
1298 if (eLoc == SvxShadowLocation::TopLeft || eLoc == SvxShadowLocation::BottomLeft)
1305 if (eLoc == SvxShadowLocation::TopLeft || eLoc == SvxShadowLocation::BottomLeft)
1312 if (eLoc == SvxShadowLocation::TopLeft || eLoc == SvxShadowLocation::TopRight)
1319 mpDev->SetFillColor( bCellContrast ? aAutoTextColor : pAttr->
GetColor() );
1320 mpDev->DrawRect( aRect );
1328 nPosY += nRowHeight;
1345 mpDev->SetLineColor();
1347 mpDev->SetFillColor( aBgColor );
1366 Size(
nScrW+1-nOneX, nRowHeight+1-nOneY) );
1367 mpDev->DrawRect( aRect );
1371 nPosY += nRowHeight;
1392 bool bUseSingleColor =
false;
1401 if ( ( nOldDrawMode & DrawModeFlags::WhiteFill ) && ( nOldDrawMode & DrawModeFlags::BlackLine ) )
1403 rRenderContext.
SetDrawMode( nOldDrawMode & (~DrawModeFlags::WhiteFill) );
1405 bUseSingleColor =
true;
1407 else if ( ( nOldDrawMode & DrawModeFlags::SettingsFill ) && ( nOldDrawMode & DrawModeFlags::SettingsLine ) )
1409 rRenderContext.
SetDrawMode( nOldDrawMode & (~DrawModeFlags::SettingsFill) );
1411 bUseSingleColor =
true;
1413 else if ( bCellContrast )
1416 bUseSingleColor =
true;
1419 const Color* pForceColor = bUseSingleColor ? &aSingleColor :
nullptr;
1448 for(
size_t nRow = 0; nRow < nRowCount; ++nRow )
1453 nOldPosY = nNewPosY;
1454 nOldSnapY = nNewSnapY;
1466 for(
SCCOL nCol =
nX1 - 1; nCol <=
nX2 + 1; ++nCol )
1471 rArray.
SetColWidth( nArrCol, std::abs( nNewSnapX - nOldSnapX ) );
1472 nOldPosX = nNewPosX;
1473 nOldSnapX = nNewSnapX;
1480 size_t nFirstCol = 1;
1481 size_t nFirstRow = 1;
1482 size_t nLastCol = nColCount - 2;
1483 size_t nLastRow = nRowCount - 2;
1486 rArray.
SetClipRange( nFirstCol, nFirstRow, nLastCol, nLastRow );
1489 size_t nRow1 = nFirstRow;
1490 std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor(
CreateProcessor2D());
1493 while( nRow1 <= nLastRow )
1495 while( (nRow1 <= nLastRow) && !
pRowInfo[ nRow1 ].bChanged ) ++nRow1;
1496 if( nRow1 <= nLastRow )
1498 size_t nRow2 = nRow1;
1499 while( (nRow2 + 1 <= nLastRow) &&
pRowInfo[ nRow2 + 1 ].bChanged ) ++nRow2;
1501 nFirstCol, nRow1, nLastCol, nRow2, pForceColor );
1502 pProcessor->process(xPrimitive);
1537 rRenderContext.
Push();
1543 std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor(
CreateProcessor2D( ));
1561 for (nX=0; nX<=nRotMax; nX++)
1563 if (nX==
nX1) nPosX = nInitPosX;
1605 tools::Long nTopRight = nPosX + (nColWidth - 1) * nLayoutSign;
1611 double nRealOrient = nLayoutSign *
toRadians(nAttrRotate);
1612 double nCos = cos(nRealOrient);
1613 double nSin = sin(nRealOrient);
1641 aPoints[0] =
Point(nTopLeft, nTop);
1642 aPoints[1] =
Point(nTopRight, nTop);
1643 aPoints[2] =
Point(nBotRight, nBottom);
1644 aPoints[3] =
Point(nBotLeft, nBottom);
1682 std::optional<Color>
const & pColor = pInfo->
mxColorScale;
1686 if (!pColor->IsTransparent())
1696 nPosX += nColWidth * nLayoutSign;
1699 nPosY += nRowHeight;
1705 rRenderContext.
Pop();
1725 *
mpDev, aNewViewInfos );
1741 for(nArrY=1; nArrY+1<
nArrCount; nArrY++)
1749 aDrawingRect.
SetTop( nPosY );
1757 aRegion.
Union(
mpDev->PixelToLogic(aDrawingRect));
1766 aRegion.
Union(
mpDev->PixelToLogic(aDrawingRect));
1783 for (nArrY=1; nArrY+1<
nArrCount; nArrY++)
1791 aDrawingRect.
SetTop( nPosY );
1807 bool bRet = (aPoly.
Count() != 0);
1825 bool bAnyDirty =
false;
1826 bool bAnyChanged =
false;
1831 for (nX=
nX1; nX<=
nX2; nX++)
1844 bAnyChanged = bAnyChanged || pFCell->
IsChanged();
1855 nCol1 = std::min(rPos.
Col(), nCol1);
1856 nCol2 = std::max(rPos.
Col(), nCol2);
1857 nRow1 = std::min(rPos.
Row(), nRow1);
1858 nRow2 = std::max(rPos.
Row(), nRow2);
1865 if (
pData->IsDataValid(aCell, rPos))
1872 if (bAnyDirty || bAnyChanged)
1880 for (nX=
nX1; nX<=
nX2; nX++)
1899 SCSIZE nOverY = nArrY + 1;
1901 pRowInfo[nOverY].cellInfo(nX).bVOverlapped )
1925 if ( nRefStartX == nRefEndX && nRefStartY == nRefEndY )
1928 if ( nRefStartX <= nVisX2 && nRefEndX >=
nVisX1 &&
1929 nRefStartY <= nVisY2 && nRefEndY >=
nVisY1 )
1936 std::swap( nMinX, nMaxX );
1940 bool bBottom =
false;
1942 bool bRight =
false;
1945 bool bNoStartY = (
nY1 < nRefStartY );
1946 bool bNoEndY =
false;
1951 if ( nY==nRefStartY || (nY>nRefStartY && bNoStartY) )
1961 if ( nY>nRefEndY && bNoEndY )
1966 bNoStartY = ( nY < nRefStartY );
1967 bNoEndY = ( nY < nRefEndY );
1977 if ( nX==nRefStartX )
1990 if (bTop && bBottom && bLeft && bRight)
1995 ( nMaxX - nMinX ) /
mnPPTX,
1996 ( nMaxY - nMinY ) /
mnPPTY,
2007 const Color& rColor,
bool bHandle )
2012 if ( nRefStartX == nRefEndX && nRefStartY == nRefEndY )
2015 if ( !(nRefStartX <= nVisX2 && nRefEndX >=
nVisX1 &&
2016 nRefStartY <= nVisY2 && nRefEndY >=
nVisY1) )
2024 std::swap( nMinX, nMaxX );
2028 bool bBottom =
false;
2030 bool bRight =
false;
2033 bool bNoStartY = (
nY1 < nRefStartY );
2034 bool bNoEndY =
false;
2039 if ( nY==nRefStartY || (nY>nRefStartY && bNoStartY) )
2049 if ( nY>nRefEndY && bNoEndY )
2054 bNoStartY = ( nY < nRefStartY );
2055 bNoEndY = ( nY < nRefEndY );
2065 if ( nX==nRefStartX )
2078 if ( nMaxX * nLayoutSign < nMinX * nLayoutSign || nMaxY < nMinY )
2081 mpDev->SetLineColor( rColor );
2084 mpDev->SetFillColor();
2101 mpDev->SetLineColor( rColor );
2102 mpDev->SetFillColor( rColor );
2104 const sal_Int32 aRadius = 4;
2106 sal_Int32 aRectMaxX1 = nMaxX - nLayoutSign * aRadius;
2107 sal_Int32 aRectMaxX2 = nMaxX + nLayoutSign;
2108 sal_Int32 aRectMinX1 = nMinX - nLayoutSign;
2109 sal_Int32 aRectMinX2 = nMinX + nLayoutSign * aRadius;
2111 sal_Int32 aRectMaxY1 = nMaxY - aRadius;
2112 sal_Int32 aRectMaxY2 = nMaxY + 1;
2113 sal_Int32 aRectMinY1 = nMinY - 1;
2114 sal_Int32 aRectMinY2 = nMinY + aRadius;
2117 tools::Rectangle aLowerRight( aRectMaxX1, aRectMaxY1, aRectMaxX2, aRectMaxY2 );
2118 tools::Rectangle aUpperLeft ( aRectMinX1, aRectMinY1, aRectMinX2, aRectMinY2 );
2119 tools::Rectangle aLowerLeft ( aRectMinX1, aRectMaxY1, aRectMinX2, aRectMaxY2 );
2120 tools::Rectangle aUpperRight( aRectMaxX1, aRectMinY1, aRectMaxX2, aRectMinY2 );
2135 if ( nRefStartX == nRefEndX && nRefStartY == nRefEndY )
2138 if ( !(nRefStartX <= nVisX2 + 1 && nRefEndX >=
nVisX1 &&
2139 nRefStartY <= nVisY2 + 1 && nRefEndY >=
nVisY1) )
2147 std::swap( nMinX, nMaxX );
2151 bool bBottom =
false;
2153 bool bRight =
false;
2156 bool bNoStartY = (
nY1 < nRefStartY );
2157 bool bNoEndY =
false;
2162 if ( nY==nRefStartY || (nY>nRefStartY && bNoStartY) )
2172 if ( nY>nRefEndY && bNoEndY )
2177 bNoStartY = ( nY < nRefStartY );
2178 bNoEndY = ( nY < nRefEndY );
2188 if ( nX==nRefStartX )
2190 nMinX = nPosX - nLayoutSign;
2201 if ( nMaxX * nLayoutSign < nMinX * nLayoutSign || nMaxY < nMinY )
2205 bLeft = bRight = bBottom =
false;
2207 bTop = bBottom = bRight =
false;
2209 mpDev->SetLineColor( rColor );
2210 if (bTop && bBottom && bLeft && bRight)
2212 mpDev->SetFillColor();
2229 mpDev->DrawLine(
Point( nMinX+nLayoutSign,nMinY ),
Point( nMinX+nLayoutSign,nMaxY ) );
2234 if ( bLeft && bTop )
2236 mpDev->SetLineColor();
2237 mpDev->SetFillColor( rColor );
2256 if ( nEndX < mpDoc->MaxCol() ) ++nEndX;
2257 if ( nEndY < mpDoc->MaxRow() ) ++nEndY;
2278 aColorChanger.
Update( *pAction );
2281 aRange.
aEnd.
Col(), aRange.
aEnd.
Row(), aColor, sal::static_int_cast<sal_uInt16>(eActionType) );
2287 GetFromRange().aStart.Tab() ==
nTab )
2290 GetFromRange().MakeRange( *
mpDoc );
2294 aColorChanger.
Update( *pAction );
2297 aRange.
aEnd.
Col(), aRange.
aEnd.
Row(), aColor, sal::static_int_cast<sal_uInt16>(eActionType) );
2313 bool bWorksInPixels =
false;
2315 bWorksInPixels =
true;
2319 if (!bWorksInPixels)
2340 bool bIsMerged =
false;
2352 std::shared_ptr<sc::Sparkline> pSparkline;
2361 Point aPoint(nPosX, nPosY);
2362 Size aSize(nWidth, nHeight);
2371 nPosY += pThisRowInfo->
nHeight;
2395 bool bIsMerged =
false;
2425 if ( bIsMerged || pInfo->
bMerged )
2428 SCCOL nNextX = nX + 1;
2429 while ( nNextX <= nX2 + 1 && pThisRowInfo->cellInfo(nNextX).bHOverlapped )
2439 aPoints[0] =
Point(nMarkX, nPosY);
2440 aPoints[0].
setX(
bLayoutRTL ? aPoints[0].
X() + nSize : aPoints[0].
X() - nSize );
2441 aPoints[1] =
Point(nMarkX, nPosY);
2442 aPoints[2] =
Point(nMarkX, nPosY + nSize);
2452 nPosY += pThisRowInfo->
nHeight;
2511 aPoints[0] =
Point(nMarkX, nMarkY);
2512 aPoints[0].
setX(
bLayoutRTL ? aPoints[0].
X() - nSize : aPoints[0].
X() + nSize );
2513 aPoints[1] =
Point(nMarkX, nMarkY);
2514 aPoints[2] =
Point(nMarkX, nMarkY - nSize);
2524 nPosY += pThisRowInfo->
nHeight;
2553 bool bIsMerged =
false;
2573 if ( bIsMerged || pInfo->
bMerged )
2576 SCCOL nNextX = nX + 1;
2577 while ( nNextX <= nX2 + 1 && pThisRowInfo->cellInfo(nNextX).bHOverlapped )
2585 tools::Rectangle aNoteRect( nMarkX, nPosY, nMarkX+nNoteWidth*nLayoutSign, nPosY+nNoteHeight );
2593 OUString aContent = pNote->
GetText();
2594 aContent = aContent.replaceAll(
"\n",
" ");
2597 aNote.
Title = aTitle;
2606 nPosY += pThisRowInfo->
nHeight;
2673 nStartPosX -= nOutWidth - 1;
2696 nStartPosX -= nOutWidth - 1;
2699 Point( nStartPosX+nOutWidth-1, nPosY+nOutHeight-1 ) );
2709 Size aMarkSize( nMarkPixel, (nMarkPixel-1)*2 );
2713 mpDev->SetDrawMode( nOldDrawMode | DrawModeFlags::WhiteLine );
2715 mpDev->SetDrawMode( nOldDrawMode | DrawModeFlags::BlackLine );
2758 nPosY += pThisRowInfo->
nHeight;
2761 mpDev->SetDrawMode(nOldDrawMode);
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 ...
void PutInOrder(T &nStart, T &nEnd)
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
const Size & GetSizePixel() const
sal_uInt32 GetValue() const
bool IsFullyTransparent() const
sal_uInt8 GetAlpha() const
bool IsTransparent() const
void DrawBitmapEx(const Point &rDestPt, const BitmapEx &rBitmapEx)
float GetDPIScaleFactor() const
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
void DrawRect(const tools::Rectangle &rRect)
void DrawLine(const Point &rStartPt, const Point &rEndPt)
void DrawPolygon(const tools::Polygon &rPoly)
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
void DrawGradient(const tools::Rectangle &rRect, const Gradient &rGradient)
void SetDrawMode(DrawModeFlags nDrawMode)
DrawModeFlags GetDrawMode() const
void IntersectClipRegion(const tools::Rectangle &rRect)
void setX(tools::Long nX)
constexpr tools::Long X() const
const ScAppOptions & rOpt
void Update(const ScChangeAction &rAction)
ScActionColorChanger(const ScChangeTrack &rTrack)
const std::set< OUString > & rUsers
sal_uInt16 nLastUserIndex
SC_DLLPUBLIC void Format(OStringBuffer &r, ScRefFlags nFlags, const ScDocument *pDocument=nullptr, const Details &rDetails=detailsOOOa1) const
Color GetTrackMoveColor() const
Color GetTrackInsertColor() const
Color GetTrackContentColor() const
Color GetTrackDeleteColor() const
ScRange MakeRange(const ScDocument &rDoc) const
ScBigRange & GetBigRange()
ScChangeActionType GetType() const
ScChangeAction * GetNext() const
const OUString & GetUser() const
ScChangeAction * GetFirst() const
bool DeleteCirclesAt(SCCOL nCol, SCROW nRow)
SC_DLLPUBLIC sal_uInt16 GetRowHeight(SCROW nRow, SCTAB nTab, bool bHiddenAsZero=true) const
SC_DLLPUBLIC std::shared_ptr< sc::Sparkline > GetSparkline(ScAddress const &rPosition)
Returns sparkline at the address if it exists.
SC_DLLPUBLIC sal_uInt16 GetColWidth(SCCOL nCol, SCTAB nTab, bool bHiddenAsZero=true) const
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 IsTabProtected(SCTAB nTab) const
SC_DLLPUBLIC void InitDrawLayer(SfxObjectShell *pDocShell=nullptr)
bool IsIdleEnabled() const
SC_DLLPUBLIC SCCOL MaxCol() const
SC_DLLPUBLIC const ScValidationData * GetValidationEntry(sal_uInt32 nIndex) const
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
SC_DLLPUBLIC SCROW MaxRow() const
SC_DLLPUBLIC ScPostIt * GetNote(const ScAddress &rPos)
SC_DLLPUBLIC ScBreakType HasRowBreak(SCROW nRow, SCTAB nTab) const
SC_DLLPUBLIC bool EnsureFormulaCellResults(const ScRange &rRange, bool bSkipRunning=false)
Make sure all of the formula cells in the specified range have been fully calculated.
ScChangeViewSettings * GetChangeViewSettings() 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
void EnableIdle(bool bDo)
SfxObjectShell * GetDocumentShell() const
SC_DLLPUBLIC void ExtendOverlapped(SCCOL &rStartCol, SCROW &rStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab) const
SC_DLLPUBLIC OUString GetFormula(SCCOL nCol, SCROW nRow, SCTAB nTab) const
SC_DLLPUBLIC bool ColHidden(SCCOL nCol, SCTAB nTab, SCCOL *pFirstCol=nullptr, SCCOL *pLastCol=nullptr) const
sc::IconSetBitmapMap & GetIconSetBitmapMap()
ScChangeTrack * GetChangeTrack() const
SC_DLLPUBLIC bool IsLayoutRTL(SCTAB nTab) const
SC_DLLPUBLIC const SfxPoolItem * GetAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich) const
SC_DLLPUBLIC const SfxItemSet * GetCondResult(SCCOL nCol, SCROW nRow, SCTAB nTab, ScRefCellValue *pCell=nullptr) const
SC_DLLPUBLIC const ScPatternAttr * GetPattern(SCCOL nCol, SCROW nRow, SCTAB nTab) const
void StripHidden(SCCOL &rX1, SCROW &rY1, SCCOL &rX2, SCROW &rY2, SCTAB nTab)
static SvxBrushItem * GetEmptyBrushItem()
void AddHorLine(bool bWorksInPixels, tools::Long nX1, tools::Long nX2, tools::Long nY, bool bDashed=false)
void AddVerLine(bool bWorksInPixels, tools::Long nX, tools::Long nY1, tools::Long nY2, bool bDashed=false)
SCCOL GetColMerge() const
SCROW GetRowMerge() const
ScOutputData(OutputDevice *pNewDev, ScOutputType eNewType, ScTableInfo &rTabInfo, ScDocument *pNewDoc, SCTAB nNewTab, tools::Long nNewScrX, tools::Long nNewScrY, SCCOL nNewX1, SCROW nNewY1, SCCOL nNewX2, SCROW nNewY2, double nPixelPerTwipsX, double nPixelPerTwipsY, const Fraction *pZoomX=nullptr, const Fraction *pZoomY=nullptr)
void DrawOneChange(SCCOL nRefStartX, SCROW nRefStartY, SCCOL nRefEndX, SCROW nRefEndY, const Color &rColor, sal_uInt16 nType)
ReferenceMark FillReferenceMark(SCCOL nRefStartX, SCROW nRefStartY, SCCOL nRefEndX, SCROW nRefEndY, const Color &rColor)
VclPtr< OutputDevice > mpDev
VclPtr< OutputDevice > mpRefDevice
void SetEditCell(SCCOL nCol, SCROW nRow)
void DrawRotatedFrame(vcl::RenderContext &rRenderContext)
void SetSyntaxMode(bool bNewMode)
void SetMirrorWidth(tools::Long nNew)
VclPtr< OutputDevice > pFmtDevice
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 SetShowSpellErrors(bool bSet)
void DrawNoteMarks(vcl::RenderContext &rRenderContext)
void DrawBackground(vcl::RenderContext &rRenderContext)
void SetGridColor(const Color &rColor)
void SetMarkClipped(bool bSet)
void DrawGrid(vcl::RenderContext &rRenderContext, bool bGrid, bool bPage, bool bMergeCover=false)
void DrawDocumentBackground()
std::optional< Color > mxValueColor
void SetMetaFileMode(bool bNewMode)
vcl::Region GetChangedAreaRegion()
std::optional< Color > mxFormulaColor
const sc::SpellCheckContext * mpSpellCheckCxt
void SetSpellCheckContext(const sc::SpellCheckContext *pCxt)
std::unique_ptr< drawinglayer::processor2d::BaseProcessor2D > CreateProcessor2D()
void SetShowFormulas(bool bSet)
std::optional< Color > mxTextColor
void DrawRefMark(SCCOL nRefStartX, SCROW nRefStartY, SCCOL nRefEndX, SCROW nRefEndY, const Color &rColor, bool bHandle)
Draws reference mark and returns its properties.
void SetPagebreakMode(ScPageBreakData *pPageData)
void SetContentDevice(OutputDevice *pContentDev)
void DrawFormulaMarks(vcl::RenderContext &rRenderContext)
ScPrintRangeData & GetData(size_t i)
Degree100 GetRotateVal(const SfxItemSet *pCondSet) const
ScRotateDir GetRotateDir(const SfxItemSet *pCondSet) const
const SfxPoolItem & GetItem(sal_uInt16 nWhichP) const
Additional class containing cell annotation data.
OUString GetText() const
Returns the caption text of this note.
const ScRange & GetPrintRange() const
static void DeleteInterpretProgress()
static void CreateInterpretProgress(ScDocument *pDoc, bool bWait=true)
bool GetProtection() const
bool Intersects(const ScRange &rRange) const
static bool IsActionShown(const ScChangeAction &rAction, const ScChangeViewSettings &rSettings, ScDocument &rDocument)
const SdrPage * GetPage(sal_uInt16 nPgNum) const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
bool GetHighContrastMode() const
const Color & GetWindowTextColor() const
const Color & GetColor() const
static tools::Polygon DrawArrow(OutputDevice &rOut, const tools::Rectangle &rRect, const Size &rSize, const Color &rCol, bool bLeftOrTop, bool bVertical)
sal_uInt16 GetWidth() const
const Color & GetColor() const
SvxShadowLocation GetLocation() const
Render a provided sparkline into the input rectangle.
void render(std::shared_ptr< sc::Sparkline > const &pSparkline, vcl::RenderContext &rRenderContext, tools::Rectangle const &rRectangle, tools::Long nOneX, tools::Long nOneY, double fScaleX, double fScaleY)
Class shared between grid windows to cache spelling results.
drawinglayer::primitive2d::Primitive2DContainer CreateB2DPrimitiveRange(sal_Int32 nFirstCol, sal_Int32 nFirstRow, sal_Int32 nLastCol, sal_Int32 nLastRow, const Color *pForceColor) const
void SetRowHeight(sal_Int32 nRow, sal_Int32 nHeight)
bool HasCellRotation() const
void SetColWidth(sal_Int32 nCol, sal_Int32 nWidth)
void SetXOffset(sal_Int32 nXOffset)
void SetYOffset(sal_Int32 nYOffset)
sal_Int32 GetColCount() const
void SetClipRange(sal_Int32 nFirstCol, sal_Int32 nFirstRow, sal_Int32 nLastCol, sal_Int32 nLastRow)
void SetCellRotation(sal_Int32 nCol, sal_Int32 nRow, SvxRotateMode eRotMode, double fOrientation)
sal_Int32 GetRowCount() const
void CreateNote(const tools::Rectangle &rRect, const PDFNote &rNote, sal_Int32 nPageNr=-1)
bool GetIsExportNotes() const
void Union(const tools::Rectangle &rRegion)
constexpr ::Color COL_LIGHTRED(0xFF, 0x00, 0x00)
constexpr ::Color COL_GREEN(0x00, 0x80, 0x00)
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_MAGENTA(0x80, 0x00, 0x80)
constexpr ::Color COL_LIGHTMAGENTA(0xFF, 0x00, 0xFF)
constexpr ::Color COL_BROWN(0x80, 0x80, 0x00)
constexpr ::Color COL_RED(0x80, 0x00, 0x00)
constexpr ::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
constexpr ::Color COL_LIGHTBLUE(0x00, 0x00, 0xFF)
constexpr ::Color COL_CYAN(0x00, 0x80, 0x80)
constexpr ::Color COL_BLUE(0x00, 0x00, 0x80)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
const SCCOL SC_ROTMAX_NONE
const sal_uInt8 SC_CLIPMARK_SIZE
#define SAL_INFO_IF(condition, area, stream)
std::unique_ptr< sal_Int32[]> pData
std::unique_ptr< BaseProcessor2D > createProcessor2DFromOutputDevice(OutputDevice &rTargetOutDev, const drawinglayer::geometry::ViewInformation2D &rViewInformation2D)
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
std::map< OUString, BitmapEx > IconSetBitmapMap
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
static const SvxBrushItem * lcl_FindBackground(const ScDocument *pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab)
const Color nAuthorColor[SC_AUTHORCOLORCOUNT]
static bool lcl_EqualBack(const RowInfo &rFirst, const RowInfo &rOther, SCCOL nX1, SCCOL nX2, bool bShowProt, bool bPagebreakMode)
static tools::Long lclGetSnappedY(const OutputDevice &rDev, tools::Long nPosY, bool bSnapPixel)
#define SC_AUTHORCOLORCOUNT
static tools::Long lclGetSnappedX(const OutputDevice &rDev, tools::Long nPosX, bool bSnapPixel)
static ScRotateDir lcl_GetRotateDir(const ScDocument *pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab)
constexpr TypedWhichId< ScMergeFlagAttr > ATTR_MERGE_FLAG(145)
constexpr TypedWhichId< ScMergeAttr > ATTR_MERGE(144)
constexpr TypedWhichId< SvxBrushItem > ATTR_BACKGROUND(148)
constexpr TypedWhichId< SvxRotateModeItem > ATTR_ROTATE_MODE(136)
constexpr TypedWhichId< ScProtectionAttr > ATTR_PROTECTION(149)
constexpr TypedWhichId< SfxUInt32Item > ATTR_VALIDDATA(153)
Describes reference mark to be drawn, position & size in TWIPs.
ScCellInfo & cellInfo(SCCOL nCol)
ScBasicCellInfo & basicCellInfo(SCCOL nCol)
const SvxShadowItem * pVShadowOrigin
const SfxItemSet * pConditionSet
const SvxShadowItem * pHShadowOrigin
ScShadowPart eVShadowPart
std::optional< Color > mxColorScale
const ScPatternAttr * pPatternAttr
ScShadowPart eHShadowPart
const ScDataBarInfo * pDataBar
const SvxBrushItem * pBackground
const ScIconSetInfo * pIconSet
ScIconSetType eIconSetType
This is very similar to ScCellValue, except that it references the original value instead of copying ...
ScFormulaCell * getFormula() const
svx::frame::Array maArray
UNDERLYING_TYPE get() const
SVXCORE_DLLPUBLIC css::uno::Reference< css::drawing::XDrawPage > GetXDrawPageForSdrPage(SdrPage *pPage) noexcept