CWS-TOOLING: integrate CWS ooo301gsl2_DEV300

This commit is contained in:
Rüdiger Timm 2008-12-15 07:01:07 +00:00
parent 21fd41dec5
commit 46b3f2d50d
3 changed files with 100 additions and 11 deletions

View file

@ -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
}
}
}

View file

@ -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;

View file

@ -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 );
}
}
// -----------------------------------------------------------------------