Kaydet (Commit) 751e5b32 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: fdo#84043 don't create duplicate Mirrored[X|Y] properties

regression from 13ef1642

commit 13ef1642
Author: Armin Le Grand <alg@apache.org>
Date:   Wed Nov 21 13:23:01 2012 +0000

    For backward compatibility take mirrorings in setTransformation into account

    Also found an error in SdrObjCustomShape::TRGetBaseGeometry when MirrorY was used

    (cherry picked from commit 4116c33b)

Change-Id: I7bfb5dea32b8ab8498e3d92975c49b830c81e6fb
üst bb5e219a
......@@ -3832,22 +3832,38 @@ void SdXMLCustomShapeContext::EndElement()
if(bFlippedX || bFlippedY)
{
beans::PropertyValue aNewPoroperty;
OUString sName;
if(bFlippedX)
sName = "MirroredX";
else
sName = "MirroredY";
//fdo#84043 overwrite the property if it already exists, otherwise append it
beans::PropertyValue* pItem;
std::vector< beans::PropertyValue >::iterator aI(maCustomShapeGeometry.begin());
std::vector< beans::PropertyValue >::iterator aE(maCustomShapeGeometry.end());
while (aI != aE)
{
if (aI->Name == sName)
break;
++aI;
}
if (aI != aE)
{
aNewPoroperty.Name = "MirroredX";
beans::PropertyValue& rItem = *aI;
pItem = &rItem;
}
else
{
aNewPoroperty.Name = "MirroredY";
maCustomShapeGeometry.push_back(beans::PropertyValue());
pItem = &maCustomShapeGeometry.back();
}
aNewPoroperty.Handle = -1;
aNewPoroperty.Value <<= sal_True;
aNewPoroperty.State = beans::PropertyState_DIRECT_VALUE;
maCustomShapeGeometry.push_back(aNewPoroperty);
pItem->Name = sName;
pItem->Handle = -1;
pItem->Value <<= sal_True;
pItem->State = beans::PropertyState_DIRECT_VALUE;
}
}
......
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