diff options
Diffstat (limited to 'sw/source/filter/ww8')
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 23 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxsdrexport.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfattributeoutput.cxx | 5 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8esh.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8nds.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8atr.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 2 |
7 files changed, 24 insertions, 28 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 4a4035ada22d..383d7c57671c 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -2355,10 +2355,9 @@ bool DocxAttributeOutput::StartURL( const OUString& rUrl, const OUString& rTarge OUStringToOString( sMark, RTL_TEXTENCODING_UTF8 ).getStr( ) ); } - OUString sTarget( rTarget ); - if ( !sTarget.isEmpty() ) + if ( !rTarget.isEmpty() ) { - OString soTarget = OUStringToOString( sTarget, RTL_TEXTENCODING_UTF8 ); + OString soTarget = OUStringToOString( rTarget, RTL_TEXTENCODING_UTF8 ); m_pHyperlinkAttrList->add(FSNS( XML_w, XML_tgtFrame ), soTarget.getStr()); } } @@ -6060,12 +6059,11 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel, FSEND ); // text - OUString aText( rNumberingString ); - OUStringBuffer aBuffer( aText.getLength() + WW8ListManager::nMaxLevel ); + OUStringBuffer aBuffer( rNumberingString.getLength() + WW8ListManager::nMaxLevel ); - const sal_Unicode *pPrev = aText.getStr(); - const sal_Unicode *pIt = aText.getStr(); - while ( pIt < aText.getStr() + aText.getLength() ) + const sal_Unicode *pPrev = rNumberingString.getStr(); + const sal_Unicode *pIt = rNumberingString.getStr(); + while ( pIt < rNumberingString.getStr() + rNumberingString.getLength() ) { // convert the level values to %NUMBER form // (we don't use pNumLvlPos at all) @@ -6084,7 +6082,7 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel, aBuffer.append( pPrev, pIt - pPrev ); // If bullet char is empty, set lvlText as empty - if ( aText.equals ( OUString(sal_Unicode(0)) ) && nNumberingType == SVX_NUM_CHAR_SPECIAL ) + if ( rNumberingString.equals ( OUString(sal_Unicode(0)) ) && nNumberingType == SVX_NUM_CHAR_SPECIAL ) { m_pSerializer->singleElementNS( XML_w, XML_lvlText, FSNS( XML_w, XML_val ), "", FSEND ); } @@ -6271,7 +6269,7 @@ void DocxAttributeOutput::CharEscapement( const SvxEscapementItem& rEscapement ) void DocxAttributeOutput::CharFont( const SvxFontItem& rFont) { GetExport().GetId( rFont ); // ensure font info is written to fontTable.xml - OUString sFontName(rFont.GetFamilyName()); + const OUString& sFontName(rFont.GetFamilyName()); OString sFontNameUtf8 = OUStringToOString(sFontName, RTL_TEXTENCODING_UTF8); if (!sFontNameUtf8.isEmpty()) AddToAttrList( m_pFontsAttrList, 2, @@ -6427,7 +6425,7 @@ void DocxAttributeOutput::CharBackground( const SvxBrushItem& rBrush ) void DocxAttributeOutput::CharFontCJK( const SvxFontItem& rFont ) { - OUString sFontName(rFont.GetFamilyName()); + const OUString& sFontName(rFont.GetFamilyName()); OString sFontNameUtf8 = OUStringToOString(sFontName, RTL_TEXTENCODING_UTF8); AddToAttrList( m_pFontsAttrList, FSNS( XML_w, XML_eastAsia ), sFontNameUtf8.getStr() ); } @@ -6450,10 +6448,9 @@ void DocxAttributeOutput::CharWeightCJK( const SvxWeightItem& rWeight ) void DocxAttributeOutput::CharFontCTL( const SvxFontItem& rFont ) { - OUString sFontName(rFont.GetFamilyName()); + const OUString& sFontName(rFont.GetFamilyName()); OString sFontNameUtf8 = OUStringToOString(sFontName, RTL_TEXTENCODING_UTF8); AddToAttrList( m_pFontsAttrList, FSNS( XML_w, XML_cs ), sFontNameUtf8.getStr() ); - } void DocxAttributeOutput::CharPostureCTL( const SvxPostureItem& rPosture) diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx index 00f50162f861..475e678d9083 100644 --- a/sw/source/filter/ww8/docxsdrexport.cxx +++ b/sw/source/filter/ww8/docxsdrexport.cxx @@ -770,8 +770,8 @@ void DocxSdrExport::writeVMLDrawing(const SdrObject* sdrObj, const SwFrameFormat m_pImpl->m_pDrawingML->SetFS(m_pImpl->m_pSerializer); // See WinwordAnchoring::SetAnchoring(), these are not part of the SdrObject, have to be passed around manually. - SwFormatHoriOrient rHoriOri = (rFrameFormat).GetHoriOrient(); - SwFormatVertOrient rVertOri = (rFrameFormat).GetVertOrient(); + const SwFormatHoriOrient& rHoriOri = rFrameFormat.GetHoriOrient(); + const SwFormatVertOrient& rVertOri = rFrameFormat.GetVertOrient(); m_pImpl->m_rExport.VMLExporter().AddSdrObject(*(sdrObj), rHoriOri.GetHoriOrient(), rVertOri.GetVertOrient(), rHoriOri.GetRelationOrient(), @@ -879,7 +879,7 @@ void DocxSdrExport::writeDMLDrawing(const SdrObject* pSdrObject, const SwFrameFo void DocxSdrExport::Impl::textFrameShadow(const SwFrameFormat& rFrameFormat) { - SvxShadowItem aShadowItem = rFrameFormat.GetShadow(); + const SvxShadowItem& aShadowItem = rFrameFormat.GetShadow(); if (aShadowItem.GetLocation() == SVX_SHADOW_NONE) return; @@ -980,7 +980,7 @@ OString lcl_ConvertTransparency(const Color& rColor) void DocxSdrExport::writeDMLEffectLst(const SwFrameFormat& rFrameFormat) { - SvxShadowItem aShadowItem = rFrameFormat.GetShadow(); + const SvxShadowItem& aShadowItem = rFrameFormat.GetShadow(); // Output effects if (aShadowItem.GetLocation() != SVX_SHADOW_NONE) diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 20b361a1fb5b..39b4a68fc5ae 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -560,9 +560,8 @@ bool RtfAttributeOutput::StartURL(const OUString& rUrl, const OUString& rTarget) m_aStyles.append(OOO_STRING_SVTOOLS_RTF_FLDINST); m_aStyles.append(" HYPERLINK "); - OUString sURL(rUrl); m_aStyles.append("\""); - m_aStyles.append(msfilter::rtfutil::OutString(sURL, m_rExport.m_eCurrentEncoding)); + m_aStyles.append(msfilter::rtfutil::OutString(rUrl, m_rExport.m_eCurrentEncoding)); m_aStyles.append("\" "); if (!rTarget.isEmpty()) @@ -1691,7 +1690,7 @@ namespace void lcl_TextFrameShadow(std::vector< std::pair<OString, OString> >& rFlyProperties, const SwFrameFormat& rFrameFormat) { - SvxShadowItem aShadowItem = rFrameFormat.GetShadow(); + const SvxShadowItem& aShadowItem = rFrameFormat.GetShadow(); if (aShadowItem.GetLocation() == SVX_SHADOW_NONE) return; diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 7cb827cf89a5..1ac6ae80164c 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -3174,7 +3174,7 @@ bool SwMSConvertControls::ReadOCXStream( tools::SvRef<SotStorage>& rSrc1, void SwMSConvertControls::ExportControl(WW8Export &rWW8Wrt, const SdrUnoObj& rFormObj) { - uno::Reference< awt::XControlModel > xControlModel = + const uno::Reference< awt::XControlModel >& xControlModel = rFormObj.GetUnoControlModel(); //Why oh lord do we use so many different units ? diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 5717ae4bfd10..39b787907e99 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -429,7 +429,7 @@ void SwWW8AttrIter::OutAttr( sal_Int32 nSwPos, bool bRuby ) if (nWhich == RES_TXTATR_AUTOFMT) { const SwFormatAutoFormat& rAutoFormat = static_cast<const SwFormatAutoFormat&>(pHt->GetAttr()); - const std::shared_ptr<SfxItemSet> pSet = rAutoFormat.GetStyleHandle(); + const std::shared_ptr<SfxItemSet>& pSet = rAutoFormat.GetStyleHandle(); SfxWhichIter aIter( *pSet ); const SfxPoolItem* pItem; sal_uInt16 nWhichId = aIter.FirstWhich(); @@ -2108,7 +2108,7 @@ void MSWordExportBase::OutputTextNode( const SwTextNode& rNode ) AppendWordBookmark( sBkmkName ); } - OUString aStr( rNode.GetText() ); + const OUString& aStr( rNode.GetText() ); sal_Int32 nAktPos = 0; sal_Int32 const nEnd = aStr.getLength(); @@ -2979,7 +2979,7 @@ void WW8AttributeOutput::OutputFlyFrame_Impl( const ww8::Frame& rFormat, const P // because we deliver the normal content of the table cell, and no border // ( Flag was deleted above in aSaveData() ) m_rWW8Export.m_bOutTable = true; - const OUString aName = rFrameFormat.GetName(); + const OUString& aName = rFrameFormat.GetName(); m_rWW8Export.StartCommentOutput(aName); m_rWW8Export.WriteText(); m_rWW8Export.EndCommentOutput(aName); diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 96674f9cdeb5..cf98b68152b0 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -762,7 +762,7 @@ void MSWordExportBase::OutputFormat( const SwFormat& rFormat, bool bPapFormat, b if ( m_bStyDef && DisallowInheritingOutlineNumbering(rFormat) ) { SfxItemSet aSet( rFormat.GetAttrSet() ); - SvxLRSpaceItem aLR( + const SvxLRSpaceItem& aLR( ItemGet<SvxLRSpaceItem>(aSet, RES_LR_SPACE)); aSet.Put( aLR ); OutputItemSet( aSet, bPapFormat, bChpFormat, @@ -1727,7 +1727,7 @@ void WW8Export::OutputField( const SwField* pField, ww::eField eFieldType, if ( nSubType == REF_SETREFATTR || nSubType == REF_BOOKMARK ) { - const OUString aRefName(rRField.GetSetRefName()); + const OUString& aRefName(rRField.GetSetRefName()); aLinkStr = GetBookmarkName( nSubType, &aRefName, 0 ); } else if ( nSubType == REF_FOOTNOTE || @@ -2756,7 +2756,7 @@ void AttributeOutputBase::TextField( const SwFormatField& rField ) break; } { - const OUString aRefName(rRField.GetSetRefName()); + const OUString& aRefName(rRField.GetSetRefName()); sStr = FieldString(eField) + MSWordExportBase::GetBookmarkName(nSubType, &aRefName, 0); } diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index b1d72b99a9a7..d45992f04145 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -5366,7 +5366,7 @@ sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss) { Graphic aGraphic = vecBulletGrf[nGrfBulletCP]->GetGrf(); SvxBrushItem aBrush(aGraphic, GPOS_AREA, SID_ATTR_BRUSH); - vcl::Font aFont = numfunc::GetDefBulletFont(); + const vcl::Font& aFont = numfunc::GetDefBulletFont(); int nHeight = aFont.GetFontHeight() * 12; Size aPrefSize( aGraphic.GetPrefSize()); if (aPrefSize.Height() * aPrefSize.Width() != 0 ) |