summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-10-08 16:51:46 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-10-08 20:47:59 +0100
commit45758da19a376233fd7bc4fdf26bd3d012c5c135 (patch)
tree96800830a21a64b463781bb90010e3258f2cc146 /sfx2/source/dialog
parenteadd75ef212b4dd1b43aeacb34c8dd3ab40df369 (diff)
de-src last two RadioButtons
Change-Id: I8e6f7ec86a17b2ee87a62a5fbe235047413ec403
Diffstat (limited to 'sfx2/source/dialog')
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx40
-rw-r--r--sfx2/source/dialog/dinfdlg.hrc5
-rw-r--r--sfx2/source/dialog/dinfdlg.src14
3 files changed, 22 insertions, 37 deletions
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 3d28a70c59ce..62176bf44a16 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -17,17 +17,18 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <svl/eitem.hxx>
+#include <svl/urihelper.hxx>
+#include <tools/datetime.hxx>
#include <tools/urlobj.hxx>
#include <vcl/layout.hxx>
-#include <svl/eitem.hxx>
+#include <vcl/mnemonic.hxx>
#include <vcl/svapp.hxx>
#include <unotools/localedatawrapper.hxx>
#include <unotools/cmdoptions.hxx>
#include <comphelper/processfactory.hxx>
-#include <svl/urihelper.hxx>
#include <unotools/useroptions.hxx>
#include <svtools/imagemgr.hxx>
-#include <tools/datetime.hxx>
#include <memory>
@@ -1230,12 +1231,16 @@ void SfxDocumentInfoDialog::AddFontTabPage()
// class CustomPropertiesYesNoButton -------------------------------------
-CustomPropertiesYesNoButton::CustomPropertiesYesNoButton( vcl::Window* pParent, const ResId& rResId ) :
- Control( pParent, rResId ),
- m_aYesButton( VclPtr<RadioButton>::Create(this, ResId( RB_PROPERTY_YES, *rResId.GetResMgr() )) ),
- m_aNoButton ( VclPtr<RadioButton>::Create(this, ResId( RB_PROPERTY_NO, *rResId.GetResMgr() )) )
+CustomPropertiesYesNoButton::CustomPropertiesYesNoButton(vcl::Window* pParent, const ResId& rResId)
+ : Control(pParent, rResId)
+ , m_aYesButton(VclPtr<RadioButton>::Create(this, WB_TABSTOP))
+ , m_aNoButton(VclPtr<RadioButton>::Create(this, WB_TABSTOP))
{
FreeResource();
+ m_aYesButton->SetText(MnemonicGenerator::EraseAllMnemonicChars(Button::GetStandardText(StandardButtonType::Yes)));
+ m_aYesButton->Show();
+ m_aNoButton->SetText(MnemonicGenerator::EraseAllMnemonicChars(Button::GetStandardText(StandardButtonType::No)));
+ m_aNoButton->Show();
SetBackground( Wallpaper( GetSettings().GetStyleSettings().GetFieldColor() ) );
SetBorderStyle( WindowBorderStyle::MONO );
CheckNo();
@@ -1244,7 +1249,6 @@ CustomPropertiesYesNoButton::CustomPropertiesYesNoButton( vcl::Window* pParent,
m_aNoButton->SetBackground( aWall );
}
-
CustomPropertiesYesNoButton::~CustomPropertiesYesNoButton()
{
disposeOnce();
@@ -1386,16 +1390,16 @@ IMPL_LINK_NOARG(CustomPropertiesEditButton, ClickHdl, Button*, void)
void CustomPropertiesYesNoButton::Resize()
{
- const long nWidth = GetSizePixel().Width();
- const long n3Width = LogicToPixel( Size( 3, 3 ), MapUnit::MapAppFont ).Width();
- const long nNewWidth = ( nWidth / 2 ) - n3Width - 2;
- Size aSize = m_aYesButton->GetSizePixel();
- const long nDelta = aSize.Width() - nNewWidth;
- aSize.Width() = nNewWidth;
- m_aYesButton->SetSizePixel( aSize );
- Point aPos = m_aNoButton->GetPosPixel();
- aPos.X() -= nDelta;
- m_aNoButton->SetPosSizePixel( aPos, aSize );
+ Size aParentSize(GetSizePixel());
+ const long nWidth = aParentSize.Width();
+ Size a1Size = LogicToPixel(Size(1, 1), MapUnit::MapAppFont);
+ const long n3Width = LogicToPixel(Size(3, 3), MapUnit::MapAppFont).Width();
+ const long nNewWidth = (nWidth / 2) - n3Width - 2;
+ Size aSize(nNewWidth, aParentSize.Height() - 2 * a1Size.Height());
+ Point aPos(a1Size.Width(), a1Size.Height());
+ m_aYesButton->SetPosSizePixel(aPos, aSize);
+ aPos.X() += aSize.Width() + n3Width;
+ m_aNoButton->SetPosSizePixel(aPos, aSize);
}
// struct CustomPropertyLine ---------------------------------------------
diff --git a/sfx2/source/dialog/dinfdlg.hrc b/sfx2/source/dialog/dinfdlg.hrc
index 615aa4d8d80c..5d0e85528822 100644
--- a/sfx2/source/dialog/dinfdlg.hrc
+++ b/sfx2/source/dialog/dinfdlg.hrc
@@ -37,11 +37,6 @@
#define CMIS_TYPE_DATETIME "Datetime"
#define CMIS_TYPE_BOOL "Bool"
-// defines ---------------------------------------------------------------
-
-#define RB_PROPERTY_YES 100
-#define RB_PROPERTY_NO 101
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/dinfdlg.src b/sfx2/source/dialog/dinfdlg.src
index f98158901589..2a92900e90f3 100644
--- a/sfx2/source/dialog/dinfdlg.src
+++ b/sfx2/source/dialog/dinfdlg.src
@@ -108,20 +108,6 @@ Control SFX_WIN_PROPERTY_YESNO
Size = MAP_APPFONT ( 61 , RSC_CD_TEXTBOX_HEIGHT ) ;
Border = TRUE ;
DialogControl = TRUE ;
- RadioButton RB_PROPERTY_YES
- {
- TabStop = TRUE ;
- Pos = MAP_APPFONT( 1 , 1 ) ;
- Size = MAP_APPFONT( 28 , RSC_CD_RADIOBUTTON_HEIGHT ) ;
- Text [ en-US ] = "Yes" ;
- };
- RadioButton RB_PROPERTY_NO
- {
- TabStop = TRUE ;
- Pos = MAP_APPFONT( 32 , 1 ) ;
- Size = MAP_APPFONT( 29 , RSC_CD_RADIOBUTTON_HEIGHT ) ;
- Text [ en-US ] = "No" ;
- };
};
String STR_SFX_REMOVE_PROPERTY