diff options
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/filter/html/css1atr.cxx | 17 | ||||
-rw-r--r-- | sw/source/filter/html/htmlatr.cxx | 13 | ||||
-rw-r--r-- | sw/source/filter/html/htmlfly.cxx | 25 | ||||
-rw-r--r-- | sw/source/filter/html/htmlplug.cxx | 11 | ||||
-rw-r--r-- | sw/source/filter/html/wrthtml.cxx | 51 | ||||
-rw-r--r-- | sw/source/filter/html/wrthtml.hxx | 8 | ||||
-rw-r--r-- | sw/source/filter/rtf/rtfatr.cxx | 67 |
7 files changed, 55 insertions, 137 deletions
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index bd49b11997e6..f4fafd5d6959 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -2,9 +2,9 @@ * * $RCSfile: css1atr.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: jp $ $Date: 2000-10-20 13:42:31 $ + * last change: $Author: jp $ $Date: 2000-11-01 19:23:14 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -3091,15 +3091,13 @@ static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt, { // Grafik als (JPG-)File speichern const String* pTempFileName = rHTMLWrt.GetOrigFileName(); - if(pTempFileName) + if( pTempFileName ) sGrfNm = *pTempFileName; USHORT nErr = XOutBitmap::WriteGraphic( *pGrf, sGrfNm, String::CreateFromAscii("JPG") ); if( !nErr ) // fehlerhaft, da ist nichts auszugeben { sGrfNm = URIHelper::SmartRelToAbs( sGrfNm ); - if( rHTMLWrt.HasCId() ) - rHTMLWrt.MakeCIdURL( sGrfNm ); pLink = &sGrfNm; } else @@ -3108,12 +3106,10 @@ static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt, } } } - else if( !pGrfName && (rHTMLWrt.bCfgCpyLinkedGrfs || rHTMLWrt.HasCId()) ) + else if( !pGrfName && rHTMLWrt.bCfgCpyLinkedGrfs ) { sGrfNm = *pLink; - rWrt.CopyLocalFileToINet( sGrfNm, rHTMLWrt.HasCId() ); - if( rHTMLWrt.HasCId() ) - rHTMLWrt.MakeCIdURL( sGrfNm ); + rWrt.CopyLocalFileToINet( sGrfNm ); pLink = &sGrfNm; } @@ -3489,6 +3485,9 @@ SwAttrFnTab aCSS1AttrFnTab = { /************************************************************************* $Log: not supported by cvs2svn $ + Revision 1.2 2000/10/20 13:42:31 jp + use correct INetURL-Decode enum + Revision 1.1.1.1 2000/09/18 17:14:55 hr initial import diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index c6311b7342c1..20622b49f7cc 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -2,9 +2,9 @@ * * $RCSfile: htmlatr.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: jp $ $Date: 2000-10-20 13:42:43 $ + * last change: $Author: jp $ $Date: 2000-11-01 19:23:14 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -2334,9 +2334,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode ) sal_Unicode c = rStr.GetChar( nStrPos ); // versuche nach ungefaehr 255 Zeichen eine neue Zeile zu // beginnen, aber nicht in PRE und nur bei Spaces - // MIB 15.4.99: Auf Wunsch von ST wird in Mails auch in einem - // PRE ganz bewusst umgebrocheni (#64159#). - if( ' '==c && (!rHTMLWrt.nLastParaToken || rHTMLWrt.HasCId()) ) + if( ' '==c && !rHTMLWrt.nLastParaToken ) { xub_StrLen nLineLen; if( rHTMLWrt.nLastParaToken ) @@ -3092,11 +3090,14 @@ SwAttrFnTab aHTMLAttrFnTab = { Source Code Control System - Header - $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/filter/html/htmlatr.cxx,v 1.2 2000-10-20 13:42:43 jp Exp $ + $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/filter/html/htmlatr.cxx,v 1.3 2000-11-01 19:23:14 jp Exp $ Source Code Control System - Update $Log: not supported by cvs2svn $ + Revision 1.2 2000/10/20 13:42:43 jp + use correct INetURL-Decode enum + Revision 1.1.1.1 2000/09/18 17:14:55 hr initial import diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx index d7477a50c483..d61ef3df282a 100644 --- a/sw/source/filter/html/htmlfly.cxx +++ b/sw/source/filter/html/htmlfly.cxx @@ -2,9 +2,9 @@ * * $RCSfile: htmlfly.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: jp $ $Date: 2000-10-20 13:42:52 $ + * last change: $Author: jp $ $Date: 2000-11-01 19:23:14 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1281,8 +1281,6 @@ Writer& OutHTML_BulletImage( Writer& rWrt, if( !nErr ) { rGrfName = URIHelper::SmartRelToAbs( rGrfName ); - if( rHTMLWrt.HasCId() ) - rHTMLWrt.MakeCIdURL( rGrfName ); pLink = &rGrfName; } else @@ -1294,11 +1292,9 @@ Writer& OutHTML_BulletImage( Writer& rWrt, else { rGrfName = *pLink; - if( rHTMLWrt.bCfgCpyLinkedGrfs || rHTMLWrt.HasCId() ) + if( rHTMLWrt.bCfgCpyLinkedGrfs ) { - rHTMLWrt.CopyLocalFileToINet( rGrfName, rHTMLWrt.HasCId() ); - if( rHTMLWrt.HasCId() ) - rHTMLWrt.MakeCIdURL( rGrfName ); + rHTMLWrt.CopyLocalFileToINet( rGrfName ); pLink = &rGrfName; } } @@ -1615,8 +1611,6 @@ static Writer & OutHTML_FrmFmtAsImage( Writer& rWrt, const SwFrmFmt& rFrmFmt, } aGrfNm = URIHelper::SmartRelToAbs( aGrfNm ); - if( rHTMLWrt.HasCId() ) - rHTMLWrt.MakeCIdURL( aGrfNm ); Size aSz( 0, 0 ); ULONG nFrmFlags = bInCntnr ? HTML_FRMOPTS_GENIMG_CNTNR : HTML_FRMOPTS_GENIMG; @@ -1676,11 +1670,9 @@ static Writer& OutHTML_FrmFmtGrfNode( Writer& rWrt, const SwFrmFmt& rFrmFmt, else { pGrfNd->GetFileFilterNms( &aGrfNm, 0 ); - if( rHTMLWrt.bCfgCpyLinkedGrfs || rHTMLWrt.HasCId() ) - rWrt.CopyLocalFileToINet( aGrfNm, rHTMLWrt.HasCId() ); + if( rHTMLWrt.bCfgCpyLinkedGrfs ) + rWrt.CopyLocalFileToINet( aGrfNm ); } - if( rHTMLWrt.HasCId() ) - rHTMLWrt.MakeCIdURL( aGrfNm ); ULONG nFrmFlags = bInCntnr ? HTML_FRMOPTS_IMG_CNTNR : HTML_FRMOPTS_IMG; if( rHTMLWrt.IsHTMLMode( HTMLMODE_ABS_POS_FLY ) && !bInCntnr ) @@ -1962,11 +1954,14 @@ BOOL SwHTMLPosFlyFrm::operator<( const SwHTMLPosFlyFrm& rFrm ) const Source Code Control System - Header - $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/filter/html/htmlfly.cxx,v 1.2 2000-10-20 13:42:52 jp Exp $ + $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/filter/html/htmlfly.cxx,v 1.3 2000-11-01 19:23:14 jp Exp $ Source Code Control System - Update $Log: not supported by cvs2svn $ + Revision 1.2 2000/10/20 13:42:52 jp + use correct INetURL-Decode enum + Revision 1.1.1.1 2000/09/18 17:14:55 hr initial import diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index a265e8b92d2d..9f6389728353 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -2,9 +2,9 @@ * * $RCSfile: htmlplug.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: jp $ $Date: 2000-10-20 13:43:09 $ + * last change: $Author: jp $ $Date: 2000-11-01 19:23:14 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1301,8 +1301,6 @@ Writer& OutHTML_FrmFmtOLENodeGrf( Writer& rWrt, const SwFrmFmt& rFrmFmt, return rWrt; } aGrfNm = URIHelper::SmartRelToAbs( aGrfNm ); - if( rHTMLWrt.HasCId() ) - rHTMLWrt.MakeCIdURL( aGrfNm ); ULONG nFlags = bInCntnr ? HTML_FRMOPTS_GENIMG_CNTNR : HTML_FRMOPTS_GENIMG; OutHTML_Image( rWrt, rFrmFmt, aGrfNm, @@ -1317,11 +1315,14 @@ Writer& OutHTML_FrmFmtOLENodeGrf( Writer& rWrt, const SwFrmFmt& rFrmFmt, Source Code Control System - Header - $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/filter/html/htmlplug.cxx,v 1.2 2000-10-20 13:43:09 jp Exp $ + $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/filter/html/htmlplug.cxx,v 1.3 2000-11-01 19:23:14 jp Exp $ Source Code Control System - Update $Log: not supported by cvs2svn $ + Revision 1.2 2000/10/20 13:43:09 jp + use correct INetURL-Decode enum + Revision 1.1.1.1 2000/09/18 17:14:55 hr initial import diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index 6468154b714f..59ba546217ab 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -2,9 +2,9 @@ * * $RCSfile: wrthtml.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: jp $ $Date: 2000-10-20 13:43:17 $ + * last change: $Author: jp $ $Date: 2000-11-01 19:23:14 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -423,20 +423,6 @@ sal_uInt32 SwHTMLWriter::WriteStream() GetNumInfo().Clear(); pNextNumRuleInfo = 0; - // Content-Id setzen - aCId.Erase(); - SwDocShell *pDocSh = pDoc->GetDocShell(); - if( pDocSh ) - { - const SfxPoolItem *pItem = pDocSh->GetItem( SID_ORIGURL ); - if( pItem ) - { - aCId = ((const SfxStringItem *)pItem)->GetValue(); - ASSERT( aCId.Len(), "CID ohne Laenge!" ); - nWhishLineLen = 72; - } - } - ByteString aStartTags; // Tabellen und Bereiche am Doc.-Anfang beachten @@ -1235,8 +1221,6 @@ void SwHTMLWriter::OutBackground( const SvxBrushItem *pBrushItem, if( !nErr ) // fehlerhaft, da ist nichts auszugeben { rEmbGrfNm = URIHelper::SmartRelToAbs( rEmbGrfNm ); - if( HasCId() ) - MakeCIdURL( rEmbGrfNm ); pLink = &rEmbGrfNm; } else @@ -1248,11 +1232,9 @@ void SwHTMLWriter::OutBackground( const SvxBrushItem *pBrushItem, else { rEmbGrfNm = *pLink; - if( HasCId() || bCfgCpyLinkedGrfs ) + if( bCfgCpyLinkedGrfs ) { - CopyLocalFileToINet( rEmbGrfNm, HasCId() ); - if( HasCId() ) - MakeCIdURL( rEmbGrfNm ); + CopyLocalFileToINet( rEmbGrfNm ); pLink = &rEmbGrfNm; } } @@ -1324,26 +1306,6 @@ sal_uInt16 SwHTMLWriter::GetHTMLFontSize( sal_uInt32 nHeight ) const return nSize; } - -void SwHTMLWriter::MakeCIdURL( String& rURL ) -{ - if( !aCId.Len() ) - return; - - INetURLObject aURLObj( rURL ); - if( INET_PROT_FILE!=aURLObj.GetProtocol() ) - return; - - String aLastName( aURLObj.GetLastName() ); - ASSERT( aLastName.Len(), "Dateiname ohne Laenge!" ); - // TODO: unicode? - aLastName.ToLowerAscii(); - - rURL.AssignAscii( "cid:" ); - ((rURL += aLastName) += '.') += aCId; -} - - // Struktur speichert die aktuellen Daten des Writers zwischen, um // einen anderen Dokument-Teil auszugeben, wie z.B. Header/Footer HTMLSaveData::HTMLSaveData( SwHTMLWriter& rWriter, sal_uInt32 nStt, sal_uInt32 nEnd, @@ -1432,11 +1394,14 @@ void GetHTMLWriter( const String&, WriterRef& xRet ) Source Code Control System - Header - $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/filter/html/wrthtml.cxx,v 1.2 2000-10-20 13:43:17 jp Exp $ + $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/filter/html/wrthtml.cxx,v 1.3 2000-11-01 19:23:14 jp Exp $ Source Code Control System - Update $Log: not supported by cvs2svn $ + Revision 1.2 2000/10/20 13:43:17 jp + use correct INetURL-Decode enum + Revision 1.1.1.1 2000/09/18 17:14:56 hr initial import diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx index 71407a1f1dcf..6f4255ab19a2 100644 --- a/sw/source/filter/html/wrthtml.hxx +++ b/sw/source/filter/html/wrthtml.hxx @@ -2,9 +2,9 @@ * * $RCSfile: wrthtml.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:14:56 $ + * last change: $Author: jp $ $Date: 2000-11-01 19:23:14 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -225,8 +225,6 @@ SV_DECL_PTRARR_SORT_DEL( SwHTMLFmtInfos, SwHTMLFmtInfo*, 1, 1 ) class SwHTMLWriter : public Writer { - String aCId; // Content-Id fuer Mail-Export - SwHTMLPosFlyFrms *pHTMLPosFlyFrms; SwHTMLNumRuleInfo *pNumRuleInfo;// aktuelle Numerierung SwHTMLNumRuleInfo *pNextNumRuleInfo; @@ -503,8 +501,6 @@ public: sal_Bool IsHTMLMode( sal_uInt32 nMode ) const { return (nHTMLMode & nMode) != 0; } inline sal_Bool IsCSS1Source( sal_uInt16 n ) const; - sal_Bool HasCId() const { return aCId.Len() > 0; } - void MakeCIdURL( String& rURL ); static const sal_Char *GetNumFormat( sal_uInt16 nFmt ); static void PrepareFontList( const SvxFontItem& rFontItem, String& rNames, diff --git a/sw/source/filter/rtf/rtfatr.cxx b/sw/source/filter/rtf/rtfatr.cxx index 20011466554d..738f859a0ee9 100644 --- a/sw/source/filter/rtf/rtfatr.cxx +++ b/sw/source/filter/rtf/rtfatr.cxx @@ -2,9 +2,9 @@ * * $RCSfile: rtfatr.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: jp $ $Date: 2000-10-20 13:43:28 $ + * last change: $Author: jp $ $Date: 2000-11-01 19:25:51 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -832,18 +832,6 @@ static Writer& OutRTF_SwGrfNode( Writer& rWrt, SwCntntNode & rNode ) if( rRTFWrt.bOutFmtAttr ) // wurde ueberhaupt ein Attrribut rRTFWrt.Strm() << "}{"; // ausgegeben ?? - String aCID; - SwDocShell *pDocSh = rWrt.pDoc->GetDocShell(); - if( pDocSh ) - { - const SfxPoolItem *pItem = pDocSh->GetItem( SID_ORIGURL ); - if( pItem ) - { - aCID = ((const SfxStringItem *)pItem)->GetValue(); - ASSERT( aCID.Len(), "CID ohne Laenge!" ); - } - } - String aGrfNm; const SwMirrorGrf& rMirror = pNd->GetSwAttrSet().GetMirrorGrf(); if( !pNd->IsLinkedFile() || RES_DONT_MIRROR_GRF != rMirror.GetValue() ) @@ -879,48 +867,18 @@ static Writer& OutRTF_SwGrfNode( Writer& rWrt, SwCntntNode & rNode ) rRTFWrt.Strm() << "}}"; return rWrt; } - - // MIB 17.7.97: Wenn Mail-Export, dann in eine file-URL draus machen, - // damit wir spaeter auf ein file-Protokoll stossen. - if( aCID.Len() ) - aGrfNm = URIHelper::SmartRelToAbs( aGrfNm ); } else - { pNd->GetFileFilterNms( &aGrfNm, 0 ); - if( aCID.Len() ) - rWrt.CopyLocalFileToINet( aGrfNm, TRUE ); - } - - if( aCID.Len() ) - { - INetURLObject aURLObj( aGrfNm ); - if( INET_PROT_FILE==aURLObj.GetProtocol() ) - { - String aLastName( aURLObj.GetLastName( - INetURLObject::DECODE_UNAMBIGUOUS) ); - ASSERT( aLastName.Len(), "Dateiname ohne Laenge!" ); - GetAppCharClass().toLower( aLastName ); - aGrfNm.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "cid:" )); - ((aGrfNm = aLastName) += '.') += aCID; - } - else - aGrfNm = INetURLObject::AbsToRel( aGrfNm, - INetURLObject::WAS_ENCODED, - INetURLObject::DECODE_UNAMBIGUOUS); - } - else - { - // MIB->JP: Warum erst AbsToRel und dann das URL-Objekt? So - // kommt bei relativierbaren URLs als Protokoll "unknown" raus. - // Ist das Absicht? - aGrfNm = INetURLObject::AbsToRel( aGrfNm, INetURLObject::WAS_ENCODED, - INetURLObject::DECODE_UNAMBIGUOUS); - INetURLObject aUrl( aGrfNm ); - if( aUrl.GetProtocol() == INET_PROT_FILE ) - aGrfNm = aUrl.PathToFileName(); - } + // MIB->JP: Warum erst AbsToRel und dann das URL-Objekt? So + // kommt bei relativierbaren URLs als Protokoll "unknown" raus. + // Ist das Absicht? + aGrfNm = INetURLObject::AbsToRel( aGrfNm, INetURLObject::WAS_ENCODED, + INetURLObject::DECODE_UNAMBIGUOUS); + INetURLObject aUrl( aGrfNm ); + if( aUrl.GetProtocol() == INET_PROT_FILE ) + aGrfNm = aUrl.PathToFileName(); // Bitmap als File-Referenz speichern rRTFWrt.Strm() << sRTF_FIELD << sRTF_FLDPRIV; @@ -3007,11 +2965,14 @@ SwNodeFnTab aRTFNodeFnTab = { Source Code Control System - Header - $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/filter/rtf/rtfatr.cxx,v 1.2 2000-10-20 13:43:28 jp Exp $ + $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/filter/rtf/rtfatr.cxx,v 1.3 2000-11-01 19:25:51 jp Exp $ Source Code Control System - Update $Log: not supported by cvs2svn $ + Revision 1.2 2000/10/20 13:43:28 jp + use correct INetURL-Decode enum + Revision 1.1.1.1 2000/09/18 17:14:56 hr initial import |