[Libreoffice-commits] core.git: padmin/source

Caolán McNamara caolanm at redhat.com
Thu May 16 09:34:15 PDT 2013


 padmin/source/prtsetup.cxx |   22 +++++++++-------------
 1 file changed, 9 insertions(+), 13 deletions(-)

New commits:
commit 2df3ff140e5f803c3bb22fd621045e416c84c587
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu May 16 17:33:37 2013 +0100

    replace %s in printer settings dialog with printername
    
    Change-Id: I9594d929316b917b47b40324e3e6666043ddc1fe

diff --git a/padmin/source/prtsetup.cxx b/padmin/source/prtsetup.cxx
index 4df90de..f3f42a1 100644
--- a/padmin/source/prtsetup.cxx
+++ b/padmin/source/prtsetup.cxx
@@ -91,9 +91,10 @@ RTSDialog::RTSDialog( const PrinterInfo& rJobData, const String& rPrinter, bool
     get(m_pCancelButton, "cancel");
     get(m_pTabControl, "notebook");
 
-    String aTitle( GetText() );
-    aTitle.SearchAndReplace( String( "%s" ), m_aJobData.m_aPrinterName );
-    SetText( aTitle );
+    setDeferredProperties();
+
+    OUString aTitle(GetText());
+    SetText(aTitle.replaceAll("%s", m_aJobData.m_aPrinterName));
 
     if( ! bAllPages )
     {
@@ -117,16 +118,11 @@ RTSDialog::RTSDialog( const PrinterInfo& rJobData, const String& rPrinter, bool
 
 RTSDialog::~RTSDialog()
 {
-    if( m_pPaperPage )
-        delete m_pPaperPage;
-    if( m_pDevicePage )
-        delete m_pDevicePage;
-    if( m_pOtherPage )
-        delete m_pOtherPage;
-    if( m_pFontSubstPage )
-        delete m_pFontSubstPage;
-    if( m_pCommandPage )
-        delete m_pCommandPage;
+    delete m_pPaperPage;
+    delete m_pDevicePage;
+    delete m_pOtherPage;
+    delete m_pFontSubstPage;
+    delete m_pCommandPage;
 }
 
 // --------------------------------------------------------------------------


More information about the Libreoffice-commits mailing list