[ooo-build-commit] Branch 'ooo-build-3-1-1' - distro-configs/GoOoLinux.conf.in patches/dev300

Fridrich Strba fridrich at kemper.freedesktop.org
Mon Sep 14 07:24:03 PDT 2009


 distro-configs/GoOoLinux.conf.in       |    2 
 patches/dev300/ww8-image-position.diff |  244 ++++++++++++++++++++++-----------
 2 files changed, 167 insertions(+), 79 deletions(-)

New commits:
commit ae4b0e75d3d1886e34b5b727ae3348df94abb136
Author: Fridrich Strba <fridrich.strba at bluewin.ch>
Date:   Mon Sep 14 16:23:06 2009 +0200

    Rewrite patch not to use boost::optional + little options change
    
    * distro-configs/GoOoLinux.conf.in:
    * patches/dev300/ww8-image-position.diff:

diff --git a/distro-configs/GoOoLinux.conf.in b/distro-configs/GoOoLinux.conf.in
index 2373d8a..36f8ff5 100644
--- a/distro-configs/GoOoLinux.conf.in
+++ b/distro-configs/GoOoLinux.conf.in
@@ -1,6 +1,8 @@
 --with-intro-bitmaps=\"$TOOLSDIR/src/openintro_go-oo.bmp\"
 --with-about-bitmaps=\"$TOOLSDIR/src/openabout_go-oo.bmp\"
 --with-vendor=\"Novell, Inc.\"
+--disable-dbus
+--disable-kde4
 --disable-access
 --enable-cairo
 --without-system-cairo
