summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorBrij Mohan Lal Srivastava <contactbrijmohan@gmail.com>2014-11-12 14:24:10 +0530
committerStephan Bergmann <sbergman@redhat.com>2014-11-14 09:20:38 +0100
commitd32be3ace8c8fd430bbecdf69f88a116b0ee91d1 (patch)
treeb373c084cb124434e0498867b24bc7bb333155dd /filter
parentf5e86ebc097f0f8bc5b282511149cb026710ecde (diff)
fdo#86023 - O[U]String needs a 'clear' method
Added clear() method to OString and OUString class, Updated appropriate call-sites. Change-Id: I0ba97fa6dc7af3e31b605953089a4e8e9c3e61ac Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/config/cache/cacheupdatelistener.cxx6
-rw-r--r--filter/source/config/cache/typedetection.cxx14
-rw-r--r--filter/source/msfilter/svdfppt.cxx8
-rw-r--r--filter/source/pdf/pdfexport.cxx4
-rw-r--r--filter/source/xsltdialog/typedetectionimport.cxx2
-rw-r--r--filter/source/xsltdialog/xmlfiltersettingsdialog.cxx4
6 files changed, 19 insertions, 19 deletions
diff --git a/filter/source/config/cache/cacheupdatelistener.cxx b/filter/source/config/cache/cacheupdatelistener.cxx
index 9bd5fb8720a7..9e222f58413c 100644
--- a/filter/source/config/cache/cacheupdatelistener.cxx
+++ b/filter/source/config/cache/cacheupdatelistener.cxx
@@ -126,8 +126,8 @@ void SAL_CALL CacheUpdateListener::changesOccurred(const css::util::ChangesEven
if ( ! ::utl::splitLastFromConfigurationPath(sOrgPath, sTempPath, sProperty))
{
sNode = sLocale;
- sProperty = OUString();
- sLocale = OUString();
+ sProperty.clear();
+ sLocale.clear();
}
else
{
@@ -136,7 +136,7 @@ void SAL_CALL CacheUpdateListener::changesOccurred(const css::util::ChangesEven
{
sNode = sProperty;
sProperty = sLocale;
- sLocale = OUString();
+ sLocale.clear();
}
}
diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx
index 4919fbaa1372..a7d306892eda 100644
--- a/filter/source/config/cache/typedetection.cxx
+++ b/filter/source/config/cache/typedetection.cxx
@@ -453,7 +453,7 @@ OUString SAL_CALL TypeDetection::queryTypeByDescriptor(css::uno::Sequence< css::
"filter.config",
"caught Exception \"" << e.Message
<< "\" while querying type of <" << sURL << ">");
- sType = OUString();
+ sType.clear();
}
// adapt media descriptor, so it contains the right values
@@ -546,7 +546,7 @@ void TypeDetection::impl_checkResultsAndAddBestFilter(utl::MediaDescriptor& rDes
// - or to any other filter if no preferred filter was set.
// Note: It's an optimization only!
// It's not guaranteed, that such preferred filter exists.
- sFilter = OUString();
+ sFilter.clear();
try
{
// SAFE ->
@@ -569,7 +569,7 @@ void TypeDetection::impl_checkResultsAndAddBestFilter(utl::MediaDescriptor& rDes
// d)
// Search for any import(!) filter, which is registered for this type.
- sFilter = OUString();
+ sFilter.clear();
try
{
// SAFE ->
@@ -610,7 +610,7 @@ void TypeDetection::impl_checkResultsAndAddBestFilter(utl::MediaDescriptor& rDes
aLock.clear();
// <- SAFE
- sFilter = OUString();
+ sFilter.clear();
}
if (!sFilter.isEmpty())
@@ -656,7 +656,7 @@ bool TypeDetection::impl_getPreselectionForType(
}
catch(const css::container::NoSuchElementException&)
{
- sType = OUString();
+ sType.clear();
bBreakDetection = true;
}
@@ -879,7 +879,7 @@ OUString TypeDetection::impl_detectTypeFlatAndDeep( utl::MediaDescriptor& r
{
// reset it everytimes, so the outside code can distinguish between
// a set and a not set value.
- rLastChance = OUString();
+ rLastChance.clear();
rUsedDetectors.clear();
// step over all possible types for this URL.
@@ -1046,7 +1046,7 @@ OUString TypeDetection::impl_askDetectService(const OUString& sDet
// Thrown exceptions mostly will end in crash recovery ...
// But might be we find another deep detection service which can detect the same
// document without a problem .-)
- sDeepType = OUString();
+ sDeepType.clear();
}
// seek to 0 is an optional feature to be more robust against
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 4cc9956a3c4a..d0b2103485f3 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -5227,7 +5227,7 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, SdrPowerPointImport& rMan, con
if ( nLen )
aCharPropSet.maString = aString.copy( nCharAnzRead, nLen );
else if ( bEmptyParaPossible )
- aCharPropSet.maString = OUString();
+ aCharPropSet.maString.clear();
if ( nLen || bEmptyParaPossible )
aCharPropList.push_back( new PPTCharPropSet( aCharPropSet, nCurrentPara ) );
nCurrentPara++;
@@ -5270,7 +5270,7 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, SdrPowerPointImport& rMan, con
if ( !aCharPropList.empty() && ( aCharPropList.back()->mnParagraph != nCurrentPara ) )
{
PPTCharPropSet* pCharPropSet = new PPTCharPropSet( *aCharPropList.back(), nCurrentPara );
- pCharPropSet->maString = OUString();
+ (pCharPropSet->maString).clear();
pCharPropSet->mnOriginalTextPos = nStringLen - 1;
aCharPropList.push_back( pCharPropSet );
}
@@ -6807,7 +6807,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
if ( aString[nCount] == 0x2a )
{
sal_uInt32 nBehind = aString.getLength() - ( nCount + 1 );
- pSet->maString = OUString();
+ (pSet->maString).clear();
if ( nBehind )
{
PPTCharPropSet* pNewCPS = new PPTCharPropSet( *pSet );
@@ -6906,7 +6906,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
pCurrent->mpFieldItem = new SvxFieldItem( SvxURLField( pField->GetURL(), aRepresentation, SVXURLFORMAT_REPR ), EE_FEATURE_FIELD );
nHyperLenLeft = 0;
}
- pCurrent->maString = OUString();
+ (pCurrent->maString).clear();
pCurrent->SetColor( PPT_COLSCHEME_A_UND_HYPERLINK );
}
nIdx++;
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 635d64e14234..ffa9e42d87d8 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -717,8 +717,8 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
// after this point we don't need the legacy clear passwords anymore
// however they are still inside the passed filter data sequence
// which is sadly out out our control
- aPermissionPassword = OUString();
- aOpenPassword = OUString();
+ aPermissionPassword.clear();
+ aOpenPassword.clear();
/*
* FIXME: the entries are only implicitly defined by the resource file. Should there
diff --git a/filter/source/xsltdialog/typedetectionimport.cxx b/filter/source/xsltdialog/typedetectionimport.cxx
index 781641e0a03a..386ab1b2b59f 100644
--- a/filter/source/xsltdialog/typedetectionimport.cxx
+++ b/filter/source/xsltdialog/typedetectionimport.cxx
@@ -279,7 +279,7 @@ void SAL_CALL TypeDetectionImporter::startElement( const OUString& aName, const
if( aName == sValue )
{
eNewState = e_Value;
- maValue = OUString();
+ maValue.clear();
}
}
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index 2153d115a7a4..fc0da394f46f 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -431,7 +431,7 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi
{
if( pOldInfo->maType == pOldInfo->maFilterName )
{
- pNewInfo->maType = OUString();
+ (pNewInfo->maType).clear();
}
}
@@ -1163,7 +1163,7 @@ void XMLFilterSettingsDialog::initFilterList()
Sequence< OUString > aExtensions;
if( pValues2->Value >>= aExtensions )
{
- pTempFilter->maExtension = OUString();
+ (pTempFilter->maExtension).clear();
sal_Int32 nCount3( aExtensions.getLength() );
OUString* pExtensions = aExtensions.getArray();