LCOV - code coverage report
Current view: top level - svx/source/xoutdev - xtabbtmp.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 27 33 81.8 %
Date: 2014-11-03 Functions: 4 7 57.1 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #include "svx/XPropertyTable.hxx"
      21             : 
      22             : #include <vcl/virdev.hxx>
      23             : #include <svl/itemset.hxx>
      24             : #include <sfx2/docfile.hxx>
      25             : #include <svx/dialogs.hrc>
      26             : #include <svx/dialmgr.hxx>
      27             : #include <svx/xtable.hxx>
      28             : #include <svx/xpool.hxx>
      29             : #include <svx/xbtmpit.hxx>
      30             : 
      31             : using namespace com::sun::star;
      32             : 
      33           0 : XBitmapEntry* XBitmapList::Remove(long nIndex)
      34             : {
      35           0 :     return static_cast<XBitmapEntry*>( XPropertyList::Remove(nIndex) );
      36             : }
      37             : 
      38           0 : XBitmapEntry* XBitmapList::GetBitmap(long nIndex) const
      39             : {
      40           0 :     return static_cast<XBitmapEntry*>( XPropertyList::Get(nIndex) );
      41             : }
      42             : 
      43          40 : uno::Reference< container::XNameContainer > XBitmapList::createInstance()
      44             : {
      45             :     return uno::Reference< container::XNameContainer >(
      46          40 :         SvxUnoXBitmapTable_createInstance( this ), uno::UNO_QUERY );
      47             : }
      48             : 
      49           4 : bool XBitmapList::Create()
      50             : {
      51           4 :     OUStringBuffer aStr(SVX_RESSTR(RID_SVXSTR_BITMAP));
      52             :     sal_uInt16 aArray[64];
      53           8 :     Bitmap aBitmap;
      54           4 :     const sal_Int32 nLen(aStr.getLength() - 1);
      55             : 
      56           4 :     memset(aArray, 0, sizeof(aArray));
      57             : 
      58             :     // white/white bitmap
      59           4 :     aStr.append(" 1");
      60           4 :     aBitmap = createHistorical8x8FromArray(aArray, RGB_Color(COL_WHITE), RGB_Color(COL_WHITE));
      61           4 :     Insert(new XBitmapEntry(Graphic(aBitmap), aStr.toString()));
      62             : 
      63             :     // black/white bitmap
      64           4 :     aArray[ 0] = 1; aArray[ 9] = 1; aArray[18] = 1; aArray[27] = 1;
      65           4 :     aArray[36] = 1; aArray[45] = 1; aArray[54] = 1; aArray[63] = 1;
      66           4 :     aStr[nLen] = '2';
      67           4 :     aBitmap = createHistorical8x8FromArray(aArray, RGB_Color(COL_BLACK), RGB_Color(COL_WHITE));
      68           4 :     Insert(new XBitmapEntry(Graphic(aBitmap), aStr.toString()));
      69             : 
      70             :     // lightred/white bitmap
      71           4 :     aArray[ 7] = 1; aArray[14] = 1; aArray[21] = 1; aArray[28] = 1;
      72           4 :     aArray[35] = 1; aArray[42] = 1; aArray[49] = 1; aArray[56] = 1;
      73           4 :     aStr[nLen] = '3';
      74           4 :     aBitmap = createHistorical8x8FromArray(aArray, RGB_Color(COL_LIGHTRED), RGB_Color(COL_WHITE));
      75           4 :     Insert(new XBitmapEntry(Graphic(aBitmap), aStr.toString()));
      76             : 
      77             :     // lightblue/white bitmap
      78           4 :     aArray[24] = 1; aArray[25] = 1; aArray[26] = 1;
      79           4 :     aArray[29] = 1; aArray[30] = 1; aArray[31] = 1;
      80           4 :     aStr[nLen] = '4';
      81           4 :     aBitmap = createHistorical8x8FromArray(aArray, RGB_Color(COL_LIGHTBLUE), RGB_Color(COL_WHITE));
      82           4 :     Insert(new XBitmapEntry(Graphic(aBitmap), aStr.toString()));
      83             : 
      84           8 :     return true;
      85             : }
      86             : 
      87           0 : Bitmap XBitmapList::CreateBitmapForUI( long /*nIndex*/ )
      88             : {
      89           0 :     return Bitmap();
      90         651 : }
      91             : 
      92             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10