[ooo-build-commit] Branch 'ooo/master' - 3 commits - comphelper/inc comphelper/source sax/source svtools/inc svtools/source vcl/source

Jan Holesovsky kendy at kemper.freedesktop.org
Mon Sep 7 18:30:00 PDT 2009


 comphelper/inc/comphelper/docpasswordhelper.hxx  |  212 +++++++++++++++++++++++
 comphelper/inc/comphelper/docpasswordrequest.hxx |   91 +++++++++
 comphelper/inc/comphelper/mediadescriptor.hxx    |   76 ++++----
 comphelper/source/misc/docpasswordhelper.cxx     |  152 ++++++++++++++++
 comphelper/source/misc/docpasswordrequest.cxx    |  153 ++++++++++++++++
 comphelper/source/misc/makefile.mk               |    2 
 comphelper/source/misc/mediadescriptor.cxx       |   14 +
 sax/source/expatwrap/sax_expat.cxx               |   18 +
 sax/source/expatwrap/saxwriter.cxx               |   21 ++
 svtools/inc/docmspasswdrequest.hxx               |   72 -------
 svtools/inc/docpasswdrequest.hxx                 |   71 -------
 svtools/source/misc1/docmspasswdrequest.cxx      |  143 ---------------
 svtools/source/misc1/docpasswdrequest.cxx        |  142 ---------------
 svtools/source/misc1/makefile.mk                 |    4 
 vcl/source/gdi/outdev3.cxx                       |    2 
 15 files changed, 702 insertions(+), 471 deletions(-)

New commits:
commit 3ab6742336b61dd40e673b0af8a3127978ca6a32
Author: Oliver Bolte <obo at openoffice.org>
Date:   Mon Sep 7 15:38:19 2009 +0000

    CWS-TOOLING: integrate CWS calcsheetdata
    2009-08-13 16:18:48 +0200 nn  r274950 : #i102616# shared/remote files, better handling of formula results
    2009-08-12 11:17:30 +0200 nn  r274884 : CWS-TOOLING: rebase CWS calcsheetdata to trunk at 274622 (milestone: DEV300:m54)
    2009-08-12 10:30:47 +0200 nn  r274881 : #i102616# some clean-up
    2009-08-11 19:01:18 +0200 nn  r274876 : #i102616# store loaded namespaces, so prefixes remain valid
    2009-08-11 19:00:49 +0200 nn  r274875 : #i102616# store loaded namespaces, so prefixes remain valid
    2009-08-10 19:12:04 +0200 nn  r274835 : #i102616# detective, notes, encoding, error handling
    2009-08-07 11:18:46 +0200 nn  r274751 : #i102616# use new method SvXMLAutoStylePoolP::AddNamed
    2009-08-07 11:18:15 +0200 nn  r274750 : #i102616# new method SvXMLAutoStylePoolP::AddNamed
    2009-08-06 18:02:42 +0200 nn  r274740 : #i102616# modification: shapes, notes, pending row heights; skip sheets in export iterator
    2009-08-05 18:41:59 +0200 nn  r274694 : #i102616# handle text styles in notes
    2009-08-03 18:55:59 +0200 nn  r274594 : #i102616# handle text styles in cells
    2009-07-31 19:00:06 +0200 nn  r274548 : #i102616# handle styles for notes
    2009-07-28 16:46:20 +0200 nn  r274414 : missed a conflict
    2009-07-28 14:01:56 +0200 nn  r274404 : CWS-TOOLING: rebase CWS calcsheetdata to trunk at 274203 (milestone: DEV300:m53)
    2009-07-23 18:28:47 +0200 nn  r274278 : #i102616# handle table styles
    2009-07-22 15:40:24 +0200 nn  r274244 : #i102616# handle row styles
    2009-07-21 20:09:37 +0200 nn  r274211 : #i102616# handle column styles
    2009-07-16 13:00:18 +0200 nn  r274043 : #i102616# invalidate all stream positions when inserting/deleting sheets
    2009-07-15 17:41:15 +0200 nn  r274021 : #i102616# don't collect cell styles twice for copied sheets
    2009-07-14 18:36:11 +0200 nn  r273985 : #i102616# allow to query stream position, clear buffer
    2009-07-14 18:32:10 +0200 nn  r273984 : #i102616# allow to specify a name for an autostyle
    2009-07-09 22:01:23 +0200 nn  r273870 : #i102616# copy stream for unchanged sheets
    2009-07-08 18:11:42 +0200 nn  r273844 : #i102616# store stream positions of sheets
    2009-06-24 19:08:18 +0200 nn  r273363 : #i102616# detect changed sheets since loading
    2009-06-09 15:53:32 +0200 nn  r272774 : #i102616# store automatic cell style information after loading

diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx
index ed975cc..b43fa34 100644
--- a/sax/source/expatwrap/sax_expat.cxx
+++ b/sax/source/expatwrap/sax_expat.cxx
@@ -39,6 +39,7 @@
 #include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp>
 #include <com/sun/star/xml/sax/XParser.hpp>
 #include <com/sun/star/xml/sax/SAXParseException.hpp>
+#include <com/sun/star/io/XSeekable.hpp>
 
 #include <cppuhelper/factory.hxx>
 #include <cppuhelper/weak.hxx>
@@ -374,7 +375,8 @@ extern "C"
 // LocatorImpl
 //---------------------------------------------
 class LocatorImpl :
-    public WeakImplHelper1< XLocator > 
+    public WeakImplHelper2< XLocator, com::sun::star::io::XSeekable >
+    // should use a different interface for stream positions!
 {
 public:
     LocatorImpl( SaxExpatParser_Impl *p )
@@ -400,6 +402,20 @@ public: //XLocator
         return m_pParser->getEntity().structSource.sSystemId;
     }
 
+    // XSeekable (only for getPosition)
+
+    virtual void SAL_CALL seek( sal_Int64 ) throw()
+    {
+    }
+    virtual sal_Int64 SAL_CALL getPosition() throw()
+    {
+        return XML_GetCurrentByteIndex( m_pParser->getEntity().pParser );
+    }
+    virtual ::sal_Int64 SAL_CALL getLength() throw()
+    {
+        return 0;
+    }
+
 private:
 
     SaxExpatParser_Impl *m_pParser;
diff --git a/sax/source/expatwrap/saxwriter.cxx b/sax/source/expatwrap/saxwriter.cxx
index 246d5ef..63f8def 100644
--- a/sax/source/expatwrap/saxwriter.cxx
+++ b/sax/source/expatwrap/saxwriter.cxx
@@ -208,6 +208,8 @@ public:
 // If there are invalid characters in the string it returns sal_False.
 // Than the calling method has to throw the needed Exception.
     inline sal_Bool comment(const rtl::OUString& rComment) throw( SAXException );
+
+    inline void clearBuffer() throw( SAXException );
 };
 
 const sal_Bool g_bValidCharsBelow32[32] =
@@ -693,6 +695,17 @@ inline void SaxWriterHelper::endDocument() throw( SAXException )
     }
 }
 
