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 )),
-