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
2a504a24
Kaydet (Commit)
2a504a24
authored
Eki 13, 2016
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
loplugin:mergeclasse merge ScCbWarningBox with ScReplaceWarnBo
Change-Id: I7b55b036c1992b88b01b51053a3560e9f97986c9
üst
0f67b862
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
56 deletions
+16
-56
mergeclasses.results
compilerplugins/clang/mergeclasses.results
+0
-1
warnbox.hxx
sc/source/ui/inc/warnbox.hxx
+4
-21
warnbox.cxx
sc/source/ui/miscdlgs/warnbox.cxx
+12
-34
No files found.
compilerplugins/clang/mergeclasses.results
Dosyayı görüntüle @
2a504a24
...
...
@@ -92,7 +92,6 @@ merge SalPrinter with PspSalPrinter
merge SalSession with (anonymous namespace)::IceSalSession
merge SalSystem with SalGenericSystem
merge ScBiffReader with ScQProReader
merge ScCbWarningBox with ScReplaceWarnBox
merge ScDBFunc with ScTabViewShell
merge ScDPCache::DBConnector with (anonymous namespace)::DBConnector
merge ScDocFunc with ScDocFuncDirect
...
...
sc/source/ui/inc/warnbox.hxx
Dosyayı görüntüle @
2a504a24
...
...
@@ -22,34 +22,17 @@
#include <vcl/msgbox.hxx>
/** Message box with warning image and "Do not show again" checkbox. */
class
ScCbWarningBox
:
public
WarningBox
/** Warning box for "Replace cell contents?".
With warning image and "Do not show again" checkbox. */
class
ScReplaceWarnBox
:
public
WarningBox
{
public
:
/** @param rMsgStr Resource ID for the message text. */
ScCbWarningBox
(
vcl
::
Window
*
pParent
,
const
OUString
&
rMsgStr
);
ScReplaceWarnBox
(
vcl
::
Window
*
pParent
);
/** Opens dialog if IsDialogEnabled() returns true.
@descr If after executing the dialog the checkbox "Do not show again" is set,
the method DisableDialog() will be called. */
virtual
sal_Int16
Execute
()
override
;
/** Called before executing the dialog. If this method returns false, the dialog will not be opened. */
virtual
bool
IsDialogEnabled
();
/** Called, when dialog is exited and the option "Do not show again" is set. */
virtual
void
DisableDialog
();
};
/** Warning box for "Replace cell contents?". */
class
ScReplaceWarnBox
:
public
ScCbWarningBox
{
public
:
ScReplaceWarnBox
(
vcl
::
Window
*
pParent
);
/** Reads the configuration key "ReplaceCellsWarning". */
virtual
bool
IsDialogEnabled
()
override
;
/** Sets the configuration key "ReplaceCellsWarning" to false. */
virtual
void
DisableDialog
()
override
;
};
#endif
...
...
sc/source/ui/miscdlgs/warnbox.cxx
Dosyayı görüntüle @
2a504a24
...
...
@@ -24,53 +24,31 @@
#include "scresid.hxx"
#include "sc.hrc"
Sc
CbWarningBox
::
ScCbWarningBox
(
vcl
::
Window
*
pParent
,
const
OUString
&
rMsgStr
)
:
WarningBox
(
pParent
,
WB_YES_NO
|
WB_DEF_YES
,
rMsgStr
)
Sc
ReplaceWarnBox
::
ScReplaceWarnBox
(
vcl
::
Window
*
pParent
)
:
WarningBox
(
pParent
,
WB_YES_NO
|
WB_DEF_YES
,
OUString
(
ScResId
(
STR_REPLCELLSWARN
)
)
)
{
// By default, the check box is ON, and the user needs to un-check it to
// disable all future warnings.
SetCheckBoxState
(
true
);
SetCheckBoxText
(
ScResId
(
SCSTR_WARN_ME_IN_FUTURE_CHECK
));
SetHelpId
(
HID_SC_REPLCELLSWARN
);
}
sal_Int16
Sc
CbWarning
Box
::
Execute
()
sal_Int16
Sc
ReplaceWarn
Box
::
Execute
()
{
sal_Int16
nRet
=
(
GetStyle
()
&
WB_DEF_YES
)
?
RET_YES
:
RET_NO
;
if
(
IsDialogEnabled
()
)
sal_Int16
nRet
=
RET_YES
;
if
(
(
bool
)
SC_MOD
()
->
GetInputOptions
().
GetReplaceCellsWarn
()
)
{
nRet
=
WarningBox
::
Execute
();
if
(
!
GetCheckBoxState
())
DisableDialog
();
{
ScModule
*
pScMod
=
SC_MOD
();
ScInputOptions
aInputOpt
(
pScMod
->
GetInputOptions
()
);
aInputOpt
.
SetReplaceCellsWarn
(
false
);
pScMod
->
SetInputOptions
(
aInputOpt
);
}
}
return
nRet
;
}
bool
ScCbWarningBox
::
IsDialogEnabled
()
{
return
true
;
}
void
ScCbWarningBox
::
DisableDialog
()
{
}
ScReplaceWarnBox
::
ScReplaceWarnBox
(
vcl
::
Window
*
pParent
)
:
ScCbWarningBox
(
pParent
,
OUString
(
ScResId
(
STR_REPLCELLSWARN
)
)
)
{
SetHelpId
(
HID_SC_REPLCELLSWARN
);
}
bool
ScReplaceWarnBox
::
IsDialogEnabled
()
{
return
(
bool
)
SC_MOD
()
->
GetInputOptions
().
GetReplaceCellsWarn
();
}
void
ScReplaceWarnBox
::
DisableDialog
()
{
ScModule
*
pScMod
=
SC_MOD
();
ScInputOptions
aInputOpt
(
pScMod
->
GetInputOptions
()
);
aInputOpt
.
SetReplaceCellsWarn
(
false
);
pScMod
->
SetInputOptions
(
aInputOpt
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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