summaryrefslogtreecommitdiff
path: root/svx/source/customshapes/EnhancedCustomShape2d.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/customshapes/EnhancedCustomShape2d.cxx')
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx33
1 files changed, 15 insertions, 18 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index f2a00feaad80..70e2c5fb352d 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -2266,30 +2266,27 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( bool bLineGeometryNeededOnly )
sal_uInt32 nColorIndex(0);
// #i37011# remove invisible objects
- if(!vObjectList.empty())
+ std::vector< std::pair< SdrPathObj*, double> > vNewList;
+
+ for ( std::pair< SdrPathObj*, double >& rCandidate : vObjectList )
{
- std::vector< std::pair< SdrPathObj*, double> > vTempList;
+ SdrPathObj* pObj(rCandidate.first);
+ const drawing::LineStyle eLineStyle(pObj->GetMergedItem(XATTR_LINESTYLE).GetValue());
+ const drawing::FillStyle eFillStyle(pObj->GetMergedItem(XATTR_FILLSTYLE).GetValue());
- for ( std::pair< SdrPathObj*, double >& rCandidate : vObjectList )
+ // #i40600# if bLineGeometryNeededOnly is set, linestyle does not matter
+ if(!bLineGeometryNeededOnly && (drawing::LineStyle_NONE == eLineStyle) && (drawing::FillStyle_NONE == eFillStyle))
{
- SdrPathObj* pObj(rCandidate.first);
- const drawing::LineStyle eLineStyle(pObj->GetMergedItem(XATTR_LINESTYLE).GetValue());
- const drawing::FillStyle eFillStyle(pObj->GetMergedItem(XATTR_FILLSTYLE).GetValue());
-
- // #i40600# if bLineGeometryNeededOnly is set, linestyle does not matter
- if(!bLineGeometryNeededOnly && (drawing::LineStyle_NONE == eLineStyle) && (drawing::FillStyle_NONE == eFillStyle))
- {
- delete pObj;
- }
- else
- {
- vTempList.push_back(rCandidate);
- }
+ delete pObj;
+ }
+ else
+ {
+ vNewList.push_back(rCandidate);
}
-
- vObjectList = vTempList;
}
+ vObjectList = vNewList;
+
if(1 == vObjectList.size())
{
// a single object, correct some values