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
d03ec9f3
Kaydet (Commit)
d03ec9f3
authored
Eyl 14, 2013
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
really convert select address block to .ui
Change-Id: Icfd77f2037a27f24fd796084509a1baa7734103b
üst
6521201d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
57 additions
and
185 deletions
+57
-185
dbui.hrc
sw/inc/dbui.hrc
+1
-1
mailmergehelper.cxx
sw/source/ui/dbui/mailmergehelper.cxx
+1
-1
mmaddressblockpage.cxx
sw/source/ui/dbui/mmaddressblockpage.cxx
+45
-53
mmaddressblockpage.hrc
sw/source/ui/dbui/mmaddressblockpage.hrc
+0
-9
mmaddressblockpage.hxx
sw/source/ui/dbui/mmaddressblockpage.hxx
+9
-17
mmaddressblockpage.src
sw/source/ui/dbui/mmaddressblockpage.src
+0
-103
addressblockdialog.ui
sw/uiconfig/swriter/ui/addressblockdialog.ui
+1
-1
selectblockdialog.ui
sw/uiconfig/swriter/ui/selectblockdialog.ui
+0
-0
No files found.
sw/inc/dbui.hrc
Dosyayı görüntüle @
d03ec9f3
...
...
@@ -38,7 +38,7 @@
#define DLG_MM_CREATEADDRESSLIST (RC_DBUI_BEGIN + 14)
#define DLG_MM_CUSTOMIZE_ADDRESS_LIST (RC_DBUI_BEGIN + 17)
#define DLG_MM_SELECTADDRESSBLOCK (RC_DBUI_BEGIN + 19)
#define DLG_MM_ASSIGNFIELDS (RC_DBUI_BEGIN + 20)
#define DLG_MM_LAYOUT_PAGE (RC_DBUI_BEGIN + 22)
...
...
sw/source/ui/dbui/mailmergehelper.cxx
Dosyayı görüntüle @
d03ec9f3
...
...
@@ -222,7 +222,7 @@ SwAddressPreview::SwAddressPreview(Window* pParent, WinBits nStyle)
extern
"C"
SAL_DLLPUBLIC_EXPORT
Window
*
SAL_CALL
makeSwAddressPreview
(
Window
*
pParent
,
VclBuilder
::
stringmap
&
rMap
)
{
WinBits
nWinStyle
=
WB_
NOTABSTOP
;
WinBits
nWinStyle
=
WB_
DIALOGCONTROL
;
OString
sBorder
=
VclBuilder
::
extractCustomProperty
(
rMap
);
if
(
!
sBorder
.
isEmpty
())
nWinStyle
|=
WB_BORDER
;
...
...
sw/source/ui/dbui/mmaddressblockpage.cxx
Dosyayı görüntüle @
d03ec9f3
...
...
@@ -338,44 +338,35 @@ IMPL_LINK(SwMailMergeAddressBlockPage, InsertDataHdl_Impl, ImageButton*, pButton
}
SwSelectAddressBlockDialog
::
SwSelectAddressBlockDialog
(
Window
*
pParent
,
SwMailMergeConfigItem
&
rConfig
)
:
SfxModalDialog
(
pParent
,
SW_RES
(
DLG_MM_SELECTADDRESSBLOCK
)),
#ifdef _MSC_VER
#pragma warning (disable : 4355)
#endif
m_aSelectFT
(
this
,
SW_RES
(
FT_SELECT
)),
m_aPreview
(
this
,
SW_RES
(
WIN_PREVIEW
)),
m_aNewPB
(
this
,
SW_RES
(
PB_NEW
)),
m_aCustomizePB
(
this
,
SW_RES
(
PB_CUSTOMIZE
)),
m_aDeletePB
(
this
,
SW_RES
(
PB_DELETE
)),
m_aSettingsFI
(
this
,
SW_RES
(
FI_SETTINGS
)),
m_aNeverRB
(
this
,
SW_RES
(
RB_NEVER
)),
m_aAlwaysRB
(
this
,
SW_RES
(
RB_ALWAYS
)),
m_aDependentRB
(
this
,
SW_RES
(
RB_DEPENDENT
)),
m_aCountryED
(
this
,
SW_RES
(
ED_COUNTRY
)),
m_aSeparatorFL
(
this
,
SW_RES
(
FL_SEPARATOR
)),
m_aOK
(
this
,
SW_RES
(
PB_OK
)),
m_aCancel
(
this
,
SW_RES
(
PB_CANCEL
)),
m_aHelp
(
this
,
SW_RES
(
PB_HELP
)),
#ifdef _MSC_VER
#pragma warning (default : 4355)
#endif
m_rConfig
(
rConfig
)
{
FreeResource
();
Window
*
pParent
,
SwMailMergeConfigItem
&
rConfig
)
:
SfxModalDialog
(
pParent
,
"SelectBlockDialog"
,
"modules/swriter/ui/selectblockdialog.ui"
)
,
m_rConfig
(
rConfig
)
{
get
(
m_pPreview
,
"preview"
);
Size
aSize
(
m_pPreview
->
LogicToPixel
(
Size
(
192
,
100
),
MapMode
(
MAP_APPFONT
)));
m_pPreview
->
set_width_request
(
aSize
.
Width
());
m_pPreview
->
set_height_request
(
aSize
.
Height
());
get
(
m_pNewPB
,
"new"
);
get
(
m_pCustomizePB
,
"edit"
);
get
(
m_pDeletePB
,
"delete"
);
get
(
m_pNeverRB
,
"never"
);
get
(
m_pAlwaysRB
,
"always"
);
get
(
m_pDependentRB
,
"dependent"
);
get
(
m_pCountryED
,
"country"
);
Link
aCustomizeHdl
=
LINK
(
this
,
SwSelectAddressBlockDialog
,
NewCustomizeHdl_Impl
);
m_
aNewPB
.
SetClickHdl
(
aCustomizeHdl
);
m_
aCustomizePB
.
SetClickHdl
(
aCustomizeHdl
);
m_
pNewPB
->
SetClickHdl
(
aCustomizeHdl
);
m_
pCustomizePB
->
SetClickHdl
(
aCustomizeHdl
);
m_
aDeletePB
.
SetClickHdl
(
LINK
(
this
,
SwSelectAddressBlockDialog
,
DeleteHdl_Impl
));
m_
pDeletePB
->
SetClickHdl
(
LINK
(
this
,
SwSelectAddressBlockDialog
,
DeleteHdl_Impl
));
Link
aLk
=
LINK
(
this
,
SwSelectAddressBlockDialog
,
IncludeHdl_Impl
);
m_
aNeverRB
.
SetClickHdl
(
aLk
);
m_
aAlwaysRB
.
SetClickHdl
(
aLk
);
m_
aDependentRB
.
SetClickHdl
(
aLk
);
m_
aPreview
.
SetLayout
(
2
,
2
);
m_
aPreview
.
EnableScrollBar
();
m_
pNeverRB
->
SetClickHdl
(
aLk
);
m_
pAlwaysRB
->
SetClickHdl
(
aLk
);
m_
pDependentRB
->
SetClickHdl
(
aLk
);
m_
pPreview
->
SetLayout
(
2
,
2
);
m_
pPreview
->
EnableScrollBar
();
}
SwSelectAddressBlockDialog
::~
SwSelectAddressBlockDialog
()
...
...
@@ -387,15 +378,15 @@ void SwSelectAddressBlockDialog::SetAddressBlocks(const uno::Sequence< OUString>
{
m_aAddressBlocks
=
rBlocks
;
for
(
sal_Int32
nAddress
=
0
;
nAddress
<
m_aAddressBlocks
.
getLength
();
++
nAddress
)
m_
aPreview
.
AddAddress
(
m_aAddressBlocks
[
nAddress
]);
m_
aPreview
.
SelectAddress
(
nSelectedAddress
);
m_
pPreview
->
AddAddress
(
m_aAddressBlocks
[
nAddress
]);
m_
pPreview
->
SelectAddress
(
nSelectedAddress
);
}
// return the address blocks and put the selected one to the first position
const
uno
::
Sequence
<
OUString
>&
SwSelectAddressBlockDialog
::
GetAddressBlocks
()
{
//put the selected block to the first position
sal_uInt16
nSelect
=
m_
aPreview
.
GetSelectedAddress
();
sal_uInt16
nSelect
=
m_
pPreview
->
GetSelectedAddress
();
if
(
nSelect
)
{
uno
::
Sequence
<
OUString
>
aTemp
=
m_aAddressBlocks
;
...
...
@@ -418,21 +409,22 @@ const uno::Sequence< OUString >& SwSelectAddressBlockDialog::GetAddressBlocks
void
SwSelectAddressBlockDialog
::
SetSettings
(
sal_Bool
bIsCountry
,
OUString
rCountry
)
{
RadioButton
*
pActive
=
m_pNeverRB
;
if
(
bIsCountry
)
{
!
rCountry
.
isEmpty
()
?
m_aDependentRB
.
Check
()
:
m_aAlwaysRB
.
Check
()
;
m_
aCountryED
.
SetText
(
rCountry
);
pActive
=
!
rCountry
.
isEmpty
()
?
m_pDependentRB
:
m_pAlwaysRB
;
m_
pCountryED
->
SetText
(
rCountry
);
}
else
m_aNeverRB
.
Check
(
);
m_
aDeletePB
.
Enable
(
m_aAddressBlocks
.
getLength
()
>
1
);
pActive
->
Check
();
IncludeHdl_Impl
(
pActive
);
m_
pDeletePB
->
Enable
(
m_aAddressBlocks
.
getLength
()
>
1
);
}
OUString
SwSelectAddressBlockDialog
::
GetCountry
()
const
{
OUString
sRet
;
if
(
m_
aDependentRB
.
IsChecked
())
sRet
=
m_
aCountryED
.
GetText
();
if
(
m_
pDependentRB
->
IsChecked
())
sRet
=
m_
pCountryED
->
GetText
();
return
sRet
;
}
...
...
@@ -440,7 +432,7 @@ IMPL_LINK(SwSelectAddressBlockDialog, DeleteHdl_Impl, PushButton*, pButton)
{
if
(
m_aAddressBlocks
.
getLength
())
{
sal_uInt16
nSelected
=
m_
aPreview
.
GetSelectedAddress
();
sal_uInt16
nSelected
=
m_
pPreview
->
GetSelectedAddress
();
OUString
*
pAddressBlocks
=
m_aAddressBlocks
.
getArray
();
sal_Int32
nSource
=
0
;
for
(
sal_Int32
nTarget
=
0
;
nTarget
<
m_aAddressBlocks
.
getLength
()
-
1
;
nTarget
++
)
...
...
@@ -452,14 +444,14 @@ IMPL_LINK(SwSelectAddressBlockDialog, DeleteHdl_Impl, PushButton*, pButton)
m_aAddressBlocks
.
realloc
(
m_aAddressBlocks
.
getLength
()
-
1
);
if
(
m_aAddressBlocks
.
getLength
()
<=
1
)
pButton
->
Enable
(
sal_False
);
m_
aPreview
.
RemoveSelectedAddress
();
m_
pPreview
->
RemoveSelectedAddress
();
}
return
0
;
}
IMPL_LINK
(
SwSelectAddressBlockDialog
,
NewCustomizeHdl_Impl
,
PushButton
*
,
pButton
)
{
bool
bCustomize
=
pButton
==
&
m_a
CustomizePB
;
bool
bCustomize
=
pButton
==
m_p
CustomizePB
;
SwCustomizeAddressBlockDialog
::
DialogType
nType
=
bCustomize
?
SwCustomizeAddressBlockDialog
::
ADDRESSBLOCK_EDIT
:
SwCustomizeAddressBlockDialog
::
ADDRESSBLOCK_NEW
;
...
...
@@ -467,26 +459,26 @@ IMPL_LINK(SwSelectAddressBlockDialog, NewCustomizeHdl_Impl, PushButton*, pButton
new
SwCustomizeAddressBlockDialog
(
pButton
,
m_rConfig
,
nType
);
if
(
bCustomize
)
{
pDlg
->
SetAddress
(
m_aAddressBlocks
[
m_
aPreview
.
GetSelectedAddress
()]);
pDlg
->
SetAddress
(
m_aAddressBlocks
[
m_
pPreview
->
GetSelectedAddress
()]);
}
if
(
RET_OK
==
pDlg
->
Execute
())
{
if
(
bCustomize
)
{
OUString
sNew
=
pDlg
->
GetAddress
();
m_
aPreview
.
ReplaceSelectedAddress
(
sNew
);
m_aAddressBlocks
[
m_
aPreview
.
GetSelectedAddress
()]
=
sNew
;
m_
pPreview
->
ReplaceSelectedAddress
(
sNew
);
m_aAddressBlocks
[
m_
pPreview
->
GetSelectedAddress
()]
=
sNew
;
}
else
{
OUString
sNew
=
pDlg
->
GetAddress
();
m_
aPreview
.
AddAddress
(
sNew
);
m_
pPreview
->
AddAddress
(
sNew
);
m_aAddressBlocks
.
realloc
(
m_aAddressBlocks
.
getLength
()
+
1
);
sal_uInt16
nSelect
=
(
sal_uInt16
)
m_aAddressBlocks
.
getLength
()
-
1
;
m_aAddressBlocks
[
nSelect
]
=
sNew
;
m_
aPreview
.
SelectAddress
(
nSelect
);
m_
pPreview
->
SelectAddress
(
nSelect
);
}
m_
aDeletePB
.
Enable
(
m_aAddressBlocks
.
getLength
()
>
1
);
m_
pDeletePB
->
Enable
(
m_aAddressBlocks
.
getLength
()
>
1
);
}
delete
pDlg
;
return
0
;
...
...
@@ -494,7 +486,7 @@ IMPL_LINK(SwSelectAddressBlockDialog, NewCustomizeHdl_Impl, PushButton*, pButton
IMPL_LINK
(
SwSelectAddressBlockDialog
,
IncludeHdl_Impl
,
RadioButton
*
,
pButton
)
{
m_
aCountryED
.
Enable
(
&
m_a
DependentRB
==
pButton
);
m_
pCountryED
->
Enable
(
m_p
DependentRB
==
pButton
);
return
0
;
}
...
...
sw/source/ui/dbui/mmaddressblockpage.hrc
Dosyayı görüntüle @
d03ec9f3
...
...
@@ -39,15 +39,6 @@
#define FI_THIRD 18
#define FI_MATCH_FIELDS 19
#define FT_SELECT 20
#define PB_NEW 21
#define PB_DELETE 22
#define PB_CUSTOMIZE 23
#define RB_NEVER 25
#define RB_ALWAYS 26
#define RB_DEPENDENT 27
#define ED_COUNTRY 28
#define FL_SEPARATOR 29
#define PB_OK 30
#define PB_CANCEL 31
...
...
sw/source/ui/dbui/mmaddressblockpage.hxx
Dosyayı görüntüle @
d03ec9f3
...
...
@@ -98,23 +98,15 @@ public:
class
SwSelectAddressBlockDialog
:
public
SfxModalDialog
{
FixedText
m_aSelectFT
;
SwAddressPreview
m_aPreview
;
PushButton
m_aNewPB
;
PushButton
m_aCustomizePB
;
PushButton
m_aDeletePB
;
SwAddressPreview
*
m_pPreview
;
PushButton
*
m_pNewPB
;
PushButton
*
m_pCustomizePB
;
PushButton
*
m_pDeletePB
;
FixedInfo
m_aSettingsFI
;
RadioButton
m_aNeverRB
;
RadioButton
m_aAlwaysRB
;
RadioButton
m_aDependentRB
;
Edit
m_aCountryED
;
FixedLine
m_aSeparatorFL
;
OKButton
m_aOK
;
CancelButton
m_aCancel
;
HelpButton
m_aHelp
;
RadioButton
*
m_pNeverRB
;
RadioButton
*
m_pAlwaysRB
;
RadioButton
*
m_pDependentRB
;
Edit
*
m_pCountryED
;
com
::
sun
::
star
::
uno
::
Sequence
<
OUString
>
m_aAddressBlocks
;
SwMailMergeConfigItem
&
m_rConfig
;
...
...
@@ -134,7 +126,7 @@ public:
const
com
::
sun
::
star
::
uno
::
Sequence
<
OUString
>&
GetAddressBlocks
();
void
SetSettings
(
sal_Bool
bIsCountry
,
OUString
sCountry
);
sal_Bool
IsIncludeCountry
()
const
{
return
!
m_
aNeverRB
.
IsChecked
();}
sal_Bool
IsIncludeCountry
()
const
{
return
!
m_
pNeverRB
->
IsChecked
();}
OUString
GetCountry
()
const
;
};
...
...
sw/source/ui/dbui/mmaddressblockpage.src
Dosyayı görüntüle @
d03ec9f3
...
...
@@ -186,109 +186,6 @@ TabPage DLG_MM_ADDRESSBLOCK_PAGE
};
};
ModalDialog DLG_MM_SELECTADDRESSBLOCK
{
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 260 , 219 ) ;
Moveable = TRUE ;
Text [ en-US ] = "Select Address Block";
FixedText FT_SELECT
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 150 , 8 ) ;
Text[ en-US ] = "~Select your preferred address block";
};
Window WIN_PREVIEW
{
Border = TRUE;
Pos = MAP_APPFONT ( 6 , 14 ) ;
Size = MAP_APPFONT ( 192 , 100 ) ;
DialogControl = TRUE;
};
PushButton PB_NEW
{
HelpID = "sw:PushButton:DLG_MM_SELECTADDRESSBLOCK:PB_NEW";
Pos = MAP_APPFONT ( 204 , 14 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text[ en-US ] = "~New...";
};
PushButton PB_CUSTOMIZE
{
HelpID = "sw:PushButton:DLG_MM_SELECTADDRESSBLOCK:PB_CUSTOMIZE";
Pos = MAP_APPFONT ( 204 , 31 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text[ en-US ] = "~Edit...";
};
PushButton PB_DELETE
{
HelpID = "sw:PushButton:DLG_MM_SELECTADDRESSBLOCK:PB_DELETE";
Pos = MAP_APPFONT ( 204 , 48 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Group = FALSE;
Text[ en-US ] = "~Delete";
};
FixedText FI_SETTINGS
{
Pos = MAP_APPFONT ( 6 , 120 ) ;
Size = MAP_APPFONT ( 150 , 8 ) ;
Text[ en-US ] = "Address block settings";
};
RadioButton RB_NEVER
{
HelpID = "sw:RadioButton:DLG_MM_SELECTADDRESSBLOCK:RB_NEVER";
Pos = MAP_APPFONT ( 12 , 131 ) ;
Size = MAP_APPFONT ( 150 , 10 ) ;
Text[ en-US ] = "N~ever include the country/region";
};
RadioButton RB_ALWAYS
{
HelpID = "sw:RadioButton:DLG_MM_SELECTADDRESSBLOCK:RB_ALWAYS";
Pos = MAP_APPFONT ( 12 , 145 ) ;
Size = MAP_APPFONT ( 150 , 10 ) ;
Text[ en-US ] = "~Always include the country/region";
};
RadioButton RB_DEPENDENT
{
HelpID = "sw:RadioButton:DLG_MM_SELECTADDRESSBLOCK:RB_DEPENDENT";
Pos = MAP_APPFONT ( 12 , 159 ) ;
Size = MAP_APPFONT ( 150 , 10 ) ;
Text[ en-US ] = "Only ~include the country/region if it is not:";
};
Edit ED_COUNTRY
{
HelpID = "sw:Edit:DLG_MM_SELECTADDRESSBLOCK:ED_COUNTRY";
Pos = MAP_APPFONT ( 18 , 172 ) ;
Size = MAP_APPFONT ( 180 , 12 ) ;
Border = TRUE;
};
FixedLine FL_SEPARATOR
{
Pos = MAP_APPFONT ( 0 , 188 ) ;
Size = MAP_APPFONT ( 260 , 8 ) ;
};
OKButton PB_OK
{
Pos = MAP_APPFONT ( 95 , 199 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
CancelButton PB_CANCEL
{
Pos = MAP_APPFONT ( 148 , 199 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
HelpButton PB_HELP
{
Pos = MAP_APPFONT ( 204 , 199 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
};
#define WORKAROUND\
Text [ en-US ] = "New Address Block";
...
...
sw/uiconfig/swriter/ui/addressblockdialog.ui
Dosyayı görüntüle @
d03ec9f3
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires LibreOffice 1.0 -->
<!-- interface-requires gtk+ 3.0 -->
<!-- interface-requires LibreOffice 1.0 -->
<object
class=
"GtkDialog"
id=
"AddressBlockDialog"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"border_width"
>
6
</property>
...
...
sw/uiconfig/swriter/ui/selectblockdialog.ui
Dosyayı görüntüle @
d03ec9f3
This diff is collapsed.
Click to expand it.
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