[Libreoffice-commits] core.git: 2 commits - cui/uiconfig include/svx sc/uiconfig sfx2/source svx/source sw/uiconfig
Caolán McNamara
caolanm at redhat.com
Thu Apr 3 04:19:15 PDT 2014
cui/uiconfig/ui/connpooloptions.ui | 1
cui/uiconfig/ui/menuassignpage.ui | 1
cui/uiconfig/ui/password.ui | 2
cui/uiconfig/ui/wordcompletionpage.ui | 3 -
include/svx/dialogs.hrc | 1
sc/uiconfig/scalc/ui/movecopysheet.ui | 7 +--
sc/uiconfig/scalc/ui/xmlsourcedialog.ui | 1
sfx2/source/dialog/basedlgs.cxx | 45 +++++++++++++++++---
svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 4 -
sw/uiconfig/swriter/ui/labelformatpage.ui | 2
10 files changed, 45 insertions(+), 22 deletions(-)
New commits:
commit 333282478a956709e648427b412d90f90fc1437b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Apr 3 12:04:56 2014 +0100
Related: fdo#75307 use the unique auto help id to identify tabpages
and dialogs that are loaded from the .ui format
Change-Id: I37aea52a3973d8d8f6a2ce8dabf80bb1e64db43f
diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc
index 7687f94..c5c57c7 100644
--- a/include/svx/dialogs.hrc
+++ b/include/svx/dialogs.hrc
@@ -81,7 +81,6 @@
#define RID_SVXPAGE_PICK_BULLET (RID_SVX_START + 216)
#define RID_SVXPAGE_PICK_NUM (RID_SVX_START + 217)
#define RID_SVXPAGE_PICK_BMP (RID_SVX_START + 218)
-#define RID_SVXPAGE_POSITION_SIZE (RID_SVX_START + 87)
#define RID_SVXPAGE_EVENTASSIGN (RID_SVX_START + 303)
#define RID_SVXPAGE_HATCH (RID_SVX_START + 57)
#define RID_SVXPAGE_BITMAP (RID_SVX_START + 58)
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 15cde96..51e70ce 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -98,7 +98,16 @@ void SfxFloatingWindow_Impl::Notify( SfxBroadcaster&, const SfxHint& rHint )
void SfxModalDialog::SetDialogData_Impl()
{
// save settings (position and user data)
- SvtViewOptions aDlgOpt( E_DIALOG, OUString::number( nUniqId ) );
+ OUString sConfigId;
+ if (isLayoutEnabled())
+ sConfigId = OStringToOUString(GetHelpId(),RTL_TEXTENCODING_UTF8);
+ else
+ {
+ SAL_WARN("sfx.config", "Dialog needs to be converted to .ui format");
+ sConfigId = OUString::number(nUniqId);
+ }
+
+ SvtViewOptions aDlgOpt(E_DIALOG, sConfigId);
aDlgOpt.SetWindowState(OStringToOUString(
GetWindowState(WINDOWSTATE_MASK_POS), RTL_TEXTENCODING_ASCII_US));
if ( !aExtraData.isEmpty() )
@@ -116,7 +125,16 @@ void SfxModalDialog::GetDialogData_Impl()
*/
{
- SvtViewOptions aDlgOpt( E_DIALOG, OUString::number( nUniqId ) );
+ OUString sConfigId;
+ if (isLayoutEnabled())
+ sConfigId = OStringToOUString(GetHelpId(),RTL_TEXTENCODING_UTF8);
+ else
+ {
+ SAL_WARN("sfx.config", "Dialog needs to be converted to .ui format");
+ sConfigId = OUString::number(nUniqId);
+ }
+
+ SvtViewOptions aDlgOpt(E_DIALOG, sConfigId);
if ( aDlgOpt.Exists() )
{
// load settings
@@ -155,7 +173,7 @@ SfxModalDialog::SfxModalDialog(Window* pParent, const ResId &rResId )
SfxModalDialog::SfxModalDialog(Window *pParent, const OString& rID, const OUString& rUIXMLDescription )
: ModalDialog(pParent, rID, rUIXMLDescription),
- nUniqId(0), //todo
+ nUniqId(0), //todo: remove this member when the ResId using ctor is removed
pInputSet(0),
pOutputSet(0)
{
@@ -669,7 +687,16 @@ IMPL_LINK_NOARG(SfxSingleTabDialog, OKHdl_Impl)
// Save user data in IniManager.
pImpl->m_pSfxPage->FillUserData();
OUString sData( pImpl->m_pSfxPage->GetUserData() );
- SvtViewOptions aPageOpt( E_TABPAGE, OUString::number( GetUniqId() ) );
+
+ OUString sConfigId = OStringToOUString(pImpl->m_pSfxPage->GetConfigId(),
+ RTL_TEXTENCODING_UTF8);
+ if (sConfigId.isEmpty())
+ {
+ SAL_WARN("sfx.config", "Tabpage needs to be converted to .ui format");
+ sConfigId = OUString::number(GetUniqId());
+ }
+
+ SvtViewOptions aPageOpt(E_TABPAGE, sConfigId);
aPageOpt.SetUserItem( USERITEM_NAME, makeAny( OUString( sData ) ) );
EndDialog( RET_OK );
}
@@ -731,7 +758,15 @@ void SfxSingleTabDialog::SetTabPage(SfxTabPage* pTabPage,
if ( pImpl->m_pSfxPage )
{
// First obtain the user data, only then Reset()
- SvtViewOptions aPageOpt( E_TABPAGE, OUString::number( GetUniqId() ) );
+ OUString sConfigId = OStringToOUString(pImpl->m_pSfxPage->GetConfigId(),
+ RTL_TEXTENCODING_UTF8);
+ if (sConfigId.isEmpty())
+ {
+ SAL_WARN("sfx.config", "Tabpage needs to be converted to .ui format");
+ sConfigId = OUString::number(GetUniqId());
+ }
+
+ SvtViewOptions aPageOpt(E_TABPAGE, sConfigId);
Any aUserItem = aPageOpt.GetUserItem( USERITEM_NAME );
OUString sUserData;
aUserItem >>= sUserData;
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 0b9543d..32df2b1 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -479,7 +479,7 @@ IMPL_LINK( PosSizePropertyPanel, ClickAutoHdl, void *, EMPTYARG )
}
// mpCbxScale must synchronized with that on Position and Size tabpage on Shape Properties dialog
- SvtViewOptions aPageOpt( E_TABPAGE, OUString::number( RID_SVXPAGE_POSITION_SIZE ) );
+ SvtViewOptions aPageOpt(E_TABPAGE, "cui/ui/possizetabpage/PositionAndSize");
aPageOpt.SetUserItem( USERITEM_NAME, ::com::sun::star::uno::makeAny( ::rtl::OUString::number( int(mpCbxScale->IsChecked()) ) ) );
return 0;
@@ -881,7 +881,7 @@ void PosSizePropertyPanel::NotifyItemUpdate(
DisableControls();
// mpCbxScale must synchronized with that on Position and Size tabpage on Shape Properties dialog
- SvtViewOptions aPageOpt( E_TABPAGE, OUString::number( RID_SVXPAGE_POSITION_SIZE ) );
+ SvtViewOptions aPageOpt(E_TABPAGE, "cui/ui/possizetabpage/PositionAndSize");
OUString sUserData;
::com::sun::star::uno::Any aUserItem = aPageOpt.GetUserItem( USERITEM_NAME );
::rtl::OUString aTemp;
commit 15471dd79200eb828b4a4ed98d32a82f51a6f44f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Apr 3 11:26:15 2014 +0100
wrong ellipsize
the widget in glade for changing ellipsize gets focus and when you mouse wheel
up and down often it gets accidentally changed, sigh.
Change-Id: I6dc0dc6d9985ea0ff9a34817291e642a9706bf0f
diff --git a/cui/uiconfig/ui/connpooloptions.ui b/cui/uiconfig/ui/connpooloptions.ui
index 8571a5b..97be7d8 100644
--- a/cui/uiconfig/ui/connpooloptions.ui
+++ b/cui/uiconfig/ui/connpooloptions.ui
@@ -68,7 +68,6 @@
<property name="label" translatable="yes">Drivers known in %PRODUCTNAME</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">driverlist</property>
- <property name="ellipsize">start</property>
</object>
<packing>
<property name="left_attach">0</property>
diff --git a/cui/uiconfig/ui/menuassignpage.ui b/cui/uiconfig/ui/menuassignpage.ui
index 2e6e9b4..d7efe56 100644
--- a/cui/uiconfig/ui/menuassignpage.ui
+++ b/cui/uiconfig/ui/menuassignpage.ui
@@ -93,7 +93,6 @@
<property name="label" translatable="yes">Menu</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">toplevellist</property>
- <property name="ellipsize">middle</property>
</object>
<packing>
<property name="left_attach">0</property>
diff --git a/cui/uiconfig/ui/password.ui b/cui/uiconfig/ui/password.ui
index e59220c..0111535 100644
--- a/cui/uiconfig/ui/password.ui
+++ b/cui/uiconfig/ui/password.ui
@@ -204,7 +204,6 @@
<property name="label" translatable="yes">Enter password to allow editing</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">newpassroEntry</property>
- <property name="ellipsize">middle</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -279,7 +278,6 @@
<property name="can_focus">False</property>
<property name="label" translatable="yes">_Options</property>
<property name="use_underline">True</property>
- <property name="ellipsize">middle</property>
</object>
</child>
</object>
diff --git a/cui/uiconfig/ui/wordcompletionpage.ui b/cui/uiconfig/ui/wordcompletionpage.ui
index 6d867df..85f6b35 100644
--- a/cui/uiconfig/ui/wordcompletionpage.ui
+++ b/cui/uiconfig/ui/wordcompletionpage.ui
@@ -93,7 +93,6 @@
<property name="label" translatable="yes">_Max. entries</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">maxentries</property>
- <property name="ellipsize">middle</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -139,7 +138,6 @@
<property name="label" translatable="yes">Mi_n. word length</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">maxentries</property>
- <property name="ellipsize">middle</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -337,7 +335,6 @@
<property name="label" translatable="yes">Acc_ept with</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">acceptwith</property>
- <property name="ellipsize">middle</property>
</object>
<packing>
<property name="left_attach">0</property>
diff --git a/sc/uiconfig/scalc/ui/movecopysheet.ui b/sc/uiconfig/scalc/ui/movecopysheet.ui
index 47b0bad..3bb3eb2 100644
--- a/sc/uiconfig/scalc/ui/movecopysheet.ui
+++ b/sc/uiconfig/scalc/ui/movecopysheet.ui
@@ -129,7 +129,7 @@
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="yalign">0.55000001192092896</property>
+ <property name="yalign">0.5</property>
<property name="xpad">1</property>
<property name="label" translatable="yes">Action</property>
<property name="justify">center</property>
@@ -228,7 +228,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="yalign">0.49000000953674316</property>
+ <property name="yalign">0.5</property>
<property name="label" translatable="yes">_Insert before</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">insertBefore:before</property>
@@ -403,11 +403,10 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_top">5</property>
- <property name="yalign">0.50999999046325684</property>
+ <property name="yalign">0.5</property>
<property name="xpad">2</property>
<property name="label" translatable="yes">New _name</property>
<property name="use_underline">True</property>
- <property name="ellipsize">start</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
diff --git a/sc/uiconfig/scalc/ui/xmlsourcedialog.ui b/sc/uiconfig/scalc/ui/xmlsourcedialog.ui
index d97d0d3..7fc8938 100644
--- a/sc/uiconfig/scalc/ui/xmlsourcedialog.ui
+++ b/sc/uiconfig/scalc/ui/xmlsourcedialog.ui
@@ -54,7 +54,6 @@
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">- not set -</property>
- <property name="ellipsize">middle</property>
</object>
<packing>
<property name="left_attach">1</property>
diff --git a/sw/uiconfig/swriter/ui/labelformatpage.ui b/sw/uiconfig/swriter/ui/labelformatpage.ui
index 79c29ee..21a4da6 100644
--- a/sw/uiconfig/swriter/ui/labelformatpage.ui
+++ b/sw/uiconfig/swriter/ui/labelformatpage.ui
@@ -380,7 +380,6 @@
<property name="xalign">0</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">top:0.00cm</property>
- <property name="ellipsize">middle</property>
<property name="max_width_chars">32</property>
</object>
<packing>
@@ -397,7 +396,6 @@
<property name="xalign">0</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">top:0.00cm</property>
- <property name="ellipsize">middle</property>
<property name="max_width_chars">32</property>
</object>
<packing>
More information about the Libreoffice-commits
mailing list