summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx33
-rw-r--r--svx/source/svdraw/svdedtv1.cxx2
-rw-r--r--svx/source/svdraw/svdomeas.cxx3
-rw-r--r--svx/source/xml/xmlexport.cxx49
4 files changed, 40 insertions, 47 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
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index b3bc7bcea969..8297cd96d3d0 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -1044,7 +1044,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll)
SdrEdgeObj* pEdgeObj = dynamic_cast< SdrEdgeObj* >( pObj );
if ( pEdgeObj )
bPossibleGeomChange = true;
- else if( bUndo )
+ else
vConnectorUndoActions = CreateConnectorUndo( *pObj );
AddUndoActions( vConnectorUndoActions );
diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx
index 9c1f6550f66d..bcb83fb92003 100644
--- a/svx/source/svdraw/svdomeas.cxx
+++ b/svx/source/svdraw/svdomeas.cxx
@@ -164,8 +164,7 @@ OUString SdrMeasureObj::TakeRepresentation(SdrMeasureFieldKind eMeasureFieldKind
if(eMeasureUnit == FUNIT_NONE)
eMeasureUnit = eModUIUnit;
- if(bShowUnit)
- aStr = SdrModel::GetUnitString(eMeasureUnit);
+ aStr = SdrModel::GetUnitString(eMeasureUnit);
}
break;
diff --git a/svx/source/xml/xmlexport.cxx b/svx/source/xml/xmlexport.cxx
index f34dcb5de520..5e542ac665f5 100644
--- a/svx/source/xml/xmlexport.cxx
+++ b/svx/source/xml/xmlexport.cxx
@@ -84,37 +84,34 @@ bool SvxDrawingLayerExport( SdrModel* pModel, const uno::Reference<io::XOutputSt
xGraphicHelper = SvXMLGraphicHelper::Create( SvXMLGraphicHelperMode::Write );
xGraphicResolver = xGraphicHelper.get();
- if( bDocRet )
- {
- uno::Reference<xml::sax::XDocumentHandler> xHandler( xWriter, uno::UNO_QUERY );
+ uno::Reference<xml::sax::XDocumentHandler> xHandler( xWriter, uno::UNO_QUERY );
- // doc export
- uno::Reference< io::XActiveDataSource > xDocSrc( xWriter, uno::UNO_QUERY );
- xDocSrc->setOutputStream( xOut );
+ // doc export
+ uno::Reference< io::XActiveDataSource > xDocSrc( xWriter, uno::UNO_QUERY );
+ xDocSrc->setOutputStream( xOut );
- uno::Sequence< uno::Any > aArgs( xObjectResolver.is() ? 3 : 2 );
- aArgs[0] <<= xHandler;
- aArgs[1] <<= xGraphicResolver;
- if( xObjectResolver.is() )
- aArgs[2] <<= xObjectResolver;
+ uno::Sequence< uno::Any > aArgs( xObjectResolver.is() ? 3 : 2 );
+ aArgs[0] <<= xHandler;
+ aArgs[1] <<= xGraphicResolver;
+ if( xObjectResolver.is() )
+ aArgs[2] <<= xObjectResolver;
- uno::Reference< document::XFilter > xFilter( xContext->getServiceManager()->createInstanceWithArgumentsAndContext( OUString::createFromAscii( pExportService ), aArgs, xContext ), uno::UNO_QUERY );
- if( !xFilter.is() )
- {
- OSL_FAIL( "com.sun.star.comp.Draw.XMLExporter service missing" );
- bDocRet = false;
- }
+ uno::Reference< document::XFilter > xFilter( xContext->getServiceManager()->createInstanceWithArgumentsAndContext( OUString::createFromAscii( pExportService ), aArgs, xContext ), uno::UNO_QUERY );
+ if( !xFilter.is() )
+ {
+ OSL_FAIL( "com.sun.star.comp.Draw.XMLExporter service missing" );
+ bDocRet = false;
+ }
- if( bDocRet )
+ if( bDocRet )
+ {
+ uno::Reference< document::XExporter > xExporter( xFilter, uno::UNO_QUERY );
+ if( xExporter.is() )
{
- uno::Reference< document::XExporter > xExporter( xFilter, uno::UNO_QUERY );
- if( xExporter.is() )
- {
- xExporter->setSourceDocument( xSourceDoc );
-
- uno::Sequence< beans::PropertyValue > aDescriptor( 0 );
- bDocRet = xFilter->filter( aDescriptor );
- }
+ xExporter->setSourceDocument( xSourceDoc );
+
+ uno::Sequence< beans::PropertyValue > aDescriptor( 0 );
+ bDocRet = xFilter->filter( aDescriptor );
}
}
}