formula/source/ui/dlg/funcutl.cxx | 11 include/formula/funcutl.hxx | 2 include/sfx2/dinfdlg.hxx | 2 include/svtools/ctrlbox.hxx | 1 include/svtools/treelistbox.hxx | 1 include/svx/fntctrl.hxx | 1 include/tools/rc.h | 23 - include/tools/rcid.h | 12 include/tools/resid.hxx | 5 include/vcl/button.hxx | 1 include/vcl/ctrl.hxx | 1 include/vcl/edit.hxx | 2 include/vcl/fixed.hxx | 1 include/vcl/lstbox.hxx | 2 include/vcl/window.hxx | 16 rsc/inc/rscarray.hxx | 17 - rsc/inc/rscdb.hxx | 19 - rsc/source/parser/rscicpx.cxx | 215 ------------ rsc/source/parser/rscinit.cxx | 43 -- rsc/source/res/rscarray.cxx | 33 - sc/AllLangResTarget_sc.mk | 1 sc/UIConfig_scalc.mk | 1 sc/inc/sc.hrc | 1 sc/source/ui/condformat/condformatdlg.cxx | 3 sc/source/ui/condformat/condformatdlgentry.cxx | 287 ++++++++-------- sc/source/ui/inc/condformatdlg.hrc | 55 --- sc/source/ui/inc/condformatdlgentry.hxx | 6 sc/source/ui/src/condformatdlg.src | 294 ----------------- sc/uiconfig/scalc/ui/conditionalentry.ui | 425 +++++++++++++++++++++++++ sfx2/source/dialog/dinfdlg.cxx | 9 sfx2/source/dialog/dinfdlg.src | 10 sfx2/source/inc/helpid.hrc | 2 sfx2/source/inc/sfxlocal.hrc | 6 svtools/source/contnr/treelistbox.cxx | 31 - svtools/source/control/ctrlbox.cxx | 7 svx/source/dialog/fntctrl.cxx | 8 vcl/Library_vcl.mk | 1 vcl/source/control/button.cxx | 13 vcl/source/control/ctrl.cxx | 13 vcl/source/control/edit.cxx | 22 - vcl/source/control/fixed.cxx | 15 vcl/source/control/listbox.cxx | 35 -- vcl/source/window/resource.cxx | 126 ------- vcl/source/window/window.cxx | 12 44 files changed, 586 insertions(+), 1205 deletions(-)
New commits: commit 8a063e2f2a4081234aaf538751bb1bb3c68bd8f8 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Oct 25 10:40:55 2016 +0100 drop some unused declarations Change-Id: I88a160767c22ed234777b69c9003cc3b1a065b94 diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx index 9f9a50c..5eadf14 100644 --- a/rsc/inc/rscdb.hxx +++ b/rsc/inc/rscdb.hxx @@ -36,14 +36,8 @@ class RscError; class RscTupel; class RscCont; class RscCmdLine; -enum class SymbolType : sal_uInt16; -enum class ToolBoxItemBits; -enum class WindowBorderStyle : sal_Int16; enum class KeyFuncType : sal_Int32; enum class MenuItemBits : sal_Int16; -enum class ToolBoxItemType; -enum class ButtonType; -enum class WindowAlign; enum class SfxStyleFamily; enum class MapUnit; @@ -144,7 +138,6 @@ class RscTypCont void Init(); // initializes classes and tables void SETCONST( RscConst *, const char *, sal_uInt32 ); void SETCONST( RscConst *, Atom, sal_uInt32 ); - inline void SETCONST( RscConst *p1, const char * p2, SymbolType p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); } inline void SETCONST( RscConst *p1, const char * p2, KeyFuncType p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); } inline void SETCONST( RscConst *p1, Atom p2, MenuItemBits p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); } inline void SETCONST( RscConst *p1, const char * p2, SfxStyleFamily p3 ) { SETCONST(p1, p2, static_cast<sal_uInt16>(p3)); } commit cdd3963a3a7c521aaddd0059324452cfd7836fdd Author: Caolán McNamara <caol...@redhat.com> Date: Tue Oct 25 10:39:02 2016 +0100 no RSWND anymore Change-Id: I5547a0d19ae60ea06dd666c77deaf0de910975d0 diff --git a/include/tools/rc.h b/include/tools/rc.h index e0a464a..aa9f24a 100644 --- a/include/tools/rc.h +++ b/include/tools/rc.h @@ -24,14 +24,6 @@ #include <o3tl/typed_flags_set.hxx> // Attributes in *.src files -enum class RSWND { - NONE = 0x00, - DISABLED = 0x01, // "Disable" attribute - CLIENTSIZE = 0x02 // "OutputSize" attribute -}; -namespace o3tl { - template<> struct typed_flags<RSWND> : is_typed_flags<RSWND, 0x03> {}; -} // For all menu resources: enum class RscMenu { diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx index 4242f5e..9f9a50c 100644 --- a/rsc/inc/rscdb.hxx +++ b/rsc/inc/rscdb.hxx @@ -45,7 +45,6 @@ enum class ToolBoxItemType; enum class ButtonType; enum class WindowAlign; enum class SfxStyleFamily; -enum class RSWND; enum class MapUnit; struct WriteRcContext @@ -146,7 +145,6 @@ class RscTypCont void SETCONST( RscConst *, const char *, sal_uInt32 ); void SETCONST( RscConst *, Atom, sal_uInt32 ); inline void SETCONST( RscConst *p1, const char * p2, SymbolType p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); } - inline void SETCONST( RscConst *p1, Atom p2, RSWND p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); } inline void SETCONST( RscConst *p1, const char * p2, KeyFuncType p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); } inline void SETCONST( RscConst *p1, Atom p2, MenuItemBits p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); } inline void SETCONST( RscConst *p1, const char * p2, SfxStyleFamily p3 ) { SETCONST(p1, p2, static_cast<sal_uInt16>(p3)); } commit 00c4595646d109b0d387d419eddf933ebcd878cc Author: Caolán McNamara <caol...@redhat.com> Date: Tue Oct 25 10:36:57 2016 +0100 no WindowResHeader, no RscWindowFlags Change-Id: Id41e9414237c849c211785151e9170c71a449238 diff --git a/include/tools/rc.h b/include/tools/rc.h index 5355e8f..e0a464a 100644 --- a/include/tools/rc.h +++ b/include/tools/rc.h @@ -33,21 +33,6 @@ namespace o3tl { template<> struct typed_flags<RSWND> : is_typed_flags<RSWND, 0x03> {}; } -enum class RscWindowFlags { - XYMapMode = 0x0001, - X = 0x0002, - Y = 0x0004, - WHMapMode = 0x0008, - Width = 0x0010, - Height = 0x0020, - Text = 0x0040, - QuickText = 0x0100, - HelpId = 0x0200 -}; -namespace o3tl { - template<> struct typed_flags<RscWindowFlags> : is_typed_flags<RscWindowFlags, 0x37F> {}; -} - // For all menu resources: enum class RscMenu { Items = 0x01, diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index 35e0987..ae93080 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -460,16 +460,6 @@ class MenuFloatingWindow; class LifecycleTest; namespace svt { class PopupWindowControllerImpl; } -enum class RSWND; -enum class RscWindowFlags; - -struct WindowResHeader -{ - RscWindowFlags nObjMask; - OString aHelpId; - RSWND nRSStyle; -}; - enum class WindowHitTest { NONE = 0x0000, Inside = 0x0001, @@ -479,7 +469,6 @@ namespace o3tl { template<> struct typed_flags<WindowHitTest> : is_typed_flags<WindowHitTest, 0x0003> {}; }; - namespace vcl { class VCL_DLLPUBLIC RenderTools commit 2b6abbaa24a35111902a9b31c8cf5dca5477c4e8 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Oct 25 10:32:48 2016 +0100 can drop RSC_WINDOW now Change-Id: Ic60b35eb78ebd3e934cbf45c2184edf59c971a53 diff --git a/include/tools/rcid.h b/include/tools/rcid.h index 4a9951e..924b3d2 100644 --- a/include/tools/rcid.h +++ b/include/tools/rcid.h @@ -43,8 +43,6 @@ #define RSC_IMAGE (RSC_NOTYPE + 0x23) #define RSC_IMAGELIST (RSC_NOTYPE + 0x24) -#define RSC_WINDOW (RSC_NOTYPE + 0x35) - #define RSC_STRINGARRAY (RSC_NOTYPE + 0x79) // (RSC_NOTYPE + 0x200) - (RSC_NOTYPE + 0x300) reserved for Sfx diff --git a/include/tools/resid.hxx b/include/tools/resid.hxx index e29b0fe..9dd7b22 100644 --- a/include/tools/resid.hxx +++ b/include/tools/resid.hxx @@ -71,8 +71,8 @@ public: [Example] ResId aId( 1000 ); - aId.SetRT( RSC_WINDOW ); // settype window Window - //aId.GetRT() == RSC_WINDOW is true + aId.SetRT( RSC_RESOURCE ); // settype window Resource + //aId.GetRT() == RSC_RESOURCE is true @see ResId::GetRT2(), ResId::GetRT() diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx index cc7bbaf..4242f5e 100644 --- a/rsc/inc/rscdb.hxx +++ b/rsc/inc/rscdb.hxx @@ -172,8 +172,6 @@ class RscTypCont RscTop * InitClassBitmap( RscTop * pSuper ); RscTop * InitClassImage( RscTop * pSuper, RscTop *pClassBitmap ); RscTop * InitClassImageList( RscTop * pSuper, RscCont * pStrLst ); - RscTop * InitClassWindow( RscTop * pSuper, RscEnum * pMapUnit, - RscArray * pLangGeo ); RscTop * InitClassKeyCode( RscTop * pSuper, RscEnum * pKey ); RscTop * InitClassMenuItem( RscTop * pSuper ); RscTop * InitClassMenu( RscTop * pSuper, RscTop * pMenuItem ); @@ -186,9 +184,6 @@ class RscTypCont RscTop * pStyleFamily ); RscTop * InitClassSfxSlotInfo( RscTop * pSuper ); - void InsWinBit( RscTop * pClass, const OString& rName, - Atom nVal ); - public: RscBool aBool; RscRange aShort; diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx index 3adc712..f78d99b 100644 --- a/rsc/source/parser/rscicpx.cxx +++ b/rsc/source/parser/rscicpx.cxx @@ -33,23 +33,6 @@ #include <rsclex.hxx> #include <rscyacc.hxx> -void RscTypCont::InsWinBit( RscTop * pClass, const OString& rName, - Atom nVal ) -{ - RscClient * pClient; - - // add client variables - aBaseLst.push_back( - pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, &aWinBits, nVal ) - ); - Atom nId = aNmTb.Put( rName.getStr(), VARNAME ); - pClass->SetVariable( nId, pClient, nullptr, - VAR_NODATAINST, 0, nWinBitVarId ); -} - -#define INS_WINBIT( pClass, WinBit ) \ - InsWinBit( pClass, #WinBit, n##WinBit##Id ); - RscTop * RscTypCont::InitClassMgr() { RscTop * pClassMgr; @@ -162,89 +145,6 @@ RscTop * RscTypCont::InitClassImageList( RscTop * pSuper, RscCont * pStrLst ) return pClassImageList; } -RscTop * RscTypCont::InitClassWindow( RscTop * pSuper, RscEnum * pMapUnit, - RscArray * pLangGeo ) -{ - Atom nId; - RscTop * pClassWindow; - - // initialize class - nId = pHS->getID( "Window" ); - pClassWindow = new RscClass( nId, RSC_WINDOW, pSuper ); - pClassWindow->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType ); - aNmTb.Put( nId, CLASSNAME, pClassWindow ); - - // initialize variables - { - RscFlag * pFlag; - RscClient * pClient; - Atom nVarId, nDisableId, nOutputSizeId; - - aBaseLst.push_back( pFlag = new RscFlag( pHS->getID( "FlagWndExtra" ), RSC_NOTYPE ) ); - - // set the constants in table - nDisableId = pHS->getID( "RSWND_DISABLE" ); - SETCONST( pFlag, nDisableId, RSWND::DISABLED ); - nOutputSizeId = pHS->getID( "RSWND_OUTPUTSIZE" ); - SETCONST( pFlag, nOutputSizeId, RSWND::CLIENTSIZE ); - - // add variable - nVarId = aNmTb.Put( "_RscExtraFlags", VARNAME ); - pClassWindow->SetVariable( nVarId, pFlag, nullptr, - VAR_HIDDEN | VAR_NOENUM ); - - aBaseLst.push_back( - pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, nDisableId ) - ); - nId = aNmTb.Put( "Disable", VARNAME ); - pClassWindow->SetVariable( nId, pClient, nullptr, - VAR_NODATAINST, 0, nVarId ); - - aBaseLst.push_back( - pClient = new RscClient( pHS->getID( "sal_Bool" ), RSC_NOTYPE, pFlag, nOutputSizeId ) - ); - nId = aNmTb.Put( "OutputSize", VARNAME ); - pClassWindow->SetVariable( nId, pClient, nullptr, - VAR_NODATAINST, 0, nVarId ); - } - - pClassWindow->SetVariable( nWinBitVarId, &aWinBits, nullptr, - VAR_HIDDEN | VAR_NOENUM ); - - INS_WINBIT(pClassWindow,Border) - INS_WINBIT(pClassWindow,Hide) - INS_WINBIT(pClassWindow,ClipChildren) - INS_WINBIT(pClassWindow,SVLook) - InsWinBit( pClassWindow, "DialogControl", nTabControlId ); - - nId = aNmTb.Put( "HelpID", VARNAME ); - pClassWindow->SetVariable( nId, &aStringLiteral, nullptr, 0, (sal_uInt32)RscWindowFlags::HelpId ); - - - nRsc_XYMAPMODEId = nId = aNmTb.Put( "_XYMapMode", VARNAME ); - pClassWindow->SetVariable( nId, pMapUnit, nullptr, 0, (sal_uInt32)RscWindowFlags::XYMapMode ); - nRsc_X = nId = aNmTb.Put( "_X", VARNAME ); - pClassWindow->SetVariable( nId, &aLong, nullptr, 0, (sal_uInt32)RscWindowFlags::X ); - nRsc_Y = nId = aNmTb.Put( "_Y", VARNAME ); - pClassWindow->SetVariable( nId, &aLong, nullptr, 0, (sal_uInt32)RscWindowFlags::Y ); - - nRsc_WHMAPMODEId = nId = aNmTb.Put( "_WHMapMode", VARNAME ); - pClassWindow->SetVariable( nId, pMapUnit, nullptr, 0, (sal_uInt32)RscWindowFlags::WHMapMode ); - nRsc_WIDTH = nId = aNmTb.Put( "_Width", VARNAME ); - pClassWindow->SetVariable( nId, &aLong, nullptr, 0, (sal_uInt32)RscWindowFlags::Width ); - nRsc_HEIGHT = nId = aNmTb.Put( "_Height", VARNAME ); - pClassWindow->SetVariable( nId, &aLong, nullptr, 0, (sal_uInt32)RscWindowFlags::Height ); - - nRsc_DELTALANG = nId = aNmTb.Put( "DeltaLang", VARNAME ); - pClassWindow->SetVariable( nId, pLangGeo, nullptr, VAR_NORC | VAR_NOENUM); - nId = aNmTb.Put( "Text", VARNAME ); - pClassWindow->SetVariable( nId, &aLangString, nullptr, 0, (sal_uInt32)RscWindowFlags::Text ); - nId = aNmTb.Put( "QuickHelpText", VARNAME ); - pClassWindow->SetVariable( nId, &aLangString, nullptr, 0, (sal_uInt32)RscWindowFlags::QuickText ); - - return pClassWindow; -} - RscTop * RscTypCont::InitClassKeyCode( RscTop * pSuper, RscEnum * pKey ) { Atom nId; diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx index e7663c8..b82cf73 100644 --- a/rsc/source/parser/rscinit.cxx +++ b/rsc/source/parser/rscinit.cxx @@ -61,7 +61,6 @@ void RscTypCont::Init() RscTop * pClassBitmap; RscTop * pClassImage; RscTop * pClassImageList; - RscTop * pClassWindow; RscTop * pClassKeyCode; Atom nId; @@ -276,10 +275,6 @@ void RscTypCont::Init() pClassImageList = InitClassImageList( pClassMgr, pStringLongTupelList ); pRoot->Insert( pClassImageList ); - - pClassWindow = InitClassWindow( pClassMgr, pMapUnit, - pLangGeometry ); - pRoot->Insert( pClassWindow ); } { pClassKeyCode = InitClassKeyCode( pClassMgr, pKey ); commit f615d6195a2be9f9f2cbd7e9f77f042acac6656f Author: Caolán McNamara <caol...@redhat.com> Date: Tue Oct 25 10:30:04 2016 +0100 can drop RSC_CONTROL now Change-Id: I651b9d2ead019507b8e48c4e19797bf8f8b9a438 diff --git a/include/tools/rcid.h b/include/tools/rcid.h index 96859d1..4a9951e 100644 --- a/include/tools/rcid.h +++ b/include/tools/rcid.h @@ -45,8 +45,6 @@ #define RSC_WINDOW (RSC_NOTYPE + 0x35) -#define RSC_CONTROL (RSC_NOTYPE + 0x44) - #define RSC_STRINGARRAY (RSC_NOTYPE + 0x79) // (RSC_NOTYPE + 0x200) - (RSC_NOTYPE + 0x300) reserved for Sfx diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx index 87036e4..cc7bbaf 100644 --- a/rsc/inc/rscdb.hxx +++ b/rsc/inc/rscdb.hxx @@ -174,7 +174,6 @@ class RscTypCont RscTop * InitClassImageList( RscTop * pSuper, RscCont * pStrLst ); RscTop * InitClassWindow( RscTop * pSuper, RscEnum * pMapUnit, RscArray * pLangGeo ); - RscTop * InitClassControl( RscTop * pSuper ); RscTop * InitClassKeyCode( RscTop * pSuper, RscEnum * pKey ); RscTop * InitClassMenuItem( RscTop * pSuper ); RscTop * InitClassMenu( RscTop * pSuper, RscTop * pMenuItem ); diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx index 0d3aa650..3adc712 100644 --- a/rsc/source/parser/rscicpx.cxx +++ b/rsc/source/parser/rscicpx.cxx @@ -245,23 +245,6 @@ RscTop * RscTypCont::InitClassWindow( RscTop * pSuper, RscEnum * pMapUnit, return pClassWindow; } -RscTop * RscTypCont::InitClassControl( RscTop * pSuper ) -{ - Atom nId; - RscTop * pClassControl; - - // initialize class - nId = pHS->getID( "Control" ); - pClassControl = new RscClass( nId, RSC_CONTROL, pSuper ); - pClassControl->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType ); - aNmTb.Put( nId, CLASSNAME, pClassControl ); - - InsWinBit( pClassControl, "TabStop", nTabstopId ); - INS_WINBIT(pClassControl,Group) - - return pClassControl; -} - RscTop * RscTypCont::InitClassKeyCode( RscTop * pSuper, RscEnum * pKey ) { Atom nId; diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx index 066fad4..e7663c8 100644 --- a/rsc/source/parser/rscinit.cxx +++ b/rsc/source/parser/rscinit.cxx @@ -62,7 +62,6 @@ void RscTypCont::Init() RscTop * pClassImage; RscTop * pClassImageList; RscTop * pClassWindow; - RscTop * pClassControl; RscTop * pClassKeyCode; Atom nId; @@ -283,10 +282,6 @@ void RscTypCont::Init() pRoot->Insert( pClassWindow ); } { - pClassControl = InitClassControl( pClassWindow ); - pRoot->Insert( pClassControl ); -} -{ pClassKeyCode = InitClassKeyCode( pClassMgr, pKey ); pRoot->Insert( pClassKeyCode ); } commit d1bea6be4f8190c1a6da7768ea2b80a5b51676a8 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Oct 25 10:27:15 2016 +0100 no Control loaded from .src now Change-Id: I25af1187f7888ad3f8d7078e3b59d3e4a09b8ab5 diff --git a/include/vcl/ctrl.hxx b/include/vcl/ctrl.hxx index 6bfe7a8..bdf9520 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 3339413..35e0987 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 2b0874a..888a9d0 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 c2d697d..a137b43 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 86326f9..0000000 --- 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 */ - commit 3c0bfd4271a92cd05f5c8b096376519e3c5b4754 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Oct 25 10:25:04 2016 +0100 drop HID_CTRL_CUSTOMPROPS_YES_NO that does nowhere Change-Id: Ibf64359936ea224dc7342585b99691f88630c6ca diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx index 43d36f7..1972b91 100644 --- a/include/sfx2/dinfdlg.hxx +++ b/include/sfx2/dinfdlg.hxx @@ -361,7 +361,7 @@ private: VclPtr<RadioButton> m_aNoButton; public: - CustomPropertiesYesNoButton( vcl::Window* pParent, const ResId& rResId ); + CustomPropertiesYesNoButton(vcl::Window* pParent); virtual ~CustomPropertiesYesNoButton() override; virtual void dispose() override; diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 8be42dd..3242135 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -1232,12 +1232,11 @@ void SfxDocumentInfoDialog::AddFontTabPage() // class CustomPropertiesYesNoButton ------------------------------------- -CustomPropertiesYesNoButton::CustomPropertiesYesNoButton(vcl::Window* pParent, const ResId& rResId) - : Control(pParent, rResId) +CustomPropertiesYesNoButton::CustomPropertiesYesNoButton(vcl::Window* pParent) + : Control(pParent, WB_DIALOGCONTROL | WB_BORDER) , m_aYesButton(VclPtr<RadioButton>::Create(this, WB_TABSTOP)) , m_aNoButton(VclPtr<RadioButton>::Create(this, WB_TABSTOP)) { - FreeResource(); m_aYesButton->SetText(MnemonicGenerator::EraseAllMnemonicChars(Button::GetStandardText(StandardButtonType::Yes))); m_aYesButton->Show(); m_aNoButton->SetText(MnemonicGenerator::EraseAllMnemonicChars(Button::GetStandardText(StandardButtonType::No))); @@ -1443,7 +1442,7 @@ CustomPropertyLine::CustomPropertyLine( vcl::Window* pParent ) : m_sDurationFormat( SfxResId( SFX_ST_DURATION_FORMAT ).toString() ), m_aDurationField( VclPtr<CustomPropertiesDurationField>::Create(pParent, WB_BORDER|WB_TABSTOP|WB_READONLY, this ) ), m_aEditButton ( VclPtr<CustomPropertiesEditButton>::Create(pParent, WB_TABSTOP, this) ), - m_aYesNoButton ( VclPtr<CustomPropertiesYesNoButton>::Create(pParent, SfxResId( SFX_WIN_PROPERTY_YESNO )) ), + m_aYesNoButton ( VclPtr<CustomPropertiesYesNoButton>::Create(pParent) ), m_aRemoveButton ( VclPtr<CustomPropertiesRemoveButton>::Create(pParent, 0, this) ), m_bIsDate ( false ), m_bIsRemoved ( false ), @@ -1489,7 +1488,7 @@ CustomPropertiesWindow::CustomPropertiesWindow(vcl::Window* pParent, m_aTimeField ( VclPtr<TimeField>::Create( this, WB_BORDER|WB_TABSTOP|WB_SPIN|WB_LEFT ) ), m_aDurationField( VclPtr<Edit>::Create( this, WB_BORDER|WB_TABSTOP|WB_READONLY ) ), m_aEditButton ( VclPtr<PushButton>::Create( this, WB_TABSTOP ) ), - m_aYesNoButton ( VclPtr<CustomPropertiesYesNoButton>::Create( this, SfxResId( SFX_WIN_PROPERTY_YESNO )) ), + m_aYesNoButton ( VclPtr<CustomPropertiesYesNoButton>::Create(this) ), m_aRemoveButton ( VclPtr<ImageButton>::Create( this, 0 ) ), m_nScrollPos (0), m_pCurrentLine (nullptr), diff --git a/sfx2/source/dialog/dinfdlg.src b/sfx2/source/dialog/dinfdlg.src index a3afd76..558588b 100644 --- a/sfx2/source/dialog/dinfdlg.src +++ b/sfx2/source/dialog/dinfdlg.src @@ -88,15 +88,6 @@ String SFX_ST_DURATION_FORMAT Text [en-US] = " Y: %1 M: %2 D: %3 H: %4 M: %5 S: %6"; }; -Control SFX_WIN_PROPERTY_YESNO -{ - OutputSize = TRUE ; - Pos = MAP_APPFONT ( 127 , 2 ) ; - Size = MAP_APPFONT ( 61 , RSC_CD_TEXTBOX_HEIGHT ) ; - Border = TRUE ; - DialogControl = TRUE ; -}; - String STR_SFX_REMOVE_PROPERTY { Text [ en-US ] = "Remove Property" ; diff --git a/sfx2/source/inc/sfxlocal.hrc b/sfx2/source/inc/sfxlocal.hrc index e8d2d5d..ea9f835 100644 --- a/sfx2/source/inc/sfxlocal.hrc +++ b/sfx2/source/inc/sfxlocal.hrc @@ -34,16 +34,12 @@ #define STR_SFX_EXPLORERFILE_EXPORT (RID_SFX_SFXLOCAL_START + 6) #define STR_SFX_DOCK (RID_SFX_SFXLOCAL_START + 7) #define STR_SFX_UNDOCK (RID_SFX_SFXLOCAL_START + 8) +#define SFX_ST_DURATION_FORMAT (RID_SFX_SFXLOCAL_START + 9) #define STR_SFX_QUERY_WRONG_TYPE (RID_SFX_SFXLOCAL_START + 11) #define SFX_LB_PROPERTY_STRINGARRAY (RID_SFX_SFXLOCAL_START + 12) #define SFX_CB_PROPERTY_STRINGARRAY (RID_SFX_SFXLOCAL_START + 13) -// Controls -------------------------------------------------------------- -#define SFX_WIN_PROPERTY_YESNO (RID_SFX_SFXLOCAL_START + 6) -#define SFX_ST_DURATION_FORMAT (RID_SFX_SFXLOCAL_START + 13) - // Images ---------------------------------------------------------------- - #define SFX_IMG_PROPERTY_REMOVE (RID_SFX_SFXLOCAL_START + 0) #define SFX_IMG_CLOSE_DOC (RID_SFX_SFXLOCAL_START + 2) commit d2b4a0d5ff18db30bd93b9d88dd85ba421a557c9 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Oct 25 10:18:33 2016 +0100 drop HID_CTRL_CUSTOMPROPS_YES_NO that does nowhere Change-Id: I1a82e91539947939667e0c458f964e7e13c50514 diff --git a/sfx2/source/dialog/dinfdlg.src b/sfx2/source/dialog/dinfdlg.src index b050419..a3afd76 100644 --- a/sfx2/source/dialog/dinfdlg.src +++ b/sfx2/source/dialog/dinfdlg.src @@ -90,7 +90,6 @@ String SFX_ST_DURATION_FORMAT Control SFX_WIN_PROPERTY_YESNO { - HelpId = HID_CTRL_CUSTOMPROPS_YES_NO; OutputSize = TRUE ; Pos = MAP_APPFONT ( 127 , 2 ) ; Size = MAP_APPFONT ( 61 , RSC_CD_TEXTBOX_HEIGHT ) ; diff --git a/sfx2/source/inc/helpid.hrc b/sfx2/source/inc/helpid.hrc index 6777c02..b761cd1 100644 --- a/sfx2/source/inc/helpid.hrc +++ b/sfx2/source/inc/helpid.hrc @@ -52,8 +52,6 @@ #define HID_CONFIG_SAVE "SFX2_HID_CONFIG_SAVE" -#define HID_CTRL_CUSTOMPROPS_YES_NO "SFX2_HID_CTRL_CUSTOMPROPS_YES_NO" - #define HID_QUERY_LOAD_TEMPLATE "SFX2_HID_QUERY_LOAD_TEMPLATE" #define HID_SIDEBAR_WINDOW "SFX2_HID_SIDEBAR_WINDOW" commit 1c2dd78730784f4d8ca2fd0766c767b16f163a9b Author: Caolán McNamara <caol...@redhat.com> Date: Mon Oct 24 17:40:14 2016 +0100 no users of RscClassArray left Change-Id: I1eeeca93ef6e57bddde54dc0abf5c1984da962cc diff --git a/rsc/inc/rscarray.hxx b/rsc/inc/rscarray.hxx index 9ba70fb..62fb1da 100644 --- a/rsc/inc/rscarray.hxx +++ b/rsc/inc/rscarray.hxx @@ -91,23 +91,6 @@ public: RscTypCont * pTC, sal_uInt32, bool bExtra ) override; }; -class RscClassArray : public RscArray -{ -public: - RscClassArray( Atom nId, sal_uInt32 nTypId, - RscTop * pSuper, RscEnum * pTypeClass ); - virtual ~RscClassArray() override; - virtual void WriteSrcHeader( const RSCINST & rInst, FILE * fOutput, - RscTypCont * pTC, sal_uInt32 nTab, - const RscId & aId, const char * ) override; - void WriteSrc( const RSCINST & rInst, FILE * fOutput, - RscTypCont * pTC, sal_uInt32 nTab, const char * ) override; - virtual ERRTYPE WriteRcHeader( const RSCINST & rInst, RscWriteRc & aMem, - RscTypCont * pTC, const RscId & aId, - sal_uInt32 nDeep, bool bExtra ) override; -}; - - class RscLangArray : public RscArray { public: diff --git a/rsc/source/res/rscarray.cxx b/rsc/source/res/rscarray.cxx index b73c932..3348807 100644 --- a/rsc/source/res/rscarray.cxx +++ b/rsc/source/res/rscarray.cxx @@ -422,39 +422,6 @@ ERRTYPE RscArray::WriteRc( const RSCINST & rInst, RscWriteRc & rMem, return aError; } -RscClassArray::RscClassArray( Atom nId, sal_uInt32 nTypeId, RscTop * pSuper, - RscEnum * pTypeCl ) - : RscArray( nId, nTypeId, pSuper, pTypeCl ) -{ -} - -RscClassArray::~RscClassArray() -{ -} - -void RscClassArray::WriteSrcHeader( const RSCINST & rInst, FILE * fOutput, - RscTypCont * pTC, sal_uInt32 nTab, - const RscId & aId, const char * pName ) -{ - RscArray::WriteSrcHeader( rInst, fOutput, pTC, nTab, aId, pName ); -} - -void RscClassArray::WriteSrc( const RSCINST & rInst, FILE * fOutput, - RscTypCont * pTC, sal_uInt32 nTab, - const char * pVarName ) -{ - RscArray::WriteSrc( rInst, fOutput, pTC, nTab, pVarName ); -} - -ERRTYPE RscClassArray::WriteRcHeader( const RSCINST & rInst, RscWriteRc & aMem, - RscTypCont * pTC, const RscId & aId, - sal_uInt32 nDeep, bool bExtra ) -{ - // Eigenen Typ schreiben - return GetSuperClass()->WriteRcHeader( rInst, aMem, pTC, aId, - nDeep, bExtra ); -} - RscLangArray::RscLangArray( Atom nId, sal_uInt32 nTypeId, RscTop * pSuper, RscEnum * pTypeCl ) : RscArray( nId, nTypeId, pSuper, pTypeCl ) commit da05f90f9ba6c41f249bed0a8733e6c4f91e1aac Author: Caolán McNamara <caol...@redhat.com> Date: Mon Oct 24 17:39:36 2016 +0100 no evidence that LangKeyCode is needed for anything Change-Id: I01cf8019fb6bba15c6ed48564ad2e65bf3fbd187 diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx index 5496a05..066fad4 100644 --- a/rsc/source/parser/rscinit.cxx +++ b/rsc/source/parser/rscinit.cxx @@ -64,7 +64,6 @@ void RscTypCont::Init() RscTop * pClassWindow; RscTop * pClassControl; RscTop * pClassKeyCode; - RscTop * pLangClassKeyCode; Atom nId; @@ -290,12 +289,6 @@ void RscTypCont::Init() { pClassKeyCode = InitClassKeyCode( pClassMgr, pKey ); pRoot->Insert( pClassKeyCode ); - { - pLangClassKeyCode = new RscClassArray( pHS->getID( "LangKeyCode" ), - RSC_KEYCODE, pClassKeyCode, &aLangType ); - aBaseLst.push_back( pLangClassKeyCode ); - } - } { RscTop* pClassMenuItem = InitClassMenuItem(pClassMgr); commit c445e1d67848a1c52dc6e81a13f3d8de9e77c40e Author: Caolán McNamara <caol...@redhat.com> Date: Mon Oct 24 17:30:37 2016 +0100 no need for ResId here now Change-Id: I2b9ec5e587724550ea8b78f023f18b6ec65d7f75 diff --git a/include/formula/funcutl.hxx b/include/formula/funcutl.hxx index 941ef5a..a2632ef 100644 --- a/include/formula/funcutl.hxx +++ b/include/formula/funcutl.hxx @@ -31,7 +31,6 @@ #include <vcl/vclptr.hxx> class KeyEvent; -class ResId; namespace vcl { class Window; commit 56c71eb5bc674938fc9934a56770f6ee19c98204 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Oct 24 17:24:04 2016 +0100 remove now unused ImplLoadRes methods Change-Id: I8ff86fa847a74d48ccd06e8945beac9cf5653ab9 diff --git a/include/vcl/edit.hxx b/include/vcl/edit.hxx index 708a254..76aadfe 100644 --- a/include/vcl/edit.hxx +++ b/include/vcl/edit.hxx @@ -132,7 +132,6 @@ protected: using Window::ImplInit; SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle ); SAL_DLLPRIVATE static WinBits ImplInitStyle( WinBits nStyle ); - SAL_DLLPRIVATE void ImplLoadRes(); SAL_DLLPRIVATE void ImplSetSelection( const Selection& rSelection, bool bPaint = true ); SAL_DLLPRIVATE ControlType ImplGetNativeControlType() const; SAL_DLLPRIVATE long ImplGetExtraXOffset() const; diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx index 2d85a93..194739b 100644 --- a/include/vcl/lstbox.hxx +++ b/include/vcl/lstbox.hxx @@ -107,7 +107,6 @@ protected: using Window::ImplInit; SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle ); SAL_DLLPRIVATE static WinBits ImplInitStyle( WinBits nStyle ); - SAL_DLLPRIVATE void ImplLoadRes(); bool IsDropDownBox() const { return mpFloatWin != nullptr; } protected: diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 76d7ccc..1542d5b 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -1266,15 +1266,6 @@ void Edit::ImplSetCursorPos( sal_Int32 nChar, bool bSelect ) ImplSetSelection( aSelection ); } -void Edit::ImplLoadRes() -{ - Control::ImplLoadRes(); - - sal_uInt16 nTextLength = ReadShortRes(); - if ( nTextLength ) - SetMaxTextLen( nTextLength ); -} - void Edit::ImplCopyToSelectionClipboard() { if ( GetSelection().Len() ) diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx index b0ef400..3482fcf 100644 --- a/vcl/source/control/listbox.cxx +++ b/vcl/source/control/listbox.cxx @@ -176,28 +176,6 @@ WinBits ListBox::ImplInitStyle( WinBits nStyle ) return nStyle; } -void ListBox::ImplLoadRes() -{ - Control::ImplLoadRes(); - - // The resource short is actually to be treated as unsigned short. - sal_uInt16 nResPos = static_cast<sal_uInt16>(ReadShortRes()); - sal_Int32 nSelPos = (nResPos == SAL_MAX_UINT16) ? LISTBOX_ENTRY_NOTFOUND : nResPos; - sal_Int32 nNumber = ReadLongRes(); - - for( sal_Int32 i = 0; i < nNumber; i++ ) - { - sal_Int32 nPos = InsertEntry( ReadStringRes() ); - - sal_IntPtr nId = ReadLongRes(); - if( nId ) - SetEntryData( nPos, reinterpret_cast<void *>(nId) ); // ID as UserData - } - - if( nSelPos < nNumber ) - SelectEntryPos( nSelPos ); -} - IMPL_LINK_NOARG(ListBox, ImplSelectHdl, LinkParamNone*, void) { bool bPopup = IsInDropDown(); commit c1448b4286ae9ecb192497e2a49ec66bfc49f3b6 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Oct 24 17:22:39 2016 +0100 no raw Window is loaded from .src anymore Change-Id: I81e4bb23f4a819f59115cdf58afe19097b4ce68f diff --git a/include/svx/fntctrl.hxx b/include/svx/fntctrl.hxx index 46e294f..117ef5c 100644 --- a/include/svx/fntctrl.hxx +++ b/include/svx/fntctrl.hxx @@ -45,7 +45,6 @@ private: SVX_DLLPRIVATE static void SetFontLang(const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont); public: - SvxFontPrevWindow(vcl::Window* pParent, const ResId& rId); SvxFontPrevWindow(vcl::Window* pParent, WinBits nStyle); virtual ~SvxFontPrevWindow() override; virtual void dispose() override; diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index 8563d95..3339413 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -790,7 +790,6 @@ public: // Single argument ctors shall be explicit. explicit Window( vcl::Window* pParent, WinBits nStyle = 0 ); - Window( vcl::Window* pParent, const ResId& rResId ); virtual ~Window() override; ::OutputDevice const* GetOutDev() const; diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx index 81d36d4f..1775785 100644 --- a/svx/source/dialog/fntctrl.cxx +++ b/svx/source/dialog/fntctrl.cxx @@ -503,14 +503,6 @@ void SvxFontPrevWindow::Init() SetBorderStyle(WindowBorderStyle::MONO); } -SvxFontPrevWindow::SvxFontPrevWindow(vcl::Window* pParent, const ResId& rId) - : Window(pParent, rId) - , mbResetForeground(true) - , mbResetBackground(true) -{ - Init(); -} - SvxFontPrevWindow::SvxFontPrevWindow(vcl::Window* pParent, WinBits nStyle) : Window(pParent, nStyle) , mbResetForeground(true) diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 8db7645..fdd43b8 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -98,18 +98,6 @@ Window::Window( vcl::Window* pParent, WinBits nStyle ) : ImplInit( pParent, nStyle, nullptr ); } -Window::Window( vcl::Window* pParent, const ResId& rResId ) : - Window(WINDOW_WINDOW) -{ - rResId.SetRT( RSC_WINDOW ); - WinBits nStyle = ImplInitRes( rResId ); - ImplInit( pParent, nStyle, nullptr ); - ImplLoadRes(); - - if ( !(nStyle & WB_HIDE) ) - Show(); -} - #if OSL_DEBUG_LEVEL > 0 namespace { commit 141a7aa1b3faafa7bf5c45b73f1604b16809a1a3 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Oct 24 17:28:15 2016 +0100 SvTreeListBox cannot be loaded from .src now Change-Id: I80090f4daf9b7f224392a76449a87ab6aa6b7d05 diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx index 740731c..093d520 100644 --- a/include/svtools/treelistbox.hxx +++ b/include/svtools/treelistbox.hxx @@ -342,7 +342,6 @@ protected: public: SvTreeListBox( vcl::Window* pParent, WinBits nWinStyle=0 ); - SvTreeListBox( vcl::Window* pParent, const ResId& rResId ); virtual ~SvTreeListBox() override; virtual void dispose() override; diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 0cab871..d025ee6 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -363,37 +363,6 @@ SvTreeListBox::SvTreeListBox(vcl::Window* pParent, WinBits nWinStyle) : SetSublistOpenWithLeftRight(); } -SvTreeListBox::SvTreeListBox(vcl::Window* pParent, const ResId& rResId) : - Control(pParent, rResId), - DropTargetHelper(this), - DragSourceHelper(this), - mpImpl(new SvTreeListBoxImpl(*this)), - mbContextBmpExpanded(false), - mbAlternatingRowColors(false), - mbUpdateAlternatingRows(false), - eSelMode(SelectionMode::NONE), - nMinWidthInChars(0), - mbCenterAndClipText(false) -{ - pTargetEntry = nullptr; - nImpFlags = SvTreeListBoxFlags::NONE; - nDragOptions = DND_ACTION_COPYMOVE | DND_ACTION_LINK; - nDragDropMode = DragDropMode::NONE; - SvTreeList* pTempModel = new SvTreeList; - pTempModel->SetRefCount( 0 ); - SetBaseModel(pTempModel); - pModel->InsertView( this ); - pHdlEntry = nullptr; - pEdCtrl = nullptr; - pModel->SetCloneLink( LINK(this, SvTreeListBox, CloneHdl_Impl )); - SetType(WINDOW_TREELISTBOX); - - InitTreeView(); - Resize(); - - SetSublistOpenWithLeftRight(); -} - VCL_BUILDER_DECL_FACTORY(SvTreeListBox) { WinBits nWinStyle = WB_TABSTOP; commit 3c4f6b7804495e94d951f5eaf7c4a947c9967b59 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Oct 24 17:17:40 2016 +0100 no FixedText loaded from .src now Change-Id: Ic377c5238e1763a2defdce72bbe893e826aae5ac diff --git a/include/tools/rcid.h b/include/tools/rcid.h index fb1bb72..96859d1 100644 --- a/include/tools/rcid.h +++ b/include/tools/rcid.h @@ -47,8 +47,6 @@ #define RSC_CONTROL (RSC_NOTYPE + 0x44) -#define RSC_TEXT (RSC_NOTYPE + 0x57) - #define RSC_STRINGARRAY (RSC_NOTYPE + 0x79) // (RSC_NOTYPE + 0x200) - (RSC_NOTYPE + 0x300) reserved for Sfx diff --git a/include/vcl/fixed.hxx b/include/vcl/fixed.hxx index 0096a7e..b7e3774 100644 --- a/include/vcl/fixed.hxx +++ b/include/vcl/fixed.hxx @@ -56,7 +56,6 @@ protected: public: explicit FixedText( vcl::Window* pParent, WinBits nStyle = 0 ); - explicit FixedText( vcl::Window* pParent, const ResId& rResId ); virtual ~FixedText() override; virtual void dispose() override; diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx index 1aca22e..87036e4 100644 --- a/rsc/inc/rscdb.hxx +++ b/rsc/inc/rscdb.hxx @@ -175,7 +175,6 @@ class RscTypCont RscTop * InitClassWindow( RscTop * pSuper, RscEnum * pMapUnit, RscArray * pLangGeo ); RscTop * InitClassControl( RscTop * pSuper ); - RscTop * InitClassFixedText( RscTop * pSuper ); RscTop * InitClassKeyCode( RscTop * pSuper, RscEnum * pKey ); RscTop * InitClassMenuItem( RscTop * pSuper ); RscTop * InitClassMenu( RscTop * pSuper, RscTop * pMenuItem ); diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx index b241081..0d3aa650 100644 --- a/rsc/source/parser/rscicpx.cxx +++ b/rsc/source/parser/rscicpx.cxx @@ -262,31 +262,6 @@ RscTop * RscTypCont::InitClassControl( RscTop * pSuper ) return pClassControl; } -RscTop * RscTypCont::InitClassFixedText( RscTop * pSuper ) -{ - Atom nId; - RscTop * pClassFixedText; - - // initialize class - nId = pHS->getID( "FixedText" ); - pClassFixedText = new RscClass( nId, RSC_TEXT, pSuper ); - pClassFixedText->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType ); - aNmTb.Put( nId, CLASSNAME, pClassFixedText ); - - // initialize variables - INS_WINBIT(pClassFixedText,Left) - INS_WINBIT(pClassFixedText,Center) - INS_WINBIT(pClassFixedText,Right) - INS_WINBIT(pClassFixedText,WordBreak) - INS_WINBIT(pClassFixedText,LeftLabel) - INS_WINBIT(pClassFixedText,NoLabel) - INS_WINBIT(pClassFixedText,Top) - INS_WINBIT(pClassFixedText,VCenter) - INS_WINBIT(pClassFixedText,Bottom) - - return pClassFixedText; -} - RscTop * RscTypCont::InitClassKeyCode( RscTop * pSuper, RscEnum * pKey ) { Atom nId; diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx index a127e5e..5496a05 100644 --- a/rsc/source/parser/rscinit.cxx +++ b/rsc/source/parser/rscinit.cxx @@ -63,7 +63,6 @@ void RscTypCont::Init() RscTop * pClassImageList; RscTop * pClassWindow; RscTop * pClassControl; - RscTop * pClassFixedText; RscTop * pClassKeyCode; RscTop * pLangClassKeyCode; @@ -289,9 +288,6 @@ void RscTypCont::Init() pRoot->Insert( pClassControl ); } { - pClassFixedText = InitClassFixedText( pClassControl ); - pRoot->Insert( pClassFixedText ); - pClassKeyCode = InitClassKeyCode( pClassMgr, pKey ); pRoot->Insert( pClassKeyCode ); { diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx index 7af35fc..eef58c2 100644 --- a/vcl/source/control/fixed.cxx +++ b/vcl/source/control/fixed.cxx @@ -113,21 +113,6 @@ FixedText::FixedText( vcl::Window* pParent, WinBits nStyle ) ImplInit( pParent, nStyle ); } -FixedText::FixedText( vcl::Window* pParent, const ResId& rResId ) - : Control(WINDOW_FIXEDTEXT) - , m_nMaxWidthChars(-1) - , m_nMinWidthChars(-1) - , m_pMnemonicWindow(nullptr) -{ - rResId.SetRT( RSC_TEXT ); - WinBits nStyle = ImplInitRes( rResId ); - ImplInit( pParent, nStyle ); - ImplLoadRes(); - - if ( !(nStyle & WB_HIDE) ) - Show(); -} - DrawTextFlags FixedText::ImplGetTextStyle( WinBits nWinStyle ) { DrawTextFlags nTextStyle = DrawTextFlags::Mnemonic | DrawTextFlags::EndEllipsis; commit dcd099d335dc73b325de8b3a10276a6f3bb047b3 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Oct 24 17:15:07 2016 +0100 nothing uses RSC_BUTTON anymore now Change-Id: I016d1507fcadf5da1207241c6feec1a03188eef7 diff --git a/include/tools/rcid.h b/include/tools/rcid.h index 0dc6038..fb1bb72 100644 --- a/include/tools/rcid.h +++ b/include/tools/rcid.h @@ -46,7 +46,6 @@ #define RSC_WINDOW (RSC_NOTYPE + 0x35) #define RSC_CONTROL (RSC_NOTYPE + 0x44) -#define RSC_BUTTON (RSC_NOTYPE + 0x45) #define RSC_TEXT (RSC_NOTYPE + 0x57) diff --git a/include/tools/resid.hxx b/include/tools/resid.hxx index 0feec42..e29b0fe 100644 --- a/include/tools/resid.hxx +++ b/include/tools/resid.hxx @@ -72,7 +72,6 @@ public: [Example] ResId aId( 1000 ); aId.SetRT( RSC_WINDOW ); // settype window Window - aId.SetRT( RSC_BUTTON ); // will not set type Button //aId.GetRT() == RSC_WINDOW is true @see diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx index 1c57ef8..a127e5e 100644 --- a/rsc/source/parser/rscinit.cxx +++ b/rsc/source/parser/rscinit.cxx @@ -63,7 +63,6 @@ void RscTypCont::Init() RscTop * pClassImageList; RscTop * pClassWindow; RscTop * pClassControl; - RscTop * pClassButton; RscTop * pClassFixedText; RscTop * pClassKeyCode; RscTop * pLangClassKeyCode; @@ -288,13 +287,6 @@ void RscTypCont::Init() { pClassControl = InitClassControl( pClassWindow ); pRoot->Insert( pClassControl ); - - // initialize class - nId = pHS->getID( "Button" ); - pClassButton = new RscClass( nId, RSC_BUTTON, pClassControl ); - pClassButton->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType ); - aNmTb.Put( nId, CLASSNAME, pClassButton ); - pRoot->Insert( pClassButton ); } { pClassFixedText = InitClassFixedText( pClassControl ); commit cd6e8837c17922c9ccf2b5740036853ac3adce45 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Oct 24 17:13:44 2016 +0100 no PushButton loaded from .src now Change-Id: Ib866107995ab0496cf4f37a5e780458031d2fc25 diff --git a/include/tools/rcid.h b/include/tools/rcid.h index be3c75d..0dc6038 100644 --- a/include/tools/rcid.h +++ b/include/tools/rcid.h @@ -47,7 +47,6 @@ #define RSC_CONTROL (RSC_NOTYPE + 0x44) #define RSC_BUTTON (RSC_NOTYPE + 0x45) -#define RSC_PUSHBUTTON (RSC_NOTYPE + 0x46) #define RSC_TEXT (RSC_NOTYPE + 0x57) diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx index ff52187..9d83d00 100644 --- a/include/vcl/button.hxx +++ b/include/vcl/button.hxx @@ -155,7 +155,6 @@ protected: GetCanonicalTextColor( const StyleSettings& _rStyle ) const override; public: explicit PushButton( vcl::Window* pParent, WinBits nStyle = 0 ); - explicit PushButton( vcl::Window* pParent, const ResId& ); virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void Tracking( const TrackingEvent& rTEvt ) override; diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx index aa08f7c..1aca22e 100644 --- a/rsc/inc/rscdb.hxx +++ b/rsc/inc/rscdb.hxx @@ -175,7 +175,6 @@ class RscTypCont RscTop * InitClassWindow( RscTop * pSuper, RscEnum * pMapUnit, RscArray * pLangGeo ); RscTop * InitClassControl( RscTop * pSuper ); - RscTop * InitClassPushButton( RscTop * pSuper ); RscTop * InitClassFixedText( RscTop * pSuper ); RscTop * InitClassKeyCode( RscTop * pSuper, RscEnum * pKey ); RscTop * InitClassMenuItem( RscTop * pSuper ); diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx index 4da88cd..b241081 100644 --- a/rsc/source/parser/rscicpx.cxx +++ b/rsc/source/parser/rscicpx.cxx @@ -262,25 +262,6 @@ RscTop * RscTypCont::InitClassControl( RscTop * pSuper ) return pClassControl; } -RscTop * RscTypCont::InitClassPushButton( RscTop * pSuper ) -{ - Atom nId; - RscTop * pClassPushButton; - - // initialize class - nId = pHS->getID( "PushButton" ); - pClassPushButton = new RscClass( nId, RSC_PUSHBUTTON, pSuper ); - pClassPushButton->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType ); - aNmTb.Put( nId, CLASSNAME, pClassPushButton ); - - InsWinBit( pClassPushButton, "DefButton", nDefaultId ); - INS_WINBIT( pClassPushButton, Top ) - INS_WINBIT( pClassPushButton, VCenter ) - INS_WINBIT( pClassPushButton, Bottom ) - - return pClassPushButton; -} - RscTop * RscTypCont::InitClassFixedText( RscTop * pSuper ) { Atom nId; diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx index ece6ec2..1c57ef8 100644 --- a/rsc/source/parser/rscinit.cxx +++ b/rsc/source/parser/rscinit.cxx @@ -64,7 +64,6 @@ void RscTypCont::Init() RscTop * pClassWindow; RscTop * pClassControl; RscTop * pClassButton; - RscTop * pClassPushButton; RscTop * pClassFixedText; RscTop * pClassKeyCode; RscTop * pLangClassKeyCode; @@ -296,10 +295,6 @@ void RscTypCont::Init() pClassButton->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType ); aNmTb.Put( nId, CLASSNAME, pClassButton ); pRoot->Insert( pClassButton ); - - // initialize class - pClassPushButton = InitClassPushButton( pClassButton ); - pRoot->Insert( pClassPushButton ); } { pClassFixedText = InitClassFixedText( pClassControl ); diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 2ca4013..e094ad4 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -1207,19 +1207,6 @@ PushButton::PushButton( vcl::Window* pParent, WinBits nStyle ) : ImplInit( pParent, nStyle ); } -PushButton::PushButton( vcl::Window* pParent, const ResId& rResId ) : - Button( WINDOW_PUSHBUTTON ) -{ - rResId.SetRT( RSC_PUSHBUTTON ); - WinBits nStyle = ImplInitRes( rResId ); - ImplInitPushButtonData(); - ImplInit( pParent, nStyle ); - ImplLoadRes(); - - if ( !(nStyle & WB_HIDE) ) - Show(); -} - void PushButton::MouseButtonDown( const MouseEvent& rMEvt ) { if ( rMEvt.IsLeft() && commit f23297e11148fdd7b28e242e8b77f375f969c617 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Oct 24 17:10:53 2016 +0100 no Edit controls loaded from .src now Change-Id: I42c7377c101c642ea39028e05e4ffd58fc7435d7 diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx index 9e9777a..1fc5a9e9 100644 --- a/formula/source/ui/dlg/funcutl.cxx +++ b/formula/source/ui/dlg/funcutl.cxx @@ -412,17 +412,6 @@ RefEdit::RefEdit( vcl::Window* _pParent, vcl::Window* pShrinkModeLabel, WinBits aIdle.SetPriority( SchedulerPriority::LOW ); } -RefEdit::RefEdit( vcl::Window* _pParent,IControlReferenceHandler* pParent, - vcl::Window* pShrinkModeLabel, const ResId& rResId ) - : Edit( _pParent, rResId ) - , aIdle("formula RefEdit Idle") - , pAnyRefDlg( pParent ) - , pLabelWidget(pShrinkModeLabel) -{ - aIdle.SetIdleHdl( LINK( this, RefEdit, UpdateHdl ) ); - aIdle.SetPriority( SchedulerPriority::LOW ); -} - VCL_BUILDER_DECL_FACTORY(RefEdit) { (void)rMap; diff --git a/include/formula/funcutl.hxx b/include/formula/funcutl.hxx index d5d3c00..941ef5a 100644 --- a/include/formula/funcutl.hxx +++ b/include/formula/funcutl.hxx @@ -56,7 +56,6 @@ protected: virtual void LoseFocus() override; public: - RefEdit( vcl::Window* _pParent,IControlReferenceHandler* pParent, vcl::Window* pShrinkModeLabel, const ResId& rResId ); RefEdit( vcl::Window* _pParent, vcl::Window* pShrinkModeLabel, WinBits nStyle = WB_BORDER ); virtual ~RefEdit() override; diff --git a/include/tools/rcid.h b/include/tools/rcid.h index ab3bd59..be3c75d 100644 --- a/include/tools/rcid.h +++ b/include/tools/rcid.h @@ -49,8 +49,6 @@ #define RSC_BUTTON (RSC_NOTYPE + 0x45) #define RSC_PUSHBUTTON (RSC_NOTYPE + 0x46) -#define RSC_EDIT (RSC_NOTYPE + 0x52) - #define RSC_TEXT (RSC_NOTYPE + 0x57) #define RSC_STRINGARRAY (RSC_NOTYPE + 0x79) diff --git a/include/vcl/edit.hxx b/include/vcl/edit.hxx index df00e80..708a254 100644 --- a/include/vcl/edit.hxx +++ b/include/vcl/edit.hxx @@ -167,7 +167,6 @@ public: SAL_DLLPRIVATE bool ImplUseNativeBorder(vcl::RenderContext& rRenderContext, WinBits nStyle); Edit( vcl::Window* pParent, WinBits nStyle = WB_BORDER ); - Edit( vcl::Window* pParent, const ResId& rResId ); virtual ~Edit() override; virtual void dispose() override; diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx index c7f719a..aa08f7c 100644 --- a/rsc/inc/rscdb.hxx +++ b/rsc/inc/rscdb.hxx @@ -176,7 +176,6 @@ class RscTypCont RscArray * pLangGeo ); RscTop * InitClassControl( RscTop * pSuper ); RscTop * InitClassPushButton( RscTop * pSuper ); - RscTop * InitClassEdit( RscTop * pSuper ); RscTop * InitClassFixedText( RscTop * pSuper ); RscTop * InitClassKeyCode( RscTop * pSuper, RscEnum * pKey ); RscTop * InitClassMenuItem( RscTop * pSuper ); diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx index 89b8074..4da88cd 100644 --- a/rsc/source/parser/rscicpx.cxx +++ b/rsc/source/parser/rscicpx.cxx @@ -281,29 +281,6 @@ RscTop * RscTypCont::InitClassPushButton( RscTop * pSuper ) return pClassPushButton; } -RscTop * RscTypCont::InitClassEdit( RscTop * pSuper ) -{ - Atom nId; - RscTop * pClassEdit; - - // initialize class - nId = pHS->getID( "Edit" ); - pClassEdit = new RscClass( nId, RSC_EDIT, pSuper ); - pClassEdit->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType ); - aNmTb.Put( nId, CLASSNAME, pClassEdit ); - - INS_WINBIT(pClassEdit,Left) - INS_WINBIT(pClassEdit,Center) - INS_WINBIT(pClassEdit,Right) - INS_WINBIT(pClassEdit,PassWord) - INS_WINBIT(pClassEdit,ReadOnly) - - nId = aNmTb.Put( "MaxTextLength", VARNAME ); - pClassEdit->SetVariable( nId, &aUShort ); - - return pClassEdit; -} - RscTop * RscTypCont::InitClassFixedText( RscTop * pSuper ) { Atom nId; diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx index 4bdaf63..ece6ec2 100644 --- a/rsc/source/parser/rscinit.cxx +++ b/rsc/source/parser/rscinit.cxx @@ -65,7 +65,6 @@ void RscTypCont::Init() RscTop * pClassControl; RscTop * pClassButton; RscTop * pClassPushButton; - RscTop * pClassEdit; RscTop * pClassFixedText; RscTop * pClassKeyCode; RscTop * pLangClassKeyCode; @@ -303,10 +302,6 @@ void RscTypCont::Init() pRoot->Insert( pClassPushButton ); } { - pClassEdit = InitClassEdit( pClassControl ); - pRoot->Insert( pClassEdit ); -} -{ pClassFixedText = InitClassFixedText( pClassControl ); pRoot->Insert( pClassFixedText ); diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 2769a0f..76d7ccc 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -169,19 +169,6 @@ Edit::Edit( vcl::Window* pParent, WinBits nStyle ) ImplInit( pParent, nStyle ); } -Edit::Edit( vcl::Window* pParent, const ResId& rResId ) - : Control( WINDOW_EDIT ) -{ - rResId.SetRT( RSC_EDIT ); - WinBits nStyle = ImplInitRes( rResId ); - ImplInitEditData(); - ImplInit( pParent, nStyle ); - ImplLoadRes(); - - if ( !(nStyle & WB_HIDE) ) - Show(); -} - void Edit::SetWidthInChars(sal_Int32 nWidthInChars) { if (mnWidthInChars != nWidthInChars) commit 30a458d7e1dcd8c7b35cd74b10ce41d2a89e8552 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Oct 24 17:07:59 2016 +0100 no ListBox loaded from .src now Change-Id: I7d30c38777f6a36c991271a3617d3f75c83cd490 diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx index b068b55..68fef12 100644 --- a/include/svtools/ctrlbox.hxx +++ b/include/svtools/ctrlbox.hxx @@ -153,7 +153,6 @@ class SVT_DLLPUBLIC ColorListBox : public ListBox public: ColorListBox( vcl::Window* pParent, WinBits nWinStyle = WB_BORDER ); - ColorListBox( vcl::Window* pParent, const ResId& rResId ); virtual ~ColorListBox() override; virtual void dispose() override; diff --git a/include/tools/rcid.h b/include/tools/rcid.h index 5c2ed2f..ab3bd59 100644 --- a/include/tools/rcid.h +++ b/include/tools/rcid.h @@ -51,8 +51,6 @@ #define RSC_EDIT (RSC_NOTYPE + 0x52) -#define RSC_LISTBOX (RSC_NOTYPE + 0x55) - #define RSC_TEXT (RSC_NOTYPE + 0x57) #define RSC_STRINGARRAY (RSC_NOTYPE + 0x79) diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx index 4c3b3bb..2d85a93 100644 --- a/include/vcl/lstbox.hxx +++ b/include/vcl/lstbox.hxx @@ -117,7 +117,6 @@ protected: public: explicit ListBox( vcl::Window* pParent, WinBits nStyle = WB_BORDER ); - explicit ListBox( vcl::Window* pParent, const ResId& ); virtual ~ListBox() override; virtual void dispose() override; diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx index 4be970f..c7f719a 100644 --- a/rsc/inc/rscdb.hxx +++ b/rsc/inc/rscdb.hxx @@ -177,7 +177,6 @@ class RscTypCont RscTop * InitClassControl( RscTop * pSuper ); RscTop * InitClassPushButton( RscTop * pSuper ); RscTop * InitClassEdit( RscTop * pSuper ); - RscTop * InitClassListBox( RscTop * pSuper, RscArray * pStrLst ); RscTop * InitClassFixedText( RscTop * pSuper ); RscTop * InitClassKeyCode( RscTop * pSuper, RscEnum * pKey ); RscTop * InitClassMenuItem( RscTop * pSuper ); diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx index 01c310d..89b8074 100644 --- a/rsc/source/parser/rscicpx.cxx +++ b/rsc/source/parser/rscicpx.cxx @@ -304,37 +304,6 @@ RscTop * RscTypCont::InitClassEdit( RscTop * pSuper ) return pClassEdit; } -RscTop * RscTypCont::InitClassListBox( RscTop * pSuper, RscArray * pStrLst ) -{ - Atom nId; - RscTop * pClassListBox; - - // initialize class - nId = pHS->getID( "ListBox" ); - pClassListBox = new RscClass( nId, RSC_LISTBOX, pSuper ); - pClassListBox->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType ); - aNmTb.Put( nId, CLASSNAME, pClassListBox ); - - // initialize variables - INS_WINBIT(pClassListBox,Sort) - INS_WINBIT(pClassListBox,DropDown) - INS_WINBIT(pClassListBox,HScroll); - INS_WINBIT(pClassListBox,VScroll); - INS_WINBIT(pClassListBox,AutoSize) - INS_WINBIT(pClassListBox,AutoHScroll) - - { - RSCINST aDflt = aUShort.Create( nullptr, RSCINST() ); - aDflt.pClass->SetNumber( aDflt, (sal_uInt16)0xFFFF ); - nId = aNmTb.Put( "CurPos", VARNAME ); - pClassListBox->SetVariable( nId, &aUShort, &aDflt ); - } - nId = aNmTb.Put( "StringList", VARNAME ); - pClassListBox->SetVariable( nId, pStrLst ); - - return pClassListBox; -} - RscTop * RscTypCont::InitClassFixedText( RscTop * pSuper ) { Atom nId; diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx index 7bd5ea7..4bdaf63 100644 --- a/rsc/source/parser/rscinit.cxx +++ b/rsc/source/parser/rscinit.cxx @@ -66,7 +66,6 @@ void RscTypCont::Init() RscTop * pClassButton; RscTop * pClassPushButton; RscTop * pClassEdit; - RscTop * pClassListBox; RscTop * pClassFixedText; RscTop * pClassKeyCode; RscTop * pLangClassKeyCode; @@ -308,9 +307,6 @@ void RscTypCont::Init() pRoot->Insert( pClassEdit ); } { - pClassListBox = InitClassListBox( pClassControl, pLangStringLongTupelList ); - pRoot->Insert( pClassListBox ); - pClassFixedText = InitClassFixedText( pClassControl ); pRoot->Insert( pClassFixedText ); diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 269abf7..4c6b107 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -93,13 +93,6 @@ ColorListBox::ColorListBox( vcl::Window* pParent, WinBits nWinStyle ) : SetEdgeBlending(true); } -ColorListBox::ColorListBox( vcl::Window* pParent, const ResId& rResId ) : - ListBox( pParent, rResId ) -{ - ImplInit(); - SetEdgeBlending(true); -} - VCL_BUILDER_DECL_FACTORY(ColorListBox) { bool bDropdown = VclBuilder::extractDropdown(rMap); diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx index 0b0edf1..b0ef400 100644 --- a/vcl/source/control/listbox.cxx +++ b/vcl/source/control/listbox.cxx @@ -56,19 +56,6 @@ ListBox::ListBox( vcl::Window* pParent, WinBits nStyle ) : Control( WINDOW_LISTB ImplInit( pParent, nStyle ); } -ListBox::ListBox( vcl::Window* pParent, const ResId& rResId ) : - Control( WINDOW_LISTBOX ) -{ - rResId.SetRT( RSC_LISTBOX ); - WinBits nStyle = ImplInitRes( rResId ); - ImplInitListBoxData(); - ImplInit( pParent, nStyle ); - ImplLoadRes(); - - if ( !(nStyle & WB_HIDE ) ) - Show(); -} - ListBox::~ListBox() { disposeOnce(); commit 7549878fd63bb2792432865958874c644a948d45 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Oct 24 15:44:56 2016 +0100 convert conditional format src fragment to .ui and layout this is a difficult widget Change-Id: If4ea45230679c46f7ad763f07c876dd74d4478d0 diff --git a/sc/AllLangResTarget_sc.mk b/sc/AllLangResTarget_sc.mk index 6674502..cd43a8c 100644 --- a/sc/AllLangResTarget_sc.mk +++ b/sc/AllLangResTarget_sc.mk @@ -35,7 +35,6 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\ sc/source/ui/src/scerrors.src \ sc/source/ui/src/scstring.src \ sc/source/ui/src/filter.src \ - sc/source/ui/src/condformatdlg.src \ sc/source/ui/cctrl/checklistmenu.src \ sc/source/ui/navipi/navipi.src \ sc/source/ui/styleui/scstyles.src \ diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk index db0f9a2..056dbda 100644 --- a/sc/UIConfig_scalc.mk +++ b/sc/UIConfig_scalc.mk @@ -101,6 +101,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\ sc/uiconfig/scalc/ui/colwidthdialog \ sc/uiconfig/scalc/ui/condformatmanager \ sc/uiconfig/scalc/ui/conditionalformatdialog \ + sc/uiconfig/scalc/ui/conditionalentry \ sc/uiconfig/scalc/ui/conditionaliconset \ sc/uiconfig/scalc/ui/conflictsdialog \ sc/uiconfig/scalc/ui/consolidatedialog \ diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc index 07844b5..f490654 100644 --- a/sc/inc/sc.hrc +++ b/sc/inc/sc.hrc @@ -1092,7 +1092,6 @@ #define RID_SCDLG_DPSHOWDETAIL (SC_DIALOGS_START + 137) #define RID_POPUP_FILTER (SC_DIALOGS_START + 153) -#define RID_COND_ENTRY (SC_DIALOGS_START + 156) #define RID_SCDLG_COND_FORMAT_MANAGER (SC_DIALOGS_START + 159) diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index 82fb406..4d03fcf 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -8,7 +8,6 @@ */ #include "condformatdlg.hxx" -#include "condformatdlg.hrc" #include <vcl/vclevent.hxx> #include <svl/style.hxx> @@ -158,7 +157,7 @@ VCL_BUILDER_DECL_FACTORY(ScCondFormatList) Size ScCondFormatList::GetOptimalSize() const { - return LogicToPixel(Size(290, 185), MapUnit::MapAppFont); + return LogicToPixel(Size(300, 185), MapUnit::MapAppFont); } void ScCondFormatList::Resize() diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 8bfabee..415aa11 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -9,7 +9,6 @@ #include "condformatdlg.hxx" #include "condformatdlgentry.hxx" -#include "condformatdlg.hrc" #include "conditio.hxx" #include "document.hxx" @@ -33,20 +32,25 @@ #include "colorformat.hxx" #include "globstr.hrc" +#include "sc.hrc" #include <set> -ScCondFrmtEntry::ScCondFrmtEntry(vcl::Window* pParent, ScDocument* pDoc, const ScAddress& rPos): - Control(pParent, ScResId( RID_COND_ENTRY ) ), - mbActive(false), - maFtCondNr( VclPtr<FixedText>::Create( this, ScResId( FT_COND_NR ) ) ), - maFtCondition( VclPtr<FixedText>::Create( this, ScResId( FT_CONDITION ) ) ), - mnIndex(0), - maStrCondition(ScResId(SCSTR_CONDITION).toString()), - maLbType( VclPtr<ListBox>::Create( this, ScResId( LB_TYPE ) ) ), - mpDoc(pDoc), - maPos(rPos) +ScCondFrmtEntry::ScCondFrmtEntry(vcl::Window* pParent, ScDocument* pDoc, const ScAddress& rPos) + : VclContainer(pParent, WB_CLIPCHILDREN | WB_BORDER) + , mbActive(false) + , mnIndex(0) + , maStrCondition(ScResId(SCSTR_CONDITION).toString()) + , mpDoc(pDoc) + , maPos(rPos) { + m_pUIBuilder = new VclBuilder(this, getUIRootDir(), "modules/scalc/ui/conditionalentry.ui"); + + get(maGrid, "grid"); + get(maFtCondNr, "number"); + get(maFtCondition, "condition"); + get(maLbType, "type"); + Color aBack(GetSettings().GetStyleSettings().GetWindowColor()); SetControlBackground(aBack); @@ -60,6 +64,8 @@ ScCondFrmtEntry::ScCondFrmtEntry(vcl::Window* pParent, ScDocument* pDoc, const S maLbType->SetSelectHdl( LINK( pParent, ScCondFormatList, TypeListHdl ) ); maClickHdl = LINK( pParent, ScCondFormatList, EntrySelectHdl ); + + Show(); } ScCondFrmtEntry::~ScCondFrmtEntry() @@ -67,21 +73,33 @@ ScCondFrmtEntry::~ScCondFrmtEntry() disposeOnce(); } +Size ScCondFrmtEntry::calculateRequisition() const +{ + return getLayoutRequisition(*maGrid); +} + +void ScCondFrmtEntry::setAllocation(const Size &rAllocation) +{ + setLayoutPosSize(*maGrid, Point(0, 0), rAllocation); +} + void ScCondFrmtEntry::dispose() { - maFtCondNr.disposeAndClear(); - maFtCondition.disposeAndClear(); - maLbType.disposeAndClear(); - Control::dispose(); + maFtCondNr.clear(); + maFtCondition.clear(); + maLbType.clear(); + maGrid.clear(); + disposeBuilder(); + VclContainer::dispose(); } bool ScCondFrmtEntry::Notify( NotifyEvent& rNEvt ) { - if( rNEvt.GetType() == MouseNotifyEvent::MOUSEBUTTONDOWN ) + if (rNEvt.GetType() == MouseNotifyEvent::MOUSEBUTTONDOWN) { - ImplCallEventListenersAndHandler( VCLEVENT_WINDOW_MOUSEBUTTONDOWN, [this] () { maClickHdl.Call(*this); } ); + maClickHdl.Call(*this); } - return Control::Notify(rNEvt); + return VclContainer::Notify(rNEvt); } void ScCondFrmtEntry::SetIndex(sal_Int32 nIndex) @@ -94,24 +112,11 @@ void ScCondFrmtEntry::SetIndex(sal_Int32 nIndex) void ScCondFrmtEntry::SetHeight() { - long nPad = LogicToPixel(Size(42,2), MapMode(MapUnit::MapAppFont)).getHeight(); - - // Calculate maximum height we need from visible widgets - sal_uInt16 nChildren = GetChildCount(); - - long nMaxHeight = 0; - for(sal_uInt16 i = 0; i < nChildren; i++) - { - vcl::Window *pChild = GetChild(i); - if(!pChild || !pChild->IsVisible()) - continue; - Point aPos = pChild->GetPosPixel(); - Size aSize = pChild->GetSizePixel(); - nMaxHeight = std::max(aPos.Y() + aSize.Height(), nMaxHeight); - } - Size aSize = GetSizePixel(); - if(nMaxHeight > 0) + const long nMaxHeight = get_preferred_size().Height(); + if (nMaxHeight > 0) { + Size aSize = GetSizePixel(); + const long nPad = LogicToPixel(Size(0, 2), MapMode(MapUnit::MapAppFont)).getHeight(); aSize.Height() = nMaxHeight + nPad; SetSizePixel(aSize); } @@ -186,20 +191,20 @@ const ScConditionMode ScConditionFrmtEntry::mpEntryToCond[ScConditionFrmtEntry:: SC_COND_NOT_CONTAINS_TEXT }; -ScConditionFrmtEntry::ScConditionFrmtEntry( vcl::Window* pParent, ScDocument* pDoc, ScCondFormatDlg* pDialogParent, - const ScAddress& rPos, const ScCondFormatEntry* pFormatEntry ): - ScCondFrmtEntry( pParent, pDoc, rPos ), - maLbCondType( VclPtr<ListBox>::Create( this, ScResId( LB_CELLIS_TYPE ) ) ), - maEdVal1( VclPtr<formula::RefEdit>::Create( this, nullptr, nullptr, ScResId( ED_VAL1 ) ) ), - maEdVal2( VclPtr<formula::RefEdit>::Create( this, nullptr, nullptr, ScResId( ED_VAL2 ) ) ), - maFtVal( VclPtr<FixedText>::Create( this, ScResId( FT_VAL ) ) ), - maFtStyle( VclPtr<FixedText>::Create( this, ScResId( FT_STYLE ) ) ), - maLbStyle( VclPtr<ListBox>::Create( this, ScResId( LB_STYLE ) ) ), - maWdPreview( VclPtr<SvxFontPrevWindow>::Create( this, ScResId( WD_PREVIEW ) ) ), - mbIsInStyleCreate(false) +ScConditionFrmtEntry::ScConditionFrmtEntry(vcl::Window* pParent, ScDocument* pDoc, ScCondFormatDlg* pDialogParent, + const ScAddress& rPos, const ScCondFormatEntry* pFormatEntry) + : ScCondFrmtEntry(pParent, pDoc, rPos) + , mbIsInStyleCreate(false) { + get(maLbCondType, "typeis"); + get(maEdVal1, "val1"); + get(maEdVal2, "val2"); + get(maFtVal, "valueft"); + get(maFtStyle, "styleft"); + get(maLbStyle, "style"); + get(maWdPreview, "preview"); + maWdPreview->set_height_request(maLbStyle->get_preferred_size().Height()); - FreeResource(); maLbType->SelectEntryPos(1); Init(pDialogParent); @@ -252,13 +257,13 @@ ScConditionFrmtEntry::~ScConditionFrmtEntry() void ScConditionFrmtEntry::dispose() { - maLbCondType.disposeAndClear(); - maEdVal1.disposeAndClear(); - maEdVal2.disposeAndClear(); - maFtVal.disposeAndClear(); - maFtStyle.disposeAndClear(); - maLbStyle.disposeAndClear(); - maWdPreview.disposeAndClear(); + maLbCondType.clear(); + maEdVal1.clear(); + maEdVal2.clear(); + maFtVal.clear(); + maFtStyle.clear(); + maLbStyle.clear(); + maWdPreview.clear(); ScCondFrmtEntry::dispose(); } @@ -348,7 +353,6 @@ void ScConditionFrmtEntry::Deselect() ScCondFrmtEntry::Deselect(); } - sal_Int32 ScConditionFrmtEntry::ConditionModeToEntryPos( ScConditionMode eMode ) { for ( sal_Int32 i = 0; i < NUM_COND_ENTRIES; ++i ) @@ -552,16 +556,17 @@ IMPL_LINK_NOARG(ScConditionFrmtEntry, StyleSelectHdl, ListBox&, void) // formula -ScFormulaFrmtEntry::ScFormulaFrmtEntry( vcl::Window* pParent, ScDocument* pDoc, ScCondFormatDlg* pDialogParent, const ScAddress& rPos, const ScCondFormatEntry* pFormat ): - ScCondFrmtEntry( pParent, pDoc, rPos ), - maFtStyle( VclPtr<FixedText>::Create( this, ScResId( FT_STYLE ) ) ), - maLbStyle( VclPtr<ListBox>::Create( this, ScResId( LB_STYLE ) ) ), - maWdPreview( VclPtr<SvxFontPrevWindow>::Create( this, ScResId( WD_PREVIEW ) ) ), - maEdFormula( VclPtr<formula::RefEdit>::Create(this, nullptr, nullptr, ScResId( ED_FORMULA ) ) ) +ScFormulaFrmtEntry::ScFormulaFrmtEntry( vcl::Window* pParent, ScDocument* pDoc, ScCondFormatDlg* pDialogParent, const ScAddress& rPos, const ScCondFormatEntry* pFormat ) + : ScCondFrmtEntry(pParent, pDoc, rPos) { + get(maFtStyle, "styleft"); + get(maLbStyle, "style"); + get(maWdPreview, "preview"); + maWdPreview->set_height_request(maLbStyle->get_preferred_size().Height()); + get(maEdFormula, "formula"); + Init(pDialogParent); - FreeResource(); maLbType->SelectEntryPos(2); if(pFormat) @@ -584,10 +589,10 @@ ScFormulaFrmtEntry::~ScFormulaFrmtEntry() void ScFormulaFrmtEntry::dispose() { - maFtStyle.disposeAndClear(); - maLbStyle.disposeAndClear(); - maWdPreview.disposeAndClear(); - maEdFormula.disposeAndClear(); + maFtStyle.clear(); + maLbStyle.clear(); + maWdPreview.clear(); + maEdFormula.clear(); ScCondFrmtEntry::dispose(); } @@ -733,16 +738,17 @@ ScColorScaleEntry* createColorScaleEntry( const ListBox& rType, const ColorListB } -ScColorScale2FrmtEntry::ScColorScale2FrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScAddress& rPos, const ScColorScaleFormat* pFormat ): - ScCondFrmtEntry( pParent, pDoc, rPos ), - maLbColorFormat( VclPtr<ListBox>::Create( this, ScResId( LB_COLOR_FORMAT ) ) ), - maLbEntryTypeMin( VclPtr<ListBox>::Create( this, ScResId( LB_TYPE_COL_SCALE_MIN ) ) ), - maLbEntryTypeMax( VclPtr<ListBox>::Create( this, ScResId( LB_TYPE_COL_SCALE_MAX ) ) ), - maEdMin( VclPtr<Edit>::Create( this, ScResId( ED_COL_SCALE_MIN ) ) ), - maEdMax( VclPtr<Edit>::Create( this, ScResId( ED_COL_SCALE_MAX ) ) ), - maLbColMin( VclPtr<ColorListBox>::Create( this, ScResId( LB_COL_MIN ) ) ), - maLbColMax( VclPtr<ColorListBox>::Create( this, ScResId( LB_COL_MAX ) ) ) +ScColorScale2FrmtEntry::ScColorScale2FrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScAddress& rPos, const ScColorScaleFormat* pFormat ) + : ScCondFrmtEntry(pParent, pDoc, rPos) { + get(maLbColorFormat, "colorformat"); + get(maLbEntryTypeMin, "colscalemin"); + get(maLbEntryTypeMax, "colscalemax"); + get(maEdMin, "edcolscalemin"); + get(maEdMax, "edcolscalemax"); + get(maLbColMin, "lbcolmin"); + get(maLbColMax, "lbcolmax"); + // remove the automatic entry from color scales maLbEntryTypeMin->RemoveEntry(0); maLbEntryTypeMax->RemoveEntry(0); @@ -762,7 +768,6 @@ ScColorScale2FrmtEntry::ScColorScale2FrmtEntry( vcl::Window* pParent, ScDocument maLbEntryTypeMin->SelectEntryPos(0); maLbEntryTypeMax->SelectEntryPos(1); } - FreeResource(); maLbColorFormat->SetSelectHdl( LINK( pParent, ScCondFormatList, ColFormatTypeHdl ) ); @@ -777,13 +782,13 @@ ScColorScale2FrmtEntry::~ScColorScale2FrmtEntry() void ScColorScale2FrmtEntry::dispose() { - maLbColorFormat.disposeAndClear(); - maLbEntryTypeMin.disposeAndClear(); - maLbEntryTypeMax.disposeAndClear(); - maEdMin.disposeAndClear(); - maEdMax.disposeAndClear(); - maLbColMin.disposeAndClear(); - maLbColMax.disposeAndClear(); + maLbColorFormat.clear(); + maLbEntryTypeMin.clear(); + maLbEntryTypeMax.clear(); + maEdMin.clear(); + maEdMax.clear(); + maLbColMin.clear(); + maLbColMax.clear(); ScCondFrmtEntry::dispose(); } @@ -899,19 +904,20 @@ IMPL_LINK( ScColorScale2FrmtEntry, EntryTypeHdl, ListBox&, rBox, void ) pEd->Disable(); } -ScColorScale3FrmtEntry::ScColorScale3FrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScAddress& rPos, const ScColorScaleFormat* pFormat ): - ScCondFrmtEntry( pParent, pDoc, rPos ), - maLbColorFormat( VclPtr<ListBox>::Create( this, ScResId( LB_COLOR_FORMAT ) ) ), - maLbEntryTypeMin( VclPtr<ListBox>::Create( this, ScResId( LB_TYPE_COL_SCALE_MIN ) ) ), - maLbEntryTypeMiddle( VclPtr<ListBox>::Create( this, ScResId( LB_TYPE_COL_SCALE_MIDDLE ) ) ), - maLbEntryTypeMax( VclPtr<ListBox>::Create( this, ScResId( LB_TYPE_COL_SCALE_MAX ) ) ), - maEdMin( VclPtr<Edit>::Create( this, ScResId( ED_COL_SCALE_MIN ) ) ), - maEdMiddle( VclPtr<Edit>::Create( this, ScResId( ED_COL_SCALE_MIDDLE ) ) ), - maEdMax( VclPtr<Edit>::Create( this, ScResId( ED_COL_SCALE_MAX ) ) ), - maLbColMin( VclPtr<ColorListBox>::Create( this, ScResId( LB_COL_MIN ) ) ), - maLbColMiddle( VclPtr<ColorListBox>::Create( this, ScResId( LB_COL_MIDDLE ) ) ), - maLbColMax( VclPtr<ColorListBox>::Create( this, ScResId( LB_COL_MAX ) ) ) +ScColorScale3FrmtEntry::ScColorScale3FrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScAddress& rPos, const ScColorScaleFormat* pFormat ) + : ScCondFrmtEntry(pParent, pDoc, rPos) { + get(maLbColorFormat, "colorformat"); + get(maLbEntryTypeMin, "colscalemin"); + get(maLbEntryTypeMiddle, "colscalemiddle"); + get(maLbEntryTypeMax, "colscalemax"); + get(maEdMin, "edcolscalemin"); + get(maEdMiddle, "edcolscalemiddle"); + get(maEdMax, "edcolscalemax"); + get(maLbColMin, "lbcolmin"); + get(maLbColMiddle, "lbcolmiddle"); + get(maLbColMax, "lbcolmax"); + // remove the automatic entry from color scales maLbEntryTypeMin->RemoveEntry(0); maLbEntryTypeMiddle->RemoveEntry(0); @@ -938,7 +944,6 @@ ScColorScale3FrmtEntry::ScColorScale3FrmtEntry( vcl::Window* pParent, ScDocument maLbEntryTypeMax->SelectEntryPos(1); maEdMiddle->SetText(OUString::number(50)); } - FreeResource(); maLbColorFormat->SetSelectHdl( LINK( pParent, ScCondFormatList, ColFormatTypeHdl ) ); EntryTypeHdl(*maLbEntryTypeMin.get()); @@ -953,16 +958,16 @@ ScColorScale3FrmtEntry::~ScColorScale3FrmtEntry() void ScColorScale3FrmtEntry::dispose() { - maLbColorFormat.disposeAndClear(); - maLbEntryTypeMin.disposeAndClear(); - maLbEntryTypeMiddle.disposeAndClear(); - maLbEntryTypeMax.disposeAndClear(); - maEdMin.disposeAndClear(); - maEdMiddle.disposeAndClear(); - maEdMax.disposeAndClear(); - maLbColMin.disposeAndClear(); - maLbColMiddle.disposeAndClear(); - maLbColMax.disposeAndClear(); + maLbColorFormat.clear(); + maLbEntryTypeMin.clear(); + maLbEntryTypeMiddle.clear(); + maLbEntryTypeMax.clear(); + maEdMin.clear(); + maEdMiddle.clear(); + maEdMax.clear(); + maLbColMin.clear(); + maLbColMiddle.clear(); + maLbColMax.clear(); ScCondFrmtEntry::dispose(); } @@ -1149,15 +1154,16 @@ void SetDataBarEntryTypes( const ScColorScaleEntry& rEntry, ListBox& rLbType, Ed } -ScDataBarFrmtEntry::ScDataBarFrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScAddress& rPos, const ScDataBarFormat* pFormat ): - ScCondFrmtEntry( pParent, pDoc, rPos ), - maLbColorFormat( VclPtr<ListBox>::Create( this, ScResId( LB_COLOR_FORMAT ) ) ), - maLbDataBarMinType( VclPtr<ListBox>::Create( this, ScResId( LB_TYPE_COL_SCALE_MIN ) ) ), - maLbDataBarMaxType( VclPtr<ListBox>::Create( this, ScResId( LB_TYPE_COL_SCALE_MAX ) ) ), - maEdDataBarMin( VclPtr<Edit>::Create( this, ScResId( ED_COL_SCALE_MIN ) ) ), - maEdDataBarMax( VclPtr<Edit>::Create( this, ScResId( ED_COL_SCALE_MAX ) ) ), - maBtOptions( VclPtr<PushButton>::Create( this, ScResId( BTN_OPTIONS ) ) ) +ScDataBarFrmtEntry::ScDataBarFrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScAddress& rPos, const ScDataBarFormat* pFormat ) + : ScCondFrmtEntry(pParent, pDoc, rPos) { + get(maLbColorFormat, "colorformat"); + get(maLbDataBarMinType, "colscalemin"); + get(maLbDataBarMaxType, "colscalemax"); + get(maEdDataBarMin, "edcolscalemin"); + get(maEdDataBarMax, "edcolscalemax"); + get(maBtOptions, "options"); + maLbColorFormat->SelectEntryPos(2); maLbType->SelectEntryPos(0); if(pFormat) @@ -1176,8 +1182,6 @@ ScDataBarFrmtEntry::ScDataBarFrmtEntry( vcl::Window* pParent, ScDocument* pDoc, Init(); maLbColorFormat->SetSelectHdl( LINK( pParent, ScCondFormatList, ColFormatTypeHdl ) ); - - FreeResource(); } ScDataBarFrmtEntry::~ScDataBarFrmtEntry() @@ -1187,12 +1191,12 @@ ScDataBarFrmtEntry::~ScDataBarFrmtEntry() void ScDataBarFrmtEntry::dispose() { - maLbColorFormat.disposeAndClear(); - maLbDataBarMinType.disposeAndClear(); - maLbDataBarMaxType.disposeAndClear(); - maEdDataBarMin.disposeAndClear(); - maEdDataBarMax.disposeAndClear(); - maBtOptions.disposeAndClear(); + maLbColorFormat.clear(); + maLbDataBarMinType.clear(); + maLbDataBarMaxType.clear(); + maEdDataBarMin.clear(); + maEdDataBarMax.clear(); + maBtOptions.clear(); ScCondFrmtEntry::dispose(); } @@ -1288,16 +1292,17 @@ IMPL_LINK_NOARG( ScDataBarFrmtEntry, OptionBtnHdl, Button*, void ) } } -ScDateFrmtEntry::ScDateFrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScCondDateFormatEntry* pFormat ): - ScCondFrmtEntry( pParent, pDoc, ScAddress() ), - maLbDateEntry( VclPtr<ListBox>::Create( this, ScResId( LB_DATE_TYPE ) ) ), - maFtStyle( VclPtr<FixedText>::Create( this, ScResId( FT_STYLE ) ) ), - maLbStyle( VclPtr<ListBox>::Create( this, ScResId( LB_STYLE ) ) ), - maWdPreview( VclPtr<SvxFontPrevWindow>::Create( this, ScResId( WD_PREVIEW ) ) ), - mbIsInStyleCreate(false) +ScDateFrmtEntry::ScDateFrmtEntry(vcl::Window* pParent, ScDocument* pDoc, const ScCondDateFormatEntry* pFormat) + : ScCondFrmtEntry(pParent, pDoc, ScAddress()) + , mbIsInStyleCreate(false) { + get(maLbDateEntry, "datetype"); + get(maFtStyle, "styleft"); + get(maLbStyle, "style"); + get(maWdPreview, "preview"); + maWdPreview->set_height_request(maLbStyle->get_preferred_size().Height()); + Init(); - FreeResource(); StartListening(*pDoc->GetStyleSheetPool(), true); @@ -1320,10 +1325,10 @@ ScDateFrmtEntry::~ScDateFrmtEntry() void ScDateFrmtEntry::dispose() { - maLbDateEntry.disposeAndClear(); - maFtStyle.disposeAndClear(); - maLbStyle.disposeAndClear(); - maWdPreview.disposeAndClear(); + maLbDateEntry.clear(); + maFtStyle.clear(); + maLbStyle.clear(); + maWdPreview.clear(); ScCondFrmtEntry::dispose(); } @@ -1524,13 +1529,13 @@ void ScIconSetFrmtDataEntry::SetFirstEntry() maLbEntryType->SelectEntryPos(1); } -ScIconSetFrmtEntry::ScIconSetFrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScAddress& rPos, const ScIconSetFormat* pFormat ): - ScCondFrmtEntry( pParent, pDoc, rPos ), - maLbColorFormat( VclPtr<ListBox>::Create( this, ScResId( LB_COLOR_FORMAT ) ) ), - maLbIconSetType( VclPtr<ListBox>::Create( this, ScResId( LB_ICONSET_TYPE ) ) ) +ScIconSetFrmtEntry::ScIconSetFrmtEntry(vcl::Window* pParent, ScDocument* pDoc, const ScAddress& rPos, const ScIconSetFormat* pFormat) + : ScCondFrmtEntry(pParent, pDoc, rPos) { + get(maLbColorFormat, "colorformat"); + get(maLbIconSetType, "iconsettype"); + Init(); - FreeResource(); maLbColorFormat->SetSelectHdl( LINK( pParent, ScCondFormatList, ColFormatTypeHdl ) ); if(pFormat) @@ -1566,8 +1571,8 @@ void ScIconSetFrmtEntry::dispose() for (auto it = maEntries.begin(); it != maEntries.end(); ++it) it->disposeAndClear(); maEntries.clear(); - maLbColorFormat.disposeAndClear(); - maLbIconSetType.disposeAndClear(); + maLbColorFormat.clear(); + maLbIconSetType.clear(); ScCondFrmtEntry::dispose(); } diff --git a/sc/source/ui/inc/condformatdlg.hrc b/sc/source/ui/inc/condformatdlg.hrc deleted file mode 100644 index 5390597..0000000 --- a/sc/source/ui/inc/condformatdlg.hrc +++ /dev/null @@ -1,55 +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/. - */ - -#include "sc.hrc" - -#define BTN_OK 1 -#define BTN_CANCEL 2 - -#define BTN_ADD 10 -#define BTN_REMOVE 11 - -#define LB_TYPE 14 -#define FT_COND_NR 15 -#define FT_CONDITION 16 -#define LB_CELLIS_TYPE 17 -#define ED_VAL1 18 -#define ED_VAL2 19 -#define LB_STYLE 20 -#define FT_STYLE 21 -#define LB_COLOR_FORMAT 22 - -#define WD_PREVIEW 26 -#define BTN_OPTIONS 30 - -#define FT_RANGE 32 -#define ED_RANGE 33 -#define RB_RANGE 34 - -#define ED_FORMULA 35 - -#define ED_COL_SCALE_MIN 36 -#define ED_COL_SCALE_MIDDLE 37 -#define ED_COL_SCALE_MAX 38 - -#define LB_COL_MIN 39 -#define LB_COL_MIDDLE 40 -#define LB_COL_MAX 41 - -#define LB_TYPE_COL_SCALE_MIN 42 -#define LB_TYPE_COL_SCALE_MIDDLE 43 -#define LB_TYPE_COL_SCALE_MAX 44 - -#define LB_DATE_TYPE 45 - -#define LB_ICONSET_TYPE 47 - -#define FT_VAL 51 - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/inc/condformatdlgentry.hxx b/sc/source/ui/inc/condformatdlgentry.hxx index d5c99b7..cba1224 100644 --- a/sc/source/ui/inc/condformatdlgentry.hxx +++ b/sc/source/ui/inc/condformatdlgentry.hxx @@ -38,7 +38,8 @@ enum ScCondFrmtEntryType } -class ScCondFrmtEntry : public Control +class ScCondFrmtEntry : public VclContainer + , public VclBuilderContainer { private: bool mbActive; @@ -46,6 +47,7 @@ private: Link<ScCondFrmtEntry&,void> maClickHdl; //general ui elements + VclPtr<VclContainer> maGrid; VclPtr<FixedText> maFtCondNr; VclPtr<FixedText> maFtCondition; @@ -65,6 +67,8 @@ protected: public: ScCondFrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScAddress& rPos ); virtual ~ScCondFrmtEntry() override; + virtual Size calculateRequisition() const override; + virtual void setAllocation(const Size &rAllocation) override; virtual void dispose() override; virtual bool Notify( NotifyEvent& rNEvt ) override; diff --git a/sc/source/ui/src/condformatdlg.src b/sc/source/ui/src/condformatdlg.src deleted file mode 100644 index 70d5b36..0000000 --- a/sc/source/ui/src/condformatdlg.src +++ /dev/null @@ -1,294 +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/. - */ - -#include "condformatdlg.hrc" - -Control RID_COND_ENTRY -{ - Pos = MAP_APPFONT( 0, 0 ); - Size = MAP_APPFONT( 290, 40 ); - Border = TRUE; - DialogControl = TRUE; - - FixedText FT_COND_NR - { - Pos = MAP_APPFONT( 2, 2 ); - Size = MAP_APPFONT( 50, 10 ); - }; - - FixedText FT_CONDITION - { - Pos = MAP_APPFONT( 60, 2 ); - Size = MAP_APPFONT( 120, 10 ); - }; - - ListBox LB_TYPE - { - Pos = MAP_APPFONT( 5, 15 ); - Size = MAP_APPFONT( 80, 60 ); - Border = TRUE; - DropDown = TRUE; - StringList [ en-US ] = - { - "All Cells"; - "Cell value is"; - "Formula is"; - "Date is"; - }; - }; - ListBox LB_CELLIS_TYPE - { - Pos = MAP_APPFONT( 90, 15 ); - Size = MAP_APPFONT( 80, 80 ); - Border = TRUE; - DropDown = TRUE; - StringList [ en-US ] = - { - "equal to"; - "less than"; - "greater than"; - "less than or equal to"; - "greater than or equal to"; - "not equal to"; - "between"; - "not between"; - "duplicate"; - "not duplicate"; - "top 10 elements"; - "bottom 10 elements"; - "top 10 percent"; - "bottom 10 percent"; - "above average"; - "below average"; - "above or equal average"; - "below or equal average"; - "Error"; - "No Error"; - "Begins with"; - "Ends with"; - "Contains"; - "Not Contains"; - }; - }; - Edit ED_VAL1 - { - Pos = MAP_APPFONT( 175, 15 ); - Size = MAP_APPFONT( 50, 12 ); - Border = TRUE; - }; - Edit ED_FORMULA - { - Pos = MAP_APPFONT( 90, 15 ); - Size = MAP_APPFONT( 135, 12 ); - Border = TRUE; - }; - Edit ED_VAL2 - { - Pos = MAP_APPFONT( 230, 15 ); - Size = MAP_APPFONT( 50, 12 ); - Border = TRUE; - }; - ListBox LB_COLOR_FORMAT - { - Pos = MAP_APPFONT( 100, 15 ); - Size = MAP_APPFONT( 80, 60); - Border = TRUE; - DropDown = TRUE; - StringList [ en-US ] = - { - "Color Scale (2 Entries)"; - "Color Scale (3 Entries)"; - "Data Bar"; - "Icon Set"; - }; - }; - FixedText FT_STYLE - { - Pos = MAP_APPFONT( 5, 32 ); - Size = MAP_APPFONT( 50, 14 ); - Text [ en-US ] = "Apply Style"; - }; - ListBox LB_STYLE - { - Pos = MAP_APPFONT( 90, 32 ); - Size = MAP_APPFONT( 80, 80 ); - Border = TRUE; - DropDown = TRUE; - StringList [ en-US ] = - { - "New Style..."; - }; - }; - ListBox LB_TYPE_COL_SCALE_MIN - { - Pos = MAP_APPFONT( 5, 32 ); - Size = MAP_APPFONT( 80, 60 ); - Border = TRUE; - DropDown = TRUE; - StringList [ en-US ] = - { - "Automatic"; - "Min"; - "Max"; - "Percentile"; - "Value"; - "Percent"; - "Formula"; - }; - }; - ListBox LB_TYPE_COL_SCALE_MIDDLE - { - Pos = MAP_APPFONT( 100, 32 ); - Size = MAP_APPFONT( 80, 60 ); - Border = TRUE; - DropDown = TRUE; - StringList [ en-US ] = - { - "Automatic"; - "Min"; - "Max"; - "Percentile"; - "Value"; - "Percent"; - "Formula"; - }; - }; - ListBox LB_TYPE_COL_SCALE_MAX - { - Pos = MAP_APPFONT( 195, 32 ); - Size = MAP_APPFONT( 80, 60 ); - Border = TRUE; - DropDown = TRUE; - StringList [ en-US ] = - { - "Automatic"; - "Min"; - "Max"; - "Percentile"; - "Value"; - "Percent"; - "Formula"; - }; - }; - Window WD_PREVIEW - { - Pos = MAP_APPFONT( 175, 32 ); - Size = MAP_APPFONT( 105, 14 ); - Text [ en-US ] = "Example"; - Border = TRUE; - }; - FixedText FT_VAL - { - Pos = MAP_APPFONT( 5, 48 ); - Size = MAP_APPFONT( 300, 12 ); - Text[ en-US ] = "Enter a value!"; - }; - Edit ED_COL_SCALE_MIN - { - Pos = MAP_APPFONT( 5, 48 ); - Size = MAP_APPFONT( 80, 12 ); - Border = TRUE; - }; - Edit ED_COL_SCALE_MIDDLE - { - Pos = MAP_APPFONT( 100, 48 ); - Size = MAP_APPFONT( 80, 12 ); - Border = TRUE; - }; - Edit ED_COL_SCALE_MAX - { - Pos = MAP_APPFONT( 195, 48 ); - Size = MAP_APPFONT( 80, 12 ); - Border = TRUE; - }; - ListBox LB_COL_MIN - { - Pos = MAP_APPFONT( 5, 62 ); - Size = MAP_APPFONT( 80, 40 ); - Border = TRUE; - DropDown = TRUE; - }; - ListBox LB_COL_MIDDLE - { - Pos = MAP_APPFONT( 100, 62 ); - Size = MAP_APPFONT( 80, 40 ); - Border = TRUE; - DropDown = TRUE; - }; - ListBox LB_COL_MAX - { - Pos = MAP_APPFONT( 195, 62 ); - Size = MAP_APPFONT( 80, 40 ); - Border = TRUE; - DropDown = TRUE; - }; - PushButton BTN_OPTIONS - { - Pos = MAP_APPFONT( 120, 62 ); - Size = MAP_APPFONT( 60, 14 ); - Text [ en-US ] = "More Options..."; - }; - ListBox LB_DATE_TYPE - { - Pos = MAP_APPFONT( 100, 15 ); - Size = MAP_APPFONT( 100, 60 ); - Border = TRUE; - DropDown = TRUE; - StringList [ en-US ] = - { - "Today"; - "Yesterday"; - "Tomorrow"; - "Last 7 days"; - "This week"; - "Last week"; - "Next week"; - "This month"; - "Last month"; - "Next month"; - "This year"; - "Last year"; - "Next year"; - }; - }; - ListBox LB_ICONSET_TYPE - { - Pos = MAP_APPFONT( 200, 15 ); - Size = MAP_APPFONT( 80, 50 ); - Border = TRUE; - DropDown = TRUE; - StringList [ en-US ] = - { - "3 Arrows"; - "3 Gray Arrows"; - "3 Flags"; - "3 Traffic Lights 1"; - "3 Traffic Lights 2"; - "3 Signs"; - "3 Symbols 1"; - "3 Symbols 2"; - "3 Smileys"; - "3 Stars"; - "3 Triangles"; - "3 Colored Smileys"; - "4 Arrows"; - "4 Gray Arrows"; - "4 Circles Red to Black"; - "4 Ratings"; - "4 Traffic Lights"; - "5 Arrows"; - "5 Gray Arrows"; - "5 Ratings"; - "5 Quarters"; - "5 Boxes"; - }; - }; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/uiconfig/scalc/ui/conditionalentry.ui b/sc/uiconfig/scalc/ui/conditionalentry.ui new file mode 100644 index 0000000..86d18e1 --- /dev/null +++ b/sc/uiconfig/scalc/ui/conditionalentry.ui @@ -0,0 +1,425 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.20.0 --> +<interface> + <requires lib="gtk+" version="3.0"/> + <requires lib="LibreOffice" version="1.0"/> + <object class="GtkGrid" id="grid"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="border_width">6</property> + <property name="row_spacing">6</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkLabel" id="number"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="condition"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="row_spacing">6</property> + <property name="column_spacing">12</property> + <property name="column_homogeneous">True</property> + <child> + <object class="GtkComboBoxText" id="type"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <items> + <item translatable="yes">All Cells</item> + <item translatable="yes">Cell value is</item> + <item translatable="yes">Formula is</item> + <item translatable="yes">Date is</item> + </items> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="styleft"> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Apply Style:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">style</property> + <property name="xalign">0</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + </packing> + </child> + <child> + <object class="GtkComboBoxText" id="style"> + <property name="can_focus">False</property> + <items> + <item translatable="yes">New Style...</item> + </items> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">2</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="valueft"> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Enter a value:</property> + <property name="xalign">0</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">3</property> + <property name="width">3</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="edcolscalemin"> + <property name="can_focus">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">4</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="edcolscalemiddle"> + <property name="can_focus">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">4</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="edcolscalemax"> + <property name="can_focus">True</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">4</property> + </packing> + </child> + <child> + <object class="svtlo-ColorListBox" id="lbcolmin"> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">5</property> + </packing> + </child> + <child> + <object class="svtlo-ColorListBox" id="lbcolmiddle"> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">5</property> + </packing> + </child> + <child> + <object class="svtlo-ColorListBox" id="lbcolmax"> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">5</property> + </packing> + </child> + <child> + <object class="GtkButton" id="options"> + <property name="label" translatable="yes">More Options...</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">6</property> + </packing> + </child> + <child> + <object class="GtkComboBoxText" id="colscalemin"> + <property name="can_focus">False</property> + <items> ... etc. - the rest is truncated
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits