[Libreoffice-commits] .: vcl/unx

2011-10-18 Thread Lubos Lunak
 vcl/unx/kde4/KDESalFrame.cxx |   11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 7cd58dbe32e5421986216dd7c6b24a4bb0b9c1e5
Author: Luboš Luňák l.lu...@suse.cz
Date:   Tue Oct 18 16:52:47 2011 +0200

style tooltips properly with KDE4 vclplug (fdo#40461)

diff --git a/vcl/unx/kde4/KDESalFrame.cxx b/vcl/unx/kde4/KDESalFrame.cxx
index 10e7350..4dd54e5 100644
--- a/vcl/unx/kde4/KDESalFrame.cxx
+++ b/vcl/unx/kde4/KDESalFrame.cxx
@@ -38,6 +38,8 @@
 #include kmainwindow.h
 #include kapplication.h
 #include ktoolbar.h
+#include qdebug.h
+#include qtooltip.h
 
 #undef Region
 
@@ -239,11 +241,9 @@ void KDESalFrame::UpdateSettings( AllSettings rSettings )
 style.SetFieldTextColor( aText );
 style.SetFieldRolloverTextColor( aText );
 style.SetWindowTextColor( aText );
-style.SetHelpTextColor( aText );
 
 // Base
 style.SetFieldColor( aBase );
-style.SetHelpColor( aBase );
 style.SetWindowColor( aBase );
 style.SetActiveTabColor( aBase );
 
@@ -268,11 +268,14 @@ void KDESalFrame::UpdateSettings( AllSettings rSettings )
 style.SetHighlightColor( aHigh );
 style.SetHighlightTextColor( toColor(pal.color( 
QPalette::HighlightedText))  );
 
+// Tooltip
+style.SetHelpColor( toColor( QToolTip::palette().color( QPalette::Active, 
QPalette::ToolTipBase )));
+style.SetHelpTextColor( toColor( QToolTip::palette().color( 
QPalette::Active, QPalette::ToolTipText )));
+
 // Font
 Font aFont = toFont( kapp-font(), rSettings.GetUILocale() );
 
 style.SetAppFont( aFont );
-style.SetHelpFont( aFont );
 
 style.SetMenuFont( aFont ); // will be changed according to pMenuBar
 //style.SetToolFont( aFont ); //already set above
@@ -291,6 +294,8 @@ void KDESalFrame::UpdateSettings( AllSettings rSettings )
 }
 style.SetFloatTitleFont( aFont );
 
+style.SetHelpFont( toFont( QToolTip::font(), rSettings.GetUILocale()));
+
 int flash_time = QApplication::cursorFlashTime();
 style.SetCursorBlinkTime( flash_time != 0 ? flash_time/2 : 
STYLE_CURSOR_NOBLINKTIME );
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2011-10-20 Thread Lubos Lunak
 vcl/unx/kde4/main.cxx |   11 +++
 1 file changed, 11 insertions(+)

New commits:
commit 6163c62a52794725188faf82ee12852f4b2cd023
Author: Luboš Luňák l.lu...@suse.cz
Date:   Thu Oct 20 16:41:50 2011 +0200

let Qt call XInitThreads(), so that it knows it's been called (fdo#40298)

Otherwise QPixmap complains when used outside of the main Qt thread
and resets itself to null pixmap, eventually leading to crashes.

