diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-05-26 09:19:31 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-05-26 09:44:45 +0100 |
commit | 3ea1cdfa1015b3a87bcbc1c1e9610217f7f42f45 (patch) | |
tree | 50f220b32beb89df0c2a45961693a268213acb4e | |
parent | cppcheck: uninitvar (diff) | |
download | core-3ea1cdfa1015b3a87bcbc1c1e9610217f7f42f45.tar.gz core-3ea1cdfa1015b3a87bcbc1c1e9610217f7f42f45.zip |
callcatcher: update unused code
a few more ResId using ctors going away
Change-Id: Ic956bc179c094d19989bf850657471192d042a01
-rw-r--r-- | include/svx/checklbx.hxx | 2 | ||||
-rw-r--r-- | include/svx/itemwin.hxx | 33 | ||||
-rw-r--r-- | include/vcl/throbber.hxx | 5 | ||||
-rw-r--r-- | svx/source/dialog/checklbx.cxx | 8 | ||||
-rw-r--r-- | svx/source/tbxctrls/itemwin.cxx | 197 | ||||
-rw-r--r-- | unusedcode.easy | 15 | ||||
-rw-r--r-- | vcl/source/control/throbber.cxx | 15 |
7 files changed, 11 insertions, 264 deletions
diff --git a/include/svx/checklbx.hxx b/include/svx/checklbx.hxx index aa2c300a2e98..405f4649fcb8 100644 --- a/include/svx/checklbx.hxx +++ b/include/svx/checklbx.hxx @@ -44,8 +44,6 @@ private: public: SvxCheckListBox( Window* pParent, WinBits nWinStyle = 0 ); - SvxCheckListBox( Window* pParent, const ResId& rResId, - const Image& rNormalStaticImage ); void SetNormalStaticImage(const Image& rNormalStaticImage); virtual ~SvxCheckListBox(); diff --git a/include/svx/itemwin.hxx b/include/svx/itemwin.hxx index 8dc402025340..2bbb824b2d7e 100644 --- a/include/svx/itemwin.hxx +++ b/include/svx/itemwin.hxx @@ -61,40 +61,7 @@ protected: }; -// class SvxColorBox ----------------------------------------------------- - -class SvxColorBox : public ColorLB -{ - using Window::Update; - - sal_uInt16 nCurPos; - Timer aDelayTimer; - Size aLogicalSize; - bool bRelease; - OUString maCommand; - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame; - - void ReleaseFocus_Impl(); - -public: - SvxColorBox( Window* pParent, - const OUString& rCommand, - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, - WinBits nBits = WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL ); - virtual ~SvxColorBox(); - - void Update( const XLineColorItem* pItem ); - -protected: - virtual void Select() SAL_OVERRIDE; - virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE; - virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE; - virtual void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE; - -}; - // class SvxMetricField -------------------------------------------------- - class SVX_DLLPUBLIC SvxMetricField : public MetricField { using Window::Update; diff --git a/include/vcl/throbber.hxx b/include/vcl/throbber.hxx index 2fe212e5965f..a8102bd133e7 100644 --- a/include/vcl/throbber.hxx +++ b/include/vcl/throbber.hxx @@ -46,9 +46,8 @@ public: }; public: - Throbber( Window* i_parentWindow, WinBits i_style, const ImageSet i_imageSet = IMAGES_AUTO ); - Throbber( Window* i_parentWindow, const ResId& i_resId, const ImageSet i_imageSet = IMAGES_AUTO ); - virtual ~Throbber(); + Throbber(Window* i_parentWindow, WinBits i_style, const ImageSet i_imageSet = IMAGES_AUTO); + virtual ~Throbber(); // Properties void setStepTime( sal_Int32 nStepTime ) { mnStepTime = nStepTime; } diff --git a/svx/source/dialog/checklbx.cxx b/svx/source/dialog/checklbx.cxx index a2fdfa52a0a8..1c8a12ba0c4e 100644 --- a/svx/source/dialog/checklbx.cxx +++ b/svx/source/dialog/checklbx.cxx @@ -47,14 +47,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxCheckListBox(Window *pPa return new SvxCheckListBox(pParent, nWinStyle); } -SvxCheckListBox::SvxCheckListBox( Window* pParent, const ResId& rResId, - const Image& rNormalStaticImage ) - : SvTreeListBox( pParent, rResId ) -{ - Init_Impl(); - SetNormalStaticImage(rNormalStaticImage); -} - void SvxCheckListBox::SetNormalStaticImage(const Image& rNormalStaticImage) { pCheckButton->aBmps[SV_BMP_STATICIMAGE] = rNormalStaticImage; diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx index a84ae5499bcd..11a24d7cad5b 100644 --- a/svx/source/tbxctrls/itemwin.cxx +++ b/svx/source/tbxctrls/itemwin.cxx @@ -29,9 +29,6 @@ #include <svx/dialogs.hrc> -#define TMP_STR_BEGIN "[" -#define TMP_STR_END "]" - #define DELAY_TIMEOUT 100 #include <svx/xlnclit.hxx> @@ -258,201 +255,7 @@ void SvxLineBox::FillControl() } } - -// SvxColorBox - - -SvxColorBox::SvxColorBox( - Window* pParent, - const OUString& rCommand, - const Reference< XFrame >& rFrame, - WinBits nBits ) : - ColorLB( pParent, nBits ), - nCurPos ( 0 ), - aLogicalSize(45,80), - bRelease ( true ), - maCommand ( rCommand ), - mxFrame ( rFrame ) -{ - SetSizePixel( LogicToPixel( aLogicalSize , MAP_APPFONT)); - Show(); - - SfxObjectShell* pSh = SfxObjectShell::Current(); - - if ( pSh ) - { - const SvxColorListItem* pItem = - (const SvxColorListItem*)( pSh->GetItem( SID_COLOR_TABLE ) ); - if(pItem) - Fill( pItem->GetColorList() ); - } -} - - - -SvxColorBox::~SvxColorBox() -{ -} - - - -void SvxColorBox::Update( const XLineColorItem* pItem ) -{ - if ( pItem ) - { - // fdo#64455 - ::Color aColor = pItem->GetColorValue(); - OUString aString( pItem->GetName() ); - SelectEntry(aString); - if( GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND || - GetSelectEntryColor() != aColor ) - { - SelectEntry( aColor ); - } - // Check if the entry is not in the list - if( GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND || - GetSelectEntryColor() != aColor ) - { - sal_Int32 nCount = GetEntryCount(); - OUString aTmpStr; - if( nCount > 0 ) - { - // Last entry gets tested against temporary color - aTmpStr = GetEntry( nCount - 1 ); - if( aTmpStr.startsWith(TMP_STR_BEGIN) && - aTmpStr.endsWith(TMP_STR_END) ) - { - RemoveEntry( nCount - 1 ); - } - } - aTmpStr = TMP_STR_BEGIN + aString + TMP_STR_END; - - sal_Int32 nPos = InsertEntry( aColor, aTmpStr ); - SelectEntryPos( nPos ); - } - } - else - SetNoSelection(); -} - - - -void SvxColorBox::Select() -{ - // OJ: base class call needed here because otherwise no event is send for accessibility - ColorLB::Select(); - if ( !IsTravelSelect() ) - { - XLineColorItem aLineColorItem( GetSelectEntry(), GetSelectEntryColor() ); - - INetURLObject aObj( maCommand ); - - Any a; - Sequence< PropertyValue > aArgs( 1 ); - aArgs[0].Name = aObj.GetURLPath(); - aLineColorItem.QueryValue( a ); - aArgs[0].Value = a; - SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( mxFrame->getController(), UNO_QUERY ), - maCommand, - aArgs ); - - nCurPos = GetSelectEntryPos(); - ReleaseFocus_Impl(); - } -} - - - -bool SvxColorBox::PreNotify( NotifyEvent& rNEvt ) -{ - sal_uInt16 nType = rNEvt.GetType(); - - switch(nType) - { - case EVENT_MOUSEBUTTONDOWN: - case EVENT_GETFOCUS: - nCurPos = GetSelectEntryPos(); - break; - case EVENT_LOSEFOCUS: - SelectEntryPos(nCurPos); - break; - case EVENT_KEYINPUT: - { - const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); - - if( pKEvt->GetKeyCode().GetCode() == KEY_TAB) - { - bRelease = false; - Select(); - } - } - } - - return ColorLB::PreNotify( rNEvt ); -} - - - -bool SvxColorBox::Notify( NotifyEvent& rNEvt ) -{ - bool nHandled = ColorLB::Notify( rNEvt ); - - if ( rNEvt.GetType() == EVENT_KEYINPUT ) - { - const KeyEvent* pKEvt = rNEvt.GetKeyEvent(); - - switch ( pKEvt->GetKeyCode().GetCode() ) - { - case KEY_RETURN: - Select(); - nHandled = true; - break; - - case KEY_ESCAPE: - SelectEntryPos( nCurPos ); - ReleaseFocus_Impl(); - nHandled = true; - break; - } - } - return nHandled; -} - -void SvxColorBox::DataChanged( const DataChangedEvent& rDCEvt ) -{ - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && - (rDCEvt.GetFlags() & SETTINGS_STYLE) ) - { - SetSizePixel(LogicToPixel(aLogicalSize, MAP_APPFONT)); - Size aDropSize( aLogicalSize.Width(), LOGICAL_EDIT_HEIGHT); - SetDropDownSizePixel(LogicToPixel(aDropSize, MAP_APPFONT)); - } - - ColorLB::DataChanged( rDCEvt ); -} - - -void SvxColorBox::ReleaseFocus_Impl() -{ - if(!bRelease) - { - bRelease = true; - return; - } - - if( SfxViewShell::Current() ) - { - Window* pShellWnd = SfxViewShell::Current()->GetWindow(); - - if ( pShellWnd ) - pShellWnd->GrabFocus(); - } -} - - // SvxMetricField - - SvxMetricField::SvxMetricField( Window* pParent, const Reference< XFrame >& rFrame, WinBits nBits ) : MetricField(pParent, nBits) diff --git a/unusedcode.easy b/unusedcode.easy index 824ea06866f0..8bfb2a061f08 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -1,11 +1,8 @@ (anonymous namespace)::flagToString(unsigned short) BigInt::BigInt(unsigned int) CalcUnoApiTest::CalcUnoApiTest(rtl::OUString const&) -ComboBox::GetEntryPos(void const*) const DocumentHandler::DocumentHandler(com::sun::star::uno::Reference<com::sun::star::xml::sax::XDocumentHandler>&) EditEngine::IsIdleFormatterActive() const -Font::LoadSystemFont(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int) -Font::deleteFont() GDriveDocument::GDriveDocument(GDriveSession*) GDriveFolder::GDriveFolder(GDriveSession*) GDriveProperty::GDriveProperty() @@ -18,7 +15,6 @@ MenuBar::GetMenuBarButtonRectPixel(unsigned short) MenuBar::RemoveMenuBarButton(unsigned short) MenuBar::SetMenuBarButtonHighlightHdl(unsigned short, Link const&) MetafileXmlDump::filterNoneActionTypes() -OpenGLContext::getOpenGLWindow() OpenGLContext::renderToFile() OpenGLRender::CreateTextTexture(rtl::OUString const&, Font, long, com::sun::star::awt::Point, com::sun::star::awt::Size, long) OutputDevice::GetCanvas() const @@ -28,10 +24,16 @@ OutputDevice::LogicToPixel(Region const&, MapMode const&) const OutputDevice::LogicToPixel(basegfx::B2DPolygon const&) const OutputDevice::LogicToPixel(basegfx::B2DPolygon const&, MapMode const&) const OutputDevice::PixelToLogic(Region const&, MapMode const&) const +RenderPrimitive::bindSortedIndicesBuf() +RenderPrimitive::copyIndiceBufferData(char const*, unsigned int) +RenderPrimitive::copyVertexBufferData(char const*, unsigned int) SalGraphics::drawTransformedBitmap(basegfx::B2DPoint const&, basegfx::B2DPoint const&, basegfx::B2DPoint const&, SalBitmap const&, SalBitmap const*) +ScDocument::AreaBroadcastInRange(ScRange const&, ScHint const&) ScDocument::CreateFormatTable() const ScExtIButton::GetSelected() const ScFormulaCellGroup::scheduleCompilation() +ScRawToken::Clone() const +ScRawToken::Delete() ScTabView::DrawMarkRect(Rectangle const&) ScTabViewShell::SetChartArea(tools::SvRef<ScRangeList> const&, Rectangle const&) ScVbaFormat<ooo::vba::excel::XStyle>::getAddIndent() @@ -50,12 +52,12 @@ StyleSettings::SetTitleHeight(long) StyleSettings::SetUseFlatBorders(bool) StyleSettings::SetUseFlatMenus(bool) SvpSalInstance::PostedEventsInQueue() -SvtLanguageTable::AddLanguageTag(LanguageTag const&, rtl::OUString const&) SvtListener::IsListening(SvtBroadcaster&) const SvxDummyShapeContainer::SvxDummyShapeContainer(com::sun::star::uno::Reference<com::sun::star::drawing::XShapes>) +SvxFontListBox::GetSelectEntry() const SvxNumberFormatShell::IsAdded_Impl(unsigned long) TextDoc::IsValidPaM(TextPaM const&) -Texture::greateEmptyTexture(int, int, unsigned int) +Texture::setSamplerParameter(unsigned int, unsigned int) UnoApiTest::closeDocument(com::sun::star::uno::Reference<com::sun::star::lang::XComponent>) VCLXGraphics::getFillColor() VCLXGraphics::getFont() @@ -183,6 +185,7 @@ chart::opengl3D::OpenGL3DRenderer::GetTime() chart::opengl3D::OpenGL3DRenderer::RenderClickPos(Point) chart::opengl3D::OpenGL3DRenderer::RenderFPS(float) chart::opengl3D::OpenGL3DRenderer::RenderTexture(unsigned int) +chart::opengl3D::Text::getSize() const comphelper::detail::ConfigurationWrapper::getGroupReadWrite(boost::shared_ptr<comphelper::ConfigurationChanges> const&, rtl::OUString const&) const comphelper::detail::ConfigurationWrapper::getLocalizedPropertyValue(rtl::OUString const&) const comphelper::detail::ConfigurationWrapper::setLocalizedPropertyValue(boost::shared_ptr<comphelper::ConfigurationChanges> const&, rtl::OUString const&, com::sun::star::uno::Any const&) const diff --git a/vcl/source/control/throbber.cxx b/vcl/source/control/throbber.cxx index 96d95352f3d0..c8b585bcb0d1 100644 --- a/vcl/source/control/throbber.cxx +++ b/vcl/source/control/throbber.cxx @@ -57,21 +57,6 @@ Throbber::Throbber( Window* i_parentWindow, WinBits i_style, const ImageSet i_im initImages(); } -Throbber::Throbber( Window* i_parentWindow, const ResId& i_resId, const ImageSet i_imageSet ) - :ImageControl( i_parentWindow, i_resId ) - ,mbRepeat( true ) - ,mnStepTime( 100 ) - ,mnCurStep( 0 ) - ,mnStepCount( 0 ) - ,meImageSet( i_imageSet ) -{ - maWaitTimer.SetTimeout( mnStepTime ); - maWaitTimer.SetTimeoutHdl( LINK( this, Throbber, TimeOutHdl ) ); - - SetScaleMode( ImageScaleMode::NONE ); - initImages(); -} - Throbber::~Throbber() { maWaitTimer.Stop(); |