[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - sw/source

2015-03-16 Thread László Németh
 sw/source/core/frmedt/fecopy.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit f42608ecab31dc3d626a7b30a779b6591b1f7dd6
Author: László Németh laszlo.nem...@collabora.com
Date:   Mon Mar 16 11:04:46 2015 +0100

fdo#37156 insert table copy as nested table in non-starting cell position

Cherry-picked from 7600a2942ce2b9dac66836105bed6620d55abec2

Change-Id: I7584ed179e92abcb10ef0e3a7e4e0d30d24f86bf

diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index 8c5b6b9..5bac3ab 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -824,7 +824,12 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool 
bIncludingPageFrames )
 FOREACHPAM_START(GetCrsr())
 
 if( pSrcNd 
-0 != ( pDestNd = GetDoc()-IsIdxInTbl( PCURCRSR-GetPoint()-nNode 
)))
+0 != ( pDestNd = GetDoc()-IsIdxInTbl( PCURCRSR-GetPoint()-nNode 
)) 
+// are we at the beginning of the cell? (if not, we will insert a 
nested table)
+// first paragraph of the cell?
+PCURCRSR-GetNode().GetIndex() == 
PCURCRSR-GetNode().FindTableBoxStartNode()-GetIndex()+1 
+// beginning of the paragraph?
+!PCURCRSR-GetPoint()-nContent.GetIndex())
 {
 SwPosition aDestPos( *PCURCRSR-GetPoint() );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - sw/source

2015-03-16 Thread Miklos Vajna
 sw/source/core/frmedt/fecopy.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b34f1f81d8e0af327d1c60fc300cbfc7a09fb389
Author: Miklos Vajna vmik...@collabora.co.uk
Date:   Mon Mar 16 18:00:05 2015 +0100

sw: fix build

Change-Id: I0b16abb2ba6cbc24059e8409669b16a11588915b

diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index 5bac3ab..d9c27dc 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -827,7 +827,7 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool 
bIncludingPageFrames )
 0 != ( pDestNd = GetDoc()-IsIdxInTbl( PCURCRSR-GetPoint()-nNode 
)) 
 // are we at the beginning of the cell? (if not, we will insert a 
nested table)
 // first paragraph of the cell?
-PCURCRSR-GetNode().GetIndex() == 
PCURCRSR-GetNode().FindTableBoxStartNode()-GetIndex()+1 
+PCURCRSR-GetNode()-GetIndex() == 
PCURCRSR-GetNode()-FindTableBoxStartNode()-GetIndex()+1 
 // beginning of the paragraph?
 !PCURCRSR-GetPoint()-nContent.GetIndex())
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - sw/source

2015-01-27 Thread Caolán McNamara
 sw/source/filter/html/wrthtml.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit f609239187e73059b63f9f5121b8ff5448311f62
Author: Caolán McNamara caol...@redhat.com
Date:   Sun Jan 25 14:12:22 2015 +

coverity#1266508 Useless call (gold)

regression from

commit 832e5aadbff006ec24959162c29756fe2b1982be
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Oct 8 10:06:59 2013 +0100
Related: fdo#38838 remove UniString::SearchAndReplaceAll

(cherry picked from commit 6cde3ff3dd646f51f37f2342863371db8de9087a)

Conflicts:
sw/source/filter/html/wrthtml.cxx

Change-Id: If792925eddc9c640584a2e8fa313a4297a32c74c
Reviewed-on: https://gerrit.libreoffice.org/14172
Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com
Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com

