diff options
author | Valentin Kettner <vakevk+libreoffice@gmail.com> | 2014-08-06 16:21:14 +0200 |
---|---|---|
committer | Valentin Kettner <vakevk+libreoffice@gmail.com> | 2014-08-12 23:26:38 +0200 |
commit | 5494954b269267f6ee3bdd5ac73e7513fa69978f (patch) | |
tree | bd6569e5b82a7c771062b2e2e5f6db7666913597 /sw/source/ui | |
parent | 64e13a1456c44ef3461c2941bb3be15c3eaf478e (diff) |
Refactored IDocumentLayoutAccess out of SwDoc.
Into the new class DocumentLayoutManager.
Change-Id: I02d0cfcc63633d0bdab380508b2ef563187fd269
Diffstat (limited to 'sw/source/ui')
-rw-r--r-- | sw/source/ui/vba/vbainformationhelper.cxx | 3 | ||||
-rw-r--r-- | sw/source/ui/vba/wordvbahelper.cxx | 3 |
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; } |