Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Translated the german comments to english an fixed minor coding
style issues in apphdl.cxx and applab.cxx
---
 sw/source/ui/app/apphdl.cxx |   34 +++++++++++++++++-----------------
 sw/source/ui/app/applab.cxx |   43 +++++++++++++++++++++----------------------
 2 files changed, 38 insertions(+), 39 deletions(-)

diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx
index a0cc824..78247c5 100644
--- a/sw/source/ui/app/apphdl.cxx
+++ b/sw/source/ui/app/apphdl.cxx
@@ -71,7 +71,7 @@
 #include <srcview.hxx>
 #include <wrtsh.hxx>
 #include <docsh.hxx>
-#include <cmdid.h>                     // Funktion-Ids
+#include <cmdid.h>                     // Function-Ids
 #include <initui.hxx>
 #include <uitool.hxx>
 #include <swmodule.hxx>
@@ -84,7 +84,7 @@
 #include <cfgitems.hxx>
 #include <prtopt.hxx>
 #include <modcfg.hxx>
-#include <globals.h>           // globale Konstanten z.B.
+#include <globals.h>           // e.g. global Constants
 #include <app.hrc>
 #include <fontcfg.hxx>
 #include <barcfg.hxx>
@@ -117,12 +117,12 @@
 using namespace ::com::sun::star;
 
 /*--------------------------------------------------------------------
-    Beschreibung: Slotmaps fuer Methoden der Applikation
+    Description: Slotmaps for the application's methods
  --------------------------------------------------------------------*/
 
 
-// hier werden die SlotID's included
-// siehe Idl-File
+// here are the SlotID's being included
+// see Idl-file
 //
 #define SwModule
 #define ViewSettings
@@ -147,7 +147,7 @@ SFX_IMPL_INTERFACE( SwModule, SfxModule, SW_RES(RID_SW_NAME) )
 
 
 /*--------------------------------------------------------------------
-    Beschreibung: Andere States
+    Description: other states
  --------------------------------------------------------------------*/
 
 
@@ -255,7 +255,7 @@ SwView* lcl_LoadDoc(SwView* pView, const String& rURL)
     return pNewView;
 }
 /*--------------------------------------------------------------------
-    Beschreibung:      Felddialog starten
+    Description: start field dialog
  --------------------------------------------------------------------*/
 
 void NewXForms( SfxRequest& rReq ); // implementation: below
@@ -484,7 +484,7 @@ IMPL_LINK( SwMailMergeWizardExecutor, EndDialogHdl, AbstractMailMergeWizard*, EM
             }
             else
             {
-                //should not happen - just in case no target view has been created
+                // should not happen - just in case no target view has been created
                 ExecutionFinished( true );
             }
             break;
@@ -530,7 +530,7 @@ IMPL_LINK( SwMailMergeWizardExecutor, EndDialogHdl, AbstractMailMergeWizard*, EM
             }
             else
             {
-                //should not happen - just in case no target view has been created
+                // should not happen - just in case no target view has been created
                 ExecutionFinished( true );
             }
             break;
@@ -542,7 +542,7 @@ IMPL_LINK( SwMailMergeWizardExecutor, EndDialogHdl, AbstractMailMergeWizard*, EM
                 LINK( this, SwMailMergeWizardExecutor, CancelHdl ), m_pWizard );
             break;
         }
-    default: //finish
+    default: // finish
         {
             SwView* pSourceView = m_pMMConfig->GetSourceView();
             if(pSourceView)
@@ -677,7 +677,7 @@ void SwModule::ExecOther(SfxRequest& rReq)
 }
 
 /*--------------------------------------------------------------------
-    Beschreibung: Catch notifications
+    Description: Catch notifications
  --------------------------------------------------------------------*/
 
 
