xref: /trunk/main/sc/inc/docpool.hxx (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef SC_SCDOCPOL_HXX
29 #define SC_SCDOCPOL_HXX
30 
31 #include <svl/itempool.hxx>
32 #include "scdllapi.h"
33 
34 class ScStyleSheet;
35 
36 //------------------------------------------------------------------------
37 
38 class SC_DLLPUBLIC ScDocumentPool: public SfxItemPool
39 {
40     SfxPoolItem**   ppPoolDefaults;
41     SfxItemPool*    pSecondary;
42     static sal_uInt16*  pVersionMap1;
43     static sal_uInt16*  pVersionMap2;
44     static sal_uInt16*  pVersionMap3;
45     static sal_uInt16*  pVersionMap4;
46     static sal_uInt16*  pVersionMap5;
47     static sal_uInt16*  pVersionMap6;
48     static sal_uInt16*  pVersionMap7;
49     static sal_uInt16*  pVersionMap8;
50     static sal_uInt16*  pVersionMap9;
51     static sal_uInt16*  pVersionMap10;
52     static sal_uInt16*  pVersionMap11;
53 
54 public:
55             ScDocumentPool( SfxItemPool* pSecPool = NULL, sal_Bool bLoadRefCounts = sal_False );
56 protected:
57             virtual ~ScDocumentPool();
58 public:
59 
60     virtual SfxItemPool*        Clone() const;
61     virtual SfxMapUnit          GetMetric( sal_uInt16 nWhich ) const;
62 
63     virtual const SfxPoolItem&  Put( const SfxPoolItem&, sal_uInt16 nWhich = 0 );
64     virtual void                Remove( const SfxPoolItem& );
65     static void                 CheckRef( const SfxPoolItem& );
66 
67     void StyleDeleted( ScStyleSheet* pStyle );      // Loeschen von Vorlagen im Organizer
68     void CellStyleCreated( const String& rName );
69     virtual SfxItemPresentation     GetPresentation(
70                                         const SfxPoolItem&  rItem,
71                                         SfxItemPresentation ePresentation,
72                                         SfxMapUnit          ePresentationMetric,
73                                         String&             rText,
74                                         const IntlWrapper* pIntl = 0 ) const;
75 
76     static void InitVersionMaps();
77     static void DeleteVersionMaps();
78 };
79 
80 
81 
82 
83 #endif
84