[Libreoffice-commits] core.git: sw/source

Matthias Freund matti_lx at yahoo.de
Sun Mar 3 06:11:31 PST 2013


 sw/source/ui/uno/unotxdoc.cxx |   42 +++++++++++++++++++++---------------------
 sw/source/ui/uno/unotxvw.cxx  |   35 ++++++++++++++---------------------
 2 files changed, 35 insertions(+), 42 deletions(-)

New commits:
commit 210203e02d8190a90a8330ce2c19dc8c5afdc300
Author: Matthias Freund <matti_lx at yahoo.de>
Date:   Sun Mar 3 15:05:16 2013 +0100

    Comment translation german-english sw/source/ui/uno/
    
    Change-Id: I350aa56bd27ef55a44d5a7140e78fa36b350b302
    Reviewed-on: https://gerrit.libreoffice.org/2530
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index ce295e9..02d8ae7 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -733,7 +733,7 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor >
     SwDocPositions eStart = pSearch->bBack ? DOCPOS_END : DOCPOS_START;
     SwDocPositions eEnd = pSearch->bBack ? DOCPOS_START : DOCPOS_END;
 
-    // Suche soll ueberall stattfinden
+    // Search should take place anywhere
     pUnoCrsr->SetRemainInSection(sal_False);
     sal_uInt32 nResult;
     UnoActionContext aContext(pDocShell->GetDoc());
@@ -793,9 +793,8 @@ Reference< util::XSearchDescriptor >  SwXTextDocument::createSearchDescriptor(vo
 
 }
 
-/* --------------------------------------------------
- * wird fuer findAll/First/Next verwendet
- * --------------------------------------------------*/
+// Used for findAll/First/Next
+
 SwUnoCrsr*  SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > & xDesc,
                                         Reference< XTextCursor > & xCrsr, sal_Bool bAll,
                                                 sal_Int32& nResult,
@@ -853,18 +852,18 @@ SwUnoCrsr*  SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor >
     util::SearchOptions aSearchOpt;
     pSearch->FillSearchOptions( aSearchOpt );
 
-/*
- * folgende Kombinationen sind erlaubt:
- *  - suche einen im Body:                  -> FND_IN_BODY
- *  - suche alle im Body:                   -> FND_IN_BODYONLY | FND_IN_SELALL
- *  - suche in Selectionen: einen / alle    -> FND_IN_SEL  [ | FND_IN_SELALL ]
- *  - suche im nicht Body: einen / alle     -> FND_IN_OTHER [ | FND_IN_SELALL ]
- *  - suche ueberall alle:                  -> FND_IN_SELALL
+/**
+ * The following combinations are allowed:
+ *  - Search in the body:                   -> FND_IN_BODY
+ *  - Search all in the body:               -> FND_IN_BODYONLY | FND_IN_SELALL
+ *  - Search in selections: one / all       -> FND_IN_SEL  [ | FND_IN_SELALL ]
+ *  - Search outside the body: one / all    -> FND_IN_OTHER [ | FND_IN_SELALL ]
+ *  - Search everywhere all:                -> FND_IN_SELALL
  */
     int eRanges(FND_IN_BODY);
     if(bParentInExtra)
         eRanges = FND_IN_OTHER;
-    if(bAll) //immer - ueberall?
+    if(bAll) //always - everywhere?
         eRanges = FND_IN_SELALL;
     SwDocPositions eStart = !bAll ? DOCPOS_CURR : pSearch->bBack ? DOCPOS_END : DOCPOS_START;
     SwDocPositions eEnd = pSearch->bBack ? DOCPOS_START : DOCPOS_END;
