summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/edtspell.hxx3
-rw-r--r--svx/inc/svx/editobj.hxx3
-rw-r--r--svx/inc/svx/outlobj.hxx3
-rw-r--r--svx/inc/svx/sdr/primitive2d/sdrattributecreator.hxx21
-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
20 files changed, 337 insertions, 64 deletions
diff --git a/svx/inc/edtspell.hxx b/svx/inc/edtspell.hxx
index f3d55ee87841..15e180342d85 100644
--- a/svx/inc/edtspell.hxx
+++ b/svx/inc/edtspell.hxx
@@ -133,6 +133,9 @@ public:
void MarkWrongsInvalid();
WrongList* Clone() const;
+
+ // #i102062#
+ bool operator==(const WrongList& rCompare) const;
};
inline void WrongList::InsertWrong( const WrongRange& rWrong, USHORT nPos )
diff --git a/svx/inc/svx/editobj.hxx b/svx/inc/svx/editobj.hxx
index eb304425f09d..f291adefcf71 100644
--- a/svx/inc/svx/editobj.hxx
+++ b/svx/inc/svx/editobj.hxx
@@ -121,6 +121,9 @@ public:
virtual void ChangeStyleSheetName( SfxStyleFamily eFamily, const XubString& rOldName, const XubString& rNewName );
bool operator==( const EditTextObject& rCompare ) const;
+
+ // #i102062#
+ bool isWrongListEqual(const EditTextObject& rCompare) const;
};
#endif // _EDITOBJ_HXX
diff --git a/svx/inc/svx/outlobj.hxx b/svx/inc/svx/outlobj.hxx
index 9a8efeaaddc1..0311fa914422 100644
--- a/svx/inc/svx/outlobj.hxx
+++ b/svx/inc/svx/outlobj.hxx
@@ -67,6 +67,9 @@ public:
bool operator==(const OutlinerParaObject& rCandidate) const;
bool operator!=(const OutlinerParaObject& rCandidate) const { return !operator==(rCandidate); }
+ // #i102062#
+ bool isWrongListEqual(const OutlinerParaObject& rCompare) const;
+
// outliner mode access
sal_uInt16 GetOutlinerMode() const;
void SetOutlinerMode(sal_uInt16 nNew);
diff --git a/svx/inc/svx/sdr/primitive2d/sdrattributecreator.hxx b/svx/inc/svx/sdr/primitive2d/sdrattributecreator.hxx
index a9b3767c3c32..e4a8fa01902f 100644
--- a/svx/inc/svx/sdr/primitive2d/sdrattributecreator.hxx
+++ b/svx/inc/svx/sdr/primitive2d/sdrattributecreator.hxx
@@ -71,7 +71,16 @@ namespace drawinglayer
attribute::SdrLineStartEndAttribute* createNewSdrLineStartEndAttribute(const SfxItemSet& rSet, double fWidth);
attribute::SdrShadowAttribute* createNewSdrShadowAttribute(const SfxItemSet& rSet);
attribute::SdrFillAttribute* createNewSdrFillAttribute(const SfxItemSet& rSet);
- 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 = 0,
+ const sal_Int32* pUpper = 0,
+ const sal_Int32* pRight = 0,
+ const sal_Int32* pLower = 0);
+
attribute::FillGradientAttribute* createNewTransparenceGradientAttribute(const SfxItemSet& rSet);
attribute::SdrFillBitmapAttribute* createNewSdrFillBitmapAttribute(const SfxItemSet& rSet);
attribute::SdrShadowTextAttribute* createNewSdrShadowTextAttribute(
@@ -83,7 +92,15 @@ namespace drawinglayer
attribute::SdrLineFillShadowAttribute* createNewSdrLineFillShadowAttribute(const SfxItemSet& rSet, bool bSuppressFill);
attribute::SdrSceneAttribute* createNewSdrSceneAttribute(const SfxItemSet& rSet);
attribute::SdrLightingAttribute* createNewSdrLightingAttribute(const SfxItemSet& rSet);
- 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 = 0,
+ const sal_Int32* pUpper = 0,
+ const sal_Int32* pRight = 0,
+ const sal_Int32* pLower = 0);
// helpers
void calculateRelativeCornerRadius(sal_Int32 nRadius, const ::basegfx::B2DRange& rObjectRange, double& rfCornerRadiusX, double& rfCornerRadiusY);
diff --git a/svx/source/editeng/editobj.cxx b/svx/source/editeng/editobj.cxx
index d0170e507060..fb5e921f60f0 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 51a044575dd2..2ed9c8b3e6d8 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 25cf685a5df7..df6725cff00f 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 ebd11f87c477..22ef5777f730 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 25992ad607dd..b5cdd332362d 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 b76f3a8c366e..0e319ad1be81 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 37215a794d06..f6bf7b528c08 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 0b8245b91060..277ee70f82ca 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 6845ce6bb619..41666f86a740 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 263279691979..570043c33209 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 4831945dfcf3..1e9c9b57c52d 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 673b7432f662..8d27914422ae 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 772811f6ccec..038eb96b35e6 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 9a6958b34c4d..23f3981228e1 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 c1c58977be64..f740bf60258c 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 b5f3e5c6ec5f..098ddb6c31c0 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()) );
- std::vector< SdrObject* > aShapes;
+ // #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;
}