summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-11-16 11:03:57 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-11-20 16:47:33 +0000
commitbcafd193e743fca4ab6198092b34d000787e06f0 (patch)
tree90881b1e5b1a3e7e9184395feff2f3004de05325 /filter
parent3f2f4f15e20b7f295f26cddadfc712c189719aee (diff)
convert xslt filter dialog to .ui
Change-Id: Ia07df75b00b7d34da9dfeeddb47280ddba23b897
Diffstat (limited to 'filter')
-rw-r--r--filter/AllLangResTarget_xsltdlg.mk1
-rw-r--r--filter/Module_filter.mk1
-rw-r--r--filter/UI_xsltdlg.mk16
-rw-r--r--filter/source/xsltdialog/hidother.src8
-rw-r--r--filter/source/xsltdialog/xmlfiltercommon.hrc9
-rw-r--r--filter/source/xsltdialog/xmlfilterdialogcomponent.cxx27
-rw-r--r--filter/source/xsltdialog/xmlfilterdialogstrings.hrc2
-rw-r--r--filter/source/xsltdialog/xmlfilterdialogstrings.src5
-rw-r--r--filter/source/xsltdialog/xmlfilterhelpids.hrc8
-rw-r--r--filter/source/xsltdialog/xmlfiltersettingsdialog.cxx280
-rw-r--r--filter/source/xsltdialog/xmlfiltersettingsdialog.hrc34
-rw-r--r--filter/source/xsltdialog/xmlfiltersettingsdialog.hxx70
-rw-r--r--filter/source/xsltdialog/xmlfiltersettingsdialog.src123
-rw-r--r--filter/source/xsltdialog/xmlfiltertabdialog.cxx1
-rw-r--r--filter/uiconfig/ui/xmlfiltersettings.ui182
15 files changed, 397 insertions, 370 deletions
diff --git a/filter/AllLangResTarget_xsltdlg.mk b/filter/AllLangResTarget_xsltdlg.mk
index 22cbffebb190..30d73ba85b64 100644
--- a/filter/AllLangResTarget_xsltdlg.mk
+++ b/filter/AllLangResTarget_xsltdlg.mk
@@ -34,7 +34,6 @@ $(eval $(call gb_SrsTarget_set_include,filter/xsltdlg,\
))
$(eval $(call gb_SrsTarget_add_files,filter/xsltdlg,\
- filter/source/xsltdialog/xmlfiltersettingsdialog.src \
filter/source/xsltdialog/xmlfiltertabdialog.src \
filter/source/xsltdialog/xmlfiltertabpagebasic.src \
filter/source/xsltdialog/xmlfiltertabpagexslt.src \
diff --git a/filter/Module_filter.mk b/filter/Module_filter.mk
index 463af633763b..2f02504ddd48 100644
--- a/filter/Module_filter.mk
+++ b/filter/Module_filter.mk
@@ -64,6 +64,7 @@ $(eval $(call gb_Module_add_targets,filter,\
Package_inc \
Package_docbook \
Package_xslt \
+ UI_xsltdlg \
))
ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
diff --git a/filter/UI_xsltdlg.mk b/filter/UI_xsltdlg.mk
new file mode 100644
index 000000000000..8d9887662281
--- /dev/null
+++ b/filter/UI_xsltdlg.mk
@@ -0,0 +1,16 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# 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/.
+#
+
+$(eval $(call gb_UI_UI,filter))
+
+$(eval $(call gb_UI_add_uifiles,filter,\
+ filter/uiconfig/ui/xmlfiltersettings \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/filter/source/xsltdialog/hidother.src b/filter/source/xsltdialog/hidother.src
index 84ec50de6415..cf2816dbc45c 100644
--- a/filter/source/xsltdialog/hidother.src
+++ b/filter/source/xsltdialog/hidother.src
@@ -20,15 +20,7 @@
hidspecial HID_XML_SOURCE_FILE_DIALOG { HelpId = HID_XML_SOURCE_FILE_DIALOG; };
hidspecial HID_XML_SOURCE_FILE_VALIDATE { HelpId = HID_XML_SOURCE_FILE_VALIDATE; };
-hidspecial HID_XML_FILTER_SETTINGS_DIALOG { HelpId = HID_XML_FILTER_SETTINGS_DIALOG; };
hidspecial HID_XML_FILTER_LIST { HelpId = HID_XML_FILTER_LIST; };
-hidspecial HID_XML_FILTER_NEW { HelpId = HID_XML_FILTER_NEW; };
-hidspecial HID_XML_FILTER_EDIT { HelpId = HID_XML_FILTER_EDIT; };
-hidspecial HID_XML_FILTER_TEST { HelpId = HID_XML_FILTER_TEST; };
-hidspecial HID_XML_FILTER_DELETE { HelpId = HID_XML_FILTER_DELETE; };
-hidspecial HID_XML_FILTER_SAVE { HelpId = HID_XML_FILTER_SAVE; };
-hidspecial HID_XML_FILTER_OPEN { HelpId = HID_XML_FILTER_OPEN; };
-hidspecial HID_XML_FILTER_CLOSE { HelpId = HID_XML_FILTER_CLOSE; };
hidspecial HID_XML_FILTER_TABDIALOG { HelpId = HID_XML_FILTER_TABDIALOG; };
hidspecial HID_XML_FILTER_TABPAGE_BASIC { HelpId = HID_XML_FILTER_TABPAGE_BASIC; };
diff --git a/filter/source/xsltdialog/xmlfiltercommon.hrc b/filter/source/xsltdialog/xmlfiltercommon.hrc
index 991f6d9e77ea..ad1be04e9b55 100644
--- a/filter/source/xsltdialog/xmlfiltercommon.hrc
+++ b/filter/source/xsltdialog/xmlfiltercommon.hrc
@@ -21,10 +21,9 @@
#include "filter.hrc"
#define DLG_XML_SOURCE_FILE_DIALOG (RID_XSLT_DIALOG_START+0)
-#define DLG_XML_FILTER_SETTINGS_DIALOG (RID_XSLT_DIALOG_START+1)
-#define DLG_XML_FILTER_TABDIALOG (RID_XSLT_DIALOG_START+2)
-#define RID_XML_FILTER_TABPAGE_BASIC (RID_XSLT_DIALOG_START+3)
-#define RID_XML_FILTER_TABPAGE_XSLT (RID_XSLT_DIALOG_START+4)
-#define DLG_XML_FILTER_TEST_DIALOG (RID_XSLT_DIALOG_START+5)
+#define DLG_XML_FILTER_TABDIALOG (RID_XSLT_DIALOG_START+1)
+#define RID_XML_FILTER_TABPAGE_BASIC (RID_XSLT_DIALOG_START+2)
+#define RID_XML_FILTER_TABPAGE_XSLT (RID_XSLT_DIALOG_START+3)
+#define DLG_XML_FILTER_TEST_DIALOG (RID_XSLT_DIALOG_START+4)
#endif
diff --git a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
index 3d9a3406c6a6..773219e2fc2f 100644
--- a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
+++ b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx
@@ -105,13 +105,20 @@ private:
com::sun::star::uno::Reference<com::sun::star::awt::XWindow> mxParent; /// parent window
com::sun::star::uno::Reference< XMultiServiceFactory > mxMSF;
- static ResMgr* mpResMgr;
XMLFilterSettingsDialog* mpDialog;
};
//-------------------------------------------------------------------------
-ResMgr* XMLFilterDialogComponent::mpResMgr = NULL;
+namespace
+{
+ static ResMgr* pXSLTResMgr = NULL;
+}
+
+ResMgr* getXSLTDialogResMgr()
+{
+ return pXSLTResMgr;
+}
XMLFilterDialogComponent::XMLFilterDialogComponent( const com::sun::star::uno::Reference< XMultiServiceFactory >& rxMSF ) :
OComponentHelper( maMutex ),
@@ -291,10 +298,10 @@ void SAL_CALL XMLFilterDialogComponent::disposing()
mpDialog = NULL;
}
- if( mpResMgr )
+ if (pXSLTResMgr)
{
- delete mpResMgr;
- mpResMgr = NULL;
+ delete pXSLTResMgr;
+ pXSLTResMgr = NULL;
}
}
@@ -335,9 +342,9 @@ sal_Int16 SAL_CALL XMLFilterDialogComponent::execute( ) throw(RuntimeException)
{
::SolarMutexGuard aGuard;
- if( NULL == mpResMgr )
+ if( NULL == pXSLTResMgr )
{
- mpResMgr = ResMgr::CreateResMgr( "xsltdlg", Application::GetSettings().GetUILocale() );
+ pXSLTResMgr = ResMgr::CreateResMgr( "xsltdlg", Application::GetSettings().GetUILocale() );
}
if( NULL == mpDialog )
@@ -351,12 +358,12 @@ sal_Int16 SAL_CALL XMLFilterDialogComponent::execute( ) throw(RuntimeException)
}
Reference< XComponent > xComp( this );
- mpDialog = new XMLFilterSettingsDialog( pParent, *mpResMgr, mxMSF );
- mpDialog->ShowWindow();
+ mpDialog = new XMLFilterSettingsDialog(pParent, mxMSF);
+ mpDialog->Execute();
}
else if( !mpDialog->IsVisible() )
{
- mpDialog->ShowWindow();
+ mpDialog->Execute();
}
mpDialog->ToTop();
diff --git a/filter/source/xsltdialog/xmlfilterdialogstrings.hrc b/filter/source/xsltdialog/xmlfilterdialogstrings.hrc
index ec0f45f86dab..2e34787cc7af 100644
--- a/filter/source/xsltdialog/xmlfilterdialogstrings.hrc
+++ b/filter/source/xsltdialog/xmlfilterdialogstrings.hrc
@@ -60,4 +60,6 @@
#define STR_APPL_NAME_OASIS_IMPRESS (RID_XSLT_DIALOG_START + 36)
#define STR_APPL_NAME_OASIS_DRAW (RID_XSLT_DIALOG_START + 37)
+#define STR_XML_FILTER_LISTBOX (RID_XSLT_DIALOG_START + 38)
+
#endif
diff --git a/filter/source/xsltdialog/xmlfilterdialogstrings.src b/filter/source/xsltdialog/xmlfilterdialogstrings.src
index 18c5246dfeb1..ec0d9b65d936 100644
--- a/filter/source/xsltdialog/xmlfilterdialogstrings.src
+++ b/filter/source/xsltdialog/xmlfilterdialogstrings.src
@@ -183,3 +183,8 @@ String STR_NO_FILTERS_FOUND
{
Text [ en-US ] = "No XML filter could be installed because the package '%s' does not contain any XML filters.";
};
+
+String STR_XML_FILTER_LISTBOX
+{
+ Text [ en-US ] = "XML Filter List";
+};
diff --git a/filter/source/xsltdialog/xmlfilterhelpids.hrc b/filter/source/xsltdialog/xmlfilterhelpids.hrc
index d4ea134087b6..712a8ef0f4b0 100644
--- a/filter/source/xsltdialog/xmlfilterhelpids.hrc
+++ b/filter/source/xsltdialog/xmlfilterhelpids.hrc
@@ -20,15 +20,7 @@
#define HID_XML_SOURCE_FILE_DIALOG "FILTER_HID_XML_SOURCE_FILE_DIALOG"
#define HID_XML_SOURCE_FILE_VALIDATE "FILTER_HID_XML_SOURCE_FILE_VALIDATE"
-#define HID_XML_FILTER_SETTINGS_DIALOG "FILTER_HID_XML_FILTER_SETTINGS_DIALOG"
#define HID_XML_FILTER_LIST "FILTER_HID_XML_FILTER_LIST"
-#define HID_XML_FILTER_NEW "FILTER_HID_XML_FILTER_NEW"
-#define HID_XML_FILTER_EDIT "FILTER_HID_XML_FILTER_EDIT"
-#define HID_XML_FILTER_TEST "FILTER_HID_XML_FILTER_TEST"
-#define HID_XML_FILTER_DELETE "FILTER_HID_XML_FILTER_DELETE"
-#define HID_XML_FILTER_SAVE "FILTER_HID_XML_FILTER_SAVE"
-#define HID_XML_FILTER_OPEN "FILTER_HID_XML_FILTER_OPEN"
-#define HID_XML_FILTER_CLOSE "FILTER_HID_XML_FILTER_CLOSE"
#define HID_XML_FILTER_TABDIALOG "FILTER_HID_XML_FILTER_TABDIALOG"
#define HID_XML_FILTER_TABPAGE_BASIC "FILTER_HID_XML_FILTER_TABPAGE_BASIC"
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index 64f1baa0d32d..fc04e65495e7 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -38,7 +38,6 @@
#include "xmlfilterdialogstrings.hrc"
#include "xmlfiltersettingsdialog.hxx"
-#include "xmlfiltersettingsdialog.hrc"
#include "xmlfiltertabdialog.hxx"
#include "xmlfiltertestdialog.hxx"
#include "xmlfilterjar.hxx"
@@ -56,43 +55,38 @@ using namespace com::sun::star::util;
using ::rtl::OUString;
using ::rtl::Uri;
-ResMgr* XMLFilterSettingsDialog::mpResMgr = NULL;
-
-XMLFilterSettingsDialog::XMLFilterSettingsDialog( Window* pParent, ResMgr& rResMgr, const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rxMSF ) :
- WorkWindow( pParent, ResId( DLG_XML_FILTER_SETTINGS_DIALOG, rResMgr ) ),
- mxMSF( rxMSF ),
- maCtrlFilterList( this, ResId( CTRL_XML_FILTER_LIST, rResMgr ) ),
- maPBNew( this, ResId( PB_XML_FILTER_NEW, rResMgr ) ),
- maPBEdit( this, ResId( PB_XML_FILTER_EDIT, rResMgr ) ),
- maPBTest( this, ResId( PB_XML_FILTER_TEST, rResMgr ) ),
- maPBDelete( this, ResId( PB_XML_FILTER_DELETE, rResMgr ) ),
- maPBSave( this, ResId( PB_XML_FILTER_SAVE, rResMgr ) ),
- maPBOpen( this, ResId( PB_XML_FILTER_OPEN, rResMgr ) ),
- maPBHelp( this, ResId( BTN_XML_FILTER_HELP, rResMgr ) ),
- maPBClose( this, ResId( PB_XML_FILTER_CLOSE, rResMgr ) ),
- mbIsClosable(true),
- sTemplatePath( RTL_CONSTASCII_USTRINGPARAM( "$(user)/template/") ),
- sDocTypePrefix( RTL_CONSTASCII_USTRINGPARAM( "doctype:") )
+XMLFilterSettingsDialog::XMLFilterSettingsDialog(Window* pParent,
+ const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rxMSF)
+ : Dialog(pParent, "XMLFilterSettingsDialog", "filter/ui/xmlfiltersettings.ui")
+ , mxMSF( rxMSF )
+ , m_bIsClosable(true)
+ , m_sTemplatePath("$(user)/template/")
+ , m_sDocTypePrefix("doctype:")
{
- mpResMgr = &rResMgr;
-
- mpFilterListBox = new XMLFilterListBox( &maCtrlFilterList );
- mpFilterListBox->SetSelectHdl( LINK( this, XMLFilterSettingsDialog, SelectionChangedHdl_Impl ) );
- mpFilterListBox->SetDeselectHdl( LINK( this, XMLFilterSettingsDialog, SelectionChangedHdl_Impl ) );
- mpFilterListBox->SetDoubleClickHdl( LINK( this, XMLFilterSettingsDialog, DoubleClickHdl_Impl ) );
- mpFilterListBox->SetAccessibleName(RESIDSTR(STR_XML_FILTER_LISTBOX));
- maCtrlFilterList.SetAccessibleName(RESIDSTR(STR_XML_FILTER_LISTBOX));
- mpFilterListBox->SetHelpId( HID_XML_FILTER_LIST );
-
- FreeResource();
-
- maPBNew.SetClickHdl(LINK( this, XMLFilterSettingsDialog, ClickHdl_Impl ) );
- maPBEdit.SetClickHdl(LINK( this, XMLFilterSettingsDialog, ClickHdl_Impl ) );
- maPBTest.SetClickHdl(LINK( this, XMLFilterSettingsDialog, ClickHdl_Impl ) );
- maPBDelete.SetClickHdl(LINK( this, XMLFilterSettingsDialog, ClickHdl_Impl ) );
- maPBSave.SetClickHdl(LINK( this, XMLFilterSettingsDialog, ClickHdl_Impl ) );
- maPBOpen.SetClickHdl(LINK( this, XMLFilterSettingsDialog, ClickHdl_Impl ) );
- maPBClose.SetClickHdl(LINK( this, XMLFilterSettingsDialog, ClickHdl_Impl ) );
+ get(m_pCtrlFilterList, "filterlist");
+ get(m_pPBNew, "new");
+ get(m_pPBEdit, "edit");
+ get(m_pPBTest, "test");
+ get(m_pPBDelete, "delete");
+ get(m_pPBSave, "save");
+ get(m_pPBOpen, "open");
+ get(m_pPBClose, "close");
+
+ m_pFilterListBox = m_pCtrlFilterList->getListBox();
+ m_pFilterListBox->SetSelectHdl( LINK( this, XMLFilterSettingsDialog, SelectionChangedHdl_Impl ) );
+ m_pFilterListBox->SetDeselectHdl( LINK( this, XMLFilterSettingsDialog, SelectionChangedHdl_Impl ) );
+ m_pFilterListBox->SetDoubleClickHdl( LINK( this, XMLFilterSettingsDialog, DoubleClickHdl_Impl ) );
+ m_pFilterListBox->SetAccessibleName(RESIDSTR(STR_XML_FILTER_LISTBOX));
+ m_pCtrlFilterList->SetAccessibleName(RESIDSTR(STR_XML_FILTER_LISTBOX));
+ m_pFilterListBox->SetHelpId( HID_XML_FILTER_LIST );
+
+ m_pPBNew->SetClickHdl(LINK( this, XMLFilterSettingsDialog, ClickHdl_Impl ) );
+ m_pPBEdit->SetClickHdl(LINK( this, XMLFilterSettingsDialog, ClickHdl_Impl ) );
+ m_pPBTest->SetClickHdl(LINK( this, XMLFilterSettingsDialog, ClickHdl_Impl ) );
+ m_pPBDelete->SetClickHdl(LINK( this, XMLFilterSettingsDialog, ClickHdl_Impl ) );
+ m_pPBSave->SetClickHdl(LINK( this, XMLFilterSettingsDialog, ClickHdl_Impl ) );
+ m_pPBOpen->SetClickHdl(LINK( this, XMLFilterSettingsDialog, ClickHdl_Impl ) );
+ m_pPBClose->SetClickHdl(LINK( this, XMLFilterSettingsDialog, ClickHdl_Impl ) );
try
{
@@ -103,7 +97,7 @@ XMLFilterSettingsDialog::XMLFilterSettingsDialog( Window* pParent, ResMgr& rResM
Reference< XConfigManager > xCfgMgr( mxMSF->createInstance(OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.config.SpecialConfigManager" )) ), UNO_QUERY );
if( xCfgMgr.is() )
{
- sTemplatePath = xCfgMgr->substituteVariables( sTemplatePath );
+ m_sTemplatePath = xCfgMgr->substituteVariables( m_sTemplatePath );
}
}
catch(const Exception&)
@@ -114,47 +108,40 @@ XMLFilterSettingsDialog::XMLFilterSettingsDialog( Window* pParent, ResMgr& rResM
// -----------------------------------------------------------------------
-XMLFilterSettingsDialog::~XMLFilterSettingsDialog()
-{
- delete mpFilterListBox;
-}
-
-// -----------------------------------------------------------------------
-
IMPL_LINK(XMLFilterSettingsDialog, ClickHdl_Impl, PushButton *, pButton )
{
- mbIsClosable = false;
+ m_bIsClosable = false;
- if( &maPBNew == pButton )
+ if (m_pPBNew == pButton)
{
onNew();
}
- else if( &maPBEdit == pButton )
+ else if (m_pPBEdit == pButton)
{
onEdit();
}
- else if( &maPBTest == pButton )
+ else if (m_pPBTest == pButton)
{
onTest();
}
- else if( &maPBDelete == pButton )
+ else if (m_pPBDelete == pButton)
{
onDelete();
}
- else if( &maPBSave == pButton )
+ else if (m_pPBSave == pButton)
{
onSave();
}
- else if( &maPBOpen == pButton )
+ else if (m_pPBOpen == pButton)
{
onOpen();
}
- else if( &maPBClose == pButton )
+ else if (m_pPBClose == pButton)
{
onClose();
}
- mbIsClosable = true;
+ m_bIsClosable = true;
return 0;
}
@@ -176,32 +163,31 @@ IMPL_LINK_NOARG(XMLFilterSettingsDialog, DoubleClickHdl_Impl)
bool XMLFilterSettingsDialog::isClosable()
{
- return mbIsClosable;
+ return m_bIsClosable;
}
// -----------------------------------------------------------------------
-void XMLFilterSettingsDialog::ShowWindow()
+short XMLFilterSettingsDialog::Execute()
{
- maCtrlFilterList.GrabFocus();
+ m_pCtrlFilterList->GrabFocus();
disposeFilterList();
- mpFilterListBox->Clear();
+ m_pFilterListBox->Clear();
initFilterList();
updateStates();
- mpFilterListBox->Reset();
- WorkWindow::Show( sal_True );
+ return Dialog::Execute();
}
// -----------------------------------------------------------------------
void XMLFilterSettingsDialog::updateStates()
{
- SvTreeListEntry* pSelectedEntry = mpFilterListBox->FirstSelected();
+ SvTreeListEntry* pSelectedEntry = m_pFilterListBox->FirstSelected();
bool bHasSelection = pSelectedEntry != NULL;
- bool bMultiSelection = bHasSelection && (mpFilterListBox->NextSelected( pSelectedEntry ) != NULL );
+ bool bMultiSelection = bHasSelection && (m_pFilterListBox->NextSelected( pSelectedEntry ) != NULL );
bool bIsReadonly = false;
bool bIsDefault = false;
if(pSelectedEntry)
@@ -221,10 +207,10 @@ void XMLFilterSettingsDialog::updateStates()
++nFact;
}
}
- maPBEdit.Enable( bHasSelection && !bMultiSelection && !bIsReadonly);
- maPBTest.Enable( bHasSelection && !bMultiSelection );
- maPBDelete.Enable( bHasSelection && !bMultiSelection && !bIsReadonly && !bIsDefault);
- maPBSave.Enable( bHasSelection );
+ m_pPBEdit->Enable( bHasSelection && !bMultiSelection && !bIsReadonly);
+ m_pPBTest->Enable( bHasSelection && !bMultiSelection );
+ m_pPBDelete->Enable( bHasSelection && !bMultiSelection && !bIsReadonly && !bIsDefault);
+ m_pPBSave->Enable( bHasSelection );
}
// -----------------------------------------------------------------------
@@ -248,7 +234,7 @@ void XMLFilterSettingsDialog::onNew()
aTempInfo.maDocumentService = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.TextDocument" ));
// execute XML Filter Dialog
- XMLFilterTabDialog aDlg( this, *mpResMgr, mxMSF, &aTempInfo );
+ XMLFilterTabDialog aDlg( this, *getXSLTDialogResMgr(), mxMSF, &aTempInfo );
if ( aDlg.Execute() == RET_OK )
{
// insert the new filter
@@ -262,14 +248,14 @@ void XMLFilterSettingsDialog::onNew()
void XMLFilterSettingsDialog::onEdit()
{
// get selected filter entry
- SvTreeListEntry* pEntry = mpFilterListBox->FirstSelected();
+ SvTreeListEntry* pEntry = m_pFilterListBox->FirstSelected();
if( pEntry )
{
// get its filter info
filter_info_impl* pOldInfo = (filter_info_impl*)pEntry->GetUserData();
// execute XML Filter Dialog
- XMLFilterTabDialog aDlg( this, *mpResMgr, mxMSF, pOldInfo );
+ XMLFilterTabDialog aDlg( this, *getXSLTDialogResMgr(), mxMSF, pOldInfo );
if ( aDlg.Execute() == RET_OK )
{
filter_info_impl* pNewInfo = aDlg.getNewFilterInfo();
@@ -497,12 +483,12 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi
// check if we need to copy the template
if( !pFilterEntry->maImportTemplate.isEmpty() )
{
- if( !pFilterEntry->maImportTemplate.matchIgnoreAsciiCase( sTemplatePath ) )
+ if( !pFilterEntry->maImportTemplate.matchIgnoreAsciiCase( m_sTemplatePath ) )
{
INetURLObject aSourceURL( pFilterEntry->maImportTemplate );
if( !aSourceURL.GetName().isEmpty() )
{
- OUString aDestURL( sTemplatePath );
+ OUString aDestURL( m_sTemplatePath );
aDestURL += pFilterEntry->maFilterName;
aDestURL += OUString( sal_Unicode('/') );
if( createDirectory( aDestURL ) )
@@ -607,16 +593,16 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi
aValues[0].Value <<= pFilterEntry->maInterfaceName;
aValues[1].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "ClipboardFormat" ) );
OUString aDocType;
- if( !pFilterEntry->maDocType.match( sDocTypePrefix ) )
+ if( !pFilterEntry->maDocType.match( m_sDocTypePrefix ) )
{
- aDocType = sDocTypePrefix;
+ aDocType = m_sDocTypePrefix;
aDocType += pFilterEntry->maDocType;
}
else
{
aDocType = pFilterEntry->maDocType;
}
- if (aDocType == sDocTypePrefix)
+ if (aDocType == m_sDocTypePrefix)
aValues[1].Value <<= OUString();
else
aValues[1].Value <<= aDocType;
@@ -628,7 +614,7 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi
aValues[3].Value <<= createExtensionsSequence( pFilterEntry->maExtension );
// the detect service will only be registered, if a doctype/search token was specified
- if (aDocType.getLength() > sDocTypePrefix.getLength())
+ if (aDocType.getLength() > m_sDocTypePrefix.getLength())
{
aValues.realloc(5);
aValues[4].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "DetectService" ) );
@@ -774,11 +760,11 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi
{
if( pOldInfo )
{
- mpFilterListBox->changeEntry( pFilterEntry );
+ m_pFilterListBox->changeEntry( pFilterEntry );
}
else
{
- mpFilterListBox->addFilterEntry( pFilterEntry );
+ m_pFilterListBox->addFilterEntry( pFilterEntry );
maFilterVector.push_back( pFilterEntry );
}
}
@@ -792,12 +778,12 @@ bool XMLFilterSettingsDialog::insertOrEdit( filter_info_impl* pNewInfo, const fi
void XMLFilterSettingsDialog::onTest()
{
// get the first selected filter
- SvTreeListEntry* pEntry = mpFilterListBox->FirstSelected();
+ SvTreeListEntry* pEntry = m_pFilterListBox->FirstSelected();
if( pEntry )
{
filter_info_impl* pInfo = (filter_info_impl*)pEntry->GetUserData();
- XMLFilterTestDialog aDlg( this, *mpResMgr, mxMSF );
+ XMLFilterTestDialog aDlg( this, *getXSLTDialogResMgr(), mxMSF );
aDlg.test( *pInfo );
}
}
@@ -806,7 +792,7 @@ void XMLFilterSettingsDialog::onTest()
void XMLFilterSettingsDialog::onDelete()
{
- SvTreeListEntry* pEntry = mpFilterListBox->FirstSelected();
+ SvTreeListEntry* pEntry = m_pFilterListBox->FirstSelected();
if( pEntry )
{
filter_info_impl* pInfo = (filter_info_impl*)pEntry->GetUserData();
@@ -876,7 +862,7 @@ void XMLFilterSettingsDialog::onDelete()
xFlushable->flush();
// now remove entry from ui
- mpFilterListBox->RemoveSelection();
+ m_pFilterListBox->RemoveSelection();
// and delete the filter entry
maFilterVector.erase(std::find( maFilterVector.begin(), maFilterVector.end(), pInfo ));
@@ -902,12 +888,12 @@ void XMLFilterSettingsDialog::onSave()
int nFilters = 0;
- SvTreeListEntry* pEntry = mpFilterListBox->FirstSelected();
+ SvTreeListEntry* pEntry = m_pFilterListBox->FirstSelected();
while( pEntry )
{
filter_info_impl* pInfo = (filter_info_impl*)pEntry->GetUserData();
aFilters.push_back( pInfo );
- pEntry = mpFilterListBox->NextSelected( pEntry );
+ pEntry = m_pFilterListBox->NextSelected( pEntry );
nFilters++;
}
@@ -1030,7 +1016,7 @@ void XMLFilterSettingsDialog::onClose()
long XMLFilterSettingsDialog::Notify( NotifyEvent& rNEvt )
{
// Zuerst Basisklasse rufen wegen TabSteuerung
- long nRet = WorkWindow::Notify( rNEvt );
+ long nRet = Dialog::Notify( rNEvt );
if ( !nRet )
{
if ( rNEvt.GetType() == EVENT_KEYINPUT )
@@ -1062,7 +1048,7 @@ void XMLFilterSettingsDialog::disposeFilterList()
}
maFilterVector.clear();
- mpFilterListBox->Clear();
+ m_pFilterListBox->Clear();
}
// -----------------------------------------------------------------------
@@ -1184,8 +1170,8 @@ void XMLFilterSettingsDialog::initFilterList()
OUString aDocType;
pValues2->Value >>= aDocType;
- if( aDocType.match( sDocTypePrefix ) )
- aDocType = aDocType.copy( sDocTypePrefix.getLength() );
+ if( aDocType.match( m_sDocTypePrefix ) )
+ aDocType = aDocType.copy( m_sDocTypePrefix.getLength() );
pTempFilter->maDocType = aDocType;
}
@@ -1229,7 +1215,7 @@ void XMLFilterSettingsDialog::initFilterList()
// add entry to internal container and to ui filter list box
maFilterVector.push_back( pTempFilter );
- mpFilterListBox->addFilterEntry( pTempFilter );
+ m_pFilterListBox->addFilterEntry( pTempFilter );
pTempFilter = new filter_info_impl;
@@ -1244,9 +1230,9 @@ void XMLFilterSettingsDialog::initFilterList()
delete pTempFilter;
}
- SvTreeListEntry* pEntry = mpFilterListBox->GetEntry( 0 );
+ SvTreeListEntry* pEntry = m_pFilterListBox->GetEntry( 0 );
if( pEntry )
- mpFilterListBox->Select( pEntry );
+ m_pFilterListBox->Select( pEntry );
}
// -----------------------------------------------------------------------
@@ -1371,83 +1357,88 @@ OUString getApplicationUIName( const OUString& rServiceName )
}
}
-// -----------------------------------------------------------------------
+SvxPathControl::SvxPathControl(Window* pParent)
+ : VclVBox(pParent)
+ , bHasBeenShown(false)
+{
+ m_pHeaderBar = new HeaderBar(this, WB_BOTTOMBORDER);
+ m_pHeaderBar->set_height_request(16);
-ResMgr* getXSLTDialogResMgr()
+ m_pFocusCtrl = new XMLFilterListBox(this);
+ m_pFocusCtrl->set_fill(true);
+ m_pFocusCtrl->set_expand(true);
+}
+
+#define ITEMID_NAME 1
+#define ITEMID_TYPE 2
+
+void SvxPathControl::setAllocation(const Size &rAllocation)
{
- return XMLFilterSettingsDialog::mpResMgr;
+ VclVBox::setAllocation(rAllocation);
+
+ if (!bHasBeenShown)
+ bHasBeenShown = IsReallyShown();
+
+ if (!bHasBeenShown)
+ {
+ std::vector<long> aWidths;
+ m_pFocusCtrl->getPreferredDimensions(aWidths);
+ long nFirstColumnWidth = aWidths[1];
+ m_pHeaderBar->SetItemSize(ITEMID_NAME, nFirstColumnWidth);
+ m_pHeaderBar->SetItemSize(ITEMID_TYPE, 0xFFFF);
+ long nTabs[] = {2, 0, nFirstColumnWidth};
+ m_pFocusCtrl->SetTabs(&nTabs[0], MAP_PIXEL);
+ }
}
-// -----------------------------------------------------------------------
+SvxPathControl::~SvxPathControl()
+{
+ delete m_pFocusCtrl;
+ delete m_pHeaderBar;
+}
-// -----------------------------------------------------------------------
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxPathControl(Window *pParent, VclBuilder::stringmap &)
+{
+ return new SvxPathControl(pParent);
+}
-long SvxPathControl_Impl::Notify( NotifyEvent& rNEvt )
+long SvxPathControl::Notify(NotifyEvent& rNEvt)
{
- long nRet = Control::Notify( rNEvt );
+ long nRet = VclVBox::Notify(rNEvt);
if ( m_pFocusCtrl && rNEvt.GetWindow() != m_pFocusCtrl && rNEvt.GetType() == EVENT_GETFOCUS )
m_pFocusCtrl->GrabFocus();
+
return nRet;
}
-#define ITEMID_NAME 1
-#define ITEMID_TYPE 2
-
-XMLFilterListBox::XMLFilterListBox( SvxPathControl_Impl * pParent )
-: SvTabListBox( pParent, WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP ),
- mbFirstPaint( true )
+XMLFilterListBox::XMLFilterListBox(SvxPathControl* pParent)
+ : SvTabListBox(pParent, WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP)
+ , mbFirstPaint(true)
+ , m_pHeaderBar(pParent->getHeaderBar())
{
Size aBoxSize( pParent->GetOutputSizePixel() );
- mpHeaderBar = new HeaderBar( pParent, /*WB_BUTTONSTYLE | */ WB_BOTTOMBORDER );
- mpHeaderBar->SetPosSizePixel( Point( 0, 0 ), Size( aBoxSize.Width(), 16 ) );
- mpHeaderBar->SetEndDragHdl( LINK( this, XMLFilterListBox, HeaderEndDrag_Impl ) );
+ m_pHeaderBar->SetEndDragHdl( LINK( this, XMLFilterListBox, HeaderEndDrag_Impl ) );
OUString aStr1(RESIDSTR(STR_COLUMN_HEADER_NAME));
OUString aStr2(RESIDSTR(STR_COLUMN_HEADER_TYPE));
long nTabSize = aBoxSize.Width() / 2;
- mpHeaderBar->InsertItem( ITEMID_NAME, aStr1, nTabSize,
+ m_pHeaderBar->InsertItem( ITEMID_NAME, aStr1, nTabSize,
HIB_LEFT | HIB_VCENTER );
- mpHeaderBar->InsertItem( ITEMID_TYPE, aStr2, nTabSize,
+ m_pHeaderBar->InsertItem( ITEMID_TYPE, aStr2, nTabSize,
HIB_LEFT | HIB_VCENTER );
- static long nTabs[] = {3, 0, nTabSize, 2*nTabSize };
- Size aHeadSize( mpHeaderBar->GetSizePixel() );
+ static long nTabs[] = {2, 0, nTabSize };
- pParent->SetFocusControl( this );
-// SetDoubleClickHdl( aLink );
-// SetSelectHdl( LINK( this, SvxPathTabPage, PathSelect_Impl ) );
SetSelectionMode( MULTIPLE_SELECTION );
- SetPosSizePixel( Point( 0, aHeadSize.Height() ), Size( aBoxSize.Width(), aBoxSize.Height() - aHeadSize.Height() ) );
SetTabs( &nTabs[0], MAP_PIXEL );
SetScrolledHdl( LINK( this, XMLFilterListBox, TabBoxScrollHdl_Impl ) );
SetHighlightRange();
-// SetHelpId( HID_OPTPATH_CTL_PATH );
-// mpHeaderBar->SetHelpId( HID_OPTPATH_HEADERBAR );
Show();
- mpHeaderBar->Show();
-}
-
-// -----------------------------------------------------------------------
-
-XMLFilterListBox::~XMLFilterListBox()
-{
- delete mpHeaderBar;
-}
-
-// -----------------------------------------------------------------------
-
-void XMLFilterListBox::Reset()
-{
- Size aBoxSize( Window::GetParent()->GetOutputSizePixel() );
- long nTabSize = aBoxSize.Width() / 2;
- static long nTabs[] = {3, 0, nTabSize, 2*nTabSize };
- SetTabs( &nTabs[0], MAP_PIXEL );
- mpHeaderBar->SetItemSize( ITEMID_NAME, nTabSize );
- mpHeaderBar->SetItemSize( ITEMID_TYPE, nTabSize );
+ m_pHeaderBar->Show();
}
// -----------------------------------------------------------------------
@@ -1465,7 +1456,7 @@ void XMLFilterListBox::Paint( const Rectangle& rRect )
IMPL_LINK( XMLFilterListBox, TabBoxScrollHdl_Impl, SvTabListBox*, /* pList */ )
{
- mpHeaderBar->SetOffset( -GetXOffset() );
+ m_pHeaderBar->SetOffset( -GetXOffset() );
return 0;
}
@@ -1476,22 +1467,22 @@ IMPL_LINK( XMLFilterListBox, HeaderEndDrag_Impl, HeaderBar*, pBar )
if ( pBar && !pBar->GetCurItemId() )
return 0;
- if ( !mpHeaderBar->IsItemMode() )
+ if ( !m_pHeaderBar->IsItemMode() )
{
Size aSz;
- sal_uInt16 nTabs = mpHeaderBar->GetItemCount();
+ sal_uInt16 nTabs = m_pHeaderBar->GetItemCount();
long nTmpSz = 0;
- long nWidth = mpHeaderBar->GetItemSize(ITEMID_NAME);
- long nBarWidth = mpHeaderBar->GetSizePixel().Width();
+ long nWidth = m_pHeaderBar->GetItemSize(ITEMID_NAME);
+ long nBarWidth = m_pHeaderBar->GetSizePixel().Width();
if(nWidth < 30)
- mpHeaderBar->SetItemSize( ITEMID_TYPE, 30);
+ m_pHeaderBar->SetItemSize( ITEMID_TYPE, 30);
else if ( ( nBarWidth - nWidth ) < 30 )
- mpHeaderBar->SetItemSize( ITEMID_TYPE, nBarWidth - 30 );
+ m_pHeaderBar->SetItemSize( ITEMID_TYPE, nBarWidth - 30 );
for ( sal_uInt16 i = 1; i <= nTabs; ++i )
{
- long nW = mpHeaderBar->GetItemSize(i);
+ long nW = m_pHeaderBar->GetItemSize(i);
aSz.Width() = nW + nTmpSz;
nTmpSz += nW;
SetTab( i, PixelToLogic( aSz, MapMode(MAP_APPFONT) ).Width(), MAP_APPFONT );
@@ -1533,7 +1524,6 @@ String XMLFilterListBox::getEntryString( const filter_info_impl* pInfo ) const
{
String aEntryStr( pInfo->maFilterName );
aEntryStr += '\t';
- // aEntryStr += String( getApplicationUIName( pInfo->maDocumentService ) );
if ( !pInfo->maExportService.isEmpty() )
aEntryStr += String( getApplicationUIName( pInfo->maExportService ) );
else
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.hrc b/filter/source/xsltdialog/xmlfiltersettingsdialog.hrc
deleted file mode 100644
index 3f10ab5c8812..000000000000
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.hrc
+++ /dev/null
@@ -1,34 +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 .
- */
-
-#ifndef _XMLFILTERSETTINGSDIALOG_HRC_
-#define _XMLFILTERSETTINGSDIALOG_HRC_
-
-#include "xmlfiltercommon.hrc"
-
-#define CTRL_XML_FILTER_LIST 1
-#define PB_XML_FILTER_NEW 2
-#define PB_XML_FILTER_EDIT 3
-#define PB_XML_FILTER_TEST 4
-#define PB_XML_FILTER_DELETE 5
-#define PB_XML_FILTER_SAVE 6
-#define PB_XML_FILTER_OPEN 7
-#define BTN_XML_FILTER_HELP 8
-#define PB_XML_FILTER_CLOSE 9
-#define STR_XML_FILTER_LISTBOX 10
-#endif
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx
index 57330ef6b0fe..006d4e0544ec 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.hxx
@@ -23,9 +23,9 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/container/XHierarchicalName.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
-#include <vcl/wrkwin.hxx>
-
#include <vcl/button.hxx>
+#include <vcl/dialog.hxx>
+#include <vcl/layout.hxx>
#include <svtools/svtabbx.hxx>
#include <svl/poolitem.hxx>
#include <unotools/moduleoptions.hxx>
@@ -34,16 +34,22 @@
// --------------------------------------------------------------------
-class SvxPathControl_Impl : public Control
+class HeaderBar;
+class XMLFilterListBox;
+
+class SvxPathControl : public VclVBox
{
private:
- Control* m_pFocusCtrl;
-
+ bool bHasBeenShown;
+ HeaderBar* m_pHeaderBar;
+ XMLFilterListBox* m_pFocusCtrl;
+protected:
+ virtual void setAllocation(const Size &rAllocation);
public:
- SvxPathControl_Impl( Window* pParent, const ResId& rId ) :
- Control( pParent, rId ), m_pFocusCtrl( NULL ) {}
-
- void SetFocusControl( Control* pCtrl ) { m_pFocusCtrl = pCtrl; }
+ SvxPathControl(Window* pParent);
+ HeaderBar* getHeaderBar() { return m_pHeaderBar; }
+ XMLFilterListBox* getListBox() { return m_pFocusCtrl; }
+ ~SvxPathControl();
virtual long Notify( NotifyEvent& rNEvt );
};
@@ -56,7 +62,7 @@ class XMLFilterListBox : public SvTabListBox
{
private:
bool mbFirstPaint;
- HeaderBar* mpHeaderBar;
+ HeaderBar* m_pHeaderBar;
DECL_LINK( TabBoxScrollHdl_Impl, SvTabListBox* );
DECL_LINK( HeaderEndDrag_Impl, HeaderBar* );
@@ -64,10 +70,7 @@ private:
String getEntryString( const filter_info_impl* pInfo ) const;
public:
- XMLFilterListBox( SvxPathControl_Impl* pParent );
- ~XMLFilterListBox();
-
- void Reset();
+ XMLFilterListBox(SvxPathControl* pParent);
/** adds a new filter info entry to the ui filter list */
void addFilterEntry( const filter_info_impl* pInfo );
@@ -79,17 +82,17 @@ public:
// --------------------------------------------------------------------
-class XMLFilterSettingsDialog : public WorkWindow
+class XMLFilterSettingsDialog : public Dialog
{
public:
- XMLFilterSettingsDialog( Window* pParent, ResMgr& rResMgr, const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rxMSF );
- virtual ~XMLFilterSettingsDialog();
+ XMLFilterSettingsDialog(Window* pParent,
+ const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rxMSF);
DECL_LINK(ClickHdl_Impl, PushButton * );
DECL_LINK(SelectionChangedHdl_Impl, void * );
DECL_LINK(DoubleClickHdl_Impl, void * );
- void ShowWindow();
+ virtual short Execute();
void onNew();
void onEdit();
@@ -105,8 +108,6 @@ public:
bool isClosable();
- static ResMgr* mpResMgr;
-
private:
void initFilterList();
void disposeFilterList();
@@ -126,21 +127,20 @@ private:
std::vector< filter_info_impl* > maFilterVector;
- XMLFilterListBox* mpFilterListBox;
- SvxPathControl_Impl maCtrlFilterList;
- PushButton maPBNew;
- PushButton maPBEdit;
- PushButton maPBTest;
- PushButton maPBDelete;
- PushButton maPBSave;
- PushButton maPBOpen;
- HelpButton maPBHelp;
- PushButton maPBClose;
-
- bool mbIsClosable;
-
- ::rtl::OUString sTemplatePath;
- ::rtl::OUString sDocTypePrefix;
+ XMLFilterListBox* m_pFilterListBox;
+ SvxPathControl* m_pCtrlFilterList;
+ PushButton* m_pPBNew;
+ PushButton* m_pPBEdit;
+ PushButton* m_pPBTest;
+ PushButton* m_pPBDelete;
+ PushButton* m_pPBSave;
+ PushButton* m_pPBOpen;
+ PushButton* m_pPBClose;
+
+ bool m_bIsClosable;
+
+ OUString m_sTemplatePath;
+ OUString m_sDocTypePrefix;
SvtModuleOptions maModuleOpt;
};
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.src b/filter/source/xsltdialog/xmlfiltersettingsdialog.src
deleted file mode 100644
index 77d1d789f61b..000000000000
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.src
+++ /dev/null
@@ -1,123 +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 .
- */
-
-#include "xmlfiltersettingsdialog.hrc"
-#include "xmlfilterhelpids.hrc"
-
-#define BUTTONS_LEFT 248
-#define BUTTONS_TOP 6
-#define BUTTONS_SPACEING 3
-#define BUTTONS_WIDTH 66
-#define BUTTONS_HEIGHT 14
-
-WorkWindow DLG_XML_FILTER_SETTINGS_DIALOG
-{
- Size = MAP_APPFONT( 320, 154 );
- HelpId = HID_XML_FILTER_SETTINGS_DIALOG;
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Sizeable = FALSE;
- DialogControl = TRUE ;
- Text [ en-US ] = "XML Filter Settings" ;
-
- Control CTRL_XML_FILTER_LIST
- {
- Pos = MAP_APPFONT ( 6 , 6 ) ;
- Size = MAP_APPFONT ( 235 , 142 );
- Border = TRUE ;
- TabStop = TRUE ;
- };
-
- PushButton PB_XML_FILTER_NEW
- {
- Pos = MAP_APPFONT ( BUTTONS_LEFT , BUTTONS_TOP + 0 * BUTTONS_HEIGHT + 0 * BUTTONS_SPACEING ) ;
- Size = MAP_APPFONT ( BUTTONS_WIDTH , BUTTONS_HEIGHT ) ;
- HelpId = HID_XML_FILTER_NEW;
- TabStop = TRUE ;
- Text [ en-US ] = "~New...";
- };
-
- PushButton PB_XML_FILTER_EDIT
- {
- Pos = MAP_APPFONT ( BUTTONS_LEFT , BUTTONS_TOP + 1 * BUTTONS_HEIGHT + 1 * BUTTONS_SPACEING ) ;
- Size = MAP_APPFONT ( BUTTONS_WIDTH , BUTTONS_HEIGHT ) ;
- HelpId = HID_XML_FILTER_EDIT;
- TabStop = TRUE ;
- Text [ en-US ] = "~Edit...";
- };
-
- PushButton PB_XML_FILTER_TEST
- {
- Pos = MAP_APPFONT ( BUTTONS_LEFT , BUTTONS_TOP + 2 * BUTTONS_HEIGHT + 2 * BUTTONS_SPACEING ) ;
- Size = MAP_APPFONT ( BUTTONS_WIDTH , BUTTONS_HEIGHT ) ;
- HelpId = HID_XML_FILTER_TEST;
- TabStop = TRUE ;
- Text [ en-US ] = "~Test XSLTs...";
- };
-
- PushButton PB_XML_FILTER_DELETE
- {
- Pos = MAP_APPFONT ( BUTTONS_LEFT , BUTTONS_TOP + 3 * BUTTONS_HEIGHT + 4 * BUTTONS_SPACEING ) ;
- Size = MAP_APPFONT ( BUTTONS_WIDTH , BUTTONS_HEIGHT ) ;
- HelpId = HID_XML_FILTER_DELETE;
- TabStop = TRUE ;
- Text [ en-US ] = "~Delete...";
- };
-
- PushButton PB_XML_FILTER_SAVE
- {
- Pos = MAP_APPFONT ( BUTTONS_LEFT , BUTTONS_TOP + 4 * BUTTONS_HEIGHT + 6 * BUTTONS_SPACEING ) ;
- Size = MAP_APPFONT ( BUTTONS_WIDTH , BUTTONS_HEIGHT ) ;
- HelpId = HID_XML_FILTER_SAVE;
- TabStop = TRUE ;
- Text [ en-US ] = "~Save as Package...";
- };
-
- PushButton PB_XML_FILTER_OPEN
- {
- Pos = MAP_APPFONT ( BUTTONS_LEFT , BUTTONS_TOP + 5 * BUTTONS_HEIGHT + 7 * BUTTONS_SPACEING ) ;
- Size = MAP_APPFONT ( BUTTONS_WIDTH , BUTTONS_HEIGHT ) ;
- HelpId = HID_XML_FILTER_OPEN;
- TabStop = TRUE ;
- Text [ en-US ] = "~Open Package...";
- TabStop = TRUE ;
- };
-
- HelpButton BTN_XML_FILTER_HELP
- {
- Pos = MAP_APPFONT ( BUTTONS_LEFT, BUTTONS_TOP + 6 * BUTTONS_HEIGHT + 9 * BUTTONS_SPACEING );
- Size = MAP_APPFONT ( BUTTONS_WIDTH, BUTTONS_HEIGHT );
- };
-
- PushButton PB_XML_FILTER_CLOSE
- {
- Pos = MAP_APPFONT ( BUTTONS_LEFT , BUTTONS_TOP + 7 * BUTTONS_HEIGHT + 10 * BUTTONS_SPACEING ) ;
- Size = MAP_APPFONT ( BUTTONS_WIDTH , BUTTONS_HEIGHT ) ;
- HelpId = HID_XML_FILTER_CLOSE;
- TabStop = TRUE ;
- Text [ en-US ] = "~Close";
- };
-
- String STR_XML_FILTER_LISTBOX
- {
- Text [ en-US ] = "XML Filter List";
- };
-
-};
diff --git a/filter/source/xsltdialog/xmlfiltertabdialog.cxx b/filter/source/xsltdialog/xmlfiltertabdialog.cxx
index ddd50412d916..a9152ddfd076 100644
--- a/filter/source/xsltdialog/xmlfiltertabdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertabdialog.cxx
@@ -31,7 +31,6 @@
#include "xmlfiltertabpagebasic.hxx"
#include "xmlfiltertabpagexslt.hxx"
#include "xmlfiltersettingsdialog.hxx"
-#include "xmlfiltersettingsdialog.hrc"
#include "xmlfilterhelpids.hrc"
using namespace com::sun::star::uno;
diff --git a/filter/uiconfig/ui/xmlfiltersettings.ui b/filter/uiconfig/ui/xmlfiltersettings.ui
new file mode 100644
index 000000000000..6b95c7e6db5c
--- /dev/null
+++ b/filter/uiconfig/ui/xmlfiltersettings.ui
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkDialog" id="XMLFilterSettingsDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">5</property>
+ <property name="title" translatable="yes">XML Filter Settings</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="can_focus">False</property>
+ <property name="spacing">2</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="homogeneous">True</property>
+ <property name="layout_style">start</property>
+ <child>
+ <object class="GtkButton" id="new">
+ <property name="label">_New...</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="edit">
+ <property name="label">_Edit...</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="test">
+ <property name="label">_Test XSLTs...</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="delete">
+ <property name="label">_Delete...</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="save">
+ <property name="label">_Save as Package...</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="open">
+ <property name="label">_Open Package...</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="help">
+ <property name="label">gtk-help</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">6</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="close">
+ <property name="label">gtk-close</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">8</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="xsltdlglo:SvxPathControl" id="filterlist">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="height_request">100</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">new</action-widget>
+ <action-widget response="0">edit</action-widget>
+ <action-widget response="0">test</action-widget>
+ <action-widget response="0">delete</action-widget>
+ <action-widget response="0">save</action-widget>
+ <action-widget response="0">open</action-widget>
+ <action-widget response="0">help</action-widget>
+ <action-widget response="0">close</action-widget>
+ </action-widgets>
+ </object>
+</interface>