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 /svx | |
parent | 2e457e2ee54844ea80c1058dabcc3f3a0bd86d54 (diff) |
callcatcher: update unused code
a few more ResId using ctors going away
Change-Id: Ic956bc179c094d19989bf850657471192d042a01
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/checklbx.cxx | 8 | ||||
-rw-r--r-- | svx/source/tbxctrls/itemwin.cxx | 197 |
2 files changed, 0 insertions, 205 deletions
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) |