[Libreoffice-commits] .: vcl/aqua

2013-01-29 Thread Libreoffice Gerrit user
 vcl/aqua/source/app/salinst.cxx |   16 ++--
 1 file changed, 6 insertions(+), 10 deletions(-)

New commits:
commit d841273ba54b173020aa8da18ba7841cf950c13c
Author: Stephan Bergmann sberg...@redhat.com
Date:   Tue Jan 29 13:28:48 2013 +0100

Do not call putenv with a temporary string argument

These bad calls to putenv suddenly caused the buildIdFile string 
(macro-expanded
from bootstraprc's UserInstallation) in cleanExtensionCache
(desktop/source/app/app.cxx) to contain nonsense at least in a local
libreoffice-4-0-0 of mine, as getenv(UserInstallation) started to return 
some
non-null pointer pointing to garbage.

Change-Id: Ib93fd4e1caef016bd0e00bf09800b9532824ac4b

diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx
index 6ff8aea..cb715ca 100644
--- a/vcl/aqua/source/app/salinst.cxx
+++ b/vcl/aqua/source/app/salinst.cxx
@@ -306,7 +306,6 @@ void InitSalMain()
 rtl::OString aResPath( getenv( STAR_RESOURCEPATH ) );
 rtl::OString aLibPath( getenv( DYLD_LIBRARY_PATH ) );
 rtl::OString aCmdPath( OUStringToOString(OUString(sysWorkDir), 
RTL_TEXTENCODING_UTF8).getStr() );
-rtl::OString aTmpPath;
 // Get absolute path of command's directory
 if ( !aCmdPath.isEmpty() ) {
 DirEntry aCmdDirEntry( aCmdPath );
@@ -316,32 +315,29 @@ void InitSalMain()
 // Assign to PATH environment variable
 if ( !aCmdPath.isEmpty() )
 {
-aTmpPath = rtl::OString( PATH= );
-aTmpPath += aCmdPath;
+rtl::OString aTmpPath( aCmdPath );
 if ( !aPath.isEmpty() )
 aTmpPath += rtl::OUStringToOString( 
DirEntry::GetSearchDelimiter(), RTL_TEXTENCODING_ASCII_US );
 aTmpPath += aPath;
-putenv( (char*)aTmpPath.getStr() );
+setenv( PATH, aTmpPath.getStr(), 1 );
 }
 // Assign to STAR_RESOURCEPATH environment variable
 if ( !aCmdPath.isEmpty() )
 {
-aTmpPath = rtl::OString( STAR_RESOURCEPATH= );
-aTmpPath += aCmdPath;
+rtl::OString aTmpPath( aCmdPath );
 if ( !aResPath.isEmpty() )
 aTmpPath += rtl::OUStringToOString( 
DirEntry::GetSearchDelimiter(), RTL_TEXTENCODING_ASCII_US );
 aTmpPath += aResPath;
-putenv( (char*)aTmpPath.getStr() );
+setenv( STAR_RESOURCEPATH, aTmpPath.getStr(), 1 );
 }
 // Assign to DYLD_LIBRARY_PATH environment variable
 if ( !aCmdPath.isEmpty() )
 {
-aTmpPath = rtl::OString( DYLD_LIBRARY_PATH= );
-aTmpPath += aCmdPath;
+rtl::OString aTmpPath( aCmdPath );
 if ( !aLibPath.isEmpty() )
 aTmpPath += rtl::OUStringToOString( 
DirEntry::GetSearchDelimiter(), RTL_TEXTENCODING_ASCII_US );
 aTmpPath += aLibPath;
-putenv( (char*)aTmpPath.getStr() );
+setenv( DYLD_LIBRARY_PATH, aTmpPath.getStr(), 1 );
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua

2013-01-28 Thread Libreoffice Gerrit user
 vcl/aqua/source/gdi/atsui/salatslayout.cxx |   62 -
 1 file changed, 53 insertions(+), 9 deletions(-)

New commits:
commit 6f0de1a4ebcc2b9b88b66f2e0f1608ccd7b680eb
Author: Tor Lillqvist t...@iki.fi
Date:   Mon Jan 28 22:56:10 2013 +0200

Sprinkle some SAL_INFO debugging output

To make it easier to compare to what goes on in the corresponding
CoreText layout code.

Change-Id: I18478cb7e28827a512b50573c8f7ac84b1cf1ece

diff --git a/vcl/aqua/source/gdi/atsui/salatslayout.cxx 
b/vcl/aqua/source/gdi/atsui/salatslayout.cxx
index 1c6dafd..a096fa5 100644
--- a/vcl/aqua/source/gdi/atsui/salatslayout.cxx
+++ b/vcl/aqua/source/gdi/atsui/salatslayout.cxx
@@ -146,12 +146,18 @@ ATSLayout::ATSLayout( ATSUStyle rATSUStyle, float 
fFontScale )
 mpDeltaY( NULL ),
 mpFallbackInfo( NULL ),
 mnBaseAdv( 0 )
-{}
+{
+SAL_INFO(vcl.atsui.layout, ATSLayout(): FontScale=  mfFontScale   
  this);
+}
 
 // ---
 
 ATSLayout::~ATSLayout()
 {
+SAL_INFO(vcl.atsui.layout, ~ATSLayout(  this  ) 
+ (maATSULayout == NULL ?  LayoutText() (or AdjustLayout()) never 
got called! : ) 
+ (mnGlyphCount  0 ?  InitGIA() never got called! :  ) );
+
 if( mpDeltaY )
 ATSUDirectReleaseLayoutDataArrayPtr( NULL,
 kATSUDirectDataBaselineDeltaFixedArray, (void**)mpDeltaY );
@@ -208,6 +214,9 @@ inline Fixed ATSLayout::Vcl2Fixed( int nPixel ) const
 **/
 bool ATSLayout::LayoutText( ImplLayoutArgs rArgs )
 {
+SAL_INFO(vcl.atsui.layout, LayoutText(  this  ):  
+ rArgs.mnLength  :  rArgs.mnMinCharPos  --  
rArgs.mnEndCharPos);
+
 if( maATSULayout )
 ATSUDisposeTextLayout( maATSULayout );
 
@@ -295,6 +304,8 @@ bool ATSLayout::LayoutText( ImplLayoutArgs rArgs )
 **/
 void ATSLayout::AdjustLayout( ImplLayoutArgs rArgs )
 {
+SAL_INFO(vcl.atsui.layout, AdjustLayout(  this  ):  
+ rArgs.mnLength  :  rArgs.mnMinCharPos  --  
rArgs.mnEndCharPos  , width=  rArgs.mnLayoutWidth);
 int nOrigWidth = GetTextWidth();
 int nPixelWidth = rArgs.mnLayoutWidth;
 if( !nPixelWidth  rArgs.mpDXArray ) {
@@ -611,6 +622,9 @@ int ATSLayout::GetNextGlyphs( int nLen, sal_GlyphId* 
pGlyphIDs, Point rPos, int
 **/
 long ATSLayout::GetTextWidth() const
 {
+SAL_INFO(vcl.atsui.layout, GetTextWidth(  this  ): CharCount=  
mnCharCount 
+ (maATSULayout == NULL ?  null layout!? : ));
+
 if( mnCharCount = 0 )
 return 0;
 
@@ -627,9 +641,12 @@ long ATSLayout::GetTextWidth() const
 ItemCount nMaxBounds = 0;
 OSStatus err = ATSUGetGlyphBounds( maATSULayout, 0, 0, mnMinCharPos, 
mnCharCount,
 eTypeOfBounds, 0, NULL, nMaxBounds );
-if( (err != noErr)
-||  (nMaxBounds = 0) )
+if( (err != noErr) ||  (nMaxBounds = 0) ) {
+SAL_INFO(vcl.atsui.layout, GetTextWidth():  
+ (err != noErr ? ATSUGetGlyphBounds() failed : 
nMaxBounds = 0) 
+ , returning 0);
 return 0;
+}
 
 // get the trapezoids
 typedef std::vectorATSTrapezoid TrapezoidVector;
@@ -637,8 +654,10 @@ long ATSLayout::GetTextWidth() const
 ItemCount nBoundsCount = 0;
 err = ATSUGetGlyphBounds( maATSULayout, 0, 0, mnMinCharPos, 
mnCharCount,
 eTypeOfBounds, nMaxBounds, aTrapezoidVector[0], nBoundsCount );
-if( err != noErr )
+if( err != noErr ) {
+SAL_INFO(vcl.atsui.layout, GetTextWidth(): ATSUGetGlyphBounds() 
failed case 2, returning 0);
 return 0;
+}
 
 DBG_ASSERT( (nBoundsCount = nMaxBounds), ATSLayout::GetTextWidth() : 
too many trapezoids !\n);
 
@@ -661,6 +680,8 @@ long ATSLayout::GetTextWidth() const
 
 int nScaledWidth = Fixed2Vcl( mnCachedWidth );
 nScaledWidth += mnTrailingSpaceWidth;
+
+SAL_INFO(vcl.atsui.layout, GetTextWidth() returning nScaledWidth=  
nScaledWidth);
 return nScaledWidth;
 }
 
@@ -716,6 +737,9 @@ long ATSLayout::FillDXArray( sal_Int32* pDXArray ) const
 **/
 int ATSLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) 
const
 {
+SAL_INFO(vcl.atsui.layout, GetTextBreak(  this  ,  nCharExtra 
 ,  nFactor  ) 
+ (maATSULayout == NULL ?  no layout : ));
+
 if( !maATSULayout )
 return STRING_LEN;
 
@@ -746,8 +770,10 @@ int ATSLayout::GetTextBreak( long nMaxWidth, long 
nCharExtra, int nFactor ) cons
 
 // get a quick overview on what could fit
 const long nPixelWidth = (nMaxWidth - (nCharExtra * mnCharCount)) / 
nFactor;
-if( nPixelWidth = 0 )
+if( nPixelWidth = 0 ) {
+SAL_INFO(vcl.atsui.layout, GetTextBreak(): nPixelWidth=  
nPixelWidth  , returning mnMinCharPos=  mnMinCharPos);
 return mnMinCharPos;
+}
 
 // check assumptions
 DBG_ASSERT( !mnTrailingSpaceWidth, ATSLayout::GetTextBreak() with 
nTSW!=0 );
@@ -755,8 +781,14 @@ int 

[Libreoffice-commits] .: vcl/aqua

2013-01-22 Thread Libreoffice Gerrit user
 vcl/aqua/source/gdi/aquaprintaccessoryview.mm |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit c260dda82a05f5496634eab1deefd5e9f22c4b02
Author: Tor Lillqvist t...@iki.fi
Date:   Wed Jan 23 08:09:58 2013 +0200

More informative warning messages

Change-Id: Ib6d94e6e695d4c675c05954fbf28af61bbaa05fe

diff --git a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm 
b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
index 3dba1c4..190e16e 100644
--- a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
+++ b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
@@ -513,7 +513,7 @@ static void filterAccelerator( rtl::OUString io_rText )
 }
 else
 {
-OSL_FAIL( unsupported class );
+SAL_INFO( vcl.aqua.print, Unsupported class  ([pSender class] ? 
[NSStringFromClass([pSender class]) UTF8String] : nil));
 }
 mpController-updateEnableState();
 }
@@ -545,7 +545,7 @@ static void filterAccelerator( rtl::OUString io_rText )
 }
 else
 {
-OSL_FAIL( unsupported class );
+SAL_INFO( vcl.aqua.print, Unsupported class  ([pSender class] ? 
[NSStringFromClass([pSender class]) UTF8String] : nil));
 }
 mpController-updateEnableState();
 }
@@ -1357,7 +1357,7 @@ static void addEdit( NSView* pCurParent, long rCurX, 
long rCurY, long nAttachO
 }
 else
 {
-OSL_FAIL( Unsupported UI option );
+SAL_INFO( vcl.aqua.print, Unsupported UI option \  
aCtrlType  \);
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua vcl/inc vcl/ios

2013-01-19 Thread Libreoffice Gerrit user
 vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx |6 -
 vcl/aqua/source/gdi/coretext/salcoretextlayout.cxx|   55 --
 vcl/aqua/source/gdi/coretext/salcoretextstyle.cxx |   16 ++---
 vcl/aqua/source/gdi/coretext/salgdi.cxx   |   30 -
 vcl/inc/aqua/common.h |6 -
 vcl/inc/ios/common.h  |6 -
 vcl/ios/source/gdi/salcoretextfontutils.cxx   |6 -
 vcl/ios/source/gdi/salcoretextlayout.cxx  |   55 --
 vcl/ios/source/gdi/salcoretextstyle.cxx   |   16 ++---
 vcl/ios/source/gdi/salgdi.cxx |   30 -
 10 files changed, 100 insertions(+), 126 deletions(-)

New commits:
commit fcf7f3596054f24bebf767f9cabfc96dfa577480
Author: Tor Lillqvist t...@iki.fi
Date:   Sat Jan 19 10:44:33 2013 +0200

Use SAL_INFO instead of home-grown msgs_debug

If there is a need to optionally get a thread identifier or the
function name into logging output (as msgs_debug did), we should
figure out a way to do that in some elegant fashion in the sal logging
macros instead of using some local solution in just one place in the
code.

Yes, the iOS and OS X CoreText code should be de-duplicated. Will
happen soon.

diff --git a/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx 
b/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx
index 4646e77..f14e9c7 100644
--- a/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx
+++ b/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx
@@ -274,7 +274,7 @@ CoreTextPhysicalFontFace::CoreTextPhysicalFontFace( const 
ImplDevFontAttributes
 ,   m_bHasCJKSupport( false )
 ,   m_bFontCapabilitiesRead( false )
 {
-msgs_debug(font,retain %p as %p,font, m_CTFontRef);
+SAL_INFO( vcl.coretext.font, retain   font   as   m_CTFontRef 
);
 }
 
 CoreTextPhysicalFontFace::~CoreTextPhysicalFontFace()
@@ -283,7 +283,7 @@ CoreTextPhysicalFontFace::~CoreTextPhysicalFontFace()
 {
 m_pCharMap-DeReference();
 }
-msgs_debug(font,release font %p, m_CTFontRef);
+SAL_INFO( vcl.coretext.font, release   m_CTFontRef );
 SafeCFRelease(m_CTFontRef);
 }
 
@@ -297,7 +297,7 @@ PhysicalFontFace* CoreTextPhysicalFontFace::Clone() const
 if( m_CTFontRef )
 {
 pClone-m_CTFontRef = (CTFontRef)CFRetain(m_CTFontRef);
-msgs_debug(font,clone ref %p into %p, m_CTFontRef, 
pClone-m_CTFontRef);
+SAL_INFO( vcl.coretext.font, clone   m_CTFontRef   into   
pClone-m_CTFontRef );
 }
 return pClone;
 }
diff --git a/vcl/aqua/source/gdi/coretext/salcoretextlayout.cxx 
b/vcl/aqua/source/gdi/coretext/salcoretextlayout.cxx
index 32b547b..e20bcba 100644
--- a/vcl/aqua/source/gdi/coretext/salcoretextlayout.cxx
+++ b/vcl/aqua/source/gdi/coretext/salcoretextlayout.cxx
@@ -53,14 +53,14 @@ CoreTextLayout::~CoreTextLayout()
 
 void CoreTextLayout::AdjustLayout( ImplLayoutArgs /*rArgs*/ )
 {
-msgs_debug(layout,--);
-msgs_debug(layout,--);
+SAL_INFO( vcl.coretext.layout, -- );
+SAL_INFO( vcl.coretext.layout, -- );
 /* TODO */
 }
 
 void CoreTextLayout::Clean()
 {
-msgs_debug(layout,--);
+SAL_INFO( vcl.coretext.layout, -- );
 if(m_glyphs)
 {
 delete[] m_glyphs;
@@ -94,12 +94,12 @@ void CoreTextLayout::Clean()
 SafeCFRelease(m_typesetter);
 SafeCFRelease(m_line);
 m_has_bound_rec = false;
-msgs_debug(layout,--);
+SAL_INFO( vcl.coretext.layout, -- );
 }
 
 void CoreTextLayout::DrawText( SalGraphics rGraphics ) const
 {
-msgs_debug(layout,--);
+SAL_INFO( vcl.coretext.layout, -- );
 AquaSalGraphics gr = static_castAquaSalGraphics(rGraphics);
 if(m_chars_count = 0 || !gr.CheckContext())
 {
@@ -108,19 +108,18 @@ void CoreTextLayout::DrawText( SalGraphics rGraphics ) 
const
 CGContextSaveGState( gr.mrContext );
 Point pos = GetDrawPosition(Point(0,0));
 #if 0
-msgs_debug(layout,at pos (%ld, %ld), pos.X(), pos.Y());
+SAL_INFO( vcl.coretext.layout, at pos (  pos.X()  ,  pos.Y() 
 ) );
 CGContextSetTextMatrix(gr.mrContext, CGAffineTransformMakeScale(1.0, 
-1.0));
 CGContextSetShouldAntialias( gr.mrContext, !gr.mbNonAntialiasedText );
 CGContextSetTextPosition(gr.mrContext, pos.X(), pos.Y());
 CTLineDraw(m_line, gr.mrContext);
 #else
 InitGIA();
-msgs_debug(layout,at- pos (%ld, %ld) ctfont=%p, pos.X(), pos.Y(),
-   m_style-GetFont());
+SAL_INFO( vcl.coretext.layout, at pos (  pos.X()  ,  pos.Y() 
) ctfont=  m_style-GetFont() );
 CGFontRef cg_font = CTFontCopyGraphicsFont(m_style-GetFont(), NULL);
 if(!cg_font)
 {
-msgs_debug(layout, Error cg_font is %s, NULL);
+SAL_INFO( vcl.coretext.layout, Error cg_font is NULL );
 return;
 }
 CGContextSetFont(gr.mrContext, cg_font);
@@ -144,7 +143,7 @@ void CoreTextLayout::DrawText( SalGraphics rGraphics ) 
const
 #endif
 // restore the original 

[Libreoffice-commits] .: vcl/aqua

2013-01-19 Thread Libreoffice Gerrit user
 vcl/aqua/source/gdi/atsui/salgdi.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit dc44862f0e711fe0cf93063f72ebe1dec598d922
Author: Tor Lillqvist t...@iki.fi
Date:   Sun Jan 20 00:47:24 2013 +0200

Fix fallout from my earlier vcl changes today

Change-Id: Iee869d254944383994d9c8da73603b71cafe85b8

diff --git a/vcl/aqua/source/gdi/atsui/salgdi.cxx 
b/vcl/aqua/source/gdi/atsui/salgdi.cxx
index 44281fb..904ba91 100644
--- a/vcl/aqua/source/gdi/atsui/salgdi.cxx
+++ b/vcl/aqua/source/gdi/atsui/salgdi.cxx
@@ -35,9 +35,7 @@
 #include vcl/sysdata.hxx
 #include vcl/svapp.hxx
 
-#include aqua/salconst.h
 #include aqua/atsui/salgdi.h
-#include aqua/salbmp.h
 #include aqua/salframe.h
 #include aqua/salcolorutils.hxx
 #include aqua/atsui/salatsuifontutils.hxx
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua

2013-01-08 Thread Libreoffice Gerrit user
 vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx |   64 +-
 1 file changed, 32 insertions(+), 32 deletions(-)

New commits:
commit 0b8352aaf9fc4704ac89def9993b0176c84e73db
Author: Tor Lillqvist t...@iki.fi
Date:   Tue Jan 8 11:41:48 2013 +0200

More fallout from the ImplFontAttributes privatisation

Please, no more pointless changes like that. Or if you insist, please
do the required tedious changes in *all* affected source files (also
platforms/configurations that you don't build). They could in this
case, to a large exent, have been done blindly in a mechanical
fashion even without being able to build on all platforms.

diff --git a/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx 
b/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx
index f29996f..4646e77 100644
--- a/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx
+++ b/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx
@@ -31,12 +31,12 @@ static bool GetDevFontAttributes( CTFontDescriptorRef 
font_descriptor, ImplDevFo
 int value = 0;
 
 // reset the attributes
-rDFA.meFamily = FAMILY_DONTKNOW;
-rDFA.mePitch  = PITCH_VARIABLE;
-rDFA.meWidthType  = WIDTH_NORMAL;
-rDFA.meWeight = WEIGHT_NORMAL;
-rDFA.meItalic = ITALIC_NONE;
-rDFA.mbSymbolFlag = false;
+rDFA.SetFamilyType( FAMILY_DONTKNOW );
+rDFA.SetPitch( PITCH_VARIABLE );
+rDFA.SetWidthType( WIDTH_NORMAL );
+rDFA.SetWeight( WEIGHT_NORMAL );
+rDFA.SetItalic( ITALIC_NONE );
+rDFA.SetSymbolFlag( false );
 rDFA.mbOrientation = true;
 rDFA.mbDevice  = true;
 rDFA.mnQuality = 0;
@@ -66,7 +66,7 @@ static bool GetDevFontAttributes( CTFontDescriptorRef 
font_descriptor, ImplDevFo
 rDFA.mbEmbeddable   = false;
 
 CFStringRef family_name = 
(CFStringRef)CTFontDescriptorCopyAttribute(font_descriptor, 
kCTFontFamilyNameAttribute);
-rDFA.maName = GetOUString(family_name);
+rDFA.SetFamilyName( GetOUString(family_name) );
 CFRelease(family_name);
 
 CFDictionaryRef traits = 
(CFDictionaryRef)CTFontDescriptorCopyAttribute(font_descriptor, 
kCTFontTraitsAttribute);
@@ -76,31 +76,31 @@ static bool GetDevFontAttributes( CTFontDescriptorRef 
font_descriptor, ImplDevFo
 
 if(value  kCTFontMonoSpaceTrait)
 {
-rDFA.mePitch = PITCH_FIXED;
+rDFA.SetPitch( PITCH_FIXED );
 }
 
 if(value  kCTFontItalicTrait)
 {
-rDFA.meItalic = ITALIC_NORMAL;
+rDFA.SetItalic( ITALIC_NORMAL );
 }
 
 if(value  kCTFontBoldTrait)
 {
-rDFA.meWeight = WEIGHT_BOLD;
+rDFA.SetWeight( WEIGHT_BOLD );
 }
 
 if(value  kCTFontCondensedTrait)
 {
-rDFA.meWidthType = WIDTH_CONDENSED;
+rDFA.SetWidthType( WIDTH_CONDENSED );
 }
 else if(value  kCTFontExpandedTrait)
 {
-rDFA.meWidthType = WIDTH_EXPANDED;
+rDFA.SetWidthType( WIDTH_EXPANDED );
 }
 switch(value  kCTFontClassMaskTrait)
 {
 case kCTFontOldStyleSerifsClass:
-rDFA.meFamily = FAMILY_ROMAN;
+rDFA.SetFamilyType( FAMILY_ROMAN );
 break;
 case kCTFontTransitionalSerifsClass:
 case kCTFontModernSerifsClass:
@@ -109,15 +109,15 @@ static bool GetDevFontAttributes( CTFontDescriptorRef 
font_descriptor, ImplDevFo
 case kCTFontFreeformSerifsClass:
 break;
 case kCTFontSansSerifClass:
-rDFA.meFamily = FAMILY_SWISS;
+rDFA.SetFamilyType( FAMILY_SWISS );
 case kCTFontOrnamentalsClass:
-rDFA.meFamily = FAMILY_DECORATIVE;
+rDFA.SetFamilyType( FAMILY_DECORATIVE );
 break;
 case kCTFontScriptsClass:
-rDFA.meFamily = FAMILY_SCRIPT;
+rDFA.SetFamilyType( FAMILY_SCRIPT );
 break;
 case kCTFontSymbolicClass:
-rDFA.mbSymbolFlag = true;
+rDFA.SetSymbolFlag( true );
 break;
 }
 
@@ -126,39 +126,39 @@ static bool GetDevFontAttributes( CTFontDescriptorRef 
font_descriptor, ImplDevFo
 CFNumberGetValue(weight, kCFNumberFloatType, fdval);
 if(fdval  0.6)
 {
-rDFA.meWeight = WEIGHT_BLACK;
+rDFA.SetWeight( WEIGHT_BLACK );
 }
 else if(fdval  0.4)
 {
-rDFA.meWeight = WEIGHT_ULTRABOLD;
+rDFA.SetWeight( WEIGHT_ULTRABOLD );
 }
 else if (fdval  0.3)
 {
-rDFA.meWeight = WEIGHT_BOLD;
+rDFA.SetWeight( WEIGHT_BOLD );
 }
 else if (fdval  0.0)
 {
-rDFA.meWeight = WEIGHT_SEMIBOLD;
+rDFA.SetWeight( WEIGHT_SEMIBOLD );
 }
 else if (fdval = -0.8)
 {
-rDFA.meWeight = WEIGHT_ULTRALIGHT;
+rDFA.SetWeight( WEIGHT_ULTRALIGHT );
 }
 else if (fdval = -0.4)
 {
-rDFA.meWeight = WEIGHT_LIGHT;
+rDFA.SetWeight( WEIGHT_LIGHT );
 }
 else if (fdval = -0.3)
 {
-rDFA.meWeight = WEIGHT_SEMILIGHT;
+rDFA.SetWeight( WEIGHT_SEMILIGHT );
 }
 else if (fdval = -0.2)
 {
-rDFA.meWeight = 

[Libreoffice-commits] .: vcl/aqua vcl/inc

2013-01-03 Thread Libreoffice Gerrit user
 vcl/aqua/source/window/salframe.cxx|   58 -
 vcl/aqua/source/window/salframeview.mm |   37 -
 vcl/inc/aqua/salframeview.h|2 -
 3 files changed, 97 deletions(-)

New commits:
commit 15938c2480a0de8c3ce5bc7289cf3df2d73918ac
Author: Tor Lillqvist t...@iki.fi
Date:   Thu Jan 3 21:55:35 2013 +0200

fdo#58963: Revert fdo#39983: Support Mac OS X 10.7 full-screen mode

It caused breakage of the existing slide-show full-screen mode. So
let's revert for now.

diff --git a/vcl/aqua/source/window/salframe.cxx 
b/vcl/aqua/source/window/salframe.cxx
index 388dffd..da36cfa 100644
--- a/vcl/aqua/source/window/salframe.cxx
+++ b/vcl/aqua/source/window/salframe.cxx
@@ -46,25 +46,6 @@
 #include Carbon/Carbon.h
 #include postmac.h
 
-#if MACOSX_SDK_VERSION  1070
-
-enum {
-NSFullScreenWindowMask = (1  14)
-};
-
-enum {
-NSWindowCollectionBehaviorFullScreenPrimary = (1  7),
-NSWindowCollectionBehaviorFullScreenAuxiliary = (1  8)
-};
-
-#if MACOSX_SDK_VERSION  1050
-
-typedef NSUInteger NSWindowCollectionBehavior;
-
-#endif
-
-#endif
-
 using namespace std;
 
 // ===
@@ -214,31 +195,6 @@ void AquaSalFrame::initWindowAndView()
 return;
 }
 
-// On 10.7 and later, if the window is suitable and is
-// resizable, we make it full-screenable.
-
-bool bAllowFullScreen = (0 == (mnStyle  (SAL_FRAME_STYLE_DIALOG | 
SAL_FRAME_STYLE_TOOLTIP | SAL_FRAME_STYLE_SYSTEMCHILD | SAL_FRAME_STYLE_FLOAT | 
SAL_FRAME_STYLE_TOOLWINDOW | SAL_FRAME_STYLE_INTRO)));
-bAllowFullScreen = (0 == (~mnStyle  (SAL_FRAME_STYLE_SIZEABLE)));
-bAllowFullScreen = (mpParent == NULL);
-
-if (GetSalData()-mnSystemVersion = 0x1070 
-   ((mnStyleMask  NSTitledWindowMask)  (mnStyleMask  
NSResizableWindowMask))) {
-
-// Hmm. The docs say that one should use NSInvocation whenever
-// the method does not return an object. collectionBehavior
-// returns an NSWindowCollectionBehavior (NSUInteger). So
-// should I? Or maybe I should just use the low-level
-// objc_msgSend()?
-NSWindowCollectionBehavior behavior = (NSWindowCollectionBehavior) 
[mpWindow performSelector: @selector(collectionBehavior)];
-
-SAL_INFO(vcl.macosx, OSL_THIS_FUNC  : bAllowFullScreen=  
bAllowFullScreen  , behavior=  hex  behavior);
-
-[mpWindow performSelector: @selector(setCollectionBehavior:) 
withObject: (id) (behavior | (bAllowFullScreen ? 
NSWindowCollectionBehaviorFullScreenPrimary : 
NSWindowCollectionBehaviorFullScreenAuxiliary))];
-
-behavior = (NSWindowCollectionBehavior) [mpWindow performSelector: 
@selector(collectionBehavior)];
-SAL_INFO(vcl.macosx, OSL_THIS_FUNC  : after 
setCollectionBehavior: behavior=  hex  behavior);
-}
-
 if( (mnStyle  SAL_FRAME_STYLE_TOOLTIP) )
 [mpWindow setIgnoresMouseEvents: YES];
 else
@@ -791,20 +747,6 @@ void AquaSalFrame::ShowFullScreen( sal_Bool bFullScreen, 
sal_Int32 nDisplay )
 
 mbFullScreen = bFullScreen;
 
-if (GetSalData()-mnSystemVersion = 0x1070) {
-// If the system full-screen state already is our desired, do nothing
-if ((([mpWindow styleMask]  NSFullScreenWindowMask) == 
NSFullScreenWindowMask) == mbFullScreen)
-return;
-
-SAL_INFO(vcl.macosx, OSL_THIS_FUNC  : calling 
toggleFullScreen());
-
-// Otherwise toggle the system full-screen state
-[mpWindow performSelector: @selector(toggleFullScreen:)];
-
-// Nothing more to do?
-return;
-}
-
 if( bFullScreen )
 {
 // hide the dock and the menubar if we are on the menu screen
diff --git a/vcl/aqua/source/window/salframeview.mm 
b/vcl/aqua/source/window/salframeview.mm
index 621b982..d6861a4 100644
--- a/vcl/aqua/source/window/salframeview.mm
+++ b/vcl/aqua/source/window/salframeview.mm
@@ -273,43 +273,6 @@ static AquaSalFrame* getMouseContainerFrame()
 }
 }
 
--(void)windowDidEnterFullScreen: (NSNotification*)pNotification
-{
-(void)pNotification;
-YIELD_GUARD;
-
-if( !mpFrame || !AquaSalFrame::isAlive( mpFrame))
-return;
-
-SAL_INFO(vcl.macosx, OSL_THIS_FUNC  : mbFullScreen was   
mpFrame-mbFullScreen);
-
-mpFrame-mbFullScreen = true;
-}
-
--(void)windowDidExitFullScreen: (NSNotification*)pNotification
-{
-(void)pNotification;
-YIELD_GUARD;
-
-if( !mpFrame || !AquaSalFrame::isAlive( mpFrame))
-return;
-
-SAL_INFO(vcl.macosx, OSL_THIS_FUNC  : mbFullScreen was   
mpFrame-mbFullScreen);
-
-mpFrame-mbFullScreen = false;
-
-// Without this, if viewing the Start Centre in the system
-// full-screen state, when going back using the system's
-// unfulscreen menubar button, the Start Centre ends up
-// garbled. For some reason the same doesn't happen in Writer,
-// Calc etc.
-if( mpFrame-mbShown )
-{
-

[Libreoffice-commits] .: vcl/aqua vcl/inc

2012-12-21 Thread Libreoffice Gerrit user
 vcl/aqua/source/window/salframe.cxx|   54 +
 vcl/aqua/source/window/salframeview.mm |   37 ++
 vcl/inc/aqua/salframeview.h|2 +
 3 files changed, 93 insertions(+)

New commits:
commit b2e5a39babba902707dab28d81b843d1aef055dc
Author: Tor Lillqvist t...@iki.fi
Date:   Fri Dec 21 15:26:36 2012 +0200

fdo#39983: Support Mac OS X 10.7 full-screen mode

Should be good enough for now, at least doesn't break any existing
functionality if you don't use the system provided full-screen
buttons. Should continue to compile against older SDKs but still work
also on newer OSes.

There are some known glitches. For instance if you choose View:Full
Screen, the window does go into the system full-screen state, but if
you then use the system unfullscreen button on the (now no longer
disabled, but hidden) menubar, LO keeps displaying its own small
floating unfullscreen dialog...

I also occasionally managed to get some menus in the menubar borked
with no text!? But as traditionally a full-screened LO has no menubar
at all, technically that isn't a regression;)

Partially based on my own old patch, partially on
http://svn.apache.org/viewvc?view=revisionrevision=1423520 ,
http://svn.apache.org/viewvc?view=revisionrevision=1423523 by Herbert
Duerr h...@apache.org.

Change-Id: I546c58f7cee9f8cb6c746eb014d8d5a8af3619cb

diff --git a/vcl/aqua/source/window/salframe.cxx 
b/vcl/aqua/source/window/salframe.cxx
index 5aa6f0f..b836784 100644
--- a/vcl/aqua/source/window/salframe.cxx
+++ b/vcl/aqua/source/window/salframe.cxx
@@ -46,6 +46,18 @@
 #include Carbon/Carbon.h
 #include postmac.h
 
+#if !defined(MAC_OS_X_VERSION_10_7)
+
+enum {
+NSFullScreenWindowMask = (1  14)
+};
+
+enum {
+NSWindowCollectionBehaviorFullScreenPrimary = (1  7),
+NSWindowCollectionBehaviorFullScreenAuxiliary = (1  8)
+};
+
+#endif
 
 using namespace std;
 
@@ -196,6 +208,31 @@ void AquaSalFrame::initWindowAndView()
 return;
 }
 
+// On 10.7 and later, if the window is suitable and is
+// resizable, we make it full-screenable.
+
+bool bAllowFullScreen = (0 == (mnStyle  (SAL_FRAME_STYLE_DIALOG | 
SAL_FRAME_STYLE_TOOLTIP | SAL_FRAME_STYLE_SYSTEMCHILD | SAL_FRAME_STYLE_FLOAT | 
SAL_FRAME_STYLE_TOOLWINDOW | SAL_FRAME_STYLE_INTRO)));
+bAllowFullScreen = (0 == (~mnStyle  (SAL_FRAME_STYLE_SIZEABLE)));
+bAllowFullScreen = (mpParent == NULL);
+
+if (GetSalData()-mnSystemVersion = 0x1070 
+   ((mnStyleMask  NSTitledWindowMask)  (mnStyleMask  
NSResizableWindowMask))) {
+
+// Hmm. The docs say that one should use NSInvocation whenever
+// the method does not return an object. collectionBehavior
+// returns an NSWindowCollectionBehavior (NSUInteger). So
+// should I? Or maybe I should just use the low-level
+// objc_msgSend()?
+NSWindowCollectionBehavior behavior = (NSWindowCollectionBehavior) 
[mpWindow performSelector: @selector(collectionBehavior)];
+
+SAL_INFO(vcl.macosx, OSL_THIS_FUNC  : bAllowFullScreen=  
bAllowFullScreen  , behavior=  hex  behavior);
+
+[mpWindow performSelector: @selector(setCollectionBehavior:) 
withObject: (id) (behavior | (bAllowFullScreen ? 
NSWindowCollectionBehaviorFullScreenPrimary : 
NSWindowCollectionBehaviorFullScreenAuxiliary))];
+
+behavior = (NSWindowCollectionBehavior) [mpWindow performSelector: 
@selector(collectionBehavior)];
+SAL_INFO(vcl.macosx, OSL_THIS_FUNC  : after 
setCollectionBehavior: behavior=  hex  behavior);
+}
+
 if( (mnStyle  SAL_FRAME_STYLE_TOOLTIP) )
 [mpWindow setIgnoresMouseEvents: YES];
 else
@@ -741,10 +778,27 @@ void AquaSalFrame::ShowFullScreen( sal_Bool bFullScreen, 
sal_Int32 nDisplay )
 // #i113170# may not be the main thread if called from UNO API
 SalData::ensureThreadAutoreleasePool();
 
+SAL_INFO(vcl.macosx, OSL_THIS_FUNC  : mbFullScreen=  mbFullScreen 
 , bFullScreen=  bFullScreen);
+
 if( mbFullScreen == bFullScreen )
 return;
 
 mbFullScreen = bFullScreen;
+
+if (GetSalData()-mnSystemVersion = 0x1070) {
+// If the system full-screen state already is our desired, do nothing
+if ((([mpWindow styleMask]  NSFullScreenWindowMask) == 
NSFullScreenWindowMask) == mbFullScreen)
+return;
+
+SAL_INFO(vcl.macosx, OSL_THIS_FUNC  : calling 
toggleFullScreen());
+
+// Otherwise toggle the system full-screen state
+[mpWindow performSelector: @selector(toggleFullScreen:)];
+
+// Nothing more to do?
+return;
+}
+
 if( bFullScreen )
 {
 // hide the dock and the menubar if we are on the menu screen
diff --git a/vcl/aqua/source/window/salframeview.mm 
b/vcl/aqua/source/window/salframeview.mm
index d6861a4..621b982 100644
--- a/vcl/aqua/source/window/salframeview.mm
+++ 

[Libreoffice-commits] .: vcl/aqua

2012-12-21 Thread Libreoffice Gerrit user
 vcl/aqua/source/window/salframe.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 445d350c5c2595cb41ef97e2c871c991483dd803
Author: Tor Lillqvist t...@iki.fi
Date:   Fri Dec 21 16:36:13 2012 +0200

Try to fix build against 10.4 SDK

Change-Id: I433512dbd533fe6c84e94059f378c4a7a6e8671d

diff --git a/vcl/aqua/source/window/salframe.cxx 
b/vcl/aqua/source/window/salframe.cxx
index b836784..cc76c76 100644
--- a/vcl/aqua/source/window/salframe.cxx
+++ b/vcl/aqua/source/window/salframe.cxx
@@ -57,6 +57,12 @@ enum {
 NSWindowCollectionBehaviorFullScreenAuxiliary = (1  8)
 };
 
+#if !defined(MAC_OS_X_VERSION_10_5)
+
+typedef unsigned int NSWindowCollectionBehavior;
+
+#endif
+
 #endif
 
 using namespace std;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua

2012-12-21 Thread Libreoffice Gerrit user
 vcl/aqua/source/window/salframe.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit d978085ab2ffb2380bacf01af42a06f7fbd3d179
Author: Tor Lillqvist t...@iki.fi
Date:   Fri Dec 21 18:38:36 2012 +0200

Try harder to fix build against 10.4 SDK

diff --git a/vcl/aqua/source/window/salframe.cxx 
b/vcl/aqua/source/window/salframe.cxx
index cc76c76..388dffd 100644
--- a/vcl/aqua/source/window/salframe.cxx
+++ b/vcl/aqua/source/window/salframe.cxx
@@ -46,7 +46,7 @@
 #include Carbon/Carbon.h
 #include postmac.h
 
-#if !defined(MAC_OS_X_VERSION_10_7)
+#if MACOSX_SDK_VERSION  1070
 
 enum {
 NSFullScreenWindowMask = (1  14)
@@ -57,9 +57,9 @@ enum {
 NSWindowCollectionBehaviorFullScreenAuxiliary = (1  8)
 };
 
-#if !defined(MAC_OS_X_VERSION_10_5)
+#if MACOSX_SDK_VERSION  1050
 
-typedef unsigned int NSWindowCollectionBehavior;
+typedef NSUInteger NSWindowCollectionBehavior;
 
 #endif
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua

2012-11-29 Thread Libreoffice Gerrit user
 vcl/aqua/source/a11y/aqua11ywrapper.mm |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a3787e3e368d0195511af6a1c04e002bcebeb055
Author: Thorsten Behrens tbehr...@suse.com
Date:   Thu Nov 29 21:31:30 2012 +0100

Fix missing place after a11y API change.

The accessible event listener registration changed name.

Change-Id: I869cd6341dbe52e9533f167891ce000fa8928976

diff --git a/vcl/aqua/source/a11y/aqua11ywrapper.mm 
b/vcl/aqua/source/a11y/aqua11ywrapper.mm
index 1491a04..b3517b0 100644
--- a/vcl/aqua/source/a11y/aqua11ywrapper.mm
+++ b/vcl/aqua/source/a11y/aqua11ywrapper.mm
@@ -117,7 +117,7 @@ static BOOL isPopupMenuOpen = NO;
  * We intentionally do not hold a reference to the event 
listener in the wrapper object,
  * but let the listener control the life cycle of the wrapper 
instead ..
  */
-xBroadcaster-addEventListener( new AquaA11yEventListener( 
self, rxAccessibleContext - getAccessibleRole() ) );
+xBroadcaster-addAccessibleEventListener( new 
AquaA11yEventListener( self, rxAccessibleContext - getAccessibleRole() ) );
 }
 }
 // TABLE_CELL
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua

2012-11-22 Thread Libreoffice Gerrit user
 vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0a14f43e69112073dd093ad26520527754feb9de
Author: Eike Rathke er...@redhat.com
Date:   Thu Nov 22 13:07:13 2012 +0100

AllSettings LanguageTag also in aqua-only files

Change-Id: Iaecb5a3dfad8ca04085888102d69350eb1a6ae1b

diff --git a/vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx 
b/vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx
index 5cbdb0d..45f046d 100644
--- a/vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx
+++ b/vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx
@@ -232,7 +232,7 @@ static bool GetDevFontAttributes( ATSUFontID nFontID, 
ImplDevFontAttributes rDF
 int nBestNameValue = 0;
 int nBestStyleValue = 0;
 FontLanguageCode eBestLangCode = 0;
-const FontLanguageCode eUILangCode = 
Application::GetSettings().GetUILanguage();
+const FontLanguageCode eUILangCode = 
Application::GetSettings().GetUILanguageTag().getLanguageType();
 typedef std::vectorchar NameBuffer;
 NameBuffer aNameBuffer( 256 );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua

2012-11-22 Thread Libreoffice Gerrit user
 vcl/aqua/source/gdi/aquaprintaccessoryview.mm |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3218639f64e264f08dff9afe7fe756353a1acd33
Author: Eike Rathke er...@redhat.com
Date:   Thu Nov 22 13:18:23 2012 +0100

and one more GetLocale leftover

Change-Id: I1e27288d6a2d04b9ca2a30b9ccdd96565c8ff0f1

diff --git a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm 
b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
index 66fef3c..643b6df 100644
--- a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
+++ b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
@@ -742,7 +742,7 @@ static sal_Int32 findBreak( const rtl::OUString i_rText, 
sal_Int32 i_nPos )
 if( xBI.is() )
 {
 i18n::Boundary aBoundary = xBI-getWordBoundary( i_rText, i_nPos,
- 
Application::GetSettings().GetLocale(),
+ 
Application::GetSettings().GetLanguageTag().getLocale(),
  
i18n::WordType::ANYWORD_IGNOREWHITESPACES,
  sal_True );
 nRet = aBoundary.endPos;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua vcl/ios

2012-11-08 Thread Libreoffice Gerrit user
 vcl/aqua/source/gdi/coretext/salcoretextlayout.cxx |2 --
 vcl/ios/source/gdi/salcoretextlayout.cxx   |2 --
 2 files changed, 4 deletions(-)

New commits:
commit 325ac9d353057767da9648fab332eac9c4a6ef0c
Author: Tor Lillqvist t...@iki.fi
Date:   Thu Nov 8 11:41:30 2012 +0200

There is no mnTrailingSpaceWidth here?

Change-Id: Iedef29260ef10ecf9d5d95dfd87e1c5aaebfc3fb

diff --git a/vcl/aqua/source/gdi/coretext/salcoretextlayout.cxx 
b/vcl/aqua/source/gdi/coretext/salcoretextlayout.cxx
index ff64207..b3798f6 100644
--- a/vcl/aqua/source/gdi/coretext/salcoretextlayout.cxx
+++ b/vcl/aqua/source/gdi/coretext/salcoretextlayout.cxx
@@ -142,8 +142,6 @@ long CoreTextLayout::FillDXArray( sal_Int32* pDXArray ) 
const
 {
 return GetTextWidth();
 }
-// check assumptions
-DBG_ASSERT( !mnTrailingSpaceWidth, CoreText::FillDXArray() with nTSW!=0 
);
 
 // initialize details about the resulting layout
 InitGIA();
diff --git a/vcl/ios/source/gdi/salcoretextlayout.cxx 
b/vcl/ios/source/gdi/salcoretextlayout.cxx
index ff6552f..ef01fe2 100644
--- a/vcl/ios/source/gdi/salcoretextlayout.cxx
+++ b/vcl/ios/source/gdi/salcoretextlayout.cxx
@@ -172,8 +172,6 @@ long CoreTextLayout::FillDXArray( long* pDXArray ) const
 {
 return GetTextWidth();
 }
-// check assumptions
-// DBG_ASSERT( !mnTrailingSpaceWidth, CoreText::FillDXArray() with 
nTSW!=0 );
 
 // initialize details about the resulting layout
 InitGIA();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua

2012-09-26 Thread Libreoffice Gerrit user
 vcl/aqua/source/a11y/aqua11yfocustracker.cxx |   15 ++-
 vcl/aqua/source/a11y/aqua11ywrapper.mm   |7 ++-
 2 files changed, 20 insertions(+), 2 deletions(-)

New commits:
commit 5f373a002df2f083109bb7b2e0987258b6e2f9c4
Author: Tor Lillqvist t...@iki.fi
Date:   Wed Sep 26 13:42:54 2012 +0300

Fix crash on Mac when a11y in use, and avoid infinite loop, fdo#47275

The code used static_cast blindly even if the object not necessarily
was of the assumed subclass. Crash followed. Use dynamic_cast instead
to be able to check, like the corresponding code for GTK a11y. After
that fix we then got a nice infinite loop whn an object apparently is
its own parent. Detect that and break out.

Whether accessibility for the affected parts of the GUI actually works
now for its real use cases, no idea. But anything is better than a
crash...

Change-Id: I862234e168db0bd19d185b0f1f73b733b570cac4

diff --git a/vcl/aqua/source/a11y/aqua11yfocustracker.cxx 
b/vcl/aqua/source/a11y/aqua11yfocustracker.cxx
index 65eaef1..b38af80 100644
--- a/vcl/aqua/source/a11y/aqua11yfocustracker.cxx
+++ b/vcl/aqua/source/a11y/aqua11yfocustracker.cxx
@@ -72,7 +72,20 @@ long 
AquaA11yFocusTracker::WindowEventHandler(AquaA11yFocusTracker *pFocusTracke
 pFocusTracker-tabpage_activated( getWindow(pEvent) );
 break;
 case VCLEVENT_MENU_HIGHLIGHT:
-pFocusTracker-menu_highlighted( static_cast  const VclMenuEvent *  
(pEvent) );
+// Inspired by code in WindowEventHandler in
+// vcl/unx/gtk/a11y/atkutil.cxx, find out what kind of event
+// it is to avoid blindly using a static_cast and crash,
+// fdo#47275.
+if( const VclMenuEvent* pMenuEvent = dynamic_cast  const 
VclMenuEvent*  (pEvent) )
+{
+pFocusTracker-menu_highlighted( pMenuEvent );
+}
+else if( const VclAccessibleEvent* pAccEvent = dynamic_cast  const 
VclAccessibleEvent*  (pEvent) )
+{
+Reference XAccessible  xAccessible = pAccEvent-GetAccessible();
+if( xAccessible.is() )
+pFocusTracker-setFocusedObject( xAccessible );
+}
 break;
 default:
 break;
diff --git a/vcl/aqua/source/a11y/aqua11ywrapper.mm 
b/vcl/aqua/source/a11y/aqua11ywrapper.mm
index a7bad3c..8acb5f4 100644
--- a/vcl/aqua/source/a11y/aqua11ywrapper.mm
+++ b/vcl/aqua/source/a11y/aqua11ywrapper.mm
@@ -370,7 +370,12 @@ static BOOL isPopupMenuOpen = NO;
 // go upstairs until reaching the broken connection
 AquaA11yWrapper * aWrapper = self;
 while ( [ aWrapper accessibleContext ] - getAccessibleParent().is() ) {
-aWrapper = [ AquaA11yFactory wrapperForAccessibleContext: [ aWrapper 
accessibleContext ] - getAccessibleParent() - getAccessibleContext() ];
+AquaA11yWrapper *aTentativeParentWrapper = [ AquaA11yFactory 
wrapperForAccessibleContext: [ aWrapper accessibleContext ] - 
getAccessibleParent() - getAccessibleContext() ];
+// Quick-and-dirty fix for infinite loop after fixing crash in
+// fdo#47275
+if ( aTentativeParentWrapper == aWrapper )
+break;
+aWrapper = aTentativeParentWrapper;
 [ aWrapper autorelease ];
 }
 // get associated NSWindow
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua

2012-09-26 Thread Libreoffice Gerrit user
 vcl/aqua/source/a11y/aqua11ywrapper.mm |4 
 1 file changed, 4 insertions(+)

New commits:
commit 3376f682a77c16f4da63dc14c45d294425e5ba8a
Author: Tor Lillqvist t...@iki.fi
Date:   Wed Sep 26 16:01:09 2012 +0300

Silly workaround for fdo#55156

I feel dirty now.

Change-Id: I1cafb0c0494d56bc9c81594c2145b2cc4a1ee389

diff --git a/vcl/aqua/source/a11y/aqua11ywrapper.mm 
b/vcl/aqua/source/a11y/aqua11ywrapper.mm
index 8acb5f4..1491a04 100644
--- a/vcl/aqua/source/a11y/aqua11ywrapper.mm
+++ b/vcl/aqua/source/a11y/aqua11ywrapper.mm
@@ -369,12 +369,16 @@ static BOOL isPopupMenuOpen = NO;
 -(id)windowAttribute {
 // go upstairs until reaching the broken connection
 AquaA11yWrapper * aWrapper = self;
+int loops = 0;
 while ( [ aWrapper accessibleContext ] - getAccessibleParent().is() ) {
 AquaA11yWrapper *aTentativeParentWrapper = [ AquaA11yFactory 
wrapperForAccessibleContext: [ aWrapper accessibleContext ] - 
getAccessibleParent() - getAccessibleContext() ];
 // Quick-and-dirty fix for infinite loop after fixing crash in
 // fdo#47275
 if ( aTentativeParentWrapper == aWrapper )
 break;
+// Even dirtier fix for infinite loop in fdo#55156
+if ( loops++ == 100 )
+break;
 aWrapper = aTentativeParentWrapper;
 [ aWrapper autorelease ];
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua vcl/inc

2012-09-21 Thread Libreoffice Gerrit user
 vcl/aqua/source/gdi/atsui/salgdi.cxx |   29 +++--
 vcl/inc/aqua/atsui/salgdi.h  |1 +
 2 files changed, 28 insertions(+), 2 deletions(-)

New commits:
commit f1651ee579bf38a49b839dbcb28ac38c0163a3d2
Author: Sergey Farbotka z8serge...@gmail.com
Date:   Fri Sep 21 14:12:09 2012 +0200

Fix fdo#55142 - wrong character pos calculation on mac.

Change-Id: If8a0f527102b70bf1dcf292f8df31aaff9fba5c8

diff --git a/vcl/aqua/source/gdi/atsui/salgdi.cxx 
b/vcl/aqua/source/gdi/atsui/salgdi.cxx
index 5c0bff7..a57068d 100644
--- a/vcl/aqua/source/gdi/atsui/salgdi.cxx
+++ b/vcl/aqua/source/gdi/atsui/salgdi.cxx
@@ -354,6 +354,8 @@ AquaSalGraphics::AquaSalGraphics()
 {
 // create the style object for font attributes
 ATSUCreateStyle( maATSUStyle );
+
+ResetFontStyle();
 }
 
 // ---
@@ -579,6 +581,29 @@ bool AquaSalGraphics::AddTempDevFont( ImplDevFontList*,
 
 // ---
 
+void AquaSalGraphics::ResetFontStyle()
+{
+ATSUClearStyle(maATSUStyle);
+
+// Set justification attributes
+ATSJustPriorityWidthDeltaOverrides nPriorityJustOverrides;
+memset(nPriorityJustOverrides, 0, sizeof(nPriorityJustOverrides));
+
+nPriorityJustOverrides[kJUSTLetterPriority].growFlags = 
kJUSTOverrideLimits;
+nPriorityJustOverrides[kJUSTLetterPriority].shrinkFlags = 
kJUSTOverrideLimits;
+
+ATSUAttributeTagtheTag = kATSUPriorityJustOverrideTag;
+ByteCount   theSize = 
sizeof(ATSJustPriorityWidthDeltaOverrides);
+ATSUAttributeValuePtr   thePtr = nPriorityJustOverrides;
+OSStatus eStatus = ATSUSetAttributes(maATSUStyle, 1, theTag, theSize, 
thePtr);
+if (eStatus != noErr)
+{
+DBG_WARNING(AquaSalGraphics::ResetFontStyle() : Could not override 
justification attributes!\n);
+}
+}
+
+// ---
+
 // callbacks from ATSUGlyphGetCubicPaths() fore GetGlyphOutline()
 struct GgoData { basegfx::B2DPolygon maPolygon; basegfx::B2DPolyPolygon* 
mpPolyPoly; };
 
@@ -698,7 +723,7 @@ sal_uInt16 AquaSalGraphics::SetFont( FontSelectPattern* 
pReqFont, int /*nFallbac
 {
 if( !pReqFont )
 {
-ATSUClearStyle( maATSUStyle );
+ResetFontStyle();
 mpMacFontData = NULL;
 return 0;
 }
@@ -784,7 +809,7 @@ sal_uInt16 AquaSalGraphics::SetFont( FontSelectPattern* 
pReqFont, int /*nFallbac
 if( eStatus != noErr )
 {
 DBG_WARNING( AquaSalGraphics::SetFont() : Could not set font 
attributes!\n);
-ATSUClearStyle( maATSUStyle );
+ResetFontStyle();
 mpMacFontData = NULL;
 return 0;
 }
diff --git a/vcl/inc/aqua/atsui/salgdi.h b/vcl/inc/aqua/atsui/salgdi.h
index 19fe1f4..eeb7aa4 100644
--- a/vcl/inc/aqua/atsui/salgdi.h
+++ b/vcl/inc/aqua/atsui/salgdi.h
@@ -353,6 +353,7 @@ private:
 bool GetRawFontData( const PhysicalFontFace* pFontData,
  std::vectorunsigned char rBuffer,
  bool* pJustCFF );
+void ResetFontStyle();
 };
 
 // --- some trivial inlines
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua vcl/inc

2012-09-19 Thread Libreoffice Gerrit user
 vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm |2 -
 vcl/aqua/source/dtrans/DropTarget.cxx|9 +
 vcl/aqua/source/dtrans/PictToBmpFlt.cxx  |   16 --
 vcl/aqua/source/gdi/atsui/salatslayout.cxx   |8 ++---
 vcl/aqua/source/gdi/coretext/salcoretextlayout.cxx   |4 +-
 vcl/aqua/source/gdi/coretext/salgdi.cxx  |2 -
 vcl/aqua/source/gdi/salbmp.cxx   |2 -
 vcl/aqua/source/gdi/salgdicommon.cxx |   30 +--
 vcl/aqua/source/gdi/salnativewidgets.cxx |2 -
 vcl/aqua/source/gdi/salprn.cxx   |2 -
 vcl/aqua/source/window/salframe.cxx  |6 +--
 vcl/aqua/source/window/salframeview.mm   |6 +--
 vcl/inc/aqua/atsui/salgdi.h  |8 ++---
 vcl/inc/aqua/common.h|2 -
 vcl/inc/aqua/coretext/salcoretextlayout.hxx  |4 +-
 vcl/inc/aqua/coretext/salgdi.h   |   12 +--
 vcl/inc/aqua/salframe.h  |2 -
 vcl/inc/aqua/salgdicommon.hxx|4 +-
 18 files changed, 77 insertions(+), 44 deletions(-)

New commits:
commit 25f935bfb44b87271eb11e719c4d1fb8624bdd02
Author: Tor Lillqvist t...@iki.fi
Date:   Thu Sep 20 00:54:36 2012 +0300

64-bit fixes

Change-Id: I268ccab01e030535f04ef1256dc702b07cbc6611

diff --git a/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm 
b/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm
index 31978a6..4b38b15 100644
--- a/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm
+++ b/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm
@@ -107,7 +107,7 @@ using namespace ::rtl;
 
 +(void)addColor:(sal_Int32)salColor forAttribute:(NSString *)attribute 
andRange:(NSRange)range toString:(NSMutableAttributedString *)string {
 if ( salColor != -1 ) {
-float elements[] = { salColor  0x00ff, salColor  0xff00, 
salColor  0x00ff };
+CGFloat elements[] = { salColor  0x00ff, salColor  0xff00, 
salColor  0x00ff };
 CGColorRef color = CGColorCreate ( CGColorSpaceCreateWithName ( 
kCGColorSpaceGenericRGB ), elements );
 [ string addAttribute: attribute value: (id) color range: range ];
 CGColorRelease ( color );
diff --git a/vcl/aqua/source/dtrans/DropTarget.cxx 
b/vcl/aqua/source/dtrans/DropTarget.cxx
index bb46e21..c799d92 100644
--- a/vcl/aqua/source/dtrans/DropTarget.cxx
+++ b/vcl/aqua/source/dtrans/DropTarget.cxx
@@ -296,6 +296,7 @@ NSDragOperation DropTarget::draggingUpdated(id sender)
   //NSLog(@Drag update: Source actions: %x proposed action %x selected 
action %x, mDragSourceSupportedActions, currentAction, mSelectedDropAction);
 }
 
+#ifndef __LP64__
   // Weird but it appears as if there is no method in Cocoa
   // to create a kThemeCopyArrowCursor hence we have to use
   // Carbon to do it
@@ -305,7 +306,9 @@ NSDragOperation DropTarget::draggingUpdated(id sender)
 SetThemeCursor(kThemeCopyArrowCursor);
   else
 SetThemeCursor(kThemeArrowCursor);
-
+#else
+  // FIXME: SetThemeCursor replacement?
+#endif
   return dragOp;
 }
 
@@ -316,7 +319,9 @@ void DropTarget::draggingExited(id /*sender*/)
 fire_dragExit(dte);
 mDragSourceSupportedActions = DNDConstants::ACTION_NONE;
 mSelectedDropAction = DNDConstants::ACTION_NONE;
+#ifndef __LP64__
 SetThemeCursor(kThemeArrowCursor);
+#endif
 }
 
 
@@ -370,7 +375,9 @@ void DropTarget::concludeDragOperation(id /*sender*/)
 mDragSourceSupportedActions = DNDConstants::ACTION_NONE;
 mSelectedDropAction = DNDConstants::ACTION_NONE;
 mXCurrentDragClipboard = uno::ReferenceXClipboard();
+#ifndef __LP64__
 SetThemeCursor(kThemeArrowCursor);
+#endif
 }
 
 
diff --git a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx 
b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
index 8a545da..0bbb33b 100644
--- a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
+++ b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
@@ -39,6 +39,11 @@ bool PICTtoBMP(com::sun::star::uno::Sequencesal_Int8 
aPict,
 
   bool result = false;
 
+#ifdef __LP64__
+  // FIXME
+  (void) aPict;
+  (void) aBmp;
+#else
   ComponentInstance bmpExporter;
   if (OpenADefaultComponent(GraphicsExporterComponentType,
 kQTFileTypeBMP,
@@ -78,7 +83,7 @@ bool PICTtoBMP(com::sun::star::uno::Sequencesal_Int8 aPict,
   DisposeHandle(hPict);
   DisposeHandle(hBmp);
   CloseComponent(bmpExporter);
-
+#endif
   return result;
 }
 
@@ -103,12 +108,17 @@ bool BMPtoPICT(com::sun::star::uno::Sequencesal_Int8 
aBmp,
   bool result = false;
 
   Handle hBmp;
-  ComponentInstance pictExporter;
   if ((PtrToHand(aBmp.getArray(), hBmp, aBmp.getLength()) != noErr))
 {
   return result;
 }
 
+#ifdef __LP64__
+  // FIXME
+  (void) aPict;
+#else
+  ComponentInstance pictExporter;
+
   if (OpenADefaultComponent(GraphicsImporterComponentType,
 

[Libreoffice-commits] .: vcl/aqua

2012-09-13 Thread Libreoffice Gerrit user
 vcl/aqua/source/window/salframe.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 41747c962603222b2d6221a9f5fca28cd71c103a
Author: Norbert Thiebaud nthieb...@gmail.com
Date:   Thu Sep 13 05:13:26 2012 -0500

fdo#39007 make windows not 'restorable'

Change-Id: I9473800820cb863e0de4b16f633deec951dee120

diff --git a/vcl/aqua/source/window/salframe.cxx 
b/vcl/aqua/source/window/salframe.cxx
index a80ff4e..b427e2e 100644
--- a/vcl/aqua/source/window/salframe.cxx
+++ b/vcl/aqua/source/window/salframe.cxx
@@ -222,6 +222,10 @@ void AquaSalFrame::initWindowAndView()
 // do this:
 objc_msgSend(mpWindow, @selector(setDelegate:), mpWindow);
 
+if( [mpWindow respondsToSelector: @selector(setRestorable:)])
+{
+objc_msgSend(mpWindow, @selector(setRestorable:), NO);
+}
 NSRect aRect = { { 0,0 }, { maGeometry.nWidth, maGeometry.nHeight } };
 mnTrackingRectTag = [mpView addTrackingRect: aRect owner: mpView userData: 
nil assumeInside: NO];
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua vcl/inc

2012-09-11 Thread Libreoffice Gerrit user
 vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx |   40 +-
 vcl/aqua/source/gdi/coretext/salcoretextlayout.cxx|   25 +--
 vcl/aqua/source/gdi/coretext/salcoretextstyle.cxx |7 ++-
 vcl/aqua/source/gdi/coretext/salgdi.cxx   |   19 ++--
 vcl/inc/aqua/coretext/salcoretextstyle.hxx|3 -
 vcl/inc/aqua/coretext/salgdi.h|6 --
 6 files changed, 57 insertions(+), 43 deletions(-)

New commits:
commit 5aaef82232f7f51ddd658f3ad34903f3fe7107d4
Author: Norbert Thiebaud nthieb...@gmail.com
Date:   Sat Jul 14 00:13:40 2012 +0200

coretext: use only the FontFace ref from the Style

Change-Id: I696065f6f60fb55eaa24e4a8b4cbff1e93856f04
Reviewed-on: https://gerrit.libreoffice.org/306
Reviewed-by: Norbert Thiebaud nthieb...@gmail.com
Tested-by: Norbert Thiebaud nthieb...@gmail.com

diff --git a/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx 
b/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx
index a54cfb9..d02838a 100644
--- a/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx
+++ b/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx
@@ -196,24 +196,31 @@ SystemFontList::SystemFontList()
 {
 CFArrayRef font_descriptors = 
CTFontCollectionCreateMatchingFontDescriptors(font_collection);
 
-for(int i = 0; i  CFArrayGetCount(font_descriptors); i++)
+if(font_descriptors)
 {
-CTFontDescriptorRef font_descriptor = 
(CTFontDescriptorRef)CFArrayGetValueAtIndex(font_descriptors, i);
-CTFontRef font = CTFontCreateWithFontDescriptor(font_descriptor, 
0, NULL);
-ImplDevFontAttributes devfont_attr;
-if(GetDevFontAttributes( font_descriptor, devfont_attr ) )
+for(int i = 0; i  CFArrayGetCount(font_descriptors); i++)
 {
-CoreTextPhysicalFontFace* font_data = new 
CoreTextPhysicalFontFace(devfont_attr, font);
-if(font_data  font_data-GetCTFont())
+CTFontDescriptorRef font_descriptor = 
(CTFontDescriptorRef)CFArrayGetValueAtIndex(font_descriptors, i);
+CTFontRef font = 
CTFontCreateWithFontDescriptor(font_descriptor, 0, NULL);
+if(font)
 {
-m_aFontContainer [ font_data-GetCTFont() ] = font_data;
+ImplDevFontAttributes devfont_attr;
+if(GetDevFontAttributes( font_descriptor, devfont_attr ) )
+{
+CoreTextPhysicalFontFace* font_face = new 
CoreTextPhysicalFontFace(devfont_attr, font);
+if(font_face  font_face-GetCTFont())
+{
+m_aFontContainer [ font_face-GetCTFont() ] = 
font_face;
+}
+}
+CFRelease(font);
 }
 }
-CFRelease(font);
+CFRelease(font_descriptors);
 }
-CFRelease(font_descriptors);
+CFRelease(font_collection);
 }
-CFRelease(font_collection);
+
 }
 
 SystemFontList::~SystemFontList()
@@ -250,6 +257,7 @@ CoreTextPhysicalFontFace::CoreTextPhysicalFontFace( const 
ImplDevFontAttributes
 ,   m_bHasCJKSupport( false )
 ,   m_bFontCapabilitiesRead( false )
 {
+msgs_debug(font,retain %p as %p,font, m_CTFontRef);
 }
 
 CoreTextPhysicalFontFace::~CoreTextPhysicalFontFace()
@@ -258,10 +266,8 @@ CoreTextPhysicalFontFace::~CoreTextPhysicalFontFace()
 {
 m_pCharMap-DeReference();
 }
-if( m_CTFontRef )
-{
-CFRelease(m_CTFontRef);
-}
+msgs_debug(font,release font %p, m_CTFontRef);
+SafeCFRelease(m_CTFontRef);
 }
 
 PhysicalFontFace* CoreTextPhysicalFontFace::Clone() const
@@ -274,6 +280,7 @@ PhysicalFontFace* CoreTextPhysicalFontFace::Clone() const
 if( m_CTFontRef )
 {
 pClone-m_CTFontRef = (CTFontRef)CFRetain(m_CTFontRef);
+msgs_debug(font,clone ref %p into %p, m_CTFontRef, 
pClone-m_CTFontRef);
 }
 return pClone;
 }
@@ -391,9 +398,6 @@ bool CoreTextPhysicalFontFace::GetRawFontData( 
std::vectorunsigned char rBuff
 if(CFF_table)
 {
 *pJustCFF = CFDataGetLength(CFF_table) ? true : false;
-}
-if(CFF_table)
-{
 CFRelease(CFF_table);
 return true;
 }
diff --git a/vcl/aqua/source/gdi/coretext/salcoretextlayout.cxx 
b/vcl/aqua/source/gdi/coretext/salcoretextlayout.cxx
index 408f2b2..07ff289 100644
--- a/vcl/aqua/source/gdi/coretext/salcoretextlayout.cxx
+++ b/vcl/aqua/source/gdi/coretext/salcoretextlayout.cxx
@@ -98,8 +98,14 @@ void CoreTextLayout::DrawText( SalGraphics rGraphics ) const
 CTLineDraw(m_line, gr.mrContext);
 #else
 InitGIA();
-msgs_debug(layout,at- pos (%ld, %ld), pos.X(), pos.Y());
+msgs_debug(layout,at- pos (%ld, %ld) ctfont=%p, pos.X(), pos.Y(),
+   m_style-GetFont());
 CGFontRef cg_font 

[Libreoffice-commits] .: vcl/aqua

2012-09-10 Thread Libreoffice Gerrit user
 vcl/aqua/source/a11y/aqua11ywrapper.mm |   12 +++-
 1 file changed, 3 insertions(+), 9 deletions(-)

New commits:
commit 3234b715b5a6d13ee673b41066eb565706be5ec9
Author: Michael Meeks michael.me...@suse.com
Date:   Mon Sep 10 12:50:44 2012 +0300

fdo#47368: Fix for infinite recursion

See bug for discussion.

Change-Id: Id45dd2902bd2cb68618c3e7324867f226c025698

diff --git a/vcl/aqua/source/a11y/aqua11ywrapper.mm 
b/vcl/aqua/source/a11y/aqua11ywrapper.mm
index 86bc720..a7bad3c 100644
--- a/vcl/aqua/source/a11y/aqua11ywrapper.mm
+++ b/vcl/aqua/source/a11y/aqua11ywrapper.mm
@@ -970,15 +970,9 @@ Reference  XAccessibleContext  hitTestRunner ( 
com::sun::star::awt::Point poin
 com::sun::star::awt::Point location = rxAccessibleComponent - 
getLocationOnScreen();
 com::sun::star::awt::Point hitPoint ( point.X - location.X , 
point.Y - location.Y); 
 Reference  XAccessible  rxAccessible = rxAccessibleComponent - 
getAccessibleAtPoint ( hitPoint );
-if ( rxAccessible.is()  rxAccessible - 
getAccessibleContext().is() ) {
-if ( rxAccessible - getAccessibleContext() - 
getAccessibleChildCount()  0 ) {
-hitChild = hitTestRunner ( point, rxAccessible - 
getAccessibleContext() );
-if ( ! hitChild.is() ) {
-hitChild = rxAccessible - getAccessibleContext();
-}
-} else {
-hitChild = rxAccessible - getAccessibleContext();
-}
+if ( rxAccessible.is()  rxAccessible - 
getAccessibleContext().is() 
+ rxAccessible - getAccessibleContext() - 
getAccessibleChildCount() == 0 ) {
+hitChild = rxAccessible - getAccessibleContext();
 }
 } 
 if ( !hitChild.is()  rxAccessibleContext - 
getAccessibleChildCount()  0 ) { // special treatment for e.g. comboboxes
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua vcl/ios vcl/win

2012-09-03 Thread Libreoffice Gerrit user
 vcl/aqua/source/gdi/atsui/salgdi.cxx|2 +-
 vcl/aqua/source/gdi/coretext/salgdi.cxx |2 +-
 vcl/ios/source/gdi/salgdi.cxx   |2 +-
 vcl/win/source/gdi/salgdi3.cxx  |2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit ce56f4d5c6266ddac2fdf91ee153b50903e8d368
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Sep 3 20:04:22 2012 +0100

fix ClearDevFontList - ClearDevFontCache typo

Change-Id: I52d2cb88ef99b9c9846cab13ff2994ed0495d9a3

diff --git a/vcl/aqua/source/gdi/atsui/salgdi.cxx 
b/vcl/aqua/source/gdi/atsui/salgdi.cxx
index 561b96c..5c0bff7 100644
--- a/vcl/aqua/source/gdi/atsui/salgdi.cxx
+++ b/vcl/aqua/source/gdi/atsui/salgdi.cxx
@@ -528,7 +528,7 @@ void AquaSalGraphics::GetDevFontList( ImplDevFontList* 
pFontList )
 pSalData-mpFontList-AnnounceFonts( *pFontList );
 }
 
-void AquaSalGraphics::ClearDevFontList()
+void AquaSalGraphics::ClearDevFontCache()
 {
 SalData* pSalData = GetSalData();
 delete pSalData-mpFontList;
diff --git a/vcl/aqua/source/gdi/coretext/salgdi.cxx 
b/vcl/aqua/source/gdi/coretext/salgdi.cxx
index 0b8b77b..153d4b0 100644
--- a/vcl/aqua/source/gdi/coretext/salgdi.cxx
+++ b/vcl/aqua/source/gdi/coretext/salgdi.cxx
@@ -78,7 +78,7 @@ void AquaSalGraphics::GetDevFontList( ImplDevFontList* 
pFontList )
 pSalData-mpFontList-AnnounceFonts( *pFontList );
 }
 
-void AquaSalGraphics::ClearDevFontList()
+void AquaSalGraphics::ClearDevFontCache()
 {
 SalData* pSalData = GetSalData();
 delete pSalData-mpFontList;
diff --git a/vcl/ios/source/gdi/salgdi.cxx b/vcl/ios/source/gdi/salgdi.cxx
index ebf6430..af936af 100644
--- a/vcl/ios/source/gdi/salgdi.cxx
+++ b/vcl/ios/source/gdi/salgdi.cxx
@@ -104,7 +104,7 @@ void IosSalGraphics::GetDevFontList( ImplDevFontList* 
pFontList )
 pSalData-mpFontList-AnnounceFonts( *pFontList );
 }
 
-void IosSalGraphics::ClearDevFontList()
+void IosSalGraphics::ClearDevFontCache()
 {
 SalData* pSalData = GetSalData();
 delete pSalData-mpFontList;
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index c1407d2..e5eace2 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -2282,7 +2282,7 @@ void WinSalGraphics::GetDevFontList( ImplDevFontList* 
pFontList )
 pFontList-SetFallbackHook( aSubstFallback );
 }
 
-void WinSalGraphics::ClearDevFontList()
+void WinSalGraphics::ClearDevFontCache()
 {
 //anything to do here ?
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua vcl/inc

2012-08-30 Thread Libreoffice Gerrit user
 vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx |   26 +-
 vcl/aqua/source/gdi/coretext/salcoretextstyle.cxx |   13 -
 vcl/aqua/source/gdi/coretext/salgdi.cxx   |   16 +--
 vcl/inc/aqua/coretext/salcoretextfontutils.hxx|   12 
 vcl/inc/aqua/coretext/salcoretextstyle.hxx|4 +-
 vcl/inc/aqua/coretext/salgdi.h|2 -
 6 files changed, 36 insertions(+), 37 deletions(-)

New commits:
commit e1b61b2dafd8e84c60f5ae0eebf04165ea55d353
Author: Norbert Thiebaud nthieb...@gmail.com
Date:   Mon Jul 2 11:37:15 2012 -0500

rename ImplCoreTextFontData in CoreTextPhysicalFontFace

Change-Id: Idcf9c21ab1a16b8d83f925aa742f1a5aa7089bc3
Reviewed-on: https://gerrit.libreoffice.org/305
Reviewed-by: Norbert Thiebaud nthieb...@gmail.com
Tested-by: Norbert Thiebaud nthieb...@gmail.com

diff --git a/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx 
b/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx
index faaf11b..a54cfb9 100644
--- a/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx
+++ b/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx
@@ -203,7 +203,7 @@ SystemFontList::SystemFontList()
 ImplDevFontAttributes devfont_attr;
 if(GetDevFontAttributes( font_descriptor, devfont_attr ) )
 {
-ImplCoreTextFontData* font_data = new 
ImplCoreTextFontData(devfont_attr, font);
+CoreTextPhysicalFontFace* font_data = new 
CoreTextPhysicalFontFace(devfont_attr, font);
 if(font_data  font_data-GetCTFont())
 {
 m_aFontContainer [ font_data-GetCTFont() ] = font_data;
@@ -224,7 +224,7 @@ SystemFontList::~SystemFontList()
 m_aFontContainer.clear();
 }
 
-ImplCoreTextFontData* SystemFontList::GetFontDataFromRef( CTFontRef font ) 
const
+CoreTextPhysicalFontFace* SystemFontList::GetFontDataFromRef( CTFontRef font ) 
const
 {
 CoreTextFontContainer::const_iterator it = m_aFontContainer.find( font );
 return it == m_aFontContainer.end() ? NULL : (*it).second;
@@ -240,7 +240,7 @@ void SystemFontList::AnnounceFonts( ImplDevFontList 
rFontList ) const
 }
 }
 
-ImplCoreTextFontData::ImplCoreTextFontData( const ImplDevFontAttributes rDFA, 
CTFontRef font )
+CoreTextPhysicalFontFace::CoreTextPhysicalFontFace( const 
ImplDevFontAttributes rDFA, CTFontRef font )
 :   PhysicalFontFace( rDFA, 0 )
 ,   m_CTFontRef((CTFontRef)CFRetain(font))
 ,   m_pCharMap( NULL )
@@ -252,7 +252,7 @@ ImplCoreTextFontData::ImplCoreTextFontData( const 
ImplDevFontAttributes rDFA, C
 {
 }
 
-ImplCoreTextFontData::~ImplCoreTextFontData()
+CoreTextPhysicalFontFace::~CoreTextPhysicalFontFace()
 {
 if( m_pCharMap )
 {
@@ -264,9 +264,9 @@ ImplCoreTextFontData::~ImplCoreTextFontData()
 }
 }
 
-PhysicalFontFace* ImplCoreTextFontData::Clone() const
+PhysicalFontFace* CoreTextPhysicalFontFace::Clone() const
 {
-ImplCoreTextFontData* pClone = new ImplCoreTextFontData(*this);
+CoreTextPhysicalFontFace* pClone = new CoreTextPhysicalFontFace(*this);
 if( m_pCharMap )
 {
 m_pCharMap-AddReference();
@@ -278,12 +278,12 @@ PhysicalFontFace* ImplCoreTextFontData::Clone() const
 return pClone;
 }
 
-ImplFontEntry* ImplCoreTextFontData::CreateFontInstance(FontSelectPattern 
rFSD) const
+ImplFontEntry* CoreTextPhysicalFontFace::CreateFontInstance(FontSelectPattern 
rFSD) const
 {
 return new ImplFontEntry(rFSD);
 }
 
-const ImplFontCharMap* ImplCoreTextFontData::GetImplFontCharMap()
+const ImplFontCharMap* CoreTextPhysicalFontFace::GetImplFontCharMap()
 {
 // return the cached charmap
 if( m_pCharMap )
@@ -316,7 +316,7 @@ const ImplFontCharMap* 
ImplCoreTextFontData::GetImplFontCharMap()
 return m_pCharMap;
 }
 
-bool ImplCoreTextFontData::GetImplFontCapabilities(vcl::FontCapabilities 
rFontCapabilities)
+bool CoreTextPhysicalFontFace::GetImplFontCapabilities(vcl::FontCapabilities 
rFontCapabilities)
 {
 // read this only once per font
 if( m_bFontCapabilitiesRead )
@@ -380,7 +380,7 @@ void addTable(struct font_table* table, CTFontTableTag tag, 
CFDataRef data)
 }
 }
 
-bool ImplCoreTextFontData::GetRawFontData( std::vectorunsigned char 
rBuffer, bool* pJustCFF ) const
+bool CoreTextPhysicalFontFace::GetRawFontData( std::vectorunsigned char 
rBuffer, bool* pJustCFF ) const
 {
 bool rc;
 int table_count = 0;
@@ -528,7 +528,7 @@ bool ImplCoreTextFontData::GetRawFontData( 
std::vectorunsigned char rBuffer,
 return rc;
 }
 
-void ImplCoreTextFontData::DetermineCJKSupport_OS2(CFDataRef rOS2Table)
+void CoreTextPhysicalFontFace::DetermineCJKSupport_OS2(CFDataRef rOS2Table)
 {
 if(CFDataGetLength(rOS2Table) = 48)
 {
@@ -545,7 +545,7 @@ void 
ImplCoreTextFontData::DetermineCJKSupport_OS2(CFDataRef rOS2Table)
 }
 }
 
-void ImplCoreTextFontData::DetermineCJKSupport_cmap(CFDataRef rCmapTable)
+void 

[Libreoffice-commits] .: vcl/aqua

2012-08-02 Thread Caolán McNamara
 vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c87e4eb383975b7c16bd696e27750bc711555ae5
Author: Caolán McNamara caol...@redhat.com
Date:   Thu Aug 2 09:17:06 2012 +0100

mac-only UniString from sal_Unicode*

Change-Id: If6432543c194668075b5b0a821e4bad8d7dd4839

diff --git a/vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx 
b/vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx
index 346fd6b..ba75744 100644
--- a/vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx
+++ b/vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx
@@ -307,7 +307,7 @@ static bool GetDevFontAttributes( ATSUFontID nFontID, 
ImplDevFontAttributes rDF
 // convert to unicode name
 UniString aUtf16Name;
 if( eEncoding == RTL_TEXTENCODING_UNICODE ) // we are just interested 
in UTF16 encoded names
-aUtf16Name = UniString( (const sal_Unicode*)aNameBuffer[0], 
nNameLength/2 );
+aUtf16Name = rtl::OUString( (const sal_Unicode*)aNameBuffer[0], 
nNameLength/2 );
 else if( eEncoding == RTL_TEXTENCODING_UCS4 )
 aUtf16Name = UniString(); // TODO
 else // assume the non-unicode encoded names are byte encoded
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua

2012-08-01 Thread Tor Lillqvist
 vcl/aqua/source/dtrans/PictToBmpFlt.cxx |   26 +++---
 1 file changed, 15 insertions(+), 11 deletions(-)

New commits:
commit c7c23677421d1f75d5566bbb8e76c12de6f75028
Author: Tor Lillqvist t...@iki.fi
Date:   Wed Aug 1 09:36:28 2012 +0300

Add own declaration for the since long deprecated KillPicture()

Still present in the framework in 10.8, so this code will continue to
link and work, one hopes... But this really is a sad solution.

Change-Id: I2571185f412e7252887bab3e0ae02c72cd756677

diff --git a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx 
b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
index 196ec2e..f6016e2 100644
--- a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
+++ b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
@@ -81,6 +81,21 @@ bool PICTtoBMP(com::sun::star::uno::Sequencesal_Int8 
aPict,
   return result;
 }
 
+#if MACOSX_SDK_VERSION = 1070
+
+// This whole thing needs to be rewritten I guess. Or does this code
+// even get invoked on current OSes? Given that KillPicture() was
+// deprecated already in 10.4, back when somebody was actually working
+// on this code, hopefully knowing what he/she was doing, did he/she
+// really not pay attention and notice that this stuff is going to go
+// away?
+
+extern C {
+extern void KillPicture(PicHandle myPicture);
+}
+
+#endif
+
 bool BMPtoPICT(com::sun::star::uno::Sequencesal_Int8 aBmp,
com::sun::star::uno::Sequencesal_Int8 aPict)
 {
@@ -118,22 +133,11 @@ bool BMPtoPICT(com::sun::star::uno::Sequencesal_Int8 
aBmp,
   rtl_copyMemory(aPict.getArray(), ((sal_Int8*)*hPict), sz);
   HUnlock((Handle)hPict);
 
-#if MACOSX_SDK_VERSION  1070
   // Release the data associated with the picture
   // Note: This function is deprecated in Mac OS X
   // 10.4.
 
-  // How nice. This whole thing needs to be rewritten I guess. Or
-  // does this code even get invoked on current OSes? Given that
-  // KillPicture() was deprecated already in 10.4, back when
-  // somebody was actually working on this code, hopefulluy
-  // knowing what he/she was doing, was it really not known that
-  // the stuff used here is going to go away?
-
   KillPicture(hPict);
-#else
-  SAL_WARN(vcl, Here we used to call the deprecated KillPicture(), no 
idea what to do, so leaking...);
-#endif
 
   result = true;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua

2012-07-31 Thread Tor Lillqvist
 vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx |6 ++
 vcl/aqua/source/gdi/atsui/salgdi.cxx|6 ++
 2 files changed, 12 insertions(+)

New commits:
commit 16ae7484b03149345751b7804cbc9ce3180565ec
Author: Tor Lillqvist t...@iki.fi
Date:   Tue Jul 31 22:10:19 2012 +0300

Add declaration of the very deprecated FMGetATSFontRefFromFont

Change-Id: I6a1b0ee2e7e012080774d29ea6ea5db5e9229d82

diff --git a/vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx 
b/vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx
index c56ac0d..346fd6b 100644
--- a/vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx
+++ b/vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx
@@ -201,6 +201,12 @@ static void UpdateAttributesFromPSName( const String 
rPSName, ImplDevFontAttrib
 
 // ---
 
+#if MACOSX_SDK_VERSION = 1070
+extern C {
+extern ATSFontRef FMGetATSFontRefFromFont(FMFont iFont);
+}
+#endif
+
 static bool GetDevFontAttributes( ATSUFontID nFontID, ImplDevFontAttributes 
rDFA )
 {
 // all ATSU fonts are device fonts that can be directly rotated
diff --git a/vcl/aqua/source/gdi/atsui/salgdi.cxx 
b/vcl/aqua/source/gdi/atsui/salgdi.cxx
index 18fe982..cd68245 100644
--- a/vcl/aqua/source/gdi/atsui/salgdi.cxx
+++ b/vcl/aqua/source/gdi/atsui/salgdi.cxx
@@ -128,6 +128,12 @@ inline FourCharCode GetTag(const char aTagName[5])
 static unsigned GetUShort( const unsigned char* p ){return((p[0]8)+p[1]);}
 static unsigned GetUInt( const unsigned char* p ) { 
return((p[0]24)+(p[1]16)+(p[2]8)+p[3]);}
 
+#if MACOSX_SDK_VERSION = 1070
+extern C {
+extern ATSFontRef FMGetATSFontRefFromFont(FMFont iFont);
+}
+#endif
+
 const ImplFontCharMap* ImplMacFontData::GetImplFontCharMap() const
 {
 // return the cached charmap
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua

2012-07-22 Thread Markus Mohrhard
 vcl/aqua/source/gdi/atsui/salatslayout.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 4b2d5d75ed8c2a8876e196593b1793798ce45441
Author: Markus Mohrhard markus.mohrh...@googlemail.com
Date:   Mon Jul 23 00:00:20 2012 +0200

fix WaE on Mac

Change-Id: Icf73d7fd29900a59652b32060e0d66db5c75ad32

diff --git a/vcl/aqua/source/gdi/atsui/salatslayout.cxx 
b/vcl/aqua/source/gdi/atsui/salatslayout.cxx
index 3969bf9..5340861 100644
--- a/vcl/aqua/source/gdi/atsui/salatslayout.cxx
+++ b/vcl/aqua/source/gdi/atsui/salatslayout.cxx
@@ -420,6 +420,7 @@ void ATSLayout::DrawText( SalGraphics rGraphics ) const
 
 DBG_ASSERT( (numcontrols = nMaxControls), ATSLayout::DrawText() 
numcontrols overflow );
 OSStatus theErr = ATSUSetLayoutControls (maATSULayout, numcontrols, 
theTags, theSizes, theValues);
+(void) theErr;
 DBG_ASSERT( (theErr==noErr), ATSLayout::DrawText ATSUSetLayoutControls 
failed!\n );
 
 // Draw the text
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua

2012-07-22 Thread Markus Mohrhard
 vcl/aqua/source/gdi/atsui/salatslayout.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit a9e58e29f65df820d133022c5cb15387075d6b37
Author: Markus Mohrhard markus.mohrh...@googlemail.com
Date:   Mon Jul 23 00:15:54 2012 +0200

second fix for WaE

Change-Id: I127776bc0a1583107591c9a7abb7c2a5036c5839

diff --git a/vcl/aqua/source/gdi/atsui/salatslayout.cxx 
b/vcl/aqua/source/gdi/atsui/salatslayout.cxx
index 5340861..84e6ff2 100644
--- a/vcl/aqua/source/gdi/atsui/salatslayout.cxx
+++ b/vcl/aqua/source/gdi/atsui/salatslayout.cxx
@@ -884,6 +884,7 @@ bool ATSLayout::GetBoundRect( SalGraphics rGraphics, 
Rectangle rVCLRect ) cons
 
 DBG_ASSERT( (numcontrols = nMaxControls), ATSLayout::GetBoundRect() 
numcontrols overflow );
 OSStatus theErr = ATSUSetLayoutControls (maATSULayout, numcontrols, 
theTags, theSizes, theValues);
+(void) theErr;
 DBG_ASSERT( (theErr==noErr), ATSLayout::GetBoundRect 
ATSUSetLayoutControls failed!\n );
 
 Rect aMacRect;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua vcl/inc vcl/ios vcl/unx vcl/win

2012-07-01 Thread Ivan Timofeev
 vcl/aqua/source/gdi/salnativewidgets.cxx |2 --
 vcl/inc/vcl/salnativewidgets.hxx |5 -
 vcl/ios/source/gdi/salnativewidgets.cxx  |1 -
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |8 +---
 vcl/unx/kde/salnativewidgets-kde.cxx |1 -
 vcl/unx/kde4/KDESalGraphics.cxx  |7 ---
 vcl/win/source/gdi/salnativewidgets-luna.cxx |   17 -
 7 files changed, 1 insertion(+), 40 deletions(-)

New commits:
commit 914c8163e3a5014d9d2885444b6383f6fdcea529
Author: Ivan Timofeev timofeev@gmail.com
Date:   Sun Jul 1 15:18:59 2012 +0400

vcl: CTRL_FIXEDBORDER is dead since ef877aab7e

Change-Id: I568b55c3b0b799bdc91ba081e7375debce9618aa

diff --git a/vcl/aqua/source/gdi/salnativewidgets.cxx 
b/vcl/aqua/source/gdi/salnativewidgets.cxx
index df6c6fa..bb7392e 100644
--- a/vcl/aqua/source/gdi/salnativewidgets.cxx
+++ b/vcl/aqua/source/gdi/salnativewidgets.cxx
@@ -314,7 +314,6 @@ sal_Bool AquaSalGraphics::IsNativeControlSupported( 
ControlType nType, ControlPa
 case CTRL_TAB_ITEM:
 case CTRL_TAB_PANE:
 case CTRL_TAB_BODY:  // see vcl/source/window/tabpage.cxx
-case CTRL_FIXEDBORDER:
 if( nPart == PART_ENTIRE_CONTROL ||
 nPart == PART_TABS_DRAW_RTL ||
 nPart == HAS_BACKGROUND_TEXTURE )
@@ -517,7 +516,6 @@ sal_Bool AquaSalGraphics::drawNativeControl(ControlType 
nType,
 }
 break;
 
-case CTRL_FIXEDBORDER:
 case CTRL_TOOLBAR:
 {
 HIThemeMenuItemDrawInfo aMenuItemDrawInfo;
diff --git a/vcl/inc/vcl/salnativewidgets.hxx b/vcl/inc/vcl/salnativewidgets.hxx
index c082b38..a3c9bab 100644
--- a/vcl/inc/vcl/salnativewidgets.hxx
+++ b/vcl/inc/vcl/salnativewidgets.hxx
@@ -109,11 +109,6 @@ typedef sal_uInt32  ControlType;
 // A separator line
 #define CTRL_FIXEDLINE  80
 
-// A rectangular border, like a
-// Tab Pane, but without the
-// possible gap for a tab
-#define CTRL_FIXEDBORDER90
-
 // A toolbar control with buttons and a grip
 #define CTRL_TOOLBAR100
 
diff --git a/vcl/ios/source/gdi/salnativewidgets.cxx 
b/vcl/ios/source/gdi/salnativewidgets.cxx
index c2d5068..71dda98 100644
--- a/vcl/ios/source/gdi/salnativewidgets.cxx
+++ b/vcl/ios/source/gdi/salnativewidgets.cxx
@@ -121,7 +121,6 @@ sal_Bool IosSalGraphics::IsNativeControlSupported( 
ControlType nType, ControlPar
 case CTRL_TAB_ITEM:
 case CTRL_TAB_PANE:
 case CTRL_TAB_BODY:  // see vcl/source/window/tabpage.cxx
-case CTRL_FIXEDBORDER:
 if( nPart == PART_ENTIRE_CONTROL ||
 nPart == PART_TABS_DRAW_RTL ||
 nPart == HAS_BACKGROUND_TEXTURE )
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx 
b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 2b5d3c8..7735a74 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -592,7 +592,6 @@ sal_Bool GtkSalGraphics::IsNativeControlSupported( 
ControlType nType, ControlPar
 case CTRL_TAB_ITEM:
 case CTRL_TAB_PANE:
 case CTRL_TAB_BODY:
-case CTRL_FIXEDBORDER:
 if(nPart==PART_ENTIRE_CONTROL || nPart==PART_TABS_DRAW_RTL)
 return true;
 break;
@@ -870,7 +869,7 @@ sal_Bool GtkSalGraphics::drawNativeControl(ControlType 
nType,
 {
 returnVal = NWPaintGTKComboBox( gdkDrawable, nType, nPart, aCtrlRect, 
aClip, nState, aValue, rCaption );
 }
-else if ( (nType==CTRL_TAB_ITEM) || (nType==CTRL_TAB_PANE) || 
(nType==CTRL_TAB_BODY) || (nType==CTRL_FIXEDBORDER) )
+else if ( (nType==CTRL_TAB_ITEM) || (nType==CTRL_TAB_PANE) || 
(nType==CTRL_TAB_BODY) )
 {
 if ( nType == CTRL_TAB_BODY )
 returnVal = sal_True;
@@ -2593,7 +2592,6 @@ sal_Bool GtkSalGraphics::NWPaintGTKTabItem( ControlType 
nType, ControlPart,
 case CTRL_TAB_BODY:
 break;
 
-case CTRL_FIXEDBORDER:
 case CTRL_TAB_PANE:
 gtk_paint_box_gap( gWidgetData[m_nXScreen].gNotebookWidget-style, 
pixmap, GTK_STATE_NORMAL, GTK_SHADOW_OUT, NULL, 
gWidgetData[m_nXScreen].gNotebookWidget,
 (char *)notebook, 0, 0, pixmapRect.GetWidth(), 
pixmapRect.GetHeight(), GTK_POS_TOP, 0, 0 );
@@ -2633,10 +2631,6 @@ sal_Bool GtkSalGraphics::NWPaintGTKTabItem( ControlType 
nType, ControlPart,
 break;
 }
 
-// Crux seems to think it can make the pane without a left edge
-if ( nType == CTRL_FIXEDBORDER )
-pixmapRect.Move( 1, 0 );
-
 // cache data
 if( nType == CTRL_TAB_ITEM )
 aCacheItems.Fill( nType, nState, pixmapRect, pixmap );
diff --git a/vcl/unx/kde/salnativewidgets-kde.cxx 
b/vcl/unx/kde/salnativewidgets-kde.cxx
index e9e4d65..6e9871b 100644
--- a/vcl/unx/kde/salnativewidgets-kde.cxx
+++ b/vcl/unx/kde/salnativewidgets-kde.cxx
@@ -1215,7 +1215,6 @@ sal_Bool KDESalGraphics::IsNativeControlSupported( 
ControlType nType, 

[Libreoffice-commits] .: vcl/aqua

2012-06-25 Thread Tor Lillqvist
 vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 3220899cd80dd3e0f10e305d882da92eaeed8055
Author: Tor Lillqvist t...@iki.fi
Date:   Mon Jun 25 11:37:52 2012 +0300

Fix error: redefinition of 'value'

Change-Id: I6c887971b91380543a2c59a4f1b477b9eb4a49b8

diff --git a/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx 
b/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx
index 08db4fd..faaf11b 100644
--- a/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx
+++ b/vcl/aqua/source/gdi/coretext/salcoretextfontutils.cxx
@@ -11,6 +11,7 @@
 
 static bool GetDevFontAttributes( CTFontDescriptorRef font_descriptor, 
ImplDevFontAttributes rDFA  )
 {
+int value = 0;
 
 // reset the attributes
 rDFA.meFamily = FAMILY_DONTKNOW;
@@ -35,7 +36,6 @@ static bool GetDevFontAttributes( CTFontDescriptorRef 
font_descriptor, ImplDevFo
 CFRelease(rHeadTable);
 #else
 CFNumberRef format = 
(CFNumberRef)CTFontDescriptorCopyAttribute(font_descriptor, 
kCTFontFormatAttribute);
-int value = 0;
 CFNumberGetValue(format, kCFNumberIntType, value);
 CFRelease(format);
 
@@ -54,7 +54,6 @@ static bool GetDevFontAttributes( CTFontDescriptorRef 
font_descriptor, ImplDevFo
 
 CFDictionaryRef traits = 
(CFDictionaryRef)CTFontDescriptorCopyAttribute(font_descriptor, 
kCTFontTraitsAttribute);
 CFNumberRef symbolics = (CFNumberRef)CFDictionaryGetValue(traits, 
kCTFontSymbolicTrait);
-int value = 0;
 CFNumberGetValue(symbolics, kCFNumberIntType, value);
 CFRelease(symbolics);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua vcl/generic vcl/inc vcl/source writerfilter/source xmloff/source

2012-06-13 Thread Takeshi Abe
 vcl/aqua/source/gdi/salgdi.cxx|6 -
 vcl/generic/fontmanager/fontcache.cxx |4 ---
 vcl/generic/fontmanager/fontmanager.cxx   |   13 ---
 vcl/inc/vcl/settings.hxx  |   11 --
 vcl/inc/vcl/vclevent.hxx  |   14 
 vcl/source/control/ilstbox.cxx|   21 ---
 vcl/source/gdi/outdev6.cxx|5 
 vcl/source/gdi/region.cxx |4 ---
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |   24 --
 xmloff/source/draw/animimp.cxx|3 --
 10 files changed, 105 deletions(-)

New commits:
commit 6c7da3e22a889e559e31f62afb33f9736181a171
Author: Takeshi Abe t...@fixedpoint.jp
Date:   Wed Jun 13 16:42:52 2012 +0900

removed code commented-out in the first place

Change-Id: Idb109cf767342042f1a2941c30fcf137f468e7df

diff --git a/vcl/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx
index e21c30a..933b139 100644
--- a/vcl/aqua/source/gdi/salgdi.cxx
+++ b/vcl/aqua/source/gdi/salgdi.cxx
@@ -355,12 +355,6 @@ AquaSalGraphics::AquaSalGraphics()
 
 AquaSalGraphics::~AquaSalGraphics()
 {
-/*
-if( mnUpdateGraphicsEvent )
-{
-Application::RemoveUserEvent( mnUpdateGraphicsEvent );
-}
-*/
 CGPathRelease( mxClipPath );
 ATSUDisposeStyle( maATSUStyle );
 
diff --git a/vcl/generic/fontmanager/fontcache.cxx 
b/vcl/generic/fontmanager/fontcache.cxx
index be9df03..2c3bc31 100644
--- a/vcl/generic/fontmanager/fontcache.cxx
+++ b/vcl/generic/fontmanager/fontcache.cxx
@@ -59,10 +59,6 @@ using ::rtl::OString;
 using ::rtl::OUStringToOString;
 
 /*
- *  static helpers
- */
-
-/*
  *  FontCache constructor
  */
 
diff --git a/vcl/generic/fontmanager/fontmanager.cxx 
b/vcl/generic/fontmanager/fontmanager.cxx
index ddb2fdb..a53d283 100644
--- a/vcl/generic/fontmanager/fontmanager.cxx
+++ b/vcl/generic/fontmanager/fontmanager.cxx
@@ -481,19 +481,6 @@ bool PrintFontManager::TrueTypeFontFile::queryMetricPage( 
int nPage, MultiAtomPr
 aPair.kern_x = (int)nKern * 1000 / 
pImplTTFont-unitsPerEm;
 aPair.kern_y = 0;
 m_pMetrics-m_aXKernPairs.push_back( aPair 
);
-
-/*  switch( nCoverage  1 )
-{
-case 1:
-aPair.kern_x = (int)nKern * 1000 / 
pImplTTFont-unitsPerEm;
-
m_pMetrics-m_aXKernPairs.push_back( aPair );
-break;
-case 0:
-aPair.kern_y = (int)nKern * 1000 / 
pImplTTFont-unitsPerEm;
-
m_pMetrics-m_aYKernPairs.push_back( aPair );
-break;
-}
-*/
 }
 }
 }
diff --git a/vcl/inc/vcl/settings.hxx b/vcl/inc/vcl/settings.hxx
index 580bba2..37d8b51 100644
--- a/vcl/inc/vcl/settings.hxx
+++ b/vcl/inc/vcl/settings.hxx
@@ -1051,17 +1051,6 @@ public:
 const LocaleDataWrapperGetUILocaleDataWrapper() const;
 const vcl::I18nHelper  GetLocaleI18nHelper() const;
 const vcl::I18nHelper  GetUILocaleI18nHelper() const;
-/*
-const CollatorWrapper  GetCollatorWrapper() const;
-const CollatorWrapper  GetUICollatorWrapper() const;
-sal_Unicode GetMnemonicMatchChar( sal_Unicode 
c ) const;
-String  GetMatchString( const String rStr 
) const;
-String  GetUIMatchString( const String 
rStr ) const;
-int MatchString( const String rStr1, 
xub_StrLen nPos1, xub_StrLen nCount1,
- const String rStr2, 
xub_StrLen nPos2, xub_StrLen nCount2 ) const;
-int MatchUIString( const String 
rStr1, xub_StrLen nPos1, xub_StrLen nCount1,
-   const String 
rStr2, xub_StrLen nPos2, xub_StrLen nCount2 ) const;
-*/
 
 voidSetSystemUpdate( sal_uLong nUpdate 
)
 { CopyData(); 
mpData-mnSystemUpdate = nUpdate; }
diff --git a/vcl/inc/vcl/vclevent.hxx b/vcl/inc/vcl/vclevent.hxx
index 002391b..6829f97 100644
--- a/vcl/inc/vcl/vclevent.hxx
+++ b/vcl/inc/vcl/vclevent.hxx
@@ -222,20 +222,6 @@ public:
 void*   GetData() const { return pData; }
 };
 
-/*
-class VclMouseEvent : public VclWindowEvent
-{
-private:
-   

[Libreoffice-commits] .: vcl/aqua vcl/headless vcl/inc vcl/ios vcl/unx vcl/win

2012-06-11 Thread Caolán McNamara
 vcl/aqua/source/window/salobj.cxx |6 
 vcl/headless/svpdummies.cxx   |1 
 vcl/inc/aqua/salobj.h |1 
 vcl/inc/headless/svpdummies.hxx   |2 -
 vcl/inc/ios/salobj.h  |1 
 vcl/inc/salobj.hxx|2 -
 vcl/inc/unx/gtk/gtkobject.hxx |2 -
 vcl/inc/unx/salobj.h  |2 -
 vcl/inc/win/saldata.hxx   |1 
 vcl/inc/win/salobj.h  |2 -
 vcl/inc/window.h  |3 --
 vcl/ios/source/window/salobj.cxx  |6 
 vcl/unx/generic/window/salobj.cxx |6 
 vcl/unx/gtk/window/gtkobject.cxx  |4 ---
 vcl/win/source/app/salinst.cxx|   14 +++
 vcl/win/source/gdi/salprn.cxx |   15 
 vcl/win/source/window/salobj.cxx  |   46 --
 17 files changed, 10 insertions(+), 104 deletions(-)

New commits:
commit 4282865c517f8de814696fa75d0662aba73a4624
Author: Thomas Arnhold tho...@arnhold.org
Date:   Sat Jun 9 06:43:18 2012 +0200

Remove unused InterceptChildWindowKeyDown

- InterceptChildWindowKeyDown never gets called
- so mbInterceptChildWindowKeyDown doesn't get changed
- at ImplInterceptChildWindowKeyDown
   a) ImplSendMessage() is never accessed
   b) always returns sal_False

Change-Id: I2dc84c88644d19c238064ab1b7dff0a24f90dc5d

diff --git a/vcl/aqua/source/window/salobj.cxx 
b/vcl/aqua/source/window/salobj.cxx
index 40ba2d5..a0f 100644
--- a/vcl/aqua/source/window/salobj.cxx
+++ b/vcl/aqua/source/window/salobj.cxx
@@ -212,10 +212,4 @@ const SystemEnvData* AquaSalObject::GetSystemData() const
 return maSysData;
 }
 
-// ---
-
-void AquaSalObject::InterceptChildWindowKeyDown( sal_Bool /*bIntercept*/ )
-{
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/headless/svpdummies.cxx b/vcl/headless/svpdummies.cxx
index 9ebf261..2d80332 100644
--- a/vcl/headless/svpdummies.cxx
+++ b/vcl/headless/svpdummies.cxx
@@ -51,7 +51,6 @@ void SvpSalObject::EndSetClipRegion() {}
 void SvpSalObject::SetPosSize( long, long, long, long ) {}
 void SvpSalObject::Show( sal_Bool ) {}
 const SystemEnvData* SvpSalObject::GetSystemData() const { return 
m_aSystemChildData; }
-void SvpSalObject::InterceptChildWindowKeyDown( sal_Bool ) {}
 
 // SalI18NImeStatus
 SvpImeStatus::~SvpImeStatus() {}
diff --git a/vcl/inc/aqua/salobj.h b/vcl/inc/aqua/salobj.h
index 2931ca0..490acd8 100644
--- a/vcl/inc/aqua/salobj.h
+++ b/vcl/inc/aqua/salobj.h
@@ -77,7 +77,6 @@ public:
 virtual voidSetPosSize( long nX, long nY, long nWidth, 
long nHeight );
 virtual voidShow( sal_Bool bVisible );
 virtual const SystemEnvData*GetSystemData() const;
-virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept );
 };
 
 #endif // _SV_SALOBJ_H
diff --git a/vcl/inc/headless/svpdummies.hxx b/vcl/inc/headless/svpdummies.hxx
index 0fc437e..9e3f4c9 100644
--- a/vcl/inc/headless/svpdummies.hxx
+++ b/vcl/inc/headless/svpdummies.hxx
@@ -55,8 +55,6 @@ public:
 virtual voidShow( sal_Bool bVisible );
 
 virtual const SystemEnvData*GetSystemData() const;
-
-virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept );
 };
 
 class SvpImeStatus : public SalI18NImeStatus
diff --git a/vcl/inc/ios/salobj.h b/vcl/inc/ios/salobj.h
index 751131f..a93f851 100644
--- a/vcl/inc/ios/salobj.h
+++ b/vcl/inc/ios/salobj.h
@@ -74,7 +74,6 @@ public:
 virtual voidSetPosSize( long nX, long nY, long nWidth, 
long nHeight );
 virtual voidShow( sal_Bool bVisible );
 virtual const SystemEnvData*GetSystemData() const;
-virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept );
 };
 
 #endif // _SV_SALOBJ_H
diff --git a/vcl/inc/salobj.hxx b/vcl/inc/salobj.hxx
index df0e4cb..7aa453f 100644
--- a/vcl/inc/salobj.hxx
+++ b/vcl/inc/salobj.hxx
@@ -76,8 +76,6 @@ public:
 
 virtual const SystemEnvData*GetSystemData() const = 0;
 
-virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept ) = 0;
-
 voidSetCallback( void* pInst, SALOBJECTPROC pProc )
 { m_pInst = pInst; m_pCallback = pProc; }
 longCallCallback( sal_uInt16 nEvent, const void* 
pEvent )
diff --git a/vcl/inc/unx/gtk/gtkobject.hxx b/vcl/inc/unx/gtk/gtkobject.hxx
index b715bb1..03b19a8 100644
--- a/vcl/inc/unx/gtk/gtkobject.hxx
+++ b/vcl/inc/unx/gtk/gtkobject.hxx
@@ -65,8 +65,6 @@ public:
 virtual voidSetForwardKey( sal_Bool 
bEnable );
 
 virtual const SystemEnvData*GetSystemData() const;
-
-virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept );
 };
 
 #endif // _SV_SALOBJ_H
diff --git a/vcl/inc/unx/salobj.h b/vcl/inc/unx/salobj.h
index e2cbc09..5afd686 100644
--- a/vcl/inc/unx/salobj.h
+++ b/vcl/inc/unx/salobj.h
@@ -95,8 +95,6 @@ public:
 

[Libreoffice-commits] .: vcl/aqua vcl/ios

2012-05-23 Thread Jan Holesovsky
 vcl/aqua/source/window/salframe.cxx |1 -
 vcl/ios/source/window/salframe.cxx  |1 -
 2 files changed, 2 deletions(-)

New commits:
commit 422647493b33e397bcc19031ee13693ecaa65ba8
Author: Jan Holesovsky ke...@suse.cz
Date:   Wed May 23 12:06:39 2012 +0200

fdo#49914, rulers: DarkShadow color is supposed to be dark (even on Mac).

Change-Id: I09d0c5d6797b6df9e84ad3574fc420241fe72707

diff --git a/vcl/aqua/source/window/salframe.cxx 
b/vcl/aqua/source/window/salframe.cxx
index f2e77e5..456bb91 100644
--- a/vcl/aqua/source/window/salframe.cxx
+++ b/vcl/aqua/source/window/salframe.cxx
@@ -1262,7 +1262,6 @@ void AquaSalFrame::UpdateSettings( AllSettings rSettings 
)
 aStyleSettings.SetDialogColor( aBackgroundColor );
 aStyleSettings.SetLightBorderColor( aBackgroundColor );
 Color aShadowColor( aStyleSettings.GetShadowColor() );
-aStyleSettings.SetDarkShadowColor( aShadowColor );
 aShadowColor.IncreaseLuminance( 32 );
 aStyleSettings.SetShadowColor( aShadowColor );
 
diff --git a/vcl/ios/source/window/salframe.cxx 
b/vcl/ios/source/window/salframe.cxx
index ef0e680..c86aa7d 100644
--- a/vcl/ios/source/window/salframe.cxx
+++ b/vcl/ios/source/window/salframe.cxx
@@ -735,7 +735,6 @@ void IosSalFrame::UpdateSettings( AllSettings rSettings )
 aStyleSettings.SetDialogColor( aBackgroundColor );
 aStyleSettings.SetLightBorderColor( aBackgroundColor );
 Color aShadowColor( aStyleSettings.GetShadowColor() );
-aStyleSettings.SetDarkShadowColor( aShadowColor );
 aShadowColor.IncreaseLuminance( 32 );
 aStyleSettings.SetShadowColor( aShadowColor );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua

2012-04-25 Thread Stephan Bergmann
 vcl/aqua/source/dtrans/DataFlavorMapping.cxx |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 004763101a7c5d70c735656e62ca351595da317b
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Apr 25 13:16:25 2012 +0200

isOUStringType still used (from dbgutil code)

diff --git a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx 
b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
index 1f8595d..e0db688 100644
--- a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
+++ b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
@@ -153,6 +153,11 @@ namespace // private
 return (theType == CPPUTYPE_SEQINT8);
   }
 
+  inline bool isOUStringType(const Type theType)
+  {
+return (theType == CPPUTYPE_OUSTRING);
+  }
+
 } // namespace private
 
 
@@ -599,7 +604,9 @@ DataProviderPtr_t 
DataFlavorMapper::getDataProvider(NSString* systemFlavor, Refe
 }
   else // Must be OUString type
 {
-  BOOST_ASSERT(isOUStringType(data.getValueType()));
+  SAL_WARN_IF(
+  !isOUStringType(data.getValueType()), vcl,
+  must be OUString type);
   dp = DataProviderPtr_t(new UniDataProvider(data));
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua vcl/Module_vcl.mk vcl/Package_osx.mk vcl/Zip_osxres.mk

2012-02-29 Thread David Tardon
 vcl/Module_vcl.mk  |2 -
 vcl/Package_osx.mk |   38 ---
 vcl/Zip_osxres.mk  |  106 +
 3 files changed, 107 insertions(+), 39 deletions(-)

New commits:
commit b5af1c35284560deaa862c2d87847b2088afcae0
Author: David Tardon dtar...@redhat.com
Date:   Wed Feb 29 12:34:33 2012 +0100

can use Zip for this

diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk
index f9b86ed..7ec9395 100644
--- a/vcl/Module_vcl.mk
+++ b/vcl/Module_vcl.mk
@@ -75,7 +75,7 @@ endif
 
 ifeq ($(GUIBASE),aqua)
 $(eval $(call gb_Module_add_targets,vcl,\
-Package_osx \
+Zip_osxres \
 ))
 endif
 
diff --git a/vcl/Package_osx.mk b/vcl/Package_osx.mk
deleted file mode 100644
index 17df37a..000
--- a/vcl/Package_osx.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#*
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# http://www.openoffice.org/license.html
-# for a copy of the LGPLv3 License.
-#
-#*
-
-### FIXME: when we have a real ZipTarget mechanism in gbuild replace this mess
-$(eval $(call gb_Package_Package,vcl_zip,))
-$(eval $(call 
gb_Package_add_file,vcl_zip,bin/osxres.zip,$(WORKDIR)/Misc/osxres.zip))
-
-/$(WORKDIR)/Misc/osxres.zip: $(SRCDIR)/vcl/aqua/source/res/MainMenu.nib/*.nib 
$(SRCDIR)/vcl/aqua/source/res/cursors/*.png
-   cd $(SRCDIR)/vcl/aqua/source/res ; \
-   mkdir -p $(dir $@) ; \
-   zip $@ MainMenu.nib/*.nib cursors/*.png
-
-# vim: set noet sw=4 ts=4:
diff --git a/vcl/Zip_osxres.mk b/vcl/Zip_osxres.mk
new file mode 100644
index 000..212b802
--- /dev/null
+++ b/vcl/Zip_osxres.mk
@@ -0,0 +1,106 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the License); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an AS IS basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# Major Contributor(s):
+# Copyright (C) 2012 Red Hat, Inc., David Tardon dtar...@redhat.com
+#  (initial developer)
+#
+# All Rights Reserved.
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the GPLv3+), or
+# the GNU Lesser General Public License Version 3 or later (the LGPLv3+),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+
+$(eval $(call gb_Zip_Zip,osxres,$(SRCDIR)/vcl/aqua/source/res))
+
+$(eval $(call gb_Zip_add_files,osxres,\
+MainMenu.nib/classes.nib \
+MainMenu.nib/info.nib \
+MainMenu.nib/keyedobjects.nib \
+cursors/airbrush.png \
+cursors/ase.png \
+cursors/asn.png \
+cursors/asne.png \
+cursors/asns.png \
+cursors/asnswe.png \
+cursors/asnw.png \
+cursors/ass.png \
+cursors/asse.png \
+cursors/assw.png \
+cursors/asw.png \
+cursors/aswe.png \
+cursors/chain.png \
+cursors/chainnot.png \
+cursors/chart.png \
+cursors/copydata.png \
+cursors/copydlnk.png \
+cursors/copyf.png \
+cursors/copyf2.png \
+cursors/copyflnk.png \
+cursors/crook.png \
+cursors/crop.png \
+cursors/darc.png \
+cursors/dbezier.png \
+cursors/dcapt.png \
+cursors/dcirccut.png \
+cursors/dconnect.png \
+cursors/dellipse.png \
+cursors/detectiv.png \
+cursors/dfree.png \
+cursors/dline.png \
+cursors/dpie.png \
+cursors/dpolygon.png \
+cursors/drect.png \
+cursors/dtext.png \
+cursors/fill.png \
+cursors/help.png \
+cursors/hourglass.png \

[Libreoffice-commits] .: vcl/aqua vcl/source

2012-02-27 Thread Muthu Subramanian
 vcl/aqua/source/app/salinst.cxx |6 +++---
 vcl/aqua/source/app/salsys.cxx  |4 ++--
 vcl/aqua/source/dtrans/HtmlFmtFlt.cxx   |4 ++--
 vcl/aqua/source/dtrans/PictToBmpFlt.cxx |4 ++--
 vcl/source/gdi/pdfwriter_impl.cxx   |5 ++---
 vcl/source/gdi/print3.cxx   |2 +-
 6 files changed, 12 insertions(+), 13 deletions(-)

New commits:
commit 5d1acca5a9d40d6197e12fd959c3644bcc60f799
Author: Chr. Rossmanith chrrossman...@gmx.de
Date:   Mon Feb 27 18:49:17 2012 +0530

Replace getLength() with isEmpty() where appropriate

diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx
index 7a01b0b..794dd84 100644
--- a/vcl/aqua/source/app/salinst.cxx
+++ b/vcl/aqua/source/app/salinst.cxx
@@ -997,7 +997,7 @@ rtl::OUString AquaSalInstance::GetDefaultPrinter()
 // #i113170# may not be the main thread if called from UNO API
 SalData::ensureThreadAutoreleasePool();
 
-if( ! maDefaultPrinter.getLength() )
+if( maDefaultPrinter.isEmpty() )
 {
 NSPrintInfo* pPI = [NSPrintInfo sharedPrintInfo];
 DBG_ASSERT( pPI, no print info );
@@ -1138,10 +1138,10 @@ void AquaSalInstance::AddToRecentDocumentList(const 
rtl::OUString rFileUrl, con
 {
 // Convert file URL for external use (see above)
 rtl::OUString externalUrl = translateToExternalUrl(rFileUrl);
-if( 0 == externalUrl.getLength() )
+if( externalUrl.isEmpty() )
 externalUrl = rFileUrl;
 
-if( externalUrl.getLength()  !isDangerousUrl( externalUrl ) )
+if( !externalUrl.isEmpty()  !isDangerousUrl( externalUrl ) )
 {
 NSString* pString = CreateNSString( externalUrl );
 NSURL* pURL = [NSURL URLWithString: pString];
diff --git a/vcl/aqua/source/app/salsys.cxx b/vcl/aqua/source/app/salsys.cxx
index 8a371d6..7c6f683 100644
--- a/vcl/aqua/source/app/salsys.cxx
+++ b/vcl/aqua/source/app/salsys.cxx
@@ -109,7 +109,7 @@ rtl::OUString AquaSalSystem::GetDisplayScreenName( unsigned 
int nScreen )
 static NSString* getStandardString( int nButtonId )
 {
 rtl::OUString aText( Button::GetStandardText( nButtonId ) );
-if( ! aText.getLength() ) // this is for bad cases, we might be missing 
the vcl resource
+if( aText.isEmpty() ) // this is for bad cases, we might be missing the 
vcl resource
 {
 switch( nButtonId )
 {
@@ -121,7 +121,7 @@ static NSString* getStandardString( int nButtonId )
 case BUTTON_NO :aText = rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( No ) );break;
 }
 }
-return aText.getLength() ? CreateNSString( aText) : nil;
+return aText.isEmpty() ? nil : CreateNSString( aText);
 }
 
 int AquaSalSystem::ShowNativeMessageBox( const rtl::OUString rTitle,
diff --git a/vcl/aqua/source/dtrans/HtmlFmtFlt.cxx 
b/vcl/aqua/source/dtrans/HtmlFmtFlt.cxx
index 0bd461d..275f5a1 100644
--- a/vcl/aqua/source/dtrans/HtmlFmtFlt.cxx
+++ b/vcl/aqua/source/dtrans/HtmlFmtFlt.cxx
@@ -65,9 +65,9 @@ const std::string TAG_END_BODY = std::string(/BODY);
 
 Sequencesal_Int8 SAL_CALL TextHtmlToHTMLFormat(Sequencesal_Int8 aTextHtml)
 {
-OSL_ASSERT(aTextHtml.getLength()  0);
+OSL_ASSERT(!aTextHtml.isEmpty());
 
-if (!(aTextHtml.getLength()  0))
+if (aTextHtml.isEmpty())
 return Sequencesal_Int8();
 
 // fill the buffer with dummy values to calc the exact length
diff --git a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx 
b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
index 3eb4fb8..4b3d371 100644
--- a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
+++ b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
@@ -161,7 +161,7 @@ bool ImageToBMP( com::sun::star::uno::Sequencesal_Int8 
aPict,
 {
 aBmp.realloc( [pOut length] );
 [pOut getBytes: aBmp.getArray() length: aBmp.getLength()];
-bResult = (aBmp.getLength() != 0);
+bResult = (!aBmp.isEmpty());
 }
 }
 }
@@ -190,7 +190,7 @@ bool BMPToImage( com::sun::star::uno::Sequencesal_Int8 
aBmp,
 {
 aPict.realloc( [pOut length] );
 [pOut getBytes: aPict.getArray() length: aPict.getLength()];
-bResult = (aPict.getLength() != 0);
+bResult = (!aPict.isEmpty());
 }
 }
 }
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 8456d86..3820d81 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -6698,11 +6698,10 @@ PDFStreamIf::~PDFStreamIf()
 
 void SAL_CALL  PDFStreamIf::writeBytes( const com::sun::star::uno::Sequence 
sal_Int8  aData ) throw()
 {
-if( m_bWrite )
+if( m_bWrite  aData.getLength() )
 {
 sal_Int32 nBytes = aData.getLength();
-if( nBytes  0 )
-m_pWriter-writeBuffer( aData.getConstArray(), nBytes );
+m_pWriter-writeBuffer( aData.getConstArray(), nBytes );
 }
 }
 
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx

[Libreoffice-commits] .: vcl/aqua vcl/source

2012-02-27 Thread Ivan Timofeev
 vcl/aqua/source/dtrans/HtmlFmtFlt.cxx   |4 ++--
 vcl/aqua/source/dtrans/PictToBmpFlt.cxx |4 ++--
 vcl/source/gdi/print3.cxx   |2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit c581d33dec47a4c411a034482876543f6357d1e8
Author: Ivan Timofeev timofeev@gmail.com
Date:   Mon Feb 27 17:12:33 2012 +0400

there is no Sequence::isEmpty()

diff --git a/vcl/aqua/source/dtrans/HtmlFmtFlt.cxx 
b/vcl/aqua/source/dtrans/HtmlFmtFlt.cxx
index 275f5a1..0bd461d 100644
--- a/vcl/aqua/source/dtrans/HtmlFmtFlt.cxx
+++ b/vcl/aqua/source/dtrans/HtmlFmtFlt.cxx
@@ -65,9 +65,9 @@ const std::string TAG_END_BODY = std::string(/BODY);
 
 Sequencesal_Int8 SAL_CALL TextHtmlToHTMLFormat(Sequencesal_Int8 aTextHtml)
 {
-OSL_ASSERT(!aTextHtml.isEmpty());
+OSL_ASSERT(aTextHtml.getLength()  0);
 
-if (aTextHtml.isEmpty())
+if (!(aTextHtml.getLength()  0))
 return Sequencesal_Int8();
 
 // fill the buffer with dummy values to calc the exact length
diff --git a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx 
b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
index 4b3d371..3eb4fb8 100644
--- a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
+++ b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
@@ -161,7 +161,7 @@ bool ImageToBMP( com::sun::star::uno::Sequencesal_Int8 
aPict,
 {
 aBmp.realloc( [pOut length] );
 [pOut getBytes: aBmp.getArray() length: aBmp.getLength()];
-bResult = (!aBmp.isEmpty());
+bResult = (aBmp.getLength() != 0);
 }
 }
 }
@@ -190,7 +190,7 @@ bool BMPToImage( com::sun::star::uno::Sequencesal_Int8 
aBmp,
 {
 aPict.realloc( [pOut length] );
 [pOut getBytes: aPict.getArray() length: aPict.getLength()];
-bResult = (!aPict.isEmpty());
+bResult = (aPict.getLength() != 0);
 }
 }
 }
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index abdece6..482491d 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -1336,7 +1336,7 @@ void PrinterController::setValue( const 
beans::PropertyValue i_rValue )
 
 void PrinterController::setUIOptions( const Sequence beans::PropertyValue  
i_rOptions )
 {
-DBG_ASSERT( mpImplData-maUIOptions.isEmpty(), setUIOptions called twice 
! );
+DBG_ASSERT( mpImplData-maUIOptions.getLength() == 0, setUIOptions called 
twice ! );
 
 mpImplData-maUIOptions = i_rOptions;
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua vcl/source vcl/unx

2012-02-21 Thread Josh Heidenreich
 vcl/aqua/source/app/salinst.cxx|3 ---
 vcl/aqua/source/window/salmenu.cxx |2 +-
 vcl/source/app/svdata.cxx  |   14 --
 vcl/source/window/winproc.cxx  |   12 ++--
 vcl/unx/gtk/window/gtkframe.cxx|   11 ---
 5 files changed, 3 insertions(+), 39 deletions(-)

New commits:
commit 936ebcfa4b44a90bdc8789ce7556f1ba3599375c
Author: Josh Heidenreich josh.sickm...@gmail.com
Date:   Tue Feb 21 13:06:11 2012 +1030

EasyHack fdo#46258 Removal of VCL testtool support (-enableautomation 
option)

diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx
index adae096..7a01b0b 100644
--- a/vcl/aqua/source/app/salinst.cxx
+++ b/vcl/aqua/source/app/salinst.cxx
@@ -206,9 +206,6 @@ static void initNSApp()
selector: 
@selector(applicationWillResignActive:)
name: @AppleRemoteWillResignActive
object: nil ];
-
-if( ImplGetSVData()-mbIsTestTool )
-[NSApp activateIgnoringOtherApps: YES];
 }
 
 sal_Bool ImplSVMainHook( int * pnInit )
diff --git a/vcl/aqua/source/window/salmenu.cxx 
b/vcl/aqua/source/window/salmenu.cxx
index 23d0180..f358e47 100644
--- a/vcl/aqua/source/window/salmenu.cxx
+++ b/vcl/aqua/source/window/salmenu.cxx
@@ -542,7 +542,7 @@ sal_Bool AquaSalMenu::VisibleMenuBar()
 
 static const char *pExperimental = getenv (AQUA_NATIVE_MENUS);
 
-if ( ImplGetSVData()-mbIsTestTool || (pExperimental  
!strcasecmp(pExperimental, FALSE)) )
+if ( pExperimental  !strcasecmp(pExperimental, FALSE) )
 return sal_False;
 
 // End of experimental code enable/disable part
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index 84b2df0..3cd 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -121,20 +121,6 @@ void ImplInitSVData()
 pImplSVData-maHelpData.mbAutoHelpId = sal_True;
 pImplSVData-maNWFData.maMenuBarHighlightTextColor = Color( 
COL_TRANSPARENT );
 
-// find out whether we are running in the testtool
-// in this case we need some special workarounds
-sal_uInt32 nArgs = osl_getCommandArgCount();
-for( sal_uInt32 i = 0; i  nArgs; i++ )
-{
-rtl::OUString aArg;
-osl_getCommandArg( i, aArg.pData );
-if( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( -enableautomation 
) ) )
-{
-pImplSVData-mbIsTestTool = true;
-break;
-}
-}
-
 // mark default layout border as unitialized
 pImplSVData-maAppData.mnDefaultLayoutBorder = -1;
 }
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index a306fa5..504b753 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -1851,15 +1851,11 @@ static void ImplHandleGetFocus( Window* pWindow )
 // do not blink when they receive focus
 if ( !pWindow-ImplGetWindowImpl()-mpFrameData-mnFocusId )
 {
-bool bCallDirect = ImplGetSVData()-mbIsTestTool;
 pWindow-ImplGetWindowImpl()-mpFrameData-mbStartFocusState = 
!pWindow-ImplGetWindowImpl()-mpFrameData-mbHasFocus;
-if( ! bCallDirect )
-Application::PostUserEvent( 
pWindow-ImplGetWindowImpl()-mpFrameData-mnFocusId, LINK( pWindow, Window, 
ImplAsyncFocusHdl ) );
+Application::PostUserEvent( 
pWindow-ImplGetWindowImpl()-mpFrameData-mnFocusId, LINK( pWindow, Window, 
ImplAsyncFocusHdl ) );
 Window* pFocusWin = 
pWindow-ImplGetWindowImpl()-mpFrameData-mpFocusWin;
 if ( pFocusWin  pFocusWin-ImplGetWindowImpl()-mpCursor )
 pFocusWin-ImplGetWindowImpl()-mpCursor-ImplShow();
-if( bCallDirect )
-pWindow-ImplAsyncFocusHdl( NULL );
 }
 }
 
@@ -1892,19 +1888,15 @@ static void ImplHandleLoseFocus( Window* pWindow )
 
 // execute Focus-Events after a delay, such that SystemChildWindows
 // do not flicker when they receive focus
-bool bCallDirect = ImplGetSVData()-mbIsTestTool;
 if ( !pWindow-ImplGetWindowImpl()-mpFrameData-mnFocusId )
 {
 pWindow-ImplGetWindowImpl()-mpFrameData-mbStartFocusState = 
!pWindow-ImplGetWindowImpl()-mpFrameData-mbHasFocus;
-if( ! bCallDirect )
-Application::PostUserEvent( 
pWindow-ImplGetWindowImpl()-mpFrameData-mnFocusId, LINK( pWindow, Window, 
ImplAsyncFocusHdl ) );
+Application::PostUserEvent( 
pWindow-ImplGetWindowImpl()-mpFrameData-mnFocusId, LINK( pWindow, Window, 
ImplAsyncFocusHdl ) );
 }
 
 Window* pFocusWin = pWindow-ImplGetWindowImpl()-mpFrameData-mpFocusWin;
 if ( pFocusWin  pFocusWin-ImplGetWindowImpl()-mpCursor )
 pFocusWin-ImplGetWindowImpl()-mpCursor-ImplHide();
-if( bCallDirect )
-pWindow-ImplAsyncFocusHdl( NULL );
 }
 
 // ---
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 7f4db68..7384a73 100644

[Libreoffice-commits] .: vcl/aqua writerfilter/qa writerfilter/source writerfilter/unocomponent xmloff/source xmlscript/source xmlscript/test xmlsecurity/tools

2012-01-08 Thread Takeshi Abe
 vcl/aqua/source/a11y/aqua11yfocuslistener.cxx   |4 
+-
 writerfilter/qa/cppunittests/qname/testQName.cxx|2 
-
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx|4 
+-
 writerfilter/source/dmapper/DomainMapper_Impl.cxx   |3 
-
 writerfilter/source/dmapper/GraphicImport.cxx   |2 
-
 writerfilter/source/dmapper/StyleSheetTable.cxx |3 
-
 writerfilter/source/doctok/WW8DocumentImpl.cxx  |   18 
+-
 writerfilter/source/resourcemodel/TagLogger.cxx |2 
-
 writerfilter/source/resourcemodel/resourcemodel.cxx |   10 
++---
 writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx |2 
-
 xmloff/source/chart/SchXMLImport.cxx|4 
+-
 xmloff/source/chart/SchXMLSeries2Context.cxx|   14 
+++
 xmloff/source/chart/SchXMLSeriesHelper.cxx  |6 
+--
 xmloff/source/chart/SchXMLTableContext.cxx  |3 
-
 xmloff/source/draw/XMLShapeStyleContext.cxx |4 
+-
 xmloff/source/draw/animationexport.cxx  |9 
+
 xmloff/source/draw/ximpstyl.cxx |4 
+-
 xmloff/source/style/xmlimppr.cxx|8 
++--
 xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx  |2 
-
 xmlscript/source/xmldlg_imexp/xmldlg_import.cxx |3 
-
 xmlscript/source/xmlflat_imexp/xmlbas_export.cxx|8 
++--
 xmlscript/source/xmlflat_imexp/xmlbas_import.cxx|   14 
+++
 xmlscript/test/imexp.cxx|6 
+--
 xmlsecurity/tools/standalone/csfit/certmngr.cxx |2 
-
 xmlsecurity/tools/standalone/csfit/decrypter.cxx|2 
-
 xmlsecurity/tools/standalone/csfit/encrypter.cxx|2 
-
 xmlsecurity/tools/standalone/csfit/signer.cxx   |2 
-
 xmlsecurity/tools/standalone/csfit/verifier.cxx |2 
-
 xmlsecurity/tools/standalone/mscsfit/certmngr.cxx   |2 
-
 xmlsecurity/tools/standalone/mscsfit/decrypter.cxx  |2 
-
 xmlsecurity/tools/standalone/mscsfit/encrypter.cxx  |2 
-
 xmlsecurity/tools/standalone/mscsfit/signer.cxx |2 
-
 xmlsecurity/tools/standalone/mscsfit/verifier.cxx   |2 
-
 33 files changed, 73 insertions(+), 82 deletions(-)

New commits:
commit b35c0ae4ffce43b881d66efe74a19f1bf6299331
Author: Takeshi Abe t...@fixedpoint.jp
Date:   Mon Jan 9 03:16:33 2012 +0900

catch exception by constant reference

diff --git a/vcl/aqua/source/a11y/aqua11yfocuslistener.cxx 
b/vcl/aqua/source/a11y/aqua11yfocuslistener.cxx
index 0b2fe19..62dc790 100644
--- a/vcl/aqua/source/a11y/aqua11yfocuslistener.cxx
+++ b/vcl/aqua/source/a11y/aqua11yfocuslistener.cxx
@@ -68,7 +68,7 @@ id AquaA11yFocusListener::getFocusedUIElement()
 if( xContext.is() )
 m_focusedObject = [ AquaA11yFactory 
wrapperForAccessibleContext: xContext ];
 }
-} catch( RuntimeException )  {
+} catch(const RuntimeException )  {
 // intentionally do nothing ..
 }
 }
@@ -95,7 +95,7 @@ AquaA11yFocusListener::focusedObjectChanged(const Reference 
XAccessible  xAcc
 NSAccessibilityPostNotification(m_focusedObject, 
NSAccessibilityFocusedUIElementChangedNotification);
 }
 }
-} catch( RuntimeException ) {
+} catch(const RuntimeException ) {
 // intentionally do nothing ..
 }
 }
diff --git a/writerfilter/qa/cppunittests/qname/testQName.cxx 
b/writerfilter/qa/cppunittests/qname/testQName.cxx
index 2a2b26e..1c0e24d 100644
--- a/writerfilter/qa/cppunittests/qname/testQName.cxx
+++ b/writerfilter/qa/cppunittests/qname/testQName.cxx
@@ -103,7 +103,7 @@ public:
 sprintf(buf, name%i, i++);
 testAdd(myns, buf);
 }
-} catch (std::logic_error e)
+} catch (const std::logic_error )
 {
 // only way to exit this function
 flag=true;
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx 
b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 6b04424..f9acfaa 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -714,7 +714,7 @@ void DomainMapperTableHandler::endTable()
 m_xTableRange = xTable-getAnchor( );
 }
 }
-catch ( 

[Libreoffice-commits] .: vcl/aqua

2011-12-14 Thread Stephan Bergmann
 vcl/aqua/source/app/salinst.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit d43f1e85aa768656a30cae9cbc131b072597250f
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Dec 14 17:58:39 2011 +0100

Adapted Mac-only code to ByteString reduction.

diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx
index 0898e67..3df6844 100644
--- a/vcl/aqua/source/app/salinst.cxx
+++ b/vcl/aqua/source/app/salinst.cxx
@@ -325,7 +325,7 @@ void InitSalMain()
 if ( aCmdPath.Len() ) {
 DirEntry aCmdDirEntry( aCmdPath );
 aCmdDirEntry.ToAbs();
-aCmdPath = ByteString( aCmdDirEntry.GetPath().GetFull(), 
RTL_TEXTENCODING_ASCII_US );
+aCmdPath = rtl::OUStringToOString( 
aCmdDirEntry.GetPath().GetFull(), RTL_TEXTENCODING_ASCII_US );
 }
 // Assign to PATH environment variable
 if ( aCmdPath.Len() )
@@ -333,7 +333,7 @@ void InitSalMain()
 aTmpPath = ByteString( PATH= );
 aTmpPath += aCmdPath;
 if ( aPath.Len() )
-aTmpPath += ByteString( DirEntry::GetSearchDelimiter(), 
RTL_TEXTENCODING_ASCII_US );
+aTmpPath += rtl::OUStringToOString( 
DirEntry::GetSearchDelimiter(), RTL_TEXTENCODING_ASCII_US );
 aTmpPath += aPath;
 putenv( (char*)aTmpPath.GetBuffer() );
 }
@@ -343,7 +343,7 @@ void InitSalMain()
 aTmpPath = ByteString( STAR_RESOURCEPATH= );
 aTmpPath += aCmdPath;
 if ( aResPath.Len() )
-aTmpPath += ByteString( DirEntry::GetSearchDelimiter(), 
RTL_TEXTENCODING_ASCII_US );
+aTmpPath += rtl::OUStringToOString( 
DirEntry::GetSearchDelimiter(), RTL_TEXTENCODING_ASCII_US );
 aTmpPath += aResPath;
 putenv( (char*)aTmpPath.GetBuffer() );
 }
@@ -353,7 +353,7 @@ void InitSalMain()
 aTmpPath = ByteString( DYLD_LIBRARY_PATH= );
 aTmpPath += aCmdPath;
 if ( aLibPath.Len() )
-aTmpPath += ByteString( DirEntry::GetSearchDelimiter(), 
RTL_TEXTENCODING_ASCII_US );
+aTmpPath += rtl::OUStringToOString( 
DirEntry::GetSearchDelimiter(), RTL_TEXTENCODING_ASCII_US );
 aTmpPath += aLibPath;
 putenv( (char*)aTmpPath.GetBuffer() );
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua

2011-12-05 Thread David Tardon
 vcl/aqua/source/gdi/salprn.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 03f0a84c009b7c2738c8aaa52b5cc2a0b9ddd9f3
Author: David Tardon dtar...@redhat.com
Date:   Mon Dec 5 17:41:58 2011 +0100

fix build on macosx

diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx
index 6712243..46a0264 100644
--- a/vcl/aqua/source/gdi/salprn.cxx
+++ b/vcl/aqua/source/gdi/salprn.cxx
@@ -43,6 +43,7 @@
 
 #include com/sun/star/beans/PropertyValue.hpp
 #include com/sun/star/awt/Size.hpp
+#include com/sun/star/uno/Sequence.hpp
 
 #include algorithm
 
@@ -50,6 +51,8 @@ using namespace vcl;
 using namespace com::sun::star;
 using namespace com::sun::star::beans;
 
+namespace uno = com::sun::star::uno;
+
 using ::rtl::OUString;
 using ::rtl::OStringToOUString;
 
@@ -366,7 +369,7 @@ void AquaSalInfoPrinter::GetPageInfo( const ImplJobSetup*,
 static Size getPageSize( vcl::PrinterController i_rController, sal_Int32 
i_nPage )
 {
 Size aPageSize;
-Sequence PropertyValue  aPageParms( i_rController.getPageParameters( 
i_nPage ) );
+uno::Sequence PropertyValue  aPageParms( 
i_rController.getPageParameters( i_nPage ) );
 for( sal_Int32 nProperty = 0, nPropertyCount = aPageParms.getLength(); 
nProperty  nPropertyCount; ++nProperty )
 {
 if( aPageParms[ nProperty ].Name.equalsAsciiL( 
RTL_CONSTASCII_STRINGPARAM( PageSize ) ) )
@@ -515,7 +518,7 @@ sal_Bool AquaSalInfoPrinter::StartJob( const rtl::OUString* 
i_pFileName,
 if( pPrintOperation )
 {
 NSObject* pReleaseAfterUse = nil;
-bool bShowPanel = (! i_rController.isDirectPrint()  
getUseNativeDialog()  i_rController.isShowDialogs() );
+bool bShowPanel = (! i_rController.isDirectPrint()  
useSystemPrintDialog()  i_rController.isShowDialogs() );
 [pPrintOperation setShowsPrintPanel: bShowPanel ? YES : NO ];
 [pPrintOperation setShowsProgressPanel: bShowProgressPanel ? 
YES : NO];
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua

2011-12-05 Thread Markus Mohrhard
 vcl/aqua/source/gdi/salprn.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 7d900eb8d2945e1a48581bae5877a26ef418f9fb
Author: Markus Mohrhard markus.mohrh...@googlemail.com
Date:   Mon Dec 5 23:45:05 2011 +0100

possible fix for build breaker

diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx
index 238fe87..69e02c2 100644
--- a/vcl/aqua/source/gdi/salprn.cxx
+++ b/vcl/aqua/source/gdi/salprn.cxx
@@ -51,8 +51,6 @@ using namespace vcl;
 using namespace com::sun::star;
 using namespace com::sun::star::beans;
 
-namespace uno = com::sun::star::uno;
-
 using ::rtl::OUString;
 using ::rtl::OStringToOUString;
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua

2011-12-01 Thread August Sodora
 vcl/aqua/source/gdi/aquaprintaccessoryview.mm |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1722c68c81974e509fe11910a5190c01e455d39e
Author: August Sodora aug...@gmail.com
Date:   Thu Dec 1 17:44:41 2011 -0500

Fix build in macosx

diff --git a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm 
b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
index 3a7fc59..17ee5a4 100644
--- a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
+++ b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
@@ -774,7 +774,7 @@ static void linebreakCell( NSCell* pBtn, const 
rtl::OUString i_rText )
 if( nIndex  nLen )
 {
 rtl::OUStringBuffer aBuf( i_rText );
-aBuf.setCharAt( nIndex, '\n' );
+aBuf[nIndex] = '\n';
 pText = CreateNSString( aBuf.makeStringAndClear() );
 [pBtn setTitle: pText];
 [pText release];
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua vcl/ios vcl/source vcl/win

2011-11-07 Thread Caolán McNamara
 vcl/aqua/source/window/salframe.cxx |3 +--
 vcl/ios/source/window/salframe.cxx  |3 +--
 vcl/source/app/dbggui.cxx   |3 +--
 vcl/source/app/settings.cxx |6 ++
 vcl/source/control/edit.cxx |3 +--
 vcl/source/control/menubtn.cxx  |6 ++
 vcl/source/gdi/regband.cxx  |3 +--
 vcl/source/window/accmgr.cxx|6 ++
 vcl/source/window/brdwin.cxx|6 ++
 vcl/source/window/msgbox.cxx|3 +--
 vcl/source/window/splitwin.cxx  |3 +--
 vcl/source/window/tabdlg.cxx|3 +--
 vcl/source/window/toolbox.cxx   |3 +--
 vcl/source/window/window.cxx|   12 
 vcl/win/source/gdi/salgdi.cxx   |9 +++--
 vcl/win/source/window/salobj.cxx|3 +--
 16 files changed, 25 insertions(+), 50 deletions(-)

New commits:
commit 2411ea09a8d20609e48b0750ab2102c00e0c3b8a
Author: Thomas Arnhold tho...@arnhold.org
Date:   Mon Nov 7 12:49:03 2011 +

redundant if not-null checks on delete

diff --git a/vcl/aqua/source/window/salframe.cxx 
b/vcl/aqua/source/window/salframe.cxx
index 5ac2842..7733649 100644
--- a/vcl/aqua/source/window/salframe.cxx
+++ b/vcl/aqua/source/window/salframe.cxx
@@ -128,8 +128,7 @@ AquaSalFrame::~AquaSalFrame()
 if( this == s_pCaptureFrame )
 s_pCaptureFrame = NULL;
 
-if ( mpGraphics )
-delete mpGraphics;
+delete mpGraphics;
 
 if( mpDockMenuEntry )
 // life cycle comment: the menu has ownership of the item, so no 
release
diff --git a/vcl/ios/source/window/salframe.cxx 
b/vcl/ios/source/window/salframe.cxx
index 8e2ea9d..3aab37a 100644
--- a/vcl/ios/source/window/salframe.cxx
+++ b/vcl/ios/source/window/salframe.cxx
@@ -106,8 +106,7 @@ IosSalFrame::~IosSalFrame()
 if( this == s_pCaptureFrame )
 s_pCaptureFrame = NULL;
 
-if ( mpGraphics )
-delete mpGraphics;
+delete mpGraphics;
 
 if ( mpView ) {
 [mpView release];
diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx
index 6e76706..468e7c8 100755
--- a/vcl/source/app/dbggui.cxx
+++ b/vcl/source/app/dbggui.cxx
@@ -1998,8 +1998,7 @@ void DbgGUIDeInit()
 DbgSetAbort( NULL );
 
 DbgWindow* pDbgWindow = ImplGetSVData()-maWinData.mpDbgWin;
-if ( pDbgWindow )
-delete pDbgWindow;
+delete pDbgWindow;
 }
 
 // ---
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 1795d5a..533fe6b 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -1546,10 +1546,8 @@ ImplAllSettingsData::ImplAllSettingsData( const 
ImplAllSettingsData rData ) :
 
 ImplAllSettingsData::~ImplAllSettingsData()
 {
-if ( mpLocaleDataWrapper )
-delete mpLocaleDataWrapper;
-if ( mpUILocaleDataWrapper )
-delete mpUILocaleDataWrapper;
+delete mpLocaleDataWrapper;
+delete mpUILocaleDataWrapper;
 if ( mpI18nHelper )
 delete mpI18nHelper;
 if ( mpUII18nHelper )
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index cf83869..a0a81e9 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -253,8 +253,7 @@ Edit::~Edit()
 
 delete mpIMEInfos;
 
-if ( mpUpdateDataTimer )
-delete mpUpdateDataTimer;
+delete mpUpdateDataTimer;
 
 if ( mxDnDListener.is() )
 {
diff --git a/vcl/source/control/menubtn.cxx b/vcl/source/control/menubtn.cxx
index 13513f6..2e1ad53 100644
--- a/vcl/source/control/menubtn.cxx
+++ b/vcl/source/control/menubtn.cxx
@@ -133,10 +133,8 @@ void MenuButton::ImplLoadRes( const ResId rResId )
 
 MenuButton::~MenuButton()
 {
-if ( mpMenuTimer )
-delete mpMenuTimer;
-if ( mpOwnMenu )
-delete mpOwnMenu;
+delete mpMenuTimer;
+delete mpOwnMenu;
 }
 
 // ---
diff --git a/vcl/source/gdi/regband.cxx b/vcl/source/gdi/regband.cxx
index 1cec295..b091783 100644
--- a/vcl/source/gdi/regband.cxx
+++ b/vcl/source/gdi/regband.cxx
@@ -201,8 +201,7 @@ void ImplRegionBand::ProcessPoints()
 }
 
 // remove last element if necessary
-if ( pRegionBandPoint )
-delete pRegionBandPoint;
+delete pRegionBandPoint;
 
 // list is now empty
 mpFirstBandPoint = NULL;
diff --git a/vcl/source/window/accmgr.cxx b/vcl/source/window/accmgr.cxx
index 43c78d5..a14530a 100644
--- a/vcl/source/window/accmgr.cxx
+++ b/vcl/source/window/accmgr.cxx
@@ -43,10 +43,8 @@ DBG_NAMEEX( Accelerator )
 
 ImplAccelManager::~ImplAccelManager()
 {
-if ( mpAccelList )
-delete mpAccelList;
-if ( mpSequenceList )
-delete mpSequenceList;
+delete mpAccelList;
+delete mpSequenceList;
 }
 
 // ---
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index d048b3a..bf25f34 100644
--- 

[Libreoffice-commits] .: vcl/aqua

2011-10-07 Thread Pierre-André Jacquod
 vcl/aqua/source/gdi/salatsuifontutils.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 78b1cc1a08d712212152a1e57400c8b07654e471
Author: Pierre-André Jacquod pjacq...@alumni.ethz.ch
Date:   Fri Oct 7 20:40:01 2011 +0200

Revert cppcheck scope reduction in vcl/..salatsuifontutils.cxx

This reverts commit e45b962f49829d5c60c913383b2132b579af3fab.
this is the most probale cause of the breakage on MacOSX tinderbox.
Do not really understand why it should break, but I do not see other
potential guilty commits... No MacOSX at hand... so revert and see

diff --git a/vcl/aqua/source/gdi/salatsuifontutils.cxx 
b/vcl/aqua/source/gdi/salatsuifontutils.cxx
index d9d2c8e..e124b3c 100644
--- a/vcl/aqua/source/gdi/salatsuifontutils.cxx
+++ b/vcl/aqua/source/gdi/salatsuifontutils.cxx
@@ -237,6 +237,7 @@ static bool GetDevFontAttributes( ATSUFontID nFontID, 
ImplDevFontAttributes rDF
 return false;
 int nBestNameValue = 0;
 int nBestStyleValue = 0;
+FontLanguageCode eBestLangCode = 0;
 const FontLanguageCode eUILangCode = 
Application::GetSettings().GetUILanguage();
 typedef std::vectorchar NameBuffer;
 NameBuffer aNameBuffer( 256 );
@@ -332,7 +333,7 @@ static bool GetDevFontAttributes( ATSUFontID nFontID, 
ImplDevFontAttributes rDF
 {
 // get the best family name
 nBestNameValue = nNameValue;
-FontLanguageCode eBestLangCode = eFontNameLanguage;
+eBestLangCode = eFontNameLanguage;
 rDFA.maName = aUtf16Name;
 }
 break;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua vcl/inc vcl/ios vcl/source vcl/unx vcl/win

2011-09-28 Thread Stephan Bergmann
 vcl/aqua/source/app/salinst.cxx   |7 +--
 vcl/inc/salinst.hxx   |2 +-
 vcl/ios/source/app/salinst.cxx|7 +--
 vcl/source/app/svapp.cxx  |   14 +-
 vcl/unx/generic/plugadapt/salplug.cxx |7 +--
 vcl/win/source/app/salinst.cxx|2 +-
 6 files changed, 30 insertions(+), 9 deletions(-)

New commits:
commit 01e0b770a5ce58de44283465ba51b03a1ee0db0c
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Sep 28 15:08:45 2011 +0200

Let SalAbort dump core on developer builds.

diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx
index df0d95c..489b1dd 100644
--- a/vcl/aqua/source/app/salinst.cxx
+++ b/vcl/aqua/source/app/salinst.cxx
@@ -258,14 +258,17 @@ sal_Bool ImplSVMainHook( int * pnInit )
 
 // ===
 
-void SalAbort( const XubString rErrorText )
+void SalAbort( const XubString rErrorText, bool bDumpCore )
 {
 if( !rErrorText.Len() )
 fprintf( stderr, Application Error  );
 else
 fprintf( stderr, %s ,
 ByteString( rErrorText, gsl_getSystemTextEncoding() ).GetBuffer() 
);
-abort();
+if( bDumpCore )
+abort();
+else
+_exit(1);
 }
 
 // ---
diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx
index d878dd7..194e61a 100644
--- a/vcl/inc/salinst.hxx
+++ b/vcl/inc/salinst.hxx
@@ -181,7 +181,7 @@ void DestroySalInstance( SalInstance* pInst );
 // - SalInstance-Functions -
 // -
 
-void SalAbort( const XubString rErrorText );
+void SalAbort( const XubString rErrorText, bool bDumpCore );
 
 VCL_PLUGIN_PUBLIC const ::rtl::OUString SalGetDesktopEnvironment();
 
diff --git a/vcl/ios/source/app/salinst.cxx b/vcl/ios/source/app/salinst.cxx
index fb5bfb9..f7c9685 100644
--- a/vcl/ios/source/app/salinst.cxx
+++ b/vcl/ios/source/app/salinst.cxx
@@ -142,14 +142,17 @@ sal_Bool ImplSVMainHook( int * pnInit )
 
 // ===
 
-void SalAbort( const XubString rErrorText )
+void SalAbort( const XubString rErrorText, bool bDumpCore )
 {
 if( !rErrorText.Len() )
 fprintf( stderr, Application Error  );
 else
 fprintf( stderr, %s ,
 ByteString( rErrorText, gsl_getSystemTextEncoding() ).GetBuffer() 
);
-abort();
+if( bDumpCore )
+abort();
+else
+_exit(1);
 }
 
 // ---
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index f426c11..b41f926 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -393,7 +393,19 @@ sal_uInt16 Application::Exception( sal_uInt16 nError )
 
 void Application::Abort( const XubString rErrorText )
 {
-SalAbort( rErrorText );
+//HACK: Dump core iff --norestore command line argument is given (assuming
+// this process is run by developers who are interested in cores, vs. end
+// users who are not):
+bool dumpCore = false;
+sal_uInt16 n = GetCommandLineParamCount();
+for (sal_uInt16 i = 0; i != n; ++i) {
+if (GetCommandLineParam(i).EqualsAscii(--norestore)) {
+dumpCore = true;
+break;
+}
+}
+
+SalAbort( rErrorText, dumpCore );
 }
 
 // ---
diff --git a/vcl/unx/generic/plugadapt/salplug.cxx 
b/vcl/unx/generic/plugadapt/salplug.cxx
index 51321b8..d707760 100644
--- a/vcl/unx/generic/plugadapt/salplug.cxx
+++ b/vcl/unx/generic/plugadapt/salplug.cxx
@@ -267,13 +267,16 @@ void DeInitSalMain()
 {
 }
 
-void SalAbort( const XubString rErrorText )
+void SalAbort( const XubString rErrorText, bool bDumpCore )
 {
 if( !rErrorText.Len() )
 std::fprintf( stderr, Application Error\n );
 else
 std::fprintf( stderr, %s\n, rtl::OUStringToOString(rErrorText, 
osl_getThreadTextEncoding()).getStr() );
-exit(-1);
+if( bDumpCore )
+abort();
+else
+_exit(1);
 }
 
 static const char * desktop_strings[] = { none, unknown, GNOME, KDE, 
KDE4 };
diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx
index 5e8930f..a0d41a6 100644
--- a/vcl/win/source/app/salinst.cxx
+++ b/vcl/win/source/app/salinst.cxx
@@ -84,7 +84,7 @@
 
 // ===
 
-void SalAbort( const XubString rErrorText )
+void SalAbort( const XubString rErrorText, bool )
 {
 ImplFreeSalGDI();
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits