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

(-)sw/inc/numrule.hxx (-1 / +7 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
	//Start for i120928,import/export graphic bullet,2012.9.25
59
	sal_Unicode 	cGrfBulletCP;
60
	//End
59
	SW_DLLPRIVATE void UpdateNumNodes( SwDoc* pDoc );
61
	SW_DLLPRIVATE void UpdateNumNodes( SwDoc* pDoc );
60
    SW_DLLPRIVATE virtual void NotifyGraphicArrived();
62
    SW_DLLPRIVATE virtual void NotifyGraphicArrived();
61
63
Lines 79-84 Link Here
79
81
80
	SwCharFmt* GetCharFmt() const { return (SwCharFmt*)GetRegisteredIn(); }
82
	SwCharFmt* GetCharFmt() const { return (SwCharFmt*)GetRegisteredIn(); }
81
	void SetCharFmt( SwCharFmt* );
83
	void SetCharFmt( SwCharFmt* );
84
	//Start for i120928,import/export graphic bullet,2012.9.25
85
	void			SetGrfBulletCP(sal_Unicode cP){cGrfBulletCP = cP;}
86
	sal_Unicode 	GetGrfBulletCP()const {return cGrfBulletCP;}
87
	//End
82
    void ForgetCharFmt();
88
    void ForgetCharFmt();
83
89
84
	virtual void			SetCharFmtName(const String& rSet);
90
	virtual void			SetCharFmtName(const String& rSet);
(-)sw/source/core/doc/number.cxx (-1 / +6 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,import/export graphic bullet,2012.9.25
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,import/export graphic bullet,2012.9.25	
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
	//Start for i120928,import/export graphic bullet,2012.9.25
328
	cGrfBulletCP = rNumFmt.cGrfBulletCP;
329
	//End
325
	return *this;
330
	return *this;
326
}
331
}
327
/* -----------------------------23.02.01 09:28--------------------------------
332
/* -----------------------------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;//Start for i120928,export graphic bullet,2012.9.25
324
    
325
    
325
protected:
326
protected:
326
327
(-)sw/source/filter/ww8/escher.hxx (+3 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
	//Start for i120928,export graphic bullet,2012.9.25
131
	sal_Int32 WriteGrfBullet(const Graphic&);
132
	//End
130
    sal_Int32 WriteOLEFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId);
133
    sal_Int32 WriteOLEFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId);
131
    void WriteEmptyFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId);
134
    void WriteEmptyFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId);
132
    virtual void WriteFrmExtraData(const SwFrmFmt&);
135
    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);//Start for i120928,export graphic bullet,2012.9.25);
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 (+7 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
//Start for i120928,export graphic bullet,2012.9.25
197
void RtfExport::ExportGrfBullet(const SwTxtNode& rNd)
198
{
199
	//This is for RTF filter on the graphic bullets
200
}
201
//End
202
	
196
void RtfExport::WriteChar( sal_Unicode )
203
void RtfExport::WriteChar( sal_Unicode )
197
{
204
{
198
    OSL_TRACE("%s", OSL_THIS_FUNC);
205
    OSL_TRACE("%s", OSL_THIS_FUNC);
(-)sw/source/filter/ww8/rtfexport.hxx (+4 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
	//Start for i120928,export graphic bullet,2012.9.25
90
	virtual void ExportGrfBullet(const SwTxtNode& rNd);
91
	//End
92
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 */ }
93
    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 );
94
    virtual void WriteChar( sal_Unicode );
