summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorobo <obo@openoffice.org>2010-06-14 15:56:07 +0200
committerobo <obo@openoffice.org>2010-06-14 15:56:07 +0200
commit9dc424b06acfd66e0b3cf15024e49fada5c850a6 (patch)
tree0f5cf6b02d38a9b137735a445973780b53405d25 /svx/source
parent2c4189112bc123fbca3eede964143fb5dcc9406f (diff)
parent8985ad037f7201bc33740fd79e7a5db2adb54c5a (diff)
CWS-TOOLING: integrate CWS aw082
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/svdraw/svdedtv2.cxx11
-rw-r--r--svx/source/svdraw/svdfmtf.cxx63
-rw-r--r--svx/source/svdraw/svdpage.cxx7
3 files changed, 73 insertions, 8 deletions
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index f04280ea35..5b49ae936f 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -1090,7 +1090,16 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode)
if(!bFirstObjectComplete)
{
- aMergePolyPolygonA = aTmpPoly;
+ // #i111987# Also need to collect ORed source shape when more than
+ // a single polygon is involved
+ if(aMergePolyPolygonA.count())
+ {
+ aMergePolyPolygonA = basegfx::tools::solvePolygonOperationOr(aMergePolyPolygonA, aTmpPoly);
+ }
+ else
+ {
+ aMergePolyPolygonA = aTmpPoly;
+ }
}
else
{
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index 3d25b44844..d55e21e745 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -85,6 +85,11 @@ ImpSdrGDIMetaFileImport::ImpSdrGDIMetaFileImport(SdrModel& rModel):
bLastObjWasPolyWithoutLine(FALSE),bNoLine(FALSE),bNoFill(FALSE),bLastObjWasLine(FALSE)
{
aVD.EnableOutput(FALSE);
+
+ // #i111954# init to no fill and no line initially
+ aVD.SetLineColor();
+ aVD.SetFillColor();
+
aOldLineColor.SetRed( aVD.GetLineColor().GetRed() + 1 ); // invalidate old line color
pLineAttr=new SfxItemSet(rModel.GetItemPool(),XATTR_LINE_FIRST,XATTR_LINE_LAST);
pFillAttr=new SfxItemSet(rModel.GetItemPool(),XATTR_FILL_FIRST,XATTR_FILL_LAST);
@@ -380,17 +385,61 @@ void ImpSdrGDIMetaFileImport::InsertObj( SdrObject* pObj, sal_Bool bScale )
pObj->NbcMove( Size( aOfs.X(), aOfs.Y() ) );
}
- aTmpList.InsertObject( pObj );
- if ( HAS_BASE( SdrPathObj, pObj ) )
+ // #i111954# check object for visibility
+ // used are SdrPathObj, SdrRectObj, SdrCircObj, SdrGrafObj
+ bool bVisible(false);
+
+ if(pObj->HasLineStyle())
+ {
+ bVisible = true;
+ }
+
+ if(!bVisible && pObj->HasFillStyle())
+ {
+ bVisible = true;
+ }
+
+ if(!bVisible)
+ {
+ SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >(pObj);
+
+ if(pTextObj && pTextObj->HasText())
+ {
+ bVisible = true;
+ }
+ }
+
+ if(!bVisible)
{
- FASTBOOL bClosed=pObj->IsClosedObj();
- bLastObjWasPolyWithoutLine=bNoLine && bClosed;
- bLastObjWasLine=!bClosed;
+ SdrGrafObj* pGrafObj = dynamic_cast< SdrGrafObj* >(pObj);
+
+ if(pGrafObj)
+ {
+ // this may be refined to check if the graphic really is visible. It
+ // is here to ensure that graphic objects without fill, line and text
+ // get created
+ bVisible = true;
+ }
+ }
+
+ if(!bVisible)
+ {
+ SdrObject::Free(pObj);
}
else
{
- bLastObjWasPolyWithoutLine = FALSE;
- bLastObjWasLine = FALSE;
+ aTmpList.InsertObject( pObj );
+ if ( HAS_BASE( SdrPathObj, pObj ) )
+ {
+ FASTBOOL bClosed=pObj->IsClosedObj();
+ bLastObjWasPolyWithoutLine=bNoLine && bClosed;
+ bLastObjWasLine=!bClosed;
+ }
+ else
+ {
+ bLastObjWasPolyWithoutLine = FALSE;
+ bLastObjWasLine = FALSE;
+ }
}
}
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index 1005962489..f9dc3c313d 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -1466,6 +1466,13 @@ void SdrPage::operator=(const SdrPage& rSrcPage)
mbObjectsNotPersistent = rSrcPage.mbObjectsNotPersistent;
{
+ // #i111122# delete SdrPageProperties when model is different
+ if(mpSdrPageProperties && GetModel() != rSrcPage.GetModel())
+ {
+ delete mpSdrPageProperties;
+ mpSdrPageProperties = 0;
+ }
+
if(!mpSdrPageProperties)
{
mpSdrPageProperties = new SdrPageProperties(*this);