diff options
author | Christian Lippka <cl@openoffice.org> | 2010-01-21 18:32:05 +0100 |
---|---|---|
committer | Christian Lippka <cl@openoffice.org> | 2010-01-21 18:32:05 +0100 |
commit | de4d52bd5546170ccdf93e97faee5f8cfb2d904c (patch) | |
tree | 6954f0df31b977d2c8780dc6dfc578c9548e95fa /sd/source/ui/app | |
parent | c5cf21811d1c40d9d78e220e846f04187c86deba (diff) |
added new toolbar controler for insert page
Diffstat (limited to 'sd/source/ui/app')
-rw-r--r-- | sd/source/ui/app/layoutctrl.cxx | 49 | ||||
-rw-r--r-- | sd/source/ui/app/res_bmp.src | 11 | ||||
-rw-r--r-- | sd/source/ui/app/sddll2.cxx | 1 |
3 files changed, 15 insertions, 46 deletions
diff --git a/sd/source/ui/app/layoutctrl.cxx b/sd/source/ui/app/layoutctrl.cxx index 9c23e0d09346..236f32c46b71 100644 --- a/sd/source/ui/app/layoutctrl.cxx +++ b/sd/source/ui/app/layoutctrl.cxx @@ -72,7 +72,9 @@ SFX_IMPL_TOOLBOX_CONTROL( SdLayoutControl, SfxVoidItem ); SdLayoutControl::SdLayoutControl( USHORT _nSlotId, USHORT _nId, ToolBox& rTbx ) : SfxToolBoxControl( _nSlotId, _nId, rTbx ) { - rTbx.SetItemBits( _nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( _nId ) ); + if( SID_INSERTPAGE != _nSlotId ) + rTbx.SetItemBits( _nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( _nId ) ); + rTbx.Invalidate(); } @@ -86,7 +88,7 @@ SdLayoutControl::~SdLayoutControl() void SdLayoutControl::Select( BOOL bMod1 ) { - (void)bMod1; + SfxToolBoxControl::Select( bMod1 ); } // ----------------------------------------------------------------------- @@ -113,50 +115,9 @@ SfxPopupWindow* SdLayoutControl::CreatePopupWindow() sd::ViewShellBase* pViewShellBase = sd::ViewShellBase::GetViewShellBase( SfxViewFrame::Current() ); if( pViewShellBase ) { - pWin = pWin = new sd::SdLayoutDialogContent( *pViewShellBase, &rTbx ); -// pWin->StartPopupMode( &rTbx, TRUE ); + pWin = pWin = new sd::SdLayoutDialogContent( *pViewShellBase, &rTbx, GetSlotId() == SID_INSERTPAGE ); if( pWin ) - { StartPopupMode( pWin ); -/* - pWin->EnableDocking(true); - Window::GetDockingManager()->StartPopupMode( &rTbx, pWin ); - - pWin->AddEventListener( LINK( this, SdLayoutControl, WindowEventListener ) ); -*/ - } } - -// SetPopupWindow( pWin ); - return 0; -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( SdLayoutControl, WindowEventListener, VclSimpleEvent*, pEvent ) -{ - VclWindowEvent* pWindowEvent = dynamic_cast< VclWindowEvent* >( pEvent ); - if ( pWindowEvent && pWindowEvent->GetWindow() ) - { - Window* pWindow = pWindowEvent->GetWindow(); - switch( pWindowEvent->GetId() ) - { - case VCLEVENT_WINDOW_ENDPOPUPMODE: - { - EndPopupModeData *pData = static_cast<EndPopupModeData*>(pWindowEvent->GetData()); - if( pData && pData->mbTearoff ); - { - pWindow->SetPosPixel( Point( pData->maFloatingPos.X(), pData->maFloatingPos.Y() ) ); - pWindow->Show(); - } - } - // fall through! - case VCLEVENT_WINDOW_CLOSE: - case VCLEVENT_OBJECT_DYING: - pWindow->RemoveEventListener( LINK( this, SdLayoutControl, WindowEventListener ) ); -// static_cast<SfxPopupWindow*>(pWindow)->PopupModeEnd(); - break; - } - } return 0; } diff --git a/sd/source/ui/app/res_bmp.src b/sd/source/ui/app/res_bmp.src index ff9d4a63946e..9257a52c3dd3 100644 --- a/sd/source/ui/app/res_bmp.src +++ b/sd/source/ui/app/res_bmp.src @@ -34,7 +34,7 @@ #include "res_bmp.hrc" // preview bitmaps for layouts -Bitmap BMP_ADDEMPTY_57X71 +Bitmap BMP_LAYOUT_ADDEMPTY_57X71 { File = "layout_addempty_57x71.png"; }; @@ -309,7 +309,14 @@ Bitmap BMP_PLACEHOLDER_TABLE_57X71_H { File = "placeholder_table_57x71_h.png"; }; - +Bitmap BMP_FOILN_01 +{ + File = "foiln01.bmp" ; +}; +Bitmap BMP_FOILN_01_H +{ + File = "foiln01_h.bmp" ; +}; Bitmap BMP_PAGE { File = "page.bmp" ; diff --git a/sd/source/ui/app/sddll2.cxx b/sd/source/ui/app/sddll2.cxx index 4cd293c0061c..606789ef84a9 100644 --- a/sd/source/ui/app/sddll2.cxx +++ b/sd/source/ui/app/sddll2.cxx @@ -218,4 +218,5 @@ void SdDLL::RegisterControllers() SvxSubToolBoxControl::RegisterControl(SID_OPTIMIZE_TABLE, pMod); SdLayoutControl::RegisterControl( SID_ASSIGN_LAYOUT, pMod ); + SdLayoutControl::RegisterControl( SID_INSERTPAGE, pMod ); } |