[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] .: sc/source

2012-03-18 Thread Julien Nabet
 sc/source/ui/unoobj/filtuno.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fa2cccb7cb334bb78bab6fd02b08021a2a94f201
Author: Julien Nabet serval2...@yahoo.fr
Date:   Sun Mar 18 10:47:43 2012 +0100

Reduce scope of nChar

diff --git a/sc/source/ui/unoobj/filtuno.cxx b/sc/source/ui/unoobj/filtuno.cxx
index 4fe9f0f..16fb7ed 100644
--- a/sc/source/ui/unoobj/filtuno.cxx
+++ b/sc/source/ui/unoobj/filtuno.cxx
@@ -82,7 +82,6 @@ SC_SIMPLE_SERVICE_INFO( ScFilterOptionsObj, 
SCFILTEROPTIONSOBJ_IMPLNAME, SCFILTE
 
 static void load_CharSet( rtl_TextEncoding nCharSet, bool bExport )
 {
-sal_Int32 nChar = 0;
 SequenceAny aValues;
 const Any *pProperties;
 SequenceOUString aNames(1);
@@ -99,6 +98,7 @@ static void load_CharSet( rtl_TextEncoding nCharSet, bool 
bExport )
 
 if( pProperties[0].hasValue() )
 {
+sal_Int32 nChar = 0;
 pProperties[0] = nChar;
 if( nChar = 0)
 {
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-03-18 Thread Julien Nabet
 sw/source/filter/ww8/ww8par.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2255d1f25f6e9bf4baac9ca5ef9668eb3c518ee4
Author: Julien Nabet serval2...@yahoo.fr
Date:   Sun Mar 18 10:56:17 2012 +0100

Simplify these 2 conditions

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 254b4c9..db0fdb5 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -2360,7 +2360,7 @@ CharSet SwWW8ImplReader::GetCurrentCharSet()
 {
 if (!maFontSrcCharSets.empty())
 eSrcCharSet = maFontSrcCharSets.top();
-if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW)  (nCharFmt != -1)  
nCharFmt = 0  (size_t)nCharFmt  vColl.size() )
+if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW)  nCharFmt = 0  
(size_t)nCharFmt  vColl.size() )
 eSrcCharSet = vColl[nCharFmt].GetCharSet();
 if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW)  
StyleExists(nAktColl)  nAktColl  vColl.size())
 eSrcCharSet = vColl[nAktColl].GetCharSet();
@@ -2422,7 +2422,7 @@ CharSet SwWW8ImplReader::GetCurrentCJKCharSet()
 eSrcCharSet = maFontSrcCJKCharSets.top();
 if (!vColl.empty())
 {
-if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW)  (nCharFmt != -1) 
 nCharFmt = 0  (size_t)nCharFmt  vColl.size() )
+if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW)  nCharFmt = 0  
(size_t)nCharFmt  vColl.size() )
 eSrcCharSet = vColl[nCharFmt].GetCJKCharSet();
 if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW  nAktColl  
vColl.size())
 eSrcCharSet = vColl[nAktColl].GetCJKCharSet();
___
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-18 Thread Matus Kukan
 solenv/gbuild/templates/makefile.mk |   41 
 solenv/inc/gbuildbridge.mk  |4 +--
 2 files changed, 3 insertions(+), 42 deletions(-)

New commits:
commit 323a936e23e27d7691eb115d3d1a696acad94d9a
Author: Matúš Kukan matus.ku...@gmail.com
Date:   Sun Mar 18 12:01:25 2012 +0100

gbuildbridge: gb_MAKETARGET is empty, gb_PARTIALBUILD defined in 
partial_build

diff --git a/solenv/gbuild/templates/makefile.mk 
b/solenv/gbuild/templates/makefile.mk
index d4cf94e..0997622 100644
--- a/solenv/gbuild/templates/makefile.mk
+++ b/solenv/gbuild/templates/makefile.mk
@@ -1,40 +1 @@
-#*
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-# 
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org.  If not, see
-# http://www.openoffice.org/license.html
-# for a copy of the LGPLv3 License.
-#
-#*
-
-PRJ=..
-TARGET=prj
-
-.INCLUDE : settings.mk
-
-.IF $(VERBOSE)!=
-VERBOSEFLAG :=
-.ELSE
-VERBOSEFLAG := -s
-.ENDIF
-
-all:
-   cd $(PRJ)  $(GNUMAKE) $(VERBOSEFLAG) -r -j$(GMAKE_MODULE_PARALLELISM) 
$(gb_MAKETARGET)  $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog
+.INCLUDE : gbuildbridge.mk
diff --git a/solenv/inc/gbuildbridge.mk b/solenv/inc/gbuildbridge.mk
index de43800..b9b1264 100644
--- a/solenv/inc/gbuildbridge.mk
+++ b/solenv/inc/gbuildbridge.mk
@@ -34,8 +34,8 @@ TARGET=prj
 all:
 .ELIF $(VERBOSE)!=
 all:
