[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - 16 commits - connectivity/source filter/source forms/source libreofficekit/source lotuswordpro/source sc/source sd/source svx/source sw/qa sw/source vcl/headless vcl/unx xmloff/source
Caolán McNamara
caolanm at redhat.com
Tue Jun 27 12:11:42 UTC 2017
connectivity/source/drivers/dbase/DTable.cxx | 5 ++++
filter/source/msfilter/svdfppt.cxx | 2 +
forms/source/component/ListBox.cxx | 4 ++-
libreofficekit/source/gtk/lokdocview.cxx | 23 ++++++++++++++++++++--
lotuswordpro/source/filter/benlist.cxx | 6 ++---
lotuswordpro/source/filter/benname.cxx | 4 +--
lotuswordpro/source/filter/bento.hxx | 14 ++++++-------
lotuswordpro/source/filter/first.hxx | 2 -
lotuswordpro/source/filter/tocread.cxx | 8 ++++---
sc/source/core/tool/scmatrix.cxx | 13 ++++++++----
sc/source/ui/docshell/docsh.cxx | 6 +++++
sd/source/ui/slideshow/slideshowimpl.cxx | 4 ++-
svx/source/styles/CommonStylePreviewRenderer.cxx | 2 +
svx/source/tbxctrls/grafctrl.cxx | 7 +-----
sw/qa/extras/ooxmlexport/data/tdf107684.odt |binary
sw/qa/extras/ooxmlexport/ooxmlexport9.cxx | 7 ++++++
sw/source/core/layout/newfrm.cxx | 24 +++++++++++++----------
sw/source/filter/ww8/docxattributeoutput.cxx | 4 +--
sw/source/filter/ww8/ww8scan.cxx | 15 ++++++++++++--
vcl/headless/svpbmp.cxx | 10 ++++++++-
vcl/unx/gtk3/gtk3gtkframe.cxx | 5 ++++
xmloff/source/text/txtflde.cxx | 21 +++-----------------
22 files changed, 125 insertions(+), 61 deletions(-)
New commits:
commit ab2538cfb69f1c2c955ab3395fa1b8dc6a7fd36f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jun 16 09:42:47 2017 +0100
Resolves: tdf#108419 use spinfield preferred size as transparency widget size
Change-Id: I7b5c8aeb087efe007c687dc1f206bcb0e8b0173e
Reviewed-on: https://gerrit.libreoffice.org/38866
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
(cherry picked from commit 459914cd491598c32cad203fed6c7b90491f6a52)
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 114f23f0fe03..6c231f47cfc1 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -91,11 +91,8 @@ ImplGrafMetricField::ImplGrafMetricField( vcl::Window* pParent, const OUString&
maCommand( rCmd ),
mxFrame( rFrame )
{
- Size aSize( GetTextWidth( "-100 %" ), GetTextHeight() );
-
- aSize.Width() += 20;
- aSize.Height() += 6;
- SetSizePixel( aSize );
+ Size aSize(CalcMinimumSizeForText("-100 %"));
+ SetSizePixel(aSize);
if ( maCommand == ".uno:GrafGamma" )
{
commit 18428f127a9c721c10a26e2303c3dc80fe4ee309
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 26 13:21:49 2017 +0100
ofz#2392 restored props don't match saved props
Change-Id: Idb198f0121ac9c6b4083b157af07c5eb1cda66cb
Reviewed-on: https://gerrit.libreoffice.org/39267
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
(cherry picked from commit 63f5d076c1a79a125f01c140469fdf797bb7f120)
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index a435d7ecbc5a..ec3dc11da85c 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -5337,8 +5337,19 @@ void WW8PLCFxDesc::Restore( const WW8PLCFxSave1& rSave )
pPLCFx->GetSprms(&aD);
pPLCFx->SetDirty(false);
aD.ReduceByOffset();
- pMemPos = aD.pMemPos + rSave.nPLCFxMemOfs;
- nSprmsLen = nOrigSprmsLen - rSave.nPLCFxMemOfs;
+
+ if (nOrigSprmsLen > aD.nSprmsLen)
+ {
+ //two entries exist for the same offset, cut and run
+ SAL_WARN("sw.ww8", "restored properties don't match saved properties, bailing out");
+ nSprmsLen = 0;
+ pMemPos = nullptr;
+ }
+ else
+ {
+ nSprmsLen = nOrigSprmsLen - rSave.nPLCFxMemOfs;
+ pMemPos = aD.pMemPos + rSave.nPLCFxMemOfs;
+ }
}
}
}
commit 0407f4b518b437b0277c7a9d8246436675b1e6b1
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Sat Jun 24 15:10:59 2017 +0200
tdf#108732 ListBox: in absence of a field, treat data as string
so that one meaningfully compare it; default is DataType::OTHER,
which is not comparable
Change-Id: Ifc1e1c9b801f45d0a95a83d30cc205b91e647880
Reviewed-on: https://gerrit.libreoffice.org/39211
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
(cherry picked from commit 39ea36bf8602744c27c16369c88db2858653b59f)
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index d5599d55859e..b875eef1d15c 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -1070,7 +1070,9 @@ namespace frm
sal_Int32 OListBoxModel::getValueType() const
{
- return (m_nBoundColumnType != css::sdbc::DataType::SQLNULL) ? m_nBoundColumnType : getFieldType();
+ return (m_nBoundColumnType != css::sdbc::DataType::SQLNULL) ?
+ m_nBoundColumnType :
+ ( hasField() ? getFieldType() : DataType::VARCHAR);
}
ValueList OListBoxModel::impl_getValues() const
commit 36c76cd04a093af506a99b4db8dc397e68f1cddc
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jun 22 17:22:17 2017 +0100
Resolves: tdf#108475 swipe only if some reasonable movement was involved
Change-Id: I5ee2a60f80728a2cca1401e43c8e27f852bfc657
Reviewed-on: https://gerrit.libreoffice.org/39118
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: David Tardon <dtardon at redhat.com>
(cherry picked from commit be95033358460a3c411016297eb45a042460d4c2)
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 80b8dd5ef504..e3d5a4c59c29 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -1187,8 +1187,10 @@ bool SlideshowImpl::swipe(const CommandSwipeData &rSwipeData)
{
if (mbUsePen || mnContextMenuEvent)
return false;
-
double nVelocityX = rSwipeData.getVelocityX();
+ // tdf#108475 make it swipe only if some reasonable movement was involved
+ if (fabs(nVelocityX) < 50)
+ return false;
if (nVelocityX > 0)
{
gotoPreviousSlide();
commit 5aa307030e03cf5d20265c597b029de942f718cc
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Fri Jun 23 23:55:50 2017 +0200
tdf#40713: dBASE, don't lose dbt file
if aDbtFile corresponds exactly to aTmpFile, we just have to return
Reviewed-on: https://gerrit.libreoffice.org/39189
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
(cherry picked from commit 36d91a65ab2db0c4c81e09771f6b44e1905122a0)
Change-Id: I1dde8efbe01838dc94f6025d5b81f5aee01932ac
Reviewed-on: https://gerrit.libreoffice.org/39196
Reviewed-by: Lionel Elie Mamane <lionel at mamane.lu>
Tested-by: Jenkins <ci at libreoffice.org>
(cherry picked from commit e9cb227d3fd65ea46ffb926f2babb1926e5f2133)
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 9b12c99a25d5..f0214bd46cf5 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -2394,6 +2394,12 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
static_cast<const SfxStringItem*>( rMed.GetItemSet()->GetItem( SID_FILE_NAME ) );
INetURLObject aDbtFile( pNameItem->GetValue(), INetProtocol::File );
aDbtFile.setExtension("dbt");
+
+ // tdf#40713: don't lose dbt file
+ // if aDbtFile corresponds exactly to aTmpFile, we just have to return
+ if (aDbtFile.GetMainURL( INetURLObject::DecodeMechanism::DECODE_UNAMBIGUOUS ) == aTmpFile.GetMainURL( INetURLObject::DecodeMechanism::DECODE_UNAMBIGUOUS ))
+ return bRet;
+
if ( IsDocument( aDbtFile ) && !KillFile( aDbtFile ) )
bRet = false;
if ( bRet && !MoveFile( aTmpFile, aDbtFile ) )
commit bf8afaddc581f7305d61a3c4a66f84439b7cf0e5
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sun Jun 11 09:34:47 2017 +0200
tdf#55631: DBASE import (take 2)
if we can't read head db_frei part, let's also put by default
m_eEncoding = RTL_TEXTENCODING_IBM_850;
Change-Id: I97601ba4c782dcfc280e975cc4498ea68407dd48
Reviewed-on: https://gerrit.libreoffice.org/38659
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Muthu Subramanian K <muthusuba at gmail.com>
(cherry picked from commit 58bb9da339d61981d45cde8e38a2ce1ae33652c4)
Reviewed-on: https://gerrit.libreoffice.org/38707
Reviewed-by: Lionel Elie Mamane <lionel at mamane.lu>
(cherry picked from commit 954931c86cf67876c8324acec31c3e95feeb6b4d)
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 11d35d1359a1..9c3e777e74e2 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -280,6 +280,11 @@ void ODbaseTable::readHeader()
break;
}
}
+ else
+ {
+ // Default Encoding
+ m_eEncoding = RTL_TEXTENCODING_IBM_850;
+ }
break;
case dBaseIVMemo:
m_pFileStream->SetEndian(SvStreamEndian::LITTLE);
commit 58b2bfb4f098aab25e45eef43b5f8449cdb2a830
Author: Eike Rathke <erack at redhat.com>
Date: Wed Jun 21 23:42:25 2017 +0200
Resolves: tdf#108292 WalkAndMatchElements: really limit the match
... to the columns queried, not just when entering an mdds node. Otherwise it
would return an unexpected index, plus bailing out early spares unnecessary
comparisons for the rest of a node block.
Regression of
commit 3fed166279377f7ad702b8911899243b8adff3bf
Date: Fri Aug 16 16:29:38 2013 +0200
that started to use
commit 7334f8db6f6004d48e2dbf014f27878a7ae21eb1
Date: Fri Aug 16 16:29:27 2013 +0200
with its bad implementation.
Just that VLOOKUP on a matrix with a larger block of same typed data as the
query *and* a match in an excess column seems to be rare..
Change-Id: Ia4ef3fd56490de82910d5aa13a84be2de851f9b0
(cherry picked from commit d3b77628efc72d857c63c8fb91d7ed2b499ac860)
Reviewed-on: https://gerrit.libreoffice.org/39082
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
(cherry picked from commit f8f29503cc4fda0a2f3750f82ac5d7f784bdf0f6)
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 273a5fb6685e..1807a11c53cc 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -1281,6 +1281,8 @@ public:
size_t getMatching() const { return mnResult; }
+ size_t getRemainingCount() const { return ((mnCol2 + 1) * maSize.row) - mnIndex; }
+
size_t compare(const MatrixImplType::element_block_node_type& node) const;
void operator() (const MatrixImplType::element_block_node_type& node)
@@ -1290,7 +1292,7 @@ public:
return;
// limit lookup to the requested columns
- if ((mnCol1 * maSize.row) <= mnIndex && mnIndex < ((mnCol2 + 1) * maSize.row))
+ if ((mnCol1 * maSize.row) <= mnIndex && getRemainingCount() > 0)
{
mnResult = compare(node);
}
@@ -1311,7 +1313,8 @@ size_t WalkAndMatchElements<double>::compare(const MatrixImplType::element_block
block_type::const_iterator it = block_type::begin(*node.data);
block_type::const_iterator itEnd = block_type::end(*node.data);
- for (; it != itEnd; ++it, nCount++)
+ const size_t nRemaining = getRemainingCount();
+ for (; it != itEnd && nCount < nRemaining; ++it, ++nCount)
{
if (*it == maMatchValue)
{
@@ -1326,7 +1329,8 @@ size_t WalkAndMatchElements<double>::compare(const MatrixImplType::element_block
block_type::const_iterator it = block_type::begin(*node.data);
block_type::const_iterator itEnd = block_type::end(*node.data);
- for (; it != itEnd; ++it, ++nCount)
+ const size_t nRemaining = getRemainingCount();
+ for (; it != itEnd && nCount < nRemaining; ++it, ++nCount)
{
if (int(*it) == maMatchValue)
{
@@ -1356,7 +1360,8 @@ size_t WalkAndMatchElements<svl::SharedString>::compare(const MatrixImplType::el
block_type::const_iterator it = block_type::begin(*node.data);
block_type::const_iterator itEnd = block_type::end(*node.data);
- for (; it != itEnd; ++it, ++nCount)
+ const size_t nRemaining = getRemainingCount();
+ for (; it != itEnd && nCount < nRemaining; ++it, ++nCount)
{
if (it->getDataIgnoreCase() == maMatchValue.getDataIgnoreCase())
{
commit 9d659026eed7608c52cbf6c6f76f45fea957b048
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jun 20 11:44:47 2017 +0100
tdf#93968 bullet char style preview is unreadable, cause uses opensymbol
Change-Id: I1bd0a0e85c9d956184680d7e15709b3a7b590c30
Reviewed-on: https://gerrit.libreoffice.org/39010
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-on: https://gerrit.libreoffice.org/39053
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
(cherry picked from commit d8e6d7a86adb102ae1bb4df99ef73ebead962105)
diff --git a/svx/source/styles/CommonStylePreviewRenderer.cxx b/svx/source/styles/CommonStylePreviewRenderer.cxx
index 94da71084d82..b2acf184b79d 100644
--- a/svx/source/styles/CommonStylePreviewRenderer.cxx
+++ b/svx/source/styles/CommonStylePreviewRenderer.cxx
@@ -133,6 +133,8 @@ bool CommonStylePreviewRenderer::recalculate()
if ((pItem = pItemSet->GetItem(SID_ATTR_CHAR_FONT)) != nullptr)
{
const SvxFontItem* pFontItem = static_cast<const SvxFontItem*>(pItem);
+ if (IsStarSymbol(pFontItem->GetFamilyName()))
+ return false;
pFont->SetFamilyName(pFontItem->GetFamilyName());
pFont->SetStyleName(pFontItem->GetStyleName());
}
commit 6a5af3ae11040111744fce015d0a22a6e78cd0f8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jun 23 12:48:12 2017 +0100
Resolves: tdf#108705 remove grabs on widget before destroying it
Change-Id: If02a0b4340788db638c74b98e855258145643452
Reviewed-on: https://gerrit.libreoffice.org/39167
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
(cherry picked from commit d8677b79fedda8a13f560e1a9a7ca8b36642366b)
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 67caeb516770..95cad3d56a0a 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -832,6 +832,11 @@ GtkSalFrame::~GtkSalFrame()
delete m_pIMHandler;
+ //tdf#108705 remove grabs on event widget before
+ //destroying event widget
+ while (m_nGrabLevel)
+ removeGrabLevel();
+
GtkWidget *pEventWidget = getMouseEventWidget();
for (auto handler_id : m_aMouseSignalIds)
g_signal_handler_disconnect(G_OBJECT(pEventWidget), handler_id);
commit 47355dacfc59895afb16a3b48bb344b8f466aae9
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Jun 22 10:39:36 2017 +0200
tdf#101821 sw: fix layout footnote use-after-free in SwRootFrame
The ClearSwLayouterEntries() accesses anchored objects and if they are
anchored in footnotes then RemoveFootnotes() has already deleted them.
(regression from 962d0500c4debaef43e5f146e47e08c66d851562)
Invalid write of size 1
at 0x4143CCB3: SwAnchoredObject::SetTmpConsiderWrapInfluence(bool) (anchoredobject.cxx:739)
by 0x414D8A21: SwObjsMarkedAsTmpConsiderWrapInfluence::Clear() (objstmpconsiderwrapinfl.cxx:58)
by 0x414C943E: SwLayouter::ClearObjsTmpConsiderWrapInfluence(SwDoc const&) (layouter.cxx:401)
by 0x411DBE57: sw::DocumentLayoutManager::ClearSwLayouterEntries() (DocumentLayoutManager.cxx:504)
by 0x414D05D9: SwRootFrame::DestroyImpl() (newfrm.cxx:594)
by 0x41535AB3: SwFrame::DestroyFrame(SwFrame*) (ssfrm.cxx:389)
by 0x419E8171: std::_Sp_counted_deleter<SwRootFrame*, void (*)(SwFrame*), std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (shared_ptr_base.h:464)
by 0x40EB6DB5: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:150)
by 0x40EB5E76: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() (shared_ptr_base.h:662)
by 0x419E65F9: std::__shared_ptr<SwRootFrame, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() (shared_ptr_base.h:928)
by 0x419E6615: std::shared_ptr<SwRootFrame>::~shared_ptr() (shared_ptr.h:93)
by 0x419E619D: SwViewShell::~SwViewShell() (vnew.cxx:285)
Address 0x5feb6eee is 334 bytes inside a block of size 488 free'd
at 0x4C2F21A: operator delete(void*) (vg_replace_malloc.c:576)
by 0x41488962: SwFlyAtContentFrame::~SwFlyAtContentFrame() (flyfrms.hxx:134)
by 0x41535AFC: SwFrame::DestroyFrame(SwFrame*) (ssfrm.cxx:391)
by 0x415360BD: SwLayoutFrame::DestroyImpl() (ssfrm.cxx:477)
by 0x41535AB3: SwFrame::DestroyFrame(SwFrame*) (ssfrm.cxx:389)
by 0x414A2FF4: sw_RemoveFootnotes(SwFootnoteBossFrame*, bool, bool) (ftnfrm.cxx:852)
by 0x414A3104: sw_RemoveFootnotes(SwFootnoteBossFrame*, bool, bool) (ftnfrm.cxx:874)
by 0x414A321A: SwRootFrame::RemoveFootnotes(SwPageFrame*, bool, bool) (ftnfrm.cxx:897)
by 0x414D0558: SwRootFrame::DestroyImpl() (newfrm.cxx:585)
by 0x41535AB3: SwFrame::DestroyFrame(SwFrame*) (ssfrm.cxx:389)
by 0x419E8171: std::_Sp_counted_deleter<SwRootFrame*, void (*)(SwFrame*), std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (shared_ptr_base.h:464)
by 0x40EB6DB5: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:150)
by 0x40EB5E76: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() (shared_ptr_base.h:662)
by 0x419E65F9: std::__shared_ptr<SwRootFrame, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() (shared_ptr_base.h:928)
by 0x419E6615: std::shared_ptr<SwRootFrame>::~shared_ptr() (shared_ptr.h:93)
by 0x419E619D: SwViewShell::~SwViewShell() (vnew.cxx:285)
Change-Id: I147f46d49c90de46189ad34feed66c289adddc15
(cherry picked from commit c7782c7c27d85866872cc24a618df02504ff12ca)
Reviewed-on: https://gerrit.libreoffice.org/39106
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen at libreoffice.org>
(cherry picked from commit 6d4a041fe81b36e1e8f933bfe4216afcea72c76d)
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index b5785c4b0330..4de02e342015 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -573,16 +573,6 @@ void SwRootFrame::DestroyImpl()
{
mbTurboAllowed = false;
mpTurbo = nullptr;
- // fdo#39510 crash on document close with footnotes
- // Object ownership in writer and esp. in layout are a mess: Before the
- // document/layout split SwDoc and SwRootFrame were essentially one object
- // and magically/uncleanly worked around their common destruction by call
- // to SwDoc::IsInDtor() -- even from the layout. As of now destruction of
- // the layout proceeds forward through the frames. Since SwTextFootnote::DelFrames
- // also searches backwards to find the master of footnotes, they must be
- // considered to be owned by the SwRootFrame and also be destroyed here,
- // before tearing down the (now footnote free) rest of the layout.
- RemoveFootnotes(nullptr, false, true);
if(pBlink)
pBlink->FrameDelete( this );
@@ -591,8 +581,11 @@ void SwRootFrame::DestroyImpl()
{
SwDoc *pDoc = pRegisteredInNonConst->GetDoc();
pDoc->DelFrameFormat( pRegisteredInNonConst );
+ // do this before calling RemoveFootnotes() because footnotes
+ // can contain anchored objects
pDoc->GetDocumentLayoutManager().ClearSwLayouterEntries();
}
+
delete mpDestroy;
mpDestroy = nullptr;
@@ -606,6 +599,17 @@ void SwRootFrame::DestroyImpl()
// Some accessible shells are left => problems on second SwFrame::Destroy call
assert(0 == mnAccessibleShells);
+ // fdo#39510 crash on document close with footnotes
+ // Object ownership in writer and esp. in layout are a mess: Before the
+ // document/layout split SwDoc and SwRootFrame were essentially one object
+ // and magically/uncleanly worked around their common destruction by call
+ // to SwDoc::IsInDtor() -- even from the layout. As of now destruction of
+ // the layout proceeds forward through the frames. Since SwTextFootnote::DelFrames
+ // also searches backwards to find the master of footnotes, they must be
+ // considered to be owned by the SwRootFrame and also be destroyed here,
+ // before tearing down the (now footnote free) rest of the layout.
+ RemoveFootnotes(nullptr, false, true);
+
SwLayoutFrame::DestroyImpl();
}
commit 3ed6eb923ccab39fdc5f835198200a0b07caf92a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 12 12:00:44 2017 +0100
ofz: use our own OString instead
Reviewed-on: https://gerrit.libreoffice.org/37535
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 b5302844af49cc25c0720f3c2dccbdc0380d3b50)
Change-Id: I583a95aea0b29878bf4749a8cb2bb684da6da1e5
ofz: use OString instead of bare char*
Change-Id: I2f7bfbd62c0a5477f0cbb38e86684db4fdb9c37f
Reviewed-on: https://gerrit.libreoffice.org/38958
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
(cherry picked from commit 490a3e3bd98b300b5805891084fb7f09442ac7ea)
diff --git a/lotuswordpro/source/filter/benlist.cxx b/lotuswordpro/source/filter/benlist.cxx
index 242d8d14f07e..fb18bd0ea1ea 100644
--- a/lotuswordpro/source/filter/benlist.cxx
+++ b/lotuswordpro/source/filter/benlist.cxx
@@ -58,7 +58,7 @@ namespace OpenStormBento
{
pCBenNamedObject
-FindNamedObject(pCUtList pList, const char * sName,
+FindNamedObject(pCUtList pList, const OString& rName,
pCUtListElmt * ppPrev)
{
CUtListElmt& rTerminating = pList->GetTerminating();
@@ -68,8 +68,8 @@ FindNamedObject(pCUtList pList, const char * sName,
pCBenNamedObjectListElmt pCurrNamedObjectListElmt =
static_cast<pCBenNamedObjectListElmt>(pCurr);
- int Comp = strcmp(sName, pCurrNamedObjectListElmt->GetNamedObject()->
- GetNameCStr());
+ sal_Int32 Comp = rName.compareTo(pCurrNamedObjectListElmt->GetNamedObject()->
+ GetName());
if (Comp == 0)
return pCurrNamedObjectListElmt->GetNamedObject();
diff --git a/lotuswordpro/source/filter/benname.cxx b/lotuswordpro/source/filter/benname.cxx
index 32855fbd73a3..19003a0c5f04 100644
--- a/lotuswordpro/source/filter/benname.cxx
+++ b/lotuswordpro/source/filter/benname.cxx
@@ -59,10 +59,10 @@ namespace OpenStormBento
{
// changed to remove warning
CBenNamedObject::CBenNamedObject(pLtcBenContainer pContainer,
- BenObjectID ObjectID, pCBenObject pPrevObject, const char * sName,
+ BenObjectID ObjectID, pCBenObject pPrevObject, const OString& rName,
pCUtListElmt pPrevNamedObjectListElmt)
: CBenObject(pContainer, ObjectID, pPrevObject)
- , csName(sName)
+ , csName(rName)
, cNameListElmt(pPrevNamedObjectListElmt)
{
cNameListElmt.SetNamedObject(this);
diff --git a/lotuswordpro/source/filter/bento.hxx b/lotuswordpro/source/filter/bento.hxx
index af08bcb1a7ee..cb72273e4e18 100644
--- a/lotuswordpro/source/filter/bento.hxx
+++ b/lotuswordpro/source/filter/bento.hxx
@@ -344,13 +344,13 @@ public: // Methods
public: // Internal methods
CBenNamedObject(pLtcBenContainer pContainer, BenObjectID ObjectID,
- pCBenObject pPrevObject, const char * sName,
+ pCBenObject pPrevObject, const OString& rName,
pCUtListElmt pPrevNamedObjectListElmt);
- const char * GetNameCStr() { return csName.c_str(); }
+ const OString& GetName() { return csName; }
private: // Data
- std::string csName;
+ OString csName;
CBenNamedObjectListElmt cNameListElmt;
};
@@ -358,9 +358,9 @@ class CBenPropertyName : public CBenNamedObject
{
public: // Internal methods
CBenPropertyName(pLtcBenContainer pContainer, BenObjectID ObjectID,
- pCBenObject pPrevObject, const char * sName,
+ pCBenObject pPrevObject, const OString& rName,
pCUtListElmt pPrevNamedObjectListElmt) :
- CBenNamedObject(pContainer, ObjectID, pPrevObject, sName,
+ CBenNamedObject(pContainer, ObjectID, pPrevObject, rName,
pPrevNamedObjectListElmt) { ; }
virtual bool IsPropertyName() override;
};
@@ -369,9 +369,9 @@ class CBenTypeName : public CBenNamedObject
{
public: // Internal methods
CBenTypeName(pLtcBenContainer pContainer, BenObjectID ObjectID,
- pCBenObject pPrevObject, const char * sName,
+ pCBenObject pPrevObject, const OString& rName,
pCUtListElmt pPrevNamedObjectListElmt) :
- CBenNamedObject(pContainer, ObjectID, pPrevObject, sName,
+ CBenNamedObject(pContainer, ObjectID, pPrevObject, rName,
pPrevNamedObjectListElmt) { ; }
};
diff --git a/lotuswordpro/source/filter/first.hxx b/lotuswordpro/source/filter/first.hxx
index 37311920a0ce..f65ed3248722 100644
--- a/lotuswordpro/source/filter/first.hxx
+++ b/lotuswordpro/source/filter/first.hxx
@@ -64,7 +64,7 @@ namespace OpenStormBento
// String constants
extern const char gsBenMagicBytes[];
-pCBenNamedObject FindNamedObject(pCUtList pList, const char * sName,
+pCBenNamedObject FindNamedObject(pCUtList pList, const OString& rName,
pCUtListElmt * ppPrev);
pCBenIDListElmt FindID(pCUtList pList, BenObjectID ObjectID,
diff --git a/lotuswordpro/source/filter/tocread.cxx b/lotuswordpro/source/filter/tocread.cxx
index 73f9ccb5f329..335b82abfa0b 100644
--- a/lotuswordpro/source/filter/tocread.cxx
+++ b/lotuswordpro/source/filter/tocread.cxx
@@ -288,9 +288,11 @@ CBenTOCReader::ReadTOC()
return Err;
}
+ OString sName(sBuffer, Length);
+
pCUtListElmt pPrevNamedObjectListElmt;
if (FindNamedObject(&cpContainer->GetNamedObjects(),
- sBuffer, &pPrevNamedObjectListElmt) != nullptr)
+ sName, &pPrevNamedObjectListElmt) != nullptr)
{
delete[] sAllocBuffer;
return BenErr_DuplicateName;
@@ -301,9 +303,9 @@ CBenTOCReader::ReadTOC()
if (PropertyID == BEN_PROPID_GLOBAL_PROPERTY_NAME)
pObject = new CBenPropertyName(cpContainer, ObjectID,
- pPrevObject, sBuffer, pPrevNamedObjectListElmt);
+ pPrevObject, sName, pPrevNamedObjectListElmt);
else pObject = new CBenTypeName(cpContainer, ObjectID,
- pPrevObject, sBuffer, pPrevNamedObjectListElmt);
+ pPrevObject, sName, pPrevNamedObjectListElmt);
delete[] sAllocBuffer;
}
commit 3321b50cbcf2b1d29f1b3c430cf1c164aba343fa
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jun 16 15:30:10 2017 +0100
Resolves: rhbz#1454693 segv if tiled rendering is interrupted
Change-Id: I1131f246c43806adb8a83f6eeafca2b734851a0e
Reviewed-on: https://gerrit.libreoffice.org/38890
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
(cherry picked from commit c9eb6c7162a29a36f96d83c3dbe21d4e89df1470)
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index 1d87f5bd17b0..9a8c00b875b2 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -1148,6 +1148,14 @@ callback (gpointer pData)
LOKDocView* pDocView = LOK_DOC_VIEW (pCallback->m_pDocView);
LOKDocViewPrivate& priv = getPrivate(pDocView);
+ //callback registered before the widget was destroyed.
+ //Use existance of lokThreadPool as flag it was torn down
+ if (!priv->lokThreadPool)
+ {
+ delete pCallback;
+ return G_SOURCE_REMOVE;
+ }
+
switch (pCallback->m_nType)
{
case LOK_CALLBACK_INVALIDATE_TILES:
@@ -2619,8 +2627,19 @@ static void lok_doc_view_finalize (GObject* object)
std::stringstream ss;
ss << "lok::Document::setView(" << priv->m_nViewId << ")";
g_info("%s", ss.str().c_str());
- priv->m_pDocument->pClass->setView(priv->m_pDocument, priv->m_nViewId);
- priv->m_pDocument->pClass->registerCallback(priv->m_pDocument, nullptr, nullptr);
+
+ if (priv->m_pDocument)
+ {
+ priv->m_pDocument->pClass->setView(priv->m_pDocument, priv->m_nViewId);
+ priv->m_pDocument->pClass->registerCallback(priv->m_pDocument, nullptr, nullptr);
+ }
+
+ if (priv->lokThreadPool)
+ {
+ g_thread_pool_free(priv->lokThreadPool, true, true);
+ priv->lokThreadPool = nullptr;
+ }
+
aGuard.unlock();
if (priv->m_pDocument && priv->m_pDocument->pClass->getViewsCount(priv->m_pDocument) > 1)
commit ce98a72ec7d69c74b97c924418682f76033bc220
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon May 29 11:25:58 2017 +0200
tdf#107684 DOCX export: fix duplicated <w:outlineLvl> element for styles
Next to the existing OutlineNumbering() (which is only used for styles),
commit fd2d14d5543c82eb875e720c98b51518699a8fbc (Implement DOCX export
of paragraph outline level, 2013-10-04) added ParaOutlineLevel() to the
attribute output class that also wrote the outline level of a paragraph
(style), but worked for the cases when the style was imported by
writerfilter as well.
As a side-effect styles imported by xmloff now have their outline level
property handled twice, leading to duplicated elements.
Fix the problem by only writing <w:outlineLvl> in ParaOutlineLevel():
it covers both use-cases, so no need to do anything in
OutlineNumbering().
Reviewed-on: https://gerrit.libreoffice.org/38132
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Jenkins <ci at libreoffice.org>
(cherry picked from commit fe13c249c8964355e39869a357c393f3208b6def)
Reviewed-on: https://gerrit.libreoffice.org/38637
Reviewed-by: Michael Stahl <mstahl at redhat.com>
(cherry picked from commit 35e62d9e649badfe00d0b8ea4c307d3fbbda735c)
Change-Id: Ic982dd70a00609cdfc3744a8ab69aaa828410fd0
diff --git a/sw/qa/extras/ooxmlexport/data/tdf107684.odt b/sw/qa/extras/ooxmlexport/data/tdf107684.odt
new file mode 100644
index 000000000000..0ca7c53d23f3
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf107684.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index aa73ed26ddad..40601461c308 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -374,6 +374,13 @@ DECLARE_OOXMLEXPORT_TEST(testTdf108682, "tdf108682.docx")
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(459), aLineSpacing.Height);
}
+DECLARE_OOXMLEXPORT_TEST(testTdf107684, "tdf107684.odt")
+{
+ if (xmlDocPtr pXmlDoc = parseExport("word/styles.xml"))
+ // This was 1, <w:outlineLvl> was duplicated for Heading1.
+ assertXPath(pXmlDoc, "//w:style[@w:styleId='Heading1']/w:pPr/w:outlineLvl", 1);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index efda989e3f44..d6d0f5dd2a7c 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -5394,9 +5394,9 @@ void lcl_OutlineLevel(sax_fastparser::FSHelperPtr const & pSerializer, sal_uInt1
}
-void DocxAttributeOutput::OutlineNumbering(sal_uInt8 const nLvl)
+void DocxAttributeOutput::OutlineNumbering(sal_uInt8 const /*nLvl*/)
{
- lcl_OutlineLevel(m_pSerializer, nLvl);
+ // Handled by ParaOutlineLevel() instead.
}
void DocxAttributeOutput::ParaOutlineLevel(const SfxUInt16Item& rItem)
commit f7dd446502971eca44d06dd205ebf3e8c63075a2
Author: Eike Rathke <erack at redhat.com>
Date: Tue Jun 20 12:59:23 2017 +0200
Resolves: tdf#107438 write <text:sender-initials> for fields
Only in <office:annotation> context write <loext:sender-initials>
Broken since
commit 5f8476c00f482ab5c8707de2ebdcd41faa4057fc
Date: Fri Dec 13 23:21:46 2013 +0100
and
commit 49f9694e34d07468cff4a7e4de332f11be3e0dd8
Date: Fri Dec 13 23:30:34 2013 +0100
Change-Id: I48b146b779878bf0faa5830a721559d8e864dd33
(cherry picked from commit 29f250c428953750ce89dec7ee961723478609c1)
Reviewed-on: https://gerrit.libreoffice.org/39012
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
(cherry picked from commit cfb44fa3fa5449319c61023b9f9fb52ae87acc04)
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index 26cea156ca73..d73e37058cb4 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -2230,23 +2230,10 @@ void XMLTextFieldExport::ExportElement(enum XMLTokenEnum eElementName,
if (eElementName != XML_TOKEN_INVALID)
{
// Element
- if (eElementName == XML_SENDER_INITIALS)
- {
- if (SvtSaveOptions().GetODFDefaultVersion() > SvtSaveOptions::ODFVER_012)
- {
- SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_LO_EXT,
- eElementName, false, false );
- // export content
- GetExport().Characters(sContent);
- }
- }
- else
- {
- SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT,
- eElementName, false, false );
- // export content
- GetExport().Characters(sContent);
- }
+ SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT,
+ eElementName, false, false );
+ // export content
+ GetExport().Characters(sContent);
} else {
// always export content
GetExport().Characters(sContent);
commit f14e2ad6e0afea83f01f2de89f574a2f01aec288
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Jun 17 21:16:34 2017 +0100
ofz#2287 check multiply
Change-Id: Ibc4c93ac1f5686a476b5e303347dc951daa58e33
Reviewed-on: https://gerrit.libreoffice.org/38911
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Eike Rathke <erack at redhat.com>
(cherry picked from commit 67caad3c98d045b8de3e4bf2f63efda2e9d8cc48)
diff --git a/vcl/headless/svpbmp.cxx b/vcl/headless/svpbmp.cxx
index 71c5e52586c6..02aa41b66bc5 100644
--- a/vcl/headless/svpbmp.cxx
+++ b/vcl/headless/svpbmp.cxx
@@ -135,7 +135,15 @@ BitmapBuffer* ImplCreateDIB(
try
{
- size_t size = pDIB->mnScanlineSize * pDIB->mnHeight;
+ size_t size;
+ bFail = o3tl::checked_multiply<size_t>(pDIB->mnHeight, pDIB->mnScanlineSize, size);
+ SAL_WARN_IF(bFail, "vcl.gdi", "checked multiply failed");
+ if (bFail)
+ {
+ delete pDIB;
+ return nullptr;
+ }
+
pDIB->mpBits = new sal_uInt8[size];
#ifdef __SANITIZE_ADDRESS__
if (!pDIB->mpBits)
commit 4158828a469093f4f0a2fbcb1c2fd733934ddffe
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jun 21 09:16:33 2017 +0100
ofz#2332 fix dangling pCObj
Change-Id: Ifa62b1ce2aefa939cfceb2e110d126b785cb6e26
Reviewed-on: https://gerrit.libreoffice.org/39035
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Eike Rathke <erack at redhat.com>
(cherry picked from commit d185c58fcf8d7b82bc84b16b56020c3fbaf2a876)
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index f7f9c18117ee..efbb46db0c89 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -2914,6 +2914,8 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry*
pPtr->pAObj = nullptr;
if (pPtr->pBObj == rSlidePersist.pBObj)
pPtr->pBObj = nullptr;
+ if (pPtr->pCObj == rSlidePersist.pBObj)
+ pPtr->pCObj = nullptr;
}
}
SdrObject::Free(rSlidePersist.pBObj);
More information about the Libreoffice-commits
mailing list