[Libreoffice-commits] core.git: compilerplugins/clang sc/source sw/qa sw/source vcl/source
Noel Grandin
noel.grandin at collabora.co.uk
Tue Aug 15 11:48:00 UTC 2017
compilerplugins/clang/redundantcast.cxx | 5 ++---
sc/source/ui/pagedlg/tptable.cxx | 2 +-
sc/source/ui/view/formatsh.cxx | 8 ++++----
sc/source/ui/view/printfun.cxx | 2 +-
sw/qa/extras/ooxmlexport/ooxmlexport2.cxx | 6 +++---
sw/qa/extras/ooxmlexport/ooxmlexport4.cxx | 4 ++--
sw/qa/extras/ooxmlexport/ooxmlexport7.cxx | 10 +++++-----
sw/qa/extras/ooxmlexport/ooxmlexport8.cxx | 10 +++++-----
sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 10 +++++-----
sw/qa/extras/rtfexport/rtfexport.cxx | 2 +-
sw/qa/extras/rtfexport/rtfexport2.cxx | 4 ++--
sw/qa/extras/rtfimport/rtfimport.cxx | 4 ++--
sw/qa/extras/ww8export/ww8export.cxx | 2 +-
sw/source/core/layout/atrfrm.cxx | 2 +-
vcl/source/window/printdlg.cxx | 8 ++++----
15 files changed, 39 insertions(+), 40 deletions(-)
New commits:
commit 718cdd43c25783d9cd402e381123efe3981cc514
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Tue Aug 15 09:44:18 2017 +0200
loplugin:redundantcast, find more functional casts
In the enum types that caused the problem look like this when I dump
then:
EnumType 0xdb45770 'enum SvxFrameDirection'
`-Enum 0xdb456d8 'SvxFrameDirection'
SubstTemplateTypeParmType 0xdb61200 'enum SvxFrameDirection' sugar
|-TemplateTypeParmType 0xd7518f0 'EnumT' dependent depth 0 index 0
| `-TemplateTypeParm 0xd7518a8 'EnumT'
`-EnumType 0xdb45770 'enum SvxFrameDirection'
`-Enum 0xdb456d8 'SvxFrameDirection'
Change-Id: Id8fedabe43b7a27df61a2320a9acbf54d2dc7882
Reviewed-on: https://gerrit.libreoffice.org/41169
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/compilerplugins/clang/redundantcast.cxx b/compilerplugins/clang/redundantcast.cxx
index 2a66f8ff0704..56afdf13f090 100644
--- a/compilerplugins/clang/redundantcast.cxx
+++ b/compilerplugins/clang/redundantcast.cxx
@@ -580,7 +580,6 @@ bool RedundantCast::VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr const * exp
if (ignoreLocation(expr)) {
return true;
}
-
// Restrict this to "real" casts (compared to uses of braced-init-list, like
//
// Foo{bar, baz}
@@ -590,7 +589,7 @@ bool RedundantCast::VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr const * exp
// std::initializer_list<Foo>{bar, baz}
//
// ), and only to cases where the sub-expression already is a prvalue of
- // non-class type (and thus the cast is unlikely meant to create a
+ // non-class type (and thus the cast is unlikely to be meant to create a
// temporary):
auto const sub = compat::getSubExprAsWritten(expr);
if (sub->getValueKind() != VK_RValue || expr->getType()->isRecordType()
@@ -634,7 +633,7 @@ bool RedundantCast::VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr const * exp
}
auto const t1 = expr->getTypeAsWritten();
- auto const t2 = sub->getType();
+ auto const t2 = sub->getType().getDesugaredType(compiler.getASTContext());
if (t1 != t2)
return true;
if (!isOkToRemoveArithmeticCast(t1, t2, expr->getSubExpr()))
diff --git a/sc/source/ui/pagedlg/tptable.cxx b/sc/source/ui/pagedlg/tptable.cxx
index 90754c32d1cc..fab08754d31e 100644
--- a/sc/source/ui/pagedlg/tptable.cxx
+++ b/sc/source/ui/pagedlg/tptable.cxx
@@ -77,7 +77,7 @@ bool WAS_DEFAULT(sal_uInt16 w, SfxItemSet const & s)
#define GET_BOOL(sid,set) static_cast<const SfxBoolItem&>((set).Get(GetWhich((sid)))).GetValue()
#define GET_USHORT(sid,set) static_cast<const SfxUInt16Item&>((set).Get(GetWhich((sid)))).GetValue()
-#define GET_SHOW(sid,set) ( ScVObjMode( static_cast<const ScViewObjectModeItem&>((set).Get(GetWhich((sid)))).GetValue() ) \
+#define GET_SHOW(sid,set) ( static_cast<const ScViewObjectModeItem&>((set).Get(GetWhich((sid)))).GetValue() \
== VOBJ_MODE_SHOW )
// List box entries "Scaling mode"
#define SC_TPTABLE_SCALE_PERCENT 0
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 3dc53df16d36..b62ac3b34496 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -1557,12 +1557,12 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq )
if (rAttrSet.GetItemState(ATTR_HOR_JUSTIFY, true,&pItem ) == SfxItemState::SET)
{
pHorJustify = static_cast<const SvxHorJustifyItem*>(pItem);
- eHorJustify = SvxCellHorJustify( pHorJustify->GetValue() );
+ eHorJustify = pHorJustify->GetValue();
}
if (rAttrSet.GetItemState(ATTR_VER_JUSTIFY, true,&pItem ) == SfxItemState::SET)
{
pVerJustify = static_cast<const SvxVerJustifyItem*>(pItem);
- eVerJustify = SvxCellVerJustify( pVerJustify->GetValue() );
+ eVerJustify = pVerJustify->GetValue();
}
switch ( nSlot )
@@ -2299,7 +2299,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
{
case SfxItemState::SET:
{
- switch ( SvxCellHorJustify( pHorJustify->GetValue() ) )
+ switch ( pHorJustify->GetValue() )
{
case SvxCellHorJustify::Standard:
break;
@@ -2367,7 +2367,7 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
{
case SfxItemState::SET:
{
- eVerJustify = SvxCellVerJustify( pVerJustify->GetValue() );
+ eVerJustify = pVerJustify->GetValue();
switch ( eVerJustify )
{
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 42c97db3185f..ebdc9edb15ba 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -89,7 +89,7 @@ inline sal_uInt16 lcl_GetUShort(const SfxItemSet* pSet, sal_uInt16 nWhich)
inline bool lcl_GetShow(const SfxItemSet* pSet, sal_uInt16 nWhich)
{
- return ScVObjMode::VOBJ_MODE_SHOW == ScVObjMode( static_cast<const ScViewObjectModeItem&>(pSet->Get(nWhich)).GetValue() );
+ return ScVObjMode::VOBJ_MODE_SHOW == static_cast<const ScViewObjectModeItem&>(pSet->Get(nWhich)).GetValue();
}
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
index 890426bb7b57..aa06dda59012 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
@@ -620,7 +620,7 @@ DECLARE_OOXMLEXPORT_TEST(testI120928, "i120928.docx")
DECLARE_OOXMLEXPORT_TEST(testFdo64826, "fdo64826.docx")
{
// 'Track-Changes' (Track Revisions) wasn't exported.
- CPPUNIT_ASSERT_EQUAL(true, bool(getProperty<bool>(mxComponent, "RecordChanges")));
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(mxComponent, "RecordChanges"));
}
DECLARE_OOXMLEXPORT_TEST(testPageBackground, "page-background.docx")
@@ -789,7 +789,7 @@ DECLARE_OOXMLEXPORT_TEST(testFdo56679, "fdo56679.docx")
uno::Reference< text::XTextRange > xParagraph = getParagraph( 1 );
uno::Reference< text::XTextRange > xText = getRun( xParagraph, 2, "This is a simple sentence.");
- CPPUNIT_ASSERT_EQUAL(true, bool(getProperty<bool>(xText, "CharUnderlineHasColor")));
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xText, "CharUnderlineHasColor"));
CPPUNIT_ASSERT_EQUAL(sal_Int32(0xFF0000), getProperty<sal_Int32>(xText, "CharUnderlineColor"));
}
@@ -1089,7 +1089,7 @@ DECLARE_OOXMLEXPORT_TEST(testFdo67737, "fdo67737.docx")
const beans::PropertyValue& rProp = aProps[i];
if (rProp.Name == "MirroredY")
{
- CPPUNIT_ASSERT_EQUAL( true, bool(rProp.Value.get<bool>()) );
+ CPPUNIT_ASSERT_EQUAL( true, rProp.Value.get<bool>() );
return;
}
}
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index 4287154d76d6..e7a569cd5090 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -121,8 +121,8 @@ DECLARE_OOXMLEXPORT_TEST(testGroupshapePicture, "groupshape-picture.docx")
DECLARE_OOXMLEXPORT_TEST(testAutofit, "autofit.docx")
{
- CPPUNIT_ASSERT_EQUAL(true, bool(getProperty<bool>(getShape(1), "TextAutoGrowHeight")));
- CPPUNIT_ASSERT_EQUAL(false, bool(getProperty<bool>(getShape(2), "TextAutoGrowHeight")));
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(getShape(1), "TextAutoGrowHeight"));
+ CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(getShape(2), "TextAutoGrowHeight"));
}
DECLARE_OOXMLEXPORT_TEST(testTrackChangesDeletedParagraphMark, "testTrackChangesDeletedParagraphMark.docx")
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
index b1ba0db8cfc0..d564e8031b26 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
@@ -633,22 +633,22 @@ DECLARE_OOXMLEXPORT_TEST(test77219, "test77219.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf77219_backgroundShape, "tdf77219_backgroundShape.docx")
{
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Shape is in front of the paragraph", false, bool(getProperty<bool>(getShape(1), "Opaque")));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Shape is in front of the paragraph", false, getProperty<bool>(getShape(1), "Opaque"));
}
DECLARE_OOXMLEXPORT_TEST(testTdf77219_foregroundShape, "tdf77219_foregroundShape.docx")
{
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Shape is in front of the paragraph", true, bool(getProperty<bool>(getShape(1), "Opaque")));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Shape is in front of the paragraph", true, getProperty<bool>(getShape(1), "Opaque"));
}
DECLARE_OOXMLEXPORT_TEST(testTdf108973_backgroundTextbox, "tdf108973_backgroundTextbox.docx")
{
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Textbox is in front of the paragraph", false, bool(getProperty<bool>(getShape(1), "Opaque")));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Textbox is in front of the paragraph", false, getProperty<bool>(getShape(1), "Opaque"));
}
DECLARE_OOXMLEXPORT_TEST(testTdf108973_foregroundTextbox, "tdf108973_foregroundTextbox.docx")
{
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Textbox is in front of the paragraph", true, bool(getProperty<bool>(getShape(1), "Opaque")));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Textbox is in front of the paragraph", true, getProperty<bool>(getShape(1), "Opaque"));
}
DECLARE_OOXMLEXPORT_TEST(testPresetShape, "preset-shape.docx")
@@ -922,7 +922,7 @@ DECLARE_OOXMLEXPORT_TEST(testfdo79591, "fdo79591.docx")
DECLARE_OOXMLEXPORT_TEST(testBnc884615, "bnc884615.docx")
{
// The problem was that the shape in the header wasn't in the background.
- CPPUNIT_ASSERT_EQUAL(false, bool(getProperty<bool>(getShape(1), "Opaque")));
+ CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(getShape(1), "Opaque"));
}
DECLARE_OOXMLEXPORT_TEST(testFdo80894, "TextFrameRotation.docx")
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
index 17afb75359fe..c59fb365146f 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
@@ -940,7 +940,7 @@ DECLARE_OOXMLEXPORT_TEST(testN779630, "n779630.docx")
CPPUNIT_ASSERT_EQUAL(true, bool(xServiceInfo->supportsService("com.sun.star.form.component.DateField")));
CPPUNIT_ASSERT_EQUAL(OUString("date default text"), getProperty<OUString>(xPropertySet, "HelpText"));
CPPUNIT_ASSERT_EQUAL(sal_Int16(8), getProperty<sal_Int16>(xPropertySet, "DateFormat"));
- CPPUNIT_ASSERT_EQUAL(true, bool(getProperty<bool>(xPropertySet, "Dropdown")));
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xPropertySet, "Dropdown"));
// Second shape: combo box
xControlShape.set(getShape(2), uno::UNO_QUERY);
@@ -949,7 +949,7 @@ DECLARE_OOXMLEXPORT_TEST(testN779630, "n779630.docx")
CPPUNIT_ASSERT_EQUAL(true, bool(xServiceInfo->supportsService("com.sun.star.form.component.ComboBox")));
CPPUNIT_ASSERT_EQUAL(OUString("dropdown default text"), getProperty<OUString>(xPropertySet, "DefaultText"));
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), getProperty< uno::Sequence<OUString> >(xPropertySet, "StringItemList").getLength());
- CPPUNIT_ASSERT_EQUAL(true, bool(getProperty<bool>(xPropertySet, "Dropdown")));
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xPropertySet, "Dropdown"));
}
DECLARE_OOXMLEXPORT_TEST(testIndentation, "indentation.docx")
@@ -1223,9 +1223,9 @@ DECLARE_OOXMLEXPORT_TEST(testWpsOnly, "wps-only.docx")
CPPUNIT_ASSERT_EQUAL(text::WrapTextMode_THROUGHT, getProperty<text::WrapTextMode>(xShape, "Surround"));
// This should be in front of text.
- CPPUNIT_ASSERT_EQUAL(true, bool(getProperty<bool>(xShape, "Opaque")));
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xShape, "Opaque"));
// And this should be behind the document.
- CPPUNIT_ASSERT_EQUAL(false, bool(getProperty<bool>(getShape(2), "Opaque")));
+ CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(getShape(2), "Opaque"));
}
DECLARE_OOXMLEXPORT_TEST(testWpgOnly, "wpg-only.docx")
@@ -1252,7 +1252,7 @@ DECLARE_OOXMLEXPORT_TEST(textboxWpgOnly, "textbox-wpg-only.docx")
CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, getProperty<sal_Int16>(xShape, "HoriOrientRelation"));
CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, getProperty<sal_Int16>(xShape, "VertOrientRelation"));
// Make sure the shape is not in the background, as we have behindDoc="0" in the doc.
- CPPUNIT_ASSERT_EQUAL(true, bool(getProperty<bool>(xShape, "Opaque")));
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xShape, "Opaque"));
// The 3 paragraphs on the rectangles inside the groupshape ended up in the
// body text, make sure we don't have multiple paragraphs there anymore.
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 32b87b2caff8..796f1234dd3e 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -571,7 +571,7 @@ DECLARE_OOXMLIMPORT_TEST(testTableWidth, "table_width.docx")
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
// Relative width wasn't recognized during import.
- CPPUNIT_ASSERT_EQUAL(true, bool(getProperty<bool>(xTables->getByIndex(0), "IsWidthRelative")));
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xTables->getByIndex(0), "IsWidthRelative"));
uno::Reference<text::XTextFramesSupplier> xFramesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xFrames(xFramesSupplier->getTextFrames(), uno::UNO_QUERY);
@@ -780,7 +780,7 @@ DECLARE_OOXMLIMPORT_TEST(testTdf48658_transparentOLEheader, "tdf48658_transparen
{
// The problem was that the shape in the header was hidden in the background.
// The round-tripped document was always fine (even before the fix) but the shape numbers change, so import-only test.
- CPPUNIT_ASSERT_EQUAL(true, bool(getProperty<bool>(getShape(1), "Opaque")));
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(getShape(1), "Opaque"));
}
DECLARE_OOXMLIMPORT_TEST(testDMLGroupShapeParaAdjust, "dml-groupshape-paraadjust.docx")
@@ -1412,10 +1412,10 @@ DECLARE_OOXMLIMPORT_TEST(testTdf109306, "tdf109306.docx")
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
// Both types of relative width specification (pct): simple integers (in fiftieths of percent)
// and floats with "%" unit specification must be treated correctly
- CPPUNIT_ASSERT_EQUAL(true, bool(getProperty<bool>(xTables->getByIndex(0), "IsWidthRelative")));
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xTables->getByIndex(0), "IsWidthRelative"));
CPPUNIT_ASSERT_EQUAL(sal_Int16(90), getProperty<sal_Int16>(xTables->getByIndex(0), "RelativeWidth"));
- CPPUNIT_ASSERT_EQUAL(true, bool(getProperty<bool>(xTables->getByIndex(1), "IsWidthRelative")));
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xTables->getByIndex(1), "IsWidthRelative"));
CPPUNIT_ASSERT_EQUAL(sal_Int16(80), getProperty<sal_Int16>(xTables->getByIndex(1), "RelativeWidth"));
}
@@ -1427,7 +1427,7 @@ DECLARE_OOXMLIMPORT_TEST(testTdf109524, "tdf109524.docx")
// Until it's correctly implemented, we assign it 100% relative width.
// Previously, the table (without explicitly set width) had huge actual width
// and extended far outside of page's right border.
- CPPUNIT_ASSERT_EQUAL(true, bool(getProperty<bool>(xTables->getByIndex(0), "IsWidthRelative")));
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xTables->getByIndex(0), "IsWidthRelative"));
CPPUNIT_ASSERT_EQUAL(sal_Int16(100), getProperty<sal_Int16>(xTables->getByIndex(0), "RelativeWidth"));
}
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx
index 9f3b558e5bdb..0d5efe90272c 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -707,7 +707,7 @@ DECLARE_RTFEXPORT_TEST(testLineNumbering, "linenumbering.rtf")
{
uno::Reference<text::XLineNumberingProperties> xLineNumberingProperties(mxComponent, uno::UNO_QUERY_THROW);
uno::Reference<beans::XPropertySet> xPropertySet = xLineNumberingProperties->getLineNumberingProperties();
- CPPUNIT_ASSERT_EQUAL(true, bool(getProperty<bool>(xPropertySet, "IsOn")));
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xPropertySet, "IsOn"));
CPPUNIT_ASSERT_EQUAL(sal_Int32(5), getProperty<sal_Int32>(xPropertySet, "Interval"));
}
diff --git a/sw/qa/extras/rtfexport/rtfexport2.cxx b/sw/qa/extras/rtfexport/rtfexport2.cxx
index 034f32c2de26..0e394ca11dfa 100644
--- a/sw/qa/extras/rtfexport/rtfexport2.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport2.cxx
@@ -187,8 +187,8 @@ DECLARE_RTFEXPORT_TEST(testN750757, "n750757.rtf")
uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xTextDocument->getText(), uno::UNO_QUERY);
uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
- CPPUNIT_ASSERT_EQUAL(false, bool(getProperty<bool>(xParaEnum->nextElement(), "ParaContextMargin")));
- CPPUNIT_ASSERT_EQUAL(true, bool(getProperty<bool>(xParaEnum->nextElement(), "ParaContextMargin")));
+ CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(xParaEnum->nextElement(), "ParaContextMargin"));
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xParaEnum->nextElement(), "ParaContextMargin"));
}
DECLARE_RTFEXPORT_TEST(testFdo45563, "fdo45563.rtf")
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index cabe33795880..6a869b7a9113 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -649,8 +649,8 @@ DECLARE_RTFIMPORT_TEST(testContSectionPageBreak, "cont-section-pagebreak.rtf")
DECLARE_RTFIMPORT_TEST(testBackground, "background.rtf")
{
// The first shape wasn't in the foreground.
- CPPUNIT_ASSERT_EQUAL(true, bool(getProperty<bool>(getShape(1), "Opaque")));
- CPPUNIT_ASSERT_EQUAL(false, bool(getProperty<bool>(getShape(2), "Opaque")));
+ CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(getShape(1), "Opaque"));
+ CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(getShape(2), "Opaque"));
}
DECLARE_RTFIMPORT_TEST(testFdo74823, "fdo74823.rtf")
diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx
index 003c12a6e0d8..c44f68f78eb9 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -814,7 +814,7 @@ DECLARE_WW8EXPORT_TEST(testFdo42144, "fdo42144.odt")
{
// Footer wasn't disabled -- instead empty footer was exported.
uno::Reference<beans::XPropertySet> xStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(false, bool(getProperty<bool>(xStyle, "FooterIsOn")));
+ CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(xStyle, "FooterIsOn"));
}
DECLARE_WW8EXPORT_TEST(testCharacterBorder, "charborder.odt")
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 721bf51d5479..a478de201ac0 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -430,7 +430,7 @@ SwFormatFillOrder::SwFormatFillOrder( SwFillOrder nFO )
{}
SfxPoolItem* SwFormatFillOrder::Clone( SfxItemPool* ) const
{
- return new SwFormatFillOrder( SwFillOrder(GetValue()) );
+ return new SwFormatFillOrder( GetValue() );
}
sal_uInt16 SwFormatFillOrder::GetValueCount() const
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 6c1d48550e92..984f48bae11a 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -1367,8 +1367,8 @@ void PrintDialog::updateNupFromPages()
sal_IntPtr nPages = sal_IntPtr(maNUpPage.mpNupPagesBox->GetSelectEntryData());
int nRows = int(maNUpPage.mpNupRowsEdt->GetValue());
int nCols = int(maNUpPage.mpNupColEdt->GetValue());
- long nPageMargin = long(maNUpPage.mpPageMarginEdt->Denormalize(maNUpPage.mpPageMarginEdt->GetValue( FUNIT_100TH_MM )));
- long nSheetMargin = long(maNUpPage.mpSheetMarginEdt->Denormalize(maNUpPage.mpSheetMarginEdt->GetValue( FUNIT_100TH_MM )));
+ long nPageMargin = maNUpPage.mpPageMarginEdt->Denormalize(maNUpPage.mpPageMarginEdt->GetValue( FUNIT_100TH_MM ));
+ long nSheetMargin = maNUpPage.mpSheetMarginEdt->Denormalize(maNUpPage.mpSheetMarginEdt->GetValue( FUNIT_100TH_MM ));
bool bCustom = false;
if( nPages == 1 )
@@ -1471,8 +1471,8 @@ void PrintDialog::updateNup()
{
int nRows = int(maNUpPage.mpNupRowsEdt->GetValue());
int nCols = int(maNUpPage.mpNupColEdt->GetValue());
- long nPageMargin = long(maNUpPage.mpPageMarginEdt->Denormalize(maNUpPage.mpPageMarginEdt->GetValue( FUNIT_100TH_MM )));
- long nSheetMargin = long(maNUpPage.mpSheetMarginEdt->Denormalize(maNUpPage.mpSheetMarginEdt->GetValue( FUNIT_100TH_MM )));
+ long nPageMargin = maNUpPage.mpPageMarginEdt->Denormalize(maNUpPage.mpPageMarginEdt->GetValue( FUNIT_100TH_MM ));
+ long nSheetMargin = maNUpPage.mpSheetMarginEdt->Denormalize(maNUpPage.mpSheetMarginEdt->GetValue( FUNIT_100TH_MM ));
PrinterController::MultiPageSetup aMPS;
aMPS.nRows = nRows;
More information about the Libreoffice-commits
mailing list