View | Details | Raw Unified | Return to issue 120928
Collapse All | Expand All

(-)sw/inc/numrule.hxx (-1 / +5 lines)
Lines 55-61 Link Here
55
class SW_DLLPUBLIC SwNumFmt : public SvxNumberFormat, public SwClient
55
class SW_DLLPUBLIC SwNumFmt : public SvxNumberFormat, public SwClient
56
{
56
{
57
	SwFmtVertOrient* pVertOrient;
57
	SwFmtVertOrient* pVertOrient;
58
58
	//For i120928,record the cp info of graphic within bullet
59
	sal_Unicode 	cGrfBulletCP;
59
	SW_DLLPRIVATE void UpdateNumNodes( SwDoc* pDoc );
60
	SW_DLLPRIVATE void UpdateNumNodes( SwDoc* pDoc );
60
    SW_DLLPRIVATE virtual void NotifyGraphicArrived();
61
    SW_DLLPRIVATE virtual void NotifyGraphicArrived();
61
62
Lines 79-84 Link Here
79
80
80
	SwCharFmt* GetCharFmt() const { return (SwCharFmt*)GetRegisteredIn(); }
81
	SwCharFmt* GetCharFmt() const { return (SwCharFmt*)GetRegisteredIn(); }
81
	void SetCharFmt( SwCharFmt* );
82
	void SetCharFmt( SwCharFmt* );
83
	//For i120928,access the cp info of graphic within bullet
84
	void			SetGrfBulletCP(sal_Unicode cP){cGrfBulletCP = cP;}
85
	sal_Unicode 	GetGrfBulletCP()const {return cGrfBulletCP;}
82
    void ForgetCharFmt();
86
    void ForgetCharFmt();
83
87
84
	virtual void			SetCharFmtName(const String& rSet);
88
	virtual void			SetCharFmtName(const String& rSet);
(-)sw/source/core/doc/number.cxx (-1 / +5 lines)
Lines 198-203 Link Here
198
	SvxNumberFormat(SVX_NUM_ARABIC),
198
	SvxNumberFormat(SVX_NUM_ARABIC),
199
	SwClient( 0 ),
199
	SwClient( 0 ),
200
    pVertOrient(new SwFmtVertOrient( 0, text::VertOrientation::NONE))
200
    pVertOrient(new SwFmtVertOrient( 0, text::VertOrientation::NONE))
201
    ,cGrfBulletCP(USHRT_MAX)//For i120928,record the cp info of graphic within bullet
201
{
202
{
202
}
203
}
203
/* -----------------------------22.02.01 13:42--------------------------------
204
/* -----------------------------22.02.01 13:42--------------------------------
Lines 206-212 Link Here
206
SwNumFmt::SwNumFmt( const SwNumFmt& rFmt) :
207
SwNumFmt::SwNumFmt( const SwNumFmt& rFmt) :
207
	SvxNumberFormat(rFmt),
208
	SvxNumberFormat(rFmt),
208
	SwClient( rFmt.GetRegisteredInNonConst() ),
209
	SwClient( rFmt.GetRegisteredInNonConst() ),
209
    pVertOrient(new SwFmtVertOrient( 0, rFmt.GetVertOrient()))
210
    pVertOrient(new SwFmtVertOrient( 0, rFmt.GetVertOrient()))    	
211
	,cGrfBulletCP(rFmt.cGrfBulletCP)//For i120928,record the cp info of graphic within bullet
210
{
212
{
211
    sal_Int16 eMyVertOrient = rFmt.GetVertOrient();
213
    sal_Int16 eMyVertOrient = rFmt.GetVertOrient();
212
	SetGraphicBrush( rFmt.GetBrush(), &rFmt.GetGraphicSize(),
214
	SetGraphicBrush( rFmt.GetBrush(), &rFmt.GetGraphicSize(),
Lines 322-327 Link Here
322
		rNumFmt.GetRegisteredInNonConst()->Add( this );
324
		rNumFmt.GetRegisteredInNonConst()->Add( this );
323
	else if( GetRegisteredIn() )
325
	else if( GetRegisteredIn() )
324
		GetRegisteredInNonConst()->Remove( this );
326
		GetRegisteredInNonConst()->Remove( this );
327
	//For i120928,record the cp info of graphic within bullet
328
	cGrfBulletCP = rNumFmt.cGrfBulletCP;	
325
	return *this;
329
	return *this;
326
}
330
}
327
/* -----------------------------23.02.01 09:28--------------------------------
331
/* -----------------------------23.02.01 09:28--------------------------------
(-)sw/source/filter/ww8/attributeoutputbase.hxx (-1 / +2 lines)
Lines 320-326 Link Here
320
        sal_Int16 nIndentAt,
320
        sal_Int16 nIndentAt,
321
        sal_Int16 nFirstLineIndex,
321
        sal_Int16 nFirstLineIndex,
322
        sal_Int16 nListTabPos,
322
        sal_Int16 nListTabPos,
323
        const String &rNumberingString ) = 0;
323
        const String &rNumberingString ,
324
	const SvxBrushItem* pBrush = 0) = 0;//For i120928,to export graphic of bullet
324
    
325
    
325
protected:
326
protected:
326
327
(-)sw/source/filter/ww8/escher.hxx (+2 lines)
Lines 127-132 Link Here
127
public:
127
public:
128
    SwBasicEscherEx(SvStream* pStrm, WW8Export& rWrt);
128
    SwBasicEscherEx(SvStream* pStrm, WW8Export& rWrt);
129
    sal_Int32 WriteGrfFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId);
129
    sal_Int32 WriteGrfFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId);
130
	//For i120928,to export graphic of bullet
131
	sal_Int32 WriteGrfBullet(const Graphic&);
130
    sal_Int32 WriteOLEFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId);
132
    sal_Int32 WriteOLEFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId);
131
    void WriteEmptyFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId);
133
    void WriteEmptyFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId);
132
    virtual void WriteFrmExtraData(const SwFrmFmt&);
134
    virtual void WriteFrmExtraData(const SwFrmFmt&);
(-)sw/source/filter/ww8/rtfattributeoutput.cxx (-1 / +2 lines)
Lines 1285-1291 Link Here
1285
        sal_Int16 nIndentAt,
1285
        sal_Int16 nIndentAt,
1286
        sal_Int16 nFirstLineIndex,
1286
        sal_Int16 nFirstLineIndex,
1287
        sal_Int16 /*nListTabPos*/,
1287
        sal_Int16 /*nListTabPos*/,
1288
        const String &rNumberingString )
1288
        const String &rNumberingString,
1289
        const SvxBrushItem* pBrush)
1289
{
1290
{
1290
    OSL_TRACE("%s", OSL_THIS_FUNC);
1291
    OSL_TRACE("%s", OSL_THIS_FUNC);
1291
1292
(-)sw/source/filter/ww8/rtfattributeoutput.hxx (-1 / +2 lines)
Lines 220-226 Link Here
220
        sal_Int16 nIndentAt,
220
        sal_Int16 nIndentAt,
221
        sal_Int16 nFirstLineIndex,
221
        sal_Int16 nFirstLineIndex,
222
        sal_Int16 nListTabPos,
222
        sal_Int16 nListTabPos,
223
        const String &rNumberingString );
223
        const String &rNumberingString,
224
        const SvxBrushItem* pBrush = 0);//For i120928,to export graphic of bullet
