summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/ndole.hxx4
-rw-r--r--sw/source/core/doc/notxtfrm.cxx23
-rw-r--r--sw/source/core/draw/dview.cxx7
-rw-r--r--sw/source/core/inc/dview.hxx4
-rw-r--r--sw/source/core/ole/ndole.cxx17
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx29
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx7
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx78
8 files changed, 128 insertions, 41 deletions
diff --git a/sw/inc/ndole.hxx b/sw/inc/ndole.hxx
index 41dde811bc40..49e0e724f10c 100644
--- a/sw/inc/ndole.hxx
+++ b/sw/inc/ndole.hxx
@@ -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 3c813621ea29..889cb7beb298 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 bd5e08a7af4a..51ef762c63df 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -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 d867b8e9e259..8d1988903aa8 100644
--- a/sw/source/core/inc/dview.hxx
+++ b/sw/source/core/inc/dview.hxx
@@ -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 b574ae991b02..1e1e5e503e08 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -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 c5f94b3230c8..cb195989a1ea 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -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);
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 770c7d6868b2..f8e783a02188 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 320b67e8482f..cc524c68ae28 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -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);
+ }
}
+ // <--
}
}
}