diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2009-03-17 10:06:02 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2009-03-17 10:06:02 +0000 |
commit | ed70324471375b5c3c7ed0094b1898ac44d06903 (patch) | |
tree | ebae682f9f432b26ffc078e6191f62eb4cfd3f64 /sw | |
parent | 431c98a9bbd1f07498c36f6b446b0d80a27797a0 (diff) |
CWS-TOOLING: integrate CWS hb20_DEV300
2009-03-10 09:17:27 +0100 od r269243 : #i100043# method <OutWW8_SwTxtNode(..)>
- if paragraph is numbered via set list style at paragraph style
and list level indent values of LABEL_ALIGNMENT list level style
not applicable, put indent values into temporary itemset for export
NOTE: This is a correction of fix for issue i94187
2009-03-06 08:42:17 +0100 od r268967 : #i99665# method <SwNoTxtFrm::PaintPicture(..)>
- adjust AntiAliasing mode at output device for the output
of the chart OLE replacement image
2009-03-05 12:04:34 +0100 od r268894 : #i99876# method <ObjectContactOfPageView::DoProcessDisplay(..)>
- set the ClipRegion as ViewRange on printing, as already done on PDF export
2009-03-05 11:48:13 +0100 od r268891 : #i99822# method <SwWW8ImplReader::RegisterNumFmtOnTxtNode(..)>
- do not apply list level formatting indents directly at the text node
for list levels of position and space mode LABEL_ALIGNMENT
2009-03-05 09:25:24 +0100 hbrinkm r268876 : #i99789# write vertical merge flags
2009-03-05 08:30:31 +0100 hbrinkm r268872 : CWS-TOOLING: rebase CWS hb20 to branches/OOO310@268862 (milestone: OOO310:m4)
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/ndole.hxx | 8 | ||||
-rw-r--r-- | sw/source/core/doc/notxtfrm.cxx | 23 | ||||
-rw-r--r-- | sw/source/core/draw/dview.cxx | 9 | ||||
-rw-r--r-- | sw/source/core/inc/dview.hxx | 6 | ||||
-rw-r--r-- | sw/source/core/ole/ndole.cxx | 19 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8nds.cxx | 47 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8.cxx | 7 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par3.cxx | 92 |
8 files changed, 149 insertions, 62 deletions
diff --git a/sw/inc/ndole.hxx b/sw/inc/ndole.hxx index 3ebb75634f..f05a2784b1 100644 --- a/sw/inc/ndole.hxx +++ b/sw/inc/ndole.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -121,7 +121,7 @@ public: virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const; virtual Size GetTwipSize() const; - + Graphic* GetGraphic(); Graphic* GetHCGraphic(); // tries to retrieve HighContrast representation if possible @@ -149,6 +149,10 @@ public: void CheckFileLink_Impl(); + // --> OD 2009-03-05 #i99665# + bool IsChart() const; + // <-- + #ifndef _FESHVIEW_ONLY_INLINE_NEEDED const String& GetChartTblName() const { return sChartTblName; } void SetChartTblName( const String& rNm ) { sChartTblName = rNm; } diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 9924d06ff4..a01b28066f 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -82,6 +82,9 @@ #include <svtools/embedhlp.hxx> #include <svtools/chartprettypainter.hxx> +// --> OD 2009-03-05 #i99665# +#include <dview.hxx> +// <-- using namespace com::sun::star; @@ -955,6 +958,18 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons } else if( pOLENd ) { + // --> OD 2009-03-05 #i99665# + // Adjust AntiAliasing mode at output device for chart OLE + const USHORT nFormerAntialiasingAtOutput( pOut->GetAntialiasing() ); + if ( pOLENd->IsChart() && + pShell->Imp()->GetDrawView()->IsAntiAliasing() ) + { + const USHORT nAntialiasingForChartOLE = + nFormerAntialiasingAtOutput | ANTIALIASING_PIXELSNAPHAIRLINE; + pOut->SetAntialiasing( nAntialiasingForChartOLE ); + } + // <-- + Point aPosition(aAlignedGrfArea.Pos()); Size aSize(aAlignedGrfArea.SSize()); @@ -1003,6 +1018,14 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons ASSERT( pFly, "OLE not in FlyFrm" ); ((SwFEShell*)pShell)->ConnectObj( pOLENd->GetOLEObj().GetObject(), pFly->Prt(), pFly->Frm()); } + + // --> OD 2009-03-05 #i99665# + if ( pOLENd->IsChart() && + pShell->Imp()->GetDrawView()->IsAntiAliasing() ) + { + pOut->SetAntialiasing( nFormerAntialiasingAtOutput ); + } + // <-- } } diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx index a481656f05..a913877e9a 100644 --- a/sw/source/core/draw/dview.cxx +++ b/sw/source/core/draw/dview.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -146,6 +146,13 @@ SwDrawView::SwDrawView( SwViewImp &rI, SdrModel *pMd, OutputDevice *pOutDev) : SetBufferedOutputAllowed(getOptionsDrawinglayer().IsPaintBuffer_Writer()); } +// --> OD 2009-03-05 #i99665# +sal_Bool SwDrawView::IsAntiAliasing() const +{ + return getOptionsDrawinglayer().IsAntiAliasing(); +} +// <-- + /************************************************************************* |* |* SwDrawView::AddCustomHdl() diff --git a/sw/source/core/inc/dview.hxx b/sw/source/core/inc/dview.hxx index 45d4be735c..103090df05 100644 --- a/sw/source/core/inc/dview.hxx +++ b/sw/source/core/inc/dview.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -119,6 +119,10 @@ public: //JP 06.10.98: 2. Versuch inline void ValidateMarkList() { FlushComeBackTimer(); } + // --> OD 2009-03-05 #i99665# + sal_Bool IsAntiAliasing() const; + // <-- + // OD 18.06.2003 #108784# - method to replace marked/selected <SwDrawVirtObj> // by its reference object for delete of selection and group selection static void ReplaceMarkedDrawVirtObjs( SdrMarkView& _rMarkView ); diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index 4244ad7d8a..ac10e486f6 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -644,6 +644,23 @@ void SwOLENode::CheckFileLink_Impl() } } +// --> OD 2009-03-05 #i99665# +bool SwOLENode::IsChart() const +{ + bool bIsChart( false ); + + const uno::Reference< embed::XEmbeddedObject > xEmbObj = + const_cast<SwOLEObj&>(GetOLEObj()).GetOleRef(); + if ( xEmbObj.is() ) + { + SvGlobalName aClassID( xEmbObj->getClassID() ); + bIsChart = SotExchange::IsChart( aClassID ); + } + + return bIsChart; +} +// <-- + SwOLEObj::SwOLEObj( const svt::EmbeddedObjectRef& xObj ) : pOLENd( 0 ), pListener( 0 ), diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index fc15a62c45..cb195989a1 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -1515,10 +1515,10 @@ Writer& OutWW8_SwTxtNode( Writer& rWrt, SwCntntNode& rNode ) ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo(rWW8Wrt.mpTableInfo->getTableNodeInfo(pNd)); ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner; - + if (pTextNodeInfo.get() != NULL) pTextNodeInfoInner = pTextNodeInfo->getFirstInner(); - + xub_StrLen nAktPos = 0; xub_StrLen nEnd = aStr.Len(); bool bUnicode = rWW8Wrt.bWrtWW8, bRedlineAtEnd = false; @@ -1889,20 +1889,29 @@ Writer& OutWW8_SwTxtNode( Writer& rWrt, SwCntntNode& rNode ) aLR.SetTxtFirstLineOfstValue(pFmt->GetAbsLSpace() - pFmt->GetFirstLineOffset()); else aLR.SetTxtFirstLineOfst(GetWordFirstLineOffset(*pFmt)); + } + // <-- - // --> OD 2009-01-12 #i94187# - // set list style directly only in position and space mode LABEL_WIDTH_AND_POSITION - if (SFX_ITEM_SET != - pTmpSet->GetItemState(RES_PARATR_NUMRULE, false) ) + // --> OD 2009-03-09 #100020# + // correct fix for issue i94187 + if (SFX_ITEM_SET != + pTmpSet->GetItemState(RES_PARATR_NUMRULE, false) ) + { + // List style set via paragraph style - then put it into the itemset. + // This is needed to get list level and list id exported for + // the paragraph. + pTmpSet->Put( SwNumRuleItem( pRule->GetName() )); + + // Put indent values into the itemset in case that the list + // style is applied via paragraph style and the list level + // indent values are not applicable. + if ( pFmt->GetPositionAndSpaceMode() == + SvxNumberFormat::LABEL_ALIGNMENT && + !pNd->AreListLevelIndentsApplicable() ) { - //If the numbering is not outline, and theres no numrule - //name in the itemset, put one in there - - // NumRule from a template - then put it into the itemset - pTmpSet->Put( SwNumRuleItem( pRule->GetName() )); + pTmpSet->Put( aLR ); } } - // <-- } else pTmpSet->ClearItem(RES_PARATR_NUMRULE); @@ -2108,15 +2117,15 @@ Writer& OutWW8_SwTxtNode( Writer& rWrt, SwCntntNode& rNode ) if (pTextNodeInfoInner->isEndOfLine()) { rWW8Wrt.WriteRowEnd(pTextNodeInfoInner->getDepth()); - + pO->Insert( (BYTE*)&nSty, 2, pO->Count() ); // Style # rWW8Wrt.OutWW8TableInfoRow(pTextNodeInfoInner); rWW8Wrt.pPapPlc->AppendFkpEntry( rWrt.Strm().Tell(), pO->Count(), pO->GetData() ); - pO->Remove( 0, pO->Count() ); // leeren + pO->Remove( 0, pO->Count() ); // leeren } } - + #ifdef DEBUG ::std::clog << "</OutWW8_SwTxtNode>" << ::std::endl; #endif @@ -2133,25 +2142,25 @@ void SwWW8Writer::OutWW8TableNodeInfo(ww8::WW8TableNodeInfo::Pointer_t pNodeInfo (pNodeInfo->getInners().begin()); ww8::WW8TableNodeInfo::Inners_t::const_iterator aItEnd (pNodeInfo->getInners().end()); - + while (aIt != aItEnd) { ww8::WW8TableNodeInfoInner::Pointer_t pInner = aIt->second; if (pInner->isEndOfCell()) { WriteRowEnd(pInner->getDepth()); - + pO->Insert( (BYTE*)&nSty, 2, pO->Count() ); // Style # OutWW8TableInfoRow(pInner); pPapPlc->AppendFkpEntry( Strm().Tell(), pO->Count(), pO->GetData() ); pO->Remove( 0, pO->Count() ); // leeren } - + if (pInner->isEndOfLine()) { } - + aIt++; } } diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index cf14b6b1b0..94f776bc62 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -1851,7 +1851,12 @@ static sal_uInt16 lcl_TCFlags(const SwTableBox * pBox) { sal_uInt16 nFlags = 0; - //long nRowSpan = pBox->getRowSpan(); + long nRowSpan = pBox->getRowSpan(); + + if (nRowSpan > 1) + nFlags |= (3 << 5); + else if (nRowSpan < 0) + nFlags |= (1 << 5); const SwFrmFmt * pFmt = pBox->GetFrmFmt(); switch (pFmt->GetVertOrient().GetVertOrient()) diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 75679a8a03..cc524c68ae 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -94,7 +94,7 @@ #include "ww8par.hxx" #include "ww8par2.hxx" // wg. Listen-Attributen in Styles -#include <bookmrk.hxx> +#include <bookmrk.hxx> #include <svtools/fltrcfg.hxx> #include <stdio.h> @@ -104,7 +104,7 @@ using namespace sw::util; using namespace sw::types; WW8NewFieldCtx::WW8NewFieldCtx(SwPosition &aStartPos, ::rtl::OUString _sBookmarkName, ::rtl::OUString _sBookmarkType) -: maPtNode(aStartPos.nNode), mnPtCntnt(aStartPos.nContent.GetIndex()), +: maPtNode(aStartPos.nNode), mnPtCntnt(aStartPos.nContent.GetIndex()), sBookmarkName(_sBookmarkName), sBookmarkType(_sBookmarkType), mpPaM(NULL) { @@ -196,7 +196,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, String& rStr ) aFld.SetHelp(aFormula.sHelp); aFld.SetToolTip(aFormula.sToolTip); - rDoc.Insert(*pPaM, SwFmtFld(aFld), 0); + rDoc.Insert(*pPaM, SwFmtFld(aFld), 0); return FLD_OK; } else { WW8PLCFx_Book* pB = pPlcxMan->GetBook(); @@ -208,7 +208,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, String& rStr ) USHORT bkmFindIdx; String aBookmarkFind=pB->GetBookmark(currentCP-1, currentCP+currentLen-1, bkmFindIdx); - if (aBookmarkFind.Len()>0) { + if (aBookmarkFind.Len()>0) { pB->SetStatus(bkmFindIdx, BOOK_FIELD); // mark bookmark as consumed, such that tl'll not get inserted as a "normal" bookmark again if (aBookmarkFind.Len()>0) { aBookmarkName=aBookmarkFind; @@ -244,7 +244,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormCheckBox( WW8FieldDesc* pF, String& rStr ) sal_Bool bUseEnhFields=(pOpt && pOpt->IsUseEnhancedFields()); if (!bUseEnhFields) { - pFormImpl->InsertFormula(aFormula); + pFormImpl->InsertFormula(aFormula); return FLD_OK; } else { String aBookmarkName; @@ -256,7 +256,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormCheckBox( WW8FieldDesc* pF, String& rStr ) USHORT bkmFindIdx; String aBookmarkFind=pB->GetBookmark(currentCP-1, currentCP+currentLen-1, bkmFindIdx); - if (aBookmarkFind.Len()>0) { + if (aBookmarkFind.Len()>0) { pB->SetStatus(bkmFindIdx, BOOK_FIELD); // mark as consumed by field if (aBookmarkFind.Len()>0) { aBookmarkName=aBookmarkFind; @@ -1513,7 +1513,7 @@ SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition, pFmt.SetNumAdjust(SVX_ADJUST_LEFT); else if ( pFmt.GetNumAdjust() == SVX_ADJUST_LEFT) pFmt.SetNumAdjust(SVX_ADJUST_RIGHT); - pLFOInfo->pNumRule->Set(nLevel, pFmt); + pLFOInfo->pNumRule->Set(nLevel, pFmt); } nLastLFOPosition = nLFOPosition; /* @@ -1842,43 +1842,61 @@ void SwWW8ImplReader::RegisterNumFmtOnTxtNode(sal_uInt16 nActLFO, } // <-- - SfxItemSet aListIndent(rDoc.GetAttrPool(), RES_LR_SPACE, - RES_LR_SPACE); - const SvxLRSpaceItem *pItem = (const SvxLRSpaceItem*)( - GetFmtAttr(RES_LR_SPACE)); - ASSERT(pItem, "impossible"); - if (pItem) - aListIndent.Put(*pItem); - - /* - Take the original paragraph sprms attached to this list level - formatting and apply them to the paragraph. I'm convinced that - this is exactly what word does. - */ - if (short nLen = static_cast< short >(aParaSprms.size())) + // --> OD 2009-03-04 #i99822# + // Direct application of the list level formatting no longer + // needed for list levels of mode LABEL_ALIGNMENT + bool bApplyListLevelIndentDirectlyAtPara( true ); + if ( pTxtNd->GetNumRule() && nActLevel < MAXLEVEL ) { - SfxItemSet* pOldAktItemSet = pAktItemSet; - SetAktItemSet(&aListIndent); - - sal_uInt8* pSprms1 = &aParaSprms[0]; - while (0 < nLen) + const SwNumFmt& rFmt = pTxtNd->GetNumRule()->Get( nActLevel ); + if ( rFmt.GetPositionAndSpaceMode() == + SvxNumberFormat::LABEL_ALIGNMENT ) { - sal_uInt16 nL1 = ImportSprm(pSprms1); - nLen = nLen - nL1; - pSprms1 += nL1; + bApplyListLevelIndentDirectlyAtPara = false; } - - SetAktItemSet(pOldAktItemSet); } - const SvxLRSpaceItem *pLR = - HasItem<SvxLRSpaceItem>(aListIndent, RES_LR_SPACE); - ASSERT(pLR, "Impossible"); - if (pLR) + if ( bApplyListLevelIndentDirectlyAtPara ) { - pCtrlStck->NewAttr(*pPaM->GetPoint(), *pLR); - pCtrlStck->SetAttr(*pPaM->GetPoint(), RES_LR_SPACE); + SfxItemSet aListIndent(rDoc.GetAttrPool(), RES_LR_SPACE, + RES_LR_SPACE); + const SvxLRSpaceItem *pItem = (const SvxLRSpaceItem*)( + GetFmtAttr(RES_LR_SPACE)); + ASSERT(pItem, "impossible"); + if (pItem) + aListIndent.Put(*pItem); + + /* + Take the original paragraph sprms attached to this list level + formatting and apply them to the paragraph. I'm convinced that + this is exactly what word does. + */ + if (short nLen = static_cast< short >(aParaSprms.size())) + { + SfxItemSet* pOldAktItemSet = pAktItemSet; + SetAktItemSet(&aListIndent); + + sal_uInt8* pSprms1 = &aParaSprms[0]; + while (0 < nLen) + { + sal_uInt16 nL1 = ImportSprm(pSprms1); + nLen = nLen - nL1; + pSprms1 += nL1; + } + + SetAktItemSet(pOldAktItemSet); + } + + const SvxLRSpaceItem *pLR = + HasItem<SvxLRSpaceItem>(aListIndent, RES_LR_SPACE); + ASSERT(pLR, "Impossible"); + if (pLR) + { + pCtrlStck->NewAttr(*pPaM->GetPoint(), *pLR); + pCtrlStck->SetAttr(*pPaM->GetPoint(), RES_LR_SPACE); + } } + // <-- } } } |