// #i108636# The standard operator== on two UNO sequences did not work as i // would have expected; it just checks the .is() states and the data type // of the sequence. What i need here is detection of equality of the whole // sequence content, thus i need to use the arePrimitive2DSequencesEqual helper // here instead of the operator== which lead to always returning false and thus // always re-decompositions of the subcontent. if(getOLEContent() == rCompare.getOLEContent()
&& getTransform() == rCompare.getTransform()
&& getSdrLFSTAttribute() == rCompare.getSdrLFSTAttribute())
{ returntrue;
}
}
returnfalse;
}
void SdrOle2Primitive2D::get2DDecomposition(Primitive2DDecompositionVisitor& rVisitor, const geometry::ViewInformation2D& /*aViewInformation*/) const
{ // to take care of getSdrLFSTAttribute() later, the same as in SdrGrafPrimitive2D::create2DDecomposition // should happen. For the moment we only need the OLE itself // Added complete primitive preparation using getSdrLFSTAttribute() now.
Primitive2DContainer aRetval;
// create unit outline polygon const basegfx::B2DPolygon& aUnitOutline(basegfx::utils::createUnitPolygon());
// add fill if(!getSdrLFSTAttribute().getFill().isDefault())
{
basegfx::B2DPolyPolygon aTransformed(aUnitOutline);
// add line // #i97981# condition was inverse to purpose. When being compatible to paint version, // border needs to be suppressed if(!getSdrLFSTAttribute().getLine().isDefault())
{ // if line width is given, polygon needs to be grown by half of it to make the // outline to be outside of the bitmap if(0.0 != getSdrLFSTAttribute().getLine().getWidth())
{ // decompose to get scale
basegfx::B2DVector aScale, aTranslate; double fRotate, fShearX;
getTransform().decompose(aScale, aTranslate, fRotate, fShearX);
aTransformed.transform(getTransform());
aRetval.push_back(
createPolygonLinePrimitive(
aTransformed,
getSdrLFSTAttribute().getLine(),
attribute::SdrLineStartEndAttribute()));
}
} else
{ // if initially no line is defined, create one for HitTest and BoundRect
aRetval.push_back(
createHiddenGeometryPrimitives2D( false,
basegfx::B2DPolyPolygon(aUnitOutline),
getTransform()));
}
// add text, no need to suppress to stay compatible since text was // always supported by the old paints, too if(!getSdrLFSTAttribute().getText().isDefault())
{
aRetval.push_back(
createTextPrimitive(
basegfx::B2DPolyPolygon(aUnitOutline),
getTransform(),
getSdrLFSTAttribute().getText(),
getSdrLFSTAttribute().getLine(), false, false));
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.