@@ -1070,7 +1069,8 @@ void SwXTextDocument::setPagePrintSettings(const Sequence< beans::PropertyValue
     if(IsValid())
     {
         SwPagePreViewPrtData aData;
-        //falls nur einige Properties kommen, dann die akt. Einstellungen benutzen
+        //if only a few properties are coming, then use the current settings
+falls nur einige Properties kommen, dann die akt. Einstellungen benutzen
         const SwPagePreViewPrtData* pData = pDocShell->GetDoc()->GetPreViewPrtData();
         if(pData)
             aData = *pData;
@@ -1213,7 +1213,7 @@ void SwXTextDocument::printPages(const Sequence< beans::PropertyValue >& xOption
         // #i117783#
         bApplyPagePrintSettingsFromXPagePrintable = sal_True;
         pFrame->GetViewShell()->ExecuteSlot(aReq);
-        // Frame schliessen
+        // Frame close
         pFrame->DoClose();
 
     }
@@ -1428,7 +1428,7 @@ void SwXTextDocument::Reactivate(SwDocShell* pNewDocShell)
 
 void    SwXTextDocument::InitNewDoc()
 {
-    // zunaechst alle Collections invalidieren, dann Referenzen loeschen und Null setzen
+    // first invalidate all collections, then delete references and Set to zero
     if(pxXTextTables)
     {
          XNameAccess* pTbls = pxXTextTables->get();
@@ -1717,7 +1717,7 @@ Reference< XInterface >  SwXTextDocument::createInstance(const OUString& rServic
                 {
                     aTmpServiceName = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.OLE2Shape"));
                 }
-                //hier den Draw - Service suchen
+                //here search for the draw service
                 Reference< XInterface >  xTmp = SvxFmMSFactory::createInstance(aTmpServiceName);
                 if(bShape)
                 {
@@ -1744,8 +1744,8 @@ Reference< XInterface >  SwXTextDocument::createInstanceWithArguments(
         throw( Exception, RuntimeException )
 {
     Reference< XInterface >  xInt = createInstance(ServiceSpecifier);
-    //die Any-Sequence dient zur Initialisierung von Objekten, die auf
-    //Parameter zwingend angewiesen sind - bis jetzt haben wir das nicht
+    // The Any-Sequence is for initializing objects that are dependent
+    // on parameters necessarily - so far we have not.
     return xInt;
 }
 
@@ -3137,9 +3137,9 @@ void SAL_CALL SwXTextDocument::operator delete( void * p) throw()
     SwXTextDocumentBaseClass::operator delete(p);
 }
 
-/*---------------------------------------------------
-retrieve languages already used in current document
------------------------------------------------------*/
+/**
+ * retrieve languages already used in current document
+ */
 uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages(
         ::sal_Int16 nScriptTypes,
         ::sal_Int16 nMaxCount )
diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx
index 8bb9b5f..00c06be 100644
--- a/sw/source/ui/uno/unotxvw.cxx
+++ b/sw/source/ui/uno/unotxvw.cxx
@@ -87,10 +87,6 @@ using comphelper::HelperBaseNoState;
 
 using ::rtl::OUString;
 
-
-/******************************************************************
- * SwXTextView
- ******************************************************************/
 SwXTextView::SwXTextView(SwView* pSwView) :
     SfxBaseController(pSwView),
     m_SelChangedListeners(m_aMutex),
@@ -335,7 +331,7 @@ uno::Any SwXTextView::getSelection(void) throw( uno::RuntimeException )
     {
         //force immediat shell update
         m_pView->StopShellTimer();
-        // ein interface aus der aktuellen Selektion erzeugen
+        //Generating an interface from the current selection.
         SwWrtShell& rSh = m_pView->GetWrtShell();
         ShellModes  eSelMode = m_pView->GetShellMode();
         switch(eSelMode)
@@ -344,7 +340,7 @@ uno::Any SwXTextView::getSelection(void) throw( uno::RuntimeException )
             {
                 if(rSh.GetTableCrsr())
                 {
-                    OSL_ENSURE(rSh.GetTableFmt(), "kein Tabellenformat?");
+                    OSL_ENSURE(rSh.GetTableFmt(), "not a table format?");
                     uno::Reference< text::XTextTableCursor >  xCrsr = new SwXTextTableCursor(*rSh.GetTableFmt(),
                                                     rSh.GetTableCrsr());
                     aRef = uno::Reference< uno::XInterface >  (xCrsr, uno::UNO_QUERY);
@@ -352,7 +348,7 @@ uno::Any SwXTextView::getSelection(void) throw( uno::RuntimeException )
                 }
 
             }
-            // ohne Tabellenselektion wird der Text geliefert
+            //Without a table selection the text will be delivered.
             //break;
             case SHELL_MODE_LIST_TEXT       :
             case SHELL_MODE_TABLE_LIST_TEXT:
@@ -366,12 +362,12 @@ uno::Any SwXTextView::getSelection(void) throw( uno::RuntimeException )
             case SHELL_MODE_GRAPHIC         :
             case SHELL_MODE_OBJECT          :
             {
-                //Get FlyFrameFormat; fuer UI Macro Anbindung an Flys
+                //Get FlyFrameFormat; for UI-Macro connection to flys
                 const SwFrmFmt* pFmt = rSh.GetFlyFrmFmt();
                 if (pFmt)
                 {
                     SwXFrame* pxFrame = SwIterator<SwXFrame,SwFmt>::FirstElement(*pFmt);
-                    if(pxFrame)                //das einzige gemeinsame interface fuer alle Frames
+                    if(pxFrame)                //The only common interface for all frames.
                     {
                         aRef = uno::Reference< uno::XInterface >((cppu::OWeakObject*)pxFrame, uno::UNO_QUERY);
                     }
@@ -668,7 +664,7 @@ SfxObjectShellLock SwXTextView::BuildTmpSelectionDoc()
     rOldSh.FillPrtDoc(pTempDoc,  pPrt);
     SfxViewFrame* pDocFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 );
     SwView* pDocView = (SwView*) pDocFrame->GetViewShell();
-    pDocView->AttrChangedNotify( &pDocView->GetWrtShell() );//Damit SelectShell gerufen wird.
+    pDocView->AttrChangedNotify( &pDocView->GetWrtShell() );//So that SelectShell is called.
     SwWrtShell* pSh = pDocView->GetWrtShellPtr();
 
     IDocumentDeviceAccess* pIDDA = pSh->getIDocumentDeviceAccess();
@@ -872,9 +868,6 @@ Sequence< OUString > SwXTextView::getSupportedServiceNames(void) throw( RuntimeE
     return aRet;
 }
 
-/******************************************************************
- * SwXTextViewCursor
- ******************************************************************/
 SwXTextViewCursor::SwXTextViewCursor(SwView* pVw) :
     m_pView(pVw),
     m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_CURSOR))
@@ -1130,7 +1123,7 @@ void SwXTextViewCursor::gotoRange(
         }
         const SwStartNode* pTmp = pSrcNode ? pSrcNode->FindSttNodeByType(eSearchNodeType) : 0;
 
-        //SectionNodes ueberspringen
+        //Skip SectionNodes
         while(pTmp && pTmp->IsSectionNode())
         {
             pTmp = pTmp->StartOfSectionNode();
@@ -1139,8 +1132,8 @@ void SwXTextViewCursor::gotoRange(
         {
             pOwnStartNode = pOwnStartNode->StartOfSectionNode();
         }
-        //ohne Expand darf mit dem ViewCursor ueberall hingesprungen werden
-        //mit Expand nur in der gleichen Umgebung
+        //Without Expand it is allowed to jump out with the ViewCursor everywhere,
+        //with Expand only in the same environment
         if(bExpand &&
             (pOwnStartNode != pTmp ||
             (eSelMode != SHELL_MODE_TABLE_TEXT &&
@@ -1149,16 +1142,16 @@ void SwXTextViewCursor::gotoRange(
                 eSelMode != SHELL_MODE_TEXT)))
             throw uno::RuntimeException();
 
-        //jetzt muss die Selektion erweitert werden
+        //Now, the selection must be expanded.
         if(bExpand)
         {
-            // der Cursor soll alles einschliessen, was bisher von ihm und dem uebergebenen
-            // Range eingeschlossen wurde
+            // The cursor should include everything that has been included
+            // by him and the transfered Range.
             SwPosition aOwnLeft(*aOwnPaM.Start());
             SwPosition aOwnRight(*aOwnPaM.End());
             SwPosition* pParamLeft = rDestPam.Start();
             SwPosition* pParamRight = rDestPam.End();
-            // jetzt sind vier SwPositions da, zwei davon werden gebraucht, also welche?
+            // Now four SwPositions are there, two of them are needed, but which?
             if(aOwnRight > *pParamRight)
                 *aOwnPaM.GetPoint() = aOwnRight;
             else
@@ -1171,7 +1164,7 @@ void SwXTextViewCursor::gotoRange(
         }
         else
         {
-            //der Cursor soll dem uebergebenen Range entsprechen
+            //The cursor shall match the passed range.
             *aOwnPaM.GetPoint() = *rDestPam.GetPoint();
             if(rDestPam.HasMark())
             {


More information about the Libreoffice-commits mailing list