[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 4 commits - filter/source formula/source sc/inc sc/source sc/util sd/source vcl/aqua

Herbert Dürr hdu at apache.org
Tue Feb 26 17:16:36 PST 2013


 filter/source/xsltfilter/uof2splithandler.cxx        |    6 -
 formula/source/core/resource/core_resource.src       |    8 -
 sc/inc/helpids.h                                     |    4 
 sc/source/ui/src/scfuncs.src                         |   99 ++++++++++++++++++-
 sc/util/hidother.src                                 |    4 
 sd/source/filter/eppt/epptso.cxx                     |    2 
 vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm |   37 +++----
 7 files changed, 132 insertions(+), 28 deletions(-)

New commits:
commit 5ffbf3126f57d2f6a3dc6874bca2ffbc29b99ffb
Author: Herbert Dürr <hdu at apache.org>
Date:   Tue Feb 26 16:21:18 2013 +0000

    fix the A11Y text attribute color in Aqua
    
    Using the SalColor->CGFloat[] helper gets more of VCL into the scope
    which causes conflicting declarations between css::awt and vcl-classic
    font attributes so their namespace must be explicitly qualified

diff --git a/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm b/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm
index a685a1b..971f367 100644
--- a/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm
+++ b/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm
@@ -25,6 +25,7 @@
 #include "precompiled_vcl.hxx"
 
 #include "aqua/salinst.h"
+#include "aqua/salgdi.h"
 
 #include "aqua11ytextattributeswrapper.h"
 
@@ -33,8 +34,8 @@
 #include <com/sun/star/awt/FontWeight.hpp>
 #include <com/sun/star/awt/FontStrikeout.hpp>
 
+namespace css_awt = ::com::sun::star::awt;
 using namespace ::com::sun::star::accessibility;
-using namespace ::com::sun::star::awt;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::uno;
@@ -46,8 +47,8 @@ using namespace ::rtl;
     int underlineStyle = NSNoUnderlineStyle;
     sal_Int16 value = 0;
     property.Value >>= value;
-    if ( value != FontUnderline::NONE 
-      && value != FontUnderline::DONTKNOW) {
+    if ( value != ::css_awt::FontUnderline::NONE 
+      && value != ::css_awt::FontUnderline::DONTKNOW) {
         underlineStyle = NSSingleUnderlineStyle;
     }
     return underlineStyle;
@@ -57,10 +58,10 @@ using namespace ::rtl;
     int boldStyle = 0;
     float value = 0;
     property.Value >>= value;
-    if ( value == FontWeight::SEMIBOLD
-      || value == FontWeight::BOLD
-      || value == FontWeight::ULTRABOLD
-      || value == FontWeight::BLACK ) {
+    if ( value == ::css_awt::FontWeight::SEMIBOLD
+      || value == ::css_awt::FontWeight::BOLD
+      || value == ::css_awt::FontWeight::ULTRABOLD
+      || value == ::css_awt::FontWeight::BLACK ) {
         boldStyle = NSBoldFontMask;
     }
     return boldStyle;
@@ -68,8 +69,8 @@ using namespace ::rtl;
 
 +(int)convertItalicStyle:(PropertyValue)property {
     int italicStyle = 0;
-    sal_Int16 value = property.Value.get<FontSlant>();
-    if ( value == FontSlant_ITALIC ) {
+    sal_Int16 value = property.Value.get<::css_awt::FontSlant>();
+    if ( value == ::css_awt::FontSlant_ITALIC ) {
         italicStyle = NSItalicFontMask;
     }
     return italicStyle;
@@ -79,8 +80,8 @@ using namespace ::rtl;
     BOOL strikethrough = NO;
     sal_Int16 value = 0;
     property.Value >>= value;
-    if ( value != FontStrikeout::NONE
-      && value != FontStrikeout::DONTKNOW ) {
+    if ( value != ::css_awt::FontStrikeout::NONE
+      && value != ::css_awt::FontStrikeout::DONTKNOW ) {
         strikethrough = YES;
     }
     return strikethrough;
@@ -102,13 +103,13 @@ using namespace ::rtl;
     return [ NSNumber numberWithShort: value ];
 }
 
-+(void)addColor:(sal_Int32)salColor forAttribute:(NSString *)attribute andRange:(NSRange)range toString:(NSMutableAttributedString *)string {
-    if ( salColor != -1 ) {
-        float elements[] = { salColor & 0x00ff0000, salColor & 0x0000ff00, salColor & 0x000000ff };
-        CGColorRef color = CGColorCreate ( CGColorSpaceCreateWithName ( kCGColorSpaceGenericRGB ), elements );
-        [ string addAttribute: attribute value: (id) color range: range ];
-        CGColorRelease ( color );
-    }
++(void)addColor:(SalColor)nSalColor forAttribute:(NSString *)attribute andRange:(NSRange)range toString:(NSMutableAttributedString *)string {
+	if( nSalColor == COL_TRANSPARENT )
+		return;
+	const RGBAColor aRGBAColor( nSalColor);
+	CGColorRef aColorRef = CGColorCreate ( CGColorSpaceCreateWithName ( kCGColorSpaceGenericRGB ), aRGBAColor.AsArray() );
+	[ string addAttribute: attribute value: (id) aColorRef range: range ];
+	CGColorRelease( aColorRef );
 }
 
 +(void)addFont:(NSFont *)font toString:(NSMutableAttributedString *)string forRange:(NSRange)range {
commit 56b3b89a98a94a6c1d5c3bc9c41beb7457598ef1
Author: Jürgen Schmidt <jsc at apache.org>
Date:   Tue Feb 26 11:41:21 2013 +0000

    #111413# reintegrate resource strings for translation

diff --git a/formula/source/core/resource/core_resource.src b/formula/source/core/resource/core_resource.src
index 8369a7a..d723cb1 100644
--- a/formula/source/core/resource/core_resource.src
+++ b/formula/source/core/resource/core_resource.src
@@ -858,19 +858,19 @@ Resource RID_STRLIST_FUNCTION_NAMES
     };
     String SC_OPCODE_COSECANT
     {
-        Text  = "CSC" ;
+        Text [ en-US ]  = "CSC" ;
     };
     String SC_OPCODE_SECANT
     {
-        Text  = "SEC" ;
+        Text [ en-US ]  = "SEC" ;
     };
     String SC_OPCODE_COSECANT_HYP
     {
-        Text  = "CSCH" ;
+        Text [ en-US ]  = "CSCH" ;
     };
     String SC_OPCODE_SECANT_HYP
     {
-        Text  = "SECH" ;
+        Text [ en-US ]  = "SECH" ;
     };
     String SC_OPCODE_EXP
     {
diff --git a/sc/inc/helpids.h b/sc/inc/helpids.h
index 8dc055a..ca0a4d5 100644
--- a/sc/inc/helpids.h
+++ b/sc/inc/helpids.h
@@ -524,6 +524,10 @@
 #define HID_FUNC_COTHYP                                         "SC_HID_FUNC_COTHYP"
 #define HID_FUNC_TANHYP                                         "SC_HID_FUNC_TANHYP"
 #define HID_FUNC_ARCTAN2                                        "SC_HID_FUNC_ARCTAN2"
+#define HID_FUNC_COSECANT                                       "SC_HID_FUNC_COSECANT"
+#define HID_FUNC_SECANT                                         "SC_HID_FUNC_SECANT"
+#define HID_FUNC_SECANTHYP                                      "SC_HID_FUNC_SECANTHYP"
+#define HID_FUNC_COSECANTHYP                                    "SC_HID_FUNC_COSECANTHYP"
 #define HID_FUNC_DEG                                            "SC_HID_FUNC_DEG"
 #define HID_FUNC_RAD                                            "SC_HID_FUNC_RAD"
 #define HID_FUNC_EXP                                            "SC_HID_FUNC_EXP"
diff --git a/sc/source/ui/src/scfuncs.src b/sc/source/ui/src/scfuncs.src
index e147596..bec1b88 100644
--- a/sc/source/ui/src/scfuncs.src
+++ b/sc/source/ui/src/scfuncs.src
@@ -3647,8 +3647,103 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS1
             Text [ en-US ] = "The value for the y coordinate." ;
         };
     };
-
-     // -=*# Resource for function DEG #*=-
+    // -=*# Resource for function CSC #*=-
+    Resource SC_OPCODE_COSECANT
+    {
+        String 1 // Description
+        {
+            Text [ en-US ] = "Return the cosecant of an angle. CSC(x)=1/SIN(x)" ;
+        };
+        ExtraData =
+        {
+            0;
+            ID_FUNCTION_GRP_MATH;
+            U2S( HID_FUNC_COSECANT );
+            1; 0;
+            0;
+        };
+        String 2 // Name of Parameter 1
+        {
+            Text [ en-US ] = "Angle" ;
+        };
+        String 3 // Description of Parameter 1
+        {
+            Text [ en-US ] = "The angle in radians for which the cosecant is to be calculated." ;
+        };
+    };
+    // -=*# Resource for function SEC #*=-
+    Resource SC_OPCODE_SECANT
+    {
+        String 1 // Description
+        {
+            Text [ en-US ] = "Return the secant of an angle. SEC(x)=1/COS(x)" ;
+        };
+        ExtraData =
+        {
+            0;
+            ID_FUNCTION_GRP_MATH;
+            U2S( HID_FUNC_SECANT );
+            1; 0;
+            0;
+        };
+        String 2 // Name of Parameter 1
+        {
+            Text [ en-US ] = "Angle" ;
+        };
+        String 3 // Description of Parameter 1
+        {
+            Text [ en-US ] = "The angle in radians for which the secant is to be calculated." ;
+        };
+    };
+    // -=*# Resource for function CSCH #*=-
+    Resource SC_OPCODE_COSECANT_HYP
+    {
+        String 1 // Description
+        {
+            Text [ en-US ] = "Return the hyperbolic cosecant of a hyperbolic angle. CSCH(x)=1/SINH(x)" ;
+        };
+        ExtraData =
+        {
+            0;
+            ID_FUNCTION_GRP_MATH;
+            U2S( HID_FUNC_COSECANTHYP );
+            1; 0;
+            0;
+        };
+        String 2 // Name of Parameter 1
+        {
+            Text [ en-US ] = "Angle" ;
+        };
+        String 3 // Description of Parameter 1
+        {
+            Text [ en-US ] = "The hyperbolic angle in radians for which the hyperbolic cosecant is to be calculated." ;
+        };
+    };
+    // -=*# Resource for function SECH #*=-
+    Resource SC_OPCODE_SECANT_HYP
+    {
+        String 1 // Description
+        {
+            Text [ en-US ] = "Return the hyperbolic secant of a hyperbolic angle. SECH(x)=1/COSH(x)" ;
+        };
+        ExtraData =
+        {
+            0;
+            ID_FUNCTION_GRP_MATH;
+            U2S( HID_FUNC_SECANTHYP );
+            1; 0;
+            0;
+        };
+        String 2 // Name of Parameter 1
+        {
+            Text [ en-US ] = "Angle" ;
+        };
+        String 3 // Description of Parameter 1
+        {
+            Text [ en-US ] = "The hyperbolic angle in radians for which the hyperbolic secant is to be calculated." ;
+        };
+    };
+    // -=*# Resource for function DEG #*=-
     Resource SC_OPCODE_DEG
     {
         String 1 // Description
diff --git a/sc/util/hidother.src b/sc/util/hidother.src
index d1b5c71..7733a7b 100644
--- a/sc/util/hidother.src
+++ b/sc/util/hidother.src
@@ -191,6 +191,10 @@ hidspecial HID_FUNC_SINHYP       { HelpID = HID_FUNC_SINHYP; };
 hidspecial HID_FUNC_COTHYP       { HelpID = HID_FUNC_COTHYP; };
 hidspecial HID_FUNC_TANHYP       { HelpID = HID_FUNC_TANHYP; };
 hidspecial HID_FUNC_ARCTAN2      { HelpID = HID_FUNC_ARCTAN2; };
+hidspecial HID_FUNC_COSECANT     { HelpID = HID_FUNC_COSECANT; };
+hidspecial HID_FUNC_SECANT       { HelpID = HID_FUNC_SECANT; };
+hidspecial HID_FUNC_COSECANTHYP  { HelpID = HID_FUNC_COSECANTHYP; };
+hidspecial HID_FUNC_SECANTHYP    { HelpID = HID_FUNC_SECANTHYP; };
 hidspecial HID_FUNC_DEG      { HelpID = HID_FUNC_DEG; };
 hidspecial HID_FUNC_RAD      { HelpID = HID_FUNC_RAD; };
 hidspecial HID_FUNC_EXP      { HelpID = HID_FUNC_EXP; };
commit 66deeda7b2b72300be6b82aaaffb56c6b4b7fd92
Author: Jürgen Schmidt <jsc at apache.org>
Date:   Tue Feb 26 08:24:50 2013 +0000

    fix warning as error, comparison uInt/Int

diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 6e9e9d0..5632dad 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -5746,7 +5746,7 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape >& rXShape, Esc
             std::vector< std::pair< sal_Int32, sal_Int32 > > aRows;
 
             awt::Point aPosition( ImplMapPoint( rXShape->getPosition() ) );
-            sal_uInt32 nPosition = aPosition.X;
+            sal_Int32 nPosition = aPosition.X;
             for ( sal_Int32 x = 0; x < nColumnCount; x++ )
             {
                 uno::Reference< beans::XPropertySet > xPropSet( xColumns->getByIndex( x ), uno::UNO_QUERY_THROW );
commit efd64ff0a59f4860554e439b59d37b934af632dc
Author: Jürgen Schmidt <jsc at apache.org>
Date:   Tue Feb 26 07:28:29 2013 +0000

    fix warning as error, change order of varaible initialization

diff --git a/filter/source/xsltfilter/uof2splithandler.cxx b/filter/source/xsltfilter/uof2splithandler.cxx
index 5c6e42f..869b92b 100644
--- a/filter/source/xsltfilter/uof2splithandler.cxx
+++ b/filter/source/xsltfilter/uof2splithandler.cxx
@@ -48,8 +48,8 @@ using namespace ::rtl;
 UOF2SplitHandler::UOF2SplitHandler(
         ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rMultiFactory,
         ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& rStream )
-: m_rMultiFactory( rMultiFactory )
-, m_rStream( rStream )
+: m_rStream( rStream )
+, m_rMultiFactory( rMultiFactory )
 , m_bIsStart( sal_False )
 {
     _Init();
@@ -240,4 +240,4 @@ void UOF2SplitHandler::namespaceMap( const ::com::sun::star::uno::Reference< ::c
             }
         }
     }
-}
\ No newline at end of file
+}


More information about the Libreoffice-commits mailing list