summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/filter/wmf/wmfwr.hxx2
-rw-r--r--vcl/source/gdi/gdimetafiletools.cxx6
-rw-r--r--vcl/source/gdi/gdimtf.cxx6
-rw-r--r--vcl/source/gdi/metaact.cxx8
-rw-r--r--vcl/source/gdi/pdfwriter.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx14
-rw-r--r--vcl/source/gdi/pdfwriter_impl.hxx6
-rw-r--r--vcl/source/outdev/outdevstate.cxx2
8 files changed, 24 insertions, 22 deletions
diff --git a/vcl/source/filter/wmf/wmfwr.hxx b/vcl/source/filter/wmf/wmfwr.hxx
index 13bf796e901b..378ece4d4078 100644
--- a/vcl/source/filter/wmf/wmfwr.hxx
+++ b/vcl/source/filter/wmf/wmfwr.hxx
@@ -40,7 +40,7 @@ struct WMFWriterAttrStackMember
Font aFont;
MapMode aMapMode;
Region aClipRegion;
- sal_uInt16 nFlags;
+ PushFlags nFlags;
};
class StarSymbolToMSMultiFont;
diff --git a/vcl/source/gdi/gdimetafiletools.cxx b/vcl/source/gdi/gdimetafiletools.cxx
index 04d52cb036c8..a0afe289a93f 100644
--- a/vcl/source/gdi/gdimetafiletools.cxx
+++ b/vcl/source/gdi/gdimetafiletools.cxx
@@ -270,7 +270,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
GDIMetaFile aTarget;
bool bChanged(false);
std::vector< basegfx::B2DPolyPolygon > aClips;
- std::vector< sal_uInt16 > aPushFlags;
+ std::vector< PushFlags > aPushFlags;
std::vector< MapMode > aMapModes;
// start with empty region
@@ -367,7 +367,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
case META_PUSH_ACTION :
{
const MetaPushAction* pA = static_cast< const MetaPushAction* >(pAction);
- const sal_uInt16 nFlags(pA->GetFlags());
+ const PushFlags nFlags(pA->GetFlags());
aPushFlags.push_back(nFlags);
@@ -388,7 +388,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
if(aPushFlags.size())
{
- const sal_uInt16 nFlags(aPushFlags.back());
+ const PushFlags nFlags(aPushFlags.back());
aPushFlags.pop_back();
if(nFlags & PUSH_CLIPREGION)
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 5217f2561ee8..480e0ab68d94 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -1402,7 +1402,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
aMapVDev.SetMapMode( GetPrefMapMode() );
std::vector<Rectangle> aClipStack( 1, Rectangle() );
- std::vector<sal_uInt16> aPushFlagStack;
+ std::vector<PushFlags> aPushFlagStack;
Rectangle aBound;
@@ -1789,7 +1789,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaPushAction* pAct = (MetaPushAction*) pAction;
aPushFlagStack.push_back( pAct->GetFlags() );
- if( (aPushFlagStack.back() & PUSH_CLIPREGION) != 0 )
+ if( aPushFlagStack.back() & PUSH_CLIPREGION )
{
Rectangle aRect( aClipStack.back() );
aClipStack.push_back( aRect );
@@ -1800,7 +1800,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
// sanity check
if( ! aPushFlagStack.empty() )
{
- if( (aPushFlagStack.back() & PUSH_CLIPREGION) != 0 )
+ if( aPushFlagStack.back() & PUSH_CLIPREGION )
{
if( aClipStack.size() > 1 )
aClipStack.pop_back();
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index cad74be4c1d3..93dbfa6aace7 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -3106,13 +3106,13 @@ void MetaFontAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
MetaPushAction::MetaPushAction() :
MetaAction ( META_PUSH_ACTION ),
- mnFlags ( 0 )
+ mnFlags ( PUSH_NONE )
{}
MetaPushAction::~MetaPushAction()
{}
-MetaPushAction::MetaPushAction( sal_uInt16 nFlags ) :
+MetaPushAction::MetaPushAction( PushFlags nFlags ) :
MetaAction ( META_PUSH_ACTION ),
mnFlags ( nFlags )
{}
@@ -3144,7 +3144,9 @@ void MetaPushAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
void MetaPushAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
VersionCompat aCompat(rIStm, STREAM_READ);
- rIStm.ReadUInt16( mnFlags );
+ sal_uInt16 tmp;
+ rIStm.ReadUInt16( tmp );
+ mnFlags = static_cast<PushFlags>(tmp);
}
MetaPopAction::MetaPopAction() :
diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx
index 8acf85f6e0f1..81e29a9a1c35 100644
--- a/vcl/source/gdi/pdfwriter.cxx
+++ b/vcl/source/gdi/pdfwriter.cxx
@@ -224,7 +224,7 @@ void PDFWriter::EndTransparencyGroup( const Rectangle& rRect, sal_uInt16 nTransp
pImplementation->endTransparencyGroup( rRect, nTransparentPercent );
}
-void PDFWriter::Push( sal_uInt16 nFlags )
+void PDFWriter::Push( PushFlags nFlags )
{
pImplementation->push( nFlags );
}
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 8b18321d7665..e9a14792ec0b 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -4681,7 +4681,7 @@ void PDFWriterImpl::createDefaultPushButtonAppearance( PDFWidget& rButton, const
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
// save graphics state
- push( sal::static_int_cast<sal_uInt16>(~0U) );
+ push( PUSH_ALL );
// transform relative to control's coordinates since an
// appearance stream is a form XObject
@@ -4788,7 +4788,7 @@ void PDFWriterImpl::createDefaultEditAppearance( PDFWidget& rEdit, const PDFWrit
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
SvMemoryStream* pEditStream = new SvMemoryStream( 1024, 1024 );
- push( sal::static_int_cast<sal_uInt16>(~0U) );
+ push( PUSH_ALL );
// prepare font to use, draw field border
Font aFont = drawFieldBorder( rEdit, rWidget, rSettings );
@@ -4840,7 +4840,7 @@ void PDFWriterImpl::createDefaultListBoxAppearance( PDFWidget& rBox, const PDFWr
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
SvMemoryStream* pListBoxStream = new SvMemoryStream( 1024, 1024 );
- push( sal::static_int_cast<sal_uInt16>(~0U) );
+ push( PUSH_ALL );
// prepare font to use, draw field border
Font aFont = drawFieldBorder( rBox, rWidget, rSettings );
@@ -4891,7 +4891,7 @@ void PDFWriterImpl::createDefaultCheckBoxAppearance( PDFWidget& rBox, const PDFW
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
// save graphics state
- push( sal::static_int_cast<sal_uInt16>(~0U) );
+ push( PUSH_ALL );
if( rWidget.Background || rWidget.Border )
{
@@ -5016,7 +5016,7 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const P
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
// save graphics state
- push( sal::static_int_cast<sal_uInt16>(~0U) );
+ push( PUSH_ALL );
if( rWidget.Background || rWidget.Border )
{
@@ -5104,7 +5104,7 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const P
rBox.m_aRect = aCheckRect;
// create appearance streams
- push( sal::static_int_cast<sal_uInt16>(~0U) );
+ push( PUSH_ALL);
SvMemoryStream* pCheckStream = new SvMemoryStream( 256, 256 );
beginRedirect( pCheckStream, aCheckRect );
@@ -10604,7 +10604,7 @@ void PDFWriterImpl::setFont( const Font& rFont )
m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateFont;
}
-void PDFWriterImpl::push( sal_uInt16 nFlags )
+void PDFWriterImpl::push( PushFlags nFlags )
{
OSL_ENSURE( !m_aGraphicsStack.empty(), "invalid graphics stack" );
m_aGraphicsStack.push_front( m_aGraphicsStack.front() );
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index ed4013befcd8..201528131b1c 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -713,7 +713,7 @@ private:
ComplexTextLayoutMode m_nLayoutMode;
LanguageType m_aDigitLanguage;
sal_Int32 m_nTransparentPercent;
- sal_uInt16 m_nFlags;
+ PushFlags m_nFlags;
sal_uInt16 m_nUpdateFlags;
static const sal_uInt16 updateFont = 0x0001;
@@ -738,7 +738,7 @@ private:
m_nLayoutMode( TEXT_LAYOUT_DEFAULT ),
m_aDigitLanguage( 0 ),
m_nTransparentPercent( 0 ),
- m_nFlags( 0xffff ),
+ m_nFlags( PUSH_ALL ),
m_nUpdateFlags( 0xffff )
{}
GraphicsState( const GraphicsState& rState ) :
@@ -1104,7 +1104,7 @@ public:
{ m_aContext.DocumentLocale = rLoc; }
/* graphics state */
- void push( sal_uInt16 nFlags );
+ void push( PushFlags nFlags );
void pop();
void setFont( const Font& rFont );
diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx
index 21a7727dfe55..77dfe722fa0e 100644
--- a/vcl/source/outdev/outdevstate.cxx
+++ b/vcl/source/outdev/outdevstate.cxx
@@ -65,7 +65,7 @@ OutDevState::~OutDevState()
}
-void OutputDevice::Push( sal_uInt16 nFlags )
+void OutputDevice::Push( PushFlags nFlags )
{
if ( mpMetaFile )