summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--swext/mediawiki/build.xml17
-rw-r--r--swext/mediawiki/src/com/sun/star/wiki/EditPageParser.java86
-rw-r--r--swext/mediawiki/src/com/sun/star/wiki/Helper.java73
-rw-r--r--swext/mediawiki/src/com/sun/star/wiki/WikiEditSettingDialog.java6
-rw-r--r--swext/mediawiki/src/com/sun/star/wiki/WikiEditorImpl.java4
-rw-r--r--swext/mediawiki/src/description.xml4
-rw-r--r--swext/mediawiki/src/registry/data/org/openoffice/Office/Custom/WikiExtension.xcu6
-rw-r--r--swext/mediawiki/src/registry/data/org/openoffice/Office/Paths.xcu36
-rw-r--r--swext/mediawiki/src/registry/data/org/openoffice/Office/makefile.mk2
-rw-r--r--swext/mediawiki/src/registry/data/org/openoffice/TypeDetection/Filter.xcu56
-rw-r--r--swext/mediawiki/src/registry/data/org/openoffice/TypeDetection/Types.xcu44
-rw-r--r--swext/mediawiki/src/registry/data/org/openoffice/TypeDetection/makefile.mk50
-rw-r--r--swext/mediawiki/src/registry/schema/org/openoffice/Office/Custom/WikiExtension.xcs3
-rw-r--r--swext/mediawiki/src/uno-extension-manifest.xml6
-rw-r--r--swext/prj/build.lst5
15 files changed, 333 insertions, 65 deletions
diff --git a/swext/mediawiki/build.xml b/swext/mediawiki/build.xml
index b8246c6c2f8c..eb815b6df762 100644
--- a/swext/mediawiki/build.xml
+++ b/swext/mediawiki/build.xml
@@ -113,9 +113,13 @@
<copy todir="${out}/misc/${target}/package_tmp" overwrite="true" encoding="UTF-8">
<fileset dir="${out}/misc/${target}" includes="description.xml" casesensitive="yes"/>
<fileset dir="${out}/misc/${target}/registry/schema/org/openoffice/Office/Custom" includes="*.xcs" casesensitive="yes"/>
- <fileset dir="${out}/misc/${target}/registry/data/org/openoffice/Office" includes="ProtocolHandler.xcu" casesensitive="yes"/>
+ <fileset dir="${out}/misc/${target}/registry/data/org/openoffice/Office" includes="ProtocolHandler.xcu,Paths.xcu" casesensitive="yes"/>
<fileset dir="${out}/misc/${target}/merge/org/openoffice/Office/Custom" includes="*.xcu" casesensitive="yes"/>
<fileset dir="${out}/misc/${target}/merge/org/openoffice/Office" includes="*.xcu" casesensitive="yes"/>
+ <!-- FIXME: currently the build xcu files can not be used since the tag containing x-default attribute is thrown away, issue 99378
+ <fileset dir="${out}/misc/${target}/merge/org/openoffice/TypeDetection" includes="*.xcu" casesensitive="yes"/>
+ -->
+ <fileset dir="src/registry/data/org/openoffice/TypeDetection" includes="*.xcu" casesensitive="yes"/>
<fileset dir="${out}/misc/${target}" includes="help/component.txt" casesensitive="yes"/>
<filterset>
<filter token="WIKIEXTENSIONPRODUCTNAME" value="Wiki Publisher"/>
@@ -139,11 +143,13 @@
<zip destfile="${dist}/${name}.${ext}">
<fileset dir="${out}/misc/${target}/package_tmp" casesensitive="yes"/>
<fileset dir="${dist}" includes="${target}.jar" casesensitive="yes"/>
- <fileset dir="." includes="images/**,templates/**" casesensitive="yes"/>
<file file="${commons-codec-jar}"/>
<file file="${commons-httpclient-jar}"/>
<file file="${commons-lang-jar}"/>
<file file="${commons-logging-jar}"/>
+ <zipfileset file="${solar.bin}/xslt/export/wiki/odt2mediawiki.xsl" casesensitive="yes" fullpath="filter/odt2mediawiki.xsl"/>
+ <zipfileset file="${solar.bin}/xslt/export/wiki/mediawiki.ott" casesensitive="yes" fullpath="templates/MediaWiki/mediawiki.ott"/>
+ <zipfileset dir="${solar.bin}/xslt/export/xsltml" casesensitive="yes" prefix="filter/math"/>
<zipfileset dir="src" includes="uno-extension-manifest.xml" casesensitive="yes" fullpath="META-INF/manifest.xml"/>
<zipfileset dir="dialogs" includes="**/*.xdl,**/*.xba,**/*.xlb" casesensitive="yes" prefix="WikiEditor"/>
<zipfileset dir="${out}/misc/${target}/license" includes="LICENSE*" casesensitive="yes" prefix="license"/>
@@ -155,12 +161,15 @@
<delete file="${dist}/${target}_develop.zip"/>
<zip destfile="${dist}/${target}_develop.zip">
<fileset dir="${dist}" includes="${target}.jar" casesensitive="yes"/>
- <fileset dir="." includes="images/**,templates/**" casesensitive="yes"/>
<fileset dir="${out}/misc/${target}" includes="description.xml" casesensitive="yes"/>
<fileset dir="${out}/misc/${target}/registry/schema/org/openoffice/Office/Custom" includes="*.xcs" casesensitive="yes"/>
- <fileset dir="${out}/misc/${target}/registry/data/org/openoffice/Office" includes="ProtocolHandler.xcu" casesensitive="yes"/>
+ <fileset dir="${out}/misc/${target}/registry/data/org/openoffice/Office" includes="ProtocolHandler.xcu,Paths.xcu" casesensitive="yes"/>
<fileset dir="${out}/misc/${target}/merge/org/openoffice/Office/Custom" includes="*.xcu" casesensitive="yes"/>
<fileset dir="${out}/misc/${target}/merge/org/openoffice/Office" includes="*.xcu" casesensitive="yes"/>
+ <!-- FIXME: currently the build xcu files can not be used since the tag containing x-default attribute is thrown away, issue 99378
+ <fileset dir="${out}/misc/${target}/merge/org/openoffice/TypeDetection" includes="*.xcu" casesensitive="yes"/>
+ -->
+ <fileset dir="src/registry/data/org/openoffice/TypeDetection" includes="*.xcu" casesensitive="yes"/>
<zipfileset dir="${out}/misc/${target}/help" includes="**/*.xhp,component.txt" casesensitive="yes" prefix="help"/>
<zipfileset dir="dialogs" includes="**/*.xdl,**/*.xba,**/*.xlb" casesensitive="yes" prefix="WikiEditor"/>
<zipfileset dir="src" includes="uno-extension-manifest.xml" casesensitive="yes" fullpath="META-INF/manifest.xml"/>
diff --git a/swext/mediawiki/src/com/sun/star/wiki/EditPageParser.java b/swext/mediawiki/src/com/sun/star/wiki/EditPageParser.java
index 685c253dc64d..b442e1f04a8d 100644
--- a/swext/mediawiki/src/com/sun/star/wiki/EditPageParser.java
+++ b/swext/mediawiki/src/com/sun/star/wiki/EditPageParser.java
@@ -39,8 +39,12 @@ public class EditPageParser extends HTMLEditorKit.ParserCallback
protected String m_sEditTime = "";
protected String m_sEditToken = "";
+ protected String m_sMainURL = "";
+
private int m_nWikiArticleHash = 0;
private boolean m_bHTMLStartFound = false;
+ private boolean m_bInHead = false;
+
protected int m_nWikiArticleStart = -1;
protected int m_nWikiArticleEnd = -1;
protected int m_nHTMLArticleStart = -1;
@@ -53,88 +57,114 @@ public class EditPageParser extends HTMLEditorKit.ParserCallback
{
}
- public void handleComment(char[] data,int pos)
+ public void handleComment( char[] data,int pos )
{
// insert code to handle comments
}
- public void handleEndTag(HTML.Tag t,int pos)
+ public void handleEndTag( HTML.Tag t,int pos )
{
- if (t == HTML.Tag.TEXTAREA)
+ if ( t == HTML.Tag.TEXTAREA )
{
m_nWikiArticleEnd = pos;
}
- if (t == HTML.Tag.DIV)
+ else if ( t == HTML.Tag.DIV )
{
- if (m_bHTMLStartFound)
+ if ( m_bHTMLStartFound )
{
m_nHTMLArticleStart = pos+6;
m_bHTMLStartFound = false;
}
}
+ else if ( t == HTML.Tag.HEAD )
+ {
+ m_bInHead = false;
+ }
}
- public void handleError(String errorMsg,int pos)
+ public void handleError( String errorMsg,int pos )
{
- //System.out.println(errorMsg);
+ //System.out.println( errorMsg );
}
- public void handleSimpleTag(HTML.Tag t, MutableAttributeSet a,int pos)
+ public void handleSimpleTag( HTML.Tag t, MutableAttributeSet a,int pos )
{
// insert code to handle simple tags
- if (t == HTML.Tag.INPUT)
+ if ( t == HTML.Tag.INPUT )
{
- String sName = (String) a.getAttribute(HTML.Attribute.NAME);
- if (sName != null)
+ String sName = ( String ) a.getAttribute( HTML.Attribute.NAME );
+ if ( sName != null )
{
- if (sName.equalsIgnoreCase("wpEdittime"))
+ if ( sName.equalsIgnoreCase( "wpEdittime" ) )
{
- this.m_sEditTime = (String) a.getAttribute(HTML.Attribute.VALUE);
+ this.m_sEditTime = ( String ) a.getAttribute( HTML.Attribute.VALUE );
}
- if (sName.equalsIgnoreCase("wpEditToken"))
+ else if ( sName.equalsIgnoreCase( "wpEditToken" ) )
{
- this.m_sEditToken = (String) a.getAttribute(HTML.Attribute.VALUE);
+ this.m_sEditToken = ( String ) a.getAttribute( HTML.Attribute.VALUE );
}
}
}
+ else if ( t == HTML.Tag.LINK )
+ {
+ if ( m_bInHead )
+ {
+ String sName = ( String ) a.getAttribute( HTML.Attribute.HREF );
+ if ( sName != null )
+ {
+ int nIndexStart = sName.indexOf( "index.php" );
+ // get the main URL from the first header-link with index.php
+ // the link with "action=edit" inside is preferable
+ if ( nIndexStart>= 0
+ && ( m_sMainURL.length() == 0 || sName.indexOf( "action=edit" ) >= 0 ) )
+ {
+ m_sMainURL = sName.substring( 0, nIndexStart );
+ }
+ }
+ }
+ }
}
- public void handleStartTag(HTML.Tag t, MutableAttributeSet a,int pos)
+ public void handleStartTag( HTML.Tag t, MutableAttributeSet a,int pos )
{
// insert code to handle starting tags
String sName = "";
String sId = "";
String sClass = "";
- if (t == HTML.Tag.TEXTAREA)
+ if ( t == HTML.Tag.HEAD )
+ {
+ m_bInHead = true;
+ }
+ if ( t == HTML.Tag.TEXTAREA )
{
- sName = (String) a.getAttribute(HTML.Attribute.NAME);
- if (sName != null)
+ sName = ( String ) a.getAttribute( HTML.Attribute.NAME );
+ if ( sName != null )
{
- if (sName.equalsIgnoreCase("wpTextbox1"))
+ if ( sName.equalsIgnoreCase( "wpTextbox1" ) )
{
m_nWikiArticleHash = t.hashCode();
m_nWikiArticleStart = pos;
}
}
}
- else if (t == HTML.Tag.DIV)
+ else if ( t == HTML.Tag.DIV )
{
- sId = (String) a.getAttribute(HTML.Attribute.ID);
- sClass = (String) a.getAttribute(HTML.Attribute.CLASS);
- if (sId != null)
+ sId = ( String ) a.getAttribute( HTML.Attribute.ID );
+ sClass = ( String ) a.getAttribute( HTML.Attribute.CLASS );
+ if ( sId != null )
{
- if (sId.equalsIgnoreCase("contentSub"))
+ if ( sId.equalsIgnoreCase( "contentSub" ) )
{
m_bHTMLStartFound = true;
}
}
- if (sClass != null)
+ if ( sClass != null )
{
- if (sClass.equalsIgnoreCase("printfooter"))
+ if ( sClass.equalsIgnoreCase( "printfooter" ) )
{
m_nHTMLArticleEnd = pos;
}
@@ -150,7 +180,7 @@ public class EditPageParser extends HTMLEditorKit.ParserCallback
}
else if ( t == HTML.Tag.P )
{
- sClass = (String) a.getAttribute(HTML.Attribute.CLASS);
+ sClass = ( String ) a.getAttribute( HTML.Attribute.CLASS );
if ( sClass != null && sClass.equalsIgnoreCase( "error" ) )
{
m_nErrorInd = pos;
diff --git a/swext/mediawiki/src/com/sun/star/wiki/Helper.java b/swext/mediawiki/src/com/sun/star/wiki/Helper.java
index 34924f6383f6..f5a858c540e2 100644
--- a/swext/mediawiki/src/com/sun/star/wiki/Helper.java
+++ b/swext/mediawiki/src/com/sun/star/wiki/Helper.java
@@ -116,11 +116,11 @@ public class Helper
public final static int DLG_EDITSETTING_ACCOUNTLINE = 27;
public final static int DLG_EDITSETTING_WIKILINE = 28;
public final static int DLG_EDITSETTING_SAVEBOX = 29;
-
public final static int CANCELSENDING_ERROR = 30;
public final static int DLG_MEDIAWIKIEXTENSION_STRING = 31;
+ public final static int DLG_WIKIPAGEEXISTS_LABEL1 = 32;
- public final static int STRINGS_NUM = 32;
+ public final static int STRINGS_NUM = 33;
private final static String[] m_pEntryNames = { "GeneralSendError",
"NoWikiFilter",
@@ -153,7 +153,8 @@ public class Helper
"Dlg_EditSetting_WikiLine",
"Dlg_EditSetting_SaveBox",
"CancelSending",
- "Dlg_MediaWiki_Extension_String" };
+ "Dlg_MediaWiki_Extension_String",
+ "Dlg_WikiPageExists_Label1" };
private static String[] m_pConfigStrings;
@@ -309,28 +310,36 @@ public class Helper
protected static String GetMainURL( String sWebPage, String sVURL )
{
- //scrape the HTML source and find the EditURL
String sResultURL = "";
- int i = sWebPage.indexOf( "action=edit" );
- if ( i!=-1 )
+ try
{
- int t = sWebPage.lastIndexOf( "a href=", i );
- int z = sWebPage.indexOf( "index.php", t );
- sResultURL = sWebPage.substring( t+8,z );
- try
- {
- if ( !sResultURL.startsWith( "http" ))
- {
- //if the url is only relative then complete it
- URL aURL = new URL( sVURL );
- sResultURL = aURL.getProtocol()+"://"+aURL.getHost()+sResultURL;
- }
- }
- catch ( MalformedURLException ex )
+ StringReader aReader = new StringReader( sWebPage );
+ HTMLEditorKit.Parser aParser = GetHTMLParser();
+ EditPageParser aCallback = new EditPageParser();
+
+ aParser.parse( aReader, aCallback, true );
+ sResultURL = aCallback.m_sMainURL;
+
+ if ( !sResultURL.startsWith( "http" ) )
{
- ex.printStackTrace();
+ //if the url is only relative then complete it
+ URL aURL = new URL( sVURL );
+ sResultURL = aURL.getProtocol() + "://" + aURL.getHost() + sResultURL;
}
}
+ catch( Exception e )
+ {
+ e.printStackTrace();
+ }
+
+ if ( sResultURL.length() == 0 )
+ {
+ // usually that should not happen
+ // workaround: try to get index.php from the provided URL
+ int nIndex = sVURL.indexOf( "index.php" );
+ if ( nIndex >= 0 )
+ sResultURL = sVURL.substring( 0, nIndex );
+ }
return sResultURL;
}
@@ -338,6 +347,8 @@ public class Helper
protected static String GetRedirectURL( String sWebPage, String sURL )
{
//scrape the HTML source and find the EditURL
+ // TODO/LATER: Use parser in future
+
String sResultURL = "";
int nInd = sWebPage.indexOf( "http-equiv=\"refresh\"" );
if ( nInd != -1 )
@@ -651,7 +662,7 @@ public class Helper
int nProxyType = AnyConverter.toInt( xNameAccess.getByName( "ooInetProxyType" ) );
if ( nProxyType == 0 )
- aHostConfig.setProxy( "", 0 );
+ aHostConfig.setProxyHost( null );
else
{
if ( nProxyType == 1 )
@@ -672,7 +683,11 @@ public class Helper
String aNoProxyList = AnyConverter.toString( xNameAccess.getByName( "ooInetNoProxy" ) );
String aProxyName = AnyConverter.toString( xNameAccess.getByName( aProxyNameProp ) );
- int nProxyPort = AnyConverter.toInt( xNameAccess.getByName( aProxyPortProp ) );
+ int nProxyPort = 80;
+
+ Object aPortNo = xNameAccess.getByName( aProxyPortProp );
+ if ( !AnyConverter.isVoid( aPortNo ) )
+ nProxyPort = AnyConverter.toInt( aPortNo );
if ( nProxyPort == -1 )
nProxyPort = 80;
@@ -808,6 +823,20 @@ public class Helper
ExecuteMethod( aPost, aNewHostConfig, aPostURI, xContext, false );
nResultCode = aPost.getStatusCode();
+
+ while( nResultCode >= 301 && nResultCode <= 303 || nResultCode == 307 )
+ {
+ String sRedirectURL = aPost.getResponseHeader( "Location" ).getValue();
+ aPost.releaseConnection();
+
+ aURI = new URI( sRedirectURL );
+ aPost = new PostMethod();
+ aPost.setPath( aURI.getEscapedPathQuery() );
+ ExecuteMethod( aPost, aNewHostConfig, aURI, xContext, false );
+
+ nResultCode = aPost.getStatusCode();
+ }
+
if ( nResultCode == 200 )
{
String sResult = aPost.getResponseBodyAsString();
diff --git a/swext/mediawiki/src/com/sun/star/wiki/WikiEditSettingDialog.java b/swext/mediawiki/src/com/sun/star/wiki/WikiEditSettingDialog.java
index d192b9e8c07c..9d8646fa0b40 100644
--- a/swext/mediawiki/src/com/sun/star/wiki/WikiEditSettingDialog.java
+++ b/swext/mediawiki/src/com/sun/star/wiki/WikiEditSettingDialog.java
@@ -264,8 +264,10 @@ public class WikiEditSettingDialog extends WikiDialog
}
else
{
+ URI aMainURI = new URI( sMainURL, true ); // it must be an escaped URL, otherwise an exception should be thrown
+
if ( ( sUserName.length() > 0 || sPassword.length() > 0 )
- && Helper.Login( new URI( sMainURL ), sUserName, sPassword, m_xContext ) == null )
+ && Helper.Login( aMainURI, sUserName, sPassword, m_xContext ) == null )
{
// a wrong login information is provided
// show error
@@ -278,7 +280,7 @@ public class WikiEditSettingDialog extends WikiDialog
}
else
{
- setting.put( "Url",sMainURL );
+ setting.put( "Url", aMainURI.getEscapedURI() );
setting.put( "Username", sUserName );
setting.put( "Password", sPassword );
if ( addMode )
diff --git a/swext/mediawiki/src/com/sun/star/wiki/WikiEditorImpl.java b/swext/mediawiki/src/com/sun/star/wiki/WikiEditorImpl.java
index aa05aba5c1f2..5083a58d954b 100644
--- a/swext/mediawiki/src/com/sun/star/wiki/WikiEditorImpl.java
+++ b/swext/mediawiki/src/com/sun/star/wiki/WikiEditorImpl.java
@@ -370,7 +370,7 @@ public final class WikiEditorImpl extends WeakBase
WikiArticle aArticle = new WikiArticle( m_xContext, aSendDialog.GetWikiTitle(), aWikiSetting, true, aSendDialog );
boolean bAllowSending = true;
- if ( aArticle.NotExist() )
+ if ( !aArticle.NotExist() )
{
// ask whether creation of a new page is allowed
aSendDialog.SetThrobberActive( false );
@@ -378,7 +378,7 @@ public final class WikiEditorImpl extends WeakBase
m_xContext,
(XWindowPeer)UnoRuntime.queryInterface( XWindowPeer.class, m_xFrame.getContainerWindow() ),
Helper.DLG_SENDTITLE,
- Helper.DLG_NEWWIKIPAGE_LABEL1,
+ Helper.DLG_WIKIPAGEEXISTS_LABEL1,
aSendDialog.GetWikiTitle(),
true );
aSendDialog.SetThrobberActive( true );
diff --git a/swext/mediawiki/src/description.xml b/swext/mediawiki/src/description.xml
index 835e4d59d5ca..2b90d149ae8a 100644
--- a/swext/mediawiki/src/description.xml
+++ b/swext/mediawiki/src/description.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<description xmlns="http://openoffice.org/extensions/description/2006" xmlns:d="http://openoffice.org/extensions/description/2006" xmlns:xlink="http://www.w3.org/1999/xlink">
- <version value="1.0"/>
+ <version value="1.1"/>
<identifier value="@WIKIEXTENSIONID@"/>
<display-name>
<name lang="en-US">@WIKIEXTENSIONPRODUCTNAME@</name>
@@ -11,7 +11,7 @@
</simple-license>
</registration>
<dependencies>
- <OpenOffice.org-minimal-version value="2.4" d:name="OpenOffice.org 2.4 or StarOffice 8 Update 10"/>
+ <OpenOffice.org-minimal-version value="3.0" d:name="OpenOffice.org 3.0 or StarOffice 9"/>
</dependencies>
<publisher>
<name xlink:href="http://www.sun.com/software/star/staroffice/extensions.jsp?cid=925095" lang="en">Sun Microsystems</name>
diff --git a/swext/mediawiki/src/registry/data/org/openoffice/Office/Custom/WikiExtension.xcu b/swext/mediawiki/src/registry/data/org/openoffice/Office/Custom/WikiExtension.xcu
index d8271598f492..cfa97b9a752d 100644
--- a/swext/mediawiki/src/registry/data/org/openoffice/Office/Custom/WikiExtension.xcu
+++ b/swext/mediawiki/src/registry/data/org/openoffice/Office/Custom/WikiExtension.xcu
@@ -70,7 +70,7 @@
<value xml:lang="en-US">User name or password is incorrect. Please try again, or leave the fields blank for an anonymous connection.</value>
</prop>
<prop oor:name="InvalidURL">
- <value xml:lang="en-US">A connection could not be created, because the URL is invalid.</value>
+ <value xml:lang="en-US">A connection could not be created because the URL is invalid.</value>
</prop>
<prop oor:name="NoURL">
<value xml:lang="en-US">Specify a MediaWiki server by providing a URL.</value>
@@ -150,6 +150,8 @@
<prop oor:name="Dlg_MediaWiki_Extension_String">
<value xml:lang="en-US">@WIKIEXTENSIONPRODUCTNAME@</value>
</prop>
-
+ <prop oor:name="Dlg_WikiPageExists_Label1">
+ <value xml:lang="en-US">A wiki article with the title '$ARG1' already exists.&#13;&#13;Do you want to replace the current article with your article?&#13;&#13;</value>
+ </prop>
</node>
</oor:component-data>
diff --git a/swext/mediawiki/src/registry/data/org/openoffice/Office/Paths.xcu b/swext/mediawiki/src/registry/data/org/openoffice/Office/Paths.xcu
new file mode 100644
index 000000000000..82586e861c6c
--- /dev/null
+++ b/swext/mediawiki/src/registry/data/org/openoffice/Office/Paths.xcu
@@ -0,0 +1,36 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--***********************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************ -->
+<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="Paths" oor:package="org.openoffice.Office">
+ <node oor:name="Paths">
+ <node oor:name="Template" oor:op="fuse">
+ <node oor:name="InternalPaths">
+ <node oor:name="%origin%/templates" oor:op="fuse"/>
+ </node>
+ </node>
+ </node>
+</oor:component-data>
diff --git a/swext/mediawiki/src/registry/data/org/openoffice/Office/makefile.mk b/swext/mediawiki/src/registry/data/org/openoffice/Office/makefile.mk
index c5085ed2c40e..c9ff540bff5b 100644
--- a/swext/mediawiki/src/registry/data/org/openoffice/Office/makefile.mk
+++ b/swext/mediawiki/src/registry/data/org/openoffice/Office/makefile.mk
@@ -43,7 +43,7 @@ LOCALIZEDFILES= Addons.xcu OptionsDialog.xcu
MODULEFILES=
-XCUFILES = Addons.xcu OptionsDialog.xcu ProtocolHandler.xcu
+XCUFILES = Addons.xcu OptionsDialog.xcu ProtocolHandler.xcu Paths.xcu
.ENDIF
.INCLUDE : target.mk
diff --git a/swext/mediawiki/src/registry/data/org/openoffice/TypeDetection/Filter.xcu b/swext/mediawiki/src/registry/data/org/openoffice/TypeDetection/Filter.xcu
new file mode 100644
index 000000000000..32577a7cbd8b
--- /dev/null
+++ b/swext/mediawiki/src/registry/data/org/openoffice/TypeDetection/Filter.xcu
@@ -0,0 +1,56 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--***********************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************ -->
+<!DOCTYPE oor:component-data SYSTEM "../../../../component-update.dtd">
+<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:package="org.openoffice.TypeDetection" oor:name="Filter">
+ <node oor:name="Filters">
+ <node oor:name="MediaWiki" oor:op="fuse">
+ <prop oor:name="FileFormatVersion"><value>0</value></prop>
+ <prop oor:name="Type"><value>MediaWiki</value></prop>
+ <prop oor:name="DocumentService"><value>com.sun.star.text.TextDocument</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="UserData"><value oor:separator=",">com.sun.star.documentconversion.XSLTFilter,,,com.sun.star.comp.Writer.XMLOasisExporter,,%origin%/filter/odt2mediawiki.xsl</value></prop>
+ <prop oor:name="FilterService"><value>com.sun.star.comp.Writer.XmlFilterAdaptor</value></prop>
+ <prop oor:name="UIName">
+ <value xml:lang="x-default">MediaWiki</value>
+ </prop>
+ <prop oor:name="Flags"><value>EXPORT ALIEN 3RDPARTYFILTER</value></prop>
+ </node>
+ <node oor:name="MediaWiki_Web" oor:op="fuse">
+ <prop oor:name="FileFormatVersion"><value>0</value></prop>
+ <prop oor:name="Type"><value>MediaWiki</value></prop>
+ <prop oor:name="DocumentService"><value>com.sun.star.text.WebDocument</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="UserData"><value oor:separator=",">com.sun.star.documentconversion.XSLTFilter,,,com.sun.star.comp.Writer.XMLOasisExporter,,%origin%/filter/odt2mediawiki.xsl</value></prop>
+ <prop oor:name="FilterService"><value>com.sun.star.comp.Writer.XmlFilterAdaptor</value></prop>
+ <prop oor:name="UIName">
+ <value xml:lang="x-default">MediaWiki</value>
+ </prop>
+ <prop oor:name="Flags"><value>EXPORT ALIEN 3RDPARTYFILTER</value></prop>
+ </node>
+ </node>
+</oor:component-data>
diff --git a/swext/mediawiki/src/registry/data/org/openoffice/TypeDetection/Types.xcu b/swext/mediawiki/src/registry/data/org/openoffice/TypeDetection/Types.xcu
new file mode 100644
index 000000000000..2417be198b59
--- /dev/null
+++ b/swext/mediawiki/src/registry/data/org/openoffice/TypeDetection/Types.xcu
@@ -0,0 +1,44 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--***********************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************ -->
+<!DOCTYPE oor:component-data SYSTEM "../../../../component-update.dtd">
+<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:package="org.openoffice.TypeDetection" oor:name="Types">
+ <node oor:name="Types">
+ <node oor:name="MediaWiki" oor:op="fuse">
+ <prop oor:name="DetectService"><value>com.sun.star.comp.filters.XMLFilterDetect</value></prop>
+ <prop oor:name="URLPattern"/>
+ <prop oor:name="Extensions"><value>txt</value></prop>
+ <prop oor:name="MediaType"/>
+ <prop oor:name="Preferred"><value>false</value></prop>
+ <prop oor:name="PreferredFilter"/>
+ <prop oor:name="UIName">
+ <value xml:lang="x-default">MediaWiki</value>
+ </prop>
+ <prop oor:name="ClipboardFormat"/>
+ </node>
+ </node>
+</oor:component-data>
diff --git a/swext/mediawiki/src/registry/data/org/openoffice/TypeDetection/makefile.mk b/swext/mediawiki/src/registry/data/org/openoffice/TypeDetection/makefile.mk
new file mode 100644
index 000000000000..4ef01de9ded2
--- /dev/null
+++ b/swext/mediawiki/src/registry/data/org/openoffice/TypeDetection/makefile.mk
@@ -0,0 +1,50 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2008 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.4 $
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ=..$/..$/..$/..$/..$/..$/..
+PRJNAME=swext
+CUSTID=mediawiki
+TARGET=mediawiki_registry_data_typedetection
+PACKAGE=org.openoffice.TypeDetection
+
+.INCLUDE : settings.mk
+.INCLUDE : ${PRJ}$/makefile.pmk
+
+.IF "$(ENABLE_MEDIAWIKI)" == "YES"
+LOCALIZEDFILES=
+
+MODULEFILES=
+
+XCUFILES = Filter.xcu Types.xcu
+.ENDIF
+
+.INCLUDE : target.mk
+
diff --git a/swext/mediawiki/src/registry/schema/org/openoffice/Office/Custom/WikiExtension.xcs b/swext/mediawiki/src/registry/schema/org/openoffice/Office/Custom/WikiExtension.xcs
index 81684f91d53a..d87ac892f7c4 100644
--- a/swext/mediawiki/src/registry/schema/org/openoffice/Office/Custom/WikiExtension.xcs
+++ b/swext/mediawiki/src/registry/schema/org/openoffice/Office/Custom/WikiExtension.xcs
@@ -192,6 +192,9 @@
<prop oor:name="Dlg_MediaWiki_Extension_String" oor:type="xs:string" oor:localized="true">
<info><desc>The string containing the name of the extension.</desc></info>
</prop>
+ <prop oor:name="Dlg_WikiPageExists_Label1" oor:type="xs:string" oor:localized="true">
+ <info><desc>The text asking whether an existing wiki page should be overwritten.</desc></info>
+ </prop>
</group>
</component>
diff --git a/swext/mediawiki/src/uno-extension-manifest.xml b/swext/mediawiki/src/uno-extension-manifest.xml
index 4d5b3f0c96b3..e98fd85e94ef 100644
--- a/swext/mediawiki/src/uno-extension-manifest.xml
+++ b/swext/mediawiki/src/uno-extension-manifest.xml
@@ -44,6 +44,12 @@
manifest:full-path="WikiExtension.xcu"/>
<manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data"
manifest:full-path="OptionsDialog.xcu"/>
+ <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data"
+ manifest:full-path="Filter.xcu"/>
+ <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data"
+ manifest:full-path="Types.xcu"/>
+ <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data"
+ manifest:full-path="Paths.xcu"/>
<manifest:file-entry manifest:media-type="application/vnd.sun.star.help"
manifest:full-path="help"/>
<manifest:file-entry manifest:media-type="application/vnd.sun.star.package-bundle-description"
diff --git a/swext/prj/build.lst b/swext/prj/build.lst
index de32d9ee45cc..58463596ee8d 100644
--- a/swext/prj/build.lst
+++ b/swext/prj/build.lst
@@ -1,9 +1,10 @@
-swext swext : javaunohelper ridljar unoil jurt APACHE_COMMONS:apache-commons officecfg readlicense_oo NULL
+swext swext : javaunohelper ridljar unoil jurt APACHE_COMMONS:apache-commons officecfg readlicense_oo xsltml NULL
swext swext usr1 - all swext_mkout NULL
swext swext\mediawiki\help nmake - all swext_mwhelp NULL
swext swext\mediawiki\src\registry\schema\org\openoffice\Office\Custom nmake - all swext_mwschema NULL
swext swext\mediawiki\src\registry\data\org\openoffice\Office\Custom nmake - all swext_mwcustomdata swext_mwschema NULL
swext swext\mediawiki\src\registry\data\org\openoffice\Office nmake - all swext_mwofficedata NULL
+swext swext\mediawiki\src\registry\data\org\openoffice\TypeDetection nmake - all swext_mwtypedetection NULL
swext swext\mediawiki\src nmake - all swext_mwlicense NULL
-swext swext\mediawiki nmake - all swext_mw swext_mwhelp swext_mwschema swext_mwcustomdata swext_mwofficedata swext_mwlicense NULL
+swext swext\mediawiki nmake - all swext_mw swext_mwhelp swext_mwschema swext_mwcustomdata swext_mwofficedata swext_mwlicense swext_mwtypedetection NULL