summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-07-13 11:44:39 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-07-13 11:44:39 +0200
commit9fb2a9c895334c88eae7641b26921a3d1ce9c909 (patch)
tree22346d32641fab34ccfd2f73f83093d35774598b /sw
parentfd40ba1e2eb709c34672b0e20052fe4f9130739f (diff)
loplugin:oncevar: empty strings: sw
Change-Id: I38d5669078308b425d8e87090ef72279de96c6c9
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/odfimport/odfimport.cxx3
-rw-r--r--sw/source/core/doc/tblafmt.cxx3
-rw-r--r--sw/source/core/unocore/unoframe.cxx3
-rw-r--r--sw/source/filter/html/svxcss1.cxx4
-rw-r--r--sw/source/filter/html/wrthtml.cxx3
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx7
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx9
-rw-r--r--sw/source/ui/dbui/customizeaddresslistdialog.cxx3
-rw-r--r--sw/source/uibase/app/apphdl.cxx3
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx3
-rw-r--r--sw/source/uibase/uiview/view2.cxx3
-rw-r--r--sw/source/uibase/utlui/glbltree.cxx3
12 files changed, 17 insertions, 30 deletions
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index a105bd658179..dfd99a246634 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -656,9 +656,8 @@ DECLARE_ODFIMPORT_TEST(testSpellmenuRedline, "spellmenu-redline.odt")
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
CPPUNIT_ASSERT(pTextDoc);
SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
- OUString aParaText;
uno::Reference<linguistic2::XSpellAlternatives> xAlt;
- SwSpellPopup aPopup(pWrtShell, xAlt, aParaText);
+ SwSpellPopup aPopup(pWrtShell, xAlt, OUString());
Menu& rMenu = aPopup.GetMenu();
// Make sure that if we show the spellcheck popup menu (for the current
// document, which contains redlines), then the last two entries will be
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 44fbbfaad073..4bc795809203 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -1227,9 +1227,8 @@ SwTableAutoFormatTable::~SwTableAutoFormatTable()
SwTableAutoFormatTable::SwTableAutoFormatTable()
: m_pImpl(new Impl)
{
- OUString sNm;
std::unique_ptr<SwTableAutoFormat> pNew(new SwTableAutoFormat(
- SwStyleNameMapper::GetUIName(RES_POOLTABSTYLE_DEFAULT, sNm)));
+ SwStyleNameMapper::GetUIName(RES_POOLTABSTYLE_DEFAULT, OUString())));
SwBoxAutoFormat aNew;
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index f43b6bace8e3..a10893f9a8c4 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -1694,8 +1694,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any&
{
svt::EmbeddedObjectRef &rObj = pOleNode->GetOLEObj().GetObject();
- OUString aMediaType;
- rObj.SetGraphic( aGraphic, aMediaType );
+ rObj.SetGraphic( aGraphic, OUString() );
}
}
}
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index eeeeca87c8de..5c84a9c7fc43 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -1074,7 +1074,7 @@ static void ParseCSS1_font_family( const CSS1Expression *pExpr,
{
OSL_ENSURE( pExpr, "no expression" );
- OUString aName, aStyleName;
+ OUString aName;
rtl_TextEncoding eEnc = rParser.GetDfltEncoding();
const FontList *pFList = rParser.GetFontList();
bool bFirst = true;
@@ -1126,7 +1126,7 @@ static void ParseCSS1_font_family( const CSS1Expression *pExpr,
if( !aName.isEmpty() && !rParser.IsIgnoreFontFamily() )
{
- SvxFontItem aFont( FAMILY_DONTKNOW, aName, aStyleName, PITCH_DONTKNOW,
+ SvxFontItem aFont( FAMILY_DONTKNOW, aName, OUString(), PITCH_DONTKNOW,
eEnc, aItemIds.nFont );
if( rParser.IsSetWesternProps() )
rItemSet.Put( aFont );
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index cff264ca1bc1..155a8f6784ad 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -1044,8 +1044,7 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs )
if( m_bCfgOutStyles )
{
- OUString dummy;
- OutCSS1_BodyTagStyleOpt( *this, rItemSet, dummy );
+ OutCSS1_BodyTagStyleOpt( *this, rItemSet, OUString() );
}
// append events
if( pDoc->GetDocShell() ) // only with DocShell BASIC is possible
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 8c5e7369945a..d31fe60928e7 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1464,7 +1464,7 @@ void DocxAttributeOutput::WriteFFData( const FieldInfos& rInfos )
if ( rInfos.eType == ww::eFORMDROPDOWN )
{
uno::Sequence< OUString> vListEntries;
- OUString sName, sHelp, sToolTip, sSelected;
+ OUString sName, sSelected;
FieldMarkParamsHelper params( rFieldmark );
params.extractParam( ODF_FORMDROPDOWN_LISTENTRY, vListEntries );
@@ -1477,7 +1477,7 @@ void DocxAttributeOutput::WriteFFData( const FieldInfos& rInfos )
sSelected = vListEntries[ nSelectedIndex ];
}
- GetExport().DoComboBox( sName, sHelp, sToolTip, sSelected, vListEntries );
+ GetExport().DoComboBox( sName, OUString(), OUString(), sSelected, vListEntries );
}
else if ( rInfos.eType == ww::eFORMCHECKBOX )
{
@@ -6845,8 +6845,7 @@ void DocxAttributeOutput::SetField( const SwField& rField, ww::eField eType, con
void DocxAttributeOutput::WriteExpand( const SwField* pField )
{
// Will be written in the next End Run
- OUString sCmd;
- m_rExport.OutputField( pField, ww::eUNKNOWN, sCmd );
+ m_rExport.OutputField( pField, ww::eUNKNOWN, OUString() );
}
void DocxAttributeOutput::WriteField_Impl( const SwField* pField, ww::eField eType, const OUString& rFieldCmd, FieldFlags nMode )
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index 4ed69955cde8..b5ca4fc4aabc 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -484,8 +484,7 @@ SwCreateAddressListDialog::SwCreateAddressListDialog(
for(sal_uInt32 nHeader = 0; nHeader < nCount; ++nHeader)
m_pCSVData->aDBColumnHeaders.push_back( rAddressHeader.GetString(nHeader));
std::vector<OUString> aNewData;
- OUString sTemp;
- aNewData.insert(aNewData.begin(), nCount, sTemp);
+ aNewData.insert(aNewData.begin(), nCount, OUString());
m_pCSVData->aDBData.push_back(aNewData);
}
//now fill the address control
@@ -522,8 +521,7 @@ IMPL_LINK_NOARG(SwCreateAddressListDialog, NewHdl_Impl, Button*, void)
{
sal_uInt32 nCurrent = m_pAddressControl->GetCurrentDataSet();
std::vector<OUString> aNewData;
- OUString sTemp;
- aNewData.insert(aNewData.begin(), m_pCSVData->aDBColumnHeaders.size(), sTemp);
+ aNewData.insert(aNewData.begin(), m_pCSVData->aDBColumnHeaders.size(), OUString());
m_pCSVData->aDBData.insert(m_pCSVData->aDBData.begin() + ++nCurrent, aNewData);
m_pSetNoNF->SetMax(m_pCSVData->aDBData.size());
//the NumericField start at 1
@@ -545,8 +543,7 @@ IMPL_LINK_NOARG(SwCreateAddressListDialog, DeleteHdl_Impl, Button*, void)
else
{
// if only one set is available then clear the data
- OUString sTemp;
- m_pCSVData->aDBData[0].assign(m_pCSVData->aDBData[0].size(), sTemp);
+ m_pCSVData->aDBData[0].assign(m_pCSVData->aDBData[0].size(), OUString());
m_pDeletePB->Enable(false);
}
m_pAddressControl->SetCurrentDataSet(nCurrent);
diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.cxx b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
index aafaffff4b75..dbc8c9fc0280 100644
--- a/sw/source/ui/dbui/customizeaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
@@ -112,10 +112,9 @@ IMPL_LINK(SwCustomizeAddressListDialog, AddRenameHdl_Impl, Button*, pButton, voi
//add the new column
m_pNewData->aDBColumnHeaders.insert(m_pNewData->aDBColumnHeaders.begin() + nPos, sNew);
//add a new entry into all data arrays
- OUString sTemp;
std::vector< std::vector< OUString > >::iterator aDataIter;
for( aDataIter = m_pNewData->aDBData.begin(); aDataIter != m_pNewData->aDBData.end(); ++aDataIter)
- aDataIter->insert(aDataIter->begin() + nPos, sTemp);
+ aDataIter->insert(aDataIter->begin() + nPos, OUString());
}
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 5150e4dd22af..7df4f04e4677 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -421,8 +421,7 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs
using namespace svtools;
css::uno::Reference< XSyncDbusSessionHelper > xSyncDbusSessionHelper(SyncDbusSessionHelper::create(comphelper::getProcessComponentContext()));
const css::uno::Sequence< OUString > vPackages{ "libreoffice-base" };
- OUString sInteraction;
- xSyncDbusSessionHelper->InstallPackageNames(0, vPackages, sInteraction);
+ xSyncDbusSessionHelper->InstallPackageNames(0, vPackages, OUString());
SolarMutexGuard aGuard;
executeRestartDialog(comphelper::getProcessComponentContext(), nullptr, RESTART_REASON_MAILMERGE_INSTALL);
}
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 8b1033b76bf3..3d852d931287 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -1860,11 +1860,10 @@ bool SwTransferable::PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
// it is important to have an icon, let an empty graphic be used
// if no other graphic is provided
// TODO/LATER: in future a default bitmap could be used
- OUString aMimeType;
MapMode aMapMode( MapUnit::Map100thMM );
aGraphic.SetPrefSize( Size( 2500, 2500 ) );
aGraphic.SetPrefMapMode( aMapMode );
- xObjRef.SetGraphic( aGraphic, aMimeType );
+ xObjRef.SetGraphic( aGraphic, OUString() );
}
//set size. This is a hack because of handing over, size should be
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 2f55016e378f..bdf016c7dab6 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -2218,9 +2218,8 @@ long SwView::InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVe
SfxObjectShellRef xDocSh;
SfxObjectShellLock xLockRef;
- OUString sFltNm;
const int nRet = SwFindDocShell( xDocSh, xLockRef, pMedium->GetName(), OUString(),
- sFltNm, nVersion, pDocSh );
+ OUString(), nVersion, pDocSh );
if( nRet )
{
SwWait aWait( *GetDocShell(), true );
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index 8c33ba7f96ec..8e750f9cb53e 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -1255,7 +1255,6 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
_pContent = static_cast<SwGlblDocContent*>(pLast->GetUserData());
bMove = true;
}
- OUString sFilePassword;
sal_uLong nEntryCount = GetEntryCount();
const OUString* pFileNames = _rFiles.getConstArray();
SwWrtShell& rSh = GetParentWindow()->GetCreateView()->GetWrtShell();
@@ -1319,7 +1318,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
aSectionData.SetLinkFileName(sFileName);
aSectionData.SetType(FILE_LINK_SECTION);
- aSectionData.SetLinkFilePassword( sFilePassword );
+ aSectionData.SetLinkFilePassword( OUString() );
rSh.InsertGlobalDocContent( *pAnchorContent, aSectionData );
}