-   cd $(PRJ)  $(GNUMAKE) -r -j$(GMAKE_MODULE_PARALLELISM) 
$(gb_MAKETARGET) gb_PARTIALBUILD=T
+   cd $(PRJ)  $(GNUMAKE) -r -j$(GMAKE_MODULE_PARALLELISM)
 .ELSE
 all:
-   @cd $(PRJ)  $(GNUMAKE) -rs -j$(GMAKE_MODULE_PARALLELISM) 
$(gb_MAKETARGET) gb_PARTIALBUILD=T
+   @cd $(PRJ)  $(GNUMAKE) -rs -j$(GMAKE_MODULE_PARALLELISM)
 .END
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Branch 'libreoffice-3-5' - configure.in

2012-03-18 Thread Bjoern Michaelsen
 configure.in |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit eb1400e33049b447869234134da59afe6553ad72
Author: Tomas Chvatal tchva...@suse.cz
Date:   Sun Mar 18 12:28:44 2012 +0100

Add check for hamcrest even if it is not first in classpath.

Conflicts:

configure.in

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

diff --git a/configure.in b/configure.in
index f7ee08f..ea959e6 100644
--- a/configure.in
+++ b/configure.in
@@ -9154,8 +9154,8 @@ if test $SOLAR_JAVA !=   test $with_junit != 
no; then
 if test $? -eq 0; then
 # check if either class-path entry is available for hamcrest or
 # it's bundled
