[Libreoffice-commits] .: sax/source

2012-02-29 Thread Miklos Vajna
 sax/source/expatwrap/saxwriter.cxx |   48 -
 1 file changed, 48 deletions(-)

New commits:
commit b6164f3f51ae891c9f38eb522f9b248498a5a10c
Author: Miklos Vajna vmik...@suse.cz
Date:   Wed Feb 29 09:17:16 2012 +0100

sax: this CalcXMLLen() was commented out since 2001

diff --git a/sax/source/expatwrap/saxwriter.cxx 
b/sax/source/expatwrap/saxwriter.cxx
index 49c6a83..e80b8bd 100644
--- a/sax/source/expatwrap/saxwriter.cxx
+++ b/sax/source/expatwrap/saxwriter.cxx
@@ -71,54 +71,6 @@ using namespace ::com::sun::star::io;
 */
 
 namespace sax_expatwrap {
-/*
-*
-* Calculates the length of the sequence after conversion, but the conversion 
is not done.
-* .g. ' plus some more are
-* special characters in XML that need to be transformed
-*
-* @param bConvertAll For Attributes it is necessary to convert every symbol 
(including line feed and tab)
-*Set this to true, if you want to perform this special 
conversion
-* @return The returned value is equal to the length of the incoming sequence, 
when no
-+ conversion is necessary, otherwise it is larger than the length of 
the sequence.
-/
-//  inline sal_Int32 CalcXMLLen( const Sequencesal_Int8  seq , sal_Bool 
bConvertAll ) throw()
-//  {
-//  sal_Int32 nLen = 0;
-//  const sal_Int8 *pArray = seq.getConstArray();
-
-//  for( int i = 0 ; i  seq.getLength() ; i ++ ) {
-
-//  sal_Int8 c = pArray[i];
-//  switch( c )
-//  {
-//  case '':   // resemble to amp;
-//  nLen +=5;
-//  break;
-//  case '':   // lt;
-//  case '':   // gt;
-//  nLen +=4;
-//  break;
-//  case 39:// 39 == ''', apos;
-//  case '':   // quot;
-//  case 13:// #x0d;
-//  nLen += 6;
-//  break;
-
-//  case 10:// #x0a;
-//  case 9: // #x09;
-//  if( bConvertAll )
-//  {
-//  nLen += 6;//
-//  }
-//  break;
-//  default:
-//  nLen ++;
-//  }
-//  }
-
-//  return nLen;
-//  }
 
 enum SaxInvalidCharacterError
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/unx

2012-02-29 Thread Stephan Bergmann
 desktop/unx/source/start.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 60f97f3ceb670a310e89cd1be948e04b469539f2
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Feb 29 10:43:21 2012 +0100

Typo bInhibitJavaLdx - bInhibitPagein

diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index 4033c37..be3ac7e 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -858,7 +858,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv )
 }
 
 /* pagein */
-if (!args-bInhibitJavaLdx)
+if (!args-bInhibitPagein)
 exec_pagein (args);
 
 /* javaldx */
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: binfilter/inc

2012-02-29 Thread Caolán McNamara
 binfilter/inc/bf_tools/unqidx.hxx |   61 ++
 1 file changed, 4 insertions(+), 57 deletions(-)

New commits:
commit 5e6d0520fee252dbb5db62536849a547faa639aa
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Feb 29 10:08:44 2012 +

drop unused DECLARE_UNIQUEINDEX

diff --git a/binfilter/inc/bf_tools/unqidx.hxx 
b/binfilter/inc/bf_tools/unqidx.hxx
index 3bcd88a..273f670 100644
--- a/binfilter/inc/bf_tools/unqidx.hxx
+++ b/binfilter/inc/bf_tools/unqidx.hxx
@@ -46,6 +46,10 @@ private:
 sal_uIntPtr   nUniqIndex;
 sal_uIntPtr   nCount;
 
+sal_uIntPtr Insert( sal_uIntPtr nIndex, void* p );
+void*   Get( sal_uIntPtr nIndex ) const;
+void*   Seek( void* p );
+
 public:
 using Container::GetCurObject;
 
@@ -54,10 +58,8 @@ public:
  sal_uIntPtr nReSize = 16 );
 UniqueIndex( const UniqueIndex rIdx );
 
-sal_uIntPtr   Insert( sal_uIntPtr nIndex, void* p );
 sal_uIntPtr   Insert( void* p );
 void*   Remove( sal_uIntPtr nIndex );
-void*   Get( sal_uIntPtr nIndex ) const;
 
 voidClear();
 sal_uIntPtr   Count() const { return nCount; }
@@ -67,7 +69,6 @@ public:
 sal_BoolIsIndexValid( sal_uIntPtr nIndex ) const;
 
 void*   Seek( sal_uIntPtr nIndex );
-void*   Seek( void* p );
 void*   First();
 void*   Last();
 void*   Next();
@@ -91,60 +92,6 @@ inline void UniqueIndex::Clear()
 nUniqIndex = 0;
 }
 
