diff options
author | Noel Grandin <noel@peralex.com> | 2014-04-04 08:45:26 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-04-04 13:44:16 +0200 |
commit | 214751e3cc5b154d90963f4abf0a9317733b001b (patch) | |
tree | 9d7c0127be2b0e9ada88bcf73e632233bd841f61 /include/editeng/editeng.hxx | |
parent | 6f349af57ebd6d160b6354c2033c46467da4598a (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 'include/editeng/editeng.hxx')
-rw-r--r-- | include/editeng/editeng.hxx | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx index 128fdf50341e..bb5efa3be97f 100644 --- a/include/editeng/editeng.hxx +++ b/include/editeng/editeng.hxx @@ -109,12 +109,18 @@ class ParaPortionList; -/** values for GetAttribs +/** values for: + SfxItemSet GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs_All ); */ -const sal_uInt8 EditEngineAttribs_All = 0; /// returns all attributes even when theire not set -const sal_uInt8 EditEngineAttribs_HardAndPara = 1; /// returns all attributes set on paragraph and on portions -const sal_uInt8 EditEngineAttribs_OnlyHard = 2; /// returns only attributes hard set on portions +enum EditEngineAttribs { + EditEngineAttribs_All, /// returns all attributes even when theire not set + EditEngineAttribs_HardAndPara, /// returns all attributes set on paragraph and on portions + EditEngineAttribs_OnlyHard /// returns only attributes hard set on portions +}; +/** values for: + SfxItemSet GetAttribs( sal_Int32 nPara, sal_Int32 nStart, sal_Int32 nEnd, sal_uInt8 nFlags = 0xFF ) const; +*/ #define GETATTRIBS_STYLESHEET (sal_uInt8)0x01 #define GETATTRIBS_PARAATTRIBS (sal_uInt8)0x02 #define GETATTRIBS_CHARATTRIBS (sal_uInt8)0x04 @@ -297,7 +303,7 @@ public: void GetCharAttribs( sal_Int32 nPara, std::vector<EECharAttrib>& rLst ) const; SfxItemSet GetAttribs( sal_Int32 nPara, sal_Int32 nStart, sal_Int32 nEnd, sal_uInt8 nFlags = 0xFF ) const; - SfxItemSet GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = sal_False ); + SfxItemSet GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs_All ); bool HasParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ) const; const SfxPoolItem& GetParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ); |