Kaydet (Commit) b73dec8a authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: rhbz#1006850 crash in SwCommentRuler::GetCommentControlRegion

Change-Id: Ic846da3b22391d724da6f8df94dd771e89d2efb4
üst e457724d
...@@ -247,6 +247,13 @@ void SwCommentRuler::UpdateCommentHelpText() ...@@ -247,6 +247,13 @@ void SwCommentRuler::UpdateCommentHelpText()
Rectangle SwCommentRuler::GetCommentControlRegion() Rectangle SwCommentRuler::GetCommentControlRegion()
{ {
SwPostItMgr *pPostItMgr = mpViewShell->GetPostItMgr(); SwPostItMgr *pPostItMgr = mpViewShell->GetPostItMgr();
//rhbz#1006850 When the SwPostItMgr ctor is called from SwView::SwView it
//triggers an update of the uiview, but the result of the ctor hasn't been
//set into the mpViewShell yet, so GetPostItMgr is temporarily still NULL
if (!pPostItMgr)
return Rectangle();
//FIXME When the page width is larger then screen, the ruler is misplaced by one pixel //FIXME When the page width is larger then screen, the ruler is misplaced by one pixel
long nLeft = GetWinOffset() + GetPageOffset() + mpSwWin->LogicToPixel(Size(GetPageWidth(), 0)).Width(); long nLeft = GetWinOffset() + GetPageOffset() + mpSwWin->LogicToPixel(Size(GetPageWidth(), 0)).Width();
long nTop = 0 + 4; // Ruler::ImplDraw uses RULER_OFF (value: 3px) as offset, and Ruler::ImplFormat adds one extra pixel long nTop = 0 + 4; // Ruler::ImplDraw uses RULER_OFF (value: 3px) as offset, and Ruler::ImplFormat adds one extra pixel
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment