You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by or...@apache.org on 2012/08/20 13:46:47 UTC

svn commit: r1374979 [29/29] - in /incubator/ooo/branches/writer001: ./ ext_libraries/apr-util/ ext_libraries/apr-util/prj/ ext_libraries/apr/ ext_libraries/coinmp/ ext_libraries/hunspell/ ext_libraries/serf/ ext_libraries/serf/prj/ ext_sources/ extras...

Modified: incubator/ooo/branches/writer001/main/testtools/source/bridgetest/bridgetest.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/testtools/source/bridgetest/bridgetest.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/testtools/source/bridgetest/bridgetest.cxx (original)
+++ incubator/ooo/branches/writer001/main/testtools/source/bridgetest/bridgetest.cxx Mon Aug 20 11:46:19 2012
@@ -544,6 +544,7 @@ static sal_Bool performTest(
             } catch (...) {
                 bRet &= check(false, "getRaiseAttr2 threw wrong type");
             }
+#ifndef OS2 // see i120310 for details
             // Test instantiated polymorphic struct types:
             {
                 bRet &= check(
@@ -605,6 +606,8 @@ static sal_Bool performTest(
                     !xLBT->getNullPolyInterface().member.is(),
                     "getNullPolyInterface");
             }
+#endif // OS2
+
             // Any test:
             bRet &= check(performAnyTest(xLBT , aData), "any test");
             // Sequence of call test:

Modified: incubator/ooo/branches/writer001/main/tomcat/tomcat.patch
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/tomcat/tomcat.patch?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/tomcat/tomcat.patch (original)
+++ incubator/ooo/branches/writer001/main/tomcat/tomcat.patch Mon Aug 20 11:46:19 2012
@@ -1,29 +1,19 @@
 --- misc/apache-tomcat-5.5.35-src/servletapi/build.xml	Thu Jun 19 16:03:59 2008
 +++ misc/build/apache-tomcat-5.5.35-src/servletapi/build.xml	Thu Jun 19 15:56:18 2008
-@@ -1,1 +1,31 @@
+@@ -1,1 +1,21 @@
 -dummy
-+<project name="jsr152 and jsr154 in Apache OpenOffice" default="debuild" basedir=".">
++<project name="jsr154 in Apache OpenOffice" default="debuild" basedir=".">
 +
 +  <target name="debuild"
-+   description="Build jsr154 and jsr152 for Apache OpenOffice (Default)">
++   description="Build jsr154 for Apache OpenOffice (Default)">
 +    <echo message="Building Servlet 2.4 API"/>
 +    <ant antfile="jsr154/build.xml"
-+         target="dist"
-+         inheritAll="false"
-+    />
-+    <echo message="Building JSP 2.0 API"/>
-+    <ant antfile="jsr152/build.xml"
-+         target="dist"
++         target="jar"
 +         inheritAll="false"
 +    />
 +  </target>
 +
 +  <target name="clean" description="Clean">
-+    <echo message="Cleaning JSP 2.0 API"/>
-+    <ant antfile="jsr152/build.xml"
-+         target="clean"
-+         inheritAll="false"
-+    />
 +    <echo message="Cleaning Servlet 2.4 API"/>
 +    <ant antfile="jsr154/build.xml"
 +         target="clean"

Modified: incubator/ooo/branches/writer001/main/toolkit/src2xml/source/boxer.py
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/toolkit/src2xml/source/boxer.py?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/toolkit/src2xml/source/boxer.py (original)
+++ incubator/ooo/branches/writer001/main/toolkit/src2xml/source/boxer.py Mon Aug 20 11:46:19 2012
@@ -38,11 +38,9 @@ class DlgLayoutBuilder(object):
 
     def build (self):
         root = Element('vbox')
-        ys = self.rows.keys()
-        ys.sort()
+        ys = sorted(self.rows.keys())
         for y in ys:
-            xs = self.rows[y].keys()
-            xs.sort()
+            xs = sorted(self.rows[y].keys())
 
             if len(xs) == 1:
                 root.appendChild(self.rows[y][xs[0]])

Modified: incubator/ooo/branches/writer001/main/toolkit/src2xml/source/expression.py
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/toolkit/src2xml/source/expression.py?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/toolkit/src2xml/source/expression.py (original)
+++ incubator/ooo/branches/writer001/main/toolkit/src2xml/source/expression.py Mon Aug 20 11:46:19 2012
@@ -126,7 +126,3 @@ class ExpParser(object):
     def dumpTree (self):
         self.jumpToRoot()
         print toString(self.ptr)
-
-
-
-

Modified: incubator/ooo/branches/writer001/main/toolkit/src2xml/source/globals.py
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/toolkit/src2xml/source/globals.py?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/toolkit/src2xml/source/globals.py (original)
+++ incubator/ooo/branches/writer001/main/toolkit/src2xml/source/globals.py Mon Aug 20 11:46:19 2012
@@ -21,7 +21,7 @@
 
 import sys
 
-class ParseError (Exception): 
+class ParseError (Exception):
     pass
 
 def error (msg, exit=0):
@@ -101,7 +101,7 @@ class Element(Node):
             chars += '>'
             for child in self.getChildren():
                 chars += child.dump(level+1)
-    
+
             chars += "\n"+Element.INDENT*level
             chars += "</%s>"%self.name
 
@@ -128,8 +128,7 @@ class Element(Node):
 
     def __dumpAttrs (self):
         text = ''
-        keys = self.attrs.keys()
-        keys.sort()
+        keys = sorted(self.attrs.keys())
         for key in keys:
             value = self.attrs[key]
             text += ' %s="%s"'%(key, value)

Modified: incubator/ooo/branches/writer001/main/toolkit/src2xml/source/macroparser.py
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/toolkit/src2xml/source/macroparser.py?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/toolkit/src2xml/source/macroparser.py (original)
+++ incubator/ooo/branches/writer001/main/toolkit/src2xml/source/macroparser.py Mon Aug 20 11:46:19 2012
@@ -33,7 +33,7 @@ class MacroParser(object):
 
     def parse (self):
         """
-A macro with arguments must have its open paren immediately following 
+A macro with arguments must have its open paren immediately following
 its name without any whitespace.
 """
         if self.debug:
@@ -66,7 +66,7 @@ its name without any whitespace.
     def parseArgs (self, buffer):
         """Parse arguments.
 
-The buffer is expected to be formatted like '(a, b, c)' where the first 
+The buffer is expected to be formatted like '(a, b, c)' where the first
 character is the open paren.
 """
         scope = 0
@@ -126,7 +126,7 @@ character is the open paren.
             self.macro.tokens = mclexer.getTokens()
             if self.debug:
                 print self.macro.tokens
-            
+
             if not self.isValidMacro(self.macro):
                 self.macro = None
 

Modified: incubator/ooo/branches/writer001/main/toolkit/src2xml/source/src2xml.py
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/toolkit/src2xml/source/src2xml.py?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/toolkit/src2xml/source/src2xml.py (original)
+++ incubator/ooo/branches/writer001/main/toolkit/src2xml/source/src2xml.py Mon Aug 20 11:46:19 2012
@@ -46,7 +46,7 @@ Examples:
 
     def format_examples (self):
         return examples
-    
+
     if 'epilog' in  p.__dict__:
         p.formatter.format_epilog = format_examples
         p.epilog = examples
@@ -243,6 +243,6 @@ def main ():
             dry_one_file (f, options)
         else:
             do_one_file (f, options)
-        
+
 if __name__ == '__main__':
     main ()

Modified: incubator/ooo/branches/writer001/main/toolkit/src2xml/source/srclexer.py
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/toolkit/src2xml/source/srclexer.py?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/toolkit/src2xml/source/srclexer.py (original)
+++ incubator/ooo/branches/writer001/main/toolkit/src2xml/source/srclexer.py Mon Aug 20 11:46:19 2012
@@ -55,7 +55,7 @@ def dumpTokens (tokens, toError=False):
     indent = "    "
     line = ''
     chars = ''
-    
+
     for token in tokens:
         if token in '{<':
             if len(line) > 0:
@@ -98,7 +98,7 @@ class HeaderData(object):
 class SrcLexer(object):
     """Lexicographical analyzer for .src format.
 
-The role of a lexer is to parse the source file and break it into 
+The role of a lexer is to parse the source file and break it into
 appropriate tokens.  Such tokens are later passed to a parser to
 build the syntax tree.
 """
@@ -182,7 +182,7 @@ build the syntax tree.
             if item != SrcLexer.VISIBLE:
                 return False
         return True
-        
+
     def tokenize (self):
         self.init()
 
@@ -223,8 +223,7 @@ build the syntax tree.
         if not self.parentLexer and self.debug:
             progress ("-"*68 + "\n")
             progress ("All defines found in this translation unit:\n")
-            keys = self.defines.keys()
-            keys.sort()
+            keys = sorted(self.defines.keys())
             for key in keys:
                 progress ("@ %s\n"%key)
 
@@ -364,7 +363,7 @@ build the syntax tree.
             return eval(buf)
         except:
             return True
-        
+
     def handleMacroDefine (self, buf):
 
         mparser = macroparser.MacroParser(buf)
@@ -399,7 +398,7 @@ build the syntax tree.
         if not headerPath:
             error("included header file " + headerSub + " not found\n", self.stopOnHeader)
             return
-        
+
         if self.debug:
             progress ("%s found\n"%headerPath)
 

Modified: incubator/ooo/branches/writer001/main/toolkit/src2xml/source/srcparser.py
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/toolkit/src2xml/source/srcparser.py?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/toolkit/src2xml/source/srcparser.py (original)
+++ incubator/ooo/branches/writer001/main/toolkit/src2xml/source/srcparser.py Mon Aug 20 11:46:19 2012
@@ -24,7 +24,7 @@ from globals import *
 import srclexer
 
 # simple name translation map
-postTransMap = {"ok-button": "okbutton", 
+postTransMap = {"ok-button": "okbutton",
                 "cancel-button": "cancelbutton",
                 "help-button": "helpbutton"}
 
@@ -139,11 +139,11 @@ class MacroExpander(object):
     def parseValues (self):
         """Parse tokens to get macro function variable values.
 
-Be aware that there is an implicit quotes around the text between the open 
-paren, the comma(s), and the close paren.  For instance, if a macro is defined 
-as FOO(a, b) and is used as FOO(one two three, and four), then the 'a' must be 
-replaced with 'one two three', and the 'b' replaced with 'and four'.  In other 
-words, whitespace does not end a token.  
+Be aware that there is an implicit quotes around the text between the open
+paren, the comma(s), and the close paren.  For instance, if a macro is defined
+as FOO(a, b) and is used as FOO(one two three, and four), then the 'a' must be
+replaced with 'one two three', and the 'b' replaced with 'and four'.  In other
+words, whitespace does not end a token.
 
 """
         values = []
@@ -250,17 +250,17 @@ This is the main loop for the parser.  T
     # Token Handlers
 
     """
-Each token handler takes the current token position and returns the position 
-of the last token processed.  For the most part, the current token position 
-and the last processed token are one and the same, in which case the handler 
-can simply return the position value it receives without incrementing it.  
-
-If you need to read ahead to process more tokens than just the current token, 
-make sure that the new token position points to the last token that has been 
-processed, not the next token that has not yet been processed.  This is 
-because the main loop increments the token position when it returns from the 
+Each token handler takes the current token position and returns the position
+of the last token processed.  For the most part, the current token position
+and the last processed token are one and the same, in which case the handler
+can simply return the position value it receives without incrementing it.
+
+If you need to read ahead to process more tokens than just the current token,
+make sure that the new token position points to the last token that has been
+processed, not the next token that has not yet been processed.  This is
+because the main loop increments the token position when it returns from the
 handler.
-""" 
+"""
 
     # assignment token '='
     def assignment (self, i):
@@ -272,7 +272,7 @@ handler.
 
         self.tokenBuf = []
         return i
-    
+
     # open brace token '{'
     def openBrace (self, i):
         bufSize = len(self.tokenBuf)
@@ -326,11 +326,11 @@ handler.
         if len(self.tokenBuf) == 0:
             pass
         elif scope == 0:
-            # We are not supposed to have any statment in global scope.  
+            # We are not supposed to have any statment in global scope.
             # Just ignore this statement.
             pass
         else:
-            # Statement within a scope.  Import it as an attribute for the 
+            # Statement within a scope.  Import it as an attribute for the
             # current element.
             elem = self.elementStack[-1]
 
@@ -433,5 +433,3 @@ handler.
             raise ParseError ('')
 
         return eval(values[0]), eval(values[1])
-
-

Modified: incubator/ooo/branches/writer001/main/tools/inc/tools/poly.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/tools/inc/tools/poly.hxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/tools/inc/tools/poly.hxx (original)
+++ incubator/ooo/branches/writer001/main/tools/inc/tools/poly.hxx Mon Aug 20 11:46:19 2012
@@ -261,8 +261,6 @@ public:
 
                         PolyPolygon( sal_uInt16 nInitSize = 16, sal_uInt16 nResize = 16 );
                         PolyPolygon( const Polygon& rPoly );
-                        PolyPolygon( sal_uInt16 nPoly, const sal_uInt16* pPointCountAry,
-                                     const Point* pPtAry );
                         PolyPolygon( const PolyPolygon& rPolyPoly );
                         ~PolyPolygon();
 

Modified: incubator/ooo/branches/writer001/main/tools/source/generic/poly.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/tools/source/generic/poly.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/tools/source/generic/poly.cxx (original)
+++ incubator/ooo/branches/writer001/main/tools/source/generic/poly.cxx Mon Aug 20 11:46:19 2012
@@ -2106,7 +2106,7 @@ void Polygon::Write( SvStream& rOStream 
 }
 
 // -----------------------------------------------------------------------
-// #i74631# numerical correction method for B2DPolygon
+// numerical correction method for B2DPolygon
 void impCorrectContinuity(basegfx::B2DPolygon& roPolygon, sal_uInt32 nIndex, sal_uInt8 nCFlag)
 {
 	const sal_uInt32 nPointCount(roPolygon.count());
@@ -2116,21 +2116,49 @@ void impCorrectContinuity(basegfx::B2DPo
 	{
 		if(roPolygon.isPrevControlPointUsed(nIndex) && roPolygon.isNextControlPointUsed(nIndex))
 		{
+            // #115917# Patch from osnola (modified, thanks for showing the porblem)
+            //
+            // The correction is needed because an integer polygon with control points
+            // is converted to double precision. When C1 or C2 is used the involved vectors
+            // may not have the same directions/lengths since these come from integer coordinates
+            //  and may have been snapped to different nearest integer coordinates. The snap error
+            // is in the range of +-1 in y and y, thus 0.0 <= error <= sqrt(2.0). Nonetheless,
+            // it needs to be corrected to be able to detect the continuity in this points
+            // correctly.
+            //
+            // We only have the integer data here (already in double precision form, but no mantisses 
+            // used), so the best correction is to use:
+            //
+            // for C1: The longest vector since it potentially has best preserved the original vector.
+            //         Even better the sum of the vectors, weighted by their length. This gives the
+            //         normal vector addition to get the vector itself, lengths need to be preserved.
+            // for C2: The mediated vector(s) since both should be the same, but mirrored
+
+            // extract the point and vectors
 			const basegfx::B2DPoint aPoint(roPolygon.getB2DPoint(nIndex));
+            const basegfx::B2DVector aNext(roPolygon.getNextControlPoint(nIndex) - aPoint);
+            const basegfx::B2DVector aPrev(aPoint - roPolygon.getPrevControlPoint(nIndex));
+
+            // calculate common direction vector, normalize
+            const basegfx::B2DVector aDirection(aNext + aPrev);
 
 			if(POLY_SMOOTH == nCFlag)
 			{
-				// C1: apply inverse direction of prev to next, keep length of next
-				const basegfx::B2DVector aOriginalNext(roPolygon.getNextControlPoint(nIndex) - aPoint);
-				basegfx::B2DVector aNewNext(aPoint - roPolygon.getPrevControlPoint(nIndex));
-
-				aNewNext.setLength(aOriginalNext.getLength());
-				roPolygon.setNextControlPoint(nIndex, basegfx::B2DPoint(aPoint + aNewNext));
+                // C1: apply common direction vector, preserve individual lengths
+                const double fInvDirectionLen(1.0 / aDirection.getLength());
+				roPolygon.setNextControlPoint(nIndex, basegfx::B2DPoint(aPoint + (aDirection * (aNext.getLength() * fInvDirectionLen))));
+				roPolygon.setPrevControlPoint(nIndex, basegfx::B2DPoint(aPoint - (aDirection * (aPrev.getLength() * fInvDirectionLen))));
 			}
 			else // POLY_SYMMTR
 			{
-				// C2: apply inverse control point to next
-				roPolygon.setNextControlPoint(nIndex, (2.0 * aPoint) - roPolygon.getPrevControlPoint(nIndex));
+                // C2: get mediated length. Taking half of the unnormalized direction would be
+                // an approximation, but not correct.
+                const double fMedLength((aNext.getLength() + aPrev.getLength()) * (0.5 / aDirection.getLength()));
+                const basegfx::B2DVector aScaledDirection(aDirection * fMedLength);
+
+                // Bring Direction to correct length and apply
+				roPolygon.setNextControlPoint(nIndex, basegfx::B2DPoint(aPoint + aScaledDirection));
+				roPolygon.setPrevControlPoint(nIndex, basegfx::B2DPoint(aPoint - aScaledDirection));
 			}
 		}
 	}

Modified: incubator/ooo/branches/writer001/main/tools/source/generic/poly2.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/tools/source/generic/poly2.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/tools/source/generic/poly2.cxx (original)
+++ incubator/ooo/branches/writer001/main/tools/source/generic/poly2.cxx Mon Aug 20 11:46:19 2012
@@ -123,25 +123,6 @@ PolyPolygon::PolyPolygon( const Polygon&
 
 // -----------------------------------------------------------------------
 
-PolyPolygon::PolyPolygon( sal_uInt16 nPoly, const sal_uInt16* pPointCountAry,
-						  const Point* pPtAry )
-{
-	DBG_CTOR( PolyPolygon, NULL );
-
-	if ( nPoly > MAX_POLYGONS )
-		nPoly = MAX_POLYGONS;
-
-	mpImplPolyPolygon = new ImplPolyPolygon( nPoly );
-	for ( sal_uInt16 i = 0; i < nPoly; i++ )
-	{
-		mpImplPolyPolygon->mpPolyAry[i] = new Polygon( *pPointCountAry, pPtAry );
-		pPtAry += *pPointCountAry;
-		pPointCountAry++;
-	}
-}
-
-// -----------------------------------------------------------------------
-
 PolyPolygon::PolyPolygon( const PolyPolygon& rPolyPoly )
 {
 	DBG_CTOR( PolyPolygon, NULL );

Modified: incubator/ooo/branches/writer001/main/ucb/prj/build.lst
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/ucb/prj/build.lst?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/ucb/prj/build.lst (original)
+++ incubator/ooo/branches/writer001/main/ucb/prj/build.lst Mon Aug 20 11:46:19 2012
@@ -1,4 +1,4 @@
-uc ucb : cppuhelper CURL:curl OPENSSL:openssl LIBXML2:libxml2 LIBXSLT:libxslt offapi sal salhelper ucbhelper udkapi comphelper serf tools NULL
+uc ucb : cppuhelper CURL:curl OPENSSL:openssl LIBXML2:libxml2 LIBXSLT:libxslt offapi sal salhelper ucbhelper udkapi comphelper SERF:serf tools NULL
 uc	ucb							usr1	-	all	uc_mkout NULL
 uc	ucb\inc					    nmake	-	all	uc_inc NULL
 uc	ucb\source\regexp		    nmake	-	all	uc_regexp uc_inc NULL

Modified: incubator/ooo/branches/writer001/main/ucb/source/ucp/webdav/AprEnv.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/ucb/source/ucp/webdav/AprEnv.hxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/ucb/source/ucp/webdav/AprEnv.hxx (original)
+++ incubator/ooo/branches/writer001/main/ucb/source/ucp/webdav/AprEnv.hxx Mon Aug 20 11:46:19 2012
@@ -23,11 +23,7 @@
 #ifndef INCLUDED_APRENV_HXX
 #define INCLUDED_APRENV_HXX
 
-#ifdef OS2 // use system apr headers
 #include <apr_pools.h>
-#else
-#include <apr/apr_pools.h>
-#endif
 
 namespace apr_environment
 {

Modified: incubator/ooo/branches/writer001/main/ucb/source/ucp/webdav/SerfSession.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/ucb/source/ucp/webdav/SerfSession.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/ucb/source/ucp/webdav/SerfSession.cxx (original)
+++ incubator/ooo/branches/writer001/main/ucb/source/ucp/webdav/SerfSession.cxx Mon Aug 20 11:46:19 2012
@@ -162,7 +162,7 @@ void SerfSession::Init()
         if ( m_aProxyName.getLength() )
         {
             apr_sockaddr_t *proxy_address = NULL;
-            const apr_status_t status = apr_sockaddr_info_get( &proxy_address, 
+            status = apr_sockaddr_info_get( &proxy_address, 
                                                                rtl::OUStringToOString( m_aProxyName, RTL_TEXTENCODING_UTF8 ), 
                                                                APR_UNSPEC,
                                                                static_cast<apr_port_t>(m_nProxyPort), 
@@ -460,7 +460,7 @@ apr_status_t SerfSession::verifySerfCert
     // done outside the isDomainMatch() block because the result is
     // used by the interaction handler.
     std::vector< uno::Reference< security::XCertificate > > aChain;
-    for (int nIndex=1; nIndex<nCertificateChainLength; ++nIndex)
+    for (nIndex=1; nIndex<nCertificateChainLength; ++nIndex)
     {
         const char* sBase64EncodedCertificate (
             serf_ssl_cert_export(

Modified: incubator/ooo/branches/writer001/main/ucb/source/ucp/webdav/SerfUri.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/ucb/source/ucp/webdav/SerfUri.hxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/ucb/source/ucp/webdav/SerfUri.hxx (original)
+++ incubator/ooo/branches/writer001/main/ucb/source/ucp/webdav/SerfUri.hxx Mon Aug 20 11:46:19 2012
@@ -23,11 +23,7 @@
 #ifndef INCLUDED_SERFURI_HXX
 #define INCLUDED_SERFURI_HXX
 
-#ifdef OS2 // use system apr headers
 #include <apr_uri.h>
-#else
-#include <apr-util/apr_uri.h>
-#endif
 #include <rtl/ustring.hxx>
 #include <DAVException.hxx>
 

Modified: incubator/ooo/branches/writer001/main/ucb/source/ucp/webdav/makefile.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/ucb/source/ucp/webdav/makefile.mk?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/ucb/source/ucp/webdav/makefile.mk (original)
+++ incubator/ooo/branches/writer001/main/ucb/source/ucp/webdav/makefile.mk Mon Aug 20 11:46:19 2012
@@ -48,18 +48,6 @@ APRINCDIR=apr
 APRUTILINCDIR=apr-util
 SERFINCDIR=serf
 
-#.IF "$(SYSTEM_APR)" != "YES"
-#.INCLUDE: $(SOLARINCDIR)$/$(APRINCDIR)$/version.mk
-#.ENDIF
-#.IF "$(SYSTEM_APRUTIL)" != "YES"
-#.INCLUDE: $(SOLARINCDIR)$/$(APRUTILINCDIR)$/version.mk
-#.ENDIF
-#.IF "$(SYSTEM_SERF)" != "YES"
-#.INCLUDE: $(SOLARINCDIR)$/$(SERFINCDIR)$/version.mk
-#.ENDIF
-
-#CFLAGS+= -DAPR_VERSION=0x$(APR_VERSION) -DAPRUTIL_VERSION=0x$(APRUTIL_VERSION) -DSERF_VERSION=0x$(SERF_VERSION)
-
 #
 # Extend the list of include paths depending on whether we use locally built
 # or system versions of libraries apr, apr-util, serf, libxml
@@ -69,20 +57,26 @@ SERFINCDIR=serf
 
 .IF "$(SYSTEM_APR)" == "YES"
 CFLAGS+= $(APR_CFLAGS)
+SHL1STDLIBS+=$(APR_LIBS)
 .ELSE
 CFLAGS+= -I$(SOLARINCDIR)$/$(APRINCDIR)
+SHL1STDLIBS+=$(INTERNAL_APR_LIBS)
 .ENDIF
 
-.IF "$(SYSTEM_APRUTIL)" == "YES"
-CFLAGS+= $(APRUTIL_CFLAGS)
+.IF "$(SYSTEM_APR_UTIL)" == "YES"
+CFLAGS+= $(APR_UTIL_CFLAGS)
+SHL1STDLIBS+=$(APR_UTIL_LIBS)
 .ELSE
 CFLAGS+= -I$(SOLARINCDIR)$/$(APRUTILINCDIR)
+SHL1STDLIBS+=$(INTERNAL_APR_UTIL_LIBS)
 .ENDIF
 
 .IF "$(SYSTEM_SERF)" == "YES"
 CFLAGS+= $(SERF_CFLAGS)
+SHL1STDLIBS+=$(SERF_LIBS)
 .ELSE
 CFLAGS+= -I$(SOLARINCDIR)$/$(SERFINCDIR)
+SHL1STDLIBS+=$(INTERNAL_SERF_LIBS)
 .ENDIF
 
 .IF "$(SYSTEM_LIBXML)" == "YES"
@@ -94,6 +88,9 @@ CFLAGS+= -I$(SOLARINCDIR)$/$(LIBXMLINCDI
 
 .IF "$(SYSTEM_OPENSSL)" == "YES"
 CFLAGS+= -I$(OPENSSL_CFLAGS)
+SHL1STDLIBS+= $(OPENSSLLIB)
+.ELSE
+SHL1STDLIBS+= $(OPENSSLLIBST)
 .ENDIF
 
 # --- General -----------------------------------------------------
@@ -141,14 +138,13 @@ SHL1IMPLIB=i$(TARGET)
 
 SHL1VERSIONMAP=$(SOLARENV)/src/component.map
 
-SHL1STDLIBS=\
+SHL1STDLIBS+=\
         $(CPPUHELPERLIB) \
         $(CPPULIB)       \
         $(SALLIB)        \
         $(SALHELPERLIB)  \
         $(UCBHELPERLIB)  \
         $(COMPHELPERLIB) \
-		$(SERFLIBS)      \
         $(LIBXML2LIB)
 
 .IF "$(GUI)"=="WNT"
@@ -156,16 +152,10 @@ SHL1STDLIBS+= $(WSOCK32LIB)
 .IF "$(WINDOWS_VISTA_PSDK)" != ""
 SHL1STDLIBS+= $(WS2_32LIB)
 .ENDIF
-SHL1STDLIBS+= $(OPENSSLLIB)
 .ELSE # WNT
 .IF "$(OS)"=="SOLARIS"
 SHL1STDLIBS+= -lnsl -lsocket -ldl
 .ENDIF # SOLARIS
-.IF "$(SYSTEM_OPENSSL)"=="YES"
-SHL1STDLIBS+= $(OPENSSLLIB)
-.ELSE
-SHL1STDLIBS+= $(OPENSSLLIBST)
-.ENDIF
 .ENDIF # WNT
 
 SHL1DEF=$(MISC)$/$(SHL1TARGET).def

Modified: incubator/ooo/branches/writer001/main/vcl/aqua/source/gdi/salvd.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/vcl/aqua/source/gdi/salvd.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/vcl/aqua/source/gdi/salvd.cxx (original)
+++ incubator/ooo/branches/writer001/main/vcl/aqua/source/gdi/salvd.cxx Mon Aug 20 11:46:19 2012
@@ -188,10 +188,18 @@ sal_Bool AquaSalVirtualDevice::SetSize( 
 	}
 	else
 	{
-		// default to a NSView target context
+        // default to a NSView target context
         AquaSalFrame* pSalFrame = mpGraphics->getGraphicsFrame();
-        if( !pSalFrame && !GetSalData()->maFrames.empty() )
-            pSalFrame = *GetSalData()->maFrames.begin();
+        if( !pSalFrame || !AquaSalFrame::isAlive( pSalFrame ))
+        {
+            if( !GetSalData()->maFrames.empty() )
+            {
+                // get the first matching frame
+                pSalFrame = *GetSalData()->maFrames.begin();
+                // update the frame reference
+                mpGraphics->setGraphicsFrame( pSalFrame );
+            }
+        }
         if( pSalFrame )
         {
             // #i91990#

Modified: incubator/ooo/branches/writer001/main/vcl/inc/os2/salmenu.h
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/vcl/inc/os2/salmenu.h?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/vcl/inc/os2/salmenu.h (original)
+++ incubator/ooo/branches/writer001/main/vcl/inc/os2/salmenu.h Mon Aug 20 11:46:19 2012
@@ -27,6 +27,47 @@
 #include <vcl/bitmap.hxx>
 #include <salmenu.hxx>
 
+#define INIAPP_XWPHOOK              "XWorkplace:Hook"
+#define INIKEY_HOOK_CONFIG          "Config"
+
+typedef struct _HOOKCONFIG
+{
+	PM_BOOL         __fSlidingFocus;
+	ULONG           __ulSlidingFocusDelay;
+	PM_BOOL         __fSlidingBring2Top;
+	PM_BOOL         __fSlidingIgnoreDesktop;
+	PM_BOOL         __fSlidingIgnoreSeamless;
+	HOBJECT         ahobjDummy[4];
+	PM_BYTE         bMonitorDrives[30];
+	PM_BOOL         fChordWinList;
+	PM_BOOL         fSysMenuMB2TitleBar;
+	PM_BOOL         fMB3Scroll;
+	PM_BOOL         fMB3ScrollReverse;
+	USHORT          usScrollMode;
+	USHORT          usMB3ScrollMin;
+	SHORT           sAmplification;
+	PM_BOOL         __fAutoHideMouse;
+	ULONG           __ulAutoHideDelay;
+	PM_BOOL         __fGlobalHotkeys;
+	PM_BOOL         fRemoved1, fRemoved2;
+	PM_BOOL         fSlidingMenus;
+	ULONG           ulSubmenuDelay;
+	PM_BOOL         fMenuImmediateHilite;
+	PM_BOOL         fMB3Click2MB1DblClk;
+	HOBJECT         ahobjHotCornerObjects[8];
+	PM_BOOL         fConditionalCascadeSensitive;
+	PM_BOOL         fRemoved3;
+	ULONG           ulCornerSensitivity;
+	PM_BOOL         fMB3AutoScroll;
+	PM_BOOL         fMB3Push2Bottom;
+	ULONG           __ulAutoHideFlags;
+	PM_BOOL         __fAutoMoveMouse;
+	ULONG           __ulAutoMoveFlags;
+	ULONG           __ulAutoMoveDelay;
+	ULONG           __ulMouseMappingsCount;
+} HOOKCONFIG, *PHOOKCONFIG;
+#pragma pack()
+
 class Os2SalMenu : public SalMenu
 {
 public:

Modified: incubator/ooo/branches/writer001/main/vcl/inc/vcl/region.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/vcl/inc/vcl/region.hxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/vcl/inc/vcl/region.hxx (original)
+++ incubator/ooo/branches/writer001/main/vcl/inc/vcl/region.hxx Mon Aug 20 11:46:19 2012
@@ -61,6 +61,7 @@ private:
 	SAL_DLLPRIVATE void				ImplCopyData();
 	SAL_DLLPRIVATE void				ImplCreateRectRegion( const Rectangle& rRect );
 	SAL_DLLPRIVATE void				ImplCreatePolyPolyRegion( const PolyPolygon& rPolyPoly );
+	SAL_DLLPRIVATE void				ImplCreatePolyPolyRegion( const basegfx::B2DPolyPolygon& rPolyPoly );
 	SAL_DLLPRIVATE void				ImplPolyPolyRegionToBandRegionFunc();
 	SAL_DLLPRIVATE inline void 		ImplPolyPolyRegionToBandRegion();
 	SAL_DLLPRIVATE const ImplRegion*	ImplGetImplRegion() const { return mpImplRegion; }

Modified: incubator/ooo/branches/writer001/main/vcl/os2/source/app/salinst.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/vcl/os2/source/app/salinst.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/vcl/os2/source/app/salinst.cxx (original)
+++ incubator/ooo/branches/writer001/main/vcl/os2/source/app/salinst.cxx Mon Aug 20 11:46:19 2012
@@ -354,7 +354,7 @@ void InitSalMain()
 	HMQ hMQ;
 	SalData* pData = GetAppSalData();
 #if OSL_DEBUG_LEVEL>0
-printf("InitSalMain\n");
+	debug_printf("InitSalMain\n");
 #endif
 
 	// morph application to PM

Modified: incubator/ooo/branches/writer001/main/vcl/os2/source/gdi/salgdi3.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/vcl/os2/source/gdi/salgdi3.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/vcl/os2/source/gdi/salgdi3.cxx (original)
+++ incubator/ooo/branches/writer001/main/vcl/os2/source/gdi/salgdi3.cxx Mon Aug 20 11:46:19 2012
@@ -601,6 +601,7 @@ void ImplOs2FontData::ReadCmapTable( HPS
 
     if( !mpUnicodeMap )
         mpUnicodeMap = ImplFontCharMap::GetDefaultMap( bIsSymbolFont );
+    mpUnicodeMap->AddReference();
 }
 
 // =======================================================================

Modified: incubator/ooo/branches/writer001/main/vcl/os2/source/gdi/salprn.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/vcl/os2/source/gdi/salprn.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/vcl/os2/source/gdi/salprn.cxx (original)
+++ incubator/ooo/branches/writer001/main/vcl/os2/source/gdi/salprn.cxx Mon Aug 20 11:46:19 2012
@@ -215,6 +215,10 @@ void Os2SalInstance::GetPrinterQueueInfo
 
 		ByteString aOrgDriverName( pPrqInfo->pszDriverName);
 		ByteString aName( pPrqInfo->pszName);
+#if OSL_DEBUG_LEVEL>0
+		printf("GetPrinterQueueInfo pszDriverName %s\n", pPrqInfo->pszDriverName);
+		printf("GetPrinterQueueInfo pszName %s\n", pPrqInfo->pszDriverName);
+#endif
 		pInfo->maDriver 	 = ::rtl::OStringToOUString (aOrgDriverName, gsl_getSystemTextEncoding());
 		pInfo->maPrinterName = ::rtl::OStringToOUString (pPrqInfo->pszComment, gsl_getSystemTextEncoding());
 		pInfo->maLocation	 = ::rtl::OStringToOUString (aName, gsl_getSystemTextEncoding());
@@ -647,6 +651,10 @@ static void ImplGetFormAndTrayList( Os2S
 						ImplFormInfo* pInfo 	= new ImplFormInfo;
 						pInfo->mnPaperWidth 	= pElm->hcInfo.cx;
 						pInfo->mnPaperHeight	= pElm->hcInfo.cy;
+#if OSL_DEBUG_LEVEL>0
+		printf("ImplGetFormAndTrayList mnPaperWidth %d\n", pInfo->mnPaperWidth);
+		printf("ImplGetFormAndTrayList mnPaperHeight %d\n", pInfo->mnPaperHeight);
+#endif
 						pInfo->mnId 			= pElm->djppsFormID;
 						pOs2SalInfoPrinter->mpFormArray[i] = pInfo;
 					}

Modified: incubator/ooo/branches/writer001/main/vcl/source/control/field.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/vcl/source/control/field.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/vcl/source/control/field.cxx (original)
+++ incubator/ooo/branches/writer001/main/vcl/source/control/field.cxx Mon Aug 20 11:46:19 2012
@@ -477,6 +477,9 @@ void NumericFormatter::ImplInit()
     mnLastValue         = 0;
     mnMin               = 0;
     mnMax               = 0x7FFFFFFFFFFFFFFFLL;
+#ifdef OS2 // see i120312 for details.
+    mnMax               = 0x00000000FFFFFFFFLL;
+#endif
     mnCorrectedValue    = 0;
     mnDecimalDigits     = 2;
     mnType              = FORMAT_NUMERIC;
@@ -694,10 +697,14 @@ sal_Int64 NumericFormatter::Normalize( s
 sal_Int64 NumericFormatter::Denormalize( sal_Int64 nValue ) const
 {
     sal_Int64 nFactor = ImplPower10( GetDecimalDigits() );
+    
+    if((nValue < ( SAL_MIN_INT64 + nFactor )) ||
+       (nValue > ( SAL_MAX_INT64 - nFactor )))
+	return ( nValue / nFactor );
     if( nValue < 0 )
-        return ((nValue-(nFactor/2)) / nFactor );
+	return ((nValue-(nFactor/2)) / nFactor );
     else
-        return ((nValue+(nFactor/2)) / nFactor );
+	return ((nValue+(nFactor/2)) / nFactor );
 }
 
 // -----------------------------------------------------------------------
@@ -1247,13 +1254,18 @@ static double nonValueDoubleToValueDoubl
 sal_Int64 MetricField::ConvertValue( sal_Int64 nValue, sal_Int64 mnBaseValue, sal_uInt16 nDecDigits,
                                      FieldUnit eInUnit, FieldUnit eOutUnit )
 {
+    double nDouble = nonValueDoubleToValueDouble( ConvertDoubleValue(
+                (double)nValue, mnBaseValue, nDecDigits, eInUnit, eOutUnit ) );
+    sal_Int64 nLong ;
+
     // caution: precision loss in double cast
-    return static_cast<sal_Int64>(
-        // #150733# cast double to sal_Int64 can throw a
-        // EXCEPTION_FLT_INVALID_OPERATION on Windows
-        nonValueDoubleToValueDouble(
-            ConvertDoubleValue( (double)nValue, mnBaseValue, nDecDigits,
-                                eInUnit, eOutUnit ) ) );
+    if ( nDouble <= (double)SAL_MIN_INT64 )
+	nLong = SAL_MIN_INT64;
+    else if ( nDouble >= (double)SAL_MAX_INT64 )
+	nLong = SAL_MAX_INT64;
+    else
+	nLong = static_cast<sal_Int64>( nDouble );
+    return ( nLong );
 }
 
 // -----------------------------------------------------------------------
@@ -1262,8 +1274,6 @@ sal_Int64 MetricField::ConvertValue( sal
                                      MapUnit eInUnit, FieldUnit eOutUnit )
 {
     return static_cast<sal_Int64>(
-        // #150733# cast double to sal_Int64 can throw a
-        // EXCEPTION_FLT_INVALID_OPERATION on Windows
         nonValueDoubleToValueDouble(
             ConvertDoubleValue( nValue, nDigits, eInUnit, eOutUnit ) ) );
 }

Modified: incubator/ooo/branches/writer001/main/vcl/source/gdi/bitmapex.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/vcl/source/gdi/bitmapex.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/vcl/source/gdi/bitmapex.cxx (original)
+++ incubator/ooo/branches/writer001/main/vcl/source/gdi/bitmapex.cxx Mon Aug 20 11:46:19 2012
@@ -131,8 +131,15 @@ BitmapEx::BitmapEx( const Bitmap& rBmp, 
 		eTransparent	( !rMask ? TRANSPARENT_NONE : TRANSPARENT_BITMAP ),
 		bAlpha			( sal_False )
 {
-    DBG_ASSERT( !rMask || rBmp.GetSizePixel() == rMask.GetSizePixel(),
-                "BitmapEx::BitmapEx(): size mismatch for bitmap and mask." );
+    if(!rMask)
+    {
+        OSL_ENSURE(false, "Empty mask given (!)");
+    }
+    else if(rBmp.GetSizePixel() != rMask.GetSizePixel())
+    {
+        OSL_ENSURE(false, "Mask size differs from Bitmap size, corrected Mask (!)");
+        aMask.Scale(rBmp.GetSizePixel());
+    }
 
     // #105489# Ensure a mask is exactly one bit deep
     if( !!aMask && aMask.GetBitCount() != 1 )
@@ -151,8 +158,15 @@ BitmapEx::BitmapEx( const Bitmap& rBmp, 
 		eTransparent	( !rAlphaMask ? TRANSPARENT_NONE : TRANSPARENT_BITMAP ),
 		bAlpha			( !rAlphaMask ? sal_False : sal_True )
 {
-    DBG_ASSERT( !rAlphaMask || rBmp.GetSizePixel() == rAlphaMask.GetSizePixel(),
-                "BitmapEx::BitmapEx(): size mismatch for bitmap and alpha mask." );
+    if(!rAlphaMask)
+    {
+        OSL_ENSURE(false, "Empty alpha given (!)");
+    }
+    else if(rBmp.GetSizePixel() != rAlphaMask.GetSizePixel())
+    {
+        OSL_ENSURE(false, "Alpha size differs from Bitmap size, corrected Mask (!)");
+        aMask.Scale(rBmp.GetSizePixel());
+    }
 
     // #i75531# the workaround below can go when
     // X11SalGraphics::drawAlphaBitmap()'s render acceleration

Modified: incubator/ooo/branches/writer001/main/vcl/source/gdi/metric.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/vcl/source/gdi/metric.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/vcl/source/gdi/metric.cxx (original)
+++ incubator/ooo/branches/writer001/main/vcl/source/gdi/metric.cxx Mon Aug 20 11:46:19 2012
@@ -748,7 +748,7 @@ bool ParseCMAP( const unsigned char* pCm
             while( cMin < cEnd )
             {
                 int j = 0;
-                for(; (cMin < cEnd) && (j < NINSIZE); ++cMin )
+                for (; (cMin < cEnd) && (j < (NINSIZE-1)); ++cMin)
                 {
                     if( cMin >= 0x0100 )
                         cCharsInp[ j++ ] = static_cast<sal_Char>(cMin >> 8);

Modified: incubator/ooo/branches/writer001/main/vcl/source/gdi/outmap.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/vcl/source/gdi/outmap.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/vcl/source/gdi/outmap.cxx (original)
+++ incubator/ooo/branches/writer001/main/vcl/source/gdi/outmap.cxx Mon Aug 20 11:46:19 2012
@@ -60,9 +60,10 @@ DBG_NAMEEX( Region )
 
 // =======================================================================
 
-static long aImplNumeratorAry[MAP_PIXEL+1] =
+static int const s_ImplArySize = MAP_PIXEL+1;
+static long aImplNumeratorAry[s_ImplArySize] =
 	{	 1,   1,   5,  50,	  1,   1,  1, 1,  1,	1, 1 };
-static long aImplDenominatorAry[MAP_PIXEL+1] =
+static long aImplDenominatorAry[s_ImplArySize] =
 	 { 2540, 254, 127, 127, 1000, 100, 10, 1, 72, 1440, 1 };
 
 // -----------------------------------------------------------------------
@@ -1952,9 +1953,9 @@ Region OutputDevice::PixelToLogic( const
 #define ENTER3( eUnitSource, eUnitDest )								\
 	long nNumerator 	 = 1;		\
 	long nDenominator	 = 1;		\
-	DBG_ASSERT( eUnitSource < MAP_LASTENUMDUMMY, "Invalid source map unit");	\
-	DBG_ASSERT( eUnitDest < MAP_LASTENUMDUMMY, "Invalid destination map unit");	\
-	if( (eUnitSource < MAP_LASTENUMDUMMY) && (eUnitDest < MAP_LASTENUMDUMMY) )	\
+	DBG_ASSERT( eUnitSource < s_ImplArySize, "Invalid source map unit");	\
+	DBG_ASSERT( eUnitDest < s_ImplArySize, "Invalid destination map unit");	\
+	if( (eUnitSource < s_ImplArySize) && (eUnitDest < s_ImplArySize) )	\
 	{	\
 		nNumerator 	 = aImplNumeratorAry[eUnitSource] * 			\
 						   aImplDenominatorAry[eUnitDest];				\

Modified: incubator/ooo/branches/writer001/main/vcl/source/gdi/print3.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/vcl/source/gdi/print3.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/vcl/source/gdi/print3.cxx (original)
+++ incubator/ooo/branches/writer001/main/vcl/source/gdi/print3.cxx Mon Aug 20 11:46:19 2012
@@ -1254,6 +1254,7 @@ void PrinterController::triggerAppToFree
     mpImplData->mpProgress = NULL;
     GDIMetaFile aMtf;
     getPageFile( 0, aMtf, false );
+    setLastPage( sal_False );
 }
 
 void PrinterController::abortJob()

Modified: incubator/ooo/branches/writer001/main/vcl/source/gdi/region.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/vcl/source/gdi/region.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/vcl/source/gdi/region.cxx (original)
+++ incubator/ooo/branches/writer001/main/vcl/source/gdi/region.cxx Mon Aug 20 11:46:19 2012
@@ -1136,7 +1136,7 @@ Region::Region( const basegfx::B2DPolyPo
 	DBG_CTOR( Region, ImplDbgTestRegion );
 	DBG_CHKOBJ( &rPolyPoly, PolyPolygon, NULL );
 
-	mpImplRegion = new ImplRegion( rPolyPoly );
+	ImplCreatePolyPolyRegion( rPolyPoly );
 }
 
 // -----------------------------------------------------------------------
@@ -1226,6 +1226,16 @@ void Region::ImplCreatePolyPolyRegion( c
 
 // -----------------------------------------------------------------------
 
+void Region::ImplCreatePolyPolyRegion( const basegfx::B2DPolyPolygon& rPolyPoly )
+{
+    if (rPolyPoly.count()==0 || rPolyPoly.getB2DRange().isEmpty())
+        mpImplRegion = (ImplRegion*)(&aImplEmptyRegion);
+    else
+        mpImplRegion = new ImplRegion( rPolyPoly );
+}
+
+// -----------------------------------------------------------------------
+
 void Region::ImplPolyPolyRegionToBandRegionFunc()
 {
     // ensure to subdivide when bezier segemnts are used, it's going to

Modified: incubator/ooo/branches/writer001/main/vcl/source/window/dialog.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/vcl/source/window/dialog.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/vcl/source/window/dialog.cxx (original)
+++ incubator/ooo/branches/writer001/main/vcl/source/window/dialog.cxx Mon Aug 20 11:46:19 2012
@@ -877,8 +877,21 @@ void Dialog::SetModalInputMode( sal_Bool
             mpPrevExecuteDlg->EnableInput( sal_True, sal_True, sal_True, this );
             // ensure continued modality of prev dialog
             // do not change modality counter
-            mpPrevExecuteDlg->SetModalInputMode( sal_False );
-            mpPrevExecuteDlg->SetModalInputMode( sal_True );
+			
+			
+			// #i119994# need find the last modal dialog before reactive it
+            Dialog * pPrevModalDlg = mpPrevExecuteDlg;
+
+            while( pPrevModalDlg && !pPrevModalDlg->IsModalInputMode() )
+				pPrevModalDlg = pPrevModalDlg->mpPrevExecuteDlg;
+
+            if( pPrevModalDlg &&
+            ( pPrevModalDlg == mpPrevExecuteDlg 
+				|| !pPrevModalDlg->IsWindowOrChild( this, sal_True ) ) )
+            {
+				mpPrevExecuteDlg->SetModalInputMode( sal_False );
+				mpPrevExecuteDlg->SetModalInputMode( sal_True );
+            }			
         }
     }
 }

Modified: incubator/ooo/branches/writer001/main/vcl/source/window/menu.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/vcl/source/window/menu.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/vcl/source/window/menu.cxx (original)
+++ incubator/ooo/branches/writer001/main/vcl/source/window/menu.cxx Mon Aug 20 11:46:19 2012
@@ -101,14 +101,12 @@ DBG_NAME( Menu )
 #ifdef OS2
 
 #include "svsys.h"
+#include "os2/salmenu.h"
 
 // return sal_True if hilite should be executed: left mouse button down
 // or xwp mouse hook enabled
 static sal_Bool ImplHilite( const MouseEvent& rMEvt )
 {
-#if 1 // until hilite code reworked
-	return sal_True;
-#else
 	static sal_Bool init = sal_False;
 	static HOOKCONFIG hc;
 
@@ -126,7 +124,6 @@ static sal_Bool ImplHilite( const MouseE
 		return sal_True;
 	// return xwp flag
 	return hc.fSlidingMenus;
-#endif
 }
 
 #endif

Modified: incubator/ooo/branches/writer001/main/vcl/unx/gtk/a11y/atkwrapper.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/vcl/unx/gtk/a11y/atkwrapper.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/vcl/unx/gtk/a11y/atkwrapper.cxx (original)
+++ incubator/ooo/branches/writer001/main/vcl/unx/gtk/a11y/atkwrapper.cxx Mon Aug 20 11:46:19 2012
@@ -313,7 +313,7 @@ static AtkRole mapToAtkRole( sal_Int16 n
         initialized = true;
     }
 
-    static const sal_Int32 nMapSize = sizeof(roleMap)/sizeof(sal_Int16);
+    static const sal_Int32 nMapSize = sizeof(roleMap)/sizeof(roleMap[0]);
     if( 0 <= nRole &&  nMapSize > nRole )
         role = roleMap[nRole];
 

Modified: incubator/ooo/branches/writer001/main/vcl/unx/gtk/app/gtkdata.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/vcl/unx/gtk/app/gtkdata.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/vcl/unx/gtk/app/gtkdata.cxx (original)
+++ incubator/ooo/branches/writer001/main/vcl/unx/gtk/app/gtkdata.cxx Mon Aug 20 11:46:19 2012
@@ -364,7 +364,7 @@ GdkCursor* GtkSalDisplay::getFromXPM( co
 
 GdkCursor *GtkSalDisplay::getCursor( PointerStyle ePointerStyle )
 {
-    if( ePointerStyle > POINTER_COUNT )
+    if (ePointerStyle >= POINTER_COUNT)
         return NULL;
 
 	if ( !m_aCursors[ ePointerStyle ] )

Modified: incubator/ooo/branches/writer001/main/vcl/win/source/gdi/salbmp.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/vcl/win/source/gdi/salbmp.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/vcl/win/source/gdi/salbmp.cxx (original)
+++ incubator/ooo/branches/writer001/main/vcl/win/source/gdi/salbmp.cxx Mon Aug 20 11:46:19 2012
@@ -313,42 +313,52 @@ HGLOBAL WinSalBitmap::ImplCreateDIB( con
 
 	HGLOBAL hDIB = 0;
 
-	if ( rSize.Width() && rSize.Height() )
-	{
-		const sal_uLong 	nImageSize = AlignedWidth4Bytes( nBits * rSize.Width() ) * rSize.Height();
-		const sal_uInt16	nColors = ( nBits <= 8 ) ? ( 1 << nBits ) : 0;
-
-		hDIB = GlobalAlloc( GHND, sizeof( BITMAPINFOHEADER ) + nColors * sizeof( RGBQUAD ) + nImageSize );
-
-		if( hDIB )
-		{
-			PBITMAPINFO 		pBI = (PBITMAPINFO) GlobalLock( hDIB );
-			PBITMAPINFOHEADER	pBIH = (PBITMAPINFOHEADER) pBI;
-
-			pBIH->biSize = sizeof( BITMAPINFOHEADER );
-			pBIH->biWidth = rSize.Width();
-			pBIH->biHeight = rSize.Height();
-			pBIH->biPlanes = 1;
-			pBIH->biBitCount = nBits;
-			pBIH->biCompression = BI_RGB;
-			pBIH->biSizeImage = nImageSize;
-			pBIH->biXPelsPerMeter = 0;
-			pBIH->biYPelsPerMeter = 0;
-			pBIH->biClrUsed = 0;
-			pBIH->biClrImportant = 0;
+	if( rSize.Width() <= 0 || rSize.Height() <= 0 )
+		return hDIB;
 
-			if ( nColors )
-			{
-				const sal_uInt16 nMinCount = Min( nColors, rPal.GetEntryCount() );
+	// calculate bitmap size in Bytes
+	const sal_uLong nAlignedWidth4Bytes = AlignedWidth4Bytes( nBits * rSize.Width() );
+	const sal_uLong nImageSize = nAlignedWidth4Bytes * rSize.Height();
+	bool bOverflow = (nImageSize / nAlignedWidth4Bytes) != rSize.Height();
+	if( bOverflow )
+		return hDIB;
+
+	// allocate bitmap memory including header and palette
+	const sal_uInt16 nColors = (nBits <= 8) ? (1 << nBits) : 0;
+	const sal_uLong nHeaderSize = sizeof( BITMAPINFOHEADER ) + nColors * sizeof( RGBQUAD );
+	bOverflow = (nHeaderSize + nImageSize) < nImageSize;
+	if( bOverflow )
+		return hDIB;
+
+	hDIB = GlobalAlloc( GHND, nHeaderSize + nImageSize );
+	if( !hDIB )
+		return hDIB;
+
+	PBITMAPINFO pBI = static_cast<PBITMAPINFO>( GlobalLock( hDIB ) );
+	PBITMAPINFOHEADER pBIH = reinterpret_cast<PBITMAPINFOHEADER>( pBI );
+
+	pBIH->biSize = sizeof( BITMAPINFOHEADER );
+	pBIH->biWidth = rSize.Width();
+	pBIH->biHeight = rSize.Height();
+	pBIH->biPlanes = 1;
+	pBIH->biBitCount = nBits;
+	pBIH->biCompression = BI_RGB;
+	pBIH->biSizeImage = nImageSize;
+	pBIH->biXPelsPerMeter = 0;
+	pBIH->biYPelsPerMeter = 0;
+	pBIH->biClrUsed = 0;
+	pBIH->biClrImportant = 0;
 
-				if( nMinCount )
-					memcpy( pBI->bmiColors, rPal.ImplGetColorBuffer(), nMinCount * sizeof( RGBQUAD ) );
-			}
-
-			GlobalUnlock( hDIB );
-		}
+	if( nColors )
+	{
+		// copy the palette entries if any
+		const sal_uInt16 nMinCount = Min( nColors, rPal.GetEntryCount() );
+		if( nMinCount )
+			memcpy( pBI->bmiColors, rPal.ImplGetColorBuffer(), nMinCount * sizeof(RGBQUAD) );
 	}
 
+	GlobalUnlock( hDIB );
+
 	return hDIB;
 }
 

Modified: incubator/ooo/branches/writer001/main/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx (original)
+++ incubator/ooo/branches/writer001/main/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx Mon Aug 20 11:46:19 2012
@@ -138,6 +138,7 @@ public:
     */
     virtual void sprm(Sprm & sprm) = 0;
     
+    virtual ~Properties(){}
 };
 
 /**
@@ -154,6 +155,8 @@ public:
        @param ref     reference to properties of the entry
      */
     virtual void entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref) = 0;    
+
+    virtual ~Table() {}
 };
 
 /**
@@ -171,6 +174,8 @@ public:
      */
     virtual void data(const sal_uInt8* buf, size_t len,
                       writerfilter::Reference<Properties>::Pointer_t ref) = 0;
+
+    virtual ~BinaryObj(){}
 };
 
 /**
@@ -271,6 +276,8 @@ public:
        @param info     the information
      */
     virtual void info(const string & info) = 0;
+
+    virtual ~Stream() {}
 };
 
 /**
@@ -322,6 +329,8 @@ public:
        Returns string representation of this value.
      */
     virtual string toString() const = 0;
+
+    virtual ~Value() {}
 };
 
 /**
@@ -373,6 +382,8 @@ public:
        Returns string repesentation of sprm.
      */
     virtual string toString() const = 0;
+
+    virtual ~Sprm() {}
 };
 
 /**

Modified: incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/DomainMapperTableHandler.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/DomainMapperTableHandler.cxx (original)
+++ incubator/ooo/branches/writer001/main/writerfilter/source/dmapper/DomainMapperTableHandler.cxx Mon Aug 20 11:46:19 2012
@@ -504,149 +504,156 @@ CellPropertyValuesSeq_t DomainMapperTabl
 #ifdef DEBUG_DMAPPER_TABLE_HANDLER
     dmapper_logger->startElement("getCellProperties");
 #endif
-    
+
     CellPropertyValuesSeq_t aCellProperties( m_aCellProperties.size() );
-    
-    // std::vector< std::vector<PropertyMapPtr> > m_aCellProperties
-    PropertyMapVector2::const_iterator aRowOfCellsIterator = m_aCellProperties.begin();
-    PropertyMapVector2::const_iterator aRowOfCellsIteratorEnd = m_aCellProperties.end();
-    PropertyMapVector2::const_iterator aLastRowIterator = m_aCellProperties.end() - 1;
-    sal_Int32 nRow = 0;
-    
-    //it's a uno::Sequence< beans::PropertyValues >*
-    RowPropertyValuesSeq_t* pCellProperties = aCellProperties.getArray();
-    while( aRowOfCellsIterator != aRowOfCellsIteratorEnd )
+
+    if ( ! m_aCellProperties.empty())
     {
-        //aRowOfCellsIterator points to a vector of PropertyMapPtr
-        PropertyMapVector1::const_iterator aCellIterator = aRowOfCellsIterator->begin();
-        PropertyMapVector1::const_iterator aCellIteratorEnd = aRowOfCellsIterator->end();
-        PropertyMapVector1::const_iterator aLastCellIterator = aRowOfCellsIterator->end() - 1;
-        
-        // Get the row style properties
-        sal_Int32 nRowStyleMask = sal_Int32( 0 );
-        PropertyMapPtr pRowProps = m_aRowProperties[nRow];
-        if ( pRowProps.get( ) )
+    
+        // std::vector< std::vector<PropertyMapPtr> > m_aCellProperties
+        PropertyMapVector2::const_iterator aRowOfCellsIterator = m_aCellProperties.begin();
+        PropertyMapVector2::const_iterator aRowOfCellsIteratorEnd = m_aCellProperties.end();
+        PropertyMapVector2::const_iterator aLastRowIterator = m_aCellProperties.end() - 1;
+        sal_Int32 nRow = 0;
+    
+        //it's a uno::Sequence< beans::PropertyValues >*
+        RowPropertyValuesSeq_t* pCellProperties = aCellProperties.getArray();
+        while( aRowOfCellsIterator != aRowOfCellsIteratorEnd )
         {
-            PropertyMap::iterator pTcCnfStyleIt = pRowProps->find( PropertyDefinition( PROP_CNF_STYLE, true ) );
-            if ( pTcCnfStyleIt != pRowProps->end( ) )
+            if ( ! aRowOfCellsIterator->empty())
             {
-                if ( rInfo.pTableStyle )
+                //aRowOfCellsIterator points to a vector of PropertyMapPtr
+                PropertyMapVector1::const_iterator aCellIterator = aRowOfCellsIterator->begin();
+                PropertyMapVector1::const_iterator aCellIteratorEnd = aRowOfCellsIterator->end();
+                PropertyMapVector1::const_iterator aLastCellIterator = aRowOfCellsIterator->end() - 1;
+        
+                // Get the row style properties
+                sal_Int32 nRowStyleMask = sal_Int32( 0 );
+                PropertyMapPtr pRowProps = m_aRowProperties[nRow];
+                if ( pRowProps.get( ) )
                 {
-                    rtl::OUString sMask;
-                    pTcCnfStyleIt->second >>= sMask;
-                    nRowStyleMask = sMask.toInt32( 2 );
+                    PropertyMap::iterator pTcCnfStyleIt = pRowProps->find( PropertyDefinition( PROP_CNF_STYLE, true ) );
+                    if ( pTcCnfStyleIt != pRowProps->end( ) )
+                    {
+                        if ( rInfo.pTableStyle )
+                        {
+                            rtl::OUString sMask;
+                            pTcCnfStyleIt->second >>= sMask;
+                            nRowStyleMask = sMask.toInt32( 2 );
+                        }
+                        pRowProps->erase( pTcCnfStyleIt );
+                    }
                 }
-                pRowProps->erase( pTcCnfStyleIt );
-            }
-        }
         
-        sal_Int32 nCell = 0;
-        pCellProperties[nRow].realloc( aRowOfCellsIterator->size() );
-        beans::PropertyValues* pSingleCellProperties = pCellProperties[nRow].getArray();
-        while( aCellIterator != aCellIteratorEnd )
-        {
-            PropertyMapPtr pAllCellProps( new PropertyMap );
+                sal_Int32 nCell = 0;
+                pCellProperties[nRow].realloc( aRowOfCellsIterator->size() );
+                beans::PropertyValues* pSingleCellProperties = pCellProperties[nRow].getArray();
+                while( aCellIterator != aCellIteratorEnd )
+                {
+                    PropertyMapPtr pAllCellProps( new PropertyMap );
             
-            bool bIsEndCol = aCellIterator == aLastCellIterator;
-            bool bIsEndRow = aRowOfCellsIterator == aLastRowIterator;
+                    bool bIsEndCol = aCellIterator == aLastCellIterator;
+                    bool bIsEndRow = aRowOfCellsIterator == aLastRowIterator;
             
-            //aCellIterator points to a PropertyMapPtr;
-            if( aCellIterator->get() )
-            {
-                if ( rInfo.pTableDefaults->size( ) )
-                    pAllCellProps->insert( rInfo.pTableDefaults );
-                    
-                    // Fill the cell properties with the ones of the style
-                    sal_Int32 nCellStyleMask = 0;
-                    const PropertyMap::iterator aCnfStyleIter = 
-                    aCellIterator->get()->find( PropertyDefinition( PROP_CNF_STYLE, false ) );
-                    if ( aCnfStyleIter != aCellIterator->get( )->end( ) )
+                    //aCellIterator points to a PropertyMapPtr;
+                    if( aCellIterator->get() )
                     {
-                        if ( rInfo.pTableStyle ) {
-                            rtl::OUString sMask;
-                            aCnfStyleIter->second >>= sMask;
-                            nCellStyleMask = sMask.toInt32( 2 );
+                        if ( rInfo.pTableDefaults->size( ) )
+                            pAllCellProps->insert( rInfo.pTableDefaults );
+                    
+                        // Fill the cell properties with the ones of the style
+                        sal_Int32 nCellStyleMask = 0;
+                        const PropertyMap::iterator aCnfStyleIter = 
+                            aCellIterator->get()->find( PropertyDefinition( PROP_CNF_STYLE, false ) );
+                        if ( aCnfStyleIter != aCellIterator->get( )->end( ) )
+                        {
+                            if ( rInfo.pTableStyle ) {
+                                rtl::OUString sMask;
+                                aCnfStyleIter->second >>= sMask;
+                                nCellStyleMask = sMask.toInt32( 2 );
+                            }
+                            aCellIterator->get( )->erase( aCnfStyleIter );
                         }
-                        aCellIterator->get( )->erase( aCnfStyleIter );
-                    }
                 
-                if ( rInfo.pTableStyle )
-                {
-                    PropertyMapPtr pStyleProps = rInfo.pTableStyle->GetProperties( nCellStyleMask + nRowStyleMask );
-                    pAllCellProps->insert( pStyleProps );
-                }
+                        if ( rInfo.pTableStyle )
+                        {
+                            PropertyMapPtr pStyleProps = rInfo.pTableStyle->GetProperties( nCellStyleMask + nRowStyleMask );
+                            pAllCellProps->insert( pStyleProps );
+                        }
                 
-                // Then add the cell properties
-                pAllCellProps->insert( *aCellIterator );
-                aCellIterator->get( )->swap( *pAllCellProps.get( ) );
+                        // Then add the cell properties
+                        pAllCellProps->insert( *aCellIterator );
+                        aCellIterator->get( )->swap( *pAllCellProps.get( ) );
                 
 #ifdef DEBUG_DMAPPER_TABLE_HANDLER
-                dmapper_logger->startElement("cell");
-                dmapper_logger->attribute("cell", nCell);
-                dmapper_logger->attribute("row", nRow);
+                        dmapper_logger->startElement("cell");
+                        dmapper_logger->attribute("cell", nCell);
+                        dmapper_logger->attribute("row", nRow);
 #endif
                 
-                lcl_computeCellBorders( rInfo.pTableBorders, *aCellIterator, nCell, nRow, bIsEndCol, bIsEndRow );
+                        lcl_computeCellBorders( rInfo.pTableBorders, *aCellIterator, nCell, nRow, bIsEndCol, bIsEndRow );
                 
-                //now set the default left+right border distance TODO: there's an sprm containing the default distance!
-                const PropertyMap::const_iterator aLeftDistanceIter = 
-                aCellIterator->get()->find( PropertyDefinition(PROP_LEFT_BORDER_DISTANCE, false) );
-                if( aLeftDistanceIter == aCellIterator->get()->end() )
-                    aCellIterator->get()->Insert( PROP_LEFT_BORDER_DISTANCE, false, 
-                                                 uno::makeAny(rInfo.nLeftBorderDistance ) );
-                const PropertyMap::const_iterator aRightDistanceIter = 
-                aCellIterator->get()->find( PropertyDefinition(PROP_RIGHT_BORDER_DISTANCE, false) );
-                if( aRightDistanceIter == aCellIterator->get()->end() )
-                    aCellIterator->get()->Insert( PROP_RIGHT_BORDER_DISTANCE, false, 
-                                                 uno::makeAny((sal_Int32) rInfo.nRightBorderDistance ) );
+                        //now set the default left+right border distance TODO: there's an sprm containing the default distance!
+                        const PropertyMap::const_iterator aLeftDistanceIter = 
+                            aCellIterator->get()->find( PropertyDefinition(PROP_LEFT_BORDER_DISTANCE, false) );
+                        if( aLeftDistanceIter == aCellIterator->get()->end() )
+                            aCellIterator->get()->Insert( PROP_LEFT_BORDER_DISTANCE, false, 
+                                uno::makeAny(rInfo.nLeftBorderDistance ) );
+                        const PropertyMap::const_iterator aRightDistanceIter = 
+                            aCellIterator->get()->find( PropertyDefinition(PROP_RIGHT_BORDER_DISTANCE, false) );
+                        if( aRightDistanceIter == aCellIterator->get()->end() )
+                            aCellIterator->get()->Insert( PROP_RIGHT_BORDER_DISTANCE, false, 
+                                uno::makeAny((sal_Int32) rInfo.nRightBorderDistance ) );
                 
-                const PropertyMap::const_iterator aTopDistanceIter = 
-                aCellIterator->get()->find( PropertyDefinition(PROP_TOP_BORDER_DISTANCE, false) );
-                if( aTopDistanceIter == aCellIterator->get()->end() )
-                    aCellIterator->get()->Insert( PROP_TOP_BORDER_DISTANCE, false, 
-                                                 uno::makeAny((sal_Int32) rInfo.nTopBorderDistance ) );
+                        const PropertyMap::const_iterator aTopDistanceIter = 
+                            aCellIterator->get()->find( PropertyDefinition(PROP_TOP_BORDER_DISTANCE, false) );
+                        if( aTopDistanceIter == aCellIterator->get()->end() )
+                            aCellIterator->get()->Insert( PROP_TOP_BORDER_DISTANCE, false, 
+                                uno::makeAny((sal_Int32) rInfo.nTopBorderDistance ) );
                 
-                const PropertyMap::const_iterator aBottomDistanceIter = 
-                aCellIterator->get()->find( PropertyDefinition(PROP_BOTTOM_BORDER_DISTANCE, false) );
-                if( aBottomDistanceIter == aCellIterator->get()->end() )
-                    aCellIterator->get()->Insert( PROP_BOTTOM_BORDER_DISTANCE, false, 
-                                                 uno::makeAny((sal_Int32) rInfo.nBottomBorderDistance ) );
+                        const PropertyMap::const_iterator aBottomDistanceIter = 
+                            aCellIterator->get()->find( PropertyDefinition(PROP_BOTTOM_BORDER_DISTANCE, false) );
+                        if( aBottomDistanceIter == aCellIterator->get()->end() )
+                            aCellIterator->get()->Insert( PROP_BOTTOM_BORDER_DISTANCE, false, 
+                                uno::makeAny((sal_Int32) rInfo.nBottomBorderDistance ) );
                 
-                pSingleCellProperties[nCell] = aCellIterator->get()->GetPropertyValues();
+                        pSingleCellProperties[nCell] = aCellIterator->get()->GetPropertyValues();
 #ifdef DEBUG_DMAPPER_TABLE_HANDLER
-                dmapper_logger->endElement("cell");
+                        dmapper_logger->endElement("cell");
 #endif
-            }
-            ++nCell;
-            ++aCellIterator;
-        }    
+                    }
+                    ++nCell;
+                    ++aCellIterator;
+                }    
 #ifdef DEBUG_DMAPPER_TABLE_HANDLER
-        //-->debug cell properties
-        {
-            ::rtl::OUString sNames;
-            const uno::Sequence< beans::PropertyValues > aDebugCurrentRow = aCellProperties[nRow];
-            sal_Int32 nDebugCells = aDebugCurrentRow.getLength();
-            (void) nDebugCells;
-            for( sal_Int32  nDebugCell = 0; nDebugCell < nDebugCells; ++nDebugCell)
-            {
-                const uno::Sequence< beans::PropertyValue >& aDebugCellProperties = aDebugCurrentRow[nDebugCell];
-                sal_Int32 nDebugCellProperties = aDebugCellProperties.getLength();
-                for( sal_Int32  nDebugProperty = 0; nDebugProperty < nDebugCellProperties; ++nDebugProperty)
+                //-->debug cell properties
                 {
-                    const ::rtl::OUString sName = aDebugCellProperties[nDebugProperty].Name;
-                    sNames += sName;
-                    sNames += ::rtl::OUString('-');
+                    ::rtl::OUString sNames;
+                    const uno::Sequence< beans::PropertyValues > aDebugCurrentRow = aCellProperties[nRow];
+                    sal_Int32 nDebugCells = aDebugCurrentRow.getLength();
+                    (void) nDebugCells;
+                    for( sal_Int32  nDebugCell = 0; nDebugCell < nDebugCells; ++nDebugCell)
+                    {
+                        const uno::Sequence< beans::PropertyValue >& aDebugCellProperties = aDebugCurrentRow[nDebugCell];
+                        sal_Int32 nDebugCellProperties = aDebugCellProperties.getLength();
+                        for( sal_Int32  nDebugProperty = 0; nDebugProperty < nDebugCellProperties; ++nDebugProperty)
+                        {
+                            const ::rtl::OUString sName = aDebugCellProperties[nDebugProperty].Name;
+                            sNames += sName;
+                            sNames += ::rtl::OUString('-');
+                        }
+                        sNames += ::rtl::OUString('\n');
+                    }
+                    (void)sNames;
                 }
-                sNames += ::rtl::OUString('\n');
+                //--<
+#endif
+                ++nRow;
+                ++aRowOfCellsIterator;
             }
-            (void)sNames;
         }
-        //--<
-#endif
-        ++nRow;
-        ++aRowOfCellsIterator;
     }
-                   
+    
 #ifdef DEBUG_DMAPPER_TABLE_HANDLER
     dmapper_logger->endElement("getCellProperties");
 #endif

Modified: incubator/ooo/branches/writer001/main/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx (original)
+++ incubator/ooo/branches/writer001/main/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx Mon Aug 20 11:46:19 2012
@@ -67,6 +67,8 @@ OOXMLFastTokenHandler::OOXMLFastTokenHan
 {
     ::rtl::OUString sResult;
 
+#if 0
+    //FIXME this is broken: tokenmap::wordlist is not indexed by Token!
     if ( Token >= 0 || Token < OOXML_FAST_TOKENS_END )
     {
         static ::rtl::OUString aTokens[OOXML_FAST_TOKENS_END];
@@ -75,17 +77,27 @@ OOXMLFastTokenHandler::OOXMLFastTokenHan
             aTokens[Token] = ::rtl::OUString::createFromAscii
                 (tokenmap::wordlist[Token].name);
     }
-        
+#else
+    (void) Token;
+#endif
+
     return sResult;
 }
 
 css::uno::Sequence< ::sal_Int8 > SAL_CALL OOXMLFastTokenHandler::getUTF8Identifier(::sal_Int32 Token) 
     throw (css::uno::RuntimeException)
 {
+#if 0
 	if ( Token < 0  || Token >= OOXML_FAST_TOKENS_END )
+#endif
 		return css::uno::Sequence< ::sal_Int8 >();
 		
+#if 0
+    //FIXME this is broken: tokenmap::wordlist is not indexed by Token!
 	return css::uno::Sequence< ::sal_Int8 >(reinterpret_cast< const sal_Int8 *>(tokenmap::wordlist[Token].name), strlen(tokenmap::wordlist[Token].name));
+#else
+    (void) Token;
+#endif
 }
 
 ::sal_Int32 SAL_CALL OOXMLFastTokenHandler::getTokenFromUTF8

Modified: incubator/ooo/branches/writer001/main/xmloff/source/style/weighhdl.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/writer001/main/xmloff/source/style/weighhdl.cxx?rev=1374979&r1=1374978&r2=1374979&view=diff
==============================================================================
--- incubator/ooo/branches/writer001/main/xmloff/source/style/weighhdl.cxx (original)
+++ incubator/ooo/branches/writer001/main/xmloff/source/style/weighhdl.cxx Mon Aug 20 11:46:19 2012
@@ -103,7 +103,7 @@ sal_Bool XMLFontWeightPropHdl::importXML
 	{
 		bRet = sal_False;
 		static int nCount = sizeof(aFontWeightMap)/sizeof(FontWeightMapper);
-		for( int i=0; i<nCount; i++ )
+        for (int i = 0; i < (nCount-1); ++i)
 		{
 			if( (nWeight >= aFontWeightMap[i].nValue) && (nWeight <= aFontWeightMap[i+1].nValue) )
 			{