summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-04-10 13:13:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-11 10:16:16 +0200
commit9fa75f677a7b48a2177fe11cca0d00f5a2deb7da (patch)
treeaecf6d5d272166c169935e1563517d020085ee54
parent88829fd914105a0837ee41d3f00f9178228c19cf (diff)
loplugin:mergeclasses merge E3dScene with E3dPolyScene
Change-Id: I70f28fb4c87ad8c0e0ad46f4ce04914b6536d6b9 Reviewed-on: https://gerrit.libreoffice.org/36376 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--compilerplugins/clang/mergeclasses.results1
-rw-r--r--filter/source/msfilter/msdffimp.cxx1
-rw-r--r--filter/source/msfilter/svdfppt.cxx1
-rw-r--r--include/svx/dlgctl3d.hxx4
-rw-r--r--include/svx/globl3d.hxx3
-rw-r--r--include/svx/obj3d.hxx1
-rw-r--r--include/svx/polysc3d.hxx44
-rw-r--r--sd/inc/pch/precompiled_sd.hxx1
-rw-r--r--sd/source/ui/func/fucon3d.cxx3
-rw-r--r--sd/source/ui/func/fudraw.cxx6
-rw-r--r--sd/source/ui/func/fusel.cxx4
-rw-r--r--sd/source/ui/func/futransf.cxx1
-rw-r--r--sd/source/ui/view/drviews4.cxx2
-rw-r--r--sd/source/ui/view/drviewsj.cxx8
-rw-r--r--svx/Library_svxcore.mk1
-rw-r--r--svx/inc/pch/precompiled_svx.hxx1
-rw-r--r--svx/inc/pch/precompiled_svxcore.hxx1
-rw-r--r--svx/source/customshapes/EnhancedCustomShape3d.cxx4
-rw-r--r--svx/source/dialog/dlgctl3d.cxx4
-rw-r--r--svx/source/engine3d/dragmt3d.cxx1
-rw-r--r--svx/source/engine3d/float3d.cxx1
-rw-r--r--svx/source/engine3d/obj3d.cxx1
-rw-r--r--svx/source/engine3d/objfac3d.cxx6
-rw-r--r--svx/source/engine3d/polysc3d.cxx58
-rw-r--r--svx/source/engine3d/view3d.cxx5
-rw-r--r--svx/source/engine3d/view3d1.cxx20
-rw-r--r--svx/source/sdr/contact/viewcontactofe3dscene.cxx1
-rw-r--r--svx/source/svdraw/svdobj.cxx1
-rw-r--r--svx/source/svdraw/svdpage.cxx1
-rw-r--r--svx/source/unodraw/unopage.cxx10
-rw-r--r--svx/source/unodraw/unoprov.cxx2
-rw-r--r--svx/source/unodraw/unoshap3.cxx4
-rw-r--r--svx/source/unodraw/unoshape.cxx6
33 files changed, 40 insertions, 168 deletions
diff --git a/compilerplugins/clang/mergeclasses.results b/compilerplugins/clang/mergeclasses.results
index b8c64805da81..126c7d3cd7d8 100644
--- a/compilerplugins/clang/mergeclasses.results
+++ b/compilerplugins/clang/mergeclasses.results
@@ -26,7 +26,6 @@ merge DbGridControl with FmGridControl
merge DdeItem with DdeGetPutItem
merge DdeLink with DdeHotLink
merge DomVisitor with DomExport
-merge E3dScene with E3dPolyScene
merge E3dUndoAction with E3dRotateUndoAction
merge EscherPersistTable with EscherEx
merge ExcBoolRecord with Exc1904
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index df8167f6e047..b27da930012e 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -103,7 +103,6 @@
#include <editeng/colritem.hxx>
#include <svx/sxekitm.hxx>
#include <editeng/bulletitem.hxx>
-#include <svx/polysc3d.hxx>
#include <svx/extrud3d.hxx>
#include "svx/svditer.hxx"
#include <svx/xpoly.hxx>
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index ad5621bfdee8..875e74385787 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -57,7 +57,6 @@
#include <editeng/bulletitem.hxx>
#include <editeng/hngpnctitem.hxx>
#include <editeng/forbiddenruleitem.hxx>
-#include <svx/polysc3d.hxx>
#include <svx/extrud3d.hxx>
#include <svx/svdoashp.hxx>
#include <editeng/tstpitem.hxx>
diff --git a/include/svx/dlgctl3d.hxx b/include/svx/dlgctl3d.hxx
index 57edb8a46fe9..589bd33b9ac2 100644
--- a/include/svx/dlgctl3d.hxx
+++ b/include/svx/dlgctl3d.hxx
@@ -30,8 +30,8 @@
class FmFormModel;
class FmFormPage;
class E3dView;
-class E3dPolyScene;
class E3dObject;
+class E3dScene;
enum class SvxPreviewObjectType { SPHERE, CUBE };
@@ -41,7 +41,7 @@ protected:
FmFormModel* mpModel;
FmFormPage* mpFmPage;
E3dView* mp3DView;
- E3dPolyScene* mpScene;
+ E3dScene* mpScene;
E3dObject* mp3DObj;
SvxPreviewObjectType mnObjectType;
diff --git a/include/svx/globl3d.hxx b/include/svx/globl3d.hxx
index a258b6b189c7..2eed87268988 100644
--- a/include/svx/globl3d.hxx
+++ b/include/svx/globl3d.hxx
@@ -22,8 +22,7 @@
#include <sal/types.h>
-const sal_uInt16 E3D_SCENE_ID = 1;
-const sal_uInt16 E3D_POLYSCENE_ID = 2;
+const sal_uInt16 E3D_SCENE_ID = 2;
const sal_uInt16 E3D_OBJECT_ID = 3; // should not be used, it's only a helper class for E3DScene and E3DCompoundObject
const sal_uInt16 E3D_CUBEOBJ_ID = 4;
const sal_uInt16 E3D_SPHEREOBJ_ID = 5;
diff --git a/include/svx/obj3d.hxx b/include/svx/obj3d.hxx
index 72d1849e300e..58d1813d35ed 100644
--- a/include/svx/obj3d.hxx
+++ b/include/svx/obj3d.hxx
@@ -43,7 +43,6 @@
class SfxPoolItem;
class Viewport3D;
class E3dScene;
-class E3dPolyScene;
namespace basegfx { class B3DPolyPolygon; }
namespace sdr { namespace properties {
diff --git a/include/svx/polysc3d.hxx b/include/svx/polysc3d.hxx
deleted file mode 100644
index 4526bca338e1..000000000000
--- a/include/svx/polysc3d.hxx
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_SVX_POLYSC3D_HXX
-#define INCLUDED_SVX_POLYSC3D_HXX
-
-#include <svx/svdpage.hxx>
-#include <svx/scene3d.hxx>
-
-/*************************************************************************
-|*
-|* 3D scene displayed through 2D polygons
-|*
-\************************************************************************/
-
-class SVX_DLLPUBLIC E3dPolyScene : public E3dScene
-{
-public:
- E3dPolyScene();
- E3dPolyScene(E3dDefaultAttributes& rDefault);
-
- virtual sal_uInt16 GetObjIdentifier() const override;
- virtual E3dPolyScene* Clone() const override;
-};
-
-#endif // INCLUDED_SVX_POLYSC3D_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx
index bb12f7c1a65b..72edaa133137 100644
--- a/sd/inc/pch/precompiled_sd.hxx
+++ b/sd/inc/pch/precompiled_sd.hxx
@@ -417,7 +417,6 @@
#include <svx/hyperdlg.hxx>
#include <svx/imapdlg.hxx>
#include <svx/obj3d.hxx>
-#include <svx/polysc3d.hxx>
#include <svx/ruler.hxx>
#include <svx/sdmetitm.hxx>
#include <svx/sdooitm.hxx>
diff --git a/sd/source/ui/func/fucon3d.cxx b/sd/source/ui/func/fucon3d.cxx
index d26f8fd56531..dfbb806136b6 100644
--- a/sd/source/ui/func/fucon3d.cxx
+++ b/sd/source/ui/func/fucon3d.cxx
@@ -45,7 +45,6 @@
#include "ToolBarManager.hxx"
#include <svx/svx3ditems.hxx>
-#include <svx/polysc3d.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
using namespace com::sun::star;
@@ -374,7 +373,7 @@ SdrObject* FuConstruct3dObject::CreateDefaultObject(const sal_uInt16 nID, const
double fW(aVolume.getWidth());
double fH(aVolume.getHeight());
::tools::Rectangle a3DRect(0, 0, (long)fW, (long)fH);
- E3dScene* pScene = new E3dPolyScene(mpView->Get3DDefaultAttributes());
+ E3dScene* pScene = new E3dScene(mpView->Get3DDefaultAttributes());
// copied code from E3dView::InitScene
double fCamZ(aVolume.getMaxZ() + ((fW + fH) / 4.0));
diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx
index 25b3483b9a24..404b3be53d65 100644
--- a/sd/source/ui/func/fudraw.cxx
+++ b/sd/source/ui/func/fudraw.cxx
@@ -35,7 +35,7 @@
#include <svtools/imapobj.hxx>
#include <svx/svxids.hrc>
#include <svx/obj3d.hxx>
-#include <svx/polysc3d.hxx>
+#include <svx/scene3d.hxx>
#include <sfx2/viewfrm.hxx>
#include "anminfo.hxx"
@@ -568,7 +568,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
// test for animation or ImageMap
bDefPointer = !SetPointer(pObj, aPnt);
- if (bDefPointer && (dynamic_cast< const SdrObjGroup *>( pObj ) != nullptr || dynamic_cast< const E3dPolyScene* >(pObj) != nullptr))
+ if (bDefPointer && (dynamic_cast< const SdrObjGroup *>( pObj ) != nullptr || dynamic_cast< const E3dScene* >(pObj) != nullptr))
{
// take a glance into the group
pObj = mpView->PickObj(aPnt, mpView->getHitTolLog(), pPV, SdrSearchOptions::ALSOONMASTER | SdrSearchOptions::DEEP);
@@ -754,7 +754,7 @@ bool FuDraw::RequestHelp(const HelpEvent& rHEvt)
bReturn = SetHelpText(pObj, aPosPixel, aVEvt);
- if (!bReturn && (dynamic_cast< const SdrObjGroup *>( pObj ) != nullptr || dynamic_cast< const E3dPolyScene* >(pObj) != nullptr))
+ if (!bReturn && (dynamic_cast< const SdrObjGroup *>( pObj ) != nullptr || dynamic_cast< const E3dScene* >(pObj) != nullptr))
{
// take a glance into the group
SdrPageView* pPV = nullptr;
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index f17998f58024..725ea9f4e54e 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -22,7 +22,7 @@
#include <svx/svddrgmt.hxx>
#include <svx/svdpagv.hxx>
#include <svx/svdogrp.hxx>
-#include <svx/polysc3d.hxx>
+#include <svx/scene3d.hxx>
#include "drawview.hxx"
#include <svtools/imapobj.hxx>
#include <svl/urihelper.hxx>
@@ -308,7 +308,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
if ( ! bSelectionOnly)
bReturn = AnimateObj(pObj, aMDPos);
- if( !bReturn && (dynamic_cast< const SdrObjGroup *>( pObj ) != nullptr || dynamic_cast< const E3dPolyScene* >(pObj) != nullptr))
+ if( !bReturn && (dynamic_cast< const SdrObjGroup *>( pObj ) != nullptr || dynamic_cast< const E3dScene* >(pObj) != nullptr))
{
if(rMEvt.GetClicks() == 1)
{
diff --git a/sd/source/ui/func/futransf.cxx b/sd/source/ui/func/futransf.cxx
index d8f33c578bbd..45aeff70c7b5 100644
--- a/sd/source/ui/func/futransf.cxx
+++ b/sd/source/ui/func/futransf.cxx
@@ -20,7 +20,6 @@
#include "futransf.hxx"
#include <svx/dialogs.hrc>
-#include <svx/polysc3d.hxx>
#include <vcl/msgbox.hxx>
#include <sfx2/request.hxx>
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index fc5d537e2796..064c9a611fe6 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -703,7 +703,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
}
else if( nInv == SdrInventor::E3d )
{
- if( nId == E3D_POLYSCENE_ID || nId == E3D_SCENE_ID )
+ if( nId == E3D_SCENE_ID )
{
if( !mpDrawView->IsGroupEntered() )
aPopupId = "3dscene";
diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx
index cc52eb9e5ab9..fc1f80294393 100644
--- a/sd/source/ui/view/drviewsj.cxx
+++ b/sd/source/ui/view/drviewsj.cxx
@@ -31,8 +31,8 @@
#include <sfx2/dispatch.hxx>
#include <sfx2/request.hxx>
#include <svx/svdopath.hxx>
-#include <svx/polysc3d.hxx>
#include <svx/obj3d.hxx>
+#include <svx/scene3d.hxx>
#include <sfx2/event.hxx>
#include <sfx2/docfile.hxx>
#include <rtl/ustrbuf.hxx>
@@ -127,14 +127,14 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
/* If it is not a group object or 3D object, we disable "enter
group". */
- if( !( ( dynamic_cast< const SdrObjGroup *>( pObj ) != nullptr && nInv == SdrInventor::Default ) ||
- (dynamic_cast< const E3dPolyScene* >(pObj) != nullptr|| dynamic_cast< const E3dScene* >(pObj) != nullptr /*|| pObj->ISA (E3dCompoundObject) */) ) )
+ if( !( ( dynamic_cast< const SdrObjGroup *>( pObj ) != nullptr && nInv == SdrInventor::Default ) ||
+ ( dynamic_cast< const E3dScene* >(pObj) != nullptr ) ) )
{
rSet.DisableItem( SID_ENTER_GROUP );
}
// If it is not a group object, we disable "ungroup"
- if(!(dynamic_cast< const SdrObjGroup *>( pObj ) != nullptr && nInv == SdrInventor::Default))
+ if(!(dynamic_cast< const SdrObjGroup *>( pObj ) != nullptr && nInv == SdrInventor::Default))
{
rSet.DisableItem(SID_UNGROUP);
}
diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk
index 48ecf228ba83..1847921c58c5 100644
--- a/svx/Library_svxcore.mk
+++ b/svx/Library_svxcore.mk
@@ -138,7 +138,6 @@ $(eval $(call gb_Library_add_exception_objects,svxcore,\
svx/source/engine3d/obj3d \
svx/source/engine3d/objfac3d \
svx/source/engine3d/polygn3d \
- svx/source/engine3d/polysc3d \
svx/source/engine3d/scene3d \
svx/source/engine3d/sphere3d \
svx/source/engine3d/svx3ditems \
diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx
index 9317ad193bc3..61a54c1cb93b 100644
--- a/svx/inc/pch/precompiled_svx.hxx
+++ b/svx/inc/pch/precompiled_svx.hxx
@@ -432,7 +432,6 @@
#include <svx/msdffdef.hxx>
#include <svx/obj3d.hxx>
#include <svx/pageitem.hxx>
-#include <svx/polysc3d.hxx>
#include <svx/rulritem.hxx>
#include <svx/sdasitm.hxx>
#include <svx/sdrpaintwindow.hxx>
diff --git a/svx/inc/pch/precompiled_svxcore.hxx b/svx/inc/pch/precompiled_svxcore.hxx
index 9dc699275b39..7001bea25230 100644
--- a/svx/inc/pch/precompiled_svxcore.hxx
+++ b/svx/inc/pch/precompiled_svxcore.hxx
@@ -465,7 +465,6 @@
#include <svx/ipolypolygoneditorcontroller.hxx>
#include <svx/lathe3d.hxx>
#include <svx/obj3d.hxx>
-#include <svx/polysc3d.hxx>
#include <svx/scene3d.hxx>
#include <svx/sdmetitm.hxx>
#include <svx/sdr/animation/scheduler.hxx>
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx
index d33942b0190f..6989760ad093 100644
--- a/svx/source/customshapes/EnhancedCustomShape3d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx
@@ -34,7 +34,6 @@
#include <svx/svdopath.hxx>
#include <svx/svdogrp.hxx>
#include <svx/svdpage.hxx>
-#include <svx/polysc3d.hxx>
#include <svx/svddef.hxx>
#include <svx/svx3ditems.hxx>
#include <svx/extrud3d.hxx>
@@ -42,6 +41,7 @@
#include <vcl/svapp.hxx>
#include <svx/xlnclit.hxx>
#include <svx/sdasitm.hxx>
+#include <svx/scene3d.hxx>
#include <com/sun/star/awt/Point.hpp>
#include <com/sun/star/drawing/Position3D.hpp>
#include <com/sun/star/drawing/Direction3D.hpp>
@@ -326,7 +326,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
a3DDefaultAttr.SetDefaultLatheCharacterMode( true );
a3DDefaultAttr.SetDefaultExtrudeCharacterMode( true );
- E3dScene* pScene = new E3dPolyScene( a3DDefaultAttr );
+ E3dScene* pScene = new E3dScene( a3DDefaultAttr );
bool bSceneHasObjects ( false );
bool bUseTwoFillStyles( false );
diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx
index 5b4a90cb6dab..85b23ffcf272 100644
--- a/svx/source/dialog/dlgctl3d.cxx
+++ b/svx/source/dialog/dlgctl3d.cxx
@@ -24,9 +24,9 @@
#include <svx/fmmodel.hxx>
#include <svl/itempool.hxx>
#include <svx/fmpage.hxx>
-#include <svx/polysc3d.hxx>
#include <svx/sphere3d.hxx>
#include <svx/cube3d.hxx>
+#include <svx/scene3d.hxx>
#include <vcl/svapp.hxx>
#include <vcl/builderfactory.hxx>
#include <svx/helperhittest3d.hxx>
@@ -97,7 +97,7 @@ void Svx3DPreviewControl::Construct()
mp3DView->SetBufferedOverlayAllowed(true);
// 3D Scene
- mpScene = new E3dPolyScene(mp3DView->Get3DDefaultAttributes());
+ mpScene = new E3dScene(mp3DView->Get3DDefaultAttributes());
// initially create object
SetObjectType(SvxPreviewObjectType::SPHERE);
diff --git a/svx/source/engine3d/dragmt3d.cxx b/svx/source/engine3d/dragmt3d.cxx
index fef392fe38af..8a3b4e8b8ae8 100644
--- a/svx/source/engine3d/dragmt3d.cxx
+++ b/svx/source/engine3d/dragmt3d.cxx
@@ -25,7 +25,6 @@
#include <svx/svddrgmt.hxx>
#include <svx/svdtrans.hxx>
#include <svx/obj3d.hxx>
-#include <svx/polysc3d.hxx>
#include <svx/e3dundo.hxx>
#include <svx/dialogs.hrc>
#include <svx/sdr/overlay/overlaypolypolygon.hxx>
diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx
index ad1a163a5e5d..7b239d7f16f6 100644
--- a/svx/source/engine3d/float3d.cxx
+++ b/svx/source/engine3d/float3d.cxx
@@ -35,7 +35,6 @@
#include <svx/camera3d.hxx>
#include <svx/fmmodel.hxx>
#include <svx/fmpage.hxx>
-#include <svx/polysc3d.hxx>
#include <editeng/eeitem.hxx>
#include <svl/style.hxx>
#include <svx/dlgutil.hxx>
diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx
index e1999f3b9a61..0f5680b726b1 100644
--- a/svx/source/engine3d/obj3d.cxx
+++ b/svx/source/engine3d/obj3d.cxx
@@ -29,7 +29,6 @@
#include "svx/globl3d.hxx"
#include <svx/camera3d.hxx>
#include <svx/scene3d.hxx>
-#include <svx/polysc3d.hxx>
#include <svx/cube3d.hxx>
#include <svx/lathe3d.hxx>
#include <svx/sphere3d.hxx>
diff --git a/svx/source/engine3d/objfac3d.cxx b/svx/source/engine3d/objfac3d.cxx
index 7baa7a5eba2b..bf214a12b608 100644
--- a/svx/source/engine3d/objfac3d.cxx
+++ b/svx/source/engine3d/objfac3d.cxx
@@ -19,7 +19,6 @@
#include <svx/svdpage.hxx>
#include "svx/globl3d.hxx"
-#include <svx/polysc3d.hxx>
#include <svx/cube3d.hxx>
#include <svx/sphere3d.hxx>
#include <svx/extrud3d.hxx>
@@ -27,6 +26,7 @@
#include <svx/polygn3d.hxx>
#include "svx/objfac3d.hxx"
#include <svx/svdobj.hxx>
+#include <svx/scene3d.hxx>
static bool bInit = false;
@@ -51,8 +51,8 @@ IMPL_STATIC_LINK( E3dObjFactory, MakeObject, SdrObjCreatorParams, aParams, SdrOb
{
switch ( aParams.nObjIdentifier )
{
- case E3D_POLYSCENE_ID:
- return new E3dPolyScene();
+ case E3D_SCENE_ID:
+ return new E3dScene();
case E3D_POLYGONOBJ_ID :
return new E3dPolygonObj();
case E3D_CUBEOBJ_ID :
diff --git a/svx/source/engine3d/polysc3d.cxx b/svx/source/engine3d/polysc3d.cxx
deleted file mode 100644
index d6aac7a216bb..000000000000
--- a/svx/source/engine3d/polysc3d.cxx
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <svx/xfillit.hxx>
-#include <svx/svdopath.hxx>
-#include <svx/svdogrp.hxx>
-#include "svx/svditer.hxx"
-#include <svx/svdetc.hxx>
-#include <vcl/virdev.hxx>
-#include <vcl/svapp.hxx>
-#include <svx/svdpage.hxx>
-#include <svx/svdpool.hxx>
-#include <svl/style.hxx>
-#include "svx/globl3d.hxx"
-#include <svx/polysc3d.hxx>
-#include <svx/xlnclit.hxx>
-#include <svl/metitem.hxx>
-#include <svx/xtable.hxx>
-#include <svx/xlnwtit.hxx>
-
-
-E3dPolyScene::E3dPolyScene()
-: E3dScene()
-{
-}
-
-E3dPolyScene::E3dPolyScene(E3dDefaultAttributes& rDefault)
-: E3dScene(rDefault)
-{
-}
-
-sal_uInt16 E3dPolyScene::GetObjIdentifier() const
-{
- return E3D_POLYSCENE_ID;
-}
-
-E3dPolyScene* E3dPolyScene::Clone() const
-{
- return CloneHelper< E3dPolyScene >();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx
index a2b0af5f3261..8c61c239b913 100644
--- a/svx/source/engine3d/view3d.cxx
+++ b/svx/source/engine3d/view3d.cxx
@@ -39,7 +39,6 @@
#include <svx/sphere3d.hxx>
#include <svx/extrud3d.hxx>
#include <svx/cube3d.hxx>
-#include <svx/polysc3d.hxx>
#include "dragmt3d.hxx"
#include <svx/view3d.hxx>
#include <svx/svdundo.hxx>
@@ -839,7 +838,7 @@ void E3dView::ConvertMarkedObjTo3D(bool bExtrude, const basegfx::B2DPoint& rPnt1
BegUndo(SVX_RESSTR(RID_SVX_3D_UNDO_LATHE));
// Create a new scene for the created 3D object
- E3dScene* pScene = new E3dPolyScene(Get3DDefaultAttributes());
+ E3dScene* pScene = new E3dScene(Get3DDefaultAttributes());
// Determine rectangle and possibly correct it
tools::Rectangle aRect = GetAllMarkedRect();
@@ -1303,7 +1302,7 @@ E3dScene* E3dView::SetCurrent3DObj(E3dObject* p3DObj)
tools::Rectangle aRect(0,0, (long) fW, (long) fH);
- pScene = new E3dPolyScene(Get3DDefaultAttributes());
+ pScene = new E3dScene(Get3DDefaultAttributes());
InitScene(pScene, fW, fH, aVolume.getMaxZ() + ((fW + fH) / 4.0));
diff --git a/svx/source/engine3d/view3d1.cxx b/svx/source/engine3d/view3d1.cxx
index 75746f93e345..649e2ddf4fb8 100644
--- a/svx/source/engine3d/view3d1.cxx
+++ b/svx/source/engine3d/view3d1.cxx
@@ -28,7 +28,6 @@
#include <svx/dialmgr.hxx>
#include "svx/globl3d.hxx"
#include <svx/obj3d.hxx>
-#include <svx/polysc3d.hxx>
#include <svx/e3ditem.hxx>
#include <editeng/colritem.hxx>
#include <svx/lathe3d.hxx>
@@ -50,16 +49,19 @@ void E3dView::ConvertMarkedToPolyObj()
{
SdrObject* pObj = GetMarkedObjectByIndex(0);
- if (pObj && dynamic_cast< const E3dPolyScene* >(pObj) != nullptr)
+ if (pObj)
{
- bool bBezier = false;
- pNewObj = static_cast<E3dPolyScene*>(pObj)->ConvertToPolyObj(bBezier, false/*bLineToArea*/);
-
- if (pNewObj)
+ auto pScene = dynamic_cast< const E3dScene* >(pObj);
+ if (pScene)
{
- BegUndo(SVX_RESSTR(RID_SVX_3D_UNDO_EXTRUDE));
- ReplaceObjectAtView(pObj, *GetSdrPageView(), pNewObj);
- EndUndo();
+ bool bBezier = false;
+ pNewObj = pScene->ConvertToPolyObj(bBezier, false/*bLineToArea*/);
+ if (pNewObj)
+ {
+ BegUndo(SVX_RESSTR(RID_SVX_3D_UNDO_EXTRUDE));
+ ReplaceObjectAtView(pObj, *GetSdrPageView(), pNewObj);
+ EndUndo();
+ }
}
}
}
diff --git a/svx/source/sdr/contact/viewcontactofe3dscene.cxx b/svx/source/sdr/contact/viewcontactofe3dscene.cxx
index 18f99ccc0445..75292d9b860f 100644
--- a/svx/source/sdr/contact/viewcontactofe3dscene.cxx
+++ b/svx/source/sdr/contact/viewcontactofe3dscene.cxx
@@ -18,7 +18,6 @@
*/
#include <svx/sdr/contact/viewcontactofe3dscene.hxx>
-#include <svx/polysc3d.hxx>
#include <svx/sdr/contact/displayinfo.hxx>
#include <svx/sdr/contact/viewobjectcontact.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index a275c9d2477a..d0cdb107f9e3 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -60,7 +60,6 @@
#include "svx/xlinjoit.hxx"
#include <svx/fmmodel.hxx>
-#include <svx/polysc3d.hxx>
#include <svx/sdr/contact/displayinfo.hxx>
#include <svx/sdr/contact/objectcontactofobjlistpainter.hxx>
#include <sdr/contact/viewcontactofgraphic.hxx>
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index cec60959272b..3ad1d0bb4709 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -44,7 +44,6 @@
#include <svx/svdpagv.hxx>
#include <svx/svdundo.hxx>
#include <svx/fmglob.hxx>
-#include <svx/polysc3d.hxx>
#include <svx/fmdpage.hxx>
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index e41825f7fb85..5da13dbcbc40 100644
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -41,13 +41,13 @@
#include "shapeimpl.hxx"
#include "svdglob.hxx"
#include "svx/globl3d.hxx"
-#include <svx/polysc3d.hxx>
#include <svx/unoprov.hxx>
#include <svx/svdopath.hxx>
#include "svx/unoapi.hxx"
#include <svx/svdomeas.hxx>
#include <svx/extrud3d.hxx>
#include <svx/lathe3d.hxx>
+#include <svx/scene3d.hxx>
#include <vcl/svapp.hxx>
#include <tools/diagnose_ex.h>
#include <tools/globname.hxx>
@@ -484,10 +484,9 @@ SdrObject *SvxDrawPage::CreateSdrObject_(const Reference< drawing::XShape > & xS
if (!pNewObj)
return nullptr;
- if( dynamic_cast<const E3dPolyScene* >(pNewObj) != nullptr)
+ if( auto pScene = dynamic_cast<E3dScene* >(pNewObj) )
{
// initialise scene
- E3dScene* pScene = static_cast<E3dScene*>(pNewObj);
double fW = (double)aSize.Width;
double fH = (double)aSize.Height;
@@ -585,7 +584,6 @@ SvxShape* SvxDrawPage::CreateShapeByTypeAndInventor( sal_uInt16 nType, SdrInvent
switch( nType )
{
case E3D_SCENE_ID :
- case E3D_POLYSCENE_ID :
pRet = new Svx3DSceneObject( pObj, mpPage );
break;
case E3D_CUBEOBJ_ID :
@@ -781,10 +779,6 @@ SvxShape* SvxDrawPage::CreateShapeByTypeAndInventor( sal_uInt16 nType, SdrInvent
nObjId = OBJ_CIRC;
break;
- case E3D_SCENE_ID | E3D_INVENTOR_FLAG:
- nObjId = E3D_POLYSCENE_ID | E3D_INVENTOR_FLAG;
- break;
-
case OBJ_TITLETEXT:
case OBJ_OUTLINETEXT:
nObjId = OBJ_TEXT;
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
index 87473aeb760a..24ba390d0309 100644
--- a/svx/source/unodraw/unoprov.cxx
+++ b/svx/source/unodraw/unoprov.cxx
@@ -841,7 +841,7 @@ const UHashMapImpl& GetUHashImpl()
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.CustomShape"), OBJ_CUSTOMSHAPE },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.MediaShape"), OBJ_MEDIA },
- { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DSceneObject"), E3D_POLYSCENE_ID | E3D_INVENTOR_FLAG },
+ { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DSceneObject"), E3D_SCENE_ID | E3D_INVENTOR_FLAG },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DCubeObject"), E3D_CUBEOBJ_ID | E3D_INVENTOR_FLAG },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DSphereObject"), E3D_SPHEREOBJ_ID | E3D_INVENTOR_FLAG },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DLatheObject"), E3D_LATHEOBJ_ID | E3D_INVENTOR_FLAG },
diff --git a/svx/source/unodraw/unoshap3.cxx b/svx/source/unodraw/unoshap3.cxx
index 7a7797f64430..880e99d08042 100644
--- a/svx/source/unodraw/unoshap3.cxx
+++ b/svx/source/unodraw/unoshap3.cxx
@@ -33,7 +33,6 @@
#include <svx/unoshape.hxx>
#include <svx/unopage.hxx>
#include <editeng/unoprnms.hxx>
-#include <svx/polysc3d.hxx>
#include "svx/globl3d.hxx"
#include <svx/cube3d.hxx>
#include <svx/sphere3d.hxx>
@@ -42,6 +41,7 @@
#include <svx/polygn3d.hxx>
#include "svx/unoshprp.hxx"
#include "svx/svdmodel.hxx"
+#include <svx/scene3d.hxx>
#include <basegfx/polygon/b3dpolygon.hxx>
#include <basegfx/polygon/b3dpolygontools.hxx>
#include <com/sun/star/drawing/PolyPolygonShape3D.hpp>
@@ -187,7 +187,7 @@ sal_Int32 SAL_CALL Svx3DSceneObject::getCount()
sal_Int32 nRetval = 0;
- if(mpObj.is() && dynamic_cast<const E3dPolyScene* >(mpObj.get()) != nullptr && mpObj->GetSubList())
+ if(mpObj.is() && dynamic_cast<const E3dScene* >(mpObj.get()) != nullptr && mpObj->GetSubList())
nRetval = mpObj->GetSubList()->GetObjCount();
return nRetval;
}
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index ee49c9913b1b..acb0783dc0b2 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -384,10 +384,6 @@ void SvxShape::impl_initFromSdrObject()
case OBJ_SECT: // sector
mpImpl->mnObjId = OBJ_CIRC;
break;
-
- case E3D_SCENE_ID | E3D_INVENTOR_FLAG:
- mpImpl->mnObjId = E3D_POLYSCENE_ID | E3D_INVENTOR_FLAG;
- break;
}
}
}
@@ -874,7 +870,7 @@ uno::Sequence< uno::Type > SAL_CALL SvxShape::_getTypes()
return aTypeSequence;
}
// 3d scene shape
- case E3D_POLYSCENE_ID|E3D_INVENTOR_FLAG:
+ case E3D_SCENE_ID|E3D_INVENTOR_FLAG:
{
static css::uno::Sequence< css::uno::Type > aTypeSequence;