[ooo-build-commit] patches/dev300

Tor Lillqvist tml at kemper.freedesktop.org
Fri Aug 14 03:07:53 PDT 2009


 patches/dev300/apply                       |    2 
 patches/dev300/svx-ppt-text-style-fix.diff |  654 -----------------------------
 2 files changed, 656 deletions(-)

New commits:
commit 8ff3d541fa2414c7228df7599124ac1ac7bc1383
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Fri Aug 14 13:07:10 2009 +0300

    svx-ppt-text-style-fix.diff is upstream
    
    * patches/dev300/svx-ppt-text-style-fix.diff: Delete.
    * patches/dev300/apply: Drop it.

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 2e93c4c..02d4e77 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -2935,8 +2935,6 @@ svx-ooo320-backports.diff, thorsten
 
 # Fix from Andre, allows to step back one animation effect
 slideshow-effect-rewind.diff, i#48179, thorsten
-# import and export StyleTextProp also for empty text
-svx-ppt-text-style-fix.diff, n#485630, thorsten
 # correctly set table row height during ppt import
 svx-ppt-tablerow-height-fix.diff, n#483951, i#100275, thorsten
 # detect additinal monitor in xinerama setup during runtime, from cws
diff --git a/patches/dev300/svx-ppt-text-style-fix.diff b/patches/dev300/svx-ppt-text-style-fix.diff
deleted file mode 100644
index 1727cfd..0000000
--- a/patches/dev300/svx-ppt-text-style-fix.diff
+++ /dev/null
@@ -1,654 +0,0 @@
-Fix for bug n#485630 (import/export of text style when no text is present)
-
-From: Thorsten Behrens <thb at openoffice.org>
-
-
----
-
- sd/source/filter/eppt/epptso.cxx |   47 +---
- svx/inc/svx/svdfppt.hxx          |   12 +
- svx/source/svdraw/svdfppt.cxx    |  497 +++++++++++++++++++++-----------------
- 3 files changed, 311 insertions(+), 245 deletions(-)
-
-
-diff --git sd/source/filter/eppt/epptso.cxx sd/source/filter/eppt/epptso.cxx
-index 84d6e3b..08c427f 100644
---- sd/source/filter/eppt/epptso.cxx
-+++ sd/source/filter/eppt/epptso.cxx
-@@ -3157,11 +3157,15 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u
- 
- 	if ( mbEmptyPresObj )
-         mnTextSize = 0;
--    if ( mnTextSize )
-+    if ( !mbEmptyPresObj )
-     {
-         ParagraphObj* pPara;
-         TextObj aTextObj( mXText, nTextInstance, maFontCollection, (PPTExBulletProvider&)*this );
--        aTextObj.Write( &rOut );
-+
-+        // leaving out EPP_TextCharsAtom w/o text - still write out
-+        // attribute info though
-+        if ( mnTextSize )
-+            aTextObj.Write( &rOut );
- 
- 		if ( pPropOpt )
- 			ImplAdjustFirstLineLineSpacing( aTextObj, *pPropOpt );
-@@ -5707,38 +5711,25 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape >& rXShape, Esc
- 							ImplCreateShape( ESCHER_ShpInst_Rectangle, 0xa02, aSolverContainer );          // Flags: Connector | HasSpt | Child
- 							aPropOptSp.CreateFillProperties( mXPropSet, sal_True );
- 							aPropOptSp.AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x90000 );
--							if ( mnTextSize )
--								aPropOptSp.CreateTextProperties( mXPropSet, mnTxId += 0x60, sal_False, sal_True );
-+                            aPropOptSp.CreateTextProperties( mXPropSet, mnTxId += 0x60, sal_False, sal_True );
- 							aPropOptSp.AddOpt( ESCHER_Prop_WrapText, ESCHER_WrapSquare );
- 
--							if ( mnTextSize )
--							{
--								SvMemoryStream aClientTextBox( 0x200, 0x200 );
--								SvMemoryStream  aExtBu( 0x200, 0x200 );
-+                            SvMemoryStream aClientTextBox( 0x200, 0x200 );
-+                            SvMemoryStream  aExtBu( 0x200, 0x200 );
- 
--								ImplWriteTextStyleAtom( aClientTextBox, EPP_TEXTTYPE_Other, 0, NULL, aExtBu, &aPropOptSp );
-+                            ImplWriteTextStyleAtom( aClientTextBox, EPP_TEXTTYPE_Other, 0, NULL, aExtBu, &aPropOptSp );
- 
--								aPropOptSp.Commit( *mpStrm );
--								mpPptEscherEx->AddAtom( 16, ESCHER_ChildAnchor );
--								*mpStrm 	<< nLeft
--											<< nTop
--		   									<< nRight
--											<< nBottom;
-+                            aPropOptSp.Commit( *mpStrm );
-+                            mpPptEscherEx->AddAtom( 16, ESCHER_ChildAnchor );
-+                            *mpStrm 	<< nLeft
-+                                        << nTop
-+                                        << nRight
-+                                        << nBottom;
- 
--								*mpStrm << (sal_uInt32)( ( ESCHER_ClientTextbox << 16 ) | 0xf )
--										<< (sal_uInt32)aClientTextBox.Tell();
-+                            *mpStrm << (sal_uInt32)( ( ESCHER_ClientTextbox << 16 ) | 0xf )
-+                                    << (sal_uInt32)aClientTextBox.Tell();
- 
--								mpStrm->Write( aClientTextBox.GetData(), aClientTextBox.Tell() );
--							}
--							else
--							{
--								aPropOptSp.Commit( *mpStrm );
--								mpPptEscherEx->AddAtom( 16, ESCHER_ChildAnchor );
--								*mpStrm 	<< nLeft
--											<< nTop
--		   									<< nRight
--											<< nBottom;
--							}
-+                            mpStrm->Write( aClientTextBox.GetData(), aClientTextBox.Tell() );
- 							mpPptEscherEx->CloseContainer();
- 						}
- 					}
-diff --git svx/inc/svx/svdfppt.hxx svx/inc/svx/svdfppt.hxx
-index a9f3664..6cb1570 100644
---- svx/inc/svx/svdfppt.hxx
-+++ svx/inc/svx/svdfppt.hxx
-@@ -989,6 +989,18 @@ struct PPTStyleTextPropReader
- 	PPTStyleTextPropReader( SvStream& rIn, SdrPowerPointImport&, const DffRecordHeader& rClientTextBoxHd,
- 		PPTTextRulerInterpreter& rInterpreter, const DffRecordHeader& rExtParaHd, sal_uInt32 nTextInstance );
- 
-+	void Init( SvStream& rIn, SdrPowerPointImport&, const DffRecordHeader& rClientTextBoxHd,
-+               PPTTextRulerInterpreter& rInterpreter, const DffRecordHeader& rExtParaHd, sal_uInt32 nTextInstance );
-+    void ReadParaProps( SvStream& rIn, SdrPowerPointImport& rMan, const DffRecordHeader& rTextHeader,
-+                        const String& aString, PPTTextRulerInterpreter& rRuler, 
-+                        sal_uInt32& nCharCount, sal_Bool& bTextPropAtom );
-+    void ReadCharProps( SvStream& rIn, PPTCharPropSet& aCharPropSet, const String& aString, 
-+                        sal_uInt32& nCharCount, sal_uInt32 nCharAnzRead,
-+                        sal_Bool& bTextPropAtom, sal_uInt32 nExtParaPos, 
-+                        const std::vector< StyleTextProp9 >& aStyleTextProp9, 
-+                        sal_uInt32& nExtParaFlags, sal_uInt16& nBuBlip, 
-+                        sal_uInt16& nHasAnm, sal_uInt32& nAnmScheme );
-+
- 	~PPTStyleTextPropReader();
- };
- 
-diff --git svx/source/svdraw/svdfppt.cxx svx/source/svdraw/svdfppt.cxx
-index 9cbbe18..8caf151 100644
---- svx/source/svdraw/svdfppt.cxx
-+++ svx/source/svdraw/svdfppt.cxx
-@@ -4976,6 +4976,246 @@ void StyleTextProp9::Read( SvStream& rIn )
- PPTStyleTextPropReader::PPTStyleTextPropReader( SvStream& rIn, SdrPowerPointImport& rMan, const DffRecordHeader& rTextHeader,
- 														PPTTextRulerInterpreter& rRuler, const DffRecordHeader& rExtParaHd, sal_uInt32 nInstance )
- {
-+    Init(rIn, rMan, rTextHeader, rRuler, rExtParaHd, nInstance);
-+}
-+
-+void PPTStyleTextPropReader::ReadParaProps( SvStream& rIn, SdrPowerPointImport& rMan, const DffRecordHeader& rTextHeader,
-+                                            const String& aString, PPTTextRulerInterpreter& rRuler, 
-+                                            sal_uInt32& nCharCount, sal_Bool& bTextPropAtom )
-+{
-+    sal_uInt32  nMask = 0; //TODO: nMask initialized here to suppress warning for now, see corresponding TODO below
-+    sal_uInt32  nCharAnzRead = 0;
-+    sal_uInt16  nDummy16;
-+
-+    sal_uInt16 nStringLen = aString.Len();
-+
-+    DffRecordHeader aTextHd2;
-+    rTextHeader.SeekToContent( rIn );
-+    if ( rMan.SeekToRec( rIn, PPT_PST_StyleTextPropAtom, rTextHeader.GetRecEndFilePos(), &aTextHd2 ) )
-+        bTextPropAtom = sal_True;
-+    while ( nCharAnzRead <= nStringLen )
-+    {
-+        PPTParaPropSet aParaPropSet;
-+        ImplPPTParaPropSet& aSet = *aParaPropSet.pParaSet;
-+        if ( bTextPropAtom )
-+        {
-+            rIn >> nCharCount
-+                >> aParaPropSet.pParaSet->mnDepth;	// Einruecktiefe
-+
-+            nCharCount--;
-+
-+            rIn >> nMask;
-+            aSet.mnAttrSet = nMask & 0x207df7;
-+            sal_uInt16 nBulFlg = 0;
-+            if ( nMask & 0xF )
-+                rIn >> nBulFlg; // Bullet-HardAttr-Flags
-+            aSet.mpArry[ PPT_ParaAttr_BulletOn    ] = ( nBulFlg & 1 ) ? 1 : 0;
-+            aSet.mpArry[ PPT_ParaAttr_BuHardFont  ] = ( nBulFlg & 2 ) ? 1 : 0;
-+            aSet.mpArry[ PPT_ParaAttr_BuHardColor ] = ( nBulFlg & 4 ) ? 1 : 0;
-+
-+            if ( nMask & 0x0080 )	// buChar
-+                rIn >> aSet.mpArry[ PPT_ParaAttr_BulletChar ];
-+            if ( nMask & 0x0010 )	// buTypeface
-+                rIn >> aSet.mpArry[ PPT_ParaAttr_BulletFont ];
-+            if ( nMask & 0x0040 )	// buSize
-+            {
-+                rIn >> aSet.mpArry[ PPT_ParaAttr_BulletHeight ];
-+                if ( ! ( ( nMask & ( 1 << PPT_ParaAttr_BuHardHeight ) )
-+                         && ( nBulFlg && ( 1 << PPT_ParaAttr_BuHardHeight ) ) ) )
-+                    aSet.mnAttrSet ^= 0x40;
-+            }
-+            if ( nMask & 0x0020 )	// buColor
-+            {
-+                sal_uInt32 nVal32, nHiByte;
-+                rIn >> nVal32;
-+                nHiByte = nVal32 >> 24;
-+                if ( nHiByte <= 8 )
-+                    nVal32 = nHiByte | PPT_COLSCHEME;
-+                aSet.mnBulletColor = nVal32;
-+            }
-+            if ( nMask & 0x0800 )	// pfAlignment
-+            {
-+                rIn >> nDummy16;
-+                aSet.mpArry[ PPT_ParaAttr_Adjust ] = nDummy16 & 3;
-+            }
-+            if ( nMask & 0x1000 )	// pfLineSpacing
-+                rIn >> aSet.mpArry[ PPT_ParaAttr_LineFeed ];
-+            if ( nMask & 0x2000 )	// pfSpaceBefore
-+                rIn >> aSet.mpArry[ PPT_ParaAttr_UpperDist ];
-+            if ( nMask & 0x4000 )	// pfSpaceAfter
-+                rIn >> aSet.mpArry[ PPT_ParaAttr_LowerDist ];
-+            if ( nMask & 0x100 )	// pfLeftMargin
-+                rIn >> nDummy16;
-+            if ( nMask & 0x400 )	// pfIndent
-+                rIn >> nDummy16;
-+            if ( nMask & 0x8000 )	// pfDefaultTabSize
-+                rIn >> nDummy16;
-+            if ( nMask & 0x100000 )	// pfTabStops
-+            {
-+                sal_uInt16 i, nDistance, nAlignment, nNumberOfTabStops = 0;
-+                rIn >> nNumberOfTabStops;
-+                for ( i = 0; i < nNumberOfTabStops; i++ )
-+                {
-+                    rIn >> nDistance
-+                        >> nAlignment;
-+                }
-+            }
-+            if ( nMask & 0x10000 )	// pfBaseLine
-+                rIn >> nDummy16;
-+            if ( nMask & 0xe0000 )	// pfCharWrap, pfWordWrap, pfOverflow
-+            {
-+                rIn >> nDummy16;
-+                if ( nMask & 0x20000 )
-+                    aSet.mpArry[ PPT_ParaAttr_AsianLB_1 ] = nDummy16 & 1;
-+                if ( nMask & 0x40000 )
-+                    aSet.mpArry[ PPT_ParaAttr_AsianLB_2 ] = ( nDummy16 >> 1 ) & 1;
-+                if ( nMask & 0x80000 )
-+                    aSet.mpArry[ PPT_ParaAttr_AsianLB_3 ] = ( nDummy16 >> 2 ) & 1;
-+                aSet.mnAttrSet |= ( ( nMask >> 17 ) & 7 ) << PPT_ParaAttr_AsianLB_1;
-+            }
-+            if ( nMask & 0x200000 )	// pfTextDirection
-+                rIn >> aSet.mpArry[ PPT_ParaAttr_BiDi ];
-+        }
-+        else
-+            nCharCount = nStringLen;
-+
-+        if ( rRuler.GetTextOfs( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_TextOfs ] ) )
-+            aSet.mnAttrSet |= 1 << PPT_ParaAttr_TextOfs;
-+        if ( rRuler.GetBulletOfs( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_BulletOfs ] ) )
-+            aSet.mnAttrSet |= 1 << PPT_ParaAttr_BulletOfs;
-+        if ( rRuler.GetDefaultTab( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_DefaultTab ] ) )
-+            aSet.mnAttrSet |= 1 << PPT_ParaAttr_DefaultTab;
-+
-+        if ( ( nCharCount > nStringLen ) || ( nStringLen < nCharAnzRead + nCharCount ) )
-+        {
-+            bTextPropAtom = sal_False;
-+            nCharCount = nStringLen - nCharAnzRead;
-+            // please fix the right hand side of
-+            // PPTParaPropSet& PPTParaPropSet::operator=(PPTParaPropSet&),
-+            // it should be a const reference
-+            PPTParaPropSet aTmpPPTParaPropSet;
-+            aParaPropSet = aTmpPPTParaPropSet;
-+            DBG_ERROR( "SJ:PPTStyleTextPropReader::could not get this PPT_PST_StyleTextPropAtom by reading the paragraph attributes" );
-+        }
-+        PPTParaPropSet* pPara = new PPTParaPropSet( aParaPropSet );
-+        pPara->mnOriginalTextPos = nCharAnzRead;
-+        aParaPropList.Insert( pPara, LIST_APPEND );
-+        if ( nCharCount )
-+        {
-+            sal_uInt32	 nCount;
-+            const sal_Unicode* pDat = aString.GetBuffer() + nCharAnzRead;
-+            for ( nCount = 0; nCount < nCharCount; nCount++ )
-+            {
-+                if ( pDat[ nCount ] == 0xd )
-+                {
-+                    pPara = new PPTParaPropSet( aParaPropSet );
-+                    pPara->mnOriginalTextPos = nCharAnzRead + nCount + 1;
-+                    aParaPropList.Insert( pPara, LIST_APPEND );
-+                }
-+            }
-+        }
-+        nCharAnzRead += nCharCount + 1;
-+    }
-+}
-+
-+void PPTStyleTextPropReader::ReadCharProps( SvStream& rIn, PPTCharPropSet& aCharPropSet, const String& aString, 
-+                                            sal_uInt32& nCharCount, sal_uInt32 nCharAnzRead,
-+                                            sal_Bool& bTextPropAtom, sal_uInt32 nExtParaPos, 
-+                                            const std::vector< StyleTextProp9 >& aStyleTextProp9, 
-+                                            sal_uInt32& nExtParaFlags, sal_uInt16& nBuBlip, 
-+                                            sal_uInt16& nHasAnm, sal_uInt32& nAnmScheme )
-+{
-+    sal_uInt32  nMask = 0; //TODO: nMask initialized here to suppress warning for now, see corresponding TODO below
-+    sal_uInt16  nDummy16;
-+    sal_Int32   nCharsToRead;
-+    sal_uInt32  nExtParaNibble = 0;
-+
-+    sal_uInt16 nStringLen = aString.Len();
-+
-+    rIn >> nDummy16;
-+    nCharCount = nDummy16;
-+    rIn >> nDummy16;
-+    nCharsToRead = nStringLen - ( nCharAnzRead + nCharCount );
-+    if ( nCharsToRead < 0 )
-+    {
-+        nCharCount = nStringLen - nCharAnzRead;
-+        if ( nCharsToRead < -1 )
-+        {
-+            bTextPropAtom = sal_False;
-+            DBG_ERROR( "SJ:PPTStyleTextPropReader::could not get this PPT_PST_StyleTextPropAtom by reading the character attributes" );
-+        }
-+    }
-+    ImplPPTCharPropSet& aSet = *aCharPropSet.pCharSet;
-+
-+    // character attributes
-+    rIn >> nMask;
-+    if ( (sal_uInt16)nMask )
-+    {
-+        aSet.mnAttrSet |= (sal_uInt16)nMask;
-+        rIn >> aSet.mnFlags;
-+    }
-+    if ( nMask & 0x10000 )	// cfTypeface
-+    {
-+        rIn >> aSet.mnFont;
-+        aSet.mnAttrSet |= 1 << PPT_CharAttr_Font;
-+    }
-+    if ( nMask & 0x200000 )	// cfFEOldTypeface
-+    {
-+        rIn >> aSet.mnAsianOrComplexFont;
-+        aSet.mnAttrSet |= 1 << PPT_CharAttr_AsianOrComplexFont;
-+    }
-+    if ( nMask & 0x400000 )	// cfANSITypeface
-+    {
-+        rIn >> aSet.mnANSITypeface;
-+        aSet.mnAttrSet |= 1 << PPT_CharAttr_ANSITypeface;
-+    }
-+    if ( nMask & 0x800000 )	// cfSymbolTypeface
-+    {
-+        rIn >> aSet.mnSymbolFont;
-+        aSet.mnAttrSet |= 1 << PPT_CharAttr_Symbol;
-+    }
-+    if ( nMask & 0x20000 )	// cfSize
-+    {
-+        rIn >> aSet.mnFontHeight;
-+        aSet.mnAttrSet |= 1 << PPT_CharAttr_FontHeight;
-+    }
-+    if ( nMask & 0x40000 )	// cfColor
-+    {
-+        sal_uInt32 nVal;
-+        rIn >> nVal;
-+        if ( !( nVal & 0xff000000 ) )
-+            nVal = PPT_COLSCHEME_HINTERGRUND;
-+        aSet.mnColor = nVal;
-+        aSet.mnAttrSet |= 1 << PPT_CharAttr_FontColor;
-+    }
-+    if ( nMask & 0x80000 )	// cfPosition
-+    {
-+        rIn >> aSet.mnEscapement;
-+        aSet.mnAttrSet |= 1 << PPT_CharAttr_Escapement;
-+    }
-+    if ( nExtParaPos )
-+    {
-+        sal_uInt32 nExtBuInd = nMask & 0x3c00;
-+        if ( nExtBuInd )
-+            nExtBuInd = ( aSet.mnFlags & 0x3c00 ) >> 10;
-+        if ( nExtBuInd < aStyleTextProp9.size() )
-+        {
-+            if ( nExtParaNibble && ( ( nExtBuInd + nExtParaNibble ) < aStyleTextProp9.size() ) )
-+                nExtBuInd += nExtParaNibble;
-+							
-+            nExtParaFlags = aStyleTextProp9[ nExtBuInd ].mnExtParagraphMask;
-+            nBuBlip = aStyleTextProp9[ nExtBuInd ].mnBuBlip;
-+            nHasAnm = aStyleTextProp9[ nExtBuInd ].mnHasAnm;
-+            nAnmScheme = aStyleTextProp9[ nExtBuInd ].mnAnmScheme;
-+        }
-+        if ( ( nExtBuInd & 0xf ) == 0xf )
-+            nExtParaNibble += 16;
-+    }
-+}
-+
-+void PPTStyleTextPropReader::Init( SvStream& rIn, SdrPowerPointImport& rMan, const DffRecordHeader& rTextHeader,
-+                                   PPTTextRulerInterpreter& rRuler, const DffRecordHeader& rExtParaHd, sal_uInt32 nInstance )
-+{
- 	sal_uInt32 nMerk = rIn.Tell();
- 	sal_uInt32 nExtParaPos = ( rExtParaHd.nRecType == PPT_PST_ExtendedParagraphAtom ) ? rExtParaHd.nFilePos + 8 : 0;
- 
-@@ -5035,7 +5275,7 @@ PPTStyleTextPropReader::PPTStyleTextPropReader( SvStream& rIn, SdrPowerPointImpo
- 			aString = String( pBuf, (sal_uInt16)i );
- 		delete[] pBuf;
- 	}
--	else
-+	else if( aTextHd.nRecType == PPT_PST_TextBytesAtom )
- 	{
- 		sal_Char *pBuf = new sal_Char[ nMaxLen + 1 ];
- 		pBuf[ nMaxLen ] = 0;
-@@ -5060,148 +5300,44 @@ PPTStyleTextPropReader::PPTStyleTextPropReader( SvStream& rIn, SdrPowerPointImpo
- 			aString = String( pBuf, nLen, RTL_TEXTENCODING_MS_1252 );
- 		delete[] pBuf;
- 	}
--	if ( aString.Len() )
--	{
--		sal_uInt32  nMask = 0; //TODO: nMask initialized here to suppress warning for now, see corresponding TODO below
--		sal_uInt32  nCharCount, nCharAnzRead = 0;
--		sal_Int32   nCharsToRead;
--		sal_uInt16  nDummy16;
-+    else
-+    {
-+        // no chars, but potentially char/para props?
-+		sal_uInt32  nCharCount;
- 		sal_Bool    bTextPropAtom = sal_False;
-+        ReadParaProps( rIn, rMan, rTextHeader, aString, rRuler, nCharCount, bTextPropAtom );
- 
--		sal_uInt16 nStringLen = aString.Len();
-+        if ( bTextPropAtom )
-+        {
-+            // yeah, StyleTextProp is there, read it all & push to
-+            // aParaPropList
-+            PPTCharPropSet aCharPropSet(0);
-+            aCharPropSet.mnOriginalTextPos = 0;
- 
--		DffRecordHeader aTextHd2;
--		rTextHeader.SeekToContent( rIn );
--		if ( rMan.SeekToRec( rIn, PPT_PST_StyleTextPropAtom, rTextHeader.GetRecEndFilePos(), &aTextHd2 ) )
--			bTextPropAtom = sal_True;
--		while ( nCharAnzRead <= nStringLen )
--		{
--			PPTParaPropSet aParaPropSet;
--			ImplPPTParaPropSet& aSet = *aParaPropSet.pParaSet;
--			if ( bTextPropAtom )
--			{
--				rIn >> nCharCount
--					>> aParaPropSet.pParaSet->mnDepth;	// Einruecktiefe
--
--				nCharCount--;
--
--				rIn >> nMask;
--				aSet.mnAttrSet = nMask & 0x207df7;
--				sal_uInt16 nBulFlg = 0;
--				if ( nMask & 0xF )
--					rIn >> nBulFlg; // Bullet-HardAttr-Flags
--				aSet.mpArry[ PPT_ParaAttr_BulletOn    ] = ( nBulFlg & 1 ) ? 1 : 0;
--				aSet.mpArry[ PPT_ParaAttr_BuHardFont  ] = ( nBulFlg & 2 ) ? 1 : 0;
--                aSet.mpArry[ PPT_ParaAttr_BuHardColor ] = ( nBulFlg & 4 ) ? 1 : 0;
--
--				if ( nMask & 0x0080 )	// buChar
--					rIn >> aSet.mpArry[ PPT_ParaAttr_BulletChar ];
--				if ( nMask & 0x0010 )	// buTypeface
--					rIn >> aSet.mpArry[ PPT_ParaAttr_BulletFont ];
--				if ( nMask & 0x0040 )	// buSize
--				{
--					rIn >> aSet.mpArry[ PPT_ParaAttr_BulletHeight ];
--					if ( ! ( ( nMask & ( 1 << PPT_ParaAttr_BuHardHeight ) )
--						&& ( nBulFlg && ( 1 << PPT_ParaAttr_BuHardHeight ) ) ) )
--						aSet.mnAttrSet ^= 0x40;
--				}
--				if ( nMask & 0x0020 )	// buColor
--				{
--                    sal_uInt32 nVal32, nHiByte;
--                    rIn >> nVal32;
--                    nHiByte = nVal32 >> 24;
--                    if ( nHiByte <= 8 )
--                        nVal32 = nHiByte | PPT_COLSCHEME;
--                    aSet.mnBulletColor = nVal32;
--				}
--				if ( nMask & 0x0800 )	// pfAlignment
--				{
--					rIn >> nDummy16;
--					aSet.mpArry[ PPT_ParaAttr_Adjust ] = nDummy16 & 3;
--				}
--				if ( nMask & 0x1000 )	// pfLineSpacing
--					rIn >> aSet.mpArry[ PPT_ParaAttr_LineFeed ];
--				if ( nMask & 0x2000 )	// pfSpaceBefore
--					rIn >> aSet.mpArry[ PPT_ParaAttr_UpperDist ];
--				if ( nMask & 0x4000 )	// pfSpaceAfter
--					rIn >> aSet.mpArry[ PPT_ParaAttr_LowerDist ];
--				if ( nMask & 0x100 )	// pfLeftMargin
--					rIn >> nDummy16;
--				if ( nMask & 0x400 )	// pfIndent
--					rIn >> nDummy16;
--				if ( nMask & 0x8000 )	// pfDefaultTabSize
--					rIn >> nDummy16;
--				if ( nMask & 0x100000 )	// pfTabStops
--				{
--					sal_uInt16 i, nDistance, nAlignment, nNumberOfTabStops = 0;
--					rIn >> nNumberOfTabStops;
--					for ( i = 0; i < nNumberOfTabStops; i++ )
--					{
--						rIn >> nDistance
--							>> nAlignment;
--					}
--				}
--				if ( nMask & 0x10000 )	// pfBaseLine
--					rIn >> nDummy16;
--				if ( nMask & 0xe0000 )	// pfCharWrap, pfWordWrap, pfOverflow
--                {
--                    rIn >> nDummy16;
--                    if ( nMask & 0x20000 )
--                        aSet.mpArry[ PPT_ParaAttr_AsianLB_1 ] = nDummy16 & 1;
--                    if ( nMask & 0x40000 )
--                        aSet.mpArry[ PPT_ParaAttr_AsianLB_2 ] = ( nDummy16 >> 1 ) & 1;
--                    if ( nMask & 0x80000 )
--                        aSet.mpArry[ PPT_ParaAttr_AsianLB_3 ] = ( nDummy16 >> 2 ) & 1;
--                    aSet.mnAttrSet |= ( ( nMask >> 17 ) & 7 ) << PPT_ParaAttr_AsianLB_1;
--                }
--                if ( nMask & 0x200000 )	// pfTextDirection
--                    rIn >> aSet.mpArry[ PPT_ParaAttr_BiDi ];
--			}
--			else
--				nCharCount = nStringLen;
-+            sal_uInt32 nCharAnzRead = 0;
-+			sal_uInt32 nExtParaFlags = 0, nAnmScheme = 0;
-+			sal_uInt16 nBuBlip = 0xffff, nHasAnm = 0;
-+            ReadCharProps( rIn, aCharPropSet, aString, nCharCount, nCharAnzRead,
-+                           bTextPropAtom, nExtParaPos, aStyleTextProp9, nExtParaFlags, 
-+                           nBuBlip, nHasAnm, nAnmScheme );
-+            
-+            aCharPropList.Insert( 
-+                new PPTCharPropSet( aCharPropSet, 0 ), LIST_APPEND );
-+        }
-+    }
- 
--			if ( rRuler.GetTextOfs( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_TextOfs ] ) )
--				aSet.mnAttrSet |= 1 << PPT_ParaAttr_TextOfs;
--			if ( rRuler.GetBulletOfs( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_BulletOfs ] ) )
--				aSet.mnAttrSet |= 1 << PPT_ParaAttr_BulletOfs;
--			if ( rRuler.GetDefaultTab( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_DefaultTab ] ) )
--				aSet.mnAttrSet |= 1 << PPT_ParaAttr_DefaultTab;
-+	if ( aString.Len() )
-+	{
-+		sal_uInt32  nCharCount;
-+		sal_Bool    bTextPropAtom = sal_False;
- 
--			if ( ( nCharCount > nStringLen ) || ( nStringLen < nCharAnzRead + nCharCount ) )
--			{
--				bTextPropAtom = sal_False;
--				nCharCount = nStringLen - nCharAnzRead;
--                // please fix the right hand side of
--                // PPTParaPropSet& PPTParaPropSet::operator=(PPTParaPropSet&),
--                // it should be a const reference
--                PPTParaPropSet aTmpPPTParaPropSet;
--				aParaPropSet = aTmpPPTParaPropSet;
--				DBG_ERROR( "SJ:PPTStyleTextPropReader::could not get this PPT_PST_StyleTextPropAtom by reading the paragraph attributes" );
--			}
--			PPTParaPropSet* pPara = new PPTParaPropSet( aParaPropSet );
--			pPara->mnOriginalTextPos = nCharAnzRead;
--			aParaPropList.Insert( pPara, LIST_APPEND );
--			if ( nCharCount )
--			{
--				sal_uInt32	 nCount;
--				const sal_Unicode* pDat = aString.GetBuffer() + nCharAnzRead;
--				for ( nCount = 0; nCount < nCharCount; nCount++ )
--				{
--					if ( pDat[ nCount ] == 0xd )
--					{
--						pPara = new PPTParaPropSet( aParaPropSet );
--						pPara->mnOriginalTextPos = nCharAnzRead + nCount + 1;
--						aParaPropList.Insert( pPara, LIST_APPEND );
--					}
--				}
--			}
--			nCharAnzRead += nCharCount + 1;
--		}
-+        ReadParaProps( rIn, rMan, rTextHeader, aString, rRuler, nCharCount, bTextPropAtom );
- 
- 		sal_Bool bEmptyParaPossible = sal_True;
--		sal_uInt32 nCurrentPara = nCharAnzRead = 0;
-+		sal_uInt32 nCharAnzRead = 0;
-+		sal_uInt32 nCurrentPara = 0;
- 		sal_uInt32 nCurrentSpecMarker = (sal_uInt32)(sal_uIntPtr)aSpecMarkerList.First();
--		sal_uInt32 nExtParaNibble = 0;
-+		sal_uInt16 nStringLen = aString.Len();
- 
- 		while ( nCharAnzRead < nStringLen )
- 		{
-@@ -5210,87 +5346,9 @@ PPTStyleTextPropReader::PPTStyleTextPropReader( SvStream& rIn, SdrPowerPointImpo
- 
- 			PPTCharPropSet aCharPropSet( nCurrentPara );
- 			if ( bTextPropAtom )
--			{
--				rIn >> nDummy16;
--				nCharCount = nDummy16;
--				rIn >> nDummy16;
--				nCharsToRead = nStringLen - ( nCharAnzRead + nCharCount );
--				if ( nCharsToRead < 0 )
--				{
--					nCharCount = nStringLen - nCharAnzRead;
--					if ( nCharsToRead < -1 )
--					{
--						bTextPropAtom = sal_False;
--						DBG_ERROR( "SJ:PPTStyleTextPropReader::could not get this PPT_PST_StyleTextPropAtom by reading the character attributes" );
--					}
--				}
--				ImplPPTCharPropSet& aSet = *aCharPropSet.pCharSet;
--
--				// character attributes
--				rIn >> nMask;
--				if ( (sal_uInt16)nMask )
--				{
--					aSet.mnAttrSet |= (sal_uInt16)nMask;
--					rIn >> aSet.mnFlags;
--				}
--				if ( nMask & 0x10000 )	// cfTypeface
--				{
--					rIn >> aSet.mnFont;
--					aSet.mnAttrSet |= 1 << PPT_CharAttr_Font;
--				}
--				if ( nMask & 0x200000 )	// cfFEOldTypeface
--				{
--					rIn >> aSet.mnAsianOrComplexFont;
--					aSet.mnAttrSet |= 1 << PPT_CharAttr_AsianOrComplexFont;
--				}
--				if ( nMask & 0x400000 )	// cfANSITypeface
--				{
--					rIn >> aSet.mnANSITypeface;
--					aSet.mnAttrSet |= 1 << PPT_CharAttr_ANSITypeface;
--				}
--				if ( nMask & 0x800000 )	// cfSymbolTypeface
--				{
--					rIn >> aSet.mnSymbolFont;
--					aSet.mnAttrSet |= 1 << PPT_CharAttr_Symbol;
--				}
--				if ( nMask & 0x20000 )	// cfSize
--				{
--					rIn >> aSet.mnFontHeight;
--					aSet.mnAttrSet |= 1 << PPT_CharAttr_FontHeight;
--				}
--				if ( nMask & 0x40000 )	// cfColor
--				{
--					sal_uInt32 nVal;
--					rIn >> nVal;
--					if ( !( nVal & 0xff000000 ) )
--						nVal = PPT_COLSCHEME_HINTERGRUND;
--					aSet.mnColor = nVal;
--					aSet.mnAttrSet |= 1 << PPT_CharAttr_FontColor;
--				}
--				if ( nMask & 0x80000 )	// cfPosition
--				{
--					rIn >> aSet.mnEscapement;
--					aSet.mnAttrSet |= 1 << PPT_CharAttr_Escapement;
--				}
--				if ( nExtParaPos )
--				{
--					sal_uInt32 nExtBuInd = nMask & 0x3c00;
--					if ( nExtBuInd )
--						nExtBuInd = ( aSet.mnFlags & 0x3c00 ) >> 10;
--					if ( nExtBuInd < aStyleTextProp9.size() )
--					{
--						if ( nExtParaNibble && ( ( nExtBuInd + nExtParaNibble ) < aStyleTextProp9.size() ) )
--							nExtBuInd += nExtParaNibble;
--							
--						nExtParaFlags = aStyleTextProp9[ nExtBuInd ].mnExtParagraphMask;
--						nBuBlip = aStyleTextProp9[ nExtBuInd ].mnBuBlip;
--						nHasAnm = aStyleTextProp9[ nExtBuInd ].mnHasAnm;
--						nAnmScheme = aStyleTextProp9[ nExtBuInd ].mnAnmScheme;
--					}
--					if ( ( nExtBuInd & 0xf ) == 0xf )
--						nExtParaNibble += 16;
--				}
--			}
-+                ReadCharProps( rIn, aCharPropSet, aString, nCharCount, nCharAnzRead,
-+                               bTextPropAtom, nExtParaPos, aStyleTextProp9, nExtParaFlags, 
-+                               nBuBlip, nHasAnm, nAnmScheme );
- 			else
- 				nCharCount = nStringLen;
- 
-@@ -6629,7 +6687,12 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
- 					mpImplTextObj->mnInstance = nInstance;
- 
- 					UINT32 nFilePos = rIn.Tell();
--					if ( rSdrPowerPointImport.SeekToRec2( PPT_PST_TextBytesAtom, PPT_PST_TextCharsAtom, aClientTextBoxHd.GetRecEndFilePos() ) )
-+					if ( rSdrPowerPointImport.SeekToRec2( PPT_PST_TextBytesAtom, 
-+                                                          PPT_PST_TextCharsAtom, 
-+                                                          aClientTextBoxHd.GetRecEndFilePos() ) 
-+                         || rSdrPowerPointImport.SeekToRec( rIn,
-+                                                            PPT_PST_StyleTextPropAtom, 
-+                                                            aClientTextBoxHd.GetRecEndFilePos() ) )
- 					{
- 						PPTTextRulerInterpreter aTextRulerInterpreter( nTextRulerAtomOfs, rSdrPowerPointImport,
- 																		aClientTextBoxHd, rIn );


More information about the ooo-build-commit mailing list