Commits

Anonymous committed 826a471

CWS-TOOLING: integrate CWS vcl96
2008-11-27 15:56:56 +0100 pl r264499 : #i95488# fix a snafu
2008-11-17 12:05:23 +0100 pl r263713 : #158795# catch bad_alloc
2008-11-14 17:26:25 +0100 pl r263687 : #i93018# new msgbox images
2008-11-14 17:00:28 +0100 pl r263686 : #i95488# treat chinese font heights like korean
2008-11-14 14:59:17 +0100 pl r263677 : #i92102# RTL fixes: toolbox selection, popup menus
2008-11-14 11:40:22 +0100 pl r263669 : #i75035# move tear off panels correctly also in RTL case (thanks ayaniger)
2008-11-13 18:15:51 +0100 pl r263658 : #i93018# message box images, add hc version
2008-11-13 15:49:41 +0100 pl r263647 : #b6726794# add: UNC paths (windows specific)
2008-11-13 12:51:37 +0100 pl r263632 : #i95803# do not dereference empty interface
2008-11-12 18:13:55 +0100 pl r263609 : #b6727144# fix and speed up xor mode for special case invert on MacOSX
2008-11-12 15:07:47 +0100 pl r263599 : #i95392# add csv to calc mimetypes (thanks cmc)
2008-11-12 14:52:13 +0100 pl r263598 : #i87633# paste strings larger than 64k in the hope that each contained line is shorter
2008-11-12 13:37:29 +0100 pl r263594 : #i96141# fix if statement (thanks cmc)
2008-11-12 13:06:22 +0100 pl r263588 : #i93831# remove windows from static set again
2008-11-11 18:15:06 +0100 pl r263571 : #i96089# fix some wrong parentheses (thanks cmc)
2008-11-04 20:50:40 +0100 pl r263336 : #i95388# do not confuse imageable area and margin
2008-11-03 18:39:25 +0100 pl r263304 : CWS-TOOLING: rebase CWS vcl96 to trunk@263288 (milestone: DEV300:m35)
2008-11-03 16:18:48 +0100 pl r263290 : #i92701# truncation warning only on paste
2008-11-03 15:53:42 +0100 pl r263289 : #i95296# use gtk plugin in more cases
2008-10-31 11:15:34 +0100 pl r262858 : #i94258# fix some PDF/A compatibility issues (thanks beppec56)
2008-10-30 14:24:24 +0100 pl r262825 : #i62033# do not read imcomplete resources (again)
2008-10-29 17:21:29 +0100 pl r262821 : #i95536# do not use deprecated gtk_draw_expander function
2008-10-21 18:00:29 +0200 pl r262574 : #i95220# use large icons for nicer display on KDE as well as Gnome taskbar
2008-10-17 16:01:43 +0200 pl r262290 : #i92822# build warning free on MacOSX 10.5

Comments (0)

Files changed (46)

default_images/vcl/source/src/msgbox_hc.png

Added
New image

dtrans/source/X11/X11_selection.cxx

 #endif
 	::std::hash_map< Atom, Selection* >::iterator it =
 		  m_aSelections.find( rNotify.selection );
-	if( ( rNotify.requestor == m_aWindow || rNotify.requestor == m_aCurrentDropWindow )		&&
-		it != m_aSelections.end()			&&
-		( it->second->m_eState == Selection::WaitingForResponse ) ||
-        ( it->second->m_eState == Selection::WaitingForData ) )
+    if (
+        (rNotify.requestor == m_aWindow || rNotify.requestor == m_aCurrentDropWindow) &&
+        it != m_aSelections.end() &&
+        (
+         (it->second->m_eState == Selection::WaitingForResponse) ||
+         (it->second->m_eState == Selection::WaitingForData)
+        )
+       )
 	{
         bHandled = true;
         if( it->second->m_aRequestedType == m_nMULTIPLEAtom )

dtrans/source/aqua/aqua_clipboard.cxx

 
 
 void SAL_CALL AquaClipboard::setContents(const Reference<XTransferable>& xTransferable, 
-										 const Reference<XClipboardOwner>& xClipboardOwner) 
-  throw( RuntimeException )
+    const Reference<XClipboardOwner>& xClipboardOwner) 
+        throw( RuntimeException )
 {
-  ClearableMutexGuard aGuard(m_aMutex);
-
-  Reference<XClipboardOwner> oldOwner(mXClipboardOwner);
-  mXClipboardOwner = xClipboardOwner;
-
-  Reference<XTransferable> oldContent(mXClipboardContent);
-  mXClipboardContent = xTransferable;
-
-  NSArray* types = mpDataFlavorMapper->flavorSequenceToTypesArray(mXClipboardContent->getTransferDataFlavors());
-  mPasteboardChangeCount = [mPasteboard declareTypes: types owner: mEventListener];
-
-  // if we are already the owner of the clipboard
-  // then fire lost ownership event
-  if (oldOwner.is())
+    ClearableMutexGuard aGuard(m_aMutex);
+    
+    Reference<XClipboardOwner> oldOwner(mXClipboardOwner);
+    mXClipboardOwner = xClipboardOwner;
+    
+    Reference<XTransferable> oldContent(mXClipboardContent);
+    mXClipboardContent = xTransferable;
+    
+    NSArray* types = mXClipboardContent.is() ?
+        mpDataFlavorMapper->flavorSequenceToTypesArray(mXClipboardContent->getTransferDataFlavors()) :
+        [NSArray array];
+    mPasteboardChangeCount = [mPasteboard declareTypes: types owner: mEventListener];
+    
+    // if we are already the owner of the clipboard
+    // then fire lost ownership event
+    if (oldOwner.is())
 	{
-	  fireLostClipboardOwnershipEvent(oldOwner, oldContent);
+        fireLostClipboardOwnershipEvent(oldOwner, oldContent);
 	}
-
-  fireClipboardChangedEvent();
+    
+    fireClipboardChangedEvent();
 }
 
 

svtools/inc/svtools/textview.hxx

 	String				GetSelected( LineEnd aSeparator );
 	void				DeleteSelected();
 
+	void				InsertNewText( const rtl::OUString& rNew, BOOL bSelect = FALSE );
+    // deprecated: use InsertNewText instead
 	void				InsertText( const String& rNew, BOOL bSelect = FALSE );
 
 	BOOL				KeyInput( const KeyEvent& rKeyEvent );

svtools/source/edit/textview.cxx

                     uno::Any aData = xDataObj->getTransferData( aFlavor );
                     ::rtl::OUString aText;
                     aData >>= aText;
-                    
-                    bool bWasTruncated = ImplTruncateNewText( aText );
-
-                    String aStr( aText );
-                    aStr.ConvertLineEnd( LINEEND_LF );
-
-                    InsertText( aText, FALSE );
+                    bool bWasTruncated = false;
+                    if( mpImpl->mpTextEngine->GetMaxTextLen() != 0 )
+                        bWasTruncated = ImplTruncateNewText( aText );
+                    InsertNewText( aText, FALSE );
                     mpImpl->mpTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
                     
                     if( bWasTruncated )
 
 void TextView::InsertText( const XubString& rStr, BOOL bSelect )
 {
+    InsertNewText( rStr, bSelect );
+}
+
+void TextView::InsertNewText( const rtl::OUString& rStr, BOOL bSelect )
+{
+//	HideSelection();
+    mpImpl->mpTextEngine->UndoActionStart( TEXTUNDO_INSERT );
+
+    /* #i87633#
+    break inserted text into chunks that fit into the underlying String
+    based API (which has a maximum length of 65534 elements
+    
+    note: this will of course still cause problems for lines longer than those
+    65534 elements, but those cases will hopefully be few.
+    In the long run someone should switch the TextEngine to OUString instead of String
+    */
+    sal_Int32 nLen = rStr.getLength();
+    sal_Int32 nPos = 0;
+    while( nLen )
+    {
+        sal_Int32 nChunkLen = nLen > 65534 ? 65534 : nLen;
+        String aChunk( rStr.copy( nPos, nChunkLen ) );
+        
+        TextSelection aNewSel( mpImpl->maSelection );
+    
+        TextPaM aPaM = mpImpl->mpTextEngine->ImpInsertText( mpImpl->maSelection, aChunk );
+    
+        if ( bSelect )
+        {
+            aNewSel.Justify();
+            aNewSel.GetEnd() = aPaM;
+        }
+        else
+        {
+            aNewSel = aPaM;
+        }
+        
+        ImpSetSelection( aNewSel );
+        nLen -= nChunkLen;
+        nPos += nChunkLen;
+    }
+    mpImpl->mpTextEngine->UndoActionEnd( TEXTUNDO_INSERT );
+
+    mpImpl->mpTextEngine->FormatAndUpdate( this );
+}
+
+/*
+void TextView::InsertText( const XubString& rStr, BOOL bSelect )
+{
 //	HideSelection();
 
     TextSelection aNewSel( mpImpl->maSelection );
 
     mpImpl->mpTextEngine->FormatAndUpdate( this );
 }
+*/
 
 // OLD
 TextPaM TextView::CursorLeft( const TextPaM& rPaM, BOOL bWordMode )
     }
     
     ULONG nMaxLen = mpImpl->mpTextEngine->GetMaxTextLen();
