diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-04-23 14:43:55 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-04-26 09:57:59 -0400 |
commit | 4d4539e10955fd454bf4d1a5b850d105ab6627ef (patch) | |
tree | 67829d6c17f73cf731c5d0cdb5bfcc13e7f07815 /sc/inc/fielduno.hxx | |
parent | 53bd9908899db4899363d3fa729b50e3ca1a42d0 (diff) |
Store URL field data in a generic way.
Diffstat (limited to 'sc/inc/fielduno.hxx')
-rw-r--r-- | sc/inc/fielduno.hxx | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/sc/inc/fielduno.hxx b/sc/inc/fielduno.hxx index c9d9315a19be..23fcba5a5b83 100644 --- a/sc/inc/fielduno.hxx +++ b/sc/inc/fielduno.hxx @@ -49,9 +49,11 @@ #include <osl/mutex.hxx> #include <boost/noncopyable.hpp> +#include <boost/scoped_ptr.hpp> class SvxEditSource; class SvxFieldItem; +class SvxFieldData; class ScEditFieldObj; class ScHeaderFieldObj; class ScHeaderFooterContentObj; @@ -467,6 +469,9 @@ class ScEditFieldObj : public cppu::WeakImplHelper4< public SfxListener, private boost::noncopyable { +public: + enum FieldType { URL = 0 }; + private: const SfxItemPropertySet* pPropSet; ScDocShell* pDocShell; @@ -474,17 +479,20 @@ private: SvxEditSource* pEditSource; ESelection aSelection; - String aUrl; // content, only iff not already inserted - String aRepresentation; - String aTarget; + FieldType meType; + boost::scoped_ptr<SvxFieldData> mpData; +private: ScEditFieldObj(); // disabled + + SvxFieldData* getData(); + public: static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId(); static ScEditFieldObj* getImplementation(const com::sun::star::uno::Reference<com::sun::star::text::XTextContent>& xObj); - ScEditFieldObj(ScDocShell* pDocSh, const ScAddress& rPos, const ESelection& rSel); + ScEditFieldObj(FieldType eType, ScDocShell* pDocSh, const ScAddress& rPos, const ESelection& rSel); virtual ~ScEditFieldObj(); virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint); @@ -492,7 +500,7 @@ public: void DeleteField(); bool IsInserted() const; SvxFieldItem CreateFieldItem(); - void InitDoc(ScDocShell* pDocSh, const ScAddress& rPos, const ESelection& rSel); + void InitDoc(FieldType eType, ScDocShell* pDocSh, const ScAddress& rPos, const ESelection& rSel); // XTextField virtual ::rtl::OUString SAL_CALL getPresentation( sal_Bool bShowCommand ) |