summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/cfwl_widget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fwl/core/cfwl_widget.cpp')
-rw-r--r--xfa/fwl/core/cfwl_widget.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/xfa/fwl/core/cfwl_widget.cpp b/xfa/fwl/core/cfwl_widget.cpp
index 80ff57ce13..225721be43 100644
--- a/xfa/fwl/core/cfwl_widget.cpp
+++ b/xfa/fwl/core/cfwl_widget.cpp
@@ -65,12 +65,12 @@ bool CFWL_Widget::IsInstance(const CFX_WideStringC& wsClass) const {
return false;
}
-void CFWL_Widget::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) {
- if (!bAutoSize) {
- rect = m_pProperties->m_rtWidget;
- return;
- }
- InflateWidgetRect(rect);
+CFX_RectF CFWL_Widget::GetAutosizedWidgetRect() {
+ return CFX_RectF();
+}
+
+CFX_RectF CFWL_Widget::GetWidgetRect() {
+ return m_pProperties->m_rtWidget;
}
void CFWL_Widget::InflateWidgetRect(CFX_RectF& rect) {
@@ -201,7 +201,7 @@ void CFWL_Widget::TransformTo(CFWL_Widget* pWidget,
CFX_Matrix m;
CFWL_Widget* parent = GetParent();
if (parent) {
- GetWidgetRect(r, false);
+ r = GetWidgetRect();
fx += r.left;
fy += r.top;
GetMatrix(m, true);
@@ -210,8 +210,9 @@ void CFWL_Widget::TransformTo(CFWL_Widget* pWidget,
CFWL_Widget* form1 = m_pWidgetMgr->GetSystemFormWidget(this);
if (!form1)
return;
+
if (!pWidget) {
- form1->GetWidgetRect(r, false);
+ r = form1->GetWidgetRect();
fx += r.left;
fy += r.top;
return;
@@ -220,10 +221,10 @@ void CFWL_Widget::TransformTo(CFWL_Widget* pWidget,
if (!form2)
return;
if (form1 != form2) {
- form1->GetWidgetRect(r, false);
+ r = form1->GetWidgetRect();
fx += r.left;
fy += r.top;
- form2->GetWidgetRect(r, false);
+ r = form2->GetWidgetRect();
fx -= r.left;
fy -= r.top;
}
@@ -234,7 +235,7 @@ void CFWL_Widget::TransformTo(CFWL_Widget* pWidget,
m1.SetIdentity();
m1.SetReverse(m);
m1.TransformPoint(fx, fy);
- pWidget->GetWidgetRect(r, false);
+ r = pWidget->GetWidgetRect();
fx -= r.left;
fy -= r.top;
}
@@ -261,7 +262,7 @@ void CFWL_Widget::GetMatrix(CFX_Matrix& matrix, bool bGlobal) {
for (int32_t i = count - 2; i >= 0; i--) {
parent = parents.GetAt(i);
parent->GetMatrix(ctmOnParent, false);
- parent->GetWidgetRect(rect, false);
+ rect = parent->GetWidgetRect();
matrix.Concat(ctmOnParent, true);
matrix.Translate(rect.left, rect.top, true);
}
@@ -686,8 +687,7 @@ CFX_SizeF CFWL_Widget::GetOffsetFromParent(CFWL_Widget* pParent) {
CFWL_Widget* pDstWidget = GetParent();
while (pDstWidget && pDstWidget != pParent) {
- CFX_RectF rtDst;
- pDstWidget->GetWidgetRect(rtDst, false);
+ CFX_RectF rtDst = pDstWidget->GetWidgetRect();
szRet += CFX_SizeF(rtDst.left, rtDst.top);
pDstWidget = pWidgetMgr->GetParentWidget(pDstWidget);
}