[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - 6 commits - chart2/source dbaccess/source external/libstaroffice filter/source sw/source

Michael Stahl mstahl at redhat.com
Mon Jun 12 09:16:32 UTC 2017


 chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx         |    2 
 dbaccess/source/ui/misc/TokenWriter.cxx                             |    2 
 external/libstaroffice/0001-ofz-1029-use-correct-loop-index.patch.1 |   27 ++++++++++
 external/libstaroffice/UnpackedTarball_libstaroffice.mk             |    1 
 filter/source/graphicfilter/ieps/ieps.cxx                           |    8 +-
 sw/source/uibase/fldui/fldmgr.cxx                                   |    4 +
 sw/source/uibase/shells/frmsh.cxx                                   |    6 +-
 7 files changed, 43 insertions(+), 7 deletions(-)

New commits:
commit 5aa3c571d3d60a75b09a83f2f52b47b759b02edb
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Jun 7 17:47:15 2017 +0200

    tdf#108305 sw: fix crash on fly "Position and Size"
    
    Everything else in SwFrameShell::Execute() checks pArgs isn't null so do
    the same here.
    
    (regression from d02f75a8c36705924ddd6a5921fe3012fafce812)
    
    Change-Id: I73d85b111a5d2c088b9d888b8595ceb3979e8d2b
    (cherry picked from commit 28d760e5220a175a5eb8e859498baa4c7f97f3e2)
    Reviewed-on: https://gerrit.libreoffice.org/38521
    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 e64a85d50dbd4db7a3de1ee2f6caf52cc60f6a50)

diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index 2a6ad96916c8..a70097dcc0b3 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -351,13 +351,15 @@ void SwFrameShell::Execute(SfxRequest &rReq)
             bool bApplyNewSize = false;
 
             Size aNewSize = aMgr.GetSize();
-            if ( SfxItemState::SET == pArgs->GetItemState( SID_ATTR_TRANSFORM_WIDTH, false, &pItem ) )
+            if (pArgs &&
+                SfxItemState::SET == pArgs->GetItemState(SID_ATTR_TRANSFORM_WIDTH, false, &pItem))
             {
                 aNewSize.setWidth( static_cast< const SfxUInt32Item* >(pItem)->GetValue() );
                 bApplyNewSize = true;
             }
 
