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

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Mon Apr 26 06:36:18 PDT 2010


 patches/dev300/docx-fixes02.diff |   67 +++++++++++++++++++++++++++++++++------
 1 file changed, 58 insertions(+), 9 deletions(-)

New commits:
commit bcd90cd99e82064f0bde2b56a81c8a3b53ee4fed
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Mon Apr 26 15:35:22 2010 +0200

    Exported sub/superscripts in docx
    
    * patches/dev300/docx-fixes02.diff:

diff --git a/patches/dev300/docx-fixes02.diff b/patches/dev300/docx-fixes02.diff
index 42d7245..49edf38 100644
--- a/patches/dev300/docx-fixes02.diff
+++ b/patches/dev300/docx-fixes02.diff
@@ -94,7 +94,7 @@ index fe986f1..d66d83c 100644
  
      void writeFastAttributeList( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs );
 diff --git sw/source/filter/ww8/docxattributeoutput.cxx sw/source/filter/ww8/docxattributeoutput.cxx
-index d82f2c8..d3fb5c4 100644
+index d82f2c8..57d2969 100644
 --- sw/source/filter/ww8/docxattributeoutput.cxx
 +++ sw/source/filter/ww8/docxattributeoutput.cxx
 @@ -34,6 +34,8 @@
@@ -160,7 +160,56 @@ index d82f2c8..d3fb5c4 100644
          default:
  #if OSL_DEBUG_LEVEL > 0
              fprintf( stderr, "TODO DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Point& rNdTopLeft ) - frame type '%s'\n",
-@@ -3074,9 +3109,22 @@ void DocxAttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
+@@ -2367,11 +2402,43 @@ void DocxAttributeOutput::CharCrossedOut( const SvxCrossedOutItem& rCrossedOut )
+     }
+ }
+ 
+-void DocxAttributeOutput::CharEscapement( const SvxEscapementItem& /*rEscapement*/ )
+-{
+-#if OSL_DEBUG_LEVEL > 0
+-    fprintf( stderr, "TODO DocxAttributeOutput::CharEscapement()\n" );
+-#endif
++void DocxAttributeOutput::CharEscapement( const SvxEscapementItem& rEscapement )
++{ 
++    OString sIss;
++    short nEsc = rEscapement.GetEsc(), nProp = rEscapement.GetProp();
++    if ( !nEsc )
++    {
++        sIss = OString( "baseline" );
++        nEsc = 0;
++        nProp = 100;
++    }
++    else if ( DFLT_ESC_PROP == nProp )
++    {
++        if ( DFLT_ESC_SUB == nEsc || DFLT_ESC_AUTO_SUB == nEsc )
++            sIss = OString( "subscript" );
++        else if ( DFLT_ESC_SUPER == nEsc || DFLT_ESC_AUTO_SUPER == nEsc )
++            sIss = OString( "superscript" );
++    }
++    
++    if ( sIss.getLength( ) > 0 )
++        m_pSerializer->singleElementNS( XML_w, XML_vertAlign, 
++           FSNS( XML_w, XML_val ), sIss.getStr(), FSEND );
++
++    if ( sIss.getLength() == 0 || sIss.match( OString( "baseline" ) ) )
++    {
++        long nHeight = ((SvxFontHeightItem&)m_rExport.GetItem(
++                                    RES_CHRATR_FONTSIZE )).GetHeight();
++        OString sPos = OString::valueOf( ( nHeight * nEsc + 500 ) / 1000 );
++        m_pSerializer->singleElementNS( XML_w, XML_position,
++                FSNS( XML_w, XML_val ), sPos.getStr( ), FSEND );
++
++        if( 100 != nProp || sIss.match( OString( "baseline" ) ) )
++        {
++            OString sSize = OString::valueOf( ( nHeight * nProp + 500 ) / 1000 );
++                m_pSerializer->singleElementNS( XML_w, XML_sz,
++                    FSNS( XML_w, XML_val ), sSize.getStr( ), FSEND );
++        }
++    }
+ }
+ 
+ void DocxAttributeOutput::CharFont( const SvxFontItem& rFont)
+@@ -3074,9 +3141,22 @@ void DocxAttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
  {
      if ( m_rExport.bOutFlyFrmAttrs )
      {
@@ -186,7 +235,7 @@ index d82f2c8..d3fb5c4 100644
      }
      else if ( m_rExport.bOutPageDescs ) 
      {
-@@ -3106,9 +3154,12 @@ void DocxAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace )
+@@ -3106,9 +3186,12 @@ void DocxAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace )
  {
      if ( m_rExport.bOutFlyFrmAttrs )
      {
@@ -202,7 +251,7 @@ index d82f2c8..d3fb5c4 100644
      }
      else if ( m_rExport.bOutPageDescs ) 
      {
-@@ -3149,11 +3200,17 @@ void DocxAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace )
+@@ -3149,11 +3232,17 @@ void DocxAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace )
  
  void DocxAttributeOutput::FormatULSpace( const SvxULSpaceItem& rULSpace )
  {
@@ -221,7 +270,7 @@ index d82f2c8..d3fb5c4 100644
      } 
      else if (m_rExport.bOutPageDescs )
      {
-@@ -3195,32 +3252,150 @@ void DocxAttributeOutput::FormatULSpace( const SvxULSpaceItem& rULSpace )
+@@ -3195,32 +3284,150 @@ void DocxAttributeOutput::FormatULSpace( const SvxULSpaceItem& rULSpace )
      }
  }
  
