[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - 4 commits - cui/source embeddedobj/source filter/source wizards/com

Caolán McNamara caolanm at redhat.com
Mon Sep 26 12:18:58 UTC 2016


 cui/source/tabpages/transfrm.cxx                              |    8 ++--
 embeddedobj/source/msole/olecomponent.cxx                     |   17 ++++++++--
 filter/source/msfilter/eschesdo.cxx                           |   13 ++++++-
 wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py |    2 -
 wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py       |    2 -
 wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py |    2 -
 wizards/com/sun/star/wizards/ui/event/CommonListener.py       |    2 -
 7 files changed, 33 insertions(+), 13 deletions(-)

New commits:
commit a63e28c0c56965a0120f250f5a39595c2f020356
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Sep 23 13:11:54 2016 +0100

    Resolves: tdf#99626 only the first queryTermination call in wizards works
    
    cause the first call looks up the "queryTermination" method on the object
    and replaces the object with that function, then calls on. Subsequent
    calls then try to lookup "queryTermination" on "queryTermination".
    
    Just pass queryTermination directly in the ctor (like all the other
    wrappers do)
    
    Change-Id: Ie042081c3c34e33b2f040d1ab1a33eeac4df9c3b
    (cherry picked from commit 01889962cab8449e1d9682d22db0f6e1e28252fd)
    Reviewed-on: https://gerrit.libreoffice.org/29230
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Jenkins <ci at libreoffice.org>
    (cherry picked from commit a498e734f0954f401f430fd04c38e16ec7072489)

diff --git a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py
index ede7aaa..372dad0 100644
--- a/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py
+++ b/wizards/com/sun/star/wizards/agenda/AgendaWizardDialogImpl.py
@@ -70,7 +70,7 @@ class AgendaWizardDialogImpl(AgendaWizardDialog):
 
             self.initializePaths()
             # initialize the agenda template
-            self.terminateListener = TerminateListenerProcAdapter(self)
+            self.terminateListener = TerminateListenerProcAdapter(self.queryTermination)
             self.myAgendaDoc = AgendaDocument(
                 self.xMSF, self.agenda, self.resources,
                 self.templateConsts, self.terminateListener)
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
index 31ac744..ef60a2e 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
@@ -65,7 +65,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
             self.nMaxStep = 5
 
             #instantiate The Document Frame for the Preview
-            self.terminateListener = TerminateListenerProcAdapter(self)
+            self.terminateListener = TerminateListenerProcAdapter(self.queryTermination)
             self.myFaxDoc = FaxDocument(xMSF, self.terminateListener)
 
             #create the dialog:
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
index dff5647..7c460f7 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
@@ -72,7 +72,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
             self.nMaxStep = 6
 
             #instantiate The Document Frame for the Preview
-            self.terminateListener = TerminateListenerProcAdapter(self)
+            self.terminateListener = TerminateListenerProcAdapter(self.queryTermination)
             self.myLetterDoc = LetterDocument(xMSF, self.terminateListener)
 
             #create the dialog
diff --git a/wizards/com/sun/star/wizards/ui/event/CommonListener.py b/wizards/com/sun/star/wizards/ui/event/CommonListener.py
index ad15ac2..94cafac 100644
--- a/wizards/com/sun/star/wizards/ui/event/CommonListener.py
+++ b/wizards/com/sun/star/wizards/ui/event/CommonListener.py
@@ -65,8 +65,6 @@ class TerminateListenerProcAdapter( unohelper.Base, XTerminateListener ):
         self.oProcToCall = oProcToCall
 
     def queryTermination(self, TerminateEvent):
-        self.oProcToCall = getattr(self.oProcToCall,"queryTermination")
-
         if callable( self.oProcToCall ):
             self.oProcToCall()
 
commit ee99b18850174be2d43120cc419af2b416a6bbdc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jul 7 16:42:58 2016 +0100

    Resolves: tdf#99273 can't save specific docx
    
    crashtesting: assert on export of tdf99571-1.docx to docx
    
    (cherry picked from commit fb045517532aababc06fb4b1112def53b03d9144)
    
    Change-Id: I2c8d82ac21451a2d2cc748dc28ac210c8e5ddf5f
    Reviewed-on: https://gerrit.libreoffice.org/29016
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit fa5830d02cec81921235357f4ed0372d104cf89e)

diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx
index 5c4bd59..91c9494 100644
--- a/filter/source/msfilter/eschesdo.cxx
+++ b/filter/source/msfilter/eschesdo.cxx
@@ -1229,8 +1229,17 @@ sal_uInt32 ImplEESdrObject::ImplGetText()
 {
     Reference< XText > xXText( mXShape, UNO_QUERY );
     mnTextSize = 0;
-    if( xXText.is() )
-        mnTextSize = xXText->getString().getLength();
+    if (xXText.is())
+    {
+        try
+        {
+            mnTextSize = xXText->getString().getLength();
+        }
+        catch (const uno::RuntimeException& e)
+        {
+            SAL_WARN("filter.ms", "ImplGetText exception: " << e.Message);
+        }
+    }
     return mnTextSize;
 }
 
