[Libreoffice] [PATCH] [writer/sw/source/ui/app] Translate comments of docsh

Martin Kepplinger martinkepplinger at eml.cc
Sun Feb 20 15:20:39 PST 2011


This translates the code-comments of files docsh.cxx and docshdrw.cxx
from german to english.

This work is contributed under the terms of LGPLv3+/MPL dual license.
---
 sw/source/ui/app/docsh.cxx    |  102 ++++++++++++++++++++---------------------
 sw/source/ui/app/docshdrw.cxx |    4 +-
 2 files changed, 52 insertions(+), 54 deletions(-)

diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index 0037cb1..43f90e3 100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -68,11 +68,11 @@
 #include <swwait.hxx>
 #include <swprtopt.hxx>
 #include <frmatr.hxx>
-#include <view.hxx> 		// fuer die aktuelle Sicht
+#include <view.hxx> 		// for the current view
 #include <edtwin.hxx>
 #include <PostItMgr.hxx>
-#include <wrtsh.hxx>		// Verbindung zur Core
-#include <docsh.hxx>	  	// Dokumenterzeugung
+#include <wrtsh.hxx>		// connection to Core
+#include <docsh.hxx>	  	// document creation
 #include <basesh.hxx>
 #include <viewopt.hxx>
 #include <wdocsh.hxx>
@@ -98,7 +98,7 @@
 #include <fldbas.hxx>
 #include <docary.hxx>
 // <--
-#include <swerror.h>		// Fehlermeldungen
+#include <swerror.h>		// Error messages
 #include <helpid.h>
 #include <cmdid.h>
 #include <globals.hrc>
@@ -141,7 +141,7 @@ TYPEINIT2(SwDocShell, SfxObjectShell, SfxListener);
 SFX_IMPL_OBJECTFACTORY(SwDocShell, SvGlobalName(SO3_SW_CLASSID), SFXOBJECTSHELL_STD_NORMAL|SFXOBJECTSHELL_HASMENU, "swriter"  )
 
 /*--------------------------------------------------------------------
-    Beschreibung: Laden vorbereiten
+    Description: Prepare loading
  --------------------------------------------------------------------*/
 
 
@@ -217,8 +217,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
             OSL_ENSURE(pItem->IsA( TYPE(SfxStringItem) ), "Wrong parameter type");
             comphelper::OStorageHelper::SetCommonStoragePassword( rMedium.GetStorage(), ((const SfxStringItem *)pItem)->GetValue() );
         }
-        // Fuer's Dokument-Einfuegen noch die FF-Version, wenn's der
-        // eigene Filter ist.
+        // And for document-paste the FF-Version, when it's the own filter
         OSL_ENSURE( /*pRead != ReadSw3 || */pRead != ReadXML || pFlt->GetVersion(),
                 "No FF version set in filter" );
     }
@@ -247,7 +246,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
 }
 
 /*--------------------------------------------------------------------
-    Beschreibung: Laden
+    Description: Loading
  --------------------------------------------------------------------*/
 
 BOOL SwDocShell::ConvertFrom( SfxMedium& rMedium )
@@ -262,7 +261,7 @@ BOOL SwDocShell::ConvertFrom( SfxMedium& rMedium )
 
     SwWait aWait( *this, TRUE );
 
-        // SfxProgress unterdruecken, wenn man Embedded ist
+        // Suppress SfxProgress, when we are Embedded
     SW_MOD()->SetEmbeddedLoadSave(
                             SFX_CREATE_MODE_EMBEDDED == GetCreateMode() );
 
@@ -273,7 +272,7 @@ BOOL SwDocShell::ConvertFrom( SfxMedium& rMedium )
 
     ULONG nErr = pRdr->Read( *pRead );
 
-    // Evtl. ein altes Doc weg
+    // Maybe put away one old Doc
     if ( pDoc != pRdr->GetDoc() )
     {
         if( pDoc )
@@ -307,7 +306,7 @@ BOOL SwDocShell::ConvertFrom( SfxMedium& rMedium )
 }
 
 /*--------------------------------------------------------------------
-    Beschreibung: Sichern des Default-Formats, Stg vorhanden
+    Description: Saving the Default-Format, Stg present
  --------------------------------------------------------------------*/
 
 
@@ -350,9 +349,9 @@ BOOL SwDocShell::Save()
             break;
 
         case SFX_CREATE_MODE_EMBEDDED:
-            // SfxProgress unterdruecken, wenn man Embedded ist
+            // Suppress SfxProgress, if we are Embedded
             SW_MOD()->SetEmbeddedLoadSave( TRUE );
-            // kein break;
+            // no break;
 
         case SFX_CREATE_MODE_STANDARD:
         case SFX_CREATE_MODE_PREVIEW:
@@ -365,7 +364,7 @@ BOOL SwDocShell::Save()
                     pDoc->SetContainsMSVBasic( FALSE );
                 }
 
-                // TabellenBox Edit beenden!
+                // End TableBox Edit!
                 if( pWrtShell )
                     pWrtShell->EndAllTblBoxEdit();
 
@@ -400,7 +399,7 @@ BOOL SwDocShell::Save()
 }
 
 /*--------------------------------------------------------------------
-    Beschreibung: Sichern im Defaultformat
+    Description: Save using the Defaultformat
  --------------------------------------------------------------------*/
 
 
@@ -483,18 +482,18 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
             pDoc->SetContainsMSVBasic( FALSE );
         }
 
-        // TabellenBox Edit beenden!
+        // End TableBox Edit!
         if( pWrtShell )
             pWrtShell->EndAllTblBoxEdit();
 
-        // Modified-Flag merken und erhalten ohne den Link zu Callen
-        // (fuer OLE; nach Anweisung von MM)
+        // Remember and preserve Modified-Flag without calling the Link
+        // (for OLE; after Statement from MM)
         BOOL bIsModified = pDoc->IsModified();
         SwUndoNoModifiedPosition aOldPos = pDoc->getUndoNoModifiedPosition();
         Link aOldOLELnk( pDoc->GetOle2Link() );
         pDoc->SetOle2Link( Link() );
 
-            // SfxProgress unterdruecken, wenn man Embedded ist
+            // Suppress SfxProgress when we are Embedded
         SW_MOD()->SetEmbeddedLoadSave(
                             SFX_CREATE_MODE_EMBEDDED == GetCreateMode() );
 
@@ -529,11 +528,11 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
 }
 
 /*--------------------------------------------------------------------
-    Beschreibung: Sichern aller Formate
+    Description: Save all Formats
  --------------------------------------------------------------------*/
 SwSrcView* lcl_GetSourceView( SwDocShell* pSh )
 {
-    // sind wir in der SourceView?
+    // are we in SourceView?
     SfxViewFrame* pVFrame = SfxViewFrame::GetFirst( pSh );
     SfxViewShell* pViewShell = pVFrame ? pVFrame->GetViewShell() : 0;
     return PTR_CAST( SwSrcView, pViewShell);
@@ -587,7 +586,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
         }
     }
 
-    // TabellenBox Edit beenden!
+    // End TableBox Edit!
     if( pWrtShell )
         pWrtShell->EndAllTblBoxEdit();
 
@@ -638,14 +637,14 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
            pFlt->GetUserData().EqualsAscii( FILTER_XMLV ) ||
            pFlt->GetUserData().EqualsAscii( FILTER_XMLVW ) ) )
     {
-        // eigenen Typ ermitteln
+        // determine the own Type
         BYTE nMyType = 0;
         if( ISA( SwWebDocShell) )
             nMyType = 1;
         else if( ISA( SwGlobalDocShell) )
             nMyType = 2;
 
-        // gewuenschten Typ ermitteln
+        // determine the desired Type
         BYTE nSaveType = 0;
         ULONG nSaveClipId = pFlt->GetFormat();
         if( SOT_FORMATSTR_ID_STARWRITERWEB_8 == nSaveClipId ||
@@ -659,7 +658,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
                  SOT_FORMATSTR_ID_STARWRITERGLOB_40 == nSaveClipId )
             nSaveType = 2;
 
-        // Flags am Dokument entsprechend umsetzen
+        // Change Flags of the Document accordingly
         BOOL bIsHTMLModeSave = GetDoc()->get(IDocumentSettingAccess::HTML_MODE);
         BOOL bIsGlobalDocSave = GetDoc()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT);
         BOOL bIsGlblDocSaveLinksSave = GetDoc()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT_SAVE_LINKS);
@@ -688,7 +687,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
             }
         }
 
