create a macro library for implementing bit-flags types
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, changed from a macro- to a template-based solution. (Unfortunately MSVC 2012 does not support explicit conversion operators. Worked around that with explicit #ifs rather than some HAVE_EXPLICIT_CONVERSION_OPERATORS and SAL_EXPLICIT_CONVERSION_OPERATOR ainticipating we hopefully soon move to a baseline that requires unconditional support for them.) Change-Id: I4a89643b218d247e8e4a861faba458ec6dfe1396
This commit is contained in:
parent
1156d11ef0
commit
af5ebbf783
@ -584,7 +584,7 @@ namespace vclcanvas
|
||||
// poly-polygons, and don't have to output the gradient
|
||||
// twice for XOR
|
||||
|
||||
rOutDev.Push( PUSH_CLIPREGION );
|
||||
rOutDev.Push( PushFlags::CLIPREGION );
|
||||
rOutDev.IntersectClipRegion( aPolygonDeviceRectOrig );
|
||||
doGradientFill( rOutDev,
|
||||
rValues,
|
||||
@ -609,7 +609,7 @@ namespace vclcanvas
|
||||
{
|
||||
const vcl::Region aPolyClipRegion( rPoly );
|
||||
|
||||
rOutDev.Push( PUSH_CLIPREGION );
|
||||
rOutDev.Push( PushFlags::CLIPREGION );
|
||||
rOutDev.SetClipRegion( aPolyClipRegion );
|
||||
|
||||
doGradientFill( rOutDev,
|
||||
@ -1071,7 +1071,7 @@ namespace vclcanvas
|
||||
{
|
||||
const vcl::Region aPolyClipRegion( aPolyPoly );
|
||||
|
||||
rOutDev.Push( PUSH_CLIPREGION );
|
||||
rOutDev.Push( PushFlags::CLIPREGION );
|
||||
rOutDev.SetClipRegion( aPolyClipRegion );
|
||||
|
||||
textureFill( rOutDev,
|
||||
@ -1088,7 +1088,7 @@ namespace vclcanvas
|
||||
if( mp2ndOutDev )
|
||||
{
|
||||
OutputDevice& r2ndOutDev( mp2ndOutDev->getOutDev() );
|
||||
r2ndOutDev.Push( PUSH_CLIPREGION );
|
||||
r2ndOutDev.Push( PushFlags::CLIPREGION );
|
||||
|
||||
r2ndOutDev.SetClipRegion( aPolyClipRegion );
|
||||
textureFill( r2ndOutDev,
|
||||
|
@ -453,7 +453,7 @@ namespace vclcanvas
|
||||
// repaint uncovered areas from sprite. Need to actually
|
||||
// clip here, since we're only repainting _parts_ of the
|
||||
// sprite
|
||||
rOutDev.Push( PUSH_CLIPREGION );
|
||||
rOutDev.Push( PushFlags::CLIPREGION );
|
||||
::std::for_each( aUnscrollableAreas.begin(),
|
||||
aUnscrollableAreas.end(),
|
||||
::boost::bind( &opaqueUpdateSpriteArea,
|
||||
|
@ -237,7 +237,7 @@ namespace vclcanvas
|
||||
// already redrawn the sprite.
|
||||
bool bSpriteRedrawn( false );
|
||||
|
||||
rTargetSurface.Push( PUSH_CLIPREGION );
|
||||
rTargetSurface.Push( PushFlags::CLIPREGION );
|
||||
|
||||
// apply clip (if any)
|
||||
if( getClip().is() )
|
||||
|
@ -58,7 +58,7 @@ namespace cppcanvas
|
||||
fontRotation(0.0),
|
||||
|
||||
textEmphasisMarkStyle(EMPHASISMARK_NONE),
|
||||
pushFlags(PUSH_ALL),
|
||||
pushFlags(PushFlags::ALL),
|
||||
textDirection(::com::sun::star::rendering::TextDirection::WEAK_LEFT_TO_RIGHT),
|
||||
textAlignment(0), // TODO(Q2): Synchronize with implrenderer
|
||||
// and possibly new rendering::TextAlignment
|
||||
|
@ -270,7 +270,7 @@ namespace cppcanvas
|
||||
|
||||
void VectorOfOutDevStates::popState()
|
||||
{
|
||||
if( getState().pushFlags != PUSH_ALL )
|
||||
if( getState().pushFlags != PushFlags::ALL )
|
||||
{
|
||||
// a state is pushed which is incomplete, i.e. does not
|
||||
// restore everything to the previous stack level when
|
||||
@ -289,19 +289,19 @@ namespace cppcanvas
|
||||
|
||||
const OutDevState& rNewState( getState() );
|
||||
|
||||
if( (aCalculatedNewState.pushFlags & PUSH_LINECOLOR) )
|
||||
if( (aCalculatedNewState.pushFlags & PushFlags::LINECOLOR) )
|
||||
{
|
||||
aCalculatedNewState.lineColor = rNewState.lineColor;
|
||||
aCalculatedNewState.isLineColorSet = rNewState.isLineColorSet;
|
||||
}
|
||||
|
||||
if( (aCalculatedNewState.pushFlags & PUSH_FILLCOLOR) )
|
||||
if( (aCalculatedNewState.pushFlags & PushFlags::FILLCOLOR) )
|
||||
{
|
||||
aCalculatedNewState.fillColor = rNewState.fillColor;
|
||||
aCalculatedNewState.isFillColorSet = rNewState.isFillColorSet;
|
||||
}
|
||||
|
||||
if( (aCalculatedNewState.pushFlags & PUSH_FONT) )
|
||||
if( (aCalculatedNewState.pushFlags & PushFlags::FONT) )
|
||||
{
|
||||
aCalculatedNewState.xFont = rNewState.xFont;
|
||||
aCalculatedNewState.fontRotation = rNewState.fontRotation;
|
||||
@ -315,17 +315,17 @@ namespace cppcanvas
|
||||
aCalculatedNewState.isTextOutlineModeSet = rNewState.isTextOutlineModeSet;
|
||||
}
|
||||
|
||||
if( (aCalculatedNewState.pushFlags & PUSH_TEXTCOLOR) )
|
||||
if( (aCalculatedNewState.pushFlags & PushFlags::TEXTCOLOR) )
|
||||
{
|
||||
aCalculatedNewState.textColor = rNewState.textColor;
|
||||
}
|
||||
|
||||
if( (aCalculatedNewState.pushFlags & PUSH_MAPMODE) )
|
||||
if( (aCalculatedNewState.pushFlags & PushFlags::MAPMODE) )
|
||||
{
|
||||
aCalculatedNewState.mapModeTransform = rNewState.mapModeTransform;
|
||||
}
|
||||
|
||||
if( (aCalculatedNewState.pushFlags & PUSH_CLIPREGION) )
|
||||
if( (aCalculatedNewState.pushFlags & PushFlags::CLIPREGION) )
|
||||
{
|
||||
aCalculatedNewState.clip = rNewState.clip;
|
||||
aCalculatedNewState.clipRect = rNewState.clipRect;
|
||||
@ -333,40 +333,40 @@ namespace cppcanvas
|
||||
}
|
||||
|
||||
// TODO(F2): Raster ops NYI
|
||||
// if( (aCalculatedNewState.pushFlags & PUSH_RASTEROP) )
|
||||
// if( (aCalculatedNewState.pushFlags & PushFlags::RASTEROP) )
|
||||
// {
|
||||
// }
|
||||
|
||||
if( (aCalculatedNewState.pushFlags & PUSH_TEXTFILLCOLOR) )
|
||||
if( (aCalculatedNewState.pushFlags & PushFlags::TEXTFILLCOLOR) )
|
||||
{
|
||||
aCalculatedNewState.textFillColor = rNewState.textFillColor;
|
||||
aCalculatedNewState.isTextFillColorSet = rNewState.isTextFillColorSet;
|
||||
}
|
||||
|
||||
if( (aCalculatedNewState.pushFlags & PUSH_TEXTALIGN) )
|
||||
if( (aCalculatedNewState.pushFlags & PushFlags::TEXTALIGN) )
|
||||
{
|
||||
aCalculatedNewState.textReferencePoint = rNewState.textReferencePoint;
|
||||
}
|
||||
|
||||
// TODO(F1): Refpoint handling NYI
|
||||
// if( (aCalculatedNewState.pushFlags & PUSH_REFPOINT) )
|
||||
// if( (aCalculatedNewState.pushFlags & PushFlags::REFPOINT) )
|
||||
// {
|
||||
// }
|
||||
|
||||
if( (aCalculatedNewState.pushFlags & PUSH_TEXTLINECOLOR) )
|
||||
if( (aCalculatedNewState.pushFlags & PushFlags::TEXTLINECOLOR) )
|
||||
{
|
||||
aCalculatedNewState.textLineColor = rNewState.textLineColor;
|
||||
aCalculatedNewState.isTextLineColorSet = rNewState.isTextLineColorSet;
|
||||
}
|
||||
|
||||
if( (aCalculatedNewState.pushFlags & PUSH_TEXTLAYOUTMODE) )
|
||||
if( (aCalculatedNewState.pushFlags & PushFlags::TEXTLAYOUTMODE) )
|
||||
{
|
||||
aCalculatedNewState.textAlignment = rNewState.textAlignment;
|
||||
aCalculatedNewState.textDirection = rNewState.textDirection;
|
||||
}
|
||||
|
||||
// TODO(F2): Text language handling NYI
|
||||
// if( (aCalculatedNewState.pushFlags & PUSH_TEXTLANGUAGE) )
|
||||
// if( (aCalculatedNewState.pushFlags & PushFlags::TEXTLANGUAGE) )
|
||||
// {
|
||||
// }
|
||||
|
||||
@ -730,7 +730,7 @@ namespace cppcanvas
|
||||
// cannot currently use native canvas gradients, as a
|
||||
// finite step size is given (this funny feature is not
|
||||
// supported by the XCanvas API)
|
||||
rParms.mrStates.pushState(PUSH_ALL);
|
||||
rParms.mrStates.pushState(PushFlags::ALL);
|
||||
|
||||
if( !bIsPolygonRectangle )
|
||||
{
|
||||
@ -1520,7 +1520,7 @@ namespace cppcanvas
|
||||
::cppcanvas::internal::OutDevState& rState = rStates.getState();
|
||||
|
||||
ComplexTextLayoutMode nBidiLayoutMode = nLayoutMode & (TEXT_LAYOUT_BIDI_RTL|TEXT_LAYOUT_BIDI_STRONG);
|
||||
if( nBidiLayoutMode == 0)
|
||||
if( nBidiLayoutMode == TEXT_LAYOUT_DEFAULT)
|
||||
rState.textDirection = rendering::TextDirection::WEAK_LEFT_TO_RIGHT;
|
||||
else if( nBidiLayoutMode == TEXT_LAYOUT_BIDI_STRONG)
|
||||
rState.textDirection = rendering::TextDirection::STRONG_LEFT_TO_RIGHT;
|
||||
@ -1590,7 +1590,7 @@ namespace cppcanvas
|
||||
// Setup local transform, such that the
|
||||
// metafile renders itself into the given
|
||||
// output rectangle
|
||||
rStates.pushState(PUSH_ALL);
|
||||
rStates.pushState(PushFlags::ALL);
|
||||
|
||||
rVDev.Push();
|
||||
rVDev.SetMapMode( rSubstitute.GetPrefMapMode() );
|
||||
@ -2557,7 +2557,7 @@ namespace cppcanvas
|
||||
{
|
||||
MetaTextRectAction* pAct = static_cast<MetaTextRectAction*>(pCurrAct);
|
||||
|
||||
rStates.pushState(PUSH_ALL);
|
||||
rStates.pushState(PushFlags::ALL);
|
||||
|
||||
// use the VDev to break up the text rect
|
||||
// action into readily formatted lines
|
||||
|
@ -64,7 +64,7 @@ namespace svx
|
||||
inline FontSwitch( OutputDevice& _rDev, const vcl::Font& _rTemporaryFont )
|
||||
:m_rDev( _rDev )
|
||||
{
|
||||
m_rDev.Push( PUSH_FONT );
|
||||
m_rDev.Push( PushFlags::FONT );
|
||||
m_rDev.SetFont( _rTemporaryFont );
|
||||
}
|
||||
inline ~FontSwitch( )
|
||||
|
@ -48,7 +48,7 @@ namespace dbaui
|
||||
ColorChanger( OutputDevice* _pDev, const ::Color& _rNewLineColor, const ::Color& _rNewFillColor )
|
||||
:m_pDev( _pDev )
|
||||
{
|
||||
m_pDev->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
|
||||
m_pDev->Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
|
||||
m_pDev->SetLineColor( _rNewLineColor );
|
||||
m_pDev->SetFillColor( _rNewFillColor );
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ namespace dbaui
|
||||
return;
|
||||
if (!_pViewData)
|
||||
_pViewData = pView->GetViewDataItem( pEntry, this );
|
||||
pView->Push(PUSH_ALL);
|
||||
pView->Push(PushFlags::ALL);
|
||||
vcl::Font aFont( pView->GetFont());
|
||||
aFont.SetWeight(WEIGHT_BOLD);
|
||||
pView->Control::SetFont( aFont );
|
||||
@ -50,7 +50,7 @@ namespace dbaui
|
||||
{
|
||||
if (m_bEmphasized)
|
||||
{
|
||||
rDev.Push(PUSH_ALL);
|
||||
rDev.Push(PushFlags::ALL);
|
||||
vcl::Font aFont( rDev.GetFont());
|
||||
aFont.SetWeight(WEIGHT_BOLD);
|
||||
rDev.SetFont( aFont );
|
||||
|
@ -310,7 +310,7 @@ void OTableEditorCtrl::PaintCell(OutputDevice& rDev, const Rectangle& rRect,
|
||||
{
|
||||
const OUString aText( GetCellText( m_nCurrentPos, nColumnId ));
|
||||
|
||||
rDev.Push( PUSH_CLIPREGION );
|
||||
rDev.Push( PushFlags::CLIPREGION );
|
||||
rDev.SetClipRegion(vcl::Region(rRect));
|
||||
rDev.DrawText( rRect, aText, TEXT_DRAW_LEFT | TEXT_DRAW_VCENTER );
|
||||
rDev.Pop();
|
||||
|
@ -118,7 +118,7 @@ namespace
|
||||
maRasterOp(ROP_OVERPAINT),
|
||||
mnLayoutMode(TEXT_LAYOUT_DEFAULT),
|
||||
maLanguageType(0),
|
||||
mnPushFlags(PUSH_NONE),
|
||||
mnPushFlags(PushFlags::NONE),
|
||||
mbLineColor(false),
|
||||
mbFillColor(false),
|
||||
mbTextColor(true),
|
||||
@ -229,7 +229,7 @@ namespace
|
||||
|
||||
void Push(PushFlags nPushFlags)
|
||||
{
|
||||
if(nPushFlags)
|
||||
if(bool(nPushFlags))
|
||||
{
|
||||
OSL_ENSURE(maPropertyHolders.size(), "PropertyHolders: PUSH with no property holders (!)");
|
||||
if ( !maPropertyHolders.empty() )
|
||||
@ -251,54 +251,54 @@ namespace
|
||||
const PropertyHolder* pTip = maPropertyHolders.back();
|
||||
const PushFlags nPushFlags(pTip->getPushFlags());
|
||||
|
||||
if(nPushFlags != PUSH_NONE)
|
||||
if(nPushFlags != PushFlags::NONE)
|
||||
{
|
||||
if(nSize > 1)
|
||||
{
|
||||
// copy back content for all non-set flags
|
||||
PropertyHolder* pLast = maPropertyHolders[nSize - 2];
|
||||
|
||||
if(PUSH_ALL != nPushFlags)
|
||||
if(PushFlags::ALL != nPushFlags)
|
||||
{
|
||||
if(!(nPushFlags & PUSH_LINECOLOR ))
|
||||
if(!(nPushFlags & PushFlags::LINECOLOR ))
|
||||
{
|
||||
pLast->setLineColor(pTip->getLineColor());
|
||||
pLast->setLineColorActive(pTip->getLineColorActive());
|
||||
}
|
||||
if(!(nPushFlags & PUSH_FILLCOLOR ))
|
||||
if(!(nPushFlags & PushFlags::FILLCOLOR ))
|
||||
{
|
||||
pLast->setFillColor(pTip->getFillColor());
|
||||
pLast->setFillColorActive(pTip->getFillColorActive());
|
||||
}
|
||||
if(!(nPushFlags & PUSH_FONT ))
|
||||
if(!(nPushFlags & PushFlags::FONT ))
|
||||
{
|
||||
pLast->setFont(pTip->getFont());
|
||||
}
|
||||
if(!(nPushFlags & PUSH_TEXTCOLOR ))
|
||||
if(!(nPushFlags & PushFlags::TEXTCOLOR ))
|
||||
{
|
||||
pLast->setTextColor(pTip->getTextColor());
|
||||
pLast->setTextColorActive(pTip->getTextColorActive());
|
||||
}
|
||||
if(!(nPushFlags & PUSH_MAPMODE ))
|
||||
if(!(nPushFlags & PushFlags::MAPMODE ))
|
||||
{
|
||||
pLast->setTransformation(pTip->getTransformation());
|
||||
pLast->setMapUnit(pTip->getMapUnit());
|
||||
}
|
||||
if(!(nPushFlags & PUSH_CLIPREGION ))
|
||||
if(!(nPushFlags & PushFlags::CLIPREGION ))
|
||||
{
|
||||
pLast->setClipPolyPolygon(pTip->getClipPolyPolygon());
|
||||
pLast->setClipPolyPolygonActive(pTip->getClipPolyPolygonActive());
|
||||
}
|
||||
if(!(nPushFlags & PUSH_RASTEROP ))
|
||||
if(!(nPushFlags & PushFlags::RASTEROP ))
|
||||
{
|
||||
pLast->setRasterOp(pTip->getRasterOp());
|
||||
}
|
||||
if(!(nPushFlags & PUSH_TEXTFILLCOLOR ))
|
||||
if(!(nPushFlags & PushFlags::TEXTFILLCOLOR ))
|
||||
{
|
||||
pLast->setTextFillColor(pTip->getTextFillColor());
|
||||
pLast->setTextFillColorActive(pTip->getTextFillColorActive());
|
||||
}
|
||||
if(!(nPushFlags & PUSH_TEXTALIGN ))
|
||||
if(!(nPushFlags & PushFlags::TEXTALIGN ))
|
||||
{
|
||||
if(pLast->getFont().GetAlign() != pTip->getFont().GetAlign())
|
||||
{
|
||||
@ -307,24 +307,24 @@ namespace
|
||||
pLast->setFont(aFont);
|
||||
}
|
||||
}
|
||||
if(!(nPushFlags & PUSH_REFPOINT ))
|
||||
if(!(nPushFlags & PushFlags::REFPOINT ))
|
||||
{
|
||||
// not supported
|
||||
}
|
||||
if(!(nPushFlags & PUSH_TEXTLINECOLOR ))
|
||||
if(!(nPushFlags & PushFlags::TEXTLINECOLOR ))
|
||||
{
|
||||
pLast->setTextLineColor(pTip->getTextLineColor());
|
||||
pLast->setTextLineColorActive(pTip->getTextLineColorActive());
|
||||
}
|
||||
if(!(nPushFlags & PUSH_TEXTLAYOUTMODE ))
|
||||
if(!(nPushFlags & PushFlags::TEXTLAYOUTMODE ))
|
||||
{
|
||||
pLast->setLayoutMode(pTip->getLayoutMode());
|
||||
}
|
||||
if(!(nPushFlags & PUSH_TEXTLANGUAGE ))
|
||||
if(!(nPushFlags & PushFlags::TEXTLANGUAGE ))
|
||||
{
|
||||
pLast->setLanguageType(pTip->getLanguageType());
|
||||
}
|
||||
if(!(nPushFlags & PUSH_OVERLINECOLOR ))
|
||||
if(!(nPushFlags & PushFlags::OVERLINECOLOR ))
|
||||
{
|
||||
pLast->setOverlineColor(pTip->getOverlineColor());
|
||||
pLast->setOverlineColorActive(pTip->getOverlineColorActive());
|
||||
@ -1229,8 +1229,8 @@ namespace
|
||||
drawinglayer::primitive2d::getFontAttributeFromVclFont(
|
||||
aFontScaling,
|
||||
rFont,
|
||||
0 != (rProperty.getLayoutMode() & TEXT_LAYOUT_BIDI_RTL),
|
||||
0 != (rProperty.getLayoutMode() & TEXT_LAYOUT_BIDI_STRONG)));
|
||||
bool(rProperty.getLayoutMode() & TEXT_LAYOUT_BIDI_RTL),
|
||||
bool(rProperty.getLayoutMode() & TEXT_LAYOUT_BIDI_STRONG)));
|
||||
|
||||
// add FontScaling
|
||||
rTextTransform.scale(aFontScaling.getX(), aFontScaling.getY());
|
||||
@ -2788,8 +2788,8 @@ namespace
|
||||
case META_POP_ACTION :
|
||||
{
|
||||
/** CHECKED, WORKS WELL */
|
||||
const bool bRegionMayChange(rPropertyHolders.Current().getPushFlags() & PUSH_CLIPREGION);
|
||||
const bool bRasterOpMayChange(rPropertyHolders.Current().getPushFlags() & PUSH_RASTEROP);
|
||||
const bool bRegionMayChange(rPropertyHolders.Current().getPushFlags() & PushFlags::CLIPREGION);
|
||||
const bool bRasterOpMayChange(rPropertyHolders.Current().getPushFlags() & PushFlags::RASTEROP);
|
||||
|
||||
if(bRegionMayChange && rPropertyHolders.Current().getClipPolyPolygonActive())
|
||||
{
|
||||
|
@ -1784,7 +1784,7 @@ namespace drawinglayer
|
||||
// set VCL clip region; subdivide before conversion to tools polygon. Subdivision necessary (!)
|
||||
// Removed subdivision and fixed in vcl::Region::ImplPolyPolyRegionToBandRegionFunc() in VCL where
|
||||
// the ClipRegion is built from the Polygon. A AdaptiveSubdivide on the source polygon was missing there
|
||||
mpOutputDevice->Push(PUSH_CLIPREGION);
|
||||
mpOutputDevice->Push(PushFlags::CLIPREGION);
|
||||
mpOutputDevice->SetClipRegion(vcl::Region(maClipPolyPolygon));
|
||||
|
||||
// recursively paint content
|
||||
|
@ -109,7 +109,7 @@ namespace drawinglayer
|
||||
maCurrentTransformation = rViewInformation.getObjectToViewTransformation();
|
||||
|
||||
// prepare output directly to pixels
|
||||
mpOutputDevice->Push(PUSH_MAPMODE);
|
||||
mpOutputDevice->Push(PushFlags::MAPMODE);
|
||||
mpOutputDevice->SetMapMode();
|
||||
|
||||
// react on AntiAliasing settings
|
||||
|
@ -134,7 +134,7 @@ void BorderLineTest::testGuessWidthThinthickLargegap()
|
||||
void BorderLineTest::testGuessWidthNostyleDouble()
|
||||
{
|
||||
SvxBorderLine line;
|
||||
line.GuessLinesWidths( NONE,
|
||||
line.GuessLinesWidths( css::table::BorderLineStyle::NONE,
|
||||
THINTHICKLG_OUT_WIDTH,
|
||||
THINTHICKLG_IN_WIDTH,
|
||||
THINTHICKLG_DIST_WIDTH );
|
||||
@ -152,7 +152,7 @@ void BorderLineTest::testGuessWidthNostyleDouble()
|
||||
void BorderLineTest::testGuessWidthNostyleSingle()
|
||||
{
|
||||
SvxBorderLine line;
|
||||
line.GuessLinesWidths( NONE, TEST_WIDTH );
|
||||
line.GuessLinesWidths( css::table::BorderLineStyle::NONE, TEST_WIDTH );
|
||||
CPPUNIT_ASSERT_EQUAL( SOLID, line.GetBorderLineStyle() );
|
||||
CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, line.GetWidth() );
|
||||
}
|
||||
|
@ -341,7 +341,7 @@ void ImpEditView::ImplDrawHighlightRect( OutputDevice* _pTarget, const Point& rD
|
||||
}
|
||||
else
|
||||
{
|
||||
_pTarget->Push(PUSH_LINECOLOR|PUSH_FILLCOLOR|PUSH_RASTEROP);
|
||||
_pTarget->Push(PushFlags::LINECOLOR|PushFlags::FILLCOLOR|PushFlags::RASTEROP);
|
||||
_pTarget->SetLineColor();
|
||||
_pTarget->SetFillColor(COL_BLACK);
|
||||
_pTarget->SetRasterOp(ROP_INVERT);
|
||||
|
@ -3116,7 +3116,7 @@ sal_uInt32 ImpEditEngine::CalcLineWidth( ParaPortion* pPortion, EditLine* pLine,
|
||||
|
||||
// #114278# Saving both layout mode and language (since I'm
|
||||
// potentially changing both)
|
||||
GetRefDevice()->Push( PUSH_TEXTLAYOUTMODE|PUSH_TEXTLANGUAGE );
|
||||
GetRefDevice()->Push( PushFlags::TEXTLAYOUTMODE|PushFlags::TEXTLANGUAGE );
|
||||
|
||||
ImplInitLayoutMode( GetRefDevice(), nPara, -1 );
|
||||
|
||||
|
@ -664,7 +664,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
|
||||
// SW disables TEXT_LAYOUT_COMPLEX_DISABLED, so maybe I have to enable it...
|
||||
|
||||
// Saving both layout mode and language (since I'm potentially changing both)
|
||||
GetRefDevice()->Push( PUSH_TEXTLAYOUTMODE|PUSH_TEXTLANGUAGE );
|
||||
GetRefDevice()->Push( PushFlags::TEXTLAYOUTMODE|PushFlags::TEXTLANGUAGE );
|
||||
|
||||
ImplInitLayoutMode( GetRefDevice(), nPara, -1 );
|
||||
|
||||
@ -2271,7 +2271,7 @@ sal_Int32 ImpEditEngine::SplitTextPortion( ParaPortion* pPortion, sal_Int32 nPos
|
||||
SvxFont aTmpFont( pPortion->GetNode()->GetCharAttribs().GetDefFont() );
|
||||
SeekCursor( pPortion->GetNode(), nTxtPortionStart+1, aTmpFont );
|
||||
aTmpFont.SetPhysFont( GetRefDevice() );
|
||||
GetRefDevice()->Push( PUSH_TEXTLANGUAGE );
|
||||
GetRefDevice()->Push( PushFlags::TEXTLANGUAGE );
|
||||
ImplInitDigitMode(GetRefDevice(), aTmpFont.GetLanguage());
|
||||
Size aSz = aTmpFont.QuickGetTextSize( GetRefDevice(), pPortion->GetNode()->GetString(), nTxtPortionStart, pTextPortion->GetLen(), NULL );
|
||||
GetRefDevice()->Pop();
|
||||
@ -3032,7 +3032,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt
|
||||
|
||||
// #114278# Saving both layout mode and language (since I'm
|
||||
// potentially changing both)
|
||||
pOutDev->Push( PUSH_TEXTLAYOUTMODE|PUSH_TEXTLANGUAGE );
|
||||
pOutDev->Push( PushFlags::TEXTLAYOUTMODE|PushFlags::TEXTLANGUAGE );
|
||||
ImplInitLayoutMode( pOutDev, n, nIndex );
|
||||
ImplInitDigitMode(pOutDev, aTmpFont.GetLanguage());
|
||||
|
||||
@ -3096,8 +3096,8 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt
|
||||
aBottomRightRectPos.Y() += 2 * nHalfBlankWidth;
|
||||
}
|
||||
|
||||
pOutDev->Push( PUSH_FILLCOLOR );
|
||||
pOutDev->Push( PUSH_LINECOLOR );
|
||||
pOutDev->Push( PushFlags::FILLCOLOR );
|
||||
pOutDev->Push( PushFlags::LINECOLOR );
|
||||
pOutDev->SetFillColor( COL_LIGHTGRAY );
|
||||
pOutDev->SetLineColor( COL_LIGHTGRAY );
|
||||
|
||||
@ -3776,7 +3776,7 @@ void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRect, OutputDev
|
||||
if ( GetTextRanger() )
|
||||
{
|
||||
// Some problems here with push/pop, why?!
|
||||
// pTarget->Push( PUSH_CLIPREGION|PUSH_MAPMODE );
|
||||
// pTarget->Push( PushFlags::CLIPREGION|PushFlags::MAPMODE );
|
||||
bClipRegion = pTarget->IsClipRegion();
|
||||
aOldRegion = pTarget->GetClipRegion();
|
||||
// How do I get the polygon to the right place??
|
||||
|
@ -163,7 +163,7 @@ ConvertBorderStyleFromWord(int const nWordLineStyle)
|
||||
case 27:
|
||||
return INSET;
|
||||
default:
|
||||
return NONE;
|
||||
return css::table::BorderLineStyle::NONE;
|
||||
}
|
||||
}
|
||||
|
||||
@ -302,7 +302,7 @@ BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderStyle nStyle )
|
||||
switch ( nStyle )
|
||||
{
|
||||
// No line: no width
|
||||
case NONE:
|
||||
case css::table::BorderLineStyle::NONE:
|
||||
aImpl = BorderWidthImpl( 0, 0.0 );
|
||||
break;
|
||||
|
||||
@ -431,7 +431,7 @@ void SvxBorderLine::ScaleMetrics( long nMult, long nDiv )
|
||||
|
||||
void SvxBorderLine::GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sal_uInt16 nIn, sal_uInt16 nDist )
|
||||
{
|
||||
if (NONE == nStyle)
|
||||
if (css::table::BorderLineStyle::NONE == nStyle)
|
||||
{
|
||||
nStyle = SOLID;
|
||||
if ( nOut > 0 && nIn > 0 )
|
||||
@ -454,7 +454,7 @@ void SvxBorderLine::GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sa
|
||||
|
||||
static size_t const len = SAL_N_ELEMENTS(aDoubleStyles);
|
||||
long nWidth = 0;
|
||||
SvxBorderStyle nTestStyle(NONE);
|
||||
SvxBorderStyle nTestStyle(css::table::BorderLineStyle::NONE);
|
||||
for (size_t i = 0; i < len && nWidth == 0; ++i)
|
||||
{
|
||||
nTestStyle = aDoubleStyles[i];
|
||||
|
@ -118,7 +118,7 @@ namespace
|
||||
SvxBorderLine CreateBorderLine(SvStream &stream, sal_uInt16 version)
|
||||
{
|
||||
sal_uInt16 nOutline, nInline, nDistance;
|
||||
sal_uInt16 nStyle = NONE;
|
||||
sal_uInt16 nStyle = css::table::BorderLineStyle::NONE;
|
||||
Color aColor;
|
||||
ReadColor( stream, aColor ).ReadUInt16( nOutline ).ReadUInt16( nInline ).ReadUInt16( nDistance );
|
||||
|
||||
@ -1905,7 +1905,7 @@ bool SvxBoxItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
|
||||
{
|
||||
drawing::LineStyle eDrawingStyle;
|
||||
rVal >>= eDrawingStyle;
|
||||
editeng::SvxBorderStyle eBorderStyle = NONE;
|
||||
editeng::SvxBorderStyle eBorderStyle = css::table::BorderLineStyle::NONE;
|
||||
switch ( eDrawingStyle )
|
||||
{
|
||||
default:
|
||||
@ -2643,7 +2643,7 @@ SfxPoolItem* SvxBoxInfoItem::Create( SvStream& rStrm, sal_uInt16 ) const
|
||||
Color aColor;
|
||||
ReadColor( rStrm, aColor ).ReadInt16( nOutline ).ReadInt16( nInline ).ReadInt16( nDistance );
|
||||
SvxBorderLine aBorder( &aColor );
|
||||
aBorder.GuessLinesWidths(NONE, nOutline, nInline, nDistance);
|
||||
aBorder.GuessLinesWidths(css::table::BorderLineStyle::NONE, nOutline, nInline, nDistance);
|
||||
|
||||
switch( cLine )
|
||||
{
|
||||
@ -3239,7 +3239,7 @@ SfxPoolItem* SvxLineItem::Create( SvStream& rStrm, sal_uInt16 ) const
|
||||
if( nOutline )
|
||||
{
|
||||
SvxBorderLine aLine( &aColor );
|
||||
aLine.GuessLinesWidths(NONE, nOutline, nInline, nDistance);
|
||||
aLine.GuessLinesWidths(css::table::BorderLineStyle::NONE, nOutline, nInline, nDistance);
|
||||
_pLine->SetLine( &aLine );
|
||||
}
|
||||
return _pLine;
|
||||
|
@ -328,7 +328,7 @@ namespace editeng
|
||||
|
||||
sal_Int32 nLength = m_sCurrentPortion.getLength() - nStartSearch;
|
||||
m_nCurrentConversionType = implGetConversionType();
|
||||
m_nCurrentConversionOption = IsByCharacter() ? CHARACTER_BY_CHARACTER : NONE;
|
||||
m_nCurrentConversionOption = IsByCharacter() ? CHARACTER_BY_CHARACTER : css::i18n::TextConversionOption::NONE;
|
||||
if( m_bIgnorePostPositionalWord )
|
||||
m_nCurrentConversionOption = m_nCurrentConversionOption | IGNORE_POST_POSITIONAL_WORD;
|
||||
|
||||
|
@ -498,7 +498,7 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon
|
||||
if( !nLen )
|
||||
return;
|
||||
|
||||
const bool bRTL = (mpVDev->GetLayoutMode() & TEXT_LAYOUT_BIDI_RTL) != 0;
|
||||
const bool bRTL = bool(mpVDev->GetLayoutMode() & TEXT_LAYOUT_BIDI_RTL);
|
||||
|
||||
sal_Int16 nScriptType = ScriptType::LATIN;
|
||||
Reference < XBreakIterator > xBI( Impl_GetBreakIterator() );
|
||||
|
@ -453,7 +453,7 @@ void MakePreview(sal_uInt8* pBuf, sal_uInt32 nBytesRead,
|
||||
aFont.SetColor( COL_LIGHTRED );
|
||||
// aFont.SetSize( Size( 0, 32 ) );
|
||||
|
||||
aVDev.Push( PUSH_FONT );
|
||||
aVDev.Push( PushFlags::FONT );
|
||||
aVDev.SetFont( aFont );
|
||||
|
||||
Rectangle aRect( Point( 1, 1 ), Size( nWidth - 2, nHeight - 2 ) );
|
||||
|
@ -483,7 +483,7 @@ void OS2METReader::DrawPolygon( const Polygon& rPolygon )
|
||||
{
|
||||
if ( IsLineInfo() )
|
||||
{
|
||||
pVirDev->Push( PUSH_LINECOLOR );
|
||||
pVirDev->Push( PushFlags::LINECOLOR );
|
||||
pVirDev->SetLineColor( COL_TRANSPARENT );
|
||||
pVirDev->DrawPolygon( rPolygon );
|
||||
pVirDev->Pop();
|
||||
@ -497,7 +497,7 @@ void OS2METReader::DrawPolyPolygon( const tools::PolyPolygon& rPolyPolygon )
|
||||
{
|
||||
if ( IsLineInfo() )
|
||||
{
|
||||
pVirDev->Push( PUSH_LINECOLOR );
|
||||
pVirDev->Push( PushFlags::LINECOLOR );
|
||||
pVirDev->SetLineColor( COL_TRANSPARENT );
|
||||
pVirDev->DrawPolyPolygon( rPolyPolygon );
|
||||
pVirDev->Pop();
|
||||
@ -939,7 +939,7 @@ void OS2METReader::ReadBox(bool bGivenPos)
|
||||
Polygon aPolygon( aBoxRect, nHRound, nVRound );
|
||||
if ( nFlags & 0x40 )
|
||||
{
|
||||
pVirDev->Push( PUSH_LINECOLOR );
|
||||
pVirDev->Push( PushFlags::LINECOLOR );
|
||||
pVirDev->SetLineColor( COL_TRANSPARENT );
|
||||
pVirDev->DrawRect( aBoxRect, nHRound, nVRound );
|
||||
pVirDev->Pop();
|
||||
|
@ -1060,7 +1060,7 @@ void PDFExport::ImplWriteWatermark( PDFWriter& rWriter, const Size& rPageSize )
|
||||
|
||||
// adjust font height for text to fit
|
||||
OutputDevice* pDev = rWriter.GetReferenceDevice();
|
||||
pDev->Push( PUSH_ALL );
|
||||
pDev->Push( PushFlags::ALL );
|
||||
pDev->SetFont( aFont );
|
||||
pDev->SetMapMode( MapMode( MAP_POINT ) );
|
||||
int w = 0;
|
||||
@ -1082,7 +1082,7 @@ void PDFExport::ImplWriteWatermark( PDFWriter& rWriter, const Size& rPageSize )
|
||||
nTextHeight += nTextHeight/20;
|
||||
pDev->Pop();
|
||||
|
||||
rWriter.Push( PUSH_ALL );
|
||||
rWriter.Push( PushFlags::ALL );
|
||||
rWriter.SetMapMode( MapMode( MAP_POINT ) );
|
||||
rWriter.SetFont( aFont );
|
||||
rWriter.SetTextColor( COL_LIGHTGREEN );
|
||||
|
@ -461,7 +461,7 @@ namespace frm
|
||||
long nFontWidth = m_pEngine->GetStandardFont(0).GetSize().Width();
|
||||
if ( !nFontWidth )
|
||||
{
|
||||
m_pViewport->Push( PUSH_FONT );
|
||||
m_pViewport->Push( PushFlags::FONT );
|
||||
m_pViewport->SetFont( m_pEngine->GetStandardFont(0) );
|
||||
nFontWidth = m_pViewport->GetTextWidth( "x" );
|
||||
m_pViewport->Pop();
|
||||
@ -576,7 +576,7 @@ namespace frm
|
||||
{
|
||||
// need to normalize the map mode of the device - every paint operation on any device needs
|
||||
// to use the same map mode
|
||||
_pDev->Push( PUSH_MAPMODE | PUSH_LINECOLOR | PUSH_FILLCOLOR );
|
||||
_pDev->Push( PushFlags::MAPMODE | PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
|
||||
|
||||
// enforce our "normalize map mode" on the device
|
||||
MapMode aRefMapMode( m_pEngine->GetRefDevice()->GetMapMode() );
|
||||
|
208
include/o3tl/typed_flags_set.hxx
Normal file
208
include/o3tl/typed_flags_set.hxx
Normal file
@ -0,0 +1,208 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/*
|
||||
* This file is part of the LibreOffice project.
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* This file incorporates work covered by the following license notice:
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed
|
||||
* with this work for additional information regarding copyright
|
||||
* ownership. The ASF licenses this file to you under the Apache
|
||||
* License, Version 2.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
#ifndef INCLUDED_O3TL_TYPED_FLAGS_SET_HXX
|
||||
#define INCLUDED_O3TL_TYPED_FLAGS_SET_HXX
|
||||
|
||||
#include <sal/config.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <type_traits>
|
||||
|
||||
namespace o3tl {
|
||||
|
||||
template<typename T> struct typed_flags {};
|
||||
|
||||
/// Mark a (scoped) enumeration as a set of bit flags, with accompanying
|
||||
/// operations.
|
||||
///
|
||||
/// template<>
|
||||
/// struct o3tl::typed_flags<TheE>: o3tl::is_typed_flags<TheE, TheM> {};
|
||||
///
|
||||
/// All relevant values must be non-negative. (Typically, the enumeration's
|
||||
/// underlying type will either be fixed and unsigned, or it will be unfixed---
|
||||
/// and can thus default to a signed type---and all enumerators will have non-
|
||||
/// negative values.)
|
||||
///
|
||||
/// \param E the enumeration type.
|
||||
/// \param M the all-bits-set value for the bit flags.
|
||||
template<typename E, typename std::underlying_type<E>::type M>
|
||||
struct is_typed_flags {
|
||||
static_assert(
|
||||
M >= 0, "is_typed_flags expects only non-negative bit values");
|
||||
|
||||
class Self {
|
||||
public:
|
||||
explicit Self(typename std::underlying_type<E>::type value):
|
||||
value_(value)
|
||||
{ assert(value >= 0); }
|
||||
|
||||
operator E() { return static_cast<E>(value_); }
|
||||
|
||||
#if !defined _MSC_VER || _MSC_VER > 1700
|
||||
explicit
|
||||
#endif
|
||||
operator typename std::underlying_type<E>::type() { return value_; }
|
||||
|
||||
#if !defined _MSC_VER || _MSC_VER > 1700
|
||||
explicit
|
||||
#endif
|
||||
operator bool() { return value_ != 0; }
|
||||
|
||||
private:
|
||||
typename std::underlying_type<E>::type value_;
|
||||
};
|
||||
|
||||
static typename std::underlying_type<E>::type const mask = M;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
template<typename E>
|
||||
inline typename o3tl::typed_flags<E>::Self operator ~(E rhs) {
|
||||
assert(static_cast<typename std::underlying_type<E>::type>(rhs) >= 0);
|
||||
return static_cast<typename o3tl::typed_flags<E>::Self>(
|
||||
o3tl::typed_flags<E>::mask
|
||||
& ~static_cast<typename std::underlying_type<E>::type>(rhs));
|
||||
}
|
||||
|
||||
template<typename E>
|
||||
inline typename o3tl::typed_flags<E>::Self operator ~(
|
||||
typename o3tl::typed_flags<E>::Self rhs)
|
||||
{
|
||||
return static_cast<typename o3tl::typed_flags<E>::Self>(
|
||||
o3tl::typed_flags<E>::mask
|
||||
& ~static_cast<typename std::underlying_type<E>::type>(rhs));
|
||||
}
|
||||
|
||||
template<typename E>
|
||||
inline typename o3tl::typed_flags<E>::Self operator &(E lhs, E rhs) {
|
||||
assert(static_cast<typename std::underlying_type<E>::type>(lhs) >= 0);
|
||||
assert(static_cast<typename std::underlying_type<E>::type>(rhs) >= 0);
|
||||
return static_cast<typename o3tl::typed_flags<E>::Self>(
|
||||
static_cast<typename std::underlying_type<E>::type>(lhs)
|
||||
& static_cast<typename std::underlying_type<E>::type>(rhs));
|
||||
}
|
||||
|
||||
template<typename E>
|
||||
inline typename o3tl::typed_flags<E>::Self operator &(
|
||||
E lhs, typename o3tl::typed_flags<E>::Self rhs)
|
||||
{
|
||||
assert(static_cast<typename std::underlying_type<E>::type>(lhs) >= 0);
|
||||
return static_cast<typename o3tl::typed_flags<E>::Self>(
|
||||
static_cast<typename std::underlying_type<E>::type>(lhs)
|
||||
& static_cast<typename std::underlying_type<E>::type>(rhs));
|
||||
}
|
||||
|
||||
template<typename E>
|
||||
inline typename o3tl::typed_flags<E>::Self operator &(
|
||||
typename o3tl::typed_flags<E>::Self lhs, E rhs)
|
||||
{
|
||||
assert(static_cast<typename std::underlying_type<E>::type>(rhs) >= 0);
|
||||
return static_cast<typename o3tl::typed_flags<E>::Self>(
|
||||
static_cast<typename std::underlying_type<E>::type>(lhs)
|
||||
& static_cast<typename std::underlying_type<E>::type>(rhs));
|
||||
}
|
||||
|
||||
template<typename E>
|
||||
inline typename o3tl::typed_flags<E>::Self operator &(
|
||||
typename o3tl::typed_flags<E>::Self lhs,
|
||||
typename o3tl::typed_flags<E>::Self rhs)
|
||||
{
|
||||
return static_cast<typename o3tl::typed_flags<E>::Self>(
|
||||
static_cast<typename std::underlying_type<E>::type>(lhs)
|
||||
& static_cast<typename std::underlying_type<E>::type>(rhs));
|
||||
}
|
||||
|
||||
template<typename E>
|
||||
inline typename o3tl::typed_flags<E>::Self operator |(E lhs, E rhs) {
|
||||
assert(static_cast<typename std::underlying_type<E>::type>(lhs) >= 0);
|
||||
assert(static_cast<typename std::underlying_type<E>::type>(rhs) >= 0);
|
||||
return static_cast<typename o3tl::typed_flags<E>::Self>(
|
||||
static_cast<typename std::underlying_type<E>::type>(lhs)
|
||||
| static_cast<typename std::underlying_type<E>::type>(rhs));
|
||||
}
|
||||
|
||||
template<typename E>
|
||||
inline typename o3tl::typed_flags<E>::Self operator |(
|
||||
E lhs, typename o3tl::typed_flags<E>::Self rhs)
|
||||
{
|
||||
assert(static_cast<typename std::underlying_type<E>::type>(lhs) >= 0);
|
||||
return static_cast<typename o3tl::typed_flags<E>::Self>(
|
||||
static_cast<typename std::underlying_type<E>::type>(lhs)
|
||||
| static_cast<typename std::underlying_type<E>::type>(rhs));
|
||||
}
|
||||
|
||||
template<typename E>
|
||||
inline typename o3tl::typed_flags<E>::Self operator |(
|
||||
typename o3tl::typed_flags<E>::Self lhs, E rhs)
|
||||
{
|
||||
assert(static_cast<typename std::underlying_type<E>::type>(rhs) >= 0);
|
||||
return static_cast<typename o3tl::typed_flags<E>::Self>(
|
||||
static_cast<typename std::underlying_type<E>::type>(lhs)
|
||||
| static_cast<typename std::underlying_type<E>::type>(rhs));
|
||||
}
|
||||
|
||||
template<typename E>
|
||||
inline typename o3tl::typed_flags<E>::Self operator |(
|
||||
typename o3tl::typed_flags<E>::Self lhs,
|
||||
typename o3tl::typed_flags<E>::Self rhs)
|
||||
{
|
||||
return static_cast<typename o3tl::typed_flags<E>::Self>(
|
||||
static_cast<typename std::underlying_type<E>::type>(lhs)
|
||||
| static_cast<typename std::underlying_type<E>::type>(rhs));
|
||||
}
|
||||
|
||||
template<typename E>
|
||||
inline typename o3tl::typed_flags<E>::Self operator &=(E & lhs, E rhs) {
|
||||
assert(static_cast<typename std::underlying_type<E>::type>(lhs) >= 0);
|
||||
assert(static_cast<typename std::underlying_type<E>::type>(rhs) >= 0);
|
||||
lhs = lhs & rhs;
|
||||
return lhs;
|
||||
}
|
||||
|
||||
template<typename E>
|
||||
inline typename o3tl::typed_flags<E>::Self operator &=(
|
||||
E & lhs, typename o3tl::typed_flags<E>::Self rhs)
|
||||
{
|
||||
assert(static_cast<typename std::underlying_type<E>::type>(lhs) >= 0);
|
||||
lhs = lhs & rhs;
|
||||
return lhs;
|
||||
}
|
||||
|
||||
template<typename E>
|
||||
inline typename o3tl::typed_flags<E>::Self operator |=(E & lhs, E rhs) {
|
||||
assert(static_cast<typename std::underlying_type<E>::type>(lhs) >= 0);
|
||||
assert(static_cast<typename std::underlying_type<E>::type>(rhs) >= 0);
|
||||
lhs = lhs | rhs;
|
||||
return lhs;
|
||||
}
|
||||
|
||||
template<typename E>
|
||||
inline typename o3tl::typed_flags<E>::Self operator |=(
|
||||
E & lhs, typename o3tl::typed_flags<E>::Self rhs)
|
||||
{
|
||||
assert(static_cast<typename std::underlying_type<E>::type>(lhs) >= 0);
|
||||
lhs = lhs | rhs;
|
||||
return lhs;
|
||||
}
|
||||
|
||||
#endif /* INCLUDED_O3TL_TYPED_FLAGS_SET_HXX */
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
@ -537,7 +537,7 @@ private:
|
||||
|
||||
public:
|
||||
|
||||
void Push( PushFlags nFlags = PUSH_ALL );
|
||||
void Push( PushFlags nFlags = PushFlags::ALL );
|
||||
void Pop();
|
||||
|
||||
// returns the current stack depth; that is the number of Push() calls minus the number of Pop() calls
|
||||
|
@ -30,38 +30,35 @@
|
||||
#include <tools/gen.hxx>
|
||||
#include <tools/color.hxx>
|
||||
#include <tools/fontenum.hxx>
|
||||
#include <o3tl/typed_flags_set.hxx>
|
||||
|
||||
// Flags for OutputDevice::Push() and OutDevState
|
||||
enum PushFlags {
|
||||
PUSH_NONE = ((sal_uInt16)0x0000),
|
||||
PUSH_LINECOLOR = ((sal_uInt16)0x0001),
|
||||
PUSH_FILLCOLOR = ((sal_uInt16)0x0002),
|
||||
PUSH_FONT = ((sal_uInt16)0x0004),
|
||||
PUSH_TEXTCOLOR = ((sal_uInt16)0x0008),
|
||||
PUSH_MAPMODE = ((sal_uInt16)0x0010),
|
||||
PUSH_CLIPREGION = ((sal_uInt16)0x0020),
|
||||
PUSH_RASTEROP = ((sal_uInt16)0x0040),
|
||||
PUSH_TEXTFILLCOLOR = ((sal_uInt16)0x0080),
|
||||
PUSH_TEXTALIGN = ((sal_uInt16)0x0100),
|
||||
PUSH_REFPOINT = ((sal_uInt16)0x0200),
|
||||
PUSH_TEXTLINECOLOR = ((sal_uInt16)0x0400),
|
||||
PUSH_TEXTLAYOUTMODE = ((sal_uInt16)0x0800),
|
||||
PUSH_TEXTLANGUAGE = ((sal_uInt16)0x1000),
|
||||
PUSH_OVERLINECOLOR = ((sal_uInt16)0x2000),
|
||||
PUSH_ALL = ((sal_uInt16)0xFFFF)
|
||||
};
|
||||
// make combining these type-safe
|
||||
inline PushFlags operator| (PushFlags lhs, PushFlags rhs)
|
||||
{
|
||||
return static_cast<PushFlags>(static_cast<sal_uInt16>(lhs) | static_cast<sal_uInt16>(rhs));
|
||||
}
|
||||
inline PushFlags operator& (PushFlags lhs, PushFlags rhs)
|
||||
{
|
||||
return static_cast<PushFlags>(static_cast<sal_uInt16>(lhs) & static_cast<sal_uInt16>(rhs));
|
||||
}
|
||||
enum class PushFlags : sal_uInt16 {
|
||||
NONE = 0x0000,
|
||||
LINECOLOR = 0x0001,
|
||||
FILLCOLOR = 0x0002,
|
||||
FONT = 0x0004,
|
||||
TEXTCOLOR = 0x0008,
|
||||
MAPMODE = 0x0010,
|
||||
CLIPREGION = 0x0020,
|
||||
RASTEROP = 0x0040,
|
||||
TEXTFILLCOLOR = 0x0080,
|
||||
TEXTALIGN = 0x0100,
|
||||
REFPOINT = 0x0200,
|
||||
TEXTLINECOLOR = 0x0400,
|
||||
TEXTLAYOUTMODE = 0x0800,
|
||||
TEXTLANGUAGE = 0x1000,
|
||||
OVERLINECOLOR = 0x2000,
|
||||
ALL = 0xFFFF
|
||||
|
||||
//bool operator bool() { return static_cast<sal_uInt16>(*this) != 0; }
|
||||
};
|
||||
template<>
|
||||
struct o3tl::typed_flags<PushFlags>: o3tl::is_typed_flags<PushFlags, 0xFFFF> {};
|
||||
#define PUSH_ALLTEXT (PushFlags::TEXTCOLOR | PushFlags::TEXTFILLCOLOR | PushFlags::TEXTLINECOLOR | PushFlags::OVERLINECOLOR | PushFlags::TEXTALIGN | PushFlags::TEXTLAYOUTMODE | PushFlags::TEXTLANGUAGE)
|
||||
#define PUSH_ALLFONT (PUSH_ALLTEXT | PushFlags::FONT)
|
||||
|
||||
|
||||
#define PUSH_ALLTEXT (PUSH_TEXTCOLOR | PUSH_TEXTFILLCOLOR | PUSH_TEXTLINECOLOR | PUSH_OVERLINECOLOR | PUSH_TEXTALIGN | PUSH_TEXTLAYOUTMODE | PUSH_TEXTLANGUAGE)
|
||||
#define PUSH_ALLFONT (PUSH_ALLTEXT | PUSH_FONT)
|
||||
|
||||
// LayoutModes for Complex Text Layout
|
||||
// These are flag values, i.e they can be combined
|
||||
@ -101,6 +98,8 @@ inline ComplexTextLayoutMode& operator&= (ComplexTextLayoutMode& lhs, ComplexTex
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
class OutDevState
|
||||
{
|
||||
public:
|
||||
@ -108,7 +107,7 @@ public:
|
||||
|
||||
MapMode* mpMapMode;
|
||||
bool mbMapActive;
|
||||
vcl::Region* mpClipRegion;
|
||||
vcl::Region* mpClipRegion;
|
||||
Color* mpLineColor;
|
||||
Color* mpFillColor;
|
||||
vcl::Font* mpFont;
|
||||
|
@ -729,7 +729,7 @@ The following structure describes the permissions used in PDF security
|
||||
|
||||
/* functions for graphics state */
|
||||
/* flag values: see vcl/outdev.hxx */
|
||||
void Push( PushFlags nFlags = PUSH_ALL );
|
||||
void Push( PushFlags nFlags = PushFlags::ALL );
|
||||
void Pop();
|
||||
|
||||
void SetClipRegion();
|
||||
|
@ -33,20 +33,20 @@ namespace rptui
|
||||
ColorChanger( OutputDevice* _pDev, const Color& _rNewLineColor)
|
||||
:m_pDev( _pDev )
|
||||
{
|
||||
m_pDev->Push( PUSH_LINECOLOR );
|
||||
m_pDev->Push( PushFlags::LINECOLOR );
|
||||
m_pDev->SetLineColor( _rNewLineColor );
|
||||
}
|
||||
ColorChanger( OutputDevice* _pDev, const Color& _rNewLineColor, const Color& _rNewFillColor )
|
||||
:m_pDev( _pDev )
|
||||
{
|
||||
m_pDev->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
|
||||
m_pDev->Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
|
||||
m_pDev->SetLineColor( _rNewLineColor );
|
||||
m_pDev->SetFillColor( _rNewFillColor );
|
||||
}
|
||||
ColorChanger( OutputDevice* _pDev, const Color& _rNewLineColor, const Color& _rNewFillColor, const Color& _rNewTextColor )
|
||||
:m_pDev( _pDev )
|
||||
{
|
||||
m_pDev->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR | PUSH_TEXTCOLOR);
|
||||
m_pDev->Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR | PushFlags::TEXTCOLOR);
|
||||
m_pDev->SetLineColor( _rNewLineColor );
|
||||
m_pDev->SetFillColor( _rNewFillColor );
|
||||
m_pDev->SetTextColor( _rNewTextColor );
|
||||
|
@ -3089,7 +3089,7 @@ namespace {
|
||||
sal_Int32 lclGetApiTickmarks( sal_uInt8 nXclTickPos )
|
||||
{
|
||||
using namespace ::com::sun::star::chart2::TickmarkStyle;
|
||||
sal_Int32 nApiTickmarks = NONE;
|
||||
sal_Int32 nApiTickmarks = css::chart2::TickmarkStyle::NONE;
|
||||
::set_flag( nApiTickmarks, INNER, ::get_flag( nXclTickPos, EXC_CHTICK_INSIDE ) );
|
||||
::set_flag( nApiTickmarks, OUTER, ::get_flag( nXclTickPos, EXC_CHTICK_OUTSIDE ) );
|
||||
return nApiTickmarks;
|
||||
|
@ -377,7 +377,7 @@ void ScMenuFloatingWindow::drawSeparator(size_t nPos)
|
||||
|
||||
if (IsNativeControlSupported(CTRL_MENU_POPUP, PART_ENTIRE_CONTROL))
|
||||
{
|
||||
Push(PUSH_CLIPREGION);
|
||||
Push(PushFlags::CLIPREGION);
|
||||
IntersectClipRegion(aRegion);
|
||||
Rectangle aCtrlRect(Point(0,0), GetOutputSizePixel());
|
||||
DrawNativeControl(
|
||||
@ -667,7 +667,7 @@ void ScMenuFloatingWindow::highlightMenuItem(size_t nPos, bool bSelected)
|
||||
|
||||
if (IsNativeControlSupported(CTRL_MENU_POPUP, PART_ENTIRE_CONTROL))
|
||||
{
|
||||
Push(PUSH_CLIPREGION);
|
||||
Push(PushFlags::CLIPREGION);
|
||||
IntersectClipRegion(Rectangle(aPos, aSize));
|
||||
Rectangle aCtrlRect(Point(0,0), GetOutputSizePixel());
|
||||
DrawNativeControl(
|
||||
|
@ -136,7 +136,7 @@ void ScDPFieldButton::draw()
|
||||
aTextPos.setX(maPos.getX() + 2); // 2 = Margin
|
||||
aTextPos.setY(maPos.getY() + (maSize.Height()-nTHeight)/2);
|
||||
|
||||
mpOutDev->Push(PUSH_CLIPREGION);
|
||||
mpOutDev->Push(PushFlags::CLIPREGION);
|
||||
mpOutDev->IntersectClipRegion(aRect);
|
||||
mpOutDev->DrawText(aTextPos, maText);
|
||||
mpOutDev->Pop();
|
||||
|
@ -250,7 +250,7 @@ sal_Int32 ScCsvControl::GetLineFromY( sal_Int32 nY ) const
|
||||
|
||||
void ScCsvControl::ImplInvertRect( OutputDevice& rOutDev, const Rectangle& rRect )
|
||||
{
|
||||
rOutDev.Push( PUSH_LINECOLOR | PUSH_FILLCOLOR | PUSH_RASTEROP );
|
||||
rOutDev.Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR | PushFlags::RASTEROP );
|
||||
rOutDev.SetLineColor( Color( COL_BLACK ) );
|
||||
rOutDev.SetFillColor( Color( COL_BLACK ) );
|
||||
rOutDev.SetRasterOp( ROP_INVERT );
|
||||
|
@ -375,7 +375,7 @@ void ScAutoFmtPreview::DrawBackground()
|
||||
const SvxBrushItem* pItem = static_cast< const SvxBrushItem* >(
|
||||
pCurData->GetItem( GetFormatIndex( nCol, nRow ), ATTR_BACKGROUND ) );
|
||||
|
||||
aVD.Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
|
||||
aVD.Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
|
||||
aVD.SetLineColor();
|
||||
aVD.SetFillColor( pItem->GetColor() );
|
||||
aVD.DrawRect( maArray.GetCellRect( nCol, nRow ) );
|
||||
|
@ -356,7 +356,7 @@ void BackingWindow::Paint( const Rectangle& )
|
||||
|
||||
aClip.Exclude( maStartCentButtons );
|
||||
|
||||
Push( PUSH_CLIPREGION );
|
||||
Push( PushFlags::CLIPREGION );
|
||||
IntersectClipRegion( aClip );
|
||||
DrawWallpaper( Rectangle( Point( 0, 0 ), GetOutputSizePixel() ), aBack );
|
||||
Pop();
|
||||
|
@ -162,7 +162,7 @@ namespace sfx2
|
||||
|
||||
SfxDockingWindow::Paint( i_rArea );
|
||||
|
||||
Push( PUSH_FONT | PUSH_FILLCOLOR | PUSH_LINECOLOR );
|
||||
Push( PushFlags::FONT | PushFlags::FILLCOLOR | PushFlags::LINECOLOR );
|
||||
|
||||
SetFillColor( GetSettings().GetStyleSettings().GetDialogColor() );
|
||||
SetLineColor();
|
||||
|
@ -157,7 +157,7 @@ css::uno::Reference<css::accessibility::XAccessible> TitleBar::CreateAccessible
|
||||
|
||||
void TitleBar::PaintTitle (const Rectangle& rTitleBox)
|
||||
{
|
||||
Push(PUSH_FONT | PUSH_TEXTCOLOR);
|
||||
Push(PushFlags::FONT | PushFlags::TEXTCOLOR);
|
||||
|
||||
Rectangle aTitleBox (rTitleBox);
|
||||
|
||||
@ -192,7 +192,7 @@ void TitleBar::PaintTitle (const Rectangle& rTitleBox)
|
||||
|
||||
void TitleBar::PaintFocus (const Rectangle& rFocusBox)
|
||||
{
|
||||
Push(PUSH_FONT | PUSH_TEXTCOLOR);
|
||||
Push(PushFlags::FONT | PushFlags::TEXTCOLOR);
|
||||
|
||||
vcl::Font aFont(GetFont());
|
||||
aFont.SetWeight(WEIGHT_BOLD);
|
||||
|
@ -1062,7 +1062,7 @@ Point SmShowSymbolSetWindow::OffsetPoint(const Point &rPoint) const
|
||||
|
||||
void SmShowSymbolSetWindow::Paint(const Rectangle&)
|
||||
{
|
||||
Push(PUSH_MAPMODE);
|
||||
Push(PushFlags::MAPMODE);
|
||||
|
||||
// set MapUnit for which 'nLen' has been calculated
|
||||
SetMapMode(MapMode(MAP_PIXEL));
|
||||
|
@ -507,7 +507,7 @@ SmPrinterAccess::SmPrinterAccess( SmDocShell &rDocShell )
|
||||
{
|
||||
if ( 0 != (pPrinter = rDocShell.GetPrt()) )
|
||||
{
|
||||
pPrinter->Push( PUSH_MAPMODE );
|
||||
pPrinter->Push( PushFlags::MAPMODE );
|
||||
if ( SFX_CREATE_MODE_EMBEDDED == rDocShell.GetCreateMode() )
|
||||
{
|
||||
// if it is an embedded object (without it's own printer)
|
||||
@ -532,7 +532,7 @@ SmPrinterAccess::SmPrinterAccess( SmDocShell &rDocShell )
|
||||
}
|
||||
if ( 0 != (pRefDev = rDocShell.GetRefDev()) && pPrinter != pRefDev )
|
||||
{
|
||||
pRefDev->Push( PUSH_MAPMODE );
|
||||
pRefDev->Push( PushFlags::MAPMODE );
|
||||
if ( SFX_CREATE_MODE_EMBEDDED == rDocShell.GetCreateMode() )
|
||||
{
|
||||
// if it is an embedded object (without it's own printer)
|
||||
|
@ -2675,7 +2675,7 @@ void SmMathSymbolNode::AdaptToY(const OutputDevice &rDev, sal_uLong nHeight)
|
||||
if (aFntSize.Width() == 0)
|
||||
{
|
||||
OutputDevice &rDevNC = (OutputDevice &) rDev;
|
||||
rDevNC.Push(PUSH_FONT | PUSH_MAPMODE);
|
||||
rDevNC.Push(PushFlags::FONT | PushFlags::MAPMODE);
|
||||
rDevNC.SetFont(GetFont());
|
||||
aFntSize.Width() = rDev.GetFontMetric().GetSize().Width();
|
||||
rDevNC.Pop();
|
||||
|
@ -154,7 +154,7 @@ void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat,
|
||||
{
|
||||
OutputDevice *pWindow = Application::GetDefaultDevice();
|
||||
|
||||
pWindow->Push(PUSH_MAPMODE | PUSH_FONT);
|
||||
pWindow->Push(PushFlags::MAPMODE | PushFlags::FONT);
|
||||
|
||||
pWindow->SetMapMode(rDev.GetMapMode());
|
||||
pWindow->SetFont(rDev.GetFontMetric());
|
||||
@ -618,7 +618,7 @@ bool SmGetGlyphBoundRect(const OutputDevice &rDev,
|
||||
|
||||
const FontMetric aDevFM (rDev.GetFontMetric());
|
||||
|
||||
pGlyphDev->Push(PUSH_FONT | PUSH_MAPMODE);
|
||||
pGlyphDev->Push(PushFlags::FONT | PushFlags::MAPMODE);
|
||||
vcl::Font aFnt(rDev.GetFont());
|
||||
aFnt.SetAlign(ALIGN_TOP);
|
||||
|
||||
|
@ -33,8 +33,8 @@
|
||||
SmTmpDevice::SmTmpDevice(OutputDevice &rTheDev, bool bUseMap100th_mm) :
|
||||
rOutDev(rTheDev)
|
||||
{
|
||||
rOutDev.Push( PUSH_FONT | PUSH_MAPMODE |
|
||||
PUSH_LINECOLOR | PUSH_FILLCOLOR | PUSH_TEXTCOLOR );
|
||||
rOutDev.Push( PushFlags::FONT | PushFlags::MAPMODE |
|
||||
PushFlags::LINECOLOR | PushFlags::FILLCOLOR | PushFlags::TEXTCOLOR );
|
||||
if (bUseMap100th_mm && MAP_100TH_MM != rOutDev.GetMapMode().GetMapUnit())
|
||||
{
|
||||
SAL_WARN("starmath", "incorrect MapMode?");
|
||||
|
@ -359,7 +359,7 @@ SmCaretDrawingVisitor::SmCaretDrawingVisitor( OutputDevice& rDevice,
|
||||
return;
|
||||
|
||||
//Save device state
|
||||
rDev.Push( PUSH_FONT | PUSH_MAPMODE | PUSH_LINECOLOR | PUSH_FILLCOLOR | PUSH_TEXTCOLOR );
|
||||
rDev.Push( PushFlags::FONT | PushFlags::MAPMODE | PushFlags::LINECOLOR | PushFlags::FILLCOLOR | PushFlags::TEXTCOLOR );
|
||||
|
||||
pos.pSelectedNode->Accept( this );
|
||||
//Restore device state
|
||||
@ -433,7 +433,7 @@ void SmCaretDrawingVisitor::DefaultVisit( SmNode* pNode )
|
||||
void SmCaretPos2LineVisitor::Visit( SmTextNode* pNode )
|
||||
{
|
||||
//Save device state
|
||||
pDev->Push( PUSH_FONT | PUSH_TEXTCOLOR );
|
||||
pDev->Push( PushFlags::FONT | PushFlags::TEXTCOLOR );
|
||||
|
||||
long i = pos.Index;
|
||||
|
||||
@ -2070,7 +2070,7 @@ SmSelectionDrawingVisitor::SmSelectionDrawingVisitor( OutputDevice& rDevice, SmN
|
||||
aSelectionArea.Move( Offset.X( ), Offset.Y( ) );
|
||||
|
||||
//Save device state
|
||||
rDev.Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
|
||||
rDev.Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
|
||||
//Change colors
|
||||
rDev.SetLineColor( );
|
||||
rDev.SetFillColor( Color( COL_LIGHTGRAY ) );
|
||||
@ -2109,7 +2109,7 @@ void SmSelectionDrawingVisitor::VisitChildren( SmNode* pNode )
|
||||
void SmSelectionDrawingVisitor::Visit( SmTextNode* pNode )
|
||||
{
|
||||
if( pNode->IsSelected( ) ){
|
||||
rDev.Push( PUSH_TEXTCOLOR | PUSH_FONT );
|
||||
rDev.Push( PushFlags::TEXTCOLOR | PushFlags::FONT );
|
||||
|
||||
rDev.SetFont( pNode->GetFont( ) );
|
||||
Point Position = pNode->GetTopLeft( );
|
||||
|
@ -805,7 +805,7 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
|
||||
pFirstCol->Title(), false, false, !IsEnabled());
|
||||
aButtonFrame.Draw( *pDev );
|
||||
|
||||
pDev->Push( PUSH_LINECOLOR );
|
||||
pDev->Push( PushFlags::LINECOLOR );
|
||||
pDev->SetLineColor( Color( COL_BLACK ) );
|
||||
|
||||
pDev->DrawLine( Point( aRealPos.X(), aRealPos.Y() + nTitleHeight-1 ),
|
||||
@ -1018,7 +1018,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, bool
|
||||
{
|
||||
// draw horizontal delimitation lines
|
||||
_rOut.SetClipRegion();
|
||||
_rOut.Push( PUSH_LINECOLOR );
|
||||
_rOut.Push( PushFlags::LINECOLOR );
|
||||
_rOut.SetLineColor( aDelimiterLineColor );
|
||||
long nY = aPos.Y() + nDataRowHeigt - 1;
|
||||
if (nY <= aOverallAreaBRPos.Y())
|
||||
|
@ -502,7 +502,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
|
||||
{
|
||||
if( aSelectionTextColor != Color( COL_TRANSPARENT ) )
|
||||
{
|
||||
pDev->Push( PUSH_TEXTCOLOR );
|
||||
pDev->Push( PushFlags::TEXTCOLOR );
|
||||
pDev->SetTextColor( aSelectionTextColor );
|
||||
}
|
||||
if ( IsEnabled() )
|
||||
|
@ -2744,7 +2744,7 @@ void Ruler::DrawTab( OutputDevice* pDevice, const Color &rFillColor, const Point
|
||||
Point aPos( rPos );
|
||||
sal_uInt16 nTabStyle = nStyle & (RULER_TAB_STYLE | RULER_TAB_RTL);
|
||||
|
||||
pDevice->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
|
||||
pDevice->Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
|
||||
pDevice->SetLineColor();
|
||||
pDevice->SetFillColor(rFillColor);
|
||||
ImplCenterTabPos( aPos, nTabStyle );
|
||||
|
@ -903,7 +903,7 @@ void ToolbarMenu::implHighlightEntry( int nHighlightEntry, bool bHighlight )
|
||||
if( IsNativeControlSupported( CTRL_MENU_POPUP, PART_ENTIRE_CONTROL ) )
|
||||
{
|
||||
Size aPxSize( GetOutputSizePixel() );
|
||||
Push( PUSH_CLIPREGION );
|
||||
Push( PushFlags::CLIPREGION );
|
||||
IntersectClipRegion( Rectangle( Point( nX, nY ), Size( aSz.Width(), pEntry->maSize.Height() ) ) );
|
||||
Rectangle aCtrlRect( Point( nX, 0 ), Size( aPxSize.Width()-nX, aPxSize.Height() ) );
|
||||
DrawNativeControl( CTRL_MENU_POPUP, PART_ENTIRE_CONTROL,
|
||||
|
@ -582,7 +582,7 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
|
||||
bool bRectClip;
|
||||
const bool bCrop = ImplGetCropParams( pOut, aPt, aSz, &aAttr, aClipPolyPoly, bRectClip );
|
||||
|
||||
pOut->Push( PUSH_CLIPREGION );
|
||||
pOut->Push( PushFlags::CLIPREGION );
|
||||
|
||||
if( bCrop )
|
||||
{
|
||||
@ -727,7 +727,7 @@ bool GraphicObject::StartAnimation( OutputDevice* pOut, const Point& rPt, const
|
||||
bool bRectClip;
|
||||
const bool bCrop = ImplGetCropParams( pOut, aPt, aSz, &aAttr, aClipPolyPoly, bRectClip );
|
||||
|
||||
pOut->Push( PUSH_CLIPREGION );
|
||||
pOut->Push( PushFlags::CLIPREGION );
|
||||
|
||||
if( bCrop )
|
||||
{
|
||||
|
@ -1647,7 +1647,7 @@ void GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt, const Size&
|
||||
aOutSz = aRotBoundRect.GetSize();
|
||||
}
|
||||
|
||||
pOut->Push( PUSH_CLIPREGION );
|
||||
pOut->Push( PushFlags::CLIPREGION );
|
||||
pOut->IntersectClipRegion( Rectangle( aOutPt, aOutSz ) );
|
||||
|
||||
( (GDIMetaFile&) rMtf ).WindStart();
|
||||
@ -1994,7 +1994,7 @@ bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const Rectangle& rArea, c
|
||||
const Point aOutStart( aOutOrigin.X() + nInvisibleTilesX*rSizePixel.Width(),
|
||||
aOutOrigin.Y() + nInvisibleTilesY*rSizePixel.Height() );
|
||||
|
||||
pOut->Push( PUSH_CLIPREGION );
|
||||
pOut->Push( PushFlags::CLIPREGION );
|
||||
pOut->IntersectClipRegion( rArea );
|
||||
|
||||
// Paint all tiles
|
||||
|
@ -225,7 +225,7 @@ namespace svt { namespace table
|
||||
OSL_PRECOND( _bIsColHeaderArea || _bIsRowHeaderArea,
|
||||
"GridTableRenderer::PaintHeaderArea: invalid area flags!" );
|
||||
|
||||
_rDevice.Push( PUSH_FILLCOLOR | PUSH_LINECOLOR );
|
||||
_rDevice.Push( PushFlags::FILLCOLOR | PushFlags::LINECOLOR );
|
||||
|
||||
Color const background = lcl_getEffectiveColor( m_pImpl->rModel.getHeaderBackgroundColor(), _rStyle, &StyleSettings::GetDialogColor );
|
||||
_rDevice.SetFillColor( background );
|
||||
@ -249,7 +249,7 @@ namespace svt { namespace table
|
||||
void GridTableRenderer::PaintColumnHeader( ColPos _nCol, bool _bActive, bool _bSelected,
|
||||
OutputDevice& _rDevice, const Rectangle& _rArea, const StyleSettings& _rStyle )
|
||||
{
|
||||
_rDevice.Push( PUSH_LINECOLOR);
|
||||
_rDevice.Push( PushFlags::LINECOLOR);
|
||||
|
||||
OUString sHeaderText;
|
||||
PColumnModel const pColumn = m_pImpl->rModel.getColumnModel( _nCol );
|
||||
@ -320,7 +320,7 @@ namespace svt { namespace table
|
||||
// remember the row for subsequent calls to the other ->ITableRenderer methods
|
||||
m_pImpl->nCurrentRow = _nRow;
|
||||
|
||||
_rDevice.Push( PUSH_FILLCOLOR | PUSH_LINECOLOR);
|
||||
_rDevice.Push( PushFlags::FILLCOLOR | PushFlags::LINECOLOR);
|
||||
|
||||
::Color backgroundColor = _rStyle.GetFieldColor();
|
||||
|
||||
@ -384,7 +384,7 @@ namespace svt { namespace table
|
||||
void GridTableRenderer::PaintRowHeader( bool i_hasControlFocus, bool _bSelected, OutputDevice& _rDevice, const Rectangle& _rArea,
|
||||
const StyleSettings& _rStyle )
|
||||
{
|
||||
_rDevice.Push( PUSH_LINECOLOR | PUSH_TEXTCOLOR );
|
||||
_rDevice.Push( PushFlags::LINECOLOR | PushFlags::TEXTCOLOR );
|
||||
|
||||
::boost::optional< ::Color > const aLineColor( m_pImpl->rModel.getLineColor() );
|
||||
::Color const lineColor = !aLineColor ? _rStyle.GetSeparatorColor() : *aLineColor;
|
||||
@ -437,7 +437,7 @@ namespace svt { namespace table
|
||||
void GridTableRenderer::PaintCell( ColPos const i_column, bool _bSelected, bool i_hasControlFocus,
|
||||
OutputDevice& _rDevice, const Rectangle& _rArea, const StyleSettings& _rStyle )
|
||||
{
|
||||
_rDevice.Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
|
||||
_rDevice.Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
|
||||
|
||||
Rectangle const aContentArea( lcl_getContentArea( *m_pImpl, _rArea ) );
|
||||
CellRenderContext const aRenderContext( _rDevice, aContentArea, _rStyle, i_column, _bSelected, i_hasControlFocus );
|
||||
|
@ -472,7 +472,7 @@ namespace svt
|
||||
ClipItemRegion( const PanelTabBar_Impl& i_rImpl )
|
||||
:m_rDevice( i_rImpl.m_rTabBar )
|
||||
{
|
||||
m_rDevice.Push( PUSH_CLIPREGION );
|
||||
m_rDevice.Push( PushFlags::CLIPREGION );
|
||||
m_rDevice.SetClipRegion(vcl::Region(
|
||||
i_rImpl.m_aNormalizer.getTransformed(
|
||||
i_rImpl.m_aGeometry.getItemsRect(),
|
||||
@ -683,7 +683,7 @@ namespace svt
|
||||
Point aTextPos( aRenderArea.TopLeft() );
|
||||
if ( IsVertical() )
|
||||
{
|
||||
m_rTabBar.Push( PUSH_FONT );
|
||||
m_rTabBar.Push( PushFlags::FONT );
|
||||
|
||||
vcl::Font aFont( m_rTabBar.GetFont() );
|
||||
aFont.SetOrientation( 2700 );
|
||||
@ -1046,7 +1046,7 @@ namespace svt
|
||||
|
||||
// background
|
||||
const Rectangle aNormalizedPaintArea( m_pImpl->m_aNormalizer.getNormalized( i_rRect, m_pImpl->m_eTabAlignment ) );
|
||||
m_pImpl->m_aRenderDevice.Push( PUSH_CLIPREGION );
|
||||
m_pImpl->m_aRenderDevice.Push( PushFlags::CLIPREGION );
|
||||
m_pImpl->m_aRenderDevice.SetClipRegion(vcl::Region(aNormalizedPaintArea));
|
||||
m_pImpl->m_pRenderer->renderBackground();
|
||||
m_pImpl->m_aRenderDevice.Pop();
|
||||
|
@ -746,7 +746,7 @@ vcl::Region lclCreatePolygon( const Point& rP1, const Point& rP2, const Point& r
|
||||
*/
|
||||
void lclSetColorToOutDev( OutputDevice& rDev, const Color& rColor, const Color* pForceColor )
|
||||
{
|
||||
rDev.Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
|
||||
rDev.Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
|
||||
rDev.SetLineColor( pForceColor ? *pForceColor : rColor );
|
||||
rDev.SetFillColor( pForceColor ? *pForceColor : rColor );
|
||||
}
|
||||
@ -958,7 +958,7 @@ void lclPushDiagClipRect( OutputDevice& rDev, const Rectangle& rRect, const Diag
|
||||
if( (aClipRect.GetWidth() < 1) ||(aClipRect.GetHeight() < 1) )
|
||||
aClipRect.SetEmpty();
|
||||
|
||||
rDev.Push( PUSH_CLIPREGION );
|
||||
rDev.Push( PushFlags::CLIPREGION );
|
||||
rDev.IntersectClipRegion( aClipRect );
|
||||
}
|
||||
|
||||
@ -1005,7 +1005,7 @@ void lclPushCrossingClipRegion( OutputDevice& rDev, const Rectangle& rRect, bool
|
||||
aRPoints.maBeg, aRPoints.maEnd, rRect.BottomLeft(), rRect.BottomRight(), rRect.TopRight() ) );
|
||||
}
|
||||
|
||||
rDev.Push( PUSH_CLIPREGION );
|
||||
rDev.Push( PushFlags::CLIPREGION );
|
||||
rDev.IntersectClipRegion( aClipReg );
|
||||
}
|
||||
|
||||
|
@ -1126,7 +1126,7 @@ void Array::DrawRange( OutputDevice& rDev,
|
||||
// *** diagonal frame borders ***
|
||||
|
||||
// set clipping region to clip partly visible merged cells
|
||||
rDev.Push( PUSH_CLIPREGION );
|
||||
rDev.Push( PushFlags::CLIPREGION );
|
||||
rDev.IntersectClipRegion( GetClipRangeRectangle() );
|
||||
for( nRow = nFirstRow; nRow <= nLastRow; ++nRow )
|
||||
{
|
||||
|
@ -1031,7 +1031,7 @@ void FmFilterItemsString::Paint(
|
||||
const bool bIsCurrentFilter = pForm->GetChildren()[ pForm->GetFilterController()->getActiveTerm() ] == pRow;
|
||||
if ( bIsCurrentFilter )
|
||||
{
|
||||
rDev.Push( PUSH_LINECOLOR );
|
||||
rDev.Push( PushFlags::LINECOLOR );
|
||||
|
||||
rDev.SetLineColor( rDev.GetTextColor() );
|
||||
|
||||
|
@ -506,7 +506,7 @@ sal_Int32 GalleryListView::GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColu
|
||||
|
||||
void GalleryListView::PaintField( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 /*nColumnId*/ ) const
|
||||
{
|
||||
rDev.Push( PUSH_CLIPREGION );
|
||||
rDev.Push( PushFlags::CLIPREGION );
|
||||
rDev.IntersectClipRegion( rRect );
|
||||
|
||||
if( mpTheme && ( mnCurRow < mpTheme->GetObjectCount() ) )
|
||||
|
@ -161,7 +161,7 @@ namespace sdr
|
||||
if(!rRedrawArea.IsEmpty())
|
||||
{
|
||||
bClipRegionPushed = true;
|
||||
pOutDev->Push(PUSH_CLIPREGION);
|
||||
pOutDev->Push(PushFlags::CLIPREGION);
|
||||
pOutDev->IntersectClipRegion(rRedrawArea);
|
||||
}
|
||||
|
||||
|
@ -191,7 +191,7 @@ void ValueSetWithTextControl::UserDraw( const UserDrawEvent& rUDEvt )
|
||||
{
|
||||
const Rectangle aRect = rUDEvt.GetRect();
|
||||
OutputDevice* pDev = rUDEvt.GetDevice();
|
||||
pDev->Push( PUSH_ALL );
|
||||
pDev->Push( PushFlags::ALL );
|
||||
const sal_uInt16 nItemId = rUDEvt.GetItemId();
|
||||
|
||||
const long nRectHeight = aRect.GetHeight();
|
||||
|
@ -202,7 +202,7 @@ static void lcl_ClearArea( const SwFrm &rFrm,
|
||||
}
|
||||
else
|
||||
{
|
||||
rOut.Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
|
||||
rOut.Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR );
|
||||
rOut.SetFillColor( rFrm.getRootFrm()->GetCurrShell()->Imp()->GetRetoucheColor());
|
||||
rOut.SetLineColor();
|
||||
for( sal_uInt16 i = 0; i < aRegion.size(); ++i )
|
||||
|
@ -412,7 +412,7 @@ namespace
|
||||
{
|
||||
if ( pViewShell->getPrePostMapMode() != mpOutDev->GetMapMode() )
|
||||
{
|
||||
mpOutDev->Push(PUSH_MAPMODE);
|
||||
mpOutDev->Push(PushFlags::MAPMODE);
|
||||
|
||||
GDIMetaFile* pMetaFile = mpOutDev->GetConnectMetaFile();
|
||||
if ( pMetaFile &&
|
||||
|
@ -2116,7 +2116,7 @@ void SwLayIdle::ShowIdle( ColorData eColorData )
|
||||
Rectangle aRect( 0, 0, 5, 5 );
|
||||
aRect = pWin->PixelToLogic( aRect );
|
||||
// OD 2004-04-23 #116347#
|
||||
pWin->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
|
||||
pWin->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR );
|
||||
pWin->SetFillColor( eColorData );
|
||||
pWin->SetLineColor();
|
||||
pWin->DrawRect( aRect );
|
||||
|
@ -995,7 +995,7 @@ void SwLineRects::PaintLines( OutputDevice *pOut )
|
||||
// #i16816# tagged pdf support
|
||||
SwTaggedPDFHelper aTaggedPDFHelper( 0, 0, 0, *pOut );
|
||||
|
||||
pOut->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
|
||||
pOut->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR );
|
||||
pOut->SetFillColor();
|
||||
pOut->SetLineColor();
|
||||
ConnectEdges( pOut );
|
||||
@ -1166,7 +1166,7 @@ void SwSubsRects::PaintSubsidiary( OutputDevice *pOut,
|
||||
|
||||
if ( !aLineRects.empty() )
|
||||
{
|
||||
pOut->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
|
||||
pOut->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR );
|
||||
pOut->SetLineColor();
|
||||
|
||||
// Reset draw mode in high contrast mode in order to get fill color
|
||||
@ -1817,7 +1817,7 @@ static void lcl_DrawGraphic( const SvxBrushItem& rBrush, OutputDevice *pOut,
|
||||
const bool bNotInside = bClip && !rOut.IsInside( aAlignedGrfRect );
|
||||
if ( bNotInside )
|
||||
{
|
||||
pOut->Push( PUSH_CLIPREGION );
|
||||
pOut->Push( PushFlags::CLIPREGION );
|
||||
pOut->IntersectClipRegion( rOut.SVRect() );
|
||||
}
|
||||
|
||||
@ -2062,7 +2062,7 @@ void DrawGraphic(
|
||||
// area, from which the background brush is determined.
|
||||
aGrf.Pos() = rOrg.Pos();
|
||||
// setup clipping at output device
|
||||
pOutDev->Push( PUSH_CLIPREGION );
|
||||
pOutDev->Push( PushFlags::CLIPREGION );
|
||||
pOutDev->IntersectClipRegion( rOut.SVRect() );
|
||||
// use new method <GraphicObject::DrawTiled(::)>
|
||||
{
|
||||
@ -2120,7 +2120,7 @@ void DrawGraphic(
|
||||
bool bGrfBackgrdAlreadyDrawn = false;
|
||||
if ( bRetouche )
|
||||
{
|
||||
pOutDev->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
|
||||
pOutDev->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR );
|
||||
pOutDev->SetLineColor();
|
||||
|
||||
// check, if a existing background graphic (not filling the complete
|
||||
@ -4136,7 +4136,7 @@ void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
|
||||
aRect._Intersection( Frm() );
|
||||
|
||||
OutputDevice* pOut = pGlobalShell->GetOut();
|
||||
pOut->Push( PUSH_CLIPREGION );
|
||||
pOut->Push( PushFlags::CLIPREGION );
|
||||
pOut->SetClipRegion();
|
||||
const SwPageFrm* pPage = FindPageFrm();
|
||||
|
||||
@ -4239,7 +4239,7 @@ void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
|
||||
//one.
|
||||
|
||||
// OD 2004-04-23 #116347#
|
||||
pOut->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
|
||||
pOut->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR );
|
||||
pOut->SetLineColor();
|
||||
|
||||
pPage = FindPageFrm();
|
||||
@ -6420,7 +6420,7 @@ void SwFrm::PaintBaBo( const SwRect& rRect, const SwPageFrm *pPage,
|
||||
SwTaggedPDFHelper aTaggedPDFHelper( 0, 0, 0, *pOut );
|
||||
|
||||
// OD 2004-04-23 #116347#
|
||||
pOut->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
|
||||
pOut->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR );
|
||||
pOut->SetLineColor();
|
||||
|
||||
SwBorderAttrAccess aAccess( SwFrm::GetCache(), (SwFrm*)this );
|
||||
|
@ -42,7 +42,7 @@ inline DbgRect::DbgRect( OutputDevice *pOutDev, const Rectangle &rRect,
|
||||
{
|
||||
if( pOut )
|
||||
{
|
||||
pOut->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
|
||||
pOut->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR );
|
||||
pOut->SetLineColor( eColor );
|
||||
pOut->SetFillColor();
|
||||
pOut->DrawRect( rRect );
|
||||
|
@ -1546,7 +1546,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
|
||||
|
||||
// Prepare the output device:
|
||||
|
||||
mrOut.Push( PUSH_MAPMODE );
|
||||
mrOut.Push( PushFlags::MAPMODE );
|
||||
MapMode aMapMode( mrOut.GetMapMode() );
|
||||
aMapMode.SetMapUnit( MAP_TWIP );
|
||||
mrOut.SetMapMode( aMapMode );
|
||||
|
@ -1069,7 +1069,7 @@ void SwTxtPaintInfo::DrawCheckBox(const SwFieldFormCheckboxPortion &rPor, bool b
|
||||
!GetOpt().IsPagePreview())
|
||||
{
|
||||
OutputDevice* pOut = (OutputDevice*)GetOut();
|
||||
pOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
|
||||
pOut->Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
|
||||
pOut->SetFillColor( SwViewOption::GetFieldShadingsColor() );
|
||||
pOut->SetLineColor();
|
||||
pOut->DrawRect( aIntersect.SVRect() );
|
||||
@ -1077,7 +1077,7 @@ void SwTxtPaintInfo::DrawCheckBox(const SwFieldFormCheckboxPortion &rPor, bool b
|
||||
}
|
||||
const int delta=10;
|
||||
Rectangle r(aIntersect.Left()+delta, aIntersect.Top()+delta, aIntersect.Right()-delta, aIntersect.Bottom()-delta);
|
||||
m_pOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
|
||||
m_pOut->Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
|
||||
m_pOut->SetLineColor( Color(0, 0, 0));
|
||||
m_pOut->SetFillColor();
|
||||
m_pOut->DrawRect( r );
|
||||
@ -1100,7 +1100,7 @@ void SwTxtPaintInfo::DrawBackground( const SwLinePortion &rPor ) const
|
||||
if ( aIntersect.HasArea() )
|
||||
{
|
||||
OutputDevice* pOut = (OutputDevice*)GetOut();
|
||||
pOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
|
||||
pOut->Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
|
||||
|
||||
// For dark background we do not want to have a filled rectangle
|
||||
if ( GetVsh() && GetVsh()->GetWin() && lcl_IsDarkBackground( *this ) )
|
||||
@ -1151,7 +1151,7 @@ void SwTxtPaintInfo::DrawBackBrush( const SwLinePortion &rPor ) const
|
||||
!GetOpt().IsPagePreview())
|
||||
{
|
||||
OutputDevice* pOutDev = (OutputDevice*)GetOut();
|
||||
pOutDev->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
|
||||
pOutDev->Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
|
||||
pOutDev->SetFillColor( SwViewOption::GetFieldShadingsColor() );
|
||||
pOutDev->SetLineColor( );
|
||||
pOutDev->DrawRect( aIntersect.SVRect() );
|
||||
@ -1183,7 +1183,7 @@ void SwTxtPaintInfo::DrawBackBrush( const SwLinePortion &rPor ) const
|
||||
aFillColor = *m_pFnt->GetBackColor();
|
||||
}
|
||||
|
||||
pTmpOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
|
||||
pTmpOut->Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
|
||||
|
||||
pTmpOut->SetFillColor(aFillColor);
|
||||
pTmpOut->SetLineColor();
|
||||
|
@ -98,8 +98,8 @@ void SwLinePortion::PrePaint( const SwTxtPaintInfo& rInf,
|
||||
sal_uInt16 nPos;
|
||||
SwTxtPaintInfo aInf( rInf );
|
||||
|
||||
const bool bBidiPor = ( rInf.GetTxtFrm()->IsRightToLeft() ) !=
|
||||
( 0 != ( TEXT_LAYOUT_BIDI_RTL & rInf.GetOut()->GetLayoutMode() ) );
|
||||
const bool bBidiPor = rInf.GetTxtFrm()->IsRightToLeft() !=
|
||||
bool( TEXT_LAYOUT_BIDI_RTL & rInf.GetOut()->GetLayoutMode() );
|
||||
|
||||
sal_uInt16 nDir = bBidiPor ?
|
||||
1800 :
|
||||
|
@ -868,7 +868,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
|
||||
! rInf.IsIgnoreFrmRTL();
|
||||
const ComplexTextLayoutMode nMode = rInf.GetOut().GetLayoutMode();
|
||||
const bool bBidiPor = ( bSwitchL2R !=
|
||||
( 0 != ( TEXT_LAYOUT_BIDI_RTL & nMode ) ) );
|
||||
( TEXT_LAYOUT_DEFAULT != ( TEXT_LAYOUT_BIDI_RTL & nMode ) ) );
|
||||
|
||||
// be sure to have the correct layout mode at the printer
|
||||
if ( pPrinter )
|
||||
|
@ -284,7 +284,7 @@ void SwDoDrawCapital::DrawSpace( Point &rPos )
|
||||
|
||||
const ComplexTextLayoutMode nMode = rInf.GetpOut()->GetLayoutMode();
|
||||
const bool bBidiPor = ( bSwitchL2R !=
|
||||
( 0 != ( TEXT_LAYOUT_BIDI_RTL & nMode ) ) );
|
||||
( TEXT_LAYOUT_DEFAULT != ( TEXT_LAYOUT_BIDI_RTL & nMode ) ) );
|
||||
|
||||
if ( bBidiPor )
|
||||
nDiff = -nDiff;
|
||||
|
@ -1481,7 +1481,7 @@ void SwDrawTextInfo::Shift( sal_uInt16 nDir )
|
||||
#endif
|
||||
|
||||
const bool bBidiPor = ( GetFrm() && GetFrm()->IsRightToLeft() ) !=
|
||||
( 0 != ( TEXT_LAYOUT_BIDI_RTL & GetpOut()->GetLayoutMode() ) );
|
||||
( TEXT_LAYOUT_DEFAULT != ( TEXT_LAYOUT_BIDI_RTL & GetpOut()->GetLayoutMode() ) );
|
||||
|
||||
nDir = bBidiPor ?
|
||||
1800 :
|
||||
|
@ -130,7 +130,7 @@ void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
|
||||
GetDrawView()->GetModel()->GetDrawOutliner().SetDefaultHorizontalTextDirection( aEEHoriTextDirOfPage );
|
||||
}
|
||||
|
||||
pOutDev->Push( PUSH_LINECOLOR ); // #114231#
|
||||
pOutDev->Push( PushFlags::LINECOLOR ); // #114231#
|
||||
if (pPrintData)
|
||||
{
|
||||
// hide drawings but not form controls (form controls are handled elsewhere)
|
||||
|
@ -1473,7 +1473,7 @@ void SwViewShell::PaintDesktop( const SwRect &rRect )
|
||||
void SwViewShell::_PaintDesktop( const SwRegionRects &rRegion )
|
||||
{
|
||||
// OD 2004-04-23 #116347#
|
||||
GetOut()->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
|
||||
GetOut()->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR );
|
||||
GetOut()->SetLineColor();
|
||||
|
||||
for ( sal_uInt16 i = 0; i < rRegion.size(); ++i )
|
||||
@ -1744,7 +1744,7 @@ void SwViewShell::Paint(const Rectangle &rRect)
|
||||
const vcl::Region aDLRegion(rRect);
|
||||
DLPrePaint2(aDLRegion);
|
||||
|
||||
mpOut->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
|
||||
mpOut->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR );
|
||||
mpOut->SetFillColor( Imp()->GetRetoucheColor() );
|
||||
mpOut->SetLineColor();
|
||||
mpOut->DrawRect( rRect );
|
||||
|
@ -611,7 +611,7 @@ void SwViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintD
|
||||
// document because the thumbnail creation will not trigger a complete
|
||||
// formatting of the document.
|
||||
|
||||
pOleOut->Push( PUSH_CLIPREGION );
|
||||
pOleOut->Push( PushFlags::CLIPREGION );
|
||||
pOleOut->IntersectClipRegion( aSwRect.SVRect() );
|
||||
pSh->GetLayout()->Paint( aSwRect );
|
||||
|
||||
|
@ -2355,7 +2355,7 @@ awt::Size SwWW8ImplReader::MiserableDropDownFormHack(const OUString &rString,
|
||||
OSL_ENSURE(pOut, "Impossible");
|
||||
if (pOut)
|
||||
{
|
||||
pOut->Push( PUSH_FONT | PUSH_MAPMODE );
|
||||
pOut->Push( PushFlags::FONT | PushFlags::MAPMODE );
|
||||
pOut->SetMapMode( MapMode( MAP_100TH_MM ));
|
||||
pOut->SetFont( aFont );
|
||||
aRet.Width = pOut->GetTextWidth(rString);
|
||||
|
@ -758,7 +758,7 @@ void AutoFmtPreview::DrawBackground()
|
||||
{
|
||||
SvxBrushItem aBrushItem( aCurData.GetBoxFmt( GetFormatIndex( nCol, nRow ) ).GetBackground() );
|
||||
|
||||
aVD.Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
|
||||
aVD.Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
|
||||
aVD.SetLineColor();
|
||||
aVD.SetFillColor( aBrushItem.GetColor() );
|
||||
aVD.DrawRect( maArray.GetCellRect( nCol, nRow ) );
|
||||
|
@ -24,33 +24,33 @@ const size_t constMaxActionType = 513;
|
||||
|
||||
OUString flagToString(PushFlags nFlag)
|
||||
{
|
||||
if (nFlag & PUSH_LINECOLOR)
|
||||
if (nFlag & PushFlags::LINECOLOR)
|
||||
return OUString("PushLineColor");
|
||||
else if (nFlag & PUSH_FILLCOLOR)
|
||||
else if (nFlag & PushFlags::FILLCOLOR)
|
||||
return OUString("PushFillColor");
|
||||
else if (nFlag & PUSH_FONT)
|
||||
else if (nFlag & PushFlags::FONT)
|
||||
return OUString("PushFont");
|
||||
else if (nFlag & PUSH_TEXTCOLOR)
|
||||
else if (nFlag & PushFlags::TEXTCOLOR)
|
||||
return OUString("PushTextColor");
|
||||
else if (nFlag & PUSH_MAPMODE)
|
||||
else if (nFlag & PushFlags::MAPMODE)
|
||||
return OUString("PushMapMode");
|
||||
else if (nFlag & PUSH_CLIPREGION)
|
||||
else if (nFlag & PushFlags::CLIPREGION)
|
||||
return OUString("PushClipRegion");
|
||||
else if (nFlag & PUSH_RASTEROP)
|
||||
else if (nFlag & PushFlags::RASTEROP)
|
||||
return OUString("PushRasterOp");
|
||||
else if (nFlag & PUSH_TEXTFILLCOLOR)
|
||||
else if (nFlag & PushFlags::TEXTFILLCOLOR)
|
||||
return OUString("PushTextFillColor");
|
||||
else if (nFlag & PUSH_TEXTALIGN)
|
||||
else if (nFlag & PushFlags::TEXTALIGN)
|
||||
return OUString("PushTextAlign");
|
||||
else if (nFlag & PUSH_REFPOINT)
|
||||
else if (nFlag & PushFlags::REFPOINT)
|
||||
return OUString("PushRefPoint");
|
||||
else if (nFlag & PUSH_TEXTLINECOLOR)
|
||||
else if (nFlag & PushFlags::TEXTLINECOLOR)
|
||||
return OUString("PushTextLineColor");
|
||||
else if (nFlag & PUSH_TEXTLAYOUTMODE)
|
||||
else if (nFlag & PushFlags::TEXTLAYOUTMODE)
|
||||
return OUString("PushTextLayoutMode");
|
||||
else if (nFlag & PUSH_TEXTLANGUAGE)
|
||||
else if (nFlag & PushFlags::TEXTLANGUAGE)
|
||||
return OUString("PushTextLanguage");
|
||||
else if (nFlag & PUSH_OVERLINECOLOR)
|
||||
else if (nFlag & PushFlags::OVERLINECOLOR)
|
||||
return OUString("PushOverlineColor");
|
||||
|
||||
return OUString();
|
||||
@ -58,7 +58,7 @@ OUString flagToString(PushFlags nFlag)
|
||||
|
||||
OUString collectPushFlags(PushFlags nFlags)
|
||||
{
|
||||
if ((nFlags & PUSH_ALL) == nFlags)
|
||||
if ((nFlags & PushFlags::ALL) == nFlags)
|
||||
return OUString("PushAll");
|
||||
else if ((nFlags & PUSH_ALLFONT) == nFlags)
|
||||
return OUString("PushAllFont");
|
||||
|
@ -838,7 +838,7 @@ void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, sal_uLong nDrawF
|
||||
if( aInRect.Right() < aInRect.Left() || aInRect.Bottom() < aInRect.Top() )
|
||||
aInRect.SetEmpty();
|
||||
|
||||
pDev->Push( PUSH_CLIPREGION );
|
||||
pDev->Push( PushFlags::CLIPREGION );
|
||||
pDev->IntersectClipRegion( aInRect );
|
||||
|
||||
if ( nDrawFlags & WINDOW_DRAW_MONO )
|
||||
@ -2033,7 +2033,7 @@ void RadioButton::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
|
||||
MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
|
||||
OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
|
||||
|
||||
pDev->Push( PUSH_CLIPREGION );
|
||||
pDev->Push( PushFlags::CLIPREGION );
|
||||
pDev->IntersectClipRegion( Rectangle( rPos, rSize ) );
|
||||
|
||||
// no image radio button
|
||||
@ -2860,7 +2860,7 @@ Image RadioButton::GetRadioImage( const AllSettings& rSettings, sal_uInt16 nFlag
|
||||
|
||||
void RadioButton::ImplSetMinimumNWFSize()
|
||||
{
|
||||
Push( PUSH_MAPMODE );
|
||||
Push( PushFlags::MAPMODE );
|
||||
SetMapMode( MAP_PIXEL );
|
||||
|
||||
ImplControlValue aControlValue;
|
||||
@ -3083,7 +3083,7 @@ void CheckBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
|
||||
WinBits nWinStyle = GetStyle();
|
||||
OUString aText( GetText() );
|
||||
|
||||
pDev->Push( PUSH_CLIPREGION | PUSH_LINECOLOR );
|
||||
pDev->Push( PushFlags::CLIPREGION | PushFlags::LINECOLOR );
|
||||
pDev->IntersectClipRegion( Rectangle( rPos, rSize ) );
|
||||
|
||||
long nLineY = rPos.Y() + (rSize.Height()-1)/2;
|
||||
@ -3714,7 +3714,7 @@ Image CheckBox::GetCheckImage( const AllSettings& rSettings, sal_uInt16 nFlags )
|
||||
|
||||
void CheckBox::ImplSetMinimumNWFSize()
|
||||
{
|
||||
Push( PUSH_MAPMODE );
|
||||
Push( PushFlags::MAPMODE );
|
||||
SetMapMode( MAP_PIXEL );
|
||||
|
||||
ImplControlValue aControlValue;
|
||||
|
@ -530,7 +530,7 @@ void Edit::ImplRepaint(bool bLayout)
|
||||
if( (GetStyle() & WB_FORCECTRLBACKGROUND) != 0 && IsControlBackground() )
|
||||
{
|
||||
// check if we need to set ControlBackground even in NWF case
|
||||
Push( PUSH_FILLCOLOR | PUSH_LINECOLOR );
|
||||
Push( PushFlags::FILLCOLOR | PushFlags::LINECOLOR );
|
||||
SetLineColor();
|
||||
SetFillColor( GetControlBackground() );
|
||||
DrawRect( Rectangle( aPos, Size( GetOutputSizePixel().Width() - 2*mnXOffset, GetOutputSizePixel().Height() ) ) );
|
||||
|
@ -564,7 +564,7 @@ void FixedLine::ImplDraw( bool bLayout )
|
||||
else if( (nWinStyle & WB_VERT) )
|
||||
{
|
||||
long nWidth = GetTextWidth( aText );
|
||||
Push( PUSH_FONT );
|
||||
Push( PushFlags::FONT );
|
||||
vcl::Font aFont( GetFont() );
|
||||
aFont.SetOrientation( 900 );
|
||||
SetFont( aFont );
|
||||
|
@ -1246,7 +1246,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
|
||||
const MetaAction* pSubstAct = aSubstitute.GetAction( i );
|
||||
if( pSubstAct->GetType() == META_BMPSCALE_ACTION )
|
||||
{
|
||||
maVDev.Push( PUSH_ALL );
|
||||
maVDev.Push( PushFlags::ALL );
|
||||
ImplBeginRecord( WIN_EMR_SAVEDC );
|
||||
ImplEndRecord();
|
||||
|
||||
|
@ -830,7 +830,7 @@ WinMtfOutput::WinMtfOutput( GDIMetaFile& rGDIMetaFile ) :
|
||||
{
|
||||
mbIsMapWinSet = false;
|
||||
mbIsMapDevSet = false;
|
||||
mpGDIMetaFile->AddAction( new MetaPushAction( PUSH_CLIPREGION ) ); // The original clipregion has to be on top
|
||||
mpGDIMetaFile->AddAction( new MetaPushAction( PushFlags::CLIPREGION ) ); // The original clipregion has to be on top
|
||||
// of the stack so it can always be restored
|
||||
// this is necessary to be able to support
|
||||
// SetClipRgn( NULL ) and similar ClipRgn actions (SJ)
|
||||
@ -867,7 +867,7 @@ void WinMtfOutput::UpdateClipRegion()
|
||||
mbComplexClip = false;
|
||||
|
||||
mpGDIMetaFile->AddAction( new MetaPopAction() ); // taking the original clipregion
|
||||
mpGDIMetaFile->AddAction( new MetaPushAction( PUSH_CLIPREGION ) );
|
||||
mpGDIMetaFile->AddAction( new MetaPushAction( PushFlags::CLIPREGION ) );
|
||||
|
||||
// skip for 'no clipping at all' case
|
||||
if( !aClipPath.isEmpty() )
|
||||
@ -976,7 +976,7 @@ void WinMtfOutput::StrokeAndFillPath( bool bStroke, bool bFill )
|
||||
{
|
||||
if ( !bStroke )
|
||||
{
|
||||
mpGDIMetaFile->AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
|
||||
mpGDIMetaFile->AddAction( new MetaPushAction( PushFlags::LINECOLOR ) );
|
||||
mpGDIMetaFile->AddAction( new MetaLineColorAction( Color(), false ) );
|
||||
}
|
||||
if ( aPathObj.Count() == 1 )
|
||||
|
@ -1495,27 +1495,27 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
|
||||
{
|
||||
aDstLineInfo = pAt->aLineInfo;
|
||||
aDstLineColor = pAt->aLineColor;
|
||||
if ( pAt->nFlags & PUSH_LINECOLOR )
|
||||
if ( pAt->nFlags & PushFlags::LINECOLOR )
|
||||
aSrcLineColor = pAt->aLineColor;
|
||||
aDstFillColor = pAt->aFillColor;
|
||||
if ( pAt->nFlags & PUSH_FILLCOLOR )
|
||||
if ( pAt->nFlags & PushFlags::FILLCOLOR )
|
||||
aSrcFillColor = pAt->aFillColor;
|
||||
eDstROP2 = pAt->eRasterOp;
|
||||
if ( pAt->nFlags & PUSH_RASTEROP )
|
||||
if ( pAt->nFlags & PushFlags::RASTEROP )
|
||||
eSrcRasterOp = pAt->eRasterOp;
|
||||
aDstFont = pAt->aFont;
|
||||
if ( pAt->nFlags & PUSH_FONT )
|
||||
if ( pAt->nFlags & PushFlags::FONT )
|
||||
aSrcFont = pAt->aFont;
|
||||
eDstTextAlign = pAt->eTextAlign;
|
||||
if ( pAt->nFlags & ( PUSH_FONT | PUSH_TEXTALIGN ) )
|
||||
if ( pAt->nFlags & ( PushFlags::FONT | PushFlags::TEXTALIGN ) )
|
||||
eSrcTextAlign = pAt->eTextAlign;
|
||||
aDstTextColor = pAt->aTextColor;
|
||||
if ( pAt->nFlags & ( PUSH_FONT | PUSH_TEXTCOLOR ) )
|
||||
if ( pAt->nFlags & ( PushFlags::FONT | PushFlags::TEXTCOLOR ) )
|
||||
aSrcTextColor = pAt->aTextColor;
|
||||
if ( pAt->nFlags & PUSH_MAPMODE )
|
||||
if ( pAt->nFlags & PushFlags::MAPMODE )
|
||||
aSrcMapMode = pAt->aMapMode;
|
||||
aDstClipRegion = pAt->aClipRegion;
|
||||
if ( pAt->nFlags & PUSH_CLIPREGION )
|
||||
if ( pAt->nFlags & PushFlags::CLIPREGION )
|
||||
aSrcClipRegion = pAt->aClipRegion;
|
||||
|
||||
WMFRecord_RestoreDC();
|
||||
|
@ -665,7 +665,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
|
||||
{
|
||||
const Polygon aPoly( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 );
|
||||
|
||||
rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
|
||||
rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR ) );
|
||||
rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) );
|
||||
rMtf.AddAction( new MetaPolygonAction( aPoly ) );
|
||||
rMtf.AddAction( new MetaPopAction() );
|
||||
@ -686,7 +686,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
|
||||
{
|
||||
const Polygon aPoly( aRect, aPt, aPt1, POLY_ARC );
|
||||
|
||||
rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
|
||||
rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR ) );
|
||||
rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) );
|
||||
rMtf.AddAction( new MetaPolygonAction( aPoly ) );
|
||||
rMtf.AddAction( new MetaPopAction() );
|
||||
@ -707,7 +707,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
|
||||
{
|
||||
const Polygon aPoly( aRect, aPt, aPt1, POLY_PIE );
|
||||
|
||||
rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
|
||||
rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR ) );
|
||||
rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) );
|
||||
rMtf.AddAction( new MetaPolygonAction( aPoly ) );
|
||||
rMtf.AddAction( new MetaPopAction() );
|
||||
@ -722,7 +722,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
|
||||
case( GDI_HIGHLIGHTRECT_ACTION ):
|
||||
{
|
||||
ImplReadRect( rIStm, aRect );
|
||||
rMtf.AddAction( new MetaPushAction( PUSH_RASTEROP ) );
|
||||
rMtf.AddAction( new MetaPushAction( PushFlags::RASTEROP ) );
|
||||
rMtf.AddAction( new MetaRasterOpAction( ROP_INVERT ) );
|
||||
rMtf.AddAction( new MetaRectAction( aRect ) );
|
||||
rMtf.AddAction( new MetaPopAction() );
|
||||
@ -747,7 +747,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
|
||||
|
||||
if( bFatLine )
|
||||
{
|
||||
rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
|
||||
rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR ) );
|
||||
rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) );
|
||||
rMtf.AddAction( new MetaPolygonAction( aActionPoly ) );
|
||||
rMtf.AddAction( new MetaPopAction() );
|
||||
@ -769,7 +769,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
|
||||
|
||||
if( bFatLine )
|
||||
{
|
||||
rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
|
||||
rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR ) );
|
||||
rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) );
|
||||
rMtf.AddAction( new MetaPolyPolygonAction( aPolyPoly ) );
|
||||
rMtf.AddAction( new MetaPopAction() );
|
||||
@ -1109,7 +1109,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
|
||||
case( GDI_PUSH_ACTION ):
|
||||
{
|
||||
aLIStack.push( new LineInfo( aLineInfo ) );
|
||||
rMtf.AddAction( new MetaPushAction( PUSH_ALL ) );
|
||||
rMtf.AddAction( new MetaPushAction( PushFlags::ALL ) );
|
||||
|
||||
// #106172# Track font relevant data in shadow VDev
|
||||
aFontVDev.Push();
|
||||
|
@ -371,12 +371,12 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
|
||||
|
||||
aPushFlags.push_back(nFlags);
|
||||
|
||||
if(nFlags & PUSH_CLIPREGION)
|
||||
if(nFlags & PushFlags::CLIPREGION)
|
||||
{
|
||||
aClips.push_back(aClips.back());
|
||||
}
|
||||
|
||||
if(nFlags & PUSH_MAPMODE)
|
||||
if(nFlags & PushFlags::MAPMODE)
|
||||
{
|
||||
aMapModes.push_back(aMapModes.back());
|
||||
}
|
||||
@ -391,7 +391,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
|
||||
const PushFlags nFlags(aPushFlags.back());
|
||||
aPushFlags.pop_back();
|
||||
|
||||
if(nFlags & PUSH_CLIPREGION)
|
||||
if(nFlags & PushFlags::CLIPREGION)
|
||||
{
|
||||
if(aClips.size() > 1)
|
||||
{
|
||||
@ -403,7 +403,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
|
||||
}
|
||||
}
|
||||
|
||||
if(nFlags & PUSH_MAPMODE)
|
||||
if(nFlags & PushFlags::MAPMODE)
|
||||
{
|
||||
if(aMapModes.size() > 1)
|
||||
{
|
||||
|
@ -350,7 +350,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, size_t nPos )
|
||||
// This is necessary, since old metafiles don't even know of these
|
||||
// recent add-ons. Newer metafiles must of course explicitly set
|
||||
// those states.
|
||||
pOut->Push( PUSH_TEXTLAYOUTMODE|PUSH_TEXTLANGUAGE );
|
||||
pOut->Push( PushFlags::TEXTLAYOUTMODE|PushFlags::TEXTLANGUAGE );
|
||||
pOut->SetLayoutMode( TEXT_LAYOUT_DEFAULT );
|
||||
pOut->SetDigitLanguage( 0 );
|
||||
|
||||
@ -1792,7 +1792,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
|
||||
{
|
||||
MetaPushAction* pAct = static_cast<MetaPushAction*>(pAction);
|
||||
aPushFlagStack.push_back( pAct->GetFlags() );
|
||||
if( aPushFlagStack.back() & PUSH_CLIPREGION )
|
||||
if( aPushFlagStack.back() & PushFlags::CLIPREGION )
|
||||
{
|
||||
Rectangle aRect( aClipStack.back() );
|
||||
aClipStack.push_back( aRect );
|
||||
@ -1803,7 +1803,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
|
||||
// sanity check
|
||||
if( ! aPushFlagStack.empty() )
|
||||
{
|
||||
if( aPushFlagStack.back() & PUSH_CLIPREGION )
|
||||
if( aPushFlagStack.back() & PushFlags::CLIPREGION )
|
||||
{
|
||||
if( aClipStack.size() > 1 )
|
||||
aClipStack.pop_back();
|
||||
|
@ -3108,7 +3108,7 @@ void MetaFontAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
|
||||
|
||||
MetaPushAction::MetaPushAction() :
|
||||
MetaAction ( META_PUSH_ACTION ),
|
||||
mnFlags ( PUSH_NONE )
|
||||
mnFlags ( PushFlags::NONE )
|
||||
{}
|
||||
|
||||
MetaPushAction::~MetaPushAction()
|
||||
@ -3140,7 +3140,7 @@ void MetaPushAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
|
||||
{
|
||||
MetaAction::Write(rOStm, pData);
|
||||
VersionCompat aCompat(rOStm, STREAM_WRITE, 1);
|
||||
rOStm.WriteUInt16( mnFlags );
|
||||
rOStm.WriteUInt16( static_cast<sal_uInt16>(mnFlags) );
|
||||
}
|
||||
|
||||
void MetaPushAction::Read( SvStream& rIStm, ImplMetaReadData* )
|
||||
|
@ -147,7 +147,7 @@ void GlobalSyncData::PlayGlobalActions( PDFWriter& rWriter )
|
||||
{
|
||||
case PDFExtOutDevDataSync::CreateNamedDest : //i56629
|
||||
{
|
||||
rWriter.Push( PUSH_MAPMODE );
|
||||
rWriter.Push( PushFlags::MAPMODE );
|
||||
rWriter.SetMapMode( mParaMapModes.front() );
|
||||
mParaMapModes.pop_front();
|
||||
mParaIds.push_back( rWriter.CreateNamedDest( mParaOUStrings.front(), mParaRects.front(), mParaInts.front(), mParaDestAreaTypes.front() ) );
|
||||
@ -160,7 +160,7 @@ void GlobalSyncData::PlayGlobalActions( PDFWriter& rWriter )
|
||||
break;
|
||||
case PDFExtOutDevDataSync::CreateDest :
|
||||
{
|
||||
rWriter.Push( PUSH_MAPMODE );
|
||||
rWriter.Push( PushFlags::MAPMODE );
|
||||
rWriter.SetMapMode( mParaMapModes.front() );
|
||||
mParaMapModes.pop_front();
|
||||
mParaIds.push_back( rWriter.CreateDest( mParaRects.front(), mParaInts.front(), mParaDestAreaTypes.front() ) );
|
||||
@ -172,7 +172,7 @@ void GlobalSyncData::PlayGlobalActions( PDFWriter& rWriter )
|
||||
break;
|
||||
case PDFExtOutDevDataSync::CreateLink :
|
||||
{
|
||||
rWriter.Push( PUSH_MAPMODE );
|
||||
rWriter.Push( PushFlags::MAPMODE );
|
||||
rWriter.SetMapMode( mParaMapModes.front() );
|
||||
mParaMapModes.pop_front();
|
||||
mParaIds.push_back( rWriter.CreateLink( mParaRects.front(), mParaInts.front() ) );
|
||||
@ -206,7 +206,7 @@ void GlobalSyncData::PlayGlobalActions( PDFWriter& rWriter )
|
||||
|
||||
PDFLinkDestination& rDest = mFutureDestinations[ nDestId ];
|
||||
|
||||
rWriter.Push( PUSH_MAPMODE );
|
||||
rWriter.Push( PushFlags::MAPMODE );
|
||||
rWriter.SetMapMode( rDest.mMapMode );
|
||||
mParaIds.push_back( rWriter.RegisterDestReference( nDestId, rDest.mRect, rDest.mPageNr, rDest.mAreaType ) );
|
||||
rWriter.Pop();
|
||||
@ -243,7 +243,7 @@ void GlobalSyncData::PlayGlobalActions( PDFWriter& rWriter )
|
||||
break;
|
||||
case PDFExtOutDevDataSync::CreateNote :
|
||||
{
|
||||
rWriter.Push( PUSH_MAPMODE );
|
||||
rWriter.Push( PushFlags::MAPMODE );
|
||||
rWriter.SetMapMode( mParaMapModes.front() );
|
||||
rWriter.CreateNote( mParaRects.front(), mParaPDFNotes.front(), mParaInts.front() );
|
||||
mParaMapModes.pop_front();
|
||||
|
@ -198,7 +198,7 @@ void PDFWriter::DrawGradient( const Rectangle& rRect, const Gradient& rGradient
|
||||
|
||||
void PDFWriter::DrawGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient )
|
||||
{
|
||||
pImplementation->push(PUSH_CLIPREGION);
|
||||
pImplementation->push(PushFlags::CLIPREGION);
|
||||
pImplementation->setClipRegion( rPolyPoly.getB2DPolyPolygon() );
|
||||
pImplementation->drawGradient( rPolyPoly.GetBoundRect(), rGradient );
|
||||
pImplementation->pop();
|
||||
|
@ -237,7 +237,7 @@ void doTestCode()
|
||||
aClipPoly.setClosed( true );
|
||||
aClip.append( aClipPoly );
|
||||
|
||||
aWriter.Push( PUSH_CLIPREGION | PUSH_FILLCOLOR );
|
||||
aWriter.Push( PushFlags::CLIPREGION | PushFlags::FILLCOLOR );
|
||||
aWriter.SetClipRegion( aClip );
|
||||
aWriter.DrawEllipse( Rectangle( Point( 4500, 9600 ), Size( 12000, 3000 ) ) );
|
||||
aWriter.MoveClipRegion( 1000, 500 );
|
||||
@ -3524,7 +3524,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const Physical
|
||||
throw FontException();
|
||||
|
||||
OutputDevice* pRef = getReferenceDevice();
|
||||
pRef->Push( PUSH_FONT | PUSH_MAPMODE );
|
||||
pRef->Push( PushFlags::FONT | PushFlags::MAPMODE );
|
||||
pRef->SetMapMode( MapMode( MAP_PIXEL ) );
|
||||
Font aFont( pFont->GetFamilyName(), pFont->GetStyleName(), Size( 0, 1000 ) );
|
||||
aFont.SetWeight( pFont->GetWeight() );
|
||||
@ -4679,7 +4679,7 @@ void PDFWriterImpl::createDefaultPushButtonAppearance( PDFWidget& rButton, const
|
||||
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
|
||||
|
||||
// save graphics state
|
||||
push( PUSH_ALL );
|
||||
push( PushFlags::ALL );
|
||||
|
||||
// transform relative to control's coordinates since an
|
||||
// appearance stream is a form XObject
|
||||
@ -4786,7 +4786,7 @@ void PDFWriterImpl::createDefaultEditAppearance( PDFWidget& rEdit, const PDFWrit
|
||||
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
|
||||
SvMemoryStream* pEditStream = new SvMemoryStream( 1024, 1024 );
|
||||
|
||||
push( PUSH_ALL );
|
||||
push( PushFlags::ALL );
|
||||
|
||||
// prepare font to use, draw field border
|
||||
Font aFont = drawFieldBorder( rEdit, rWidget, rSettings );
|
||||
@ -4838,7 +4838,7 @@ void PDFWriterImpl::createDefaultListBoxAppearance( PDFWidget& rBox, const PDFWr
|
||||
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
|
||||
SvMemoryStream* pListBoxStream = new SvMemoryStream( 1024, 1024 );
|
||||
|
||||
push( PUSH_ALL );
|
||||
push( PushFlags::ALL );
|
||||
|
||||
// prepare font to use, draw field border
|
||||
Font aFont = drawFieldBorder( rBox, rWidget, rSettings );
|
||||
@ -4889,7 +4889,7 @@ void PDFWriterImpl::createDefaultCheckBoxAppearance( PDFWidget& rBox, const PDFW
|
||||
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
|
||||
|
||||
// save graphics state
|
||||
push( PUSH_ALL );
|
||||
push( PushFlags::ALL );
|
||||
|
||||
if( rWidget.Background || rWidget.Border )
|
||||
{
|
||||
@ -5014,7 +5014,7 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const P
|
||||
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
|
||||
|
||||
// save graphics state
|
||||
push( PUSH_ALL );
|
||||
push( PushFlags::ALL );
|
||||
|
||||
if( rWidget.Background || rWidget.Border )
|
||||
{
|
||||
@ -5102,7 +5102,7 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const P
|
||||
rBox.m_aRect = aCheckRect;
|
||||
|
||||
// create appearance streams
|
||||
push( PUSH_ALL);
|
||||
push( PushFlags::ALL);
|
||||
SvMemoryStream* pCheckStream = new SvMemoryStream( 256, 256 );
|
||||
|
||||
beginRedirect( pCheckStream, aCheckRect );
|
||||
@ -7142,7 +7142,7 @@ void PDFWriterImpl::registerGlyphs( int nGlyphs,
|
||||
|
||||
void PDFWriterImpl::drawRelief( SalLayout& rLayout, const OUString& rText, bool bTextLines )
|
||||
{
|
||||
push( PUSH_ALL );
|
||||
push( PushFlags::ALL );
|
||||
|
||||
FontRelief eRelief = m_aCurrentPDFState.m_aFont.GetRelief();
|
||||
|
||||
@ -7714,7 +7714,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
|
||||
bool bEmphPolyLine;
|
||||
FontEmphasisMark nEmphMark;
|
||||
|
||||
push( PUSH_ALL );
|
||||
push( PushFlags::ALL );
|
||||
|
||||
aLine.setLength( 0 );
|
||||
aLine.append( "q\n" );
|
||||
@ -8396,7 +8396,7 @@ void PDFWriterImpl::drawStrikeoutChar( const Point& rPos, long nWidth, FontStrik
|
||||
ComplexTextLayoutMode nOrigTLM = m_pReferenceDevice->GetLayoutMode();
|
||||
m_pReferenceDevice->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG|TEXT_LAYOUT_COMPLEX_DISABLED );
|
||||
|
||||
push( PUSH_CLIPREGION );
|
||||
push( PushFlags::CLIPREGION );
|
||||
FontMetric aRefDevFontMetric = m_pReferenceDevice->GetFontMetric();
|
||||
Rectangle aRect;
|
||||
aRect.Left() = rPos.X();
|
||||
@ -8659,7 +8659,7 @@ void PDFWriterImpl::pushResource( ResourceKind eKind, const OString& rResource,
|
||||
|
||||
void PDFWriterImpl::beginRedirect( SvStream* pStream, const Rectangle& rTargetRect )
|
||||
{
|
||||
push( PUSH_ALL );
|
||||
push( PushFlags::ALL );
|
||||
|
||||
// force reemitting clip region inside the new stream, and
|
||||
// prevent emitting an unbalanced "Q" at the start
|
||||
@ -10321,7 +10321,7 @@ void PDFWriterImpl::drawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch&
|
||||
tools::PolyPolygon aPolyPoly( rPolyPoly );
|
||||
|
||||
aPolyPoly.Optimize( POLY_OPTIMIZE_NO_SAME );
|
||||
push( PUSH_LINECOLOR );
|
||||
push( PushFlags::LINECOLOR );
|
||||
setLineColor( rHatch.GetColor() );
|
||||
getReferenceDevice()->DrawHatch( aPolyPoly, rHatch, false );
|
||||
pop();
|
||||
@ -10630,32 +10630,32 @@ void PDFWriterImpl::pop()
|
||||
|
||||
// move those parameters back that were not pushed
|
||||
// in the first place
|
||||
if( ! (aState.m_nFlags & PUSH_LINECOLOR) )
|
||||
if( ! (aState.m_nFlags & PushFlags::LINECOLOR) )
|
||||
setLineColor( aState.m_aLineColor );
|
||||
if( ! (aState.m_nFlags & PUSH_FILLCOLOR) )
|
||||
if( ! (aState.m_nFlags & PushFlags::FILLCOLOR) )
|
||||
setFillColor( aState.m_aFillColor );
|
||||
if( ! (aState.m_nFlags & PUSH_FONT) )
|
||||
if( ! (aState.m_nFlags & PushFlags::FONT) )
|
||||
setFont( aState.m_aFont );
|
||||
if( ! (aState.m_nFlags & PUSH_TEXTCOLOR) )
|
||||
if( ! (aState.m_nFlags & PushFlags::TEXTCOLOR) )
|
||||
setTextColor( aState.m_aFont.GetColor() );
|
||||
if( ! (aState.m_nFlags & PUSH_MAPMODE) )
|
||||
if( ! (aState.m_nFlags & PushFlags::MAPMODE) )
|
||||
setMapMode( aState.m_aMapMode );
|
||||
if( ! (aState.m_nFlags & PUSH_CLIPREGION) )
|
||||
if( ! (aState.m_nFlags & PushFlags::CLIPREGION) )
|
||||
{
|
||||
// do not use setClipRegion here
|
||||
// it would convert again assuming the current mapmode
|
||||
rOld.m_aClipRegion = aState.m_aClipRegion;
|
||||
rOld.m_bClipRegion = aState.m_bClipRegion;
|
||||
}
|
||||
if( ! (aState.m_nFlags & PUSH_TEXTLINECOLOR ) )
|
||||
if( ! (aState.m_nFlags & PushFlags::TEXTLINECOLOR ) )
|
||||
setTextLineColor( aState.m_aTextLineColor );
|
||||
if( ! (aState.m_nFlags & PUSH_OVERLINECOLOR ) )
|
||||
if( ! (aState.m_nFlags & PushFlags::OVERLINECOLOR ) )
|
||||
setOverlineColor( aState.m_aOverlineColor );
|
||||
if( ! (aState.m_nFlags & PUSH_TEXTALIGN ) )
|
||||
if( ! (aState.m_nFlags & PushFlags::TEXTALIGN ) )
|
||||
setTextAlign( aState.m_aFont.GetAlign() );
|
||||
if( ! (aState.m_nFlags & PUSH_TEXTFILLCOLOR) )
|
||||
if( ! (aState.m_nFlags & PushFlags::TEXTFILLCOLOR) )
|
||||
setTextFillColor( aState.m_aFont.GetFillColor() );
|
||||
if( ! (aState.m_nFlags & PUSH_REFPOINT) )
|
||||
if( ! (aState.m_nFlags & PushFlags::REFPOINT) )
|
||||
{
|
||||
// what ?
|
||||
}
|
||||
|
@ -738,7 +738,7 @@ private:
|
||||
m_nLayoutMode( TEXT_LAYOUT_DEFAULT ),
|
||||
m_aDigitLanguage( 0 ),
|
||||
m_nTransparentPercent( 0 ),
|
||||
m_nFlags( PUSH_ALL ),
|
||||
m_nFlags( PushFlags::ALL ),
|
||||
m_nUpdateFlags( 0xffff )
|
||||
{}
|
||||
GraphicsState( const GraphicsState& rState ) :
|
||||
|
@ -287,7 +287,7 @@ void Printer::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly,
|
||||
default: nMove = 0; break;
|
||||
}
|
||||
|
||||
Push( PUSH_CLIPREGION | PUSH_LINECOLOR );
|
||||
Push( PushFlags::CLIPREGION | PushFlags::LINECOLOR );
|
||||
IntersectClipRegion(vcl::Region(rPolyPoly));
|
||||
SetLineColor( GetFillColor() );
|
||||
const bool bOldMap = mbMap;
|
||||
@ -854,7 +854,7 @@ void Printer::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor,
|
||||
|
||||
mpMetaFile = NULL;
|
||||
mbMap = false;
|
||||
Push( PUSH_FILLCOLOR | PUSH_LINECOLOR );
|
||||
Push( PushFlags::FILLCOLOR | PushFlags::LINECOLOR );
|
||||
SetLineColor( rMaskColor );
|
||||
SetFillColor( rMaskColor );
|
||||
InitLineColor();
|
||||
|
@ -165,7 +165,7 @@ void ImplConvertTransparentAction( GDIMetaFile& o_rMtf,
|
||||
// #i10613# Respect transparency for draw color
|
||||
if( nTransparency )
|
||||
{
|
||||
o_rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR|PUSH_FILLCOLOR ) );
|
||||
o_rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR|PushFlags::FILLCOLOR ) );
|
||||
|
||||
// assume white background for alpha blending
|
||||
Color aLineColor( rStateOutDev.GetLineColor() );
|
||||
@ -1161,7 +1161,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
|
||||
VirtualDevice aPaintVDev; // into this one, we render.
|
||||
aPaintVDev.SetBackground( aBackgroundComponent.aBgColor );
|
||||
|
||||
rOutMtf.AddAction( new MetaPushAction( PUSH_MAPMODE ) );
|
||||
rOutMtf.AddAction( new MetaPushAction( PushFlags::MAPMODE ) );
|
||||
rOutMtf.AddAction( new MetaMapModeAction() );
|
||||
|
||||
aPaintVDev.SetDrawMode( GetDrawMode() );
|
||||
@ -1372,7 +1372,7 @@ void Printer::DrawGradientEx( OutputDevice* pOut, const Rectangle& rRect, const
|
||||
( (long) rEndColor.GetBlue() * rGradient.GetEndIntensity() ) / 100L ) >> 1;
|
||||
const Color aColor( (sal_uInt8) nR, (sal_uInt8) nG, (sal_uInt8) nB );
|
||||
|
||||
pOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
|
||||
pOut->Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
|
||||
pOut->SetLineColor( aColor );
|
||||
pOut->SetFillColor( aColor );
|
||||
pOut->DrawRect( rRect );
|
||||
|
@ -1010,7 +1010,7 @@ static void appendSubPage( GDIMetaFile& o_rMtf, const Rectangle& i_rClipRect, GD
|
||||
io_rSubPage.Clip( i_rClipRect );
|
||||
|
||||
// save gstate
|
||||
o_rMtf.AddAction( new MetaPushAction( PUSH_ALL ) );
|
||||
o_rMtf.AddAction( new MetaPushAction( PushFlags::ALL ) );
|
||||
|
||||
// clip to page rect
|
||||
o_rMtf.AddAction( new MetaClipRegionAction( vcl::Region( i_rClipRect ), true ) );
|
||||
@ -1026,7 +1026,7 @@ static void appendSubPage( GDIMetaFile& o_rMtf, const Rectangle& i_rClipRect, GD
|
||||
if( i_bDrawBorder )
|
||||
{
|
||||
// save gstate
|
||||
o_rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR | PUSH_FILLCOLOR | PUSH_CLIPREGION | PUSH_MAPMODE ) );
|
||||
o_rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR | PushFlags::FILLCOLOR | PushFlags::CLIPREGION | PushFlags::MAPMODE ) );
|
||||
o_rMtf.AddAction( new MetaMapModeAction( MapMode( MAP_100TH_MM ) ) );
|
||||
|
||||
Rectangle aBorderRect( i_rClipRect );
|
||||
|
@ -117,7 +117,7 @@ namespace vcl
|
||||
,m_aZoom( _rControl.GetZoom() )
|
||||
,m_bRTLEnabled( _rControl.IsRTLEnabled() )
|
||||
{
|
||||
m_rTargetDevice.Push( PUSH_MAPMODE | PUSH_FONT | PUSH_TEXTLAYOUTMODE );
|
||||
m_rTargetDevice.Push( PushFlags::MAPMODE | PushFlags::FONT | PushFlags::TEXTLAYOUTMODE );
|
||||
|
||||
MapMode aTargetMapMode( m_rTargetDevice.GetMapMode() );
|
||||
OSL_ENSURE( aTargetMapMode.GetOrigin() == Point(), "ReferenceDeviceTextLayout::ReferenceDeviceTextLayout: uhm, the code below won't work here ..." );
|
||||
@ -147,7 +147,7 @@ namespace vcl
|
||||
_rTargetDevice.SetFont( aDrawFont );
|
||||
|
||||
// transfer font to the reference device
|
||||
m_rReferenceDevice.Push( PUSH_FONT | PUSH_TEXTLAYOUTMODE );
|
||||
m_rReferenceDevice.Push( PushFlags::FONT | PushFlags::TEXTLAYOUTMODE );
|
||||
Font aRefFont( m_aUnzoomedPointFont );
|
||||
aRefFont.SetSize( OutputDevice::LogicToLogic(
|
||||
aRefFont.GetSize(), MAP_POINT, m_rReferenceDevice.GetMapMode().GetMapUnit() ) );
|
||||
|
@ -387,7 +387,7 @@ void VirtualDevice::ImplFillOpaqueRectangle( const Rectangle& rRect )
|
||||
// Set line and fill color to black (->opaque),
|
||||
// fill rect with that (linecolor, too, because of
|
||||
// those pesky missing pixel problems)
|
||||
Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
|
||||
Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
|
||||
SetLineColor( COL_BLACK );
|
||||
SetFillColor( COL_BLACK );
|
||||
DrawRect( rRect );
|
||||
|
@ -77,7 +77,7 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize,
|
||||
cCmpVal = 255;
|
||||
|
||||
Color aCol( cCmpVal, cCmpVal, cCmpVal );
|
||||
Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
|
||||
Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
|
||||
SetLineColor( aCol );
|
||||
SetFillColor( aCol );
|
||||
DrawRect( Rectangle( rDestPt, rDestSize ) );
|
||||
|
@ -56,7 +56,7 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly,
|
||||
{
|
||||
Color aColor = GetSingleColorGradientFill();
|
||||
|
||||
Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
|
||||
Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
|
||||
SetLineColor( aColor );
|
||||
SetFillColor( aColor );
|
||||
DrawPolyPolygon( rPolyPoly );
|
||||
@ -84,7 +84,7 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly,
|
||||
mpMetaFile->AddAction( new MetaCommentAction( "XGRAD_SEQ_BEGIN" ) );
|
||||
mpMetaFile->AddAction( new MetaGradientExAction( rPolyPoly, rGradient ) );
|
||||
|
||||
Push( PUSH_CLIPREGION );
|
||||
Push( PushFlags::CLIPREGION );
|
||||
IntersectClipRegion(vcl::Region(rPolyPoly));
|
||||
DrawGradient( aBoundRect, rGradient );
|
||||
Pop();
|
||||
@ -112,7 +112,7 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly,
|
||||
return;
|
||||
|
||||
// secure clip region
|
||||
Push( PUSH_CLIPREGION );
|
||||
Push( PushFlags::CLIPREGION );
|
||||
IntersectClipRegion( aBoundRect );
|
||||
|
||||
if( mbInitClipRegion )
|
||||
@ -655,7 +655,7 @@ void OutputDevice::AddGradientActions( const Rectangle& rRect, const Gradient& r
|
||||
GDIMetaFile* pOldMtf = mpMetaFile;
|
||||
|
||||
mpMetaFile = &rMtf;
|
||||
mpMetaFile->AddAction( new MetaPushAction( PUSH_ALL ) );
|
||||
mpMetaFile->AddAction( new MetaPushAction( PushFlags::ALL ) );
|
||||
mpMetaFile->AddAction( new MetaISectRectClipRegionAction( aRect ) );
|
||||
mpMetaFile->AddAction( new MetaLineColorAction( Color(), false ) );
|
||||
|
||||
|
@ -102,7 +102,7 @@ void OutputDevice::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch&
|
||||
|
||||
mpMetaFile = NULL;
|
||||
EnableMapMode( false );
|
||||
Push( PUSH_LINECOLOR );
|
||||
Push( PushFlags::LINECOLOR );
|
||||
SetLineColor( aHatch.GetColor() );
|
||||
InitLineColor();
|
||||
DrawHatch( aPolyPoly, aHatch, false );
|
||||
@ -127,7 +127,7 @@ void OutputDevice::AddHatchActions( const tools::PolyPolygon& rPolyPoly, const H
|
||||
GDIMetaFile* pOldMtf = mpMetaFile;
|
||||
|
||||
mpMetaFile = &rMtf;
|
||||
mpMetaFile->AddAction( new MetaPushAction( PUSH_ALL ) );
|
||||
mpMetaFile->AddAction( new MetaPushAction( PushFlags::ALL ) );
|
||||
mpMetaFile->AddAction( new MetaLineColorAction( rHatch.GetColor(), true ) );
|
||||
DrawHatch( aPolyPoly, rHatch, true );
|
||||
mpMetaFile->AddAction( new MetaPopAction() );
|
||||
|
@ -42,25 +42,25 @@
|
||||
|
||||
OutDevState::~OutDevState()
|
||||
{
|
||||
if ( mnFlags & PUSH_LINECOLOR )
|
||||
if ( mnFlags & PushFlags::LINECOLOR )
|
||||
delete mpLineColor;
|
||||
if ( mnFlags & PUSH_FILLCOLOR )
|
||||
if ( mnFlags & PushFlags::FILLCOLOR )
|
||||
delete mpFillColor;
|
||||
if ( mnFlags & PUSH_FONT )
|
||||
if ( mnFlags & PushFlags::FONT )
|
||||
delete mpFont;
|
||||
if ( mnFlags & PUSH_TEXTCOLOR )
|
||||
if ( mnFlags & PushFlags::TEXTCOLOR )
|
||||
delete mpTextColor;
|
||||
if ( mnFlags & PUSH_TEXTFILLCOLOR )
|
||||
if ( mnFlags & PushFlags::TEXTFILLCOLOR )
|
||||
delete mpTextFillColor;
|
||||
if ( mnFlags & PUSH_TEXTLINECOLOR )
|
||||
if ( mnFlags & PushFlags::TEXTLINECOLOR )
|
||||
delete mpTextLineColor;
|
||||
if ( mnFlags & PUSH_OVERLINECOLOR )
|
||||
if ( mnFlags & PushFlags::OVERLINECOLOR )
|
||||
delete mpOverlineColor;
|
||||
if ( mnFlags & PUSH_MAPMODE )
|
||||
if ( mnFlags & PushFlags::MAPMODE )
|
||||
delete mpMapMode;
|
||||
if ( mnFlags & PUSH_CLIPREGION )
|
||||
if ( mnFlags & PushFlags::CLIPREGION )
|
||||
delete mpClipRegion;
|
||||
if ( mnFlags & PUSH_REFPOINT )
|
||||
if ( mnFlags & PushFlags::REFPOINT )
|
||||
delete mpRefPoint;
|
||||
}
|
||||
|
||||
@ -75,66 +75,66 @@ void OutputDevice::Push( PushFlags nFlags )
|
||||
|
||||
pState->mnFlags = nFlags;
|
||||
|
||||
if ( nFlags & PUSH_LINECOLOR )
|
||||
if ( nFlags & PushFlags::LINECOLOR )
|
||||
{
|
||||
if ( mbLineColor )
|
||||
pState->mpLineColor = new Color( maLineColor );
|
||||
else
|
||||
pState->mpLineColor = NULL;
|
||||
}
|
||||
if ( nFlags & PUSH_FILLCOLOR )
|
||||
if ( nFlags & PushFlags::FILLCOLOR )
|
||||
{
|
||||
if ( mbFillColor )
|
||||
pState->mpFillColor = new Color( maFillColor );
|
||||
else
|
||||
pState->mpFillColor = NULL;
|
||||
}
|
||||
if ( nFlags & PUSH_FONT )
|
||||
if ( nFlags & PushFlags::FONT )
|
||||
pState->mpFont = new vcl::Font( maFont );
|
||||
if ( nFlags & PUSH_TEXTCOLOR )
|
||||
if ( nFlags & PushFlags::TEXTCOLOR )
|
||||
pState->mpTextColor = new Color( GetTextColor() );
|
||||
if ( nFlags & PUSH_TEXTFILLCOLOR )
|
||||
if ( nFlags & PushFlags::TEXTFILLCOLOR )
|
||||
{
|
||||
if ( IsTextFillColor() )
|
||||
pState->mpTextFillColor = new Color( GetTextFillColor() );
|
||||
else
|
||||
pState->mpTextFillColor = NULL;
|
||||
}
|
||||
if ( nFlags & PUSH_TEXTLINECOLOR )
|
||||
if ( nFlags & PushFlags::TEXTLINECOLOR )
|
||||
{
|
||||
if ( IsTextLineColor() )
|
||||
pState->mpTextLineColor = new Color( GetTextLineColor() );
|
||||
else
|
||||
pState->mpTextLineColor = NULL;
|
||||
}
|
||||
if ( nFlags & PUSH_OVERLINECOLOR )
|
||||
if ( nFlags & PushFlags::OVERLINECOLOR )
|
||||
{
|
||||
if ( IsOverlineColor() )
|
||||
pState->mpOverlineColor = new Color( GetOverlineColor() );
|
||||
else
|
||||
pState->mpOverlineColor = NULL;
|
||||
}
|
||||
if ( nFlags & PUSH_TEXTALIGN )
|
||||
if ( nFlags & PushFlags::TEXTALIGN )
|
||||
pState->meTextAlign = GetTextAlign();
|
||||
if( nFlags & PUSH_TEXTLAYOUTMODE )
|
||||
if( nFlags & PushFlags::TEXTLAYOUTMODE )
|
||||
pState->mnTextLayoutMode = GetLayoutMode();
|
||||
if( nFlags & PUSH_TEXTLANGUAGE )
|
||||
if( nFlags & PushFlags::TEXTLANGUAGE )
|
||||
pState->meTextLanguage = GetDigitLanguage();
|
||||
if ( nFlags & PUSH_RASTEROP )
|
||||
if ( nFlags & PushFlags::RASTEROP )
|
||||
pState->meRasterOp = GetRasterOp();
|
||||
if ( nFlags & PUSH_MAPMODE )
|
||||
if ( nFlags & PushFlags::MAPMODE )
|
||||
{
|
||||
pState->mpMapMode = new MapMode( maMapMode );
|
||||
pState->mbMapActive = mbMap;
|
||||
}
|
||||
if ( nFlags & PUSH_CLIPREGION )
|
||||
if ( nFlags & PushFlags::CLIPREGION )
|
||||
{
|
||||
if ( mbClipRegion )
|
||||
pState->mpClipRegion = new vcl::Region( maRegion );
|
||||
else
|
||||
pState->mpClipRegion = NULL;
|
||||
}
|
||||
if ( nFlags & PUSH_REFPOINT )
|
||||
if ( nFlags & PushFlags::REFPOINT )
|
||||
{
|
||||
if ( mbRefPoint )
|
||||
pState->mpRefPoint = new Point( maRefPoint );
|
||||
@ -167,7 +167,7 @@ void OutputDevice::Pop()
|
||||
if( mpAlphaVDev )
|
||||
mpAlphaVDev->Pop();
|
||||
|
||||
if ( rState.mnFlags & PUSH_LINECOLOR )
|
||||
if ( rState.mnFlags & PushFlags::LINECOLOR )
|
||||
{
|
||||
if ( rState.mpLineColor )
|
||||
SetLineColor( *rState.mpLineColor );
|
||||
@ -175,7 +175,7 @@ void OutputDevice::Pop()
|
||||
SetLineColor();
|
||||
}
|
||||
|
||||
if ( rState.mnFlags & PUSH_FILLCOLOR )
|
||||
if ( rState.mnFlags & PushFlags::FILLCOLOR )
|
||||
{
|
||||
if ( rState.mpFillColor )
|
||||
SetFillColor( *rState.mpFillColor );
|
||||
@ -183,13 +183,13 @@ void OutputDevice::Pop()
|
||||
SetFillColor();
|
||||
}
|
||||
|
||||
if ( rState.mnFlags & PUSH_FONT )
|
||||
if ( rState.mnFlags & PushFlags::FONT )
|
||||
SetFont( *rState.mpFont );
|
||||
|
||||
if ( rState.mnFlags & PUSH_TEXTCOLOR )
|
||||
if ( rState.mnFlags & PushFlags::TEXTCOLOR )
|
||||
SetTextColor( *rState.mpTextColor );
|
||||
|
||||
if ( rState.mnFlags & PUSH_TEXTFILLCOLOR )
|
||||
if ( rState.mnFlags & PushFlags::TEXTFILLCOLOR )
|
||||
{
|
||||
if ( rState.mpTextFillColor )
|
||||
SetTextFillColor( *rState.mpTextFillColor );
|
||||
@ -197,7 +197,7 @@ void OutputDevice::Pop()
|
||||
SetTextFillColor();
|
||||
}
|
||||
|
||||
if ( rState.mnFlags & PUSH_TEXTLINECOLOR )
|
||||
if ( rState.mnFlags & PushFlags::TEXTLINECOLOR )
|
||||
{
|
||||
if ( rState.mpTextLineColor )
|
||||
SetTextLineColor( *rState.mpTextLineColor );
|
||||
@ -205,7 +205,7 @@ void OutputDevice::Pop()
|
||||
SetTextLineColor();
|
||||
}
|
||||
|
||||
if ( rState.mnFlags & PUSH_OVERLINECOLOR )
|
||||
if ( rState.mnFlags & PushFlags::OVERLINECOLOR )
|
||||
{
|
||||
if ( rState.mpOverlineColor )
|
||||
SetOverlineColor( *rState.mpOverlineColor );
|
||||
@ -213,19 +213,19 @@ void OutputDevice::Pop()
|
||||
SetOverlineColor();
|
||||
}
|
||||
|
||||
if ( rState.mnFlags & PUSH_TEXTALIGN )
|
||||
if ( rState.mnFlags & PushFlags::TEXTALIGN )
|
||||
SetTextAlign( rState.meTextAlign );
|
||||
|
||||
if( rState.mnFlags & PUSH_TEXTLAYOUTMODE )
|
||||
if( rState.mnFlags & PushFlags::TEXTLAYOUTMODE )
|
||||
SetLayoutMode( rState.mnTextLayoutMode );
|
||||
|
||||
if( rState.mnFlags & PUSH_TEXTLANGUAGE )
|
||||
if( rState.mnFlags & PushFlags::TEXTLANGUAGE )
|
||||
SetDigitLanguage( rState.meTextLanguage );
|
||||
|
||||
if ( rState.mnFlags & PUSH_RASTEROP )
|
||||
if ( rState.mnFlags & PushFlags::RASTEROP )
|
||||
SetRasterOp( rState.meRasterOp );
|
||||
|
||||
if ( rState.mnFlags & PUSH_MAPMODE )
|
||||
if ( rState.mnFlags & PushFlags::MAPMODE )
|
||||
{
|
||||
if ( rState.mpMapMode )
|
||||
SetMapMode( *rState.mpMapMode );
|
||||
@ -234,10 +234,10 @@ void OutputDevice::Pop()
|
||||
mbMap = rState.mbMapActive;
|
||||
}
|
||||
|
||||
if ( rState.mnFlags & PUSH_CLIPREGION )
|
||||
if ( rState.mnFlags & PushFlags::CLIPREGION )
|
||||
SetDeviceClipRegion( rState.mpClipRegion );
|
||||
|
||||
if ( rState.mnFlags & PUSH_REFPOINT )
|
||||
if ( rState.mnFlags & PushFlags::REFPOINT )
|
||||
{
|
||||
if ( rState.mpRefPoint )
|
||||
SetRefPoint( *rState.mpRefPoint );
|
||||
|
@ -126,7 +126,7 @@ void OutputDevice::DrawCheckered(const Point& rPos, const Size& rSize, sal_uInt3
|
||||
const sal_uInt32 nMaxX(rPos.X() + rSize.Width());
|
||||
const sal_uInt32 nMaxY(rPos.Y() + rSize.Height());
|
||||
|
||||
Push(PUSH_LINECOLOR|PUSH_FILLCOLOR);
|
||||
Push(PushFlags::LINECOLOR|PushFlags::FILLCOLOR);
|
||||
SetLineColor();
|
||||
|
||||
for(sal_uInt32 x(0), nX(rPos.X()); nX < nMaxX; x++, nX += nLen)
|
||||
|
@ -1201,11 +1201,11 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( OUString& rStr,
|
||||
if( nEndIndex < nMinIndex )
|
||||
nEndIndex = nMinIndex;
|
||||
|
||||
if( (mnTextLayoutMode & TEXT_LAYOUT_BIDI_RTL) != 0 )
|
||||
if( mnTextLayoutMode & TEXT_LAYOUT_BIDI_RTL )
|
||||
nLayoutFlags |= SAL_LAYOUT_BIDI_RTL;
|
||||
if( (mnTextLayoutMode & TEXT_LAYOUT_BIDI_STRONG) != 0 )
|
||||
if( mnTextLayoutMode & TEXT_LAYOUT_BIDI_STRONG )
|
||||
nLayoutFlags |= SAL_LAYOUT_BIDI_STRONG;
|
||||
else if( 0 == (mnTextLayoutMode & TEXT_LAYOUT_BIDI_RTL) )
|
||||
else if( !(mnTextLayoutMode & TEXT_LAYOUT_BIDI_RTL) )
|
||||
{
|
||||
// disable Bidi if no RTL hint and no RTL codes used
|
||||
const sal_Unicode* pStr = rStr.getStr() + nMinIndex;
|
||||
@ -1226,9 +1226,9 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( OUString& rStr,
|
||||
if( maFont.IsVertical() )
|
||||
nLayoutFlags |= SAL_LAYOUT_VERTICAL;
|
||||
|
||||
if( (mnTextLayoutMode & TEXT_LAYOUT_ENABLE_LIGATURES) != 0 )
|
||||
if( mnTextLayoutMode & TEXT_LAYOUT_ENABLE_LIGATURES )
|
||||
nLayoutFlags |= SAL_LAYOUT_ENABLE_LIGATURES;
|
||||
else if( (mnTextLayoutMode & TEXT_LAYOUT_COMPLEX_DISABLED) != 0 )
|
||||
else if( mnTextLayoutMode & TEXT_LAYOUT_COMPLEX_DISABLED )
|
||||
nLayoutFlags |= SAL_LAYOUT_COMPLEX_DISABLED;
|
||||
else
|
||||
{
|
||||
@ -1273,10 +1273,10 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( OUString& rStr,
|
||||
}
|
||||
|
||||
// right align for RTL text, DRAWPOS_REVERSED, RTL window style
|
||||
bool bRightAlign = ((mnTextLayoutMode & TEXT_LAYOUT_BIDI_RTL) != 0);
|
||||
if( (mnTextLayoutMode & TEXT_LAYOUT_TEXTORIGIN_LEFT) != 0 )
|
||||
bool bRightAlign = bool(mnTextLayoutMode & TEXT_LAYOUT_BIDI_RTL);
|
||||
if( mnTextLayoutMode & TEXT_LAYOUT_TEXTORIGIN_LEFT )
|
||||
bRightAlign = false;
|
||||
else if ( (mnTextLayoutMode & TEXT_LAYOUT_TEXTORIGIN_RIGHT) != 0 )
|
||||
else if ( mnTextLayoutMode & TEXT_LAYOUT_TEXTORIGIN_RIGHT )
|
||||
bRightAlign = true;
|
||||
// SSA: hack for western office, ie text get right aligned
|
||||
// for debugging purposes of mirrored UI
|
||||
@ -1620,7 +1620,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r
|
||||
// Set clipping
|
||||
if ( nStyle & TEXT_DRAW_CLIP )
|
||||
{
|
||||
rTargetDevice.Push( PUSH_CLIPREGION );
|
||||
rTargetDevice.Push( PushFlags::CLIPREGION );
|
||||
rTargetDevice.IntersectClipRegion( rRect );
|
||||
}
|
||||
|
||||
@ -1737,7 +1737,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r
|
||||
|
||||
if ( nStyle & TEXT_DRAW_CLIP )
|
||||
{
|
||||
rTargetDevice.Push( PUSH_CLIPREGION );
|
||||
rTargetDevice.Push( PushFlags::CLIPREGION );
|
||||
rTargetDevice.IntersectClipRegion( rRect );
|
||||
_rLayout.DrawText( aPos, aStr, 0, aStr.getLength(), pVector, pDisplayText );
|
||||
if ( bDrawMnemonics )
|
||||
|
@ -653,7 +653,7 @@ void OutputDevice::ImplDrawStrikeoutChar( long nBaseX, long nBaseY,
|
||||
aPixelRect = aPoly.GetBoundRect();
|
||||
}
|
||||
|
||||
Push( PUSH_CLIPREGION );
|
||||
Push( PushFlags::CLIPREGION );
|
||||
IntersectClipRegion( PixelToLogic(aPixelRect) );
|
||||
if( mbInitClipRegion )
|
||||
InitClipRegion();
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user