[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - 15 commits - basic/source configure.ac connectivity/source sc/inc scripting/source sc/source svl/source svtools/source sw/qa sw/source xmlscript/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sat Oct 20 22:02:17 UTC 2018
basic/source/runtime/dllmgr-x64.cxx | 2
configure.ac | 2
connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx | 2
sc/inc/dbdata.hxx | 3
sc/source/core/tool/dbdata.cxx | 6 -
sc/source/ui/view/gridwin.cxx | 2
scripting/source/pyprov/pythonscript.py | 30 ++++++++
svl/source/numbers/zformat.cxx | 4 -
svtools/source/brwbox/editbrowsebox.cxx | 22 +++++-
sw/qa/extras/rtfexport/data/tdf112520.docx |binary
sw/qa/extras/rtfexport/rtfexport3.cxx | 21 ++++++
sw/qa/extras/ww8export/data/fdo53985.doc |binary
sw/qa/extras/ww8export/data/tdf37778_readonlySection.doc |binary
sw/qa/extras/ww8export/ww8export3.cxx | 34 ++++++++++
sw/source/filter/ww8/rtfsdrexport.cxx | 12 ++-
sw/source/filter/ww8/rtfsdrexport.hxx | 2
sw/source/filter/ww8/wrtw8sty.cxx | 4 -
sw/source/filter/ww8/wrtww8.cxx | 11 ---
sw/source/filter/ww8/ww8par.cxx | 30 ++------
sw/source/uibase/docvw/edtwin2.cxx | 2
xmlscript/source/xmldlg_imexp/xmldlg_export.cxx | 2
21 files changed, 138 insertions(+), 53 deletions(-)
New commits:
commit 3a31948ae3f2fff1a010efe34d1fcd94e4a1829f
Author: Andras Timar <andras.timar at collabora.com>
AuthorDate: Sun Oct 21 00:01:21 2018 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Sun Oct 21 00:01:21 2018 +0200
Bump version to 6.0-13
Change-Id: If4337153f8b0edb424132ab60b50dc5a89ca25ee
diff --git a/configure.ac b/configure.ac
index 07718c3e912e..c71ea1672658 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
# several non-alphanumeric characters, those are split off and used only for the
# ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea.
-AC_INIT([Collabora Office],[6.0.10.12],[],[],[https://collaboraoffice.com/])
+AC_INIT([Collabora Office],[6.0.10.13],[],[],[https://collaboraoffice.com/])
AC_PREREQ([2.59])
commit 0507a1578da0de9cebda999ec4d916d3bc8b290c
Author: Justin Luth <justin.luth at collabora.com>
AuthorDate: Thu Oct 18 09:38:47 2018 +0300
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Sat Oct 20 23:00:44 2018 +0200
sw mso export: PROTECT_FORM shouldn't force section to protected
PROTECT_FORM maps to enforcement = true, not "everything is protected".
"The enforcement of this property is determined by the documentProtection
element (§17.15.1.29), as it is possible to specify protection
without turning it on."
So, sections should retain their protected on/off status
regardless of the value of PROTECT_FORM. My guess was
that this was to offset the fact that DOCX import did not
import protected status, so this helped to protect the
sections that should not be unprotected. A followup
patch will address the import side.
patch initially developed to support tdf#120499.
Change-Id: I8ff6d31711651a4827cbb8520fd68e88273d6799
Reviewed-on: https://gerrit.libreoffice.org/61905
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth at sil.org>
(cherry picked from commit fa667b6dc410f3af57ef436cc117352c829f95e7)
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx
index 84f9e2f2d6cf..d5a888e60dd6 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -63,7 +63,6 @@ DECLARE_WW8EXPORT_TEST(testFdo53985, "fdo53985.doc")
uno::Reference<beans::XPropertySet> xSect(xSections->getByIndex(0), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Section1 is protected", true, getProperty<bool>(xSect, "IsProtected"));
xSect.set(xSections->getByIndex(3), uno::UNO_QUERY);
-if ( !mbExported )
CPPUNIT_ASSERT_EQUAL_MESSAGE("Section4 is protected", false, getProperty<bool>(xSect, "IsProtected"));
}
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 30a8b68d6145..c1eb9f8cdf4c 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -1530,9 +1530,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
AttrOutput().SectFootnoteEndnotePr();
// forms
- bool formProtection = m_pDoc->getIDocumentSettingAccess().get( DocumentSettingId::PROTECT_FORM );
- formProtection |= rSepInfo.IsProtected();
- AttrOutput().SectionFormProtection( formProtection );
+ AttrOutput().SectionFormProtection( rSepInfo.IsProtected() );
// line numbers
const SwLineNumberInfo& rLnNumInfo = m_pDoc->GetLineNumberInfo();
commit 587527b4738e1f99e49959a6ea0de407802e9cb4
Author: Justin Luth <justin.luth at collabora.com>
AuthorDate: Thu Oct 18 21:15:13 2018 +0300
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Sat Oct 20 22:59:22 2018 +0200
NFC ww8 cleanup: remove unused variables, simplify, whitespace
Change-Id: Ib4f100d4019643cde893ef1d8643a5c08b55ff8f
Reviewed-on: https://gerrit.libreoffice.org/61951
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth at sil.org>
(cherry picked from commit 2ec0cf500222aef55d02df80154b47fbb92970c9)
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 374665f56ec8..525d630424cd 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -497,14 +497,9 @@ static void WriteDop( WW8Export& rWrt )
OSL_ENSURE(pDocShell, "no SwDocShell");
uno::Reference<document::XDocumentProperties> xDocProps;
uno::Reference<beans::XPropertySet> xProps;
- if (pDocShell) {
- uno::Reference<lang::XComponent> xModelComp(pDocShell->GetModel(),
- uno::UNO_QUERY);
- xProps.set(xModelComp, uno::UNO_QUERY);
- uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
- xModelComp, uno::UNO_QUERY_THROW);
- xDocProps = xDPS->getDocumentProperties();
- OSL_ENSURE(xDocProps.is(), "DocumentProperties is null");
+ if ( pDocShell )
+ {
+ xProps.set(pDocShell->GetModel(), uno::UNO_QUERY);
rDop.lKeyProtDoc = pDocShell->GetModifyPasswordHash();
}
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index a1dd150e18d3..05bf0966dcac 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1889,22 +1889,14 @@ void SwWW8ImplReader::ImportDop()
// disable form design mode to be able to use imported controls directly
// #i31239# always disable form design mode, not only in protected docs
+ uno::Reference<beans::XPropertySet> xDocProps(m_pDocShell->GetModel(), uno::UNO_QUERY);
+ if (xDocProps.is())
{
- uno::Reference<lang::XComponent> xModelComp(m_pDocShell->GetModel(),
- uno::UNO_QUERY);
- uno::Reference<beans::XPropertySet> xDocProps(xModelComp,
- uno::UNO_QUERY);
- if (xDocProps.is())
+ uno::Reference<beans::XPropertySetInfo> xInfo = xDocProps->getPropertySetInfo();
+ if (xInfo.is())
{
- uno::Reference<beans::XPropertySetInfo> xInfo =
- xDocProps->getPropertySetInfo();
- if (xInfo.is())
- {
- if (xInfo->hasPropertyByName("ApplyFormDesignMode"))
- {
- xDocProps->setPropertyValue("ApplyFormDesignMode", css::uno::makeAny(false));
- }
- }
+ if (xInfo->hasPropertyByName("ApplyFormDesignMode"))
+ xDocProps->setPropertyValue("ApplyFormDesignMode", css::uno::makeAny(false));
}
}
commit 7139f926dd933e9d6cda196fcfe7463c2dd11772
Author: Justin Luth <justin.luth at collabora.com>
AuthorDate: Thu Oct 18 08:47:58 2018 +0300
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Sat Oct 20 22:58:26 2018 +0200
ww8import: always protect document if set
Just because some sections are unprotected doesn't mean that
the document should not open in forms mode. MSWord 2016
opens it in "forms view" mode which also doesn't allow
editing those unrestricted settings. Only when choosing
the "Edit Document" view are the unprotected sections
editable - similar to LO turning off the Compatibility:
Protect Forms flag.
Unfortunately, the "I want to address this" comment
was from 2011, so obviously his temporarly solution
became more permanent that expected.
If this patch now blocks someone from being able to edit a
document (because now only the forms components of the
document are editable) they can remove the forms protection
by going to tools - options - LibreOffice Writer -
compatability - and disable Protect Form.
patch developed to support tdf#120499 and depends on the
patch for tdf#37778.
Change-Id: I86e26095ade6b2cf0ab8ea8fc941a92fa672a2f7
Reviewed-on: https://gerrit.libreoffice.org/61901
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth at sil.org>
(cherry picked from commit 3e2e49074a59abbc9733e0c6e6914f902dd81664)
diff --git a/sw/qa/extras/ww8export/data/fdo53985.doc b/sw/qa/extras/ww8export/data/fdo53985.doc
new file mode 100644
index 000000000000..0c8f278dcf58
Binary files /dev/null and b/sw/qa/extras/ww8export/data/fdo53985.doc differ
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx
index 8d0475975eb4..84f9e2f2d6cf 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -9,6 +9,7 @@
#include <swmodeltestbase.hxx>
+#include <IDocumentSettingAccess.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/text/XTextFramesSupplier.hpp>
@@ -44,6 +45,28 @@ DECLARE_WW8EXPORT_TEST(testTdf37778_readonlySection, "tdf37778_readonlySection.d
CPPUNIT_ASSERT_EQUAL_MESSAGE("Number of Sections", sal_Int32(0), xSections->getCount());
}
+DECLARE_WW8EXPORT_TEST(testFdo53985, "fdo53985.doc")
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), xTables->getCount()); // Only 4 tables were imported.
+
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Compatibility: Protect form", true, pDoc->getIDocumentSettingAccess().get( DocumentSettingId::PROTECT_FORM ) );
+
+ uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), xSections->getCount()); // The first paragraph wasn't counted as a section.
+
+ uno::Reference<beans::XPropertySet> xSect(xSections->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Section1 is protected", true, getProperty<bool>(xSect, "IsProtected"));
+ xSect.set(xSections->getByIndex(3), uno::UNO_QUERY);
+if ( !mbExported )
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Section4 is protected", false, getProperty<bool>(xSect, "IsProtected"));
+}
+
DECLARE_WW8EXPORT_TEST(testTdf120225_textControlCrossRef, "tdf120225_textControlCrossRef.doc")
{
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index b308c55f974b..a1dd150e18d3 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4442,8 +4442,6 @@ SwFormatPageDesc wwSectionManager::SetSwFormatPageDesc(mySegIter const &rIter,
void wwSectionManager::InsertSegments()
{
- const SvtFilterOptions& rOpt = SvtFilterOptions::Get();
- bool bUseEnhFields = rOpt.IsUseEnhancedFields();
mySegIter aEnd = maSegments.end();
mySegIter aStart = maSegments.begin();
for (mySegIter aIter = aStart; aIter != aEnd; ++aIter)
@@ -4473,12 +4471,6 @@ void wwSectionManager::InsertSegments()
|| aIter->maSep.dxaLeft != aPrev->maSep.dxaLeft || aIter->maSep.dxaRight != aPrev->maSep.dxaRight )
bInsertPageDesc = true;
bool bProtected = SectionIsProtected(*aIter); // do we really need this ?? I guess I have a different logic in editshell which disables this...
- if (bUseEnhFields && mrReader.m_xWDop->fProtEnabled && aIter->IsNotProtected())
- {
- // here we have the special case that the whole document is protected, with the exception of this section.
- // I want to address this when I do the section rework, so for the moment we disable the overall protection then...
- mrReader.m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::PROTECT_FORM, false );
- }
if (bInsertPageDesc)
{
commit 7583ad5383be14f7c589538da1b42dc1ad7e5954
Author: Justin Luth <justin.luth at collabora.com>
AuthorDate: Thu Oct 18 08:17:40 2018 +0300
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Sat Oct 20 22:57:55 2018 +0200
tdf#37778 ww8import: protect section only if protEnabled
Protection is not related to fReadOnlyRecommended
In Word, documentProtection enforcement is a document level
setting which is required for the section protection setting
to be enforced. formprot: "The enforcement of this property
is determined by the documentProtection element (§17.15.1.29),
as it is possible to specify protection without turning it on."
In LO, section protection is honored if it is simply enabled,
so only enable a section's protection if the enforcement
variable is set. Round-tripping will lose the fact that
sections are marked as protected if the enforcement is off.
patch initially developed to support tdf#120499 where
the focus is on sections, not on read-only and the
fake section that was being created.
Change-Id: I08c37ea6a9cc8fd1bdf7f36771b2d719bf9c93d6
Reviewed-on: https://gerrit.libreoffice.org/61899
Reviewed-by: Justin Luth <justin_luth at sil.org>
Tested-by: Justin Luth <justin_luth at sil.org>
(cherry picked from commit 8ba20167034f38ea2984bc8fb0e785da107cb82b)
diff --git a/sw/qa/extras/ww8export/data/tdf37778_readonlySection.doc b/sw/qa/extras/ww8export/data/tdf37778_readonlySection.doc
new file mode 100644
index 000000000000..5e4fcdd760f4
Binary files /dev/null and b/sw/qa/extras/ww8export/data/tdf37778_readonlySection.doc differ
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx
index 41d4ddcfe84f..8d0475975eb4 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -32,6 +32,18 @@ public:
}
};
+DECLARE_WW8EXPORT_TEST(testTdf37778_readonlySection, "tdf37778_readonlySection.doc")
+{
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+ CPPUNIT_ASSERT( xStorable->isReadonly() );
+
+ uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY);
+ // The problem was that section protection was being enabled in addition to being read-only.
+ // This created an explicit section with protection. There should be just the default, non-explicit section.
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Number of Sections", sal_Int32(0), xSections->getCount());
+ }
+
DECLARE_WW8EXPORT_TEST(testTdf120225_textControlCrossRef, "tdf120225_textControlCrossRef.doc")
{
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index f8fe8bea9b36..b308c55f974b 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -2345,7 +2345,7 @@ void SwWW8ImplReader::Read_HdFt(int nSect, const SwPageDesc *pPrev,
bool wwSectionManager::SectionIsProtected(const wwSection &rSection) const
{
- return (mrReader.m_xWwFib->m_fReadOnlyRecommended && !rSection.IsNotProtected());
+ return ( mrReader.m_xWDop->fProtEnabled && !rSection.IsNotProtected() );
}
void wwSectionManager::SetHdFt(wwSection const &rSection, int nSect,
commit c6161021301c6f306af2ca89c693c412b56987ae
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Oct 19 10:30:25 2018 +0100
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Sat Oct 20 22:55:41 2018 +0200
copy and paste error
Change-Id: I30a8fb0568f00253f8d7a55eab51279f639b33cc
Reviewed-on: https://gerrit.libreoffice.org/61982
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 2b2769177e368651943d3cedc0c18708c0a811ce)
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx b/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx
index 4914e12e42ca..468de04ee191 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx
@@ -782,7 +782,7 @@ Reference<XResultSet> SAL_CALL ODatabaseMetaData::getColumns(const Any& /*catalo
nColumnSize = sColumnType.copy(6, 1).toInt32(); // 'year(' length is 5
else if (sDataType.equalsIgnoreAsciiCase("date"))
nColumnSize = 10;
- else if (sDataType.equalsIgnoreAsciiCase("date"))
+ else if (sDataType.equalsIgnoreAsciiCase("time"))
nColumnSize = 8;
else if (sDataType.equalsIgnoreAsciiCase("datetime")
|| sDataType.equalsIgnoreAsciiCase("timestamp"))
commit 0d5728a001ceec9fd84484de4775fee8a7e3e465
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Fri Oct 19 14:54:28 2018 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Sat Oct 20 22:54:37 2018 +0200
tdf#120706: nullptr dereference
Change-Id: I55814a6b4cdfda93a51621b5b31c166507a7e7a6
Reviewed-on: https://gerrit.libreoffice.org/62005
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
(cherry picked from commit 49d304c4f6635381a27b60a8944744cc81ff1e91)
Reviewed-on: https://gerrit.libreoffice.org/62028
Reviewed-by: Eike Rathke <erack at redhat.com>
(cherry picked from commit 7951138541caabcd25fccaa8f9ebb0226ce2ce12)
diff --git a/basic/source/runtime/dllmgr-x64.cxx b/basic/source/runtime/dllmgr-x64.cxx
index 96aa4fcbdd78..8242f01b7762 100644
--- a/basic/source/runtime/dllmgr-x64.cxx
+++ b/basic/source/runtime/dllmgr-x64.cxx
@@ -468,7 +468,7 @@ ErrCode call(
OUString const & dll, ProcData const & proc, SbxArray * arguments,
SbxVariable & result)
{
- if (arguments->Count() > 20)
+ if (arguments && arguments->Count() > 20)
return ERRCODE_BASIC_NOT_IMPLEMENTED;
std::vector< char > stack;
commit 592ac1ec9988998b756d198bad9436906924a790
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Oct 19 09:56:30 2018 +0100
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Sat Oct 20 22:53:56 2018 +0200
copy and paste error
Change-Id: If352e7a0f6e8dab2a9acc9aa2cde56b40cedb50c
Reviewed-on: https://gerrit.libreoffice.org/61993
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
(cherry picked from commit 392ec204197c723b4dff4f7091df5afb46b5b9db)
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index a5ef6ca9f83b..400b2ee959a7 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5645,7 +5645,7 @@ OString ScGridWindow::getCellCursor(const Fraction& rZoomX, const Fraction& rZoo
SCROW nY = pViewData->GetCurY();
Fraction defaultZoomX = pViewData->GetZoomX();
- Fraction defaultZoomY = pViewData->GetZoomX();
+ Fraction defaultZoomY = pViewData->GetZoomY();
pViewData->SetZoom(rZoomX, rZoomY, true);
commit 753f1d466ee14b4436576ee5d5ec3f82e14710da
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Oct 19 10:21:30 2018 +0100
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Sat Oct 20 22:52:37 2018 +0200
copy and paste error
Change-Id: I73a617137bf0b3b567181ff817069944076eab0e
Reviewed-on: https://gerrit.libreoffice.org/62022
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 3ec5fb847364ca65322079fdc1026ed95a0a8933)
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
index 9dab7b525b9b..92973d529d0f 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
@@ -1239,7 +1239,7 @@ inline bool equalFont( Style const & style1, Style const & style2 )
f1.StyleName == f2.StyleName &&
f1.Family == f2.Family &&
f1.CharSet == f2.CharSet &&
- f1.Pitch == f2.CharSet &&
+ f1.Pitch == f2.Pitch &&
f1.CharacterWidth == f2.CharacterWidth &&
f1.Weight == f2.Weight &&
f1.Slant == f2.Slant &&
commit 1c76531b1da87386b54dce42471fc1dbb7fd9701
Author: Miklos Vajna <vmiklos at collabora.co.uk>
AuthorDate: Mon Oct 15 21:11:24 2018 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Sat Oct 20 22:51:51 2018 +0200
tdf#112520 RTF export: write ZOrder only for toplevel shapes
RTF export at the moment exports children of group shapes as a flat
shape list. This means that the order inside the group shape is not
relevant for the toplevel ZOrder, so just don't write it.
(cherry picked from commit 2b920bdc12f3bf3a196ec0d6d59043a68e663e33)
Reviewed-on: https://gerrit.libreoffice.org/61904
Tested-by: Xisco Faulí <xiscofauli at libreoffice.org>
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 1c6bea8e677861d201e9b21b5f0e356f77dabaaf)
Change-Id: I870707cb28c2f177c0e5d9cf5328260e76b661f3
diff --git a/sw/qa/extras/rtfexport/data/tdf112520.docx b/sw/qa/extras/rtfexport/data/tdf112520.docx
new file mode 100644
index 000000000000..31c5a0afc21e
Binary files /dev/null and b/sw/qa/extras/rtfexport/data/tdf112520.docx differ
diff --git a/sw/qa/extras/rtfexport/rtfexport3.cxx b/sw/qa/extras/rtfexport/rtfexport3.cxx
index 1ad5b9242426..55d3e9fa237d 100644
--- a/sw/qa/extras/rtfexport/rtfexport3.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport3.cxx
@@ -16,6 +16,7 @@
#include <com/sun/star/text/XPageCursor.hpp>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
#include <com/sun/star/text/XTextColumns.hpp>
+#include <com/sun/star/text/TextContentAnchorType.hpp>
#include <com/sun/star/text/XTextRangeCompare.hpp>
class Test : public SwModelTestBase
@@ -152,6 +153,26 @@ DECLARE_RTFEXPORT_TEST(testTdf117505, "tdf117505.odt")
getProperty<sal_Int32>(xFirstPage, "HeaderHeight"));
}
+DECLARE_RTFEXPORT_TEST(testTdf112520, "tdf112520.docx")
+{
+ if (!mbExported)
+ return;
+
+ // Assert that the white shape is on top of the yellow one.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0xffff00),
+ getProperty<sal_Int32>(getShape(2), "FillColor"));
+ CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER,
+ getProperty<text::TextContentAnchorType>(getShape(2), "AnchorType"));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0xffffff),
+ getProperty<sal_Int32>(getShape(3), "FillColor"));
+ // Without the accompanying fix in place, this test would have failed with
+ // 'expected: 4, actual: 2'.
+ // This means the draw page was 0/at-char/white, 1/at-char/yellow, 2/at-page/white,
+ // instead of the good 0/at-page/white, 1/at-char/yellow, 2/at-char/white.
+ CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER,
+ getProperty<text::TextContentAnchorType>(getShape(3), "AnchorType"));
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx
index 1a898b0906ab..fe3663c5aa21 100644
--- a/sw/source/filter/ww8/rtfsdrexport.cxx
+++ b/sw/source/filter/ww8/rtfsdrexport.cxx
@@ -87,10 +87,11 @@ void RtfSdrExport::CloseContainer()
sal_uInt32 RtfSdrExport::EnterGroup(const OUString& /*rShapeName*/,
const tools::Rectangle* /*pRect*/)
{
+ m_bInGroup = true;
return GenerateShapeId();
}
-void RtfSdrExport::LeaveGroup() { /* noop */}
+void RtfSdrExport::LeaveGroup() { m_bInGroup = false; }
void RtfSdrExport::AddShape(sal_uInt32 nShapeType, ShapeFlag nShapeFlags, sal_uInt32 /*nShapeId*/)
{
@@ -556,8 +557,13 @@ sal_Int32 RtfSdrExport::StartShape()
m_rAttrOutput.RunText().append(OOO_STRING_SVTOOLS_RTF_SHPBYIGNORE);
// Write ZOrder.
- m_rAttrOutput.RunText().append(OOO_STRING_SVTOOLS_RTF_SHPZ);
- m_rAttrOutput.RunText().append(OString::number(m_pSdrObject->GetOrdNum()));
+ if (!m_bInGroup)
+ {
+ // Order inside the group shape is not relevant for the flat shape list
+ // we write.
+ m_rAttrOutput.RunText().append(OOO_STRING_SVTOOLS_RTF_SHPZ);
+ m_rAttrOutput.RunText().append(OString::number(m_pSdrObject->GetOrdNum()));
+ }
for (auto it = m_aShapeProps.rbegin(); it != m_aShapeProps.rend(); ++it)
lcl_AppendSP(m_rAttrOutput.RunText(), (*it).first.getStr(), (*it).second);
diff --git a/sw/source/filter/ww8/rtfsdrexport.hxx b/sw/source/filter/ww8/rtfsdrexport.hxx
index 894089e9ce39..0eb118f03be7 100644
--- a/sw/source/filter/ww8/rtfsdrexport.hxx
+++ b/sw/source/filter/ww8/rtfsdrexport.hxx
@@ -57,6 +57,8 @@ class RtfSdrExport final : public EscherEx
/// Remember which shape types we had already written.
std::unique_ptr<bool[]> m_pShapeTypeWritten;
+ bool m_bInGroup = false;
+
public:
explicit RtfSdrExport(RtfExport& rExport);
~RtfSdrExport() override;
commit 78ce62fdcbbb6501eb1d63dbe52cad1fd22f2119
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Oct 18 20:39:23 2018 +0100
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Sat Oct 20 22:49:47 2018 +0200
keep pyuno script processing below base uri
Change-Id: Icc13fb7193fb1e7c50e0df286161a10b4ed636c7
Reviewed-on: https://gerrit.libreoffice.org/61969
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit b1c85cdb37a47998f8ab135fbc96f186334b171c)
diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py
index ef131b3c1dab..b85b4f6badb5 100644
--- a/scripting/source/pyprov/pythonscript.py
+++ b/scripting/source/pyprov/pythonscript.py
@@ -25,6 +25,7 @@ import imp
import time
import ast
import platform
+from com.sun.star.uri.RelativeUriExcessParentSegments import RETAIN
try:
unicode
@@ -212,8 +213,33 @@ class MyUriHelper:
def scriptURI2StorageUri( self, scriptURI ):
try:
- myUri = self.m_uriRefFac.parse(scriptURI)
- ret = self.m_baseUri + "/" + myUri.getName().replace( "|", "/" )
+ # base path to the python script location
+ sBaseUri = self.m_baseUri + "/"
+ xBaseUri = self.m_uriRefFac.parse(sBaseUri)
+
+ # path to the .py file + "$functionname, arguments, etc
+ xStorageUri = self.m_uriRefFac.parse(scriptURI)
+ sStorageUri = xStorageUri.getName().replace( "|", "/" );
+
+ # path to the .py file, relative to the base
+ sFileUri = sStorageUri[0:sStorageUri.find("$")]
+ xFileUri = self.m_uriRefFac.parse(sFileUri)
+ if not xFileUri:
+ message = "pythonscript: invalid relative uri '" + sFileUri+ "'"
+ log.debug( message )
+ raise RuntimeException( message )
+
+ # absolute path to the .py file
+ xAbsScriptUri = self.m_uriRefFac.makeAbsolute(xBaseUri, xFileUri, True, RETAIN)
+ sAbsScriptUri = xAbsScriptUri.getUriReference()
+
+ # ensure py file is under the base path
+ if not sAbsScriptUri.startswith(sBaseUri):
+ message = "pythonscript: storage uri '" + sAbsScriptUri + "' not in base uri '" + self.m_baseUri + "'"
+ log.debug( message )
+ raise RuntimeException( message )
+
+ ret = sBaseUri + sStorageUri
log.debug( "converting scriptURI="+scriptURI + " to storageURI=" + ret )
return ret
except UnoException as e:
commit d38b6ccd56aa876eec467a5af298da402249f7cd
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Oct 3 16:42:15 2018 +0100
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Sat Oct 20 22:49:16 2018 +0200
Resolves: tdf#93372 format table in base is ignored
since...
commit b4bbb5e5d7b31caad2fbcc00382ad27df3c81001
Date: Sun May 17 22:56:46 2015 +0900
refactor how font, fg. and bg. are applied in widgets/controls
revert the relevant piece, in this case there are two Windows/Contexts getting
their settings manipulated, rather than the usual one
Change-Id: I0a228aee6aaf1f58b2235fccf14dc63ffa96dd2d
Reviewed-on: https://gerrit.libreoffice.org/61317
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 0be3a5eea3089c2b63cc821ffb282fd4ab8ec455)
Reviewed-on: https://gerrit.libreoffice.org/61525
(cherry picked from commit 3e69c24b4f4a8d4bbf1e2e76177e503f1d6d5840)
diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx
index eb092d16c51f..1b9f0bfdb0f9 100644
--- a/svtools/source/brwbox/editbrowsebox.cxx
+++ b/svtools/source/brwbox/editbrowsebox.cxx
@@ -763,12 +763,30 @@ return;
if (bFont)
{
- GetDataWindow().ApplyControlFont(GetDataWindow(), rStyleSettings.GetFieldFont());
+ vcl::Font aFont = rStyleSettings.GetFieldFont();
+ if (IsControlFont())
+ {
+ GetDataWindow().SetControlFont(GetControlFont());
+ aFont.Merge(GetControlFont());
+ }
+ else
+ GetDataWindow().SetControlFont();
+
+ GetDataWindow().SetZoomedPointFont(GetDataWindow(), aFont);
}
if (bFont || bForeground)
{
- GetDataWindow().ApplyControlForeground(GetDataWindow(), rStyleSettings.GetFieldTextColor());
+ Color aTextColor = rStyleSettings.GetFieldTextColor();
+ if (IsControlForeground())
+ {
+ aTextColor = GetControlForeground();
+ GetDataWindow().SetControlForeground(aTextColor);
+ }
+ else
+ GetDataWindow().SetControlForeground();
+
+ GetDataWindow().SetTextColor( aTextColor );
}
if (!bBackground) // FIXME: Outside of Paint Hierarchy
commit 54b4174268ce3faf1c7e21b1f4933c383d6299f0
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Thu Oct 11 10:57:05 2018 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Sat Oct 20 22:48:49 2018 +0200
sw: fix invalid cast in SwEditWin::RequestHelp()
This results in a garbage OUString.
Change-Id: I03b8030a812d7016df5c29f1341749fbdedf1729
Reviewed-on: https://gerrit.libreoffice.org/61652
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
(cherry picked from commit bf0276f0b53c01ac434fef88e97f6b0dd4c41787)
Reviewed-on: https://gerrit.libreoffice.org/61674
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
(cherry picked from commit 2c93c692bcea531b1a02b3d200a44f3c4584455a)
diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx
index e279bc2d2d98..3ee49222b88f 100644
--- a/sw/source/uibase/docvw/edtwin2.cxx
+++ b/sw/source/uibase/docvw/edtwin2.cxx
@@ -170,7 +170,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
case IsAttrAtPos::InetAttr:
{
- sText = static_cast<const SfxStringItem*>(aContentAtPos.aFnd.pAttr)->GetValue();
+ sText = static_cast<const SwFormatINetFormat*>(aContentAtPos.aFnd.pAttr)->GetValue();
sText = URIHelper::removePassword( sText,
INetURLObject::EncodeMechanism::WasEncoded,
INetURLObject::DecodeMechanism::Unambiguous);
commit 81d0a473052a1601a222ccf806ed6032e341c9f9
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Oct 10 09:42:36 2018 +0100
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Sat Oct 20 22:48:14 2018 +0200
ofz#10879 stay inside sSecStr bounds
Change-Id: I0ca70cdb9b80305c5339668d65d2c4c9977e7160
Reviewed-on: https://gerrit.libreoffice.org/61606
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
(cherry picked from commit 1d4fd993771a406c1ba12282e8b344beb61d994b)
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index ee42209f4363..c42765160494 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -3046,7 +3046,7 @@ bool SvNumberformat::ImpGetTimeOutput(double fNumber,
(rInfo.nTypeArray[i-1] == NF_SYMBOLTYPE_STRING ||
rInfo.nTypeArray[i-1] == NF_SYMBOLTYPE_TIME100SECSEP) ?
nCntPost : rInfo.sStrArray[i].getLength() );
- for (sal_Int32 j = 0; j < nLen && nSecPos < nCntPost; j++)
+ for (sal_Int32 j = 0; j < nLen && nSecPos < nCntPost && nSecPos < sSecStr.getLength(); ++j)
{
sBuff.append(sSecStr[nSecPos]);
nSecPos++;
@@ -3873,7 +3873,7 @@ bool SvNumberformat::ImpGetDateTimeOutput(double fNumber,
(rInfo.nTypeArray[i-1] == NF_SYMBOLTYPE_STRING ||
rInfo.nTypeArray[i-1] == NF_SYMBOLTYPE_TIME100SECSEP) ?
nCntPost : rInfo.sStrArray[i].getLength() );
- for (sal_Int32 j = 0; j < nLen && nSecPos < nCntPost; j++)
+ for (sal_Int32 j = 0; j < nLen && nSecPos < nCntPost && nSecPos < sSecStr.getLength(); ++j)
{
sBuff.append(sSecStr[ nSecPos ]);
nSecPos++;
commit 14b98394a61c7dd9f1d8a5fd3ce9136d58eec3d7
Author: Eike Rathke <erack at redhat.com>
AuthorDate: Thu Sep 20 18:12:03 2018 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Sat Oct 20 22:47:32 2018 +0200
Resolves: tdf#119954 do not copy the old parent, init with new parent instead
The parent is always the ScDBCollection that contains the
ScDBCollection::NamedDBs container, not the one the
ScDBCollection::NamedDBs was copy-constructed from.
Change-Id: Ia409347f3aeb9ad7a5e68da7af727adfac98d6a2
Reviewed-on: https://gerrit.libreoffice.org/60833
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Jenkins
(cherry picked from commit 7ea5d339dc4d8412f436f3affa589bfbd0b1ef68)
Reviewed-on: https://gerrit.libreoffice.org/60842
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
(cherry picked from commit 8755c98657b0ab5a08742f38d7856ca63de3ffeb)
diff --git a/sc/inc/dbdata.hxx b/sc/inc/dbdata.hxx
index 7752693765a1..a72a3130e29b 100644
--- a/sc/inc/dbdata.hxx
+++ b/sc/inc/dbdata.hxx
@@ -241,7 +241,8 @@ public:
DBsType m_DBs;
ScDBCollection& mrParent;
NamedDBs(ScDBCollection& rParent, ScDocument& rDoc);
- NamedDBs(const NamedDBs& r);
+ NamedDBs(const NamedDBs& r, ScDBCollection& rParent);
+ NamedDBs(const NamedDBs&) = delete;
virtual ~NamedDBs() override;
NamedDBs & operator=(NamedDBs const&) = delete;
void initInserted( ScDBData* p );
diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index 0b7ebd3b6bfe..689e15551796 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -1070,9 +1070,9 @@ ScRangeList& ScDBDataContainerBase::GetDirtyTableColumnNames()
ScDBCollection::NamedDBs::NamedDBs(ScDBCollection& rParent, ScDocument& rDoc) :
ScDBDataContainerBase(rDoc), mrParent(rParent) {}
-ScDBCollection::NamedDBs::NamedDBs(const NamedDBs& r)
+ScDBCollection::NamedDBs::NamedDBs(const NamedDBs& r, ScDBCollection& rParent)
: ScDBDataContainerBase(r.mrDoc)
- , mrParent(r.mrParent)
+ , mrParent(rParent)
{
for (auto const& it : r.m_DBs)
{
@@ -1286,7 +1286,7 @@ ScDBCollection::ScDBCollection(ScDocument* pDocument) :
pDoc(pDocument), nEntryIndex(1), maNamedDBs(*this, *pDocument) {}
ScDBCollection::ScDBCollection(const ScDBCollection& r) :
- pDoc(r.pDoc), nEntryIndex(r.nEntryIndex), maNamedDBs(r.maNamedDBs), maAnonDBs(r.maAnonDBs) {}
+ pDoc(r.pDoc), nEntryIndex(r.nEntryIndex), maNamedDBs(r.maNamedDBs, *this), maAnonDBs(r.maAnonDBs) {}
const ScDBData* ScDBCollection::GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, ScDBDataPortion ePortion) const
{
More information about the Libreoffice-commits
mailing list