summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2009-07-27 16:24:52 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2009-07-27 16:24:52 +0000
commit63f73773c262a2b3c70bc378b3e3088049595bfd (patch)
tree19286c12b7932d43791e178dfa153643a112d05b /svx/source
parent2368e19408f86f1a55c6342cdd03b7c4d1a962f9 (diff)
CWS-TOOLING: integrate CWS aw073
2009-07-16 11:21:19 +0200 aw r274036 : corrections after resync 2009-07-15 13:34:18 +0200 aw r274009 : CWS-TOOLING: rebase CWS aw073 to trunk@273858 (milestone: DEV300:m52) 2009-07-01 20:04:27 +0200 aw r273613 : CWS-TOOLING: rebase CWS aw073 to trunk@273468 (milestone: DEV300:m51) 2009-06-24 11:51:03 +0200 aw r273324 : #i102062# added using statement for solaris compiler 2009-06-23 12:53:50 +0200 aw r273278 : #i100158# force filled polygons to closed state 2009-06-23 12:28:33 +0200 aw r273276 : #i100158#, #i102371# corrected all (mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW) shortcuts to support line/fill and to be not used when FillMode is not overpaint 2009-06-23 12:15:14 +0200 aw r273274 : #i100158# added PolyPolygon support for snapPointsOfHorizontalOrVerticalEdges helper 2009-06-22 17:28:33 +0200 aw r273244 : #i101508# added taking care of cell's distance-to-border values for cell text primitive creation 2009-06-22 12:59:10 +0200 aw r273218 : #i102253# applied patch from OD (see task) 2009-06-18 17:00:52 +0200 aw r273125 : #i102251# added EE_CNTRL_ONLINESPELLING switch off at DrawOutliner during GraphicExporter::GetGraphic 2009-06-18 14:35:57 +0200 aw r273120 : #i102241# added mergeToSinglePolyPolygon usage to SdrObject::ImpConvertToContourObj 2009-06-18 14:35:20 +0200 aw r273119 : #i102241# improved PolygonStrokePrimitive2D::createLocalDecomposition 2009-06-18 14:34:49 +0200 aw r273118 : #i102241# Made B2DCubicBezier::testAndSolveTrivialBezier() numerically more stable 2009-06-17 16:11:21 +0200 aw r273078 : #i102062# added compare support for OutlireParaObject's WrongList in an extra method; using in primitive comparators 2009-06-16 19:10:18 +0200 aw r273037 : #i101957# corrected: offset needs to be added before rotation and shear 2009-06-16 18:58:43 +0200 aw r273035 : #i101957# added needed offset by object width to SdrTextObj::impDecomposeStretchTextPrimitive for vertical texts 2009-06-16 18:35:55 +0200 aw r273034 : #i101941# corrected object initialisation for 3D Scenes on Clone operator 2009-06-16 16:07:30 +0200 aw r273024 : #i101811# extended renderChartPrimitive2D to create a correct embedding in a new MapMode 2009-06-12 19:38:07 +0200 aw r272940 : #i101734# added test code to experiment on demand with more complex transformations for virtual objects than only translations 2009-06-12 19:37:07 +0200 aw r272939 : #i101734# corrected SvtGraphicStroke preparation in MetaFile renderer (AFAP) 2009-06-12 16:31:55 +0200 aw r272931 : #i101648# re-enabled object creation with objecttype OBJ_NONE for SW Frame creation 2009-06-12 13:59:05 +0200 aw r272917 : #i101598# supported AAed single line paint in VCL 2009-06-12 11:34:25 +0200 aw r272907 : #i101598# adapted Graphic::GetBitmap() usage 2009-06-10 16:34:19 +0200 aw r272830 : #i101598# added VCL_DLLPUBLIC to parameter class 2009-06-10 16:30:27 +0200 aw r272829 : #i101598# extended calls to Graphic::GetBitmap/Ex where conversions to Bitmap objects is needed to user defined parameters like AntiAlisasing 2009-06-10 16:28:44 +0200 aw r272828 : #i101598# extended Graphic::GetBitmap/Ex interfaces to transport raster conversion parameters since these calls potentially need to rasterconvert a contained MetaFile 2009-06-09 16:26:40 +0200 aw r272781 : #i100945# checked in proposed patch for now 2009-06-08 18:01:42 +0200 aw r272742 : #i101239# teached BinTextObject to register at EditEngineItemPool sub-pool, not on given pool directly
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/editeng/editobj.cxx76
-rw-r--r--svx/source/editeng/editobj2.hxx13
-rw-r--r--svx/source/editeng/edtspell.cxx25
-rw-r--r--svx/source/engine3d/scene3d.cxx13
-rw-r--r--svx/source/gallery2/galobj.cxx3
-rw-r--r--svx/source/outliner/outlobj.cxx17
-rw-r--r--svx/source/sdr/attribute/sdrtextattribute.cxx5
-rw-r--r--svx/source/sdr/primitive2d/sdrattributecreator.cxx28
-rw-r--r--svx/source/svdraw/svdcrtv.cxx9
-rw-r--r--svx/source/svdraw/svdobj.cxx68
-rw-r--r--svx/source/svdraw/svdopath.cxx17
-rw-r--r--svx/source/svdraw/svdotextdecomposition.cxx16
-rw-r--r--svx/source/svdraw/svdtext.cxx11
-rw-r--r--svx/source/svdraw/svdxcgv.cxx12
-rw-r--r--svx/source/table/viewcontactoftableobj.cxx25
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx33
16 files changed, 309 insertions, 62 deletions
diff --git a/svx/source/editeng/editobj.cxx b/svx/source/editeng/editobj.cxx
index a9d3bca341..d8f0a332b9 100644
--- a/svx/source/editeng/editobj.cxx
+++ b/svx/source/editeng/editobj.cxx
@@ -253,6 +253,18 @@ void ContentInfo::DestroyLoadStoreTempInfos()
}
*/
+// #i102062#
+bool ContentInfo::isWrongListEqual(const ContentInfo& rCompare) const
+{
+ if(GetWrongList() == rCompare.GetWrongList())
+ return true;
+
+ if(!GetWrongList() || !rCompare.GetWrongList())
+ return false;
+
+ return (*GetWrongList() == *rCompare.GetWrongList());
+}
+
bool ContentInfo::operator==( const ContentInfo& rCompare ) const
{
if( (aText == rCompare.aText) &&
@@ -566,6 +578,12 @@ bool EditTextObject::operator==( const EditTextObject& rCompare ) const
return static_cast< const BinTextObject* >( this )->operator==( static_cast< const BinTextObject& >( rCompare ) );
}
+// #i102062#
+bool EditTextObject::isWrongListEqual(const EditTextObject& rCompare) const
+{
+ return static_cast< const BinTextObject* >(this)->isWrongListEqual(static_cast< const BinTextObject& >(rCompare));
+}
+
// from SfxItemPoolUser
void BinTextObject::ObjectInDestruction(const SfxItemPool& rSfxItemPool)
{
@@ -599,6 +617,23 @@ void BinTextObject::ObjectInDestruction(const SfxItemPool& rSfxItemPool)
}
}
+EditEngineItemPool* getEditEngineItemPool(SfxItemPool* pPool)
+{
+ EditEngineItemPool* pRetval = dynamic_cast< EditEngineItemPool* >(pPool);
+
+ while(!pRetval && pPool && pPool->GetSecondaryPool())
+ {
+ pPool = pPool->GetSecondaryPool();
+
+ if(pPool)
+ {
+ pRetval = dynamic_cast< EditEngineItemPool* >(pPool);
+ }
+ }
+
+ return pRetval;
+}
+
BinTextObject::BinTextObject( SfxItemPool* pP ) :
EditTextObject( EE_FORMAT_BIN ),
SfxItemPoolUser()
@@ -608,9 +643,17 @@ BinTextObject::BinTextObject( SfxItemPool* pP ) :
nUserType = 0;
nObjSettings = 0;
pPortionInfo = 0;
- if ( pP )
+
+ // #i101239# ensure target is a EditEngineItemPool, else
+ // fallback to pool ownership. This is needed to ensure that at
+ // pool destruction time of an alien pool, the pool is still alive.
+ // When registering would happen at an alien pool which just uses an
+ // EditEngineItemPool as some sub-pool, that pool could already
+ // be decoupled and deleted whcih would lead to crashes.
+ pPool = getEditEngineItemPool(pP);
+
+ if ( pPool )
{
- pPool = pP;
bOwnerOfPool = FALSE;
}
else
@@ -621,6 +664,7 @@ BinTextObject::BinTextObject( SfxItemPool* pP ) :
if(!bOwnerOfPool && pPool)
{
+ // it is sure now that the pool is an EditEngineItemPool
pPool->AddSfxItemPoolUser(*this);
}
@@ -641,9 +685,12 @@ BinTextObject::BinTextObject( const BinTextObject& r ) :
nScriptType = r.nScriptType;
pPortionInfo = NULL; // PortionInfo nicht kopieren
bStoreUnicodeStrings = FALSE;
+
if ( !r.bOwnerOfPool )
{
- // Dann den Pool mitverwenden
+ // reuse alien pool; this must be a EditEngineItemPool
+ // since there is no other way to construct a BinTextObject
+ // than it's regular constructor where that is ensured
pPool = r.pPool;
bOwnerOfPool = FALSE;
}
@@ -656,6 +703,7 @@ BinTextObject::BinTextObject( const BinTextObject& r ) :
if(!bOwnerOfPool && pPool)
{
+ // it is sure now that the pool is an EditEngineItemPool
pPool->AddSfxItemPoolUser(*this);
}
@@ -1589,6 +1637,28 @@ bool BinTextObject::operator==( const BinTextObject& rCompare ) const
return true;
}
+// #i102062#
+bool BinTextObject::isWrongListEqual(const BinTextObject& rCompare) const
+{
+ if(GetContents().Count() != rCompare.GetContents().Count())
+ {
+ return false;
+ }
+
+ for(USHORT a(0); a < GetContents().Count(); a++)
+ {
+ const ContentInfo& rCandA(*GetContents().GetObject(a));
+ const ContentInfo& rCandB(*rCompare.GetContents().GetObject(a));
+
+ if(!rCandA.isWrongListEqual(rCandB))
+ {
+ return false;
+ }
+ }
+
+ return true;
+}
+
#define CHARSETMARKER 0x9999
void __EXPORT BinTextObject::CreateData300( SvStream& rIStream )
diff --git a/svx/source/editeng/editobj2.hxx b/svx/source/editeng/editobj2.hxx
index c61a198f47..b37ceabbd7 100644
--- a/svx/source/editeng/editobj2.hxx
+++ b/svx/source/editeng/editobj2.hxx
@@ -181,13 +181,10 @@ public:
WrongList* GetWrongList() const { return pWrongs; }
void SetWrongList( WrongList* p ) { pWrongs = p; }
-
-/* cl removed because not needed anymore since binfilter
- LoadStoreTempInfos* GetLoadStoreTempInfos() const { return pTempLoadStoreInfos; }
- void CreateLoadStoreTempInfos();
- void DestroyLoadStoreTempInfos();
-*/
bool operator==( const ContentInfo& rCompare ) const;
+
+ // #i102062#
+ bool isWrongListEqual(const ContentInfo& rCompare) const;
};
typedef ContentInfo* ContentInfoPtr;
@@ -198,6 +195,7 @@ SV_DECL_PTRARR( ContentInfoList, ContentInfoPtr, 1, 4 )
class BinTextObject : public EditTextObject, public SfxItemPoolUser
{
using EditTextObject::operator==;
+ using EditTextObject::isWrongListEqual;
private:
ContentInfoList aContents;
@@ -303,6 +301,9 @@ public:
bool operator==( const BinTextObject& rCompare ) const;
+ // #i102062#
+ bool isWrongListEqual(const BinTextObject& rCompare) const;
+
// from SfxItemPoolUser
virtual void ObjectInDestruction(const SfxItemPool& rSfxItemPool);
};
diff --git a/svx/source/editeng/edtspell.cxx b/svx/source/editeng/edtspell.cxx
index cad0602529..2fb92641ef 100644
--- a/svx/source/editeng/edtspell.cxx
+++ b/svx/source/editeng/edtspell.cxx
@@ -476,6 +476,31 @@ WrongList* WrongList::Clone() const
return pNew;
}
+// #i102062#
+bool WrongList::operator==(const WrongList& rCompare) const
+{
+ // cleck direct members
+ if(GetInvalidStart() != rCompare.GetInvalidStart()
+ || GetInvalidEnd() != rCompare.GetInvalidEnd()
+ || Count() != rCompare.Count())
+ {
+ return false;
+ }
+
+ for(USHORT a(0); a < Count(); a++)
+ {
+ const WrongRange& rCandA(GetObject(a));
+ const WrongRange& rCandB(rCompare.GetObject(a));
+
+ if(rCandA.nStart != rCandB.nStart
+ || rCandA.nEnd != rCandB.nEnd)
+ {
+ return false;
+ }
+ }
+
+ return true;
+}
#ifdef DBG_UTIL
sal_Bool WrongList::DbgIsBuggy() const
diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx
index d29984c42d..5079f527bc 100644
--- a/svx/source/engine3d/scene3d.cxx
+++ b/svx/source/engine3d/scene3d.cxx
@@ -538,6 +538,19 @@ void E3dScene::operator=(const SdrObject& rObj)
// #110988#
ImpCleanup3DDepthMapper();
+
+ // #i101941#
+ // After a Scene as model object is cloned, the used
+ // ViewContactOfE3dScene is created and partially used
+ // to calculate Bound/SnapRects, but - since quite some
+ // values are buffered at the VC - not really well
+ // initialized. It would be possible to always watch for
+ // preconditions of buffered data, but this would be expensive
+ // and would create a lot of short living data structures.
+ // It is currently better to flush that data, e.g. by using
+ // ActionChanged at the VC which will for this class
+ // flush that cached data and initalize it's valid reconstruction
+ GetViewContact().ActionChanged();
}
/*************************************************************************
diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx
index dc6540fe97..a4b9cc0d39 100644
--- a/svx/source/gallery2/galobj.cxx
+++ b/svx/source/gallery2/galobj.cxx
@@ -134,7 +134,8 @@ BOOL SgaObject::CreateThumb( const Graphic& rGraphic )
else
aSize.Height() = (sal_Int32)( S_THUMB / fFactor );
- aThumbBmp = rGraphic.GetBitmap( &aSize );
+ const GraphicConversionParameters aParameters(aSize);
+ aThumbBmp = rGraphic.GetBitmap(aParameters);
if( !aThumbBmp.IsEmpty() )
{
diff --git a/svx/source/outliner/outlobj.cxx b/svx/source/outliner/outlobj.cxx
index bdcbcf88e6..72601d9d7e 100644
--- a/svx/source/outliner/outlobj.cxx
+++ b/svx/source/outliner/outlobj.cxx
@@ -77,6 +77,12 @@ public:
&& maParagraphDataVector == rCandidate.maParagraphDataVector
&& mbIsEditDoc == rCandidate.mbIsEditDoc);
}
+
+ // #i102062#
+ bool isWrongListEqual(const ImplOutlinerParaObject& rCompare) const
+ {
+ return mpEditTextObject->isWrongListEqual(*rCompare.mpEditTextObject);
+ }
};
//////////////////////////////////////////////////////////////////////////////
@@ -147,6 +153,17 @@ bool OutlinerParaObject::operator==(const OutlinerParaObject& rCandidate) const
return (*rCandidate.mpImplOutlinerParaObject == *mpImplOutlinerParaObject);
}
+// #i102062#
+bool OutlinerParaObject::isWrongListEqual(const OutlinerParaObject& rCompare) const
+{
+ if(rCompare.mpImplOutlinerParaObject == mpImplOutlinerParaObject)
+ {
+ return true;
+ }
+
+ return mpImplOutlinerParaObject->isWrongListEqual(*rCompare.mpImplOutlinerParaObject);
+}
+
sal_uInt16 OutlinerParaObject::GetOutlinerMode() const
{
return mpImplOutlinerParaObject->mpEditTextObject->GetUserType();
diff --git a/svx/source/sdr/attribute/sdrtextattribute.cxx b/svx/source/sdr/attribute/sdrtextattribute.cxx
index 88352f8f44..93661e2477 100644
--- a/svx/source/sdr/attribute/sdrtextattribute.cxx
+++ b/svx/source/sdr/attribute/sdrtextattribute.cxx
@@ -148,6 +148,11 @@ namespace drawinglayer
bool SdrTextAttribute::operator==(const SdrTextAttribute& rCandidate) const
{
return (getOutlinerParaObject() == rCandidate.getOutlinerParaObject()
+ // #i102062# for primitive visualisation, the WrongList (SpellChecking)
+ // is important, too, so use isWrongListEqual since there is no WrongList
+ // comparison in the regular OutlinerParaObject compare (since it's
+ // not-persistent data)
+ && getOutlinerParaObject().isWrongListEqual(rCandidate.getOutlinerParaObject())
&& pointerOrContentEqual(getSdrFormTextAttribute(), rCandidate.getSdrFormTextAttribute())
&& getTextLeftDistance() == rCandidate.getTextLeftDistance()
&& getTextUpperDistance() == rCandidate.getTextUpperDistance()
diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
index eddc5d12bf..6669912886 100644
--- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx
+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
@@ -473,7 +473,14 @@ namespace drawinglayer
return pRetval;
}
- attribute::SdrTextAttribute* createNewSdrTextAttribute(const SfxItemSet& rSet, const SdrText& rText)
+ // #i101508# Support handing over given text-to-border distances
+ attribute::SdrTextAttribute* createNewSdrTextAttribute(
+ const SfxItemSet& rSet,
+ const SdrText& rText,
+ const sal_Int32* pLeft,
+ const sal_Int32* pUpper,
+ const sal_Int32* pRight,
+ const sal_Int32* pLower)
{
attribute::SdrTextAttribute* pRetval(0);
const SdrTextObj& rTextObj = rText.GetObject();
@@ -519,10 +526,10 @@ namespace drawinglayer
rText,
aOutlinerParaObject,
((const XFormTextStyleItem&)rSet.Get(XATTR_FORMTXTSTYLE)).GetValue(),
- rTextObj.GetTextLeftDistance(),
- rTextObj.GetTextUpperDistance(),
- rTextObj.GetTextRightDistance(),
- rTextObj.GetTextLowerDistance(),
+ pLeft ? *pLeft : rTextObj.GetTextLeftDistance(),
+ pUpper ? *pUpper : rTextObj.GetTextUpperDistance(),
+ pRight ? *pRight : rTextObj.GetTextRightDistance(),
+ pLower ? *pLower : rTextObj.GetTextLowerDistance(),
((const SdrTextContourFrameItem&)rSet.Get(SDRATTR_TEXT_CONTOURFRAME)).GetValue(),
(SDRTEXTFIT_PROPORTIONAL == eFit || SDRTEXTFIT_ALLLINES == eFit),
((const XFormTextHideFormItem&)rSet.Get(XATTR_FORMTXTHIDEFORM)).GetValue(),
@@ -1031,7 +1038,14 @@ namespace drawinglayer
}
}
- attribute::SdrFillTextAttribute* createNewSdrFillTextAttribute(const SfxItemSet& rSet, const SdrText* pSdrText)
+ // #i101508# Support handing over given text-to-border distances
+ attribute::SdrFillTextAttribute* createNewSdrFillTextAttribute(
+ const SfxItemSet& rSet,
+ const SdrText* pSdrText,
+ const sal_Int32* pLeft,
+ const sal_Int32* pUpper,
+ const sal_Int32* pRight,
+ const sal_Int32* pLower)
{
attribute::SdrFillTextAttribute* pRetval(0L);
attribute::SdrFillAttribute* pFill(0L);
@@ -1042,7 +1056,7 @@ namespace drawinglayer
// look for text first
if(pSdrText)
{
- pText = createNewSdrTextAttribute(rSet, *pSdrText);
+ pText = createNewSdrTextAttribute(rSet, *pSdrText, pLeft, pUpper, pRight, pLower);
}
// when object has text and text is fontwork and hide contour is set for fontwork, force
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index 3b543ec638..cc8f62082e 100644
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -793,6 +793,15 @@ void SdrCreateView::ShowCreateObj(/*OutputDevice* pOut, BOOL bFull*/)
// overlay objects instead.
sal_Bool bUseSolidDragging(IsSolidDragging());
+ // #i101648# check if dragged object is a naked SdrObject (no
+ // derivation of). This is e.g. used in SW Frame construction
+ // as placeholder. Do not use SolidDragging for naked SDrObjects,
+ // they cannot have a valid optical representation
+ if(bUseSolidDragging && OBJ_NONE == pAktCreate->GetObjIdentifier())
+ {
+ bUseSolidDragging = false;
+ }
+
// check for objects with no fill and no line
if(bUseSolidDragging)
{
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index de9a159f6f..507b86f2c5 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -1392,8 +1392,15 @@ FASTBOOL SdrObject::MovCreate(SdrDragStat& rStat)
rStat.TakeCreateRect(aOutRect);
rStat.SetActionRect(aOutRect);
aOutRect.Justify();
- SetBoundRectDirty();
- bSnapRectDirty=TRUE;
+
+ // #i101648# for naked (non-derived) SdrObjects, do not invalidate aOutRect
+ // by calling SetBoundRectDirty(); aOutRect IS the geometry for such objects.
+ // No derivation implementation calls the parent implementation, so this will
+ // cause no further prolems
+ //
+ // SetBoundRectDirty();
+ // bSnapRectDirty=TRUE;
+
return TRUE;
}
@@ -1401,7 +1408,11 @@ FASTBOOL SdrObject::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
{
rStat.TakeCreateRect(aOutRect);
aOutRect.Justify();
- SetRectsDirty();
+
+ // #i101648# see description at MovCreate
+ //
+ // SetRectsDirty();
+
return (eCmd==SDRCREATE_FORCEEND || rStat.GetPointAnz()>=2);
}
@@ -2376,8 +2387,8 @@ SdrObject* SdrObject::ImpConvertToContourObj(SdrObject* pRet, BOOL bForceLineDas
if(pRet->LineGeometryUsageIsNecessary())
{
- basegfx::B2DPolyPolygon aAreaPolyPolygon;
- basegfx::B2DPolyPolygon aLinePolyPolygon;
+ basegfx::B2DPolyPolygon aMergedLineFillPolyPolygon;
+ basegfx::B2DPolyPolygon aMergedHairlinePolyPolygon;
const drawinglayer::primitive2d::Primitive2DSequence xSequence(pRet->GetViewContact().getViewIndependentPrimitive2DSequence());
if(xSequence.hasElements())
@@ -2389,36 +2400,31 @@ SdrObject* SdrObject::ImpConvertToContourObj(SdrObject* pRet, BOOL bForceLineDas
drawinglayer::processor2d::LineGeometryExtractor2D aExtractor(aViewInformation2D);
aExtractor.process(xSequence);
- aAreaPolyPolygon = aExtractor.getExtractedLineFills();
- aLinePolyPolygon = aExtractor.getExtractedHairlines();
- }
+ // #i102241# check for line results
+ const std::vector< basegfx::B2DPolygon >& rHairlineVector = aExtractor.getExtractedHairlines();
- // Since this may in some cases lead to a count of 0 after
- // the merge i moved the merge to the front.
- if(aAreaPolyPolygon.count())
- {
- // bezier geometry got created, even for straight edges since the given
- // object is a result of DoConvertToPolyObj. For conversion to contour
- // this is not really needed and can be reduced again AFAP
- aAreaPolyPolygon = basegfx::tools::simplifyCurveSegments(aAreaPolyPolygon);
+ if(rHairlineVector.size())
+ {
+ // for SdrObject creation, just copy all to a single Hairline-PolyPolygon
+ for(sal_uInt32 a(0); a < rHairlineVector.size(); a++)
+ {
+ aMergedHairlinePolyPolygon.append(rHairlineVector[a]);
+ }
+ }
- // merge all to a decent result (try to use AND, but remember original)
- const basegfx::B2DPolyPolygon aTemp(aAreaPolyPolygon);
- aAreaPolyPolygon = basegfx::tools::solveCrossovers(aAreaPolyPolygon);
- aAreaPolyPolygon = basegfx::tools::stripNeutralPolygons(aAreaPolyPolygon);
- aAreaPolyPolygon = basegfx::tools::stripDispensablePolygons(aAreaPolyPolygon, false);
+ // #i102241# check for fill rsults
+ const std::vector< basegfx::B2DPolyPolygon >& rLineFillVector(aExtractor.getExtractedLineFills());
- if(!aAreaPolyPolygon.count())
+ if(rLineFillVector.size())
{
- // OOps, AND is empty, this means there were no overlapping parts. Use
- // remembered parts as result
- aAreaPolyPolygon = aTemp;
+ // merge to a single PolyPolygon (OR)
+ aMergedLineFillPolyPolygon = basegfx::tools::mergeToSinglePolyPolygon(rLineFillVector);
}
}
- // || aLinePolyPolygon.Count() removed; the conversion is ONLY
+ // || aMergedHairlinePolyPolygon.Count() removed; the conversion is ONLY
// useful when new closed filled polygons are created
- if(aAreaPolyPolygon.count() || (bForceLineDash && aLinePolyPolygon.count()))
+ if(aMergedLineFillPolyPolygon.count() || (bForceLineDash && aMergedHairlinePolyPolygon.count()))
{
SfxItemSet aSet(pRet->GetMergedItemSet());
XFillStyle eOldFillStyle = ((const XFillStyleItem&)(aSet.Get(XATTR_FILLSTYLE))).GetValue();
@@ -2426,10 +2432,10 @@ SdrObject* SdrObject::ImpConvertToContourObj(SdrObject* pRet, BOOL bForceLineDas
SdrPathObj* aLineHairlinePart = NULL;
bool bBuildGroup(false);
- if(aAreaPolyPolygon.count())
+ if(aMergedLineFillPolyPolygon.count())
{
// create SdrObject for filled line geometry
- aLinePolygonPart = new SdrPathObj(OBJ_PATHFILL, aAreaPolyPolygon);
+ aLinePolygonPart = new SdrPathObj(OBJ_PATHFILL, aMergedLineFillPolyPolygon);
aLinePolygonPart->SetModel(pRet->GetModel());
// correct item properties
@@ -2444,13 +2450,13 @@ SdrObject* SdrObject::ImpConvertToContourObj(SdrObject* pRet, BOOL bForceLineDas
aLinePolygonPart->SetMergedItemSet(aSet);
}
- if(aLinePolyPolygon.count())
+ if(aMergedHairlinePolyPolygon.count())
{
// create SdrObject for hairline geometry
// OBJ_PATHLINE is necessary here, not OBJ_PATHFILL. This is intended
// to get a non-filled object. If the poly is closed, the PathObj takes care for
// the correct closed state.
- aLineHairlinePart = new SdrPathObj(OBJ_PATHLINE, aLinePolyPolygon);
+ aLineHairlinePart = new SdrPathObj(OBJ_PATHLINE, aMergedHairlinePolyPolygon);
aLineHairlinePart->SetModel(pRet->GetModel());
aSet.Put(XLineWidthItem(0L));
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index 9d1da037cc..41c948f130 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -1749,7 +1749,10 @@ void SdrPathObj::ImpForceKind()
// was called, once here below and once on a 2nd place below.
// #i10659# for SdrTextObj, keep aRect up to date
- aRect = ImpGetBoundRect(GetPathPoly());
+ if(GetPathPoly().count())
+ {
+ aRect = ImpGetBoundRect(GetPathPoly());
+ }
}
// #i75974# adapt polygon state to object type. This may include a reinterpretation
@@ -2382,7 +2385,10 @@ void SdrPathObj::TakeUnrotatedSnapRect(Rectangle& rRect) const
void SdrPathObj::RecalcSnapRect()
{
- maSnapRect = ImpGetBoundRect(GetPathPoly());
+ if(GetPathPoly().count())
+ {
+ maSnapRect = ImpGetBoundRect(GetPathPoly());
+ }
}
void SdrPathObj::NbcSetSnapRect(const Rectangle& rRect)
@@ -2472,8 +2478,11 @@ void SdrPathObj::NbcSetPoint(const Point& rPnt, sal_uInt32 nHdlNum)
}
else
{
- // #i10659# for SdrTextObj, keep aRect up to date
- aRect = ImpGetBoundRect(GetPathPoly()); // fuer SdrTextObj
+ if(GetPathPoly().count())
+ {
+ // #i10659# for SdrTextObj, keep aRect up to date
+ aRect = ImpGetBoundRect(GetPathPoly()); // fuer SdrTextObj#
+ }
}
SetRectsDirty();
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 08160b9125..ff322aaaa8 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -657,7 +657,11 @@ namespace
bool SdrTextObj::impCheckSpellCheckForDecomposeTextPrimitive() const
{
- return false;
+ // #i102062# asked TL who killed this feature (CWS tl56). Obviously, there
+ // is no more support for EE_CNTRL_NOREDLINES anymore; redlining is always
+ // on nowadays. Unfortunately, not false, but true should be returned then.
+ // Trying if this is all...
+ return true;
}
bool SdrTextObj::impDecomposeContourTextPrimitive(
@@ -931,6 +935,16 @@ bool SdrTextObj::impDecomposeStretchTextPrimitive(
basegfx::B2DHomMatrix aNewTransformA;
basegfx::B2DHomMatrix aNewTransformB;
+ // #i101957# Check for vertical text. If used, aNewTransformA
+ // needs to translate the text initially around object width to orient
+ // it relative to the topper right instead of the topper left
+ const bool bVertical(rSdrStretchTextPrimitive.getOutlinerParaObject().IsVertical());
+
+ if(bVertical)
+ {
+ aNewTransformA.translate(aScale.getX(), 0.0);
+ }
+
// calculate global char stretching scale parameters. Use non-mirrored sizes
// to layout without mirroring
const double fScaleX(fabs(aScale.getX()) / aOutlinerScale.getX());
diff --git a/svx/source/svdraw/svdtext.cxx b/svx/source/svdraw/svdtext.cxx
index beb98bf1d1..93c0024ecc 100644
--- a/svx/source/svdraw/svdtext.cxx
+++ b/svx/source/svdraw/svdtext.cxx
@@ -61,10 +61,19 @@ void SdrText::CheckPortionInfo( SdrOutliner& rOutliner )
{
if(!mbPortionInfoChecked)
{
+ // #i102062# no action when the Outliner is the HitTestOutliner,
+ // this will remove WrongList info at the OPO
+ if(mpModel && &rOutliner == &mpModel->GetHitTestOutliner())
+ return;
+
// Optimierung: ggf. BigTextObject erzeugen
mbPortionInfoChecked=true;
if(mpOutlinerParaObject!=NULL && rOutliner.ShouldCreateBigTextObject())
- mpOutlinerParaObject= rOutliner.CreateParaObject();
+ {
+ // #i102062# MemoryLeak closed
+ delete mpOutlinerParaObject;
+ mpOutlinerParaObject = rOutliner.CreateParaObject();
+ }
}
}
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index af00499280..fccf0192a1 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -554,7 +554,17 @@ Bitmap SdrExchangeView::GetMarkedObjBitmap( BOOL bNoVDevIfOneBmpMarked ) const
if( !aBmp )
{
const Graphic aGraphic( GetMarkedObjMetaFile( bNoVDevIfOneBmpMarked ) );
- aBmp = aGraphic.GetBitmap();
+
+ // #i102089# support user's settings of AA and LineSnap when the MetaFile gets
+ // rasterconverted to a bitmap
+ const SvtOptionsDrawinglayer aDrawinglayerOpt;
+ const GraphicConversionParameters aParameters(
+ Size(),
+ false,
+ aDrawinglayerOpt.IsAntiAliasing(),
+ aDrawinglayerOpt.IsSnapHorVerLinesToDiscrete());
+
+ aBmp = aGraphic.GetBitmap(aParameters);
}
}
diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx
index 0af6d2f2be..c79ac1590b 100644
--- a/svx/source/table/viewcontactoftableobj.cxx
+++ b/svx/source/table/viewcontactoftableobj.cxx
@@ -599,7 +599,30 @@ namespace sdr
const SfxItemSet& rCellItemSet = xCurrentCell->GetItemSet();
const sal_uInt32 nTextIndex(nColCount * aCellPos.mnRow + aCellPos.mnCol);
const SdrText* pSdrText = rTableObj.getText(nTextIndex);
- drawinglayer::attribute::SdrFillTextAttribute* pAttribute = drawinglayer::primitive2d::createNewSdrFillTextAttribute(rCellItemSet, pSdrText);
+ drawinglayer::attribute::SdrFillTextAttribute* pAttribute = 0;
+
+ if(pSdrText)
+ {
+ // #i101508# take cell's local text frame distances into account
+ const sal_Int32 nLeft(xCurrentCell->GetTextLeftDistance());
+ const sal_Int32 nRight(xCurrentCell->GetTextRightDistance());
+ const sal_Int32 nUpper(xCurrentCell->GetTextUpperDistance());
+ const sal_Int32 nLower(xCurrentCell->GetTextLowerDistance());
+
+ pAttribute = drawinglayer::primitive2d::createNewSdrFillTextAttribute(
+ rCellItemSet,
+ pSdrText,
+ &nLeft,
+ &nUpper,
+ &nRight,
+ &nLower);
+ }
+ else
+ {
+ pAttribute = drawinglayer::primitive2d::createNewSdrFillTextAttribute(
+ rCellItemSet,
+ pSdrText);
+ }
if(pAttribute)
{
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index 2dcd3c1a89..956dfcaecb 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -104,6 +104,9 @@ using namespace ::com::sun::star::task;
#include <svx/sdr/contact/viewobjectcontact.hxx>
#include <svx/sdr/contact/viewcontact.hxx>
+// #i102251#
+#include <editstat.hxx>
+
//////////////////////////////////////////////////////////////////////////////
namespace svx
@@ -225,16 +228,27 @@ namespace svx
Graphic aGraphic( rMtf );
BitmapEx aBmpEx;
+ // #i102089# support user's settings of AA and LineSnap when the MetaFile gets
+ // rasterconverted to a bitmap
+ const SvtOptionsDrawinglayer aDrawinglayerOpt;
+ const GraphicConversionParameters aParameters(
+ pSize ? *pSize : Size(0, 0),
+ true, // allow unlimited size
+ aDrawinglayerOpt.IsAntiAliasing(),
+ aDrawinglayerOpt.IsSnapHorVerLinesToDiscrete());
+
if( bTransparent )
{
- Graphic aMaskGraphic( rMtf.GetMonochromeMtf( COL_BLACK ) );
- Bitmap aMaskBmp( aMaskGraphic.GetUnlimitedBitmap( pSize ) );
+ Graphic aMaskGraphic(rMtf.GetMonochromeMtf(COL_BLACK));
+ Bitmap aMaskBmp(aMaskGraphic.GetBitmap(aParameters));
- aMaskBmp.Convert( BMP_CONVERSION_1BIT_THRESHOLD );
- aBmpEx = BitmapEx( aGraphic.GetUnlimitedBitmap( pSize ), aMaskBmp );
+ aMaskBmp.Convert(BMP_CONVERSION_1BIT_THRESHOLD);
+ aBmpEx = BitmapEx(aGraphic.GetBitmap(aParameters), aMaskBmp);
}
else
- aBmpEx = BitmapEx( aGraphic.GetUnlimitedBitmap( pSize ) );
+ {
+ aBmpEx = BitmapEx(aGraphic.GetBitmap(aParameters));
+ }
aBmpEx.SetPrefMapMode( rMtf.GetPrefMapMode() );
aBmpEx.SetPrefSize( rMtf.GetPrefSize() );
@@ -625,8 +639,12 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic,
rOutl.SetCalcFieldValueHdl( LINK(this, GraphicExporter, CalcFieldValueHdl) );
rOutl.SetBackgroundColor( pPage->GetPageBackgroundColor(pView->GetSdrPageView()) );
+ // #i102251#
+ const sal_uInt32 nOldCntrl(rOutl.GetControlWord());
+ sal_uInt32 nCntrl = nOldCntrl & ~EE_CNTRL_ONLINESPELLING;
+ rOutl.SetControlWord(nCntrl);
+
std::vector< SdrObject* > aShapes;
-
bool bRet = true;
// export complete page?
@@ -977,6 +995,9 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic,
rOutl.SetCalcFieldValueHdl( maOldCalcFieldValueHdl );
+ // #i102251#
+ rOutl.SetControlWord(nOldCntrl);
+
return bRet;
}