[ooo-build-commit] Branch 'ooo/master' - 3 commits - basebmp/test basegfx/test comphelper/source o3tl/qa rsc/source svtools/inc svtools/source transex3/source vcl/win

Jan Holesovsky kendy at kemper.freedesktop.org
Tue Jun 16 18:08:46 PDT 2009


 basebmp/test/makefile.mk                     |    2 
 basegfx/test/makefile.mk                     |    2 
 comphelper/source/misc/makefile.mk           |    1 
 comphelper/source/streaming/memorystream.cxx |    3 
 o3tl/qa/makefile.mk                          |    2 
 rsc/source/prj/start.cxx                     |   14 +
 svtools/inc/sfxecode.hxx                     |    1 
 svtools/inc/svtools/parhtml.hxx              |   30 +++
 svtools/inc/svtools/svparser.hxx             |   79 ++++++++
 svtools/source/control/inettbc.cxx           |    4 
 svtools/source/misc/acceleratorexecute.cxx   |   10 -
 svtools/source/misc/documentlockfile.cxx     |    2 
 svtools/source/misc/errtxt.src               |    4 
 svtools/source/svhtml/makefile.mk            |    2 
 svtools/source/svhtml/parhtml.cxx            |  250 ++++++++++++++++++++++++++-
 svtools/source/svrtf/svparser.cxx            |   60 ++++++
 svtools/source/uno/unoevent.cxx              |    4 
 transex3/source/localize.cxx                 |   21 ++
 vcl/win/source/gdi/MAKEFILE.MK               |    1 
 vcl/win/source/window/MAKEFILE.MK            |    2 
 20 files changed, 479 insertions(+), 15 deletions(-)

New commits:
commit e4a97143261f60084ce53e14cd36b3a5dc63ccb6
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date:   Tue Jun 16 18:11:49 2009 +0000

    CWS-TOOLING: integrate CWS ause102
    2009-06-16 19:22:59 +0200 hjs  r273039 : #i102607# don't kill mingw
    2009-06-12 15:17:22 +0200 ihi  r272921 : #i102607# add path before calling l10n tool
    2009-06-11 14:25:20 +0200 hjs  r272873 : #i102607# on EPM=internal call binary with full path
    2009-06-10 13:35:48 +0200 hjs  r272807 : #i102607# remove solver PATH entry from OOo env.
    2009-06-10 12:10:44 +0200 hjs  r272802 : #i102635# correct dependencies for all
    2009-06-10 11:58:53 +0200 hjs  r272801 : #i102607# call tools from solver with absolute path

diff --git a/basebmp/test/makefile.mk b/basebmp/test/makefile.mk
index 43165b8..7d0dc6e 100644
--- a/basebmp/test/makefile.mk
+++ b/basebmp/test/makefile.mk
@@ -132,6 +132,6 @@ unittest : $(SHL1TARGETN)
         @echo ----------------------------------------------------------
         @echo - start unit test on library $(SHL1TARGETN)
         @echo ----------------------------------------------------------
-        $(AUGMENT_LIBRARY_PATH) testshl2 -sf $(mktmp ) $(SHL1TARGETN)
+        $(TESTSHL2) -sf $(mktmp ) $(SHL1TARGETN)
 
 ALLTAR : unittest
diff --git a/basegfx/test/makefile.mk b/basegfx/test/makefile.mk
index d0fbfaf..8e47a13 100644
--- a/basegfx/test/makefile.mk
+++ b/basegfx/test/makefile.mk
@@ -89,7 +89,7 @@ $(MISC)$/unittest_succeeded : $(SHL1TARGETN)
         @echo ----------------------------------------------------------
         @echo - start unit test on library $(SHL1TARGETN)
         @echo ----------------------------------------------------------
-        $(AUGMENT_LIBRARY_PATH) testshl2 -sf $(mktmp ) -forward $(BIN)$/ $(SHL1TARGETN)
+        $(TESTSHL2) -sf $(mktmp ) -forward $(BIN)$/ $(SHL1TARGETN)
         $(TOUCH) $@
 
 ALLTAR : $(MISC)$/unittest_succeeded
diff --git a/o3tl/qa/makefile.mk b/o3tl/qa/makefile.mk
index 563f4e2..a6ebfbb 100644
--- a/o3tl/qa/makefile.mk
+++ b/o3tl/qa/makefile.mk
@@ -75,6 +75,6 @@ unittest : $(SHL1TARGETN)
         @echo ----------------------------------------------------------
         @echo - start unit test on library $(SHL1TARGETN)
         @echo ----------------------------------------------------------
-        $(AUGMENT_LIBRARY_PATH) testshl2 -sf $(mktmp ) $(SHL1TARGETN)
+        $(TESTSHL2) -sf $(mktmp ) $(SHL1TARGETN)
 
 ALLTAR : unittest
diff --git a/rsc/source/prj/start.cxx b/rsc/source/prj/start.cxx
index 01bfadf..c76328a 100644
--- a/rsc/source/prj/start.cxx
+++ b/rsc/source/prj/start.cxx
@@ -306,8 +306,10 @@ int cdecl main ( int argc, char ** argv)
     BOOL			bHelp	 = FALSE;
     BOOL			bError	 = FALSE;
     BOOL			bResponse = FALSE;
-    ByteString		aPrePro( "rscpp" );
-    ByteString		aRsc2Name( "rsc2" );
+    ByteString		aSolarbin(getenv("SOLARBINDIR"));
+    ByteString		aDelim("/");
+    ByteString		aPrePro; //( aSolarbin + aDelim + ByteString("rscpp"));
+    ByteString		aRsc2Name; //(  aSolarbin + aDelim + ByteString("rsc2"));
     ByteString		aSrsName;
     ByteString		aResName;
     RscStrList		aInputList;
@@ -318,6 +320,14 @@ int cdecl main ( int argc, char ** argv)
     sal_uInt32		i;
     ByteString* 	pString;
 
+    aPrePro = aSolarbin;
+    aPrePro += aDelim;
+    aPrePro += ByteString("rscpp");
+
+    aRsc2Name = aSolarbin;
+    aRsc2Name += aDelim;
+    aRsc2Name += ByteString("rsc2");
+
     printf( "VCL Resource Compiler 3.0\n" );
 
     pStr = ::ResponseFile( &aCmdLine, argv, argc );
diff --git a/transex3/source/localize.cxx b/transex3/source/localize.cxx
index 6b48184..377e368 100644
--- a/transex3/source/localize.cxx
+++ b/transex3/source/localize.cxx
@@ -304,7 +304,26 @@ void SourceTreeLocalizer::WorkOnFile(
             DirEntry aTemp( Export::GetTempFile());
             ByteString sTempFile( aTemp.GetFull(), RTL_TEXTENCODING_ASCII_US );
 
-            ByteString sExecutable( rExecutable );
+            ByteString sDel;
+#if defined(WNT) || defined(OS2)
+            sDel=ByteString("\\");
+#else
+            sDel=ByteString("/");
+#endif
+            ByteString sPath1( Export::GetEnv("SOLARVER") );
+            ByteString sPath2( Export::GetEnv("INPATH") );
+            ByteString sPath3( "bin" );
+            ByteString sPath4( Export::GetEnv("UPDMINOREXT") );
+            ByteString sExecutable( sPath1 );
+            sExecutable += sDel ;
+            sExecutable += sPath2 ;
+            sExecutable += sDel;
+            sExecutable += sPath3 ;
+            sExecutable += sPath4 ;
+            sExecutable += sDel ;
+            sExecutable += rExecutable ;
+
+           
 #if defined(WNT) || defined(OS2)
             sExecutable += ".exe";
             String sPath( Export::GetEnv( "PATH" ), RTL_TEXTENCODING_ASCII_US );
commit c2c979f8886365e2be9be969c3b53856b79ca044
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date:   Tue Jun 16 17:37:30 2009 +0000

    CWS-TOOLING: integrate CWS mingwport20
    2009-06-13 05:03:46 +0200 tono  r272946 : i102723: Set WINVER abd _WIN32_IE to 0x500 in mingw build

diff --git a/vcl/win/source/gdi/MAKEFILE.MK b/vcl/win/source/gdi/MAKEFILE.MK
index d50abc1..a6d84d4 100644
--- a/vcl/win/source/gdi/MAKEFILE.MK
+++ b/vcl/win/source/gdi/MAKEFILE.MK
@@ -44,7 +44,6 @@ TARGET=salgdi
 
 # --- #105371#
 .IF "$(COM)"=="GCC"
-CDEFS += -UWINVER -DWINVER=0x0400
 .ELSE
 CFLAGS += -DWINVER=0x0400
 .ENDIF
diff --git a/vcl/win/source/window/MAKEFILE.MK b/vcl/win/source/window/MAKEFILE.MK
index 9a65a50..17e73db 100644
--- a/vcl/win/source/window/MAKEFILE.MK
+++ b/vcl/win/source/window/MAKEFILE.MK
@@ -43,7 +43,7 @@ ENABLE_EXCEPTIONS=TRUE
 
 # --- #105371#
 .IF "$(COM)"=="GCC"
-CDEFS += -UWINVER -DWINVER=0x0400 -D_WIN32_WINNT=0x0501
+CFLAGS += -D_WIN32_WINNT=0x0501
 .ELSE
 CFLAGS += -DWINVER=0x0400 -D_WIN32_WINNT=0x0501
 
commit 2a2235304a8b7bb566705bb4278dc1584f89ed28
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date:   Tue Jun 16 16:15:54 2009 +0000

    CWS-TOOLING: integrate CWS fwk103
    2009-05-26 12:44:25 +0200 mst  r272292 : #i100727#
    - svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx:
      + fix warning: rename method to prevent overloading
    2009-05-19 13:42:31 +0200 mav  r272075 : #i101356# add comment
    2009-05-19 10:56:24 +0200 mav  r272062 : #i101356# register the singleton correctly
    2009-05-19 10:25:42 +0200 mav  r272060 : #i101356# register the singleton correctly
    2009-05-18 12:48:48 +0200 mav  r272013 : #i91306# fix the typo
    2009-05-14 08:50:06 +0200 mav  r271871 : #i101356# reduce the amount of macros
    2009-05-13 13:26:08 +0200 mav  r271858 : #i101356# reduce the amount of macros
    2009-05-13 11:29:16 +0200 mav  r271849 : #i101356# reduce the amount of macros
    2009-05-12 12:09:42 +0200 mav  r271815 : #i101356# allow to generate a small log if a document can not be stored
    2009-05-12 12:03:20 +0200 mav  r271814 : #i101356# allow to generate a small log if a document can not be stored
    2009-05-12 11:58:48 +0200 mav  r271813 : #i101356# allow to generate a small log if a document can not be stored
    2009-05-12 11:53:05 +0200 mav  r271812 : #i101356# allow to generate a small log if a document can not be stored
    2009-05-12 11:48:36 +0200 mav  r271810 : #i101356# allow to generate a small log if a document can not be stored
    2009-05-12 11:43:45 +0200 mav  r271809 : #i101356# allow to generate a small log if a document can not be stored
    2009-05-12 11:39:38 +0200 mav  r271808 : #i101356# allow to generate a small log if a document can not be stored
    2009-05-12 11:37:38 +0200 mav  r271806 : #i101356# allow to generate a small log if a document can not be stored
    2009-05-12 11:33:58 +0200 mav  r271805 : #i101356# allow to generate a small log if a document can not be stored
    2009-05-12 11:30:01 +0200 mav  r271804 : #i101356# allow to generate a small log if a document can not be stored
    2009-05-06 17:43:38 +0200 mst  r271607 : #i100727#
    - svtools/source/svhtml/parhtml.cxx:
      + adapt code to renaming of HTML constants (sb107)
    2009-05-05 11:14:18 +0200 mav  r271507 : #i101222# avoid warning
    2009-05-05 10:27:23 +0200 mav  r271505 : #i101426# send the modified() notification only when the document can be modified
    2009-05-05 10:25:07 +0200 mav  r271504 : #i101426# send the modified() notification only when the document is modified
    2009-05-05 08:42:48 +0200 mav  r271497 : CWS-TOOLING: rebase CWS fwk103 to trunk at 271427 (milestone: DEV300:m47)
    2009-04-30 13:32:11 +0200 mav  r271412 : #i100518# check the template folders quietly
    2009-04-29 20:04:25 +0200 mst  r271393 : - sw/source/filter/html/swhtml.cxx:
      + fix wrong initialization order in constructor
    2009-04-28 12:28:46 +0200 mav  r271319 : #i99142# set the error correctly
    2009-04-28 08:44:48 +0200 mav  r271305 : #i99050# clear hidden flag if necessary
    2009-04-28 08:40:10 +0200 mav  r271304 : #i99050# avoid crash
    2009-04-22 07:40:11 +0200 mav  r271056 : #i101093# lets not affect the performance
    2009-04-15 09:30:47 +0200 cd  r270820 : #i99771# Fix warnings for gcc 4.4
    2009-04-15 09:19:52 +0200 cd  r270819 : #i99771# Fix warnings for gcc 4.4
    2009-04-15 08:42:34 +0200 cd  r270817 : #i99771# Fix warnings for gcc 4.4
    2009-04-14 14:31:01 +0200 mav  r270768 : #i99493# fix typo
    2009-04-01 12:45:43 +0200 mst  r270317 : fix #i100727#
    - svtools/inc/svtools/svparser.hxx, svtools/source/svrtf/svparser.cxx,
      sfx2/inc/sfx2/docfile.hxx, sfx2/source/doc/{objmisc.cxx,docfile.cxx}:
      + move SvKeyValue stuff from sfx2 to svtools
    - svtools/inc/svtools/parhtml.hxx, svtools/source/svhtml/parhtml.cxx,
      sfx2/inc/sfx2/sfxhtml.hxx, sfx2/source/bastyp/sfxhtml.cxx:
      + move ParseMetaOptions() and GetEncodingByMIME() from SfxHTMLParser (sfx2)
        to HTMLParser (svtools)
      + make HTMLParser::ParseMetaOptions() a virtual function
      + HTMLParser::ParseMetaOptions() calls GetExtendedCompatibilityTextEncoding()
      + new template method HTMLParser::AddMetaUserDefined()
    - svtools/source/svhtml/makefile.mk:
      + enable exceptions for parhtml.cxx
    - dbaccess/source/ui/misc/HtmlReader.cxx,
      sc/source/filter/html/htmlpars.cxx:
      + remove encoding related code duplication
    - sw/source/filter/html/{swhtml{.hxx,.cxx},htmlfld.cxx}:
      + new SwHTMLParser::AddMetaUserDefined() for import of
        DOCINFO field subtypes INFO[1-4]
      + do not use DocumentInfo for import of DOCINFO field subtypes INFO[1-4]
    2009-03-31 17:01:35 +0200 mav  r270288 : #i91214# fix typo
    2009-03-31 15:19:41 +0200 mav  r270285 : #i100123# allow to turn OOo locking mechanics off
    2009-03-31 15:00:36 +0200 mav  r270284 : #i100123# allow to turn OOo locking mechanics off
    2009-03-31 12:19:13 +0200 mav  r270270 : #i100123# taking the lock file over throws no exception
    2009-03-30 13:57:21 +0200 mav  r270227 : #i100351# fix the typo
    2009-03-30 13:47:26 +0200 mav  r270225 : #i99885# let OK be default button
    2009-03-29 19:38:55 +0200 mav  r270190 : CWS-TOOLING: rebase CWS fwk103 to trunk at 270033 (milestone: DEV300:m45)
    2009-03-16 16:39:48 +0100 mav  r269558 : #i93558# convert the attributes as well
    2009-03-13 15:35:55 +0100 mav  r269488 : #i93558# improve manifest.xml parsing
    2009-03-13 08:47:00 +0100 mav  r269454 : #i96205# allow to remove password on SaveAs
    2009-03-12 13:36:07 +0100 mav  r269398 : #i91306# show special error in case of shared document
    2009-03-12 13:33:35 +0100 mav  r269397 : #i91306# introduce the new error-message
    2009-03-12 11:40:42 +0100 mst  r269378 : fix #i90877#
    - svtools/source/uno/unoevent.cxx:
      + use proper operator delete[]
    2009-02-26 15:23:10 +0100 mav  r268526 : #i91214# do not use ATL
    2009-02-26 14:19:06 +0100 mav  r268516 : #i98909# integrate the patch
    2009-02-10 17:29:52 +0100 cd  r267568 : #i98649# Make sure that we catch the NoSuchElementException when a module is not installed.

diff --git a/comphelper/source/misc/makefile.mk b/comphelper/source/misc/makefile.mk
index 1d473e6..f50f57c 100644
--- a/comphelper/source/misc/makefile.mk
+++ b/comphelper/source/misc/makefile.mk
@@ -58,6 +58,7 @@ SLOFILES=   \
             $(SLO)$/componentmodule.obj \
             $(SLO)$/configurationhelper.obj \
             $(SLO)$/documentinfo.obj \
+            $(SLO)$/documentiologring.obj \
             $(SLO)$/evtlistenerhlp.obj \
             $(SLO)$/ihwrapnofilter.obj \
             $(SLO)$/instancelocker.obj \
diff --git a/comphelper/source/streaming/memorystream.cxx b/comphelper/source/streaming/memorystream.cxx
index 8c1e945..c77e50b 100644
--- a/comphelper/source/streaming/memorystream.cxx
+++ b/comphelper/source/streaming/memorystream.cxx
@@ -162,7 +162,8 @@ void SAL_CALL UNOMemoryStream::seek( sal_Int64 location ) throw (IllegalArgument
 {
     if( (location < 0) || (location > SAL_MAX_INT32) )
         throw IllegalArgumentException( OUString(RTL_CONSTASCII_USTRINGPARAM("this implementation does not support more than 2GB!")), Reference< XInterface >(static_cast<OWeakObject*>(this)), 0 );
-
+ 
+    // seek operation should be able to resize the stream
     if ( location > static_cast< sal_Int64 >( maData.size() ) )
         maData.resize( static_cast< sal_Int32 >( location ) );
 
diff --git a/svtools/inc/sfxecode.hxx b/svtools/inc/sfxecode.hxx
index d1438ae..078e1b4 100644
--- a/svtools/inc/sfxecode.hxx
+++ b/svtools/inc/sfxecode.hxx
@@ -84,6 +84,7 @@
 #define ERRCODE_SFX_MACROS_SUPPORT_DISABLED (ERRCODE_WARNING_MASK | ERRCODE_AREA_SFX | ERRCODE_CLASS_NONE | 51)
 #define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED (ERRCODE_WARNING_MASK | ERRCODE_AREA_SFX | ERRCODE_CLASS_NONE | 52)
 #define ERRCODE_SFX_BROKENSIGNATURE         (ERRCODE_WARNING_MASK | ERRCODE_AREA_SFX | ERRCODE_CLASS_NONE | 53)
+#define ERRCODE_SFX_SHARED_NOPASSWORDCHANGE (ERRCODE_WARNING_MASK | ERRCODE_AREA_SFX | ERRCODE_CLASS_NONE | 54)
 
 
 
diff --git a/svtools/inc/svtools/parhtml.hxx b/svtools/inc/svtools/parhtml.hxx
index 395dc55..c2ce77d 100644
--- a/svtools/inc/svtools/parhtml.hxx
+++ b/svtools/inc/svtools/parhtml.hxx
@@ -37,9 +37,17 @@
 #include <svtools/svarray.hxx>
 #include <svtools/svparser.hxx>
 
+
+namespace com { namespace sun { namespace star {
+    namespace document {
+        class XDocumentProperties;
+    }
+} } }
+
 class Color;
 class SvNumberFormatter;
 class SvULongs;
+class SvKeyValueIterator;
 
 #define HTMLFONTSZ1_DFLT 7
 #define HTMLFONTSZ2_DFLT 10
@@ -224,6 +232,28 @@ public:
 //	virtual void RestoreState();
     virtual void Continue( int nToken );
 
+
+protected:
+
+    static rtl_TextEncoding GetEncodingByMIME( const String& rMime );
+
+    /// template method: called when ParseMetaOptions adds a user-defined meta
+    virtual void AddMetaUserDefined( ::rtl::OUString const & i_rMetaName );
+
+private:
+    /// parse meta options into XDocumentProperties and encoding
+    bool ParseMetaOptionsImpl( const ::com::sun::star::uno::Reference<
+                ::com::sun::star::document::XDocumentProperties>&,
+            SvKeyValueIterator*,
+            const HTMLOptions*,
+            rtl_TextEncoding& rEnc );
+
+public:
+    /// overriding method must call this implementation!
+    virtual bool ParseMetaOptions( const ::com::sun::star::uno::Reference<
+                ::com::sun::star::document::XDocumentProperties>&,
+            SvKeyValueIterator* );
+
     // Ist der uebergebene 0-terminierte String (vermutlich) der Anfang
     // eines HTML-Files? Er sollte mind. 80 Zeichen lang sein.
     // Mit Ausnahme des Falls, dass SwitchToUCS2==FALSE und
diff --git a/svtools/inc/svtools/svparser.hxx b/svtools/inc/svtools/svparser.hxx
index 629e291..96b1e2e 100644
--- a/svtools/inc/svtools/svparser.hxx
+++ b/svtools/inc/svtools/svparser.hxx
@@ -37,6 +37,7 @@
 #include <tools/string.hxx>
 #include <tools/ref.hxx>
 #include <rtl/textenc.h>
+#include <boost/utility.hpp>
 
 
 struct SvParser_Impl;
@@ -204,6 +205,84 @@ inline USHORT SvParser::GetCharSize() const
 {
     return (RTL_TEXTENCODING_UCS2 == eSrcEnc) ? 2 : 1;
 }
+
+
+/*========================================================================
+ *
+ * SvKeyValue.
+ *
+ *======================================================================*/
+
+SV_DECL_REF(SvKeyValueIterator)
+
+class SvKeyValue
+{
+    /** Representation.
+    */
+    String m_aKey;
+    String m_aValue;
+
+public:
+    /** Construction.
+    */
+    SvKeyValue (void)
+    {}
+
+    SvKeyValue (const String &rKey, const String &rValue)
+        : m_aKey (rKey), m_aValue (rValue)
+    {}
+
+    SvKeyValue (const SvKeyValue &rOther)
+        : m_aKey (rOther.m_aKey), m_aValue (rOther.m_aValue)
+    {}
+
+    /** Assignment.
+    */
+    SvKeyValue& operator= (SvKeyValue &rOther)
+    {
+        m_aKey   = rOther.m_aKey;
+        m_aValue = rOther.m_aValue;
+        return *this;
+    }
+
+    /** Operation.
+    */
+    const String& GetKey   (void) const { return m_aKey; }
+    const String& GetValue (void) const { return m_aValue; }
+
+    void SetKey   (const String &rKey  ) { m_aKey = rKey; }
+    void SetValue (const String &rValue) { m_aValue = rValue; }
+};
+
+/*========================================================================
+ *
+ * SvKeyValueIterator.
+ *
+ *======================================================================*/
+class SvKeyValueList_Impl;
+class SVT_DLLPUBLIC SvKeyValueIterator : public SvRefBase,
+    private boost::noncopyable
+{
+    /** Representation.
+    */
+    SvKeyValueList_Impl* m_pList;
+    USHORT               m_nPos;
+
+public:
+    /** Construction/Destruction.
+    */
+    SvKeyValueIterator (void);
+    virtual ~SvKeyValueIterator (void);
+
+    /** Operation.
+    */
+    virtual BOOL GetFirst (SvKeyValue &rKeyVal);
+    virtual BOOL GetNext  (SvKeyValue &rKeyVal);
+    virtual void Append   (const SvKeyValue &rKeyVal);
+};
+
+SV_IMPL_REF(SvKeyValueIterator);
+
 #endif //_SVPARSER_HXX
 
 /* vi:set tabstop=4 shiftwidth=4 expandtab: */
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index f0e7899..625b2bd 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -641,7 +641,11 @@ void SvtMatchContext_Impl::run()
     // if the user input is a valid URL, go on with it
     // otherwise it could be parsed smart with a predefined smart protocol
     // ( or if this is not set with the protocol of a predefined base URL )
+<<<<<<< .working
     if( eProt == INET_PROT_NOT_VALID || eProt == eSmartProt || (eSmartProt == INET_PROT_NOT_VALID && eProt == eBaseProt) )
+=======
+    if( eProt == INET_PROT_NOT_VALID || eProt == eSmartProt || (eSmartProt == INET_PROT_NOT_VALID && eProt == eBaseProt) )
+>>>>>>> .merge-right.r272982
     {
         // not stopped yet ?
         if( schedule() )
diff --git a/svtools/source/misc/acceleratorexecute.cxx b/svtools/source/misc/acceleratorexecute.cxx
index 08dbc96..21d7f1b 100644
--- a/svtools/source/misc/acceleratorexecute.cxx
+++ b/svtools/source/misc/acceleratorexecute.cxx
@@ -476,8 +476,14 @@ css::uno::Reference< css::ui::XAcceleratorConfiguration > AcceleratorExecute::st
         xSMGR->createInstance(::rtl::OUString::createFromAscii("com.sun.star.ui.ModuleUIConfigurationManagerSupplier")),
         css::uno::UNO_QUERY_THROW);
 
-    css::uno::Reference< css::ui::XUIConfigurationManager >   xUIManager = xUISupplier->getUIConfigurationManager(sModule);
-    css::uno::Reference< css::ui::XAcceleratorConfiguration > xAccCfg    (xUIManager->getShortCutManager(), css::uno::UNO_QUERY_THROW);
+    css::uno::Reference< css::ui::XAcceleratorConfiguration > xAccCfg;
+    try
+    {
+        css::uno::Reference< css::ui::XUIConfigurationManager >   xUIManager = xUISupplier->getUIConfigurationManager(sModule);
+        xAccCfg = css::uno::Reference< css::ui::XAcceleratorConfiguration >(xUIManager->getShortCutManager(), css::uno::UNO_QUERY_THROW);
+    }
+    catch(const css::container::NoSuchElementException&)
+        {}
     return xAccCfg;
 }
 
diff --git a/svtools/source/misc/documentlockfile.cxx b/svtools/source/misc/documentlockfile.cxx
index 4d8dd42..8a08a3a 100644
--- a/svtools/source/misc/documentlockfile.cxx
+++ b/svtools/source/misc/documentlockfile.cxx
@@ -202,7 +202,7 @@ sal_Bool DocumentLockFile::OverwriteOwnLockFile()
         WriteEntryToStream( aNewEntry, xOutput );
         xOutput->closeOutput();
     }
-    catch( ucb::NameClashException& )
+    catch( uno::Exception& )
     {
         return sal_False;
     }
diff --git a/svtools/source/misc/errtxt.src b/svtools/source/misc/errtxt.src
index 7924d8a..47c402c 100644
--- a/svtools/source/misc/errtxt.src
+++ b/svtools/source/misc/errtxt.src
@@ -503,6 +503,10 @@ Resource RID_ERRHDL
     {
         Text [ en-US ] = "Function not possible: write protected." ;
     };
+    String ERRCODE_SFX_SHARED_NOPASSWORDCHANGE
+    {
+        Text [ en-US ] = "The password of a shared spreadsheet cannot be set or changed.\nDeactivate sharing mode first.";
+    };
 };
 
 // eof ------------------------------------------------------------------------
