summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/vba/vbainformationhelper.cxx3
-rw-r--r--sw/source/ui/vba/wordvbahelper.cxx3
2 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/ui/vba/vbainformationhelper.cxx b/sw/source/ui/vba/vbainformationhelper.cxx
index 9af29dada418..609e4732e962 100644
--- a/sw/source/ui/vba/vbainformationhelper.cxx
+++ b/sw/source/ui/vba/vbainformationhelper.cxx
@@ -25,6 +25,7 @@
#include <vbahelper/vbahelper.hxx>
#include <swtypes.hxx>
#include <viewsh.hxx>
+#include <IDocumentLayoutAccess.hxx>
using namespace ::ooo::vba;
using namespace ::com::sun::star;
@@ -52,7 +53,7 @@ double SwVbaInformationHelper::handleWdVerticalPositionRelativeToPage( const css
sal_Int32 nCurrentPage = handleWdActiveEndPageNumber( xTVCursor );
SwDoc* pDoc = word::getDocShell( xModel )->GetDoc();
- SwViewShell* pViewSh = pDoc->GetCurrentViewShell();
+ SwViewShell* pViewSh = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
sal_Int32 nPageHeight = pViewSh ? pViewSh->GetPageSize( nCurrentPage, false ).Height() : 0;
// FIXME: handle multipul page style
// it is very strange that the curros position is incorrect when open Word file.
diff --git a/sw/source/ui/vba/wordvbahelper.cxx b/sw/source/ui/vba/wordvbahelper.cxx
index 4c84a57a9d47..229afa1309c1 100644
--- a/sw/source/ui/vba/wordvbahelper.cxx
+++ b/sw/source/ui/vba/wordvbahelper.cxx
@@ -30,6 +30,7 @@
#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <unotxdoc.hxx>
#include <doc.hxx>
+#include <IDocumentLayoutAccess.hxx>
#include <view.hxx>
#include <viewsh.hxx>
@@ -85,7 +86,7 @@ uno::Reference< style::XStyle > getCurrentPageStyle( const uno::Reference< frame
sal_Int32 getPageCount( const uno::Reference< frame::XModel>& xModel ) throw (uno::RuntimeException)
{
SwDocShell* pDocShell = getDocShell( xModel );
- SwViewShell* pViewSh = pDocShell ? pDocShell->GetDoc()->GetCurrentViewShell() : 0;
+ SwViewShell* pViewSh = pDocShell ? pDocShell->GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell() : 0;
return pViewSh ? pViewSh->GetPageCount() : 0;
}