Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
c8cae05e
Kaydet (Commit)
c8cae05e
authored
Ock 31, 2014
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert solarize dialog to .ui
Change-Id: I1aab18d8e0aa12d39584266a6657436ea100b521
üst
e70fb083
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
225 additions
and
123 deletions
+225
-123
UIConfig_cui.mk
cui/UIConfig_cui.mk
+1
-0
cuigrfflt.cxx
cui/source/dialogs/cuigrfflt.cxx
+9
-16
grfflt.hrc
cui/source/dialogs/grfflt.hrc
+0
-8
grfflt.src
cui/source/dialogs/grfflt.src
+0
-82
dlgfact.cxx
cui/source/factory/dlgfact.cxx
+3
-3
dlgfact.hxx
cui/source/factory/dlgfact.hxx
+1
-1
cuigrfflt.hxx
cui/source/inc/cuigrfflt.hxx
+7
-10
solarizedialog.ui
cui/uiconfig/ui/solarizedialog.ui
+202
-0
dialogs.hrc
include/svx/dialogs.hrc
+0
-1
svxdlg.hxx
include/svx/svxdlg.hxx
+1
-1
grfflt.cxx
svx/source/dialog/grfflt.cxx
+1
-1
No files found.
cui/UIConfig_cui.mk
Dosyayı görüntüle @
c8cae05e
...
...
@@ -148,6 +148,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/similaritysearchdialog \
cui/uiconfig/ui/slantcornertabpage \
cui/uiconfig/ui/smoothdialog \
cui/uiconfig/ui/solarizedialog \
cui/uiconfig/ui/specialcharacters \
cui/uiconfig/ui/spellingdialog \
cui/uiconfig/ui/spelloptionsdialog \
...
...
cui/source/dialogs/cuigrfflt.cxx
Dosyayı görüntüle @
c8cae05e
...
...
@@ -421,25 +421,18 @@ Graphic GraphicFilterSmooth::GetFilteredGraphic( const Graphic& rGraphic, double
// ------------------
GraphicFilterSolarize
::
GraphicFilterSolarize
(
Window
*
pParent
,
const
Graphic
&
rGraphic
,
sal_uInt8
cGreyThreshold
,
sal_Bool
bInvert
)
:
oldGraphicFilterDialog
(
pParent
,
CUI_RES
(
RID_SVX_GRFFILTER_DLG_SOLARIZE
),
rGraphic
),
maFtThreshold
(
this
,
CUI_RES
(
DLG_FILTERSOLARIZE_FT_THRESHOLD
)
),
maMtrThreshold
(
this
,
CUI_RES
(
DLG_FILTERSOLARIZE_MTR_THRESHOLD
)
),
maCbxInvert
(
this
,
CUI_RES
(
DLG_FILTERSOLARIZE_CBX_INVERT
)
)
sal_uInt8
cGreyThreshold
,
sal_Bool
bInvert
)
:
GraphicFilterDialog
(
pParent
,
"SolarizeDialog"
,
"cui/ui/solarizedialog.ui"
,
rGraphic
)
{
FreeResource
();
maMtrThreshold
.
SetValue
(
FRound
(
cGreyThreshold
/
2.55
)
);
maMtrThreshold
.
SetModifyHdl
(
GetModifyHdl
()
);
maCbxInvert
.
Check
(
bInvert
);
maCbxInvert
.
SetToggleHdl
(
GetModifyHdl
()
);
}
get
(
mpMtrThreshold
,
"value"
);
get
(
mpCbxInvert
,
"invert"
);
// -----------------------------------------------------------------------------
mpMtrThreshold
->
SetValue
(
FRound
(
cGreyThreshold
/
2.55
)
);
mpMtrThreshold
->
SetModifyHdl
(
GetModifyHdl
()
);
GraphicFilterSolarize
::~
GraphicFilterSolarize
()
{
mpCbxInvert
->
Check
(
bInvert
);
mpCbxInvert
->
SetToggleHdl
(
GetModifyHdl
()
);
}
// -----------------------------------------------------------------------------
...
...
cui/source/dialogs/grfflt.hrc
Dosyayı görüntüle @
c8cae05e
...
...
@@ -40,14 +40,6 @@
#define DLG_FILTERMOSAIC_MTR_HEIGHT 4
#define DLG_FILTERMOSAIC_CBX_EDGES 5
// ----------------------
// - DLG_FILTERSOLARIZE -
// ----------------------
#define DLG_FILTERSOLARIZE_FT_THRESHOLD 1
#define DLG_FILTERSOLARIZE_MTR_THRESHOLD 2
#define DLG_FILTERSOLARIZE_CBX_INVERT 3
// -------------------
// - DLG_FILTERSEPIA -
// -------------------
...
...
cui/source/dialogs/grfflt.src
Dosyayı görüntüle @
c8cae05e
...
...
@@ -130,88 +130,6 @@ ModalDialog RID_SVX_GRFFILTER_DLG_MOSAIC
};
};
// ----------------------
// - DLG_FILTERSOLARIZE -
// ----------------------
ModalDialog RID_SVX_GRFFILTER_DLG_SOLARIZE
{
HelpID = CMD_SID_GRFFILTER_SOLARIZE;
OutputSize = TRUE ;
Moveable = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 250, 100 ) ;
Text [ en-US ] = "Solarization" ;
FixedLine FL_PARAMETER
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 182, RSC_CD_FIXEDLINE_HEIGHT ) ;
Text [ en-US ] = "Parameters";
};
Control CTL_PREVIEW
{
Pos = MAP_APPFONT ( 104 , 3 + RSC_CD_FIXEDLINE_HEIGHT + RSC_SP_FLGR_INNERBORDER_TOP ) ;
Size = MAP_APPFONT ( 81, 73 ) ;
};
#define MA_Y5 3 + RSC_CD_FIXEDLINE_HEIGHT + RSC_SP_FLGR_INNERBORDER_TOP
FixedText DLG_FILTERSOLARIZE_FT_THRESHOLD
{
Pos = MAP_APPFONT ( 12, MA_Y5 ) ;
Size = MAP_APPFONT ( 77 , 10 ) ;
Text [ en-US ] = "Threshold ~value" ;
};
#define MA_Y6 MA_Y5 + RSC_CD_FIXEDTEXT_HEIGHT + RSC_SP_CTRL_DESC_Y
MetricField DLG_FILTERSOLARIZE_MTR_THRESHOLD
{
HelpID = "cui:MetricField:RID_SVX_GRFFILTER_DLG_SOLARIZE:DLG_FILTERSOLARIZE_MTR_THRESHOLD";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , MA_Y6 ) ;
Size = MAP_APPFONT ( 35 , 12 ) ;
TabStop = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Maximum = 100 ;
StrictFormat = TRUE ;
Unit = FUNIT_PERCENT ;
Last = 100 ;
SpinSize = 1 ;
};
#define MA_Y7 MA_Y6 + RSC_CD_TEXTBOX_HEIGHT + RSC_SP_CTRL_GROUP_Y
CheckBox DLG_FILTERSOLARIZE_CBX_INVERT
{
HelpID = "cui:CheckBox:RID_SVX_GRFFILTER_DLG_SOLARIZE:DLG_FILTERSOLARIZE_CBX_INVERT";
Pos = MAP_APPFONT ( 12, 46 ) ;
Size = MAP_APPFONT ( 77, 12 ) ;
TabStop = TRUE ;
Text [ en-US ] = "~Invert" ;
};
OKButton BTN_OK
{
Pos = MAP_APPFONT ( 194, 6 ) ;
Size = MAP_APPFONT ( 50, 14 ) ;
TabStop = TRUE ;
DefButton = TRUE ;
};
CancelButton BTN_CANCEL
{
Pos = MAP_APPFONT ( 194, 23 ) ;
Size = MAP_APPFONT ( 50, 14 ) ;
TabStop = TRUE ;
};
HelpButton BTN_HELP
{
Pos = MAP_APPFONT ( 194, 43 ) ;
Size = MAP_APPFONT ( 50, 14 ) ;
TabStop = TRUE ;
};
};
// ----------------------
// - DLG_FILTERSOLARIZE -
// ----------------------
ModalDialog RID_SVX_GRFFILTER_DLG_SEPIA
{
HelpID = CMD_SID_GRFFILTER_SEPIA;
...
...
cui/source/factory/dlgfact.cxx
Dosyayı görüntüle @
c8cae05e
...
...
@@ -1544,10 +1544,10 @@ AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterSmo
}
AbstractGraphicFilterDialog
*
AbstractDialogFactory_Impl
::
CreateGraphicFilterSolarize
(
Window
*
pParent
,
const
Graphic
&
rGraphic
,
sal_uInt8
nGreyThreshold
,
sal_Bool
bInvert
,
sal_uInt32
)
const
Graphic
&
rGraphic
,
sal_uInt8
nGreyThreshold
,
sal_Bool
bInvert
)
{
old
GraphicFilterDialog
*
pDlg
=
new
GraphicFilterSolarize
(
pParent
,
rGraphic
,
nGreyThreshold
,
bInvert
);
return
new
old
AbstractGraphicFilterDialog_Impl
(
pDlg
);
GraphicFilterDialog
*
pDlg
=
new
GraphicFilterSolarize
(
pParent
,
rGraphic
,
nGreyThreshold
,
bInvert
);
return
new
AbstractGraphicFilterDialog_Impl
(
pDlg
);
}
AbstractGraphicFilterDialog
*
AbstractDialogFactory_Impl
::
CreateGraphicFilterMosaic
(
Window
*
pParent
,
...
...
cui/source/factory/dlgfact.hxx
Dosyayı görüntüle @
c8cae05e
...
...
@@ -671,7 +671,7 @@ public:
sal_uInt32
nResId
);
virtual
AbstractGraphicFilterDialog
*
CreateGraphicFilterSolarize
(
Window
*
pParent
,
const
Graphic
&
rGraphic
,
sal_uInt8
nGreyThreshold
,
sal_Bool
bInvert
,
sal_uInt32
nResId
);
sal_Bool
bInvert
);
virtual
AbstractGraphicFilterDialog
*
CreateGraphicFilterMosaic
(
Window
*
pParent
,
const
Graphic
&
rGraphic
,
sal_uInt16
nTileWidth
,
sal_uInt16
nTileHeight
,
sal_Bool
bEnhanceEdges
,
sal_uInt32
nResId
);
...
...
cui/source/inc/cuigrfflt.hxx
Dosyayı görüntüle @
c8cae05e
...
...
@@ -185,23 +185,20 @@ public:
// - GraphicFilterSolarize -
// -------------------------
class
GraphicFilterSolarize
:
public
old
GraphicFilterDialog
class
GraphicFilterSolarize
:
public
GraphicFilterDialog
{
private
:
FixedText
maFtThreshold
;
MetricField
maMtrThreshold
;
CheckBox
maCbxInvert
;
MetricField
*
mpMtrThreshold
;
CheckBox
*
mpCbxInvert
;
public
:
GraphicFilterSolarize
(
Window
*
pParent
,
const
Graphic
&
rGraphic
,
GraphicFilterSolarize
(
Window
*
pParent
,
const
Graphic
&
rGraphic
,
sal_uInt8
nGreyThreshold
,
sal_Bool
bInvert
);
~
GraphicFilterSolarize
();
virtual
Graphic
GetFilteredGraphic
(
const
Graphic
&
rGraphic
,
double
fScaleX
,
double
fScaleY
);
sal_uInt8
GetGreyThreshold
()
const
{
return
(
(
sal_uInt8
)
FRound
(
m
aMtrThreshold
.
GetValue
()
*
2.55
)
);
}
sal_Bool
IsInvert
()
const
{
return
m
aCbxInvert
.
IsChecked
();
}
virtual
Graphic
GetFilteredGraphic
(
const
Graphic
&
rGraphic
,
double
fScaleX
,
double
fScaleY
);
sal_uInt8
GetGreyThreshold
()
const
{
return
(
(
sal_uInt8
)
FRound
(
m
pMtrThreshold
->
GetValue
()
*
2.55
)
);
}
sal_Bool
IsInvert
()
const
{
return
m
pCbxInvert
->
IsChecked
();
}
};
// ----------------------
...
...
cui/uiconfig/ui/solarizedialog.ui
0 → 100644
Dosyayı görüntüle @
c8cae05e
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.1 -->
<interface>
<requires
lib=
"gtk+"
version=
"3.0"
/>
<!-- interface-requires LibreOffice 1.0 -->
<object
class=
"GtkAdjustment"
id=
"adjustment1"
>
<property
name=
"upper"
>
100
</property>
<property
name=
"step_increment"
>
1
</property>
<property
name=
"page_increment"
>
10
</property>
</object>
<object
class=
"GtkDialog"
id=
"SolarizeDialog"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"border_width"
>
6
</property>
<property
name=
"title"
translatable=
"yes"
>
Solarization
</property>
<property
name=
"type_hint"
>
dialog
</property>
<child
internal-child=
"vbox"
>
<object
class=
"GtkBox"
id=
"dialog-vbox1"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"orientation"
>
vertical
</property>
<property
name=
"spacing"
>
12
</property>
<child
internal-child=
"action_area"
>
<object
class=
"GtkButtonBox"
id=
"dialog-action_area1"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"layout_style"
>
end
</property>
<child>
<object
class=
"GtkButton"
id=
"ok"
>
<property
name=
"label"
>
gtk-ok
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"can_default"
>
True
</property>
<property
name=
"has_default"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"use_stock"
>
True
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkButton"
id=
"cancel"
>
<property
name=
"label"
>
gtk-cancel
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"use_stock"
>
True
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkButton"
id=
"help"
>
<property
name=
"label"
>
gtk-help
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"use_stock"
>
True
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
2
</property>
</packing>
</child>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"pack_type"
>
end
</property>
<property
name=
"position"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkFrame"
id=
"frame1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"vexpand"
>
True
</property>
<property
name=
"label_xalign"
>
0
</property>
<property
name=
"shadow_type"
>
none
</property>
<child>
<object
class=
"GtkAlignment"
id=
"alignment1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"vexpand"
>
True
</property>
<property
name=
"top_padding"
>
6
</property>
<property
name=
"left_padding"
>
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=
"vexpand"
>
True
</property>
<property
name=
"column_spacing"
>
24
</property>
<child>
<object
class=
"cuilo-GraphicPreviewWindow"
id=
"preview"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"vexpand"
>
True
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"top_attach"
>
0
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkGrid"
id=
"grid2"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"row_spacing"
>
6
</property>
<child>
<object
class=
"GtkSpinButton"
id=
"value:0%"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"adjustment"
>
adjustment1
</property>
</object>
<packing>
<property
name=
"left_attach"
>
0
</property>
<property
name=
"top_attach"
>
1
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"label2"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"label"
translatable=
"yes"
>
Threshold _value
</property>
<property
name=
"use_underline"
>
True
</property>
<property
name=
"mnemonic_widget"
>
value:0%
</property>
</object>
<packing>
<property
name=
"left_attach"
>
0
</property>
<property
name=
"top_attach"
>
0
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkCheckButton"
id=
"invert"
>
<property
name=
"label"
translatable=
"yes"
>
_Invert
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
False
</property>
<property
name=
"use_underline"
>
True
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"draw_indicator"
>
True
</property>
</object>
<packing>
<property
name=
"left_attach"
>
0
</property>
<property
name=
"top_attach"
>
2
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
</object>
<packing>
<property
name=
"left_attach"
>
0
</property>
<property
name=
"top_attach"
>
0
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child
type=
"label"
>
<object
class=
"GtkLabel"
id=
"label1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Parameters
</property>
<attributes>
<attribute
name=
"weight"
value=
"bold"
/>
</attributes>
</object>
</child>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget
response=
"0"
>
ok
</action-widget>
<action-widget
response=
"0"
>
cancel
</action-widget>
<action-widget
response=
"0"
>
help
</action-widget>
</action-widgets>
</object>
</interface>
include/svx/dialogs.hrc
Dosyayı görüntüle @
c8cae05e
...
...
@@ -101,7 +101,6 @@
#define RID_SVX_GRFFILTER_DLG_SEPIA (RID_SVX_START + 334)
#define RID_SVX_GRFFILTER_DLG_POSTER (RID_SVX_START + 335)
#define RID_SVX_GRFFILTER_DLG_MOSAIC (RID_SVX_START + 332)
#define RID_SVX_GRFFILTER_DLG_SOLARIZE (RID_SVX_START + 333)
#define RID_SVX_GRFFILTER_DLG_EMBOSS (RID_SVX_START + 336)
#define RID_SVXDLG_CHARMAP ( RID_SVX_START + 10 )
...
...
include/svx/svxdlg.hxx
Dosyayı görüntüle @
c8cae05e
...
...
@@ -424,7 +424,7 @@ public:
double
nRadius
,
sal_uInt32
nResId
)
=
0
;
virtual
AbstractGraphicFilterDialog
*
CreateGraphicFilterSolarize
(
Window
*
pParent
,
const
Graphic
&
rGraphic
,
sal_uInt8
nGreyThreshold
,
sal_Bool
bInvert
,
sal_uInt32
nResId
)
=
0
;
sal_uInt8
nGreyThreshold
,
sal_Bool
bInvert
)
=
0
;
virtual
AbstractGraphicFilterDialog
*
CreateGraphicFilterMosaic
(
Window
*
pParent
,
const
Graphic
&
rGraphic
,
sal_uInt16
nTileWidth
,
sal_uInt16
nTileHeight
,
sal_Bool
bEnhanceEdges
,
sal_uInt32
nResId
)
=
0
;
...
...
svx/source/dialog/grfflt.cxx
Dosyayı görüntüle @
c8cae05e
...
...
@@ -247,7 +247,7 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj
SvxAbstractDialogFactory
*
pFact
=
SvxAbstractDialogFactory
::
Create
();
if
(
pFact
)
{
AbstractGraphicFilterDialog
*
aDlg
=
pFact
->
CreateGraphicFilterSolarize
(
pWindow
,
rGraphic
,
128
,
sal_False
,
RID_SVX_GRFFILTER_DLG_SOLARIZE
);
AbstractGraphicFilterDialog
*
aDlg
=
pFact
->
CreateGraphicFilterSolarize
(
pWindow
,
rGraphic
,
128
,
sal_False
);
DBG_ASSERT
(
aDlg
,
"Dialogdiet fail!"
);
if
(
aDlg
->
Execute
()
==
RET_OK
)
aGraphic
=
aDlg
->
GetFilteredGraphic
(
rGraphic
,
1.0
,
1.0
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment