Unindent.
Change-Id: I875bdf1eb6df37b07dd19c6a7ff5ba5eb3b8a096
This commit is contained in:
@@ -41,20 +41,20 @@
|
||||
|
||||
using namespace com::sun::star;
|
||||
|
||||
namespace
|
||||
{
|
||||
// animated extractor
|
||||
namespace {
|
||||
|
||||
// Necessary to filter a sequence of animated primitives from
|
||||
// a sequence of primitives to find out if animated or not. The decision for
|
||||
// what to decompose is hard-coded and only done for knowingly animated primitives
|
||||
// to not decompose too deeply and unnecessarily. This implies that the list
|
||||
// which is view-specific needs to be expanded by hand when new animated objects
|
||||
// are added. This may eventually be changed to a dynamically configurable approach
|
||||
// if necessary.
|
||||
class AnimatedExtractingProcessor2D : public drawinglayer::processor2d::BaseProcessor2D
|
||||
{
|
||||
protected:
|
||||
// animated extractor
|
||||
|
||||
// Necessary to filter a sequence of animated primitives from
|
||||
// a sequence of primitives to find out if animated or not. The decision for
|
||||
// what to decompose is hard-coded and only done for knowingly animated primitives
|
||||
// to not decompose too deeply and unnecessarily. This implies that the list
|
||||
// which is view-specific needs to be expanded by hand when new animated objects
|
||||
// are added. This may eventually be changed to a dynamically configurable approach
|
||||
// if necessary.
|
||||
class AnimatedExtractingProcessor2D : public drawinglayer::processor2d::BaseProcessor2D
|
||||
{
|
||||
protected:
|
||||
// the found animated primitives
|
||||
drawinglayer::primitive2d::Primitive2DSequence maPrimitive2DSequence;
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace
|
||||
// virtual render method when the primitive implementation is BasePrimitive2D-based.
|
||||
virtual void processBasePrimitive2D(const drawinglayer::primitive2d::BasePrimitive2D& rCandidate) SAL_OVERRIDE;
|
||||
|
||||
public:
|
||||
public:
|
||||
AnimatedExtractingProcessor2D(
|
||||
const drawinglayer::geometry::ViewInformation2D& rViewInformation,
|
||||
bool bTextAnimationAllowed,
|
||||
@@ -80,25 +80,25 @@ namespace
|
||||
const drawinglayer::primitive2d::Primitive2DSequence& getPrimitive2DSequence() const { return maPrimitive2DSequence; }
|
||||
bool isTextAnimationAllowed() const { return mbTextAnimationAllowed; }
|
||||
bool isGraphicAnimationAllowed() const { return mbGraphicAnimationAllowed; }
|
||||
};
|
||||
};
|
||||
|
||||
AnimatedExtractingProcessor2D::AnimatedExtractingProcessor2D(
|
||||
AnimatedExtractingProcessor2D::AnimatedExtractingProcessor2D(
|
||||
const drawinglayer::geometry::ViewInformation2D& rViewInformation,
|
||||
bool bTextAnimationAllowed,
|
||||
bool bGraphicAnimationAllowed)
|
||||
: drawinglayer::processor2d::BaseProcessor2D(rViewInformation),
|
||||
: drawinglayer::processor2d::BaseProcessor2D(rViewInformation),
|
||||
maPrimitive2DSequence(),
|
||||
mbTextAnimationAllowed(bTextAnimationAllowed),
|
||||
mbGraphicAnimationAllowed(bGraphicAnimationAllowed)
|
||||
{
|
||||
}
|
||||
{
|
||||
}
|
||||
|
||||
AnimatedExtractingProcessor2D::~AnimatedExtractingProcessor2D()
|
||||
{
|
||||
}
|
||||
AnimatedExtractingProcessor2D::~AnimatedExtractingProcessor2D()
|
||||
{
|
||||
}
|
||||
|
||||
void AnimatedExtractingProcessor2D::processBasePrimitive2D(const drawinglayer::primitive2d::BasePrimitive2D& rCandidate)
|
||||
{
|
||||
void AnimatedExtractingProcessor2D::processBasePrimitive2D(const drawinglayer::primitive2d::BasePrimitive2D& rCandidate)
|
||||
{
|
||||
// known implementation, access directly
|
||||
switch(rCandidate.getPrimitive2DID())
|
||||
{
|
||||
@@ -154,32 +154,29 @@ namespace
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // end of anonymous namespace
|
||||
|
||||
namespace sdr { namespace contact {
|
||||
|
||||
|
||||
namespace sdr
|
||||
{
|
||||
namespace contact
|
||||
{
|
||||
ViewObjectContact::ViewObjectContact(ObjectContact& rObjectContact, ViewContact& rViewContact)
|
||||
: mrObjectContact(rObjectContact),
|
||||
ViewObjectContact::ViewObjectContact(ObjectContact& rObjectContact, ViewContact& rViewContact)
|
||||
: mrObjectContact(rObjectContact),
|
||||
mrViewContact(rViewContact),
|
||||
maObjectRange(),
|
||||
mxPrimitive2DSequence(),
|
||||
mpPrimitiveAnimation(0),
|
||||
mbLazyInvalidate(false)
|
||||
{
|
||||
{
|
||||
// make the ViewContact remember me
|
||||
mrViewContact.AddViewObjectContact(*this);
|
||||
|
||||
// make the ObjectContact remember me
|
||||
mrObjectContact.AddViewObjectContact(*this);
|
||||
}
|
||||
}
|
||||
|
||||
ViewObjectContact::~ViewObjectContact()
|
||||
{
|
||||
ViewObjectContact::~ViewObjectContact()
|
||||
{
|
||||
// invalidate in view
|
||||
if(!maObjectRange.isEmpty())
|
||||
{
|
||||
@@ -203,10 +200,10 @@ namespace sdr
|
||||
|
||||
// take care of remembered ViewContact
|
||||
GetViewContact().RemoveViewObjectContact(*this);
|
||||
}
|
||||
}
|
||||
|
||||
const basegfx::B2DRange& ViewObjectContact::getObjectRange() const
|
||||
{
|
||||
const basegfx::B2DRange& ViewObjectContact::getObjectRange() const
|
||||
{
|
||||
if(maObjectRange.isEmpty())
|
||||
{
|
||||
// if range is not computed (new or LazyInvalidate objects), force it
|
||||
@@ -222,10 +219,10 @@ namespace sdr
|
||||
}
|
||||
|
||||
return maObjectRange;
|
||||
}
|
||||
}
|
||||
|
||||
void ViewObjectContact::ActionChanged()
|
||||
{
|
||||
void ViewObjectContact::ActionChanged()
|
||||
{
|
||||
if(!mbLazyInvalidate)
|
||||
{
|
||||
// set local flag
|
||||
@@ -246,10 +243,10 @@ namespace sdr
|
||||
// register at OC for lazy invalidate
|
||||
GetObjectContact().setLazyInvalidate(*this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ViewObjectContact::triggerLazyInvalidate()
|
||||
{
|
||||
void ViewObjectContact::triggerLazyInvalidate()
|
||||
{
|
||||
if(mbLazyInvalidate)
|
||||
{
|
||||
// reset flag
|
||||
@@ -272,11 +269,11 @@ namespace sdr
|
||||
GetObjectContact().InvalidatePartOfView(maObjectRange);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Take some action when new objects are inserted
|
||||
void ViewObjectContact::ActionChildInserted(ViewContact& rChild)
|
||||
{
|
||||
// Take some action when new objects are inserted
|
||||
void ViewObjectContact::ActionChildInserted(ViewContact& rChild)
|
||||
{
|
||||
// force creation of the new VOC and trigger it's refresh, so it
|
||||
// will take part in LazyInvalidate immediately
|
||||
rChild.GetViewObjectContact(GetObjectContact()).ActionChanged();
|
||||
@@ -284,10 +281,10 @@ namespace sdr
|
||||
// forward action to ObjectContact
|
||||
// const ViewObjectContact& rChildVOC = rChild.GetViewObjectContact(GetObjectContact());
|
||||
// GetObjectContact().InvalidatePartOfView(rChildVOC.getObjectRange());
|
||||
}
|
||||
}
|
||||
|
||||
void ViewObjectContact::checkForPrimitive2DAnimations()
|
||||
{
|
||||
void ViewObjectContact::checkForPrimitive2DAnimations()
|
||||
{
|
||||
// remove old one
|
||||
if(mpPrimitiveAnimation)
|
||||
{
|
||||
@@ -314,10 +311,10 @@ namespace sdr
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
drawinglayer::primitive2d::Primitive2DSequence ViewObjectContact::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const
|
||||
{
|
||||
drawinglayer::primitive2d::Primitive2DSequence ViewObjectContact::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const
|
||||
{
|
||||
// get the view-independent Primitive from the viewContact
|
||||
drawinglayer::primitive2d::Primitive2DSequence xRetval(GetViewContact().getViewIndependentPrimitive2DSequence());
|
||||
|
||||
@@ -352,10 +349,10 @@ namespace sdr
|
||||
}
|
||||
|
||||
return xRetval;
|
||||
}
|
||||
}
|
||||
|
||||
drawinglayer::primitive2d::Primitive2DSequence ViewObjectContact::getPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const
|
||||
{
|
||||
drawinglayer::primitive2d::Primitive2DSequence ViewObjectContact::getPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const
|
||||
{
|
||||
drawinglayer::primitive2d::Primitive2DSequence xNewPrimitiveSequence;
|
||||
|
||||
// take care of redirectors and create new list
|
||||
@@ -387,22 +384,22 @@ namespace sdr
|
||||
|
||||
// return current Primitive2DSequence
|
||||
return mxPrimitive2DSequence;
|
||||
}
|
||||
}
|
||||
|
||||
bool ViewObjectContact::isPrimitiveVisible(const DisplayInfo& /*rDisplayInfo*/) const
|
||||
{
|
||||
bool ViewObjectContact::isPrimitiveVisible(const DisplayInfo& /*rDisplayInfo*/) const
|
||||
{
|
||||
// default: always visible
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
bool ViewObjectContact::isPrimitiveGhosted(const DisplayInfo& rDisplayInfo) const
|
||||
{
|
||||
bool ViewObjectContact::isPrimitiveGhosted(const DisplayInfo& rDisplayInfo) const
|
||||
{
|
||||
// default: standard check
|
||||
return (GetObjectContact().DoVisualizeEnteredGroup() && !GetObjectContact().isOutputToPrinter() && rDisplayInfo.IsGhostedDrawModeActive());
|
||||
}
|
||||
}
|
||||
|
||||
drawinglayer::primitive2d::Primitive2DSequence ViewObjectContact::getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const
|
||||
{
|
||||
drawinglayer::primitive2d::Primitive2DSequence ViewObjectContact::getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const
|
||||
{
|
||||
drawinglayer::primitive2d::Primitive2DSequence xRetval;
|
||||
|
||||
// check model-view visibility
|
||||
@@ -427,10 +424,10 @@ namespace sdr
|
||||
}
|
||||
|
||||
return xRetval;
|
||||
}
|
||||
}
|
||||
|
||||
drawinglayer::primitive2d::Primitive2DSequence ViewObjectContact::getPrimitive2DSequenceSubHierarchy(DisplayInfo& rDisplayInfo) const
|
||||
{
|
||||
drawinglayer::primitive2d::Primitive2DSequence ViewObjectContact::getPrimitive2DSequenceSubHierarchy(DisplayInfo& rDisplayInfo) const
|
||||
{
|
||||
const sal_uInt32 nSubHierarchyCount(GetViewContact().GetObjectCount());
|
||||
drawinglayer::primitive2d::Primitive2DSequence xSeqRetval;
|
||||
|
||||
@@ -442,8 +439,8 @@ namespace sdr
|
||||
}
|
||||
|
||||
return xSeqRetval;
|
||||
}
|
||||
} // end of namespace contact
|
||||
} // end of namespace sdr
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
Reference in New Issue
Block a user