-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
this is my first patch, so I don't really what the procedure is.
If it's alright, can I push it?
Alex
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJQG4uSAAoJECO1/tAiWGrN9jMIANQHHqLUF6DSaLJ5S/jiqBip
h2M2r44uWcI2hfqu2/cywKnq9XaRra2V97gLcBbGSTPCt7rq5x3W4cfSX0h+JV3M
eYCdcU5500H16piMLtdxZOhIlvURT6e5Ly0ez7xGMGd7usl0MHyAXcVF4j46RgT8
EJpnzi134RF7LvhZkt2oP3cL7a1e7dvsYTdD5aInvwV5OjBkDQtiwLxjOw1YfDNk
kLPIWOX0m9ZbQzYR799xMwSxWuV6mBfF2S1VdvSmNtUq0WJiIilhiC042JyBwLg8
GwVrnO6w4I2bgNoUXWLpCbmg3WhHBFWZTPfNE1D84iEqxeYgjYvFs19Ad+Qk0AU=
=Ih9p
-----END PGP SIGNATURE-----
From 6f9f4e770cc4c63071fa128a56c12b3fe3b3c46f Mon Sep 17 00:00:00 2001
From: Alexander Wilms <alexander.wilms@zoho.com>
Date: Fri, 3 Aug 2012 10:22:14 +0200
Subject: [PATCH] Translated German comments in starmath
---
starmath/source/accessibility.cxx | 6 +-
starmath/source/config.cxx | 4 +-
starmath/source/dialog.cxx | 136 ++++++++++++++++++-------------------
starmath/source/document.cxx | 26 ++++---
starmath/source/edit.cxx | 15 ++--
starmath/source/node.cxx | 123 ++++++++++++++++-----------------
6 files changed, 150 insertions(+), 160 deletions(-)
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index a7b39bc..a8d1b31 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -572,12 +572,12 @@ sal_Int32 SAL_CALL SmGraphicAccessible::getIndexAtPoint( const awt::Point&
aPoin
if (pWin)
{
const SmNode *pTree = pWin->GetView()->GetDoc()->GetFormulaTree();
- //! kann NULL sein! ZB wenn bereits beim laden des Dokuments (bevor der
- //! Parser angeworfen wurde) ins Fenster geklickt wird.
+ //! can be NULL! e.g. if already during the loading of the document (before the parser
even started)
+ //! one clicks within the window
if (!pTree)
return nRes;
- // get position relativ to formula draw position
+ // get position relative to formula draw position
Point aPos( aPoint.X, aPoint.Y );
aPos = pWin->PixelToLogic( aPos );
aPos -= pWin->GetFormulaDrawPos();
diff --git a/starmath/source/config.cxx b/starmath/source/config.cxx
index 533dd8c..ac1cebe 100644
--- a/starmath/source/config.cxx
+++ b/starmath/source/config.cxx
@@ -82,8 +82,8 @@ void SmConfig::ItemSetToConfig(const SfxItemSet &rSet)
{
SetIgnoreSpacesRight( bVal );
- // (angezeigte) Formeln muessen entsprechen neu formatiert werden.
- // Das erreichen wir mit:
+ // (displayed) formulas have to be reformatted accordingly
+ // That's how we achieve this:
Broadcast(SfxSimpleHint(HINT_FORMATCHANGED));
}
}
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 532ed8a..c72302a 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -55,8 +55,8 @@ using ::rtl::OUString;
////////////////////////////////////////
//
-// Da der FontStyle besser ueber die Attribute gesetzt/abgefragt wird als ueber
-// den StyleName bauen wir uns hier unsere eigene Uebersetzung
+// Since it's better to set/query the FontStyle via its attributes rather
+// than via the StyleName we create a way to translate
// Attribute <-> StyleName
//
@@ -135,8 +135,8 @@ const SmFontStyles & GetFontStyles()
void SetFontStyle(const XubString &rStyleName, Font &rFont)
{
- // finden des Index passend zum StyleName fuer den leeren StyleName wird
- // 0 (nicht bold nicht italic) angenommen.
+ // Finding of the Index fitting the StyleName. For an empty StyleName it's assumed to be
+ // 0 (neither bold nor italic).
sal_uInt16 nIndex = 0;
if (rStyleName.Len())
{
@@ -801,9 +801,8 @@ IMPL_LINK( SmDistanceDialog, CheckBoxClickHdl, CheckBox *, pCheckBox )
void SmDistanceDialog::SetHelpId(MetricField &rField, const rtl::OString& sHelpId)
{
- //! HelpID's die auf diese Weise explizit gesetzt werden, muessen im
- //! util Verzeichnis im File "hidother.src" mit Hilfe von "hidspecial"
- //! definiert werden!
+ //! HelpIDs which are being set explicitly this way have to be defined in the
+ //! util directory in the file "hidother.src" with the help of "hidspecial"!
const XubString aEmptyText;
#if OSL_DEBUG_LEVEL > 1
@@ -862,8 +861,8 @@ void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
SmCategoryDesc *pCat;
- // merken der (evtl neuen) Einstellungen der aktiven SmCategoryDesc
- // bevor zu der neuen gewechselt wird.
+ // remembering the (maybe new) settings of the active SmCategoryDesc
+ // before switching to the new one
if (nActiveCategory != CATEGORY_NONE)
{
pCat = Categories[nActiveCategory];
@@ -878,16 +877,16 @@ void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
aMenuButton.GetPopupMenu()->CheckItem(nActiveCategory + 1, false);
}
- // aktivieren/deaktivieren der zugehoerigen Controls in Abhaengigkeit von der
- // gewaehlten Kategorie.
+ // activating/deactivating of the associated Controls depending on the
+ // chosen category
bool bActive;
for (sal_uInt16 i = 0; i < 4; i++)
{
FixedText *pFT = (FixedText * const) aWin[i][0];
MetricField *pMF = (MetricField * const) aWin[i][1];
- // Um feststellen welche Controls aktiv sein sollen wird das
- // vorhandensein einer zugehoerigen HelpID ueberprueft.
+ // To determine which Controls should be active the existence
+ // of an associated HelpID is being checked
bActive = aCatMf2Hid[nCategory][i] != 0;
pFT->Show(bActive);
@@ -895,7 +894,7 @@ void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
pMF->Show(bActive);
pMF->Enable(bActive);
- // setzen von Masseinheit und Anzahl der Nachkommastellen
+ // setting the measurement unit and the number of decimal places
FieldUnit eUnit;
sal_uInt16 nDigits;
if (nCategory < 9)
@@ -909,7 +908,7 @@ void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
eUnit = FUNIT_100TH_MM;
nDigits = 2;
}
- pMF->SetUnit(eUnit); //! veraendert den Wert
+ pMF->SetUnit(eUnit); //! changes the value
pMF->SetDecimalDigits(nDigits);
if (bActive)
@@ -924,8 +923,8 @@ void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
SetHelpId(*pMF, aCatMf2Hid[nCategory][i]);
}
}
- // nun noch die CheckBox und das zugehoerige MetricField genau dann aktivieren,
- // falls es sich um das Klammer Menu handelt.
+ // now activate the CheckBox and the associated MetricField if
+ // we're dealing with the brackets menu
bActive = nCategory == 5;
aCheckBox1.Show(bActive);
aCheckBox1.Enable(bActive);
@@ -1041,8 +1040,8 @@ void SmDistanceDialog::ReadFrom(const SmFormat &rFormat)
void SmDistanceDialog::WriteTo(SmFormat &rFormat) /*const*/
{
- // hmm... koennen die tatsaechlich unterschiedlich sein?
- // wenn nicht kann oben naemlich das const stehen!
+ // can they actually be different?
+ // if that's not the case 'const' could be used above!
SetCategory(nActiveCategory);
rFormat.SetDistance( DIS_HORIZONTAL, Categories[0]->GetValue(0) );
@@ -1171,7 +1170,7 @@ void SmShowSymbolSet::Paint(const Rectangle&)
{
Push(PUSH_MAPMODE);
- // MapUnit einstellen fuer die 'nLen' berechnet wurde
+ // setting the MapUnit for which the 'nLen' has been calculated
SetMapMode(MapMode(MAP_PIXEL));
sal_uInt16 v = sal::static_int_cast< sal_uInt16 >((aVScrollBar.GetThumbPos() *
nColumns));
@@ -1184,8 +1183,8 @@ void SmShowSymbolSet::Paint(const Rectangle&)
Font aFont (aSymbol.GetFace());
aFont.SetAlign(ALIGN_TOP);
- // etwas kleinere FontSize nehmen (als nLen) um etwas Luft zu haben
- // (hoffentlich auch genug fuer links und rechts!)
+ // taking a FontSize which is a bit smaller (compared to nLen) in order to have a buffer
+ // (hopefully enough for left and right, too!)
aFont.SetSize(Size(0, nLen - (nLen / 3)));
SetFont(aFont);
// keep text color
@@ -1282,7 +1281,7 @@ SmShowSymbolSet::SmShowSymbolSet(Window *pParent, const ResId& rResId) :
long nScrollBarWidth = aVScrollBar.GetSizePixel().Width(),
nUseableWidth = aOutputSize.Width() - nScrollBarWidth;
- // Hoehe von 16pt in Pixeln (passend zu 'aOutputSize')
+ // Height of 16pt in pixels (fitting 'aOutputSize')
nLen = (sal_uInt16) LogicToPixel(Size(0, 16), MapMode(MAP_POINT)).Height();
nColumns = sal::static_int_cast< sal_uInt16 >(nUseableWidth / nLen);
@@ -1294,7 +1293,7 @@ SmShowSymbolSet::SmShowSymbolSet(Window *pParent, const ResId& rResId) :
OSL_ENSURE(nRows > 0, "Sm : no rows");
#endif
- // genau passend machen
+ // make it fit exactly
aOutputSize.Width() = nColumns * nLen;
aOutputSize.Height() = nRows * nLen;
@@ -1397,9 +1396,8 @@ void SmShowSymbol::SetSymbol(const SmSym *pSymbol)
SetText( aText );
}
- // 'Invalidate' fuellt den background mit der background-Farbe.
- // Falls der NULL pointer uebergeben wurde reicht dies also zum loeschen
- // der Anzeige
+ // 'Invalidate' fills the background with the background color.
+ // If the NULL pointer has been passed that's already enough to clear the display
Invalidate();
}
@@ -1407,8 +1405,8 @@ void SmShowSymbol::SetSymbol(const SmSym *pSymbol)
////////////////////////////////////////////////////////////////////////////////
void SmSymbolDialog::FillSymbolSets(bool bDeleteText)
- // fuellt die Eintraege der moeglichen 'SymbolsSet's im Dialog mit den
- // aktuellen Werten des SymbolSet Managers, selektiert aber keinen.
+ // populate the entries of the possible SymbolsSets in the dialog with
+ // current values of the SymbolSet Managers, but select none
{
aSymbolSets.Clear();
if (bDeleteText)
@@ -1453,7 +1451,7 @@ IMPL_LINK( SmSymbolDialog, EditClickHdl, Button *, EMPTYARG pButton )
SmSymDefineDialog *pDialog = new SmSymDefineDialog(this, pFontListDev, rSymbolMgr);
- // aktuelles Symbol und SymbolSet am neuen Dialog setzen
+ // set current and SymbolSet for the new dialog
const XubString aSymSetName (aSymbolSets.GetSelectEntry()),
aSymName (aSymbolName.GetText());
pDialog->SelectOldSymbolSet(aSymSetName);
@@ -1461,20 +1459,20 @@ IMPL_LINK( SmSymbolDialog, EditClickHdl, Button *, EMPTYARG pButton )
pDialog->SelectSymbolSet(aSymSetName);
pDialog->SelectSymbol(aSymName);
- // altes SymbolSet merken
+ // remember old SymbolSet
XubString aOldSymbolSet (aSymbolSets.GetSelectEntry());
sal_uInt16 nSymPos = GetSelectedSymbol();
- // Dialog an evtl geaenderte Daten des SymbolSet Manager anpassen
+ // adapt dialog to data of the SymbolSet Manager, which might have changed
if (pDialog->Execute() == RET_OK && rSymbolMgr.IsModified())
{
rSymbolMgr.Save();
FillSymbolSets();
}
- // wenn das alte SymbolSet nicht mehr existiert zum ersten gehen
- // (soweit eines vorhanden ist)
+ // if the old SymbolSet doesn't exist go the the first one
+ // (if one exists)
if (!SelectSymbolSet(aOldSymbolSet) && aSymbolSets.GetEntryCount() > 0)
SelectSymbolSet(aSymbolSets.GetEntry(0));
else
@@ -1772,9 +1770,9 @@ void SmSymDefineDialog::FillFonts(bool bDelete)
if (bDelete)
aFonts.SetNoSelection();
- // alle Fonts der 'FontList' in die Fontliste aufnehmen
- // von denen mit gleichen Namen jedoch nur einen (denn der Style wird
- // ueber die 'FontStyleBox' gewaehlt und nicht auch noch hier)
+ // include all fonts of FontList into the font list
+ // but if there are duplicates only include one each, since
+ // the Style is already being chosen via the FontStyleBox
if (pFontList)
{
sal_uInt16 nCount = pFontList->GetFontNameCount();
@@ -1793,7 +1791,7 @@ void SmSymDefineDialog::FillStyles(bool bDeleteText)
XubString aText (aFonts.GetSelectEntry());
if (aText.Len() != 0)
{
- // eigene StyleName's verwenden
+ // use own StyleNames
const SmFontStyles &rStyles = GetFontStyles();
for (sal_uInt16 i = 0; i < rStyles.GetCount(); i++)
aStyles.InsertEntry( rStyles.GetStyleName(i) );
@@ -1840,7 +1838,7 @@ IMPL_LINK( SmSymDefineDialog, OldSymbolSetChangeHdl, ComboBox *, EMPTYARG
pCombo
IMPL_LINK( SmSymDefineDialog, ModifyHdl, ComboBox *, pComboBox )
{
- // merken der Cursorposition zum wiederherstellen derselben
+ // remembering the cursor position for restoring it
Selection aSelection (pComboBox->GetSelection());
if (pComboBox == &aSymbols)
@@ -1848,13 +1846,13 @@ IMPL_LINK( SmSymDefineDialog, ModifyHdl, ComboBox *, pComboBox )
else if (pComboBox == &aSymbolSets)
SelectSymbolSet(aSymbolSets, aSymbolSets.GetText(), false);
else if (pComboBox == &aOldSymbols)
- // nur Namen aus der Liste erlauben
+ // allow only names from the list
SelectSymbol(aOldSymbols, aOldSymbols.GetText(), true);
else if (pComboBox == &aOldSymbolSets)
- // nur Namen aus der Liste erlauben
+ // allow only names from the list
SelectSymbolSet(aOldSymbolSets, aOldSymbolSets.GetText(), true);
else if (pComboBox == &aStyles)
- // nur Namen aus der Liste erlauben (ist hier eh immer der Fall)
+ // allow only names from the list (that's the case here anyway)
SelectStyle(aStyles.GetText(), true);
else
{
@@ -2053,8 +2051,8 @@ void SmSymDefineDialog::UpdateButtons()
if (aTmpSymbolName.Len() > 0 && aTmpSymbolSetName.Len() > 0)
{
- // alle Einstellungen gleich?
- //! (Font-, Style- und SymbolSet Name werden nicht case sensitiv verglichen)
+ // all settings equal?
+ //! (Font-, Style- und SymbolSet Name comparison isn't case sensitive)
bool bEqual = pOrigSymbol
&& aTmpSymbolSetName.EqualsIgnoreCaseAscii(aOldSymbolSetName.GetText())
&& aTmpSymbolName.Equals(pOrigSymbol->GetName())
@@ -2064,13 +2062,13 @@ void SmSymDefineDialog::UpdateButtons()
GetFontStyles().GetStyleName(pOrigSymbol->GetFace()))
&& aCharsetDisplay.GetSelectCharacter() == pOrigSymbol->GetCharacter();
- // hinzufuegen nur wenn es noch kein Symbol desgleichen Namens gibt
+ // only add it if there isn't already a symbol with the same name
bAdd = aSymbolMgrCopy.GetSymbolByName(aTmpSymbolName) == NULL;
- // loeschen nur wenn alle Einstellungen gleich sind
+ // only delete it if all settings are equal
bDelete = pOrigSymbol != NULL;
- // aendern nur falls altes Symbol vorhanden und am neuen etwas anders ist
+ // only change it if the old symbol exists and the new one is different
bChange = pOrigSymbol && !bEqual;
}
@@ -2219,7 +2217,7 @@ short SmSymDefineDialog::Execute()
{
short nResult = ModalDialog::Execute();
- // Aenderungen uebernehmen falls Dialog mit OK beendet wurde
+ // apply changes if dialog was closed via clicking OK
if (aSymbolMgrCopy.IsModified() && nResult == RET_OK)
rSymbolMgr = aSymbolMgrCopy;
@@ -2231,8 +2229,8 @@ void SmSymDefineDialog::SetSymbolSetManager(const SmSymbolManager &rMgr)
{
aSymbolMgrCopy = rMgr;
- // Das modified Flag der Kopie auf false setzen, damit man spaeter damit
- // testen kann ob sich was geaendert hat.
+ // Set the modified Flag of the copy to false, so that later on we can
+ // check if anything has changed
aSymbolMgrCopy.SetModified(false);
FillSymbolSets(aOldSymbolSets);
@@ -2260,11 +2258,11 @@ bool SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
"Sm : wrong ComboBox");
#endif
- // 'Normalisieren' des SymbolNamens (ohne leading und trailing Leerzeichen)
+ // 'Normalising' of the SymbolName (without leading and trailing blanks)
XubString aNormName (rSymbolSetName);
aNormName = comphelper::string::stripStart(aNormName, ' ');
aNormName = comphelper::string::stripEnd(aNormName, ' ');
- // und evtl Abweichungen in der Eingabe beseitigen
+ // and remove possible deviations within the input
rComboBox.SetText(aNormName);
bool bRet = false;
@@ -2280,17 +2278,16 @@ bool SmSymDefineDialog::SelectSymbolSet(ComboBox &rComboBox,
bool bIsOld = &rComboBox == &aOldSymbolSets;
- // setzen des SymbolSet Namens an der zugehoerigen Darstellung
+ // setting the SymbolSet name at the associated display
FixedText &rFT = bIsOld ? aOldSymbolSetName : aSymbolSetName;
rFT.SetText(rComboBox.GetText());
- // setzen der zum SymbolSet gehoerenden Symbol Namen an der zugehoerigen
- // Auswahbox
+ // setting the Symbol name which belongs to the SymbolSet at the associated
+ // combobox
ComboBox &rCB = bIsOld ? aOldSymbols : aSymbols;
FillSymbols(rCB, false);
- // bei Wechsel des SymbolSets fuer das alte Zeichen ein gueltiges
- // Symbol bzw keins zur Anzeige bringen
+ // display a valid respectively no symbol when changing the SymbolSets
if (bIsOld)
{
XubString aTmpOldSymbolName;
@@ -2324,7 +2321,7 @@ void SmSymDefineDialog::SetOrigSymbol(const SmSym *pSymbol,
aOldSymbolDisplay.SetSymbol( pSymbol );
}
else
- { // loeschen des angezeigten Symbols
+ { // deleting the displayed Symbols
aOldSymbolDisplay.SetText(rtl::OUString());
aOldSymbolDisplay.Invalidate();
}
@@ -2341,9 +2338,9 @@ bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
"Sm : wrong ComboBox");
#endif
- // 'Normalisieren' des SymbolNamens (ohne Leerzeichen)
+ // 'Normalising' the SymbolName (without blanks)
XubString aNormName(comphelper::string::remove(rSymbolName, ' '));
- // und evtl Abweichungen in der Eingabe beseitigen
+ // and remove possible deviations within the input
rComboBox.SetText(aNormName);
bool bRet = false;
@@ -2360,19 +2357,18 @@ bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
const SmSym *pSymbol = GetSymbol(aSymbols);
if (pSymbol)
{
- // Font und Style entsprechend waehlen
+ // choose Font and Style accordingly
const Font &rFont = pSymbol->GetFace();
SelectFont(rFont.GetName(), false);
SelectStyle(GetFontStyles().GetStyleName(rFont), false);
- // da das setzen des Fonts ueber den Style Namen des SymbolsFonts nicht
- // so gut klappt (er kann zB leer sein obwohl der Font selbst 'bold' und
- // 'italic' ist!). Setzen wir hier den Font wie er zum Symbol gehoert
- // zu Fuss.
+ // since setting the Font via the Stlye name of the SymbolFonts doesn't
+ // work really well ( e.g. it can be empty even though the font itself is
+ // bold or italic) we're manually setting the Font as it belongs to the Symbol
aCharsetDisplay.SetFont(rFont);
aSymbolDisplay.SetFont(rFont);
- // das zugehoerige Zeichen auswaehlen
+ // selecting the associated character
SelectChar(pSymbol->GetCharacter());
// since SelectChar will also set the unicode point as text in the
@@ -2388,7 +2384,7 @@ bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
if (bIsOld)
{
- // bei Wechsel des alten Symbols nur vorhandene anzeigen sonst keins
+ // if there's a change of the old symbol show only the available ones, otherwise show none
const SmSym *pOldSymbol = NULL;
XubString aTmpOldSymbolSetName;
if (nPos != COMBOBOX_ENTRY_NOTFOUND)
@@ -2409,7 +2405,7 @@ bool SmSymDefineDialog::SelectSymbol(ComboBox &rComboBox,
void SmSymDefineDialog::SetFont(const XubString &rFontName, const XubString &rStyleName)
{
- // Font (FontInfo) passend zu Namen und Style holen
+ // get Font (FontInfo) fitting the Name and Style
FontInfo aFI;
if (pFontList)
aFI = pFontList->Get(rFontName, WEIGHT_NORMAL, ITALIC_NONE);
@@ -2476,8 +2472,8 @@ bool SmSymDefineDialog::SelectStyle(const XubString &rStyleName, bool
bApplyFont
bool bRet = false;
sal_uInt16 nPos = aStyles.GetEntryPos(rStyleName);
- // falls der Style nicht zur Auswahl steht nehmen wir den erst moeglichen
- // (sofern vorhanden)
+ // if the Style isn't available we take the next one available
+ // (if it exists)
if (nPos == COMBOBOX_ENTRY_NOTFOUND && aStyles.GetEntryCount() > 0)
nPos = 0;
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 6cc719e..3319de6 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -261,8 +261,8 @@ void SmDocShell::ArrangeFormula()
if (IsFormulaArranged())
return;
- //! Nur f�r die Dauer der Existenz dieses Objekts sind am Drucker die
- //! richtigen Einstellungen garantiert.
+ //! Only for the duration of the existence of this object the correct settings
+ //! at the printer are guaranteed
SmPrinterAccess aPrtAcc(*this);
OutputDevice* pOutDev = aPrtAcc.GetRefDev();
@@ -273,7 +273,7 @@ void SmDocShell::ArrangeFormula()
#endif
}
- // falls n�tig ein anderes OutputDevice holen f�r das formatiert wird
+ // if neccessary get another OutputDevice for which we format
if (!pOutDev)
{
SmViewShell *pView = SmGetActiveView();
@@ -431,12 +431,11 @@ void SmDocShell::DrawFormula(OutputDevice &rDev, Point &rPosition, bool
bDrawSel
if (!IsFormulaArranged())
ArrangeFormula();
- //Problem: Was passiert mit dem WYSIWYG? Wir haben waehrend wir inplace aktiv
- //sind kein Referenzdevice und sind auch nicht darauf ausgerichtet. Es kann
- //also jetzt eine Differenz zwischen der VisArea (spricht die Groesse im Client)
- //und der jetzt vorliegenden Groese geben.
- //Idee: Die Differenz koennte, zumindest behelfsmaessig, mit SmNod::SetSize
- //angepasst werden.
+ // Problem: What happens to the WYSIWYG? While we're active inplace we don't
+ // have a reference device and aren't aligned to that either. So now there can
+ // be a difference between the VisArea (i.e. the size within the client) and
+ // the current size
+ // Idea: The difference could be adapted with SmNod::SetSize (no long-term solution)
rPosition.X() += aFormat.GetDistance( DIS_LEFTSPACE );
rPosition.Y() += aFormat.GetDistance( DIS_TOPSPACE );
@@ -594,11 +593,10 @@ Printer* SmDocShell::GetPrt()
if ( SFX_CREATE_MODE_EMBEDDED == GetCreateMode() )
{
- //Normalerweise wird der Printer vom Server besorgt. Wenn dieser aber
- //keinen liefert (weil etwa noch keine connection da ist), kann es
- //dennoch sein, dass wir den Printer kennen, denn dieser wird in
- //OnDocumentPrinterChanged vom Server durchgereicht und dann temporaer
- //festgehalten.
+ //Normally the server provides the printer. But if it doesn't provide one
+ //(e.g. because there's no connection) it can still be the case that we
+ //know the printer, since it is being passed in OnDocumentPrinterChanged by the server
+ //and being kept temporarily
Printer *pPrt = GetDocumentPrinter();
if ( !pPrt && pTmpPrinter )
pPrt = pTmpPrinter;
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index e955d6f..6b97f07 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -432,7 +432,7 @@ void SmEditWindow::KeyInput(const KeyEvent& rKEvt)
SmViewShell *pView = GetView();
if ( pView && !pView->KeyInput(rKEvt) )
{
- /* fuert bei F1 (Hilfe) zum Zerstoeren von this! */
+ /* F1 (help) leads to the destruction of this */
Flush();
if ( aModifyTimer.IsActive() )
aModifyTimer.Stop();
@@ -440,8 +440,8 @@ void SmEditWindow::KeyInput(const KeyEvent& rKEvt)
}
else
{
- //SFX hat evtl. Slot an der View gecallt und dabei (wg. Hack
- //im SFX) den Focus auf die View gesetzt
+ //SFX has maybe called a slot to the view and thus (because of a hack
+ //in SFX) set the focus to the view
SfxViewShell* pVShell = GetView();
if ( pVShell && pVShell->ISA(SmViewShell) &&
((SmViewShell*)pVShell)->GetGraphicWindow().HasFocus() )
@@ -562,7 +562,7 @@ Rectangle SmEditWindow::AdjustScrollBars()
void SmEditWindow::SetScrollBarRanges()
{
- // Extra-Methode, nicht InitScrollBars, da auch fuer EditEngine-Events.
+ // Extra method, not InitScrollBars, since it's also being used for EditEngine-Events
EditEngine *pEditEngine = GetEditEngine();
if (pVScrollBar && pHScrollBar && pEditEngine && pEditView)
{
@@ -623,8 +623,7 @@ void SmEditWindow::SetText(const XubString& rText)
pEditEngine->SetText(rText);
pEditEngine->ClearModifyFlag();
- //! Hier die Timer neu zu starten verhindert, dass die Handler fuer andere
- //! (im Augenblick nicht mehr aktive) Math Tasks aufgerufen werden.
+ //! Restarting the timer here prevents calling the Handlers for other (atm inactive) math
Tasks
aModifyTimer.Start();
pEditView->SetSelection(eSelection);
@@ -712,8 +711,8 @@ void SmEditWindow::InsertCommand(sal_uInt16 nCommand)
OSL_ENSURE( pEditView, "EditView missing" );
if (pEditView)
{
- //Anfang der Selektion merken und hinterher den Cursor daraufsetzen. Nur so
- //macht das SelNextMark() Sinn.
+ //remember start of the selection and move the cursor there afterwards.
+ //Only this way the SelNextMark() makes sense
ESelection aSelection = pEditView->GetSelection();
aSelection.nEndPos = aSelection.nStartPos;
aSelection.nEndPara = aSelection.nStartPara;
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index be17a98..0efc1a6 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -901,8 +901,8 @@ void SmLineNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell)
{
SmNode::Prepare(rFormat, rDocShell);
- //! wir verwenden hier den 'FNT_VARIABLE' Font, da er vom Ascent und Descent
- //! ia besser zum Rest der Formel passt als der 'FNT_MATH' Font.
+ //! here we use the 'FNT_VARIABLE' font, since it's Ascend and Descend ia
+ //! rather fits to the rest of the formula compared to the 'FNT_MATH' Font
GetFont() = rFormat.GetFont(FNT_VARIABLE);
Flags() |= FLG_FONT;
}
@@ -1235,8 +1235,7 @@ SmNode * SmBinVerNode::GetLeftMost()
double Det(const Point &rHeading1, const Point &rHeading2)
- // gibt den Wert der durch die beiden Punkte gebildeten Determinante
- // zurueck
+ // return the value of the determinant formed by the two points
{
return rHeading1.X() * rHeading2.Y() - rHeading1.Y() * rHeading2.X();
}
@@ -1244,8 +1243,8 @@ double Det(const Point &rHeading1, const Point &rHeading2)
bool IsPointInLine(const Point &rPoint1,
const Point &rPoint2, const Point &rHeading2)
- // ergibt true genau dann, wenn der Punkt 'rPoint1' zu der Gerade gehoert die
- // durch den Punkt 'rPoint2' geht und den Richtungsvektor 'rHeading2' hat
+ // is precisely true if the point 'rPoint1' belongs to the straight line
+ // which crosses 'rPoint2' and has the direction vector 'rHeading2'
{
OSL_ENSURE(rHeading2 != Point(), "Sm : 0 vector");
@@ -1278,7 +1277,7 @@ sal_uInt16 GetLineIntersectionPoint(Point &rResult,
sal_uInt16 nRes = 1;
const double eps = 5.0 * DBL_EPSILON;
- // sind die Richtumgsvektoren linear abhaengig ?
+ // are the direction vectors linearly dependent?
double fDet = Det(rHeading1, rHeading2);
if (fabs(fDet) < eps)
{
@@ -1287,8 +1286,8 @@ sal_uInt16 GetLineIntersectionPoint(Point &rResult,
}
else
{
- // hier achten wir nicht auf Rechengenauigkeit
- // (das wuerde aufwendiger und lohnt sich hier kaum)
+ // here we do not pay attention to the computational accurancy
+ // (that'd be more complicated and isn't really worth it in this case)
double fLambda = ( (rPoint1.Y() - rPoint2.Y()) * rHeading2.X()
- (rPoint1.X() - rPoint2.X()) * rHeading2.Y())
/ fDet;
@@ -1311,9 +1310,9 @@ SmBinDiagonalNode::SmBinDiagonalNode(const SmToken &rNodeToken)
void SmBinDiagonalNode::GetOperPosSize(Point &rPos, Size &rSize,
const Point &rDiagPoint, double fAngleDeg) const
- // gibt die Position und Groesse fuer den Diagonalstrich zurueck.
- // Vor.: das SmRect des Nodes gibt die Begrenzung vor(!), muss also selbst
- // bereits bekannt sein.
+ // returns the position and size of the diagonal line
+ // premise: the SmRect of the Nodes defines the limitation(!), therefore
+ // it has to be known already
{
const double fPi = 3.1415926535897932384626433;
@@ -1327,19 +1326,19 @@ void SmBinDiagonalNode::GetOperPosSize(Point &rPos, Size &rSize,
aDiagHdg ( (long)(100.0 * cos(fAngleRad)),
(long)(-100.0 * sin(fAngleRad)) );
- long nLeft, nRight, nTop, nBottom; // Raender des Rechtecks fuer die
- // Diagonale
+ long nLeft, nRight, nTop, nBottom; // margins of the rectangle for the
+ // diagonal
Point aPoint;
if (IsAscending())
{
//
- // obere rechte Ecke bestimmen
+ // determine top right corner
//
GetLineIntersectionPoint(aPoint,
Point(nRectLeft, nRectTop), aRightHdg,
rDiagPoint, aDiagHdg);
//
- // gibt es einen Schnittpunkt mit dem oberen Rand ?
+ // is there a point of intersection with the top border?
if (aPoint.X() <= nRectRight)
{
nRight = aPoint.X();
@@ -1347,7 +1346,7 @@ void SmBinDiagonalNode::GetOperPosSize(Point &rPos, Size &rSize,
}
else
{
- // es muss einen Schnittpunkt mit dem rechten Rand geben!
+ // there has to be a point of intersection with the right border!
GetLineIntersectionPoint(aPoint,
Point(nRectRight, nRectTop), aDownHdg,
rDiagPoint, aDiagHdg);
@@ -1357,13 +1356,13 @@ void SmBinDiagonalNode::GetOperPosSize(Point &rPos, Size &rSize,
}
//
- // untere linke Ecke bestimmen
+ // determine bottom left corner
//
GetLineIntersectionPoint(aPoint,
Point(nRectLeft, nRectBottom), aRightHdg,
rDiagPoint, aDiagHdg);
//
- // gibt es einen Schnittpunkt mit dem unteren Rand ?
+ // is there a point of intersection with the bottom border?
if (aPoint.X() >= nRectLeft)
{
nLeft = aPoint.X();
@@ -1371,7 +1370,7 @@ void SmBinDiagonalNode::GetOperPosSize(Point &rPos, Size &rSize,
}
else
{
- // es muss einen Schnittpunkt mit dem linken Rand geben!
+ // there has to be a point of intersection with the left border!
GetLineIntersectionPoint(aPoint,
Point(nRectLeft, nRectTop), aDownHdg,
rDiagPoint, aDiagHdg);
@@ -1383,13 +1382,13 @@ void SmBinDiagonalNode::GetOperPosSize(Point &rPos, Size &rSize,
else
{
//
- // obere linke Ecke bestimmen
+ // determine top left corner
//
GetLineIntersectionPoint(aPoint,
Point(nRectLeft, nRectTop), aRightHdg,
rDiagPoint, aDiagHdg);
//
- // gibt es einen Schnittpunkt mit dem oberen Rand ?
+ // is there a point of intersection with the top border?
if (aPoint.X() >= nRectLeft)
{
nLeft = aPoint.X();
@@ -1397,7 +1396,7 @@ void SmBinDiagonalNode::GetOperPosSize(Point &rPos, Size &rSize,
}
else
{
- // es muss einen Schnittpunkt mit dem linken Rand geben!
+ // there has to be a point of intersection with the left border!
GetLineIntersectionPoint(aPoint,
Point(nRectLeft, nRectTop), aDownHdg,
rDiagPoint, aDiagHdg);
@@ -1407,13 +1406,13 @@ void SmBinDiagonalNode::GetOperPosSize(Point &rPos, Size &rSize,
}
//
- // untere rechte Ecke bestimmen
+ // determine bottom right corner
//
GetLineIntersectionPoint(aPoint,
Point(nRectLeft, nRectBottom), aRightHdg,
rDiagPoint, aDiagHdg);
//
- // gibt es einen Schnittpunkt mit dem unteren Rand ?
+ // is there a point of intersection with the bottom border?
if (aPoint.X() <= nRectRight)
{
nRight = aPoint.X();
@@ -1421,7 +1420,7 @@ void SmBinDiagonalNode::GetOperPosSize(Point &rPos, Size &rSize,
}
else
{
- // es muss einen Schnittpunkt mit dem rechten Rand geben!
+ // there has to be a point of intersection with the right border!
GetLineIntersectionPoint(aPoint,
Point(nRectRight, nRectTop), aDownHdg,
rDiagPoint, aDiagHdg);
@@ -1439,9 +1438,9 @@ void SmBinDiagonalNode::GetOperPosSize(Point &rPos, Size &rSize,
void SmBinDiagonalNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
{
- //! die beiden Argumente muessen in den Subnodes vor dem Operator kommen,
- //! damit das anklicken im GraphicWindow den FormulaCursor richtig setzt
- //! (vgl SmRootNode)
+ //! both arguments have to get into the SubNodes in front of the Operator,
+ //! so that clicking within the GraphicWindow sets the FormulaCursor correctly
+ //! (cf. SmRootNode)
SmNode *pLeft = GetSubNode(0),
*pRight = GetSubNode(1);
OSL_ENSURE(pLeft, "Sm : NULL pointer");
@@ -1460,12 +1459,12 @@ void SmBinDiagonalNode::Arrange(const OutputDevice &rDev, const SmFormat
&rForma
pLeft->Arrange(aTmpDev, rFormat);
pRight->Arrange(aTmpDev, rFormat);
- // implizit die Weite (incl Rand) des Diagonalstrichs ermitteln
+ // determine implicitely the values (inclusively the margin) of the diagonal line
pOper->Arrange(aTmpDev, rFormat);
long nDelta = pOper->GetWidth() * 8 / 10;
- // TopLeft Position vom rechten Argument ermitteln
+ // determine TopLeft position from the right argument
Point aPos;
aPos.X() = pLeft->GetItalicRight() + nDelta + pRight->GetItalicLeftSpace();
if (IsAscending())
@@ -1475,7 +1474,7 @@ void SmBinDiagonalNode::Arrange(const OutputDevice &rDev, const SmFormat
&rForma
pRight->MoveTo(aPos);
- // neue Baseline bestimmen
+ // determine new Baseline
long nTmpBaseline = IsAscending() ? (pLeft->GetBottom() + pRight->GetTop()) / 2
: (pLeft->GetTop() + pRight->GetBottom()) / 2;
Point aLogCenter ((pLeft->GetItalicRight() + pRight->GetItalicLeft()) / 2,
@@ -1485,14 +1484,14 @@ void SmBinDiagonalNode::Arrange(const OutputDevice &rDev, const SmFormat
&rForma
ExtendBy(*pRight, RCP_NONE);
- // Position und Groesse des Diagonalstrich ermitteln
+ // determine position and size of diagonal line
Size aTmpSize;
GetOperPosSize(aPos, aTmpSize, aLogCenter, IsAscending() ? 60.0 : -60.0);
// font specialist advised to change the width first
pOper->AdaptToY(aTmpDev, aTmpSize.Height());
pOper->AdaptToX(aTmpDev, aTmpSize.Width());
- // und diese wirksam machen
+ // and make it effective
pOper->Arrange(aTmpDev, rFormat);
pOper->MoveTo(aPos);
@@ -1728,16 +1727,16 @@ void SmBraceNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
long nFaceHeight = GetFont().GetSize().Height();
- // Uebergroesse in % ermitteln
+ // determine oversize in %
sal_uInt16 nPerc = 0;
if (!bIsABS && bScale)
- { // im Fall von Klammern mit Uebergroesse...
+ { // in case of oversize braces...
sal_uInt16 nIndex = GetScaleMode() == SCALE_HEIGHT ?
DIS_BRACKETSIZE : DIS_NORMALBRACKETSIZE;
nPerc = rFormat.GetDistance(nIndex);
}
- // ermitteln der Hoehe fuer die Klammern
+ // determine the height for the braces
long nBraceHeight;
if (bScale)
{
@@ -1749,11 +1748,11 @@ void SmBraceNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
else
nBraceHeight = nFaceHeight;
- // Abstand zum Argument
+ // distance to the argument
nPerc = bIsABS ? 0 : rFormat.GetDistance(DIS_BRACKETSPACE);
long nDist = nFaceHeight * nPerc / 100L;
- // sofern erwuenscht skalieren der Klammern auf die gewuenschte Groesse
+ // if wanted, scale the braces to the wanted size
if (bScale)
{
Size aTmpSize (pLeft->GetFont().GetSize());
@@ -1781,7 +1780,7 @@ void SmBraceNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
pLeft ->Arrange(rDev, rFormat);
pRight->Arrange(rDev, rFormat);
- // damit auch "\(a\) - (a) - left ( a right )" vernuenftig aussieht
+ // required in order to make "\(a\) - (a) - left ( a right )" look alright
RectVerAlign eVerAlign = bScale ? RVA_CENTERY : RVA_BASELINE;
Point aPos;
@@ -1880,9 +1879,9 @@ void SmVerticalBraceNode::Arrange(const OutputDevice &rDev, const SmFormat
&rFor
pBody->Arrange(aTmpDev, rFormat);
- // Groesse wie bei Grenzen fuer diesen Teil
+ // size is the same as for limits for this part
pScript->SetSize( Fraction( rFormat.GetRelSize(SIZ_LIMITS), 100 ) );
- // etwas hoehere Klammern als normal
+ // braces are a bit taller than usually
pBrace ->SetSize( Fraction(3, 2) );
long nItalicWidth = pBody->GetItalicWidth();
@@ -1892,7 +1891,7 @@ void SmVerticalBraceNode::Arrange(const OutputDevice &rDev, const SmFormat
&rFor
pBrace ->Arrange(aTmpDev, rFormat);
pScript->Arrange(aTmpDev, rFormat);
- // die relativen Position und die Abstaende zueinander bestimmen
+ // determine the relative position and the distances between each other
RectPos eRectPos;
long nFontHeight = pBody->GetFont().GetSize().Height();
long nDistBody = nFontHeight * rFormat.GetDistance(DIS_ORNAMENTSIZE),
@@ -2000,7 +1999,7 @@ void SmOperNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
void SmAlignNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
- // setzt im ganzen subtree (incl aktuellem node) das alignment
+ // sets the alignment within the entire subtree (inclusive current node)
{
OSL_ENSURE(GetNumSubNodes() > 0, "Sm: missing subnode");
@@ -2039,7 +2038,7 @@ void SmAttributNode::Arrange(const OutputDevice &rDev, const SmFormat
&rFormat)
pAttr->AdaptToX(rDev, pBody->GetItalicWidth());
pAttr->Arrange(rDev, rFormat);
- // get relative position of attribut
+ // get relative position of attribute
RectVerAlign eVerAlign;
long nDist = 0;
switch (GetToken().eType)
@@ -2264,7 +2263,7 @@ void SmPolyLineNode::Arrange(const OutputDevice &rDev, const SmFormat
&rFormat)
long nBorderwidth = GetFont().GetBorderWidth();
//
- // Das Polygon mit den beiden Endpunkten bilden
+ //create the polygon with both endpoints
//
OSL_ENSURE(aPoly.GetSize() == 2, "Sm : wrong number of points");
Point aPointA, aPointB;
@@ -2304,8 +2303,8 @@ void SmRootSymbolNode::AdaptToX(const OutputDevice &/*rDev*/, sal_uLong
nWidth)
void SmRootSymbolNode::AdaptToY(const OutputDevice &rDev, sal_uLong nHeight)
{
- // etwas extra Laenge damit der horizontale Balken spaeter ueber dem
- // Argument positioniert ist
+ // some additional length so that the horizontal bar will be positioned
+ // above the argument
SmMathSymbolNode::AdaptToY(rDev, nHeight + nHeight / 10L);
}
@@ -2702,8 +2701,8 @@ void SmMathSymbolNode::AdaptToY(const OutputDevice &rDev, sal_uLong nHeight)
GetFont().FreezeBorderWidth();
Size aFntSize (GetFont().GetSize());
- // da wir nur die Hoehe skalieren wollen muesen wir hier ggf die Fontweite
- // ermitteln um diese beizubehalten.
+ // since we only want to scale the heigth we have to determine the font width as
+ // the case may be in order to keep it
if (aFntSize.Width() == 0)
{
OutputDevice &rDevNC = (OutputDevice &) rDev;
@@ -2903,7 +2902,7 @@ SmSpecialNode::SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken,
sa
SmSpecialNode::SmSpecialNode(const SmToken &rNodeToken) :
- SmTextNode(NSPECIAL, rNodeToken, FNT_MATH) //! default Font nicht immer richtig
+ SmTextNode(NSPECIAL, rNodeToken, FNT_MATH) //! default Font isn't always correct
{
bIsFromGreekSymbolSet = lcl_IsFromGreekSymbolSet( rNodeToken.aText );
}
@@ -2932,11 +2931,10 @@ void SmSpecialNode::Prepare(const SmFormat &rFormat, const SmDocShell
&rDocShell
// use same font size as is used for variables
GetFont().SetSize( rFormat.GetFont( FNT_VARIABLE ).GetSize() );
- //! eigentlich sollten nur WEIGHT_NORMAL und WEIGHT_BOLD vorkommen...
- //! In der sms-Datei gibt es jedoch zB auch 'WEIGHT_ULTRALIGHT'
- //! daher vergleichen wir hier mit > statt mit != .
- //! (Langfristig sollte die Notwendigkeit fuer 'PrepareAttribut', und damit
- //! fuer dieses hier, mal entfallen.)
+ //! actually only WEIGHT_NORMAL and WEIGHT_BOLD should occur...
+ //! but in the sms-file there's also e.g. 'WEIGHT_ULTRALIGHT'
+ //! that's why we compare here with > instead of using !=
+ //! (In the long term the necessity for 'PrepareAttribut' and thus also for this here should
be dropped)
//
//! see also SmFontStyles::GetStyleName
if (IsItalic( GetFont() ))
@@ -3067,9 +3065,8 @@ void SmBlankNode::Prepare(const SmFormat &rFormat, const SmDocShell
&rDocShell)
{
SmNode::Prepare(rFormat, rDocShell);
- //! hier muss/sollte es lediglich nicht der StarMath Font sein,
- //! damit fuer das in Arrange verwendete Zeichen ein "normales"
- //! (ungecliptes) Rechteck erzeugt wird.
+ //! here must/should it solely not be the StarMath Font, so that
+ //! for the character used in Arrange a normal (non-clipped) rectangle is generated
GetFont() = rFormat.GetFont(FNT_VARIABLE);
Flags() |= FLG_FONT | FLG_BOLD | FLG_ITALIC;
@@ -3081,16 +3078,16 @@ void SmBlankNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
SmTmpDevice aTmpDev ((OutputDevice &) rDev, true);
aTmpDev.SetFont(GetFont());
- // Abstand von der Fonthoehe abhaengig machen
- // (damit er beim skalieren (zB size *2 {a ~ b}) mitwaechst)
+ // make distance depend on the font heigth
+ // (so that it increases when scaling (e.g. size *2 {a ~ b})
long nDist = GetFont().GetSize().Height() / 10L,
nSpace = nNum * nDist;
- // ein SmRect mit Baseline und allem drum und dran besorgen
+ // get a SmRect with Baseline with all the bells and whistles
SmRect::operator = (SmRect(aTmpDev, &rFormat, rtl::OUString(' '),
GetFont().GetBorderWidth()));
- // und dieses auf die gewuenschte Breite bringen
+ // and resize it to the wanted size
SetItalicSpaces(0, 0);
SetWidth(nSpace);
}
--
1.7.9.5
Context
- [PATCH] translated German comments in starmath · Alexander Wilms
Re: [PATCH] translated German comments in starmath · Michael Meeks
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.