diff --git a/svtools/source/svhtml/makefile.mk b/svtools/source/svhtml/makefile.mk
index 577cc83..b597763 100644
--- a/svtools/source/svhtml/makefile.mk
+++ b/svtools/source/svhtml/makefile.mk
@@ -34,6 +34,8 @@ PRJ=..$/..
 PRJNAME=svtools
 TARGET=svhtml
 
+ENABLE_EXCEPTIONS=TRUE
+
 # --- Settings -----------------------------------------------------
 
 .INCLUDE :  settings.mk
diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx
index 45bd6f8..3be9f6d 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -43,10 +43,21 @@
 #include <svtools/svstdarr.hxx>
 #endif
 
+#include <tools/tenccvt.hxx>
+#include <tools/datetime.hxx>
+#include <svtools/inettype.hxx>
+#include <comphelper/string.hxx>
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/document/XDocumentProperties.hpp>
+
 #include <svtools/parhtml.hxx>
 #include "htmltokn.h"
 #include "htmlkywd.hxx"
 
+
+using namespace ::com::sun::star;
+
+
 const sal_Int32 MAX_LEN( 1024L );
 //static sal_Unicode sTmpBuffer[ MAX_LEN+1 ];
 const sal_Int32 MAX_MACRO_LEN( 1024 );
