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
c080641d
Kaydet (Commit)
c080641d
authored
Kas 18, 2014
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#76868 Add chi-square test Statistics Dialog
Change-Id: I35c115a1f1cb733a0d6841596d8baf2e5ade4a1d
üst
5c339be4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
195 additions
and
1 deletion
+195
-1
CalcCommands.xcu
...g/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+8
-0
Library_sc.mk
sc/Library_sc.mk
+1
-0
UIConfig_scalc.mk
sc/UIConfig_scalc.mk
+1
-0
sc.hrc
sc/inc/sc.hrc
+2
-1
cellsh.sdi
sc/sdi/cellsh.sdi
+1
-0
scalc.sdi
sc/sdi/scalc.sdi
+24
-0
ChiSquareTestDialog.cxx
sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx
+97
-0
scdll.cxx
sc/source/ui/app/scdll.cxx
+1
-0
ChiSquareTestDialog.hxx
sc/source/ui/inc/ChiSquareTestDialog.hxx
+34
-0
reffact.hxx
sc/source/ui/inc/reffact.hxx
+7
-0
cellsh1.cxx
sc/source/ui/view/cellsh1.cxx
+10
-0
tabvwsh.cxx
sc/source/ui/view/tabvwsh.cxx
+1
-0
tabvwshc.cxx
sc/source/ui/view/tabvwshc.cxx
+7
-0
menubar.xml
sc/uiconfig/scalc/menubar/menubar.xml
+1
-0
chisquaretestdialog.ui
sc/uiconfig/scalc/ui/chisquaretestdialog.ui
+0
-0
No files found.
officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
Dosyayı görüntüle @
c080641d
...
@@ -755,6 +755,14 @@
...
@@ -755,6 +755,14 @@
<value>
1
</value>
<value>
1
</value>
</prop>
</prop>
</node>
</node>
<node
oor:name=
".uno:ChiSquareTestDialog"
oor:op=
"replace"
>
<prop
oor:name=
"Label"
oor:type=
"xs:string"
>
<value
xml:lang=
"en-US"
>
~Chi-square Test...
</value>
</prop>
<prop
oor:name=
"Properties"
oor:type=
"xs:int"
>
<value>
1
</value>
</prop>
</node>
<node
oor:name=
".uno:EditHeaderAndFooter"
oor:op=
"replace"
>
<node
oor:name=
".uno:EditHeaderAndFooter"
oor:op=
"replace"
>
<prop
oor:name=
"Label"
oor:type=
"xs:string"
>
<prop
oor:name=
"Label"
oor:type=
"xs:string"
>
<value
xml:lang=
"en-US"
>
~Headers
&
Footers...
</value>
<value
xml:lang=
"en-US"
>
~Headers
&
Footers...
</value>
...
...
sc/Library_sc.mk
Dosyayı görüntüle @
c080641d
...
@@ -495,6 +495,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
...
@@ -495,6 +495,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog \
sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog \
sc/source/ui/StatisticsDialogs/CorrelationDialog \
sc/source/ui/StatisticsDialogs/CorrelationDialog \
sc/source/ui/StatisticsDialogs/CovarianceDialog \
sc/source/ui/StatisticsDialogs/CovarianceDialog \
sc/source/ui/StatisticsDialogs/ChiSquareTestDialog \
sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog \
sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog \
sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog \
sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog \
sc/source/ui/StatisticsDialogs/FTestDialog \
sc/source/ui/StatisticsDialogs/FTestDialog \
...
...
sc/UIConfig_scalc.mk
Dosyayı görüntüle @
c080641d
...
@@ -67,6 +67,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
...
@@ -67,6 +67,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/cellprotectionpage \
sc/uiconfig/scalc/ui/cellprotectionpage \
sc/uiconfig/scalc/ui/changesourcedialog \
sc/uiconfig/scalc/ui/changesourcedialog \
sc/uiconfig/scalc/ui/chardialog \
sc/uiconfig/scalc/ui/chardialog \
sc/uiconfig/scalc/ui/chisquaretestdialog \
sc/uiconfig/scalc/ui/colorrowdialog \
sc/uiconfig/scalc/ui/colorrowdialog \
sc/uiconfig/scalc/ui/colwidthdialog \
sc/uiconfig/scalc/ui/colwidthdialog \
sc/uiconfig/scalc/ui/condformatmanager \
sc/uiconfig/scalc/ui/condformatmanager \
...
...
sc/inc/sc.hrc
Dosyayı görüntüle @
c080641d
...
@@ -272,7 +272,8 @@
...
@@ -272,7 +272,8 @@
#define SID_TTEST_DIALOG (SC_MESSAGE_START + 78)
#define SID_TTEST_DIALOG (SC_MESSAGE_START + 78)
#define SID_FTEST_DIALOG (SC_MESSAGE_START + 79)
#define SID_FTEST_DIALOG (SC_MESSAGE_START + 79)
#define SID_ZTEST_DIALOG (SC_MESSAGE_START + 80)
#define SID_ZTEST_DIALOG (SC_MESSAGE_START + 80)
#define SID_SEARCH_RESULTS_DIALOG (SC_MESSAGE_START + 81)
#define SID_CHI_SQUARE_TEST_DIALOG (SC_MESSAGE_START + 81)
#define SID_SEARCH_RESULTS_DIALOG (SC_MESSAGE_START + 82)
// functions
// functions
...
...
sc/sdi/cellsh.sdi
Dosyayı görüntüle @
c080641d
...
@@ -162,6 +162,7 @@ interface CellSelection
...
@@ -162,6 +162,7 @@ interface CellSelection
SID_TTEST_DIALOG [ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ]
SID_TTEST_DIALOG [ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ]
SID_FTEST_DIALOG [ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ]
SID_FTEST_DIALOG [ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ]
SID_ZTEST_DIALOG [ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ]
SID_ZTEST_DIALOG [ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ]
SID_CHI_SQUARE_TEST_DIALOG [ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ]
SID_SEARCH_RESULTS_DIALOG [ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ]
SID_SEARCH_RESULTS_DIALOG [ ExecMethod = ExecuteEdit; StateMethod = GetBlockState; ]
SID_MARKDATAAREA [ ExecMethod = ExecuteMove; StateMethod = GetStateCursor; ]
SID_MARKDATAAREA [ ExecMethod = ExecuteMove; StateMethod = GetStateCursor; ]
SID_MARKARRAYFORMULA [ ExecMethod = ExecuteMove; StateMethod = GetStateCursor; ]
SID_MARKARRAYFORMULA [ ExecMethod = ExecuteMove; StateMethod = GetStateCursor; ]
...
...
sc/sdi/scalc.sdi
Dosyayı görüntüle @
c080641d
...
@@ -3231,6 +3231,30 @@ SfxVoidItem ZTestDialog SID_ZTEST_DIALOG
...
@@ -3231,6 +3231,30 @@ SfxVoidItem ZTestDialog SID_ZTEST_DIALOG
GroupId = GID_OPTIONS;
GroupId = GID_OPTIONS;
]
]
SfxVoidItem ChiSquareTestDialog SID_CHI_SQUARE_TEST_DIALOG
()
[
/* flags: */
AutoUpdate = FALSE,
Cachable = Cachable,
FastCall = FALSE,
HasCoreId = FALSE,
HasDialog = TRUE,
ReadOnlyDoc = TRUE,
Toggle = FALSE,
Container = FALSE,
RecordAbsolute = FALSE,
RecordPerSet;
Synchron;
/* config: */
AccelConfig = TRUE,
MenuConfig = TRUE,
StatusBarConfig = FALSE,
ToolBoxConfig = TRUE,
GroupId = GID_OPTIONS;
]
SfxVoidItem SolverDialog SID_OPENDLG_OPTSOLVER
SfxVoidItem SolverDialog SID_OPENDLG_OPTSOLVER
()
()
[
[
...
...
sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx
0 → 100644
Dosyayı görüntüle @
c080641d
/* -*- 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 <sfx2/dispatch.hxx>
#include <svl/zforlist.hxx>
#include <svl/undo.hxx>
#include <boost/random.hpp>
#include <boost/scoped_ptr.hpp>
#include "formulacell.hxx"
#include "rangelst.hxx"
#include "scitems.hxx"
#include "docsh.hxx"
#include "document.hxx"
#include "uiitems.hxx"
#include "reffact.hxx"
#include "strload.hxx"
#include "docfunc.hxx"
#include "StatisticsDialogs.hrc"
#include "TableFillingAndNavigationTools.hxx"
#include "ChiSquareTestDialog.hxx"
ScChiSquareTestDialog
::
ScChiSquareTestDialog
(
SfxBindings
*
pSfxBindings
,
SfxChildWindow
*
pChildWindow
,
vcl
::
Window
*
pParent
,
ScViewData
*
pViewData
)
:
ScStatisticsInputOutputDialog
(
pSfxBindings
,
pChildWindow
,
pParent
,
pViewData
,
"ChiSquareTestDialog"
,
"modules/scalc/ui/chisquaretestdialog.ui"
)
{
SetText
(
SC_STRLOAD
(
RID_STATISTICS_DLGS
,
STR_ZTEST
));
}
ScChiSquareTestDialog
::~
ScChiSquareTestDialog
()
{}
bool
ScChiSquareTestDialog
::
Close
()
{
return
DoClose
(
ScChiSquareTestDialogWrapper
::
GetChildWindowId
());
}
sal_Int16
ScChiSquareTestDialog
::
GetUndoNameId
()
{
return
STR_ZTEST_UNDO_NAME
;
}
ScRange
ScChiSquareTestDialog
::
ApplyOutput
(
ScDocShell
*
pDocShell
)
{
AddressWalkerWriter
aOutput
(
mOutputAddress
,
pDocShell
,
mDocument
,
formula
::
FormulaGrammar
::
mergeToGrammar
(
formula
::
FormulaGrammar
::
GRAM_ENGLISH
,
mAddressDetails
.
eConv
));
FormulaTemplate
aTemplate
(
mDocument
);
aTemplate
.
autoReplaceRange
(
"%RANGE%"
,
mInputRange
);
aOutput
.
writeBoldString
(
"Independence Test (Chi-Square)"
);
aOutput
.
newLine
();
// Alpha
aOutput
.
writeString
(
SC_STRLOAD
(
RID_STATISTICS_DLGS
,
STR_LABEL_ALPHA
));
aOutput
.
nextColumn
();
aOutput
.
writeValue
(
0.05
);
aTemplate
.
autoReplaceAddress
(
"%ALPHA%"
,
aOutput
.
current
());
aOutput
.
newLine
();
// DF
aOutput
.
writeString
(
"df"
);
aOutput
.
nextColumn
();
aTemplate
.
setTemplate
(
"=(COLUMNS(%RANGE%) - 1) * (ROWS(%RANGE%) - 1)"
);
aTemplate
.
autoReplaceAddress
(
"%DEGREES_OF_FREEDOM%"
,
aOutput
.
current
());
aOutput
.
writeFormula
(
aTemplate
.
getTemplate
());
aOutput
.
newLine
();
// p Value
aOutput
.
writeString
(
"P-Value"
);
aOutput
.
nextColumn
();
aTemplate
.
setTemplate
(
"=CHITEST(%RANGE%; MMULT(MMULT(%RANGE%;TRANSPOSE(IF(COLUMN(%RANGE%))));MMULT(TRANSPOSE(IF(ROW(%RANGE%)));%RANGE%)) / SUM(%RANGE%))"
);
aOutput
.
writeFormula
(
aTemplate
.
getTemplate
());
aOutput
.
newLine
();
// Critical value
aOutput
.
writeString
(
"Critical Value"
);
aOutput
.
nextColumn
();
aTemplate
.
setTemplate
(
"=CHIINV(%ALPHA%; %DEGREES_OF_FREEDOM%)"
);
aOutput
.
writeFormula
(
aTemplate
.
getTemplate
());
aOutput
.
newLine
();
return
ScRange
(
aOutput
.
mMinimumAddress
,
aOutput
.
mMaximumAddress
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sc/source/ui/app/scdll.cxx
Dosyayı görüntüle @
c080641d
...
@@ -260,6 +260,7 @@ void ScDLL::Init()
...
@@ -260,6 +260,7 @@ void ScDLL::Init()
ScTTestDialogWrapper
::
RegisterChildWindow
(
false
,
pMod
);
ScTTestDialogWrapper
::
RegisterChildWindow
(
false
,
pMod
);
ScFTestDialogWrapper
::
RegisterChildWindow
(
false
,
pMod
);
ScFTestDialogWrapper
::
RegisterChildWindow
(
false
,
pMod
);
ScZTestDialogWrapper
::
RegisterChildWindow
(
false
,
pMod
);
ScZTestDialogWrapper
::
RegisterChildWindow
(
false
,
pMod
);
ScChiSquareTestDialogWrapper
::
RegisterChildWindow
(
false
,
pMod
);
// First docking Window for Calc
// First docking Window for Calc
ScFunctionChildWindow
::
RegisterChildWindow
(
false
,
pMod
);
ScFunctionChildWindow
::
RegisterChildWindow
(
false
,
pMod
);
...
...
sc/source/ui/inc/ChiSquareTestDialog.hxx
0 → 100644
Dosyayı görüntüle @
c080641d
/* -*- 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/.
*
*/
#ifndef INCLUDED_SC_SOURCE_UI_INC_CHISQUARETESTDIALOG_HXX
#define INCLUDED_SC_SOURCE_UI_INC_CHISQUARETESTDIALOG_HXX
#include "StatisticsInputOutputDialog.hxx"
class
ScChiSquareTestDialog
:
public
ScStatisticsInputOutputDialog
{
public
:
ScChiSquareTestDialog
(
SfxBindings
*
pB
,
SfxChildWindow
*
pCW
,
vcl
::
Window
*
pParent
,
ScViewData
*
pViewData
);
virtual
~
ScChiSquareTestDialog
();
virtual
bool
Close
()
SAL_OVERRIDE
;
protected
:
virtual
sal_Int16
GetUndoNameId
()
SAL_OVERRIDE
;
virtual
ScRange
ApplyOutput
(
ScDocShell
*
pDocShell
)
SAL_OVERRIDE
;
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sc/source/ui/inc/reffact.hxx
Dosyayı görüntüle @
c080641d
...
@@ -128,6 +128,13 @@ private:
...
@@ -128,6 +128,13 @@ private:
ScZTestDialogWrapper
()
SAL_DELETED_FUNCTION
;
ScZTestDialogWrapper
()
SAL_DELETED_FUNCTION
;
};
};
class
ScChiSquareTestDialogWrapper
:
public
ChildWindowWrapper
<
SID_CHI_SQUARE_TEST_DIALOG
>
{
private
:
ScChiSquareTestDialogWrapper
()
SAL_DELETED_FUNCTION
;
};
class
ScAcceptChgDlgWrapper
:
public
SfxChildWindow
class
ScAcceptChgDlgWrapper
:
public
SfxChildWindow
{
{
public
:
public
:
...
...
sc/source/ui/view/cellsh1.cxx
Dosyayı görüntüle @
c080641d
...
@@ -1002,6 +1002,16 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
...
@@ -1002,6 +1002,16 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
}
}
break
;
break
;
case
SID_CHI_SQUARE_TEST_DIALOG
:
{
sal_uInt16
nId
=
ScChiSquareTestDialogWrapper
::
GetChildWindowId
();
SfxViewFrame
*
pViewFrm
=
pTabViewShell
->
GetViewFrame
();
SfxChildWindow
*
pWnd
=
pViewFrm
->
GetChildWindow
(
nId
);
pScMod
->
SetRefDialog
(
nId
,
pWnd
?
false
:
sal_True
);
}
break
;
case
SID_SEARCH_RESULTS_DIALOG
:
case
SID_SEARCH_RESULTS_DIALOG
:
{
{
...
...
sc/source/ui/view/tabvwsh.cxx
Dosyayı görüntüle @
c080641d
...
@@ -96,6 +96,7 @@ void ScTabViewShell::InitInterface_Impl()
...
@@ -96,6 +96,7 @@ void ScTabViewShell::InitInterface_Impl()
GetStaticInterface
()
->
RegisterChildWindow
(
ScTTestDialogWrapper
::
GetChildWindowId
());
GetStaticInterface
()
->
RegisterChildWindow
(
ScTTestDialogWrapper
::
GetChildWindowId
());
GetStaticInterface
()
->
RegisterChildWindow
(
ScFTestDialogWrapper
::
GetChildWindowId
());
GetStaticInterface
()
->
RegisterChildWindow
(
ScFTestDialogWrapper
::
GetChildWindowId
());
GetStaticInterface
()
->
RegisterChildWindow
(
ScZTestDialogWrapper
::
GetChildWindowId
());
GetStaticInterface
()
->
RegisterChildWindow
(
ScZTestDialogWrapper
::
GetChildWindowId
());
GetStaticInterface
()
->
RegisterChildWindow
(
ScChiSquareTestDialogWrapper
::
GetChildWindowId
());
}
}
SFX_IMPL_NAMED_VIEWFACTORY
(
ScTabViewShell
,
"Default"
)
SFX_IMPL_NAMED_VIEWFACTORY
(
ScTabViewShell
,
"Default"
)
...
...
sc/source/ui/view/tabvwshc.cxx
Dosyayı görüntüle @
c080641d
...
@@ -69,6 +69,7 @@
...
@@ -69,6 +69,7 @@
#include "TTestDialog.hxx"
#include "TTestDialog.hxx"
#include "FTestDialog.hxx"
#include "FTestDialog.hxx"
#include "ZTestDialog.hxx"
#include "ZTestDialog.hxx"
#include "ChiSquareTestDialog.hxx"
#include "PivotLayoutDialog.hxx"
#include "PivotLayoutDialog.hxx"
...
@@ -388,6 +389,12 @@ SfxModelessDialog* ScTabViewShell::CreateRefDialog(
...
@@ -388,6 +389,12 @@ SfxModelessDialog* ScTabViewShell::CreateRefDialog(
}
}
break
;
break
;
case
SID_CHI_SQUARE_TEST_DIALOG
:
{
pResult
=
new
ScChiSquareTestDialog
(
pB
,
pCW
,
pParent
,
&
GetViewData
()
);
}
break
;
case
SID_OPENDLG_OPTSOLVER
:
case
SID_OPENDLG_OPTSOLVER
:
{
{
ScViewData
&
rViewData
=
GetViewData
();
ScViewData
&
rViewData
=
GetViewData
();
...
...
sc/uiconfig/scalc/menubar/menubar.xml
Dosyayı görüntüle @
c080641d
...
@@ -508,6 +508,7 @@
...
@@ -508,6 +508,7 @@
<menu:menuitem
menu:id=
".uno:TTestDialog"
/>
<menu:menuitem
menu:id=
".uno:TTestDialog"
/>
<menu:menuitem
menu:id=
".uno:FTestDialog"
/>
<menu:menuitem
menu:id=
".uno:FTestDialog"
/>
<menu:menuitem
menu:id=
".uno:ZTestDialog"
/>
<menu:menuitem
menu:id=
".uno:ZTestDialog"
/>
<menu:menuitem
menu:id=
".uno:ChiSquareTestDialog"
/>
</menu:menupopup>
</menu:menupopup>
</menu:menu>
</menu:menu>
</menu:menupopup>
</menu:menupopup>
...
...
sc/uiconfig/scalc/ui/chisquaretestdialog.ui
0 → 100644
Dosyayı görüntüle @
c080641d
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