diff --git a/sw/source/filter/html/wrthtml.cxx 
b/sw/source/filter/html/wrthtml.cxx
index 796dbe0..4d28937 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -1068,8 +1068,7 @@ void SwHTMLWriter::OutImplicitMark( const OUString rMark,
 {
 if( !rMark.isEmpty()  !aImplicitMarks.empty() )
 {
-OUString sMark( rMark );
-sMark + OUString(cMarkSeparator) + 
OUString::createFromAscii(pMarkType);
+OUString sMark(rMark + OUString(cMarkSeparator) + 
OUString::createFromAscii(pMarkType));
 if( 0 != aImplicitMarks.erase( sMark ) )
 {
 OutAnchor(sMark.replace('?', '_')); // '?' causes problems in 
IE/Netscape 5
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - sw/source

2015-01-05 Thread Caolán McNamara
 sw/source/filter/ascii/parasc.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit ba5d09072c4e9c103f6af3c44e689bc6c93e0477
Author: Caolán McNamara caol...@redhat.com
Date:   Mon Jan 5 15:49:47 2015 +

valgrind: uninitialized read

on loading id:000386,src:00,op:havoc,rep:128.jpg as text

Change-Id: I98364ffbcc4ea788613cc8071c4d8774ba167033
(cherry picked from commit 0b39d560da27ece227830a4bcc5556ae902a0921)
Reviewed-on: https://gerrit.libreoffice.org/13744
Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com
Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com

diff --git a/sw/source/filter/ascii/parasc.cxx 
b/sw/source/filter/ascii/parasc.cxx
index ddc6855..11c7f2e 100644
--- a/sw/source/filter/ascii/parasc.cxx
+++ b/sw/source/filter/ascii/parasc.cxx
@@ -324,6 +324,7 @@ sal_uLong SwASCIIParser::ReadChars()
 sal_Size nNewLen = lGCount, nCntBytes;
 aWork.reset(new sal_Unicode[nNewLen + 1]); // add 1 for '\0'
 sal_Unicode* pBuf = aWork.get();
+pBuf[nNewLen] = 0; // ensure '\0'
 
 nNewLen = rtl_convertTextToUnicode( hConverter, hContext,
 pArr, lGCount, pBuf, nNewLen,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - sw/source

2014-12-11 Thread Luboš Luňák
 sw/source/core/undo/undobj.cxx |   10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 759658efd1c68fe919d33528497ecb6725343057
Author: Luboš Luňák l.lu...@collabora.com
Date:   Mon Dec 1 12:58:47 2014 +0100

do not save UNO marks in undo history

These are usually very short-lived marks that are used for various
internal purposes or by UNO interfaces, so restoring them from undo history
does not make any sense. It can in fact lead to a crash on undo if the mark 
has
been already deleted (which is usually the case with UNO marks) but
the restoring still refers to it (this is not a problem with other mark 
types
since those should be deleted only when they are no longer in the document,
in which case they are saved in undo history by content positions rather 
than
mark references).

Change-Id: Id707dc3d2b888b5c96a974d04a0ef17b22fc024c

diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index f552dc9..afa472c 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -784,10 +784,12 @@ void SwUndoSaveCntnt::DelCntntIndex( const SwPosition 
rMark,
 
 if ( bSavePos || bSaveOtherPos )
 {
-if( !pHistory )
-pHistory = new SwHistory;
-
-pHistory-Add( *pBkmk, bSavePos, bSaveOtherPos );
+if( IDocumentMarkAccess::GetType(*pBkmk) != 
IDocumentMarkAccess::UNO_BOOKMARK )
+{
+if( !pHistory )
+pHistory = new SwHistory;
+pHistory-Add( *pBkmk, bSavePos, bSaveOtherPos );
+}
 if ( bSavePos
   ( bSaveOtherPos
   || !pBkmk-IsExpanded() ) )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - sw/source

2014-10-12 Thread Jan-Marek Glogowski
 sw/source/ui/shells/basesh.cxx |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 074b76e612e45d5a6e1c08847d834b4143dcf96c
Author: Jan-Marek Glogowski glo...@fbihome.de
Date:   Thu Aug 7 15:18:19 2014 +0200

fdo#76565 Allow pasting into input fields

Reviewed-on: https://gerrit.libreoffice.org/10835
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com
(cherry picked from commit 3f26ab24e0bfd27645c97ff7915fba2db409930a)

Conflicts:

sw/source/uibase/shells/basesh.cxx

Change-Id: If996284aeea4b430cceaaf264035aa9e4ec0f2f0
Reviewed-on: https://gerrit.libreoffice.org/11780
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx
index b5de5fe..e88731d 100644
--- a/sw/source/ui/shells/basesh.cxx
+++ b/sw/source/ui/shells/basesh.cxx
@@ -267,8 +267,7 @@ void SwBaseShell::ExecClpbrd(SfxRequest rReq)
 TransferableDataHelper aDataHelper(
 TransferableDataHelper::CreateFromSystemClipboard( 
rSh.GetView().GetEditWin() ) );
 if( aDataHelper.GetXTransferable().is()
- SwTransferable::IsPaste( rSh, aDataHelper )
- !rSh.CrsrInsideInputFld() )
+ SwTransferable::IsPaste( rSh, aDataHelper ) )
 {
 // Temporary variables, because the shell could already be
 // destroyed after the paste.
@@ -418,8 +417,7 @@ void SwBaseShell::StateClpbrd(SfxItemSet rSet)
 break;
 
 case SID_PASTE:
-if( !GetView().IsPasteAllowed()
-|| rSh.CrsrInsideInputFld() )
+if( !GetView().IsPasteAllowed() )
 {
 rSet.DisableItem( nWhich );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - sw/source

2014-07-22 Thread Zolnai Tamás
 sw/source/core/layout/paintfrm.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit b2f8d4bf169b97c0022bb2a2331466c17662bad8
Author: Zolnai Tamás tamas.zol...@collabora.com
Date:   Tue Jul 22 14:01:40 2014 +0200

fdo#79221: Wrong rendering of bottom and right character border

Regression from 2cd1673f41cb5bd8502a9a48a5721244660fe3a0.

SetMirrorWidths() works only when there are two lines
(double border), but breaks one line borders.

Change-Id: I2727afbc071bb4038c6cef18e6b96c796ef3a8b9
(cherry picked from commit bdbf6cee5a3a012412699dba103b9f6430084722)

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index 3e4ed87..3098638 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -5080,7 +5080,8 @@ void PaintCharacterBorder(
 
 if( aBottomBorder )
 {
-aBottomBorder-SetMirrorWidths(true);
+if( aBottomBorder-isDouble() )
+aBottomBorder-SetMirrorWidths(true);
 
 Point aLeftTop(
 aAlignedRect.Left(),
@@ -5118,7 +5119,8 @@ void PaintCharacterBorder(
 
 if( aRightBorder )
 {
-aRightBorder-SetMirrorWidths(true);
+if( aRightBorder-isDouble() )
+aRightBorder-SetMirrorWidths(true);
 
 Point aLeftTop(
 aAlignedRect.Right() - aRightBorder.get().GetScaledWidth(),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - sw/source

2014-06-25 Thread Luboš Luňák
 sw/source/ui/dbui/dbmgr.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit d69c8d1151ceb8e4c7cf650efd36a2b10058c4d2
Author: Luboš Luňák l.lu...@collabora.com
Date:   Wed Jun 25 15:20:55 2014 +0200

MSWord uses \xb for linebreaks in DB fields, take 2 (bnc#878854)

This commit also does the conversion when reading the data from a data 
source
using the mail merge wizard.

(cherry picked from commit 076e4afc61b216e34959bd4e3701f1fa19972d5c)

Conflicts:
sw/source/uibase/dbui/dbmgr.cxx

Change-Id: Ia14417507b6ddce955fec26142a42ce51f77de4e

diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index c1ab684..f587f78 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -1674,6 +1674,7 @@ OUString 
SwNewDBMgr::GetDBField(uno::ReferenceXPropertySet xColumnProps,
 try
 {
 sRet = xColumn-getString();
+sRet = sRet.replace( '\xb', '\n' ); // MSWord uses \xb as a 
newline
 }
 catch(const SQLException)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - sw/source

2014-06-18 Thread Luboš Luňák
 sw/source/core/access/accpara.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit a4d05b95bd65ed2374a20ebf2a86a16d21a20a94
Author: Luboš Luňák l.lu...@collabora.com
Date:   Wed Jun 18 12:36:26 2014 +0200

add missing code from 0761f816

This couldn't be merged into cp-4.2 by the time I did the print-comments
backport because the IAccessible2 backport wasn't complete yet.

Change-Id: I9d8d041194fae6742393cd3252de0307b0171b82

diff --git a/sw/source/core/access/accpara.cxx 
b/sw/source/core/access/accpara.cxx
index 1fca127..b4baca3 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -1578,12 +1578,16 @@ OUString 
SwAccessibleParagraph::GetFieldTypeNameAtIndex(sal_Int32 nIndex)
 for( sal_uInt16 i = 0; i  nSize; ++i )
 {
 const SwTxtAttr* pHt = (*pSwpHints)[i];
-if (pHt-Which() == RES_TXTATR_FIELD  (nFldIndex-- == 0))
+if ( ( pHt-Which() == RES_TXTATR_FIELD
+   || pHt-Which() == RES_TXTATR_ANNOTATION
+   || pHt-Which() == RES_TXTATR_INPUTFIELD )
+  (nFldIndex-- == 0))
 {
 pTxtFld = (SwTxtFld *)pHt;
 break;
 }
-else if (pHt-Which() == RES_TXTATR_REFMARK  (nFldIndex-- == 
0))
+else if (pHt-Which() == RES_TXTATR_REFMARK
+  (nFldIndex-- == 0))
 strTypeName = set reference;
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits