[Libreoffice-commits] core.git: include/svtools include/vcl svtools/source vcl/inc vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Feb 26 10:56:05 UTC 2021
include/svtools/ruler.hxx | 3 +--
include/vcl/headbar.hxx | 3 +--
svtools/source/control/ruler.cxx | 16 ++++++++--------
vcl/inc/calendar.hxx | 3 +--
vcl/source/control/calendar.cxx | 10 +++++-----
vcl/source/treelist/headbar.cxx | 8 ++++----
6 files changed, 20 insertions(+), 23 deletions(-)
New commits:
commit cf828ae14324eca743c7a51f79ffe22238d1fe8f
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Feb 25 15:43:33 2021 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Feb 26 11:55:20 2021 +0100
rename one ImplHitTest so using window::ImplHitTest can be dropped
Change-Id: I8a77654d4c6629ee76d57fc26bb022c69dab0b9a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111559
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx
index 27d52b220635..8acc70aa14c1 100644
--- a/include/svtools/ruler.hxx
+++ b/include/svtools/ruler.hxx
@@ -688,8 +688,7 @@ private:
virtual void ApplySettings(vcl::RenderContext& rRenderContext) override;
- using Window::ImplHitTest;
- SVT_DLLPRIVATE bool ImplHitTest( const Point& rPosition,
+ SVT_DLLPRIVATE bool ImplDoHitTest( const Point& rPosition,
RulerSelection* pHitTest,
bool bRequiredStyle = false,
RulerIndentStyle nRequiredStyle = RulerIndentStyle::Top ) const;
diff --git a/include/vcl/headbar.hxx b/include/vcl/headbar.hxx
index 3a19e9d73365..0cb75d275a33 100644
--- a/include/vcl/headbar.hxx
+++ b/include/vcl/headbar.hxx
@@ -235,8 +235,7 @@ private:
VCL_DLLPRIVATE void ImplInitSettings( bool bFont, bool bForeground, bool bBackground );
VCL_DLLPRIVATE tools::Long ImplGetItemPos( sal_uInt16 nPos ) const;
VCL_DLLPRIVATE tools::Rectangle ImplGetItemRect( sal_uInt16 nPos ) const;
- using Window::ImplHitTest;
- VCL_DLLPRIVATE sal_uInt16 ImplHitTest( const Point& rPos, tools::Long& nMouseOff, sal_uInt16& nPos ) const;
+ VCL_DLLPRIVATE sal_uInt16 ImplDoHitTest( const Point& rPos, tools::Long& nMouseOff, sal_uInt16& nPos ) const;
VCL_DLLPRIVATE void ImplInvertDrag( sal_uInt16 nStartPos, sal_uInt16 nEndPos );
VCL_DLLPRIVATE void ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, bool bHigh,
const tools::Rectangle& rItemRect, const tools::Rectangle* pRect);
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index 7b1aa9549e8b..1f4a5d4eafac 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -1412,7 +1412,7 @@ void Ruler::ImplUpdate( bool bMustCalc )
}
}
-bool Ruler::ImplHitTest( const Point& rPos, RulerSelection* pHitTest,
+bool Ruler::ImplDoHitTest( const Point& rPos, RulerSelection* pHitTest,
bool bRequireStyle, RulerIndentStyle nRequiredStyle ) const
{
sal_Int32 i;
@@ -1728,7 +1728,7 @@ bool Ruler::ImplDocHitTest( const Point& rPos, RulerType eDragType,
else
aPos.setX( RULER_OFF + 1 );
- if ( ImplHitTest( aPos, pHitTest, bRequiredStyle, nRequiredStyle ) )
+ if ( ImplDoHitTest( aPos, pHitTest, bRequiredStyle, nRequiredStyle ) )
{
if ( (pHitTest->eType == eDragType) || (eDragType == RulerType::DontKnow) )
return true;
@@ -1744,7 +1744,7 @@ bool Ruler::ImplDocHitTest( const Point& rPos, RulerType eDragType,
else
aPos.setX( mnWidth - RULER_OFF - 1 );
- if ( ImplHitTest( aPos, pHitTest, bRequiredStyle, nRequiredStyle ) )
+ if ( ImplDoHitTest( aPos, pHitTest, bRequiredStyle, nRequiredStyle ) )
{
if ( (pHitTest->eType == eDragType) || (eDragType == RulerType::DontKnow) )
return true;
@@ -1759,7 +1759,7 @@ bool Ruler::ImplDocHitTest( const Point& rPos, RulerType eDragType,
else
aPos.setX( RULER_OFF + (mnVirHeight / 2) );
- if ( ImplHitTest( aPos, pHitTest ) )
+ if ( ImplDoHitTest( aPos, pHitTest ) )
{
if ( (pHitTest->eType == eDragType) || (eDragType == RulerType::DontKnow) )
return true;
@@ -1935,7 +1935,7 @@ void Ruler::MouseButtonDown( const MouseEvent& rMEvt )
else
{
std::unique_ptr<RulerSelection> pHitTest(new RulerSelection);
- bool bHitTestResult = ImplHitTest(aMousePos, pHitTest.get());
+ bool bHitTestResult = ImplDoHitTest(aMousePos, pHitTest.get());
if ( nMouseClicks == 1 )
{
@@ -1953,7 +1953,7 @@ void Ruler::MouseButtonDown( const MouseEvent& rMEvt )
mnDragPos = 0;
// call HitTest again as a click, for example, could set a new tab
- if ( ImplHitTest(aMousePos, pHitTest.get()) )
+ if ( ImplDoHitTest(aMousePos, pHitTest.get()) )
ImplStartDrag(pHitTest.get(), nMouseModifier);
}
}
@@ -1986,7 +1986,7 @@ void Ruler::MouseMove( const MouseEvent& rMEvt )
maHoverSelection.eType = RulerType::DontKnow;
- if (ImplHitTest( rMEvt.GetPosPixel(), mxCurrentHitTest.get() ))
+ if (ImplDoHitTest( rMEvt.GetPosPixel(), mxCurrentHitTest.get() ))
{
maHoverSelection = *mxCurrentHitTest;
@@ -2319,7 +2319,7 @@ RulerType Ruler::GetRulerType( const Point& rPos, sal_uInt16* pAryPos )
Invalidate(InvalidateFlags::NoErase);
}
- (void)ImplHitTest(rPos, &aHitTest);
+ (void)ImplDoHitTest(rPos, &aHitTest);
// return values
if ( pAryPos )
diff --git a/vcl/inc/calendar.hxx b/vcl/inc/calendar.hxx
index fe49ec69b0d0..8948220cce0a 100644
--- a/vcl/inc/calendar.hxx
+++ b/vcl/inc/calendar.hxx
@@ -166,8 +166,7 @@ class Calendar final : public Control
virtual void ApplySettings(vcl::RenderContext& rRenderContext) override;
void ImplFormat();
- using Window::ImplHitTest;
- sal_uInt16 ImplHitTest( const Point& rPos, Date& rDate ) const;
+ sal_uInt16 ImplDoHitTest( const Point& rPos, Date& rDate ) const;
void ImplDrawSpin(vcl::RenderContext& rRenderContext);
void ImplDrawDate(vcl::RenderContext& rRenderContext, tools::Long nX, tools::Long nY,
sal_uInt16 nDay, sal_uInt16 nMonth, sal_Int16 nYear,
diff --git a/vcl/source/control/calendar.cxx b/vcl/source/control/calendar.cxx
index efcfc0c63800..7b8f9a061eb8 100644
--- a/vcl/source/control/calendar.cxx
+++ b/vcl/source/control/calendar.cxx
@@ -326,7 +326,7 @@ void Calendar::ImplFormat()
mbFormat = false;
}
-sal_uInt16 Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const
+sal_uInt16 Calendar::ImplDoHitTest( const Point& rPos, Date& rDate ) const
{
if ( mbFormat )
return 0;
@@ -928,7 +928,7 @@ void Calendar::ImplShowMenu( const Point& rPos, const Date& rDate )
void Calendar::ImplTracking( const Point& rPos, bool bRepeat )
{
Date aTempDate = maCurDate;
- sal_uInt16 nHitTest = ImplHitTest( rPos, aTempDate );
+ sal_uInt16 nHitTest = ImplDoHitTest( rPos, aTempDate );
if ( mbSpinDown )
{
@@ -1006,7 +1006,7 @@ void Calendar::MouseButtonDown( const MouseEvent& rMEvt )
if ( rMEvt.IsLeft() && !mbMenuDown )
{
Date aTempDate = maCurDate;
- sal_uInt16 nHitTest = ImplHitTest( rMEvt.GetPosPixel(), aTempDate );
+ sal_uInt16 nHitTest = ImplDoHitTest( rMEvt.GetPosPixel(), aTempDate );
if ( nHitTest )
{
if ( nHitTest & CALENDAR_HITTEST_MONTHTITLE )
@@ -1200,7 +1200,7 @@ void Calendar::Command( const CommandEvent& rCEvt )
if ( rCEvt.IsMouseEvent() )
{
Date aTempDate = maCurDate;
- sal_uInt16 nHitTest = ImplHitTest( rCEvt.GetMousePosPixel(), aTempDate );
+ sal_uInt16 nHitTest = ImplDoHitTest( rCEvt.GetMousePosPixel(), aTempDate );
if ( nHitTest & CALENDAR_HITTEST_MONTHTITLE )
{
ImplShowMenu( rCEvt.GetMousePosPixel(), aTempDate );
@@ -1369,7 +1369,7 @@ sal_uInt16 Calendar::GetMonthCount() const
bool Calendar::GetDate( const Point& rPos, Date& rDate ) const
{
Date aDate = maCurDate;
- sal_uInt16 nHitTest = ImplHitTest( rPos, aDate );
+ sal_uInt16 nHitTest = ImplDoHitTest( rPos, aDate );
if ( nHitTest & CALENDAR_HITTEST_DAY )
{
rDate = aDate;
diff --git a/vcl/source/treelist/headbar.cxx b/vcl/source/treelist/headbar.cxx
index 2f75257f5625..882015e02a84 100644
--- a/vcl/source/treelist/headbar.cxx
+++ b/vcl/source/treelist/headbar.cxx
@@ -160,7 +160,7 @@ tools::Rectangle HeaderBar::ImplGetItemRect( sal_uInt16 nPos ) const
return aRect;
}
-sal_uInt16 HeaderBar::ImplHitTest( const Point& rPos,
+sal_uInt16 HeaderBar::ImplDoHitTest( const Point& rPos,
tools::Long& nMouseOff, sal_uInt16& nPos ) const
{
size_t nCount = static_cast<sal_uInt16>(mvItemList.size());
@@ -600,7 +600,7 @@ void HeaderBar::ImplUpdate(sal_uInt16 nPos, bool bEnd)
void HeaderBar::ImplStartDrag( const Point& rMousePos, bool bCommand )
{
sal_uInt16 nPos;
- sal_uInt16 nHitTest = ImplHitTest( rMousePos, mnMouseOff, nPos );
+ sal_uInt16 nHitTest = ImplDoHitTest( rMousePos, mnMouseOff, nPos );
if ( !nHitTest )
return;
@@ -807,7 +807,7 @@ void HeaderBar::MouseButtonDown( const MouseEvent& rMEvt )
{
tools::Long nTemp;
sal_uInt16 nPos;
- sal_uInt16 nHitTest = ImplHitTest( rMEvt.GetPosPixel(), nTemp, nPos );
+ sal_uInt16 nHitTest = ImplDoHitTest( rMEvt.GetPosPixel(), nTemp, nPos );
if ( nHitTest )
{
auto& pItem = mvItemList[ nPos ];
@@ -830,7 +830,7 @@ void HeaderBar::MouseMove( const MouseEvent& rMEvt )
tools::Long nTemp1;
sal_uInt16 nTemp2;
PointerStyle eStyle = PointerStyle::Arrow;
- sal_uInt16 nHitTest = ImplHitTest( rMEvt.GetPosPixel(), nTemp1, nTemp2 );
+ sal_uInt16 nHitTest = ImplDoHitTest( rMEvt.GetPosPixel(), nTemp1, nTemp2 );
if ( nHitTest & HEAD_HITTEST_DIVIDER )
eStyle = PointerStyle::HSizeBar;
More information about the Libreoffice-commits
mailing list