[ooo-build-commit] .: patches/dev300

Muthu Subramanian sumuthu at kemper.freedesktop.org
Wed Aug 18 03:45:12 PDT 2010


 patches/dev300/apply             |    3 +
 patches/dev300/oox-sc-notes.diff |   75 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 78 insertions(+)

New commits:
commit abbf007e52ae52efb55503c8db247df4ad8a8e10
Author: Muthu Subramanian K <sumuthu at novell.com>
Date:   Wed Aug 18 16:08:30 2010 +0530

    Comments import/export with basic formatting.
    
    * patches/dev300/apply: Added additional OOXMLExportDevel section at ~EOF
    * patches/dev300/oox-sc-notes.diff: Combined patch (both imp and exp)

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 76f16ae..0f69ca8 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3656,6 +3656,9 @@ oox-ooo330-import-fix.diff, muthusuba
 [ CalcFixes >= ooo330-m2 ]
 sc-ooo330-m2-fixes.diff, muthusuba
 
+[ OOXMLExportDevel ]
+oox-sc-notes.diff, muthusuba
+
 [ Fixes ]
 oox-pptx-import-fix-customshapes-and-groups.diff, n#621739, rodo
 
diff --git a/patches/dev300/oox-sc-notes.diff b/patches/dev300/oox-sc-notes.diff
new file mode 100644
index 0000000..76a0c45
--- /dev/null
+++ b/patches/dev300/oox-sc-notes.diff
@@ -0,0 +1,75 @@
+--- sc/source/filter/excel/xeescher.cxx	2010-07-16 21:20:19.000000000 +0530
++++ sc/source/filter/excel/xeescher.cxx	2010-08-09 17:23:46.000000000 +0530
+@@ -1000,7 +1000,12 @@ XclExpNote::XclExpNote( const XclExpRoot
+     // get the main note text
+     String aNoteText;
+     if( pScNote )
++    {
+         aNoteText = pScNote->GetText();
++        const EditTextObject *pEditObj = pScNote->GetEditTextObject();
++        if( pEditObj )
++            mpNoteContents = XclExpStringHelper::CreateString( rRoot, *pEditObj );
++    }
+     // append additional text
+     ScGlobal::AddToken( aNoteText, rAddText, '\n', 2 );
+     maOrigNoteText = aNoteText;
+--- sc/source/ui/unoobj/notesuno.cxx	2010-08-08 23:28:11.000000000 +0530
++++ sc/source/ui/unoobj/notesuno.cxx	2010-08-17 12:44:56.000000000 +0530
+@@ -56,16 +56,20 @@
+ #include <svx/svditer.hxx>
+ #include <svx/svdpage.hxx>
+ #include <com/sun/star/drawing/XShapeDescriptor.hpp>
++#include <editeng/unoprnms.hxx>
+ 
+ using namespace com::sun::star;
+ 
+ //------------------------------------------------------------------------
+ 
+-//	keine Properties fuer Text in Notizen
+ const SvxItemPropertySet* lcl_GetAnnotationPropertySet()
+ {
+     static SfxItemPropertyMapEntry aAnnotationPropertyMap_Impl[] =
+     {
++        SVX_UNOEDIT_CHAR_PROPERTIES,
++        SVX_UNOEDIT_FONT_PROPERTIES,
++        SVX_UNOEDIT_PARA_PROPERTIES,
++        SVX_UNOEDIT_NUMBERING_PROPERTIE,	// for completeness of service ParagraphProperties
+         {0,0,0,0,0,0}
+     };
+     static SvxItemPropertySet aAnnotationPropertySet_Impl( aAnnotationPropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() ); 
+--- oox/source/xls/commentsbuffer.cxx	2010-08-08 23:27:58.000000000 +0530
++++ oox/source/xls/commentsbuffer.cxx	2010-08-17 12:36:40.000000000 +0530
+@@ -36,6 +36,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;
+@@ -49,6 +53,10 @@ using ::com::sun::star::sheet::XSheetAnn
+ 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 {
+ 
+@@ -109,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> xTextRan( xText, UNO_QUERY_THROW );
++            xTextRan->setString( OUString::createFromAscii("") ); // Clear contents
++            maModel.mxText->convert( xText, -1 );
++
+             // convert shape formatting
+             if( const ::oox::vml::ShapeBase* pNoteShape = getVmlDrawing().getNoteShape( aNotePos ) )
+             {


More information about the ooo-build-commit mailing list