Kaydet (Commit) 3d4753f5 authored tarafından Caolán McNamara's avatar Caolán McNamara

convert distribute tab page to .ui

Change-Id: I6269f199bddcf13c1e412b14f9a5935c62c63fe0
üst b434b00d
......@@ -57,7 +57,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
cui/source/options/treeopt.src \
cui/source/tabpages/autocdlg.src \
cui/source/tabpages/border.src \
cui/source/tabpages/dstribut.src \
cui/source/tabpages/frmdirlbox.src \
cui/source/tabpages/macroass.src \
cui/source/tabpages/page.src \
......
......@@ -44,6 +44,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/connpooloptions \
cui/uiconfig/ui/customizedialog \
cui/uiconfig/ui/dbregisterpage \
cui/uiconfig/ui/distributionpage \
cui/uiconfig/ui/effectspage \
cui/uiconfig/ui/formatcellsdialog \
cui/uiconfig/ui/gallerysearchprogress \
......
......@@ -1778,8 +1778,6 @@ GetTabPageRanges AbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16 nI
{
case RID_SVXPAGE_TEXTANIMATION :
return SvxTextAnimationPage::GetRanges;
case RID_SVXPAGE_DISTRIBUTE:
return SvxDistributePage::GetRanges;
case RID_SVXPAGE_TRANSPARENCE :
return SvxTransparenceTabPage::GetRanges;
case RID_SVXPAGE_AREA :
......
......@@ -26,35 +26,24 @@
class SvxDistributePage : public SvxTabPage
{
SvxDistributeHorizontal meDistributeHor;
SvxDistributeVertical meDistributeVer;
SvxDistributeHorizontal m_eDistributeHor;
SvxDistributeVertical m_eDistributeVer;
FixedLine maFlHorizontal ;
RadioButton maBtnHorNone ;
RadioButton maBtnHorLeft ;
RadioButton maBtnHorCenter ;
RadioButton maBtnHorDistance ;
RadioButton maBtnHorRight ;
FixedImage maHorLow ;
FixedImage maHorCenter ;
FixedImage maHorDistance ;
FixedImage maHorHigh ;
FixedLine maFlVertical ;
RadioButton maBtnVerNone ;
RadioButton maBtnVerTop ;
RadioButton maBtnVerCenter ;
RadioButton maBtnVerDistance ;
RadioButton maBtnVerBottom ;
FixedImage maVerLow ;
FixedImage maVerCenter ;
FixedImage maVerDistance ;
FixedImage maVerHigh ;
RadioButton* m_pBtnHorNone;
RadioButton* m_pBtnHorLeft;
RadioButton* m_pBtnHorCenter;
RadioButton* m_pBtnHorDistance;
RadioButton* m_pBtnHorRight;
RadioButton* m_pBtnVerNone;
RadioButton* m_pBtnVerTop;
RadioButton* m_pBtnVerCenter;
RadioButton* m_pBtnVerDistance;
RadioButton* m_pBtnVerBottom;
public:
SvxDistributePage(Window* pWindow, const SfxItemSet& rInAttrs,
SvxDistributeHorizontal eHor = SvxDistributeHorizontalNone,
SvxDistributeVertical eVer = SvxDistributeVerticalNone);
~SvxDistributePage();
static SfxTabPage* Create(Window*, const SfxItemSet&,
SvxDistributeHorizontal eHor, SvxDistributeVertical eVer);
......@@ -63,8 +52,8 @@ public:
virtual void Reset(const SfxItemSet&);
virtual void PointChanged(Window* pWindow, RECT_POINT eRP);
SvxDistributeHorizontal GetDistributeHor() const { return meDistributeHor; }
SvxDistributeVertical GetDistributeVer() const { return meDistributeVer; }
SvxDistributeHorizontal GetDistributeHor() const { return m_eDistributeHor; }
SvxDistributeVertical GetDistributeVer() const { return m_eDistributeVer; }
};
class SvxDistributeDialog : public SfxNoLayoutSingleTabDialog
......
......@@ -204,8 +204,6 @@
#define HID_TPCOLOR_CMYK_3 "CUI_HID_TPCOLOR_CMYK_3"
#define HID_OFAPAGE_AUTOCOMPLETE_OPTIONS "CUI_HID_OFAPAGE_AUTOCOMPLETE_OPTIONS"
#define HID_PAGE_DISTRIBUTE "CUI_HID_PAGE_DISTRIBUTE"
#define HID_MEASURE_CTL_POSITION "CUI_HID_MEASURE_CTL_POSITION"
#define HID_VALUESET_NUM "CUI_HID_VALUESET_NUM"
#define HID_MEASURE_CTL_PREVIEW "CUI_HID_MEASURE_CTL_PREVIEW"
......
......@@ -20,7 +20,6 @@
#include <sfx2/basedlgs.hxx>
#include <cuires.hrc>
#include "dstribut.hxx"
#include "dstribut.hrc"
#include <svx/dialogs.hrc>
#include <svx/svddef.hxx>
#include <dialmgr.hxx>
......@@ -68,46 +67,25 @@ SvxDistributeDialog::~SvxDistributeDialog()
|*
\************************************************************************/
SvxDistributePage::SvxDistributePage(
Window* pWindow,
const SfxItemSet& rInAttrs,
SvxDistributeHorizontal eHor,
SvxDistributePage::SvxDistributePage(Window* pWindow,
const SfxItemSet& rInAttrs, SvxDistributeHorizontal eHor,
SvxDistributeVertical eVer)
: SvxTabPage(pWindow, CUI_RES(RID_SVXPAGE_DISTRIBUTE), rInAttrs),
meDistributeHor(eHor),
meDistributeVer(eVer),
maFlHorizontal (this, CUI_RES(FL_HORIZONTAL )),
maBtnHorNone (this, CUI_RES(BTN_HOR_NONE )),
maBtnHorLeft (this, CUI_RES(BTN_HOR_LEFT )),
maBtnHorCenter (this, CUI_RES(BTN_HOR_CENTER )),
maBtnHorDistance (this, CUI_RES(BTN_HOR_DISTANCE )),
maBtnHorRight (this, CUI_RES(BTN_HOR_RIGHT )),
maHorLow (this, CUI_RES(IMG_HOR_LOW )),
maHorCenter (this, CUI_RES(IMG_HOR_CENTER )),
maHorDistance (this, CUI_RES(IMG_HOR_DISTANCE )),
maHorHigh (this, CUI_RES(IMG_HOR_HIGH )),
maFlVertical (this, CUI_RES(FL_VERTICAL )),
maBtnVerNone (this, CUI_RES(BTN_VER_NONE )),
maBtnVerTop (this, CUI_RES(BTN_VER_TOP )),
maBtnVerCenter (this, CUI_RES(BTN_VER_CENTER )),
maBtnVerDistance (this, CUI_RES(BTN_VER_DISTANCE )),
maBtnVerBottom (this, CUI_RES(BTN_VER_BOTTOM )),
maVerLow (this, CUI_RES(IMG_VER_LOW )),
maVerCenter (this, CUI_RES(IMG_VER_CENTER )),
maVerDistance (this, CUI_RES(IMG_VER_DISTANCE )),
maVerHigh (this, CUI_RES(IMG_VER_HIGH ))
{
FreeResource();
}
/*************************************************************************
|*
|* Dtor
|*
\************************************************************************/
SvxDistributePage::~SvxDistributePage()
: SvxTabPage(pWindow, "DistributionPage", "cui/ui/distributionpage.ui",
rInAttrs)
, m_eDistributeHor(eHor)
, m_eDistributeVer(eVer)
{
get(m_pBtnHorNone, "hornone");
get(m_pBtnHorLeft, "horleft");
get(m_pBtnHorCenter, "horcenter");
get(m_pBtnHorDistance, "hordistance");
get(m_pBtnHorRight, "horright");
get(m_pBtnVerNone, "vernone");
get(m_pBtnVerTop, "vertop");
get(m_pBtnVerCenter, "vercenter");
get(m_pBtnVerDistance, "verdistance");
get(m_pBtnVerBottom, "verbottom");
}
/*************************************************************************
......@@ -139,34 +117,34 @@ void SvxDistributePage::PointChanged(Window* /*pWindow*/, RECT_POINT /*eRP*/)
void SvxDistributePage::Reset(const SfxItemSet& )
{
maBtnHorNone.SetState(sal_False);
maBtnHorLeft.SetState(sal_False);
maBtnHorCenter.SetState(sal_False);
maBtnHorDistance.SetState(sal_False);
maBtnHorRight.SetState(sal_False);
m_pBtnHorNone->SetState(sal_False);
m_pBtnHorLeft->SetState(sal_False);
m_pBtnHorCenter->SetState(sal_False);
m_pBtnHorDistance->SetState(sal_False);
m_pBtnHorRight->SetState(sal_False);
switch(meDistributeHor)
switch(m_eDistributeHor)
{
case SvxDistributeHorizontalNone : maBtnHorNone.SetState(sal_True); break;
case SvxDistributeHorizontalLeft : maBtnHorLeft.SetState(sal_True); break;
case SvxDistributeHorizontalCenter : maBtnHorCenter.SetState(sal_True); break;
case SvxDistributeHorizontalDistance : maBtnHorDistance.SetState(sal_True); break;
case SvxDistributeHorizontalRight : maBtnHorRight.SetState(sal_True); break;
case SvxDistributeHorizontalNone : m_pBtnHorNone->SetState(sal_True); break;
case SvxDistributeHorizontalLeft : m_pBtnHorLeft->SetState(sal_True); break;
case SvxDistributeHorizontalCenter : m_pBtnHorCenter->SetState(sal_True); break;
case SvxDistributeHorizontalDistance : m_pBtnHorDistance->SetState(sal_True); break;
case SvxDistributeHorizontalRight : m_pBtnHorRight->SetState(sal_True); break;
}
maBtnVerNone.SetState(sal_False);
maBtnVerTop.SetState(sal_False);
maBtnVerCenter.SetState(sal_False);
maBtnVerDistance.SetState(sal_False);
maBtnVerBottom.SetState(sal_False);
m_pBtnVerNone->SetState(sal_False);
m_pBtnVerTop->SetState(sal_False);
m_pBtnVerCenter->SetState(sal_False);
m_pBtnVerDistance->SetState(sal_False);
m_pBtnVerBottom->SetState(sal_False);
switch(meDistributeVer)
switch(m_eDistributeVer)
{
case SvxDistributeVerticalNone : maBtnVerNone.SetState(sal_True); break;
case SvxDistributeVerticalTop : maBtnVerTop.SetState(sal_True); break;
case SvxDistributeVerticalCenter : maBtnVerCenter.SetState(sal_True); break;
case SvxDistributeVerticalDistance : maBtnVerDistance.SetState(sal_True); break;
case SvxDistributeVerticalBottom : maBtnVerBottom.SetState(sal_True); break;
case SvxDistributeVerticalNone : m_pBtnVerNone->SetState(sal_True); break;
case SvxDistributeVerticalTop : m_pBtnVerTop->SetState(sal_True); break;
case SvxDistributeVerticalCenter : m_pBtnVerCenter->SetState(sal_True); break;
case SvxDistributeVerticalDistance : m_pBtnVerDistance->SetState(sal_True); break;
case SvxDistributeVerticalBottom : m_pBtnVerBottom->SetState(sal_True); break;
}
}
......@@ -181,28 +159,28 @@ sal_Bool SvxDistributePage::FillItemSet( SfxItemSet& )
SvxDistributeHorizontal eDistributeHor(SvxDistributeHorizontalNone);
SvxDistributeVertical eDistributeVer(SvxDistributeVerticalNone);
if(maBtnHorLeft.IsChecked())
if(m_pBtnHorLeft->IsChecked())
eDistributeHor = SvxDistributeHorizontalLeft;
else if(maBtnHorCenter.IsChecked())
else if(m_pBtnHorCenter->IsChecked())
eDistributeHor = SvxDistributeHorizontalCenter;
else if(maBtnHorDistance.IsChecked())
else if(m_pBtnHorDistance->IsChecked())
eDistributeHor = SvxDistributeHorizontalDistance;
else if(maBtnHorRight.IsChecked())
else if(m_pBtnHorRight->IsChecked())
eDistributeHor = SvxDistributeHorizontalRight;
if(maBtnVerTop.IsChecked())
if(m_pBtnVerTop->IsChecked())
eDistributeVer = SvxDistributeVerticalTop;
else if(maBtnVerCenter.IsChecked())
else if(m_pBtnVerCenter->IsChecked())
eDistributeVer = SvxDistributeVerticalCenter;
else if(maBtnVerDistance.IsChecked())
else if(m_pBtnVerDistance->IsChecked())
eDistributeVer = SvxDistributeVerticalDistance;
else if(maBtnVerBottom.IsChecked())
else if(m_pBtnVerBottom->IsChecked())
eDistributeVer = SvxDistributeVerticalBottom;
if(eDistributeHor != meDistributeHor || eDistributeVer != meDistributeVer)
if(eDistributeHor != m_eDistributeHor || eDistributeVer != m_eDistributeVer)
{
meDistributeHor = eDistributeHor;
meDistributeVer = eDistributeVer;
m_eDistributeHor = eDistributeHor;
m_eDistributeVer = eDistributeVer;
return sal_True;
}
......
/* -*- 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 FL_HORIZONTAL 1
#define BTN_HOR_NONE 2
#define BTN_HOR_LEFT 3
#define BTN_HOR_CENTER 4
#define BTN_HOR_DISTANCE 5
#define BTN_HOR_RIGHT 6
#define FL_VERTICAL 7
#define BTN_VER_NONE 8
#define BTN_VER_TOP 9
#define BTN_VER_CENTER 10
#define BTN_VER_DISTANCE 11
#define BTN_VER_BOTTOM 12
#define IMG_HOR_LOW 14
#define IMG_HOR_CENTER 15
#define IMG_HOR_DISTANCE 16
#define IMG_HOR_HIGH 17
#define IMG_VER_LOW 18
#define IMG_VER_CENTER 19
#define IMG_VER_DISTANCE 20
#define IMG_VER_HIGH 21
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- 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 <cuires.hrc>
#include "dstribut.hrc"
#include "helpid.hrc"
#include <svx/dialogs.hrc>
// RID_SVXPAGE_DISTRIBUTE ---------------------------------------------------
#define STD_MASKCOLOR Color { Red=0xffff; Green=0x0000; Blue=0xffff; }
TabPage RID_SVXPAGE_DISTRIBUTE
{
HelpId = HID_PAGE_DISTRIBUTE ;
Hide = TRUE ;
Size = MAP_APPFONT ( 260 , 81 ) ;
Text [ en-US ] = "Distribution" ;
FixedLine FL_HORIZONTAL
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Text [ en-US ] = "Horizontal" ;
};
RadioButton BTN_HOR_NONE
{
HelpID = "cui:RadioButton:RID_SVXPAGE_DISTRIBUTE:BTN_HOR_NONE";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 48 , 10 ) ;
Text [ en-US ] = "~None" ;
};
RadioButton BTN_HOR_LEFT
{
HelpID = "cui:RadioButton:RID_SVXPAGE_DISTRIBUTE:BTN_HOR_LEFT";
Pos = MAP_APPFONT ( 56 , 26 ) ;
Size = MAP_APPFONT ( 45 , 10 ) ;
Text [ en-US ] = "~Left" ;
};
RadioButton BTN_HOR_CENTER
{
HelpID = "cui:RadioButton:RID_SVXPAGE_DISTRIBUTE:BTN_HOR_CENTER";
Pos = MAP_APPFONT ( 105 , 26 ) ;
Size = MAP_APPFONT ( 45 , 10 ) ;
Text [ en-US ] = "~Center" ;
};
RadioButton BTN_HOR_DISTANCE
{
HelpID = "cui:RadioButton:RID_SVXPAGE_DISTRIBUTE:BTN_HOR_DISTANCE";
Pos = MAP_APPFONT ( 154 , 26 ) ;
Size = MAP_APPFONT ( 45 , 10 ) ;
Text [ en-US ] = "~Spacing" ;
};
RadioButton BTN_HOR_RIGHT
{
HelpID = "cui:RadioButton:RID_SVXPAGE_DISTRIBUTE:BTN_HOR_RIGHT";
Pos = MAP_APPFONT ( 203 , 26 ) ;
Size = MAP_APPFONT ( 45 , 10 ) ;
Text [ en-US ] = "~Right" ;
};
FixedImage IMG_HOR_LOW {
Pos = MAP_APPFONT ( 65 , 10 );
Size = MAP_APPFONT ( 15 , 16 );
Hide = FALSE;
Fixed = Image {
ImageBitmap = Bitmap { File = "dsth_low.bmp"; };
MaskColor = STD_MASKCOLOR;
};
};
FixedImage IMG_HOR_CENTER {
Pos = MAP_APPFONT ( 114 , 10 );
Size = MAP_APPFONT ( 15 , 16 );
Hide = FALSE;
Fixed = Image {
ImageBitmap = Bitmap { File = "dsth_cen.bmp"; };
MaskColor = STD_MASKCOLOR;
};
};
FixedImage IMG_HOR_DISTANCE {
Pos = MAP_APPFONT ( 163 , 10 );
Size = MAP_APPFONT ( 15 , 16 );
Hide = FALSE;
Fixed = Image {
ImageBitmap = Bitmap { File = "dsth_dst.bmp"; };
MaskColor = STD_MASKCOLOR;
};
};
FixedImage IMG_HOR_HIGH {
Pos = MAP_APPFONT ( 212 , 10 );
Size = MAP_APPFONT ( 15 , 16 );
Hide = FALSE;
Fixed = Image {
ImageBitmap = Bitmap { File = "dsth_hig.bmp"; };
MaskColor = STD_MASKCOLOR;
};
};
FixedLine FL_VERTICAL
{
Pos = MAP_APPFONT ( 6 , 42 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
Text [ en-US ] = "Vertical" ;
};
RadioButton BTN_VER_NONE
{
HelpID = "cui:RadioButton:RID_SVXPAGE_DISTRIBUTE:BTN_VER_NONE";
Pos = MAP_APPFONT ( 12 , 53 ) ;
Size = MAP_APPFONT ( 46 , 10 ) ;
Text [ en-US ] = "N~one" ;
};
RadioButton BTN_VER_TOP
{
HelpID = "cui:RadioButton:RID_SVXPAGE_DISTRIBUTE:BTN_VER_TOP";
Pos = MAP_APPFONT ( 56 , 65 ) ;
Size = MAP_APPFONT ( 45 , 10 ) ;
Text [ en-US ] = "~Top" ;
};
RadioButton BTN_VER_CENTER
{
HelpID = "cui:RadioButton:RID_SVXPAGE_DISTRIBUTE:BTN_VER_CENTER";
Pos = MAP_APPFONT ( 105 , 65 ) ;
Size = MAP_APPFONT ( 45 , 10 ) ;
Text [ en-US ] = "C~enter" ;
};
RadioButton BTN_VER_DISTANCE
{
HelpID = "cui:RadioButton:RID_SVXPAGE_DISTRIBUTE:BTN_VER_DISTANCE";
Pos = MAP_APPFONT ( 154 , 65 ) ;
Size = MAP_APPFONT ( 45 , 10 ) ;
Text [ en-US ] = "S~pacing" ;
};
RadioButton BTN_VER_BOTTOM
{
HelpID = "cui:RadioButton:RID_SVXPAGE_DISTRIBUTE:BTN_VER_BOTTOM";
Pos = MAP_APPFONT ( 203 , 65 ) ;
Size = MAP_APPFONT ( 45 , 10 ) ;
Text [ en-US ] = "~Bottom" ;
};
FixedImage IMG_VER_HIGH {
Pos = MAP_APPFONT ( 65 , 49 );
Size = MAP_APPFONT ( 15 , 16 );
Hide = FALSE;
Fixed = Image {
ImageBitmap = Bitmap { File = "dstv_hig.bmp"; };
MaskColor = STD_MASKCOLOR;
};
};
FixedImage IMG_VER_CENTER {
Pos = MAP_APPFONT ( 114 , 49 );
Size = MAP_APPFONT ( 15 , 16 );
Hide = FALSE;
Fixed = Image {
ImageBitmap = Bitmap { File = "dstv_cen.bmp"; };
MaskColor = STD_MASKCOLOR;
};
};
FixedImage IMG_VER_DISTANCE {
Pos = MAP_APPFONT ( 163 , 49 );
Size = MAP_APPFONT ( 15 , 16 );
Hide = FALSE;
Fixed = Image {
ImageBitmap = Bitmap { File = "dstv_dst.bmp"; };
MaskColor = STD_MASKCOLOR;
};
};
FixedImage IMG_VER_LOW {
Pos = MAP_APPFONT ( 212 , 49 );
Size = MAP_APPFONT ( 15 , 16 );
Hide = FALSE;
Fixed = Image {
ImageBitmap = Bitmap { File = "dstv_low.bmp"; };
MaskColor = STD_MASKCOLOR;
};
};
};
// ********************************************************************** EOF
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment