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