-// ---
-// - DECLARE_UNIQUEINDEX -
-// ---
-
-#define DECLARE_UNIQUEINDEX( ClassName, Type )  \
-class ClassName : private UniqueIndex   \
-{   \
-public: \
-using UniqueIndex::Clear;  
 \
-using UniqueIndex::Count;  
 \
-using UniqueIndex::GetCurIndex; \
-using UniqueIndex::IsIndexValid;   
 \
-using UniqueIndex::GetStartIndex;  
 \
-using UniqueIndex::GetCurMaxIndex;  \
-\
-ClassName( sal_uIntPtr _nStartIndex = 0,  \
-   sal_uIntPtr _nInitSize = 16, sal_uIntPtr _nReSize = 
16 ):\
-UniqueIndex( _nStartIndex, _nInitSize, _nReSize ) {}\
-ClassName( const ClassName rClassName ) :  \
-UniqueIndex( rClassName ) {}\
-\
-sal_uIntPtr   Insert( sal_uIntPtr nIndex, Type p ) 
 \
-{ return UniqueIndex::Insert( nIndex, (void*)p ); } \
-sal_uIntPtr   Insert( Type p )\
-{ return UniqueIndex::Insert( (void*)p ); } \
-TypeRemove( sal_uIntPtr nIndex )  \
-{ return (Type)UniqueIndex::Remove( nIndex ); } \
-TypeGet( sal_uIntPtr nIndex ) const   \
-{ return (Type)UniqueIndex::Get( nIndex ); }\
-\
-TypeGetCurObject() const\
-{ return (Type)UniqueIndex::GetCurObject(); }   \
-sal_uIntPtr   GetIndex( const Type p ) const  \
-{ return UniqueIndex::GetIndex( (const void*)p ); } \
-\
-TypeSeek( sal_uIntPtr nKey )  \
-{ return (Type)UniqueIndex::Seek( nKey ); } \
-TypeSeek( Type p )  \
-{ return (Type)UniqueIndex::Seek( (void*)p ); } \
-TypeFirst()  { return (Type)UniqueIndex::First(); } \
-TypeLast()   { return (Type)UniqueIndex::Last(); }  \
-TypeNext()   { return (Type)UniqueIndex::Next(); }  \
-TypePrev()   { return (Type)UniqueIndex::Prev(); }  \
-\
-ClassName  operator =( const ClassName rClassName )   \
-{ UniqueIndex::operator =( rClassName );\
-  

[Libreoffice-commits] .: 3 commits - Module_tail_build.mk tail_build/prj

2012-02-29 Thread David Tardon
 Module_tail_build.mk |3 +++
 tail_build/prj/build.lst |2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit f7cad8a44be4056d60cd7bd4ed33748592954e8e
Author: David Tardon dtar...@redhat.com
Date:   Wed Feb 29 10:37:31 2012 +0100

move oovbaapi to tail_build

diff --git a/Module_tail_build.mk b/Module_tail_build.mk
index d8faedd..c761620 100644
--- a/Module_tail_build.mk
+++ b/Module_tail_build.mk
@@ -59,6 +59,7 @@ $(eval $(call gb_Module_add_moduledirs,tail_end,\
 MathMLDTD \
 Mesa \
 np_sdk \
+oovbaapi \
 oox \
 package \
 padmin \
diff --git a/tail_build/prj/build.lst b/tail_build/prj/build.lst
index d827820..4fb2472 100644
--- a/tail_build/prj/build.lst
+++ b/tail_build/prj/build.lst
@@ -1,2 +1,2 @@
-tb  tail_build : AFMS:afms APACHE_COMMONS:apache-commons BSH:beanshell 
BERKELEYDB:berkeleydb BOOST:boost CAIRO:cairo CURL:curl FONTCONFIG:fontconfig 
FREETYPE:freetype GRAPHITE:graphite HUNSPELL:hunspell HYPHEN:hyphen ICU:icu 
DESKTOP:l10ntools JPEG:jpeg LIBCDR:libcdr LIBCMIS:libcmis 
LIBEXTTEXTCAT:libexttextcat LIBXML2:libxml2 LIBXMLSEC:libxmlsec LIBXSLT:libxslt 
LIBWPG:libwpg LIBWPS:libwps LIBWPD:libwpd LIBVISIO:libvisio LPSOLVE:lpsolve 
MDDS:mdds MYTHES:mythes NEON:neon NSS:nss OPENSSL:openssl PYTHON:python 
REDLAND:redland SANE:sane SAXON:saxon TRANSLATIONS:translations TWAIN:twain 
VIGRA:vigra X11_EXTENSIONS:x11_extensions XPDF:xpdf ZLIB:zlib basegfx bridges 
comphelper DBCONNECTIVITY:connectivity cppu cppuhelper cpputools i18npool 
i18nutil icc javaunohelper jurt jvmaccess jvmfwk offapi officecfg oovbaapi 
QADEVOOO:qadevOOo DESKTOP:rdbmaker readlicense_oo rhino ridljar rsc sal 
salhelper sax shell solenv soltools sot stoc svl sysui tools ucbhelper udkapi 
unoil unotest unotool
 s ure DESKTOP:xmlhelp xmlreader xsltml NULL
+tb  tail_build : AFMS:afms APACHE_COMMONS:apache-commons BSH:beanshell 
BERKELEYDB:berkeleydb BOOST:boost CAIRO:cairo CURL:curl FONTCONFIG:fontconfig 
FREETYPE:freetype GRAPHITE:graphite HUNSPELL:hunspell HYPHEN:hyphen ICU:icu 
DESKTOP:l10ntools JPEG:jpeg LIBCDR:libcdr LIBCMIS:libcmis 
LIBEXTTEXTCAT:libexttextcat LIBXML2:libxml2 LIBXMLSEC:libxmlsec LIBXSLT:libxslt 
LIBWPG:libwpg LIBWPS:libwps LIBWPD:libwpd LIBVISIO:libvisio LPSOLVE:lpsolve 
MDDS:mdds MYTHES:mythes NEON:neon NSS:nss OPENSSL:openssl PYTHON:python 
REDLAND:redland SANE:sane SAXON:saxon TRANSLATIONS:translations TWAIN:twain 
VIGRA:vigra X11_EXTENSIONS:x11_extensions XPDF:xpdf ZLIB:zlib basegfx bridges 
comphelper DBCONNECTIVITY:connectivity cppu cppuhelper cpputools i18npool 
i18nutil icc javaunohelper jurt jvmaccess jvmfwk offapi officecfg 
QADEVOOO:qadevOOo DESKTOP:rdbmaker readlicense_oo rhino ridljar rsc sal 
salhelper sax shell solenv soltools sot stoc svl sysui tools ucbhelper udkapi 
unoil unotest unotools ure DES
 KTOP:xmlhelp xmlreader xsltml NULL
 tb tail_build\prj nmake - all tb_prj   NULL
commit 7454de8576883c42c053be5cb967f62a4c9c1b75
Author: David Tardon dtar...@redhat.com
Date:   Wed Feb 29 10:23:17 2012 +0100

move apple_remote to tail_build

diff --git a/Module_tail_build.mk b/Module_tail_build.mk
index 50df9e1..d8faedd 100644
--- a/Module_tail_build.mk
+++ b/Module_tail_build.mk
@@ -27,6 +27,7 @@ $(eval $(call gb_Module_Module,tail_end))
 $(eval $(call gb_Module_add_moduledirs,tail_end,\
 accessibility \
 animations \
+apple_remote \
 avmedia \
 basctl \
 basebmp \
diff --git a/tail_build/prj/build.lst b/tail_build/prj/build.lst
index 1c59a80..d827820 100644
--- a/tail_build/prj/build.lst
+++ b/tail_build/prj/build.lst
@@ -1,2 +1,2 @@
-tb  tail_build : AFMS:afms APACHE_COMMONS:apache-commons BSH:beanshell 
BERKELEYDB:berkeleydb BOOST:boost CAIRO:cairo CURL:curl FONTCONFIG:fontconfig 
FREETYPE:freetype GRAPHITE:graphite HUNSPELL:hunspell HYPHEN:hyphen ICU:icu 
DESKTOP:l10ntools JPEG:jpeg LIBCDR:libcdr LIBCMIS:libcmis 
LIBEXTTEXTCAT:libexttextcat LIBXML2:libxml2 LIBXMLSEC:libxmlsec LIBXSLT:libxslt 
LIBWPG:libwpg LIBWPS:libwps LIBWPD:libwpd LIBVISIO:libvisio LPSOLVE:lpsolve 
MDDS:mdds MYTHES:mythes NEON:neon NSS:nss OPENSSL:openssl PYTHON:python 
REDLAND:redland SANE:sane SAXON:saxon TRANSLATIONS:translations TWAIN:twain 
VIGRA:vigra X11_EXTENSIONS:x11_extensions XPDF:xpdf ZLIB:zlib apple_remote 
basegfx bridges comphelper DBCONNECTIVITY:connectivity cppu cppuhelper 
cpputools i18npool i18nutil icc javaunohelper jurt jvmaccess jvmfwk offapi 
officecfg oovbaapi QADEVOOO:qadevOOo DESKTOP:rdbmaker readlicense_oo rhino 
ridljar rsc sal salhelper sax shell solenv soltools sot stoc svl sysui tools 
ucbhelper udkapi unoil un
 otest unotools ure DESKTOP:xmlhelp xmlreader xsltml NULL
+tb  tail_build : AFMS:afms APACHE_COMMONS:apache-commons BSH:beanshell 
BERKELEYDB:berkeleydb BOOST:boost CAIRO:cairo CURL:curl FONTCONFIG:fontconfig 
FREETYPE:freetype GRAPHITE:graphite HUNSPELL:hunspell HYPHEN:hyphen ICU:icu 
DESKTOP:l10ntools JPEG:jpeg LIBCDR:libcdr LIBCMIS:libcmis 
LIBEXTTEXTCAT:libexttextcat 

[Libreoffice-commits] .: desktop/unx

2012-02-29 Thread Stephan Bergmann
 desktop/unx/source/start.c |   39 ---
 1 file changed, 39 deletions(-)

New commits:
commit cf4416a68fb68f36cf9065c6d08d14dd22637b24
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Feb 29 11:46:12 2012 +0100

fdo#46434: No need to turn arguments into absolute file URLs when sending

...as the receiving side already takes care of that (using the cwd that is 
sent first).

diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index be3ac7e..773c9d0 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -450,7 +450,6 @@ send_args( int fd, rtl_uString *pCwdPath )
 sal_Bool bResult;
 size_t nLen;
 rtl_uString *pEscapedCwdPath = escape_path( pCwdPath );
-sal_Bool bDontConvertNext = sal_False;
 sal_uInt32 nArg = 0;
 sal_uInt32 nArgCount = osl_getCommandArgCount();
 
@@ -485,44 +484,6 @@ send_args( int fd, rtl_uString *pCwdPath )
 
 osl_getCommandArg( nArg, pTmp );
 
-// this is not a param, we have to prepend filenames with file://
-// FIXME: improve the check
-if ( ( pTmp-buffer[0] != (sal_Unicode)'-' ) )
-{
-sal_Int32 nFirstColon = rtl_ustr_indexOfChar_WithLength( 
pTmp-buffer, pTmp-length, ':' );
-sal_Int32 nFirstSlash = rtl_ustr_indexOfChar_WithLength( 
pTmp-buffer, pTmp-length, '/' );
-
-// check that pTmp is not an URI yet
-// note .uno .slot  vnd.sun.star.script are special urls 
that
-// don't expect a following '/'
-
- const char* schemes[] = { slot:,  .uno:, 
vnd.sun.star.script: };
- sal_Bool bIsSpecialURL = sal_False;
- int i = 0;
- int len =  SAL_N_ELEMENTS(schemes);
- for ( ; i  len; ++i )
- {
- if ( rtl_ustr_indexOfAscii_WithLength( pTmp-buffer
- , pTmp-length , schemes[ i ], strlen(schemes[ i ] ))  == 
0  )
- {
- bIsSpecialURL = sal_True;
- break;
- }
- }
-
-if ( !bIsSpecialURL  ( nFirstColon  1 || ( nFirstSlash != 
nFirstColon + 1 ) ) )
-{
-// some of the switches (currently just -pt) don't want to
-// have the filenames as URIs
-if ( !bDontConvertNext )
-osl_getAbsoluteFileURL( pCwdPath, pTmp, pTmp );
-}
-}
-
-// don't convert filenames with some of the switches
-// (currently just -pt)
-bDontConvertNext = !rtl_ustr_ascii_compareIgnoreAsciiCase( 
pTmp-buffer, -pt );
-
 pEscapedTmp = escape_path( pTmp );
 
 rtl_uStringbuffer_insert( pBuffer, nCapacity,
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - drawinglayer/inc drawinglayer/source svx/source

2012-02-29 Thread Caolán McNamara
 drawinglayer/inc/drawinglayer/processor3d/baseprocessor3d.hxx |   37 --
 drawinglayer/source/processor3d/baseprocessor3d.cxx   |   18 
 svx/source/svdraw/svdoashp.cxx|2 
 3 files changed, 1 insertion(+), 56 deletions(-)

New commits:
commit 06957447394682b35d5c861f8b81956ccf65508a
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Feb 29 10:58:21 2012 +

WaE: C4805: '!=' : unsafe mix of type 'bool' and type 'const sal_Bool'

diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 2cd4a04..0c51f65 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -1369,7 +1369,7 @@ void 
SdrObjCustomShape::TakeObjInfo(SdrObjTransformInfoRec rInfo) const
 
 // set path and poly conversion if one is possible since
 // this object will first be broken
-const sal_Bool bCanConvToPathOrPoly(aInfo.bCanConvToPath || 
aInfo.bCanConvToPoly);
+const bool bCanConvToPathOrPoly(aInfo.bCanConvToPath || 
aInfo.bCanConvToPoly);
 if(rInfo.bCanConvToPath != bCanConvToPathOrPoly)
 {
 rInfo.bCanConvToPath = bCanConvToPathOrPoly;
commit a5ea9ddaad65853d1e14686ddb096da2e62731e0
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Feb 29 10:33:25 2012 +

CollectingProcessor3D cannot be instantiated

diff --git a/drawinglayer/inc/drawinglayer/processor3d/baseprocessor3d.hxx 
b/drawinglayer/inc/drawinglayer/processor3d/baseprocessor3d.hxx
index 0dce674..16b6022 100644
--- a/drawinglayer/inc/drawinglayer/processor3d/baseprocessor3d.hxx
+++ b/drawinglayer/inc/drawinglayer/processor3d/baseprocessor3d.hxx
@@ -79,43 +79,6 @@ namespace drawinglayer
 
 //
 
-namespace drawinglayer
-{
-namespace processor3d
-{
-/** CollectingProcessor3D class
-
-A processor which just collects all primitives given to it in
-process(..) calls to maPrimitive3DSequence. This can e.g. be used 
to
-hand around as instance over various methods where every called
-method can add graphic content to it.
- */
-class DRAWINGLAYER_DLLPUBLIC CollectingProcessor3D : public 
BaseProcessor3D
-{
-private:
-primitive3d::Primitive3DSequence
maPrimitive3DSequence;
-
-public:
-virtual ~CollectingProcessor3D();
-
-/// the central processing method
-virtual void process(const primitive3d::Primitive3DSequence 
rSource);
-
-/// helpers for adding to local sequence
-void appendPrimitive3DReference(const 
primitive3d::Primitive3DReference rSource)
-{
-
primitive3d::appendPrimitive3DReferenceToPrimitive3DSequence(maPrimitive3DSequence,
 rSource);
-}
-
-/// data access and reset
-const primitive3d::Primitive3DSequence getPrimitive3DSequence() 
const { return maPrimitive3DSequence; }
-void reset() { maPrimitive3DSequence = 
primitive3d::Primitive3DSequence(); }
-};
-} // end of namespace processor3d
-} // end of namespace drawinglayer
-
-//
-
 #endif //_DRAWINGLAYER_PROCESSOR3D_BASEPROCESSOR3D_HXX
 
 // eof
diff --git a/drawinglayer/source/processor3d/baseprocessor3d.cxx 
b/drawinglayer/source/processor3d/baseprocessor3d.cxx
index 9abef4a..9e1f16b 100644
--- a/drawinglayer/source/processor3d/baseprocessor3d.cxx
+++ b/drawinglayer/source/processor3d/baseprocessor3d.cxx
@@ -85,24 +85,6 @@ namespace drawinglayer
 } // end of namespace drawinglayer
 
 //
-
-namespace drawinglayer
-{
-namespace processor3d
-{
-CollectingProcessor3D::~CollectingProcessor3D()
-{
-}
-
-void CollectingProcessor3D::process(const 
primitive3d::Primitive3DSequence rSource)
-{
-// accept everything
-
primitive3d::appendPrimitive3DSequenceToPrimitive3DSequence(maPrimitive3DSequence,
 rSource);
-}
-} // end of namespace processor3d
-} // end of namespace drawinglayer
-
-//
 // eof
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/scripts

2012-02-29 Thread Caolán McNamara
 desktop/scripts/soffice.sh |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 3f9f18c53d9876106b274769dec9d0e3916feb8f
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Feb 29 11:10:31 2012 +

Resolves: rhbz#788045 swriter --help etc doesn't show help

because the test in soffice to skip oosplash is for only
one argument, and swriter points to soffice with an additional
--writer argument, so the test is skipped

diff --git a/desktop/scripts/soffice.sh b/desktop/scripts/soffice.sh
index 4d14051..2d42613 100755
--- a/desktop/scripts/soffice.sh
+++ b/desktop/scripts/soffice.sh
@@ -158,8 +158,8 @@ if [ -n $VALGRINDCHECK -a -z $VALGRIND ] ; then
 fi
 
 # do not pass the request for command line help to oosplash
-if test $# -eq 1; then
-case $1 in
+for arg in $@ ; do
+case $arg in
 -h | --h | --he | --hel | --help)
 $sd_prog/soffice.bin --help
 exit 0
@@ -171,7 +171,7 @@ if test $# -eq 1; then
 *)
 ;;
 esac
-fi
+done
 
 # oosplash does the rest: forcing pages in, javaldx etc. are
 exec $VALGRINDCHECK $STRACECHECK $sd_prog/oosplash $@
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: writerfilter/source

2012-02-29 Thread Miklos Vajna
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 00859026749e005759ce4e7115b746b064cd902b
Author: Miklos Vajna vmik...@suse.cz
Date:   Wed Feb 29 12:06:32 2012 +0100

fdo#46662 fix RTF import of numbering levelnumbers

To handle stateful encodings, we process hex characters in one go for a
run. Levelnumbers of numberings should be an exception, since there the
special characters (here: 0x7, which is table cell end) have no special
meaning.

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index f388ec8..7342010 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -760,7 +760,7 @@ int RTFDocumentImpl::resolveChars(char ch)
 if (m_aStates.top().nInternalState != INTERNAL_HEX  !Strm().IsEof())
 Strm().SeekRel(-1);
 
-if (m_aStates.top().nInternalState == INTERNAL_HEX)
+if (m_aStates.top().nInternalState == INTERNAL_HEX  
m_aStates.top().nDestinationState != DESTINATION_LEVELNUMBERS)
 {
 if (!bSkipped)
 m_aHexBuffer.append(ch);
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: apple_remote/Library_AppleRemote.mk

2012-02-29 Thread David Tardon
 apple_remote/Library_AppleRemote.mk |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 1744010821be1ebcbfdf0f67ef3eda98d9f3e7b0
Author: David Tardon dtar...@redhat.com
Date:   Wed Feb 29 12:26:35 2012 +0100

add missing dep on headers' package

diff --git a/apple_remote/Library_AppleRemote.mk 
b/apple_remote/Library_AppleRemote.mk
index 308725c..b5acc01 100644
--- a/apple_remote/Library_AppleRemote.mk
+++ b/apple_remote/Library_AppleRemote.mk
@@ -29,9 +29,8 @@
 
 $(eval $(call gb_Library_Library,AppleRemote))
 
-$(eval $(call gb_Library_set_include,AppleRemote,\
--I$(SRCDIR)/apple_remote/inc \
-$$(INCLUDE) \
+$(eval $(call gb_Library_add_package_headers,AppleRemote,\
+apple_remote_inc \
 ))
 
 $(eval $(call gb_Library_use_externals,AppleRemote,\
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: autogen.sh

2012-02-29 Thread Michael Meeks
 autogen.sh |4 
 1 file changed, 4 insertions(+)

New commits:
commit 39d026a11fc67bc45fc974fe8eab04ef9499fa31
Author: Thomas Collerton tom.col...@gmail.com
Date:   Wed Feb 29 11:50:02 2012 +0100

fdo#46565: perl / autogen.sh should backup autogen.lastrun

diff --git a/autogen.sh b/autogen.sh
index d41ccdd..2133d07 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -144,6 +144,10 @@ if (defined $ENV{NOCONFIGURE}) {
 # Save autogen.lastrun only if we did get some arguments on the 
command-line
 if (@ARGV) {
 if (scalar(@cmdline_args)  0) {
+# if there's already an autogen.lastrun, make a backup first
+if (-e autogen.lastrun) {
+system(cp autogen.lastrun autogen.lastrun.bak);
+}
 # print writing args to autogen.lastrun\n;
 my $fh;
 open ($fh, autogen.lastrun) || die can't open autogen.lastrun: 
$!;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/aqua vcl/Module_vcl.mk vcl/Package_osx.mk vcl/Zip_osxres.mk

2012-02-29 Thread David Tardon
 vcl/Module_vcl.mk  |2 -
 vcl/Package_osx.mk |   38 ---
 vcl/Zip_osxres.mk  |  106 +
 3 files changed, 107 insertions(+), 39 deletions(-)

New commits:
commit b5af1c35284560deaa862c2d87847b2088afcae0
Author: David Tardon dtar...@redhat.com
Date:   Wed Feb 29 12:34:33 2012 +0100

can use Zip for this

diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk
index f9b86ed..7ec9395 100644
--- a/vcl/Module_vcl.mk
+++ b/vcl/Module_vcl.mk
@@ -75,7 +75,7 @@ endif
 
 ifeq ($(GUIBASE),aqua)
 $(eval $(call gb_Module_add_targets,vcl,\
-Package_osx \
+Zip_osxres \
 ))
 endif
 
diff --git a/vcl/Package_osx.mk b/vcl/Package_osx.mk
deleted file mode 100644
index 17df37a..000
--- a/vcl/Package_osx.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#*
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# http://www.openoffice.org/license.html
-# for a copy of the LGPLv3 License.
-#
-#*
-
-### FIXME: when we have a real ZipTarget mechanism in gbuild replace this mess
-$(eval $(call gb_Package_Package,vcl_zip,))
-$(eval $(call 
gb_Package_add_file,vcl_zip,bin/osxres.zip,$(WORKDIR)/Misc/osxres.zip))
-
-/$(WORKDIR)/Misc/osxres.zip: $(SRCDIR)/vcl/aqua/source/res/MainMenu.nib/*.nib 
$(SRCDIR)/vcl/aqua/source/res/cursors/*.png
-   cd $(SRCDIR)/vcl/aqua/source/res ; \
-   mkdir -p $(dir $@) ; \
-   zip $@ MainMenu.nib/*.nib cursors/*.png
-
-# vim: set noet sw=4 ts=4:
diff --git a/vcl/Zip_osxres.mk b/vcl/Zip_osxres.mk
new file mode 100644
index 000..212b802
--- /dev/null
+++ b/vcl/Zip_osxres.mk
@@ -0,0 +1,106 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the License); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an AS IS basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# Major Contributor(s):
+# Copyright (C) 2012 Red Hat, Inc., David Tardon dtar...@redhat.com
+#  (initial developer)
+#
+# All Rights Reserved.
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the GPLv3+), or
+# the GNU Lesser General Public License Version 3 or later (the LGPLv3+),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+
+$(eval $(call gb_Zip_Zip,osxres,$(SRCDIR)/vcl/aqua/source/res))
+
+$(eval $(call gb_Zip_add_files,osxres,\
+MainMenu.nib/classes.nib \
+MainMenu.nib/info.nib \
+MainMenu.nib/keyedobjects.nib \
+cursors/airbrush.png \
+cursors/ase.png \
+cursors/asn.png \
+cursors/asne.png \
+cursors/asns.png \
+cursors/asnswe.png \
+cursors/asnw.png \
+cursors/ass.png \
+cursors/asse.png \
+cursors/assw.png \
+cursors/asw.png \
+cursors/aswe.png \
+cursors/chain.png \
+cursors/chainnot.png \
+cursors/chart.png \
+cursors/copydata.png \
+cursors/copydlnk.png \
+cursors/copyf.png \
+cursors/copyf2.png \
+cursors/copyflnk.png \
+cursors/crook.png \
+cursors/crop.png \
+cursors/darc.png \
+cursors/dbezier.png \
+cursors/dcapt.png \
+cursors/dcirccut.png \
+cursors/dconnect.png \
+cursors/dellipse.png \
+cursors/detectiv.png \
+cursors/dfree.png \
+cursors/dline.png \
+cursors/dpie.png \
+cursors/dpolygon.png \
+cursors/drect.png \
+cursors/dtext.png \
+cursors/fill.png \
+cursors/help.png \
+cursors/hourglass.png \

[Libreoffice-commits] .: 2 commits - sot/qa sot/source

2012-02-29 Thread Caolán McNamara
 sot/qa/cppunit/data/pass/fdo41642-3.compound |binary
 sot/source/sdstor/stgdir.cxx |   19 +++
 2 files changed, 15 insertions(+), 4 deletions(-)

New commits:
commit 565b179db949457ce2e4bade2cb33519df63
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Feb 29 13:04:49 2012 +

refactor upper chain test a tiny bit

diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx
index e34e2d5..7a69118 100644
--- a/sot/source/sdstor/stgdir.cxx
+++ b/sot/source/sdstor/stgdir.cxx
@@ -818,15 +818,15 @@ void StgDirStrm::SetupEntry( sal_Int32 n, StgDirEntry* 
pUpper )
 if( nLeaf != 0  nLeft != 0  nRight != 0 )
 {
 //fdo#41642 Do we need to check full chain upwards for loops ?
-if (pUpper  pUpper-aEntry.GetLeaf(STG_CHILD) == nLeaf)
-{
-OSL_FAIL(Leaf node of upper StgDirEntry is same as current 
StgDirEntry's leaf node. Circular entry chain, discarding link);
-delete pCur;
-return;
-}
-
 if (pUpper)
 {
+if (pUpper-aEntry.GetLeaf(STG_CHILD) == nLeaf)
+{
+OSL_FAIL(Leaf node of upper StgDirEntry is same as 
current StgDirEntry's leaf node. Circular entry chain, discarding link);
+delete pCur;
+return;
+}
+
 StgDirEntry *pUpperUpper = pUpper-pUp;
 if (pUpperUpper  pUpperUpper-aEntry.GetLeaf(STG_CHILD) == 
nLeaf)
 {
@@ -834,7 +834,7 @@ void StgDirStrm::SetupEntry( sal_Int32 n, StgDirEntry* 
pUpper )
 delete pCur;
 return;
 }
- }
+}
 
 if( StgAvlNode::Insert
 ( (StgAvlNode**) ( pUpper ? pUpper-pDown : pRoot ), pCur ) )
commit 0a9ced485fb712ce0d03fb20be1df6067606e11c
Author: Wei Ming Khoo wm...@cam.ac.uk
Date:   Wed Feb 29 13:01:35 2012 +

fix storage chain loop

diff --git a/sot/qa/cppunit/data/pass/fdo41642-3.compound 
b/sot/qa/cppunit/data/pass/fdo41642-3.compound
new file mode 100644
index 000..46a9e84
Binary files /dev/null and b/sot/qa/cppunit/data/pass/fdo41642-3.compound differ
diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx
index 7bdade9..e34e2d5 100644
--- a/sot/source/sdstor/stgdir.cxx
+++ b/sot/source/sdstor/stgdir.cxx
@@ -825,6 +825,17 @@ void StgDirStrm::SetupEntry( sal_Int32 n, StgDirEntry* 
pUpper )
 return;
 }
 
+if (pUpper)
+{
+StgDirEntry *pUpperUpper = pUpper-pUp;
+if (pUpperUpper  pUpperUpper-aEntry.GetLeaf(STG_CHILD) == 
nLeaf)
+{
+OSL_FAIL(Leaf node of upper-upper StgDirEntry is same as 
current StgDirEntry's leaf node. Circular entry chain, discarding link);
+delete pCur;
+return;
+}
+ }
+
 if( StgAvlNode::Insert
 ( (StgAvlNode**) ( pUpper ? pUpper-pDown : pRoot ), pCur ) )
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - sax/qa sax/source

2012-02-29 Thread Michael Stahl
 sax/qa/cppunit/test_converter.cxx |6 ++
 sax/source/tools/converter.cxx|2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit f3e65a72f8c37ee3795ed83b93f7483d45d5b403
Author: Michael Stahl mst...@redhat.com
Date:   Wed Feb 29 14:08:17 2012 +0100

sax: ConverterTest: add leap year tests

(cherry picked from commit 0d9757e43217929fa172c1feecd161873cd7019b)

Signed-off-by: Eike Rathke er...@redhat.com

diff --git a/sax/qa/cppunit/test_converter.cxx 
b/sax/qa/cppunit/test_converter.cxx
index 64bbf29..4a3d364 100644
--- a/sax/qa/cppunit/test_converter.cxx
+++ b/sax/qa/cppunit/test_converter.cxx
@@ -212,6 +212,10 @@ void ConverterTest::testDateTime()
 doTest( util::DateTime(99, 59, 59, 23, 31, 12, ),
 -12-31T23:59:59.9Z,
 -12-31T23:59:59.99 );
+doTest( util::DateTime(0, 0, 0, 0, 29, 2, 2000), // leap year
+2000-02-29T00:00:00-00:00, 2000-02-29T00:00:00 );
+doTest( util::DateTime(0, 0, 0, 0, 29, 2, 1600), // leap year
+1600-02-29T00:00:00-00:00, 1600-02-29T00:00:00 );
 doTest( util::DateTime(0, 0, 0, 24, 1, 1, 333)
 /*(0, 0, 0, 0, 2, 1, 333)*/,
 0333-01-01T24:00:00/*, 0333-01-02T00:00:00*/ );
@@ -240,6 +244,8 @@ void ConverterTest::testDateTime()
 doTestDateTimeF( 0001-01-02T00:00:00+14:01 ); // invalid: TZ  +14:00
 doTestDateTimeF( 0001-01-02T00:00:00-15:00 ); // invalid: TZ  -14:00
 doTestDateTimeF( 0001-01-02T00:00:00-14:01 ); // invalid: TZ  -14:00
+doTestDateTimeF( 2100-02-29T00:00:00-00:00 ); // invalid: no leap year
+doTestDateTimeF( 1900-02-29T00:00:00-00:00 ); // invalid: no leap year
 OSL_TRACE(\nSAX CONVERTER TEST END);
 }
 
commit a2d96b51f3272ecbdc0f4f9d4b2ee65409892554
Author: Kohei Yoshida kohei.yosh...@suse.com
Date:   Tue Feb 28 22:01:52 2012 -0500

Correctly calculate leap year.

With the old code, year 2000 would not be a leap year, but it actually
is.  With this, Calc correctly loads cell with date value of 2000-2-29.

(regression from CWS sw33bf02 8786083eb9dabb0d7b328a217ba99a1d71493ad7)

Signed-off-by: Stephan Bergmann sberg...@redhat.com
Signed-off-by: Eike Rathke er...@redhat.com
Signed-off-by: Michael Stahl mst...@redhat.com
(cherry picked from commit 3c993bd0c3120445f27cb37e6ecfd8b45c6605e0)

diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index f2dea8a..eb22e0f 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -1320,7 +1320,7 @@ readDateTimeComponent(const ::rtl::OUString  rString,
 static bool lcl_isLeapYear(const sal_uInt32 nYear)
 {
 return ((nYear % 4) == 0)
- !(((nYear % 100) == 0) || ((nYear % 400) == 0));
+ (((nYear % 100) != 0) || ((nYear % 400) == 0));
 }
 
 static sal_uInt16
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5-1' - 2 commits - sax/qa sax/source

2012-02-29 Thread Michael Stahl
 sax/qa/cppunit/test_converter.cxx |6 ++
 sax/source/tools/converter.cxx|2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 9a0d2a6d2f8972bdc62795f81529fc1354158fd5
Author: Michael Stahl mst...@redhat.com
Date:   Wed Feb 29 14:08:17 2012 +0100

sax: ConverterTest: add leap year tests

(cherry picked from commit 0d9757e43217929fa172c1feecd161873cd7019b)

Signed-off-by: Eike Rathke er...@redhat.com

diff --git a/sax/qa/cppunit/test_converter.cxx 
b/sax/qa/cppunit/test_converter.cxx
index 64bbf29..4a3d364 100644
--- a/sax/qa/cppunit/test_converter.cxx
+++ b/sax/qa/cppunit/test_converter.cxx
@@ -212,6 +212,10 @@ void ConverterTest::testDateTime()
 doTest( util::DateTime(99, 59, 59, 23, 31, 12, ),
 -12-31T23:59:59.9Z,
 -12-31T23:59:59.99 );
+doTest( util::DateTime(0, 0, 0, 0, 29, 2, 2000), // leap year
+2000-02-29T00:00:00-00:00, 2000-02-29T00:00:00 );
+doTest( util::DateTime(0, 0, 0, 0, 29, 2, 1600), // leap year
+1600-02-29T00:00:00-00:00, 1600-02-29T00:00:00 );
 doTest( util::DateTime(0, 0, 0, 24, 1, 1, 333)
 /*(0, 0, 0, 0, 2, 1, 333)*/,
 0333-01-01T24:00:00/*, 0333-01-02T00:00:00*/ );
@@ -240,6 +244,8 @@ void ConverterTest::testDateTime()
 doTestDateTimeF( 0001-01-02T00:00:00+14:01 ); // invalid: TZ  +14:00
 doTestDateTimeF( 0001-01-02T00:00:00-15:00 ); // invalid: TZ  -14:00
 doTestDateTimeF( 0001-01-02T00:00:00-14:01 ); // invalid: TZ  -14:00
+doTestDateTimeF( 2100-02-29T00:00:00-00:00 ); // invalid: no leap year
+doTestDateTimeF( 1900-02-29T00:00:00-00:00 ); // invalid: no leap year
 OSL_TRACE(\nSAX CONVERTER TEST END);
 }
 
commit b1f7724610f9b7db10e86f544d0fa01b94efb531
Author: Kohei Yoshida kohei.yosh...@suse.com
Date:   Tue Feb 28 22:01:52 2012 -0500

Correctly calculate leap year.

With the old code, year 2000 would not be a leap year, but it actually
is.  With this, Calc correctly loads cell with date value of 2000-2-29.

(regression from CWS sw33bf02 8786083eb9dabb0d7b328a217ba99a1d71493ad7)

Signed-off-by: Stephan Bergmann sberg...@redhat.com
Signed-off-by: Eike Rathke er...@redhat.com
Signed-off-by: Michael Stahl mst...@redhat.com
(cherry picked from commit 3c993bd0c3120445f27cb37e6ecfd8b45c6605e0)

diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index f2dea8a..eb22e0f 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -1320,7 +1320,7 @@ readDateTimeComponent(const ::rtl::OUString  rString,
 static bool lcl_isLeapYear(const sal_uInt32 nYear)
 {
 return ((nYear % 4) == 0)
- !(((nYear % 100) == 0) || ((nYear % 400) == 0));
+ (((nYear % 100) != 0) || ((nYear % 400) == 0));
 }
 
 static sal_uInt16
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-4' - 2 commits - sax/qa sax/source

2012-02-29 Thread Michael Stahl
 sax/qa/cppunit/test_converter.cxx |6 ++
 sax/source/tools/converter.cxx|2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit eebc3e941131ffb09439f69313e697e0ed660135
Author: Michael Stahl mst...@redhat.com
Date:   Wed Feb 29 14:08:17 2012 +0100

sax: ConverterTest: add leap year tests

(cherry picked from commit 0d9757e43217929fa172c1feecd161873cd7019b)

Signed-off-by: Eike Rathke er...@redhat.com

diff --git a/sax/qa/cppunit/test_converter.cxx 
b/sax/qa/cppunit/test_converter.cxx
index dcd5bb7..4e3a56f 100644
--- a/sax/qa/cppunit/test_converter.cxx
+++ b/sax/qa/cppunit/test_converter.cxx
@@ -212,6 +212,10 @@ void ConverterTest::testDateTime()
 doTest( util::DateTime(0, 0, 0, 24, 1, 1, 333)
 /*(0, 0, 0, 0, 2, 1, 333)*/,
 0333-01-01T24:00:00/*, 0333-01-02T00:00:00*/ );
+doTest( util::DateTime(0, 0, 0, 0, 29, 2, 2000), // leap year
+2000-02-29T00:00:00-00:00, 2000-02-29T00:00:00 );
+doTest( util::DateTime(0, 0, 0, 0, 29, 2, 1600), // leap year
+1600-02-29T00:00:00-00:00, 1600-02-29T00:00:00 );
 doTestDateTimeF( +0001-01-01T00:00:00 ); // invalid: ^+
 doTestDateTimeF( 1-01-01T00:00:00 ); // invalid:  4 Y
 doTestDateTimeF( 0001-1-01T00:00:00 ); // invalid:  2 M
@@ -234,6 +238,8 @@ void ConverterTest::testDateTime()
 doTestDateTimeF( 0001-01-02T00:00:00+14:01 ); // invalid: TZ  +14:00
 doTestDateTimeF( 0001-01-02T00:00:00-15:00 ); // invalid: TZ  -14:00
 doTestDateTimeF( 0001-01-02T00:00:00-14:01 ); // invalid: TZ  -14:00
+doTestDateTimeF( 2100-02-29T00:00:00-00:00 ); // invalid: no leap year
+doTestDateTimeF( 1900-02-29T00:00:00-00:00 ); // invalid: no leap year
 OSL_TRACE(\nSAX CONVERTER TEST END\n);
 }
 
commit ff47b3717ca8bc561917c8ad5cd8bb5749638270
Author: Kohei Yoshida kohei.yosh...@suse.com
Date:   Tue Feb 28 22:01:52 2012 -0500

Correctly calculate leap year.

With the old code, year 2000 would not be a leap year, but it actually
is.  With this, Calc correctly loads cell with date value of 2000-2-29.

(regression from CWS sw33bf02 8786083eb9dabb0d7b328a217ba99a1d71493ad7)

Signed-off-by: Stephan Bergmann sberg...@redhat.com
Signed-off-by: Eike Rathke er...@redhat.com
Signed-off-by: Michael Stahl mst...@redhat.com
(cherry picked from commit 3c993bd0c3120445f27cb37e6ecfd8b45c6605e0)

diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index 74d056c..0414297 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -1154,7 +1154,7 @@ readDateTimeComponent(const ::rtl::OUString  rString,
 static bool lcl_isLeapYear(const sal_uInt32 nYear)
 {
 return ((nYear % 4) == 0)
- !(((nYear % 100) == 0) || ((nYear % 400) == 0));
+ (((nYear % 100) != 0) || ((nYear % 400) == 0));
 }
 
 static sal_uInt16
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sc/source

2012-02-29 Thread Caolán McNamara
 sc/source/ui/view/gridwin4.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2f1ee06df6117d94738df87f9f3cdb159c9389fe
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Feb 29 13:11:11 2012 +

WaE: C4805: '!=' : unsafe mix of type 'bool' and type 'const sal_Bool'

diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index c7b258f..ff3e67b 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1382,7 +1382,7 @@ void ScGridWindow::GetSelectionRects( ::std::vector 
Rectangle  rPixelRects )
 PutInOrder( nY1, nY2 );
 
 sal_Bool bTestMerge = sal_True;
-sal_Bool bRepeat = sal_True;
+bool bRepeat = true;
 
 SCCOL nTestX2 = nX2;
 SCROW nTestY2 = nY2;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: dictionaries/prj

2012-02-29 Thread Caolán McNamara
 dictionaries/prj/tests.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c655d098660b0f843982a800b8cc0e697531b134
Author: Petr Vorel petr.vo...@gmail.com
Date:   Fri Feb 24 17:11:40 2012 +0100

Explicitly set PERL_UNICODE environment variable

This prevents fail building when PERL_UNICODE contain i or D

diff --git a/dictionaries/prj/tests.mk b/dictionaries/prj/tests.mk
index 0eb6008..7048dd6 100644
--- a/dictionaries/prj/tests.mk
+++ b/dictionaries/prj/tests.mk
@@ -25,4 +25,4 @@
 ALLTAR : test1
 test1 .PHONY :
@echo Validating thesaurus file
-   $(COMMAND_ECHO) ..$/util$/th_check.pl *.dat
+   $(COMMAND_ECHO) PERL_UNICODE=0 ..$/util$/th_check.pl *.dat
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: desktop/unx

2012-02-29 Thread Stephan Bergmann
 desktop/unx/source/start.c |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 8bbf048085066b8e95256e7d59d7ddd89465d4e7
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Feb 29 15:08:20 2012 +0100

fdo#46434: Always send command line arguments as UTF-8

diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index 773c9d0..f2c6e58 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -496,7 +496,15 @@ send_args( int fd, rtl_uString *pCwdPath )
 
 ustr_debug( Pass args, pBuffer );
 
-pOut = ustr_to_str( pBuffer );
+if ( !rtl_convertUStringToString(
+ pOut, rtl_uString_getStr( pBuffer ),
+ rtl_uString_getLength( pBuffer ), RTL_TEXTENCODING_UTF8,
+ ( RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR
+   | RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR ) ) )
+{
+fprintf( stderr, ERROR: cannot convert arguments to UTF-8 );
+exit( 1 );
+}
 
 nLen = rtl_string_getLength( pOut ) + 1;
 bResult = ( write( fd, rtl_string_getStr( pOut ), nLen ) == (ssize_t) nLen 
);
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sot/qa sot/source

2012-02-29 Thread Michael Meeks
 sot/qa/cppunit/data/pass/fdo41642-3.compound |binary
 sot/source/sdstor/stgdir.cxx |   11 +++
 2 files changed, 11 insertions(+)

New commits:
commit c2ad33a233d7458909fc18a23c02bd2c6e298940
Author: Wei Ming Khoo wm...@cam.ac.uk
Date:   Wed Feb 29 13:01:35 2012 +

fix storage chain loop

Signed-off-by: Caolan McNamara caol...@redhat.com
Signed-off-by: Michael Meeks michael.me...@suse.com

diff --git a/sot/qa/cppunit/data/pass/fdo41642-3.compound 
b/sot/qa/cppunit/data/pass/fdo41642-3.compound
new file mode 100644
index 000..46a9e84
Binary files /dev/null and b/sot/qa/cppunit/data/pass/fdo41642-3.compound differ
diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx
index 4f9ef46..ccc7b17 100644
--- a/sot/source/sdstor/stgdir.cxx
+++ b/sot/source/sdstor/stgdir.cxx
@@ -826,6 +826,17 @@ void StgDirStrm::SetupEntry( sal_Int32 n, StgDirEntry* 
pUpper )
 return;
 }
 
+if (pUpper)
+{
+StgDirEntry *pUpperUpper = pUpper-pUp;
+if (pUpperUpper  pUpperUpper-aEntry.GetLeaf(STG_CHILD) == 
nLeaf)
+{
+OSL_FAIL(Leaf node of upper-upper StgDirEntry is same as 
current StgDirEntry's leaf node. Circular entry chain, discarding link);
+delete pCur;
+return;
+}
+ }
+
 if( StgAvlNode::Insert
 ( (StgAvlNode**) ( pUpper ? pUpper-pDown : pRoot ), pCur ) )
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: officecfg/registry scp2/source setup_native/source solenv/inc

2012-02-29 Thread Andras Timar
 officecfg/registry/data/org/openoffice/VCL.xcu |   23 +++
 scp2/source/ooo/module_langpack.ulf|6 ++
 setup_native/source/win32/msi-encodinglist.txt |1 +
 solenv/inc/langlist.mk |1 +
 4 files changed, 31 insertions(+)

New commits:
commit bd2b353f66e4bb2e76c115eb8028c1d0ba59a468
Author: Andras Timar ati...@suse.com
Date:   Wed Feb 29 15:58:04 2012 +0100

add Amharic (am) UI translation

diff --git a/officecfg/registry/data/org/openoffice/VCL.xcu 
b/officecfg/registry/data/org/openoffice/VCL.xcu
index 265b4ec..e01d207 100644
--- a/officecfg/registry/data/org/openoffice/VCL.xcu
+++ b/officecfg/registry/data/org/openoffice/VCL.xcu
@@ -136,6 +136,29 @@
   /prop
 /node
 
+node oor:name=am oor:op=replace
+ prop oor:name=UI_SANS oor:op=replace oor:type=xs:string
+valueNyala;Abyssinica SIL/value
+ /prop
+  prop oor:name=SANS_UNICODE oor:type=xs:string oor:op=replace
+valueNyala;Abyssinica SIL/value
+  /prop
+ prop oor:name=CTL_DISPLAY oor:type=xs:string oor:op=replace
+valueNyala;Abyssinica SIL/value
+ /prop
+ prop oor:name=CTL_HEADING oor:type=xs:string oor:op=replace
+valueNyala;Abyssinica SIL/value
+ /prop
+ prop oor:name=CTL_PRESENTATION oor:type=xs:string oor:op=replace
+valueNyala;Abyssinica SIL/value
+ /prop
+ prop oor:name=CTL_SPREADSHEET oor:type=xs:string oor:op=replace
+valueNyala;Abyssinica SIL/value
+ /prop
+ prop oor:name=CTL_TEXT oor:type=xs:string oor:op=replace
+valueNyala;Abyssinica SIL/value
+ /prop
+/node
 node oor:name=ar oor:op=replace
  prop oor:name=UI_SANS oor:op=replace oor:type=xs:string
 valueTahoma;Traditional Arabic;Simplified Arabic;Lucidasans;Lucida 
Sans;Supplement;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface 
User;Geneva;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans 
L;Helvetica;Helmet;Interface System;Sans Serif/value
diff --git a/scp2/source/ooo/module_langpack.ulf 
b/scp2/source/ooo/module_langpack.ulf
index 4fd7314..086033f 100644
--- a/scp2/source/ooo/module_langpack.ulf
+++ b/scp2/source/ooo/module_langpack.ulf
@@ -673,6 +673,12 @@ en-US = Luxembourgish
 [STR_DESC_MODULE_LANGPACK_LB]
 en-US = Installs the Luxembourgish user interface
 
+[STR_NAME_MODULE_LANGPACK_AM]
+en-US = Amharic
+
+[STR_DESC_MODULE_LANGPACK_AM]
+en-US = Installs the Amharic user interface
+
 [STR_NAME_MODULE_LANGPACK_QTZ]
 en-US = KeyID
 
diff --git a/setup_native/source/win32/msi-encodinglist.txt 
b/setup_native/source/win32/msi-encodinglist.txt
index 936adb4..1fd3cb9 100644
--- a/setup_native/source/win32/msi-encodinglist.txt
+++ b/setup_native/source/win32/msi-encodinglist.txt
@@ -1,6 +1,7 @@
 # Syntax: language ANSI-Codepage LCID
 # comment lines begin with hash
 af1252  1078   # Afrikaans
+am   0  1118   # Amharic
 ar1256  1025
 ar-SA 1256  1025
 as   0  1101   # Assamese
diff --git a/solenv/inc/langlist.mk b/solenv/inc/langlist.mk
index 42c1172..d61eef7 100644
--- a/solenv/inc/langlist.mk
+++ b/solenv/inc/langlist.mk
@@ -27,6 +27,7 @@
 
 # Complete list of all supported localizations (ISO codes)
 completelangiso=af \
+am \
 ar \
 as \
 ast \
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: solenv/inc

2012-02-29 Thread Andras Timar
 solenv/inc/langlist.mk |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 3cc7cbeb0efab138696bb9901b33648025e29a45
Author: Andras Timar ati...@suse.com
Date:   Wed Feb 29 16:47:35 2012 +0100

remove ky-CN, apparently they did not start translation

diff --git a/solenv/inc/langlist.mk b/solenv/inc/langlist.mk
index d61eef7..67515a8 100644
--- a/solenv/inc/langlist.mk
+++ b/solenv/inc/langlist.mk
@@ -77,7 +77,6 @@ ko \
 kok \
 ks \
 ku \
-ky-CN \
 lb \
 lo \
 lt \
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/source

2012-02-29 Thread Caolán McNamara
 vcl/source/gdi/outdev3.cxx |   30 +-
 1 file changed, 25 insertions(+), 5 deletions(-)

New commits:
commit 8c9823d311fdf8092cc75873e4565325d204a658
Author: Caolán McNamara caol...@redhat.com
Date:   Wed Feb 29 17:05:11 2012 +

we use mpFontData-IsSymbolFont() in our comparison to detect symbol fonts

If we change that between cache lookup and insert we run the risk of
invalidating the results of our lookup.

This should fix some hard to replicate reference count nasties

diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index 4c0123f..d9367c0 100755
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -2385,18 +2385,38 @@ ImplFontEntry* ImplFontCache::GetFontEntry( 
ImplDevFontList* pFontList,
 }
 }
 
+ImplFontData* pFontData = NULL;
+
+if (!pEntry  pFontFamily)// no cache hit = find the best matching 
physical font face
+{
+bool bOrigWasSymbol = aFontSelData.mpFontData  
aFontSelData.mpFontData-IsSymbolFont();
+pFontData = pFontFamily-FindBestFontFace( aFontSelData );
+aFontSelData.mpFontData = pFontData;
+bool bNewIsSymbol = aFontSelData.mpFontData  
aFontSelData.mpFontData-IsSymbolFont();
+
+if (bNewIsSymbol || bOrigWasSymbol)
+{
+// it is possible, though generally unlikely, that at this point we
+// will attempt to use a symbol font as a last-ditch fallback for a
+// non-symbol font request or vice versa, and by changing
+// aFontSelData.mpFontData to/from a symbol font we may now find
+// something in the cache that can be reused which previously
+// wasn't a candidate
+FontInstanceList::iterator it = maFontInstanceList.find( 
aFontSelData );
+if( it != maFontInstanceList.end() )
+pEntry = (*it).second;
+}
+}
+
 if( pEntry ) // cache hit = use existing font instance
 {
 // increase the font instance's reference count
 if( !pEntry-mnRefCount++ )
 --mnRef0Count;
 }
-else if (pFontFamily)// no cache hit = create a new font instance
-{
-// find the best matching physical font face
-ImplFontData* pFontData = pFontFamily-FindBestFontFace( aFontSelData 
);
-aFontSelData.mpFontData = pFontData;
 
+if (!pEntry  pFontData)// still no cache hit = create a new font 
instance
+{
 // create a new logical font instance from this physical font face
 pEntry = pFontData-CreateFontInstance( aFontSelData );
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: berkeleydb/makefile.mk cairo/cairo cairo/pixman cppunit/makefile.mk curl/makefile.mk epm/makefile.mk gdk-pixbuf/makefile.mk gettext/makefile.mk glib/makefile.mk hunspell/makef

2012-02-29 Thread Stephan Bergmann
 berkeleydb/makefile.mk|4 +
 cairo/cairo/makefile.mk   |5 +
 cairo/pixman/makefile.mk  |7 ++
 cppunit/makefile.mk   |2 
 curl/makefile.mk  |5 +
 epm/makefile.mk   |4 +
 gdk-pixbuf/makefile.mk|5 -
 gettext/makefile.mk   |   35 ++---
 glib/makefile.mk  |   14 +++--
 hunspell/makefile.mk  |5 +
 icu/makefile.mk   |7 ++
 libcroco/makefile.mk  |3 -
 libexttextcat/makefile.mk |5 +
 libgsf/makefile.mk|5 -
 librsvg/makefile.mk   |3 -
 libxml2/makefile.mk   |6 +-
 libxmlsec/makefile.mk |5 +
 libxslt/makefile.mk   |7 ++
 moz/extractfiles.mk   |4 -
 moz/makefile.mk   |3 -
 nss/makefile.mk   |8 ++-
 openssl/makefile.mk   |5 +
 pango/makefile.mk |6 --
 python/makefile.mk|   30 +++
 python/prj/d.lst  |6 +-
 redland/raptor/makefile.mk|5 +
 redland/rasqal/makefile.mk|4 +
 redland/redland/makefile.mk   |4 +
 solenv/bin/macosx-change-install-names.pl |   76 --
 solenv/inc/tg_ext.mk  |   25 +++--
 stlport/makefile.mk   |7 ++
 xpdf/makefile.mk  |5 +
 32 files changed, 201 insertions(+), 114 deletions(-)

New commits:
commit 7c4f2ec8a795534164ee1923093b7d5be0126c55
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Feb 29 18:34:42 2012 +0100

Simplify install name handling for external libraries on Mac OS X

...by allowing our special @___... tokens anywhere within an install name,
so that external modules can configure --prefix=/@___... etc.  This removes
the need for the special extshl and EXTRPATH=LOADER.  Also, a new
OUT2BIN_NONE can be used for external modules where the generated libraries
need the default EXTRPATH=OOO, but generated executables are only used
during the build and such need RPATH=NONE.

diff --git a/berkeleydb/makefile.mk b/berkeleydb/makefile.mk
index 825795a..07d6503 100644
--- a/berkeleydb/makefile.mk
+++ b/berkeleydb/makefile.mk
@@ -101,7 +101,9 @@ CONFIGURE_FLAGS+= --disable-shared
 CONFIGURE_FLAGS+= --enable-shared
 .ENDIF
 .IF $(OS)==MACOSX
-CONFIGURE_FLAGS+=CPPFLAGS=$(EXTRA_CDEFS)
+CONFIGURE_FLAGS += \
+--prefix=/@.__$(EXTRPATH) \
+CPPFLAGS=$(EXTRA_CDEFS)
 .ENDIF
 .IF $(CROSS_COMPILING)==YES
 CONFIGURE_FLAGS+=--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)
diff --git a/cairo/cairo/makefile.mk b/cairo/cairo/makefile.mk
index 8f2a359..16a89bf 100644
--- a/cairo/cairo/makefile.mk
+++ b/cairo/cairo/makefile.mk
@@ -241,6 +241,10 @@ 
CONFIGURE_FLAGS+=CFLAGS=-I$(SRC_ROOT)$/$(PRJNAME)$/$(INPATH)$/inc $(cairo_CFLAG
 CONFIGURE_FLAGS+=png_CFLAGS=-I$(SOLARINCDIR)$/external$/libpng 
png_LIBS=-L$(SOLARLIBDIR) -lpng
 .ENDIF
 
+.IF $(OS) == MACOSX
+CONFIGURE_FLAGS += \
+--prefix=/@.__$(EXTRPATH)
+.END
 
 OUT2INC+=cairo-version.h \
  src$/cairo-deprecated.h \
@@ -250,7 +254,6 @@ OUT2INC+=cairo-version.h \
  src$/cairo.h
 
 .IF $(OS)==MACOSX
-EXTRPATH=LOADER
 OUT2LIB+=src$/.libs$/libcairo*.dylib
 .ELIF $(OS)==WNT
 .IF $(COM)==GCC
diff --git a/cairo/pixman/makefile.mk b/cairo/pixman/makefile.mk
index 44ea09b..f4dab40 100644
--- a/cairo/pixman/makefile.mk
+++ b/cairo/pixman/makefile.mk
@@ -145,7 +145,12 @@ CONFIGURE_FLAGS+=CFLAGS=$(pixman_CFLAGS)
 
 CONFIGURE_FLAGS+=--disable-arm-simd --disable-arm-neon --disable-arm-iwmmxt
 
-.ENDIF
+.ELIF $(OS) == MACOSX
+
+CONFIGURE_FLAGS += \
+--prefix=/@.__$(EXTRPATH)
+
+.END
 
 .IF $(CROSS_COMPILING)==YES
 CONFIGURE_FLAGS+=--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)
diff --git a/cppunit/makefile.mk b/cppunit/makefile.mk
index d96d7f4..c99e97b 100644
--- a/cppunit/makefile.mk
+++ b/cppunit/makefile.mk
@@ -189,6 +189,8 @@ OUT2BIN = ooo-install/bin/DllPlugInTester
 .IF $(OS) == MACOSX
 OUT2LIB = ooo-install/lib/libcppunit-1.12.1.dylib
 EXTRPATH = NONE
+PACKAGE_DIR = \
+$(MISC)/@.__$(EXTRPATH)
 .ELIF $(OS) == AIX
 OUT2LIB = ooo-install/lib/libcppunit-1.12.a
 .ELIF $(OS) == OPENBSD
diff --git a/curl/makefile.mk b/curl/makefile.mk
index c7fca54..3eabe72 100644
--- a/curl/makefile.mk
+++ b/curl/makefile.mk
@@ -89,6 +89,11 @@ CONFIGURE_FLAGS=--disable-static
 .ENDIF
 CONFIGURE_FLAGS+= --without-ssl --without-libidn --enable-ftp --enable-ipv6 

[Libreoffice-commits] .: configure.in

2012-02-29 Thread Tor Lillqvist
 configure.in |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b9b8ae8a484471ce067ad09dc96cad0d87285a6f
Author: Tor Lillqvist tlillqv...@suse.com
Date:   Tue Feb 28 21:39:27 2012 +0200

Don't generate Thumb code to avoid ld bug in NDK r7b

diff --git a/configure.in b/configure.in
index 739ec3e..b0e9ce8 100644
--- a/configure.in
+++ b/configure.in
@@ -108,7 +108,7 @@ if test -n $with_android_ndk; then
test -z $RANLIB  
RANLIB=$ANDROID_ABI_PREBUILT_BIN/arm-linux-androideabi-ranlib
test -z $STRIP  
STRIP=$ANDROID_ABI_PREBUILT_BIN/arm-linux-androideabi-strip
 
-   ANDROIDCFLAGS=-march=armv7-a -mfloat-abi=softfp -mthumb -mfpu=neon 
-Wl,--fix-cortex-a8 --sysroot $ANDROID_NDK_HOME/platforms/android-9/arch-arm 
-L$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a
+   ANDROIDCFLAGS=-march=armv7-a -mfloat-abi=softfp -mfpu=neon 
-Wl,--fix-cortex-a8 --sysroot $ANDROID_NDK_HOME/platforms/android-9/arch-arm 
-L$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a
 
test -z $CC  CC=$ANDROID_ABI_PREBUILT_BIN/arm-linux-androideabi-gcc 
$ANDROIDCFLAGS
test -z $CXX  CXX=$ANDROID_ABI_PREBUILT_BIN/arm-linux-androideabi-g++ 
$ANDROIDCFLAGS -I $ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/include 
-I$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: bin/distro-install-clean-up bin/distro-install-desktop-integration bin/distro-install-file-lists bin/distro-install-sdk

2012-02-29 Thread Petr Mladek
 bin/distro-install-clean-up|8 +++-
 bin/distro-install-desktop-integration |8 +++-
 bin/distro-install-file-lists  |8 +++-
 bin/distro-install-sdk |8 +++-
 4 files changed, 28 insertions(+), 4 deletions(-)

New commits:
commit a0238fda86e18f8a282f9307bd6b201f97f5f331
Author: Petr Mladek pmla...@suse.cz
Date:   Wed Feb 29 20:26:13 2012 +0100

bin/distro-install*: source config_host.mk instead of Env.Host.sh

thanks Stefan Bergman for improving the sed pattern

diff --git a/bin/distro-install-clean-up b/bin/distro-install-clean-up
index 98fb546..54dd1f3 100755
--- a/bin/distro-install-clean-up
+++ b/bin/distro-install-clean-up
@@ -1,6 +1,12 @@
 #!/bin/sh
 
-. ./*[Ee]nv.[Hh]ost.sh
+if test -z ${SRC_ROOT}; then
+eval $(sed -e s/\'/\'\'\'/g -e 's/=\(.\+\)/='\''\1'\'/ 
./config_host.mk)
+fi
+if test -z ${SOLARENV}; then
+echo distro-install-clean-up: No environment set!
+exit 1
+fi
 
 echo Cleaning up ...;
 
diff --git a/bin/distro-install-desktop-integration 
b/bin/distro-install-desktop-integration
index 6e45285..c7f58ee 100755
--- a/bin/distro-install-desktop-integration
+++ b/bin/distro-install-desktop-integration
@@ -1,6 +1,12 @@
 #!/bin/sh
 
-. ./*[Ee]nv.[Hh]ost.sh
+if test -z ${SRC_ROOT}; then
+eval $(sed -e s/\'/\'\'\'/g -e 's/=\(.\+\)/='\''\1'\'/ 
./config_host.mk)
+fi
+if test -z ${SOLARENV}; then
+echo distro-install-clean-up: No environment set!
+exit 1
+fi
 
 PRODUCTVERSION_NODOT=`echo $PRODUCTVERSION | sed -e s/\.//`
 
diff --git a/bin/distro-install-file-lists b/bin/distro-install-file-lists
index 7282a67..0f6e60a 100755
--- a/bin/distro-install-file-lists
+++ b/bin/distro-install-file-lists
@@ -1,6 +1,12 @@
 #!/bin/sh
 
-. ./*[Ee]nv.[Hh]ost.sh
+if test -z ${SRC_ROOT}; then
+eval $(sed -e s/\'/\'\'\'/g -e 's/=\(.\+\)/='\''\1'\'/ 
./config_host.mk)
+fi
+if test -z ${SOLARENV}; then
+echo distro-install-clean-up: No environment set!
+exit 1
+fi
 
 BUILDDIR=`pwd`
 FILELISTSDIR=$BUILDDIR/file-lists
diff --git a/bin/distro-install-sdk b/bin/distro-install-sdk
index 09c75c6..f1cb6fe 100755
--- a/bin/distro-install-sdk
+++ b/bin/distro-install-sdk
@@ -1,6 +1,12 @@
 #!/bin/sh
 
-. ./*[Ee]nv.[Hh]ost.sh
+if test -z ${SRC_ROOT}; then
+eval $(sed -e s/\'/\'\'\'/g -e 's/=\(.\+\)/='\''\1'\'/ 
./config_host.mk)
+fi
+if test -z ${SOLARENV}; then
+echo distro-install-clean-up: No environment set!
+exit 1
+fi
 
 if test -d $DESTDIR$INSTALLDIR/sdk ; then
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/Library_vclplug_kde4.mk

2012-02-29 Thread Stephan Bergmann
 vcl/Library_vclplug_kde4.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ab29d941b39da12b3711b21e680aebcf5b7c9a09
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Feb 29 20:52:02 2012 +0100

Typo fps_kde4 - vclplug_kde4

diff --git a/vcl/Library_vclplug_kde4.mk b/vcl/Library_vclplug_kde4.mk
index e26e054..311d86d 100644
--- a/vcl/Library_vclplug_kde4.mk
+++ b/vcl/Library_vclplug_kde4.mk
@@ -95,7 +95,7 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_kde4,\
 ))
 
 # KDE/Qt consider -Wshadow more trouble than benefit
-$(eval $(call gb_Library_add_cxxflags,fps_kde4,\
+$(eval $(call gb_Library_add_cxxflags,vclplug_kde4,\
 -Wno-shadow \
 ))
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svx/source

2012-02-29 Thread Michael Stahl
 svx/source/svdraw/svdograf.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit 0c6d89941118368ccbb596362a545db5d3a07dbe
Author: Michael Stahl mst...@redhat.com
Date:   Wed Feb 29 22:34:51 2012 +0100

fdo#46340: fix crash in SdrGrafObj::getInputStream:

Add the ridiculous hack that used to be here (and distributed across
various GetDocumentStream methods to make it non-obvious)
that makes this not crash by accident.

(regression from fd95f1ab6220c6a530fd2e4e727417f504a5db51)

diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 23f81df..6fd9cf3 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -1335,6 +1335,14 @@ Reference XInputStream  SdrGrafObj::getInputStream()
 ::comphelper::LifecycleProxy proxy;
 xStream.set(
 pModel-GetDocumentStream(pGraphic-GetUserData(), proxy));
+// fdo#46340: this may look completely insane, and it is,
+// but it also prevents a crash: the LifecycleProxy will go out
+// of scope, but the xStream must be returned; the UcbStreamHelper
+// will actually copy the xStream to a temp file (because it is
+// not seekable), which makes it not crash...
+SvStream *const pStream =
+utl::UcbStreamHelper::CreateStream(xStream);
+xStream.set(new utl::OInputStreamWrapper(pStream, true));
 }
 else if( pGraphic  GetGraphic().IsLink() )
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: extensions/source

2012-02-29 Thread René Engelhard
 extensions/source/nsplugin/source/so_instance.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a6d65732f14e49be8ec61aac53a2a8b909d810f7
Author: Rene Engelhard r...@debian.org
Date:   Wed Feb 29 23:19:00 2012 +0100

fix nsplugin to create correct com.sun.star.ucb.SimpleFileAccess instance

diff --git a/extensions/source/nsplugin/source/so_instance.cxx 
b/extensions/source/nsplugin/source/so_instance.cxx
index b87b83f..8b243ae 100644
--- a/extensions/source/nsplugin/source/so_instance.cxx
+++ b/extensions/source/nsplugin/source/so_instance.cxx
@@ -239,7 +239,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent)
 
 //create stream for the document
 Reference ::com::sun::star::ucb::XSimpleFileAccess  
xSimpleFileAccess(
-mxRemoteMSF-createInstance( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(com.sun.star.ucb.SimpleFileAccessw))
 ),
+mxRemoteMSF-createInstance( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(com.sun.star.ucb.SimpleFileAccess))
 ),
 uno::UNO_QUERY );
 if(!xSimpleFileAccess.is())
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - svl/source

2012-02-29 Thread Bjoern Michaelsen
 svl/source/inc/poolio.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 33e530692e5527f3286547647604cbcd2e410b82
Author: Michael Stahl mst...@redhat.com
Date:   Mon Feb 27 20:43:28 2012 +0100

SfxItemPool: replace deque with vector for SfxPoolItem array

Yields measurable speedup on load/store of large documents, wonder where
the equivalent patch i committed long time ago to OOo went...

Signed-off-by: Bjoern Michaelsen bjoern.michael...@canonical.com

diff --git a/svl/source/inc/poolio.hxx b/svl/source/inc/poolio.hxx
index 15f55ee..7c2cfc6 100644
--- a/svl/source/inc/poolio.hxx
+++ b/svl/source/inc/poolio.hxx
@@ -56,7 +56,7 @@ struct SfxPoolVersion_Impl
 {}
 };
 
-typedef std::dequeSfxPoolItem* SfxPoolItemArrayBase_Impl;
+typedef std::vectorSfxPoolItem* SfxPoolItemArrayBase_Impl;
 
 typedef boost::shared_ptr SfxPoolVersion_Impl  SfxPoolVersion_ImplPtr;
 typedef std::deque SfxPoolVersion_ImplPtr  SfxPoolVersionArr_Impl;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - languagetool/JLanguageTool-1.4.0-no-hc.patch languagetool/makefile.mk solenv/inc

2012-02-29 Thread Stephan Bergmann
 languagetool/JLanguageTool-1.4.0-no-hc.patch |   22 ++
 languagetool/makefile.mk |3 ++-
 solenv/inc/tg_ext.mk |3 ++-
 3 files changed, 26 insertions(+), 2 deletions(-)

New commits:
commit 4d94ce58932d00905b749eab7b105e74dc017ff4
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Feb 29 23:44:05 2012 +0100

Adapt LanguageTool.oxt to removed SpellAndGrammarDialogImage_HC

...which got removed with c938545d5227808749fdca4f05dd0dcc8303f632 Remove 
all traces
of _HC (high contrast) from libs-core.

diff --git a/languagetool/JLanguageTool-1.4.0-no-hc.patch 
b/languagetool/JLanguageTool-1.4.0-no-hc.patch
new file mode 100644
index 000..0078cf8
--- /dev/null
+++ b/languagetool/JLanguageTool-1.4.0-no-hc.patch
@@ -0,0 +1,22 @@
+--- misc/JLanguageTool-1.4.0/build.xml 2012-02-29 22:18:05.118789546 +0100
 misc/build/JLanguageTool-1.4.0/build.xml   2012-02-29 22:17:02.385235706 
+0100
+@@ -82,7 +82,6 @@
+ include name=openoffice/Linguistic.xcu/
+   include name=openoffice/description.xml/
+   include name=openoffice/images/dialog.png/
+-  include name=openoffice/images/dialogh.png/
+   include 
name=openoffice/images/LanguageToolBig.png/
+   include 
name=openoffice/images/LanguageToolSmall.png/
+   include name=openoffice/images/dialog.png/
+--- misc/JLanguageTool-1.4.0/openoffice/Linguistic.xcu 2011-06-26 
20:29:43.0 +0200
 misc/build/JLanguageTool-1.4.0/openoffice/Linguistic.xcu   2012-02-29 
22:17:25.551071099 +0100
+@@ -27,9 +27,6 @@
+ prop oor:name=SpellAndGrammarDialogImage 
oor:type=xs:string
+ value%origin%/images/dialog.png/value
+ /prop
+-prop oor:name=SpellAndGrammarDialogImage_HC 
oor:type=xs:string
+-value%origin%/images/dialogh.png/value
+-/prop
+ /node
+ /node
+ /node
diff --git a/languagetool/makefile.mk b/languagetool/makefile.mk
index c30fb28..2039f59 100644
--- a/languagetool/makefile.mk
+++ b/languagetool/makefile.mk
@@ -41,7 +41,8 @@ TARGET=languagetool
 TARFILE_NAME=JLanguageTool-1.4.0
 TARFILE_MD5=b99fb620b1324b4ce79ee6998b507146
 TARFILE_ROOTDIR=JLanguageTool-1.4.0
-PATCH_FILES=JLanguageTool-1.4.0.patch
+PATCH_FILES=JLanguageTool-1.4.0.patch JLanguageTool-1.4.0-no-hc.patch
+REMOVE_FILES=openoffice/images/dialogh.png
 
 .IF $(JAVACISGCJ)==yes
 JAVA_HOME=
commit fe5fcca2536a5328b17a13e3f6ea984c5019a777
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Feb 29 23:41:26 2012 +0100

REMOVE_FILES for cases where files need to be removed from external sources

diff --git a/solenv/inc/tg_ext.mk b/solenv/inc/tg_ext.mk
index b74c79f..9588456 100644
--- a/solenv/inc/tg_ext.mk
+++ b/solenv/inc/tg_ext.mk
@@ -174,8 +174,9 @@ $(PACKAGE_DIR)/$(UNTAR_FLAG_FILE) : 
$(PRJ)/$(ROUT)/misc/$(TARFILE_MD5)-$(TARFILE
 @-cd $(PACKAGE_DIR)  chmod -R +rw $(TARFILE_ROOTDIR)  $(TOUCH) 
$(UNTAR_FLAG_FILE)
 @-cd $(PACKAGE_DIR)  find $(TARFILE_ROOTDIR) -type d -print0 | xargs -0 
chmod a+x
 
-#add new files to patch
+#add new files to patch and remove files from patch
 $(PACKAGE_DIR)/$(ADD_FILES_FLAG_FILE) : $(PACKAGE_DIR)/$(UNTAR_FLAG_FILE) 
$(T_ADDITIONAL_FILES:+.dummy)
+$(RM) $(foreach,i,$(REMOVE_FILES) $(PACKAGE_DIR)/$(TARFILE_ROOTDIR)/$i)
 .IF $(GUI)==WNT
 @$(TOUCH) $@
 .ELSE  # $(GUI)==WNT
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 7 commits - basic/Library_sb.mk basic/Module_basic.mk basic/source boost/boost_1_44_0-unused-parameters.patch cppunit/warnings.patch ios/qa Makefile README.cross RepositoryFix

2012-02-29 Thread Tor Lillqvist
 Makefile   |6 
 README.cross   |   11 
 RepositoryFixes.mk |1 
 basic/Library_sb.mk|   17 +
 basic/Module_basic.mk  |5 
 basic/source/basmgr/basmgr-dummy.cxx   |  389 +
 basic/source/classes/sbxmod-dummy.cxx  |  236 +
 boost/boost_1_44_0-unused-parameters.patch |   39 ++
 cppunit/warnings.patch |   11 
 ios/qa/sc/Makefile |2 
 sc/source/core/data/validat.cxx|3 
 sc/source/core/tool/compiler.cxx   |6 
 sc/source/core/tool/interpr4.cxx   |   12 
 solenv/gbuild/platform/IOS_ARM_GCC.mk  |   15 -
 solenv/gbuild/platform/com_GCC_defs.mk |9 
 15 files changed, 742 insertions(+), 20 deletions(-)

New commits:
commit e3b45e857bceea3e9830a26d911164d26dbff56f
Author: Tor Lillqvist t...@iki.fi
Date:   Thu Mar 1 01:14:13 2012 +0200

Add more libs

Still doesn't link, dozens of undefines. And of course the whole
question of how to do static linking to UNO components in an elegant
fashion with the least intrusive ugly changes to source code has not
been resolved yet.

diff --git a/ios/qa/sc/Makefile b/ios/qa/sc/Makefile
index 1580ebf..7280215 100644
--- a/ios/qa/sc/Makefile
+++ b/ios/qa/sc/Makefile
@@ -19,7 +19,7 @@ SRCS = filters-test.m
 
 CFLAGS = $(SOLARINC)
 
-LIBS = -Wl,$(OUTDIR)/bin/cppunit/cppunittester.a 
-Wl,$(WORKDIR)/LinkTarget/CppunitTest/libtest_sc_filters_test.a 
-Wl,$(OUTDIR)/lib/unoexceptionprotector.a $(SOLARLIB) -lavmedialo -lbasegfxlo 
-lcomphelpgcc3 -leditenglo -lfwelo -lfwilo -lfwklo -li18nisolang1gcc3 
-li18npaperlo -licuuc -ljpeg -llnglo -lsalcpprt -lsfxlo -lsvllo -lsvtlo -lutllo 
-lvcllo -lsaxlo -lsclo -lsotlo -ltest -ltklo -ltllo -lucbhelper4gcc3 -lxolo 
-lcppunit -lunotest -luno_cppuhelpergcc3 -luno_cppu -luno_salhelpergcc3 
-luno_sal -lsal_textenc $(addprefix -framework , $(gb_Library__FRAMEWORKS)) 
-lobjc
+LIBS = -Wl,$(OUTDIR)/bin/cppunit/cppunittester.a 
-Wl,$(WORKDIR)/LinkTarget/CppunitTest/libtest_sc_filters_test.a 
-Wl,$(OUTDIR)/lib/bootstrap.uno.a -Wl,$(OUTDIR)/lib/unoexceptionprotector.a 
$(SOLARLIB) -lavmedialo -lbasegfxlo -lcomphelpgcc3 -lcppunit -ldrawinglayerlo 
-leditenglo -lforlo -lforuilo -lfwelo -lfwilo -lfwklo -li18nisolang1gcc3 
-li18npaperlo -licuuc -ljpeg -ljvmfwk -llnglo -lreg -lsal_textenc -lsalcpprt 
-lsaxlo -lsblo -lsclo -lsfxlo -lstore -lsvllo -lsvtlo -lsvxlo -lsvxcorelo 
-lsotlo -ltest -ltklo -ltllo -lucbhelper4gcc3 -luno_cppuhelpergcc3 -luno_cppu 
-luno_sal -luno_salhelpergcc3 -lunotest -lutllo -lvcllo -lxml2 -lxmlreader 
-lxolo -lz $(addprefix -framework , $(gb_Library__FRAMEWORKS)) -liconv -lobjc
 
 all: $(APPDIR)/$(APP)
 
commit 7a0b721462182c3a4029c586f90d13eda674eac9
Author: Tor Lillqvist t...@iki.fi
Date:   Thu Mar 1 01:12:58 2012 +0200

Filter out options that Clang doesn't have

diff --git a/solenv/gbuild/platform/IOS_ARM_GCC.mk 
b/solenv/gbuild/platform/IOS_ARM_GCC.mk
index 5c8dde6..03bae7b 100644
--- a/solenv/gbuild/platform/IOS_ARM_GCC.mk
+++ b/solenv/gbuild/platform/IOS_ARM_GCC.mk
@@ -64,11 +64,15 @@ gb_CXXFLAGS := \
-Wno-ctor-dtor-privacy \
-Wno-non-virtual-dtor \
-fno-strict-aliasing \
-   -fsigned-char \
-   -malign-natural \
-   #-Wshadow \ break in compiler headers already
-   #-fsigned-char \ might be removed?
-   #-malign-natural \ might be removed?
+   -fsigned-char
+
+# No idea if -malign-natural is needed, but macosx.mk uses it...
+# Why it isn't used in gb_CFLAGS I have no idea.
+# Anyway, Clang doesn't have this option.
+ifeq (,$(findstring /clang,$(CXX)))
+gb_CXXFLAGS += \
+   -malign-natural
+endif
 
 # these are to get gcc to switch to Objective-C++ or Objective-C mode
 gb_OBJC_OBJCXX_COMMON_FLAGS := -fobjc-abi-version=2 -fobjc-legacy-dispatch 
-D__IPHONE_OS_VERSION_MIN_REQUIRED=40300
@@ -203,6 +207,7 @@ gb_Library__FRAMEWORKS := \
 Foundation \
 CoreFoundation \
 CoreGraphics \
+   CoreText \
 
 gb_Library_PLAINLIBS_NONE += \
 objc \
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk 
b/solenv/gbuild/platform/com_GCC_defs.mk
index fb032ad..b6aff7f 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -118,8 +118,13 @@ endif
 
 gb_LinkTarget_EXCEPTIONFLAGS := \
-DEXCEPTIONS_ON \
-   -fexceptions \
-   -fno-enforce-eh-specs \
+   -fexceptions
+
+# Clang doesn't have this option
+ifeq (,$(findstring /clang,$(CXX)))
+gb_LinkTarget_EXCEPTIONFLAGS += \
+   -fno-enforce-eh-specs
+endif
 
 gb_LinkTarget_NOEXCEPTIONFLAGS := \
-DEXCEPTIONS_OFF \
commit fead7eb86f0e7e095f873f20bd6812a5bded0e74
Author: Tor Lillqvist t...@iki.fi
Date:   Thu Mar 1 01:11:48 2012 +0200

Some initial DISABLE_SCRIPTING ifdefs

diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index 

[Libreoffice-commits] .: unotools/source

2012-02-29 Thread Tor Lillqvist
 unotools/source/ucbhelper/ucblockbytes.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ebe26f72e90337da2d14f3029de148904e3e30b6
Author: Tor Lillqvist t...@iki.fi
Date:   Thu Mar 1 01:55:01 2012 +0200

WaE: 'unused' attribute ignored when parsing type

diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx 
b/unotools/source/ucbhelper/ucblockbytes.cxx
index 816703a..49566c3 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -1591,7 +1591,7 @@ void UcbLockBytes::Cancel()
 }
 
 //
-IMPL_LINK( UcbLockBytes, DataAvailHdl, SAL_UNUSED_PARAMETER void*, EMPTYARG )
+IMPL_LINK( UcbLockBytes, DataAvailHdl, void*, EMPTYARG )
 {
 if ( hasInputStream_Impl()  m_xHandler.Is() )
 m_xHandler-Handle( UcbLockBytesHandler::DATA_AVAILABLE, this );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: connectivity/source

2012-02-29 Thread Philipp Weissenbacher
 connectivity/source/inc/OTypeInfo.hxx   |   28 -
 connectivity/source/inc/ado/Aolewrap.hxx|   45 +++-
 connectivity/source/inc/ado/Awrapado.hxx|   31 +--
 connectivity/source/inc/ado/adoimp.hxx  |2 
 connectivity/source/inc/java/lang/Object.hxx|   19 +++---
 connectivity/source/inc/java/sql/Array.hxx  |4 -
 connectivity/source/inc/java/sql/Blob.hxx   |4 -
 connectivity/source/inc/java/sql/CallableStatement.hxx  |4 -
 connectivity/source/inc/java/sql/Clob.hxx   |4 -
 connectivity/source/inc/java/sql/Connection.hxx |4 -
 connectivity/source/inc/java/sql/DatabaseMetaData.hxx   |4 -
 connectivity/source/inc/java/sql/DriverPropertyInfo.hxx |4 -
 connectivity/source/inc/java/sql/JStatement.hxx |8 +-
 connectivity/source/inc/java/sql/PreparedStatement.hxx  |4 -
 connectivity/source/inc/java/sql/Ref.hxx|4 -
 connectivity/source/inc/java/sql/ResultSet.hxx  |4 -
 connectivity/source/inc/java/sql/ResultSetMetaData.hxx  |4 -
 connectivity/source/inc/java/sql/SQLException.hxx   |6 +-
 connectivity/source/inc/java/sql/SQLWarning.hxx |4 -
 connectivity/source/inc/java/sql/Timestamp.hxx  |6 +-
 connectivity/source/inc/java/util/Date.hxx  |4 -
 connectivity/source/inc/java/util/Property.hxx  |4 -
 22 files changed, 98 insertions(+), 103 deletions(-)

New commits:
commit e5f5ab57a124ffaf5e26e90af5aa546ad8451d4d
Author: Philipp Weissenbacher p.weissenbac...@gmail.com
Date:   Thu Mar 1 02:27:38 2012 +0100

Translate German comments, fix some whitespace

diff --git a/connectivity/source/inc/OTypeInfo.hxx 
b/connectivity/source/inc/OTypeInfo.hxx
index 825bf4e..42fda5f 100644
--- a/connectivity/source/inc/OTypeInfo.hxx
+++ b/connectivity/source/inc/OTypeInfo.hxx
@@ -37,26 +37,26 @@ namespace connectivity
 {
 struct OTypeInfo
 {
-::rtl::OUString aTypeName;  // Name des Types in der Datenbank
-::rtl::OUString aLiteralPrefix; // Prefix zum Quoten
-::rtl::OUString aLiteralSuffix; // Suffix zum Quoten
-::rtl::OUString aCreateParams;  // Parameter zum Erstellen
+::rtl::OUString aTypeName;  // Name of the type in the database
+::rtl::OUString aLiteralPrefix; // Prefix for quoting
+::rtl::OUString aLiteralSuffix; // Suffix for quoting
+::rtl::OUString aCreateParams;  // Parameter for creating
 ::rtl::OUString aLocalTypeName;
 
-sal_Int32   nPrecision; // Laenge des Types
+sal_Int32   nPrecision; // Length of the type
 
-sal_Int16   nMaximumScale;  // Nachkommastellen
-sal_Int16   nMinimumScale;  // Min Nachkommastellen
+sal_Int16   nMaximumScale;  // Decimal places
+sal_Int16   nMinimumScale;  // Minimum decimal places
 
-sal_Int16   nType;  // Datenbanktyp
-sal_Int16   nSearchType;// kann nach dem Typen gesucht werden
+sal_Int16   nType;  // Database type
+sal_Int16   nSearchType;// Can we search for the type?
 sal_Int16   nNumPrecRadix;  // indicating the radix, which is 
usually 2 or 10
 
-sal_BoolbCurrency   : 1,// Waehrung
-bAutoIncrement  : 1,// Ist es ein automatisch 
incrementierendes Feld
-bNullable   : 1,// Kann das Feld NULL annehmen
-bCaseSensitive  : 1,// Ist der Type Casesensitive
-bUnsigned   : 1,// Ist der Type Unsigned
+sal_BoolbCurrency   : 1,// Currency
+bAutoIncrement  : 1,// Is it an autoincrementing 
field?
+bNullable   : 1,// Can the field be NULL?
+bCaseSensitive  : 1,// Is the type case sensitive?
+bUnsigned   : 1,// Is the type unsigned?
 bEmpty_1: 1,// for later use
 bEmpty_2: 1;
 
diff --git a/connectivity/source/inc/ado/Aolewrap.hxx 
b/connectivity/source/inc/ado/Aolewrap.hxx
index 51407bc..06bcadc 100644
--- a/connectivity/source/inc/ado/Aolewrap.hxx
+++ b/connectivity/source/inc/ado/Aolewrap.hxx
@@ -66,19 +66,17 @@ namespace connectivity
 };
 
//
 //
-// Template-Klasse WpOLEBaseclass T
+// Template class WpOLEBaseclass T
 // ==
 //
-// Objekte dieser Klasse haelt einen Zeiger auf ein Interface vom Typ 
T.
-// Es gibt Konstruktoren und Zuweisungsoperator die sicherstellen, dass
-// AddRef() und Release() entsprechend den COM-Konventionen 

[Libreoffice-commits] .: Branch 'libreoffice-3-5' - svx/source

2012-02-29 Thread Michael Meeks
 svx/source/svdraw/svdograf.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit 63a480aac59d459e9f759c5a346bebdda0c78acd
Author: Michael Stahl mst...@redhat.com
Date:   Wed Feb 29 22:34:51 2012 +0100

fdo#46340: fix crash in SdrGrafObj::getInputStream:

Add the ridiculous hack that used to be here (and distributed across
various GetDocumentStream methods to make it non-obvious)
that makes this not crash by accident.

(regression from fd95f1ab6220c6a530fd2e4e727417f504a5db51)

Signed-off-by: Michael Meeks michael.me...@suse.com

diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index c82b5fe..e6ed8a6 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -1310,6 +1310,14 @@ Reference XInputStream  SdrGrafObj::getInputStream()
 ::comphelper::LifecycleProxy proxy;
 xStream.set(
 pModel-GetDocumentStream(pGraphic-GetUserData(), proxy));
+// fdo#46340: this may look completely insane, and it is,
+// but it also prevents a crash: the LifecycleProxy will go out
+// of scope, but the xStream must be returned; the UcbStreamHelper
+// will actually copy the xStream to a temp file (because it is
+// not seekable), which makes it not crash...
+SvStream *const pStream =
+utl::UcbStreamHelper::CreateStream(xStream);
+xStream.set(new utl::OInputStreamWrapper(pStream, true));
 }
 else if( pGraphic  GetGraphic().IsLink() )
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5-1' - extensions/source

2012-02-29 Thread Michael Meeks
 extensions/source/nsplugin/source/so_instance.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0334a6ec8311503d9162d41973825ad8616db652
Author: Rene Engelhard r...@debian.org
Date:   Wed Feb 29 23:19:00 2012 +0100

fix nsplugin to create correct com.sun.star.ucb.SimpleFileAccess instance

Signed-off-by: Stephan Bergmann sberg...@redhat.com
Signed-off-by: Tor Lillqvist t...@iki.fi
Signed-off-by: Michael Meeks michael.me...@suse.com

diff --git a/extensions/source/nsplugin/source/so_instance.cxx 
b/extensions/source/nsplugin/source/so_instance.cxx
index 776319b..964ef14 100644
--- a/extensions/source/nsplugin/source/so_instance.cxx
+++ b/extensions/source/nsplugin/source/so_instance.cxx
@@ -241,7 +241,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent)
 
 //create stream for the document
 Reference ::com::sun::star::ucb::XSimpleFileAccess  
xSimpleFileAccess(
-mxRemoteMSF-createInstance( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(com.sun.star.ucb.SimpleFileAccessw))
 ),
+mxRemoteMSF-createInstance( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(com.sun.star.ucb.SimpleFileAccess))
 ),
 uno::UNO_QUERY );
 if(!xSimpleFileAccess.is())
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-4' - extensions/source

2012-02-29 Thread René Engelhard
 extensions/source/nsplugin/source/so_instance.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b975e59e7d5213f99ff22138a1065eb0f0a9cb07
Author: Rene Engelhard r...@debian.org
Date:   Thu Mar 1 08:45:13 2012 +0100

fix nsplugin to create correct com.sun.star.ucb.SimpleFileAccess instance

Signed-off-by: Stephan Bergmann sberg...@redhat.com
Signed-off-by: Michael Meeks michael.me...@suse.com
Signed-off-by: Tor Lillqvist t...@iki.fi

diff --git a/extensions/source/nsplugin/source/so_instance.cxx 
b/extensions/source/nsplugin/source/so_instance.cxx
index 658d73a..f14b7b3 100644
--- a/extensions/source/nsplugin/source/so_instance.cxx
+++ b/extensions/source/nsplugin/source/so_instance.cxx
@@ -243,7 +243,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent)
 
 //create stream for the document
 Reference ::com::sun::star::ucb::XSimpleFileAccess  
xSimpleFileAccess(
-mxRemoteMSF-createInstance( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(com.sun.star.ucb.SimpleFileAccessw))
 ),
+mxRemoteMSF-createInstance( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(com.sun.star.ucb.SimpleFileAccess))
 ),
 uno::UNO_QUERY );
 if(!xSimpleFileAccess.is())
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [PUSHED 3.5][PUSHED 3.5.1] Fix crash on exit using KDE interface

2012-02-29 Thread Stephan Bergmann

On 02/29/2012 05:27 AM, Josh Heidenreich wrote:

Needs two more reviews for libreoffice-3-5-1.


I don't know much about this code, nor if I have the authority to
sign-off, but the patch looks sane to me. Just my 2c.


Looks good.  Pushed to libreoffice-3-5-1 now.

Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: String literals, ASCII vs UTF-8

2012-02-29 Thread Stephan Bergmann

On 02/29/2012 08:57 AM, Noel Grandin wrote:

Surely the cheapest call-site check for the result of malloc() is just
to attempt a fetch from the memory location?
That will trigger SIGSEGV, but at least you'll get a stack-trace out of it.


But, as I argue, propagating to the call site is generally better and 
apparently hardly more expensive in practice.


Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


python gdb plugin traceback: No type named sal_uInt16.

2012-02-29 Thread Riccardo Magliocchetti

Hello,

i have this traceback every time i open a core. It does not harm but it 
is a bit annoying. Does anyone have a clue on how to fix that?


#1  0x7f1648443b0b in __GI_abort () at abort.c:92
save_stage = 2
act = Traceback (most recent call last):
  File /home/rm/src/libo/solenv/gdb/libreoffice/util/printing.py, 
line 123, in __call__

printer = self.func_lookup[val.type]
  File /home/rm/src/libo/solenv/gdb/libreoffice/util/printing.py, 
line 95, in __getitem__

if test(type):
  File /home/rm/src/libo/solenv/gdb/libreoffice/svl.py, line 89, in query
ushort = gdb.lookup_type('sal_uInt16')
RuntimeError: No type named sal_uInt16.


thanks

--
Riccardo Magliocchetti
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Question: How do I rasterize an SVG to a BitmapEx

2012-02-29 Thread Andrew Higginson
Hi,

On 28 February 2012 14:55, Thorsten Behrens t...@documentfoundation.orgwrote:

 Andrew Higginson wrote:
  Sorry still don't understand, what class is the aSvgData? :/
 
 Hi Andrew,

 ah, that was a somewhat made-up example - uno::Sequencesal_uInt8
 for the methods I used there. But it really depends on how/where you
 get your data read.


Okay but this is also where I need help, I don't know how best to read it
(I am not familiar with the best class to use etc.)

So if I am getting the SVG from the brand/ folder in the galaxy icon theme,
what should I use to read it?


-- 
Andrew Higginson
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Convert tools/table.hxx usage in toolkit/source/controls/unocontrolmodel.cxx to std::map

2012-02-29 Thread Noel Grandin

Hi

Convert tools/table.hxx usage in  
toolkit/source/controls/unocontrolmodel.cxx to std::map


Contributed under LGPLv3+ / MPL 1.1 or later.
(And my license statement is on file in the wiki)

Regards, Noel Grandin

Disclaimer: http://www.peralex.com/disclaimer.html




0001-Convert-ImplPropertyTable-from-tools-table.hxx-to-st.patch
Description: application/mbox
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Bug 37361] LibreOffice 3.5 most annoying bugs

2012-02-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=37361

Raphaël raph...@hotmail.com changed:

   What|Removed |Added

 Depends on||36547

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Bug 37361] LibreOffice 3.5 most annoying bugs

2012-02-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=37361

--- Comment #206 from Raphaël raph...@hotmail.com 2012-02-29 01:49:53 PST ---
Please consider bug 36547, included in 'LibO 3.4 most annoying bugs', but still
there in LibO 3.5.0...

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: String literals, ASCII vs UTF-8

2012-02-29 Thread Michael Meeks

On Wed, 2012-02-29 at 08:42 +0100, Stephan Bergmann wrote:
 But how bad is that, anyway?  A little experiment shows that the 
 compiler will happily outline those inline functions detecting for 
 bad_alloc, creating one instance of them per library.

Heh ;-) so - I'd love to see the size difference between two identical
LibreOffice's compiled with and without those exceptions enabled - of
course, the fact that there is just one function is interesting (and
encouraging), but the required unwind tables for all these exceptions
that (in practise) never ever happen impact every single method that
uses strings, and stops us marking other methods as not throwing
exceptions (and/or detecting that during LTO as/when we get there).
Presumably since LTO does a lot of this manual propagation of real (as
opposed to annotated) exception throwing state, until we start doing
that aggressively in libmerged we won't really be able to get a good
idea of the real cost.

Last I did the analysis (which was some years back) exception data is
10% of stripped binary code size - which is at least significant -
particularly if it is substantially unused ;-)

Having said all this - I think we can agree that if we are calling this
new 'createFromAscii_WithLength' method - which is (currently) only
called during these magic constructors for compile time constants, that
the chance of having a 4Gb compile-time constant string in the source is
somewhat minimal ;-) and that there is certainly no need to throw an
exception and bloat the call-sites for this case at least.

All the best,

Michael.

-- 
michael.me...@suse.com  , Pseudo Engineer, itinerant idiot

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: SVG: debugging svg export

2012-02-29 Thread Thorsten Behrens
Chr. Rossmanith wrote:
 The tag opened in the line marked with ** is never closed. (It
 should be closed by the destructor.) 

Hi Christina - hmmm, can you maybe mail me your document, I don't
see this happening here - in Draw, single letter, export yields
 
 g id=bo-id2 visibility=visible class=BackgroundObjects/

Cheers,

-- Thorsten


pgp7H5wocwRYD.pgp
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[UX ADVICE] Key navigation in ValueSet controls

2012-02-29 Thread Matteo Casalin

Hi all,
lately I've been working on ValueSet code, which is used in several 
controls (e.g. color selection, color configuration, columns selection 
in writer...), doing some cleanups. When the code will be more 
manageable I plan to fix some little bugs (selection/focus).


Looking at the (not so clear) key-navigation code, I think that some of 
its behaviors are not so intuitive. Here what I understood (and sorry 
for the long mail):

* Right key allows to move from one item to the one on its right and,
  when the beginning of a line is reached, it moves to the end of the
  previous line. If the beginning of the first line is reached, it moves
  to the end of the last line (eventually moving through the none
  item, if present). Its behavior is not affected by Shift/Alt/Ctrl
  modifiers. Left key has symmetrical behavior.
* Up key allows to move from an item to the one above it. When the first
  line is reached, it moves to the same column of the last line (unless
  its a partial line which doesn't have that column, in which case the
  line is skipped and, if not visible, not shown at all), eventually
  moving through the none item if present. Its behavior is not
  affected by Shift/Alt/Ctrl modifiers. Down key has symmetrical
  behavior.
* Page Up key moves up of a number of lines equal to those visible (a
  page), maintaining the column. If in the middle of the first page,
  it moves to the none item (if present) or to the last item in the
  same column (last page). If the last line is partial, it's selected
  only if it has an item in that column, otherwise it's skipped.
  If any of Shift/Alt/Ctrl modifiers are pressed the selection does not
  move and the KeyStroke is passed to the handler of the base Control
  class (I didn't give a look at it yet).
  Page down has symmetrical behavior.
* Home key move to the none item if present, to the first element
  otherwise.
* End key moves to the last item.
* Return key selects an item (unless a flag does not disable this).
  If you press it in Color configuration UI, it closes the
  configuration window.

Is this behavior the expected/commonly accepted one?
I would like to propose:
* left/right motion should not wrap around from first to last (or last
  to first) item. Moving through lines is fine (behavior similar to
  moving through text), although we can also just stay on the same line
  and stop at its borders.
* up/down should not wrap around. If pressing up on a middle column of
  the first line, then it moves to the first item. If pressing down, it
  should move to the column below if present, to the last item
  otherwise.
  Please note that this is not similar to up/down navigation in text in
  writer (since I propose to move to first/last item if we cannot move
  of a whole line), but other application (e.g. thunderbird) behaves in
  this way. At least it allows to display (and make the user aware of)
  partial final lines.
* page up/down should mimic the behaviour of up/down keys: move in the
  same column when possible (even if the distance is less than a page)
  and, when pressed again and no motion in the current column is
  possible, reach the first/last element. I don't know if disabling
  navigation when key-modifiers are pressed makes sense.
* If none item is present, then it could be accessed only from the
  first item by pressing any of left/up (also page up/home ?) keys.
  When selected, it can be exited only by pressing right/down (also
  page down/end?) keys, but always lead to the first item.
* Return key behavior: at least it should not close the color
  configuration window, but my guess is that's a misconfiguration of
  the specific instance of ValueSet.

Although this behavior is consistent (allows to move/view all of the 
items, without special cases if none item is present), I'm aware that 
it imposes some more keystrokes in corner cases. If we decide to change 
the current behavior and there's no clear idea on what to do, then we 
can eventually give the proposed solution a first try and then evaluate 
possible improvements.


Please let me know your opinions/suggestions!

Cheers
Matteo
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PATCH] Convert SV_DECL_VARARR_SORT and SV_IMPL_VARARR_SORT with std::set

2012-02-29 Thread Bartosz

Hi.

I forgot to add [PATCH] tag.

I converted the SV_DECL_VARARR_SORT and SV_IMPL_VARARR_SORT with ::std::set.
I also made some optimization (cppcheck).

Could you please check this patch and push it into libreoffice.

License statement is on file.

Thanks in advance
Bartosz




diff --git a/editeng/source/editeng/impedit.hxx 
b/editeng/source/editeng/impedit.hxx
index 1c008fb..417415e 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -906,7 +906,7 @@ public:
 LanguageTypeGetDefaultLanguage() const { return eDefLanguage; }
 
 
-LanguageTypeGetLanguage( const EditSelection rSelection ) const;
+LanguageTypeGetLanguage( const EditSelection rSelection ) const;
 LanguageTypeGetLanguage( const EditPaM rPaM, sal_uInt16* pEndPos 
= NULL ) const;
 ::com::sun::star::lang::Locale GetLocale( const EditPaM rPaM ) const;
 
@@ -946,12 +946,12 @@ public:
 //adds one or more portions of text to the SpellPortions depending on 
language changes
 voidAddPortionIterated(
 EditView rEditView,
-const EditSelection rSel,
+const EditSelection rSel,
 ::com::sun::star::uno::Reference 
::com::sun::star::linguistic2::XSpellAlternatives  xAlt,
 ::svx::SpellPortions rToFill);
 //adds one portion to the SpellPortions
 voidAddPortion(
-const EditSelection rSel,
+const EditSelection rSel,
 ::com::sun::star::uno::Reference 
::com::sun::star::linguistic2::XSpellAlternatives  xAlt,
 ::svx::SpellPortions rToFill,
 bool bIsField );
diff --git a/editeng/source/editeng/impedit3.cxx 
b/editeng/source/editeng/impedit3.cxx
index 719a8753..b32cdc3 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -68,6 +68,7 @@
 
 #include editeng/unolingu.hxx
 
+#include set
 #include math.h
 #include vcl/svapp.hxx
 #include vcl/metric.hxx
@@ -86,9 +87,6 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::linguistic2;
 
-SV_DECL_VARARR_SORT( SortedPositions, sal_uInt32, 16 )
-SV_IMPL_VARARR_SORT( SortedPositions, sal_uInt32 );
-
 #define CH_HYPH '-'
 
 #define RESDIFF 10
@@ -2252,14 +2250,14 @@ sal_uInt16 ImpEditEngine::SplitTextPortion( 
ParaPortion* pPortion, sal_uInt16 nP
 return nSplitPortion;
 }
 
-void ImpEditEngine::CreateTextPortions( ParaPortion* pParaPortion, sal_uInt16 
rStart /* , sal_Bool bCreateBlockPortions */ )
+void ImpEditEngine::CreateTextPortions( ParaPortion* pParaPortion, sal_uInt16 
rStart )
 {
 sal_uInt16 nStartPos = rStart;
 ContentNode* pNode = pParaPortion-GetNode();
 DBG_ASSERT( pNode-Len(), CreateTextPortions should not be used for empty 
paragraphs! );
 
-SortedPositions aPositions;
-aPositions.Insert( (sal_uInt32) 0 );
+::std::set sal_uInt32  aPositions;
+aPositions.insert( 0 );
 
 sal_uInt16 nAttr = 0;
 EditCharAttrib* pAttrib = GetAttrib( pNode-GetCharAttribs().GetAttribs(), 
nAttr );
@@ -2267,23 +2265,23 @@ void ImpEditEngine::CreateTextPortions( ParaPortion* 
pParaPortion, sal_uInt16 r
 {
 // Insert Start and End into the Array...
 // The Insert method does not allow for duplicate values
-aPositions.Insert( pAttrib-GetStart() );
-aPositions.Insert( pAttrib-GetEnd() );
+aPositions.insert( pAttrib-GetStart() );
+aPositions.insert( pAttrib-GetEnd() );
 nAttr++;
 pAttrib = GetAttrib( pNode-GetCharAttribs().GetAttribs(), nAttr );
 }
-aPositions.Insert( pNode-Len() );
+aPositions.insert( pNode-Len() );
 
 if ( pParaPortion-aScriptInfos.empty() )
 ((ImpEditEngine*)this)-InitScriptTypes( GetParaPortions().GetPos( 
pParaPortion ) );
 
 const ScriptTypePosInfos rTypes = pParaPortion-aScriptInfos;
 for ( size_t nT = 0; nT  rTypes.size(); nT++ )
-aPositions.Insert( rTypes[nT].nStartPos );
+aPositions.insert( rTypes[nT].nStartPos );
 
 const WritingDirectionInfos rWritingDirections = 
pParaPortion-aWritingDirectionInfos;
 for ( size_t nD = 0; nD  rWritingDirections.size(); nD++ )
-aPositions.Insert( rWritingDirections[nD].nStartPos );
+aPositions.insert( rWritingDirections[nD].nStartPos );
 
 if ( mpIMEInfos  mpIMEInfos-nLen  mpIMEInfos-pAttribs  ( 
mpIMEInfos-aPos.GetNode() == pNode ) )
 {
@@ -2292,11 +2290,11 @@ void ImpEditEngine::CreateTextPortions( ParaPortion* 
pParaPortion, sal_uInt16 r
 {
 if ( mpIMEInfos-pAttribs[n] != nLastAttr )
 {
-aPositions.Insert( mpIMEInfos-aPos.GetIndex() + n );
+aPositions.insert( mpIMEInfos-aPos.GetIndex() + n );
 nLastAttr = mpIMEInfos-pAttribs[n];
   

[Bug 37361] LibreOffice 3.5 most annoying bugs

2012-02-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=37361

--- Comment #207 from tommy27 ba...@quipo.it 2012-02-29 02:18:50 PST ---
@Raphaël
I think that all 3.4 most annying bugs the will not be fixed in LibO 3.4.6
(last release of the 3.4.x series) will be then moved into the 3.5 list

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


dropping STAR_ENABLE_FILE_LOCKING environmental variable

2012-02-29 Thread Caolán McNamara
digging around I came across getenv(STAR_ENABLE_FILE_LOCKING) in
tools. I was aware of SAL_ENABLE_FILE_LOCKING, but unaware of
STAR_ENABLE_FILE_LOCKING

We don't seem to have documented STAR_ENABLE_FILE_LOCKING anywhere, and
random web searches don't seem to show that its generally known, 

Any uses of it, e.g. now defunct
http://cgit.freedesktop.org/libreoffice/build/tree/patches/dev300/ubuntu-soffice-config.diff?h=ooo-build-3-2
are of the form of
export STAR_ENABLE_FILE_LOCKING=0
which looks like it attempts to *disable* it, even though actually
setting the variable, regardless of what value its set to, would
*enable* it.

I reckon we should drop the stuff that's hooked off
getenv(STAR_ENABLE_FILE_LOCKING), any protest against that ?

C.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: String literals, ASCII vs UTF-8

2012-02-29 Thread Stephan Bergmann

On 02/28/2012 02:39 PM, Stephan Bergmann wrote:

On 02/28/2012 12:30 PM, Lubos Lunak wrote:

PS: Any idea why ' OUString foo() { return foo;} ' does not work, even
though the ctor is not explicit? I can't recall a reason why a return
value
would need to be different from the other cases.


Looks like a GCC error to me.

struct S { S(char const ()[2]); };
S f() { return a; }

compiles just fine with recent Clang and
http://comeaucomputing.com/tryitout/, but fails with

could not convert ‘(const char*)a’ from ‘const char*’ to ‘S’

on GCC.


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41426

Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Question: How do I rasterize an SVG to a BitmapEx

2012-02-29 Thread Thorsten Behrens
Andrew Higginson wrote:
 So if I am getting the SVG from the brand/ folder in the galaxy icon theme,
 what should I use to read it?
 
Hi Andrew,

ok, some code pointers - look into vcl/source/app/brand.cxx,
Application::LoadBrandBitmap() on how to get to the brand dir - note
those $BRAND_BASE_DIR/program...  macros.

For actual reading, you'd probably want to use osl::File (in
osl/file.hxx), see e.g.
xmlhelp/source/cxxhelp/provider/inputstream.cxx for how to operate
it (open, read, getSize, close etc).

Create a local vectorsal_uInt8 of the appropriate size to read the
svg into then.

HTH,

-- Thorsten


pgpJwyI4xCQKz.pgp
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: dropping STAR_ENABLE_FILE_LOCKING environmental variable

2012-02-29 Thread Michael Meeks

On Wed, 2012-02-29 at 10:23 +, Caolán McNamara wrote:
 We don't seem to have documented STAR_ENABLE_FILE_LOCKING anywhere, and
 random web searches don't seem to show that its generally known, 

:-)

 Any uses of it, e.g. now defunct
 http://cgit.freedesktop.org/libreoffice/build/tree/patches/dev300/ubuntu-soffice-config.diff?h=ooo-build-3-2
 are of the form of
 export STAR_ENABLE_FILE_LOCKING=0
 which looks like it attempts to *disable* it, even though actually
 setting the variable, regardless of what value its set to, would
 *enable* it.

Wow:

   if ( pFileLockEnvVar == (char*)1 )
pFileLockEnvVar = getenv(STAR_ENABLE_FILE_LOCKING);
if ( ! pFileLockEnvVar )
return sal_True;
... actually implement LockRange ...

seems to suggest we've not really been doing hard locking on unix
there, but only internal / advisory locking from:

sal_Bool InternalStreamLock::LockFile( sal_Size nStart, sal_Size nEnd, 
SvFileStream* pStream )

Wow :-) Anyhow - it'd be really lovely to get this mess in tools sorted
out and ported over to use the sal file / directory abstraction.

 I reckon we should drop the stuff that's hooked off
 getenv(STAR_ENABLE_FILE_LOCKING), any protest against that ?

No protest here :-) looks like it cleans a chunk of code out of tools/
for the most part ?

ATB,

Michael.

-- 
michael.me...@suse.com  , Pseudo Engineer, itinerant idiot

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Using a real parser generator to parse numbers (and dates)

2012-02-29 Thread Lionel Elie Mamane
In the context of fdo#41166 (a bug in how our numbers/date parser
handles ambiguities), I thought wouldn't it be better if we used a
proper parser generator and wrote a proper grammar instead of a
hand-coded parser? It would be easier to debug, easier to maintain,
easier to read, ... and thus probably less buggy in the long run.

Well, I've a good proof of concept start on making it a
Boost::Spirit grammar. I've chosen Boost::Spirit because:

1) It is a *dynamic* parser generator, that is the grammar can be
   constructed at runtime. That's a requirement for us, for i18n
   reasons.

2) It is in Boost, so no new external dependency: we already require
   Boost.


The patch is attached so that you can get an idea. Alas, it is
polluted by the fact I converted everything to rtl::OUString from
tools::String. It is against libreoffice-3-5 simply because that's my
current main dogfood / development branch these days. I'm *not*
suggesting we do the change in libreoffice-3-5, only in master!

Highlights:

1) Yes, it works on the basis of UCS4 codepoints, so no problem with
   UTF-16 surrogate pairs.

2) I add a const_iterator interface to rtl::OUString. Instead of
   coding it manually to use iterateCodePoints, I again reuse the
   power of boost. But I have in my git history a manually-coded
   version based on iterateCodePoints if for some reason it is
   desirable (I don't think it is).

   That's also more generally a more C++ natural interface to
   OUStrings, so we can use it throughout our codebase instead of
   iterateCodePoints.

   I don't define an iterator interface, as this could be *extremely*
   slow: writing one character in the middle of a string is O(n)
   (linear in the length of the string) when replacing a
   surrogates-encoded codepoint by a non-surrogate encoded one and
   vice-versa.

3) For now, it does not replace the old parser, but just does a
   parallel parse and displays the result of the parse to stderr for
   demonstration / debugging purposes.

4) Yes, this is heavily template / metaprogramming based and
   compilation time is significant. But it is only this one file.

5) I've stuck the LibreOffice-Spirit integration in
   svl/source/numbers/spirit/, but possibly we could move it to a more
   general location (sal/rtl?) so that it can be reused in other parts
   of LibreOffice.

   For now, I'm using only the teach rtl::OUString to spirit part of
   the integration, so only that one is in the patch.

   But there is also a use the character classes notions of
   unotools/charclass.hxx instead of the spirit ones, which I
   attach as separate files. A character class is something like
   Alpha, AlphaNumeric, Letter, ... In particular, the notions
   in unotools are language-dependent. However, I find the coverage
   rather spotty. For example, there is no is this character a
   whitespace predicate... So we would have to complement from the
   native spirit notions anyway?

   I'm not sure we will need it, since the current parser basically
   does not use these character classifications at all: it only uses
   toUpper to make things case-insensitive.

5) The grammar itself is in struct
   ImpSvNumberInputScan::number_grammar. That's where you should
   look.

   Let's look for example at a simple, yet internationalised example,
   booleans:

   const ImpSvNumberformatScan* pFS = parent.pFormatter-GetFormatScanner();

   ::rtl::OUString sTrue (pFS-GetTrueString());
   ::rtl::OUString sFalse(pFS-GetTrueString());
   rBoolean =   (qi::lit(sTrue)   qi::eoi) [ ref(fOutNumber) =  1, 
ref(parent.eScannedType) = NUMBERFORMAT_LOGICAL ]
  | (qi::lit(sFalse)  qi::eoi) [ ref(fOutNumber) = -1, 
ref(parent.eScannedType) = NUMBERFORMAT_LOGICAL ];

   A boolean is a either a lit(eral) sTrue or a literal sFalse, and
   sTrue and sFalse are runtime values. For sTrue, 1 is written in
   fOutNumber, for sFalse, -1 is written. In Both cases,
   NUMBERFORMAT_LOGICAL is written in eScannedType. Hmm... I could
   have factorised that, as in:

   rBoolean = (   (qi::lit(sTrue)   qi::eoi) [ ref(fOutNumber) =  1 ]
| (qi::lit(sFalse)  qi::eoi) [ ref(fOutNumber) = -1 ] )
  eoi [ ref(parent.eScannedType) = NUMBERFORMAT_LOGICAL ]


   For a more complicated example, see dates:

   rDate = -dow 
   (   ( eps [ reset_date(pCal) ]  rISO8601  eoi )
 | rPlainDate )
 eoi [ ref(parent.eScannedType) = NUMBERFORMAT_DATE,
 ref(fOutNumber) =  make_date(parent.pNullDate, ref(pCal)) ];

   A date is an optional day-of-week (the - means optional)
   followed by either a ISO8601 date or a (localised) plain date.

   A plain date is:

   if ( true /* DMY format */ )
   rPlainDate =
 ( eps [ reset_date(pCal) ]  rDayOfMonth  -rDateSep  rMonth 
 eoi )
   | ( eps [ reset_date(pCal) ]  rMonth  -rDateSep  rYear  eoi )
   | ( eps [ reset_date(pCal) ]  rDayOfMonth  -rDateSep  rMonth  
 -rDateSep  rYear  eoi );
   else /* MDY 

Re: [REVIEW 3-5, 3-5-1] Make libxslt link the right libxml on mac ppc

2012-02-29 Thread Alexander Thurgood
Le 28/02/12 21:17, Stephan Bergmann a écrit :

Hi Stephan,

 
 But that is inside an .IF $(OS)==WNT block, isn't it?  Also, at
 least for my Mac OS X 10.6 x86 tests, the existing libxslt/makefile.mk
 seemed to already work fine with --without-system-libxml (probably due
 to the
 

My build on OSX Server 10.6.8 (x86) (default setup, no ports, etc) has
been failing for the last 2 days in libxslt, cf. attached log file.


Alex
if [ -f ./unxmacxi.pro/misc/build/libxslt-1.1.26.exists ] ; then mv 
./unxmacxi.pro/misc/build/libxslt-1.1.26 
./unxmacxi.pro/misc/build/libxslt-1.1.26_removeme ; fi
make writeable...
patching file libxslt-1.1.26/config.sub
patching file libxslt-1.1.26/ltmain.sh
patching file libxslt-1.1.26/xslt-config.in
patching file libxslt-1.1.26/configure
patching file libxslt-1.1.26/win32/configure.js
patching file libxslt-1.1.26/ltmain.sh
patching file libxslt-1.1.26/libxslt/libxslt.syms
patching file libxslt-1.1.26/config.guess
patching file libxslt-1.1.26/win32/Makefile.msvc
configure: WARNING: unrecognized options: --enable-ipv6, --with-sax1
checking build system type... i386-apple-darwin10.8.0
checking host system type... i386-apple-darwin10.8.0
checking for gcc... ccache gcc-4.0
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether ccache gcc-4.0 accepts -g... yes
checking for ccache gcc-4.0 option to accept ISO C89... none needed
checking how to run the C preprocessor... ccache gcc-4.0 -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking dependency style of ccache gcc-4.0... gcc3
checking for library containing strerror... none required
checking for gcc... (cached) ccache gcc-4.0
checking whether we are using the GNU C compiler... (cached) yes
checking whether ccache gcc-4.0 accepts -g... (cached) yes
checking for ccache gcc-4.0 option to accept ISO C89... (cached) none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking how to run the C preprocessor... ccache gcc-4.0 -E
checking for rm... /bin/rm
checking for mv... /bin/mv
checking for tar... /usr/bin/tar
checking for xmllint... /Users/Shared/LO/master/solver/unxmacxi.pro/bin/xmllint
checking for xsltproc... /usr/bin/xsltproc
checking for ANSI C header files... (cached) yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by ccache gcc-4.0... 
/usr/libexec/gcc/i686-apple-darwin10/4.0.1/ld
checking if the linker (/usr/libexec/gcc/i686-apple-darwin10/4.0.1/ld) is GNU 
ld... no
checking for BSD- or MS-compatible name lister (nm)... nm
checking the name lister (nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands +=... yes
checking for /usr/libexec/gcc/i686-apple-darwin10/4.0.1/ld option to reload 
object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse nm output from ccache gcc-4.0 object... ok
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if ccache gcc-4.0 supports -fno-rtti -fno-exceptions... no
checking for ccache gcc-4.0 option to produce PIC... -fno-common -DPIC
checking if ccache gcc-4.0 PIC flag -fno-common -DPIC works... yes
checking if ccache gcc-4.0 static flag -static works... no
checking if ccache gcc-4.0 supports -c -o file.o... rm: conftest*: No such file 
or directory
yes
checking if ccache gcc-4.0 supports 

Re: String literals, ASCII vs UTF-8

2012-02-29 Thread Stephan Bergmann

On 02/29/2012 10:57 AM, Michael Meeks wrote:

Having said all this - I think we can agree that if we are calling this
new 'createFromAscii_WithLength' method - which is (currently) only
called during these magic constructors for compile time constants, that
the chance of having a 4Gb compile-time constant string in the source is
somewhat minimal ;-) and that there is certainly no need to throw an
exception and bloat the call-sites for this case at least.


I don't really think we can agree here.  ;)  As long as the bloat is 
only alleged, I see no reason to abandon clean coding practices (i.e., 
checking C function return values for error indicators).  If you are 
unhappy with throw std::bad_alloc;, maybe we can settle for 
std::abort(); instead?


Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


EasyHack: perl / autogen.sh should backup autogen.lastrun

2012-02-29 Thread Thomas Collerton
Hello all,
this patch accomplishes what the EasyHack requests =)
From f8d4e76d5ac123264f22a79ecf6dcc766c3bab5d Mon Sep 17 00:00:00 2001
From: Thomas Collerton tom.col...@gmail.com
Date: Wed, 29 Feb 2012 11:50:02 +0100
Subject: [PATCH] fdo#46565: perl / autogen.sh should backup autogen.lastrun

---
 autogen.sh |4 
 1 file changed, 4 insertions(+)

diff --git a/autogen.sh b/autogen.sh
index d41ccdd..2133d07 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -144,6 +144,10 @@ if (defined $ENV{NOCONFIGURE}) {
 # Save autogen.lastrun only if we did get some arguments on the command-line
 if (@ARGV) {
 if (scalar(@cmdline_args)  0) {
+# if there's already an autogen.lastrun, make a backup first
+if (-e autogen.lastrun) {
+system(cp autogen.lastrun autogen.lastrun.bak);
+}
 # print writing args to autogen.lastrun\n;
 my $fh;
 open ($fh, autogen.lastrun) || die can't open autogen.lastrun: $!;
-- 
1.7.9.2

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Trying to understand why LO seems freezed for some seconds when a module is started

2012-02-29 Thread Alexander Thurgood
Le 28/02/12 11:56, Michael Meeks a écrit :

Hi all,


   It'd be great to get a bug opened to collect the detailed information
 on this. Clearly we don't want such delays when you start typing.
 


Just to add my 2c worth, I can also confirm that this happens on Mac
too, and always on first data entry, i.e. when the keys to type
something in are first pressed, be it a document, a filename entry,
renaming in a dialog, etc. On Mac, you get a nice spinning beachball for
a couple of seconds, then LO suddenly springs to life and enters the
characters that have been typed in (or at least those that made it into
the buffer).


Alex

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[protoPATCH] safe numeric casts with explicit min/max

2012-02-29 Thread Lionel Elie Mamane
Background: we have in sc/source/filter/inc/ftools.hxx supposedly
safe casts that are (according to the Doxygen documentation)
supposed to be safer than just static_cast. As fdo#39589 uncovered,
they are actually so buggy as to be *less* safe.

Back in November, I wrote a prototype _actually_ safe versions, but
got sidetracked and forgot about them. I'm unearthing them again now,
attached.

The big remaining issue is that it is a WaE disaster on warning:
comparison between signed and unsigned, because the compiler does not
notice that these comparisons are done under scope of if/else
conditions that make them safe. Also warning: test will always be
true/false, since the code covers all cases and not all cases make
sense for all combinations of A,B in cast a value of type A to type
B: the idea is for the compiler to prune away if/else branches that
will not be hit.

The comparison between signed and unsigned warnings cannot be easily
silenced by explicit casts, because the code makes use of the
compiler's automatic 'the smaller type is promoted to the bigger type'
rules. We could instead reimplement that logic manually, but I'm
rather loathe on making the code more complicated just to avoid
spurious warnings.

So maybe we could selectively disable the warnings on this file
instead? Someone knows how to do that with gcc and with MSVC?

As I wrote in November:

 That thing is devilishly hard to get right... I think I have a
 correct version now, (...)

But IMHO it needs to be unittest-ed deeply before commit.

-- 
Lionel
#include X11/Xlibint.h
#include limits
#include memory

#include stdio.h

// assumptions:
// \forall typename Type:
// ( (::std::numeric_limits Type ::min() == 0) XOR ( ::std::numeric_limits Type ::min()  0   ::std::numeric_limits Type ::is_signed ))
//   (::std::numeric_limits Type ::max()  0 )

// signed unbound types are unbound towards both infinities

template typename ReturnType, typename Type 
inline ReturnType ulimit_cast( Type nValue, ReturnType nMax )
{
  if ( ! ::std::numeric_limits ReturnType ::is_signed  ::std::numeric_limits Type ::is_signed  nValue  0 )
// nValue cannot be represented in ReturnType - return nMax
// We could have returned 0, but ulimit_cast (Type nValue) depends on this behaviour
return nMax;
  else if ( nMax  0  nValue = 0 )
return nMax;
  else if ( ! ::std::numeric_limits ReturnType ::is_bounded )
return ::std::minReturnType(static_castReturnType(nValue), nMax);
  // Due to implicit type conversion, the comparison in the if occurs in the type
  // that has the biggest ::max()
  // - safe, because case (nMax  0  Type is unsigned) is already excluded
  else if ( nMax   ::std::numeric_limits Type ::max() )
// nValue = ::std::numeric_limits Type ::max()  nMax,
// and it is unsafe to compare nMax to nValue within Type:
// nMax would be converted with loss
return static_cast  ReturnType (nValue);
  else
// nMax fits in Type; safe to compare to nValue within Type
return static_cast ReturnType (::std::minType(nValue, nMax));
}

/* if ( (nValue  0)  (nValue  ::std::numeric_limits ReturnType ::min()) )
 return nMax
   else
 return cast(minType ( nValue, nMax ))
 */


template typename ReturnType, typename Type 
inline ReturnType ulimit_cast( Type nValue )
{
  return ulimit_cast( nValue, ::std::numeric_limits ReturnType ::max() );
}

template typename ReturnType, typename Type 
inline ReturnType llimit_cast( Type nValue, ReturnType nMin )
{ return static_cast ReturnType ( ::std::max Type ( nValue, nMin ) ); }

template typename ReturnType, typename Type 
inline ReturnType llimit_cast( Type nValue )
{ return llimit_cast( nValue, ::std::numeric_limits ReturnType ::min() ); }

template typename ReturnType, typename Type 
inline ReturnType limit_cast( Type nValue, ReturnType nMin, ReturnType nMax )
{
  // First two cases: problematic cases in signed-unsigned casts
  if ( nMin = 0  nValue  0 )
return nMin;
  else if ( nValue = 0  nMax  0 )
return nMax;
  else if ( ! ::std::numeric_limits ReturnType ::is_bounded )
return ::std::minReturnType(::std::max(static_castReturnType(nValue), nMin), nMax);
  else
  {
// We first take care of nMax
/* comparison safe because (nMax  0  Type unsigned) already handled */
if ( nMax = ::std::numeric_limits Type ::max() )
{
  if ( nMax  0 
	   /* Type is necessarily signed */
	   nMax  ::std::numeric_limits Type ::min() )
	// nValue = ::std::numeric_limits Type ::min()  nMax
	return nMax;
  else
	// safe to compare within Type
	nValue = ::std::min Type ( nValue, static_cast Type (nMax) );
}
/* else nValue = ::std::numeric_limits Type ::max() = nMax */
// Now nValue = nMax
// We take care of nMin
if ( nMin = 0 )
{
  // nValue = 0 because nMax = nMin = 0 and case (nValue  0  nMin =0) is already handled
  // thus no signedness issues
  if ( nMin = ::std::numeric_limits Type ::max() )
	nValue = ::std::max Type ( nValue, 

[Bug 37361] LibreOffice 3.5 most annoying bugs

2012-02-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=37361

Bug 37361 depends on bug 39026, which changed state.

Bug 39026 Summary: Recent Documents list does not work
https://bugs.freedesktop.org/show_bug.cgi?id=39026

   What|Old Value   |New Value

 Resolution|FIXED   |
 Status|RESOLVED|REOPENED

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Using a real parser generator to parse numbers (and dates)

2012-02-29 Thread julien2412
Just for the remind but perhaps you had already noticed the Boost version
included in LO is 1.44
There's a flag in autogen to use Boost from system (--with-system-boost) see
thread http://nabble.documentfoundation.org/About-Boost-1-48-td3757059.html.

There's the Spirit history here :
http://www.boost.org/doc/libs/1_49_0/libs/spirit/doc/html/index.html
Certainly Spirit doesn't change its whole API every day but if you develop
with Boost::spirit, you've got to have this in mind (but certainly I suppose
it's already the case :-)).

Julien.


--
View this message in context: 
http://nabble.documentfoundation.org/Using-a-real-parser-generator-to-parse-numbers-and-dates-tp3786870p3786933.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [PATCH] convert SV_DECL_PTRARR_DEL to boost::ptr_vector in sc/inc/viewuno.hxx

2012-02-29 Thread Noel Grandin

Hi

New patch with recommended fixes attached.

I wonder, would it not be better to convert this type of listener-list 
thing to boost::ptr_set?

- no chance of accidentally adding duplicates
- O(1) deletion

Regards, Noel Grandin

On 2012-02-24 18:33, Ivan Timofeev wrote:

Hi Noel,


From: Noel Grandin noel@ubuntu.(none)

Do you really want to be @ubuntu.(none)? If not, use
 $ git config --global user.email your_address_here


-for ( sal_uInt16 n=0; naActivationListeners.Count(); n++ )
+for (XActivationEventListenerVector::iterator it = 
aActivationListeners.begin(); it != aActivationListeners.end(); ++it)

 {
 try
 {
-
(*aActivationListeners[n])-activeSpreadsheetChanged( aEvent );

+(*it)-activeSpreadsheetChanged( aEvent );
 }
 catch( uno::Exception )
 {
-aActivationListeners.DeleteAndDestroy( n );
---n; // because it will be increased again in the loop
+it = aActivationListeners.erase( it);
 }
 }


'erase' returns an iterator to the *following* element, and that 
element will be skipped by ++it; we must not increment the iterator 
after erase.

I don't know what is the most common idiom for this case, my proposal is

-for ( sal_uInt16 n=0; naActivationListeners.Count(); n++ )
+for (XActivationEventListenerVector::iterator it = 
aActivationListeners.begin(); it != aActivationListeners.end(); )

 {
 try
 {
-(*aActivationListeners[n])-activeSpreadsheetChanged( 
aEvent );

+(*it)-activeSpreadsheetChanged( aEvent );
+++it;
 }
 catch( uno::Exception )
 {
-aActivationListeners.DeleteAndDestroy( n );
---n; // because it will be increased again in the loop
+it = aActivationListeners.erase( it);
 }
 }


Similarly, in the following example


-sal_uInt16 nCount = aMouseClickHandlers.Count();
-for ( sal_uInt16 n=nCount; n--; )
+sal_uInt16 nCount = aMouseClickHandlers.size();
+for (XMouseClickHandlerVector::iterator it = 
aMouseClickHandlers.begin(); it != aMouseClickHandlers.end(); ++it)

 {
-uno::Referenceawt::XEnhancedMouseClickHandler *pObj = 
aMouseClickHandlers[n];

+uno::Referenceawt::XEnhancedMouseClickHandler *pObj = (*it);
 if ( *pObj == aListener )
-aMouseClickHandlers.DeleteAndDestroy( n );
+it = aMouseClickHandlers.erase(it);
 }


should be

-sal_uInt16 nCount = aMouseClickHandlers.Count();
-for ( sal_uInt16 n=nCount; n--; )
+sal_uInt16 nCount = aMouseClickHandlers.size();
+for (XMouseClickHandlerVector::iterator it = 
aMouseClickHandlers.begin(); it != aMouseClickHandlers.end();)

 {
-uno::Referenceawt::XEnhancedMouseClickHandler *pObj = 
aMouseClickHandlers[n];

+uno::Referenceawt::XEnhancedMouseClickHandler *pObj = (*it);
 if ( *pObj == aListener )
-aMouseClickHandlers.DeleteAndDestroy( n );
+it = aMouseClickHandlers.erase(it);
+else
+++it;
 }

or maybe it would be better without pObj:

-sal_uInt16 nCount = aMouseClickHandlers.Count();
-for ( sal_uInt16 n=nCount; n--; )
+sal_uInt16 nCount = aMouseClickHandlers.size();
+for (XMouseClickHandlerVector::iterator it = 
aMouseClickHandlers.begin(); it != aMouseClickHandlers.end();)

 {
-uno::Referenceawt::XEnhancedMouseClickHandler *pObj = 
aMouseClickHandlers[n];

-if ( *pObj == aListener )
-aMouseClickHandlers.DeleteAndDestroy( n );
+if ( *it == aListener )
+it = aMouseClickHandlers.erase(it);
+else
+++it;
 }

Also, I *think* changing the loop order (descending-ascending) is 
safe here, so



-sal_uInt16 nCount = aPropertyChgListeners.Count();
-for ( sal_uInt16 n=nCount; n--; )
+for (size_t i = aPropertyChgListeners.size(); i--; )


may be converted to a iterator-based loop as well. Or is that intended?

Regards,
Ivan



Disclaimer: http://www.peralex.com/disclaimer.html




convert-viewuno-to-ptr-vector.patch
Description: application/mbox
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [PATCH] fdo#46343 fix opening of 8-bit encoded filenames

2012-02-29 Thread Michael Meeks

On Tue, 2012-02-28 at 20:59 +0100, Andras Timar wrote:
 The attached patch is from bugzilla, Alex Prokofiev made it. It looks
 OK to me, but I'd like to ask a 2nd review before push.
 
 https://bugs.freedesktop.org/show_bug.cgi?id=46434

Looks ok to me; the problem is that we might give people the idea that
not using UTF-8 for file-names everywhere is a supported and/or
legitimate configuration option - when it is -emphatically- not :-)

And I believe Stephan is cleaning up this area himself.

HTH,

Michael.

-- 
michael.me...@suse.com  , Pseudo Engineer, itinerant idiot

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: EasyHack: perl / autogen.sh should backup autogen.lastrun

2012-02-29 Thread Michael Meeks
Hi there,

On Wed, 2012-02-29 at 11:58 +0100, Thomas Collerton wrote:
 this patch accomplishes what the EasyHack requests =)

Thanks - pushed it :-)

Personally, I'd have split out the 'write_args' type functionality
below that into a method of it's own, and added a read_args / write_args
pair - so that all the I/O is in perl rather than a system forked
whatnot but ... ! :-) I'm paranoid too - we should have cp around on all
systems that run this.

Ta. very much, can you close the bug ?

Thanks,

Michael.

-- 
michael.me...@suse.com  , Pseudo Engineer, itinerant idiot

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [PUSHED:3-5-1] PostgreSQL regression wrt 3.5.0: privileges via groups

2012-02-29 Thread Lionel Elie Mamane
On Mon, Feb 27, 2012 at 11:01:56PM +0100, Michael Stahl wrote:
 On 27/02/12 14:16, Michael Meeks wrote:
 On Mon, 2012-02-27 at 13:45 +0100, Lionel Elie Mamane wrote:

 Forgot to regenerate the patch after last-minute fix before sending
 email... Missing closing parenthesis in previous patch. New patch
 attached.

  :-) so, since you're the expert here, and the patch looks sane
 to me - I pushed to libreoffice-3-5 - thanks for that.

 + 1 from me for 3-5-1

And a +1 from Norbert on IRC makes three. I pushed to
libreoffice-3-5-1.

-- 
Lionel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Using a real parser generator to parse numbers (and dates)

2012-02-29 Thread Lionel Elie Mamane
On Wed, Feb 29, 2012 at 03:24:33AM -0800, julien2412 wrote:
 Just for the remind but perhaps you had already noticed the Boost version
 included in LO is 1.44
 There's a flag in autogen to use Boost from system (--with-system-boost) see
 thread http://nabble.documentfoundation.org/About-Boost-1-48-td3757059.html.

My thoughts were along the lines of we can just bump the internal
Boost version if that is necessary. From
http://bugs.debian.org/652681 I see it might require a more recent
gcc, although it is not clear whether 4.4/4.5 would have the same bug
or if it was newly introduced in 4.6 :-|

If it absolutely requires 4.6, then it might be a problem.

If 4.4/4.5 are OK, but only 4.6.0-4.6.9 are to be blacklisted, I'd
argue it is not a significant problem.

I *also* assume that Boost avoids breaking with MSVC :)

-- 
Lionel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: python gdb plugin traceback: No type named sal_uInt16.

2012-02-29 Thread Michael Meeks
Hi Riccardo,

On Wed, 2012-02-29 at 09:23 +0100, Riccardo Magliocchetti wrote:
 i have this traceback every time i open a core. It does not harm but it 
 is a bit annoying. Does anyone have a clue on how to fix that?

I guess the code is in solenv/gdb/libreoffice/

 #1  0x7f1648443b0b in __GI_abort () at abort.c:92
  save_stage = 2
  act = Traceback (most recent call last):
File /home/rm/src/libo/solenv/gdb/libreoffice/util/printing.py, 
 line 123, in __call__
  printer = self.func_lookup[val.type]
File /home/rm/src/libo/solenv/gdb/libreoffice/util/printing.py, 
 line 95, in __getitem__
  if test(type):
File /home/rm/src/libo/solenv/gdb/libreoffice/svl.py, line 89, in query
  ushort = gdb.lookup_type('sal_uInt16')
 RuntimeError: No type named sal_uInt16.

I imagine that nothing was built with any debugging information, and as
such we don't know about the sal_uInt16 type. Perhaps catching and
handling the relevant RuntimeError (?) exception in the gdb python
helpers might help ?

Thanks,

Michael.

-- 
michael.me...@suse.com  , Pseudo Engineer, itinerant idiot

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [protoPATCH] safe numeric casts with explicit min/max

2012-02-29 Thread Caolán McNamara
On Wed, 2012-02-29 at 12:13 +0100, Lionel Elie Mamane wrote:
 Background: we have in sc/source/filter/inc/ftools.hxx supposedly
 safe casts that are (according to the Doxygen documentation)
 supposed to be safer than just static_cast. As fdo#39589 uncovered,
 they are actually so buggy as to be *less* safe.
 
 Back in November, I wrote a prototype _actually_ safe versions, but
 got sidetracked and forgot about them. I'm unearthing them again now,
 attached.

It might be a little orthogonal to just the cast issue, but I wonder if 

Cert's IntegerLib or SafeInt (http://safeint.codeplex.com/) or somesuch
(https://bugzilla.mozilla.org/show_bug.cgi?id=555798) covers the same
ground and is license-suitable as a drop in ?

C.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Bug 37361] LibreOffice 3.5 most annoying bugs

2012-02-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=37361

Bug 37361 depends on bug 39026, which changed state.

Bug 39026 Summary: Recent Documents list does not work
https://bugs.freedesktop.org/show_bug.cgi?id=39026

   What|Old Value   |New Value

 Status|REOPENED|NEEDINFO
 Resolution||FIXED
 Status|NEEDINFO|RESOLVED

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: python gdb plugin traceback: No type named sal_uInt16.

2012-02-29 Thread Michael Stahl
On 29/02/12 12:48, Michael Meeks wrote:
 Hi Riccardo,
 
 On Wed, 2012-02-29 at 09:23 +0100, Riccardo Magliocchetti wrote:
 i have this traceback every time i open a core. It does not harm but it 
 is a bit annoying. Does anyone have a clue on how to fix that?
 
   I guess the code is in solenv/gdb/libreoffice/
 
 #1  0x7f1648443b0b in __GI_abort () at abort.c:92
  save_stage = 2
  act = Traceback (most recent call last):
File /home/rm/src/libo/solenv/gdb/libreoffice/util/printing.py, 
 line 123, in __call__
  printer = self.func_lookup[val.type]
File /home/rm/src/libo/solenv/gdb/libreoffice/util/printing.py, 
 line 95, in __getitem__
  if test(type):
File /home/rm/src/libo/solenv/gdb/libreoffice/svl.py, line 89, in query
  ushort = gdb.lookup_type('sal_uInt16')
 RuntimeError: No type named sal_uInt16.
 
   I imagine that nothing was built with any debugging information, and as
 such we don't know about the sal_uInt16 type. Perhaps catching and
 handling the relevant RuntimeError (?) exception in the gdb python
 helpers might help ?

the gdb in Fedora 16 has these turned off by default, with an option to
turn them on (which is very useful when debugging the pretty printers):
set python print-stack

perhaps you have that turned on somehow, or you have an older gdb that
has it hard-wired enabled.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Using a real parser generator to parse numbers (and dates)

2012-02-29 Thread Rene Engelhard
Hi,

On Wed, Feb 29, 2012 at 12:48:16PM +0100, Lionel Elie Mamane wrote:
 On Wed, Feb 29, 2012 at 03:24:33AM -0800, julien2412 wrote:
  Just for the remind but perhaps you had already noticed the Boost version
  included in LO is 1.44
  There's a flag in autogen to use Boost from system (--with-system-boost) see
  thread http://nabble.documentfoundation.org/About-Boost-1-48-td3757059.html.
 
 My thoughts were along the lines of we can just bump the internal
 Boost version if that is necessary. From
 http://bugs.debian.org/652681 I see it might require a more recent
 gcc, although it is not clear whether 4.4/4.5 would have the same bug
 or if it was newly introduced in 4.6 :-|

As (implicitely( said in this bug this started to appear with 4.6.2-9 and isn't
there  anymore in 4.6.2-12. So probably some temporary gcc_4_6-branch breakage.
(yeah, I like Debians nonsensical gcc package versioning without doing
mentioning 4.6.2~MMDD or so)

 If 4.4/4.5 are OK, but only 4.6.0-4.6.9 are to be blacklisted, I'd
 argue it is not a significant problem.

I think so, yes.

Regards,

Rene
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: python gdb plugin traceback: No type named sal_uInt16.

2012-02-29 Thread Riccardo Magliocchetti

Hi Michael, Michael,

Il 29/02/2012 13:02, Michael Stahl ha scritto:

On 29/02/12 12:48, Michael Meeks wrote:

Hi Riccardo,

On Wed, 2012-02-29 at 09:23 +0100, Riccardo Magliocchetti wrote:

i have this traceback every time i open a core. It does not harm but it
is a bit annoying. Does anyone have a clue on how to fix that?


I guess the code is in solenv/gdb/libreoffice/



#1  0x7f1648443b0b in __GI_abort () at abort.c:92
  save_stage = 2
  act = Traceback (most recent call last):
File /home/rm/src/libo/solenv/gdb/libreoffice/util/printing.py,
line 123, in __call__
  printer = self.func_lookup[val.type]
File /home/rm/src/libo/solenv/gdb/libreoffice/util/printing.py,
line 95, in __getitem__
  if test(type):
File /home/rm/src/libo/solenv/gdb/libreoffice/svl.py, line 89, in query
  ushort = gdb.lookup_type('sal_uInt16')
RuntimeError: No type named sal_uInt16.


I imagine that nothing was built with any debugging information, and as
such we don't know about the sal_uInt16 type. Perhaps catching and
handling the relevant RuntimeError (?) exception in the gdb python
helpers might help ?


Ah! i thought it was something related to that specific type, i'll take 
a look at catching the exception then.



the gdb in Fedora 16 has these turned off by default, with an option to
turn them on (which is very useful when debugging the pretty printers):
set python print-stack

perhaps you have that turned on somehow, or you have an older gdb that
has it hard-wired enabled.


Is it?
$ gdb -v
GNU gdb (Ubuntu/Linaro 7.3-0ubuntu2) 7.3-2011.08

Thanks

--
Riccardo Magliocchetti
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [REVIEW 3-5][PATCH] Fix leap year calculation

2012-02-29 Thread Eike Rathke
Hi Kohei,

On Tuesday, 2012-02-28 22:10:10 -0500, Kohei Yoshida wrote:

 The attached patch fixes a bug in our current leap year calculation
 code.  It is based on the algorithm posted on wikipedia[1], and seems to
 correctly identify year 2000 as a leap year.

Sure, count my sign-off in for all branches, one more needed for 3-5-1
now.

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD


pgpPrUbZtF5Ty.pgp
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Trying to understand why LO seems freezed for some seconds when a module is started

2012-02-29 Thread julien2412
You're absolutely right ! :-)
I opened a bug (see
https://www.libreoffice.org/bugzilla/show_bug.cgi?id=46765).
I attached the lsof diff and some detailed info about my config and the
options I use in autogen.lastrun

Julien.

--
View this message in context: 
http://nabble.documentfoundation.org/Trying-to-understand-why-LO-seems-freezed-for-some-seconds-when-a-module-is-started-tp3735600p3787120.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Bug 37361] LibreOffice 3.5 most annoying bugs

2012-02-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=37361

Noel Power nopo...@novell.com changed:

   What|Removed |Added

 Depends on|46498   |

--- Comment #208 from Noel Power nopo...@novell.com 2012-02-29 05:09:03 PST 
---
removing bug# 46498 ( doesn't affect release build )

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Bug 37361] LibreOffice 3.5 most annoying bugs

2012-02-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=37361

--- Comment #209 from Ulrich Moser ulrich.mo...@zpk-moser.de 2012-02-29 
05:17:59 PST ---
Added Bug 46769

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [REVIEW 3-5, 3-5-1] Fix leap year calculation

2012-02-29 Thread Niko Rönkkö

Hi

The fix is correct so +1 from me if that counts.

--
RN
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: String literals, ASCII vs UTF-8

2012-02-29 Thread Eike Rathke
Hi Stephan,

On Wednesday, 2012-02-29 08:42:35 +0100, Stephan Bergmann wrote:

 However, there are also situations where bad input (malicious or
 otherwise) would cause an application to request excessive amounts
 of memory to do a single task (e.g., open a document), and at least
 in theory the application should be able to cope with such
 externally-induced OOM conditions, by abandoning the bad operation,
 cleaning up after it, telling the user the operation failed, and
 carrying on.

I think catching std::bad_alloc and returning an error should be
possible in most filter code based on SfxObjectShell / SfxMedium.

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD


pgpBuYIfANPBj.pgp
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: String literals, ASCII vs UTF-8

2012-02-29 Thread Noel Grandin

I would expect that filters should be validating their inputs.
By the time that we get a bad_alloc, it's too late to recover properly.
Unless we're talking about someday running filters in a separate 
process, and then validating the document they generate, in which case 
the main process would remain safe.


On 2012-02-29 15:48, Eike Rathke wrote:

Hi Stephan,

On Wednesday, 2012-02-29 08:42:35 +0100, Stephan Bergmann wrote:


However, there are also situations where bad input (malicious or
otherwise) would cause an application to request excessive amounts
of memory to do a single task (e.g., open a document), and at least
in theory the application should be able to cope with such
externally-induced OOM conditions, by abandoning the bad operation,
cleaning up after it, telling the user the operation failed, and
carrying on.

I think catching std::bad_alloc and returning an error should be
possible in most filter code based on SfxObjectShell / SfxMedium.

   Eike



___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Disclaimer: http://www.peralex.com/disclaimer.html


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[PUSHED] Re: [REVIEW 3-5][PATCH] Fix leap year calculation

2012-02-29 Thread Michael Stahl
On 29/02/12 04:10, Kohei Yoshida wrote:
 Hi there,
 
 The attached patch fixes a bug in our current leap year calculation
 code.  It is based on the algorithm posted on wikipedia[1], and seems to
 correctly identify year 2000 as a leap year.
 
 Without this, Calc would convert 2000-2-29 into 1899-12-30 on load,
 which is ugly but very hard to detect.

argh, that misplaced ! is entirely my fault, OOo 3.3 regression from
CWS sw33bf02 (previously dates were not checked for validity at all).

although before i removed the SvXMLUnitConverter code duplication for LO
3.5, the function was probably only used for reading the document
properties.

 Please consider this for 3.5.1, in which case I'll need 3 sign-offs.  I
 haven't pushed this to master yet.  I wanted to run it by Eike first
 before pushing to master.

thanks for fixing this problem!

pushed the fix plus a unit test for leap years to master,
libreoffice-3-5, libreoffice-3-5-1, libreoffice-3-4.

http://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-3-5id=a2d96b51f3272ecbdc0f4f9d4b2ee65409892554
http://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-3-5id=f3e65a72f8c37ee3795ed83b93f7483d45d5b403

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [REVIEWED 3-5-1][PATCH] Fix leap year calculation

2012-02-29 Thread Lionel Elie Mamane
On Tue, Feb 28, 2012 at 10:10:10PM -0500, Kohei Yoshida wrote:

 From 0666b5dca1a210ce7abc61a522a59c48661fe664 Mon Sep 17 00:00:00 2001
 From: Kohei Yoshida kohei.yosh...@suse.com
 Date: Tue, 28 Feb 2012 22:01:52 -0500
 Subject: [PATCH] Correctly calculate leap year.

 With the old code, year 2000 would not be a leap year, but it actually
 is.  With this, Calc correctly loads cell with date value of 2000-2-29.
 ---
  sax/source/tools/converter.cxx |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
 index eb8cc74..95f6494 100644
 --- a/sax/source/tools/converter.cxx
 +++ b/sax/source/tools/converter.cxx
 @@ -1304,7 +1304,7 @@ readDateTimeComponent(const ::rtl::OUString  rString,
  static bool lcl_isLeapYear(const sal_uInt32 nYear)
  {
  return ((nYear % 4) == 0)
 - !(((nYear % 100) == 0) || ((nYear % 400) == 0));
 + (((nYear % 100) != 0) || ((nYear % 400) == 0));
  }
  
  static sal_uInt16

OK for master, libreoffice-3-5, libreoffice-3-5-1.

It seems to me that what was originally intended was:

   return ((nYear % 4) == 0)
 ( !((nYear % 100) == 0) || ((nYear % 400) == 0) );

That is, the bug is an switch of parenthesis and negation. Your
version is strictly equivalent and maybe a bit more readable, so good
to go.

-- 
Lionel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Using a real parser generator to parse numbers (and dates)

2012-02-29 Thread Stephan Bergmann

On 02/29/2012 11:49 AM, Lionel Elie Mamane wrote:

2) I add a const_iterator interface to rtl::OUString. Instead of
coding it manually to use iterateCodePoints, I again reuse the
power of boost. But I have in my git history a manually-coded
version based on iterateCodePoints if for some reason it is
desirable (I don't think it is).

That's also more generally a more C++ natural interface to
OUStrings, so we can use it throughout our codebase instead of
iterateCodePoints.

I don't define an iterator interface, as this could be *extremely*
slow: writing one character in the middle of a string is O(n)
(linear in the length of the string) when replacing a
surrogates-encoded codepoint by a non-surrogate encoded one and
vice-versa.

[...]

5) I've stuck the LibreOffice-Spirit integration in
svl/source/numbers/spirit/, but possibly we could move it to a more
general location (sal/rtl?) so that it can be reused in other parts
of LibreOffice.


Note that the stable sal interface historically stays clear of boost, 
because of differences in the various boost versions available in the 
various environments.  Also, the SDK does not include any boost headers, 
so client code that does not even itself make use of boost could stop to 
compile.


Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [PUSHED][PATCH] fix building dictionaries when PERL_UNICODE environment

2012-02-29 Thread Caolán McNamara
On Fri, 2012-02-24 at 17:28 +0100, Petr Vorel wrote:
 First I thought it would be better to recode all of them to utf8. But 
 these files are taken from ispell, aren't they? Do we want to increase
 diversity from upstream? 

For hunspell dictionaries, the .aff files contain the encoding for
the .dic files, the .aff needs to be changed to specify UTF-8 if you
change the encoding of the .dic files. This tool though looks like its
for validating thesaurus files, though they probably have the same thing
where there's a field somewhere to indicate the encoding they are in.

Some of the hunspell dicts might share ispell lineage I guess, but
either way most of them and the thesauri have their own active upstreams
and so on, so yeah, changing the encoding just add unnecessary diversity
from their upstreams.

anyway, the last patch looks pretty minimal and it seems to make no
difference to the typical setup, so I pushed that now to dictionaries

C.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [PUSHED] Re: [REVIEW 3-5][PATCH] Fix leap year calculation

2012-02-29 Thread Michael Meeks

On Wed, 2012-02-29 at 14:53 +0100, Michael Stahl wrote:
 pushed the fix plus a unit test for leap years to master,
^

Lovely ! :-)

Thanks,

Michael.

-- 
michael.me...@suse.com  , Pseudo Engineer, itinerant idiot

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Using a real parser generator to parse numbers (and dates)

2012-02-29 Thread Stephan Bergmann

On 02/29/2012 02:57 PM, Stephan Bergmann wrote:

On 02/29/2012 11:49 AM, Lionel Elie Mamane wrote:

2) I add a const_iterator interface to rtl::OUString. Instead of
coding it manually to use iterateCodePoints, I again reuse the
power of boost. But I have in my git history a manually-coded
version based on iterateCodePoints if for some reason it is
desirable (I don't think it is).

That's also more generally a more C++ natural interface to
OUStrings, so we can use it throughout our codebase instead of
iterateCodePoints.

I don't define an iterator interface, as this could be *extremely*
slow: writing one character in the middle of a string is O(n)
(linear in the length of the string) when replacing a
surrogates-encoded codepoint by a non-surrogate encoded one and
vice-versa.

[...]

5) I've stuck the LibreOffice-Spirit integration in
svl/source/numbers/spirit/, but possibly we could move it to a more
general location (sal/rtl?) so that it can be reused in other parts
of LibreOffice.


Note that the stable sal interface historically stays clear of boost,
because of differences in the various boost versions available in the
various environments. Also, the SDK does not include any boost headers,
so client code that does not even itself make use of boost could stop to
compile.


(Also, is boost::u16_to_u32_iterator from 
boost/regex/pending/unicode_iterator.hpp supposed to be a stable interface?)


Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [protoPATCH] safe numeric casts with explicit min/max

2012-02-29 Thread Stephan Bergmann

On 02/29/2012 12:13 PM, Lionel Elie Mamane wrote:

Background: we have in sc/source/filter/inc/ftools.hxx supposedly
safe casts that are (according to the Doxygen documentation)
supposed to be safer than just static_cast. As fdo#39589 uncovered,
they are actually so buggy as to be *less* safe.


Are those saturating ulimit_cast a good thing, anyway?  Looks like 
they are only used in a handful of sc/source/filter/excel/ files. 
Picking the first occurrence at random,



return ulimit_cast sal_uInt16 ( nValueCount, EXC_CHDATAFORMAT_MAXPOINTCOUNT );


from XclExpChSourceLink::ConvertDataSequence (xechart.cxx), where 
nValueCount is a sal_uInt32 quantity -- is it OK to silently truncate 
this quantity here, or does it rather indicate a conversion failure that 
should be reported to the user?


(With helpful converters like these, I'm always worried they only 
paper over actual shortcomings in the code.)



So maybe we could selectively disable the warnings on this file
instead? Someone knows how to do that with gcc and with MSVC?


See 
http://wiki.services.openoffice.org/wiki/Writing_warning-free_code#When_all_else_fails.


Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[ANN] LibreOffice 3.5.1 RC1 available

2012-02-29 Thread Thorsten Behrens
Dear Community,

The Document Foundation is happy to announce the first release
candidate of LibreOffice 3.5.1. The upcoming 3.5.1 will be the first
in a series of frequent bugfix releases on our feature-packed 3.5 code
line. Please be aware that LibreOffice 3.5.1 RC1 is not ready for
production use, you should continue to use LibreOffice 3.4.5 or 3.5.0
for that.

The release is available for Windows, Linux and Mac OS X from our QA
builds download page at

  http://www.libreoffice.org/download/pre-releases/

A note for Windows users: this Release Candidate will uninstall your
current stable build and replace it. If you do not wish this to happen
but still would like to test, you should follow the instructions for
installing in parallel:

 http://wiki.documentfoundation.org/Installing_in_parallel

Should you find bugs, please report them to the FreeDesktop Bugzilla:

  https://bugs.freedesktop.org

A good way to assess the RC1 quality is to run some specific manual
tests on it, our TCM wiki page has more details:

 
http://wiki.documentfoundation.org/QA/Testing/Regression_Tests#Full_Regression_Test

 (and the announcement mail: 
http://lists.freedesktop.org/archives/libreoffice/2011-December/022464.html)
 
For other ways to get involved with this exciting project - you can
e.g. contribute code:

  https://www.libreoffice.org/get-involved/developers/

translate LibreOffice to your language:

  http://wiki.documentfoundation.org/Translation_for_3.5

or help with funding our operations:

  http://challenge.documentfoundation.org/

A list of known issues with 3.5.1 RC1 is available from our wiki:

  http://wiki.documentfoundation.org/Releases/3.5.1/RC1

Please find the list of changes against LibreOffice 3.5.0 here:

  
http://download.documentfoundation.org/libreoffice/src/bugfixes-libreoffice-3-5-1-release-3.5.1.1.log

Let us close again with a BIG Thank You! to all of you having
contributed to the LibreOffice project - this release would not have
been possible without your help.

Yours,

The Document Foundation Board of Directors



pgp5bt2HBcfjK.pgp
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Checking string allocations (was Re: String literals, ASCII vs UTF-8)

2012-02-29 Thread Lubos Lunak

 First, so that we have some numbers, libmswordlo.so debug build, but compiled 
with -O2 -g0 :

 4627576 - without any extra checks in OUString
 4625248 - with abort()
 4642216 - with std::bad_alloc

 Yes, adding abort() there somehow makes it a tiny bit smaller, search me why. 
For std::bad_alloc it is 0,3% more, which may not seem much, but on the other 
hand it's just one tiny change in a library that actually does something, so 
it's not that little either.

 But I guess it's not enough for me to insist on the change.

On Wednesday 29 of February 2012, Stephan Bergmann wrote:
 However, there are also situations where bad input (malicious or
 otherwise) would cause an application to request excessive amounts of
 memory to do a single task (e.g., open a document), and at least in
 theory the application should be able to cope with such
 externally-induced OOM conditions, by abandoning the bad operation,
 cleaning up after it, telling the user the operation failed, and
 carrying on.

 The problem with this theory is that it is a theory. In practice the code 
should check the size first, and if it doesn't, then it presumably will not 
clean up properly anyway.

 The other problem is that OUString ctors is just one random place. The 
OUStringBuffer ctor, which is probably a more likely place to first hit the 
problem if the input handling itself is sloppy and lets the problem get past, 
does not bother with any such checks. So what we have now is a half-solution 
that is not likely to work anyway. Either we want this done properly, in 
which case input should be validated. Or we want it with less work but still 
reasonably safe, in which case all the C rtl_ustr_* functions should detect 
this and abort. Either case does not really need it in OUString ctors.

-- 
 Lubos Lunak
 l.lu...@suse.cz
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


unhandled exception / abort etc. ...

2012-02-29 Thread Michael Meeks
Hi there,

On Tue, 2012-02-21 at 16:55 +0100, Stephan Bergmann wrote:
 On 02/21/2012 04:07 PM, Michael Meeks wrote:
  In my experience, such exceptions typically indicate a programming error
  (either in actual program code, or in the way the bits of the program
  are combined into an installation set).  And for programmers, it is
  often more helpful to see the direct consequences of such error than
  some helpful mediation on LO's part (like the infamous The user
  language cannot be determined message, typically caused by some problem
  that has zero to do with any locale data, only leading devs to start
  searching in the wrong direction).
 
  Haha :-) indeed, however a pathalogical, silent abort, without even an
  auto-save, or any message from the exception is rather unfortunate
  too ;-)
 
 This should not be a silent abort, without even an auto-save 
 anyway---at least not in production builds where the sal signal handler 
 machinery should catch the abort.  (No idea what the current status is, 
 which configurations lead to which behaviour wrt. that signal handler.)

So - it took me a while to get around to this, but luckily while I was
chasing:

https://bugs.freedesktop.org/show_bug.cgi?id=46340

I hit this. Interestingly on Linux we do get some (not particularly
helpful) console debug:

$ ./soffice /tmp/foo.odp 

terminate called after throwing an instance of
'com::sun::star::lang::DisposedException'
$

And of course, no auto-save, no contents of the exception etc. etc. And
I imagine the same is true for all un-caught exceptions, including
(incidentally ::std::bad_alloc() ;-). I imagine that at the moment
actively discards document data left  right in the vast majority of
cases where it is not caught.

So - again; what are the downsides of a pleasant wrapper around 'main'
that not only prints out the exception and contents on the console, but
triggers the save/crash handler nicely. Of course, we can disable that
for the 'interesting' cases on Linux where G_SLICE is set etc. so people
debugging will see something closer to the original throw in gdb.

ATB,

Michael.

-- 
michael.me...@suse.com  , Pseudo Engineer, itinerant idiot

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [REVIEWED 3-5-1][PATCH] Fix leap year calculation

2012-02-29 Thread Kevin André
On Wed, Feb 29, 2012 at 14:56, Lionel Elie Mamane lio...@mamane.lu wrote:
 On Tue, Feb 28, 2012 at 10:10:10PM -0500, Kohei Yoshida wrote:

 From 0666b5dca1a210ce7abc61a522a59c48661fe664 Mon Sep 17 00:00:00 2001
 From: Kohei Yoshida kohei.yosh...@suse.com
 Date: Tue, 28 Feb 2012 22:01:52 -0500
 Subject: [PATCH] Correctly calculate leap year.

      return ((nYear % 4) == 0)
 -         !(((nYear % 100) == 0) || ((nYear % 400) == 0));
 +         (((nYear % 100) != 0) || ((nYear % 400) == 0));

Why still that many parentheses? Couldn't it be simply:

return (nYear % 400) == 0 || ((nYear % 4) == 0  (nYear % 100) != 0);

?
In case I'm missing something here, forgive me my ignorance. I'm just
an outsider :-)