+inline void SaxWriterHelper::clearBuffer() throw( SAXException )
+{
+    FinishStartElement();
+    if (nCurrentPos > 0)
+    {
+        m_Sequence.realloc(nCurrentPos);
+        nCurrentPos = writeSequence();
+        m_Sequence.realloc(SEQUENCESIZE);
+    }
+}
+
 inline sal_Bool SaxWriterHelper::processingInstruction(const rtl::OUString& rTarget, const rtl::OUString& rData) throw( SAXException )
 {
     FinishStartElement();
@@ -927,12 +940,20 @@ public: // XActiveDataSource
     virtual void SAL_CALL setOutputStream(const Reference< XOutputStream > & aStream)
         throw (RuntimeException)
             {
+                // temporary: set same stream again to clear buffer
+                if ( m_out == aStream && mp_SaxWriterHelper && m_bDocStarted )
+                    mp_SaxWriterHelper->clearBuffer();
+                else
+                {
+
                 m_out = aStream;
                 delete mp_SaxWriterHelper;
                 mp_SaxWriterHelper = new SaxWriterHelper(m_out);
                 m_bDocStarted = sal_False;
                 m_nLevel = 0;
                 m_bIsCDATA = sal_False;
+
+                }
             }
     virtual Reference< XOutputStream >  SAL_CALL getOutputStream(void)
         throw(RuntimeException)
commit f7214dbd04e03f2ea7e4d1b19a549d0a1b6c51a5
Author: Oliver Bolte <obo at openoffice.org>
Date:   Mon Sep 7 14:41:16 2009 +0000

    CWS-TOOLING: integrate CWS dr72
    2009-08-26 10:24:00 +0200 dr  r275402 : #i92645# CODEPAGE is encrypted...
    2009-08-24 14:37:36 +0200 dr  r275316 : #i10000# enable exceptions for xlroot.cxx
    2009-08-24 14:33:15 +0200 dr  r275313 : #i10000# link openssl under solaris correctly
    2009-08-21 17:41:16 +0200 dr  r275267 : #i10000# unxlngi6 warning
    2009-08-21 15:35:56 +0200 dr  r275265 : #i10000# remove files again, already deleted in previous milestone...
    2009-08-21 11:24:57 +0200 dr  r275227 : #160401# port to DEV300
    2009-08-21 09:53:45 +0200 dr  r275221 : #i92645# full support for encrypted Word2007 files
    2009-08-21 09:50:52 +0200 dr  r275219 : #i92645# final changes for decryption
    2009-08-20 19:48:40 +0200 dr  r275195 : #i104370# missing parentheses, patch from cmc
    2009-08-20 18:28:22 +0200 dr  r275193 : #i92645# rework package decryption to repair 'Reload Document' functionality
    2009-08-20 13:55:14 +0200 dr  r275179 : #i92645# add new property names
    2009-08-19 19:24:21 +0200 dr  r275159 : #160401# open writeprotected files read-only, merged to DEV300
    2009-08-18 14:41:47 +0200 dr  r275109 : #i92645# add 'Aborted' property
    2009-08-18 11:20:34 +0200 dr  r275084 : #i92645# write back password to medium
    2009-08-17 17:52:51 +0200 dr  r275066 : #i92645# detect Word2007 docs with oox detection impl, this adds support of encryped Word2007; correct detection of templates and macro-enabled docs
    2009-08-17 17:51:31 +0200 dr  r275065 : #i92645# detect Word2007 docs with oox detection impl, this adds support of encryped Word2007; correct detection of templates and macro-enabled docs
    2009-08-17 11:06:39 +0200 dr  r275035 : #i92645# more password handling
    2009-08-17 11:05:21 +0200 dr  r275034 : #i92645# use new password input mechanism for BIFF filter and dumper in oox
    2009-08-14 16:33:53 +0200 nn  r274996 : #i104228# DelBroadcastAreasInRange: remove area from hash_set before deleting
    2009-08-14 16:27:12 +0200 nn  r274995 : #i104059# restore a change lost in the integration of fhawfixes1
    2009-08-14 16:24:00 +0200 dr  r274994 : #i92645# adapt BIFF import to latest changes
    2009-08-14 16:21:30 +0200 dr  r274993 : #i92645# adapt BIFF import to latest changes
    2009-08-14 16:20:43 +0200 dr  r274992 : #i92645# do not add default passwords to media descriptor
    2009-08-13 19:20:45 +0200 dr  r274965 : #i92645# add a helper to request a document password
    2009-08-13 19:09:35 +0200 dr  r274964 : #i92645# add a helper to request a document password
    2009-08-13 19:09:03 +0200 dr  r274963 : #i92645# add a helper to request a document password
    2009-08-13 14:35:01 +0200 dr  r274946 : #i92645# comment typo
    2009-08-13 14:33:47 +0200 dr  r274945 : #i92645# add a helper to request a document password
    2009-08-13 14:04:47 +0200 dr  r274941 : #i92645# add a helper to request a document password
    2009-08-13 14:04:22 +0200 dr  r274940 : #i92645# add a helper to request a document password
    2009-08-13 11:16:27 +0200 dr  r274927 : #i42303# show quick help if field name too long for button
    2009-08-13 10:55:48 +0200 dr  r274925 : #i31600# cut field name and add ellipsis, if too long for button
    2009-08-12 18:47:26 +0200 dr  r274914 : #i92645# ask user for a password
    2009-08-12 18:02:39 +0200 dr  r274909 : #i104183# move svtools/DocPasswordRequest to comphelper to be able to use it in oox
    2009-08-12 16:59:11 +0200 dr  r274906 : #i104183# move svtools/DocPasswordRequest to comphelper to be able to use it in oox
    2009-08-12 16:41:18 +0200 dr  r274905 : #i104183# move svtools/DocPasswordRequest to comphelper to be able to use it in oox
    2009-08-12 16:40:33 +0200 dr  r274904 : #i104183# move svtools/DocPasswordRequest to comphelper to be able to use it in oox
    2009-08-12 16:40:08 +0200 dr  r274903 : #i104183# move svtools/DocPasswordRequest to comphelper to be able to use it in oox
    2009-08-12 16:39:30 +0200 dr  r274902 : #i104183# move svtools/DocPasswordRequest to comphelper to be able to use it in oox
    2009-08-12 16:15:28 +0200 dr  r274899 : #i104183# move svtools/DocPasswordRequest to comphelper to be able to use it in oox
    2009-08-11 19:51:12 +0200 dr  r274877 : #i92645# open encrypted MSOOXML package protected with standard XL password 'VelvetSweatshop'

diff --git a/comphelper/inc/comphelper/docpasswordhelper.hxx b/comphelper/inc/comphelper/docpasswordhelper.hxx
new file mode 100644
index 0000000..90927a3
--- /dev/null
+++ b/comphelper/inc/comphelper/docpasswordhelper.hxx
@@ -0,0 +1,212 @@
+/*************************************************************************
+ *
+ * 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: docpasswordhelper.hxx,v $
+ * $Revision: 1.1 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#ifndef COMPHELPER_DOCPASSWORDHELPR_HXX
+#define COMPHELPER_DOCPASSWORDHELPR_HXX
+
+#include "comphelper/comphelperdllapi.h"
+#include <vector>
+#include "comphelper/docpasswordrequest.hxx"
+
+namespace com { namespace sun { namespace star { namespace task { class XInteractionHandler; } } } }
+
+namespace comphelper {
+
+class MediaDescriptor;
+
+// ============================================================================
+
+enum DocPasswordVerifierResult
+{
+    DocPasswordVerifierResult_OK,
+    DocPasswordVerifierResult_WRONG_PASSWORD,
+    DocPasswordVerifierResult_ABORT
+};
+
+// ============================================================================
+
+/** Base class for a password verifier used by the DocPasswordHelper class
+    below.
+
+    Users have to implement the virtual function and pass an instance of the
+    verifier to one of the password request functions.
+ */
+class COMPHELPER_DLLPUBLIC IDocPasswordVerifier
+{
+public:
+    virtual             ~IDocPasswordVerifier();
+
+    /** Will be called everytime a password needs to be verified.
+
+        @return  The result of the verification.
+            - DocPasswordVerifierResult_OK, if and only if the passed password
+              is valid and can be used to process the related document.
+            - DocPasswordVerifierResult_WRONG_PASSWORD, if the password is
+              wrong. The user may be asked again for a new password.
+            - DocPasswordVerifierResult_ABORT, if an unrecoverable error
+              occured while password verification. The password request loop
+              will be aborted.
+     */
+    virtual DocPasswordVerifierResult verifyPassword( const ::rtl::OUString& rPassword ) = 0;
+
+};
+
+// ============================================================================
+
+/** Helper that asks for a document password and checks its validity.
+ */
+class COMPHELPER_DLLPUBLIC DocPasswordHelper
+{
+public:
+    // ------------------------------------------------------------------------
+
+    /** This helper function tries to request and verify a password to load a
+        protected document.
+
+        First, the list of default passwords will be tried if provided. This is
+        needed by import filters for external file formats that have to check a
+        predefined password in some cases without asking the user for a
+        password. Every password is checked using the passed password verifier.
+
+        If not successful, the passed password of a medium is tried, that has
+        been set e.g. by an API call to load a document. If existing, the
+        password is checked using the passed password verifier.
+
+        If still not successful, the passed interaction handler is used to
+        request a password from the user. This will be repeated until the
+        passed password verifier validates the entered password, or if the user
+        chooses to cancel password input.
+
+        @param rVerifier
+            The password verifier used to check every processed password.
+
+        @param rMediaPassword
+            If not empty, will be passed to the password validator before
+            requesting a password from the user. This password usually should
+            be querried from a media descriptor.
+
+        @param rxInteractHandler
+            The interaction handler that will be used to request a password
+            from the user, e.g. by showing a password input dialog.
+
+        @param rDocumentName
+            The name of the related document that will be shown in the password
+            input dialog.
+
+        @param eRequestType
+            The password request type that will be passed to the
+            DocPasswordRequest object created internally. See
+            docpasswordrequest.hxx for more details.
+
+        @param pDefaultPasswords
+            If not null, contains default passwords that will be tried before a
+            password will be requested from the media descriptor or the user.
+
+        @param pbIsDefaultPassword
+            (output parameter) If not null, the type of the found password will
+            be returned. True means the password has been found in the passed
+            list of default passwords. False means the password has been taken
+            from the rMediaPassword parameter or has been entered by the user.
+
+        @return
+            If not empty, contains the password that has been validated by the
+            passed password verifier. If empty, no valid password has been
+            found, or the user has chossen to cancel password input.
+     */
+    static ::rtl::OUString requestAndVerifyDocPassword(
+                            IDocPasswordVerifier& rVerifier,
+                            const ::rtl::OUString& rMediaPassword,
+                            const ::com::sun::star::uno::Reference<
+                                ::com::sun::star::task::XInteractionHandler >& rxInteractHandler,
+                            const ::rtl::OUString& rDocumentName,
+                            DocPasswordRequestType eRequestType,
+                            const ::std::vector< ::rtl::OUString >* pDefaultPasswords = 0,
+                            bool* pbIsDefaultPassword = 0 );
+
+    // ------------------------------------------------------------------------
+
+    /** This helper function tries to find a password for the document
+        described by the passed media descriptor.
+
+        First, the list of default passwords will be tried if provided. This is
+        needed by import filters for external file formats that have to check a
+        predefined password in some cases without asking the user for a
+        password. Every password is checked using the passed password verifier.
+
+        If not successful, the passed media descriptor is asked for a password,
+        that has been set e.g. by an API call to load a document. If existing,
+        the password is checked using the passed password verifier.
+
+        If still not successful, the interaction handler contained in the
+        passed nmedia descriptor is used to request a password from the user.
+        This will be repeated until the passed password verifier validates the
+        entered password, or if the user chooses to cancel password input.
+
+        @param rVerifier
+            The password verifier used to check every processed password.
+
+        @param rMediaDesc
+            The media descriptor of the document that needs to be opened with
+            a password. If a valid password (that is not contained in the
+            passed list of default passwords) was found, it will be inserted
+            into the "Password" property of this descriptor.
+
+        @param eRequestType
+            The password request type that will be passed to the
+            DocPasswordRequest object created internally. See
+            docpasswordrequest.hxx for more details.
+
+        @param pDefaultPasswords
+            If not null, contains default passwords that will be tried before a
+            password will be requested from the media descriptor or the user.
+
+        @return
+            If not empty, contains the password that has been validated by the
+            passed password verifier. If empty, no valid password has been
+            found, or the user has chossen to cancel password input.
+     */
+    static ::rtl::OUString requestAndVerifyDocPassword(
+                            IDocPasswordVerifier& rVerifier,
+                            MediaDescriptor& rMediaDesc,
+                            DocPasswordRequestType eRequestType,
+                            const ::std::vector< ::rtl::OUString >* pDefaultPasswords = 0 );
+
+    // ------------------------------------------------------------------------
+
+private:
+                        ~DocPasswordHelper();
+};
+
+// ============================================================================
+
+} // namespace comphelper
+
+#endif
+
diff --git a/comphelper/inc/comphelper/docpasswordrequest.hxx b/comphelper/inc/comphelper/docpasswordrequest.hxx
new file mode 100644
index 0000000..b1e042e
--- /dev/null
+++ b/comphelper/inc/comphelper/docpasswordrequest.hxx
@@ -0,0 +1,91 @@
+/*************************************************************************
+ *
+ * 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: docpasswordrequest.hxx,v $
+ * $Revision: 1.1 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#ifndef COMPHELPER_DOCPASSWORDREQUEST_HXX
+#define COMPHELPER_DOCPASSWORDREQUEST_HXX
+
+#include "comphelper/comphelperdllapi.h"
+#include <com/sun/star/task/PasswordRequestMode.hpp>
+#include <com/sun/star/task/XInteractionRequest.hpp>
+#include <cppuhelper/implbase1.hxx>
+
+namespace comphelper {
+
+// ============================================================================
+
+/** Selects which UNO document password request type to use. */
+enum DocPasswordRequestType
+{
+    DocPasswordRequestType_STANDARD,    /// Uses the standard com.sun.star.task.DocumentPasswordRequest request.
+    DocPasswordRequestType_MS           /// Uses the com.sun.star.task.DocumentMSPasswordRequest request.
+};
+
+// ============================================================================
+
+class AbortContinuation;
+class PasswordContinuation;
+
+/** Implements the task.XInteractionRequest interface for requesting a password
+    string for a document.
+ */
+class COMPHELPER_DLLPUBLIC DocPasswordRequest : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest >
+{
+public:
+    explicit            DocPasswordRequest(
+                            DocPasswordRequestType eType,
+                            ::com::sun::star::task::PasswordRequestMode eMode,
+                            const ::rtl::OUString& rDocumentName );
+    virtual             ~DocPasswordRequest();
+
+    bool                isAbort() const;
+    bool                isPassword() const;
+    ::rtl::OUString     getPassword() const;
+
+private:
+    virtual ::com::sun::star::uno::Any SAL_CALL
+                        getRequest() throw( ::com::sun::star::uno::RuntimeException );
+
+    virtual ::com::sun::star::uno::Sequence<
+                ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > SAL_CALL
+                        getContinuations() throw( ::com::sun::star::uno::RuntimeException );
+
+private:
+    ::com::sun::star::uno::Any maRequest;
+    ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > > maContinuations;
+    AbortContinuation*  mpAbort;
+    PasswordContinuation* mpPassword;
+};
+
+// ============================================================================
+
+} // namespace comphelper
+
+#endif
+
diff --git a/comphelper/inc/comphelper/mediadescriptor.hxx b/comphelper/inc/comphelper/mediadescriptor.hxx
index e1bfcf7..e388c0b 100644
--- a/comphelper/inc/comphelper/mediadescriptor.hxx
+++ b/comphelper/inc/comphelper/mediadescriptor.hxx
@@ -1,7 +1,7 @@
 /*************************************************************************
  *
  * 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
@@ -51,31 +51,33 @@ namespace comphelper{
 // definitions
 
 /** @short  can be used to work with a <type scope="::com::sun::star::document">MediaDescriptor</type>
-            struct.  
+            struct.
 
     @descr  It wraps a ::std::hash_map around the Sequence< css::beans::PropertyValue >, which
             represent the MediaDescriptor item.
             Further this helper defines often used functions (as e.g. open of the required streams,
             consistent checks etcpp.) and it defines all useable property names.
-            
-    @attention  This class isnt threadsafe and must be guarded from outside!            
+
+    @attention  This class isnt threadsafe and must be guarded from outside!
  */
 class COMPHELPER_DLLPUBLIC MediaDescriptor : public SequenceAsHashMap
 {
     //-------------------------------------------
     // const
     public:
-    
+
         //---------------------------------------
         /** @short  these methods can be used to get the different property names
                     as static const OUString values.
-                    
+
             @descr  Because definition and declaration of static const class members
                     does not work as expected under windows (under unix it works as well)
-                    these way must be used :-(                    
+                    these way must be used :-(
           */
+        static const ::rtl::OUString& PROP_ABORTED();
         static const ::rtl::OUString& PROP_ASTEMPLATE();
         static const ::rtl::OUString& PROP_CHARACTERSET();
+        static const ::rtl::OUString& PROP_COMPONENTDATA();
         static const ::rtl::OUString& PROP_DEEPDETECTION();
         static const ::rtl::OUString& PROP_DETECTSERVICE();
         static const ::rtl::OUString& PROP_DOCUMENTSERVICE();
@@ -131,15 +133,15 @@ class COMPHELPER_DLLPUBLIC MediaDescriptor : public SequenceAsHashMap
         //---------------------------------------
         /** @short  these ctors do nothing - excepting that they forward
                     the given parameters to the base class ctors.
-                    
+
             @descr  The ctros must be overwritten to resolve conflicts with
                     the default ctors of the compiler :-(.
-         */                    
+         */
         MediaDescriptor();
         MediaDescriptor(const ::com::sun::star::uno::Any& aSource);
         MediaDescriptor(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lSource);
         MediaDescriptor(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& lSource);
-        
+
         //---------------------------------------
         /** @short  it checks if the descriptor already has a valid
                     InputStream item and creates a new one, if not.
@@ -147,12 +149,12 @@ class COMPHELPER_DLLPUBLIC MediaDescriptor : public SequenceAsHashMap
             @descr  This method uses the current items of this MediaDescriptor,
                     to open the stream (as e.g. URL, ReadOnly, PostData etcpp.).
                     It creates a seekable stream and put it into the descriptor.
-                    
+
                     A might existing InteractionHandler will be used automaticly,
                     to solve problems!
 
                     In case of local file the system file locking is used.
- 
+
             @return TRUE, if the stream was already part of the descriptor or could
                     be created as new item. FALSE otherwhise.
          */
@@ -165,10 +167,10 @@ class COMPHELPER_DLLPUBLIC MediaDescriptor : public SequenceAsHashMap
             @descr  This method uses the current items of this MediaDescriptor,
                     to open the stream (as e.g. URL, ReadOnly, PostData etcpp.).
                     It creates a seekable stream and put it into the descriptor.
-                    
+
                     A might existing InteractionHandler will be used automaticly,
                     to solve problems!
- 
+
                     In case of local file the system file locking is used based on
                     configuration settings.
 
@@ -176,14 +178,14 @@ class COMPHELPER_DLLPUBLIC MediaDescriptor : public SequenceAsHashMap
                     be created as new item. FALSE otherwhise.
          */
         sal_Bool addInputStreamOwnLock();
-        
+
         //---------------------------------------
         /** @short  it checks if the descriptor describes a readonly stream.
 
             @descr  The descriptor itself isnt changed doing so.
                     It's only checked if the stream seems to be based
                     of a real readonly file.
-                    
+
             @Attention
                     We dont check the property "ReadOnly" here. Because
                     this property can be set from outside and overwrites
@@ -191,30 +193,30 @@ class COMPHELPER_DLLPUBLIC MediaDescriptor : public SequenceAsHashMap
                     If e.g. the stream could be opened read/write ...
                     but "ReadOnly" property is set to TRUE, this means:
                     show a readonly UI on top of this read/write stream.
-                    
+
             @return TRUE, if the stream must be interpreted as readonly ...
                     FALSE otherwhise.
          */
         sal_Bool isStreamReadOnly() const;
-        
+
     //-------------------------------------------
     // helper
     private:
-    
+
         //---------------------------------------
         /** @short  tries to open a stream by using the given PostData stream.
-        
-            @descr  The stream is used directly ...  
-            
+
+            @descr  The stream is used directly ...
+
                     The MediaDescriptor itself is changed inside this method.
                     Means: the stream is added internal and not returned by a value.
-                    
+
             @param  _rxPostData
                     the PostData stream.
-                    
+
             @return TRUE if the stream could be added successfully.
                     Note: If FALSE is returned, the error was already handled inside!
-            
+
             @throw  [css::uno::RuntimeException]
                     if the MediaDescriptor seems to be invalid!
 
@@ -224,26 +226,26 @@ class COMPHELPER_DLLPUBLIC MediaDescriptor : public SequenceAsHashMap
         COMPHELPER_DLLPRIVATE sal_Bool impl_openStreamWithPostData(
             const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& _rxPostData
             )   throw(::com::sun::star::uno::RuntimeException);
-        
+
         //---------------------------------------
         /** @short  tries to open a stream by using the given URL.
-        
+
             @descr  First it tries to open the content in r/w mode (if its
                     allowed to do so). Only in case its not allowed or it failed
                     the stream will be tried to open in readonly mode.
-            
+
                     The MediaDescriptor itself is changed inside this method.
                     Means: the stream is added internal and not returned by a value.
-                    
+
             @param  sURL
                     the URL for open.
- 
+
             @param  bLockFile
                     specifies whether the file should be locked
 
             @return TRUE if the stream could be added successfully.
                     Note: If FALSE is returned, the error was already handled inside!
-            
+
             @throw  [css::uno::RuntimeException]
                     if the MediaDescriptor seems to be invalid!
          */
@@ -251,18 +253,18 @@ class COMPHELPER_DLLPUBLIC MediaDescriptor : public SequenceAsHashMap
             const ::rtl::OUString& sURL,
             sal_Bool bLockFile
             ) throw(::com::sun::star::uno::RuntimeException);
-            
+
         //---------------------------------------
         /** @short  some URL parts can make trouble for opening streams (e.g. jumpmarks.)
                     An URL should be "normalized" before its used.
-                    
+
             @param  sURL
                     the original URL (e.g. including a jumpmark)
-                    
+
             @return [string]
                     the "normalized" URL (e.g. without jumpmark)
          */
-        COMPHELPER_DLLPRIVATE ::rtl::OUString impl_normalizeURL(const ::rtl::OUString& sURL);            
+        COMPHELPER_DLLPRIVATE ::rtl::OUString impl_normalizeURL(const ::rtl::OUString& sURL);
 
         //---------------------------------------
         /** @short  it checks if the descriptor already has a valid
@@ -271,10 +273,10 @@ class COMPHELPER_DLLPUBLIC MediaDescriptor : public SequenceAsHashMap
             @descr  This method uses the current items of this MediaDescriptor,
                     to open the stream (as e.g. URL, ReadOnly, PostData etcpp.).
                     It creates a seekable stream and put it into the descriptor.
-                    
+
                     A might existing InteractionHandler will be used automaticly,
                     to solve problems!
- 
+
             @param  bLockFile
                     specifies whether the file should be locked
 
diff --git a/comphelper/source/misc/docpasswordhelper.cxx b/comphelper/source/misc/docpasswordhelper.cxx
new file mode 100644
index 0000000..1f362c0
--- /dev/null
+++ b/comphelper/source/misc/docpasswordhelper.cxx
@@ -0,0 +1,152 @@
+/*************************************************************************
+ *
+ * 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: docpasswordhelper.cxx,v $
+ * $Revision: 1.1 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_comphelper.hxx"
+
+#include "comphelper/docpasswordhelper.hxx"
+#include <com/sun/star/task/XInteractionHandler.hpp>
+#include "comphelper/mediadescriptor.hxx"
+
+using ::rtl::OUString;
+using ::com::sun::star::uno::Exception;
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::UNO_SET_THROW;
+using ::com::sun::star::task::PasswordRequestMode;
+using ::com::sun::star::task::PasswordRequestMode_PASSWORD_ENTER;
+using ::com::sun::star::task::PasswordRequestMode_PASSWORD_REENTER;
+using ::com::sun::star::task::XInteractionHandler;
+using ::com::sun::star::task::XInteractionRequest;
+
+namespace comphelper {
+
+// ============================================================================
+
+IDocPasswordVerifier::~IDocPasswordVerifier()
+{
+}
+
+// ============================================================================
+
+/*static*/ OUString DocPasswordHelper::requestAndVerifyDocPassword(
+        IDocPasswordVerifier& rVerifier,
+        const OUString& rMediaPassword,
+        const Reference< XInteractionHandler >& rxInteractHandler,
+        const OUString& rDocumentName,
+        DocPasswordRequestType eRequestType,
+        const ::std::vector< OUString >* pDefaultPasswords,
+        bool* pbIsDefaultPassword )
+{
+    OUString aPassword;
+    DocPasswordVerifierResult eResult = DocPasswordVerifierResult_WRONG_PASSWORD;
+
+    // first, try provided default passwords
+    if( pbIsDefaultPassword )
+        *pbIsDefaultPassword = false;
+    if( pDefaultPasswords )
+    {
+        for( ::std::vector< OUString >::const_iterator aIt = pDefaultPasswords->begin(), aEnd = pDefaultPasswords->end(); (eResult == DocPasswordVerifierResult_WRONG_PASSWORD) && (aIt != aEnd); ++aIt )
+        {
+            aPassword = *aIt;
+            OSL_ENSURE( aPassword.getLength() > 0, "DocPasswordHelper::requestAndVerifyDocPassword - unexpected empty default password" );
+            if( aPassword.getLength() > 0 )
+            {
+                eResult = rVerifier.verifyPassword( aPassword );
+                if( pbIsDefaultPassword )
+                    *pbIsDefaultPassword = eResult == DocPasswordVerifierResult_OK;
+            }
+        }
+    }
+
+    // try media password (skip, if result is OK or ABORT)
+    if( eResult == DocPasswordVerifierResult_WRONG_PASSWORD )
+    {
+        aPassword = rMediaPassword;
+        if( aPassword.getLength() > 0 )
+            eResult = rVerifier.verifyPassword( aPassword );
+    }
+
+    // request a password (skip, if result is OK or ABORT)
+    if( (eResult == DocPasswordVerifierResult_WRONG_PASSWORD) && rxInteractHandler.is() ) try
+    {
+        PasswordRequestMode eRequestMode = PasswordRequestMode_PASSWORD_ENTER;
+        while( eResult == DocPasswordVerifierResult_WRONG_PASSWORD )
+        {
+            DocPasswordRequest* pRequest = new DocPasswordRequest( eRequestType, eRequestMode, rDocumentName );
+            Reference< XInteractionRequest > xRequest( pRequest );
+            rxInteractHandler->handle( xRequest );
+            if( pRequest->isPassword() )
+            {
+                aPassword = pRequest->getPassword();
+                if( aPassword.getLength() > 0 )
+                    eResult = rVerifier.verifyPassword( aPassword );
+            }
+            else
+            {
+                eResult = DocPasswordVerifierResult_ABORT;
+            }
+            eRequestMode = PasswordRequestMode_PASSWORD_REENTER;
+        }
+    }
+    catch( Exception& )
+    {
+    }
+
+    return (eResult == DocPasswordVerifierResult_OK) ? aPassword : OUString();
+}
+
+/*static*/ OUString DocPasswordHelper::requestAndVerifyDocPassword(
+        IDocPasswordVerifier& rVerifier,
+        MediaDescriptor& rMediaDesc,
+        DocPasswordRequestType eRequestType,
+        const ::std::vector< OUString >* pDefaultPasswords )
+{
+    OUString aMediaPassword = rMediaDesc.getUnpackedValueOrDefault(
+        MediaDescriptor::PROP_PASSWORD(), OUString() );
+    Reference< XInteractionHandler > xInteractHandler = rMediaDesc.getUnpackedValueOrDefault(
+        MediaDescriptor::PROP_INTERACTIONHANDLER(), Reference< XInteractionHandler >() );
+    OUString aDocumentName = rMediaDesc.getUnpackedValueOrDefault(
+        MediaDescriptor::PROP_URL(), OUString() );
+
+    bool bIsDefaultPassword = false;
+    OUString aPassword = requestAndVerifyDocPassword(
+        rVerifier, aMediaPassword, xInteractHandler, aDocumentName, eRequestType, pDefaultPasswords, &bIsDefaultPassword );
+
+    // insert valid password into media descriptor (but not a default password)
+    if( (aPassword.getLength() > 0) && !bIsDefaultPassword )
+        rMediaDesc[ MediaDescriptor::PROP_PASSWORD() ] <<= aPassword;
+
+    return aPassword;
+}
+
+// ============================================================================
+
+} // namespace comphelper
+
diff --git a/comphelper/source/misc/docpasswordrequest.cxx b/comphelper/source/misc/docpasswordrequest.cxx
new file mode 100644
index 0000000..187642e
--- /dev/null
+++ b/comphelper/source/misc/docpasswordrequest.cxx
@@ -0,0 +1,153 @@
+/*************************************************************************
+ *
+ * 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: docpasswordrequest.cxx,v $
+ * $Revision: 1.1 $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_comphelper.hxx"
+
+#include "comphelper/docpasswordrequest.hxx"
+#include <com/sun/star/task/DocumentMSPasswordRequest.hpp>
+#include <com/sun/star/task/DocumentPasswordRequest.hpp>
+#include <com/sun/star/task/XInteractionAbort.hpp>
+#include <com/sun/star/task/XInteractionPassword.hpp>
+
+using ::rtl::OUString;
+using ::com::sun::star::uno::Any;
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::RuntimeException;
+using ::com::sun::star::uno::Sequence;
+using ::com::sun::star::uno::XInterface;
+using ::com::sun::star::task::InteractionClassification_QUERY;
+using ::com::sun::star::task::DocumentMSPasswordRequest;
+using ::com::sun::star::task::DocumentPasswordRequest;
+using ::com::sun::star::task::PasswordRequestMode;
+using ::com::sun::star::task::XInteractionAbort;
+using ::com::sun::star::task::XInteractionContinuation;
+using ::com::sun::star::task::XInteractionPassword;
+
+namespace comphelper {
+
+// ============================================================================
+
+class AbortContinuation : public ::cppu::WeakImplHelper1< XInteractionAbort >
+{
+public:
+    inline explicit     AbortContinuation() : mbSelected( false ) {}
+
+    inline bool         isSelected() const { return mbSelected; }
+    inline void         reset() { mbSelected = false; }
+
+    virtual void SAL_CALL select() throw( RuntimeException ) { mbSelected = true; }
+
+private:
+    bool                mbSelected;
+};
+
+// ============================================================================
+
+class PasswordContinuation : public ::cppu::WeakImplHelper1< XInteractionPassword >
+{
+public:
+    inline explicit     PasswordContinuation() : mbSelected( false ) {}
+
+    inline bool         isSelected() const { return mbSelected; }
+    inline void         reset() { mbSelected = false; }
+
+    virtual void SAL_CALL select() throw( RuntimeException ) { mbSelected = true; }
+    virtual void SAL_CALL setPassword( const OUString& rPass ) throw( RuntimeException ) { maPassword = rPass; }
+    virtual OUString SAL_CALL getPassword() throw( RuntimeException ) { return maPassword; }
+
+private:
+    OUString            maPassword;
+    bool                mbSelected;
+};
+
+// ============================================================================
+
+DocPasswordRequest::DocPasswordRequest( DocPasswordRequestType eType,
+        PasswordRequestMode eMode, const OUString& rDocumentName )
+{
+    switch( eType )
+    {
+        case DocPasswordRequestType_STANDARD:
+        {
+            DocumentPasswordRequest aRequest( OUString(), Reference< XInterface >(),
+                InteractionClassification_QUERY, eMode, rDocumentName );
+            maRequest <<= aRequest;
+        }
+        break;
+        case DocPasswordRequestType_MS:
+        {
+            DocumentMSPasswordRequest aRequest( OUString(), Reference< XInterface >(),
+                InteractionClassification_QUERY, eMode, rDocumentName );
+            maRequest <<= aRequest;
+        }
+        break;
+        /*  no 'default', so compilers will complain about missing
+            implementation of a new enum value. */
+    }
+
+    maContinuations.realloc( 2 );
+    maContinuations[ 0 ].set( mpAbort = new AbortContinuation );
+    maContinuations[ 1 ].set( mpPassword = new PasswordContinuation );
+}
+
+DocPasswordRequest::~DocPasswordRequest()
+{
+}
+
+bool DocPasswordRequest::isAbort() const
+{
+    return mpAbort->isSelected();
+}
+
+bool DocPasswordRequest::isPassword() const
+{
+    return mpPassword->isSelected();
+}
+
+OUString DocPasswordRequest::getPassword() const
+{
+    return mpPassword->getPassword();
+}
+
+Any SAL_CALL DocPasswordRequest::getRequest() throw( RuntimeException )
+{
+    return maRequest;
+}
+
+Sequence< Reference< XInteractionContinuation > > SAL_CALL DocPasswordRequest::getContinuations() throw( RuntimeException )
+{
+    return maContinuations;
+}
+
+// ============================================================================
+
+} // namespace comphelper
+
diff --git a/comphelper/source/misc/makefile.mk b/comphelper/source/misc/makefile.mk
index f50f57c..d0ffc36 100644
--- a/comphelper/source/misc/makefile.mk
+++ b/comphelper/source/misc/makefile.mk
@@ -57,6 +57,8 @@ SLOFILES=   \
             $(SLO)$/componentcontext.obj \
             $(SLO)$/componentmodule.obj \
             $(SLO)$/configurationhelper.obj \
+            $(SLO)$/docpasswordhelper.obj \
+            $(SLO)$/docpasswordrequest.obj \
             $(SLO)$/documentinfo.obj \
             $(SLO)$/documentiologring.obj \
             $(SLO)$/evtlistenerhlp.obj \
diff --git a/comphelper/source/misc/mediadescriptor.cxx b/comphelper/source/misc/mediadescriptor.cxx
index edf3c19..5f6d2a4 100644
--- a/comphelper/source/misc/mediadescriptor.cxx
+++ b/comphelper/source/misc/mediadescriptor.cxx
@@ -1,7 +1,7 @@
 /*************************************************************************
  *
  * 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
@@ -114,6 +114,12 @@ namespace css = ::com::sun::star;
 /*-----------------------------------------------
     10.03.2004 07:35
 -----------------------------------------------*/
+const ::rtl::OUString& MediaDescriptor::PROP_ABORTED()
+{
+    static const ::rtl::OUString sProp(RTL_CONSTASCII_USTRINGPARAM("Aborted"));
+    return sProp;
+}
+
 const ::rtl::OUString& MediaDescriptor::PROP_ASTEMPLATE()
 {
     static const ::rtl::OUString sProp(RTL_CONSTASCII_USTRINGPARAM("AsTemplate"));
@@ -126,6 +132,12 @@ const ::rtl::OUString& MediaDescriptor::PROP_CHARACTERSET()
     return sProp;
 }
 
