summaryrefslogtreecommitdiff
path: root/editeng/source/uno/unoforou.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-04-04 08:45:26 +0200
committerNoel Grandin <noel@peralex.com>2014-04-04 13:44:16 +0200
commit214751e3cc5b154d90963f4abf0a9317733b001b (patch)
tree9d7c0127be2b0e9ada88bcf73e632233bd841f61 /editeng/source/uno/unoforou.cxx
parent6f349af57ebd6d160b6354c2033c46467da4598a (diff)
cleanup up the EditEngine::GetAttribs call
It was using a bool parameter, but passing various constants through it. Make the constants into an enum, and use the enum in the GetAttribs call. Change-Id: I3010397dfe83b24db3946b9dea2fb37f4393abdd
Diffstat (limited to 'editeng/source/uno/unoforou.cxx')
-rw-r--r--editeng/source/uno/unoforou.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/editeng/source/uno/unoforou.cxx b/editeng/source/uno/unoforou.cxx
index e6204f482b27..5d7d8f343019 100644
--- a/editeng/source/uno/unoforou.cxx
+++ b/editeng/source/uno/unoforou.cxx
@@ -71,13 +71,13 @@ OUString SvxOutlinerForwarder::GetText( const ESelection& rSel ) const
return pEditEngine->GetText( rSel, LINEEND_LF );
}
-static SfxItemSet ImplOutlinerForwarderGetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib, EditEngine& rEditEngine )
+static SfxItemSet ImplOutlinerForwarderGetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib, EditEngine& rEditEngine )
{
if( rSel.nStartPara == rSel.nEndPara )
{
sal_uInt8 nFlags = 0;
- switch( bOnlyHardAttrib )
+ switch( nOnlyHardAttrib )
{
case EditEngineAttribs_All:
nFlags = GETATTRIBS_ALL;
@@ -95,13 +95,13 @@ static SfxItemSet ImplOutlinerForwarderGetAttribs( const ESelection& rSel, sal_B
}
else
{
- return rEditEngine.GetAttribs( rSel, bOnlyHardAttrib );
+ return rEditEngine.GetAttribs( rSel, nOnlyHardAttrib );
}
}
-SfxItemSet SvxOutlinerForwarder::GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib ) const
+SfxItemSet SvxOutlinerForwarder::GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib ) const
{
- if( mpAttribsCache && ( 0 == bOnlyHardAttrib ) )
+ if( mpAttribsCache && ( EditEngineAttribs_All == nOnlyHardAttrib ) )
{
// have we the correct set in cache?
if( ((SvxOutlinerForwarder*)this)->maAttribCacheSelection.IsEqual(rSel) )
@@ -121,9 +121,9 @@ SfxItemSet SvxOutlinerForwarder::GetAttribs( const ESelection& rSel, sal_Bool bO
//! and why is the GetAttribs on the EditEngine not a const?
EditEngine& rEditEngine = (EditEngine&)rOutliner.GetEditEngine();
- SfxItemSet aSet( ImplOutlinerForwarderGetAttribs( rSel, bOnlyHardAttrib, rEditEngine ) );
+ SfxItemSet aSet( ImplOutlinerForwarderGetAttribs( rSel, nOnlyHardAttrib, rEditEngine ) );
- if( 0 == bOnlyHardAttrib )
+ if( EditEngineAttribs_All == nOnlyHardAttrib )
{
mpAttribsCache = new SfxItemSet( aSet );
maAttribCacheSelection = rSel;