summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-06-28 10:39:39 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-06-28 11:50:15 +0100
commit31fc0b74425253589b2ac0dcecb9e8a2714954b4 (patch)
treecb19b41844fd1675d95ea0f29e9f7ec02cd3a629
parent1a05f14ba263bf47c5c5c8aee080ef28d5db2075 (diff)
always call setDeferredProperties for dialog get/set title
Change-Id: I57f9cc8fbdb9d2a304c346e03893fa55d6a61bd5
-rw-r--r--cui/source/dialogs/scriptdlg.cxx1
-rw-r--r--filter/source/xsltdialog/xmlfiltertestdialog.cxx1
-rw-r--r--include/sfx2/passwd.hxx2
-rw-r--r--include/vcl/dialog.hxx3
-rw-r--r--padmin/source/prtsetup.cxx2
-rw-r--r--vcl/source/window/builder.cxx5
-rw-r--r--vcl/source/window/dialog.cxx12
7 files changed, 19 insertions, 7 deletions
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index e353412a2340..672ff5e3e297 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -508,7 +508,6 @@ SvxScriptOrgDialog::SvxScriptOrgDialog( Window* pParent, OUString language )
get(m_pDelButton, "delete");
// must be a neater way to deal with the strings than as above
// append the language to the dialog title
- setDeferredProperties();
String winTitle( GetText() );
winTitle.SearchAndReplace( OUString( "%MACROLANG" ), m_sLanguage );
SetText( winTitle );
diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
index 2de74ef70660..0490c3fded1b 100644
--- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
@@ -162,7 +162,6 @@ XMLFilterTestDialog::XMLFilterTestDialog(Window* pParent,
m_pPBRecentFile->SetClickHdl(LINK( this, XMLFilterTestDialog, ClickHdl_Impl ) );
m_pPBClose->SetClickHdl(LINK( this, XMLFilterTestDialog, ClickHdl_Impl ) );
- setDeferredProperties();
m_sDialogTitle = GetText();
try
diff --git a/include/sfx2/passwd.hxx b/include/sfx2/passwd.hxx
index 1f10c7416b98..b0efa7bc147c 100644
--- a/include/sfx2/passwd.hxx
+++ b/include/sfx2/passwd.hxx
@@ -73,7 +73,7 @@ private:
void SetPasswdText();
public:
- SfxPasswordDialog(Window* pParent, const String* pGroupText = NULL);
+ SfxPasswordDialog(Window* pParent, const OUString* pGroupText = NULL);
String GetUser() const
{
diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index a8737d15395f..4e20d633e54d 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -114,6 +114,9 @@ public:
virtual short Execute();
sal_Bool IsInExecute() const { return mbInExecute; }
+ virtual void SetText( const OUString& rStr );
+ virtual OUString GetText() const;
+
////////////////////////////////////////
// Dialog::Execute replacement API
public:
diff --git a/padmin/source/prtsetup.cxx b/padmin/source/prtsetup.cxx
index f3f42a1fe1d8..5ee49581c1da 100644
--- a/padmin/source/prtsetup.cxx
+++ b/padmin/source/prtsetup.cxx
@@ -91,8 +91,6 @@ RTSDialog::RTSDialog( const PrinterInfo& rJobData, const String& rPrinter, bool
get(m_pCancelButton, "cancel");
get(m_pTabControl, "notebook");
- setDeferredProperties();
-
OUString aTitle(GetText());
SetText(aTitle.replaceAll("%s", m_aJobData.m_aPrinterName));
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 4cc571f21174..4cea57f7afe0 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -1376,9 +1376,10 @@ void VclBuilder::setDeferredProperties()
{
if (!m_bToplevelHasDeferredProperties)
return;
- set_properties(m_pParent, m_aDeferredProperties);
- m_aDeferredProperties.clear();
+ stringmap aDeferredProperties;
+ aDeferredProperties.swap(m_aDeferredProperties);
m_bToplevelHasDeferredProperties = false;
+ set_properties(m_pParent, aDeferredProperties);
}
void VclBuilder::set_properties(Window *pWindow, const stringmap &rProps)
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 8466ab2c5057..aca80f1b3f50 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1265,6 +1265,18 @@ bool Dialog::set_property(const OString &rKey, const OString &rValue)
return true;
}
+void Dialog::SetText(const OUString& rStr)
+{
+ setDeferredProperties();
+ SystemWindow::SetText(rStr);
+}
+
+OUString Dialog::GetText() const
+{
+ const_cast<Dialog*>(this)->setDeferredProperties();
+ return SystemWindow::GetText();
+}
+
VclBuilderContainer::VclBuilderContainer()
: m_pUIBuilder(NULL)
{