[Libreoffice-commits] .: 2 commits - writerfilter/source

Noel Power noelp at kemper.freedesktop.org
Thu May 19 09:29:28 PDT 2011


 writerfilter/source/dmapper/DomainMapperTableHandler.cxx |   31 ---------------
 1 file changed, 31 deletions(-)

New commits:
commit cb9334a1a9ee687b999712f83954bae2361f8032
Author: Noel Power <noel.power at novell.com>
Date:   Thu May 19 17:23:10 2011 +0100

    fix for fod#37367 ( docx import of hyperlinks )
    
    this fix is a companion fix for the change made below
    http://cgit.freedesktop.org/libreoffice/filters/commit/?id=cdd636907675d538ca10d479afc538ce3800e729
    previously OOXMLHyperlinkHandler::~OOXMLHyperlinkHandler()'s call resulted in
    the OOXMLFastContextHandlerStream::lcl_character method getting called which in
     turn called the OOXMLFastContextHandler::text method. This no longer happens
    so we call the text method directly now

diff --git a/writerfilter/source/ooxml/Handler.cxx b/writerfilter/source/ooxml/Handler.cxx
index cad510a..0f3a2a8 100644
--- a/writerfilter/source/ooxml/Handler.cxx
+++ b/writerfilter/source/ooxml/Handler.cxx
@@ -309,7 +309,7 @@ OOXMLHyperlinkHandler::~OOXMLHyperlinkHandler()
     sReturn += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\""));
     sReturn += mFieldCode;
 
-    mpFastContext->characters(sReturn);
+    mpFastContext->text(sReturn);
 }
 
 void OOXMLHyperlinkHandler::attribute(Id name, Value & val)
commit d5aaa5b473dde529f3aef9c1e85c3b86dbe620c0
Author: Noel Power <noel.power at novell.com>
Date:   Thu May 19 17:21:59 2011 +0100

    Revert "fix for fod#37367 ( docx import of hyperlinks )"
    
    This reverts commit ac80fce47404c0843c372336ab700d62297f1647.
    
    contains stray debug commits

diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index c6f8f78..c68e957 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -33,7 +33,6 @@
 #include <com/sun/star/table/BorderLine2.hpp>
 #include <com/sun/star/text/HoriOrientation.hpp>
 #include <dmapperLoggers.hxx>
-#include <comphelper/anytostring.hxx>
 
 #ifdef DEBUG_DMAPPER_TABLE_HANDLER
 #include <PropertyMapHelper.hxx>
@@ -52,33 +51,6 @@ using namespace ::std;
 #define DEF_BORDER_DIST 190  //0,19cm
 #define DEFAULT_CELL_MARGIN 108 //default cell margin, not documented 
 
-void dumpSequenceOfSequence( const char* msg, const uno::Sequence< uno::Sequence< beans::PropertyValue > >& seqOfSeq )
-{
-    if ( msg )
-        osl_trace("%s", msg);
-    for ( int row=0; row < seqOfSeq.getLength(); ++row )
-    {
-        const uno::Sequence< beans::PropertyValue >& props = seqOfSeq[ row ];
-        for ( int index=0; index < props.getLength(); ++index )
-        {
-            rtl::OUString sVal( ::comphelper::anyToString( props[ index ].Value ) );
-
-            osl_trace( "seq[%d][%d] prop name %s, value %s", row,index,
-                rtl::OUStringToOString( props[ index ].Name, RTL_TEXTENCODING_UTF8 ).getStr() ,
-                rtl::OUStringToOString( sVal, RTL_TEXTENCODING_UTF8 ).getStr() );
-        }
-    }
-}
-
-void dumpSequenceOfSequenceOfSequence( const char* msg, const uno::Sequence< uno::Sequence< uno::Sequence< beans::PropertyValue > > >& seqOfSeqOfSeq )
-{
-    for ( int index=0; index < seqOfSeqOfSeq.getLength(); ++index )
-    {
-        osl_trace("dumping seqOfseq[ %d ]", index );
-        uno::Sequence< uno::Sequence< beans::PropertyValue > > seqOfSeq = seqOfSeqOfSeq[ index ];
-        dumpSequenceOfSequence( msg, seqOfSeq );
-    }
-}
 #ifdef DEBUG_DMAPPER_TABLE_HANDLER
 static void  lcl_printProperties( PropertyMapPtr pProps )
 {
@@ -736,9 +708,6 @@ void DomainMapperTableHandler::endTable()
     {
         try
         {
-            osl_trace("about to convert the table");
-            dumpSequenceOfSequenceOfSequence( "dumping the cell properties", aCellProperties );
-            dumpSequenceOfSequence( "dumping the row properties", aRowProperties );
             uno::Reference<text::XTextTable> xTable = m_xText->convertToTable(*m_pTableSeq, 
                                     aCellProperties,
                                     aRowProperties,
diff --git a/writerfilter/source/ooxml/Handler.cxx b/writerfilter/source/ooxml/Handler.cxx
index 0f3a2a8..cad510a 100644
--- a/writerfilter/source/ooxml/Handler.cxx
+++ b/writerfilter/source/ooxml/Handler.cxx
@@ -309,7 +309,7 @@ OOXMLHyperlinkHandler::~OOXMLHyperlinkHandler()
     sReturn += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\""));
     sReturn += mFieldCode;
 
-    mpFastContext->text(sReturn);
+    mpFastContext->characters(sReturn);
 }
 
 void OOXMLHyperlinkHandler::attribute(Id name, Value & val)


More information about the Libreoffice-commits mailing list