Warning, file /office/calligra/libs/odf/KoGenChanges.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /* This file is part of the KDE project
0002    Copyright (C) 2008 Pierre Stirnweiss <pierre.stirnweiss_calligra@gadz.org>
0003    Copyright (C) 2010 Thomas Zander <zander@kde.org>
0004 
0005    This library is free software; you can redistribute it and/or
0006    modify it under the terms of the GNU Library General Public
0007    License as published by the Free Software Foundation; either
0008    version 2 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    Library General Public License for more details.
0014 
0015    You should have received a copy of the GNU Library 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 #ifndef KOGENCHANGES_H
0022 #define KOGENCHANGES_H
0023 
0024 #include "koodf_export.h"
0025 
0026 #include <KoGenChange.h>
0027 
0028 class KoXmlWriter;
0029 
0030 /**
0031  * @brief Repository of changes used during saving of OASIS/OOo file.
0032  *
0033  * Inspired from KoGenStyles.h
0034  *
0035  * Is used to store all the change regions, which will be saved at the beginning of <office:body><office:text> elements
0036  * We use a container outside the changeTracker, as the change tracker is linked to the document of a TextShapeData and is then not aware of the other TextShapeData.
0037  *
0038  */
0039 class KOODF_EXPORT KoGenChanges
0040 {
0041 public:
0042     KoGenChanges();
0043     ~KoGenChanges();
0044 
0045     /**
0046      * Look up a change in the collection, inserting it if necessary. If the change already
0047      * exists, return the existing name. If not, assign a name to the change and returns it.
0048      *
0049      * @param change the change to look up.
0050      * @param name proposed internal name for the change. It will be modified to be guaranteed unique.
0051      * @return the name for this change
0052      */
0053     QString insert(const KoGenChange &change);
0054 
0055     /**
0056      * Save changes.
0057      *
0058      * This creates the text:changed-region tag containing all
0059      * changes.
0060      *
0061      * @param xmlWriter
0062      * @param stylesDotXml
0063      */
0064     void saveOdfChanges(KoXmlWriter *xmlWriter, bool trackChanges) const;
0065 
0066 private:
0067     class Private;
0068     Private * const d;
0069 };
0070 
0071 #endif /* KOGENCHANGES_H */