[Libreoffice-commits] core.git: svx/source sw/source vcl/osx vcl/source vcl/unx writerfilter/source

Andrea Gelmini (via logerrit) logerrit at kemper.freedesktop.org
Thu Feb 11 07:20:11 UTC 2021


 svx/source/dialog/ClassificationDialog.cxx      |    1 -
 svx/source/items/grfitem.cxx                    |    2 --
 svx/source/items/rotmodit.cxx                   |    2 --
 svx/source/sidebar/SelectionAnalyzer.cxx        |    1 -
 sw/source/core/bastyp/calc.cxx                  |   18 ------------------
 sw/source/core/txtnode/swfont.cxx               |   20 --------------------
 sw/source/core/unocore/unotbl.cxx               |    2 --
 sw/source/filter/ww8/wrtw8nds.cxx               |    2 --
 sw/source/filter/xml/xmlfmt.cxx                 |    1 -
 sw/source/filter/xml/xmlimp.cxx                 |    8 --------
 sw/source/filter/xml/xmltbli.cxx                |    1 -
 sw/source/uibase/config/viewopt.cxx             |    3 ---
 sw/source/uibase/dbui/mmconfigitem.cxx          |    2 --
 sw/source/uibase/fldui/fldmgr.cxx               |    1 -
 vcl/osx/salnativewidgets.cxx                    |    4 ----
 vcl/source/bitmap/BitmapReadAccess.cxx          |    1 -
 vcl/source/filter/ipdf/pdfdocument.cxx          |    1 -
 vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx       |    1 -
 writerfilter/source/rtftok/rtfdispatchvalue.cxx |    1 -
 19 files changed, 72 deletions(-)

New commits:
commit 1eb05baf7cffe5ad747f6ab5ba65e07c7a9dcf80
Author:     Andrea Gelmini <andrea.gelmini at gelma.net>
AuthorDate: Tue Feb 9 22:43:17 2021 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Feb 11 08:19:29 2021 +0100

    Remove unneeded breaks
    
    Extending this:
    https://gerrit.libreoffice.org/c/core/+/110512
    
    Change-Id: I1066aac690fe297a557352266f3405ae29ed4593
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110522
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/svx/source/dialog/ClassificationDialog.cxx b/svx/source/dialog/ClassificationDialog.cxx
index 79ebf7548805..412265fefc29 100644
--- a/svx/source/dialog/ClassificationDialog.cxx
+++ b/svx/source/dialog/ClassificationDialog.cxx
@@ -60,7 +60,6 @@ IMPL_STATIC_LINK(ClassificationDialog, KeyInput, const KeyEvent&, rKeyEvent, boo
             // Anything else is ignored
             default:
                 return true;
-                break;
         }
     }
 
diff --git a/svx/source/items/grfitem.cxx b/svx/source/items/grfitem.cxx
index 15625e983f61..2c0b678fbd3c 100644
--- a/svx/source/items/grfitem.cxx
+++ b/svx/source/items/grfitem.cxx
@@ -111,11 +111,9 @@ bool SvxGrfCrop::GetPresentation(
                 " T: " + ::GetMetricText( GetTop(), eCoreUnit, MapUnit::MapMM, &rIntl ) +
                 " B: " + ::GetMetricText( GetBottom(), eCoreUnit, MapUnit::MapMM, &rIntl );
         return true;
-        break;
 
     default:
         return false;
-        break;
     }
 }
 
diff --git a/svx/source/items/rotmodit.cxx b/svx/source/items/rotmodit.cxx
index a02bc658e447..abd29b2ca1a3 100644
--- a/svx/source/items/rotmodit.cxx
+++ b/svx/source/items/rotmodit.cxx
@@ -64,12 +64,10 @@ bool SvxRotateModeItem::GetPresentation(
         case SfxItemPresentation::Complete:
             rText += GetValueText(GetValue());
             return true;
-            break;
 
         case SfxItemPresentation::Nameless:
             rText += OUString::number( GetValue() );
             return true;
-            break;
         default: ;//prevent warning
     }
 
diff --git a/svx/source/sidebar/SelectionAnalyzer.cxx b/svx/source/sidebar/SelectionAnalyzer.cxx
index baeaffc20858..418940dc7334 100644
--- a/svx/source/sidebar/SelectionAnalyzer.cxx
+++ b/svx/source/sidebar/SelectionAnalyzer.cxx
@@ -231,7 +231,6 @@ EnumContext::Context SelectionAnalyzer::GetContextForObjectId_SC(const sal_uInt1
 
         case OBJ_MEDIA:
             return EnumContext::Context::Media;
-            break;
 
         default:
             return EnumContext::Context::Unknown;
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index f22dda20ff50..652e269c32d9 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -1057,31 +1057,24 @@ SwSbxValue SwCalc::PrimFunc(bool &rChkPow)
         case CALC_SIN:
             SAL_INFO("sw.calc", "sin");
             return StdFunc(&sin, false);
-            break;
         case CALC_COS:
             SAL_INFO("sw.calc", "cos");
             return StdFunc(&cos, false);
-            break;
         case CALC_TAN:
             SAL_INFO("sw.calc", "tan");
             return StdFunc(&tan, false);
-            break;
         case CALC_ATAN:
             SAL_INFO("sw.calc", "atan");
             return StdFunc(&atan, false);
-            break;
         case CALC_ASIN:
             SAL_INFO("sw.calc", "asin");
             return StdFunc(&asin, true);
-            break;
         case CALC_ACOS:
             SAL_INFO("sw.calc", "acos");
             return StdFunc(&acos, true);
-            break;
         case CALC_ABS:
             SAL_INFO("sw.calc", "abs");
             return StdFunc(&abs, false);
-            break;
         case CALC_SIGN:
         {
             SAL_INFO("sw.calc", "sign");
@@ -1090,7 +1083,6 @@ SwSbxValue SwCalc::PrimFunc(bool &rChkPow)
             double nVal = Prim().GetDouble();
             nErg.PutDouble( int(0 < nVal) - int(nVal < 0) );
             return nErg;
-            break;
         }
         case CALC_NOT:
         {
@@ -1118,7 +1110,6 @@ SwSbxValue SwCalc::PrimFunc(bool &rChkPow)
                 nErg.Compute( SbxNOT, nErg );
             }
             return nErg;
-            break;
         }
         case CALC_NUMBER:
         {
@@ -1142,7 +1133,6 @@ SwSbxValue SwCalc::PrimFunc(bool &rChkPow)
                 rChkPow = true;
             }
             return nErg;
-            break;
         }
         case CALC_NAME:
         {
@@ -1168,7 +1158,6 @@ SwSbxValue SwCalc::PrimFunc(bool &rChkPow)
                     break;
             }
             return nErg;
-            break;
         }
         case CALC_MINUS:
         {
@@ -1177,7 +1166,6 @@ SwSbxValue SwCalc::PrimFunc(bool &rChkPow)
             GetToken();
             nErg.PutDouble( -(Prim().GetDouble()) );
             return nErg;
-            break;
         }
         case CALC_LP:
         {
@@ -1194,7 +1182,6 @@ SwSbxValue SwCalc::PrimFunc(bool &rChkPow)
                 rChkPow = true; // in order for =(7)^2 to work
             }
             return nErg;
-            break;
         }
         case CALC_RP:
             // ignore, see tdf#121962
@@ -1215,7 +1202,6 @@ SwSbxValue SwCalc::PrimFunc(bool &rChkPow)
             else
                 nErg.PutDouble( aTmp );
             return nErg;
-            break;
         }
         case CALC_COUNT:
         {
@@ -1226,7 +1212,6 @@ SwSbxValue SwCalc::PrimFunc(bool &rChkPow)
             SwSbxValue nErg = Expr();
             nErg.PutDouble( m_bHasNumber ? m_nListPor : 0 );
             return nErg;
-            break;
         }
         case CALC_SQRT:
         {
@@ -1238,7 +1223,6 @@ SwSbxValue SwCalc::PrimFunc(bool &rChkPow)
             else
                 nErg.PutDouble( sqrt( nErg.GetDouble() ));
             return nErg;
-            break;
         }
         case CALC_SUM:
         case CALC_PRODUCT:
@@ -1250,7 +1234,6 @@ SwSbxValue SwCalc::PrimFunc(bool &rChkPow)
             GetToken();
             SwSbxValue nErg = Expr();
             return nErg;
