Kaydet (Commit) 92291709 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Unindent.

Change-Id: I98b5a0b91c92e58bae3caa69a4ed35c72dc839dd
üst a305869e
......@@ -24,45 +24,30 @@
#include <svx/svxdllapi.h>
#include <svx/svdpage.hxx>
// predeclarations
class SdrPage;
class SdrObject;
namespace sdr { namespace contact {
namespace sdr
class SVX_DLLPUBLIC ObjectContactPainter : public ObjectContact
{
namespace contact
{
class SVX_DLLPUBLIC ObjectContactPainter : public ObjectContact
{
protected:
protected:
// Hierarchy access methods
virtual sal_uInt32 GetPaintObjectCount() const = 0;
virtual ViewContact& GetPaintObjectViewContact(sal_uInt32 nIndex) const = 0;
public:
public:
// basic constructor/destructor
ObjectContactPainter();
virtual ~ObjectContactPainter();
};
} // end of namespace contact
} // end of namespace sdr
};
// typedef for transferring SdrObject
typedef ::std::vector< SdrObject* > SdrObjectVector;
namespace sdr
class SVX_DLLPUBLIC ObjectContactOfObjListPainter : public ObjectContactPainter
{
namespace contact
{
// typedef for transferring SdrObject
typedef ::std::vector< SdrObject* > SdrObjectVector;
class SVX_DLLPUBLIC ObjectContactOfObjListPainter : public ObjectContactPainter
{
protected:
protected:
// Target OutputDevice
OutputDevice& mrTargetOutputDevice;
......@@ -76,7 +61,7 @@ namespace sdr
virtual sal_uInt32 GetPaintObjectCount() const SAL_OVERRIDE;
virtual ViewContact& GetPaintObjectViewContact(sal_uInt32 nIndex) const SAL_OVERRIDE;
public:
public:
// basic constructor/destructor
ObjectContactOfObjListPainter(
OutputDevice& rTargetDevice,
......@@ -98,19 +83,11 @@ namespace sdr
// access to OutputDevice. May return 0L like the default implementations do. Needs to be overloaded as needed.
virtual OutputDevice* TryToGetOutputDevice() const SAL_OVERRIDE;
};
} // end of namespace contact
} // end of namespace sdr
};
namespace sdr
class ObjectContactOfPagePainter : public ObjectContactPainter
{
namespace contact
{
class ObjectContactOfPagePainter : public ObjectContactPainter
{
protected:
protected:
// the original ObjectContact this painter is working on
ObjectContact& mrOriginalObjectContact;
......@@ -121,7 +98,7 @@ namespace sdr
virtual sal_uInt32 GetPaintObjectCount() const SAL_OVERRIDE;
virtual ViewContact& GetPaintObjectViewContact(sal_uInt32 nIndex) const SAL_OVERRIDE;
public:
public:
// basic constructor
ObjectContactOfPagePainter(
const SdrPage* pPage,
......@@ -134,9 +111,9 @@ namespace sdr
// access to OutputDevice. May return 0L like the default implementations do. Needs to be overloaded as needed.
virtual OutputDevice* TryToGetOutputDevice() const SAL_OVERRIDE;
};
} // end of namespace contact
} // end of namespace sdr
};
}}
......
......@@ -24,13 +24,6 @@
#include <svx/sdr/contact/viewcontactofsdrobj.hxx>
#include <drawinglayer/primitive3d/baseprimitive3d.hxx>
// predeclarations
namespace sdr { namespace contact {
class ViewContactOfE3dScene;
}}
namespace drawinglayer { namespace attribute {
class SdrLineAttribute;
}}
......@@ -40,20 +33,18 @@ namespace basegfx {
class B3DHomMatrix;
}
namespace sdr { namespace contact {
class ViewContactOfE3dScene;
namespace sdr
class ViewContactOfE3d : public ViewContactOfSdrObj
{
namespace contact
{
class ViewContactOfE3d : public ViewContactOfSdrObj
{
protected:
protected:
// Create a Object-Specific ViewObjectContact, set ViewContact and
// ObjectContact. Always needs to return something.
virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
public:
public:
// basic constructor, used from E3dObject.
explicit ViewContactOfE3d(E3dObject& rObj);
virtual ~ViewContactOfE3d();
......@@ -71,7 +62,7 @@ namespace sdr
// primitive stuff
protected:
protected:
// Primitive3DSequence of the ViewContact. This contains all necessary information
// for the graphical visualisation and needs to be supported by all 3D VCs which
// can be visualized. It does NOT contain the object transformation to be able to
......@@ -87,7 +78,7 @@ namespace sdr
// when scene is known) which can then be used for 2D processing concerning ranges
virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
public:
public:
// access to the local primitive without the object's local 3D transform. This is e.g. needed
// to get the not-yet transformed BoundVolume for e.g. interactions
drawinglayer::primitive3d::Primitive3DSequence getVIP3DSWithoutObjectTransform() const;
......@@ -97,9 +88,9 @@ namespace sdr
// use getVIP3DSWithoutObjectTransform and embed to 3d transform primitive when object's
// local 3d transform is used
drawinglayer::primitive3d::Primitive3DSequence getViewIndependentPrimitive3DSequence() const;
};
} // end of namespace contact
} // end of namespace sdr
};
}}
......
......@@ -28,28 +28,21 @@
#include <drawinglayer/geometry/viewinformation3d.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
// predeclarations
namespace basegfx {
class B3DRange;
}
namespace sdr { namespace contact {
namespace sdr
class SVX_DLLPUBLIC ViewContactOfE3dScene : public ViewContactOfSdrObj
{
namespace contact
{
class SVX_DLLPUBLIC ViewContactOfE3dScene : public ViewContactOfSdrObj
{
protected:
protected:
// Create a Object-Specific ViewObjectContact, set ViewContact and
// ObjectContact. Always needs to return something. Default is to create
// a standard ViewObjectContact containing the given ObjectContact and *this
virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
public:
public:
// basic constructor, used from SdrObject.
explicit ViewContactOfE3dScene(E3dScene& rScene);
......@@ -80,7 +73,7 @@ namespace sdr
drawinglayer::primitive3d::Primitive3DSequence getAllPrimitive3DSequence() const;
basegfx::B3DRange getAllContentRange3D() const;
protected:
protected:
// the 3d transformation stack
drawinglayer::geometry::ViewInformation3D maViewInformation3D;
......@@ -102,11 +95,9 @@ namespace sdr
// This method is responsible for creating the graphical visualisation data
// ONLY based on model data
virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
};
} // end of namespace contact
} // end of namespace sdr
};
}}
#endif // INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFE3DSCENE_HXX
......
......@@ -24,27 +24,20 @@
#include <svx/svxdllapi.h>
#include <svx/svdopage.hxx>
// predeclarations
class SdrPage;
namespace sdr { namespace contact {
namespace sdr
class SVX_DLLPUBLIC ViewContactOfPageObj : public ViewContactOfSdrObj
{
namespace contact
{
class SVX_DLLPUBLIC ViewContactOfPageObj : public ViewContactOfSdrObj
{
protected:
protected:
// Create a Object-Specific ViewObjectContact, set ViewContact and
// ObjectContact. Always needs to return something.
virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
// create graphical visualisation data
virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
public:
public:
// basic constructor, used from SdrObject.
explicit ViewContactOfPageObj(SdrPageObj& rPageObj);
virtual ~ViewContactOfPageObj();
......@@ -57,9 +50,9 @@ namespace sdr
{
return static_cast<const SdrPageObj&>(GetSdrObject());
}
};
} // end of namespace contact
} // end of namespace sdr
};
}}
......
......@@ -25,28 +25,21 @@
#include <svx/svdomedia.hxx>
#include <tools/gen.hxx>
// predeclarations
namespace avmedia { class MediaItem; }
namespace sdr { namespace contact {
namespace sdr
class SVX_DLLPUBLIC ViewContactOfSdrMediaObj : public ViewContactOfSdrObj
{
namespace contact
{
class SVX_DLLPUBLIC ViewContactOfSdrMediaObj : public ViewContactOfSdrObj
{
friend class ViewObjectContactOfSdrMediaObj;
public:
public:
// basic constructor, used from SdrObject.
explicit ViewContactOfSdrMediaObj( SdrMediaObj& rMediaObj );
virtual ~ViewContactOfSdrMediaObj();
public:
public:
// access to SdrMediaObj
const SdrMediaObj& GetSdrMediaObj() const
......@@ -59,7 +52,7 @@ namespace sdr
void updateMediaItem( ::avmedia::MediaItem& rItem ) const;
void executeMediaItem( const ::avmedia::MediaItem& rItem );
protected:
protected:
// Create a Object-Specific ViewObjectContact, set ViewContact and
// ObjectContact. Always needs to return something.
......@@ -68,13 +61,13 @@ namespace sdr
// get notified if some properties have changed
virtual void mediaPropertiesChanged( const ::avmedia::MediaItem& rNewState );
protected:
protected:
// This method is responsible for creating the graphical visualisation data
// ONLY based on model data
virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
};
} // end of namespace contact
} // end of namespace sdr
};
}}
......
......@@ -23,34 +23,29 @@
#include <svx/sdr/contact/viewcontactoftextobj.hxx>
#include <svx/svdorect.hxx>
namespace sdr { namespace contact {
namespace sdr
class ViewContactOfSdrRectObj : public ViewContactOfTextObj
{
namespace contact
{
class ViewContactOfSdrRectObj : public ViewContactOfTextObj
{
protected:
protected:
// internal access to SdrRectObj
const SdrRectObj& GetRectObj() const
{
return static_cast<const SdrRectObj&>(GetSdrObject());
}
public:
public:
// basic constructor, used from SdrObject.
explicit ViewContactOfSdrRectObj(SdrRectObj& rTextObj);
virtual ~ViewContactOfSdrRectObj();
protected:
protected:
// This method is responsible for creating the graphical visualisation data
// ONLY based on model data
virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
};
} // end of namespace contact
} // end of namespace sdr
};
}}
#endif // INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFSDRRECTOBJ_HXX
......
......@@ -21,31 +21,24 @@
#define INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFTEXTOBJ_HXX
#include <svx/sdr/contact/viewcontactofsdrobj.hxx>
#include <svx/svdotext.hxx>
class SdrTextObj;
namespace sdr
namespace sdr { namespace contact {
class ViewContactOfTextObj : public ViewContactOfSdrObj
{
namespace contact
{
class ViewContactOfTextObj : public ViewContactOfSdrObj
{
protected:
protected:
// internal access to SdrTextObj
const SdrTextObj& GetTextObj() const
{
return static_cast<const SdrTextObj&>(GetSdrObject());
}
const SdrTextObj& GetTextObj() const;
public:
public:
// basic constructor, used from SdrObject.
explicit ViewContactOfTextObj(SdrTextObj& rTextObj);
virtual ~ViewContactOfTextObj();
};
} // end of namespace contact
} // end of namespace sdr
};
}}
#endif // INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFTEXTOBJ_HXX
......
......@@ -22,24 +22,18 @@
#include <svx/sdr/contact/viewcontactofsdrobj.hxx>
// predeclarations
class SdrVirtObj;
namespace sdr { namespace contact {
namespace sdr
class SVX_DLLPUBLIC ViewContactOfVirtObj : public ViewContactOfSdrObj
{
namespace contact
{
class SVX_DLLPUBLIC ViewContactOfVirtObj : public ViewContactOfSdrObj
{
protected:
protected:
// internal access to SdrObject. Iplementation in *.cxx to avoid
// including SdrVirtObj here.
SdrVirtObj& GetVirtObj() const;
public:
public:
// basic constructor, used from SdrObject.
explicit ViewContactOfVirtObj(SdrVirtObj& rObj);
virtual ~ViewContactOfVirtObj();
......@@ -47,15 +41,13 @@ namespace sdr
// Access to possible sub-hierarchy
virtual sal_uInt32 GetObjectCount() const SAL_OVERRIDE;
protected:
protected:
// This method is responsible for creating the graphical visualisation data
// ONLY based on model data
virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
};
} // end of namespace contact
} // end of namespace sdr
};
}}
#endif // INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFVIRTOBJ_HXX
......
......@@ -22,39 +22,30 @@
#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx>
// predeclarations
namespace sdr { namespace contact {
class PagePrimitiveExtractor;
}}
class SdrPage;
namespace sdr { namespace contact {
class PagePrimitiveExtractor;
namespace sdr
class SVX_DLLPUBLIC ViewObjectContactOfPageObj : public ViewObjectContactOfSdrObj
{
namespace contact
{
class SVX_DLLPUBLIC ViewObjectContactOfPageObj : public ViewObjectContactOfSdrObj
{
private:
private:
// the page painter helper
PagePrimitiveExtractor* mpExtractor;
protected:
protected:
// This method is responsible for creating the graphical visualisation data which is
// stored/cached in the local primitive.
// This method will not handle included hierarchies and not check geometric visibility.
virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const SAL_OVERRIDE;
public:
public:
ViewObjectContactOfPageObj(ObjectContact& rObjectContact, ViewContact& rViewContact);
virtual ~ViewObjectContactOfPageObj();
};
} // end of namespace contact
} // end of namespace sdr
};
}}
......
......@@ -23,27 +23,18 @@
#include <svx/svxdllapi.h>
#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
// predeclarations
namespace sdr { namespace contact {
class DisplayInfo;
class ViewObjectContact;
}}
class DisplayInfo;
class ViewObjectContact;
namespace sdr
// This class provides a mechanism to redirect the paint mechanism for all or
// single ViewObjectContacts. An own derivation may be set at single ViewContacts
// or at the ObjectContact for redirecting all. If both is used, the one at single
// objects will have priority.
class SVX_DLLPUBLIC ViewObjectContactRedirector
{
namespace contact
{
// This class provides a mechanism to redirect the paint mechanism for all or
// single ViewObjectContacts. An own derivation may be set at single ViewContacts
// or at the ObjectContact for redirecting all. If both is used, the one at single
// objects will have priority.
class SVX_DLLPUBLIC ViewObjectContactRedirector
{
public:
public:
// basic constructor.
ViewObjectContactRedirector();
......@@ -55,11 +46,9 @@ namespace sdr
virtual drawinglayer::primitive2d::Primitive2DSequence createRedirectedPrimitive2DSequence(
const sdr::contact::ViewObjectContact& rOriginal,
const sdr::contact::DisplayInfo& rDisplayInfo);
};
} // end of namespace contact
} // end of namespace sdr
};
}}
#endif // INCLUDED_SVX_SDR_CONTACT_VIEWOBJECTCONTACTREDIRECTOR_HXX
......
......@@ -29,58 +29,47 @@
#include <svx/unoapi.hxx>
#include <boost/scoped_ptr.hpp>
namespace sdr { namespace contact {
namespace sdr
ObjectContactPainter::ObjectContactPainter()
{
namespace contact
{
ObjectContactPainter::ObjectContactPainter()
{
}
// The destructor.
ObjectContactPainter::~ObjectContactPainter()
{
}
} // end of namespace contact
} // end of namespace sdr
}
// The destructor.
ObjectContactPainter::~ObjectContactPainter()
{
}
namespace sdr
sal_uInt32 ObjectContactOfObjListPainter::GetPaintObjectCount() const
{
namespace contact
{
sal_uInt32 ObjectContactOfObjListPainter::GetPaintObjectCount() const
{
return maStartObjects.size();
}
}
ViewContact& ObjectContactOfObjListPainter::GetPaintObjectViewContact(sal_uInt32 nIndex) const
{
ViewContact& ObjectContactOfObjListPainter::GetPaintObjectViewContact(sal_uInt32 nIndex) const
{
const SdrObject* pObj = maStartObjects[nIndex];
DBG_ASSERT(pObj, "ObjectContactOfObjListPainter: Corrupt SdrObjectVector (!)");
return pObj->GetViewContact();
}
}
ObjectContactOfObjListPainter::ObjectContactOfObjListPainter(
ObjectContactOfObjListPainter::ObjectContactOfObjListPainter(
OutputDevice& rTargetDevice,
const SdrObjectVector& rObjects,
const SdrPage* pProcessedPage)
: ObjectContactPainter(),
: ObjectContactPainter(),
mrTargetOutputDevice(rTargetDevice),
maStartObjects(rObjects),
mpProcessedPage(pProcessedPage)
{
}
{
}
ObjectContactOfObjListPainter::~ObjectContactOfObjListPainter()
{
}
ObjectContactOfObjListPainter::~ObjectContactOfObjListPainter()
{
}
// Process the whole displaying
void ObjectContactOfObjListPainter::ProcessDisplay(DisplayInfo& rDisplayInfo)
{
// Process the whole displaying
void ObjectContactOfObjListPainter::ProcessDisplay(DisplayInfo& rDisplayInfo)
{
const sal_uInt32 nCount(GetPaintObjectCount());
if(nCount)
......@@ -138,77 +127,69 @@ namespace sdr
}
}
}
}
}
// VirtualDevice?
bool ObjectContactOfObjListPainter::isOutputToVirtualDevice() const
{
// VirtualDevice?
bool ObjectContactOfObjListPainter::isOutputToVirtualDevice() const
{
return (OUTDEV_VIRDEV == mrTargetOutputDevice.GetOutDevType());
}
}
// recording MetaFile?
bool ObjectContactOfObjListPainter::isOutputToRecordingMetaFile() const
{
// recording MetaFile?
bool ObjectContactOfObjListPainter::isOutputToRecordingMetaFile() const
{
GDIMetaFile* pMetaFile = mrTargetOutputDevice.GetConnectMetaFile();
return (pMetaFile && pMetaFile->IsRecord() && !pMetaFile->IsPause());
}
}
// pdf export?
bool ObjectContactOfObjListPainter::isOutputToPDFFile() const
{
// pdf export?
bool ObjectContactOfObjListPainter::isOutputToPDFFile() const
{
return (0 != mrTargetOutputDevice.GetPDFWriter());
}
}
OutputDevice* ObjectContactOfObjListPainter::TryToGetOutputDevice() const
{
OutputDevice* ObjectContactOfObjListPainter::TryToGetOutputDevice() const
{
return &mrTargetOutputDevice;
}
} // end of namespace contact
} // end of namespace sdr
}
namespace sdr
sal_uInt32 ObjectContactOfPagePainter::GetPaintObjectCount() const
{
namespace contact
{
sal_uInt32 ObjectContactOfPagePainter::GetPaintObjectCount() const
{
return (GetStartPage() ? 1L : 0L);
}
}
ViewContact& ObjectContactOfPagePainter::GetPaintObjectViewContact(sal_uInt32 /*nIndex*/) const
{
ViewContact& ObjectContactOfPagePainter::GetPaintObjectViewContact(sal_uInt32 /*nIndex*/) const
{
DBG_ASSERT(GetStartPage(), "ObjectContactOfPagePainter::GetPaintObjectViewContact: no StartPage set (!)");
return GetStartPage()->GetViewContact();
}
}
ObjectContactOfPagePainter::ObjectContactOfPagePainter(
ObjectContactOfPagePainter::ObjectContactOfPagePainter(
const SdrPage* pPage,
ObjectContact& rOriginalObjectContact)
: ObjectContactPainter(),
: ObjectContactPainter(),
mrOriginalObjectContact(rOriginalObjectContact),
mxStartPage(const_cast< SdrPage* >(pPage)) // no SdrPageWeakRef available to hold a const SdrPage*
{
}
{
}
ObjectContactOfPagePainter::~ObjectContactOfPagePainter()
{
}
ObjectContactOfPagePainter::~ObjectContactOfPagePainter()
{
}
void ObjectContactOfPagePainter::SetStartPage(const SdrPage* pPage)
{
void ObjectContactOfPagePainter::SetStartPage(const SdrPage* pPage)
{
if(pPage != GetStartPage())
{
mxStartPage.reset(const_cast< SdrPage* >(pPage)); // no SdrPageWeakRef available to hold a const SdrPage*
}
}
}
OutputDevice* ObjectContactOfPagePainter::TryToGetOutputDevice() const
{
OutputDevice* ObjectContactOfPagePainter::TryToGetOutputDevice() const
{
return mrOriginalObjectContact.TryToGetOutputDevice();
}
} // end of namespace contact
} // end of namespace sdr
}
}}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <svx/sdr/contact/viewcontactofe3d.hxx>
#include <sdr/contact/viewobjectcontactofe3d.hxx>
#include <svx/obj3d.hxx>
......@@ -30,14 +29,12 @@
#include <drawinglayer/attribute/sdrlightattribute3d.hxx>
#include <drawinglayer/attribute/sdrlineattribute.hxx>
namespace {
namespace
{
const sdr::contact::ViewContactOfE3dScene* tryToFindVCOfE3DScene(
const sdr::contact::ViewContactOfE3dScene* tryToFindVCOfE3DScene(
const sdr::contact::ViewContact& rCandidate,
basegfx::B3DHomMatrix& o_rInBetweenObjectTransform)
{
{
const sdr::contact::ViewContactOfE3dScene* pSceneParent =
dynamic_cast< const sdr::contact::ViewContactOfE3dScene* >(rCandidate.GetParentContact());
......@@ -64,18 +61,15 @@ namespace
// object hierarchy structure is incorrect; no result
return 0;
}
} // end of anonymous namespace
}
} // end of anonymous namespace
namespace sdr { namespace contact {
namespace sdr
{
namespace contact
{
drawinglayer::primitive2d::Primitive2DSequence ViewContactOfE3d::impCreateWithGivenPrimitive3DSequence(
drawinglayer::primitive2d::Primitive2DSequence ViewContactOfE3d::impCreateWithGivenPrimitive3DSequence(
const drawinglayer::primitive3d::Primitive3DSequence& rxContent3D) const
{
{
drawinglayer::primitive2d::Primitive2DSequence xRetval;
if(rxContent3D.hasElements())
......@@ -130,19 +124,19 @@ namespace sdr
}
return xRetval;
}
}
ViewContactOfE3d::ViewContactOfE3d(E3dObject& rSdrObject)
: ViewContactOfSdrObj(rSdrObject)
{
}
ViewContactOfE3d::ViewContactOfE3d(E3dObject& rSdrObject)
: ViewContactOfSdrObj(rSdrObject)
{
}
ViewContactOfE3d::~ViewContactOfE3d()
{
}
ViewContactOfE3d::~ViewContactOfE3d()
{
}
drawinglayer::primitive3d::Primitive3DSequence ViewContactOfE3d::getVIP3DSWithoutObjectTransform() const
{
drawinglayer::primitive3d::Primitive3DSequence ViewContactOfE3d::getVIP3DSWithoutObjectTransform() const
{
// local up-to-date checks. Create new list and compare.
drawinglayer::primitive3d::Primitive3DSequence xNew(createViewIndependentPrimitive3DSequence());
......@@ -154,10 +148,10 @@ namespace sdr
// return current Primitive2DSequence
return mxViewIndependentPrimitive3DSequence;
}
}
drawinglayer::primitive3d::Primitive3DSequence ViewContactOfE3d::getViewIndependentPrimitive3DSequence() const
{
drawinglayer::primitive3d::Primitive3DSequence ViewContactOfE3d::getViewIndependentPrimitive3DSequence() const
{
// get sequence without object transform
drawinglayer::primitive3d::Primitive3DSequence xRetval(getVIP3DSWithoutObjectTransform());
......@@ -179,24 +173,24 @@ namespace sdr
// return current Primitive2DSequence
return xRetval;
}
}
drawinglayer::primitive2d::Primitive2DSequence ViewContactOfE3d::createViewIndependentPrimitive2DSequence() const
{
drawinglayer::primitive2d::Primitive2DSequence ViewContactOfE3d::createViewIndependentPrimitive2DSequence() const
{
// also need to create a 2D embedding when the view-independent part is requested,
// see view-dependent part in ViewObjectContactOfE3d::createPrimitive2DSequence
// get 3d primitive vector, isPrimitiveVisible() is done in 3d creator
return impCreateWithGivenPrimitive3DSequence(getViewIndependentPrimitive3DSequence());
}
}
ViewObjectContact& ViewContactOfE3d::CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact)
{
ViewObjectContact& ViewContactOfE3d::CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact)
{
ViewObjectContact* pRetval = new ViewObjectContactOfE3d(rObjectContact, *this);
DBG_ASSERT(pRetval, "ViewContactOfE3d::CreateObjectSpecificViewObjectContact() failed (!)");
return *pRetval;
}
} // end of namespace contact
} // end of namespace sdr
}
}}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -34,22 +34,18 @@
#include <drawinglayer/primitive3d/transformprimitive3d.hxx>
#include <drawinglayer/primitive2d/sdrdecompositiontools2d.hxx>
using namespace com::sun::star;
namespace {
namespace
{
// pActiveVC is only true if ghosted is still activated and maybe needs to be switched off in this path
void createSubPrimitive3DVector(
// pActiveVC is only true if ghosted is still activated and maybe needs to be switched off in this path
void createSubPrimitive3DVector(
const sdr::contact::ViewContact& rCandidate,
drawinglayer::primitive3d::Primitive3DSequence& o_rAllTarget,
drawinglayer::primitive3d::Primitive3DSequence* o_pVisibleTarget,
const SetOfByte* pVisibleLayerSet,
const bool bTestSelectedVisibility)
{
{
const sdr::contact::ViewContactOfE3dScene* pViewContactOfE3dScene = dynamic_cast< const sdr::contact::ViewContactOfE3dScene* >(&rCandidate);
if(pViewContactOfE3dScene)
......@@ -133,36 +129,33 @@ namespace
}
}
}
}
} // end of anonymous namespace
}
}
namespace sdr { namespace contact {
namespace sdr
// Create a Object-Specific ViewObjectContact, set ViewContact and
// ObjectContact. Always needs to return something.
ViewObjectContact& ViewContactOfE3dScene::CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact)
{
namespace contact
{
// Create a Object-Specific ViewObjectContact, set ViewContact and
// ObjectContact. Always needs to return something.
ViewObjectContact& ViewContactOfE3dScene::CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact)
{
ViewObjectContact* pRetval = new ViewObjectContactOfE3dScene(rObjectContact, *this);
DBG_ASSERT(pRetval, "ViewContactOfE3dScene::CreateObjectSpecificViewObjectContact() failed (!)");
return *pRetval;
}
}
ViewContactOfE3dScene::ViewContactOfE3dScene(E3dScene& rScene)
: ViewContactOfSdrObj(rScene),
ViewContactOfE3dScene::ViewContactOfE3dScene(E3dScene& rScene)
: ViewContactOfSdrObj(rScene),
maViewInformation3D(),
maObjectTransformation(),
maSdrSceneAttribute(),
maSdrLightingAttribute()
{
}
{
}
void ViewContactOfE3dScene::createViewInformation3D(const basegfx::B3DRange& rContentRange)
{
void ViewContactOfE3dScene::createViewInformation3D(const basegfx::B3DRange& rContentRange)
{
basegfx::B3DHomMatrix aTransformation;
basegfx::B3DHomMatrix aOrientation;
basegfx::B3DHomMatrix aProjection;
......@@ -247,10 +240,10 @@ namespace sdr
maViewInformation3D = drawinglayer::geometry::ViewInformation3D(
aTransformation, aOrientation, aProjection,
aDeviceToView, 0.0, aEmptyProperties);
}
}
void ViewContactOfE3dScene::createObjectTransformation()
{
void ViewContactOfE3dScene::createObjectTransformation()
{
// create 2d Object Transformation from relative point in 2d scene to world
Rectangle aRectangle = GetE3dScene().GetSnapRect();
// Hack for calc, transform position of object according
......@@ -261,23 +254,23 @@ namespace sdr
maObjectTransformation.set(1, 1, aRectangle.getHeight());
maObjectTransformation.set(0, 2, aRectangle.Left());
maObjectTransformation.set(1, 2, aRectangle.Top());
}
}
void ViewContactOfE3dScene::createSdrSceneAttribute()
{
void ViewContactOfE3dScene::createSdrSceneAttribute()
{
const SfxItemSet& rItemSet = GetE3dScene().GetMergedItemSet();
maSdrSceneAttribute = drawinglayer::primitive2d::createNewSdrSceneAttribute(rItemSet);
}
}
void ViewContactOfE3dScene::createSdrLightingAttribute()
{
void ViewContactOfE3dScene::createSdrLightingAttribute()
{
const SfxItemSet& rItemSet = GetE3dScene().GetMergedItemSet();
maSdrLightingAttribute = drawinglayer::primitive2d::createNewSdrLightingAttribute(rItemSet);
}
}
drawinglayer::primitive2d::Primitive2DSequence ViewContactOfE3dScene::createScenePrimitive2DSequence(
drawinglayer::primitive2d::Primitive2DSequence ViewContactOfE3dScene::createScenePrimitive2DSequence(
const SetOfByte* pLayerVisibility) const
{
{
drawinglayer::primitive2d::Primitive2DSequence xRetval;
const sal_uInt32 nChildrenCount(GetObjectCount());
......@@ -338,10 +331,10 @@ namespace sdr
false, getObjectTransformation()));
return xRetval;
}
}
drawinglayer::primitive2d::Primitive2DSequence ViewContactOfE3dScene::createViewIndependentPrimitive2DSequence() const
{
drawinglayer::primitive2d::Primitive2DSequence ViewContactOfE3dScene::createViewIndependentPrimitive2DSequence() const
{
drawinglayer::primitive2d::Primitive2DSequence xRetval;
if(GetObjectCount())
......@@ -351,10 +344,10 @@ namespace sdr
}
return xRetval;
}
}
void ViewContactOfE3dScene::ActionChanged()
{
void ViewContactOfE3dScene::ActionChanged()
{
// call parent
ViewContactOfSdrObj::ActionChanged();
......@@ -363,10 +356,10 @@ namespace sdr
maObjectTransformation.identity();
maSdrSceneAttribute = drawinglayer::attribute::SdrSceneAttribute();
maSdrLightingAttribute = drawinglayer::attribute::SdrLightingAttribute();
}
}
const drawinglayer::geometry::ViewInformation3D& ViewContactOfE3dScene::getViewInformation3D() const
{
const drawinglayer::geometry::ViewInformation3D& ViewContactOfE3dScene::getViewInformation3D() const
{
if(maViewInformation3D.isDefault())
{
// this version will create the content range on demand locally and thus is less
......@@ -387,50 +380,50 @@ namespace sdr
}
return maViewInformation3D;
}
}
const drawinglayer::geometry::ViewInformation3D& ViewContactOfE3dScene::getViewInformation3D(const basegfx::B3DRange& rContentRange) const
{
const drawinglayer::geometry::ViewInformation3D& ViewContactOfE3dScene::getViewInformation3D(const basegfx::B3DRange& rContentRange) const
{
if(maViewInformation3D.isDefault())
{
const_cast < ViewContactOfE3dScene* >(this)->createViewInformation3D(rContentRange);
}
return maViewInformation3D;
}
}
const basegfx::B2DHomMatrix& ViewContactOfE3dScene::getObjectTransformation() const
{
const basegfx::B2DHomMatrix& ViewContactOfE3dScene::getObjectTransformation() const
{
if(maObjectTransformation.isIdentity())
{
const_cast < ViewContactOfE3dScene* >(this)->createObjectTransformation();
}
return maObjectTransformation;
}
}
const drawinglayer::attribute::SdrSceneAttribute& ViewContactOfE3dScene::getSdrSceneAttribute() const
{
const drawinglayer::attribute::SdrSceneAttribute& ViewContactOfE3dScene::getSdrSceneAttribute() const
{
if(maSdrSceneAttribute.isDefault())
{
const_cast < ViewContactOfE3dScene* >(this)->createSdrSceneAttribute();
}
return maSdrSceneAttribute;
}
}
const drawinglayer::attribute::SdrLightingAttribute& ViewContactOfE3dScene::getSdrLightingAttribute() const
{
const drawinglayer::attribute::SdrLightingAttribute& ViewContactOfE3dScene::getSdrLightingAttribute() const
{
if(maSdrLightingAttribute.isDefault())
{
const_cast < ViewContactOfE3dScene* >(this)->createSdrLightingAttribute();
}
return maSdrLightingAttribute;
}
}
drawinglayer::primitive3d::Primitive3DSequence ViewContactOfE3dScene::getAllPrimitive3DSequence() const
{
drawinglayer::primitive3d::Primitive3DSequence ViewContactOfE3dScene::getAllPrimitive3DSequence() const
{
drawinglayer::primitive3d::Primitive3DSequence aAllPrimitive3DSequence;
const sal_uInt32 nChildrenCount(GetObjectCount());
......@@ -444,10 +437,10 @@ namespace sdr
}
return aAllPrimitive3DSequence;
}
}
basegfx::B3DRange ViewContactOfE3dScene::getAllContentRange3D() const
{
basegfx::B3DRange ViewContactOfE3dScene::getAllContentRange3D() const
{
const drawinglayer::primitive3d::Primitive3DSequence xAllSequence(getAllPrimitive3DSequence());
basegfx::B3DRange aAllContentRange3D;
......@@ -463,8 +456,8 @@ namespace sdr
}
return aAllContentRange3D;
}
} // end of namespace contact
} // end of namespace sdr
}
}}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -29,30 +29,26 @@
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
namespace sdr { namespace contact {
namespace sdr
ViewObjectContact& ViewContactOfPageObj::CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact)
{
namespace contact
{
ViewObjectContact& ViewContactOfPageObj::CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact)
{
ViewObjectContact* pRetval = new ViewObjectContactOfPageObj(rObjectContact, *this);
return *pRetval;
}
}
ViewContactOfPageObj::ViewContactOfPageObj(SdrPageObj& rPageObj)
: ViewContactOfSdrObj(rPageObj)
{
}
ViewContactOfPageObj::ViewContactOfPageObj(SdrPageObj& rPageObj)
: ViewContactOfSdrObj(rPageObj)
{
}
ViewContactOfPageObj::~ViewContactOfPageObj()
{
}
ViewContactOfPageObj::~ViewContactOfPageObj()
{
}
// #i35972# React on changes of the object of this ViewContact
void ViewContactOfPageObj::ActionChanged()
{
// #i35972# React on changes of the object of this ViewContact
void ViewContactOfPageObj::ActionChanged()
{
static bool bIsInActionChange(false);
if(!bIsInActionChange)
......@@ -66,10 +62,10 @@ namespace sdr
// reset recursion flag, see description in *.hxx
bIsInActionChange = false;
}
}
}
drawinglayer::primitive2d::Primitive2DSequence ViewContactOfPageObj::createViewIndependentPrimitive2DSequence() const
{
drawinglayer::primitive2d::Primitive2DSequence ViewContactOfPageObj::createViewIndependentPrimitive2DSequence() const
{
// ceate graphical visualisation data. Since this is the view-independent version which should not be used,
// create a replacement graphic visualisation here. Use GetLastBoundRect to access the model data directly
// which is aOutRect for SdrPageObj.
......@@ -80,9 +76,8 @@ namespace sdr
const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aOutline, aYellow));
return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
}
}
} // end of namespace contact
} // end of namespace sdr
}}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -26,30 +26,20 @@
namespace sdr { namespace contact {
// - ViewContactOfSdrMediaObj -
ViewContactOfSdrMediaObj::ViewContactOfSdrMediaObj( SdrMediaObj& rMediaObj ) :
ViewContactOfSdrObj( rMediaObj )
{
}
ViewContactOfSdrMediaObj::~ViewContactOfSdrMediaObj()
{
}
ViewObjectContact& ViewContactOfSdrMediaObj::CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact)
{
return *( new ViewObjectContactOfSdrMediaObj( rObjectContact, *this, static_cast< SdrMediaObj& >( GetSdrObject() ).getMediaProperties() ) );
}
Size ViewContactOfSdrMediaObj::getPreferredSize() const
{
// #i71805# Since we may have a whole bunch of VOCs here, make a loop
......@@ -70,8 +60,6 @@ Size ViewContactOfSdrMediaObj::getPreferredSize() const
return Size();
}
void ViewContactOfSdrMediaObj::updateMediaItem( ::avmedia::MediaItem& rItem ) const
{
// #i71805# Since we may have a whole bunch of VOCs here, make a loop
......@@ -88,8 +76,6 @@ void ViewContactOfSdrMediaObj::updateMediaItem( ::avmedia::MediaItem& rItem ) co
}
}
void ViewContactOfSdrMediaObj::executeMediaItem( const ::avmedia::MediaItem& rItem )
{
const sal_uInt32 nCount(getViewObjectContactCount());
......@@ -105,21 +91,13 @@ void ViewContactOfSdrMediaObj::executeMediaItem( const ::avmedia::MediaItem& rIt
}
}
void ViewContactOfSdrMediaObj::mediaPropertiesChanged( const ::avmedia::MediaItem& rNewState )
{
static_cast< SdrMediaObj& >(GetSdrObject()).mediaPropertiesChanged(rNewState);
}
}} // end of namespace sdr::contact
namespace sdr
drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrMediaObj::createViewIndependentPrimitive2DSequence() const
{
namespace contact
{
drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrMediaObj::createViewIndependentPrimitive2DSequence() const
{
// create range using the model data directly. This is in SdrTextObj::aRect which i will access using
// GetGeoRect() to not trigger any calculations. It's the unrotated geometry which is okay for MediaObjects ATM.
Rectangle aRectangle(GetSdrMediaObj().GetGeoRect());
......@@ -150,8 +128,8 @@ namespace sdr
GetSdrMediaObj().getSnapshot()));
return drawinglayer::primitive2d::Primitive2DSequence(&xRetval, 1);
}
} // end of namespace contact
} // end of namespace sdr
}
}}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <svx/sdr/contact/viewcontactofsdrrectobj.hxx>
#include <svx/svdorect.hxx>
#include <svx/sdr/primitive2d/sdrattributecreator.hxx>
......@@ -27,23 +26,19 @@
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <svx/svdmodel.hxx>
namespace sdr { namespace contact {
namespace sdr
ViewContactOfSdrRectObj::ViewContactOfSdrRectObj(SdrRectObj& rRectObj)
: ViewContactOfTextObj(rRectObj)
{
namespace contact
{
ViewContactOfSdrRectObj::ViewContactOfSdrRectObj(SdrRectObj& rRectObj)
: ViewContactOfTextObj(rRectObj)
{
}
}
ViewContactOfSdrRectObj::~ViewContactOfSdrRectObj()
{
}
ViewContactOfSdrRectObj::~ViewContactOfSdrRectObj()
{
}
drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrRectObj::createViewIndependentPrimitive2DSequence() const
{
drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrRectObj::createViewIndependentPrimitive2DSequence() const
{
const SfxItemSet& rItemSet = GetRectObj().GetMergedItemSet();
const drawinglayer::attribute::SdrLineFillShadowTextAttribute aAttribute(
drawinglayer::primitive2d::createNewSdrLineFillShadowTextAttribute(
......@@ -92,8 +87,8 @@ namespace sdr
GetRectObj().IsTextFrame() && !bPickThroughTransparentTextFrames));
return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
}
} // end of namespace contact
} // end of namespace sdr
}
}}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -20,21 +20,22 @@
#include <svx/sdr/contact/viewcontactoftextobj.hxx>
#include <svx/svdotext.hxx>
namespace sdr { namespace contact {
const SdrTextObj& ViewContactOfTextObj::GetTextObj() const
{
return static_cast<const SdrTextObj&>(GetSdrObject());
}
ViewContactOfTextObj::ViewContactOfTextObj(SdrTextObj& rTextObj)
: ViewContactOfSdrObj(rTextObj)
{
}
namespace sdr
ViewContactOfTextObj::~ViewContactOfTextObj()
{
namespace contact
{
ViewContactOfTextObj::ViewContactOfTextObj(SdrTextObj& rTextObj)
: ViewContactOfSdrObj(rTextObj)
{
}
}
ViewContactOfTextObj::~ViewContactOfTextObj()
{
}
} // end of namespace contact
} // end of namespace sdr
}}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -25,29 +25,25 @@
#include <vcl/outdev.hxx>
#include <drawinglayer/primitive2d/sdrdecompositiontools2d.hxx>
namespace sdr { namespace contact {
namespace sdr
ViewContactOfVirtObj::ViewContactOfVirtObj(SdrVirtObj& rObj)
: ViewContactOfSdrObj(rObj)
{
namespace contact
{
ViewContactOfVirtObj::ViewContactOfVirtObj(SdrVirtObj& rObj)
: ViewContactOfSdrObj(rObj)
{
}
}
ViewContactOfVirtObj::~ViewContactOfVirtObj()
{
}
ViewContactOfVirtObj::~ViewContactOfVirtObj()
{
}
SdrVirtObj& ViewContactOfVirtObj::GetVirtObj() const
{
SdrVirtObj& ViewContactOfVirtObj::GetVirtObj() const
{
return static_cast<SdrVirtObj&>(mrObject);
}
}
// Access to possible sub-hierarchy
sal_uInt32 ViewContactOfVirtObj::GetObjectCount() const
{
// Access to possible sub-hierarchy
sal_uInt32 ViewContactOfVirtObj::GetObjectCount() const
{
// Here, SdrVirtObj's need to return 0L to show that they have no
// sub-hierarchy, even when they are group objects. This is necessary
// to avoid that the same VOCs will be added to the draw hierarchy
......@@ -61,10 +57,10 @@ namespace sdr
// As can be seen, with primitives, the problem will be solved using
// a transformPrimitive, so this solution can stay with primitives.
return 0L;
}
}
drawinglayer::primitive2d::Primitive2DSequence ViewContactOfVirtObj::createViewIndependentPrimitive2DSequence() const
{
drawinglayer::primitive2d::Primitive2DSequence ViewContactOfVirtObj::createViewIndependentPrimitive2DSequence() const
{
// create displacement transformation if we have content
basegfx::B2DHomMatrix aObjectMatrix;
Point aAnchor(GetVirtObj().GetAnchorPos());
......@@ -98,8 +94,9 @@ namespace sdr
return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
}
}
} // end of namespace contact
} // end of namespace sdr
}
}}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -17,13 +17,11 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <svtools/colorcfg.hxx>
#include <svx/sdr/contact/viewobjectcontactofpageobj.hxx>
#include <svx/sdr/contact/viewcontactofpageobj.hxx>
#include <svx/svdopage.hxx>
#include <svx/sdr/contact/displayinfo.hxx>
#include <svtools/colorcfg.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
......@@ -34,23 +32,17 @@
#include <drawinglayer/primitive2d/pagepreviewprimitive2d.hxx>
#include <drawinglayer/primitive2d/sdrdecompositiontools2d.hxx>
using namespace com::sun::star;
namespace sdr { namespace contact {
namespace sdr
class PagePrimitiveExtractor : public ObjectContactOfPagePainter, public Timer
{
namespace contact
{
class PagePrimitiveExtractor : public ObjectContactOfPagePainter, public Timer
{
private:
private:
// the ViewObjectContactOfPageObj using this painter
ViewObjectContactOfPageObj& mrViewObjectContactOfPageObj;
public:
public:
// basic constructor/destructor
explicit PagePrimitiveExtractor(ViewObjectContactOfPageObj& rVOC);
virtual ~PagePrimitiveExtractor();
......@@ -80,37 +72,37 @@ namespace sdr
virtual bool isDrawModeHighContrast() const SAL_OVERRIDE;
virtual SdrPageView* TryToGetSdrPageView() const SAL_OVERRIDE;
virtual OutputDevice* TryToGetOutputDevice() const SAL_OVERRIDE;
};
};
PagePrimitiveExtractor::PagePrimitiveExtractor(
PagePrimitiveExtractor::PagePrimitiveExtractor(
ViewObjectContactOfPageObj& rVOC)
: ObjectContactOfPagePainter(0, rVOC.GetObjectContact()),
: ObjectContactOfPagePainter(0, rVOC.GetObjectContact()),
mrViewObjectContactOfPageObj(rVOC)
{
{
// make this renderer a preview renderer
setPreviewRenderer(true);
// init timer
SetTimeout(1);
Stop();
}
}
PagePrimitiveExtractor::~PagePrimitiveExtractor()
{
PagePrimitiveExtractor::~PagePrimitiveExtractor()
{
// execute missing LazyInvalidates and stop timer
Timeout();
}
}
void PagePrimitiveExtractor::setLazyInvalidate(ViewObjectContact& /*rVOC*/)
{
void PagePrimitiveExtractor::setLazyInvalidate(ViewObjectContact& /*rVOC*/)
{
// do NOT call parent, but remember that something is to do by
// starting the LazyInvalidateTimer
Start();
}
}
// From baseclass Timer, the timeout call triggered by the LazyInvalidate mechanism
void PagePrimitiveExtractor::Timeout()
{
// From baseclass Timer, the timeout call triggered by the LazyInvalidate mechanism
void PagePrimitiveExtractor::Timeout()
{
// stop the timer
Stop();
......@@ -122,10 +114,10 @@ namespace sdr
ViewObjectContact* pCandidate = getViewObjectContact(a);
pCandidate->triggerLazyInvalidate();
}
}
}
drawinglayer::primitive2d::Primitive2DSequence PagePrimitiveExtractor::createPrimitive2DSequenceForPage(const DisplayInfo& /*rDisplayInfo*/)
{
drawinglayer::primitive2d::Primitive2DSequence PagePrimitiveExtractor::createPrimitive2DSequenceForPage(const DisplayInfo& /*rDisplayInfo*/)
{
drawinglayer::primitive2d::Primitive2DSequence xRetval;
const SdrPage* pStartPage = GetStartPage();
......@@ -161,10 +153,10 @@ namespace sdr
}
return xRetval;
}
}
void PagePrimitiveExtractor::InvalidatePartOfView(const basegfx::B2DRange& rRange) const
{
void PagePrimitiveExtractor::InvalidatePartOfView(const basegfx::B2DRange& rRange) const
{
// an invalidate is called at this view, this needs to be translated to an invalidate
// for the using VOC. Coordinates are in page coordinate system.
const SdrPage* pStartPage = GetStartPage();
......@@ -180,30 +172,22 @@ namespace sdr
mrViewObjectContactOfPageObj.ActionChanged();
}
}
}
// forward access to SdrPageView to VOCOfPageObj
bool PagePrimitiveExtractor::isOutputToPrinter() const { return mrViewObjectContactOfPageObj.GetObjectContact().isOutputToPrinter(); }
bool PagePrimitiveExtractor::isOutputToWindow() const { return mrViewObjectContactOfPageObj.GetObjectContact().isOutputToWindow(); }
bool PagePrimitiveExtractor::isOutputToVirtualDevice() const { return mrViewObjectContactOfPageObj.GetObjectContact().isOutputToVirtualDevice(); }
bool PagePrimitiveExtractor::isOutputToRecordingMetaFile() const { return mrViewObjectContactOfPageObj.GetObjectContact().isOutputToRecordingMetaFile(); }
bool PagePrimitiveExtractor::isOutputToPDFFile() const { return mrViewObjectContactOfPageObj.GetObjectContact().isOutputToPDFFile(); }
bool PagePrimitiveExtractor::isDrawModeGray() const { return mrViewObjectContactOfPageObj.GetObjectContact().isDrawModeGray(); }
bool PagePrimitiveExtractor::isDrawModeBlackWhite() const { return mrViewObjectContactOfPageObj.GetObjectContact().isDrawModeBlackWhite(); }
bool PagePrimitiveExtractor::isDrawModeHighContrast() const { return mrViewObjectContactOfPageObj.GetObjectContact().isDrawModeHighContrast(); }
SdrPageView* PagePrimitiveExtractor::TryToGetSdrPageView() const { return mrViewObjectContactOfPageObj.GetObjectContact().TryToGetSdrPageView(); }
OutputDevice* PagePrimitiveExtractor::TryToGetOutputDevice() const { return mrViewObjectContactOfPageObj.GetObjectContact().TryToGetOutputDevice(); }
} // end of namespace contact
} // end of namespace sdr
namespace sdr
}
// forward access to SdrPageView to VOCOfPageObj
bool PagePrimitiveExtractor::isOutputToPrinter() const { return mrViewObjectContactOfPageObj.GetObjectContact().isOutputToPrinter(); }
bool PagePrimitiveExtractor::isOutputToWindow() const { return mrViewObjectContactOfPageObj.GetObjectContact().isOutputToWindow(); }
bool PagePrimitiveExtractor::isOutputToVirtualDevice() const { return mrViewObjectContactOfPageObj.GetObjectContact().isOutputToVirtualDevice(); }
bool PagePrimitiveExtractor::isOutputToRecordingMetaFile() const { return mrViewObjectContactOfPageObj.GetObjectContact().isOutputToRecordingMetaFile(); }
bool PagePrimitiveExtractor::isOutputToPDFFile() const { return mrViewObjectContactOfPageObj.GetObjectContact().isOutputToPDFFile(); }
bool PagePrimitiveExtractor::isDrawModeGray() const { return mrViewObjectContactOfPageObj.GetObjectContact().isDrawModeGray(); }
bool PagePrimitiveExtractor::isDrawModeBlackWhite() const { return mrViewObjectContactOfPageObj.GetObjectContact().isDrawModeBlackWhite(); }
bool PagePrimitiveExtractor::isDrawModeHighContrast() const { return mrViewObjectContactOfPageObj.GetObjectContact().isDrawModeHighContrast(); }
SdrPageView* PagePrimitiveExtractor::TryToGetSdrPageView() const { return mrViewObjectContactOfPageObj.GetObjectContact().TryToGetSdrPageView(); }
OutputDevice* PagePrimitiveExtractor::TryToGetOutputDevice() const { return mrViewObjectContactOfPageObj.GetObjectContact().TryToGetOutputDevice(); }
drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfPageObj::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const
{
namespace contact
{
drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfPageObj::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const
{
drawinglayer::primitive2d::Primitive2DSequence xRetval;
const SdrPageObj& rPageObject((static_cast< ViewContactOfPageObj& >(GetViewContact())).GetPageObj());
const SdrPage* pPage = rPageObject.GetReferencedPage();
......@@ -313,16 +297,16 @@ namespace sdr
}
return xRetval;
}
}
ViewObjectContactOfPageObj::ViewObjectContactOfPageObj(ObjectContact& rObjectContact, ViewContact& rViewContact)
: ViewObjectContactOfSdrObj(rObjectContact, rViewContact),
ViewObjectContactOfPageObj::ViewObjectContactOfPageObj(ObjectContact& rObjectContact, ViewContact& rViewContact)
: ViewObjectContactOfSdrObj(rObjectContact, rViewContact),
mpExtractor(new PagePrimitiveExtractor(*this))
{
}
{
}
ViewObjectContactOfPageObj::~ViewObjectContactOfPageObj()
{
ViewObjectContactOfPageObj::~ViewObjectContactOfPageObj()
{
// delete the helper OC
if(mpExtractor)
{
......@@ -336,8 +320,8 @@ namespace sdr
pCandidate->SetStartPage(0);
delete pCandidate;
}
}
} // end of namespace contact
} // end of namespace sdr
}
}}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -21,29 +21,25 @@
#include <svx/sdr/contact/viewobjectcontact.hxx>
#include <svx/sdr/contact/viewcontact.hxx>
namespace sdr { namespace contact {
namespace sdr
// basic constructor.
ViewObjectContactRedirector::ViewObjectContactRedirector()
{
namespace contact
{
// basic constructor.
ViewObjectContactRedirector::ViewObjectContactRedirector()
{
}
}
// The destructor.
ViewObjectContactRedirector::~ViewObjectContactRedirector()
{
}
// The destructor.
ViewObjectContactRedirector::~ViewObjectContactRedirector()
{
}
drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactRedirector::createRedirectedPrimitive2DSequence(
drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactRedirector::createRedirectedPrimitive2DSequence(
const sdr::contact::ViewObjectContact& rOriginal,
const sdr::contact::DisplayInfo& rDisplayInfo)
{
{
return rOriginal.createPrimitive2DSequence(rDisplayInfo);
}
} // end of namespace contact
} // end of namespace sdr
}
}}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment