summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Jentsch <pjotr@guineapics.de>2011-10-18 21:59:49 +0200
committerPeter Jentsch <pjotr@guineapics.de>2011-10-18 22:14:10 +0200
commit11fbde8fed1a866c4ec9565d56f5f5034631d8b2 (patch)
tree8a9c9c0a26d283a32b539de1f3cf877925c10fd4
parent960f4bdd71c9de19059279d61abb142ddfdac0ce (diff)
support editing, importing, exporting the xslt transformer service setting
starting with LO 3.4 we default to using libxslt for xslt transformations in filters. the saxon/j based services is still available and can be explicitly requested by filters using the 2nd userdata entry in the filter configuration. There wasn't any place to edit this 2nd userdata entry, and it wasn't exported or imported with the custom filter packages.
-rw-r--r--filter/source/xsltdialog/typedetectionexport.cxx1
-rw-r--r--filter/source/xsltdialog/xmlfilterhelpids.hrc1
-rw-r--r--filter/source/xsltdialog/xmlfiltertabpagexslt.cxx7
-rw-r--r--filter/source/xsltdialog/xmlfiltertabpagexslt.hrc2
-rw-r--r--filter/source/xsltdialog/xmlfiltertabpagexslt.hxx3
-rw-r--r--filter/source/xsltdialog/xmlfiltertabpagexslt.src18
6 files changed, 32 insertions, 0 deletions
diff --git a/filter/source/xsltdialog/typedetectionexport.cxx b/filter/source/xsltdialog/typedetectionexport.cxx
index fb925b2c39a8..b6078838d227 100644
--- a/filter/source/xsltdialog/typedetectionexport.cxx
+++ b/filter/source/xsltdialog/typedetectionexport.cxx
@@ -194,6 +194,7 @@ void TypeDetectionExporter::doExport( Reference< XOutputStream > xOS, const XML
sValue += sComma;
sValue += sXSLTFilterService;
sValue += sDelim;
+ sValue += pFilter->maXSLTTransformerImpl;
sValue += sDelim;
const application_info_impl* pAppInfo = getApplicationInfo( pFilter->maExportService );
diff --git a/filter/source/xsltdialog/xmlfilterhelpids.hrc b/filter/source/xsltdialog/xmlfilterhelpids.hrc
index cced0609f5f4..8e6a34fdf05a 100644
--- a/filter/source/xsltdialog/xmlfilterhelpids.hrc
+++ b/filter/source/xsltdialog/xmlfilterhelpids.hrc
@@ -50,6 +50,7 @@
#define HID_XML_FILTER_DOCTYPE "FILTER_HID_XML_FILTER_DOCTYPE"
#define HID_XML_FILTER_DTD "FILTER_HID_XML_FILTER_DTD"
#define HID_XML_FILTER_DTD_BROWSE "FILTER_HID_XML_FILTER_DTD_BROWSE"
+#define HID_XML_FILTER_TRANSFORM_SERVICE "FILTER_HID_XML_FILTER_TRANSFORM_SERVICE"
#define HID_XML_FILTER_EXPORT_XSLT "FILTER_HID_XML_FILTER_EXPORT_XSLT"
#define HID_XML_FILTER_EXPORT_XSLT_BROWSE "FILTER_HID_XML_FILTER_EXPORT_XSLT_BROWSE"
#define HID_XML_FILTER_IMPORT_XSLT "FILTER_HID_XML_FILTER_IMPORT_XSLT"
diff --git a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
index c5ebd3b2591f..abb30518c526 100644
--- a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
+++ b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
@@ -68,6 +68,9 @@ XMLFilterTabPageXSLT::XMLFilterTabPageXSLT( Window* pParent, ResMgr& rResMgr, co
maEDImportTemplate( this, ResId( ED_XML_IMPORT_TEMPLATE, rResMgr ), INET_PROT_FILE ),
maPBImportTemplate( this, ResId( PB_XML_IMPORT_TEMPLATE_BROWSE, rResMgr ) ),
+ maFTTransformationService( this, ResId (FT_XML_TRANSFORM_SERVICE, rResMgr ) ),
+ maEDTransformationService( this, ResId (ED_XML_TRANSFORM_SERVICE, rResMgr ) ),
+
sHTTPSchema( RTL_CONSTASCII_USTRINGPARAM( "http://" ) ),
sSHTTPSchema( RTL_CONSTASCII_USTRINGPARAM( "shttp://" ) ),
sFILESchema( RTL_CONSTASCII_USTRINGPARAM( "file://" ) ),
@@ -96,6 +99,7 @@ XMLFilterTabPageXSLT::XMLFilterTabPageXSLT( Window* pParent, ResMgr& rResMgr, co
maEDExportXSLT.SetHelpId( HID_XML_FILTER_EXPORT_XSLT );
maEDImportXSLT.SetHelpId( HID_XML_FILTER_IMPORT_XSLT );
maEDImportTemplate.SetHelpId( HID_XML_FILTER_IMPORT_TEMPLATE );
+ maEDTransformationService.SetHelpId( HID_XML_FILTER_TRANSFORM_SERVICE );
}
XMLFilterTabPageXSLT::~XMLFilterTabPageXSLT()
@@ -111,6 +115,7 @@ bool XMLFilterTabPageXSLT::FillInfo( filter_info_impl* pInfo )
pInfo->maExportXSLT = GetURL( maEDExportXSLT );
pInfo->maImportXSLT = GetURL( maEDImportXSLT );
pInfo->maImportTemplate = GetURL( maEDImportTemplate );
+ pInfo->maXSLTTransformerImpl = maEDTransformationService.GetText();
}
return true;
@@ -126,6 +131,8 @@ void XMLFilterTabPageXSLT::SetInfo(const filter_info_impl* pInfo)
SetURL( maEDExportXSLT, pInfo->maExportXSLT );
SetURL( maEDImportXSLT, pInfo->maImportXSLT );
SetURL( maEDImportTemplate, pInfo->maImportTemplate );
+
+ maEDTransformationService.SetText( pInfo->maXSLTTransformerImpl );
}
}
diff --git a/filter/source/xsltdialog/xmlfiltertabpagexslt.hrc b/filter/source/xsltdialog/xmlfiltertabpagexslt.hrc
index e5b768da6846..48fc5719b029 100644
--- a/filter/source/xsltdialog/xmlfiltertabpagexslt.hrc
+++ b/filter/source/xsltdialog/xmlfiltertabpagexslt.hrc
@@ -44,5 +44,7 @@
#define FT_XML_IMPORT_TEMPLATE 12
#define ED_XML_IMPORT_TEMPLATE 13
#define PB_XML_IMPORT_TEMPLATE_BROWSE 14
+#define FT_XML_TRANSFORM_SERVICE 15
+#define ED_XML_TRANSFORM_SERVICE 16
#endif
diff --git a/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx b/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx
index 7c1ce5c3baf9..64742f5e97ff 100644
--- a/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx
+++ b/filter/source/xsltdialog/xmlfiltertabpagexslt.hxx
@@ -69,6 +69,9 @@ public:
SvtURLBox maEDImportTemplate;
PushButton maPBImportTemplate;
+ FixedText maFTTransformationService;
+ Edit maEDTransformationService;
+
private:
void SetURL( SvtURLBox& rURLBox, const rtl::OUString& rURL );
rtl::OUString GetURL( SvtURLBox& rURLBox );
diff --git a/filter/source/xsltdialog/xmlfiltertabpagexslt.src b/filter/source/xsltdialog/xmlfiltertabpagexslt.src
index 43a5bb1a6f39..e86111265008 100644
--- a/filter/source/xsltdialog/xmlfiltertabpagexslt.src
+++ b/filter/source/xsltdialog/xmlfiltertabpagexslt.src
@@ -172,5 +172,23 @@ TabPage RID_XML_FILTER_TABPAGE_XSLT
HelpId = HID_XML_FILTER_IMPORT_TEMPLATE_BROWSE;
Text [ en-US ] = "Browse...";
};
+
+ // XSLT transformation service --------------------------------------------------------
+
+ FixedText FT_XML_TRANSFORM_SERVICE
+ {
+ Pos = MAP_APPFONT ( FIRST_ROW_X , FIRST_ROW_Y + 5 * ROW_HEIGHT + 5 * SPACING + FIXED_TEXT_OFFSET + EDIT_OFFSET ) ;
+ Size = MAP_APPFONT ( FIRST_ROW_WIDTH , 8 ) ;
+ Text [ en-US ] = "XSLT Tranformation Service";
+ };
+
+ Edit ED_XML_TRANSFORM_SERVICE
+ {
+ Pos = MAP_APPFONT ( SECOND_ROW_X , SECOND_ROW_Y + 5 * ROW_HEIGHT + 5 * SPACING + EDIT_OFFSET ) ;
+ Size = MAP_APPFONT ( SECOND_ROW_WIDTH - SPACING - BROWSE_WIDTH, 12 ) ;
+ HelpId = HID_XML_FILTER_TRANSFORM_SERVICE;
+ Border = TRUE;
+ };
+
};