[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - desktop/prj desktop/source scp2/source sw/source

Andre Fischer af at apache.org
Wed Jun 19 09:07:38 PDT 2013


 desktop/prj/d.lst                                               |    3 
 desktop/source/app/app.cxx                                      |    2 
 desktop/source/deployment/gui/deploymentgui.map                 |   28 ++
 desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx      |   71 ------
 desktop/source/deployment/gui/dp_gui_handleversionexception.cxx |  111 ++++++++++
 desktop/source/deployment/gui/dp_gui_service.cxx                |    4 
 desktop/source/deployment/gui/makefile.mk                       |   16 -
 desktop/source/deployment/inc/dp_gui.mk                         |    6 
 desktop/source/inc/dp_gui_api.hxx                               |   36 +++
 desktop/source/inc/dp_gui_handleversionexception.hxx            |   17 -
 desktop/source/migration/services/oo3extensionmigration.cxx     |    4 
 scp2/source/ooo/file_library_ooo.scp                            |    8 
 sw/source/filter/ww8/rtfexport.cxx                              |   15 +
 13 files changed, 230 insertions(+), 91 deletions(-)

New commits:
commit e14095bc3b573f2c48c996fa2cb58226280d5e87
Author: Andre Fischer <af at apache.org>
Date:   Wed Jun 19 15:26:41 2013 +0000

    122398: Fixed Mac and Linux build breaker.

diff --git a/desktop/prj/d.lst b/desktop/prj/d.lst
index 1535275..074f2c3 100644
--- a/desktop/prj/d.lst
+++ b/desktop/prj/d.lst
@@ -74,6 +74,9 @@ mkdir: %_DEST%\bin%_EXT%\odf4ms
 ..\%__SRC%\bin\depl*.dll %_DEST%\bin%_EXT%\depl*.dll
 ..\%__SRC%\lib\deployment*.uno.so %_DEST%\lib%_EXT%\deployment*.uno.so
 ..\%__SRC%\lib\deployment*.uno.dylib %_DEST%\lib%_EXT%\deployment*.uno.dylib
+..\%__SRC%\bin\deploymentgui*.dll %_DEST%\bin%_EXT%\deploymentgui*.dll
+..\%__SRC%\lib\libdeploymentgui*.uno.so %_DEST%\lib%_EXT%\libdeploymentgui*.uno.so
+..\%__SRC%\lib\libdeploymentgui*.uno.dylib %_DEST%\lib%_EXT%\libdeploymentgui*.uno.dylib
 ..\%__SRC%\bin\deploymentmisc*.dll %_DEST%\bin%_EXT%\deploymentmisc*.dll
 ..\%__SRC%\lib\libdeploymentmisc*.so %_DEST%\lib%_EXT%\libdeploymentmisc*.so
 ..\%__SRC%\lib\libdeploymentmisc*.dylib %_DEST%\lib%_EXT%\libdeploymentmisc*.dylib
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 30f1992..9eb1985 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -802,7 +802,7 @@ void MinimalCommandEnv::handle(
     if ( xRequest->getRequest() >>= verExc )
     {
         // user interaction, if an extension is already been installed.
-        bApprove = dp_gui::handleVersionException( verExc );
+        bApprove = handleVersionException( verExc );
     }
 
     const css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > conts( xRequest->getContinuations());
diff --git a/desktop/source/deployment/gui/deploymentgui.map b/desktop/source/deployment/gui/deploymentgui.map
new file mode 100644
index 0000000..ecf7bd2
--- /dev/null
+++ b/desktop/source/deployment/gui/deploymentgui.map
@@ -0,0 +1,28 @@
+###############################################################
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#
+###############################################################
+UDK_3_0_0 {
+    global:
+        component_getImplementationEnvironment;
+        component_getFactory;
+        handleVersionException;
+    local:
+    *;
+};
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index ca0dbc4..a0e2008 100644
--- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -26,6 +26,7 @@
 
 
 
+#include <dp_gui_handleversionexception.hxx>
 
 #include "sal/config.h"
 
@@ -105,20 +106,6 @@
 using namespace ::com::sun::star;
 using ::rtl::OUString;
 
-namespace {
-
-OUString getVersion( OUString const & sVersion )
-{
-    return ( sVersion.getLength() == 0 ) ? OUString( RTL_CONSTASCII_USTRINGPARAM( "0" ) ) : sVersion;
-}
-
-OUString getVersion( const uno::Reference< deployment::XPackage > &rPackage )
-{
-    return getVersion( rPackage->getVersion());
-}
-}
-
-
 namespace dp_gui {
 
 //==============================================================================
@@ -360,62 +347,6 @@ uno::Reference< ucb::XProgressHandler > ProgressCmdEnv::getProgressHandler()
 //------------------------------------------------------------------------------
 // XInteractionHandler
 //------------------------------------------------------------------------------
-bool handleVersionException(
-    com::sun::star::deployment::VersionException verExc,
-    DialogHelper* pDialogHelper )
-{
-    bool bApprove = false;
-
-    sal_uInt32 id;
-    switch (dp_misc::compareVersions(
-        verExc.NewVersion, verExc.Deployed->getVersion() ))
-    {
-    case dp_misc::LESS:
-        id = RID_WARNINGBOX_VERSION_LESS;
-        break;
-    case dp_misc::EQUAL:
-        id = RID_WARNINGBOX_VERSION_EQUAL;
-        break;
-    default: // dp_misc::GREATER
-        id = RID_WARNINGBOX_VERSION_GREATER;
-        break;
-    }
-    OSL_ASSERT( verExc.Deployed.is() );
-    const bool bEqualNames = verExc.NewDisplayName.equals(
-        verExc.Deployed->getDisplayName());
-    {
-        vos::OGuard guard(Application::GetSolarMutex());
-        WarningBox box( pDialogHelper ? pDialogHelper->getWindow() : NULL, ResId(id, *DeploymentGuiResMgr::get()));
-        String s;
-        if (bEqualNames)
-        {
-            s = box.GetMessText();
-        }
-        else if (id == RID_WARNINGBOX_VERSION_EQUAL)
-        {
-            //hypothetical: requires two instances of an extension with the same
-            //version to have different display names. Probably the developer forgot
-            //to change the version.
-            s = String(ResId(RID_STR_WARNINGBOX_VERSION_EQUAL_DIFFERENT_NAMES, *DeploymentGuiResMgr::get()));
-        }
-        else if (id == RID_WARNINGBOX_VERSION_LESS)
-        {
-            s = String(ResId(RID_STR_WARNINGBOX_VERSION_LESS_DIFFERENT_NAMES, *DeploymentGuiResMgr::get()));
-        }
-        else if (id == RID_WARNINGBOX_VERSION_GREATER)
-        {
-            s = String(ResId(RID_STR_WARNINGBOX_VERSION_GREATER_DIFFERENT_NAMES, *DeploymentGuiResMgr::get()));
-        }
-        s.SearchAndReplaceAllAscii( "$NAME", verExc.NewDisplayName);
-        s.SearchAndReplaceAllAscii( "$OLDNAME", verExc.Deployed->getDisplayName());
-        s.SearchAndReplaceAllAscii( "$NEW", getVersion(verExc.NewVersion) );
-        s.SearchAndReplaceAllAscii( "$DEPLOYED", getVersion(verExc.Deployed) );
-        box.SetMessText(s);
-        bApprove = box.Execute() == RET_OK;
-    }
-
-    return bApprove;
-}
 
 void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const & xRequest )
     throw ( uno::RuntimeException )
diff --git a/desktop/source/deployment/gui/dp_gui_handleversionexception.cxx b/desktop/source/deployment/gui/dp_gui_handleversionexception.cxx
new file mode 100644
index 0000000..624ab45
--- /dev/null
+++ b/desktop/source/deployment/gui/dp_gui_handleversionexception.cxx
@@ -0,0 +1,111 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include "precompiled_desktop.hxx"
+
+#include "dp_gui_handleversionexception.hxx"
+#include "dp_gui_dialog2.hxx"
+#include "dp_version.hxx"
+#include "dp_gui_shared.hxx"
+#include "dp_gui.hrc"
+#include <vcl/msgbox.hxx>
+
+using namespace dp_gui;
+using namespace dp_misc;
+using ::rtl::OUString;
+
+
+namespace {
+
+OUString getVersion( OUString const & sVersion )
+{
+    return ( sVersion.getLength() == 0 ) ? OUString( RTL_CONSTASCII_USTRINGPARAM( "0" ) ) : sVersion;
+}
+
+OUString getVersion( const ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > &rPackage )
+{
+    return getVersion( rPackage->getVersion());
+}
+}
+
+
+
+extern "C" {
+
+
+bool handleVersionException(
+    com::sun::star::deployment::VersionException verExc,
+    DialogHelper* pDialogHelper )
+{
+    bool bApprove = false;
+
+    sal_uInt32 id;
+    switch (dp_misc::compareVersions(
+        verExc.NewVersion, verExc.Deployed->getVersion() ))
+    {
+    case dp_misc::LESS:
+        id = RID_WARNINGBOX_VERSION_LESS;
+        break;
+    case dp_misc::EQUAL:
+        id = RID_WARNINGBOX_VERSION_EQUAL;
+        break;
+    default: // dp_misc::GREATER
+        id = RID_WARNINGBOX_VERSION_GREATER;
+        break;
+    }
+    OSL_ASSERT( verExc.Deployed.is() );
+    const bool bEqualNames = verExc.NewDisplayName.equals(
+        verExc.Deployed->getDisplayName());
+    {
+        vos::OGuard guard(Application::GetSolarMutex());
+        WarningBox box( pDialogHelper ? pDialogHelper->getWindow() : NULL, ResId(id, *DeploymentGuiResMgr::get()));
+        String s;
+        if (bEqualNames)
+        {
+            s = box.GetMessText();
+        }
+        else if (id == RID_WARNINGBOX_VERSION_EQUAL)
+        {
+            //hypothetical: requires two instances of an extension with the same
+            //version to have different display names. Probably the developer forgot
+            //to change the version.
+            s = String(ResId(RID_STR_WARNINGBOX_VERSION_EQUAL_DIFFERENT_NAMES, *DeploymentGuiResMgr::get()));
+        }
+        else if (id == RID_WARNINGBOX_VERSION_LESS)
+        {
+            s = String(ResId(RID_STR_WARNINGBOX_VERSION_LESS_DIFFERENT_NAMES, *DeploymentGuiResMgr::get()));
+        }
+        else if (id == RID_WARNINGBOX_VERSION_GREATER)
+        {
+            s = String(ResId(RID_STR_WARNINGBOX_VERSION_GREATER_DIFFERENT_NAMES, *DeploymentGuiResMgr::get()));
+        }
+        s.SearchAndReplaceAllAscii( "$NAME", verExc.NewDisplayName);
+        s.SearchAndReplaceAllAscii( "$OLDNAME", verExc.Deployed->getDisplayName());
+        s.SearchAndReplaceAllAscii( "$NEW", getVersion(verExc.NewVersion) );
+        s.SearchAndReplaceAllAscii( "$DEPLOYED", getVersion(verExc.Deployed) );
+        box.SetMessText(s);
+        bApprove = box.Execute() == RET_OK;
+    }
+
+    return bApprove;
+}
+
+} // end of extern "C"
diff --git a/desktop/source/deployment/gui/dp_gui_service.cxx b/desktop/source/deployment/gui/dp_gui_service.cxx
index 25c4be2..4240093 100644
--- a/desktop/source/deployment/gui/dp_gui_service.cxx
+++ b/desktop/source/deployment/gui/dp_gui_service.cxx
@@ -27,6 +27,7 @@
 #include "dp_gui_shared.hxx"
 #include "dp_gui.h"
 #include "dp_gui_theextmgr.hxx"
+#include "dp_gui_api.hxx"
 #include "cppuhelper/implbase2.hxx"
 #include "cppuhelper/implementationentry.hxx"
 #include "unotools/configmgr.hxx"
@@ -44,6 +45,7 @@
 #include "dp_gui_dialog2.hxx"
 #include "dp_gui_extensioncmdqueue.hxx"
 
+
 using namespace ::dp_misc;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -346,12 +348,14 @@ sdecl::ServiceDecl const updateDecl(
 
 extern "C" {
 
+DESKTOP_DEPLOYMENTGUI_DLLPUBLIC
 void SAL_CALL component_getImplementationEnvironment(
     const sal_Char ** ppEnvTypeName, uno_Environment ** )
 {
     *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
 }
 
+DESKTOP_DEPLOYMENTGUI_DLLPUBLIC
 void * SAL_CALL component_getFactory(
     sal_Char const * pImplName,
     lang::XMultiServiceFactory * pServiceManager,
diff --git a/desktop/source/deployment/gui/makefile.mk b/desktop/source/deployment/gui/makefile.mk
index 3881b55..2cda839 100644
--- a/desktop/source/deployment/gui/makefile.mk
+++ b/desktop/source/deployment/gui/makefile.mk
@@ -27,16 +27,20 @@ PRJNAME = desktop
 TARGET = deploymentgui
 ENABLE_EXCEPTIONS = TRUE
 USE_DEFFILE = TRUE
-NO_BSYMBOLIC = TRUE
+#NO_BSYMBOLIC = TRUE
+VISIBILITY_HIDDEN=TRUE
 USE_PCH :=
 ENABLE_PCH :=
 PRJINC:=..$/..
 
 .INCLUDE : settings.mk
 .INCLUDE : $(PRJ)$/source$/deployment$/inc$/dp_misc.mk
-DLLPRE =
+#DLLPRE =
 
-SLOFILES = \
+# Reduction of exported symbols:
+CDEFS += -DDESKTOP_DEPLOYMENTGUI_DLLIMPLEMENTATION
+
+SHL1OBJS = \
         $(SLO)$/dp_gui_service.obj \
         $(SLO)$/dp_gui_extlistbox.obj \
         $(SLO)$/dp_gui_dialog2.obj \
@@ -49,16 +53,17 @@ SLOFILES = \
         $(SLO)$/dp_gui_autoscrolledit.obj \
         $(SLO)$/dp_gui_system.obj \
         $(SLO)$/dp_gui_extensioncmdqueue.obj \
+        $(SLO)$/dp_gui_handleversionexception.obj \
         $(SLO)$/descedit.obj
 
-SHL1OBJS = $(SLO)$/dp_gui_extensioncmdqueue.obj
+SLOFILES = $(SHL1OBJS)
 
 .IF "$(GUI)"=="OS2"
 SHL1TARGET = deplgui$(DLLPOSTFIX)
 .ELSE
 SHL1TARGET = $(TARGET)$(DLLPOSTFIX).uno
 .ENDIF
-SHL1VERSIONMAP = $(SOLARENV)/src/component.map
+SHL1VERSIONMAP = $(TARGET).map
 
 SHL1STDLIBS = \
         $(SALLIB) \
@@ -82,7 +87,6 @@ SHL1STDLIBS = \
 
 SHL1DEPN =
 SHL1IMPLIB = i$(TARGET)
-SHL1LIBS = $(SLB)$/$(TARGET).lib
 SHL1DEF = $(MISC)$/$(SHL1TARGET).def
 
 DEF1NAME = $(SHL1TARGET)
diff --git a/desktop/source/deployment/inc/dp_gui.mk b/desktop/source/deployment/inc/dp_gui.mk
index 0ff81b3..23414c0 100755
--- a/desktop/source/deployment/inc/dp_gui.mk
+++ b/desktop/source/deployment/inc/dp_gui.mk
@@ -27,12 +27,12 @@
 # some C++ functionality:
 .IF "$(OS)" == "WNT"
 .IF "$(COM)" == "GCC"
-DEPLOYMENTGUILIB = -ldeploymentgui$(DLLPOSTFIX)
+DEPLOYMENTGUILIB = -ldeploymentgui$(DLLPOSTFIX).uno
 .ELSE
-DEPLOYMENTGUILIB = ideploymentgui$(DLLPOSTFIX).lib
+DEPLOYMENTGUILIB = ideploymentgui$(DLLPOSTFIX).uno.lib
 .ENDIF
 .ELIF "$(OS)" == "OS2"
 DEPLOYMENTGUILIB = -ldeplgui
 .ELSE
-DEPLOYMENTGUILIB = -ldeploymentgui$(DLLPOSTFIX)
+DEPLOYMENTGUILIB = -ldeploymentgui$(DLLPOSTFIX).uno
 .ENDIF
diff --git a/desktop/source/inc/dp_gui_api.hxx b/desktop/source/inc/dp_gui_api.hxx
new file mode 100644
index 0000000..46695ce
--- /dev/null
+++ b/desktop/source/inc/dp_gui_api.hxx
@@ -0,0 +1,36 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+
+
+#ifndef INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_INC_DP_GUI_API_HXX
+#define INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_INC_DP_GUI_API_HXX
+
+#include "sal/config.h"
+#include "sal/types.h"
+
+#if defined DESKTOP_DEPLOYMENTGUI_DLLIMPLEMENTATION
+#define DESKTOP_DEPLOYMENTGUI_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#else
+#define DESKTOP_DEPLOYMENTGUI_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#endif
+
+#endif
diff --git a/desktop/source/inc/dp_gui_handleversionexception.hxx b/desktop/source/inc/dp_gui_handleversionexception.hxx
index d2b0eb3..32272aa 100755
--- a/desktop/source/inc/dp_gui_handleversionexception.hxx
+++ b/desktop/source/inc/dp_gui_handleversionexception.hxx
@@ -19,22 +19,21 @@
  *
  *************************************************************/
 
-
-
 #ifndef INCLUDED_DP_GUI_HANDLEVERSIONEXCEPTION_HXX
 #define INCLUDED_DP_GUI_HANDLEVERSIONEXCEPTION_HXX
 
-#include "sal/config.h"
-#include "sal/types.h"
+#include "dp_gui_api.hxx"
 #include "com/sun/star/deployment/VersionException.hpp"
 
-namespace dp_gui {
+namespace dp_gui{ class DialogHelper; }
+
 
-    class DialogHelper;
+extern "C" {
 
-    SAL_DLLPUBLIC_EXPORT bool handleVersionException(
-            com::sun::star::deployment::VersionException verExc,
-            DialogHelper* pDialogHelper = 0 );
+    DESKTOP_DEPLOYMENTGUI_DLLPUBLIC
+    bool handleVersionException(
+        com::sun::star::deployment::VersionException verExc,
+        dp_gui::DialogHelper* pDialogHelper = 0 );
 }
 
 #endif
diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx b/desktop/source/migration/services/oo3extensionmigration.cxx
index b4d987e..53caeda 100644
--- a/desktop/source/migration/services/oo3extensionmigration.cxx
+++ b/desktop/source/migration/services/oo3extensionmigration.cxx
@@ -49,6 +49,8 @@
 #include <com/sun/star/deployment/VersionException.hpp>
 #include <dp_gui_handleversionexception.hxx>
 
+#include "com/sun/star/deployment/VersionException.hpp"
+
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 
@@ -524,7 +526,7 @@ void TmpRepositoryCommandEnv::handle(
     if ( xRequest->getRequest() >>= verExc )
     {
         // user interaction, if an extension is already been installed.
-        approve = dp_gui::handleVersionException( verExc );
+        approve = handleVersionException( verExc );
         abort = !approve;
     }
 
diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp
index c5ea844..24e85cc 100644
--- a/scp2/source/ooo/file_library_ooo.scp
+++ b/scp2/source/ooo/file_library_ooo.scp
@@ -1138,6 +1138,13 @@ File gid_File_Lib_Deployment
     PACKED_LIB_FILE_BODY;
 End
 
+#ifdef OS2
+STD_LIB_FILE(gid_File_Lib_DeploymentGui, deplgui)
+#else
+STD_LIB_FILE(gid_File_Lib_DeploymentGui, deploymentgui.uno)
+#endif
+
+/*
 File gid_File_Lib_DeploymentGui
 #if defined UNX
     Name = STRING(CONCAT4(deploymentgui,DLLPOSTFIX,.uno,UNXSUFFIX));
@@ -1148,6 +1155,7 @@ File gid_File_Lib_DeploymentGui
 #endif
     PACKED_LIB_FILE_BODY;
 End
+*/
 
 #ifdef OS2
 STD_LIB_FILE(gid_File_Lib_DeploymentMisc, deplmisc)
commit d70e1e8ea81a942875f91fdef75d3e39fba42eff
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date:   Wed Jun 19 14:18:36 2013 +0000

    120023: RTF export: consider certain special copy-and-paste scenarios

diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 7f57bc3..5a0b344 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -408,8 +408,21 @@ void RtfExport::WriteStyles()
 void RtfExport::WriteMainText()
 {
     OSL_TRACE("%s start", OSL_THIS_FUNC);
-    pCurPam->GetPoint()->nNode = pDoc->GetNodes().GetEndOfContent().StartOfSectionNode()->GetIndex();
+
+    SwTableNode* pTableNode = pCurPam->GetNode()->FindTableNode();
+    if ( m_pWriter && m_pWriter->bWriteOnlyFirstTable
+         && pTableNode != 0 )
+    {
+        pCurPam->GetPoint()->nNode = *pTableNode;
+        pCurPam->GetMark()->nNode = *(pTableNode->EndOfSectionNode());
+    }
+    else
+    {
+        pCurPam->GetPoint()->nNode = pDoc->GetNodes().GetEndOfContent().StartOfSectionNode()->GetIndex();
+    }
+
     WriteText();
+
     OSL_TRACE("%s end", OSL_THIS_FUNC);
 }
 


More information about the Libreoffice-commits mailing list