[Libreoffice-commits] core.git: 2 commits - filter/Configuration_filter.mk filter/source writerperfect/source
Laurent Alonso
laurent.alonso at inria.fr
Tue Mar 26 00:49:56 PDT 2013
filter/Configuration_filter.mk | 5 +
filter/source/config/fragments/filters/DocMaker.xcu | 2
filter/source/config/fragments/filters/Mariner_Write.xcu | 2
filter/source/config/fragments/filters/Nisus_Writer.xcu | 2
filter/source/config/fragments/filters/TexEdit.xcu | 30 ++++++++++
filter/source/config/fragments/filters/WriterPlus.xcu | 30 ++++++++++
filter/source/config/fragments/filters/eDoc_Document.xcu | 2
filter/source/config/fragments/types/writer_DocMaker.xcu | 4 -
filter/source/config/fragments/types/writer_LightWayText.xcu | 2
filter/source/config/fragments/types/writer_Mariner_Write.xcu | 2
filter/source/config/fragments/types/writer_Nisus_Writer.xcu | 4 -
filter/source/config/fragments/types/writer_TeachText.xcu | 2
filter/source/config/fragments/types/writer_TexEdit.xcu | 4 -
filter/source/config/fragments/types/writer_WriterPlus.xcu | 2
filter/source/config/fragments/types/writer_ZWrite.xcu | 2
filter/source/config/fragments/types/writer_eDoc_Document.xcu | 4 -
filter/source/t602/t602filter.cxx | 27 ++-------
writerperfect/source/writer/MWAWImportFilter.cxx | 4 -
18 files changed, 91 insertions(+), 39 deletions(-)
New commits:
commit 2b28b922e11e2d45eeeba8765096d974f4908157
Author: Laurent Alonso <laurent.alonso at inria.fr>
Date: Tue Mar 26 08:43:51 2013 +0100
Some fixes for mwaw-based filters
Change-Id: Ibb517b9a4690f20baa423472c001314a4d4c43f7
diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk
index 7ca392c..192a68f 100644
--- a/filter/Configuration_filter.mk
+++ b/filter/Configuration_filter.mk
@@ -338,7 +338,9 @@ $(call filter_Configuration_add_types,fcfg_langpack,fcfg_writer_types.xcu,filter
writer_MindWrite \
writer_Nisus_Writer \
writer_TeachText \
+ writer_TexEdit \
writer_WriteNow \
+ writer_WriterPlus \
writer_ZWrite \
writer_T602_Document \
writer_LotusWordPro_Document \
@@ -372,7 +374,6 @@ $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_writer_filters.xcu,fi
DocMaker \
eDoc_Document \
FullWrite_Professional \
- HanMac_Word_J \
HanMac_Word_K \
LightWayText \
Mac_Word \
@@ -383,7 +384,9 @@ $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_writer_filters.xcu,fi
MindWrite \
Nisus_Writer \
TeachText \
+ TexEdit \
WriteNow \
+ WriterPlus \
ZWrite \
T602Document \
LotusWordPro \
diff --git a/filter/source/config/fragments/filters/DocMaker.xcu b/filter/source/config/fragments/filters/DocMaker.xcu
index 968abdc..9170686 100644
--- a/filter/source/config/fragments/filters/DocMaker.xcu
+++ b/filter/source/config/fragments/filters/DocMaker.xcu
@@ -21,7 +21,7 @@
<prop oor:name="FilterService"><value>com.sun.star.comp.Writer.MWAWImportFilter</value></prop>
<prop oor:name="UserData"><value></value></prop>
<prop oor:name="UIName">
- <value xml:lang="x-default">DocMaker (v4) Document</value>
+ <value xml:lang="x-default">DOCMaker (v4) Document</value>
</prop>
<prop oor:name="FileFormatVersion"><value>0</value></prop>
<prop oor:name="Type"><value>writer_DocMaker</value></prop>
diff --git a/filter/source/config/fragments/filters/Mariner_Write.xcu b/filter/source/config/fragments/filters/Mariner_Write.xcu
index 42f140e..e5a342f 100644
--- a/filter/source/config/fragments/filters/Mariner_Write.xcu
+++ b/filter/source/config/fragments/filters/Mariner_Write.xcu
@@ -21,7 +21,7 @@
<prop oor:name="FilterService"><value>com.sun.star.comp.Writer.MWAWImportFilter</value></prop>
<prop oor:name="UserData"><value></value></prop>
<prop oor:name="UIName">
- <value xml:lang="x-default">Mariner Write v1.6 - v3.5</value>
+ <value xml:lang="x-default">Mariner Write Mac Classic v1.6 - v3.5</value>
</prop>
<prop oor:name="FileFormatVersion"><value>0</value></prop>
<prop oor:name="Type"><value>writer_Mariner_Write</value></prop>
diff --git a/filter/source/config/fragments/filters/Nisus_Writer.xcu b/filter/source/config/fragments/filters/Nisus_Writer.xcu
index 02df227..66403e5 100644
--- a/filter/source/config/fragments/filters/Nisus_Writer.xcu
+++ b/filter/source/config/fragments/filters/Nisus_Writer.xcu
@@ -21,7 +21,7 @@
<prop oor:name="FilterService"><value>com.sun.star.comp.Writer.MWAWImportFilter</value></prop>
<prop oor:name="UserData"><value></value></prop>
<prop oor:name="UIName">
- <value xml:lang="x-default">Nisus Writer Document v3.4 - 6.5</value>
+ <value xml:lang="x-default">Nisus Writer Mac Classic v3.4 - 6.5</value>
</prop>
<prop oor:name="FileFormatVersion"><value>0</value></prop>
<prop oor:name="Type"><value>writer_Nisus_Writer</value></prop>
diff --git a/filter/source/config/fragments/filters/TexEdit.xcu b/filter/source/config/fragments/filters/TexEdit.xcu
index 36b353d..d505f85 100644
--- a/filter/source/config/fragments/filters/TexEdit.xcu
+++ b/filter/source/config/fragments/filters/TexEdit.xcu
@@ -21,6 +21,36 @@
<prop oor:name="FilterService"><value>com.sun.star.comp.Writer.MWAWImportFilter</value></prop>
<prop oor:name="UserData"><value></value></prop>
<prop oor:name="UIName">
+ <value xml:lang="x-default">TexEdit v2 Document</value>
+ </prop>
+ <prop oor:name="FileFormatVersion"><value>0</value></prop>
+ <prop oor:name="Type"><value>writer_TexEdit</value></prop>
+ <prop oor:name="TemplateName"/>
+ <prop oor:name="DocumentService"><value>com.sun.star.text.TextDocument</value></prop>
+ </node>
+<!--
+ * 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 .
+-->
+ <node oor:name="TexEdit" oor:op="replace">
+ <prop oor:name="Flags"><value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="FilterService"><value>com.sun.star.comp.Writer.MWAWImportFilter</value></prop>
+ <prop oor:name="UserData"><value></value></prop>
+ <prop oor:name="UIName">
<value xml:lang="x-default">Tex-Edit v2 Document</value>
</prop>
<prop oor:name="FileFormatVersion"><value>0</value></prop>
diff --git a/filter/source/config/fragments/filters/WriterPlus.xcu b/filter/source/config/fragments/filters/WriterPlus.xcu
index 51f1026..fbf016f 100644
--- a/filter/source/config/fragments/filters/WriterPlus.xcu
+++ b/filter/source/config/fragments/filters/WriterPlus.xcu
@@ -15,6 +15,36 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
+ <node oor:name="WriterPlus" oor:op="replace">
+ <prop oor:name="Flags"><value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value></prop>
+ <prop oor:name="UIComponent"/>
+ <prop oor:name="FilterService"><value>com.sun.star.comp.Writer.MWAWImportFilter</value></prop>
+ <prop oor:name="UserData"><value></value></prop>
+ <prop oor:name="UIName">
+ <value xml:lang="x-default">WriterPlus</value>
+ </prop>
+ <prop oor:name="FileFormatVersion"><value>0</value></prop>
+ <prop oor:name="Type"><value>writer_WriterPlus</value></prop>
+ <prop oor:name="TemplateName"/>
+ <prop oor:name="DocumentService"><value>com.sun.star.text.TextDocument</value></prop>
+ </node>
+<!--
+ * 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 .
+-->
<node oor:name="WritePlus" oor:op="replace">
<prop oor:name="Flags"><value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value></prop>
<prop oor:name="UIComponent"/>
diff --git a/filter/source/config/fragments/filters/eDoc_Document.xcu b/filter/source/config/fragments/filters/eDoc_Document.xcu
index f9430dd..122f5b2 100644
--- a/filter/source/config/fragments/filters/eDoc_Document.xcu
+++ b/filter/source/config/fragments/filters/eDoc_Document.xcu
@@ -21,7 +21,7 @@
<prop oor:name="FilterService"><value>com.sun.star.comp.Writer.MWAWImportFilter</value></prop>
<prop oor:name="UserData"><value></value></prop>
<prop oor:name="UIName">
- <value xml:lang="x-default">eDoc (v2) Document</value>
+ <value xml:lang="x-default">eDOC (v2) Document</value>
</prop>
<prop oor:name="FileFormatVersion"><value>0</value></prop>
<prop oor:name="Type"><value>writer_eDoc_Document</value></prop>
diff --git a/filter/source/config/fragments/types/writer_DocMaker.xcu b/filter/source/config/fragments/types/writer_DocMaker.xcu
index 90b4931..c8f8e88 100644
--- a/filter/source/config/fragments/types/writer_DocMaker.xcu
+++ b/filter/source/config/fragments/types/writer_DocMaker.xcu
@@ -18,12 +18,12 @@
<node oor:name="writer_DocMaker" oor:op="replace" >
<prop oor:name="DetectService"><value>com.sun.star.comp.Writer.MWAWImportFilter</value></prop>
<prop oor:name="URLPattern"/>
- <prop oor:name="Extensions"><value>dummy</value></prop>
+ <prop oor:name="Extensions"><value>hqx zip</value></prop>
<prop oor:name="MediaType"><value></value></prop>
<prop oor:name="Preferred"><value>true</value></prop>
<prop oor:name="PreferredFilter"><value>DocMaker</value></prop>
<prop oor:name="UIName">
- <value>DocMaker (v4) Document</value>
+ <value>DOCMaker (v4) Document</value>
</prop>
<prop oor:name="ClipboardFormat"/>
</node>
diff --git a/filter/source/config/fragments/types/writer_LightWayText.xcu b/filter/source/config/fragments/types/writer_LightWayText.xcu
index 33f3c31b..bf28d07 100644
--- a/filter/source/config/fragments/types/writer_LightWayText.xcu
+++ b/filter/source/config/fragments/types/writer_LightWayText.xcu
@@ -18,7 +18,7 @@
<node oor:name="writer_LightWayText" oor:op="replace" >
<prop oor:name="DetectService"><value>com.sun.star.comp.Writer.MWAWImportFilter</value></prop>
<prop oor:name="URLPattern"/>
- <prop oor:name="Extensions"><value>dummy</value></prop>
+ <prop oor:name="Extensions"><value>hqx zip</value></prop>
<prop oor:name="MediaType"><value></value></prop>
<prop oor:name="Preferred"><value>true</value></prop>
<prop oor:name="PreferredFilter"><value>LightWayText</value></prop>
diff --git a/filter/source/config/fragments/types/writer_Mariner_Write.xcu b/filter/source/config/fragments/types/writer_Mariner_Write.xcu
index 166c662..d3df757 100644
--- a/filter/source/config/fragments/types/writer_Mariner_Write.xcu
+++ b/filter/source/config/fragments/types/writer_Mariner_Write.xcu
@@ -23,7 +23,7 @@
<prop oor:name="Preferred"><value>true</value></prop>
<prop oor:name="PreferredFilter"><value>Mariner_Write</value></prop>
<prop oor:name="UIName">
- <value>Mariner Write v1.6 - v3.5</value>
+ <value>Mariner Write Mac Classic v1.6 - v3.5</value>
</prop>
<prop oor:name="ClipboardFormat"/>
</node>
diff --git a/filter/source/config/fragments/types/writer_Nisus_Writer.xcu b/filter/source/config/fragments/types/writer_Nisus_Writer.xcu
index a8b5b2f..490fd05 100644
--- a/filter/source/config/fragments/types/writer_Nisus_Writer.xcu
+++ b/filter/source/config/fragments/types/writer_Nisus_Writer.xcu
@@ -18,12 +18,12 @@
<node oor:name="writer_Nisus_Writer" oor:op="replace" >
<prop oor:name="DetectService"><value>com.sun.star.comp.Writer.MWAWImportFilter</value></prop>
<prop oor:name="URLPattern"/>
- <prop oor:name="Extensions"><value>dummy</value></prop>
+ <prop oor:name="Extensions"><value>hqx zip</value></prop>
<prop oor:name="MediaType"><value></value></prop>
<prop oor:name="Preferred"><value>true</value></prop>
<prop oor:name="PreferredFilter"><value>Nisus_Writer</value></prop>
<prop oor:name="UIName">
- <value>Nisus Writer Document v3.4 - 6.5</value>
+ <value>Nisus Writer Mac Classic v3.4 - 6.5</value>
</prop>
<prop oor:name="ClipboardFormat"/>
</node>
diff --git a/filter/source/config/fragments/types/writer_TeachText.xcu b/filter/source/config/fragments/types/writer_TeachText.xcu
index 8f580f6..073ad05 100644
--- a/filter/source/config/fragments/types/writer_TeachText.xcu
+++ b/filter/source/config/fragments/types/writer_TeachText.xcu
@@ -18,7 +18,7 @@
<node oor:name="writer_TeachText" oor:op="replace" >
<prop oor:name="DetectService"><value>com.sun.star.comp.Writer.MWAWImportFilter</value></prop>
<prop oor:name="URLPattern"/>
- <prop oor:name="Extensions"><value>dummy</value></prop>
+ <prop oor:name="Extensions"><value>hqx zip</value></prop>
<prop oor:name="MediaType"><value></value></prop>
<prop oor:name="Preferred"><value>true</value></prop>
<prop oor:name="PreferredFilter"><value>TeachText</value></prop>
diff --git a/filter/source/config/fragments/types/writer_TexEdit.xcu b/filter/source/config/fragments/types/writer_TexEdit.xcu
index 695526d..9ffd87f 100644
--- a/filter/source/config/fragments/types/writer_TexEdit.xcu
+++ b/filter/source/config/fragments/types/writer_TexEdit.xcu
@@ -18,10 +18,10 @@
<node oor:name="writer_TexEdit" oor:op="replace" >
<prop oor:name="DetectService"><value>com.sun.star.comp.Writer.MWAWImportFilter</value></prop>
<prop oor:name="URLPattern"/>
- <prop oor:name="Extensions"><value>dummy</value></prop>
+ <prop oor:name="Extensions"><value>hqx zip</value></prop>
<prop oor:name="MediaType"><value></value></prop>
<prop oor:name="Preferred"><value>true</value></prop>
- <prop oor:name="PreferredFilter">TexEdit<value></value></prop>
+ <prop oor:name="PreferredFilter"><value>TexEdit</value></prop>
<prop oor:name="UIName">
<value>Tex-Edit v2 Document</value>
</prop>
diff --git a/filter/source/config/fragments/types/writer_WriterPlus.xcu b/filter/source/config/fragments/types/writer_WriterPlus.xcu
index 6e8a3b3..934ae12 100644
--- a/filter/source/config/fragments/types/writer_WriterPlus.xcu
+++ b/filter/source/config/fragments/types/writer_WriterPlus.xcu
@@ -21,7 +21,7 @@
<prop oor:name="Extensions"><value>dummy</value></prop>
<prop oor:name="MediaType"><value></value></prop>
<prop oor:name="Preferred"><value>true</value></prop>
- <prop oor:name="PreferredFilter">WriterPlus<value></value></prop>
+ <prop oor:name="PreferredFilter"><value>WriterPlus</value></prop>
<prop oor:name="UIName">
<value>Writer Plus Document</value>
</prop>
diff --git a/filter/source/config/fragments/types/writer_ZWrite.xcu b/filter/source/config/fragments/types/writer_ZWrite.xcu
index 1e2d809..eeebe3f 100644
--- a/filter/source/config/fragments/types/writer_ZWrite.xcu
+++ b/filter/source/config/fragments/types/writer_ZWrite.xcu
@@ -18,7 +18,7 @@
<node oor:name="writer_ZWrite" oor:op="replace" >
<prop oor:name="DetectService"><value>com.sun.star.comp.Writer.MWAWImportFilter</value></prop>
<prop oor:name="URLPattern"/>
- <prop oor:name="Extensions"><value>dummy</value></prop>
+ <prop oor:name="Extensions"><value>hqx zip</value></prop>
<prop oor:name="MediaType"><value></value></prop>
<prop oor:name="Preferred"><value>true</value></prop>
<prop oor:name="PreferredFilter"><value>ZWrite</value></prop>
diff --git a/filter/source/config/fragments/types/writer_eDoc_Document.xcu b/filter/source/config/fragments/types/writer_eDoc_Document.xcu
index 8e58100..26b1abe 100644
--- a/filter/source/config/fragments/types/writer_eDoc_Document.xcu
+++ b/filter/source/config/fragments/types/writer_eDoc_Document.xcu
@@ -18,12 +18,12 @@
<node oor:name="writer_eDoc_Document" oor:op="replace" >
<prop oor:name="DetectService"><value>com.sun.star.comp.Writer.MWAWImportFilter</value></prop>
<prop oor:name="URLPattern"/>
- <prop oor:name="Extensions"><value>dummy</value></prop>
+ <prop oor:name="Extensions"><value>hqx zip</value></prop>
<prop oor:name="MediaType"><value></value></prop>
<prop oor:name="Preferred"><value>true</value></prop>
<prop oor:name="PreferredFilter">eDoc_Document<value></value></prop>
<prop oor:name="UIName">
- <value>eDoc (v2) Document</value>
+ <value>eDOC (v2) Document</value>
</prop>
<prop oor:name="ClipboardFormat"/>
</node>
diff --git a/writerperfect/source/writer/MWAWImportFilter.cxx b/writerperfect/source/writer/MWAWImportFilter.cxx
index 9c3e989..828d468 100644
--- a/writerperfect/source/writer/MWAWImportFilter.cxx
+++ b/writerperfect/source/writer/MWAWImportFilter.cxx
@@ -971,13 +971,13 @@ throw( com::sun::star::uno::RuntimeException )
sTypeName = "writer_TeachText";
break;
case MWAWDocument::TEDIT: // Tex-Edit v2
- sTypeName = "writer_TexEDit";
+ sTypeName = "writer_TexEdit";
break;
case MWAWDocument::WNOW: // WriteNow
sTypeName = "writer_WriteNow";
break;
case MWAWDocument::WPLUS: // writerplus document
- sTypeName = "writer_WritePlus";
+ sTypeName = "writer_WriterPlus";
break;
case MWAWDocument::ZWRT: // Z-Write : v1.3
sTypeName = "writer_ZWrite";
commit eb08ea4fb03ed8db54cda2e87fa36be9a7301757
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Mar 25 14:35:54 2013 +0100
A little tiny insignificant cleanup
Change-Id: I285da1f12711e9e96b666a3ce1560c203870cac3
diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx
index 164fd8f..0282d19 100644
--- a/filter/source/t602/t602filter.cxx
+++ b/filter/source/t602/t602filter.cxx
@@ -136,42 +136,31 @@ T602ImportFilter::~T602ImportFilter()
}
// XExtendedTypeDetection
-::rtl::OUString T602ImportFilter::detect( Sequence<PropertyValue>& Descriptor)
+OUString T602ImportFilter::detect( Sequence<PropertyValue>& Descriptor)
throw(RuntimeException)
{
- // checks for filter or type name would be necessary in case we want to use the filter also for "602" files
- // without the magic bytes at the beginning; I leave the code as comment in case of
- // ::rtl::OUString aFilterName, aTypeName;
sal_Int32 nLength = Descriptor.getLength();
const PropertyValue * pValue = Descriptor.getConstArray();
for ( sal_Int32 i = 0 ; i < nLength; i++)
{
if ( pValue[i].Name == "InputStream" )
pValue[i].Value >>= mxInputStream;
-/* else if ( pValue[i].Name == "FilterName" )
- pValue[i].Value >>= aFilterName;
- else if ( pValue[i].Name == "TypeName" )
- pValue[i].Value >>= aTypeName; */
}
if (!mxInputStream.is())
- return ::rtl::OUString();
-
-/* if ( aFilterName == "T602Document" || aTypeName == "writer_T602_Document" )
- // preselection by type (extension) or filter name: no reason to check type
- return rtl::OUString( "writer_T602_Document" ); */
+ return OUString();
::com::sun::star::uno::Sequence< sal_Int8 > aData;
- size_t numBytes = 4;
+ const size_t numBytes = 4;
size_t numBytesRead = 0;
numBytesRead = mxInputStream->readSomeBytes (aData, numBytes);
if ((numBytesRead != numBytes) || (aData[0] != '@') ||
(aData[1] != 'C') || (aData[2] != 'T') || (aData[3] != ' '))
- return ::rtl::OUString();
+ return OUString();
- return rtl::OUString( "writer_T602_Document" );
+ return OUString( "writer_T602_Document" );
}
// XFilter
@@ -1144,7 +1133,7 @@ ResMgr* T602ImportFilterDialog::getResMgr()
return mpResMgr;
}
-void SAL_CALL T602ImportFilterDialog::setTitle( const ::rtl::OUString& )
+void SAL_CALL T602ImportFilterDialog::setTitle( const OUString& )
throw (::com::sun::star::uno::RuntimeException)
{
}
@@ -1158,9 +1147,9 @@ sal_Int16 SAL_CALL T602ImportFilterDialog::execute()
return com::sun::star::ui::dialogs::ExecutableDialogResults::CANCEL;
}
-rtl::OUString T602ImportFilterDialog::getResStr( sal_Int16 resid )
+OUString T602ImportFilterDialog::getResStr( sal_Int16 resid )
{
- rtl::OUString sStr = String( ResId( resid, *getResMgr() ) );
+ OUString sStr( ResId( resid, *getResMgr() ) );
return sStr;
}
More information about the Libreoffice-commits
mailing list