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

2012-12-01 Thread Libreoffice Gerrit user
 sal/qa/rtl/strings/test_ostring_stringliterals.cxx  |2 --
 sal/qa/rtl/strings/test_oustring_stringliterals.cxx |2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 214bfee28551ca6aaa9e70f2b2838faf536f06d9
Author: Luboš Luňák l.lu...@suse.cz
Date:   Sat Dec 1 09:00:12 2012 +0100

unused variables

Change-Id: Ia8b2ac25d3949508b132d1b0b05e5384633d935f

diff --git a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx 
b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
index 877c45e..8a78b89 100644
--- a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
+++ b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
@@ -165,7 +165,6 @@ void test::ostring::StringLiterals::checkUsage()
 rtl::OString FooBaRfoo( FooBaRfoo );
 rtl::OString FooBaR( FooBaR );
 rtl::OString bar( bar );
-rtl::OString test( test );
 
 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
@@ -232,7 +231,6 @@ void test::ostring::StringLiterals::checkNonConstUsage()
 rtl::OString FooBaRfoo( FooBaRfoo );
 rtl::OString FooBaR( FooBaR );
 rtl::OString bar( bar );
-rtl::OString test( test );
 char foo_c[] = foo;
 char bar_c[] = bar;
 char fOo_c[] = fOo;
commit 0222bdb752fef6363c5118efdf30b59817f4445e
Author: Luboš Luňák l.lu...@suse.cz
Date:   Sat Dec 1 08:58:08 2012 +0100

but back a unittest check about invalid char[] - OUString(Buffer) 
conversion

It's invalid, so the additional ambiguity here doesn't matter, but I'd
still prefer to check that it remains invalid.

Change-Id: Ie05d393ad7f51738383bb98b911938506abd64fc

diff --git a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx 
b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
index 09b55c6..8d82543 100644
--- a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
+++ b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
@@ -181,6 +181,8 @@ void test::oustring::StringLiterals::checkBuffer()
 buf.insert( 3, baz );
 CPPUNIT_ASSERT_EQUAL( rtl::OUString( foobazbar ), buf.toString());
 char d[] = d;
