[Libreoffice-commits] .: starmath/source
Jan Holesovsky
kendy at kemper.freedesktop.org
Fri Feb 18 00:18:19 PST 2011
starmath/source/rect.cxx | 21 ++++++++++-----------
starmath/source/register.cxx | 2 +-
starmath/source/smdll.cxx | 16 ++++++----------
starmath/source/utility.cxx | 7 -------
starmath/source/view.cxx | 6 +++---
starmath/source/visitors.cxx | 2 +-
6 files changed, 21 insertions(+), 33 deletions(-)
New commits:
commit 52ab349c492477209eb867b7cda6e3b5041c0e49
Author: Tobias Kranz <tkranz at zedat.fu-berlin.de>
Date: Fri Feb 18 09:17:02 2011 +0100
Translated several German comments in Math.
diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx
index 2556a96..3007a58 100644
--- a/starmath/source/rect.cxx
+++ b/starmath/source/rect.cxx
@@ -46,9 +46,9 @@
////////////////////////////////////////////////////////////////////////////////
-// '\0' terminiertes Array mit Zeichen, die im StarMath Font als Buchstaben
-// betrachtet werden sollen, (um im Gegensatz zu den anderen Operatoren
-// und Symbolen ein "normales"(ungecliptes) SmRect zu erhalten).
+// '\0' terminated Array with symbol, which should be treat as letters in
+// StarMath Font, (to get a normal (non-clipped) SmRect in contrast to the
+// other operators and symbols).
static xub_Unicode const aMathAlpha[] =
{
MS_ALEPH, MS_IM, MS_RE,
@@ -63,8 +63,7 @@ static xub_Unicode const aMathAlpha[] =
};
bool SmIsMathAlpha(const XubString &rText)
- // ergibt genau dann true, wenn das Zeichen (aus dem StarMath Font) wie ein
- // Buchstabe behandelt werden soll.
+ // true iff symbol (from StarMath Font) should be treated as letter
{
if (rText.Len() == 0)
return false;
@@ -72,12 +71,12 @@ bool SmIsMathAlpha(const XubString &rText)
OSL_ENSURE(rText.Len() == 1, "Sm : string must be exactly one character long");
xub_Unicode cChar = rText.GetChar(0);
- // ist es ein griechisches Zeichen ?
+ // is it a greek symbol?
if (xub_Unicode(0xE0AC) <= cChar && cChar <= xub_Unicode(0xE0D4))
return true;
else
{
- // kommt es in 'aMathAlpha' vor ?
+ // appears it in 'aMathAlpha'?
const xub_Unicode *pChar = aMathAlpha;
while (*pChar && *pChar != cChar)
pChar++;
@@ -176,8 +175,8 @@ void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat,
long nDelta = pWindow->GetFontMetric().GetIntLeading();
if (nDelta == 0)
- { // dieser Wert entspricht etwa einem Leading von 80 bei einer
- // Fonthoehe von 422 (12pt)
+ { // this value approx. fits a Leading of 80 at a
+ // Fontheight of 422 (12pt)
nDelta = nFontHeight * 8L / 43;
}
SetTop(GetTop() - nDelta);
@@ -218,8 +217,8 @@ void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat,
if (bAllowSmaller)
{
- // fuer Symbole und Operatoren aus dem StarMath Font passen wir den
- // oberen und unteren Rand dem Zeichen an.
+ // for symbols and operators from the StarMath Font
+ // we adjust upper and lower margin of the symbol
SetTop(nGlyphTop);
SetBottom(nGlyphBottom);
}
diff --git a/starmath/source/register.cxx b/starmath/source/register.cxx
index a8fcfd3..8c40793 100644
--- a/starmath/source/register.cxx
+++ b/starmath/source/register.cxx
@@ -128,7 +128,7 @@ sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/,
OUString aDelimiter( RTL_CONSTASCII_USTRINGPARAM("/") );
OUString aUnoServices( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") );
- // Eigentliche Implementierung und ihre Services registrieren
+ // Actual implementation and register its services
sal_Int32 i;
Reference< registry::XRegistryKey > xNewKey;
diff --git a/starmath/source/smdll.cxx b/starmath/source/smdll.cxx
index 4ad8081..f9f07c4 100644
--- a/starmath/source/smdll.cxx
+++ b/starmath/source/smdll.cxx
@@ -54,11 +54,9 @@
bool SmDLL::bInitialized = false;
-/*************************************************************************
-|*
-|* Initialisierung
-|*
-\************************************************************************/
+
+// Initialization
+
void SmDLL::Init()
{
if ( bInitialized )
@@ -94,11 +92,9 @@ void SmDLL::Init()
::sfx2::TaskPaneWrapper::RegisterChildWindow( false, pp );
}
-/*************************************************************************
-|*
-|* Deinitialisierung
-|*
-\************************************************************************/
+
+// Deinitialization
+
void SmDLL::Exit()
{
// the SdModule must be destroyed
diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx
index d815903..dd8606e 100644
--- a/starmath/source/utility.cxx
+++ b/starmath/source/utility.cxx
@@ -139,7 +139,6 @@ void SmPickList::Clear()
/**************************************************************************/
-/**************************************************************************/
void * SmFontPickList::CreateItem(const String& /*rString*/)
{
@@ -227,8 +226,6 @@ void SmFontPickList::WriteTo(SmFontDialog& rDialog) const
/**************************************************************************/
-/**************************************************************************/
-
IMPL_LINK( SmFontPickListBox, SelectHdl, ListBox *, /*pListBox*/ )
{
USHORT nPos;
@@ -292,8 +289,6 @@ void SmFontPickListBox::Update(const Font &rFont, const Font &rNewFont)
{
SmFontPickList::Update(rFont, rNewFont);
- // ********************** hier fehlt noch was
-
return;
}
@@ -302,8 +297,6 @@ void SmFontPickListBox::Remove(const Font &rFont)
{
SmFontPickList::Remove(rFont);
- // ********************** hier fehlt noch was
-
return;
}
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 658af32..53d3eb0 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -919,7 +919,7 @@ SFX_IMPL_INTERFACE(SmViewShell, SfxViewShell, SmResId(0))
SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_TOOLS | SFX_VISIBILITY_STANDARD |
SFX_VISIBILITY_FULLSCREEN | SFX_VISIBILITY_SERVER,
SmResId(RID_MATH_TOOLBOX ));
- //Dummy-Objectbar, damit es bei aktivieren nicht staendig zuppelt.
+ //Dummy-Objectbar, to avoid quiver while activating
SFX_CHILDWINDOW_REGISTRATION(SID_TASKPANE);
SFX_CHILDWINDOW_REGISTRATION(SmToolBoxWrapper::GetChildWindowId());
@@ -994,8 +994,8 @@ void SmViewShell::SetZoomFactor( const Fraction &rX, const Fraction &rY )
const Fraction &rFrac = rX < rY ? rX : rY;
GetGraphicWindow().SetZoom( (USHORT) long(rFrac * Fraction( 100, 1 )) );
- //Um Rundungsfehler zu minimieren lassen wir von der Basisklasse ggf.
- //auch die krummen Werte einstellen
+ //To avoid rounding errors base class regulates crooked values too
+ //if necessary
SfxViewShell::SetZoomFactor( rX, rY );
}
diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx
index ffe304c..3015765 100644
--- a/starmath/source/visitors.cxx
+++ b/starmath/source/visitors.cxx
@@ -497,7 +497,7 @@ SmTmpDevice2::SmTmpDevice2( OutputDevice &rTheDev, bool bUseMap100th_mm ) :
if ( bUseMap100th_mm && MAP_100TH_MM != rOutDev.GetMapMode( ).GetMapUnit( ) )
{
DBG_ERROR( "incorrect MapMode?" );
- rOutDev.SetMapMode( MAP_100TH_MM ); //Immer fuer 100% fomatieren
+ rOutDev.SetMapMode( MAP_100TH_MM ); //format for 100% always
}
}
More information about the Libreoffice-commits
mailing list