summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-22 16:25:08 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-23 09:34:19 +0200
commitbc83fcc98e2380d3ab7acfa2826b64525e711f72 (patch)
treea374cf0fe1547cde4dc37d4f11e1832b5d735fbd /svx/source
parent45c7ba7ad6befdc4c212c376ef9399976f6695e1 (diff)
small tidyup in SdrObjEditView::ApplyFormatPaintBrush
Change-Id: I8c1797e78f644bd15eb6d26a96fcc3ed909c2aab
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/svdraw/svdedxv.cxx22
1 files changed, 13 insertions, 9 deletions
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 2f618b0e10fa..c152b8c48a41 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -2295,14 +2295,13 @@ void SdrObjEditView::ApplyFormatPaintBrush( SfxItemSet& rFormatSet, bool bNoChar
{
if( !mxSelectionController.is() || !mxSelectionController->ApplyFormatPaintBrush( rFormatSet, bNoCharacterFormats, bNoParagraphFormats ) )
{
- const SdrMarkList& rMarkList = GetMarkedObjectList();
- SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
OutlinerView* pOLV = GetTextEditOutlinerView();
-
- const SfxItemSet& rShapeSet = pObj->GetMergedItemSet();
-
if( !pOLV )
{
+ const SdrMarkList& rMarkList = GetMarkedObjectList();
+ SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
+ const SfxItemSet& rShapeSet = pObj->GetMergedItemSet();
+
// if not in text edit mode (aka the user selected text or clicked on a word)
// apply formatting attributes to selected shape
// All formatting items (see ranges above) that are unequal in selected shape and
@@ -2323,9 +2322,11 @@ void SdrObjEditView::ApplyFormatPaintBrush( SfxItemSet& rFormatSet, bool bNoChar
if( !bTextOnly )
{
- SfxItemSet aPaintSet( CreatePaintSet( GetFormatRangeImpl(false), *rShapeSet.GetPool(), rFormatSet, rShapeSet, bNoCharacterFormats, bNoParagraphFormats ) );
- const bool bReplaceAll = false;
- SetAttrToMarked(aPaintSet, bReplaceAll);
+ SfxItemSet aPaintSet( CreatePaintSet(
+ GetFormatRangeImpl(false), *rShapeSet.GetPool(),
+ rFormatSet, rShapeSet,
+ bNoCharacterFormats, bNoParagraphFormats ) );
+ SetAttrToMarked(aPaintSet, false/*bReplaceAll*/);
}
// now apply character and paragraph formatting to text, if the shape has any
@@ -2355,7 +2356,10 @@ void SdrObjEditView::ApplyFormatPaintBrush( SfxItemSet& rFormatSet, bool bNoChar
const bool bRemoveParaAttribs = !bNoParagraphFormats;
pOLV->RemoveAttribsKeepLanguages( bRemoveParaAttribs );
SfxItemSet aSet( pOLV->GetAttribs() );
- SfxItemSet aPaintSet( CreatePaintSet(GetFormatRangeImpl(true), *aSet.GetPool(), rFormatSet, aSet, bNoCharacterFormats, bNoParagraphFormats ) );
+ SfxItemSet aPaintSet( CreatePaintSet(
+ GetFormatRangeImpl(true), *aSet.GetPool(),
+ rFormatSet, aSet,
+ bNoCharacterFormats, bNoParagraphFormats ) );
pOLV->SetAttribs( aPaintSet );
}
}