summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2009-01-20 09:49:16 +0000
committerVladimir Glazounov <vg@openoffice.org>2009-01-20 09:49:16 +0000
commitb1b522a6427184602d69436953cbc37669d4e474 (patch)
tree5409f420f5601298d5001a02dcf2d23a85e74ab7 /svx
parent4dae8244c21a1dd53c5c42d6a0b4751c285f8497 (diff)
CWS-TOOLING: integrate CWS aw061
2009-01-13 19:18:08 +0100 aw r266250 : #i96669# changed initialisation order in Embedded3DPrimitive2D::Embedded3DPrimitive2D due to TinderBox 2009-01-13 19:15:37 +0100 aw r266249 : #i96669# changed initialisation order in Embedded3DPrimitive2D::Embedded3DPrimitive2D due to TinderBox 2009-01-12 11:53:37 +0100 aw r266141 : #i97874# corrected include for TinderBox build 2009-01-08 17:48:23 +0100 aw r266029 : #i97874# extended SdrTextObj::ImpConvertAddText to copy needed attributes from original object 2009-01-08 14:59:08 +0100 aw r266015 : #i96350# added fallback to solid fill in shadow TabPage when no fill is defined to get a reasonable shadow preview 2009-01-08 12:40:49 +0100 aw r265995 : #i94832# remuved not needed E3DModifySceneSnapRectUpdater usages 2009-01-08 01:53:46 +0100 thb r265982 : #i94860# Blacklisting another ATI card/driver that causes blank screens 2009-01-08 01:46:38 +0100 thb r265981 : #i97853# Changed all gradient texture methods to use basegfx gradienttools. consolidated quite some code 2009-01-08 01:45:09 +0100 thb r265980 : #i97853# Added lerp methods, slight changes to have everything necessary contained in the ODFGradientInfo struct 2009-01-08 00:01:54 +0100 thb r265979 : #i97853# First part of the move - duplicated the stuff to basegfx 2009-01-06 16:23:09 +0100 aw r265930 : #i97197# Changed SwDrawVirtObj to work well with changed aOutRect and bBoundRectValid functionality 2009-01-06 12:41:24 +0100 aw r265909 : #i97784# corrected regression with connectors 2009-01-05 17:30:31 +0100 aw r265881 : #i97772# added missing usage of reduce factor for BitmapPrimitive creation 2009-01-05 12:24:01 +0100 aw r265863 : #i97321# added direct handling of HatchTexturePrimitive3D to not use it's decomposition for HitTest 2008-12-23 13:57:27 +0100 aw r265782 : #i96669# changed SW's FlyFrame paint fallback with primitives to use createLocalDecomposition since get2Decomposition does not have to stay virtual on the long run 2008-12-23 13:47:59 +0100 aw r265781 : #i96669# optimized impCreateTextPortionPrimitive to only create TextDecoratedPortionPrimitive2D when needed 2008-12-23 13:44:45 +0100 aw r265780 : #i96669# added B2DRange buffering to some primitive implementations where it is most necessary 2008-12-19 15:45:45 +0100 aw r265729 : #i96669# prepared TextPrimitives to work without DXarray, too. Had to rework impSplitSingleWords which gets active when a text portion has some word-wise decorations. Tested before committing 2008-12-19 15:44:16 +0100 aw r265728 : #i96669# corrected error in createPolygonFromUnitEllipseSegment which popped up when investigating 2008-12-18 17:45:58 +0100 aw r265708 : #i97149# added ActionChanged() call when visualisation object is modified 2008-12-18 15:34:42 +0100 aw r265695 : #i96598# corrected SdrPageObj's usage of aOutRect 2008-12-17 16:59:37 +0100 aw r265647 : #i96537# exchanged the marker for point number in string with correct one 2008-12-16 17:50:33 +0100 aw r265566 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:50:17 +0100 aw r265565 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:50:00 +0100 aw r265564 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:49:48 +0100 aw r265563 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer 2008-12-16 17:49:35 +0100 aw r265562 : #i93170# added a bool to EndDrawLayer() and corresponding mechanisms to allow to end without drawing FormLayer
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/svx/svdobj.hxx2
-rw-r--r--svx/inc/svx/svdopage.hxx3
-rw-r--r--svx/inc/svx/svdpntv.hxx4
-rw-r--r--svx/source/dialog/contwnd.cxx2
-rw-r--r--svx/source/dialog/graphctl.cxx2
-rw-r--r--svx/source/dialog/tpshadow.cxx10
-rw-r--r--svx/source/engine3d/helperhittest3d.cxx12
-rw-r--r--svx/source/engine3d/scene3d.cxx3
-rw-r--r--svx/source/engine3d/view3d1.cxx29
-rw-r--r--svx/source/svdraw/svddrgv.cxx31
-rw-r--r--svx/source/svdraw/svdoashp.cxx5
-rw-r--r--svx/source/svdraw/svdopage.cxx7
-rw-r--r--svx/source/svdraw/svdopath.cxx2
-rw-r--r--svx/source/svdraw/svdotextdecomposition.cxx184
-rw-r--r--svx/source/svdraw/svdotxtr.cxx69
-rw-r--r--svx/source/svdraw/svdpntv.cxx13
16 files changed, 252 insertions, 126 deletions
diff --git a/svx/inc/svx/svdobj.hxx b/svx/inc/svx/svdobj.hxx
index 6fb8b05dad..8e59967d02 100644
--- a/svx/inc/svx/svdobj.hxx
+++ b/svx/inc/svx/svdobj.hxx
@@ -556,7 +556,7 @@ public:
static void Free( SdrObject*& _rpObject );
// This method is only for access from Property objects
- void SetBoundRectDirty();
+ virtual void SetBoundRectDirty();
virtual void SetObjList(SdrObjList* pNewObjList);
SdrObjList* GetObjList() const { return pObjList; }
diff --git a/svx/inc/svx/svdopage.hxx b/svx/inc/svx/svdopage.hxx
index d8dcc92692..763f5b9a72 100644
--- a/svx/inc/svx/svdopage.hxx
+++ b/svx/inc/svx/svdopage.hxx
@@ -65,6 +65,9 @@ public:
SdrPage* GetReferencedPage() const;
void SetReferencedPage(SdrPage* pNewPage);
+ // #i96598#
+ virtual void SetBoundRectDirty();
+
virtual UINT16 GetObjIdentifier() const;
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const;
virtual void operator=(const SdrObject& rObj);
diff --git a/svx/inc/svx/svdpntv.hxx b/svx/inc/svx/svdpntv.hxx
index 5446070869..a7ca7f3590 100644
--- a/svx/inc/svx/svdpntv.hxx
+++ b/svx/inc/svx/svdpntv.hxx
@@ -385,14 +385,14 @@ public:
// SdrPaintWindow again. This means: the SdrPaintWindow is no longer safe after this closing call.
SdrPaintWindow* BeginCompleteRedraw(OutputDevice* pOut);
void DoCompleteRedraw(SdrPaintWindow& rPaintWindow, const Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = 0);
- void EndCompleteRedraw(SdrPaintWindow& rPaintWindow);
+ void EndCompleteRedraw(SdrPaintWindow& rPaintWindow, bool bPaintFormLayer);
////////////////////////////////////////////////////////////////////////////////////////////////////
// used for the other applications basctl/sc/sw which call DrawLayer at PageViews
// #i74769# Interface change to use common BeginCompleteRedraw/EndCompleteRedraw
// #i76114# bDisableIntersect disables intersecting rReg with the Window's paint region
SdrPaintWindow* BeginDrawLayers(OutputDevice* pOut, const Region& rReg, bool bDisableIntersect = false);
- void EndDrawLayers(SdrPaintWindow& rPaintWindow);
+ void EndDrawLayers(SdrPaintWindow& rPaintWindow, bool bPaintFormLayer);
protected:
////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/svx/source/dialog/contwnd.cxx b/svx/source/dialog/contwnd.cxx
index 6e42ce0514..692a961cf0 100644
--- a/svx/source/dialog/contwnd.cxx
+++ b/svx/source/dialog/contwnd.cxx
@@ -355,7 +355,7 @@ void ContourWindow::Paint( const Rectangle& rRect )
// #i75482#
const Region aRepaintRegion(rRect);
pView->DoCompleteRedraw(*pPaintWindow, aRepaintRegion);
- pView->EndCompleteRedraw(*pPaintWindow);
+ pView->EndCompleteRedraw(*pPaintWindow, true);
}
// eof
diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx
index 684a3de39b..f83c7608ac 100644
--- a/svx/source/dialog/graphctl.cxx
+++ b/svx/source/dialog/graphctl.cxx
@@ -348,7 +348,7 @@ void GraphCtrl::Paint( const Rectangle& rRect )
const Region aRepaintRegion(rRect);
pView->DoCompleteRedraw(*pPaintWindow, aRepaintRegion);
- pView->EndCompleteRedraw(*pPaintWindow);
+ pView->EndCompleteRedraw(*pPaintWindow, true);
}
else
{
diff --git a/svx/source/dialog/tpshadow.cxx b/svx/source/dialog/tpshadow.cxx
index 6016d7b059..2ff6d10fb3 100644
--- a/svx/source/dialog/tpshadow.cxx
+++ b/svx/source/dialog/tpshadow.cxx
@@ -178,6 +178,16 @@ SvxShadowTabPage::SvxShadowTabPage( Window* pParent, const SfxItemSet& rInAttrs
{
rXFSet.Put( XFillColorItem( String(), COL_LIGHTRED ) );
}
+
+ if(XFILL_NONE == eXFS)
+ {
+ // #i96350#
+ // fallback to solid fillmode when no fill mode is provided to have
+ // a reasonable shadow preview. The used color will be a set one or
+ // the default (currently blue8)
+ eXFS = XFILL_SOLID;
+ }
+
rXFSet.Put( XFillStyleItem( eXFS ) );
aCtlXRectPreview.SetRectangleAttributes(aXFillAttr.GetItemSet());
//aCtlXRectPreview.SetFillAttr( aXFillAttr );
diff --git a/svx/source/engine3d/helperhittest3d.cxx b/svx/source/engine3d/helperhittest3d.cxx
index 1067fbf776..634fd8cc7f 100644
--- a/svx/source/engine3d/helperhittest3d.cxx
+++ b/svx/source/engine3d/helperhittest3d.cxx
@@ -47,6 +47,7 @@
#include <basegfx/polygon/b3dpolypolygontools.hxx>
#include <drawinglayer/primitive3d/hittestprimitive3d.hxx>
#include <com/sun/star/uno/Sequence.h>
+#include <drawinglayer/primitive3d/hatchtextureprimitive3d.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -156,6 +157,17 @@ namespace drawinglayer
// PolyPolygonMaterialPrimitive3D
break;
}
+ case PRIMITIVE3D_ID_HATCHTEXTUREPRIMITIVE3D :
+ {
+ // #i97321#
+ // For HatchTexturePrimitive3D, do not use the decomposition since it will produce
+ // clipped hatch lines in 3D. It can be used when the hatch also has a filling, but for
+ // simplicity, just use the children which are the PolyPolygonMaterialPrimitive3D
+ // which define the hatched areas anyways; for HitTest this is more than adequate
+ const primitive3d::HatchTexturePrimitive3D& rPrimitive = static_cast< const primitive3d::HatchTexturePrimitive3D& >(rCandidate);
+ process(rPrimitive.getChildren());
+ break;
+ }
case PRIMITIVE3D_ID_HITTESTPRIMITIVE3D :
{
// HitTestPrimitive3D, force usage due to we are doing a hit test and this
diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx
index 3d0ecf23e6..d29984c42d 100644
--- a/svx/source/engine3d/scene3d.cxx
+++ b/svx/source/engine3d/scene3d.cxx
@@ -594,7 +594,8 @@ void E3dScene::SaveGeoData(SdrObjGeoData& rGeo) const
void E3dScene::RestGeoData(const SdrObjGeoData& rGeo)
{
- E3DModifySceneSnapRectUpdater aUpdater(this);
+ // #i94832# removed E3DModifySceneSnapRectUpdater here.
+ // It should not be needed, is already part of E3dObject::RestGeoData
E3dObject::RestGeoData (rGeo);
SetCamera (((E3DSceneGeoData &) rGeo).aCamera);
}
diff --git a/svx/source/engine3d/view3d1.cxx b/svx/source/engine3d/view3d1.cxx
index a54696edeb..9e33b281f2 100644
--- a/svx/source/engine3d/view3d1.cxx
+++ b/svx/source/engine3d/view3d1.cxx
@@ -193,38 +193,21 @@ void E3dView::Set3DAttributes( const SfxItemSet& rAttr, E3dScene* pInScene, BOOL
}
else
{
- const SdrMarkList& rMarkList = GetMarkedObjectList();
- const sal_uInt32 nMarkCnt(rMarkList.GetMarkCount());
- std::vector< E3DModifySceneSnapRectUpdater* > aUpdaters;
- sal_uInt32 a;
-
- // create late modifiers for evtl. updatable scenes
- for(a = 0; a < nMarkCnt; a++)
- {
- SdrObject* pObj = GetMarkedObjectByIndex(a);
-
- if(dynamic_cast< E3dObject* >(pObj))
- {
- aUpdaters.push_back(new E3DModifySceneSnapRectUpdater(GetMarkedObjectByIndex(a)));
- }
- }
+ // #i94832# removed usage of E3DModifySceneSnapRectUpdater here.
+ // They are not needed here, they are already handled in SetAttrToMarked
// set at selected objects
SetAttrToMarked(rAttr, bReplaceAll);
// old run
- for(a = 0; a < nMarkCnt; a++)
+ const SdrMarkList& rMarkList = GetMarkedObjectList();
+ const sal_uInt32 nMarkCnt(rMarkList.GetMarkCount());
+
+ for(sal_uInt32 a(0); a < nMarkCnt; a++)
{
SdrObject* pObj = GetMarkedObjectByIndex(a);
Imp_E3dView_InorderRun3DObjects(pObj, nSelectedItems);
}
-
- // fire scene updaters
- while(aUpdaters.size())
- {
- delete aUpdaters.back();
- aUpdaters.pop_back();
- }
}
// DefaultValues pflegen
diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx
index 2272274bfc..69e4d16507 100644
--- a/svx/source/svdraw/svddrgv.cxx
+++ b/svx/source/svdraw/svddrgv.cxx
@@ -451,17 +451,36 @@ BOOL SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl
}
else
{
- if((eDragHdl == HDL_MOVE) && (GetMarkedObjectCount() == 1) && GetMarkedObjectByIndex(0)->ISA(SdrObjCustomShape))
+ if(HDL_MOVE == eDragHdl)
{
- mpCurrentSdrDragMethod = new SdrDragMove( *this );
+ const bool bCustomShapeSelected(1 == GetMarkedObjectCount() && GetMarkedObjectByIndex(0)->ISA(SdrObjCustomShape));
+
+ if(bCustomShapeSelected)
+ {
+ mpCurrentSdrDragMethod = new SdrDragMove( *this );
+ }
}
- else if((eDragHdl == HDL_POLY) && (!IsMoveAllowed() || !IsResizeAllowed()))
+ else if(HDL_POLY == eDragHdl)
{
- // #i77187# do not allow move of polygon points if object is move or size protected
- return FALSE;
+ const bool bConnectorSelected(1 == GetMarkedObjectCount() && GetMarkedObjectByIndex(0)->ISA(SdrEdgeObj));
+
+ if(bConnectorSelected)
+ {
+ // #i97784#
+ // fallback to old behaviour for connectors (see
+ // text in task description for more details)
+ }
+ else if(!IsMoveAllowed() || !IsResizeAllowed())
+ {
+ // #i77187#
+ // do not allow move of polygon points if object is move or size protected
+ return FALSE;
+ }
}
- else
+
+ if(!pDragBla)
{
+ // fallback to DragSpecial if no interaction defined
bDragSpecial = TRUE;
mpCurrentSdrDragMethod = new SdrDragObjOwn(*this);
}
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index a82622f249..823c1e032b 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -1784,7 +1784,12 @@ void SdrObjCustomShape::NbcMove( const Size& rSiz )
{
SdrObject* pRenderedCustomShape = GetSdrObjectFromXShape( mXRenderedCustomShape );
if ( pRenderedCustomShape )
+ {
+ // #i97149# the visualisation shape needs to be informed
+ // about change, too
+ pRenderedCustomShape->ActionChanged();
pRenderedCustomShape->NbcMove( rSiz );
+ }
}
// #i37011# adapt geometry shadow
diff --git a/svx/source/svdraw/svdopage.cxx b/svx/source/svdraw/svdopage.cxx
index 5096c2e118..8b6d05ca9e 100644
--- a/svx/source/svdraw/svdopage.cxx
+++ b/svx/source/svdraw/svdopage.cxx
@@ -140,6 +140,13 @@ void SdrPageObj::SetReferencedPage(SdrPage* pNewPage)
}
}
+// #i96598#
+void SdrPageObj::SetBoundRectDirty()
+{
+ // avoid resetting aOutRect which in case of this object is model data,
+ // not re-creatable view data
+}
+
UINT16 SdrPageObj::GetObjIdentifier() const
{
return UINT16(OBJ_PAGE);
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index 0739aff633..da4e05b992 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -1955,7 +1955,7 @@ void SdrPathObj::TakeObjNameSingul(XubString& rName) const
}
rName = ImpGetResStr(nId);
- sal_uInt16 nPos(rName.SearchAscii("%N"));
+ sal_uInt16 nPos(rName.SearchAscii("%2")); // #i96537#
if(STRING_NOTFOUND != nPos)
{
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 323a493cc7..ad667fa500 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -261,8 +261,9 @@ namespace
// prepare DXArray content. To make it independent from font size (and such from
// the text transformation), scale it to unit coordinates
::std::vector< double > aDXArray;
+ static bool bDisableTextArray(false);
- if(rInfo.mpDXArray && rInfo.mnTextLen)
+ if(!bDisableTextArray && rInfo.mpDXArray && rInfo.mnTextLen)
{
const double fScaleFactor(basegfx::fTools::equalZero(aSize.getX()) ? 1.0 : 1.0 / aSize.getX());
aDXArray.reserve(rInfo.mnTextLen);
@@ -273,96 +274,121 @@ namespace
}
}
- // prepare overline data
- drawinglayer::primitive2d::FontUnderline eFontOverline(mapTextLineStyle(rInfo.mrFont.GetOverline()));
-
- // prepare underline data
- drawinglayer::primitive2d::FontUnderline eFontUnderline(mapTextLineStyle(rInfo.mrFont.GetUnderline()));
+ // create complex text primitive and append
+ const Color aFontColor(rInfo.mrFont.GetColor());
+ const basegfx::BColor aBFontColor(aFontColor.getBColor());
- const bool bUnderlineAbove(drawinglayer::primitive2d::FONT_UNDERLINE_NONE != eFontUnderline && impIsUnderlineAbove(rInfo.mrFont));
+ // prepare new primitive
+ drawinglayer::primitive2d::BasePrimitive2D* pNewPrimitive = 0;
+ const bool bDecoratedIsNeeded(
+ UNDERLINE_NONE != rInfo.mrFont.GetOverline()
+ || UNDERLINE_NONE != rInfo.mrFont.GetUnderline()
+ || STRIKEOUT_NONE != rInfo.mrFont.GetStrikeout()
+ || EMPHASISMARK_NONE != (rInfo.mrFont.GetEmphasisMark() & EMPHASISMARK_STYLE)
+ || RELIEF_NONE != rInfo.mrFont.GetRelief()
+ || rInfo.mrFont.IsShadow());
+
+ if(bDecoratedIsNeeded)
+ {
+ // TextDecoratedPortionPrimitive2D needed, prepare some more data
+ // get overline and underline color. If it's on automatic (0xffffffff) use FontColor instead
+ const Color aUnderlineColor(rInfo.maTextLineColor);
+ const basegfx::BColor aBUnderlineColor((0xffffffff == aUnderlineColor.GetColor()) ? aBFontColor : aUnderlineColor.getBColor());
+ const Color aOverlineColor(rInfo.maOverlineColor);
+ const basegfx::BColor aBOverlineColor((0xffffffff == aOverlineColor.GetColor()) ? aBFontColor : aOverlineColor.getBColor());
- // prepare strikeout data
- drawinglayer::primitive2d::FontStrikeout eFontStrikeout(drawinglayer::primitive2d::FONT_STRIKEOUT_NONE);
+ // prepare overline and underline data
+ const drawinglayer::primitive2d::FontUnderline eFontOverline(mapTextLineStyle(rInfo.mrFont.GetOverline()));
+ const drawinglayer::primitive2d::FontUnderline eFontUnderline(mapTextLineStyle(rInfo.mrFont.GetUnderline()));
- switch(rInfo.mrFont.GetStrikeout())
- {
- case STRIKEOUT_SINGLE: eFontStrikeout = drawinglayer::primitive2d::FONT_STRIKEOUT_SINGLE; break;
- case STRIKEOUT_DOUBLE: eFontStrikeout = drawinglayer::primitive2d::FONT_STRIKEOUT_DOUBLE; break;
- case STRIKEOUT_BOLD: eFontStrikeout = drawinglayer::primitive2d::FONT_STRIKEOUT_BOLD; break;
- case STRIKEOUT_SLASH: eFontStrikeout = drawinglayer::primitive2d::FONT_STRIKEOUT_SLASH; break;
- case STRIKEOUT_X: eFontStrikeout = drawinglayer::primitive2d::FONT_STRIKEOUT_X; break;
- default : break; // FontStrikeout_FORCE_EQUAL_SIZE, STRIKEOUT_NONE, STRIKEOUT_DONTKNOW
- }
+ // check UndelineAbove
+ const bool bUnderlineAbove(drawinglayer::primitive2d::FONT_UNDERLINE_NONE != eFontUnderline && impIsUnderlineAbove(rInfo.mrFont));
- // prepare wordLineMode (for underline and strikeout)
- // NOT for bullet texts. It is set (this may be an error by itself), but needs to be suppressed to hinder e.g. '1)'
- // to be splitted which would not look like the original
- const bool bWordLineMode(rInfo.mrFont.IsWordLineMode() && !rInfo.mbEndOfBullet);
+ // prepare strikeout data
+ drawinglayer::primitive2d::FontStrikeout eFontStrikeout(drawinglayer::primitive2d::FONT_STRIKEOUT_NONE);
- // prepare emphasis mark data
- drawinglayer::primitive2d::FontEmphasisMark eFontEmphasisMark(drawinglayer::primitive2d::FONT_EMPHASISMARK_NONE);
+ switch(rInfo.mrFont.GetStrikeout())
+ {
+ case STRIKEOUT_SINGLE: eFontStrikeout = drawinglayer::primitive2d::FONT_STRIKEOUT_SINGLE; break;
+ case STRIKEOUT_DOUBLE: eFontStrikeout = drawinglayer::primitive2d::FONT_STRIKEOUT_DOUBLE; break;
+ case STRIKEOUT_BOLD: eFontStrikeout = drawinglayer::primitive2d::FONT_STRIKEOUT_BOLD; break;
+ case STRIKEOUT_SLASH: eFontStrikeout = drawinglayer::primitive2d::FONT_STRIKEOUT_SLASH; break;
+ case STRIKEOUT_X: eFontStrikeout = drawinglayer::primitive2d::FONT_STRIKEOUT_X; break;
+ default : break; // FontStrikeout_FORCE_EQUAL_SIZE, STRIKEOUT_NONE, STRIKEOUT_DONTKNOW
+ }
- switch(rInfo.mrFont.GetEmphasisMark() & EMPHASISMARK_STYLE)
- {
- case EMPHASISMARK_DOT : eFontEmphasisMark = drawinglayer::primitive2d::FONT_EMPHASISMARK_DOT; break;
- case EMPHASISMARK_CIRCLE : eFontEmphasisMark = drawinglayer::primitive2d::FONT_EMPHASISMARK_CIRCLE; break;
- case EMPHASISMARK_DISC : eFontEmphasisMark = drawinglayer::primitive2d::FONT_EMPHASISMARK_DISC; break;
- case EMPHASISMARK_ACCENT : eFontEmphasisMark = drawinglayer::primitive2d::FONT_EMPHASISMARK_ACCENT; break;
- }
+ // prepare wordLineMode (for underline and strikeout)
+ // NOT for bullet texts. It is set (this may be an error by itself), but needs to be suppressed to hinder e.g. '1)'
+ // to be splitted which would not look like the original
+ const bool bWordLineMode(rInfo.mrFont.IsWordLineMode() && !rInfo.mbEndOfBullet);
- const bool bEmphasisMarkAbove(rInfo.mrFont.GetEmphasisMark() & EMPHASISMARK_POS_ABOVE);
- const bool bEmphasisMarkBelow(rInfo.mrFont.GetEmphasisMark() & EMPHASISMARK_POS_BELOW);
+ // prepare emphasis mark data
+ drawinglayer::primitive2d::FontEmphasisMark eFontEmphasisMark(drawinglayer::primitive2d::FONT_EMPHASISMARK_NONE);
- // prepare font relief data
- drawinglayer::primitive2d::FontRelief eFontRelief(drawinglayer::primitive2d::FONT_RELIEF_NONE);
+ switch(rInfo.mrFont.GetEmphasisMark() & EMPHASISMARK_STYLE)
+ {
+ case EMPHASISMARK_DOT : eFontEmphasisMark = drawinglayer::primitive2d::FONT_EMPHASISMARK_DOT; break;
+ case EMPHASISMARK_CIRCLE : eFontEmphasisMark = drawinglayer::primitive2d::FONT_EMPHASISMARK_CIRCLE; break;
+ case EMPHASISMARK_DISC : eFontEmphasisMark = drawinglayer::primitive2d::FONT_EMPHASISMARK_DISC; break;
+ case EMPHASISMARK_ACCENT : eFontEmphasisMark = drawinglayer::primitive2d::FONT_EMPHASISMARK_ACCENT; break;
+ }
- switch(rInfo.mrFont.GetRelief())
- {
- case RELIEF_EMBOSSED : eFontRelief = drawinglayer::primitive2d::FONT_RELIEF_EMBOSSED; break;
- case RELIEF_ENGRAVED : eFontRelief = drawinglayer::primitive2d::FONT_RELIEF_ENGRAVED; break;
- default : break; // RELIEF_NONE, FontRelief_FORCE_EQUAL_SIZE
- }
+ const bool bEmphasisMarkAbove(rInfo.mrFont.GetEmphasisMark() & EMPHASISMARK_POS_ABOVE);
+ const bool bEmphasisMarkBelow(rInfo.mrFont.GetEmphasisMark() & EMPHASISMARK_POS_BELOW);
- // prepare shadow/outline data
- const bool bShadow(rInfo.mrFont.IsShadow());
+ // prepare font relief data
+ drawinglayer::primitive2d::FontRelief eFontRelief(drawinglayer::primitive2d::FONT_RELIEF_NONE);
- // create complex text primitive and append
- const Color aFontColor(rInfo.mrFont.GetColor());
- const basegfx::BColor aBFontColor(aFontColor.getBColor());
+ switch(rInfo.mrFont.GetRelief())
+ {
+ case RELIEF_EMBOSSED : eFontRelief = drawinglayer::primitive2d::FONT_RELIEF_EMBOSSED; break;
+ case RELIEF_ENGRAVED : eFontRelief = drawinglayer::primitive2d::FONT_RELIEF_ENGRAVED; break;
+ default : break; // RELIEF_NONE, FontRelief_FORCE_EQUAL_SIZE
+ }
- // get overline color. If it's on automatic (0xffffffff) use FontColor instead
- const Color aOverlineColor(rInfo.maOverlineColor);
- const basegfx::BColor aBOverlineColor((0xffffffff == aOverlineColor.GetColor()) ? aBFontColor : aOverlineColor.getBColor());
-
- // get underline color. If it's on automatic (0xffffffff) use FontColor instead
- const Color aUnderlineColor(rInfo.maTextLineColor);
- const basegfx::BColor aBUnderlineColor((0xffffffff == aUnderlineColor.GetColor()) ? aBFontColor : aUnderlineColor.getBColor());
-
- drawinglayer::primitive2d::BasePrimitive2D* pNewPrimitive = new drawinglayer::primitive2d::TextDecoratedPortionPrimitive2D(
-
- // attributes for TextSimplePortionPrimitive2D
- aNewTransform,
- rInfo.mrText,
- rInfo.mnTextStart,
- rInfo.mnTextLen,
- aDXArray,
- aFontAttributes,
- rInfo.mpLocale ? *rInfo.mpLocale : ::com::sun::star::lang::Locale(),
- aBFontColor,
-
- // attributes for TextDecoratedPortionPrimitive2D
- aBOverlineColor,
- aBUnderlineColor,
- eFontOverline,
- eFontUnderline,
- bUnderlineAbove,
- eFontStrikeout,
- bWordLineMode,
- eFontEmphasisMark,
- bEmphasisMarkAbove,
- bEmphasisMarkBelow,
- eFontRelief,
- bShadow);
+ // prepare shadow/outline data
+ const bool bShadow(rInfo.mrFont.IsShadow());
+
+ // TextDecoratedPortionPrimitive2D is needed, create one
+ pNewPrimitive = new drawinglayer::primitive2d::TextDecoratedPortionPrimitive2D(
+
+ // attributes for TextSimplePortionPrimitive2D
+ aNewTransform,
+ rInfo.mrText,
+ rInfo.mnTextStart,
+ rInfo.mnTextLen,
+ aDXArray,
+ aFontAttributes,
+ rInfo.mpLocale ? *rInfo.mpLocale : ::com::sun::star::lang::Locale(),
+ aBFontColor,
+
+ // attributes for TextDecoratedPortionPrimitive2D
+ aBOverlineColor,
+ aBUnderlineColor,
+ eFontOverline,
+ eFontUnderline,
+ bUnderlineAbove,
+ eFontStrikeout,
+ bWordLineMode,
+ eFontEmphasisMark,
+ bEmphasisMarkAbove,
+ bEmphasisMarkBelow,
+ eFontRelief,
+ bShadow);
+ }
+ else
+ {
+ // TextSimplePortionPrimitive2D is enough
+ pNewPrimitive = new drawinglayer::primitive2d::TextSimplePortionPrimitive2D(
+ aNewTransform,
+ rInfo.mrText,
+ rInfo.mnTextStart,
+ rInfo.mnTextLen,
+ aDXArray,
+ aFontAttributes,
+ rInfo.mpLocale ? *rInfo.mpLocale : ::com::sun::star::lang::Locale(),
+ aBFontColor);
+ }
if(rInfo.mbEndOfBullet)
{
diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx
index 3f5f4c1c95..121e8dc1bb 100644
--- a/svx/source/svdraw/svdotxtr.cxx
+++ b/svx/source/svdraw/svdotxtr.cxx
@@ -44,6 +44,8 @@
#include <svx/sdr/properties/properties.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include "svdtxhdl.hxx"
+#include <svtools/itemset.hxx>
+#include <svditer.hxx>
////////////////////////////////////////////////////////////////////////////////////////////////////
//
@@ -414,20 +416,75 @@ SdrObject* SdrTextObj::ImpConvertMakeObj(const basegfx::B2DPolyPolygon& rPolyPol
SdrObject* SdrTextObj::ImpConvertAddText(SdrObject* pObj, FASTBOOL bBezier) const
{
- if (!ImpCanConvTextToCurve()) return pObj;
- SdrObject* pText=ImpConvertObj(!bBezier);
- if (pText==NULL) return pObj;
- if (pObj==NULL) return pText;
- if (pText->IsGroupObject()) {
+ if(!ImpCanConvTextToCurve())
+ {
+ return pObj;
+ }
+
+ SdrObject* pText = ImpConvertObj(!bBezier);
+
+ if(!pText)
+ {
+ return pObj;
+ }
+
+ if(!pObj)
+ {
+ return pText;
+ }
+
+ // #i97874#
+ // if shadow is set, apply it to created text, too
+ const bool bShadowOn(((SdrShadowItem&)GetObjectItem(SDRATTR_SHADOW)).GetValue());
+ SfxItemSet aShadowSet(*(GetObjectItemSet().GetPool()), SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST);
+
+ if(bShadowOn)
+ {
+ // filter shadow items
+ aShadowSet.Put(GetObjectItemSet());
+ }
+
+ { // #i97874#
+ // copy needed attributes from local object to all newly created objects
+ SdrObjListIter aIter(*pText);
+
+ while(aIter.IsMore())
+ {
+ SdrObject* pCandidate = aIter.Next();
+
+ // make sure Layer and model are correct
+ pCandidate->NbcSetLayer(SdrLayerID(GetLayer()));
+ pCandidate->SetModel(pModel);
+
+ // set shadow if needed
+ if(bShadowOn)
+ {
+ pCandidate->SetMergedItemSet(aShadowSet);
+ }
+
+ // set used StyleSheet
+ pCandidate->NbcSetStyleSheet(GetStyleSheet(), true);
+ }
+ }
+
+ if(pText->IsGroupObject())
+ {
+ // is already group object, add partial shape in front
SdrObjList* pOL=pText->GetSubList();
pOL->InsertObject(pObj,0);
+
return pText;
- } else {
+ }
+ else
+ {
+ // not yet a group, create one and add partial and new shapes
SdrObjGroup* pGrp=new SdrObjGroup;
SdrObjList* pOL=pGrp->GetSubList();
pOL->InsertObject(pObj);
pOL->InsertObject(pText);
+
return pGrp;
}
}
+// eof
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index bf13805567..a7c72e18dc 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -791,7 +791,7 @@ void SdrPaintView::CompleteRedraw(OutputDevice* pOut, const Region& rReg, sdr::c
OSL_ENSURE(pPaintWindow, "SdrPaintView::CompleteRedraw: No OutDev (!)");
DoCompleteRedraw(*pPaintWindow, aOptimizedRepaintRegion, pRedirector);
- EndCompleteRedraw(*pPaintWindow);
+ EndCompleteRedraw(*pPaintWindow, true);
#ifdef SVX_REPAINT_TIMER_TEST
}
@@ -888,7 +888,7 @@ void SdrPaintView::DoCompleteRedraw(SdrPaintWindow& rPaintWindow, const Region&
}
}
-void SdrPaintView::EndCompleteRedraw(SdrPaintWindow& rPaintWindow)
+void SdrPaintView::EndCompleteRedraw(SdrPaintWindow& rPaintWindow, bool bPaintFormLayer)
{
if(rPaintWindow.getTemporaryTarget())
{
@@ -899,7 +899,10 @@ void SdrPaintView::EndCompleteRedraw(SdrPaintWindow& rPaintWindow)
{
// draw postprocessing, only for known devices
// it is necessary to always paint FormLayer
- ImpFormLayerDrawing(rPaintWindow);
+ if(bPaintFormLayer)
+ {
+ ImpFormLayerDrawing(rPaintWindow);
+ }
// look for active TextEdit. As long as this cannot be painted to a VDev,
// it cannot get part of buffering. In that case, output evtl. prerender
@@ -1011,10 +1014,10 @@ SdrPaintWindow* SdrPaintView::BeginDrawLayers(OutputDevice* pOut, const Region&
return pPaintWindow;
}
-void SdrPaintView::EndDrawLayers(SdrPaintWindow& rPaintWindow)
+void SdrPaintView::EndDrawLayers(SdrPaintWindow& rPaintWindow, bool bPaintFormLayer)
{
// #i74769# use EndCompleteRedraw() as common base
- EndCompleteRedraw(rPaintWindow);
+ EndCompleteRedraw(rPaintWindow, bPaintFormLayer);
if(mpPageView)
{