diff options
author | Noel Grandin <noel@peralex.com> | 2014-09-30 09:00:55 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-09-30 16:38:53 +0000 |
commit | 9bcd96a36e323a1c70eeefa81f2c8ea595f59444 (patch) | |
tree | 3d0b9f768620293a28b721c466b56a483297a717 /include/editeng | |
parent | 88b671d3d879fb04fdd282f30264e6c6bfa019ee (diff) |
clean up some weird type-casting in SvxRTFParser
...it was casting between a std::vector and a struct.
Just store the struct.
Change-Id: I37afa2ea27aa45d0849e01b45837129719eaf138
Reviewed-on: https://gerrit.libreoffice.org/11705
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'include/editeng')
-rw-r--r-- | include/editeng/svxrtf.hxx | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/include/editeng/svxrtf.hxx b/include/editeng/svxrtf.hxx index 9e516cdc4ad3..7a4ef1cd93c2 100644 --- a/include/editeng/svxrtf.hxx +++ b/include/editeng/svxrtf.hxx @@ -100,7 +100,7 @@ struct SvxRTFStyleType // Here are the IDs for all character attributes, which can be detected by -// SvxParser and can be set in a SfxItemSet. The IDs are set correctly throught +// SvxParser and can be set in a SfxItemSet. The IDs are set correctly through // the SlotIds from POOL. struct RTFPlainAttrMapIds { @@ -143,7 +143,7 @@ struct RTFPlainAttrMapIds }; // Here are the IDs for all paragraph attributes, which can be detected by -// SvxParser and can be set in a SfxItemSet. The IDs are set correctly throught +// SvxParser and can be set in a SfxItemSet. The IDs are set correctly through // the SlotIds from POOL. struct RTFPardAttrMapIds { @@ -182,8 +182,8 @@ class EDITENG_DLLPUBLIC SvxRTFParser : public SvRTFParser SvxRTFItemStack aAttrStack; SvxRTFItemStackList aAttrSetList; - std::vector<sal_uInt16> aPlainMap; - std::vector<sal_uInt16> aPardMap; + RTFPlainAttrMapIds aPlainMap; + RTFPardAttrMapIds aPardMap; std::vector<sal_uInt16> aWhichMap; OUString sBaseURL; @@ -309,11 +309,6 @@ protected: long GetVersionNo() const { return nVersionNo; } - // Query/Set the mapping IDs for the Pard/Plain attributes - //(Set: It is noted in the pointers, which thus does not create a copy) - void AddPardAttr( sal_uInt16 nWhich ) { aPardMap.push_back( nWhich ); } - void AddPlainAttr( sal_uInt16 nWhich ) { aPlainMap.push_back( nWhich ); } - SvxRTFStyleTbl& GetStyleTbl() { return aStyleTbl; } SvxRTFItemStack& GetAttrStack() { return aAttrStack; } SvxRTFColorTbl& GetColorTbl() { return aColorTbl; } @@ -334,10 +329,8 @@ public: // The maps are not generated anew! void SetAttrPool( SfxItemPool* pNewPool ) { pAttrPool = pNewPool; } // to set different WhichIds for a different pool. - RTFPardAttrMapIds& GetPardMap() - { return (RTFPardAttrMapIds&)*aPardMap.begin(); } - RTFPlainAttrMapIds& GetPlainMap() - { return (RTFPlainAttrMapIds&)*aPlainMap.begin(); } + RTFPardAttrMapIds& GetPardMap() { return aPardMap; } + RTFPlainAttrMapIds& GetPlainMap() { return aPlainMap; } // to be able to assign them from the outside as for example table cells void ReadBorderAttr( int nToken, SfxItemSet& rSet, int bTableDef=sal_False ); void ReadBackgroundAttr( int nToken, SfxItemSet& rSet, int bTableDef=sal_False ); |