[Libreoffice-commits] core.git: sw/source

Jan Holesovsky kendy at collabora.com
Fri Apr 18 05:23:25 PDT 2014


 sw/source/core/uibase/uiview/view.cxx |    8 +++++---
 sw/source/core/uibase/web/wview.cxx   |    4 ++++
 2 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 4d3455e06e03363c1c46d2251e25751792659cd2
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Fri Apr 18 14:19:50 2014 +0200

    non-desktop: Avoid instantiation of huge amount of 'shells'.
    
    Change-Id: Ic179924f437dd9197a0839f23ee4ba39a8a62f34

diff --git a/sw/source/core/uibase/uiview/view.cxx b/sw/source/core/uibase/uiview/view.cxx
index 9212872..b592a92 100644
--- a/sw/source/core/uibase/uiview/view.cxx
+++ b/sw/source/core/uibase/uiview/view.cxx
@@ -221,11 +221,12 @@ IMPL_LINK_NOARG(SwView, FormControlActivated)
 
 void SwView::SelectShell()
 {
+#if HAVE_FEATURE_DESKTOP
+    // Attention: Maintain the SelectShell for the WebView additionally
 
-// Attention: Maintain the SelectShell for the WebView additionally
-
-          if(m_bInDtor)
+    if(m_bInDtor)
         return;
+
     // Decision if the UpdateTable has to be called
     sal_Bool bUpdateTable = sal_False;
     const SwFrmFmt* pCurTableFmt = m_pWrtShell->GetTableFmt();
@@ -450,6 +451,7 @@ void SwView::SelectShell()
         m_pWrtShell->UpdateTable();
 
     GetViewImpl()->GetUNOObject_Impl()->NotifySelChanged();
+#endif
 }
 
 // Interaction: AttrChangedNotify() and TimeoutHdl.
diff --git a/sw/source/core/uibase/web/wview.cxx b/sw/source/core/uibase/web/wview.cxx
index db19b8b..8c3eebf 100644
--- a/sw/source/core/uibase/web/wview.cxx
+++ b/sw/source/core/uibase/web/wview.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_features.h>
+
 #include <sfx2/msg.hxx>
 #include <svl/srchitem.hxx>
 #include <sfx2/dispatch.hxx>
@@ -93,6 +95,7 @@ SwWebView::~SwWebView()
 
 void SwWebView::SelectShell()
 {
+#if HAVE_FEATURE_DESKTOP
     // Decision whether UpdateTable must be called
     bool bUpdateTable = false;
     const SwFrmFmt* pCurTableFmt = GetWrtShell().GetTableFmt();
@@ -283,6 +286,7 @@ void SwWebView::SelectShell()
     //now the table update
     if(bUpdateTable)
         GetWrtShell().UpdateTable();
+#endif
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list