diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-10-25 10:27:15 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-10-25 11:41:23 +0100 |
commit | d1bea6be4f8190c1a6da7768ea2b80a5b51676a8 (patch) | |
tree | c493100642f1ed2d7433df158cf89bece3a532ef | |
parent | 3c0bfd4271a92cd05f5c8b096376519e3c5b4754 (diff) |
no Control loaded from .src now
Change-Id: I25af1187f7888ad3f8d7078e3b59d3e4a09b8ab5
-rw-r--r-- | include/vcl/ctrl.hxx | 1 | ||||
-rw-r--r-- | include/vcl/window.hxx | 4 | ||||
-rw-r--r-- | vcl/Library_vcl.mk | 1 | ||||
-rw-r--r-- | vcl/source/control/ctrl.cxx | 13 | ||||
-rw-r--r-- | vcl/source/window/resource.cxx | 126 |
5 files changed, 0 insertions, 145 deletions
diff --git a/include/vcl/ctrl.hxx b/include/vcl/ctrl.hxx index 6bfe7a8274c0..bdf95204db44 100644 --- a/include/vcl/ctrl.hxx +++ b/include/vcl/ctrl.hxx @@ -120,7 +120,6 @@ public: public: explicit Control( vcl::Window* pParent, WinBits nWinStyle = 0 ); - explicit Control( vcl::Window* pParent, const ResId& ); virtual ~Control() override; virtual void dispose() override; diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index 33394139f30c..35e098792f3d 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -634,10 +634,6 @@ protected: SAL_DLLPRIVATE bool ImplSetClipFlagChildren( bool bSysObjOnlySmaller ); SAL_DLLPRIVATE bool ImplSetClipFlagOverlapWindows( bool bSysObjOnlySmaller = false ); - SAL_DLLPRIVATE WinBits ImplInitRes( const ResId& rResId ); - SAL_DLLPRIVATE WindowResHeader ImplLoadResHeader(); - SAL_DLLPRIVATE void ImplLoadRes(); - SAL_DLLPRIVATE void PushPaintHelper(PaintHelper* pHelper, vcl::RenderContext& rRenderContext); SAL_DLLPRIVATE void PopPaintHelper(PaintHelper* pHelper); diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index 2b0874a2334d..888a9d0290e8 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -132,7 +132,6 @@ endif $(eval $(call gb_Library_add_exception_objects,vcl,\ vcl/source/window/settings \ vcl/source/window/paint \ - vcl/source/window/resource \ vcl/source/window/abstdlg \ vcl/source/window/accel \ vcl/source/window/accmgr \ diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx index c2d697d7d640..a137b432867e 100644 --- a/vcl/source/control/ctrl.cxx +++ b/vcl/source/control/ctrl.cxx @@ -53,19 +53,6 @@ Control::Control( vcl::Window* pParent, WinBits nStyle ) : ImplInit( pParent, nStyle, nullptr ); } -Control::Control( vcl::Window* pParent, const ResId& rResId ) : - Window( WINDOW_CONTROL ) -{ - ImplInitControlData(); - rResId.SetRT( RSC_CONTROL ); - WinBits nStyle = ImplInitRes( rResId ); - ImplInit( pParent, nStyle, nullptr ); - ImplLoadRes(); - - if ( !(nStyle & WB_HIDE) ) - Show(); -} - Control::~Control() { disposeOnce(); diff --git a/vcl/source/window/resource.cxx b/vcl/source/window/resource.cxx deleted file mode 100644 index 86326f9a67f0..000000000000 --- a/vcl/source/window/resource.cxx +++ /dev/null @@ -1,126 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <tools/rc.h> - -#include <vcl/window.hxx> -#include <vcl/svapp.hxx> - -#include "window.h" - -namespace vcl { - -WinBits Window::ImplInitRes( const ResId& rResId ) -{ - GetRes( rResId ); - - char* pRes = static_cast<char*>(GetClassRes()); - pRes += 8; - sal_uInt32 nStyle = (sal_uInt32)GetLongRes( static_cast<void*>(pRes) ); - return nStyle; -} - -WindowResHeader Window::ImplLoadResHeader() -{ - WindowResHeader aHeader; - - aHeader.nObjMask = (RscWindowFlags)ReadLongRes(); - - // ResourceStyle - aHeader.nRSStyle = (RSWND)ReadLongRes(); - // WinBits - ReadLongRes(); - - if( aHeader.nObjMask & RscWindowFlags::HelpId ) - aHeader.aHelpId = ReadByteStringRes(); - - return aHeader; -} - -void Window::ImplLoadRes() -{ - WindowResHeader aHeader = ImplLoadResHeader(); - - SetHelpId( aHeader.aHelpId ); - - RscWindowFlags nObjMask = aHeader.nObjMask; - - bool bPos = false; - bool bSize = false; - Point aPos; - Size aSize; - - if ( nObjMask & (RscWindowFlags::XYMapMode | RscWindowFlags::X | RscWindowFlags::Y) ) - { - // use size as per resource - MapUnit ePosMap = MapUnit::MapPixel; - - bPos = true; - - if ( nObjMask & RscWindowFlags::XYMapMode ) - ePosMap = (MapUnit)ReadLongRes(); - if ( nObjMask & RscWindowFlags::X ) - aPos.X() = ImplLogicUnitToPixelX( ReadLongRes(), ePosMap ); - if ( nObjMask & RscWindowFlags::Y ) - aPos.Y() = ImplLogicUnitToPixelY( ReadLongRes(), ePosMap ); - } - - if ( nObjMask & (RscWindowFlags::WHMapMode | RscWindowFlags::Width | RscWindowFlags::Height) ) - { - // use size as per resource - MapUnit eSizeMap = MapUnit::MapPixel; - - bSize = true; - - if ( nObjMask & RscWindowFlags::WHMapMode ) - eSizeMap = (MapUnit)ReadLongRes(); - if ( nObjMask & RscWindowFlags::Width ) - aSize.Width() = ImplLogicUnitToPixelX( ReadLongRes(), eSizeMap ); - if ( nObjMask & RscWindowFlags::Height ) - aSize.Height() = ImplLogicUnitToPixelY( ReadLongRes(), eSizeMap ); - } - - RSWND nRSStyle = aHeader.nRSStyle; - - // looks bad due to optimization - if ( nRSStyle & RSWND::CLIENTSIZE ) - { - if ( bPos ) - SetPosPixel( aPos ); - if ( bSize ) - SetOutputSizePixel( aSize ); - } - else if ( bPos && bSize ) - SetPosSizePixel( aPos, aSize ); - else if ( bPos ) - SetPosPixel( aPos ); - else if ( bSize ) - SetSizePixel( aSize ); - - if ( nRSStyle & RSWND::DISABLED ) - Enable( false ); - - if ( nObjMask & RscWindowFlags::Text ) - SetText( ReadStringRes() ); - if ( nObjMask & RscWindowFlags::QuickText ) - SetQuickHelpText( ReadStringRes() ); -} - -} /* namespace vcl */ - |