loplugin:flatten in l10ntools..lotuswordpro

Change-Id: Ie6de142db1987094fdf538148ac5ee33379a3e4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127275
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2021-12-21 20:21:08 +02:00
parent 1d21a51d81
commit 968b64d054
7 changed files with 157 additions and 165 deletions

View File

@@ -394,8 +394,9 @@ XMLFile::XMLFile( const XMLFile& rObj )
XMLFile& XMLFile::operator=(const XMLFile& rObj)
{
if( this != &rObj )
{
if( this == &rObj )
return *this;
XMLParentNode::operator=(rObj);
m_aNodes_localize = rObj.m_aNodes_localize;
@@ -417,7 +418,6 @@ XMLFile& XMLFile::operator=(const XMLFile& rObj)
(*m_pXMLStrings)[ pos.first ] = pNewelem;
}
}
}
return *this;
}

View File

@@ -409,8 +409,9 @@ gboolean LOKDocViewSigHandlers::configureEvent(GtkWidget* pWidget, GdkEventConfi
}
LibreOfficeKitDocument* pDocument = lok_doc_view_get_document(LOK_DOC_VIEW(window->lokdocview));
if (pDocument && pDocument->pClass->getDocumentType(pDocument) == LOK_DOCTYPE_SPREADSHEET)
{
if (!pDocument || pDocument->pClass->getDocumentType(pDocument) != LOK_DOCTYPE_SPREADSHEET)
return true;
GtkAdjustment* pVAdjustment = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(window->scrolledwindow));
int rowSizePixel = GTV_CALC_HEADER_BAR(window->rowbar)->m_nSizePixel = gtk_adjustment_get_page_size(pVAdjustment);
int rowPosPixel = GTV_CALC_HEADER_BAR(window->rowbar)->m_nPositionPixel = gtk_adjustment_get_value(pVAdjustment);
@@ -438,7 +439,6 @@ gboolean LOKDocViewSigHandlers::configureEvent(GtkWidget* pWidget, GdkEventConfi
gtv_calc_header_bar_configure(GTV_CALC_HEADER_BAR(window->rowbar), &aTree.get_child("rows"));
gtv_calc_header_bar_configure(GTV_CALC_HEADER_BAR(window->columnbar), &aTree.get_child("columns"));
gtv_calc_header_bar_configure(GTV_CALC_HEADER_BAR(window->cornerarea), nullptr);
}
return true;
}

View File

@@ -555,8 +555,9 @@ handleGraphicSelectionOnButtonRelease(LOKDocView* pDocView, GdkEventButton* pEve
}
}
if (priv->m_bInDragGraphicSelection)
{
if (!priv->m_bInDragGraphicSelection)
return false;
g_info("LOKDocView_Impl::signalButton: end of drag graphic selection");
priv->m_bInDragGraphicSelection = false;
@@ -578,9 +579,6 @@ handleGraphicSelectionOnButtonRelease(LOKDocView* pDocView, GdkEventButton* pEve
return true;
}
return false;
}
static void
postKeyEventInThread(gpointer data)
{

View File

@@ -568,8 +568,9 @@ bool IsUpper( const OUString &rText, sal_Int32 nPos, sal_Int32 nLen, LanguageTyp
CapType capitalType(const OUString& aTerm, CharClass const * pCC)
{
sal_Int32 tlen = aTerm.getLength();
if (pCC && tlen)
{
if (!pCC || !tlen)
return CapType::UNKNOWN;
sal_Int32 nc = 0;
for (sal_Int32 tindex = 0; tindex < tlen; ++tindex)
{
@@ -587,8 +588,6 @@ CapType capitalType(const OUString& aTerm, CharClass const * pCC)
return CapType::MIXED;
}
return CapType::UNKNOWN;
}
// sorted(!) array of unicode ranges for code points that are exclusively(!) used as numbers
// and thus may NOT not be part of names or words like the Chinese/Japanese number characters

View File

@@ -713,8 +713,8 @@ bool LwpFrame::IsLeftWider()
{
rtl::Reference<LwpVirtualLayout> xLayout(m_pLayout->GetContainerLayout());
LwpVirtualLayout* pParent = xLayout.get();
if (pParent)
{
if (!pParent)
return false;
LwpPoint aPoint = m_pLayout->GetOrigin();
double fXOffset = LwpTools::ConvertFromUnitsToMetric(aPoint.GetX());
double fWidth = m_pLayout->GetWidth();
@@ -736,7 +736,6 @@ bool LwpFrame::IsLeftWider()
double fRight = fParentWidth - fParentMarginRight - (fXOffset + fWidth + fWrapRight);
if (fLeft > fRight)
return true;
}
return false;
}

View File

@@ -1862,14 +1862,14 @@ LwpShadow* LwpLayout::GetShadow()
XFShadow* LwpLayout::GetXFShadow()
{
LwpShadow* pShadow = GetShadow();
if (pShadow)
{
if (!pShadow)
return nullptr;
LwpColor color = pShadow->GetColor();
double offsetX = pShadow->GetOffsetX();
double offsetY = pShadow->GetOffsetY();
if (offsetX && offsetY && color.IsValidColor())
{
if (!offsetX || !offsetY || !color.IsValidColor())
return nullptr;
XFShadow* pXFShadow = new XFShadow();
enumXFShadowPos eXFShadowPos = enumXFShadowLeftTop;
double fOffset = 0;
@@ -1903,9 +1903,6 @@ XFShadow* LwpLayout::GetXFShadow()
return pXFShadow;
}
}
return nullptr;
}
/**
* @descr get the layout that containers the current frame layout

View File

@@ -545,8 +545,8 @@ LwpFooterLayout* LwpPageLayout::GetFooterLayout()
*/
LwpPageLayout* LwpPageLayout::GetOddChildLayout()
{
if (IsComplex())
{
if (!IsComplex())
return nullptr;
rtl::Reference<LwpVirtualLayout> xLay(
dynamic_cast<LwpVirtualLayout*>(GetChildHead().obj().get()));
o3tl::sorted_vector<LwpVirtualLayout*> aSeen;
@@ -567,7 +567,6 @@ LwpPageLayout* LwpPageLayout::GetOddChildLayout()
}
xLay.set(dynamic_cast<LwpVirtualLayout*>(xLay->GetNext().obj().get()));
}
}
return nullptr;
}