-    if( nMaxLen == 0 )   // 0 means unlimited
-        nMaxLen = 65534; // limit to string api
-    ULONG nCurLen = mpImpl->mpTextEngine->GetTextLen();
-
-    sal_uInt32 nNewLen = rNewText.getLength();
-    if ( nCurLen + nNewLen > nMaxLen )
+    // 0 means unlimited, there is just the String API limit handled above
+    if( nMaxLen != 0 )
     {
-        // see how much text will be replaced
-        ULONG nSelLen = mpImpl->mpTextEngine->GetTextLen( mpImpl->maSelection );
-        if ( nCurLen + nNewLen - nSelLen > nMaxLen )
+        ULONG nCurLen = mpImpl->mpTextEngine->GetTextLen();
+    
+        sal_uInt32 nNewLen = rNewText.getLength();
+        if ( nCurLen + nNewLen > nMaxLen )
         {
-            sal_uInt32 nTruncatedLen = static_cast<sal_uInt32>(nMaxLen - (nCurLen - nSelLen));
-            rNewText = rNewText.copy( 0, nTruncatedLen );
-            bTruncated = true;
+            // see how much text will be replaced
+            ULONG nSelLen = mpImpl->mpTextEngine->GetTextLen( mpImpl->maSelection );
+            if ( nCurLen + nNewLen - nSelLen > nMaxLen )
+            {
+                sal_uInt32 nTruncatedLen = static_cast<sal_uInt32>(nMaxLen - (nCurLen - nSelLen));
+                rNewText = rNewText.copy( 0, nTruncatedLen );
+                bTruncated = true;
+            }
         }
-	}
+    }
 	return bTruncated;
 }
 

sysui/desktop/menus/calc.desktop

 Type=Application
 Categories=Office;X-Red-Hat-Base;X-SuSE-Core-Office;X-MandrivaLinux-Office-Spreadsheets;
 Exec=openoffice -calc %U
-MimeType=application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.spreadsheet-template;application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/vnd.stardivision.calc;application/vnd.stardivision.chart;application/msexcel;application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.ms-excel.sheet.macroenabled.12;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.template.macroenabled.12;application/vnd.ms-excel.sheet.binary.macroenabled.12;
+MimeType=application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.spreadsheet-template;application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/vnd.stardivision.calc;application/vnd.stardivision.chart;application/msexcel;application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.ms-excel.sheet.macroenabled.12;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.template.macroenabled.12;application/vnd.ms-excel.sheet.binary.macroenabled.12;text/csv;
 Name=%PRODUCTNAME Calc
 GenericName=Spreadsheet
 Comment=Perform calculation, analyze information and manage lists in spreadsheets by using Calc.

vcl/aqua/inc/salgdi.h

 	CGLayerRef								mxLayer;	// Quartz graphics layer
 	CGContextRef		                    mrContext;	// Quartz drawing context
 	class XorEmulation*						mpXorEmulation;
+    int                                     mnXorMode; // 0: off 1: on 2: invert only
 	int										mnWidth;
 	int										mnHeight;
 	int										mnBitmapDepth;	// zero unless bitmap
     // filled accordingly
     virtual void          	SetFillColor( SalColor nSalColor );
     // enable/disable XOR drawing
-    virtual void			SetXORMode( BOOL bSet );
+    virtual void			SetXORMode( bool bSet, bool bInvertOnly );
     // set line color for raster operations
     virtual void			SetROPLineColor( SalROPColor nROPColor );
     // set fill color for raster operations

vcl/aqua/source/gdi/salbmp.cxx

 		}
 	}
 	
-	if( mnBytesPerRow )
-		maUserBuffer.reset( new sal_uInt8[mnBytesPerRow * mnHeight] );
+    try
+    {
+        if( mnBytesPerRow )
+            maUserBuffer.reset( new sal_uInt8[mnBytesPerRow * mnHeight] );
+    }
+    catch( const std::bad_alloc& )
+    {
+        DBG_ERROR( "vcl::AquaSalBitmap::AllocateUserData: bad alloc" );
+        maUserBuffer.reset( NULL );
+        mnBytesPerRow = 0;
+    }
 	
 	return maUserBuffer.get() != 0;
 }

vcl/aqua/source/gdi/salgdi.cxx

     , mxLayer( NULL )
     , mrContext( NULL )
     , mpXorEmulation( NULL )
+    , mnXorMode( 0 )
     , mnWidth( 0 )
     , mnHeight( 0 )
     , mnBitmapDepth( 0 )
 
 // -----------------------------------------------------------------------
 
-void AquaSalGraphics::SetXORMode( BOOL bSet )
+void AquaSalGraphics::SetXORMode( bool bSet, bool bInvertOnly )
 {
 	// return early if XOR mode remains unchanged
     if( mbPrinter )
     	return;
+    
+    if( ! bSet && mnXorMode == 2 )
+    {
+        CGContextSetBlendMode( mrContext, kCGBlendModeNormal );
+        mnXorMode = 0;
+        return;
+    }
+    else if( bSet && bInvertOnly && mnXorMode == 0)
+    {
+        CGContextSetBlendMode( mrContext, kCGBlendModeDifference );
+        mnXorMode = 2;
+        return;
+    }
+
 	if( (mpXorEmulation == NULL) && !bSet )
 		return;
 	if( (mpXorEmulation != NULL) && (bSet == mpXorEmulation->IsEnabled()) )
 	{
 		mpXorEmulation->Enable();
 		mrContext = mpXorEmulation->GetMaskContext();
+        mnXorMode = 1;
 	}
 	else
 	{
 		mpXorEmulation->UpdateTarget();
 		mpXorEmulation->Disable();
 		mrContext = mpXorEmulation->GetTargetContext();
+        mnXorMode = 0;
 	}
 }
 

vcl/aqua/source/gdi/salgdiutils.cxx

 	CGContextSetFillColor( mrContext, maFillColor.AsArray() );
 	CGContextSetStrokeColor( mrContext, maLineColor.AsArray() );
     CGContextSetShouldAntialias( mrContext, false );
+    if( mnXorMode == 2 )
+        CGContextSetBlendMode( mrContext, kCGBlendModeDifference );
 }
 
 // ----------------------------------------------------------------------

vcl/aqua/source/gdi/salprn.cxx

 #include "com/sun/star/container/XNameAccess.hpp"
 #include "com/sun/star/beans/PropertyValue.hpp"
 
+#include <algorithm>
+
 using namespace rtl;
 using namespace vcl;
 using namespace com::sun::star::uno;
             long nDPIX = 720, nDPIY = 720;
             NSSize aPaperSize = [mpPrintInfo paperSize];
             
+            NSRect aImageRect = [mpPrintInfo imageablePageBounds];
             if( mePageOrientation == ORIENTATION_PORTRAIT )
             {
                 double dX = 0, dY = aPaperSize.height;
-                dX += [mpPrintInfo leftMargin];
-                dY -= [mpPrintInfo topMargin];
+                dX += aImageRect.origin.x;
+                dY -= aPaperSize.height - aImageRect.size.height - aImageRect.origin.y;
                 CGContextTranslateCTM( i_rContext, dX + mnStartPageOffsetX, dY - mnStartPageOffsetY );
                 CGContextScaleCTM( i_rContext, 0.1, -0.1 );
             }
             {
                 CGContextRotateCTM( i_rContext, M_PI/2 );
                 double dX = aPaperSize.height, dY = -aPaperSize.width;
-                dY += [mpPrintInfo topMargin];
-                dX -= [mpPrintInfo rightMargin];
+                dY += aPaperSize.height - aImageRect.size.height - aImageRect.origin.y;
+                dX -= aImageRect.origin.x;
 
                 CGContextTranslateCTM( i_rContext, dX + mnStartPageOffsetY, dY - mnStartPageOffsetX );
                 CGContextScaleCTM( i_rContext, -0.1, 0.1 );
         NSSize aPaperSize = [mpPrintInfo paperSize];
         o_rPageWidth  = static_cast<long>( double(aPaperSize.width) * fXScaling );
         o_rPageHeight = static_cast<long>( double(aPaperSize.height) * fYScaling );
-        o_rPageOffX   = static_cast<long>( [mpPrintInfo leftMargin] * fXScaling );
-        o_rPageOffY   = static_cast<long>( [mpPrintInfo topMargin] * fYScaling );
-        o_rOutWidth   = static_cast<long>( o_rPageWidth - double([mpPrintInfo leftMargin] + [mpPrintInfo rightMargin]) * fXScaling );
-        o_rOutHeight  = static_cast<long>( o_rPageHeight - double([mpPrintInfo topMargin] + [mpPrintInfo bottomMargin]) * fYScaling );
+
+        NSRect aImageRect = [mpPrintInfo imageablePageBounds];
+        o_rPageOffX   = static_cast<long>( aImageRect.origin.x * fXScaling );
+        o_rPageOffY   = static_cast<long>( (aPaperSize.height - aImageRect.size.height - aImageRect.origin.y) * fYScaling );
+        o_rOutWidth   = static_cast<long>( aImageRect.size.width * fXScaling );
+        o_rOutHeight  = static_cast<long>( aImageRect.size.height * fYScaling );
+        
+        if( mePageOrientation == ORIENTATION_LANDSCAPE )
+        {
+            std::swap( o_rOutWidth, o_rOutHeight );
+            std::swap( o_rPageWidth, o_rPageHeight );
+            std::swap( o_rPageOffX, o_rPageOffY );
+        }
     }
 }
 

vcl/aqua/source/window/salframeview.mm

     return 0;
 }
 
+#ifdef MAC_OS_X_VERSION_10_5
+/* build target 10.5 or greater */
+- (NSInteger)conversationIdentifier
+#else
+/* build target 10.4 */ 
 - (long)conversationIdentifier
+#endif
 {
     return (long)self;
 }

