tdf#74702 vcl: extract GetSyncCount()
Change-Id: Ie624f0d57aea4d72c69f6cd73508d129e53721d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94722
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index e9822fc..fb58781 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -455,6 +455,8 @@
std::vector< VCLXGraphics* > *GetUnoGraphicsList() const { return mpUnoGraphicsList; }
std::vector< VCLXGraphics* > *CreateUnoGraphicsList();
virtual size_t GetSyncCount() const { return 0xffffffff; }
protected:
/** Acquire a graphics device that the output device uses to draw on.
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 5bef729..30bac38 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -773,6 +773,7 @@
Color GetBackgroundColor() const override;
size_t GetSyncCount() const override { return 0x000000ff; }
virtual void EnableRTL ( bool bEnable = true ) override;
virtual void MouseMove( const MouseEvent& rMEvt );
virtual void MouseButtonDown( const MouseEvent& rMEvt );
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 6b99db3..7a4d234 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -349,7 +349,7 @@
{
MetaAction* pAction = GetCurAction();
const size_t nObjCount = m_aList.size();
size_t nSyncCount = ( pOut->GetOutDevType() == OUTDEV_WINDOW ) ? 0x000000ff : 0xffffffff;
size_t nSyncCount = pOut->GetSyncCount();
if( nPos > nObjCount )
nPos = nObjCount;