diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-09-08 12:50:47 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-09-08 12:50:47 +0000 |
commit | 679aa7ff01b47febe7f33fb62643871a4e04efe9 (patch) | |
tree | cfcf47ffac75a8364f543afd5e970ebf99b4566e /sc/source/filter/xml/xmlcelli.cxx | |
parent | 78b9476288b2c06305c2a4917d2ed4d18e86a957 (diff) |
INTEGRATION: CWS dr12 (1.75.52); FILE MERGED
2004/08/09 13:44:36 sab 1.75.52.4: #i21253#; make old notes work
2004/07/27 01:44:17 sab 1.75.52.3: RESYNC: (1.75-1.77); FILE MERGED
2004/07/23 20:58:26 sab 1.75.52.2: #i21253#; add formatted notes
2004/02/24 10:12:04 jmarmion 1.75.52.1: #i21255# text formatting for cell notes
Diffstat (limited to 'sc/source/filter/xml/xmlcelli.cxx')
-rw-r--r-- | sc/source/filter/xml/xmlcelli.cxx | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index 402669a07dfb..1abc24ab0d43 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xmlcelli.cxx,v $ * - * $Revision: 1.77 $ + * $Revision: 1.78 $ * - * last change: $Author: rt $ $Date: 2004-07-13 07:47:55 $ + * last change: $Author: hr $ $Date: 2004-09-08 13:50:47 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -106,6 +106,7 @@ #ifndef _SCERRORS_HXX #include "scerrors.hxx" #endif +#include "editutil.hxx" #include <xmloff/xmltkmap.hxx> #ifndef _XMLOFF_XMLTOKEN_HXX @@ -121,6 +122,9 @@ #include <xmloff/xmlnmspe.hxx> #endif #include <svtools/zforlist.hxx> +#ifndef _OUTLOBJ_HXX +#include <svx/outlobj.hxx> +#endif #include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/text/XText.hpp> @@ -178,6 +182,15 @@ using namespace xmloff::token; //------------------------------------------------------------------ +ScMyImportAnnotation::~ScMyImportAnnotation() +{ + delete pRect; + delete pItemSet; + delete pOPO; +} + +//------------------------------------------------------------------ + ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName, @@ -817,8 +830,24 @@ void ScXMLTableRowCellContext::SetAnnotation(const uno::Reference<table::XCell>& Color* pColor = NULL; Color** ppColor = &pColor; pNumForm->GetOutputString(fDate, nfIndex, sDate, ppColor); - ScPostIt aNote(String(pMyAnnotation->sText), sDate, String(pMyAnnotation->sAuthor)); + ScPostIt aNote(String(pMyAnnotation->sText),pDoc); + aNote.SetDate(sDate); + aNote.SetAuthor(String(pMyAnnotation->sAuthor)); aNote.SetShown(pMyAnnotation->bDisplay); + if (pMyAnnotation->pRect) + aNote.SetRectangle(*pMyAnnotation->pRect); + else + aNote.SetRectangle(aNote.DefaultRectangle(ScAddress(static_cast<SCCOL>(aCellAddress.Column), static_cast<SCROW>(aCellAddress.Row), aCellAddress.Sheet))); + if (pMyAnnotation->pItemSet) + aNote.SetItemSet(*(pMyAnnotation->pItemSet)); + if ( pMyAnnotation->pOPO ) + { + EditTextObject* pEditText = NULL; + ScNoteEditEngine& aEngine = pDoc->GetNoteEngine(); + aEngine.SetText(pMyAnnotation->pOPO->GetTextObject()); + pEditText = aEngine.CreateTextObject(); + aNote.SetEditTextObject(pEditText); // if pEditText is NULL, then aNote.mpEditObj will be reset(). + } pDoc->SetNote(static_cast<SCCOL>(aCellAddress.Column), static_cast<SCROW>(aCellAddress.Row), aCellAddress.Sheet, aNote); if (pMyAnnotation->bDisplay) { |