summaryrefslogtreecommitdiff
path: root/sc/source/filter/excel/xecontent.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/filter/excel/xecontent.cxx')
-rw-r--r--sc/source/filter/excel/xecontent.cxx15
1 files changed, 12 insertions, 3 deletions
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 5a0045753612..4814bde09dfd 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -386,9 +386,18 @@ XclExpHyperlink::XclExpHyperlink( const XclExpRoot& rRoot, const SvxURLField& rU
m_Repr = aFileName;
msTarget = XclXmlUtils::ToOUString( aLink );
- // ooxml expects the file:/// part appended ( or at least
- // ms2007 does, ms2010 is more tolerant )
- msTarget = "file:///" + msTarget;
+
+ if( bRel )
+ {
+ for( int i = 0; i < nLevel; ++i )
+ msTarget = "../" + msTarget;
+ }
+ else
+ {
+ // ooxml expects the file:/// part appended ( or at least
+ // ms2007 does, ms2010 is more tolerant )
+ msTarget = "file:///" + msTarget;
+ }
}
else if( eProtocol != INetProtocol::NotValid )
{