[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - 12 commits - basic/source chart2/source distro-configs/LibreOfficeLinux.conf download.lst external/curl formula/source include/xmloff sc/source sfx2/source sw/qa sw/source vcl/opengl vcl/qa vcl/source xmloff/source
Tor Lillqvist
tml at collabora.com
Wed May 23 11:56:55 UTC 2018
basic/source/inc/date.hxx | 9 +
basic/source/runtime/methods.cxx | 39 +++++---
basic/source/runtime/methods1.cxx | 20 ----
basic/source/sbx/sbxscan.cxx | 2
chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx | 7 +
distro-configs/LibreOfficeLinux.conf | 1
download.lst | 4
external/curl/curl-7.26.0_win-proxy.patch | 8 -
formula/source/ui/dlg/formula.cxx | 38 +++-----
include/xmloff/xmlimp.hxx | 2
sc/source/ui/inc/viewdata.hxx | 12 ++
sc/source/ui/view/viewdata.cxx | 34 ++++---
sfx2/source/doc/templatedlg.cxx | 4
sw/qa/core/data/ww8/pass/ofz7322-1.doc |binary
sw/source/core/doc/docbm.cxx | 9 +
vcl/opengl/opengl_blacklist_windows.xml | 6 +
vcl/qa/cppunit/pdfexport/data/tdf105954.odt |binary
vcl/qa/cppunit/pdfexport/pdfexport.cxx | 47 ++++++++++
vcl/source/gdi/pdfextoutdevdata.cxx | 5 +
vcl/source/opengl/OpenGLContext.cxx | 15 ++-
xmloff/source/core/xmlictxt.cxx | 6 -
xmloff/source/core/xmlimp.cxx | 10 +-
22 files changed, 197 insertions(+), 81 deletions(-)
New commits:
commit bb02e3687c1ffa64834d70b886fa37e09d0f8be5
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue May 22 11:00:35 2018 +0300
Open template read-only
Otherwise when creating a new docuent based on a template, the
template document file is opened read-write eventually (after first
being opened read-only five times, and closed again...). Sure,
LibreOffice probably doesn't actually write anything to it, but still,
just opening read-write when you are going to only read is silly.
Stack trace from the read-write opening:
#0 0x00007f063dea0047 in openFilePath(char const*, void**, unsigned int, unsigned int) (cpFilePath=0x7ffeacc7d610 "/ssd1/lo/fedora/instdir/share/template/common/officorr/Modern_business_letter_sans_serif.ott", pHandle=0x342af78, uFlags=3, mode=438)
at /ssd1/lo/fedora/sal/osl/unx/file.cxx:1039
#1 0x00007f063dea027b in openFile(_rtl_uString*, void**, unsigned int, unsigned int) (ustrFileURL=0x33ff7e0, pHandle=0x342af78, uFlags=3, mode=4294967295) at /ssd1/lo/fedora/sal/osl/unx/file.cxx:1071
#2 0x00007f063dea01a8 in osl_openFile(rtl_uString*, oslFileHandle*, sal_uInt32) (ustrFileURL=0x33ff7e0, pHandle=0x342af78, uFlags=3)
at /ssd1/lo/fedora/sal/osl/unx/file.cxx:1050
#3 0x00007f060aec5f1a in osl::File::open(unsigned int) (this=0x342af78, uFlags=3) at /ssd1/lo/fedora/include/osl/file.hxx:975
#4 0x00007f060aec5a8f in fileaccess::ReconnectingFile::open(unsigned int) (this=0x342af78, uFlags=3)
at /ssd1/lo/fedora/ucb/source/ucp/file/filrec.cxx:50
#5 0x00007f060aee0324 in fileaccess::XStream_impl::XStream_impl(rtl::OUString const&, bool) (this=0x342af10, aUncPath="file:///ssd1/lo/fedora/instdir/share/template/common/officorr/Modern_business_letter_sans_serif.ott", bLock=true) at /ssd1/lo/fedora/ucb/source/ucp/file/filstr.cxx:58
#6 0x00007f060aee8bac in fileaccess::TaskManager::open_rw(int, rtl::OUString const&, bool) (this=0x2c5ded0, CommandId=231, aUnqPath="file:///ssd1/lo/fedora/instdir/share/template/common/officorr/Modern_business_letter_sans_serif.ott", bLock=true)
at /ssd1/lo/fedora/ucb/source/ucp/file/filtask.cxx:766
#7 0x00007f060ae9ba9b in fileaccess::BaseContent::open(int, com::sun::star::ucb::OpenCommandArgument2 const&) (this=0x3428810, nMyCommandIdentifier=231, aCommandArgument=...) at /ssd1/lo/fedora/ucb/source/ucp/file/bc.cxx:937
#8 0x00007f060ae99dfa in fileaccess::BaseContent::execute(com::sun::star::ucb::Command const&, int, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&) (this=0x3428810, aCommand=..., CommandId=231, Environment=uno::Reference to (ucbhelper::CommandEnvironment *) 0x341d088) at /ssd1/lo/fedora/ucb/source/ucp/file/bc.cxx:331
#9 0x00007f060ae9d001 in non-virtual thunk to fileaccess::BaseContent::execute(com::sun::star::ucb::Command const&, int, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&) () at /ssd1/lo/fedora/instdir/program/../program/libucpfile1.so
#10 0x00007f06337395da in ucbhelper::Content_Impl::executeCommand(com::sun::star::ucb::Command const&) (this=0x3427f70, rCommand=...)
at /ssd1/lo/fedora/ucbhelper/source/client/content.cxx:1258
#11 0x00007f063373be55 in ucbhelper::Content::openWriteableStream() (this=0x7ffeacc7f030)
at /ssd1/lo/fedora/ucbhelper/source/client/content.cxx:751
#12 0x00007f06333f56c0 in utl::MediaDescriptor::impl_openStreamWithURL(rtl::OUString const&, bool) (this=0x7ffeacc801d0, sURL="file:///ssd1/lo/fedora/instdir/share/template/common/officorr/Modern_business_letter_sans_serif.ott", bLockFile=true)
at /ssd1/lo/fedora/unotools/source/misc/mediadescriptor.cxx:666
#13 0x00007f06333f3e01 in utl::MediaDescriptor::impl_addInputStream(bool) (this=0x7ffeacc801d0, bLockFile=true)
at /ssd1/lo/fedora/unotools/source/misc/mediadescriptor.cxx:521
#14 0x00007f06333f4051 in utl::MediaDescriptor::addInputStreamOwnLock() (this=0x7ffeacc801d0)
at /ssd1/lo/fedora/unotools/source/misc/mediadescriptor.cxx:490
#15 0x00007f05b132f0bf in filter::config::TypeDetection::impl_openStream(utl::MediaDescriptor&) (this=0x33caa10, rDescriptor=...)
at /ssd1/lo/fedora/filter/source/config/cache/typedetection.cxx:1127
#16 0x00007f05b132e9ac in filter::config::TypeDetection::impl_askDetectService(rtl::OUString const&, utl::MediaDescriptor&) (this=0x33caa10, sDetectService="com.sun.star.comp.filters.StorageFilterDetect", rDescriptor=...) at /ssd1/lo/fedora/filter/source/config/cache/typedetection.cxx:981
#17 0x00007f05b132b7a4 in filter::config::TypeDetection::impl_detectTypeFlatAndDeep(utl::MediaDescriptor&, std::__debug::vector<filter::config::FlatDetectionInfo, std::allocator<filter::config::FlatDetectionInfo> > const&, bool, std::__debug::vector<rtl::OUString, std::allocator<rtl::OUString> >&, rtl::OUString&) (this=0x33caa10, rDescriptor=..., lFlatTypes=std::__debug::vector of length 168, capacity 256 = {...}, bAllowDeep=true, rUsedDetectors=std::__debug::vector of length 1, capacity 1 = {...}, rLastChance="")
at /ssd1/lo/fedora/filter/source/config/cache/typedetection.cxx:934
#18 0x00007f05b1329b7c in filter::config::TypeDetection::queryTypeByDescriptor(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>&, unsigned char) (this=0x33caa10, lDescriptor=uno::Sequence of length 6 = {...}, bAllowDeep=1 '\001')
at /ssd1/lo/fedora/filter/source/config/cache/typedetection.cxx:429
#19 0x00007f05b132d321 in non-virtual thunk to filter::config::TypeDetection::queryTypeByDescriptor(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>&, unsigned char) () at /usr/bin/../lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/stl_pair.h:331
#20 0x00007f060df5acdd in framework::LoadEnv::impl_detectTypeAndFilter() (this=0x7ffeacc80c48)
at /ssd1/lo/fedora/framework/source/loadenv/loadenv.cxx:739
#21 0x00007f060df58796 in framework::LoadEnv::startLoading() (this=0x7ffeacc80c48) at /ssd1/lo/fedora/framework/source/loadenv/loadenv.cxx:357
#22 0x00007f060df57280 in framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (xLoader=uno::Reference to (framework::Desktop *) 0x282bf98, xContext=uno::Reference to (cppu::ComponentContext *) 0x145b790, sURL="file:///ssd1/lo/fedora/instdir/share/template/common/officorr/Modern_business_letter_sans_serif.ott", sTarget="_default", nFlags=0, lArgs=uno::Sequence of length 4 = {...}) at /ssd1/lo/fedora/framework/source/loadenv/loadenv.cxx:160
#23 0x00007f060dfaef40 in framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) (this=0x282bf20, sURL="file:///ssd1/lo/fedora/instdir/share/template/common/officorr/Modern_business_letter_sans_serif.ott", sTargetFrameName="_default", nSearchFlags=0, lArguments=uno::Sequence of length 4 = {...})
at /ssd1/lo/fedora/framework/source/services/desktop.cxx:617
#24 0x00007f060dfaeffb in non-virtual thunk to framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) () at /ssd1/lo/fedora/include/rtl/stringutils.hxx:170
#25 0x00007f06381ee762 in SfxTemplateManagerDlg::OpenTemplateHdl(ThumbnailViewItem*) (this=0x310e160, pItem=0x33925d0)
at /ssd1/lo/fedora/sfx2/source/doc/templatedlg.cxx:690
Change-Id: Iaa5cc2bd4c80bc239b8f1bf7ed8aa62d89151d62
(cherry picked from commit e439816281f9fe24c7332b5f1e16df845f5213f2)
Reviewed-on: https://gerrit.libreoffice.org/54686
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit 30bdedc49f7007ce0305d013ac89c910c6cb1ae4)
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index c5612f1b6c0b..8861f89c7c8d 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -673,7 +673,7 @@ IMPL_LINK(SfxTemplateManagerDlg, CreateContextMenuHdl, ThumbnailViewItem*, pItem
IMPL_LINK(SfxTemplateManagerDlg, OpenTemplateHdl, ThumbnailViewItem*, pItem, void)
{
- uno::Sequence< PropertyValue > aArgs(4);
+ uno::Sequence< PropertyValue > aArgs(5);
aArgs[0].Name = "AsTemplate";
aArgs[0].Value <<= true;
aArgs[1].Name = "MacroExecutionMode";
@@ -682,6 +682,8 @@ IMPL_LINK(SfxTemplateManagerDlg, OpenTemplateHdl, ThumbnailViewItem*, pItem, voi
aArgs[2].Value <<= UpdateDocMode::ACCORDING_TO_CONFIG;
aArgs[3].Name = "InteractionHandler";
aArgs[3].Value <<= task::InteractionHandler::createWithParent( ::comphelper::getProcessComponentContext(), nullptr );
+ aArgs[4].Name = "ReadOnly";
+ aArgs[4].Value <<= true;
TemplateViewItem *pTemplateItem = static_cast<TemplateViewItem*>(pItem);
commit 9d01f30b46cb23915342f7a04165750b3f493f49
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu May 17 17:21:40 2018 +0200
tdf#104893 vcl opengl: fix assert failure when starting chart editing
OpenGLContext::prepareForYield() assumed that in case we have a current
context, then it's the last one, but that's not the case for chart windows
since commit 78b100ec9cb0db2f7b33ece5ad3287a67a37246f (only init the OpenGL
context if we need it, 2016-06-07), which creates an OpenGLContext instance
(which is then the last one in the context list) but explicitly doesn't
initialize it (so that it would become the current one).
Fix the problem by resetting not the last but the last current context.
(cherry picked from commit 2a6171ed6fb85b3419dcf5cf1346cf1eec447987)
Change-Id: Ie0e96927473290590cd6333e5cdcb7daa009431b
Reviewed-on: https://gerrit.libreoffice.org/54516
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Bartosz Kosiorek <gang65 at poczta.onet.pl>
(cherry picked from commit 014a573a05bc69e0883a9e5fccdc7bed72b0a62e)
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 958c59925db2..200a772e2a36 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -483,8 +483,19 @@ void OpenGLContext::prepareForYield()
SAL_INFO("vcl.opengl", "Unbinding contexts in preparation for yield");
- if( pCurrentCtx->isCurrent() )
- pCurrentCtx->resetCurrent();
+ // Find the first context that is current and reset it.
+ // Usually the last context is the current, but not in case a new
+ // OpenGLContext is created already but not yet initialized.
+ while (pCurrentCtx.is())
+ {
+ if (pCurrentCtx->isCurrent())
+ {
+ pCurrentCtx->resetCurrent();
+ break;
+ }
+
+ pCurrentCtx = pCurrentCtx->mpPrevContext;
+ }
assert (!hasCurrent());
}
commit 28baf76d293fdc6fba13c1718ea8f705bdc25757
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date: Wed Apr 4 13:29:09 2018 +0200
tdf#104658: Fix jumping bitmap-filled chart bars
Coincidentally this also resolves almost identical issues in chart wall
(tdf#114132)
Change-Id: Ib566110639d00aa46463ee592861ce3e15c64f50
Reviewed-on: https://gerrit.libreoffice.org/52624
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
(cherry picked from commit 2eaa978d135a53abf22df2dc3fcb8d04733fe2d3)
Reviewed-on: https://gerrit.libreoffice.org/52978
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
(cherry picked from commit 4eed0937c971a21287da639e0708c682d0241ea2)
diff --git a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
index f6e3e7a16bd5..b5d7ff68c864 100644
--- a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
@@ -429,9 +429,14 @@ bool GraphicPropertyItemConverter::ApplySpecialItem(
bool bStretched = rItemSet.Get( XATTR_FILLBMP_STRETCH ).GetValue();
drawing::BitmapMode aMode =
(bStretched ? drawing::BitmapMode_STRETCH : drawing::BitmapMode_NO_REPEAT);
+ drawing::BitmapMode aOtherMode = drawing::BitmapMode_NO_REPEAT;
aValue <<= aMode;
- if( aValue != GetPropertySet()->getPropertyValue( aModePropName ))
+ GetPropertySet()->getPropertyValue( aModePropName ) >>= aOtherMode;
+
+ // don't overwrite if it has been set to BitmapMode_REPEAT (= tiled) already
+ // XATTR_FILLBMP_STRETCH and XATTR_FILLBMP_TILE often come in pairs, tdf#104658
+ if( aMode != aOtherMode && aOtherMode != drawing::BitmapMode_REPEAT )
{
GetPropertySet()->setPropertyValue( aModePropName, aValue );
bChanged = true;
commit 1fad336edb2c9e41c35f4daa50f30f6f6d443e53
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 11 12:31:36 2018 +0100
crashtesting: assert on fdo62508-1.odt
document, with meta:generator of "opxml2odf - Version KO 0.1" has
a styles.xml xmlns of...
xmlns:ofo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
instead of the usual xmlns:fo=...
use the importer namespace map to get the importers namespace prefix
for the fastparser namespace uri for the token
Change-Id: Ib633009f6c2b7dae5a3ceb1c921adfff84e21150
Reviewed-on: https://gerrit.libreoffice.org/52720
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-on: https://gerrit.libreoffice.org/54548
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
(cherry picked from commit 3e50044ba41410b9f6a6879f71cdb8314a6d56c3)
diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx
index b6552a297843..642c5b2e652b 100644
--- a/include/xmloff/xmlimp.hxx
+++ b/include/xmloff/xmlimp.hxx
@@ -376,7 +376,7 @@ public:
XMLEventImportHelper& GetEventImport();
static const OUString getNameFromToken( sal_Int32 nToken );
- static const OUString getNamespacePrefixFromToken( sal_Int32 nToken );
+ static const OUString getNamespacePrefixFromToken(sal_Int32 nToken, const SvXMLNamespaceMap* pMap);
SvXMLNamespaceMap& GetNamespaceMap() { return *mpNamespaceMap; }
const SvXMLNamespaceMap& GetNamespaceMap() const { return *mpNamespaceMap; }
diff --git a/xmloff/source/core/xmlictxt.cxx b/xmloff/source/core/xmlictxt.cxx
index cc5f46ce0c48..832cd5a2c7bf 100644
--- a/xmloff/source/core/xmlictxt.cxx
+++ b/xmloff/source/core/xmlictxt.cxx
@@ -70,7 +70,7 @@ void SvXMLImportContext::Characters( const OUString& )
void SAL_CALL SvXMLImportContext::startFastElement(sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList > & Attribs)
{
mrImport.isFastContext = false;
- startUnknownElement( SvXMLImport::getNamespacePrefixFromToken( nElement ),
+ startUnknownElement( SvXMLImport::getNamespacePrefixFromToken(nElement, &GetImport().GetNamespaceMap()),
SvXMLImport::getNameFromToken( nElement ), Attribs );
}
@@ -99,7 +99,7 @@ void SAL_CALL SvXMLImportContext::startUnknownElement(const OUString & rPrefix,
for( auto &it : *pAttribList )
{
sal_Int32 nToken = it.getToken();
- const OUString& rAttrNamespacePrefix = SvXMLImport::getNamespacePrefixFromToken( nToken );
+ const OUString& rAttrNamespacePrefix = SvXMLImport::getNamespacePrefixFromToken(nToken, &GetImport().GetNamespaceMap());
OUString sAttrName = SvXMLImport::getNameFromToken( nToken );
if ( !rAttrNamespacePrefix.isEmpty() )
sAttrName = rAttrNamespacePrefix + ":" + sAttrName;
@@ -129,7 +129,7 @@ void SAL_CALL SvXMLImportContext::startUnknownElement(const OUString & rPrefix,
void SAL_CALL SvXMLImportContext::endFastElement(sal_Int32 nElement)
{
mrImport.isFastContext = false;
- endUnknownElement( SvXMLImport::getNamespacePrefixFromToken( nElement ),
+ endUnknownElement( SvXMLImport::getNamespacePrefixFromToken(nElement, &GetImport().GetNamespaceMap()),
SvXMLImport::getNameFromToken( nElement ) );
}
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 0287cab95826..abdbcbe2f3ac 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -2037,12 +2037,20 @@ const OUString SvXMLImport::getNameFromToken( sal_Int32 nToken )
aSeq.getConstArray() ), aSeq.getLength(), RTL_TEXTENCODING_UTF8 );
}
-const OUString SvXMLImport::getNamespacePrefixFromToken( sal_Int32 nToken )
+const OUString SvXMLImport::getNamespacePrefixFromToken(sal_Int32 nToken, const SvXMLNamespaceMap* pMap)
{
sal_Int32 nNamespaceToken = ( nToken & NMSP_MASK ) >> NMSP_SHIFT;
auto aIter( aNamespaceMap.find( nNamespaceToken ) );
if( aIter != aNamespaceMap.end() )
+ {
+ if (pMap)
+ {
+ OUString sRet = pMap->GetPrefixByKey(pMap->GetKeyByName((*aIter).second.second));
+ if (!sRet.isEmpty())
+ return sRet;
+ }
return (*aIter).second.first;
+ }
else
return OUString();
}
commit b2db3990be3f61178ceeedb06282d1123e664dda
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date: Sat May 19 15:55:40 2018 +0200
explicitly enable avahi
Change-Id: I8d3c639bfeb6797a5d61ea21e55ac23da1504120
(cherry picked from commit c488328fd27a883e730d1eda47c4a4d2c07f3585)
(cherry picked from commit 7baaa7826bdc115beb74341b86f0224d39a20cb7)
diff --git a/distro-configs/LibreOfficeLinux.conf b/distro-configs/LibreOfficeLinux.conf
index 711d6c3aca6e..c0b43e16b087 100644
--- a/distro-configs/LibreOfficeLinux.conf
+++ b/distro-configs/LibreOfficeLinux.conf
@@ -16,6 +16,7 @@
--with-external-thes-dir=/usr/share/mythes
--with-external-hyph-dir=/usr/share/hyphen
--with-external-dict-dir=/usr/share/hunspell
+--enable-avahi
--enable-dbus
--enable-extension-integration
--enable-odk
commit b849c9e6f4bfa9c4d8a9634663cf9fb33c3ba9e0
Author: Tor Lillqvist <tml at collabora.com>
Date: Wed May 16 20:14:39 2018 +0300
tdf#116511: Drop questionable check for more keyboard input
For some reason, on macOS, when this is being invoked through the
shortcut, Application::AnyInput( VclInputFlags::KEYBOARD ) returns
true, so the code thinks that there is more keyboard input and won't
call UpdateTokenArray(), which sets m_pTokenArray.
I think that optmisation is questionable, especially as the exact
semantics of our event loop API, like Application::AnyInput(), is
under-defined and probably can and will change in various minor ways
when people work on improving it on the Mac (and perhaps other
platforms, too).
(The event loop etc certainly needs improvement on the Mac. Consider
the "WindowServer grows to tens of gigabytes when running make check"
issue which is closely related. Unfortunately nobody has come up with
a simple fix for that yet, exactly because we use our event loop
related APIs in so imaginative ways all over the code, and fixing one
thing usually breaks another.)
Change-Id: I865d46e5ee69609ad58bc915ff949e0f3602d8f5
Reviewed-on: https://gerrit.libreoffice.org/54448
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Tor Lillqvist <tml at collabora.com>
(cherry picked from commit 16f784b10695d1d3212463f96f597c665a90a8e2)
Reviewed-on: https://gerrit.libreoffice.org/54545
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
(cherry picked from commit 7245c6fdadce1e3b04ccdf839f0f688fcfdcad09)
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index d6e39b62341b..8273597ceeb2 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -614,40 +614,32 @@ void FormulaDlg_Impl::UpdateValues( bool bForceRecalcStruct )
bool FormulaDlg_Impl::CalcStruct( const OUString& rStrExp, bool bForceRecalcStruct )
{
- bool bResult = true;
sal_Int32 nLength = rStrExp.getLength();
if ( !rStrExp.isEmpty() && (bForceRecalcStruct || m_aOldFormula != rStrExp) && m_bStructUpdate)
{
- // Only calculate the value when there isn't any more keyboard input:
+ m_pStructPage->ClearStruct();
- if ( !Application::AnyInput( VclInputFlags::KEYBOARD ) )
+ OUString aString = rStrExp;
+ if (rStrExp[nLength-1] == '(')
{
- m_pStructPage->ClearStruct();
-
- OUString aString = rStrExp;
- if (rStrExp[nLength-1] == '(')
- {
- aString = aString.copy( 0, nLength-1);
- }
+ aString = aString.copy( 0, nLength-1);
+ }
- aString = aString.replaceAll( "\n", "");
- OUString aStrResult;
+ aString = aString.replaceAll( "\n", "");
+ OUString aStrResult;
- if ( CalcValue( aString, aStrResult ) )
- m_pWndFormResult->SetText( aStrResult );
+ if ( CalcValue( aString, aStrResult ) )
+ m_pWndFormResult->SetText( aStrResult );
- UpdateTokenArray(aString);
- fillTree(m_pStructPage);
+ UpdateTokenArray(aString);
+ fillTree(m_pStructPage);
- m_aOldFormula = rStrExp;
- if (rStrExp[nLength-1] == '(')
- UpdateTokenArray(rStrExp);
- }
- else
- bResult = false;
+ m_aOldFormula = rStrExp;
+ if (rStrExp[nLength-1] == '(')
+ UpdateTokenArray(rStrExp);
}
- return bResult;
+ return true;
}
commit 3c062e3ac73cbf2c88f84fa005ed04018fe45627
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed May 16 09:46:36 2018 +0200
tdf#105954 PDF export, ReduceImageResolution: fix re-compressing large images
Expensive re-compress is not pointless when the user opts in to reduce
resolution.
(cherry picked from commit 9fd6b6b1f5b83d923a47252b744358721761d9cf)
Conflicts:
vcl/qa/cppunit/pdfexport/pdfexport.cxx
vcl/source/gdi/pdfextoutdevdata.cxx
Change-Id: I1e04c6d4f0d95d41808ef885082239645401b2e2
Reviewed-on: https://gerrit.libreoffice.org/54470
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit efd59fd1d7fc9d955a2b924f247709201f2281c5)
diff --git a/vcl/qa/cppunit/pdfexport/data/tdf105954.odt b/vcl/qa/cppunit/pdfexport/data/tdf105954.odt
new file mode 100644
index 000000000000..ba5c96de68bd
Binary files /dev/null and b/vcl/qa/cppunit/pdfexport/data/tdf105954.odt differ
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index c6de4b344503..b2ebb23cf6cd 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -79,6 +79,7 @@ public:
/// Text extracting RTL text with ligatures.
void testTdf115117_2a();
#endif
+ void testTdf105954();
#endif
void testTdf109143();
@@ -104,6 +105,7 @@ public:
CPPUNIT_TEST(testTdf115117_2);
CPPUNIT_TEST(testTdf115117_2a);
#endif
+ CPPUNIT_TEST(testTdf105954);
#endif
CPPUNIT_TEST(testTdf109143);
CPPUNIT_TEST_SUITE_END();
@@ -1019,6 +1021,51 @@ void PdfExportTest::testTdf115117_2a()
CPPUNIT_ASSERT_EQUAL(aExpectedText, aActualText);
}
#endif
+
+void PdfExportTest::testTdf105954()
+{
+ // Import the bugdoc and export as PDF.
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf105954.odt";
+ mxComponent = loadFromDesktop(aURL);
+ CPPUNIT_ASSERT(mxComponent.is());
+
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+ utl::TempFile aTempFile;
+ aTempFile.EnableKillingFile();
+ utl::MediaDescriptor aMediaDescriptor;
+ aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ uno::Sequence<beans::PropertyValue> aFilterData(comphelper::InitPropertySequence(
+ { { "ReduceImageResolution", uno::Any(true) },
+ { "MaxImageResolution", uno::Any(static_cast<sal_Int32>(300)) } }));
+ aMediaDescriptor["FilterData"] <<= aFilterData;
+ xStorable->storeToURL(aTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());
+
+ // Parse the export result with pdfium.
+ SvFileStream aFile(aTempFile.GetURL(), StreamMode::READ);
+ SvMemoryStream aMemory;
+ aMemory.WriteStream(aFile);
+ mpPdfDocument
+ = FPDF_LoadMemDocument(aMemory.GetData(), aMemory.GetSize(), /*password=*/nullptr);
+ CPPUNIT_ASSERT(mpPdfDocument);
+
+ // The document has one page.
+ CPPUNIT_ASSERT_EQUAL(1, FPDF_GetPageCount(mpPdfDocument));
+ mpPdfPage = FPDF_LoadPage(mpPdfDocument, /*page_index=*/0);
+ CPPUNIT_ASSERT(mpPdfPage);
+
+ // There is a single image on the page.
+ int nPageObjectCount = FPDFPage_CountObjects(mpPdfPage);
+ CPPUNIT_ASSERT_EQUAL(1, nPageObjectCount);
+
+ // Check width of the image.
+ FPDF_PAGEOBJECT pPageObject = FPDFPage_GetObject(mpPdfPage, /*index=*/0);
+ FPDF_IMAGEOBJ_METADATA aMeta;
+ CPPUNIT_ASSERT(FPDFImageObj_GetImageMetadata(pPageObject, mpPdfPage, &aMeta));
+ // This was 2000, i.e. the 'reduce to 300 DPI' request was ignored.
+ // This is now around 238 (228 on macOS).
+ CPPUNIT_ASSERT_LESS(static_cast<unsigned int>(250), aMeta.width);
+}
+
#endif
CPPUNIT_TEST_SUITE_REGISTRATION(PdfExportTest);
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx
index 71ef583cda58..3c689c3ccce0 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -810,6 +810,11 @@ bool PDFExtOutDevData::HasAdequateCompression( const Graphic &rGraphic,
// rOutputRect is the crop rectangle, re-compress cropped image.
return false;
+ if (mbReduceImageResolution)
+ // Reducing resolution was requested, implies that re-compressing is
+ // wanted.
+ return false;
+
if (rGraphic.GetLink().GetDataSize() == 0)
return false;
commit c4eaeace6a2511580fc3e25d83e28e2bb5ed9729
Author: Eike Rathke <erack at redhat.com>
Date: Thu May 17 14:07:16 2018 +0200
Resolves: tdf#117093 sanitize the active grid window value
Don't know yet how that could had happened, but the sample
document has a bad ActiveSplitRange value that doesn't match
HorizontalSplitMode and VerticalSplitMode.
* sanitize the value when reading view settings
* prevent writing such value to help versions that don't sanitize
Change-Id: I1b450c7b8102148a24d545ff7568f725d7492a6a
(cherry picked from commit 646e9564007b13bd841d28e7c02c060d2f96fb39)
Reviewed-on: https://gerrit.libreoffice.org/54504
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 3de630074d69517d97c4dc874ad74203d7699e88)
diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index 04e0dd81388e..e9f8767aea90 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -252,6 +252,18 @@ private:
void ReadUserDataSequence(
const css::uno::Sequence <css::beans::PropertyValue>& rSettings,
ScViewData& rViewData, SCTAB nTab, bool& rHasZoom);
+
+ /** Sanitize the active split range value to not point into a grid window
+ that would never be initialized due to non-matching split modes.
+
+ This is to be done when reading settings from file formats or
+ configurations that could have arbitrary values. The caller is
+ reponsible for actually assigning the new value to eWhichActive because
+ we want this function to be const to be able to call the check from
+ anywhere.
+ */
+ SAL_WARN_UNUSED_RESULT ScSplitPos SanitizeWhichActive() const;
+
public:
~ScViewDataTable();
};
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 16aec0a62109..43cee43b34da 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -491,8 +491,12 @@ void ScViewDataTable::WriteUserDataSequence(uno::Sequence <beans::PropertyValue>
pSettings[SC_VERTICAL_SPLIT_POSITION].Value <<= sal_Int32(nFixPosY);
else
pSettings[SC_VERTICAL_SPLIT_POSITION].Value <<= sal_Int32(nVSplitPos);
+ // Prevent writing odd settings that would make crash versions that
+ // don't apply SanitizeWhichActive() when reading the settings.
+ // See tdf#117093
+ const ScSplitPos eActiveSplitRange = SanitizeWhichActive();
pSettings[SC_ACTIVE_SPLIT_RANGE].Name = SC_ACTIVESPLITRANGE;
- pSettings[SC_ACTIVE_SPLIT_RANGE].Value <<= sal_Int16(eWhichActive);
+ pSettings[SC_ACTIVE_SPLIT_RANGE].Value <<= sal_Int16(eActiveSplitRange);
pSettings[SC_POSITION_LEFT].Name = SC_POSITIONLEFT;
pSettings[SC_POSITION_LEFT].Value <<= sal_Int32(nPosX[SC_SPLIT_LEFT]);
pSettings[SC_POSITION_RIGHT].Name = SC_POSITIONRIGHT;
@@ -649,6 +653,7 @@ void ScViewDataTable::ReadUserDataSequence(const uno::Sequence <beans::PropertyV
// Fallback to common SdrModel processing
else rViewData.GetDocument()->GetDrawLayer()->ReadUserDataSequenceValue(&aSettings[i]);
}
+
if (eHSplitMode == SC_SPLIT_FIX)
nFixPosX = SanitizeCol( static_cast<SCCOL>( bHasHSplitInTwips ? nTempPosHTw : nTempPosH ));
else
@@ -658,6 +663,20 @@ void ScViewDataTable::ReadUserDataSequence(const uno::Sequence <beans::PropertyV
nFixPosY = SanitizeRow( static_cast<SCROW>( bHasVSplitInTwips ? nTempPosVTw : nTempPosV ));
else
nVSplitPos = bHasVSplitInTwips ? static_cast< long >( nTempPosVTw * rViewData.GetPPTY() ) : nTempPosV;
+
+ eWhichActive = SanitizeWhichActive();
+}
+
+ScSplitPos ScViewDataTable::SanitizeWhichActive() const
+{
+ if ((WhichH(eWhichActive) == SC_SPLIT_RIGHT && eHSplitMode == SC_SPLIT_NONE) ||
+ (WhichV(eWhichActive) == SC_SPLIT_TOP && eVSplitMode == SC_SPLIT_NONE))
+ {
+ SAL_WARN("sc.ui","ScViewDataTable::SanitizeWhichActive - bad eWhichActive " << eWhichActive);
+ // The default always initialized grid window is SC_SPLIT_BOTTOMLEFT.
+ return SC_SPLIT_BOTTOMLEFT;
+ }
+ return eWhichActive;
}
ScViewData::ScViewData( ScDocShell* pDocSh, ScTabViewShell* pViewSh ) :
@@ -2974,18 +2993,7 @@ void ScViewData::ReadUserData(const OUString& rData)
maTabData[nPos]->nPosY[0] = SanitizeRow( aTabOpt.getToken(9,cTabSep).toInt32());
maTabData[nPos]->nPosY[1] = SanitizeRow( aTabOpt.getToken(10,cTabSep).toInt32());
- // test whether the active part according to SplitMode exists at all
- // (Bug #44516#)
- ScSplitPos eTest = maTabData[nPos]->eWhichActive;
- if ( ( WhichH( eTest ) == SC_SPLIT_RIGHT &&
- maTabData[nPos]->eHSplitMode == SC_SPLIT_NONE ) ||
- ( WhichV( eTest ) == SC_SPLIT_TOP &&
- maTabData[nPos]->eVSplitMode == SC_SPLIT_NONE ) )
- {
- // then back to default again (bottom left)
- maTabData[nPos]->eWhichActive = SC_SPLIT_BOTTOMLEFT;
- OSL_FAIL("SplitPos had to be corrected");
- }
+ maTabData[nPos]->eWhichActive = maTabData[nPos]->SanitizeWhichActive();
}
++nPos;
}
commit 3c5dba79e9198ee12696b718025621dd81909358
Author: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Date: Wed May 16 11:16:07 2018 +0200
curl: upgrade to release 7.60.0
This fixes the following CVEs:
* FTP: shutdown response buffer overflow CVE-2018-1000300
* RTSP: bad headers buffer over-read CVE-2018-1000301
Reviewed-on: https://gerrit.libreoffice.org/54418
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Conflicts:
download.lst
Change-Id: Ic3229577083286501162aa5979a94ce934739557
Reviewed-on: https://gerrit.libreoffice.org/54464
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
(cherry picked from commit 8ddb3ca84b66050c394140fa4f7290e3607d84f5)
diff --git a/download.lst b/download.lst
index 2267eb4cb8bf..40a76bbc50f5 100644
--- a/download.lst
+++ b/download.lst
@@ -29,8 +29,8 @@ export CPPUNIT_SHA256SUM := 3d569869d27b48860210c758c4f313082103a5e58219a7669b52
export CPPUNIT_TARBALL := cppunit-1.14.0.tar.gz
export CT2N_SHA256SUM := 71b238efd2734be9800af07566daea8d6685aeed28db5eb5fa0e6453f4d85de3
export CT2N_TARBALL := 1f467e5bb703f12cbbb09d5cf67ecf4a-converttexttonumber-1-5-0.oxt
-export CURL_SHA256SUM := cc245bf9a1a42a45df491501d97d5593392a03f7b4f07b952793518d97666115
-export CURL_TARBALL := curl-7.58.0.tar.gz
+export CURL_SHA256SUM := e9c37986337743f37fd14fe8737f246e97aec94b39d1b71e8a5973f72a9fc4f5
+export CURL_TARBALL := curl-7.60.0.tar.gz
export EBOOK_SHA256SUM := 7e8d8ff34f27831aca3bc6f9cc532c2f90d2057c778963b884ff3d1e34dfe1f9
export EBOOK_TARBALL := libe-book-0.1.3.tar.xz
export EPOXY_SHA256SUM := 1d8668b0a259c709899e1c4bab62d756d9002d546ce4f59c9665e2fc5f001a64
diff --git a/external/curl/curl-7.26.0_win-proxy.patch b/external/curl/curl-7.26.0_win-proxy.patch
index e51c5d017818..5361433a917b 100644
--- a/external/curl/curl-7.26.0_win-proxy.patch
+++ b/external/curl/curl-7.26.0_win-proxy.patch
@@ -4,8 +4,8 @@
CFLAGS_LIBCURL_STATIC = /DCURL_STATICLIB
--WIN_LIBS = ws2_32.lib wldap32.lib advapi32.lib
-+WIN_LIBS = ws2_32.lib wldap32.lib advapi32.lib winhttp.lib
+-WIN_LIBS = ws2_32.lib wldap32.lib advapi32.lib crypt32.lib
++WIN_LIBS = ws2_32.lib wldap32.lib advapi32.lib crypt32.lib winhttp.lib
BASE_NAME = libcurl
BASE_NAME_DEBUG = $(BASE_NAME)_debug
@@ -112,9 +112,9 @@
const char *protop = conn->handler->scheme;
char *envp = proxy_env;
@@ -4663,6 +4739,7 @@
- if(!proxy)
- proxy = curl_getenv("ALL_PROXY");
}
+ if(proxy)
+ infof(conn->data, "Uses proxy env variable %s == '%s'\n", envp, proxy);
+#endif /* WIN32 */
return proxy;
commit a16a53deab649b2165d998ef43567346f83cb4bf
Author: Eike Rathke <erack at redhat.com>
Date: Tue May 15 19:36:52 2018 +0200
Resolves: tdf#117612 truncate DateAdd("m",...) to last day of month
... instead of resulting in error because of roll-over not being set.
Fallout from
commit 6d424f07701bf26d8fb173563b567d5f097c33e2
CommitDate: Tue May 2 23:12:34 2017 +0200
Replace mouth-painted "inaccurate around leap year" rollover algorithm
that does stricter checking but DateAdd() needs a lax checking
with truncate to last day of month.
(cherry picked from commit 40c9a129e5a53e6eadfe8ca80c98ccf7eda957f9)
Conflicts:
basic/source/runtime/methods.cxx
Backported.
Change-Id: I9d6f95ad3ac38257d492019bd621070491e98e76
Reviewed-on: https://gerrit.libreoffice.org/54421
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
(cherry picked from commit 07a0748243fed290771b8805398b0ca7a52369f7)
diff --git a/basic/source/inc/date.hxx b/basic/source/inc/date.hxx
index 4b28f1d66b02..c0cfd66a5cf7 100644
--- a/basic/source/inc/date.hxx
+++ b/basic/source/inc/date.hxx
@@ -24,7 +24,14 @@
#include <com/sun/star/util/Time.hpp>
#include <com/sun/star/util/DateTime.hpp>
-bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, bool bUseTwoDigitYear, bool bRollOver, double& rdRet );
+enum class SbDateCorrection
+{
+ None,
+ RollOver,
+ TruncateToMonth
+};
+
+bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, bool bUseTwoDigitYear, SbDateCorrection eCorr, double& rdRet );
double implTimeSerial( sal_Int16 nHour, sal_Int16 nMinute, sal_Int16 nSecond);
bool implDateTimeSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay,
sal_Int16 nHour, sal_Int16 nMinute, sal_Int16 nSecond,
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 4a5aaa39a98b..07044ac5e6c5 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -1733,7 +1733,7 @@ css::util::Date SbxDateToUNODate( const SbxValue* const pVal )
void SbxDateFromUNODate( SbxValue *pVal, const css::util::Date& aUnoDate)
{
double dDate;
- if( implDateSerial( aUnoDate.Year, aUnoDate.Month, aUnoDate.Day, false, false, dDate ) )
+ if( implDateSerial( aUnoDate.Year, aUnoDate.Month, aUnoDate.Day, false, SbDateCorrection::None, dDate ) )
{
pVal->PutDate( dDate );
}
@@ -1962,8 +1962,9 @@ void SbRtl_CDateFromIso(StarBASIC *, SbxArray & rPar, bool)
}
double dDate;
- if (!implDateSerial( (sal_Int16)(nSign * aYearStr.toInt32()),
- (sal_Int16)aMonthStr.toInt32(), (sal_Int16)aDayStr.toInt32(), bUseTwoDigitYear, false, dDate ))
+ if (!implDateSerial( static_cast<sal_Int16>(nSign * aYearStr.toInt32()),
+ static_cast<sal_Int16>(aMonthStr.toInt32()), static_cast<sal_Int16>(aDayStr.toInt32()),
+ bUseTwoDigitYear, SbDateCorrection::None, dDate ))
break;
rPar.Get(0)->PutDate( dDate );
@@ -1992,7 +1993,7 @@ void SbRtl_DateSerial(StarBASIC *, SbxArray & rPar, bool)
sal_Int16 nDay = rPar.Get(3)->GetInteger();
double dDate;
- if( implDateSerial( nYear, nMonth, nDay, true, true, dDate ) )
+ if( implDateSerial( nYear, nMonth, nDay, true, SbDateCorrection::RollOver, dDate ) )
{
rPar.Get(0)->PutDate( dDate );
}
@@ -4557,7 +4558,7 @@ sal_Int16 implGetDateYear( double aDate )
}
bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay,
- bool bUseTwoDigitYear, bool bRollOver, double& rdRet )
+ bool bUseTwoDigitYear, SbDateCorrection eCorr, double& rdRet )
{
// XXX NOTE: For VBA years<0 are invalid and years in the range 0..29 and
// 30..99 can not be input as they are 2-digit for 2000..2029 and
@@ -4620,14 +4621,14 @@ bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay,
* documentation would need to be adapted. As is, the DateSerial() runtime
* function works as dumb as documented.. (except that the resulting date
* is checked for validity now and not just day<=31 and month<=12).
- * If change wanted then simply remove overriding bRollOver here and adapt
+ * If change wanted then simply remove overriding RollOver here and adapt
* documentation.*/
#if HAVE_FEATURE_SCRIPTING
- if (!SbiRuntime::isVBAEnabled())
- bRollOver = false;
+ if (eCorr == SbDateCorrection::RollOver && !SbiRuntime::isVBAEnabled())
+ eCorr = SbDateCorrection::None;
#endif
- if (nYear == 0 || (!bRollOver && (nAddMonths || nAddDays || !aCurDate.IsValidDate())))
+ if (nYear == 0 || (eCorr == SbDateCorrection::None && (nAddMonths || nAddDays || !aCurDate.IsValidDate())))
{
#if HAVE_FEATURE_SCRIPTING
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
@@ -4635,13 +4636,29 @@ bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay,
return false;
}
- if (bRollOver)
+ if (eCorr != SbDateCorrection::None)
{
aCurDate.Normalize();
if (nAddMonths)
aCurDate.AddMonths( nAddMonths);
if (nAddDays)
aCurDate.AddDays( nAddDays);
+ if (eCorr == SbDateCorrection::TruncateToMonth && aCurDate.GetMonth() != nMonth)
+ {
+ if (aCurDate.GetYear() == SAL_MAX_INT16 && nMonth == 12)
+ {
+ // Roll over and back not possible, hard max.
+ aCurDate.SetMonth(12);
+ aCurDate.SetDay(31);
+ }
+ else
+ {
+ aCurDate.SetMonth(nMonth);
+ aCurDate.SetDay(1);
+ aCurDate.AddMonths(1);
+ aCurDate.AddDays(-1);
+ }
+ }
}
long nDiffDays = GetDayDiff( aCurDate );
@@ -4664,7 +4681,7 @@ bool implDateTimeSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay,
double& rdRet )
{
double dDate;
- if(!implDateSerial(nYear, nMonth, nDay, false/*bUseTwoDigitYear*/, false/*bRollOver*/, dDate))
+ if(!implDateSerial(nYear, nMonth, nDay, false/*bUseTwoDigitYear*/, SbDateCorrection::None, dDate))
return false;
rdRet += dDate + implTimeSerial(nHour, nMinute, nSecond);
return true;
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index f6d404dd548d..6921fe639f87 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -1898,7 +1898,7 @@ void SbRtl_DateAdd(StarBASIC *, SbxArray & rPar, bool)
nTargetYear16 = limitDate( nTargetYear, nMonth, nDay );
/* TODO: should the result be error if the date was limited? It never was. */
nTargetMonth = nMonth;
- bOk = implDateSerial( nTargetYear16, nTargetMonth, nDay, false, true, dNewDate );
+ bOk = implDateSerial( nTargetYear16, nTargetMonth, nDay, false, SbDateCorrection::TruncateToMonth, dNewDate );
break;
}
case INTERVAL_Q:
@@ -1943,26 +1943,14 @@ void SbRtl_DateAdd(StarBASIC *, SbxArray & rPar, bool)
}
nTargetYear16 = limitDate( nTargetYear, nTargetMonth, nDay );
/* TODO: should the result be error if the date was limited? It never was. */
- bOk = implDateSerial( nTargetYear16, nTargetMonth, nDay, false, true, dNewDate );
+ bOk = implDateSerial( nTargetYear16, nTargetMonth, nDay, false, SbDateCorrection::TruncateToMonth, dNewDate );
break;
}
default: break;
}
if( bOk )
- {
- // Overflow?
- sal_Int16 nNewYear, nNewMonth, nNewDay;
- implGetDayMonthYear( nNewYear, nNewMonth, nNewDay, dNewDate );
- sal_Int16 nCorrectionDay = nDay;
- while( nNewMonth > nTargetMonth )
- {
- nCorrectionDay--;
- implDateSerial( nTargetYear16, nTargetMonth, nCorrectionDay, false, true, dNewDate );
- implGetDayMonthYear( nNewYear, nNewMonth, nNewDay, dNewDate );
- }
dNewDate += dHoursMinutesSeconds;
- }
}
rPar.Get(0)->PutDate( dNewDate );
@@ -2147,7 +2135,7 @@ double implGetDateOfFirstDayInFirstWeek
nFirstWeekMinDays = 7; // vbFirstFourDays
double dBaseDate;
- implDateSerial( nYear, 1, 1, false, false, dBaseDate );
+ implDateSerial( nYear, 1, 1, false, SbDateCorrection::None, dBaseDate );
sal_Int16 nWeekDay0101 = implGetWeekDay( dBaseDate );
sal_Int16 nDayDiff = nWeekDay0101 - nFirstDay;
@@ -2207,7 +2195,7 @@ void SbRtl_DatePart(StarBASIC *, SbxArray & rPar, bool)
{
sal_Int16 nYear = implGetDateYear( dDate );
double dBaseDate;
- implDateSerial( nYear, 1, 1, false, false, dBaseDate );
+ implDateSerial( nYear, 1, 1, false, SbDateCorrection::None, dBaseDate );
nRet = 1 + sal_Int32( dDate - dBaseDate );
break;
}
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index 55539079680e..acee4a5759d3 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -771,7 +771,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const
{
sal_Int16 nYear = implGetDateYear( nNumber );
double dBaseDate;
- implDateSerial( nYear, 1, 1, true, false, dBaseDate );
+ implDateSerial( nYear, 1, 1, true, SbDateCorrection::None, dBaseDate );
sal_Int32 nYear32 = 1 + sal_Int32( nNumber - dBaseDate );
rRes = OUString::number(nYear32);
}
commit db2924ef296b4308ba45077b591da9d9ab4c427b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon May 14 16:50:30 2018 +0100
ofz#7322 lcl_MarkEqualByStart sort logic differs from that of operator==
when it encounters a SwPosition with a SwIndex nContent whose m_pIndexReg is
null and compares to one whose m_pIndexReg is not null, where both have an
m_nIndex of 0.
operator== considers them different, while lcl_MarkEqualByStart doesn't care
and sorts them as equal
Change-Id: I29920b98c9e6f395487de1b9cafa6b1282b2b1b6
Reviewed-on: https://gerrit.libreoffice.org/54342
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
(cherry picked from commit b3aece104b886618552828c168a1b51b3290f38f)
diff --git a/sw/qa/core/data/ww8/pass/ofz7322-1.doc b/sw/qa/core/data/ww8/pass/ofz7322-1.doc
new file mode 100644
index 000000000000..5f4858849acf
Binary files /dev/null and b/sw/qa/core/data/ww8/pass/ofz7322-1.doc differ
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 5fe3a250da5d..ba2279853128 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -225,6 +225,13 @@ namespace
return false;
}
+ bool lcl_MarkEqualByStart(const IDocumentMarkAccess::pMark_t& rpFirst,
+ const IDocumentMarkAccess::pMark_t& rpSecond)
+ {
+ return !lcl_MarkOrderingByStart(rpFirst, rpSecond) &&
+ !lcl_MarkOrderingByStart(rpSecond, rpFirst);
+ }
+
IDocumentMarkAccess::iterator_t lcl_FindMark(
IDocumentMarkAccess::container_t& rMarks,
const IDocumentMarkAccess::pMark_t& rpMarkToFind)
@@ -235,7 +242,7 @@ namespace
// since there are usually not too many marks on the same start
// position, we are not doing a bisect search for the upper bound
// but instead start to iterate from pMarkLow directly
- while(ppCurrentMark != rMarks.end() && **ppCurrentMark == *rpMarkToFind)
+ while (ppCurrentMark != rMarks.end() && lcl_MarkEqualByStart(*ppCurrentMark, rpMarkToFind))
{
if(ppCurrentMark->get() == rpMarkToFind.get())
{
commit 80f6a5f248b4e056a607ad769bc8dc653b9885cc
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Wed May 9 07:29:42 2018 +0200
tdf#117477/tdf#100243: blacklist Intel HD Graphics 630 for Lenovo...
+ Intel(R) Iris(TM) Graphics 550 from
https://cgit.freedesktop.org/libreoffice/core/commit/?id=ecaabbf527f6f6207ce1ca8924708d23e6db45f5
See https://bugs.documentfoundation.org/show_bug.cgi?id=117477#c4
Change-Id: Ifdd55d5b26ae7ef6d635527050296aa69c2244ab
Reviewed-on: https://gerrit.libreoffice.org/54015
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
Reviewed-on: https://gerrit.libreoffice.org/54501
Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>
(cherry picked from commit adbb363120ec68eeb342b3472bb6ad5e8a9ac9c8)
diff --git a/vcl/opengl/opengl_blacklist_windows.xml b/vcl/opengl/opengl_blacklist_windows.xml
index eb1cfc375e73..2c0641ae9b76 100644
--- a/vcl/opengl/opengl_blacklist_windows.xml
+++ b/vcl/opengl/opengl_blacklist_windows.xml
@@ -28,6 +28,12 @@
<entry os="all" vendor="intel" compare="equal" version="20.19.15.4352">
<device id="0x1927"/>
</entry>
+ <!-- tdf#100243 -->
+ <!-- tdf#117477 -->
+ <entry os="all" vendor="intel" compare="equal" version="21.20.16.4664">
+ <device id="0x591b"/>
+ <device id="0x5916"/>
+ </entry>
<entry os="7" vendor="intel">
<device id="all"/>
</entry>
More information about the Libreoffice-commits
mailing list