vcl/aqua/source/window/salmenu.cxx

     // adjust frame rect when necessary
     USHORT nArrangeIndex;
     Point position = pWin->ImplCalcPos( pWin, rRect, nFlags, nArrangeIndex );
-    if( position.nB < rRect.nTop ) {
+    if( position.Y() < rRect.nTop ) {
         displayPopupFrame.origin.y += ( lineHeight*drawnItems );
     }
-    if( position.nA < rRect.nLeft ) {
+    if( position.X() < rRect.nLeft ) {
         displayPopupFrame.origin.x -= popupFrame.size.width;
     }
 

vcl/inc/vcl/edit.hxx

 
 	DECL_DLLPRIVATE_LINK(      ImplUpdateDataHdl, Timer* );
 
-    SAL_DLLPRIVATE void        ImplTruncateToMaxLen( rtl::OUString&, sal_uInt32 nSelectionLen ) const;
+    SAL_DLLPRIVATE bool        ImplTruncateToMaxLen( rtl::OUString&, sal_uInt32 nSelectionLen ) const;
 	SAL_DLLPRIVATE void        ImplInitEditData();
 	SAL_DLLPRIVATE void        ImplModified();
 	SAL_DLLPRIVATE XubString   ImplGetText() const;

vcl/inc/vcl/msgbox.hxx

 						InfoBox( Window* pParent, const ResId & rResId );
 
 	static Image		GetStandardImage();
+	static Image		GetStandardImageHC();
 };
 
 // --------------
     void                SetDefaultCheckBoxText();
 
 	static Image		GetStandardImage();
+	static Image		GetStandardImageHC();
 };
 
 // ------------
 						ErrorBox( Window* pParent, const ResId& rResId );
 
 	static Image		GetStandardImage();
+	static Image		GetStandardImageHC();
 };
 
 // ------------
     void                SetDefaultCheckBoxText();
 
 	static Image		GetStandardImage();
+	static Image		GetStandardImageHC();
 };
 
 #endif	// _SV_MSGBOX_HXX

vcl/inc/vcl/salgdi.hxx

     // filled accordingly
     virtual void          	SetFillColor( SalColor nSalColor ) = 0;
     // enable/disable XOR drawing
-    virtual void			SetXORMode( BOOL bSet ) = 0;
+    virtual void			SetXORMode( bool bSet, bool bInvertOnly ) = 0;
     // set line color for raster operations
     virtual void			SetROPLineColor( SalROPColor nROPColor ) = 0;
     // set fill color for raster operations
 	BOOL					mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev, bool bBack = false ) const;
     void                    mirror( Rectangle& rRect, const OutputDevice*, bool bBack = false ) const;
     void                    mirror( Region& rRgn, const OutputDevice *pOutDev, bool bBack = false ) const;
-    void                    mirror(ControlType,const ImplControlValue&,const OutputDevice*,bool bBack = false) const;
+    void                    mirror( ControlType,const ImplControlValue&,const OutputDevice*,bool bBack = false) const;
+	basegfx::B2DPoint       mirror( const basegfx::B2DPoint& i_rPoint, const OutputDevice *pOutDev, bool bBack = false ) const;
+	basegfx::B2DPolygon     mirror( const basegfx::B2DPolygon& i_rPoly, const OutputDevice *pOutDev, bool bBack = false ) const;
+	basegfx::B2DPolyPolygon mirror( const basegfx::B2DPolyPolygon& i_rPoly, const OutputDevice *pOutDev, bool bBack = false ) const;
 
     // non virtual methods; these do eventual coordinate mirroring and
     // then delegate to protected virtual methods

vcl/inc/vcl/svdata.hxx

     Window*                 mpExtTextInputWin;  // Window, which is in ExtTextInput
     Window*                 mpTrackWin;         // window, that is in tracking mode
     AutoTimer*              mpTrackTimer;       // tracking timer
-    ImageList*              mpMsgBoxImgList;    // ImageList for MessageBoxen
+    ImageList*              mpMsgBoxImgList;    // ImageList for MessageBox
+    ImageList*              mpMsgBoxHCImgList;  // ImageList for MessageBox (high contrast mode)
     Window*                 mpAutoScrollWin;    // window, that is in AutoScrollMode mode
     USHORT                  mnTrackFlags;       // tracking flags
     USHORT                  mnAutoScrollFlags;  // auto scroll flags

vcl/inc/vcl/svids.hrc

 #define SV_RESID_BITMAP_RADIO				1010
 
 #define SV_RESID_BITMAP_MSGBOX				1020
+#define SV_RESID_BITMAP_MSGBOX_HC           1021
 
 #define SV_RESID_BITMAP_PIN 				1030
 

vcl/os2/inc/salgdi.h

 	BOOL					mbVirDev;			// is VirDev
 	BOOL					mbWindow;			// is Window
 	BOOL					mbScreen;			// is Screen compatible
-	BOOL					mbXORMode;			// _every_ output with RasterOp XOR
+	bool					mbXORMode;			// _every_ output with RasterOp XOR
 	ULONG					mhFonts[ MAX_FALLBACK ];        // Font + Fallbacks
 	ImplOs2FontData*			mpOs2FontData[ MAX_FALLBACK ];  // pointer to the most recent font face
 	ImplOs2FontEntry*			mpOs2FontEntry[ MAX_FALLBACK ]; // pointer to the most recent font instance
     // filled accordingly
     virtual void          	SetFillColor( SalColor nSalColor );
     // enable/disable XOR drawing
-    virtual void			SetXORMode( BOOL bSet );
+    virtual void			SetXORMode( bool bSet, bool );
     // set line color for raster operations
     virtual void			SetROPLineColor( SalROPColor nROPColor );
     // set fill color for raster operations

vcl/os2/source/gdi/salgdi.cxx

 
 // -----------------------------------------------------------------------
 
-void Os2SalGraphics::SetXORMode( BOOL bSet )
+void Os2SalGraphics::SetXORMode( bool bSet, bool )
 {
 	mbXORMode = bSet;
 	LONG nMixMode = bSet ? FM_XOR : FM_OVERPAINT;

vcl/source/app/svmain.cxx

         delete pSVData->maWinData.mpMsgBoxImgList;
         pSVData->maWinData.mpMsgBoxImgList = NULL;
     }
+    if ( pSVData->maWinData.mpMsgBoxHCImgList )
+    {
+        delete pSVData->maWinData.mpMsgBoxHCImgList;
+        pSVData->maWinData.mpMsgBoxHCImgList = NULL;
+    }
     if ( pSVData->maCtrlData.mpCheckImgList )
     {
         delete pSVData->maCtrlData.mpCheckImgList;

vcl/source/control/edit.cxx

 
 // -----------------------------------------------------------------------
 
-void Edit::ImplTruncateToMaxLen( rtl::OUString& rStr, sal_uInt32 nSelectionLen ) const
+bool Edit::ImplTruncateToMaxLen( rtl::OUString& rStr, sal_uInt32 nSelectionLen ) const
 {
+    bool bWasTruncated = false;
     const sal_uInt32 nMaxLen = mnMaxTextLen < 65534 ? mnMaxTextLen : 65534;
     sal_uInt32 nLenAfter = static_cast<sal_uInt32>(maText.Len()) + rStr.getLength() - nSelectionLen;
     if ( nLenAfter > nMaxLen )
 	{
         sal_uInt32 nErasePos = nMaxLen - static_cast<sal_uInt32>(maText.Len()) + nSelectionLen;
         rStr = rStr.copy( 0, nErasePos );
-        ShowTruncationWarning( const_cast<Edit*>(this) );
+        bWasTruncated = true;
     }
+    return bWasTruncated;
 }
 
 // -----------------------------------------------------------------------
 				uno::Any aData = xDataObj->getTransferData( aFlavor );
 				::rtl::OUString aText;
 				aData >>= aText;
-                ImplTruncateToMaxLen( aText, maSelection.Len() );
+                if( ImplTruncateToMaxLen( aText, maSelection.Len() ) )
+                    ShowTruncationWarning( const_cast<Edit*>(this) );
 				ReplaceSelected( aText );
 			}
             catch( const ::com::sun::star::uno::Exception& )

vcl/source/gdi/image.cxx

 			pResMgr->Increment( pResMgr->GetObjSize( (RSHEADER_TYPE*)pResMgr->GetClass() ) );
 		}
 
