[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.1' - 3 commits - oox/source sw/source ucb/qa

Zolnai Tamás tamas.zolnai at collabora.com
Mon Mar 10 04:08:34 PDT 2014


 oox/source/core/xmlfilterbase.cxx |   13 +++++++++++++
 sw/source/ui/frmdlg/uiborder.cxx  |    6 +++---
 sw/source/ui/inc/uiborder.hxx     |    2 +-
 ucb/qa/complex/ucb/UCB.java       |    2 +-
 4 files changed, 18 insertions(+), 5 deletions(-)

New commits:
commit 5097245599c9471b3f796c4ef092c08763fd0a94
Author: Zolnai Tamás <tamas.zolnai at collabora.com>
Date:   Thu Feb 27 09:57:52 2014 +0100

    fdo#73159 Make border dialog work again
    
    It seems converting to SfxSingleTabDialog makes it work.
    Similar conversions were made on master branch.
    
    Change-Id: I49985bed56f12460d289c7f0d4e1c1435aa4674e
    Reviewed-on: https://gerrit.libreoffice.org/8377
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sw/source/ui/frmdlg/uiborder.cxx b/sw/source/ui/frmdlg/uiborder.cxx
index 2f4b1ef..8925786 100644
--- a/sw/source/ui/frmdlg/uiborder.cxx
+++ b/sw/source/ui/frmdlg/uiborder.cxx
@@ -34,7 +34,7 @@
 
 SwBorderDlg::SwBorderDlg(Window* pParent, SfxItemSet& rSet, sal_uInt16 nType) :
 
-    SfxNoLayoutSingleTabDialog(pParent, rSet, 0)
+    SfxSingleTabDialog(pParent, rSet)
 
 {
     SetText(SW_RESSTR(STR_FRMUI_BORDER));
@@ -45,13 +45,13 @@ SwBorderDlg::SwBorderDlg(Window* pParent, SfxItemSet& rSet, sal_uInt16 nType) :
     ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER );
     if ( fnCreatePage )
     {
-        SfxTabPage* pNewPage = (*fnCreatePage)( this, rSet );
+        SfxTabPage* pNewPage = (*fnCreatePage)( get_content_area(), rSet );
         SfxAllItemSet aSet(*(rSet.GetPool()));
         aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,nType));
         if(SW_BORDER_MODE_TABLE == nType)
             aSet.Put (SfxUInt32Item(SID_FLAG_TYPE,SVX_HIDESHADOWCTL));
         pNewPage->PageCreated(aSet);
-        SetTabPage(pNewPage);
+        setTabPage(pNewPage);
     }
 }
 
diff --git a/sw/source/ui/inc/uiborder.hxx b/sw/source/ui/inc/uiborder.hxx
index 20e5e87..a8890b4 100644
--- a/sw/source/ui/inc/uiborder.hxx
+++ b/sw/source/ui/inc/uiborder.hxx
@@ -24,7 +24,7 @@
 class Window;
 class SfxItemSet;
 
-class SwBorderDlg : public SfxNoLayoutSingleTabDialog
+class SwBorderDlg : public SfxSingleTabDialog
 {
 public:
 
commit 4822b425acc7cca4f2f330d83d6b0125b6c0006b
Author: Armin Le Grand <alg at apache.org>
Date:   Mon Feb 24 20:25:26 2014 +0000

    Resolves: #i118640# force early destruction of last FragmentHandler...
    
    to not let it use an already destroyed RelationsMap instance
    (cherry picked from commit 190444f7fd3fa9cfcd1955b3f5dcd916184d02f4)
    
    Conflicts:
    	oox/source/core/xmlfilterbase.cxx
    
    Change-Id: Ibd09ff9fcba8f919df0704c8e3a64423518b932f
    (cherry picked from commit b071ce32befcc84a57a7ecd39667cb6658c0c866)

diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index fe2055e..fe222d9 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -104,6 +104,7 @@ struct XmlFilterBaseImpl
     TextFieldStack                 maTextFieldStack;
 
     explicit            XmlFilterBaseImpl( const Reference< XComponentContext >& rxContext ) throw( RuntimeException );
+    ~XmlFilterBaseImpl();
 };
 
 // ----------------------------------------------------------------------------
@@ -188,6 +189,10 @@ XmlFilterBaseImpl::XmlFilterBaseImpl( const Reference< XComponentContext >& rxCo
         maFastParser.registerNamespace( ids[i].Second );
 }
 
+XmlFilterBaseImpl::~XmlFilterBaseImpl()
+{
+}
+
 XmlFilterBase::XmlFilterBase( const Reference< XComponentContext >& rxContext ) throw( RuntimeException ) :
     FilterBase( rxContext ),
     mxImpl( new XmlFilterBaseImpl( rxContext ) ),
@@ -198,6 +203,14 @@ XmlFilterBase::XmlFilterBase( const Reference< XComponentContext >& rxContext )
 
 XmlFilterBase::~XmlFilterBase()
 {
+    // #i118640# Reset the DocumentHandler at the FastSaxParser manually; this is
+    // needed since the mechanism is that instances of FragmentHandler execute
+    // their stuff (creating objects, setting attributes, ...) on being destroyed.
+    // They get destroyed by setting a new DocumentHandler. This also happens in
+    // the following implicit destruction chain of ~XmlFilterBaseImpl, but in that
+    // case it's member RelationsMap maRelationsMap will be destroyed, but maybe
+    // still be used by ~FragmentHandler -> crash.
+    mxImpl->maFastParser.setDocumentHandler( 0 );
 }
 
 // ----------------------------------------------------------------------------
commit 1855e8e354f4875fc4ad67504007df55bd0fbc23
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Feb 22 19:29:19 2014 +0000

    my upc router automatically adds .net to the domain search path
    
    i.e. I get handed an /etc/resolv.conf of
    
      domain net
      search net ...
    
    and so "nohost" resolves to "nohost.net" which actually exists, so I get an
    authentication request which is unexpected by this test which therefore falls
    over. "nohost.invalid.net" also exists btw, as are other various foo.net forms
    where foo is one of the reserved tld which don't themselves exist.
    
    So lets shove a "*" into the name which is definitely invalid, sigh.
    
    Change-Id: I8627ced9199f339ad6cca8f27752d883ebe74aad
    (cherry picked from commit b3d153528a13807d2f5347ec83c7a8d483454a75)
    Reviewed-on: https://gerrit.libreoffice.org/8181
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/ucb/qa/complex/ucb/UCB.java b/ucb/qa/complex/ucb/UCB.java
index d937638..815209a 100644
--- a/ucb/qa/complex/ucb/UCB.java
+++ b/ucb/qa/complex/ucb/UCB.java
@@ -179,7 +179,7 @@ public class UCB  {
 
     @Test public void checkWrongFtpConnection() {
         try {
-            String acountUrl = "ftp://noname:nopasswd@nohost";
+            String acountUrl = "ftp://noname:nopasswd@*nohost.invalid";
             System.out.println(acountUrl);
             init();
             Object content = getContent(acountUrl);


More information about the Libreoffice-commits mailing list