Regards,

Kevin André
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [PATCH] fdo#46343 fix opening of 8-bit encoded filenames

2012-02-29 Thread Stephan Bergmann

On 02/29/2012 12:29 PM, Michael Meeks wrote:

Looks ok to me; the problem is that we might give people the idea that
not using UTF-8 for file-names everywhere is a supported and/or
legitimate configuration option - when it is -emphatically- not :-)


At least as long as everything is consistently in one encoding, LO 
should even be fine with a non-UTF-8 exterior.  (But UTF-8 is of course 
the best choice anyway, nowadays.)



And I believe Stephan is cleaning up this area himself.


Yep, a true fix is in progress at 
https://bugs.freedesktop.org/show_bug.cgi?id=46434.


Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Checking string allocations (was Re: String literals, ASCII vs UTF-8)

2012-02-29 Thread Stephan Bergmann

On 02/29/2012 03:28 PM, Lubos Lunak wrote:

On Wednesday 29 of February 2012, Stephan Bergmann wrote:

However, there are also situations where bad input (malicious or
otherwise) would cause an application to request excessive amounts of
memory to do a single task (e.g., open a document), and at least in
theory the application should be able to cope with such
externally-induced OOM conditions, by abandoning the bad operation,
cleaning up after it, telling the user the operation failed, and
carrying on.


  The problem with this theory is that it is a theory. In practice the code
should check the size first, and if it doesn't, then it presumably will not
clean up properly anyway.


But checking the size beforehand is not trivial.  Where exactly to draw 
the line between legitimate but large allocation requests and bogus 
ones?  What about cases where the allocation is not in one big chunk, 
but piecemeal (say, ending up in a linked list) with an excessive number 
of innocently-looking small allocations?



  The other problem is that OUString ctors is just one random place. The
OUStringBuffer ctor, which is probably a more likely place to first hit the
problem if the input handling itself is sloppy and lets the problem get past,
does not bother with any such checks. So what we have now is a half-solution
that is not likely to work anyway. Either we want this done properly, in
which case input should be validated. Or we want it with less work but still
reasonably safe, in which case all the C rtl_ustr_* functions should detect
this and abort. Either case does not really need it in OUString ctors.


We want it done properly, I'd say (and think the sloppy code should be 
fixed -- in theory at least; there are always more pressing problems 
with the code), but I do not buy your done properly = input should 
be validated [and checking for OOM in OUString ctor etc. becomes 
unnecessary] implication (see above).


Stephan

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [protoPATCH] safe numeric casts with explicit min/max

2012-02-29 Thread Kohei Yoshida
On Wed, 2012-02-29 at 11:50 +, Caolán McNamara wrote:
 On Wed, 2012-02-29 at 12:13 +0100, Lionel Elie Mamane wrote:
  Background: we have in sc/source/filter/inc/ftools.hxx supposedly
  safe casts that are (according to the Doxygen documentation)
  supposed to be safer than just static_cast. As fdo#39589 uncovered,
  they are actually so buggy as to be *less* safe.
  
  Back in November, I wrote a prototype _actually_ safe versions, but
  got sidetracked and forgot about them. I'm unearthing them again now,
  attached.
 
 It might be a little orthogonal to just the cast issue, but I wonder if 
 
 Cert's IntegerLib or SafeInt (http://safeint.codeplex.com/) or somesuch
 (https://bugzilla.mozilla.org/show_bug.cgi?id=555798) covers the same
 ground and is license-suitable as a drop in ?

Yup.  I've come across SafeInt as well while I was searching.

Boost also has numeric_cast as well.

http://www.boost.org/doc/libs/1_32_0/libs/numeric/conversion/doc/numeric_cast.html

Kohei

-- 
Kohei Yoshida, LibreOffice hacker, Calc

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [protoPATCH] safe numeric casts with explicit min/max

2012-02-29 Thread Kohei Yoshida
HI Stephan,

On Wed, 2012-02-29 at 15:25 +0100, Stephan Bergmann wrote:
 On 02/29/2012 12:13 PM, Lionel Elie Mamane wrote:
  Background: we have in sc/source/filter/inc/ftools.hxx supposedly
  safe casts that are (according to the Doxygen documentation)
  supposed to be safer than just static_cast. As fdo#39589 uncovered,
  they are actually so buggy as to be *less* safe.
 
 Are those saturating ulimit_cast a good thing, anyway?  Looks like 
 they are only used in a handful of sc/source/filter/excel/ files. 

That's my take also. Their uses are very limited, and there are
alternatives we could use (SafeInt, boost::numeric_cast) if we really
have to use one.

 Picking the first occurrence at random,
 
  return ulimit_cast sal_uInt16 ( nValueCount, 
  EXC_CHDATAFORMAT_MAXPOINTCOUNT );
 
 from XclExpChSourceLink::ConvertDataSequence (xechart.cxx), where 
 nValueCount is a sal_uInt32 quantity -- is it OK to silently truncate 
 this quantity here, or does it rather indicate a conversion failure that 
 should be reported to the user?

I personally think it's perfectly okay to just truncate the value in
this particular case.

Kohei

-- 
Kohei Yoshida, LibreOffice hacker, Calc

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: unhandled exception / abort etc. ...

2012-02-29 Thread Stephan Bergmann

On 02/29/2012 03:29 PM, Michael Meeks wrote:

So - it took me a while to get around to this, but luckily while I was
chasing:

https://bugs.freedesktop.org/show_bug.cgi?id=46340

I hit this. Interestingly on Linux we do get some (not particularly
helpful) console debug:

$ ./soffice /tmp/foo.odp

terminate called after throwing an instance of
'com::sun::star::lang::DisposedException'
$

And of course, no auto-save, no contents of the exception etc. etc. And
I imagine the same is true for all un-caught exceptions, including
(incidentally ::std::bad_alloc() ;-). I imagine that at the moment
actively discards document data left  right in the vast majority of
cases where it is not caught.


Strange.  At least for my (--enable-dbgutil) master build, following the 
instructions of fdo#46340 *does* lead to a restart with crash dialog and 
document recovery.


Also, experimenting with the attached crash.patch (see also 
https://issues.apache.org/ooo/show_bug.cgi?id=108411 let SID_CRASH 
really crash) does lead to the crash dialog in all four variations of 
the code (std::abort() vs. throw std::bad_alloc() and directly from main 
thread vs. pthread_create).


Stephan
diff --git a/framework/uiconfig/startmodule/menubar/menubar.xml b/framework/uiconfig/startmodule/menubar/menubar.xml
index 055810b..8bebe1c 100755
--- a/framework/uiconfig/startmodule/menubar/menubar.xml
+++ b/framework/uiconfig/startmodule/menubar/menubar.xml
@@ -2,6 +2,7 @@
 menu:menubar xmlns:menu=http://openoffice.org/2001/menu; menu:id=menubar
 menu:menu menu:id=.uno:PickList
 menu:menupopup
+menu:menuitem menu:id=.uno:Crash/
 menu:menuitem menu:id=.uno:AddDirect/
 menu:menuitem menu:id=.uno:Open/
 menu:menuitem menu:id=.uno:RecentFileList/
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 8070b51..e870eef 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -180,6 +180,7 @@ static void showDocument( const char* pBaseName )
 }
 }
 
