summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/Library_vcl.mk1
-rw-r--r--vcl/source/control/ctrl.cxx13
-rw-r--r--vcl/source/window/resource.cxx126
3 files changed, 0 insertions, 140 deletions
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 */
-