[Libreoffice-commits] core.git: framework/source include/vcl sfx2/source svx/source vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Apr 20 17:45:39 UTC 2020
framework/source/uielement/statusbarmanager.cxx | 2 -
include/vcl/event.hxx | 7 +---
sfx2/source/statbar/stbitem.cxx | 15 +--------
svx/source/tbxctrls/tbcontrl.cxx | 39 ------------------------
vcl/source/control/imp_listbox.cxx | 8 +---
5 files changed, 7 insertions(+), 64 deletions(-)
New commits:
commit d7a271c08fe072b35cf759aef417bbe23ffc96b4
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Apr 17 20:52:03 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Apr 20 19:45:04 2020 +0200
effectively unused mnStyle member
Change-Id: Ieb579c9440810a937c7da0f9dd8e3b79a2e0e5b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92490
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx
index 9827e2e60bab..dff80ece225c 100644
--- a/framework/source/uielement/statusbarmanager.cxx
+++ b/framework/source/uielement/statusbarmanager.cxx
@@ -545,7 +545,7 @@ void StatusBarManager::UserDraw( const UserDrawEvent& rUDEvt )
rUDEvt.GetRect().GetWidth(),
rUDEvt.GetRect().GetHeight() );
aGuard.clear();
- xController->paint( xGraphics, aRect, rUDEvt.GetStyle() );
+ xController->paint(xGraphics, aRect, 0);
}
}
diff --git a/include/vcl/event.hxx b/include/vcl/event.hxx
index a4b9df4b0a7b..94705020e4c2 100644
--- a/include/vcl/event.hxx
+++ b/include/vcl/event.hxx
@@ -226,26 +226,23 @@ private:
tools::Rectangle maOutRect;
sal_uInt16 mnItemId;
- sal_uInt16 mnStyle;
public:
UserDrawEvent(vcl::Window* pWindow, vcl::RenderContext* pRenderContext,
- const tools::Rectangle& rOutRect, sal_uInt16 nId, sal_uInt16 nStyle = 0);
+ const tools::Rectangle& rOutRect, sal_uInt16 nId);
vcl::Window* GetWindow() const { return mpWindow; }
vcl::RenderContext* GetRenderContext() const { return mpRenderContext; }
const tools::Rectangle& GetRect() const { return maOutRect; }
sal_uInt16 GetItemId() const { return mnItemId; }
- sal_uInt16 GetStyle() const { return mnStyle; }
};
inline UserDrawEvent::UserDrawEvent(vcl::Window* pWindow, vcl::RenderContext* pRenderContext,
- const tools::Rectangle& rOutRect, sal_uInt16 nId, sal_uInt16 nStyle)
+ const tools::Rectangle& rOutRect, sal_uInt16 nId)
: mpWindow(pWindow)
, mpRenderContext(pRenderContext)
, maOutRect( rOutRect )
, mnItemId(nId)
- , mnStyle(nStyle)
{
}
diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx
index 70e8248b579d..5695bfb296ee 100644
--- a/sfx2/source/statbar/stbitem.cxx
+++ b/sfx2/source/statbar/stbitem.cxx
@@ -285,9 +285,7 @@ void SAL_CALL SfxStatusBarControl::statusChanged( const frame::FeatureStateEvent
}
}
-
// XStatusbarController
-
sal_Bool SAL_CALL SfxStatusBarControl::mouseButtonDown(
const awt::MouseEvent& rMouseEvent )
{
@@ -303,7 +301,6 @@ sal_Bool SAL_CALL SfxStatusBarControl::mouseButtonDown(
return MouseButtonDown( aMouseEvent );
}
-
sal_Bool SAL_CALL SfxStatusBarControl::mouseMove(
const awt::MouseEvent& rMouseEvent )
{
@@ -318,7 +315,6 @@ sal_Bool SAL_CALL SfxStatusBarControl::mouseMove(
return MouseMove( aMouseEvent );
}
-
sal_Bool SAL_CALL SfxStatusBarControl::mouseButtonUp(
const ::awt::MouseEvent& rMouseEvent )
{
@@ -333,7 +329,6 @@ sal_Bool SAL_CALL SfxStatusBarControl::mouseButtonUp(
return MouseButtonUp( aMouseEvent );
}
-
void SAL_CALL SfxStatusBarControl::command(
const awt::Point& rPos,
::sal_Int32 nCommand,
@@ -347,11 +342,10 @@ void SAL_CALL SfxStatusBarControl::command(
Command( aCmdEvent );
}
-
void SAL_CALL SfxStatusBarControl::paint(
const uno::Reference< awt::XGraphics >& xGraphics,
const awt::Rectangle& rOutputRectangle,
- ::sal_Int32 nStyle )
+ ::sal_Int32 /*nStyle*/ )
{
SolarMutexGuard aGuard;
@@ -359,27 +353,22 @@ void SAL_CALL SfxStatusBarControl::paint(
if ( pOutDev )
{
::tools::Rectangle aRect = VCLRectangle( rOutputRectangle );
- UserDrawEvent aUserDrawEvent(nullptr, pOutDev, aRect, pBar->GetCurItemId(), static_cast<sal_uInt16>(nStyle));
+ UserDrawEvent aUserDrawEvent(nullptr, pOutDev, aRect, pBar->GetCurItemId());
Paint( aUserDrawEvent );
}
}
-
void SAL_CALL SfxStatusBarControl::click( const awt::Point& )
{
SolarMutexGuard aGuard;
Click();
}
-
void SAL_CALL SfxStatusBarControl::doubleClick( const awt::Point& )
{
}
-
// old sfx2 interface
-
-
void SfxStatusBarControl::StateChanged
(
sal_uInt16 nSID,
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index b4ab549709ba..17a956579d88 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -223,7 +223,6 @@ public:
void Fill( const FontList* pList )
{ FontNameBox::Fill( pList );
nFtCount = pList->GetFontNameCount(); }
- virtual void UserDraw( const UserDrawEvent& rUDEvt ) override;
virtual bool PreNotify( NotifyEvent& rNEvt ) override;
virtual bool EventNotify( NotifyEvent& rNEvt ) override;
virtual Reference< css::accessibility::XAccessible > CreateAccessible() override;
@@ -1501,44 +1500,6 @@ void SvxFontNameBox_Impl::EnableControls_Impl()
EnableWYSIWYG( bEnable );
}
-void SvxFontNameBox_Impl::UserDraw( const UserDrawEvent& rUDEvt )
-{
- FontNameBox::UserDraw( rUDEvt );
-
- // Hack - GetStyle now contains the currently
- // selected item in the list box
- // ItemId contains the id of the current item to draw
- // or select
- if ( rUDEvt.GetItemId() == rUDEvt.GetStyle() )
- {
- OUString fontName(GetText());
- if (IsInDropDown())
- {
- /*
- * when in dropdown mode the selected item should be
- * used and not the current selection
- */
- fontName = GetEntry(rUDEvt.GetItemId());
- }
- Sequence< PropertyValue > aArgs( 1 );
- FontMetric aFontMetric( pFontList->Get( fontName,
- aCurFont.GetWeight(),
- aCurFont.GetItalic() ) );
-
- SvxFontItem aFontItem( aFontMetric.GetFamilyType(),
- aFontMetric.GetFamilyName(),
- aFontMetric.GetStyleName(),
- aFontMetric.GetPitch(),
- aFontMetric.GetCharSet(),
- SID_ATTR_CHAR_FONT );
- aFontItem.QueryValue( aArgs[0].Value );
- aArgs[0].Name = "CharPreviewFontName";
- SfxToolBoxControl::Dispatch( m_xDispatchProvider,
- ".uno:CharPreviewFontName",
- aArgs );
- }
-}
-
void SvxFontNameBox_Impl::Select()
{
FontNameBox::Select();
diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx
index 1c866149eabc..a2a3a1615275 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -1737,12 +1737,8 @@ void ImplListBoxWindow::ImplPaint(vcl::RenderContext& rRenderContext, sal_Int32
if (nPos < GetEntryList()->GetMRUCount())
nPos = GetEntryList()->FindEntry(GetEntryList()->GetEntryText(nPos));
nPos = nPos - GetEntryList()->GetMRUCount();
- sal_Int32 nCurr = mnCurrentPos;
- if (mnCurrentPos < GetEntryList()->GetMRUCount())
- nCurr = GetEntryList()->FindEntry(GetEntryList()->GetEntryText(nCurr));
- nCurr = sal::static_int_cast<sal_Int32>(nCurr - GetEntryList()->GetMRUCount());
- UserDrawEvent aUDEvt(this, &rRenderContext, aRect, nPos, nCurr);
+ UserDrawEvent aUDEvt(this, &rRenderContext, aRect, nPos);
maUserDrawHdl.Call( &aUDEvt );
mbInUserDraw = false;
}
@@ -2753,7 +2749,7 @@ void ImplWin::ImplDraw(vcl::RenderContext& rRenderContext, bool bLayout)
if ( IsUserDrawEnabled() )
{
- UserDrawEvent aUDEvt(this, &rRenderContext, maFocusRect, mnItemPos, 0);
+ UserDrawEvent aUDEvt(this, &rRenderContext, maFocusRect, mnItemPos);
maUserDrawHdl.Call( &aUDEvt );
}
else
More information about the Libreoffice-commits
mailing list