diff options
author | Michael Stahl <mst@openoffice.org> | 2010-03-26 19:38:34 +0100 |
---|---|---|
committer | Michael Stahl <mst@openoffice.org> | 2010-03-26 19:38:34 +0100 |
commit | 5d58845170113179d5bc9e60d2411196b8d30240 (patch) | |
tree | 591f2e315c42f8cc9d18cad99aea07a711bb3060 /sw/source/core/unocore/unoflatpara.cxx | |
parent | 3421215984f3c0a5fcbadc070524f93dc6b89923 (diff) |
sw33bf03: #i110408#: SwXFlatParagraph: apply patch by dtardon
Diffstat (limited to 'sw/source/core/unocore/unoflatpara.cxx')
-rw-r--r-- | sw/source/core/unocore/unoflatpara.cxx | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx index d68fc43a3abc..e857a3b21af7 100644 --- a/sw/source/core/unocore/unoflatpara.cxx +++ b/sw/source/core/unocore/unoflatpara.cxx @@ -33,6 +33,7 @@ #include <svx/unolingu.hxx> +#include <unobaseclass.hxx> #include <unoflatpara.hxx> #include <vos/mutex.hxx> @@ -268,6 +269,24 @@ css::uno::Sequence< ::sal_Int32 > SAL_CALL SwXFlatParagraph::getLanguagePortions return css::uno::Sequence< ::sal_Int32>(); } + +const uno::Sequence< sal_Int8 >& +SwXFlatParagraph::getUnoTunnelId() +{ + static uno::Sequence<sal_Int8> aSeq(CreateUnoTunnelId()); + return aSeq; +} + + +sal_Int64 SAL_CALL +SwXFlatParagraph::getSomething( + const uno::Sequence< sal_Int8 >& rId) + throw (uno::RuntimeException) +{ + return sw::UnoTunnelImpl(rId, this); +} + + /****************************************************************************** * SwXFlatParagraphIterator ******************************************************************************/ @@ -429,8 +448,9 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaAfter(co if (!mpDoc) return xRet; - text::XFlatParagraph* pFP = xPara.get(); - SwXFlatParagraph* pFlatParagraph = static_cast<SwXFlatParagraph*>(pFP); + const uno::Reference<lang::XUnoTunnel> xFPTunnel(xPara, uno::UNO_QUERY); + OSL_ASSERT(xFPTunnel.is()); + SwXFlatParagraph* const pFlatParagraph(sw::UnoTunnelGetImplementation<SwXFlatParagraph>(xFPTunnel)); if ( !pFlatParagraph ) return xRet; @@ -475,8 +495,9 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaBefore(c if (!mpDoc) return xRet; - text::XFlatParagraph* pFP = xPara.get(); - SwXFlatParagraph* pFlatParagraph = static_cast<SwXFlatParagraph*>(pFP); + const uno::Reference<lang::XUnoTunnel> xFPTunnel(xPara, uno::UNO_QUERY); + OSL_ASSERT(xFPTunnel.is()); + SwXFlatParagraph* const pFlatParagraph(sw::UnoTunnelGetImplementation<SwXFlatParagraph>(xFPTunnel)); if ( !pFlatParagraph ) return xRet; @@ -511,4 +532,3 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getParaBefore(c return xRet; } - |