Author: chengjh Date: Wed Nov 28 01:33:42 2012 New Revision: 1414498 URL: http://svn.apache.org/viewvc?rev=1414498&view=rev Log: Fix issue #i120928: Import Graphic Bullets of MS Word Binary Document into AOO Writer Correctly
* sw/inc/numrule.hxx * sw/source/core/doc/number.cxx * sw/source/filter/ww8/attributeoutputbase.hxx * sw/source/filter/ww8/escher.hxx * sw/source/filter/ww8/rtfattributeoutput.cxx * sw/source/filter/ww8/rtfattributeoutput.hxx * sw/source/filter/ww8/rtfexport.hxx * sw/source/filter/ww8/rtfexport.cxx * sw/source/filter/ww8/writerhelper.cxx * sw/source/filter/ww8/writerhelper.hxx * sw/source/filter/ww8/wrtw8esh.cxx * sw/source/filter/ww8/wrtw8nds.cxx * sw/source/filter/ww8/wrtw8num.cxx * sw/source/filter/ww8/wrtww8.cxx * sw/source/filter/ww8/wrtww8.hxx * sw/source/filter/ww8/wrtww8gr.cxx * sw/source/filter/ww8/ww8attributeoutput.hxx * sw/source/filter/ww8/ww8par.cxx * sw/source/filter/ww8/ww8par.hxx * sw/source/filter/ww8/ww8par3.cxx * sw/source/ui/wrtsh/wrtsh1.cxx Graphic Bullets Fidelity Patch by: chengjh,<chen...@apache.org> Found by: chengjh,<chen...@apache.org> Review by: Fan Zheng,<zheng.easy...@gmail.com> Modified: openoffice/trunk/main/sw/inc/numrule.hxx openoffice/trunk/main/sw/source/core/doc/number.cxx openoffice/trunk/main/sw/source/filter/ww8/attributeoutputbase.hxx openoffice/trunk/main/sw/source/filter/ww8/escher.hxx openoffice/trunk/main/sw/source/filter/ww8/rtfattributeoutput.cxx openoffice/trunk/main/sw/source/filter/ww8/rtfattributeoutput.hxx openoffice/trunk/main/sw/source/filter/ww8/rtfexport.cxx openoffice/trunk/main/sw/source/filter/ww8/rtfexport.hxx openoffice/trunk/main/sw/source/filter/ww8/writerhelper.cxx openoffice/trunk/main/sw/source/filter/ww8/writerhelper.hxx openoffice/trunk/main/sw/source/filter/ww8/wrtw8esh.cxx openoffice/trunk/main/sw/source/filter/ww8/wrtw8nds.cxx openoffice/trunk/main/sw/source/filter/ww8/wrtw8num.cxx openoffice/trunk/main/sw/source/filter/ww8/wrtww8.cxx openoffice/trunk/main/sw/source/filter/ww8/wrtww8.hxx openoffice/trunk/main/sw/source/filter/ww8/wrtww8gr.cxx openoffice/trunk/main/sw/source/filter/ww8/ww8attributeoutput.hxx openoffice/trunk/main/sw/source/filter/ww8/ww8par.cxx openoffice/trunk/main/sw/source/filter/ww8/ww8par.hxx openoffice/trunk/main/sw/source/filter/ww8/ww8par3.cxx openoffice/trunk/main/sw/source/ui/wrtsh/wrtsh1.cxx Modified: openoffice/trunk/main/sw/inc/numrule.hxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/inc/numrule.hxx?rev=1414498&r1=1414497&r2=1414498&view=diff ============================================================================== --- openoffice/trunk/main/sw/inc/numrule.hxx (original) +++ openoffice/trunk/main/sw/inc/numrule.hxx Wed Nov 28 01:33:42 2012 @@ -55,7 +55,8 @@ const sal_Unicode cBulletChar = 0x2022; class SW_DLLPUBLIC SwNumFmt : public SvxNumberFormat, public SwClient { SwFmtVertOrient* pVertOrient; - + //For i120928,record the cp info of graphic within bullet + sal_Unicode cGrfBulletCP; SW_DLLPRIVATE void UpdateNumNodes( SwDoc* pDoc ); SW_DLLPRIVATE virtual void NotifyGraphicArrived(); @@ -79,6 +80,9 @@ public: SwCharFmt* GetCharFmt() const { return (SwCharFmt*)GetRegisteredIn(); } void SetCharFmt( SwCharFmt* ); + //For i120928,access the cp info of graphic within bullet + void SetGrfBulletCP(sal_Unicode cP){cGrfBulletCP = cP;} + sal_Unicode GetGrfBulletCP()const {return cGrfBulletCP;} void ForgetCharFmt(); virtual void SetCharFmtName(const String& rSet); Modified: openoffice/trunk/main/sw/source/core/doc/number.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/doc/number.cxx?rev=1414498&r1=1414497&r2=1414498&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/core/doc/number.cxx (original) +++ openoffice/trunk/main/sw/source/core/doc/number.cxx Wed Nov 28 01:33:42 2012 @@ -198,6 +198,7 @@ SwNumFmt::SwNumFmt() : SvxNumberFormat(SVX_NUM_ARABIC), SwClient( 0 ), pVertOrient(new SwFmtVertOrient( 0, text::VertOrientation::NONE)) + ,cGrfBulletCP(USHRT_MAX)//For i120928,record the cp info of graphic within bullet { } /* -----------------------------22.02.01 13:42-------------------------------- @@ -206,7 +207,8 @@ SwNumFmt::SwNumFmt() : SwNumFmt::SwNumFmt( const SwNumFmt& rFmt) : SvxNumberFormat(rFmt), SwClient( rFmt.GetRegisteredInNonConst() ), - pVertOrient(new SwFmtVertOrient( 0, rFmt.GetVertOrient())) + pVertOrient(new SwFmtVertOrient( 0, rFmt.GetVertOrient())) + ,cGrfBulletCP(rFmt.cGrfBulletCP)//For i120928,record the cp info of graphic within bullet { sal_Int16 eMyVertOrient = rFmt.GetVertOrient(); SetGraphicBrush( rFmt.GetBrush(), &rFmt.GetGraphicSize(), @@ -322,6 +324,8 @@ SwNumFmt& SwNumFmt::operator=( const SwN rNumFmt.GetRegisteredInNonConst()->Add( this ); else if( GetRegisteredIn() ) GetRegisteredInNonConst()->Remove( this ); + //For i120928,record the cp info of graphic within bullet + cGrfBulletCP = rNumFmt.cGrfBulletCP; return *this; } /* -----------------------------23.02.01 09:28-------------------------------- Modified: openoffice/trunk/main/sw/source/filter/ww8/attributeoutputbase.hxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/attributeoutputbase.hxx?rev=1414498&r1=1414497&r2=1414498&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/filter/ww8/attributeoutputbase.hxx (original) +++ openoffice/trunk/main/sw/source/filter/ww8/attributeoutputbase.hxx Wed Nov 28 01:33:42 2012 @@ -320,7 +320,8 @@ public: sal_Int16 nIndentAt, sal_Int16 nFirstLineIndex, sal_Int16 nListTabPos, - const String &rNumberingString ) = 0; + const String &rNumberingString , + const SvxBrushItem* pBrush = 0) = 0;//For i120928,to export graphic of bullet protected: Modified: openoffice/trunk/main/sw/source/filter/ww8/escher.hxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/escher.hxx?rev=1414498&r1=1414497&r2=1414498&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/filter/ww8/escher.hxx (original) +++ openoffice/trunk/main/sw/source/filter/ww8/escher.hxx Wed Nov 28 01:33:42 2012 @@ -127,6 +127,8 @@ protected: public: SwBasicEscherEx(SvStream* pStrm, WW8Export& rWrt); sal_Int32 WriteGrfFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId); + //For i120928,to export graphic of bullet + sal_Int32 WriteGrfBullet(const Graphic&); sal_Int32 WriteOLEFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId); void WriteEmptyFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId); virtual void WriteFrmExtraData(const SwFrmFmt&); Modified: openoffice/trunk/main/sw/source/filter/ww8/rtfattributeoutput.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/rtfattributeoutput.cxx?rev=1414498&r1=1414497&r2=1414498&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/filter/ww8/rtfattributeoutput.cxx (original) +++ openoffice/trunk/main/sw/source/filter/ww8/rtfattributeoutput.cxx Wed Nov 28 01:33:42 2012 @@ -1285,7 +1285,8 @@ void RtfAttributeOutput::NumberingLevel( sal_Int16 nIndentAt, sal_Int16 nFirstLineIndex, sal_Int16 /*nListTabPos*/, - const String &rNumberingString ) + const String &rNumberingString, + const SvxBrushItem* pBrush) { OSL_TRACE("%s", OSL_THIS_FUNC); Modified: openoffice/trunk/main/sw/source/filter/ww8/rtfattributeoutput.hxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/rtfattributeoutput.hxx?rev=1414498&r1=1414497&r2=1414498&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/filter/ww8/rtfattributeoutput.hxx (original) +++ openoffice/trunk/main/sw/source/filter/ww8/rtfattributeoutput.hxx Wed Nov 28 01:33:42 2012 @@ -220,7 +220,8 @@ public: sal_Int16 nIndentAt, sal_Int16 nFirstLineIndex, sal_Int16 nListTabPos, - const String &rNumberingString ); + const String &rNumberingString, + const SvxBrushItem* pBrush = 0);//For i120928,to export graphic of bullet void WriteField_Impl( const SwField* pFld, ww::eField eType, const String& rFldCmd, sal_uInt8 nMode ); void WriteBookmarks_Impl( std::vector< rtl::OUString >& rStarts, std::vector< rtl::OUString >& rEnds ); Modified: openoffice/trunk/main/sw/source/filter/ww8/rtfexport.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/rtfexport.cxx?rev=1414498&r1=1414497&r2=1414498&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/filter/ww8/rtfexport.cxx (original) +++ openoffice/trunk/main/sw/source/filter/ww8/rtfexport.cxx Wed Nov 28 01:33:42 2012 @@ -193,6 +193,12 @@ void RtfExport::AppendBookmark( const OU m_pAttrOutput->WriteBookmarks_Impl(aStarts, aEnds); } +//For i120928,to export graphic of bullet for RTF filter +void RtfExport::ExportGrfBullet(const SwTxtNode& rNd) +{ + //This is for RTF filter on the graphic bullets +} + void RtfExport::WriteChar( sal_Unicode ) { OSL_TRACE("%s", OSL_THIS_FUNC); Modified: openoffice/trunk/main/sw/source/filter/ww8/rtfexport.hxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/rtfexport.hxx?rev=1414498&r1=1414497&r2=1414498&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/filter/ww8/rtfexport.hxx (original) +++ openoffice/trunk/main/sw/source/filter/ww8/rtfexport.hxx Wed Nov 28 01:33:42 2012 @@ -86,6 +86,9 @@ public: virtual void AppendBookmark( const rtl::OUString& rName, bool bSkip = false ); + //For i120928,add an interface to export graphic of bullet + virtual void ExportGrfBullet(const SwTxtNode& rNd); + virtual void WriteCR( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner = ww8::WW8TableNodeInfoInner::Pointer_t()*/ ) { /* no-op for rtf, most probably should not even be in MSWordExportBase */ } virtual void WriteChar( sal_Unicode ); Modified: openoffice/trunk/main/sw/source/filter/ww8/writerhelper.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/writerhelper.cxx?rev=1414498&r1=1414497&r2=1414498&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/filter/ww8/writerhelper.cxx (original) +++ openoffice/trunk/main/sw/source/filter/ww8/writerhelper.cxx Wed Nov 28 01:33:42 2012 @@ -58,7 +58,9 @@ # include <unotools/streamwrap.hxx> #endif #include <numrule.hxx> - +#ifndef _SV_SVAPP_HXX +#include <vcl/svapp.hxx>//For i120928 +#endif #ifdef DEBUGDUMP # include <vcl/svapp.hxx> # ifndef _TOOLS_URLOBJ_HXX @@ -180,6 +182,32 @@ namespace namespace sw { + //For i120928,size conversion before exporting graphic of bullet + Frame::Frame(const Graphic&rGrf, const SwPosition &rPos) + :mpFlyFrm(NULL), + maPos(rPos), + maSize(), + maLayoutSize(), + mpStartFrameContent(0), + mbIsInline(true), + meWriterType(eBulletGrf), + maGrf(rGrf), + mbForBullet(true) + { + const MapMode aMap100mm( MAP_100TH_MM ); + Size aSize( rGrf.GetPrefSize() ); + if ( MAP_PIXEL == rGrf.GetPrefMapMode().GetMapUnit() ) + { + aSize = Application::GetDefaultDevice()->PixelToLogic(aSize, aMap100mm ); + } + else + { + aSize = OutputDevice::LogicToLogic( aSize,rGrf.GetPrefMapMode(), aMap100mm ); + } + maSize = aSize; + maLayoutSize = maSize; + } + Frame::Frame(const SwFrmFmt &rFmt, const SwPosition &rPos) : mpFlyFrm(&rFmt), maPos(rPos), @@ -192,6 +220,9 @@ namespace sw // --> OD 2007-04-19 #i43447# - move to initialization list mbIsInline( (rFmt.GetAnchor().GetAnchorId() == FLY_AS_CHAR) ) // <-- + //For i120928,handle graphic of bullet within existing implementation + ,maGrf() + ,mbForBullet(false) { switch (rFmt.Which()) { Modified: openoffice/trunk/main/sw/source/filter/ww8/writerhelper.hxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/writerhelper.hxx?rev=1414498&r1=1414497&r2=1414498&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/filter/ww8/writerhelper.hxx (original) +++ openoffice/trunk/main/sw/source/filter/ww8/writerhelper.hxx Wed Nov 28 01:33:42 2012 @@ -107,7 +107,7 @@ namespace sw class Frame { public: - enum WriterSource {eTxtBox, eGraphic, eOle, eDrawing, eFormControl}; + enum WriterSource {eTxtBox, eGraphic, eOle, eDrawing, eFormControl,eBulletGrf};//For i120928,add Grf Bul Type private: const SwFrmFmt* mpFlyFrm; SwPosition maPos; @@ -121,9 +121,12 @@ namespace sw WriterSource meWriterType; const SwNode *mpStartFrameContent; bool mbIsInline; + bool mbForBullet:1; + Graphic maGrf; public: Frame(const SwFrmFmt &rFlyFrm, const SwPosition &rPos); - + Frame(const Graphic&, const SwPosition &); + //End /** Get the writer SwFrmFmt that this object describes @return @@ -177,6 +180,8 @@ namespace sw the first node of content in the frame, might not be any at all. */ const SwNode *GetContent() const { return mpStartFrameContent; } + const Graphic &GetGraphic() const { return maGrf; } + bool HasGraphic() const { return mbForBullet; } /** Does this sw::Frame refer to the same writer content as another @@ -186,7 +191,12 @@ namespace sw */ bool RefersToSameFrameAs(const Frame &rOther) const { - return (mpFlyFrm == rOther.mpFlyFrm); + if (mbForBullet && rOther.mbForBullet) + return (maGrf == rOther.maGrf); + else if ((!mbForBullet) && (!rOther.mbForBullet)) + return (mpFlyFrm == rOther.mpFlyFrm); + else + return false; } /** The Size of the contained element Modified: openoffice/trunk/main/sw/source/filter/ww8/wrtw8esh.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/wrtw8esh.cxx?rev=1414498&r1=1414497&r2=1414498&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/filter/ww8/wrtw8esh.cxx (original) +++ openoffice/trunk/main/sw/source/filter/ww8/wrtw8esh.cxx Wed Nov 28 01:33:42 2012 @@ -1351,6 +1351,57 @@ sal_uInt32 AddMirrorFlags(sal_uInt32 nFl } return nFlags; } +//For i120928,this function is added to export graphic of bullet +sal_Int32 SwBasicEscherEx::WriteGrfBullet(const Graphic& rGrf) +{ + OpenContainer( ESCHER_SpContainer ); + AddShape(ESCHER_ShpInst_PictureFrame, 0xa00,0x401); + EscherPropertyContainer aPropOpt; + GraphicObject aGraphicObject( rGrf ); + ByteString aUniqueId = aGraphicObject.GetUniqueID(); + if ( aUniqueId.Len() ) + { + const MapMode aMap100mm( MAP_100TH_MM ); + Size aSize( rGrf.GetPrefSize() ); + if ( MAP_PIXEL == rGrf.GetPrefMapMode().GetMapUnit() ) + { + aSize = Application::GetDefaultDevice()->PixelToLogic(aSize, aMap100mm ); + } + else + { + aSize = OutputDevice::LogicToLogic( aSize,rGrf.GetPrefMapMode(), aMap100mm ); + } + Point aEmptyPoint = Point(); + Rectangle aRect( aEmptyPoint, aSize ); + sal_uInt32 nBlibId = mxGlobal->GetBlibID( *(mxGlobal->QueryPictureStream()), aUniqueId,aRect, NULL, 0 ); + if (nBlibId) + aPropOpt.AddOpt(ESCHER_Prop_pib, nBlibId, sal_True); + } + aPropOpt.AddOpt( ESCHER_Prop_pibFlags, ESCHER_BlipFlagDefault ); + aPropOpt.AddOpt( ESCHER_Prop_dyTextTop, DrawModelToEmu(0)); + aPropOpt.AddOpt( ESCHER_Prop_dyTextBottom, DrawModelToEmu(0)); + aPropOpt.AddOpt( ESCHER_Prop_dxTextLeft, DrawModelToEmu(0)); + aPropOpt.AddOpt( ESCHER_Prop_dxTextRight, DrawModelToEmu(0)); + aPropOpt.AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x80000 ); + aPropOpt.AddOpt( ESCHER_Prop_dyTextTop, 0 ); + aPropOpt.AddOpt( ESCHER_Prop_dyTextBottom, 0 ); + aPropOpt.AddOpt( ESCHER_Prop_dxTextLeft, 0 ); + aPropOpt.AddOpt( ESCHER_Prop_dxTextRight, 0 ); + const Color aTmpColor( COL_WHITE ); + SvxBrushItem aBrush( aTmpColor, RES_BACKGROUND ); + const SvxBrushItem *pRet = rWrt.GetCurrentPageBgBrush(); + if (pRet && (pRet->GetGraphic() ||( pRet->GetColor() != COL_TRANSPARENT))) + aBrush = *pRet; + WriteBrushAttr(aBrush, aPropOpt); + + aPropOpt.AddOpt( ESCHER_Prop_pictureActive, 0 ); + aPropOpt.Commit( GetStream() ); + AddAtom(4, ESCHER_ClientAnchor); + GetStream() << (sal_uInt32)0x80000000; + CloseContainer(); + + return 0; +} sal_Int32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId) { Modified: openoffice/trunk/main/sw/source/filter/ww8/wrtw8nds.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/wrtw8nds.cxx?rev=1414498&r1=1414497&r2=1414498&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/filter/ww8/wrtw8nds.cxx (original) +++ openoffice/trunk/main/sw/source/filter/ww8/wrtw8nds.cxx Wed Nov 28 01:33:42 2012 @@ -1782,6 +1782,16 @@ void MSWordExportBase::OutputTextNode( c ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo( mpTableInfo->getTableNodeInfo( &rNode ) ); + //For i120928,identify the last node + bool bLastCR = false; + bool bExported = false; + { + SwNodeIndex aNextIdx(rNode,1); + SwNodeIndex aLastIdx(rNode.GetNodes().GetEndOfContent()); + if (aNextIdx == aLastIdx) + bLastCR = true; + } + AttrOutput().StartParagraph( pTextNodeInfo ); bool bFlyInTable = mpParentFrame && IsInTable(); @@ -1957,6 +1967,13 @@ void MSWordExportBase::OutputTextNode( c m_aCurrentCharPropStarts.pop(); AttrOutput().EndTOX( *pTOXSect ,false); } + //For i120928,the position of the bullet's graphic is at end of doc + if (bLastCR && (!bExported)) + { + ExportGrfBullet(rNode); + bExported = true; + } + WriteCR( pTextNodeInfoInner ); } } @@ -1994,6 +2011,12 @@ void MSWordExportBase::OutputTextNode( c // insert final bookmarks if any before CR and after flys AppendBookmarks( rNode, nEnd, 1 ); WriteCR( pTextNodeInfoInner ); + //For i120928,the position of the bullet's graphic is at end of doc + if (bLastCR && (!bExported)) + { + ExportGrfBullet(rNode); + bExported = true; + } if ( pTOXSect ) { Modified: openoffice/trunk/main/sw/source/filter/ww8/wrtw8num.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/wrtw8num.cxx?rev=1414498&r1=1414497&r2=1414498&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/filter/ww8/wrtw8num.cxx (original) +++ openoffice/trunk/main/sw/source/filter/ww8/wrtw8num.cxx Wed Nov 28 01:33:42 2012 @@ -214,7 +214,8 @@ void WW8AttributeOutput::NumberingLevel( sal_Int16 nIndentAt, sal_Int16 nFirstLineIndex, sal_Int16 nListTabPos, - const String &rNumberingString + const String &rNumberingString, + const SvxBrushItem* pBrush //For i120928,to transfer graphic of bullet ) { // Start value @@ -272,6 +273,18 @@ void WW8AttributeOutput::NumberingLevel( } m_rWW8Export.OutputItemSet( *pOutSet, false, true, i18n::ScriptType::LATIN, m_rWW8Export.mbExportModeRTF ); + //For i120928,achieve graphic's index of bullet from the bullet bookmark + if (SVX_NUM_BITMAP == nNumberingType && pBrush) + { + int nIndex = m_rWW8Export.GetGrfIndex(*pBrush); + if ( nIndex != -1 ) + { + m_rWW8Export.InsUInt16(0x6887); + m_rWW8Export.InsUInt32(nIndex); + m_rWW8Export.InsUInt16(0x4888); + m_rWW8Export.InsUInt16(1); + } + } m_rWW8Export.pO = pOldpO; } @@ -506,8 +519,9 @@ void MSWordExportBase::AbstractNumbering nFollow, pPseudoFont, pOutSet, nIndentAt, nFirstLineIndex, nListTabPos, - sNumStr ); - + sNumStr, + rFmt.GetNumberingType()==SVX_NUM_BITMAP ? rFmt.GetBrush():0);//Start for i120928,export graphic bullet,2012.9.25 + delete pPseudoFont; } AttrOutput().EndAbstractNumbering(); Modified: openoffice/trunk/main/sw/source/filter/ww8/wrtww8.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/wrtww8.cxx?rev=1414498&r1=1414497&r2=1414498&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/filter/ww8/wrtww8.cxx (original) +++ openoffice/trunk/main/sw/source/filter/ww8/wrtww8.cxx Wed Nov 28 01:33:42 2012 @@ -122,7 +122,9 @@ #include "WW8Sttbf.hxx" #include <editeng/charrotateitem.hxx> #include "WW8FibData.hxx" - +#ifndef _NUMRULE_HXX +#include "numrule.hxx"//For i120928 +#endif using namespace sw::util; using namespace sw::types; @@ -1424,6 +1426,125 @@ void WW8Export::AppendBookmark( const rt pBkmks->Append( nSttCP, rName ); } +//For i120928,collect all the graphics of bullets applied to paragraphs +int WW8Export::CollectGrfsOfBullets() const +{ + m_vecBulletPic.clear(); + + if ( pDoc ) + { + int nCountRule = pDoc->GetNumRuleTbl().Count(); + for (int n = 0; n < nCountRule; ++n) + { + const SwNumRule &rRule = *(pDoc->GetNumRuleTbl().GetObject(n)); + sal_uInt16 nLevels = rRule.IsContinusNum() ? 1 : 9; + for (sal_uInt16 nLvl = 0; nLvl < nLevels; ++nLvl) + { + const SwNumFmt &rFmt = rRule.Get(nLvl); + if (SVX_NUM_BITMAP != rFmt.GetNumberingType()) + { + continue; + } + const Graphic *pGrf = rFmt.GetBrush()? rFmt.GetBrush()->GetGraphic():0; + if ( pGrf ) + { + bool bHas = false; + for (int i = 0; i < m_vecBulletPic.size(); ++i) + { + if (m_vecBulletPic[i]->GetChecksum() == pGrf->GetChecksum()) + { + bHas = true; + break; + } + } + if (!bHas) + { + m_vecBulletPic.push_back(pGrf); + } + } + } + } + } + + return m_vecBulletPic.size(); +} +//Export Graphic of Bullets +void WW8Export::ExportGrfBullet(const SwTxtNode& rNd) +{ + int nCount = CollectGrfsOfBullets(); + if (nCount > 0) + { + SwPosition aPos(rNd); + String aPicBullets = String::CreateFromAscii("_PictureBullets"); + AppendBookmark(aPicBullets); + for (int i = 0; i < nCount; i++) + { + sw::Frame aFrame(*(m_vecBulletPic[i]), aPos); + OutGrfBullets(aFrame); + } + AppendBookmark(aPicBullets); + } +} + +static sal_uInt8 nAttrMagicIdx = 0; +void WW8Export::OutGrfBullets(const sw::Frame & rFrame) +{ + if ( !pGrf || !pChpPlc || !pO ) + return; + + pGrf->Insert(rFrame); + pChpPlc->AppendFkpEntry( Strm().Tell(), pO->Count(), pO->GetData() ); + pO->Remove( 0, pO->Count() ); + //if links... + WriteChar( (char)1 ); + + sal_uInt8 aArr[ 22 ]; + sal_uInt8* pArr = aArr; + + // sprmCFSpec + if( bWrtWW8 ) + Set_UInt16( pArr, 0x855 ); + else + Set_UInt8( pArr, 117 ); + Set_UInt8( pArr, 1 ); + + Set_UInt16( pArr, 0x083c ); + Set_UInt8( pArr, 0x81 ); + + // sprmCPicLocation + if( bWrtWW8 ) + Set_UInt16( pArr, 0x6a03 ); + else + { + Set_UInt8( pArr, 68 ); + Set_UInt8( pArr, 4 ); + } + Set_UInt32( pArr, GRF_MAGIC_321 ); + + //extern nAttrMagicIdx; + --pArr; + Set_UInt8( pArr, nAttrMagicIdx++ ); + pChpPlc->AppendFkpEntry( Strm().Tell(), static_cast< short >(pArr - aArr), aArr ); +} +//Achieve the index position +int WW8Export::GetGrfIndex(const SvxBrushItem& rBrush) +{ + int nIndex = -1; + if ( rBrush.GetGraphic() ) + { + for (int i = 0; i < m_vecBulletPic.size(); ++i) + { + if (m_vecBulletPic[i]->GetChecksum() == rBrush.GetGraphic()->GetChecksum()) + { + nIndex = i; + break; + } + } + } + + return nIndex; +} + void MSWordExportBase::AppendWordBookmark( const String& rName ) { AppendBookmark( BookmarkToWord( rName ) ); Modified: openoffice/trunk/main/sw/source/filter/ww8/wrtww8.hxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/wrtww8.hxx?rev=1414498&r1=1414497&r2=1414498&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/filter/ww8/wrtww8.hxx (original) +++ openoffice/trunk/main/sw/source/filter/ww8/wrtww8.hxx Wed Nov 28 01:33:42 2012 @@ -48,6 +48,9 @@ #include "../inc/msfilter.hxx" #include <expfld.hxx> +#include <vcl/graph.hxx> +class SvxBrushItem; + // einige Forward Deklarationen namespace msfilter { @@ -650,7 +653,9 @@ public: virtual void AppendBookmarks( const SwTxtNode& rNd, xub_StrLen nAktPos, xub_StrLen nLen ) = 0; virtual void AppendBookmark( const rtl::OUString& rName, bool bSkip = false ) = 0; - + //For i120928,add this interface to export graphic of bullet + virtual void ExportGrfBullet(const SwTxtNode& rNd) = 0; + // FIXME probably a hack... virtual void WriteCR( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner = ww8::WW8TableNodeInfoInner::Pointer_t() ) = 0; @@ -922,6 +927,9 @@ public: sal_uInt8 bWrtWW8 : 1; ///< Write WW95 (false) or WW97 (true) file format + //For i120928,this vector is to record all the graphics of bullets + mutable std::vector<const Graphic*> m_vecBulletPic; + protected: SwWW8Writer *m_pWriter; ///< Pointer to the writer WW8AttributeOutput *m_pAttrOutput; ///< Converting attributes to stream data @@ -1024,6 +1032,12 @@ public: virtual void AppendBookmarks( const SwTxtNode& rNd, xub_StrLen nAktPos, xub_StrLen nLen ); virtual void AppendBookmark( const rtl::OUString& rName, bool bSkip = false ); + + virtual void ExportGrfBullet(const SwTxtNode& rNd); + int CollectGrfsOfBullets() const; + void OutGrfBullets(const sw::Frame &rFrame); + int GetGrfIndex(const SvxBrushItem& rBrush); + void MoveFieldMarks(sal_uLong nFrom, sal_uLong nTo); void WriteAsStringTable(const ::std::vector<String>&, sal_Int32& rfcSttbf, @@ -1360,6 +1374,9 @@ private: void WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rNd, const sw::Frame &rFly, sal_uInt16 nWidth, sal_uInt16 nHeight); + void WritePICBulletFHeader(SvStream& rStrm, const Graphic &rGrf, sal_uInt16 mm, sal_uInt16 nWidth, sal_uInt16 nHeight); + void WriteGrfForBullet(SvStream& rStrm, const Graphic &rGrf, sal_uInt16 nWidth, sal_uInt16 nHeight); + //No copying SwWW8WrGrf(const SwWW8WrGrf&); SwWW8WrGrf& operator=(const SwWW8WrGrf&); Modified: openoffice/trunk/main/sw/source/filter/ww8/wrtww8gr.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/wrtww8gr.cxx?rev=1414498&r1=1414497&r2=1414498&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/filter/ww8/wrtww8gr.cxx (original) +++ openoffice/trunk/main/sw/source/filter/ww8/wrtww8gr.cxx Wed Nov 28 01:33:42 2012 @@ -764,6 +764,135 @@ void SwWW8WrGrf::WriteGrfFromGrfNode(SvS } } } +//For i120928,export graphic info of bullet +void SwWW8WrGrf::WritePICBulletFHeader(SvStream& rStrm, const Graphic &rGrf, + sal_uInt16 mm, sal_uInt16 nWidth, sal_uInt16 nHeight) +{ + sal_Int16 nXSizeAdd = 0, nYSizeAdd = 0; + sal_Int16 nCropL = 0, nCropR = 0, nCropT = 0, nCropB = 0; + + Size aGrTwipSz(rGrf.GetPrefSize()); + bool bWrtWW8 = rWrt.bWrtWW8; + sal_uInt16 nHdrLen = bWrtWW8 ? 0x44 : 0x3A; + + sal_uInt8 aArr[ 0x44 ] = { 0 }; + + sal_uInt8* pArr = aArr + 0x2E; //Do borders first + + sal_uInt8 aLnArr[4] = { BOX_LINE_TOP, BOX_LINE_LEFT, + BOX_LINE_BOTTOM, BOX_LINE_RIGHT }; + for( sal_uInt8 i = 0; i < 4; ++i ) + { + WW8_BRC aBrc; + + short nSpacing; + short nThick = aBrc.DetermineBorderProperties(!bWrtWW8, + &nSpacing); + switch (aLnArr[ i ]) + { + case BOX_LINE_TOP: + case BOX_LINE_BOTTOM: + nHeight -= nThick; + nHeight = nHeight - nSpacing; + break; + case BOX_LINE_LEFT: + case BOX_LINE_RIGHT: + default: + nWidth -= nThick; + nWidth = nWidth - nSpacing; + break; + } + memcpy( pArr, &aBrc.aBits1, 2); + pArr+=2; + + if( bWrtWW8 ) + { + memcpy( pArr, &aBrc.aBits2, 2); + pArr+=2; + } + } + + pArr = aArr + 4; //skip lcb + Set_UInt16( pArr, nHdrLen ); // set cbHeader + + Set_UInt16( pArr, mm ); // set mm + + if ( (aGrTwipSz.Width() * 254L / 144 > USHRT_MAX) || (aGrTwipSz.Height() * 254L / 144 > USHRT_MAX) + || (aGrTwipSz.Width() < 0 ) || (aGrTwipSz.Height() < 0) ) + { + aGrTwipSz.Width() = nWidth; + aGrTwipSz.Height() = nHeight; + } + using namespace sw::types; + // set xExt & yExt + Set_UInt16(pArr, msword_cast<sal_uInt16>(aGrTwipSz.Width() * 254L / 144)); + Set_UInt16(pArr, msword_cast<sal_uInt16>(aGrTwipSz.Height() * 254L / 144)); + pArr += 16; + // skip hMF & rcWinMF + // set dxaGoal & dyaGoal + Set_UInt16(pArr, msword_cast<sal_uInt16>(aGrTwipSz.Width())); + Set_UInt16(pArr, msword_cast<sal_uInt16>(aGrTwipSz.Height())); + + if( aGrTwipSz.Width() + nXSizeAdd ) // set mx + { + double fVal = nWidth * 1000.0 / (aGrTwipSz.Width() + nXSizeAdd); + Set_UInt16( pArr, (sal_uInt16)::rtl::math::round(fVal) ); + } + else + pArr += 2; + + if( aGrTwipSz.Height() + nYSizeAdd ) // set my + { + double fVal = nHeight * 1000.0 / (aGrTwipSz.Height() + nYSizeAdd); + Set_UInt16( pArr, (sal_uInt16)::rtl::math::round(fVal) ); + } + else + pArr += 2; + + Set_UInt16( pArr, nCropL ); // set dxaCropLeft + Set_UInt16( pArr, nCropT ); // set dyaCropTop + Set_UInt16( pArr, nCropR ); // set dxaCropRight + Set_UInt16( pArr, nCropB ); // set dyaCropBottom + + rStrm.Write( aArr, nHdrLen ); +} +void SwWW8WrGrf::WriteGrfForBullet(SvStream& rStrm, const Graphic &rGrf, sal_uInt16 nWidth, sal_uInt16 nHeight) +{ + if (rWrt.bWrtWW8) + { + WritePICBulletFHeader(rStrm,rGrf, 0x64,nWidth,nHeight); + SwBasicEscherEx aInlineEscher(&rStrm, rWrt); + aInlineEscher.WriteGrfBullet(rGrf); + aInlineEscher.WritePictures(); + } + else + { + bool bSwapped = rGrf.IsSwapOut() ? true : false; + + GDIMetaFile aMeta; + switch (rGrf.GetType()) + { + case GRAPHIC_BITMAP: // Bitmap -> in Metafile abspielen + { + VirtualDevice aVirt; + aMeta.Record(&aVirt); + aVirt.DrawBitmap( Point( 0,0 ), rGrf.GetBitmap() ); + aMeta.Stop(); + aMeta.WindStart(); + aMeta.SetPrefMapMode( rGrf.GetPrefMapMode()); + aMeta.SetPrefSize( rGrf.GetPrefSize()); + } + break; + case GRAPHIC_GDIMETAFILE : // GDI ( =SV ) Metafile + aMeta = rGrf.GetGDIMetaFile(); + break; + default: + return; + } + WritePICBulletFHeader(rStrm, rGrf, 8, nWidth, nHeight); + WriteWindowMetafileBits(rStrm, aMeta); + } +} void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem) { @@ -783,6 +912,17 @@ void SwWW8WrGrf::WriteGraphicNode(SvStre WriteGrfFromGrfNode(rStrm, *pNd, rItem.maFly, nWidth, nHeight); } break; + //For i120928,add branch to export graphic of bullet + case sw::Frame::eBulletGrf: + { + if (rItem.maFly.HasGraphic()) + { + const Graphic& rGrf = rItem.maFly.GetGraphic(); + WriteGrfForBullet(rStrm, rGrf, nWidth, nHeight); + } + } + break; + case sw::Frame::eOle: { #ifdef OLE_PREVIEW_AS_EMF Modified: openoffice/trunk/main/sw/source/filter/ww8/ww8attributeoutput.hxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/ww8attributeoutput.hxx?rev=1414498&r1=1414497&r2=1414498&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/filter/ww8/ww8attributeoutput.hxx (original) +++ openoffice/trunk/main/sw/source/filter/ww8/ww8attributeoutput.hxx Wed Nov 28 01:33:42 2012 @@ -208,7 +208,8 @@ public: sal_Int16 nIndentAt, sal_Int16 nFirstLineIndex, sal_Int16 nListTabPos, - const String &rNumberingString ); + const String &rNumberingString, + const SvxBrushItem* pBrush = 0); //For i120928,transfer graphic of bullet protected: /// Output frames - the implementation. Modified: openoffice/trunk/main/sw/source/filter/ww8/ww8par.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/ww8par.cxx?rev=1414498&r1=1414497&r2=1414498&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/filter/ww8/ww8par.cxx (original) +++ openoffice/trunk/main/sw/source/filter/ww8/ww8par.cxx Wed Nov 28 01:33:42 2012 @@ -116,6 +116,12 @@ #include "writerhelper.hxx" #include "writerwordglue.hxx" +#include "ndgrf.hxx" +#include <editeng/brshitem.hxx> +#include <editeng/editids.hrc> +#include <txtflcnt.hxx> +#include <fmtflcnt.hxx> +#include <txatbase.hxx> #include "ww8par2.hxx" // class WW8RStyle, class WW8AnchorPara @@ -4365,7 +4371,8 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8G GrafikDtor(); DELETEZ( pMSDffManager ); DELETEZ( pHdFt ); - DELETEZ( pLstManager ); + //For i120928,delay the destruct action + //DELETEZ( pLstManager ); DELETEZ( pSBase ); delete pWDop; DELETEZ( pFonts ); @@ -4382,7 +4389,87 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8G delete mpRedlineStack; DeleteAnchorStk(); DeleteRefStks(); - + //For i120928,achieve the graphics from the special bookmark with is for graphic bullet + { + std::vector<const SwGrfNode*> vecBulletGrf; + std::vector<SwFrmFmt*> vecFrmFmt; + + IDocumentMarkAccess* const pMarkAccess = + rDoc.getIDocumentMarkAccess(); + if ( pMarkAccess ) + { + IDocumentMarkAccess::const_iterator_t ppBkmk = + pMarkAccess->findBookmark( C2U("_PictureBullets") ); + //for(IDocumentMarkAccess::const_iterator_t ppBookmark = ppBkmk->begin(); + // ppBookmark != ppBkmk->end(); ppBookmark++) + if ( ppBkmk != pMarkAccess->getBookmarksEnd() && + IDocumentMarkAccess::GetType( *(ppBkmk->get()) ) + == IDocumentMarkAccess::BOOKMARK ) + { + SwTxtNode* pTxtNode = ppBkmk->get()->GetMarkStart().nNode.GetNode().GetTxtNode(); + if ( pTxtNode ) + { + const SwpHints *pHints = pTxtNode->GetpSwpHints(); + for(int nHintPos = 0; pHints && nHintPos < pHints->Count(); ++nHintPos) + { + const SwTxtAttr *pHt = (*pHints)[nHintPos]; + xub_StrLen st = *(pHt->GetStart()); + if(pHt && pHt->Which() == RES_TXTATR_FLYCNT && (st >= ppBkmk->get()->GetMarkStart().nContent.GetIndex())) + { + SwFrmFmt *pFrmFmt = pHt->GetFlyCnt().GetFrmFmt(); + const SwNodeIndex *pNdIdx = pFrmFmt->GetCntnt().GetCntntIdx(); + const SwNodes &nos = pNdIdx->GetNodes(); + const SwGrfNode *pGrf = dynamic_cast<const SwGrfNode*>(nos[pNdIdx->GetIndex() + 1]); + if (pGrf) + { + vecBulletGrf.push_back(pGrf); + vecFrmFmt.push_back(pFrmFmt); + } + } + } + // update graphic bullet information + int nCount = pLstManager->GetWW8LSTInfoNum(); + for (int i = 0; i < nCount; ++i) + { + SwNumRule* pRule = pLstManager->GetNumRule(i); + for (int j = 0; j < MAXLEVEL; ++j) + { + SwNumFmt aNumFmt(pRule->Get(j)); + sal_Int16 nType = aNumFmt.GetNumberingType(); + sal_uInt16 nGrfBulletCP = aNumFmt.GetGrfBulletCP(); + if (nType == SVX_NUM_BITMAP && vecBulletGrf.size() > nGrfBulletCP) + { + Graphic aGraphic = vecBulletGrf[nGrfBulletCP]->GetGrf(); + SvxBrushItem aBrush(aGraphic, GPOS_AREA, SID_ATTR_BRUSH); + Font aFont = numfunc::GetDefBulletFont(); + int nHeight = aFont.GetHeight() * 12;//20; + Size aPrefSize( aGraphic.GetPrefSize()); + if (aPrefSize.Height() * aPrefSize.Width() != 0 ) + { + int nWidth = (nHeight * aPrefSize.Width()) / aPrefSize.Height(); + Size aSize(nWidth, nHeight); + aNumFmt.SetGraphicBrush(&aBrush, &aSize); + } + else + { + aNumFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL); + aNumFmt.SetBulletChar(0x2190); + } + pRule->Set( j, aNumFmt ); + } + } + } + // Remove additional pictures + for (sal_uInt16 i = 0; i < vecFrmFmt.size(); ++i) + { + rDoc.DelLayoutFmt(vecFrmFmt[i]); + } + } + } + DELETEZ( pLstManager ); + } + } + UpdateFields(); // delete the pam before the call for hide all redlines (Bug 73683) Modified: openoffice/trunk/main/sw/source/filter/ww8/ww8par.hxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/ww8par.hxx?rev=1414498&r1=1414497&r2=1414498&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/filter/ww8/ww8par.hxx (original) +++ openoffice/trunk/main/sw/source/filter/ww8/ww8par.hxx Wed Nov 28 01:33:42 2012 @@ -186,6 +186,8 @@ public: std::vector<sal_uInt8> &rParaSprms, SwTxtNode *pNode=0); SwNumRule* CreateNextRule(bool bSimple); ~WW8ListManager(); + SwNumRule* GetNumRule(int i); + int GetWW8LSTInfoNum() const{return maLSTInfos.size();} private: wwSprmParser maSprmParser; SwWW8ImplReader& rReader; Modified: openoffice/trunk/main/sw/source/filter/ww8/ww8par3.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/filter/ww8/ww8par3.cxx?rev=1414498&r1=1414497&r2=1414498&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/filter/ww8/ww8par3.cxx (original) +++ openoffice/trunk/main/sw/source/filter/ww8/ww8par3.cxx Wed Nov 28 01:33:42 2012 @@ -530,6 +530,9 @@ bool WW8ListManager::ReadLVL(SwNumFmt& r SvxExtNumType eType; // Writer-Num-Typ SvxAdjust eAdj; // Ausrichtung (Links/rechts/zent.) sal_Unicode cBullet(0x2190); // default safe bullet + + sal_Unicode cGrfBulletCP(USHRT_MAX); + String sPrefix; String sPostfix; WW8LVL aLVL; @@ -673,12 +676,28 @@ bool WW8ListManager::ReadLVL(SwNumFmt& r // // 3. ggfs. CHPx einlesen und // + sal_uInt16 nWitchPicIsBullet = USHRT_MAX; + bool bIsPicBullet = false; + if( aLVL.nLenGrpprlChpx ) { sal_uInt8 aGrpprlChpx[ 255 ]; memset(&aGrpprlChpx, 0, sizeof( aGrpprlChpx )); if(aLVL.nLenGrpprlChpx != rSt.Read(&aGrpprlChpx, aLVL.nLenGrpprlChpx)) return false; + + //For i120928,parse the graphic info of bullets + sal_uInt8 *pSprmWhichPis = GrpprlHasSprm(0x6887,aGrpprlChpx[0],aLVL.nLenGrpprlChpx); + sal_uInt8 *pSprmIsPicBullet = GrpprlHasSprm(0x4888,aGrpprlChpx[0],aLVL.nLenGrpprlChpx); + if (pSprmWhichPis) + { + nWitchPicIsBullet = *pSprmWhichPis; + } + if (pSprmIsPicBullet) + { + bIsPicBullet = (*pSprmIsPicBullet) & 0x0001; + } + // neues ItemSet fuer die Zeichenattribute anlegen rpItemSet = new SfxItemSet( rDoc.GetAttrPool(), RES_CHRATR_BEGIN, RES_CHRATR_END - 1 ); @@ -747,6 +766,12 @@ bool WW8ListManager::ReadLVL(SwNumFmt& r case 23: case 25: //#114412# eType = SVX_NUM_CHAR_SPECIAL; + //For i120928,type info + if (bIsPicBullet) + { + eType = SVX_NUM_BITMAP; + } + break; case 255: eType = SVX_NUM_NUMBER_NONE; @@ -820,8 +845,10 @@ bool WW8ListManager::ReadLVL(SwNumFmt& r if (!cBullet) // unsave control code? cBullet = 0x2190; - } - else + } else if (SVX_NUM_BITMAP == eType) //For i120928,position index info of graphic + { + cGrfBulletCP = nWitchPicIsBullet; // This is a bullet picture ID + } else { /* #83154#, #82192#, #i173#, #109158# @@ -891,6 +918,11 @@ bool WW8ListManager::ReadLVL(SwNumFmt& r // Don't forget: unten, nach dem Bauen eventueller Styles auch noch // SetBulletFont() rufen !!! } + //For i120928,position index info + else if (SVX_NUM_BITMAP == eType) + { + rNumFmt.SetGrfBulletCP(cGrfBulletCP); + } else { // reminder: Garnix ist default Prefix @@ -1088,6 +1120,14 @@ SwNumRule* WW8ListManager::CreateNextRul return pMyNumRule; } +SwNumRule* WW8ListManager::GetNumRule(int i) +{ + if ( i >= 0 && i < maLSTInfos.size() ) + return maLSTInfos[i]->pNumRule; + else + return 0; +} + // oeffentliche Methoden ///////////////////////////////////////////////////// // WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_) Modified: openoffice/trunk/main/sw/source/ui/wrtsh/wrtsh1.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/ui/wrtsh/wrtsh1.cxx?rev=1414498&r1=1414497&r2=1414498&view=diff ============================================================================== --- openoffice/trunk/main/sw/source/ui/wrtsh/wrtsh1.cxx (original) +++ openoffice/trunk/main/sw/source/ui/wrtsh/wrtsh1.cxx Wed Nov 28 01:33:42 2012 @@ -303,8 +303,9 @@ void SwWrtShell::Insert( const String &r DelRight(); // eingefuegte Grafik in eigenen Absatz, falls am Ende // eines nichtleeren Absatzes - if ( IsEndPara() && !IsSttPara() ) - SwFEShell::SplitNode(); + //For i120928,avoid to split node + //if ( IsEndPara() && !IsSttPara() ) + // SwFEShell::SplitNode(); EnterSelFrmMode();