diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-04-24 16:54:23 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-04-26 09:58:01 -0400 |
commit | 1de32aeca83edb2c8e6a575e4f7132ec39b9ca52 (patch) | |
tree | e53bdf3cca3db3d477b2fa8d3b61ba4a6db1a7af /sc/inc/fielduno.hxx | |
parent | 399727e98353c24719408780ad9d7e7eee198176 (diff) |
Ok, the regression I had introduced in my prev commit is now fixed.
The idea is to keep a reference to the ScHeaderFooterTextData instance
in ScHeaderFooterTextObj which is the authoritative copy, instead of
making copies of it everywhere. This way when the text is updated
in ScHeaderFooterTextObj all the other places will see it too without
needing to propagate the change.
Diffstat (limited to 'sc/inc/fielduno.hxx')
-rw-r--r-- | sc/inc/fielduno.hxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sc/inc/fielduno.hxx b/sc/inc/fielduno.hxx index 86c6f524ae05..153ea338306f 100644 --- a/sc/inc/fielduno.hxx +++ b/sc/inc/fielduno.hxx @@ -59,6 +59,7 @@ class ScHeaderFieldObj; class ScHeaderFooterContentObj; class ScDocShell; class EditTextObject; +class ScHeaderFooterTextData; class ScCellFieldsObj : public cppu::WeakImplHelper5< @@ -271,8 +272,7 @@ class ScHeaderFieldsObj : public cppu::WeakImplHelper5< com::sun::star::lang::XServiceInfo > { private: - ScHeaderFooterContentObj* pContentObj; - sal_uInt16 nPart; + ScHeaderFooterTextData& mrData; sal_uInt16 nType; SvxEditSource* pEditSource; @@ -284,8 +284,7 @@ private: ScHeaderFieldObj* GetObjectByIndex_Impl(sal_Int32 Index) const; public: - ScHeaderFieldsObj( - ScHeaderFooterContentObj* pContent, sal_uInt16 nP, const EditTextObject* pTextObj, sal_uInt16 nT); + ScHeaderFieldsObj(ScHeaderFooterTextData& rData); virtual ~ScHeaderFieldsObj(); // XIndexAccess @@ -342,8 +341,6 @@ class ScHeaderFieldObj : public ScMutexHelper, private: const SfxItemPropertySet* pPropSet; com::sun::star::uno::Reference<com::sun::star::text::XTextRange> mpContent; - ScHeaderFooterContentObj* pContentObj; - sal_uInt16 nPart; sal_uInt16 nType; SvxEditSource* pEditSource; ESelection aSelection; @@ -353,7 +350,7 @@ private: public: ScHeaderFieldObj( const com::sun::star::uno::Reference<com::sun::star::text::XTextRange>& rContent, - ScHeaderFooterContentObj* pContent, sal_uInt16 nP, sal_uInt16 nT, const ESelection& rSel); + ScHeaderFooterTextData* pData, sal_uInt16 nT, const ESelection& rSel); virtual ~ScHeaderFieldObj(); // called by getImplementation: @@ -362,7 +359,7 @@ public: SvxFieldItem CreateFieldItem(); void InitDoc( const com::sun::star::uno::Reference<com::sun::star::text::XTextRange>& rContent, - ScHeaderFooterContentObj* pContent, sal_uInt16 nP, const EditTextObject* pTextObj, const ESelection& rSel); + ScHeaderFooterTextData& rData, const ESelection& rSel); virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) |