@@ -2080,7 +2091,6 @@ BOOL HTMLParser::InternalImgToPrivateURL( String& rURL )
     return bFound;
 }
 
-
 #ifdef USED
 void HTMLParser::SaveState( int nToken )
 {
@@ -2093,3 +2103,241 @@ void HTMLParser::RestoreState()
 }
 #endif
 
+
+enum eHtmlMetas {
+    HTML_META_NONE = 0,
+    HTML_META_AUTHOR,
+    HTML_META_DESCRIPTION,
+    HTML_META_KEYWORDS,
+    HTML_META_REFRESH,
+    HTML_META_CLASSIFICATION,
+    HTML_META_CREATED,
+    HTML_META_CHANGEDBY,
+    HTML_META_CHANGED,
+    HTML_META_GENERATOR,
+    HTML_META_SDFOOTNOTE,
+    HTML_META_SDENDNOTE,
+    HTML_META_CONTENT_TYPE
+};
+
+// <META NAME=xxx>
+#ifdef __MINGW32__ // for runtime pseudo reloc
+static HTMLOptionEnum aHTMLMetaNameTable[] =
+#else
+static HTMLOptionEnum __READONLY_DATA aHTMLMetaNameTable[] =
+#endif
+{
+    { OOO_STRING_SVTOOLS_HTML_META_author,        HTML_META_AUTHOR        },
+    { OOO_STRING_SVTOOLS_HTML_META_changed,       HTML_META_CHANGED       },
+    { OOO_STRING_SVTOOLS_HTML_META_changedby,     HTML_META_CHANGEDBY     },
+    { OOO_STRING_SVTOOLS_HTML_META_classification,HTML_META_CLASSIFICATION},
+    { OOO_STRING_SVTOOLS_HTML_META_content_type,  HTML_META_CONTENT_TYPE  },
+    { OOO_STRING_SVTOOLS_HTML_META_created,       HTML_META_CREATED       },
+    { OOO_STRING_SVTOOLS_HTML_META_description,   HTML_META_DESCRIPTION   },
+    { OOO_STRING_SVTOOLS_HTML_META_keywords,      HTML_META_KEYWORDS      },
+    { OOO_STRING_SVTOOLS_HTML_META_generator,     HTML_META_GENERATOR     },
+    { OOO_STRING_SVTOOLS_HTML_META_refresh,       HTML_META_REFRESH       },
+    { OOO_STRING_SVTOOLS_HTML_META_sdendnote,     HTML_META_SDENDNOTE     },
+    { OOO_STRING_SVTOOLS_HTML_META_sdfootnote,    HTML_META_SDFOOTNOTE    },
+    { 0,                                          0                       }
+};
+
+
+void HTMLParser::AddMetaUserDefined( ::rtl::OUString const & )
+{
+}
+
+bool HTMLParser::ParseMetaOptionsImpl(
+        const uno::Reference<document::XDocumentProperties> & i_xDocProps,
+        SvKeyValueIterator *i_pHTTPHeader,
+        const HTMLOptions *i_pOptions,
+        rtl_TextEncoding& o_rEnc )
+{
+    String aName, aContent;
+    USHORT nAction = HTML_META_NONE;
+    bool bHTTPEquiv = false, bChanged = false;
+
+    for ( USHORT i = i_pOptions->Count(); i; )
+    {
+        const HTMLOption *pOption = (*i_pOptions)[ --i ];
+        switch ( pOption->GetToken() )
+        {
+            case HTML_O_NAME:
+                aName = pOption->GetString();
+                if ( HTML_META_NONE==nAction )
+                {
+                    pOption->GetEnum( nAction, aHTMLMetaNameTable );
+                }
+                break;
+            case HTML_O_HTTPEQUIV:
+                aName = pOption->GetString();
+                pOption->GetEnum( nAction, aHTMLMetaNameTable );
+                bHTTPEquiv = true;
+                break;
+            case HTML_O_CONTENT:
+                aContent = pOption->GetString();
+                break;
+        }
+    }
+
+    if ( bHTTPEquiv || HTML_META_DESCRIPTION != nAction )
+    {
+        // if it is not a Description, remove CRs and LFs from CONTENT
+        aContent.EraseAllChars( _CR );
+        aContent.EraseAllChars( _LF );
+    }
+    else
+    {
+        // convert line endings for Description
+        aContent.ConvertLineEnd();
+    }
+
+
+    if ( bHTTPEquiv && i_pHTTPHeader )
+    {
+        // #57232#: Netscape seems to just ignore a closing ", so we do too
+        if ( aContent.Len() && '"' == aContent.GetChar( aContent.Len()-1 ) )
+        {
+            aContent.Erase( aContent.Len() - 1 );
+        }
+        SvKeyValue aKeyValue( aName, aContent );
+        i_pHTTPHeader->Append( aKeyValue );
+    }
+
+    switch ( nAction )
+    {
+        case HTML_META_AUTHOR:
+            if (i_xDocProps.is()) {
+                i_xDocProps->setAuthor( aContent );
+                bChanged = true;
+            }
+            break;
+        case HTML_META_DESCRIPTION:
+            if (i_xDocProps.is()) {
+                i_xDocProps->setDescription( aContent );
+                bChanged = true;
+            }
+            break;
+        case HTML_META_KEYWORDS:
+            if (i_xDocProps.is()) {
+                i_xDocProps->setKeywords(
+                    ::comphelper::string::convertCommaSeparated(aContent));
+                bChanged = true;
+            }
+            break;
+        case HTML_META_CLASSIFICATION:
+            if (i_xDocProps.is()) {
+                i_xDocProps->setSubject( aContent );
+                bChanged = true;
+            }
+            break;
+
+        case HTML_META_CHANGEDBY:
+            if (i_xDocProps.is()) {
+                i_xDocProps->setModifiedBy( aContent );
+            }
+            break;
+
+        case HTML_META_CREATED:
+        case HTML_META_CHANGED:
+            if ( i_xDocProps.is() && aContent.Len() &&
+                 aContent.GetTokenCount() == 2 )
+            {
+                Date aDate( (ULONG)aContent.GetToken(0).ToInt32() );
+                Time aTime( (ULONG)aContent.GetToken(1).ToInt32() );
+                DateTime aDateTime( aDate, aTime );
+                ::util::DateTime uDT(aDateTime.Get100Sec(),
+                    aDateTime.GetSec(), aDateTime.GetMin(),
+                    aDateTime.GetHour(), aDateTime.GetDay(),
+                    aDateTime.GetMonth(), aDateTime.GetYear());
+                if ( HTML_META_CREATED==nAction )
+                    i_xDocProps->setCreationDate( uDT );
+                else
+                    i_xDocProps->setModificationDate( uDT );
+                bChanged = true;
+            }
+            break;
+
+        case HTML_META_REFRESH:
+            DBG_ASSERT( !bHTTPEquiv || i_pHTTPHeader,
+        "Reload-URL aufgrund unterlassener MUSS-Aenderung verlorengegangen" );
+            break;
+
+        case HTML_META_CONTENT_TYPE:
+            if ( aContent.Len() )
+            {
+                o_rEnc = GetEncodingByMIME( aContent );
+            }
+            break;
+
+        case HTML_META_NONE:
+            if ( !bHTTPEquiv )
+            {
+                if (i_xDocProps.is())
+                {
+                    uno::Reference<beans::XPropertyContainer> xUDProps
+                        = i_xDocProps->getUserDefinedProperties();
+                    try {
+                        xUDProps->addProperty(aName,
+                            beans::PropertyAttribute::REMOVEABLE,
+                            uno::makeAny(::rtl::OUString(aContent)));
+                        AddMetaUserDefined(aName);
+                        bChanged = true;
+                    } catch (uno::Exception &) {
+                        // ignore
+                    }
+                }
+            }
+            break;
+        default:
+            break;
+    }
+
+    return bChanged;
+}
+
+bool HTMLParser::ParseMetaOptions(
+        const uno::Reference<document::XDocumentProperties> & i_xDocProps,
+        SvKeyValueIterator *i_pHeader )
+{
+    USHORT nContentOption = HTML_O_CONTENT;
+    rtl_TextEncoding eEnc = RTL_TEXTENCODING_DONTKNOW;
+
+    bool bRet = ParseMetaOptionsImpl( i_xDocProps, i_pHeader,
+                      GetOptions(&nContentOption),
+                      eEnc );
+
+    // If the encoding is set by a META tag, it may only overwrite the
+    // current encoding if both, the current and the new encoding, are 1-BYTE
+    // encodings. Everything else cannot lead to reasonable results.
+    if (RTL_TEXTENCODING_DONTKNOW != eEnc &&
+        rtl_isOctetTextEncoding( eEnc ) &&
+        rtl_isOctetTextEncoding( GetSrcEncoding() ) )
+    {
+        eEnc = GetExtendedCompatibilityTextEncoding( eEnc ); // #89973#
+        SetSrcEncoding( eEnc );
+    }
+
+    return bRet;
+}
+
+rtl_TextEncoding HTMLParser::GetEncodingByMIME( const String& rMime )
+{
+    ByteString sType;
+    ByteString sSubType;
+    INetContentTypeParameterList aParameters;
+    ByteString sMime( rMime, RTL_TEXTENCODING_ASCII_US );
+    if (INetContentTypes::parse(sMime, sType, sSubType, &aParameters))
+    {
+        const INetContentTypeParameter * pCharset
+            = aParameters.find("charset");
+        if (pCharset != 0)
+        {
+            ByteString sValue( pCharset->m_sValue, RTL_TEXTENCODING_ASCII_US );
+            return GetExtendedCompatibilityTextEncoding(
+                    rtl_getTextEncodingFromMimeCharset( sValue.GetBuffer() ) );
+        }
+    }
+    return RTL_TEXTENCODING_DONTKNOW;
+}
+
diff --git a/svtools/source/svrtf/svparser.cxx b/svtools/source/svrtf/svparser.cxx
index 9d148fb..8c031e8 100644
--- a/svtools/source/svrtf/svparser.cxx
+++ b/svtools/source/svrtf/svparser.cxx
@@ -666,4 +666,64 @@ IMPL_STATIC_LINK( SvParser, NewDataRead, void*, EMPTYARG )
     return 0;
 }
 