@@ -694,7 +694,7 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
             switch( rEvHint.GetEventId() )
             {
             case SFX_EVENT_CREATEDOC:
-                // alle FIX-Date/Time Felder auf akt. setzen
+                // Update all FIX-Date/Time fields
                 if( pWrtSh )
                 {
                     SFX_ITEMSET_ARG( pDocSh->GetMedium()->GetItemSet(), pUpdateDocItem, 
SfxUInt16Item, SID_UPDATEDOCMODE, sal_False);
@@ -706,14 +706,14 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
                     {
                         pWrtSh->UpdateInputFlds();
 
-                        // Sind Datenbankfelder enthalten?
-                        // Erstmal alle verwendeten Datenbanken holen
+                        // Are database fields contained?
+                        // Get all used databases for the first time
                         SwDoc *pDoc = pDocSh->GetDoc();
                         SvStringsDtor aDBNameList;
                         pDoc->GetAllUsedDB( aDBNameList );
                         sal_uInt16 nCount = aDBNameList.Count();
                         if (nCount)
-                        {   // Datenbankbeamer oeffnen
+                        {   // Open database beamer
                             ShowDBObj(pWrtSh->GetView(), pDoc->GetDBData());
                         }
                     }
@@ -919,8 +919,8 @@ const SwMasterUsrPref *SwModule::GetUsrPref(sal_Bool bWeb) const
     SwModule* pNonConstModule = (SwModule*)this;
     if(bWeb && !pWebUsrPref)
     {
-        // im Load der SwMasterUsrPref wird der SpellChecker gebraucht, dort darf
-        // er aber nicht angelegt werden #58256#
+        // The SpellChecker is needed in SwMasterUsrPref's Load, but it must not
+        // be created there #58256#
         pNonConstModule->pWebUsrPref = new SwMasterUsrPref(TRUE);
     }
     else if(!bWeb && !pUsrPref)
diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx
index d509df8..b51dc45 100644
--- a/sw/source/ui/app/applab.cxx
+++ b/sw/source/ui/app/applab.cxx
@@ -154,7 +154,7 @@ const SwFrmFmt *lcl_InsertLabText( SwWrtShell& rSh, const SwLabItem& rItem,
 
     rSh.SetTxtFmtColl( rSh.GetTxtCollFromPool( RES_POOLCOLL_STANDARD ) );
 
-    // Ggf. "Naechster Datensatz"
+    // If applicable "next dataset"
     String sDBName;
     if( (!rItem.bSynchron || !(nCol|nRow)) && (sDBName = InsertLabEnvText( rSh, rFldMgr, 
rItem.aWriting )).Len() && !bLast )
     {
@@ -172,13 +172,13 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel)
     static sal_uInt16 nLabelTitleNo = 0;
     static sal_uInt16 nBCTitleNo = 0;
 
-    // DB-Manager anlegen
+    // Create DB-Manager
     SwNewDBMgr* pNewDBMgr = new SwNewDBMgr;
 
-    // SwLabItem aus Config lesen
+    // Read SwLabItem from Config
     SwLabCfgItem aLabCfg(bLabel);
 
-    // Dialog hochfahren
+    // Move up Dialog
     SfxItemSet aSet( GetPool(), FN_LABEL, FN_LABEL, 0 );
     aSet.Put( aLabCfg.GetItem() );
 
@@ -211,7 +211,7 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel)
         SfxViewFrame* pViewFrame = SfxViewFrame::DisplayNewDocument( *xDocSh, rReq );
 
         SwView      *pNewView = (SwView*) pViewFrame->GetViewShell();
-        pNewView->AttrChangedNotify( &pNewView->GetWrtShell() );//Damit SelectShell gerufen wird.
+        pNewView->AttrChangedNotify( &pNewView->GetWrtShell() );// So that SelectShell is being 
called.
 
         // Set document title
         String aTmp;
@@ -229,7 +229,7 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel)
 
         pViewFrame->GetFrame().Appear();
 
-        // Shell ermitteln
+        // Determine Shell
         SwWrtShell *pSh = pNewView->GetWrtShellPtr();
         OSL_ENSURE( pSh, "missing WrtShell" );
 
@@ -247,7 +247,7 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel)
             SwPageDesc aDesc = pSh->GetPageDesc( 0 );
             SwFrmFmt&  rFmt  = aDesc.GetMaster();
 
-            // Raender
+            // Borders
             SvxLRSpaceItem aLRMargin( RES_LR_SPACE );
             SvxULSpaceItem aULMargin( RES_UL_SPACE );
             aLRMargin.SetLeft ((sal_uInt16) rItem.lLeft );
@@ -264,19 +264,19 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel)
             aDesc.ChgFooterShare(sal_False);
 
 
-            aDesc.SetUseOn(nsUseOnPage::PD_ALL);                               // Seitennumerierung
+            aDesc.SetUseOn(nsUseOnPage::PD_ALL);                               // Site numbering
 
-            // Einstellen der Seitengroesse
+            // Set page size
             rFmt.SetFmtAttr(SwFmtFrmSize(ATT_FIX_SIZE,
                                         rItem.lLeft  + rItem.nCols * rItem.lHDist + MINLAY,
                                         rItem.lUpper + rItem.nRows * rItem.lVDist + MINLAY));
 
-            // Numerierungsart
+            // Numbering type
             SvxNumberType aType;
             aType.SetNumberingType(SVX_NUM_NUMBER_NONE);
             aDesc.SetNumType( aType );
 
-            // Folgevorlage
+            // Followup template
             const SwPageDesc &rFollow = pSh->GetPageDesc( pSh->GetCurPageDesc() );
             aDesc.SetFollow( &rFollow );
 
@@ -285,23 +285,22 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel)
             aItem.SetValue((sal_Int8)pPrt->GetPaperBin());
             rFmt.SetFmtAttr(aItem);
 
-            //determine orientation by calculating the width and height of the resulting page
+            // Determine orientation by calculating the width and height of the resulting page
             const int nResultWidth = rItem.lHDist * (rItem.nCols - 1) + rItem.lWidth + rItem.lLeft;
             const int nResultHeight = rItem.lVDist * (rItem.nRows - 1) + rItem.lHeight + 
rItem.lUpper;
             aDesc.SetLandscape(nResultWidth > nResultHeight);
 
             pSh->ChgPageDesc( 0, aDesc );
 
-            // Rahmen einfuegen
+            // Insert frame
             SwFldMgr*           pFldMgr = new SwFldMgr;
             pFldMgr->SetEvalExpFlds(sal_False);
 
-            //fix(24446): Damit der Text der Ettiketten nicht im unbedruckbaren
-            //Bereich landet stellen wir entsprechende Raender ein. Um das Handling
-            //so Optimal wie moeglich zu halten stellen wir zunaechst an der
-            //aktuellen Absatzvorlage keinen Rand als hartes Attribut ein (Damit die
-            //Formatierung wg. der Zeichengeb. Rahmen passt. Dann stellen wir die
-            //Standarabsatzvorlage anhand des unbedruckbaren Bereiches ein.
+            //fix(24446): To avoid that labels end up in unprintable area, we set
+            //borders accordingly. To keep the handling as good as possible, we
+            //don't set any border as hard attribute at the current paragraph template
+            //(so that formating works, because of character-bound borders). Then
+            //we set the default paragraph template using the unprintable area.
             const long nMin = pPrt->GetPageOffset().X() - rItem.lLeft;
             if ( nMin > 0 )
             {
@@ -313,7 +312,7 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel)
                 pStandard->SetFmtAttr( aLR );
             }
 
-            // Rahmenvorlage vorbereiten
+            // Prepare border template
             SwFrmFmt* pFmt = pSh->GetFrmFmtFromPool( RES_POOLFRM_LABEL );
             SwFmtFrmSize aFrmSize(     ATT_FIX_SIZE,
                                     rItem.lHDist - (rItem.lHDist-rItem.lWidth),
@@ -380,9 +379,9 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel)
                             sLinkName += String::CreateFromAscii(MASTER_LABEL);
                             aSect.SetLinkFileName(sLinkName);
                             aSect.SetProtectFlag(true);
-                            pSh->Insert(aDotStr);      // Dummytext zum Zuweisen der Section
+                            pSh->Insert(aDotStr);      // Dummytext to allocate the Section
                             pSh->SttDoc();
-                            pSh->EndDoc(sal_True);     // Alles im Rahmen selektieren
+                            pSh->EndDoc(sal_True);     // Select everything in the frame
                             pSh->InsertSection(aSect);
                         }
                         pSh->Pop( sal_False );
-- 
1.7.1


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.