diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2005-01-11 12:17:05 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2005-01-11 12:17:05 +0000 |
commit | d8790e13820011806df3f09367050bcc57836a28 (patch) | |
tree | 3f496ef302500655d9e7d99e5ae94754ba038de3 /sc | |
parent | 44fba77c8d991637daf9a5cc1bacc55b595f5d57 (diff) |
INTEGRATION: CWS sb19 (1.25.22); FILE MERGED
2004/12/22 08:59:28 sb 1.25.22.6: #i10000# Cleaned up merge conflict.
2004/12/21 09:34:22 sb 1.25.22.5: RESYNC: (1.26-1.27); FILE MERGED
2004/11/03 15:15:46 sb 1.25.22.4: #108948# Fixed wrong replacement for INetURLObject::AbsToRel.
2004/10/27 07:31:48 mba 1.25.22.3: #110407#: remove static BaseURL
2004/10/11 21:14:41 sb 1.25.22.2: RESYNC: (1.25-1.26); FILE MERGED
2004/09/01 18:13:51 er 1.25.22.1: #110405# replace static INetURLObject Rel/Abs calls
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/html/htmlexp.cxx | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx index 3df783f97f01..b6107687acd5 100644 --- a/sc/source/filter/html/htmlexp.cxx +++ b/sc/source/filter/html/htmlexp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: htmlexp.cxx,v $ * - * $Revision: 1.27 $ + * $Revision: 1.28 $ * - * last change: $Author: hr $ $Date: 2004-12-13 12:47:46 $ + * last change: $Author: rt $ $Date: 2005-01-11 13:17:05 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -204,11 +204,11 @@ extern BOOL bOderSo; //======================================================================== -FltError ScExportHTML( SvStream& rStrm, ScDocument* pDoc, +FltError ScExportHTML( SvStream& rStrm, const String& rBaseURL, ScDocument* pDoc, const ScRange& rRange, const CharSet eNach, BOOL bAll, const String& rStreamPath, String& rNonConvertibleChars ) { - ScHTMLExport aEx( rStrm, pDoc, rRange, bAll, rStreamPath ); + ScHTMLExport aEx( rStrm, rBaseURL, pDoc, rRange, bAll, rStreamPath ); FltError nErr = aEx.Write(); rNonConvertibleChars = aEx.GetNonConvertibleChars(); return nErr; @@ -300,11 +300,12 @@ void lcl_WriteTeamInfo( SvStream& rStrm, rtl_TextEncoding eDestEnc ) ////////////////////////////////////////////////////////////////////////////// -ScHTMLExport::ScHTMLExport( SvStream& rStrmP, ScDocument* pDocP, +ScHTMLExport::ScHTMLExport( SvStream& rStrmP, const String& rBaseURL, ScDocument* pDocP, const ScRange& rRangeP, BOOL bAllP, const String& rStreamPathP ) : ScExportBase( rStrmP, pDocP, rRangeP ), aStreamPath( rStreamPathP ), + aBaseURL( rBaseURL ), pAppWin( Application::GetDefaultDevice() ), pSrcArr( NULL ), pDestArr( NULL ), @@ -431,12 +432,12 @@ void ScHTMLExport::WriteHeader() if ( pDoc->IsClipOrUndo() ) { // no real DocInfo available, but some META information like charset needed - SfxFrameHTMLWriter::Out_DocInfo( rStrm, NULL, sIndent, eDestEnc, &aNonConvertibleChars ); + SfxFrameHTMLWriter::Out_DocInfo( rStrm, aBaseURL, NULL, sIndent, eDestEnc, &aNonConvertibleChars ); } else { SfxDocumentInfo& rInfo = pDoc->GetDocumentShell()->GetDocInfo(); - SfxFrameHTMLWriter::Out_DocInfo( rStrm, &rInfo, sIndent, eDestEnc, &aNonConvertibleChars ); + SfxFrameHTMLWriter::Out_DocInfo( rStrm, aBaseURL, &rInfo, sIndent, eDestEnc, &aNonConvertibleChars ); OUT_LF(); //---------------------------------------------------------- @@ -695,7 +696,9 @@ void ScHTMLExport::WriteBody() _STRINGCONST( "JPG" ), XOUTBMP_USE_NATIVE_IF_POSSIBLE ); if( !nErr ) // fehlerhaft, da ist nichts auszugeben { - aGrfNm = URIHelper::SmartRelToAbs( aGrfNm ); + aGrfNm = URIHelper::SmartRel2Abs( + INetURLObject(aBaseURL), + aGrfNm, URIHelper::GetMaybeFileHdl(), true, false); if ( HasCId() ) MakeCIdURL( aGrfNm ); pLink = &aGrfNm; @@ -712,13 +715,17 @@ void ScHTMLExport::WriteBody() MakeCIdURL( aGrfNm ); } else - aGrfNm = URIHelper::SmartRelToAbs( aGrfNm ); + aGrfNm = URIHelper::SmartRel2Abs( + INetURLObject(aBaseURL), + aGrfNm, URIHelper::GetMaybeFileHdl(), true, false); pLink = &aGrfNm; } if( pLink ) { rStrm << ' ' << sHTML_O_background << "=\""; - OUT_STR( INetURLObject::AbsToRel( *pLink ) ) << '\"'; + OUT_STR( URIHelper::simpleNormalizedMakeRelative( + aBaseURL, + *pLink ) ) << '\"'; } } if ( !aHTMLStyle.aBackgroundColor.GetTransparency() ) |