91
95
(-)sw/source/filter/ww8/writerhelper.cxx (-1 / +36 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
//Start for i120928,export graphic bullet,2012.9.25
62
#ifndef _SV_SVAPP_HXX
63
#include <vcl/svapp.hxx>
64
#endif
65
//End
62
#ifdef DEBUGDUMP
66
#ifdef DEBUGDUMP
63
#       include <vcl/svapp.hxx>
67
#       include <vcl/svapp.hxx>
64
#   ifndef _TOOLS_URLOBJ_HXX
68
#   ifndef _TOOLS_URLOBJ_HXX
Lines 180-185 Link Here
180
184
181
namespace sw
185
namespace sw
182
{
186
{
187
	//Start for i120928,export graphic bullet,2012.9.25
188
	Frame::Frame(const Graphic&rGrf, const SwPosition &rPos)
189
		:mpFlyFrm(NULL),
190
		maPos(rPos),
191
		maSize(),
192
		maLayoutSize(),
193
		mpStartFrameContent(0),
194
		mbIsInline(true),
195
		meWriterType(eBulletGrf),
196
		maGrf(rGrf),
197
		mbForBullet(true)
198
	{
199
200
		const MapMode aMap100mm( MAP_100TH_MM );
201
		Size    aSize( rGrf.GetPrefSize() );    
202
		if ( MAP_PIXEL == rGrf.GetPrefMapMode().GetMapUnit() )    
203
		{        
204
			aSize = Application::GetDefaultDevice()->PixelToLogic(aSize, aMap100mm );   
205
		}    
206
		else    
207
		{        
208
			aSize = OutputDevice::LogicToLogic( aSize,rGrf.GetPrefMapMode(), aMap100mm );   
209
		} 
210
		maSize = aSize;
211
		maLayoutSize = maSize;
212
	}
213
	//End
183
    Frame::Frame(const SwFrmFmt &rFmt, const SwPosition &rPos)
214
    Frame::Frame(const SwFrmFmt &rFmt, const SwPosition &rPos)
184
        : mpFlyFrm(&rFmt),
215
        : mpFlyFrm(&rFmt),
185
          maPos(rPos),
216
          maPos(rPos),
Lines 192-197 Link Here
192
          // --> OD 2007-04-19 #i43447# - move to initialization list
223
          // --> OD 2007-04-19 #i43447# - move to initialization list
193
          mbIsInline( (rFmt.GetAnchor().GetAnchorId() == FLY_AS_CHAR) )
224
          mbIsInline( (rFmt.GetAnchor().GetAnchorId() == FLY_AS_CHAR) )
194
          // <--
225
          // <--
226
          //Start for i120928,export graphic bullet,2012.9.25
227
          ,maGrf()
228
          ,mbForBullet(false)
229
          //End
195
    {
230
    {
196
        switch (rFmt.Which())
231
        switch (rFmt.Which())
197
        {
232
        {
(-)sw/source/filter/ww8/writerhelper.hxx (-4 / +21 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};//Modified for i120928,2012.9.25
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
		//Start for i120928,export graphic bullet,2012.9.25
125
		bool mbForBullet:1;
126
		Graphic maGrf;
127
		//End
124
    public:
128
    public:
125
        Frame(const SwFrmFmt &rFlyFrm, const SwPosition &rPos);
129
        Frame(const SwFrmFmt &rFlyFrm, const SwPosition &rPos);
126
130
	//Start for i120928,export graphic bullet,2012.9.25
131
	Frame(const Graphic&, const SwPosition &);
132
	//End
127
        /** Get the writer SwFrmFmt that this object describes
133
        /** Get the writer SwFrmFmt that this object describes
128
134
129
            @return
135
            @return
Lines 177-184 Link Here
177
         the first node of content in the frame, might not be any at all.
183
         the first node of content in the frame, might not be any at all.
178
        */
184
        */
179
        const SwNode *GetContent() const { return mpStartFrameContent; }
185
        const SwNode *GetContent() const { return mpStartFrameContent; }
186
	//Start for i120928,export graphic bullet,2012.9.25
187
	const Graphic &GetGraphic() const { return maGrf; }
188
	bool HasGraphic() const { return mbForBullet; }
189
	//End
180
190
181
182
        /** Does this sw::Frame refer to the same writer content as another
191
        /** Does this sw::Frame refer to the same writer content as another
183
192
184
         @return
193
         @return
Lines 186-192 Link Here
186
        */
195
        */
187
        bool RefersToSameFrameAs(const Frame &rOther) const
196
        bool RefersToSameFrameAs(const Frame &rOther) const
188
        {
197
        {
189
            return (mpFlyFrm == rOther.mpFlyFrm);
198
            	//Start for i120928,export graphic bullet,2012.9.25		
199
		//return (mpFlyFrm == rOther.mpFlyFrm);
200
		if (mbForBullet && rOther.mbForBullet)
201
			return (maGrf == rOther.maGrf);
202
		else if ((!mbForBullet) && (!rOther.mbForBullet))
203
			return (mpFlyFrm == rOther.mpFlyFrm);
204
		else
205
			return false;
206
		//End
190
        }
207
        }
191
208
192
        /** The Size of the contained element
209
        /** 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
//Start for i120928,export graphic bullet,2012.9.25
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
//End
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 (-1 / +25 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
	//Start for i120928,export graphic bullet,2012.9.25
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
	//End
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
			//Start for i120928,export graphic bullet,2012.9.25
1971
			if (bLastCR && (!bExported))
1972
			{
1973
				ExportGrfBullet(rNode);
1974
				bExported = true;
1975
			}
1976
			//End
1977
		
1960
                    WriteCR( pTextNodeInfoInner );
1978
                    WriteCR( pTextNodeInfoInner );
1961
                }
1979
                }
1962
            }
1980
            }
Lines 1994-2000 Link Here
1994
                // insert final bookmarks if any before CR and after flys
2012
                // insert final bookmarks if any before CR and after flys
1995
                AppendBookmarks( rNode, nEnd, 1 );
2013
                AppendBookmarks( rNode, nEnd, 1 );
1996
                WriteCR( pTextNodeInfoInner );
2014
                WriteCR( pTextNodeInfoInner );
1997
2015
              //Start for i120928,export graphic bullet,2012.9.25
2016
		if (bLastCR && (!bExported))
2017
		{
2018
			ExportGrfBullet(rNode);
2019
			bExported = true;
2020
		}
2021
		//End
1998
                if ( pTOXSect )
2022
                if ( pTOXSect )
1999
                {
2023
                {
2000
                    m_aCurrentCharPropStarts.pop();
2024
                    m_aCurrentCharPropStarts.pop();
(-)sw/source/filter/ww8/wrtw8num.cxx (-4 / +18 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 ////Start for i120928,export graphic bullet,2012.9.25
218
    )
219
    )
219
{
220
{
220
    // Start value
221
    // Start value
Lines 272-278 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 );
275
276
	//Start for i120928,import graphic bullet,2012.9.25
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
	}			
288
	//End
276
        m_rWW8Export.pO = pOldpO;
289
        m_rWW8Export.pO = pOldpO;
277
    }
290
    }
278
    *m_rWW8Export.pTableStrm << sal_uInt8( aCharAtrs.Count() );
291
    *m_rWW8Export.pTableStrm << sal_uInt8( aCharAtrs.Count() );
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 / +125 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
//Start for i120928,export graphic bullet,2012.9.25
126
#ifndef _NUMRULE_HXX
127
#include "numrule.hxx"
128
#endif
129
//End
126
using namespace sw::util;
130
using namespace sw::util;
127
using namespace sw::types;
131
using namespace sw::types;
128
132
Lines 1424-1429 Link Here
1424
    pBkmks->Append( nSttCP, rName );
1428
    pBkmks->Append( nSttCP, rName );
1425
}
1429
}
1426
1430
1431
//Start for i120928,export graphic bullet,2012.9.25
1432
int WW8Export::CollectGrfsOfBullets() const
1433
{
1434
	m_vecBulletPic.clear();
1435
	
1436
	if ( pDoc )
1437
	{
1438
		int nCountRule = pDoc->GetNumRuleTbl().Count();
1439
		for (int n = 0; n < nCountRule; ++n)
1440
	    	{
1441
			const SwNumRule &rRule = *(pDoc->GetNumRuleTbl().GetObject(n));
1442
			sal_uInt16 nLevels = rRule.IsContinusNum() ? 1 : 9;
1443
			for (sal_uInt16 nLvl = 0; nLvl < nLevels; ++nLvl)
1444
	        	{
1445
	            		const SwNumFmt &rFmt = rRule.Get(nLvl);
1446
				if (SVX_NUM_BITMAP != rFmt.GetNumberingType())
1447
				{
1448
					continue;
1449
				}
1450
				const Graphic *pGrf = rFmt.GetBrush()? rFmt.GetBrush()->GetGraphic():0;
1451
				if ( pGrf )
1452
				{
1453
					bool bHas = false;
1454
					for (int i = 0; i < m_vecBulletPic.size(); ++i)
1455
					{
1456
						if (m_vecBulletPic[i]->GetChecksum() == pGrf->GetChecksum())
1457
						{
1458
							bHas = true;
1459
							break;
1460
						}
1461
					}
1462
					if (!bHas)
1463
					{
1464
						m_vecBulletPic.push_back(pGrf);
1465
					}
1466
				}
1467
			}
1468
		}
1469
	}
1470
	
1471
	return m_vecBulletPic.size();
1472
}
1473
1474
void WW8Export::ExportGrfBullet(const SwTxtNode& rNd)
1475
{
1476
	int nCount = CollectGrfsOfBullets();
1477
	if (nCount > 0)
1478
	{
1479
		SwPosition aPos(rNd);
1480
		String aPicBullets = String::CreateFromAscii("_PictureBullets");
1481
		AppendBookmark(aPicBullets);
1482
		for (int i = 0; i < nCount; i++)
1483
		{
1484
			sw::Frame aFrame(*(m_vecBulletPic[i]), aPos);
1485
			OutGrfBullets(aFrame);
1486
		}
1487
		AppendBookmark(aPicBullets);
1488
	}
1489
}
1490
1491
static sal_uInt8 nAttrMagicIdx = 0;
1492
void WW8Export::OutGrfBullets(const sw::Frame & rFrame)
1493
{
1494
	if ( !pGrf || !pChpPlc || !pO )
1495
		return;
1496
	
1497
	pGrf->Insert(rFrame);
1498
	pChpPlc->AppendFkpEntry( Strm().Tell(), pO->Count(), pO->GetData() );
1499
    	pO->Remove( 0, pO->Count() ); 
1500
	//if links...
1501
	WriteChar( (char)1 );
1502
1503
	sal_uInt8 aArr[ 22 ];
1504
	sal_uInt8* pArr = aArr;
1505
1506
    // sprmCFSpec
1507
    if( bWrtWW8 )
1508
        Set_UInt16( pArr, 0x855 );
1509
    else
1510
        Set_UInt8( pArr, 117 );
1511
    Set_UInt8( pArr, 1 );
1512
1513
    Set_UInt16( pArr, 0x083c );
1514
    Set_UInt8( pArr, 0x81 );
1515
1516
    // sprmCPicLocation
1517
    if( bWrtWW8 )
1518
        Set_UInt16( pArr, 0x6a03 );
1519
    else
1520
    {
1521
        Set_UInt8( pArr, 68 );
1522
        Set_UInt8( pArr, 4 );
1523
    }
1524
    Set_UInt32( pArr, GRF_MAGIC_321 );
1525
1526
    //extern  nAttrMagicIdx;
1527
    --pArr;
1528
    Set_UInt8( pArr, nAttrMagicIdx++ );
1529
    pChpPlc->AppendFkpEntry( Strm().Tell(), static_cast< short >(pArr - aArr), aArr );
1530
}
1531
1532
int WW8Export::GetGrfIndex(const SvxBrushItem& rBrush)
1533
{
1534
	int nIndex = -1;
1535
	if ( rBrush.GetGraphic() )
1536
	{
1537
		for (int i = 0; i < m_vecBulletPic.size(); ++i)
1538
		{
1539
			if (m_vecBulletPic[i]->GetChecksum() == rBrush.GetGraphic()->GetChecksum())
1540
			{
1541
				nIndex = i;
1542
				break;
1543
			}
1544
		}
1545
	}
1546
1547
	return nIndex;
1548
}
1549
//End
1550
1427
void MSWordExportBase::AppendWordBookmark( const String& rName )
1551
void MSWordExportBase::AppendWordBookmark( const String& rName )
1428
{
1552
{
1429
    AppendBookmark( BookmarkToWord( rName ) );
1553
    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 (+141 lines)
Lines 764-770 Link Here
764
        }
764
        }
765
    }
765
    }
766
}
766
}
767
//Start for i120928,export graphic bullet,2012.9.25
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
//End
897
768
void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem)
898
void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem)
769
{
899
{
770
    sal_uInt16 nWidth = rItem.mnWid;
900
    sal_uInt16 nWidth = rItem.mnWid;
Lines 783-788 Link Here
783
                WriteGrfFromGrfNode(rStrm, *pNd, rItem.maFly, nWidth, nHeight);
913
                WriteGrfFromGrfNode(rStrm, *pNd, rItem.maFly, nWidth, nHeight);
784
        }
914
        }
785
        break;
915
        break;
916
        //Start for i120928,export graphic bullet,2012.9.25
917
        case sw::Frame::eBulletGrf:
918
        {
919
		if (rItem.maFly.HasGraphic())
920
		{
921
			const Graphic& rGrf = rItem.maFly.GetGraphic();
922
			WriteGrfForBullet(rStrm, rGrf, nWidth, nHeight);
923
		}
924
        }
925
        break;
926
        //End
786
        case sw::Frame::eOle:
927
        case sw::Frame::eOle:
787
        {
928
        {
788
#ifdef OLE_PREVIEW_AS_EMF
929
#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); //Start for i120928,export graphic bullet,2012.9.25
212
213
213
protected:
214
protected:
214
    /// Output frames - the implementation.
215
    /// Output frames - the implementation.
(-)sw/source/filter/ww8/ww8par.cxx (-2 / +93 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
//Start for i120928,import graphic bullet,2012.9.25
120
#include "ndgrf.hxx"
121
#include <editeng/brshitem.hxx>
122
#include <editeng/editids.hrc>
123
#include <txtflcnt.hxx>
124
#include <fmtflcnt.hxx>
125
#include <txatbase.hxx>
126
//End
119
127
120
#include "ww8par2.hxx"          // class WW8RStyle, class WW8AnchorPara
128
#include "ww8par2.hxx"          // class WW8RStyle, class WW8AnchorPara
121
129
Lines 4313-4319 Link Here
4313
    GrafikDtor();
4321
    GrafikDtor();
4314
    DELETEZ( pMSDffManager );
4322
    DELETEZ( pMSDffManager );
4315
    DELETEZ( pHdFt );
4323
    DELETEZ( pHdFt );
4316
    DELETEZ( pLstManager );
4324
    //Start for i120928,import graphic bullet,2012.9.25
4325
    //DELETEZ( pLstManager );
4326
    //End
4317
    DELETEZ( pSBase );
4327
    DELETEZ( pSBase );
4318
    delete pWDop;
4328
    delete pWDop;
4319
    DELETEZ( pFonts );
4329
    DELETEZ( pFonts );
Lines 4330-4336 Link Here
4330
    delete mpRedlineStack;
4340
    delete mpRedlineStack;
4331
    DeleteAnchorStk();
4341
    DeleteAnchorStk();
4332
    DeleteRefStks();
4342
    DeleteRefStks();
4333
4343
	//Start for i120928,import graphic bullet,2012.9.25
4344
	{
4345
		std::vector<const SwGrfNode*> vecBulletGrf;
4346
		std::vector<SwFrmFmt*> vecFrmFmt;
4347
		
4348
		IDocumentMarkAccess* const pMarkAccess =
4349
                                                rDoc.getIDocumentMarkAccess();
4350
		if ( pMarkAccess )
4351
		{
4352
	              IDocumentMarkAccess::const_iterator_t ppBkmk =
4353
	                                    pMarkAccess->findBookmark( C2U("_PictureBullets") );
4354
			//for(IDocumentMarkAccess::const_iterator_t ppBookmark = ppBkmk->begin();
4355
	              //  	ppBookmark != ppBkmk->end(); ppBookmark++)
4356
	              if ( ppBkmk != pMarkAccess->getBookmarksEnd() &&
4357
	                         IDocumentMarkAccess::GetType( *(ppBkmk->get()) )
4358
	                            == IDocumentMarkAccess::BOOKMARK )               
4359
	            	{			
4360
			 	SwTxtNode* pTxtNode = ppBkmk->get()->GetMarkStart().nNode.GetNode().GetTxtNode();
4361
	                     if ( pTxtNode )                        
4362
				{
4363
					const SwpHints *pHints = pTxtNode->GetpSwpHints();
4364
					for(int nHintPos = 0; pHints && nHintPos < pHints->Count(); ++nHintPos)
4365
					{
4366
						const SwTxtAttr *pHt = (*pHints)[nHintPos];
4367
						xub_StrLen st = *(pHt->GetStart());
4368
						if(pHt && pHt->Which() == RES_TXTATR_FLYCNT && (st >= ppBkmk->get()->GetMarkStart().nContent.GetIndex()))
4369
						{
4370
							SwFrmFmt *pFrmFmt = pHt->GetFlyCnt().GetFrmFmt();
4371
							const SwNodeIndex *pNdIdx = pFrmFmt->GetCntnt().GetCntntIdx();
4372
							const SwNodes &nos = pNdIdx->GetNodes();
4373
							const SwGrfNode *pGrf = dynamic_cast<const SwGrfNode*>(nos[pNdIdx->GetIndex() + 1]);
4374
							if (pGrf)
4375
							{
4376
								vecBulletGrf.push_back(pGrf);
4377
								vecFrmFmt.push_back(pFrmFmt);
4378
							}
4379
						}
4380
					}
4381
					// update graphic bullet information
4382
					int nCount = pLstManager->GetWW8LSTInfoNum();
4383
					for (int i = 0; i < nCount; ++i)
4384
					{
4385
						SwNumRule* pRule = pLstManager->GetNumRule(i);
4386
						for (int j = 0; j < MAXLEVEL; ++j)
4387
						{
4388
							SwNumFmt aNumFmt(pRule->Get(j));						
4389
							sal_Int16 nType = aNumFmt.GetNumberingType();
4390
							sal_uInt16 nGrfBulletCP = aNumFmt.GetGrfBulletCP();
4391
							if (nType == SVX_NUM_BITMAP && vecBulletGrf.size() > nGrfBulletCP)
4392
							{
4393
								Graphic aGraphic = vecBulletGrf[nGrfBulletCP]->GetGrf();
4394
								SvxBrushItem aBrush(aGraphic, GPOS_AREA, SID_ATTR_BRUSH);
4395
								Font aFont = numfunc::GetDefBulletFont();
4396
								int nHeight = aFont.GetHeight() * 12;//20;
4397
								Size aPrefSize( aGraphic.GetPrefSize());							
4398
								if (aPrefSize.Height() * aPrefSize.Width() != 0 )							
4399
								{
4400
									int nWidth = (nHeight * aPrefSize.Width()) / aPrefSize.Height();
4401
									Size aSize(nWidth, nHeight);
4402
									aNumFmt.SetGraphicBrush(&aBrush, &aSize);
4403
								}
4404
								else
4405
								{
4406
									aNumFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL);
4407
									aNumFmt.SetBulletChar(0x2190);
4408
								}
4409
								pRule->Set( j, aNumFmt );
4410
							}
4411
						}
4412
					}
4413
					// Remove additional pictures
4414
					for (sal_uInt16 i = 0; i < vecFrmFmt.size(); ++i)
4415
					{
4416
						rDoc.DelLayoutFmt(vecFrmFmt[i]);
4417
					}
4418
				}
4419
			}
4420
			DELETEZ( pLstManager );
4421
		}
4422
	}
4423
	//End
4424
	
4334
    UpdateFields();
4425
    UpdateFields();
4335
4426
4336
    // delete the pam before the call for hide all redlines (Bug 73683)
4427
    // delete the pam before the call for hide all redlines (Bug 73683)
(-)sw/source/filter/ww8/ww8par.hxx (+4 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
	//Start for i120928,import graphic bullet,2012.9.25
190
	SwNumRule* GetNumRule(int i);	
191
	int GetWW8LSTInfoNum() const{return maLSTInfos.size();}
192
	//End
189
private:
193
private:
190
    wwSprmParser maSprmParser;
194
    wwSprmParser maSprmParser;
191
    SwWW8ImplReader& rReader;
195
    SwWW8ImplReader& rReader;
(-)sw/source/filter/ww8/ww8par3.cxx (-1 / +49 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
    //Start for i120928,import graphic bullet,2012.9.25
534
    sal_Unicode     cGrfBulletCP(USHRT_MAX);    // default
535
    //End
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
	//Start for i120928,import graphic bullet,2012.9.25
680
	sal_uInt16 nWitchPicIsBullet = USHRT_MAX;
681
	bool bIsPicBullet = false;
682
	//End
683
	
676
    if( aLVL.nLenGrpprlChpx )
684
    if( aLVL.nLenGrpprlChpx )
677
    {
685
    {
678
        sal_uInt8 aGrpprlChpx[ 255 ];
686
        sal_uInt8 aGrpprlChpx[ 255 ];
679
        memset(&aGrpprlChpx, 0, sizeof( aGrpprlChpx ));
687
        memset(&aGrpprlChpx, 0, sizeof( aGrpprlChpx ));
680
        if(aLVL.nLenGrpprlChpx != rSt.Read(&aGrpprlChpx, aLVL.nLenGrpprlChpx))
688
        if(aLVL.nLenGrpprlChpx != rSt.Read(&aGrpprlChpx, aLVL.nLenGrpprlChpx))
681
            return false;
689
            return false;
690
		
691
	//Start for i120928,import graphic bullet,2012.9.25
692
	sal_uInt8 *pSprmWhichPis = GrpprlHasSprm(0x6887,aGrpprlChpx[0],aLVL.nLenGrpprlChpx);
693
	sal_uInt8 *pSprmIsPicBullet = GrpprlHasSprm(0x4888,aGrpprlChpx[0],aLVL.nLenGrpprlChpx);	
694
	if (pSprmWhichPis)
695
	{
696
		nWitchPicIsBullet = *pSprmWhichPis;
697
	}
698
	if (pSprmIsPicBullet)
699
	{
700
		bIsPicBullet = (*pSprmIsPicBullet) & 0x0001;
701
	}
702
	//End
703
	
682
        // neues ItemSet fuer die Zeichenattribute anlegen
704
        // neues ItemSet fuer die Zeichenattribute anlegen
683
        rpItemSet = new SfxItemSet( rDoc.GetAttrPool(), RES_CHRATR_BEGIN,
705
        rpItemSet = new SfxItemSet( rDoc.GetAttrPool(), RES_CHRATR_BEGIN,
684
            RES_CHRATR_END - 1 );
706
            RES_CHRATR_END - 1 );
Lines 747-752 Link Here
747
        case 23:
769
        case 23:
748
        case 25:    //#114412#
770
        case 25:    //#114412#
749
            eType = SVX_NUM_CHAR_SPECIAL;
771
            eType = SVX_NUM_CHAR_SPECIAL;
772
			//Start for i120928,import graphic bullet,2012.9.25
773
			if (bIsPicBullet)
774
			{
775
				eType = SVX_NUM_BITMAP;
776
			}
777
			//End
750
            break;
778
            break;
751
        case 255:
779
        case 255:
752
            eType = SVX_NUM_NUMBER_NONE;
780
            eType = SVX_NUM_NUMBER_NONE;
Lines 821-826 Link Here
821
        if (!cBullet)  // unsave control code?
849
        if (!cBullet)  // unsave control code?
822
            cBullet = 0x2190;
850
            cBullet = 0x2190;
823
    }
851
    }
852
	//Start for i120928,import graphic bullet,2012.9.25
853
	else if (SVX_NUM_BITMAP == eType)	
854
	{
855
		cGrfBulletCP = nWitchPicIsBullet;       // This is a bullet picture ID	
856
	}
857
	//End
824
    else
858
    else
825
    {
859
    {
826
        /*
860
        /*
Lines 891-896 Link Here
891
        // Don't forget: unten, nach dem Bauen eventueller Styles auch noch
925
        // Don't forget: unten, nach dem Bauen eventueller Styles auch noch
892
        // SetBulletFont() rufen !!!
926
        // SetBulletFont() rufen !!!
893
    }
927
    }
928
	//Start for i120928,import graphic bullet,2012.9.25
929
	else if (SVX_NUM_BITMAP == eType)	
930
	{
931
		rNumFmt.SetGrfBulletCP(cGrfBulletCP);
932
	}
933
	//End
894
    else
934
    else
895
    {
935
    {
896
        // reminder: Garnix ist default Prefix
936
        // reminder: Garnix ist default Prefix
Lines 1087-1093 Link Here
1087
    pMyNumRule->SetContinusNum(bSimple);
1127
    pMyNumRule->SetContinusNum(bSimple);
1088
    return pMyNumRule;
1128
    return pMyNumRule;
1089
}
1129
}
1090
1130
//Start for i120928,import graphic bullet,2012.9.25
1131
SwNumRule* WW8ListManager::GetNumRule(int i)
1132
{
1133
	if ( i >= 0 && i < maLSTInfos.size() )
1134
		return maLSTInfos[i]->pNumRule;
1135
	else
1136
		return 0;
1137
}
1138
//End
1091
// oeffentliche Methoden /////////////////////////////////////////////////////
1139
// oeffentliche Methoden /////////////////////////////////////////////////////
1092
//
1140
//
1093
WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_)
1141
WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_)
(-)sw/source/ui/wrtsh/wrtsh1.cxx (-3 / +4 lines)
Lines 303-311 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
	//Start for i120928,avoid to split node,2012.9.25
307
		SwFEShell::SplitNode();
307
	//if ( IsEndPara() && !IsSttPara() )
308
308
	//	SwFEShell::SplitNode();
309
	//End
309
	EnterSelFrmMode();
310
	EnterSelFrmMode();
310
311
311
	sal_Bool bSetGrfSize = sal_True;
312
	sal_Bool bSetGrfSize = sal_True;

Return to issue 120928