-		if( !aBmpEx.IsEmpty() )
-		{
-			if( nObjMask & RSC_IMAGE_MASKBITMAP )
-			{
-				if( aBmpEx.GetTransparentType() == TRANSPARENT_NONE )
-                {
-                	const Bitmap aMaskBitmap( ResId( (RSHEADER_TYPE*)pResMgr->GetClass(), *pResMgr ) );
-					aBmpEx = BitmapEx( aBmpEx.GetBitmap(), aMaskBitmap );
-                }
+        if( nObjMask & RSC_IMAGE_MASKBITMAP )
+        {
+            if( !aBmpEx.IsEmpty() && aBmpEx.GetTransparentType() == TRANSPARENT_NONE )
+            {
+                const Bitmap aMaskBitmap( ResId( (RSHEADER_TYPE*)pResMgr->GetClass(), *pResMgr ) );
+                aBmpEx = BitmapEx( aBmpEx.GetBitmap(), aMaskBitmap );
+            }
 
-				pResMgr->Increment( pResMgr->GetObjSize( (RSHEADER_TYPE*)pResMgr->GetClass() ) );
-			}
+            pResMgr->Increment( pResMgr->GetObjSize( (RSHEADER_TYPE*)pResMgr->GetClass() ) );
+        }
 
-			if( nObjMask & RSC_IMAGE_MASKCOLOR )
-			{
-				if( aBmpEx.GetTransparentType() == TRANSPARENT_NONE )
-                {
-                    const Color aMaskColor( ResId( (RSHEADER_TYPE*)pResMgr->GetClass(), *pResMgr ) );
-				    aBmpEx = BitmapEx( aBmpEx.GetBitmap(), aMaskColor );
-                }
+        if( nObjMask & RSC_IMAGE_MASKCOLOR )
+        {
+            if( !aBmpEx.IsEmpty() && aBmpEx.GetTransparentType() == TRANSPARENT_NONE )
+            {
+                const Color aMaskColor( ResId( (RSHEADER_TYPE*)pResMgr->GetClass(), *pResMgr ) );
+                aBmpEx = BitmapEx( aBmpEx.GetBitmap(), aMaskColor );
+            }
 
-				pResMgr->Increment( pResMgr->GetObjSize( (RSHEADER_TYPE*)pResMgr->GetClass() ) );
-			}
-
+            pResMgr->Increment( pResMgr->GetObjSize( (RSHEADER_TYPE*)pResMgr->GetClass() ) );
+        }
+        if( ! aBmpEx.IsEmpty() )
 			ImplInit( aBmpEx );
-		}
 	}
 }
 

vcl/source/gdi/outdev.cxx

 
 	if ( mpGraphics )
 	{
-		mpGraphics->SetXORMode( (ROP_INVERT == meRasterOp) || (ROP_XOR == meRasterOp) );
+		mpGraphics->SetXORMode( (ROP_INVERT == meRasterOp) || (ROP_XOR == meRasterOp), ROP_INVERT == meRasterOp );
 		return TRUE;
 	}
 
 		mbInitLineColor = mbInitFillColor = TRUE;
 
 		if( mpGraphics || ImplGetGraphics() )
-			mpGraphics->SetXORMode( (ROP_INVERT == meRasterOp) || (ROP_XOR == meRasterOp) );
+			mpGraphics->SetXORMode( (ROP_INVERT == meRasterOp) || (ROP_XOR == meRasterOp), ROP_INVERT == meRasterOp );
 	}
 
     if( mpAlphaVDev )

vcl/source/gdi/pdfwriter_impl.cxx

             sal_Int32   nSetGoToRMode = 0;
             sal_Bool    bTargetHasPDFExtension = sal_False;
             INetProtocol eTargetProtocol = aTargetURL.GetProtocol();
+			sal_Bool    bIsUNCPath = sal_False;
 // check if the protocol is a known one, or if there is no protocol at all (on target only)
 // if there is no protocol, make the target relative to the current document directory
 // getting the needed URL information from the current document path
             if( eTargetProtocol == INET_PROT_NOT_VALID )
             {
-                INetURLObject aNewBase( aDocumentURL );//duplicate document URL
-                aNewBase.removeSegment(); //remove last segment from it, obtaining the base URL of the
-                                          //target document
-                aNewBase.insertName( rLink.m_aURL );
-                aTargetURL = aNewBase;//reassign the new target URL
+				if( rLink.m_aURL.getLength() > 4 && rLink.m_aURL.compareToAscii( "\\\\\\\\", 4 ) == 0)
+				{
+					bIsUNCPath = sal_True;
+				}
+				else
+				{
+					INetURLObject aNewBase( aDocumentURL );//duplicate document URL
+					aNewBase.removeSegment(); //remove last segment from it, obtaining the base URL of the
+											  //target document
+					aNewBase.insertName( rLink.m_aURL );
+					aTargetURL = aNewBase;//reassign the new target URL
 //recompute the target protocol, with the new URL
 //normal URL processing resumes
-                eTargetProtocol = aTargetURL.GetProtocol();
+					eTargetProtocol = aTargetURL.GetProtocol();
+				}
             }
 
             rtl::OUString aFileExtension = aTargetURL.GetFileExtension();
             INetProtocol eBaseProtocol = aDocumentURL.GetProtocol();
 //queue the string common to all types of actions
             aLine.append( "/A<</Type/Action/S");
-            sal_Int32 nSetRelative = 0;
+			if( bIsUNCPath ) // handle Win UNC paths
+			{
+				aLine.append( "/Launch/Win<</F" );
+				// INetURLObject is not good with UNC paths, use original path
+				appendLiteralStringEncrypt(  rLink.m_aURL, rLink.m_nObject, aLine );
+				aLine.append( ">>" );
+			}
+			else
+			{
+				sal_Int32 nSetRelative = 0;
 //check if relative file link is requested and if the protocol is 'file://'
-            if( m_aContext.RelFsys && eBaseProtocol == eTargetProtocol && eTargetProtocol == INET_PROT_FILE )
-                nSetRelative++;
-
-            rtl::OUString aFragment = aTargetURL.GetMark( INetURLObject::NO_DECODE /*DECODE_WITH_CHARSET*/ ); //fragment as is,
-            if( nSetGoToRMode == 0 )
-                switch( m_aContext.DefaultLinkAction )
-                {
-                default:
-                case PDFWriter::URIAction :
-                case PDFWriter::URIActionDestination :
-					aLine.append( "/URI/URI" );
-                    break;
-                case PDFWriter::LaunchAction:
+				if( m_aContext.RelFsys && eBaseProtocol == eTargetProtocol && eTargetProtocol == INET_PROT_FILE )
+					nSetRelative++;
+
+				rtl::OUString aFragment = aTargetURL.GetMark( INetURLObject::NO_DECODE /*DECODE_WITH_CHARSET*/ ); //fragment as is,
+				if( nSetGoToRMode == 0 )
+					switch( m_aContext.DefaultLinkAction )
+					{
+					default:
+					case PDFWriter::URIAction :
+					case PDFWriter::URIActionDestination :
+						aLine.append( "/URI/URI" );
+						break;
+					case PDFWriter::LaunchAction:
 // now:
 // if a launch action is requested and the hyperlink target has a fragment
 // and the target file does not have a pdf extension, or it's not a 'file:://' protocol
 // This code will permit the correct opening of application on web pages, the one that
 // normally have fragments (but I may be wrong...)
 // and will force the use of URI when the protocol is not file://
-                    if( (aFragment.getLength() > 0 && !bTargetHasPDFExtension) ||
-                                    eTargetProtocol != INET_PROT_FILE )
-                        aLine.append( "/URI/URI" );
-                    else
-                        aLine.append( "/Launch/F" );
-                    break;
-                }
+						if( (aFragment.getLength() > 0 && !bTargetHasPDFExtension) ||
+										eTargetProtocol != INET_PROT_FILE )
+							aLine.append( "/URI/URI" );
+						else
+							aLine.append( "/Launch/F" );
+						break;
+					}
 //fragment are encoded in the same way as in the named destination processing
-            rtl::OUString aURLNoMark = aTargetURL.GetURLNoMark( INetURLObject::DECODE_WITH_CHARSET );
-            if( nSetGoToRMode )
-            {//add the fragment
-                aLine.append("/GoToR");
-                aLine.append("/F");
-                appendLiteralStringEncrypt( nSetRelative ? INetURLObject::GetRelURL( m_aContext.BaseURL, aURLNoMark,
-                                                                                     INetURLObject::WAS_ENCODED,
-                                                                                     INetURLObject::DECODE_WITH_CHARSET ) :
-                                                               aURLNoMark, rLink.m_nObject, aLine );
-                if( aFragment.getLength() > 0 )
-                {
-                    aLine.append("/D/");
-                    appendDestinationName( aFragment , aLine );
-                }
-            }
-            else
-            {
+				rtl::OUString aURLNoMark = aTargetURL.GetURLNoMark( INetURLObject::DECODE_WITH_CHARSET );
+				if( nSetGoToRMode )
+				{//add the fragment
+					aLine.append("/GoToR");
+					aLine.append("/F");
+					appendLiteralStringEncrypt( nSetRelative ? INetURLObject::GetRelURL( m_aContext.BaseURL, aURLNoMark,
+																						 INetURLObject::WAS_ENCODED,
+																						 INetURLObject::DECODE_WITH_CHARSET ) :
+																   aURLNoMark, rLink.m_nObject, aLine );
+					if( aFragment.getLength() > 0 )
+					{
+						aLine.append("/D/");
+						appendDestinationName( aFragment , aLine );
+					}
+				}
+				else
+				{
 // change the fragment to accomodate the bookmark (only if the file extension is PDF and
 // the requested action is of the correct type)
-                if(m_aContext.DefaultLinkAction == PDFWriter::URIActionDestination &&
-                           bTargetHasPDFExtension && aFragment.getLength() > 0 )
-                {
-                    OStringBuffer aLineLoc( 1024 );
-                    appendDestinationName( aFragment , aLineLoc );
+					if(m_aContext.DefaultLinkAction == PDFWriter::URIActionDestination &&
+							   bTargetHasPDFExtension && aFragment.getLength() > 0 )
+					{
+						OStringBuffer aLineLoc( 1024 );
+						appendDestinationName( aFragment , aLineLoc );
 //substitute the fragment
-                    aTargetURL.SetMark( aLineLoc.getStr() );
-                }
-                rtl::OUString aURL = aTargetURL.GetMainURL( (nSetRelative || eTargetProtocol == INET_PROT_FILE) ? INetURLObject::DECODE_WITH_CHARSET : INetURLObject::NO_DECODE );
+						aTargetURL.SetMark( aLineLoc.getStr() );
+					}
+					rtl::OUString aURL = aTargetURL.GetMainURL( (nSetRelative || eTargetProtocol == INET_PROT_FILE) ? INetURLObject::DECODE_WITH_CHARSET : INetURLObject::NO_DECODE );
 // check if we have a URL available, if the string is empty, set it as the original one
 //                 if( aURL.getLength() == 0 )
 //                     appendLiteralStringEncrypt( rLink.m_aURL , rLink.m_nObject, aLine );
 //                 else
-                    appendLiteralStringEncrypt( nSetRelative ? INetURLObject::GetRelURL( m_aContext.BaseURL, aURL ) :
-                                                               aURL , rLink.m_nObject, aLine );
-            }
+						appendLiteralStringEncrypt( nSetRelative ? INetURLObject::GetRelURL( m_aContext.BaseURL, aURL ) :
+																   aURL , rLink.m_nObject, aLine );
+				}
 //<--- i56629
+			}
             aLine.append( ">>\n" );
         }
         if( rLink.m_nStructParent > 0 )
     sal_Int32 nStructureDict = 0;
     if(m_aStructure.size() > 1)
     {
+///check if dummy structure containers are needed
+        addInternalStructureContainer(m_aStructure[0]);
         nStructureDict = m_aStructure[0].m_nObject = createObject();
         emitStructure( m_aStructure[ 0 ] );
     }
         {
             aLine.append( "[ /Indexed/DeviceRGB " );
             aLine.append( (sal_Int32)(pAccess->GetPaletteEntryCount()-1) );
-            aLine.append( " <\n" );
+            aLine.append( "\n<" );
 			if( m_aContext.Encrypt )
 			{
 				enableStringEncryption( rObject.m_nObject );
 						appendHex(m_pEncryptionBuffer[nChar++], aLine );
 						appendHex(m_pEncryptionBuffer[nChar++], aLine );
 						appendHex(m_pEncryptionBuffer[nChar++], aLine );
-						if( (i+1) & 15 )
-							aLine.append( ' ' );
-						else
-							aLine.append( "\n" );
 					}
 				}
 			}
-			else //no encryption requested
+			else //no encryption requested (PDF/A-1a program flow drops here)
 			{
 				for( USHORT i = 0; i < pAccess->GetPaletteEntryCount(); i++ )
 				{
 					appendHex( rColor.GetRed(), aLine );
 					appendHex( rColor.GetGreen(), aLine );
 					appendHex( rColor.GetBlue(), aLine );
-					if( (i+1) & 15 )
-						aLine.append( ' ' );
-					else
-						aLine.append( "\n" );
 				}
 			}
-            aLine.append( "> ]\n" );
+            aLine.append( ">\n]\n" );
         }
     }
     else
 #endif
 }
 
+//---> i94258
+/*
+ * This function adds an internal structure list container to overcome the 8191 elements array limitation
+ * in kids element emission.
+ * Recursive function
+ * 
+ */
+void PDFWriterImpl::addInternalStructureContainer( PDFStructureElement& rEle )
+{
+    if( rEle.m_eType == PDFWriter::NonStructElement &&
+        rEle.m_nOwnElement != rEle.m_nParentElement )
+        return;
+
+    for( std::list< sal_Int32 >::const_iterator it = rEle.m_aChildren.begin(); it != rEle.m_aChildren.end(); ++it )
+    {
+        if( *it > 0 && *it < sal_Int32(m_aStructure.size()) )
+        {
+            PDFStructureElement& rChild = m_aStructure[ *it ];
+            if( rChild.m_eType != PDFWriter::NonStructElement )
+            {
+                //triggered when a child of the rEle element is found
+                if( rChild.m_nParentElement == rEle.m_nOwnElement )
+                    addInternalStructureContainer( rChild );//examine the child
+                else
+                {
+                    DBG_ERROR( "PDFWriterImpl::addInternalStructureContainer: invalid child structure element" );
+#if OSL_DEBUG_LEVEL > 1
+                    fprintf( stderr, "PDFWriterImpl::addInternalStructureContainer: invalid child structure elemnt with id %" SAL_PRIdINT32 "\n", *it );
+#endif
+                }
+            }
+        }
+        else
+        {
+            DBG_ERROR( "PDFWriterImpl::emitStructure: invalid child structure id" );
+#if OSL_DEBUG_LEVEL > 1
+            fprintf( stderr, "PDFWriterImpl::addInternalStructureContainer: invalid child structure id %" SAL_PRIdINT32 "\n", *it );
+#endif
+        }
+    }
+
+    if( rEle.m_nOwnElement != rEle.m_nParentElement )
+    {
+        if( !rEle.m_aKids.empty() )
+        {
+            if( rEle.m_aKids.size() > ncMaxPDFArraySize ) {
+                //then we need to add the containers for the kids elements
+                // a list to be used for the new kid element
+                std::list< PDFStructureElementKid > aNewKids;
+                std::list< sal_Int32 > aNewChildren;
+
+                // add Div in RoleMap, in case no one else did (TODO: is it needed? Is it dangerous?)
+                OStringBuffer aNameBuf( "Div" );
+                OString aAliasName( aNameBuf.makeStringAndClear() );
+                m_aRoleMap[ aAliasName ] = getStructureTag( PDFWriter::Division );
+
+                while( rEle.m_aKids.size() > ncMaxPDFArraySize )
+                {
+                    sal_Int32 nCurrentStructElement = rEle.m_nOwnElement;
+                    sal_Int32 nNewId = sal_Int32(m_aStructure.size());
+                    m_aStructure.push_back( PDFStructureElement() );
+                    PDFStructureElement& rEleNew = m_aStructure.back();
+                    rEleNew.m_aAlias            = aAliasName;
+                    rEleNew.m_eType			    = PDFWriter::Division; // a new Div type container
+                    rEleNew.m_nOwnElement		= nNewId;
+                    rEleNew.m_nParentElement	= nCurrentStructElement;
+                    //inherit the same page as the first child to be reparented
+                    rEleNew.m_nFirstPageObject	= m_aStructure[ rEle.m_aChildren.front() ].m_nFirstPageObject;
+                    rEleNew.m_nObject           = createObject();//assign a PDF object number
+                    //add the object to the kid list of the parent
+                    aNewKids.push_back( PDFStructureElementKid( rEleNew.m_nObject ) );
+                    aNewChildren.push_back( nNewId );
+                    
+                    std::list< sal_Int32 >::iterator aChildEndIt( rEle.m_aChildren.begin() );
+                    std::list< PDFStructureElementKid >::iterator aKidEndIt( rEle.m_aKids.begin() );
+                    advance( aChildEndIt, ncMaxPDFArraySize );
+                    advance( aKidEndIt, ncMaxPDFArraySize );
+                    
+                    rEleNew.m_aKids.splice( rEleNew.m_aKids.begin(),
+                                            rEle.m_aKids,
+                                            rEle.m_aKids.begin(),
+                                            aKidEndIt );
+                    rEleNew.m_aChildren.splice( rEleNew.m_aChildren.begin(),
+                                                rEle.m_aChildren,
+                                                rEle.m_aChildren.begin(),
+                                                aChildEndIt );
+                    // set the kid's new parent
+                    for( std::list< sal_Int32 >::const_iterator it = rEleNew.m_aChildren.begin();
+                         it != rEleNew.m_aChildren.end(); ++it )
+                    {
+                        m_aStructure[ *it ].m_nParentElement = nNewId;
+                    }
+                }
+                //finally add the new kids resulting from the container added
+                rEle.m_aKids.insert( rEle.m_aKids.begin(), aNewKids.begin(), aNewKids.end() );
+                rEle.m_aChildren.insert( rEle.m_aChildren.begin(), aNewChildren.begin(), aNewChildren.end() );
+            }        
+        }
+    }
+}
+//<--- i94258
+
 bool PDFWriterImpl::setCurrentStructureElement( sal_Int32 nEle )
 {
     bool bSuccess = false;

vcl/source/gdi/pdfwriter_impl.hxx

         sal_Int32											m_nParentElement; // index into structure vector
         sal_Int32											m_nFirstPageObject;
         bool												m_bOpenMCSeq;
-        std::list< sal_Int32 >								m_aChildren; // indices into strucure vector
+        std::list< sal_Int32 >								m_aChildren; // indexes into structure vector
         std::list< PDFStructureElementKid >                 m_aKids;
         PDFStructAttributes									m_aAttributes;
         Rectangle											m_aBBox;
     // puts the attribute objects of a structure element into the returned string,
     // helper for emitStructure
     rtl::OString emitStructureAttributes( PDFStructureElement& rEle );
+    //--->i94258
+    // the maximum array elements allowed for PDF array object
+    static const sal_uInt32 ncMaxPDFArraySize = 8191;
+    //check if internal dummy container are needed in the structure elements
+    void addInternalStructureContainer( PDFStructureElement& rEle );
+    //<---i94258
     // writes document structure
     sal_Int32 emitStructure( PDFStructureElement& rEle );
     // writes structure parent tree

vcl/source/gdi/salgdilayout.cxx

 #include <vcl/gdimtf.hxx>
 #include <vcl/outdata.hxx>
 #include <vcl/print.hxx>
-#ifndef _VCL_IMPLNCVT_HXX
 #include <implncvt.hxx>
-#endif
 #include <vcl/outdev.h>
 #include <vcl/outdev.hxx>
 #include <vcl/unowrap.hxx>
 #include <vcl/sallayout.hxx>
+#include "basegfx/polygon/b2dpolygon.hxx"
 
 //#define USE_NEW_RTL_IMPLEMENTATION
 
     rRect.Move( x - x_org, 0 );
 }
 
