1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #include <tools/debug.hxx>
21 #include "impastpl.hxx"
24 //#############################################################################
26 // Class XMLFamilyData_Impl
29 ///////////////////////////////////////////////////////////////////////////////
31 // ctor/dtor class XMLFamilyData_Impl
34 XMLFamilyData_Impl::XMLFamilyData_Impl(
36 const OUString
& rStrName
,
37 const UniReference
< SvXMLExportPropertyMapper
> &rMapper
,
38 const OUString
& rStrPrefix
,
40 : pCache( 0 ), mnFamily( nFamily
), maStrFamilyName( rStrName
), mxMapper( rMapper
),
41 mnCount( 0 ), mnName( 0 ), maStrPrefix( rStrPrefix
), bAsFamily( bAsFam
)
44 mpParentList
= new SvXMLAutoStylePoolParentsP_Impl
;
45 mpNameList
= new SvXMLAutoStylePoolNamesP_Impl
;
48 XMLFamilyData_Impl::~XMLFamilyData_Impl()
52 DBG_ASSERT( !pCache
|| !pCache
->size(), "auto style pool cache is not empty!" );
55 for ( size_t i
= 0, n
= pCache
->size(); i
< n
; ++i
)
56 delete (*pCache
)[ i
];
62 void XMLFamilyData_Impl::ClearEntries()
65 mpParentList
= new SvXMLAutoStylePoolParentsP_Impl
;
66 DBG_ASSERT( !pCache
|| !pCache
->size(), "auto style pool cache is not empty!" );
69 for ( size_t i
= 0, n
= pCache
->size(); i
< n
; ++i
)
70 delete (*pCache
)[ i
];
75 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */