Commit 0f333aff authored by C. Boemann's avatar C. Boemann

Prevent crash by implementing copy ctor for a class just like it's twin class

for ToC

BUG: 335458
parent 7494946e
......@@ -253,7 +253,7 @@ TocEntryTemplate::TocEntryTemplate()
TocEntryTemplate::TocEntryTemplate(const TocEntryTemplate &entryTemplate)
{
outlineLevel = entryTemplate.outlineLevel;
styleName = QString(entryTemplate.styleName);
styleName = entryTemplate.styleName;
styleId = entryTemplate.styleId;
foreach (IndexEntry *entry, entryTemplate.indexEntries) {
......@@ -320,3 +320,20 @@ void IndexEntryChapter::addAttributes(KoXmlWriter* writer) const
}
writer->addAttribute("text:outline-level", outlineLevel);
}
BibliographyEntryTemplate::BibliographyEntryTemplate()
{
}
BibliographyEntryTemplate::BibliographyEntryTemplate(const BibliographyEntryTemplate &entryTemplate)
{
styleName = entryTemplate.styleName;
styleId = entryTemplate.styleId;
foreach (IndexEntry *entry, entryTemplate.indexEntries) {
indexEntries.append(entry->clone());
}
bibliographyType = entryTemplate.bibliographyType;
}
......@@ -115,7 +115,7 @@ class KOTEXT_EXPORT TocEntryTemplate
{
public:
TocEntryTemplate();
TocEntryTemplate(const TocEntryTemplate &entryTemplate);
TocEntryTemplate(const TocEntryTemplate &other);
void saveOdf(KoXmlWriter * writer) const;
int outlineLevel;
......@@ -172,6 +172,8 @@ public:
class KOTEXT_EXPORT BibliographyEntryTemplate
{
public:
BibliographyEntryTemplate();
BibliographyEntryTemplate(const BibliographyEntryTemplate &other);
void saveOdf(KoXmlWriter * writer) const;
QString styleName;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment