ooo-build r13077 - in trunk: . patches/dev300
- From: strba svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r13077 - in trunk: . patches/dev300
- Date: Sat, 5 Jul 2008 11:59:08 +0000 (UTC)
Author: strba
Date: Sat Jul 5 11:59:07 2008
New Revision: 13077
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13077&view=rev
Log:
some more work on unstable libwp? section + adding some upstream issue numbers since I filed the issues upstream (nice me\!)
Modified:
trunk/ChangeLog
trunk/patches/dev300/apply
trunk/patches/dev300/writerperfect-testing.diff
Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply (original)
+++ trunk/patches/dev300/apply Sat Jul 5 11:59:07 2008
@@ -479,7 +479,7 @@
save-doc-withembedded-doc-with-vba-crash.diff, n#339946, i#83632, noelpwer
# prevent some array out of bounds in ww8 exporter
-sw-source-filter-ww8-wrtw8nds-out_of_bounds.diff, n#391197, fridrich
+sw-source-filter-ww8-wrtw8nds-out_of_bounds.diff, n#391197, i#91396, fridrich
# don't use freed memory in slidesorter
sd-slidesorter-dead-ptr.diff, i#88002, thorsten
@@ -2339,7 +2339,7 @@
slideshow-animated-bmp-fix.diff, i#73914, jlcheng
sd-more-title-styles.diff, i#23221, thorsten
-sw-source-filter-ww8-continous-section-break-fix.diff, n#405071, fridrich
+sw-source-filter-ww8-continous-section-break-fix.diff, n#405071, i#91395, fridrich
[ LocalizeFixes ]
# it is Y axis, not X one [in Spanish]
Modified: trunk/patches/dev300/writerperfect-testing.diff
==============================================================================
--- trunk/patches/dev300/writerperfect-testing.diff (original)
+++ trunk/patches/dev300/writerperfect-testing.diff Sat Jul 5 11:59:07 2008
@@ -1,5 +1,5 @@
---- writerperfect//source/filter/DocumentCollector.cxx 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/filter/DocumentCollector.cxx 2008-06-25 12:39:46.000000000 +0200
+--- writerperfect//source/filter/DocumentCollector.cxx 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/filter/DocumentCollector.cxx 2008-06-25 22:56:11.000000000 +0200
@@ -39,6 +39,8 @@
#include "DocumentCollector.hxx"
@@ -1524,8 +1524,8 @@
+ mpCurrentContentElements->push_back(new TagCloseElement("draw:text-box"));
+}
+
---- writerperfect//source/filter/DocumentCollector.hxx 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/filter/DocumentCollector.hxx 2008-06-25 12:39:46.000000000 +0200
+--- writerperfect//source/filter/DocumentCollector.hxx 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/filter/DocumentCollector.hxx 2008-06-25 22:56:11.000000000 +0200
@@ -45,8 +45,9 @@
#include <stack>
#include <string.h>
@@ -1697,8 +1697,8 @@
};
#endif
---- writerperfect//source/filter/DocumentElement.cxx 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/filter/DocumentElement.cxx 2008-06-25 12:39:46.000000000 +0200
+--- writerperfect//source/filter/DocumentElement.cxx 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/filter/DocumentElement.cxx 2008-06-25 22:56:11.000000000 +0200
@@ -26,6 +26,7 @@
*/
@@ -1745,8 +1745,8 @@
WPXPropertyList xBlankAttrList;
WPXString sTemp;
---- writerperfect//source/filter/DocumentElement.hxx 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/filter/DocumentElement.hxx 2008-06-25 12:39:46.000000000 +0200
+--- writerperfect//source/filter/DocumentElement.hxx 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/filter/DocumentElement.hxx 2008-06-25 22:56:11.000000000 +0200
@@ -21,36 +21,31 @@
*
*/
@@ -1834,8 +1834,8 @@
-
+
#endif
---- writerperfect//source/filter/DocumentHandler.hxx 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/filter/DocumentHandler.hxx 2008-06-25 12:39:46.000000000 +0200
+--- writerperfect//source/filter/DocumentHandler.hxx 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/filter/DocumentHandler.hxx 2008-06-25 22:56:11.000000000 +0200
@@ -11,10 +11,12 @@
#pragma warning( pop )
#endif
@@ -1851,7 +1851,7 @@
public:
DocumentHandler(Reference < XDocumentHandler > &xHandler);
--- writerperfect//source/filter/DocumentHandlerInterface.hxx 1970-01-01 01:00:00.000000000 +0100
-+++ writerperfect//source/filter/DocumentHandlerInterface.hxx 2008-06-25 12:39:46.000000000 +0200
++++ writerperfect//source/filter/DocumentHandlerInterface.hxx 2008-06-25 22:56:11.000000000 +0200
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2004 William Lachance (wlach interlog com)
@@ -1898,8 +1898,8 @@
+ virtual void characters(const WPXString &sCharacters) = 0;
+};
+#endif
---- writerperfect//source/filter/FontStyle.cxx 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/filter/FontStyle.cxx 2008-06-25 12:39:46.000000000 +0200
+--- writerperfect//source/filter/FontStyle.cxx 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/filter/FontStyle.cxx 2008-06-25 22:56:11.000000000 +0200
@@ -29,7 +29,7 @@
#include "DocumentElement.hxx"
@@ -1928,8 +1928,8 @@
+ TagCloseElement styleClose("style:font-face");
styleClose.write(pHandler);
}
---- writerperfect//source/filter/FontStyle.hxx 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/filter/FontStyle.hxx 2008-06-25 12:39:46.000000000 +0200
+--- writerperfect//source/filter/FontStyle.hxx 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/filter/FontStyle.hxx 2008-06-25 22:56:11.000000000 +0200
@@ -21,28 +21,23 @@
*
*/
@@ -1963,7 +1963,7 @@
private:
--- writerperfect//source/filter/GraphicsStyle.cxx 1970-01-01 01:00:00.000000000 +0100
-+++ writerperfect//source/filter/GraphicsStyle.cxx 2008-06-25 12:39:46.000000000 +0200
++++ writerperfect//source/filter/GraphicsStyle.cxx 2008-06-25 22:56:11.000000000 +0200
@@ -0,0 +1,40 @@
+/* GraphicsStyle:
+ *
@@ -2006,7 +2006,7 @@
+{
+}
--- writerperfect//source/filter/GraphicsStyle.hxx 1970-01-01 01:00:00.000000000 +0100
-+++ writerperfect//source/filter/GraphicsStyle.hxx 2008-06-25 12:39:46.000000000 +0200
++++ writerperfect//source/filter/GraphicsStyle.hxx 2008-06-25 22:56:11.000000000 +0200
@@ -0,0 +1,40 @@
+/* GraphicsStyle:
+ *
@@ -2049,7 +2049,7 @@
+};
+#endif
--- writerperfect//source/filter/InternalHandler.cxx 1970-01-01 01:00:00.000000000 +0100
-+++ writerperfect//source/filter/InternalHandler.cxx 2008-06-25 12:39:46.000000000 +0200
++++ writerperfect//source/filter/InternalHandler.cxx 2008-06-25 22:56:11.000000000 +0200
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2007 Fridrich Strba strba bluewin ch)
@@ -2106,7 +2106,7 @@
+ mpElements->push_back(new CharDataElement(sCharacters.cstr()));
+}
--- writerperfect//source/filter/InternalHandler.hxx 1970-01-01 01:00:00.000000000 +0100
-+++ writerperfect//source/filter/InternalHandler.hxx 2008-06-25 12:39:46.000000000 +0200
++++ writerperfect//source/filter/InternalHandler.hxx 2008-06-25 22:56:11.000000000 +0200
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2007 Fridrich Strba strba bluewin ch)
@@ -2154,8 +2154,8 @@
+ std::vector<DocumentElement *> *mpElements;
+};
+#endif
---- writerperfect//source/filter/ListStyle.cxx 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/filter/ListStyle.cxx 2008-06-25 12:39:46.000000000 +0200
+--- writerperfect//source/filter/ListStyle.cxx 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/filter/ListStyle.cxx 2008-06-25 22:56:11.000000000 +0200
@@ -29,7 +29,7 @@
#include "DocumentElement.hxx"
@@ -2285,8 +2285,8 @@
{
TagOpenElement listStyleOpenElement("text:list-style");
listStyleOpenElement.addAttribute("style:name", getName());
---- writerperfect//source/filter/ListStyle.hxx 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/filter/ListStyle.hxx 2008-06-25 12:39:46.000000000 +0200
+--- writerperfect//source/filter/ListStyle.hxx 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/filter/ListStyle.hxx 2008-06-25 22:56:11.000000000 +0200
@@ -21,23 +21,18 @@
*
*/
@@ -2348,8 +2348,8 @@
const int getListID() { return miListID; }
const bool isListLevelDefined(int iLevel) const;
---- writerperfect//source/filter/makefile.mk 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/filter/makefile.mk 2008-06-25 12:39:46.000000000 +0200
+--- writerperfect//source/filter/makefile.mk 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/filter/makefile.mk 2008-06-25 22:56:11.000000000 +0200
@@ -10,6 +10,10 @@
INCPRE+=$(LIBWPD_CFLAGS)
.ENDIF
@@ -2389,7 +2389,7 @@
.INCLUDE : target.mk
--- writerperfect//source/filter/OdgExporter.cxx 1970-01-01 01:00:00.000000000 +0100
-+++ writerperfect//source/filter/OdgExporter.cxx 2008-06-25 12:39:46.000000000 +0200
++++ writerperfect//source/filter/OdgExporter.cxx 2008-06-25 22:56:11.000000000 +0200
@@ -0,0 +1,615 @@
+/* libwpg
+ * Copyright (C) 2006 Ariya Hidayat (ariya kde org)
@@ -3007,7 +3007,7 @@
+ return WPXString(stringValue.c_str());
+}
--- writerperfect//source/filter/OdgExporter.hxx 1970-01-01 01:00:00.000000000 +0100
-+++ writerperfect//source/filter/OdgExporter.hxx 2008-06-25 12:39:46.000000000 +0200
++++ writerperfect//source/filter/OdgExporter.hxx 2008-06-25 22:56:11.000000000 +0200
@@ -0,0 +1,85 @@
+/* libwpg
+ * Copyright (C) 2006 Ariya Hidayat (ariya kde org)
@@ -3094,8 +3094,8 @@
+};
+
+#endif // __ODGEXPORTER_HXX__
---- writerperfect//source/filter/PageSpan.cxx 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/filter/PageSpan.cxx 2008-06-25 12:39:46.000000000 +0200
+--- writerperfect//source/filter/PageSpan.cxx 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/filter/PageSpan.cxx 2008-06-25 22:56:11.000000000 +0200
@@ -87,39 +87,38 @@
return 0; // should never happen
}
@@ -3235,8 +3235,8 @@
- headerFooterClose.write(pHandler);
}
-
---- writerperfect//source/filter/PageSpan.hxx 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/filter/PageSpan.hxx 2008-06-25 12:39:46.000000000 +0200
+--- writerperfect//source/filter/PageSpan.hxx 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/filter/PageSpan.hxx 2008-06-25 22:56:11.000000000 +0200
@@ -26,25 +26,20 @@
*/
#ifndef _PAGESPAN_H
@@ -3276,8 +3276,8 @@
private:
WPXPropertyList mxPropList;
std::vector<DocumentElement *> * mpHeaderContent;
---- writerperfect//source/filter/SectionStyle.cxx 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/filter/SectionStyle.cxx 2008-06-25 12:39:46.000000000 +0200
+--- writerperfect//source/filter/SectionStyle.cxx 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/filter/SectionStyle.cxx 2008-06-25 22:56:11.000000000 +0200
@@ -33,7 +33,7 @@
#ifdef _MSC_VER
@@ -3324,8 +3324,8 @@
pHandler->endElement("style:style");
}
---- writerperfect//source/filter/SectionStyle.hxx 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/filter/SectionStyle.hxx 2008-06-25 12:39:46.000000000 +0200
+--- writerperfect//source/filter/SectionStyle.hxx 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/filter/SectionStyle.hxx 2008-06-25 22:56:11.000000000 +0200
@@ -21,19 +21,13 @@
*
*/
@@ -3360,8 +3360,8 @@
WPXPropertyListVector mColumns;
};
#endif
---- writerperfect//source/filter/Style.hxx 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/filter/Style.hxx 2008-06-25 12:39:46.000000000 +0200
+--- writerperfect//source/filter/Style.hxx 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/filter/Style.hxx 2008-06-25 22:56:11.000000000 +0200
@@ -21,19 +21,13 @@
*
*/
@@ -3392,8 +3392,8 @@
const WPXString &getName() const { return msName; }
private:
---- writerperfect//source/filter/TableStyle.cxx 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/filter/TableStyle.cxx 2008-06-25 12:39:46.000000000 +0200
+--- writerperfect//source/filter/TableStyle.cxx 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/filter/TableStyle.cxx 2008-06-25 22:56:11.000000000 +0200
@@ -27,7 +27,6 @@
* Corel Corporation or Corel Corporation Limited."
*/
@@ -3510,8 +3510,8 @@
pHandler->endElement("style:style");
---- writerperfect//source/filter/TableStyle.hxx 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/filter/TableStyle.hxx 2008-06-25 12:39:46.000000000 +0200
+--- writerperfect//source/filter/TableStyle.hxx 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/filter/TableStyle.hxx 2008-06-25 22:56:11.000000000 +0200
@@ -22,57 +22,53 @@
*
*/
@@ -3582,8 +3582,8 @@
WPXPropertyListVector mColumns;
std::vector<TableCellStyle *> mTableCellStyles;
std::vector<TableRowStyle *> mTableRowStyles;
---- writerperfect//source/filter/TextRunStyle.cxx 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/filter/TextRunStyle.cxx 2008-06-25 12:39:46.000000000 +0200
+--- writerperfect//source/filter/TextRunStyle.cxx 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/filter/TextRunStyle.cxx 2008-06-25 22:56:11.000000000 +0200
@@ -50,91 +50,95 @@
delete mpPropList;
}
@@ -3761,8 +3761,8 @@
+ pHandler->endElement("style:text-properties");
pHandler->endElement("style:style");
}
---- writerperfect//source/filter/TextRunStyle.hxx 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/filter/TextRunStyle.hxx 2008-06-25 12:39:46.000000000 +0200
+--- writerperfect//source/filter/TextRunStyle.hxx 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/filter/TextRunStyle.hxx 2008-06-25 22:56:11.000000000 +0200
@@ -29,26 +29,19 @@
#ifndef _TEXTRUNSTYLE_H
@@ -3800,16 +3800,16 @@
private:
WPXPropertyList mPropList;
---- writerperfect//source/filter/WriterProperties.hxx 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/filter/WriterProperties.hxx 2008-06-25 12:39:46.000000000 +0200
+--- writerperfect//source/filter/WriterProperties.hxx 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/filter/WriterProperties.hxx 2008-06-25 22:56:11.000000000 +0200
@@ -32,5 +32,4 @@
#define IMP_DEFAULT_FONT_NAME "Times New Roman"
#define IMP_DEFAULT_FONT_SIZE 12.0f
#define IMP_DEFAULT_FONT_PITCH "variable"
-#define IMP_DEFAULT_FONT_COLOR (new RGBSColor(0x00,0x00,0x00,0x64))
#endif
---- writerperfect//source/stream/WPXSvStream.cxx 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/stream/WPXSvStream.cxx 2008-06-25 12:39:46.000000000 +0200
+--- writerperfect//source/stream/WPXSvStream.cxx 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/stream/WPXSvStream.cxx 2008-06-25 22:56:12.000000000 +0200
@@ -9,7 +9,7 @@
using namespace ::com::sun::star::io;
@@ -3846,8 +3846,8 @@
-{
- return getDocumentOLEStream( "PerfectOffice_MAIN" );
-}
---- writerperfect//source/stream/WPXSvStream.h 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/stream/WPXSvStream.h 2008-06-25 12:39:46.000000000 +0200
+--- writerperfect//source/stream/WPXSvStream.h 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/stream/WPXSvStream.h 2008-06-25 22:56:12.000000000 +0200
@@ -12,13 +12,12 @@
#if defined _MSC_VER
#pragma warning( push, 1 )
@@ -3876,8 +3876,8 @@
virtual int seek(long offset, WPX_SEEK_TYPE seekType);
virtual long tell();
virtual bool atEOS();
---- writerperfect//source/wpdimp/makefile.mk 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/wpdimp/makefile.mk 2008-06-25 12:39:46.000000000 +0200
+--- writerperfect//source/wpdimp/makefile.mk 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/wpdimp/makefile.mk 2008-06-25 22:56:12.000000000 +0200
@@ -10,6 +10,10 @@
INCPRE+=$(LIBWPD_CFLAGS)
.ENDIF
@@ -3889,8 +3889,8 @@
.IF "$(SYSTEM_LIBWPS)" == "YES"
INCPRE+=$(LIBWPS_CFLAGS)
.ENDIF
---- writerperfect//source/wpdimp/WordPerfectCollector.cxx 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/wpdimp/WordPerfectCollector.cxx 2008-06-25 15:25:06.000000000 +0200
+--- writerperfect//source/wpdimp/WordPerfectCollector.cxx 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/wpdimp/WordPerfectCollector.cxx 2008-06-25 22:56:12.000000000 +0200
@@ -35,8 +35,9 @@
#pragma warning( pop )
#endif
@@ -3919,8 +3919,8 @@
if (result != WPD_OK)
return false;
---- writerperfect//source/wpdimp/WordPerfectCollector.hxx 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/wpdimp/WordPerfectCollector.hxx 2008-06-25 15:27:05.000000000 +0200
+--- writerperfect//source/wpdimp/WordPerfectCollector.hxx 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/wpdimp/WordPerfectCollector.hxx 2008-06-25 22:56:12.000000000 +0200
@@ -30,12 +30,16 @@
#define _WORDPERFECTCOLLECTOR_HXX
@@ -3940,9 +3940,9 @@
+ rtl::OString maUtf8Password;
};
#endif
---- writerperfect//source/wpdimp/WordPerfectImportFilter.cxx 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/wpdimp/WordPerfectImportFilter.cxx 2008-06-25 15:33:32.000000000 +0200
-@@ -29,27 +29,20 @@
+--- writerperfect//source/wpdimp/WordPerfectImportFilter.cxx 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/wpdimp/WordPerfectImportFilter.cxx 2008-06-25 23:23:13.000000000 +0200
+@@ -29,27 +29,19 @@
*/
#include <osl/diagnose.h>
@@ -3950,7 +3950,7 @@
#include <rtl/tencinfo.h>
-#endif
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
- #include <com/sun/star/io/XInputStream.hpp>
+-#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/xml/sax/XAttributeList.hpp>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <com/sun/star/xml/sax/InputSource.hpp>
@@ -3972,7 +3972,7 @@
#include "filter/FilterInternal.hxx"
#include "filter/DocumentHandler.hxx"
-@@ -98,7 +91,6 @@
+@@ -98,7 +90,6 @@
throw (RuntimeException)
{
WRITER_DEBUG_MSG(("WordPerfectImportFilter::importImpl: Got here!\n"));
@@ -3980,7 +3980,7 @@
sal_Int32 nLength = aDescriptor.getLength();
const PropertyValue * pValue = aDescriptor.getConstArray();
OUString sURL;
-@@ -115,24 +107,48 @@
+@@ -115,24 +106,49 @@
OSL_ASSERT( 0 );
return sal_False;
}
@@ -3989,6 +3989,7 @@
+
+ WPXSvInputStream input( xInputStream );
+
++#if 1
+ OString aUtf8Passwd;
+
+ WPDConfidence confidence = WPDocument::isFileFormatSupported(&input);
@@ -3998,12 +3999,11 @@
+ int unsuccessfulAttempts = 0;
+ while (true )
+ {
-+ SfxPasswordDialog* pPasswdDlg =
-+ new SfxPasswordDialog( 0 );
-+ pPasswdDlg->SetMinLen(0);
-+ if(!pPasswdDlg->Execute())
++ SfxPasswordDialog aPasswdDlg( 0 );
++ aPasswdDlg.SetMinLen(0);
++ if(!aPasswdDlg.Execute())
+ return sal_False;
-+ String aPasswd = pPasswdDlg->GetPassword();
++ String aPasswd = aPasswdDlg.GetPassword();
+ OUString aUniPasswd(aPasswd.GetBuffer() /*, aPasswd.Len(), RTL_TEXTENCODING_UCS2 */);
+ aUtf8Passwd = OUStringToOString(aUniPasswd, RTL_TEXTENCODING_UTF8);
+ if (WPD_PASSWORD_MATCH_OK == WPDocument::verifyPassword(&input, aUtf8Passwd.getStr()))
@@ -4014,6 +4014,7 @@
+ return sal_False;
+ }
+ }
++#endif
// An XML import service: what we push sax messages to..
- OUString sXMLImportService ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Writer.XMLImporter" ) );
@@ -4050,7 +4051,22 @@
sTypeName = OUString( RTL_CONSTASCII_USTRINGPARAM ( "writer_WordPerfect_Document" ) );
if (sTypeName.getLength())
-@@ -294,3 +310,93 @@
+@@ -263,11 +279,10 @@
+ throw (RuntimeException)
+ {
+ Sequence < OUString > aRet(2);
+-// Sequence < OUString > aRet(1);
+- OUString* pArray = aRet.getArray();
+- pArray[0] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME1 ) );
++ OUString* pArray = aRet.getArray();
++ pArray[0] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME1 ) );
+ pArray[1] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME2 ) );
+- return aRet;
++ return aRet;
+ }
+ #undef SERVICE_NAME2
+ #undef SERVICE_NAME1
+@@ -294,3 +309,125 @@
{
return WordPerfectImportFilter_getSupportedServiceNames();
}
@@ -4071,29 +4087,61 @@
+sal_Int16 SAL_CALL WordPerfectImportFilterDialog::execute()
+ throw (::com::sun::star::uno::RuntimeException)
+{
-+ printf("Here we are my dear\n");
-+ String aPasswd;
++ WPXSvInputStream input( mxInputStream );
++
++ OString aUtf8Passwd;
++
++ WPDConfidence confidence = WPDocument::isFileFormatSupported(&input);
++
++ if (WPD_CONFIDENCE_SUPPORTED_ENCRYPTION == confidence)
+ {
-+ SfxPasswordDialog* pPasswdDlg =
-+ new SfxPasswordDialog( 0 );
-+ if(pPasswdDlg->Execute())
-+ aPasswd = pPasswdDlg->GetPassword();
++ int unsuccessfulAttempts = 0;
++ while (true )
++ {
++ SfxPasswordDialog aPasswdDlg(0);
++ aPasswdDlg.SetMinLen(0);
++ if(!aPasswdDlg.Execute())
++ return com::sun::star::ui::dialogs::ExecutableDialogResults::CANCEL;
++ msPassword = ::rtl::OUString(aPasswdDlg.GetPassword().GetBuffer());
++ aUtf8Passwd = OUStringToOString(msPassword, RTL_TEXTENCODING_UTF8);
++ if (WPD_PASSWORD_MATCH_OK == WPDocument::verifyPassword(&input, aUtf8Passwd.getStr()))
++ break;
++ else
++ unsuccessfulAttempts++;
++ if (unsuccessfulAttempts == 3) // timeout after 3 password atempts
++ return com::sun::star::ui::dialogs::ExecutableDialogResults::CANCEL;
++ }
+ }
-+ if (true)
-+ return com::sun::star::ui::dialogs::ExecutableDialogResults::OK;
-+ else
-+ return com::sun::star::ui::dialogs::ExecutableDialogResults::CANCEL;
++ return com::sun::star::ui::dialogs::ExecutableDialogResults::OK;
+}
+
+uno::Sequence<beans::PropertyValue> SAL_CALL WordPerfectImportFilterDialog::getPropertyValues() throw(uno::RuntimeException)
+{
-+ return uno::Sequence<beans::PropertyValue>();
++ uno::Sequence<beans::PropertyValue> aRet(1);
++ beans::PropertyValue* pArray = aRet.getArray();
++
++ pArray[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Password") );
++ pArray[0].Value <<= msPassword;
++
++ return aRet;
+}
+
-+void SAL_CALL WordPerfectImportFilterDialog::setPropertyValues( const uno::Sequence<beans::PropertyValue>& )
++void SAL_CALL WordPerfectImportFilterDialog::setPropertyValues( const uno::Sequence<beans::PropertyValue>& aProps)
+ throw(beans::UnknownPropertyException, beans::PropertyVetoException,
+ lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
+{
++ const beans::PropertyValue* pPropArray = aProps.getConstArray();
++ long nPropCount = aProps.getLength();
++ for (long i = 0; i < nPropCount; i++)
++ {
++ const beans::PropertyValue& rProp = pPropArray[i];
++ ::rtl::OUString aPropName = rProp.Name;
++
++ if ( aPropName == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Password")) )
++ rProp.Value >>= msPassword;
++ else if ( aPropName.equalsAscii( "InputStream" ) )
++ rProp.Value >>= mxInputStream;
++ }
+}
+
+
@@ -4144,9 +4192,9 @@
+{
+ return (cppu::OWeakObject*) new WordPerfectImportFilterDialog( rSMgr );
+}
---- writerperfect//source/wpdimp/WordPerfectImportFilter.hxx 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/wpdimp/WordPerfectImportFilter.hxx 2008-06-25 14:19:14.000000000 +0200
-@@ -32,9 +32,12 @@
+--- writerperfect//source/wpdimp/WordPerfectImportFilter.hxx 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/wpdimp/WordPerfectImportFilter.hxx 2008-06-25 23:21:42.000000000 +0200
+@@ -32,9 +32,13 @@
#include <com/sun/star/document/XFilter.hpp>
#include <com/sun/star/document/XImporter.hpp>
#include <com/sun/star/document/XExtendedFilterDetection.hpp>
@@ -4155,11 +4203,12 @@
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
++#include <com/sun/star/io/XInputStream.hpp>
+#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/implbase5.hxx>
enum FilterType
-@@ -112,4 +115,58 @@
+@@ -112,4 +116,60 @@
SAL_CALL WordPerfectImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr)
throw ( ::com::sun::star::uno::Exception );
@@ -4171,6 +4220,8 @@
+>
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
++ ::rtl::OUString msPassword;
++ ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > mxInputStream;
+
+ ~WordPerfectImportFilterDialog();
+
@@ -4218,8 +4269,8 @@
+ throw ( ::com::sun::star::uno::Exception );
+
#endif
---- writerperfect//source/wpdimp/wpft_genericfilter.cxx 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/wpdimp/wpft_genericfilter.cxx 2008-06-25 15:38:47.000000000 +0200
+--- writerperfect//source/wpdimp/wpft_genericfilter.cxx 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/wpdimp/wpft_genericfilter.cxx 2008-06-25 22:56:12.000000000 +0200
@@ -55,14 +55,22 @@
{
sal_Int32 nPos = 0;
@@ -4277,8 +4328,8 @@
return pRet;
}
}
---- writerperfect//source/wpgimp/makefile.mk 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/wpgimp/makefile.mk 2008-06-25 12:39:46.000000000 +0200
+--- writerperfect//source/wpgimp/makefile.mk 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/wpgimp/makefile.mk 2008-06-25 22:56:12.000000000 +0200
@@ -12,12 +12,6 @@
INCPRE+=$(SOLARVER)$/$(UPD)$/$(INPATH)$/inc$/libwpd
.ENDIF
@@ -4300,8 +4351,8 @@
$(SLO)$/WPGImportFilter.obj \
$(SLO)$/wpgimport_genericfilter.obj
---- writerperfect//source/wpgimp/WPGImportFilter.cxx 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/wpgimp/WPGImportFilter.cxx 2008-06-25 12:39:46.000000000 +0200
+--- writerperfect//source/wpgimp/WPGImportFilter.cxx 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/wpgimp/WPGImportFilter.cxx 2008-06-25 22:56:12.000000000 +0200
@@ -75,7 +75,7 @@
#endif
@@ -4345,8 +4396,8 @@
if (libwpg::WPGraphics::isSupported(input))
sTypeName = OUString( RTL_CONSTASCII_USTRINGPARAM ( "draw_WordPerfect_Graphics" ) );
---- writerperfect//source/wpsimp/MSWorksCollector.cxx 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/wpsimp/MSWorksCollector.cxx 2008-06-25 12:39:46.000000000 +0200
+--- writerperfect//source/wpsimp/MSWorksCollector.cxx 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/wpsimp/MSWorksCollector.cxx 2008-06-25 22:56:12.000000000 +0200
@@ -29,7 +29,7 @@
#include "MSWorksCollector.hxx"
#include <libwps/WPSDocument.h>
@@ -4368,8 +4419,8 @@
if (result != WPS_OK)
return false;
---- writerperfect//source/wpsimp/MSWorksCollector.hxx 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/wpsimp/MSWorksCollector.hxx 2008-06-25 12:39:46.000000000 +0200
+--- writerperfect//source/wpsimp/MSWorksCollector.hxx 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/wpsimp/MSWorksCollector.hxx 2008-06-25 22:56:12.000000000 +0200
@@ -30,12 +30,13 @@
#define _MSWORKSCOLLECTOR_HXX
@@ -4386,8 +4437,8 @@
+ bool parseSourceDocument(WPXInputStream &input);
};
#endif
---- writerperfect//source/wpsimp/MSWorksImportFilter.cxx 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//source/wpsimp/MSWorksImportFilter.cxx 2008-06-25 12:39:46.000000000 +0200
+--- writerperfect//source/wpsimp/MSWorksImportFilter.cxx 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//source/wpsimp/MSWorksImportFilter.cxx 2008-06-25 22:56:12.000000000 +0200
@@ -127,7 +127,7 @@
sFileName = OUStringToOString(sURL, RTL_TEXTENCODING_INFO_ASCII);
@@ -4406,8 +4457,8 @@
if ((confidence == WPS_CONFIDENCE_EXCELLENT) || (confidence == WPS_CONFIDENCE_GOOD))
sTypeName = OUString( RTL_CONSTASCII_USTRINGPARAM ( "writer_MS_Works_Document" ) );
---- writerperfect//util/makefile.mk 2008-06-25 12:39:35.000000000 +0200
-+++ writerperfect//util/makefile.mk 2008-06-25 12:39:46.000000000 +0200
+--- writerperfect//util/makefile.mk 2008-06-25 22:55:53.000000000 +0200
++++ writerperfect//util/makefile.mk 2008-06-25 22:56:12.000000000 +0200
@@ -44,6 +44,8 @@
$(SOTLIB) \
$(SO2LIB) \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]