1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: listviewitems.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_dbaccess.hxx"
34 #ifndef _DBAUI_LISTVIEWITEMS_HXX_
35 #include "listviewitems.hxx"
37 //........................................................................
40 //........................................................................
42 //========================================================================
43 // class OBoldListboxString
44 //========================================================================
45 //------------------------------------------------------------------------
46 void OBoldListboxString::InitViewData( SvLBox
* pView
,SvLBoxEntry
* pEntry
, SvViewDataItem
* _pViewData
)
48 SvLBoxString::InitViewData(pView
,pEntry
, _pViewData
);
50 _pViewData
= pView
->GetViewDataItem( pEntry
, this );
51 pView
->Push(PUSH_ALL
);
52 Font
aFont( pView
->GetFont());
53 aFont
.SetWeight(WEIGHT_BOLD
);
54 pView
->SetFont( aFont
);
55 _pViewData
->aSize
= Size(pView
->GetTextWidth(GetText()), pView
->GetTextHeight());
59 //------------------------------------------------------------------------
60 USHORT
OBoldListboxString::IsA()
62 return SV_ITEM_ID_BOLDLBSTRING
;
65 //------------------------------------------------------------------------
66 void OBoldListboxString::Paint(const Point
& rPos
, SvLBox
& rDev
, sal_uInt16 nFlags
, SvLBoxEntry
* pEntry
)
71 Font
aFont( rDev
.GetFont());
72 aFont
.SetWeight(WEIGHT_BOLD
);
73 rDev
.SetFont( aFont
);
75 rDev
.DrawText( aPos
, GetText() );
79 SvLBoxString::Paint(rPos
, rDev
, nFlags
, pEntry
);
82 //........................................................................
84 //........................................................................