commit 28ce3a44bee3a215dd884344ab67afac7ac85688
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Sep 22 21:11:56 2016 +0100

    Resolves: tdf#101971 OleLoad under structured exception guards
    
    sample pptx crashes down in the depths of (apparently pre-installed on
    32bit Windows 10) Flash.ocx
    
    Change-Id: I4e083d492e56e72df47b2c172d7f07f0e39b82ea
    Reviewed-on: https://gerrit.libreoffice.org/29199
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    Tested-by: Stephan Bergmann <sbergman at redhat.com>
    (cherry picked from commit 373b44a2fcbe78e8a3ff14cd410826af151a6adf)
    Reviewed-on: https://gerrit.libreoffice.org/29213
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit dafcb32f09c3acea8e2fa12e1d39261b13c740db)

diff --git a/embeddedobj/source/msole/olecomponent.cxx b/embeddedobj/source/msole/olecomponent.cxx
index 6a7b9e4..2f59f35 100644
--- a/embeddedobj/source/msole/olecomponent.cxx
+++ b/embeddedobj/source/msole/olecomponent.cxx
@@ -715,6 +715,19 @@ sal_Bool OleComponent::InitializeObject_Impl()
     return sal_True;
 }
 
+namespace
+{
+    HRESULT OleLoadSeh(LPSTORAGE pIStorage, LPVOID* ppObj)
+    {
+        HRESULT hr = E_FAIL;
+        __try {
+            hr = OleLoad(pIStorage, IID_IUnknown, NULL, ppObj);
+        } __except( EXCEPTION_EXECUTE_HANDLER ) {
+            return E_FAIL;
+        }
+        return hr;
+    }
+}
 
 void OleComponent::LoadEmbeddedObject( const OUString& aTempURL )
 {
@@ -730,7 +743,7 @@ void OleComponent::LoadEmbeddedObject( const OUString& aTempURL )
     if ( FAILED( hr ) || !m_pNativeImpl->m_pIStorage )
         throw io::IOException(); // TODO: transport error code?
 
-    hr = OleLoad( m_pNativeImpl->m_pIStorage, IID_IUnknown, NULL, (void**)&m_pNativeImpl->m_pObj );
+    hr = OleLoadSeh(m_pNativeImpl->m_pIStorage, (void**)&m_pNativeImpl->m_pObj);
     if ( FAILED( hr ) || !m_pNativeImpl->m_pObj )
     {
         throw uno::RuntimeException();
@@ -963,7 +976,7 @@ void OleComponent::InitEmbeddedCopyOfLink( OleComponent* pOleLinkComponent )
                 {
                     hr = pObjectStorage->CopyTo( 0, NULL, NULL, m_pNativeImpl->m_pIStorage );
                     if ( SUCCEEDED( hr ) )
-                        hr = OleLoad( m_pNativeImpl->m_pIStorage, IID_IUnknown, NULL, (void**)&m_pNativeImpl->m_pObj );
+                        hr = OleLoadSeh(m_pNativeImpl->m_pIStorage, (void**)&m_pNativeImpl->m_pObj);
                 }
             }
         }
commit 6be81d9195baa18aaafbc698a5b177500478ee18
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Sep 21 10:20:45 2016 +0100

    Resolves: tdf#100795 SAL_MIN_INT32 32bit overflows on finding min limit
    
    for control points, so halve it to the practical limit
    
    Change-Id: I1285631bebebf86e257a2fdd804c0c81dcefac96
    (cherry picked from commit 25e4708c1f49986f3f082beb2e940aa2d7fb4d81)
    Reviewed-on: https://gerrit.libreoffice.org/29133
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit 56a3b56689a458a8ff3f310940af07dac347a0c5)

diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index cc7c3bf..34cbadd 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -639,14 +639,14 @@ void SvxSlantTabPage::Reset(const SfxItemSet* rAttrs)
                 m_aControlGroups[i]->Enable();
                 css::awt::Point aPosition;
 
-                aPosition.X = SAL_MAX_INT32;
-                aPosition.Y = SAL_MAX_INT32;
+                aPosition.X = SAL_MAX_INT32/2;
+                aPosition.Y = SAL_MAX_INT32/2;
                 aShape.SetHandleControllerPosition(i, aPosition);
                 Point aMaxPosition;
                 aShape.GetHandlePosition(i, aMaxPosition);
 
-                aPosition.X = SAL_MIN_INT32;
-                aPosition.Y = SAL_MIN_INT32;
+                aPosition.X = SAL_MIN_INT32/2;
+                aPosition.Y = SAL_MIN_INT32/2;
                 aShape.SetHandleControllerPosition(i, aPosition);
                 Point aMinPosition;
                 aShape.GetHandlePosition(i, aMinPosition);


More information about the Libreoffice-commits mailing list