summaryrefslogtreecommitdiff
path: root/sw/source/filter
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter')
-rw-r--r--sw/source/filter/html/css1atr.cxx2
-rw-r--r--sw/source/filter/html/htmlfly.cxx2
-rw-r--r--sw/source/filter/html/wrthtml.cxx5
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx9
-rw-r--r--sw/source/filter/ww8/docxexport.cxx4
-rw-r--r--sw/source/filter/ww8/docxexport.hxx2
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx46
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx8
-rw-r--r--sw/source/filter/ww8/rtfsdrexport.cxx2
9 files changed, 39 insertions, 41 deletions
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 308ff620f6e2..2e58fbb37fd0 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -1864,7 +1864,7 @@ static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rPageDesc,
AddUnitPropertyValue(sVal, rSz.Width(), rHTMLWrt.GetCSS1Unit());
sVal.append(' ');
AddUnitPropertyValue(sVal, rSz.Height(), rHTMLWrt.GetCSS1Unit());
- rHTMLWrt.OutCSS1_PropertyAscii(sCSS1_P_size, sVal);
+ rHTMLWrt.OutCSS1_PropertyAscii(sCSS1_P_size, sVal.makeStringAndClear());
}
// Die Abstand-Attribute koennen auf gwohnte Weise exportiert werden
diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx
index 8907a74914ab..c4e81e762f91 100644
--- a/sw/source/filter/html/htmlfly.cxx
+++ b/sw/source/filter/html/htmlfly.cxx
@@ -1145,7 +1145,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
aEndTags = rtl::OStringBuffer().
append(RTL_CONSTASCII_STRINGPARAM("</")).
append(OOO_STRING_SVTOOLS_HTML_font).
- append('>').append(aEndTags);
+ append('>').append(aEndTags).makeStringAndClear();
}
}
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 4a7cd31ed9a0..ff3c73bd7f83 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -1182,10 +1182,7 @@ void SwHTMLWriter::OutBackground( const SvxBrushItem *pBrushItem,
if( pLink )
{
String s( URIHelper::simpleNormalizedMakeRelative( GetBaseURL(), *pLink));
- rtl::OStringBuffer sOut;
- sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_background)
- .append("=\"");
- Strm() << sOut.makeStringAndClear();
+ Strm() << " " OOO_STRING_SVTOOLS_HTML_O_background "=\"";
HTMLOutFuncs::Out_String( Strm(), s, eDestEnc, &aNonConvertableCharacters ) << '\"';
}
}
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index bac074180d0e..abe68e83de39 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1212,7 +1212,7 @@ bool DocxAttributeOutput::StartURL( const String& rUrl, const String& rTarget )
::rtl::OString sId = m_rExport.AddRelation(
S( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" ),
- osUrl, S("External") );
+ osUrl );
m_pHyperlinkAttrList->add( FSNS( XML_r, XML_id), sId.getStr());
}
else
@@ -1987,8 +1987,7 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size
aRelId = m_rExport.AddRelation(
S( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" ),
- OUString( aFileName ),
- S( "External" ) );
+ OUString( aFileName ) );
nImageType = XML_link;
}
@@ -2044,12 +2043,12 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size
OString y( OString::valueOf( TwipsToEMU( pos.Y())));
m_pSerializer->startElementNS( XML_wp, XML_positionH, XML_relativeFrom, relativeFromH, FSEND );
m_pSerializer->startElementNS( XML_wp, XML_posOffset, FSEND );
- m_pSerializer->write( x );
+ m_pSerializer->write( x.getStr() );
m_pSerializer->endElementNS( XML_wp, XML_posOffset );
m_pSerializer->endElementNS( XML_wp, XML_positionH );
m_pSerializer->startElementNS( XML_wp, XML_positionV, XML_relativeFrom, relativeFromV, FSEND );
m_pSerializer->startElementNS( XML_wp, XML_posOffset, FSEND );
- m_pSerializer->write( y );
+ m_pSerializer->write( y.getStr() );
m_pSerializer->endElementNS( XML_wp, XML_posOffset );
m_pSerializer->endElementNS( XML_wp, XML_positionV );
}
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index 2436f13d41c3..90cf55580787 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -164,10 +164,10 @@ void DocxExport::AppendBookmark( const OUString& rName, bool /*bSkip*/ )
m_pAttrOutput->WriteBookmarks_Impl( aStarts, aEnds );
}
-::rtl::OString DocxExport::AddRelation( const OUString& rType, const OUString& rTarget, const OUString& rMode )
+::rtl::OString DocxExport::AddRelation( const OUString& rType, const OUString& rTarget )
{
OUString sId = m_pFilter->addRelation( m_pDocumentFS->getOutputStream(),
- rType, rTarget, rMode );
+ rType, rTarget, true );
return ::rtl::OUStringToOString( sId, RTL_TEXTENCODING_UTF8 );
}
diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx
index 3eaec51f5417..8963cd368834 100644
--- a/sw/source/filter/ww8/docxexport.hxx
+++ b/sw/source/filter/ww8/docxexport.hxx
@@ -119,7 +119,7 @@ public:
virtual void AppendBookmark( const rtl::OUString& rName, bool bSkip = false );
/// Returns the relationd id
- rtl::OString AddRelation( const rtl::OUString& rType, const rtl::OUString& rTarget, const rtl::OUString& rMode );
+ rtl::OString AddRelation( const rtl::OUString& rType, const rtl::OUString& rTarget );
virtual void WriteCR( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner = ww8::WW8TableNodeInfoInner::Pointer_t()*/ ) { /* FIXME no-op for docx, most probably should not even be in MSWordExportBase */ }
virtual void WriteChar( sal_Unicode ) { /* FIXME */ fprintf( stderr, "HACK! WriteChar() has nothing to do for docx.\n" ); }
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 1af6069de741..32855a4131c0 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -350,7 +350,7 @@ void RtfAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTe
}
if (!m_bBufferSectionHeaders)
- m_rExport.Strm() << aParagraph.makeStringAndClear();
+ m_rExport.Strm() << aParagraph.makeStringAndClear().getStr();
else
m_aSectionHeaders.append(aParagraph.makeStringAndClear());
}
@@ -369,12 +369,12 @@ void RtfAttributeOutput::StartParagraphProperties( const SwTxtNode& rNode )
// output page/section breaks
SwNodeIndex aNextIndex( rNode, 1 );
- m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear();
+ m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear().getStr();
m_bBufferSectionBreaks = true;
// output section headers / footers
if (!m_bBufferSectionHeaders)
- m_rExport.Strm() << m_aSectionHeaders.makeStringAndClear();
+ m_rExport.Strm() << m_aSectionHeaders.makeStringAndClear().getStr();
if ( aNextIndex.GetNode().IsTxtNode() )
{
@@ -397,7 +397,7 @@ void RtfAttributeOutput::StartParagraphProperties( const SwTxtNode& rNode )
aPar.append(' ');
}
if (!m_bBufferSectionHeaders)
- m_rExport.Strm() << aPar.makeStringAndClear();
+ m_rExport.Strm() << aPar.makeStringAndClear().getStr();
else
m_aSectionHeaders.append(aPar.makeStringAndClear());
}
@@ -406,7 +406,7 @@ void RtfAttributeOutput::EndParagraphProperties()
{
OSL_TRACE("%s", OSL_THIS_FUNC);
m_aStyles.append(m_aStylesEnd.makeStringAndClear());
- m_rExport.Strm() << m_aStyles.makeStringAndClear();
+ m_rExport.Strm() << m_aStyles.makeStringAndClear().getStr();
}
void RtfAttributeOutput::StartRun( const SwRedlineData* pRedlineData )
@@ -561,7 +561,7 @@ void RtfAttributeOutput::ParagraphStyle( sal_uInt16 nStyle )
if (pStyle)
aStyle.append(pStyle->getStr());
if (!m_bBufferSectionHeaders)
- m_rExport.Strm() << aStyle.makeStringAndClear();
+ m_rExport.Strm() << aStyle.makeStringAndClear().getStr();
else
m_aSectionHeaders.append(aStyle.makeStringAndClear());
}
@@ -934,7 +934,7 @@ void RtfAttributeOutput::StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t pT
// Emit row properties at the start of the row as well for non-nested
// tables, to support old readers.
if ( nCurrentDepth <= 1 )
- m_rExport.Strm() << m_aRowDefs.makeStringAndClear();
+ m_rExport.Strm() << m_aRowDefs.makeStringAndClear().getStr();
m_aRowDefs.setLength(0);
return;
}
@@ -946,7 +946,7 @@ void RtfAttributeOutput::StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t pT
// We'll write the table definition for nested tables later
if ( nCurrentDepth > 1 )
return;
- m_rExport.Strm() << m_aRowDefs.makeStringAndClear();
+ m_rExport.Strm() << m_aRowDefs.makeStringAndClear().getStr();
}
}
@@ -1071,7 +1071,7 @@ void RtfAttributeOutput::EndStyles( sal_uInt16 /*nNumberOfStyles*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
m_rExport.Strm() << '}';
- m_rExport.Strm() << m_aStylesheet.makeStringAndClear();
+ m_rExport.Strm() << m_aStylesheet.makeStringAndClear().getStr();
m_rExport.Strm() << '}';
}
@@ -1179,7 +1179,7 @@ void RtfAttributeOutput::StartSection()
m_aSectionBreaks.append(OOO_STRING_SVTOOLS_RTF_SECT OOO_STRING_SVTOOLS_RTF_SECTD);
if (!m_bBufferSectionBreaks)
- m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear();
+ m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear().getStr();
}
void RtfAttributeOutput::EndSection()
@@ -1301,7 +1301,7 @@ void RtfAttributeOutput::SectionType( sal_uInt8 nBreakCode )
}
m_aSectionBreaks.append(sType);
if (!m_bBufferSectionBreaks)
- m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear();
+ m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear().getStr();
}
void RtfAttributeOutput::NumberingDefinition( sal_uInt16 nId, const SwNumRule &/*rRule*/ )
@@ -1399,8 +1399,8 @@ void RtfAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
}
else
{
- m_rExport.Strm() << "\\'" << m_rExport.OutHex( rNumberingString.Len(), 2 );
- m_rExport.Strm() << m_rExport.OutString( rNumberingString, m_rExport.eDefaultEncoding );
+ m_rExport.Strm() << "\\'" << m_rExport.OutHex( rNumberingString.Len(), 2 ).getStr();
+ m_rExport.Strm() << m_rExport.OutString( rNumberingString, m_rExport.eDefaultEncoding ).getStr();
}
m_rExport.Strm() << ";}";
@@ -1421,7 +1421,7 @@ void RtfAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
m_rExport.OutULong(m_rExport.maFontHelper.GetId(*pFont));
}
m_rExport.OutputItemSet( *pOutSet, false, true, i18n::ScriptType::LATIN, m_rExport.mbExportModeRTF );
- m_rExport.Strm() << m_aStyles.makeStringAndClear();
+ m_rExport.Strm() << m_aStyles.makeStringAndClear().getStr();
}
m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_FI;
@@ -1502,13 +1502,13 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
m_rExport.mpParentFrame = &rFrame;
m_rExport.bOutFlyFrmAttrs = m_rExport.bRTFFlySyntax = true;
m_rExport.OutputFormat( rFrame.GetFrmFmt(), false, false, true );
- m_rExport.Strm() << m_aRunText.makeStringAndClear();
- m_rExport.Strm() << m_aStyles.makeStringAndClear();
+ m_rExport.Strm() << m_aRunText.makeStringAndClear().getStr();
+ m_rExport.Strm() << m_aStyles.makeStringAndClear().getStr();
m_rExport.bOutFlyFrmAttrs = m_rExport.bRTFFlySyntax = false;
m_rExport.Strm() << "{" OOO_STRING_SVTOOLS_RTF_IGNORE;
m_rExport.OutputFormat( rFrame.GetFrmFmt(), false, false, true );
- m_rExport.Strm() << m_aRunText.makeStringAndClear();
- m_rExport.Strm() << m_aStyles.makeStringAndClear();
+ m_rExport.Strm() << m_aRunText.makeStringAndClear().getStr();
+ m_rExport.Strm() << m_aStyles.makeStringAndClear().getStr();
m_rExport.Strm() << '}';
{
@@ -2630,7 +2630,7 @@ void RtfAttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
m_aSectionBreaks.append(OOO_STRING_SVTOOLS_RTF_PGHSXN);
m_aSectionBreaks.append((sal_Int32)rSize.GetHeight());
if (!m_bBufferSectionBreaks)
- m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear();
+ m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear().getStr();
}
}
@@ -2658,7 +2658,8 @@ void RtfAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace )
m_aSectionBreaks.append((sal_Int32)rLRSpace.GetRight());
}
if (!m_bBufferSectionBreaks)
- m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear();
+ m_rExport.Strm() <<
+ m_aSectionBreaks.makeStringAndClear().getStr();
}
else
{
@@ -2717,7 +2718,8 @@ void RtfAttributeOutput::FormatULSpace( const SvxULSpaceItem& rULSpace )
m_aSectionBreaks.append((sal_Int32)aDistances.dyaHdrBottom);
}
if (!m_bBufferSectionBreaks)
- m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear();
+ m_rExport.Strm() <<
+ m_aSectionBreaks.makeStringAndClear().getStr();
}
else
{
@@ -3067,7 +3069,7 @@ void RtfAttributeOutput::FontAlternateName( const String& rName ) const
OSL_TRACE("%s", OSL_THIS_FUNC);
m_rExport.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_IGNORE << OOO_STRING_SVTOOLS_RTF_FALT << ' ';
- m_rExport.Strm() << OUStringToOString( OUString( rName ), m_rExport.eCurrentEncoding ) << '}';
+ m_rExport.Strm() << OUStringToOString( OUString( rName ), m_rExport.eCurrentEncoding ).getStr() << '}';
}
/// Font charset.
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 271220faba11..efc597d648ff 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -291,7 +291,7 @@ void RtfExport::WriteRevTab()
const String* pAuthor = GetRedline(i);
Strm() << '{';
if (pAuthor)
- Strm() << OutString(*pAuthor, eDefaultEncoding);
+ Strm() << OutString(*pAuthor, eDefaultEncoding).getStr();
Strm() << ";}";
}
Strm() << '}' << sNewLine;
@@ -443,7 +443,7 @@ void RtfExport::WriteInfo()
Strm() << '{' << OOO_STRING_SVTOOLS_RTF_COMMENT << " ";
OUString sProduct;
utl::ConfigManager::GetDirectConfigProperty(utl::ConfigManager::PRODUCTNAME) >>= sProduct;
- Strm() << OUStringToOString( sProduct, eCurrentEncoding) << "}{" << OOO_STRING_SVTOOLS_RTF_VERN;
+ Strm() << OUStringToOString( sProduct, eCurrentEncoding).getStr() << "}{" << OOO_STRING_SVTOOLS_RTF_VERN;
OutULong( SUPD*10 ) << '}';
Strm() << '}';
}
@@ -479,7 +479,7 @@ void RtfExport::WritePageDescTable()
break;
Strm() << OOO_STRING_SVTOOLS_RTF_PGDSCNXT;
OutULong( i ) << ' ';
- Strm() << OutString( rPageDesc.GetName(), eDefaultEncoding) << ";}";
+ Strm() << OutString( rPageDesc.GetName(), eDefaultEncoding).getStr() << ";}";
}
Strm() << '}' << sNewLine;
bOutPageDescs = sal_False;
@@ -522,7 +522,7 @@ void RtfExport::ExportDocument_Impl()
WriteInfo();
// Default TabSize
- Strm() << m_pAttrOutput->m_aTabStop.makeStringAndClear() << sNewLine;
+ Strm() << m_pAttrOutput->m_aTabStop.makeStringAndClear().getStr() << sNewLine;
// Page description
WritePageDescTable();
diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx
index 4f6eeba1dd70..d75c38459e3b 100644
--- a/sw/source/filter/ww8/rtfsdrexport.cxx
+++ b/sw/source/filter/ww8/rtfsdrexport.cxx
@@ -469,7 +469,7 @@ sal_Int32 RtfSdrExport::StartShape()
m_rAttrOutput.RunText().append(OOO_STRING_SVTOOLS_RTF_SHPBYIGNORE);
for(std::map<OString,OString>::reverse_iterator i = m_aShapeProps.rbegin(); i != m_aShapeProps.rend(); ++i)
- lcl_AppendSP(m_rAttrOutput.RunText(), (*i).first, (*i).second );
+ lcl_AppendSP(m_rAttrOutput.RunText(), (*i).first.getStr(), (*i).second );
lcl_AppendSP(m_rAttrOutput.RunText(), "wzDescription", RtfExport::OutString( m_pSdrObject->GetDescription(), m_rExport.eCurrentEncoding));
lcl_AppendSP(m_rAttrOutput.RunText(), "wzName", RtfExport::OutString( m_pSdrObject->GetTitle(), m_rExport.eCurrentEncoding));