[Libreoffice-commits] core.git: Branch 'feature/notes-refactoring' - sc/source
Laurent Godard
lgodard.libre at laposte.net
Fri Nov 22 07:34:49 PST 2013
sc/source/filter/xml/xmlexprt.cxx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 007abe6639cbc104767fb35a1277941303a3c91c
Author: Laurent Godard <lgodard.libre at laposte.net>
Date: Fri Nov 22 16:32:29 2013 +0100
no need to put the xshape in drawpage, only register it in pSharedData
- also avoid crash on document closing
Change-Id: I9a43c3d10528be24bffabab23887646ca2126489
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 3f79ec4..708d243 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -668,8 +668,9 @@ void ScXMLExport::CollectSharedData(sal_Int32& nTableCount, sal_Int32& nShapesCo
{
ScPostIt& rNote = *it->mpNote;
ScAddress aPos = it->maPos;
- SdrCaptionObj* pCaption = rNote.GetOrCreateCaption(aPos);
- pDoc->GetDrawLayer()->GetPage( static_cast< sal_uInt16 >( aPos.Tab() ) )->InsertObject( pCaption );
+ SdrCaptionObj* pNoteCaption = rNote.GetOrCreateCaption(aPos);
+ Reference<drawing::XShape> xNoteShape( pNoteCaption->getUnoShape(), uno::UNO_QUERY );
+ pSharedData->AddNoteObj(xNoteShape, aPos);
}
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPageSupplier->getDrawPage());
@@ -2720,7 +2721,7 @@ void ScXMLExport::ExportAnnotationsAutoStyles(ScSheetSaveData* pSheetData)
for (; it != itEnd; ++it)
{
- const ScPostIt& pNote = *it->mpNote;
+ ScPostIt& pNote = *it->mpNote;
const EditTextObject* pEdit = pNote.GetEditTextObject();
std::vector<editeng::Section> aAttrs;
More information about the Libreoffice-commits
mailing list