13334a7e6SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 33334a7e6SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 43334a7e6SAndrew Rist * or more contributor license agreements. See the NOTICE file 53334a7e6SAndrew Rist * distributed with this work for additional information 63334a7e6SAndrew Rist * regarding copyright ownership. The ASF licenses this file 73334a7e6SAndrew Rist * to you under the Apache License, Version 2.0 (the 83334a7e6SAndrew Rist * "License"); you may not use this file except in compliance 93334a7e6SAndrew Rist * with the License. You may obtain a copy of the License at 103334a7e6SAndrew Rist * 113334a7e6SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 123334a7e6SAndrew Rist * 133334a7e6SAndrew Rist * Unless required by applicable law or agreed to in writing, 143334a7e6SAndrew Rist * software distributed under the License is distributed on an 153334a7e6SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 163334a7e6SAndrew Rist * KIND, either express or implied. See the License for the 173334a7e6SAndrew Rist * specific language governing permissions and limitations 183334a7e6SAndrew Rist * under the License. 193334a7e6SAndrew Rist * 203334a7e6SAndrew Rist *************************************************************/ 213334a7e6SAndrew Rist 22cdf0e10cSrcweir #ifndef _SVX_XBTMPIT_HXX 23cdf0e10cSrcweir #define _SVX_XBTMPIT_HXX 24cdf0e10cSrcweir 25*70d3707aSArmin Le Grand #include <svx/svxdllapi.h> 26cdf0e10cSrcweir #include <svx/xit.hxx> 27*70d3707aSArmin Le Grand #include <svtools/grfmgr.hxx> 28cdf0e10cSrcweir 29cdf0e10cSrcweir class SdrModel; 30*70d3707aSArmin Le Grand class BitmapColor; 31cdf0e10cSrcweir 32*70d3707aSArmin Le Grand ////////////////////////////////////////////////////////////////////////////// 33*70d3707aSArmin Le Grand // helper to construct historical 8x8 bitmaps with two colors 34*70d3707aSArmin Le Grand 35*70d3707aSArmin Le Grand Bitmap SVX_DLLPUBLIC createHistorical8x8FromArray(const sal_uInt16* pArray, Color aColorPix, Color aColorBack); 36*70d3707aSArmin Le Grand bool SVX_DLLPUBLIC isHistorical8x8(const BitmapEx& rBitmapEx, BitmapColor& o_rBack, BitmapColor& o_rFront); 37*70d3707aSArmin Le Grand 38*70d3707aSArmin Le Grand ////////////////////////////////////////////////////////////////////////////// 39cdf0e10cSrcweir // class XFillBitmapItem 40*70d3707aSArmin Le Grand 41cdf0e10cSrcweir class SVX_DLLPUBLIC XFillBitmapItem : public NameOrIndex 42cdf0e10cSrcweir { 43*70d3707aSArmin Le Grand private: 44*70d3707aSArmin Le Grand GraphicObject maGraphicObject; 45cdf0e10cSrcweir 46cdf0e10cSrcweir public: 47cdf0e10cSrcweir TYPEINFO(); XFillBitmapItem()48cdf0e10cSrcweir XFillBitmapItem() : NameOrIndex(XATTR_FILLBITMAP, -1 ) {} 49*70d3707aSArmin Le Grand XFillBitmapItem(long nIndex, const GraphicObject& rGraphicObject); 50*70d3707aSArmin Le Grand XFillBitmapItem(const String& rName, const GraphicObject& rGraphicObject); 51*70d3707aSArmin Le Grand XFillBitmapItem(SfxItemPool* pPool, const GraphicObject& rGraphicObject); 52cdf0e10cSrcweir XFillBitmapItem( SfxItemPool* pPool ); 53cdf0e10cSrcweir XFillBitmapItem( const XFillBitmapItem& rItem ); 54cdf0e10cSrcweir XFillBitmapItem( SvStream& rIn, sal_uInt16 nVer = 0 ); 55cdf0e10cSrcweir 56cdf0e10cSrcweir virtual int operator==( const SfxPoolItem& rItem ) const; 57cdf0e10cSrcweir virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; 58cdf0e10cSrcweir virtual SfxPoolItem* Create( SvStream& rIn, sal_uInt16 nVer ) const; 59cdf0e10cSrcweir virtual SvStream& Store( SvStream& rOut, sal_uInt16 nItemVersion ) const; 60cdf0e10cSrcweir virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const; 61cdf0e10cSrcweir 62cdf0e10cSrcweir virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const; 63cdf0e10cSrcweir virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ); 64cdf0e10cSrcweir 65cdf0e10cSrcweir virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, 66cdf0e10cSrcweir SfxMapUnit eCoreMetric, 67cdf0e10cSrcweir SfxMapUnit ePresMetric, 68cdf0e10cSrcweir String &rText, const IntlWrapper * = 0 ) const; 69cdf0e10cSrcweir 70*70d3707aSArmin Le Grand const GraphicObject& GetGraphicObject() const; 71*70d3707aSArmin Le Grand void SetGraphicObject(const GraphicObject& rGraphicObject); 72cdf0e10cSrcweir 73cdf0e10cSrcweir static sal_Bool CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 ); 74cdf0e10cSrcweir XFillBitmapItem* checkForUniqueItem( SdrModel* pModel ) const; 75cdf0e10cSrcweir }; 76cdf0e10cSrcweir 77cdf0e10cSrcweir #endif 78