[Libreoffice-commits] core.git: 2 commits - canvas/source compilerplugins/clang include/vcl vcl/headless vcl/inc vcl/opengl vcl/qa vcl/qt5 vcl/quartz vcl/source vcl/unx vcl/win

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Thu Sep 26 01:05:06 UTC 2019


 canvas/source/directx/dx_vcltools.cxx            |    6 -
 compilerplugins/clang/unnecessaryvirtual.results |   54 ++++++++----
 include/vcl/Scanline.hxx                         |    5 -
 include/vcl/bitmapaccess.hxx                     |    4 
 vcl/headless/svpbmp.cxx                          |   17 ---
 vcl/inc/bitmap/ScanlineTools.hxx                 |   30 ------
 vcl/inc/qt5/Qt5Tools.hxx                         |    4 
 vcl/inc/wizdlg.hxx                               |   34 ++-----
 vcl/opengl/salbmp.cxx                            |   24 -----
 vcl/qa/cppunit/BitmapTest.cxx                    |   15 ---
 vcl/qa/cppunit/ScanlineToolsTest.cxx             |   43 ---------
 vcl/qa/cppunit/canvasbitmaptest.cxx              |    2 
 vcl/qt5/Qt5Bitmap.cxx                            |   29 +-----
 vcl/quartz/salbmp.cxx                            |   55 +-----------
 vcl/quartz/salgdicommon.cxx                      |    2 
 vcl/source/control/wizardmachine.cxx             |   49 ++---------
 vcl/source/gdi/bmpacc.cxx                        |   20 ----
 vcl/source/gdi/bmpacc2.cxx                       |   24 -----
 vcl/source/gdi/bmpfast.cxx                       |  100 -----------------------
 vcl/source/gdi/dibtools.cxx                      |    4 
 vcl/source/gdi/salmisc.cxx                       |    6 -
 vcl/source/helper/canvasbitmap.cxx               |   20 ----
 vcl/unx/generic/app/saldisp.cxx                  |   18 ----
 vcl/unx/generic/gdi/salbmp.cxx                   |   84 +------------------
 vcl/unx/generic/print/genpspgraphics.cxx         |    7 -
 vcl/win/gdi/salbmp.cxx                           |    3 
 26 files changed, 92 insertions(+), 567 deletions(-)

New commits:
commit b722989678429fbdb353737660a19ecd1db28d89
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Sep 25 13:15:32 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Sep 26 03:04:12 2019 +0200

    loplugin:unnecessaryvirtual
    
    Change-Id: I866d7bd03a41260a9b4f4be87a7a02d3ceecc1c7
    Reviewed-on: https://gerrit.libreoffice.org/79534
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/compilerplugins/clang/unnecessaryvirtual.results b/compilerplugins/clang/unnecessaryvirtual.results
index cde0a75285f8..1ad299a7ca47 100644
--- a/compilerplugins/clang/unnecessaryvirtual.results
+++ b/compilerplugins/clang/unnecessaryvirtual.results
@@ -20,11 +20,7 @@ basic/source/comp/codegen.cxx:526
     _Bool BufferTransformer::processParams()
 chart2/source/inc/WeakListenerAdapter.hxx:57
     void chart::WeakListenerAdapter::disposing(const struct com::sun::star::lang::EventObject &,)
-desktop/source/deployment/gui/dp_gui_extlistbox.hxx:200
-    int dp_gui::ExtensionBox_Impl::getItemCount()const
-desktop/source/deployment/gui/dp_gui_extlistbox.hxx:208
-    int dp_gui::ExtensionBox_Impl::getSelIndex()const
-extensions/source/dbpilots/unoautopilot.hxx:99
+extensions/source/dbpilots/unoautopilot.hxx:98
     class cppu::IPropertyArrayHelper * dbp::OUnoAutoPilot::createArrayHelper()const
 extensions/source/propctrlr/commoncontrol.hxx:127
     short pcr::CommonBehaviourControl::getControlType()
@@ -88,8 +84,8 @@ include/svl/svdde.hxx:244
     _Bool DdeTopic::StartAdviseLoop()
 include/svl/svdde.hxx:300
     void DdeService::~DdeService()
-include/svtools/simptabl.hxx:79
-    void SvSimpleTable::HBarClick()
+include/svx/svdmodel.hxx:590
+    class ImageMap * SdrModel::GetImageMapForObject(class SdrObject *,)
 include/toolkit/controls/geometrycontrolmodel.hxx:184
     void OGeometryControlModel::fillProperties(class com::sun::star::uno::Sequence<struct com::sun::star::beans::Property> &,class com::sun::star::uno::Sequence<struct com::sun::star::beans::Property> &,)const
 include/vbahelper/vbacollectionimpl.hxx:290
@@ -120,6 +116,8 @@ include/vcl/weld.hxx:97
     void weld::Widget::set_visible(_Bool,)
 include/vcl/window.hxx:1155
     class rtl::OString vcl::Window::GetScreenshotId()const
+include/vcl/wizardmachine.hxx:208
+    _Bool vcl::OWizardMachine::prepareLeaveCurrentState(enum vcl::WizardTypes::CommitPageReason,)
 sc/source/core/opencl/formulagroupcl.cxx:1051
     _Bool sc::opencl::DynamicKernelSlidingArgument::NeedParallelReduction()const
 sc/source/core/opencl/formulagroupcl.cxx:1059
@@ -216,13 +214,13 @@ slideshow/source/engine/animationfactory.cxx:447
     void slideshow::internal::(anonymous namespace)::GenericAnimation::start(const class std::shared_ptr<class slideshow::internal::AnimatableShape> &,const class std::shared_ptr<class slideshow::internal::ShapeAttributeLayer> &,)
 sw/inc/flypos.hxx:37
     void SwPosFlyFrame::~SwPosFlyFrame()
-sw/source/ui/dbui/mmaddressblockpage.hxx:235
+sw/source/ui/dbui/mmaddressblockpage.hxx:242
     class weld::TreeView * SwCustomizeAddressBlockDialog::get_drag_source()const
 vcl/inc/salframe.hxx:145
     void SalFrame::SetRepresentedURL(const class rtl::OUString &,)
 vcl/inc/salframe.hxx:191
     void SalFrame::Flush(const class tools::Rectangle &,)
-vcl/inc/salinst.hxx:93
+vcl/inc/salinst.hxx:92
     _Bool SalInstance::SVMainHook(int *,)
 vcl/inc/salmenu.hxx:80
     _Bool SalMenu::AddMenuBarButton(const struct SalMenuButtonItem &,)
@@ -268,15 +266,37 @@ vcl/inc/unx/salframe.h:208
     void X11SalFrame::updateGraphics(_Bool,)
 vcl/inc/unx/salinst.h:45
     class SalX11Display * X11SalInstance::CreateDisplay()const
+vcl/inc/wizdlg.hxx:117
+    void vcl::RoadmapWizard::ActivatePage()
+vcl/inc/wizdlg.hxx:118
+    _Bool vcl::RoadmapWizard::DeactivatePage()
+vcl/inc/wizdlg.hxx:158
+    _Bool vcl::RoadmapWizard::canAdvance()const
+vcl/inc/wizdlg.hxx:166
+    void vcl::RoadmapWizard::updateTravelUI()
+vcl/inc/wizdlg.hxx:185
+    class VclPtr<class TabPage> vcl::RoadmapWizard::createPage(short,)
+vcl/inc/wizdlg.hxx:188
+    void vcl::RoadmapWizard::enterState(short,)
+vcl/inc/wizdlg.hxx:200
+    _Bool vcl::RoadmapWizard::prepareLeaveCurrentState(enum vcl::WizardTypes::CommitPageReason,)
+vcl/inc/wizdlg.hxx:214
+    _Bool vcl::RoadmapWizard::leaveState(short,)
+vcl/inc/wizdlg.hxx:224
+    short vcl::RoadmapWizard::determineNextState(short,)const
+vcl/inc/wizdlg.hxx:229
+    _Bool vcl::RoadmapWizard::onFinish()
+vcl/inc/wizdlg.hxx:306
+    class vcl::IWizardPageController * vcl::RoadmapWizard::getPageController(class TabPage *,)const
 workdir/../vcl/inc/qt5/Qt5FilePicker.hxx:145
     void Qt5FilePicker::disposing(const struct com::sun::star::lang::EventObject &,)
-workdir/../vcl/inc/qt5/Qt5Frame.hxx:158
+workdir/../vcl/inc/qt5/Qt5Frame.hxx:160
     void Qt5Frame::registerDragSource(class Qt5DragSource *,)
-workdir/../vcl/inc/qt5/Qt5Frame.hxx:159
+workdir/../vcl/inc/qt5/Qt5Frame.hxx:161
     void Qt5Frame::deregisterDragSource(const class Qt5DragSource *,)
-workdir/../vcl/inc/qt5/Qt5Frame.hxx:160
+workdir/../vcl/inc/qt5/Qt5Frame.hxx:162
     void Qt5Frame::registerDropTarget(class Qt5DropTarget *,)
-workdir/../vcl/inc/qt5/Qt5Frame.hxx:161
+workdir/../vcl/inc/qt5/Qt5Frame.hxx:163
     void Qt5Frame::deregisterDropTarget(const class Qt5DropTarget *,)
 writerfilter/source/ooxml/OOXMLFactory.hxx:72
     void writerfilter::ooxml::OOXMLFactory_ns::startAction(class writerfilter::ooxml::OOXMLFastContextHandler *,)
@@ -286,12 +306,12 @@ writerfilter/source/ooxml/OOXMLFactory.hxx:74
     void writerfilter::ooxml::OOXMLFactory_ns::endAction(class writerfilter::ooxml::OOXMLFastContextHandler *,)
 writerfilter/source/ooxml/OOXMLFactory.hxx:75
     void writerfilter::ooxml::OOXMLFactory_ns::attributeAction(class writerfilter::ooxml::OOXMLFastContextHandler *,int,const class tools::SvRef<class writerfilter::ooxml::OOXMLValue> &,)
-xmloff/source/forms/elementimport.hxx:575
+xmloff/source/forms/elementimport.hxx:574
     class rtl::Reference<class SvXMLImportContext> xmloff::OContainerImport::CreateChildContext(unsigned short,const class rtl::OUString &,const class com::sun::star::uno::Reference<class com::sun::star::xml::sax::XAttributeList> &,)
-xmloff/source/forms/elementimport.hxx:578
+xmloff/source/forms/elementimport.hxx:577
     void xmloff::OContainerImport::EndElement()
-xmloff/source/forms/elementimport.hxx:583
+xmloff/source/forms/elementimport.hxx:582
     class com::sun::star::uno::Reference<class com::sun::star::beans::XPropertySet> xmloff::OContainerImport::createElement()
-xmloff/source/forms/elementimport.hxx:610
+xmloff/source/forms/elementimport.hxx:609
     class com::sun::star::uno::Reference<class com::sun::star::beans::XPropertySet> xmloff::OColumnImport::createElement()
 
diff --git a/vcl/inc/wizdlg.hxx b/vcl/inc/wizdlg.hxx
index 7818160ff721..68cccb507d33 100644
--- a/vcl/inc/wizdlg.hxx
+++ b/vcl/inc/wizdlg.hxx
@@ -114,8 +114,7 @@ namespace vcl
         virtual void        StateChanged( StateChangedType nStateChange ) override;
         virtual bool        EventNotify( NotifyEvent& rNEvt ) override;
 
-        virtual void        ActivatePage();
-        virtual bool        DeactivatePage();
+        void                ActivatePage();
 
         virtual void        queue_resize(StateChangedType eReason = StateChangedType::Layout) override;
 
@@ -155,7 +154,7 @@ namespace vcl
         void                setTitleBase(const OUString& _rTitleBase);
 
         /// determines whether there is a next state to which we can advance
-        virtual bool        canAdvance() const;
+        bool            canAdvance() const;
 
         /** updates the user interface which deals with traveling in the wizard
 
@@ -163,7 +162,7 @@ namespace vcl
             itself allow to advance to the next state (<code>canAdvance</code>), and enables the "Next"
             button if and only if this is the case.
         */
-        virtual void        updateTravelUI();
+        void            updateTravelUI();
 
         void            SetRoadmapHelpId( const OString& _rId );
 
@@ -182,10 +181,10 @@ namespace vcl
     protected:
 
         /// to override to create new pages
-        virtual VclPtr<TabPage> createPage(WizardTypes::WizardState nState);
+        VclPtr<TabPage>     createPage(WizardTypes::WizardState nState);
 
         /// will be called when a new page is about to be displayed
-        virtual void        enterState(WizardTypes::WizardState _nState);
+        void                enterState(WizardTypes::WizardState _nState);
 
         /** will be called when the current state is about to be left for the given reason
 
@@ -197,21 +196,7 @@ namespace vcl
             @return
                 <TRUE/> if and only if the page is allowed to be left
         */
-        virtual bool        prepareLeaveCurrentState( WizardTypes::CommitPageReason eReason );
-
-        /** will be called when the given state is left
-
-            This is the very last possibility for derived classes to veto the deactivation
-            of a page.
-
-            @todo Normally, we would not need the return value here - derived classes now have
-            the possibility to veto page deactivations in <member>prepareLeaveCurrentState</member>. However,
-            changing this return type is too incompatible at the moment ...
-
-            @return
-                <TRUE/> if and only if the page is allowed to be left
-        */
-        virtual bool        leaveState(WizardTypes::WizardState _nState);
+        bool                prepareLeaveCurrentState( WizardTypes::CommitPageReason eReason );
 
         /** determine the next state to travel from the given one
 
@@ -221,12 +206,12 @@ namespace vcl
 
             @see activatePath
         */
-        virtual WizardTypes::WizardState determineNextState(WizardTypes::WizardState nCurrentState) const;
+        WizardTypes::WizardState determineNextState(WizardTypes::WizardState nCurrentState) const;
 
         /** called when the finish button is pressed
             <p>By default, only the base class' Finish method (which is not virtual) is called</p>
         */
-        virtual bool        onFinish();
+        bool                onFinish();
 
         /// travel to the next state
         bool                travelNext();
@@ -302,8 +287,7 @@ namespace vcl
         */
         WizardTypes::WizardState getCurrentState() const { return GetCurLevel(); }
 
-        virtual IWizardPageController*
-                                getPageController( TabPage* _pCurrentPage ) const;
+        static IWizardPageController*  getPageController( TabPage* _pCurrentPage );
 
         /** retrieves a copy of the state history, i.e. all states we already visited
         */
diff --git a/vcl/source/control/wizardmachine.cxx b/vcl/source/control/wizardmachine.cxx
index 91daa8ddfb19..fc394da25c77 100644
--- a/vcl/source/control/wizardmachine.cxx
+++ b/vcl/source/control/wizardmachine.cxx
@@ -588,12 +588,6 @@ namespace vcl
         enterState( nCurrentLevel );
     }
 
-    bool RoadmapWizard::DeactivatePage()
-    {
-        WizardTypes::WizardState nCurrentState = getCurrentState();
-        return leaveState(nCurrentState);
-    }
-
     void RoadmapWizard::defaultButton(WizardButtonFlags _nWizardButtonFlags)
     {
         // the new default button
@@ -629,32 +623,22 @@ namespace vcl
 
     bool RoadmapWizard::ShowPage( sal_uInt16 nLevel )
     {
-        if ( DeactivatePage() )
-        {
-            mnCurLevel = nLevel;
-            ActivatePage();
-            ImplShowTabPage( ImplGetPage( mnCurLevel ) );
-            return true;
-        }
-        else
-            return false;
+        mnCurLevel = nLevel;
+        ActivatePage();
+        ImplShowTabPage( ImplGetPage( mnCurLevel ) );
+        return true;
     }
 
     bool RoadmapWizard::Finish( long nResult )
     {
-        if ( DeactivatePage() )
-        {
-            if ( mpCurTabPage )
-                mpCurTabPage->DeactivatePage();
+        if ( mpCurTabPage )
+            mpCurTabPage->DeactivatePage();
 
-            if ( IsInExecute() )
-                EndDialog( nResult );
-            else if ( GetStyle() & WB_CLOSEABLE )
-                Close();
-            return true;
-        }
-        else
-            return false;
+        if ( IsInExecute() )
+            EndDialog( nResult );
+        else if ( GetStyle() & WB_CLOSEABLE )
+            Close();
+        return true;
     }
 
     void RoadmapWizard::AddPage( TabPage* pPage )
@@ -829,15 +813,6 @@ namespace vcl
             m_pCancel->Enable(_bEnable);
     }
 
-    bool RoadmapWizard::leaveState(WizardTypes::WizardState)
-    {
-        // no need to ask the page here.
-        // If we reach this point, we already gave the current page the chance to commit it's data,
-        // and it was allowed to commit it's data
-
-        return true;
-    }
-
     bool RoadmapWizard::onFinish()
     {
         return Finish( RET_OK );
@@ -1054,7 +1029,7 @@ namespace vcl
         travelNext();
     }
 
