[Libreoffice-commits] .: 2 commits - sw/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Fri Feb 18 08:55:53 PST 2011
sw/source/ui/app/appenv.cxx | 41 ++++++++++++++++++++---------------------
sw/source/ui/app/apphdl.cxx | 34 +++++++++++++++++-----------------
sw/source/ui/app/applab.cxx | 43 +++++++++++++++++++++----------------------
3 files changed, 58 insertions(+), 60 deletions(-)
New commits:
commit 757ccff4c4790e5c27ce7f778df426a6172d3430
Author: Martin Kepplinger <martinkepplinger at eml.cc>
Date: Fri Feb 18 13:16:20 2011 +0100
Translate german comments
Translated the german comments to english an fixed minor coding
style issues in apphdl.cxx and applab.cxx
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 );
commit 4d16956b56badca69865d5b64def5d31c98f3322
Author: Martin Kepplinger <martinkepplinger at eml.cc>
Date: Fri Feb 18 12:13:24 2011 +0100
Translate german comments
Translated german comments in /writer/sw/source/ui/app/appenv.cxx to english.
This is my first patch to libreoffice.
diff --git a/sw/source/ui/app/appenv.cxx b/sw/source/ui/app/appenv.cxx
index cd5b46b..00621e1 100644
--- a/sw/source/ui/app/appenv.cxx
+++ b/sw/source/ui/app/appenv.cxx
@@ -171,15 +171,15 @@ void SwModule::InsertEnv( SfxRequest& rReq )
xDocSh->DoInitNew( 0 );
pFrame = SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 );
pNewView = (SwView*) pFrame->GetViewShell();
- pNewView->AttrChangedNotify( &pNewView->GetWrtShell() );//Damit SelectShell gerufen wird.
+ pNewView->AttrChangedNotify( &pNewView->GetWrtShell() ); // so that SelectShell is being called
pSh = pNewView->GetWrtShellPtr();
String aTmp( SW_RES(STR_ENV_TITLE) );
aTmp += String::CreateFromInt32( ++nTitleNo );
xDocSh->SetTitle( aTmp );
- // Ggf. alte Collections "Absender" und "Empfaenger" in neues
- // Dokument kopieren
+ // if applicable, copy the old Collections "Sender" and "Reciever" to
+ // a new document
if ( pOldSh )
{
::lcl_CopyCollAttr(pOldSh, pSh, RES_POOLCOLL_JAKETADRESS);
@@ -245,10 +245,10 @@ void SwModule::InsertEnv( SfxRequest& rReq )
aEnvCfg.GetItem() = rItem;
aEnvCfg.Commit();
- //Wenn wir Drucken uebernehmen wir den eingestellten Jobsetup aus
- //dem Dialog. Die Informationen muessen hier vor dem evtl. zerstoeren
- //der neuen Shell gesetzt werden, weil deren Drucker an den Dialog
- //gereicht wurde.
+ // When we print we take the Jobsetup that is set up in the dialog.
+ // Information has to be set here, before a possible destruction of
+ // the new shell because the shell's printer has been handed to the
+ // dialog.
if ( nMode != ENV_NEWDOC )
{
OSL_ENSURE(pOldSh, "No document - wasn't 'Insert' disabled???");
@@ -282,7 +282,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
if (bEnvChange)
{
- // Folgevorlage: Seite 2
+ // followup template: page 2
pFollow = pSh->GetPageDesc(pSh->GetCurPageDesc()).GetFollow();
// Delete text from the first page
@@ -303,7 +303,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
pSh->SttEndDoc(TRUE);
}
else
- // Folgevorlage: Seite 1
+ // Followup template: page 1
pFollow = &pSh->GetPageDesc(pSh->GetCurPageDesc());
// Insert page break
@@ -322,12 +322,12 @@ void SwModule::InsertEnv( SfxRequest& rReq )
else
{
pFollow = &pSh->GetPageDesc(pSh->GetCurPageDesc());
- // Los geht's (Drucken)
+ // Let's go (print)
pSh->StartAllAction();
pSh->DoUndo(FALSE);
- // Neue Collections "Absender" und "Empfaenger" wieder in neues
- // Dokument kopieren
+ // Again, copy the new collections "Sender" and "Reciever" to
+ // a new document
if ( pOldSh )
{
::lcl_CopyCollAttr(pOldSh, pSh, RES_POOLCOLL_JAKETADRESS);
@@ -338,7 +338,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
SET_CURR_SHELL(pSh);
pSh->SetNewDoc(); // Avoid performance problems
- // Flys dieser Seite merken
+ // Remember Flys of this site
SvPtrarr aFlyArr(0, 5);
if( ENV_NEWDOC != nMode && !bEnvChange )
pSh->GetPageObjs( aFlyArr );
@@ -349,8 +349,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
Printer *pPrt = pSh->getIDocumentDeviceAccess()->getPrinter( true );
- // Raender (setzen sich zusammen aus Shift-Offset und
- // Ausrichtung)
+ // Borders (are put together by Shift-Offset and alignment)
Size aPaperSize = pPrt->PixelToLogic( pPrt->GetPaperSizePixel(),
MAP_TWIP);
if ( !aPaperSize.Width() && !aPaperSize.Height() )
@@ -404,7 +403,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
aType.SetNumberingType(SVX_NUM_NUMBER_NONE);
pDesc->SetNumType(aType);
- // Folgevorlage
+ // Followup template
if (pFollow)
pDesc->SetFollow(pFollow);
@@ -423,12 +422,12 @@ void SwModule::InsertEnv( SfxRequest& rReq )
pSh->ChgPageDesc( nPos, *pDesc);
pSh->ChgCurPageDesc(*pDesc);
- // Rahmen einfuegen
+ // Insert Frame
SwFlyFrmAttrMgr aMgr(FALSE, pSh, FRMMGR_TYPE_ENVELP);
SwFldMgr aFldMgr;
aMgr.SetHeightSizeType(ATT_VAR_SIZE);
- //Defaults ueberschreiben!
+ // Overwrite defaults!
aMgr.GetAttrSet().Put( SvxBoxItem(RES_BOX) );
aMgr.SetULSpace( 0L, 0L );
aMgr.SetLRSpace( 0L, 0L );
@@ -463,7 +462,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
pSh->SetTxtFmtColl( pAddr );
InsertLabEnvText(*pSh, aFldMgr, rItem.aAddrText);
- // Flys auf die "alten" Seiten verschieben
+ // Move Flys to the "old" pages
if (aFlyArr.Count())
pSh->SetPageObjsNewPage(aFlyArr, 1);
@@ -492,7 +491,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
};
pFrame->GetBindings().Invalidate( aInva );
- // Datenbankbeamer oeffnen
+ // Open database beamer
ShowDBObj(*pNewView, pSh->GetDBData());
}
}
@@ -506,7 +505,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
rReq.Done();
}
- else //Abbruch
+ else // Abort
{
rReq.Ignore();
More information about the Libreoffice-commits
mailing list