diff options
author | Noel Grandin <noel@peralex.com> | 2014-09-18 15:10:54 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-09-23 17:27:47 +0200 |
commit | 23e1fc277d5651babce17bb74408ef6505f101d2 (patch) | |
tree | edf64a973766400f870095f4ecd25784bfea6ba5 /sw/inc/unoframe.hxx | |
parent | 7f895dfbf5fb084d747e52db678d75e3273cd825 (diff) |
loplugin: cstylecast, update PTR_CAST macro to use static_cast
I introduce a template method into the PTR_CAST machinery
to maintain constness.
There is now a FIXME in sd/../docshell.cxx because I needed
to use a dynamic_cast there to work around the games it appears
to be playing with OLE in-place activation.
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>,
dropping the GCC-extension, unnecessary use of typeof from tools/rtti.hxx
Change-Id: Iba5ace1aa27e02b34fcc91af1e658c43371afd03
Diffstat (limited to 'sw/inc/unoframe.hxx')
-rw-r--r-- | sw/inc/unoframe.hxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sw/inc/unoframe.hxx b/sw/inc/unoframe.hxx index 3e5bb973f0ac..d9a012cbe807 100644 --- a/sw/inc/unoframe.hxx +++ b/sw/inc/unoframe.hxx @@ -141,7 +141,11 @@ public: void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException ); void attach( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xTextRange ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - SwFrmFmt* GetFrmFmt() const + const SwFrmFmt* GetFrmFmt() const + { + return PTR_CAST ( SwFrmFmt, GetRegisteredIn() ); + } + SwFrmFmt* GetFrmFmt() { return PTR_CAST ( SwFrmFmt, GetRegisteredIn() ); } |