diff options
author | Joseph Powers <jpowers27@cox.net> | 2010-11-16 18:57:44 -0800 |
---|---|---|
committer | Joseph Powers <jpowers27@cox.net> | 2010-11-16 18:57:44 -0800 |
commit | f417c6cad6608705d674610e99c17170a340f549 (patch) | |
tree | c7e98cb749312d8e4f861b094979cf0d81b01f9c /sc/source/ui/cctrl | |
parent | a1a1c816de870bea49318a2dc3cef683394ff002 (diff) |
HC Cleanup - calc
Diffstat (limited to 'sc/source/ui/cctrl')
-rw-r--r-- | sc/source/ui/cctrl/tbinsert.cxx | 95 |
1 files changed, 3 insertions, 92 deletions
diff --git a/sc/source/ui/cctrl/tbinsert.cxx b/sc/source/ui/cctrl/tbinsert.cxx index a0d65c6e8727..a66d58b32553 100644 --- a/sc/source/ui/cctrl/tbinsert.cxx +++ b/sc/source/ui/cctrl/tbinsert.cxx @@ -91,7 +91,8 @@ void __EXPORT ScTbxInsertCtrl::StateChanged( USHORT /* nSID */, SfxItemState eSt aSlotURL += rtl::OUString::valueOf( sal_Int32( nImageId )); Image aImage = GetImage( m_xFrame, aSlotURL, - hasBigImages() ); + hasBigImages() + ); GetToolBox().SetItemImage(GetId(), aImage); } } @@ -99,38 +100,22 @@ void __EXPORT ScTbxInsertCtrl::StateChanged( USHORT /* nSID */, SfxItemState eSt SfxPopupWindow* __EXPORT ScTbxInsertCtrl::CreatePopupWindow() { -// USHORT nWinResId, nTbxResId; USHORT nSlotId = GetSlotId(); if (nSlotId == SID_TBXCTL_INSERT) { rtl::OUString aInsertBarResStr( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/insertbar" )); createAndPositionSubToolBar( aInsertBarResStr ); -// nWinResId = RID_TBXCTL_INSERT; -// nTbxResId = RID_TOOLBOX_INSERT; } else if (nSlotId == SID_TBXCTL_INSCELLS) { rtl::OUString aInsertCellsBarResStr( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/insertcellsbar" )); createAndPositionSubToolBar( aInsertCellsBarResStr ); -// nWinResId = RID_TBXCTL_INSCELLS; -// nTbxResId = RID_TOOLBOX_INSCELLS; } - else /* SID_TBXCTL_INSOBJ */ + else { rtl::OUString aInsertObjectBarResStr( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/insertobjectbar" )); createAndPositionSubToolBar( aInsertObjectBarResStr ); -// nWinResId = RID_TBXCTL_INSOBJ; -// nTbxResId = RID_TOOLBOX_INSOBJ; } -/* - WindowAlign eNewAlign = ( GetToolBox().IsHorizontal() ) ? WINDOWALIGN_LEFT : WINDOWALIGN_TOP; - ScTbxInsertPopup *pWin = new ScTbxInsertPopup( nSlotId, eNewAlign, - ScResId(nWinResId), ScResId(nTbxResId), GetBindings() ); - pWin->StartPopupMode(&GetToolBox(), TRUE); - pWin->StartSelection(); - pWin->Show(); - return pWin; -*/ return NULL; } @@ -154,80 +139,6 @@ void __EXPORT ScTbxInsertCtrl::Select( BOOL /* bMod1 */ ) if ( pDispatch ) pDispatch->Execute(nLastSlotId); } -/* -//------------------------------------------------------------------ -// -// Popup - Window -// -//------------------------------------------------------------------ - -ScTbxInsertPopup::ScTbxInsertPopup( USHORT nId, WindowAlign eNewAlign, - const ResId& rRIdWin, const ResId& rRIdTbx, - SfxBindings& rBindings ) : - SfxPopupWindow ( nId, rRIdWin, rBindings), - aTbx ( this, GetBindings(), rRIdTbx ), - aRIdWinTemp(rRIdWin), - aRIdTbxTemp(rRIdTbx) -{ - aTbx.UseDefault(); - FreeResource(); - - aTbx.GetToolBox().SetAlign( eNewAlign ); - if (eNewAlign == WINDOWALIGN_LEFT || eNewAlign == WINDOWALIGN_RIGHT) - SetText( EMPTY_STRING ); - - Size aSize = aTbx.CalcWindowSizePixel(); - aTbx.SetPosSizePixel( Point(), aSize ); - SetOutputSizePixel( aSize ); - aTbx.GetToolBox().SetSelectHdl( LINK(this, ScTbxInsertPopup, TbxSelectHdl)); - aTbxClickHdl = aTbx.GetToolBox().GetClickHdl(); - aTbx.GetToolBox().SetClickHdl( LINK(this, ScTbxInsertPopup, TbxClickHdl)); -} - -ScTbxInsertPopup::~ScTbxInsertPopup() -{ -} - -SfxPopupWindow* __EXPORT ScTbxInsertPopup::Clone() const -{ - return new ScTbxInsertPopup( GetId(), aTbx.GetToolBox().GetAlign(), - aRIdWinTemp, aRIdTbxTemp, - (SfxBindings&) GetBindings() ); -} - -void ScTbxInsertPopup::StartSelection() -{ - aTbx.GetToolBox().StartSelection(); -} - -IMPL_LINK(ScTbxInsertPopup, TbxSelectHdl, ToolBox*, pBox) -{ - EndPopupMode(); - - USHORT nLastSlotId = pBox->GetCurItemId(); - SfxUInt16Item aItem( GetId(), nLastSlotId ); - SfxDispatcher* pDisp = GetBindings().GetDispatcher(); - pDisp->Execute( GetId(), SFX_CALLMODE_SYNCHRON, &aItem, 0L ); - pDisp->Execute( nLastSlotId, SFX_CALLMODE_ASYNCHRON ); - return 0; -} - -IMPL_LINK(ScTbxInsertPopup, TbxClickHdl, ToolBox*, pBox) -{ - USHORT nLastSlotId = pBox->GetCurItemId(); - SfxUInt16Item aItem( GetId(), nLastSlotId ); - GetBindings().GetDispatcher()->Execute( GetId(), SFX_CALLMODE_SYNCHRON, &aItem, 0L ); - if(aTbxClickHdl.IsSet()) - aTbxClickHdl.Call(pBox); - return 0; -} - -void __EXPORT ScTbxInsertPopup::PopupModeEnd() -{ - aTbx.GetToolBox().EndSelection(); - SfxPopupWindow::PopupModeEnd(); -} -*/ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |