[ooo-build-commit] .: patches/dev300

Katarina Machalkova bubli at kemper.freedesktop.org
Fri Sep 3 02:24:58 PDT 2010


 patches/dev300/apply                               |    1 
 patches/dev300/ooxml-sc-internal-hlink-export.diff |   39 +++++++++++++++++++++
 2 files changed, 40 insertions(+)

New commits:
commit 957e7dc6a2942c6d0f22c4bb1ca684d55702663b
Author: Katarina Machalkova <kmachalkova at suse.cz>
Date:   Fri Sep 3 11:17:02 2010 +0200

    Improved xlsx export of internal hlinks (bnc#594248)
    
    i) don't save internal links as external relationships
    ii) in location attr, quote sheet names with space ('foo bar'!A1)

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 6836b2f..0de0685 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -2932,6 +2932,7 @@ ooxml-sc-showdropdown-fix.diff, muthusuba
 ooxml-sc-docpropsimp.diff, muthusuba
 ooxml-sc-page-date-imp.diff, muthusuba
 ooxml-sc-brk.diff, muthusuba
+ooxml-sc-internal-hlink-export.diff, bnc#594248, bubli
 ooxml-sw-fix-2010-import-crash.diff, bubli
 
 # depends on pptx-autoplay-fix.diff
diff --git a/patches/dev300/ooxml-sc-internal-hlink-export.diff b/patches/dev300/ooxml-sc-internal-hlink-export.diff
new file mode 100644
index 0000000..d50f70b
--- /dev/null
+++ b/patches/dev300/ooxml-sc-internal-hlink-export.diff
@@ -0,0 +1,39 @@
+--- sc/source/filter/excel/xecontent.cxx.old	2010-09-01 11:41:13.000000000 +0200
++++ sc/source/filter/excel/xecontent.cxx	2010-09-01 11:32:53.000000000 +0200
+@@ -463,7 +463,16 @@
+     else if( rUrl.GetChar( 0 ) == '#' )     // hack for #89066#
+     {
+         String aTextMark( rUrl.Copy( 1 ) );
+-        aTextMark.SearchAndReplace( '.', '!' );
++
++        xub_StrLen nSepPos = aTextMark.SearchAndReplace( '.', '!' );
++        String aSheetName( aTextMark.Copy(0, nSepPos));
++
++        if ( aSheetName.Search(' ') != STRING_NOTFOUND && aSheetName.GetChar(0) != '\'')
++        {
++            aTextMark.Insert('\'', nSepPos);
++            aTextMark.Insert('\'', 0);
++        }
++
+         mxTextMark.reset( new XclExpString( aTextMark, EXC_STR_FORCEUNICODE, 255 ) );
+     }
+
+@@ -540,13 +549,15 @@
+
+ void XclExpHyperlink::SaveXml( XclExpXmlStream& rStrm )
+ {
+-    OUString sId = rStrm.addRelation( rStrm.GetCurrentStream()->getOutputStream(),
++    OUString sId = msTarget.getLength() ? rStrm.addRelation( rStrm.GetCurrentStream()->getOutputStream(),
+             XclXmlUtils::ToOUString( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" ),
+             msTarget,
+-            XclXmlUtils::ToOUString( "External" ) );
++            XclXmlUtils::ToOUString( "External" ) ) : OUString();
+     rStrm.GetCurrentStream()->singleElement( XML_hyperlink,
+             XML_ref,                XclXmlUtils::ToOString( maScPos ).getStr(),
+-            FSNS( XML_r, XML_id ),  XclXmlUtils::ToOString( sId ).getStr(),
++            FSNS( XML_r, XML_id ),  sId.getLength()
++                                       ? XclXmlUtils::ToOString( sId ).getStr()
++                                       : NULL,
+             XML_location,           mxTextMark.get() != NULL
+                                         ? XclXmlUtils::ToOString( *mxTextMark ).getStr()
+                                         : NULL,


More information about the ooo-build-commit mailing list