Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : :
30 : : #include "svx/XPropertyTable.hxx"
31 : :
32 : : #include <vcl/virdev.hxx>
33 : : #include <svl/itemset.hxx>
34 : : #include <sfx2/docfile.hxx>
35 : : #include <svx/dialogs.hrc>
36 : : #include <svx/dialmgr.hxx>
37 : : #include <svx/xtable.hxx>
38 : : #include <svx/xpool.hxx>
39 : :
40 : : using namespace com::sun::star;
41 : :
42 : 0 : XBitmapEntry* XBitmapList::Remove(long nIndex)
43 : : {
44 : 0 : return (XBitmapEntry*) XPropertyList::Remove(nIndex);
45 : : }
46 : :
47 : 0 : XBitmapEntry* XBitmapList::GetBitmap(long nIndex) const
48 : : {
49 : 0 : return (XBitmapEntry*) XPropertyList::Get(nIndex, 0);
50 : : }
51 : :
52 : 11 : uno::Reference< container::XNameContainer > XBitmapList::createInstance()
53 : : {
54 : : return uno::Reference< container::XNameContainer >(
55 [ + - ]: 11 : SvxUnoXBitmapTable_createInstance( this ), uno::UNO_QUERY );
56 : : }
57 : :
58 : 0 : sal_Bool XBitmapList::Create()
59 : : {
60 : : // Array der Bitmap
61 : : //-----------------------
62 : : // 00 01 02 03 04 05 06 07
63 : : // 08 09 10 11 12 13 14 15
64 : : // 16 17 18 19 20 21 22 23
65 : : // 24 25 26 27 28 29 30 31
66 : : // 32 33 34 35 36 37 38 39
67 : : // 40 41 42 43 44 45 46 47
68 : : // 48 49 50 51 52 53 54 55
69 : : // 56 57 58 59 60 61 62 63
70 : :
71 [ # # ][ # # ]: 0 : String aStr( SVX_RES( RID_SVXSTR_BITMAP ) );
72 [ # # ]: 0 : Color aColWhite( RGB_Color( COL_WHITE ) );
73 : : xub_StrLen nLen;
74 : : sal_uInt16 aArray[64];
75 : :
76 : 0 : memset( aArray, 0, sizeof( aArray ) );
77 [ # # ]: 0 : aStr.AppendAscii(" 1");
78 : 0 : nLen = aStr.Len() - 1;
79 [ # # ][ # # ]: 0 : Insert( new XBitmapEntry( XOBitmap( aArray, aColWhite, aColWhite ), aStr ) );
[ # # ][ # # ]
[ # # ]
80 : :
81 : 0 : aArray[ 0] = 1; aArray[ 9] = 1; aArray[18] = 1; aArray[27] = 1;
82 : 0 : aArray[36] = 1; aArray[45] = 1; aArray[54] = 1; aArray[63] = 1;
83 [ # # ]: 0 : aStr.SetChar(nLen, sal_Unicode('2'));
84 [ # # ][ # # ]: 0 : Insert( new XBitmapEntry( XOBitmap( aArray, RGB_Color( COL_BLACK ), aColWhite ), aStr ) );
[ # # ][ # # ]
[ # # ][ # # ]
85 : :
86 : 0 : aArray[ 7] = 1; aArray[14] = 1; aArray[21] = 1; aArray[28] = 1;
87 : 0 : aArray[35] = 1; aArray[42] = 1; aArray[49] = 1; aArray[56] = 1;
88 [ # # ]: 0 : aStr.SetChar(nLen, sal_Unicode('3'));
89 [ # # ][ # # ]: 0 : Insert( new XBitmapEntry( XOBitmap( aArray, RGB_Color( COL_LIGHTRED ), aColWhite ), aStr ) );
[ # # ][ # # ]
[ # # ][ # # ]
90 : :
91 : 0 : aArray[24] = 1; aArray[25] = 1; aArray[26] = 1;
92 : 0 : aArray[29] = 1; aArray[30] = 1; aArray[31] = 1;
93 [ # # ]: 0 : aStr.SetChar(nLen, sal_Unicode('4'));
94 [ # # ][ # # ]: 0 : Insert( new XBitmapEntry( XOBitmap( aArray, RGB_Color( COL_LIGHTBLUE ), aColWhite ), aStr ) );
[ # # ][ # # ]
[ # # ][ # # ]
95 : :
96 [ # # ]: 0 : return sal_True;
97 : : }
98 : :
99 : 0 : sal_Bool XBitmapList::CreateBitmapsForUI()
100 : : {
101 : 0 : return sal_False;
102 : : }
103 : :
104 : 0 : Bitmap* XBitmapList::CreateBitmapForUI( long /*nIndex*/, sal_Bool /*bDelete*/)
105 : : {
106 : 0 : return NULL;
107 : : }
108 : :
109 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|