+/*SB*/externC{static void*SBFail(void*){/*SB std::abort(); */throw std::bad_alloc();}}
 void SfxApplication::MiscExec_Impl( SfxRequest rReq )
 {
 bool bDone = false;
@@ -543,8 +544,9 @@ void SfxApplication::MiscExec_Impl( SfxRequest rReq )
 case SID_CRASH :
 {
 // Provoke a crash:
-char * crash = 0;
-*crash = 0;
+//SBchar * crash = 0;
+//SB*crash = 0;
+/*SB SBFail(0); */pthread_t SBt;pthread_create(SBt,0,SBFail,0);
 break;
 }
 
diff --git a/solenv/gbuild/platform/linux.mk b/solenv/gbuild/platform/linux.mk
index 71508f2..e274830 100644
--- a/solenv/gbuild/platform/linux.mk
+++ b/solenv/gbuild/platform/linux.mk
@@ -27,7 +27,11 @@
 
 gb_LinkTarget_LDFLAGS += \
 -Wl,-z,defs \
+-pthread
 
 include $(GBUILDDIR)/platform/unxgcc.mk
 
+gb_LinkTarget_CFLAGS += -pthread
+gb_LinkTarget_CXXFLAGS += -pthread
+
 # vim: set noet sw=4 ts=4:
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[REVIEW -3-5] RTF import of drwaing objects regressions

2012-02-29 Thread Miklos Vajna
Hi,

See
http://cgit.freedesktop.org/libreoffice/core/commit/?id=bbef8b4 and
http://cgit.freedesktop.org/libreoffice/core/commit/?id=fa9e867

These two commits implement RTF control words which were already
supported in 3.4 - they apply cleanly to 3-5 in this order.

Thanks,

Miklos
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Checking string allocations (was Re: String literals, ASCII vs UTF-8)

2012-02-29 Thread Lubos Lunak
On Wednesday 29 of February 2012, Stephan Bergmann wrote:
 On 02/29/2012 03:28 PM, Lubos Lunak wrote:
  On Wednesday 29 of February 2012, Stephan Bergmann wrote:
  However, there are also situations where bad input (malicious or
  otherwise) would cause an application to request excessive amounts of
  memory to do a single task (e.g., open a document), and at least in
  theory the application should be able to cope with such
  externally-induced OOM conditions, by abandoning the bad operation,
  cleaning up after it, telling the user the operation failed, and
  carrying on.
 
The problem with this theory is that it is a theory. In practice the
  code should check the size first, and if it doesn't, then it presumably
  will not clean up properly anyway.

 But checking the size beforehand is not trivial.  Where exactly to draw
 the line between legitimate but large allocation requests and bogus
 ones?

 Ok, I think you are right here. So if we want to check for this case, we need 
to check all allocations. Which is the second of the problems I listed - we 
do not.

 What about cases where the allocation is not in one big chunk, 
 but piecemeal (say, ending up in a linked list) with an excessive number
 of innocently-looking small allocations?

 They may possibly fail somewhere else than the OUString ctor - OUStringBuffer 
does not throw bad_alloc, OUString::concat() does not throw bad_alloc, etc. 
Which brings us back to my argument that the current way, having the checks 
in OUString ctors and nowhere else, does not solve much.

 The way I see it, there are these options:

- we leave it as it is. The least work, allocation failures that happen to 
occur first in OUString ctors will throw exceptions, they maybe wil get 
handled and cleaned up properly, or maybe not. Failures anywhere else will 
make LO fall flat on its face somewhere (and as you said, that somewhere in 
these cases will be the following line, so the actual problem will be only 
figuring out the cause was allocation failure and not a corruption 
elsewhere).

- we remove the throwing of std::bad_alloc. It will remove the invalid idea 
that we actually can recover from allocation failures. Failures will end up 
the same way like above.

- we add checking and std::bad_alloc throwing, and catching it, and cleaning 
up properly, and whatnot, everywhere. Or we can just go fixing something that 
is actually likely to happen.

- we replace the OSL_ENSURE usage in rtl_ustr* functions by CHECK_ALLOCATION 
macro, that does OSL_ENSURE, er, I mean OSL_FAIL first, and even in non-debug 
code does abort() in case that allocation fails. Or maybe even do this just 
in rtl_allocateMemory() (or whatever is the function that ultimately actually 
does the allocations), and don't bother with std::bad_alloc or anything like 
that. Do we actually have code that tries to gracefully handle running out of 
memory? Because if not, and I doubt we realistically do[*], then we might as 
well just admit this status quo and have a nice crash right after the 
allocation fails.

[*] The word realistically is important. I can see there are actually places 
catching std::bad_alloc, but that's again just false sense of safety. Check 
out e.g. sd/source/filter/ppt/propread.cxx , PropItem::Read(), that one 
handles it properly (almost, it leaks) and returns false on failure. However 
when it's called, the return value is either ignored, or the property that 
was supposed to be read is ignored. If I open a bigger file on a system that 
is short on memory, that can be a silent loss of data. In that case just 
crashing is usually the better option, because that way the user at least 
knows.

-- 
 Lubos Lunak
 l.lu...@suse.cz
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Exception cost on string allocations ...

2012-02-29 Thread Michael Meeks
Hi guys,

On Wed, 2012-02-29 at 15:28 +0100, Lubos Lunak wrote:
 First, so that we have some numbers, libmswordlo.so debug build, but compiled 
 with -O2 -g0 :

So - I did some more analysis, and re-compiled all of LibreOffice both
with and without the attached patch - analysing all 287 shared libraries
we get:

$ du -b -c ../../without-stripped/program/*.so  | tail
...
171373684   total
$ du -b -c ../../with-stripped/program/*.so  | tail
...
174692100   total
$ 

ie. we have as a lower bound a 1.8% size saving. I expect that to grow
as we start to LTO - as we can finally propagate the fact that methods
don't throw exceptions across modules, and across libraries.

Now - the immediate, and expected riposte is that ~2% of our size is
insignificant ( to go along with the 3% of our CPU time at startup
parsing labels we mostly don't need ;-). Personally, I don't think the
approach of ignoring any efficiency win as insignificant if it is less
than 10% across a code-base of our size is sustainable in the long
term :-) the more we ignore the more it adds up.

So here are the facts, correct me if I'm wrong:

* often std::bad_alloc is not handled, making the program
  abort, the exception is not caught by main - there is no
  autosave and data is lost - ie. a SEGV would be preferable.

* often we fail to emit std::bad_alloc in out of memory
  conditions, cf. sal/inc/rtl/allocator.hxx etc. etc.

* it is unarguably the case that there is no consistent
  bad_alloc handling, it is random, ill thought through and
  anything less than aborting that complete document load/save/
  calculate operation will almost certainly lead to (silent)
  data loss / document errors.

* the user experience of: we're out of memory, by the way we
  prolly lost some of your document, please try to save,
  re-start compare the data etc. is insignificantly less
  painful than taking a crash.

* in cases where we have a reasonable expectation of an
  allocation failing and the ability to actually do something
  meaningful: loading images perhaps, where we could swapout
  other images, we can (and do) call the allocation ourself
  and handle return values.

* IMHO for everything else, we just waste 2% of our size, and
  some CPU cost for no good reason at all, and doubly so for
  the case of OUString(foo) const-strings that we allocate
  internally that cannot be that large.

Ergo, I suggest we discuss this at the ESC tomorrow, with a view to a
pragmatic, top-to-bottom solution that actually has a chance of working
well.

I've added it to the agenda.

I also attach the git hash I built from, my config options, the size of
all the .so's installed etc.

All the best,

Michael.

-- 
michael.me...@suse.com  , Pseudo Engineer, itinerant idiot
diff --git a/sal/inc/rtl/byteseq.hxx b/sal/inc/rtl/byteseq.hxx
index 852670e..d1154ff 100644
--- a/sal/inc/rtl/byteseq.hxx
+++ b/sal/inc/rtl/byteseq.hxx
@@ -33,7 +33,7 @@
 #include rtl/alloc.h
 #include rtl/memory.h
 
-#if ! defined EXCEPTIONS_OFF
+#if ! defined SAL_EXCEPTIONS_OFF
 #include new
 #endif
 
@@ -64,7 +64,7 @@ inline ByteSequence::ByteSequence( const sal_Int8 * pElements, sal_Int32 len )
 : _pSequence( 0 )
 {
 ::rtl_byte_sequence_constructFromArray( _pSequence, pElements, len );
-#if ! defined EXCEPTIONS_OFF
+#if ! defined SAL_EXCEPTIONS_OFF
 if (_pSequence == 0)
 throw ::std::bad_alloc();
 #endif
@@ -74,7 +74,7 @@ inline ByteSequence::ByteSequence( sal_Int32 len, enum __ByteSequence_NoDefault
 : _pSequence( 0 )
 {
 ::rtl_byte_sequence_constructNoDefault( _pSequence, len );
-#if ! defined EXCEPTIONS_OFF
+#if ! defined SAL_EXCEPTIONS_OFF
 if (_pSequence == 0)
 throw ::std::bad_alloc();
 #endif
@@ -89,7 +89,7 @@ inline ByteSequence::ByteSequence( sal_Int32 len )
 : _pSequence( 0 )
 {
 ::rtl_byte_sequence_construct( _pSequence, len );
-#if ! defined EXCEPTIONS_OFF
+#if ! defined SAL_EXCEPTIONS_OFF
 if (_pSequence == 0)
 throw ::std::bad_alloc();
 #endif
@@ -114,7 +114,7 @@ inline sal_Bool ByteSequence::operator == ( const ByteSequence  rSeq ) const SA
 inline sal_Int8 * ByteSequence::getArray()
 {
 ::rtl_byte_sequence_reference2One( _pSequence );
-#if ! defined EXCEPTIONS_OFF
+#if ! defined SAL_EXCEPTIONS_OFF
 if (_pSequence == 0)
 throw ::std::bad_alloc();
 #endif
@@ -124,7 +124,7 @@ inline sal_Int8 * ByteSequence::getArray()
 inline void ByteSequence::realloc( sal_Int32 nSize )
 {
 ::rtl_byte_sequence_realloc( _pSequence, nSize );
-#if ! defined EXCEPTIONS_OFF
+#if ! defined SAL_EXCEPTIONS_OFF
 if (_pSequence == 0)
 throw ::std::bad_alloc();
 #endif
diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx
index e879f32..d10499a 100644
--- 

Re: [REVIEW 3-5, 3-5-1] Make libxslt link the right libxml on mac ppc

2012-02-29 Thread Stephan Bergmann

On 02/29/2012 11:56 AM, Alexander Thurgood wrote:

My build on OSX Server 10.6.8 (x86) (default setup, no ports, etc) has
been failing for the last 2 days in libxslt, cf. attached log file.


But if you do not pass it any configure switches, it should not build 
module libxslt at all?  What branch, master or libreoffice-3-5?  What do 
config.log and config_host.mk say about libxslt?


Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: unhandled exception / abort etc. ...

2012-02-29 Thread Michael Meeks

On Wed, 2012-02-29 at 17:00 +0100, Stephan Bergmann wrote:
 Strange.  At least for my (--enable-dbgutil) master build, following the 
 instructions of fdo#46340 *does* lead to a restart with crash dialog and 
 document recovery.

Interesting; well - I built with make ENABLE_SYMBOLS=true but otherwise
a reasonably normal build (AFAICS), I don't use --enable-dbgutil myself.

 Also, experimenting with the attached crash.patch (see also 
 https://issues.apache.org/ooo/show_bug.cgi?id=108411 let SID_CRASH 
 really crash) does lead to the crash dialog in all four variations of 
 the code (std::abort() vs. throw std::bad_alloc() and directly from main 
 thread vs. pthread_create).

For me with:

+fprintf (stderr, Crash !\n);
+throw ::std::bad_alloc();

I get:

./soffice -writer
Warning: -writer is deprecated.  Use --writer instead.

Crash !
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

And no crash handler. I guess I have a linkoo'd build perhaps something
there is causing grief.

I attach the patch, and sample macro in case someone else has a more
'producty' build handy and wants to try.

Incidentally, I love your crash patch :-) IMHO we badly need some unit
tests for crash recovery and a nice built-in simulated crash is rather
useful.

HTH,

Michael.

-- 
michael.me...@suse.com  , Pseudo Engineer, itinerant idiot
diff --git a/framework/uiconfig/startmodule/menubar/menubar.xml b/framework/uiconfig/startmodule/menubar/menubar.xml
index 055810b..8bebe1c 100755
--- a/framework/uiconfig/startmodule/menubar/menubar.xml
+++ b/framework/uiconfig/startmodule/menubar/menubar.xml
@@ -2,6 +2,7 @@
 menu:menubar xmlns:menu=http://openoffice.org/2001/menu; menu:id=menubar
 menu:menu menu:id=.uno:PickList
 menu:menupopup
+menu:menuitem menu:id=.uno:Crash/
 menu:menuitem menu:id=.uno:AddDirect/
 menu:menuitem menu:id=.uno:Open/
 menu:menuitem menu:id=.uno:RecentFileList/
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 8070b51..8826081 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -180,6 +180,7 @@ static void showDocument( const char* pBaseName )
 }
 }
 
+/*SB*/externC{static void*SBFail(void*){/*SB std::abort(); */throw std::bad_alloc();}}
 void SfxApplication::MiscExec_Impl( SfxRequest rReq )
 {
 bool bDone = false;
@@ -543,8 +544,11 @@ void SfxApplication::MiscExec_Impl( SfxRequest rReq )
 case SID_CRASH :
 {
 // Provoke a crash:
-char * crash = 0;
-*crash = 0;
+//SBchar * crash = 0;
+//SB*crash = 0;
+/*SB SBFail(0); */pthread_t SBt;pthread_create(SBt,0,SBFail,0);
+fprintf (stderr, Crash !\n);
+throw ::std::bad_alloc();
 break;
 }
 
diff --git a/solenv/gbuild/platform/linux.mk b/solenv/gbuild/platform/linux.mk
index 71508f2..e274830 100644
--- a/solenv/gbuild/platform/linux.mk
+++ b/solenv/gbuild/platform/linux.mk
@@ -27,7 +27,11 @@
 
 gb_LinkTarget_LDFLAGS += \
 -Wl,-z,defs \
+-pthread
 
 include $(GBUILDDIR)/platform/unxgcc.mk
 
+gb_LinkTarget_CFLAGS += -pthread
+gb_LinkTarget_CXXFLAGS += -pthread
+
 # vim: set noet sw=4 ts=4:


crash-test.odt
Description: application/vnd.oasis.opendocument.text
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [REVIEWED 3-5-1][PATCH] Fix leap year calculation

2012-02-29 Thread Lionel Elie Mamane
On Wed, Feb 29, 2012 at 03:38:30PM +0100, Kevin André wrote:
 On Wed, Feb 29, 2012 at 14:56, Lionel Elie Mamane lio...@mamane.lu wrote:
 On Tue, Feb 28, 2012 at 10:10:10PM -0500, Kohei Yoshida wrote:

      return ((nYear % 4) == 0)
 -         !(((nYear % 100) == 0) || ((nYear % 400) == 0));
 +         (((nYear % 100) != 0) || ((nYear % 400) == 0));

 Why still that many parentheses? Couldn't it be simply:

 return (nYear % 400) == 0 || ((nYear % 4) == 0  (nYear % 100) != 0);

Even stronger, given the precedence of the operators in play, it could
be:

 return nYear % 400 == 0 || nYear % 4 == 0  nYear % 100 != 0;

But that may be less readable... These parentheses are a trade-off
between conciseness and readability, i.e. of style.

-- 
Lionel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


  1   2   3   4   >