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

2019-08-22 Thread Andras Timar (via logerrit)
 sw/source/filter/ww8/ww8par.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d8458569709e5bf5a05630b735f6e6d4b9b135ff
Author: Andras Timar 
AuthorDate: Thu Aug 22 16:32:18 2019 +0200
Commit: Andras Timar 
CommitDate: Thu Aug 22 16:32:18 2019 +0200

build fix

Change-Id: Iecb4be601fe1cb4d3774795be66a1a0f8c33ca3b

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index afdacbdcb732..b304a40367af 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -5490,8 +5490,8 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss)
 
 UpdateFields();
 
-m_xWFlyPara.reset();
-m_xSFlyPara.reset();
+DELETEZ(m_pWFlyPara);
+DELETEZ(m_pSFlyPara);
 
 // delete the pam before the call for hide all redlines (Bug 73683)
 if (m_bNewDoc)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-06-19 Thread Andras Timar (via logerrit)
 sw/source/uibase/dbui/dbmgr.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 11bb62dfc3188a2b4e61f8d1e3d246898579dbf8
Author: Andras Timar 
AuthorDate: Wed Jun 19 07:34:27 2019 -0400
Commit: Andras Timar 
CommitDate: Wed Jun 19 07:34:27 2019 -0400

build fix

Change-Id: I934967b97c327349ac60c828f39192ec19fe4837

diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 70bcfd9a8a87..c89f8eb9a6e3 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -1383,7 +1383,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
 INetURLObject aEntry( sPrefix );
 sLeading = aEntry.GetBase();
 aEntry.removeSegment();
-sPrefix = aEntry.GetMainURL( 
INetURLObject::DecodeMechanism::NONE );
+sPrefix = aEntry.GetMainURL( 
INetURLObject::DecodeMechanism::NO_DECODE );
 }
 
 OUString 
sExt(comphelper::string::stripStart(pStoreToFilter->GetDefaultExtension(), 
'*'));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2018-05-29 Thread Mike Kaganski
 sw/source/uibase/app/apphdl.cxx |   14 ++
 1 file changed, 14 insertions(+)

New commits:
commit ff8fdd1133403050182b18cccec5fe461cf0b0c3
Author: Mike Kaganski 
Date:   Sat May 26 14:23:13 2018 +0300

tdf#117817: Update Mail Merge controls after wizard completes

Otherwise they may stay disabled until cursor position changes.

Change-Id: If734bbd4793b3b01c64601d68126d5752f5aba0c
Reviewed-on: https://gerrit.libreoffice.org/54841
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 
(cherry picked from commit f304ae0ca4738fa3605587146224ee8972a894f3)
Reviewed-on: https://gerrit.libreoffice.org/54983

diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 619c202a6039..d9b3f45ae62a 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -497,6 +497,20 @@ void SwMailMergeWizardExecutor::ExecutionFinished()
 pDbManager->CommitLastRegistrations();
 }
 
+// Update Mail Merge controls
+const sal_uInt16 slotIds[] = { FN_MAILMERGE_FIRST_ENTRY,
+   FN_MAILMERGE_PREV_ENTRY,
+   FN_MAILMERGE_NEXT_ENTRY,
+   FN_MAILMERGE_LAST_ENTRY,
+   FN_MAILMERGE_CURRENT_ENTRY,
+   FN_MAILMERGE_EXCLUDE_ENTRY,
+   FN_MAILMERGE_CREATE_DOCUMENTS,
+   FN_MAILMERGE_SAVE_DOCUMENTS,
+   FN_MAILMERGE_PRINT_DOCUMENTS,
+   FN_MAILMERGE_EMAIL_DOCUMENTS,
+   0 };
+m_pView->GetViewFrame()->GetBindings().Invalidate(slotIds);
+
 // release/destroy asynchronously
 Application::PostUserEvent( LINK( this, SwMailMergeWizardExecutor, 
DestroyDialogHdl ) );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-05-29 Thread Mike Kaganski
 sw/source/uibase/app/appenv.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4f0fee308da574634cd9f9181cc8dda2afdf73b3
Author: Mike Kaganski 
Date:   Fri May 25 14:58:11 2018 +0300

tdf#35798: use separate paragraphs for Label elements

Since commit db04be037b611e296ef9f2542322c52ed82d7a2b, empty Database
fields are hidden. But since Labels wizard generates a single paragraph
with line breaks for the label's text, the hiding feature cannot be
used efficiently.

Let the individual lines be in individual paragraphs.

Change-Id: I27430d54baea88461c2ea9de38baa95d6b7e9e62
Reviewed-on: https://gerrit.libreoffice.org/54800
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 
(cherry picked from commit 2f11ce0670749b9da20dfb29269b176cb09fb01e)
Reviewed-on: https://gerrit.libreoffice.org/54960
Tested-by: Mike Kaganski 

