diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-03-16 22:33:14 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-03-16 22:40:42 +0200 |
commit | 2976b53ff8c815f5f6a5deba1763fba153bd528f (patch) | |
tree | 178b9b8384f71f27c39922f3a30b432034375c49 /svtools | |
parent | 7956ff62ee9a4b82f64d19d51cccddd73bc49d1e (diff) |
Bin more pointless comments and ASCII graphics
Suggested Easy Hack: Replace all instances of // -------- comments
including surrounding newlines with a single newline.
Another Easy Hack, slightly harder to automate: Remove all the
pointless comments that just tell the class name right before the
declaration of that class.
Change-Id: Ia890ed613b53c5d719988697e20a983d62334123
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/inc/svtools/grfmgr.hxx | 32 | ||||
-rw-r--r-- | svtools/inc/svtools/transfer.hxx | 41 | ||||
-rw-r--r-- | svtools/source/config/printoptions.cxx | 99 | ||||
-rw-r--r-- | svtools/source/control/valueimp.hxx | 20 | ||||
-rw-r--r-- | svtools/source/graphic/grfcache.cxx | 92 |
5 files changed, 3 insertions, 281 deletions
diff --git a/svtools/inc/svtools/grfmgr.hxx b/svtools/inc/svtools/grfmgr.hxx index eca0aeb7949b..1ae07ad03111 100644 --- a/svtools/inc/svtools/grfmgr.hxx +++ b/svtools/inc/svtools/grfmgr.hxx @@ -23,10 +23,6 @@ #include <vcl/graph.hxx> #include <svtools/svtdllapi.h> -// ----------- -// - Defines - -// ----------- - #define GRFMGR_DRAW_NOTCACHED 0x00000000UL #define GRFMGR_DRAW_CACHED 0x00000001UL #define GRFMGR_DRAW_SMOOTHSCALE 0x00000002UL @@ -35,18 +31,14 @@ #define GRFMGR_DRAW_NO_SUBSTITUTE 0x00000010UL #define GRFMGR_DRAW_STANDARD (GRFMGR_DRAW_CACHED|GRFMGR_DRAW_SMOOTHSCALE) -// -------------------- -// - AutoSwap Defines - -// -------------------- +// AutoSwap defines #define GRFMGR_AUTOSWAPSTREAM_LINK ((SvStream*)0x00000000UL) #define GRFMGR_AUTOSWAPSTREAM_LOADED ((SvStream*)0xfffffffdUL) #define GRFMGR_AUTOSWAPSTREAM_TEMP ((SvStream*)0xfffffffeUL) #define GRFMGR_AUTOSWAPSTREAM_NONE ((SvStream*)0xffffffffUL) -// ---------------------- -// - Adjustment Defines - -// ---------------------- +// Adjustment defines #define ADJUSTMENT_NONE 0x00000000UL #define ADJUSTMENT_DRAWMODE 0x00000001UL @@ -56,10 +48,6 @@ #define ADJUSTMENT_TRANSPARENCY 0x00000010UL #define ADJUSTMENT_ALL 0xFFFFFFFFUL -// --------- -// - Enums - -// --------- - enum GraphicDrawMode { GRAPHICDRAWMODE_STANDARD = 0, @@ -68,10 +56,6 @@ enum GraphicDrawMode GRAPHICDRAWMODE_WATERMARK = 3 }; -// ------------ -// - Forwards - -// ------------ - class GraphicManager; class SvStream; class BitmapWriteAccess; @@ -80,10 +64,6 @@ class VirtualDevice; struct GrfSimpleCacheObj; struct ImplTileInfo; -// --------------- -// - GraphicAttr - -// --------------- - class SVT_DLLPUBLIC GraphicAttr { private: @@ -174,10 +154,6 @@ public: friend SvStream& operator>>( SvStream& rIStm, GraphicAttr& rAttr ); }; -// ----------------- -// - GraphicObject - -// ----------------- - class SVT_DLLPUBLIC GraphicObject : public SvDataCopyStream { friend class GraphicManager; @@ -519,10 +495,6 @@ public: static void InspectForGraphicObjectImageURL( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxIf, std::vector< rtl::OUString >& rvEmbedImgUrls ); }; -// ------------------ -// - GraphicManager - -// ------------------ - typedef ::std::vector< GraphicObject* > GraphicObjectList_impl; class SVT_DLLPUBLIC GraphicManager diff --git a/svtools/inc/svtools/transfer.hxx b/svtools/inc/svtools/transfer.hxx index d7f2a350cbee..342b29c51b0f 100644 --- a/svtools/inc/svtools/transfer.hxx +++ b/svtools/inc/svtools/transfer.hxx @@ -40,10 +40,6 @@ #include <com/sun/star/embed/Aspects.hpp> #include <com/sun/star/io/XInputStream.hpp> -// ------------------------ -// - Forward declarations - -// ------------------------ - class Bitmap; class GDIMetaFile; class Graphic; @@ -55,9 +51,7 @@ class FileList; class Window; class Link; -// --------------------- -// - Drag&Drop defines - -// --------------------- +// Drag&Drop defines #define DND_ACTION_NONE ::com::sun::star::datatransfer::dnd::DNDConstants::ACTION_NONE #define DND_ACTION_COPY ::com::sun::star::datatransfer::dnd::DNDConstants::ACTION_COPY @@ -68,10 +62,6 @@ class Link; #define DND_POINTER_NONE 0 #define DND_IMAGE_NONE 0 -// -------------------------------- -// - TransferableObjectDescriptor - -// -------------------------------- - struct TransferableObjectDescriptor { SvGlobalName maClassName; @@ -93,10 +83,6 @@ struct TransferableObjectDescriptor SVT_DLLPUBLIC friend SvStream& operator<<( SvStream& rOStm, const TransferableObjectDescriptor& rObjDesc ); }; -// ------------------- -// - AcceptDragEvent - -// ------------------- - struct AcceptDropEvent { sal_Int8 mnAction; @@ -121,10 +107,6 @@ struct AcceptDropEvent mbDefault( sal_False ) {} }; -// -------------------- -// - ExecuteDropEvent - -// -------------------- - struct ExecuteDropEvent { sal_Int8 mnAction; @@ -145,10 +127,6 @@ struct ExecuteDropEvent mbDefault( sal_False ) {} }; -// ---------------------- -// - TransferableHelper - -// ---------------------- - class SVT_DLLPUBLIC TransferableHelper : public ::cppu::WeakImplHelper4< ::com::sun::star::datatransfer::XTransferable, ::com::sun::star::datatransfer::clipboard::XClipboardOwner, ::com::sun::star::datatransfer::dnd::XDragSourceListener, @@ -285,10 +263,6 @@ public: virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw( ::com::sun::star::uno::RuntimeException ); }; -// -------------------------- -// - TransferableDataHelper - -// -------------------------- - struct TransferableDataHelper_Impl; class SVT_DLLPUBLIC TransferableDataHelper @@ -391,10 +365,6 @@ public: sal_Bool bCompareParameters = sal_False ); }; -// -------------------- -// - DragSourceHelper - -// -------------------- - class SVT_DLLPUBLIC DragSourceHelper { private: @@ -441,10 +411,6 @@ public: virtual ~DragSourceHelper(); }; -// -------------------- -// - DropTargetHelper - -// -------------------- - class SVT_DLLPUBLIC DropTargetHelper { private: @@ -513,11 +479,6 @@ public: }; - -//------------------------ -// TransferDataContainer -//------------------------ - struct TransferDataContainer_Impl; class SVT_DLLPUBLIC TransferDataContainer : public TransferableHelper diff --git a/svtools/source/config/printoptions.cxx b/svtools/source/config/printoptions.cxx index e67ddfd529d6..87e8e353b312 100644 --- a/svtools/source/config/printoptions.cxx +++ b/svtools/source/config/printoptions.cxx @@ -36,18 +36,11 @@ #include <itemholder2.hxx> #include <sal/macros.h> -// ----------- -// - statics - -// ----------- static sal_uInt16 aDPIArray[] = { 72, 96, 150, 200, 300, 600 }; #define DPI_COUNT (SAL_N_ELEMENTS(aDPIArray)) -// ----------- -// - Defines - -// ----------- - #define ROOTNODE_START OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Common/Print/Option")) #define ROOTNODE_PRINTOPTION OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Common/Print/Option")) @@ -63,19 +56,11 @@ static sal_uInt16 aDPIArray[] = { 72, 96, 150, 200, 300, 600 }; #define PROPERTYNAME_CONVERTTOGREYSCALES OUString(RTL_CONSTASCII_USTRINGPARAM("ConvertToGreyscales")) #define PROPERTYNAME_PDFASSTANDARDPRINTJOBFORMAT OUString(RTL_CONSTASCII_USTRINGPARAM("PDFAsStandardPrintJobFormat")) -// -------------- -// - Namespaces - -// -------------- - using namespace ::utl; using namespace ::rtl; using namespace ::osl; using namespace ::com::sun::star::uno; -// ----------- -// - statics - -// ----------- - static SvtPrintOptions_Impl* pPrinterOptionsDataContainer = NULL; static SvtPrintOptions_Impl* pPrintFileOptionsDataContainer = NULL; @@ -85,25 +70,12 @@ sal_Int32 SvtPrinterOptions::m_nRefCount = 0; SvtPrintOptions_Impl* SvtPrintFileOptions::m_pStaticDataContainer = NULL; sal_Int32 SvtPrintFileOptions::m_nRefCount = 0; -// ------------------------ -// - SvtPrintOptions_Impl - -// ------------------------ - class SvtPrintOptions_Impl { public: - -//--------------------------------------------------------------------------------------------------------- -// constructor / destructor -//--------------------------------------------------------------------------------------------------------- - SvtPrintOptions_Impl( const OUString& rConfigRoot ); ~SvtPrintOptions_Impl(); -//--------------------------------------------------------------------------------------------------------- -// public interface -//--------------------------------------------------------------------------------------------------------- - sal_Bool IsReduceTransparency() const ; sal_Int16 GetReducedTransparencyMode() const ; sal_Bool IsReduceGradients() const ; @@ -531,25 +503,14 @@ void SvtPrintOptions_Impl::impl_setValue (const ::rtl::OUString& sProp, } } -// ----------------------------------------------------------------------------- - - -// ----------------------- -// - SvtBasePrintOptions - -// ----------------------- - SvtBasePrintOptions::SvtBasePrintOptions() { } -// ----------------------------------------------------------------------------- - SvtBasePrintOptions::~SvtBasePrintOptions() { } -// ----------------------------------------------------------------------------- - Mutex& SvtBasePrintOptions::GetOwnStaticMutex() { // Initialize static mutex only for one time! @@ -572,184 +533,138 @@ Mutex& SvtBasePrintOptions::GetOwnStaticMutex() return *pMutex; } -// ----------------------------------------------------------------------------- - sal_Bool SvtBasePrintOptions::IsReduceTransparency() const { MutexGuard aGuard( GetOwnStaticMutex() ); return m_pDataContainer->IsReduceTransparency(); } -// ----------------------------------------------------------------------------- - sal_Int16 SvtBasePrintOptions::GetReducedTransparencyMode() const { MutexGuard aGuard( GetOwnStaticMutex() ); return m_pDataContainer->GetReducedTransparencyMode(); } -// ----------------------------------------------------------------------------- - sal_Bool SvtBasePrintOptions::IsReduceGradients() const { MutexGuard aGuard( GetOwnStaticMutex() ); return m_pDataContainer->IsReduceGradients(); } -// ----------------------------------------------------------------------------- - sal_Int16 SvtBasePrintOptions::GetReducedGradientMode() const { MutexGuard aGuard( GetOwnStaticMutex() ); return m_pDataContainer->GetReducedGradientMode(); } -// ----------------------------------------------------------------------------- - sal_Int16 SvtBasePrintOptions::GetReducedGradientStepCount() const { MutexGuard aGuard( GetOwnStaticMutex() ); return m_pDataContainer->GetReducedGradientStepCount(); } -// ----------------------------------------------------------------------------- - sal_Bool SvtBasePrintOptions::IsReduceBitmaps() const { MutexGuard aGuard( GetOwnStaticMutex() ); return m_pDataContainer->IsReduceBitmaps(); } -// ----------------------------------------------------------------------------- - sal_Int16 SvtBasePrintOptions::GetReducedBitmapMode() const { MutexGuard aGuard( GetOwnStaticMutex() ); return m_pDataContainer->GetReducedBitmapMode(); } -// ----------------------------------------------------------------------------- - sal_Int16 SvtBasePrintOptions::GetReducedBitmapResolution() const { MutexGuard aGuard( GetOwnStaticMutex() ); return m_pDataContainer->GetReducedBitmapResolution(); } -// ----------------------------------------------------------------------------- - sal_Bool SvtBasePrintOptions::IsReducedBitmapIncludesTransparency() const { MutexGuard aGuard( GetOwnStaticMutex() ); return m_pDataContainer->IsReducedBitmapIncludesTransparency(); } -// ----------------------------------------------------------------------------- - sal_Bool SvtBasePrintOptions::IsConvertToGreyscales() const { MutexGuard aGuard( GetOwnStaticMutex() ); return m_pDataContainer->IsConvertToGreyscales(); } -// ----------------------------------------------------------------------------- - sal_Bool SvtBasePrintOptions::IsPDFAsStandardPrintJobFormat() const { MutexGuard aGuard( GetOwnStaticMutex() ); return m_pDataContainer->IsPDFAsStandardPrintJobFormat(); } -// ----------------------------------------------------------------------------- - void SvtBasePrintOptions::SetReduceTransparency( sal_Bool bState ) { MutexGuard aGuard( GetOwnStaticMutex() ); m_pDataContainer->SetReduceTransparency( bState ) ; } -// ----------------------------------------------------------------------------- - void SvtBasePrintOptions::SetReducedTransparencyMode( sal_Int16 nMode ) { MutexGuard aGuard( GetOwnStaticMutex() ); m_pDataContainer->SetReducedTransparencyMode( nMode ); } -// ----------------------------------------------------------------------------- - void SvtBasePrintOptions::SetReduceGradients( sal_Bool bState ) { MutexGuard aGuard( GetOwnStaticMutex() ); m_pDataContainer->SetReduceGradients( bState ); } -// ----------------------------------------------------------------------------- - void SvtBasePrintOptions::SetReducedGradientMode( sal_Int16 nMode ) { MutexGuard aGuard( GetOwnStaticMutex() ); m_pDataContainer->SetReducedGradientMode( nMode ); } -// ----------------------------------------------------------------------------- - void SvtBasePrintOptions::SetReducedGradientStepCount( sal_Int16 nStepCount ) { MutexGuard aGuard( GetOwnStaticMutex() ); m_pDataContainer->SetReducedGradientStepCount( nStepCount ); } -// ----------------------------------------------------------------------------- - void SvtBasePrintOptions::SetReduceBitmaps( sal_Bool bState ) { MutexGuard aGuard( GetOwnStaticMutex() ); m_pDataContainer->SetReduceBitmaps( bState ); } -// ----------------------------------------------------------------------------- - void SvtBasePrintOptions::SetReducedBitmapMode( sal_Int16 nMode ) { MutexGuard aGuard( GetOwnStaticMutex() ); m_pDataContainer->SetReducedBitmapMode( nMode ); } -// ----------------------------------------------------------------------------- - void SvtBasePrintOptions::SetReducedBitmapResolution( sal_Int16 nResolution ) { MutexGuard aGuard( GetOwnStaticMutex() ); m_pDataContainer->SetReducedBitmapResolution( nResolution ); } -// ----------------------------------------------------------------------------- - void SvtBasePrintOptions::SetReducedBitmapIncludesTransparency( sal_Bool bState ) { MutexGuard aGuard( GetOwnStaticMutex() ); m_pDataContainer->SetReducedBitmapIncludesTransparency( bState ); } -// ----------------------------------------------------------------------------- - void SvtBasePrintOptions::SetConvertToGreyscales( sal_Bool bState ) { MutexGuard aGuard( GetOwnStaticMutex() ); m_pDataContainer->SetConvertToGreyscales( bState ); } -// ----------------------------------------------------------------------------- - void SvtBasePrintOptions::SetPDFAsStandardPrintJobFormat( sal_Bool bState ) { MutexGuard aGuard( GetOwnStaticMutex() ); m_pDataContainer->SetPDFAsStandardPrintJobFormat( bState ); } -// ----------------------------------------------------------------------------- - void SvtBasePrintOptions::GetPrinterOptions( PrinterOptions& rOptions ) const { rOptions.SetReduceTransparency( IsReduceTransparency() ); @@ -765,8 +680,6 @@ void SvtBasePrintOptions::GetPrinterOptions( PrinterOptions& rOptions ) const rOptions.SetPDFAsStandardPrintJobFormat( IsPDFAsStandardPrintJobFormat() ); } -// ----------------------------------------------------------------------------- - void SvtBasePrintOptions::SetPrinterOptions( const PrinterOptions& rOptions ) { SetReduceTransparency( rOptions.IsReduceTransparency() ); @@ -801,10 +714,6 @@ void SvtBasePrintOptions::SetPrinterOptions( const PrinterOptions& rOptions ) } } -// --------------------- -// - SvtPrinterOptions - -// --------------------- - SvtPrinterOptions::SvtPrinterOptions() { // Global access, must be guarded (multithreading!). @@ -823,8 +732,6 @@ SvtPrinterOptions::SvtPrinterOptions() SetDataContainer( m_pStaticDataContainer ); } -// ----------------------------------------------------------------------------- - SvtPrinterOptions::~SvtPrinterOptions() { // Global access, must be guarded (multithreading!) @@ -841,10 +748,6 @@ SvtPrinterOptions::~SvtPrinterOptions() } } -// --------------------- -// - SvtPrintFileOptions - -// --------------------- - SvtPrintFileOptions::SvtPrintFileOptions() { // Global access, must be guarded (multithreading!). @@ -864,8 +767,6 @@ SvtPrintFileOptions::SvtPrintFileOptions() SetDataContainer( m_pStaticDataContainer ); } -// ----------------------------------------------------------------------------- - SvtPrintFileOptions::~SvtPrintFileOptions() { // Global access, must be guarded (multithreading!) diff --git a/svtools/source/control/valueimp.hxx b/svtools/source/control/valueimp.hxx index 350c175b1f89..47bfacfc0b34 100644 --- a/svtools/source/control/valueimp.hxx +++ b/svtools/source/control/valueimp.hxx @@ -34,16 +34,8 @@ #include <vector> -// ----------- -// - Defines - -// ----------- - #define VALUESET_ITEM_NONEITEM 0xFFFE -// -------------------- -// - ValueSetItemType - -// -------------------- - enum ValueSetItemType { VALUESETITEM_NONE, @@ -52,10 +44,6 @@ enum ValueSetItemType VALUESETITEM_USERDRAW }; -// ---------------- -// - ValueSetItem - -// ---------------- - class ValueSet; struct ValueSetItem @@ -77,10 +65,6 @@ struct ValueSetItem GetAccessible( bool bIsTransientChildrenDisabled ); }; -// --------------- -// - ValueSetAcc - -// --------------- - typedef ::cppu::PartialWeakComponentImplHelper6< ::com::sun::star::accessibility::XAccessible, ::com::sun::star::accessibility::XAccessibleEventBroadcaster, @@ -214,10 +198,6 @@ private: bool HasNoneField (void) const; }; -// ---------------- -// - ValueItemAcc - -// ---------------- - class ValueItemAcc : public ::cppu::WeakImplHelper5< ::com::sun::star::accessibility::XAccessible, ::com::sun::star::accessibility::XAccessibleEventBroadcaster, ::com::sun::star::accessibility::XAccessibleContext, diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx index 03ccbc92cb6c..0e5a763e9a32 100644 --- a/svtools/source/graphic/grfcache.cxx +++ b/svtools/source/graphic/grfcache.cxx @@ -28,23 +28,11 @@ #include <rtl/crc.h> #include <memory> -// ----------- -// - Defines - -// ----------- - #define RELEASE_TIMEOUT 10000 #define MAX_BMP_EXTENT 4096 -// ----------- -// - statics - -// ----------- - static const char aHexData[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; -// ------------- -// - GraphicID - -// ------------- - class GraphicID { private: @@ -72,8 +60,6 @@ public: sal_Bool IsEmpty() const { return( 0 == mnID4 ); } }; -// ----------------------------------------------------------------------------- - GraphicID::GraphicID( const GraphicObject& rObj ) { const Graphic& rGraphic = rObj.GetGraphic(); @@ -132,8 +118,6 @@ GraphicID::GraphicID( const GraphicObject& rObj ) } } -// ----------------------------------------------------------------------------- - rtl::OString GraphicID::GetIDString() const { rtl::OStringBuffer aHexStr; @@ -155,10 +139,6 @@ rtl::OString GraphicID::GetIDString() const return aHexStr.makeStringAndClear(); } -// --------------------- -// - GraphicCacheEntry - -// --------------------- - class GraphicCacheEntry { private: @@ -197,8 +177,6 @@ public: void GraphicObjectWasSwappedIn( const GraphicObject& rObj ); }; -// ----------------------------------------------------------------------------- - GraphicCacheEntry::GraphicCacheEntry( const GraphicObject& rObj ) : maID ( rObj ), mpBmpEx ( NULL ), @@ -210,8 +188,6 @@ GraphicCacheEntry::GraphicCacheEntry( const GraphicObject& rObj ) : maGraphicObjectList.push_back( (GraphicObject*)&rObj ); } -// ----------------------------------------------------------------------------- - GraphicCacheEntry::~GraphicCacheEntry() { DBG_ASSERT( @@ -224,8 +200,6 @@ GraphicCacheEntry::~GraphicCacheEntry() delete mpAnimation; } -// ----------------------------------------------------------------------------- - bool GraphicCacheEntry::ImplInit( const GraphicObject& rObj ) { bool bRet = false; @@ -284,8 +258,6 @@ bool GraphicCacheEntry::ImplInit( const GraphicObject& rObj ) return bRet; } -// ----------------------------------------------------------------------------- - void GraphicCacheEntry::ImplFillSubstitute( Graphic& rSubstitute ) { // create substitute for graphic; @@ -340,8 +312,6 @@ void GraphicCacheEntry::ImplFillSubstitute( Graphic& rSubstitute ) } } -// ----------------------------------------------------------------------------- - void GraphicCacheEntry::AddGraphicObjectReference( const GraphicObject& rObj, Graphic& rSubstitute ) { if( mbSwappedAll ) @@ -351,8 +321,6 @@ void GraphicCacheEntry::AddGraphicObjectReference( const GraphicObject& rObj, Gr maGraphicObjectList.push_back( (GraphicObject*) &rObj ); } -// ----------------------------------------------------------------------------- - bool GraphicCacheEntry::ReleaseGraphicObjectReference( const GraphicObject& rObj ) { for( @@ -370,8 +338,6 @@ bool GraphicCacheEntry::ReleaseGraphicObjectReference( const GraphicObject& rObj return false; } -// ----------------------------------------------------------------------------- - bool GraphicCacheEntry::HasGraphicObjectReference( const GraphicObject& rObj ) { bool bRet = false; @@ -383,16 +349,12 @@ bool GraphicCacheEntry::HasGraphicObjectReference( const GraphicObject& rObj ) return bRet; } -// ----------------------------------------------------------------------------- - void GraphicCacheEntry::TryToSwapIn() { if( mbSwappedAll && !maGraphicObjectList.empty() ) maGraphicObjectList.front()->FireSwapInRequest(); } -// ----------------------------------------------------------------------------- - void GraphicCacheEntry::GraphicObjectWasSwappedOut( const GraphicObject& /*rObj*/ ) { mbSwappedAll = true; @@ -412,8 +374,6 @@ void GraphicCacheEntry::GraphicObjectWasSwappedOut( const GraphicObject& /*rObj* } } -// ----------------------------------------------------------------------------- - bool GraphicCacheEntry::FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute ) { bool bRet = false; @@ -427,18 +387,12 @@ bool GraphicCacheEntry::FillSwappedGraphicObject( const GraphicObject& rObj, Gra return bRet; } -// ----------------------------------------------------------------------------- - void GraphicCacheEntry::GraphicObjectWasSwappedIn( const GraphicObject& rObj ) { if( mbSwappedAll ) mbSwappedAll = !ImplInit( rObj ); } -// ---------------------------- -// - GraphicDisplayCacheEntry - -// ---------------------------- - class GraphicDisplayCacheEntry { private: @@ -520,8 +474,6 @@ public: void Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz ) const; }; -// ----------------------------------------------------------------------------- - // This whole function is based on checkMetadataBitmap() from grfmgr2.cxx, see that one for details. // If you do changes here, change the original function too. static void checkMetadataBitmap( const BitmapEx& rBmpEx, @@ -845,8 +797,6 @@ sal_uLong GraphicDisplayCacheEntry::GetNeededSize( OutputDevice* pOut, const Poi return rGraphic.GetSizeBytes(); } -// ----------------------------------------------------------------------------- - GraphicDisplayCacheEntry::~GraphicDisplayCacheEntry() { if( mpMtf ) @@ -856,8 +806,6 @@ GraphicDisplayCacheEntry::~GraphicDisplayCacheEntry() delete mpBmpEx; } -// ----------------------------------------------------------------------------- - void GraphicDisplayCacheEntry::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz ) const { if( mpMtf ) @@ -877,10 +825,6 @@ void GraphicDisplayCacheEntry::Draw( OutputDevice* pOut, const Point& rPt, const } } -// ----------------------- -// - GraphicCache - -// ----------------------- - GraphicCache::GraphicCache( sal_uLong nDisplayCacheSize, sal_uLong nMaxObjDisplayCacheSize ) : mnReleaseTimeoutSeconds ( 0UL ), mnMaxDisplaySize ( nDisplayCacheSize ), @@ -892,16 +836,12 @@ GraphicCache::GraphicCache( sal_uLong nDisplayCacheSize, sal_uLong nMaxObjDispla maReleaseTimer.Start(); } -// ----------------------------------------------------------------------------- - GraphicCache::~GraphicCache() { DBG_ASSERT( !maGraphicCache.size(), "GraphicCache::~GraphicCache(): there are some GraphicObjects in cache" ); DBG_ASSERT( maDisplayCache.empty(), "GraphicCache::~GraphicCache(): there are some GraphicObjects in display cache" ); } -// ----------------------------------------------------------------------------- - void GraphicCache::AddGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute, @@ -1006,8 +946,6 @@ void GraphicCache::AddGraphicObject( maGraphicCache.push_back( new GraphicCacheEntry( rObj ) ); } -// ----------------------------------------------------------------------------- - void GraphicCache::ReleaseGraphicObject( const GraphicObject& rObj ) { // Release cached object @@ -1049,8 +987,6 @@ void GraphicCache::ReleaseGraphicObject( const GraphicObject& rObj ) DBG_ASSERT( bRemoved, "GraphicCache::ReleaseGraphicObject(...): GraphicObject not found in cache" ); } -// ----------------------------------------------------------------------------- - void GraphicCache::GraphicObjectWasSwappedOut( const GraphicObject& rObj ) { // notify cache that rObj is swapped out (and can thus be pruned @@ -1061,8 +997,6 @@ void GraphicCache::GraphicObjectWasSwappedOut( const GraphicObject& rObj ) pEntry->GraphicObjectWasSwappedOut( rObj ); } -// ----------------------------------------------------------------------------- - sal_Bool GraphicCache::FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute ) { GraphicCacheEntry* pEntry = ImplGetCacheEntry( rObj ); @@ -1073,8 +1007,6 @@ sal_Bool GraphicCache::FillSwappedGraphicObject( const GraphicObject& rObj, Grap return pEntry->FillSwappedGraphicObject( rObj, rSubstitute ); } -// ----------------------------------------------------------------------------- - void GraphicCache::GraphicObjectWasSwappedIn( const GraphicObject& rObj ) { GraphicCacheEntry* pEntry = ImplGetCacheEntry( rObj ); @@ -1091,8 +1023,6 @@ void GraphicCache::GraphicObjectWasSwappedIn( const GraphicObject& rObj ) } } -// ----------------------------------------------------------------------------- - void GraphicCache::SetMaxDisplayCacheSize( sal_uLong nNewCacheSize ) { mnMaxDisplaySize = nNewCacheSize; @@ -1101,8 +1031,6 @@ void GraphicCache::SetMaxDisplayCacheSize( sal_uLong nNewCacheSize ) ImplFreeDisplayCacheSpace( GetUsedDisplayCacheSize() - GetMaxDisplayCacheSize() ); } -// ----------------------------------------------------------------------------- - void GraphicCache::SetMaxObjDisplayCacheSize( sal_uLong nNewMaxObjSize, sal_Bool bDestroyGreaterCached ) { const sal_Bool bDestroy = ( bDestroyGreaterCached && ( nNewMaxObjSize < mnMaxObjDisplaySize ) ); @@ -1127,8 +1055,6 @@ void GraphicCache::SetMaxObjDisplayCacheSize( sal_uLong nNewMaxObjSize, sal_Bool } } -// ----------------------------------------------------------------------------- - void GraphicCache::SetCacheTimeout( sal_uLong nTimeoutSeconds ) { if( mnReleaseTimeoutSeconds != nTimeoutSeconds ) @@ -1149,8 +1075,6 @@ void GraphicCache::SetCacheTimeout( sal_uLong nTimeoutSeconds ) } } -// ----------------------------------------------------------------------------- - sal_Bool GraphicCache::IsDisplayCacheable( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr ) const { @@ -1158,8 +1082,6 @@ sal_Bool GraphicCache::IsDisplayCacheable( OutputDevice* pOut, const Point& rPt, GetMaxObjDisplayCacheSize() ); } -// ----------------------------------------------------------------------------- - sal_Bool GraphicCache::IsInDisplayCache( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr ) const { @@ -1181,8 +1103,6 @@ sal_Bool GraphicCache::IsInDisplayCache( OutputDevice* pOut, const Point& rPt, c return bFound; } -// ----------------------------------------------------------------------------- - rtl::OString GraphicCache::GetUniqueID( const GraphicObject& rObj ) const { rtl::OString aRet; @@ -1201,8 +1121,6 @@ rtl::OString GraphicCache::GetUniqueID( const GraphicObject& rObj ) const return aRet; } -// ----------------------------------------------------------------------------- - sal_Bool GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr, const BitmapEx& rBmpEx ) @@ -1235,8 +1153,6 @@ sal_Bool GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& r return bRet; } -// ----------------------------------------------------------------------------- - sal_Bool GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr, const GDIMetaFile& rMtf ) @@ -1269,8 +1185,6 @@ sal_Bool GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& r return bRet; } -// ----------------------------------------------------------------------------- - sal_Bool GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz, const GraphicObject& rObj, const GraphicAttr& rAttr ) { @@ -1311,8 +1225,6 @@ sal_Bool GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt return bRet; } -// ----------------------------------------------------------------------------- - sal_Bool GraphicCache::ImplFreeDisplayCacheSpace( sal_uLong nSizeToFree ) { sal_uLong nFreedSize = 0UL; @@ -1341,8 +1253,6 @@ sal_Bool GraphicCache::ImplFreeDisplayCacheSpace( sal_uLong nSizeToFree ) return( nFreedSize >= nSizeToFree ); } -// ----------------------------------------------------------------------------- - GraphicCacheEntry* GraphicCache::ImplGetCacheEntry( const GraphicObject& rObj ) { GraphicCacheEntry* pRet = NULL; @@ -1360,8 +1270,6 @@ GraphicCacheEntry* GraphicCache::ImplGetCacheEntry( const GraphicObject& rObj ) return pRet; } -// ----------------------------------------------------------------------------- - IMPL_LINK( GraphicCache, ReleaseTimeoutHdl, Timer*, pTimer ) { pTimer->Stop(); |