-            break;
         }
         case CALC_ENDCALC:
         {
@@ -1258,7 +1241,6 @@ SwSbxValue SwCalc::PrimFunc(bool &rChkPow)
             SwSbxValue nErg;
             nErg.Clear();
             return nErg;
-            break;
         }
         default:
             SAL_INFO("sw.calc", "syntax error");
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index c1b94840d060..967f6336186d 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -127,20 +127,15 @@ SwFont::GetAbsTopBorder(const bool bVertLayout, const bool bVertLayoutLRBT) cons
     {
         case 0 :
             return m_aTopBorder;
-            break;
         case 900 :
             return m_aRightBorder;
-            break;
         case 1800 :
             return m_aBottomBorder;
-            break;
         case 2700 :
             return m_aLeftBorder;
-            break;
         default :
             assert(false);
             return m_aTopBorder;
-            break;
     }
 }
 
@@ -151,20 +146,15 @@ SwFont::GetAbsBottomBorder(const bool bVertLayout, const bool bVertLayoutLRBT) c
     {
         case 0 :
             return m_aBottomBorder;
-            break;
         case 900 :
             return m_aLeftBorder;
-            break;
         case 1800 :
             return m_aTopBorder;
-            break;
         case 2700 :
             return m_aRightBorder;
-            break;
         default :
             assert(false);
             return m_aBottomBorder;
-            break;
     }
 }
 
@@ -175,20 +165,15 @@ SwFont::GetAbsLeftBorder(const bool bVertLayout, const bool bVertLayoutLRBT) con
     {
         case 0 :
             return m_aLeftBorder;
-            break;
         case 900 :
             return m_aTopBorder;
-            break;
         case 1800 :
             return m_aRightBorder;
-            break;
         case 2700 :
             return m_aBottomBorder;
-            break;
         default :
             assert(false);
             return m_aLeftBorder;
-            break;
     }
 }
 
