diff options
author | Noel Grandin <noel@peralex.com> | 2015-08-04 16:28:49 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-08-05 09:39:22 +0000 |
commit | 403c13487c36f4200adf0986c5d11398f719cd7a (patch) | |
tree | 21a4acf87dce1e6c8772f5cbcff3c2a3de21f4ba /vcl | |
parent | 10560949f90e08fe4a04dd91c7d388c4998100e8 (diff) |
loplugin:unusedmethods
Change-Id: I6801618efb5a66d24156fa429e026acb6ca03aba
Reviewed-on: https://gerrit.libreoffice.org/17506
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/generic/print/genprnpsp.cxx | 7 | ||||
-rw-r--r-- | vcl/inc/generic/genprn.h | 1 | ||||
-rw-r--r-- | vcl/inc/ilstbox.hxx | 18 | ||||
-rw-r--r-- | vcl/inc/osx/salprn.h | 1 | ||||
-rw-r--r-- | vcl/inc/salprn.hxx | 1 | ||||
-rw-r--r-- | vcl/inc/win/saldata.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/win/salinst.h | 1 | ||||
-rw-r--r-- | vcl/inc/win/salprn.h | 1 | ||||
-rw-r--r-- | vcl/osx/salprn.cxx | 5 | ||||
-rw-r--r-- | vcl/source/edit/textdat2.hxx | 25 | ||||
-rw-r--r-- | vcl/source/edit/textdoc.hxx | 1 | ||||
-rw-r--r-- | vcl/win/source/app/salinst.cxx | 4 | ||||
-rw-r--r-- | vcl/win/source/gdi/salprn.cxx | 53 |
13 files changed, 5 insertions, 115 deletions
diff --git a/vcl/generic/print/genprnpsp.cxx b/vcl/generic/print/genprnpsp.cxx index b64206f6168f..1a18c80476b8 100644 --- a/vcl/generic/print/genprnpsp.cxx +++ b/vcl/generic/print/genprnpsp.cxx @@ -951,13 +951,6 @@ bool PspSalPrinter::EndJob() return bSuccess; } -bool PspSalPrinter::AbortJob() -{ - bool bAbort = m_aPrintJob.AbortJob(); - GetSalData()->m_pInstance->jobEndedPrinterUpdate(); - return bAbort; -} - SalGraphics* PspSalPrinter::StartPage( ImplJobSetup* pJobSetup, bool ) { OSL_TRACE("PspSalPrinter::StartPage"); diff --git a/vcl/inc/generic/genprn.h b/vcl/inc/generic/genprn.h index 5c903c6ab834..00639d336fc5 100644 --- a/vcl/inc/generic/genprn.h +++ b/vcl/inc/generic/genprn.h @@ -86,7 +86,6 @@ public: ImplJobSetup*, vcl::PrinterController& i_rController ) SAL_OVERRIDE; virtual bool EndJob() SAL_OVERRIDE; - virtual bool AbortJob() SAL_OVERRIDE; virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, bool bNewJobData ) SAL_OVERRIDE; virtual bool EndPage() SAL_OVERRIDE; virtual sal_uIntPtr GetErrorCode() SAL_OVERRIDE; diff --git a/vcl/inc/ilstbox.hxx b/vcl/inc/ilstbox.hxx index 39746dc7f35f..5a010e957748 100644 --- a/vcl/inc/ilstbox.hxx +++ b/vcl/inc/ilstbox.hxx @@ -313,7 +313,6 @@ public: bool IsTrackingSelect() const { return mbTrackingSelect; } void SetUserItemSize( const Size& rSz ); - const Size& GetUserItemSize() const { return maUserItemSize; } void EnableUserDraw( bool bUserDraw ) { mbUserDrawEnabled = bUserDraw; } bool IsUserDrawEnabled() const { return mbUserDrawEnabled; } @@ -325,7 +324,6 @@ public: bool IsMultiSelectionSimpleMode() const { return mbSimpleMode; } void EnableMouseMoveSelect( bool bMouseMoveSelect ) { mbMouseMoveSelect = bMouseMoveSelect; } - bool IsMouseMoveSelectEnabled() const { return mbMouseMoveSelect; } bool IsMouseMoveSelect() const { return mbMouseMoveSelect||mbStackMode; } Size CalcSize(sal_Int32 nMaxLines) const; @@ -335,7 +333,6 @@ public: long GetMaxEntryWidth() const { return mnMaxWidth; } void SetScrollHdl( const Link<>& rLink ) { maScrollHdl = rLink; } - const Link<>& GetScrollHdl() const { return maScrollHdl; } void SetSelectHdl( const Link<>& rLink ) { maSelectHdl = rLink; } const Link<>& GetSelectHdl() const { return maSelectHdl; } void SetCancelHdl( const Link<>& rLink ) { maCancelHdl = rLink; } @@ -343,7 +340,6 @@ public: void SetDoubleClickHdl( const Link<>& rLink ) { maDoubleClickHdl = rLink; } const Link<>& GetDoubleClickHdl() const { return maDoubleClickHdl; } void SetMRUChangedHdl( const Link<>& rLink ) { maMRUChangedHdl = rLink; } - const Link<>& GetMRUChangedHdl() const { return maMRUChangedHdl; } void SetFocusHdl( const Link<>& rLink ) { maFocusHdl = rLink ; } const Link<>& GetFocusHdl() const { return maFocusHdl; } @@ -370,7 +366,6 @@ public: void EnableQuickSelection( const bool& b ); using Control::ImplInitSettings; - void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); virtual void ApplySettings(vcl::RenderContext& rRenderContext) SAL_OVERRIDE; protected: @@ -450,11 +445,9 @@ public: bool IsVisible( sal_Int32 nEntry ) const { return maLBWindow->IsVisible( nEntry ); } void SetProminentEntryType( ProminentEntry eType ) { maLBWindow->SetProminentEntryType( eType ); } - ProminentEntry GetProminentEntryType() const { return maLBWindow->GetProminentEntryType(); } long GetLeftIndent() const { return maLBWindow->GetLeftIndent(); } void SetLeftIndent( sal_uInt16 n ) { maLBWindow->SetLeftIndent( n ); } - void ScrollHorz( short nDiff ) { maLBWindow->ScrollHorz( nDiff ); } void SetTravelSelect( bool bTravelSelect ) { maLBWindow->SetTravelSelect( bTravelSelect ); } bool IsTravelSelect() const { return maLBWindow->IsTravelSelect(); } @@ -464,7 +457,6 @@ public: bool IsMultiSelectionEnabled() const { return maLBWindow->IsMultiSelectionEnabled(); } void SetMultiSelectionSimpleMode( bool bSimple ) { maLBWindow->SetMultiSelectionSimpleMode( bSimple ); } - bool IsMultiSelectionSimpleMode() const { return maLBWindow->IsMultiSelectionSimpleMode(); } void SetReadOnly( bool b ) { maLBWindow->SetReadOnly( b ); } bool IsReadOnly() const { return maLBWindow->IsReadOnly(); } @@ -474,20 +466,14 @@ public: long GetMaxEntryWidth() const { return maLBWindow->GetMaxEntryWidth(); } void SetScrollHdl( const Link<>& rLink ) { maScrollHdl = rLink; } - const Link<>& GetScrollHdl() const { return maScrollHdl; } void SetSelectHdl( const Link<>& rLink ) { maLBWindow->SetSelectHdl( rLink ); } - const Link<>& GetSelectHdl() const { return maLBWindow->GetSelectHdl(); } void SetCancelHdl( const Link<>& rLink ) { maLBWindow->SetCancelHdl( rLink ); } - const Link<>& GetCancelHdl() const { return maLBWindow->GetCancelHdl(); } void SetDoubleClickHdl( const Link<>& rLink ) { maLBWindow->SetDoubleClickHdl( rLink ); } - const Link<>& GetDoubleClickHdl() const { return maLBWindow->GetDoubleClickHdl(); } boost::signals2::signal< void ( UserDrawEvent* ) > userDrawSignal; void SetFocusHdl( const Link<>& rLink ) { maLBWindow->SetFocusHdl( rLink ); } - const Link<>& GetFocusHdl() const { return maLBWindow->GetFocusHdl(); } void SetListItemSelectHdl( const Link<>& rLink ) { maLBWindow->SetListItemSelectHdl( rLink ); } - const Link<>& GetListItemSelectHdl() const { return maLBWindow->GetListItemSelectHdl(); } void SetSelectionChangedHdl( const Link<>& rLnk ) { maLBWindow->GetEntryList()->SetSelectionChangedHdl( rLnk ); } void SetCallSelectionChangedHdl( bool bCall ) { maLBWindow->GetEntryList()->SetCallSelectionChangedHdl( bCall ); } bool IsSelectionChanged() const { return maLBWindow->IsSelectionChanged(); } @@ -530,7 +516,6 @@ public: const Size& GetPrefSize() const { return maPrefSz; } void SetAutoWidth( bool b ) { mbAutoWidth = b; } - bool IsAutoWidth() const { return mbAutoWidth; } Size CalcFloatSize(); void StartFloat( bool bStartTracking ); @@ -581,10 +566,8 @@ public: sal_Int32 GetItemPos() const { return mnItemPos; } void SetItemPos( sal_Int32 n ) { mnItemPos = n; } - const OUString& GetString() const { return maString; } void SetString( const OUString& rStr ) { maString = rStr; } - const Image& GetImage() const { return maImage; } void SetImage( const Image& rImg ) { maImage = rImg; } void MBDown(); @@ -593,7 +576,6 @@ public: boost::signals2::signal< void ( UserDrawEvent* ) > userDrawSignal; void SetUserItemSize( const Size& rSz ) { maUserItemSize = rSz; } - const Size& GetUserItemSize() const { return maUserItemSize; } void EnableUserDraw( bool bUserDraw ) { mbUserDrawEnabled = bUserDraw; } bool IsUserDrawEnabled() const { return mbUserDrawEnabled; } diff --git a/vcl/inc/osx/salprn.h b/vcl/inc/osx/salprn.h index 435e5b0f8ba8..51964643d37e 100644 --- a/vcl/inc/osx/salprn.h +++ b/vcl/inc/osx/salprn.h @@ -137,7 +137,6 @@ class AquaSalPrinter : public SalPrinter vcl::PrinterController& i_rListener ) SAL_OVERRIDE; virtual bool EndJob() SAL_OVERRIDE; - virtual bool AbortJob() SAL_OVERRIDE; virtual SalGraphics* StartPage( ImplJobSetup* i_pSetupData, bool i_bNewJobData ) SAL_OVERRIDE; virtual bool EndPage() SAL_OVERRIDE; virtual sal_uLong GetErrorCode() SAL_OVERRIDE; diff --git a/vcl/inc/salprn.hxx b/vcl/inc/salprn.hxx index d719b48be4d3..0d688bdc488a 100644 --- a/vcl/inc/salprn.hxx +++ b/vcl/inc/salprn.hxx @@ -107,7 +107,6 @@ public: vcl::PrinterController& rController ); virtual bool EndJob() = 0; - virtual bool AbortJob() = 0; virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, bool bNewJobData ) = 0; virtual bool EndPage() = 0; virtual sal_uLong GetErrorCode() = 0; diff --git a/vcl/inc/win/saldata.hxx b/vcl/inc/win/saldata.hxx index 519b24489de9..ed8a2fd9a2ec 100644 --- a/vcl/inc/win/saldata.hxx +++ b/vcl/inc/win/saldata.hxx @@ -212,8 +212,6 @@ int ImplSalWICompareAscii( const wchar_t* pStr1, const char* pStr2 ); #define SAL_MOUSELEAVE_TIMEOUT 300 -// wParam == hDC; lParam == 0 -#define SAL_MSG_PRINTABORTJOB (WM_USER+110) // wParam == bWait; lParam == 0 #define SAL_MSG_THREADYIELD (WM_USER+111) // wParam == 0; lParam == 0 diff --git a/vcl/inc/win/salinst.h b/vcl/inc/win/salinst.h index 6eab9b3227ef..6c413143f555 100644 --- a/vcl/inc/win/salinst.h +++ b/vcl/inc/win/salinst.h @@ -89,7 +89,6 @@ SalFrame* ImplSalCreateFrame( WinSalInstance* pInst, HWND hWndParent, sal_uIntPt SalObject* ImplSalCreateObject( WinSalInstance* pInst, WinSalFrame* pParent ); HWND ImplSalReCreateHWND( HWND hWndParent, HWND oldhWnd, bool bAsChild ); void ImplSalStartTimer( sal_uIntPtr nMS, bool bMutex = false ); -void ImplSalPrinterAbortJobAsync( HDC hPrnDC ); #endif // INCLUDED_VCL_INC_WIN_SALINST_H diff --git a/vcl/inc/win/salprn.h b/vcl/inc/win/salprn.h index 05bfac6cbeb8..1835e79b992f 100644 --- a/vcl/inc/win/salprn.h +++ b/vcl/inc/win/salprn.h @@ -100,7 +100,6 @@ public: bool bDirect, ImplJobSetup* pSetupData ) SAL_OVERRIDE; virtual bool EndJob() SAL_OVERRIDE; - virtual bool AbortJob() SAL_OVERRIDE; virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, bool bNewJobData ) SAL_OVERRIDE; virtual bool EndPage() SAL_OVERRIDE; virtual sal_uIntPtr GetErrorCode() SAL_OVERRIDE; diff --git a/vcl/osx/salprn.cxx b/vcl/osx/salprn.cxx index 99684315c488..7007868b3f36 100644 --- a/vcl/osx/salprn.cxx +++ b/vcl/osx/salprn.cxx @@ -603,11 +603,6 @@ bool AquaSalPrinter::EndJob() return mpInfoPrinter->EndJob(); } -bool AquaSalPrinter::AbortJob() -{ - return mpInfoPrinter->AbortJob(); -} - SalGraphics* AquaSalPrinter::StartPage( ImplJobSetup* i_pSetupData, bool i_bNewJobData ) { return mpInfoPrinter->StartPage( i_pSetupData, i_bNewJobData ); diff --git a/vcl/source/edit/textdat2.hxx b/vcl/source/edit/textdat2.hxx index d18166e662bc..801d55843cfe 100644 --- a/vcl/source/edit/textdat2.hxx +++ b/vcl/source/edit/textdat2.hxx @@ -48,9 +48,9 @@ class TETextPortion { private: sal_uInt16 nLen; - long nWidth; + long nWidth; sal_uInt8 nKind; - sal_uInt8 nRightToLeft; + sal_uInt8 nRightToLeft; TETextPortion() { nLen = 0; nKind = PORTIONKIND_TEXT; nWidth = -1; nRightToLeft = 0;} @@ -61,21 +61,12 @@ public: nWidth= -1; nRightToLeft = 0; } - - sal_uInt16 GetLen() const { return nLen; } sal_uInt16& GetLen() { return nLen; } - - long GetWidth()const { return nWidth; } - long& GetWidth() { return nWidth; } - - sal_uInt8 GetKind() const { return nKind; } + long& GetWidth() { return nWidth; } sal_uInt8& GetKind() { return nKind; } - - sal_uInt8 GetRightToLeft() const { return nRightToLeft; } sal_uInt8& GetRightToLeft() { return nRightToLeft; } - bool IsRightToLeft() const { return (nRightToLeft&1); } - - bool HasValidSize() const { return nWidth != (-1); } + bool IsRightToLeft() const { return (nRightToLeft&1); } + bool HasValidSize() const { return nWidth != (-1); } }; class TETextPortionList : public std::vector<TETextPortion*> @@ -86,7 +77,6 @@ public: void Reset(); sal_uInt16 FindPortion( sal_uInt16 nCharPos, sal_uInt16& rPortionStart, bool bPreferStartingPortion = false ); - sal_uInt16 GetPortionStartIndex( sal_uInt16 nPortion ); void DeleteFromPortion( sal_uInt16 nDelFrom ); }; @@ -123,9 +113,6 @@ public: mbInvalid = true; } - bool IsIn( sal_uInt16 nIndex ) const - { return ( (nIndex >= mnStart ) && ( nIndex < mnEnd ) ); } - bool IsIn( sal_uInt16 nIndex, bool bInclEnd ) const { return ( ( nIndex >= mnStart ) && ( bInclEnd ? ( nIndex <= mnEnd ) : ( nIndex < mnEnd ) ) ); } @@ -152,8 +139,6 @@ public: void SetInvalid() { mbInvalid = true; } void SetValid() { mbInvalid = false; } - bool IsEmpty() const { return mnEnd <= mnStart; } - short GetStartX() const { return mnStartX; } void SetStartX( short n ) { mnStartX = n; } diff --git a/vcl/source/edit/textdoc.hxx b/vcl/source/edit/textdoc.hxx index 566c9f384262..77aa782c7e3d 100644 --- a/vcl/source/edit/textdoc.hxx +++ b/vcl/source/edit/textdoc.hxx @@ -51,7 +51,6 @@ public: void DeleteEmptyAttribs(); void ResortAttribs(); - bool HasEmptyAttribs() const { return mbHasEmptyAttribs; } bool& HasEmptyAttribs() { return mbHasEmptyAttribs; } TextCharAttrib* FindAttrib( sal_uInt16 nWhich, sal_uInt16 nPos ); diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx index 8a794712882f..8726814548b3 100644 --- a/vcl/win/source/app/salinst.cxx +++ b/vcl/win/source/app/salinst.cxx @@ -705,10 +705,6 @@ LRESULT CALLBACK SalComWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPar switch ( nMsg ) { - case SAL_MSG_PRINTABORTJOB: - ImplSalPrinterAbortJobAsync( (HDC)wParam ); - rDef = FALSE; - break; case SAL_MSG_THREADYIELD: ImplSalYield( (bool)wParam, (bool)lParam ); rDef = FALSE; diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx index c6d7623af238..7179e8cbefcc 100644 --- a/vcl/win/source/gdi/salprn.cxx +++ b/vcl/win/source/gdi/salprn.cxx @@ -1607,59 +1607,6 @@ bool WinSalPrinter::EndJob() return TRUE; } -bool WinSalPrinter::AbortJob() -{ - mbAbort = TRUE; - - // trigger Abort asynchronously - HDC hDC = mhDC; - if ( hDC ) - { - SalData* pSalData = GetSalData(); - PostMessageW( pSalData->mpFirstInstance->mhComWnd, - SAL_MSG_PRINTABORTJOB, (WPARAM)hDC, 0 ); - } - - return TRUE; -} - -void ImplSalPrinterAbortJobAsync( HDC hPrnDC ) -{ - SalData* pSalData = GetSalData(); - WinSalPrinter* pPrinter = pSalData->mpFirstPrinter; - - // check if printer still exists - while ( pPrinter ) - { - if ( pPrinter->mhDC == hPrnDC ) - break; - - pPrinter = pPrinter->mpNextPrinter; - } - - // if printer still exists, cancel the job - if ( pPrinter ) - { - HDC hDC = pPrinter->mhDC; - if ( hDC ) - { - if ( pPrinter->mpGraphics ) - { - pPrinter->mpGraphics->DeInitGraphics(); - delete pPrinter->mpGraphics; - pPrinter->mpGraphics = NULL; - } - - CATCH_DRIVER_EX_BEGIN; - ::AbortDoc( hDC ); - CATCH_DRIVER_EX_END( "exception in AbortDoc", pPrinter ); - - DeleteDC( hDC ); - pPrinter->mhDC = 0; - } - } -} - SalGraphics* WinSalPrinter::StartPage( ImplJobSetup* pSetupData, bool bNewJobData ) { if( ! isValid() || mhDC == 0 ) |