-            if ( SfxItemState::SET == pArgs->GetItemState( SID_ATTR_TRANSFORM_HEIGHT, false, &pItem ) )
+            if (pArgs &&
+                SfxItemState::SET == pArgs->GetItemState(SID_ATTR_TRANSFORM_HEIGHT, false, &pItem))
             {
                 aNewSize.setHeight( static_cast< const SfxUInt32Item* >(pItem)->GetValue() );
                 bApplyNewSize = true;
commit f8a9cc5442129356638556136b783dd0d9322dab
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Jun 9 19:47:57 2017 +0200

    Fix typo in queryAggregation
    
    ...that caused UBSan failure in UITest_calc_demo:
    
    > framework/source/services/desktop.cxx:406:47: runtime error: member call on address 0x611000887c80 which does not point to an object of type 'com::sun::star::lang::XServiceInfo'
    > 0x611000887c40: note: object is base class subobject at offset 64 within object of type 'chart::CreationWizardUnoDlg'
    >  1a 06 80 29  70 23 e8 c8 5a 7f 00 00  50 87 f0 00 40 60 00 00  48 24 e8 c8 5a 7f 00 00  02 00 00 00
    >               ^
    >     #0 0x7f5d62c1413b in framework::Desktop::addTerminateListener(com::sun::star::uno::Reference<com::sun::star::frame::XTerminateListener> const&) framework/source/services/desktop.cxx:406:47
    >     #1 0x7f5ac78f9337 in chart::CreationWizardUnoDlg::CreationWizardUnoDlg(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx:52:15
    >     #2 0x7f5ac7906cdd in com_sun_star_comp_chart2_WizardDialog_get_implementation chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx:368:30
    >     #3 0x7f5df087ff37 in std::_Function_handler<com::sun::star::uno::XInterface* (com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&), com::sun::star::uno::XInterface* (*)(com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&)>::_M_invoke(std::_Any_data const&, com::sun::star::uno::XComponentContext*&&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) /usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../include/c++/6.3.1/functional:1716:9
    >     #4 0x7f5df0757dab in std::function<com::sun::star::uno::XInterface* (com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&)>::operator()(com::sun::star::uno::XComponentContext*, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) const /usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../include/c++/6.3.1/functional:2127:14
    >     #5 0x7f5df06f69f1 in cppuhelper::ServiceManager::Data::Implementation::createInstance(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, bool) cppuhelper/source/servicemanager.cxx:667:13
    >     #6 0x7f5df07134f2 in cppuhelper::ServiceManager::createInstanceWithContext(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) cppuhelper/source/servicemanager.cxx:998:17
    >     #7 0x7f5df0715d7a in non-virtual thunk to cppuhelper::ServiceManager::createInstanceWithContext(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) cppuhelper/source/servicemanager.cxx
    >     #8 0x7f5d47aca8ca in FuInsertChart::FuInsertChart(ScTabViewShell*, vcl::Window*, ScDrawView*, SdrModel*, SfxRequest&) sc/source/ui/drawfunc/fuins2.cxx:650:27
    >     #9 0x7f5d49da003c in ScTabViewShell::ExecDrawIns(SfxRequest&) sc/source/ui/view/tabvwshb.cxx:344:13
    >     #10 0x7f5d49ce50ed in SfxStubScTabViewShellExecDrawIns(SfxShell*, SfxRequest&) workdir/SdiTarget/sc/sdi/scslots.hxx:1407:1
    >     #11 0x7f5de463ea6d in SfxShell::CallExec(void (*)(SfxShell*, SfxRequest&), SfxRequest&) include/sfx2/shell.hxx:211:35
    >     #12 0x7f5de4600cbe in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) sfx2/source/control/dispatch.cxx:377:20
    >     #13 0x7f5de4621593 in SfxDispatcher::PostMsgHandler(SfxRequest*) sfx2/source/control/dispatch.cxx:1156:17
    >     #14 0x7f5de460487a in SfxDispatcher::LinkStubPostMsgHandler(void*, SfxRequest*) sfx2/source/control/dispatch.cxx:1136:1
    >     #15 0x7f5de5f18eda in Link<SfxRequest*, void>::Call(SfxRequest*) const include/tools/link.hxx:84:45
    >     #16 0x7f5de5f189d2 in SfxHintPoster::DoEvent_Impl(void*) sfx2/source/notify/hintpost.cxx:44:12
    >     #17 0x7f5de5f18861 in SfxHintPoster::LinkStubDoEvent_Impl(void*, void*) sfx2/source/notify/hintpost.cxx:42:1
    >     #18 0x7f5dbc3bb9fa in Link<void*, void>::Call(void*) const include/tools/link.hxx:84:45
    >     #19 0x7f5dbc3a5bdf in ImplHandleUserEvent(ImplSVEvent*) vcl/source/window/winproc.cxx:1946:30
    >     #20 0x7f5dbc39103c in ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) vcl/source/window/winproc.cxx:2495:13
    >     #21 0x7f5dbf2f016f in SalFrame::CallCallback(SalEvent, void const*) const vcl/inc/salframe.hxx:276:33
    >     #22 0x7f5dbf350db2 in SvpSalInstance::DoYield(bool, bool, unsigned long) vcl/headless/svpinst.cxx:345:31
    >     #23 0x7f5dbe714b69 in ImplYield(bool, bool, unsigned long) vcl/source/app/svapp.cxx:494:29
    >     #24 0x7f5dbe6efb53 in Application::Yield() vcl/source/app/svapp.cxx:558:5
    >     #25 0x7f5dbe6ef896 in Application::Execute() vcl/source/app/svapp.cxx:458:9
    >     #26 0x7f5dfab81984 in desktop::Desktop::DoExecute() desktop/source/app/app.cxx:1354:5
    >     #27 0x7f5dfab89eb6 in desktop::Desktop::Main() desktop/source/app/app.cxx:1698:17
    >     #28 0x7f5dbe76c6ab in ImplSVMain() vcl/source/app/svmain.cxx:192:35
    >     #29 0x7f5dbe779bf1 in SVMain() vcl/source/app/svmain.cxx:230:16
    >     #30 0x7f5dfadb8659 in soffice_main desktop/source/app/sofficemain.cxx:166:12
    >     #31 0x50fa39 in sal_main desktop/source/app/main.c:48:15
    >     #32 0x50f9e3 in main desktop/source/app/main.c:47:1
    >     #33 0x7f5df9322400 in __libc_start_main /usr/src/debug/glibc-2.24-33-ge9e69e4/csu/../csu/libc-start.c:289
    >     #34 0x419f79 in _start (instdir/program/soffice.bin+0x419f79)
    
    Change-Id: I0a798c6d77b7349077ea44dfe112024abb2567f0
    (cherry picked from commit 89214e05e0c2f92fbe68e6c4f4a9035a94cff282)
    Reviewed-on: https://gerrit.libreoffice.org/38612
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit ddba7030fb8ba565bdeef997f87eb491f8ce6a80)

diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
index c800580f7af4..1147025b5702 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
@@ -97,7 +97,7 @@ uno::Any SAL_CALL CreationWizardUnoDlg::queryAggregation( uno::Type const & rTyp
     }
     else if (rType == cppu::UnoType<lang::XServiceInfo>::get())
     {
-        void * p = static_cast< lang::XTypeProvider * >( this );
+        void * p = static_cast< lang::XServiceInfo * >( this );
         return uno::Any( &p, rType );
     }
     else if (rType == cppu::UnoType<lang::XInitialization>::get())
commit b4a52bb51ae6f1a223e94a39bf9bc16671b93336
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Tue May 30 23:50:18 2017 +0200

    tdf#37859: Odb data copied to Calc showed wrong encoding in Windows
    
    Blind fix since I don't have Windows.
    If it works, many thanks to:
    - Urmas (see https://bugs.documentfoundation.org/show_bug.cgi?id=37859#c16)
    - Himajin100000 (see https://bugs.documentfoundation.org/show_bug.cgi?id=37859#c35)
    
    Change-Id: I9fd84977eab8410ec022b6e34f1a636326eaf56a
    Reviewed-on: https://gerrit.libreoffice.org/38253
    (cherry picked from commit 39487b14956d883899311b6294f6f09ca2371366)
    Reviewed-on: https://gerrit.libreoffice.org/38547
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit 3951d44110df55589ff80f5eab752817c2475c0d)

diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index 9399f1ea3db8..eee419355bb5 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -688,7 +688,7 @@ void OHTMLImportExport::WriteHeader()
     IncIndent(1); TAG_ON_LF( OOO_STRING_SVTOOLS_HTML_head );
 
     SfxFrameHTMLWriter::Out_DocInfo( (*m_pStream), OUString(),
-        xDocProps, sIndent );
+        xDocProps, sIndent, osl_getThreadTextEncoding() );
     OUT_LF();
     IncIndent(-1); OUT_LF(); TAG_OFF_LF( OOO_STRING_SVTOOLS_HTML_head );
 }
commit 970f98594de76f00457d750283094d1a775c740a
Author: Bernhard Widl <bernhard.widl at cib.de>
Date:   Fri May 12 13:55:50 2017 +0200

    tdf#107795 fixed cursor position after inserting input field
    
    Change-Id: I3c063c0393b524132e522914a7a9885c8a9c3b78
    Reviewed-on: https://gerrit.libreoffice.org/37536
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit 408a7e320db978a8f784fa25e35caedf931612c5)
    Reviewed-on: https://gerrit.libreoffice.org/38443
    Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
    (cherry picked from commit 48e75d8107d64920dd90c5d98b79dc982e311fa3)

diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx
index a51dd7666f3d..35c6f5ebd28e 100644
--- a/sw/source/uibase/fldui/fldmgr.cxx
+++ b/sw/source/uibase/fldui/fldmgr.cxx
@@ -1328,10 +1328,14 @@ bool SwFieldMgr::InsertField(
 
     if (TYP_INPUTFLD == rData.m_nTypeId)
     {
+        pCurShell->Push();
+
         // start dialog, not before the field is inserted tdf#99529
         pCurShell->Left(CRSR_SKIP_CHARS,
                 false, (INP_VAR == (nSubType & 0xff)) ? 1 : 2, false );
         pCurShell->StartInputFieldDlg(pField, false, rData.m_pParent);
+
+        pCurShell->Pop(false);
     }
 
     if(bExp && bEvalExp)
commit 41e79a3136e580a75079496e43e17225adfce689
Author: David Tardon <dtardon at redhat.com>
Date:   Tue Jun 6 14:12:00 2017 +0200

    libstaroffice: use correct loop index
    
    (cherry picked from commit cc2db25645ede743bdc3824fe7d26ea4beda6a96)
    Signed-off-by: David Tardon <dtardon at redhat.com>
    
    Change-Id: I1b862ed2d69c41361bc8c26d96c5329473fe64aa
    Reviewed-on: https://gerrit.libreoffice.org/38444
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    (cherry picked from commit f17462390d9ba866f76207839ff996896d0a9af5)

diff --git a/external/libstaroffice/0001-ofz-1029-use-correct-loop-index.patch.1 b/external/libstaroffice/0001-ofz-1029-use-correct-loop-index.patch.1
new file mode 100644
index 000000000000..f004e5674da6
--- /dev/null
+++ b/external/libstaroffice/0001-ofz-1029-use-correct-loop-index.patch.1
@@ -0,0 +1,27 @@
+From 2d6253c7a692a3d92785dd990fce7256ea05e794 Mon Sep 17 00:00:00 2001
+From: David Tardon <dtardon at redhat.com>
+Date: Fri, 7 Apr 2017 19:28:55 +0200
+Subject: [PATCH] ofz#1029 use correct loop index
+
+To be honest, I think this would be clearer as two separate reads to two
+separate vars...
+---
+ src/lib/StarWriterStruct.cxx | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/lib/StarWriterStruct.cxx b/src/lib/StarWriterStruct.cxx
+index 5893302..d1ad366 100644
+--- a/src/lib/StarWriterStruct.cxx
++++ b/src/lib/StarWriterStruct.cxx
+@@ -327,7 +327,7 @@ bool DatabaseName::read(StarZone &zone)
+         }
+         data.m_name=libstoff::getString(text);
+         int positions[2];
+-        for (int j=0; j<2; ++j) positions[i]=int(input->readULong(4));
++        for (int j=0; j<2; ++j) positions[j]=int(input->readULong(4));
+         data.m_selection=STOFFVec2i(positions[0],positions[1]);
+         m_dataList.push_back(data);
+       }
+-- 
+2.13.0
+
diff --git a/external/libstaroffice/UnpackedTarball_libstaroffice.mk b/external/libstaroffice/UnpackedTarball_libstaroffice.mk
index 957c11859ac5..41e7c63983e8 100644
--- a/external/libstaroffice/UnpackedTarball_libstaroffice.mk
+++ b/external/libstaroffice/UnpackedTarball_libstaroffice.mk
@@ -37,6 +37,7 @@ endif
 
 $(eval $(call gb_UnpackedTarball_add_patches,libstaroffice, \
     external/libstaroffice/0001-error-C2512-StarObject-no-appropriate-default-constr.patch.1 \
+	external/libstaroffice/0001-ofz-1029-use-correct-loop-index.patch.1 \
 ))
 
 # vim: set noet sw=4 ts=4:
commit b07dace1ac905e33934b6237e822d171b280ed20
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jun 2 19:22:19 2017 +0100

    ofz: fix remaining length check
    
    Change-Id: I1788ae2a15823b0dc165ad1a99bd0f2aac0bcaf1
    Reviewed-on: https://gerrit.libreoffice.org/38363
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit e5a25e6b01490cf14dfc6af019fdb0896b19a76d)

diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index fecad6b73d75..817a0efada76 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -636,15 +636,17 @@ ipsGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
             if (!bHasPreview && nBytesRead >= nSecurityCount)
             {
                 sal_uInt8* pDest = ImplSearchEntry( pBuf.get(), reinterpret_cast<sal_uInt8 const *>("%%BeginPreview:"), nBytesRead - nSecurityCount, 15 );
-                if ( pDest  )
+                sal_uInt32 nRemainingBytes = pDest ? (nBytesRead - (pDest - pBuf.get())) : 0;
+                if (nRemainingBytes >= 15)
                 {
                     pDest += 15;
+                    nSecurityCount = nRemainingBytes - 15;
                     long nWidth = ImplGetNumber(pDest, nSecurityCount);
                     long nHeight = ImplGetNumber(pDest, nSecurityCount);
                     long nBitDepth = ImplGetNumber(pDest, nSecurityCount);
                     long nScanLines = ImplGetNumber(pDest, nSecurityCount);
-                    pDest = nSecurityCount ? ImplSearchEntry(pDest, reinterpret_cast<sal_uInt8 const *>("%"), 16, 1) : nullptr;       // go to the first Scanline
-                    if ( nSecurityCount && pDest && nWidth && nHeight && ( ( nBitDepth == 1 ) || ( nBitDepth == 8 ) ) && nScanLines )
+                    pDest = ImplSearchEntry(pDest, reinterpret_cast<sal_uInt8 const *>("%"), nSecurityCount, 1);       // go to the first Scanline
+                    if (pDest && nWidth && nHeight && ( ( nBitDepth == 1 ) || ( nBitDepth == 8 ) ) && nScanLines)
                     {
                         rStream.Seek( nBufStartPos + ( pDest - pBuf.get() ) );
 


More information about the Libreoffice-commits mailing list