diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-04-14 14:11:59 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-04-14 17:29:35 +0200 |
commit | 64644e0d92046642e1f0948b867fdad8a5916ccc (patch) | |
tree | 36ab59b77fb25b127ce59b41ae61db9dead570a2 /svx | |
parent | solve assert on restoring redline mode on exporting of abi9915-1.odt to doc (diff) | |
download | core-64644e0d92046642e1f0948b867fdad8a5916ccc.tar.gz core-64644e0d92046642e1f0948b867fdad8a5916ccc.zip |
svx: hack around LogicToPixel assert in SvxRuler::UpdateTabs
Somehow this gets called in a different order than in 4.3; with the
bugdoc from tdf#89478 i get this assert on master because of the
uninitizlized / LONG_MAX.
Change-Id: Iacce21571246c96276bd3c126f982282df7fc491
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/svxruler.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index 2ac5aaeb7234..45a6ed4c7415 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -502,7 +502,9 @@ void SvxRuler::UpdateFrame() lLogicNullOffset = mxColumnItem.get() ? mxColumnItem->GetLeft(): mxLRSpaceItem->GetLeft(); if(bAppSetNullOffset) + { lAppNullOffset += lLogicNullOffset - nOld; + } if(!bAppSetNullOffset || lAppNullOffset == LONG_MAX) { @@ -535,7 +537,9 @@ void SvxRuler::UpdateFrame() lLogicNullOffset = mxColumnItem.get() ? mxColumnItem->GetLeft() : mxULSpaceItem->GetUpper(); if(bAppSetNullOffset) + { lAppNullOffset += lLogicNullOffset - nOld; + } if(!bAppSetNullOffset || lAppNullOffset == LONG_MAX) { @@ -1022,6 +1026,8 @@ void SvxRuler::Update(const SvxPagePosSizeItem *pItem) // new value of page attr void SvxRuler::SetDefTabDist(long inDefTabDist) // New distance for DefaultTabs in App-Metrics { + if (lAppNullOffset == LONG_MAX) + UpdateFrame(); // hack: try to get lAppNullOffset initialized /* New distance is set for DefaultTabs */ lDefTabDist = inDefTabDist; UpdateTabs(); @@ -2046,7 +2052,9 @@ void SvxRuler::ApplyMargins() } if(bAppSetNullOffset) + { lAppNullOffset += lLogicNullOffset - lOldNull; + } long nRight; if(mxRulerImpl->lMaxRightLogic != -1 @@ -2080,7 +2088,9 @@ void SvxRuler::ApplyMargins() ConvertVPosLogic(GetFrameLeft()) - lAppNullOffset, mxULSpaceItem->GetUpper())); if(bAppSetNullOffset) + { lAppNullOffset += lLogicNullOffset - lOldNull; + } mxULSpaceItem->SetLower( PixelVAdjust( std::max((long)0, mxPagePosItem->GetHeight() - |