cui/source/dialogs/scriptdlg.cxx | 1 - filter/source/xsltdialog/xmlfiltertestdialog.cxx | 1 - include/sfx2/passwd.hxx | 2 +- include/vcl/dialog.hxx | 3 +++ padmin/source/prtsetup.cxx | 2 -- vcl/source/window/builder.cxx | 5 +++-- vcl/source/window/dialog.cxx | 12 ++++++++++++ 7 files changed, 19 insertions(+), 7 deletions(-)
New commits: commit a8af548c3be5a42cec7177c60c6d421d2dbc35b4 Author: Caolán McNamara <caol...@redhat.com> Date: Fri Jun 28 10:39:39 2013 +0100 always call setDeferredProperties for dialog get/set title so we always get the correct up to date title even if we have been holding off on setting some properties to ensure that virtual method aren't called during construction e.g. insert/edit index marks is always "Insert Index Mark" (cherry picked from commit 31fc0b74425253589b2ac0dcecb9e8a2714954b4) Change-Id: I57f9cc8fbdb9d2a304c346e03893fa55d6a61bd5 Reviewed-on: https://gerrit.libreoffice.org/5762 Reviewed-by: Fridrich Strba <fridr...@documentfoundation.org> Tested-by: Fridrich Strba <fridr...@documentfoundation.org> diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index e353412..672ff5e 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 86894a7..099aec7 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 1f10c74..b0efa7b 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 a8737d1..4e20d63 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 f3f42a1..5ee4958 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 fb29a2e..cd6e966 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -1339,9 +1339,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 b0bc71b..2a341c5 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -1270,6 +1270,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) {
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits