Hi Dietmar,
I took the freedom to change the subject, as what you mention is applied
not only to css.table.BorderLine
Dietmar Hiller escribió:
According to the documentation
http://api.openoffice.org/docs/common/ref/com/sun/star/table/BorderLine.html#Color the
color of a line should be of type ::com::sun::star::util::Color which would be
"long".
I am using Netbeans (Java) with ŚDK 2.3 and
a) this type is not found in com.sun.star.util
this is because it is not a type but a typedef (in UNOIDL just like in
C++, typedef is an alias for a data type), in this case for a primitive
type (long in UNOIDL); and a primitive type that is mapped to a Java
primitive, NOT a class.
b) according to the debugger it is "int"
UNOIDL long is mapped to Java primitive int, see:
http://api.openoffice.org/docs/DevelopersGuide/ProfUNO/ProfUNO.xhtml#1_4_1_4_Type_Mappings
But the type definition would make sense IMHO, it is identical to
java.awt.Color.
no, java.awt.Color is a class, css.util.Color is a typedef for a
primitive data type.
IMHO, an improved toolkit API should have a Color interface. I realized
this now that I started with UNO C++, I'm missing java.awt.Color, so a
css.awt.Color would be a nice-to-have for the sake of OOo's API
completeness.
In fact, that css.util.Color is a mere typedef for a primitive is quite
poor for a serious API, while internally developer's use a Color class
(in tools/inc/tools/color.hxx, tools/source/generic/color.cxx) that
* has five constructors:
Color()
Color( ColorData nColor ) { mnColor = nColor; }
Color( UINT8 nRed, UINT8 nGreen, UINT8 nBlue )
Color( UINT8 nTransparency, UINT8 nRed, UINT8 nGreen, UINT8 nBlue )
Color( const ResId& rResId );
* and several public functions
void SetRed( UINT8 nRed )
UINT8 GetRed() const
void SetGreen( UINT8 nGreen )
UINT8 GetGreen() const
void SetBlue( UINT8 nBlue )
UINT8 GetBlue() const
void SetTransparency( UINT8 nTransparency )
UINT8 GetTransparency() const
void SetColor( ColorData nColor )
ColorData GetColor() const
ColorData GetRGBColor() const
UINT8 GetColorError( const Color& rCompareColor ) const
UINT8 GetLuminance() const
void IncreaseLuminance( UINT8 cLumInc )
void DecreaseLuminance( UINT8 cLumDec )
void IncreaseContrast( UINT8 cContInc )
void DecreaseContrast( UINT8 cContDec )
void Invert()
void Merge( const Color& rMergeColor, BYTE cTransparency )
BOOL IsRGBEqual( const Color& rColor ) const
BOOL IsDark() const
BOOL IsBright() const
static ColorData HSBtoRGB( USHORT nHue, USHORT nSat, USHORT nBri )
void RGBtoHSB( USHORT& nHue, USHORT& nSat, USHORT& nBri ) const
just by reading the functions names one can get an idea of how
good/useful would it be if this class is wrapped into UNO interface/s.
Of course, one can always "implement-it-yourself", but I'm talking about
the completeness of OOo's API.
Regards
Ariel.
--
Ariel Constenla-Haile
La Plata, Argentina
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://www.ArielConstenlaHaile.com.ar/ooo/
"Aus der Kriegsschule des Lebens
- Was mich nicht umbringt,
macht mich härter."
Nietzsche Götzendämmerung, Sprüche und Pfeile, 8.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]