diff --git a/vcl/unx/kde4/main.cxx b/vcl/unx/kde4/main.cxx
index 9e0a361..482a212 100644
--- a/vcl/unx/kde4/main.cxx
+++ b/vcl/unx/kde4/main.cxx
@@ -56,7 +56,18 @@ extern C {
established, so protect X against itself
 */
 if( ! ( pNoXInitThreads  *pNoXInitThreads ) )
+{
+#if QT_VERSION = 0x040800
+// let Qt call XInitThreads(), so that also Qt knows it's been used
+// (otherwise QPixmap may warn about threads not being initialized)
+QApplication::setAttribute( Qt::AA_X11InitThreads );
+#else
 XInitThreads();
+// just in case somebody builds with old version and then upgrades 
Qt,
+// otherwise this is a no-op
+QApplication::setAttribute( static_cast ApplicationAttribute ( 
10 ));
+#endif
+}
 
 #if QT_VERSION  0x05
 // Qt 4.x support needs = 4.1.0
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2011-10-20 Thread Lubos Lunak
 vcl/unx/kde4/KDESalGraphics.cxx |   19 +--
 1 file changed, 13 insertions(+), 6 deletions(-)

New commits:
commit 936d19e606cbf29d41bff42db559a01f5deb240c
Author: Luboš Luňák l.lu...@suse.cz
Date:   Thu Oct 20 19:05:13 2011 +0200

fix horizontal scrollbars with KDE oxygen style (bnc#722918)

Apparently there are two style flags for detecting the widget
is horizontal.

diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
index 5dbe491..60cd4ed 100644
--- a/vcl/unx/kde4/KDESalGraphics.cxx
+++ b/vcl/unx/kde4/KDESalGraphics.cxx
@@ -493,10 +493,9 @@ sal_Bool KDESalGraphics::drawNativeControl( ControlType 
type, ControlPart part,
 if (sbVal-mnVisibleSize  sbVal-mnMax)
 option.state = QStyle::State_MouseOver;
 
-//horizontal or vertical
-if (part == PART_DRAW_BACKGROUND_VERT)
-option.orientation = Qt::Vertical;
-else
+bool horizontal = ( part == PART_DRAW_BACKGROUND_HORZ ); 
//horizontal or vertical
+option.orientation = horizontal ? Qt::Horizontal : Qt::Vertical;
+if( horizontal )
 option.state |= QStyle::State_Horizontal;
 
 //setup parameters from the OO values
@@ -592,7 +591,10 @@ sal_Bool KDESalGraphics::drawNativeControl( ControlType 
type, ControlPart part,
 option.maximum = slVal-mnMax;
 option.minimum = slVal-mnMin;
 option.sliderPosition = option.sliderValue = slVal-mnCur;
-option.orientation = (part == PART_TRACK_HORZ_AREA) ? Qt::Horizontal : 
Qt::Vertical;
+bool horizontal = ( part == PART_TRACK_HORZ_AREA ); //horizontal or 
vertical
+option.orientation = horizontal ? Qt::Horizontal : Qt::Vertical;
+if( horizontal )
+option.state |= QStyle::State_Horizontal;
 
 draw( QStyle::CC_Slider, option, m_image, 
vclStateValue2StateFlag(nControlState, value) );
 }
@@ -901,7 +903,10 @@ sal_Bool KDESalGraphics::getNativeControlRegion( 
ControlType type, ControlPart p
 if( part == PART_TRACK_VERT_AREA || part == PART_TRACK_HORZ_AREA )
 {
 QStyleOptionSlider option;
-option.orientation = ( part == PART_TRACK_HORZ_AREA ) ? 
Qt::Horizontal : Qt::Vertical;
+bool horizontal = ( part == PART_TRACK_HORZ_AREA ); 
//horizontal or vertical
+option.orientation = horizontal ? Qt::Horizontal : 
Qt::Vertical;
+if( horizontal )
+option.state |= QStyle::State_Horizontal;
 // getNativeControlRegion usually gets ImplControlValue as 
'val' (i.e. not the proper
 // subclass), so use random sensible values (doesn't matter 
anyway, as the wanted
 // geometry here depends only on button sizes)
@@ -971,6 +976,8 @@ sal_Bool KDESalGraphics::hitTestNativeControl( ControlType 
nType, ControlPart nP
 rect.moveTo( 0, 0 );
 QStyleOptionSlider options;
 options.orientation = bHorizontal ? Qt::Horizontal : Qt::Vertical;
+if( bHorizontal )
+options.state |= QStyle::State_Horizontal;
 options.rect = rect;
 // some random sensible values, since we call this code only for 
scrollbar buttons,
 // the slider position does not exactly matter
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/unx

2011-10-20 Thread Lubos Lunak
 vcl/unx/kde4/main.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a6347e0971d718943241627f528fa4df3950ad44
Author: Luboš Luňák l.lu...@suse.cz
Date:   Thu Oct 20 19:56:44 2011 +0200

fix last commit

diff --git a/vcl/unx/kde4/main.cxx b/vcl/unx/kde4/main.cxx
index 482a212..12e4e14 100644
--- a/vcl/unx/kde4/main.cxx
+++ b/vcl/unx/kde4/main.cxx
@@ -65,7 +65,7 @@ extern C {
 XInitThreads();
 // just in case somebody builds with old version and then upgrades 
Qt,
 // otherwise this is a no-op
-QApplication::setAttribute( static_cast ApplicationAttribute ( 
10 ));
+QApplication::setAttribute( static_cast Qt::ApplicationAttribute 
( 10 ));
 #endif
 }
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: writerfilter/source

2011-11-08 Thread Lubos Lunak
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 247ac3b1095b49f29c44b066fad6264112df1fe2
Author: Luboš Luňák l.lu...@suse.cz
Date:   Wed Oct 19 15:31:36 2011 +0200

fix incorrect OSL_FAIL message because of copypaste

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index d2eaeec..b65cb21 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1343,7 +1343,7 @@ void DomainMapper_Impl::PushAnnotation()
 }
 catch( uno::Exception )
 {
-OSL_FAIL( exception in PushFootOrEndnote );
+OSL_FAIL( exception in PushAnnotation );
 }
 }
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2011-11-24 Thread Lubos Lunak
 0 files changed

New commits:
commit 49e4c3e5e139f0443e5432d99d6514038b62ce84
Author: Luboš Luňák l.lu...@suse.cz
Date:   Thu Nov 10 18:01:47 2011 +0100

remove executable bit on a .cxx file

diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx
old mode 100755
new mode 100644
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] Changes to 'feature/ooxmlmathimport'

2011-11-24 Thread Lubos Lunak
New branch 'feature/ooxmlmathimport' available with the following commits:
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: oox/inc

2011-11-25 Thread Lubos Lunak
 oox/inc/oox/mathml/importutils.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f87ea359f45a8d8edbf029a5268b40fab3d1fa6c
Author: Luboš Luňák l.lu...@suse.cz
Date:   Thu Nov 24 20:54:37 2011 +0100

fix compile

diff --git a/oox/inc/oox/mathml/importutils.hxx 
b/oox/inc/oox/mathml/importutils.hxx
index d5d2540..ad6ad6b 100644
--- a/oox/inc/oox/mathml/importutils.hxx
+++ b/oox/inc/oox/mathml/importutils.hxx
@@ -29,8 +29,8 @@
 #define _STARMATHIMPORTUTILS_HXX
 
 #include com/sun/star/xml/sax/XFastAttributeList.hpp
+#include oox/token/tokens.hxx
 #include map
-#include oox/helper/attributelist.hxx
 #include vector
 
 #include oox/dllapi.h
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 17 commits - oox/inc oox/source starmath/source

2011-11-29 Thread Lubos Lunak
 oox/inc/oox/mathml/importutils.hxx |   17 ++
 oox/source/mathml/importutils.cxx  |  124 +++--
 oox/source/token/tokens.pl |   38 ++---
 starmath/source/mathtype.cxx   |2 
 starmath/source/ooxmlexport.cxx|2 
 starmath/source/ooxmlimport.cxx|  257 ++---
 starmath/source/ooxmlimport.hxx|8 +
 7 files changed, 359 insertions(+), 89 deletions(-)

New commits:
commit a115442064c3c6a2ea398895159b62040d079cbb
Author: Luboš Luňák l.lu...@suse.cz
Date:   Tue Nov 29 21:18:39 2011 +0100

import docx m:m

diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx
index 530195c..c0d84ab 100644
--- a/starmath/source/ooxmlimport.cxx
+++ b/starmath/source/ooxmlimport.cxx
@@ -122,6 +122,9 @@ OUString SmOoxmlImport::readOMathArg()
 case OPENING( M_TOKEN( groupChr )):
 ret += handleGroupChr();
 break;
+case OPENING( M_TOKEN( m )):
+ret += handleM();
+break;
 case OPENING( M_TOKEN( r )):
 ret += handleR();
 break;
@@ -398,6 +401,29 @@ OUString SmOoxmlImport::handleGroupChr()
 return ret;
 }
 
+OUString SmOoxmlImport::handleM()
+{
+stream.ensureOpeningTag( M_TOKEN( m ));
+OUString allrows;
+do // there must be at least one m:mr
+{
+stream.ensureOpeningTag( M_TOKEN( mr ));
+OUString row;
+do // there must be at least one m:e
+{
+if( !row.isEmpty())
+row += STR(  #  );
+row += handleE();
+} while( !stream.atEnd()  stream.currentToken() == OPENING( M_TOKEN( 
e )));
+if( !allrows.isEmpty())
+allrows += STR(  ##  );
+allrows += row;
+stream.ensureClosingTag( M_TOKEN( mr ));
+} while( !stream.atEnd()  stream.currentToken() == OPENING( M_TOKEN( mr 
)));
+stream.ensureClosingTag( M_TOKEN( m ));
+return STR( matrix { ) + allrows + STR( } );
+}
+
 // NOT complete
 OUString SmOoxmlImport::handleR()
 {
diff --git a/starmath/source/ooxmlimport.hxx b/starmath/source/ooxmlimport.hxx
index c0786bc..05963d6 100644
--- a/starmath/source/ooxmlimport.hxx
+++ b/starmath/source/ooxmlimport.hxx
@@ -54,6 +54,7 @@ private:
 enum LimLowUpp_t { LimLow, LimUpp };
 rtl::OUString handleLimLowUpp( LimLowUpp_t limlowupp );
 rtl::OUString handleGroupChr();
+rtl::OUString handleM();
 rtl::OUString handleR();
 rtl::OUString readOMathArg();
 oox::formulaimport::XmlStream stream;
commit 82c78e8790f341373c84f4b5bae5b3834b7b18ce
Author: Luboš Luňák l.lu...@suse.cz
Date:   Tue Nov 29 21:09:43 2011 +0100

finish reading in while() also when end of stream, just in case

diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx
index 2a29d0a..530195c 100644
--- a/starmath/source/ooxmlimport.cxx
+++ b/starmath/source/ooxmlimport.cxx
@@ -89,7 +89,7 @@ OUString SmOoxmlImport::handleStream()
 OUString SmOoxmlImport::readOMathArg()
 {
 OUString ret;
-while( stream.currentToken() != CLOSING( stream.currentToken()))
+while( !stream.atEnd()  stream.currentToken() != CLOSING( 
stream.currentToken()))
 {
 if( !ret.isEmpty())
 ret += STR(   );
@@ -409,7 +409,7 @@ OUString SmOoxmlImport::handleR()
 stream.ensureClosingTag( OOX_TOKEN( doc, rPr ));
 }
 OUString text;
-while( stream.currentToken() != CLOSING( stream.currentToken()))
+while( !stream.atEnd()  stream.currentToken() != CLOSING( 
stream.currentToken()))
 {
 switch( stream.currentToken())
 {
commit ad1a6c6d507f2480efa582ad8b864d65dede1314
Author: Luboš Luňák l.lu...@suse.cz
Date:   Tue Nov 29 21:06:44 2011 +0100

improve import of docx m:d

diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx
index 6d3e4c9..2a29d0a 100644
--- a/starmath/source/ooxmlimport.cxx
+++ b/starmath/source/ooxmlimport.cxx
@@ -243,9 +243,9 @@ OUString SmOoxmlImport::handleBorderBox()
 OUString SmOoxmlImport::handleD()
 {
 stream.ensureOpeningTag( M_TOKEN( d ));
-sal_Unicode opening = '(';
-sal_Unicode closing = ')';
-sal_Unicode separator = '|';
+OUString opening = STR( ( );
+OUString closing = STR( ) );
+OUString separator = STR( | );
 if( XmlStream::Tag dPr = stream.checkOpeningTag( M_TOKEN( dPr )))
 {
 if( XmlStream::Tag begChr = stream.checkOpeningTag( M_TOKEN( begChr )))
@@ -265,15 +265,40 @@ OUString SmOoxmlImport::handleD()
 }
 stream.ensureClosingTag( M_TOKEN( dPr ));
 }
+if( opening == STR( { ))
+opening = STR( left lbrace  );
+if( closing == STR( } ))
+closing = STR(  right rbrace );
+if( opening == OUString( sal_Unicode( 0x27e6 )))
+opening = STR( left ldbracket  );
+if( closing == OUString( sal_Unicode( 0x27e7 )))
+closing = STR(  right rdbracket );
+if( opening == STR( | ))
+   

Re: [Libreoffice-commits] .: solenv/gbuild

2011-11-30 Thread Lubos Lunak
On Wednesday 30 of November 2011, Bjoern Michaelsen wrote:
  solenv/gbuild/extensions/post_BuildplTargets.mk |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 New commits:
 commit 1f538764acdd67c3f294cd03da006ace27f736ef
 Author: Bjoern Michaelsen bjoern.michael...@canonical.com
 Date:   Wed Nov 30 14:02:08 2011 +0100

 make build.pl verbose on non-silent builds

 This does not work, the build is verbose regardless of any -s passed to make. 
Moreover I question the usefullness of having verbose build by default.

 diff --git a/solenv/gbuild/extensions/post_BuildplTargets.mk
 b/solenv/gbuild/extensions/post_BuildplTargets.mk index 7e9b898..cd3101d
 100644
 --- a/solenv/gbuild/extensions/post_BuildplTargets.mk
 +++ b/solenv/gbuild/extensions/post_BuildplTargets.mk
 @@ -54,7 +54,7 @@ endif

  gb_BuildplTarget_COMPLETEDTARGETS=
  define gb_BuildplTarget_command
 -cd $(SRCDIR)/$(1)  unset MAKEFLAGS  $(SOLARENV)/bin/build.pl
 -P$(BUILD_NCPUS) $(2) -P$(GMAKE_PARALLELISM) gb_MAKETARGET=$(gb_MAKETARGET)
 +cd $(SRCDIR)/$(1)  unset MAKEFLAGS  $(SOLARENV)/bin/build.pl $(if
 $(filter s,$(MAKEFLAGS)),,VERBOSE=T) -P$(BUILD_NCPUS) $(2)
 -P$(GMAKE_PARALLELISM) gb_MAKETARGET=$(gb_MAKETARGET) $(eval
 gb_BuildplTarget_COMPLETEDTARGETS+=$(1))
  endef

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


[Libreoffice-commits] .: solenv/gbuild

2011-12-07 Thread Lubos Lunak
 solenv/gbuild/platform/unxgcc.mk |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 4d204919623b98c5592a1d191bb854043523d170
Author: Luboš Luňák l.lu...@suse.cz
Date:   Wed Dec 7 14:28:15 2011 +0100

when stripping is disabled, strip nothing

diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 28fd943..43d832a 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -150,8 +150,6 @@ endif
 ifneq ($(gb_SYMBOL),$(true))
 ifeq ($(gb_STRIP),$(true))
 gb_LinkTarget_LDFLAGS += -Wl,--strip-all
-else
-gb_LinkTarget_LDFLAGS += -Wl,--strip-debug
 endif
 endif
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2011-12-07 Thread Lubos Lunak
 sw/source/core/text/frmform.cxx |   11 ++-
 sw/source/core/text/inftxt.cxx  |3 ++-
 sw/source/core/text/txtfly.cxx  |6 --
 sw/source/core/text/txtfrm.cxx  |7 +--
 4 files changed, 17 insertions(+), 10 deletions(-)

New commits:
commit 4c7dc58e47796ff502bbdc5fb93c648c30fc4daf
Author: Luboš Luňák l.lu...@suse.cz
Date:   Wed Dec 7 17:23:47 2011 +0100

backport of 3524727db0f3cfecf3a47046795c527808c10c3e
commit 3524727db0f3cfecf3a47046795c527808c10c3e
Author: Caolán McNamara caol...@redhat.com
Date:   Thu Jun 23 15:14:00 2011 +0100

Related: #i58612# don't crash anyway

diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 80c8c76..c383c7e 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -1445,10 +1445,11 @@ void SwTxtFrm::_Format( SwTxtFormatter rLine, 
SwTxtFormatInfo rInf,
 
 if( IsFollow()  IsFieldFollow()  rLine.GetStart() == GetOfst() )
 {
-const SwLineLayout* pLine;
+SwTxtFrm *pMaster = FindMaster();
+OSL_ENSURE( pMaster, SwTxtFrm::Format: homeless follow );
+const SwLineLayout* pLine=NULL;
+if (pMaster)
 {
-SwTxtFrm *pMaster = FindMaster();
-OSL_ENSURE( pMaster, SwTxtFrm::Format: homeless follow );
 if( !pMaster-HasPara() )
 pMaster-GetFormatted();
 SwTxtSizeInfo aInf( pMaster );
@@ -1456,8 +1457,8 @@ void SwTxtFrm::_Format( SwTxtFormatter rLine, 
SwTxtFormatInfo rInf,
 aMasterLine.Bottom();
 pLine = aMasterLine.GetCurr();
 }
-SwLinePortion* pRest =
-rLine.MakeRestPortion( pLine, GetOfst() );
+SwLinePortion* pRest = pLine ?
+rLine.MakeRestPortion(pLine, GetOfst()) : NULL;
 if( pRest )
 rInf.SetRest( pRest );
 else
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index ee9f9b9..87a81cd 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -1469,7 +1469,8 @@ void SwTxtFormatInfo::Init()
 if ( GetTxtFrm()-IsFollow() )
 {
 const SwTxtFrm* pMaster = GetTxtFrm()-FindMaster();
-const SwLinePortion* pTmpPara = pMaster-GetPara();
+OSL_ENSURE(pMaster, pTxtFrm without Master);
+const SwLinePortion* pTmpPara = pMaster ? pMaster-GetPara() : NULL;
 
 // there is a master for this follow and the master does not have
 // any contents (especially it does not have a number portion)
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index 78f7021..e2d734d 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -895,7 +895,7 @@ sal_Bool SwTxtFly::IsAnyObj( const SwRect rRect ) const
 const SwCntntFrm* SwTxtFly::_GetMaster()
 {
 pMaster = pCurrFrm;
-while( pMaster-IsFollow() )
+while( pMaster  pMaster-IsFollow() )
 pMaster = (SwCntntFrm*)pMaster-FindMaster();
 return pMaster;
 }
@@ -1614,7 +1614,9 @@ SwAnchoredObjList* SwTxtFly::InitAnchoredObjList()
 SwTwips SwTxtFly::CalcMinBottom() const
 {
 SwTwips nRet = 0;
-const SwSortedObjs *pDrawObj = GetMaster()-GetDrawObjs();
+const SwCntntFrm *pLclMaster = GetMaster();
+OSL_ENSURE(pLclMaster, SwTxtFly without master);
+const SwSortedObjs *pDrawObj = pLclMaster ? pLclMaster-GetDrawObjs() : 
NULL;
 const sal_uInt32 nCount = pDrawObj ? pDrawObj-Count() : 0;
 if( nCount )
 {
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index d90794b..77343ab 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -650,9 +650,12 @@ void SwTxtFrm::HideAndShowObjects()
 }
 }
 
-if ( IsFollow() )
+if (IsFollow())
 {
-FindMaster()-HideAndShowObjects();
+SwTxtFrm *pMaster = FindMaster();
+OSL_ENSURE(pMaster, SwTxtFrm without master);
+if (pMaster)
+pMaster-HideAndShowObjects();
 }
 }
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: starmath/qa

2011-12-08 Thread Lubos Lunak
 starmath/qa/testdocuments/docx/accents.docx  |binary
 starmath/qa/testdocuments/docx/d.docx|binary
 starmath/qa/testdocuments/docx/escaping.docx |binary
 starmath/qa/testdocuments/docx/lim.docx  |binary
 starmath/qa/testdocuments/docx/malformed_xml.docx|binary
 starmath/qa/testdocuments/docx/matrix.docx   |binary
 starmath/qa/testdocuments/docx/mso2k7.docx   |binary
 starmath/qa/testdocuments/docx/nary.docx |binary
 starmath/qa/testdocuments/docx/overbrace_underbrace.docx |binary
 starmath/qa/testdocuments/docx/overstrike.docx   |binary
 starmath/qa/testdocuments/docx/placeholders.docx |binary
 starmath/qa/testdocuments/docx/rad.docx  |binary
 starmath/qa/testdocuments/docx/subscripts.docx   |binary
 starmath/qa/testdocuments/docx/vertical_stacks.docx  |binary
 14 files changed

New commits:
commit 9a8d7e2a3f41f9e1c39c5634714a3a2b21776670
Author: Luboš Luňák l.lu...@suse.cz
Date:   Thu Dec 8 16:33:22 2011 +0100

add docx starmath testing documents

It's simply a bunch of documents with various math features in them.
It'd be nice to have an automated test built on top of them that
checks the formula is the same (roughly, in the meaning, it can't be
precise because import adds e.g. extra {}'s) after an export+import
roundtrip.

diff --git a/starmath/qa/testdocuments/docx/accents.docx 
b/starmath/qa/testdocuments/docx/accents.docx
new file mode 100644
index 000..b623cb5
Binary files /dev/null and b/starmath/qa/testdocuments/docx/accents.docx differ
diff --git a/starmath/qa/testdocuments/docx/d.docx 
b/starmath/qa/testdocuments/docx/d.docx
new file mode 100644
index 000..a18afdd
Binary files /dev/null and b/starmath/qa/testdocuments/docx/d.docx differ
diff --git a/starmath/qa/testdocuments/docx/escaping.docx 
b/starmath/qa/testdocuments/docx/escaping.docx
new file mode 100644
index 000..d51c475
Binary files /dev/null and b/starmath/qa/testdocuments/docx/escaping.docx differ
diff --git a/starmath/qa/testdocuments/docx/lim.docx 
b/starmath/qa/testdocuments/docx/lim.docx
new file mode 100644
index 000..6adb548
Binary files /dev/null and b/starmath/qa/testdocuments/docx/lim.docx differ
diff --git a/starmath/qa/testdocuments/docx/malformed_xml.docx 
b/starmath/qa/testdocuments/docx/malformed_xml.docx
new file mode 100644
index 000..53d64b0
Binary files /dev/null and b/starmath/qa/testdocuments/docx/malformed_xml.docx 
differ
diff --git a/starmath/qa/testdocuments/docx/matrix.docx 
b/starmath/qa/testdocuments/docx/matrix.docx
new file mode 100644
index 000..d6b5b18
Binary files /dev/null and b/starmath/qa/testdocuments/docx/matrix.docx differ
diff --git a/starmath/qa/testdocuments/docx/mso2k7.docx 
b/starmath/qa/testdocuments/docx/mso2k7.docx
new file mode 100644
index 000..b6b16ef
Binary files /dev/null and b/starmath/qa/testdocuments/docx/mso2k7.docx differ
diff --git a/starmath/qa/testdocuments/docx/nary.docx 
b/starmath/qa/testdocuments/docx/nary.docx
new file mode 100644
index 000..f3bb781
Binary files /dev/null and b/starmath/qa/testdocuments/docx/nary.docx differ
diff --git a/starmath/qa/testdocuments/docx/overbrace_underbrace.docx 
b/starmath/qa/testdocuments/docx/overbrace_underbrace.docx
new file mode 100644
index 000..e4119f6
Binary files /dev/null and 
b/starmath/qa/testdocuments/docx/overbrace_underbrace.docx differ
diff --git a/starmath/qa/testdocuments/docx/overstrike.docx 
b/starmath/qa/testdocuments/docx/overstrike.docx
new file mode 100644
index 000..9809edc
Binary files /dev/null and b/starmath/qa/testdocuments/docx/overstrike.docx 
differ
diff --git a/starmath/qa/testdocuments/docx/placeholders.docx 
b/starmath/qa/testdocuments/docx/placeholders.docx
new file mode 100644
index 000..1c32c04
Binary files /dev/null and b/starmath/qa/testdocuments/docx/placeholders.docx 
differ
diff --git a/starmath/qa/testdocuments/docx/rad.docx 
b/starmath/qa/testdocuments/docx/rad.docx
new file mode 100644
index 000..39194dc
Binary files /dev/null and b/starmath/qa/testdocuments/docx/rad.docx differ
diff --git a/starmath/qa/testdocuments/docx/subscripts.docx 
b/starmath/qa/testdocuments/docx/subscripts.docx
new file mode 100644
index 000..038925f
Binary files /dev/null and b/starmath/qa/testdocuments/docx/subscripts.docx 
differ
diff --git a/starmath/qa/testdocuments/docx/vertical_stacks.docx 
b/starmath/qa/testdocuments/docx/vertical_stacks.docx
new file mode 100644
index 000..50dfab0
Binary files /dev/null and 
b/starmath/qa/testdocuments/docx/vertical_stacks.docx differ
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: configure.in set_soenv.in solenv/gbuild

2011-12-08 Thread Lubos Lunak
 configure.in|   18 ++
 set_soenv.in|1 +
 solenv/gbuild/platform/WNT_INTEL_GCC.mk |7 +++
 solenv/gbuild/platform/unxgcc.mk|7 +++
 4 files changed, 33 insertions(+)

New commits:
commit 5214f7843ca48f2207945fbfe32ba164afe7b3aa
Author: Luboš Luňák l.lu...@suse.cz
Date:   Thu Dec 8 16:38:23 2011 +0100

enable -gdwarf-4 by default if possible

http://lists.freedesktop.org/archives/libreoffice/2011-December/021638.html

diff --git a/configure.in b/configure.in
index 4cfeae0..0fe12fa 100644
--- a/configure.in
+++ b/configure.in
@@ -3821,6 +3821,24 @@ AC_SUBST(HAVE_GCC_VISIBILITY_FEATURE)
 AC_SUBST(HAVE_GCC_VISIBILITY_BROKEN)
 
 dnl ===
+dnl gcc DWARF-4 support (smaller debug info)
+dnl ===
+if test $GCC = yes; then
+AC_MSG_CHECKING([whether $CC supports -gdwarf-4])
+save_CFLAGS=$CFLAGS
+CFLAGS=$CFLAGS -Werror -gdwarf-4
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ 
HAVE_GCC_DWARF_4=TRUE ],[])
+CFLAGS=$save_CFLAGS
+if test $HAVE_GCC_DWARF_4 = TRUE; then
+AC_MSG_RESULT([yes])
+else
+AC_MSG_RESULT([no])
+fi
+fi
+
+AC_SUBST(HAVE_GCC_DWARF_4)
+
+dnl ===
 dnl allocator
 dnl ===
 AC_MSG_CHECKING([which memory allocator to use])
diff --git a/set_soenv.in b/set_soenv.in
index bef9405..3bb806a 100755
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -1779,6 +1779,7 @@ ToFile( HAVE_GCC_VISIBILITY_FEATURE,
@HAVE_GCC_VISIBILITY_FEATURE@, e );
 ToFile( HAVE_GCC_VISIBILITY_BROKEN,
 @HAVE_GCC_VISIBILITY_BROKEN@, e );
+ToFile( HAVE_GCC_DWARF_4,@HAVE_GCC_DWARF_4@,e );
 ToFile( HAVE_LD_HASH_STYLE,@HAVE_LD_HASH_STYLE@,e );
 ToFile( WITH_LINKER_HASH_STYLE,@WITH_LINKER_HASH_STYLE@,e );
 ToFile( HAVE_LD_BSYMBOLIC_FUNCTIONS,
diff --git a/solenv/gbuild/platform/WNT_INTEL_GCC.mk 
b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
index c0739f4..7363654 100644
--- a/solenv/gbuild/platform/WNT_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
@@ -99,6 +99,9 @@ gb_LinkTarget_LDFLAGS += -shared-libgcc
 endif
 
 gb_DEBUG_CFLAGS := -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
+ifeq ($(HAVE_GCC_DWARF_4),TRUE)
+gb_DEBUG_CFLAGS += -gdwarf-4
+endif
 
 gb_STDLIBS := \
mingwthrd \
@@ -152,6 +155,10 @@ gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) 
$(gb_CXXFLAGS_WERROR)
 ifeq ($(gb_SYMBOL),$(true))
 gb_LinkTarget_CXXFLAGS += -ggdb2
 gb_LinkTarget_CFLAGS += -ggdb2
+ifeq ($(HAVE_GCC_DWARF_4),TRUE)
+gb_LinkTarget_CXXFLAGS += -gdwarf-4
+gb_LinkTarget_CFLAGS += -gdwarf-4
+endif
 endif
 
 gb_LinkTarget_INCLUDE +=\
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 7403488..37c203f 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -162,6 +162,9 @@ gb_LINKEROPTFLAGS := -Wl,-O1
 endif
 
 gb_DEBUG_CFLAGS := -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
+ifeq ($(HAVE_GCC_DWARF_4),TRUE)
+gb_DEBUG_CFLAGS += -gdwarf-4
+endif
 
 gb_COMPILERNOOPTFLAGS := -O0
 
@@ -206,6 +209,10 @@ gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) 
$(gb_CXXFLAGS_WERROR)
 ifeq ($(gb_SYMBOL),$(true))
 gb_LinkTarget_CXXFLAGS += -ggdb2
 gb_LinkTarget_CFLAGS += -ggdb2
+ifeq ($(HAVE_GCC_DWARF_4),TRUE)
+gb_LinkTarget_CXXFLAGS += -gdwarf-4
+gb_LinkTarget_CFLAGS += -gdwarf-4
+endif
 endif
 
 # note that `cat $(extraobjectlist)` is needed to build with older gcc 
versions, e.g. 4.1.2 on SLED10
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2011-12-12 Thread Lubos Lunak
 sw/source/filter/ww8/docxattributeoutput.cxx |   28 ++-
 sw/source/filter/ww8/docxattributeoutput.hxx |   10 +
 2 files changed, 17 insertions(+), 21 deletions(-)

New commits:
commit 5cd2ae45c3da7b018b45ce00153f7ca4791a5d11
Author: Luboš Luňák l.lu...@suse.cz
Date:   Mon Dec 12 18:11:17 2011 +0100

fix docx hyperlink writing

This is a rewrite of the fix for fdo#35826, needed for writing
the document from bnc#706138 as docx. The sequence there is
startURL(), runText(), endRun(), endUrl(), startUrl(), runText(), endUrl(), 
endRun(),
so by the second endRun(), it is needed to close both the previous
and current hyperlink run.

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 42a132d..d9f3376 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -516,8 +516,6 @@ void DocxAttributeOutput::StartRun( const SwRedlineData* 
pRedlineData )
 
 void DocxAttributeOutput::EndRun()
 {
-if ( m_nCloseHyperlinkStatus == Detected )
-m_nCloseHyperlinkStatus = EndInThisRun;
 // Write field starts
 for ( std::vectorFieldInfos::iterator pIt = m_Fields.begin(); pIt != 
m_Fields.end(); ++pIt )
 {
@@ -543,6 +541,11 @@ void DocxAttributeOutput::EndRun()
 // before postponed run start)
 m_pSerializer-mark(); // let's call it actual run start
 
+if ( m_closeHyperlinkInPreviousRun )
+{
+m_pSerializer-endElementNS( XML_w, XML_hyperlink );
+m_closeHyperlinkInPreviousRun = false;
+}
 // prepend the actual run start
 if ( m_pHyperlinkAttrList )
 {
@@ -551,11 +554,6 @@ void DocxAttributeOutput::EndRun()
 m_pSerializer-startElementNS( XML_w, XML_hyperlink, xAttrList );
 m_pHyperlinkAttrList = NULL;
 }
-if ( m_nCloseHyperlinkStatus == EndInPrevRun)
-{
-m_pSerializer-endElementNS( XML_w, XML_hyperlink );
-m_nCloseHyperlinkStatus = Undetected;
-}
 
 // Write the hyperlink and toc fields starts
 for ( std::vectorFieldInfos::iterator pIt = m_Fields.begin(); pIt != 
m_Fields.end(); )
@@ -592,10 +590,10 @@ void DocxAttributeOutput::EndRun()
 EndField_Impl( m_Fields.front( ) );
 m_Fields.erase( m_Fields.begin( ) );
 }
-if ( m_nCloseHyperlinkStatus == EndInThisRun)
+if ( m_closeHyperlinkInThisRun )
 {
 m_pSerializer-endElementNS( XML_w, XML_hyperlink );
-m_nCloseHyperlinkStatus = Undetected;
+m_closeHyperlinkInThisRun = false;
 }
 
 // if there is some redlining in the document, output it
@@ -1043,8 +1041,11 @@ static void impl_WriteRunText( FSHelperPtr pSerializer, 
sal_Int32 nTextToken,
 
 void DocxAttributeOutput::RunText( const String rText, rtl_TextEncoding 
/*eCharSet*/ )
 {
-if ( m_nCloseHyperlinkStatus == Detected )
-m_nCloseHyperlinkStatus = EndInPrevRun;
+if( m_closeHyperlinkInThisRun )
+{
+m_closeHyperlinkInPreviousRun = true;
+m_closeHyperlinkInThisRun = false;
+}
 OUString aText( rText );
 
 // one text can be split into more w:tblah/w:t's by line breaks etc.
@@ -1232,7 +1233,7 @@ bool DocxAttributeOutput::StartURL( const String rUrl, 
const String rTarget )
 
 bool DocxAttributeOutput::EndURL()
 {
-m_nCloseHyperlinkStatus = Detected;
+m_closeHyperlinkInThisRun = true;
 return true;
 }
 
@@ -4350,7 +4351,8 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport 
rExport, FSHelperPtr pSeri
   m_bParagraphOpened( false ),
   m_nColBreakStatus( COLBRK_NONE ),
   m_pParentFrame( NULL ),
-  m_nCloseHyperlinkStatus( Undetected ),
+  m_closeHyperlinkInThisRun( false ),
+  m_closeHyperlinkInPreviousRun( false ),
   m_postponedGraphic( NULL ),
   m_postponedMath( NULL ),
   m_postitFieldsMaxId( 0 )
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx 
b/sw/source/filter/ww8/docxattributeoutput.hxx
index 10ee7cd..79c8b02 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -588,14 +588,8 @@ private:
 
 const sw::Frame *m_pParentFrame;
 // close of hyperlink needed
-enum HyperLinkCloseState
-{
-Undetected = 0,
-Detected,
-EndInPrevRun,
-EndInThisRun
-};
-HyperLinkCloseState m_nCloseHyperlinkStatus;
+bool m_closeHyperlinkInThisRun;
+bool m_closeHyperlinkInPreviousRun;
 
 struct PostponedGraphic
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2011-12-12 Thread Lubos Lunak
 sw/source/filter/ww8/docxattributeoutput.cxx |   28 ++-
 sw/source/filter/ww8/docxattributeoutput.hxx |   10 +
 2 files changed, 17 insertions(+), 21 deletions(-)

New commits:
commit f176c9ba7be7f3051a52b9f57b56124038c0cfd6
Author: Luboš Luňák l.lu...@suse.cz
Date:   Mon Dec 12 18:11:17 2011 +0100

fix docx hyperlink writing

This is a rewrite of the fix for fdo#35826, needed for writing
the document from bnc#706138 as docx. The sequence there is
startURL(), runText(), endRun(), endUrl(), startUrl(), runText(), endUrl(), 
endRun(),
so by the second endRun(), it is needed to close both the previous
and current hyperlink run.

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 42a132d..d9f3376 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -516,8 +516,6 @@ void DocxAttributeOutput::StartRun( const SwRedlineData* 
pRedlineData )
 
 void DocxAttributeOutput::EndRun()
 {
-if ( m_nCloseHyperlinkStatus == Detected )
-m_nCloseHyperlinkStatus = EndInThisRun;
 // Write field starts
 for ( std::vectorFieldInfos::iterator pIt = m_Fields.begin(); pIt != 
m_Fields.end(); ++pIt )
 {
@@ -543,6 +541,11 @@ void DocxAttributeOutput::EndRun()
 // before postponed run start)
 m_pSerializer-mark(); // let's call it actual run start
 
+if ( m_closeHyperlinkInPreviousRun )
+{
+m_pSerializer-endElementNS( XML_w, XML_hyperlink );
+m_closeHyperlinkInPreviousRun = false;
+}
 // prepend the actual run start
 if ( m_pHyperlinkAttrList )
 {
@@ -551,11 +554,6 @@ void DocxAttributeOutput::EndRun()
 m_pSerializer-startElementNS( XML_w, XML_hyperlink, xAttrList );
 m_pHyperlinkAttrList = NULL;
 }
-if ( m_nCloseHyperlinkStatus == EndInPrevRun)
-{
-m_pSerializer-endElementNS( XML_w, XML_hyperlink );
-m_nCloseHyperlinkStatus = Undetected;
-}
 
 // Write the hyperlink and toc fields starts
 for ( std::vectorFieldInfos::iterator pIt = m_Fields.begin(); pIt != 
m_Fields.end(); )
@@ -592,10 +590,10 @@ void DocxAttributeOutput::EndRun()
 EndField_Impl( m_Fields.front( ) );
 m_Fields.erase( m_Fields.begin( ) );
 }
-if ( m_nCloseHyperlinkStatus == EndInThisRun)
+if ( m_closeHyperlinkInThisRun )
 {
 m_pSerializer-endElementNS( XML_w, XML_hyperlink );
-m_nCloseHyperlinkStatus = Undetected;
+m_closeHyperlinkInThisRun = false;
 }
 
 // if there is some redlining in the document, output it
@@ -1043,8 +1041,11 @@ static void impl_WriteRunText( FSHelperPtr pSerializer, 
sal_Int32 nTextToken,
 
 void DocxAttributeOutput::RunText( const String rText, rtl_TextEncoding 
/*eCharSet*/ )
 {
-if ( m_nCloseHyperlinkStatus == Detected )
-m_nCloseHyperlinkStatus = EndInPrevRun;
+if( m_closeHyperlinkInThisRun )
+{
+m_closeHyperlinkInPreviousRun = true;
+m_closeHyperlinkInThisRun = false;
+}
 OUString aText( rText );
 
 // one text can be split into more w:tblah/w:t's by line breaks etc.
@@ -1232,7 +1233,7 @@ bool DocxAttributeOutput::StartURL( const String rUrl, 
const String rTarget )
 
 bool DocxAttributeOutput::EndURL()
 {
-m_nCloseHyperlinkStatus = Detected;
+m_closeHyperlinkInThisRun = true;
 return true;
 }
 
@@ -4350,7 +4351,8 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport 
rExport, FSHelperPtr pSeri
   m_bParagraphOpened( false ),
   m_nColBreakStatus( COLBRK_NONE ),
   m_pParentFrame( NULL ),
-  m_nCloseHyperlinkStatus( Undetected ),
+  m_closeHyperlinkInThisRun( false ),
+  m_closeHyperlinkInPreviousRun( false ),
   m_postponedGraphic( NULL ),
   m_postponedMath( NULL ),
   m_postitFieldsMaxId( 0 )
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx 
b/sw/source/filter/ww8/docxattributeoutput.hxx
index 10ee7cd..79c8b02 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -588,14 +588,8 @@ private:
 
 const sw::Frame *m_pParentFrame;
 // close of hyperlink needed
-enum HyperLinkCloseState
-{
-Undetected = 0,
-Detected,
-EndInPrevRun,
-EndInThisRun
-};
-HyperLinkCloseState m_nCloseHyperlinkStatus;
+bool m_closeHyperlinkInThisRun;
+bool m_closeHyperlinkInPreviousRun;
 
 struct PostponedGraphic
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: solenv/gbuild

2011-12-15 Thread Lubos Lunak
 solenv/gbuild/platform/WNT_INTEL_GCC.mk |2 +-
 solenv/gbuild/platform/unxgcc.mk|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 039fd52b968349da8687dae1aeb5b42e2830dfa2
Author: Luboš Luňák l.lu...@suse.cz
Date:   Thu Dec 15 14:23:48 2011 +0100

fix one -ggdb3 that got in in a merge after 0b5b56be4df609d

diff --git a/solenv/gbuild/platform/WNT_INTEL_GCC.mk 
b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
index 40027a1..5b49bff 100644
--- a/solenv/gbuild/platform/WNT_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
@@ -97,7 +97,7 @@ ifeq ($(MINGW_GCCLIB_EH),YES)
 gb_LinkTarget_LDFLAGS += -shared-libgcc
 endif
 
-gb_DEBUG_CFLAGS := -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
+gb_DEBUG_CFLAGS := -ggdb2 -finline-limit=0 -fno-inline -fno-default-inline
 ifeq ($(HAVE_GCC_DWARF_4),TRUE)
 gb_DEBUG_CFLAGS += -gdwarf-4
 endif
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 37c203f..851e020 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -161,7 +161,7 @@ gb_COMPILEROPTFLAGS := $(gb_COMPILERDEFAULTOPTFLAGS)
 gb_LINKEROPTFLAGS := -Wl,-O1
 endif
 
-gb_DEBUG_CFLAGS := -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
+gb_DEBUG_CFLAGS := -ggdb2 -finline-limit=0 -fno-inline -fno-default-inline
 ifeq ($(HAVE_GCC_DWARF_4),TRUE)
 gb_DEBUG_CFLAGS += -gdwarf-4
 endif
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: configure.in set_soenv.in solenv/gbuild

2011-12-15 Thread Lubos Lunak
 configure.in|   18 --
 set_soenv.in|1 -
 solenv/gbuild/platform/WNT_INTEL_GCC.mk |7 ---
 solenv/gbuild/platform/unxgcc.mk|7 ---
 4 files changed, 33 deletions(-)

New commits:
commit e87fc0bfde8bd48b449e123c1bdd28e1359e8c77
Author: Luboš Luňák l.lu...@suse.cz
Date:   Thu Dec 15 16:59:17 2011 +0100

Revert enable -gdwarf-4 by default if possible

It turns out even quite recent gdb (7.1) reportedly does not
support DWARF4, moreover while the produced binaries are smaller,
faster and make gdb initially use less memory, this quickly ceases
to the case as soon as one actually does anything in gdb.
Presumably the DWARF4 handling in current gdb is very inefficient
(http://sourceware.org/bugzilla/show_bug.cgi?id=13498).

This reverts commit 5214f7843ca48f2207945fbfe32ba164afe7b3aa.

Conflicts:

solenv/gbuild/platform/WNT_INTEL_GCC.mk
solenv/gbuild/platform/unxgcc.mk

diff --git a/configure.in b/configure.in
index 59cb7fb..354fa52 100644
--- a/configure.in
+++ b/configure.in
@@ -3824,24 +3824,6 @@ AC_SUBST(HAVE_GCC_VISIBILITY_FEATURE)
 AC_SUBST(HAVE_GCC_VISIBILITY_BROKEN)
 
 dnl ===
-dnl gcc DWARF-4 support (smaller debug info)
-dnl ===
-if test $GCC = yes; then
-AC_MSG_CHECKING([whether $CC supports -gdwarf-4])
-save_CFLAGS=$CFLAGS
-CFLAGS=$CFLAGS -Werror -gdwarf-4
-AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ 
HAVE_GCC_DWARF_4=TRUE ],[])
-CFLAGS=$save_CFLAGS
-if test $HAVE_GCC_DWARF_4 = TRUE; then
-AC_MSG_RESULT([yes])
-else
-AC_MSG_RESULT([no])
-fi
-fi
-
-AC_SUBST(HAVE_GCC_DWARF_4)
-
-dnl ===
 dnl allocator
 dnl ===
 AC_MSG_CHECKING([which memory allocator to use])
diff --git a/set_soenv.in b/set_soenv.in
index 2150be5..1506366 100755
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -1700,7 +1700,6 @@ ToFile( HAVE_GCC_VISIBILITY_FEATURE,
@HAVE_GCC_VISIBILITY_FEATURE@, e );
 ToFile( HAVE_GCC_VISIBILITY_BROKEN,
 @HAVE_GCC_VISIBILITY_BROKEN@, e );
-ToFile( HAVE_GCC_DWARF_4,@HAVE_GCC_DWARF_4@,e );
 ToFile( HAVE_LD_HASH_STYLE,@HAVE_LD_HASH_STYLE@,e );
 ToFile( WITH_LINKER_HASH_STYLE,@WITH_LINKER_HASH_STYLE@,e );
 ToFile( HAVE_LD_BSYMBOLIC_FUNCTIONS,
diff --git a/solenv/gbuild/platform/WNT_INTEL_GCC.mk 
b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
index 5b49bff..c7387e9 100644
--- a/solenv/gbuild/platform/WNT_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
@@ -98,9 +98,6 @@ gb_LinkTarget_LDFLAGS += -shared-libgcc
 endif
 
 gb_DEBUG_CFLAGS := -ggdb2 -finline-limit=0 -fno-inline -fno-default-inline
-ifeq ($(HAVE_GCC_DWARF_4),TRUE)
-gb_DEBUG_CFLAGS += -gdwarf-4
-endif
 
 gb_STDLIBS := \
mingwthrd \
@@ -154,10 +151,6 @@ gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) 
$(gb_CXXFLAGS_WERROR)
 ifeq ($(gb_SYMBOL),$(true))
 gb_LinkTarget_CXXFLAGS += -ggdb2
 gb_LinkTarget_CFLAGS += -ggdb2
-ifeq ($(HAVE_GCC_DWARF_4),TRUE)
-gb_LinkTarget_CXXFLAGS += -gdwarf-4
-gb_LinkTarget_CFLAGS += -gdwarf-4
-endif
 endif
 
 gb_LinkTarget_INCLUDE +=\
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 851e020..4b80cee 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -162,9 +162,6 @@ gb_LINKEROPTFLAGS := -Wl,-O1
 endif
 
 gb_DEBUG_CFLAGS := -ggdb2 -finline-limit=0 -fno-inline -fno-default-inline
-ifeq ($(HAVE_GCC_DWARF_4),TRUE)
-gb_DEBUG_CFLAGS += -gdwarf-4
-endif
 
 gb_COMPILERNOOPTFLAGS := -O0
 
@@ -209,10 +206,6 @@ gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) 
$(gb_CXXFLAGS_WERROR)
 ifeq ($(gb_SYMBOL),$(true))
 gb_LinkTarget_CXXFLAGS += -ggdb2
 gb_LinkTarget_CFLAGS += -ggdb2
-ifeq ($(HAVE_GCC_DWARF_4),TRUE)
-gb_LinkTarget_CXXFLAGS += -gdwarf-4
-gb_LinkTarget_CFLAGS += -gdwarf-4
-endif
 endif
 
 # note that `cat $(extraobjectlist)` is needed to build with older gcc 
versions, e.g. 4.1.2 on SLED10
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - solenv/gbuild writerfilter/source

2011-12-16 Thread Lubos Lunak
 solenv/gbuild/platform/WNT_INTEL_MSC.mk |2 +-
 solenv/gbuild/platform/com_GCC_class.mk |2 +-
 solenv/gbuild/platform/solaris.mk   |2 +-
 writerfilter/source/ooxml/model.xml |   15 +++
 4 files changed, 18 insertions(+), 3 deletions(-)

New commits:
commit d5fe99eae04e0a706f072e1da5943c04f52dcd40
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Dec 16 18:52:53 2011 +0100

at least process sub-elements of w:customXml (fdo#35983)

diff --git a/writerfilter/source/ooxml/model.xml 
b/writerfilter/source/ooxml/model.xml
index 12d29a5..39ecf66 100644
--- a/writerfilter/source/ooxml/model.xml
+++ b/writerfilter/source/ooxml/model.xml
@@ -22700,6 +22700,21 @@
   attribute name=uri tokenid=ooxml:CT_CustomXmlRun_uri/
   attribute name=element tokenid=ooxml:CT_CustomXmlRun_element/
 /resource
+resource name=CT_CustomXmlBlock resource=Properties tag=content
+  element name=customXmlPr 
tokenid=ooxml:CT_CustomXmlBlock_customXmlPr/
+  attribute name=uri tokenid=ooxml:CT_CustomXmlBlock_uri/
+  attribute name=element tokenid=ooxml:CT_CustomXmlBlock_element/
+/resource
+resource name=CT_CustomXmlCell resource=Properties tag=content
+  element name=customXmlPr 
tokenid=ooxml:CT_CustomXmlCell_customXmlPr/
+  attribute name=uri tokenid=ooxml:CT_CustomXmlCell_uri/
+  attribute name=element tokenid=ooxml:CT_CustomXmlCell_element/
+/resource
+resource name=CT_CustomXmlRow resource=Properties tag=content
+  element name=customXmlPr tokenid=ooxml:CT_CustomXmlRow_customXmlPr/
+  attribute name=uri tokenid=ooxml:CT_CustomXmlRow_uri/
+  attribute name=element tokenid=ooxml:CT_CustomXmlRow_element/
+/resource
 resource name=CT_SmartTagRun resource=Properties tag=content
   element name=smartTagPr tokenid=ooxml:CT_SmartTagRun_smartTagPr/
   attribute name=uri tokenid=ooxml:CT_SmartTagRun_uri/
commit b55dbc1e19163ba477b32b6234f29018f0d0af02
Author: Luboš Luňák l.lu...@suse.cz
Date:   Wed Dec 14 16:41:01 2011 +0100

make gbuild output [Build CXX] filename also with the .cxx extension

diff --git a/solenv/gbuild/platform/WNT_INTEL_MSC.mk 
b/solenv/gbuild/platform/WNT_INTEL_MSC.mk
index 45c9609..ddf9aea 100644
--- a/solenv/gbuild/platform/WNT_INTEL_MSC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_MSC.mk
@@ -299,7 +299,7 @@ endef
 # CxxObject class
 
 define gb_CxxObject__command
-$(call gb_Output_announce,$(2),$(true),CXX,3)
+$(call gb_Output_announce,$(2).cxx,$(true),CXX,3)
 $(call gb_Helper_abbreviate_dirs_native,\
mkdir -p $(dir $(1)) $(dir $(4))  \
$(gb_CXX) \
diff --git a/solenv/gbuild/platform/com_GCC_class.mk 
b/solenv/gbuild/platform/com_GCC_class.mk
index 61afbc1..5bf7740 100644
--- a/solenv/gbuild/platform/com_GCC_class.mk
+++ b/solenv/gbuild/platform/com_GCC_class.mk
@@ -44,7 +44,7 @@ endef
 
 # $(call gb_CxxObject__command,object,relative-source,source,dep-file)
 define gb_CxxObject__command
-$(call gb_Output_announce,$(2),$(true),CXX,3)
+$(call gb_Output_announce,$(2).cxx,$(true),CXX,3)
 $(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) $(dir $(4))  \
$(gb_CXX) \
diff --git a/solenv/gbuild/platform/solaris.mk 
b/solenv/gbuild/platform/solaris.mk
index f23571d..a3d055b 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -179,7 +179,7 @@ endef
 # CxxObject class
 
 define gb_CxxObject__command
-$(call gb_Output_announce,$(2),$(true),CXX,3)
+$(call gb_Output_announce,$(2).cxx,$(true),CXX,3)
 $(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) $(dir $(4))  \
$(gb_CXX) \
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 4 commits - oox/inc oox/source starmath/source

2011-12-20 Thread Lubos Lunak
 oox/inc/oox/mathml/importutils.hxx |   19 +++
 oox/source/mathml/importutils.cxx  |   12 ++--
 starmath/source/ooxmlexport.cxx|   32 +++-
 starmath/source/ooxmlexport.hxx|2 +-
 starmath/source/ooxmlimport.cxx|   29 ++---
 starmath/source/ooxmlimport.hxx|2 +-
 6 files changed, 60 insertions(+), 36 deletions(-)

New commits:
commit 577bb0dc298cc376d94ecdd35672081628bb8a93
Author: Luboš Luňák l.lu...@suse.cz
Date:   Tue Dec 20 10:46:43 2011 +0100

if a bracket pair has no left/right bracket, it needs to explicit 
(fdo#32636)

diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx
index 60fb230..1cdee7f 100644
--- a/starmath/source/ooxmlimport.cxx
+++ b/starmath/source/ooxmlimport.cxx
@@ -346,6 +346,10 @@ OUString SmOoxmlImport::handleD()
 closing = STR(  right  ) + closing;
 if( separator == STR( | )) // plain | would be actually V (logical 
or)
 separator = STR(  mline  );
+if( opening.isEmpty())
+opening = STR( left none  );
+if( closing.isEmpty())
+closing = STR(  right none );
 OUStringBuffer ret;
 ret.append( opening );
 bool first = true;
commit d607e5cda6d2d18464ecdf6740a90870039a78f7
Author: Luboš Luňák l.lu...@suse.cz
Date:   Tue Dec 20 10:44:01 2011 +0100

import m:eqArr (part of fdo#32636)

diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx
index 8a763a2..60fb230 100644
--- a/starmath/source/ooxmlimport.cxx
+++ b/starmath/source/ooxmlimport.cxx
@@ -116,6 +116,9 @@ OUString SmOoxmlImport::readOMathArg()
 case OPENING( M_TOKEN( d )):
 ret += handleD();
 break;
+case OPENING( M_TOKEN( eqArr )):
+ret += handleEqArr();
+break;
 case OPENING( M_TOKEN( f )):
 ret += handleF();
 break;
@@ -358,6 +361,22 @@ OUString SmOoxmlImport::handleD()
 return ret.makeStringAndClear();
 }
 
+OUString SmOoxmlImport::handleEqArr()
+{
+stream.ensureOpeningTag( M_TOKEN( eqArr ));
+OUString ret;
+do
+{ // there must be at least one m:e
+if( !ret.isEmpty())
+ret += STR( # );
+ret += STR(   );
+ret += readOMathArgInElement( M_TOKEN( e ));
+ret += STR(   );
+} while( !stream.atEnd()  stream.findTag( OPENING( M_TOKEN( e ;
+stream.ensureClosingTag( M_TOKEN( eqArr ));
+return STR( stack { ) + ret + STR( } );
+}
+
 OUString SmOoxmlImport::handleF()
 {
 stream.ensureOpeningTag( M_TOKEN( f ));
diff --git a/starmath/source/ooxmlimport.hxx b/starmath/source/ooxmlimport.hxx
index 5bea975..dc6816f 100644
--- a/starmath/source/ooxmlimport.hxx
+++ b/starmath/source/ooxmlimport.hxx
@@ -49,7 +49,7 @@ private:
 rtl::OUString handleBox();
 rtl::OUString handleBorderBox();
 rtl::OUString handleD();
-rtl::OUString handleE();
+rtl::OUString handleEqArr();
 rtl::OUString handleF();
 rtl::OUString handleFunc();
 enum LimLowUpp_t { LimLow, LimUpp };
commit a69d808021e25303c62b84df459515d1ca52dc12
Author: Luboš Luňák l.lu...@suse.cz
Date:   Tue Dec 20 10:43:17 2011 +0100

export vertical stack as m:eqArr, seems to fit much better

diff --git a/starmath/source/ooxmlexport.cxx b/starmath/source/ooxmlexport.cxx
index 3604894..a7740da 100644
--- a/starmath/source/ooxmlexport.cxx
+++ b/starmath/source/ooxmlexport.cxx
@@ -152,7 +152,7 @@ void SmOoxmlExport::HandleTable( const SmNode* pNode, int 
nLevel )
 //OOXML output stack which would grow
 //without bound in a multi step conversion
 if( nLevel || pNode-GetNumSubNodes()  1 )
-HandleVerticalStack( pNode, nLevel, 0 );
+HandleVerticalStack( pNode, nLevel );
 else
 HandleAllSubNodes( pNode, nLevel );
 }
@@ -174,29 +174,19 @@ void SmOoxmlExport::HandleAllSubNodes( const SmNode* 
pNode, int nLevel )
 }
 }
 
-// output vertical stack, firstItem says which child to use as first (if there
-// are more than two children, OOXML can have only a vertical stack of two 
items,
-// so create a bigger vertical stack recursively)
-void SmOoxmlExport::HandleVerticalStack( const SmNode* pNode, int nLevel, int 
firstItem )
+void SmOoxmlExport::HandleVerticalStack( const SmNode* pNode, int nLevel )
 {
-if( firstItem == pNode-GetNumSubNodes() - 1 ) // only one item, just 
output the item
+m_pSerializer-startElementNS( XML_m, XML_eqArr, FSEND );
+int size = pNode-GetNumSubNodes();
+for( int i = 0;
+ i  size;
+ ++i )
 {
-HandleNode( pNode-GetSubNode( firstItem ), nLevel + 1 );
-return;
+m_pSerializer-startElementNS( XML_m, XML_e, FSEND );
+HandleNode( pNode-GetSubNode( i ), nLevel + 1 );
+m_pSerializer-endElementNS( XML_m, XML_e );
 }
-m_pSerializer-startElementNS( XML_m, XML_f, FSEND );
-m_pSerializer-startElementNS( XML_m, 

[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 4 commits - oox/inc oox/source starmath/source

2011-12-20 Thread Lubos Lunak
 oox/inc/oox/mathml/importutils.hxx |   19 +++
 oox/source/mathml/importutils.cxx  |   12 ++--
 starmath/source/ooxmlexport.cxx|   32 +++-
 starmath/source/ooxmlexport.hxx|2 +-
 starmath/source/ooxmlimport.cxx|   29 ++---
 starmath/source/ooxmlimport.hxx|2 +-
 6 files changed, 60 insertions(+), 36 deletions(-)

New commits:
commit 40f129a99e691babaf7320cb32dff7ec5c77275c
Author: Luboš Luňák l.lu...@suse.cz
Date:   Tue Dec 20 10:46:43 2011 +0100

if a bracket pair has no left/right bracket, it needs to explicit 
(fdo#32636)

diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx
index 60fb230..1cdee7f 100644
--- a/starmath/source/ooxmlimport.cxx
+++ b/starmath/source/ooxmlimport.cxx
@@ -346,6 +346,10 @@ OUString SmOoxmlImport::handleD()
 closing = STR(  right  ) + closing;
 if( separator == STR( | )) // plain | would be actually V (logical 
or)
 separator = STR(  mline  );
+if( opening.isEmpty())
+opening = STR( left none  );
+if( closing.isEmpty())
+closing = STR(  right none );
 OUStringBuffer ret;
 ret.append( opening );
 bool first = true;
commit 0e0988cc08269eb125bf6e362b8ddba0c0771296
Author: Luboš Luňák l.lu...@suse.cz
Date:   Tue Dec 20 10:44:01 2011 +0100

import m:eqArr (part of fdo#32636)

diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx
index 8a763a2..60fb230 100644
--- a/starmath/source/ooxmlimport.cxx
+++ b/starmath/source/ooxmlimport.cxx
@@ -116,6 +116,9 @@ OUString SmOoxmlImport::readOMathArg()
 case OPENING( M_TOKEN( d )):
 ret += handleD();
 break;
+case OPENING( M_TOKEN( eqArr )):
+ret += handleEqArr();
+break;
 case OPENING( M_TOKEN( f )):
 ret += handleF();
 break;
@@ -358,6 +361,22 @@ OUString SmOoxmlImport::handleD()
 return ret.makeStringAndClear();
 }
 
+OUString SmOoxmlImport::handleEqArr()
+{
+stream.ensureOpeningTag( M_TOKEN( eqArr ));
+OUString ret;
+do
+{ // there must be at least one m:e
+if( !ret.isEmpty())
+ret += STR( # );
+ret += STR(   );
+ret += readOMathArgInElement( M_TOKEN( e ));
+ret += STR(   );
+} while( !stream.atEnd()  stream.findTag( OPENING( M_TOKEN( e ;
+stream.ensureClosingTag( M_TOKEN( eqArr ));
+return STR( stack { ) + ret + STR( } );
+}
+
 OUString SmOoxmlImport::handleF()
 {
 stream.ensureOpeningTag( M_TOKEN( f ));
diff --git a/starmath/source/ooxmlimport.hxx b/starmath/source/ooxmlimport.hxx
index 5bea975..dc6816f 100644
--- a/starmath/source/ooxmlimport.hxx
+++ b/starmath/source/ooxmlimport.hxx
@@ -49,7 +49,7 @@ private:
 rtl::OUString handleBox();
 rtl::OUString handleBorderBox();
 rtl::OUString handleD();
-rtl::OUString handleE();
+rtl::OUString handleEqArr();
 rtl::OUString handleF();
 rtl::OUString handleFunc();
 enum LimLowUpp_t { LimLow, LimUpp };
commit a77bbdb6f4203be700bacacd186757b058941346
Author: Luboš Luňák l.lu...@suse.cz
Date:   Tue Dec 20 10:43:17 2011 +0100

export vertical stack as m:eqArr, seems to fit much better

diff --git a/starmath/source/ooxmlexport.cxx b/starmath/source/ooxmlexport.cxx
index 3604894..a7740da 100644
--- a/starmath/source/ooxmlexport.cxx
+++ b/starmath/source/ooxmlexport.cxx
@@ -152,7 +152,7 @@ void SmOoxmlExport::HandleTable( const SmNode* pNode, int 
nLevel )
 //OOXML output stack which would grow
 //without bound in a multi step conversion
 if( nLevel || pNode-GetNumSubNodes()  1 )
-HandleVerticalStack( pNode, nLevel, 0 );
+HandleVerticalStack( pNode, nLevel );
 else
 HandleAllSubNodes( pNode, nLevel );
 }
@@ -174,29 +174,19 @@ void SmOoxmlExport::HandleAllSubNodes( const SmNode* 
pNode, int nLevel )
 }
 }
 
-// output vertical stack, firstItem says which child to use as first (if there
-// are more than two children, OOXML can have only a vertical stack of two 
items,
-// so create a bigger vertical stack recursively)
-void SmOoxmlExport::HandleVerticalStack( const SmNode* pNode, int nLevel, int 
firstItem )
+void SmOoxmlExport::HandleVerticalStack( const SmNode* pNode, int nLevel )
 {
-if( firstItem == pNode-GetNumSubNodes() - 1 ) // only one item, just 
output the item
+m_pSerializer-startElementNS( XML_m, XML_eqArr, FSEND );
+int size = pNode-GetNumSubNodes();
+for( int i = 0;
+ i  size;
+ ++i )
 {
-HandleNode( pNode-GetSubNode( firstItem ), nLevel + 1 );
-return;
+m_pSerializer-startElementNS( XML_m, XML_e, FSEND );
+HandleNode( pNode-GetSubNode( i ), nLevel + 1 );
+m_pSerializer-endElementNS( XML_m, XML_e );
 }
-m_pSerializer-startElementNS( XML_m, XML_f, FSEND );
-m_pSerializer-startElementNS( XML_m, 

[Libreoffice-commits] .: starmath/source

2011-12-20 Thread Lubos Lunak
 starmath/source/ooxmlimport.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 170d75c3f58e500bda864bf7b7aeefd06716a0a6
Author: Luboš Luňák l.lu...@suse.cz
Date:   Tue Dec 20 15:33:40 2011 +0100

remove obsolete comment

diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx
index 1cdee7f..2fa59e1 100644
--- a/starmath/source/ooxmlimport.cxx
+++ b/starmath/source/ooxmlimport.cxx
@@ -408,8 +408,7 @@ OUString SmOoxmlImport::handleF()
 else if( operation == lin )
 return STR( { ) + num + STR( } / { ) + den + STR( } );
 else // noBar
-{ // TODO we write out stack of 3 items as recursive m:f, so merge here 
back
-  // to 'stack { x # y # z }'
+{
 return STR( binom { ) + num + STR( } { ) + den + STR( } );
 }
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: solenv/gbuild

2011-12-20 Thread Lubos Lunak
 solenv/gbuild/platform/WNT_INTEL_MSC.mk |2 +-
 solenv/gbuild/platform/com_GCC_class.mk |2 +-
 solenv/gbuild/platform/solaris.mk   |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 0e44efd3744d6355e31f623a21c22057f5b2628c
Author: Luboš Luňák l.lu...@suse.cz
Date:   Tue Dec 20 16:35:18 2011 +0100

missed this in b55dbc1e - show extension for .c files as well

diff --git a/solenv/gbuild/platform/WNT_INTEL_MSC.mk 
b/solenv/gbuild/platform/WNT_INTEL_MSC.mk
index 3aaf695..3809f3b 100644
--- a/solenv/gbuild/platform/WNT_INTEL_MSC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_MSC.mk
@@ -281,7 +281,7 @@ endef
 # CObject class
 
 define gb_CObject__command
-$(call gb_Output_announce,$(2),$(true),C  ,3)
+$(call gb_Output_announce,$(2).c,$(true),C  ,3)
 $(call gb_Helper_abbreviate_dirs_native,\
mkdir -p $(dir $(1)) $(dir $(4))  \
$(gb_CC) \
diff --git a/solenv/gbuild/platform/com_GCC_class.mk 
b/solenv/gbuild/platform/com_GCC_class.mk
index 5bf7740..da90948 100644
--- a/solenv/gbuild/platform/com_GCC_class.mk
+++ b/solenv/gbuild/platform/com_GCC_class.mk
@@ -25,7 +25,7 @@
 
 # $(call gb_CObject__command,object,relative-source,source,dep-file)
 define gb_CObject__command
-$(call gb_Output_announce,$(2),$(true),C  ,3)
+$(call gb_Output_announce,$(2).c,$(true),C  ,3)
 $(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) $(dir $(4))  \
$(gb_CC) \
diff --git a/solenv/gbuild/platform/solaris.mk 
b/solenv/gbuild/platform/solaris.mk
index a3d055b..afb9629 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -160,7 +160,7 @@ gb_Helper_OUTDIRLIBDIR := $(OUTDIR)/lib
 # CObject class
 
 define gb_CObject__command
-$(call gb_Output_announce,$(2),$(true),C  ,3)
+$(call gb_Output_announce,$(2).c,$(true),C  ,3)
 $(call gb_Helper_abbreviate_dirs,\
rm -f $(4)  \
mkdir -p $(dir $(1)) $(dir $(4))  \
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-4-5' - 2 commits - xmloff/inc xmloff/source

2012-01-02 Thread Lubos Lunak
 xmloff/inc/xmloff/PageMasterStyleMap.hxx   |1 +
 xmloff/source/style/PageMasterExportPropMapper.cxx |7 +++
 xmloff/source/style/PageMasterStyleMap.cxx |   21 ++---
 xmloff/source/text/txtprmap.cxx|4 ++--
 4 files changed, 24 insertions(+), 9 deletions(-)

New commits:
commit 63ecdc34d14e7c543dd2a435e54d084f8c2325d8
Author: Michael Stahl mst...@redhat.com
Date:   Thu Dec 22 23:51:33 2011 +0100

fdo#44082: fix hyphenation attributes:

These have type positiveInteger, so don't write 0 values:

20.191 fo:hyphenation-push-char-count
20.192 fo:hyphenation-remain-char-count

Signed-off-by: Cedric Bosdonnat cbosdon...@suse.com
Signed-off-by: Petr Mladek pmla...@suse.cz
Signed-off-by: Luboš Luňák l.lu...@suse.cz

diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx
index 8cf954a..df7a9f4 100644
--- a/xmloff/source/text/txtprmap.cxx
+++ b/xmloff/source/text/txtprmap.cxx
@@ -256,8 +256,8 @@ XMLPropertyMapEntry aXMLParaPropMap[] =
 MP_ED( ParaTabStops, STYLE,  TAB_STOPS,  
MID_FLAG_ELEMENT_ITEM|XML_TYPE_TEXT_TABSTOP, CTF_TABSTOP ), // this is not 
realy a string!
 // RES_PARATR_HYPHENZONE
 MT_E( ParaIsHyphenation, FO, HYPHENATE,  
XML_TYPE_BOOL, 0 ),
-MT_E( ParaHyphenationMaxLeadingChars, FO, HYPHENATION_REMAIN_CHAR_COUNT, 
XML_TYPE_NUMBER16, 0 ),
-MT_E( ParaHyphenationMaxTrailingChars,FO, HYPHENATION_PUSH_CHAR_COUNT, 
XML_TYPE_NUMBER16, 0 ),
+MT_E( ParaHyphenationMaxLeadingChars, FO, HYPHENATION_REMAIN_CHAR_COUNT, 
XML_TYPE_NUMBER16_NO_ZERO, 0 ),
+MT_E( ParaHyphenationMaxTrailingChars,FO, HYPHENATION_PUSH_CHAR_COUNT, 
XML_TYPE_NUMBER16_NO_ZERO, 0 ),
 MP_E( ParaHyphenationMaxHyphens, FO, HYPHENATION_LADDER_COUNT, 
XML_TYPE_NUMBER16_NONE, 0 ),
 // RES_PARATR_DROP
 MP_E( DropCapWholeWord,  STYLE,  LENGTH, 
MID_FLAG_SPECIAL_ITEM|XML_TYPE_BOOL, CTF_DROPCAPWHOLEWORD ),
commit 0bf04da04fcb100bbfd4470e8708a1555ac1461d
Author: Michael Stahl mst...@redhat.com
Date:   Thu Dec 22 23:10:14 2011 +0100

fdo#44073: ODF export: fix layout grid invalid ODF

The following 3 attributes have been added in ODF 1.2, so don't write
them into ODF 1.1 files:

style:layout-grid-base-width 20.297
style:layout-grid-snap-to 20.305
style:layout-grid-standard-mode 20.306

Additionally, style:layout-grid-snap-to was written wrongly as
style:layout-grid-snap-to-characters, which does not exist in any ODF
spec.
For backward compatibility with previous OOo/LO versions, write the
wrong attribute in addition to the correct one in ODF extended mode,
even though validators complain about it (consider removing that
some years from now).

Signed-off-by: Cedric Bosdonnat cbosdon...@suse.com
Signed-off-by: Petr Mladek pmla...@suse.cz
Signed-off-by: Luboš Luňák l.lu...@suse.cz

diff --git a/xmloff/inc/xmloff/PageMasterStyleMap.hxx 
b/xmloff/inc/xmloff/PageMasterStyleMap.hxx
index d81bd80..91c59e9 100644
--- a/xmloff/inc/xmloff/PageMasterStyleMap.hxx
+++ b/xmloff/inc/xmloff/PageMasterStyleMap.hxx
@@ -97,6 +97,7 @@
 #define CTF_PM_STANDARD_MODE(XML_PM_CTF_START + 0x0055)
 #define CTP_PM_GRID_BASE_WIDTH  (XML_PM_CTF_START + 0x0056)
 #define CTP_PM_GRID_SNAP_TO_CHARS   (XML_PM_CTF_START + 0x0057)
+#define CTP_PM_GRID_SNAP_TO (XML_PM_CTF_START + 0x0058)
 // header
 #define CTF_PM_HEADERBORDERALL 
(CTF_PM_HEADERFLAG|CTF_PM_BORDERALL)
 #define CTF_PM_HEADERBORDERTOP 
(CTF_PM_HEADERFLAG|CTF_PM_BORDERTOP)
diff --git a/xmloff/source/style/PageMasterExportPropMapper.cxx 
b/xmloff/source/style/PageMasterExportPropMapper.cxx
index c59d61c..9289712 100644
--- a/xmloff/source/style/PageMasterExportPropMapper.cxx
+++ b/xmloff/source/style/PageMasterExportPropMapper.cxx
@@ -325,7 +325,9 @@ void XMLPageMasterExportPropMapper::ContextFilter(
 XMLPropertyState*  pPMScaleToY = NULL;
 XMLPropertyState*  pPMStandardMode = NULL;
 XMLPropertyState*  pPMGridBaseWidth= NULL;
+// same as pPMGridSnapTo but for backward compatibility only
 XMLPropertyState*  pPMGridSnapToChars  = NULL;
+XMLPropertyState*   pPMGridSnapTo   = NULL;
 
 XMLPropertyState*   pPrint  = NULL;
 
@@ -381,6 +383,7 @@ void XMLPageMasterExportPropMapper::ContextFilter(
 case CTF_PM_STANDARD_MODE: pPMStandardMode = 
pProp;break;
 case CTP_PM_GRID_BASE_WIDTH:   pPMGridBaseWidth
= pProp;break;
 case CTP_PM_GRID_SNAP_TO_CHARS:pPMGridSnapToChars  
= pProp;break;
+case CTP_PM_GRID_SNAP_TO:   pPMGridSnapTo = pProp;break;
 }
 if (nPrintId == CTF_PM_PRINTMASK)
 {

[Libreoffice-commits] .: 3 commits - sw/inc sw/source

2012-01-03 Thread Lubos Lunak
 sw/inc/SwXMLSectionList.hxx |6 +-
 sw/inc/shellio.hxx  |6 +-
 sw/inc/swunohelper.hxx  |6 +-
 sw/source/core/swg/SwXMLSectionList.cxx |9 +--
 sw/source/core/unocore/swunohelper.cxx  |8 +-
 sw/source/core/unocore/unofield.cxx |   18 ++
 sw/source/filter/basflt/shellio.cxx |2 
 sw/source/filter/inc/fltini.hxx |4 -
 sw/source/filter/xml/swxml.cxx  |   12 +---
 sw/source/ui/dialog/uiregionsw.cxx  |   10 +--
 sw/source/ui/inc/glosdoc.hxx|   11 +--
 sw/source/ui/misc/glosdoc.cxx   |   89 
 sw/source/ui/utlui/gloslst.cxx  |   10 +--
 13 files changed, 80 insertions(+), 111 deletions(-)

New commits:
commit 3fb612cb206a989c0749ac509b173ec01eb3f49e
Author: Brad Sowden c...@sowden.org
Date:   Thu Dec 29 22:26:57 2011 +1300

Easyhack fdo#38831 remove SvStrings

diff --git a/sw/source/core/unocore/unofield.cxx 
b/sw/source/core/unocore/unofield.cxx
index 6b0ddc7..2e4785f 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -85,7 +85,6 @@
 #include tools/datetime.hxx
 #include tools/urlobj.hxx
 #include svx/dataaccessdescriptor.hxx
-#define _SVSTDARR_STRINGS
 #include svl/svstdarr.hxx
 #include osl/mutex.hxx
 #include vcl/svapp.hxx
@@ -95,6 +94,7 @@
 #include fmtmeta.hxx // MetaFieldManager
 #include switerator.hxx
 #include rtl/strbuf.hxx
+#include vector
 
 using ::rtl::OUString;
 using namespace ::com::sun::star;
@@ -2539,32 +2539,30 @@ uno::Sequence OUString  
SwXTextFieldMasters::getElementNames(void)
 const SwFldTypes* pFldTypes = GetDoc()-GetFldTypes();
 sal_uInt16 nCount = pFldTypes-Count();
 
-SvStrings aFldNames;
+std::vectorString* aFldNames;
 String* pString = new String();
-sal_uInt16 i;
 
-for( i = 0; i  nCount; i++)
+for( sal_uInt16 i = 0; i  nCount; i++)
 {
 SwFieldType rFldType = *((*pFldTypes)[i]);
 
 if (SwXTextFieldMasters::getInstanceName(rFldType, *pString))
 {
-aFldNames.Insert(pString, aFldNames.Count());
+aFldNames.push_back(pString);
 pString = new String();
 }
 }
 delete pString;
 
-uno::Sequence OUString  aSeq(aFldNames.Count());
+uno::Sequence OUString  aSeq( static_castsal_uInt16(aFldNames.size()) 
);
 OUString* pArray = aSeq.getArray();
-for(i = 0; i  aFldNames.Count();i++)
+for(sal_uInt16 i = 0; i  aFldNames.size();i++)
 {
-pArray[i] = *aFldNames.GetObject(i);
+pArray[i] = *aFldNames[i];
+delete aFldNames[i];
 }
-aFldNames.DeleteAndDestroy(0, aFldNames.Count());
 
 return aSeq;
-
 }
 
 sal_Bool SwXTextFieldMasters::hasByName(const OUString rName) throw( 
uno::RuntimeException )
commit 9e192c9fd1c0ddc0cd9b926a46f4144f1bf71526
Author: Brad Sowden c...@sowden.org
Date:   Thu Dec 29 22:26:06 2011 +1300

Easyhack fdo#38831 remove SvStrings

diff --git a/sw/inc/SwXMLSectionList.hxx b/sw/inc/SwXMLSectionList.hxx
index 0467864..c59fda7 100644
--- a/sw/inc/SwXMLSectionList.hxx
+++ b/sw/inc/SwXMLSectionList.hxx
@@ -31,7 +31,7 @@
 #include xmloff/xmlictxt.hxx
 #include xmloff/xmlimp.hxx
 
-class SvStrings;
+class vector;
 
 class SwXMLSectionList : public SvXMLImport
 {
@@ -43,11 +43,11 @@ protected:
   const ::com::sun::star::uno::Reference
 ::com::sun::star::xml::sax::XAttributeList   xAttrList );
 public:
-SvStrings  rSectionList;
+std::vectorString* rSectionList;
 
 SwXMLSectionList(
 const ::com::sun::star::uno::Reference 
::com::sun::star::lang::XMultiServiceFactory  xServiceFactory,
-SvStrings  rNewSectionList );
+std::vectorString* rNewSectionList );
 
 virtual ~SwXMLSectionList ( )
 throw();
diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx
index 56cd063..0b91804 100644
--- a/sw/inc/shellio.hxx
+++ b/sw/inc/shellio.hxx
@@ -56,7 +56,6 @@ class SfxItemSet;
 class SfxMedium;
 class SvPtrarr;
 class SvStream;
-class SvStrings;
 class SvxFontItem;
 class SvxMacroTableDtor;
 class SwCntntNode;
@@ -64,6 +63,7 @@ class SwCrsrShell;
 class SwDoc;
 class SwPaM;
 class SwTextBlocks;
+class vector;
 struct SwPosition;
 struct Writer_Impl;
 
@@ -272,8 +272,8 @@ public:
 
 // Read the sections of the document, which is equal to the medium.
 // Returns the count of it
-virtual sal_uInt16 GetSectionList( SfxMedium rMedium,
-SvStrings rStrings ) const;
+virtual size_t GetSectionList( SfxMedium rMedium,
+   std::vectorString* rStrings ) const;
 
 SotStorageRef getSotStorageRef() { return pStg; };
 void setSotStorageRef(SotStorageRef pStgRef) { pStg = pStgRef; };
diff --git a/sw/source/core/swg/SwXMLSectionList.cxx 
b/sw/source/core/swg/SwXMLSectionList.cxx
index 1d00774..3a1adfd 100644
--- a/sw/source/core/swg/SwXMLSectionList.cxx
+++ 

[Libreoffice-commits] .: 5 commits - basctl/source cui/source sc/source sfx2/inc sfx2/source svl/inc svl/source svx/inc svx/source sw/source unusedcode.easy

2012-01-04 Thread Lubos Lunak
 basctl/source/basicide/basides1.cxx |2 
 cui/source/inc/numfmt.hxx   |5 -
 cui/source/tabpages/numfmt.cxx  |   74 --
 sc/source/ui/inc/formula.hxx|6 -
 sc/source/ui/inc/funcpage.hxx   |6 -
 sc/source/ui/inc/parawin.hxx|8 -
 sc/source/ui/inc/undotab.hxx|7 -
 sc/source/ui/inc/viewfunc.hxx   |6 -
 sc/source/ui/view/viewfun2.cxx  |1 
 sfx2/inc/sfx2/frmdescr.hxx  |3 
 sfx2/source/appl/appcfg.cxx |4 
 sfx2/source/appl/appdata.cxx|4 
 sfx2/source/inc/appdata.hxx |2 
 svl/inc/svl/svarray.hxx |2 
 svl/inc/svl/svstdarr.hxx|8 -
 svl/source/items/style.cxx  |1 
 svl/source/memtools/svarray.cxx |2 
 svx/inc/svx/numfmtsh.hxx|   85 
 svx/source/items/numfmtsh.cxx   |  146 
 sw/source/core/doc/docdde.cxx   |2 
 sw/source/core/unocore/unotbl.cxx   |   19 +---
 sw/source/filter/basflt/fltini.cxx  |2 
 sw/source/filter/html/swhtml.cxx|2 
 sw/source/ui/uno/unoatxt.cxx|2 
 unusedcode.easy |1 
 25 files changed, 149 insertions(+), 251 deletions(-)

New commits:
commit 2004a9920e1cef4ac208f14453c1bc8ad80b7c77
Author: Brad Sowden c...@sowden.org
Date:   Thu Dec 29 22:31:12 2011 +1300

Easyhack fdo#38831 remove SvStrings

Remove SvStrings definition and obsolete #defines.

diff --git a/basctl/source/basicide/basides1.cxx 
b/basctl/source/basicide/basides1.cxx
index 5de3788..bcf4006 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -27,8 +27,6 @@
  /
 
 
-#define _SVSTDARR_STRINGS
-
 #include ide_pch.hxx
 
 #define _SOLAR__PRIVATE 1
diff --git a/sc/source/ui/inc/formula.hxx b/sc/source/ui/inc/formula.hxx
index 306aaa5..e9e0b34 100644
--- a/sc/source/ui/inc/formula.hxx
+++ b/sc/source/ui/inc/formula.hxx
@@ -37,12 +37,6 @@
 #include svtools/svmedit.hxx
 #include vcl/tabpage.hxx
 
-#ifndef _SVSTDARR_STRINGS
-
-#define _SVSTDARR_STRINGS
-#include svl/svstdarr.hxx
-
-#endif
 #include compiler.hxx
 #include cell.hxx
 
diff --git a/sc/source/ui/inc/funcpage.hxx b/sc/source/ui/inc/funcpage.hxx
index ca24748..79f8185 100644
--- a/sc/source/ui/inc/funcpage.hxx
+++ b/sc/source/ui/inc/funcpage.hxx
@@ -37,12 +37,6 @@
 #include svtools/svmedit.hxx
 #include vcl/tabpage.hxx
 
-#ifndef _SVSTDARR_STRINGS
-
-#define _SVSTDARR_STRINGS
-#include svl/svstdarr.hxx
-
-#endif
 #include vcl/tabctrl.hxx
 #include parawin.hxx
 #include svtools/svtreebx.hxx
diff --git a/sc/source/ui/inc/undotab.hxx b/sc/source/ui/inc/undotab.hxx
index c6b7409..d2dfedf 100644
--- a/sc/source/ui/inc/undotab.hxx
+++ b/sc/source/ui/inc/undotab.hxx
@@ -34,13 +34,6 @@
 #include tools/color.hxx
 #include tabbgcolor.hxx
 
-#ifndef _SVSTDARR_STRINGS
-
-#define _SVSTDARR_STRINGS
-#include svl/svstdarr.hxx
-
-#endif
-
 #include com/sun/star/uno/Sequence.hxx
 
 #include boost/shared_ptr.hpp
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index 29e10f3..f1273cf 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -32,12 +32,6 @@
 
 #include tabbgcolor.hxx
 
-#ifndef _SVSTDARR_STRINGS
-
-#define _SVSTDARR_STRINGS
-#include svl/svstdarr.hxx
-
-#endif
 #include com/sun/star/embed/XEmbeddedObject.hpp
 #include com/sun/star/embed/Aspects.hpp
 #include vector
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index e2c950c..400d1cb 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -33,7 +33,6 @@
 #include editeng/eeitem.hxx
 
 #include sfx2/app.hxx
-#define _SVSTDARR_STRINGS
 #include editeng/boxitem.hxx
 #include editeng/fontitem.hxx
 #include editeng/scripttypeitem.hxx
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index 85e5374..868a07c 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -47,8 +47,6 @@
 #include svl/szitem.hxx
 #include svl/undo.hxx
 
-#define _SVSTDARR_STRINGS
-#include svl/svstdarr.hxx
 #include sfx2/sfxsids.hrc
 #include sot/exchange.hxx
 
diff --git a/svl/inc/svl/svarray.hxx b/svl/inc/svl/svarray.hxx
index 4c8d077..47b8063 100644
--- a/svl/inc/svl/svarray.hxx
+++ b/svl/inc/svl/svarray.hxx
@@ -81,7 +81,7 @@
 *   Sortierung mit Hilfe der Object-operatoren  und ==
 *
 * JP 09.10.96:  vordefinierte Arrays:
-*   PtrArr: SvStrings, SvStringsDtor
+*   PtrArr: SvStringsDtor
 *   SortArr:SvStringsSort, SvStringsSortDtor,
 *   SvStringsISort, SvStringsISortDtor
 ***/
diff --git a/svl/inc/svl/svstdarr.hxx b/svl/inc/svl/svstdarr.hxx
index 54f6d2a..1d1b6e8 100644
--- a/svl/inc/svl/svstdarr.hxx
+++ b/svl/inc/svl/svstdarr.hxx
@@ -32,7 +32,7 @@
 *   (die defines setzen sich aus 

[Libreoffice-commits] .: jvmfwk/plugins jvmfwk/source l10ntools/source lingucomponent/source

2012-01-05 Thread Lubos Lunak
 jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx |8 ++--
 jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx  |   30 -
 jvmfwk/plugins/sunmajor/pluginlib/util.cxx   |   18 +-
 jvmfwk/plugins/sunmajor/pluginlib/vendorbase.cxx |8 ++--
 jvmfwk/source/elements.cxx   |8 ++--
 jvmfwk/source/framework.cxx  |4 +-
 jvmfwk/source/fwkbase.cxx|   28 
 l10ntools/source/directory.cxx   |2 -
 l10ntools/source/export.cxx  |   32 +--
 l10ntools/source/help/HelpCompiler.hxx   |2 -
 l10ntools/source/helpmerge.cxx   |2 -
 l10ntools/source/merge.cxx   |2 -
 lingucomponent/source/lingutil/lingutil.cxx  |2 -
 lingucomponent/source/spellcheck/spell/sspellimp.cxx |4 +-
 lingucomponent/source/thesaurus/libnth/nthesimp.cxx  |2 -
 15 files changed, 76 insertions(+), 76 deletions(-)

New commits:
commit c47f3523338b8e58c1ea18cc583064761f60df90
Author: Gustavo Buzzatti Pacheco gbpach...@gmail.com
Date:   Wed Jan 4 11:38:41 2012 -0200

Fix for fdo43460 Part XXII getLength() to isEmpty()

Part XXII
modules
jvmfwk, l10ntools, lingucomponent

diff --git a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
index 53ac693..628461c 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx
@@ -164,7 +164,7 @@ bool GnuInfo::initialize(vectorpairOUString, OUString  
props)
 }
 else if (!bAccess  sAccessProperty.equals(i-first))
 {
-if (i-second.getLength()  0)
+if (!i-second.isEmpty())
 {
 m_bAccessibility = true;
 bAccess = true;
@@ -177,11 +177,11 @@ bool GnuInfo::initialize(vectorpairOUString, OUString 
 props)
 if (!bVersion || !bVendor || !bHome)
 return false;
 
-if (!m_sJavaHome.getLength())
+if (m_sJavaHome.isEmpty())
 m_sJavaHome = 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(file:///usr/lib));
 
 // init m_sRuntimeLibrary
-OSL_ASSERT(m_sHome.getLength());
+OSL_ASSERT(!m_sHome.isEmpty());
 //call virtual function to get the possible paths to the runtime library.
 
 int size = 0;
@@ -266,7 +266,7 @@ bool GnuInfo::initialize(vectorpairOUString, OUString  
props)
 return false;
 
 // init m_sLD_LIBRARY_PATH
-OSL_ASSERT(m_sHome.getLength());
+OSL_ASSERT(!m_sHome.isEmpty());
 size = 0;
 char const * const * arLDPaths = getLibraryPaths(  size);
 vectorOUString ld_paths = getVectorFromCharArray(arLDPaths, size);
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx 
b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index d70338f..08577c0 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -116,7 +116,7 @@ OString getPluginJarPath(
 //but this does not harm. 1.5.0-beta  1.5.0
 sName = sName2;
 }
-if (sName.getLength())
+if (!sName.isEmpty())
 {
 sName = sLocation + OUSTR(/lib/) + sName;
 OSL_VERIFY(
@@ -140,7 +140,7 @@ OString getPluginJarPath(
 sPath = sPath1 + OUString::createFromAscii(sep) + sPath2;
 }
 }
-OSL_ASSERT(sPath.getLength());
+OSL_ASSERT(!sPath.isEmpty());
 }
 ret = rtl::OUStringToOString(sPath, osl_getThreadTextEncoding());
 
@@ -167,7 +167,7 @@ JavaInfo* createJavaInfo(const rtl::ReferenceVendorBase  
info)
 pInfo-nRequirements = info-needsRestart() ? JFW_REQUIRE_NEEDRESTART : 0;
 rtl::OUStringBuffer buf(1024);
 buf.append(info-getRuntimeLibrary());
-if (info-getLibraryPaths().getLength()  0)
+if (!info-getLibraryPaths().isEmpty())
 {
 buf.appendAscii(\n);
 buf.append(info-getLibraryPaths());
@@ -239,8 +239,8 @@ javaPluginError jfw_plugin_getAllJavaInfos(
 OUString ouMinVer(sMinVersion);
 OUString ouMaxVer(sMaxVersion);
 
-OSL_ASSERT(ouVendor.getLength()  0);
-if (ouVendor.getLength() == 0)
+OSL_ASSERT(!ouVendor.isEmpty());
+if (ouVendor.isEmpty())
 return JFW_PLUGIN_E_INVALID_ARG;
 
 JavaInfo** arInfo = NULL;
@@ -258,7 +258,7 @@ javaPluginError jfw_plugin_getAllJavaInfos(
 if (ouVendor.equals(cur-getVendor()) == sal_False)
 continue;
 
-if (ouMinVer.getLength()  0)
+if (!ouMinVer.isEmpty())
 {
 try
 {
@@ -276,7 +276,7 @@ javaPluginError jfw_plugin_getAllJavaInfos(
 }
 }
 
-if (ouMaxVer.getLength()  0)
+if (!ouMaxVer.isEmpty())
 {
 try
 {
@@ -358,8 +358,8 @@ javaPluginError jfw_plugin_getJavaInfoByPath(
 if (!path || 

[Libreoffice-commits] .: 2 commits - binfilter/bf_xmloff binfilter/inc

2012-01-05 Thread Lubos Lunak
 binfilter/bf_xmloff/source/core/xmloff_xmlexp.cxx   |1 +
 binfilter/bf_xmloff/source/meta/xmloff_xmlmetae.cxx |1 +
 binfilter/inc/bf_starmath/smmod.hxx |2 ++
 binfilter/inc/bf_sw/shellres.hxx|2 +-
 4 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 87ca1791f234745ef6e1a06c61929bca470bc03d
Author: Marcel Metz mm...@adrian-broher.net
Date:   Tue Jan 3 15:18:41 2012 +0100

Added missing includes.

diff --git a/binfilter/bf_xmloff/source/core/xmloff_xmlexp.cxx 
b/binfilter/bf_xmloff/source/core/xmloff_xmlexp.cxx
index 6f7b2aa..b4d2d13 100644
--- a/binfilter/bf_xmloff/source/core/xmloff_xmlexp.cxx
+++ b/binfilter/bf_xmloff/source/core/xmloff_xmlexp.cxx
@@ -29,6 +29,7 @@
 #include rtl/uuid.h
 #include tools/debug.hxx
 #include tools/urlobj.hxx
+#include tools/string.hxx
 
 #include com/sun/star/document/XBinaryStreamResolver.hpp
 #include com/sun/star/xml/sax/SAXInvalidCharacterException.hpp
diff --git a/binfilter/bf_xmloff/source/meta/xmloff_xmlmetae.cxx 
b/binfilter/bf_xmloff/source/meta/xmloff_xmlmetae.cxx
index 1505eea..c67a9ec 100644
--- a/binfilter/bf_xmloff/source/meta/xmloff_xmlmetae.cxx
+++ b/binfilter/bf_xmloff/source/meta/xmloff_xmlmetae.cxx
@@ -34,6 +34,7 @@
 
 
 #include tools/time.hxx
+#include tools/string.hxx
 
 #include unotools/bootstrap.hxx
 #include rtl/bootstrap.hxx
commit c18c1fab778db040e5c5b9657e826eb90345ff00
Author: Marcel Metz mm...@adrian-broher.net
Date:   Tue Jan 3 15:18:35 2012 +0100

Added missing includes.

diff --git a/binfilter/inc/bf_starmath/smmod.hxx 
b/binfilter/inc/bf_starmath/smmod.hxx
index f3f4ec4..1ec73db 100644
--- a/binfilter/inc/bf_starmath/smmod.hxx
+++ b/binfilter/inc/bf_starmath/smmod.hxx
@@ -29,6 +29,8 @@
 #ifndef _SMMOD_HXX
 #define _SMMOD_HXX
 
+#include i18npool/lang.h
+#include tools/rc.hxx
 #include tools/resary.hxx
 #include bf_svtools/lstner.hxx
 #include bf_svtools/colorcfg.hxx
diff --git a/binfilter/inc/bf_sw/shellres.hxx b/binfilter/inc/bf_sw/shellres.hxx
index 847d749..9f6c979 100644
--- a/binfilter/inc/bf_sw/shellres.hxx
+++ b/binfilter/inc/bf_sw/shellres.hxx
@@ -31,7 +31,7 @@
 #include bf_svtools/bf_solar.h
 
 
-
+#include tools/rc.hxx
 #include vcl/bitmap.hxx
 
 #ifndef _SVSTDARR_HXX
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: fpicker/source

2012-01-06 Thread Lubos Lunak
 fpicker/source/unx/kde4/KDE4FilePicker.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit 0d7e2108425da1f81c20a605145679168486df59
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Jan 6 10:55:03 2012 +0100

workaround for LO namespace pollution breaking KDE4 fpicker build

diff --git a/fpicker/source/unx/kde4/KDE4FilePicker.cxx 
b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
index f282645..69be3b1 100644
--- a/fpicker/source/unx/kde4/KDE4FilePicker.cxx
+++ b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
@@ -56,7 +56,10 @@
 #define Region QtXRegion
 
 //kde has an enum that uses this...OO does too
+#define LO_SETTINGS_MOUSE SETTINGS_MOUSE
 #undef SETTINGS_MOUSE
+#define LO_SETTINGS_LOCALE SETTINGS_LOCALE
+#undef SETTINGS_LOCALE
 
 #include kfiledialog.h
 #include kwindowsystem.h
@@ -70,6 +73,11 @@
 
 #undef Region
 
+#define SETTINGS_MOUSE LO_SETTINGS_MOUSE
+#undef LO_SETTINGS_MOUSE
+#define SETTINGS_LOCALE LO_SETTINGS_LOCALE
+#undef LO_SETTINGS_LOCALE
+
 using namespace ::com::sun::star;
 
 using namespace ::com::sun::star::ui::dialogs;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2012-01-06 Thread Lubos Lunak
 fpicker/source/unx/kde4/KDE4FilePicker.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit 0c1cf6119556969f7875dc587905070e3f1b6f60
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Jan 6 10:55:03 2012 +0100

workaround for LO namespace pollution breaking KDE4 fpicker build

diff --git a/fpicker/source/unx/kde4/KDE4FilePicker.cxx 
b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
index f282645..69be3b1 100644
--- a/fpicker/source/unx/kde4/KDE4FilePicker.cxx
+++ b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
@@ -56,7 +56,10 @@
 #define Region QtXRegion
 
 //kde has an enum that uses this...OO does too
+#define LO_SETTINGS_MOUSE SETTINGS_MOUSE
 #undef SETTINGS_MOUSE
+#define LO_SETTINGS_LOCALE SETTINGS_LOCALE
+#undef SETTINGS_LOCALE
 
 #include kfiledialog.h
 #include kwindowsystem.h
@@ -70,6 +73,11 @@
 
 #undef Region
 
+#define SETTINGS_MOUSE LO_SETTINGS_MOUSE
+#undef LO_SETTINGS_MOUSE
+#define SETTINGS_LOCALE LO_SETTINGS_LOCALE
+#undef LO_SETTINGS_LOCALE
+
 using namespace ::com::sun::star;
 
 using namespace ::com::sun::star::ui::dialogs;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: starmath/source

2012-01-06 Thread Lubos Lunak
 starmath/source/ooxmlexport.cxx |2 +-
 starmath/source/ooxmlimport.cxx |5 -
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 6977d658e16d7c2042eb4ac7db20a1aaf7b3beab
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Jan 6 12:20:54 2012 +0100

write TBAR rather as an accent, use over/underline for m:bar

seems to match the docx semantics better, despite the names

diff --git a/starmath/source/ooxmlexport.cxx b/starmath/source/ooxmlexport.cxx
index a7740da..fd12301 100644
--- a/starmath/source/ooxmlexport.cxx
+++ b/starmath/source/ooxmlexport.cxx
@@ -324,6 +324,7 @@ void SmOoxmlExport::HandleAttribute( const SmAttributNode* 
pNode, int nLevel )
 case TWIDETILDE:
 case TWIDEHAT:
 case TWIDEVEC:
+case TBAR:
 {
 m_pSerializer-startElementNS( XML_m, XML_acc, FSEND );
 m_pSerializer-startElementNS( XML_m, XML_accPr, FSEND );
@@ -337,7 +338,6 @@ void SmOoxmlExport::HandleAttribute( const SmAttributNode* 
pNode, int nLevel )
 m_pSerializer-endElementNS( XML_m, XML_acc );
 break;
 }
-case TBAR:
 case TOVERLINE:
 case TUNDERLINE:
 m_pSerializer-startElementNS( XML_m, XML_bar, FSEND );
diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx
index 2fa59e1..6d40375 100644
--- a/starmath/source/ooxmlimport.cxx
+++ b/starmath/source/ooxmlimport.cxx
@@ -191,6 +191,9 @@ OUString SmOoxmlImport::handleAcc()
 OUString acc;
 switch( accChr )
 {
+case MS_BAR:
+acc = STR( bar );
+break;
 case MS_CHECK:
 acc = STR( check );
 break;
@@ -256,7 +259,7 @@ OUString SmOoxmlImport::handleBar()
 OUString e = readOMathArgInElement( M_TOKEN( e ));
 stream.ensureClosingTag( M_TOKEN( bar ));
 if( topbot == top )
-return STR( bar { ) + e + STR( } );
+return STR( overline { ) + e + STR( } );
 else
 return STR( underline { ) + e + STR( } );
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2012-01-06 Thread Lubos Lunak
 starmath/source/ooxmlexport.cxx |2 +-
 starmath/source/ooxmlimport.cxx |5 -
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit cedaffbc1323f7ae3dd0ba9426385e205ff513a7
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Jan 6 12:20:54 2012 +0100

write TBAR rather as an accent, use over/underline for m:bar

seems to match the docx semantics better, despite the names

diff --git a/starmath/source/ooxmlexport.cxx b/starmath/source/ooxmlexport.cxx
index a7740da..fd12301 100644
--- a/starmath/source/ooxmlexport.cxx
+++ b/starmath/source/ooxmlexport.cxx
@@ -324,6 +324,7 @@ void SmOoxmlExport::HandleAttribute( const SmAttributNode* 
pNode, int nLevel )
 case TWIDETILDE:
 case TWIDEHAT:
 case TWIDEVEC:
+case TBAR:
 {
 m_pSerializer-startElementNS( XML_m, XML_acc, FSEND );
 m_pSerializer-startElementNS( XML_m, XML_accPr, FSEND );
@@ -337,7 +338,6 @@ void SmOoxmlExport::HandleAttribute( const SmAttributNode* 
pNode, int nLevel )
 m_pSerializer-endElementNS( XML_m, XML_acc );
 break;
 }
-case TBAR:
 case TOVERLINE:
 case TUNDERLINE:
 m_pSerializer-startElementNS( XML_m, XML_bar, FSEND );
diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx
index 1cdee7f..34c6831 100644
--- a/starmath/source/ooxmlimport.cxx
+++ b/starmath/source/ooxmlimport.cxx
@@ -191,6 +191,9 @@ OUString SmOoxmlImport::handleAcc()
 OUString acc;
 switch( accChr )
 {
+case MS_BAR:
+acc = STR( bar );
+break;
 case MS_CHECK:
 acc = STR( check );
 break;
@@ -256,7 +259,7 @@ OUString SmOoxmlImport::handleBar()
 OUString e = readOMathArgInElement( M_TOKEN( e ));
 stream.ensureClosingTag( M_TOKEN( bar ));
 if( topbot == top )
-return STR( bar { ) + e + STR( } );
+return STR( overline { ) + e + STR( } );
 else
 return STR( underline { ) + e + STR( } );
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: starmath/source

2012-01-06 Thread Lubos Lunak
 starmath/source/node.cxx |   24 
 1 file changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 608c927c0faac0b1e143cf50ce88003a2aaea73f
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Jan 6 12:45:00 2012 +0100

symbolic names instead of hex values for math symbols where possible

diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index d5866cd..09d2ee8 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -2824,46 +2824,46 @@ void SmAttributNode::CreateTextFromNode(String rText)
 case 0xAF: // MACRON
 APPEND(rText,overline );
 break;
-case 0x2d9: // DOT ABOVE
+case MS_DOT: // DOT ABOVE
 APPEND(rText,dot );
 break;
 case 0x2dc: // SMALL TILDE
 APPEND(rText,widetilde );
 break;
-case 0xA8: // DIAERESIS
+case MS_DDOT: // DIAERESIS
 APPEND(rText,ddot );
 break;
 case 0xE082:
 break;
 case 0xE09B:
-case 0x20DB: // COMBINING THREE DOTS ABOVE
+case MS_DDDOT: // COMBINING THREE DOTS ABOVE
 APPEND(rText,dddot );
 break;
-case 0x301: // COMBINING ACUTE ACCENT
+case MS_ACUTE: // COMBINING ACUTE ACCENT
 APPEND(rText,acute );
 break;
-case 0x300: // COMBINING GRAVE ACCENT
+case MS_GRAVE: // COMBINING GRAVE ACCENT
 APPEND(rText,grave );
 break;
-case 0x30C: // COMBINING CARON
+case MS_CHECK: // COMBINING CARON
 APPEND(rText,check );
 break;
-case 0x306: // COMBINING BREVE
+case MS_BREVE: // COMBINING BREVE
 APPEND(rText,breve );
 break;
-case 0x30A: // COMBINING RING ABOVE
+case MS_CIRCLE: // COMBINING RING ABOVE
 APPEND(rText,circle );
 break;
-case 0x20D7: // COMBINING RIGHT ARROW ABOVE
+case MS_VEC: // COMBINING RIGHT ARROW ABOVE
 APPEND(rText,vec );
 break;
-case 0x303: // COMBINING TILDE
+case MS_TILDE: // COMBINING TILDE
 APPEND(rText,tilde );
 break;
-case 0x302: // COMBINING CIRCUMFLEX ACCENT
+case MS_HAT: // COMBINING CIRCUMFLEX ACCENT
 APPEND(rText,hat );
 break;
-case 0x304: // COMBINING MACRON
+case MS_BAR: // COMBINING MACRON
 APPEND(rText,bar );
 break;
 default:
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2012-01-06 Thread Lubos Lunak
 starmath/source/node.cxx |   36 
 1 file changed, 32 insertions(+), 4 deletions(-)

New commits:
commit c3e17714831bf80270a29a5e09194c8f141e42f3
Author: Joshua Cogliati jjcogliati...@yahoo.com
Date:   Fri Jan 6 10:48:01 2012 +

smath does not handle accents in MathML

diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 58010e7..d5866cd 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -2821,23 +2821,51 @@ void SmAttributNode::CreateTextFromNode(String rText)
 nLast = aStr.GetChar(0);
 switch (nLast)
 {
-case 0xAF:
+case 0xAF: // MACRON
 APPEND(rText,overline );
 break;
-case 0x2d9:
+case 0x2d9: // DOT ABOVE
 APPEND(rText,dot );
 break;
-case 0x2dc:
+case 0x2dc: // SMALL TILDE
 APPEND(rText,widetilde );
 break;
-case 0xA8:
+case 0xA8: // DIAERESIS
 APPEND(rText,ddot );
 break;
 case 0xE082:
 break;
 case 0xE09B:
+case 0x20DB: // COMBINING THREE DOTS ABOVE
 APPEND(rText,dddot );
 break;
+case 0x301: // COMBINING ACUTE ACCENT
+APPEND(rText,acute );
+break;
+case 0x300: // COMBINING GRAVE ACCENT
+APPEND(rText,grave );
+break;
+case 0x30C: // COMBINING CARON
+APPEND(rText,check );
+break;
+case 0x306: // COMBINING BREVE
+APPEND(rText,breve );
+break;
+case 0x30A: // COMBINING RING ABOVE
+APPEND(rText,circle );
+break;
+case 0x20D7: // COMBINING RIGHT ARROW ABOVE
+APPEND(rText,vec );
+break;
+case 0x303: // COMBINING TILDE
+APPEND(rText,tilde );
+break;
+case 0x302: // COMBINING CIRCUMFLEX ACCENT
+APPEND(rText,hat );
+break;
+case 0x304: // COMBINING MACRON
+APPEND(rText,bar );
+break;
 default:
 rText.Append(nLast);
 break;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-01-09 Thread Lubos Lunak
 sw/source/filter/ww8/docxattributeoutput.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 2df1c40b4b7cb3107a68984db644f10097f04c3c
Author: Luboš Luňák l.lu...@suse.cz
Date:   Mon Jan 9 15:51:10 2012 +0100

don't use an invalidated iterator

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index b23bcc0..df37cf0 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -518,7 +518,7 @@ void DocxAttributeOutput::StartRun( const SwRedlineData* 
pRedlineData )
 void DocxAttributeOutput::EndRun()
 {
 // Write field starts
-for ( std::vectorFieldInfos::iterator pIt = m_Fields.begin(); pIt != 
m_Fields.end(); ++pIt )
+for ( std::vectorFieldInfos::iterator pIt = m_Fields.begin(); pIt != 
m_Fields.end(); )
 {
 // Add the fields starts for all but hyperlinks and TOCs
 if ( pIt-bOpen  pIt-pField )
@@ -529,10 +529,11 @@ void DocxAttributeOutput::EndRun()
 // Unknown fields sould be removed too
 if ( !pIt-bClose || ( pIt-eType == ww::eUNKNOWN ) )
 {
-m_Fields.erase( pIt );
---pIt;
+pIt = m_Fields.erase( pIt );
+continue;
 }
 }
+++pIt;
 }
 
 // write the run properties + the text, already in the correct order
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-01-16 Thread Lubos Lunak
 sw/source/filter/ww8/ww8par5.cxx |   31 +--
 1 file changed, 29 insertions(+), 2 deletions(-)

New commits:
commit 09a25659775c4d39eb40507e7cbd9472570834d3
Author: Kenneth Aafløy kenneth_li...@aafloy.net
Date:   Wed Jan 11 15:22:27 2012 +0100

Add import of docvariable fields from word documents

Hi,

Attached is a patch that adds support for importing docvariable fields
from microsoft word documents. The variables themselves are already
converted correctly, so this patch only ties the field to the existing
custom document information.

Please consider this patch for inclusion.

I declare that this and my further patches are under LGPLv3+ / MPL license.

With Regards,
Kenneth Aafløy

diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index e5cf9c8..f27ef6b 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -965,7 +965,7 @@ long SwWW8ImplReader::Read_Field(WW8PLCFManResult* pRes)
 0,
 0,
 0,
-0,
+SwWW8ImplReader::Read_F_DocInfo,   // 64 - DOCVARIABLE
 0,
 0,
 SwWW8ImplReader::Read_F_IncludePicture,// 67
@@ -1759,6 +1759,9 @@ eF_ResT SwWW8ImplReader::Read_F_DocInfo( WW8FieldDesc* 
pF, String rStr )
 nReg = DI_SUB_TIME;
 bDateTime = true;
 break;
+case 64: // DOCVARIABLE
+nSub = DI_CUSTOM;
+break;
 }
 
 sal_uInt32 nFormat = 0;
@@ -1784,8 +1787,32 @@ eF_ResT SwWW8ImplReader::Read_F_DocInfo( WW8FieldDesc* 
pF, String rStr )
 }
 }
 
+String aData;
+// Extract DOCVARIABLE varname
+if ( 64 == pF-nId )
+{
+_ReadFieldParams aReadParam( rStr );
+long nRet;
+while( -1 != ( nRet = aReadParam.SkipToNextToken() ))
+{
+switch( nRet )
+{
+case -2:
+if( !aData.Len() )
+aData = aReadParam.GetResult();
+break;
+case '*':
+//Skip over MERGEFORMAT
+aReadParam.SkipToNextToken();
+break;
+}
+}
+
+aData = comphelper::string::remove(aData, '');
+}
+
 SwDocInfoField aFld( (SwDocInfoFieldType*)
-rDoc.GetSysFldType( RES_DOCINFOFLD ), nSub|nReg, String(), nFormat );
+rDoc.GetSysFldType( RES_DOCINFOFLD ), nSub|nReg, aData, nFormat );
 if (bDateTime)
 ForceFieldLanguage(aFld, nLang);
 rDoc.InsertPoolItem(*pPaM, SwFmtFld(aFld), 0);
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 4 commits - sw/source sw/uiconfig writerfilter/documentation writerfilter/source

2012-01-19 Thread Lubos Lunak
 sw/source/core/layout/tabfrm.cxx   |5 ---
 writerfilter/documentation/ooxml/model.xml |   41 +
 writerfilter/source/ooxml/model.xml|2 -
 3 files changed, 42 insertions(+), 6 deletions(-)

New commits:
commit 9f03ad248e2e0151facadee0738a7fa6158743f9
Author: Luboš Luňák l.lu...@suse.cz
Date:   Thu Jan 19 14:22:27 2012 +0100

a feeble attempt at at least some docs for writerfilter

diff --git a/writerfilter/documentation/ooxml/model.xml 
b/writerfilter/documentation/ooxml/model.xml
new file mode 100644
index 000..c50f23d
--- /dev/null
+++ b/writerfilter/documentation/ooxml/model.xml
@@ -0,0 +1,41 @@
+These are various notes about ooxml/model.xml and related stuff. They have been
+mostly found out by trial and error, because existing documentation is poor
+or nonexistent, so I don't actually understand writerfilter that much (and
+think nothing nice about it) and don't think it (both writerfilter and my
+understanding/liking of it) could be noticeably improved. In an ideal world
+it should be nuked from orbit and started again from scratch with a saner 
design.
+
+-
+CT_xxx (Complex Type) - it seems to be used for XML elements
+ST_xxx (Simple Type) - it seems to be used for XML attributes
+
+- SPRM - no idea what that actually means, but in the context of OOXML it seems
+to pretty much mean XML element
+
+-
+
+Format of the resource tag (shortened CT_Font example):
+
+resource name=CT_Font resource=Properties tag=font
+  element name=charset tokenid=ooxml:CT_Font_charset/
+  attribute name=name tokenid=ooxml:CT_Font_name/
+/resource
+
+CT_Font is the type that is defined how it will be handled.
+resource=XXX means it will be handled by OOXMLFastContextHandlerXXX class
+no idea what tag=font means or if it matters
+element defines the w:charset subelement will be handled in sprm() function
+as NS_ooxml::LN_CT_Font_charset case
+attribute defines the w:name attribute of the element will be handled
+in attribute() function as NS_ooxml::LN_CT_Font_name case
+in both cases sprm()/attribute() may mean actually any of the various strange
+naming ideas like lcl_sprm()
+
+-
+If an element (and its subelements) are not processed but the element itself
+does not require any special handling, make sure something like the below is 
present.
+Otherwise null context will be created and the element and all its subelements
+will be ignored.
+
+resource name=CT_OMathPara resource=Stream tag=math/
+
commit 58de34f6330e7093238bae2a14982e598867b336
Author: Luboš Luňák l.lu...@suse.cz
Date:   Wed Jan 18 18:08:26 2012 +0100

fix reading w:charset, you misdesigned writerfilter monster (fdo#34814)

diff --git a/writerfilter/source/ooxml/model.xml 
b/writerfilter/source/ooxml/model.xml
index 39ecf66..4dc8c49 100644
--- a/writerfilter/source/ooxml/model.xml
+++ b/writerfilter/source/ooxml/model.xml
@@ -20473,7 +20473,7 @@
   define name=CT_Charset
 optional
   attribute name=val
-ref name=CT_UcharHexNumber/
+ref name=ST_UcharHexNumber/
   /attribute
 /optional
 optional
commit 38fea73760e675dc04e0c20f3e01e50aa8b03767
Author: Luboš Luňák l.lu...@suse.cz
Date:   Tue Jan 17 14:28:38 2012 +0100

remove executable bit on source files

diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx
old mode 100755
new mode 100644
diff --git a/sw/source/ui/config/optdlg.src b/sw/source/ui/config/optdlg.src
old mode 100755
new mode 100644
diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx
old mode 100755
new mode 100644
diff --git a/sw/uiconfig/sglobal/menubar/menubar.xml 
b/sw/uiconfig/sglobal/menubar/menubar.xml
old mode 100755
new mode 100644
diff --git a/sw/uiconfig/sweb/menubar/menubar.xml 
b/sw/uiconfig/sweb/menubar/menubar.xml
old mode 100755
new mode 100644
diff --git a/sw/uiconfig/swform/menubar/menubar.xml 
b/sw/uiconfig/swform/menubar/menubar.xml
old mode 100755
new mode 100644
diff --git a/sw/uiconfig/swreport/menubar/menubar.xml 
b/sw/uiconfig/swreport/menubar/menubar.xml
old mode 100755
new mode 100644
diff --git a/sw/uiconfig/swriter/menubar/menubar.xml 
b/sw/uiconfig/swriter/menubar/menubar.xml
old mode 100755
new mode 100644
diff --git a/sw/uiconfig/swxform/menubar/menubar.xml 
b/sw/uiconfig/swxform/menubar/menubar.xml
old mode 100755
new mode 100644
commit 254ba40392b17c2cb2fa1ef35a835d19a5f4a5e1
Author: Luboš Luňák l.lu...@suse.cz
Date:   Mon Jan 16 17:42:39 2012 +0100

remove pointless forward moving of a table (bnc#706138)

This appears to be broken. Why should a table where all rows want to be kept
together be moved one page forward just because there is something
before it on the page where it is? It either fits its curent page, in which
case it's wrong, or it does not fit, in which case it may not fit the 
following
page either and something else needs to take care of it anyway.

diff 

[Libreoffice-commits] .: sw/source

2012-01-24 Thread Lubos Lunak
 sw/source/filter/xml/xmlimp.cxx  |   30 +-
 sw/source/ui/uno/SwXDocumentSettings.cxx |6 ++
 2 files changed, 35 insertions(+), 1 deletion(-)

New commits:
commit db0f839920c38973f8448df0f74de7c4c95c832c
Author: Luboš Luňák l.lu...@suse.cz
Date:   Tue Jan 24 16:05:37 2012 +0100

order database properties so that opening it in writer works (bnc#740032)

http://lists.freedesktop.org/archives/libreoffice/2012-January/024380.html

diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index a59ebf7..f19a20a 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -1188,6 +1188,13 @@ void SwXMLImport::SetConfigurationSettings(const 
Sequence  PropertyValue   aC
 
 OUString sRedlineProtectionKey( RTL_CONSTASCII_USTRINGPARAM( 
RedlineProtectionKey ) );
 
+const PropertyValue* currentDatabaseDataSource = NULL;
+const PropertyValue* currentDatabaseCommand = NULL;
+const PropertyValue* currentDatabaseCommandType = NULL;
+OUString currentDatabaseDataSourceKey( RTL_CONSTASCII_USTRINGPARAM( 
CurrentDatabaseDataSource ));
+OUString currentDatabaseCommandKey( RTL_CONSTASCII_USTRINGPARAM( 
CurrentDatabaseCommand ));
+OUString currentDatabaseCommandTypeKey( RTL_CONSTASCII_USTRINGPARAM( 
CurrentDatabaseCommandType ));
+
 while( nCount-- )
 {
 if( !bIsUserSetting )
@@ -1212,7 +1219,15 @@ void SwXMLImport::SetConfigurationSettings(const 
Sequence  PropertyValue   aC
 }
 else
 {
-xProps-setPropertyValue( pValues-Name,
+// HACK: Setting these out of order does not work.
+if( pValues-Name.equals( currentDatabaseDataSourceKey 
))
+currentDatabaseDataSource = pValues;
+else if( pValues-Name.equals( 
currentDatabaseCommandKey ))
+currentDatabaseCommand = pValues;
+else if( pValues-Name.equals( 
currentDatabaseCommandTypeKey ))
+currentDatabaseCommandType = pValues;
+else
+xProps-setPropertyValue( pValues-Name,
   pValues-Value );
 }
 }
@@ -1267,6 +1282,19 @@ void SwXMLImport::SetConfigurationSettings(const 
Sequence  PropertyValue   aC
 pValues++;
 }
 
+try
+{
+if( currentDatabaseDataSource != NULL )
+xProps-setPropertyValue( currentDatabaseDataSource-Name, 
currentDatabaseDataSource-Value );
+if( currentDatabaseCommand != NULL )
+xProps-setPropertyValue( currentDatabaseCommand-Name, 
currentDatabaseCommand-Value );
+if( currentDatabaseCommandType != NULL )
+xProps-setPropertyValue( currentDatabaseCommandType-Name, 
currentDatabaseCommandType-Value );
+} catch( Exception )
+{
+OSL_FAIL( SwXMLImport::SetConfigurationSettings: Exception! );
+}
+
 // finally, treat the non-default cases
 // introduce boolean, that indicates a document, written by version prior 
SO8.
 const bool bDocumentPriorSO8 = !bConsiderWrapOnObjPos;
diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx 
b/sw/source/ui/uno/SwXDocumentSettings.cxx
index 7398dfd..c349631 100644
--- a/sw/source/ui/uno/SwXDocumentSettings.cxx
+++ b/sw/source/ui/uno/SwXDocumentSettings.cxx
@@ -474,6 +474,8 @@ void SwXDocumentSettings::_setSingleValue( const 
comphelper::PropertyInfo  rInf
 case HANDLE_CURRENT_DATABASE_COMMAND:
 {
 SwDBData aData = mpDoc-GetDBData();
+SAL_WARN_IF( aData.sDataSource.isEmpty(), sw.uno,
+\CurrentDatabaseCommand\ property possibly set before 
\CurrentDatabaseDataSource\ );
 if ( rValue = aData.sCommand )
 mpDoc-ChgDBData( aData );
 }
@@ -481,6 +483,10 @@ void SwXDocumentSettings::_setSingleValue( const 
comphelper::PropertyInfo  rInf
 case HANDLE_CURRENT_DATABASE_COMMAND_TYPE:
 {
 SwDBData aData = mpDoc-GetDBData();
+SAL_WARN_IF( aData.sDataSource.isEmpty(), sw.uno,
+\CurrentDatabaseCommandType\ property possibly set before 
\CurrentDatabaseDataSource\ );
+SAL_WARN_IF( aData.sCommand.isEmpty(), sw.uno,
+\CurrentDatabaseCommandType\ property possibly set before 
\CurrentDatabaseCommand\ );
 if ( rValue = aData.nCommandType )
 mpDoc-ChgDBData( aData );
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 3 commits - oox/source sal/inc starmath/source

2012-01-30 Thread Lubos Lunak
 oox/source/mathml/importutils.cxx |   56 --
 sal/inc/sal/log-areas.dox |8 +
 starmath/source/ooxmlexport.cxx   |   15 +-
 starmath/source/ooxmlimport.cxx   |7 ++--
 4 files changed, 44 insertions(+), 42 deletions(-)

New commits:
commit 74ded8e619cac076e8fbf4ea547d61e055e7e3ce
Author: Luboš Luňák l.lu...@suse.cz
Date:   Mon Jan 30 14:09:17 2012 +0100

add log areas

diff --git a/sal/inc/sal/log-areas.dox b/sal/inc/sal/log-areas.dox
index 9dfe176..5c10567 100644
--- a/sal/inc/sal/log-areas.dox
+++ b/sal/inc/sal/log-areas.dox
@@ -13,9 +13,17 @@ a new area, use it and add it to the list in the proper 
section with an explanat
 This list should give you an overview of which areas to enable when debugging
 certain functionality.
 
+@section oox
+
+@li oox.xmlstream - XmlStream class
+
 @section Writer
 
 @li sw.uno - Writer's UNO interfaces
 @li sw.ww8 - .doc/.docx export filter, .doc import filter (not writerfilter)
 
+@section StarMath
+
+@li starmath.ooxml - OOXML export/import support
+
 */
commit 0843da18a6da6f01c6ad8d141a741c92e857d66e
Author: Luboš Luňák l.lu...@suse.cz
Date:   Mon Jan 30 14:07:42 2012 +0100

fprintf - SAL_INFO

diff --git a/oox/source/mathml/importutils.cxx 
b/oox/source/mathml/importutils.cxx
index 55eb1fa..23db8f2 100644
--- a/oox/source/mathml/importutils.cxx
+++ b/oox/source/mathml/importutils.cxx
@@ -35,20 +35,15 @@
 #include oox/token/tokenmap.hxx
 #include oox/token/tokens.hxx
 #include oox/token/namespaces.hxx
+#include rtl/oustringostreaminserter.hxx
 #include rtl/string.hxx
 
 // *sigh*
 #define STR( str ) OUString( RTL_CONSTASCII_USTRINGPARAM( str ))
-#define CSTR( str ) ( rtl::OUStringToOString( str, RTL_TEXTENCODING_UTF8 
).getStr())
 
 #define OPENING( token ) XML_STREAM_OPENING( token )
 #define CLOSING( token ) XML_STREAM_CLOSING( token )
 
-// HACK - TODO convert to the real debug stuff
-#undef SAL_LOG_LEVEL
-#define SAL_LOG_LEVEL 2
-
-
 using namespace com::sun::star;
 using rtl::OUString;
 
@@ -84,7 +79,6 @@ AttributeListBuilder::AttributeListBuilder( const 
uno::Reference xml::sax::XFas
 }
 }
 
-#if 0
 static OUString tokenToString( int token )
 {
 OUString tokenname = StaticTokenMap::get().getUnicodeTokenName( token  
TOKEN_MASK );
@@ -117,7 +111,6 @@ static OUString tokenToString( int token )
 // just the name itself, not specified whether opening or closing
 return namespacename + STR( : ) + tokenname;
 }
-#endif
 
 } // namespace
 
@@ -145,7 +138,7 @@ bool XmlStream::AttributeList::attribute( int token, bool 
def ) const
 if( find-second.equalsIgnoreAsciiCaseAscii( false ) || 
find-second.equalsIgnoreAsciiCaseAscii( off )
 || find-second.equalsIgnoreAsciiCaseAscii( f ) || 
find-second.equalsIgnoreAsciiCaseAscii( 0 ))
 return false;
-//fprintf( stderr, Cannot convert \'%s\' to bool.\n, CSTR( 
find-second ));
+SAL_WARN( oox.xmlstream, Cannot convert \'  find-second  \' 
to bool. );
 }
 return def;
 }
@@ -157,8 +150,8 @@ sal_Unicode XmlStream::AttributeList::attribute( int token, 
sal_Unicode def ) co
 {
 if( !find-second.isEmpty() )
 {
-//if( find-second.getLength() != 1 )
-//fprintf( stderr, Cannot convert \'%s\' to sal_Unicode, 
stripping.\n, CSTR( find-second ));
+if( find-second.getLength() != 1 )
+SAL_WARN( oox.xmlstream, Cannot convert \'  find-second 
 \' to sal_Unicode, stripping. );
 return find-second[ 0 ];
 }
 }
@@ -229,7 +222,6 @@ XmlStream::Tag XmlStream::checkTag( int token, bool 
optional )
 {
 // either it's the following tag, or find it
 int savedPos = pos;
-#if SAL_LOG_LEVEL = 2
 if( optional )
 { // avoid printing debug messages about skipping tags if the optional one
   // will not be found and the position will be reset back
@@ -239,7 +231,6 @@ XmlStream::Tag XmlStream::checkTag( int token, bool 
optional )
 return Tag();
 }
 }
-#endif
 if( currentToken() == token || findTag( token ))
 {
 Tag ret = currentTag();
@@ -251,7 +242,7 @@ XmlStream::Tag XmlStream::checkTag( int token, bool 
optional )
 pos = savedPos;
 return Tag();
 }
-//fprintf( stderr, Expected tag %s not found.\n, CSTR( tokenToString( 
token )));
+SAL_WARN( oox.xmlstream, Expected tag   tokenToString( token )   
not found. );
 return Tag();
 }
 
@@ -260,7 +251,7 @@ bool XmlStream::findTag( int token )
 return findTagInternal( token, false );
 }
 
-bool XmlStream::findTagInternal( int token, bool /*silent*/ )
+bool XmlStream::findTagInternal( int token, bool silent )
 {
 int depth = 0;
 for(;
@@ -271,20 +262,21 @@ bool XmlStream::findTagInternal( int token, bool 
/*silent*/ )
 {
 if( currentToken() == OPENING( currentToken()))
 {
-//if( !silent )
-//fprintf( stderr, 

[Libreoffice-commits] .: sw/source

2012-01-30 Thread Lubos Lunak
 sw/source/filter/ww8/ww8scan.cxx |   18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit b5a73d4b2b283d3d1a57ac0f66b608998960a873
Author: Luboš Luňák l.lu...@suse.cz
Date:   Mon Jan 30 19:07:43 2012 +0100

query remaining stream size after seeking, not before (fdo#45255)

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index a97f383..593624b 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -1978,10 +1978,11 @@ WW8PLCFspecial::WW8PLCFspecial(SvStream* pSt, 
sal_uInt32 nFilePos,
 const sal_uInt32 nValidMin=4;
 
 sal_Size nOldPos = pSt-Tell();
-sal_Size nRemainingSize = pSt-remainingSize();
 
-bool bValid = checkSeek(*pSt, nFilePos)  (nRemainingSize = nValidMin) 
-(nPLCF = nValidMin);
+bool bValid = checkSeek(*pSt, nFilePos);
+sal_Size nRemainingSize = pSt-remainingSize();
+if( !(nRemainingSize = nValidMin  nPLCF = nValidMin ))
+bValid = false;
 nPLCF = bValid ? std::min(nRemainingSize, static_castsal_Size(nPLCF)) : 
nValidMin;
 
 // Pointer auf Pos- u. Struct-Array
@@ -2136,9 +2137,7 @@ WW8PLCF::WW8PLCF(SvStream rSt, WW8_FC nFilePos, 
sal_Int32 nPLCF, int nStruct,
 void WW8PLCF::ReadPLCF(SvStream rSt, WW8_FC nFilePos, sal_uInt32 nPLCF)
 {
 sal_Size nOldPos = rSt.Tell();
-sal_Size nRemainingSize = rSt.remainingSize();
-
-bool bValid = checkSeek(rSt, nFilePos)  (nRemainingSize = nPLCF);
+bool bValid = checkSeek(rSt, nFilePos)  (rSt.remainingSize() = nPLCF);
 
 if (bValid)
 {
@@ -2317,10 +2316,11 @@ WW8PLCFpcd::WW8PLCFpcd(SvStream* pSt, sal_uInt32 
nFilePos,
 const sal_uInt32 nValidMin=4;
 
 sal_Size nOldPos = pSt-Tell();
-sal_Size nRemainingSize = pSt-remainingSize();
 
-bool bValid = checkSeek(*pSt, nFilePos)  (nRemainingSize = nValidMin) 
-(nPLCF = nValidMin);
+bool bValid = checkSeek(*pSt, nFilePos);
+sal_Size nRemainingSize = pSt-remainingSize();
+if( !(nRemainingSize = nValidMin  nPLCF = nValidMin ))
+bValid = false;
 nPLCF = bValid ? std::min(nRemainingSize, static_castsal_Size(nPLCF)) : 
nValidMin;
 
 pPLCF_PosArray = new sal_Int32[ ( nPLCF + 3 ) / 4 ];// Pointer auf 
Pos-Array
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 3 commits - vcl/inc vcl/source vcl/unx

2012-02-01 Thread Lubos Lunak
 vcl/inc/salgdi.hxx   |2 -
 vcl/inc/vcl/salnativewidgets.hxx |   18 ++---
 vcl/source/gdi/outdevnative.cxx  |   54 +++
 vcl/source/gdi/salgdilayout.cxx  |   35 +++--
 vcl/unx/kde4/KDESalGraphics.cxx  |1 
 5 files changed, 86 insertions(+), 24 deletions(-)

New commits:
commit c161e3652853e7478f79df22e83412ada50f3c6a
Author: Luboš Luňák l.lu...@suse.cz
Date:   Wed Feb 1 17:36:16 2012 +0100

add a check before a cast

diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
index c552d91..0be12fb 100644
--- a/vcl/unx/kde4/KDESalGraphics.cxx
+++ b/vcl/unx/kde4/KDESalGraphics.cxx
@@ -369,6 +369,7 @@ sal_Bool KDESalGraphics::drawNativeControl( ControlType 
type, ControlPart part,
 // paints the whole menu item, so translate position (and it'll be 
clipped);
 // it is also necessary to fill the background transparently 
first, as this
 // is painted after menuitem highlight, otherwise there would be a 
grey area
+assert( value.getType() == CTRL_MENU_POPUP );
 const MenupopupValue* menuVal = static_castconst 
MenupopupValue*(value);
 QRect menuItemRect( region2QRect( menuVal-maItemRect ));
 QRect rect( menuItemRect.topLeft() - widgetRect.topLeft(),
commit 47f16670f05186413d6f5b436d36c0e52059c74a
Author: Luboš Luňák l.lu...@suse.cz
Date:   Wed Feb 1 16:52:43 2012 +0100

VCL_DLLPUBLIC was missing for some *Value types

diff --git a/vcl/inc/vcl/salnativewidgets.hxx b/vcl/inc/vcl/salnativewidgets.hxx
index 6c7cba1..872fa35 100644
--- a/vcl/inc/vcl/salnativewidgets.hxx
+++ b/vcl/inc/vcl/salnativewidgets.hxx
@@ -418,7 +418,7 @@ class VCL_DLLPUBLIC SpinbuttonValue : public 
ImplControlValue
  *
  *  Value container for toolbars detailing the grip position
  */
-class ToolbarValue : public ImplControlValue
+class VCL_DLLPUBLIC ToolbarValue : public ImplControlValue
 {
 public:
 ToolbarValue() : ImplControlValue( CTRL_TOOLBAR, BUTTONVALUE_DONTKNOW, 0 )
@@ -434,7 +434,7 @@ public:
  *
  *  Value container for menubars specifying height of adjacent docking area
  */
-class MenubarValue : public ImplControlValue
+class VCL_DLLPUBLIC MenubarValue : public ImplControlValue
 {
 public:
 MenubarValue() : ImplControlValue( CTRL_MENUBAR, BUTTONVALUE_DONTKNOW, 0 )
@@ -449,7 +449,7 @@ public:
  * Value container for menu items; specifies the rectangle for the whole item 
which
  * may be useful when drawing parts with a smaller rectangle.
  */
-class MenupopupValue : public ImplControlValue
+class VCL_DLLPUBLIC MenupopupValue : public ImplControlValue
 {
 public:
 MenupopupValue() : ImplControlValue( CTRL_MENU_POPUP, 
BUTTONVALUE_DONTKNOW, 0 )
@@ -467,7 +467,7 @@ public:
  *
  *  Value container for pushbuttons specifying additional drawing hints
  */
-class PushButtonValue : public ImplControlValue
+class VCL_DLLPUBLIC PushButtonValue : public ImplControlValue
 {
 public:
 PushButtonValue()
commit 150befe0fe9533f39df55b0d95ad25caaddf1830
Author: Luboš Luňák l.lu...@suse.cz
Date:   Wed Feb 1 16:46:05 2012 +0100

const is such a useless concept anyway /sarcasm

diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx
index 7736832..d29247b 100644
--- a/vcl/inc/salgdi.hxx
+++ b/vcl/inc/salgdi.hxx
@@ -351,7 +351,7 @@ public:
 sal_Boolmirror( sal_uInt32 nPoints, const SalPoint 
*pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev, bool bBack = false ) 
const;
 voidmirror( Rectangle rRect, const OutputDevice*, 
bool bBack = false ) const;
 voidmirror( Region rRgn, const OutputDevice *pOutDev, 
bool bBack = false ) const;
-voidmirror( ControlType,const ImplControlValue,const 
OutputDevice*,bool bBack = false) const;
+voidmirror( ImplControlValue, const OutputDevice*, 
bool bBack = false ) const;
 basegfx::B2DPoint   mirror( const basegfx::B2DPoint i_rPoint, const 
OutputDevice *pOutDev, bool bBack = false ) const;
 basegfx::B2DPolygon mirror( const basegfx::B2DPolygon i_rPoly, const 
OutputDevice *pOutDev, bool bBack = false ) const;
 basegfx::B2DPolyPolygon mirror( const basegfx::B2DPolyPolygon i_rPoly, 
const OutputDevice *pOutDev, bool bBack = false ) const;
diff --git a/vcl/inc/vcl/salnativewidgets.hxx b/vcl/inc/vcl/salnativewidgets.hxx
index af39285..6c7cba1 100644
--- a/vcl/inc/vcl/salnativewidgets.hxx
+++ b/vcl/inc/vcl/salnativewidgets.hxx
@@ -297,6 +297,8 @@ class VCL_DLLPUBLIC ImplControlValue
 
 virtual ~ImplControlValue();
 
+virtual ImplControlValue* clone() const;
+
 ControlType getType() const { return mType; }
 
 inline ButtonValue  getTristateVal( void ) const { return 
mTristate; }
@@ -334,6 +336,7 @@ class VCL_DLLPUBLIC ScrollbarValue : public ImplControlValue
 mnThumbState = 0; mnPage1State = 0; mnPage2State = 0;

[Libreoffice-commits] .: filter/source

2012-02-08 Thread Lubos Lunak
 filter/source/msfilter/msdffimp.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 38af1195a9a24af4aaff84e7be318007b82f9b47
Author: Luboš Luňák l.lu...@suse.cz
Date:   Wed Feb 8 17:38:57 2012 +0100

do not deserialize into long, use a type of the correct width (fdo#40768)

diff --git a/filter/source/msfilter/msdffimp.cxx 
b/filter/source/msfilter/msdffimp.cxx
index 5871da9..2a91c24 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -6672,7 +6672,10 @@ sal_Bool SvxMSDffManager::GetBLIPDirect( SvStream 
rBLIPStream, Graphic rData,
 rBLIPStream.SeekRel( nSkip + 20 );
 
 // read in size of metafile in EMUS
-rBLIPStream  aMtfSize100.Width()  aMtfSize100.Height();
+sal_Int32 width, height;
+rBLIPStream  width  height;
+aMtfSize100.Width() = width;
+aMtfSize100.Height() = height;
 
 // scale to 1/100mm
 aMtfSize100.Width() /= 360, aMtfSize100.Height() /= 360;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sal/inc

2012-02-10 Thread Lubos Lunak
 sal/inc/osl/module.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 31e236c5efa01ac5c681a2f18774fe66a9e1249e
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Feb 10 13:33:22 2012 +0100

consistent constness for getFunctionSymbol() overloads

This is an inline function, so there should be no problems with binary
compatibility.

diff --git a/sal/inc/osl/module.hxx b/sal/inc/osl/module.hxx
index c8d39a2..0d7bca6 100644
--- a/sal/inc/osl/module.hxx
+++ b/sal/inc/osl/module.hxx
@@ -147,7 +147,7 @@ public:
 
 @see getSymbol
 */
-oslGenericFunction SAL_CALL getFunctionSymbol( const ::rtl::OUString 
ustrFunctionSymbolName )
+oslGenericFunction SAL_CALL getFunctionSymbol( const ::rtl::OUString 
ustrFunctionSymbolName ) const
 {
 return ( osl_getFunctionSymbol( m_Module, ustrFunctionSymbolName.pData 
) );
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sc/source

2012-02-22 Thread Lubos Lunak
 sc/source/core/data/dptabres.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 00f022bac10629d35eb6f073c3dfe90e120202b5
Author: Luboš Luňák l.lu...@suse.cz
Date:   Wed Feb 22 14:42:54 2012 +0100

fix misleading comment caused by previous commit

diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index 7d98440..421c17d 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -174,7 +174,7 @@ static sal_Bool lcl_IsLess( const ScDPDataMember* 
pDataMember1, const ScDPDataMe
 sal_Bool bError1 = pAgg1  pAgg1-HasError();
 sal_Bool bError2 = pAgg2  pAgg2-HasError();
 if ( bError1 )
-return sal_False;   // equal
+return sal_False;   // errors are always sorted at the end
 else if ( bError2 )
 return sal_True;// errors are always sorted at the end
 else
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: basic/source dbaccess/source desktop/source sal/CppunitTest_sal_rtl_strings.mk sal/inc sal/qa sal/rtl svl/source

2012-02-22 Thread Lubos Lunak
 basic/source/uno/namecont.cxx |   14 -
 dbaccess/source/ui/browser/unodatbr.cxx   |2 
 desktop/source/deployment/inc/dp_misc.h   |   18 -
 desktop/source/deployment/registry/configuration/dp_configuration.cxx |4 
 sal/CppunitTest_sal_rtl_strings.mk|1 
 sal/inc/rtl/ustring.hxx   |   62 
++
 sal/inc/sal/log-areas.dox |4 
 sal/qa/rtl/strings/test_oustring_stringliterals.cxx   |   91 
++
 sal/rtl/source/ustring.cxx|3 
 svl/source/misc/inethist.cxx  |4 
 10 files changed, 172 insertions(+), 31 deletions(-)

New commits:
commit f150ed241ff796a25bd1a797155104198b415f18
Author: Luboš Luňák l.lu...@suse.cz
Date:   Wed Feb 22 15:35:41 2012 +0100

OUString ctor for string literals without RTL_CONSTASCII stuff

http://lists.freedesktop.org/archives/libreoffice/2012-February/025662.html

diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index db0bf66..db72a4f 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -1001,13 +1001,13 @@ sal_Bool SfxLibraryContainer::init_Impl(
 INetURLObject aUserBasicInetObj( String(maLibraryPath).GetToken(1) );
 OUString aStandardStr( RTL_CONSTASCII_USTRINGPARAM(Standard) );
 
-static char strPrevFolderName_1[] = __basic_80;
-static char strPrevFolderName_2[] = __basic_80_2;
+static char const strPrevFolderName_1[] = __basic_80;
+static char const strPrevFolderName_2[] = __basic_80_2;
 INetURLObject aPrevUserBasicInetObj_1( aUserBasicInetObj );
 aPrevUserBasicInetObj_1.removeSegment();
 INetURLObject aPrevUserBasicInetObj_2 = aPrevUserBasicInetObj_1;
-aPrevUserBasicInetObj_1.Append( strPrevFolderName_1 );
-aPrevUserBasicInetObj_2.Append( strPrevFolderName_2 );
+aPrevUserBasicInetObj_1.Append( rtl::OString( strPrevFolderName_1 ));
+aPrevUserBasicInetObj_2.Append( rtl::OString( strPrevFolderName_2 ));
 
 // #i93163
 bool bCleanUp = false;
@@ -1072,7 +1072,7 @@ sal_Bool SfxLibraryContainer::init_Impl(
 String aFolderUserBasic = aUserBasicInetObj.GetMainURL( 
INetURLObject::NO_DECODE );
 INetURLObject aUserBasicTmpInetObj( aUserBasicInetObj );
 aUserBasicTmpInetObj.removeSegment();
-aUserBasicTmpInetObj.Append( __basic_tmp );
+aUserBasicTmpInetObj.Append( rtl::OString( __basic_tmp ));
 String aFolderTmp = aUserBasicTmpInetObj.GetMainURL( 
INetURLObject::NO_DECODE );
 
 mxSFI-move( aFolderUserBasic, aFolderTmp );
@@ -1195,10 +1195,10 @@ sal_Bool SfxLibraryContainer::init_Impl(
 {
 SAL_WARN(basic, Upgrade of Basic installation failed somehow);
 
-static char strErrorSavFolderName[] = __basic_80_err;
+static const char strErrorSavFolderName[] = __basic_80_err;
 INetURLObject aPrevUserBasicInetObj_Err( aUserBasicInetObj );
 aPrevUserBasicInetObj_Err.removeSegment();
-aPrevUserBasicInetObj_Err.Append( strErrorSavFolderName );
+aPrevUserBasicInetObj_Err.Append( rtl::OString( 
strErrorSavFolderName ));
 String aPrevFolder_Err = aPrevUserBasicInetObj_Err.GetMainURL( 
INetURLObject::NO_DECODE );
 
 bool bSaved = false;
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx 
b/dbaccess/source/ui/browser/unodatbr.cxx
index 6e31141..705cb24 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -1916,7 +1916,7 @@ void SbaTableQueryBrowser::Execute(sal_uInt16 nId, const 
Sequence PropertyValue
 break;
 
 case ID_TREE_CLOSE_CONN:
-openHelpAgent( HID_DSBROWSER_DISCONNECTING );
+openHelpAgent( rtl::OString( HID_DSBROWSER_DISCONNECTING ));
 closeConnection( m_pTreeView-getListBox().GetRootLevelParent( 
m_pTreeView-getListBox().GetCurEntry() ) );
 break;
 
diff --git a/desktop/source/deployment/inc/dp_misc.h 
b/desktop/source/deployment/inc/dp_misc.h
index 9e91253..29fd140 100644
--- a/desktop/source/deployment/inc/dp_misc.h
+++ b/desktop/source/deployment/inc/dp_misc.h
@@ -128,15 +128,6 @@ oslProcess raiseProcess( ::rtl::OUString const  appURL,
 DESKTOP_DEPLOYMENTMISC_DLLPUBLIC
 void writeConsole(::rtl::OUString const  sText);
 
-/** writes the argument string to the console.
-On Linux/Unix/etc. the string is passed into fprintf without any 
conversion.
-On Windows the string is converted to UTF16 assuming the argument is UTF8
-encoded. The UTF16 string is written to stdout with WriteFile. unopkg.com
-reads the data and 

[Libreoffice-commits] .: 2 commits - configure.in moz/makefile.mk moz/patches solenv/gbuild

2012-02-24 Thread Lubos Lunak
 configure.in |6 +++---
 moz/makefile.mk  |1 -
 moz/patches/seamonkey-1.1.14.source-typeof.patch |   18 --
 solenv/gbuild/platform/WNT_INTEL_GCC.mk  |2 +-
 solenv/gbuild/platform/unxgcc.mk |2 +-
 5 files changed, 5 insertions(+), 24 deletions(-)

New commits:
commit 5fd1a34816b81fee6f54ad93d0047daaeaea51c1
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Feb 24 13:25:32 2012 +0100

Revert Work around g++ -std=c++0x rejecting typeof keyword

We now default to -std=gnu++0x, so this shouldn't be necessary.

This reverts commit 437fe5a11f68d1848c49121394f16f09611b.

diff --git a/moz/makefile.mk b/moz/makefile.mk
index 4146f41..7f926e5 100644
--- a/moz/makefile.mk
+++ b/moz/makefile.mk
@@ -88,7 +88,6 @@ PATCH_FILES = \
 patches/nss-linux3.patch \
 
patches/clang_add_nsCaseInsensitiveStringComparator_default_constructor.patch \
 patches/clang_missing_this_pointers.patch \
-patches/seamonkey-1.1.14.source-typeof.patch
 
 # This file is needed for the W32 build when BUILD_MOZAB is set
 # (currently only vc8/vs2005 is supported when BUILD_MOZAB is set)
diff --git a/moz/patches/seamonkey-1.1.14.source-typeof.patch 
b/moz/patches/seamonkey-1.1.14.source-typeof.patch
deleted file mode 100644
index 632e155..000
--- a/moz/patches/seamonkey-1.1.14.source-typeof.patch
+++ /dev/null
@@ -1,18 +0,0 @@
 misc/mozilla/xpcom/base/nscore.h   2006-08-24 23:46:32.0 +0200
-+++ misc/build/mozilla/xpcom/base/nscore.h 2012-02-21 09:22:51.136057997 
+0100
-@@ -211,9 +211,14 @@
-  *  when http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11893 is fixed.
-  */
- 
-+// At least g++ (GCC) 4.6.2 20111027 (Red Hat 4.6.2-1) with -std=c++0x no
-+// longer recognizes typeof as a (GCC extension) keyword (an alternative fix
-+// might be to check the GCC version, as the bug mentioned above is reportedly
-+// fixed in GCC 4.4.3, see
-+// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9381#c15):
- #ifdef __GNUC__
- #define NS_STDCALL_FUNCPROTO(ret, name, class, func, args) \
--  typeof(class::func) name
-+  __typeof__(class::func) name
- #else
- #define NS_STDCALL_FUNCPROTO(ret, name, class, func, args) \
-   ret (NS_STDCALL class::*name) args
commit 1cf7ab61a71d4b7295942ff5c855896e60c15081
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Feb 24 13:24:01 2012 +0100

use -std=gnu++0x rather than -std=c++0x

The gcc default for C++ is -std=gnu++98, and -std=c++98 is used
explicitly or with -ansi, so the C++0x default should be gnu++0x.

diff --git a/configure.in b/configure.in
index cefc6e8..9c24409 100644
--- a/configure.in
+++ b/configure.in
@@ -4333,9 +4333,9 @@ if test $GCC = yes; then
 AC_MSG_RESULT([no])
 fi
 
-AC_MSG_CHECKING([whether $CC supports -std=c++0x without Language Defect 
757])
+AC_MSG_CHECKING([whether $CC supports -std=gnu++0x without Language Defect 
757])
 save_CXXFLAGS=$CXXFLAGS
-CXXFLAGS=$CXXFLAGS -std=c++0x
+CXXFLAGS=$CXXFLAGS -std=gnu++0x
 AC_LANG_PUSH([C++])
 
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@@ -6702,7 +6702,7 @@ if test $with_system_mdds = yes; then
 dnl ===
 AC_MSG_CHECKING([which hash container mdds shall use])
 if test x$HAVE_CXX0X = xTRUE; then
-MDDS_CPPFLAGS=-std=c++0x
+MDDS_CPPFLAGS=-std=gnu++0x
 AC_MSG_RESULT([std::unordered_map])
 else
 MDDS_CPPFLAGS=-DMDDS_HASH_CONTAINER_BOOST
diff --git a/solenv/gbuild/platform/WNT_INTEL_GCC.mk 
b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
index 43d0d28..bf6155b 100644
--- a/solenv/gbuild/platform/WNT_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
@@ -75,7 +75,7 @@ endif
 
 ifeq ($(HAVE_CXX0X),TRUE)
 # We can turn on additional useful checks with c++0x
-# FIXME still does not compile fully gb_CXXFLAGS += -std=c++0x
+# FIXME still does not compile fully gb_CXXFLAGS += -std=gnu++0x
 endif
 
 gb_LinkTarget_EXCEPTIONFLAGS += \
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 51693c9..67871be 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -103,7 +103,7 @@ endif
 ifeq ($(HAVE_CXX0X),TRUE)
 #Currently, as well as for its own merits, c++11/c++0x mode allows use to use
 #a template for SAL_N_ELEMENTS to detect at compiler time its misuse
-gb_CXXFLAGS += -std=c++0x
+gb_CXXFLAGS += -std=gnu++0x
 
 #We have so many std::auto_ptr uses that we need to be able to disable
 #warnings for those so that -Werror continues to be useful, seeing as moving
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: solenv/inc

2012-02-24 Thread Lubos Lunak
 solenv/inc/unxgcc.mk  |2 +-
 solenv/inc/wntgcci.mk |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 752de2112756b49854942c532b083dbe9ea63a2f
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Feb 24 16:47:21 2012 +0100

missed instances of -std=c++0x when switching to gnu++0x

diff --git a/solenv/inc/unxgcc.mk b/solenv/inc/unxgcc.mk
index a3231a6..14983dd 100644
--- a/solenv/inc/unxgcc.mk
+++ b/solenv/inc/unxgcc.mk
@@ -88,7 +88,7 @@ CFLAGSCXX= -pipe $(ARCH_FLAGS)
 CFLAGSCXX+=-fvisibility-inlines-hidden
 .ENDIF # $(HAVE_GCC_VISIBILITY_FEATURE) == TRUE
 .IF $(HAVE_CXX0X) == TRUE
-CFLAGSCXX+=-std=c++0x
+CFLAGSCXX+=-std=gnu++0x
 .IF $(GCCNUMVER) = 00040005
 CFLAGSCXX+=-Wno-deprecated-declarations
 .ENDIF
diff --git a/solenv/inc/wntgcci.mk b/solenv/inc/wntgcci.mk
index 6795d0f..bdf46b4 100644
--- a/solenv/inc/wntgcci.mk
+++ b/solenv/inc/wntgcci.mk
@@ -48,7 +48,7 @@ CFLAGSCC=-pipe $(ARCH_FLAGS)
 CFLAGSCXX=-pipe $(ARCH_FLAGS)
 
 .IF $(HAVE_CXX0X) == TRUE
-# FIXME still does not compile fully CFLAGSCXX+=-std=c++0x
+# FIXME still does not compile fully CFLAGSCXX+=-std=gnu++0x
 .ENDIF
 
 CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - fpicker/Executable_kdefilepicker.mk fpicker/Library_fps_kde4.mk fpicker/Library_fps_kde.mk vcl/Library_vclplug_kde4.mk vcl/Library_vclplug_kde.mk vcl/unx

2012-02-27 Thread Lubos Lunak
 fpicker/Executable_kdefilepicker.mk |5 +++
 fpicker/Library_fps_kde.mk  |7 
 fpicker/Library_fps_kde4.mk |5 +++
 vcl/Library_vclplug_kde.mk  |7 
 vcl/Library_vclplug_kde4.mk |6 +++
 vcl/unx/kde4/KDEXLib.hxx|2 -
 vcl/unx/kde4/warning_guard_qhash.h  |   58 
 7 files changed, 31 insertions(+), 59 deletions(-)

New commits:
commit a667f08798297b9fa5f78a327250f24cb8b1638c
Author: Luboš Luňák l.lu...@suse.cz
Date:   Mon Feb 27 14:10:59 2012 +0100

disable warnigns as errors for KDE3 code

Too old codebase, there simply have to be warnings.

diff --git a/fpicker/Library_fps_kde.mk b/fpicker/Library_fps_kde.mk
index f442f86..d833763 100644
--- a/fpicker/Library_fps_kde.mk
+++ b/fpicker/Library_fps_kde.mk
@@ -53,4 +53,6 @@ $(eval $(call gb_Library_add_cxxflags,fps_kde,\
-Wno-shadow \
 ))
 
+$(eval $(call gb_LIbrary_set_warnings_not_errors,fps_kde))
+
 # vim: set noet sw=4 ts=4:
diff --git a/vcl/Library_vclplug_kde.mk b/vcl/Library_vclplug_kde.mk
index 139479f..3f9e66a 100644
--- a/vcl/Library_vclplug_kde.mk
+++ b/vcl/Library_vclplug_kde.mk
@@ -90,6 +90,7 @@ $(eval $(call gb_Library_add_cxxflags,vclplug_kde,\
 -Wno-shadow \
 ))
 
+$(eval $(call gb_Library_set_warnings_not_errors,vclplug_kde))
 
 ifeq ($(OS),LINUX)
 $(eval $(call gb_Library_add_linked_libs,vclplug_kde,\
commit 9974eed353263cf10b966000f99f8e69233382a9
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Feb 24 17:27:21 2012 +0100

disable -Wshadow for KDE backends

KDE/Qt consider -Wshadow not worth the trouble, and the qhash
workaround shows why.

diff --git a/fpicker/Executable_kdefilepicker.mk 
b/fpicker/Executable_kdefilepicker.mk
index 9f8cca2..a5c95fb 100644
--- a/fpicker/Executable_kdefilepicker.mk
+++ b/fpicker/Executable_kdefilepicker.mk
@@ -58,4 +58,9 @@ $(eval $(call 
gb_Executable_add_generated_cxxobjects,kdefilepicker,\
 
 $(eval $(call gb_Executable_set_warnings_not_errors,kdefilepicker))
 
+# KDE/Qt consider -Wshadow more trouble than benefit
+$(eval $(call gb_Executable_add_cxxflags,kdefilepicker,\
+   -Wno-shadow \
+))
+
 # vim: set noet sw=4 ts=4:
diff --git a/fpicker/Library_fps_kde.mk b/fpicker/Library_fps_kde.mk
index 5624fd6..f442f86 100644
--- a/fpicker/Library_fps_kde.mk
+++ b/fpicker/Library_fps_kde.mk
@@ -48,4 +48,9 @@ $(eval $(call gb_Library_add_exception_objects,fps_kde,\
fpicker/source/unx/kde_unx/UnxNotifyThread \
 ))
 
+# KDE/Qt consider -Wshadow more trouble than benefit
+$(eval $(call gb_Library_add_cxxflags,fps_kde,\
+   -Wno-shadow \
+))
+
 # vim: set noet sw=4 ts=4:
diff --git a/fpicker/Library_fps_kde4.mk b/fpicker/Library_fps_kde4.mk
index 10a06c7..d806737 100644
--- a/fpicker/Library_fps_kde4.mk
+++ b/fpicker/Library_fps_kde4.mk
@@ -65,4 +65,9 @@ $(eval $(call gb_Library_add_generated_cxxobjects,fps_kde4,\
CustomTarget/fpicker/source/unx/kde4/KDE4FilePicker.moc \
 ))
 
+# KDE/Qt consider -Wshadow more trouble than benefit
+$(eval $(call gb_Library_add_cxxflags,fps_kde4,\
+-Wno-shadow \
+))
+
 # vim: set noet sw=4 ts=4:
diff --git a/vcl/Library_vclplug_kde.mk b/vcl/Library_vclplug_kde.mk
index d1c6f6d..139479f 100644
--- a/vcl/Library_vclplug_kde.mk
+++ b/vcl/Library_vclplug_kde.mk
@@ -85,6 +85,12 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_kde,\
 vcl/unx/kde/salnativewidgets-kde \
 ))
 
+# KDE/Qt consider -Wshadow more trouble than benefit
+$(eval $(call gb_Library_add_cxxflags,vclplug_kde,\
+-Wno-shadow \
+))
+
+
 ifeq ($(OS),LINUX)
 $(eval $(call gb_Library_add_linked_libs,vclplug_kde,\
 dl \
diff --git a/vcl/Library_vclplug_kde4.mk b/vcl/Library_vclplug_kde4.mk
index 34d2892..e26e054 100644
--- a/vcl/Library_vclplug_kde4.mk
+++ b/vcl/Library_vclplug_kde4.mk
@@ -94,6 +94,12 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_kde4,\
 vcl/unx/kde4/VCLKDEApplication \
 ))
 
+# KDE/Qt consider -Wshadow more trouble than benefit
+$(eval $(call gb_Library_add_cxxflags,fps_kde4,\
+-Wno-shadow \
+))
+
+
 ifeq ($(OS),LINUX)
 $(eval $(call gb_Library_add_linked_libs,vclplug_kde4,\
 dl \
diff --git a/vcl/unx/kde4/KDEXLib.hxx b/vcl/unx/kde4/KDEXLib.hxx
index 9297be5..497a97f 100644
--- a/vcl/unx/kde4/KDEXLib.hxx
+++ b/vcl/unx/kde4/KDEXLib.hxx
@@ -32,7 +32,7 @@
 
 #include fixx11h.h
 
-#include warning_guard_qhash.h
+#include qhash.h
 #include qsocketnotifier.h
 #include qtimer.h
 
diff --git a/vcl/unx/kde4/warning_guard_qhash.h 
b/vcl/unx/kde4/warning_guard_qhash.h
deleted file mode 100644
index a6a520c..000
--- a/vcl/unx/kde4/warning_guard_qhash.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * 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 

[Libreoffice-commits] .: sal/qa

2012-03-07 Thread Lubos Lunak
 sal/qa/rtl/strings/test_oustring_stringliterals.cxx |   40 ++--
 1 file changed, 20 insertions(+), 20 deletions(-)

New commits:
commit 5420d7092f9a96fee694b1b1ce6d52c671912e9c
Author: Luboš Luňák l.lu...@suse.cz
Date:   Wed Mar 7 14:57:30 2012 +0100

use the new license header, this file has been written by me

diff --git a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx 
b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
index 142f53d..ce2d22a 100644
--- a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
+++ b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
@@ -1,30 +1,30 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
  *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 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/
  *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * 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.
  *
- * OpenOffice.org - a multi-platform office productivity suite
+ * Major Contributor(s):
+ * Copyright (C) 2012 Lubos Lunak l.lu...@suse.cz (initial developer)
  *
- * This file is part of OpenOffice.org.
+ * All Rights Reserved.
  *
- * 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.
+ * For minor contributions see the git repository.
  *
- * 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.
- *
- /
+ * 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.
+ */
 
 // activate the extra needed ctor
 #define RTL_STRING_UNITTEST
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: fpicker/source vcl/inc

2012-03-09 Thread Lubos Lunak
 fpicker/source/unx/kde4/KDE4FilePicker.cxx |   15 ---
 vcl/inc/vcl/settings.hxx   |   26 +-
 2 files changed, 13 insertions(+), 28 deletions(-)

New commits:
commit 77ee92a6bd8f40022ab03325d158de4b67a41dd0
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Mar 9 15:50:17 2012 +0100

change vcl's SETTINGS_* #define's to const int

They pollute not only the global namespace, but all namespaces,
given they're are #define's. I bet they'd eventually all conflict
with the namespaced enum in kdelibs headers.

diff --git a/fpicker/source/unx/kde4/KDE4FilePicker.cxx 
b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
index 8e8b3e8..d8df515 100644
--- a/fpicker/source/unx/kde4/KDE4FilePicker.cxx
+++ b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
@@ -55,14 +55,6 @@
 /* * Hack, but needed because of conflicting types... */
 #define Region QtXRegion
 
-//kde has an enum that uses this...OO does too
-#define LO_SETTINGS_MOUSE SETTINGS_MOUSE
-#undef SETTINGS_MOUSE
-#define LO_SETTINGS_LOCALE SETTINGS_LOCALE
-#undef SETTINGS_LOCALE
-#define LO_SETTINGS_STYLE SETTINGS_STYLE
-#undef SETTINGS_STYLE
-
 #include kfiledialog.h
 #include kwindowsystem.h
 #include kapplication.h
@@ -75,13 +67,6 @@
 
 #undef Region
 
-#define SETTINGS_MOUSE LO_SETTINGS_MOUSE
-#undef LO_SETTINGS_MOUSE
-#define SETTINGS_LOCALE LO_SETTINGS_LOCALE
-#undef LO_SETTINGS_LOCALE
-#define SETTINGS_STYLE LO_SETTINGS_STYLE
-#undef LO_SETTINGS_STYLE
-
 using namespace ::com::sun::star;
 
 using namespace ::com::sun::star::ui::dialogs;
diff --git a/vcl/inc/vcl/settings.hxx b/vcl/inc/vcl/settings.hxx
index 2f333ca..f69f91f 100644
--- a/vcl/inc/vcl/settings.hxx
+++ b/vcl/inc/vcl/settings.hxx
@@ -990,19 +990,19 @@ private:
 // - AllSettings -
 // ---
 
-#define SETTINGS_MOUSE  ((sal_uLong)0x0001)
-#define SETTINGS_STYLE  ((sal_uLong)0x0002)
-#define SETTINGS_MISC   ((sal_uLong)0x0004)
-#define SETTINGS_SOUND  ((sal_uLong)0x0008)
-#define SETTINGS_HELP   ((sal_uLong)0x0010)
-#define SETTINGS_LOCALE ((sal_uLong)0x0020)
-#define SETTINGS_UILOCALE   ((sal_uLong)0x0040)
-#define SETTINGS_ALLSETTINGS(SETTINGS_MOUSE |\
- SETTINGS_STYLE | SETTINGS_MISC |\
- SETTINGS_SOUND |\
- SETTINGS_HELP |\
- SETTINGS_LOCALE | SETTINGS_UILOCALE )
-#define SETTINGS_IN_UPDATE_SETTINGS ((sal_uLong)0x0800)   // this flag 
indicates that the data changed event was created
+const int SETTINGS_MOUSE = 0x0001;
+const int SETTINGS_STYLE = 0x0002;
+const int SETTINGS_MISC = 0x0004;
+const int SETTINGS_SOUND = 0x0008;
+const int SETTINGS_HELP = 0x0010;
+const int SETTINGS_LOCALE = 0x0020;
+const int SETTINGS_UILOCALE = 0x0040;
+const int SETTINGS_ALLSETTINGS =   ( SETTINGS_MOUSE |
+ SETTINGS_STYLE | SETTINGS_MISC |
+ SETTINGS_SOUND |
+ SETTINGS_HELP |
+ SETTINGS_LOCALE | SETTINGS_UILOCALE );
+const int SETTINGS_IN_UPDATE_SETTINGS = 0x0800;   // this flag indicates 
that the data changed event was created
   // in 
Windows::UpdateSettings probably because of a global
   // settings changed
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sdext/source

2012-03-10 Thread Lubos Lunak
 sdext/source/pdfimport/test/tests.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit df6097ab4fc7008997caa93fb6674b1e2599e227
Author: Luboš Luňák l.lu...@suse.cz
Date:   Sat Mar 10 22:27:38 2012 +0100

operator must be in template or argument namespace

clang has more strict (and probably more spec compliant) lookup

diff --git a/sdext/source/pdfimport/test/tests.cxx 
b/sdext/source/pdfimport/test/tests.cxx
index a98600c..d3fa3e7 100644
--- a/sdext/source/pdfimport/test/tests.cxx
+++ b/sdext/source/pdfimport/test/tests.cxx
@@ -87,15 +87,18 @@ using namespace ::pdfparse;
 using namespace ::pdfi;
 using namespace ::com::sun::star;
 
-namespace
+namespace rtl
 {
-
 template typename charT, typename traits  std::basic_ostreamcharT, 
traits 
 operator (
 std::basic_ostreamcharT, traits  stream, rtl::OString const 
 string)
 {
 return stream  string.getStr();
 }
+}
+
+namespace
+{
 
 class TestSink : public ContentSink
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sal/qa

2012-03-12 Thread Lubos Lunak
 sal/qa/rtl/strings/test_ostring_stringliterals.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 9fabd6c078b1aeaa565887ee83fb57daf5c123e0
Author: Luboš Luňák l.lu...@suse.cz
Date:   Mon Mar 12 16:11:20 2012 +0100

handle msvc not even compiling a test that should fail

but that is fine, because outside the unittest it should fail
everywhere

diff --git a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx 
b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
index 46da8c8..22f79ab 100644
--- a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
+++ b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
@@ -100,7 +100,12 @@ void test::ostring::StringLiterals::checkCtors()
 
 void test::ostring::StringLiterals::testcall( const char str[] )
 {
+#ifndef _MSC_VER
 CPPUNIT_ASSERT( !CONST_CTOR_USED( str ));
+#else
+// MSVC just errors out on this for some reason, which is fine as well
+(void)str;
+#endif
 }
 
 #undef CONST_CTOR_USED
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: vcl/win

2012-03-13 Thread Lubos Lunak
 vcl/win/source/gdi/salgdi3.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1613a4949fae679365996db2781c1fb26df9279f
Author: Luboš Luňák l.lu...@suse.cz
Date:   Tue Mar 13 11:27:49 2012 +0100

fix compile

diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 3e24d75..674567d 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -551,7 +551,7 @@ namespace
 const com::sun::star::lang::Locale rLocale )
 {
 // get the default font for a specified locale
-const DefaultFontConfiguration rDefaults = 
DefaultFontConfiguration::get();
+const DefaultFontConfiguration rDefaults = 
utl::DefaultFontConfiguration::get();
 const rtl::OUString aDefault = rDefaults.getUserInterfaceFont(rLocale);
 return rDevFontList.ImplFindByTokenNames(aDefault);
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: embedserv/Library_emser.mk

2012-03-13 Thread Lubos Lunak
 embedserv/Library_emser.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit f096e61a5f246976a5b1eb76f76e194702c1c0b5
Author: Luboš Luňák l.lu...@suse.cz
Date:   Tue Mar 13 13:48:15 2012 +0100

add missing endif

diff --git a/embedserv/Library_emser.mk b/embedserv/Library_emser.mk
index a6f564d..5eb2a51 100644
--- a/embedserv/Library_emser.mk
+++ b/embedserv/Library_emser.mk
@@ -63,6 +63,7 @@ else
 $(eval $(call gb_Library_add_libs,emser,\
$(ATL_LIB)/atlsd.lib \
 ))
+endif
 
 $(eval $(call gb_Library_add_exception_objects,emser,\
embedserv/source/embed/docholder \
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - config_host.mk.in configure.in sal/inc sal/qa sal/rtl solenv/gbuild solenv/inc

2012-03-13 Thread Lubos Lunak
 config_host.mk.in  |1 
 configure.in   |   35 +
 sal/inc/rtl/string.hxx |   18 +-
 sal/qa/OStringBuffer/rtl_OStringBuffer.cxx |8 ++--
 sal/qa/rtl/strings/test_ostring_stringliterals.cxx |   12 ++-
 sal/qa/rtl_strings/rtl_OString.cxx |6 +--
 sal/qa/rtl_strings/rtl_OUString.cxx|   10 +++---
 sal/qa/rtl_strings/rtl_OUStringBuffer.cxx  |   24 +++---
 sal/rtl/source/strtmpl.cxx |1 
 solenv/gbuild/platform/macosx.mk   |5 +++
 solenv/gbuild/platform/unxgcc.mk   |6 +++
 solenv/inc/unxgcc.mk   |4 ++
 solenv/inc/unxmacx.mk  |3 +
 solenv/inc/unxsogi.mk  |4 ++
 solenv/inc/unxsogs.mk  |4 ++
 15 files changed, 112 insertions(+), 29 deletions(-)

New commits:
commit 01baa9e0c8df6a2c9e1a7d675ac6a2d7da7828cc
Author: Luboš Luňák l.lu...@suse.cz
Date:   Tue Mar 13 16:16:20 2012 +0100

checked that we do not use OString ctor with literals with \0's

Except in some unittests, which are sometimes rather silly and
broken about it, which might explain why they're disabled.

diff --git a/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx 
b/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx
index e05c293..46b7814 100644
--- a/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx
+++ b/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx
@@ -190,7 +190,7 @@ namespace rtl_OStringBuffer
 arrOUS[2] = new OString( kTestStr25 );
 arrOUS[3] = new OString( kTestStr27 );
 arrOUS[4] = new OString( kTestStr29 );
-arrOUS[5] = new OString( \0 );
+arrOUS[5] = new OString( \0, 1 );
 
 }
 
@@ -395,7 +395,7 @@ namespace rtl_OStringBuffer
 arrOUS[1] = new OString( 1 );
 arrOUS[2] = new OString( );
 arrOUS[3] = new OString(  );
-arrOUS[4] = new OString( \0 );
+arrOUS[4] = new OString( \0, 1 );
 arrOUS[5] = new OString( kTestStr2 );
 
 }
@@ -528,7 +528,7 @@ namespace rtl_OStringBuffer
 arrOUS[1] = new OString( 1 );
 arrOUS[2] = new OString( );
 arrOUS[3] = new OString(  );
-arrOUS[4] = new OString( \0 );
+arrOUS[4] = new OString( \0, 1 );
 arrOUS[5] = new OString( kTestStr2 );
 
 }
@@ -992,7 +992,7 @@ namespace rtl_OStringBuffer
 arrOUS[1] = new OString( 1 );
 arrOUS[2] = new OString( );
 arrOUS[3] = new OString(  );
-arrOUS[4] = new OString( \0 );
+arrOUS[4] = new OString( \0, 1 );
 arrOUS[5] = new OString( kTestStr2 );
 
 }
diff --git a/sal/qa/rtl_strings/rtl_OString.cxx 
b/sal/qa/rtl_strings/rtl_OString.cxx
index 935d420..5be8f31 100644
--- a/sal/qa/rtl_strings/rtl_OString.cxx
+++ b/sal/qa/rtl_strings/rtl_OString.cxx
@@ -356,11 +356,11 @@ TestCase arrTestCase[]={
 new OString(kTestStr2)},
 {non empty and empty(def. constructor), sal_False,
 new OString(kTestStr1),new OString()},
-{two empty strings(string arg = '\\0'), sal_True,
+{two empty strings(string arg = \\), sal_True,
 new OString(),new OString()},
-{empty(string arg = '\\0') and non empty, sal_False,
+{empty(string arg = \\) and non empty, sal_False,
 new OString(),new OString(kTestStr2)},
-{non empty and empty(string arg = '\\0'), sal_False,
+{non empty and empty(string arg = \\), sal_False,
 new OString(kTestStr1),new OString()}
 };
 
diff --git a/sal/qa/rtl_strings/rtl_OUString.cxx 
b/sal/qa/rtl_strings/rtl_OUString.cxx
index 8b6552c..dc1812e 100644
--- a/sal/qa/rtl_strings/rtl_OUString.cxx
+++ b/sal/qa/rtl_strings/rtl_OUString.cxx
@@ -235,9 +235,9 @@ extern C void /* sal_Bool */ SAL_CALL 
test_rtl_OUString_getLength(
0,
kEncodingRTLTextUSASCII,
kConvertFlagsOStringToOUString)},
-{length of empty string (string arg = '\\0'), 0,
+{length of empty string (string arg = \\\0\'), 1,
  new OUString( \0,
-   0,
+   1,
kEncodingRTLTextUSASCII,
kConvertFlagsOStringToOUString)}
 };
@@ -302,7 +302,7 @@ extern C void /* sal_Bool */ SAL_CALL 
test_rtl_OUString_equals(
  new OUString(aUStr1),
  new OUString()
 },
-{two empty strings(string arg = '\\0'), sal_True,
+{two empty strings(string arg = \\), sal_True,
  new OUString( ,
0,
kEncodingRTLTextUSASCII,
@@ -312,14 +312,14 @@ extern C void /* sal_Bool */ SAL_CALL 
test_rtl_OUString_equals(

[Libreoffice-commits] .: starmath/source

2012-03-13 Thread Lubos Lunak
 starmath/source/ooxmlimport.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 9e6b086c62b4144058eb52ca40b562ff61e26a68
Author: Luboš Luňák l.lu...@suse.cz
Date:   Tue Mar 13 17:01:10 2012 +0100

string literals in ?: don't get automatically converted to OUString

Technically these two are both const char[8], so gcc/clang keep
the resulting type the same, but msvc always converts to const char*,
even if the same sizes mean this is not required.

diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx
index 63b52fd..78a75ab 100644
--- a/starmath/source/ooxmlimport.cxx
+++ b/starmath/source/ooxmlimport.cxx
@@ -438,7 +438,9 @@ OUString SmOoxmlImport::handleLimLowUpp( LimLowUpp_t 
limlowupp )
 return e.copy( 0, e.getLength() - 2 ) + lim + };
 if( limlowupp == LimLow  e.endsWith(  underbrace { } ))
 return e.copy( 0, e.getLength() - 2 ) + lim + };
-return e + ( limlowupp == LimLow ?  csub { :  csup { ) + lim + };
+return e
++ ( limlowupp == LimLow ? OUString(  csub { ) : OUString(  csup { 
))
++ lim + };
 }
 
 OUString SmOoxmlImport::handleGroupChr()
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: solenv/gbuild solenv/inc

2012-03-15 Thread Lubos Lunak
 solenv/gbuild/platform/WNT_INTEL_MSC.mk |1 +
 solenv/inc/wntmsc.mk|4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 370b3b6232a0851d68bb894c2b8ee71b9504384b
Author: Lubos Lunak ke...@suse.cz
Date:   Thu Mar 15 11:45:08 2012 +0100

disable msvc warning 4265 (non-virtual dtor)

msvc2008 now prints out a lot of warnings, probably a result
of the recent -Wnon-virtual-dtor changes where msvc does not
understand the protected dtor actually makes the code to be ok

diff --git a/solenv/gbuild/platform/WNT_INTEL_MSC.mk 
b/solenv/gbuild/platform/WNT_INTEL_MSC.mk
index 6902642..ab7728e 100644
--- a/solenv/gbuild/platform/WNT_INTEL_MSC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_MSC.mk
@@ -147,6 +147,7 @@ gb_CXXFLAGS := \
-wd4245 \
-wd4250 \
-wd4251 \
+   -wd4265 \
-wd4275 \
-wd4290 \
-wd4294 \
diff --git a/solenv/inc/wntmsc.mk b/solenv/inc/wntmsc.mk
index f7b2dbe..afafe38 100644
--- a/solenv/inc/wntmsc.mk
+++ b/solenv/inc/wntmsc.mk
@@ -173,6 +173,8 @@ CFLAGSOUTOBJ=-Fo
 #   (http://msdn2.microsoft.com/en-us/library/074af4b6.aspx)
 # - warning C4180: qualifier applied to function type has no meaning; ignored
 #   (frequently seen with a recent boost)
+# - warning C4265: 'identifier' : class has virtual functions, but destructor 
is not
+#   virtual
 # For C, certain warnings from system headers (stdlib.h etc.) have to be
 # disabled globally (for C++, this is not necessary, as the system headers are
 # wrapped by STLport):
@@ -184,7 +186,7 @@ CFLAGSWARNCXX=-Wall -wd4061 -wd4127 -wd4191 -wd4217 -wd4242 
-wd4244 -wd4245 -wd4
 -wd4290 -wd4294 -wd4355 -wd4511 -wd4512 -wd4514 -wd4555 -wd4611 -wd4625 
-wd4626 \
 -wd4640 -wd4675 -wd4686 -wd4706 -wd4710 -wd4711 -wd4786 -wd4800 -wd4820 
-wd4503 -wd4619 \
 -wd4365 -wd4668 -wd4738 -wd4826 -wd4350 -wd4505 -wd4692 -wd4189 -wd4005 \
--wd4180
+-wd4180 -wd4265
 CFLAGSWARNCC=$(CFLAGSWARNCXX) -wd4255
 CFLAGSWALLCC=$(CFLAGSWARNCC)
 CFLAGSWALLCXX=$(CFLAGSWARNCXX)
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: solenv/gbuild solenv/inc

2012-03-15 Thread Lubos Lunak
 solenv/gbuild/platform/unxgcc.mk |4 
 solenv/inc/unxgcc.mk |4 
 2 files changed, 8 insertions(+)

New commits:
commit cc9a10185749210825fe6970ea4b103eb78e329e
Author: Luboš Luňák l.lu...@suse.cz
Date:   Thu Mar 15 10:30:39 2012 +0100

clang doesn't have a problem with -Wnon-virtual-dtor

Even if some older version possibly does, I doubt anybody would
realistically use it.

diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 1565d1c..9c2b405 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -65,6 +65,7 @@ gb_CXXFLAGS := \
-Wsign-promo \
-Woverloaded-virtual \
 
+ifneq ($(COM_GCC_IS_CLANG),TRUE)
 # Only GCC 4.6 has a fix for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7302
 # -Wnon-virtual-dtor should't complain of protected dtor and supports #pragma
 # GCC diagnostic push/pop required e.g. in cppuhelper/propertysetmixin.hxx to
@@ -75,6 +76,9 @@ gb_CXXFLAGS += -Wno-non-virtual-dtor
 else
 gb_CXXFLAGS += -Wnon-virtual-dtor
 endif
+else
+gb_CXXFLAGS += -Wnon-virtual-dtor
+endif
 
 ifeq ($(HAVE_GCC_VISIBILITY_FEATURE),TRUE)
 gb_COMPILERDEFS += \
diff --git a/solenv/inc/unxgcc.mk b/solenv/inc/unxgcc.mk
index 5ef9f98..4f9ebee 100644
--- a/solenv/inc/unxgcc.mk
+++ b/solenv/inc/unxgcc.mk
@@ -148,6 +148,7 @@ CFLAGSWALLCC=$(CFLAGSWARNCC)
 CFLAGSWALLCXX=$(CFLAGSWARNCXX)
 CFLAGSWERRCC=-Werror -DLIBO_WERROR
 
+.IF $(COM_GCC_IS_CLANG) != TRUE
 # Only GCC 4.6 has a fix for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7302
 # -Wnon-virtual-dtor should't complain of protected dtor and supports #pragma
 # GCC diagnostic push/pop required e.g. in cppuhelper/propertysetmixin.hxx to
@@ -158,6 +159,9 @@ CFLAGSWARNCXX += -Wno-non-virtual-dtor
 .ELSE
 CFLAGSWARNCXX += -Wnon-virtual-dtor
 .END
+.ELSE
+CFLAGSWARNCXX += -Wnon-virtual-dtor
+.END
 
 COMPILER_WARN_ERRORS=TRUE
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: configure.in

2012-03-15 Thread Lubos Lunak
 configure.in |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c5489e31b625e08fa2427108d5e710aba4468a27
Author: Luboš Luňák l.lu...@suse.cz
Date:   Wed Mar 14 14:34:22 2012 +0100

need to be afraid of empty quoted strings as test arguments

At least 07a841bc1acde95229ece2a0da4e2a70be5df624 says so.

diff --git a/configure.in b/configure.in
index e0bc4dd..f71014d 100644
--- a/configure.in
+++ b/configure.in
@@ -79,7 +79,7 @@ AC_SUBST(x_Cygwin)
 
 cat /dev/null  warn
 
-if test $EUID = 0 -a `uname -o 2/dev/null` = Cygwin; then
+if test z$EUID = z0 -a `uname -o 2/dev/null` = Cygwin; then
 AC_MSG_ERROR([You must build LibreOffice as a normal user - not using an 
administrative account])
 fi
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - configure.in sw/Module_sw.mk

2012-03-15 Thread Lubos Lunak
 configure.in|6 --
 sw/Module_sw.mk |4 ++--
 2 files changed, 6 insertions(+), 4 deletions(-)

New commits:
commit b1c472c7021ebb85afdc5c4afd0e0fcd74ab15d9
Author: Luboš Luňák l.lu...@suse.cz
Date:   Thu Mar 15 16:04:12 2012 +0100

do not leave temporary files after a configure check

diff --git a/configure.in b/configure.in
index f71014d..72b45b9 100644
--- a/configure.in
+++ b/configure.in
@@ -4495,13 +4495,15 @@ struct S2: S1int { virtual ~S2(); };
 struct S3: S2 { virtual ~S3(); }; S3::~S3() {}
 _ACEOF
 gccvisinlineshiddenok=yes
-if ! $CXX $CXXFLAGS $CPPFLAGS -shared -fPIC 
-fvisibility-inlines-hidden conftestlib1.cc -o lib1.so /dev/null 2/dev/null; 
then
+if ! $CXX $CXXFLAGS $CPPFLAGS -shared -fPIC 
-fvisibility-inlines-hidden conftestlib1.cc -o libconftest1.so /dev/null 
2/dev/null; then
 gccvisinlineshiddenok=no
 else
-if ! $CXX $CXXFLAGS $CPPFLAGS -shared -fPIC 
-fvisibility-inlines-hidden conftestlib2.cc -L. -l1 -Wl,-z,defs -o lib2.so 
/dev/null 2/dev/null; then
+if ! $CXX $CXXFLAGS $CPPFLAGS -shared -fPIC 
-fvisibility-inlines-hidden conftestlib2.cc -L. -lconftest1 -Wl,-z,defs -o 
libconftest2.so /dev/null 2/dev/null; then
 gccvisinlineshiddenok=no
 fi
 fi
+
+rm -f libconftest1.so libconftest2.so
 
 AC_MSG_RESULT([$gccvisinlineshiddenok])
 if test $gccvisinlineshiddenok = no; then
commit 2db82ffc1bdd5865e51932930bb5c4688e2de8a3
Author: Luboš Luňák l.lu...@suse.cz
Date:   Thu Mar 15 16:00:02 2012 +0100

these writer unittests surely are slow

diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index 6ecc588..8cf4f39 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -48,12 +48,12 @@ $(eval $(call gb_Module_add_targets,sw,\
 endif
 
 $(eval $(call gb_Module_add_check_targets,sw,\
-CppunitTest_sw_filters_test \
-CppunitTest_sw_macros_test \
 CppunitTest_sw_swdoc_test \
 ))
 
 $(eval $(call gb_Module_add_slowcheck_targets,sw,\
+CppunitTest_sw_filters_test \
+CppunitTest_sw_macros_test \
 CppunitTest_sw_subsequent_rtftok \
 ))
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: nss/makefile.mk nss/nss-string-concat.patch

2012-03-15 Thread Lubos Lunak
 nss/makefile.mk |2 +-
 nss/nss-string-concat.patch |   11 +++
 2 files changed, 12 insertions(+), 1 deletion(-)

New commits:
commit dbf3b4ab772a398ba397ea763deb6003adaf0586
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Mar 16 02:00:23 2012 +0100

foobar - foo bar

diff --git a/nss/makefile.mk b/nss/makefile.mk
index c75684a..4323887 100644
--- a/nss/makefile.mk
+++ b/nss/makefile.mk
@@ -48,7 +48,7 @@ VER_PATCH=8
 TARFILE_NAME=nss-$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH)-with-nspr-4.8.6
 TARFILE_MD5=71474203939fafbe271e1263e61d083e
 TARFILE_ROOTDIR=nss-$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH)
-PATCH_FILES=nss.patch nss.aix.patch nss-config.patch nss-linux3.patch 
nss-clang_os_Linux_x86_s_comments.patch
+PATCH_FILES=nss.patch nss.aix.patch nss-config.patch nss-linux3.patch 
nss-clang_os_Linux_x86_s_comments.patch nss-string-concat.patch
 
 .IF $(OS)==MACOSX
 PATCH_FILES+=nss_macosx.patch
diff --git a/nss/nss-string-concat.patch b/nss/nss-string-concat.patch
new file mode 100644
index 000..68f9c4b
--- /dev/null
+++ b/nss/nss-string-concat.patch
@@ -0,0 +1,11 @@
+--- misc/build/nss-3.12.8/mozilla/security/nss/lib/softoken/secmodt.h.sav  
2008-12-17 22:39:05.0 +0100
 misc/build/nss-3.12.8/mozilla/security/nss/lib/softoken/secmodt.h  
2012-03-16 01:56:47.881621915 +0100
+@@ -338,7 +338,7 @@ typedef PRUint32 PK11AttrFlags;
+ #define SECMOD_SLOT_FLAGS 
slotFlags=[RSA,DSA,DH,RC2,RC4,DES,RANDOM,SHA1,MD5,MD2,SSL,TLS,AES,Camellia,SEED,SHA256,SHA512]
+ 
+ #define SECMOD_MAKE_NSS_FLAGS(fips,slot) \
+-Flags=internal,criticalfips slotparams=(#slot={SECMOD_SLOT_FLAGS})
++Flags=internal,critical fips  slotparams=( #slot ={ SECMOD_SLOT_FLAGS 
})
+ 
+ #define SECMOD_INT_NAME NSS Internal PKCS #11 Module
+ #define SECMOD_INT_FLAGS SECMOD_MAKE_NSS_FLAGS(,1)
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: filter/source

2012-03-15 Thread Lubos Lunak
 filter/source/graphicfilter/icgm/bitmap.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3297ce2aa13efc6029983b716cec20ed7befda56
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Mar 16 03:24:22 2012 +0100

0x8001 can't fit into (signed) long

As far as I can say, this value and all those negative values
are actually not valid in CGM anyway, but since I do not know
the code, I'm leaving them in, they shouldn't break anything.

diff --git a/filter/source/graphicfilter/icgm/bitmap.cxx 
b/filter/source/graphicfilter/icgm/bitmap.cxx
index d614443..bc84135 100644
--- a/filter/source/graphicfilter/icgm/bitmap.cxx
+++ b/filter/source/graphicfilter/icgm/bitmap.cxx
@@ -256,7 +256,7 @@ sal_Bool CGMBitmap::ImplGetDimensions( CGMBitmapDescriptor 
rDesc )
 rDesc.mnScanSize = 0;
 switch( rDesc.mnLocalColorPrecision )
 {
-case 0x8001 :   // monochrome ( bit = 
0-backgroundcolor )
+case long(0x8001) : // monochrome ( bit = 
0-backgroundcolor )
 case 0 ://  bit = 
1-fillcolor
 rDesc.mnDstBitsPerPixel = 1;
 break;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 3 commits - nss/makefile.mk nss/nss-asm-fix.patch nss/nss-clang_os_Linux_x86_64_s_comments.patch openssl/makefile.mk openssl/openssl-asm-fix.patch

2012-03-16 Thread Lubos Lunak
 nss/makefile.mk|4 
 nss/nss-asm-fix.patch  |   56 +
 nss/nss-clang_os_Linux_x86_64_s_comments.patch |  149 +
 openssl/makefile.mk|   13 +-
 openssl/openssl-asm-fix.patch  |   11 +
 5 files changed, 225 insertions(+), 8 deletions(-)

New commits:
commit 8f29699cd1723bd8b8acc25033708f9777576d6d
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Mar 16 13:05:02 2012 +0100

asm fixes in openssl

diff --git a/openssl/makefile.mk b/openssl/makefile.mk
index f29b567..226e86c 100644
--- a/openssl/makefile.mk
+++ b/openssl/makefile.mk
@@ -50,6 +50,7 @@ OPENSSL_NAME=openssl-0.9.8o
 
 TARFILE_NAME=$(OPENSSL_NAME)
 TARFILE_MD5=63ddc5116488985e820075e65fbe6aa4
+PATCH_FILES=openssl-asm-fix.patch
 
 CONFIGURE_DIR=.
 CONFIGURE_ACTION=config
@@ -83,7 +84,7 @@ OUT2INC += include/openssl/*
 UNAME=$(shell uname)
 
 .IF $(OS) == LINUX || $(OS) == FREEBSD || $(OS) == ANDROID
-PATCH_FILES=openssllnx.patch
+PATCH_FILES+=openssllnx.patch
 ADDITIONAL_FILES:= \
 libcrypto_OOo_0_9_8o.map \
 libssl_OOo_0_9_8o.map
@@ -107,7 +108,7 @@ UNAME=$(shell uname)
 .ENDIF
 
 .IF $(OS) == SOLARIS
-PATCH_FILES=opensslsol.patch
+PATCH_FILES+=opensslsol.patch
 ADDITIONAL_FILES:= \
 libcrypto_OOo_0_9_8o.map \
 libssl_OOo_0_9_8o.map
@@ -129,7 +130,7 @@ UNAME=$(shell uname)
 .ENDIF
 
 .IF $(OS) == IOS
-PATCH_FILES=opensslios.patch
+PATCH_FILES+=opensslios.patch
 CONFIGURE_ACTION=Configure ios-armv7
 CONFIGURE_FLAGS=no-shared no-idea
 .ENDIF
@@ -137,7 +138,7 @@ UNAME=$(shell uname)
 .IF $(OS) == WNT
 
 .IF $(COM)==GCC
-PATCH_FILES=opensslmingw.patch
+PATCH_FILES+=opensslmingw.patch
 CONFIGURE_ACTION=$(PERL) Configure
 CONFIGURE_FLAGS=mingw shared 
 INSTALL_ACTION=mv libcrypto.a libcrypto_static.a  mv libcrypto.dll.a 
libcrypto.a  mv libssl.a libssl_static.a  mv libssl.dll.a libssl.a
@@ -149,7 +150,7 @@ OUT2BIN = ssleay32.dll
 OUT2BIN += libeay32.dll
 .ELSE
 
-PATCH_FILES=openssl.patch
+PATCH_FILES+=openssl.patch
 .IF $(MAKETARGETS) == 
 # The env. vars CC and PERL are used by nmake, and nmake insists 
on '\'s
 # If WRAPCMD is set it is prepended before the compiler, don't 
touch that.
diff --git a/openssl/openssl-asm-fix.patch b/openssl/openssl-asm-fix.patch
new file mode 100644
index 000..bb722be
--- /dev/null
+++ b/openssl/openssl-asm-fix.patch
@@ -0,0 +1,11 @@
+--- misc/build/openssl-0.9.8o/crypto/md32_common.h.sav 2010-03-29 
13:23:11.0 +0200
 misc/build/openssl-0.9.8o/crypto/md32_common.h 2012-03-16 
12:39:14.986941958 +0100
+@@ -165,7 +165,7 @@
+   asm (   \
+   roll %1,%0\
+   : =r(ret) \
+-  : I(n), 0(a)\
++  : I(n), 0((unsigned int)(a))\
+   : cc);\
+  ret; \
+   })
commit cb3f52275b51546b579d7856b75dca4ecf791c6a
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Mar 16 13:04:22 2012 +0100

asm fixes in nss

diff --git a/nss/makefile.mk b/nss/makefile.mk
index ea6f5e6..2bfa920 100644
--- a/nss/makefile.mk
+++ b/nss/makefile.mk
@@ -48,7 +48,7 @@ VER_PATCH=8
 TARFILE_NAME=nss-$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH)-with-nspr-4.8.6
 TARFILE_MD5=71474203939fafbe271e1263e61d083e
 TARFILE_ROOTDIR=nss-$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH)
-PATCH_FILES=nss.patch nss.aix.patch nss-config.patch nss-linux3.patch 
nss-clang_os_Linux_x86_s_comments.patch nss-string-concat.patch
+PATCH_FILES=nss.patch nss.aix.patch nss-config.patch nss-linux3.patch 
nss-clang_os_Linux_x86_s_comments.patch 
nss-clang_os_Linux_x86_64_s_comments.patch nss-string-concat.patch 
nss-asm-fix.patch
 
 .IF $(OS)==MACOSX
 PATCH_FILES+=nss_macosx.patch
diff --git a/nss/nss-asm-fix.patch b/nss/nss-asm-fix.patch
new file mode 100644
index 000..b45e179
--- /dev/null
+++ b/nss/nss-asm-fix.patch
@@ -0,0 +1,56 @@
+--- misc/build/nss-3.12.8/mozilla/security/nss/lib/freebl/mpi/mp_comba.c.sav   
2012-03-16 12:30:23.255942001 +0100
 misc/build/nss-3.12.8/mozilla/security/nss/lib/freebl/mpi/mp_comba.c   
2012-03-16 12:29:01.730170001 +0100
+@@ -49,7 +49,7 @@ __asm__  (
+  addq  %%rax,%0 \n\t\
+  adcq  %%rdx,%1 \n\t\
+  adcq  $0,%2\n\t\
+- :=r(c0), =r(c1), =r(c2): 0(c0), 1(c1), 2(c2), g(i), g(j) 
 :%rax,%rdx,%cc);
++ :=r(c0), =r(c1), =r(c2): 0(c0), 1(c1), 2(c2), g(i), g(j) 
 :%rax,%rdx,cc);
+ 
+ 
+ 
+@@ -76,7 +76,7 @@ __asm__ (
+  addq  %%rax,%0 \n\t\
+  adcq  %%rdx,%1 \n\t\
+  adcq  $0,%2\n\t   

[Libreoffice-commits] .: configure.in

2012-03-16 Thread Lubos Lunak
 configure.in |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9fea5d3c26c61f83eca26cc14c435eeda34c68bc
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Mar 16 17:16:40 2012 +0100

fix gcc bug 26905 detection with clang

it uses GOT instead of PLT on i386 with -02

diff --git a/configure.in b/configure.in
index 72b45b9..4fc314a 100644
--- a/configure.in
+++ b/configure.in
@@ -4532,7 +4532,7 @@ _ACEOF
 if test $_os = Darwin; then
 gccvisbroken=no
 else
-if $EGREP -q '@PLT' visibility.s; then
+if $EGREP -q '@PLT|@GOT' visibility.s; then
 gccvisbroken=no
 else
 gccvisbroken=yes
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/Library_sw.mk

2012-03-16 Thread Lubos Lunak
 sw/Library_sw.mk |1 -
 1 file changed, 1 deletion(-)

New commits:
commit cac985081415a4840a9d04332ee778b6ba48e7aa
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Mar 16 18:07:36 2012 +0100

sw doesn't need to link oox

that commit should have been cleaned up before it went upstream

diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index 2b0bce3..4d5cdd6 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -61,7 +61,6 @@ $(eval $(call gb_Library_add_linked_libs,sw,\
 i18nisolang1 \
 i18nutil \
 lng \
-oox \
 sal \
 salhelper \
sax \
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: .gitignore

2012-03-16 Thread Lubos Lunak
 .gitignore |1 +
 1 file changed, 1 insertion(+)

New commits:
commit dc3ea99bd09fa0f38e0b6ff939badaa449fd39b4
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Mar 16 20:11:04 2012 +0100

add autogen.lastrun.bak to .gitignore

diff --git a/.gitignore b/.gitignore
index 441e4bc..c1aef58 100644
--- a/.gitignore
+++ b/.gitignore
@@ -49,6 +49,7 @@
 /aclocal.m4
 /autom4te.cache
 /autogen.lastrun
+/autogen.lastrun.bak
 /ChangeLog
 /config.guess
 /config.log
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 3 commits - dbaccess/source fpicker/Library_fps_kde4.mk fpicker/Module_fpicker.mk fpicker/Package_kde4_moc.mk fpicker/source vcl/unx

2012-03-16 Thread Lubos Lunak
 dbaccess/source/ui/misc/charsets.cxx |2 -
 fpicker/Library_fps_kde4.mk  |8 ---
 fpicker/Module_fpicker.mk|1 
 fpicker/Package_kde4_moc.mk  |   36 ---
 fpicker/source/unx/kde4/Makefile |   35 --
 vcl/unx/kde4/KDESalGraphics.cxx  |2 -
 6 files changed, 2 insertions(+), 82 deletions(-)

New commits:
commit 43a56ce0cbed9187658340d0d4fbfa76c2c83d1b
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Mar 16 20:57:07 2012 +0100

remove extraneous parentheses

diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
index 0be12fb..80c38ec 100644
--- a/vcl/unx/kde4/KDESalGraphics.cxx
+++ b/vcl/unx/kde4/KDESalGraphics.cxx
@@ -306,7 +306,7 @@ sal_Bool KDESalGraphics::drawNativeControl( ControlType 
type, ControlPart part,
 draw( QStyle::CE_PushButton, option, m_image,
   vclStateValue2StateFlag(nControlState, value) );
 }
-else if ( (type == CTRL_MENUBAR))
+else if (type == CTRL_MENUBAR)
 {
 if (part == PART_MENU_ITEM)
 {
commit cd131c6366a2ee70d15fc4d4794ddf62b8db646e
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Mar 16 20:36:14 2012 +0100

kde4 fpicker doesn't use Q_OBJECT, no need for moc

diff --git a/fpicker/Library_fps_kde4.mk b/fpicker/Library_fps_kde4.mk
index d806737..7c3e95f 100644
--- a/fpicker/Library_fps_kde4.mk
+++ b/fpicker/Library_fps_kde4.mk
@@ -27,10 +27,6 @@
 
 $(eval $(call gb_Library_Library,fps_kde4))
 
-$(eval $(call gb_Library_add_package_headers,fps_kde4,\
-   fpicker_kde4_moc \
-))
-
 $(eval $(call 
gb_Library_set_componentfile,fps_kde4,fpicker/source/unx/kde4/fps_kde4))
 
 $(eval $(call gb_Library_add_api,fps_kde4,\
@@ -61,10 +57,6 @@ $(eval $(call gb_Library_add_exception_objects,fps_kde4,\
fpicker/source/unx/kde4/KDE4FPEntry \
 ))
 
-$(eval $(call gb_Library_add_generated_cxxobjects,fps_kde4,\
-   CustomTarget/fpicker/source/unx/kde4/KDE4FilePicker.moc \
-))
-
 # KDE/Qt consider -Wshadow more trouble than benefit
 $(eval $(call gb_Library_add_cxxflags,fps_kde4,\
 -Wno-shadow \
diff --git a/fpicker/Module_fpicker.mk b/fpicker/Module_fpicker.mk
index 0491e54..2faa777 100644
--- a/fpicker/Module_fpicker.mk
+++ b/fpicker/Module_fpicker.mk
@@ -62,7 +62,6 @@ endif
 ifeq ($(ENABLE_KDE4),TRUE)
 $(eval $(call gb_Module_add_targets,fpicker,\
Library_fps_kde4 \
-   Package_kde4_moc \
 ))
 endif
 endif
diff --git a/fpicker/Package_kde4_moc.mk b/fpicker/Package_kde4_moc.mk
deleted file mode 100644
index 27ab13a..000
--- a/fpicker/Package_kde4_moc.mk
+++ /dev/null
@@ -1,36 +0,0 @@
-# -*- 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) 2010 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_Package_Package,fpicker_kde4_moc,$(WORKDIR)/CustomTarget/fpicker/source/unx/kde4))
-
-$(eval $(call 
gb_Package_add_customtarget,fpicker_kde4_moc,fpicker/source/unx/kde4))
-
-$(eval $(call gb_CustomTarget_add_dependencies,fpicker/source/unx/kde4,\
-fpicker/source/unx/kde4/KDE4FilePicker.hxx \
-))
-
-# vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/fpicker/source/unx/kde4/Makefile b/fpicker/source/unx/kde4/Makefile
deleted file mode 100644
index cd0ad6e..000
--- a/fpicker/source/unx/kde4/Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-# -*- 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 

[Libreoffice-commits] .: extensions/source

2012-03-16 Thread Lubos Lunak
 extensions/source/update/check/updatecheck.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d943c6ba374481b1f9a6561b790b0b0410b78b0e
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Mar 16 21:28:42 2012 +0100

logical || - binary |

diff --git a/extensions/source/update/check/updatecheck.cxx 
b/extensions/source/update/check/updatecheck.cxx
index 54f9b4c..88f7234 100644
--- a/extensions/source/update/check/updatecheck.cxx
+++ b/extensions/source/update/check/updatecheck.cxx
@@ -160,7 +160,7 @@ rtl::OUString getImageFromFileName(const rtl::OUString 
aFile)
 oslProcessError rc = osl_executeProcess_WithRedirectedIO(
 aUnpackPath.pData,  // [in] Image 
name
 aSystemPath.pData, 1,  // [in] 
Arguments
-osl_Process_WAIT || osl_Process_NORMAL, // [in] Options
+osl_Process_WAIT | osl_Process_NORMAL,  // [in] Options
 NULL,   // [in] 
Security
 NULL,   // [in] 
Working directory
 NULL, 0,// [in] 
Environment variables
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svx/inc

2012-03-17 Thread Lubos Lunak
 svx/inc/svx/sdrpaintwindow.hxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 9865a0d430da8948210a2cd9d4bae08e6023f4c8
Author: Luboš Luňák l.lu...@suse.cz
Date:   Sat Mar 17 08:39:26 2012 +0100

workaround broken msvc template instantiation

diff --git a/svx/inc/svx/sdrpaintwindow.hxx b/svx/inc/svx/sdrpaintwindow.hxx
index 9ecfbed..c6faaa2 100644
--- a/svx/inc/svx/sdrpaintwindow.hxx
+++ b/svx/inc/svx/sdrpaintwindow.hxx
@@ -45,6 +45,9 @@ namespace sdr
 } // end of namespace overlay
 } // end of namespace sdr
 
+#ifdef _MSC_VER // broken msvc template instantiation
+#include svx/sdr/overlay/overlaymanager.hxx
+#endif
 

 
 class SdrPreRenderDevice
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: configure.in

2012-03-17 Thread Lubos Lunak
 configure.in |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4c231e4b7a07f9d59699301190341c823c59a3be
Author: Luboš Luňák l.lu...@suse.cz
Date:   Sat Mar 17 10:52:43 2012 +0100

fix wrong libpng check result text

diff --git a/configure.in b/configure.in
index e44f014..27b1813 100644
--- a/configure.in
+++ b/configure.in
@@ -10156,7 +10156,7 @@ else
 ;;
 *)
 SYSTEM_LIBPNG=YES
-AC_MSG_RESULT([no])
+AC_MSG_RESULT([yes])
 ;;
 esac
 fi
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: writerfilter/inc

2012-03-17 Thread Lubos Lunak
 writerfilter/inc/resourcemodel/WW8ResourceModel.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d46e382034e918fd0f9c4d75d5fe95abef4bd349
Author: Luboš Luňák l.lu...@suse.cz
Date:   Sat Mar 17 17:09:12 2012 +0100

use SAL_DLLPUBLIC_TEMPLATE for an exported template

diff --git a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx 
b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
index e49b3f5..04f0819 100644
--- a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
+++ b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx
@@ -90,7 +90,7 @@ using namespace ::std;
 */
 
 template class T
-class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Reference
+class SAL_DLLPUBLIC_TEMPLATE Reference
 {
 public:
 /**
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: canvas/StaticLibrary_directxcanvas.mk

2012-03-17 Thread Lubos Lunak
 canvas/StaticLibrary_directxcanvas.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 66ff55f8c6a4a315023b26f60056c3e52e3fc15c
Author: Luboš Luňák l.lu...@suse.cz
Date:   Sat Mar 17 21:51:21 2012 +0100

compile these with exceptions again

a13a88bd2c673d059b60e339dcf3b8fabf991f18 changes them to build
without exceptions by mistake, causing a boost problem

diff --git a/canvas/StaticLibrary_directxcanvas.mk 
b/canvas/StaticLibrary_directxcanvas.mk
index cd74a2c..c4ff2b6 100644
--- a/canvas/StaticLibrary_directxcanvas.mk
+++ b/canvas/StaticLibrary_directxcanvas.mk
@@ -43,7 +43,7 @@ $(eval $(call gb_StaticLibrary_add_defs,directxcanvas,\
-UNOMINMAX \
 ))
 
-$(eval $(call gb_StaticLibrary_add_noexception_objects,directxcanvas,\
+$(eval $(call gb_StaticLibrary_add_exception_objects,directxcanvas,\
canvas/source/directx/dx_bitmap \
canvas/source/directx/dx_bitmapcanvashelper \
canvas/source/directx/dx_canvasbitmap \
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sc/source

2012-03-18 Thread Lubos Lunak
 sc/source/filter/excel/xiescher.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 89d3de59abdd218750d78bbf80a6f07f7a13f31c
Author: Luboš Luňák l.lu...@suse.cz
Date:   Sun Mar 18 08:02:08 2012 +0100

match if-else properly (warnings are actually sometimes useful, huh)

diff --git a/sc/source/filter/excel/xiescher.cxx 
b/sc/source/filter/excel/xiescher.cxx
index f049f25..6c8eb50 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -2634,9 +2634,11 @@ void XclImpListBoxObj::DoProcessControl( ScfPropertySet 
rPropSet ) const
 
 // multi selection: API expects sequence of list entry indexes
 if( bMultiSel )
+{
 for( ScfUInt8Vec::const_iterator aBeg = maSelection.begin(), aIt = 
aBeg, aEnd = maSelection.end(); aIt != aEnd; ++aIt )
 if( *aIt != 0 )
 aSelVec.push_back( static_cast sal_Int16 ( aIt - aBeg ) 
);
+}
 // single selection: mnSelEntry is one-based, API expects zero-based
 else if( mnSelEntry  0 )
 aSelVec.push_back( static_cast sal_Int16 ( mnSelEntry - 1 ) );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: extensions/source

2012-03-19 Thread Lubos Lunak
 extensions/source/scanner/sane.cxx |   15 +++
 1 file changed, 7 insertions(+), 8 deletions(-)

New commits:
commit 52faa80a81a69ef2c1aca72653e688c6616d395f
Author: Luboš Luňák l.lu...@suse.cz
Date:   Mon Mar 19 22:43:30 2012 +0100

remove fiddly casts, add few const where appropriate

diff --git a/extensions/source/scanner/sane.cxx 
b/extensions/source/scanner/sane.cxx
index a26ff3c..aaefbf4 100644
--- a/extensions/source/scanner/sane.cxx
+++ b/extensions/source/scanner/sane.cxx
@@ -277,8 +277,7 @@ void Sane::ReloadOptions()
 if( ! IsOpen() )
 return;
 
-SANE_Option_Descriptor* pZero = (SANE_Option_Descriptor*)
-p_get_option_descriptor( maHandle, 0 );
+const SANE_Option_Descriptor* pZero = p_get_option_descriptor( maHandle, 0 
);
 SANE_Word pOptions[2];
 SANE_Status nStatus = p_control_option( maHandle, 0, SANE_ACTION_GET_VALUE,
 (void*)pOptions, NULL );
@@ -290,8 +289,8 @@ void Sane::ReloadOptions()
 fprintf( stderr, driver returned numer of options with larger size 
tha SANE_Word !!!\n );
 if( mppOptions )
 delete [] mppOptions;
-mppOptions = (const SANE_Option_Descriptor**)new SANE_Option_Descriptor*[ 
mnOptions ];
-mppOptions[ 0 ] = (SANE_Option_Descriptor*)pZero;
+mppOptions = new const SANE_Option_Descriptor*[ mnOptions ];
+mppOptions[ 0 ] = pZero;
 for( int i = 1; i  mnOptions; i++ )
 mppOptions[ i ] =  (SANE_Option_Descriptor*)
 p_get_option_descriptor( maHandle, i );
@@ -535,14 +534,14 @@ static inline sal_uInt8 _ReadValue( FILE* fp, int depth )
 
 sal_Bool Sane::CheckConsistency( const char* pMes, sal_Bool bInit )
 {
-static SANE_Option_Descriptor** pDescArray = NULL;
-static SANE_Option_Descriptor*  pZero = NULL;
+static const SANE_Option_Descriptor** pDescArray = NULL;
+static const SANE_Option_Descriptor*  pZero = NULL;
 
 if( bInit )
 {
-pDescArray = (SANE_Option_Descriptor**)mppOptions;
+pDescArray = mppOptions;
 if( mppOptions )
-pZero = (SANE_Option_Descriptor*)mppOptions[0];
+pZero = mppOptions[0];
 return sal_True;
 }
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - sw/source vcl/inc vcl/unx

2012-03-20 Thread Lubos Lunak
 sw/source/core/text/xmldump.cxx |   22 +++---
 vcl/inc/unx/saldata.hxx |1 -
 vcl/unx/generic/window/salframe.cxx |1 +
 3 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 086aa1cf2ab5017e2313aea6ffd84585fe6a4a43
Author: Luboš Luňák l.lu...@suse.cz
Date:   Tue Mar 20 08:53:19 2012 +0100

C++11: invalid string literal suffix

so let's make the sal_intXY ugliness even a bit more ugly

diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index 18b92e7..7df0ec8 100644
--- a/sw/source/core/text/xmldump.cxx
+++ b/sw/source/core/text/xmldump.cxx
@@ -346,15 +346,15 @@ void SwFrm::dumpInfosAsXml( xmlTextWriterPtr writer )
 void SwFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer )
 {
 xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( ptr ), %p, this );
-xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( id ), 
%SAL_PRIuUINT32, GetFrmId() );
+xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( id ), % 
SAL_PRIuUINT32, GetFrmId() );
 if ( GetNext( ) )
-xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( next ), 
%SAL_PRIuUINT32, GetNext()-GetFrmId() );
+xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( next ), % 
SAL_PRIuUINT32, GetNext()-GetFrmId() );
 if ( GetPrev( ) )
-xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( prev ), 
%SAL_PRIuUINT32, GetPrev()-GetFrmId() );
+xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( prev ), % 
SAL_PRIuUINT32, GetPrev()-GetFrmId() );
 if ( GetUpper( ) )
-xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( upper ), 
%SAL_PRIuUINT32, GetUpper()-GetFrmId() );
+xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( upper ), % 
SAL_PRIuUINT32, GetUpper()-GetFrmId() );
 if ( GetLower( ) )
-xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( lower ), 
%SAL_PRIuUINT32, GetLower()-GetFrmId() );
+xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( lower ), % 
SAL_PRIuUINT32, GetLower()-GetFrmId() );
 if ( IsTxtFrm(  ) )
 {
 SwTxtFrm *pTxtFrm = ( SwTxtFrm * ) this;
@@ -390,30 +390,30 @@ void SwTxtFrm::dumpAsXmlAttributes( xmlTextWriterPtr 
writer )
 {
 SwFrm::dumpAsXmlAttributes( writer );
 if ( HasFollow() )
-xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( follow ), 
%SAL_PRIuUINT32, GetFollow()-GetFrmId() );
+xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( follow ), % 
SAL_PRIuUINT32, GetFollow()-GetFrmId() );
 
 if (m_pPrecede != NULL)
-xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( precede ), 
%SAL_PRIuUINT32, static_castSwTxtFrm*(m_pPrecede)-GetFrmId() );
+xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( precede ), % 
SAL_PRIuUINT32, static_castSwTxtFrm*(m_pPrecede)-GetFrmId() );
 }
 
 void SwSectionFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer )
 {
 SwFrm::dumpAsXmlAttributes( writer );
 if ( HasFollow() )
-xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( follow ), 
%SAL_PRIuUINT32, GetFollow()-GetFrmId() );
+xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( follow ), % 
SAL_PRIuUINT32, GetFollow()-GetFrmId() );
 
 if (m_pPrecede != NULL)
-xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( precede ), 
%SAL_PRIuUINT32, static_castSwSectionFrm*( m_pPrecede )-GetFrmId() );
+xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( precede ), % 
SAL_PRIuUINT32, static_castSwSectionFrm*( m_pPrecede )-GetFrmId() );
 }
 
 void SwTabFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer )
 {
 SwFrm::dumpAsXmlAttributes( writer );
 if ( HasFollow() )
-xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( follow ), 
%SAL_PRIuUINT32, GetFollow()-GetFrmId() );
+xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( follow ), % 
SAL_PRIuUINT32, GetFollow()-GetFrmId() );
 
 if (m_pPrecede != NULL)
-xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( precede ), 
%SAL_PRIuUINT32, static_castSwTabFrm*( m_pPrecede )-GetFrmId() );
+xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( precede ), % 
SAL_PRIuUINT32, static_castSwTabFrm*( m_pPrecede )-GetFrmId() );
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit cf25b76b685ae8b74310f001798876651e89e51a
Author: Luboš Luňák l.lu...@suse.cz
Date:   Tue Mar 20 08:44:11 2012 +0100

move #include from .h to the one .cxx where it is needed

diff --git a/vcl/inc/unx/saldata.hxx b/vcl/inc/unx/saldata.hxx
index 591f4f6..121bdd0 100644
--- a/vcl/inc/unx/saldata.hxx
+++ b/vcl/inc/unx/saldata.hxx
@@ -30,7 +30,6 @@
 #define _SV_SALDATA_HXX
 
 // -=-= includes -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-#include signal.h
 #include unx/salunx.h
 #include vcl/salgtype.hxx
 #include unx/salstd.hxx
diff --git a/vcl/unx/generic/window/salframe.cxx 
b/vcl/unx/generic/window/salframe.cxx
index 0cebdbc..43f6acd 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ 

[Libreoffice-commits] .: vbahelper/inc

2012-03-20 Thread Lubos Lunak
 vbahelper/inc/vbahelper/vbaaccesshelper.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 707609c31cc144e3d39dd04d0a85b0d13c4ce4a1
Author: Luboš Luňák l.lu...@suse.cz
Date:   Tue Mar 20 22:21:03 2012 +0100

correct exception specification on a function

It's obvious that the function above is called by this one, and the 
exception
it throws cannot really propagate. The solution to this mystery is the fact
that msvc doesn't give a damn, and gcc does not either since OOo has used
-fno-enforce-sh-specs since 2001. But clang does, so fix this for now,
although it should possibly be just dumped.

diff --git a/vbahelper/inc/vbahelper/vbaaccesshelper.hxx 
b/vbahelper/inc/vbahelper/vbaaccesshelper.hxx
index 2533b5c..761d3a2 100644
--- a/vbahelper/inc/vbahelper/vbaaccesshelper.hxx
+++ b/vbahelper/inc/vbahelper/vbaaccesshelper.hxx
@@ -51,7 +51,7 @@ namespace ooo
 return xVBAFactory;
 }
 
-VBAHELPER_DLLPRIVATE inline css::uno::Reference css::uno::XInterface 
 createVBAUnoAPIServiceWithArgs( SfxObjectShell* pShell,  const sal_Char* 
_pAsciiName, const css::uno::Sequence css::uno::Any  aArgs ) throw 
(css::uno::RuntimeException)
+VBAHELPER_DLLPRIVATE inline css::uno::Reference css::uno::XInterface 
 createVBAUnoAPIServiceWithArgs( SfxObjectShell* pShell,  const sal_Char* 
_pAsciiName, const css::uno::Sequence css::uno::Any  aArgs ) throw 
(css::uno::Exception)
 {
 OSL_PRECOND( pShell, createVBAUnoAPIService: no shell! );
 ::rtl::OUString sVarName( ::rtl::OUString::createFromAscii( 
_pAsciiName ) );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: ucb/source

2012-03-20 Thread Lubos Lunak
 ucb/source/ucp/gvfs/gvfs_provider.cxx |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 186ab8e77bd7c7a42ffcca6fa7f8e1819ad04b7d
Author: Luboš Luňák l.lu...@suse.cz
Date:   Wed Mar 21 06:30:24 2012 +0100

fix after recent XSERVICEINFO_IMPL_1 change

diff --git a/ucb/source/ucp/gvfs/gvfs_provider.cxx 
b/ucb/source/ucp/gvfs/gvfs_provider.cxx
index 7552a20..c34cbe7 100644
--- a/ucb/source/ucp/gvfs/gvfs_provider.cxx
+++ b/ucb/source/ucp/gvfs/gvfs_provider.cxx
@@ -84,10 +84,8 @@ XTYPEPROVIDER_IMPL_3( ContentProvider,
 //=
 
 XSERVICEINFO_IMPL_1( ContentProvider,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
-com.sun.star.comp.GnomeVFSContentProvider )),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
-com.sun.star.ucb.GnomeVFSContentProvider )) );
+com.sun.star.comp.GnomeVFSContentProvider,
+com.sun.star.ucb.GnomeVFSContentProvider );
 //=
 //
 // Service factory implementation.
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: configure.in

2012-03-21 Thread Lubos Lunak
 configure.in |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4762788eb4ab7f2278861aaf9b9d6d665db61310
Author: Luboš Luňák l.lu...@suse.cz
Date:   Wed Mar 21 20:20:49 2012 +0100

AC_PROG_GREP (I'm pedantic, am I not?)

diff --git a/configure.in b/configure.in
index 66dcf18..08cd362 100644
--- a/configure.in
+++ b/configure.in
@@ -63,7 +63,7 @@ AC_SUBST(CROSS_COMPILING)
 
 AC_PROG_EGREP
 # AC_PROG_EGREP doesn't set GREP on all systems as well
-AC_PATH_PROG(GREP, grep)
+AC_PROG_GREP
 
 if test $build_os = cygwin; then
 EXEEXT_FOR_BUILD=.exe
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: configure.in

2012-03-21 Thread Lubos Lunak
 configure.in |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit d6e96d0a4e03bb722b9aa62ccd26b25c64c07a45
Author: Luboš Luňák l.lu...@suse.cz
Date:   Wed Mar 21 21:45:06 2012 +0100

add missing AC_MSG_RESULT() else branch

diff --git a/configure.in b/configure.in
index 08cd362..c6df5f1 100644
--- a/configure.in
+++ b/configure.in
@@ -7686,6 +7686,8 @@ if test $WANT_X11 = yes -a  $test_xrender = yes; 
then
 else
 AC_MSG_RESULT([internal])
 fi
+else
+AC_MSG_RESULT([no])
 fi
 
 dnl ===
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sal/CppunitTest_sal_rtl_strings.mk

2012-03-26 Thread Lubos Lunak
 sal/CppunitTest_sal_rtl_strings.mk |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 8a66c8f557dd97250faef6bd68c0d57970eefe43
Author: Luboš Luňák l.lu...@suse.cz
Date:   Mon Mar 26 12:05:44 2012 +0200

sal_rtl_strings unittest depends on sal_textenc library

there's a dlopen of it somewhere in sal's string classes

diff --git a/sal/CppunitTest_sal_rtl_strings.mk 
b/sal/CppunitTest_sal_rtl_strings.mk
index 8b267f2..f5127cb 100644
--- a/sal/CppunitTest_sal_rtl_strings.mk
+++ b/sal/CppunitTest_sal_rtl_strings.mk
@@ -42,4 +42,9 @@ $(eval $(call gb_CppunitTest_add_linked_libs,sal_rtl_strings,\
 $(gb_STDLIBS) \
 ))
 
+# the test uses the library created by Module_DLL
+$(call gb_CppunitTest_get_target,sal_rtl_strings) : \
+$(call gb_Library_get_target,sal_textenc)
+
+
 # vim: set noet sw=4 ts=4:
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - solenv/gbuild

2012-03-26 Thread Lubos Lunak
 solenv/gbuild/gbuild.mk |4 
 1 file changed, 4 deletions(-)

New commits:
commit 2ee0eeef5803659e096fc788c01cff0ea54ec6e8
Author: Luboš Luňák l.lu...@suse.cz
Date:   Mon Mar 26 17:36:14 2012 +0200

Revert make gbuild follow --disable-dependency-tracking too

3-5 branch is not ready for this, there are a number of build failures.
Okayed by Petr Mladek, but this is rather obvious.

This reverts commit af67f5f6438bde777c0cbb4d90c7f6bdcd831bf3.

diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 574e851..e85ed83 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -116,16 +116,12 @@ ifneq ($(gb_DEBUGLEVEL),0)
 gb_SYMBOL := $(true)
 endif
 
-ifneq ($(nodep),)
-gb_FULLDEPS := $(false)
-else
 # for clean, setuplocal and removelocal goals we switch off dependencies
 ifneq ($(filter cleanpackmodule clean setuplocal removelocal showdeliverables 
help debugrun,$(MAKECMDGOALS)),)
 gb_FULLDEPS := $(false)
 else
 gb_FULLDEPS := $(true)
 endif
-endif
 
 # save user-supplied flags for latter use
 ifneq ($(strip $(CFLAGS)),)
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sal/CppunitTest_sal_rtl_strings.mk

2012-03-26 Thread Lubos Lunak
 sal/CppunitTest_sal_rtl_strings.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cedaaf89d7d9c2e41650dcc4df07b2be24649826
Author: Luboš Luňák l.lu...@suse.cz
Date:   Mon Mar 26 17:41:33 2012 +0200

fix comment

diff --git a/sal/CppunitTest_sal_rtl_strings.mk 
b/sal/CppunitTest_sal_rtl_strings.mk
index f5127cb..0a00e8b 100644
--- a/sal/CppunitTest_sal_rtl_strings.mk
+++ b/sal/CppunitTest_sal_rtl_strings.mk
@@ -42,7 +42,7 @@ $(eval $(call gb_CppunitTest_add_linked_libs,sal_rtl_strings,\
 $(gb_STDLIBS) \
 ))
 
-# the test uses the library created by Module_DLL
+# the test uses O(U)String capabilities that dlopen this lib
 $(call gb_CppunitTest_get_target,sal_rtl_strings) : \
 $(call gb_Library_get_target,sal_textenc)
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 3 commits - sal/inc sal/qa

2012-03-26 Thread Lubos Lunak
 sal/inc/rtl/string.hxx  |   35 ++
 sal/inc/rtl/ustrbuf.hxx |   18 +++
 sal/qa/rtl/strings/test_ostring_stringliterals.cxx  |   50 
 sal/qa/rtl/strings/test_oustring_stringliterals.cxx |   22 +++-
 4 files changed, 121 insertions(+), 4 deletions(-)

New commits:
commit 09517a98fe44eafcd19a8eecb0c14384799e2684
Author: Luboš Luňák l.lu...@suse.cz
Date:   Mon Mar 26 18:51:59 2012 +0200

string literal overload for OString::operator=()

diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx
index 79b9a15..d899067 100644
--- a/sal/inc/rtl/string.hxx
+++ b/sal/inc/rtl/string.hxx
@@ -57,6 +57,12 @@ namespace rtl
 
 #ifdef RTL_STRING_UNITTEST
 #undef rtl
+// helper macros to make functions appear more readable
+#define RTL_STRING_CONST_FUNCTION rtl_string_unittest_const_literal_function = 
true;
+#define RTL_STRING_NON_CONST_FUNCTION 
rtl_string_unittest_non_const_literal_function = true;
+#else
+#define RTL_STRING_CONST_FUNCTION
+#define RTL_STRING_NON_CONST_FUNCTION
 #endif
 
 /* === */
@@ -209,6 +215,7 @@ public:
 
   If there are any embedded \0's in the string literal, the result is 
undefined.
   Use the overload that explicitly accepts length.
+  @since LibreOffice 3.6
 
   @paramliteral   a string literal
 */
@@ -225,6 +232,7 @@ public:
 /**
   @overload
   New string from a non-const char array.
+  @since LibreOffice 3.6
 
   @param value non-const char array
 */
@@ -299,6 +307,33 @@ public:
 }
 
 /**
+ @overload
+ This function accepts an ASCII string literal as its argument.
+ @since LibreOffice 3.6
+*/
+template int N 
+OString operator=( const char (literal)[ N ] ) SAL_THROW(())
+{
+rtl_string_newFromLiteral( pData, literal, N - 1 );
+RTL_STRING_CONST_FUNCTION
+return *this;
+}
+/**
+  @overload
+  This function accepts a non-const char array as its argument.
+  @since LibreOffice 3.6
+
+  @param value non-const char array
+*/
+template int N 
+OString operator=( char (value)[ N ] ) SAL_THROW(())
+{
+rtl_string_newFromStr( pData, value );
+RTL_STRING_NON_CONST_FUNCTION
+return *this;
+}
+
+/**
   Append a string to this string.
 
   @paramstr a OString.
diff --git a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx 
b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
index 8398ae9..2176a50 100644
--- a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
+++ b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
@@ -29,6 +29,8 @@
 // activate the extra needed ctor
 #define RTL_STRING_UNITTEST
 bool rtl_string_unittest_const_literal;
+bool rtl_string_unittest_const_literal_function;
+bool rtl_string_unittest_non_const_literal_function;
 
 #include sal/config.h
 #include sal/precppunit.hxx
@@ -38,17 +40,33 @@ bool rtl_string_unittest_const_literal;
 #include rtl/string.h
 #include rtl/string.hxx
 
+namespace rtlunittest {
+
+template typename charT, typename traits  std::basic_ostreamcharT, traits 
+operator (
+std::basic_ostreamcharT, traits  stream, rtl::OString const  string)
+{
+return stream  string.getStr();
+// best effort; potentially loses data due to embedded null characters
+}
+
+}
+
 namespace test { namespace ostring {
 
 class StringLiterals: public CppUnit::TestFixture
 {
 private:
 void checkCtors();
+void checkUsage();
+void checkNonConstUsage();
 
 void testcall( const char str[] );
 
 CPPUNIT_TEST_SUITE(StringLiterals);
 CPPUNIT_TEST(checkCtors);
+CPPUNIT_TEST(checkUsage);
+CPPUNIT_TEST(checkNonConstUsage);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -116,6 +134,38 @@ void test::ostring::StringLiterals::testcall( const char 
str[] )
 #endif
 }
 
+void test::ostring::StringLiterals::checkUsage()
+{
+// simply check that all string literal based calls work as expected
+// also check that they really use string literal overload and do not convert 
to OString
+rtl::OString foo( foo );
+
+rtl_string_unittest_const_literal = false; // start checking for OString 
conversions
+rtl_string_unittest_non_const_literal_function = false; // and check for 
non-const variants
+CPPUNIT_ASSERT_EQUAL( foo, rtl::OString() = foo );
+// if this is not true, some of the calls above converted to OString
+CPPUNIT_ASSERT( rtl_string_unittest_const_literal == false );
+// if this is not true, some of the calls above used non-const variants
+CPPUNIT_ASSERT( rtl_string_unittest_non_const_literal_function == false );
+}
+
+void test::ostring::StringLiterals::checkNonConstUsage()
+{
+// check that (non-const) char[] overloads work and do not use const char[] 
overloads
+rtl::OString foo( foo );
+char foo_c[] = foo;
+
+rtl_string_unittest_const_literal = false; // start 

[Libreoffice-commits] .: sal/qa

2012-03-26 Thread Lubos Lunak
 sal/qa/rtl/strings/test_ostring_stringliterals.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 205ee3062e494733f10b13057135b1eb8646e93d
Author: Luboš Luňák l.lu...@suse.cz
Date:   Mon Mar 26 19:09:34 2012 +0200

finish work-in-progress test

diff --git a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx 
b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
index 2176a50..d665ee2 100644
--- a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
+++ b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
@@ -157,8 +157,7 @@ void test::ostring::StringLiterals::checkNonConstUsage()
 
 rtl_string_unittest_const_literal = false; // start checking for OString 
conversions
 rtl_string_unittest_const_literal_function = false; // and check for const 
variants
-sleep(10);
-rtl::OString() = (const char*)foo;
+CPPUNIT_ASSERT_EQUAL( foo, rtl::OString() = (const char*)foo );
 CPPUNIT_ASSERT_EQUAL( foo, rtl::OString() = foo_c );
 // if this is not true, some of the calls above converted to OString
 CPPUNIT_ASSERT( rtl_string_unittest_const_literal == false );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - solenv/gbuild

2012-03-26 Thread Lubos Lunak
 solenv/gbuild/gbuild.mk |4 
 1 file changed, 4 insertions(+)

New commits:
commit 3b1adf08e38c26c2d0d22b831f9582bc60049681
Author: Luboš Luňák l.lu...@suse.cz
Date:   Mon Mar 26 20:38:41 2012 +0200

Revert Revert make gbuild follow --disable-dependency-tracking too

Revert again, the option itself is correct. Resulting problems need to
be fixed and the option should not be used now where it breaks.

This reverts commit 2ee0eeef5803659e096fc788c01cff0ea54ec6e8.

diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index e85ed83..574e851 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -116,12 +116,16 @@ ifneq ($(gb_DEBUGLEVEL),0)
 gb_SYMBOL := $(true)
 endif
 
+ifneq ($(nodep),)
+gb_FULLDEPS := $(false)
+else
 # for clean, setuplocal and removelocal goals we switch off dependencies
 ifneq ($(filter cleanpackmodule clean setuplocal removelocal showdeliverables 
help debugrun,$(MAKECMDGOALS)),)
 gb_FULLDEPS := $(false)
 else
 gb_FULLDEPS := $(true)
 endif
+endif
 
 # save user-supplied flags for latter use
 ifneq ($(strip $(CFLAGS)),)
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - i18npool/Library_collator_data.mk i18npool/Library_i18npool.mk i18npool/Library_index_data.mk i18npool/Library_textconv_dict.mk

2012-03-26 Thread Lubos Lunak
 i18npool/Library_collator_data.mk |3 ++-
 i18npool/Library_i18npool.mk  |5 ++---
 i18npool/Library_index_data.mk|3 ++-
 i18npool/Library_textconv_dict.mk |3 ++-
 4 files changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 3ab34677d8a20eb098b6310601bc353d455d3bff
Author: Matúš Kukan matus.ku...@gmail.com
Date:   Mon Mar 26 20:51:45 2012 +0200

i18npool: fix dependency problem

When parsing makefiles, there is no guarantee that all files
are already generated, so we can't use $(wildcard $(WORKDIR)/..).

Signed-off-by: Luboš Luňák l.lu...@suse.cz

diff --git a/i18npool/Library_collator_data.mk 
b/i18npool/Library_collator_data.mk
index 7f00e8b..bfc38ce 100644
--- a/i18npool/Library_collator_data.mk
+++ b/i18npool/Library_collator_data.mk
@@ -31,7 +31,8 @@ $(eval $(call gb_Library_Library,collator_data))
 $(eval $(call gb_Library_add_package_headers,collator_data,i18npool_generated))
 
 $(eval $(call gb_Library_add_generated_exception_objects,collator_data,\
-   $(subst $(WORKDIR)/,,$(basename $(wildcard 
$(WORKDIR)/CustomTarget/i18npool/source/collator/collator_*.cxx))) \
+   $(foreach txt,$(wildcard 
$(SRCDIR)/i18npool/source/collator/data/*.txt),\
+   CustomTarget/i18npool/source/collator/collator_$(notdir 
$(basename $(txt \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/i18npool/Library_i18npool.mk b/i18npool/Library_i18npool.mk
index 3faaa6a..57875c9 100644
--- a/i18npool/Library_i18npool.mk
+++ b/i18npool/Library_i18npool.mk
@@ -139,11 +139,10 @@ $(eval $(call gb_Library_add_exception_objects,i18npool,\
i18npool/source/transliteration/transliteration_OneToOne \
 ))
 
-BRKFILES := $(subst $(WORKDIR)/,,$(basename $(wildcard 
$(WORKDIR)/CustomTarget/i18npool/source/breakiterator/*_brk.c))) \
-
 $(eval $(call gb_Library_add_generated_cobjects,i18npool,\
CustomTarget/i18npool/source/breakiterator/OpenOffice_dat \
-   $(BRKFILES) \
+   $(foreach txt,$(wildcard 
$(SRCDIR)/i18npool/source/breakiterator/data/*.txt),\
+   CustomTarget/i18npool/source/breakiterator/$(notdir $(basename 
$(txt)))_brk) \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/i18npool/Library_index_data.mk b/i18npool/Library_index_data.mk
index 43d4c52..68eaa58 100644
--- a/i18npool/Library_index_data.mk
+++ b/i18npool/Library_index_data.mk
@@ -31,7 +31,8 @@ $(eval $(call gb_Library_Library,index_data))
 $(eval $(call gb_Library_add_package_headers,index_data,i18npool_generated))
 
 $(eval $(call gb_Library_add_generated_exception_objects,index_data,\
-   $(subst $(WORKDIR)/,,$(basename $(wildcard 
$(WORKDIR)/CustomTarget/i18npool/source/indexentry/*.cxx))) \
+   $(foreach txt,$(wildcard 
$(SRCDIR)/i18npool/source/indexentry/data/*.txt),\
+   CustomTarget/i18npool/source/indexentry/$(notdir $(basename 
$(txt \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/i18npool/Library_textconv_dict.mk 
b/i18npool/Library_textconv_dict.mk
index 3b9213c..8df4a29 100644
--- a/i18npool/Library_textconv_dict.mk
+++ b/i18npool/Library_textconv_dict.mk
@@ -41,7 +41,8 @@ $(eval $(call gb_Library_add_api,textconv_dict,\
 ))
 
 $(eval $(call gb_Library_add_generated_exception_objects,textconv_dict,\
-   $(subst $(WORKDIR)/,,$(basename $(wildcard 
$(WORKDIR)/CustomTarget/i18npool/source/textconversion/*.cxx))) \
+   $(foreach txt,$(wildcard 
$(SRCDIR)/i18npool/source/textconversion/data/*.dic),\
+   CustomTarget/i18npool/source/textconversion/$(notdir $(basename 
$(txt \
 ))
 
 # vim: set noet sw=4 ts=4:
___
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 - basctl/AllLangResTarget_basctl.mk formula/AllLangResTarget_for.mk svl/AllLangResTarget_svl.mk svl/Library_fsstorage.mk svl/Library_passw

2012-03-27 Thread Lubos Lunak
 basctl/AllLangResTarget_basctl.mk |4 
 formula/AllLangResTarget_for.mk   |1 +
 svl/AllLangResTarget_svl.mk   |2 +-
 svl/Library_fsstorage.mk  |7 ++-
 svl/Library_passwordcontainer.mk  |7 ++-
 5 files changed, 10 insertions(+), 11 deletions(-)

New commits:
commit 3d07ac27bf35f83587fd5422791adf6670c689a1
Author: Matúš Kukan matus.ku...@gmail.com
Date:   Sun Mar 25 12:18:32 2012 +0200

svl: add include path and more add_package_headers

Conflicts:

svl/AllLangResTarget_svl.mk
svl/Library_fsstorage.mk
svl/Library_passwordcontainer.mk

Signed-off-by: Luboš Luňák l.lu...@suse.cz

diff --git a/svl/AllLangResTarget_svl.mk b/svl/AllLangResTarget_svl.mk
index 70edac2..90cb015 100644
--- a/svl/AllLangResTarget_svl.mk
+++ b/svl/AllLangResTarget_svl.mk
@@ -36,7 +36,7 @@ $(eval $(call gb_SrsTarget_SrsTarget,svl/res))
 
 $(eval $(call gb_SrsTarget_set_include,svl/res,\
 $$(INCLUDE) \
--I$(WORKDIR)/inc \
+-I$(realpath $(SRCDIR)/svl/inc) \
 ))
 
 $(eval $(call gb_SrsTarget_add_files,svl/res,\
diff --git a/svl/Library_fsstorage.mk b/svl/Library_fsstorage.mk
index 2247c9a..a3bf09f 100644
--- a/svl/Library_fsstorage.mk
+++ b/svl/Library_fsstorage.mk
@@ -28,15 +28,12 @@
 
 $(eval $(call gb_Library_Library,fsstorage))
 
+$(eval $(call gb_Library_add_package_headers,fsstorage,svl_inc))
+
 $(eval $(call 
gb_Library_set_componentfile,fsstorage,svl/source/fsstor/fsstorage))
 
 $(eval $(call gb_Library_set_include,fsstorage,\
--I$(WORKDIR)/inc/svl \
--I$(WORKDIR)/inc/ \
--I$(realpath $(SRCDIR)/svl/inc) \
--I$(realpath $(SRCDIR)/svl/inc/svl) \
 -I$(realpath $(SRCDIR)/svl/source/inc) \
--I$(OUTDIR)/inc \
 $$(INCLUDE) \
 ))
 
diff --git a/svl/Library_passwordcontainer.mk b/svl/Library_passwordcontainer.mk
index 6b577b6..e96a11a 100644
--- a/svl/Library_passwordcontainer.mk
+++ b/svl/Library_passwordcontainer.mk
@@ -28,15 +28,12 @@
 
 $(eval $(call gb_Library_Library,passwordcontainer))
 
+$(eval $(call gb_Library_add_package_headers,passwordcontainer,svl_inc))
+
 $(eval $(call 
gb_Library_set_componentfile,passwordcontainer,svl/source/passwordcontainer/passwordcontainer))
 
 $(eval $(call gb_Library_set_include,passwordcontainer,\
--I$(WORKDIR)/inc/svl \
--I$(WORKDIR)/inc/ \
--I$(realpath $(SRCDIR)/svl/inc) \
--I$(realpath $(SRCDIR)/svl/inc/svl) \
 -I$(realpath $(SRCDIR)/svl/source/inc) \
--I$(OUTDIR)/inc \
 $$(INCLUDE) \
 ))
 
commit a0d31721fc2cd7391e7a27a3adcf50ff20370174
Author: Matúš Kukan matus.ku...@gmail.com
Date:   Mon Mar 26 23:01:46 2012 +0200

more dependencies and include paths

Conflicts:

basctl/AllLangResTarget_basctl.mk
formula/AllLangResTarget_for.mk

Signed-off-by: Luboš Luňák l.lu...@suse.cz

diff --git a/basctl/AllLangResTarget_basctl.mk 
b/basctl/AllLangResTarget_basctl.mk
index 1611f9a..63575fa 100644
--- a/basctl/AllLangResTarget_basctl.mk
+++ b/basctl/AllLangResTarget_basctl.mk
@@ -54,4 +54,8 @@ $(eval $(call gb_SrsTarget_add_files,basctl/res,\
basctl/source/dlged/managelang.src \
 ))
 
+$(call gb_SrsTemplateTarget_get_target,basctl/res) : \
+   $(call gb_Package_get_target,svx_globlmn_hrc) \
+   $(call gb_Package_get_target,svx_inc)
+
 # vim: set noet sw=4 ts=4:
diff --git a/formula/AllLangResTarget_for.mk b/formula/AllLangResTarget_for.mk
index 0830623..fe90dd6 100644
--- a/formula/AllLangResTarget_for.mk
+++ b/formula/AllLangResTarget_for.mk
@@ -37,6 +37,7 @@ $(eval $(call gb_SrsTarget_SrsTarget,formula/res))
 
 $(eval $(call gb_SrsTarget_set_include,formula/res,\
 $$(INCLUDE) \
+-I$(realpath $(SRCDIR)/formula/inc) \
 -I$(realpath $(SRCDIR)/formula/source/core/inc) \
 -I$(OUTDIR)/inc \
 ))
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sal/qa

2012-03-27 Thread Lubos Lunak
 sal/qa/osl/process/osl_process.cxx |   72 ++---
 1 file changed, 36 insertions(+), 36 deletions(-)

New commits:
commit 533eadeb46c3db40daf0f18f89096c24e7f9c2bd
Author: Luboš Luňák l.lu...@suse.cz
Date:   Wed Mar 28 06:26:58 2012 +0200

CPPUNIT_ASSERT_MESSAGE - CPPUNIT_ASSERT_EQUAL_MESSAGE

diff --git a/sal/qa/osl/process/osl_process.cxx 
b/sal/qa/osl/process/osl_process.cxx
index 367d6d9..8580ab2 100644
--- a/sal/qa/osl/process/osl_process.cxx
+++ b/sal/qa/osl/process/osl_process.cxx
@@ -159,10 +159,10 @@ public:
 0,
 process);
 
-CPPUNIT_ASSERT_MESSAGE
+CPPUNIT_ASSERT_EQUAL_MESSAGE
 (
 osl_createProcess failed,
-osl_error == osl_Process_E_None
+osl_Process_E_None, osl_error
 );
 
 TimeValue timeout;
@@ -171,18 +171,18 @@ public:
 
 osl_error = osl_joinProcessWithTimeout(process, timeout);
 
-CPPUNIT_ASSERT_MESSAGE
+CPPUNIT_ASSERT_EQUAL_MESSAGE
 (
 osl_joinProcessWithTimeout returned without timeout failure,
-osl_Process_E_TimedOut == osl_error
+osl_Process_E_TimedOut, osl_error
 );
 
 osl_error = osl_terminateProcess(process);
 
-CPPUNIT_ASSERT_MESSAGE
+CPPUNIT_ASSERT_EQUAL_MESSAGE
 (
 osl_terminateProcess failed,
-osl_error == osl_Process_E_None
+osl_Process_E_None, osl_error
 );
 
 osl_freeProcessHandle(process);
@@ -209,10 +209,10 @@ public:
 0,
 process);
 
-CPPUNIT_ASSERT_MESSAGE
+CPPUNIT_ASSERT_EQUAL_MESSAGE
 (
 osl_createProcess failed,
-osl_error == osl_Process_E_None
+osl_Process_E_None, osl_error
 );
 
 TimeValue timeout;
@@ -221,10 +221,10 @@ public:
 
 osl_error = osl_joinProcessWithTimeout(process, timeout);
 
-CPPUNIT_ASSERT_MESSAGE
+CPPUNIT_ASSERT_EQUAL_MESSAGE
 (
 osl_joinProcessWithTimeout returned with failure,
-osl_Process_E_None == osl_error
+osl_Process_E_None, osl_error
 );
 
 osl_freeProcessHandle(process);
@@ -249,18 +249,18 @@ public:
 0,
 process);
 
-CPPUNIT_ASSERT_MESSAGE
+CPPUNIT_ASSERT_EQUAL_MESSAGE
 (
 osl_createProcess failed,
-osl_error == osl_Process_E_None
+osl_Process_E_None, osl_error
 );
 
 osl_error = osl_joinProcessWithTimeout(process, NULL);
 
-CPPUNIT_ASSERT_MESSAGE
+CPPUNIT_ASSERT_EQUAL_MESSAGE
 (
 osl_joinProcessWithTimeout returned with failure,
-osl_Process_E_None == osl_error
+osl_Process_E_None, osl_error
 );
 
 osl_freeProcessHandle(process);
@@ -285,18 +285,18 @@ public:
 0,
 process);
 
-CPPUNIT_ASSERT_MESSAGE
+CPPUNIT_ASSERT_EQUAL_MESSAGE
 (
 osl_createProcess failed,
-osl_error == osl_Process_E_None
+osl_Process_E_None, osl_error
 );
 
 osl_error = ::osl_joinProcess(process);
 
-CPPUNIT_ASSERT_MESSAGE
+CPPUNIT_ASSERT_EQUAL_MESSAGE
 (
 osl_joinProcess returned with failure,
-osl_Process_E_None == osl_error
+osl_Process_E_None, osl_error
 );
 
 osl_freeProcessHandle(process);
@@ -450,11 +450,11 @@ public:
 OUString create_temp_file(OUString temp_file_url)
 {
 FileBase::RC rc = FileBase::createTempFile(0, 0, temp_file_url);
-CPPUNIT_ASSERT_MESSAGE(createTempFile failed, FileBase::E_None == 
rc);
+CPPUNIT_ASSERT_EQUAL_MESSAGE(createTempFile failed, 
FileBase::E_None, rc);
 
 OUString temp_file_path;
 rc = FileBase::getSystemPathFromFileURL(temp_file_url, temp_file_path);
-CPPUNIT_ASSERT_MESSAGE(getSystemPathFromFileURL failed, 
FileBase::E_None == rc);
+CPPUNIT_ASSERT_EQUAL_MESSAGE(getSystemPathFromFileURL failed, 
FileBase::E_None, rc);
 
 return temp_file_path;
 }
@@ -584,18 +584,18 @@ public:
 0,
 process);
 
-CPPUNIT_ASSERT_MESSAGE
+CPPUNIT_ASSERT_EQUAL_MESSAGE
 (
 osl_createProcess failed,
-osl_error == osl_Process_E_None
+osl_Process_E_None, osl_error
 );
 
 osl_error = ::osl_joinProcess(process);
 
-CPPUNIT_ASSERT_MESSAGE
+CPPUNIT_ASSERT_EQUAL_MESSAGE
 (
 osl_joinProcess returned with failure,
-osl_Process_E_None == osl_error
+osl_Process_E_None, osl_error
 );
 
 osl_freeProcessHandle(process);
@@ -638,18 +638,18 @@ public:
 SAL_N_ELEMENTS(child_env),
 process);
 
-CPPUNIT_ASSERT_MESSAGE
+CPPUNIT_ASSERT_EQUAL_MESSAGE
 (
 

[Libreoffice-commits] .: 3 commits - sal/inc sal/qa

2012-03-28 Thread Lubos Lunak
 sal/inc/rtl/string.hxx |  306 +++--
 sal/qa/rtl/strings/test_ostring_stringliterals.cxx |   88 +-
 2 files changed, 369 insertions(+), 25 deletions(-)

New commits:
commit 2ebda60bfe7897ac371dd7ee97c4309e72f20e4b
Author: Luboš Luňák l.lu...@suse.cz
Date:   Wed Mar 28 08:56:05 2012 +0200

more SFINAE to distinguish between const char* and const char[]

diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx
index e7db97b..0593ddf 100644
--- a/sal/inc/rtl/string.hxx
+++ b/sal/inc/rtl/string.hxx
@@ -799,18 +799,8 @@ public:
 
 friend sal_Bool operator == ( const OString rStr1, const OString 
rStr2 ) SAL_THROW(())
 { return rStr1.getLength() == rStr2.getLength()  
rStr1.compareTo( rStr2 ) == 0; }
-friend sal_Bool operator == ( const OString rStr1, const sal_Char * 
pStr2 ) SAL_THROW(())
-{ return rStr1.compareTo( pStr2 ) == 0; }
-friend sal_Bool operator == ( const sal_Char * pStr1,   const OString 
rStr2 ) SAL_THROW(())
-{ return OString( pStr1 ).compareTo( rStr2 ) == 0; }
-
 friend sal_Bool operator != ( const OString rStr1, const OString 
rStr2 ) SAL_THROW(())
 { return !(operator == ( rStr1, rStr2 )); }
-friend sal_Bool operator != ( const OString rStr1, const sal_Char * 
pStr2 ) SAL_THROW(())
-{ return !(operator == ( rStr1, pStr2 )); }
-friend sal_Bool operator != ( const sal_Char * pStr1,   const OString 
rStr2 ) SAL_THROW(())
-{ return !(operator == ( pStr1, rStr2 )); }
-
 friend sal_Bool operator   ( const OString rStr1,const OString 
rStr2 ) SAL_THROW(())
 { return rStr1.compareTo( rStr2 )  0; }
 friend sal_Bool operator   ( const OString rStr1,const OString 
rStr2 ) SAL_THROW(())
@@ -820,6 +810,18 @@ public:
 friend sal_Bool operator = ( const OString rStr1,const OString 
rStr2 ) SAL_THROW(())
 { return rStr1.compareTo( rStr2 ) = 0; }
 
+template typename T 
+friend typename internal::CharPtrDetector T, bool ::Type operator==( 
const OString rStr1, const T value ) SAL_THROW(())
+{
+return rStr1.compareTo( value ) == 0;
+}
+
+template typename T 
+friend typename internal::CharPtrDetector T, bool ::Type operator==( 
const T value, const OString rStr2 ) SAL_THROW(())
+{
+return rStr2.compareTo( value ) == 0;
+}
+
 /**
  @overload
  This function accepts an ASCII string literal as its argument.
@@ -829,8 +831,8 @@ public:
 friend bool operator == ( const OString rStr, const char (literal)[ N ] 
) SAL_THROW(())
 {
 RTL_STRING_CONST_FUNCTION
-return rStr.getLength() == N - 1  rtl_str_compare_WithLength( 
rStr.pData-buffer, rStr.pData-length,
-literal, N - 1 );
+return rStr.getLength() == N - 1
+ rtl_str_compare_WithLength( rStr.pData-buffer, 
rStr.pData-length, literal, N - 1 ) == 0;
 }
 
 /**
@@ -856,8 +858,8 @@ public:
 friend bool operator == ( const char (literal)[ N ], const OString rStr 
) SAL_THROW(())
 {
 RTL_STRING_CONST_FUNCTION
-return rStr.getLength() == N - 1  rtl_str_compare_WithLength( 
rStr.pData-buffer, rStr.pData-length,
-literal, N - 1 );
+return rStr.getLength() == N - 1
+ rtl_str_compare_WithLength( rStr.pData-buffer, 
rStr.pData-length, literal, N - 1 ) == 0;
 }
 
 /**
@@ -874,6 +876,18 @@ public:
 return rStr.compareTo( value ) == 0;
 }
 
+template typename T 
+friend typename internal::CharPtrDetector T, bool ::Type operator!=( 
const OString rStr1, const T value ) SAL_THROW(())
+{
+return !(operator == ( rStr1, value ));
+}
+
+template typename T 
+friend typename internal::CharPtrDetector T, bool ::Type operator!=( 
const T value,   const OString rStr2 ) SAL_THROW(())
+{
+return !(operator == ( value, rStr2 ));
+}
+
 /**
  @overload
  This function accepts an ASCII string literal as its argument.
diff --git a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx 
b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
index 0ada709..4af152c 100644
--- a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
+++ b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
@@ -149,20 +149,48 @@ void test::ostring::StringLiterals::checkUsage()
 
 rtl_string_unittest_const_literal = false; // start checking for OString 
conversions
 rtl_string_unittest_non_const_literal_function = false; // and check for 
non-const variants
+rtl_string_unittest_const_literal_function = false;
 CPPUNIT_ASSERT_EQUAL( foo, rtl::OString() = foo );
+CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true );
+rtl_string_unittest_const_literal_function = false;
 CPPUNIT_ASSERT( 

[Libreoffice-commits] .: sal/inc sal/qa

2012-03-28 Thread Lubos Lunak
 sal/inc/rtl/string.hxx |7 +++
 sal/qa/rtl/strings/test_ostring_stringliterals.cxx |2 ++
 2 files changed, 9 insertions(+)

New commits:
commit 86a1e6de4fc3af897271bc5f7f04506261d4f286
Author: Luboš Luňák l.lu...@suse.cz
Date:   Wed Mar 28 17:37:19 2012 +0200

SFINAE workarounds for gcc-4.0.1

diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx
index 39414e6..68f41bd 100644
--- a/sal/inc/rtl/string.hxx
+++ b/sal/inc/rtl/string.hxx
@@ -551,6 +551,12 @@ public:
   @return   sal_True if the strings are equal;
 sal_False, otherwise.
 */
+#ifdef HAVE_SFINAE_ANONYMOUS_BROKEN
+sal_Bool equalsIgnoreAsciiCase( const sal_Char * asciiStr ) const 
SAL_THROW(())
+{
+return rtl_str_compareIgnoreAsciiCase( pData-buffer, asciiStr ) == 0;
+}
+#else
 template typename T 
 typename internal::CharPtrDetector T, bool ::Type equalsIgnoreAsciiCase( 
const T asciiStr ) const SAL_THROW(())
 {
@@ -577,6 +583,7 @@ public:
 return rtl_str_compareIgnoreAsciiCase_WithLength( pData-buffer, 
pData-length,
   literal, 
internal::ConstCharArrayDetector T, void ::size - 1 ) == 0;
 }
+#endif
 
 /**
   Perform a ASCII lowercase comparison of two strings.
diff --git a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx 
b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
index 4af152c..930b038 100644
--- a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
+++ b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
@@ -152,9 +152,11 @@ void test::ostring::StringLiterals::checkUsage()
 rtl_string_unittest_const_literal_function = false;
 CPPUNIT_ASSERT_EQUAL( foo, rtl::OString() = foo );
 CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true );
+#ifndef HAVE_SFINAE_ANONYMOUS_BROKEN
 rtl_string_unittest_const_literal_function = false;
 CPPUNIT_ASSERT( FoO.equalsIgnoreAsciiCase( fOo ));
 CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true );
+#endif
 rtl_string_unittest_const_literal_function = false;
 CPPUNIT_ASSERT( foobarfoo.match( bar, 3 ));
 CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 8 commits - sal/inc sal/Package_inc.mk sal/qa

2012-03-28 Thread Lubos Lunak
 to ensure the function is called 
only with (non-const) char[N].
-*/
-struct Dummy {};
-template typename T1, typename T2 
-struct CharPtrDetector
-{
-};
-template typename T 
-struct CharPtrDetector const char*, T 
-{
-typedef T Type;
-};
-template typename T 
-struct CharPtrDetector char*, T 
-{
-typedef T Type;
-};
-
-template typename T1, typename T2 
-struct NonConstCharArrayDetector
-{
-};
-template typename T, int N 
-struct NonConstCharArrayDetector char[ N ], T 
-{
-typedef T Type;
-};
-// This is similar, only it helps to detect const char[]. Without using a 
template,
-// (non-const) char[] would be automatically converted to const char[], which 
is unwanted
-// here (size of the content is not known).
-template typename T1, typename T2 
-struct ConstCharArrayDetector
-{
-};
-template int N, typename T 
-struct ConstCharArrayDetector const char[ N ], T 
-{
-typedef T Type;
-static const int size = N;
-};
-}
-
 class OString
 {
 public:
@@ -1486,6 +1429,19 @@ public:
 
 /* === */
 
+} /* Namespace */
+
+#ifdef RTL_STRING_UNITTEST
+namespace rtl
+{
+typedef rtlunittest::OString OString;
+}
+#undef RTL_STRING_CONST_FUNCTION
+#endif
+
+namespace rtl
+{
+
 /** A helper to use OStrings with hash maps.
 
 Instances of this class are unary function objects that can be used as
@@ -1510,13 +1466,6 @@ struct OStringHash
 
 } /* Namespace */
 
-#ifdef RTL_STRING_UNITTEST
-namespace rtl
-{
-typedef rtlunittest::OString OString;
-}
-#endif
-
 #endif /* _RTL_STRING_HXX_ */
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/inc/rtl/stringutils.hxx b/sal/inc/rtl/stringutils.hxx
new file mode 100644
index 000..866bf23
--- /dev/null
+++ b/sal/inc/rtl/stringutils.hxx
@@ -0,0 +1,110 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * 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 Lubos Lunak l.lu...@suse.cz (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.
+ */
+
+#ifndef _RTL_STRINGUTILS_HXX_
+#define _RTL_STRINGUTILS_HXX_
+
+#include sal/config.h
+
+// The unittest uses slightly different code to help check that the proper
+// calls are made. The class is put into a different namespace to make
+// sure the compiler generates a different (if generating also non-inline)
+// copy of the function and does not merge them together. The class
+// is brought into the proper rtl namespace by a typedef below.
+#ifdef RTL_STRING_UNITTEST
+#define rtl rtlunittest
+#endif
+
+namespace rtl
+{
+
+#ifdef RTL_STRING_UNITTEST
+#undef rtl
+#endif
+namespace internal
+{
+/*
+These templates use SFINAE (Substitution failure is not an error) to help 
distinguish the various
+plain C string types: char*, const char*, char[N] and const char[N]. There are 
2 cases:
+1) Only string literal (i.e. const char[N]) is wanted, not any of the others.
+In this case it is necessary to distinguish between const char[N] and 
char[N], as the latter
+would be automatically converted to the const variant, which is not wanted 
(not a string literal
+with known size of the content). In this case ConstCharArrayDetector is 
used to ensure the function
+is called only with const char[N] arguments. There's no other plain C 
string type overload.
+2) All plain C string types are wanted, and const char[N] needs to be handled 
differently.
+In this case const char[N] would match const char* argument type (not 
exactly sure why, but it's
+consistent in all of gcc, clang and msvc). Using a template with a 
reference to const of the type
+avoids this problem, and CharPtrDetector ensures that the function is 
called only with char pointer
+arguments. The const in the argument is necessary to handle the case when 
something is explicitly
+cast to const char*. Additionally (non-const) char[N] needs to be handled, 
but with the reference
+being const, it would also match const char[N], so another overload with a 
reference to non

[Libreoffice-commits] .: sw/source

2012-03-28 Thread Lubos Lunak
 sw/source/filter/ww8/docxexport.cxx   |   22 ++
 sw/source/filter/ww8/writerhelper.cxx |4 ++--
 sw/source/filter/ww8/ww8par3.cxx  |2 +-
 3 files changed, 9 insertions(+), 19 deletions(-)

New commits:
commit b9f7225bb7c9cb58f796296fac3e58f84a619303
Author: Luboš Luňák l.lu...@suse.cz
Date:   Wed Mar 28 23:23:42 2012 +0200

remove RTL_CONSTASCII_(U)STRINGPARAM usage

diff --git a/sw/source/filter/ww8/docxexport.cxx 
b/sw/source/filter/ww8/docxexport.cxx
index ceec8e2..ab41592 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -304,21 +304,13 @@ void DocxExport::DoFormText(const SwInputField* /*pFld*/)
 
 rtl::OString DocxExport::OutputChart( uno::Reference frame::XModel  xModel, 
sal_Int32 nCount )
 {
-rtl::OUString aFileName = rtl::OUStringBuffer()
-
.appendAscii(RTL_CONSTASCII_STRINGPARAM(charts/chart))
-.append(nCount)
-
.appendAscii(RTL_CONSTASCII_STRINGPARAM(.xml))
-.makeStringAndClear();
+rtl::OUString aFileName = 
rtl::OUStringBuffer().append(charts/chart).append(nCount).append(.xml).makeStringAndClear();
 
 OUString sId = m_pFilter-addRelation( m_pDocumentFS-getOutputStream(),
 
http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart;,
 aFileName );
 
-aFileName = rtl::OUStringBuffer()
-  .appendAscii(RTL_CONSTASCII_STRINGPARAM(word/charts/chart))
-  .append(nCount)
-  .appendAscii(RTL_CONSTASCII_STRINGPARAM(.xml))
-  .makeStringAndClear();
+aFileName = 
rtl::OUStringBuffer().append(word/charts/chart).append(nCount).append(.xml).makeStringAndClear();
 
 ::sax_fastparser::FSHelperPtr pChartFS =
 m_pFilter-openFragmentStreamWithSerializer( aFileName,
@@ -575,28 +567,26 @@ void DocxExport::WriteHeaderFooter( const SwFmt rFmt, 
bool bHeader, const char*
 ::sax_fastparser::FSHelperPtr pFS;
 if ( bHeader )
 {
-OUString aName( 
OUStringBuffer().appendAscii(RTL_CONSTASCII_STRINGPARAM(header))
-.append( ++m_nHeaders 
).appendAscii(RTL_CONSTASCII_STRINGPARAM(.xml))
-.makeStringAndClear() );
+OUString aName( OUStringBuffer().append(header).append( ++m_nHeaders 
).append(.xml).makeStringAndClear() );
 
 aRelId = m_pFilter-addRelation( m_pDocumentFS-getOutputStream(),
 
http://schemas.openxmlformats.org/officeDocument/2006/relationships/header;,
 aName );
 
-pFS = m_pFilter-openFragmentStreamWithSerializer( 
OUStringBuffer().appendAscii(RTL_CONSTASCII_STRINGPARAM(word/)).append( aName 
).makeStringAndClear(),
+pFS = m_pFilter-openFragmentStreamWithSerializer( 
OUStringBuffer().append(word/).append( aName ).makeStringAndClear(),
 
application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml );
 
 pFS-startElementNS( XML_w, XML_hdr, MainXmlNamespaces( pFS ));
 }
 else
 {
-OUString aName( 
OUStringBuffer().appendAscii(RTL_CONSTASCII_STRINGPARAM(footer)).append( 
++m_nFooters 
).appendAscii(RTL_CONSTASCII_STRINGPARAM(.xml)).makeStringAndClear() );
+OUString aName( OUStringBuffer().append(footer).append( ++m_nFooters 
).append(.xml).makeStringAndClear() );
 
 aRelId = m_pFilter-addRelation( m_pDocumentFS-getOutputStream(),
 
http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer;,
 aName );
 
-pFS = m_pFilter-openFragmentStreamWithSerializer( 
OUStringBuffer().appendAscii(RTL_CONSTASCII_STRINGPARAM(word/)).append( aName 
).makeStringAndClear(),
+pFS = m_pFilter-openFragmentStreamWithSerializer( 
OUStringBuffer().append(word/).append( aName ).makeStringAndClear(),
 
application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml );
 
 pFS-startElementNS( XML_w, XML_ftr, MainXmlNamespaces( pFS ));
diff --git a/sw/source/filter/ww8/writerhelper.cxx 
b/sw/source/filter/ww8/writerhelper.cxx
index e96dfaa..a997ee8 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -633,8 +633,8 @@ namespace sw
 bool IsStarSymbol(const rtl::OUString rFontName)
 {
 rtl::OUString sFamilyNm(GetFontToken(rFontName, 0));
-return 
(sFamilyNm.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(starsymbol))
 ||
-
sFamilyNm.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(opensymbol)));
+return (sFamilyNm.equalsIgnoreAsciiCase(starsymbol) ||
+sFamilyNm.equalsIgnoreAsciiCase(opensymbol));
 }
 
 Size GetSwappedInSize(const SwNoTxtNode rNd)
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index e74829b..f50f321 100644
--- 

[Libreoffice-commits] .: sal/inc sal/qa

2012-03-28 Thread Lubos Lunak
 sal/inc/rtl/strbuf.hxx |   14 ++
 sal/qa/rtl/strings/test_ostring_stringliterals.cxx |4 
 2 files changed, 18 insertions(+)

New commits:
commit c9167bac18e1cca061d91f65d2dc91b9d09ef587
Author: Luboš Luňák l.lu...@suse.cz
Date:   Wed Mar 28 23:38:58 2012 +0200

gcc-4.0.1 SFINAE workarounds

diff --git a/sal/inc/rtl/strbuf.hxx b/sal/inc/rtl/strbuf.hxx
index 54428d3..122eb4b 100644
--- a/sal/inc/rtl/strbuf.hxx
+++ b/sal/inc/rtl/strbuf.hxx
@@ -373,6 +373,12 @@ public:
 @param   str   the characters to be appended.
 @return  this string buffer.
  */
+#ifdef HAVE_SFINAE_ANONYMOUS_BROKEN
+OStringBuffer  append( const sal_Char * str )
+{
+return append( str, rtl_str_getLength( str ) );
+}
+#else
 template typename T 
 typename internal::CharPtrDetector T, OStringBuffer ::Type append( 
const T str )
 {
@@ -397,6 +403,7 @@ public:
 rtl_stringbuffer_insert( pData, nCapacity, getLength(), literal, 
internal::ConstCharArrayDetector T, void ::size - 1 );
 return *this;
 }
+#endif
 
 /**
 Appends the string representation of the codechar/code array
@@ -555,6 +562,12 @@ public:
 @param  str  a character array.
 @return this string buffer.
  */
+#ifdef HAVE_SFINAE_ANONYMOUS_BROKEN
+OStringBuffer  insert( sal_Int32 offset, const sal_Char * str )
+{
+return insert( offset, str, rtl_str_getLength( str ) );
+}
+#else
 template typename T 
 typename internal::CharPtrDetector T, OStringBuffer ::Type insert( 
sal_Int32 offset, const T str )
 {
@@ -579,6 +592,7 @@ public:
 rtl_stringbuffer_insert( pData, nCapacity, offset, literal, 
internal::ConstCharArrayDetector T, void ::size - 1 );
 return *this;
 }
+#endif
 
 /**
 Inserts the string representation of the codechar/code array
diff --git a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx 
b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
index 3f2ed84..494c1da 100644
--- a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
+++ b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
@@ -257,6 +257,7 @@ void test::ostring::StringLiterals::checkNonConstUsage()
 void test::ostring::StringLiterals::checkBuffer()
 {
 rtl::OStringBuffer buf;
+#ifndef HAVE_SFINAE_ANONYMOUS_BROKEN
 rtl_string_unittest_const_literal_function = false;
 buf.append( foo );
 CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true );
@@ -269,6 +270,9 @@ void test::ostring::StringLiterals::checkBuffer()
 buf.insert( 3, baz );
 CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true );
 CPPUNIT_ASSERT_EQUAL( buf.toString(), rtl::OString( foobazbar ));
+#else
+buf.append( foobazbar );
+#endif
 
 rtl::OString foobazbard( foobazbard );
 rtl::OString foodbazbard( foodbazbard );
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sal/qa

2012-03-28 Thread Lubos Lunak
 sal/qa/rtl/strings/test_ostring_stringliterals.cxx  |   10 +-
 sal/qa/rtl/strings/test_oustring_stringliterals.cxx |   14 +++---
 2 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit bb070c05b6e2d09b15fed673507a523c11eb2a19
Author: Luboš Luňák l.lu...@suse.cz
Date:   Wed Mar 28 23:48:17 2012 +0200

CPPUNIT_ASSERT_EQUAL() takes expected as the first argument

diff --git a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx 
b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
index 494c1da..0d5036a 100644
--- a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
+++ b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
@@ -261,15 +261,15 @@ void test::ostring::StringLiterals::checkBuffer()
 rtl_string_unittest_const_literal_function = false;
 buf.append( foo );
 CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true );
-CPPUNIT_ASSERT_EQUAL( buf.toString(), rtl::OString( foo ));
+CPPUNIT_ASSERT_EQUAL( rtl::OString( foo ), buf.toString());
 rtl_string_unittest_const_literal_function = false;
 buf.append( bar );
 CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true );
-CPPUNIT_ASSERT_EQUAL( buf.toString(), rtl::OString( foobar ));
+CPPUNIT_ASSERT_EQUAL( rtl::OString( foobar ), buf.toString());
 rtl_string_unittest_const_literal_function = false;
 buf.insert( 3, baz );
 CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true );
-CPPUNIT_ASSERT_EQUAL( buf.toString(), rtl::OString( foobazbar ));
+CPPUNIT_ASSERT_EQUAL( rtl::OString( foobazbar ), buf.toString());
 #else
 buf.append( foobazbar );
 #endif
@@ -279,8 +279,8 @@ void test::ostring::StringLiterals::checkBuffer()
 rtl_string_unittest_const_literal = false; // start checking for OString 
conversions
 rtl_string_unittest_const_literal_function = false; // and check for const 
variants
 char d[] = d;
-CPPUNIT_ASSERT_EQUAL( buf.append( d ).toString(), foobazbard );
-CPPUNIT_ASSERT_EQUAL( buf.insert( 3, d ).toString(), foodbazbard );
+CPPUNIT_ASSERT_EQUAL( foobazbard, buf.append( d ).toString());
+CPPUNIT_ASSERT_EQUAL( foodbazbard, buf.insert( 3, d ).toString() );
 CPPUNIT_ASSERT( rtl_string_unittest_const_literal == false );
 CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == false );
 }
diff --git a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx 
b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
index 2070698..6316478 100644
--- a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
+++ b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
@@ -99,10 +99,10 @@ void test::oustring::StringLiterals::checkCtors()
 
 // Check that contents are correct and equal to the case when 
RTL_CONSTASCII_USTRINGPARAM is used.
 // Also check that embedded \0 is included.
-CPPUNIT_ASSERT_EQUAL( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(  )), 
rtl::OUString(  ));
-CPPUNIT_ASSERT_EQUAL( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( \0 )), 
rtl::OUString( \0 ));
-CPPUNIT_ASSERT_EQUAL( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ab )), 
rtl::OUString( ab ));
-CPPUNIT_ASSERT_EQUAL( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( a\0b 
)), rtl::OUString( a\0b ));
+CPPUNIT_ASSERT_EQUAL( rtl::OUString(  ), rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM(  )));
+CPPUNIT_ASSERT_EQUAL( rtl::OUString( \0 ), rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( \0 )));
+CPPUNIT_ASSERT_EQUAL( rtl::OUString( ab ), rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( ab )));
+CPPUNIT_ASSERT_EQUAL( rtl::OUString( a\0b ), rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( a\0b )));
 }
 
 void test::oustring::StringLiterals::testcall( const char str[] )
@@ -175,11 +175,11 @@ void test::oustring::StringLiterals::checkBuffer()
 {
 rtl::OUStringBuffer buf;
 buf.append( foo );
-CPPUNIT_ASSERT_EQUAL( buf.toString(), rtl::OUString( foo ));
+CPPUNIT_ASSERT_EQUAL( rtl::OUString( foo ), buf.toString());
 buf.append( bar );
-CPPUNIT_ASSERT_EQUAL( buf.toString(), rtl::OUString( foobar ));
+CPPUNIT_ASSERT_EQUAL( rtl::OUString( foobar ), buf.toString());
 buf.insert( 3, baz );
-CPPUNIT_ASSERT_EQUAL( buf.toString(), rtl::OUString( foobazbar ));
+CPPUNIT_ASSERT_EQUAL( rtl::OUString( foobazbar ), buf.toString());
 char d[] = d;
 CPPUNIT_ASSERT( !VALID_CONVERSION( buf.append( d )));
 CPPUNIT_ASSERT( !VALID_CONVERSION( buf.insert( 0, d )));
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sal/inc

2012-03-28 Thread Lubos Lunak
 sal/inc/rtl/stringutils.hxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 552ba413bc95b1a14638558d9436141825100c52
Author: Luboš Luňák l.lu...@suse.cz
Date:   Thu Mar 29 00:47:41 2012 +0200

fix SFINAE detection of const char[N] for msvc

diff --git a/sal/inc/rtl/stringutils.hxx b/sal/inc/rtl/stringutils.hxx
index 55326ce..3bf72c5 100644
--- a/sal/inc/rtl/stringutils.hxx
+++ b/sal/inc/rtl/stringutils.hxx
@@ -114,6 +114,8 @@ struct ExceptConstCharArrayDetector const char[ N ] 
 };
 // this one is used to rule out only const char[N]
 // (const will be brought in by 'const T' in the function call)
+// msvc needs const char[N] here (not sure whether gcc or msvc
+// are right, it doesn't matter).
 template typename T 
 struct ExceptCharArrayDetector
 {
@@ -123,6 +125,10 @@ template int N 
 struct ExceptCharArrayDetector char[ N ] 
 {
 };
+template int N 
+struct ExceptCharArrayDetector const char[ N ] 
+{
+};
 
 } /* Namespace */
 
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sal/inc

2012-03-28 Thread Lubos Lunak
 sal/inc/rtl/stringutils.hxx |   13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

New commits:
commit dbf238ba0a76c64643a28fc3fd9d0d3ede848dd7
Author: Luboš Luňák l.lu...@suse.cz
Date:   Thu Mar 29 07:39:03 2012 +0200

(const) char[] is a plain C string type too

and it's size is not known, so it cannot be taken as a string literal

diff --git a/sal/inc/rtl/stringutils.hxx b/sal/inc/rtl/stringutils.hxx
index 3bf72c5..19c1bf4 100644
--- a/sal/inc/rtl/stringutils.hxx
+++ b/sal/inc/rtl/stringutils.hxx
@@ -50,7 +50,8 @@ namespace internal
 {
 /*
 These templates use SFINAE (Substitution failure is not an error) to help 
distinguish the various
-plain C string types: char*, const char*, char[N] and const char[N]. There are 
2 cases:
+plain C string types: char*, const char*, char[N], const char[N], char[] and 
const char[].
+There are 2 cases:
 1) Only string literal (i.e. const char[N]) is wanted, not any of the others.
 In this case it is necessary to distinguish between const char[N] and 
char[N], as the latter
 would be automatically converted to the const variant, which is not wanted 
(not a string literal
@@ -90,6 +91,16 @@ struct NonConstCharArrayDetector char[ N ], T 
 {
 typedef T Type;
 };
+template typename T 
+struct NonConstCharArrayDetector char[], T 
+{
+typedef T Type;
+};
+template typename T 
+struct NonConstCharArrayDetector const char[], T 
+{
+typedef T Type;
+};
 
 template typename T1, typename T2 
 struct ConstCharArrayDetector
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - editeng/source

2012-03-29 Thread Lubos Lunak
 editeng/source/editeng/editdoc.cxx  |6 +--
 editeng/source/editeng/editdoc.hxx  |8 ++--
 editeng/source/editeng/editdoc2.cxx |6 +--
 editeng/source/editeng/editeng.cxx  |   30 +++
 editeng/source/editeng/editundo.cxx |8 ++--
 editeng/source/editeng/eertfpar.cxx |   10 ++---
 editeng/source/editeng/impedit.cxx  |6 +--
 editeng/source/editeng/impedit2.cxx |   70 ++--
 editeng/source/editeng/impedit3.cxx |   28 +++---
 editeng/source/editeng/impedit4.cxx |   16 
 editeng/source/editeng/impedit5.cxx |   28 +++---
 11 files changed, 108 insertions(+), 108 deletions(-)

New commits:
commit 571876c1234ae55aab0198c7e2caf9049fcd230e
Author: Luboš Luňák l.lu...@suse.cz
Date:   Thu Mar 29 08:14:07 2012 +0200

SaveGetObject() is presumably meant to be safe rather than saving

diff --git a/editeng/source/editeng/editdoc.cxx 
b/editeng/source/editeng/editdoc.cxx
index 010f40f..43c64c4 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -1341,12 +1341,12 @@ static const sal_Unicode aCR[] = { 0x0d, 0x00 };
 static const sal_Unicode aLF[] = { 0x0a, 0x00 };
 static const sal_Unicode aCRLF[] = { 0x0d, 0x0a, 0x00 };
 
-const ContentNode* EditDoc::SaveGetObject(size_t nPos) const
+const ContentNode* EditDoc::SafeGetObject(size_t nPos) const
 {
 return ( nPos  Count() ) ? GetObject( nPos ) : 0;
 }
 
-ContentNode* EditDoc::SaveGetObject(size_t nPos)
+ContentNode* EditDoc::SafeGetObject(size_t nPos)
 {
 return ( nPos  Count() ) ? GetObject( nPos ) : 0;
 }
@@ -1400,7 +1400,7 @@ XubString EditDoc::GetText( LineEnd eEnd ) const
 
 XubString EditDoc::GetParaAsString( sal_uInt16 nNode ) const
 {
-return GetParaAsString( SaveGetObject( nNode ) );
+return GetParaAsString( SafeGetObject( nNode ) );
 }
 
 XubString EditDoc::GetParaAsString(
diff --git a/editeng/source/editeng/editdoc.hxx 
b/editeng/source/editeng/editdoc.hxx
index 0114c09..59010d6 100644
--- a/editeng/source/editeng/editdoc.hxx
+++ b/editeng/source/editeng/editdoc.hxx
@@ -658,8 +658,8 @@ public:
 long GetYOffset(const ParaPortion* pPPortion) const;
 sal_uInt16 FindParagraph(long nYOffset) const;
 
-const ParaPortion* SaveGetObject(size_t nPos) const;
-ParaPortion* SaveGetObject(size_t nPos);
+const ParaPortion* SafeGetObject(size_t nPos) const;
+ParaPortion* SafeGetObject(size_t nPos);
 
 sal_uInt16 GetPos(const ParaPortion* p) const;
 ParaPortion* operator[](size_t nPos);
@@ -805,8 +805,8 @@ public:
 voidFindAttribs( ContentNode* pNode, sal_uInt16 nStartPos, 
sal_uInt16 nEndPos, SfxItemSet rCurSet );
 
 sal_uInt16 GetPos( const ContentNode* pNode ) const { return 
ContentList::GetPos(pNode); }
-const ContentNode* SaveGetObject(size_t nPos) const;
-ContentNode* SaveGetObject(size_t nPos);
+const ContentNode* SafeGetObject(size_t nPos) const;
+ContentNode* SafeGetObject(size_t nPos);
 
 static XubStringGetSepStr( LineEnd eEnd );
 };
diff --git a/editeng/source/editeng/editdoc2.cxx 
b/editeng/source/editeng/editdoc2.cxx
index 474e3fa..b22c10b 100644
--- a/editeng/source/editeng/editdoc2.cxx
+++ b/editeng/source/editeng/editdoc2.cxx
@@ -460,12 +460,12 @@ sal_uInt16 ParaPortionList::FindParagraph(long nYOffset) 
const
 return EE_PARA_NOT_FOUND;
 }
 
-const ParaPortion* ParaPortionList::SaveGetObject(size_t nPos) const
+const ParaPortion* ParaPortionList::SafeGetObject(size_t nPos) const
 {
 return nPos  maPortions.size() ? maPortions[nPos] : NULL;
 }
 
-ParaPortion* ParaPortionList::SaveGetObject(size_t nPos)
+ParaPortion* ParaPortionList::SafeGetObject(size_t nPos)
 {
 return nPos  maPortions.size() ? maPortions[nPos] : NULL;
 }
@@ -476,7 +476,7 @@ void ParaPortionList::DbgCheck( EditDoc rDoc)
 DBG_ASSERT( Count() == rDoc.Count(), ParaPortionList::DbgCheck() - 
Count() unequal! );
 for ( sal_uInt16 i = 0; i  Count(); i++ )
 {
-DBG_ASSERT( SaveGetObject(i), ParaPortionList::DbgCheck() - 
Null-Pointer in List! );
+DBG_ASSERT( SafeGetObject(i), ParaPortionList::DbgCheck() - 
Null-Pointer in List! );
 DBG_ASSERT( GetObject(i)-GetNode(), ParaPortionList::DbgCheck() - 
Null-Pointer in List(2)! );
 DBG_ASSERT( GetObject(i)-GetNode() == rDoc.GetObject(i), 
ParaPortionList::DbgCheck() - Entries intersect! );
 }
diff --git a/editeng/source/editeng/editeng.cxx 
b/editeng/source/editeng/editeng.cxx
index 275a992..2b246c9 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -503,7 +503,7 @@ sal_uInt16 EditEngine::GetScriptType( const ESelection 
rSelection ) const
 LanguageType EditEngine::GetLanguage( sal_uInt16 nPara, sal_uInt16 nPos ) const
 {
 DBG_CHKTHIS( EditEngine, 0 );
-ContentNode* pNode = pImpEditEngine-GetEditDoc().SaveGetObject( nPara );
+ContentNode* pNode = pImpEditEngine-GetEditDoc().SafeGetObject( nPara );
 DBG_ASSERT( pNode, 

[Libreoffice-commits] .: editeng/inc editeng/source

2012-03-29 Thread Lubos Lunak
 editeng/inc/editeng/editview.hxx|1 +
 editeng/inc/editeng/outliner.hxx|1 +
 editeng/source/editeng/editview.cxx |   11 ---
 editeng/source/outliner/outlvw.cxx  |6 ++
 4 files changed, 16 insertions(+), 3 deletions(-)

New commits:
commit 15cb0bbd4b4c9871f6fb2d24013fb9d4fe4a2a34
Author: Luboš Luňák l.lu...@suse.cz
Date:   Thu Mar 29 09:53:19 2012 +0200

fix constness compile error

diff --git a/editeng/inc/editeng/editview.hxx b/editeng/inc/editeng/editview.hxx
index aa9864f..8e034c8 100644
--- a/editeng/inc/editeng/editview.hxx
+++ b/editeng/inc/editeng/editview.hxx
@@ -184,6 +184,7 @@ public:
 voidForceUpdate();
 
 const SfxStyleSheet* GetStyleSheet() const;
+SfxStyleSheet* GetStyleSheet();
 
 voidSetAnchorMode( EVAnchorMode eMode );
 EVAnchorModeGetAnchorMode() const;
diff --git a/editeng/inc/editeng/outliner.hxx b/editeng/inc/editeng/outliner.hxx
index ee7edec..da3b9c2 100644
--- a/editeng/inc/editeng/outliner.hxx
+++ b/editeng/inc/editeng/outliner.hxx
@@ -309,6 +309,7 @@ public:
 voidPasteSpecial();
 
 const SfxStyleSheet*  GetStyleSheet() const;
+SfxStyleSheet*  GetStyleSheet();
 
 voidSetControlWord( sal_uLong nWord );
 sal_uLong   GetControlWord() const;
diff --git a/editeng/source/editeng/editview.cxx 
b/editeng/source/editeng/editview.cxx
index 6d78cf5..36bafa0 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -730,7 +730,7 @@ void EditView::ForceUpdate()
 PIMPEE-SetUpdateMode( sal_True, this, sal_True );
 }
 
-const SfxStyleSheet* EditView::GetStyleSheet() const
+SfxStyleSheet* EditView::GetStyleSheet()
 {
 DBG_CHKTHIS( EditView, 0 );
 DBG_CHKOBJ( pImpEditView-pEditEngine, EditEngine, 0 );
@@ -741,10 +741,10 @@ const SfxStyleSheet* EditView::GetStyleSheet() const
 sal_uInt16 nStartPara = PIMPEE-GetEditDoc().GetPos( aSel.Min().GetNode() 
);
 sal_uInt16 nEndPara = PIMPEE-GetEditDoc().GetPos( aSel.Max().GetNode() );
 
-const SfxStyleSheet* pStyle = NULL;
+SfxStyleSheet* pStyle = NULL;
 for ( sal_uInt16 n = nStartPara; n = nEndPara; n++ )
 {
-const SfxStyleSheet* pTmpStyle = PIMPEE-GetStyleSheet( n );
+SfxStyleSheet* pTmpStyle = PIMPEE-GetStyleSheet( n );
 if ( ( n != nStartPara )  ( pStyle != pTmpStyle ) )
 return NULL;// Not unique.
 pStyle = pTmpStyle;
@@ -752,6 +752,11 @@ const SfxStyleSheet* EditView::GetStyleSheet() const
 return pStyle;
 }
 
+const SfxStyleSheet* EditView::GetStyleSheet() const
+{
+return const_cast EditView* ( this )-GetStyleSheet();
+}
+
 sal_Bool EditView::IsInsertMode() const
 {
 DBG_CHKTHIS( EditView, 0 );
diff --git a/editeng/source/outliner/outlvw.cxx 
b/editeng/source/outliner/outlvw.cxx
index 26f0494..23a9775 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -786,6 +786,12 @@ const SfxStyleSheet* OutlinerView::GetStyleSheet() const
 return pEditView-GetStyleSheet();
 }
 
+SfxStyleSheet* OutlinerView::GetStyleSheet()
+{
+DBG_CHKTHIS(OutlinerView,0);
+return pEditView-GetStyleSheet();
+}
+
 Pointer OutlinerView::GetPointer( const Point rPosPixel )
 {
 DBG_CHKTHIS(OutlinerView,0);
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sal/inc sal/qa sw/source

2012-03-29 Thread Lubos Lunak
 sal/inc/rtl/stringutils.hxx|9 +
 sal/qa/rtl/strings/test_ostring_stringliterals.cxx |   19 ---
 sw/source/filter/ww8/rtfexport.cxx |4 ++--
 sw/source/filter/ww8/rtfexport.hxx |4 ++--
 4 files changed, 29 insertions(+), 7 deletions(-)

New commits:
commit 8aa60b51a9e48b33ba6f0cb27132c6a415de2358
Author: Luboš Luňák l.lu...@suse.cz
Date:   Thu Mar 29 11:03:47 2012 +0200

(const) char[] (i.e. size unknown) cannot be used with O(U)String

msvc can't handle the necessary template overload (and maybe it's
right, I'm not sure)

diff --git a/sal/inc/rtl/stringutils.hxx b/sal/inc/rtl/stringutils.hxx
index 19c1bf4..3ed36a7 100644
--- a/sal/inc/rtl/stringutils.hxx
+++ b/sal/inc/rtl/stringutils.hxx
@@ -65,6 +65,12 @@ There are 2 cases:
 cast to const char*. Additionally (non-const) char[N] needs to be handled, 
but with the reference
 being const, it would also match const char[N], so another overload with a 
reference to non-const
 and NonConstCharArrayDetector are used to ensure the function is called 
only with (non-const) char[N].
+Additionally, char[] and const char[] (i.e. size unknown) are rather tricky. 
Their usage with 'T' would
+mean it would be 'char()[]', which seems to be invalid. But gcc and clang 
somehow manage when it is
+a template. while msvc complains about no conversion from char[] to char[1]. 
And the reference cannot
+be avoided, because 'const char[]' as argument type would match also 'const 
char[N]'
+So char[] and const char[] should always be used with their contents specified 
(which automatically
+turns them into char[N] or const char[N]), or char* and const char* should be 
used.
 */
 struct Dummy {};
 template typename T1, typename T2 
@@ -91,6 +97,8 @@ struct NonConstCharArrayDetector char[ N ], T 
 {
 typedef T Type;
 };
+#ifdef RTL_STRING_UNITTEST
+// never use, until all compilers handle this
 template typename T 
 struct NonConstCharArrayDetector char[], T 
 {
@@ -101,6 +109,7 @@ struct NonConstCharArrayDetector const char[], T 
 {
 typedef T Type;
 };
+#endif
 
 template typename T1, typename T2 
 struct ConstCharArrayDetector
diff --git a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx 
b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
index 0d5036a..d7e3cf5 100644
--- a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
+++ b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
@@ -66,6 +66,9 @@ private:
 
 void testcall( const char str[] );
 
+static const char bad5[];
+static char bad6[];
+
 CPPUNIT_TEST_SUITE(StringLiterals);
 CPPUNIT_TEST(checkCtors);
 CPPUNIT_TEST(checkUsage);
@@ -100,13 +103,20 @@ void test::ostring::StringLiterals::checkCtors()
 const char* bad4[] = { test1 };
 CPPUNIT_ASSERT( !CONST_CTOR_USED( bad4[ 0 ] ));
 testcall( good1 );
+#ifndef _MSC_VER
+// this is actually not supposed to work (see discussion in 
stringutils.hxx),
+// but gcc and clang somehow manage, so keep it used, just in case some 
other problem
+// shows up somewhen in the future
+CPPUNIT_ASSERT( !CONST_CTOR_USED( bad5 )); // size is not known here
+CPPUNIT_ASSERT( !CONST_CTOR_USED( bad6 ));
+#endif
 
 // This one is technically broken, since the first element is 6 characters 
test\0\0,
 // but there does not appear a way to detect this by compile time (runtime 
will complain).
 // RTL_CONSTASCII_USTRINGPARAM() has the same flaw.
-const char bad5[][ 6 ] = { test, test2 };
-CPPUNIT_ASSERT( CONST_CTOR_USED( bad5[ 0 ] ));
-CPPUNIT_ASSERT( CONST_CTOR_USED( bad5[ 1 ] ));
+const char bad7[][ 6 ] = { test, test2 };
+CPPUNIT_ASSERT( CONST_CTOR_USED( bad7[ 0 ] ));
+CPPUNIT_ASSERT( CONST_CTOR_USED( bad7[ 1 ] ));
 
 // Check that contents are correct and equal to the case when const char* ctor 
is used.
 CPPUNIT_ASSERT( rtl::OString( (const char*) ) == rtl::OString(  ));
@@ -128,6 +138,9 @@ void test::ostring::StringLiterals::checkCtors()
 #endif
 }
 
+const char test::ostring::StringLiterals::bad5[] = test;
+char test::ostring::StringLiterals::bad6[] = test;
+
 void test::ostring::StringLiterals::testcall( const char str[] )
 {
 #ifndef _MSC_VER
diff --git a/sw/source/filter/ww8/rtfexport.cxx 
b/sw/source/filter/ww8/rtfexport.cxx
index dda8b81..00b8e18 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -79,10 +79,10 @@ using rtl::OUStringBuffer;
 
 using sw::mark::IMark;
 
-#if defined(UNX)
+#if defined(UNX22)
 const sal_Char RtfExport::sNewLine = '\012';
 #else
-const sal_Char RtfExport::sNewLine[] = \015\012;
+const sal_Char* const RtfExport::sNewLine = \015\012;
 #endif
 
 // the default text encoding for the export, if it doesn't fit unicode will
diff --git a/sw/source/filter/ww8/rtfexport.hxx 
b/sw/source/filter/ww8/rtfexport.hxx
index 3759f31..9d395de 100644
--- a/sw/source/filter/ww8/rtfexport.hxx
+++ b/sw/source/filter/ww8/rtfexport.hxx
@@ 

[Libreoffice-commits] .: sw/source

2012-03-29 Thread Lubos Lunak
 sw/source/filter/ww8/rtfexport.cxx |2 +-
 sw/source/filter/ww8/rtfexport.hxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 633cbb4954a2469f3c8911fbdffcaa4340ca6ac9
Author: Luboš Luňák l.lu...@suse.cz
Date:   Thu Mar 29 11:17:20 2012 +0200

fix last commit

diff --git a/sw/source/filter/ww8/rtfexport.cxx 
b/sw/source/filter/ww8/rtfexport.cxx
index 00b8e18..93f8313 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -79,7 +79,7 @@ using rtl::OUStringBuffer;
 
 using sw::mark::IMark;
 
-#if defined(UNX22)
+#if defined(UNX)
 const sal_Char RtfExport::sNewLine = '\012';
 #else
 const sal_Char* const RtfExport::sNewLine = \015\012;
diff --git a/sw/source/filter/ww8/rtfexport.hxx 
b/sw/source/filter/ww8/rtfexport.hxx
index 9d395de..b0a45a5 100644
--- a/sw/source/filter/ww8/rtfexport.hxx
+++ b/sw/source/filter/ww8/rtfexport.hxx
@@ -155,7 +155,7 @@ public:
 /// Destructor.
 virtual ~RtfExport();
 
-#if defined(UNX22)
+#if defined(UNX)
 static const sal_Char sNewLine; // \012 or \015
 #else
 static const sal_Char* const sNewLine; // \015\012
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


  1   2   >