[Libreoffice-commits] core.git: sfx2/source sfx2/uiconfig
Arul
arul71.m at gmail.com
Tue Jan 5 05:45:14 PST 2016
sfx2/source/dialog/dinfdlg.cxx | 8 ++++----
sfx2/uiconfig/ui/documentpropertiesdialog.ui | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 804e2403cd077a069372ead548fa6a5c593db1f6
Author: Arul <arul71.m at gmail.com>
Date: Tue Jan 5 15:41:26 2016 +0530
tdf#91065 Support localization of Properties dialog title
Having a place holder for substituting the file name instead of concatenating it in
Properties dialogue title.
Change-Id: I8b3bafbc95c857fa5957bfdafbded5dde94e0e64
Reviewed-on: https://gerrit.libreoffice.org/21107
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 0cb152f..75e03a5 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1208,18 +1208,18 @@ SfxDocumentInfoDialog::SfxDocumentInfoDialog( vcl::Window* pParent,
{
OUString aLastName( aURL.GetLastName() );
if ( !aLastName.isEmpty() )
- aTitle += aLastName;
+ aTitle = aTitle.replaceFirst("%1", aLastName);
else
- aTitle += aFile;
+ aTitle = aTitle.replaceFirst("%1", aFile);
}
else
- aTitle += SfxResId( STR_NONAME ).toString();
+ aTitle = aTitle.replaceFirst("%1", SfxResId( STR_NONAME ).toString());
}
else
{
DBG_ASSERT( dynamic_cast<const SfxStringItem *>(pItem) != nullptr,
"SfxDocumentInfoDialog:<SfxStringItem> expected" );
- aTitle += static_cast<const SfxStringItem*>(pItem)->GetValue();
+ aTitle = aTitle.replaceFirst("%1", static_cast<const SfxStringItem*>(pItem)->GetValue());
}
SetText( aTitle );
diff --git a/sfx2/uiconfig/ui/documentpropertiesdialog.ui b/sfx2/uiconfig/ui/documentpropertiesdialog.ui
index 88cf755..54890cc 100644
--- a/sfx2/uiconfig/ui/documentpropertiesdialog.ui
+++ b/sfx2/uiconfig/ui/documentpropertiesdialog.ui
@@ -5,7 +5,7 @@
<object class="GtkDialog" id="DocumentPropertiesDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
- <property name="title" translatable="yes">Properties of </property>
+ <property name="title" translatable="yes">Properties of %1</property>
<property name="resizable">False</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
More information about the Libreoffice-commits
mailing list