@@ -199,20 +184,15 @@ SwFont::GetAbsRightBorder(const bool bVertLayout, const bool bVertLayoutLRBT) co
     {
         case 0 :
             return m_aRightBorder;
-            break;
         case 900 :
             return m_aBottomBorder;
-            break;
         case 1800 :
             return m_aLeftBorder;
-            break;
         case 2700 :
             return m_aTopBorder;
-            break;
         default :
             assert(false);
             return m_aRightBorder;
-            break;
     }
 }
 
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 96cfe437158f..60c65acabac0 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -1037,7 +1037,6 @@ uno::Any SwXCell::getPropertyValue(const OUString& rPropertyName)
     {
         case FN_UNO_CELL_ROW_SPAN:
             return uno::makeAny(m_pBox->getRowSpan());
-        break;
         case FN_UNO_TEXT_SECTION:
         {
             SwFrameFormat* pTableFormat = GetFrameFormat();
@@ -1052,7 +1051,6 @@ uno::Any SwXCell::getPropertyValue(const OUString& rPropertyName)
         break;
         case FN_UNO_CELL_NAME:
             return uno::makeAny(m_pBox->GetName());
-        break;
         case FN_UNO_REDLINE_NODE_START:
         case FN_UNO_REDLINE_NODE_END:
         {
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 12066cc8697a..9b0853af3b0b 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -1514,7 +1514,6 @@ const SwRedlineData* SwWW8AttrIter::GetRunLevelRedline( sal_Int32 nPos )
                 case RedlineType::Format:
                     // write data of this redline
                     return &( pCurRedline->GetRedlineData() );
-                    break;
                 default:
                     break;
             }
@@ -1549,7 +1548,6 @@ const SwRedlineData* SwWW8AttrIter::GetRunLevelRedline( sal_Int32 nPos )
                                 // write data of this redline
                                 pCurRedline = pRedl;
                                 return &( pCurRedline->GetRedlineData() );
-                                break;
                             default:
                                 break;
                         }
diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx
index ad82cb3ba14d..5a409a429525 100644
--- a/sw/source/filter/xml/xmlfmt.cxx
+++ b/sw/source/filter/xml/xmlfmt.cxx
@@ -588,7 +588,6 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SwXMLItemSetStyleConte
         case XML_ELEMENT(STYLE, XML_TABLE_ROW_PROPERTIES):
         case XML_ELEMENT(STYLE, XML_TABLE_CELL_PROPERTIES):
             return CreateItemSetContext( nElement, xAttrList );
-            break;
         case XML_ELEMENT(STYLE, XML_TEXT_PROPERTIES):
         case XML_ELEMENT(STYLE, XML_PARAGRAPH_PROPERTIES):
         {
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index e3ecbeac0d7e..584a8e5d9176 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -177,37 +177,29 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL SwXMLDocContext_Impl::c
     {
         case XML_ELEMENT(OFFICE, XML_SCRIPTS):
             return GetSwImport().CreateScriptContext();
-            break;
         case XML_ELEMENT(OFFICE, XML_SETTINGS):
             return new XMLDocumentSettingsContext( GetImport() );
-            break;
         case XML_ELEMENT(OFFICE, XML_STYLES):
             GetSwImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP );
             return GetSwImport().CreateStylesContext( false );
-            break;
         case XML_ELEMENT(OFFICE, XML_AUTOMATIC_STYLES):
             // don't use the autostyles from the styles-document for the progress
             if ( mnElement != 0 && (mnElement & TOKEN_MASK) != XML_DOCUMENT_STYLES )
                 GetSwImport().GetProgressBarHelper()->Increment
                     ( PROGRESS_BAR_STEP );
             return GetSwImport().CreateStylesContext( true );
-            break;
         case XML_ELEMENT(OFFICE, XML_MASTER_STYLES):
             return GetSwImport().CreateMasterStylesContext();
-            break;
         case XML_ELEMENT(OFFICE, XML_FONT_FACE_DECLS):
             return GetSwImport().CreateFontDeclsContext();
-            break;
         case XML_ELEMENT(OFFICE, XML_META):
             OSL_FAIL(" XML_ELEMENT(OFFICE, XML_META): should not have come here, maybe document is invalid?");
             break;
         case XML_ELEMENT(OFFICE, XML_BODY):
             GetSwImport().GetProgressBarHelper()->Increment( PROGRESS_BAR_STEP );
             return new SwXMLBodyContext_Impl( GetSwImport() );
-            break;
         case XML_ELEMENT(XFORMS, XML_MODEL):
             return createXFormsModelContext(GetImport());
-            break;
         default:
             XMLOFF_WARN_UNKNOWN_ELEMENT("sw", nElement);
     }
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 061ea32d63e5..5a40c3c8d281 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -1269,7 +1269,6 @@ css::uno::Reference<css::xml::sax::XFastContextHandler> SwXMLTableContext::creat
         [[fallthrough]];
     case XML_ELEMENT(TABLE, XML_TABLE_ROWS):
         return new SwXMLTableRowsContext_Impl( GetSwImport(), this, bHeader );
-        break;
     case XML_ELEMENT(TABLE, XML_TABLE_HEADER_COLUMNS):
     case XML_ELEMENT(TABLE, XML_TABLE_COLUMNS):
     // There are slight differences between <table:table-columns> and
diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx
index 458621846514..c58e734f83ab 100644
--- a/sw/source/uibase/config/viewopt.cxx
+++ b/sw/source/uibase/config/viewopt.cxx
@@ -381,13 +381,10 @@ RndStdIds SwViewOption::GetDefaultAnchorType()
     {
       case 0:
         return RndStdIds::FLY_AT_PARA; //0
-        break;
       case 1:
         return RndStdIds::FLY_AT_CHAR; //4
-        break;
       case 2:
         return RndStdIds::FLY_AS_CHAR; //1
-        break;
       default:
         return RndStdIds::FLY_AT_CHAR; //4
     }//switch
diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx
index 34b74011b9c3..28ed40976ab9 100644
--- a/sw/source/uibase/dbui/mmconfigitem.cxx
+++ b/sw/source/uibase/dbui/mmconfigitem.cxx
@@ -1350,7 +1350,6 @@ sal_Int16 SwMailMergeConfigItem::GetMailPort() const
     case SECURE_PORT:
     case DEFAULT_PORT:
         return m_pImpl->m_bIsSecureConnection ? SECURE_PORT : DEFAULT_PORT;
-        break;
     default:
         return m_pImpl->m_nMailPort;
     }
