[Libreoffice-commits] .: cui/AllLangResTarget_cui.mk cui/source cui/uiconfig cui/UI_cui.mk
cui/AllLangResTarget_cui.mk|1 cui/UI_cui.mk |1 cui/source/dialogs/newtabledlg.cxx | 20 +--- cui/source/dialogs/newtabledlg.hrc | 26 - cui/source/dialogs/newtabledlg.src | 95 --- cui/source/inc/cuires.hrc |3 cui/source/inc/newtabledlg.hxx | 11 -- cui/uiconfig/ui/newtabledialog.ui | 176 + 8 files changed, 184 insertions(+), 149 deletions(-) New commits: commit f99e540897103b6af3bb6b6c5a36e0a77f35b706 Author: Robert Roth robert.roth@gmail.com Date: Sat Jan 26 03:12:50 2013 +0200 New table dialog from impress and draw converted to Glade UI Change-Id: Iedd44ae171a25d9d6599e4f44698d7458c486be6 diff --git a/cui/AllLangResTarget_cui.mk b/cui/AllLangResTarget_cui.mk index fb9c10a..8e29802 100644 --- a/cui/AllLangResTarget_cui.mk +++ b/cui/AllLangResTarget_cui.mk @@ -66,7 +66,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\ cui/source/dialogs/hyperdlg.src \ cui/source/dialogs/iconcdlg.src \ cui/source/dialogs/multipat.src \ -cui/source/dialogs/newtabledlg.src \ cui/source/dialogs/passwdomdlg.src \ cui/source/dialogs/postdlg.src \ cui/source/dialogs/scriptdlg.src \ diff --git a/cui/UI_cui.mk b/cui/UI_cui.mk index 9a6e896..fe4bec7 100644 --- a/cui/UI_cui.mk +++ b/cui/UI_cui.mk @@ -22,6 +22,7 @@ $(eval $(call gb_UI_add_uifiles,cui,\ cui/uiconfig/ui/macroselectordialog \ cui/uiconfig/ui/messbox \ cui/uiconfig/ui/namedialog \ + cui/uiconfig/ui/newtabledialog \ cui/uiconfig/ui/numberingformatpage \ cui/uiconfig/ui/numberingoptionspage \ cui/uiconfig/ui/numberingpositionpage \ diff --git a/cui/source/dialogs/newtabledlg.cxx b/cui/source/dialogs/newtabledlg.cxx index 63272c6..d9a1844 100644 --- a/cui/source/dialogs/newtabledlg.cxx +++ b/cui/source/dialogs/newtabledlg.cxx @@ -20,22 +20,12 @@ #include cuires.hrc #include dialmgr.hxx #include newtabledlg.hxx -#include newtabledlg.hrc SvxNewTableDialog::SvxNewTableDialog( Window* pParent ) -: ModalDialog( pParent, CUI_RES( RID_SVX_NEWTABLE_DLG ) ) -, maFtColumns( this, CUI_RES( FT_COLUMNS ) ) -, maNumColumns( this, CUI_RES( NF_COLUMNS ) ) -, maFtRows( this, CUI_RES( FT_ROWS ) ) -, maNumRows( this, CUI_RES( NF_ROWS ) ) -, maFlSep( this, CUI_RES( FL_SEP ) ) -, maHelpButton( this, CUI_RES( BTN_HELP ) ) -, maOkButton( this, CUI_RES( BTN_OK ) ) -, maCancelButton( this, CUI_RES( BTN_CANCEL ) ) +: ModalDialog( pParent, NewTableDialog, cui/ui/newtabledialog.ui ) { -maNumRows.SetValue(2); -maNumColumns.SetValue(5); -FreeResource(); +get(mpNumRows, rows); +get(mpNumColumns, columns); } short SvxNewTableDialog::Execute(void) @@ -49,12 +39,12 @@ void SvxNewTableDialog::Apply(void) sal_Int32 SvxNewTableDialog::getRows() const { -return sal::static_int_cast sal_Int32 ( maNumRows.GetValue() ); +return sal::static_int_cast sal_Int32 ( mpNumRows-GetValue() ); } sal_Int32 SvxNewTableDialog::getColumns() const { -return sal::static_int_cast sal_Int32 ( maNumColumns.GetValue() ); +return sal::static_int_cast sal_Int32 ( mpNumColumns-GetValue() ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/dialogs/newtabledlg.hrc b/cui/source/dialogs/newtabledlg.hrc deleted file mode 100644 index 3def9e7..000 --- a/cui/source/dialogs/newtabledlg.hrc +++ /dev/null @@ -1,26 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the License); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#define FT_COLUMNS 1 -#define NF_COLUMNS 2 -#define FT_ROWS 3 -#define NF_ROWS 4 -#define FL_SEP 5 -#define BTN_HELP 6 -#define BTN_OK 7 -#define BTN_CANCEL 8 diff --git a/cui/source/dialogs/newtabledlg.src b/cui/source/dialogs/newtabledlg.src deleted file mode 100644 index 19ae6bd..000 --- a/cui/source/dialogs/newtabledlg.src +++ /dev/null @@ -1,95 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following
[Libreoffice-commits] .: cui/AllLangResTarget_cui.mk cui/source cui/uiconfig cui/UI_cui.mk sw/uiconfig
cui/AllLangResTarget_cui.mk|1 cui/UI_cui.mk |1 cui/source/inc/helpid.hrc |1 cui/source/options/optaccessibility.cxx| 122 - cui/source/options/optaccessibility.hrc| 71 --- cui/source/options/optaccessibility.hxx| 21 -- cui/source/options/optaccessibility.src| 128 - cui/uiconfig/ui/optaccessibilitypage.ui| 269 + sw/uiconfig/swriter/ui/libaccessibility.ui | 237 - 9 files changed, 317 insertions(+), 534 deletions(-) New commits: commit 3d033a8457180d9e4ccc2b1c1568d79087805209 Author: Caolán McNamara caol...@redhat.com Date: Sun Jan 27 13:04:36 2013 + move accessibility options .ui to right place and adapt code getting rid a pile of custom widget moving code Change-Id: I68879f9ebaf28629c4759315b318b390a985a544 diff --git a/cui/AllLangResTarget_cui.mk b/cui/AllLangResTarget_cui.mk index 92231f6..fb9c10a 100644 --- a/cui/AllLangResTarget_cui.mk +++ b/cui/AllLangResTarget_cui.mk @@ -81,7 +81,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\ cui/source/options/doclinkdialog.src \ cui/source/options/fontsubs.src \ cui/source/options/internationaloptions.src \ -cui/source/options/optaccessibility.src \ cui/source/options/optasian.src \ cui/source/options/optchart.src \ cui/source/options/optcolor.src \ diff --git a/cui/UI_cui.mk b/cui/UI_cui.mk index d2d7d8b..9a6e896 100644 --- a/cui/UI_cui.mk +++ b/cui/UI_cui.mk @@ -27,6 +27,7 @@ $(eval $(call gb_UI_add_uifiles,cui,\ cui/uiconfig/ui/numberingpositionpage \ cui/uiconfig/ui/objectnamedialog \ cui/uiconfig/ui/objecttitledescdialog \ + cui/uiconfig/ui/optaccessibilitypage \ cui/uiconfig/ui/personalization_tab \ cui/uiconfig/ui/pickbulletpage \ cui/uiconfig/ui/pickgraphicpage \ diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc index c783861..9dc68df 100644 --- a/cui/source/inc/helpid.hrc +++ b/cui/source/inc/helpid.hrc @@ -43,7 +43,6 @@ #define HID_LNGDLG_NUM_PREBREAK CUI_HID_LNGDLG_NUM_PREBREAK #define HID_OPTIONS_COLORCONFIG CUI_HID_OPTIONS_COLORCONFIG #define HID_OPTIONS_COLORCONFIG_SAVE_SCHEME CUI_HID_OPTIONS_COLORCONFIG_SAVE_SCHEME -#define HID_OPTIONS_ACCESSIBILITYCONFIG CUI_HID_OPTIONS_ACCESSIBILITYCONFIG #define HID_OPTIONS_COLORCONFIG_COLORLIST_WIN CUI_HID_OPTIONS_COLORCONFIG_COLORLIST_WIN #define HID_OPTIONS_COLORCONFIG_NAME_SCHEME CUI_HID_OPTIONS_COLORCONFIG_NAME_SCHEME #define HID_OPTIONS_PATHS_SELECTFOLDER CUI_HID_OPTIONS_PATHS_SELECTFOLDER diff --git a/cui/source/options/optaccessibility.cxx b/cui/source/options/optaccessibility.cxx index 47736e4..47a2f5c 100644 --- a/cui/source/options/optaccessibility.cxx +++ b/cui/source/options/optaccessibility.cxx @@ -18,21 +18,12 @@ */ #include optaccessibility.hxx -#include optaccessibility.hrc #include dialmgr.hxx #include cuires.hrc #include svtools/accessibilityoptions.hxx #include vcl/settings.hxx #include vcl/svapp.hxx -static void MovePosY( Window _rWin, long _nDelta ) -{ -Point aPoint = _rWin.GetPosPixel(); -aPoint.Y() += _nDelta; - -_rWin.SetPosPixel( aPoint ); -} - struct SvxAccessibilityOptionsTabPage_Impl { SvtAccessibilityOptions m_aConfig; @@ -40,66 +31,29 @@ struct SvxAccessibilityOptionsTabPage_Impl : m_aConfig(){} }; -SvxAccessibilityOptionsTabPage::SvxAccessibilityOptionsTabPage( Window* pParent, const SfxItemSet rSet ) -:SfxTabPage(pParent, CUI_RES( RID_SVXPAGE_ACCESSIBILITYCONFIG ), rSet) -,m_aMiscellaneousLabel (this, CUI_RES(FL_MISCELLANEOUS )) -,m_aAccessibilityTool (this, CUI_RES(CB_ACCESSIBILITY_TOOL)) -,m_aTextSelectionInReadonly (this, CUI_RES(CB_TEXTSELECTION )) -,m_aAnimatedGraphics(this, CUI_RES(CB_ANIMATED_GRAPHICS )) -,m_aAnimatedTexts (this, CUI_RES(CB_ANIMATED_TEXTS)) -,m_aTipHelpCB (this, CUI_RES(CB_TIPHELP )) -,m_aTipHelpNF (this, CUI_RES(NF_TIPHELP )) -,m_aTipHelpFT (this, CUI_RES(FT_TIPHELP )) -,m_aHCOptionsLabel (this, CUI_RES(FL_HC_OPTIONS)) -,m_aAutoDetectHC(this, CUI_RES(CB_AUTO_DETECT_HC)) -,m_aAutomaticFontColor (this, CUI_RES(CB_AUTOMATIC_FONT_COLOR)) -,m_aPagePreviews(this, CUI_RES(CB_PAGE_PREVIEWS )) -,m_pImpl(new SvxAccessibilityOptionsTabPage_Impl) +SvxAccessibilityOptionsTabPage::SvxAccessibilityOptionsTabPage(Window* pParent, +const SfxItemSet rSet) +: SfxTabPage(pParent, OptAccessibilityPage, +cui/ui/optaccessibilitypage.ui, rSet) +, m_pImpl(new SvxAccessibilityOptionsTabPage_Impl) { -FreeResource(); -m_aTipHelpCB.SetClickHdl(LINK(this, SvxAccessibilityOptionsTabPage, TipHelpHdl)); +
[Libreoffice-commits] .: cui/AllLangResTarget_cui.mk cui/source cui/uiconfig cui/UI_cui.mk
cui/AllLangResTarget_cui.mk |1 cui/UI_cui.mk|1 cui/source/dialogs/dlgname.cxx | 117 +++-- cui/source/dialogs/dlgname.hrc | 36 -- cui/source/dialogs/dlgname.src | 239 -- cui/source/factory/dlgfact.cxx | 17 - cui/source/inc/cuires.hrc|6 cui/source/inc/dlgname.hxx | 56 +--- cui/source/tabpages/tpbitmap.cxx |5 cui/source/tabpages/tpcolor.cxx |4 cui/source/tabpages/tpgradnt.cxx |5 cui/source/tabpages/tphatch.cxx |5 cui/source/tabpages/tplnedef.cxx |5 cui/uiconfig/ui/namedialog.ui| 506 +++ 14 files changed, 588 insertions(+), 415 deletions(-) New commits: commit 45dc5f7f4ef579c848a83f5679658977303527bb Author: Robert Roth robert.roth@gmail.com Date: Fri Jan 25 03:27:27 2013 +0200 Object name, description dialog and messagebox ported to UI files Change-Id: Iad23998c9ccde22abad9d894af3dd6df7c92564f Reviewed-on: https://gerrit.libreoffice.org/1857 Tested-by: Caolán McNamara caol...@redhat.com Reviewed-by: Caolán McNamara caol...@redhat.com diff --git a/cui/AllLangResTarget_cui.mk b/cui/AllLangResTarget_cui.mk index 967d702..92231f6 100644 --- a/cui/AllLangResTarget_cui.mk +++ b/cui/AllLangResTarget_cui.mk @@ -58,7 +58,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\ cui/source/dialogs/commonlingui.src \ cui/source/dialogs/cuiimapdlg.src \ cui/source/dialogs/cuires.src \ -cui/source/dialogs/dlgname.src \ cui/source/dialogs/fmsearch.src \ cui/source/dialogs/gallery.src \ cui/source/dialogs/grfflt.src \ diff --git a/cui/UI_cui.mk b/cui/UI_cui.mk index e67ffac..c260e11 100644 --- a/cui/UI_cui.mk +++ b/cui/UI_cui.mk @@ -20,6 +20,7 @@ $(eval $(call gb_UI_add_uifiles,cui,\ cui/uiconfig/ui/insertplugin \ cui/uiconfig/ui/insertrowcolumn \ cui/uiconfig/ui/macroselectordialog \ + cui/uiconfig/ui/namedialog \ cui/uiconfig/ui/numberingformatpage \ cui/uiconfig/ui/numberingoptionspage \ cui/uiconfig/ui/numberingpositionpage \ diff --git a/cui/source/dialogs/dlgname.cxx b/cui/source/dialogs/dlgname.cxx index 66b465c..a3af8bd 100644 --- a/cui/source/dialogs/dlgname.cxx +++ b/cui/source/dialogs/dlgname.cxx @@ -24,7 +24,6 @@ #include dlgname.hxx #include defdlgname.hxx -#include dlgname.hrc #include dialmgr.hxx #define MAX_DESCRIPTION_LINES ((long)5) @@ -36,40 +35,37 @@ \/ SvxNameDialog::SvxNameDialog( Window* pWindow, const String rName, const String rDesc ) : -ModalDialog ( pWindow, CUI_RES( RID_SVXDLG_NAME ) ), -aFtDescription ( this, CUI_RES( FT_DESCRIPTION ) ), -aEdtName( this, CUI_RES( EDT_STRING ) ), -aBtnOK ( this, CUI_RES( BTN_OK ) ), -aBtnCancel ( this, CUI_RES( BTN_CANCEL ) ), -aBtnHelp( this, CUI_RES( BTN_HELP ) ) +ModalDialog ( pWindow, NameDialog, cui/ui/namedialog.ui ) { -FreeResource(); +get(pBtnOK, ok); +get(pFtDescription, description_label); +get(pEdtName, name_entry); -aFtDescription.SetText( rDesc ); -aEdtName.SetText( rName ); -aEdtName.SetSelection(Selection(SELECTION_MIN, SELECTION_MAX)); -ModifyHdl(aEdtName); -aEdtName.SetModifyHdl(LINK(this, SvxNameDialog, ModifyHdl)); +pFtDescription-SetText( rDesc ); +pEdtName-SetText( rName ); +pEdtName-SetSelection(Selection(SELECTION_MIN, SELECTION_MAX)); +ModifyHdl(pEdtName); +pEdtName-SetModifyHdl(LINK(this, SvxNameDialog, ModifyHdl)); // dynamic height of the description field -Size aSize = aFtDescription.GetSizePixel(); -long nTxtWidth = aFtDescription.GetCtrlTextWidth( rDesc ); +Size aSize = pFtDescription-GetSizePixel(); +long nTxtWidth = pFtDescription-GetCtrlTextWidth( rDesc ); if ( nTxtWidth aSize.Width() ) { -long nLines = Min( ( nTxtWidth / aSize.Width() + 1 ), MAX_DESCRIPTION_LINES ); +long nLines = Min( ( nTxtWidth / (aSize.Width()+1) + 1 ), MAX_DESCRIPTION_LINES ); long nHeight = aSize.Height(); aSize.Height() = nHeight * nLines; -aFtDescription.SetSizePixel( aSize ); -Point aPnt = aEdtName.GetPosPixel(); +pFtDescription-SetSizePixel( aSize ); +Point aPnt = pEdtName-GetPosPixel(); aPnt.Y() += ( aSize.Height() - nHeight ); -aEdtName.SetPosPixel( aPnt ); +pEdtName-SetPosPixel( aPnt ); } } IMPL_LINK_NOARG(SvxNameDialog, ModifyHdl) { if(aCheckNameHdl.IsSet()) -aBtnOK.Enable(aCheckNameHdl.Call(this) 0); +pBtnOK-Enable(aCheckNameHdl.Call(this) 0); return 0; } @@ -80,31 +76,25 @@ IMPL_LINK_NOARG(SvxNameDialog, ModifyHdl) SvxObjectNameDialog::SvxObjectNameDialog( Window* pWindow, -const String rName) -: ModalDialog(pWindow, CUI_RES(RID_SVXDLG_OBJECT_NAME)), -