Branch data 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 : : // Bemerkung: Variablen nicht ueber Headerfile, Module muessen sich
21 : : // selbst per extern ihre Sachen besorgen!
22 : :
23 : :
24 : :
25 : :
26 : : #include "scitems.hxx"
27 : : #include <svx/algitem.hxx>
28 : : #include <editeng/justifyitem.hxx>
29 : :
30 : : #include "attrib.hxx"
31 : :
32 : : #include "decl.h"
33 : : #include "tool.h"
34 : :
35 : : extern ScDocument* pDoc;
36 : :
37 : : extern FormCache* pValueFormCache; // -> tool.cxx
38 : :
39 : : extern SvxHorJustifyItem *pAttrRight, *pAttrLeft, *pAttrCenter,
40 : : *pAttrRepeat, *pAttrStandard; // -> tool.cxx, fuer GetFormAttr()
41 : : extern ScProtectionAttr* pAttrUnprot; // -> tool.cxx, fuer PutFormString()
42 : :
43 : :
44 : :
45 : 0 : sal_Bool MemNew( void )
46 : : {
47 [ # # ]: 0 : pValueFormCache = new FormCache( pDoc );
48 : :
49 : : // fuer tool.cxx::PutFormString()
50 [ # # ]: 0 : pAttrUnprot = new ScProtectionAttr( sal_True );
51 [ # # ]: 0 : pAttrRight = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_RIGHT, ATTR_HOR_JUSTIFY );
52 [ # # ]: 0 : pAttrLeft = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_LEFT, ATTR_HOR_JUSTIFY );
53 [ # # ]: 0 : pAttrCenter = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_CENTER, ATTR_HOR_JUSTIFY );
54 [ # # ]: 0 : pAttrRepeat = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_REPEAT, ATTR_HOR_JUSTIFY );
55 [ # # ]: 0 : pAttrStandard = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_STANDARD, ATTR_HOR_JUSTIFY );
56 : :
57 : 0 : return sal_True;
58 : : }
59 : :
60 : :
61 : 0 : void MemDelete( void )
62 : : {
63 [ # # ]: 0 : delete pValueFormCache;
64 [ # # ]: 0 : delete pAttrRight;
65 [ # # ]: 0 : delete pAttrLeft;
66 [ # # ]: 0 : delete pAttrCenter;
67 [ # # ]: 0 : delete pAttrRepeat;
68 [ # # ]: 0 : delete pAttrStandard;
69 [ # # ]: 0 : delete pAttrUnprot;
70 : 0 : }
71 : :
72 : :
73 : :
74 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|