You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by al...@apache.org on 2012/04/24 13:36:02 UTC
svn commit: r1329647 - in /incubator/ooo/branches/alg/aw080/main:
sd/source/ui/func/ svx/inc/svx/ svx/source/dialog/ svx/source/engine3d/
svx/source/sdr/contact/ svx/source/svdraw/
Author: alg
Date: Tue Apr 24 11:36:01 2012
New Revision: 1329647
URL: http://svn.apache.org/viewvc?rev=1329647&view=rev
Log:
aw080: craches fixed, made 3D work again, some more minor changes
Removed:
incubator/ooo/branches/alg/aw080/main/sd/source/ui/func/sdundo.cxx
Modified:
incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdpntv.hxx
incubator/ooo/branches/alg/aw080/main/svx/source/dialog/dlgctl3d.cxx
incubator/ooo/branches/alg/aw080/main/svx/source/engine3d/obj3d.cxx
incubator/ooo/branches/alg/aw080/main/svx/source/engine3d/scene3d.cxx
incubator/ooo/branches/alg/aw080/main/svx/source/sdr/contact/viewcontactofe3dscene.cxx
incubator/ooo/branches/alg/aw080/main/svx/source/svdraw/svdpntv.cxx
Modified: incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdpntv.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdpntv.hxx?rev=1329647&r1=1329646&r2=1329647&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdpntv.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdpntv.hxx Tue Apr 24 11:36:01 2012
@@ -496,8 +496,7 @@ public:
// Muss von App beim Scrollen usw. gerufen werden, damit ein u.U.
// aktives FormularControl mitverschoben werden kann
- void VisAreaChanged(const OutputDevice* pOut=NULL);
- void VisAreaChanged(const SdrPageWindow& rWindow);
+ void VisAreaChanged(const OutputDevice* pOut = 0);
bool IsPrintPreview() const { return mbPrintPreview; }
void SetPrintPreview(bool bOn = true) { if(mbPrintPreview != bOn) { mbPrintPreview = bOn; }}
Modified: incubator/ooo/branches/alg/aw080/main/svx/source/dialog/dlgctl3d.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/source/dialog/dlgctl3d.cxx?rev=1329647&r1=1329646&r2=1329647&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/source/dialog/dlgctl3d.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/source/dialog/dlgctl3d.cxx Tue Apr 24 11:36:01 2012
@@ -194,7 +194,7 @@ void Svx3DPreviewControl::SetObjectType(
{
if( mnObjectType != nType || !mp3DObj)
{
- SfxItemSet aSet(mp3DObj->GetObjectItemPool(), SDRATTR_START, SDRATTR_END, 0, 0);
+ SfxItemSet aSet(mpModel->GetItemPool(), SDRATTR_START, SDRATTR_END, 0, 0);
mnObjectType = nType;
if( mp3DObj )
Modified: incubator/ooo/branches/alg/aw080/main/svx/source/engine3d/obj3d.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/source/engine3d/obj3d.cxx?rev=1329647&r1=1329646&r2=1329647&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/source/engine3d/obj3d.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/source/engine3d/obj3d.cxx Tue Apr 24 11:36:01 2012
@@ -729,48 +729,48 @@ const basegfx::B2DHomMatrix& E3dCompound
// TTTT: look for correct place to set to identity
// TTTT: Added InvalidateBoundVolume to E3dCompoundObject to do the job, check
if(maSdrObjectTransformation.getB2DHomMatrix().isIdentity())
-{
- const uno::Sequence< beans::PropertyValue > aEmptyParameters;
- drawinglayer::geometry::ViewInformation3D aViewInfo3D(aEmptyParameters);
- E3dScene* pRootScene = fillViewInformation3DForCompoundObject(aViewInfo3D, *this);
-
- if(pRootScene)
- {
- // get VC of 3D candidate
- const sdr::contact::ViewContactOfE3d* pVCOfE3D = dynamic_cast< const sdr::contact::ViewContactOfE3d* >(&GetViewContact());
-
- if(pVCOfE3D)
- {
- // get 3D primitive sequence
- const drawinglayer::primitive3d::Primitive3DSequence xLocalSequence(pVCOfE3D->getViewIndependentPrimitive3DSequence());
-
- if(xLocalSequence.hasElements())
- {
- // get BoundVolume
- basegfx::B3DRange aBoundVolume(drawinglayer::primitive3d::getB3DRangeFromPrimitive3DSequence(
- xLocalSequence, aViewInfo3D));
-
- // transform bound volume to relative scene coordinates
- aBoundVolume.transform(aViewInfo3D.getObjectToView());
-
- // build 2D relative scene range
- basegfx::B2DRange aSnapRange(
- aBoundVolume.getMinX(), aBoundVolume.getMinY(),
- aBoundVolume.getMaxX(), aBoundVolume.getMaxY());
-
- // transform to 2D world coordiantes
- const sdr::contact::ViewContactOfE3dScene& rVCScene = static_cast< sdr::contact::ViewContactOfE3dScene& >(pRootScene->GetViewContact());
- aSnapRange.transform(rVCScene.getObjectTransformation());
-
- // compose local transformation
- const_cast< E3dCompoundObject* >(this)->maSdrObjectTransformation.setB2DHomMatrix(
- basegfx::tools::createScaleTranslateB2DHomMatrix(
- aSnapRange.getRange(),
- aSnapRange.getMinimum()));
- }
- }
- }
-}
+ {
+ const uno::Sequence< beans::PropertyValue > aEmptyParameters;
+ drawinglayer::geometry::ViewInformation3D aViewInfo3D(aEmptyParameters);
+ E3dScene* pRootScene = fillViewInformation3DForCompoundObject(aViewInfo3D, *this);
+
+ if(pRootScene)
+ {
+ // get VC of 3D candidate
+ const sdr::contact::ViewContactOfE3d* pVCOfE3D = dynamic_cast< const sdr::contact::ViewContactOfE3d* >(&GetViewContact());
+
+ if(pVCOfE3D)
+ {
+ // get 3D primitive sequence
+ const drawinglayer::primitive3d::Primitive3DSequence xLocalSequence(pVCOfE3D->getViewIndependentPrimitive3DSequence());
+
+ if(xLocalSequence.hasElements())
+ {
+ // get BoundVolume
+ basegfx::B3DRange aBoundVolume(drawinglayer::primitive3d::getB3DRangeFromPrimitive3DSequence(
+ xLocalSequence, aViewInfo3D));
+
+ // transform bound volume to relative scene coordinates
+ aBoundVolume.transform(aViewInfo3D.getObjectToView());
+
+ // build 2D relative scene range
+ basegfx::B2DRange aSnapRange(
+ aBoundVolume.getMinX(), aBoundVolume.getMinY(),
+ aBoundVolume.getMaxX(), aBoundVolume.getMaxY());
+
+ // transform to 2D world coordiantes
+ const sdr::contact::ViewContactOfE3dScene& rVCScene = static_cast< sdr::contact::ViewContactOfE3dScene& >(pRootScene->GetViewContact());
+ aSnapRange.transform(rVCScene.getObjectTransformation());
+
+ // compose local transformation
+ const_cast< E3dCompoundObject* >(this)->maSdrObjectTransformation.setB2DHomMatrix(
+ basegfx::tools::createScaleTranslateB2DHomMatrix(
+ aSnapRange.getRange(),
+ aSnapRange.getMinimum()));
+ }
+ }
+ }
+ }
// call parent
return E3dObject::getSdrObjectTransformation();
Modified: incubator/ooo/branches/alg/aw080/main/svx/source/engine3d/scene3d.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/source/engine3d/scene3d.cxx?rev=1329647&r1=1329646&r2=1329647&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/source/engine3d/scene3d.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/source/engine3d/scene3d.cxx Tue Apr 24 11:36:01 2012
@@ -327,15 +327,18 @@ void E3dScene::handleContentChange(const
// call parent
SdrObjList::handleContentChange(rHint);
- // reset local transformation to allow on-demand recalculation
- maSdrObjectTransformation.setB2DHomMatrix(basegfx::B2DHomMatrix());
-
// react self if outmost scene
E3dScene* pScene = GetScene();
- if(pScene && pScene == this)
+ if(pScene == this)
{
- ImpCleanup3DDepthMapper();
+ // depth mapper needs to change
+ ImpCleanup3DDepthMapper();
+ }
+ else
+ {
+ // reset local transformation to allow on-demand recalculation
+ maSdrObjectTransformation.setB2DHomMatrix(basegfx::B2DHomMatrix());
}
}
Modified: incubator/ooo/branches/alg/aw080/main/svx/source/sdr/contact/viewcontactofe3dscene.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/source/sdr/contact/viewcontactofe3dscene.cxx?rev=1329647&r1=1329646&r2=1329647&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/source/sdr/contact/viewcontactofe3dscene.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/source/sdr/contact/viewcontactofe3dscene.cxx Tue Apr 24 11:36:01 2012
@@ -356,9 +356,27 @@ namespace sdr
// call parent
ViewContactOfSdrObj::ActionChanged();
- // TTTT: the original implementation of E3dScene::invalidateObjectRange()
- // iterated over the children (only 1st level, though). Not sure
- // if this is needed, leavong out for now
+ // Iterate over children and propagate ActionChanged there.
+ // This is needed for 3D objects. In comparison, changes on a
+ // 2d group object are done by changing all sub-objects individually,
+ // so not necessary there
+ const sal_uInt32 nChildrenCount(GetObjectCount());
+
+ for(sal_uInt32 a(0); a < nChildrenCount; a++)
+ {
+ ViewContactOfE3d* pViewContactOfE3d = dynamic_cast< ViewContactOfE3d* >(&GetViewContact(a));
+
+ if(pViewContactOfE3d)
+ {
+ // only reset 2D buffered part (the bound range which is
+ // global to the page)
+ pViewContactOfE3d->ViewContactOfSdrObj::ActionChanged();
+ }
+ else
+ {
+ OSL_ENSURE(false, "3D scene with a non-3D child object (!)");
+ }
+ }
// mark locally cached values as invalid
maViewInformation3D = drawinglayer::geometry::ViewInformation3D();
Modified: incubator/ooo/branches/alg/aw080/main/svx/source/svdraw/svdpntv.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/source/svdraw/svdpntv.cxx?rev=1329647&r1=1329646&r2=1329647&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/source/svdraw/svdpntv.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/source/svdraw/svdpntv.cxx Tue Apr 24 11:36:01 2012
@@ -1328,25 +1328,19 @@ void SdrPaintView::VisAreaChanged(const
if(pWindow)
{
- VisAreaChanged(*pWindow);
+ Broadcast(SvxViewHint(SvxViewHint::SVX_HINT_VIEWCHANGED));
}
}
else
{
- for(sal_uInt32 a(0L); a < mpPageView->PageWindowCount(); a++)
+ if(mpPageView->PageWindowCount())
{
- VisAreaChanged(*mpPageView->GetPageWindow(a));
+ Broadcast(SvxViewHint(SvxViewHint::SVX_HINT_VIEWCHANGED));
}
}
}
}
-void SdrPaintView::VisAreaChanged(const SdrPageWindow& /*rWindow*/)
-{
- // notify SfxListener
- Broadcast(SvxViewHint(SvxViewHint::SVX_HINT_VIEWCHANGED));
-}
-
const svtools::ColorConfig& SdrPaintView::getColorConfig() const
{
return maColorConfig;