summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Riemer <ruderphilipp@gmail.com>2013-05-05 19:58:10 +0200
committerPhilipp Riemer <ruderphilipp@gmail.com>2013-05-05 20:33:16 +0200
commit688f72e3a2c3ef923389bbd21f6aea3afe1114db (patch)
tree1fd928b93c80e5a3ce3aa2d282b4be8e5e5757b8
parent68334b7c3f2c0654d28661d56e492922deef55cd (diff)
fdo#39468: Translate German comments in sw/source/core/view
Change-Id: Icc9249ec66ea10ae0ceea6b5e611cf774474c7c2
-rw-r--r--sw/source/core/view/vdraw.cxx12
-rw-r--r--sw/source/core/view/viewpg.cxx8
-rw-r--r--sw/source/core/view/viewsh.cxx4
-rw-r--r--sw/source/core/view/vnew.cxx54
-rw-r--r--sw/source/core/view/vprint.cxx79
5 files changed, 62 insertions, 95 deletions
diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx
index 7b5009bdfc48..58a31032ba24 100644
--- a/sw/source/core/view/vdraw.cxx
+++ b/sw/source/core/view/vdraw.cxx
@@ -156,8 +156,7 @@ void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
}
}
-
-#define WIEDUWILLST 400
+#define FUZZY_EDGE 400
sal_Bool SwViewImp::IsDragPossible( const Point &rPoint )
{
@@ -181,14 +180,13 @@ sal_Bool SwViewImp::IsDragPossible( const Point &rPoint )
else
aRect = GetShell()->GetLayout()->Frm();
- aRect.Top( aRect.Top() - WIEDUWILLST );
- aRect.Bottom( aRect.Bottom() + WIEDUWILLST );
- aRect.Left( aRect.Left() - WIEDUWILLST );
- aRect.Right( aRect.Right() + WIEDUWILLST );
+ aRect.Top( aRect.Top() - FUZZY_EDGE );
+ aRect.Bottom( aRect.Bottom() + FUZZY_EDGE );
+ aRect.Left( aRect.Left() - FUZZY_EDGE );
+ aRect.Right( aRect.Right() + FUZZY_EDGE );
return aRect.IsInside( rPoint );
}
-
void SwViewImp::NotifySizeChg( const Size &rNewSz )
{
if ( !HasDrawView() )
diff --git a/sw/source/core/view/viewpg.cxx b/sw/source/core/view/viewpg.cxx
index 12bf9ba42fca..40065dd502fb 100644
--- a/sw/source/core/view/viewpg.cxx
+++ b/sw/source/core/view/viewpg.cxx
@@ -105,7 +105,7 @@ void ViewShell::PrintProspect(
OSL_ENSURE( rPagesToPrint.first == -1 || rPrintData.GetRenderData().GetValidPagesSet().count( rPagesToPrint.first ) == 1, "first Page not valid" );
OSL_ENSURE( rPagesToPrint.second == -1 || rPrintData.GetRenderData().GetValidPagesSet().count( rPagesToPrint.second ) == 1, "second Page not valid" );
- // eine neue Shell fuer den Printer erzeugen
+ // create a new shell for the printer
ViewShell aShell( *this, 0, pPrinter );
SET_CURR_SHELL( &aShell );
@@ -179,7 +179,7 @@ void ViewShell::PrintProspect(
nMaxRowSz = std::max( aNxtPageSize.Height(), aSttPageSize.Height() );
}
- // den MapMode einstellen
+ // set the MapMode
aMapMode.SetOrigin( Point() );
{
Fraction aScX( aPrtSize.Width(), nMaxColSz );
@@ -188,8 +188,7 @@ void ViewShell::PrintProspect(
aScY = aScX;
{
- // fuer Drawing, damit diese ihre Objecte vernuenftig Painten
- // koennen, auf "glatte" Prozentwerte setzen
+ // Round percentages for Drawings so that these can paint their objects properly
aScY *= Fraction( 1000, 1 );
long nTmp = (long)aScY;
if( 1 < nTmp )
@@ -238,5 +237,4 @@ void ViewShell::PrintProspect(
pPrinter->Pop();
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 9786ba67ff8e..4516f17c8454 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -563,7 +563,7 @@ void ViewShell::MakeVisible( const SwRect &rRect )
else
{
//MA: 04. Nov. 94, no one needs this, does one?
- OSL_ENSURE( !this, "MakeVisible fuer Drucker wird doch gebraucht?" );
+ OSL_ENSURE( !this, "Is MakeVisible still needed for printers?" );
}
#endif
@@ -1028,7 +1028,7 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
if ( mbInEndAction )
{
//Is someone rescheduling again?
- OSL_ENSURE( !this, "Scroll waehrend einer EndAction." );
+ OSL_ENSURE( !this, "Scrolling during EndAction." );
}
#endif
diff --git a/sw/source/core/view/vnew.cxx b/sw/source/core/view/vnew.cxx
index 3b27367d0b78..62bbee6cdcfe 100644
--- a/sw/source/core/view/vnew.cxx
+++ b/sw/source/core/view/vnew.cxx
@@ -52,24 +52,23 @@ void ViewShell::Init( const SwViewOption *pNewOpt )
mbDocSizeChgd = sal_False;
- // Wir gehen auf Nummer sicher:
- // Wir muessen die alten Fontinformationen wegschmeissen,
- // wenn die Druckeraufloesung oder der Zoomfaktor sich aendert.
- // Init() und Reformat() sind die sichersten Stellen.
+ // We play it save: Remove old font information whenever the printer
+ // resolution or the zoom factor changes. For that, Init() and Reformat()
+ // are the most secure places.
pFntCache->Flush( );
- // ViewOptions werden dynamisch angelegt
+ // ViewOptions are created dynamically
if( !mpOpt )
{
mpOpt = new SwViewOption;
- // Ein ApplyViewOptions braucht nicht gerufen zu werden
+ // ApplyViewOptions() does not need to be called
if( pNewOpt )
{
*mpOpt = *pNewOpt;
- // Der Zoomfaktor muss eingestellt werden, weil in der CTOR-
- // phase aus Performancegruenden kein ApplyViewOptions gerufen wird.
+ // Zoom factor needs to be set because there is no call to ApplyViewOptions() during
+ // CTOR for performance reasons.
if( GetWin() && 100 != mpOpt->GetZoom() )
{
MapMode aMode( mpWin->GetMapMode() );
@@ -83,9 +82,8 @@ void ViewShell::Init( const SwViewOption *pNewOpt )
SwDocShell* pDShell = mpDoc->GetDocShell();
mpDoc->set(IDocumentSettingAccess::HTML_MODE, 0 != ::GetHtmlMode( pDShell ) );
- // JP 02.02.99: Bug 61335 - Readonly-Flag an den ViewOptions setzen,
- // bevor das Layout angelegt wird. Ansonsten muesste man
- // nochmals durchformatieren!!
+ // JP 02.02.99: Bug 61335 - set readonly flag at ViewOptions before creating layout. Otherwise,
+ // one would have to reformat again.
if( pDShell && pDShell->IsReadOnly() )
mpOpt->SetReadonly( sal_True );
@@ -166,14 +164,7 @@ void ViewShell::Init( const SwViewOption *pNewOpt )
// <-- #i31958#
}
-/*************************************************************************
-|*
-|* ViewShell::ViewShell() CTor fuer die erste Shell.
-|*
-|* Letzte Aenderung MA 29. Aug. 95
-|*
-|*************************************************************************/
-
+/// CTor for the first Shell.
ViewShell::ViewShell( SwDoc& rDocument, Window *pWindow,
const SwViewOption *pNewOpt, OutputDevice *pOutput,
long nFlags )
@@ -231,7 +222,7 @@ ViewShell::ViewShell( SwDoc& rDocument, Window *pWindow,
((SwHiddenTxtFieldType*)mpDoc->GetSysFldType( RES_HIDDENTXTFLD ))->
SetHiddenFlag( !mpOpt->IsShowHiddenField() );
- //In Init wird ein Standard-FrmFmt angelegt.
+ // In Init a standard FrmFmt is created.
// --> OD 2005-02-11 #i38810#
if ( !mpDoc->GetIDocumentUndoRedo().IsUndoNoResetModified()
&& !bIsDocModified )
@@ -240,7 +231,7 @@ ViewShell::ViewShell( SwDoc& rDocument, Window *pWindow,
mpDoc->ResetModified();
}
- //Format-Cache erweitern.
+ // extend format cache.
if ( SwTxtFrm::GetTxtCache()->GetCurMax() < 2550 )
SwTxtFrm::GetTxtCache()->IncreaseMax( 100 );
if( mpOpt->IsGridVisible() || getIDocumentDrawModelAccess()->GetDrawModel() )
@@ -250,14 +241,7 @@ ViewShell::ViewShell( SwDoc& rDocument, Window *pWindow,
mbInConstructor = false;
}
-/*************************************************************************
-|*
-|* ViewShell::ViewShell() CTor fuer weitere Shells auf ein Dokument.
-|*
-|* Letzte Aenderung MA 29. Aug. 95
-|*
-|*************************************************************************/
-
+/// CTor for further Shells on a document.
ViewShell::ViewShell( ViewShell& rShell, Window *pWindow,
OutputDevice *pOutput, long nFlags ) :
Ring( &rShell ),
@@ -302,7 +286,7 @@ ViewShell::ViewShell( ViewShell& rShell, Window *pWindow,
sal_Bool bModified = mpDoc->IsModified();
pOutput = mpOut;
- Init( rShell.GetViewOptions() ); //verstellt ggf. das Outdev (InitPrt())
+ Init( rShell.GetViewOptions() ); // might change Outdev (InitPrt())
mpOut = pOutput;
// OD 12.12.2002 #103492#
@@ -312,13 +296,13 @@ ViewShell::ViewShell( ViewShell& rShell, Window *pWindow,
((SwHiddenTxtFieldType*)mpDoc->GetSysFldType( RES_HIDDENTXTFLD ))->
SetHiddenFlag( !mpOpt->IsShowHiddenField() );
- // in Init wird ein Standard-FrmFmt angelegt
+ // In Init a standard FrmFmt is created.
if( !bModified && !mpDoc->GetIDocumentUndoRedo().IsUndoNoResetModified() )
{
mpDoc->ResetModified();
}
- //Format-Cache erweitern.
+ // extend format cache.
if ( SwTxtFrm::GetTxtCache()->GetCurMax() < 2550 )
SwTxtFrm::GetTxtCache()->IncreaseMax( 100 );
if( mpOpt->IsGridVisible() || getIDocumentDrawModelAccess()->GetDrawModel() )
@@ -375,7 +359,7 @@ ViewShell::~ViewShell()
GetDoc()->StopNumRuleAnimations( mpOut );
}
- delete mpImp; //Erst loeschen, damit die LayoutViews vernichtet werden.
+ delete mpImp; // Delete first, so that the LayoutViews are destroyed.
mpImp = 0; // Set to zero, because ~SwFrm relies on it.
if ( mpDoc )
@@ -388,11 +372,11 @@ ViewShell::~ViewShell()
delete mpOpt;
- //Format-Cache zurueckschrauben.
+ // resize format cache.
if ( SwTxtFrm::GetTxtCache()->GetCurMax() > 250 )
SwTxtFrm::GetTxtCache()->DecreaseMax( 100 );
- //Ggf. aus der PaintQueue entfernen lassen
+ // Remove from PaintQueue if necessary
SwPaintQueue::Remove( this );
OSL_ENSURE( !mnStartAction, "EndAction() pending." );
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index 85c8ea7ff5c7..0371018411e2 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -60,8 +60,8 @@
#include <viewopt.hxx>
#include <printdata.hxx> // SwPrintData
#include <pagedesc.hxx>
-#include <poolfmt.hxx> // fuer RES_POOLPAGE_JAKET
-#include <mdiexp.hxx> // Ansteuern der Statusleiste
+#include <poolfmt.hxx> // for RES_POOLPAGE_JAKET
+#include <mdiexp.hxx> // for accessing status bar
#include <statstr.hrc> // -- " --
#include <ptqueue.hxx>
#include <tabfrm.hxx>
@@ -74,7 +74,7 @@
using namespace ::com::sun::star;
//--------------------------------------------------------------------
-//Klasse zum Puffern von Paints
+/// Painting buffer
class SwQueuedPaint
{
public:
@@ -137,8 +137,7 @@ void SwPaintQueue::Repaint()
{
if ( pSh->GetWin() )
{
- //Fuer PreView aussenherum, weil im PaintHdl (UI) die
- //Zeilen/Spalten bekannt sind.
+ // for previewing, since rows/columns are known in PaintHdl (UI)
pSh->GetWin()->Invalidate();
pSh->GetWin()->Update();
}
@@ -211,11 +210,9 @@ void SetSwVisArea( ViewShell *pSh, const SwRect &rRect, sal_Bool /*bPDFExport*/
void ViewShell::InitPrt( OutputDevice *pOutDev )
{
- //Fuer den Printer merken wir uns einen negativen Offset, der
- //genau dem Offset de OutputSize entspricht. Das ist notwendig,
- //weil unser Ursprung der linken ober Ecke der physikalischen
- //Seite ist, die Ausgaben (SV) aber den Outputoffset als Urstprung
- //betrachten.
+ // For printing we use a negative offset (exactly the offset of OutputSize).
+ // This is necessary because the origin is in the upper left corner of the
+ // physical page while the output uses OutputOffset as origin.
if ( pOutDev )
{
maPrtOffst = Point();
@@ -231,7 +228,7 @@ void ViewShell::InitPrt( OutputDevice *pOutDev )
maPrtOffst.X() = maPrtOffst.Y() = 0;
if ( !mpWin )
- mpOut = pOutDev; //Oder was sonst?
+ mpOut = pOutDev;
}
/******************************************************************************
@@ -263,10 +260,10 @@ void ViewShell::ChgAllPageOrientation( sal_uInt16 eOri )
aNew.SetLandscape( bNewOri );
SwFrmFmt& rFmt = aNew.GetMaster();
SwFmtFrmSize aSz( rFmt.GetFrmSize() );
- // Groesse anpassen.
- // PORTRAIT -> Hoeher als Breit
- // LANDSCAPE -> Breiter als Hoch
- // Hoehe ist die VarSize, Breite ist die FixSize (per Def.)
+ // adjust size
+ // PORTRAIT -> higher than wide
+ // LANDSCAPE -> wider than high
+ // Height is the VarSize, width the FixSize (per Def.)
if( bNewOri ? aSz.GetHeight() > aSz.GetWidth()
: aSz.GetHeight() < aSz.GetWidth() )
{
@@ -346,7 +343,7 @@ void ViewShell::CalcPagesForPrint( sal_uInt16 nMax )
aAction.Action();
- maVisArea = aOldVis; //Zuruecksetzen wg. der Paints!
+ maVisArea = aOldVis; //reset due to the paints
Imp()->SetFirstVisPageInvalid();
// SwPaintQueue::Repaint();
}
@@ -360,13 +357,13 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
{
OSL_ENSURE( this->IsA( TYPE(SwFEShell) ),"ViewShell::Prt for FEShell only");
SwFEShell* pFESh = (SwFEShell*)this;
- // Wir bauen uns ein neues Dokument
+ // Let's create a new document
// SwDoc *pPrtDoc = new SwDoc;
// pPrtDoc->acquire();
// pPrtDoc->SetRefForDocShell( (SvEmbeddedObjectRef*)&(long&)rDocShellRef );
pPrtDoc->LockExpFlds();
- // Der Drucker wird uebernommen
+ // use given printer
//! Make a copy of it since it gets destroyed with the temporary document
//! used for PDF export
if (pPrt)
@@ -384,12 +381,12 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
SwShellCrsr *pActCrsr = pFESh->_GetCrsr();
SwShellCrsr *pFirstCrsr = dynamic_cast<SwShellCrsr*>(pActCrsr->GetNext());
- if( !pActCrsr->HasMark() ) // bei Multiselektion kann der aktuelle Cursor leer sein
+ if( !pActCrsr->HasMark() ) // with a multi-selection the current cursor might be empty
{
pActCrsr = dynamic_cast<SwShellCrsr*>(pActCrsr->GetPrev());
}
- // Die Y-Position der ersten Selektion
+ // Y-position of the first selection
Point aSelPoint;
if( pFESh->IsTableMode() )
{
@@ -428,16 +425,16 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
((SwTxtNode*)pLastNd)->CopyCollFmt( *pTxtNd );
}
- // es wurde in der CORE eine neu angelegt (OLE-Objekte kopiert!)
+ // a new one has been created in CORE (copying OLE objects)
// if( aDocShellRef.Is() )
// SwDataExchange::InitOle( aDocShellRef, pPrtDoc );
- // und fuellen es mit dem selektierten Bereich
+ // fill it with the selected content
pFESh->Copy( pPrtDoc );
- //Jetzt noch am ersten Absatz die Seitenvorlage setzen
+ // set the page template at the first paragraph
{
SwNodeIndex aNodeIdx( *pPrtDoc->GetNodes().GetEndOfContent().StartOfSectionNode() );
- SwCntntNode* pCNd = pPrtDoc->GetNodes().GoNext( &aNodeIdx ); // gehe zum 1. ContentNode
+ SwCntntNode* pCNd = pPrtDoc->GetNodes().GoNext( &aNodeIdx ); // go to 1st ContentNode
if( pFESh->IsTableMode() )
{
SwTableNode* pTNd = pCNd->FindTableNode();
@@ -454,7 +451,7 @@ SwDoc * ViewShell::FillPrtDoc( SwDoc *pPrtDoc, const SfxPrinter* pPrt)
{
SwCntntNode *pFirstNd =
pFirstCrsr->GetCntntNode( (*pFirstCrsr->GetMark()) > (*pFirstCrsr->GetPoint()) );
- // Hier werden die Absatzattribute des ersten Absatzes uebertragen
+ // copy paragraph attributes of the first paragraph
if( pFirstNd && pFirstNd->IsTxtNode() )
((SwTxtNode*)pFirstNd)->CopyCollFmt( *pTxtNd );
}
@@ -489,7 +486,7 @@ sal_Bool ViewShell::PrintOrPDFExport(
sal_Int32 nRenderer /* the index in the vector of pages to be printed */ )
{
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-//Immer die Druckroutinen in viewpg.cxx (PrintProspect) mitpflegen!!
+// CAUTION: Do also always update the printing routines in viewpg.cxx (PrintProspect)!
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
const sal_Int32 nMaxRenderer = rPrintData.GetRenderData().GetPagesToPrint().size() - 1;
@@ -516,12 +513,11 @@ sal_Bool ViewShell::PrintOrPDFExport(
pDrawView->SetBufferedOverlayAllowed( false );
}
- { //Zusaetzlicher Scope, damit die CurrShell vor dem zerstoeren der
- //Shell zurueckgesetzt wird.
+ { // additional scope so that the CurrShell is reset before destroying the shell
SET_CURR_SHELL( pShell );
- //JP 01.02.99: das ReadOnly Flag wird NIE mitkopiert; Bug 61335
+ //JP 01.02.99: Bug 61335 - the ReadOnly flag is never copied
if( mpOpt->IsReadonly() )
pShell->mpOpt->SetReadonly( sal_True );
@@ -552,7 +548,7 @@ sal_Bool ViewShell::PrintOrPDFExport(
// FIXME disabled because rPrintData.aOffset is always (0,0)
#if 0
- // wenn wir einen Umschlag drucken wird ein Offset beachtet
+ // consider offset when printing an envelope
if( pStPage->GetFmt()->GetPoolFmtId() == RES_POOLPAGE_JAKET )
{
Point aNewOrigin = pOutDev->GetMapMode().GetOrigin();
@@ -570,7 +566,7 @@ sal_Bool ViewShell::PrintOrPDFExport(
pStPage->GetUpper()->Paint( pStPage->Frm(), &rPrintData );
SwPaintQueue::Repaint();
- } //Zus. Scope wg. CurShell!
+ }
delete pShell;
@@ -593,9 +589,8 @@ sal_Bool ViewShell::PrintOrPDFExport(
void ViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintData& rOptions,
OutputDevice* pOleOut, const Rectangle& rRect )
{
- //Wir brauchen eine Shell fuer das Drucken. Entweder hat das Doc schon
- //eine, dann legen wir uns eine neue Sicht an, oder das Doc hat noch
- //keine, dann erzeugen wir die erste Sicht.
+ // For printing a shell is needed. Either the Doc already has one, than we
+ // create a new view, or it has none, than we create the first view.
ViewShell *pSh;
if( pDoc->GetCurrentViewShell() )
pSh = new ViewShell( *pDoc->GetCurrentViewShell(), 0, pOleOut,VSHELLFLAG_SHARELAYOUT );//swmod 080129
@@ -622,29 +617,21 @@ void ViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintDat
// Removing this gives us a performance gain during saving the
// document because the thumbnail creation will not trigger a complete
// formatting of the document.
- // Seiten fuers Drucken formatieren
+ // Format pages for printing
// pSh->CalcPagesForPrint( SHRT_MAX );
- //#39275# jetzt will der Meyer doch ein Clipping
+ //#39275# now Meyer wants again a Clipping
pOleOut->Push( PUSH_CLIPREGION );
pOleOut->IntersectClipRegion( aSwRect.SVRect() );
pSh->GetLayout()->Paint( aSwRect );
// SFX_APP()->SpoilDemoOutput( *pOleOut, rRect );
pOleOut->Pop();
- // erst muss das CurrShell Object zerstoert werden!!
+ // first the CurrShell object needs to be destroyed!
}
delete pSh;
}
-/******************************************************************************
- * Methode : IsAnyFieldInDoc()
- * Beschreibung: Stellt fest, ob im DocNodesArray Felder verankert sind
- * Erstellt : JP 27.07.95
- * Aenderung : JP 10.12.97
- ******************************************************************************/
-
-
-
+/// Check if the DocNodesArray contains fields.
sal_Bool ViewShell::IsAnyFieldInDoc() const
{
const SfxPoolItem* pItem;