224
225
225
    void WriteField_Impl( const SwField* pFld, ww::eField eType, const String& rFldCmd, sal_uInt8 nMode );
226
    void WriteField_Impl( const SwField* pFld, ww::eField eType, const String& rFldCmd, sal_uInt8 nMode );
226
    void WriteBookmarks_Impl( std::vector< rtl::OUString >& rStarts, std::vector< rtl::OUString >& rEnds );
227
    void WriteBookmarks_Impl( std::vector< rtl::OUString >& rStarts, std::vector< rtl::OUString >& rEnds );
(-)sw/source/filter/ww8/rtfexport.cxx (+6 lines)
Lines 193-198 Link Here
193
    m_pAttrOutput->WriteBookmarks_Impl(aStarts, aEnds);
193
    m_pAttrOutput->WriteBookmarks_Impl(aStarts, aEnds);
194
}
194
}
195
195
196
//For i120928,to export graphic of bullet for RTF filter
197
void RtfExport::ExportGrfBullet(const SwTxtNode& rNd)
198
{
199
	//This is for RTF filter on the graphic bullets
200
}
201
	
196
void RtfExport::WriteChar( sal_Unicode )
202
void RtfExport::WriteChar( sal_Unicode )
197
{
203
{
198
    OSL_TRACE("%s", OSL_THIS_FUNC);
204
    OSL_TRACE("%s", OSL_THIS_FUNC);
(-)sw/source/filter/ww8/rtfexport.hxx (+3 lines)
Lines 86-91 Link Here
86
86
87
    virtual void AppendBookmark( const rtl::OUString& rName, bool bSkip = false );
87
    virtual void AppendBookmark( const rtl::OUString& rName, bool bSkip = false );
88
88
89
	//For i120928,add an interface to export graphic of bullet
90
	virtual void ExportGrfBullet(const SwTxtNode& rNd);	
91
89
    virtual void WriteCR( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner = ww8::WW8TableNodeInfoInner::Pointer_t()*/ ) { /* no-op for rtf, most probably should not even be in MSWordExportBase */ }
92
    virtual void WriteCR( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner = ww8::WW8TableNodeInfoInner::Pointer_t()*/ ) { /* no-op for rtf, most probably should not even be in MSWordExportBase */ }
90
    virtual void WriteChar( sal_Unicode );
93
    virtual void WriteChar( sal_Unicode );
91
94
(-)sw/source/filter/ww8/writerhelper.cxx (-1 / +32 lines)
Lines 58-64 Link Here
58
#   include <unotools/streamwrap.hxx>
58
#   include <unotools/streamwrap.hxx>
59
#endif
59
#endif
60
#include <numrule.hxx>
60
#include <numrule.hxx>
61
61
#ifndef _SV_SVAPP_HXX
62
#include <vcl/svapp.hxx>//For i120928
63
#endif
62
#ifdef DEBUGDUMP
64
#ifdef DEBUGDUMP
63
#       include <vcl/svapp.hxx>
65
#       include <vcl/svapp.hxx>
64
#   ifndef _TOOLS_URLOBJ_HXX
66
#   ifndef _TOOLS_URLOBJ_HXX
Lines 180-185 Link Here
180
182
181
namespace sw
183
namespace sw
182
{
184
{
185
	//For i120928,size conversion before exporting graphic of bullet
186
	Frame::Frame(const Graphic&rGrf, const SwPosition &rPos)
187
		:mpFlyFrm(NULL),
188
		maPos(rPos),
189
		maSize(),
190
		maLayoutSize(),
191
		mpStartFrameContent(0),
192
		mbIsInline(true),
193
		meWriterType(eBulletGrf),
194
		maGrf(rGrf),
195
		mbForBullet(true)
196
	{
197
		const MapMode aMap100mm( MAP_100TH_MM );
198
		Size    aSize( rGrf.GetPrefSize() );    
199
		if ( MAP_PIXEL == rGrf.GetPrefMapMode().GetMapUnit() )    
200
		{        
201
			aSize = Application::GetDefaultDevice()->PixelToLogic(aSize, aMap100mm );   
202
		}    
203
		else    
204
		{        
205
			aSize = OutputDevice::LogicToLogic( aSize,rGrf.GetPrefMapMode(), aMap100mm );   
206
		} 
207
		maSize = aSize;
208
		maLayoutSize = maSize;
209
	}
210
	
183
    Frame::Frame(const SwFrmFmt &rFmt, const SwPosition &rPos)
211
    Frame::Frame(const SwFrmFmt &rFmt, const SwPosition &rPos)
184
        : mpFlyFrm(&rFmt),
212
        : mpFlyFrm(&rFmt),
185
          maPos(rPos),
213
          maPos(rPos),
Lines 192-197 Link Here
192
          // --> OD 2007-04-19 #i43447# - move to initialization list
220
          // --> OD 2007-04-19 #i43447# - move to initialization list
193
          mbIsInline( (rFmt.GetAnchor().GetAnchorId() == FLY_AS_CHAR) )
221
          mbIsInline( (rFmt.GetAnchor().GetAnchorId() == FLY_AS_CHAR) )
194
          // <--
222
          // <--
223
          //For i120928,handle graphic of bullet within existing implementation
224
          ,maGrf()
225
          ,mbForBullet(false)
195
    {
226
    {
196
        switch (rFmt.Which())
227
        switch (rFmt.Which())
197
        {
228
        {
(-)sw/source/filter/ww8/writerhelper.hxx (-3 / +13 lines)
Lines 107-113 Link Here
107
    class Frame
107
    class Frame
108
    {
108
    {
109
    public:
109
    public:
110
        enum WriterSource {eTxtBox, eGraphic, eOle, eDrawing, eFormControl};
110
        enum WriterSource {eTxtBox, eGraphic, eOle, eDrawing, eFormControl,eBulletGrf};//For i120928,add Grf Bul Type
111
    private:
111
    private:
112
        const SwFrmFmt* mpFlyFrm;
112
        const SwFrmFmt* mpFlyFrm;
113
        SwPosition maPos;
113
        SwPosition maPos;
Lines 121-129 Link Here
121
        WriterSource meWriterType;
121
        WriterSource meWriterType;
122
        const SwNode *mpStartFrameContent;
122
        const SwNode *mpStartFrameContent;
123
        bool mbIsInline;
123
        bool mbIsInline;
124
		bool mbForBullet:1;
125
		Graphic maGrf;
124
    public:
126
    public:
125
        Frame(const SwFrmFmt &rFlyFrm, const SwPosition &rPos);
127
        Frame(const SwFrmFmt &rFlyFrm, const SwPosition &rPos);
126
128
	Frame(const Graphic&, const SwPosition &);
129
	//End
127
        /** Get the writer SwFrmFmt that this object describes
130
        /** Get the writer SwFrmFmt that this object describes
128
131
129
            @return
132
            @return
Lines 177-182 Link Here
177
         the first node of content in the frame, might not be any at all.
180
         the first node of content in the frame, might not be any at all.
178
        */
181
        */
179
        const SwNode *GetContent() const { return mpStartFrameContent; }
182
        const SwNode *GetContent() const { return mpStartFrameContent; }
183
	const Graphic &GetGraphic() const { return maGrf; }
184
	bool HasGraphic() const { return mbForBullet; }
180
185
181
186
182
        /** Does this sw::Frame refer to the same writer content as another
187
        /** Does this sw::Frame refer to the same writer content as another
Lines 186-192 Link Here
186
        */
191
        */
187
        bool RefersToSameFrameAs(const Frame &rOther) const
192
        bool RefersToSameFrameAs(const Frame &rOther) const
188
        {
193
        {
189
            return (mpFlyFrm == rOther.mpFlyFrm);
194
		if (mbForBullet && rOther.mbForBullet)
195
			return (maGrf == rOther.maGrf);
196
		else if ((!mbForBullet) && (!rOther.mbForBullet))
197
			return (mpFlyFrm == rOther.mpFlyFrm);
198
		else
199
			return false;
190
        }
200
        }
191
201
192
        /** The Size of the contained element
202
        /** The Size of the contained element
(-)sw/source/filter/ww8/wrtw8esh.cxx (+51 lines)
Lines 1351-1357 Link Here
1351
    }
1351
    }
1352
    return nFlags;
1352
    return nFlags;
1353
}
1353
}
1354
//For i120928,this function is added to export graphic of bullet
1355
sal_Int32 SwBasicEscherEx::WriteGrfBullet(const Graphic& rGrf)
1356
{
1357
	OpenContainer( ESCHER_SpContainer );
1358
	AddShape(ESCHER_ShpInst_PictureFrame, 0xa00,0x401);
1359
	EscherPropertyContainer aPropOpt;
1360
	GraphicObject   aGraphicObject( rGrf );
1361
	ByteString      aUniqueId = aGraphicObject.GetUniqueID();
1362
	if ( aUniqueId.Len() )
1363
	{
1364
		const MapMode aMap100mm( MAP_100TH_MM );
1365
		Size    aSize( rGrf.GetPrefSize() );
1366
		if ( MAP_PIXEL == rGrf.GetPrefMapMode().GetMapUnit() )
1367
		{
1368
			aSize = Application::GetDefaultDevice()->PixelToLogic(aSize, aMap100mm );
1369
		}
1370
		else
1371
		{
1372
			aSize = OutputDevice::LogicToLogic( aSize,rGrf.GetPrefMapMode(), aMap100mm );
1373
		}
1374
		Point aEmptyPoint = Point();
1375
		Rectangle aRect( aEmptyPoint, aSize );
1376
		sal_uInt32 nBlibId = mxGlobal->GetBlibID( *(mxGlobal->QueryPictureStream()), aUniqueId,aRect, NULL, 0 );
1377
		if (nBlibId)
1378
			aPropOpt.AddOpt(ESCHER_Prop_pib, nBlibId, sal_True);
1379
	}
1380
	aPropOpt.AddOpt( ESCHER_Prop_pibFlags, ESCHER_BlipFlagDefault );
1381
	aPropOpt.AddOpt( ESCHER_Prop_dyTextTop, DrawModelToEmu(0));
1382
	aPropOpt.AddOpt( ESCHER_Prop_dyTextBottom, DrawModelToEmu(0));
1383
	aPropOpt.AddOpt( ESCHER_Prop_dxTextLeft, DrawModelToEmu(0));
1384
	aPropOpt.AddOpt( ESCHER_Prop_dxTextRight, DrawModelToEmu(0));
1385
	aPropOpt.AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x80000 );
1386
	aPropOpt.AddOpt( ESCHER_Prop_dyTextTop, 0 );
1387
	aPropOpt.AddOpt( ESCHER_Prop_dyTextBottom, 0 );
1388
	aPropOpt.AddOpt( ESCHER_Prop_dxTextLeft, 0 );
1389
	aPropOpt.AddOpt( ESCHER_Prop_dxTextRight, 0 );
1390
	const Color aTmpColor( COL_WHITE );
1391
	SvxBrushItem aBrush( aTmpColor, RES_BACKGROUND );
1392
	const SvxBrushItem *pRet = rWrt.GetCurrentPageBgBrush();
1393
	if (pRet && (pRet->GetGraphic() ||( pRet->GetColor() != COL_TRANSPARENT)))
1394
		aBrush = *pRet;
1395
	WriteBrushAttr(aBrush, aPropOpt);
1354
1396
1397
	aPropOpt.AddOpt( ESCHER_Prop_pictureActive, 0 );
1398
	aPropOpt.Commit( GetStream() );
1399
	AddAtom(4, ESCHER_ClientAnchor);
1400
	GetStream() << (sal_uInt32)0x80000000;
1401
	CloseContainer();
1402
	
1403
	return 0;
1404
}
1405
1355
sal_Int32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId)
1406
sal_Int32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId)
1356
{
1407
{
1357
    sal_Int32 nBorderThick=0;
1408
    sal_Int32 nBorderThick=0;
(-)sw/source/filter/ww8/wrtw8nds.cxx (+23 lines)
Lines 1782-1787 Link Here
1782
1782
1783
    ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo( mpTableInfo->getTableNodeInfo( &rNode ) );
1783
    ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo( mpTableInfo->getTableNodeInfo( &rNode ) );
1784
1784
1785
	//For i120928,identify the last node
1786
	bool bLastCR = false;
1787
	bool bExported = false;	
1788
	{
1789
		SwNodeIndex aNextIdx(rNode,1);
1790
		SwNodeIndex aLastIdx(rNode.GetNodes().GetEndOfContent());
1791
		if (aNextIdx == aLastIdx)
1792
			bLastCR = true;
1793
	}
1794
1785
    AttrOutput().StartParagraph( pTextNodeInfo );
1795
    AttrOutput().StartParagraph( pTextNodeInfo );
1786
1796
1787
    bool bFlyInTable = mpParentFrame && IsInTable();
1797
    bool bFlyInTable = mpParentFrame && IsInTable();
Lines 1957-1962 Link Here
1957
                        m_aCurrentCharPropStarts.pop();
1967
                        m_aCurrentCharPropStarts.pop();
1958
                        AttrOutput().EndTOX( *pTOXSect ,false);
1968
                        AttrOutput().EndTOX( *pTOXSect ,false);
1959
                    }
1969
                    }
1970
			//For i120928,the position of the bullet's graphic is at end of doc
1971
			if (bLastCR && (!bExported))
1972
			{
1973
				ExportGrfBullet(rNode);
1974
				bExported = true;
1975
			}
1976
		
1960
                    WriteCR( pTextNodeInfoInner );
1977
                    WriteCR( pTextNodeInfoInner );
1961
                }
1978
                }
1962
            }
1979
            }
Lines 1994-1999 Link Here
1994
                // insert final bookmarks if any before CR and after flys
2011
                // insert final bookmarks if any before CR and after flys
1995
                AppendBookmarks( rNode, nEnd, 1 );
2012
                AppendBookmarks( rNode, nEnd, 1 );
1996
                WriteCR( pTextNodeInfoInner );
2013
                WriteCR( pTextNodeInfoInner );
2014
              //For i120928,the position of the bullet's graphic is at end of doc
2015
		if (bLastCR && (!bExported))
2016
		{
2017
			ExportGrfBullet(rNode);
2018
			bExported = true;
2019
		}
1997
2020
1998
                if ( pTOXSect )
2021
                if ( pTOXSect )
1999
                {
2022
                {
(-)sw/source/filter/ww8/wrtw8num.cxx (-3 / +17 lines)
Lines 214-220 Link Here
214
        sal_Int16 nIndentAt,
214
        sal_Int16 nIndentAt,
215
        sal_Int16 nFirstLineIndex,
215
        sal_Int16 nFirstLineIndex,
216
        sal_Int16 nListTabPos,
216
        sal_Int16 nListTabPos,
217
        const String &rNumberingString
217
        const String &rNumberingString,
218
        const SvxBrushItem* pBrush //For i120928,to transfer graphic of bullet
218
    )
219
    )
219
{
220
{
220
    // Start value
221
    // Start value
Lines 272-277 Link Here
272
        }
273
        }
273
274
274
        m_rWW8Export.OutputItemSet( *pOutSet, false, true, i18n::ScriptType::LATIN, m_rWW8Export.mbExportModeRTF );
275
        m_rWW8Export.OutputItemSet( *pOutSet, false, true, i18n::ScriptType::LATIN, m_rWW8Export.mbExportModeRTF );
276
	//For i120928,achieve graphic's index of bullet from the bullet bookmark
277
	if (SVX_NUM_BITMAP == nNumberingType && pBrush)
278
	{
279
		int nIndex = m_rWW8Export.GetGrfIndex(*pBrush);
280
		if ( nIndex != -1 )
281
		{
282
			m_rWW8Export.InsUInt16(0x6887);
283
			m_rWW8Export.InsUInt32(nIndex);
284
			m_rWW8Export.InsUInt16(0x4888);
285
			m_rWW8Export.InsUInt16(1);
286
		}
287
	}			
275
288
276
        m_rWW8Export.pO = pOldpO;
289
        m_rWW8Export.pO = pOldpO;
277
    }
290
    }
Lines 506-513 Link Here
506
                    nFollow,
519
                    nFollow,
507
                    pPseudoFont, pOutSet,
520
                    pPseudoFont, pOutSet,
508
                    nIndentAt, nFirstLineIndex, nListTabPos,
521
                    nIndentAt, nFirstLineIndex, nListTabPos,
509
                    sNumStr );
522
                    sNumStr,
510
523
                    rFmt.GetNumberingType()==SVX_NUM_BITMAP ? rFmt.GetBrush():0);//Start for i120928,export graphic bullet,2012.9.25
524
		
511
            delete pPseudoFont;
525
            delete pPseudoFont;
512
        }
526
        }
513
        AttrOutput().EndAbstractNumbering();
527
        AttrOutput().EndAbstractNumbering();
(-)sw/source/filter/ww8/wrtww8.cxx (-1 / +122 lines)
Lines 122-128 Link Here
122
#include "WW8Sttbf.hxx"
122
#include "WW8Sttbf.hxx"
123
#include <editeng/charrotateitem.hxx>
123
#include <editeng/charrotateitem.hxx>
124
#include "WW8FibData.hxx"
124
#include "WW8FibData.hxx"
125
125
#ifndef _NUMRULE_HXX
126
#include "numrule.hxx"//For i120928
127
#endif
126
using namespace sw::util;
128
using namespace sw::util;
127
using namespace sw::types;
129
using namespace sw::types;
128
130
Lines 1424-1429 Link Here
1424
    pBkmks->Append( nSttCP, rName );
1426
    pBkmks->Append( nSttCP, rName );
1425
}
1427
}
1426
1428
1429
//For i120928,collect all the graphics of bullets applied to paragraphs
1430
int WW8Export::CollectGrfsOfBullets() const
1431
{
1432
	m_vecBulletPic.clear();
1433
	
1434
	if ( pDoc )
1435
	{
1436
		int nCountRule = pDoc->GetNumRuleTbl().Count();
1437
		for (int n = 0; n < nCountRule; ++n)
1438
	    	{
1439
			const SwNumRule &rRule = *(pDoc->GetNumRuleTbl().GetObject(n));
1440
			sal_uInt16 nLevels = rRule.IsContinusNum() ? 1 : 9;
1441
			for (sal_uInt16 nLvl = 0; nLvl < nLevels; ++nLvl)
1442
	        	{
1443
	            		const SwNumFmt &rFmt = rRule.Get(nLvl);
1444
				if (SVX_NUM_BITMAP != rFmt.GetNumberingType())
1445
				{
1446
					continue;
1447
				}
1448
				const Graphic *pGrf = rFmt.GetBrush()? rFmt.GetBrush()->GetGraphic():0;
1449
				if ( pGrf )
1450
				{
1451
					bool bHas = false;
1452
					for (int i = 0; i < m_vecBulletPic.size(); ++i)
1453
					{
1454
						if (m_vecBulletPic[i]->GetChecksum() == pGrf->GetChecksum())
1455
						{
1456
							bHas = true;
1457
							break;
1458
						}
1459
					}
1460
					if (!bHas)
1461
					{
1462
						m_vecBulletPic.push_back(pGrf);
1463
					}
1464
				}
1465
			}
1466
		}
1467
	}
1468
	
1469
	return m_vecBulletPic.size();
1470
}
1471
//Export Graphic of Bullets
1472
void WW8Export::ExportGrfBullet(const SwTxtNode& rNd)
1473
{
1474
	int nCount = CollectGrfsOfBullets();
1475
	if (nCount > 0)
1476
	{
1477
		SwPosition aPos(rNd);
1478
		String aPicBullets = String::CreateFromAscii("_PictureBullets");
1479
		AppendBookmark(aPicBullets);
1480
		for (int i = 0; i < nCount; i++)
1481
		{
1482
			sw::Frame aFrame(*(m_vecBulletPic[i]), aPos);
1483
			OutGrfBullets(aFrame);
1484
		}
1485
		AppendBookmark(aPicBullets);
1486
	}
1487
}
1488
1489
static sal_uInt8 nAttrMagicIdx = 0;
1490
void WW8Export::OutGrfBullets(const sw::Frame & rFrame)
1491
{
1492
	if ( !pGrf || !pChpPlc || !pO )
1493
		return;
1494
	
1495
	pGrf->Insert(rFrame);
1496
	pChpPlc->AppendFkpEntry( Strm().Tell(), pO->Count(), pO->GetData() );
1497
    	pO->Remove( 0, pO->Count() ); 
1498
	//if links...
1499
	WriteChar( (char)1 );
1500
1501
	sal_uInt8 aArr[ 22 ];
1502
	sal_uInt8* pArr = aArr;
1503
1504
    // sprmCFSpec
1505
    if( bWrtWW8 )
1506
        Set_UInt16( pArr, 0x855 );
1507
    else
1508
        Set_UInt8( pArr, 117 );
1509
    Set_UInt8( pArr, 1 );
1510
1511
    Set_UInt16( pArr, 0x083c );
1512
    Set_UInt8( pArr, 0x81 );
1513
1514
    // sprmCPicLocation
1515
    if( bWrtWW8 )
1516
        Set_UInt16( pArr, 0x6a03 );
1517
    else
1518
    {
1519
        Set_UInt8( pArr, 68 );
1520
        Set_UInt8( pArr, 4 );
1521
    }
1522
    Set_UInt32( pArr, GRF_MAGIC_321 );
1523
1524
    //extern  nAttrMagicIdx;
1525
    --pArr;
1526
    Set_UInt8( pArr, nAttrMagicIdx++ );
1527
    pChpPlc->AppendFkpEntry( Strm().Tell(), static_cast< short >(pArr - aArr), aArr );
1528
}
1529
//Achieve the index position
1530
int WW8Export::GetGrfIndex(const SvxBrushItem& rBrush)
1531
{
1532
	int nIndex = -1;
1533
	if ( rBrush.GetGraphic() )
1534
	{
1535
		for (int i = 0; i < m_vecBulletPic.size(); ++i)
1536
		{
1537
			if (m_vecBulletPic[i]->GetChecksum() == rBrush.GetGraphic()->GetChecksum())
1538
			{
1539
				nIndex = i;
1540
				break;
1541
			}
1542
		}
1543
	}
1544
1545
	return nIndex;
1546
}
1547
1427
void MSWordExportBase::AppendWordBookmark( const String& rName )
1548
void MSWordExportBase::AppendWordBookmark( const String& rName )
1428
{
1549
{
1429
    AppendBookmark( BookmarkToWord( rName ) );
1550
    AppendBookmark( BookmarkToWord( rName ) );
(-)sw/source/filter/ww8/wrtww8.hxx (-1 / +23 lines)
Lines 48-53 Link Here
48
#include "../inc/msfilter.hxx"
48
#include "../inc/msfilter.hxx"
49
#include <expfld.hxx>
49
#include <expfld.hxx>
50
50
51
//Start for i120928,export graphic bullet,2012.9.25
52
#include <vcl/graph.hxx>
53
class SvxBrushItem;
54
//End
55
51
// einige Forward Deklarationen
56
// einige Forward Deklarationen
52
namespace msfilter
57
namespace msfilter
53
{
58
{
Lines 650-656 Link Here
650
    virtual void AppendBookmarks( const SwTxtNode& rNd, xub_StrLen nAktPos, xub_StrLen nLen ) = 0;
655
    virtual void AppendBookmarks( const SwTxtNode& rNd, xub_StrLen nAktPos, xub_StrLen nLen ) = 0;
651
656
652
    virtual void AppendBookmark( const rtl::OUString& rName, bool bSkip = false ) = 0;
657
    virtual void AppendBookmark( const rtl::OUString& rName, bool bSkip = false ) = 0;
653
658
	//Start for i120928,export graphic bullet,2012.9.25
659
	virtual void ExportGrfBullet(const SwTxtNode& rNd) = 0;
660
	//End
654
    // FIXME probably a hack...
661
    // FIXME probably a hack...
655
    virtual void WriteCR( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner = ww8::WW8TableNodeInfoInner::Pointer_t() ) = 0;
662
    virtual void WriteCR( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner = ww8::WW8TableNodeInfoInner::Pointer_t() ) = 0;
656
663
Lines 922-927 Link Here
922
929
923
    sal_uInt8 bWrtWW8 : 1;                   ///< Write WW95 (false) or WW97 (true) file format
930
    sal_uInt8 bWrtWW8 : 1;                   ///< Write WW95 (false) or WW97 (true) file format
924
931
932
    	//Start for i120928,export graphic bullet,2012.9.25
933
	mutable std::vector<const Graphic*> m_vecBulletPic;
934
	//End
935
925
protected:
936
protected:
926
    SwWW8Writer        *m_pWriter;      ///< Pointer to the writer
937
    SwWW8Writer        *m_pWriter;      ///< Pointer to the writer
927
    WW8AttributeOutput *m_pAttrOutput;  ///< Converting attributes to stream data
938
    WW8AttributeOutput *m_pAttrOutput;  ///< Converting attributes to stream data
Lines 1024-1029 Link Here
1024
1035
1025
    virtual void AppendBookmarks( const SwTxtNode& rNd, xub_StrLen nAktPos, xub_StrLen nLen );
1036
    virtual void AppendBookmarks( const SwTxtNode& rNd, xub_StrLen nAktPos, xub_StrLen nLen );
1026
    virtual void AppendBookmark( const rtl::OUString& rName, bool bSkip = false );
1037
    virtual void AppendBookmark( const rtl::OUString& rName, bool bSkip = false );
1038
	//Start for i120928,export graphic bullet,2012.9.25
1039
	virtual void ExportGrfBullet(const SwTxtNode& rNd);	
1040
	int CollectGrfsOfBullets() const;
1041
	void OutGrfBullets(const sw::Frame &rFrame);
1042
	int GetGrfIndex(const SvxBrushItem& rBrush);
1043
	//End
1027
    void MoveFieldMarks(sal_uLong nFrom, sal_uLong nTo);
1044
    void MoveFieldMarks(sal_uLong nFrom, sal_uLong nTo);
1028
1045
1029
    void WriteAsStringTable(const ::std::vector<String>&, sal_Int32& rfcSttbf,
1046
    void WriteAsStringTable(const ::std::vector<String>&, sal_Int32& rfcSttbf,
Lines 1360-1365 Link Here
1360
    void WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rNd,
1377
    void WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rNd,
1361
        const sw::Frame &rFly, sal_uInt16 nWidth, sal_uInt16 nHeight);
1378
        const sw::Frame &rFly, sal_uInt16 nWidth, sal_uInt16 nHeight);
1362
1379
1380
	//Start for i120928,export graphic bullet,2012.9.25
1381
	void WritePICBulletFHeader(SvStream& rStrm, const Graphic &rGrf, sal_uInt16 mm, sal_uInt16 nWidth, sal_uInt16 nHeight);
1382
	void WriteGrfForBullet(SvStream& rStrm,  const Graphic &rGrf, sal_uInt16 nWidth, sal_uInt16 nHeight);
1383
	//End
1384
1363
    //No copying
1385
    //No copying
1364
    SwWW8WrGrf(const SwWW8WrGrf&);
1386
    SwWW8WrGrf(const SwWW8WrGrf&);
1365
    SwWW8WrGrf& operator=(const SwWW8WrGrf&);
1387
    SwWW8WrGrf& operator=(const SwWW8WrGrf&);
(-)sw/source/filter/ww8/wrtww8gr.cxx (+140 lines)
Lines 764-770 Link Here
764
        }
764
        }
765
    }
765
    }
766
}
766
}
767
//For i120928,export graphic info of bullet
768
void SwWW8WrGrf::WritePICBulletFHeader(SvStream& rStrm, const Graphic &rGrf,
769
            sal_uInt16 mm, sal_uInt16 nWidth, sal_uInt16 nHeight)
770
{
771
	sal_Int16 nXSizeAdd = 0, nYSizeAdd = 0;
772
	sal_Int16 nCropL = 0, nCropR = 0, nCropT = 0, nCropB = 0;
767
773
774
	Size aGrTwipSz(rGrf.GetPrefSize());
775
	bool bWrtWW8 = rWrt.bWrtWW8;
776
	sal_uInt16 nHdrLen = bWrtWW8 ? 0x44 : 0x3A;
777
778
	sal_uInt8 aArr[ 0x44 ] = { 0 };
779
780
	sal_uInt8* pArr = aArr + 0x2E;  //Do borders first
781
782
	sal_uInt8 aLnArr[4] = { BOX_LINE_TOP, BOX_LINE_LEFT,
783
	BOX_LINE_BOTTOM, BOX_LINE_RIGHT };
784
	for( sal_uInt8 i = 0; i < 4; ++i )
785
	{
786
		WW8_BRC aBrc;
787
		
788
		short nSpacing;
789
		short nThick = aBrc.DetermineBorderProperties(!bWrtWW8,
790
		&nSpacing);
791
		switch (aLnArr[ i ])
792
		{
793
			case BOX_LINE_TOP:
794
			case BOX_LINE_BOTTOM:
795
			nHeight -= nThick;
796
			nHeight = nHeight - nSpacing;
797
			break;
798
			case BOX_LINE_LEFT:
799
			case BOX_LINE_RIGHT:
800
			default:
801
			nWidth -= nThick;
802
			nWidth = nWidth - nSpacing;
803
			break;
804
		}
805
		memcpy( pArr, &aBrc.aBits1, 2);
806
		pArr+=2;
807
808
		if( bWrtWW8 )
809
		{
810
			memcpy( pArr, &aBrc.aBits2, 2);
811
			pArr+=2;
812
		}
813
	}
814
815
	pArr = aArr + 4;                                //skip lcb
816
	Set_UInt16( pArr, nHdrLen );                    // set cbHeader
817
818
	Set_UInt16( pArr, mm );                         // set mm
819
820
	if ( (aGrTwipSz.Width() * 254L / 144 > USHRT_MAX) || (aGrTwipSz.Height()  * 254L / 144 > USHRT_MAX)
821
		|| (aGrTwipSz.Width() < 0 ) || (aGrTwipSz.Height() < 0) )
822
	{
823
		aGrTwipSz.Width() = nWidth;
824
		aGrTwipSz.Height() = nHeight;
825
	}
826
	using namespace sw::types;
827
	// set xExt & yExt
828
	Set_UInt16(pArr, msword_cast<sal_uInt16>(aGrTwipSz.Width() * 254L / 144));
829
	Set_UInt16(pArr, msword_cast<sal_uInt16>(aGrTwipSz.Height() * 254L / 144));
830
	pArr += 16;
831
	// skip hMF & rcWinMF
832
	// set dxaGoal & dyaGoal
833
	Set_UInt16(pArr, msword_cast<sal_uInt16>(aGrTwipSz.Width()));
834
	Set_UInt16(pArr, msword_cast<sal_uInt16>(aGrTwipSz.Height()));
835
836
	if( aGrTwipSz.Width() + nXSizeAdd )             // set mx
837
	{
838
		double fVal = nWidth * 1000.0 / (aGrTwipSz.Width() + nXSizeAdd);
839
		Set_UInt16( pArr, (sal_uInt16)::rtl::math::round(fVal) );
840
	}
841
	else
842
		pArr += 2;
843
844
	if( aGrTwipSz.Height() + nYSizeAdd )            // set my
845
	{
846
		double fVal = nHeight * 1000.0 / (aGrTwipSz.Height() + nYSizeAdd);
847
		Set_UInt16( pArr, (sal_uInt16)::rtl::math::round(fVal) );
848
	}
849
	else
850
	pArr += 2;
851
852
	Set_UInt16( pArr, nCropL );                     // set dxaCropLeft
853
	Set_UInt16( pArr, nCropT );                     // set dyaCropTop
854
	Set_UInt16( pArr, nCropR );                     // set dxaCropRight
855
	Set_UInt16( pArr, nCropB );                     // set dyaCropBottom
856
857
	rStrm.Write( aArr, nHdrLen );
858
}
859
void SwWW8WrGrf::WriteGrfForBullet(SvStream& rStrm,  const Graphic &rGrf, sal_uInt16 nWidth, sal_uInt16 nHeight)
860
{
861
	if (rWrt.bWrtWW8)
862
	{
863
		WritePICBulletFHeader(rStrm,rGrf, 0x64,nWidth,nHeight);
864
		SwBasicEscherEx aInlineEscher(&rStrm, rWrt);
865
		aInlineEscher.WriteGrfBullet(rGrf);
866
		aInlineEscher.WritePictures();
867
	}
868
	else
869
	{
870
		bool bSwapped = rGrf.IsSwapOut() ? true : false;
871
		
872
		GDIMetaFile aMeta;
873
		switch (rGrf.GetType())
874
		{
875
			case GRAPHIC_BITMAP:        // Bitmap -> in Metafile abspielen
876
			{
877
				VirtualDevice aVirt;
878
				aMeta.Record(&aVirt);
879
				aVirt.DrawBitmap( Point( 0,0 ), rGrf.GetBitmap() );
880
				aMeta.Stop();
881
				aMeta.WindStart();
882
				aMeta.SetPrefMapMode( rGrf.GetPrefMapMode());
883
				aMeta.SetPrefSize( rGrf.GetPrefSize());
884
			}
885
			break;
886
			case GRAPHIC_GDIMETAFILE :      // GDI ( =SV ) Metafile
887
				aMeta = rGrf.GetGDIMetaFile();
888
			break;
889
			default:
890
				return;
891
		}
892
		WritePICBulletFHeader(rStrm, rGrf, 8, nWidth, nHeight);
893
		WriteWindowMetafileBits(rStrm, aMeta);
894
	}
895
}
896
768
void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem)
897
void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem)
769
{
898
{
770
    sal_uInt16 nWidth = rItem.mnWid;
899
    sal_uInt16 nWidth = rItem.mnWid;
Lines 783-788 Link Here
783
                WriteGrfFromGrfNode(rStrm, *pNd, rItem.maFly, nWidth, nHeight);
912
                WriteGrfFromGrfNode(rStrm, *pNd, rItem.maFly, nWidth, nHeight);
784
        }
913
        }
785
        break;
914
        break;
915
        //For i120928,add branch to export graphic of bullet
916
        case sw::Frame::eBulletGrf:
917
        {
918
		if (rItem.maFly.HasGraphic())
919
		{
920
			const Graphic& rGrf = rItem.maFly.GetGraphic();
921
			WriteGrfForBullet(rStrm, rGrf, nWidth, nHeight);
922
		}
923
        }
924
        break;
925
786
        case sw::Frame::eOle:
926
        case sw::Frame::eOle:
787
        {
927
        {
788
#ifdef OLE_PREVIEW_AS_EMF
928
#ifdef OLE_PREVIEW_AS_EMF
(-)sw/source/filter/ww8/ww8attributeoutput.hxx (-1 / +2 lines)
Lines 208-214 Link Here
208
        sal_Int16 nIndentAt,
208
        sal_Int16 nIndentAt,
209
        sal_Int16 nFirstLineIndex,
209
        sal_Int16 nFirstLineIndex,
210
        sal_Int16 nListTabPos,
210
        sal_Int16 nListTabPos,
211
        const String &rNumberingString );
211
        const String &rNumberingString,
212
        const SvxBrushItem* pBrush = 0); //For i120928,transfer graphic of bullet
212
213
213
protected:
214
protected:
214
    /// Output frames - the implementation.
215
    /// Output frames - the implementation.
(-)sw/source/filter/ww8/ww8par.cxx (-2 / +89 lines)
Lines 116-121 Link Here
116
#include "writerhelper.hxx"
116
#include "writerhelper.hxx"
117
#include "writerwordglue.hxx"
117
#include "writerwordglue.hxx"
118
118
119
#include "ndgrf.hxx"
120
#include <editeng/brshitem.hxx>
121
#include <editeng/editids.hrc>
122
#include <txtflcnt.hxx>
123
#include <fmtflcnt.hxx>
124
#include <txatbase.hxx>
119
125
120
#include "ww8par2.hxx"          // class WW8RStyle, class WW8AnchorPara
126
#include "ww8par2.hxx"          // class WW8RStyle, class WW8AnchorPara
121
127
Lines 4313-4319 Link Here
4313
    GrafikDtor();
4319
    GrafikDtor();
4314
    DELETEZ( pMSDffManager );
4320
    DELETEZ( pMSDffManager );
4315
    DELETEZ( pHdFt );
4321
    DELETEZ( pHdFt );
4316
    DELETEZ( pLstManager );
4322
    //For i120928,delay the destruct action
4323
    //DELETEZ( pLstManager );
4317
    DELETEZ( pSBase );
4324
    DELETEZ( pSBase );
4318
    delete pWDop;
4325
    delete pWDop;
4319
    DELETEZ( pFonts );
4326
    DELETEZ( pFonts );
Lines 4330-4336 Link Here
4330
    delete mpRedlineStack;
4337
    delete mpRedlineStack;
4331
    DeleteAnchorStk();
4338
    DeleteAnchorStk();
4332
    DeleteRefStks();
4339
    DeleteRefStks();
4333
4340
	//For i120928,achieve the graphics from the special bookmark with is for graphic bullet
4341
	{
4342
		std::vector<const SwGrfNode*> vecBulletGrf;
4343
		std::vector<SwFrmFmt*> vecFrmFmt;
4344
		
4345
		IDocumentMarkAccess* const pMarkAccess =
4346
                                                rDoc.getIDocumentMarkAccess();
4347
		if ( pMarkAccess )
4348
		{
4349
	              IDocumentMarkAccess::const_iterator_t ppBkmk =
4350
	                                    pMarkAccess->findBookmark( C2U("_PictureBullets") );
4351
			//for(IDocumentMarkAccess::const_iterator_t ppBookmark = ppBkmk->begin();
4352
	              //  	ppBookmark != ppBkmk->end(); ppBookmark++)
4353
	              if ( ppBkmk != pMarkAccess->getBookmarksEnd() &&
4354
	                         IDocumentMarkAccess::GetType( *(ppBkmk->get()) )
4355
	                            == IDocumentMarkAccess::BOOKMARK )               
4356
	            	{			
4357
			 	SwTxtNode* pTxtNode = ppBkmk->get()->GetMarkStart().nNode.GetNode().GetTxtNode();
4358
	                     if ( pTxtNode )                        
4359
				{
4360
					const SwpHints *pHints = pTxtNode->GetpSwpHints();
4361
					for(int nHintPos = 0; pHints && nHintPos < pHints->Count(); ++nHintPos)
4362
					{
4363
						const SwTxtAttr *pHt = (*pHints)[nHintPos];
4364
						xub_StrLen st = *(pHt->GetStart());
4365
						if(pHt && pHt->Which() == RES_TXTATR_FLYCNT && (st >= ppBkmk->get()->GetMarkStart().nContent.GetIndex()))
4366
						{
4367
							SwFrmFmt *pFrmFmt = pHt->GetFlyCnt().GetFrmFmt();
4368
							const SwNodeIndex *pNdIdx = pFrmFmt->GetCntnt().GetCntntIdx();
4369
							const SwNodes &nos = pNdIdx->GetNodes();
4370
							const SwGrfNode *pGrf = dynamic_cast<const SwGrfNode*>(nos[pNdIdx->GetIndex() + 1]);
4371
							if (pGrf)
4372
							{
4373
								vecBulletGrf.push_back(pGrf);
4374
								vecFrmFmt.push_back(pFrmFmt);
4375
							}
4376
						}
4377
					}
4378
					// update graphic bullet information
4379
					int nCount = pLstManager->GetWW8LSTInfoNum();
4380
					for (int i = 0; i < nCount; ++i)
4381
					{
4382
						SwNumRule* pRule = pLstManager->GetNumRule(i);
4383
						for (int j = 0; j < MAXLEVEL; ++j)
4384
						{
4385
							SwNumFmt aNumFmt(pRule->Get(j));						
4386
							sal_Int16 nType = aNumFmt.GetNumberingType();
4387
							sal_uInt16 nGrfBulletCP = aNumFmt.GetGrfBulletCP();
4388
							if (nType == SVX_NUM_BITMAP && vecBulletGrf.size() > nGrfBulletCP)
4389
							{
4390
								Graphic aGraphic = vecBulletGrf[nGrfBulletCP]->GetGrf();
4391
								SvxBrushItem aBrush(aGraphic, GPOS_AREA, SID_ATTR_BRUSH);
4392
								Font aFont = numfunc::GetDefBulletFont();
4393
								int nHeight = aFont.GetHeight() * 12;//20;
4394
								Size aPrefSize( aGraphic.GetPrefSize());							
4395
								if (aPrefSize.Height() * aPrefSize.Width() != 0 )							
4396
								{
4397
									int nWidth = (nHeight * aPrefSize.Width()) / aPrefSize.Height();
4398
									Size aSize(nWidth, nHeight);
4399
									aNumFmt.SetGraphicBrush(&aBrush, &aSize);
4400
								}
4401
								else
4402
								{
4403
									aNumFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL);
4404
									aNumFmt.SetBulletChar(0x2190);
4405
								}
4406
								pRule->Set( j, aNumFmt );
4407
							}
4408
						}
4409
					}
4410
					// Remove additional pictures
4411
					for (sal_uInt16 i = 0; i < vecFrmFmt.size(); ++i)
4412
					{
4413
						rDoc.DelLayoutFmt(vecFrmFmt[i]);
4414
					}
4415
				}
4416
			}
4417
			DELETEZ( pLstManager );
4418
		}
4419
	}
4420
	
4334
    UpdateFields();
4421
    UpdateFields();
4335
4422
4336
    // delete the pam before the call for hide all redlines (Bug 73683)
4423
    // delete the pam before the call for hide all redlines (Bug 73683)
(-)sw/source/filter/ww8/ww8par.hxx (+2 lines)
Lines 186-191 Link Here
186
        std::vector<sal_uInt8> &rParaSprms, SwTxtNode *pNode=0);
186
        std::vector<sal_uInt8> &rParaSprms, SwTxtNode *pNode=0);
187
    SwNumRule* CreateNextRule(bool bSimple);
187
    SwNumRule* CreateNextRule(bool bSimple);
188
    ~WW8ListManager();
188
    ~WW8ListManager();
189
	SwNumRule* GetNumRule(int i);	
190
	int GetWW8LSTInfoNum() const{return maLSTInfos.size();}
189
private:
191
private:
190
    wwSprmParser maSprmParser;
192
    wwSprmParser maSprmParser;
191
    SwWW8ImplReader& rReader;
193
    SwWW8ImplReader& rReader;
(-)sw/source/filter/ww8/ww8par3.cxx (-2 / +42 lines)
Lines 530-535 Link Here
530
    SvxExtNumType   eType;              // Writer-Num-Typ
530
    SvxExtNumType   eType;              // Writer-Num-Typ
531
    SvxAdjust       eAdj;               // Ausrichtung (Links/rechts/zent.)
531
    SvxAdjust       eAdj;               // Ausrichtung (Links/rechts/zent.)
532
    sal_Unicode     cBullet(0x2190);    // default safe bullet
532
    sal_Unicode     cBullet(0x2190);    // default safe bullet
533
534
    sal_Unicode     cGrfBulletCP(USHRT_MAX); 
535
533
    String          sPrefix;
536
    String          sPrefix;
534
    String          sPostfix;
537
    String          sPostfix;
535
    WW8LVL          aLVL;
538
    WW8LVL          aLVL;
Lines 673-684 Link Here
673
    //
676
    //
674
    // 3. ggfs. CHPx einlesen und
677
    // 3. ggfs. CHPx einlesen und
675
    //
678
    //
679
	sal_uInt16 nWitchPicIsBullet = USHRT_MAX;
680
	bool bIsPicBullet = false;
681
	
676
    if( aLVL.nLenGrpprlChpx )
682
    if( aLVL.nLenGrpprlChpx )
677
    {
683
    {
678
        sal_uInt8 aGrpprlChpx[ 255 ];
684
        sal_uInt8 aGrpprlChpx[ 255 ];
679
        memset(&aGrpprlChpx, 0, sizeof( aGrpprlChpx ));
685
        memset(&aGrpprlChpx, 0, sizeof( aGrpprlChpx ));
680
        if(aLVL.nLenGrpprlChpx != rSt.Read(&aGrpprlChpx, aLVL.nLenGrpprlChpx))
686
        if(aLVL.nLenGrpprlChpx != rSt.Read(&aGrpprlChpx, aLVL.nLenGrpprlChpx))
681
            return false;
687
            return false;
688
		
689
	//For i120928,parse the graphic info of bullets
690
	sal_uInt8 *pSprmWhichPis = GrpprlHasSprm(0x6887,aGrpprlChpx[0],aLVL.nLenGrpprlChpx);
691
	sal_uInt8 *pSprmIsPicBullet = GrpprlHasSprm(0x4888,aGrpprlChpx[0],aLVL.nLenGrpprlChpx);	
692
	if (pSprmWhichPis)
693
	{
694
		nWitchPicIsBullet = *pSprmWhichPis;
695
	}
696
	if (pSprmIsPicBullet)
697
	{
698
		bIsPicBullet = (*pSprmIsPicBullet) & 0x0001;
699
	}
700
	
682
        // neues ItemSet fuer die Zeichenattribute anlegen
701
        // neues ItemSet fuer die Zeichenattribute anlegen
683
        rpItemSet = new SfxItemSet( rDoc.GetAttrPool(), RES_CHRATR_BEGIN,
702
        rpItemSet = new SfxItemSet( rDoc.GetAttrPool(), RES_CHRATR_BEGIN,
684
            RES_CHRATR_END - 1 );
703
            RES_CHRATR_END - 1 );
Lines 747-752 Link Here
747
        case 23:
766
        case 23:
748
        case 25:    //#114412#
767
        case 25:    //#114412#
749
            eType = SVX_NUM_CHAR_SPECIAL;
768
            eType = SVX_NUM_CHAR_SPECIAL;
769
			//For i120928,type info
770
			if (bIsPicBullet)
771
			{
772
				eType = SVX_NUM_BITMAP;
773
			}
774
750
            break;
775
            break;
751
        case 255:
776
        case 255:
752
            eType = SVX_NUM_NUMBER_NONE;
777
            eType = SVX_NUM_NUMBER_NONE;
Lines 820-827 Link Here
820
845
821
        if (!cBullet)  // unsave control code?
846
        if (!cBullet)  // unsave control code?
822
            cBullet = 0x2190;
847
            cBullet = 0x2190;
823
    }
848
    }	else if (SVX_NUM_BITMAP == eType)	//For i120928,position index info of graphic
824
    else
849
	{
850
		cGrfBulletCP = nWitchPicIsBullet;       // This is a bullet picture ID	
851
	} else
825
    {
852
    {
826
        /*
853
        /*
827
        #83154#, #82192#, #i173#, #109158#
854
        #83154#, #82192#, #i173#, #109158#
Lines 891-896 Link Here
891
        // Don't forget: unten, nach dem Bauen eventueller Styles auch noch
918
        // Don't forget: unten, nach dem Bauen eventueller Styles auch noch
892
        // SetBulletFont() rufen !!!
919
        // SetBulletFont() rufen !!!
893
    }
920
    }
921
	//For i120928,position index info
922
	else if (SVX_NUM_BITMAP == eType)	
923
	{
924
		rNumFmt.SetGrfBulletCP(cGrfBulletCP);
925
	}
894
    else
926
    else
895
    {
927
    {
896
        // reminder: Garnix ist default Prefix
928
        // reminder: Garnix ist default Prefix
Lines 1088-1093 Link Here
1088
    return pMyNumRule;
1120
    return pMyNumRule;
1089
}
1121
}
1090
1122
1123
SwNumRule* WW8ListManager::GetNumRule(int i)
1124
{
1125
	if ( i >= 0 && i < maLSTInfos.size() )
1126
		return maLSTInfos[i]->pNumRule;
1127
	else
1128
		return 0;
1129
}
1130
1091
// oeffentliche Methoden /////////////////////////////////////////////////////
1131
// oeffentliche Methoden /////////////////////////////////////////////////////
1092
//
1132
//
1093
WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_)
1133
WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_)
(-)sw/source/ui/wrtsh/wrtsh1.cxx (-2 / +3 lines)
Lines 303-310 Link Here
303
		DelRight();
303
		DelRight();
304
		// eingefuegte Grafik in eigenen Absatz, falls am Ende
304
		// eingefuegte Grafik in eigenen Absatz, falls am Ende
305
		// eines nichtleeren Absatzes
305
		// eines nichtleeren Absatzes
306
	if ( IsEndPara() && !IsSttPara() )
306
	//For i120928,avoid to split node
307
		SwFEShell::SplitNode();
307
	//if ( IsEndPara() && !IsSttPara() )
308
	//	SwFEShell::SplitNode();
308
309
309
	EnterSelFrmMode();
310
	EnterSelFrmMode();
310
311

Return to issue 120928