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.xValueFormCache.reset(new FormCache(&rContext.rDoc));
33 
34  // for tool.cxx::PutFormString()
35  rContext.xAttrRight.reset(new SvxHorJustifyItem(SvxCellHorJustify::Right, ATTR_HOR_JUSTIFY));
36  rContext.xAttrLeft.reset(new SvxHorJustifyItem(SvxCellHorJustify::Left, ATTR_HOR_JUSTIFY));
37  rContext.xAttrCenter.reset(new SvxHorJustifyItem(SvxCellHorJustify::Center, ATTR_HOR_JUSTIFY));
38  rContext.xAttrRepeat.reset(new SvxHorJustifyItem(SvxCellHorJustify::Repeat, ATTR_HOR_JUSTIFY));
39  rContext.xAttrStandard.reset(
40  new SvxHorJustifyItem(SvxCellHorJustify::Standard, ATTR_HOR_JUSTIFY));
41 
42  return true;
43 }
44 
45 void MemDelete(LotusContext& rContext)
46 {
47  rContext.xValueFormCache.reset();
48  rContext.xAttrRight.reset();
49  rContext.xAttrLeft.reset();
50  rContext.xAttrCenter.reset();
51  rContext.xAttrRepeat.reset();
52  rContext.xAttrStandard.reset();
53 }
54 
55 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< SvxHorJustifyItem > xAttrRepeat
Definition: lotfilter.hxx:48
bool MemNew(LotusContext &rContext)
Definition: memory.cxx:30
std::unique_ptr< FormCache > xValueFormCache
Definition: lotfilter.hxx:50
ScDocument & rDoc
Definition: lotfilter.hxx:45
std::unique_ptr< SvxHorJustifyItem > xAttrRight
Definition: lotfilter.hxx:48
std::unique_ptr< SvxHorJustifyItem > xAttrCenter
Definition: lotfilter.hxx:48
std::unique_ptr< SvxHorJustifyItem > xAttrLeft
Definition: lotfilter.hxx:48
Definition: tool.h:88
void MemDelete(LotusContext &rContext)
Definition: memory.cxx:45
std::unique_ptr< SvxHorJustifyItem > xAttrStandard
Definition: lotfilter.hxx:48
constexpr TypedWhichId< SvxHorJustifyItem > ATTR_HOR_JUSTIFY(129)