@@ -387,7 +436,7 @@ index d82f2c8..d3fb5c4 100644
  }
  
  void DocxAttributeOutput::FormatBackground( const SvxBrushItem& rBrush )
-@@ -3232,10 +3407,6 @@ void DocxAttributeOutput::FormatBackground( const SvxBrushItem& rBrush )
+@@ -3232,10 +3439,6 @@ void DocxAttributeOutput::FormatBackground( const SvxBrushItem& rBrush )
                  FSNS( XML_w, XML_fill ), sColor.getStr( ),
                  FSEND );
      }
@@ -398,7 +447,7 @@ index d82f2c8..d3fb5c4 100644
  }
  
  void DocxAttributeOutput::FormatBox( const SvxBoxItem& rBox )
-@@ -3380,6 +3551,7 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport &rExport, FSHelperPtr pSeri
+@@ -3380,6 +3583,7 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport &rExport, FSHelperPtr pSeri
        m_pCharLangAttrList( NULL ),
        m_pSpacingAttrList( NULL ),
        m_pHyperlinkAttrList( NULL ),
@@ -406,7 +455,7 @@ index d82f2c8..d3fb5c4 100644
        m_pFootnotesList( new ::docx::FootnotesList() ),
        m_pEndnotesList( new ::docx::FootnotesList() ),
        m_pSectionInfo( NULL ),
-@@ -3392,7 +3564,8 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport &rExport, FSHelperPtr pSeri
+@@ -3392,7 +3596,8 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport &rExport, FSHelperPtr pSeri
        m_bTableCellOpen( false ),
        m_nTableDepth( 0 ),
        m_bParagraphOpened( false ),
@@ -416,7 +465,7 @@ index d82f2c8..d3fb5c4 100644
  {
  }
  
-@@ -3403,11 +3576,13 @@ DocxAttributeOutput::~DocxAttributeOutput()
+@@ -3403,11 +3608,13 @@ DocxAttributeOutput::~DocxAttributeOutput()
      delete m_pCharLangAttrList, m_pCharLangAttrList = NULL;
      delete m_pSpacingAttrList, m_pSpacingAttrList = NULL;
      delete m_pHyperlinkAttrList, m_pHyperlinkAttrList = NULL;


More information about the ooo-build-commit mailing list