Commits

Anonymous committed f1263e9

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)

Comments (0)

Files changed (9)

svx/source/sdr/contact/objectcontactofpageview.cxx

             basegfx::B2DRange aViewRange;
 
 			// create ViewRange
-			if(isOutputToRecordingMetaFile())
+            if(isOutputToRecordingMetaFile())
             {
-                if(isOutputToPDFFile())
+                if(isOutputToPDFFile() || isOutputToPrinter())
                 {
                     // #i98402# if it's a PDF export, set the ClipRegion as ViewRange. This is
                     // mainly because SW does not use DrawingLayer Page-Oriented and if not doing this,
                     // all existing objects will be collected as primitives and processed.
-					const Rectangle aLogicClipRectangle(rDisplayInfo.GetRedrawArea().GetBoundRect());
+                    // OD 2009-03-05 #i99876# perform the same also for SW on printing.
+                    const Rectangle aLogicClipRectangle(rDisplayInfo.GetRedrawArea().GetBoundRect());
 
                     aViewRange = basegfx::B2DRange(
                         aLogicClipRectangle.Left(), aLogicClipRectangle.Top(), 
 /*************************************************************************
  *
  * 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
 	virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
 
 	virtual Size GetTwipSize() const;
-	
+
     Graphic* GetGraphic();
 
 	Graphic* GetHCGraphic(); // tries to retrieve HighContrast representation if possible
 
 	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; }

sw/source/core/doc/notxtfrm.cxx

 
 #include <svtools/embedhlp.hxx>
 #include <svtools/chartprettypainter.hxx>
+// --> OD 2009-03-05 #i99665#
+#include <dview.hxx>
+// <--
 
 using namespace com::sun::star;
 
     }
     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());
 
             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 );
+        }
+        // <--
 	}
 }
 

sw/source/core/draw/dview.cxx

 /*************************************************************************
  *
  * 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
 	SetBufferedOutputAllowed(getOptionsDrawinglayer().IsPaintBuffer_Writer());
 }
 
+// --> OD 2009-03-05 #i99665#
+sal_Bool SwDrawView::IsAntiAliasing() const
+{
+    return getOptionsDrawinglayer().IsAntiAliasing();
+}
+// <--
+
 /*************************************************************************
 |*
 |*	SwDrawView::AddCustomHdl()

sw/source/core/inc/dview.hxx

 /*************************************************************************
  *
  * 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
 	//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 );

sw/source/core/ole/ndole.cxx

 /*************************************************************************
  *
  * 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
 	}
 }
 
+// --> 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 ),

sw/source/filter/ww8/wrtw8nds.cxx

 
     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;
                             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);
         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
     (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++;
     }
 }

sw/source/filter/ww8/wrtww8.cxx

 {
     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())

sw/source/filter/ww8/ww8par3.cxx

 #include "ww8par.hxx"
 #include "ww8par2.hxx"  // wg. Listen-Attributen in Styles
 
-#include <bookmrk.hxx>	
+#include <bookmrk.hxx>
 #include <svtools/fltrcfg.hxx>
 
 #include <stdio.h>
 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)
 {
 	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();
 		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;
     sal_Bool bUseEnhFields=(pOpt && pOpt->IsUseEnhancedFields());
 
     if (!bUseEnhFields) {
-	pFormImpl->InsertFormula(aFormula); 
+	pFormImpl->InsertFormula(aFormula);
 	return FLD_OK;
     } else {
 	String aBookmarkName;
 		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;
             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;
     /*
             }
             // <--
 
-            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);
+            // --> 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 )
+            {
+                const SwNumFmt& rFmt = pTxtNd->GetNumRule()->Get( nActLevel );
+                if ( rFmt.GetPositionAndSpaceMode() ==
+                                            SvxNumberFormat::LABEL_ALIGNMENT )
+                {
+                    bApplyListLevelIndentDirectlyAtPara = false;
+                }
+            }
 
-            /*
-             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()))
+            if ( bApplyListLevelIndentDirectlyAtPara )
             {
-                SfxItemSet* pOldAktItemSet = pAktItemSet;
-                SetAktItemSet(&aListIndent);
+                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);
 
-                sal_uInt8* pSprms1  = &aParaSprms[0];
-                while (0 < nLen)
+                /*
+                 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()))
                 {
-                    sal_uInt16 nL1 = ImportSprm(pSprms1);
-                    nLen = nLen - nL1;
-                    pSprms1 += nL1;
+                    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);
                 }
 
-                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);
+                }
             }
-
-            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);
-            }
+            // <--
         }
     }
 }