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


Hi,

if the ordering of several bf_svx/ includes is unimportant even more blank lines can be removed (first reorder #includes and then group similar #includes without spacing, hope it is clear what I mean...). Or should I just try to build after reordering? I'll take this file from the list if this question as answered.

This file contains some comments of the type

// #\d{6}# text

e.g.

// #012345# this is need to be able to blah...

I'm not sure if only the number tag is unimportant or the text isn't needed anymore as well.

The commit message is somewhat cryptic because of the 79 characters limit.

Christina
From a1c7fa7aa8b35f9372518fd994bed561475f2376 Mon Sep 17 00:00:00 2001
From: Christina Rossmanith <ChrRossmanith@web.de>
Date: Fri, 4 Feb 2011 20:42:06 +0100
Subject: [PATCH] rm double line spacing/dead code/empty comments, transl. comm. German->English

---
 binfilter/bf_sd/source/ui/unoidl/sd_unomodel.cxx |  119 ++++++----------------
 1 files changed, 33 insertions(+), 86 deletions(-)

diff --git a/binfilter/bf_sd/source/ui/unoidl/sd_unomodel.cxx 
b/binfilter/bf_sd/source/ui/unoidl/sd_unomodel.cxx
index 6d39d76..8ad5457 100644
--- a/binfilter/bf_sd/source/ui/unoidl/sd_unomodel.cxx
+++ b/binfilter/bf_sd/source/ui/unoidl/sd_unomodel.cxx
@@ -29,26 +29,15 @@
 #include <com/sun/star/lang/DisposedException.hpp>
 #include <com/sun/star/lang/ServiceNotRegisteredException.hpp>
 
-
-
 #include <rtl/uuid.h>
 #include <rtl/memory.h>
 
 #include <bf_svx/unofield.hxx>
-
-
-
-
 #include <bf_svx/UnoForbiddenCharsTable.hxx>
-
 #include <bf_svx/forbiddencharacterstable.hxx>
-
 #include <bf_svx/UnoNamespaceMap.hxx>
-
 #include <bf_svx/unoapi.hxx>
-
 #include <bf_svx/unofill.hxx>
-
 #include <bf_svx/svdorect.hxx>
 
 #include <toolkit/awt/vclxdevice.hxx>
@@ -57,13 +46,10 @@
 
 #include <bf_svx/unolingu.hxx>
 #include <bf_svx/svdpagv.hxx>
-
 #include <bf_svx/unoshape.hxx>
 #include <bf_svx/unonrule.hxx>
-
 // #99870# Support creation of GraphicObjectResolver and EmbeddedObjectResolver
 #include <bf_svx/xmleohlp.hxx>
-
 #include <bf_svx/xmlgrhlp.hxx>
 
 #include "bf_sd/docshell.hxx"
@@ -162,7 +148,7 @@ const sal_Int32 WID_MODEL_BASICLIBS = 8;
 
 const SfxItemPropertyMap* ImplGetDrawModelPropertyMap()
 {
-    // Achtung: Der erste Parameter MUSS sortiert vorliegen !!!
+    // Attention: the first parameter has to be sorted already !!!
     const static SfxItemPropertyMap aDrawModelPropertyMap_Impl[] =
     {
         { MAP_CHAR_LEN(sUNO_Prop_CharLocale),                  WID_MODEL_LANGUAGE,     
&::getCppuType((const lang::Locale*)0),         0,      0},
@@ -199,9 +185,7 @@ SdXImpressDocument::SdXImpressDocument( SdDrawDocShell* pShell ) throw()
     mbImpressDoc = pDoc && pDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS;
 }
 
-/***********************************************************************
-*                                                                      *
-***********************************************************************/
+
 SdXImpressDocument::~SdXImpressDocument() throw()
 {
 }
@@ -209,38 +193,6 @@ SdXImpressDocument::~SdXImpressDocument() throw()
 // uno helper
 
 
-/******************************************************************************
-* Erzeugt anhand der uebergebennen SdPage eine SdDrawPage. Wurde fuer diese   *
-* SdPage bereits eine SdDrawPage erzeugt, wird keine neue SdDrawPage erzeug.  *
-******************************************************************************/
-/*
-uno::Reference< drawing::XDrawPage >  SdXImpressDocument::CreateXDrawPage( SdPage* pPage ) throw()
-{
-    DBG_ASSERT(pPage,"SdXImpressDocument::CreateXDrawPage( NULL? )");
-
-    uno::Reference< drawing::XDrawPage >  xDrawPage;
-
-    if(pPage)
-    {
-        xDrawPage = SvxDrawPage::GetPageForSdrPage(pPage);
-
-        if(!xDrawPage.is())
-        {
-            if(pPage->IsMasterPage())
-            {
-                xDrawPage = (presentation::XPresentationPage*)new SdMasterPage( this, pPage );
-            }
-            else
-            {
-                xDrawPage = (SvxDrawPage*)new SdDrawPage( this, pPage );
-            }
-        }
-    }
-
-    return xDrawPage;
-}
-*/
-
 UNO3_GETIMPLEMENTATION_IMPL( SdXImpressDocument );
 
 // XInterface
@@ -332,9 +284,7 @@ uno::Sequence< sal_Int8 > SAL_CALL SdXImpressDocument::getImplementationId(  ) t
     return aId;
 }
 
-/***********************************************************************
-*                                                                      *
-***********************************************************************/
+
 void SdXImpressDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
 {
     if( pDoc )
@@ -376,15 +326,15 @@ void SdXImpressDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
         {
             const SfxSimpleHint* pSfxHint = PTR_CAST(SfxSimpleHint, &rHint );
 
-            // ist unser SdDrawDocument gerade gestorben?
+            // did our SdDrawDocument fade away?
             if(pSfxHint && pSfxHint->GetId() == SFX_HINT_DYING)
             {
-                // yup, also schnell ein neues erfragen
+                // yes -> get a new one
                 if( pDocShell )
                 {
                     SdDrawDocument *pNewDoc = pDocShell->GetDoc();
 
-                    // ist ueberhaupt ein neues da?
+                    // is there a new one at all?
                     if( pNewDoc != pDoc )
                     {
                         pDoc = pNewDoc;
@@ -398,9 +348,7 @@ void SdXImpressDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
     SfxBaseModel::Notify( rBC, rHint );
 }
 
-/******************************************************************************
-*                                                                             *
-******************************************************************************/
+
 SdPage* SdXImpressDocument::InsertSdPage( sal_uInt16 nPage, sal_Bool bDuplicate ) throw()
 {
     sal_uInt16 nPageCount = pDoc->GetSdPageCount( PK_STANDARD );
@@ -415,13 +363,13 @@ SdPage* SdXImpressDocument::InsertSdPage( sal_uInt16 nPage, sal_Bool 
bDuplicate
         // this is only used for clipboard where we only have one page
         pStandardPage = (SdPage*) pDoc->AllocPage(sal_False);
 
-        Size aDefSize(21000, 29700);   // A4-Hochformat
+        Size aDefSize(21000, 29700);   // A4 portrait
         pStandardPage->SetSize( aDefSize );
         pDoc->InsertPage(pStandardPage, 0);
     }
     else
     {
-        // Hier wird die Seite ermittelt, hinter der eingefuegt werden soll
+        // find page after which the next page will be inserted
         SdPage* pPreviousStandardPage = pDoc->GetSdPage( Min( (sal_uInt16)(nPageCount - 1), nPage 
), PK_STANDARD );
 
         sal_uInt16 nPos = 0;
@@ -430,9 +378,9 @@ SdPage* SdXImpressDocument::InsertSdPage( sal_uInt16 nPage, sal_Bool bDuplicate
         sal_Bool bIsPageObj = aVisibleLayers.IsSet( aBckgrndObj );
 
         /**************************************************************
-        * Es wird stets zuerst eine Standardseite und dann eine
-        * Notizseite erzeugt. Es ist sichergestellt, dass auf eine
-        * Standardseite stets die zugehoerige Notizseite folgt.
+        * Alway create a standard page first and then a page for memos.
+        * That guarantees that a standard page is always followed by
+        * a memo page.
         **************************************************************/
 
         sal_uInt16 nStandardPageNum = pPreviousStandardPage->GetPageNum() + 2;
@@ -442,7 +390,7 @@ SdPage* SdXImpressDocument::InsertSdPage( sal_uInt16 nPage, sal_Bool bDuplicate
         String aNotesPageName;
 
         /**************************************************************
-        * Standardseite
+        * standard page
         **************************************************************/
         if( bDuplicate )
             pStandardPage = (SdPage*) pPreviousStandardPage->Clone();
@@ -457,12 +405,12 @@ SdPage* SdXImpressDocument::InsertSdPage( sal_uInt16 nPage, sal_Bool 
bDuplicate
 
         pStandardPage->SetName(aStandardPageName);
 
-        // Seite hinter aktueller Seite einfuegen
+        // insert page after current page
         pDoc->InsertPage(pStandardPage, nStandardPageNum);
 
         if( !bDuplicate )
         {
-            // MasterPage der aktuellen Seite verwenden
+            // use MasterPage of current page
             sal_uInt16 nPgNum = pPreviousStandardPage->GetMasterPageNum(nPos=0);
             pStandardPage->InsertMasterPage(nPgNum);
             pStandardPage->SetLayoutName( pPreviousStandardPage->GetLayoutName() );
@@ -476,7 +424,7 @@ SdPage* SdXImpressDocument::InsertSdPage( sal_uInt16 nPage, sal_Bool bDuplicate
         pStandardPage->SetMasterPageVisibleLayers(aVisibleLayers, nPos=0);
 
         /**************************************************************
-        * Notizseite
+        * memo page
         **************************************************************/
         SdPage* pNotesPage = NULL;
 
@@ -493,12 +441,12 @@ SdPage* SdXImpressDocument::InsertSdPage( sal_uInt16 nPage, sal_Bool 
bDuplicate
         pNotesPage->SetName(aNotesPageName);
         pNotesPage->SetPageKind(PK_NOTES);
 
-        // Seite hinter aktueller Seite einfuegen
+        // insert page after current page
         pDoc->InsertPage(pNotesPage, nNotesPageNum);
 
         if( !bDuplicate )
         {
-            // MasterPage der aktuellen Seite verwenden
+            // use MasterPage of current page
             sal_uInt16 nPgNum = pPreviousNotesPage->GetMasterPageNum(nPos=0);
             pNotesPage->InsertMasterPage(nPgNum);
             pNotesPage->SetLayoutName( pPreviousNotesPage->GetLayoutName() );
@@ -638,7 +586,7 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdXImpressDocument::duplicate( con
     if( NULL == pDoc )
         throw lang::DisposedException();
 
-    // pPage von xPage besorgen und dann die Id (nPos )ermitteln
+    // get pPage from xPage and then the Id (nPos )
     SvxDrawPage* pSvxPage = SvxDrawPage::getImplementation( xPage );
     if( pSvxPage )
     {
@@ -1601,8 +1549,8 @@ sal_Bool SAL_CALL SdDrawPagesAccess::hasElements()
 // XDrawPages
 
 /******************************************************************************
-* Erzeugt eine neue Seite mit Model an der angegebennen Position und gibt die *
-* dazugehoerige SdDrawPage zurueck.                                           *
+* Creates a new page with model at the given position.
+* Returns the corresponding SdDrawPage.
 ******************************************************************************/
 uno::Reference< drawing::XDrawPage > SAL_CALL SdDrawPagesAccess::insertNewByIndex( sal_Int32 
nIndex )
     throw(uno::RuntimeException)
@@ -1626,9 +1574,9 @@ uno::Reference< drawing::XDrawPage > SAL_CALL 
SdDrawPagesAccess::insertNewByInde
 }
 
 /******************************************************************************
-* Entfernt die angegebenne SdDrawPage aus dem Model und aus der internen      *
-* Liste. Dies funktioniert nur, wenn mindestens eine *normale* Seite im Model *
-* nach dem entfernen dieser Seite vorhanden ist.                                                   
      *
+* Removes the given SdDrawPage from the Model and from the internal list.     *
+* This only works if there is still at least one normal page in the model
+* after removal.
 ******************************************************************************/
 void SAL_CALL SdDrawPagesAccess::remove( const uno::Reference< drawing::XDrawPage >& xPage )
         throw(uno::RuntimeException)
@@ -1641,20 +1589,20 @@ void SAL_CALL SdDrawPagesAccess::remove( const uno::Reference< 
drawing::XDrawPag
     sal_uInt16 nPageCount = rModel.pDoc->GetSdPageCount( PK_STANDARD );
     if( nPageCount > 1 )
     {
-        // pPage von xPage besorgen und dann die Id (nPos )ermitteln
+        // get pPage from xPage and then the Id (nPos )
         SdDrawPage* pSvxPage = SdDrawPage::getImplementation( xPage );
         if( pSvxPage )
         {
             SdPage* pPage = (SdPage*) pSvxPage->GetSdrPage();
             if(pPage)
             {
-                // Es duerfen nur Standardpages DIREKT geloescht werden
+                // only standard pages are allowed to be removed directly
                 if( pPage->GetPageKind() == PK_STANDARD )
                 {
                     sal_uInt16 nPage = pPage->GetPageNum();
                     rModel.pDoc->RemovePage( nPage );
 
-                    // Die darauffolgende Seite ist die dazugeoerige Notizseite
+                    // The following page is the corresponding memo page
                     rModel.pDoc->RemovePage( nPage );
                 }
             }
@@ -1713,8 +1661,8 @@ sal_Int32 SAL_CALL SdMasterPagesAccess::getCount()
 }
 
 /******************************************************************************
-* Liefert ein drawing::XDrawPage Interface fuer den Zugriff auf die Masterpage and der *
-* angegebennen Position im Model.                                             *
+* Returns a drawing::XDrawPage interface for accessing the master page at the *
+* given position in the model.
 ******************************************************************************/
 uno::Any SAL_CALL SdMasterPagesAccess::getByIndex( sal_Int32 Index )
     throw(lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException)
@@ -1842,7 +1790,6 @@ uno::Reference< drawing::XDrawPage > SAL_CALL 
SdMasterPagesAccess::insertNewByIn
                                 pRefNotesPage->GetRgtBorder(),
                                 pRefNotesPage->GetLwrBorder() );
         pDoc->InsertMasterPage(pMNotesPage,  nInsertPos + 1);
-//             pMNotesPage->InsertMasterPage( pMPage->GetPageNum() );
         pMNotesPage->SetLayoutName( aLayoutName );
         pMNotesPage->SetAutoLayout(AUTOLAYOUT_NOTES, sal_True, sal_True);
         rModel.SetModified();
@@ -1852,9 +1799,9 @@ uno::Reference< drawing::XDrawPage > SAL_CALL 
SdMasterPagesAccess::insertNewByIn
 }
 
 /******************************************************************************
-* Entfernt die angegebenne SdMasterPage aus dem Model und aus der internen    *
-* Liste. Dies funktioniert nur, wenn keine *normale* Seite im Model diese     *
-* Seite als Masterpage benutzt.                                               *
+* Removes the given SdMasterPage from the model and from the internal list.   *
+* This only works, if no normal page in the model uses this page as a master  *
+* page.
 ******************************************************************************/
 void SAL_CALL SdMasterPagesAccess::remove( const uno::Reference< drawing::XDrawPage >& xPage )
     throw(uno::RuntimeException)
@@ -1873,7 +1820,7 @@ void SAL_CALL SdMasterPagesAccess::remove( const uno::Reference< 
drawing::XDrawP
     DBG_ASSERT( pSdrPage->IsMasterPage(), "SdMasterPage is not masterpage?");
 
     if(rModel.pDoc->GetMasterPageUserCount(pSdrPage) > 0)
-        return; //Todo: hier fehlt eine uno::Exception
+        return; //Todo: a uno::Exception is missing here
 
     sal_uInt16 nCount = rModel.pDoc->GetMasterPageCount();
     for( sal_uInt16 nPgNum = 0; nPgNum < nCount; nPgNum++ )
-- 
1.7.0.4


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.