[Libreoffice-commits] core.git: starmath/source

Michael Stahl mstahl at redhat.com
Wed Feb 3 13:24:47 UTC 2016


 starmath/source/mathmlimport.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 4a2824e72aae407f5f2a86e6ef45278ef864d437
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Feb 3 14:02:22 2016 +0100

    starmath: tdf#97190: don't assert on missing base URL
    
    There are valid scenarios where we don't have a URL at all, such as when
    importing MathML from the clipboard.  Also there probably isn't much of
    a problem caused by missing base URLs in Math anyway since RDF import is
    currently not implemented and i'm not sure if hyperlinks in Math
    documents are possible at all.
    
    Change-Id: I13b70ac62542364f329875e292c574883255af5e

diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index ca557ae..36884c9 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -142,7 +142,9 @@ sal_uLong SmXMLImportWrapper::Import(SfxMedium &rMedium)
 
     // Set base URI
     OUString const baseURI(rMedium.GetBaseURL());
-    assert(!baseURI.isEmpty()); // needed for relative URLs
+    // needed for relative URLs; but it's OK to import e.g. MathML from the
+    // clipboard without one
+    SAL_INFO_IF(baseURI.isEmpty(), "starmath", "SmXMLImportWrapper: no base URL");
     xInfoSet->setPropertyValue("BaseURI", makeAny(baseURI));
 
     sal_Int32 nSteps=3;


More information about the Libreoffice-commits mailing list