-        // Jetzt das Dokument normal speichern
+        // Now normally save the Document
         BOOL bRet = SaveAs( rMedium );
 
         if( nMyType != nSaveType )
@@ -739,15 +738,15 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
         xWriter->SetAsciiOptions( aOpt );
     }
 
-        // SfxProgress unterdruecken, wenn man Embedded ist
+        // Suppress SfxProgress when we are Embedded
     SW_MOD()->SetEmbeddedLoadSave(
                             SFX_CREATE_MODE_EMBEDDED == GetCreateMode());
 
-    // Kontext aufspannen, um die Anzeige der Selektion zu unterbinden
+    // Span Kontext in order to suppress the Slektion's View
     ULONG nErrno;
     String aFileName( rMedium.GetName() );
 
-    //Keine View also das ganze Dokument!
+    // No View, so the whole Document!
     if ( pWrtShell )
     {
         SwWait aWait( *this, TRUE );
@@ -758,8 +757,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
         pWrtShell->Push();
         SwWriter aWrt( rMedium, *pWrtShell, TRUE );
         nErrno = aWrt.Write( xWriter, &aFileName );
-        //JP 16.05.97: falls der SFX uns die View waehrend des speicherns
-        //				entzieht
+        //JP 16.05.97: In case the SFX revokes the View while saving
         if( pWrtShell )
         {
             pWrtShell->Pop(FALSE);
@@ -770,7 +768,7 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
     }
     else
     {
-        // sind wir in der SourceView?
+        // are we in SourceView?
         SwSrcView* pSrcView = ::lcl_GetSourceView( this );
         if( pSrcView )
         {
@@ -793,12 +791,12 @@ BOOL SwDocShell::ConvertTo( SfxMedium& rMedium )
 }
 
 /*--------------------------------------------------------------------
-    Beschreibung:	Haende weg
+    Description:	Hands off
  --------------------------------------------------------------------*/
 
 
 /*--------------------------------------------------------------------
-    Beschreibung: ??? noch nicht zu aktivieren, muss TRUE liefern
+    Description: ??? do not yet activate, must deliver TRUE
  --------------------------------------------------------------------*/
 
 
@@ -808,7 +806,7 @@ sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xS
     BOOL bRet = SfxObjectShell::SaveCompleted( xStor );
     if( bRet )
     {
-        // erst hier entscheiden, ob das Speichern geklappt hat oder nicht
+        // Do not decide until here, whether Saving was successful or not
         if( IsModified() )
             pDoc->SetModified();
         else
@@ -838,26 +836,26 @@ sal_Bool SwDocShell::SaveCompleted( const uno::Reference < embed::XStorage >& xS
 }
 
 /*--------------------------------------------------------------------
-    Beschreibung: Draw()-Overload fuer OLE2 (Sfx)
+    Description: Draw()-Overload for OLE2 (Sfx)
  --------------------------------------------------------------------*/
 
 void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup,
                                USHORT nAspect )
 {
-    //fix #25341# Draw sollte das Modified nicht beeinflussen
+    //fix #25341# Draw should not affect the Modified
     BOOL bResetModified;
     if ( TRUE == (bResetModified = IsEnableSetModified()) )
         EnableSetModified( FALSE );
 
-    //sollte am Document ein JobSetup haengen, dann kopieren wir uns diesen,
-    //um nach dem PrtOle2 diesen wieder am Doc zu verankern.
-    //Einen leeren JobSetup setzen wir nicht ein, denn der wuerde nur zu
-    //fragwuerdigem Ergebnis nach teurer Neuformatierung fuehren (Preview!)
+    // When there is a JobSetup connected to the Document, we copy it to
+    // reconnect it after PrtOle2. We don't use an empty JobSetup because
+    // that would only lead to questionable results after expensive
+    // reformating (Preview!)
     JobSetup *pOrig = 0;
     if ( rSetup.GetPrinterName().Len() && ASPECT_THUMBNAIL != nAspect )
     {
         pOrig = const_cast<JobSetup*>(pDoc->getJobsetup());
-        if( pOrig )			// dann kopieren wir uns den
+        if( pOrig )			// then we copy that
             pOrig = new JobSetup( *pOrig );
         pDoc->setJobsetup( rSetup );
     }
@@ -901,7 +899,7 @@ void SwDocShell::SetVisArea( const Rectangle &rRect )
         nMoveY = aRect.Top()  < 0 ? -aRect.Top()  : 0;
         aRect.Move( nMoveX, nMoveY );
 
-        //Ruft das SfxInPlaceObject::SetVisArea()!
+        // Calls SfxInPlaceObject::SetVisArea()!
         pView->SetVisArea( aRect, TRUE );
     }
     else
@@ -913,7 +911,7 @@ Rectangle SwDocShell::GetVisArea( USHORT nAspect ) const
 {
     if ( nAspect == ASPECT_THUMBNAIL )
     {
-        //PreView: VisArea auf die erste Seite einstellen.
+        // PreView: set VisArea to the first page.
         SwNodeIndex aIdx( pDoc->GetNodes().GetEndOfExtras(), 1 );
         SwCntntNode* pNd = pDoc->GetNodes().GoNext( &aIdx );
 
@@ -997,7 +995,7 @@ void SwDocShell::GetState(SfxItemSet& rSet)
             if ( !bDisable )
             {
                 SfxViewFrame *pTmpFrm = SfxViewFrame::GetFirst(this);
-                while (pTmpFrm)		// Preview suchen
+                while (pTmpFrm)		// Look for Preview
                 {
                     if ( PTR_CAST(SwView, pTmpFrm->GetViewShell()) &&
                          ((SwView*)pTmpFrm->GetViewShell())->GetWrtShell().getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE))
@@ -1089,15 +1087,15 @@ void SwDocShell::GetState(SfxItemSet& rSet)
 }
 
 /*--------------------------------------------------------------------
-    Beschreibung:	OLE-Hdls
+    Description:	OLE-Hdls
  --------------------------------------------------------------------*/
 
 
 IMPL_LINK( SwDocShell, Ole2ModifiedHdl, void *, p )
 {
-    // vom Doc wird der Status mitgegeben (siehe doc.cxx)
-    // 	Bit 0:	-> alter Zustand
-    //	Bit 1: 	-> neuer Zustand
+    // the Status is handed over from Doc (see doc.cxx)
+    // 	Bit 0:	-> old state
+    //	Bit 1: 	-> new state
     long nStatus = (long)p;
     if( IsEnableSetModified() )
         SetModified( (nStatus & 2) ? TRUE : FALSE );
@@ -1105,7 +1103,7 @@ IMPL_LINK( SwDocShell, Ole2ModifiedHdl, void *, p )
 }
 
 /*--------------------------------------------------------------------
-    Beschreibung:	Pool returnen Hier weil virtuelll
+    Description:	return Pool here, because virtual
  --------------------------------------------------------------------*/
 
 
@@ -1160,10 +1158,10 @@ void SwDocShell::LoadingFinished()
     }
 }
 
-// eine Uebertragung wird abgebrochen (wird aus dem SFX gerufen)
+// a Transfer is cancelled (is called from SFX)
 void SwDocShell::CancelTransfers()
 {
-    // alle Links vom LinkManager Canceln
+    // Cancel all links from LinkManager
     aFinishedTimer.Stop();
     pDoc->GetLinkManager().CancelTransfers();
     SfxObjectShell::CancelTransfers();
diff --git a/sw/source/ui/app/docshdrw.cxx b/sw/source/ui/app/docshdrw.cxx
index 1fb22ee..a6beb59 100644
--- a/sw/source/ui/app/docshdrw.cxx
+++ b/sw/source/ui/app/docshdrw.cxx
@@ -43,7 +43,7 @@
 using namespace ::com::sun::star;
 
 /*--------------------------------------------------------------------
-    Beschreibung: Document laden
+    Description: Load Document
  --------------------------------------------------------------------*/
 
 
@@ -52,7 +52,7 @@ void  SwDocShell::InitDraw()
     SdrModel *pDrDoc = pDoc->GetDrawModel();
     if( pDrDoc )
     {
-        // Listen, bzw. Tables im ItemSet der DocShell anlegen
+        // create Lists and Tables DocShell's ItemSet
         PutItem( SvxGradientListItem( pDrDoc->GetGradientList(), SID_GRADIENT_LIST ) );
         PutItem( SvxHatchListItem( pDrDoc->GetHatchList(), SID_HATCH_LIST ) );
         PutItem( SvxBitmapListItem( pDrDoc->GetBitmapList(), SID_BITMAP_LIST ) );
-- 
1.7.1



More information about the LibreOffice mailing list