xbtmpit.hxx (3334a7e6) xbtmpit.hxx (70d3707a)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 5 unchanged lines hidden (view full) ---

14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 5 unchanged lines hidden (view full) ---

14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24#ifndef _SVX_XBTMPIT_HXX
25#define _SVX_XBTMPIT_HXX
26
22#ifndef _SVX_XBTMPIT_HXX
23#define _SVX_XBTMPIT_HXX
24
27#include "svx/svxdllapi.h"
28
29#include <svx/xbitmap.hxx>
25#include <svx/svxdllapi.h>
30#include <svx/xit.hxx>
26#include <svx/xit.hxx>
27#include <svtools/grfmgr.hxx>
31
32class SdrModel;
28
29class SdrModel;
30class BitmapColor;
33
31
34//----------------------
32//////////////////////////////////////////////////////////////////////////////
33// helper to construct historical 8x8 bitmaps with two colors
34
35Bitmap SVX_DLLPUBLIC createHistorical8x8FromArray(const sal_uInt16* pArray, Color aColorPix, Color aColorBack);
36bool SVX_DLLPUBLIC isHistorical8x8(const BitmapEx& rBitmapEx, BitmapColor& o_rBack, BitmapColor& o_rFront);
37
38//////////////////////////////////////////////////////////////////////////////
35// class XFillBitmapItem
39// class XFillBitmapItem
36//----------------------
40
37class SVX_DLLPUBLIC XFillBitmapItem : public NameOrIndex
38{
41class SVX_DLLPUBLIC XFillBitmapItem : public NameOrIndex
42{
39 XOBitmap aXOBitmap;
43private:
44 GraphicObject maGraphicObject;
40
41public:
42 TYPEINFO();
43 XFillBitmapItem() : NameOrIndex(XATTR_FILLBITMAP, -1 ) {}
45
46public:
47 TYPEINFO();
48 XFillBitmapItem() : NameOrIndex(XATTR_FILLBITMAP, -1 ) {}
44 XFillBitmapItem( long nIndex, const XOBitmap& rTheBitmap );
45 XFillBitmapItem( const String& rName, const XOBitmap& rTheBitmap );
46 XFillBitmapItem( SfxItemPool* pPool, const XOBitmap& rTheBitmap );
49 XFillBitmapItem(long nIndex, const GraphicObject& rGraphicObject);
50 XFillBitmapItem(const String& rName, const GraphicObject& rGraphicObject);
51 XFillBitmapItem(SfxItemPool* pPool, const GraphicObject& rGraphicObject);
47 XFillBitmapItem( SfxItemPool* pPool );
48 XFillBitmapItem( const XFillBitmapItem& rItem );
49 XFillBitmapItem( SvStream& rIn, sal_uInt16 nVer = 0 );
50
51 virtual int operator==( const SfxPoolItem& rItem ) const;
52 virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
53 virtual SfxPoolItem* Create( SvStream& rIn, sal_uInt16 nVer ) const;
54 virtual SvStream& Store( SvStream& rOut, sal_uInt16 nItemVersion ) const;
55 virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const;
56
57 virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
58 virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
59
60 virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
61 SfxMapUnit eCoreMetric,
62 SfxMapUnit ePresMetric,
63 String &rText, const IntlWrapper * = 0 ) const;
64
52 XFillBitmapItem( SfxItemPool* pPool );
53 XFillBitmapItem( const XFillBitmapItem& rItem );
54 XFillBitmapItem( SvStream& rIn, sal_uInt16 nVer = 0 );
55
56 virtual int operator==( const SfxPoolItem& rItem ) const;
57 virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
58 virtual SfxPoolItem* Create( SvStream& rIn, sal_uInt16 nVer ) const;
59 virtual SvStream& Store( SvStream& rOut, sal_uInt16 nItemVersion ) const;
60 virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const;
61
62 virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
63 virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
64
65 virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
66 SfxMapUnit eCoreMetric,
67 SfxMapUnit ePresMetric,
68 String &rText, const IntlWrapper * = 0 ) const;
69
65 const XOBitmap& GetBitmapValue( const XBitmapTable* pTable = 0 ) const; // GetValue -> GetBitmapValue
66 void SetBitmapValue( const XOBitmap& rNew ) { aXOBitmap = rNew; Detach(); } // SetValue -> SetBitmapValue
70 const GraphicObject& GetGraphicObject() const;
71 void SetGraphicObject(const GraphicObject& rGraphicObject);
67
68 static sal_Bool CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 );
69 XFillBitmapItem* checkForUniqueItem( SdrModel* pModel ) const;
70};
71
72#endif
72
73 static sal_Bool CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 );
74 XFillBitmapItem* checkForUniqueItem( SdrModel* pModel ) const;
75};
76
77#endif