summaryrefslogtreecommitdiff
path: root/vcl/generic
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 /vcl/generic
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 'vcl/generic')
-rw-r--r--vcl/generic/fontmanager/fontconfig.cxx2
-rw-r--r--vcl/generic/fontmanager/helper.cxx2
-rw-r--r--vcl/generic/print/genprnpsp.cxx7
-rw-r--r--vcl/generic/print/printerjob.cxx2
-rw-r--r--vcl/generic/print/text_gfx.cxx2
5 files changed, 9 insertions, 6 deletions
diff --git a/vcl/generic/fontmanager/fontconfig.cxx b/vcl/generic/fontmanager/fontconfig.cxx
index 1a9dd396fe4c..128193c26889 100644
--- a/vcl/generic/fontmanager/fontconfig.cxx
+++ b/vcl/generic/fontmanager/fontconfig.cxx
@@ -979,7 +979,7 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, OUString& rMissi
//if the codepoint is impossible for this lang tag, then clear it
//and autodetect something useful
if (!aLangAttrib.isEmpty() && isImpossibleCodePointForLang(aLangTag, nCode))
- aLangAttrib = OString();
+ aLangAttrib.clear();
//#i105784#/rhbz#527719 improve selection of fallback font
if (aLangAttrib.isEmpty())
{
diff --git a/vcl/generic/fontmanager/helper.cxx b/vcl/generic/fontmanager/helper.cxx
index 3a313190ea80..aadfa0f29beb 100644
--- a/vcl/generic/fontmanager/helper.cxx
+++ b/vcl/generic/fontmanager/helper.cxx
@@ -206,7 +206,7 @@ OUString psp::getFontPath()
struct stat aStat;
if( 0 != stat( OUStringToOString( aPathBuffer.makeStringAndClear(), osl_getThreadTextEncoding() ).getStr(), &aStat )
|| ! S_ISDIR( aStat.st_mode ) )
- aConfigPath = OUString();
+ aConfigPath.clear();
else
{
aPathBuffer.append(aConfigPath);
diff --git a/vcl/generic/print/genprnpsp.cxx b/vcl/generic/print/genprnpsp.cxx
index d215a1de9750..910997ea00af 100644
--- a/vcl/generic/print/genprnpsp.cxx
+++ b/vcl/generic/print/genprnpsp.cxx
@@ -873,8 +873,11 @@ bool PspSalPrinter::StartJob(
OSL_TRACE("PspSalPrinter::StartJob");
GetSalData()->m_pInstance->jobStartedPrinterUpdate();
m_bPdf = false;
- m_aFileName = pFileName ? *pFileName : OUString();
- m_aTmpFile = OUString();
+ if (pFileName)
+ m_aFileName = *pFileName;
+ else
+ m_aFileName.clear();
+ m_aTmpFile.clear();
m_nCopies = nCopies;
m_bCollate = bCollate;
diff --git a/vcl/generic/print/printerjob.cxx b/vcl/generic/print/printerjob.cxx
index 9635aa3c78d6..80d52b1ad1ed 100644
--- a/vcl/generic/print/printerjob.cxx
+++ b/vcl/generic/print/printerjob.cxx
@@ -385,7 +385,7 @@ PrinterJob::StartJob (
aTitle = rFileName.getToken( 0, '/', nIndex );
aTitle = WhitespaceToSpace( aTitle, false );
if( ! isAscii( aTitle ) )
- aTitle = OUString();
+ aTitle.clear();
}
maJobTitle = aFilterWS;
diff --git a/vcl/generic/print/text_gfx.cxx b/vcl/generic/print/text_gfx.cxx
index a228aa9bd50b..a262b826d8e2 100644
--- a/vcl/generic/print/text_gfx.cxx
+++ b/vcl/generic/print/text_gfx.cxx
@@ -114,7 +114,7 @@ PrinterGfx::SetFont(
// font and encoding will be set by drawText again immediately
// before PSShowText
mnFontID = nFontID;
- maVirtualStatus.maFont = OString();
+ maVirtualStatus.maFont.clear();
maVirtualStatus.maEncoding = RTL_TEXTENCODING_DONTKNOW;
maVirtualStatus.mnTextHeight = nHeight;
maVirtualStatus.mnTextWidth = nWidth;