no Control loaded from .src now

Change-Id: I25af1187f7888ad3f8d7078e3b59d3e4a09b8ab5
This commit is contained in:
Caolán McNamara
2016-10-25 10:27:15 +01:00
parent 3c0bfd4271
commit d1bea6be4f
5 changed files with 0 additions and 145 deletions

View File

@@ -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;

View File

@@ -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);

View File

@@ -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 \

View File

@@ -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();

View File

@@ -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 */