diff --git a/sw/source/uibase/app/appenv.cxx b/sw/source/uibase/app/appenv.cxx
index 286ddc49ed42..b33f62c60bd3 100644
--- a/sw/source/uibase/app/appenv.cxx
+++ b/sw/source/uibase/app/appenv.cxx
@@ -125,7 +125,7 @@ OUString InsertLabEnvText( SwWrtShell& rSh, SwFieldMgr& 
rFieldMgr, const OUStrin
 if ( !bField )
 rSh.Insert( sTmpText );
 }
-rSh.InsertLineBreak();
+rSh.SplitNode();
 }
 rSh.DelLeft();  // Again remove last linebreak
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-05-07 Thread Aron Budea
 sw/source/filter/xml/xmltexti.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0ce99cc35ea5115571347519b415742c671807ae
Author: Aron Budea 
Date:   Mon May 7 21:42:55 2018 +0200

Fix build

Change-Id: Iefff37c32dadf7d22a5495ba9701d4636588d027

diff --git a/sw/source/filter/xml/xmltexti.cxx 
b/sw/source/filter/xml/xmltexti.cxx
index aa2c7fd5fe79..83d773418198 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -575,7 +575,7 @@ uno::Reference< XPropertySet > 
SwXMLTextImportHelper::createAndInsertOOoLink(
 
 uno::Sequence< beans::PropertyValue > aMediaDescriptor( 1 );
 aMediaDescriptor[0].Name = "URL";
-aMediaDescriptor[0].Value <<= aURLObj.GetMainURL( 
INetURLObject::NO_DECODE )
+aMediaDescriptor[0].Value <<= aURLObj.GetMainURL( 
INetURLObject::NO_DECODE );
 
 if (SfxMedium* pMedium = pDoc->GetDocShell() ? 
pDoc->GetDocShell()->GetMedium() : nullptr)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-05-04 Thread Caolán McNamara
 sw/source/filter/xml/xmltexti.cxx |   13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

New commits:
commit 1bb74bc5410af8773c9ba815fc30252bc99c6791
Author: Caolán McNamara 
Date:   Tue May 1 12:57:02 2018 +0100

set Referer on link mediadescriptor

to allow determining if the source document is from a trusted/untrusted
location

Reviewed-on: https://gerrit.libreoffice.org/53693
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 
(cherry picked from commit cd25a97bbadc0a5c1fd6b0e8603c8b6ebd051926)

Reviewed-on: https://gerrit.libreoffice.org/53803
Reviewed-by: Miklos Vajna 
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 
(cherry picked from commit 2d87c267267530077a94c894bc619831b01d1c04)

Change-Id: I780568652d2ef0cc8543c27ba26289277b5d9d0c

diff --git a/sw/source/filter/xml/xmltexti.cxx 
b/sw/source/filter/xml/xmltexti.cxx
index 06a6bbe6aeb3..aa2c7fd5fe79 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -575,17 +575,22 @@ uno::Reference< XPropertySet > 
SwXMLTextImportHelper::createAndInsertOOoLink(
 
 uno::Sequence< beans::PropertyValue > aMediaDescriptor( 1 );
 aMediaDescriptor[0].Name = "URL";
-aMediaDescriptor[0].Value <<= OUString( aURLObj.GetMainURL( 
INetURLObject::NO_DECODE ) );
-if ( pDoc->GetDocShell() && pDoc->GetDocShell()->GetMedium() )
+aMediaDescriptor[0].Value <<= aURLObj.GetMainURL( 
INetURLObject::NO_DECODE )
+
+if (SfxMedium* pMedium = pDoc->GetDocShell() ? 
pDoc->GetDocShell()->GetMedium() : nullptr)
 {
-uno::Reference< task::XInteractionHandler > xInteraction =
-
pDoc->GetDocShell()->GetMedium()->GetInteractionHandler();
+uno::Reference< task::XInteractionHandler > xInteraction = 
pMedium->GetInteractionHandler();
 if ( xInteraction.is() )
 {
 aMediaDescriptor.realloc( 2 );
 aMediaDescriptor[1].Name = "InteractionHandler";
 aMediaDescriptor[1].Value <<= xInteraction;
 }
+
+const auto nLen = aMediaDescriptor.getLength() + 1;
+aMediaDescriptor.realloc(nLen);
+aMediaDescriptor[nLen - 1].Name = "Referer";
+aMediaDescriptor[nLen - 1].Value <<= pMedium->GetName();
 }
 
 uno::Reference < embed::XEmbeddedObject > xObj(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-02-06 Thread Tamás Zolnai
 sw/source/filter/ascii/parasc.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit cfb68bab5fdbcfbb9370cf59cc3c1d5acd6f9737
Author: Tamás Zolnai 
Date:   Thu Jan 18 13:57:22 2018 +0100

tdf#115088: Pasting multi-line text from external source behaves strangely

Regression from:
e68b6e349c31ac1376e90218013e1e7612f2b522

AppendTextNode might be sufficient for import (when there is no
content in the document), but for clipboard operations better to
use the original SplitNode method.

Change-Id: I7de3e9bc9c5356acb0b4cc43927a0d39079522b2
Reviewed-on: https://gerrit.libreoffice.org/48124
Tested-by: Jenkins 
Reviewed-by: Tamás Zolnai 
(cherry picked from commit 657da4697379274295e9fd32d3abc1334ebd50d2)
Reviewed-on: https://gerrit.libreoffice.org/48204
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 
(cherry picked from commit c163db958f0e105b8d37eaef6388a4f89c57d251)
Reviewed-on: https://gerrit.libreoffice.org/49301
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/sw/source/filter/ascii/parasc.cxx 
b/sw/source/filter/ascii/parasc.cxx
index e3045b0edee8..bd9af08c3cb7 100644
--- a/sw/source/filter/ascii/parasc.cxx
+++ b/sw/source/filter/ascii/parasc.cxx
@@ -481,7 +481,10 @@ sal_uLong SwASCIIParser::ReadChars()
 {
 // We found a CR/LF, thus save the text
 InsertText( OUString( pLastStt ));
-pDoc->getIDocumentContentOperations().AppendTextNode( 
*pPam->GetPoint() );
+if(bNewDoc)
+pDoc->getIDocumentContentOperations().AppendTextNode( 
*pPam->GetPoint() );
+else
+pDoc->getIDocumentContentOperations().SplitNode( 
*pPam->GetPoint(), false );
 pLastStt = pStt;
 nLineLen = 0;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-19 Thread Eike Rathke
 sw/source/core/table/swtable.cxx |   27 +--
 1 file changed, 25 insertions(+), 2 deletions(-)

New commits:
commit e20c9723e278263c6c38603b89021941cceb92ad
Author: Eike Rathke 
Date:   Fri Dec 1 19:46:45 2017 +0100

Resolves: tdf#106322 keep original cell content when assigning number format

... and content can't be parsed as number. Instead of converting 0.

Change-Id: Ief0c0a0284762fc0e801d6cc598720a97d733e31
(cherry picked from commit acf7e4c0a3dc0cca986bf4d4b7a65bafe7e70abc)
Reviewed-on: https://gerrit.libreoffice.org/45695
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 
(cherry picked from commit fd2cdd325cd59eb1f967136170503145b1d75936)
(cherry picked from commit f7d3af010bb36f4a1fdf8a936d9d60af14feb38e)

diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index f77c8a14d305..f4f32acdef75 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -2251,6 +2251,8 @@ void SwTableBoxFormat::Modify( const SfxPoolItem* pOld, 
const SfxPoolItem* pNew
 
 if( (!bNewIsTextFormat && nOldFormat != nNewFormat) || 
pNewFormula )
 {
+bool bIsNumFormat = false;
+OUString aOrigText;
 bool bChgText = true;
 double fVal = 0;
 if( !pNewVal && SfxItemState::SET != GetItemState(
@@ -2263,6 +2265,7 @@ void SwTableBoxFormat::Modify( const SfxPoolItem* pOld, 
const SfxPoolItem* pNew
 sal_uInt32 nTmpFormatIdx = nNewFormat;
 OUString aText( GetDoc()->GetNodes()[ nNdPos ]
 
->GetTextNode()->GetRedlineText());
+aOrigText = aText;
 if( aText.isEmpty() )
 bChgText = false;
 else
@@ -2272,7 +2275,6 @@ void SwTableBoxFormat::Modify( const SfxPoolItem* pOld, 
const SfxPoolItem* pNew
 
 // JP 22.04.98: Bug 49659 -
 //  Special casing for percent
-bool bIsNumFormat = false;
 if( css::util::NumberFormat::PERCENT ==
 pNumFormatr->GetType( nNewFormat ))
 {
@@ -2305,7 +2307,10 @@ void SwTableBoxFormat::Modify( const SfxPoolItem* pOld, 
const SfxPoolItem* pNew
 }
 }
 else
+{
 fVal = pNewVal->GetValue();
+bIsNumFormat = true;
+}
 
 // format contents with the new value assigned and 
write to paragraph
 Color* pCol = nullptr;
@@ -2316,7 +2321,25 @@ void SwTableBoxFormat::Modify( const SfxPoolItem* pOld, 
const SfxPoolItem* pNew
 }
 else
 {
-pNumFormatr->GetOutputString( fVal, nNewFormat, 
sNewText,  );
+if (bIsNumFormat)
+pNumFormatr->GetOutputString( fVal, 
nNewFormat, sNewText,  );
+else
+{
+// Original text could not be parsed as
+// number/date/time/..., so keep the text.
+#if 0
+// Actually the text should be formatted
+// according to the format, which may include
+// additional text from the format, for example
+// in {0;-0;"BAD: "@}. But other places when
+// entering a new value or changing text or
+// changing to a different format of type Text
+// don't do this (yet?).
+pNumFormatr->GetOutputString( aOrigText, 
nNewFormat, sNewText,  );
+#else
+sNewText = aOrigText;
+#endif
+}
 
 if( !bChgText )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits