Kaydet (Commit) df0376ea authored tarafından Matthias Freund's avatar Matthias Freund Kaydeden (comit) David Tardon

fdo#39468 Comment translation GER-ENG in sw/source/ui/shells/ (Part 2)

Change-Id: I389569b027a900f42e43762c5685ec239bc4b565
Reviewed-on: https://gerrit.libreoffice.org/3646Reviewed-by: 's avatarChris Sherlock <chris.sherlock79@gmail.com>
Reviewed-by: 's avatarDavid Tardon <dtardon@redhat.com>
Tested-by: 's avatarDavid Tardon <dtardon@redhat.com>
üst 57082b12
...@@ -89,7 +89,7 @@ void SwBezierShell::Execute(SfxRequest &rReq) ...@@ -89,7 +89,7 @@ void SwBezierShell::Execute(SfxRequest &rReq)
pSh->LeaveSelFrmMode(); pSh->LeaveSelFrmMode();
pSh->NoEdit(); pSh->NoEdit();
} }
GetView().AttrChangedNotify(pSh); // ggf Shellwechsel... GetView().AttrChangedNotify(pSh); // Shell change if applicable...
} }
} }
break; break;
...@@ -102,13 +102,13 @@ void SwBezierShell::Execute(SfxRequest &rReq) ...@@ -102,13 +102,13 @@ void SwBezierShell::Execute(SfxRequest &rReq)
if ( pSh->IsDrawCreate() ) if ( pSh->IsDrawCreate() )
{ {
GetView().GetDrawFuncPtr()->BreakCreate(); GetView().GetDrawFuncPtr()->BreakCreate();
GetView().AttrChangedNotify(pSh); // ggf Shellwechsel... GetView().AttrChangedNotify(pSh); // Shell change if applicable...
} }
else if ( pSh->HasSelection() || GetView().IsDrawMode() ) else if ( pSh->HasSelection() || GetView().IsDrawMode() )
{ {
GetView().LeaveDrawCreate(); GetView().LeaveDrawCreate();
pSh->EnterStdMode(); pSh->EnterStdMode();
GetView().AttrChangedNotify(pSh); // ggf Shellwechsel... GetView().AttrChangedNotify(pSh); // Shell change if applicable...
} }
} }
break; break;
...@@ -261,7 +261,7 @@ void SwBezierShell::GetState(SfxItemSet &rSet) ...@@ -261,7 +261,7 @@ void SwBezierShell::GetState(SfxItemSet &rSet)
switch (eSegm) switch (eSegm)
{ {
case SDRPATHSEGMENT_DONTCARE: rSet.InvalidateItem(SID_BEZIER_CONVERT); break; case SDRPATHSEGMENT_DONTCARE: rSet.InvalidateItem(SID_BEZIER_CONVERT); break;
case SDRPATHSEGMENT_LINE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,sal_False)); break; // Button reingedrueckt = Kurve case SDRPATHSEGMENT_LINE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,sal_False)); break; // Button pressed = curve
case SDRPATHSEGMENT_CURVE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,sal_True)); break; case SDRPATHSEGMENT_CURVE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,sal_True)); break;
default:; //prevent warning default:; //prevent warning
} }
......
...@@ -112,7 +112,7 @@ void SwDrawShell::Execute(SfxRequest &rReq) ...@@ -112,7 +112,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
} }
GetView().FlipDrawSelMode(); GetView().FlipDrawSelMode();
pSdrView->SetFrameDragSingles(GetView().IsDrawSelMode()); pSdrView->SetFrameDragSingles(GetView().IsDrawSelMode());
GetView().AttrChangedNotify(&rSh); // Shellwechsel... GetView().AttrChangedNotify(&rSh); // Shell switch
break; break;
case SID_OBJECT_HELL: case SID_OBJECT_HELL:
...@@ -283,7 +283,7 @@ void SwDrawShell::GetState(SfxItemSet& rSet) ...@@ -283,7 +283,7 @@ void SwDrawShell::GetState(SfxItemSet& rSet)
sal_uInt16 nWhich = aIter.FirstWhich(); sal_uInt16 nWhich = aIter.FirstWhich();
sal_Bool bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT); sal_Bool bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT);
if (!bProtected) // Im Parent nachsehen if (!bProtected) // Check the parent
bProtected |= rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0; bProtected |= rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
while( nWhich ) while( nWhich )
...@@ -355,11 +355,8 @@ SwDrawShell::SwDrawShell(SwView &_rView) : ...@@ -355,11 +355,8 @@ SwDrawShell::SwDrawShell(SwView &_rView) :
SetName(OUString("Draw")); SetName(OUString("Draw"));
} }
/************************************************************************* // Edit SfxRequests for FontWork
|*
|* SfxRequests fuer FontWork bearbeiten
|*
\************************************************************************/
void SwDrawShell::ExecFormText(SfxRequest& rReq) void SwDrawShell::ExecFormText(SfxRequest& rReq)
{ {
SwWrtShell &rSh = GetShell(); SwWrtShell &rSh = GetShell();
...@@ -406,11 +403,8 @@ void SwDrawShell::ExecFormText(SfxRequest& rReq) ...@@ -406,11 +403,8 @@ void SwDrawShell::ExecFormText(SfxRequest& rReq)
pDrView->GetModel()->SetChanged(sal_True); pDrView->GetModel()->SetChanged(sal_True);
} }
/************************************************************************* //Return status values for FontWork
|*
|* Statuswerte fuer FontWork zurueckgeben
|*
\************************************************************************/
void SwDrawShell::GetFormTextState(SfxItemSet& rSet) void SwDrawShell::GetFormTextState(SfxItemSet& rSet)
{ {
SwWrtShell &rSh = GetShell(); SwWrtShell &rSh = GetShell();
......
...@@ -111,7 +111,7 @@ void SwDrawFormShell::Execute(SfxRequest &rReq) ...@@ -111,7 +111,7 @@ void SwDrawFormShell::Execute(SfxRequest &rReq)
uno::Reference< beans::XPropertySet > xPropSet(xControlModel, uno::UNO_QUERY); uno::Reference< beans::XPropertySet > xPropSet(xControlModel, uno::UNO_QUERY);
// Darf man eine URL an dem Objekt setzen? // Can we set an URL to the object?
OUString sTargetURL( "TargetURL" ); OUString sTargetURL( "TargetURL" );
uno::Reference< beans::XPropertySetInfo > xPropInfoSet = xPropSet->getPropertySetInfo(); uno::Reference< beans::XPropertySetInfo > xPropInfoSet = xPropSet->getPropertySetInfo();
if( xPropInfoSet->hasPropertyByName( sTargetURL )) if( xPropInfoSet->hasPropertyByName( sTargetURL ))
...@@ -120,7 +120,7 @@ void SwDrawFormShell::Execute(SfxRequest &rReq) ...@@ -120,7 +120,7 @@ void SwDrawFormShell::Execute(SfxRequest &rReq)
if( !aProp.Name.isEmpty() ) if( !aProp.Name.isEmpty() )
{ {
uno::Any aTmp; uno::Any aTmp;
// Ja! // Yes!
OUString sLabel("Label"); OUString sLabel("Label");
if( xPropInfoSet->hasPropertyByName(sLabel) ) if( xPropInfoSet->hasPropertyByName(sLabel) )
{ {
...@@ -245,7 +245,6 @@ void SwDrawFormShell::GetState(SfxItemSet& rSet) ...@@ -245,7 +245,6 @@ void SwDrawFormShell::GetState(SfxItemSet& rSet)
} }
} }
SwDrawFormShell::SwDrawFormShell(SwView &_rView) : SwDrawFormShell::SwDrawFormShell(SwView &_rView) :
SwDrawBaseShell(_rView) SwDrawBaseShell(_rView)
{ {
...@@ -258,6 +257,4 @@ SwDrawFormShell::~SwDrawFormShell() ...@@ -258,6 +257,4 @@ SwDrawFormShell::~SwDrawFormShell()
{ {
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -107,7 +107,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) ...@@ -107,7 +107,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
if(pArgs) if(pArgs)
pArgs->GetItemState(nSlotId, sal_False, &pItem); pArgs->GetItemState(nSlotId, sal_False, &pItem);
//Sonderfall Align per Menue //Special case align by menu
if(pItem && nSlotId == SID_OBJECT_ALIGN) if(pItem && nSlotId == SID_OBJECT_ALIGN)
{ {
OSL_ENSURE(PTR_CAST(SfxEnumItem, pItem),"SfxEnumItem expected"); OSL_ENSURE(PTR_CAST(SfxEnumItem, pItem),"SfxEnumItem expected");
...@@ -187,7 +187,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) ...@@ -187,7 +187,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
SfxAbstractTabDialog *pDlg=NULL; SfxAbstractTabDialog *pDlg=NULL;
bool bCaption = false; bool bCaption = false;
// Erlaubte Verankerungen: // Allowed anchorages:
short nAnchor = pSh->GetAnchorId(); short nAnchor = pSh->GetAnchorId();
sal_uInt16 nAllowedAnchors = SVX_OBJ_AT_CNTNT | SVX_OBJ_IN_CNTNT | SVX_OBJ_PAGE; sal_uInt16 nAllowedAnchors = SVX_OBJ_AT_CNTNT | SVX_OBJ_IN_CNTNT | SVX_OBJ_PAGE;
sal_uInt16 nHtmlMode = ::GetHtmlMode(pSh->GetView().GetDocShell()); sal_uInt16 nHtmlMode = ::GetHtmlMode(pSh->GetView().GetDocShell());
...@@ -379,14 +379,14 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) ...@@ -379,14 +379,14 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
if (rReq.IsAPI() || if (rReq.IsAPI() ||
GetView().GetEditWin().IsObjectSelect() ) GetView().GetEditWin().IsObjectSelect() )
{ {
// Wenn Basic-Aufruf, dann zurueck in die Textshell, da das // If basic call, then back to the text shell, because the
// Basic sonst keine Rueckkehrmoeglichkeit hat. // Basic otherwise has no possibility to return.
if (GetView().GetDrawFuncPtr()) if (GetView().GetDrawFuncPtr())
{ {
GetView().GetDrawFuncPtr()->Deactivate(); GetView().GetDrawFuncPtr()->Deactivate();
GetView().SetDrawFuncPtr(NULL); GetView().SetDrawFuncPtr(NULL);
} }
GetView().LeaveDrawCreate(); // In Selektionsmode wechseln GetView().LeaveDrawCreate(); // Switch to selection mode
} }
if (pSh->IsSelFrmMode()) if (pSh->IsSelFrmMode())
...@@ -401,7 +401,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) ...@@ -401,7 +401,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
case SID_GROUP: case SID_GROUP:
if (pSh->IsObjSelected() > 1 && pSh->IsGroupAllowed()) if (pSh->IsObjSelected() > 1 && pSh->IsGroupAllowed())
{ {
pSh->GroupSelection(); // Objekt gruppieren pSh->GroupSelection();
rBind.Invalidate(SID_UNGROUP); rBind.Invalidate(SID_UNGROUP);
} }
break; break;
...@@ -409,7 +409,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) ...@@ -409,7 +409,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
case SID_UNGROUP: case SID_UNGROUP:
if (pSh->IsGroupSelected()) if (pSh->IsGroupSelected())
{ {
pSh->UnGroupSelection(); // Objektgruppierung aufheben pSh->UnGroupSelection();
rBind.Invalidate(SID_GROUP); rBind.Invalidate(SID_GROUP);
} }
break; break;
...@@ -442,8 +442,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) ...@@ -442,8 +442,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
{ {
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList(); const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
if( rMarkList.GetMarkCount() == 1 && bAlignPossible ) if( rMarkList.GetMarkCount() == 1 && bAlignPossible )
{ // Objekte nicht aneinander ausrichten { // Do not align objects to each other
sal_uInt16 nAnchor = pSh->GetAnchorId(); sal_uInt16 nAnchor = pSh->GetAnchorId();
if (nAnchor == FLY_AS_CHAR) if (nAnchor == FLY_AS_CHAR)
{ {
...@@ -476,7 +475,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) ...@@ -476,7 +475,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
break; break;
} }
if (nAnchor == FLY_AT_PARA) if (nAnchor == FLY_AT_PARA)
break; // Absatzverankerte Rahmen nicht ausrichten break; // Do not align frames of an anchored paragraph
} }
pSh->StartAction(); pSh->StartAction();
...@@ -597,15 +596,14 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) ...@@ -597,15 +596,14 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
pSh->SetModified(); pSh->SetModified();
else if (bChanged) else if (bChanged)
pSdrView->GetModel()->SetChanged(sal_True); pSdrView->GetModel()->SetChanged(sal_True);
// 40220: Nach dem Loeschen von DrawObjekten ueber die API GPF durch Selbstzerstoerung // 40220: After Delete from DrawObjecs over the API GPF through self-destruction
if(bNotify) if(bNotify)
GetView().AttrChangedNotify(pSh); // ggf Shellwechsel... GetView().AttrChangedNotify(pSh); // Shell switch if applicable...
} }
} }
/* --------------------------------------------------------------------------- // Checks whether a given name is allowed for a group shape
Checks whether a given name is allowed for a group shape
---------------------------------------------------------------------------*/
IMPL_LINK( SwDrawBaseShell, CheckGroupShapeNameHdl, AbstractSvxNameDialog*, pNameDialog ) IMPL_LINK( SwDrawBaseShell, CheckGroupShapeNameHdl, AbstractSvxNameDialog*, pNameDialog )
{ {
SwWrtShell &rSh = GetShell(); SwWrtShell &rSh = GetShell();
...@@ -645,7 +643,7 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet) ...@@ -645,7 +643,7 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet)
sal_uInt16 nWhich = aIter.FirstWhich(); sal_uInt16 nWhich = aIter.FirstWhich();
sal_Bool bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT); sal_Bool bProtected = rSh.IsSelObjProtected(FLYPROTECT_CONTENT);
if (!bProtected) // Im Parent nachsehen if (!bProtected) // Look in the parent
bProtected |= rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0; bProtected |= rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0;
while( nWhich ) while( nWhich )
...@@ -752,9 +750,8 @@ sal_Bool SwDrawBaseShell::Disable(SfxItemSet& rSet, sal_uInt16 nWhich) ...@@ -752,9 +750,8 @@ sal_Bool SwDrawBaseShell::Disable(SfxItemSet& rSet, sal_uInt16 nWhich)
return bDisable; return bDisable;
} }
/*------------------------------------------------------------------------- // Validate of drawing positions
Validate of drawing positions
-----------------------------------------------------------------------*/
IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation*, pValidation ) IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation*, pValidation )
{ {
SwWrtShell *pSh = &GetShell(); SwWrtShell *pSh = &GetShell();
...@@ -904,7 +901,7 @@ IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation*, pValidation ...@@ -904,7 +901,7 @@ IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation*, pValidation
pValidation->nMaxVPos = aBoundRect.Height() - pValidation->nHeight; pValidation->nMaxVPos = aBoundRect.Height() - pValidation->nHeight;
} }
// Maximale Breite Hoehe // Maximum width height
const SwTwips nH = ( pValidation->nHoriOrient != text::HoriOrientation::NONE ) const SwTwips nH = ( pValidation->nHoriOrient != text::HoriOrientation::NONE )
? aBoundRect.Left() ? aBoundRect.Left()
: pValidation->nHPos; : pValidation->nHPos;
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
#include <edtwin.hxx> #include <edtwin.hxx>
#include <globals.hrc> #include <globals.hrc>
#include <hintids.hxx> #include <hintids.hxx>
#include <initui.hxx> // fuer SpellPointer #include <initui.hxx> // for SpellPointer
#include <langhelper.hxx> #include <langhelper.hxx>
#include <pardlg.hxx> #include <pardlg.hxx>
#include <shells.hrc> #include <shells.hrc>
...@@ -275,7 +275,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) ...@@ -275,7 +275,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) ); SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric)) );
SfxItemSet aDlgAttr(GetPool(), EE_ITEMS_START, EE_ITEMS_END); SfxItemSet aDlgAttr(GetPool(), EE_ITEMS_START, EE_ITEMS_END);
// util::Language gibts an der EditEngine nicht! Daher nicht im Set. // util::Language does not exists in the EditEngine! That is why not in set.
aDlgAttr.Put( aEditAttr ); aDlgAttr.Put( aEditAttr );
aDlgAttr.Put( SvxKerningItem(0, RES_CHRATR_KERNING) ); aDlgAttr.Put( SvxKerningItem(0, RES_CHRATR_KERNING) );
...@@ -429,7 +429,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) ...@@ -429,7 +429,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
if (pFieldItem && pFieldItem->GetField()->ISA(SvxURLField)) if (pFieldItem && pFieldItem->GetField()->ISA(SvxURLField))
{ {
// Feld selektieren, so dass es beim Insert geloescht wird // Select field so that it will be deleted during insert
ESelection aSel = pOLV->GetSelection(); ESelection aSel = pOLV->GetSelection();
aSel.nEndPos++; aSel.nEndPos++;
pOLV->SetSelection(aSel); pOLV->SetSelection(aSel);
...@@ -441,7 +441,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) ...@@ -441,7 +441,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
case SID_TEXTDIRECTION_LEFT_TO_RIGHT: case SID_TEXTDIRECTION_LEFT_TO_RIGHT:
case SID_TEXTDIRECTION_TOP_TO_BOTTOM: case SID_TEXTDIRECTION_TOP_TO_BOTTOM:
// Shellwechsel! // Shell switch!
{ {
SdrObject* pTmpObj = pSdrView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj(); SdrObject* pTmpObj = pSdrView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj();
SdrPageView* pTmpPV = pSdrView->GetSdrPageView(); SdrPageView* pTmpPV = pSdrView->GetSdrPageView();
...@@ -529,7 +529,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) ...@@ -529,7 +529,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
void SwDrawTextShell::GetState(SfxItemSet& rSet) void SwDrawTextShell::GetState(SfxItemSet& rSet)
{ {
if (!IsTextEdit()) // Sonst manchmal Absturz! if (!IsTextEdit()) // Otherwise sometimes crash!
return; return;
OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView(); OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView();
...@@ -750,7 +750,7 @@ ASK_ESCAPE: ...@@ -750,7 +750,7 @@ ASK_ESCAPE:
void SwDrawTextShell::GetDrawTxtCtrlState(SfxItemSet& rSet) void SwDrawTextShell::GetDrawTxtCtrlState(SfxItemSet& rSet)
{ {
if (!IsTextEdit()) // Sonst Absturz! if (!IsTextEdit()) // Otherwise crash!
return; return;
OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView(); OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView();
...@@ -814,7 +814,7 @@ void SwDrawTextShell::GetDrawTxtCtrlState(SfxItemSet& rSet) ...@@ -814,7 +814,7 @@ void SwDrawTextShell::GetDrawTxtCtrlState(SfxItemSet& rSet)
void SwDrawTextShell::ExecClpbrd(SfxRequest &rReq) void SwDrawTextShell::ExecClpbrd(SfxRequest &rReq)
{ {
if (!IsTextEdit()) // Sonst Absturz! if (!IsTextEdit()) // Otherwise crash!
return; return;
OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView(); OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView();
...@@ -844,12 +844,9 @@ void SwDrawTextShell::ExecClpbrd(SfxRequest &rReq) ...@@ -844,12 +844,9 @@ void SwDrawTextShell::ExecClpbrd(SfxRequest &rReq)
} }
} }
/*--------------------------------------------------------------------
Beschreibung: ClipBoard-Status
--------------------------------------------------------------------*/
void SwDrawTextShell::StateClpbrd(SfxItemSet &rSet) void SwDrawTextShell::StateClpbrd(SfxItemSet &rSet)
{ {
if (!IsTextEdit()) // Sonst Absturz! if (!IsTextEdit()) // Otherwise crash!
return; return;
OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView(); OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView();
...@@ -895,12 +892,11 @@ void SwDrawTextShell::StateClpbrd(SfxItemSet &rSet) ...@@ -895,12 +892,11 @@ void SwDrawTextShell::StateClpbrd(SfxItemSet &rSet)
} }
} }
/*-------------------------------------------------------------------- // Hyperlink status
Beschreibung: Hyperlink-Status
--------------------------------------------------------------------*/
void SwDrawTextShell::StateInsert(SfxItemSet &rSet) void SwDrawTextShell::StateInsert(SfxItemSet &rSet)
{ {
if (!IsTextEdit()) // Sonst Absturz! if (!IsTextEdit()) // Otherwise crash!
return; return;
OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView(); OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView();
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
#include <view.hxx> #include <view.hxx>
#include <wrtsh.hxx> #include <wrtsh.hxx>
#include <viewopt.hxx> #include <viewopt.hxx>
#include <initui.hxx> // fuer SpellPointer #include <initui.hxx> // for SpellPointer
#include <drwtxtsh.hxx> #include <drwtxtsh.hxx>
#include <swundo.hxx> #include <swundo.hxx>
#include <breakit.hxx> #include <breakit.hxx>
...@@ -105,7 +105,7 @@ void SwDrawTextShell::Init() ...@@ -105,7 +105,7 @@ void SwDrawTextShell::Init()
SetUndoManager(&pOutliner->GetUndoManager()); SetUndoManager(&pOutliner->GetUndoManager());
// jetzt versuchen wir mal ein AutoSpell // Now let's try an AutoSpell.
const SwViewOption* pVOpt = rSh.GetViewOptions(); const SwViewOption* pVOpt = rSh.GetViewOptions();
if(pVOpt->IsOnlineSpell()) if(pVOpt->IsOnlineSpell())
...@@ -144,9 +144,8 @@ SwWrtShell& SwDrawTextShell::GetShell() ...@@ -144,9 +144,8 @@ SwWrtShell& SwDrawTextShell::GetShell()
return rView.GetWrtShell(); return rView.GetWrtShell();
} }
/*-------------------------------------------------------------------- // Disable slots with this status method
Beschreibung: Slots mit dieser Statusmethode disablen
--------------------------------------------------------------------*/
void SwDrawTextShell::StateDisableItems( SfxItemSet &rSet ) void SwDrawTextShell::StateDisableItems( SfxItemSet &rSet )
{ {
SfxWhichIter aIter(rSet); SfxWhichIter aIter(rSet);
...@@ -159,11 +158,6 @@ void SwDrawTextShell::StateDisableItems( SfxItemSet &rSet ) ...@@ -159,11 +158,6 @@ void SwDrawTextShell::StateDisableItems( SfxItemSet &rSet )
} }
} }
/*************************************************************************
|*
|* Attribute setzen
|*
\************************************************************************/
void SwDrawTextShell::SetAttrToMarked(const SfxItemSet& rAttr) void SwDrawTextShell::SetAttrToMarked(const SfxItemSet& rAttr)
{ {
Rectangle aNullRect; Rectangle aNullRect;
...@@ -206,11 +200,8 @@ void SwDrawTextShell::StateFontWork(SfxItemSet& rSet) ...@@ -206,11 +200,8 @@ void SwDrawTextShell::StateFontWork(SfxItemSet& rSet)
rSet.Put(SfxBoolItem(SID_FONTWORK, GetView().GetViewFrame()->HasChildWindow(nId))); rSet.Put(SfxBoolItem(SID_FONTWORK, GetView().GetViewFrame()->HasChildWindow(nId)));
} }
/************************************************************************* // Edit SfxRequests for FontWork
|*
|* SfxRequests fuer FontWork bearbeiten
|*
\************************************************************************/
void SwDrawTextShell::ExecFormText(SfxRequest& rReq) void SwDrawTextShell::ExecFormText(SfxRequest& rReq)
{ {
SwWrtShell &rSh = GetShell(); SwWrtShell &rSh = GetShell();
...@@ -255,11 +246,8 @@ void SwDrawTextShell::ExecFormText(SfxRequest& rReq) ...@@ -255,11 +246,8 @@ void SwDrawTextShell::ExecFormText(SfxRequest& rReq)
} }
/************************************************************************* // Return Status values back to FontWork
|*
|* Statuswerte fuer FontWork zurueckgeben
|*
\************************************************************************/
void SwDrawTextShell::GetFormTextState(SfxItemSet& rSet) void SwDrawTextShell::GetFormTextState(SfxItemSet& rSet)
{ {
SwWrtShell &rSh = GetShell(); SwWrtShell &rSh = GetShell();
...@@ -424,7 +412,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq) ...@@ -424,7 +412,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
} }
break; break;
case SID_CHARMAP: case SID_CHARMAP:
{ // Sonderzeichen einfuegen { // Insert special character
InsertSymbol(rReq); InsertSymbol(rReq);
break; break;
} }
...@@ -464,7 +452,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq) ...@@ -464,7 +452,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
case FN_ESCAPE: case FN_ESCAPE:
if (pSdrView->IsTextEdit()) if (pSdrView->IsTextEdit())
{ {
// Shellwechsel! // Shell switch!
rSh.EndTextEdit(); rSh.EndTextEdit();
SwView& rTempView = rSh.GetView(); SwView& rTempView = rSh.GetView();
rTempView.ExitDraw(); rTempView.ExitDraw();
...@@ -510,9 +498,8 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq) ...@@ -510,9 +498,8 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
rSh.SetModified(); rSh.SetModified();
} }
/*-------------------------------------------------------------------- // Execute undo
Beschreibung: Undo ausfuehren
--------------------------------------------------------------------*/
void SwDrawTextShell::ExecUndo(SfxRequest &rReq) void SwDrawTextShell::ExecUndo(SfxRequest &rReq)
{ {
if( IsTextEdit() ) if( IsTextEdit() )
...@@ -555,9 +542,8 @@ void SwDrawTextShell::ExecUndo(SfxRequest &rReq) ...@@ -555,9 +542,8 @@ void SwDrawTextShell::ExecUndo(SfxRequest &rReq)
} }
} }
/*-------------------------------------------------------------------- // State of undo
Beschreibung: Zustand Undo
--------------------------------------------------------------------*/
void SwDrawTextShell::StateUndo(SfxItemSet &rSet) void SwDrawTextShell::StateUndo(SfxItemSet &rSet)
{ {
if ( !IsTextEdit() ) if ( !IsTextEdit() )
...@@ -687,9 +673,8 @@ void SwDrawTextShell::ExecRotateTransliteration( SfxRequest & rReq ) ...@@ -687,9 +673,8 @@ void SwDrawTextShell::ExecRotateTransliteration( SfxRequest & rReq )
} }
} }
/*-------------------------------------------------------------------- // Insert special character (see SDraw: FUBULLET.CXX)
Beschreibung: Sonderzeichen einfuegen (siehe SDraw: FUBULLET.CXX)
--------------------------------------------------------------------*/
void SwDrawTextShell::InsertSymbol(SfxRequest& rReq) void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
{ {
OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView(); OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView();
...@@ -742,7 +727,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq) ...@@ -742,7 +727,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
else else
aAllSet.Put( SfxStringItem( SID_FONT_NAME, aSetDlgFont.GetFamilyName() ) ); aAllSet.Put( SfxStringItem( SID_FONT_NAME, aSetDlgFont.GetFamilyName() ) );
// Wenn Zeichen selektiert ist kann es angezeigt werden // If character is selected, it can be shown
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( rView.GetWindow(), aAllSet, SfxAbstractDialog* pDlg = pFact->CreateSfxDialog( rView.GetWindow(), aAllSet,
rView.GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP ); rView.GetViewFrame()->GetFrame().GetFrameInterface(), RID_SVXDLG_CHARMAP );
...@@ -772,7 +757,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq) ...@@ -772,7 +757,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
if( sSym.Len() ) if( sSym.Len() )
{ {
// nicht flackern // do not flicker
pOLV->HideCursor(); pOLV->HideCursor();
SdrOutliner * pOutliner = pSdrView->GetTextEditOutliner(); SdrOutliner * pOutliner = pSdrView->GetTextEditOutliner();
pOutliner->SetUpdateMode(sal_False); pOutliner->SetUpdateMode(sal_False);
...@@ -785,10 +770,10 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq) ...@@ -785,10 +770,10 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
0 ); 0 );
aFontSet.Set( aOldSet ); aFontSet.Set( aOldSet );
// String einfuegen // Insert string
pOLV->InsertText( sSym ); pOLV->InsertText( sSym );
// attributieren (Font setzen) // assign attributes (Set font)
SfxItemSet aFontAttribSet( *aFontSet.GetPool(), aFontSet.GetRanges() ); SfxItemSet aFontAttribSet( *aFontSet.GetPool(), aFontSet.GetRanges() );
SvxFontItem aFontItem (aFont.GetFamily(), aFont.GetName(), SvxFontItem aFontItem (aFont.GetFamily(), aFont.GetName(),
aFont.GetStyleName(), aFont.GetPitch(), aFont.GetStyleName(), aFont.GetPitch(),
...@@ -803,16 +788,16 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq) ...@@ -803,16 +788,16 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
aFontAttribSet.Put( aFontItem, EE_CHAR_FONTINFO_CTL ); aFontAttribSet.Put( aFontItem, EE_CHAR_FONTINFO_CTL );
pOLV->SetAttribs(aFontAttribSet); pOLV->SetAttribs(aFontAttribSet);
// Selektion loeschen // Remove selection
ESelection aSel(pOLV->GetSelection()); ESelection aSel(pOLV->GetSelection());
aSel.nStartPara = aSel.nEndPara; aSel.nStartPara = aSel.nEndPara;
aSel.nStartPos = aSel.nEndPos; aSel.nStartPos = aSel.nEndPos;
pOLV->SetSelection(aSel); pOLV->SetSelection(aSel);
// Alten Font restaurieren // Restore old font
pOLV->SetAttribs( aFontSet ); pOLV->SetAttribs( aFontSet );
// ab jetzt wieder anzeigen // From now on show again
pOutliner->SetUpdateMode(sal_True); pOutliner->SetUpdateMode(sal_True);
pOLV->ShowCursor(); pOLV->ShowCursor();
......
...@@ -81,7 +81,7 @@ using ::editeng::SvxBorderLine; ...@@ -81,7 +81,7 @@ using ::editeng::SvxBorderLine;
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
// Prototypen ------------------------------------------------------------ // Prototypes
static void lcl_FrmGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLine& rBorderLine); static void lcl_FrmGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLine& rBorderLine);
static const SwFrmFmt* lcl_GetFrmFmtByName(SwWrtShell& rSh, const String& rName) static const SwFrmFmt* lcl_GetFrmFmtByName(SwWrtShell& rSh, const String& rName)
{ {
...@@ -107,7 +107,7 @@ SFX_IMPL_INTERFACE(SwFrameShell, SwBaseShell, SW_RES(STR_SHELLNAME_FRAME)) ...@@ -107,7 +107,7 @@ SFX_IMPL_INTERFACE(SwFrameShell, SwBaseShell, SW_RES(STR_SHELLNAME_FRAME))
void SwFrameShell::Execute(SfxRequest &rReq) void SwFrameShell::Execute(SfxRequest &rReq)
{ {
//Erstmal die, die keinen FrmMgr benoetigen. //First those who do not need FrmMgr.
SwWrtShell &rSh = GetShell(); SwWrtShell &rSh = GetShell();
bool bMore = false; bool bMore = false;
const SfxItemSet* pArgs = rReq.GetArgs(); const SfxItemSet* pArgs = rReq.GetArgs();
...@@ -142,7 +142,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) ...@@ -142,7 +142,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
case FN_INSERT_FRAME: case FN_INSERT_FRAME:
if (!pArgs) if (!pArgs)
{ {
// Rahmen existiert bereits, Rahmendialog zur Bearbeitung oeffnen // Frame already exists, open frame dialog for editing.
SfxUInt16Item aDefPage(FN_FORMAT_FRAME_DLG, TP_COLUMN); SfxUInt16Item aDefPage(FN_FORMAT_FRAME_DLG, TP_COLUMN);
rSh.GetView().GetViewFrame()->GetDispatcher()->Execute( FN_FORMAT_FRAME_DLG, rSh.GetView().GetViewFrame()->GetDispatcher()->Execute( FN_FORMAT_FRAME_DLG,
SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD, SFX_CALLMODE_SYNCHRON|SFX_CALLMODE_RECORD,
...@@ -151,7 +151,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) ...@@ -151,7 +151,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
} }
else else
{ {
// Rahmen existiert bereits, nur Spaltenanzahl wird geaendert // Frame already exists, only the number of columns will be changed.
sal_uInt16 nCols = 1; sal_uInt16 nCols = 1;
if(pArgs->GetItemState(SID_ATTR_COLUMNS, sal_False, &pItem) == SFX_ITEM_SET) if(pArgs->GetItemState(SID_ATTR_COLUMNS, sal_False, &pItem) == SFX_ITEM_SET)
nCols = ((SfxUInt16Item *)pItem)->GetValue(); nCols = ((SfxUInt16Item *)pItem)->GetValue();
...@@ -159,13 +159,14 @@ void SwFrameShell::Execute(SfxRequest &rReq) ...@@ -159,13 +159,14 @@ void SwFrameShell::Execute(SfxRequest &rReq)
SfxItemSet aSet(GetPool(),RES_COL,RES_COL); SfxItemSet aSet(GetPool(),RES_COL,RES_COL);
rSh.GetFlyFrmAttr( aSet ); rSh.GetFlyFrmAttr( aSet );
SwFmtCol aCol((const SwFmtCol&)aSet.Get(RES_COL)); SwFmtCol aCol((const SwFmtCol&)aSet.Get(RES_COL));
// GutterWidth wird nicht immer uebergeben, daher erst besorgen (siehe view2: Execute auf diesen Slot) // GutterWidth will not always passed, hence get firstly
// (see view2: Execute on this slot)
sal_uInt16 nGutterWidth = aCol.GetGutterWidth(); sal_uInt16 nGutterWidth = aCol.GetGutterWidth();
if(!nCols ) if(!nCols )
nCols++; nCols++;
aCol.Init(nCols, nGutterWidth, aCol.GetWishWidth()); aCol.Init(nCols, nGutterWidth, aCol.GetWishWidth());
aSet.Put(aCol); aSet.Put(aCol);
// Vorlagen-AutoUpdate // Template AutoUpdate
SwFrmFmt* pFmt = rSh.GetCurFrmFmt(); SwFrmFmt* pFmt = rSh.GetCurFrmFmt();
if(pFmt && pFmt->IsAutoUpdateFmt()) if(pFmt && pFmt->IsAutoUpdateFmt())
{ {
...@@ -415,7 +416,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) ...@@ -415,7 +416,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
aSet.Put(aMgr.GetAttrSet()); aSet.Put(aMgr.GetAttrSet());
aSet.SetParent( aMgr.GetAttrSet().GetParent() ); aSet.SetParent( aMgr.GetAttrSet().GetParent() );
// Bei %-Werten Groesse initialisieren // On % values initialize size
SwFmtFrmSize& rSize = (SwFmtFrmSize&)aSet.Get(RES_FRM_SIZE); SwFmtFrmSize& rSize = (SwFmtFrmSize&)aSet.Get(RES_FRM_SIZE);
if (rSize.GetWidthPercent() && rSize.GetWidthPercent() != 0xff) if (rSize.GetWidthPercent() && rSize.GetWidthPercent() != 0xff)
rSize.SetWidth(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Width()); rSize.SetWidth(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Width());
...@@ -466,13 +467,12 @@ void SwFrameShell::Execute(SfxRequest &rReq) ...@@ -466,13 +467,12 @@ void SwFrameShell::Execute(SfxRequest &rReq)
// #i73249# // #i73249#
rSh.SetObjTitle(((const SfxStringItem*)pItem)->GetValue()); rSh.SetObjTitle(((const SfxStringItem*)pItem)->GetValue());
} }
// Vorlagen-AutoUpdate // Template AutoUpdate
SwFrmFmt* pFmt = rSh.GetCurFrmFmt(); SwFrmFmt* pFmt = rSh.GetCurFrmFmt();
if(pFmt && pFmt->IsAutoUpdateFmt()) if(pFmt && pFmt->IsAutoUpdateFmt())
{ {
rSh.AutoUpdateFrame(pFmt, *pOutSet); rSh.AutoUpdateFrame(pFmt, *pOutSet);
// alles, dass das Format nicht kann, muss hart // Anything which is not supported by the format must be set hard.
// gesetzt werden
if(SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_NAME, sal_False, &pItem)) if(SFX_ITEM_SET == pOutSet->GetItemState(FN_SET_FRM_NAME, sal_False, &pItem))
rSh.SetFlyName(((SfxStringItem*)pItem)->GetValue()); rSh.SetFlyName(((SfxStringItem*)pItem)->GetValue());
SfxItemSet aShellSet(GetPool(), RES_FRM_SIZE, RES_FRM_SIZE, SfxItemSet aShellSet(GetPool(), RES_FRM_SIZE, RES_FRM_SIZE,
...@@ -615,7 +615,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) ...@@ -615,7 +615,7 @@ void SwFrameShell::Execute(SfxRequest &rReq)
OSL_ENSURE( !this, "wrong dispatcher" ); OSL_ENSURE( !this, "wrong dispatcher" );
return; return;
} }
// Vorlagen-AutoUpdate // Template AutoUpdate
SwFrmFmt* pFmt = rSh.GetCurFrmFmt(); SwFrmFmt* pFmt = rSh.GetCurFrmFmt();
if ( bUpdateMgr ) if ( bUpdateMgr )
{ {
...@@ -863,24 +863,19 @@ void SwFrameShell::GetState(SfxItemSet& rSet) ...@@ -863,24 +863,19 @@ void SwFrameShell::GetState(SfxItemSet& rSet)
} }
} }
/*--------------------------------------------------------------------
Beschreibung: Ctor fuer FrameShell
--------------------------------------------------------------------*/
SwFrameShell::SwFrameShell(SwView &_rView) : SwFrameShell::SwFrameShell(SwView &_rView) :
SwBaseShell( _rView ) SwBaseShell( _rView )
{ {
SetName(OUString("Frame")); SetName(OUString("Frame"));
SetHelpId(SW_FRAMESHELL); SetHelpId(SW_FRAMESHELL);
/* #96392# Use this to announce it is the frame shell who creates the // #96392# Use this to announce it is the frame shell who creates the selection.
selection. */
SwTransferable::CreateSelection( _rView.GetWrtShell(), (ViewShell *) this ); SwTransferable::CreateSelection( _rView.GetWrtShell(), (ViewShell *) this );
} }
SwFrameShell::~SwFrameShell() SwFrameShell::~SwFrameShell()
{ {
/* #96392# Only clear the selection if it was this frame shell who created // #96392# Only clear the selection if it was this frame shell who created it.
it. */
SwTransferable::ClearSelection( GetShell(), (ViewShell *) this ); SwTransferable::ClearSelection( GetShell(), (ViewShell *) this );
} }
...@@ -890,9 +885,9 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq) ...@@ -890,9 +885,9 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
bool bDefault = false; bool bDefault = false;
if (!rSh.IsFrmSelected()) if (!rSh.IsFrmSelected())
return; return;
// At first pick the default BoxItem out of the pool.
// Erst Default-BoxItem aus Pool holen. Wenn ungleich normalem Boxitem, // If unequal to regular box item, then it has already
// dann ist es bereits geaendert worden (neues ist kein Default). // been changed (New one is no default).
const SvxBoxItem* pPoolBoxItem = (const SvxBoxItem*)::GetDfltAttr(RES_BOX); const SvxBoxItem* pPoolBoxItem = (const SvxBoxItem*)::GetDfltAttr(RES_BOX);
const SfxItemSet *pArgs = rReq.GetArgs(); const SfxItemSet *pArgs = rReq.GetArgs();
...@@ -909,7 +904,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq) ...@@ -909,7 +904,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
SvxBorderLine aBorderLine; SvxBorderLine aBorderLine;
const SfxPoolItem *pItem = 0; const SfxPoolItem *pItem = 0;
if(pArgs) //irgendein Controller kann auch mal nichts liefern #48169# if(pArgs) // Any controller can sometimes deliver nothing #48169#
{ {
switch (rReq.GetSlot()) switch (rReq.GetSlot())
{ {
...@@ -935,7 +930,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq) ...@@ -935,7 +930,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
table::BorderLineStyle::SOLID); table::BorderLineStyle::SOLID);
aBorderLine.SetWidth( DEF_LINE_WIDTH_0 ); aBorderLine.SetWidth( DEF_LINE_WIDTH_0 );
} }
//Distance nur setzen, wenn der Request vom Controller kommt //Set distance only if the request is received from the controller.
#ifndef DISABLE_SCRIPTING #ifndef DISABLE_SCRIPTING
if(!StarBASIC::IsRunning()) if(!StarBASIC::IsRunning())
...@@ -1050,7 +1045,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq) ...@@ -1050,7 +1045,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest& rReq)
aBoxItem.SetDistance(MIN_BORDER_DIST); aBoxItem.SetDistance(MIN_BORDER_DIST);
} }
aFrameSet.Put( aBoxItem ); aFrameSet.Put( aBoxItem );
// Vorlagen-AutoUpdate // Template AutoUpdate
SwFrmFmt* pFmt = rSh.GetCurFrmFmt(); SwFrmFmt* pFmt = rSh.GetCurFrmFmt();
if(pFmt && pFmt->IsAutoUpdateFmt()) if(pFmt && pFmt->IsAutoUpdateFmt())
{ {
......
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