Kaydet (Commit) 7549878f authored tarafından Caolán McNamara's avatar Caolán McNamara

convert conditional format src fragment to .ui and layout

this is a difficult widget

Change-Id: If4ea45230679c46f7ad763f07c876dd74d4478d0
üst b45fe99f
......@@ -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 \
......
......@@ -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 \
......
......@@ -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)
......
......@@ -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()
......
/* -*- 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: */
......@@ -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;
......
/* -*- 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: */
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