diff --git a/patches/dev300/ww8-image-position.diff b/patches/dev300/ww8-image-position.diff
index 7c56392..5b1aac0 100644
--- a/patches/dev300/ww8-image-position.diff
+++ b/patches/dev300/ww8-image-position.diff
@@ -1,15 +1,6 @@
---- svx/inc/svx/msdffimp.hxx	2009-08-26 16:20:59.296875000 +0200
-+++ svx/inc/svx/msdffimp.hxx	2009-08-26 16:26:13.703125000 +0200
-@@ -50,6 +50,8 @@
- 
- #include <sot/storage.hxx>
- 
-+#include <boost/optional.hpp>
-+
- class Graphic;
- class SvStream;
- class SdrObject;
-@@ -170,6 +172,8 @@ struct MSDffTxId
+--- svx/inc/svx/msdffimp.hxx	2009-09-14 14:34:39.000000000 +0200
++++ svx/inc/svx/msdffimp.hxx	2009-09-14 15:30:39.000000000 +0200
+@@ -170,6 +170,8 @@
  
  struct SVX_DLLPUBLIC SvxMSDffImportRec
  {
@@ -18,54 +9,113 @@
  	SdrObject*	pObj;
  	Polygon*	pWrapPolygon;
  	char*		pClientAnchorBuffer;
-@@ -177,9 +181,9 @@ struct SVX_DLLPUBLIC SvxMSDffImportRec
+@@ -177,9 +179,9 @@
  	char*		pClientDataBuffer;
  	UINT32		nClientDataLen;
  	UINT32		nXAlign;
 -    UINT32		nXRelTo;
-+    boost::optional< UINT32 >		nXRelTo;
++	UINT32		*pXRelTo;
  	UINT32		nYAlign;
 -    UINT32		nYRelTo;
-+    boost::optional< UINT32	>    	nYRelTo;
++	UINT32	 	*pYRelTo;
  	UINT32		nLayoutInTableCell;
      UINT32      nFlags;
  	long		nTextRotationAngle;
---- svx/source/msfilter/msdffimp.cxx	2009-08-26 16:21:11.265625000 +0200
-+++ svx/source/msfilter/msdffimp.cxx	2009-08-26 16:28:45.265625000 +0200
-@@ -5438,9 +5438,9 @@ SdrObject* SvxMSDffManager::ProcessObj(S
+@@ -216,6 +218,8 @@
+ 	{   return nShapeId == rEntry.nShapeId; }
+ 	BOOL operator<( const SvxMSDffImportRec& rEntry ) const
+ 	{   return nShapeId < rEntry.nShapeId;  }
++private:
++	SvxMSDffImportRec &operator=(const SvxMSDffImportRec&);
+ };
+ typedef SvxMSDffImportRec* MSDffImportRec_Ptr;
+ 
+--- svx/source/msfilter/msdffimp.cxx	2009-09-14 14:35:58.000000000 +0200
++++ svx/source/msfilter/msdffimp.cxx	2009-09-14 15:05:37.000000000 +0200
+@@ -5438,9 +5438,19 @@
  				switch( nPID )
  				{
  					case 0x038F: pImpRec->nXAlign = nUDData; break;
 -					case 0x0390: pImpRec->nXRelTo = nUDData; break;
-+					case 0x0390: pImpRec->nXRelTo.reset(nUDData); break;
++					case 0x0390:
++						if (pImpRec->pXRelTo)
++							delete pImpRec->pXRelTo;
++						pImpRec->pXRelTo = new UINT32;
++						*(pImpRec->pXRelTo) = nUDData;
++						break;
  					case 0x0391: pImpRec->nYAlign = nUDData; break;
 -					case 0x0392: pImpRec->nYRelTo = nUDData; break;
-+					case 0x0392: pImpRec->nYRelTo.reset(nUDData); break;
++					case 0x0392:
++						if (pImpRec->pYRelTo)
++							delete pImpRec->pYRelTo;
++						pImpRec->pYRelTo = new UINT32;
++						*(pImpRec->pYRelTo) = nUDData;
++						break;
                      case 0x03BF: pImpRec->nLayoutInTableCell = nUDData; break;
  				}
  				if ( rSt.GetError() != 0 )
-@@ -7857,9 +7857,9 @@ SvxMSDffImportRec::SvxMSDffImportRec()
+@@ -7857,9 +7867,9 @@
        pClientDataBuffer( 0 ),
        nClientDataLen(    0 ),
        nXAlign( 0 ),	// position n cm from left
 -      nXRelTo( 2 ), //   relative to column
-+//      nXRelTo( 2 ), //   relative to column
++      pXRelTo( NULL ), //   relative to column
        nYAlign( 0 ), // position n cm below
 -      nYRelTo( 2 ), //   relative to paragraph
-+//      nYRelTo( 2 ), //   relative to paragraph
++      pYRelTo( NULL ), //   relative to paragraph
        nLayoutInTableCell( 0 ), // element is laid out in table cell
        nTextRotationAngle( 0 ),
        nDxTextLeft( 144 ),
---- sw/source/filter/docx/docx-ww8graf.cxx	2009-08-26 16:16:37.187500000 +0200
-+++ sw/source/filter/docx/docx-ww8graf.cxx	2009-08-26 22:31:35.109375000 +0200
-@@ -1958,11 +1958,17 @@ void SwWW8ImplReader::MatchSdrItemsIntoF
+@@ -7894,9 +7904,9 @@
+ SvxMSDffImportRec::SvxMSDffImportRec(const SvxMSDffImportRec& rCopy)
+     : pObj(	rCopy.pObj ),
+       nXAlign( rCopy.nXAlign ),
+-      nXRelTo( rCopy.nXRelTo ),
++      pXRelTo( NULL ),
+       nYAlign( rCopy.nYAlign ),
+-      nYRelTo( rCopy.nYRelTo ),
++      pYRelTo( NULL ),
+       nLayoutInTableCell( rCopy.nLayoutInTableCell ),
+       nTextRotationAngle( rCopy.nTextRotationAngle ),
+       nDxTextLeft( rCopy.nDxTextLeft	),
+@@ -7916,6 +7926,16 @@
+       nShapeId( rCopy.nShapeId ),
+       eShapeType( rCopy.eShapeType )
+ {
++    if (rCopy.pXRelTo)
++    {
++       pXRelTo = new UINT32;
++       *pXRelTo = *(rCopy.pXRelTo);
++    }
++    if (rCopy.pYRelTo)
++    {
++       pYRelTo = new UINT32;
++       *pYRelTo = *(rCopy.pYRelTo);
++    }
+     eLineStyle       = rCopy.eLineStyle; // GPF-Bug #66227#
+     bDrawHell        = rCopy.bDrawHell;
+     bHidden          = rCopy.bHidden;
+@@ -7962,6 +7982,10 @@
+         delete[] pClientDataBuffer;
+     if (pWrapPolygon)
+         delete pWrapPolygon;
++    if (pXRelTo)
++        delete pXRelTo;
++    if (pYRelTo)
++        delete pYRelTo;
+ }
+ 
+ /* vi:set tabstop=4 shiftwidth=4 expandtab: */
+--- sw/source/filter/docx/docx-ww8graf.cxx	2009-09-14 14:37:33.000000000 +0200
++++ sw/source/filter/docx/docx-ww8graf.cxx	2009-09-14 15:43:08.000000000 +0200
+@@ -1958,11 +1958,17 @@
  void SwWW8ImplReader::AdjustLRWrapForWordMargins(
      const SvxMSDffImportRec &rRecord, SvxLRSpaceItem &rLR)
  {
 +    UINT32 nXRelTo = SvxMSDffImportRec::RELTO_DEFAULT;
-+    if ( !!rRecord.nXRelTo )
++    if ( rRecord.pXRelTo )
 +    {
-+        nXRelTo = *rRecord.nXRelTo.get( );
++        nXRelTo = *(rRecord.pXRelTo);
 +    }
 +
      // Left adjustments - if horizontally aligned to left of
@@ -77,7 +127,7 @@
              rLR.SetLeft((USHORT)0);
      }
  
-@@ -1970,18 +1976,18 @@ void SwWW8ImplReader::AdjustLRWrapForWor
+@@ -1970,18 +1976,18 @@
      // margin or column then remove the right wrapping
      if (rRecord.nXAlign == 3)
      {
@@ -99,14 +149,14 @@
      {
          rLR.SetRight((USHORT)0);
      }
-@@ -1991,11 +1997,17 @@ void SwWW8ImplReader::AdjustLRWrapForWor
+@@ -1991,11 +1997,17 @@
  void SwWW8ImplReader::AdjustULWrapForWordMargins(
      const SvxMSDffImportRec &rRecord, SvxULSpaceItem &rUL)
  {
 +    UINT32 nYRelTo = SvxMSDffImportRec::RELTO_DEFAULT;
-+    if ( !!rRecord.nYRelTo )
++    if ( rRecord.pYRelTo )
 +    {
-+        nYRelTo = *rRecord.nYRelTo.get( );
++        nYRelTo = *(rRecord.pYRelTo);
 +    }
 +    
      // Top adjustment - remove upper wrapping if aligned to page
@@ -118,7 +168,7 @@
              rUL.SetUpper((USHORT)0);
      }
  
-@@ -2003,12 +2015,12 @@ void SwWW8ImplReader::AdjustULWrapForWor
+@@ -2003,12 +2015,12 @@
      // printable area or to page
      if (rRecord.nYAlign == 3)
      {
@@ -133,7 +183,7 @@
          rUL.SetUpper((USHORT)0);
  
      /*
-@@ -2251,11 +2263,11 @@ RndStdIds SwWW8ImplReader::ProcessEscher
+@@ -2251,17 +2263,23 @@
  
      SvxMSDffImportRec aRecordFromFSPA;
      if (!pRecord)
@@ -141,27 +191,40 @@
          pRecord = &aRecordFromFSPA;
 -        pRecord->nXRelTo = pFSPA->nbx;
 -        pRecord->nYRelTo = pFSPA->nby;
--    }
-+    if (!pRecord->nXRelTo && pFSPA)
-+        pRecord->nXRelTo.reset(pFSPA->nbx);
-+    if (!pRecord->nYRelTo && pFSPA)
-+        pRecord->nYRelTo.reset(pFSPA->nby);
++    if (!(pRecord->pXRelTo) && pFSPA)
++    {
++    	pRecord->pXRelTo = new UINT32;
++	*(pRecord->pXRelTo) = pFSPA->nbx;
++    }
++    if (!(pRecord->pYRelTo) && pFSPA)
++    {
++        pRecord->pYRelTo = new UINT32;
++	*(pRecord->pYRelTo) = pFSPA->nby;
+     }
  
      // nXAlign - abs. Position, Left,  Centered,  Right,  Inside, Outside
      // nYAlign - abs. Position, Top,   Centered,  Bottom, Inside, Outside
-@@ -2283,19 +2295,19 @@ RndStdIds SwWW8ImplReader::ProcessEscher
+ 
+-    // nXRelTo - Page printable area, Page,  Column,    Character
+-    // nYRelTo - Page printable area, Page,  Paragraph, Line
++    // *pXRelTo - Page printable area, Page,  Column,    Character
++    // *pYRelTo - Page printable area, Page,  Paragraph, Line
+ 
+     const UINT32 nCntXAlign = 6;
+     const UINT32 nCntYAlign = 6;
+@@ -2283,19 +2301,19 @@
          // is a hint that these values aren't set by the escher import - see
          // method <SwMSDffManager::ProcessObj(..)>. Then, check if for each
          // values, if it differs from the one in the FSPA.
 -        if ( pRecord->nXRelTo == 2 && pRecord->nYRelTo == 2 )
-+        if ( *pRecord->nXRelTo.get( ) == 2 && *pRecord->nYRelTo.get( ) == 2 )
++        if ( *(pRecord->pXRelTo) == 2 && *(pRecord->pYRelTo) == 2 )
          {
              // if <nYRelTo> differs from <FSPA.nby> overwrite <nYRelTo>
 -            if ( pFSPA->nby != pRecord->nYRelTo )
-+            if ( pFSPA->nby != *pRecord->nYRelTo.get( ) )
++            if ( pFSPA->nby != *(pRecord->pYRelTo) )
              {
 -                pRecord->nYRelTo = pFSPA->nby;
-+                pRecord->nYRelTo.reset(pFSPA->nby);
++                *(pRecord->pYRelTo) = pFSPA->nby;
              }
          }
          // <--
@@ -169,35 +232,45 @@
  
 -    UINT32 nXRelTo = nCntRelTo > pRecord->nXRelTo ? pRecord->nXRelTo : 1;
 -    UINT32 nYRelTo = nCntRelTo > pRecord->nYRelTo ? pRecord->nYRelTo : 1;
-+    UINT32 nXRelTo = nCntRelTo > *pRecord->nXRelTo.get( ) ? *pRecord->nXRelTo.get( ) : 1;
-+    UINT32 nYRelTo = nCntRelTo > *pRecord->nYRelTo.get( ) ? *pRecord->nYRelTo.get( ) : 1;
++    UINT32 nXRelTo = nCntRelTo > *(pRecord->pXRelTo) ? *(pRecord->pXRelTo) : 1;
++    UINT32 nYRelTo = nCntRelTo > *(pRecord->pYRelTo) ? *(pRecord->pYRelTo) : 1;
  
      // --> OD 2005-03-03 #i43718#
      RndStdIds eAnchor = IsInlineEscherHack() ? FLY_IN_CNTNT : FLY_AUTO_CNTNT;
---- sw/source/filter/docx/docx-ww8par.cxx	2009-08-26 16:16:37.203125000 +0200
-+++ sw/source/filter/docx/docx-ww8par.cxx	2009-08-26 16:51:32.640625000 +0200
-@@ -320,9 +320,9 @@ SdrObject* SwMSDffManager::ProcessObj(Sv
+--- sw/source/filter/docx/docx-ww8par.cxx	2009-09-14 14:37:33.000000000 +0200
++++ sw/source/filter/docx/docx-ww8par.cxx	2009-09-14 15:47:46.000000000 +0200
+@@ -320,9 +320,19 @@
  				switch( nPID )
  				{
  					case 0x038F: pImpRec->nXAlign = nUDData; break;
 -					case 0x0390: pImpRec->nXRelTo = nUDData; break;
-+					case 0x0390: pImpRec->nXRelTo.reset(nUDData); break;
++					case 0x0390:
++						if (pImpRec->pXRelTo)
++							delete pImpRec->pXRelTo;
++						pImpRec->pXRelTo = new UINT32;
++						*(pImpRec->pXRelTo) = nUDData;
++						break;
  					case 0x0391: pImpRec->nYAlign = nUDData; break;
 -					case 0x0392: pImpRec->nYRelTo = nUDData; break;
-+					case 0x0392: pImpRec->nYRelTo.reset(nUDData); break;
++					case 0x0392:
++						if (pImpRec->pYRelTo)
++							delete pImpRec->pYRelTo;
++						pImpRec->pYRelTo = new UINT32;
++						*(pImpRec->pYRelTo) = nUDData;
++						break;
                      case 0x03BF: pImpRec->nLayoutInTableCell = nUDData; break;
  				}
  				if ( rSt.GetError() != 0 )
---- sw/source/filter/ww8/ww8graf.cxx	2009-08-26 16:16:37.921875000 +0200
-+++ sw/source/filter/ww8/ww8graf.cxx	2009-08-26 22:32:01.453125000 +0200
-@@ -1958,11 +1958,17 @@ void SwWW8ImplReader::MatchSdrItemsIntoF
+--- sw/source/filter/ww8/ww8graf.cxx	2009-09-14 14:37:32.000000000 +0200
++++ sw/source/filter/ww8/ww8graf.cxx	2009-09-14 15:59:53.000000000 +0200
+@@ -1958,11 +1958,17 @@
  void SwWW8ImplReader::AdjustLRWrapForWordMargins(
      const SvxMSDffImportRec &rRecord, SvxLRSpaceItem &rLR)
  {
 +    UINT32 nXRelTo = SvxMSDffImportRec::RELTO_DEFAULT;
-+    if ( !!rRecord.nXRelTo )
++    if ( rRecord.pXRelTo )
 +    {
-+        nXRelTo = *rRecord.nXRelTo.get( );
++        nXRelTo = *(rRecord.pXRelTo);
 +    }
 +
      // Left adjustments - if horizontally aligned to left of
@@ -209,7 +282,7 @@
              rLR.SetLeft((USHORT)0);
      }
  
-@@ -1970,18 +1976,18 @@ void SwWW8ImplReader::AdjustLRWrapForWor
+@@ -1970,18 +1976,18 @@
      // margin or column then remove the right wrapping
      if (rRecord.nXAlign == 3)
      {
@@ -231,14 +304,14 @@
      {
          rLR.SetRight((USHORT)0);
      }
-@@ -1991,11 +1997,17 @@ void SwWW8ImplReader::AdjustLRWrapForWor
+@@ -1991,11 +1997,17 @@
  void SwWW8ImplReader::AdjustULWrapForWordMargins(
      const SvxMSDffImportRec &rRecord, SvxULSpaceItem &rUL)
  {
 +    UINT32 nYRelTo = SvxMSDffImportRec::RELTO_DEFAULT;
-+    if ( !!rRecord.nYRelTo )
++    if ( rRecord.pYRelTo )
 +    {
-+        nYRelTo = *rRecord.nYRelTo.get( );
++        nYRelTo = *(rRecord.pYRelTo);
 +    }
 +
      // Top adjustment - remove upper wrapping if aligned to page
@@ -250,7 +323,7 @@
              rUL.SetUpper((USHORT)0);
      }
  
-@@ -2003,12 +2015,12 @@ void SwWW8ImplReader::AdjustULWrapForWor
+@@ -2003,12 +2015,12 @@
      // printable area or to page
      if (rRecord.nYAlign == 3)
      {
@@ -265,7 +338,7 @@
          rUL.SetUpper((USHORT)0);
  
      /*
-@@ -2251,11 +2263,11 @@ RndStdIds SwWW8ImplReader::ProcessEscher
+@@ -2251,10 +2263,16 @@
  
      SvxMSDffImportRec aRecordFromFSPA;
      if (!pRecord)
@@ -273,27 +346,31 @@
          pRecord = &aRecordFromFSPA;
 -        pRecord->nXRelTo = pFSPA->nbx;
 -        pRecord->nYRelTo = pFSPA->nby;
--    }
-+    if (!pRecord->nXRelTo && pFSPA)
-+        pRecord->nXRelTo.reset(pFSPA->nbx);
-+    if (!pRecord->nYRelTo && pFSPA)
-+        pRecord->nYRelTo.reset(pFSPA->nby);
++    if (!(pRecord->pXRelTo) && pFSPA)
++    {
++    	pRecord->pXRelTo = new UINT32;
++	*(pRecord->pXRelTo) = pFSPA->nbx;
++    }
++    if (!(pRecord->pYRelTo) && pFSPA)
++    {
++        pRecord->pYRelTo = new UINT32;
++	*(pRecord->pYRelTo) = pFSPA->nby;
+     }
  
      // nXAlign - abs. Position, Left,  Centered,  Right,  Inside, Outside
-     // nYAlign - abs. Position, Top,   Centered,  Bottom, Inside, Outside
-@@ -2283,19 +2295,19 @@ RndStdIds SwWW8ImplReader::ProcessEscher
+@@ -2283,19 +2301,19 @@
          // is a hint that these values aren't set by the escher import - see
          // method <SwMSDffManager::ProcessObj(..)>. Then, check if for each
          // values, if it differs from the one in the FSPA.
 -        if ( pRecord->nXRelTo == 2 && pRecord->nYRelTo == 2 )
-+        if ( *pRecord->nXRelTo.get( ) == 2 && *pRecord->nYRelTo.get( ) == 2 )
++        if ( *(pRecord->pXRelTo) == 2 && *(pRecord->pYRelTo) == 2 )
          {
              // if <nYRelTo> differs from <FSPA.nby> overwrite <nYRelTo>
 -            if ( pFSPA->nby != pRecord->nYRelTo )
-+            if ( pFSPA->nby != *pRecord->nYRelTo.get( ) )
++            if ( pFSPA->nby != *(pRecord->pYRelTo) )
              {
 -                pRecord->nYRelTo = pFSPA->nby;
-+                pRecord->nYRelTo.reset(pFSPA->nby);
++                *(pRecord->pYRelTo) = pFSPA->nby;
              }
          }
          // <--
@@ -301,23 +378,32 @@
  
 -    UINT32 nXRelTo = nCntRelTo > pRecord->nXRelTo ? pRecord->nXRelTo : 1;
 -    UINT32 nYRelTo = nCntRelTo > pRecord->nYRelTo ? pRecord->nYRelTo : 1;
-+    UINT32 nXRelTo = nCntRelTo > *pRecord->nXRelTo.get( ) ? *pRecord->nXRelTo.get( ) : 1;
-+    UINT32 nYRelTo = nCntRelTo > *pRecord->nYRelTo.get( ) ? *pRecord->nYRelTo.get( ) : 1;
++    UINT32 nXRelTo = nCntRelTo > *(pRecord->pXRelTo) ? *(pRecord->pXRelTo) : 1;
++    UINT32 nYRelTo = nCntRelTo > *(pRecord->pYRelTo) ? *(pRecord->pYRelTo) : 1;
  
      // --> OD 2005-03-03 #i43718#
      RndStdIds eAnchor = IsInlineEscherHack() ? FLY_IN_CNTNT : FLY_AUTO_CNTNT;
-Only in sw/source/filter/ww8: ww8graf.cxx
---- sw/source/filter/ww8/ww8par.cxx	2009-08-26 16:16:37.937500000 +0200
-+++ sw/source/filter/ww8/ww8par.cxx	2009-08-26 16:43:09.906250000 +0200
-@@ -471,9 +471,9 @@ SdrObject* SwMSDffManager::ProcessObj(Sv
+--- sw/source/filter/ww8/ww8par.cxx	2009-09-14 14:37:32.000000000 +0200
++++ sw/source/filter/ww8/ww8par.cxx	2009-09-14 16:04:31.000000000 +0200
+@@ -471,9 +471,19 @@
  				switch( nPID )
  				{
  					case 0x038F: pImpRec->nXAlign = nUDData; break;
 -					case 0x0390: pImpRec->nXRelTo = nUDData; break;
-+					case 0x0390: pImpRec->nXRelTo.reset(nUDData); break;
++					case 0x0390:
++						if (pImpRec->pXRelTo)
++							delete pImpRec->pXRelTo;
++						pImpRec->pXRelTo = new UINT32;
++						*(pImpRec->pXRelTo) = nUDData;
++						break;
  					case 0x0391: pImpRec->nYAlign = nUDData; break;
 -					case 0x0392: pImpRec->nYRelTo = nUDData; break;
-+					case 0x0392: pImpRec->nYRelTo.reset(nUDData); break;
++					case 0x0392:
++						if (pImpRec->pYRelTo)
++							delete pImpRec->pYRelTo;
++						pImpRec->pYRelTo = new UINT32;
++						*(pImpRec->pYRelTo) = nUDData;
++						break;
                      case 0x03BF: pImpRec->nLayoutInTableCell = nUDData; break;
  				}
  				if ( rSt.GetError() != 0 )


More information about the ooo-build-commit mailing list