summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/control/combobox.cxx10
-rw-r--r--vcl/source/control/imp_listbox.cxx12
-rw-r--r--vcl/source/control/scrbar.cxx69
-rw-r--r--vcl/source/edit/textview.cxx6
-rw-r--r--vcl/source/filter/ixbm/xbmread.cxx15
-rw-r--r--vcl/source/gdi/salgdilayout.cxx6
-rw-r--r--vcl/source/gdi/sallayout.cxx4
-rw-r--r--vcl/source/gdi/salnativewidgets-none.cxx2
-rw-r--r--vcl/source/glyphs/graphite_layout.cxx7
-rw-r--r--vcl/source/outdev/nativecontrols.cxx6
-rw-r--r--vcl/source/window/brdwin.cxx135
-rw-r--r--vcl/source/window/popupmenuwindow.cxx4
-rw-r--r--vcl/source/window/seleng.cxx5
-rw-r--r--vcl/source/window/window.cxx21
14 files changed, 126 insertions, 176 deletions
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 9c5aa7c62bd0..4eceb395eb8c 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -355,18 +355,18 @@ IMPL_LINK_TYPED(ComboBox::Impl, ImplAutocompleteHdl, Edit&, rEdit, void)
if (!m_isMatchCase)
{
// Try match case insensitive from current position
- nPos = m_pImplLB->GetEntryList()->FindMatchingEntry(aStartText, nStart);
+ nPos = m_pImplLB->GetEntryList()->FindMatchingEntry(aStartText, nStart, true);
if ( nPos == LISTBOX_ENTRY_NOTFOUND )
// Try match case insensitive, but from start
- nPos = m_pImplLB->GetEntryList()->FindMatchingEntry(aStartText);
+ nPos = m_pImplLB->GetEntryList()->FindMatchingEntry(aStartText, 0, true);
}
if ( nPos == LISTBOX_ENTRY_NOTFOUND )
// Try match full from current position
- nPos = m_pImplLB->GetEntryList()->FindMatchingEntry(aStartText, nStart, true, false);
+ nPos = m_pImplLB->GetEntryList()->FindMatchingEntry(aStartText, nStart, false);
if ( nPos == LISTBOX_ENTRY_NOTFOUND )
// Match full, but from start
- nPos = m_pImplLB->GetEntryList()->FindMatchingEntry(aStartText, 0, true, false);
+ nPos = m_pImplLB->GetEntryList()->FindMatchingEntry(aStartText, 0, false);
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
@@ -870,7 +870,7 @@ void ComboBox::Impl::ImplUpdateFloatSelection()
nSelect = m_pImplLB->GetEntryList()->FindEntry( aSearchStr );
if ( nSelect == LISTBOX_ENTRY_NOTFOUND )
{
- nSelect = m_pImplLB->GetEntryList()->FindMatchingEntry( aSearchStr );
+ nSelect = m_pImplLB->GetEntryList()->FindMatchingEntry( aSearchStr, 0, true );
bSelect = false;
}
diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx
index 02103dfe5a11..304494e98068 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -241,19 +241,14 @@ sal_Int32 ImplEntryList::FindEntry( const OUString& rString, bool bSearchMRUArea
return LISTBOX_ENTRY_NOTFOUND;
}
-sal_Int32 ImplEntryList::FindMatchingEntry( const OUString& rStr, sal_Int32 nStart, bool bForward, bool bLazy ) const
+sal_Int32 ImplEntryList::FindMatchingEntry( const OUString& rStr, sal_Int32 nStart, bool bLazy ) const
{
sal_Int32 nPos = LISTBOX_ENTRY_NOTFOUND;
sal_Int32 nEntryCount = GetEntryCount();
- if ( !bForward )
- nStart++; // decrements right away
const vcl::I18nHelper& rI18nHelper = mpWindow->GetSettings().GetLocaleI18nHelper();
- for ( sal_Int32 n = nStart; bForward ? n < nEntryCount : n != 0; )
+ for ( sal_Int32 n = nStart; n < nEntryCount; )
{
- if ( !bForward )
- n--;
-
ImplEntryType* pImplEntry = GetEntry( n );
bool bMatch;
if ( bLazy )
@@ -270,8 +265,7 @@ sal_Int32 ImplEntryList::FindMatchingEntry( const OUString& rStr, sal_Int32 nSta
break;
}
- if ( bForward )
- n++;
+ n++;
}
return nPos;
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index 5ac987e5dd8b..79f8c6bdef31 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -30,16 +30,16 @@
/* #i77549#
HACK: for scrollbars in case of thumb rect, page up and page down rect we
- abuse the HitTestNativeControl interface. All theming engines but OS X
+ abuse the HitTestNativeScrollbar interface. All theming engines but OS X
are actually able to draw the thumb according to our internal representation.
However OS X draws a little outside. The canonical way would be to enhance the
- HitTestNativeControl passing a ScrollbarValue additionally so all necessary
+ HitTestNativeScrollbar passing a ScrollbarValue additionally so all necessary
information is available in the call.
.
However since there is only this one small exception we will deviate a little and
instead pass the respective rect as control region to allow for a small correction.
- So all places using HitTestNativeControl on ControlPart::ThumbHorz, ControlPart::ThumbVert,
+ So all places using HitTestNativeScrollbar on ControlPart::ThumbHorz, ControlPart::ThumbVert,
ControlPart::TrackHorzLeft, ControlPart::TrackHorzRight, ControlPart::TrackVertUpper, ControlPart::TrackVertLower
do not use the control rectangle as region but the actuall part rectangle, making
only small deviations feasible.
@@ -53,9 +53,6 @@
#define SCRBAR_DRAW_PAGE2 ((sal_uInt16)0x0008)
#define SCRBAR_DRAW_THUMB ((sal_uInt16)0x0010)
#define SCRBAR_DRAW_BACKGROUND ((sal_uInt16)0x0020)
-#define SCRBAR_DRAW_ALL (SCRBAR_DRAW_BTN1 | SCRBAR_DRAW_BTN2 | \
- SCRBAR_DRAW_PAGE1 | SCRBAR_DRAW_PAGE2 |\
- SCRBAR_DRAW_THUMB | SCRBAR_DRAW_BACKGROUND )
#define SCRBAR_STATE_BTN1_DOWN ((sal_uInt16)0x0001)
#define SCRBAR_STATE_BTN1_DISABLE ((sal_uInt16)0x0002)
@@ -428,7 +425,7 @@ void ScrollBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& /* rSiz
maPage1Rect+=aPos;
maPage2Rect+=aPos;
- ImplDraw(*pDev, SCRBAR_DRAW_ALL);
+ ImplDraw(*pDev);
pDev->Pop();
mbCalcSize = true;
@@ -607,7 +604,7 @@ bool ScrollBar::ImplDrawNative(vcl::RenderContext& rRenderContext, sal_uInt16 nD
return bNativeOK;
}
-void ScrollBar::ImplDraw(vcl::RenderContext& rRenderContext, sal_uInt16 nDrawFlags)
+void ScrollBar::ImplDraw(vcl::RenderContext& rRenderContext)
{
DecorationView aDecoView(&rRenderContext);
Rectangle aTempRect;
@@ -625,13 +622,13 @@ void ScrollBar::ImplDraw(vcl::RenderContext& rRenderContext, sal_uInt16 nDrawFla
// pWin = static_cast<vcl::Window*>(&rRenderContext);
// Draw the entire control if the native theme engine needs it
- if (nDrawFlags && rRenderContext.IsNativeControlSupported(ControlType::Scrollbar, ControlPart::DrawBackgroundHorz))
+ if (rRenderContext.IsNativeControlSupported(ControlType::Scrollbar, ControlPart::DrawBackgroundHorz))
{
ImplDrawNative(rRenderContext, SCRBAR_DRAW_BACKGROUND);
return;
}
- if ((nDrawFlags & SCRBAR_DRAW_BTN1) && (!ImplDrawNative(rRenderContext, SCRBAR_DRAW_BTN1)))
+ if (!ImplDrawNative(rRenderContext, SCRBAR_DRAW_BTN1))
{
nStyle = DrawButtonFlags::NoLightBorder;
if (mnStateFlags & SCRBAR_STATE_BTN1_DOWN)
@@ -648,7 +645,7 @@ void ScrollBar::ImplDraw(vcl::RenderContext& rRenderContext, sal_uInt16 nDrawFla
aDecoView.DrawSymbol(aTempRect, eSymbolType, rStyleSettings.GetButtonTextColor(), nSymbolStyle);
}
- if ((nDrawFlags & SCRBAR_DRAW_BTN2) && (!ImplDrawNative(rRenderContext, SCRBAR_DRAW_BTN2)))
+ if (!ImplDrawNative(rRenderContext, SCRBAR_DRAW_BTN2))
{
nStyle = DrawButtonFlags::NoLightBorder;
if (mnStateFlags & SCRBAR_STATE_BTN2_DOWN)
@@ -667,7 +664,7 @@ void ScrollBar::ImplDraw(vcl::RenderContext& rRenderContext, sal_uInt16 nDrawFla
rRenderContext.SetLineColor();
- if ((nDrawFlags & SCRBAR_DRAW_THUMB) && (!ImplDrawNative(rRenderContext, SCRBAR_DRAW_THUMB)))
+ if (!ImplDrawNative(rRenderContext, SCRBAR_DRAW_THUMB))
{
if (!maThumbRect.IsEmpty())
{
@@ -684,7 +681,7 @@ void ScrollBar::ImplDraw(vcl::RenderContext& rRenderContext, sal_uInt16 nDrawFla
}
}
- if ((nDrawFlags & SCRBAR_DRAW_PAGE1) && (!ImplDrawNative(rRenderContext, SCRBAR_DRAW_PAGE1)))
+ if (!ImplDrawNative(rRenderContext, SCRBAR_DRAW_PAGE1))
{
if (mnStateFlags & SCRBAR_STATE_PAGE1_DOWN)
rRenderContext.SetFillColor(rStyleSettings.GetShadowColor());
@@ -692,7 +689,7 @@ void ScrollBar::ImplDraw(vcl::RenderContext& rRenderContext, sal_uInt16 nDrawFla
rRenderContext.SetFillColor(rStyleSettings.GetCheckedColor());
rRenderContext.DrawRect(PixelToLogic(maPage1Rect));
}
- if ((nDrawFlags & SCRBAR_DRAW_PAGE2) && (!ImplDrawNative(rRenderContext, SCRBAR_DRAW_PAGE2)))
+ if (!ImplDrawNative(rRenderContext, SCRBAR_DRAW_PAGE2))
{
if (mnStateFlags & SCRBAR_STATE_PAGE2_DOWN)
rRenderContext.SetFillColor(rStyleSettings.GetShadowColor());
@@ -759,7 +756,7 @@ void ScrollBar::ImplDoMouseAction( const Point& rMousePos, bool bCallAction )
switch ( meScrollType )
{
case ScrollType::LineUp:
- if ( HitTestNativeControl( ControlType::Scrollbar, bHorizontal? (IsRTLEnabled()? ControlPart::ButtonRight: ControlPart::ButtonLeft): ControlPart::ButtonUp,
+ if ( HitTestNativeScrollbar( bHorizontal? (IsRTLEnabled()? ControlPart::ButtonRight: ControlPart::ButtonLeft): ControlPart::ButtonUp,
aControlRegion, rMousePos, bIsInside )?
bIsInside:
maBtn1Rect.IsInside( rMousePos ) )
@@ -772,7 +769,7 @@ void ScrollBar::ImplDoMouseAction( const Point& rMousePos, bool bCallAction )
break;
case ScrollType::LineDown:
- if ( HitTestNativeControl( ControlType::Scrollbar, bHorizontal? (IsRTLEnabled()? ControlPart::ButtonLeft: ControlPart::ButtonRight): ControlPart::ButtonDown,
+ if ( HitTestNativeScrollbar( bHorizontal? (IsRTLEnabled()? ControlPart::ButtonLeft: ControlPart::ButtonRight): ControlPart::ButtonDown,
aControlRegion, rMousePos, bIsInside )?
bIsInside:
maBtn2Rect.IsInside( rMousePos ) )
@@ -785,8 +782,8 @@ void ScrollBar::ImplDoMouseAction( const Point& rMousePos, bool bCallAction )
break;
case ScrollType::PageUp:
- // HitTestNativeControl, see remark at top of file
- if ( HitTestNativeControl( ControlType::Scrollbar, bHorizontal? ControlPart::TrackHorzLeft: ControlPart::TrackVertUpper,
+ // HitTestNativeScrollbar, see remark at top of file
+ if ( HitTestNativeScrollbar( bHorizontal? ControlPart::TrackHorzLeft: ControlPart::TrackVertUpper,
maPage1Rect, rMousePos, bIsInside )?
bIsInside:
maPage1Rect.IsInside( rMousePos ) )
@@ -799,8 +796,8 @@ void ScrollBar::ImplDoMouseAction( const Point& rMousePos, bool bCallAction )
break;
case ScrollType::PageDown:
- // HitTestNativeControl, see remark at top of file
- if ( HitTestNativeControl( ControlType::Scrollbar, bHorizontal? ControlPart::TrackHorzRight: ControlPart::TrackVertLower,
+ // HitTestNativeScrollbar, see remark at top of file
+ if ( HitTestNativeScrollbar( bHorizontal? ControlPart::TrackHorzRight: ControlPart::TrackVertLower,
maPage2Rect, rMousePos, bIsInside )?
bIsInside:
maPage2Rect.IsInside( rMousePos ) )
@@ -845,7 +842,7 @@ void ScrollBar::ImplDragThumb( const Point& rMousePos )
// When dragging in windows the repaint request gets starved so dragging
// the scrollbar feels slower than it actually is. Let's force an immediate
// repaint of the scrollbar.
- ImplDraw(*this, SCRBAR_DRAW_ALL);
+ ImplDraw(*this);
mnDelta = mnThumbPos-nOldPos;
Scroll();
@@ -884,7 +881,7 @@ void ScrollBar::MouseButtonDown( const MouseEvent& rMEvt )
Point aPoint( 0, 0 );
Rectangle aControlRegion( aPoint, GetOutputSizePixel() );
- if ( HitTestNativeControl( ControlType::Scrollbar, bHorizontal? (IsRTLEnabled()? ControlPart::ButtonRight: ControlPart::ButtonLeft): ControlPart::ButtonUp,
+ if ( HitTestNativeScrollbar( bHorizontal? (IsRTLEnabled()? ControlPart::ButtonRight: ControlPart::ButtonLeft): ControlPart::ButtonUp,
aControlRegion, rMousePos, bIsInside )?
bIsInside:
maBtn1Rect.IsInside( rMousePos ) )
@@ -896,7 +893,7 @@ void ScrollBar::MouseButtonDown( const MouseEvent& rMEvt )
mnDragDraw = SCRBAR_DRAW_BTN1;
}
}
- else if ( HitTestNativeControl( ControlType::Scrollbar, bHorizontal? (IsRTLEnabled()? ControlPart::ButtonLeft: ControlPart::ButtonRight): ControlPart::ButtonDown,
+ else if ( HitTestNativeScrollbar( bHorizontal? (IsRTLEnabled()? ControlPart::ButtonLeft: ControlPart::ButtonRight): ControlPart::ButtonDown,
aControlRegion, rMousePos, bIsInside )?
bIsInside:
maBtn2Rect.IsInside( rMousePos ) )
@@ -910,7 +907,7 @@ void ScrollBar::MouseButtonDown( const MouseEvent& rMEvt )
}
else
{
- bool bThumbHit = HitTestNativeControl( ControlType::Scrollbar, bHorizontal? ControlPart::ThumbHorz : ControlPart::ThumbVert,
+ bool bThumbHit = HitTestNativeScrollbar( bHorizontal? ControlPart::ThumbHorz : ControlPart::ThumbVert,
maThumbRect, rMousePos, bIsInside )
? bIsInside : maThumbRect.IsInside( rMousePos );
@@ -956,14 +953,14 @@ void ScrollBar::MouseButtonDown( const MouseEvent& rMEvt )
Invalidate();
}
}
- else if(bPage && (!HitTestNativeControl( ControlType::Scrollbar, bHorizontal? ControlPart::TrackHorzArea : ControlPart::TrackVertArea,
+ else if(bPage && (!HitTestNativeScrollbar( bHorizontal? ControlPart::TrackHorzArea : ControlPart::TrackVertArea,
aControlRegion, rMousePos, bIsInside ) ||
bIsInside) )
{
nTrackFlags = StartTrackingFlags::ButtonRepeat;
- // HitTestNativeControl, see remark at top of file
- if ( HitTestNativeControl( ControlType::Scrollbar, bHorizontal? ControlPart::TrackHorzLeft : ControlPart::TrackVertUpper,
+ // HitTestNativeScrollbar, see remark at top of file
+ if ( HitTestNativeScrollbar( bHorizontal? ControlPart::TrackHorzLeft : ControlPart::TrackVertUpper,
maPage1Rect, rMousePos, bIsInside )?
bIsInside:
maPage1Rect.IsInside( rMousePos ) )
@@ -1117,7 +1114,7 @@ void ScrollBar::ApplySettings(vcl::RenderContext& rRenderContext)
void ScrollBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
{
- ImplDraw(rRenderContext, SCRBAR_DRAW_ALL);
+ ImplDraw(rRenderContext);
}
void ScrollBar::Resize()
@@ -1237,30 +1234,30 @@ Rectangle* ScrollBar::ImplFindPartRect( const Point& rPt )
Point aPoint( 0, 0 );
Rectangle aControlRegion( aPoint, GetOutputSizePixel() );
- if( HitTestNativeControl( ControlType::Scrollbar, bHorizontal? (IsRTLEnabled()? ControlPart::ButtonRight: ControlPart::ButtonLeft): ControlPart::ButtonUp,
+ if( HitTestNativeScrollbar( bHorizontal? (IsRTLEnabled()? ControlPart::ButtonRight: ControlPart::ButtonLeft): ControlPart::ButtonUp,
aControlRegion, rPt, bIsInside )?
bIsInside:
maBtn1Rect.IsInside( rPt ) )
return &maBtn1Rect;
- else if( HitTestNativeControl( ControlType::Scrollbar, bHorizontal? (IsRTLEnabled()? ControlPart::ButtonLeft: ControlPart::ButtonRight): ControlPart::ButtonDown,
+ else if( HitTestNativeScrollbar( bHorizontal? (IsRTLEnabled()? ControlPart::ButtonLeft: ControlPart::ButtonRight): ControlPart::ButtonDown,
aControlRegion, rPt, bIsInside )?
bIsInside:
maBtn2Rect.IsInside( rPt ) )
return &maBtn2Rect;
- // HitTestNativeControl, see remark at top of file
- else if( HitTestNativeControl( ControlType::Scrollbar, bHorizontal ? ControlPart::TrackHorzLeft : ControlPart::TrackVertUpper,
+ // HitTestNativeScrollbar, see remark at top of file
+ else if( HitTestNativeScrollbar( bHorizontal ? ControlPart::TrackHorzLeft : ControlPart::TrackVertUpper,
maPage1Rect, rPt, bIsInside)?
bIsInside:
maPage1Rect.IsInside( rPt ) )
return &maPage1Rect;
- // HitTestNativeControl, see remark at top of file
- else if( HitTestNativeControl( ControlType::Scrollbar, bHorizontal ? ControlPart::TrackHorzRight : ControlPart::TrackVertLower,
+ // HitTestNativeScrollbar, see remark at top of file
+ else if( HitTestNativeScrollbar( bHorizontal ? ControlPart::TrackHorzRight : ControlPart::TrackVertLower,
maPage2Rect, rPt, bIsInside)?
bIsInside:
maPage2Rect.IsInside( rPt ) )
return &maPage2Rect;
- // HitTestNativeControl, see remark at top of file
- else if( HitTestNativeControl( ControlType::Scrollbar, bHorizontal ? ControlPart::ThumbHorz : ControlPart::ThumbVert,
+ // HitTestNativeScrollbar, see remark at top of file
+ else if( HitTestNativeScrollbar( bHorizontal ? ControlPart::ThumbHorz : ControlPart::ThumbVert,
maThumbRect, rPt, bIsInside)?
bIsInside:
maThumbRect.IsInside( rPt ) )
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index 99f83fc0edf0..790077b4b086 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -292,7 +292,7 @@ void TextView::DeleteSelected()
ShowCursor();
}
-void TextView::ImpPaint(vcl::RenderContext& rRenderContext, const Point& rStartPos, Rectangle const* pPaintArea, TextSelection const* pPaintRange, TextSelection const* pSelection)
+void TextView::ImpPaint(vcl::RenderContext& rRenderContext, const Point& rStartPos, Rectangle const* pPaintArea, TextSelection const* pSelection)
{
if (!mpImpl->mbPaintSelection)
{
@@ -314,7 +314,7 @@ void TextView::ImpPaint(vcl::RenderContext& rRenderContext, const Point& rStartP
}
}
- mpImpl->mpTextEngine->ImpPaint(&rRenderContext, rStartPos, pPaintArea, pPaintRange, pSelection);
+ mpImpl->mpTextEngine->ImpPaint(&rRenderContext, rStartPos, pPaintArea, nullptr, pSelection);
}
void TextView::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
@@ -332,7 +332,7 @@ void TextView::ImpPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRe
pDrawSelection = &mpImpl->maSelection;
Point aStartPos = ImpGetOutputStartPos(mpImpl->maStartDocPos);
- ImpPaint(rRenderContext, aStartPos, &rRect, nullptr, pDrawSelection);
+ ImpPaint(rRenderContext, aStartPos, &rRect, pDrawSelection);
if (mpImpl->mbHighlightSelection)
ImpHighlight(mpImpl->maSelection);
}
diff --git a/vcl/source/filter/ixbm/xbmread.cxx b/vcl/source/filter/ixbm/xbmread.cxx
index 50ecf8caedd2..d83e94202c73 100644
--- a/vcl/source/filter/ixbm/xbmread.cxx
+++ b/vcl/source/filter/ixbm/xbmread.cxx
@@ -48,8 +48,7 @@ class XBMReader : public GraphicReader
bool bStatus;
void InitTable();
- OString FindTokenLine( SvStream* pInStm, const char* pTok1,
- const char* pTok2, const char* pTok3 = nullptr );
+ OString FindTokenLine( SvStream* pInStm, const char* pTok1, const char* pTok2 );
long ParseDefine( const sal_Char* pDefine );
bool ParseData( SvStream* pInStm, const OString& aLastLine, XBMFormat eFormat );
@@ -119,10 +118,10 @@ void XBMReader::InitTable()
}
OString XBMReader::FindTokenLine( SvStream* pInStm, const char* pTok1,
- const char* pTok2, const char* pTok3 )
+ const char* pTok2 )
{
OString aRet;
- sal_Int32 nPos1, nPos2, nPos3;
+ sal_Int32 nPos1, nPos2;
bStatus = false;
@@ -145,14 +144,6 @@ OString XBMReader::FindTokenLine( SvStream* pInStm, const char* pTok1,
( nPos2 > nPos1 ) )
{
bStatus = true;
-
- if( pTok3 )
- {
- bStatus = false;
-
- if( ( ( nPos3 = aRet.indexOf( pTok3 ) ) != -1 ) && ( nPos3 > nPos2 ) )
- bStatus = true;
- }
}
}
}
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index 3c9e6a0e38af..4d0746fd2107 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -612,7 +612,7 @@ bool SalGraphics::DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pP
return drawEPS( nX, nY, nWidth, nHeight, pPtr, nSize );
}
-bool SalGraphics::HitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+bool SalGraphics::HitTestNativeScrollbar( ControlPart nPart, const Rectangle& rControlRegion,
const Point& aPos, bool& rIsInside, const OutputDevice *pOutDev )
{
if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && pOutDev->IsRTLEnabled()) )
@@ -621,10 +621,10 @@ bool SalGraphics::HitTestNativeControl( ControlType nType, ControlPart nPart, co
Rectangle rgn( rControlRegion );
mirror( pt.X(), pOutDev );
mirror( rgn, pOutDev );
- return hitTestNativeControl( nType, nPart, rgn, pt, rIsInside );
+ return hitTestNativeControl( ControlType::Scrollbar, nPart, rgn, pt, rIsInside );
}
else
- return hitTestNativeControl( nType, nPart, rControlRegion, aPos, rIsInside );
+ return hitTestNativeControl( ControlType::Scrollbar, nPart, rControlRegion, aPos, rIsInside );
}
void SalGraphics::mirror( ImplControlValue& rVal, const OutputDevice* pOutDev ) const
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 2227def1b8e6..8aaefbfdb4ee 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -1433,13 +1433,13 @@ void GenericSalLayout::SortGlyphItems()
}
}
-MultiSalLayout::MultiSalLayout( SalLayout& rBaseLayout, const PhysicalFontFace* pBaseFont )
+MultiSalLayout::MultiSalLayout( SalLayout& rBaseLayout )
: SalLayout()
, mnLevel( 1 )
, mbIncomplete( false )
{
//maFallbackRuns[0].Clear();
- mpFallbackFonts[ 0 ] = pBaseFont;
+ mpFallbackFonts[ 0 ] = nullptr;
mpLayouts[ 0 ] = &rBaseLayout;
mnUnitsPerPixel = rBaseLayout.GetUnitsPerPixel();
}
diff --git a/vcl/source/gdi/salnativewidgets-none.cxx b/vcl/source/gdi/salnativewidgets-none.cxx
index baa2cb398930..99e8882c9a5f 100644
--- a/vcl/source/gdi/salnativewidgets-none.cxx
+++ b/vcl/source/gdi/salnativewidgets-none.cxx
@@ -35,7 +35,7 @@ bool SalGraphics::IsNativeControlSupported( ControlType, ControlPart )
}
/*
- * HitTestNativeControl()
+ * HitTestNativeScrollbar()
*
* If the return value is true, bIsInside contains information whether
* aPos was or was not inside the native widget specified by the
diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx
index f1eb4618d368..188ee727d82f 100644
--- a/vcl/source/glyphs/graphite_layout.cxx
+++ b/vcl/source/glyphs/graphite_layout.cxx
@@ -362,14 +362,13 @@ GraphiteLayout::append(gr_segment *pSeg, ImplLayoutArgs &rArgs,
// An implementation of the SalLayout interface to enable Graphite enabled fonts to be used.
-GraphiteLayout::GraphiteLayout(const gr_face * face, gr_font * font,
- const grutils::GrFeatureParser * pFeatures) throw()
+GraphiteLayout::GraphiteLayout(const gr_face * face) throw()
: mpFace(face)
- , mpFont(font)
+ , mpFont(nullptr)
, mnSegCharOffset(0)
, mnWidth(0)
, mfScaling(1.0)
- , mpFeatures(pFeatures)
+ , mpFeatures(nullptr)
{
}
diff --git a/vcl/source/outdev/nativecontrols.cxx b/vcl/source/outdev/nativecontrols.cxx
index 947e5cc177f2..01bcb85f78a3 100644
--- a/vcl/source/outdev/nativecontrols.cxx
+++ b/vcl/source/outdev/nativecontrols.cxx
@@ -168,7 +168,7 @@ bool OutputDevice::IsNativeControlSupported( ControlType nType, ControlPart nPar
return( mpGraphics->IsNativeControlSupported(nType, nPart) );
}
-bool OutputDevice::HitTestNativeControl( ControlType nType,
+bool OutputDevice::HitTestNativeScrollbar(
ControlPart nPart,
const Rectangle& rControlRegion,
const Point& aPos,
@@ -185,8 +185,8 @@ bool OutputDevice::HitTestNativeControl( ControlType nType,
Rectangle screenRegion( rControlRegion );
screenRegion.Move( aWinOffs.X(), aWinOffs.Y());
- return( mpGraphics->HitTestNativeControl(nType, nPart, screenRegion, Point( aPos.X() + mnOutOffX, aPos.Y() + mnOutOffY ),
- rIsInside, this ) );
+ return mpGraphics->HitTestNativeScrollbar( nPart, screenRegion, Point( aPos.X() + mnOutOffX, aPos.Y() + mnOutOffY ),
+ rIsInside, this );
}
static std::shared_ptr< ImplControlValue > TransformControlValue( const ImplControlValue& rVal, const OutputDevice& rDev )
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index a17f085140be..842fe831cf65 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -432,7 +432,7 @@ long ImplNoBorderWindowView::CalcTitleWidth() const
return 0;
}
-void ImplNoBorderWindowView::DrawWindow(vcl::RenderContext&, BorderWindowDraw, const Point*)
+void ImplNoBorderWindowView::DrawWindow(vcl::RenderContext&, const Point*)
{
}
@@ -626,7 +626,7 @@ long ImplSmallBorderWindowView::CalcTitleWidth() const
return 0;
}
-void ImplSmallBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, BorderWindowDraw nDrawFlags, const Point*)
+void ImplSmallBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, const Point*)
{
WindowBorderStyle nBorderStyle = mpBorderWindow->GetBorderStyle();
if (nBorderStyle & WindowBorderStyle::NOBORDER)
@@ -759,30 +759,27 @@ void ImplSmallBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, B
if (bNativeOK)
return;
- if (nDrawFlags & BorderWindowDraw::Frame)
- {
- DrawFrameStyle nStyle = DrawFrameStyle::NONE;
- DrawFrameFlags nFlags = DrawFrameFlags::NONE;
- // move border outside if border was converted or if the border window is a frame window,
- if (mpBorderWindow->mbSmallOutBorder)
- nStyle = DrawFrameStyle::DoubleOut;
- else if (nBorderStyle & WindowBorderStyle::NWF)
- nStyle = DrawFrameStyle::NWF;
- else
- nStyle = DrawFrameStyle::DoubleIn;
- if (nBorderStyle & WindowBorderStyle::MONO)
- nFlags |= DrawFrameFlags::Mono;
- if (nBorderStyle & WindowBorderStyle::MENU)
- nFlags |= DrawFrameFlags::Menu;
- // tell DrawFrame that we're drawing a window border of a frame window to avoid round corners
- if (mpBorderWindow == mpBorderWindow->ImplGetFrameWindow())
- nFlags |= DrawFrameFlags::WindowBorder;
-
- DecorationView aDecoView(&rRenderContext);
- Point aTmpPoint;
- Rectangle aInRect(aTmpPoint, Size(mnWidth, mnHeight));
- aDecoView.DrawFrame(aInRect, nStyle, nFlags);
- }
+ DrawFrameStyle nStyle = DrawFrameStyle::NONE;
+ DrawFrameFlags nFlags = DrawFrameFlags::NONE;
+ // move border outside if border was converted or if the border window is a frame window,
+ if (mpBorderWindow->mbSmallOutBorder)
+ nStyle = DrawFrameStyle::DoubleOut;
+ else if (nBorderStyle & WindowBorderStyle::NWF)
+ nStyle = DrawFrameStyle::NWF;
+ else
+ nStyle = DrawFrameStyle::DoubleIn;
+ if (nBorderStyle & WindowBorderStyle::MONO)
+ nFlags |= DrawFrameFlags::Mono;
+ if (nBorderStyle & WindowBorderStyle::MENU)
+ nFlags |= DrawFrameFlags::Menu;
+ // tell DrawFrame that we're drawing a window border of a frame window to avoid round corners
+ if (mpBorderWindow == mpBorderWindow->ImplGetFrameWindow())
+ nFlags |= DrawFrameFlags::WindowBorder;
+
+ DecorationView aDecoView(&rRenderContext);
+ Point aTmpPoint;
+ Rectangle aInRect(aTmpPoint, Size(mnWidth, mnHeight));
+ aDecoView.DrawFrame(aInRect, nStyle, nFlags);
}
@@ -1527,7 +1524,7 @@ long ImplStdBorderWindowView::CalcTitleWidth() const
return ImplCalcTitleWidth( &maFrameData );
}
-void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, BorderWindowDraw nDrawFlags, const Point* pOffset)
+void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, const Point* pOffset)
{
ImplBorderFrameData* pData = &maFrameData;
ImplBorderWindow* pBorderWindow = pData->mpBorderWindow;
@@ -1541,47 +1538,42 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, Bor
aFrameColor.DecreaseContrast(sal_uInt8(0.5 * 255));
// Draw Frame
- if (nDrawFlags & BorderWindowDraw::Frame)
- {
- vcl::Region oldClipRgn(rRenderContext.GetClipRegion());
+ vcl::Region oldClipRgn(rRenderContext.GetClipRegion());
- // for popups, don't draw part of the frame
- if (pData->mnTitleType == BorderWindowTitleType::Popup)
+ // for popups, don't draw part of the frame
+ if (pData->mnTitleType == BorderWindowTitleType::Popup)
+ {
+ FloatingWindow* pWin = dynamic_cast<FloatingWindow*>(pData->mpBorderWindow->GetWindow(GetWindowType::Client));
+ if (pWin)
{
- FloatingWindow* pWin = dynamic_cast<FloatingWindow*>(pData->mpBorderWindow->GetWindow(GetWindowType::Client));
- if (pWin)
+ vcl::Region aClipRgn(aInRect);
+ Rectangle aItemClipRect(pWin->ImplGetItemEdgeClipRect());
+ if (!aItemClipRect.IsEmpty())
{
- vcl::Region aClipRgn(aInRect);
- Rectangle aItemClipRect(pWin->ImplGetItemEdgeClipRect());
- if (!aItemClipRect.IsEmpty())
- {
- aItemClipRect.SetPos(pData->mpBorderWindow->AbsoluteScreenToOutputPixel(aItemClipRect.TopLeft()));
- aClipRgn.Exclude(aItemClipRect);
- rRenderContext.SetClipRegion(aClipRgn);
- }
+ aItemClipRect.SetPos(pData->mpBorderWindow->AbsoluteScreenToOutputPixel(aItemClipRect.TopLeft()));
+ aClipRgn.Exclude(aItemClipRect);
+ rRenderContext.SetClipRegion(aClipRgn);
}
}
-
- // single line frame
- rRenderContext.SetLineColor(aFrameColor);
- rRenderContext.SetFillColor();
- rRenderContext.DrawRect(aInRect);
- ++aInRect.Left();
- --aInRect.Right();
- ++aInRect.Top();
- --aInRect.Bottom();
-
- // restore
- if (pData->mnTitleType == BorderWindowTitleType::Popup)
- rRenderContext.SetClipRegion(oldClipRgn);
}
- else
- aInRect = aDecoView.DrawFrame(aInRect, DrawFrameStyle::DoubleOut, DrawFrameFlags::NoDraw);
+
+ // single line frame
+ rRenderContext.SetLineColor(aFrameColor);
+ rRenderContext.SetFillColor();
+ rRenderContext.DrawRect(aInRect);
+ ++aInRect.Left();
+ --aInRect.Right();
+ ++aInRect.Top();
+ --aInRect.Bottom();
+
+ // restore
+ if (pData->mnTitleType == BorderWindowTitleType::Popup)
+ rRenderContext.SetClipRegion(oldClipRgn);
// Draw Border
rRenderContext.SetLineColor();
long nBorderSize = pData->mnBorderSize;
- if ((nDrawFlags & BorderWindowDraw::Border) && nBorderSize)
+ if (nBorderSize)
{
rRenderContext.SetFillColor(rStyleSettings.GetFaceColor());
rRenderContext.DrawRect(Rectangle(Point(aInRect.Left(), aInRect.Top()),
@@ -1595,7 +1587,7 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, Bor
}
// Draw Title
- if ((nDrawFlags & BorderWindowDraw::Title) && !pData->maTitleRect.IsEmpty())
+ if (!pData->maTitleRect.IsEmpty())
{
aInRect = pData->maTitleRect;
@@ -1646,40 +1638,35 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, Bor
}
}
- if (((nDrawFlags & BorderWindowDraw::Close) || (nDrawFlags & BorderWindowDraw::Title))
- && !pData->maCloseRect.IsEmpty())
+ if (!pData->maCloseRect.IsEmpty())
{
Rectangle aSymbolRect(pData->maCloseRect);
if (pOffset)
aSymbolRect.Move(pOffset->X(), pOffset->Y());
ImplDrawBrdWinSymbolButton(&rRenderContext, aSymbolRect, SymbolType::CLOSE, pData->mnCloseState);
}
- if (((nDrawFlags & BorderWindowDraw::Dock) || (nDrawFlags & BorderWindowDraw::Title))
- && !pData->maDockRect.IsEmpty())
+ if (!pData->maDockRect.IsEmpty())
{
Rectangle aSymbolRect(pData->maDockRect);
if (pOffset)
aSymbolRect.Move(pOffset->X(), pOffset->Y());
ImplDrawBrdWinSymbolButton(&rRenderContext, aSymbolRect, SymbolType::DOCK, pData->mnDockState);
}
- if (((nDrawFlags & BorderWindowDraw::Menu) || (nDrawFlags & BorderWindowDraw::Title))
- && !pData->maMenuRect.IsEmpty())
+ if (!pData->maMenuRect.IsEmpty())
{
Rectangle aSymbolRect(pData->maMenuRect);
if (pOffset)
aSymbolRect.Move(pOffset->X(), pOffset->Y());
ImplDrawBrdWinSymbolButton(&rRenderContext, aSymbolRect, SymbolType::MENU, pData->mnMenuState);
}
- if (((nDrawFlags & BorderWindowDraw::Hide) || (nDrawFlags & BorderWindowDraw::Title))
- && !pData->maHideRect.IsEmpty())
+ if (!pData->maHideRect.IsEmpty())
{
Rectangle aSymbolRect(pData->maHideRect);
if (pOffset)
aSymbolRect.Move(pOffset->X(), pOffset->Y());
ImplDrawBrdWinSymbolButton(&rRenderContext, aSymbolRect, SymbolType::HIDE, pData->mnHideState);
}
- if (((nDrawFlags & BorderWindowDraw::Roll) || (nDrawFlags & BorderWindowDraw::Title))
- && !pData->maRollRect.IsEmpty())
+ if (!pData->maRollRect.IsEmpty())
{
SymbolType eType;
if (pBorderWindow->mbRollUp)
@@ -1692,16 +1679,14 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, Bor
ImplDrawBrdWinSymbolButton(&rRenderContext, aSymbolRect, eType, pData->mnRollState);
}
- if (((nDrawFlags & BorderWindowDraw::Help) || (nDrawFlags & BorderWindowDraw::Title))
- && !pData->maHelpRect.IsEmpty())
+ if (!pData->maHelpRect.IsEmpty())
{
Rectangle aSymbolRect(pData->maHelpRect);
if (pOffset)
aSymbolRect.Move(pOffset->X(), pOffset->Y());
ImplDrawBrdWinSymbolButton(&rRenderContext, aSymbolRect, SymbolType::HELP, pData->mnHelpState);
}
- if (((nDrawFlags & BorderWindowDraw::Pin) || (nDrawFlags & BorderWindowDraw::Title))
- && !pData->maPinRect.IsEmpty())
+ if (!pData->maPinRect.IsEmpty())
{
Image aImage;
ImplGetPinImage(pData->mnPinState, pBorderWindow->mbPinned, aImage);
@@ -1857,13 +1842,13 @@ void ImplBorderWindow::Tracking( const TrackingEvent& rTEvt )
void ImplBorderWindow::Paint( vcl::RenderContext& rRenderContext, const Rectangle& )
{
if (mpBorderView)
- mpBorderView->DrawWindow(rRenderContext, BorderWindowDraw::All);
+ mpBorderView->DrawWindow(rRenderContext);
}
void ImplBorderWindow::Draw( const Rectangle&, OutputDevice* pOutDev, const Point& rPos )
{
if (mpBorderView)
- mpBorderView->DrawWindow(*pOutDev, BorderWindowDraw::All, &rPos);
+ mpBorderView->DrawWindow(*pOutDev, &rPos);
}
void ImplBorderWindow::Activate()
diff --git a/vcl/source/window/popupmenuwindow.cxx b/vcl/source/window/popupmenuwindow.cxx
index e9388732ae6c..310d7550b202 100644
--- a/vcl/source/window/popupmenuwindow.cxx
+++ b/vcl/source/window/popupmenuwindow.cxx
@@ -38,8 +38,8 @@ PopupMenuFloatingWindow::ImplData::~ImplData()
{
}
-PopupMenuFloatingWindow::PopupMenuFloatingWindow( vcl::Window* pParent, WinBits nStyle ) :
- FloatingWindow(pParent, nStyle),
+PopupMenuFloatingWindow::PopupMenuFloatingWindow( vcl::Window* pParent ) :
+ FloatingWindow(pParent, WB_SYSTEMFLOATWIN | WB_SYSTEMWINDOW | WB_NOBORDER ),
mpImplData(new ImplData)
{
}
diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx
index 05899554205d..b9f09fc30088 100644
--- a/vcl/source/window/seleng.cxx
+++ b/vcl/source/window/seleng.cxx
@@ -33,10 +33,9 @@ inline bool SelectionEngine::ShouldDeselect( bool bModifierKey1 ) const
// TODO: throw out FunctionSet::SelectAtPoint
-SelectionEngine::SelectionEngine( vcl::Window* pWindow, FunctionSet* pFuncSet,
- sal_uLong nAutoRepeatInterval ) :
+SelectionEngine::SelectionEngine( vcl::Window* pWindow, FunctionSet* pFuncSet ) :
pWin( pWindow ),
- nUpdateInterval( nAutoRepeatInterval )
+ nUpdateInterval( SELENG_AUTOREPEAT_INTERVAL )
{
eSelMode = SelectionMode::Single;
pFunctionSet = pFuncSet;
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index ac14dd2c4f09..2e1b9d527101 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -3293,17 +3293,10 @@ void Window::RecordLayoutData( vcl::ControlLayoutData* pLayout, const Rectangle&
mpOutDevData->mpRecordLayout = nullptr;
}
-void Window::DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, bool bChecked, bool bDrawBorder )
-{
- DrawSelectionBackground( rRect, highlight, bChecked, bDrawBorder, nullptr, nullptr );
-}
-
void Window::DrawSelectionBackground( const Rectangle& rRect,
sal_uInt16 highlight,
bool bChecked,
- bool bDrawBorder,
- Color* pSelectionTextColor,
- Color* pPaintColor
+ bool bDrawBorder
)
{
if( rRect.IsEmpty() )
@@ -3312,7 +3305,7 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
const StyleSettings& rStyles = GetSettings().GetStyleSettings();
// colors used for item highlighting
- Color aSelectionBorderCol( pPaintColor ? *pPaintColor : rStyles.GetHighlightColor() );
+ Color aSelectionBorderCol( rStyles.GetHighlightColor() );
Color aSelectionFillCol( aSelectionBorderCol );
bool bDark = rStyles.GetFaceColor().IsDark();
@@ -3321,7 +3314,7 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
int c1 = aSelectionBorderCol.GetLuminance();
int c2 = GetDisplayBackground().GetColor().GetLuminance();
- if( !bDark && !bBright && abs( c2-c1 ) < (pPaintColor ? 40 : 75) )
+ if( !bDark && !bBright && abs( c2-c1 ) < 75 )
{
// constrast too low
sal_uInt16 h,s,b;
@@ -3396,14 +3389,6 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
}
SetFillColor( aSelectionFillCol );
- if( pSelectionTextColor )
- {
- Color aTextColor = IsControlBackground() ? GetControlForeground() : rStyles.GetButtonTextColor();
- Color aHLTextColor = rStyles.GetHighlightTextColor();
- int nTextDiff = abs(aSelectionFillCol.GetLuminance() - aTextColor.GetLuminance());
- int nHLDiff = abs(aSelectionFillCol.GetLuminance() - aHLTextColor.GetLuminance());
- *pSelectionTextColor = (nHLDiff >= nTextDiff) ? aHLTextColor : aTextColor;
- }
if( bDark )
{