unwind RID_OUTLINEBITMAPS imagelist
Change-Id: I44a03f557d7a7aafeb17e5d662797203f975672f
Before Width: | Height: | Size: 159 B After Width: | Height: | Size: 159 B |
Before Width: | Height: | Size: 225 B After Width: | Height: | Size: 225 B |
Before Width: | Height: | Size: 143 B After Width: | Height: | Size: 143 B |
Before Width: | Height: | Size: 142 B After Width: | Height: | Size: 142 B |
Before Width: | Height: | Size: 243 B After Width: | Height: | Size: 243 B |
Before Width: | Height: | Size: 235 B After Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 239 B After Width: | Height: | Size: 239 B |
Before Width: | Height: | Size: 235 B After Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 240 B After Width: | Height: | Size: 240 B |
Before Width: | Height: | Size: 303 B After Width: | Height: | Size: 303 B |
Before Width: | Height: | Size: 233 B After Width: | Height: | Size: 233 B |
Before Width: | Height: | Size: 233 B After Width: | Height: | Size: 233 B |
Before Width: | Height: | Size: 230 B After Width: | Height: | Size: 230 B |
Before Width: | Height: | Size: 225 B After Width: | Height: | Size: 225 B |
Before Width: | Height: | Size: 219 B After Width: | Height: | Size: 219 B |
Before Width: | Height: | Size: 219 B After Width: | Height: | Size: 219 B |
Before Width: | Height: | Size: 243 B After Width: | Height: | Size: 243 B |
Before Width: | Height: | Size: 235 B After Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 239 B After Width: | Height: | Size: 239 B |
Before Width: | Height: | Size: 235 B After Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 240 B After Width: | Height: | Size: 240 B |
Before Width: | Height: | Size: 240 B After Width: | Height: | Size: 240 B |
Before Width: | Height: | Size: 233 B After Width: | Height: | Size: 233 B |
Before Width: | Height: | Size: 233 B After Width: | Height: | Size: 233 B |
Before Width: | Height: | Size: 232 B After Width: | Height: | Size: 232 B |
Before Width: | Height: | Size: 225 B After Width: | Height: | Size: 225 B |
Before Width: | Height: | Size: 219 B After Width: | Height: | Size: 219 B |
Before Width: | Height: | Size: 219 B After Width: | Height: | Size: 219 B |
Before Width: | Height: | Size: 244 B After Width: | Height: | Size: 244 B |
Before Width: | Height: | Size: 236 B After Width: | Height: | Size: 236 B |
Before Width: | Height: | Size: 241 B After Width: | Height: | Size: 241 B |
Before Width: | Height: | Size: 237 B After Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 243 B After Width: | Height: | Size: 243 B |
Before Width: | Height: | Size: 236 B After Width: | Height: | Size: 236 B |
Before Width: | Height: | Size: 234 B After Width: | Height: | Size: 234 B |
Before Width: | Height: | Size: 232 B After Width: | Height: | Size: 232 B |
Before Width: | Height: | Size: 230 B After Width: | Height: | Size: 230 B |
Before Width: | Height: | Size: 87 B After Width: | Height: | Size: 87 B |
Before Width: | Height: | Size: 87 B After Width: | Height: | Size: 87 B |
Before Width: | Height: | Size: 118 B After Width: | Height: | Size: 118 B |
@@ -684,7 +684,6 @@
|
|||||||
#define RID_OBJECTBAR_FORMAT (SC_RESOURCE_START+1)
|
#define RID_OBJECTBAR_FORMAT (SC_RESOURCE_START+1)
|
||||||
#define RID_TEXT_TOOLBOX (SC_RESOURCE_START+5)
|
#define RID_TEXT_TOOLBOX (SC_RESOURCE_START+5)
|
||||||
#define RID_OBJECTBAR_PREVIEW (SC_RESOURCE_START+6)
|
#define RID_OBJECTBAR_PREVIEW (SC_RESOURCE_START+6)
|
||||||
#define RID_OUTLINEBITMAPS (SC_RESOURCE_START+12)
|
|
||||||
#define RID_DRAW_WIN (SC_RESOURCE_START+13)
|
#define RID_DRAW_WIN (SC_RESOURCE_START+13)
|
||||||
#define RID_CNTRLR_WIN (SC_RESOURCE_START+14)
|
#define RID_CNTRLR_WIN (SC_RESOURCE_START+14)
|
||||||
#define RID_GLOBSTR (SC_RESOURCE_START+15)
|
#define RID_GLOBSTR (SC_RESOURCE_START+15)
|
||||||
@@ -1015,6 +1014,18 @@
|
|||||||
#define IMG_ELEMENT_DEFAULT (BMP_START + 20)
|
#define IMG_ELEMENT_DEFAULT (BMP_START + 20)
|
||||||
#define IMG_ELEMENT_REPEAT (BMP_START + 21)
|
#define IMG_ELEMENT_REPEAT (BMP_START + 21)
|
||||||
#define IMG_ELEMENT_ATTRIBUTE (BMP_START + 22)
|
#define IMG_ELEMENT_ATTRIBUTE (BMP_START + 22)
|
||||||
|
#define RID_BMP_LEVEL1 (BMP_START + 23)
|
||||||
|
#define RID_BMP_LEVEL2 (BMP_START + 24)
|
||||||
|
#define RID_BMP_LEVEL3 (BMP_START + 25)
|
||||||
|
#define RID_BMP_LEVEL4 (BMP_START + 26)
|
||||||
|
#define RID_BMP_LEVEL5 (BMP_START + 27)
|
||||||
|
#define RID_BMP_LEVEL6 (BMP_START + 28)
|
||||||
|
#define RID_BMP_LEVEL7 (BMP_START + 29)
|
||||||
|
#define RID_BMP_LEVEL8 (BMP_START + 30)
|
||||||
|
#define RID_BMP_PLUS (BMP_START + 31)
|
||||||
|
#define RID_BMP_MINUS (BMP_START + 32)
|
||||||
|
#define RID_BMP_NOTPRESSED (BMP_START + 33)
|
||||||
|
#define RID_BMP_PRESSED (BMP_START + 34)
|
||||||
|
|
||||||
#define BMP_END (BMP_START + 100)
|
#define BMP_END (BMP_START + 100)
|
||||||
|
|
||||||
|
@@ -22,11 +22,64 @@
|
|||||||
// Imageliste hier, damit sie nicht in ui.src beim Zusammenbauen der
|
// Imageliste hier, damit sie nicht in ui.src beim Zusammenbauen der
|
||||||
// "echten" Imagelisten stoert
|
// "echten" Imagelisten stoert
|
||||||
|
|
||||||
ImageList RID_OUTLINEBITMAPS
|
Bitmap RID_BMP_LEVEL1
|
||||||
{
|
{
|
||||||
Prefix = "ou";
|
File = "ou01.png";
|
||||||
IdList = { 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; };
|
};
|
||||||
IdCount = { 12; };
|
|
||||||
|
Bitmap RID_BMP_LEVEL2
|
||||||
|
{
|
||||||
|
File = "ou02.png";
|
||||||
|
};
|
||||||
|
|
||||||
|
Bitmap RID_BMP_LEVEL3
|
||||||
|
{
|
||||||
|
File = "ou03.png";
|
||||||
|
};
|
||||||
|
|
||||||
|
Bitmap RID_BMP_LEVEL4
|
||||||
|
{
|
||||||
|
File = "ou04.png";
|
||||||
|
};
|
||||||
|
|
||||||
|
Bitmap RID_BMP_LEVEL5
|
||||||
|
{
|
||||||
|
File = "ou05.png";
|
||||||
|
};
|
||||||
|
|
||||||
|
Bitmap RID_BMP_LEVEL6
|
||||||
|
{
|
||||||
|
File = "ou06.png";
|
||||||
|
};
|
||||||
|
|
||||||
|
Bitmap RID_BMP_LEVEL7
|
||||||
|
{
|
||||||
|
File = "ou07.png";
|
||||||
|
};
|
||||||
|
|
||||||
|
Bitmap RID_BMP_LEVEL8
|
||||||
|
{
|
||||||
|
File = "ou08.png";
|
||||||
|
};
|
||||||
|
|
||||||
|
Bitmap RID_BMP_PLUS
|
||||||
|
{
|
||||||
|
File = "ou09.png";
|
||||||
|
};
|
||||||
|
|
||||||
|
Bitmap RID_BMP_MINUS
|
||||||
|
{
|
||||||
|
File = "ou010.png";
|
||||||
|
};
|
||||||
|
|
||||||
|
Bitmap RID_BMP_NOTPRESSED
|
||||||
|
{
|
||||||
|
File = "ou011.png";
|
||||||
|
};
|
||||||
|
|
||||||
|
Bitmap RID_BMP_PRESSED
|
||||||
|
{
|
||||||
|
File = "ou012.png";
|
||||||
};
|
};
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@@ -38,7 +38,6 @@ private:
|
|||||||
bool mbMirrorEntries; /// true = mirror the order of entries (including header)
|
bool mbMirrorEntries; /// true = mirror the order of entries (including header)
|
||||||
bool mbMirrorLevels; /// true = mirror the order of levels, including the border
|
bool mbMirrorLevels; /// true = mirror the order of levels, including the border
|
||||||
|
|
||||||
ImageList maSymbols; /// Symbols for buttons.
|
|
||||||
Color maLineColor; /// Line color for expanded groups.
|
Color maLineColor; /// Line color for expanded groups.
|
||||||
long mnHeaderSize; /// Size of the header area in entry direction.
|
long mnHeaderSize; /// Size of the header area in entry direction.
|
||||||
long mnHeaderPos; /// Position of the header area in entry direction.
|
long mnHeaderPos; /// Position of the header area in entry direction.
|
||||||
|
@@ -34,11 +34,6 @@ const long SC_OL_POSOFFSET = 2;
|
|||||||
const size_t SC_OL_NOLEVEL = static_cast< size_t >( -1 );
|
const size_t SC_OL_NOLEVEL = static_cast< size_t >( -1 );
|
||||||
const size_t SC_OL_HEADERENTRY = static_cast< size_t >( -1 );
|
const size_t SC_OL_HEADERENTRY = static_cast< size_t >( -1 );
|
||||||
|
|
||||||
const sal_uInt16 SC_OL_IMAGE_PLUS = 9;
|
|
||||||
const sal_uInt16 SC_OL_IMAGE_MINUS = SC_OL_IMAGE_PLUS + 1;
|
|
||||||
const sal_uInt16 SC_OL_IMAGE_NOTPRESSED = SC_OL_IMAGE_MINUS + 1;
|
|
||||||
const sal_uInt16 SC_OL_IMAGE_PRESSED = SC_OL_IMAGE_NOTPRESSED + 1;
|
|
||||||
|
|
||||||
ScOutlineWindow::ScOutlineWindow( vcl::Window* pParent, ScOutlineMode eMode, ScViewData* pViewData, ScSplitPos eWhich ) :
|
ScOutlineWindow::ScOutlineWindow( vcl::Window* pParent, ScOutlineMode eMode, ScViewData* pViewData, ScSplitPos eWhich ) :
|
||||||
Window( pParent ),
|
Window( pParent ),
|
||||||
mrViewData( *pViewData ),
|
mrViewData( *pViewData ),
|
||||||
@@ -46,7 +41,6 @@ ScOutlineWindow::ScOutlineWindow( vcl::Window* pParent, ScOutlineMode eMode, ScV
|
|||||||
mbHoriz( eMode == SC_OUTLINE_HOR ),
|
mbHoriz( eMode == SC_OUTLINE_HOR ),
|
||||||
mbMirrorEntries( false ), // updated in SetHeaderSize
|
mbMirrorEntries( false ), // updated in SetHeaderSize
|
||||||
mbMirrorLevels( false ), // updated in SetHeaderSize
|
mbMirrorLevels( false ), // updated in SetHeaderSize
|
||||||
maSymbols(ScResId(RID_OUTLINEBITMAPS)),
|
|
||||||
maLineColor( COL_BLACK ),
|
maLineColor( COL_BLACK ),
|
||||||
mnHeaderSize( 0 ),
|
mnHeaderSize( 0 ),
|
||||||
mnHeaderPos( 0 ),
|
mnHeaderPos( 0 ),
|
||||||
@@ -533,9 +527,17 @@ void ScOutlineWindow::DrawRectRel(
|
|||||||
DrawRect( GetRectangle( nLevelStart, nEntryStart, nLevelEnd, nEntryEnd ) );
|
DrawRect( GetRectangle( nLevelStart, nEntryStart, nLevelEnd, nEntryEnd ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScOutlineWindow::DrawImageRel( long nLevelPos, long nEntryPos, sal_uInt16 nId )
|
namespace
|
||||||
{
|
{
|
||||||
const Image& rImage = maSymbols.GetImage( nId );
|
Image GetImage(sal_uInt16 nId)
|
||||||
|
{
|
||||||
|
return Image(BitmapEx(ScResId(nId)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScOutlineWindow::DrawImageRel(long nLevelPos, long nEntryPos, sal_uInt16 nId)
|
||||||
|
{
|
||||||
|
const Image& rImage = GetImage(nId);
|
||||||
SetLineColor();
|
SetLineColor();
|
||||||
SetFillColor( GetBackground().GetColor() );
|
SetFillColor( GetBackground().GetColor() );
|
||||||
Point aPos( GetPoint( nLevelPos, nEntryPos ) );
|
Point aPos( GetPoint( nLevelPos, nEntryPos ) );
|
||||||
@@ -548,11 +550,11 @@ void ScOutlineWindow::DrawBorderRel( size_t nLevel, size_t nEntry, bool bPressed
|
|||||||
Point aPos;
|
Point aPos;
|
||||||
if ( GetImagePos( nLevel, nEntry, aPos ) )
|
if ( GetImagePos( nLevel, nEntry, aPos ) )
|
||||||
{
|
{
|
||||||
sal_uInt16 nId = bPressed ? SC_OL_IMAGE_PRESSED : SC_OL_IMAGE_NOTPRESSED;
|
sal_uInt16 nId = bPressed ? RID_BMP_PRESSED : RID_BMP_NOTPRESSED;
|
||||||
bool bClip = (nEntry != SC_OL_HEADERENTRY);
|
bool bClip = (nEntry != SC_OL_HEADERENTRY);
|
||||||
if ( bClip )
|
if ( bClip )
|
||||||
SetEntryAreaClipRegion();
|
SetEntryAreaClipRegion();
|
||||||
DrawImage( aPos, maSymbols.GetImage( nId ) );
|
DrawImage(aPos, GetImage(nId));
|
||||||
if ( bClip )
|
if ( bClip )
|
||||||
SetClipRegion();
|
SetClipRegion();
|
||||||
}
|
}
|
||||||
@@ -622,7 +624,7 @@ void ScOutlineWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const Recta
|
|||||||
{
|
{
|
||||||
long nEntryPos = GetHeaderEntryPos();
|
long nEntryPos = GetHeaderEntryPos();
|
||||||
for ( size_t nLevel = 0; nLevel < nLevelCount; ++nLevel )
|
for ( size_t nLevel = 0; nLevel < nLevelCount; ++nLevel )
|
||||||
DrawImageRel( GetLevelPos( nLevel ), nEntryPos, static_cast< sal_uInt16 >( nLevel + 1 ) );
|
DrawImageRel(GetLevelPos(nLevel), nEntryPos, RID_BMP_LEVEL1 + nLevel);
|
||||||
|
|
||||||
SetLineColor( maLineColor );
|
SetLineColor( maLineColor );
|
||||||
long nLinePos = mnHeaderPos + (mbMirrorEntries ? 0 : (mnHeaderSize - 1));
|
long nLinePos = mnHeaderPos + (mbMirrorEntries ? 0 : (mnHeaderSize - 1));
|
||||||
@@ -694,7 +696,7 @@ void ScOutlineWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const Recta
|
|||||||
// draw, if not hidden by higher levels
|
// draw, if not hidden by higher levels
|
||||||
if ( bDraw )
|
if ( bDraw )
|
||||||
{
|
{
|
||||||
sal_uInt16 nImageId = pEntry->IsHidden() ? SC_OL_IMAGE_PLUS : SC_OL_IMAGE_MINUS;
|
sal_uInt16 nImageId = pEntry->IsHidden() ? RID_BMP_PLUS : RID_BMP_MINUS;
|
||||||
DrawImageRel( nLevelPos, nImagePos, nImageId );
|
DrawImageRel( nLevelPos, nImagePos, nImageId );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|