@@ -1462,7 +1461,6 @@ sal_Int16           SwMailMergeConfigItem::GetInServerPort() const
             return m_pImpl->m_bIsSecureConnection ? POP_SECURE_PORT : POP_PORT;
         else
             return m_pImpl->m_bIsSecureConnection ? IMAP_SECURE_PORT : IMAP_PORT;
-        break;
     default:
         return m_pImpl->m_nInServerPort;
     }
diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx
index cad12473184f..74452292713a 100644
--- a/sw/source/uibase/fldui/fldmgr.cxx
+++ b/sw/source/uibase/fldui/fldmgr.cxx
@@ -1467,7 +1467,6 @@ bool SwFieldMgr::InsertField(
         case SwFieldTypesEnum::ParagraphSignature:
             pCurShell->SignParagraph();
             return true;
-        break;
 
         default:
         {   OSL_ENSURE(false, "wrong field type");
diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx
index ff3e5c450edd..606db5ba9a37 100644
--- a/vcl/osx/salnativewidgets.cxx
+++ b/vcl/osx/salnativewidgets.cxx
@@ -76,15 +76,12 @@ static ThemeButtonValue ImplGetButtonValue(ButtonValue aButtonValue)
     {
         case ButtonValue::On:
             return kThemeButtonOn;
-            break;
         case ButtonValue::Off:
         case ButtonValue::DontKnow:
             return kThemeButtonOff;
-            break;
         case ButtonValue::Mixed:
         default:
             return kThemeButtonMixed;
-            break;
     }
 }
 
@@ -159,7 +156,6 @@ bool AquaSalGraphics::isNativeControlSupported(ControlType nType, ControlPart nP
             break;
         case ControlType::SpinButtons:
             return false;
-            break;
         case ControlType::Combobox:
             if (nPart == ControlPart::Entire || nPart == ControlPart::HasBackgroundTexture)
                 return true;
diff --git a/vcl/source/bitmap/BitmapReadAccess.cxx b/vcl/source/bitmap/BitmapReadAccess.cxx
index a978e3f77388..b0ad156ddf91 100644
--- a/vcl/source/bitmap/BitmapReadAccess.cxx
+++ b/vcl/source/bitmap/BitmapReadAccess.cxx
@@ -142,7 +142,6 @@ FncSetPixel BitmapReadAccess::SetPixelFunction(ScanlineFormat nFormat)
                 return SetPixelForN32BitTcRgbx;
         case ScanlineFormat::N32BitTcMask:
             return SetPixelForN32BitTcMask;
-            break;
 
         default:
             return nullptr;
diff --git a/vcl/source/filter/ipdf/pdfdocument.cxx b/vcl/source/filter/ipdf/pdfdocument.cxx
index def137c479b3..acf584949a70 100644
--- a/vcl/source/filter/ipdf/pdfdocument.cxx
+++ b/vcl/source/filter/ipdf/pdfdocument.cxx
@@ -1709,7 +1709,6 @@ void PDFDocument::ReadXRefStream(SvStream& rStream)
                         SAL_WARN("vcl.filter", "PDFDocument::ReadXRefStream: unexpected predictor: "
                                                    << nPredictor);
                         return;
-                        break;
                 }
             }
 
diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
index 6e91fc3503d2..8d09485aa046 100644
--- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
@@ -1674,7 +1674,6 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
         break;
     case ControlType::ListNet:
         return true;
-        break;
     case ControlType::TabPane:
         context = mpNotebookStyle;
         break;
diff --git a/writerfilter/source/rtftok/rtfdispatchvalue.cxx b/writerfilter/source/rtftok/rtfdispatchvalue.cxx
index 8258f53d6267..cca01ebf4323 100644
--- a/writerfilter/source/rtftok/rtfdispatchvalue.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchvalue.cxx
@@ -670,7 +670,6 @@ bool RTFDocumentImpl::dispatchTableValue(RTFKeyword nKeyword, int nParam)
                           nSprm, new RTFValue(aAttributes));
             return true;
         }
-        break;
         case RTF_TRGAPH:
             // Half of the space between the cells of a table row: default left/right table cell margin.
             if (nParam > 0)


More information about the Libreoffice-commits mailing list