+basegfx::B2DPoint SalGraphics::mirror( const basegfx::B2DPoint& i_rPoint, const OutputDevice *i_pOutDev, bool i_bBack ) const
+{
+	long w;
+    if( i_pOutDev && i_pOutDev->GetOutDevType() == OUTDEV_VIRDEV )
+        w = i_pOutDev->GetOutputWidthPixel();
+    else
+        w = GetGraphicsWidth();
+    
+    DBG_ASSERT( w, "missing graphics width" );
+
+    basegfx::B2DPoint aRet( i_rPoint );
+	if( w )
+    {
+        if( i_pOutDev && !i_pOutDev->IsRTLEnabled() )
+        {
+            OutputDevice *pOutDevRef = (OutputDevice*)i_pOutDev;
+            // mirror this window back
+            double devX = w-pOutDevRef->GetOutputWidthPixel()-pOutDevRef->GetOutOffXPixel();   // re-mirrored mnOutOffX
+            if( i_bBack )
+                aRet.setX( i_rPoint.getX() - devX + pOutDevRef->GetOutOffXPixel() );
+            else
+                aRet.setX( devX + (i_rPoint.getX() - pOutDevRef->GetOutOffXPixel()) );
+        }
+        else
+		    aRet.setX( w-1-i_rPoint.getX() );
+    }
+    return aRet;
+}
+
+basegfx::B2DPolygon SalGraphics::mirror( const basegfx::B2DPolygon& i_rPoly, const OutputDevice *i_pOutDev, bool i_bBack ) const
+{
+	long w;
+    if( i_pOutDev && i_pOutDev->GetOutDevType() == OUTDEV_VIRDEV )
+        w = i_pOutDev->GetOutputWidthPixel();
+    else
+        w = GetGraphicsWidth();
+    
+    DBG_ASSERT( w, "missing graphics width" );
+    
+    basegfx::B2DPolygon aRet;
+	if( w )
+    {
+        sal_Int32 nPoints = i_rPoly.count();
+        for( sal_Int32 i = 0; i < nPoints; i++ )
+        {
+            aRet.append( mirror( i_rPoly.getB2DPoint( i ), i_pOutDev, i_bBack ) );
+            if( i_rPoly.isPrevControlPointUsed( i ) )
+                aRet.setPrevControlPoint( i, mirror( i_rPoly.getPrevControlPoint( i ), i_pOutDev, i_bBack ) ); 
+            if( i_rPoly.isNextControlPointUsed( i ) )
+                aRet.setNextControlPoint( i, mirror( i_rPoly.getNextControlPoint( i ), i_pOutDev, i_bBack ) ); 
+        }
+        aRet.setClosed( i_rPoly.isClosed() );
+        aRet.flip();
+    }
+    else
+        aRet = i_rPoly;
+    return aRet;
+}
+
+basegfx::B2DPolyPolygon SalGraphics::mirror( const basegfx::B2DPolyPolygon& i_rPoly, const OutputDevice *i_pOutDev, bool i_bBack ) const
+{
+	long w;
+    if( i_pOutDev && i_pOutDev->GetOutDevType() == OUTDEV_VIRDEV )
+        w = i_pOutDev->GetOutputWidthPixel();
+    else
+        w = GetGraphicsWidth();
+    
+    DBG_ASSERT( w, "missing graphics width" );
+    
+    basegfx::B2DPolyPolygon aRet;
+	if( w )
+    {
+        sal_Int32 nPoly = i_rPoly.count();
+        for( sal_Int32 i = 0; i < nPoly; i++ )
+            aRet.append( mirror( i_rPoly.getB2DPolygon( i ), i_pOutDev, i_bBack ) );
+        aRet.setClosed( i_rPoly.isClosed() );
+        aRet.flip();
+    }
+    else
+        aRet = i_rPoly;
+    return aRet;
+}
+
 // ----------------------------------------------------------------------------
 
 BOOL	SalGraphics::UnionClipRegion( long nX, long nY, long nWidth, long nHeight, const OutputDevice *pOutDev )
 {
     return false;
 }
+
 void SalGraphics::DrawPolyLine( ULONG nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev )
 {
 	if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) 
 	else
 		drawPolyLine( nPoints, pPtAry );
 }
-void	SalGraphics::DrawPolygon( ULONG nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev )
+
+void SalGraphics::DrawPolygon( ULONG nPoints, const SalPoint* pPtAry, const OutputDevice *pOutDev )
 {
 	if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) 
 	{
 	else
 		drawPolygon( nPoints, pPtAry );
 }
-void	SalGraphics::DrawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, PCONSTSALPOINT* pPtAry, const OutputDevice *pOutDev )
+
+void SalGraphics::DrawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, PCONSTSALPOINT* pPtAry, const OutputDevice *pOutDev )
 {
 	if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) 
 	{
     else
 	    drawPolyPolygon( nPoly, pPoints, pPtAry );
 }
-bool SalGraphics::DrawPolyPolygon( const ::basegfx::B2DPolyPolygon& rPolyPolygon, double fTransparency, const OutputDevice* )
+
+bool SalGraphics::DrawPolyPolygon( const ::basegfx::B2DPolyPolygon& i_rPolyPolygon, double i_fTransparency, const OutputDevice* i_pOutDev )
 {
-    DBG_ASSERT( !(m_nLayout & SAL_LAYOUT_BIDI_RTL), "DrawPolyPolygon - no mirroring implemented"); 
-	return drawPolyPolygon( rPolyPolygon, fTransparency );
+    bool bRet = false;
+	if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) 
+	{
+        basegfx::B2DPolyPolygon aMirror( mirror( i_rPolyPolygon, i_pOutDev ) );
+        bRet = drawPolyPolygon( aMirror, i_fTransparency );
+    }
+    else
+        bRet = drawPolyPolygon( i_rPolyPolygon, i_fTransparency );
+    return bRet;
 }
+
 bool SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double /*fTransparency*/)
 {
 	return false;
 }
-sal_Bool SalGraphics::DrawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry, const OutputDevice* )
+
+sal_Bool SalGraphics::DrawPolyLineBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry, const OutputDevice* pOutDev )
 {
-    DBG_ASSERT( !(m_nLayout & SAL_LAYOUT_BIDI_RTL), "DrawPolyLineBezier - no mirroring implemented"); 
-    return drawPolyLineBezier( nPoints, pPtAry, pFlgAry );
-}
-sal_Bool SalGraphics::DrawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry, const OutputDevice* )
-{
-    DBG_ASSERT( !(m_nLayout & SAL_LAYOUT_BIDI_RTL), "DrawPolygonBezier - no mirroring implemented"); 
-    return drawPolygonBezier( nPoints, pPtAry, pFlgAry );
-}
-sal_Bool SalGraphics::DrawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints,
-                                                   const SalPoint* const* pPtAry, const BYTE* const* pFlgAry, const OutputDevice* )
-{
-    DBG_ASSERT( !(m_nLayout & SAL_LAYOUT_BIDI_RTL), "DrawPolyPolygonBezier - no mirroring implemented");
-    return drawPolyPolygonBezier( nPoly, pPoints, pPtAry, pFlgAry );
+    sal_Bool bResult = sal_False;
+	if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) 
+	{
+		SalPoint* pPtAry2 = new SalPoint[nPoints];
+		BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev ); 
+		bResult = drawPolyLineBezier( nPoints, bCopied ? pPtAry2 : pPtAry, pFlgAry );
+		delete [] pPtAry2;
+	}
+	else
+        bResult = drawPolyLineBezier( nPoints, pPtAry, pFlgAry );
+    return bResult;
 }
 
