summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls/layctrl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/tbxctrls/layctrl.cxx')
-rw-r--r--svx/source/tbxctrls/layctrl.cxx58
1 files changed, 29 insertions, 29 deletions
diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx
index 157dca24d298..3b460fb8ec09 100644
--- a/svx/source/tbxctrls/layctrl.cxx
+++ b/svx/source/tbxctrls/layctrl.cxx
@@ -275,43 +275,43 @@ void TableWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectang
}
// the text near the mouse cursor telling the table dimensions
- if (nCol && nLine)
+ if (!nCol || !nLine)
+ return;
+
+ OUString aText;
+ aText += OUString::number( nCol );
+ aText += " x ";
+ aText += OUString::number( nLine );
+ if(GetId() == FN_SHOW_MULTIPLE_PAGES)
{
- OUString aText;
- aText += OUString::number( nCol );
- aText += " x ";
- aText += OUString::number( nLine );
- if(GetId() == FN_SHOW_MULTIPLE_PAGES)
- {
- aText += " ";
- aText += SvxResId(RID_SVXSTR_PAGES);
- }
+ aText += " ";
+ aText += SvxResId(RID_SVXSTR_PAGES);
+ }
- Size aTextSize(rRenderContext.GetTextWidth(aText), rRenderContext.GetTextHeight());
+ Size aTextSize(rRenderContext.GetTextWidth(aText), rRenderContext.GetTextHeight());
- long nTextX = nSelectionWidth + mnTableCellWidth;
- long nTextY = nSelectionHeight + mnTableCellHeight;
- const long nTipBorder = 2;
+ long nTextX = nSelectionWidth + mnTableCellWidth;
+ long nTextY = nSelectionHeight + mnTableCellHeight;
+ const long nTipBorder = 2;
- if (aTextSize.Width() + mnTablePosX + mnTableCellWidth + 2 * nTipBorder < nSelectionWidth)
- nTextX = nSelectionWidth - mnTableCellWidth - aTextSize.Width();
+ if (aTextSize.Width() + mnTablePosX + mnTableCellWidth + 2 * nTipBorder < nSelectionWidth)
+ nTextX = nSelectionWidth - mnTableCellWidth - aTextSize.Width();
- if (aTextSize.Height() + mnTablePosY + mnTableCellHeight + 2 * nTipBorder < nSelectionHeight)
- nTextY = nSelectionHeight - mnTableCellHeight - aTextSize.Height();
+ if (aTextSize.Height() + mnTablePosY + mnTableCellHeight + 2 * nTipBorder < nSelectionHeight)
+ nTextY = nSelectionHeight - mnTableCellHeight - aTextSize.Height();
- rRenderContext.SetLineColor(aLineColor);
- rRenderContext.SetFillColor(aBackgroundColor);
- rRenderContext.DrawRect(tools::Rectangle(nTextX - 2 * nTipBorder,
- nTextY - 2 * nTipBorder,
- nTextX + aTextSize.Width() + nTipBorder,
- nTextY + aTextSize.Height() + nTipBorder));
+ rRenderContext.SetLineColor(aLineColor);
+ rRenderContext.SetFillColor(aBackgroundColor);
+ rRenderContext.DrawRect(tools::Rectangle(nTextX - 2 * nTipBorder,
+ nTextY - 2 * nTipBorder,
+ nTextX + aTextSize.Width() + nTipBorder,
+ nTextY + aTextSize.Height() + nTipBorder));
- // #i95350# force RTL output
- if (IsRTLEnabled())
- aText = OUStringLiteral1(0x202D) + aText;
+ // #i95350# force RTL output
+ if (IsRTLEnabled())
+ aText = OUStringLiteral1(0x202D) + aText;
- rRenderContext.DrawText(Point(nTextX, nTextY), aText);
- }
+ rRenderContext.DrawText(Point(nTextX, nTextY), aText);
}