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

Michael Stahl mstahl at redhat.com
Tue Apr 23 06:57:43 PDT 2013


 sw/source/core/txtnode/ndtxt.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit ccb77a732c0d6017062b59ab32c6978d6d8713c5
Author: Michael Stahl <mstahl at redhat.com>
Date:   Tue Apr 23 15:31:38 2013 +0200

    fdo#49076: copy numbering to clipboard only if start of para selected
    
    SwTxtNode::CopyText: If the selection does not include the start of the
    paragraph, copy an empty string to the clipboard, which suppresses
    numbering output in ASCII text format.
    
    Change-Id: Ie467999b4e82e7f5149ffe8bb773aa74ccedcca7

diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index a02f8b3..437cf44 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1469,8 +1469,9 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
     if (pDest->GetDoc()->IsClipBoard() && this->GetNum())
     {
         // #i111677# cache expansion of source (for clipboard)
-        pDest->m_pNumStringCache.reset(
-            new OUString(this->GetNumString()));
+        pDest->m_pNumStringCache.reset( (nTxtStartIdx != 0)
+            ? new OUString // fdo#49076: numbering only if copy from para start
+            : new OUString(this->GetNumString()));
     }
 
     if( !nLen )


More information about the Libreoffice-commits mailing list