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
b2d08d75
Kaydet (Commit)
b2d08d75
authored
May 28, 2013
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert more queryboxes to new message box replacement
Change-Id: Ice41a86e17d5cbee784e239224b640ea4378ac36
üst
d4116a4f
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
217 additions
and
59 deletions
+217
-59
dialogs.hrc
include/svx/dialogs.hrc
+0
-3
hdft.hxx
include/svx/hdft.hxx
+22
-2
layout.hxx
include/vcl/layout.hxx
+16
-1
vclenum.hxx
include/vcl/vclenum.hxx
+4
-0
AllLangResTarget_svx.mk
svx/AllLangResTarget_svx.mk
+0
-1
UIConfig_svx.mk
svx/UIConfig_svx.mk
+2
-0
hdft.cxx
svx/source/dialog/hdft.cxx
+8
-1
hdft.src
svx/source/dialog/hdft.src
+0
-29
deletefooterdialog.ui
svx/uiconfig/ui/deletefooterdialog.ui
+34
-0
deleteheaderdialog.ui
svx/uiconfig/ui/deleteheaderdialog.ui
+34
-0
wrtsh1.cxx
sw/source/ui/wrtsh/wrtsh1.cxx
+8
-3
layout.cxx
vcl/source/window/layout.cxx
+89
-19
No files found.
include/svx/dialogs.hrc
Dosyayı görüntüle @
b2d08d75
...
@@ -155,9 +155,6 @@
...
@@ -155,9 +155,6 @@
//---------------------------------------------------------------------
//---------------------------------------------------------------------
// ResId fuer die PageDialog
#define RID_SVXQBX_DELETE_HEADFOOT (RID_SVX_START + 28)
// ResId's fuer Dialoge aus StarDraw
// ResId's fuer Dialoge aus StarDraw
#define RID_SVXSW_FRAMEPOSITIONS (RID_SVX_START + 289)
#define RID_SVXSW_FRAMEPOSITIONS (RID_SVX_START + 289)
...
...
include/svx/hdft.hxx
Dosyayı görüntüle @
b2d08d75
...
@@ -22,10 +22,10 @@
...
@@ -22,10 +22,10 @@
#include <sfx2/tabdlg.hxx>
#include <sfx2/tabdlg.hxx>
#include <vcl/fixed.hxx>
#include <vcl/fixed.hxx>
#include <vcl/field.hxx>
#include <vcl/field.hxx>
#include <vcl/group.hxx>
#include <vcl/group.hxx>
#include <vcl/layout.hxx>
#include <svx/pagectrl.hxx>
#include <svx/pagectrl.hxx>
#include "svx/svxdllapi.h"
#include "svx/svxdllapi.h"
...
@@ -120,6 +120,26 @@ private:
...
@@ -120,6 +120,26 @@ private:
SVX_DLLPRIVATE
SvxFooterPage
(
Window
*
pParent
,
const
SfxItemSet
&
rSet
);
SVX_DLLPRIVATE
SvxFooterPage
(
Window
*
pParent
,
const
SfxItemSet
&
rSet
);
};
};
class
SVX_DLLPUBLIC
DeleteHeaderDialog
:
public
MessageDialog
{
public
:
DeleteHeaderDialog
(
Window
*
pParent
)
:
MessageDialog
(
pParent
,
"DeleteHeaderDialog"
,
"svx/ui/deleteheaderdialog.ui"
)
{
}
};
class
SVX_DLLPUBLIC
DeleteFooterDialog
:
public
MessageDialog
{
public
:
DeleteFooterDialog
(
Window
*
pParent
)
:
MessageDialog
(
pParent
,
"DeleteFooterDialog"
,
"svx/ui/deletefooterdialog.ui"
)
{
}
};
#endif
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
include/vcl/layout.hxx
Dosyayı görüntüle @
b2d08d75
...
@@ -647,18 +647,33 @@ public:
...
@@ -647,18 +647,33 @@ public:
bool
set_property
(
const
OString
&
rKey
,
const
OString
&
rValue
);
bool
set_property
(
const
OString
&
rKey
,
const
OString
&
rValue
);
};
};
enum
VclButtonsType
{
VCL_BUTTONS_NONE
,
VCL_BUTTONS_OK
,
VCL_BUTTONS_CLOSE
,
VCL_BUTTONS_CANCEL
,
VCL_BUTTONS_YES_NO
,
VCL_BUTTONS_OK_CANCEL
};
class
VCL_DLLPUBLIC
MessageDialog
:
public
Dialog
class
VCL_DLLPUBLIC
MessageDialog
:
public
Dialog
{
{
private
:
private
:
VclButtonsType
m_eType
;
VclGrid
*
m_pGrid
;
VclGrid
*
m_pGrid
;
FixedImage
*
m_pImage
;
FixedImage
*
m_pImage
;
VclMultiLineEdit
*
m_pPrimaryMessage
;
VclMultiLineEdit
*
m_pPrimaryMessage
;
VclMultiLineEdit
*
m_pSecondaryMessage
;
VclMultiLineEdit
*
m_pSecondaryMessage
;
std
::
vector
<
PushButton
*>
m_aOwnedButtons
;
std
::
map
<
const
Window
*
,
short
>
m_aResponses
;
OUString
m_sPrimaryString
;
OUString
m_sPrimaryString
;
OUString
m_sSecondaryString
;
OUString
m_sSecondaryString
;
DECL_DLLPRIVATE_LINK
(
ButtonHdl
,
Button
*
);
DECL_DLLPRIVATE_LINK
(
ButtonHdl
,
Button
*
);
void
setButtonHandlers
();
void
setButtonHandlers
(
VclButtonBox
*
pButtonBox
);
short
get_response
(
const
Window
*
pWindow
)
const
;
public
:
public
:
MessageDialog
(
Window
*
pParent
,
WinBits
nStyle
);
MessageDialog
(
Window
*
pParent
,
WinBits
nStyle
);
MessageDialog
(
Window
*
pParent
,
const
OString
&
rID
,
const
OUString
&
rUIXMLDescription
);
MessageDialog
(
Window
*
pParent
,
const
OString
&
rID
,
const
OUString
&
rUIXMLDescription
);
virtual
bool
set_property
(
const
OString
&
rKey
,
const
OString
&
rValue
);
virtual
bool
set_property
(
const
OString
&
rKey
,
const
OString
&
rValue
);
...
...
include/vcl/vclenum.hxx
Dosyayı görüntüle @
b2d08d75
...
@@ -143,6 +143,10 @@ enum VclResponseType
...
@@ -143,6 +143,10 @@ enum VclResponseType
RET_NO
=
3
,
RET_NO
=
3
,
RET_RETRY
=
4
,
RET_RETRY
=
4
,
RET_IGNORE
=
5
,
RET_IGNORE
=
5
,
RET_ACCEPT
=
6
,
RET_CLOSE
=
7
,
RET_APPLY
=
8
,
RET_NONE
=
9
,
RET_HELP
=
10
RET_HELP
=
10
};
};
...
...
svx/AllLangResTarget_svx.mk
Dosyayı görüntüle @
b2d08d75
...
@@ -45,7 +45,6 @@ $(eval $(call gb_SrsTarget_add_files,svx/res,\
...
@@ -45,7 +45,6 @@ $(eval $(call gb_SrsTarget_add_files,svx/res,\
svx/source/dialog/docrecovery.src \
svx/source/dialog/docrecovery.src \
svx/source/dialog/fontwork.src \
svx/source/dialog/fontwork.src \
svx/source/dialog/frmsel.src \
svx/source/dialog/frmsel.src \
svx/source/dialog/hdft.src \
svx/source/dialog/imapdlg.src \
svx/source/dialog/imapdlg.src \
svx/source/dialog/langbox.src \
svx/source/dialog/langbox.src \
svx/source/dialog/language.src \
svx/source/dialog/language.src \
...
...
svx/UIConfig_svx.mk
Dosyayı görüntüle @
b2d08d75
...
@@ -14,6 +14,8 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
...
@@ -14,6 +14,8 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/asianphoneticguidedialog \
svx/uiconfig/ui/asianphoneticguidedialog \
svx/uiconfig/ui/chineseconversiondialog \
svx/uiconfig/ui/chineseconversiondialog \
svx/uiconfig/ui/compressgraphicdialog \
svx/uiconfig/ui/compressgraphicdialog \
svx/uiconfig/ui/deleteheaderdialog \
svx/uiconfig/ui/deletefooterdialog \
svx/uiconfig/ui/headfootformatpage \
svx/uiconfig/ui/headfootformatpage \
svx/uiconfig/ui/findreplacedialog \
svx/uiconfig/ui/findreplacedialog \
svx/uiconfig/ui/redlinecontrol \
svx/uiconfig/ui/redlinecontrol \
...
...
svx/source/dialog/hdft.cxx
Dosyayı görüntüle @
b2d08d75
...
@@ -485,7 +485,14 @@ IMPL_LINK( SvxHFPage, TurnOnHdl, CheckBox *, pBox )
...
@@ -485,7 +485,14 @@ IMPL_LINK( SvxHFPage, TurnOnHdl, CheckBox *, pBox )
bool
bDelete
=
true
;
bool
bDelete
=
true
;
if
(
!
bDisableQueryBox
&&
pBox
&&
m_pTurnOnBox
->
GetSavedValue
()
==
sal_True
)
if
(
!
bDisableQueryBox
&&
pBox
&&
m_pTurnOnBox
->
GetSavedValue
()
==
sal_True
)
bDelete
=
(
QueryBox
(
this
,
SVX_RES
(
RID_SVXQBX_DELETE_HEADFOOT
)
).
Execute
()
==
RET_YES
);
{
short
nResult
;
if
(
nId
==
SID_ATTR_PAGE_HEADERSET
)
nResult
=
DeleteHeaderDialog
(
this
).
Execute
();
else
nResult
=
DeleteFooterDialog
(
this
).
Execute
();
bDelete
=
nResult
==
RET_YES
;
}
if
(
bDelete
)
if
(
bDelete
)
{
{
...
...
svx/source/dialog/hdft.src
deleted
100644 → 0
Dosyayı görüntüle @
d4116a4f
/* -*- 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 <svx/dialogs.hrc>
QueryBox RID_SVXQBX_DELETE_HEADFOOT
{
Buttons = WB_YES_NO ;
DefButton = WB_DEF_NO ;
Message [ en-US ] = "Removing headers or footers deletes the contents.\nDo you want to delete this text?" ;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
svx/uiconfig/ui/deletefooterdialog.ui
0 → 100644
Dosyayı görüntüle @
b2d08d75
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object
class=
"GtkMessageDialog"
id=
"DeleteFooterDialog"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"border_width"
>
12
</property>
<property
name=
"title"
translatable=
"yes"
>
Delete footer
</property>
<property
name=
"type_hint"
>
dialog
</property>
<property
name=
"skip_taskbar_hint"
>
True
</property>
<property
name=
"message_type"
>
warning
</property>
<property
name=
"buttons"
>
yes-no
</property>
<property
name=
"text"
translatable=
"yes"
>
Are you sure you want to delete the footer?
</property>
<property
name=
"secondary_text"
translatable=
"yes"
>
All contents of the footer will be deleted and can not be restored.
</property>
<child
internal-child=
"vbox"
>
<object
class=
"GtkBox"
id=
"messagedialog-vbox"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"orientation"
>
vertical
</property>
<property
name=
"spacing"
>
24
</property>
<child
internal-child=
"action_area"
>
<object
class=
"GtkButtonBox"
id=
"messagedialog-action_area"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"layout_style"
>
end
</property>
</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>
</object>
</child>
</object>
</interface>
svx/uiconfig/ui/deleteheaderdialog.ui
0 → 100644
Dosyayı görüntüle @
b2d08d75
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object
class=
"GtkMessageDialog"
id=
"DeleteHeaderDialog"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"border_width"
>
12
</property>
<property
name=
"title"
translatable=
"yes"
>
Delete header
</property>
<property
name=
"type_hint"
>
dialog
</property>
<property
name=
"skip_taskbar_hint"
>
True
</property>
<property
name=
"message_type"
>
warning
</property>
<property
name=
"buttons"
>
yes-no
</property>
<property
name=
"text"
translatable=
"yes"
>
Are you sure you want to delete the header?
</property>
<property
name=
"secondary_text"
translatable=
"yes"
>
All contents of the header will be deleted and can not be restored.
</property>
<child
internal-child=
"vbox"
>
<object
class=
"GtkBox"
id=
"messagedialog-vbox"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"orientation"
>
vertical
</property>
<property
name=
"spacing"
>
24
</property>
<child
internal-child=
"action_area"
>
<object
class=
"GtkButtonBox"
id=
"messagedialog-action_area"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"layout_style"
>
end
</property>
</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>
</object>
</child>
</object>
</interface>
sw/source/ui/wrtsh/wrtsh1.cxx
Dosyayı görüntüle @
b2d08d75
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#include <math.h>
#include <math.h>
#include <hintids.hxx>
#include <hintids.hxx>
#include <svx/hdft.hxx>
#include <svx/svdview.hxx>
#include <svx/svdview.hxx>
#include <sot/factory.hxx>
#include <sot/factory.hxx>
#include <svl/itemiter.hxx>
#include <svl/itemiter.hxx>
...
@@ -1754,9 +1755,13 @@ void SwWrtShell::ChangeHeaderOrFooter(
...
@@ -1754,9 +1755,13 @@ void SwWrtShell::ChangeHeaderOrFooter(
EndAllAction
();
EndAllAction
();
Window
*
pParent
=
&
GetView
().
GetViewFrame
()
->
GetWindow
();
Window
*
pParent
=
&
GetView
().
GetViewFrame
()
->
GetWindow
();
bool
bRet
=
RET_YES
==
QueryBox
(
pParent
,
ResId
(
RID_SVXQBX_DELETE_HEADFOOT
,
short
nResult
;
DIALOG_MGR
()
)
).
Execute
();
if
(
bHeader
)
bExecute
=
bRet
;
nResult
=
DeleteHeaderDialog
(
pParent
).
Execute
();
else
nResult
=
DeleteFooterDialog
(
pParent
).
Execute
();
bExecute
=
nResult
==
RET_YES
;
StartAllAction
();
StartAllAction
();
}
}
if
(
bExecute
)
if
(
bExecute
)
...
...
vcl/source/window/layout.cxx
Dosyayı görüntüle @
b2d08d75
...
@@ -1672,6 +1672,7 @@ bool VclSizeGroup::set_property(const OString &rKey, const OString &rValue)
...
@@ -1672,6 +1672,7 @@ bool VclSizeGroup::set_property(const OString &rKey, const OString &rValue)
MessageDialog
::
MessageDialog
(
Window
*
pParent
,
WinBits
nStyle
)
MessageDialog
::
MessageDialog
(
Window
*
pParent
,
WinBits
nStyle
)
:
Dialog
(
pParent
,
nStyle
)
:
Dialog
(
pParent
,
nStyle
)
,
m_eType
(
VCL_BUTTONS_NONE
)
,
m_pGrid
(
NULL
)
,
m_pGrid
(
NULL
)
,
m_pImage
(
NULL
)
,
m_pImage
(
NULL
)
,
m_pPrimaryMessage
(
NULL
)
,
m_pPrimaryMessage
(
NULL
)
...
@@ -1682,6 +1683,7 @@ MessageDialog::MessageDialog(Window* pParent, WinBits nStyle)
...
@@ -1682,6 +1683,7 @@ MessageDialog::MessageDialog(Window* pParent, WinBits nStyle)
MessageDialog
::
MessageDialog
(
Window
*
pParent
,
const
OString
&
rID
,
const
OUString
&
rUIXMLDescription
)
MessageDialog
::
MessageDialog
(
Window
*
pParent
,
const
OString
&
rID
,
const
OUString
&
rUIXMLDescription
)
:
Dialog
(
pParent
,
rID
,
rUIXMLDescription
,
WINDOW_MESSBOX
)
:
Dialog
(
pParent
,
rID
,
rUIXMLDescription
,
WINDOW_MESSBOX
)
,
m_eType
(
VCL_BUTTONS_NONE
)
,
m_pGrid
(
NULL
)
,
m_pGrid
(
NULL
)
,
m_pImage
(
NULL
)
,
m_pImage
(
NULL
)
,
m_pPrimaryMessage
(
NULL
)
,
m_pPrimaryMessage
(
NULL
)
...
@@ -1691,6 +1693,8 @@ MessageDialog::MessageDialog(Window* pParent, const OString& rID, const OUString
...
@@ -1691,6 +1693,8 @@ MessageDialog::MessageDialog(Window* pParent, const OString& rID, const OUString
MessageDialog
::~
MessageDialog
()
MessageDialog
::~
MessageDialog
()
{
{
for
(
size_t
i
=
0
;
i
<
m_aOwnedButtons
.
size
();
++
i
)
delete
m_aOwnedButtons
[
i
];
delete
m_pSecondaryMessage
;
delete
m_pSecondaryMessage
;
delete
m_pPrimaryMessage
;
delete
m_pPrimaryMessage
;
delete
m_pImage
;
delete
m_pImage
;
...
@@ -1699,19 +1703,20 @@ MessageDialog::~MessageDialog()
...
@@ -1699,19 +1703,20 @@ MessageDialog::~MessageDialog()
IMPL_LINK
(
MessageDialog
,
ButtonHdl
,
Button
*
,
pButton
)
IMPL_LINK
(
MessageDialog
,
ButtonHdl
,
Button
*
,
pButton
)
{
{
//for now insist that we have a builder, we can relax that in
EndDialog
(
get_response
(
pButton
));
//the future if we need it
assert
(
m_pUIBuilder
);
EndDialog
(
m_pUIBuilder
->
get_response
(
pButton
));
return
0
;
return
0
;
}
}
void
MessageDialog
::
setButtonHandlers
()
short
MessageDialog
::
get_response
(
const
Window
*
pWindow
)
const
{
std
::
map
<
const
Window
*
,
short
>::
const_iterator
aFind
=
m_aResponses
.
find
(
pWindow
);
if
(
aFind
!=
m_aResponses
.
end
())
return
aFind
->
second
;
return
m_pUIBuilder
->
get_response
(
pWindow
);
}
void
MessageDialog
::
setButtonHandlers
(
VclButtonBox
*
pButtonBox
)
{
{
SAL_WARN_IF
(
!
m_pUIBuilder
,
"vcl.layout"
,
"MessageDialog non-ui load button responses not implemented yet"
);
if
(
!
m_pUIBuilder
)
return
;
VclButtonBox
*
pButtonBox
=
get_action_area
();
assert
(
pButtonBox
);
assert
(
pButtonBox
);
for
(
Window
*
pChild
=
pButtonBox
->
GetWindow
(
WINDOW_FIRSTCHILD
);
pChild
;
for
(
Window
*
pChild
=
pButtonBox
->
GetWindow
(
WINDOW_FIRSTCHILD
);
pChild
;
pChild
=
pChild
->
GetWindow
(
WINDOW_NEXT
))
pChild
=
pChild
->
GetWindow
(
WINDOW_NEXT
))
...
@@ -1724,17 +1729,16 @@ void MessageDialog::setButtonHandlers()
...
@@ -1724,17 +1729,16 @@ void MessageDialog::setButtonHandlers()
pButton
->
SetClickHdl
(
LINK
(
this
,
MessageDialog
,
ButtonHdl
));
pButton
->
SetClickHdl
(
LINK
(
this
,
MessageDialog
,
ButtonHdl
));
break
;
break
;
}
}
//for now at least, insist that the response ids match
//insist that the response ids match the default actions for those
//the default actions for those widgets, and leave
//widgets, and leave their default handlers in place
//their default handlers in place
case
WINDOW_OKBUTTON
:
case
WINDOW_OKBUTTON
:
assert
(
m_pUIBuilder
->
get_response
(
pChild
)
==
RET_OK
);
assert
(
get_response
(
pChild
)
==
RET_OK
);
break
;
break
;
case
WINDOW_CANCELBUTTON
:
case
WINDOW_CANCELBUTTON
:
assert
(
m_pUIBuilder
->
get_response
(
pChild
)
==
RET_CANCEL
);
assert
(
get_response
(
pChild
)
==
RET_CANCEL
);
break
;
break
;
case
WINDOW_HELPBUTTON
:
case
WINDOW_HELPBUTTON
:
assert
(
m_pUIBuilder
->
get_response
(
pChild
)
==
RET_HELP
);
assert
(
get_response
(
pChild
)
==
RET_HELP
);
break
;
break
;
default
:
default
:
SAL_WARN
(
"vcl.layout"
,
"The type of widget "
<<
SAL_WARN
(
"vcl.layout"
,
"The type of widget "
<<
...
@@ -1793,13 +1797,58 @@ short MessageDialog::Execute()
...
@@ -1793,13 +1797,58 @@ short MessageDialog::Execute()
m_pSecondaryMessage
->
SetText
(
m_sSecondaryString
);
m_pSecondaryMessage
->
SetText
(
m_sSecondaryString
);
m_pSecondaryMessage
->
Show
(
!
m_sSecondaryString
.
isEmpty
());
m_pSecondaryMessage
->
Show
(
!
m_sSecondaryString
.
isEmpty
());
m_pGrid
->
Show
();
setButtonHandlers
();
VclButtonBox
*
pButtonBox
=
get_action_area
();
VclButtonBox
*
pButtonBox
=
get_action_area
();
assert
(
pButtonBox
);
assert
(
pButtonBox
);
PushButton
*
pBtn
;
switch
(
m_eType
)
{
case
VCL_BUTTONS_NONE
:
break
;
case
VCL_BUTTONS_OK
:
pBtn
=
new
OKButton
(
pButtonBox
);
pBtn
->
Show
();
m_aOwnedButtons
.
push_back
(
pBtn
);
m_aResponses
[
pBtn
]
=
RET_OK
;
break
;
case
VCL_BUTTONS_CLOSE
:
pBtn
=
new
CloseButton
(
pButtonBox
);
pBtn
->
Show
();
m_aOwnedButtons
.
push_back
(
pBtn
);
m_aResponses
[
pBtn
]
=
RET_CLOSE
;
break
;
case
VCL_BUTTONS_CANCEL
:
pBtn
=
new
CancelButton
(
pButtonBox
);
m_aOwnedButtons
.
push_back
(
pBtn
);
m_aResponses
[
pBtn
]
=
RET_CANCEL
;
break
;
case
VCL_BUTTONS_YES_NO
:
pBtn
=
new
PushButton
(
pButtonBox
);
pBtn
->
SetText
(
Button
::
GetStandardText
(
BUTTON_YES
));
pBtn
->
Show
();
m_aOwnedButtons
.
push_back
(
pBtn
);
m_aResponses
[
pBtn
]
=
RET_YES
;
pBtn
=
new
PushButton
(
pButtonBox
);
pBtn
->
SetText
(
Button
::
GetStandardText
(
BUTTON_NO
));
pBtn
->
Show
();
m_aOwnedButtons
.
push_back
(
pBtn
);
m_aResponses
[
pBtn
]
=
RET_NO
;
break
;
case
VCL_BUTTONS_OK_CANCEL
:
pBtn
=
new
OKButton
(
pButtonBox
);
pBtn
->
Show
();
m_aOwnedButtons
.
push_back
(
pBtn
);
m_aResponses
[
pBtn
]
=
RET_OK
;
pBtn
=
new
CancelButton
(
pButtonBox
);
pBtn
->
Show
();
m_aOwnedButtons
.
push_back
(
pBtn
);
m_aResponses
[
pBtn
]
=
RET_CANCEL
;
break
;
}
setButtonHandlers
(
pButtonBox
);
pButtonBox
->
sort_native_button_order
();
pButtonBox
->
sort_native_button_order
();
m_pGrid
->
Show
();
}
}
return
Dialog
::
Execute
();
return
Dialog
::
Execute
();
...
@@ -1825,6 +1874,27 @@ bool MessageDialog::set_property(const OString &rKey, const OString &rValue)
...
@@ -1825,6 +1874,27 @@ bool MessageDialog::set_property(const OString &rKey, const OString &rValue)
set_primary_text
(
OStringToOUString
(
rValue
,
RTL_TEXTENCODING_UTF8
));
set_primary_text
(
OStringToOUString
(
rValue
,
RTL_TEXTENCODING_UTF8
));
else
if
(
rKey
==
"secondary-text"
)
else
if
(
rKey
==
"secondary-text"
)
set_secondary_text
(
OStringToOUString
(
rValue
,
RTL_TEXTENCODING_UTF8
));
set_secondary_text
(
OStringToOUString
(
rValue
,
RTL_TEXTENCODING_UTF8
));
else
if
(
rKey
==
"buttons"
)
{
VclButtonsType
eMode
=
VCL_BUTTONS_NONE
;
if
(
rValue
.
equals
(
"none"
))
eMode
=
VCL_BUTTONS_NONE
;
else
if
(
rValue
.
equals
(
"ok"
))
eMode
=
VCL_BUTTONS_OK
;
else
if
(
rValue
.
equals
(
"cancel"
))
eMode
=
VCL_BUTTONS_CANCEL
;
else
if
(
rValue
.
equals
(
"close"
))
eMode
=
VCL_BUTTONS_CLOSE
;
else
if
(
rValue
.
equals
(
"yes-no"
))
eMode
=
VCL_BUTTONS_YES_NO
;
else
if
(
rValue
.
equals
(
"ok-cancel"
))
eMode
=
VCL_BUTTONS_OK_CANCEL
;
else
{
SAL_WARN
(
"vcl.layout"
,
"unknown buttons type mode"
<<
rValue
.
getStr
());
}
m_eType
=
eMode
;
}
else
else
return
Dialog
::
set_property
(
rKey
,
rValue
);
return
Dialog
::
set_property
(
rKey
,
rValue
);
return
true
;
return
true
;
...
...
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