[Libreoffice-commits] .: sw/inc sw/source sw/uiconfig sw/UI_swriter.mk

2013-01-19 Thread Libreoffice Gerrit user
 sw/UI_swriter.mk  |1 
 sw/inc/chrdlg.hrc |1 
 sw/inc/globals.hrc|1 
 sw/inc/helpid.h   |1 
 sw/inc/swabstdlg.hxx  |4 
 sw/source/ui/chrdlg/chardlg.cxx   |   88 +---
 sw/source/ui/chrdlg/chardlg.src   |   50 --
 sw/source/ui/dialog/swdlgfact.cxx |   21 --
 sw/source/ui/dialog/swdlgfact.hxx |4 
 sw/source/ui/envelp/envfmt.cxx|2 
 sw/source/ui/inc/chrdlg.hxx   |   11 +
 sw/source/ui/shells/annotsh.cxx   |2 
 sw/source/ui/shells/drwtxtex.cxx  |2 
 sw/source/ui/shells/textsh1.cxx   |4 
 sw/uiconfig/swriter/ui/characterproperties.ui |  189 ++
 15 files changed, 256 insertions(+), 125 deletions(-)

New commits:
commit 70467371485ada5a30b88968607b93dd62b3383c
Author: Caolán McNamara caol...@redhat.com
Date:   Fri Jan 18 20:22:27 2013 +

convert character properties tabdialog to .ui

Change-Id: I73fc5fc19ae75971b0569b708f4104c79b9a9cc2

