LibreOffice Module sc (master)  1
memory.cxx
Go to the documentation of this file.
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 // Remark: Variables are not declared in header file! Modules have to declare
21 // their variables via extern!
22 
23 #include <scitems.hxx>
24 #include <scmem.h>
25 #include <editeng/justifyitem.hxx>
26 #include "lotfilter.hxx"
27 #include <tool.h>
28 #include <editeng/svxenum.hxx>
29 
30 bool MemNew(LotusContext &rContext)
31 {
32  rContext.pValueFormCache = new FormCache(rContext.pDoc);
33 
34  // for tool.cxx::PutFormString()
35  rContext.pAttrRight = new SvxHorJustifyItem( SvxCellHorJustify::Right, ATTR_HOR_JUSTIFY );
36  rContext.pAttrLeft = new SvxHorJustifyItem( SvxCellHorJustify::Left, ATTR_HOR_JUSTIFY );
37  rContext.pAttrCenter = new SvxHorJustifyItem( SvxCellHorJustify::Center, ATTR_HOR_JUSTIFY );
38  rContext.pAttrRepeat = new SvxHorJustifyItem( SvxCellHorJustify::Repeat, ATTR_HOR_JUSTIFY );
39  rContext.pAttrStandard = new SvxHorJustifyItem( SvxCellHorJustify::Standard, ATTR_HOR_JUSTIFY );
40 
41  return true;
42 }
43 
44 void MemDelete(LotusContext &rContext)
45 {
46  delete rContext.pValueFormCache;
47  delete rContext.pAttrRight;
48  delete rContext.pAttrLeft;
49  delete rContext.pAttrCenter;
50  delete rContext.pAttrRepeat;
51  delete rContext.pAttrStandard;
52 }
53 
54 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
FormCache * pValueFormCache
Definition: lotfilter.hxx:50
bool MemNew(LotusContext &rContext)
Definition: memory.cxx:30
SvxHorJustifyItem * pAttrCenter
Definition: lotfilter.hxx:48
#define ATTR_HOR_JUSTIFY
Definition: scitems.hxx:118
Definition: tool.h:86
SvxHorJustifyItem * pAttrLeft
Definition: lotfilter.hxx:48
SvxHorJustifyItem * pAttrRight
Definition: lotfilter.hxx:48
void MemDelete(LotusContext &rContext)
Definition: memory.cxx:44
ScDocument * pDoc
Definition: lotfilter.hxx:45
SvxHorJustifyItem * pAttrStandard
Definition: lotfilter.hxx:48
SvxHorJustifyItem * pAttrRepeat
Definition: lotfilter.hxx:48