summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/Library_sw.mk1
-rw-r--r--sw/inc/docsh.hxx4
-rw-r--r--sw/source/core/crsr/findtxt.cxx5
-rw-r--r--sw/source/core/doc/DocumentStatisticsManager.cxx3
-rw-r--r--sw/source/core/sw3io/swacorr.cxx2
-rw-r--r--sw/source/uibase/wrtsh/docsh.cxx19
6 files changed, 29 insertions, 5 deletions
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index c4753150a5c8..1b16def25cf8 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -747,6 +747,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
sw/source/uibase/web/wtextsh \
sw/source/uibase/web/wview \
sw/source/uibase/wrtsh/delete \
+ sw/source/uibase/wrtsh/docsh \
sw/source/uibase/wrtsh/move \
sw/source/uibase/wrtsh/navmgr \
sw/source/uibase/wrtsh/select \
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index 53a801c2090f..3b3e0bec921a 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -36,6 +36,7 @@ class SfxDocumentInfoDialog;
class SfxStyleSheetBasePool;
class SfxInPlaceClient;
class FontList;
+class SwEditShell;
class SwView;
class SwWrtShell;
class SwFEShell;
@@ -218,6 +219,9 @@ public:
/// Accress to the SwWrtShell belonging to SwView.
SwWrtShell *GetWrtShell() { return mpWrtShell; }
const SwWrtShell *GetWrtShell() const { return mpWrtShell; }
+ // Same as GetWrtShell, but return pointer to SwEditShell base of
+ // (potentially incomplete) SwWrtShell:
+ SwEditShell * GetEditShell();
/// For Core - it knows the DocShell but not the WrtShell!
SwFEShell *GetFEShell();
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index ea5c6ada3c05..364ee6da33b3 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -23,6 +23,7 @@
#include <vcl/svapp.hxx>
#include <vcl/window.hxx>
+#include <editsh.hxx>
#include <txatritr.hxx>
#include <fldbas.hxx>
#include <fmtfld.hxx>
@@ -44,8 +45,6 @@
using namespace ::com::sun::star;
using namespace util;
-OUString *ReplaceBackReferences( const SearchOptions& rSearchOpt, SwPaM* pPam );
-
static OUString
lcl_CleanStr(const SwTxtNode& rNd, sal_Int32 const nStart, sal_Int32& rEnd,
std::vector<sal_Int32> &rArr, bool const bRemoveSoftHyphen)
@@ -289,7 +288,7 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te
}
SwDocShell *const pDocShell = pNode->GetDoc()->GetDocShell();
- SwViewShell *const pWrtShell = (pDocShell) ? (SwViewShell*)(pDocShell->GetWrtShell()) : 0;
+ SwViewShell *const pWrtShell = (pDocShell) ? pDocShell->GetEditShell() : 0;
SwPostItMgr *const pPostItMgr = (pWrtShell) ? pWrtShell->GetPostItMgr() : 0;
sal_Int32 aStart = 0;
diff --git a/sw/source/core/doc/DocumentStatisticsManager.cxx b/sw/source/core/doc/DocumentStatisticsManager.cxx
index 5017630bb65b..3f6ccb4d5ce0 100644
--- a/sw/source/core/doc/DocumentStatisticsManager.cxx
+++ b/sw/source/core/doc/DocumentStatisticsManager.cxx
@@ -18,6 +18,7 @@
*/
#include <DocumentStatisticsManager.hxx>
#include <doc.hxx>
+#include <editsh.hxx>
#include <fldbas.hxx>
#include <docsh.hxx>
#include <IDocumentFieldsAccess.hxx>
@@ -208,7 +209,7 @@ bool DocumentStatisticsManager::IncrementalDocStatCalculate(long nChars, bool bF
const ModifyBlocker_Impl b(pObjShell);
// rhbz#1081176: don't jump to cursor pos because of (temporary)
// activation of modified flag triggering move to input position
- LockAllViews aViewGuard((SwViewShell*)pObjShell->GetWrtShell());
+ LockAllViews aViewGuard(pObjShell->GetEditShell());
xDocProps->setDocumentStatistics(aStat);
if (!bDocWasModified)
{
diff --git a/sw/source/core/sw3io/swacorr.cxx b/sw/source/core/sw3io/swacorr.cxx
index b08866fe2337..37315e3cb9db 100644
--- a/sw/source/core/sw3io/swacorr.cxx
+++ b/sw/source/core/sw3io/swacorr.cxx
@@ -83,7 +83,7 @@ bool SwAutoCorrect::PutText( const uno::Reference < embed::XStorage >& rStg,
nRet = aBlk.BeginPutDoc( rShort, rShort );
if( !IsError( nRet ) )
{
- ((SwEditShell*)rDShell.GetWrtShell())->_CopySelToDoc( pDoc );
+ rDShell.GetEditShell()->_CopySelToDoc( pDoc );
nRet = aBlk.PutDoc();
aBlk.AddName ( rShort, rShort, false );
if( !IsError( nRet ) )
diff --git a/sw/source/uibase/wrtsh/docsh.cxx b/sw/source/uibase/wrtsh/docsh.cxx
new file mode 100644
index 000000000000..904efeba1169
--- /dev/null
+++ b/sw/source/uibase/wrtsh/docsh.cxx
@@ -0,0 +1,19 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <sal/config.h>
+
+#include <docsh.hxx>
+#include <wrtsh.hxx>
+
+SwEditShell * SwDocShell::GetEditShell() {
+ return mpWrtShell;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */