[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    koffice/plugins/textshape
From:       Thorsten Zachmann <t.zachmann () zagge ! de>
Date:       2008-02-10 6:54:40
Message-ID: 1202626480.741639.23168.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 773082 by zachmann:

o don't delete the used style manager as it can be a shared style
  manager created and owned by the application
o don't create a style manager for the text shape if there is none.

  This fixes crashes due to deleting the style manager of the
  application.

  This also means that if an application wants to use a style manager it
  has to provide one. Otherwise no style manager is used. I think there
  is still some code that needs to be updated so that it can work that
  way also e.g KoTextShapeData::saveOdf.

CCMAIL: koffice-devel@kde.org


 M  +3 -2      Layout.cpp  
 M  +0 -4      TextTool.cpp  


--- trunk/koffice/plugins/textshape/Layout.cpp #773081:773082
@@ -1,5 +1,6 @@
 /* This file is part of the KDE project
  * Copyright (C) 2006-2007 Thomas Zander <zander@kde.org>
+ * Copyright (C) 2008 Thorsten Zachmann <zachmann@kde.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -1003,8 +1004,8 @@
     return 0;
 }
 
-void Layout::setStyleManager(KoStyleManager *sm) {
-    delete m_styleManager;
+void Layout::setStyleManager(KoStyleManager *sm)
+{
     m_styleManager = sm;
 }
 
--- trunk/koffice/plugins/textshape/TextTool.cpp #773081:773082
@@ -572,10 +572,6 @@
     }
     if(m_spellcheckPlugin)
         m_spellcheckPlugin->checkSection(m_textShapeData->document(), 0, 0);
-
-    KoTextDocumentLayout *lay = dynamic_cast<KoTextDocumentLayout*> \
                (m_textShapeData->document()->documentLayout());
-    if(lay && lay->styleManager() == 0) // this means there is no (ko)document-wide \
                stylemanager.
-        lay->setStyleManager( new KoStyleManager(m_textShapeData));
 }
 
 void TextTool::updateSelectionHandler() {
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic