diff options
Diffstat (limited to 'sw/source/ui/ribbar')
-rw-r--r-- | sw/source/ui/ribbar/conarc.cxx | 158 | ||||
-rw-r--r-- | sw/source/ui/ribbar/concustomshape.cxx | 243 | ||||
-rw-r--r-- | sw/source/ui/ribbar/conform.cxx | 144 | ||||
-rw-r--r-- | sw/source/ui/ribbar/conpoly.cxx | 165 | ||||
-rw-r--r-- | sw/source/ui/ribbar/conrect.cxx | 231 | ||||
-rw-r--r-- | sw/source/ui/ribbar/drawbase.cxx | 728 | ||||
-rw-r--r-- | sw/source/ui/ribbar/dselect.cxx | 104 | ||||
-rw-r--r-- | sw/source/ui/ribbar/inputwin.cxx | 675 | ||||
-rw-r--r-- | sw/source/ui/ribbar/inputwin.hrc | 84 | ||||
-rw-r--r-- | sw/source/ui/ribbar/inputwin.src | 335 | ||||
-rw-r--r-- | sw/source/ui/ribbar/tblctrl.cxx | 96 | ||||
-rw-r--r-- | sw/source/ui/ribbar/tblctrl.hrc | 35 | ||||
-rw-r--r-- | sw/source/ui/ribbar/tbxanchr.cxx | 144 | ||||
-rw-r--r-- | sw/source/ui/ribbar/tbxanchr.src | 107 | ||||
-rw-r--r-- | sw/source/ui/ribbar/workctrl.cxx | 805 | ||||
-rw-r--r-- | sw/source/ui/ribbar/workctrl.hrc | 85 | ||||
-rw-r--r-- | sw/source/ui/ribbar/workctrl.src | 409 |
17 files changed, 0 insertions, 4548 deletions
diff --git a/sw/source/ui/ribbar/conarc.cxx b/sw/source/ui/ribbar/conarc.cxx deleted file mode 100644 index fde2a98d7d..0000000000 --- a/sw/source/ui/ribbar/conarc.cxx +++ /dev/null @@ -1,158 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sw.hxx" - - -#include <svx/svdobj.hxx> - - -#include "view.hxx" -#include "edtwin.hxx" -#include "wrtsh.hxx" -#include "drawbase.hxx" -#include "conarc.hxx" - - - -/************************************************************************* -|* -|* Konstruktor -|* -\************************************************************************/ - - - -ConstArc::ConstArc(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView) - : SwDrawBase(pWrtShell, pEditWin, pSwView), nAnzButUp(0) -{ -} - -/************************************************************************* -|* -|* MouseButtonDown-event -|* -\************************************************************************/ - - - -sal_Bool ConstArc::MouseButtonDown( const MouseEvent& rMEvt ) -{ - sal_Bool bReturn; - - if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == sal_True) - { - if (!nAnzButUp) - aStartPnt = m_pWin->PixelToLogic(rMEvt.GetPosPixel()); - } - return (bReturn); -} - -/************************************************************************* -|* -|* MouseButtonUp-event -|* -\************************************************************************/ - - - -sal_Bool ConstArc::MouseButtonUp( const MouseEvent& rMEvt ) -{ - sal_Bool bReturn = sal_False; - - if ((m_pSh->IsDrawCreate() || m_pWin->IsDrawAction()) && rMEvt.IsLeft()) - { - Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel())); - if (!nAnzButUp && aPnt == aStartPnt) - { - SwDrawBase::MouseButtonUp(rMEvt); - bReturn = sal_True; - } - else - { nAnzButUp++; - - if (nAnzButUp == 3) // Kreisbogenerzeugung beendet - { - SwDrawBase::MouseButtonUp(rMEvt); - nAnzButUp = 0; - bReturn = sal_True; - } - else - m_pSh->EndCreate(SDRCREATE_NEXTPOINT); - } - } - - return (bReturn); -} - -/************************************************************************* -|* -|* Function aktivieren -|* -\************************************************************************/ - - - -void ConstArc::Activate(const sal_uInt16 nSlotId) -{ - switch (nSlotId) - { - case SID_DRAW_ARC: - m_pWin->SetSdrDrawMode(OBJ_CARC); - break; - case SID_DRAW_PIE: - m_pWin->SetSdrDrawMode(OBJ_SECT); - break; - case SID_DRAW_CIRCLECUT: - m_pWin->SetSdrDrawMode(OBJ_CCUT); - break; - default: - m_pWin->SetSdrDrawMode(OBJ_NONE); - break; - } - - SwDrawBase::Activate(nSlotId); -} - -/************************************************************************* -|* -|* Funktion deaktivieren -|* -\************************************************************************/ - -void ConstArc::Deactivate() -{ - nAnzButUp = 0; - - SwDrawBase::Deactivate(); -} - - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/ribbar/concustomshape.cxx b/sw/source/ui/ribbar/concustomshape.cxx deleted file mode 100644 index ff266f1b47..0000000000 --- a/sw/source/ui/ribbar/concustomshape.cxx +++ /dev/null @@ -1,243 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sw.hxx" - - -#include <sfx2/bindings.hxx> -#include <svx/htmlmode.hxx> -#include <svx/sdtacitm.hxx> -#include <svx/svdobj.hxx> -#include <svx/sdtagitm.hxx> -#include <svx/sdtakitm.hxx> -#include <svx/sdtaditm.hxx> -#include <svx/sdtaaitm.hxx> -#include <svx/svdview.hxx> -#include <svx/svdocapt.hxx> -#include <editeng/outlobj.hxx> -#include <cmdid.h> -#include <view.hxx> -#include <edtwin.hxx> -#include <wrtsh.hxx> -#include <viewopt.hxx> -#include <drawbase.hxx> -#include <concustomshape.hxx> -#include <svx/gallery.hxx> -#include <sfx2/request.hxx> -#include <svx/fmmodel.hxx> -#include <svl/itempool.hxx> -#include <svx/svdpage.hxx> -#include <svx/svdoashp.hxx> -#include <editeng/adjitem.hxx> - -#include <math.h> - -/************************************************************************* -|* -|* C'Tor -|* -\************************************************************************/ -ConstCustomShape::ConstCustomShape( SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView, SfxRequest& rReq ) - : SwDrawBase( pWrtShell, pEditWin, pSwView ) -{ - aCustomShape = ConstCustomShape::GetShapeTypeFromRequest( rReq ); -} - -/************************************************************************* -|* -\************************************************************************/ - -rtl::OUString ConstCustomShape::GetShapeType() const -{ - return aCustomShape; -} - -//static -rtl::OUString ConstCustomShape::GetShapeTypeFromRequest( SfxRequest& rReq ) -{ - rtl::OUString aRet; - const SfxItemSet* pArgs = rReq.GetArgs(); - if ( pArgs ) - { - const SfxStringItem& rItm = (const SfxStringItem&)pArgs->Get( rReq.GetSlot() ); - aRet = rItm.GetValue(); - } - return aRet; -} - -/************************************************************************* -|* -|* MouseButtonDown-event -|* -\************************************************************************/ - -sal_Bool ConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt) -{ - sal_Bool bReturn = SwDrawBase::MouseButtonDown(rMEvt); - if ( bReturn ) - { - SdrView *pSdrView = m_pSh->GetDrawView(); - if ( pSdrView ) - { - SdrObject* pObj = pSdrView->GetCreateObj(); - if ( pObj ) - { - SetAttributes( pObj ); - sal_Bool bForceNoFillStyle = sal_False; - if ( ((SdrObjCustomShape*)pObj)->UseNoFillStyle() ) - bForceNoFillStyle = sal_True; - - SfxItemSet aAttr( m_pView->GetPool() ); - if ( bForceNoFillStyle ) - aAttr.Put( XFillStyleItem( XFILL_NONE ) ); - pObj->SetMergedItemSet(aAttr); - } - } - } - return bReturn; -} - -/************************************************************************* -|* -|* MouseButtonUp-event -|* -\************************************************************************/ - -sal_Bool ConstCustomShape::MouseButtonUp(const MouseEvent& rMEvt) -{ - return SwDrawBase::MouseButtonUp(rMEvt); -} - -/************************************************************************* -|* -|* activate function -|* -\************************************************************************/ - -void ConstCustomShape::Activate(const sal_uInt16 nSlotId) -{ - m_pWin->SetSdrDrawMode( OBJ_CUSTOMSHAPE ); - - SwDrawBase::Activate(nSlotId); -} - -/************************************************************************* -|* -|* applying attributes -|* -\************************************************************************/ - -void ConstCustomShape::SetAttributes( SdrObject* pObj ) -{ - sal_Bool bAttributesAppliedFromGallery = sal_False; - - if ( GalleryExplorer::GetSdrObjCount( GALLERY_THEME_POWERPOINT ) ) - { - std::vector< rtl::OUString > aObjList; - if ( GalleryExplorer::FillObjListTitle( GALLERY_THEME_POWERPOINT, aObjList ) ) - { - sal_uInt16 i; - for ( i = 0; i < aObjList.size(); i++ ) - { - if ( aObjList[ i ].equalsIgnoreAsciiCase( aCustomShape ) ) - { - FmFormModel aFormModel; - SfxItemPool& rPool = aFormModel.GetItemPool(); - rPool.FreezeIdRanges(); - if ( GalleryExplorer::GetSdrObj( GALLERY_THEME_POWERPOINT, i, &aFormModel ) ) - { - const SdrObject* pSourceObj = aFormModel.GetPage( 0 )->GetObj( 0 ); - if( pSourceObj ) - { - const SfxItemSet& rSource = pSourceObj->GetMergedItemSet(); - SfxItemSet aDest( pObj->GetModel()->GetItemPool(), // ranges from SdrAttrObj - SDRATTR_START, SDRATTR_SHADOW_LAST, - SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST, - SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION, - // Graphic Attributes - SDRATTR_GRAF_FIRST, SDRATTR_GRAF_LAST, - // 3d Properties - SDRATTR_3D_FIRST, SDRATTR_3D_LAST, - // CustomShape properties - SDRATTR_CUSTOMSHAPE_FIRST, SDRATTR_CUSTOMSHAPE_LAST, - // range from SdrTextObj - EE_ITEMS_START, EE_ITEMS_END, - // end - 0, 0); - aDest.Set( rSource ); - pObj->SetMergedItemSet( aDest ); - sal_Int32 nAngle = pSourceObj->GetRotateAngle(); - if ( nAngle ) - { - double a = nAngle * F_PI18000; - pObj->NbcRotate( pObj->GetSnapRect().Center(), nAngle, sin( a ), cos( a ) ); - } - bAttributesAppliedFromGallery = sal_True; - } - } - break; - } - } - } - } - if ( !bAttributesAppliedFromGallery ) - { - pObj->SetMergedItem( SvxAdjustItem( SVX_ADJUST_CENTER, RES_PARATR_ADJUST ) ); - pObj->SetMergedItem( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) ); - pObj->SetMergedItem( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_BLOCK ) ); - pObj->SetMergedItem( SdrTextAutoGrowHeightItem( sal_False ) ); - ((SdrObjCustomShape*)pObj)->MergeDefaultAttributes( &aCustomShape ); - } -} - -void ConstCustomShape::CreateDefaultObject() -{ - SwDrawBase::CreateDefaultObject(); - SdrView *pSdrView = m_pSh->GetDrawView(); - if ( pSdrView ) - { - const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList(); - if ( rMarkList.GetMarkCount() == 1 ) - { - SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); - if ( pObj && pObj->ISA( SdrObjCustomShape ) ) - SetAttributes( pObj ); - } - } -} - -// #i33136# -bool ConstCustomShape::doConstructOrthogonal() const -{ - return SdrObjCustomShape::doConstructOrthogonal(aCustomShape); -} - -// eof - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/ribbar/conform.cxx b/sw/source/ui/ribbar/conform.cxx deleted file mode 100644 index 46082251a8..0000000000 --- a/sw/source/ui/ribbar/conform.cxx +++ /dev/null @@ -1,144 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sw.hxx" - - -#include <svx/fmglob.hxx> -#include <svx/svdview.hxx> -#include <svx/fmshell.hxx> - -#include "view.hxx" -#include "edtwin.hxx" -#include "wrtsh.hxx" -#include "drawbase.hxx" -#include "conform.hxx" - -extern sal_Bool bNoInterrupt; // in mainwn.cxx - -/************************************************************************* -|* -|* Konstruktor -|* -\************************************************************************/ - - -ConstFormControl::ConstFormControl(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView) : - SwDrawBase(pWrtShell, pEditWin, pSwView) -{ - m_bInsForm = sal_True; -} - -/************************************************************************* -|* -|* MouseButtonDown-event -|* -\************************************************************************/ - - -sal_Bool ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt) -{ - sal_Bool bReturn = sal_False; - - SdrView *pSdrView = m_pSh->GetDrawView(); - - pSdrView->SetOrtho(rMEvt.IsShift()); - pSdrView->SetAngleSnapEnabled(rMEvt.IsShift()); - - if (rMEvt.IsMod2()) - { - pSdrView->SetCreate1stPointAsCenter(sal_True); - pSdrView->SetResizeAtCenter(sal_True); - } - else - { - pSdrView->SetCreate1stPointAsCenter(sal_False); - pSdrView->SetResizeAtCenter(sal_False); - } - - SdrViewEvent aVEvt; - SdrHitKind eHit = pSdrView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); - - // Nur neues Objekt, wenn nicht im Basismode (bzw reinem Selektionsmode) - if (rMEvt.IsLeft() && !m_pWin->IsDrawAction() && - (eHit == SDRHIT_UNMARKEDOBJECT || eHit == SDRHIT_NONE || m_pSh->IsDrawCreate())) - { - bNoInterrupt = sal_True; - m_pWin->CaptureMouse(); - - m_pWin->SetPointer(Pointer(POINTER_DRAW_RECT)); - - m_aStartPos = m_pWin->PixelToLogic(rMEvt.GetPosPixel()); - bReturn = m_pSh->BeginCreate( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, m_aStartPos); - - if (bReturn) - m_pWin->SetDrawAction(sal_True); - } - else - bReturn = SwDrawBase::MouseButtonDown(rMEvt); - - return (bReturn); -} - -/************************************************************************* -|* -|* Function aktivieren -|* -\************************************************************************/ - - -void ConstFormControl::Activate(const sal_uInt16 nSlotId) -{ - m_pWin->SetSdrDrawMode( static_cast<SdrObjKind>(nSlotId) ); - SwDrawBase::Activate(nSlotId); - m_pSh->GetDrawView()->SetCurrentObj(nSlotId); - - m_pWin->SetPointer(Pointer(POINTER_DRAW_RECT)); -} - -void ConstFormControl::CreateDefaultObject() -{ - Point aStartPos(GetDefaultCenterPos()); - Point aEndPos(aStartPos); - aStartPos.X() -= 2 * MM50; - aStartPos.Y() -= MM50; - aEndPos.X() += 2 * MM50; - aEndPos.Y() += MM50; - - if(!m_pSh->HasDrawView()) - m_pSh->MakeDrawView(); - - SdrView *pSdrView = m_pSh->GetDrawView(); - pSdrView->SetDesignMode(sal_True); - m_pSh->BeginCreate( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), FmFormInventor, aStartPos); - m_pSh->MoveCreate(aEndPos); - m_pSh->EndCreate(SDRCREATE_FORCEEND); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/ribbar/conpoly.cxx b/sw/source/ui/ribbar/conpoly.cxx deleted file mode 100644 index 5dbb5583ba..0000000000 --- a/sw/source/ui/ribbar/conpoly.cxx +++ /dev/null @@ -1,165 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sw.hxx" - - -#include <svx/svdmark.hxx> -#include <svx/svdview.hxx> -#include <svx/svdopath.hxx> - -#include "view.hxx" -#include "edtwin.hxx" -#include "wrtsh.hxx" -#include "drawbase.hxx" -#include "conpoly.hxx" -#include <basegfx/polygon/b2dpolygon.hxx> - -/************************************************************************* -|* -|* Konstruktor -|* -\************************************************************************/ - - - -ConstPolygon::ConstPolygon(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView) : - SwDrawBase(pWrtShell, pEditWin, pSwView) -{ -} - -/************************************************************************* -|* -|* MouseButtonDown-event -|* -\************************************************************************/ - - - -sal_Bool ConstPolygon::MouseButtonDown(const MouseEvent& rMEvt) -{ - sal_Bool bReturn; - - if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == sal_True) - aLastPos = rMEvt.GetPosPixel(); - - return (bReturn); -} - -/************************************************************************* -|* -|* MouseMove-event -|* -\************************************************************************/ - - - -sal_Bool ConstPolygon::MouseMove(const MouseEvent& rMEvt) -{ - sal_Bool bReturn = sal_False; - - bReturn = SwDrawBase::MouseMove(rMEvt); - - return bReturn; -} - -/************************************************************************* -|* -|* MouseButtonUp-event -|* -\************************************************************************/ - - - -sal_Bool ConstPolygon::MouseButtonUp(const MouseEvent& rMEvt) -{ - sal_Bool bReturn = sal_False; - - if (m_pSh->IsDrawCreate()) - { - if (rMEvt.IsLeft() && rMEvt.GetClicks() == 1 && - m_pWin->GetSdrDrawMode() != OBJ_FREELINE) - { - if (!m_pSh->EndCreate(SDRCREATE_NEXTPOINT)) - { - m_pSh->BreakCreate(); - EnterSelectMode(rMEvt); - return sal_True; - } - } - else - { - Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel())); - bReturn = SwDrawBase::MouseButtonUp(rMEvt); - - // #i85045# removed double mechanism to check for AutoClose polygon - // after construction; the method here did not check for already closed and - // also worked only for a single polygon. Removing. - } - } - else - bReturn = SwDrawBase::MouseButtonUp(rMEvt); - - return (bReturn); -} - -/************************************************************************* -|* -|* Function aktivieren -|* -\************************************************************************/ - - - -void ConstPolygon::Activate(const sal_uInt16 nSlotId) -{ - switch (nSlotId) - { - case SID_DRAW_POLYGON_NOFILL: - m_pWin->SetSdrDrawMode(OBJ_PLIN); - break; - - case SID_DRAW_BEZIER_NOFILL: - m_pWin->SetSdrDrawMode(OBJ_PATHLINE); - break; - - case SID_DRAW_FREELINE_NOFILL: - m_pWin->SetSdrDrawMode(OBJ_FREELINE); - break; - - default: - break; - } - - SwDrawBase::Activate(nSlotId); -} - - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/ribbar/conrect.cxx b/sw/source/ui/ribbar/conrect.cxx deleted file mode 100644 index 315006cc3d..0000000000 --- a/sw/source/ui/ribbar/conrect.cxx +++ /dev/null @@ -1,231 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sw.hxx" - - -#include <sfx2/bindings.hxx> -#include <svx/htmlmode.hxx> -#include <svx/sdtacitm.hxx> -#include <svx/svdobj.hxx> -#include <svx/sdtagitm.hxx> -#include <svx/sdtakitm.hxx> -#include <svx/sdtaditm.hxx> -#include <svx/sdtaaitm.hxx> -#include <svx/svdview.hxx> -#include <svx/svdocapt.hxx> -#include <editeng/outlobj.hxx> -#include <cmdid.h> -#include <view.hxx> -#include <edtwin.hxx> -#include <wrtsh.hxx> -#include <viewopt.hxx> -#include <drawbase.hxx> -#include <conrect.hxx> - - -/************************************************************************* -|* -|* Konstruktor -|* -\************************************************************************/ - -ConstRectangle::ConstRectangle( SwWrtShell* pWrtShell, SwEditWin* pEditWin, - SwView* pSwView ) - : SwDrawBase( pWrtShell, pEditWin, pSwView ), - bMarquee(sal_False), - // #93382# - mbVertical(sal_False) -{ -} - -/************************************************************************* -|* -|* MouseButtonDown-event -|* -\************************************************************************/ - -sal_Bool ConstRectangle::MouseButtonDown(const MouseEvent& rMEvt) -{ - sal_Bool bReturn; - - if ((bReturn = SwDrawBase::MouseButtonDown(rMEvt)) == sal_True - && m_pWin->GetSdrDrawMode() == OBJ_CAPTION) - { - m_pView->NoRotate(); - if (m_pView->IsDrawSelMode()) - { - m_pView->FlipDrawSelMode(); - m_pSh->GetDrawView()->SetFrameDragSingles(m_pView->IsDrawSelMode()); - } - } - return (bReturn); -} - -/************************************************************************* -|* -|* MouseButtonUp-event -|* -\************************************************************************/ - -sal_Bool ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt) -{ - Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel())); - - sal_Bool bRet = SwDrawBase::MouseButtonUp(rMEvt); - if( bRet ) - { - SdrView *pSdrView = m_pSh->GetDrawView(); - const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList(); - SdrObject* pObj = rMarkList.GetMark(0) ? rMarkList.GetMark(0)->GetMarkedSdrObj() - : 0; - switch( m_pWin->GetSdrDrawMode() ) - { - case OBJ_TEXT: - if( bMarquee ) - { - m_pSh->ChgAnchor(FLY_AS_CHAR); - - if( pObj ) - { - // die fuer das Scrollen benoetigten Attribute setzen - SfxItemSet aItemSet( pSdrView->GetModel()->GetItemPool(), - SDRATTR_MISC_FIRST, SDRATTR_MISC_LAST); - - aItemSet.Put( SdrTextAutoGrowWidthItem( sal_False ) ); - aItemSet.Put( SdrTextAutoGrowHeightItem( sal_False ) ); - aItemSet.Put( SdrTextAniKindItem( SDRTEXTANI_SCROLL ) ); - aItemSet.Put( SdrTextAniDirectionItem( SDRTEXTANI_LEFT ) ); - aItemSet.Put( SdrTextAniCountItem( 0 ) ); - aItemSet.Put( SdrTextAniAmountItem( - (sal_Int16)m_pWin->PixelToLogic(Size(2,1)).Width()) ); - - pObj->SetMergedItemSetAndBroadcast(aItemSet); - } - } - else if(mbVertical && pObj && pObj->ISA(SdrTextObj)) - { - // #93382# - SdrTextObj* pText = (SdrTextObj*)pObj; - SfxItemSet aSet(pSdrView->GetModel()->GetItemPool()); - - pText->SetVerticalWriting(sal_True); - - aSet.Put(SdrTextAutoGrowWidthItem(sal_True)); - aSet.Put(SdrTextAutoGrowHeightItem(sal_False)); - aSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP)); - aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT)); - - pText->SetMergedItemSet(aSet); - } - if( pObj ) - { - SdrPageView* pPV = pSdrView->GetSdrPageView(); - m_pView->BeginTextEdit( pObj, pPV, m_pWin, sal_True ); - } - m_pView->LeaveDrawCreate(); // In Selektionsmode wechseln - m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW); - break; - - case OBJ_CAPTION: - { - SdrCaptionObj* pCaptObj = dynamic_cast<SdrCaptionObj*>(pObj); - if( bCapVertical && pCaptObj ) - { - pCaptObj->ForceOutlinerParaObject(); - OutlinerParaObject* pOPO = pCaptObj->GetOutlinerParaObject(); - if( pOPO && !pOPO->IsVertical() ) - pOPO->SetVertical( sal_True ); - } - } - break; - default:; //prevent warning - } - } - return bRet; -} - -/************************************************************************* -|* -|* Function aktivieren -|* -\************************************************************************/ - -void ConstRectangle::Activate(const sal_uInt16 nSlotId) -{ - bMarquee = bCapVertical = sal_False; - mbVertical = sal_False; - - switch (nSlotId) - { - case SID_DRAW_LINE: - m_pWin->SetSdrDrawMode(OBJ_LINE); - break; - - case SID_DRAW_RECT: - m_pWin->SetSdrDrawMode(OBJ_RECT); - break; - - case SID_DRAW_ELLIPSE: - m_pWin->SetSdrDrawMode(OBJ_CIRC); - break; - - case SID_DRAW_TEXT_MARQUEE: - bMarquee = sal_True; - m_pWin->SetSdrDrawMode(OBJ_TEXT); - break; - - case SID_DRAW_TEXT_VERTICAL: - // #93382# - mbVertical = sal_True; - m_pWin->SetSdrDrawMode(OBJ_TEXT); - break; - - case SID_DRAW_TEXT: - m_pWin->SetSdrDrawMode(OBJ_TEXT); - break; - - case SID_DRAW_CAPTION_VERTICAL: - bCapVertical = sal_True; - // no break - case SID_DRAW_CAPTION: - m_pWin->SetSdrDrawMode(OBJ_CAPTION); - break; - - default: - m_pWin->SetSdrDrawMode(OBJ_NONE); - break; - } - - SwDrawBase::Activate(nSlotId); -} - - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/ribbar/drawbase.cxx b/sw/source/ui/ribbar/drawbase.cxx deleted file mode 100644 index 1b28476669..0000000000 --- a/sw/source/ui/ribbar/drawbase.cxx +++ /dev/null @@ -1,728 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sw.hxx" - -#include <hintids.hxx> -#include <svx/svdview.hxx> -#include <svx/svdobj.hxx> -#include <svl/ptitem.hxx> -#include <editeng/sizeitem.hxx> -#include <sfx2/request.hxx> -#include <sfx2/bindings.hxx> -#include <fmtclds.hxx> -#include <frmfmt.hxx> -#include "cmdid.h" -#include "basesh.hxx" -#include "view.hxx" -#include "wrtsh.hxx" -#include "drawbase.hxx" -#include "edtwin.hxx" -#include "caption.hxx" -#include "swundo.hxx" -#include <SwRewriter.hxx> -#include "comcore.hrc" - -using namespace ::com::sun::star; - -extern sal_Bool bNoInterrupt; // in mainwn.cxx - -#define MINMOVE ((sal_uInt16)m_pSh->GetOut()->PixelToLogic(Size(m_pSh->GetDrawView()->GetMarkHdlSizePixel()/2,0)).Width()) - - -/************************************************************************* -|* -|* Konstruktor -|* -\************************************************************************/ - - -SwDrawBase::SwDrawBase(SwWrtShell* pSwWrtShell, SwEditWin* pWindow, SwView* pSwView) : - m_pView(pSwView), - m_pSh(pSwWrtShell), - m_pWin(pWindow), - m_nSlotId(USHRT_MAX), - m_bCreateObj(sal_True), - m_bInsForm(sal_False) -{ - if ( !m_pSh->HasDrawView() ) - m_pSh->MakeDrawView(); -} - -/************************************************************************* -|* -|* Destruktor -|* -\************************************************************************/ - -SwDrawBase::~SwDrawBase() -{ - if (m_pView->GetWrtShellPtr()) // Im view-Dtor koennte die wrtsh bereits geloescht worden sein... - m_pSh->GetDrawView()->SetEditMode(sal_True); -} - -/************************************************************************* -|* -|* MouseButtonDown-event -|* -\************************************************************************/ - - -sal_Bool SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt) -{ - sal_Bool bReturn = sal_False; - - SdrView *pSdrView = m_pSh->GetDrawView(); - - // #i33136# - pSdrView->SetOrtho(doConstructOrthogonal() ? !rMEvt.IsShift() : rMEvt.IsShift()); - pSdrView->SetAngleSnapEnabled(rMEvt.IsShift()); - - if (rMEvt.IsMod2()) - { - pSdrView->SetCreate1stPointAsCenter(sal_True); - pSdrView->SetResizeAtCenter(sal_True); - } - else - { - pSdrView->SetCreate1stPointAsCenter(sal_False); - pSdrView->SetResizeAtCenter(sal_False); - } - - SdrViewEvent aVEvt; - SdrHitKind eHit = pSdrView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); - - // Nur neues Objekt, wenn nicht im Basismode (bzw reinem Selektionsmode) - if (rMEvt.IsLeft() && !m_pWin->IsDrawAction()) - { - if (IsCreateObj() && (eHit == SDRHIT_UNMARKEDOBJECT || eHit == SDRHIT_NONE || m_pSh->IsDrawCreate())) - { - bNoInterrupt = sal_True; - m_pWin->CaptureMouse(); - - m_aStartPos = m_pWin->PixelToLogic(rMEvt.GetPosPixel()); - - bReturn = m_pSh->BeginCreate( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), m_aStartPos); - - SetDrawPointer(); - - if ( bReturn ) - m_pWin->SetDrawAction(sal_True); - } - else if (!pSdrView->IsAction()) - { - /********************************************************************** - * BEZIER-EDITOR - **********************************************************************/ - m_pWin->CaptureMouse(); - m_aStartPos = m_pWin->PixelToLogic(rMEvt.GetPosPixel()); - sal_uInt16 nEditMode = m_pWin->GetBezierMode(); - - if (eHit == SDRHIT_HANDLE && aVEvt.pHdl->GetKind() == HDL_BWGT) - { - /****************************************************************** - * Handle draggen - ******************************************************************/ - bNoInterrupt = sal_True; - bReturn = pSdrView->BegDragObj(m_aStartPos, (OutputDevice*) NULL, aVEvt.pHdl); - m_pWin->SetDrawAction(sal_True); - } - else if (eHit == SDRHIT_MARKEDOBJECT && nEditMode == SID_BEZIER_INSERT) - { - /****************************************************************** - * Klebepunkt einfuegen - ******************************************************************/ - bNoInterrupt = sal_True; - bReturn = pSdrView->BegInsObjPoint(m_aStartPos, rMEvt.IsMod1()); - m_pWin->SetDrawAction(sal_True); - } - else if (eHit == SDRHIT_MARKEDOBJECT && rMEvt.IsMod1()) - { - /****************************************************************** - * Klebepunkt selektieren - ******************************************************************/ - if (!rMEvt.IsShift()) - pSdrView->UnmarkAllPoints(); - - bReturn = pSdrView->BegMarkPoints(m_aStartPos); - m_pWin->SetDrawAction(sal_True); - } - else if (eHit == SDRHIT_MARKEDOBJECT && !rMEvt.IsShift() && !rMEvt.IsMod2()) - { - /****************************************************************** - * Objekt verschieben - ******************************************************************/ - return sal_False; - } - else if (eHit == SDRHIT_HANDLE) - { - /****************************************************************** - * Klebepunkt selektieren - ******************************************************************/ - if (pSdrView->HasMarkablePoints() && (!pSdrView->IsPointMarked(*aVEvt.pHdl) || rMEvt.IsShift())) - { - SdrHdl* pHdl = NULL; - - if (!rMEvt.IsShift()) - { - pSdrView->UnmarkAllPoints(); - pHdl = pSdrView->PickHandle(m_aStartPos); - } - else - { - if (pSdrView->IsPointMarked(*aVEvt.pHdl)) - { - bReturn = pSdrView->UnmarkPoint(*aVEvt.pHdl); - pHdl = NULL; - } - else - { - pHdl = pSdrView->PickHandle(m_aStartPos); - } - } - - if (pHdl) - { - bNoInterrupt = sal_True; - pSdrView->MarkPoint(*pHdl); - } - } - } - else - { - /****************************************************************** - * Objekt selektieren oder draggen - ******************************************************************/ - if (m_pSh->IsObjSelectable(m_aStartPos) && eHit == SDRHIT_UNMARKEDOBJECT) - { - if (pSdrView->HasMarkablePoints()) - pSdrView->UnmarkAllPoints(); - - bNoInterrupt = sal_False; - // Drag im edtwin verwenden - return sal_False; - } - - bNoInterrupt = sal_True; - - if (m_pSh->IsObjSelected()) - { - if (!rMEvt.IsShift()) - { - if (!pSdrView->HasMarkablePoints()) - { - sal_Bool bUnlockView = !m_pSh->IsViewLocked(); - m_pSh->LockView( sal_True ); //lock visible section - m_pSh->SelectObj(Point(LONG_MAX, LONG_MAX)); // deselect all - if( bUnlockView ) - m_pSh->LockView( sal_False ); - } - else - pSdrView->UnmarkAllPoints(); - } - } - if (!m_pSh->IsSelFrmMode()) - m_pSh->EnterSelFrmMode(NULL); - - if( 0 != (bReturn = m_pSh->BeginMark(m_aStartPos)) ) - m_pWin->SetDrawAction(sal_True); - - SetDrawPointer(); - } - } - } - return bReturn; -} - -/************************************************************************* -|* -|* MouseMove-event -|* -\************************************************************************/ - - -sal_Bool SwDrawBase::MouseMove(const MouseEvent& rMEvt) -{ - SdrView *pSdrView = m_pSh->GetDrawView(); - Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel())); - sal_Bool bRet = sal_False; - - if (IsCreateObj() && !m_pWin->IsDrawSelMode() && pSdrView->IsCreateObj()) - { - // #i33136# - pSdrView->SetOrtho(doConstructOrthogonal() ? !rMEvt.IsShift() : rMEvt.IsShift()); - pSdrView->SetAngleSnapEnabled(rMEvt.IsShift()); - - m_pSh->MoveCreate(aPnt); - bRet = sal_True; - } - else if (pSdrView->IsAction() || pSdrView->IsInsObjPoint() || pSdrView->IsMarkPoints()) - { - m_pSh->MoveMark(aPnt); - bRet = sal_True; - } - - return (bRet); -} - -/************************************************************************* -|* -|* MouseButtonUp-event -|* -\************************************************************************/ - - -sal_Bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt) -{ - sal_Bool bReturn = sal_False; - sal_Bool bCheckShell = sal_False; - sal_Bool bAutoCap = sal_False; - - Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel())); - - if (IsCreateObj() && m_pSh->IsDrawCreate() && !m_pWin->IsDrawSelMode()) - { - const SdrObjKind nDrawMode = m_pWin->GetSdrDrawMode(); - //objects with multiple point may end at the start position - sal_Bool bMultiPoint = OBJ_PLIN == nDrawMode || - OBJ_PATHLINE == nDrawMode || - OBJ_FREELINE == nDrawMode; - if(rMEvt.IsRight() || (aPnt == m_aStartPos && !bMultiPoint)) - { - m_pSh->BreakCreate(); - m_pView->LeaveDrawCreate(); - } - else - { - if (OBJ_NONE == nDrawMode) - { - SwRewriter aRewriter; - - aRewriter.AddRule(UNDO_ARG1, SW_RES(STR_FRAME)); - m_pSh->StartUndo(UNDO_INSERT, &aRewriter); - } - - m_pSh->EndCreate(SDRCREATE_FORCEEND); - if (OBJ_NONE == nDrawMode) // Textrahmen eingefuegt - { - uno::Reference< frame::XDispatchRecorder > xRecorder = - m_pSh->GetView().GetViewFrame()->GetBindings().GetRecorder(); - if ( xRecorder.is() ) - { - SfxRequest aReq(m_pSh->GetView().GetViewFrame(),FN_INSERT_FRAME); - aReq.AppendItem(SfxUInt16Item( FN_INSERT_FRAME, - static_cast<sal_uInt16>(FLY_AT_PARA) )); - aReq.AppendItem(SfxPointItem( FN_PARAM_1, m_pSh->GetAnchorObjDiff())); - aReq.AppendItem(SvxSizeItem( FN_PARAM_2, m_pSh->GetObjSize())); - aReq.Done(); - } - bAutoCap = sal_True; - if(m_pWin->GetFrmColCount() > 1) - { - SfxItemSet aSet(m_pView->GetPool(),RES_COL,RES_COL); - SwFmtCol aCol((const SwFmtCol&)aSet.Get(RES_COL)); - aCol.Init(m_pWin->GetFrmColCount(), aCol.GetGutterWidth(), aCol.GetWishWidth()); - aSet.Put(aCol); - // Vorlagen-AutoUpdate - SwFrmFmt* pFmt = m_pSh->GetCurFrmFmt(); - if(pFmt && pFmt->IsAutoUpdateFmt()) - m_pSh->AutoUpdateFrame(pFmt, aSet); - else - m_pSh->SetFlyFrmAttr( aSet ); - } - } - if (m_pWin->GetSdrDrawMode() == OBJ_NONE) - { - m_pSh->EndUndo(); - } - } - - bReturn = sal_True; - - EnterSelectMode(rMEvt); - } - else - { - SdrView *pSdrView = m_pSh->GetDrawView(); - - if (!pSdrView->HasMarkablePoints()) - { - /********************************************************************** - * KEIN BEZIER_EDITOR - **********************************************************************/ - if ((m_pSh->GetDrawView()->IsMarkObj() || m_pSh->GetDrawView()->IsMarkPoints()) - && rMEvt.IsLeft()) - { - bReturn = m_pSh->EndMark(); - - m_pWin->SetDrawAction(sal_False); - - if (aPnt == m_aStartPos && m_pSh->IsObjSelectable(aPnt)) - { - m_pSh->SelectObj(aPnt, ( rMEvt.IsShift() && - m_pSh->IsSelFrmMode()) ? SW_ADD_SELECT : 0); - - if (!m_pSh->IsObjSelected()) - { - m_pView->LeaveDrawCreate(); // In Selektionsmode wechseln - - m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW); - - if (m_pSh->IsSelFrmMode()) - m_pSh->LeaveSelFrmMode(); - } - m_pView->NoRotate(); - - bCheckShell = sal_True; // ggf BezierShell anwerfen - } - else if (!m_pSh->IsObjSelected() && !m_pWin->IsDrawAction()) - { - if (m_pSh->IsObjSelectable(aPnt)) - m_pSh->SelectObj(aPnt, ( rMEvt.IsShift() && - m_pSh->IsSelFrmMode() ) ? SW_ADD_SELECT : 0 ); - else - { - m_pView->LeaveDrawCreate(); - if (m_pSh->IsSelFrmMode()) - m_pSh->LeaveSelFrmMode(); - } - m_pView->NoRotate(); - - bReturn = sal_True; - } - } - } - else - { - /********************************************************************** - * BEZIER_EDITOR - **********************************************************************/ - if ( pSdrView->IsAction() ) - { - if ( pSdrView->IsInsObjPoint() ) - bReturn = pSdrView->EndInsObjPoint(SDRCREATE_FORCEEND); - else if (pSdrView->IsMarkPoints() ) - bReturn = pSdrView->EndMarkPoints(); - else - { - pSdrView->EndAction(); - bReturn = sal_True; - } - m_pWin->SetDrawAction(sal_False); - - if (aPnt == m_aStartPos) - { - if (!m_pSh->IsObjSelectable(aPnt)) - m_pSh->SelectObj(Point(LONG_MAX, LONG_MAX)); - else if (!bReturn) - { - if (!rMEvt.IsShift()) - pSdrView->UnmarkAllPoints(); - m_pSh->SelectObj(aPnt, (rMEvt.IsShift() && - m_pSh->IsSelFrmMode()) ? SW_ADD_SELECT :0); - } - - if (!m_pSh->IsObjSelected()) - { - m_pView->LeaveDrawCreate(); // In Selektionsmode wechseln - - m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW); - - if (m_pSh->IsSelFrmMode()) - m_pSh->LeaveSelFrmMode(); - } - m_pView->NoRotate(); - - bCheckShell = sal_True; // ggf BezierShell anwerfen - } - } - - SetDrawPointer(); - - if (!m_pSh->IsObjSelected() && !m_pWin->IsDrawAction()) - { - m_pView->LeaveDrawCreate(); - if (m_pSh->IsSelFrmMode()) - m_pSh->LeaveSelFrmMode(); - - m_pView->NoRotate(); - bReturn = sal_True; - } - } - } - - if (bCheckShell) - m_pView->AttrChangedNotify( m_pSh ); // ggf BezierShell anwerfen - - //!!!!!!!!!! Achtung Suizid !!!!!!!!!!! Sollte alles mal erneuert werden - if ( bAutoCap ) - m_pView->AutoCaption(FRAME_CAP); //Kann derzeit nur FRAME sein, sonst auf - //enums umstellen - return (bReturn); -} - -/************************************************************************* -|* -|* Function aktivieren -|* -\************************************************************************/ - - -void SwDrawBase::Activate(const sal_uInt16 nSlot) -{ - SetSlotId(nSlot); - SdrView *pSdrView = m_pSh->GetDrawView(); - - pSdrView->SetCurrentObj( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()) ); - pSdrView->SetEditMode(sal_False); - - SetDrawPointer(); - m_pSh->NoEdit(); -} - -/************************************************************************* -|* -|* Function deaktivieren -|* -\************************************************************************/ - - -void SwDrawBase::Deactivate() -{ - SdrView *pSdrView = m_pSh->GetDrawView(); - pSdrView->SetOrtho(sal_False); - pSdrView->SetAngleSnapEnabled(sal_False); - - if (m_pWin->IsDrawAction() && m_pSh->IsDrawCreate()) - m_pSh->BreakCreate(); - - m_pWin->SetDrawAction(sal_False); - - m_pWin->ReleaseMouse(); - bNoInterrupt = sal_False; - - if(m_pWin->GetApplyTemplate()) - m_pWin->SetApplyTemplate(SwApplyTemplate()); - m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW); -} - -/************************************************************************* -|* -|* Tastaturereignisse bearbeiten -|* -|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls -|* sal_False. -|* -\************************************************************************/ - - -sal_Bool SwDrawBase::KeyInput(const KeyEvent& rKEvt) -{ - sal_Bool bReturn = sal_False; - sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode(); - - switch (nCode) - { - case KEY_ESCAPE: - { - if (m_pWin->IsDrawAction()) - { - BreakCreate(); - m_pView->LeaveDrawCreate(); - } - - bReturn = sal_True; - } - break; - - case KEY_DELETE: - { - m_pSh->DelSelectedObj(); - bReturn = sal_True; - } - break; - - case KEY_UP: - case KEY_DOWN: - case KEY_LEFT: - case KEY_RIGHT: - { - SdrView *pSdrView = m_pSh->GetDrawView(); - - if (!pSdrView->IsTextEdit()) - { - long nX = 0; - long nY = 0; - - if (nCode == KEY_UP) - { - // Scroll nach oben - nX = 0; - nY =-1; - } - else if (nCode == KEY_DOWN) - { - // Scroll nach unten - nX = 0; - nY = 1; - } - else if (nCode == KEY_LEFT) - { - // Scroll nach links - nX =-1; - nY = 0; - } - else if (nCode == KEY_RIGHT) - { - // Scroll nach rechts - nX = 1; - nY = 0; - } - - if (pSdrView->AreObjectsMarked() && rKEvt.GetKeyCode().IsMod2()) - { - // Objekte verschieben - nX *= 100; - nY *= 100; - pSdrView->MoveAllMarked(Size(nX, nY)); - } - - bReturn = sal_True; - } - } - break; - } - - return (bReturn); -} - - -/************************************************************************* -|* -|* Tastaturereignisse bearbeiten -|* -|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls -|* sal_False. -|* -\************************************************************************/ - - -void SwDrawBase::BreakCreate() -{ - m_pSh->BreakCreate(); - m_pWin->SetDrawAction(sal_False); - m_pWin->ReleaseMouse(); - - Deactivate(); -} - -/************************************************************************* -|* -|* Mauspointer umschalten -|* -\************************************************************************/ - - -void SwDrawBase::SetDrawPointer() -{ - SdrView *pSdrView = m_pSh->GetDrawView(); - Point aPnt(m_pWin->OutputToScreenPixel(m_pWin->GetPointerPosPixel())); - aPnt = m_pWin->PixelToLogic(m_pWin->ScreenToOutputPixel(aPnt)); - const Pointer aPointTyp = pSdrView->GetPreferedPointer(aPnt, m_pSh->GetOut()); - const Pointer aDrawPt(aPointTyp); - m_pWin->SetPointer(aDrawPt); -} - -/************************************************************************* -|* -|* Ggf in Selektionsmode wechseln -|* -\************************************************************************/ - -void SwDrawBase::EnterSelectMode(const MouseEvent& rMEvt) -{ - m_pWin->SetDrawAction(sal_False); - - if (!m_pSh->IsObjSelected() && !m_pWin->IsDrawAction()) - { - Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel())); - - if (m_pSh->IsObjSelectable(aPnt)) - { - m_pSh->SelectObj(aPnt); - if (rMEvt.GetModifier() == KEY_SHIFT || !m_pSh->IsObjSelected()) - { - m_pView->LeaveDrawCreate(); // In Selektionsmode wechseln - - m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW); - } - } - else - { - m_pView->LeaveDrawCreate(); - if (m_pSh->IsSelFrmMode()) - m_pSh->LeaveSelFrmMode(); - } - m_pView->NoRotate(); - } -} - -void SwDrawBase::CreateDefaultObject() -{ - Point aStartPos = GetDefaultCenterPos(); - Point aEndPos(aStartPos); - aStartPos.X() -= 8 * MM50; - aStartPos.Y() -= 4 * MM50; - aEndPos.X() += 8 * MM50; - aEndPos.Y() += 4 * MM50; - Rectangle aRect(aStartPos, aEndPos); - m_pSh->CreateDefaultShape( static_cast< sal_uInt16 >(m_pWin->GetSdrDrawMode()), aRect, m_nSlotId); -} - -Point SwDrawBase::GetDefaultCenterPos() -{ - Size aDocSz(m_pSh->GetDocSize()); - const SwRect& rVisArea = m_pSh->VisArea(); - Point aStartPos = rVisArea.Center(); - if(rVisArea.Width() > aDocSz.Width()) - aStartPos.X() = aDocSz.Width() / 2 + rVisArea.Left(); - if(rVisArea.Height() > aDocSz.Height()) - aStartPos.Y() = aDocSz.Height() / 2 + rVisArea.Top(); - return aStartPos; -} - -// #i33136# -bool SwDrawBase::doConstructOrthogonal() const -{ - return false; -} - -// eof - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/ribbar/dselect.cxx b/sw/source/ui/ribbar/dselect.cxx deleted file mode 100644 index 65056b24e6..0000000000 --- a/sw/source/ui/ribbar/dselect.cxx +++ /dev/null @@ -1,104 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sw.hxx" - - -#include <sfx2/bindings.hxx> -#include "view.hxx" -#include "edtwin.hxx" -#include "wrtsh.hxx" -#include "cmdid.h" -#include "drawbase.hxx" -#include "dselect.hxx" - -extern sal_Bool bNoInterrupt; // in mainwn.cxx - -/************************************************************************* -|* -|* Konstruktor -|* -\************************************************************************/ - -DrawSelection::DrawSelection(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView) : - SwDrawBase(pWrtShell, pEditWin, pSwView) -{ - m_bCreateObj = sal_False; -} - -/************************************************************************* -|* -|* Tastaturereignisse bearbeiten -|* -|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls -|* sal_False. -|* -\************************************************************************/ - -sal_Bool DrawSelection::KeyInput(const KeyEvent& rKEvt) -{ - sal_Bool bReturn = sal_False; - - switch (rKEvt.GetKeyCode().GetCode()) - { - case KEY_ESCAPE: - { - if (m_pWin->IsDrawAction()) - { - m_pSh->BreakMark(); - m_pWin->ReleaseMouse(); - } - bReturn = sal_True; - } - break; - } - - if (!bReturn) - bReturn = SwDrawBase::KeyInput(rKEvt); - - return (bReturn); -} - -/************************************************************************* -|* -|* Function aktivieren -|* -\************************************************************************/ - -void DrawSelection::Activate(const sal_uInt16 nSlotId) -{ - m_pWin->SetSdrDrawMode(OBJ_NONE); - m_pWin->SetObjectSelect( sal_True ); - SwDrawBase::Activate(nSlotId); - - m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW); -} - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx deleted file mode 100644 index cc462ddb15..0000000000 --- a/sw/source/ui/ribbar/inputwin.cxx +++ /dev/null @@ -1,675 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sw.hxx" - - -#include <tools/gen.hxx> -#include <sfx2/imgmgr.hxx> -#include <sfx2/viewfrm.hxx> -#include <sfx2/dispatch.hxx> -#include <svx/ruler.hxx> -#include <svl/zforlist.hxx> -#include <svl/stritem.hxx> -#include <unotools/undoopt.hxx> - -#include "swtypes.hxx" -#include "cmdid.h" -#include "swmodule.hxx" -#include "wrtsh.hxx" -#include "view.hxx" -#include "calc.hxx" -#include "inputwin.hxx" -#include "fldbas.hxx" -#include "fldmgr.hxx" -#include "frmfmt.hxx" -#include "cellatr.hxx" -#include "edtwin.hxx" -#include "helpid.h" - -// nur fuers UpdateRange - Box in dem der gestackte Cursor sthet loeschen -#include "pam.hxx" - -#include "swundo.hxx" -#include "ribbar.hrc" -#include "inputwin.hrc" - -#include <IDocumentContentOperations.hxx> - -SFX_IMPL_POS_CHILDWINDOW( SwInputChild, FN_EDIT_FORMULA, SFX_OBJECTBAR_OBJECT ) - -//================================================================== - -SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind ) - : ToolBox( pParent , SW_RES( RID_TBX_FORMULA )), - aPos( this, SW_RES(ED_POS)), - aEdit( this, WB_3DLOOK|WB_TABSTOP|WB_BORDER|WB_NOHIDESELECTION), - aPopMenu( SW_RES(MN_CALC_POPUP)), - pMgr(0), - pWrtShell(0), - pView(0), - pBindings(pBind), - aAktTableName(aEmptyStr) - , m_nActionCount(0) - , m_bDoesUndo(true) - , m_bResetUndo(false) - , m_bCallUndo(false) -{ - bFirst = sal_True; - bActive = bIsTable = bDelSel = sal_False; - - FreeResource(); - - aEdit.SetSizePixel( aEdit.CalcMinimumSize() ); - - SfxImageManager* pManager = SfxImageManager::GetImageManager( SW_MOD() ); - pManager->RegisterToolBox(this); - - pView = ::GetActiveView(); - pWrtShell = pView ? pView->GetWrtShellPtr() : 0; - - InsertWindow( ED_POS, &aPos, 0, 0); - InsertSeparator ( 1 ); - InsertSeparator (); - InsertWindow( ED_FORMULA, &aEdit); - SetHelpId(ED_FORMULA, HID_EDIT_FORMULA); - - SetItemImage( FN_FORMULA_CALC, pManager->GetImage(FN_FORMULA_CALC )); - SetItemImage( FN_FORMULA_CANCEL, pManager->GetImage(FN_FORMULA_CANCEL )); - SetItemImage( FN_FORMULA_APPLY, pManager->GetImage(FN_FORMULA_APPLY )); - - SetItemBits( FN_FORMULA_CALC, GetItemBits( FN_FORMULA_CALC ) | TIB_DROPDOWNONLY ); - SetDropdownClickHdl( LINK( this, SwInputWindow, DropdownClickHdl )); - - Size aSizeTbx = CalcWindowSizePixel(); - Size aEditSize = aEdit.GetSizePixel(); - Rectangle aItemRect( GetItemRect(FN_FORMULA_CALC) ); - long nMaxHeight = (aEditSize.Height() > aItemRect.GetHeight()) ? aEditSize.Height() : aItemRect.GetHeight(); - if( nMaxHeight+2 > aSizeTbx.Height() ) - aSizeTbx.Height() = nMaxHeight+2; - Size aSize = GetSizePixel(); - aSize.Height() = aSizeTbx.Height(); - SetSizePixel( aSize ); - - // align edit and item vcentered - Size aPosSize = aPos.GetSizePixel(); - aPosSize.Height() = nMaxHeight; - aEditSize.Height() = nMaxHeight; - Point aPosPos = aPos.GetPosPixel(); - Point aEditPos = aEdit.GetPosPixel(); - aPosPos.Y() = (aSize.Height() - nMaxHeight)/2 + 1; - aEditPos.Y() = (aSize.Height() - nMaxHeight)/2 + 1; - aPos.SetPosSizePixel( aPosPos, aPosSize ); - aEdit.SetPosSizePixel( aEditPos, aEditSize ); - - aPopMenu.SetSelectHdl(LINK( this, SwInputWindow, MenuHdl )); -} - -//================================================================== - -SwInputWindow::~SwInputWindow() -{ - SfxImageManager::GetImageManager( SW_MOD() )->ReleaseToolBox(this); - - //Lineale aufwecken - if(pView) - { - pView->GetHLineal().SetActive( sal_True ); - pView->GetVLineal().SetActive( sal_True ); - } - if ( pMgr ) - delete pMgr; - if(pWrtShell) - pWrtShell->EndSelTblCells(); - - CleanupUglyHackWithUndo(); -} - -void SwInputWindow::CleanupUglyHackWithUndo() -{ - if (m_bResetUndo) - { - DelBoxCntnt(); - pWrtShell->DoUndo(m_bDoesUndo); - if (m_bCallUndo) - { - pWrtShell->Undo(); - } - if (0 == m_nActionCount) - { - SW_MOD()->GetUndoOptions().SetUndoCount(0); - } - m_bResetUndo = false; // #i117122# once is enough :) - } -} - - -//================================================================== - -void SwInputWindow::DataChanged( const DataChangedEvent& rDCEvt ) -{ - if ( rDCEvt.GetType() == DATACHANGED_SETTINGS && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) - { - // update item images - SwModule *pMod = SW_MOD(); - SfxImageManager *pImgMgr = SfxImageManager::GetImageManager( pMod ); - SetItemImage( FN_FORMULA_CALC, pImgMgr->GetImage(FN_FORMULA_CALC )); - SetItemImage( FN_FORMULA_CANCEL, pImgMgr->GetImage(FN_FORMULA_CANCEL )); - SetItemImage( FN_FORMULA_APPLY, pImgMgr->GetImage(FN_FORMULA_APPLY )); - } - - ToolBox::DataChanged( rDCEvt ); -} - -//================================================================== - -void SwInputWindow::Resize() -{ - ToolBox::Resize(); - - long nWidth = GetSizePixel().Width(); - long nLeft = aEdit.GetPosPixel().X(); - Size aEditSize = aEdit.GetSizePixel(); - - aEditSize.Width() = Max( ((long)(nWidth - nLeft - 5)), (long)0 ); - aEdit.SetSizePixel( aEditSize ); - aEdit.Invalidate(); -} - -//================================================================== - -void SwInputWindow::ShowWin() -{ - bIsTable = sal_False; - //Lineale anhalten - if(pView) - { - pView->GetHLineal().SetActive( sal_False ); - pView->GetVLineal().SetActive( sal_False ); - - OSL_ENSURE(pWrtShell, "no WrtShell!"); - // Cursor in Tabelle - bIsTable = pWrtShell->IsCrsrInTbl() ? sal_True : sal_False; - - if( bFirst ) - pWrtShell->SelTblCells( LINK( this, SwInputWindow, - SelTblCellsNotify) ); - if( bIsTable ) - { - const String& rPos = pWrtShell->GetBoxNms(); - sal_uInt16 nPos = 0; - short nSrch = -1; - while( (nPos = rPos.Search( ':',nPos + 1 ) ) != STRING_NOTFOUND ) - nSrch = (short) nPos; - aPos.SetText( rPos.Copy( ++nSrch ) ); - aAktTableName = pWrtShell->GetTableFmt()->GetName(); - } - else - aPos.SetText(SW_RESSTR(STR_TBL_FORMULA)); - - // Aktuelles Feld bearbeiten - OSL_ENSURE(pMgr == 0, "FieldManager not deleted"); - pMgr = new SwFldMgr; - - // Formel soll immer mit einem "=" beginnen, hier - // also setzen - String sEdit( '=' ); - if( pMgr->GetCurFld() && TYP_FORMELFLD == pMgr->GetCurTypeId() ) - { - sEdit += pMgr->GetCurFldPar2(); - } - else if( bFirst ) - { - if( bIsTable ) - { - m_bResetUndo = true; - m_nActionCount = SW_MOD()->GetUndoOptions().GetUndoCount(); - if (0 == m_nActionCount) { // deactivated? turn it on... - SW_MOD()->GetUndoOptions().SetUndoCount(1); - } - - m_bDoesUndo = pWrtShell->DoesUndo(); - if( !m_bDoesUndo ) - { - pWrtShell->DoUndo( sal_True ); - } - - if( !pWrtShell->SwCrsrShell::HasSelection() ) - { - pWrtShell->MoveSection( fnSectionCurr, fnSectionStart ); - pWrtShell->SetMark(); - pWrtShell->MoveSection( fnSectionCurr, fnSectionEnd ); - } - if( pWrtShell->SwCrsrShell::HasSelection() ) - { - pWrtShell->StartUndo( UNDO_DELETE ); - pWrtShell->Delete(); - if( 0 != pWrtShell->EndUndo( UNDO_DELETE )) - { - m_bCallUndo = true; - } - } - pWrtShell->DoUndo(false); - - SfxItemSet aSet( pWrtShell->GetAttrPool(), RES_BOXATR_FORMULA, RES_BOXATR_FORMULA ); - if( pWrtShell->GetTblBoxFormulaAttrs( aSet )) - sEdit += ((SwTblBoxFormula&)aSet.Get( RES_BOXATR_FORMULA )).GetFormula(); - } - } - - if( bFirst ) - { - // WrtShell Flags richtig setzen - pWrtShell->SttSelect(); - pWrtShell->EndSelect(); - } - - bFirst = sal_False; - - aEdit.SetModifyHdl( LINK( this, SwInputWindow, ModifyHdl )); - - aEdit.SetText( sEdit ); - aEdit.SetSelection( Selection( sEdit.Len(), sEdit.Len() ) ); - sOldFml = sEdit; - - aEdit.Invalidate(); - aEdit.Update(); - aEdit.GrabFocus(); - // UserInterface fuer die Eingabe abklemmen - - pView->GetEditWin().LockKeyInput(sal_True); - pView->GetViewFrame()->GetDispatcher()->Lock(sal_True); - pWrtShell->Push(); - } - ToolBox::Show(); -} -//================================================================== - -IMPL_LINK( SwInputWindow, MenuHdl, Menu *, pMenu ) -{ -static const char * const aStrArr[] = { - sCalc_Phd, - sCalc_Sqrt, - sCalc_Or, - sCalc_Xor, - sCalc_And, - sCalc_Not, - sCalc_Eq, - sCalc_Neq, - sCalc_Leq, - sCalc_Geq, - sCalc_L, - sCalc_G, - sCalc_Sum, - sCalc_Mean, - sCalc_Min, - sCalc_Max, - sCalc_Sin, - sCalc_Cos, - sCalc_Tan, - sCalc_Asin, - sCalc_Acos, - sCalc_Atan, - sCalc_Pow, - "|", - sCalc_Round -}; - - sal_uInt16 nId = pMenu->GetCurItemId(); - if ( nId <= MN_CALC_ROUND ) - { - String aTmp( String::CreateFromAscii(aStrArr[nId - 1]) ); - aTmp += ' '; - aEdit.ReplaceSelected( aTmp ); - } - return 0; -} - -IMPL_LINK( SwInputWindow, DropdownClickHdl, ToolBox*, EMPTYARG ) -{ - sal_uInt16 nCurID = GetCurItemId(); - EndSelection(); // setzt CurItemId zurueck ! - switch ( nCurID ) - { - case FN_FORMULA_CALC : - { - aPopMenu.Execute( this, GetItemRect( FN_FORMULA_CALC ), POPUPMENU_NOMOUSEUPCLOSE ); - break; - default: - break; - } - } - - return sal_True; -} - -//================================================================== - - -void SwInputWindow::Click( ) -{ - sal_uInt16 nCurID = GetCurItemId(); - EndSelection(); // setzt CurItemId zurueck ! - switch ( nCurID ) - { - case FN_FORMULA_CANCEL: - { - CancelFormula(); - } - break; - case FN_FORMULA_APPLY: - { - ApplyFormula(); - } - break; - } -} - -//================================================================== - -void SwInputWindow::ApplyFormula() -{ - pView->GetViewFrame()->GetDispatcher()->Lock(sal_False); - pView->GetEditWin().LockKeyInput(sal_False); - CleanupUglyHackWithUndo(); - pWrtShell->Pop( sal_False ); - - // Formel soll immer mit einem "=" beginnen, hier - // also wieder entfernen - String sEdit( aEdit.GetText() ); - sEdit.EraseLeadingChars().EraseTrailingChars(); - if( sEdit.Len() && '=' == sEdit.GetChar( 0 ) ) - sEdit.Erase( 0, 1 ); - SfxStringItem aParam(FN_EDIT_FORMULA, sEdit); - - pWrtShell->EndSelTblCells(); - pView->GetEditWin().GrabFocus(); - const SfxPoolItem* aArgs[2]; - aArgs[0] = &aParam; - aArgs[1] = 0; - pView->GetViewFrame()->GetBindings().Execute( FN_EDIT_FORMULA, aArgs, 0, SFX_CALLMODE_ASYNCHRON ); -} - -//================================================================== - -void SwInputWindow::CancelFormula() -{ - if(pView) - { - pView->GetViewFrame()->GetDispatcher()->Lock( sal_False ); - pView->GetEditWin().LockKeyInput(sal_False); - CleanupUglyHackWithUndo(); - pWrtShell->Pop( sal_False ); - - if( bDelSel ) - pWrtShell->EnterStdMode(); - - pWrtShell->EndSelTblCells(); - - pView->GetEditWin().GrabFocus(); - } - pView->GetViewFrame()->GetDispatcher()->Execute( FN_EDIT_FORMULA, SFX_CALLMODE_ASYNCHRON); -} -//================================================================== - -const xub_Unicode CH_LRE = 0x202a; -const xub_Unicode CH_PDF = 0x202c; - -IMPL_LINK( SwInputWindow, SelTblCellsNotify, SwWrtShell *, pCaller ) -{ - if(bIsTable) - { - SwFrmFmt* pTblFmt = pCaller->GetTableFmt(); - String sBoxNms( pCaller->GetBoxNms() ); - String sTblNm; - if( pTblFmt && aAktTableName != pTblFmt->GetName() ) - sTblNm = pTblFmt->GetName(); - - aEdit.UpdateRange( sBoxNms, sTblNm ); - - String sNew; - sNew += CH_LRE; - sNew += aEdit.GetText(); - sNew += CH_PDF; - - if( sNew != sOldFml ) - { - // Die WrtShell ist in der Tabellen Selektion - // dann die Tabellen Selektion wieder aufheben, sonst steht der - // Cursor "im Wald" und das LiveUpdate funktioniert nicht! - pWrtShell->StartAllAction(); - - SwPaM aPam( *pWrtShell->GetStkCrsr()->GetPoint() ); - aPam.Move( fnMoveBackward, fnGoSection ); - aPam.SetMark(); - aPam.Move( fnMoveForward, fnGoSection ); - - IDocumentContentOperations* pIDCO = pWrtShell->getIDocumentContentOperations(); - pIDCO->DeleteRange( aPam ); - pIDCO->InsertString( aPam, sNew ); - pWrtShell->EndAllAction(); - sOldFml = sNew; - } - } - else - aEdit.GrabFocus(); - return 0; -} - - -void SwInputWindow::SetFormula( const String& rFormula, sal_Bool bDelFlag ) -{ - String sEdit( '=' ); - if( rFormula.Len() ) - { - if( '=' == rFormula.GetChar( 0 ) ) - sEdit = rFormula; - else - sEdit += rFormula; - } - aEdit.SetText( sEdit ); - aEdit.SetSelection( Selection( sEdit.Len(), sEdit.Len() ) ); - aEdit.Invalidate(); - bDelSel = bDelFlag; -} - -IMPL_LINK( SwInputWindow, ModifyHdl, InputEdit*, EMPTYARG ) -{ - if (bIsTable && m_bResetUndo) - { - pWrtShell->StartAllAction(); - DelBoxCntnt(); - String sNew; - sNew += CH_LRE; - sNew += aEdit.GetText(); - sNew += CH_PDF; - pWrtShell->SwEditShell::Insert2( sNew ); - pWrtShell->EndAllAction(); - sOldFml = sNew; - } - return 0; -} - - -void SwInputWindow::DelBoxCntnt() -{ - if( bIsTable ) - { - pWrtShell->StartAllAction(); - pWrtShell->ClearMark(); - pWrtShell->Pop( sal_False ); - pWrtShell->Push(); - pWrtShell->MoveSection( fnSectionCurr, fnSectionStart ); - pWrtShell->SetMark(); - pWrtShell->MoveSection( fnSectionCurr, fnSectionEnd ); - pWrtShell->SwEditShell::Delete(); - pWrtShell->EndAllAction(); - } -} - -//================================================================== - -void InputEdit::KeyInput(const KeyEvent& rEvent) -{ - const KeyCode aCode = rEvent.GetKeyCode(); - if(aCode == KEY_RETURN || aCode == KEY_F2 ) - ((SwInputWindow*)GetParent())->ApplyFormula(); - else if(aCode == KEY_ESCAPE ) - ((SwInputWindow*)GetParent())->CancelFormula(); - else - Edit::KeyInput(rEvent); -} - -//================================================================== - -void InputEdit::UpdateRange(const String& rBoxes, - const String& rName ) -{ - if( !rBoxes.Len() ) - { - GrabFocus(); - return; - } - const sal_Unicode cOpen = '<', cClose = '>', - cOpenBracket = '('; - String aPrefix = rName; - if(rName.Len()) - aPrefix += '.'; - String aBoxes = aPrefix; - aBoxes += rBoxes; - Selection aSelection(GetSelection()); - sal_uInt16 nSel = (sal_uInt16) aSelection.Len(); - //OS: mit dem folgenden Ausdruck wird sichergestellt, dass im overwrite-Modus - //die selektierte schliessende Klammer nicht geloescht wird - if( nSel && ( nSel > 1 || - GetText().GetChar( (sal_uInt16)aSelection.Min() ) != cClose ) ) - Cut(); - else - aSelection.Max() = aSelection.Min(); - String aActText(GetText()); - const sal_uInt16 nLen = aActText.Len(); - if( !nLen ) - { - String aStr(cOpen); - aStr += aBoxes; - aStr += cClose; - SetText(aStr); - sal_uInt16 nPos = aStr.Search( cClose ); - OSL_ENSURE(nPos < aStr.Len(), "delimiter not found"); - ++nPos; - SetSelection( Selection( nPos, nPos )); - } - else - { - sal_Bool bFound = sal_False; - sal_Unicode cCh; - sal_uInt16 nPos, nEndPos = 0, nStartPos = (sal_uInt16) aSelection.Min(); - if( nStartPos-- ) - { - do { - if( cOpen == (cCh = aActText.GetChar( nStartPos ) ) || - cOpenBracket == cCh ) - { - bFound = cCh == cOpen; - break; - } - } while( nStartPos-- > 0 ); - } - if( bFound ) - { - bFound = sal_False; - nEndPos = nStartPos; - while( nEndPos < nLen ) - { - if( cClose == (cCh = aActText.GetChar( nEndPos ))) - { - bFound = sal_True; - break; - } - ++nEndPos; - } - // nur wenn akt. Pos im Breich oder direkt dahinter liegt - if( bFound && !( nStartPos < (sal_uInt16)aSelection.Max() && - (sal_uInt16)aSelection.Max() <= nEndPos + 1 )) - bFound = sal_False; - } - if( bFound ) - { - nPos = ++nStartPos + 1; // wir wollen dahinter - aActText.Erase( nStartPos, nEndPos - nStartPos ); - aActText.Insert( aBoxes, nStartPos ); - nPos = nPos + aBoxes.Len(); - } - else - { - String aTmp( (char)cOpen ); - aTmp += aBoxes; - aTmp += (char)cClose; - nPos = (sal_uInt16)aSelection.Min(); - aActText.Insert( aTmp, nPos ); - nPos = nPos + aTmp.Len(); - } - if( GetText() != aActText ) - { - SetText( aActText ); - SetSelection( Selection( nPos, nPos ) ); - } - } - GrabFocus(); - -} -//================================================================== - -SwInputChild::SwInputChild(Window* _pParent, - sal_uInt16 nId, - SfxBindings* pBindings, - SfxChildWinInfo* ) : - SfxChildWindow( _pParent, nId ) -{ - pDispatch = pBindings->GetDispatcher(); - pWindow = new SwInputWindow( _pParent, pBindings ); - ((SwInputWindow*)pWindow)->ShowWin(); - eChildAlignment = SFX_ALIGN_LOWESTTOP; -} - - -SwInputChild::~SwInputChild() -{ - if(pDispatch) - pDispatch->Lock(sal_False); -} - - -SfxChildWinInfo SwInputChild::GetInfo() const -{ - SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); \ - return aInfo; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/ribbar/inputwin.hrc b/sw/source/ui/ribbar/inputwin.hrc deleted file mode 100644 index e55fa18e3e..0000000000 --- a/sw/source/ui/ribbar/inputwin.hrc +++ /dev/null @@ -1,84 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _INPUTWIN_HRC -#define _INPUTWIN_HRC - - -//PopupMenu Id's -#define MN_CALC_PHD 1 -#define MN_CALC_SQRT 2 -#define MN_CALC_OR 3 -#define MN_CALC_XOR 4 -#define MN_CALC_AND 5 -#define MN_CALC_NOT 6 -#define MN_CALC_EQ 7 -#define MN_CALC_NEQ 8 -#define MN_CALC_LEQ 9 -#define MN_CALC_GEQ 10 -#define MN_CALC_LES 11 -#define MN_CALC_GRE 12 -#define MN_CALC_SUM 13 -#define MN_CALC_MEAN 14 -#define MN_CALC_MIN 15 -#define MN_CALC_MAX 16 -#define MN_CALC_SIN 17 -#define MN_CALC_COS 18 -#define MN_CALC_TAN 19 -#define MN_CALC_ASIN 20 -#define MN_CALC_ACOS 21 -#define MN_CALC_ATAN 22 -#define MN_CALC_POW 23 -#define MN_CALC_LISTSEP 24 -#define MN_CALC_ROUND 25 - -#define MN_POP_OPS 29 -#define MN_POP_STATISTICS 30 -#define MN_POP_FUNC 31 -#define MN_RSC_END 32 - -#define TBX_FORMULA 1 -#define ED_POS 2 -#define ED_FORMULA 3 - -#endif - - - - - - - - - - - - - - - - - diff --git a/sw/source/ui/ribbar/inputwin.src b/sw/source/ui/ribbar/inputwin.src deleted file mode 100644 index 8e6d36ad62..0000000000 --- a/sw/source/ui/ribbar/inputwin.src +++ /dev/null @@ -1,335 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -/* HelpID ressource file */ -/* HelpID ressource file */ - -#include "cmdid.h" -#include "helpid.h" -#include "globals.hrc" -#include "ribbar.hrc" -#include "inputwin.hrc" -ToolBox RID_TBX_FORMULA -{ - Pos = MAP_APPFONT ( 0 , 0 ) ; - Size = MAP_APPFONT ( 600 , 14 ) ; - HelpID = HID_CALC_TOOLBOX ; - SVLook = TRUE ; - Border = TRUE ; - ItemList = - { - ToolBoxItem - { - Identifier = FN_FORMULA_CALC ; - HelpId = HID_TBX_FORMULA_CALC ; - DropDown = TRUE ; - Text [ en-US ] = "Formula" ; - }; - ToolBoxItem - { - Identifier = FN_FORMULA_CANCEL ; - HelpId = HID_TBX_FORMULA_CANCEL ; - Text [ en-US ] = "Cancel" ; - }; - ToolBoxItem - { - Identifier = FN_FORMULA_APPLY ; - HelpId = HID_TBX_FORMULA_APPLY ; - Text [ en-US ] = "Apply" ; - }; - }; - Edit ED_POS - { - Border = TRUE ; - Size = MAP_APPFONT ( 45 , 11 ) ; - ReadOnly = TRUE ; - SVLook = TRUE ; - Center = TRUE ; - }; - Edit ED_FORMULA - { - Border = TRUE ; - TabStop = TRUE ; - Size = MAP_APPFONT ( 500 , 11 ) ; - SVLook = TRUE ; - }; -}; -Menu MN_CALC_POPUP -{ - ItemList = - { - MenuItem - { - Identifier = MN_CALC_SUM ; - HelpID = HID_MN_CALC_SUM ; - Text [ en-US ] = "Sum" ; - }; - MenuItem - { - Identifier = MN_CALC_ROUND ; - HelpID = HID_MN_CALC_ROUND ; - Text [ en-US ] = "Round" ; - }; - MenuItem - { - Identifier = MN_CALC_PHD ; - HelpID = HID_MN_CALC_PHD ; - Text [ en-US ] = "Percent" ; - }; - MenuItem - { - Identifier = MN_CALC_SQRT ; - HelpID = HID_MN_CALC_SQRT ; - Text [ en-US ] = "Square Root" ; - }; - MenuItem - { - Identifier = MN_CALC_POW ; - HelpID = HID_MN_CALC_POW ; - Text [ en-US ] = "Power" ; - }; - MenuItem - { - Identifier = MN_POP_OPS ; - HelpID = HID_MN_POP_OPS ; - Text [ en-US ] = "Operators" ; - SubMenu = Menu - { - ItemList = - { - MenuItem - { - Identifier = MN_CALC_LISTSEP ; - HelpID = HID_MN_CALC_LISTSEP ; - Text [ en-US ] = "List Separator" ; - }; - MenuItem - { - Identifier = MN_CALC_EQ ; - HelpID = HID_MN_CALC_EQ ; - Text [ en-US ] = "Equal" ; - }; - MenuItem - { - Identifier = MN_CALC_NEQ ; - HelpID = HID_MN_CALC_NEQ ; - Text [ en-US ] = "Not Equal" ; - }; - MenuItem - { - Identifier = MN_CALC_LEQ ; - HelpID = HID_MN_CALC_LEQ ; - Text [ en-US ] = "Less Than or Equal" ; - }; - MenuItem - { - Identifier = MN_CALC_GEQ ; - HelpID = HID_MN_CALC_GEQ ; - Text [ en-US ] = "Greater Than or Equal" ; - }; - MenuItem - { - Identifier = MN_CALC_LES ; - HelpID = HID_MN_CALC_LES ; - Text [ en-US ] = "Less" ; - }; - MenuItem - { - Identifier = MN_CALC_GRE ; - HelpID = HID_MN_CALC_GRE ; - Text [ en-US ] = "Greater" ; - }; - MenuItem - { - Separator = TRUE ; - }; - MenuItem - { - Identifier = MN_CALC_OR ; - HelpID = HID_MN_CALC_OR ; - Text [ en-US ] = "Boolean Or" ; - }; - MenuItem - { - Identifier = MN_CALC_XOR ; - HelpID = HID_MN_CALC_XOR ; - Text [ en-US ] = "Boolean Xor" ; - }; - MenuItem - { - Identifier = MN_CALC_AND ; - HelpID = HID_MN_CALC_AND ; - Text [ en-US ] = "Boolean And" ; - }; - MenuItem - { - Identifier = MN_CALC_NOT ; - HelpID = HID_MN_CALC_NOT ; - Text [ en-US ] = "Boolean Not" ; - }; - }; - }; - }; - MenuItem - { - Identifier = MN_POP_STATISTICS ; - HelpID = HID_MN_POP_STATISTICS ; - Text [ en-US ] = "Statistical Functions" ; - SubMenu = Menu - { - ItemList = - { - MenuItem - { - Identifier = MN_CALC_MEAN ; - HelpID = HID_MN_CALC_MEAN ; - Text [ en-US ] = "Mean" ; - }; - MenuItem - { - Identifier = MN_CALC_MIN ; - HelpID = HID_MN_CALC_MIN ; - Text [ en-US ] = "Minimum" ; - }; - MenuItem - { - Identifier = MN_CALC_MAX ; - HelpID = HID_MN_CALC_MAX ; - Text [ en-US ] = "Maximum" ; - }; - }; - }; - }; - MenuItem - { - Identifier = MN_POP_FUNC ; - HelpID = HID_MN_POP_FUNC ; - Text [ en-US ] = "Functions" ; - SubMenu = Menu - { - ItemList = - { - MenuItem - { - Identifier = MN_CALC_SIN ; - HelpID = HID_MN_CALC_SIN ; - Text [ en-US ] = "Sine" ; - }; - MenuItem - { - Identifier = MN_CALC_COS ; - HelpID = HID_MN_CALC_COS ; - Text [ en-US ] = "Cosine" ; - }; - MenuItem - { - Identifier = MN_CALC_TAN ; - HelpID = HID_MN_CALC_TAN ; - Text [ en-US ] = "Tangent" ; - }; - MenuItem - { - Identifier = MN_CALC_ASIN ; - HelpID = HID_MN_CALC_ASIN ; - Text [ en-US ] = "Arcsine" ; - }; - MenuItem - { - Identifier = MN_CALC_ACOS ; - HelpID = HID_MN_CALC_ACOS ; - Text [ en-US ] = "Arccosine" ; - }; - MenuItem - { - Identifier = MN_CALC_ATAN ; - HelpID = HID_MN_CALC_ATAN ; - Text [ en-US ] = "Arctangent" ; - }; - }; - }; - }; - }; -}; -String STR_TBL_FORMULA -{ - Text [ en-US ] = "Text formula" ; -}; -#define TB_INPUT \ - ToolBoxItem\ - {\ - Identifier = FN_FORMULA_CALC ; \ - HelpID = HID_TBX_FORMULA_CALC ; \ - Text [ en-US ] = "Formula" ; \ - };\ - ToolBoxItem\ - {\ - Identifier = FN_FORMULA_CANCEL ; \ - HelpId = HID_TBX_FORMULA_CANCEL ; \ - Text [ en-US ] = "Cancel" ; \ - };\ - ToolBoxItem\ - {\ - Identifier = FN_FORMULA_APPLY ; \ - HelpID = HID_TBX_FORMULA_APPLY ; \ - Text [ en-US ] = "Apply" ; \ - }; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sw/source/ui/ribbar/tblctrl.cxx b/sw/source/ui/ribbar/tblctrl.cxx deleted file mode 100644 index 497b8518f8..0000000000 --- a/sw/source/ui/ribbar/tblctrl.cxx +++ /dev/null @@ -1,96 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sw.hxx" - - -#include <svl/intitem.hxx> - -#include <vcl/toolbox.hxx> -#include <sfx2/app.hxx> - -#include "cmdid.h" -#include "swtypes.hxx" -#include "tblctrl.hxx" -#include "tblctrl.hrc" - - - -SFX_IMPL_TOOLBOX_CONTROL( SwTableOptimizeCtrl, SfxUInt16Item ); - -/********************************************************************** - -**********************************************************************/ - - - - -SwTableOptimizeCtrl::SwTableOptimizeCtrl( - sal_uInt16 nSlotId, - sal_uInt16 nId, - ToolBox& rTbx ) : - SfxToolBoxControl( nSlotId, nId, rTbx ) -{ - rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) ); -} -/********************************************************************** - -**********************************************************************/ - - - -SwTableOptimizeCtrl::~SwTableOptimizeCtrl() -{ -} - -/********************************************************************** - -**********************************************************************/ - - - -SfxPopupWindow* SwTableOptimizeCtrl::CreatePopupWindow() -{ - rtl::OUString aToolBarResStr( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/optimizetablebar" )); - createAndPositionSubToolBar( aToolBarResStr ); - return NULL; -} - -/********************************************************************** - -**********************************************************************/ - - - -SfxPopupWindowType SwTableOptimizeCtrl::GetPopupWindowType() const -{ - return SFX_POPUPWINDOW_ONCLICK; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/ribbar/tblctrl.hrc b/sw/source/ui/ribbar/tblctrl.hrc deleted file mode 100644 index fcc31d473e..0000000000 --- a/sw/source/ui/ribbar/tblctrl.hrc +++ /dev/null @@ -1,35 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _TBLCTRL_HRC -#define _TBLCTRL_HRC -#include "ribbar.hrc" - -#define TBX_OPTIMIZE_TABLE 1 - -#endif - - diff --git a/sw/source/ui/ribbar/tbxanchr.cxx b/sw/source/ui/ribbar/tbxanchr.cxx deleted file mode 100644 index d56a776a93..0000000000 --- a/sw/source/ui/ribbar/tbxanchr.cxx +++ /dev/null @@ -1,144 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sw.hxx" - - - -#include <string> -#include <vcl/timer.hxx> -#include <sfx2/app.hxx> -#include <svx/htmlmode.hxx> -#include <svl/intitem.hxx> -#include <sfx2/dispatch.hxx> -#include <vcl/toolbox.hxx> -#include <sfx2/mnumgr.hxx> - - -#include "cmdid.h" -#include "docsh.hxx" -#include "swtypes.hxx" -#include "swmodule.hxx" -#include "wrtsh.hxx" -#include "view.hxx" -#include "viewopt.hxx" -#include "ribbar.hrc" -#include "tbxanchr.hxx" - - - -SFX_IMPL_TOOLBOX_CONTROL(SwTbxAnchor, SfxUInt16Item); - -SwTbxAnchor::SwTbxAnchor( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : - SfxToolBoxControl( nSlotId, nId, rTbx ), - nActAnchorId(0) -{ - rTbx.SetItemBits( nId, TIB_DROPDOWNONLY | rTbx.GetItemBits( nId ) ); -} - - SwTbxAnchor::~SwTbxAnchor() -{ -} - -void SwTbxAnchor::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) -{ - GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SFX_ITEM_DISABLED) ); - - if( eState == SFX_ITEM_AVAILABLE ) - { - const SfxUInt16Item* pItem = PTR_CAST( SfxUInt16Item, pState ); - if(pItem) - nActAnchorId = pItem->GetValue(); - } - -} - -SfxPopupWindow* SwTbxAnchor::CreatePopupWindow() -{ - SwTbxAnchor::Click(); - return 0; -} - -void SwTbxAnchor::Click() -{ - PopupMenu aPopMenu(SW_RES(MN_ANCHOR_POPUP)); - - SfxViewFrame* pViewFrame( 0 ); - SfxDispatcher* pDispatch( 0 ); - SfxViewShell* pCurSh( SfxViewShell::Current() ); - - if ( pCurSh ) - { - pViewFrame = pCurSh->GetViewFrame(); - if ( pViewFrame ) - pDispatch = pViewFrame->GetDispatcher(); - } - - SwView* pActiveView = 0; - if(pViewFrame) - { - const TypeId aTypeId = TYPE(SwView); - SwView* pView = (SwView*)SfxViewShell::GetFirst(&aTypeId); - while( pView ) - { - if(pView->GetViewFrame() == pViewFrame) - { - pActiveView = pView; - break; - } - pView = (SwView*)SfxViewShell::GetNext(*pView, &aTypeId); - } - } - if(!pActiveView) - { - OSL_FAIL("No active view found"); - return; - } - SwWrtShell* pWrtShell = pActiveView->GetWrtShellPtr(); - aPopMenu.EnableItem( FN_TOOL_ANKER_FRAME, 0 != pWrtShell->IsFlyInFly() ); - - Rectangle aRect(GetToolBox().GetItemRect(GetId())); - sal_uInt16 nHtmlMode = ::GetHtmlMode((SwDocShell*)SfxObjectShell::Current()); - sal_Bool bHtmlModeNoAnchor = ( nHtmlMode & HTMLMODE_ON) && 0 == (nHtmlMode & HTMLMODE_SOME_ABS_POS); - - if (bHtmlModeNoAnchor || pWrtShell->IsInHeaderFooter()) - aPopMenu.RemoveItem(aPopMenu.GetItemPos(FN_TOOL_ANKER_PAGE)); - - if (nActAnchorId) - aPopMenu.CheckItem(nActAnchorId); - - - sal_uInt16 nSlotId = aPopMenu.Execute(&GetToolBox(), aRect); - GetToolBox().EndSelection(); - - if (nSlotId) - pDispatch->Execute(nSlotId, SFX_CALLMODE_ASYNCHRON|SFX_CALLMODE_RECORD); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/ribbar/tbxanchr.src b/sw/source/ui/ribbar/tbxanchr.src deleted file mode 100644 index 9aa3763ea4..0000000000 --- a/sw/source/ui/ribbar/tbxanchr.src +++ /dev/null @@ -1,107 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "ribbar.hrc" -#include "cmdid.h" -Menu MN_ANCHOR_POPUP -{ - ItemList = - { - MenuItem - { - _MenuItemFlags = MIB_RADIOCHECK ; - RadioCheck = TRUE ; - Identifier = FN_TOOL_ANKER_PAGE ; - Text [ en-US ] = "To Page" ; - }; - MenuItem - { - _MenuItemFlags = MIB_RADIOCHECK ; - RadioCheck = TRUE ; - Identifier = FN_TOOL_ANKER_PARAGRAPH ; - Text [ en-US ] = "To Paragraph" ; - }; - MenuItem - { - _MenuItemFlags = MIB_RADIOCHECK ; - RadioCheck = TRUE ; - Identifier = FN_TOOL_ANKER_AT_CHAR ; - Text [ en-US ] = "To Character" ; - }; - MenuItem - { - _MenuItemFlags = MIB_RADIOCHECK ; - RadioCheck = TRUE ; - Identifier = FN_TOOL_ANKER_CHAR ; - Text [ en-US ] = "As Character" ; - }; - MenuItem - { - _MenuItemFlags = MIB_RADIOCHECK ; - RadioCheck = TRUE ; - Identifier = FN_TOOL_ANKER_FRAME ; - Text [ en-US ] = "To Frame" ; - }; - }; -}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx deleted file mode 100644 index 2713a22f3a..0000000000 --- a/sw/source/ui/ribbar/workctrl.cxx +++ /dev/null @@ -1,805 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_sw.hxx" - - -#include <string> -#include <svl/eitem.hxx> -#include <svx/htmlmode.hxx> -#include <sfx2/dispatch.hxx> -#include <sfx2/bindings.hxx> -#include <sfx2/imagemgr.hxx> -#include <swmodule.hxx> -#include <view.hxx> -#include <initui.hxx> -#include <viewopt.hxx> -#include <docsh.hxx> -#include <gloshdl.hxx> -#include <glosdoc.hxx> -#include <gloslst.hxx> -#include <workctrl.hxx> -#include <workctrl.hrc> -#include <cmdid.h> -#include <helpid.h> -#include <wrtsh.hxx> -#include <svl/imageitm.hxx> -#include <vcl/lstbox.hxx> -#include <rtl/ustring.hxx> -#include "swabstdlg.hxx" -#include <misc.hrc> - -#include <vcl/svapp.hxx> - -// Size Abpruefung -#define NAVI_ENTRIES 20 -#if NAVI_ENTRIES != NID_COUNT -#error SwScrollNaviPopup-CTOR static Array falsche Size. Wurden neue IDs zugefuegt ?? -#endif - -using ::rtl::OUString; -using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::beans; -using namespace ::com::sun::star::frame; - -SFX_IMPL_TOOLBOX_CONTROL( SwTbxInsertCtrl, SfxImageItem); -SFX_IMPL_TOOLBOX_CONTROL( SwTbxAutoTextCtrl, SfxBoolItem ); - -SwTbxInsertCtrl::SwTbxInsertCtrl( - sal_uInt16 nSlotId, - sal_uInt16 nId, - ToolBox& rTbx ) : - SfxToolBoxControl( nSlotId, nId, rTbx ), - nLastSlotId(FN_INSERT_CTRL == nSlotId ? FN_INSERT_TABLE : SID_INSERT_DIAGRAM) -{ - rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) ); -} - -SwTbxInsertCtrl::~SwTbxInsertCtrl() -{ -} - -void SAL_CALL SwTbxInsertCtrl::update() throw (uno::RuntimeException) -{ - ToolBox& rTbx = GetToolBox(); - rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" )); - aSlotURL += rtl::OUString::valueOf( sal_Int32( nLastSlotId )); - Image aImage = GetImage( m_xFrame, aSlotURL, hasBigImages() ); - - rTbx.SetItemImage(GetId(), aImage); - rTbx.Invalidate(); - - SfxToolBoxControl::update(); -} - -void SwTbxInsertCtrl::StateChanged( sal_uInt16 /*nSID*/, - SfxItemState eState, - const SfxPoolItem* pState ) -{ - sal_uInt16 nId = GetId(); - GetToolBox().EnableItem( nId, (GetItemState(pState) != SFX_ITEM_DISABLED) ); - - if( eState == SFX_ITEM_AVAILABLE ) - { - const SfxImageItem* pItem = PTR_CAST( SfxImageItem, pState ); - if(pItem) - { - nLastSlotId = pItem->GetValue(); - if( nLastSlotId ) - nId = nLastSlotId; - - rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" )); - aSlotURL += rtl::OUString::valueOf( sal_Int32( nId )); - ToolBox& rBox = GetToolBox(); - Image aImage = GetImage( m_xFrame, aSlotURL, hasBigImages() ); - rBox.SetItemImage(GetId(), aImage); - rBox.SetItemImageMirrorMode( GetId(), sal_False ); - rBox.SetItemImageAngle( GetId(), pItem->GetRotation() ); - rBox.SetItemImageMirrorMode( GetId(), pItem->IsMirrored() ); - } - } - -} - -SfxPopupWindow* SwTbxInsertCtrl::CreatePopupWindow() -{ - if(GetSlotId() == FN_INSERT_CTRL) - { - OUString aToolBarResStr( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/insertbar" )); - createAndPositionSubToolBar( aToolBarResStr ); - } - else /* FN_INSERT_OBJ_CTRL */ - { - OUString aToolBarResStr( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/insertobjectbar" )); - createAndPositionSubToolBar( aToolBarResStr ); - } - return NULL; -} - -SfxPopupWindowType SwTbxInsertCtrl::GetPopupWindowType() const -{ - return nLastSlotId ? SFX_POPUPWINDOW_ONTIMEOUT : SFX_POPUPWINDOW_ONCLICK; -} - - -void SwTbxInsertCtrl::Select( sal_Bool /*bMod1*/ ) -{ - if( nLastSlotId ) - { - SfxViewShell* pCurSh( SfxViewShell::Current() ); - SfxDispatcher* pDispatch( 0 ); - - if ( pCurSh ) - { - SfxViewFrame* pViewFrame = pCurSh->GetViewFrame(); - if ( pViewFrame ) - pDispatch = pViewFrame->GetDispatcher(); - } - - if ( pDispatch ) - pDispatch->Execute(nLastSlotId); - } -} - -SwTbxAutoTextCtrl::SwTbxAutoTextCtrl( - sal_uInt16 nSlotId, - sal_uInt16 nId, - ToolBox& rTbx ) : - SfxToolBoxControl( nSlotId, nId, rTbx ), - pPopup(0), - pView(0) -{ - rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) ); -} - -SwTbxAutoTextCtrl::~SwTbxAutoTextCtrl() -{ - DelPopup(); -} - -SfxPopupWindow* SwTbxAutoTextCtrl::CreatePopupWindow() -{ - pView = ::GetActiveView(); - if(pView && !pView->GetDocShell()->IsReadOnly() && - !pView->GetWrtShell().HasReadonlySel() ) - { - ToolBox& rBox = GetToolBox(); - - Rectangle aItemRect( rBox.GetItemRect( GetId() ) ); - Point aPt(rBox.OutputToScreenPixel(aItemRect.TopLeft())); - aPt.X() += aItemRect.GetWidth()/2; - aPt.Y() += aItemRect.GetHeight()/2; - if(pView) - { - Link aLnk = LINK(this, SwTbxAutoTextCtrl, PopupHdl); - - if (GetSlotId() == FN_INSERT_FIELD_CTRL) - { - pPopup = new PopupMenu(SW_RES(RID_INSERT_FIELD_CTRL)); - pPopup->SetSelectHdl(aLnk); - - if (::GetHtmlMode(pView->GetDocShell()) & HTMLMODE_ON) - { - pPopup->RemoveItem(pPopup->GetItemPos(FN_INSERT_FLD_PGCOUNT)); - pPopup->RemoveItem(pPopup->GetItemPos(FN_INSERT_FLD_TOPIC)); - } - } - else - { - pPopup = new PopupMenu; - SwGlossaryList* pGlossaryList = ::GetGlossaryList(); - sal_uInt16 nGroupCount = pGlossaryList->GetGroupCount(); - for(sal_uInt16 i = 1; i <= nGroupCount; i++) - { - // Gruppenname mit Pfad-Extension besorgen - String sTitle; - String sGroupName = pGlossaryList->GetGroupName(i - 1, sal_False, &sTitle); - sal_uInt16 nBlockCount = pGlossaryList->GetBlockCount(i -1); - if(nBlockCount) - { - sal_uInt16 nIndex = 100 * (i); - // aber ohne extension einfuegen - pPopup->InsertItem( i, sTitle);//sGroupName.GetToken(0, GLOS_DELIM)); - PopupMenu* pSub = new PopupMenu; - pSub->SetSelectHdl(aLnk); - pPopup->SetPopupMenu(i, pSub); - for(sal_uInt16 j = 0; j < nBlockCount; j++) - { - String sEntry; - String sLongName(pGlossaryList->GetBlockName(i - 1, j, sEntry)); - sEntry.AppendAscii(" - "); - sEntry += sLongName; - pSub->InsertItem(++nIndex, sEntry); - } - } - } - } - } - ToolBox* pToolBox = &GetToolBox(); - sal_uInt16 nId = GetId(); - pToolBox->SetItemDown( nId, sal_True ); - - pPopup->Execute( pToolBox, pToolBox->GetItemRect( nId ), - (pToolBox->GetAlign() == WINDOWALIGN_TOP || pToolBox->GetAlign() == WINDOWALIGN_BOTTOM) ? - POPUPMENU_EXECUTE_DOWN : POPUPMENU_EXECUTE_RIGHT ); - - pToolBox->SetItemDown( nId, sal_False ); - } - GetToolBox().EndSelection(); - DelPopup(); - return 0; - -} - - -SfxPopupWindowType SwTbxAutoTextCtrl::GetPopupWindowType() const -{ - return SFX_POPUPWINDOW_ONTIMEOUT; -} - -void SwTbxAutoTextCtrl::StateChanged( sal_uInt16 nSID, - SfxItemState eState, - const SfxPoolItem* pState ) -{ - GetToolBox().EnableItem( GetId(), (GetItemState(pState) != SFX_ITEM_DISABLED) ); - if(FN_INSERT_FIELD_CTRL == nSID && eState >= SFX_ITEM_DEFAULT) - { - GetToolBox().CheckItem( GetId(), ((SfxBoolItem*)pState)->GetValue() ); - } -} - -IMPL_LINK(SwTbxAutoTextCtrl, PopupHdl, PopupMenu*, pMenu) -{ - sal_uInt16 nId = pMenu->GetCurItemId(); - - if ( GetSlotId() == FN_INSERT_FIELD_CTRL) - { - Sequence< PropertyValue > aArgs; - const char* pChar = 0; - switch(nId) - { - case FN_INSERT_FLD_DATE: - pChar = ".uno:InsertDateField"; - break; - case FN_INSERT_FLD_TIME: - pChar = ".uno:InsertTimeField"; - break; - case FN_INSERT_FLD_PGNUMBER: - pChar = ".uno:InsertPageNumberField"; - break; - case FN_INSERT_FLD_PGCOUNT: - pChar = ".uno:InsertPageCountField"; - break; - case FN_INSERT_FLD_TOPIC: - pChar = ".uno:InsertTopicField"; - break; - case FN_INSERT_FLD_TITLE: - pChar = ".uno:InsertTitleField"; - break; - case FN_INSERT_FLD_AUTHOR: - pChar = ".uno:InsertAuthorField"; - break; - default: - pChar = ".uno:InsertFieldCtrl"; - } - Dispatch( rtl::OUString::createFromAscii( pChar ),aArgs ); - } - else - { - sal_uInt16 nBlock = nId / 100; - - SwGlossaryList* pGlossaryList = ::GetGlossaryList(); - String sShortName; - String sGroup = pGlossaryList->GetGroupName(nBlock - 1, sal_False); - String sLongName(pGlossaryList->GetBlockName(nBlock - 1, nId - (100 * nBlock) - 1, sShortName)); - - SwGlossaryHdl* pGlosHdl = pView->GetGlosHdl(); - SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); - OSL_ENSURE(pFact, "Dialogdiet fail!"); - ::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc( DLG_RENAME_GLOS ); - if ( fnSetActGroup ) - (*fnSetActGroup)( sGroup ); - pGlosHdl->SetCurGroup(sGroup, sal_True); - pGlosHdl->InsertGlossary(sShortName); - } - return 0; -} - -void SwTbxAutoTextCtrl::DelPopup() -{ - if(pPopup) - { - if (GetSlotId() != FN_INSERT_FIELD_CTRL) - { - for( sal_uInt16 i = 0; i < pPopup->GetItemCount(); i ++ ) - { - PopupMenu* pSubPopup = pPopup->GetPopupMenu(pPopup->GetItemId(i)); - delete pSubPopup; - } - } - delete pPopup; - pPopup = 0; - } -} - -/* Navigations-Popup */ -// determine the order of the toolbox items -static sal_uInt16 aNavigationInsertIds[ NAVI_ENTRIES ] = -{ - // -- first line - NID_TBL, - NID_FRM, - NID_GRF, - NID_OLE, - NID_PGE, - NID_OUTL, - NID_MARK, - NID_DRW, - NID_CTRL, - NID_PREV, - // -- second line - NID_REG, - NID_BKM, - NID_SEL, - NID_FTN, - NID_POSTIT, - NID_SRCH_REP, - NID_INDEX_ENTRY, - NID_TABLE_FORMULA, - NID_TABLE_FORMULA_ERROR, - NID_NEXT -}; -static const char* aNavigationHelpIds[ NAVI_ENTRIES ] = -{ - // -- first line - HID_NID_TBL, - HID_NID_FRM, - HID_NID_GRF, - HID_NID_OLE, - HID_NID_PGE, - HID_NID_OUTL, - HID_NID_MARK, - HID_NID_DRW, - HID_NID_CTRL, - HID_NID_PREV, - // -- second line - HID_NID_REG, - HID_NID_BKM, - HID_NID_SEL, - HID_NID_FTN, - HID_NID_POSTIT, - HID_NID_SRCH_REP, - HID_NID_INDEX_ENTRY, - HID_NID_TABLE_FORMULA, - HID_NID_TABLE_FORMULA_ERROR, - HID_NID_NEXT -}; - -SwScrollNaviPopup::SwScrollNaviPopup( sal_uInt16 nId, const Reference< XFrame >& rFrame ) - : SfxPopupWindow(nId, rFrame, SW_RES(RID_SCROLL_NAVIGATION_WIN) ), - aToolBox(this, 0), - aSeparator(this, SW_RES(FL_SEP)), - aInfoField(this, SW_RES(FI_INFO)), - aIList(SW_RES(IL_VALUES)), - nFwdId(FN_START_OF_NEXT_PAGE), - nBackId(FN_START_OF_PREV_PAGE) -{ - sal_uInt16 i; - - aToolBox.SetHelpId(HID_NAVI_VS); - aToolBox.SetLineCount( 2 ); - aToolBox.SetOutStyle(TOOLBOX_STYLE_FLAT); - for( i = 0; i < NID_COUNT; i++) - { - sal_uInt16 nNaviId = aNavigationInsertIds[i]; - String sText; - ToolBoxItemBits nTbxBits = 0; - if((NID_PREV != nNaviId) && (NID_NEXT != nNaviId)) - { - // -2, there's no string for Next/Prev - sal_uInt16 nResStr = ST_TBL - 2 + nNaviId - NID_START; - sText = String(SW_RES(nResStr)); - nTbxBits = TIB_CHECKABLE; - } - aToolBox.InsertItem(nNaviId, sText, nTbxBits); - aToolBox.SetHelpId( nNaviId, aNavigationHelpIds[i] ); - } - ApplyImageList(); - aToolBox.InsertBreak(NID_COUNT/2); - // don't call it before! - FreeResource(); - - // these are global strings - for( i = 0; i < 2 * NID_COUNT; i++) - { - sQuickHelp[i] = String(SW_RES(STR_IMGBTN_START + i)); - } - - Size aImgSize = aIList.GetImageSize(); - aImgSize.Width() += 5; - aImgSize.Height() += 5; - Size aSz = aToolBox.CalcWindowSizePixel(2); - aToolBox.SetPosSizePixel( Point(), aSz ); - sal_uInt16 nItemId = SwView::GetMoveType(); - aInfoField.SetText(aToolBox.GetItemText(nItemId)); - aToolBox.CheckItem( nItemId, sal_True ); - Size aFTSize(aInfoField.GetSizePixel()); - Size aSepSize(aSeparator.GetSizePixel()); - aSepSize.Width() = aSz.Width(); - - aSz.Height() += aFTSize.Height() + aSepSize.Height(); - aInfoField.SetPosSizePixel( - Point(0, aSz.Height() - aFTSize.Height()), Size(aSz.Width(), aFTSize.Height())); - - aSeparator.SetSizePixel(aSepSize); - aSeparator.SetPosPixel(Point(0, aSz.Height() - aFTSize.Height() - aSepSize.Height())); - - SetOutputSizePixel(aSz); - aToolBox.SetSelectHdl(LINK(this, SwScrollNaviPopup, SelectHdl)); - aToolBox.StartSelection(); - aToolBox.Show(); -} - -SwScrollNaviPopup::~SwScrollNaviPopup() -{ -} - -void SwScrollNaviPopup::DataChanged( const DataChangedEvent& rDCEvt ) -{ - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && - (rDCEvt.GetFlags() & SETTINGS_STYLE) ) - ApplyImageList(); - - Window::DataChanged( rDCEvt ); -} - -void SwScrollNaviPopup::ApplyImageList() -{ - ImageList& rImgLst = aIList; - for(sal_uInt16 i = 0; i < NID_COUNT; i++) - { - sal_uInt16 nNaviId = aNavigationInsertIds[i]; - aToolBox.SetItemImage(nNaviId, rImgLst.GetImage(nNaviId)); - } -} - -SfxPopupWindow* SwScrollNaviPopup::Clone() const -{ - return new SwScrollNaviPopup( GetId(), GetFrame() ); -} - -IMPL_LINK(SwScrollNaviPopup, SelectHdl, ToolBox*, pSet) -{ - sal_uInt16 nSet = pSet->GetCurItemId(); - if( nSet != NID_PREV && nSet != NID_NEXT ) - { - SwView::SetMoveType(nSet); - aToolBox.SetItemText(NID_NEXT, sQuickHelp[nSet - NID_START]); - aToolBox.SetItemText(NID_PREV, sQuickHelp[nSet - NID_START + NID_COUNT]); - aInfoField.SetText(aToolBox.GetItemText(nSet)); - //check the current button only - for(sal_uInt16 i = 0; i < NID_COUNT; i++) - { - sal_uInt16 nItemId = aToolBox.GetItemId( i ); - aToolBox.CheckItem( nItemId, nItemId == nSet ); - } - } - else - { - SfxBoolItem aNext(FN_SCROLL_NEXT_PREV, NID_NEXT == nSet); - Any a; - Sequence< PropertyValue > aArgs( 1 ); - aArgs[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ScrollNextPrev" )); - aNext.QueryValue( a ); - aArgs[0].Value = a; - SfxToolBoxControl::Dispatch( Reference< XDispatchProvider >( GetFrame()->getController(), UNO_QUERY ), - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ScrollNextPrev" )), - aArgs ); - } - return 0; -} - -void SwScrollNaviToolBox::MouseButtonUp( const MouseEvent& rMEvt ) -{ - ToolBox::MouseButtonUp(rMEvt); - if ( ((SwScrollNaviPopup*)GetParent())->IsInPopupMode() ) - ((SwScrollNaviPopup*)GetParent())->EndPopupMode( FLOATWIN_POPUPMODEEND_CLOSEALL ); -} - -void SwScrollNaviToolBox::RequestHelp( const HelpEvent& rHEvt ) -{ - SetItemText(NID_NEXT, SwScrollNaviPopup::GetQuickHelpText(sal_True)); - SetItemText(NID_PREV, SwScrollNaviPopup::GetQuickHelpText(sal_False)); - ToolBox::RequestHelp( rHEvt ); - -} - -String SwScrollNaviPopup::GetQuickHelpText(sal_Bool bNext) -{ - sal_uInt16 nResId = STR_IMGBTN_START; - nResId += SwView::GetMoveType() - NID_START; - if(!bNext) - nResId += NID_COUNT; - return String(SW_RES(nResId)); -} - -void SwNaviImageButton::Click() -{ - pPopup = new - SwScrollNaviPopup( FN_SCROLL_NAVIGATION, - m_xFrame ); - Point aPos = OutputToScreenPixel(Point(0,0)); - Rectangle aRect(aPos, GetSizePixel()); - SetPopupWindow( pPopup ); - pPopup->StartPopupMode(aRect, FLOATWIN_POPUPMODE_LEFT|FLOATWIN_POPUPMODE_ALLOWTEAROFF); -} - -//-------------------------------------------------------------------- - -void SwNaviImageButton::SetPopupWindow( SfxPopupWindow* pWindow ) -{ - pPopupWindow = pWindow; - pPopupWindow->SetPopupModeEndHdl( LINK( this, SwNaviImageButton, PopupModeEndHdl )); - pPopupWindow->SetDeleteLink_Impl( LINK( this, SwNaviImageButton, ClosePopupWindow )); -} - -//-------------------------------------------------------------------- - -IMPL_LINK( SwNaviImageButton, PopupModeEndHdl, void *, EMPTYARG ) -{ - if ( pPopupWindow->IsVisible() ) - { - // Replace floating window with popup window and destroy - // floating window instance. - delete pFloatingWindow; - pFloatingWindow = pPopupWindow; - pPopupWindow = 0; - } - else - { - // Popup window has been closed by the user. No replacement, instance - // will destroy itself. - pPopupWindow = 0; - } - - return 1; -} - -//-------------------------------------------------------------------- -IMPL_LINK( SwNaviImageButton, ClosePopupWindow, SfxPopupWindow *, pWindow ) -{ - if ( pWindow == pFloatingWindow ) - pFloatingWindow = 0; - else - pPopupWindow = 0; - - return 1; -} - -void SwHlpImageButton::RequestHelp( const HelpEvent& rHEvt ) -{ - - SetQuickHelpText(SwScrollNaviPopup::GetQuickHelpText(!bUp)); - - ImageButton::RequestHelp(rHEvt); -} - -SwNaviImageButton::SwNaviImageButton( - Window* pParent, - const Reference< XFrame >& rFrame ) : - ImageButton(pParent, SW_RES(BTN_NAVI)), - pPopup(0), - aImage(SW_RES(IMG_BTN)), - sQuickText(SW_RES(ST_QUICK)), - pPopupWindow(0), - pFloatingWindow(0), - m_xFrame( rFrame ) -{ - FreeResource(); - SetStyle(GetStyle()|WB_NOPOINTERFOCUS); - SetQuickHelpText(sQuickText); - SetModeImage( aImage ); -} - -void SwNaviImageButton::DataChanged( const DataChangedEvent& rDCEvt ) -{ - if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && - (rDCEvt.GetFlags() & SETTINGS_STYLE) ) - SetModeImage( aImage ); - - Window::DataChanged( rDCEvt ); -} - -class SwZoomBox_Impl : public ComboBox -{ - sal_uInt16 nSlotId; - sal_Bool bRelease; - uno::Reference< frame::XDispatchProvider > m_xDispatchProvider; - -public: - SwZoomBox_Impl( - Window* pParent, - sal_uInt16 nSlot, - const Reference< XDispatchProvider >& rDispatchProvider ); - ~SwZoomBox_Impl(); - -protected: - virtual void Select(); - virtual long Notify( NotifyEvent& rNEvt ); - - void ReleaseFocus(); - -}; - -SwZoomBox_Impl::SwZoomBox_Impl( - Window* pParent, - sal_uInt16 nSlot, - const Reference< XDispatchProvider >& rDispatchProvider ): - ComboBox( pParent, SW_RES(RID_PVIEW_ZOOM_LB)), - nSlotId(nSlot), - bRelease(sal_True), - m_xDispatchProvider( rDispatchProvider ) -{ - EnableAutocomplete( sal_False ); - sal_uInt16 aZoomValues[] = - { 25, 50, 75, 100, 150, 200 }; - for(sal_uInt16 i = 0; i < sizeof(aZoomValues)/sizeof(sal_uInt16); i++) - { - String sEntry = String::CreateFromInt32(aZoomValues[i]); - sEntry += '%'; - InsertEntry(sEntry); - } -} - -SwZoomBox_Impl::~SwZoomBox_Impl() -{} - -void SwZoomBox_Impl::Select() -{ - if ( !IsTravelSelect() ) - { - String sEntry(GetText()); - sEntry.EraseAllChars( '%' ); - sal_uInt16 nZoom = (sal_uInt16)sEntry.ToInt32(); - if(nZoom < MINZOOM) - nZoom = MINZOOM; - if(nZoom > MAXZOOM) - nZoom = MAXZOOM; - - SfxUInt16Item aItem( nSlotId, nZoom ); - if ( FN_PREVIEW_ZOOM == nSlotId ) - { - Any a; - Sequence< PropertyValue > aArgs( 1 ); - aArgs[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PreviewZoom" )); - aItem.QueryValue( a ); - aArgs[0].Value = a; - SfxToolBoxControl::Dispatch( - m_xDispatchProvider, - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PreviewZoom" )), - aArgs ); - } - - ReleaseFocus(); - } -} - -long SwZoomBox_Impl::Notify( NotifyEvent& rNEvt ) -{ - long nHandled = 0; - - if ( rNEvt.GetType() == EVENT_KEYINPUT ) - { - sal_uInt16 nCode = rNEvt.GetKeyEvent()->GetKeyCode().GetCode(); - - switch ( nCode ) - { - case KEY_RETURN: - case KEY_TAB: - { - if ( KEY_TAB == nCode ) - bRelease = sal_False; - else - nHandled = 1; - Select(); - break; - } - - case KEY_ESCAPE: - SetText( GetSavedValue() ); - ReleaseFocus(); - break; - } - } - else if ( EVENT_LOSEFOCUS == rNEvt.GetType() ) - { - Window* pFocusWin = Application::GetFocusWindow(); - if ( !HasFocus() && GetSubEdit() != pFocusWin ) - SetText( GetSavedValue() ); - } - - return nHandled ? nHandled : ComboBox::Notify( rNEvt ); -} - -void SwZoomBox_Impl::ReleaseFocus() -{ - if ( !bRelease ) - { - bRelease = sal_True; - return; - } - SfxViewShell* pCurSh = SfxViewShell::Current(); - - if ( pCurSh ) - { - Window* pShellWnd = pCurSh->GetWindow(); - - if ( pShellWnd ) - pShellWnd->GrabFocus(); - } -} - -SFX_IMPL_TOOLBOX_CONTROL( SwPreviewZoomControl, SfxUInt16Item); - -SwPreviewZoomControl::SwPreviewZoomControl( - sal_uInt16 nSlotId, - sal_uInt16 nId, - ToolBox& rTbx) : - SfxToolBoxControl( nSlotId, nId, rTbx ) -{ -} - -SwPreviewZoomControl::~SwPreviewZoomControl() -{ -} - -void SwPreviewZoomControl::StateChanged( sal_uInt16 /*nSID*/, - SfxItemState eState, - const SfxPoolItem* pState ) -{ - sal_uInt16 nId = GetId(); - GetToolBox().EnableItem( nId, (GetItemState(pState) != SFX_ITEM_DISABLED) ); - SwZoomBox_Impl* pBox = (SwZoomBox_Impl*)GetToolBox().GetItemWindow( GetId() ); - if(SFX_ITEM_AVAILABLE <= eState) - { - String sZoom(String::CreateFromInt32(((const SfxUInt16Item*)pState)->GetValue())); - sZoom += '%'; - pBox->SetText(sZoom); - pBox->SaveValue(); - } -} - -Window* SwPreviewZoomControl::CreateItemWindow( Window *pParent ) -{ - SwZoomBox_Impl* pRet = new SwZoomBox_Impl( pParent, GetSlotId(), Reference< XDispatchProvider >( m_xFrame->getController(), UNO_QUERY )); - return pRet; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/ribbar/workctrl.hrc b/sw/source/ui/ribbar/workctrl.hrc deleted file mode 100644 index 64dfb6eddb..0000000000 --- a/sw/source/ui/ribbar/workctrl.hrc +++ /dev/null @@ -1,85 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _WORKCTRL_HRC -#define _WORKCTRL_HRC -#include "ribbar.hrc" - -#define TBX_INSERT 1 -#define TBX_OBJ_INSERT 2 -#define TBX_FIELD_INSERT 3 -#define TBX_NAVIGATION 4 -#define IL_VALUES 5 -#define IMG_BTN 6 -#define ST_QUICK 7 -#define FI_INFO 8 -#define FL_SEP 9 - -#define ST_TBL 12 -#define ST_FRM 13 -#define ST_PGE 14 -#define ST_DRW 15 -#define ST_CTRL 16 -#define ST_REG 17 -#define ST_BKM 18 -#define ST_GRF 19 -#define ST_OLE 20 -#define ST_OUTL 21 -#define ST_SEL 22 -#define ST_FTN 23 -#define ST_MARK 24 -#define ST_POSTIT 25 -#define ST_SRCH_REP 26 -#define ST_INDEX_ENTRY 27 -#define ST_TABLE_FORMULA 28 -#define ST_TABLE_FORMULA_ERROR 29 - -// doppelter Eintrag! hrc und hxx -// diese Ids bestimmen, was die Buttons unter dem Scrollbar tun -#define NID_START 20000 -#define NID_NEXT 20000 -#define NID_PREV 20001 -#define NID_TBL 20002 -#define NID_FRM 20003 -#define NID_PGE 20004 -#define NID_DRW 20005 -#define NID_CTRL 20006 -#define NID_REG 20007 -#define NID_BKM 20008 -#define NID_GRF 20009 -#define NID_OLE 20010 -#define NID_OUTL 20011 -#define NID_SEL 20012 -#define NID_FTN 20013 -#define NID_MARK 20014 -#define NID_POSTIT 20015 -#define NID_SRCH_REP 20016 -#define NID_INDEX_ENTRY 20017 -#define NID_TABLE_FORMULA 20018 -#define NID_TABLE_FORMULA_ERROR 20019 -#define NID_COUNT 20 - -#endif diff --git a/sw/source/ui/ribbar/workctrl.src b/sw/source/ui/ribbar/workctrl.src deleted file mode 100644 index ce0163974f..0000000000 --- a/sw/source/ui/ribbar/workctrl.src +++ /dev/null @@ -1,409 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SVXIDS_HRC -#include <svx/svxids.hrc> -#endif -#ifndef _GLOBLMN_HRC -#include <svx/globlmn.hrc> -#endif -#include "workctrl.hrc" -#include "helpid.h" -#include "cmdid.h" - -Menu RID_INSERT_FIELD_CTRL -{ - ItemList = - { - MenuItem - { - Identifier = FN_INSERT_FLD_DATE ; - HelpId = CMD_FN_INSERT_FLD_DATE ; - Text [ en-US ] = "Date" ; - }; - MenuItem - { - Identifier = FN_INSERT_FLD_TIME ; - HelpId = CMD_FN_INSERT_FLD_TIME ; - Text [ en-US ] = "Time" ; - }; - MenuItem - { - Identifier = FN_INSERT_FLD_PGNUMBER ; - HelpId = CMD_FN_INSERT_FLD_PGNUMBER ; - Text [ en-US ] = "Page Number" ; - }; - MenuItem - { - Identifier = FN_INSERT_FLD_PGCOUNT ; - HelpId = CMD_FN_INSERT_FLD_PGCOUNT ; - Text [ en-US ] = "Page Count" ; - }; - MenuItem - { - Identifier = FN_INSERT_FLD_TOPIC ; - HelpId = CMD_FN_INSERT_FLD_TOPIC ; - Text [ en-US ] = "Subject" ; - }; - MenuItem - { - Identifier = FN_INSERT_FLD_TITLE ; - HelpId = CMD_FN_INSERT_FLD_TITLE ; - Text [ en-US ] = "Title" ; - }; - MenuItem - { - Identifier = FN_INSERT_FLD_AUTHOR ; - HelpId = CMD_FN_INSERT_FLD_AUTHOR ; - Text [ en-US ] = "Author" ; - }; - MenuItem - { - Separator = TRUE ; - }; - MenuItem - { - Identifier = FN_INSERT_FIELD ; - HelpId = CMD_FN_INSERT_FIELD ; - Text [ en-US ] = "Other..." ; - }; - }; -}; -#define SCROLL_IMAGE_IDLIST \ - IdList = \ - { \ - NID_NEXT ; \ - NID_PREV ; \ - NID_TBL ; \ - NID_FRM ; \ - NID_PGE ; \ - NID_DRW ; \ - NID_CTRL ; \ - NID_REG ; \ - NID_BKM ; \ - NID_GRF ; \ - NID_OLE ; \ - NID_OUTL ; \ - NID_SEL ; \ - NID_FTN ; \ - NID_MARK ; \ - NID_POSTIT ; \ - NID_SRCH_REP ; \ - NID_INDEX_ENTRY; \ - NID_TABLE_FORMULA; \ - NID_TABLE_FORMULA_ERROR; \ - }; \ - IdCount = { 20 ; }; - -FloatingWindow RID_SCROLL_NAVIGATION_WIN -{ - Moveable = TRUE ; - Closeable = TRUE ; - Hide = TRUE ; - SVLook = TRUE ; - HelpID = HID_INSERT_CTRL ; - ImageList IL_VALUES - { - Prefix = "sr"; - MaskColor = IMAGE_MASK_COLOR ; - SCROLL_IMAGE_IDLIST - }; - FixedLine FL_SEP - { - //no position, no text - Size = MAP_APPFONT ( 20 , 4 ) ; - }; - FixedText FI_INFO - { - //no position, no text - Size = MAP_APPFONT ( 20 , 8 ) ; - Center = TRUE; - }; - String ST_TBL - { - Text [ en-US ] = "Table" ; - }; - String ST_FRM - { - Text [ en-US ] = "Text Frame" ; - }; - String ST_PGE - { - Text [ en-US ] = "Page" ; - }; - String ST_DRW - { - Text [ en-US ] = "Drawing" ; - }; - String ST_CTRL - { - Text [ en-US ] = "Control" ; - }; - String ST_REG - { - Text [ en-US ] = "Section" ; - }; - String ST_BKM - { - Text [ en-US ] = "Bookmark" ; - }; - String ST_GRF - { - Text [ en-US ] = "Graphics" ; - }; - String ST_OLE - { - Text [ en-US ] = "OLE object" ; - }; - String ST_OUTL - { - Text [ en-US ] = "Headings" ; - }; - String ST_SEL - { - Text [ en-US ] = "Selection" ; - }; - String ST_FTN - { - Text [ en-US ] = "Footnote" ; - }; - String ST_MARK - { - Text [ en-US ] = "Reminder" ; - }; - String ST_POSTIT - { - Text [ en-US ] = "Note" ; - }; - String ST_SRCH_REP - { - Text [ en-US ] = "Repeat search" ; - }; - String ST_INDEX_ENTRY - { - Text [ en-US ] = "Index entry"; - }; - String ST_TABLE_FORMULA - { - Text [ en-US ] = "Table formula"; - }; - String ST_TABLE_FORMULA_ERROR - { - Text [ en-US ] = "Wrong table formula"; - }; - Text [ en-US ] = "Navigation" ; -}; -/*************************************************************** - Strings fuer die Quickhelp der View-PgUp/Down-Buttons -***************************************************************/ -String STR_IMGBTN_NEXT_DOWN -{ - Text = "" ; -}; -String STR_IMGBTN_PREV_DOWN -{ - Text = "" ; -}; -String STR_IMGBTN_TBL_DOWN -{ - Text [ en-US ] = "Next table" ; -}; -String STR_IMGBTN_FRM_DOWN -{ - Text [ en-US ] = "Next text frame" ; -}; -String STR_IMGBTN_PGE_DOWN -{ - Text [ en-US ] = "Next page" ; -}; -String STR_IMGBTN_DRW_DOWN -{ - Text [ en-US ] = "Next drawing" ; -}; -String STR_IMGBTN_CTRL_DOWN -{ - Text [ en-US ] = "Next control" ; -}; -String STR_IMGBTN_REG_DOWN -{ - Text [ en-US ] = "Next section" ; -}; -String STR_IMGBTN_BKM_DOWN -{ - Text [ en-US ] = "Next bookmark" ; -}; -String STR_IMGBTN_GRF_DOWN -{ - Text [ en-US ] = "Next graphic" ; -}; -String STR_IMGBTN_OLE_DOWN -{ - Text [ en-US ] = "Next OLE object" ; -}; -String STR_IMGBTN_OUTL_DOWN -{ - Text [ en-US ] = "Next heading" ; -}; -String STR_IMGBTN_SEL_DOWN -{ - Text [ en-US ] = "Next selection" ; -}; -String STR_IMGBTN_FTN_DOWN -{ - Text [ en-US ] = "Next footnote" ; -}; -String STR_IMGBTN_MARK_DOWN -{ - Text [ en-US ] = "Next Reminder" ; -}; -String STR_IMGBTN_POSTIT_DOWN -{ - Text [ en-US ] = "Next Note" ; -}; -String STR_IMGBTN_SRCH_REP_DOWN -{ - Text [ en-US ] = "Continue search forward" ; -}; -String STR_IMGBTN_INDEX_ENTRY_DOWN -{ - Text [ en-US ] = "Next index entry"; -}; -String STR_IMGBTN_NEXT_UP -{ - Text = "" ; -}; -String STR_IMGBTN_PREV_UP -{ - Text = "" ; -}; -String STR_IMGBTN_TBL_UP -{ - Text [ en-US ] = "Previous table" ; -}; -String STR_IMGBTN_FRM_UP -{ - Text [ en-US ] = "Previous text frame" ; -}; -String STR_IMGBTN_PGE_UP -{ - Text [ en-US ] = "Previous page" ; -}; -String STR_IMGBTN_DRW_UP -{ - Text [ en-US ] = "Previous drawing" ; -}; -String STR_IMGBTN_CTRL_UP -{ - Text [ en-US ] = "Previous control" ; -}; -String STR_IMGBTN_REG_UP -{ - Text [ en-US ] = "Previous section" ; -}; -String STR_IMGBTN_BKM_UP -{ - Text [ en-US ] = "Previous bookmark" ; -}; -String STR_IMGBTN_GRF_UP -{ - Text [ en-US ] = "Previous graphic" ; -}; -String STR_IMGBTN_OLE_UP -{ - Text [ en-US ] = "Previous OLE object" ; -}; -String STR_IMGBTN_OUTL_UP -{ - Text [ en-US ] = "Previous heading" ; -}; -String STR_IMGBTN_SEL_UP -{ - Text [ en-US ] = "Previous selection" ; -}; -String STR_IMGBTN_FTN_UP -{ - Text [ en-US ] = "Previous footnote" ; -}; -String STR_IMGBTN_MARK_UP -{ - Text [ en-US ] = "Previous Reminder" ; -}; -String STR_IMGBTN_POSTIT_UP -{ - Text [ en-US ] = "Previous Note" ; -}; -String STR_IMGBTN_SRCH_REP_UP -{ - Text [ en-US ] = "Continue search backwards" ; -}; -String STR_IMGBTN_INDEX_ENTRY_UP -{ - Text [ en-US ] = "Previous index entry"; -}; -String STR_IMGBTN_TBLFML_UP -{ - Text [ en-US ] = "Previous table formula"; -}; -String STR_IMGBTN_TBLFML_DOWN -{ - Text [ en-US ] = "Next table formula"; -}; -String STR_IMGBTN_TBLFML_ERR_UP -{ - Text [ en-US ] = "Previous faulty table formula"; -}; -String STR_IMGBTN_TBLFML_ERR_DOWN -{ - Text [ en-US ] = "Next faulty table formula"; -}; -ImageButton BTN_NAVI -{ - HelpID = HID_NAVIGATION_IMGBTN ; - SVLOOK = TRUE ; - HIDE = TRUE ; - RectStyle = TRUE ; - SmallStyle = TRUE ; - Image IMG_BTN - { - ImageBitmap = Bitmap { File = "punkt.bmp" ; }; - MaskColor = IMAGE_MASK_COLOR ; - }; - String ST_QUICK - { - Text [ en-US ] = "Navigation" ; - }; -}; -ComboBox RID_PVIEW_ZOOM_LB -{ - HelpId = HID_PVIEW_ZOOM_LB; - Size = MAP_APPFONT ( 30 , 86 ) ; - DropDown = TRUE ; - AutoHScroll = TRUE ; - DDExtraWidth = TRUE ; - Border = TRUE ; - Hide = TRUE ; -}; |