xref: /aoo4110/main/sc/source/filter/lotus/memory.cxx (revision b1cdbd2c)
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
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
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 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_sc.hxx"
26 //  Bemerkung:  Variablen nicht ueber Headerfile, Module muessen sich
27 //              selbst per extern ihre Sachen besorgen!
28 
29 
30 
31 
32 #include "scitems.hxx"
33 #include <svx/algitem.hxx>
34 
35 #include "attrib.hxx"
36 
37 #include "decl.h"
38 #include "tool.h"
39 
40 extern ScDocument*		pDoc;
41 
42 extern FormCache*		pValueFormCache;			// -> tool.cxx
43 
44 extern SvxHorJustifyItem	*pAttrRight, *pAttrLeft, *pAttrCenter,
45 							*pAttrRepeat, *pAttrStandard;	// -> tool.cxx, fuer GetFormAttr()
46 extern ScProtectionAttr*	pAttrUnprot;   // -> tool.cxx, fuer PutFormString()
47 
48 
49 
MemNew(void)50 sal_Bool MemNew( void )
51 {
52 	pValueFormCache = new FormCache( pDoc );
53 
54 	// fuer tool.cxx::PutFormString()
55 	pAttrUnprot = new ScProtectionAttr( sal_True );
56     pAttrRight = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_RIGHT, ATTR_HOR_JUSTIFY );
57     pAttrLeft = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_LEFT, ATTR_HOR_JUSTIFY );
58     pAttrCenter = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_CENTER, ATTR_HOR_JUSTIFY );
59     pAttrRepeat = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_REPEAT, ATTR_HOR_JUSTIFY );
60     pAttrStandard = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_STANDARD, ATTR_HOR_JUSTIFY );
61 
62 	return sal_True;
63 }
64 
65 
MemDelete(void)66 void MemDelete( void )
67 {
68 	delete pValueFormCache;
69 	delete pAttrRight;
70 	delete pAttrLeft;
71 	delete pAttrCenter;
72 	delete pAttrRepeat;
73 	delete pAttrStandard;
74 	delete pAttrUnprot;
75 }
76 
77 
78 
79