+const ::rtl::OUString& MediaDescriptor::PROP_COMPONENTDATA()
+{
+    static const ::rtl::OUString sProp(RTL_CONSTASCII_USTRINGPARAM("ComponentData"));
+    return sProp;
+}
+
 const ::rtl::OUString& MediaDescriptor::PROP_DEEPDETECTION()
 {
     static const ::rtl::OUString sProp(RTL_CONSTASCII_USTRINGPARAM("DeepDetection"));
diff --git a/svtools/inc/docmspasswdrequest.hxx b/svtools/inc/docmspasswdrequest.hxx
deleted file mode 100644
index 7cd0b17..0000000
--- a/svtools/inc/docmspasswdrequest.hxx
+++ /dev/null
@@ -1,72 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
- * Copyright IBM Corporation 2009.
- * Copyright 2009 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: docmspasswdrequest.hxx,v $
- * $Revision: 1.0 $
- *
- * 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.
- *
- ************************************************************************/
-
-#ifndef INCLUDED_SVTOOLS_DOCMSPASSWDREQUEST_HXX
-#define INCLUDED_SVTOOLS_DOCMSPASSWDREQUEST_HXX
-
-#include "svtools/svldllapi.h"
-#include <com/sun/star/task/DocumentMSPasswordRequest.hpp>
-#include <com/sun/star/task/XInteractionRequest.hpp>
-#include <rtl/ustring.hxx>
-#include <cppuhelper/implbase1.hxx>
-
-class MSAbortContinuation;
-class MSPasswordContinuation;
-
-class SVL_DLLPUBLIC RequestMSDocumentPassword : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest >
-{
-    ::com::sun::star::uno::Any m_aRequest;
-        
-    ::com::sun::star::uno::Sequence< 
-                    ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > 
-                > m_lContinuations;
-        
-    MSAbortContinuation*	    m_pAbort;
-    MSPasswordContinuation*	m_pPassword;
-
-public:
-    RequestMSDocumentPassword( ::com::sun::star::task::PasswordRequestMode nMode, ::rtl::OUString aName );
-    
-    sal_Bool isAbort();
-    sal_Bool isPassword();
-        
-    ::rtl::OUString getPassword();
-        
-    virtual ::com::sun::star::uno::Any SAL_CALL getRequest() 
-        throw( ::com::sun::star::uno::RuntimeException );
-
-    virtual ::com::sun::star::uno::Sequence< 
-                ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > 
-            > SAL_CALL getContinuations() 
-        throw( ::com::sun::star::uno::RuntimeException );
-};  
-
-#endif /* INCLUDED_SVTOOLS_DOCMSPASSWDREQUEST_HXX */
diff --git a/svtools/inc/docpasswdrequest.hxx b/svtools/inc/docpasswdrequest.hxx
deleted file mode 100644
index 4fa135a..0000000
--- a/svtools/inc/docpasswdrequest.hxx
+++ /dev/null
@@ -1,71 +0,0 @@
-/*************************************************************************
- *
- * 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: docpasswdrequest.hxx,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.
- *
- ************************************************************************/
-
-#ifndef INCLUDED_SVTOOLS_DOCPASSWDREQUEST_HXX
-#define INCLUDED_SVTOOLS_DOCPASSWDREQUEST_HXX
-
-#include "svtools/svldllapi.h"
-#include <com/sun/star/task/DocumentPasswordRequest.hpp>
-#include <com/sun/star/task/XInteractionRequest.hpp>
-#include <rtl/ustring.hxx>
-#include <cppuhelper/implbase1.hxx>
-
-class AbortContinuation;
-class PasswordContinuation;
-
-class SVL_DLLPUBLIC RequestDocumentPassword : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest >
-{
-    ::com::sun::star::uno::Any m_aRequest;
-        
-    ::com::sun::star::uno::Sequence< 
-                    ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > 
-                > m_lContinuations;
-        
-    AbortContinuation*	    m_pAbort;
-    PasswordContinuation*	m_pPassword;
-
-public:
-    RequestDocumentPassword( ::com::sun::star::task::PasswordRequestMode nMode, ::rtl::OUString aName );
-    
-    sal_Bool isAbort();
-    sal_Bool isPassword();
-        
-    ::rtl::OUString getPassword();
-        
-    virtual ::com::sun::star::uno::Any SAL_CALL getRequest() 
-        throw( ::com::sun::star::uno::RuntimeException );
-
-    virtual ::com::sun::star::uno::Sequence< 
-                ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > 
-            > SAL_CALL getContinuations() 
-        throw( ::com::sun::star::uno::RuntimeException );
-};  
-
-#endif /* INCLUDED_SVTOOLS_DOCPASSWDREQUEST_HXX */
diff --git a/svtools/source/misc1/docmspasswdrequest.cxx b/svtools/source/misc1/docmspasswdrequest.cxx
deleted file mode 100644
index aaada7b..0000000
--- a/svtools/source/misc1/docmspasswdrequest.cxx
+++ /dev/null
@@ -1,143 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
- * Copyright IBM Corporation 2009.
- * Copyright 2009 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: docmspasswdrequest.cxx,v $
- * $Revision: 1.0 $
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svtools.hxx"
-
-#include "docmspasswdrequest.hxx"
-#include <com/sun/star/task/XInteractionAbort.hpp>
-#include <com/sun/star/task/XInteractionPassword.hpp>
-
-//==========================================================================
-
-class MSAbortContinuation : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionAbort >
-{
-    sal_Bool mbSelected;
-
-public:
-    MSAbortContinuation() : mbSelected( sal_False ) {}
-    
-    sal_Bool isSelected() { return mbSelected; }
-    
-    void reset() { mbSelected = sal_False; }
-
-    virtual void SAL_CALL select() throw(::com::sun::star::uno::RuntimeException) { mbSelected = sal_True; }
-};
-
-//==========================================================================
-
-class MSPasswordContinuation : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionPassword >
-{
-    sal_Bool mbSelected;
-    ::rtl::OUString maPassword;
-
-public:
-    MSPasswordContinuation() : mbSelected( sal_False ) {}
-    
-    sal_Bool isSelected() { return mbSelected; }
-    
-    void reset() { mbSelected = sal_False; }
-
-    virtual void SAL_CALL select() throw(::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL setPassword( const ::rtl::OUString& aPass ) throw (::com::sun::star::uno::RuntimeException);
-    virtual ::rtl::OUString SAL_CALL getPassword(  ) throw (::com::sun::star::uno::RuntimeException);
-};
-
-void SAL_CALL MSPasswordContinuation::select()
-    throw(::com::sun::star::uno::RuntimeException)
-{
-    mbSelected = sal_True;
-}
-
-void SAL_CALL MSPasswordContinuation::setPassword( const ::rtl::OUString& aPass )
-    throw (::com::sun::star::uno::RuntimeException)
-{
-    maPassword = aPass;
-}
-
-::rtl::OUString SAL_CALL MSPasswordContinuation::getPassword() 
-    throw (::com::sun::star::uno::RuntimeException)
-{
-    return maPassword;
-}
-
-//==========================================================================
-
-RequestMSDocumentPassword::RequestMSDocumentPassword( ::com::sun::star::task::PasswordRequestMode nMode, ::rtl::OUString aName )
-{
-    ::rtl::OUString temp;
-    ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2;
-    ::com::sun::star::task::DocumentMSPasswordRequest 
-        aDocumentMSPasswordRequest( temp,
-                            temp2,
-                          ::com::sun::star::task::InteractionClassification_QUERY,
-                          nMode,
-                          aName );
-
-       m_aRequest <<= aDocumentMSPasswordRequest;
-
-       m_pAbort  = new MSAbortContinuation;
-       m_pPassword = new MSPasswordContinuation;
-
-       m_lContinuations.realloc( 2 );
-       m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort  );
-       m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pPassword );
-}
-
-sal_Bool RequestMSDocumentPassword::isAbort()
-{
-    return m_pAbort->isSelected();
-}
-
-sal_Bool RequestMSDocumentPassword::isPassword()
-{
-    return m_pPassword->isSelected();
-}
-        
-::rtl::OUString RequestMSDocumentPassword::getPassword()
-{
-    return m_pPassword->getPassword();
-}
-        
-::com::sun::star::uno::Any SAL_CALL RequestMSDocumentPassword::getRequest()
-        throw( ::com::sun::star::uno::RuntimeException )
-{
-    return m_aRequest;
-}
-
-::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > >
-    SAL_CALL RequestMSDocumentPassword::getContinuations()
-        throw( ::com::sun::star::uno::RuntimeException )
-{
-    return m_lContinuations;
-}
-
-
diff --git a/svtools/source/misc1/docpasswdrequest.cxx b/svtools/source/misc1/docpasswdrequest.cxx
deleted file mode 100644
index 183e8c4..0000000
--- a/svtools/source/misc1/docpasswdrequest.cxx
+++ /dev/null
@@ -1,142 +0,0 @@
-/*************************************************************************
- *
- * 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: docpasswdrequest.cxx,v $
- * $Revision: 1.5 $
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svtools.hxx"
-
-#include "docpasswdrequest.hxx"
-#include <com/sun/star/task/XInteractionAbort.hpp>
-#include <com/sun/star/task/XInteractionPassword.hpp>
-
-//==========================================================================
-
-class AbortContinuation : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionAbort >
-{
-    sal_Bool mbSelected;
-
-public:
-    AbortContinuation() : mbSelected( sal_False ) {}
-    
-    sal_Bool isSelected() { return mbSelected; }
-    
-    void reset() { mbSelected = sal_False; }
-
-    virtual void SAL_CALL select() throw(::com::sun::star::uno::RuntimeException) { mbSelected = sal_True; }
-};
-
-//==========================================================================
-
-class PasswordContinuation : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionPassword >
-{
-    sal_Bool mbSelected;
-    ::rtl::OUString maPassword;
-
-public:
-    PasswordContinuation() : mbSelected( sal_False ) {}
-    
-    sal_Bool isSelected() { return mbSelected; }
-    
-    void reset() { mbSelected = sal_False; }
-
-    virtual void SAL_CALL select() throw(::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL setPassword( const ::rtl::OUString& aPass ) throw (::com::sun::star::uno::RuntimeException);
-    virtual ::rtl::OUString SAL_CALL getPassword(  ) throw (::com::sun::star::uno::RuntimeException);
-};
-
-void SAL_CALL PasswordContinuation::select()
-    throw(::com::sun::star::uno::RuntimeException)
-{
-    mbSelected = sal_True;
-}
-
-void SAL_CALL PasswordContinuation::setPassword( const ::rtl::OUString& aPass )
-    throw (::com::sun::star::uno::RuntimeException)
-{
-    maPassword = aPass;
-}
-
-::rtl::OUString SAL_CALL PasswordContinuation::getPassword() 
-    throw (::com::sun::star::uno::RuntimeException)
-{
-    return maPassword;
-}
-
-//==========================================================================
-
-RequestDocumentPassword::RequestDocumentPassword( ::com::sun::star::task::PasswordRequestMode nMode, ::rtl::OUString aName )
-{
-    ::rtl::OUString temp;
-    ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > temp2;
-    ::com::sun::star::task::DocumentPasswordRequest 
-        aDocumentPasswordRequest( temp,
-                            temp2,
-                          ::com::sun::star::task::InteractionClassification_QUERY,
-                          nMode,
-                          aName );
-
-       m_aRequest <<= aDocumentPasswordRequest;
-
-       m_pAbort  = new AbortContinuation;
-       m_pPassword = new PasswordContinuation;
-
-       m_lContinuations.realloc( 2 );
-       m_lContinuations[0] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pAbort  );
-       m_lContinuations[1] = ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >( m_pPassword );
-}
-
-sal_Bool RequestDocumentPassword::isAbort()
-{
-    return m_pAbort->isSelected();
-}
-
-sal_Bool RequestDocumentPassword::isPassword()
-{
-    return m_pPassword->isSelected();
-}
-        
-::rtl::OUString RequestDocumentPassword::getPassword()
-{
-    return m_pPassword->getPassword();
-}
-        
-::com::sun::star::uno::Any SAL_CALL RequestDocumentPassword::getRequest()
-        throw( ::com::sun::star::uno::RuntimeException )
-{
-    return m_aRequest;
-}
-
-::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > >
-    SAL_CALL RequestDocumentPassword::getContinuations()
-        throw( ::com::sun::star::uno::RuntimeException )
-{
-    return m_lContinuations;
-}
-
-
diff --git a/svtools/source/misc1/makefile.mk b/svtools/source/misc1/makefile.mk
index 3ca57ff..e74afd8 100644
--- a/svtools/source/misc1/makefile.mk
+++ b/svtools/source/misc1/makefile.mk
@@ -1,7 +1,7 @@
 #*************************************************************************
 #
 # 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
@@ -49,8 +49,6 @@ EXCEPTIONSFILES=\
 SLOFILES=\
     $(EXCEPTIONSFILES) \
     $(SLO)$/adrparse.obj \
-    $(SLO)$/docpasswdrequest.obj \
-    $(SLO)$/docmspasswdrequest.obj \
     $(SLO)$/filenotation.obj \
     $(SLO)$/inethist.obj \
     $(SLO)$/inettype.obj \
commit 934d833085d663b0c0c5882fcef576071caa128c
Author: Oliver Bolte <obo at openoffice.org>
Date:   Mon Sep 7 07:48:12 2009 +0000

    CWS-TOOLING: integrate CWS c07v025_DEV300
    2009-08-13 14:55:50 +0200 od  r274947 : #b6863593# method <SwXPrintSettings::_getSingleValue(..)>
    	   - handle <PrintProspect_RTL>, <TextPlaceholder> and <HiddenText>
    2009-08-11 11:45:48 +0200 kz  r274850 : #i10000# warning fixed
    2009-08-10 10:35:07 +0200 od  r274796 : #i103839#, #b6855246# method <SwTextShell::StateInsert(..)>
    	- do not call <SwCrsrShell::Pop(..)> with 1st parameter = <FALSE> in order to
    	  avoid that the view jumps to the visible cursor.
    2009-08-05 13:58:33 +0200 os  r274663 : #b6863593# print options ProspectRTL, HiddenText, Placeholder added to SwXPrintSettings
    2009-08-05 13:04:30 +0200 os  r274652 : #b6858652# find linked sections/bookmarks case sensitively first
    2009-08-05 09:04:23 +0200 hdu  r274638 : #i104000# fix strikeout-X text decoration for printer-builtin fonts
    2009-08-04 09:53:34 +0200 obo  r274606 : #i103936# from CWS gciteratorfix (TL)
    2009-08-04 09:30:55 +0200 obo  r274602 : #b6796174# from CWS c07v023
    2009-08-03 16:22:26 +0200 obo  r274584 : #b6851994# fixes from CWS filepicker01

diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index e88ae2d..8a037b7 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -4518,7 +4518,7 @@ void OutputDevice::ImplDrawStrikeoutChar( long nBaseX, long nBaseY,
     SalLayout* pLayout = ImplLayout( aStrikeoutTest, 0, 4 );
     if ( pLayout )
     {
-        nStrikeoutWidth = (pLayout->GetTextWidth() + 2) / 4;
+        nStrikeoutWidth = (pLayout->GetTextWidth() + 2) / (4 * pLayout->GetUnitsPerPixel());
         pLayout->Release();
         if ( nStrikeoutWidth <= 0 ) // sanity check
             nStrikeoutWidth = 1;


More information about the ooo-build-commit mailing list