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:
@@ -394,8 +394,9 @@ XMLFile::XMLFile( const XMLFile& rObj )
|
|||||||
|
|
||||||
XMLFile& XMLFile::operator=(const XMLFile& rObj)
|
XMLFile& XMLFile::operator=(const XMLFile& rObj)
|
||||||
{
|
{
|
||||||
if( this != &rObj )
|
if( this == &rObj )
|
||||||
{
|
return *this;
|
||||||
|
|
||||||
XMLParentNode::operator=(rObj);
|
XMLParentNode::operator=(rObj);
|
||||||
|
|
||||||
m_aNodes_localize = rObj.m_aNodes_localize;
|
m_aNodes_localize = rObj.m_aNodes_localize;
|
||||||
@@ -417,7 +418,6 @@ XMLFile& XMLFile::operator=(const XMLFile& rObj)
|
|||||||
(*m_pXMLStrings)[ pos.first ] = pNewelem;
|
(*m_pXMLStrings)[ pos.first ] = pNewelem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -409,8 +409,9 @@ gboolean LOKDocViewSigHandlers::configureEvent(GtkWidget* pWidget, GdkEventConfi
|
|||||||
}
|
}
|
||||||
|
|
||||||
LibreOfficeKitDocument* pDocument = lok_doc_view_get_document(LOK_DOC_VIEW(window->lokdocview));
|
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));
|
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 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);
|
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->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->columnbar), &aTree.get_child("columns"));
|
||||||
gtv_calc_header_bar_configure(GTV_CALC_HEADER_BAR(window->cornerarea), nullptr);
|
gtv_calc_header_bar_configure(GTV_CALC_HEADER_BAR(window->cornerarea), nullptr);
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -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");
|
g_info("LOKDocView_Impl::signalButton: end of drag graphic selection");
|
||||||
priv->m_bInDragGraphicSelection = false;
|
priv->m_bInDragGraphicSelection = false;
|
||||||
|
|
||||||
@@ -576,9 +577,6 @@ handleGraphicSelectionOnButtonRelease(LOKDocView* pDocView, GdkEventButton* pEve
|
|||||||
g_object_unref(task);
|
g_object_unref(task);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@@ -568,8 +568,9 @@ bool IsUpper( const OUString &rText, sal_Int32 nPos, sal_Int32 nLen, LanguageTyp
|
|||||||
CapType capitalType(const OUString& aTerm, CharClass const * pCC)
|
CapType capitalType(const OUString& aTerm, CharClass const * pCC)
|
||||||
{
|
{
|
||||||
sal_Int32 tlen = aTerm.getLength();
|
sal_Int32 tlen = aTerm.getLength();
|
||||||
if (pCC && tlen)
|
if (!pCC || !tlen)
|
||||||
{
|
return CapType::UNKNOWN;
|
||||||
|
|
||||||
sal_Int32 nc = 0;
|
sal_Int32 nc = 0;
|
||||||
for (sal_Int32 tindex = 0; tindex < tlen; ++tindex)
|
for (sal_Int32 tindex = 0; tindex < tlen; ++tindex)
|
||||||
{
|
{
|
||||||
@@ -586,8 +587,6 @@ CapType capitalType(const OUString& aTerm, CharClass const * pCC)
|
|||||||
return CapType::INITCAP;
|
return CapType::INITCAP;
|
||||||
|
|
||||||
return CapType::MIXED;
|
return CapType::MIXED;
|
||||||
}
|
|
||||||
return CapType::UNKNOWN;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// sorted(!) array of unicode ranges for code points that are exclusively(!) used as numbers
|
// sorted(!) array of unicode ranges for code points that are exclusively(!) used as numbers
|
||||||
|
@@ -713,8 +713,8 @@ bool LwpFrame::IsLeftWider()
|
|||||||
{
|
{
|
||||||
rtl::Reference<LwpVirtualLayout> xLayout(m_pLayout->GetContainerLayout());
|
rtl::Reference<LwpVirtualLayout> xLayout(m_pLayout->GetContainerLayout());
|
||||||
LwpVirtualLayout* pParent = xLayout.get();
|
LwpVirtualLayout* pParent = xLayout.get();
|
||||||
if (pParent)
|
if (!pParent)
|
||||||
{
|
return false;
|
||||||
LwpPoint aPoint = m_pLayout->GetOrigin();
|
LwpPoint aPoint = m_pLayout->GetOrigin();
|
||||||
double fXOffset = LwpTools::ConvertFromUnitsToMetric(aPoint.GetX());
|
double fXOffset = LwpTools::ConvertFromUnitsToMetric(aPoint.GetX());
|
||||||
double fWidth = m_pLayout->GetWidth();
|
double fWidth = m_pLayout->GetWidth();
|
||||||
@@ -736,7 +736,6 @@ bool LwpFrame::IsLeftWider()
|
|||||||
double fRight = fParentWidth - fParentMarginRight - (fXOffset + fWidth + fWrapRight);
|
double fRight = fParentWidth - fParentMarginRight - (fXOffset + fWidth + fWrapRight);
|
||||||
if (fLeft > fRight)
|
if (fLeft > fRight)
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1862,14 +1862,14 @@ LwpShadow* LwpLayout::GetShadow()
|
|||||||
XFShadow* LwpLayout::GetXFShadow()
|
XFShadow* LwpLayout::GetXFShadow()
|
||||||
{
|
{
|
||||||
LwpShadow* pShadow = GetShadow();
|
LwpShadow* pShadow = GetShadow();
|
||||||
if (pShadow)
|
if (!pShadow)
|
||||||
{
|
return nullptr;
|
||||||
LwpColor color = pShadow->GetColor();
|
LwpColor color = pShadow->GetColor();
|
||||||
double offsetX = pShadow->GetOffsetX();
|
double offsetX = pShadow->GetOffsetX();
|
||||||
double offsetY = pShadow->GetOffsetY();
|
double offsetY = pShadow->GetOffsetY();
|
||||||
|
|
||||||
if (offsetX && offsetY && color.IsValidColor())
|
if (!offsetX || !offsetY || !color.IsValidColor())
|
||||||
{
|
return nullptr;
|
||||||
XFShadow* pXFShadow = new XFShadow();
|
XFShadow* pXFShadow = new XFShadow();
|
||||||
enumXFShadowPos eXFShadowPos = enumXFShadowLeftTop;
|
enumXFShadowPos eXFShadowPos = enumXFShadowLeftTop;
|
||||||
double fOffset = 0;
|
double fOffset = 0;
|
||||||
@@ -1902,9 +1902,6 @@ XFShadow* LwpLayout::GetXFShadow()
|
|||||||
pXFShadow->SetColor(XFColor(color.To24Color()));
|
pXFShadow->SetColor(XFColor(color.To24Color()));
|
||||||
|
|
||||||
return pXFShadow;
|
return pXFShadow;
|
||||||
}
|
|
||||||
}
|
|
||||||
return nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -545,8 +545,8 @@ LwpFooterLayout* LwpPageLayout::GetFooterLayout()
|
|||||||
*/
|
*/
|
||||||
LwpPageLayout* LwpPageLayout::GetOddChildLayout()
|
LwpPageLayout* LwpPageLayout::GetOddChildLayout()
|
||||||
{
|
{
|
||||||
if (IsComplex())
|
if (!IsComplex())
|
||||||
{
|
return nullptr;
|
||||||
rtl::Reference<LwpVirtualLayout> xLay(
|
rtl::Reference<LwpVirtualLayout> xLay(
|
||||||
dynamic_cast<LwpVirtualLayout*>(GetChildHead().obj().get()));
|
dynamic_cast<LwpVirtualLayout*>(GetChildHead().obj().get()));
|
||||||
o3tl::sorted_vector<LwpVirtualLayout*> aSeen;
|
o3tl::sorted_vector<LwpVirtualLayout*> aSeen;
|
||||||
@@ -567,7 +567,6 @@ LwpPageLayout* LwpPageLayout::GetOddChildLayout()
|
|||||||
}
|
}
|
||||||
xLay.set(dynamic_cast<LwpVirtualLayout*>(xLay->GetNext().obj().get()));
|
xLay.set(dynamic_cast<LwpVirtualLayout*>(xLay->GetNext().obj().get()));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user