summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorKatarina Machalkova <kmachalkova@suse.cz>2010-10-13 18:18:47 +0200
committerKatarina Machalkova <kmachalkova@suse.cz>2010-10-13 19:57:41 +0200
commit6b9c9c6be36137eddfde118a52254529cc16ec8d (patch)
tree8672f1cc661c1c8f4f2574237d0829f4d3199c60 /oox
parent9be86ac41ebef521b5b9c8b77c8d79397043ae43 (diff)
Merged oox-sc-notes.diff from ooo-build
Diffstat (limited to 'oox')
-rw-r--r--oox/source/xls/commentsbuffer.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/oox/source/xls/commentsbuffer.cxx b/oox/source/xls/commentsbuffer.cxx
index 017bb548a70a..87a822fa8132 100644
--- a/oox/source/xls/commentsbuffer.cxx
+++ b/oox/source/xls/commentsbuffer.cxx
@@ -37,6 +37,10 @@
#include "oox/xls/addressconverter.hxx"
#include "oox/xls/drawingfragment.hxx"
+
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/text/XTextRange.hpp>
+
using ::rtl::OUString;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Exception;
@@ -50,6 +54,10 @@ using ::com::sun::star::sheet::XSheetAnnotationShapeSupplier;
using ::com::sun::star::sheet::XSheetAnnotations;
using ::com::sun::star::sheet::XSheetAnnotationsSupplier;
+using ::com::sun::star::text::XText;
+using ::com::sun::star::text::XTextRange;
+
+
namespace oox {
namespace xls {
@@ -110,6 +118,11 @@ void Comment::finalizeImport()
Reference< XSheetAnnotation > xAnno( xAnnoAnchor->getAnnotation(), UNO_SET_THROW );
Reference< XSheetAnnotationShapeSupplier > xAnnoShapeSupp( xAnno, UNO_QUERY_THROW );
Reference< XShape > xAnnoShape( xAnnoShapeSupp->getAnnotationShape(), UNO_SET_THROW );
+ Reference <XText> xText( xAnnoShape, UNO_QUERY_THROW );
+ Reference <XTextRange> xTextRange( xText, UNO_QUERY_THROW );
+ xTextRange->setString( OUString::createFromAscii("") ); // Clear contents
+ maModel.mxText->convert( xText, -1 );
+
// convert shape formatting
if( const ::oox::vml::ShapeBase* pNoteShape = getVmlDrawing().getNoteShape( aNotePos ) )
{