https://bugs.documentfoundation.org/show_bug.cgi?id=153251

            Bug ID: 153251
           Summary: remove s_nPixelTwips
           Product: LibreOffice
           Version: 7.6.0.0 alpha0+ Master
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: [email protected]
          Reporter: [email protected]

SwViewOptions has a rather grim and unhelpful global variable:

sw/inc/viewopt.hxx:    static sal_uInt16   s_nPixelTwips;// 1 Pixel == ? Twips

Which is only used in one place:

sw/source/uibase/config/viewopt.cxx-void SwViewOption::PaintPostIts(
OutputDevice *pOut, const SwRect &rRect, bool bIsScript )

Where (it seems to me) - we could more profitably work out how many twips to
the pixel there are for the screen the view is rendered to there with:

sw/source/uibase/config/viewopt.cxx:        s_nPixelTwips =
o3tl::narrowing<sal_uInt16>(pWin->PixelToLogic( Size(1,1) ).Height());

And also kill the SwViewOption::Init at the same time.

This global static seems to have come from the initial checkin:

commit 7b0b5cdfeed656b279bc32cd929630d5fc25878b
Author: Jens-Heiner Rechtien <[email protected]>
Date:   Mon Sep 18 16:15:01 2000 +0000

+USHORT SwViewOption::nPixelTwips = 0;   //ein Pixel auf dem Bildschirm

Thanks !

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to