-    IWizardPageController* RoadmapWizard::getPageController( TabPage* _pCurrentPage ) const
+    IWizardPageController* RoadmapWizard::getPageController( TabPage* _pCurrentPage )
     {
         IWizardPageController* pController = dynamic_cast< IWizardPageController* >( _pCurrentPage );
         return pController;
commit 78b9dac2ee77bf6efc1298962cbeca284db5b00a
Author:     Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Tue Sep 24 21:38:51 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Sep 26 03:04:01 2019 +0200

    remove internal use of 16-bit packed formats
    
    none of our supported hardware uses these any more
    
    Change-Id: Ic95d6df619a05df0bec1f5870596cb2bb3bcc6cb
    Reviewed-on: https://gerrit.libreoffice.org/79476
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/canvas/source/directx/dx_vcltools.cxx b/canvas/source/directx/dx_vcltools.cxx
index d91e60a99166..d88c586c3245 100644
--- a/canvas/source/directx/dx_vcltools.cxx
+++ b/canvas/source/directx/dx_vcltools.cxx
@@ -180,7 +180,6 @@ namespace dxcanvas
                     //    ScanlineFormat::N1BitMsbPal
                     //    ScanlineFormat::N4BitMsnPal
                     //    ScanlineFormat::N8BitPal
-                    //    ScanlineFormat::N16BitTcLsbMask
                     //    ScanlineFormat::N24BitTcBgr
                     //    ScanlineFormat::N32BitTcMask
 
@@ -253,7 +252,6 @@ namespace dxcanvas
                             // formats, too.
                             case ScanlineFormat::N1BitMsbPal:
                             case ScanlineFormat::N4BitMsnPal:
-                            case ScanlineFormat::N16BitTcLsbMask:
                             case ScanlineFormat::N32BitTcMask:
                             {
                                 Scanline pAScan = pAlphaReadAccess->GetScanline( y );
@@ -281,7 +279,6 @@ namespace dxcanvas
                             case ScanlineFormat::N4BitLsnPal:
                             case ScanlineFormat::N8BitTcMask:
                             case ScanlineFormat::N24BitTcRgb:
-                            case ScanlineFormat::N16BitTcMsbMask:
                             case ScanlineFormat::N32BitTcAbgr:
                             case ScanlineFormat::N32BitTcArgb:
                             case ScanlineFormat::N32BitTcBgra:
@@ -306,7 +303,6 @@ namespace dxcanvas
                     //    ScanlineFormat::N1BitMsbPal
                     //    ScanlineFormat::N4BitMsnPal
                     //    ScanlineFormat::N8BitPal
-                    //    ScanlineFormat::N16BitTcLsbMask
                     //    ScanlineFormat::N24BitTcBgr
                     //    ScanlineFormat::N32BitTcMask
 
@@ -392,7 +388,6 @@ namespace dxcanvas
                             // formats, too.
                             case ScanlineFormat::N1BitMsbPal:
                             case ScanlineFormat::N4BitMsnPal:
-                            case ScanlineFormat::N16BitTcLsbMask:
                             case ScanlineFormat::N32BitTcMask:
                             {
                                 Scanline pMScan = pMaskReadAccess->GetScanline( y );
@@ -419,7 +414,6 @@ namespace dxcanvas
                             case ScanlineFormat::N4BitLsnPal:
                             case ScanlineFormat::N8BitTcMask:
                             case ScanlineFormat::N24BitTcRgb:
-                            case ScanlineFormat::N16BitTcMsbMask:
                             case ScanlineFormat::N32BitTcAbgr:
                             case ScanlineFormat::N32BitTcArgb:
                             case ScanlineFormat::N32BitTcBgra:
diff --git a/include/vcl/Scanline.hxx b/include/vcl/Scanline.hxx
index 4c68efe4c41e..839130e38141 100644
--- a/include/vcl/Scanline.hxx
+++ b/include/vcl/Scanline.hxx
@@ -37,9 +37,6 @@ enum class ScanlineFormat {
     N8BitPal          = 0x00000010,
     N8BitTcMask       = 0x00000020,
 
-    N16BitTcMsbMask   = 0x00000040,
-    N16BitTcLsbMask   = 0x00000080,
-
     N24BitTcBgr       = 0x00000100,
     N24BitTcRgb       = 0x00000200,
 
@@ -54,7 +51,7 @@ enum class ScanlineFormat {
 
 namespace o3tl
 {
-    template<> struct typed_flags<ScanlineFormat> : is_typed_flags<ScanlineFormat, 0x0001fbff> {};
+    template<> struct typed_flags<ScanlineFormat> : is_typed_flags<ScanlineFormat, 0x0001fb3f> {};
 }
 
 inline ScanlineFormat RemoveScanline(ScanlineFormat nFormat)
diff --git a/include/vcl/bitmapaccess.hxx b/include/vcl/bitmapaccess.hxx
index ad478df19591..8e916ea16e79 100644
--- a/include/vcl/bitmapaccess.hxx
+++ b/include/vcl/bitmapaccess.hxx
@@ -247,8 +247,6 @@ public:
     static BitmapColor GetPixelForN4BitLsnPal(ConstScanline pScanline, long nX, const ColorMask& rMask);
     static BitmapColor GetPixelForN8BitPal(ConstScanline pScanline, long nX, const ColorMask& rMask);
     static BitmapColor GetPixelForN8BitTcMask(ConstScanline pScanline, long nX, const ColorMask& rMask);
-    static BitmapColor GetPixelForN16BitTcMsbMask(ConstScanline pScanline, long nX, const ColorMask& rMask);
-    static BitmapColor GetPixelForN16BitTcLsbMask(ConstScanline pScanline, long nX, const ColorMask& rMask);
     static BitmapColor GetPixelForN24BitTcBgr(ConstScanline pScanline, long nX, const ColorMask& rMask);
     static BitmapColor GetPixelForN24BitTcRgb(ConstScanline pScanline, long nX, const ColorMask& rMask);
     static BitmapColor GetPixelForN32BitTcAbgr(ConstScanline pScanline, long nX, const ColorMask& rMask);
@@ -267,8 +265,6 @@ public:
     static void SetPixelForN4BitLsnPal(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
     static void SetPixelForN8BitPal(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
     static void SetPixelForN8BitTcMask(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
-    static void SetPixelForN16BitTcMsbMask(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
-    static void SetPixelForN16BitTcLsbMask(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
     static void SetPixelForN24BitTcBgr(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
     static void SetPixelForN24BitTcRgb(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
     static void SetPixelForN32BitTcAbgr(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask);
diff --git a/vcl/headless/svpbmp.cxx b/vcl/headless/svpbmp.cxx
index 0ae01dbb2c9f..6dd5aeb64bfb 100644
--- a/vcl/headless/svpbmp.cxx
+++ b/vcl/headless/svpbmp.cxx
@@ -49,7 +49,6 @@ static std::unique_ptr<BitmapBuffer> ImplCreateDIB(
         || nBitCount ==  1
         || nBitCount ==  4
         || nBitCount ==  8
-        || nBitCount == 16
         || nBitCount == 24
         || nBitCount == 32)
         && "Unsupported BitCount!");
@@ -81,22 +80,6 @@ static std::unique_ptr<BitmapBuffer> ImplCreateDIB(
         case 8:
             pDIB->mnFormat = ScanlineFormat::N8BitPal;
             break;
-        case 16:
-        {
-#ifdef OSL_BIGENDIAN
-            pDIB->mnFormat= ScanlineFormat::N16BitTcMsbMask;
-#else
-            pDIB->mnFormat= ScanlineFormat::N16BitTcLsbMask;
-#endif
-            ColorMaskElement aRedMask(0xf800);
-            aRedMask.CalcMaskShift();
-            ColorMaskElement aGreenMask(0x07e0);
-            aGreenMask.CalcMaskShift();
-            ColorMaskElement aBlueMask(0x001f);
-            aBlueMask.CalcMaskShift();
-            pDIB->maColorMask = ColorMask(aRedMask, aGreenMask, aBlueMask);
-            break;
-        }
         case 24:
             pDIB->mnFormat = SVP_24BIT_FORMAT;
             break;
diff --git a/vcl/inc/bitmap/ScanlineTools.hxx b/vcl/inc/bitmap/ScanlineTools.hxx
index e469e29df233..8710a798562d 100644
--- a/vcl/inc/bitmap/ScanlineTools.hxx
+++ b/vcl/inc/bitmap/ScanlineTools.hxx
@@ -78,33 +78,6 @@ public:
     }
 };
 
-class ScanlineTransformer_RGB565 : public ScanlineTransformer
-{
-private:
-    sal_uInt16* pData;
-
-public:
-    virtual void startLine(sal_uInt8* pLine) override
-    {
-        pData = reinterpret_cast<sal_uInt16*>(pLine);
-    }
-
-    virtual void skipPixel(sal_uInt32 nPixel) override { pData += nPixel; }
-
-    virtual Color readPixel() override
-    {
-        const Color nColor((*pData & 0xf800) >> 8, (*pData & 0x07e0) >> 3, (*pData & 0x001f) << 3);
-        pData++;
-        return nColor;
-    }
-
-    virtual void writePixel(Color nColor) override
-    {
-        *pData++ = ((nColor.GetRed() & 0xf8) << 8) | ((nColor.GetGreen() & 0xfc) << 3)
-                   | ((nColor.GetBlue() & 0xf8) >> 3);
-    }
-};
-
 class ScanlineTransformer_8BitPalette : public ScanlineTransformer
 {
 private:
@@ -246,13 +219,12 @@ std::unique_ptr<ScanlineTransformer> getScanlineTransformer(sal_uInt16 nBits,
             return std::make_unique<ScanlineTransformer_4BitPalette>(rPalette);
         case 8:
             return std::make_unique<ScanlineTransformer_8BitPalette>(rPalette);
-        case 16:
-            return std::make_unique<ScanlineTransformer_RGB565>();
         case 24:
             return std::make_unique<ScanlineTransformer_BGR>();
         case 32:
             return std::make_unique<ScanlineTransformer_ARGB>();
         default:
+            assert(false);
             break;
     }
     return nullptr;
diff --git a/vcl/inc/qt5/Qt5Tools.hxx b/vcl/inc/qt5/Qt5Tools.hxx
index 54257de86241..47f37d85c74d 100644
--- a/vcl/inc/qt5/Qt5Tools.hxx
+++ b/vcl/inc/qt5/Qt5Tools.hxx
@@ -96,8 +96,6 @@ inline QImage::Format getBitFormat(sal_uInt16 nBitCount)
             return QImage::Format_Mono;
         case 8:
             return QImage::Format_Indexed8;
-        case 16:
-            return QImage::Format_RGB16;
         case 24:
             return QImage::Format_RGB888;
         case 32:
@@ -117,8 +115,6 @@ inline sal_uInt16 getFormatBits(QImage::Format eFormat)
             return 1;
         case QImage::Format_Indexed8:
             return 8;
-        case QImage::Format_RGB16:
-            return 16;
         case QImage::Format_RGB888:
             return 24;
         case Qt5_DefaultFormat32:
diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx
index 3fb8a397232b..f626c207e488 100644
--- a/vcl/opengl/salbmp.cxx
+++ b/vcl/opengl/salbmp.cxx
@@ -56,10 +56,6 @@ bool determineTextureFormat(sal_uInt16 nBits, GLenum& nFormat, GLenum& nType)
         nFormat = GL_LUMINANCE;
         nType = GL_UNSIGNED_BYTE;
         return true;
-    case 16:
-        nFormat = GL_RGB;
-        nType = GL_UNSIGNED_SHORT_5_6_5;
-        return true;
     case 24:
         nFormat = GL_RGB;
         nType = GL_UNSIGNED_BYTE;
@@ -77,7 +73,7 @@ bool determineTextureFormat(sal_uInt16 nBits, GLenum& nFormat, GLenum& nType)
 
 bool isValidBitCount( sal_uInt16 nBitCount )
 {
-    return (nBitCount == 1) || (nBitCount == 4) || (nBitCount == 8) || (nBitCount == 16) || (nBitCount == 24) || (nBitCount == 32);
+    return (nBitCount == 1) || (nBitCount == 4) || (nBitCount == 8) || (nBitCount == 24) || (nBitCount == 32);
 }
 
 sal_uInt32 lclBytesPerRow(sal_uInt16 nBits, int nWidth)
@@ -87,7 +83,6 @@ sal_uInt32 lclBytesPerRow(sal_uInt16 nBits, int nWidth)
     case 1:  return (nWidth + 7) >> 3;
     case 4:  return (nWidth + 1) >> 1;
     case 8:  return  nWidth;
-    case 16: return  nWidth * 2;
     case 24: return  nWidth * 3;
     case 32: return  nWidth * 4;
     default:
@@ -493,7 +488,7 @@ GLuint OpenGLSalBitmap::CreateTexture()
 
     if (mpUserBuffer != nullptr)
     {
-        if( mnBits == 16 || mnBits == 24 || mnBits == 32 )
+        if( mnBits == 24 || mnBits == 32 )
         {
             // no conversion needed for truecolor
             pData = mpUserBuffer.get();
@@ -579,7 +574,7 @@ bool OpenGLSalBitmap::ReadTexture()
     xContext->state().scissor().disable();
     xContext->state().stencil().disable();
 
-    if ((mnBits == 8 && maPalette.IsGreyPalette()) || mnBits == 16 || mnBits == 24 || mnBits == 32)
+    if ((mnBits == 8 && maPalette.IsGreyPalette()) || mnBits == 24 || mnBits == 32)
     {
         determineTextureFormat(mnBits, nFormat, nType);
 
@@ -803,18 +798,6 @@ BitmapBuffer* OpenGLSalBitmap::AcquireBuffer( BitmapAccessMode nMode )
         case 8:
             pBuffer->mnFormat = ScanlineFormat::N8BitPal;
             break;
-        case 16:
-        {
-            pBuffer->mnFormat = ScanlineFormat::N16BitTcMsbMask;
-            ColorMaskElement aRedMask(0x0000f800);
-            aRedMask.CalcMaskShift();
-            ColorMaskElement aGreenMask(0x000007e0);
-            aGreenMask.CalcMaskShift();
-            ColorMaskElement aBlueMask(0x0000001f);
-            aBlueMask.CalcMaskShift();
-            pBuffer->maColorMask  = ColorMask(aRedMask, aGreenMask, aBlueMask);
-            break;
-        }
         case 24:
         {
             pBuffer->mnFormat = ScanlineFormat::N24BitTcRgb;
@@ -832,6 +815,7 @@ BitmapBuffer* OpenGLSalBitmap::AcquireBuffer( BitmapAccessMode nMode )
             pBuffer->maColorMask  = ColorMask(aRedMask, aGreenMask, aBlueMask);
             break;
         }
+        default: assert(false);
     }
 
     return pBuffer;
diff --git a/vcl/qa/cppunit/BitmapTest.cxx b/vcl/qa/cppunit/BitmapTest.cxx
index fcc630f69bba..4136dce65c01 100644
--- a/vcl/qa/cppunit/BitmapTest.cxx
+++ b/vcl/qa/cppunit/BitmapTest.cxx
@@ -139,21 +139,6 @@ void BitmapTest::testCreation()
     }
 
     {
-        Bitmap aBmp(Size(10, 10), 16);
-        Size aSize = aBmp.GetSizePixel();
-        CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong width", static_cast<long>(10), aSize.Width());
-        CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong height", static_cast<long>(10), aSize.Height());
-        CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong pref size", Size(), aBmp.GetPrefSize());
-        CPPUNIT_ASSERT_MESSAGE("Empty bitmap", !aBmp.IsEmpty());
-        CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong bit count", static_cast<sal_uInt16>(24),
-                                     aBmp.GetBitCount());
-        CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong color count", sal_Int64(16777216),
-                                     aBmp.GetColorCount());
-        CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong byte size", static_cast<sal_uLong>(300),
-                                     aBmp.GetSizeBytes());
-    }
-
-    {
         Bitmap aBmp(Size(10, 10), 24);
         Size aSize = aBmp.GetSizePixel();
         CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong width", static_cast<long>(10), aSize.Width());
diff --git a/vcl/qa/cppunit/ScanlineToolsTest.cxx b/vcl/qa/cppunit/ScanlineToolsTest.cxx
index c0c94c472c6d..bf053d3bc890 100644
--- a/vcl/qa/cppunit/ScanlineToolsTest.cxx
+++ b/vcl/qa/cppunit/ScanlineToolsTest.cxx
@@ -19,7 +19,6 @@ class ScanlineToolsTest : public CppUnit::TestFixture
 {
     void ScanlineTransformer_32_ARGB();
     void ScanlineTransformer_24_BGR();
-    void ScanlineTransformer_16_RGB565();
     void ScanlineTransformer_8bit_Palette();
     void ScanlineTransformer_4bit_Palette();
     void ScanlineTransformer_1bit_Palette();
@@ -27,7 +26,6 @@ class ScanlineToolsTest : public CppUnit::TestFixture
     CPPUNIT_TEST_SUITE(ScanlineToolsTest);
     CPPUNIT_TEST(ScanlineTransformer_32_ARGB);
     CPPUNIT_TEST(ScanlineTransformer_24_BGR);
-    CPPUNIT_TEST(ScanlineTransformer_16_RGB565);
     CPPUNIT_TEST(ScanlineTransformer_8bit_Palette);
     CPPUNIT_TEST(ScanlineTransformer_4bit_Palette);
     CPPUNIT_TEST(ScanlineTransformer_1bit_Palette);
@@ -90,47 +88,6 @@ void ScanlineToolsTest::ScanlineTransformer_24_BGR()
     }
 }
 
-void ScanlineToolsTest::ScanlineTransformer_16_RGB565()
-
-{
-    BitmapPalette aPalette;
-    std::unique_ptr<vcl::bitmap::ScanlineTransformer> pScanlineTransformer
-        = vcl::bitmap::getScanlineTransformer(16, aPalette);
-
-    std::vector<sal_uInt8> aScanLine(5 * 2, 0); // 5 * 2 BytesPerPixel
-    pScanlineTransformer->startLine(aScanLine.data());
-
-    std::vector<Color> aColors{
-        Color(0, 10, 250, 120),  Color(50, 30, 230, 110), Color(100, 50, 210, 100),
-        Color(150, 70, 190, 90), Color(200, 90, 170, 80),
-    };
-
-    for (Color const& aColor : aColors)
-    {
-        pScanlineTransformer->writePixel(aColor);
-    }
-
-    std::vector<sal_uInt8> aExpectedBytes{ 207, 15, 45, 31, 140, 54, 235, 69, 74, 93 };
-
-    for (size_t i = 0; i < aScanLine.size(); ++i)
-    {
-        CPPUNIT_ASSERT_EQUAL(int(aExpectedBytes[i]), int(aScanLine[i]));
-    }
-
-    pScanlineTransformer->startLine(aScanLine.data());
-
-    std::vector<Color> aExpectedColors{
-        Color(8, 248, 120), Color(24, 228, 104), Color(48, 208, 96),
-        Color(64, 188, 88), Color(88, 168, 80),
-    };
-
-    for (size_t i = 0; i < aExpectedColors.size(); ++i)
-    {
-        Color aColor = pScanlineTransformer->readPixel();
-        CPPUNIT_ASSERT_EQUAL(aExpectedColors[i], aColor);
-    }
-}
-
 void ScanlineToolsTest::ScanlineTransformer_8bit_Palette()
 {
     std::vector<Color> aColors{
diff --git a/vcl/qa/cppunit/canvasbitmaptest.cxx b/vcl/qa/cppunit/canvasbitmaptest.cxx
index a51facbee8a8..bd6f96b7ca95 100644
--- a/vcl/qa/cppunit/canvasbitmaptest.cxx
+++ b/vcl/qa/cppunit/canvasbitmaptest.cxx
@@ -620,7 +620,7 @@ public:
 
 void CanvasBitmapTest::runTest()
 {
-    static const sal_Int8 lcl_depths[]={1,4,8,16,24};
+    static const sal_Int8 lcl_depths[]={1,4,8,24};
 
     // Testing VclCanvasBitmap wrapper
 
diff --git a/vcl/qt5/Qt5Bitmap.cxx b/vcl/qt5/Qt5Bitmap.cxx
index 341c5abc64d2..20f477bf9d1b 100644
--- a/vcl/qt5/Qt5Bitmap.cxx
+++ b/vcl/qt5/Qt5Bitmap.cxx
@@ -35,9 +35,9 @@ Qt5Bitmap::Qt5Bitmap(const QImage& rImage) { m_pImage.reset(new QImage(rImage));
 
 bool Qt5Bitmap::Create(const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal)
 {
-    assert((nBitCount == 1 || nBitCount == 4 || nBitCount == 8 || nBitCount == 16 || nBitCount == 24
-            || nBitCount == 32)
-           && "Unsupported BitCount!");
+    assert(
+        (nBitCount == 1 || nBitCount == 4 || nBitCount == 8 || nBitCount == 24 || nBitCount == 32)
+        && "Unsupported BitCount!");
 
     if (nBitCount == 1)
         assert(2 >= rPal.GetEntryCount());
@@ -119,8 +119,8 @@ bool Qt5Bitmap::Create(const SalBitmap& rSalBmp, SalGraphics* pSalGraphics)
 
 bool Qt5Bitmap::Create(const SalBitmap& rSalBmp, sal_uInt16 nNewBitCount)
 {
-    assert((nNewBitCount == 1 || nNewBitCount == 4 || nNewBitCount == 8 || nNewBitCount == 16
-            || nNewBitCount == 24 || nNewBitCount == 32)
+    assert((nNewBitCount == 1 || nNewBitCount == 4 || nNewBitCount == 8 || nNewBitCount == 24
+            || nNewBitCount == 32)
            && "Unsupported BitCount!");
 
     const Qt5Bitmap* pBitmap = static_cast<const Qt5Bitmap*>(&rSalBmp);
@@ -244,23 +244,6 @@ BitmapBuffer* Qt5Bitmap::AcquireBuffer(BitmapAccessMode /*nMode*/)
             pBuffer->mnFormat = ScanlineFormat::N8BitPal | ScanlineFormat::TopDown;
             pBuffer->maPalette = m_aPalette;
             break;
-        case 16:
-        {
-#ifdef OSL_BIGENDIAN
-            pBuffer->mnFormat = ScanlineFormat::N16BitTcMsbMask | ScanlineFormat::TopDown;
-#else
-            pBuffer->mnFormat = ScanlineFormat::N16BitTcLsbMask | ScanlineFormat::TopDown;
-#endif
-            ColorMaskElement aRedMask(0xf800); // 5
-            aRedMask.CalcMaskShift();
-            ColorMaskElement aGreenMask(0x07e0); // 6
-            aGreenMask.CalcMaskShift();
-            ColorMaskElement aBlueMask(0x001f); // 5
-            aBlueMask.CalcMaskShift();
-            pBuffer->maColorMask = ColorMask(aRedMask, aGreenMask, aBlueMask);
-            pBuffer->maPalette = aEmptyPalette;
-            break;
-        }
         case 24:
             pBuffer->mnFormat = ScanlineFormat::N24BitTcRgb | ScanlineFormat::TopDown;
             pBuffer->maPalette = aEmptyPalette;
@@ -275,6 +258,8 @@ BitmapBuffer* Qt5Bitmap::AcquireBuffer(BitmapAccessMode /*nMode*/)
             pBuffer->maPalette = aEmptyPalette;
             break;
         }
+        default:
+            assert(false);
     }
 
     return pBuffer;
diff --git a/vcl/quartz/salbmp.cxx b/vcl/quartz/salbmp.cxx
index 710a9eb408ee..117c038c844e 100644
--- a/vcl/quartz/salbmp.cxx
+++ b/vcl/quartz/salbmp.cxx
@@ -45,10 +45,6 @@
 #include "saldatabasic.hxx"
 #endif
 
-static const unsigned long k16BitRedColorMask   = 0x00007c00;
-static const unsigned long k16BitGreenColorMask = 0x000003e0;
-static const unsigned long k16BitBlueColorMask  = 0x0000001f;
-
 static const unsigned long k32BitRedColorMask   = 0x00ff0000;
 static const unsigned long k32BitGreenColorMask = 0x0000ff00;
 static const unsigned long k32BitBlueColorMask  = 0x000000ff;
@@ -56,7 +52,7 @@ static const unsigned long k32BitBlueColorMask  = 0x000000ff;
 static bool isValidBitCount( sal_uInt16 nBitCount )
 {
     return (nBitCount == 1) || (nBitCount == 4) || (nBitCount == 8) ||
-        (nBitCount == 16) || (nBitCount == 24) || (nBitCount == 32);
+        (nBitCount == 24) || (nBitCount == 32);
 }
 
 QuartzSalBitmap::QuartzSalBitmap()
@@ -216,9 +212,9 @@ bool QuartzSalBitmap::CreateContext()
     CGBitmapInfo aCGBmpInfo = kCGImageAlphaNoneSkipFirst;
 
     // convert data into something accepted by CGBitmapContextCreate()
-    size_t bitsPerComponent = (mnBits == 16) ? 5 : 8;
+    size_t bitsPerComponent = 8;
     sal_uInt32 nContextBytesPerRow = mnBytesPerRow;
-    if( (mnBits == 16) || (mnBits == 32) )
+    if( mnBits == 32 )
     {
         // no conversion needed for truecolor
         m_pContextBuffer = m_pUserBuffer;
@@ -279,11 +275,10 @@ bool QuartzSalBitmap::AllocateUserData()
         case 1:     mnBytesPerRow = (mnWidth + 7) >> 3; break;
         case 4:     mnBytesPerRow = (mnWidth + 1) >> 1; break;
         case 8:     mnBytesPerRow = mnWidth; break;
-        case 16:    mnBytesPerRow = mnWidth << 1; break;
         case 24:    mnBytesPerRow = (mnWidth << 1) + mnWidth; break;
         case 32:    mnBytesPerRow = mnWidth << 2; break;
         default:
-            OSL_FAIL("vcl::QuartzSalBitmap::AllocateUserData(), illegal bitcount!");
+            assert(false && "vcl::QuartzSalBitmap::AllocateUserData(), illegal bitcount!");
         }
     }
 
@@ -371,34 +366,6 @@ public:
     }
 };
 
-class ImplPixelFormat16 : public ImplPixelFormat
-// currently R5G6B5-format for 16bit depth
-{
-    sal_uInt16* pData;
-public:
-
-    virtual void StartLine( sal_uInt8* pLine ) override
-    {
-        pData = reinterpret_cast<sal_uInt16*>(pLine);
-    }
-    virtual void SkipPixel( sal_uInt32 nPixel ) override
-    {
-        pData += nPixel;
-    }
-    virtual Color ReadPixel() override
-    {
-        const Color c( (*pData & 0xf800) >> 8, (*pData & 0x07e0) >> 3 , (*pData & 0x001f) << 3 );
-        pData++;
-        return c;
-    }
-    virtual void WritePixel( Color nColor ) override
-    {
-        *pData++ =  (( nColor.GetRed() & 0xf8 ) << 8 ) |
-                    (( nColor.GetGreen() & 0xfc ) << 3 ) |
-                    (( nColor.GetBlue() & 0xf8 ) >> 3 );
-    }
-};
-
 class ImplPixelFormat8 : public ImplPixelFormat
 {
 private:
@@ -544,7 +511,6 @@ std::unique_ptr<ImplPixelFormat> ImplPixelFormat::GetFormat( sal_uInt16 nBits, c
     case 1: return std::make_unique<ImplPixelFormat1>( rPalette );
     case 4: return std::make_unique<ImplPixelFormat4>( rPalette );
     case 8: return std::make_unique<ImplPixelFormat8>( rPalette );
-    case 16: return std::make_unique<ImplPixelFormat16>();
     case 24: return std::make_unique<ImplPixelFormat24>();
     case 32: return std::make_unique<ImplPixelFormat32>();
     default:
@@ -745,18 +711,6 @@ BitmapBuffer* QuartzSalBitmap::AcquireBuffer( BitmapAccessMode /*nMode*/ )
         case 8:
             pBuffer->mnFormat = ScanlineFormat::N8BitPal;
             break;
-        case 16:
-        {
-            pBuffer->mnFormat = ScanlineFormat::N16BitTcMsbMask;
-            ColorMaskElement aRedMask(k16BitRedColorMask);
-            aRedMask.CalcMaskShift();
-            ColorMaskElement aGreenMask(k16BitGreenColorMask);
-            aGreenMask.CalcMaskShift();
-            ColorMaskElement aBlueMask(k16BitBlueColorMask);
-            aBlueMask.CalcMaskShift();
-            pBuffer->maColorMask  = ColorMask(aRedMask, aGreenMask, aBlueMask);
-            break;
-        }
         case 24:
             pBuffer->mnFormat = ScanlineFormat::N24BitTcBgr;
             break;
@@ -772,6 +726,7 @@ BitmapBuffer* QuartzSalBitmap::AcquireBuffer( BitmapAccessMode /*nMode*/ )
             pBuffer->maColorMask  = ColorMask(aRedMask, aGreenMask, aBlueMask);
             break;
         }
+        default: assert(false);
     }
 
     // some BitmapBuffer users depend on a complete palette
diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx
index eee568533259..19f74464622b 100644
--- a/vcl/quartz/salgdicommon.cxx
+++ b/vcl/quartz/salgdicommon.cxx
@@ -1846,7 +1846,7 @@ void XorEmulation::SetTarget( int nWidth, int nHeight, int nTargetDepth,
     {
         nBitDepth = 32;
     }
-    int nBytesPerRow = (nBitDepth == 16) ? 2 : 4;
+    int nBytesPerRow = 4;
     const size_t nBitsPerComponent = (nBitDepth == 16) ? 5 : 8;
     if( nBitDepth <= 8 )
     {
diff --git a/vcl/source/gdi/bmpacc.cxx b/vcl/source/gdi/bmpacc.cxx
index d2c46350ec55..4b0b42f5d268 100644
--- a/vcl/source/gdi/bmpacc.cxx
+++ b/vcl/source/gdi/bmpacc.cxx
@@ -161,18 +161,6 @@ bool BitmapReadAccess::ImplSetAccessPointers( ScanlineFormat nFormat )
             mFncSetPixel = SetPixelForN8BitTcMask;
         }
         break;
-        case ScanlineFormat::N16BitTcMsbMask:
-        {
-            mFncGetPixel = GetPixelForN16BitTcMsbMask;
-            mFncSetPixel = SetPixelForN16BitTcMsbMask;
-        }
-        break;
-        case ScanlineFormat::N16BitTcLsbMask:
-        {
-            mFncGetPixel = GetPixelForN16BitTcLsbMask;
-            mFncSetPixel = SetPixelForN16BitTcLsbMask;
-        }
-        break;
         case ScanlineFormat::N24BitTcBgr:
         {
             mFncGetPixel = GetPixelForN24BitTcBgr;
@@ -412,7 +400,6 @@ void BitmapWriteAccess::CopyScanline( long nY, ConstScanline aSrcScanline,
         else
         {
             DBG_ASSERT( nFormat != ScanlineFormat::N8BitTcMask &&
-                        nFormat != ScanlineFormat::N16BitTcMsbMask && nFormat != ScanlineFormat::N16BitTcLsbMask &&
                         nFormat != ScanlineFormat::N32BitTcMask,
                         "No support for pixel formats with color masks yet!" );
 
@@ -427,8 +414,6 @@ void BitmapWriteAccess::CopyScanline( long nY, ConstScanline aSrcScanline,
                 case ScanlineFormat::N4BitLsnPal:    pFncGetPixel = GetPixelForN4BitLsnPal; break;
                 case ScanlineFormat::N8BitPal:        pFncGetPixel = GetPixelForN8BitPal; break;
                 case ScanlineFormat::N8BitTcMask:    pFncGetPixel = GetPixelForN8BitTcMask; break;
-                case ScanlineFormat::N16BitTcMsbMask:   pFncGetPixel = GetPixelForN16BitTcMsbMask; break;
-                case ScanlineFormat::N16BitTcLsbMask:   pFncGetPixel = GetPixelForN16BitTcLsbMask; break;
                 case ScanlineFormat::N24BitTcBgr:    pFncGetPixel = GetPixelForN24BitTcBgr; break;
                 case ScanlineFormat::N24BitTcRgb:    pFncGetPixel = GetPixelForN24BitTcRgb; break;
                 case ScanlineFormat::N32BitTcAbgr:
@@ -455,9 +440,12 @@ void BitmapWriteAccess::CopyScanline( long nY, ConstScanline aSrcScanline,
                     else
                         pFncGetPixel = GetPixelForN32BitTcRgbx;
                     break;
-                case ScanlineFormat::N32BitTcMask:   pFncGetPixel = GetPixelForN32BitTcMask; break;
+                case ScanlineFormat::N32BitTcMask:
+                    pFncGetPixel = GetPixelForN32BitTcMask;
+                    break;
 
                 default:
+                    assert(false);
                     pFncGetPixel = nullptr;
                 break;
             }
diff --git a/vcl/source/gdi/bmpacc2.cxx b/vcl/source/gdi/bmpacc2.cxx
index 510cb04e04cc..9210d5222751 100644
--- a/vcl/source/gdi/bmpacc2.cxx
+++ b/vcl/source/gdi/bmpacc2.cxx
@@ -115,30 +115,6 @@ void BitmapReadAccess::SetPixelForN8BitTcMask(Scanline pScanline, long nX, const
 }
 
 
-BitmapColor BitmapReadAccess::GetPixelForN16BitTcMsbMask(ConstScanline pScanline, long nX, const ColorMask& rMask)
-{
-    BitmapColor aColor;
-    rMask.GetColorFor16BitMSB( aColor, pScanline + ( nX << 1 ) );
-    return aColor;
-}
-
-void BitmapReadAccess::SetPixelForN16BitTcMsbMask(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask)
-{
-    rMask.SetColorFor16BitMSB( rBitmapColor, pScanline + ( nX << 1 ) );
-}
-
-BitmapColor BitmapReadAccess::GetPixelForN16BitTcLsbMask(ConstScanline pScanline, long nX, const ColorMask& rMask)
-{
-    BitmapColor aColor;
-    rMask.GetColorFor16BitLSB( aColor, pScanline + ( nX << 1 ) );
-    return aColor;
-}
-
-void BitmapReadAccess::SetPixelForN16BitTcLsbMask(Scanline pScanline, long nX, const BitmapColor& rBitmapColor, const ColorMask& rMask)
-{
-    rMask.SetColorFor16BitLSB( rBitmapColor, pScanline + ( nX << 1 ) );
-}
-
 BitmapColor BitmapReadAccess::GetPixelForN24BitTcBgr(ConstScanline pScanline, long nX, const ColorMask&)
 {
     BitmapColor aBitmapColor;
diff --git a/vcl/source/gdi/bmpfast.cxx b/vcl/source/gdi/bmpfast.cxx
index 393a634c6127..36423b1e206e 100644
--- a/vcl/source/gdi/bmpfast.cxx
+++ b/vcl/source/gdi/bmpfast.cxx
@@ -31,7 +31,6 @@ class BasePixelPtr
 public:
     explicit BasePixelPtr( PIXBYTE* p = nullptr ) : mpPixel( p ) {}
     void    SetRawPtr( PIXBYTE* pRawPtr )               { mpPixel = pRawPtr; }
-    PIXBYTE* GetRawPtr() const                    { return mpPixel; }
     void    AddByteOffset( int nByteOffset )            { mpPixel += nByteOffset; }
 
 protected:
@@ -173,46 +172,6 @@ public:
 };
 
 template <>
-class TrueColorPixelPtr<ScanlineFormat::N16BitTcMsbMask> : public BasePixelPtr
-{
-public:
-    void    operator++()            { mpPixel += 2; }
-
-    // TODO: non565-RGB
-    PIXBYTE GetRed() const          { return (mpPixel[0] & 0xF8U); }
-    PIXBYTE GetGreen() const        { return (mpPixel[0]<<5U) | ((mpPixel[1]>>3U)&28U); }
-    PIXBYTE GetBlue() const         { return (mpPixel[1]<<3U); }
-    static PIXBYTE GetAlpha()       { return 0; }
-    static void SetAlpha( PIXBYTE ) {}
-
-    void SetColor( PIXBYTE r, PIXBYTE g, PIXBYTE b ) const
-    {
-        mpPixel[0] = ((g >> 5U) & 7U) | (r & 0xF8U);
-        mpPixel[1] = ((g & 28U)<< 3U) | (b >> 3U);
-    }
-};
-
-template <>
-class TrueColorPixelPtr<ScanlineFormat::N16BitTcLsbMask> : public BasePixelPtr
-{
-public:
-    void    operator++()            { mpPixel += 2; }
-
-    // TODO: non565-RGB
-    PIXBYTE GetRed() const          { return (mpPixel[1] & 0xF8U); }
-    PIXBYTE GetGreen() const        { return (mpPixel[1]<<5U) | ((mpPixel[0]>>3U)&28U); }
-    PIXBYTE GetBlue() const         { return (mpPixel[0]<<3U); }
-    static PIXBYTE GetAlpha()       { return 0; }
-    static void SetAlpha( PIXBYTE ) {}
-
-    void SetColor( PIXBYTE r, PIXBYTE g, PIXBYTE b ) const
-    {
-        mpPixel[0] = ((g & 28U)<< 3U) | (b >> 3U);
-        mpPixel[1] = ((g >> 5U) & 7U) | (r & 0xF8U);
-    }
-};
-
-template <>
 class TrueColorPixelPtr<ScanlineFormat::N8BitTcMask> : public BasePixelPtr
 {
 public:
@@ -237,18 +196,6 @@ static void ImplConvertPixel( const TrueColorPixelPtr<DSTFMT>& rDst,
     rDst.SetAlpha( rSrc.GetAlpha() );
 }
 
-template <>
-void ImplConvertPixel<ScanlineFormat::N16BitTcLsbMask, ScanlineFormat::N16BitTcMsbMask> (
-    const TrueColorPixelPtr<ScanlineFormat::N16BitTcMsbMask>& rDst,
-    const TrueColorPixelPtr<ScanlineFormat::N16BitTcLsbMask>& rSrc )
-{
-    // byte swapping
-    const PIXBYTE* pSrc = rSrc.GetRawPtr();
-    PIXBYTE* pDst = rDst.GetRawPtr();
-    pDst[1] = pSrc[0];
-    pDst[0] = pSrc[1];
-}
-
 template <ScanlineFormat SRCFMT, ScanlineFormat DSTFMT>
 static void ImplConvertLine( const TrueColorPixelPtr<DSTFMT>& rDst,
     const TrueColorPixelPtr<SRCFMT>& rSrc, int nPixelCount )
@@ -394,11 +341,6 @@ static bool ImplConvertFromBitmap( BitmapBuffer& rDst, const BitmapBuffer& rSrc
 //            return ImplConvertToBitmap<ScanlineFormat::N32BitTcMask>( aSrcType, rDst, rSrc );
             break;
 
-        case ScanlineFormat::N16BitTcMsbMask:
-            return ImplConvertToBitmap<ScanlineFormat::N16BitTcMsbMask>( aSrcType, rDst, rSrc );
-        case ScanlineFormat::N16BitTcLsbMask:
-            return ImplConvertToBitmap<ScanlineFormat::N16BitTcLsbMask>( aSrcType, rDst, rSrc );
-
         case ScanlineFormat::N24BitTcBgr:
             return ImplConvertToBitmap<ScanlineFormat::N24BitTcBgr>( aSrcType, rDst, rSrc );
         case ScanlineFormat::N24BitTcRgb:
@@ -463,18 +405,6 @@ bool ImplFastBitmapConversion( BitmapBuffer& rDst, const BitmapBuffer& rSrc,
     const ScanlineFormat nSrcFormat = RemoveScanline(rSrc.mnFormat);
     const ScanlineFormat nDstFormat = RemoveScanline(rDst.mnFormat);
 
-    // TODO: also implement conversions for 16bit colormasks with non-565 format
-    if( nSrcFormat & (ScanlineFormat::N16BitTcLsbMask | ScanlineFormat::N16BitTcMsbMask) )
-        if( rSrc.maColorMask.GetRedMask()  != 0xF800
-        ||  rSrc.maColorMask.GetGreenMask()!= 0x07E0
-        ||  rSrc.maColorMask.GetBlueMask() != 0x001F )
-            return false;
-    if( nDstFormat & (ScanlineFormat::N16BitTcLsbMask | ScanlineFormat::N16BitTcMsbMask) )
-        if( rDst.maColorMask.GetRedMask()  != 0xF800
-        ||  rDst.maColorMask.GetGreenMask()!= 0x07E0
-        ||  rDst.maColorMask.GetBlueMask() != 0x001F )
-            return false;
-
     // special handling of trivial cases
     if( nSrcFormat == nDstFormat )
     {
@@ -500,11 +430,6 @@ bool ImplFastBitmapConversion( BitmapBuffer& rDst, const BitmapBuffer& rSrc,
 //            return ImplConvertFromBitmap<ScanlineFormat::N32BitTcMask>( rDst, rSrc );
             break;
 
-        case ScanlineFormat::N16BitTcMsbMask:
-            return ImplConvertFromBitmap<ScanlineFormat::N16BitTcMsbMask>( rDst, rSrc );
-        case ScanlineFormat::N16BitTcLsbMask:
-            return ImplConvertFromBitmap<ScanlineFormat::N16BitTcLsbMask>( rDst, rSrc );
-
         case ScanlineFormat::N24BitTcBgr:
             return ImplConvertFromBitmap<ScanlineFormat::N24BitTcBgr>( rDst, rSrc );
         case ScanlineFormat::N24BitTcRgb:
@@ -625,11 +550,6 @@ static bool ImplBlendFromBitmap( BitmapBuffer& rDst, const BitmapBuffer& rSrc, c
 //            return ImplBlendToBitmap<ScanlineFormat::N32BitTcMask>( aSrcType, rDst, rSrc, rMsk );
             break;
 
-        case ScanlineFormat::N16BitTcMsbMask:
-            return ImplBlendToBitmap<ScanlineFormat::N16BitTcMsbMask>( aSrcType, rDst, rSrc, rMsk );
-        case ScanlineFormat::N16BitTcLsbMask:
-            return ImplBlendToBitmap<ScanlineFormat::N16BitTcLsbMask>( aSrcType, rDst, rSrc, rMsk );
-
         case ScanlineFormat::N24BitTcBgr:
             return ImplBlendToBitmap<ScanlineFormat::N24BitTcBgr>( aSrcType, rDst, rSrc, rMsk );
         case ScanlineFormat::N24BitTcRgb:
@@ -708,19 +628,6 @@ bool ImplFastBitmapBlending( BitmapWriteAccess const & rDstWA,
     const BitmapBuffer& rMsk = *rMskRA.ImplGetBitmapBuffer();
 
     const ScanlineFormat nSrcFormat = RemoveScanline(rSrc.mnFormat);
-    const ScanlineFormat nDstFormat = RemoveScanline(rDst.mnFormat);
-
-    // accelerated conversions for 16bit colormasks with non-565 format are not yet implemented
-    if( nSrcFormat & (ScanlineFormat::N16BitTcLsbMask | ScanlineFormat::N16BitTcMsbMask) )
-        if( rSrc.maColorMask.GetRedMask()  != 0xF800
-        ||  rSrc.maColorMask.GetGreenMask()!= 0x07E0
-        ||  rSrc.maColorMask.GetBlueMask() != 0x001F)
-            return false;
-    if( nDstFormat & (ScanlineFormat::N16BitTcLsbMask | ScanlineFormat::N16BitTcMsbMask) )
-        if( rDst.maColorMask.GetRedMask()  != 0xF800
-        ||  rDst.maColorMask.GetGreenMask()!= 0x07E0
-        ||  rDst.maColorMask.GetBlueMask() != 0x001F)
-            return false;
 
     // select the matching instantiation for the source's bitmap format
     switch( nSrcFormat )
@@ -738,11 +645,6 @@ bool ImplFastBitmapBlending( BitmapWriteAccess const & rDstWA,
 //            return ImplBlendFromBitmap<ScanlineFormat::N32BitTcMask>( rDst, rSrc );
             break;
 
-        case ScanlineFormat::N16BitTcMsbMask:
-            return ImplBlendFromBitmap<ScanlineFormat::N16BitTcMsbMask>( rDst, rSrc, rMsk );
-        case ScanlineFormat::N16BitTcLsbMask:
-            return ImplBlendFromBitmap<ScanlineFormat::N16BitTcLsbMask>( rDst, rSrc, rMsk );
-
         case ScanlineFormat::N24BitTcBgr:
             return ImplBlendFromBitmap<ScanlineFormat::N24BitTcBgr>( rDst, rSrc, rMsk );
         case ScanlineFormat::N24BitTcRgb:
@@ -818,8 +720,6 @@ bool ImplFastEraseBitmap( BitmapBuffer& rDst, const BitmapColor& rColor )
     switch( nDstFormat )
     {
         case ScanlineFormat::N32BitTcMask:
-        case ScanlineFormat::N16BitTcMsbMask:
-        case ScanlineFormat::N16BitTcLsbMask:
 
         case ScanlineFormat::N24BitTcBgr:
         case ScanlineFormat::N24BitTcRgb:
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index 965a403a0d7d..d5f1a9a7f8f9 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -145,7 +145,7 @@ sal_uInt16 discretizeBitcount( sal_uInt16 nInputCount )
 
 bool isBitfieldCompression( ScanlineFormat nScanlineFormat )
 {
-    return (ScanlineFormat::N16BitTcLsbMask == nScanlineFormat) || (ScanlineFormat::N32BitTcMask == nScanlineFormat);
+    return ScanlineFormat::N32BitTcMask == nScanlineFormat;
 }
 
 bool ImplReadDIBInfoHeader(SvStream& rIStm, DIBV5Header& rHeader, bool& bTopDown, bool bMSOFormat)
@@ -1457,7 +1457,7 @@ bool ImplWriteDIBBody(const Bitmap& rBitmap, SvStream& rOStm, BitmapReadAccess c
 
     if(!pAccAlpha && isBitfieldCompression(rAcc.GetScanlineFormat()))
     {
-        aHeader.nBitCount = (ScanlineFormat::N16BitTcLsbMask == rAcc.GetScanlineFormat()) ? 16 : 32;
+        aHeader.nBitCount = 32;
         aHeader.nSizeImage = rAcc.Height() * rAcc.GetScanlineSize();
         nCompression = BITFIELDS;
     }
diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx
index 77003226a75d..29ddddaef454 100644
--- a/vcl/source/gdi/salmisc.cxx
+++ b/vcl/source/gdi/salmisc.cxx
@@ -279,8 +279,6 @@ std::unique_ptr<BitmapBuffer> StretchAndConvert(
         IMPL_CASE_GET_FORMAT( N4BitLsnPal );
         IMPL_CASE_GET_FORMAT( N8BitPal );
         IMPL_CASE_GET_FORMAT( N8BitTcMask );
-        IMPL_CASE_GET_FORMAT( N16BitTcMsbMask );
-        IMPL_CASE_GET_FORMAT( N16BitTcLsbMask );
         IMPL_CASE_GET_FORMAT( N24BitTcBgr );
         IMPL_CASE_GET_FORMAT( N24BitTcRgb );
         IMPL_CASE_GET_FORMAT( N32BitTcAbgr );
@@ -308,8 +306,6 @@ std::unique_ptr<BitmapBuffer> StretchAndConvert(
         IMPL_CASE_SET_FORMAT( N4BitLsnPal, 4 );
         IMPL_CASE_SET_FORMAT( N8BitPal, 8 );
         IMPL_CASE_SET_FORMAT( N8BitTcMask, 8 );
-        IMPL_CASE_SET_FORMAT( N16BitTcMsbMask, 16 );
-        IMPL_CASE_SET_FORMAT( N16BitTcLsbMask, 16 );
         IMPL_CASE_SET_FORMAT( N24BitTcBgr, 24 );
         IMPL_CASE_SET_FORMAT( N24BitTcRgb, 24 );
         IMPL_CASE_SET_FORMAT( N32BitTcAbgr, 32 );
@@ -373,8 +369,6 @@ std::unique_ptr<BitmapBuffer> StretchAndConvert(
         pDstBuffer->maPalette = *pDstPal;
     }
     else if( ( nDstScanlineFormat == ScanlineFormat::N8BitTcMask ) ||
-             ( nDstScanlineFormat == ScanlineFormat::N16BitTcMsbMask ) ||
-             ( nDstScanlineFormat == ScanlineFormat::N16BitTcLsbMask ) ||
              ( nDstScanlineFormat == ScanlineFormat::N32BitTcMask ) )
     {
         assert(pDstMask && "destination buffer requires color mask");
diff --git a/vcl/source/helper/canvasbitmap.cxx b/vcl/source/helper/canvasbitmap.cxx
index f28fc734e3de..b720cdf3b1b7 100644
--- a/vcl/source/helper/canvasbitmap.cxx
+++ b/vcl/source/helper/canvasbitmap.cxx
@@ -182,26 +182,6 @@ VclCanvasBitmap::VclCanvasBitmap( const BitmapEx& rBitmap ) :
                                   m_pBmpAcc->GetColorMask().GetBlueMask() );
                 break;
 
-            case ScanlineFormat::N16BitTcMsbMask:
-                m_bPalette           = false;
-                m_nBitsPerInputPixel = 16;
-                m_nEndianness        = util::Endianness::BIG;
-                m_aLayout.IsMsbFirst = false; // doesn't matter
-                setComponentInfo( m_pBmpAcc->GetColorMask().GetRedMask(),
-                                  m_pBmpAcc->GetColorMask().GetGreenMask(),
-                                  m_pBmpAcc->GetColorMask().GetBlueMask() );
-                break;
-
-            case ScanlineFormat::N16BitTcLsbMask:
-                m_bPalette           = false;
-                m_nBitsPerInputPixel = 16;
-                m_nEndianness        = util::Endianness::LITTLE;
-                m_aLayout.IsMsbFirst = false; // doesn't matter
-                setComponentInfo( m_pBmpAcc->GetColorMask().GetRedMask(),
-                                  m_pBmpAcc->GetColorMask().GetGreenMask(),
-                                  m_pBmpAcc->GetColorMask().GetBlueMask() );
-                break;
-
             case ScanlineFormat::N24BitTcBgr:
                 m_bPalette           = false;
                 m_nBitsPerInputPixel = 24;
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index a9047abd49ed..a4a83b820a51 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -2630,24 +2630,6 @@ SalColormap::SalColormap( sal_uInt16 nDepth )
                 aVI.green_mask      = 0x00FF00;
                 aVI.blue_mask       = 0x0000FF;
             }
-            else if( 16 == nDepth ) // 565
-            {
-                aVI.red_mask        = 0x00F800;
-                aVI.green_mask      = 0x0007E0;
-                aVI.blue_mask       = 0x00001F;
-            }
-            else if( 15 == nDepth ) // 555
-            {
-                aVI.red_mask        = 0x007C00;
-                aVI.green_mask      = 0x0003E0;
-                aVI.blue_mask       = 0x00001F;
-            }
-            else if( 12 == nDepth ) // 444
-            {
-                aVI.red_mask        = 0x000F00;
-                aVI.green_mask      = 0x0000F0;
-                aVI.blue_mask       = 0x00000F;
-            }
             else if( 8 == nDepth ) // 332
             {
                 aVI.red_mask        = 0x0000E0;
diff --git a/vcl/unx/generic/gdi/salbmp.cxx b/vcl/unx/generic/gdi/salbmp.cxx
index 4881e27e5b29..0a96048ae21f 100644
--- a/vcl/unx/generic/gdi/salbmp.cxx
+++ b/vcl/unx/generic/gdi/salbmp.cxx
@@ -120,7 +120,6 @@ std::unique_ptr<BitmapBuffer> X11SalBitmap::ImplCreateDIB(
            nBitCount ==  1
         || nBitCount ==  4
         || nBitCount ==  8
-        || nBitCount == 16
         || nBitCount == 24
         , "Unsupported BitCount!"
     );
@@ -148,37 +147,10 @@ std::unique_ptr<BitmapBuffer> X11SalBitmap::ImplCreateDIB(
         case 1: pDIB->mnFormat |= ScanlineFormat::N1BitMsbPal; break;
         case 4: pDIB->mnFormat |= ScanlineFormat::N4BitMsnPal; break;
         case 8: pDIB->mnFormat |= ScanlineFormat::N8BitPal; break;
-#ifdef OSL_BIGENDIAN
-        case 16:
-        {
-            pDIB->mnFormat|= ScanlineFormat::N16BitTcMsbMask;
-            ColorMaskElement aRedMask(0xf800);
-            aRedMask.CalcMaskShift();
-            ColorMaskElement aGreenMask(0x07e0);
-            aGreenMask.CalcMaskShift();
-            ColorMaskElement aBlueMask(0x001f);
-            aBlueMask.CalcMaskShift();
-            pDIB->maColorMask = ColorMask(aRedMask, aGreenMask, aBlueMask);
-            break;
-        }
-#else
-        case 16:
-        {
-            pDIB->mnFormat|= ScanlineFormat::N16BitTcLsbMask;
-            ColorMaskElement aRedMask(0xf800);
-            aRedMask.CalcMaskShift();
-            ColorMaskElement aGreenMask(0x07e0);
-            aGreenMask.CalcMaskShift();
-            ColorMaskElement aBlueMask(0x001f);
-            aBlueMask.CalcMaskShift();
-            pDIB->maColorMask = ColorMask(aRedMask, aGreenMask, aBlueMask);
-            break;
-        }
-#endif
+        case 24: pDIB->mnFormat |= ScanlineFormat::N24BitTcBgr; break;
         default:
+            assert(false);
             nBitCount = 24;
-            [[fallthrough]];
-        case 24:
             pDIB->mnFormat |= ScanlineFormat::N24BitTcBgr;
         break;
     }
@@ -291,27 +263,6 @@ std::unique_ptr<BitmapBuffer> X11SalBitmap::ImplCreateDIB(
                 }
                 break;
 
-                case 16:
-                {
-                    ColorMaskElement aRedMask(pImage->red_mask);
-                    aRedMask.CalcMaskShift();
-                    ColorMaskElement aGreenMask(pImage->green_mask);
-                    aGreenMask.CalcMaskShift();
-                    ColorMaskElement aBlueMask(pImage->blue_mask);
-                    aBlueMask.CalcMaskShift();
-                    aSrcBuf.maColorMask = ColorMask(aRedMask, aGreenMask, aBlueMask);
-
-                    if( LSBFirst == pImage->byte_order )
-                    {
-                        aSrcBuf.mnFormat |= ScanlineFormat::N16BitTcLsbMask;
-                    }
-                    else
-                    {
-                        aSrcBuf.mnFormat |= ScanlineFormat::N16BitTcMsbMask;
-                    }
-                }
-                break;
-
                 case 24:
                 {
                     if( ( LSBFirst == pImage->byte_order ) && ( pImage->red_mask == 0xFF ) )
@@ -335,6 +286,8 @@ std::unique_ptr<BitmapBuffer> X11SalBitmap::ImplCreateDIB(
                                             );
                 }
                 break;
+
+                default: assert(false);
             }
 
             BitmapPalette& rPal = aSrcBuf.maPalette;
@@ -452,33 +405,6 @@ XImage* X11SalBitmap::ImplCreateXImage(
                     nDstFormat |= ScanlineFormat::N8BitPal;
                 break;
 
-                case 16:
-                {
-                    #ifdef OSL_BIGENDIAN
-
-                    if( MSBFirst == pImage->byte_order )
-                        nDstFormat |= ScanlineFormat::N16BitTcMsbMask;
-                    else
-                        nDstFormat |= ScanlineFormat::N16BitTcLsbMask;
-
-                    #else /* OSL_LITENDIAN */
-
-                    nDstFormat |= ScanlineFormat::N16BitTcLsbMask;
-                    if( MSBFirst == pImage->byte_order )
-                        pImage->byte_order = LSBFirst;
-
-                    #endif
-
-                    ColorMaskElement aRedMask(pImage->red_mask);
-                    aRedMask.CalcMaskShift();
-                    ColorMaskElement aGreenMask(pImage->green_mask);
-                    aGreenMask.CalcMaskShift();
-                    ColorMaskElement aBlueMask(pImage->blue_mask);
-                    aBlueMask.CalcMaskShift();
-                    xMask.reset(new ColorMask(aRedMask, aGreenMask, aBlueMask));
-                }
-                break;
-
                 case 24:
                 {
                     if( ( LSBFirst == pImage->byte_order ) && ( pImage->red_mask == 0xFF ) )
@@ -502,6 +428,8 @@ XImage* X11SalBitmap::ImplCreateXImage(
                                         );
                 }
                 break;
+
+                default: assert(false);
             }
 
             if( pImage->depth == 1 )
diff --git a/vcl/unx/generic/print/genpspgraphics.cxx b/vcl/unx/generic/print/genpspgraphics.cxx
index 942b7ea9e522..61d924caf999 100644
--- a/vcl/unx/generic/print/genpspgraphics.cxx
+++ b/vcl/unx/generic/print/genpspgraphics.cxx
@@ -118,10 +118,6 @@ SalPrinterBmp::SalPrinterBmp (BitmapBuffer* pBuffer)
             mpFncGetPixel = BitmapReadAccess::GetPixelForN8BitPal;      break;
         case ScanlineFormat::N8BitTcMask:
             mpFncGetPixel = BitmapReadAccess::GetPixelForN8BitTcMask;  break;
-        case ScanlineFormat::N16BitTcMsbMask:
-            mpFncGetPixel = BitmapReadAccess::GetPixelForN16BitTcMsbMask; break;
-        case ScanlineFormat::N16BitTcLsbMask:
-            mpFncGetPixel = BitmapReadAccess::GetPixelForN16BitTcLsbMask; break;
         case ScanlineFormat::N24BitTcBgr:
             mpFncGetPixel = BitmapReadAccess::GetPixelForN24BitTcBgr;  break;
         case ScanlineFormat::N24BitTcRgb:
@@ -175,7 +171,6 @@ SalPrinterBmp::GetDepth () const
             nDepth = 8;
             break;
 
-        case 16:
         case 24:
         case 32:
             nDepth = 24;
@@ -183,7 +178,7 @@ SalPrinterBmp::GetDepth () const
 
         default:
             nDepth = 1;
-            OSL_FAIL("Error: unsupported bitmap depth in SalPrinterBmp::GetDepth()");
+            assert(false && "Error: unsupported bitmap depth in SalPrinterBmp::GetDepth()");
             break;
     }
 
diff --git a/vcl/win/gdi/salbmp.cxx b/vcl/win/gdi/salbmp.cxx
index c3e9b53feb8f..173ea361bbe8 100644
--- a/vcl/win/gdi/salbmp.cxx
+++ b/vcl/win/gdi/salbmp.cxx
@@ -701,7 +701,7 @@ sal_uInt16 WinSalBitmap::ImplGetDIBColorCount( HGLOBAL hDIB )
 
 HGLOBAL WinSalBitmap::ImplCreateDIB( const Size& rSize, sal_uInt16 nBits, const BitmapPalette& rPal )
 {
-    SAL_WARN_IF( nBits != 1 && nBits != 4 && nBits != 8 && nBits != 16 && nBits != 24, "vcl", "Unsupported BitCount!" );
+    SAL_WARN_IF( nBits != 1 && nBits != 4 && nBits != 8 && nBits != 24, "vcl", "Unsupported BitCount!" );
 
     HGLOBAL hDIB = nullptr;
 
@@ -840,7 +840,6 @@ BitmapBuffer* WinSalBitmap::AcquireBuffer( BitmapAccessMode /*nMode*/ )
             pBuffer->mnFormat = pBIH->biBitCount == 1 ? ScanlineFormat::N1BitMsbPal :
                                 pBIH->biBitCount == 4 ? ScanlineFormat::N4BitMsnPal :
                                 pBIH->biBitCount == 8 ? ScanlineFormat::N8BitPal :
-                                pBIH->biBitCount == 16 ? ScanlineFormat::N16BitTcLsbMask :
                                 pBIH->biBitCount == 24 ? ScanlineFormat::N24BitTcBgr :
                                 pBIH->biBitCount == 32 ? ScanlineFormat::N32BitTcMask :
                                 ScanlineFormat::NONE;


More information about the Libreoffice-commits mailing list