-bool SalGraphics::DrawPolyLine( const ::basegfx::B2DPolygon& rPolygon,
-    const ::basegfx::B2DVector& rLineWidth, basegfx::B2DLineJoin eLineJoin,
-    const OutputDevice* )
+sal_Bool SalGraphics::DrawPolygonBezier( ULONG nPoints, const SalPoint* pPtAry, const BYTE* pFlgAry, const OutputDevice* pOutDev )
 {
-    DBG_ASSERT( !(m_nLayout & SAL_LAYOUT_BIDI_RTL), "DrawPolygon for B2D - no mirroring implemented");
-    return drawPolyLine( rPolygon, rLineWidth, eLineJoin );
+    sal_Bool bResult = sal_False;
+	if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) 
+	{
+		SalPoint* pPtAry2 = new SalPoint[nPoints];
+		BOOL bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev ); 
+		bResult = drawPolygonBezier( nPoints, bCopied ? pPtAry2 : pPtAry, pFlgAry );
+		delete [] pPtAry2;
+	}
+	else
+        bResult = drawPolygonBezier( nPoints, pPtAry, pFlgAry );
+    return bResult;
+}
+
+sal_Bool SalGraphics::DrawPolyPolygonBezier( sal_uInt32 i_nPoly, const sal_uInt32* i_pPoints,
+                                                   const SalPoint* const* i_pPtAry, const BYTE* const* i_pFlgAry, const OutputDevice* i_pOutDev )
+{
+    sal_Bool bRet = sal_False;
+	if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) 
+	{
+        // TODO: optimize, reduce new/delete calls
+        SalPoint **pPtAry2 = new SalPoint*[i_nPoly];
+        ULONG i;
+        for(i=0; i<i_nPoly; i++)
+        {
+            ULONG nPoints = i_pPoints[i];
+            pPtAry2[i] = new SalPoint[ nPoints ];
+		    mirror( nPoints, i_pPtAry[i], pPtAry2[i], i_pOutDev ); 
+        }
+
+        bRet = drawPolyPolygonBezier( i_nPoly, i_pPoints, (PCONSTSALPOINT*)pPtAry2, i_pFlgAry );
+
+        for(i=0; i<i_nPoly; i++)
+            delete [] pPtAry2[i];
+        delete [] pPtAry2;
+    }
+    else
+	    bRet = drawPolyPolygonBezier( i_nPoly, i_pPoints, i_pPtAry, i_pFlgAry );
+    return bRet;
+}
+
+bool SalGraphics::DrawPolyLine( const ::basegfx::B2DPolygon& i_rPolygon,
+    const ::basegfx::B2DVector& i_rLineWidth, basegfx::B2DLineJoin i_eLineJoin,
+    const OutputDevice* i_pOutDev )
+{
+    bool bRet = false;
+	if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) ) 
+	{
+        basegfx::B2DPolygon aMirror( mirror( i_rPolygon, i_pOutDev ) );
+        bRet = drawPolyLine( aMirror, i_rLineWidth, i_eLineJoin );
+    }
+    else
+        bRet = drawPolyLine( i_rPolygon, i_rLineWidth, i_eLineJoin );
+    return bRet;
 }
 
 void	SalGraphics::CopyArea( long nDestX, long nDestY,

vcl/source/src/images.src

 
 Bitmap SV_RESID_BITMAP_MSGBOX
 {
-	File = "msgbox.bmp";
+	File = "msgbox.png";
+};
+
+// -----------------------------------------------------------------------
+
+Bitmap SV_RESID_BITMAP_MSGBOX_HC
+{
+	File = "msgbox_hc.png";
 };
 
 // -----------------------------------------------------------------------

vcl/source/window/dockmgr.cxx

     {
         // get mouse pos at a static window to have a fixed reference point
         PointerState aState = GetParent()->GetPointerState();
+        if (ImplHasMirroredGraphics() && IsRTLEnabled())
+            ImplMirrorFramePos(aState.maPos);
         maTearOffPosition = GetWindow( WINDOW_BORDER )->GetPosPixel();
         maDelta = aState.maPos - maTearOffPosition;
     }
         {
             // move the window according to mouse pos
             PointerState aState = GetParent()->GetPointerState();
+            if (ImplHasMirroredGraphics() && IsRTLEnabled()) 
+                ImplMirrorFramePos(aState.maPos);
             maTearOffPosition = aState.maPos - maDelta;
             GetWindow( WINDOW_BORDER )->SetPosPixel( maTearOffPosition );
         }

vcl/source/window/menu.cxx

 		for ( USHORT i = (USHORT)pItemList->Count(); i; )
 		{
 			MenuItemData* pData = pItemList->GetDataFromPos( --i );
-			if ( ImplIsVisible( i ) && ( pData->eType == MENUITEM_IMAGE ) || ( pData->eType == MENUITEM_STRINGIMAGE ))
+			if ( ImplIsVisible( i ) && (( pData->eType == MENUITEM_IMAGE ) || ( pData->eType == MENUITEM_STRINGIMAGE )))
 			{
 				Size aImgSz = pData->aImage.GetSizePixel();
 				if ( aImgSz.Height() > aMaxImgSz.Height() )
     if ( GetItemCount() )
     {
         SalMenu* pMenu = ImplGetSalMenu();
-        if( pMenu && pMenu->ShowNativePopupMenu( pWin, aRect, nPopupModeFlags | FLOATWIN_POPUPMODE_GRABFOCUS ) )
+        Rectangle aNativeRect( aRect );
+        if( pW->IsRTLEnabled() )
+        {
+            Point aPt( aRect.TopLeft() );
+            aPt.X() += aSz.Width();
+            pW->ImplMirrorFramePos( aPt );
+            aNativeRect = Rectangle( aPt, aNativeRect.GetSize() );
+        }
+        if( pMenu && pMenu->ShowNativePopupMenu( pWin, aNativeRect, nPopupModeFlags | FLOATWIN_POPUPMODE_GRABFOCUS ) )
         {
             pWin->StopExecute(0);
             pWin->doShutdown();

vcl/source/window/msgbox.cxx

 	ImplSVData* pSVData = ImplGetSVData();
 	if ( !pSVData->maWinData.mpMsgBoxImgList )
 	{
-        BitmapEx aBmpEx;
         ResMgr* pResMgr = ImplGetResMgr();
 		pSVData->maWinData.mpMsgBoxImgList = new ImageList(4);
+		pSVData->maWinData.mpMsgBoxHCImgList = new ImageList(4);
         if( pResMgr )
         {
             Color aNonAlphaMask( 0xC0, 0xC0, 0xC0 );
             pSVData->maWinData.mpMsgBoxImgList->InsertFromHorizontalBitmap
                 ( ResId( SV_RESID_BITMAP_MSGBOX, *pResMgr ), 4, &aNonAlphaMask );
-	}
+            pSVData->maWinData.mpMsgBoxHCImgList->InsertFromHorizontalBitmap
+                ( ResId( SV_RESID_BITMAP_MSGBOX_HC, *pResMgr ), 4, &aNonAlphaMask );
+        }
 	}
 }
 
 	if ( !GetText().Len() )
 		SetText( Application::GetDisplayName() );
 
-	SetImage( InfoBox::GetStandardImage() );
+	SetImage( GetSettings().GetStyleSettings().GetDialogColor().IsDark() ?
+                InfoBox::GetStandardImageHC() : InfoBox::GetStandardImage() );
 	mnSoundType = ((USHORT)SOUND_INFO)+1;
 }
 
 
 // -----------------------------------------------------------------------
 
+Image InfoBox::GetStandardImageHC()
+{
+	ImplInitMsgBoxImageList();
+	return ImplGetSVData()->maWinData.mpMsgBoxHCImgList->GetImage( 4 );
+}
+
+// -----------------------------------------------------------------------
+
 void WarningBox::ImplInitWarningBoxData()
 {
 	// Default Text is the display title from the application
 	if ( !GetText().Len() )
 		SetText( Application::GetDisplayName() );
 
-	SetImage( ErrorBox::GetStandardImage() );
+	SetImage( GetSettings().GetStyleSettings().GetDialogColor().IsDark() ? 
+        ErrorBox::GetStandardImageHC() : ErrorBox::GetStandardImage() );
 	mnSoundType = ((USHORT)SOUND_ERROR)+1;
 }
 
 
 // -----------------------------------------------------------------------
 
+Image ErrorBox::GetStandardImageHC()
+{
+	ImplInitMsgBoxImageList();
+	return ImplGetSVData()->maWinData.mpMsgBoxHCImgList->GetImage( 1 );
+}
+
+// -----------------------------------------------------------------------
+
 void QueryBox::ImplInitQueryBoxData()
 {
 	// Default Text is the display title from the application
 	if ( !GetText().Len() )
 		SetText( Application::GetDisplayName() );
 
-	SetImage( QueryBox::GetStandardImage() );
+	SetImage( GetSettings().GetStyleSettings().GetDialogColor().IsDark() ?
+        QueryBox::GetStandardImageHC() : QueryBox::GetStandardImage() );
 	mnSoundType = ((USHORT)SOUND_QUERY)+1;
 }
 
 	return ImplGetSVData()->maWinData.mpMsgBoxImgList->GetImage( 2 );
 }
 
+// -----------------------------------------------------------------------
+
+Image QueryBox::GetStandardImageHC()
+{
+	ImplInitMsgBoxImageList();
+	return ImplGetSVData()->maWinData.mpMsgBoxHCImgList->GetImage( 2 );
+}
+
+// -----------------------------------------------------------------------
+
 Size MessBox::GetOptimalSize(WindowSizeType eType) const
 {
     switch( eType ) {

vcl/source/window/window.cxx

 #include "vcl/pdfextoutdevdata.hxx"
 #include "vcl/lazydelete.hxx"
 
+#include <set>
+
 using namespace rtl;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
     if( defFontheight > maxFontheight )
         defFontheight = maxFontheight;
 
-    // if the UI is korean, always use 9pt
+    // if the UI is korean, chinese or another locale
+    // where the system font size is kown to be often too small to
+    // generate readable fonts enforce a minimum font size of 9 points
+    bool bBrokenLangFontHeight = false;
+    static const LanguageType eBrokenSystemFontSizeLanguages[] =
+    { LANGUAGE_KOREAN, LANGUAGE_KOREAN_JOHAB,
+      LANGUAGE_CHINESE_HONGKONG, LANGUAGE_CHINESE_MACAU, LANGUAGE_CHINESE_SIMPLIFIED, LANGUAGE_CHINESE_SINGAPORE, LANGUAGE_CHINESE_TRADITIONAL
+    };
+    static std::set< LanguageType > aBrokenSystemFontSizeLanguagesSet(
+        eBrokenSystemFontSizeLanguages,
+        eBrokenSystemFontSizeLanguages + 
+        (sizeof(eBrokenSystemFontSizeLanguages)/sizeof(eBrokenSystemFontSizeLanguages[0]))
+        );
     LanguageType aLang = Application::GetSettings().GetUILanguage();
-    if( aLang == LANGUAGE_KOREAN || aLang == LANGUAGE_KOREAN_JOHAB )
+    if( aBrokenSystemFontSizeLanguagesSet.find( aLang ) != aBrokenSystemFontSizeLanguagesSet.end() )
+    {
         defFontheight = Max(9, defFontheight);
+        bBrokenLangFontHeight = true;
+    }
 
     // i22098, toolfont will be scaled differently to avoid bloated rulers and status bars for big fonts
     int toolfontheight = defFontheight;
     aFont = aStyleSettings.GetAppFont();
     aFont.SetHeight( defFontheight );
     aStyleSettings.SetAppFont( aFont );
-    //aFont = aStyleSettings.GetHelpFont();
-    //aFont.SetHeight( defFontheight );
-    //aStyleSettings.SetHelpFont( aFont );
     aFont = aStyleSettings.GetTitleFont();
     aFont.SetHeight( defFontheight );
     aStyleSettings.SetTitleFont( aFont );
     aFont = aStyleSettings.GetFloatTitleFont();
     aFont.SetHeight( defFontheight );
     aStyleSettings.SetFloatTitleFont( aFont );
-    //aFont = aStyleSettings.GetMenuFont();
-    //aFont.SetHeight( defFontheight );
-    //aStyleSettings.SetMenuFont( aFont );
+    // keep menu and help font size from system unless in broken locale size
+    if( bBrokenLangFontHeight )
+    {
+        aFont = aStyleSettings.GetMenuFont();
+        if( aFont.GetHeight() < defFontheight )
+        {
+            aFont.SetHeight( defFontheight );
+            aStyleSettings.SetMenuFont( aFont );
+        }
+        aFont = aStyleSettings.GetHelpFont();
+        if( aFont.GetHeight() < defFontheight )
+        {
+            aFont.SetHeight( defFontheight );
+            aStyleSettings.SetHelpFont( aFont );
+        }
+    }
 
     // use different height for toolfont
     aFont = aStyleSettings.GetToolFont();

vcl/unx/gtk/a11y/atkutil.cxx

         break;
         
     case VCLEVENT_OBJECT_DYING:
+        g_aWindowList.erase( static_cast< ::VclWindowEvent const * >(pEvent)->GetWindow() );
+        // fallthrough intentional !
     case VCLEVENT_TOOLBOX_HIGHLIGHTOFF:
         handle_toolbox_highlightoff(static_cast< ::VclWindowEvent const * >(pEvent)->GetWindow());
         break;

vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx

         ((nType == CTRL_TOOLTIP) &&
                 (   (nPart==PART_ENTIRE_CONTROL) )              )   ||
         ((nType == CTRL_MENU_POPUP) &&
-                (   (nPart==PART_ENTIRE_CONTROL) )
+                (   (nPart==PART_ENTIRE_CONTROL)
                 ||  (nPart==PART_MENU_ITEM)
                 ||  (nPart==PART_MENU_ITEM_CHECK_MARK)
                 ||  (nPart==PART_MENU_ITEM_RADIO_MARK)
-                )                                                   ||
+                )
+                                                                )   ||
         ((nType == CTRL_PROGRESS) &&
                 (   (nPart == PART_ENTIRE_CONTROL) )
                 )                                                   ||

vcl/unx/headless/svpgdi.cxx

     m_aFillColor = basebmp::Color( nSalColor );
 }
 
-void SvpSalGraphics::SetXORMode( BOOL bSet )
+void SvpSalGraphics::SetXORMode( bool bSet, bool )
 {
     m_aDrawMode = bSet ? DrawMode_XOR : DrawMode_PAINT;
 }

vcl/unx/headless/svpgdi.hxx

 
     virtual void          	SetFillColor( SalColor nSalColor );
 
-    virtual void			SetXORMode( BOOL bSet );
+    virtual void			SetXORMode( bool bSet, bool );
 
     virtual void			SetROPLineColor( SalROPColor nROPColor );
     virtual void			SetROPFillColor( SalROPColor nROPColor );

vcl/unx/headless/svppspgraphics.cxx

     DBG_ASSERT( 0, "Error: PrinterGfx::SetROPFillColor() not implemented" );
 }
 
-void PspGraphics::SetXORMode( BOOL bSet )
+void PspGraphics::SetXORMode( bool bSet, bool )
 {
     (void)bSet;
     DBG_ASSERT( !bSet, "Error: PrinterGfx::SetXORMode() not implemented" );

vcl/unx/headless/svppspgraphics.hxx

     virtual void			SetLineColor( SalColor nSalColor );
     virtual void			SetFillColor();
     virtual void          	SetFillColor( SalColor nSalColor );
-    virtual void			SetXORMode( BOOL bSet );
+    virtual void			SetXORMode( bool bSet, bool );
     virtual void			SetROPLineColor( SalROPColor nROPColor );
     virtual void			SetROPFillColor( SalROPColor nROPColor );
 

vcl/unx/inc/pspgraphics.h

     virtual void			SetLineColor( SalColor nSalColor );
     virtual void			SetFillColor();
     virtual void          	SetFillColor( SalColor nSalColor );
-    virtual void			SetXORMode( BOOL bSet );
+    virtual void			SetXORMode( bool bSet, bool );
     virtual void			SetROPLineColor( SalROPColor nROPColor );
     virtual void			SetROPFillColor( SalROPColor nROPColor );
 

vcl/unx/inc/salgdi.h

     BOOL			bInvert50GC_ : 1;	// is Invert50 GC valid
     BOOL			bStippleGC_ : 1;	// is Stipple GC valid
     BOOL            bTrackingGC_ : 1;   // is Tracking GC valid
-    BOOL			bXORMode_ : 1;		// is ROP XOR Mode set
+    bool			bXORMode_ : 1;		// is ROP XOR Mode set
     BOOL			bDitherBrush_ : 1;	// is solid or tile
 
     void			SetClipRegion( GC          pGC,
 
     virtual void          	SetFillColor( SalColor nSalColor );
 
-    virtual void			SetXORMode( BOOL bSet );
+    virtual void			SetXORMode( bool bSet, bool );
 
     virtual void			SetROPLineColor( SalROPColor nROPColor );
     virtual void			SetROPFillColor( SalROPColor nROPColor );

vcl/unx/source/gdi/pspgraphics.cxx

     DBG_ASSERT( 0, "Error: PrinterGfx::SetROPFillColor() not implemented" );
 }
 
-void PspGraphics::SetXORMode( BOOL
-#ifdef DBG_UTIL
-bSet
-#endif
-)
+void PspGraphics::SetXORMode( bool bSet, bool )
 {
+    (void)bSet;
     DBG_ASSERT( !bSet, "Error: PrinterGfx::SetXORMode() not implemented" );
 }
 

vcl/unx/source/gdi/salgdi.cxx

 }
 
 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-void X11SalGraphics::SetXORMode( BOOL bSet )
+void X11SalGraphics::SetXORMode( bool bSet, bool )
 {
     if( !bXORMode_ == bSet )
     {

vcl/unx/source/plugadapt/salplug.cxx

 static const char* autodetect_plugin()
 {
     const char * desktop = get_desktop_environment();
-    const char * pRet = NULL;
+    const char * pRet = "gen";
     
     // no server at all: dummy plugin
     if ( desktop == desktop_strings[DESKTOP_NONE] )
     else if( desktop == desktop_strings[DESKTOP_KDE] )
         pRet = "kde";
     else
-        pRet = "gen";
+    {
+        // #i95296# use the much nicer looking gtk plugin
+        // on desktops that set gtk variables (e.g. XFCE)
+        static const char* pEnv = getenv( "GTK2_RC_FILES" );
+        if( pEnv && *pEnv ) // check for existance and non emptiness
+            pRet = "gtk";
+    }
         
 #if OSL_DEBUG_LEVEL > 1
     std::fprintf( stderr, "plugin autodetection: %s\n", pRet );

vcl/unx/source/window/salframe.cxx

         {
             const String& rWM( pDisplay_->getWMAdaptor()->getWindowManagerName() );
             if( rWM.EqualsAscii( "KWin" ) )			// assume KDE is running
-                iconSize = 16;
+                iconSize = 48;
             static bool bGnomeIconSize = false;
             static bool bGnomeChecked = false;
             if( ! bGnomeChecked )
                     XFree( pProps );
             }
             if( bGnomeIconSize )
-                iconSize = 20;
+                iconSize = 48;
         }
 
         XWMHints Hints;

vcl/win/inc/salgdi.h

 	BOOL					mbVirDev;			// is VirDev
 	BOOL					mbWindow;			// is Window
 	BOOL					mbScreen;			// is Screen compatible
-	BOOL					mbXORMode;			// _every_ output with RasterOp XOR
+	bool					mbXORMode;			// _every_ output with RasterOp XOR
     
     HFONT                   ImplDoSetFont( ImplFontSelectData* i_pFont, float& o_rFontScale, HFONT& o_rOldFont );
 
     // filled accordingly
     virtual void          	SetFillColor( SalColor nSalColor );
     // enable/disable XOR drawing
-    virtual void			SetXORMode( BOOL bSet );
+    virtual void			SetXORMode( bool bSet, bool );
     // set line color for raster operations
     virtual void			SetROPLineColor( SalROPColor nROPColor );
     // set fill color for raster operations

vcl/win/source/gdi/salgdi.cxx

 
 // -----------------------------------------------------------------------
 
-void WinSalGraphics::SetXORMode( BOOL bSet )
+void WinSalGraphics::SetXORMode( bool bSet, bool )
 {
 	mbXORMode = bSet;
 	::SetROP2( mhDC, bSet ? R2_XORPEN : R2_COPYPEN );