diff options
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/inc/cuires.hrc | 1 | ||||
-rw-r--r-- | cui/source/inc/cuitabarea.hxx | 11 | ||||
-rw-r--r-- | cui/source/tabpages/tabarea.cxx | 87 | ||||
-rw-r--r-- | cui/source/tabpages/tabarea.hrc | 69 | ||||
-rw-r--r-- | cui/source/tabpages/tabarea.src | 90 | ||||
-rw-r--r-- | cui/source/tabpages/tparea.cxx | 1 | ||||
-rw-r--r-- | cui/source/tabpages/tpbitmap.cxx | 1 | ||||
-rw-r--r-- | cui/source/tabpages/tpcolor.cxx | 1 | ||||
-rw-r--r-- | cui/source/tabpages/tpgradnt.cxx | 1 | ||||
-rw-r--r-- | cui/source/tabpages/tphatch.cxx | 1 | ||||
-rw-r--r-- | cui/source/tabpages/tpshadow.cxx | 1 |
11 files changed, 54 insertions, 210 deletions
diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc index f0c9c4dff951..2ac707c75658 100644 --- a/cui/source/inc/cuires.hrc +++ b/cui/source/inc/cuires.hrc @@ -49,7 +49,6 @@ #define RID_SVXDLG_LINE (RID_SVX_START + 50) #define RID_SVXDLG_BBDLG (RID_SVX_START + 40) #define RID_SVXDLG_CAPTION (RID_SVX_START + 151) -#define RID_SVXDLG_AREA (RID_SVX_START + 55) #define RID_SVXSTRARY_PAPERSIZE_STD (RID_SVX_START + 142) #define RID_SVXSTRARY_PAPERSIZE_DRAW (RID_SVX_START + 143) #define RID_SVXSTR_TABLE_PRESET_NONE (RID_SVX_START + 969) diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index 44a05d915b2d..313c6b7440a8 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -36,6 +36,14 @@ class SdrView; class SvxAreaTabDialog : public SfxTabDialog { + sal_uInt16 m_nAreaTabPage; + sal_uInt16 m_nShadowTabPage; + sal_uInt16 m_nTransparenceTabPage; + sal_uInt16 m_nColorTabPage; + sal_uInt16 m_nGradientTabPage; + sal_uInt16 m_nHatchTabPage; + sal_uInt16 m_nBitmapTabPage; + private: SdrModel* mpDrawModel; @@ -69,7 +77,8 @@ protected: public: SvxAreaTabDialog( Window* pParent, - const SfxItemSet* pAttr, SdrModel* pModel, + const SfxItemSet* pAttr, + SdrModel* pModel, const SdrView* pSdrView = NULL ); ~SvxAreaTabDialog(); diff --git a/cui/source/tabpages/tabarea.cxx b/cui/source/tabpages/tabarea.cxx index a5b677233e06..007257b6b1f4 100644 --- a/cui/source/tabpages/tabarea.cxx +++ b/cui/source/tabpages/tabarea.cxx @@ -32,7 +32,6 @@ #include <svx/svdmodel.hxx> #include "svx/drawitem.hxx" #include "cuitabarea.hxx" -#include "tabarea.hrc" #include "dlgname.hxx" #include <dialmgr.hxx> @@ -42,13 +41,22 @@ SvxAreaTabDialog::SvxAreaTabDialog const SfxItemSet* pAttr, SdrModel* pModel, const SdrView* /* pSdrView */ -) : - - SfxTabDialog( pParent, CUI_RES( RID_SVXDLG_AREA ), pAttr ), - - mpDrawModel ( pModel ), - mpColorList ( pModel->GetColorList() ), - mpNewColorList ( pModel->GetColorList() ), +) + : SfxTabDialog( pParent, + "AreaDialog", + "cui/ui/areadialog.ui", + pAttr ) + , m_nAreaTabPage(0) + , m_nShadowTabPage(0) + , m_nTransparenceTabPage(0) + , m_nColorTabPage(0) + , m_nGradientTabPage(0) + , m_nHatchTabPage(0) + , m_nBitmapTabPage(0) + + , mpDrawModel ( pModel ), + mpColorList ( pModel->GetColorList() ), + mpNewColorList ( pModel->GetColorList() ), mpGradientList ( pModel->GetGradientList() ), mpNewGradientList ( pModel->GetGradientList() ), mpHatchingList ( pModel->GetHatchList() ), @@ -56,6 +64,7 @@ SvxAreaTabDialog::SvxAreaTabDialog mpBitmapList ( pModel->GetBitmapList() ), mpNewBitmapList ( pModel->GetBitmapList() ), mrOutAttrs ( *pAttr ), + mnColorListState ( CT_NONE ), mnBitmapListState ( CT_NONE ), mnGradientListState ( CT_NONE ), @@ -64,17 +73,15 @@ SvxAreaTabDialog::SvxAreaTabDialog mnDlgType( 0 ), mbAreaTP( sal_False ) { - FreeResource(); - - AddTabPage( RID_SVXPAGE_AREA, SvxAreaTabPage::Create, 0 ); - AddTabPage( RID_SVXPAGE_SHADOW, SvxShadowTabPage::Create, 0 ); - AddTabPage( RID_SVXPAGE_TRANSPARENCE, SvxTransparenceTabPage::Create, 0); - AddTabPage( RID_SVXPAGE_COLOR, SvxColorTabPage::Create, 0 ); - AddTabPage( RID_SVXPAGE_GRADIENT, SvxGradientTabPage::Create, 0 ); - AddTabPage( RID_SVXPAGE_HATCH, SvxHatchTabPage::Create, 0 ); - AddTabPage( RID_SVXPAGE_BITMAP, SvxBitmapTabPage::Create, 0); + m_nAreaTabPage = AddTabPage( "RID_SVXPAGE_AREA", SvxAreaTabPage::Create, 0 ); + m_nShadowTabPage = AddTabPage( "RID_SVXPAGE_SHADOW", SvxShadowTabPage::Create, 0 ); + m_nTransparenceTabPage = AddTabPage( "RID_SVXPAGE_TRANSPARENCE", SvxTransparenceTabPage::Create, 0); + m_nColorTabPage = AddTabPage( "RID_SVXPAGE_COLOR", SvxColorTabPage::Create, 0 ); + m_nGradientTabPage = AddTabPage( "RID_SVXPAGE_GRADIENT", SvxGradientTabPage::Create, 0 ); + m_nHatchTabPage = AddTabPage( "RID_SVXPAGE_HATCH", SvxHatchTabPage::Create, 0 ); + m_nBitmapTabPage = AddTabPage( "RID_SVXPAGE_BITMAP", SvxBitmapTabPage::Create, 0); - SetCurPageId( RID_SVXPAGE_AREA ); + SetCurPageId( "RID_SVXPAGE_AREA" ); CancelButton& rBtnCancel = GetCancelButton(); rBtnCancel.SetClickHdl( LINK( this, SvxAreaTabDialog, CancelHdlImpl ) ); @@ -222,9 +229,8 @@ IMPL_LINK_INLINE_END( SvxAreaTabDialog, CancelHdlImpl, void *, p ) void SvxAreaTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { - switch( nId ) + if (nId == m_nAreaTabPage ) { - case RID_SVXPAGE_AREA: ( (SvxAreaTabPage&) rPage ).SetColorList( mpColorList ); ( (SvxAreaTabPage&) rPage ).SetGradientList( mpGradientList ); ( (SvxAreaTabPage&) rPage ).SetHatchingList( mpHatchingList ); @@ -240,21 +246,18 @@ void SvxAreaTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) ( (SvxAreaTabPage&) rPage ).Construct(); // ActivatePage() is not called the first time ( (SvxAreaTabPage&) rPage ).ActivatePage( mrOutAttrs ); - - break; - - case RID_SVXPAGE_SHADOW: - { + } + else if (nId == m_nShadowTabPage) + { ( (SvxShadowTabPage&) rPage ).SetColorList( mpColorList ); ( (SvxShadowTabPage&) rPage ).SetPageType( mnPageType ); ( (SvxShadowTabPage&) rPage ).SetDlgType( mnDlgType ); ( (SvxShadowTabPage&) rPage ).SetAreaTP( &mbAreaTP ); ( (SvxShadowTabPage&) rPage ).SetColorChgd( &mnColorListState ); ( (SvxShadowTabPage&) rPage ).Construct(); - } - break; - - case RID_SVXPAGE_GRADIENT: + } + else if (nId == m_nGradientTabPage) + { ( (SvxGradientTabPage&) rPage ).SetColorList( mpColorList ); ( (SvxGradientTabPage&) rPage ).SetGradientList( mpGradientList ); ( (SvxGradientTabPage&) rPage ).SetPageType( &mnPageType ); @@ -264,9 +267,9 @@ void SvxAreaTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) ( (SvxGradientTabPage&) rPage ).SetGrdChgd( &mnGradientListState ); ( (SvxGradientTabPage&) rPage ).SetColorChgd( &mnColorListState ); ( (SvxGradientTabPage&) rPage ).Construct(); - break; - - case RID_SVXPAGE_HATCH: + } + else if (nId == m_nHatchTabPage) + { ( (SvxHatchTabPage&) rPage ).SetColorList( mpColorList ); ( (SvxHatchTabPage&) rPage ).SetHatchingList( mpHatchingList ); ( (SvxHatchTabPage&) rPage ).SetPageType( &mnPageType ); @@ -276,9 +279,9 @@ void SvxAreaTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) ( (SvxHatchTabPage&) rPage ).SetHtchChgd( &mnHatchingListState ); ( (SvxHatchTabPage&) rPage ).SetColorChgd( &mnColorListState ); ( (SvxHatchTabPage&) rPage ).Construct(); - break; - - case RID_SVXPAGE_BITMAP: + } + else if (nId == m_nBitmapTabPage) + { ( (SvxBitmapTabPage&) rPage ).SetColorList( mpColorList ); ( (SvxBitmapTabPage&) rPage ).SetBitmapList( mpBitmapList ); ( (SvxBitmapTabPage&) rPage ).SetPageType( &mnPageType ); @@ -288,9 +291,9 @@ void SvxAreaTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) ( (SvxBitmapTabPage&) rPage ).SetBmpChgd( &mnBitmapListState ); ( (SvxBitmapTabPage&) rPage ).SetColorChgd( &mnColorListState ); ( (SvxBitmapTabPage&) rPage ).Construct(); - break; - - case RID_SVXPAGE_COLOR: + } + else if (nId == m_nColorTabPage) + { ( (SvxColorTabPage&) rPage ).SetColorList( mpColorList ); ( (SvxColorTabPage&) rPage ).SetPageType( &mnPageType ); ( (SvxColorTabPage&) rPage ).SetDlgType( &mnDlgType ); @@ -298,14 +301,12 @@ void SvxAreaTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) ( (SvxColorTabPage&) rPage ).SetAreaTP( &mbAreaTP ); ( (SvxColorTabPage&) rPage ).SetColorChgd( &mnColorListState ); ( (SvxColorTabPage&) rPage ).Construct(); - break; - - case RID_SVXPAGE_TRANSPARENCE: + } + else if (nId == m_nTransparenceTabPage) + { ( (SvxTransparenceTabPage&) rPage ).SetPageType( mnPageType ); ( (SvxTransparenceTabPage&) rPage ).SetDlgType( mnDlgType ); ( (SvxTransparenceTabPage&) rPage ).Construct(); - break; - } } diff --git a/cui/source/tabpages/tabarea.hrc b/cui/source/tabpages/tabarea.hrc deleted file mode 100644 index f508b0fade2e..000000000000 --- a/cui/source/tabpages/tabarea.hrc +++ /dev/null @@ -1,69 +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 . - */ - -#define BTN_LOAD 5 -#define BTN_SAVE 6 -#define BTN_EMBED 7 -#define CTL_PREVIEW 1 -#define CTL_POSITION 2 -#define CTL_BITMAP_PREVIEW 6 -#define TSB_INVISIBLE 1 - -#define LB_COLOR 1 -#define LB_GRADIENT 2 -#define LB_HATCHING 3 -#define LB_BITMAP 4 -#define LB_BITMAPS 4 -#define LB_BACKGROUND_COLOR 3 -#define GRP_COLOR 1 -#define BTN_ADD 1 -#define BTN_IMPORT 2 -#define BTN_MODIFY 3 -#define BTN_DELETE 4 -#define FT_COLOR 1 -#define FT_BACKGROUND_COLOR 2 -#define MTR_FLD_ANGLE 3 -#define CTL_ANGLE 2 -#define NUM_FLD_STEPCOUNT 1 -#define FT_PIXEL_EDIT 4 -#define CTL_PIXEL 2 -#define FT_TYPE 7 -#define FL_PROP 2 -#define FL_SIZE 3 - -#define BTN_WORK_ON 2 -#define CTL_COLORTABLE 3 -#define CTL_PREVIEW_OLD 1 -#define CTL_PREVIEW_NEW 2 -#define FT_NAME 2 -#define EDT_NAME 1 -#define LB_COLORMODEL 2 -#define FT_1 3 -#define FT_2 4 -#define FT_3 5 -#define FT_4 6 -#define MTR_FLD_1 1 -#define MTR_FLD_2 2 -#define MTR_FLD_3 3 -#define MTR_FLD_4 4 -#define FT_TABLE_NAME 7 - -#define FT_BITMAPS_HIDDEN 12 - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/tabpages/tabarea.src b/cui/source/tabpages/tabarea.src deleted file mode 100644 index 703af0eb43c8..000000000000 --- a/cui/source/tabpages/tabarea.src +++ /dev/null @@ -1,90 +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 "helpid.hrc" -#include <cuires.hrc> -#include "tabarea.hrc" -#include <svx/dialogs.hrc> - -#define MASKCOLOR MaskColor = Color{ Red = 0xff00 ; Green = 0x0000 ; Blue = 0xff00 ; }; - - // RID_SVXPAGE_AREA ------------------------------------------------------ -#define TRANS_GRAD_OFFSET_X 6 -#define TRANS_GRAD_OFFSET_Y 64 - -// ------------------------------------------------------ -TabDialog RID_SVXDLG_AREA -{ - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 289 , 176 ) ; - Text [ en-US ] = "Area" ; - Moveable = TRUE ; - TabControl 1 - { - OutputSize = TRUE ; - Pos = MAP_APPFONT ( 3 , 3 ) ; - PageList = - { - PageItem - { - Identifier = RID_SVXPAGE_AREA ; - Text [ en-US ] = "Area" ; - PageResID = RID_SVXPAGE_AREA ; - }; - PageItem - { - Identifier = RID_SVXPAGE_SHADOW ; - PageResID = RID_SVXPAGE_SHADOW ; - Text [ en-US ] = "Shadow" ; - }; - PageItem - { - Identifier = RID_SVXPAGE_TRANSPARENCE ; - Text [ en-US ] = "Transparency"; - }; - PageItem - { - Identifier = RID_SVXPAGE_COLOR ; - Text [ en-US ] = "Colors" ; - PageResID = RID_SVXPAGE_COLOR ; - }; - PageItem - { - Identifier = RID_SVXPAGE_GRADIENT ; - Text [ en-US ] = "Gradients" ; - PageResID = RID_SVXPAGE_GRADIENT ; - }; - PageItem - { - Identifier = RID_SVXPAGE_HATCH ; - Text [ en-US ] = "Hatching" ; - PageResID = RID_SVXPAGE_HATCH ; - }; - PageItem - { - Identifier = RID_SVXPAGE_BITMAP ; - Text [ en-US ] = "Bitmaps" ; - PageResID = RID_SVXPAGE_BITMAP ; - }; - }; - }; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index 496015b7d5aa..0a281b4f1b62 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -30,7 +30,6 @@ #include "svx/xattr.hxx" #include <svx/xpool.hxx> #include <cuires.hrc> -#include "tabarea.hrc" #include <svx/xflbckit.hxx> #include <svx/svdattr.hxx> #include <svx/xtable.hxx> diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index d47155d6daec..160af950b44c 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -40,7 +40,6 @@ #include "svx/xoutbmp.hxx" #include "svx/drawitem.hxx" #include "cuitabarea.hxx" -#include "tabarea.hrc" #include "defdlgname.hxx" #include "dlgname.hxx" #include <svx/svxdlg.hxx> diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 5411f5a374b9..f14ab7656db7 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -39,7 +39,6 @@ #include <svx/xtable.hxx> #include "svx/drawitem.hxx" #include "cuitabarea.hxx" -#include "tabarea.hrc" #include "defdlgname.hxx" #include "dlgname.hxx" #include <svx/svxdlg.hxx> diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index 31bb3456637a..e84c892aeff9 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -34,7 +34,6 @@ #include <svx/xpool.hxx> #include "svx/drawitem.hxx" #include "cuitabarea.hxx" -#include "tabarea.hrc" #include "defdlgname.hxx" #include "dlgname.hxx" #include <svx/svxdlg.hxx> diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index b429820ff931..95b64f53516d 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -28,7 +28,6 @@ #include "com/sun/star/ui/dialogs/TemplateDescription.hpp" #include <cuires.hrc> -#include "tabarea.hrc" #include "helpid.hrc" #include "svx/xattr.hxx" #include <svx/xpool.hxx> diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx index 64269c210e68..fb730ff5dfb6 100644 --- a/cui/source/tabpages/tpshadow.cxx +++ b/cui/source/tabpages/tpshadow.cxx @@ -25,7 +25,6 @@ #include "svx/xattr.hxx" #include <svx/xpool.hxx> #include <cuires.hrc> -#include "tabarea.hrc" #include <svx/svdattr.hxx> #include "svx/drawitem.hxx" #include "cuitabarea.hxx" |