Kaydet (Commit) 5591e21e authored tarafından Sven Wehner's avatar Sven Wehner Kaydeden (comit) Norbert Thiebaud

Translate some German comments to English, and remove some ASCII art.

Additional changes according to Chris Sherlock's wishes (removing
comment decorations, removing no-purpose comments)

Change-Id: I5346010d67ed5d1b2b2ad0df91ac472dde905683
Reviewed-on: https://gerrit.libreoffice.org/7504Reviewed-by: 's avatarChris Sherlock <chris.sherlock79@gmail.com>
Reviewed-by: 's avatarNorbert Thiebaud <nthiebaud@gmail.com>
Tested-by: 's avatarNorbert Thiebaud <nthiebaud@gmail.com>
üst 87192f1a
...@@ -23,17 +23,11 @@ ...@@ -23,17 +23,11 @@
#include <svx/svdorect.hxx> #include <svx/svdorect.hxx>
#include <svx/svxdllapi.h> #include <svx/svxdllapi.h>
//************************************************************
// Vorausdeklarationen
//************************************************************
namespace sdr { namespace properties { namespace sdr { namespace properties {
class CircleProperties; class CircleProperties;
}} }}
//************************************************************ // Helper class SdrCircObjGeoData
// Hilfsklasse SdrCircObjGeoData
//************************************************************
// #109872# // #109872#
class SdrCircObjGeoData : public SdrTextObjGeoData class SdrCircObjGeoData : public SdrTextObjGeoData
...@@ -43,9 +37,7 @@ public: ...@@ -43,9 +37,7 @@ public:
long nEndWink; long nEndWink;
}; };
//************************************************************ // class SdrCircObj
// SdrCircObj
//************************************************************
class SVX_DLLPUBLIC SdrCircObj : public SdrRectObj class SVX_DLLPUBLIC SdrCircObj : public SdrRectObj
{ {
...@@ -70,10 +62,10 @@ protected: ...@@ -70,10 +62,10 @@ protected:
private: private:
SVX_DLLPRIVATE basegfx::B2DPolygon ImpCalcXPolyCirc(const SdrObjKind eKind, const Rectangle& rRect1, long nStart, long nEnd) const; SVX_DLLPRIVATE basegfx::B2DPolygon ImpCalcXPolyCirc(const SdrObjKind eKind, const Rectangle& rRect1, long nStart, long nEnd) const;
SVX_DLLPRIVATE void ImpSetCreateParams(SdrDragStat& rStat) const; SVX_DLLPRIVATE void ImpSetCreateParams(SdrDragStat& rStat) const;
SVX_DLLPRIVATE void ImpSetAttrToCircInfo(); // Werte vom Pool kopieren SVX_DLLPRIVATE void ImpSetAttrToCircInfo(); // copy values from pool
SVX_DLLPRIVATE void ImpSetCircInfoToAttr(); // Werte in den Pool kopieren SVX_DLLPRIVATE void ImpSetCircInfoToAttr(); // copy values into pool
// Liefert sal_True, wenn das Painten ein XPolygon erfordert. // returns sal_True if paint requires a XPolygon
SVX_DLLPRIVATE bool PaintNeedsXPolyCirc() const; // PaintNeedsXPoly-> PaintNeedsXPolyCirc SVX_DLLPRIVATE bool PaintNeedsXPolyCirc() const; // PaintNeedsXPoly-> PaintNeedsXPolyCirc
SVX_DLLPRIVATE virtual void RecalcXPoly(); SVX_DLLPRIVATE virtual void RecalcXPoly();
...@@ -82,15 +74,13 @@ protected: ...@@ -82,15 +74,13 @@ protected:
public: public:
TYPEINFO(); TYPEINFO();
SdrCircObj(SdrObjKind eNewKind); // Circ, CArc, Sect oder CCut SdrCircObj(SdrObjKind eNewKind); // Circ, CArc, Sect or CCut
SdrCircObj(SdrObjKind eNewKind, const Rectangle& rRect); SdrCircObj(SdrObjKind eNewKind, const Rectangle& rRect);
// 0=0.00Deg=3h 9000=90.00Deg=12h 18000=180.00Deg=9h 27000=270.00Deg=6h // 0=0.00Deg=3h 9000=90.00Deg=12h 18000=180.00Deg=9h 27000=270.00Deg=6h
// Der Verlauf des Kreises von StartWink nach EndWink ist immer entgegen // The circle is build up from StartWink to EndWink anti-clockwise.
// dem Uhrzeigersinn. // If nNewStartWink==nNewEndWink, then arc has an angle of 0 degrees.
// Wenn nNewStartWink==nNewEndWink hat der Kreisbogen einen Verlaufswinkel // If nNewStartWink+36000==nNewEndWink, then the arc has angle of 360 degrees.
// von 0 Grad. Bei nNewStartWink+36000==nNewEndWink ist der Verlaufswinkel
// 360.00 Grad.
SdrCircObj(SdrObjKind eNewKind, const Rectangle& rRect, long nNewStartWink, long nNewEndWink); SdrCircObj(SdrObjKind eNewKind, const Rectangle& rRect, long nNewStartWink, long nNewEndWink);
virtual ~SdrCircObj(); virtual ~SdrCircObj();
......
...@@ -61,9 +61,7 @@ typedef WeakImplHelper1< XPropertySetInfo > ImplPropertySetInfoHelper; ...@@ -61,9 +61,7 @@ typedef WeakImplHelper1< XPropertySetInfo > ImplPropertySetInfoHelper;
#define DEFAULT_INDEX_ACCESS_COUNT 10 #define DEFAULT_INDEX_ACCESS_COUNT 10
#define DEFAULT_NAME_ACCESS_COUNT 5 #define DEFAULT_NAME_ACCESS_COUNT 5
//******************************************************************* // Auxiliary function, in order to get from one type XIdlClass
//*** Auxiliary function, in order to get from one type XIdlClass ***
//*******************************************************************
Reference<XIdlClass> TypeToIdlClass( const Type& rType, const Reference< XMultiServiceFactory > & xMgr ) Reference<XIdlClass> TypeToIdlClass( const Type& rType, const Reference< XMultiServiceFactory > & xMgr )
{ {
static Reference< XIdlReflection > xRefl; static Reference< XIdlReflection > xRefl;
...@@ -87,11 +85,9 @@ Reference<XIdlClass> TypeToIdlClass( const Type& rType, const Reference< XMultiS ...@@ -87,11 +85,9 @@ Reference<XIdlClass> TypeToIdlClass( const Type& rType, const Reference< XMultiS
} }
//**************************************************** // Helper function to convert Any to UString
//*** Hilfs-Funktion, um Any als UString auszugeben *** // TODO: This code could be moved to a more central place.
//**************************************************** // Currently it's used only for simple data types.
// ACHTUNG: Kann mal an eine zentrale Stelle uebernommen werden
// Wird zunaechst nur fuer einfache Datentypen ausgefuehrt
OUString AnyToString( const Any& aValue, sal_Bool bIncludeType, const Reference< XMultiServiceFactory > & xMgr ) OUString AnyToString( const Any& aValue, sal_Bool bIncludeType, const Reference< XMultiServiceFactory > & xMgr )
{ {
...@@ -180,9 +176,7 @@ OUString AnyToString( const Any& aValue, sal_Bool bIncludeType, const Reference< ...@@ -180,9 +176,7 @@ OUString AnyToString( const Any& aValue, sal_Bool bIncludeType, const Reference<
return aRetStr; return aRetStr;
} }
//***************************************** // XPropertySetInfo for test class
//*** XPropertySetInfo fuer Test-Klasse ***
//*****************************************
class ImplPropertySetInfo : public ImplPropertySetInfoHelper class ImplPropertySetInfo : public ImplPropertySetInfoHelper
{ {
...@@ -298,11 +292,11 @@ class ImplIntroTest : public ImplIntroTestHelper ...@@ -298,11 +292,11 @@ class ImplIntroTest : public ImplIntroTestHelper
Reference< XIntroTest >* pIndexAccessTab; Reference< XIntroTest >* pIndexAccessTab;
sal_Int16 iIndexAccessCount; sal_Int16 iIndexAccessCount;
// struct-Properties // struct properties
Property m_aFirstStruct; Property m_aFirstStruct;
PropertyValue m_aSecondStruct; PropertyValue m_aSecondStruct;
// Listener merken (zunaechst einfach, nur einen pro Property) // remember listener (one listener per property)
Reference< XPropertyChangeListener > aPropChangeListener; Reference< XPropertyChangeListener > aPropChangeListener;
OUString aPropChangeListenerStr; OUString aPropChangeListenerStr;
Reference< XVetoableChangeListener > aVetoPropChangeListener; Reference< XVetoableChangeListener > aVetoPropChangeListener;
...@@ -317,7 +311,7 @@ public: ...@@ -317,7 +311,7 @@ public:
Init(); Init();
} }
// Trotz virtual inline, um Schreibarbeit zu sparen (nur fuer Testzwecke) // despite virtual inline, to simplify coding (testing only)
// XPropertySet // XPropertySet
virtual Reference< XPropertySetInfo > SAL_CALL getPropertySetInfo( ) virtual Reference< XPropertySetInfo > SAL_CALL getPropertySetInfo( )
throw(RuntimeException); throw(RuntimeException);
...@@ -430,20 +424,20 @@ public: ...@@ -430,20 +424,20 @@ public:
void ImplIntroTest::Init( void ) void ImplIntroTest::Init( void )
{ {
// Eindeutigen Namen verpassen // set unique name
static sal_Int32 nObjCount = 0; static sal_Int32 nObjCount = 0;
OUString aName( "IntroTest-Obj Nr. " ); OUString aName( "IntroTest-Obj Nr. " );
aName += OUString::valueOf( nObjCount ); aName += OUString::valueOf( nObjCount );
setObjectName( aName ); setObjectName( aName );
// Properties initialization // initialize properties
aAnyArray[0] <<= 3.14; aAnyArray[0] <<= 3.14;
aAnyArray[1] <<= (sal_Int32)42; aAnyArray[1] <<= (sal_Int32)42;
aAnyArray[2] <<= OUString( "Hallo" ); aAnyArray[2] <<= OUString( "Hallo" );
// Einmal fuer den internen Gebrauch die PropertySetInfo abholen // fetch PropertySetInfo once for internal use
m_xMyInfo = getPropertySetInfo(); m_xMyInfo = getPropertySetInfo();
m_xMyInfo->acquire(); // sonst raucht es am Programm-Ende ab m_xMyInfo->acquire(); // otherwise it could crash at shutdown
m_nMarkusAge = 33; m_nMarkusAge = 33;
m_nMarkusChildrenCount = 2; m_nMarkusChildrenCount = 2;
...@@ -455,7 +449,7 @@ void ImplIntroTest::Init( void ) ...@@ -455,7 +449,7 @@ void ImplIntroTest::Init( void )
m_nLaber = 1; m_nLaber = 1;
eTypeClass = TypeClass_INTERFACE; eTypeClass = TypeClass_INTERFACE;
// String-Sequence initialization // string sequence initialization
aStringSeq.realloc( 3 ); aStringSeq.realloc( 3 );
aStringSeq[ 0 ] = "String 0"; aStringSeq[ 0 ] = "String 0";
aStringSeq[ 1 ] = "String 1"; aStringSeq[ 1 ] = "String 1";
...@@ -680,11 +674,11 @@ struct DefItem ...@@ -680,11 +674,11 @@ struct DefItem
sal_Int32 nConcept; sal_Int32 nConcept;
}; };
// Spezial-Wert fuer Method-Concept, um "normale" Funktionen kennzeichnen zu koennen // special value for method concept, to mark "normal" functions
#define MethodConcept_NORMAL_IMPL 0x80000000 #define MethodConcept_NORMAL_IMPL 0x80000000
// Test-Objekt liefern // return test object
Any getIntrospectionTestObject( const Reference< XMultiServiceFactory > & xMgr ) Any getIntrospectionTestObject( const Reference< XMultiServiceFactory > & xMgr )
{ {
Any aObjAny; Any aObjAny;
...@@ -854,10 +848,10 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr, ...@@ -854,10 +848,10 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr,
//****************************************************** //******************************************************
// create Test object // create test object
Any aObjAny = getIntrospectionTestObject( xMgr ); Any aObjAny = getIntrospectionTestObject( xMgr );
// Introspection-Service unspecten // inspect introspection service
Reference< XIntrospectionAccess > xAccess = xIntrospection->inspect( aObjAny ); Reference< XIntrospectionAccess > xAccess = xIntrospection->inspect( aObjAny );
xAccess = xIntrospection->inspect( aObjAny ); xAccess = xIntrospection->inspect( aObjAny );
xAccess = xIntrospection->inspect( aObjAny ); xAccess = xIntrospection->inspect( aObjAny );
...@@ -865,9 +859,9 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr, ...@@ -865,9 +859,9 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr,
if( !xAccess.is() ) if( !xAccess.is() )
return sal_False; return sal_False;
// Ergebnis der Introspection pruefen // check result of introspection
// XPropertySet-UIK ermitteln // determine XPropertySet-UIK
Type aType = getCppuType( (Reference< XPropertySet >*) NULL ); Type aType = getCppuType( (Reference< XPropertySet >*) NULL );
Reference< XInterface > xPropSetIface = xAccess->queryAdapter( aType ); Reference< XInterface > xPropSetIface = xAccess->queryAdapter( aType );
...@@ -878,10 +872,10 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr, ...@@ -878,10 +872,10 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr,
Reference< XExactName > xExactName( xAccess, UNO_QUERY ); Reference< XExactName > xExactName( xAccess, UNO_QUERY );
OSL_ENSURE( xExactName.is(), "Introspection unterstuetzt kein ExactName" ); OSL_ENSURE( xExactName.is(), "Introspection unterstuetzt kein ExactName" );
// Schleife ueber alle Kombinationen von Concepts // loop over all concept combinations
for( sal_Int32 nConcepts = 0 ; nConcepts < 16 ; nConcepts++ ) for( sal_Int32 nConcepts = 0 ; nConcepts < 16 ; nConcepts++ )
{ {
// Wieviele Properties sollten es sein // how many properties should this be
sal_Int32 nDemandedPropCount = 0; sal_Int32 nDemandedPropCount = 0;
sal_Int32 iList = 0; sal_Int32 iList = 0;
while( pPropertyDefs[ iList ].pName ) while( pPropertyDefs[ iList ].pName )
...@@ -912,7 +906,7 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr, ...@@ -912,7 +906,7 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr,
{ {
const Property aProp = pProps[ i ]; const Property aProp = pProps[ i ];
// Naechste Passende Methode in der Liste suchen // search for next suitable method in the list
while( pPropertyDefs[ iList ].pName ) while( pPropertyDefs[ iList ].pName )
{ {
if( pPropertyDefs[ iList ].nConcept & nConcepts ) if( pPropertyDefs[ iList ].nConcept & nConcepts )
...@@ -945,7 +939,7 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr, ...@@ -945,7 +939,7 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr,
aErrorStr += "<"; aErrorStr += "<";
OSL_ENSURE( aTypeNameStr == aDemandedTypeNameStr, aErrorStr.getStr() ); OSL_ENSURE( aTypeNameStr == aDemandedTypeNameStr, aErrorStr.getStr() );
// Wert des Property lesen und ausgeben // read and report value of property
aPropVal = xPropSet->getPropertyValue( aPropName ); aPropVal = xPropSet->getPropertyValue( aPropName );
OString aValStr = OUStringToOString( AnyToString( aPropVal, sal_False, xMgr ), RTL_TEXTENCODING_ASCII_US ); OString aValStr = OUStringToOString( AnyToString( aPropVal, sal_False, xMgr ), RTL_TEXTENCODING_ASCII_US );
...@@ -959,7 +953,7 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr, ...@@ -959,7 +953,7 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr,
aErrorStr += "<"; aErrorStr += "<";
OSL_ENSURE( aValStr == aDemandedValStr, aErrorStr.getStr() ); OSL_ENSURE( aValStr == aDemandedValStr, aErrorStr.getStr() );
// Wert pruefen und typgerecht modifizieren // check value and modify it according to its type
TypeClass eType = aPropVal.getValueType().getTypeClass(); TypeClass eType = aPropVal.getValueType().getTypeClass();
Any aNewVal; Any aNewVal;
sal_Bool bModify = sal_True; sal_Bool bModify = sal_True;
...@@ -999,11 +993,11 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr, ...@@ -999,11 +993,11 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr,
break; break;
} }
// Modifizieren nur beim letzten Durchlauf // modify only in the last iteration
if( nConcepts == 15 ) if( nConcepts == 15 )
{ {
// XExactName pruefen, dafuer alles gross machen // check XExactName, switch everything to upper case
// (Introspection ist mit LowerCase implementiert, also anders machen) // (introspection uses lower case)
OUString aUpperUStr = aPropName.toAsciiUpperCase(); OUString aUpperUStr = aPropName.toAsciiUpperCase();
OUString aExactName = xExactName->getExactName( aUpperUStr ); OUString aExactName = xExactName->getExactName( aUpperUStr );
if( aExactName != aPropName ) if( aExactName != aPropName )
...@@ -1021,10 +1015,10 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr, ...@@ -1021,10 +1015,10 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr,
bModify = sal_False; bModify = sal_False;
} }
// Neuen Wert setzen, wieder lesen und ausgeben // set new value, then read and return value
if( bModify ) if( bModify )
{ {
// UnknownPropertyException bei ReadOnly-Properties abfangen // catch UnknownPropertyException for ReadOnly properties
try try
{ {
xPropSet->setPropertyValue( aPropName, aNewVal ); xPropSet->setPropertyValue( aPropName, aNewVal );
...@@ -1048,7 +1042,7 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr, ...@@ -1048,7 +1042,7 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr,
OSL_ENSURE( aModifiedValStr == aDemandedModifiedValStr, aErrorStr.getStr() ); OSL_ENSURE( aModifiedValStr == aDemandedModifiedValStr, aErrorStr.getStr() );
} }
// Checken, ob alle Properties auch einzeln gefunden werden // check whether all properties can be found individually
aErrorStr = "property \""; aErrorStr = "property \"";
aErrorStr += aDemandedName; aErrorStr += aDemandedName;
aErrorStr += "\" not found with hasProperty()"; aErrorStr += "\" not found with hasProperty()";
...@@ -1075,7 +1069,7 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr, ...@@ -1075,7 +1069,7 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr,
} }
} }
// Schleife ueber alle Kombinationen von Concepts // loop over all concept combinations
for( sal_Int32 nConcepts = 0 ; nConcepts < 128 ; nConcepts++ ) for( sal_Int32 nConcepts = 0 ; nConcepts < 128 ; nConcepts++ )
{ {
// Das 2^6-Bit steht fuer "den Rest" // Das 2^6-Bit steht fuer "den Rest"
...@@ -1159,7 +1153,7 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr, ...@@ -1159,7 +1153,7 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr,
} }
} }
// Listener-Klassen ausgeben // print listener class
Sequence< Type > aClassSeq = xAccess->getSupportedListeners(); Sequence< Type > aClassSeq = xAccess->getSupportedListeners();
sal_Int32 nLen = aClassSeq.getLength(); sal_Int32 nLen = aClassSeq.getLength();
...@@ -1169,7 +1163,7 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr, ...@@ -1169,7 +1163,7 @@ static sal_Bool test_introsp( Reference< XMultiServiceFactory > xMgr,
// Methode ansprechen // Methode ansprechen
const Type& aListenerType = pListeners[i]; const Type& aListenerType = pListeners[i];
// Namen besorgen // get name
OUString aListenerClassName = aListenerType.getTypeName(); OUString aListenerClassName = aListenerType.getTypeName();
} }
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment