Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
16e73f6d
Kaydet (Commit)
16e73f6d
authored
Haz 25, 2012
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Cleanup code comments and change Sal_bool to bool
Change-Id: Iebc86650365041939be0df339790e01391f72e89
üst
6fadb99a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
50 deletions
+2
-50
grfmgr2.cxx
svtools/source/graphic/grfmgr2.cxx
+2
-50
No files found.
svtools/source/graphic/grfmgr2.cxx
Dosyayı görüntüle @
16e73f6d
...
@@ -57,8 +57,6 @@ GraphicManager::GraphicManager( sal_uLong nCacheSize, sal_uLong nMaxObjCacheSize
...
@@ -57,8 +57,6 @@ GraphicManager::GraphicManager( sal_uLong nCacheSize, sal_uLong nMaxObjCacheSize
{
{
}
}
// -----------------------------------------------------------------------------
GraphicManager
::~
GraphicManager
()
GraphicManager
::~
GraphicManager
()
{
{
for
(
size_t
i
=
0
,
n
=
maObjList
.
size
();
i
<
n
;
++
i
)
for
(
size_t
i
=
0
,
n
=
maObjList
.
size
();
i
<
n
;
++
i
)
...
@@ -67,36 +65,26 @@ GraphicManager::~GraphicManager()
...
@@ -67,36 +65,26 @@ GraphicManager::~GraphicManager()
delete
mpCache
;
delete
mpCache
;
}
}
// -----------------------------------------------------------------------------
void
GraphicManager
::
SetMaxCacheSize
(
sal_uLong
nNewCacheSize
)
void
GraphicManager
::
SetMaxCacheSize
(
sal_uLong
nNewCacheSize
)
{
{
mpCache
->
SetMaxDisplayCacheSize
(
nNewCacheSize
);
mpCache
->
SetMaxDisplayCacheSize
(
nNewCacheSize
);
}
}
// -----------------------------------------------------------------------------
void
GraphicManager
::
SetMaxObjCacheSize
(
sal_uLong
nNewMaxObjSize
,
sal_Bool
bDestroyGreaterCached
)
void
GraphicManager
::
SetMaxObjCacheSize
(
sal_uLong
nNewMaxObjSize
,
sal_Bool
bDestroyGreaterCached
)
{
{
mpCache
->
SetMaxObjDisplayCacheSize
(
nNewMaxObjSize
,
bDestroyGreaterCached
);
mpCache
->
SetMaxObjDisplayCacheSize
(
nNewMaxObjSize
,
bDestroyGreaterCached
);
}
}
// -----------------------------------------------------------------------------
void
GraphicManager
::
SetCacheTimeout
(
sal_uLong
nTimeoutSeconds
)
void
GraphicManager
::
SetCacheTimeout
(
sal_uLong
nTimeoutSeconds
)
{
{
mpCache
->
SetCacheTimeout
(
nTimeoutSeconds
);
mpCache
->
SetCacheTimeout
(
nTimeoutSeconds
);
}
}
// -----------------------------------------------------------------------------
void
GraphicManager
::
ReleaseFromCache
(
const
GraphicObject
&
/*rObj*/
)
void
GraphicManager
::
ReleaseFromCache
(
const
GraphicObject
&
/*rObj*/
)
{
{
// !!!
// !!!
}
}
// -----------------------------------------------------------------------------
sal_Bool
GraphicManager
::
IsInCache
(
OutputDevice
*
pOut
,
const
Point
&
rPt
,
sal_Bool
GraphicManager
::
IsInCache
(
OutputDevice
*
pOut
,
const
Point
&
rPt
,
const
Size
&
rSz
,
const
GraphicObject
&
rObj
,
const
Size
&
rSz
,
const
GraphicObject
&
rObj
,
const
GraphicAttr
&
rAttr
)
const
const
GraphicAttr
&
rAttr
)
const
...
@@ -104,8 +92,6 @@ sal_Bool GraphicManager::IsInCache( OutputDevice* pOut, const Point& rPt,
...
@@ -104,8 +92,6 @@ sal_Bool GraphicManager::IsInCache( OutputDevice* pOut, const Point& rPt,
return
mpCache
->
IsInDisplayCache
(
pOut
,
rPt
,
rSz
,
rObj
,
rAttr
);
return
mpCache
->
IsInDisplayCache
(
pOut
,
rPt
,
rSz
,
rObj
,
rAttr
);
}
}
// -----------------------------------------------------------------------------
sal_Bool
GraphicManager
::
DrawObj
(
OutputDevice
*
pOut
,
const
Point
&
rPt
,
const
Size
&
rSz
,
sal_Bool
GraphicManager
::
DrawObj
(
OutputDevice
*
pOut
,
const
Point
&
rPt
,
const
Size
&
rSz
,
GraphicObject
&
rObj
,
const
GraphicAttr
&
rAttr
,
GraphicObject
&
rObj
,
const
GraphicAttr
&
rAttr
,
const
sal_uLong
nFlags
,
sal_Bool
&
rCached
)
const
sal_uLong
nFlags
,
sal_Bool
&
rCached
)
...
@@ -162,8 +148,6 @@ sal_Bool GraphicManager::DrawObj( OutputDevice* pOut, const Point& rPt, const Si
...
@@ -162,8 +148,6 @@ sal_Bool GraphicManager::DrawObj( OutputDevice* pOut, const Point& rPt, const Si
return
bRet
;
return
bRet
;
}
}
// -----------------------------------------------------------------------------
void
GraphicManager
::
ImplRegisterObj
(
const
GraphicObject
&
rObj
,
Graphic
&
rSubstitute
,
void
GraphicManager
::
ImplRegisterObj
(
const
GraphicObject
&
rObj
,
Graphic
&
rSubstitute
,
const
rtl
::
OString
*
pID
,
const
GraphicObject
*
pCopyObj
)
const
rtl
::
OString
*
pID
,
const
GraphicObject
*
pCopyObj
)
{
{
...
@@ -171,8 +155,6 @@ void GraphicManager::ImplRegisterObj( const GraphicObject& rObj, Graphic& rSubst
...
@@ -171,8 +155,6 @@ void GraphicManager::ImplRegisterObj( const GraphicObject& rObj, Graphic& rSubst
mpCache
->
AddGraphicObject
(
rObj
,
rSubstitute
,
pID
,
pCopyObj
);
mpCache
->
AddGraphicObject
(
rObj
,
rSubstitute
,
pID
,
pCopyObj
);
}
}
// -----------------------------------------------------------------------------
void
GraphicManager
::
ImplUnregisterObj
(
const
GraphicObject
&
rObj
)
void
GraphicManager
::
ImplUnregisterObj
(
const
GraphicObject
&
rObj
)
{
{
mpCache
->
ReleaseGraphicObject
(
rObj
);
mpCache
->
ReleaseGraphicObject
(
rObj
);
...
@@ -185,36 +167,26 @@ void GraphicManager::ImplUnregisterObj( const GraphicObject& rObj )
...
@@ -185,36 +167,26 @@ void GraphicManager::ImplUnregisterObj( const GraphicObject& rObj )
}
}
}
}
// -----------------------------------------------------------------------------
void
GraphicManager
::
ImplGraphicObjectWasSwappedOut
(
const
GraphicObject
&
rObj
)
void
GraphicManager
::
ImplGraphicObjectWasSwappedOut
(
const
GraphicObject
&
rObj
)
{
{
mpCache
->
GraphicObjectWasSwappedOut
(
rObj
);
mpCache
->
GraphicObjectWasSwappedOut
(
rObj
);
}
}
// -----------------------------------------------------------------------------
rtl
::
OString
GraphicManager
::
ImplGetUniqueID
(
const
GraphicObject
&
rObj
)
const
rtl
::
OString
GraphicManager
::
ImplGetUniqueID
(
const
GraphicObject
&
rObj
)
const
{
{
return
mpCache
->
GetUniqueID
(
rObj
);
return
mpCache
->
GetUniqueID
(
rObj
);
}
}
// -----------------------------------------------------------------------------
sal_Bool
GraphicManager
::
ImplFillSwappedGraphicObject
(
const
GraphicObject
&
rObj
,
Graphic
&
rSubstitute
)
sal_Bool
GraphicManager
::
ImplFillSwappedGraphicObject
(
const
GraphicObject
&
rObj
,
Graphic
&
rSubstitute
)
{
{
return
(
mpCache
->
FillSwappedGraphicObject
(
rObj
,
rSubstitute
)
);
return
(
mpCache
->
FillSwappedGraphicObject
(
rObj
,
rSubstitute
)
);
}
}
// -----------------------------------------------------------------------------
void
GraphicManager
::
ImplGraphicObjectWasSwappedIn
(
const
GraphicObject
&
rObj
)
void
GraphicManager
::
ImplGraphicObjectWasSwappedIn
(
const
GraphicObject
&
rObj
)
{
{
mpCache
->
GraphicObjectWasSwappedIn
(
rObj
);
mpCache
->
GraphicObjectWasSwappedIn
(
rObj
);
}
}
// -----------------------------------------------------------------------------
sal_Bool
GraphicManager
::
ImplDraw
(
OutputDevice
*
pOut
,
const
Point
&
rPt
,
sal_Bool
GraphicManager
::
ImplDraw
(
OutputDevice
*
pOut
,
const
Point
&
rPt
,
const
Size
&
rSz
,
GraphicObject
&
rObj
,
const
Size
&
rSz
,
GraphicObject
&
rObj
,
const
GraphicAttr
&
rAttr
,
const
GraphicAttr
&
rAttr
,
...
@@ -520,8 +492,6 @@ sal_Bool GraphicManager::ImplCreateOutput( OutputDevice* pOut,
...
@@ -520,8 +492,6 @@ sal_Bool GraphicManager::ImplCreateOutput( OutputDevice* pOut,
return
bRet
;
return
bRet
;
}
}
// -----------------------------------------------------------------------------
// This function checks whether the bitmap is usable for skipping
// This function checks whether the bitmap is usable for skipping
// mtf rendering by using just this one bitmap (i.e. in case the metafile
// mtf rendering by using just this one bitmap (i.e. in case the metafile
// contains just this one pixmap that covers the entire metafile area).
// contains just this one pixmap that covers the entire metafile area).
...
@@ -895,8 +865,6 @@ sal_Bool GraphicManager::ImplCreateOutput( OutputDevice* pOut,
...
@@ -895,8 +865,6 @@ sal_Bool GraphicManager::ImplCreateOutput( OutputDevice* pOut,
return
sal_True
;
return
sal_True
;
}
}
// -----------------------------------------------------------------------------
sal_Bool
GraphicManager
::
ImplCreateScaled
(
const
BitmapEx
&
rBmpEx
,
sal_Bool
GraphicManager
::
ImplCreateScaled
(
const
BitmapEx
&
rBmpEx
,
long
*
pMapIX
,
long
*
pMapFX
,
long
*
pMapIY
,
long
*
pMapFY
,
long
*
pMapIX
,
long
*
pMapFX
,
long
*
pMapIY
,
long
*
pMapFY
,
long
nStartX
,
long
nEndX
,
long
nStartY
,
long
nEndY
,
long
nStartX
,
long
nEndX
,
long
nStartY
,
long
nEndY
,
...
@@ -1730,8 +1698,6 @@ void GraphicManager::ImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, sal
...
@@ -1730,8 +1698,6 @@ void GraphicManager::ImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, sal
}
}
}
}
// -----------------------------------------------------------------------------
void
GraphicManager
::
ImplAdjust
(
GDIMetaFile
&
rMtf
,
const
GraphicAttr
&
rAttr
,
sal_uLong
nAdjustmentFlags
)
void
GraphicManager
::
ImplAdjust
(
GDIMetaFile
&
rMtf
,
const
GraphicAttr
&
rAttr
,
sal_uLong
nAdjustmentFlags
)
{
{
GraphicAttr
aAttr
(
rAttr
);
GraphicAttr
aAttr
(
rAttr
);
...
@@ -1783,8 +1749,6 @@ void GraphicManager::ImplAdjust( GDIMetaFile& rMtf, const GraphicAttr& rAttr, sa
...
@@ -1783,8 +1749,6 @@ void GraphicManager::ImplAdjust( GDIMetaFile& rMtf, const GraphicAttr& rAttr, sa
}
}
}
}
// -----------------------------------------------------------------------------
void
GraphicManager
::
ImplAdjust
(
Animation
&
rAnimation
,
const
GraphicAttr
&
rAttr
,
sal_uLong
nAdjustmentFlags
)
void
GraphicManager
::
ImplAdjust
(
Animation
&
rAnimation
,
const
GraphicAttr
&
rAttr
,
sal_uLong
nAdjustmentFlags
)
{
{
GraphicAttr
aAttr
(
rAttr
);
GraphicAttr
aAttr
(
rAttr
);
...
@@ -1836,8 +1800,6 @@ void GraphicManager::ImplAdjust( Animation& rAnimation, const GraphicAttr& rAttr
...
@@ -1836,8 +1800,6 @@ void GraphicManager::ImplAdjust( Animation& rAnimation, const GraphicAttr& rAttr
}
}
}
}
// -----------------------------------------------------------------------------
void
GraphicManager
::
ImplDraw
(
OutputDevice
*
pOut
,
const
Point
&
rPt
,
const
Size
&
rSz
,
void
GraphicManager
::
ImplDraw
(
OutputDevice
*
pOut
,
const
Point
&
rPt
,
const
Size
&
rSz
,
const
GDIMetaFile
&
rMtf
,
const
GraphicAttr
&
rAttr
)
const
GDIMetaFile
&
rMtf
,
const
GraphicAttr
&
rAttr
)
{
{
...
@@ -1865,8 +1827,6 @@ void GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt, const Size&
...
@@ -1865,8 +1827,6 @@ void GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt, const Size&
pOut
->
Pop
();
pOut
->
Pop
();
}
}
// -----------------------------------------------------------------------------
struct
ImplTileInfo
struct
ImplTileInfo
{
{
ImplTileInfo
()
:
aTileTopLeft
(),
aNextTileTopLeft
(),
aTileSizePixel
(),
nTilesEmptyX
(
0
),
nTilesEmptyY
(
0
)
{}
ImplTileInfo
()
:
aTileTopLeft
(),
aNextTileTopLeft
(),
aTileSizePixel
(),
nTilesEmptyX
(
0
),
nTilesEmptyY
(
0
)
{}
...
@@ -1930,8 +1890,6 @@ bool GraphicObject::ImplRenderTempTile( VirtualDevice& rVDev, int nExponent,
...
@@ -1930,8 +1890,6 @@ bool GraphicObject::ImplRenderTempTile( VirtualDevice& rVDev, int nExponent,
return
bRet
;
return
bRet
;
}
}
// -----------------------------------------------------------------------------
// define for debug drawings
// define for debug drawings
//#define DBG_TEST
//#define DBG_TEST
...
@@ -2115,8 +2073,6 @@ bool GraphicObject::ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent
...
@@ -2115,8 +2073,6 @@ bool GraphicObject::ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent
return
true
;
return
true
;
}
}
// -----------------------------------------------------------------------------
bool
GraphicObject
::
ImplDrawTiled
(
OutputDevice
*
pOut
,
const
Rectangle
&
rArea
,
const
Size
&
rSizePixel
,
bool
GraphicObject
::
ImplDrawTiled
(
OutputDevice
*
pOut
,
const
Rectangle
&
rArea
,
const
Size
&
rSizePixel
,
const
Size
&
rOffset
,
const
GraphicAttr
*
pAttr
,
sal_uLong
nFlags
,
int
nTileCacheSize1D
)
const
Size
&
rOffset
,
const
GraphicAttr
*
pAttr
,
sal_uLong
nFlags
,
int
nTileCacheSize1D
)
{
{
...
@@ -2225,8 +2181,6 @@ bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const Rectangle& rArea, c
...
@@ -2225,8 +2181,6 @@ bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const Rectangle& rArea, c
return
bRet
;
return
bRet
;
}
}
// -----------------------------------------------------------------------------
bool
GraphicObject
::
ImplDrawTiled
(
OutputDevice
&
rOut
,
const
Point
&
rPosPixel
,
bool
GraphicObject
::
ImplDrawTiled
(
OutputDevice
&
rOut
,
const
Point
&
rPosPixel
,
int
nNumTilesX
,
int
nNumTilesY
,
int
nNumTilesX
,
int
nNumTilesY
,
const
Size
&
rTileSizePixel
,
const
GraphicAttr
*
pAttr
,
sal_uLong
nFlags
)
const
Size
&
rTileSizePixel
,
const
GraphicAttr
*
pAttr
,
sal_uLong
nFlags
)
...
@@ -2237,11 +2191,11 @@ bool GraphicObject::ImplDrawTiled( OutputDevice& rOut, const Point& rPosPixel,
...
@@ -2237,11 +2191,11 @@ bool GraphicObject::ImplDrawTiled( OutputDevice& rOut, const Point& rPosPixel,
// #107607# Use logical coordinates for metafile playing, too
// #107607# Use logical coordinates for metafile playing, too
bool
bDrawInPixel
(
rOut
.
GetConnectMetaFile
()
==
NULL
&&
GRAPHIC_BITMAP
==
GetType
()
);
bool
bDrawInPixel
(
rOut
.
GetConnectMetaFile
()
==
NULL
&&
GRAPHIC_BITMAP
==
GetType
()
);
sal_Bool
bRet
(
sal_False
)
;
bool
bRet
=
false
;
// #105229# Switch off mapping (converting to logic and back to
// #105229# Switch off mapping (converting to logic and back to
// pixel might cause roundoff errors)
// pixel might cause roundoff errors)
sal_B
ool
bOldMap
(
rOut
.
IsMapModeEnabled
()
);
b
ool
bOldMap
(
rOut
.
IsMapModeEnabled
()
);
if
(
bDrawInPixel
)
if
(
bDrawInPixel
)
rOut
.
EnableMapMode
(
sal_False
);
rOut
.
EnableMapMode
(
sal_False
);
...
@@ -2275,8 +2229,6 @@ bool GraphicObject::ImplDrawTiled( OutputDevice& rOut, const Point& rPosPixel,
...
@@ -2275,8 +2229,6 @@ bool GraphicObject::ImplDrawTiled( OutputDevice& rOut, const Point& rPosPixel,
return
bRet
;
return
bRet
;
}
}
// -----------------------------------------------------------------------------
void
GraphicObject
::
ImplTransformBitmap
(
BitmapEx
&
rBmpEx
,
void
GraphicObject
::
ImplTransformBitmap
(
BitmapEx
&
rBmpEx
,
const
GraphicAttr
&
rAttr
,
const
GraphicAttr
&
rAttr
,
const
Size
&
rCropLeftTop
,
const
Size
&
rCropLeftTop
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment