diff options
-rw-r--r-- | canvas/source/vcl/canvashelper_texturefill.cxx | 72 | ||||
-rw-r--r-- | dtrans/source/aqua/DropTarget.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/source/gdi/salgdi3.cxx | 35 |
3 files changed, 100 insertions, 11 deletions
diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx index 768466662a94..6127aa8f401b 100644 --- a/canvas/source/vcl/canvashelper_texturefill.cxx +++ b/canvas/source/vcl/canvashelper_texturefill.cxx @@ -714,6 +714,39 @@ namespace vclcanvas } } else +#if defined(QUARTZ) // TODO: other ports should avoid the XOR-trick too (implementation vs. interface!) + { + const Region aPolyClipRegion( rPoly ); + + rOutDev.Push( PUSH_CLIPREGION ); + rOutDev.SetClipRegion( aPolyClipRegion ); + + doGradientFill( rOutDev, + rValues, + rColor1, + rColor2, + aTextureTransform, + aPolygonDeviceRectOrig, + nStepCount, + false ); + rOutDev.Pop(); + + if( p2ndOutDev ) + { + p2ndOutDev->Push( PUSH_CLIPREGION ); + p2ndOutDev->SetClipRegion( aPolyClipRegion ); + doGradientFill( *p2ndOutDev, + rValues, + rColor1, + rColor2, + aTextureTransform, + aPolygonDeviceRectOrig, + nStepCount, + false ); + p2ndOutDev->Pop(); + } + } +#else // TODO: remove once doing the XOR-trick in the canvas-layer becomes redundant { // output gradient the hard way: XORing out the polygon rOutDev.Push( PUSH_RASTEROP ); @@ -767,6 +800,7 @@ namespace vclcanvas p2ndOutDev->Pop(); } } +#endif // complex-clipping vs. XOR-trick #if defined(VERBOSE) && OSL_DEBUG_LEVEL > 0 { @@ -1203,6 +1237,43 @@ namespace vclcanvas aOutputBmpEx ); } else +#if defined(QUARTZ) // TODO: other ports should avoid the XOR-trick too (implementation vs. interface!) + { + const Region aPolyClipRegion( aPolyPoly ); + + rOutDev.Push( PUSH_CLIPREGION ); + rOutDev.SetClipRegion( aPolyClipRegion ); + + textureFill( rOutDev, + *pGrfObj, + aPt, + aIntegerNextTileX, + aIntegerNextTileY, + nTilesX, + nTilesY, + aSz, + aGrfAttr ); + rOutDev.Pop(); + + if( mp2ndOutDev ) + { + OutputDevice& r2ndOutDev( mp2ndOutDev->getOutDev() ); + r2ndOutDev.Push( PUSH_CLIPREGION ); + + r2ndOutDev.SetClipRegion( aPolyClipRegion ); + textureFill( r2ndOutDev, + *pGrfObj, + aPt, + aIntegerNextTileX, + aIntegerNextTileY, + nTilesX, + nTilesY, + aSz, + aGrfAttr ); + r2ndOutDev.Pop(); + } + } +#else // TODO: remove once doing the XOR-trick in the canvas-layer becomes redundant { // output via repeated XORing rOutDev.Push( PUSH_RASTEROP ); @@ -1261,6 +1332,7 @@ namespace vclcanvas r2ndOutDev.Pop(); } } +#endif // complex-clipping vs. XOR-trick } } } diff --git a/dtrans/source/aqua/DropTarget.cxx b/dtrans/source/aqua/DropTarget.cxx index 8cec3daf7a2d..bb45742732e7 100644 --- a/dtrans/source/aqua/DropTarget.cxx +++ b/dtrans/source/aqua/DropTarget.cxx @@ -190,7 +190,9 @@ sal_Int8 DropTarget::determineDropAction(sal_Int8 dropActions, id sender) const // has been set and we map this to ACTION_MOVE or ACTION_COPY // depending on whether or not source and dest are equal, // this hopefully satisfies all parties - if (dropActions == DNDConstants::ACTION_DEFAULT) + if( (dropActions == DNDConstants::ACTION_DEFAULT) + || ((dropActions == mDragSourceSupportedActions) + && !(~mDragSourceSupportedActions & DNDConstants::ACTION_COPY_OR_MOVE ) ) ) { dropAct = srcAndDestEqual ? DNDConstants::ACTION_MOVE : DNDConstants::ACTION_COPY; diff --git a/vcl/unx/source/gdi/salgdi3.cxx b/vcl/unx/source/gdi/salgdi3.cxx index 714e8e3fc1f2..88c64c2f48b2 100644 --- a/vcl/unx/source/gdi/salgdi3.cxx +++ b/vcl/unx/source/gdi/salgdi3.cxx @@ -1551,7 +1551,7 @@ void X11SalGraphics::GetDevFontList( ImplDevFontList *pList ) { // allow disabling of native X11 fonts static const char* pEnableX11FontStr = getenv( "SAL_ENABLE_NATIVE_XFONTS" ); - if( !pEnableX11FontStr || (pEnableX11FontStr[0] != '0') ) + if( pEnableX11FontStr && (pEnableX11FontStr[0] != '0') ) { // announce X11 fonts XlfdStorage* pX11FontList = GetDisplay()->GetXlfdList(); @@ -1808,19 +1808,34 @@ public: static void RegisterFontSubstitutors( ImplDevFontList* pList ) { - bool bDisableFC = false; + // init font substitution defaults + int nDisableBits = 0; #ifdef SOLARIS - bDisableFC = true; + nDisableBits = 1; // disable "font fallback" here on default #endif + // apply the environment variable if any const char* pEnvStr = ::getenv( "SAL_DISABLE_FC_SUBST" ); if( pEnvStr ) - bDisableFC = (*pEnvStr == '\0') || (*pEnvStr != '0'); - if( bDisableFC ) - return; - static FcPreMatchSubstititution aSubstPreMatch; - static FcGlyphFallbackSubstititution aSubstFallback; - pList->SetPreMatchHook( &aSubstPreMatch ); - pList->SetFallbackHook( &aSubstFallback ); + { + if( (*pEnvStr >= '0') && (*pEnvStr <= '9') ) + nDisableBits = (*pEnvStr - '0'); + else + nDisableBits = ~0U; // no specific bits set: disable all + } + + // register font fallback substitutions (unless disabled by bit0) + if( (nDisableBits & 1) == 0 ) + { + static FcPreMatchSubstititution aSubstPreMatch; + pList->SetPreMatchHook( &aSubstPreMatch ); + } + + // register glyph fallback substitutions (unless disabled by bit1) + if( (nDisableBits & 2) == 0 ) + { + static FcGlyphFallbackSubstititution aSubstFallback; + pList->SetFallbackHook( &aSubstFallback ); + } } // ----------------------------------------------------------------------- |