+CPPUNIT_ASSERT( !VALID_CONVERSION( buf.append( rtl::OUString( d ;
+CPPUNIT_ASSERT( !VALID_CONVERSION( buf.append( rtl::OUStringBuffer( d ;
 CPPUNIT_ASSERT( !VALID_CONVERSION( buf.insert( 0, d )));
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 2 commits - sal/qa vcl/generic vcl/source

2012-09-07 Thread Libreoffice Gerrit user
 sal/qa/rtl/strings/test_oustring_startswith.cxx |   37 +++-
 vcl/generic/fontmanager/fontmanager.cxx |3 -
 vcl/source/app/svmain.cxx   |5 +++
 3 files changed, 11 insertions(+), 34 deletions(-)

New commits:
commit 63a4eac4269910d577b9fae7f48d3bd946d08a1f
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Sep 7 17:34:28 2012 +0200

move temporary font cleaning to a place that is run on all platforms

Change-Id: Idc647684772b53d36a364afd91d9695210545e19

diff --git a/vcl/generic/fontmanager/fontmanager.cxx 
b/vcl/generic/fontmanager/fontmanager.cxx
index 209970d..0fd8d28 100644
--- a/vcl/generic/fontmanager/fontmanager.cxx
+++ b/vcl/generic/fontmanager/fontmanager.cxx
@@ -1035,7 +1035,6 @@ PrintFontManager::~PrintFontManager()
 delete m_pAtoms;
 if( m_pFontCache )
 delete m_pFontCache;
-TemporaryFonts::clear();
 }
 
 // -
@@ -1662,8 +1661,6 @@ void PrintFontManager::initialize()
 CALLGRIND_ZERO_STATS();
 #endif
 
-TemporaryFonts::clear();
-
 long aDirEntBuffer[ (sizeof(struct dirent)+_PC_NAME_MAX)+1 ];
 
 if( ! m_pFontCache )
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index 0bcdb64..fe895a5 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -49,6 +49,7 @@
 #include vcl/unowrap.hxx
 #include vcl/configsettings.hxx
 #include vcl/lazydelete.hxx
+#include vcl/temporaryfonts.hxx
 
 #ifdef WNT
 #include svsys.h
@@ -257,6 +258,8 @@ sal_Bool InitVCL( const ::com::sun::star::uno::Reference 
::com::sun::star::lang
 if( pExceptionHandler != NULL )
 return sal_False;
 
+TemporaryFonts::clear();
+
 if( ! ImplGetSVData() )
 ImplInitSVData();
 
@@ -594,6 +597,8 @@ void DeInitVCL()
 delete pOwnSvApp;
 pOwnSvApp = NULL;
 }
+
+TemporaryFonts::clear();
 }
 
 // only one call is allowed
commit ff97ebe1cac06fe6887854b1daa6dbf23b968cd2
Author: Luboš Luňák l.lu...@suse.cz
Date:   Fri Sep 7 16:29:44 2012 +0200

use new file header, this is actually a new file

Change-Id: If12e05b0d46fbbd815b9af5dc9551e2f07d859be

diff --git a/sal/qa/rtl/strings/test_oustring_startswith.cxx 
b/sal/qa/rtl/strings/test_oustring_startswith.cxx
index a16a244..fc4a414 100644
--- a/sal/qa/rtl/strings/test_oustring_startswith.cxx
+++ b/sal/qa/rtl/strings/test_oustring_startswith.cxx
@@ -1,41 +1,16 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
+/*
+ * This file is part of the LibreOffice project.
  *
- * 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.
- *
- /
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
 
 #include sal/types.h
 #include cppunit/TestFixture.h
 #include cppunit/extensions/HelperMacros.h
-#include rtl/strbuf.hxx
-#include rtl/string.h
-#include rtl/string.hxx
-#include rtl/textenc.h
 #include rtl/ustring.hxx
-#include sal/types.h
-#include sal/macros.h
 
 namespace test { namespace oustring {
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2012-04-02 Thread Lubos Lunak
 sal/qa/osl/security/osl_Security.cxx |   94 +--
 sal/qa/osl/security/osl_Security_Const.h |   19 --
 2 files changed, 55 insertions(+), 58 deletions(-)

New commits:
commit a7eb227cfcd783ffdccdcec9b56451fb54c26eb6
Author: Luboš Luňák l.lu...@suse.cz
Date:   Mon Apr 2 18:59:53 2012 +0200

fix crude command line arguments handling

diff --git a/sal/qa/osl/security/osl_Security.cxx 
b/sal/qa/osl/security/osl_Security.cxx
index 223c5f9..92b9fe4 100644
--- a/sal/qa/osl/security/osl_Security.cxx
+++ b/sal/qa/osl/security/osl_Security.cxx
@@ -38,6 +38,7 @@
 #endif
 #include osl_Security_Const.h
 #include osl/thread.h
+#include rtl/process.h
 #include rtl/strbuf.hxx
 
 using namespace osl;
@@ -353,7 +354,7 @@ class MyTestPlugInImpl: public 
CPPUNIT_NS::TestPlugInDefaultImpl
 
 
 void MyTestPlugInImpl::initialize( CPPUNIT_NS::TestFactoryRegistry *,
-   const CPPUNIT_NS::PlugInParameters  parameters)
+   const CPPUNIT_NS::PlugInParameters  )
 {
 /// start message
 t_print(#Initializing ...\n );
@@ -633,44 +634,53 @@ void MyTestPlugInImpl::initialize( 
CPPUNIT_NS::TestFactoryRegistry *,
 t_print(Administrator.\n );
 
 /// get and display forwarded text if available.
-aStringForward = ::rtl::OUString::createFromAscii( 
parameters.getCommandLine().c_str() );
-if ( !aStringForward.isEmpty()  aStringForward.indexOf( (sal_Unicode)' ' 
) != -1 )
+rtl::OUString args[ 3 ];
+int argsCount = 0;
+sal_uInt32 n = rtl_getAppCommandArgCount();
+// skip first, that's the module name
+for (sal_uInt32 i = 1; i  n; ++i)
 {
-sal_Int32 nFirstSpacePoint = aStringForward.indexOf( (sal_Unicode)' ' 
);;
-sal_Int32 nLastSpacePoint = aStringForward.lastIndexOf( (sal_Unicode)' 
' );;
-if ( nFirstSpacePoint == nLastSpacePoint )
-/// only forwarded two parameters, username and password.
+rtl::OUString arg;
+rtl_getAppCommandArg(i, arg.pData);
+if( !arg.isEmpty()  arg[ 0 ] == '-' )
+continue;
+if( argsCount = 3 )
 {
-aLogonUser = aStringForward.copy( 0, nFirstSpacePoint );
-t_print(\n#Forwarded username: );
-printUString( aLogonUser);
-
-aLogonPasswd = aStringForward.copy( nFirstSpacePoint +1, 
aStringForward.getLength( ) - 1 );
-t_print(#Forwarded password: );
-for (int i = nFirstSpacePoint+1; i = 
aStringForward.getLength()-1; ++i)
-t_print(*);
-t_print(\n );
-}
-else
-/// forwarded three parameters, username, password and fileserver.
-{
-aLogonUser = aStringForward.copy( 0, nFirstSpacePoint );
-t_print(#Forwarded username: );
-printUString( aLogonUser);
-
-aLogonPasswd = aStringForward.copy( nFirstSpacePoint +1, 
nLastSpacePoint );
-t_print(#Forwarded password: );
-for (int i = nFirstSpacePoint+1; i = nLastSpacePoint; ++i)
-t_print(*);
-t_print(\n );
-
-aFileServer = aStringForward.copy( nLastSpacePoint +1, 
aStringForward.getLength( ) - 1 );
-t_print(#Forwarded FileServer: );
-printUString( aFileServer );
-
+SAL_WARN( sal, Too many test arguments );
+continue;
 }
+args[ argsCount++ ] = arg;
+}
+/// only forwarded two parameters, username and password.
+if( argsCount == 2 )
+{
+aLogonUser = args[ 0 ];
+t_print(\n#Forwarded username: );
+printUString( aLogonUser);
+
+aLogonPasswd = args[ 1 ];
+t_print(#Forwarded password: );
+for (int i = 0; i  aLogonPasswd.getLength(); ++i)
+t_print(*);
+t_print(\n );
+}
+else if( argsCount == 3 )
+/// forwarded three parameters, username, password and fileserver.
+{
+aLogonUser = args[ 0 ];
+t_print(#Forwarded username: );
+printUString( aLogonUser);
+
+aLogonPasswd = args[ 1 ];
+t_print(#Forwarded password: );
+for (int i = 0; i  aLogonPasswd.getLength(); ++i)
+t_print(*);
+t_print(\n );
+
+aFileServer = args[ 2 ];
+t_print(#Forwarded FileServer: );
+printUString( aFileServer );
 }
-
 t_print(#\n#Initialization Done.\n );
 
 }
commit 174a1d3c3da7457884a2f79016e8a9375fd5297e
Author: Luboš Luňák l.lu...@suse.cz
Date:   Mon Apr 2 18:41:12 2012 +0200

fix very ... uhm ... inventive and confusing use of empty string

diff --git a/sal/qa/osl/security/osl_Security.cxx 
b/sal/qa/osl/security/osl_Security.cxx
index 4a0a1a9..223c5f9 100644
--- a/sal/qa/osl/security/osl_Security.cxx
+++ b/sal/qa/osl/security/osl_Security.cxx
@@ -129,12 +129,12 @@ namespace osl_Security
 
 
 SAL_CPPUNIT_TEST_SUITE( logonUser );
-if  ( !aStringForward.equals( aNullUrl )   aStringForward.indexOf( 

[Libreoffice-commits] .: 2 commits - sal/qa sal/rtl sal/test sw/qa sw/source

2012-03-23 Thread Takeshi Abe
 sal/qa/rtl_strings/rtl_OUString.cxx |1 -
 sal/rtl/source/logfile.cxx  |1 -
 sal/rtl/source/random.cxx   |1 -
 sal/rtl/source/uri.cxx  |3 ---
 sal/test/unloading/unloadTest.cxx   |1 -
 sw/qa/extras/regression-test.cxx|2 --
 sw/source/core/text/itrtxt.cxx  |1 -
 sw/source/core/undo/undraw.cxx  |1 -
 sw/source/filter/ww8/wrtw8esh.cxx   |1 -
 sw/source/filter/ww8/wrtw8nds.cxx   |4 
 sw/source/filter/ww8/ww8par.cxx |1 -
 sw/source/ui/uiview/viewling.cxx|2 --
 sw/source/ui/wrtsh/wrtundo.cxx  |1 -
 13 files changed, 20 deletions(-)

New commits:
commit 9e890ae00e508addaf453d9c12a7a8cae4cca149
Author: Takeshi Abe t...@fixedpoint.jp
Date:   Fri Mar 23 22:09:57 2012 +0900

removed duplicate includes in sw

diff --git a/sw/qa/extras/regression-test.cxx b/sw/qa/extras/regression-test.cxx
index f8ce49b..589f12b 100644
--- a/sw/qa/extras/regression-test.cxx
+++ b/sw/qa/extras/regression-test.cxx
@@ -39,12 +39,10 @@
 #include sfx2/sfxmodelfactory.hxx
 #include svl/stritem.hxx
 
-#include test/bootstrapfixture.hxx
 #include rtl/strbuf.hxx
 #include osl/file.hxx
 
 #include com/sun/star/frame/XDesktop.hpp
-#include com/sun/star/lang/XComponent.hpp
 
 #include string
 #include iostream
diff --git a/sw/source/core/text/itrtxt.cxx b/sw/source/core/text/itrtxt.cxx
index c7b93e5..650ec25 100644
--- a/sw/source/core/text/itrtxt.cxx
+++ b/sw/source/core/text/itrtxt.cxx
@@ -43,7 +43,6 @@
 #include itrtxt.hxx
 #include txtfrm.hxx
 #include porfly.hxx
-#include txtfrm.hxx
 
 /*
  *  SwTxtIter::CtorInitTxtIter()
diff --git a/sw/source/core/undo/undraw.cxx b/sw/source/core/undo/undraw.cxx
index 0e5bf31..4741046 100644
--- a/sw/source/core/undo/undraw.cxx
+++ b/sw/source/core/undo/undraw.cxx
@@ -32,7 +32,6 @@
 #include rtl/string.h
 #include rtl/memory.h
 
-#include rtl/string.h
 #include svx/svdogrp.hxx
 #include svx/svdundo.hxx
 #include svx/svdpage.hxx
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx 
b/sw/source/filter/ww8/wrtw8esh.cxx
index 14a3027..2c2d234 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -96,7 +96,6 @@
 #include escher.hxx
 #include ndtxt.hxx
 #include WW8FFData.hxx
-#include com/sun/star/drawing/XShape.hpp
 #include com/sun/star/beans/XPropertyContainer.hpp
 #include com/sun/star/beans/XPropertySet.hpp
 #include com/sun/star/beans/PropertyAttribute.hpp
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx 
b/sw/source/filter/ww8/wrtw8nds.cxx
index 1c7e87b..d0d8e0c 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -34,10 +34,6 @@
 #include functional
 #include iostream
 
-#if OSL_DEBUG_LEVEL  1
-#include cstdio
-#endif
-
 #include hintids.hxx
 #include comphelper/string.hxx
 #include tools/urlobj.hxx
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index d1c6542..541adc8 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -165,7 +165,6 @@ using namespace nsHdFtFlags;
 #include unotools/pathoptions.hxx
 #include com/sun/star/ucb/XSimpleFileAccess.hpp
 
-#include comphelper/processfactory.hxx
 #include com/sun/star/document/XFilter.hpp
 #include com/sun/star/script/vba/XVBACompatibility.hpp
 #include com/sun/star/document/XImporter.hpp
diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx
index e3adc63..2025097 100644
--- a/sw/source/ui/uiview/viewling.cxx
+++ b/sw/source/ui/uiview/viewling.cxx
@@ -81,8 +81,6 @@
 #include com/sun/star/beans/PropertyValue.hpp
 #include com/sun/star/util/XURLTransformer.hpp
 
-#include comphelper/processfactory.hxx
-
 #include vcl/svapp.hxx
 #include rtl/ustring.hxx
 
diff --git a/sw/source/ui/wrtsh/wrtundo.cxx b/sw/source/ui/wrtsh/wrtundo.cxx
index f9ce887..4cdabd1 100644
--- a/sw/source/ui/wrtsh/wrtundo.cxx
+++ b/sw/source/ui/wrtsh/wrtundo.cxx
@@ -35,7 +35,6 @@
 #include swdtflvr.hxx
 #include svtools/svtdata.hxx
 #include svtools/svtools.hrc
-#include svtools/svtdata.hxx
 #include wrtsh.hrc
 #include sfx2/sfx.hrc
 
commit ac68443c80647bfed1b454d999e9091e078b461d
Author: Takeshi Abe t...@fixedpoint.jp
Date:   Fri Mar 23 05:56:51 2012 +0900

removed duplicate includes in sal

diff --git a/sal/qa/rtl_strings/rtl_OUString.cxx 
b/sal/qa/rtl_strings/rtl_OUString.cxx
index dc1812e..8271253 100644
--- a/sal/qa/rtl_strings/rtl_OUString.cxx
+++ b/sal/qa/rtl_strings/rtl_OUString.cxx
@@ -28,7 +28,6 @@
 
 #include sal/types.h
 
-//# #include rtl/tres.h
 #include testshl/tresstatewrapper.hxx
 #include stringhelper.hxx
 #include rtl/string.hxx
diff --git a/sal/rtl/source/logfile.cxx b/sal/rtl/source/logfile.cxx
index 7229a59..958adbd 100644
--- a/sal/rtl/source/logfile.cxx
+++ b/sal/rtl/source/logfile.cxx
@@ -34,7 +34,6 @@
 #include rtl/logfile.h
 #include osl/process.h
 #include osl/time.h
-#include osl/time.h
 #include