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 : #include "scitems.hxx"
25 : #include <svx/algitem.hxx>
26 : #include <editeng/justifyitem.hxx>
27 :
28 : #include "attrib.hxx"
29 :
30 : #include "tool.h"
31 :
32 : extern ScDocument* pDoc;
33 :
34 : extern FormCache* pValueFormCache; // -> tool.cxx
35 :
36 : extern SvxHorJustifyItem *pAttrRight, *pAttrLeft, *pAttrCenter,
37 : *pAttrRepeat, *pAttrStandard; // -> tool.cxx, fuer GetFormAttr()
38 : extern ScProtectionAttr* pAttrUnprot; // -> tool.cxx, fuer PutFormString()
39 :
40 0 : sal_Bool MemNew( void )
41 : {
42 0 : pValueFormCache = new FormCache( pDoc );
43 :
44 : // fuer tool.cxx::PutFormString()
45 0 : pAttrUnprot = new ScProtectionAttr( true );
46 0 : pAttrRight = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_RIGHT, ATTR_HOR_JUSTIFY );
47 0 : pAttrLeft = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_LEFT, ATTR_HOR_JUSTIFY );
48 0 : pAttrCenter = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_CENTER, ATTR_HOR_JUSTIFY );
49 0 : pAttrRepeat = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_REPEAT, ATTR_HOR_JUSTIFY );
50 0 : pAttrStandard = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_STANDARD, ATTR_HOR_JUSTIFY );
51 :
52 0 : return sal_True;
53 : }
54 :
55 :
56 0 : void MemDelete( void )
57 : {
58 0 : delete pValueFormCache;
59 0 : delete pAttrRight;
60 0 : delete pAttrLeft;
61 0 : delete pAttrCenter;
62 0 : delete pAttrRepeat;
63 0 : delete pAttrStandard;
64 0 : delete pAttrUnprot;
65 0 : }
66 :
67 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|