[Libreoffice-commits] core.git: Branch 'distro/suse/suse-4.0' - 2 commits - sc/source
Noel Power
noel.power at suse.com
Mon Jun 24 05:04:47 PDT 2013
sc/source/filter/excel/xecontent.cxx | 14 ++++++++++++--
sc/source/filter/inc/xecontent.hxx | 3 ++-
2 files changed, 14 insertions(+), 3 deletions(-)
New commits:
commit 8e33e95500c2f5edc91e853024a5c0fff285fcce
Author: Noel Power <noel.power at suse.com>
Date: Mon Jun 24 11:47:55 2013 +0100
fix for bnc#823935
Change-Id: Id62e1f4845bfbc610f73499881dc33d3d955923b
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 36cd383..ce22d55 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -395,6 +395,12 @@ XclExpHyperlink::XclExpHyperlink( const XclExpRoot& rRoot, const SvxURLField& rU
mxRepr.reset( new String( aFileName ) );
msTarget = XclXmlUtils::ToOUString( aLink );
+ if( eProtocol == INET_PROT_SMB )
+ {
+ // ooxml expects the file:/// part appended ( or at least
+ // ms2007 does, ms2010 is more tolerant )
+ msTarget = "file:///" + msTarget;
+ }
}
else if( eProtocol != INET_PROT_NOT_VALID )
{
commit b8b4f455ef20929a0c5838772d120ed86f10e259
Author: Noel Power <noel.power at suse.com>
Date: Fri Jun 21 15:46:08 2013 +0100
write display attr of hyperlink only if value is different from stringtable
Change-Id: Iff6f16d6cdb539ad80ef01e91db51613e95053d1
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 5a46ad5..36cd383 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -335,7 +335,8 @@ XclExpHyperlink::XclExpHyperlink( const XclExpRoot& rRoot, const SvxURLField& rU
XclExpRecord( EXC_ID_HLINK ),
maScPos( rScPos ),
mxVarData( new SvMemoryStream ),
- mnFlags( 0 )
+ mnFlags( 0 ),
+ mbSetDisplay( true )
{
const String& rUrl = rUrlField.GetURL();
const String& rRepr = rUrlField.GetRepresentation();
@@ -498,6 +499,7 @@ void XclExpHyperlink::WriteEmbeddedData( XclExpStream& rStrm )
void XclExpHyperlink::SaveXml( XclExpXmlStream& rStrm )
{
+ OString sTmp = XclXmlUtils::ToOString( maScPos );
OUString sId = !msTarget.isEmpty() ? rStrm.addRelation( rStrm.GetCurrentStream()->getOutputStream(),
XclXmlUtils::ToOUString( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" ),
msTarget, true ) : OUString();
@@ -510,7 +512,9 @@ void XclExpHyperlink::SaveXml( XclExpXmlStream& rStrm )
? XclXmlUtils::ToOString( *mxTextMark ).getStr()
: NULL,
// OOXTODO: XML_tooltip, from record HLinkTooltip 800h wzTooltip
- XML_display, XclXmlUtils::ToOString( *mxRepr ).getStr(),
+ XML_display, mbSetDisplay
+ ? XclXmlUtils::ToOString( *mxRepr ).getStr()
+ : NULL,
FSEND );
}
diff --git a/sc/source/filter/inc/xecontent.hxx b/sc/source/filter/inc/xecontent.hxx
index 1328a40..cf746de 100644
--- a/sc/source/filter/inc/xecontent.hxx
+++ b/sc/source/filter/inc/xecontent.hxx
@@ -109,6 +109,7 @@ public:
virtual void SaveXml( XclExpXmlStream& rStrm );
virtual void WriteEmbeddedData( XclExpStream& rStrm );
+ void SetDisplay( bool bDisplay ) { mbSetDisplay = bDisplay; }
private:
/** Builds file name from the passed file URL. Tries to convert to relative file name.
@param rnLevel (out-param) The parent directory level.
@@ -119,7 +120,6 @@ private:
/** Writes the body of the HLINK record. */
virtual void WriteBody( XclExpStream& rStrm );
-
private:
typedef boost::scoped_ptr< String > StringPtr;
typedef boost::scoped_ptr< SvStream > SvStreamPtr;
@@ -130,6 +130,7 @@ private:
sal_uInt32 mnFlags; /// Option flags.
XclExpStringRef mxTextMark; /// Location within mxRepr
::rtl::OUString msTarget; /// Target URL
+ bool mbSetDisplay; /// True if display attribute it written
};
typedef XclExpRecordList< XclExpHyperlink > XclExpHyperlinkList;
More information about the Libreoffice-commits
mailing list