[Libreoffice-commits] .: 3 commits - sc/qa sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Dec 7 02:24:42 PST 2012
sc/qa/extras/macros-test.cxx | 3 +--
sw/source/ui/dbui/dbinsdlg.cxx | 4 ++--
sw/source/ui/inc/swtablerep.hxx | 3 +--
sw/source/ui/shells/tabsh.cxx | 2 +-
sw/source/ui/table/swtablerep.cxx | 3 +--
sw/source/ui/uno/unomod.cxx | 9 +++------
6 files changed, 9 insertions(+), 15 deletions(-)
New commits:
commit 95af0a93c18aca545c40f9bda5e48bf60f61b3c8
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Dec 7 11:22:28 2012 +0100
-Werror,-Wunused-result
Change-Id: I91633af096dd82960867f3ef6eb962b7b20c3960
diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx
index c5aa5a2..4d63089 100644
--- a/sc/qa/extras/macros-test.cxx
+++ b/sc/qa/extras/macros-test.cxx
@@ -141,8 +141,7 @@ void ScMacrosTest::testVba()
rtl::OUString aFileName;
createFileURL(testInfo[i].sFileBaseName, aFileExtension, aFileName);
uno::Reference< com::sun::star::lang::XComponent > xComponent = loadFromDesktop(aFileName);
- rtl::OUString sMsg( RTL_CONSTASCII_USTRINGPARAM("Failed to load ") );
- sMsg.concat( aFileName );
+ rtl::OUString sMsg( "Failed to load " + aFileName );
CPPUNIT_ASSERT_MESSAGE( rtl::OUStringToOString( sMsg, RTL_TEXTENCODING_UTF8 ).getStr(), xComponent.is() );
String sUrl = testInfo[i].sMacroUrl;
commit 6a31768bd5dc4637f4a62b568c38a8277f6ed3bc
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Dec 7 10:02:51 2012 +0100
-Werror,-Wtautological-constant-out-of-range-compare
Change-Id: Ia9d77ea28c714a9bf3fc3a6c9ed832c9c4619089
diff --git a/sw/source/ui/uno/unomod.cxx b/sw/source/ui/uno/unomod.cxx
index caee7c5..9133400 100644
--- a/sw/source/ui/uno/unomod.cxx
+++ b/sw/source/ui/uno/unomod.cxx
@@ -693,7 +693,7 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c
sal_Int16 nZoom = 0;
if(!(rValue >>= nZoom))
throw IllegalArgumentException();
- SvxZoomType eZoom = (SvxZoomType)USHRT_MAX;
+ SvxZoomType eZoom;
switch (nZoom)
{
case view::DocumentZoomType::OPTIMAL:
@@ -716,11 +716,8 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c
::rtl::OUString( "SwXViewSettings: invalid zoom type"), 0, 0);
break;
}
- if(eZoom < USHRT_MAX)
- {
- mpViewOption->SetZoomType( eZoom );
- mbApplyZoom = sal_True;
- }
+ mpViewOption->SetZoomType( eZoom );
+ mbApplyZoom = sal_True;
}
break;
case HANDLE_VIEWSET_ONLINE_LAYOUT :
commit 01872509d4d46e9e86d4371c9ef2034ab4b43fe4
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Dec 7 09:59:24 2012 +0100
-Werror,-Wunused-private-field
Change-Id: I4a37e6aacbcce18f17e4b2eebecf43c0b1679f62
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 617da5a..3797e7b 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -710,7 +710,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
SwTabCols aTabCols;
aTabCols.SetRight( nWidth );
aTabCols.SetRightMax( nWidth );
- pRep = new SwTableRep( aTabCols, sal_False );
+ pRep = new SwTableRep( aTabCols );
pRep->SetAlign( text::HoriOrientation::NONE );
pRep->SetSpace( nWidth );
pRep->SetWidth( nWidth );
@@ -736,7 +736,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
aTabCols.Insert( nW, sal_False, n );
}
delete pRep;
- pRep = new SwTableRep( aTabCols, sal_False );
+ pRep = new SwTableRep( aTabCols );
pRep->SetAlign( text::HoriOrientation::NONE );
pRep->SetSpace( nWidth );
pRep->SetWidth( nWidth );
diff --git a/sw/source/ui/inc/swtablerep.hxx b/sw/source/ui/inc/swtablerep.hxx
index 996d0b2..6efa1ed 100644
--- a/sw/source/ui/inc/swtablerep.hxx
+++ b/sw/source/ui/inc/swtablerep.hxx
@@ -38,13 +38,12 @@ class SW_DLLPUBLIC SwTableRep
sal_uInt16 nColCount;
sal_uInt16 nAllCols;
sal_uInt16 nWidthPercent;
- bool bComplex : 1;
sal_Bool bLineSelected : 1;
sal_Bool bWidthChanged : 1;
sal_Bool bColsChanged : 1;
public:
- SwTableRep( const SwTabCols& rTabCol, bool bComplex );
+ SwTableRep( const SwTabCols& rTabCol );
~SwTableRep();
sal_Bool FillTabCols( SwTabCols& rTabCol ) const;
diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx
index db27f1d..ff1e401 100644
--- a/sw/source/ui/shells/tabsh.cxx
+++ b/sw/source/ui/shells/tabsh.cxx
@@ -214,7 +214,7 @@ static SwTableRep* lcl_TableParamToItemSet( SfxItemSet& rSet, SwWrtShell &rSh )
// Pointer wird nach der Dialogausfuehrung geloescht
- SwTableRep* pRep = new SwTableRep( aTabCols, rSh.IsTblComplex());
+ SwTableRep* pRep = new SwTableRep( aTabCols );
pRep->SetSpace(aCols.GetRightMax());
sal_uInt16 nPercent = 0;
diff --git a/sw/source/ui/table/swtablerep.cxx b/sw/source/ui/table/swtablerep.cxx
index 08d1166..4fddcae 100644
--- a/sw/source/ui/table/swtablerep.cxx
+++ b/sw/source/ui/table/swtablerep.cxx
@@ -55,7 +55,7 @@
#include "swtablerep.hxx"
-SwTableRep::SwTableRep( const SwTabCols& rTabCol, bool bCplx )
+SwTableRep::SwTableRep( const SwTabCols& rTabCol )
:
nTblWidth(0),
nSpace(0),
@@ -63,7 +63,6 @@ SwTableRep::SwTableRep( const SwTabCols& rTabCol, bool bCplx )
nRightSpace(0),
nAlign(0),
nWidthPercent(0),
- bComplex(bCplx),
bLineSelected(sal_False),
bWidthChanged(sal_False),
bColsChanged(sal_False)
More information about the Libreoffice-commits
mailing list