46 if(&(
a->GetPaintWindow()) == &rPaintWindow)
59 const SdrPaintWindow& rPaintWindow( pPageWindow->GetOriginalPaintWindow() ? *pPageWindow->GetOriginalPaintWindow() : pPageWindow->GetPaintWindow() );
60 if ( &rPaintWindow.GetOutputDevice() == &_rOutDev )
62 return pPageWindow.get();
73 if(&(pPageWindow->GetPaintWindow().GetOutputDevice()) == &rOutDev)
75 return pPageWindow.get();
92 mpPreparedPageWindow(nullptr)
134 [&rPaintWindow](
const std::unique_ptr<SdrPageWindow>& rpWindow) {
135 return &(rpWindow->GetPaintWindow()) == &rPaintWindow;
143 css::uno::Reference< css::awt::XControlContainer > xReturn;
209 for(sal_uInt32
a(0);
a < nCount;
a++)
227 std::unique_ptr<SdrPageWindow> pTempPageWindow;
232 pTempPageWindow.reset(
new SdrPageWindow(*
this, rPaintWindow));
233 pPageWindow = pTempPageWindow.get();
264 pKnownTarget->
RedrawLayer(&nID, pRedirector,
nullptr);
281 bool bUseRect(
false);
296 auto pPreviousWindow = pPreparedTarget->
patchPaintWindow(aTemporaryPaintWindow);
298 const ::comphelper::ScopeGuard aGuard(
299 [&pPreviousWindow, &pPreparedTarget]() { pPreparedTarget->
unpatchPaintWindow(pPreviousWindow); } );
301 pPreparedTarget->
RedrawLayer(&nID, pRedirector, pPageFrame);
305 OSL_FAIL(
"SdrPageView::DrawLayer: Creating temporary SdrPageWindow (ObjectContact), this should never be needed (!)");
310 SdrPageWindow aTemporaryPageWindow(*
this, aTemporaryPaintWindow);
324 aTemporaryPageWindow.
RedrawLayer(&nID, pRedirector,
nullptr);
363 if (nx1==0) { nx1=ny1; nx2=ny2; }
364 if (ny1==0) { ny1=nx1; ny2=nx2; }
379 if (nScreenWdt>=1600)
384 else if (nScreenWdt>=1024)
396 bool bHoriSolid=nx2<aMinDotDist.
Width();
397 bool bVertSolid=ny2<aMinDotDist.Height();
402 while (nx1<aMinLinDist.Width())
407 if (nTgl==1) nx1=nVal0*5;
411 nTgl++;
if (nTgl>=3) nTgl=0;
415 while (ny1<aMinLinDist.Height())
420 if (nTgl==1) ny1=nVal0*5;
429 bool bHoriFine=nx2<nx1;
430 bool bVertFine=ny2<ny1;
431 bool bHoriLines=bHoriSolid || bHoriFine || !bVertFine;
432 bool bVertLines=bVertSolid || bVertFine;
458 sal_uInt16 nGridPaintCnt=1;
459 if (pFrames!=
nullptr) nGridPaintCnt=pFrames->
GetCount();
460 for (sal_uInt16 nGridPaintNum=0; nGridPaintNum<nGridPaintCnt; nGridPaintNum++) {
461 if (pFrames!=
nullptr) {
476 if (x1<rRect.
Left() -nX1Pix) x1=rRect.
Left() -nX1Pix;
477 if (x2>rRect.
Right() +nX1Pix) x2=rRect.
Right() +nX1Pix;
478 if (y1<rRect.
Top() -nY1Pix) y1=rRect.
Top() -nY1Pix;
483 while (xBigOrg>=x1) xBigOrg-=nx1;
484 while (xBigOrg<x1) xBigOrg+=nx1;
486 while (xFinOrg>=x1) xFinOrg-=nx2;
487 while (xFinOrg<x1) xFinOrg+=nx2;
490 while (yBigOrg>=y1) yBigOrg-=ny1;
491 while (yBigOrg<y1) yBigOrg+=ny1;
493 while (yFinOrg>=y1) yFinOrg-=ny2;
494 while (yFinOrg<y1) yFinOrg+=ny2;
496 if( x1 <= x2 && y1 <= y2 )
500 DrawGridFlags nGridFlags = ( bHoriSolid ? DrawGridFlags::HorzLines : DrawGridFlags::Dots );
501 sal_uInt16 nSteps = sal_uInt16(nx1 / nx2);
502 sal_uInt32 nRestPerStepMul1000 = nSteps ? ( ((nx1 * 1000)/ nSteps) - (nx2 * 1000) ) : 0;
503 sal_uInt32 nStepOffset = 0;
504 sal_uInt16 nPointOffset = 0;
506 for(sal_uInt16
a=0;
a<nSteps;
a++)
511 Size( nx1, ny1 ), nGridFlags );
514 nStepOffset += nRestPerStepMul1000;
515 while(nStepOffset >= 1000)
525 DrawGridFlags nGridFlags = ( bVertSolid ? DrawGridFlags::VertLines : DrawGridFlags::Dots );
526 sal_uInt16 nSteps = sal_uInt16(ny1 / ny2);
527 sal_uInt32 nRestPerStepMul1000 = nSteps ? ( ((ny1 * 1000L)/ nSteps) - (ny2 * 1000L) ) : 0;
528 sal_uInt32 nStepOffset = 0;
529 sal_uInt16 nPointOffset = 0;
531 for(sal_uInt16
a=0;
a<nSteps;
a++)
536 Size( nx1, ny1 ), nGridFlags );
539 nStepOffset += nRestPerStepMul1000;
540 while(nStepOffset >= 1000)
577 if (!rName.isEmpty())
583 bRet = rBS.
IsSet(nId);
600 if (
auto pObjGroup = dynamic_cast<const SdrObjGroup*>(pObj))
604 SdrObjList* pObjList = pObjGroup->GetSubList();
643 if (
GetView().IsGridVisible()) {
664 aR.AdjustLeft( -(aSiz.Width()) );
665 aR.AdjustRight(aSiz.Width() );
666 aR.AdjustTop( -(aSiz.Height()) );
667 aR.AdjustBottom(aSiz.Height() );
684 bool bNeedRedraw =
true;
686 switch (rNewHelpLine.
GetKind()) {
732 bool bGlueInvalidate(
GetView().ImpIsGlueVisible());
799 if (
GetView().GetSdrPageView())
832 if (
GetView().GetSdrPageView())
848 while (pGrp!=
nullptr) {
859 while(
nullptr != pGrp &&
void ImpInvalidateHelpLineArea(sal_uInt16 nNum) const
void InsertHelpLine(const SdrHelpLine &rHL)
const SdrPageWindow * FindPatchedPageWindow(const OutputDevice &rOutDev) const
Finds the page window whose PaintWindow belongs to the given output device In opposite to FindPageWin...
sal_Int32 GetHeight() const
for the snap-to-grid in Writer
SdrObjList * pCurrentList
void RemovePaintWindowFromPageView(SdrPaintWindow &rPaintWindow)
void SetApplicationBackgroundColor(Color aBackgroundColor)
void CheckCurrentGroup()
Let's see if the current Group (pCurrentGroup) is still inserted.
constexpr::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
bool IsReadOnly() const
PV represents a RefPage or a SubList of a RefObj, or the Model is ReadOnly.
bool IsMapModeEnabled() const
SdrObject * GetObj(size_t nNum) const
sal_Int32 GetRightBorder() const
css::uno::Reference< css::awt::XControlContainer > const & GetControlContainer(bool _bCreateIfNecessary=true) const
tools::Rectangle GetPageRect() const
size_t GetObjCount() const
void Insert(const SdrHelpLine &rHL)
bool IsLayer(const OUString &rName, const SdrLayerIDSet &rBS) const
void GlueInvalidate() const
const tools::Rectangle & GetUserArea() const
void EnableMapMode(bool bEnable=true)
void SetApplicationDocumentColor(Color aDocumentColor)
const tools::Rectangle & GetPaperRect() const
sal_Int32 GetLowerBorder() const
tools::Rectangle GetBoundRect(const OutputDevice &rOut) const
virtual SdrObjList * GetSubList() const
sal_Int32 GetLeftBorder() const
void CompleteRedraw(SdrPaintWindow &rPaintWindow, const vcl::Region &rReg, sdr::contact::ViewObjectContactRedirector *pRedirector)
void SetRedrawRegion(const vcl::Region &rNew)
SdrPageWindow * FindPageWindow(SdrPaintWindow &rPaintWindow) const
void RedrawLayer(const SdrLayerID *pId, sdr::contact::ViewObjectContactRedirector *pRedirector, basegfx::B2IRectangle const *)
SdrPageWindow * GetPageWindow(sal_uInt32 nIndex) const
void LeaveAllGroup()
Leave all object groups we entered previously.
void SetHelpLines(const SdrHelpLineList &rHLL)
SdrPage * getSdrPageFromSdrObject() const
SdrHelpLineKind GetKind() const
void LeaveOneGroup()
Leave an object group we entered previously.
bool OutputToWindow() const
SdrPageView(SdrPage *pPage1, SdrView &rNewView)
void SetPageOrigin(const Point &rOrg)
constexpr SdrLayerID SDRLAYER_NOTFOUND(0xff)
const Point & GetPos() const
void unpatchPaintWindow(SdrPaintWindow *pPreviousPaintWindow)
sal_uInt32 PaintWindowCount() const
SdrObjList * GetObjList() const
Return current List.
void setPreparedPageWindow(SdrPageWindow *pKnownTarget)
Write access to mpPreparedPageWindow.
virtual const SdrPageGridFrameList * GetGridFrameList(const SdrPageView *pPV, const tools::Rectangle *pRect) const
for snap-to-grid in Writer, also for AlignObjects if 1 object is marked if pRect != null...
void InvalidateAllWin()
Invalidates the Page's whole area.
SdrPaintWindow * patchPaintWindow(SdrPaintWindow &rPaintWindow)
sal_Int32 GetUpperBorder() const
SdrObject * pCurrentGroup
tools::Long Width() const
const Color & GetLineColor() const
void AddPaintWindowToPageView(SdrPaintWindow &rPaintWindow)
bool IsGroupObject() const
const SdrLayerAdmin & GetLayerAdmin() const
changing the layers does not set the modified-flag!
void Intersect(const tools::Rectangle &rRegion)
const vcl::Region & GetRedrawRegion() const
void DeleteHelpLine(sal_uInt16 nNum)
std::vector< std::unique_ptr< SdrPageWindow > > maPageWindows
Size GetOutputSizePixel() const
void RedrawAll(sdr::contact::ViewObjectContactRedirector *pRedirector)
void SetHelpLine(sal_uInt16 nNum, const SdrHelpLine &rNewHelpLine)
void PrepareRedraw(const vcl::Region &rReg)
sal_uInt16 GetCount() const
sal_uInt16 GetCount() const
virtual SdrLayerID GetLayer() const
bool IsMarkProtect() const
Point PixelToLogic(const Point &rDevicePt) const
void DrawPageViewGrid(OutputDevice &rOut, const tools::Rectangle &rRect, Color aColor=COL_BLACK)
bool IsSet(SdrLayerID a) const
sal_uInt16 GetEnteredLevel() const
Determine, how deep we descended (0 = Root(Page))
void SetLayer(const OUString &rName, SdrLayerIDSet &rBS, bool bJa)
SdrPageWindow * mpPreparedPageWindow
SdrPage * GetPage() const
void SetCurrentGroupAndList(SdrObject *pNewGroup, SdrObjList *pNewList)
Set current Group and List.
void AdjustMarkHdl(SfxViewShell *pOtherShell=nullptr)
SdrPaintWindow & GetPaintWindow() const
void DrawGrid(const tools::Rectangle &rRect, const Size &rDist, DrawGridFlags nFlags)
SdrHelpLineList aHelpLines
void DrawLayer(SdrLayerID nID, OutputDevice *pGivenTarget, sdr::contact::ViewObjectContactRedirector *pRedirector=nullptr, const tools::Rectangle &rRect=tools::Rectangle(), basegfx::B2IRectangle const *pPageFrame=nullptr)
tools::Long Height() const
void ModelHasChanged()
Is called by PaintView, when modal changes have finished.
void SetDesignMode(bool _bDesignMode) const
Sets all elements in the view which support a design and an alive mode into the given mode...
void PrePaint()
PrePaint call forwarded from app windows.
SdrObject * getParentSdrObjectFromSdrObject() const
css::uno::Reference< css::awt::XControlContainer > GetControlContainer(const OutputDevice &_rDevice) const
Looks up the control container belonging to given output device.
bool EnterGroup(SdrObject *pObj)
Entering (editing) an object group After that, we have direct access to all member objects of the gro...
bool MarkObj(const Point &rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false)
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
void Delete(sal_uInt16 nPos)
sal_Int32 GetWidth() const
SdrObjList * getParentSdrObjListFromSdrObject() const
SdrLayerID GetLayerID(const OUString &rName) const
OutputDevice & GetOutputDevice() const
SdrPaintWindow * GetPaintWindow(sal_uInt32 nIndex) const
bool IsObjMarkable(SdrObject const *pObj) const
At least one member must be visible for the Group object and it must not be locked.
void SetDesignMode(bool _bDesignMode) const
sets all elements in the view which support a design and an alive mode into the given mode ...
SdrObject * GetCurrentGroup() const
Return current Group.
sal_uInt32 PageWindowCount() const