+/*========================================================================
+ *
+ * SvKeyValueIterator.
+ *
+ *======================================================================*/
+SV_DECL_PTRARR_DEL(SvKeyValueList_Impl, SvKeyValue*, 0, 4)
+SV_IMPL_PTRARR(SvKeyValueList_Impl, SvKeyValue*);
+
+/*
+ * SvKeyValueIterator.
+ */
+SvKeyValueIterator::SvKeyValueIterator (void)
+    : m_pList (new SvKeyValueList_Impl),
+      m_nPos  (0)
+{
+}
+
+/*
+ * ~SvKeyValueIterator.
+ */
+SvKeyValueIterator::~SvKeyValueIterator (void)
+{
+    delete m_pList;
+}
+
+/*
+ * GetFirst.
+ */
+BOOL SvKeyValueIterator::GetFirst (SvKeyValue &rKeyVal)
+{
+    m_nPos = m_pList->Count();
+    return GetNext (rKeyVal);
+}
+
+/*
+ * GetNext.
+ */
+BOOL SvKeyValueIterator::GetNext (SvKeyValue &rKeyVal)
+{
+    if (m_nPos > 0)
+    {
+        rKeyVal = *m_pList->GetObject(--m_nPos);
+        return TRUE;
+    }
+    else
+    {
+        // Nothing to do.
+        return FALSE;
+    }
+}
+
+/*
+ * Append.
+ */
+void SvKeyValueIterator::Append (const SvKeyValue &rKeyVal)
+{
+    SvKeyValue *pKeyVal = new SvKeyValue (rKeyVal);
+    m_pList->C40_INSERT(SvKeyValue, pKeyVal, m_pList->Count());
+}
+
 /* vi:set tabstop=4 shiftwidth=4 expandtab: */
diff --git a/svtools/source/uno/unoevent.cxx b/svtools/source/uno/unoevent.cxx
index b80af6e..4bc0add 100644
--- a/svtools/source/uno/unoevent.cxx
+++ b/svtools/source/uno/unoevent.cxx
@@ -491,8 +491,8 @@ SvDetachedEventDescriptor::~SvDetachedEventDescriptor()
         if (NULL != aMacros[i])
             delete aMacros[i];
     }
-    
-    delete aMacros;
+
+    delete [] aMacros;
 }
 
 sal_Int16 SvDetachedEventDescriptor::getIndex(const sal_uInt16 nID) const


More information about the ooo-build-commit mailing list