Kaydet (Commit) 596bd369 authored tarafından Matthias Freund's avatar Matthias Freund Kaydeden (comit) Bosdonnat Cedric

fdo#39468 Comment translation GER-ENG in sw/source/ui/ribbar/

cleanups and translations - and a forgotten file.

Change-Id: I048ff445fa04b12cb86ae580370bfe444041d41f
Reviewed-on: https://gerrit.libreoffice.org/3893Reviewed-by: 's avatarBosdonnat Cedric <cedric.bosdonnat@free.fr>
Tested-by: 's avatarBosdonnat Cedric <cedric.bosdonnat@free.fr>
üst 62b1030a
......@@ -19,36 +19,17 @@
#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;
......@@ -61,14 +42,6 @@ sal_Bool ConstArc::MouseButtonDown( const MouseEvent& rMEvt )
return (bReturn);
}
/*************************************************************************
|*
|* MouseButtonUp-event
|*
\************************************************************************/
sal_Bool ConstArc::MouseButtonUp( const MouseEvent& rMEvt )
{
sal_Bool bReturn = sal_False;
......@@ -84,7 +57,7 @@ sal_Bool ConstArc::MouseButtonUp( const MouseEvent& rMEvt )
else
{ nAnzButUp++;
if (nAnzButUp == 3) // Kreisbogenerzeugung beendet
if (nAnzButUp == 3) // Generating of circular arc finished
{
SwDrawBase::MouseButtonUp(rMEvt);
nAnzButUp = 0;
......@@ -98,14 +71,6 @@ sal_Bool ConstArc::MouseButtonUp( const MouseEvent& rMEvt )
return (bReturn);
}
/*************************************************************************
|*
|* Function aktivieren
|*
\************************************************************************/
void ConstArc::Activate(const sal_uInt16 nSlotId)
{
switch (nSlotId)
......@@ -127,12 +92,6 @@ void ConstArc::Activate(const sal_uInt16 nSlotId)
SwDrawBase::Activate(nSlotId);
}
/*************************************************************************
|*
|* Funktion deaktivieren
|*
\************************************************************************/
void ConstArc::Deactivate()
{
nAnzButUp = 0;
......@@ -140,6 +99,4 @@ void ConstArc::Deactivate()
SwDrawBase::Deactivate();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -45,11 +45,6 @@
#include <math.h>
/*************************************************************************
|*
|* C'Tor
|*
\************************************************************************/
ConstCustomShape::ConstCustomShape( SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView, SfxRequest& rReq )
: SwDrawBase( pWrtShell, pEditWin, pSwView )
{
......@@ -61,7 +56,6 @@ OUString ConstCustomShape::GetShapeType() const
return aCustomShape;
}
//static
OUString ConstCustomShape::GetShapeTypeFromRequest( SfxRequest& rReq )
{
OUString aRet;
......@@ -74,12 +68,6 @@ OUString ConstCustomShape::GetShapeTypeFromRequest( SfxRequest& rReq )
return aRet;
}
/*************************************************************************
|*
|* MouseButtonDown-event
|*
\************************************************************************/
sal_Bool ConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt)
{
sal_Bool bReturn = SwDrawBase::MouseButtonDown(rMEvt);
......@@ -106,23 +94,11 @@ sal_Bool ConstCustomShape::MouseButtonDown(const MouseEvent& rMEvt)
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 );
......@@ -130,11 +106,7 @@ void ConstCustomShape::Activate(const sal_uInt16 nSlotId)
SwDrawBase::Activate(nSlotId);
}
/*************************************************************************
|*
|* applying attributes
|*
\************************************************************************/
// applying attributes
void ConstCustomShape::SetAttributes( SdrObject* pObj )
{
......
......@@ -29,18 +29,12 @@
extern bool bNoInterrupt; // in mainwn.cxx
/**
* Ctor
*/
ConstFormControl::ConstFormControl(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView) :
SwDrawBase(pWrtShell, pEditWin, pSwView)
{
m_bInsForm = true;
}
/**
* MouseButtonDown event
*/
sal_Bool ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt)
{
sal_Bool bReturn = sal_False;
......@@ -85,9 +79,6 @@ sal_Bool ConstFormControl::MouseButtonDown(const MouseEvent& rMEvt)
return (bReturn);
}
/**
* Activate
*/
void ConstFormControl::Activate(const sal_uInt16 nSlotId)
{
m_pWin->SetSdrDrawMode( static_cast<SdrObjKind>(nSlotId) );
......
......@@ -28,27 +28,11 @@
#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;
......@@ -59,14 +43,6 @@ sal_Bool ConstPolygon::MouseButtonDown(const MouseEvent& rMEvt)
return (bReturn);
}
/*************************************************************************
|*
|* MouseMove-event
|*
\************************************************************************/
sal_Bool ConstPolygon::MouseMove(const MouseEvent& rMEvt)
{
sal_Bool bReturn = SwDrawBase::MouseMove(rMEvt);
......@@ -74,14 +50,6 @@ sal_Bool ConstPolygon::MouseMove(const MouseEvent& rMEvt)
return bReturn;
}
/*************************************************************************
|*
|* MouseButtonUp-event
|*
\************************************************************************/
sal_Bool ConstPolygon::MouseButtonUp(const MouseEvent& rMEvt)
{
sal_Bool bReturn = sal_False;
......@@ -113,14 +81,6 @@ sal_Bool ConstPolygon::MouseButtonUp(const MouseEvent& rMEvt)
return (bReturn);
}
/*************************************************************************
|*
|* Function aktivieren
|*
\************************************************************************/
void ConstPolygon::Activate(const sal_uInt16 nSlotId)
{
switch (nSlotId)
......@@ -144,6 +104,4 @@ void ConstPolygon::Activate(const sal_uInt16 nSlotId)
SwDrawBase::Activate(nSlotId);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -36,10 +36,6 @@
#include <drawbase.hxx>
#include <conrect.hxx>
/**
* Ctor
*/
ConstRectangle::ConstRectangle( SwWrtShell* pWrtShell, SwEditWin* pEditWin,
SwView* pSwView )
: SwDrawBase( pWrtShell, pEditWin, pSwView ),
......@@ -49,9 +45,6 @@ ConstRectangle::ConstRectangle( SwWrtShell* pWrtShell, SwEditWin* pEditWin,
{
}
/**
* MouseButtonDown event
*/
sal_Bool ConstRectangle::MouseButtonDown(const MouseEvent& rMEvt)
{
sal_Bool bReturn;
......@@ -69,9 +62,6 @@ sal_Bool ConstRectangle::MouseButtonDown(const MouseEvent& rMEvt)
return (bReturn);
}
/**
* MouseButtonUp event
*/
sal_Bool ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
{
sal_Bool bRet = SwDrawBase::MouseButtonUp(rMEvt);
......@@ -146,9 +136,6 @@ sal_Bool ConstRectangle::MouseButtonUp(const MouseEvent& rMEvt)
return bRet;
}
/**
* Activate
*/
void ConstRectangle::Activate(const sal_uInt16 nSlotId)
{
bMarquee = bCapVertical = false;
......@@ -197,6 +184,4 @@ void ConstRectangle::Activate(const sal_uInt16 nSlotId)
SwDrawBase::Activate(nSlotId);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <hintids.hxx>
#include <svx/svdview.hxx>
#include <svx/svdobj.hxx>
......@@ -42,14 +41,6 @@ using namespace ::com::sun::star;
extern bool bNoInterrupt; // in mainwn.cxx
/*************************************************************************
|*
|* Konstruktor
|*
\************************************************************************/
SwDrawBase::SwDrawBase(SwWrtShell* pSwWrtShell, SwEditWin* pWindow, SwView* pSwView) :
m_pView(pSwView),
m_pSh(pSwWrtShell),
......@@ -62,25 +53,12 @@ SwDrawBase::SwDrawBase(SwWrtShell* pSwWrtShell, SwEditWin* pWindow, SwView* pSwV
m_pSh->MakeDrawView();
}
/*************************************************************************
|*
|* Destruktor
|*
\************************************************************************/
SwDrawBase::~SwDrawBase()
{
if (m_pView->GetWrtShellPtr()) // Im view-Dtor koennte die wrtsh bereits geloescht worden sein...
if (m_pView->GetWrtShellPtr()) // In the view-dtor could the wrtsh already been deleted...
m_pSh->GetDrawView()->SetEditMode(sal_True);
}
/*************************************************************************
|*
|* MouseButtonDown-event
|*
\************************************************************************/
sal_Bool SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
{
sal_Bool bReturn = sal_False;
......@@ -105,7 +83,7 @@ sal_Bool SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
SdrViewEvent aVEvt;
SdrHitKind eHit = pSdrView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
// Nur neues Objekt, wenn nicht im Basismode (bzw reinem Selektionsmode)
// Only new object, if not in the basic mode (or pure selection mode).
if (rMEvt.IsLeft() && !m_pWin->IsDrawAction())
{
if (IsCreateObj() && (eHit == SDRHIT_UNMARKEDOBJECT || eHit == SDRHIT_NONE || m_pSh->IsDrawCreate()))
......@@ -124,36 +102,28 @@ sal_Bool SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
}
else if (!pSdrView->IsAction())
{
/**********************************************************************
* BEZIER-EDITOR
**********************************************************************/
// 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
******************************************************************/
// Drag handle
bNoInterrupt = 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
******************************************************************/
// Insert gluepoint
bNoInterrupt = true;
bReturn = pSdrView->BegInsObjPoint(m_aStartPos, rMEvt.IsMod1());
m_pWin->SetDrawAction(sal_True);
}
else if (eHit == SDRHIT_MARKEDOBJECT && rMEvt.IsMod1())
{
/******************************************************************
* Klebepunkt selektieren
******************************************************************/
// Select gluepoint
if (!rMEvt.IsShift())
pSdrView->UnmarkAllPoints();
......@@ -162,16 +132,12 @@ sal_Bool SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
}
else if (eHit == SDRHIT_MARKEDOBJECT && !rMEvt.IsShift() && !rMEvt.IsMod2())
{
/******************************************************************
* Objekt verschieben
******************************************************************/
// Move objekt
return sal_False;
}
else if (eHit == SDRHIT_HANDLE)
{
/******************************************************************
* Klebepunkt selektieren
******************************************************************/
// Select gluepoint
if (pSdrView->HasMarkablePoints() && (!pSdrView->IsPointMarked(*aVEvt.pHdl) || rMEvt.IsShift()))
{
SdrHdl* pHdl = NULL;
......@@ -203,16 +169,14 @@ sal_Bool SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
}
else
{
/******************************************************************
* Objekt selektieren oder draggen
******************************************************************/
// Select or drag object
if (m_pSh->IsObjSelectable(m_aStartPos) && eHit == SDRHIT_UNMARKEDOBJECT)
{
if (pSdrView->HasMarkablePoints())
pSdrView->UnmarkAllPoints();
bNoInterrupt = false;
// Drag im edtwin verwenden
// Use drag in edtwin
return sal_False;
}
......@@ -247,13 +211,6 @@ sal_Bool SwDrawBase::MouseButtonDown(const MouseEvent& rMEvt)
return bReturn;
}
/*************************************************************************
|*
|* MouseMove-event
|*
\************************************************************************/
sal_Bool SwDrawBase::MouseMove(const MouseEvent& rMEvt)
{
SdrView *pSdrView = m_pSh->GetDrawView();
......@@ -278,13 +235,6 @@ sal_Bool SwDrawBase::MouseMove(const MouseEvent& rMEvt)
return (bRet);
}
/*************************************************************************
|*
|* MouseButtonUp-event
|*
\************************************************************************/
sal_Bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
{
sal_Bool bReturn = sal_False;
......@@ -316,7 +266,7 @@ sal_Bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
}
m_pSh->EndCreate(SDRCREATE_FORCEEND);
if (OBJ_NONE == nDrawMode) // Textrahmen eingefuegt
if (OBJ_NONE == nDrawMode) // Text border inserted
{
uno::Reference< frame::XDispatchRecorder > xRecorder =
m_pSh->GetView().GetViewFrame()->GetBindings().GetRecorder();
......@@ -336,7 +286,7 @@ sal_Bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
SwFmtCol aCol((const SwFmtCol&)aSet.Get(RES_COL));
aCol.Init(m_pWin->GetFrmColCount(), aCol.GetGutterWidth(), aCol.GetWishWidth());
aSet.Put(aCol);
// Vorlagen-AutoUpdate
// Template AutoUpdate
SwFrmFmt* pFmt = m_pSh->GetCurFrmFmt();
if(pFmt && pFmt->IsAutoUpdateFmt())
m_pSh->AutoUpdateFrame(pFmt, aSet);
......@@ -360,9 +310,7 @@ sal_Bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
if (!pSdrView->HasMarkablePoints())
{
/**********************************************************************
* KEIN BEZIER_EDITOR
**********************************************************************/
// NO BEZIER_EDITOR
if ((m_pSh->GetDrawView()->IsMarkObj() || m_pSh->GetDrawView()->IsMarkPoints())
&& rMEvt.IsLeft())
{
......@@ -377,7 +325,7 @@ sal_Bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
if (!m_pSh->IsObjSelected())
{
m_pView->LeaveDrawCreate(); // In Selektionsmode wechseln
m_pView->LeaveDrawCreate(); // Switch to selection mode
m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW);
......@@ -386,7 +334,7 @@ sal_Bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
}
m_pView->NoRotate();
bCheckShell = true; // ggf BezierShell anwerfen
bCheckShell = true; // if necessary turn on BezierShell
}
else if (!m_pSh->IsObjSelected() && !m_pWin->IsDrawAction())
{
......@@ -407,9 +355,7 @@ sal_Bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
}
else
{
/**********************************************************************
* BEZIER_EDITOR
**********************************************************************/
// BEZIER_EDITOR
if ( pSdrView->IsAction() )
{
if ( pSdrView->IsInsObjPoint() )
......@@ -437,7 +383,7 @@ sal_Bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
if (!m_pSh->IsObjSelected())
{
m_pView->LeaveDrawCreate(); // In Selektionsmode wechseln
m_pView->LeaveDrawCreate(); // Switch to selection mode
m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW);
......@@ -446,7 +392,7 @@ sal_Bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
}
m_pView->NoRotate();
bCheckShell = true; // ggf BezierShell anwerfen
bCheckShell = true; // if necessary turn on BezierShell
}
}
......@@ -465,22 +411,15 @@ sal_Bool SwDrawBase::MouseButtonUp(const MouseEvent& rMEvt)
}
if (bCheckShell)
m_pView->AttrChangedNotify( m_pSh ); // ggf BezierShell anwerfen
m_pView->AttrChangedNotify( m_pSh ); // if necessary turn on BezierShell
//!!!!!!!!!! Achtung Suizid !!!!!!!!!!! Sollte alles mal erneuert werden
//!!!!!!!!!! Attention suicide !!!!!!!!!!! Everything should be renewed once
if ( bAutoCap )
m_pView->AutoCaption(FRAME_CAP); //Kann derzeit nur FRAME sein, sonst auf
//enums umstellen
m_pView->AutoCaption(FRAME_CAP); //Can currently only be FRAME, otherwise convert
// to enums
return (bReturn);
}
/*************************************************************************
|*
|* Function aktivieren
|*
\************************************************************************/
void SwDrawBase::Activate(const sal_uInt16 nSlot)
{
SetSlotId(nSlot);
......@@ -493,13 +432,6 @@ void SwDrawBase::Activate(const sal_uInt16 nSlot)
m_pSh->NoEdit();
}
/*************************************************************************
|*
|* Function deaktivieren
|*
\************************************************************************/
void SwDrawBase::Deactivate()
{
SdrView *pSdrView = m_pSh->GetDrawView();
......@@ -519,15 +451,10 @@ void SwDrawBase::Deactivate()
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.
|*
\************************************************************************/
// Process keyboard events
//
// If a KeyEvent is processed then the return value is sal_True, otherwise
// Sal_False.
sal_Bool SwDrawBase::KeyInput(const KeyEvent& rKEvt)
{
......@@ -569,32 +496,32 @@ sal_Bool SwDrawBase::KeyInput(const KeyEvent& rKEvt)
if (nCode == KEY_UP)
{
// Scroll nach oben
// Scroll to top
nX = 0;
nY =-1;
}
else if (nCode == KEY_DOWN)
{
// Scroll nach unten
// Scroll down
nX = 0;
nY = 1;
}
else if (nCode == KEY_LEFT)
{
// Scroll nach links
// Scroll left
nX =-1;
nY = 0;
}
else if (nCode == KEY_RIGHT)
{
// Scroll nach rechts
// Scroll right
nX = 1;
nY = 0;
}
if (pSdrView->AreObjectsMarked() && rKEvt.GetKeyCode().IsMod2())
{
// Objekte verschieben
// Move objects
nX *= 100;
nY *= 100;
pSdrView->MoveAllMarked(Size(nX, nY));
......@@ -609,16 +536,10 @@ sal_Bool SwDrawBase::KeyInput(const KeyEvent& rKEvt)
return (bReturn);
}
/*************************************************************************
|*
|* Tastaturereignisse bearbeiten
|*
|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
|* sal_False.
|*
\************************************************************************/
// Process keyboard events
//
// If a KeyEvent is processed then the return value is sal_True, otherwise
// Sal_False.
void SwDrawBase::BreakCreate()
{
......@@ -629,13 +550,6 @@ void SwDrawBase::BreakCreate()
Deactivate();
}
/*************************************************************************
|*
|* Mauspointer umschalten
|*
\************************************************************************/
void SwDrawBase::SetDrawPointer()
{
SdrView *pSdrView = m_pSh->GetDrawView();
......@@ -646,11 +560,7 @@ void SwDrawBase::SetDrawPointer()
m_pWin->SetPointer(aDrawPt);
}
/*************************************************************************
|*
|* Ggf in Selektionsmode wechseln
|*
\************************************************************************/
// If necessary switch into selection mode
void SwDrawBase::EnterSelectMode(const MouseEvent& rMEvt)
{
......@@ -665,7 +575,7 @@ void SwDrawBase::EnterSelectMode(const MouseEvent& rMEvt)
m_pSh->SelectObj(aPnt);
if (rMEvt.GetModifier() == KEY_SHIFT || !m_pSh->IsObjSelected())
{
m_pView->LeaveDrawCreate(); // In Selektionsmode wechseln
m_pView->LeaveDrawCreate(); // Switch to selection mode
m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW);
}
......
......@@ -25,26 +25,16 @@
#include "drawbase.hxx"
#include "dselect.hxx"
/*************************************************************************
|*
|* Konstruktor
|*
\************************************************************************/
DrawSelection::DrawSelection(SwWrtShell* pWrtShell, SwEditWin* pEditWin, SwView* pSwView) :
SwDrawBase(pWrtShell, pEditWin, pSwView)
{
m_bCreateObj = false;
}
/*************************************************************************
|*
|* Tastaturereignisse bearbeiten
|*
|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
|* sal_False.
|*
\************************************************************************/
// Process keyboard events
//
// If a KeyEvent is processed then the return value is sal_True, otherwise
// Sal_False.
sal_Bool DrawSelection::KeyInput(const KeyEvent& rKEvt)
{
......@@ -70,12 +60,6 @@ sal_Bool DrawSelection::KeyInput(const KeyEvent& rKEvt)
return (bReturn);
}
/*************************************************************************
|*
|* Function aktivieren
|*
\************************************************************************/
void DrawSelection::Activate(const sal_uInt16 nSlotId)
{
m_pWin->SetSdrDrawMode(OBJ_NONE);
......@@ -85,5 +69,4 @@ void DrawSelection::Activate(const sal_uInt16 nSlotId)
m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -43,7 +43,7 @@
#include "edtwin.hxx"
#include "helpid.h"
// nur fuers UpdateRange - Box in dem der gestackte Cursor sthet loeschen
// Only for the UpdateRange: Delete the box in which the stacked cursor is positioned.
#include "pam.hxx"
#include "swundo.hxx"
......@@ -54,8 +54,6 @@
SFX_IMPL_POS_CHILDWINDOW_WITHID( 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)),
......@@ -120,13 +118,11 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind )
aPopMenu.SetSelectHdl(LINK( this, SwInputWindow, MenuHdl ));
}
//==================================================================
SwInputWindow::~SwInputWindow()
{
SfxImageManager::GetImageManager( SW_MOD() )->ReleaseToolBox(this);
//Lineale aufwecken
// wake rulers
if(pView)
{
pView->GetHRuler().SetActive( sal_True );
......@@ -153,14 +149,11 @@ void SwInputWindow::CleanupUglyHackWithUndo()
}
}
//==================================================================
void SwInputWindow::DataChanged( const DataChangedEvent& rDCEvt )
{
if ( rDCEvt.GetType() == DATACHANGED_SETTINGS && (rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
// update item images
// update item images
SwModule *pMod = SW_MOD();
SfxImageManager *pImgMgr = SfxImageManager::GetImageManager( pMod );
SetItemImage( FN_FORMULA_CALC, pImgMgr->GetImage(FN_FORMULA_CALC ));
......@@ -171,8 +164,6 @@ void SwInputWindow::DataChanged( const DataChangedEvent& rDCEvt )
ToolBox::DataChanged( rDCEvt );
}
//==================================================================
void SwInputWindow::Resize()
{
ToolBox::Resize();
......@@ -186,19 +177,17 @@ void SwInputWindow::Resize()
aEdit.Invalidate();
}
//==================================================================
void SwInputWindow::ShowWin()
{
bIsTable = sal_False;
//Lineale anhalten
// stop rulers
if(pView)
{
pView->GetHRuler().SetActive( sal_False );
pView->GetVRuler().SetActive( sal_False );
OSL_ENSURE(pWrtShell, "no WrtShell!");
// Cursor in Tabelle
// Cursor in table
bIsTable = pWrtShell->IsCrsrInTbl() ? sal_True : sal_False;
if( bFirst )
......@@ -217,12 +206,11 @@ void SwInputWindow::ShowWin()
else
aPos.SetText(SW_RESSTR(STR_TBL_FORMULA));
// Aktuelles Feld bearbeiten
// Edit current field
OSL_ENSURE(pMgr == 0, "FieldManager not deleted");
pMgr = new SwFldMgr;
// Formel soll immer mit einem "=" beginnen, hier
// also setzen
// Formular should always begin with "=" , so set here
String sEdit = OUString('=');
if( pMgr->GetCurFld() && TYP_FORMELFLD == pMgr->GetCurTypeId() )
{
......@@ -268,7 +256,7 @@ void SwInputWindow::ShowWin()
if( bFirst )
{
// WrtShell Flags richtig setzen
// Set WrtShell flags correctly
pWrtShell->SttSelect();
pWrtShell->EndSelect();
}
......@@ -284,7 +272,7 @@ void SwInputWindow::ShowWin()
aEdit.Invalidate();
aEdit.Update();
aEdit.GrabFocus();
// UserInterface fuer die Eingabe abklemmen
// For input cut the UserInterface
pView->GetEditWin().LockKeyInput(sal_True);
pView->GetViewFrame()->GetDispatcher()->Lock(sal_True);
......@@ -292,7 +280,6 @@ void SwInputWindow::ShowWin()
}
ToolBox::Show();
}
//==================================================================
IMPL_LINK( SwInputWindow, MenuHdl, Menu *, pMenu )
{
......@@ -337,7 +324,7 @@ static const char * const aStrArr[] = {
IMPL_LINK_NOARG(SwInputWindow, DropdownClickHdl)
{
sal_uInt16 nCurID = GetCurItemId();
EndSelection(); // setzt CurItemId zurueck !
EndSelection(); // reset back CurItemId !
switch ( nCurID )
{
case FN_FORMULA_CALC :
......@@ -352,13 +339,10 @@ IMPL_LINK_NOARG(SwInputWindow, DropdownClickHdl)
return sal_True;
}
//==================================================================
void SwInputWindow::Click( )
{
sal_uInt16 nCurID = GetCurItemId();
EndSelection(); // setzt CurItemId zurueck !
EndSelection(); // reset back CurItemId !
switch ( nCurID )
{
case FN_FORMULA_CANCEL:
......@@ -374,8 +358,6 @@ void SwInputWindow::Click( )
}
}
//==================================================================
void SwInputWindow::ApplyFormula()
{
pView->GetViewFrame()->GetDispatcher()->Lock(sal_False);
......@@ -383,8 +365,7 @@ void SwInputWindow::ApplyFormula()
CleanupUglyHackWithUndo();
pWrtShell->Pop( sal_False );
// Formel soll immer mit einem "=" beginnen, hier
// also wieder entfernen
// Formular should always begin with "=", so remove it here again
String sEdit(comphelper::string::strip(aEdit.GetText(), ' '));
if( sEdit.Len() && '=' == sEdit.GetChar( 0 ) )
sEdit.Erase( 0, 1 );
......@@ -398,8 +379,6 @@ void SwInputWindow::ApplyFormula()
pView->GetViewFrame()->GetBindings().Execute( FN_EDIT_FORMULA, aArgs, 0, SFX_CALLMODE_ASYNCHRON );
}
//==================================================================
void SwInputWindow::CancelFormula()
{
if(pView)
......@@ -418,7 +397,6 @@ void SwInputWindow::CancelFormula()
}
pView->GetViewFrame()->GetDispatcher()->Execute( FN_EDIT_FORMULA, SFX_CALLMODE_ASYNCHRON);
}
//==================================================================
const sal_Unicode CH_LRE = 0x202a;
const sal_Unicode CH_PDF = 0x202c;
......@@ -442,9 +420,9 @@ IMPL_LINK( SwInputWindow, SelTblCellsNotify, SwWrtShell *, pCaller )
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!
// The WrtShell is in the table selection,
// then cancel the table selection otherwise, the cursor is
// positioned "in the forest" and the live update does not work!
pWrtShell->StartAllAction();
SwPaM aPam( *pWrtShell->GetStkCrsr()->GetPoint() );
......@@ -515,8 +493,6 @@ void SwInputWindow::DelBoxCntnt()
}
}
//==================================================================
void InputEdit::KeyInput(const KeyEvent& rEvent)
{
const KeyCode aCode = rEvent.GetKeyCode();
......@@ -528,8 +504,6 @@ void InputEdit::KeyInput(const KeyEvent& rEvent)
Edit::KeyInput(rEvent);
}
//==================================================================
void InputEdit::UpdateRange(const String& rBoxes,
const String& rName )
{
......@@ -547,8 +521,8 @@ void InputEdit::UpdateRange(const String& rBoxes,
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
// OS: The following expression ensures that in the overwrite mode,
// the selected closing parenthesis will be not deleted.
if( nSel && ( nSel > 1 ||
GetText()[ (sal_uInt16)aSelection.Min() ] != cClose ))
Cut();
......@@ -596,14 +570,14 @@ void InputEdit::UpdateRange(const String& rBoxes,
}
++nEndPos;
}
// nur wenn akt. Pos im Breich oder direkt dahinter liegt
// Only if the current position lies in the range or right behind.
if( bFound && !( nStartPos < (sal_uInt16)aSelection.Max() &&
(sal_uInt16)aSelection.Max() <= nEndPos + 1 ))
bFound = false;
}
if( bFound )
{
nPos = ++nStartPos + 1; // wir wollen dahinter
nPos = ++nStartPos + 1; // We want behind
aActText.Erase( nStartPos, nEndPos - nStartPos );
aActText.Insert( aBoxes, nStartPos );
nPos = nPos + aBoxes.Len();
......@@ -626,7 +600,6 @@ void InputEdit::UpdateRange(const String& rBoxes,
GrabFocus();
}
//==================================================================
SwInputChild::SwInputChild(Window* _pParent,
sal_uInt16 nId,
......@@ -640,7 +613,6 @@ SwInputChild::SwInputChild(Window* _pParent,
eChildAlignment = SFX_ALIGN_LOWESTTOP;
}
SwInputChild::~SwInputChild()
{
if(pDispatch)
......
......@@ -52,9 +52,9 @@ String RID_WEBTOOLS_TOOLBOX
{
Text [ en-US ] = "Main Toolbar/Web" ;
};
/*************************************************************************
Textleiste
*************************************************************************/
// Text bar
String RID_WEBTEXT_TOOLBOX
{
Text [ en-US ] = "Text Object Bar/Web" ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment