Remove unused code
Anders Jonsson
anders.jonsson at norsjonet.se
Tue Dec 21 22:50:53 PST 2010
---
sd/source/ui/app/tbxww.cxx | 134 -------------------------------------
sd/source/ui/notes/EditWindow.cxx | 94 +-------------------------
2 files changed, 1 insertions(+), 227 deletions(-)
diff --git a/sd/source/ui/app/tbxww.cxx b/sd/source/ui/app/tbxww.cxx
index e4a7d38..313e7b9 100644
--- a/sd/source/ui/app/tbxww.cxx
+++ b/sd/source/ui/app/tbxww.cxx
@@ -55,140 +55,6 @@ SFX_IMPL_TOOLBOX_CONTROL( SdTbxControl, TbxImageItem )
/*************************************************************************
|*
-|* PopUp-Window
-|*
-\************************************************************************/
-/*
-SdPopupWindowTbx::SdPopupWindowTbx( USHORT nId, WindowAlign eAlign,
- SdResId aRIdWin, SdResId aRIdTbx,
- SfxBindings& rBindings ) :
- SfxPopupWindow ( nId, aRIdWin, rBindings ),
- aTbx ( this, GetBindings(), aRIdTbx ),
- aSdResIdWin ( aRIdWin ),
- aSdResIdTbx ( aRIdTbx ),
- eTbxAlign ( eAlign )
-{
- aTbx.UseDefault();
- aSelectLink = aTbx.GetToolBox().GetSelectHdl();
- aTbx.GetToolBox().SetSelectHdl( LINK( this, SdPopupWindowTbx, TbxSelectHdl ) );
-
- FreeResource();
-
- if( ( eAlign == WINDOWALIGN_TOP ) || ( eAlign == WINDOWALIGN_BOTTOM ) )
- {
- if ( aSdResIdWin.GetId() != RID_TEXT )
- aTbx.GetToolBox().SetAlign( WINDOWALIGN_LEFT );
-
- SetText( String() );
- }
-
- AdaptToCTL();
-}
-
-
-void SdPopupWindowTbx::AdaptToCTL (void)
-{
- Size aSize = aTbx.CalcWindowSizePixel();
- if (aSdResIdWin.GetId() == RID_TEXT)
- {
- SvtCJKOptions aCJKOptions;
- if ( ! aCJKOptions.IsVerticalTextEnabled())
- {
- ToolBox& aToolBox = aTbx.GetToolBox();
-
- // Iterate over all tool box items and remove those that are
- // specific to complex text layout.
- USHORT i=0;
- while (i < aToolBox.GetItemCount())
- {
- USHORT nIndex = aToolBox.GetItemId(i);
- switch (nIndex)
- {
- case 0: // Line break.
- case SID_ATTR_CHAR_VERTICAL:
- case SID_TEXT_FITTOSIZE_VERTICAL:
- case SID_DRAW_CAPTION_VERTICAL:
- case SID_DRAW_FONTWORK_VERTICAL:
- aToolBox.RemoveItem (i);
- break;
-
- default:
- // Leave the item unmodified. Advance to the next one.
- i+=1;
- }
- }
- aToolBox.RecalcItems();
- // Why is this necessary?
- aToolBox.SetLineCount(1);
- USHORT nLineCount = aToolBox.GetLineCount();
- aSize = aToolBox.CalcWindowSizePixel(nLineCount);
- }
- }
- aTbx.SetPosSizePixel( Point(), aSize );
- SetOutputSizePixel( aSize );
-}
-*/
-
-/*-------------------------------------------------------------------------*/
-/*
-SdPopupWindowTbx::~SdPopupWindowTbx()
-{
-}
-*/
-/*-------------------------------------------------------------------------*/
-/*
-SfxPopupWindow* SdPopupWindowTbx::Clone() const
-{
- SfxBindings& rBindings = (SfxBindings&)GetBindings();
-
- return( new SdPopupWindowTbx( GetId(), eTbxAlign,
- aSdResIdWin, aSdResIdTbx, rBindings ) );
-
- //return( SfxPopupWindow::Clone() );
-}
-*/
-/*-------------------------------------------------------------------------*/
-/*
-void SdPopupWindowTbx::Update()
-{
- AdaptToCTL();
-
- ToolBox *pBox = &aTbx.GetToolBox();
- aTbx.Activate( pBox );
- aTbx.Deactivate( pBox );
-}
-*/
-/*-------------------------------------------------------------------------*/
-/*
-void SdPopupWindowTbx::PopupModeEnd()
-{
- aTbx.GetToolBox().EndSelection();
-
- SfxPopupWindow::PopupModeEnd();
-}
-*/
-/*-------------------------------------------------------------------------*/
-/*
-IMPL_LINK( SdPopupWindowTbx, TbxSelectHdl, ToolBox*, pBox)
-{
- if( IsInPopupMode() )
- EndPopupMode();
-
- aSelectLink.Call( &aTbx.GetToolBox() );
-
- if ( pBox->GetModifier() & KEY_MOD1 )
- {
- // #99013# if selected with control key, return focus to current view
- Window* pShellWnd = SfxViewShell::Current()->GetWindow();
- if ( pShellWnd )
- pShellWnd->GrabFocus();
- }
-
- return( 0L );
-}
-*/
-/*************************************************************************
-|*
|* Klasse fuer Toolbox
|*
\************************************************************************/
diff --git a/sd/source/ui/notes/EditWindow.cxx b/sd/source/ui/notes/EditWindow.cxx
index 5a76617..1ea0075 100644
--- a/sd/source/ui/notes/EditWindow.cxx
+++ b/sd/source/ui/notes/EditWindow.cxx
@@ -354,34 +354,7 @@ void EditWindow::MouseButtonDown(const MouseEvent &rEvt)
void EditWindow::Command(const CommandEvent& rCEvt)
{
- /* if (rCEvt.GetCommand() == COMMAND_CONTEXTMENU)
- {
- GetParent()->ToTop();
-
- Point aPoint = rCEvt.GetMousePosPixel();
- PopupMenu* pPopupMenu = new PopupMenu(SmResId(RID_COMMANDMENU));
-
- // added for replaceability of context menus #96085, #93782
- Menu* pMenu = NULL;
- ::com::sun::star::ui::ContextMenuExecuteEvent aEvent;
- aEvent.SourceWindow = VCLUnoHelper::GetInterface( this );
- aEvent.ExecutePosition.X = aPoint.X();
- aEvent.ExecutePosition.Y = aPoint.Y();
- if ( GetView()->TryContextMenuInterception( *pPopupMenu, pMenu, aEvent ) )
- {
- if ( pMenu )
- {
- delete pPopupMenu;
- pPopupMenu = (PopupMenu*) pMenu;
- }
- }
-
- pPopupMenu->SetSelectHdl(LINK(this, EditWindow, MenuSelectHdl));
-
- pPopupMenu->Execute( this, aPoint );
- delete pPopupMenu;
- }
- else*/ if (mpEditView)
+ if (mpEditView)
mpEditView->Command( rCEvt );
else
Window::Command (rCEvt);
@@ -389,78 +362,13 @@ void EditWindow::Command(const CommandEvent& rCEvt)
}
IMPL_LINK_INLINE_START( EditWindow, MenuSelectHdl, Menu *, EMPTYARG )
{
- /* SmViewShell *pViewSh = rCmdBox.GetView();
- if (pViewSh)
- pViewSh->GetViewFrame()->GetDispatcher()->Execute(
- SID_INSERTCOMMAND, SFX_CALLMODE_STANDARD,
- new SfxInt16Item(SID_INSERTCOMMAND, pMenu->GetCurItemId()), 0L);
-*/
return 0;
}
IMPL_LINK_INLINE_END( EditWindow, MenuSelectHdl, Menu *, EMPTYARG )
void EditWindow::KeyInput(const KeyEvent& )
{
- /* if (rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE)
- {
- BOOL bCallBase = TRUE;
- SfxViewShell* pViewShell = SfxViewShell::Current();
- if ( pViewShell && pViewShell->ISA(SmViewShell) )
- {
- SmDocShell* pDocSh = (SmDocShell*) pViewShell->GetViewFrame()->GetObjectShell();
- if (pDocSh)
- {
- // fuert zum (sofortigen) Zerstoeren von this!
- pDocSh->DoInPlaceActivate( FALSE );
- bCallBase = FALSE;
- }
- }
- if ( bCallBase )
- Window::KeyInput( rKEvt );
- }
- else
- {
- // Timer neu starten, um den Handler (auch bei längeren Eingaben)
- // möglichst nur einmal am Ende aufzurufen.
- aCursorMoveTimer.Start();
- DBG_ASSERT( mpEditView, "EditView missing (NULL pointer)" );
- if (!mpEditView)
- CreateEditView();
- if ( !mpEditView->PostKeyEvent(rKEvt) )
- {
- if ( !SfxViewShell::Current()->KeyInput(rKEvt) )
- {
- // fuert bei F1 (Hilfe) zum Zerstoeren von this!
- Flush();
- if ( aModifyTimer.IsActive() )
- aModifyTimer.Stop();
- Window::KeyInput(rKEvt);
- }
- else
- {
- //SFX hat evtl. Slot an der View gecallt und dabei (wg. Hack
- //im SFX) den Focus auf die View gesetzt
- SfxViewShell* pVShell = SfxViewShell::Current();
- if ( pVShell && pVShell->ISA(SmViewShell) &&
- ((SmViewShell*)pVShell)->GetGraphicWindow().HasFocus() )
- {
- GrabFocus();
- }
- }
- }
- else
- {
- // have doc-shell modified only for formula input/change and not
- // cursor travelling and such things...
- SmDocShell *pDocShell = GetDoc();
- if (pDocShell)
- pDocShell->SetModified( GetEditEngine()->IsModified() );
-
- aModifyTimer.Start();
- }
- }
- */
}
--
1.7.1
--------------010702080601020800060607--
More information about the LibreOffice
mailing list