diff --git a/sw/UI_swriter.mk b/sw/UI_swriter.mk
index b7f8f74..f3a3735 100644
--- a/sw/UI_swriter.mk
+++ b/sw/UI_swriter.mk
@@ -15,6 +15,7 @@ $(eval $(call gb_UI_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/bibliographyentry \
sw/uiconfig/swriter/ui/bulletsandnumbering \
sw/uiconfig/swriter/ui/captionoptions \
+   sw/uiconfig/swriter/ui/characterproperties \
sw/uiconfig/swriter/ui/charurlpage \
sw/uiconfig/swriter/ui/columndialog \
sw/uiconfig/swriter/ui/columnpage \
diff --git a/sw/inc/chrdlg.hrc b/sw/inc/chrdlg.hrc
index 5bbe3d6..48f8a95 100644
--- a/sw/inc/chrdlg.hrc
+++ b/sw/inc/chrdlg.hrc
@@ -21,7 +21,6 @@
 
 #include rcid.hrc
 
-#define DLG_CHAR(RC_CHRDLG_BEGIN +  1)
 #define DLG_PARA(RC_CHRDLG_BEGIN +  2)
 #define DLG_DROPCAPS(RC_CHRDLG_BEGIN +  8)
 #define DLG_DRAWCHAR(RC_CHRDLG_BEGIN +  9)
diff --git a/sw/inc/globals.hrc b/sw/inc/globals.hrc
index 21c1232..5e1a49c 100644
--- a/sw/inc/globals.hrc
+++ b/sw/inc/globals.hrc
@@ -157,7 +157,6 @@
 
 #define TP_MACRO_ASSIGN (RC_GLOBALS_BEGIN +  40)
 #define TP_FRM_URL  (RC_GLOBALS_BEGIN +  42)
-#define TP_CHAR_URL (RC_GLOBALS_BEGIN +  43)
 
 #define TP_CONTENT_OPT  (RC_GLOBALS_BEGIN +  45)
 #define TP_STD_FONT (RC_GLOBALS_BEGIN +  47)
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index bb1816b..ad87626 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -134,7 +134,6 @@
 #define HID_DLG_FLDEDT_PREV 
SW_HID_DLG_FLDEDT_PREV
 #define HID_DLG_FLDEDT_ADDRESS  
SW_HID_DLG_FLDEDT_ADDRESS
 
-#define HID_FILEDLG_CHARDLG 
SW_HID_FILEDLG_CHARDLG
 #define HID_FILEDLG_LOADTEMPLATE
SW_HID_FILEDLG_LOADTEMPLATE
 #define HID_FILEDLG_MAILMRGE1   
SW_HID_FILEDLG_MAILMRGE1
 #define HID_FILEDLG_MAILMRGE2   
SW_HID_FILEDLG_MAILMRGE2
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index f5aa68c..b672f66 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -355,8 +355,8 @@ public:
 
 virtual AbstractSwBreakDlg * CreateSwBreakDlg(Window *pParent, SwWrtShell 
rSh) = 0; // add for SwBreakDlg
 virtual VclAbstractDialog   * CreateSwChangeDBDlg(SwView rVw) = 0; //add 
for SwChangeDBDlg
-virtual SfxAbstractTabDialog *  CreateSwCharDlg( Window* pParent, SwView 
pVw, const SfxItemSet rCoreSet, int nResId, // add for SwCharDlg
-const String* pFmtStr = 0, 
sal_Bool bIsDrwTxtDlg = sal_False) = 0;
+virtual SfxAbstractTabDialog *  CreateSwCharDlg(Window* pParent, SwView 
pVw, const SfxItemSet rCoreSet,
+const String* pFmtStr = 0, sal_Bool bIsDrwTxtDlg = sal_False) = 0;  // 
add for SwCharDlg
 virtual AbstractSwConvertTableDlg* CreateSwConvertTableDlg(SwView rView, 
bool bToTable) = 0; //add for SwConvertTableDlg
 virtual VclAbstractDialog * CreateSwCaptionDialog ( Window *pParent, 
SwView rV,int nResId) = 0; //add for SwCaptionDialog
 
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index dfccdec..e7efa91 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -58,13 +58,12 @@ using namespace ::com::sun::star::uno;
 using namespace ::sfx2;
 
 SwCharDlg::SwCharDlg(Window* pParent, SwView rVw, const SfxItemSet rCoreSet,
- const String* pStr, sal_Bool bIsDrwTxtDlg) :
-SfxTabDialog(pParent, SW_RES(DLG_CHAR), rCoreSet, pStr != 0),
-rView(rVw),
-bIsDrwTxtMode(bIsDrwTxtDlg)
+const String* pStr, bool bIsDrwTxtDlg)
+: SfxTabDialog(0, pParent, 

[Libreoffice-commits] .: sw/inc sw/source sw/uiconfig sw/UI_swriter.mk

2012-12-10 Thread Libreoffice Gerrit user
 sw/UI_swriter.mk|1 
 sw/inc/globals.hrc  |6 
 sw/source/ui/app/app.src|   21 +
 sw/source/ui/config/optload.cxx |   16 +
 sw/source/ui/frmdlg/cption.cxx  |  221 ++---
 sw/source/ui/frmdlg/cption.hrc  |   21 -
 sw/source/ui/frmdlg/cption.src  |  180 --
 sw/source/ui/inc/cption.hxx |   57 ++--
 sw/source/ui/inc/optload.hxx|   12 
 sw/uiconfig/swriter/ui/insertcaption.ui |  401 
 10 files changed, 560 insertions(+), 376 deletions(-)

New commits:
commit 6bf7198ebd12d4ac60f9039a30339867e8a3ce8e
Author: Jack Leigh leigh...@gmx.se
Date:   Fri Dec 7 18:22:54 2012 +

migrate 'Insert Caption' dialog to .ui file

Change-Id: I490c8057f1263f12f50b59c97ca9807138daab5d
Reviewed-on: https://gerrit.libreoffice.org/1266
Tested-by: Caolán McNamara caol...@redhat.com
Reviewed-by: Caolán McNamara caol...@redhat.com

diff --git a/sw/UI_swriter.mk b/sw/UI_swriter.mk
index fc4a259..f39bb2f 100644
--- a/sw/UI_swriter.mk
+++ b/sw/UI_swriter.mk
@@ -20,6 +20,7 @@ $(eval $(call gb_UI_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/indexentry \
sw/uiconfig/swriter/ui/insertbookmark \
sw/uiconfig/swriter/ui/insertbreak \
+   sw/uiconfig/swriter/ui/insertcaption \
sw/uiconfig/swriter/ui/insertfootnote \
sw/uiconfig/swriter/ui/insertscript \
sw/uiconfig/swriter/ui/inserttable \
diff --git a/sw/inc/globals.hrc b/sw/inc/globals.hrc
index 73c73ae..ec4c02e 100644
--- a/sw/inc/globals.hrc
+++ b/sw/inc/globals.hrc
@@ -69,6 +69,12 @@
 
 #define SW_STR_NONE (RC_GLOBALS_BEGIN + 41)
 
+#define STR_CAPTION_BEGINNING   (RC_GLOBALS_BEGIN + 42)
+#define STR_CAPTION_END (RC_GLOBALS_BEGIN + 43)
+#define STR_CAPTION_ABOVE   (RC_GLOBALS_BEGIN + 44)
+#define STR_CAPTION_BELOW   (RC_GLOBALS_BEGIN + 45)
+#define STR_CAPTION_CATEGORY_NONE   (RC_GLOBALS_BEGIN + 46)
+
 // DIALOGS ---
 
 #define DLG_THESAURUS   (RC_GLOBALS_BEGIN + 2)
diff --git a/sw/source/ui/app/app.src b/sw/source/ui/app/app.src
index dbfd44b..6952571 100644
--- a/sw/source/ui/app/app.src
+++ b/sw/source/ui/app/app.src
@@ -240,6 +240,27 @@ String SW_STR_NONE
 Text [ en-US ] = [None] ;
 };
 
+String STR_CAPTION_BEGINNING
+{
+Text [ en-US ] = Above ;
+};
+String STR_CAPTION_END
+{
+Text [ en-US ] = Below ;
+};
+String STR_CAPTION_ABOVE
+{
+Text [ en-US ] = Above ;
+};
+String STR_CAPTION_BELOW
+{
+Text [ en-US ] = Below ;
+};
+String STR_CAPTION_CATEGORY_NONE
+{
+Text [ en-US ] = None ;
+};
+
 InfoBox MSG_ERROR_SEND_MAIL
 {
 BUTTONS = WB_OK ;
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 045e897..f3fd604 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -345,9 +345,20 @@ SwCaptionOptDlg::~SwCaptionOptDlg()
 {
 }
 
+SwCaptionPreview::SwCaptionPreview( Window* pParent )
+: Window( pParent )
+{
+Init();
+}
+
 SwCaptionPreview::SwCaptionPreview( Window* pParent, const ResId rResId )
 : Window( pParent, rResId )
 {
+Init();
+}
+
+void SwCaptionPreview::Init()
+{
 maDrawPos = Point( 4, 6 );
 
 Wallpaper   aBack( GetSettings().GetStyleSettings().GetWindowColor() );
@@ -377,6 +388,11 @@ void SwCaptionPreview::Paint( const Rectangle rRect )
 DrawText( Point( 4, 6 ), maText );
 }
 
+extern C SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSwCaptionPreview(Window* 
pParent)
+{
+return new SwCaptionPreview(pParent);
+}
+
 SwCaptionOptPage::SwCaptionOptPage( Window* pParent, const SfxItemSet rSet )
 : SfxTabPage(pParent, SW_RES(TP_OPTCAPTION_PAGE), rSet),
 aCheckFT(this, SW_RES(FT_OBJECTS)),
diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index 5d7f6eb..84bbbe6 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -43,8 +43,10 @@
 #include com/sun/star/text/XTextFrame.hpp
 #include comphelper/string.hxx
 #include frmui.hrc
+#include globals.hrc
 #include cption.hrc
 #include SwStyleNameMapper.hxx
+
 using namespace ::com::sun::star;
 
 extern String* GetOldGrfCat();
@@ -97,37 +99,30 @@ public:
 String SwCaptionDialog::our_aSepTextSave = rtl::OUString(: ); // Caption 
separator text
 
 SwCaptionDialog::SwCaptionDialog( Window *pParent, SwView rV ) :
-
-SvxStandardDialog( pParent, SW_RES(DLG_CAPTION) ),
-
-aTextText (this, SW_RES(TXT_TEXT)),
-aTextEdit (this, SW_RES(EDT_TEXT)),
-aSettingsFL  (this, SW_RES(FL_SETTINGS)),
-aCategoryText (this, SW_RES(TXT_CATEGORY)),
-aCategoryBox  (this, SW_RES(BOX_CATEGORY)),
-aFormatText   (this, SW_RES(TXT_FORMAT  )),
-aFormatBox(this, SW_RES(BOX_FORMAT  )),
-aNumberingSeparatorFT(this, SW_RES(FT_NUM_SEP  )),
-