summaryrefslogtreecommitdiff
path: root/sw/source/ui/uno/unotxvw.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/uno/unotxvw.cxx')
-rwxr-xr-xsw/source/ui/uno/unotxvw.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx
index b895fd418170..3f7b0427b41c 100755
--- a/sw/source/ui/uno/unotxvw.cxx
+++ b/sw/source/ui/uno/unotxvw.cxx
@@ -81,7 +81,7 @@
#include <unocrsrhelper.hxx>
#include <unotextrange.hxx>
#include <sfx2/docfile.hxx>
-
+#include <switerator.hxx>
#include "swdtflvr.hxx"
#include <vcl/svapp.hxx>
@@ -575,9 +575,7 @@ uno::Any SwXTextView::getSelection(void) throw( uno::RuntimeException )
const SwFrmFmt* pFmt = rSh.GetFlyFrmFmt();
if (pFmt)
{
- SwXFrame* pxFrame = (SwXFrame*)SwClientIter((SwFrmFmt&)*pFmt).
- First(TYPE(SwXFrame));
-
+ SwXFrame* pxFrame = SwIterator<SwXFrame,SwFmt>::FirstElement(*pFmt);
if(pxFrame) //das einzige gemeinsame interface fuer alle Frames
{
aRef = uno::Reference< uno::XInterface >((cppu::OWeakObject*)pxFrame, uno::UNO_QUERY);
@@ -1056,7 +1054,7 @@ uno::Any SAL_CALL SwXTextView::getPropertyValue(
sal_Int32 nCount = -1;
if (nWID == WID_PAGE_COUNT)
- nCount = m_pView->GetDocShell()->GetDoc()->GetPageCount();
+ nCount = m_pView->GetWrtShell().GetPageCount();
else // WID_LINE_COUNT
nCount = m_pView->GetWrtShell().GetLineCount( sal_False /*of whole document*/ );
aRet <<= nCount;