Warning, file /office/calligra/libs/text/KoSectionEnd.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 * Copyright (c) 2011 Boudewijn Rempt <boud@valdyas.org> 0003 * Copyright (c) 2014 Denis Kuplyakov <dener.kup@gmail.com> 0004 * 0005 * This library is free software; you can redistribute it and/or 0006 * modify it under the terms of the GNU Lesser General Public 0007 * License as published by the Free Software Foundation; either 0008 * version 2.1 of the License, or (at your option) any later version. 0009 * 0010 * This library is distributed in the hope that it will be useful, 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0013 * Lesser General Public License for more details. 0014 * 0015 * You should have received a copy of the GNU Lesser General Public License 0016 * along with this library; see the file COPYING.LIB. If not, write to 0017 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0018 * Boston, MA 02110-1301, USA. 0019 */ 0020 0021 #include "KoSectionEnd.h" 0022 0023 #include <KoShapeSavingContext.h> 0024 #include <KoXmlWriter.h> 0025 #include <KoSection.h> 0026 0027 class KoSectionEndPrivate 0028 { 0029 public: 0030 KoSectionEndPrivate(KoSection *_section) 0031 : section(_section) 0032 { 0033 Q_ASSERT(section); 0034 } 0035 0036 KoSection *section; //< pointer to the corresponding section 0037 }; 0038 0039 KoSectionEnd::KoSectionEnd(KoSection* section) 0040 : d_ptr(new KoSectionEndPrivate(section)) 0041 { 0042 Q_D(KoSectionEnd); 0043 d->section->setSectionEnd(this); 0044 } 0045 0046 KoSectionEnd::~KoSectionEnd() 0047 { 0048 } 0049 0050 QString KoSectionEnd::name() const 0051 { 0052 Q_D(const KoSectionEnd); 0053 return d->section->name(); 0054 } 0055 0056 KoSection *KoSectionEnd::correspondingSection() const 0057 { 0058 Q_D(const KoSectionEnd); 0059 return d->section; 0060 } 0061 0062 void KoSectionEnd::saveOdf(KoShapeSavingContext &context) const 0063 { 0064 KoXmlWriter *writer = &context.xmlWriter(); 0065 Q_ASSERT(writer); 0066 writer->endElement(); 0067 }