-if $JAVA_HOME/bin/jar tf $OOO_JUNIT_JAR |grep -q hamcrest || \
-$UNZIP -c $OOO_JUNIT_JAR META-INF/MANIFEST.MF |grep -q 
'Class-Path: hamcrest'; then
+if $JAVA_HOME/bin/jar tf $OOO_JUNIT_JAR |$GREP -q hamcrest || \
+$UNZIP -c $OOO_JUNIT_JAR META-INF/MANIFEST.MF |$GREP 
'Class-Path:' | $GREP -q 'hamcrest'; then
 AC_MSG_RESULT([$OOO_JUNIT_JAR])
 else
 AC_MSG_ERROR([your junit jar neither sets a classpath nor includes 
hamcrest; please
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: download

2012-03-18 Thread Robert Nagy
 download |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit bae6e3f4fe355d0018c77e68d19bc64b52fe1ba6
Author: Robert Nagy rob...@openbsd.org
Date:   Sun Mar 18 14:14:02 2012 +0100

use /usr/bin/env bash instead of /bin/bash

diff --git a/download b/download
index 89efbbe..e5aad88 100755
--- a/download
+++ b/download
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #*
 #
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
___
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 Julien Nabet
 sc/source/core/data/dpitemdata.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2b24cfe22d5d29645d2d926251c29514887fe3a9
Author: Julien Nabet serval2...@yahoo.fr
Date:   Sun Mar 18 15:38:33 2012 +0100

Fix Same expression on both sides of '=='

diff --git a/sc/source/core/data/dpitemdata.cxx 
b/sc/source/core/data/dpitemdata.cxx
index fe2c540..be4ef7e 100644
--- a/sc/source/core/data/dpitemdata.cxx
+++ b/sc/source/core/data/dpitemdata.cxx
@@ -214,7 +214,7 @@ bool ScDPItemData::IsCaseInsEqual(const ScDPItemData r) 
const
 }
 
 if (mbStringInterned  r.mbStringInterned)
-return mpString == mpString;
+return mpString == r.mpString;
 
 return ScGlobal::GetpTransliteration()-isEqual(GetString(), 
r.GetString());
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svx/source

2012-03-18 Thread Julien Nabet
 svx/source/items/algitem.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 49d7d4b3255f731ce9a8b5256da25f6a9bf53169
Author: Julien Nabet serval2...@yahoo.fr
Date:   Sun Mar 18 16:36:54 2012 +0100

Fix redundant assignment of nAngle in switch

diff --git a/svx/source/items/algitem.cxx b/svx/source/items/algitem.cxx
index ff93abb..5fa6d82 100644
--- a/svx/source/items/algitem.cxx
+++ b/svx/source/items/algitem.cxx
@@ -180,8 +180,8 @@ sal_Int32 SvxOrientationItem::GetRotation( sal_Int32 
nStdAngle ) const
 sal_Int32 nAngle = nStdAngle;
 switch( static_cast SvxCellOrientation ( GetValue() ) )
 {
-case SVX_ORIENTATION_BOTTOMTOP: nAngle = 9000;
-case SVX_ORIENTATION_TOPBOTTOM: nAngle = 27000;
+case SVX_ORIENTATION_BOTTOMTOP: nAngle = 9000;break;
+case SVX_ORIENTATION_TOPBOTTOM: nAngle = 27000;break;
 default: ; //prevent warning
 }
 return nAngle;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: writerfilter/unocomponent

2012-03-18 Thread Julien Nabet
 writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.cxx |4 
++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 0fa12e0b119ca4240b1acffd5a7958628f373af3
Author: Julien Nabet serval2...@yahoo.fr
Date:   Sun Mar 18 17:31:51 2012 +0100

Prefer prefix ++/-- operators for non-primitive types

diff --git 
a/writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.cxx 
b/writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.cxx
index a43b2ba..41b3d66 100644
--- a/writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.cxx
+++ b/writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.cxx
@@ -252,12 +252,12 @@ public:
 void dump()
 {
 printf(Destinations:\n);
-for(ScannerTestServiceTokenMap::iterator 
i=destMap.begin();i!=destMap.end();i++)
+for(ScannerTestServiceTokenMap::iterator 
i=destMap.begin();i!=destMap.end();++i)
 {
 printf(  %s\n, i-getStr());
 }
 printf(Ctrls:\n);
-for(ScannerTestServiceTokenMap::iterator 
i=ctrlMap.begin();i!=ctrlMap.end();i++)
+for(ScannerTestServiceTokenMap::iterator 
i=ctrlMap.begin();i!=ctrlMap.end();++i)
 {
 printf(  %s\n, i-getStr());
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: xmloff/source

2012-03-18 Thread Julien Nabet
 xmloff/source/chart/MultiPropertySetHandler.hxx |8 
 xmloff/source/core/RDFaImportHelper.cxx |2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 9032c7f63e28e5a9de00b3b868452581f6f5f145
Author: Julien Nabet serval2...@yahoo.fr
Date:   Sun Mar 18 17:55:24 2012 +0100

Some cppcheck cleaning

diff --git a/xmloff/source/chart/MultiPropertySetHandler.hxx 
b/xmloff/source/chart/MultiPropertySetHandler.hxx
index ab0ce3a..953e943 100644
--- a/xmloff/source/chart/MultiPropertySetHandler.hxx
+++ b/xmloff/source/chart/MultiPropertySetHandler.hxx
@@ -209,7 +209,7 @@ MultiPropertySetHandler::MultiPropertySetHandler 
(::com::sun::star::uno::Referen
 MultiPropertySetHandler::~MultiPropertySetHandler (void)
 {
 ::std::map ::rtl::OUString, PropertyWrapperBase*, 
OUStringComparison::iterator I;
-for (I=aPropertyList.begin(); I!=aPropertyList.end(); I++)
+for (I=aPropertyList.begin(); I!=aPropertyList.end(); ++I)
 delete I-second;
 }
 
@@ -220,7 +220,7 @@ sal_BoolMultiPropertySetHandler::GetProperties  (void)
 ::std::map ::rtl::OUString, PropertyWrapperBase*, 
OUStringComparison::iterator I;
 ::com::sun::star::uno::Sequence ::rtl::OUString aNameList 
(aPropertyList.size());
 int i;
-for (I=aPropertyList.begin(),i=0; I!=aPropertyList.end(); I++)
+for (I=aPropertyList.begin(),i=0; I!=aPropertyList.end(); ++I)
 aNameList[i++] = I-second-msName;
 if ( ! MultiGet(aNameList))
 if ( ! SingleGet(aNameList))
@@ -243,7 +243,7 @@ sal_BoolMultiPropertySetHandler::MultiGet   (const 
::com::sun::star::uno::Se
 int i;
 ::com::sun::star::uno::Sequence ::com::sun::star::uno::Any 
aValueList =
 xMultiSet-getPropertyValues (rNameList);
-for (I=aPropertyList.begin(),i=0; I!=aPropertyList.end(); I++)
+for (I=aPropertyList.begin(),i=0; I!=aPropertyList.end(); ++I)
 I-second-SetValue (aValueList[i++]);
 }
 catch (const ::com::sun::star::beans::UnknownPropertyException)
@@ -269,7 +269,7 @@ sal_BoolMultiPropertySetHandler::SingleGet  (const 
::com::sun::star::uno::Se
 {
 ::std::map ::rtl::OUString, PropertyWrapperBase*, 
OUStringComparison::iterator I;
 int i;
-for (I=aPropertyList.begin(),i=0; I!=aPropertyList.end(); I++)
+for (I=aPropertyList.begin(),i=0; I!=aPropertyList.end(); ++I)
 I-second-SetValue (xSingleSet-getPropertyValue 
(rNameList[i++]));
 }
 catch (const ::com::sun::star::beans::UnknownPropertyException)
diff --git a/xmloff/source/core/RDFaImportHelper.cxx 
b/xmloff/source/core/RDFaImportHelper.cxx
index 6b980d4..be466c8 100644
--- a/xmloff/source/core/RDFaImportHelper.cxx
+++ b/xmloff/source/core/RDFaImportHelper.cxx
@@ -236,7 +236,7 @@ RDFaReader::ReadCURIEs(::rtl::OUString const  i_rCURIEs) 
const
   }
 }
 while (!CURIEs.isEmpty());
-if (!vec.size())
+if (vec.empty())
 {
 OSL_TRACE( ReadCURIEs: invalid CURIEs );
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: xmloff/source

2012-03-18 Thread Julien Nabet
 xmloff/source/text/XMLRedlineExport.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b1b4f699fc47d2c40034453754d01a1bbb0a7734
Author: Julien Nabet serval2...@yahoo.fr
Date:   Sun Mar 18 17:58:35 2012 +0100

Prefer prefix ++/-- operators for non-primitive types

diff --git a/xmloff/source/text/XMLRedlineExport.cxx 
b/xmloff/source/text/XMLRedlineExport.cxx
index 007aac1..917fb95 100644
--- a/xmloff/source/text/XMLRedlineExport.cxx
+++ b/xmloff/source/text/XMLRedlineExport.cxx
@@ -177,7 +177,7 @@ void XMLRedlineExport::ExportChangesList(
 // iterate over changes list
 for( ChangesListType::iterator aIter = pChangesList-begin();
  aIter != pChangesList-end();
- aIter++ )
+ ++aIter )
 {
 ExportChangedRegion( *aIter );
 }
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: svl/source

2012-03-18 Thread Julien Nabet
 svl/source/numbers/zformat.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c8ef98c5ad22ba585a28d81360e15fe2dcefc3ad
Author: Julien Nabet serval2...@yahoo.fr
Date:   Sun Mar 18 18:30:07 2012 +0100

Add parenthesis for avoid false report by cppcheck

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 0aed979..aa7a243 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -3840,7 +3840,7 @@ bool SvNumberformat::ImpGetNumberOutput(double fNumber,
 nPrecExp = 0;
 if (rInfo.nCntPost)// NachkommaStellen
 {
-if (rInfo.nCntPost + nPrecExp  15  nPrecExp  15)
+if ((rInfo.nCntPost + nPrecExp)  15  nPrecExp  15)
 {
 sStr = ::rtl::math::doubleToUString( fNumber,
 rtl_math_StringFormat_F, 15-nPrecExp, '.');
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 3 commits - sc/qa sc/source

2012-03-18 Thread Markus Mohrhard
 sc/qa/unoapi/sc.sce   |4 ++--
 sc/source/filter/xml/xmldrani.cxx |   10 +++---
 sc/source/filter/xml/xmldrani.hxx |2 ++
 sc/source/ui/app/transobj.cxx |   15 ++-
 4 files changed, 25 insertions(+), 6 deletions(-)

New commits:
commit 0ee518863337fba9bce019e05e24f527617a4321
Author: Markus Mohrhard markus.mohrh...@googlemail.com
Date:   Sun Mar 18 18:34:51 2012 +0100

also shrink used area for HTML in some cases, fdo#46230, n#677811

Hopefully this will allow pasting to external applications with whole
column/row selected while not affecting calc itself.

diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index b52ca6f..cb1fa54 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -310,7 +310,20 @@ sal_Bool ScTransferObj::GetData( const 
datatransfer::DataFlavor rFlavor )
 
 sal_Bool bIncludeFiltered = pDoc-IsCutMode() || bUsedForLink;
 
-ScImportExport aObj( pDoc, aBlock );
+ScRange aReducedBlock = aBlock;
+if ( nFormat == SOT_FORMATSTR_ID_HTML  (aBlock.aEnd.Col() == 
MAXCOL || aBlock.aEnd.Row() == MAXROW)  aBlock.aStart.Tab() == 
aBlock.aEnd.Tab() )
+{
+bool bShrunk = false;
+//shrink the area to allow pasting to external applications
+SCCOL aStartCol = aReducedBlock.aStart.Col();
+SCROW aStartRow = aReducedBlock.aStart.Row();
+SCCOL aEndCol = aReducedBlock.aEnd.Col();
+SCROW aEndRow = aReducedBlock.aEnd.Row();
+pDoc-ShrinkToUsedDataArea( bShrunk, 
aReducedBlock.aStart.Tab(), aStartCol, aStartRow, aEndCol, aEndRow, false);
+aReducedBlock = ScRange(aStartCol, aStartRow, 
aReducedBlock.aStart.Tab(), aEndCol, aEndRow, aReducedBlock.aEnd.Tab());
+}
+
+ScImportExport aObj( pDoc, aReducedBlock );
 ScExportTextOptions aTextOptions(ScExportTextOptions::None, 0, 
true);
 if ( bUsedForLink )
 {
commit 90d84c6dcb48886f697b7b29f9673f782994ae95
Author: Markus Mohrhard markus.mohrh...@googlemail.com
Date:   Sun Mar 18 18:01:50 2012 +0100

disable two slow java based subsequenttests, fdo#45337

These two tests are not well designed and need 5 and 10 minute just to
check that we really return every row. This is not a good trade-off
between test coverage and execution time.

Enable them again with a better concept.

diff --git a/sc/qa/unoapi/sc.sce b/sc/qa/unoapi/sc.sce
index 28b2cf7..4d6b1d4 100644
--- a/sc/qa/unoapi/sc.sce
+++ b/sc/qa/unoapi/sc.sce
@@ -13,7 +13,7 @@
 -o sc.ScAccessiblePreviewCell
 -o sc.ScAccessiblePreviewHeaderCell
 -o sc.ScAccessiblePreviewTable
--o sc.ScAccessibleSpreadsheet
+# fdo#45337 -o sc.ScAccessibleSpreadsheet
 -o sc.ScAnnotationObj
 -o sc.ScAnnotationShapeObj
 -o sc.ScAnnotationsObj
@@ -80,7 +80,7 @@
 -o sc.ScIndexEnumeration_TableChartsEnumeration
 -o sc.ScIndexEnumeration_TableColumnsEnumeration
 -o sc.ScIndexEnumeration_TableConditionalEntryEnumeration
--o sc.ScIndexEnumeration_TableRowsEnumeration
+# fdo#45337 -o sc.ScIndexEnumeration_TableRowsEnumeration
 -o sc.ScIndexEnumeration_TextFieldEnumeration
 -o sc.ScLabelRangeObj
 -o sc.ScLabelRangesObj
commit ed88b144ce24b9a733d4a9ab6614307c96537baa
Author: Markus Mohrhard markus.mohrh...@googlemail.com
Date:   Sun Mar 18 17:44:00 2012 +0100

add all imported properties to ScDBData, fdo#40426

diff --git a/sc/source/filter/xml/xmldrani.cxx 
b/sc/source/filter/xml/xmldrani.cxx
index 3ac0fe2..37c4471 100644
--- a/sc/source/filter/xml/xmldrani.cxx
+++ b/sc/source/filter/xml/xmldrani.cxx
@@ -148,6 +148,8 @@ ScXMLDatabaseRangeContext::ScXMLDatabaseRangeContext( 
ScXMLImport rImport,
 bSubTotalsEnabledUserList(false),
 bSubTotalsAscending(true),
 bFilterConditionSourceRange(false),
+bHasHeader(true),
+bByRow(false),
 meRangeType(ScDBCollection::GlobalNamed)
 {
 nSourceType = sheet::DataImportMode_NONE;
@@ -190,12 +192,14 @@ ScXMLDatabaseRangeContext::ScXMLDatabaseRangeContext( 
ScXMLImport rImport,
 break;
 case XML_TOK_DATABASE_RANGE_ATTR_ORIENTATION :
 {
-mpQueryParam-bByRow = !IsXMLToken(sValue, XML_COLUMN);
+bByRow = !IsXMLToken(sValue, XML_COLUMN);
+mpQueryParam-bByRow = bByRow;
 }
 break;
 case XML_TOK_DATABASE_RANGE_ATTR_CONTAINS_HEADER :
 {
-mpQueryParam-bHasHeader = IsXMLToken(sValue, XML_TRUE);
+bHasHeader = IsXMLToken(sValue, XML_TRUE);
+mpQueryParam-bHasHeader = bHasHeader;
 }
 break;
 case XML_TOK_DATABASE_RANGE_ATTR_DISPLAY_FILTER_BUTTONS :
@@ -303,7 +307,7 @@ ScDBData* ScXMLDatabaseRangeContext::ConvertToDBData(const 
OUString rName)
 
 SAL_WNODEPRECATED_DECLARATIONS_PUSH
 ::std::auto_ptrScDBData pData(
- 

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

2012-03-18 Thread Markus Mohrhard
 sc/qa/unit/data/ods/bug-fixes.ods  |binary
 sc/qa/unit/subsequent_filters-test.cxx |   21 ++---
 sc/source/ui/app/transobj.cxx  |   26 +-
 3 files changed, 31 insertions(+), 16 deletions(-)

New commits:
commit d58421c2cc5199e9892627b894eaab64265c82e7
Author: Markus Mohrhard markus.mohrh...@googlemail.com
Date:   Sun Mar 18 19:20:06 2012 +0100

add test case for fdo#40426

diff --git a/sc/qa/unit/data/ods/bug-fixes.ods 
b/sc/qa/unit/data/ods/bug-fixes.ods
index 6864235..b7c0539 100644
Binary files a/sc/qa/unit/data/ods/bug-fixes.ods and 
b/sc/qa/unit/data/ods/bug-fixes.ods differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx 
b/sc/qa/unit/subsequent_filters-test.cxx
index f5f1eaf..4aac0fc 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -41,6 +41,7 @@
 
 #include editeng/brshitem.hxx
 #include editeng/justifyitem.hxx
+#include dbdata.hxx
 
 #define CALC_DEBUG_OUTPUT 0
 #define TEST_BUG_FILES 0
@@ -483,9 +484,23 @@ void ScFiltersTest::testBugFixesODS()
 CPPUNIT_ASSERT_MESSAGE(Failed to load bugFixes.ods, xDocSh.Is());
 ScDocument* pDoc = xDocSh-GetDocument();
 
-rtl::OUString aCSVFileName;
-
createCSVPath(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(bugFix_Sheet2.)), 
aCSVFileName);
-testFile(aCSVFileName, pDoc, 1);
+{
+// fdo
+rtl::OUString aCSVFileName;
+
createCSVPath(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(bugFix_Sheet2.)), 
aCSVFileName);
+testFile(aCSVFileName, pDoc, 1);
+}
+
+{
+// fdo#40426
+ScDBData* pDBData = 
pDoc-GetDBCollection()-getNamedDBs().findByName(DBRange1);
+CPPUNIT_ASSERT(pDBData);
+CPPUNIT_ASSERT(pDBData-HasHeader());
+// no header
+pDBData = 
pDoc-GetDBCollection()-getNamedDBs().findByName(DBRange2);
+CPPUNIT_ASSERT(pDBData);
+CPPUNIT_ASSERT(!pDBData-HasHeader());
+}
 
 xDocSh-DoClose();
 }
commit 521456068d8a848e4e5a358b1ff7e8659c94a353
Author: Markus Mohrhard markus.mohrh...@googlemail.com
Date:   Sun Mar 18 19:19:43 2012 +0100

some sal_Bool to bool in transobj.cxx

diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index cb1fa54..dbcfc54 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -150,7 +150,7 @@ ScTransferObj::ScTransferObj( ScDocument* pClipDoc, const 
TransferableObjectDesc
 SCCOL nCol2;
 SCROW nRow2;
 pDoc-GetClipStart( nCol1, nRow1 );
-pDoc-GetClipArea( nCol2, nRow2, sal_True );// real source area - 
include filtered rows
+pDoc-GetClipArea( nCol2, nRow2, true );// real source area - include 
filtered rows
 nCol2 = sal::static_int_castSCCOL( nCol2 + nCol1 );
 nRow2 = sal::static_int_castSCROW( nRow2 + nRow1 );
 
@@ -161,7 +161,7 @@ ScTransferObj::ScTransferObj( ScDocument* pClipDoc, const 
TransferableObjectDesc
 
 SCTAB nTab1=0;
 SCTAB nTab2=0;
-sal_Bool bFirst = sal_True;
+bool bFirst = true;
 for (SCTAB i=0; i pDoc-GetTableCount(); i++)
 if (pDoc-HasTable(i))
 {
@@ -260,7 +260,7 @@ void ScTransferObj::AddSupportedFormats()
 sal_Bool ScTransferObj::GetData( const datatransfer::DataFlavor rFlavor )
 {
 sal_uInt32  nFormat = SotExchange::GetFormat( rFlavor );
-sal_BoolbOK = false;
+boolbOK = false;
 
 if( HasFormat( nFormat ) )
 {
@@ -308,7 +308,7 @@ sal_Bool ScTransferObj::GetData( const 
datatransfer::DataFlavor rFlavor )
 if ( nFormat == SOT_FORMATSTR_ID_LINK )
 bUsedForLink = true;
 
-sal_Bool bIncludeFiltered = pDoc-IsCutMode() || bUsedForLink;
+bool bIncludeFiltered = pDoc-IsCutMode() || bUsedForLink;
 
 ScRange aReducedBlock = aBlock;
 if ( nFormat == SOT_FORMATSTR_ID_HTML  (aBlock.aEnd.Col() == 
MAXCOL || aBlock.aEnd.Row() == MAXROW)  aBlock.aStart.Tab() == 
aBlock.aEnd.Tab() )
@@ -481,7 +481,7 @@ sal_Bool ScTransferObj::WriteObject( SotStorageStreamRef 
rxOStm, void* pUserObj
 delete pSrcStm;
 }
 
-bRet = sal_True;
+bRet = true;
 
 xWorkStore-dispose();
 xWorkStore = uno::Reference  embed::XStorage ();
@@ -558,7 +558,7 @@ void ScTransferObj::SetDragSourceFlags( sal_uInt16 nFlags )
 
 void ScTransferObj::SetDragWasInternal()
 {
-bDragWasInternal = sal_True;
+bDragWasInternal = true;
 }
 
 void ScTransferObj::SetUseInApi( bool bSet )
@@ -610,7 +610,7 @@ void ScTransferObj::InitDocShell()
 
 ScDocument* pDestDoc = pDocSh-GetDocument();
 ScMarkData aDestMark;
-aDestMark.SelectTable( 0, sal_True );
+aDestMark.SelectTable( 0, true );
 
 pDestDoc-SetDocOptions( pDoc-GetDocOptions() );   // #i42666#
 
@@ -663,16 +663,16 @@ void ScTransferObj::InitDocShell()
 //  pDoc is always a Clipboard-document
 
 ScRange aDestRange( 

[Libreoffice-commits] .: i18npool/source

2012-03-18 Thread Eike Rathke
 i18npool/source/localedata/data/zh_TW.xml |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c7b319d2f1f1daef509cd1ac53035294b39a6299
Author: Cheng-Chia Tseng pswo10...@gmail.com
Date:   Sun Mar 18 19:50:13 2012 +0100

resolved fdo#46947 duplicated date format [zh-TW]

Use GG era abbreviation in one format instead of full GGG.

diff --git a/i18npool/source/localedata/data/zh_TW.xml 
b/i18npool/source/localedata/data/zh_TW.xml
index 15681f0..bd8c0c6 100644
--- a/i18npool/source/localedata/data/zh_TW.xml
+++ b/i18npool/source/localedata/data/zh_TW.xml
@@ -112,7 +112,7 @@
   FormatCode年M月D日/FormatCode
 /FormatElement
 FormatElement msgid=DateFormatskey7 default=false type=medium 
usage=DATE formatindex=24
-  FormatCodeGGGEE年M月D日/FormatCode
+  FormatCodeGGEE年M月D日/FormatCode
 /FormatElement
 FormatElement msgid=DateFormatskey8 default=false type=long 
usage=DATE formatindex=25
   FormatCodeGGGEE年M月D日/FormatCode
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: sw/source

2012-03-18 Thread Norbert Thiebaud
 sw/source/filter/ww8/WW8TableInfo.cxx |8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 0184afc2738ed506f3848723ef1ac0c86822957b
Author: Arnaud Versini arnaud.vers...@gmail.com
Date:   Sun Mar 18 19:59:55 2012 +0100

Check iterator end WW8TableCellGrid

diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx 
b/sw/source/filter/ww8/WW8TableInfo.cxx
index 6171430..72993ba 100644
--- a/sw/source/filter/ww8/WW8TableInfo.cxx
+++ b/sw/source/filter/ww8/WW8TableInfo.cxx
@@ -1171,9 +1171,11 @@ void WW8TableCellGrid::addShadowCells()
 }
 
 ++aCellIt;
-
-bBeginningOfCell = (aRect.Left() != aCellIt-left());
-aRect = aCellIt-getRect();
+if (aCellIt != aCellEndIt)
+{
+bBeginningOfCell = (aRect.Left() != aCellIt-left());
+aRect = aCellIt-getRect();
+}
 }
 
 WW8TableCellGridRow::Pointer_t pRow = getRow(*aTopsIt);
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: Repository.mk

2012-03-18 Thread Matus Kukan
 Repository.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 46dbbe4bc1d53f1e38fc7c407f6d5b5ebb2ae708
Author: Matúš Kukan matus.ku...@gmail.com
Date:   Mon Mar 19 00:08:01 2012 +0100

emser belongs to OOOLIBS

diff --git a/Repository.mk b/Repository.mk
index 6f1b12c..8e9b6d9 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -205,6 +205,7 @@ $(eval $(call gb_Helper_register_libraries,OOOLIBS, \
 editeng \
 egi \
 eme \
+emser \
 epb \
 epg \
 epp \
@@ -408,7 +409,6 @@ ifeq ($(OS),WNT)
 $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
 dnd \
 dtrans \
-emser \
 fop \
 fps \
 ftransl \
___
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 Rafael Dominguez
 sc/source/ui/inc/ScDevChart.hxx |   87 
 1 file changed, 87 deletions(-)

New commits:
commit 4e43ad788b308a6ce8369b8e061cda6d5f7523de
Author: Rafael Dominguez venccsra...@gmail.com
Date:   Sun Mar 18 16:34:23 2012 +

Remove deprecated class DevChartConfigItem.

diff --git a/sc/source/ui/inc/ScDevChart.hxx b/sc/source/ui/inc/ScDevChart.hxx
deleted file mode 100644
index 5f60bce..000
--- a/sc/source/ui/inc/ScDevChart.hxx
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * http://www.openoffice.org/license.html
- * for a copy of the LGPLv3 License.
- *
- /
-#ifndef INCLUDED_DEVCHARTCONFIG_HXX
-#define INCLUDED_DEVCHARTCONFIG_HXX
-
-#include unotools/configitem.hxx
-
-namespace ScDevChart
-{
-
-class DevChartConfigItem : public ::utl::ConfigItem
-{
-public:
-DevChartConfigItem() :
-ConfigItem( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
Office.Common/Internal )),
-CONFIG_MODE_IMMEDIATE_UPDATE )
-{}
-
-bool UseDevelopmentChart();
-};
-
-bool DevChartConfigItem::UseDevelopmentChart()
-{
-bool bResult = false;
-
-::com::sun::star::uno::Sequence ::rtl::OUString  aNames( 1 );
-aNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( 
DevelopmentChart ));
-
-::com::sun::star::uno::Sequence ::com::sun::star::uno::Any  aResult( 
GetProperties( aNames ));
-
-OSL_ASSERT( aResult.getLength());
-aResult[0] = bResult;
-
-return bResult;
-}
-
-/** States whether the new chart implementation or the old one should be used.
-If TRUE/ is returned the newly developed chart (chart2) should be used.
-If FALSE/ is returned, the old chart (sch) should be used.
-
-Config-Item: Office.Common/Internal:DevelopmentChart
-
-This function (the complete header) is only for a transitional period.  It
-will be deprecated after the new chart is definitely integrated into the
-product.
- */
-bool UseDevChart()
-{
-// static DevChartConfigItem aCfgItem;
-// return aCfgItem.UseDevelopmentChart();
-
-// ignore configuration
-//@todo: get rid of this class
-return true;
-}
-
-} // namespace ScDevChart
-
-// INCLUDED_DEVCHARTCONFIG_HXX
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - sc/inc test/source

2012-03-18 Thread Markus Mohrhard
 sc/inc/clipdata.hxx  |3 +++
 test/source/sheet/xdatabaserange.cxx |2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit fc95d20500997a1a460be6f3553727299a5080eb
Author: Markus Mohrhard markus.mohrh...@googlemail.com
Date:   Mon Mar 19 05:30:07 2012 +0100

adjust test for the correct dbdata import

diff --git a/test/source/sheet/xdatabaserange.cxx 
b/test/source/sheet/xdatabaserange.cxx
index 486f09f..381e892 100644
--- a/test/source/sheet/xdatabaserange.cxx
+++ b/test/source/sheet/xdatabaserange.cxx
@@ -93,7 +93,7 @@ void XDatabaseRange::testGetSortDescriptor()
 {
 sal_Bool bIsSortColumns = true;
 xProp.Value = bIsSortColumns;
-CPPUNIT_ASSERT(bIsSortColumns == false);
+CPPUNIT_ASSERT(bIsSortColumns == true);
 }
 else if (xProp.Name == 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ContainsHeader)))
 {
commit 97c06429b8b45b9ed69f365339be4317e5ce5905
Author: Markus Mohrhard markus.mohrh...@googlemail.com
Date:   Mon Mar 19 05:28:21 2012 +0100

add missing forward declarations

diff --git a/sc/inc/clipdata.hxx b/sc/inc/clipdata.hxx
index 2e8567a..4d4be6a 100644
--- a/sc/inc/clipdata.hxx
+++ b/sc/inc/clipdata.hxx
@@ -29,6 +29,9 @@
 #ifndef __SC_CLIPDATA_HXX__
 #define __SC_CLIPDATA_HXX__
 
+class ScTransferObj;
+class ScDrawTransferObj;
+
 struct ScClipData
 {
 ScTransferObj*  pCellClipboard;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits