diff options
Diffstat (limited to 'svtools/source/graphic')
-rw-r--r-- | svtools/source/graphic/descriptor.cxx | 29 | ||||
-rw-r--r-- | svtools/source/graphic/descriptor.hxx | 3 | ||||
-rw-r--r-- | svtools/source/graphic/graphic.cxx | 29 | ||||
-rw-r--r-- | svtools/source/graphic/graphic.hxx | 3 | ||||
-rw-r--r-- | svtools/source/graphic/graphicunofactory.cxx | 3 | ||||
-rw-r--r-- | svtools/source/graphic/grfattr.cxx | 3 | ||||
-rw-r--r-- | svtools/source/graphic/grfcache.cxx | 36 | ||||
-rw-r--r-- | svtools/source/graphic/grfcache.hxx | 4 | ||||
-rw-r--r-- | svtools/source/graphic/grfmgr.cxx | 151 | ||||
-rw-r--r-- | svtools/source/graphic/grfmgr2.cxx | 16 | ||||
-rw-r--r-- | svtools/source/graphic/provider.cxx | 45 | ||||
-rw-r--r-- | svtools/source/graphic/renderer.cxx | 29 | ||||
-rw-r--r-- | svtools/source/graphic/transformer.cxx | 6 | ||||
-rw-r--r-- | svtools/source/graphic/transformer.hxx | 3 |
14 files changed, 116 insertions, 244 deletions
diff --git a/svtools/source/graphic/descriptor.cxx b/svtools/source/graphic/descriptor.cxx index 395d3dfea0de..d76b50b54a01 100644 --- a/svtools/source/graphic/descriptor.cxx +++ b/svtools/source/graphic/descriptor.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,11 +31,11 @@ #include "descriptor.hxx" -#include <rtl/uuid.h> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <unotools/ucbstreamhelper.hxx> #include <svtools/filter.hxx> #include <svl/itemprop.hxx> +#include <comphelper/servicehelper.hxx> #include <com/sun/star/beans/PropertyState.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> @@ -304,28 +305,22 @@ uno::Sequence< uno::Type > SAL_CALL GraphicDescriptor::getTypes() return aTypes; } -// ------------------------------------------------------------------------------ +namespace +{ + class theGraphicDescriptorUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theGraphicDescriptorUnoTunnelId > {}; +} uno::Sequence< sal_Int8 > SAL_CALL GraphicDescriptor::getImplementationId() throw( uno::RuntimeException ) { - vos::OGuard aGuard( Application::GetSolarMutex() ); - static uno::Sequence< sal_Int8 > aId; - - if( aId.getLength() == 0 ) - { - aId.realloc( 16 ); - rtl_createUuid( reinterpret_cast< sal_uInt8* >( aId.getArray() ), 0, sal_True ); - } - - return aId; + return theGraphicDescriptorUnoTunnelId::get().getSeq(); } // ------------------------------------------------------------------------------ ::comphelper::PropertySetInfo* GraphicDescriptor::createPropertySetInfo() { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; ::comphelper::PropertySetInfo* pRet = new ::comphelper::PropertySetInfo(); static ::comphelper::PropertyMapEntry aEntries[] = @@ -364,7 +359,7 @@ void GraphicDescriptor::_setPropertyValues( const comphelper::PropertyMapEntry** void GraphicDescriptor::_getPropertyValues( const comphelper::PropertyMapEntry** ppEntries, uno::Any* pValues ) throw( beans::UnknownPropertyException, lang::WrappedTargetException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; while( *ppEntries ) { @@ -409,7 +404,7 @@ void GraphicDescriptor::_getPropertyValues( const comphelper::PropertyMapEntry** } if( !aMimeType.getLength() && ( mpGraphic->GetType() != GRAPHIC_NONE ) ) - aMimeType = ::rtl::OUString::createFromAscii( MIMETYPE_VCLGRAPHIC ); + aMimeType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( MIMETYPE_VCLGRAPHIC )); } else aMimeType = maMimeType; @@ -497,3 +492,5 @@ void GraphicDescriptor::_getPropertyValues( const comphelper::PropertyMapEntry** } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/graphic/descriptor.hxx b/svtools/source/graphic/descriptor.hxx index 2a8c06723eb6..2eeff29b9927 100644 --- a/svtools/source/graphic/descriptor.hxx +++ b/svtools/source/graphic/descriptor.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -138,3 +139,5 @@ private: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/graphic/graphic.cxx b/svtools/source/graphic/graphic.cxx index 52c03c611241..cf212d9d8fce 100644 --- a/svtools/source/graphic/graphic.cxx +++ b/svtools/source/graphic/graphic.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,13 +29,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include <rtl/uuid.h> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include <com/sun/star/graphic/GraphicType.hpp> #include <com/sun/star/graphic/XGraphicTransformer.hpp> #include <vcl/graph.hxx> #include "graphic.hxx" +#include <comphelper/servicehelper.hxx> using namespace com::sun::star; @@ -113,19 +114,15 @@ void SAL_CALL Graphic::release() throw() // ------------------------------------------------------------------------------ +namespace +{ + class theGraphicUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theGraphicUnoTunnelId > {}; +} + uno::Sequence< sal_Int8 > SAL_CALL Graphic::getImplementationId_Static() throw(uno::RuntimeException) { - vos::OGuard aGuard( Application::GetSolarMutex() ); - static uno::Sequence< sal_Int8 > aId; - - if( aId.getLength() == 0 ) - { - aId.realloc( 16 ); - rtl_createUuid( reinterpret_cast< sal_uInt8* >( aId.getArray() ), 0, sal_True ); - } - - return aId; + return theGraphicUnoTunnelId::get().getSeq(); } // ------------------------------------------------------------------------------ @@ -235,7 +232,7 @@ uno::Sequence< sal_Int8 > SAL_CALL Graphic::getImplementationId() awt::Size SAL_CALL Graphic::getSize( ) throw (uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; ::Size aVclSize; if( mpGraphic && ( mpGraphic->GetType() != GRAPHIC_NONE ) ) @@ -248,7 +245,7 @@ awt::Size SAL_CALL Graphic::getSize( ) throw (uno::RuntimeException) uno::Sequence< ::sal_Int8 > SAL_CALL Graphic::getDIB( ) throw (uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( mpGraphic && ( mpGraphic->GetType() != GRAPHIC_NONE ) ) { @@ -266,7 +263,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL Graphic::getDIB( ) throw (uno::RuntimeExce uno::Sequence< ::sal_Int8 > SAL_CALL Graphic::getMaskDIB( ) throw (uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if( mpGraphic && ( mpGraphic->GetType() != GRAPHIC_NONE ) ) { @@ -298,3 +295,5 @@ sal_Int64 SAL_CALL Graphic::getSomething( const uno::Sequence< sal_Int8 >& rId ) } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/graphic/graphic.hxx b/svtools/source/graphic/graphic.hxx index 1a6594a3e543..a82c9cca7ced 100644 --- a/svtools/source/graphic/graphic.hxx +++ b/svtools/source/graphic/graphic.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -101,3 +102,5 @@ private: } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/graphic/graphicunofactory.cxx b/svtools/source/graphic/graphicunofactory.cxx index f29b34b66743..c1e2f13068de 100644 --- a/svtools/source/graphic/graphicunofactory.cxx +++ b/svtools/source/graphic/graphicunofactory.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -101,3 +102,5 @@ sdecl::class_<GObjectImpl, sdecl::with_args<true> > serviceBI; extern sdecl::ServiceDecl const serviceDecl( serviceBI, "com.sun.star.graphic.GraphicObject", "com.sun.star.graphic.GraphicObject" ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/graphic/grfattr.cxx b/svtools/source/graphic/grfattr.cxx index 68c0ea9ae4a7..a85cd90df079 100644 --- a/svtools/source/graphic/grfattr.cxx +++ b/svtools/source/graphic/grfattr.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -116,3 +117,5 @@ SvStream& operator<<( SvStream& rOStm, const GraphicAttr& rAttr ) return rOStm; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx index cd8125a6cc79..df7bfa9f88b1 100644 --- a/svtools/source/graphic/grfcache.cxx +++ b/svtools/source/graphic/grfcache.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,7 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include <vos/timer.hxx> +#include <salhelper/timer.hxx> #include <tools/debug.hxx> #include <vcl/outdev.hxx> #include <tools/poly.hxx> @@ -117,7 +118,7 @@ GraphicID::GraphicID( const GraphicObject& rObj ) { const GDIMetaFile aMtf( rGraphic.GetGDIMetaFile() ); - mnID1 |= ( aMtf.GetActionCount() & 0x0fffffff ); + mnID1 |= ( aMtf.GetActionSize() & 0x0fffffff ); mnID2 = aMtf.GetPrefSize().Width(); mnID3 = aMtf.GetPrefSize().Height(); mnID4 = rGraphic.GetChecksum(); @@ -170,7 +171,6 @@ private: sal_Bool mbSwappedAll; sal_Bool ImplInit( const GraphicObject& rObj ); - sal_Bool ImplMatches( const GraphicObject& rObj ) const { return( GraphicID( rObj ) == maID ); } void ImplFillSubstitute( Graphic& rSubstitute ); public: @@ -409,7 +409,7 @@ class GraphicDisplayCacheEntry { private: - ::vos::TTimeValue maReleaseTime; + ::salhelper::TTimeValue maReleaseTime; const GraphicCacheEntry* mpRefCacheEntry; GDIMetaFile* mpMtf; BitmapEx* mpBmpEx; @@ -462,8 +462,8 @@ public: sal_uLong GetOutDevDrawMode() const { return mnOutDevDrawMode; } sal_uInt16 GetOutDevBitCount() const { return mnOutDevBitCount; } - void SetReleaseTime( const ::vos::TTimeValue& rReleaseTime ) { maReleaseTime = rReleaseTime; } - const ::vos::TTimeValue& GetReleaseTime() const { return maReleaseTime; } + void SetReleaseTime( const ::salhelper::TTimeValue& rReleaseTime ) { maReleaseTime = rReleaseTime; } + const ::salhelper::TTimeValue& GetReleaseTime() const { return maReleaseTime; } sal_Bool Matches( OutputDevice* pOut, const Point& /*rPtPixel*/, const Size& rSzPixel, const GraphicCacheEntry* pCacheEntry, const GraphicAttr& rAttr ) const @@ -512,7 +512,7 @@ sal_uLong GraphicDisplayCacheEntry::GetNeededSize( OutputDevice* pOut, const Poi } else { - DBG_ERROR( "GraphicDisplayCacheEntry::GetNeededSize(): pOut->GetBitCount() == 0" ); + OSL_FAIL( "GraphicDisplayCacheEntry::GetNeededSize(): pOut->GetBitCount() == 0" ); nNeededSize = 256000; } } @@ -801,12 +801,12 @@ void GraphicCache::SetCacheTimeout( sal_uLong nTimeoutSeconds ) if( mnReleaseTimeoutSeconds != nTimeoutSeconds ) { GraphicDisplayCacheEntry* pDisplayEntry = (GraphicDisplayCacheEntry*) maDisplayCache.First(); - ::vos::TTimeValue aReleaseTime; + ::salhelper::TTimeValue aReleaseTime; if( ( mnReleaseTimeoutSeconds = nTimeoutSeconds ) != 0 ) { osl_getSystemTime( &aReleaseTime ); - aReleaseTime.addTime( ::vos::TTimeValue( nTimeoutSeconds, 0 ) ); + aReleaseTime.addTime( ::salhelper::TTimeValue( nTimeoutSeconds, 0 ) ); } while( pDisplayEntry ) @@ -897,10 +897,10 @@ sal_Bool GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& r if( GetCacheTimeout() ) { - ::vos::TTimeValue aReleaseTime; + ::salhelper::TTimeValue aReleaseTime; osl_getSystemTime( &aReleaseTime ); - aReleaseTime.addTime( ::vos::TTimeValue( GetCacheTimeout(), 0 ) ); + aReleaseTime.addTime( ::salhelper::TTimeValue( GetCacheTimeout(), 0 ) ); pNewEntry->SetReleaseTime( aReleaseTime ); } @@ -931,10 +931,10 @@ sal_Bool GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& r if( GetCacheTimeout() ) { - ::vos::TTimeValue aReleaseTime; + ::salhelper::TTimeValue aReleaseTime; osl_getSystemTime( &aReleaseTime ); - aReleaseTime.addTime( ::vos::TTimeValue( GetCacheTimeout(), 0 ) ); + aReleaseTime.addTime( ::salhelper::TTimeValue( GetCacheTimeout(), 0 ) ); pNewEntry->SetReleaseTime( aReleaseTime ); } @@ -961,7 +961,7 @@ sal_Bool GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt { if( pDisplayCacheEntry->Matches( pOut, aPtPixel, aSzPixel, pCacheEntry, rAttr ) ) { - ::vos::TTimeValue aReleaseTime; + ::salhelper::TTimeValue aReleaseTime; // put found object at last used position maDisplayCache.Insert( maDisplayCache.Remove( pDisplayCacheEntry ), LIST_APPEND ); @@ -969,7 +969,7 @@ sal_Bool GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt if( GetCacheTimeout() ) { osl_getSystemTime( &aReleaseTime ); - aReleaseTime.addTime( ::vos::TTimeValue( GetCacheTimeout(), 0 ) ); + aReleaseTime.addTime( ::salhelper::TTimeValue( GetCacheTimeout(), 0 ) ); } pDisplayCacheEntry->SetReleaseTime( aReleaseTime ); @@ -1036,14 +1036,14 @@ IMPL_LINK( GraphicCache, ReleaseTimeoutHdl, Timer*, pTimer ) { pTimer->Stop(); - ::vos::TTimeValue aCurTime; + ::salhelper::TTimeValue aCurTime; GraphicDisplayCacheEntry* pDisplayEntry = (GraphicDisplayCacheEntry*) maDisplayCache.First(); osl_getSystemTime( &aCurTime ); while( pDisplayEntry ) { - const ::vos::TTimeValue& rReleaseTime = pDisplayEntry->GetReleaseTime(); + const ::salhelper::TTimeValue& rReleaseTime = pDisplayEntry->GetReleaseTime(); if( !rReleaseTime.isEmpty() && ( rReleaseTime < aCurTime ) ) { @@ -1060,3 +1060,5 @@ IMPL_LINK( GraphicCache, ReleaseTimeoutHdl, Timer*, pTimer ) return 0; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/graphic/grfcache.hxx b/svtools/source/graphic/grfcache.hxx index 0885667aa2b7..cfa946f6bca9 100644 --- a/svtools/source/graphic/grfcache.hxx +++ b/svtools/source/graphic/grfcache.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,7 +29,6 @@ #ifndef _GRFCACHE_HXX #define _GRFCACHE_HXX -#include <tools/list.hxx> #include <vcl/graph.hxx> #include <vcl/timer.hxx> #include <svtools/grfmgr.hxx> @@ -107,3 +107,5 @@ public: }; #endif // _GRFCACHE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx index 9241cbd04d51..19b09e8f67a7 100644 --- a/svtools/source/graphic/grfmgr.cxx +++ b/svtools/source/graphic/grfmgr.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -44,27 +45,13 @@ #include <unotools/cacheoptions.hxx> #include <svtools/grfmgr.hxx> -// --> OD 2010-01-04 #i105243# #include <vcl/pdfextoutdevdata.hxx> -// <-- - -// ----------- -// - Defines - -// ----------- #define WATERMARK_LUM_OFFSET 50 #define WATERMARK_CON_OFFSET -70 -// ----------- -// - statics - -// ----------- - GraphicManager* GraphicObject::mpGlobalMgr = NULL; -// --------------------- -// - GrfDirectCacheObj - -// --------------------- - struct GrfSimpleCacheObj { Graphic maGraphic; @@ -74,14 +61,8 @@ struct GrfSimpleCacheObj maGraphic( rGraphic ), maAttr( rAttr ) {} }; -// ----------------- -// - GraphicObject - -// ----------------- - TYPEINIT1_AUTOFACTORY( GraphicObject, SvDataCopyStream ); -// ----------------------------------------------------------------------------- - GraphicObject::GraphicObject( const GraphicManager* pMgr ) : mpLink ( NULL ), mpUserData ( NULL ) @@ -91,8 +72,6 @@ GraphicObject::GraphicObject( const GraphicManager* pMgr ) : ImplSetGraphicManager( pMgr ); } -// ----------------------------------------------------------------------------- - GraphicObject::GraphicObject( const Graphic& rGraphic, const GraphicManager* pMgr ) : maGraphic ( rGraphic ), mpLink ( NULL ), @@ -103,8 +82,6 @@ GraphicObject::GraphicObject( const Graphic& rGraphic, const GraphicManager* pMg ImplSetGraphicManager( pMgr ); } -// ----------------------------------------------------------------------------- - GraphicObject::GraphicObject( const Graphic& rGraphic, const String& rLink, const GraphicManager* pMgr ) : maGraphic ( rGraphic ), mpLink ( rLink.Len() ? ( new String( rLink ) ) : NULL ), @@ -115,8 +92,6 @@ GraphicObject::GraphicObject( const Graphic& rGraphic, const String& rLink, cons ImplSetGraphicManager( pMgr ); } -// ----------------------------------------------------------------------------- - GraphicObject::GraphicObject( const GraphicObject& rGraphicObj, const GraphicManager* pMgr ) : SvDataCopyStream(), maGraphic ( rGraphicObj.GetGraphic() ), @@ -129,8 +104,6 @@ GraphicObject::GraphicObject( const GraphicObject& rGraphicObj, const GraphicMan ImplSetGraphicManager( pMgr, NULL, &rGraphicObj ); } -// ----------------------------------------------------------------------------- - GraphicObject::GraphicObject( const ByteString& rUniqueID, const GraphicManager* pMgr ) : mpLink ( NULL ), mpUserData ( NULL ) @@ -146,8 +119,6 @@ GraphicObject::GraphicObject( const ByteString& rUniqueID, const GraphicManager* ImplAssignGraphicData(); } -// ----------------------------------------------------------------------------- - GraphicObject::~GraphicObject() { if( mpMgr ) @@ -165,8 +136,6 @@ GraphicObject::~GraphicObject() delete mpSimpleCache; } -// ----------------------------------------------------------------------------- - void GraphicObject::ImplConstruct() { mpMgr = NULL; @@ -179,8 +148,6 @@ void GraphicObject::ImplConstruct() mbIsInSwapOut = sal_False; } -// ----------------------------------------------------------------------------- - void GraphicObject::ImplAssignGraphicData() { maPrefSize = maGraphic.GetPrefSize(); @@ -196,8 +163,6 @@ void GraphicObject::ImplAssignGraphicData() mnAnimationLoopCount = ( mbAnimated ? maGraphic.GetAnimationLoopCount() : 0 ); } -// ----------------------------------------------------------------------------- - void GraphicObject::ImplSetGraphicManager( const GraphicManager* pMgr, const ByteString* pID, const GraphicObject* pCopyObj ) { if( !mpMgr || ( pMgr != mpMgr ) ) @@ -235,8 +200,6 @@ void GraphicObject::ImplSetGraphicManager( const GraphicManager* pMgr, const Byt } } -// ----------------------------------------------------------------------------- - void GraphicObject::ImplAutoSwapIn() { if( IsSwappedOut() ) @@ -299,7 +262,6 @@ void GraphicObject::ImplAutoSwapIn() } } -// ----------------------------------------------------------------------------- sal_Bool GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz, const GraphicAttr* pAttr, PolyPolygon& rClipPolyPoly, sal_Bool& bRectClipRegion ) const { @@ -310,9 +272,6 @@ sal_Bool GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& Polygon aClipPoly( Rectangle( rPt, rSz ) ); const sal_uInt16 nRot10 = pAttr->GetRotation() % 3600; const Point aOldOrigin( rPt ); - // --> OD 2005-09-30 #i54875# - It's not needed to get the graphic again. -// const Graphic& rGraphic = GetGraphic(); - // <-- const MapMode aMap100( MAP_100TH_MM ); Size aSize100; long nTotalWidth, nTotalHeight; @@ -329,12 +288,6 @@ sal_Bool GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rClipPolyPoly = aClipPoly; - // --> OD 2005-09-30 #i54875# - directly access member <maGraphic> to - // get <PrefSize> and <PrefMapMode>. -// if( rGraphic.GetPrefMapMode() == MAP_PIXEL ) -// aSize100 = Application::GetDefaultDevice()->PixelToLogic( rGraphic.GetPrefSize(), aMap100 ); -// else -// aSize100 = pOut->LogicToLogic( rGraphic.GetPrefSize(), rGraphic.GetPrefMapMode(), aMap100 ); if( maGraphic.GetPrefMapMode() == MAP_PIXEL ) aSize100 = Application::GetDefaultDevice()->PixelToLogic( maGraphic.GetPrefSize(), aMap100 ); else @@ -342,7 +295,6 @@ sal_Bool GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& MapMode m(maGraphic.GetPrefMapMode()); aSize100 = pOut->LogicToLogic( maGraphic.GetPrefSize(), &m, &aMap100 ); } - // <-- nTotalWidth = aSize100.Width() - pAttr->GetLeftCrop() - pAttr->GetRightCrop(); nTotalHeight = aSize100.Height() - pAttr->GetTopCrop() - pAttr->GetBottomCrop(); @@ -381,8 +333,6 @@ sal_Bool GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& return bRet; } -// ----------------------------------------------------------------------------- - GraphicObject& GraphicObject::operator=( const GraphicObject& rGraphicObj ) { if( &rGraphicObj != this ) @@ -408,8 +358,6 @@ GraphicObject& GraphicObject::operator=( const GraphicObject& rGraphicObj ) return *this; } -// ----------------------------------------------------------------------------- - sal_Bool GraphicObject::operator==( const GraphicObject& rGraphicObj ) const { return( ( rGraphicObj.maGraphic == maGraphic ) && @@ -417,29 +365,21 @@ sal_Bool GraphicObject::operator==( const GraphicObject& rGraphicObj ) const ( rGraphicObj.GetLink() == GetLink() ) ); } -// ------------------------------------------------------------------------ - void GraphicObject::Load( SvStream& rIStm ) { rIStm >> *this; } -// ------------------------------------------------------------------------ - void GraphicObject::Save( SvStream& rOStm ) { rOStm << *this; } -// ------------------------------------------------------------------------ - void GraphicObject::Assign( const SvDataCopyStream& rCopyStream ) { *this = (const GraphicObject& ) rCopyStream; } -// ----------------------------------------------------------------------------- - ByteString GraphicObject::GetUniqueID() const { if ( !IsInSwapIn() && ( IsEPS() || IsRenderGraphic() ) ) @@ -453,30 +393,22 @@ ByteString GraphicObject::GetUniqueID() const return aRet; } -// ----------------------------------------------------------------------------- - sal_uLong GraphicObject::GetChecksum() const { return( ( maGraphic.IsSupportedGraphic() && !maGraphic.IsSwapOut() ) ? maGraphic.GetChecksum() : 0 ); } -// ----------------------------------------------------------------------------- - SvStream* GraphicObject::GetSwapStream() const { return( HasSwapStreamHdl() ? (SvStream*) mpSwapStreamHdl->Call( (void*) this ) : GRFMGR_AUTOSWAPSTREAM_NONE ); } -// ----------------------------------------------------------------------------- - // !!! to be removed sal_uLong GraphicObject::GetReleaseFromCache() const { return 0; } -// ----------------------------------------------------------------------------- - void GraphicObject::SetAttr( const GraphicAttr& rAttr ) { maAttr = rAttr; @@ -485,23 +417,17 @@ void GraphicObject::SetAttr( const GraphicAttr& rAttr ) delete mpSimpleCache, mpSimpleCache = NULL; } -// ----------------------------------------------------------------------------- - void GraphicObject::SetLink() { if( mpLink ) delete mpLink, mpLink = NULL; } -// ----------------------------------------------------------------------------- - void GraphicObject::SetLink( const String& rLink ) { delete mpLink, mpLink = new String( rLink ); } -// ----------------------------------------------------------------------------- - String GraphicObject::GetLink() const { if( mpLink ) @@ -510,23 +436,17 @@ String GraphicObject::GetLink() const return String(); } -// ----------------------------------------------------------------------------- - void GraphicObject::SetUserData() { if( mpUserData ) delete mpUserData, mpUserData = NULL; } -// ----------------------------------------------------------------------------- - void GraphicObject::SetUserData( const String& rUserData ) { delete mpUserData, mpUserData = new String( rUserData ); } -// ----------------------------------------------------------------------------- - String GraphicObject::GetUserData() const { if( mpUserData ) @@ -535,8 +455,6 @@ String GraphicObject::GetUserData() const return String(); } -// ----------------------------------------------------------------------------- - void GraphicObject::SetSwapStreamHdl() { if( mpSwapStreamHdl ) @@ -546,8 +464,6 @@ void GraphicObject::SetSwapStreamHdl() } } -// ----------------------------------------------------------------------------- - void GraphicObject::SetSwapStreamHdl( const Link& rHdl, const sal_uLong nSwapOutTimeout ) { delete mpSwapStreamHdl, mpSwapStreamHdl = new Link( rHdl ); @@ -567,8 +483,6 @@ void GraphicObject::SetSwapStreamHdl( const Link& rHdl, const sal_uLong nSwapOut delete mpSwapOutTimer, mpSwapOutTimer = NULL; } -// ----------------------------------------------------------------------------- - Link GraphicObject::GetSwapStreamHdl() const { if( mpSwapStreamHdl ) @@ -577,22 +491,16 @@ Link GraphicObject::GetSwapStreamHdl() const return Link(); } -// ----------------------------------------------------------------------------- - void GraphicObject::FireSwapInRequest() { ImplAutoSwapIn(); } -// ----------------------------------------------------------------------------- - void GraphicObject::FireSwapOutRequest() { ImplAutoSwapOutHdl( NULL ); } -// ----------------------------------------------------------------------------- - void GraphicObject::GraphicManagerDestroyed() { // we're alive, but our manager doesn't live anymore ==> connect to default manager @@ -600,15 +508,11 @@ void GraphicObject::GraphicManagerDestroyed() ImplSetGraphicManager( NULL ); } -// ----------------------------------------------------------------------------- - void GraphicObject::SetGraphicManager( const GraphicManager& rMgr ) { ImplSetGraphicManager( &rMgr ); } -// ----------------------------------------------------------------------------- - sal_Bool GraphicObject::IsCached( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicAttr* pAttr, sal_uLong nFlags ) const { @@ -616,10 +520,6 @@ sal_Bool GraphicObject::IsCached( OutputDevice* pOut, const Point& rPt, const Si if( nFlags & GRFMGR_DRAW_CACHED ) { - // --> OD 2005-10-11 #i54875# - Consider cropped graphics. - // Note: The graphic manager caches a cropped graphic with its - // uncropped position and size. -// bRet = mpMgr->IsInCache( pOut, rPt, rSz, *this, ( pAttr ? *pAttr : GetAttr() ) ); Point aPt( rPt ); Size aSz( rSz ); if ( pAttr->IsCropped() ) @@ -636,30 +536,22 @@ sal_Bool GraphicObject::IsCached( OutputDevice* pOut, const Point& rPt, const Si return bRet; } -// ----------------------------------------------------------------------------- - void GraphicObject::ReleaseFromCache() { mpMgr->ReleaseFromCache( *this ); } -// ----------------------------------------------------------------------------- - void GraphicObject::SetAnimationNotifyHdl( const Link& rLink ) { maGraphic.SetAnimationNotifyHdl( rLink ); } -// ----------------------------------------------------------------------------- - List* GraphicObject::GetAnimationInfoList() const { return maGraphic.GetAnimationInfoList(); } -// ----------------------------------------------------------------------------- - sal_Bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicAttr* pAttr, sal_uLong nFlags ) { @@ -737,7 +629,7 @@ sal_Bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& return bRet; } -// --> OD 2010-01-04 #i105243# +// #i105243# sal_Bool GraphicObject::DrawWithPDFHandling( OutputDevice& rOutDev, const Point& rPt, const Size& rSz, const GraphicAttr* pGrfAttr, @@ -797,9 +689,6 @@ sal_Bool GraphicObject::DrawWithPDFHandling( OutputDevice& rOutDev, return bRet; } -// <-- - -// ----------------------------------------------------------------------------- sal_Bool GraphicObject::DrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSize, const Size& rOffset, const GraphicAttr* pAttr, sal_uLong nFlags, int nTileCacheSize1D ) @@ -823,8 +712,6 @@ sal_Bool GraphicObject::DrawTiled( OutputDevice* pOut, const Rectangle& rArea, c return ImplDrawTiled( pOut, rArea, aOutTileSize, rOffset, pAttr, nFlags, nTileCacheSize1D ); } -// ----------------------------------------------------------------------------- - sal_Bool GraphicObject::StartAnimation( OutputDevice* pOut, const Point& rPt, const Size& rSz, long nExtraData, const GraphicAttr* pAttr, sal_uLong /*nFlags*/, OutputDevice* pFirstFrameOutDev ) @@ -883,16 +770,12 @@ sal_Bool GraphicObject::StartAnimation( OutputDevice* pOut, const Point& rPt, co return bRet; } -// ----------------------------------------------------------------------------- - void GraphicObject::StopAnimation( OutputDevice* pOut, long nExtraData ) { if( mpSimpleCache ) mpSimpleCache->maGraphic.StopAnimation( pOut, nExtraData ); } -// ----------------------------------------------------------------------------- - const Graphic& GraphicObject::GetGraphic() const { if( mbAutoSwapped ) @@ -901,8 +784,6 @@ const Graphic& GraphicObject::GetGraphic() const return maGraphic; } -// ----------------------------------------------------------------------------- - void GraphicObject::SetGraphic( const Graphic& rGraphic, const GraphicObject* pCopyObj ) { mpMgr->ImplUnregisterObj( *this ); @@ -922,16 +803,12 @@ void GraphicObject::SetGraphic( const Graphic& rGraphic, const GraphicObject* pC mpSwapOutTimer->Start(); } -// ----------------------------------------------------------------------------- - void GraphicObject::SetGraphic( const Graphic& rGraphic, const String& rLink ) { SetGraphic( rGraphic ); mpLink = new String( rLink ); } -// ----------------------------------------------------------------------------- - Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMode& rDestMap, const GraphicAttr& rAttr ) const { // #104550# Extracted from svx/source/svdraw/svdograf.cxx @@ -1116,8 +993,6 @@ Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMo return aTransGraphic; } -// ----------------------------------------------------------------------------- - Graphic GraphicObject::GetTransformedGraphic( const GraphicAttr* pAttr ) const // TODO: Change to Impl { GetGraphic(); @@ -1168,8 +1043,6 @@ Graphic GraphicObject::GetTransformedGraphic( const GraphicAttr* pAttr ) const / return aGraphic; } -// ----------------------------------------------------------------------------- - void GraphicObject::ResetAnimationLoopCount() { if( IsAnimated() && !IsSwappedOut() ) @@ -1181,8 +1054,6 @@ void GraphicObject::ResetAnimationLoopCount() } } -// ----------------------------------------------------------------------------- - sal_Bool GraphicObject::SwapOut() { sal_Bool bRet = ( !mbAutoSwapped ? maGraphic.SwapOut() : sal_False ); @@ -1193,8 +1064,6 @@ sal_Bool GraphicObject::SwapOut() return bRet; } -// ----------------------------------------------------------------------------- - sal_Bool GraphicObject::SwapOut( SvStream* pOStm ) { sal_Bool bRet = ( !mbAutoSwapped ? maGraphic.SwapOut( pOStm ) : sal_False ); @@ -1205,8 +1074,6 @@ sal_Bool GraphicObject::SwapOut( SvStream* pOStm ) return bRet; } -// ----------------------------------------------------------------------------- - sal_Bool GraphicObject::SwapIn() { sal_Bool bRet; @@ -1232,8 +1099,6 @@ sal_Bool GraphicObject::SwapIn() return bRet; } -// ----------------------------------------------------------------------------- - sal_Bool GraphicObject::SwapIn( SvStream* pIStm ) { sal_Bool bRet; @@ -1259,8 +1124,6 @@ sal_Bool GraphicObject::SwapIn( SvStream* pIStm ) return bRet; } -// ----------------------------------------------------------------------------- - void GraphicObject::SetSwapState() { if( !IsSwappedOut() ) @@ -1272,8 +1135,6 @@ void GraphicObject::SetSwapState() } } -// ----------------------------------------------------------------------------- - IMPL_LINK( GraphicObject, ImplAutoSwapOutHdl, void*, EMPTYARG ) { if( !IsSwappedOut() ) @@ -1307,8 +1168,6 @@ IMPL_LINK( GraphicObject, ImplAutoSwapOutHdl, void*, EMPTYARG ) return 0L; } -// ------------------------------------------------------------------------ - SvStream& operator>>( SvStream& rIStm, GraphicObject& rGraphicObj ) { VersionCompat aCompat( rIStm, STREAM_READ ); @@ -1335,8 +1194,6 @@ SvStream& operator>>( SvStream& rIStm, GraphicObject& rGraphicObj ) return rIStm; } -// ------------------------------------------------------------------------ - SvStream& operator<<( SvStream& rOStm, const GraphicObject& rGraphicObj ) { VersionCompat aCompat( rOStm, STREAM_WRITE, 1 ); @@ -1354,7 +1211,7 @@ SvStream& operator<<( SvStream& rOStm, const GraphicObject& rGraphicObj ) GraphicObject GraphicObject::CreateGraphicObjectFromURL( const ::rtl::OUString &rURL ) { - const String aURL( rURL ), aPrefix( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_GRAPHOBJ_URLPREFIX) ); + const String aURL( rURL ), aPrefix( RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_GRAPHOBJ_URLPREFIX) ); if( aURL.Search( aPrefix ) == 0 ) { // graphic manager url @@ -1374,3 +1231,5 @@ GraphicObject GraphicObject::CreateGraphicObjectFromURL( const ::rtl::OUString & return GraphicObject( aGraphic ); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx index 4a6fb67187bc..1115635157a8 100644 --- a/svtools/source/graphic/grfmgr2.cxx +++ b/svtools/source/graphic/grfmgr2.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,7 +29,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include <vos/macros.hxx> #include <vcl/bmpacc.hxx> #include <tools/poly.hxx> #include <vcl/outdev.hxx> @@ -1355,14 +1355,16 @@ sal_Bool GraphicManager::ImplCreateRotatedScaled( const BitmapEx& rBmpEx, // create horizontal mapping table for( nX = 0L, nTmpX = aNewBound.Left() + nStartX; nX < nDstW; nX++ ) { - pCosX[ nX ] = FRound( fCosAngle * ( fTmp = nTmpX++ << 8 ) ); + fTmp = nTmpX++ << 8; + pCosX[ nX ] = FRound( fCosAngle * fTmp ); pSinX[ nX ] = FRound( fSinAngle * fTmp ); } // create vertical mapping table for( nY = 0L, nTmpY = aNewBound.Top() + nStartY; nY < nDstH; nY++ ) { - pCosY[ nY ] = FRound( fCosAngle * ( fTmp = nTmpY++ << 8 ) ); + fTmp = nTmpY++ << 8; + pCosY[ nY ] = FRound( fCosAngle * fTmp ); pSinY[ nY ] = FRound( fSinAngle * fTmp ); } @@ -1806,7 +1808,7 @@ void GraphicManager::ImplAdjust( GDIMetaFile& rMtf, const GraphicAttr& rAttr, sa if( ( nAdjustmentFlags & ADJUSTMENT_TRANSPARENCY ) && aAttr.IsTransparent() ) { - DBG_ERROR( "Missing implementation: Mtf-Transparency" ); + OSL_FAIL( "Missing implementation: Mtf-Transparency" ); } } @@ -1854,12 +1856,12 @@ void GraphicManager::ImplAdjust( Animation& rAnimation, const GraphicAttr& rAttr if( ( nAdjustmentFlags & ADJUSTMENT_ROTATE ) && aAttr.IsRotated() ) { - DBG_ERROR( "Missing implementation: Animation-Rotation" ); + OSL_FAIL( "Missing implementation: Animation-Rotation" ); } if( ( nAdjustmentFlags & ADJUSTMENT_TRANSPARENCY ) && aAttr.IsTransparent() ) { - DBG_ERROR( "Missing implementation: Animation-Transparency" ); + OSL_FAIL( "Missing implementation: Animation-Transparency" ); } } @@ -2381,3 +2383,5 @@ void GraphicObject::ImplTransformBitmap( BitmapEx& rBmpEx, } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx index 5645f7ee9ddf..a8785a5381b1 100644 --- a/svtools/source/graphic/provider.cxx +++ b/svtools/source/graphic/provider.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,8 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include <rtl/uuid.h> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include <vcl/image.hxx> #include <vcl/metaact.hxx> @@ -45,6 +45,7 @@ #include <vcl/virdev.hxx> #include <com/sun/star/io/XStream.hpp> #include <com/sun/star/text/GraphicCrop.hpp> +#include <comphelper/servicehelper.hxx> #include "descriptor.hxx" #include "graphic.hxx" @@ -142,21 +143,15 @@ uno::Sequence< uno::Type > SAL_CALL GraphicProvider::getTypes() return aTypes; } -// ------------------------------------------------------------------------------ +namespace +{ + class theGraphicProviderUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theGraphicProviderUnoTunnelId > {}; +} uno::Sequence< sal_Int8 > SAL_CALL GraphicProvider::getImplementationId() throw(uno::RuntimeException) { - vos::OGuard aGuard( Application::GetSolarMutex() ); - static uno::Sequence< sal_Int8 > aId; - - if( aId.getLength() == 0 ) - { - aId.realloc( 16 ); - rtl_createUuid( reinterpret_cast< sal_uInt8* >( aId.getArray() ), 0, sal_True ); - } - - return aId; + return theGraphicProviderUnoTunnelId::get().getSeq(); } // ------------------------------------------------------------------------------ @@ -231,19 +226,19 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadStandardImage( co if( ( 0 == rResourceURL.getToken( 0, '/', nIndex ).compareToAscii( "private:standardimage" ) ) ) { rtl::OUString sImageName( rResourceURL.copy( nIndex ) ); - if ( sImageName.equalsAscii( "info" ) ) + if ( sImageName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("info")) ) { xRet = InfoBox::GetStandardImage().GetXGraphic(); } - else if ( sImageName.equalsAscii( "warning" ) ) + else if ( sImageName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("warning")) ) { xRet = WarningBox::GetStandardImage().GetXGraphic(); } - else if ( sImageName.equalsAscii( "error" ) ) + else if ( sImageName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("error")) ) { xRet = ErrorBox::GetStandardImage().GetXGraphic(); } - else if ( sImageName.equalsAscii( "query" ) ) + else if ( sImageName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("query")) ) { xRet = QueryBox::GetStandardImage().GetXGraphic(); } @@ -497,13 +492,12 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( co if( pIStm ) { - ::GraphicFilter* pFilter = ::GraphicFilter::GetGraphicFilter(); + ::GraphicFilter& rFilter = ::GraphicFilter::GetGraphicFilter(); - if( pFilter ) { ::Graphic aVCLGraphic; - if( ( pFilter->ImportGraphic( aVCLGraphic, aPath, *pIStm ) == GRFILTER_OK ) && + if( ( rFilter.ImportGraphic( aVCLGraphic, aPath, *pIStm ) == GRFILTER_OK ) && ( aVCLGraphic.GetType() != GRAPHIC_NONE ) ) { ::unographic::Graphic* pUnoGraphic = new ::unographic::Graphic; @@ -657,7 +651,7 @@ void ImplApplyFilterData( ::Graphic& rGraphic, uno::Sequence< beans::PropertyVal aDummyVDev.EnableOutput( sal_False ); aDummyVDev.SetMapMode( aNewMapMode ); - for( sal_uInt32 i = 0, nObjCount = aMtf.GetActionCount(); i < nObjCount; i++ ) + for( size_t i = 0, nObjCount = aMtf.GetActionSize(); i < nObjCount; i++ ) { MetaAction* pAction = aMtf.GetAction( i ); switch( pAction->GetType() ) @@ -825,9 +819,8 @@ void SAL_CALL GraphicProvider::storeGraphic( const uno::Reference< ::graphic::XG if( pFilterShortName ) { - ::GraphicFilter* pFilter = ::GraphicFilter::GetGraphicFilter(); + ::GraphicFilter& rFilter = ::GraphicFilter::GetGraphicFilter(); - if( pFilter ) { const uno::Reference< XInterface > xIFace( rxGraphic, uno::UNO_QUERY ); const ::Graphic* pGraphic = ::unographic::Graphic::getImplementation( xIFace ); @@ -845,8 +838,8 @@ void SAL_CALL GraphicProvider::storeGraphic( const uno::Reference< ::graphic::XG aMemStrm << aGraphic; else { - pFilter->ExportGraphic( aGraphic, aPath, aMemStrm, - pFilter->GetExportFormatNumberForShortName( ::rtl::OUString::createFromAscii( pFilterShortName ) ), + rFilter.ExportGraphic( aGraphic, aPath, aMemStrm, + rFilter.GetExportFormatNumberForShortName( ::rtl::OUString::createFromAscii( pFilterShortName ) ), ( aFilterDataSeq.getLength() ? &aFilterDataSeq : NULL ) ); } aMemStrm.Seek( STREAM_SEEK_TO_END ); @@ -859,3 +852,5 @@ void SAL_CALL GraphicProvider::storeGraphic( const uno::Reference< ::graphic::XG } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/graphic/renderer.cxx b/svtools/source/graphic/renderer.cxx index b8a0ea73b92c..ef6385c1298c 100644 --- a/svtools/source/graphic/renderer.cxx +++ b/svtools/source/graphic/renderer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,13 +32,13 @@ #include <com/sun/star/beans/PropertyState.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/awt/Rectangle.hpp> -#include <rtl/uuid.h> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <comphelper/propertysetinfo.hxx> #include <svl/itemprop.hxx> #include <svtools/grfmgr.hxx> +#include <comphelper/servicehelper.hxx> #include "graphic.hxx" #include "renderer.hxx" @@ -191,28 +192,22 @@ uno::Sequence< uno::Type > SAL_CALL GraphicRendererVCL::getTypes() return aTypes; } -// ------------------------------------------------------------------------------ +namespace +{ + class theGraphicRendererVCLUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theGraphicRendererVCLUnoTunnelId > {}; +} uno::Sequence< sal_Int8 > SAL_CALL GraphicRendererVCL::getImplementationId() throw( uno::RuntimeException ) { - vos::OGuard aGuard( Application::GetSolarMutex() ); - static uno::Sequence< sal_Int8 > aId; - - if( aId.getLength() == 0 ) - { - aId.realloc( 16 ); - rtl_createUuid( reinterpret_cast< sal_uInt8* >( aId.getArray() ), 0, sal_True ); - } - - return aId; + return theGraphicRendererVCLUnoTunnelId::get().getSeq(); } // ------------------------------------------------------------------------------ ::comphelper::PropertySetInfo* GraphicRendererVCL::createPropertySetInfo() { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; ::comphelper::PropertySetInfo* pRet = new ::comphelper::PropertySetInfo(); static ::comphelper::PropertyMapEntry aEntries[] = @@ -238,7 +233,7 @@ void GraphicRendererVCL::_setPropertyValues( const comphelper::PropertyMapEntry* lang::IllegalArgumentException, lang::WrappedTargetException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; while( *ppEntries ) { @@ -290,7 +285,7 @@ void GraphicRendererVCL::_setPropertyValues( const comphelper::PropertyMapEntry* void GraphicRendererVCL::_getPropertyValues( const comphelper::PropertyMapEntry** ppEntries, uno::Any* pValues ) throw( beans::UnknownPropertyException, lang::WrappedTargetException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; while( *ppEntries ) { @@ -343,3 +338,5 @@ void SAL_CALL GraphicRendererVCL::render( const uno::Reference< graphic::XGraphi } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/graphic/transformer.cxx b/svtools/source/graphic/transformer.cxx index 5c234c8d5ecb..03c470d2ac69 100644 --- a/svtools/source/graphic/transformer.cxx +++ b/svtools/source/graphic/transformer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,8 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include <rtl/uuid.h> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include <vcl/image.hxx> #include <vcl/metaact.hxx> @@ -154,3 +154,5 @@ uno::Reference< graphic::XGraphic > SAL_CALL GraphicTransformer::colorChange( } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/graphic/transformer.hxx b/svtools/source/graphic/transformer.hxx index c4002bb4bbae..0ee340c40631 100644 --- a/svtools/source/graphic/transformer.hxx +++ b/svtools/source/graphic/transformer.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -61,3 +62,5 @@ class GraphicTransformer : public GraphicTransformer_UnoImplHelper1 } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |