[Libreoffice-commits] core.git: cui/source include/sfx2 include/svtools include/tools include/vcl rsc/inc rsc/source sdext/source svtools/source vcl/source
Noel Grandin
noel.grandin at collabora.co.uk
Fri Nov 4 07:14:30 UTC 2016
cui/source/options/optopencl.cxx | 6 --
cui/source/options/optopencl.hxx | 2
include/sfx2/styfitem.hxx | 1
include/svtools/framestatuslistener.hxx | 1
include/tools/rc.hxx | 4 -
include/vcl/event.hxx | 54 ----------------------
include/vcl/window.hxx | 3 -
rsc/inc/rscclass.hxx | 2
rsc/inc/rscdb.hxx | 6 --
rsc/source/parser/rscdb.cxx | 38 ---------------
rsc/source/res/rscclass.cxx | 24 ---------
sdext/source/presenter/PresenterSlideShowView.hxx | 8 ---
svtools/source/uno/framestatuslistener.cxx | 36 --------------
vcl/source/outdev/map.cxx | 54 ----------------------
vcl/source/window/mouseevent.cxx | 30 ------------
vcl/source/window/winproc.cxx | 12 ++--
16 files changed, 7 insertions(+), 274 deletions(-)
New commits:
commit 7abd369964a0c7f9f80cdbc9e47c7dc120fe8257
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Thu Nov 3 14:00:28 2016 +0200
loplugin:unusedmethods
Change-Id: Ie1f840c3ec9a2d5888f95cf05e531a8a9464bf2e
Reviewed-on: https://gerrit.libreoffice.org/30524
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx
index ec4f5b3..ecdce1d 100644
--- a/cui/source/options/optopencl.cxx
+++ b/cui/source/options/optopencl.cxx
@@ -121,11 +121,5 @@ void SvxOpenCLTabPage::Reset( const SfxItemSet* )
mpUseOpenCL->SaveValue();
}
-void SvxOpenCLTabPage::EnableOpenCLHdl(VclFrame* pFrame, bool aEnable)
-{
-
- pFrame->Enable(aEnable);
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/options/optopencl.hxx b/cui/source/options/optopencl.hxx
index 5680d91..4609b1b 100644
--- a/cui/source/options/optopencl.hxx
+++ b/cui/source/options/optopencl.hxx
@@ -37,8 +37,6 @@ private:
VclPtr<FixedText> mpOclUsed;
VclPtr<FixedText> mpOclNotUsed;
- static void EnableOpenCLHdl(VclFrame* pFrame, bool aEnable);
-
public:
SvxOpenCLTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
virtual ~SvxOpenCLTabPage() override;
diff --git a/include/sfx2/styfitem.hxx b/include/sfx2/styfitem.hxx
index b1dd71b..c0fd3cb 100644
--- a/include/sfx2/styfitem.hxx
+++ b/include/sfx2/styfitem.hxx
@@ -50,7 +50,6 @@ public:
SfxStyleFamily GetFamily() const { return nFamily; }
const SfxStyleFilter& GetFilterList() const { return aFilterList; }
const Image& GetImage() const { return aImage; }
- void SetImage( const Image& _rImg ) { aImage = _rImg; }
};
using SfxStyleFamilies = std::vector<SfxStyleFamilyItem>;
diff --git a/include/svtools/framestatuslistener.hxx b/include/svtools/framestatuslistener.hxx
index 0389f7a..e64b1e9 100644
--- a/include/svtools/framestatuslistener.hxx
+++ b/include/svtools/framestatuslistener.hxx
@@ -50,7 +50,6 @@ class SVT_DLLPUBLIC FrameStatusListener : public css::frame::XStatusListener,
// methods to support status forwarder, known by the old sfx2 toolbox controller implementation
void addStatusListener( const OUString& aCommandURL );
void bindListener();
- void unbindListener();
// XInterface
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) throw (css::uno::RuntimeException, std::exception) override;
diff --git a/include/tools/rc.hxx b/include/tools/rc.hxx
index edb82ae..ebf946a 100644
--- a/include/tools/rc.hxx
+++ b/include/tools/rc.hxx
@@ -51,10 +51,6 @@ protected:
static sal_uInt32 GetObjSizeRes( RSHEADER_TYPE * pHT )
{ return ResMgr::GetObjSize( pHT ); }
- // get a 32bit value from Resource data
- static sal_Int32 GetLongRes( void const * pLong )
- { return ResMgr::GetLong( pLong ); }
-
// read a 32bit value from resource data and increment pointer
sal_Int32 ReadLongRes()
{ return m_pResMgr->ReadLong(); }
diff --git a/include/vcl/event.hxx b/include/vcl/event.hxx
index a7c9b44..9737bac 100644
--- a/include/vcl/event.hxx
+++ b/include/vcl/event.hxx
@@ -125,8 +125,6 @@ public:
const Point& GetPosPixel() const { return maPos; }
MouseEventModifiers GetMode() const { return mnMode; }
- /** inits this vcl KeyEvent with all settings from the given awt event **/
- MouseEvent( const css::awt::MouseEvent& rEvent );
sal_uInt16 GetClicks() const { return mnClicks; }
@@ -179,62 +177,14 @@ inline MouseEvent::MouseEvent( const Point& rPos, sal_uInt16 nClicks,
class VCL_DLLPUBLIC ZoomEvent
{
-private:
- Point maCenter;
- float mfScale;
-
public:
- ZoomEvent() :
- mfScale( 1 )
- {
- }
-
- ZoomEvent( const Point& rCenter,
- float fScale ) :
- maCenter( rCenter ),
- mfScale( fScale )
- {
- }
-
- const Point& GetCenter() const
- {
- return maCenter;
- }
-
- float GetScale() const
- {
- return mfScale;
- }
+ ZoomEvent() {}
};
class VCL_DLLPUBLIC ScrollEvent
{
-private:
- int mnXOffset;
- int mnYOffset;
-
public:
- ScrollEvent() :
- mnXOffset( 0 ),
- mnYOffset( 0 )
- {
- }
-
- ScrollEvent( int xOffset, int yOffset ) :
- mnXOffset( xOffset ),
- mnYOffset( yOffset )
- {
- }
-
- int GetXOffset() const
- {
- return mnXOffset;
- }
-
- int GetYOffset() const
- {
- return mnYOffset;
- }
+ ScrollEvent() {}
};
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 54810ee..0b4055b 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -714,9 +714,6 @@ private:
SAL_DLLPRIVATE void ImplDlgCtrlFocusChanged( vcl::Window* pWindow, bool bGetFocus );
SAL_DLLPRIVATE vcl::Window* ImplFindDlgCtrlWindow( vcl::Window* pWindow );
- SAL_DLLPRIVATE long ImplLogicUnitToPixelX( long nX, MapUnit eUnit );
- SAL_DLLPRIVATE long ImplLogicUnitToPixelY( long nY, MapUnit eUnit );
-
SAL_DLLPRIVATE static void ImplNewInputContext();
SAL_DLLPRIVATE void ImplCallActivateListeners(vcl::Window*);
diff --git a/rsc/inc/rscclass.hxx b/rsc/inc/rscclass.hxx
index c38dfd6..bc9b312 100644
--- a/rsc/inc/rscclass.hxx
+++ b/rsc/inc/rscclass.hxx
@@ -53,8 +53,6 @@ protected:
bool IsValueDflt( CLASS_DATA pData, sal_uInt32 nEle );
void SetVarDflt( CLASS_DATA pData, sal_uInt32 nEle,
bool bSet );
- sal_Int32 GetCorrectValues( const RSCINST & rInst, sal_uInt32 nVarPos,
- sal_uInt32 nTupelIdx, RscTypCont * pTC );
public:
RscClass( Atom nId, sal_uInt32 nTypId, RscTop * pSuperCl );
virtual ~RscClass() override;
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index e452f4d..a60447f 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -149,14 +149,8 @@ public:
}
const OString& GetSearchPath() const { return aSearchPath; }
void SetSysSearchPath( const OString& rStr ) { aSysSearchPath = rStr; }
- void InsertType( RscTop * pType )
- {
- aBaseLst.push_back( pType );
- }
- RscTop * SearchType( Atom nTypId );
// deletes all resource objects of this file
void Delete( RscFileTab::Index lFileKey );
- RscTop * GetRoot() { return pRoot; }
sal_uInt32 PutSysName( sal_uInt32 nRscTyp, char * pName );
void ClearSysNames();
ERRTYPE WriteRc( WriteRcContext& rContext );
diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx
index cd43e21..6f53e10 100644
--- a/rsc/source/parser/rscdb.cxx
+++ b/rsc/source/parser/rscdb.cxx
@@ -208,44 +208,6 @@ void RscTypCont::ClearSysNames()
aSysLst.clear();
}
-RscTop * RscTypCont::SearchType( Atom nId )
-{
- /* [Description]
-
- Search for base type nId;
- */
- if( nId == InvalidAtom )
- return nullptr;
-
-#define ELSE_IF( a ) \
- else if( a.GetId() == nId ) \
- return &a; \
-
- if( aBool.GetId() == nId )
- return &aBool;
- ELSE_IF( aShort )
- ELSE_IF( aUShort )
- ELSE_IF( aLong )
- ELSE_IF( aEnumLong )
- ELSE_IF( aIdUShort )
- ELSE_IF( aIdNoZeroUShort )
- ELSE_IF( aNoZeroShort )
- ELSE_IF( aIdLong )
- ELSE_IF( aString )
- ELSE_IF( aLangType )
- ELSE_IF( aLangString )
- ELSE_IF( aLangShort )
-// al least to not pollute
-#undef ELSE_IF
-
- for (RscTop* pItem : aBaseLst)
- {
- if (pItem->GetId() == nId)
- return pItem;
- }
- return nullptr;
-}
-
sal_uInt32 RscTypCont::PutSysName( sal_uInt32 nRscTyp, char * pFileName )
{
RscSysEntry *pFoundEntry = nullptr;
diff --git a/rsc/source/res/rscclass.cxx b/rsc/source/res/rscclass.cxx
index 3b3d36b..3e6e802 100644
--- a/rsc/source/res/rscclass.cxx
+++ b/rsc/source/res/rscclass.cxx
@@ -592,30 +592,6 @@ void RscClass::WriteSrc( const RSCINST & rInst,
return;
}
-sal_Int32 RscClass::GetCorrectValues( const RSCINST & rInst,
- sal_uInt32 nVarPos,
- sal_uInt32 nTupelIdx,
- RscTypCont * pTC)
-{
- sal_Int32 nLang = 0;
- sal_Int32 nBaseValue;
-
- // retrieve base value
- RSCINST aTmpI = GetInstData( rInst.pData, nVarPos, true );
- aTmpI.pClass->GetNumber( aTmpI, &nBaseValue );
-
- // retrieve language delta
- aTmpI = rInst.pClass->GetVariable( rInst, nRsc_DELTALANG, RSCINST() );
- if( aTmpI.IsInst() )
- {
- RscWriteRc aMem;
- aTmpI.pClass->WriteRc( aTmpI, aMem, pTC, 0, false );
- nLang = (sal_Int32)aMem.GetShort( nTupelIdx * sizeof(sal_uInt16) );
- }
-
- return nLang + nBaseValue;
-}
-
ERRTYPE RscClass::WriteInstRc( const RSCINST & rInst,
RscWriteRc & rMem,
RscTypCont * pTC,
diff --git a/sdext/source/presenter/PresenterSlideShowView.hxx b/sdext/source/presenter/PresenterSlideShowView.hxx
index 9455f13..a72119c 100644
--- a/sdext/source/presenter/PresenterSlideShowView.hxx
+++ b/sdext/source/presenter/PresenterSlideShowView.hxx
@@ -258,14 +258,6 @@ private:
void PaintInnerWindow (const css::awt::PaintEvent& rEvent);
void PaintEndSlide (const css::awt::Rectangle& rRepaintBox);
- /** The slide show relies on the back buffer of the canvas not being
- modified. With a shared canvas there are times when that can not be
- guaranteed.
- Call this method when the back buffer may have changed its content,
- like when the window has been moved but not resized.
- */
- void ForceRepaint();
-
void CreateBackgroundPolygons();
/** This method throws a DisposedException when the object has already been
diff --git a/svtools/source/uno/framestatuslistener.cxx b/svtools/source/uno/framestatuslistener.cxx
index bf6c771..2819b53 100644
--- a/svtools/source/uno/framestatuslistener.cxx
+++ b/svtools/source/uno/framestatuslistener.cxx
@@ -279,42 +279,6 @@ void FrameStatusListener::bindListener()
}
}
-void FrameStatusListener::unbindListener()
-{
- SolarMutexGuard aSolarMutexGuard;
-
- // Collect all registered command URL's and store them temporary
- Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY );
- if ( m_xContext.is() && xDispatchProvider.is() )
- {
- Reference< XStatusListener > xStatusListener( static_cast< OWeakObject* >( this ), UNO_QUERY );
- URLToDispatchMap::iterator pIter = m_aListenerMap.begin();
- while ( pIter != m_aListenerMap.end() )
- {
- Reference< XURLTransformer > xURLTransformer( css::util::URLTransformer::create( m_xContext ) );
- css::util::URL aTargetURL;
- aTargetURL.Complete = pIter->first;
- xURLTransformer->parseStrict( aTargetURL );
-
- Reference< XDispatch > xDispatch( pIter->second );
- if ( xDispatch.is() )
- {
- // We already have a dispatch object => we have to requery.
- // Release old dispatch object and remove it as listener
- try
- {
- xDispatch->removeStatusListener( xStatusListener, aTargetURL );
- }
- catch (const Exception&)
- {
- }
- }
- pIter->second.clear();
- ++pIter;
- }
- }
-}
-
} // svt
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx
index c665650..55cf14f 100644
--- a/vcl/source/outdev/map.cxx
+++ b/vcl/source/outdev/map.cxx
@@ -1949,60 +1949,6 @@ void OutputDevice::SetPixelOffset( const Size& rOffset )
}
-namespace vcl {
-
-long Window::ImplLogicUnitToPixelX( long nX, MapUnit eUnit )
-{
- if ( eUnit != MapUnit::MapPixel )
- {
- ImplFrameData* pFrameData = mpWindowImpl->mpFrameData;
-
- // shift map unit, then re-calculate
- if ( pFrameData->meMapUnit != eUnit )
- {
- pFrameData->meMapUnit = eUnit;
- ImplCalcMapResolution( MapMode( eUnit ), mnDPIX, mnDPIY,
- pFrameData->maMapUnitRes );
- }
-
- // BigInt is not required, as this function is only used to
- // convert the window position
- nX = nX * mnDPIX * pFrameData->maMapUnitRes.mnMapScNumX;
- nX += nX >= 0 ? (pFrameData->maMapUnitRes.mnMapScDenomX/2) :
- -((pFrameData->maMapUnitRes.mnMapScDenomX-1)/2);
- nX /= pFrameData->maMapUnitRes.mnMapScDenomX;
- }
-
- return nX;
-}
-
-long Window::ImplLogicUnitToPixelY( long nY, MapUnit eUnit )
-{
- if ( eUnit != MapUnit::MapPixel )
- {
- ImplFrameData* pFrameData = mpWindowImpl->mpFrameData;
-
- // shift map unit, then re-calculate
- if ( pFrameData->meMapUnit != eUnit )
- {
- pFrameData->meMapUnit = eUnit;
- ImplCalcMapResolution( MapMode( eUnit ), mnDPIX, mnDPIY,
- pFrameData->maMapUnitRes );
- }
-
- // BigInt is not required, as this function is only used to
- // convert the window position
- nY = nY * mnDPIY * pFrameData->maMapUnitRes.mnMapScNumY;
- nY += nY >= 0 ? (pFrameData->maMapUnitRes.mnMapScDenomY/2) :
- -((pFrameData->maMapUnitRes.mnMapScDenomY-1)/2);
- nY /= pFrameData->maMapUnitRes.mnMapScDenomY;
- }
-
- return nY;
-}
-
-} /* namespace vcl */
-
DeviceCoordinate OutputDevice::LogicWidthToDeviceCoordinate( long nWidth ) const
{
if ( !mbMap )
diff --git a/vcl/source/window/mouseevent.cxx b/vcl/source/window/mouseevent.cxx
index 581c164..8b47d69 100644
--- a/vcl/source/window/mouseevent.cxx
+++ b/vcl/source/window/mouseevent.cxx
@@ -23,34 +23,4 @@
#include <com/sun/star/awt/KeyModifier.hpp>
#include <com/sun/star/awt/MouseButton.hpp>
-/** inits this vcl KeyEvent with all settings from the given awt event **/
-MouseEvent::MouseEvent( const css::awt::MouseEvent& rEvent )
-: maPos( rEvent.X, rEvent.Y )
-, mnMode( MouseEventModifiers::NONE )
-, mnClicks( static_cast< sal_uInt16 >( rEvent.ClickCount ) )
-, mnCode( 0 )
-{
- if( rEvent.Modifiers )
- {
- if( (rEvent.Modifiers & css::awt::KeyModifier::SHIFT) != 0 )
- mnCode |= KEY_SHIFT;
- if( (rEvent.Modifiers & css::awt::KeyModifier::MOD1) != 0 )
- mnCode |= KEY_MOD1;
- if( (rEvent.Modifiers & css::awt::KeyModifier::MOD2) != 0 )
- mnCode |= KEY_MOD2;
- if( (rEvent.Modifiers & css::awt::KeyModifier::MOD3) != 0 )
- mnCode |= KEY_MOD3;
- }
-
- if( rEvent.Buttons )
- {
- if( (rEvent.Buttons & css::awt::MouseButton::LEFT) != 0 )
- mnCode |= MOUSE_LEFT;
- if( (rEvent.Buttons & css::awt::MouseButton::RIGHT) != 0 )
- mnCode |= MOUSE_RIGHT;
- if( (rEvent.Buttons & css::awt::MouseButton::MIDDLE) != 0 )
- mnCode |= MOUSE_MIDDLE;
- }
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 170e946..8defcd3 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -2547,14 +2547,13 @@ bool ImplWindowFrameProc( vcl::Window* _pWindow, SalEvent nEvent, const void* pE
break;
case SalEvent::ExternalZoom:
{
- ZoomEvent const * pZoomEvent = static_cast<ZoomEvent const *>(pEvent);
SalWheelMouseEvent aSalWheelMouseEvent;
aSalWheelMouseEvent.mnTime = tools::Time::GetSystemTicks();
- aSalWheelMouseEvent.mnX = pZoomEvent->GetCenter().getX();
- aSalWheelMouseEvent.mnY = pZoomEvent->GetCenter().getY();
+ aSalWheelMouseEvent.mnX = 0;
+ aSalWheelMouseEvent.mnY = 0;
// Pass on the scale as a percentage * 100 of current zoom factor
// so to assure zoom granularity
- aSalWheelMouseEvent.mnDelta = long(double(pZoomEvent->GetScale()) * double(MOBILE_ZOOM_SCALE_MULTIPLIER));
+ aSalWheelMouseEvent.mnDelta = long(MOBILE_ZOOM_SCALE_MULTIPLIER);
// Other SalWheelMouseEvent fields ignored when the
// scaleDirectly parameter to ImplHandleWheelEvent() is
// true.
@@ -2563,13 +2562,12 @@ bool ImplWindowFrameProc( vcl::Window* _pWindow, SalEvent nEvent, const void* pE
break;
case SalEvent::ExternalScroll:
{
- ScrollEvent const * pScrollEvent = static_cast<ScrollEvent const *>(pEvent);
SalWheelMouseEvent aSalWheelMouseEvent;
aSalWheelMouseEvent.mnTime = tools::Time::GetSystemTicks();
aSalWheelMouseEvent.mbDeltaIsPixel = true;
// event location holds delta values instead
- aSalWheelMouseEvent.mnX = long(pScrollEvent->GetXOffset());
- aSalWheelMouseEvent.mnY = long(pScrollEvent->GetYOffset());
+ aSalWheelMouseEvent.mnX = 0;
+ aSalWheelMouseEvent.mnY = 0;
aSalWheelMouseEvent.mnScrollLines = 0;
if (aSalWheelMouseEvent.mnX != 0 || aSalWheelMouseEvent.mnY != 0)
{
More information about the Libreoffice-commits
mailing list