You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by or...@apache.org on 2012/08/20 13:46:47 UTC
svn commit: r1374979 [28/29] - in /incubator/ooo/branches/writer001: ./
ext_libraries/apr-util/ ext_libraries/apr-util/prj/ ext_libraries/apr/
ext_libraries/coinmp/ ext_libraries/hunspell/ ext_libraries/serf/
ext_libraries/serf/prj/ ext_sources/ extras...
Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/rtfattributeoutput.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/rtfattributeoutput.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/rtfattributeoutput.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/rtfattributeoutput.cxx Mon Aug 20 11:46:19 2012
@@ -2933,9 +2933,20 @@ void RtfAttributeOutput::FormatFrameDire
}
}
-void RtfAttributeOutput::WriteExpand( const SwField* /*pFld*/ )
+void RtfAttributeOutput::WriteExpand( const SwField* pFld )
{
- OSL_TRACE("TODO: %s", OSL_THIS_FUNC);
+ String sStr; // fuer optionale Parameter
+ switch (pFld->GetTyp()->Which())
+ {
+ //#119803# Export user field and DB field for RTF filter
+ case RES_DBFLD:
+ sStr = FieldString(ww::eMERGEFIELD);
+ // kein break !!
+ case RES_USERFLD:
+ sStr += pFld->GetTyp()->GetName();
+ m_rExport.OutputField(pFld, ww::eNONE, sStr);
+ break;
+ }
}
void RtfAttributeOutput::RefField( const SwField& /*rFld*/, const String& /*rRef*/ )
Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/writerhelper.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/writerhelper.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/writerhelper.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/writerhelper.cxx Mon Aug 20 11:46:19 2012
@@ -140,17 +140,24 @@ namespace
sw::Frames SwPosFlyFrmsToFrames(const SwPosFlyFrms &rFlys)
{
sw::Frames aRet;
- sal_uInt16 nEnd = rFlys.Count();
- for (sal_uInt16 nI = 0; nI < nEnd; ++nI)
+
+ for(SwPosFlyFrms::const_iterator aIter(rFlys.begin()); aIter != rFlys.end(); aIter++)
{
- const SwFrmFmt &rEntry = rFlys[nI]->GetFmt();
+ const SwFrmFmt &rEntry = (*aIter)->GetFmt();
+
if (const SwPosition* pAnchor = rEntry.GetAnchor().GetCntntAnchor())
+ {
aRet.push_back(sw::Frame(rEntry, *pAnchor));
+ }
else
{
- SwPosition aPos(rFlys[nI]->GetNdIndex());
+ SwPosition aPos((*aIter)->GetNdIndex());
+
if (SwTxtNode* pTxtNd = aPos.nNode.GetNode().GetTxtNode())
+ {
aPos.nContent.Assign(pTxtNd, 0);
+ }
+
aRet.push_back(sw::Frame(rEntry, aPos));
}
}
@@ -567,11 +574,8 @@ namespace sw
*/
Frames GetFrames(const SwDoc &rDoc, SwPaM *pPaM /*, bool bAll*/)
{
- SwPosFlyFrms aFlys;
- rDoc.GetAllFlyFmts(aFlys, pPaM, true);
+ SwPosFlyFrms aFlys(rDoc.GetAllFlyFmts(pPaM, true));
sw::Frames aRet(SwPosFlyFrmsToFrames(aFlys));
- for (sal_uInt16 i = aFlys.Count(); i > 0;)
- delete aFlys[--i];
return aRet;
}
Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/writerwordglue.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/writerwordglue.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/writerwordglue.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/writerwordglue.cxx Mon Aug 20 11:46:19 2012
@@ -875,8 +875,9 @@ namespace sw
}
else if (nChar == '/')
{
- // MM We have to escape '/' in case it's used as a char
- rParams.Replace(nI, 1, CREATE_CONST_ASC("\\/"));
+ if(!(IsPreviousAM(rParams, nI) && IsNextPM(rParams, nI)))
+ // MM We have to escape '/' in case it's used as a char
+ rParams.Replace(nI, 1, CREATE_CONST_ASC("\\/"));
// rParams.Insert( nI, '\\' );
nI++;
nLen++;
@@ -1015,6 +1016,34 @@ namespace sw
return nKey;
}
+ sal_Bool IsPreviousAM(String& rParams, xub_StrLen nPos){
+ xub_StrLen nPos1 = nPos - 1;
+ xub_StrLen nPos2 = nPos - 2;
+
+ if(nPos1 > nPos || nPos2 > nPos){
+ return sal_False;
+ }else{
+ return (
+ (rParams.GetChar(nPos1) == 'M'||rParams.GetChar(nPos1) == 'm')&&
+ (rParams.GetChar(nPos2) == 'A'||rParams.GetChar(nPos2) == 'a')
+ );
+ }
+ }
+ sal_Bool IsNextPM(String& rParams, xub_StrLen nPos){
+ xub_StrLen nPos1 = nPos + 1;
+ xub_StrLen nPos2 = nPos + 2;
+
+
+ if(nPos1 >= rParams.Len() - 1 || nPos2 > rParams.Len() - 1){
+ return sal_False;
+ }else{
+ return (
+ (rParams.GetChar(nPos1) == 'P'||rParams.GetChar(nPos1) == 'p')&&
+ (rParams.GetChar(nPos2) == 'M'||rParams.GetChar(nPos2) == 'm')
+ );
+ }
+
+ }
bool IsNotAM(String& rParams, xub_StrLen nPos)
{
return (
Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/wrtw8esh.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/wrtw8esh.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/wrtw8esh.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/wrtw8esh.cxx Mon Aug 20 11:46:19 2012
@@ -102,6 +102,7 @@
#include <ndtxt.hxx>
// <--
#include "WW8FFData.hxx"
+#include <editeng/shaditem.hxx>
using namespace com::sun::star;
using namespace sw::util;
@@ -734,6 +735,16 @@ void WW8_WrPlcTxtBoxes::Append( const Sd
void* p = (void*)&rObj;
aCntnt.Insert( p, aCntnt.Count() );
aShapeIds.Insert( nShapeId, aShapeIds.Count() );
+ //save NULL, if we have an actual SdrObject
+ aSpareFmts.Insert( (void*)NULL, aSpareFmts.Count() );
+}
+
+void WW8_WrPlcTxtBoxes::Append( const SwFrmFmt* pFmt, sal_uInt32 nShapeId )
+{
+ //no sdr object, we insert a NULL in the aCntnt and save the real fmt in aSpareFmts.
+ aCntnt.Insert( (void*)NULL, aCntnt.Count() );
+ aShapeIds.Insert( nShapeId, aShapeIds.Count() );
+ aSpareFmts.Insert( (void*)pFmt, aSpareFmts.Count() );
}
const SvULongs* WW8_WrPlcTxtBoxes::GetShapeIdArr() const
@@ -1716,7 +1727,61 @@ sal_Int32 SwBasicEscherEx::WriteFlyFrame
rPropOpt.AddOpt( ESCHER_Prop_dxTextLeft, 0 );
rPropOpt.AddOpt( ESCHER_Prop_dxTextRight, 0 );
}
+ const SwAttrSet& rAttrSet = rFmt.GetAttrSet();
+ if (SFX_ITEM_ON == rAttrSet.GetItemState(RES_BOX, false, &pItem))
+ {
+ const SvxBoxItem* pBox = (const SvxBoxItem*)pItem;
+ if( pBox )
+ {
+ const SfxPoolItem* pShadItem;
+ if (SFX_ITEM_ON
+ == rAttrSet.GetItemState(RES_SHADOW, true, &pShadItem))
+ {
+ const SvxShadowItem* pSI = (const SvxShadowItem*)pShadItem;
+
+ const sal_uInt16 nCstScale = 635; // unit scale between SODC and MS Word
+ const sal_uInt32 nShadowType = 131074; // shadow type of ms word. need to set the default value.
+
+ sal_uInt32 nColor = (sal_uInt32)(pSI->GetColor().GetColor()) ;
+ sal_uInt32 nOffX = pSI->GetWidth() * nCstScale;
+ sal_uInt32 nOffY = pSI->GetWidth() * nCstScale;
+ sal_uInt32 nShadow = nShadowType;
+
+ SvxShadowLocation eLocation = pSI->GetLocation();
+ if( (eLocation!=SVX_SHADOW_NONE) && (pSI->GetWidth()!=0) )
+ {
+ switch( eLocation )
+ {
+ case SVX_SHADOW_TOPLEFT:
+ {
+ nOffX = -nOffX;
+ nOffY = -nOffY;
+ }
+ break;
+ case SVX_SHADOW_TOPRIGHT:
+ {
+ nOffY = -nOffY;
+ }
+ break;
+ case SVX_SHADOW_BOTTOMLEFT:
+ {
+ nOffX = -nOffX;
+ }
+ break;
+ case SVX_SHADOW_BOTTOMRIGHT:
+ break;
+ default:
+ break;
+ }
+ rPropOpt.AddOpt( DFF_Prop_shadowColor, wwUtility::RGBToBGR((nColor)));
+ rPropOpt.AddOpt( DFF_Prop_shadowOffsetX, nOffX );
+ rPropOpt.AddOpt( DFF_Prop_shadowOffsetY, nOffY );
+ rPropOpt.AddOpt( DFF_Prop_fshadowObscured, nShadow );
+ }
+ }
+ }
+ }
SvxBrushItem aBrush(rWrt.TrueFrameBgBrush(rFmt));
WriteBrushAttr(aBrush, rPropOpt);
@@ -1995,7 +2060,16 @@ SwEscherEx::SwEscherEx(SvStream* pStrm,
{
const SvxBrushItem* pBrush = (const SvxBrushItem*)pItem;
WriteBrushAttr(*pBrush, aPropOpt);
- }
+
+ SvxGraphicPosition ePos = pBrush->GetGraphicPos();
+ if( ePos != GPOS_NONE && ePos != GPOS_AREA )
+ {
+ /* #i56806# 0x033F parameter specifies a 32-bit field of shape boolean properties.
+ 0x10001 means fBackground and fUsefBackground flag are true thus background
+ picture will be shown as "tiled" fill.*/
+ aPropOpt.AddOpt( ESCHER_Prop_fBackground, 0x10001 );
+ }
+ }
aPropOpt.AddOpt( ESCHER_Prop_lineColor, 0x8000001 );
aPropOpt.AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x00080008 );
aPropOpt.AddOpt( ESCHER_Prop_shadowColor, 0x8000002 );
@@ -2147,6 +2221,12 @@ bool WinwordAnchoring::ConvertPosition(
{
eHoriConv = CONV2PG;
}
+ else if ( _iorHoriOri.IsPosToggle()
+ && _iorHoriOri.GetHoriOrient() == text::HoriOrientation::RIGHT )
+ {
+ eHoriConv = NO_CONV;
+ _iorHoriOri.SetHoriOrient( text::HoriOrientation::OUTSIDE );
+ }
else
{
switch ( _iorHoriOri.GetRelationOrient() )
@@ -2560,6 +2640,24 @@ sal_Int32 SwEscherEx::WriteFlyFrm(const
nBorderThick = WriteTxtFlyFrame(rObj, rShapeId, nTxtId, rPVec);
}
+
+ //In browse mode the sdr object doesn't always exist. For example, the
+ //object is in the hidden header/footer. We save the fmt directly
+ //in such cases; we copy most of the logic from the block above
+ const bool bBrowseMode = (rFmt.getIDocumentSettingAccess())->get(IDocumentSettingAccess::BROWSE_MODE);
+ if( bBrowseMode && rFmt.GetDoc())
+ {
+ if( !rFmt.GetChain().GetPrev() )//obj in header/footer?
+ {
+ rShapeId = GetFlyShapeId(rFmt, rObj.mnHdFtIndex, rPVec);
+ pTxtBxs->Append( &rFmt, rShapeId );
+ sal_uInt32 nTxtId = pTxtBxs->Count();
+
+ nTxtId *= 0x10000;
+ nBorderThick = WriteTxtFlyFrame(rObj, rShapeId, nTxtId, rPVec);
+ }
+ }
+
}
}
return nBorderThick;
Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/wrtw8sty.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/wrtw8sty.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/wrtw8sty.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/wrtw8sty.cxx Mon Aug 20 11:46:19 2012
@@ -1994,6 +1994,8 @@ bool WW8_WrPlcSubDoc::WriteGenericTxt( W
aCps.Insert( nCP, i );
pTxtPos->Append( nCP );
+ if( aCntnt[ i ] != NULL )
+ {
// is it an writer or sdr - textbox?
const SdrObject& rObj = *(SdrObject*)aCntnt[ i ];
if (rObj.GetObjInventor() == FmFormInventor)
@@ -2042,7 +2044,17 @@ bool WW8_WrPlcSubDoc::WriteGenericTxt( W
}
// <--
}
-
+ }
+ else if( i < aSpareFmts.Count() )
+ {
+ if( const SwFrmFmt* pFmt = (const SwFrmFmt*)aSpareFmts[ i ] )
+ {
+ const SwNodeIndex* pNdIdx = pFmt->GetCntnt().GetCntntIdx();
+ rWrt.WriteSpecialText( pNdIdx->GetIndex() + 1,
+ pNdIdx->GetNode().EndOfSectionIndex(), nTTyp );
+ }
+ }
+
// CR at end of one textbox text ( otherwise WW gpft :-( )
rWrt.WriteStringAsPara( aEmptyStr );
}
@@ -2177,7 +2189,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( W
// is it an writer or sdr - textbox?
const SdrObject* pObj = (SdrObject*)aCntnt[ i ];
sal_Int32 nCnt = 1;
- if ( !pObj->ISA( SdrTextObj ) )
+ if (pObj && !pObj->ISA( SdrTextObj ) )
{
// find the "highest" SdrObject of this
const SwFrmFmt& rFmt = *::FindFrmFmt( pObj );
@@ -2191,6 +2203,22 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( W
pChn = &pChn->GetNext()->GetChain();
}
}
+ if( NULL == pObj )
+ {
+ if( i < aSpareFmts.Count() && aSpareFmts[ i ] )
+ {
+ const SwFrmFmt& rFmt = *(const SwFrmFmt*)aSpareFmts[ i ];
+
+ const SwFmtChain* pChn = &rFmt.GetChain();
+ while( pChn->GetNext() )
+ {
+ // has a chain?
+ // then calc the cur pos in the chain
+ ++nCnt;
+ pChn = &pChn->GetNext()->GetChain();
+ }
+ }
+ }
// long cTxbx / iNextReuse
SwWW8Writer::WriteLong( *rWrt.pTableStrm, nCnt );
// long cReusable
Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/wrtww8.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/wrtww8.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/wrtww8.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/wrtww8.cxx Mon Aug 20 11:46:19 2012
@@ -117,6 +117,7 @@
#include <osl/time.h>
#include <rtl/random.h>
#include "WW8Sttbf.hxx"
+#include <editeng/charrotateitem.hxx>
#include "WW8FibData.hxx"
using namespace sw::util;
@@ -1930,7 +1931,7 @@ void WW8AttributeOutput::TableInfoRow( w
}
}
-static sal_uInt16 lcl_TCFlags(const SwTableBox * pBox, long nRowSpan)
+static sal_uInt16 lcl_TCFlags(SwDoc &rDoc, const SwTableBox * pBox, long nRowSpan)
{
sal_uInt16 nFlags = 0;
@@ -1953,6 +1954,31 @@ static sal_uInt16 lcl_TCFlags(const SwTa
default:
break;
}
+ const SwStartNode * pSttNd = pBox->GetSttNd();
+ if(pSttNd)
+ {
+ SwNodeIndex aIdx( *pSttNd );
+ const SwCntntNode * pCNd = pSttNd->GetNodes().GoNext( &aIdx );
+ if( pCNd && pCNd->IsTxtNode())
+ {
+ SfxItemSet aCoreSet(rDoc.GetAttrPool(), RES_CHRATR_ROTATE, RES_CHRATR_ROTATE);
+ ((SwTxtNode*)pCNd)->GetAttr( aCoreSet, 0, ((SwTxtNode*)pCNd)->GetTxt().Len());
+ const SvxCharRotateItem * pRotate = NULL;
+ const SfxPoolItem * pRotItem;
+ if ( SFX_ITEM_SET == aCoreSet.GetItemState(RES_CHRATR_ROTATE, sal_True, &pRotItem))
+ {
+ pRotate = (SvxCharRotateItem*)pRotItem;
+ if(pRotate && pRotate->GetValue() == 900)
+ {
+ nFlags = nFlags | 0x0004 | 0x0008;
+ }
+ else if(pRotate && pRotate->GetValue() == 2700 )
+ {
+ nFlags = nFlags | 0x0004 | 0x0010;
+ }
+ }
+ }
+ }
}
return nFlags;
@@ -2248,7 +2274,7 @@ void WW8AttributeOutput::TableDefinition
if ( m_rWW8Export.bWrtWW8 )
{
sal_uInt16 nFlags =
- lcl_TCFlags(pTabBox1, *aItRowSpans);
+ lcl_TCFlags(*m_rWW8Export.pDoc, pTabBox1, *aItRowSpans);
m_rWW8Export.InsUInt16( nFlags );
}
@@ -2537,20 +2563,39 @@ void MSWordExportBase::WriteText()
;
else if ( !IsInTable() ) //No sections in table
{
- ReplaceCr( (char)0xc ); // Indikator fuer Page/Section-Break
-
- const SwSectionFmt* pParentFmt = rSect.GetFmt()->GetParent();
- if ( !pParentFmt )
- pParentFmt = (SwSectionFmt*)0xFFFFFFFF;
-
- sal_uLong nRstLnNum;
- if ( aIdx.GetNode().IsCntntNode() )
- nRstLnNum = ((SwCntntNode&)aIdx.GetNode()).GetSwAttrSet().
- GetLineNumber().GetStartValue();
- else
- nRstLnNum = 0;
+ //#120140# Do not need to insert a page/section break after a section end. Check this case first
+ sal_Bool bNeedExportBreakHere = sal_True;
+ if ( aIdx.GetNode().IsTxtNode() )
+ {
+ SwTxtNode *pTempNext = aIdx.GetNode().GetTxtNode();
+ if ( pTempNext )
+ {
+ const SfxPoolItem * pTempItem = NULL;
+ if (pTempNext->GetpSwAttrSet() && SFX_ITEM_SET == pTempNext->GetpSwAttrSet()->GetItemState(RES_PAGEDESC, false, &pTempItem)
+ && pTempItem && ((SwFmtPageDesc*)pTempItem)->GetRegisteredIn())
+ {
+ //Next node has a new page style which means this node is a section end. Do not insert another page/section break here
+ bNeedExportBreakHere = sal_False;
+ }
+ }
+ }
+ if (bNeedExportBreakHere) //#120140# End of check
+ {
+ ReplaceCr( (char)0xc ); // Indikator fuer Page/Section-Break
+
+ const SwSectionFmt* pParentFmt = rSect.GetFmt()->GetParent();
+ if ( !pParentFmt )
+ pParentFmt = (SwSectionFmt*)0xFFFFFFFF;
+
+ sal_uLong nRstLnNum;
+ if ( aIdx.GetNode().IsCntntNode() )
+ nRstLnNum = ((SwCntntNode&)aIdx.GetNode()).GetSwAttrSet().
+ GetLineNumber().GetStartValue();
+ else
+ nRstLnNum = 0;
- AppendSection( pAktPageDesc, pParentFmt, nRstLnNum );
+ AppendSection( pAktPageDesc, pParentFmt, nRstLnNum );
+ }
}
}
else if ( pNd->IsStartNode() )
Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/wrtww8.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/wrtww8.hxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/wrtww8.hxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/wrtww8.hxx Mon Aug 20 11:46:19 2012
@@ -926,6 +926,9 @@ protected:
SwWW8Writer *m_pWriter; ///< Pointer to the writer
WW8AttributeOutput *m_pAttrOutput; ///< Converting attributes to stream data
+private:
+ SvStorageRef xEscherStg; /// memory leak #i120098#, to hold the reference to unnamed SotStorage obj
+
public:
/// Access to the attribute output class.
virtual AttributeOutputBase& AttrOutput() const;
@@ -1159,6 +1162,7 @@ protected:
SvULongs aCps; // PTRARR CP-Pos der Verweise
SvPtrarr aCntnt; // PTRARR von SwFmtFtn/PostIts/..
WW8_WrPlc0* pTxtPos; // Pos der einzelnen Texte
+ SvPtrarr aSpareFmts; //a backup for aCntnt: if there's no SdrObject, stores the fmt directly here
WW8_WrPlcSubDoc();
virtual ~WW8_WrPlcSubDoc();
@@ -1232,6 +1236,7 @@ public:
bool WriteTxt( WW8Export& rWrt );
void WritePlc( WW8Export& rWrt ) const;
void Append( const SdrObject& rObj, sal_uInt32 nShapeId );
+ void Append( const SwFrmFmt* pFmt, sal_uInt32 nShapeId );
sal_uInt16 Count() const { return aCntnt.Count(); }
sal_uInt16 GetPos( const VoidPtr& p ) const { return aCntnt.GetPos( p ); }
};
Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/wrtww8gr.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/wrtww8gr.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/wrtww8gr.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/wrtww8gr.cxx Mon Aug 20 11:46:19 2012
@@ -601,8 +601,9 @@ void SwWW8WrGrf::WritePICFHeader(SvStrea
substitute the final size and loose on retaining the scaling factor but
still keep the correct display size anyway.
*/
- if ( (aGrTwipSz.Width() > SHRT_MAX) || (aGrTwipSz.Height() > SHRT_MAX)
- || (aGrTwipSz.Width() < 0 ) || (aGrTwipSz.Height() < 0) )
+ const bool bIsSubstitutedSize = (aGrTwipSz.Width() > SHRT_MAX) || (aGrTwipSz.Height() > SHRT_MAX) ||
+ (aGrTwipSz.Width() < 0 ) || (aGrTwipSz.Height() < 0);
+ if ( bIsSubstitutedSize )
{
aGrTwipSz.Width() = nWidth;
aGrTwipSz.Height() = nHeight;
@@ -617,26 +618,51 @@ void SwWW8WrGrf::WritePICFHeader(SvStrea
Set_UInt16(pArr, msword_cast<sal_uInt16>(aGrTwipSz.Width()));
Set_UInt16(pArr, msword_cast<sal_uInt16>(aGrTwipSz.Height()));
- if( aGrTwipSz.Width() + nXSizeAdd ) // set mx
+ if ( aGrTwipSz.Width() + nXSizeAdd ) // set mx
{
- double fVal = nWidth * 1000.0 / (aGrTwipSz.Width() + nXSizeAdd);
- Set_UInt16( pArr, (sal_uInt16)::rtl::math::round(fVal) );
+ if ( !bIsSubstitutedSize )
+ {
+ const double fVal = nWidth * 1000.0 / (aGrTwipSz.Width() + nXSizeAdd );
+ Set_UInt16( pArr, (sal_uInt16)::rtl::math::round(fVal) );
+ }
+ else
+ {
+ Set_UInt16( pArr, 1000 );
+ }
}
else
+ {
pArr += 2;
+ }
- if( aGrTwipSz.Height() + nYSizeAdd ) // set my
+ if ( aGrTwipSz.Height() + nYSizeAdd ) // set my
{
- double fVal = nHeight * 1000.0 / (aGrTwipSz.Height() + nYSizeAdd);
- Set_UInt16( pArr, (sal_uInt16)::rtl::math::round(fVal) );
+ if ( !bIsSubstitutedSize )
+ {
+ const double fVal = nHeight * 1000.0 / (aGrTwipSz.Height() + nYSizeAdd);
+ Set_UInt16( pArr, (sal_uInt16)::rtl::math::round(fVal) );
+ }
+ else
+ {
+ Set_UInt16( pArr, 1000 );
+ }
}
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
+ if ( !bIsSubstitutedSize )
+ {
+ Set_UInt16( pArr, nCropL ); // set dxaCropLeft
+ Set_UInt16( pArr, nCropT ); // set dyaCropTop
+ Set_UInt16( pArr, nCropR ); // set dxaCropRight
+ Set_UInt16( pArr, nCropB ); // set dyaCropBottom
+ }
+ else
+ {
+ pArr += 8;
+ }
rStrm.Write( aArr, nHdrLen );
}
Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8atr.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8atr.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8atr.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8atr.cxx Mon Aug 20 11:46:19 2012
@@ -1310,6 +1310,16 @@ void WW8AttributeOutput::CharUnderline(
}
m_rWW8Export.pO->Insert( b, m_rWW8Export.pO->Count() );
+ Color aColor = rUnderline.GetColor();
+ if( aColor != COL_TRANSPARENT )
+ {
+ if( m_rWW8Export.bWrtWW8 )
+ {
+ m_rWW8Export.InsUInt16( 0x6877 );
+
+ m_rWW8Export.InsUInt32( wwUtility::RGBToBGR( aColor.GetColor() ) );
+ }
+ }
}
void WW8AttributeOutput::CharLanguage( const SvxLanguageItem& rLanguage )
@@ -3036,6 +3046,14 @@ void AttributeOutputBase::TextField( con
}
}
break;
+ case RES_MACROFLD:
+ sStr.ASSIGN_CONST_ASC(" MACROBUTTON");
+ sStr += pFld->GetPar1();
+ sStr.SearchAndReplaceAscii("StarOffice.Standard.Modul1.", String(' '));
+ sStr += String(' ');
+ sStr += lcl_GetExpandedField(*pFld);
+ GetExport().OutputField( pFld, ww::eMACROBUTTON, sStr );
+ break;
default:
bWriteExpand = true;
break;
@@ -3566,7 +3584,8 @@ sal_uLong WW8Export::ReplaceCr( sal_uInt
nUCode = 0x0;
}
//And the para is not of len 0, then replace this cr with the mark
- if( nChar == 0x0e || nUCode == 0x0d )
+ //#120140# If there is a cr before a column break, need replace the cr. So remove the "nChar==0x0e" check.
+ if( nUCode == 0x0d )
bReplaced = false;
else
{
Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8graf.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8graf.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8graf.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8graf.cxx Mon Aug 20 11:46:19 2012
@@ -263,7 +263,7 @@ static void SetFill( SfxItemSet& rSet, W
else
{
rSet.Put(XFillStyleItem(XFILL_SOLID)); // necessary for textbox
- if (nPat <= 1 || nPat > sizeof(nPatA))
+ if (nPat <= 1 || ((sizeof(nPatA)/sizeof(nPatA[0])) <= nPat))
{
// Solid Background or unknown
rSet.Put(XFillColorItem(aEmptyStr, WW8TransCol(rFill.dlpcBg)));
Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par.cxx Mon Aug 20 11:46:19 2012
@@ -76,6 +76,7 @@
#include <fmthdft.hxx>
#include <fmtcntnt.hxx>
#include <fmtcnct.hxx>
+#include <fmtanchr.hxx>
#include <fmtpdsc.hxx>
#include <ftninfo.hxx>
#include <fmtftn.hxx>
@@ -180,7 +181,7 @@ sal_uInt32 SwMSDffManager::GetFilterFlag
*
* cmc
*/
-// --> OD 2004-12-14 #i32596# - consider new parameter <_nCalledByGroup>
+// #i32596# - consider new parameter <_nCalledByGroup>
SdrObject* SwMSDffManager::ImportOLE( long nOLEId,
const Graphic& rGrf,
const Rectangle& rBoundRect,
@@ -188,14 +189,13 @@ SdrObject* SwMSDffManager::ImportOLE( lo
const int _nCalledByGroup,
sal_Int64 nAspect ) const
{
- // --> OD 2004-12-14 #i32596# - no import of OLE object, if it's inside a group.
+ // #i32596# - no import of OLE object, if it's inside a group.
// NOTE: This can be undone, if grouping of Writer fly frames is possible or
// if drawing OLE objects are allowed in Writer.
if ( _nCalledByGroup > 0 )
{
return 0L;
}
- // <--
SdrObject* pRet = 0;
String sStorageName;
@@ -296,11 +296,9 @@ SdrObject* SwMSDffManager::ProcessObj(Sv
pImpRec->pClientDataBuffer, pImpRec->nClientDataLen );
- // process user (== Winword) defined parameters in 0xF122 record
- // --> OD 2008-04-10 #i84783#
- // set special value to determine, if property is provided or not.
+ // process user (== Winword) defined parameters in 0xF122 record
+ // #i84783# - set special value to determine, if property is provided or not.
pImpRec->nLayoutInTableCell = 0xFFFFFFFF;
- // <--
if( maShapeRecords.SeekToContent( rSt,
DFF_msofbtUDefProp,
SEEK_FROM_CURRENT_AND_RESTART )
@@ -337,7 +335,7 @@ SdrObject* SwMSDffManager::ProcessObj(Sv
SfxItemSet aSet( pSdrModel->GetItemPool() );
//Originally anything that as a mso_sptTextBox was created as a
- //textbox, this was changed for #88277# to be created as a simple
+ //textbox, this was changed to be created as a simple
//rect to keep impress happy. For the rest of us we'd like to turn
//it back into a textbox again.
sal_Bool bIsSimpleDrawingTextBox = (pImpRec->eShapeType == mso_sptTextBox);
@@ -714,13 +712,11 @@ SdrObject* SwMSDffManager::ProcessObj(Sv
DFF_Prop_cropFromRight, 0 );
sal_uInt32 nLineFlags = GetPropertyValue( DFF_Prop_fNoLineDrawDash );
- // --> OD 2008-06-16 #156765#
if ( !IsHardAttribute( DFF_Prop_fLine ) &&
pImpRec->eShapeType == mso_sptPictureFrame )
{
nLineFlags &= ~0x08;
}
- // <--
pImpRec->eLineStyle = (nLineFlags & 8)
? (MSO_LineStyle)GetPropertyValue(
DFF_Prop_lineStyle,
@@ -850,8 +846,6 @@ long lcl_GetTrueMargin(const SvxLRSpaceI
return nExtraListIndent > 0 ? nExtraListIndent : 0;
}
-// --> OD 2010-05-06 #i103711#
-// --> OD 2010-05-11 #i105414#
void SyncIndentWithList( SvxLRSpaceItem &rLR,
const SwNumFmt &rFmt,
const bool bFirstLineOfstSet,
@@ -876,9 +870,19 @@ void SyncIndentWithList( SvxLRSpaceItem
{
rLR.SetTxtLeft( rFmt.GetIndentAt() );
}
+ else if (!bFirstLineOfstSet && !bLeftIndentSet )
+ {
+ if ( rFmt.GetFirstLineIndent() != 0 )
+ {
+ rLR.SetTxtFirstLineOfst( rFmt.GetFirstLineIndent() );
+ }
+ if ( rFmt.GetIndentAt() != 0 )
+ {
+ rLR.SetTxtLeft( rFmt.GetIndentAt() );
+ }
+ }
}
}
-// <--
const SwNumFmt* SwWW8FltControlStack::GetNumFmtFromStack(const SwPosition &rPos,
const SwTxtNode &rTxtNode)
@@ -926,14 +930,12 @@ void SwWW8FltControlStack::SetAttrInDoc(
continue;
SwCntntNode* pNd = (SwCntntNode*)pNode;
- SvxLRSpaceItem aOldLR = (const SvxLRSpaceItem&)
- pNd->GetAttr(RES_LR_SPACE);
+ SvxLRSpaceItem aOldLR = (const SvxLRSpaceItem&)pNd->GetAttr(RES_LR_SPACE);
SwTxtNode *pTxtNode = (SwTxtNode*)pNode;
const SwNumFmt *pNum = 0;
- pNum = GetNumFmtFromStack(*aRegion.GetPoint(),
- *pTxtNode);
+ pNum = GetNumFmtFromStack( *aRegion.GetPoint(), *pTxtNode );
if (!pNum)
{
pNum = GetNumFmtFromTxtNode(*pTxtNode);
@@ -941,18 +943,15 @@ void SwWW8FltControlStack::SetAttrInDoc(
if ( pNum )
{
- // --> OD 2010-05-06 #i103711#
const bool bFirstLineIndentSet =
( rReader.maTxtNodesHavingFirstLineOfstSet.end() !=
rReader.maTxtNodesHavingFirstLineOfstSet.find( pNode ) );
- // --> OD 2010-05-11 #i105414#
const bool bLeftIndentSet =
( rReader.maTxtNodesHavingLeftIndentSet.end() !=
rReader.maTxtNodesHavingLeftIndentSet.find( pNode ) );
SyncIndentWithList( aNewLR, *pNum,
bFirstLineIndentSet,
bLeftIndentSet );
- // <--
}
if (aNewLR == aOldLR)
@@ -1094,7 +1093,6 @@ void SwWW8FltRefStack::SetAttrInDoc(cons
SwFmtFld& rFmtFld = *(SwFmtFld*)pEntry->pAttr;
SwField* pFld = rFmtFld.GetFld();
- // OD 2004-03-19 - <NOT> got lost from revision 1.128 to 1.129
if (!RefToVar(pFld,pEntry))
{
sal_uInt16 nBkmNo;
@@ -1318,7 +1316,7 @@ void SwWW8ImplReader::ImportDop()
// COMPATIBILITY FLAGS START
//
- // i#78951, remember the unknown compatability options
+ // #i78951# - remember the unknown compatability options
// so as to export them out
rDoc.Setn32DummyCompatabilityOptions1( pWDop->GetCompatabilityOptions());
rDoc.Setn32DummyCompatabilityOptions2( pWDop->GetCompatabilityOptions2());
@@ -1333,7 +1331,7 @@ void SwWW8ImplReader::ImportDop()
// #i24363# tab stops relative to indent
rDoc.set(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT, false);
maTracer.Log(sw::log::eTabStopDistance);
- // OD 14.10.2003 #i18732# - adjust default of option 'FollowTextFlow'
+ // #i18732# - adjust default of option 'FollowTextFlow'
rDoc.SetDefault( SwFmtFollowTextFlow( sal_False ) );
// Import Default-Tabs
@@ -1358,44 +1356,34 @@ void SwWW8ImplReader::ImportDop()
rDoc.set(IDocumentSettingAccess::ADD_FLY_OFFSETS, true );
rDoc.set(IDocumentSettingAccess::ADD_EXT_LEADING, !pWDop->fNoLeading);
- // -> #111955#
rDoc.set(IDocumentSettingAccess::OLD_NUMBERING, false);
- // <- #111955#
- // --> FME 2005-05-27 #i47448#
+ // #i47448#
rDoc.set(IDocumentSettingAccess::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING, false);
- // <--
- // --> FME 2005-06-08 #i49277#
+ // #i49277#
rDoc.set(IDocumentSettingAccess::DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK, !pWDop->fExpShRtn); // #i56856#
- // --> FME 2005-08-11 #i53199#
+ // #i53199#
rDoc.set(IDocumentSettingAccess::DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT, false);
rDoc.set(IDocumentSettingAccess::OLD_LINE_SPACING, false);
- // OD, MMAHER 2004-03-01 #i25901#- set new compatibility option
- // 'Add paragraph and table spacing at bottom of table cells'
+ // #i25901#- set new compatibility option 'Add paragraph and table spacing at bottom of table cells'
rDoc.set(IDocumentSettingAccess::ADD_PARA_SPACING_TO_TABLE_CELLS, true);
- // OD 2004-03-17 #i11860# - set new compatibility option
- // 'Use former object positioning' to <sal_False>
+ // #i11860# - set new compatibility option 'Use former object positioning' to <sal_False>
rDoc.set(IDocumentSettingAccess::USE_FORMER_OBJECT_POS, false);
- // OD 2004-05-10 #i27767# - set new compatibility option
- // 'Conder Wrapping mode when positioning object' to <sal_True>
+ // #i27767# - set new compatibility option 'Conder Wrapping mode when positioning object' to <sal_True>
rDoc.set(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION, true);
- // --> FME 2004-04-22 # #108724#, #i13832#, #i24135#
+ // #i13832#, #i24135#
rDoc.set(IDocumentSettingAccess::USE_FORMER_TEXT_WRAPPING, false);
- // <--
- // --> FME 2006-02-10 #131283#
- rDoc.set(IDocumentSettingAccess::TABLE_ROW_KEEP, true); //SetTableRowKeep( true );
- // <--
+ rDoc.set(IDocumentSettingAccess::TABLE_ROW_KEEP, true);
- // --> FME 2006-03-01 #i3952#
+ // #i3952#
rDoc.set(IDocumentSettingAccess::IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION, true);
- // <--
//
// COMPATIBILITY FLAGS END
@@ -1408,9 +1396,8 @@ void SwWW8ImplReader::ImportDop()
if (pWwFib->nFib > 105)
ImportDopTypography(pWDop->doptypography);
- // #110055# disable form design mode to be able to use imported controls directly
+ // disable form design mode to be able to use imported controls directly
// #i31239# always disable form design mode, not only in protected docs
-// if (pWDop->fProtEnabled)
{
using namespace com::sun::star;
@@ -1687,10 +1674,18 @@ void SwWW8ImplReader::Read_HdFtTextAsHac
SwFlyFrmFmt *pFrame = rDoc.MakeFlySection(FLY_AT_PARA, pPaM->GetPoint());
- pFrame->SetFmtAttr(SwFmtFrmSize(ATT_MIN_SIZE, nPageWidth, MINLAY));
+ SwFmtAnchor aAnch( pFrame->GetAnchor() );
+ aAnch.SetType( FLY_AT_PARA );
+ pFrame->SetFmtAttr( aAnch );
+ SwFmtFrmSize aSz(ATT_MIN_SIZE, nPageWidth, MINLAY);
+ SwFrmSize eFrmSize = ATT_MIN_SIZE;
+ if( eFrmSize != aSz.GetWidthSizeType() )
+ aSz.SetWidthSizeType( eFrmSize );
+ pFrame->SetFmtAttr(aSz);
pFrame->SetFmtAttr(SwFmtSurround(SURROUND_THROUGHT));
- pFrame->SetFmtAttr(SwFmtHoriOrient(0, text::HoriOrientation::RIGHT)); //iFOO
- // --> OD 2005-02-28 #i43427# - send frame for header/footer into background.
+ pFrame->SetFmtAttr(SwFmtHoriOrient(0, text::HoriOrientation::LEFT)); //iFOO
+
+ // #i43427# - send frame for header/footer into background.
pFrame->SetFmtAttr( SvxOpaqueItem( RES_OPAQUE, false ) );
SdrObject* pFrmObj = CreateContactObject( pFrame );
ASSERT( pFrmObj,
@@ -1699,7 +1694,6 @@ void SwWW8ImplReader::Read_HdFtTextAsHac
{
pFrmObj->SetOrdNum( 0L );
}
- // <--
MoveInsideFly(pFrame);
const SwNodeIndex* pHackIdx = pFrame->GetCntnt().GetCntntIdx();
@@ -1772,12 +1766,8 @@ void SwWW8ImplReader::Read_HdFt(bool bIs
}
else
{
- // --> OD 2008-08-06 #150965#
// Always read title page header/footer data - it could be used by following sections
-// nWhichItems =
-// rSection.maSep.grpfIhdt & (WW8_HEADER_FIRST | WW8_FOOTER_FIRST),
nWhichItems = ( WW8_HEADER_FIRST | WW8_FOOTER_FIRST );
- // <--
pPD = rSection.mpTitlePage;
}
@@ -2637,27 +2627,26 @@ bool SwWW8ImplReader::HandlePageBreakCha
//itself ignores them in this case.
if (!nInTable)
{
- //xushanchuan add for issue106569
- sal_Bool IsTemp=sal_True;
- SwTxtNode* pTemp = pPaM->GetNode()->GetTxtNode();
- if ( pTemp && !( pTemp->GetTxt().Len() ) && ( bFirstPara || bFirstParaOfPage ) )
- {
- IsTemp = sal_False;
- AppendTxtNode(*pPaM->GetPoint());
- pTemp->SetAttr(*GetDfltAttr(RES_PARATR_NUMRULE));
- }
- //xushanchuan end
+ //xushanchuan add for issue106569
+ sal_Bool IsTemp=sal_True;
+ SwTxtNode* pTemp = pPaM->GetNode()->GetTxtNode();
+ if ( pTemp && !( pTemp->GetTxt().Len() ) && ( bFirstPara || bFirstParaOfPage ) )
+ {
+ IsTemp = sal_False;
+ AppendTxtNode(*pPaM->GetPoint());
+ pTemp->SetAttr(*GetDfltAttr(RES_PARATR_NUMRULE));
+ }
+ //xushanchuan end
bPgSecBreak = true;
pCtrlStck->KillUnlockedAttrs(*pPaM->GetPoint());
/*
- #74468#
If its a 0x0c without a paragraph end before it, act like a
paragraph end, but nevertheless, numbering (and perhaps other
similiar constructs) do not exist on the para.
*/
- //xushanchuan add for issue106569
- if (!bWasParaEnd && IsTemp)
- //xushanchuan end
+ //xushanchuan add for issue106569
+ if (!bWasParaEnd && IsTemp)
+ //xushanchuan end
{
bParaEndAdded = true;
if (0 >= pPaM->GetPoint()->nContent.GetIndex())
@@ -2709,8 +2698,7 @@ bool SwWW8ImplReader::ReadChar(long nPos
}
break;
case 0xe:
- //#108817# if there is only one column word treats a column
- //break like a pagebreak.
+ // if there is only one column word treats a column break like a pagebreak.
if (maSectionManager.CurrentSectionColCount() < 2)
bRet = HandlePageBreakChar();
else if (!nInTable)
@@ -2791,7 +2779,7 @@ bool SwWW8ImplReader::ReadChar(long nPos
else if (bSpec)
pResult = ImportGraf();
- //#102160# If we have a bad 0x1 insert a space instead.
+ // If we have a bad 0x1 insert a space instead.
if (!pResult)
{
cInsert = ' ';
@@ -3223,16 +3211,13 @@ bool SwWW8ImplReader::ReadText(long nSta
pPlcxMan->GetSepPLCF()->GetSprms(&aTemp);
if ((aTemp.nStartPos != l) && (aTemp.nEndPos != l))
{
- // --> OD 2005-01-07 #i39251# - insert text node for page break,
- // if no one inserted.
- // --> OD 2005-02-28 #i43118# - refine condition: the anchor
- // control stack has to have entries, otherwise it's not needed
- // to insert a text node.
+ // #i39251# - insert text node for page break, if no one inserted.
+ // #i43118# - refine condition: the anchor control stack has to have entries,
+ // otherwise it's not needed to insert a text node.
if ( !bStartLine && pAnchorStck->Count() > 0 )
{
AppendTxtNode(*pPaM->GetPoint());
}
- // <--
rDoc.InsertPoolItem(*pPaM,
SvxFmtBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK), 0);
bFirstParaOfPage = true;//xushanchuan add for issue106569
@@ -3259,36 +3244,32 @@ bool SwWW8ImplReader::ReadText(long nSta
#**************************************************************************/
SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SvStorage* pStorage,
- SvStream* pSt, SwDoc& rD, const String& rBaseURL, bool bNewDoc) :
- mpDocShell(rD.GetDocShell()),
- maTracer(*(mpDocShell->GetMedium())),
- pStg(pStorage),
- pStrm(pSt),
- pTableStream(0),
- pDataStream(0),
- rDoc(rD),
- maSectionManager(*this),
- maInsertedTables(rD),
- maSectionNameGenerator(rD,CREATE_CONST_ASC("WW")),
- maGrfNameGenerator(bNewDoc,String('G')),
- maParaStyleMapper(rD),
- maCharStyleMapper(rD),
- // --> OD 2010-05-06 #i103711#
- maTxtNodesHavingFirstLineOfstSet(),
- // <--
- // --> OD 2010-05-11 #i105414#
- maTxtNodesHavingLeftIndentSet(),
- // <--
- pMSDffManager(0),
- mpAtnNames(0),
- pAuthorInfos(0),
- sBaseURL(rBaseURL),
- m_bRegardHindiDigits( false ),
- mbNewDoc(bNewDoc),
- nDropCap(0),
- nIdctHint(0),
- bBidi(false),
- bReadTable(false)
+ SvStream* pSt, SwDoc& rD, const String& rBaseURL, bool bNewDoc)
+ : mpDocShell(rD.GetDocShell()),
+ maTracer(*(mpDocShell->GetMedium())),
+ pStg(pStorage),
+ pStrm(pSt),
+ pTableStream(0),
+ pDataStream(0),
+ rDoc(rD),
+ maSectionManager(*this),
+ maInsertedTables(rD),
+ maSectionNameGenerator(rD,CREATE_CONST_ASC("WW")),
+ maGrfNameGenerator(bNewDoc,String('G')),
+ maParaStyleMapper(rD),
+ maCharStyleMapper(rD),
+ maTxtNodesHavingFirstLineOfstSet(),
+ maTxtNodesHavingLeftIndentSet(),
+ pMSDffManager(0),
+ mpAtnNames(0),
+ pAuthorInfos(0),
+ sBaseURL(rBaseURL),
+ m_bRegardHindiDigits( false ),
+ mbNewDoc(bNewDoc),
+ nDropCap(0),
+ nIdctHint(0),
+ bBidi(false),
+ bReadTable(false)
{
pStrm->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
nWantedVersion = nVersionPara;
@@ -3381,6 +3362,10 @@ void wwSectionManager::SetSegmentToPageD
SetNumberingType(rSection, rPage);
SwFrmFmt &rFmt = rPage.GetMaster();
+
+ if(mrReader.pWDop->fUseBackGroundInAllmodes) // #i56806# Make sure mrReader is initialized
+ mrReader.GrafikCtor();
+
if (mrReader.pWDop->fUseBackGroundInAllmodes && mrReader.pMSDffManager)
{
@@ -3448,6 +3433,26 @@ void wwSectionManager::SetUseOn(wwSectio
rSection.mpTitlePage->WriteUseOn(
(UseOnPage) (eUseBase | nsUseOnPage::PD_HEADERSHARE | nsUseOnPage::PD_FOOTERSHARE));
}
+
+ if( nsUseOnPage::PD_MIRROR != (UseOnPage)(eUse & nsUseOnPage::PD_MIRROR) )
+ {
+ if( rSection.maSep.bkc == 3 )
+ {
+ if( rSection.mpPage )
+ rSection.mpPage->SetUseOn( nsUseOnPage::PD_LEFT );
+ if( rSection.mpTitlePage )
+ rSection.mpTitlePage->SetUseOn( nsUseOnPage::PD_LEFT );
+ }
+ else if( rSection.maSep.bkc == 4 )
+ {
+ if( rSection.mpPage )
+ rSection.mpPage->SetUseOn( nsUseOnPage::PD_RIGHT );
+ if( rSection.mpTitlePage )
+ rSection.mpTitlePage->SetUseOn( nsUseOnPage::PD_RIGHT );
+ }
+
+ }
+
}
//Set the page descriptor on this node, handle the different cases for a text
@@ -3486,10 +3491,7 @@ SwFmtPageDesc wwSectionManager::SetSwFmt
mySegIter &rStart, bool bIgnoreCols)
{
SwFmtPageDesc aEmpty;
- // --> OD 2008-08-06 #150965#
// Always read title page header/footer data - it could be used by following sections
-// if (rIter->HasTitlePage())
- // <--
{
if (IsNewDoc() && rIter == rStart)
{
@@ -3529,8 +3531,19 @@ SwFmtPageDesc wwSectionManager::SetSwFmt
//Set page before hd/ft
const wwSection *pPrevious = 0;
- if (rIter != rStart)
- pPrevious = &(*(rIter-1));
+
+ mySegIter aPrev = rIter;
+ while( aPrev!= rStart )
+ {
+ aPrev--;
+ pPrevious = &(*(aPrev));
+ if( aPrev->IsContinous())
+ continue;
+ else{
+ break;
+ }
+ }
+
SetHdFt(*rIter, std::distance(rStart, rIter), pPrevious);
SetUseOn(*rIter);
@@ -3669,7 +3682,6 @@ void wwSectionManager::InsertSegments()
bool bHasOwnHdFt = false;
/*
- #112027# #110379#
In this nightmare scenario the continuous section has its own
headers and footers so we will try and find a hard page break
between here and the end of the section and put the headers and
@@ -3965,7 +3977,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8G
aLinkStrings[i];
}
- ReadDocVars(); // #129053# import document variables as meta information.
+ ReadDocVars(); // import document variables as meta information.
::SetProgressState(nProgress, mpDocShell); // Update
@@ -4039,31 +4051,27 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8G
if (!mbNewDoc)
{
- // in ein Dokument einfuegen ?
- // Da immer ganze Zeile eingelesen werden, muessen
- // evtl. Zeilen eingefuegt / aufgebrochen werden
- //
+ // inserting into an existing document:
+ // As only complete paragraphs are inserted, the current one
+ // needs to be splitted - once or even twice.
const SwPosition* pPos = pPaM->GetPoint();
- SwTxtNode const*const pSttNd = pPos->nNode.GetNode().GetTxtNode();
- sal_uInt16 nCntPos = pPos->nContent.GetIndex();
+ // split current paragraph to get new paragraph for the insertion
+ rDoc.SplitNode( *pPos, false );
- // EinfuegePos nicht in leerer Zeile
- if( nCntPos && pSttNd->GetTxt().Len() )
- rDoc.SplitNode( *pPos, false ); // neue Zeile erzeugen
-
- if( pSttNd->GetTxt().Len() )
- { // EinfuegePos nicht am Ende der Zeile
- rDoc.SplitNode( *pPos, false ); // neue Zeile
- pPaM->Move( fnMoveBackward ); // gehe in leere Zeile
- }
-
- // verhinder das Einlesen von Tabellen in Fussnoten / Tabellen
- sal_uLong nNd = pPos->nNode.GetIndex();
- bReadNoTbl = 0 != pSttNd->FindTableNode() ||
- ( nNd < rDoc.GetNodes().GetEndOfInserts().GetIndex() &&
- rDoc.GetNodes().GetEndOfInserts().StartOfSectionIndex()
- < nNd );
+ // another split, if insertion position was not at the end of the current paragraph.
+ SwTxtNode const*const pTxtNd = pPos->nNode.GetNode().GetTxtNode();
+ if ( pTxtNd->GetTxt().Len() )
+ {
+ rDoc.SplitNode( *pPos, false );
+ // move PaM back to the newly empty paragraph
+ pPaM->Move( fnMoveBackward );
+ }
+
+ // suppress insertion of tables inside footnotes.
+ const sal_uLong nNd = pPos->nNode.GetIndex();
+ bReadNoTbl = ( nNd < rDoc.GetNodes().GetEndOfInserts().GetIndex() &&
+ rDoc.GetNodes().GetEndOfInserts().StartOfSectionIndex() < nNd );
}
@@ -4637,22 +4645,19 @@ public:
void SwWW8ImplReader::SetOutLineStyles()
{
/*
- #i3674# & #101291# Load new document and insert document cases.
+ #i3674# - Load new document and insert document cases.
*/
SwNumRule aOutlineRule(*rDoc.GetOutlineNumRule());
- // --> OD 2005-10-14 #i53044,i53213#
+ // #i53044,i53213#
// <mpChosenOutlineNumRule> has to be set to point to local variable
// <aOutlineRule>, because its used below to be compared this <&aOutlineRule>.
// But at the end of the method <mpChosenOutlineNumRule> has to be set to
// <rDoc.GetOutlineNumRule()>, because <aOutlineRule> will be destroyed.
-// mpChosenOutlineNumRule = rDoc.GetOutlineNumRule();
mpChosenOutlineNumRule = &aOutlineRule;
- // <--
sw::ParaStyles aOutLined(sw::util::GetParaStyles(rDoc));
- // --> OD 2009-02-04 #i98791# - sorting algorithm adjusted
+ // #i98791# - sorting algorithm adjusted
sw::util::SortByAssignedOutlineStyleListLevel(aOutLined);
- // <--
typedef sw::ParaStyleIter myParaStyleIter;
/*
@@ -4662,16 +4667,12 @@ void SwWW8ImplReader::SetOutLineStyles()
sal_uInt16 nFlagsStyleOutlLevel = 0;
if (!mbNewDoc)
{
- // --> OD 2008-12-16 #i70748#
- // backward iteration needed due to the outline level attribute
+ // #i70748# - backward iteration needed due to the outline level attribute
sw::ParaStyles::reverse_iterator aEnd = aOutLined.rend();
for ( sw::ParaStyles::reverse_iterator aIter = aOutLined.rbegin(); aIter < aEnd; ++aIter)
- // <--
{
- //if ((*aIter)->GetOutlineLevel() < MAXLEVEL) //#outline level,zhaojianwei,
- //nFlagsStyleOutlLevel |= 1 << (*aIter)->GetOutlineLevel();
if ((*aIter)->IsAssignedToListLevelOfOutlineStyle())
- nFlagsStyleOutlLevel |= 1 << (*aIter)->GetAssignedOutlineStyleLevel();//<-end,zhaojianwei
+ nFlagsStyleOutlLevel |= 1 << (*aIter)->GetAssignedOutlineStyleLevel();
else
break;
}
@@ -4679,12 +4680,11 @@ void SwWW8ImplReader::SetOutLineStyles()
else
{
/*
- #111955#
Only import *one* of the possible multiple outline numbering rules, so
pick the one that affects most styles. If we're not importing a new
document, we got to stick with what is already there.
*/
- // --> OD 2005-11-07 #127520# - use index in text format collection
+ // use index in text format collection
// array <pCollA> as key of the outline numbering map <aRuleMap>
// instead of the memory pointer of the outline numbering rule
// to assure that, if two outline numbering rule affect the same
@@ -4699,14 +4699,10 @@ void SwWW8ImplReader::SetOutLineStyles()
rSI.pFmt
)
{
- // --> OD 2005-11-07 #127520#
myIter aIter = aRuleMap.find(nI);
- // <--
if (aIter == aRuleMap.end())
{
- // --> OD 2005-11-07 #127520#
aRuleMap[nI] = 1;
- // <--
}
else
++(aIter->second);
@@ -4720,12 +4716,9 @@ void SwWW8ImplReader::SetOutLineStyles()
if (aIter->second > nMax)
{
nMax = aIter->second;
- // --> OD 2005-11-07 #127520#
mpChosenOutlineNumRule = pCollA[ aIter->first ].pOutlineNumrule;
- // <--
}
}
- // <--
ASSERT(mpChosenOutlineNumRule, "Impossible");
if (mpChosenOutlineNumRule)
@@ -4733,16 +4726,12 @@ void SwWW8ImplReader::SetOutLineStyles()
if (mpChosenOutlineNumRule != &aOutlineRule)
{
- // --> OD 2008-12-16 #i70748#
- // backward iteration needed due to the outline level attribute
+ // #i70748# - backward iteration needed due to the outline level attribute
sw::ParaStyles::reverse_iterator aEnd = aOutLined.rend();
for ( sw::ParaStyles::reverse_iterator aIter = aOutLined.rbegin(); aIter < aEnd; ++aIter)
- // <--
{
- //if ((*aIter)->GetOutlineLevel() < MAXLEVEL)//#outline level,zhaojianwei
- // (*aIter)->SetOutlineLevel(NO_NUMBERING);
- if((*aIter)->IsAssignedToListLevelOfOutlineStyle())
- (*aIter)->DeleteAssignmentToListLevelOfOutlineStyle(); //<-end
+ if((*aIter)->IsAssignedToListLevelOfOutlineStyle())
+ (*aIter)->DeleteAssignmentToListLevelOfOutlineStyle();
else
break;
@@ -4822,12 +4811,10 @@ void SwWW8ImplReader::SetOutLineStyles()
}
if (nOldFlags != nFlagsStyleOutlLevel)
rDoc.SetOutlineNumRule(aOutlineRule);
- // --> OD 2005-10-14 #i53044,i53213#
if ( mpChosenOutlineNumRule == &aOutlineRule )
{
mpChosenOutlineNumRule = rDoc.GetOutlineNumRule();
}
- // <--
}
const String* SwWW8ImplReader::GetAnnotationAuthor(sal_uInt16 nIdx)
@@ -5068,7 +5055,7 @@ sal_Bool SwMSDffManager::GetOLEStorageNa
// sein. Wir brauchen hier aber nur das Sprm fuer die Picture Id
long nOldPos = rReader.pStrm->Tell();
{
- // --> OD 2004-12-08 #i32596# - consider return value of method
+ // #i32596# - consider return value of method
// <rReader.GetTxbxTextSttEndCp(..)>. If it returns false, method
// wasn't successful. Thus, continue in this case.
// Note: Ask MM for initialization of <nStartCp> and <nEndCp>.
@@ -5120,7 +5107,6 @@ sal_Bool SwMSDffManager::GetOLEStorageNa
rReader.pPlcxMan->RestoreAllPLCFx( aSave );
}
- // <--
}
rReader.pStrm->Seek( nOldPos );
}
@@ -5152,13 +5138,11 @@ bool SwWW8ImplReader::InEqualOrHigherApo
{
if (nLvl)
--nLvl;
- // --> OD 2006-01-19 #i60827#
- // check size of <maApos> to assure that <maApos.begin() + nLvl> can be performed.
+ // #i60827# - check size of <maApos> to assure that <maApos.begin() + nLvl> can be performed.
if ( sal::static_int_cast< sal_Int32>(nLvl) >= sal::static_int_cast< sal_Int32>(maApos.size()) )
{
return false;
}
- // <--
mycApoIter aIter = std::find(maApos.begin() + nLvl, maApos.end(), true);
if (aIter != maApos.end())
return true;
Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par.hxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par.hxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par.hxx Mon Aug 20 11:46:19 2012
@@ -1528,6 +1528,7 @@ public: // eigentlich private, geht
void Read_ParaBiDi(sal_uInt16, const sal_uInt8* pData, short nLen);
static sal_uInt32 ExtractColour(const sal_uInt8* &rpData, bool bVer67);
+ void Read_UnderlineColor(sal_uInt16, const sal_uInt8* pData, short nLen);
long MapBookmarkVariables(const WW8FieldDesc* pF,String &rOrigName,
const String &rData);
String GetMappedBookmark(const String &rOrigName);
Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par2.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par2.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par2.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par2.cxx Mon Aug 20 11:46:19 2012
@@ -3970,7 +3970,7 @@ void WW8RStyle::Set1StyleDefaults()
pIo->pAktColl->SetFmtAttr(aAttr);
}
- if( pIo->pWDop->fWidowControl && !bWidowsChanged ) // Widows ?
+ if( /*pIo->pWDop->fWidowControl &&*/ !bWidowsChanged ) // Widows ?
{
pIo->pAktColl->SetFmtAttr( SvxWidowsItem( 2, RES_PARATR_WIDOWS ) );
pIo->pAktColl->SetFmtAttr( SvxOrphansItem( 2, RES_PARATR_ORPHANS ) );
Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par3.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par3.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par3.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par3.cxx Mon Aug 20 11:46:19 2012
@@ -449,11 +449,15 @@ struct WW8LFOInfo // unsortiert, d.h.
};
WW8LFOInfo::WW8LFOInfo(const WW8LFO& rLFO)
- : maParaSprms(WW8ListManager::nMaxLevel),
- maOverrides(WW8ListManager::nMaxLevel), pNumRule(rLFO.pNumRule),
- nIdLst(rLFO.nIdLst), nLfoLvl(rLFO.nLfoLvl),
- bOverride(rLFO.nLfoLvl ? true : false), bSimpleList(rLFO.bSimpleList),
- bUsedInDoc(0), bLSTbUIDSet(0)
+ : maParaSprms(WW8ListManager::nMaxLevel)
+ , maOverrides(WW8ListManager::nMaxLevel)
+ , pNumRule(rLFO.pNumRule)
+ , nIdLst(rLFO.nIdLst)
+ , nLfoLvl(rLFO.nLfoLvl)
+ , bOverride(rLFO.nLfoLvl ? true : false)
+ , bSimpleList(rLFO.bSimpleList)
+ , bUsedInDoc(0)
+ , bLSTbUIDSet(0)
{
}
Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par5.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par5.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par5.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par5.cxx Mon Aug 20 11:46:19 2012
@@ -943,10 +943,16 @@ long SwWW8ImplReader::Read_Field(WW8PLCF
if (bNested)
return 0;
- sal_uInt16 n = ( aF.nId <= eMax ) ? aF.nId : static_cast< sal_uInt16 >(eMax); // alle > 91 werden 92
+ sal_uInt16 n = (aF.nId <= eMax) ? aF.nId : static_cast<sal_uInt16>(eMax);
sal_uInt16 nI = n / 32; // # des sal_uInt32
sal_uLong nMask = 1 << ( n % 32 ); // Maske fuer Bits
+ if ((sizeof(nFieldTagAlways)/sizeof(nFieldTagAlways[0])) <= nI)
+ { // if indexes larger than 95 are needed, then a new configuration
+ // item has to be added, and nFieldTagAlways/nFieldTagBad expanded!
+ return aF.nLen;
+ }
+
if( nFieldTagAlways[nI] & nMask ) // Flag: Tag it
return Read_F_Tag( &aF ); // Resultat nicht als Text
@@ -1447,7 +1453,7 @@ eF_ResT SwWW8ImplReader::Read_F_Seq( WW8
bFormat = true; // Format-Flag aktivieren
bHidden = false; // Hidden-Flag deaktivieren
nRet = aReadParam.SkipToNextToken();
- if( -2 == nRet )
+ if( -2 == nRet && !( aReadParam.GetResult().EqualsAscii("MERGEFORMAT") || aReadParam.GetResult().EqualsAscii("CHARFORMAT") ))
eNumFormat = GetNumTypeFromName( aReadParam.GetResult() );
break;
@@ -2147,6 +2153,32 @@ eF_ResT SwWW8ImplReader::Read_F_PgRef( W
rDoc.InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
return FLD_OK;
}
+//helper function
+//For MS MacroButton field, the symbol in plain text is always "(" (0x28),
+//which should be mapped according to the macro type
+bool ConvertMacroSymbol( const String& rName, String& rReference )
+{
+ bool bConverted = false;
+ if( rReference.EqualsAscii( "(" ) )
+ {
+ bConverted = true;
+ sal_Unicode cSymbol;
+ if( rName.EqualsAscii( "CheckIt" ) )
+ cSymbol = 0xF06F;
+ else if( rName.EqualsAscii( "UncheckIt" ) )
+ cSymbol = 0xF0FE;
+ else if( rName.EqualsAscii( "ShowExample" ) )
+ cSymbol = 0xF02A;
+ //else if... : todo
+ else
+ bConverted = false;
+
+ if( bConverted )
+ rReference = cSymbol;
+ }
+ return bConverted;
+}
+//end
// "MACROSCHALTFL"ACHE"
eF_ResT SwWW8ImplReader::Read_F_Macro( WW8FieldDesc*, String& rStr)
@@ -2189,22 +2221,53 @@ eF_ResT SwWW8ImplReader::Read_F_Macro( W
if( !aName.Len() )
return FLD_TAGIGN; // makes no sense without Makro-Name
+ //try converting macro symbol according to macro name
+ bool bApplyWingdings = ConvertMacroSymbol( aName, aVText );
aName.InsertAscii( "StarOffice.Standard.Modul1.", 0 );
SwMacroField aFld( (SwMacroFieldType*)
rDoc.GetSysFldType( RES_MACROFLD ), aName, aVText );
- rDoc.InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
-
-
- WW8_CP nOldCp = pPlcxMan->Where();
- WW8_CP nCp = nOldCp + nOffset;
- SwPaM aPaM(*pPaM);
- aPaM.SetMark();
- aPaM.Move(fnMoveBackward);
- aPaM.Exchange();
+ if( !bApplyWingdings )
+ {
- mpPostProcessAttrsInfo = new WW8PostProcessAttrsInfo(nCp, nCp, aPaM);
+ rDoc.InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
+ WW8_CP nOldCp = pPlcxMan->Where();
+ WW8_CP nCp = nOldCp + nOffset;
+
+ SwPaM aPaM(*pPaM);
+ aPaM.SetMark();
+ aPaM.Move(fnMoveBackward);
+ aPaM.Exchange();
+
+ mpPostProcessAttrsInfo = new WW8PostProcessAttrsInfo(nCp, nCp, aPaM);
+ }
+ else
+ {
+ //set Wingdings font
+ sal_uInt16 i = 0;
+ for ( ; i < pFonts->GetMax(); i++ )
+ {
+ FontFamily eFamily;
+ String aFontName;
+ FontPitch ePitch;
+ CharSet eSrcCharSet;
+ if( GetFontParams( i, eFamily, aFontName, ePitch, eSrcCharSet )
+ && aFontName.EqualsAscii("Wingdings") )
+ {
+ break;
+ }
+ }
+
+ if ( i < pFonts->GetMax() )
+ {
+
+ SetNewFontAttr( i, true, RES_CHRATR_FONT );
+ rDoc.InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
+ pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_FONT );
+ ResetCharSetVars();
+ }
+ }
return FLD_OK;
}
@@ -2443,7 +2506,7 @@ eF_ResT SwWW8ImplReader::Read_F_Equation
{
_ReadFieldParams aReadParam( rStr );
long cChar = aReadParam.SkipToNextToken();
- if ('o' == cChar)
+ if ('o' == cChar || 'O' == cChar)
Read_SubF_Combined(aReadParam);
else if ('*' == cChar)
Read_SubF_Ruby(aReadParam);
@@ -2453,45 +2516,95 @@ eF_ResT SwWW8ImplReader::Read_F_Equation
void SwWW8ImplReader::Read_SubF_Combined( _ReadFieldParams& rReadParam)
{
String sCombinedCharacters;
- if ((-2 == rReadParam.SkipToNextToken()) &&
- rReadParam.GetResult().EqualsIgnoreCaseAscii('(', 1, 0))
+ _ReadFieldParams aOriFldParam = rReadParam;
+ long cGetChar = rReadParam.SkipToNextToken();
+ switch( cGetChar )
{
- for (int i=0;i<2;i++)
+ case 'a':
+ case 'A':
{
- if ('s' == rReadParam.SkipToNextToken())
+ String sTemp = rReadParam.GetResult();
+ if ( !sTemp.EqualsIgnoreCaseAscii("d", 1, 0) )
{
- long cChar = rReadParam.SkipToNextToken();
- if (-2 != rReadParam.SkipToNextToken())
- break;
- String sF = rReadParam.GetResult();
- if ((('u' == cChar) && sF.EqualsIgnoreCaseAscii('p', 1, 0))
- || (('d' == cChar) && sF.EqualsIgnoreCaseAscii('o', 1, 0)))
+ break;
+ }
+ rReadParam.SkipToNextToken();
+ }
+ case -2:
+ {
+ if ( rReadParam.GetResult().EqualsIgnoreCaseAscii('(', 1, 0) )
+ {
+ for (int i=0;i<2;i++)
{
- if (-2 == rReadParam.SkipToNextToken())
+ if ('s' == rReadParam.SkipToNextToken())
{
- String sPart = rReadParam.GetResult();
- xub_StrLen nBegin = sPart.Search('(');
+ long cChar = rReadParam.SkipToNextToken();
+ if (-2 != rReadParam.SkipToNextToken())
+ break;
+ String sF = rReadParam.GetResult();
+ if ((('u' == cChar) && sF.EqualsIgnoreCaseAscii('p', 1, 0))
+ || (('d' == cChar) && sF.EqualsIgnoreCaseAscii('o', 1, 0)))
+ {
+ if (-2 == rReadParam.SkipToNextToken())
+ {
+ String sPart = rReadParam.GetResult();
+ xub_StrLen nBegin = sPart.Search('(');
- //Word disallows brackets in this field, which
- //aids figuring out the case of an end of )) vs )
- xub_StrLen nEnd = sPart.Search(')');
+ //Word disallows brackets in this field, which
+ //aids figuring out the case of an end of )) vs )
+ xub_StrLen nEnd = sPart.Search(')');
- if ((nBegin != STRING_NOTFOUND) &&
- (nEnd != STRING_NOTFOUND))
+ if ((nBegin != STRING_NOTFOUND) &&
+ (nEnd != STRING_NOTFOUND))
+ {
+ sCombinedCharacters +=
+ sPart.Copy(nBegin+1,nEnd-nBegin-1);
+ }
+ }
+ }
+ }
+ }
+ if (sCombinedCharacters.Len())
+ {
+ SwCombinedCharField aFld((SwCombinedCharFieldType*)
+ rDoc.GetSysFldType(RES_COMBINED_CHARS),sCombinedCharacters);
+ rDoc.InsertPoolItem(*pPaM, SwFmtFld(aFld), 0);
+ }
+ else
+ {
+ const String sPart = aOriFldParam.GetResult();
+ xub_StrLen nBegin = sPart.Search('(');
+ xub_StrLen nEnd = sPart.Search(',');
+ if ( nEnd == STRING_NOTFOUND )
+ {
+ nEnd = sPart.Search(')');
+ }
+ if ( (nBegin != STRING_NOTFOUND) && (nEnd != STRING_NOTFOUND) )
+ {
+ // skip certain leading characters
+ for (int i = nBegin;i < nEnd-1;i++)
{
- sCombinedCharacters +=
- sPart.Copy(nBegin+1,nEnd-nBegin-1);
+ const sal_Unicode cC = sPart.GetChar(nBegin+1);
+ if ( cC < 32 )
+ {
+ nBegin++;
+ }
+ else
+ break;
+ }
+ sCombinedCharacters = sPart.Copy( nBegin+1, nEnd-nBegin-1 );
+ if ( sCombinedCharacters.Len() )
+ {
+ SwInputField aFld( (SwInputFieldType*)rDoc.GetSysFldType( RES_INPUTFLD ),
+ sCombinedCharacters, sCombinedCharacters, INP_TXT, 0 );
+ rDoc.InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 ); // insert input field
}
}
}
}
}
- }
- if (sCombinedCharacters.Len())
- {
- SwCombinedCharField aFld((SwCombinedCharFieldType*)
- rDoc.GetSysFldType(RES_COMBINED_CHARS),sCombinedCharacters);
- rDoc.InsertPoolItem(*pPaM, SwFmtFld(aFld), 0);
+ default:
+ break;
}
}
Modified: incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par6.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par6.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par6.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/filter/ww8/ww8par6.cxx Mon Aug 20 11:46:19 2012
@@ -3449,6 +3449,53 @@ void SwWW8ImplReader::Read_TxtForeColor(
}
}
+void SwWW8ImplReader::Read_UnderlineColor(sal_uInt16, const sal_uInt8* pData, short nLen)
+{
+ if( nLen < 0 )
+ {
+ //because the UnderlineColor is not a standalone attribute in SW, it belongs to the underline attribute.
+ //And, the .doc file stores attributes separately, this attribute ends here, the "underline"
+ //attribute also terminates (if the character next owns underline, that will be a new underline attribute).
+ //so nothing is left to be done here.
+ return;
+ }
+ else
+ {
+ if ( pAktColl ) //importing style
+ {
+ if( SFX_ITEM_SET == pAktColl->GetItemState( RES_CHRATR_UNDERLINE, sal_False ) )
+ {
+ const SwAttrSet& aSet = pAktColl->GetAttrSet();
+ SvxUnderlineItem *pUnderline
+ = (SvxUnderlineItem *)(aSet.Get( RES_CHRATR_UNDERLINE, sal_False ).Clone());
+ if(pUnderline){
+ pUnderline->SetColor( Color( wwUtility::BGRToRGB(SVBT32ToUInt32(pData)) ) );
+ pAktColl->SetFmtAttr( *pUnderline );
+ delete pUnderline;
+ }
+ }
+ }
+ else if ( pAktItemSet )
+ {
+ if ( SFX_ITEM_SET == pAktItemSet->GetItemState( RES_CHRATR_UNDERLINE, sal_False ) )
+ {
+ SvxUnderlineItem *pUnderline
+ = (SvxUnderlineItem *)(pAktItemSet->Get( RES_CHRATR_UNDERLINE, sal_False ) .Clone());
+ if(pUnderline){
+ pUnderline->SetColor( Color( wwUtility::BGRToRGB(SVBT32ToUInt32(pData)) ) );
+ pAktItemSet->Put( *pUnderline );
+ delete pUnderline;
+ }
+ }
+ }
+ else
+ {
+ SvxUnderlineItem* pUnderlineAttr = (SvxUnderlineItem*)pCtrlStck->GetOpenStackAttr( *pPaM->GetPoint(), RES_CHRATR_UNDERLINE );
+ if( pUnderlineAttr != NULL )
+ pUnderlineAttr->SetColor( Color( wwUtility::BGRToRGB(SVBT32ToUInt32( pData ))));
+ }
+ }
+}
bool SwWW8ImplReader::GetFontParams( sal_uInt16 nFCode, FontFamily& reFamily,
String& rName, FontPitch& rePitch, CharSet& reCharSet )
{
@@ -3539,7 +3586,7 @@ bool SwWW8ImplReader::GetFontParams( sal
break;
}
}
- if( b < sizeof( eFamilyA ) )
+ if (b < (sizeof(eFamilyA)/sizeof(eFamilyA[0])))
reFamily = eFamilyA[b];
else
reFamily = FAMILY_DONTKNOW;
@@ -6130,6 +6177,7 @@ const wwSprmDispatcher *GetWW8SprmDispat
{0x6815, 0}, //undocumented
{0x6816, 0}, //undocumented
{0x6870, &SwWW8ImplReader::Read_TxtForeColor},
+ {0x6877, &SwWW8ImplReader::Read_UnderlineColor},
{0xC64D, &SwWW8ImplReader::Read_ParaBackColor},
{0x6467, 0}, //undocumented
{0xF617, 0}, //undocumented
Modified: incubator/ooo/branches/writer001/main/sw/source/ui/app/docsh.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/ui/app/docsh.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/ui/app/docsh.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/ui/app/docsh.cxx Mon Aug 20 11:46:19 2012
@@ -1270,7 +1270,7 @@ uno::Reference< frame::XController >
/* -----------------------------12.02.01 12:08--------------------------------
---------------------------------------------------------------------------*/
-static const char* pEventNames[] =
+static const char* s_EventNames[] =
{
"OnPageCountChange",
"OnMailMerge",
@@ -1279,6 +1279,7 @@ static const char* pEventNames[] =
"OnFieldMergeFinished",
"OnLayoutFinished"
};
+static sal_Int32 const s_nEvents(sizeof(s_EventNames)/sizeof(s_EventNames[0]));
Sequence< OUString > SwDocShell::GetEventNames()
{
@@ -1296,12 +1297,12 @@ Sequence< OUString > SwDocShell::GetEven
return aRet;
}
-static sal_Int32 nEvents=13;
-
rtl::OUString SwDocShell::GetEventName( sal_Int32 nIndex )
{
- if ( nIndex<nEvents )
- return ::rtl::OUString::createFromAscii(pEventNames[nIndex]);
+ if (nIndex < s_nEvents)
+ {
+ return ::rtl::OUString::createFromAscii(s_EventNames[nIndex]);
+ }
return rtl::OUString();
}
Modified: incubator/ooo/branches/writer001/main/sw/source/ui/app/docstyle.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/ui/app/docstyle.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/ui/app/docstyle.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/ui/app/docstyle.cxx Mon Aug 20 11:46:19 2012
@@ -2230,10 +2230,9 @@ void SwDocStyleSheetPool::Replace( SfxS
}
}
-SfxStyleSheetIterator* SwDocStyleSheetPool::CreateIterator(
- SfxStyleFamily eFam, sal_uInt16 _nMask )
+SfxStyleSheetIteratorPtr SwDocStyleSheetPool::CreateIterator( SfxStyleFamily eFam, sal_uInt16 _nMask )
{
- return new SwStyleSheetIterator( this, eFam, _nMask );
+ return SfxStyleSheetIteratorPtr(new SwStyleSheetIterator( this, eFam, _nMask ));
}
void SwDocStyleSheetPool::dispose()
Modified: incubator/ooo/branches/writer001/main/sw/source/ui/app/swmodul1.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/ui/app/swmodul1.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/ui/app/swmodul1.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/ui/app/swmodul1.cxx Mon Aug 20 11:46:19 2012
@@ -233,6 +233,8 @@ void SwModule::ApplyUsrPref(const SwView
// zum Schluss wird das Idle-Flag wieder gesetzt
// #42510#
pPref->SetIdle(sal_True);
+
+ delete pViewOpt;
}
/* -----------------------------28.09.00 12:36--------------------------------
Modified: incubator/ooo/branches/writer001/main/sw/source/ui/config/usrpref.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/ui/config/usrpref.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/ui/config/usrpref.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/ui/config/usrpref.cxx Mon Aug 20 11:46:19 2012
@@ -96,7 +96,7 @@ Sequence<OUString> SwContentViewConfig::
"Display/DrawingControl", // 2
"Display/FieldCode", // 3
"Display/Note", // 4
- "Display/PreventTips", // 5
+ "Display/ShowContentTips", // 5
"NonprintingCharacter/MetaCharacters", // 6
"NonprintingCharacter/ParagraphEnd", // 7
"NonprintingCharacter/OptionalHyphen", // 8
@@ -166,7 +166,7 @@ void SwContentViewConfig::Commit()
case 2: bVal = rParent.IsDraw(); break;// "Display/DrawingControl",
case 3: bVal = rParent.IsFldName(); break;// "Display/FieldCode",
case 4: bVal = rParent.IsPostIts(); break;// "Display/Note",
- case 5: bVal = rParent.IsPreventTips(); break; // "Display/PreventTips"
+ case 5: bVal = rParent.IsShowContentTips(); break; // "Display/ShowContentTips"
case 6: bVal = rParent.IsViewMetaChars(); break; //"NonprintingCharacter/MetaCharacters"
case 7: bVal = rParent.IsParagraph(sal_True); break;// "NonprintingCharacter/ParagraphEnd",
case 8: bVal = rParent.IsSoftHyph(); break;// "NonprintingCharacter/OptionalHyphen",
@@ -209,7 +209,7 @@ void SwContentViewConfig::Load()
case 2: rParent.SetDraw(bSet); break;// "Display/DrawingControl",
case 3: rParent.SetFldName(bSet); break;// "Display/FieldCode",
case 4: rParent.SetPostIts(bSet); break;// "Display/Note",
- case 5: rParent.SetPreventTips(bSet); break;// "Display/PreventTips",
+ case 5: rParent.SetShowContentTips(bSet); break;// "Display/ShowContentTips",
case 6: rParent.SetViewMetaChars(bSet); break; //"NonprintingCharacter/MetaCharacters"
case 7: rParent.SetParagraph(bSet); break;// "NonprintingCharacter/ParagraphEnd",
case 8: rParent.SetSoftHyph(bSet); break;// "NonprintingCharacter/OptionalHyphen",
Modified: incubator/ooo/branches/writer001/main/sw/source/ui/dialog/ascfldlg.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/ui/dialog/ascfldlg.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/ui/dialog/ascfldlg.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/ui/dialog/ascfldlg.cxx Mon Aug 20 11:46:19 2012
@@ -117,8 +117,6 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Wind
{
aBuffer[ nBytesRead ] = '0';
aBuffer[ nBytesRead+1 ] = '0';
- if( 0 != ( nBytesRead & 0x00000001 ) )
- aBuffer[ nBytesRead + 2 ] = '0';
}
sal_Bool bCR = sal_False, bLF = sal_False, bNoNormalChar = sal_False,
Modified: incubator/ooo/branches/writer001/main/sw/source/ui/docvw/edtwin2.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/ui/docvw/edtwin2.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/ui/docvw/edtwin2.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/ui/docvw/edtwin2.cxx Mon Aug 20 11:46:19 2012
@@ -108,7 +108,7 @@ void SwEditWin::RequestHelp(const HelpEv
{
SwWrtShell &rSh = rView.GetWrtShell();
sal_Bool bQuickBalloon = 0 != (rEvt.GetMode() & ( HELPMODE_QUICK | HELPMODE_BALLOON ));
- if(bQuickBalloon && rSh.GetViewOptions()->IsPreventTips())
+ if(bQuickBalloon && !rSh.GetViewOptions()->IsShowContentTips())
return;
sal_Bool bWeiter = sal_True;
SET_CURR_SHELL(&rSh);
Modified: incubator/ooo/branches/writer001/main/sw/source/ui/fldui/flddb.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/ui/fldui/flddb.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/ui/fldui/flddb.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/ui/fldui/flddb.cxx Mon Aug 20 11:46:19 2012
@@ -418,7 +418,7 @@ IMPL_LINK( SwFldDBPage, TypeHdl, ListBox
aValueED.SetText(aEmptyStr);
if (bCond)
aConditionED.SetText( String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM( "sal_True" )));
+ RTL_CONSTASCII_STRINGPARAM( "TRUE" )));
else
aConditionED.SetText(aEmptyStr);
}
Modified: incubator/ooo/branches/writer001/main/sw/source/ui/misc/num.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/ui/misc/num.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/ui/misc/num.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/ui/misc/num.cxx Mon Aug 20 11:46:19 2012
@@ -312,6 +312,11 @@ void SwNumPositionTabPage::InitControls(
nMask <<= 1;
}
+ if (MAXLEVEL <= nLvl)
+ {
+ OSL_ENSURE(false, "cannot happen.");
+ return;
+ }
if(bSameDistBorderNum)
{
long nDistBorderNum;
Modified: incubator/ooo/branches/writer001/main/sw/source/ui/table/tabledlg.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/ui/table/tabledlg.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/ui/table/tabledlg.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/ui/table/tabledlg.cxx Mon Aug 20 11:46:19 2012
@@ -1083,6 +1083,12 @@ void SwTableColumnPage::ModifyHdl( Per
if(pEdit == pFieldArr[i])
break;
+ if (MET_FIELDS <= i)
+ {
+ OSL_ENSURE(false, "cannot happen.");
+ return;
+ }
+
SetVisibleWidth(aValueTbl[i], static_cast< SwTwips >(pEdit->DenormalizePercent(pEdit->GetValue( FUNIT_TWIP ))) );
nAktPos = aValueTbl[i];
Modified: incubator/ooo/branches/writer001/main/sw/source/ui/uno/unomod.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/ui/uno/unomod.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/ui/uno/unomod.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/ui/uno/unomod.cxx Mon Aug 20 11:46:19 2012
@@ -89,7 +89,7 @@ enum SwViewSettingsPropertyHandles
HANDLE_VIEWSET_SOLID_MARK_HANDLES,
HANDLE_VIEWSET_ZOOM_TYPE,
HANDLE_VIEWSET_ZOOM,
- HANDLE_VIEWSET_PREVENT_TIPS,
+ HANDLE_VIEWSET_SHOW_CONTENT_TIPS,
HANDLE_VIEWSET_HELP_URL,
HANDLE_VIEWSET_VRULER_RIGHT,
HANDLE_VIEWSET_SHOW_RULER,
@@ -133,7 +133,7 @@ static ChainablePropertySetInfo * lcl_cr
{ RTL_CONSTASCII_STRINGPARAM ( "IsRasterVisible"), HANDLE_VIEWSET_IS_RASTER_VISIBLE, CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
{ RTL_CONSTASCII_STRINGPARAM ( "IsSnapToRaster"), HANDLE_VIEWSET_IS_SNAP_TO_RASTER, CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
{ RTL_CONSTASCII_STRINGPARAM ( "IsVertRulerRightAligned"),HANDLE_VIEWSET_VRULER_RIGHT , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
- { RTL_CONSTASCII_STRINGPARAM ( "PreventHelpTips" ), HANDLE_VIEWSET_PREVENT_TIPS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
+ { RTL_CONSTASCII_STRINGPARAM ( "ShowContentTips" ), HANDLE_VIEWSET_SHOW_CONTENT_TIPS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
{ RTL_CONSTASCII_STRINGPARAM ( "RasterResolutionX"), HANDLE_VIEWSET_RASTER_RESOLUTION_X, CPPUTYPE_INT32, PROPERTY_NONE, 0},
{ RTL_CONSTASCII_STRINGPARAM ( "RasterResolutionY"), HANDLE_VIEWSET_RASTER_RESOLUTION_Y, CPPUTYPE_INT32, PROPERTY_NONE, 0},
{ RTL_CONSTASCII_STRINGPARAM ( "RasterSubdivisionX"), HANDLE_VIEWSET_RASTER_SUBDIVISION_X, CPPUTYPE_INT32, PROPERTY_NONE, 0},
@@ -686,7 +686,7 @@ void SwXViewSettings::_setSingleValue( c
case HANDLE_VIEWSET_TEXT_BOUNDARIES : mpViewOption->SetDocBoundaries(bVal); break;
case HANDLE_VIEWSET_SMOOTH_SCROLLING : mpViewOption->SetSmoothScroll(bVal); break;
case HANDLE_VIEWSET_SOLID_MARK_HANDLES : mpViewOption->SetSolidMarkHdl(bVal); break;
- case HANDLE_VIEWSET_PREVENT_TIPS : mpViewOption->SetPreventTips(bVal); break;
+ case HANDLE_VIEWSET_SHOW_CONTENT_TIPS : mpViewOption->SetShowContentTips(bVal); break;
case HANDLE_VIEWSET_IS_RASTER_VISIBLE : mpViewOption->SetGridVisible(bVal); break;
case HANDLE_VIEWSET_IS_SNAP_TO_RASTER : mpViewOption->SetSnap(bVal); break;
case HANDLE_VIEWSET_RASTER_RESOLUTION_X :
@@ -917,7 +917,7 @@ void SwXViewSettings::_getSingleValue( c
case HANDLE_VIEWSET_TEXT_BOUNDARIES : bBoolVal = SwViewOption::IsDocBoundaries(); break;
case HANDLE_VIEWSET_SMOOTH_SCROLLING : bBoolVal = mpConstViewOption->IsSmoothScroll(); break;
case HANDLE_VIEWSET_SOLID_MARK_HANDLES : bBoolVal = mpConstViewOption->IsSolidMarkHdl(); break;
- case HANDLE_VIEWSET_PREVENT_TIPS : bBoolVal = mpConstViewOption->IsPreventTips(); break;
+ case HANDLE_VIEWSET_SHOW_CONTENT_TIPS : bBoolVal = mpConstViewOption->IsShowContentTips(); break;
case HANDLE_VIEWSET_IS_RASTER_VISIBLE : bBoolVal = mpConstViewOption->IsGridVisible(); break;
case HANDLE_VIEWSET_IS_SNAP_TO_RASTER : bBoolVal = mpConstViewOption->IsSnap(); break;
case HANDLE_VIEWSET_RASTER_RESOLUTION_X :
Modified: incubator/ooo/branches/writer001/main/sw/source/ui/uno/unotxdoc.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/ui/uno/unotxdoc.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/ui/uno/unotxdoc.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/ui/uno/unotxdoc.cxx Mon Aug 20 11:46:19 2012
@@ -2783,6 +2783,10 @@ sal_Int32 SAL_CALL SwXTextDocument::getR
}
else
{
+ if ( m_pRenderData->HasPostItData() )
+ {
+ m_pRenderData->DeletePostItData();
+ }
const sal_Int16 nPostItMode = (sal_Int16) m_pPrintUIOptions->getIntValue( "PrintAnnotationMode", 0 );
if (nPostItMode != POSTITS_NONE)
{
Modified: incubator/ooo/branches/writer001/main/sw/source/ui/utlui/unotools.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/sw/source/ui/utlui/unotools.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/sw/source/ui/utlui/unotools.cxx (original)
+++ incubator/ooo/branches/writer001/main/sw/source/ui/utlui/unotools.cxx Mon Aug 20 11:46:19 2012
@@ -432,7 +432,8 @@ void SwOneExampleFrame::CreatePopup(cons
sal_Int16 nZoom = 0;
aZoom >>= nZoom;
- for(sal_uInt16 i = 0; i < 5; i++ )
+ for (sal_uInt16 i = 0;
+ i < (sizeof(nZoomValues)/sizeof(nZoomValues[0])); ++i)
{
String sTemp;
sTemp = String::CreateFromInt32(nZoomValues[i]);
@@ -453,7 +454,8 @@ void SwOneExampleFrame::CreatePopup(cons
IMPL_LINK(SwOneExampleFrame, PopupHdl, Menu*, pMenu )
{
sal_uInt16 nId = pMenu->GetCurItemId();
- if( nId > ITEM_ZOOM && nId < ITEM_ZOOM + 100 )
+ if ((nId > ITEM_ZOOM) &&
+ (nId <= (ITEM_ZOOM + (sizeof(nZoomValues)/sizeof(nZoomValues[0])))))
{
sal_Int16 nZoom = nZoomValues[nId - ITEM_ZOOM - 1];
uno::Reference< view::XViewSettingsSupplier > xSettings(_xController, uno::UNO_QUERY);
Propchange: incubator/ooo/branches/writer001/main/test/testcommon/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Aug 20 11:46:19 2012
@@ -0,0 +1 @@
+bin
Propchange: incubator/ooo/branches/writer001/main/test/testcommon/source/org/openoffice/test/vcl/
------------------------------------------------------------------------------
Merged /incubator/ooo/branches/alg/linecap/main/test/testcommon/source/org/openoffice/test/vcl:r1226811-1232461
Merged /incubator/ooo/branches/AOO34/main/test/testcommon/source/org/openoffice/test/vcl:r1346776-1346777,1347535,1348052,1350569,1352456,1369110,1371068
Merged /incubator/ooo/branches/alg/svgreplacement/main/test/testcommon/source/org/openoffice/test/vcl:r1205420-1220782
Merged /incubator/ooo/trunk/main/test/testcommon/source/org/openoffice/test/vcl:r1354303-1374969
Propchange: incubator/ooo/branches/writer001/main/test/testgui/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Aug 20 11:46:19 2012
@@ -0,0 +1 @@
+bin
Propchange: incubator/ooo/branches/writer001/main/test/testuno/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Aug 20 11:46:19 2012
@@ -0,0 +1 @@
+.classpath