summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej@ahunt.org>2015-06-01 21:34:04 +0100
committerAndrzej Hunt <andrzej@ahunt.org>2015-10-20 18:18:40 +0200
commit4c31f1a4ac9f31a1c96f6b5cf2e267c071273a0f (patch)
tree98ffdc3df6ca9448c27d44283439efaff12a5335
parent36c96d231c557f4bbd08010162cad449901ab81c (diff)
Fix building with disabled unit verification.
Change-Id: I78633082a0e0dfcaa27515ce8d9c8635e50735e9
-rw-r--r--sc/Library_sc.mk2
-rw-r--r--sc/UIConfig_scalc.mk4
-rw-r--r--sc/source/ui/app/scdll.cxx2
-rw-r--r--sc/source/ui/inc/reffact.hxx2
-rw-r--r--sc/source/ui/view/cellsh.cxx5
-rw-r--r--sc/source/ui/view/cellsh1.cxx9
-rw-r--r--sc/source/ui/view/tabvwsh.cxx2
-rw-r--r--sc/source/ui/view/tabvwshc.cxx7
8 files changed, 29 insertions, 4 deletions
diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 54cf710398cc..fb47b3ccacf7 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -487,7 +487,6 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
sc/source/ui/miscdlgs/solverutil \
sc/source/ui/miscdlgs/solvrdlg \
sc/source/ui/miscdlgs/tabopdlg \
- sc/source/ui/miscdlgs/unitsconversiondlg \
sc/source/ui/miscdlgs/warnbox \
sc/source/ui/namedlg/namedefdlg \
sc/source/ui/namedlg/namedlg \
@@ -700,6 +699,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
sc/source/core/units/unitsimpl \
sc/source/core/units/util \
sc/source/core/units/utunit \
+ sc/source/ui/miscdlgs/unitsconversiondlg \
))
endif
diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index 77c821c2dcb9..afdf4e1c364a 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -181,7 +181,9 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/tpviewpage \
sc/uiconfig/scalc/ui/ttestdialog \
sc/uiconfig/scalc/ui/ungroupdialog \
- sc/uiconfig/scalc/ui/unitsconversiondialog \
+ $(if $(ENABLE_CALC_UNITVERIFICATION), \
+ sc/uiconfig/scalc/ui/unitsconversiondialog \
+ ) \
sc/uiconfig/scalc/ui/validationdialog \
sc/uiconfig/scalc/ui/validationcriteriapage \
sc/uiconfig/scalc/ui/validationhelptabpage \
diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx
index 9e992c3c50f1..2e29c656cca5 100644
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@ -235,7 +235,9 @@ void ScDLL::Init()
ScFormulaDlgWrapper ::RegisterChildWindow(false, pMod);
ScRandomNumberGeneratorDialogWrapper::RegisterChildWindow(false, pMod);
+#ifdef ENABLE_CALC_UNITVERIFICATION
ScUnitsConversionDialogWrapper ::RegisterChildWindow(false, pMod);
+#endif
ScSamplingDialogWrapper ::RegisterChildWindow(false, pMod);
ScDescriptiveStatisticsDialogWrapper::RegisterChildWindow(false, pMod);
ScAnalysisOfVarianceDialogWrapper ::RegisterChildWindow(false, pMod);
diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx
index 4e91b3384fe6..1257dfff0d1d 100644
--- a/sc/source/ui/inc/reffact.hxx
+++ b/sc/source/ui/inc/reffact.hxx
@@ -73,12 +73,14 @@ private:
ScRandomNumberGeneratorDialogWrapper() = delete;
};
+#ifdef ENABLE_CALC_UNITVERIFICATION
class ScUnitsConversionDialogWrapper :
public ChildWindowWrapper<SID_UNITSCONVERSION_DIALOG>
{
private:
ScUnitsConversionDialogWrapper() SAL_DELETED_FUNCTION;
};
+#endif
class ScAnalysisOfVarianceDialogWrapper :
public ChildWindowWrapper<SID_ANALYSIS_OF_VARIANCE_DIALOG>
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index ca925e4c6e4b..b46d367ef8a5 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -1087,6 +1087,11 @@ void ScCellShell::GetState(SfxItemSet &rSet)
}
}
break;
+#ifndef ENABLE_CALC_UNITVERIFICATION
+ case SID_UNITSCONVERSION_DIALOG:
+ rSet.DisableItem(nWhich);
+ break;
+#endif
} // switch ( nWitch )
nWhich = aIter.NextWhich();
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 6872ebd27e36..f20c8ab4113c 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -76,9 +76,12 @@
#include "markdata.hxx"
#include "docpool.hxx"
#include "condformatdlg.hxx"
-#include "unitsconversiondlg.hxx"
#include "attrib.hxx"
+#ifdef ENABLE_CALC_UNITVERIFICATION
+#include "unitsconversiondlg.hxx"
+#endif
+
#include "globstr.hrc"
#include "scui_def.hxx"
#include <svx/dialogs.hrc>
@@ -128,7 +131,9 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
case SID_OPENDLG_CONDFRMT:
case SID_OPENDLG_COLORSCALE:
case SID_OPENDLG_DATABAR:
+#ifdef ENABLE_CALC_UNITVERIFICATION
case SID_UNITSCONVERSION_DIALOG:
+#endif
pScMod->InputEnterHandler();
pTabViewShell->UpdateInputHandler();
@@ -1917,6 +1922,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
}
break;
+#ifdef ENABLE_CALC_UNITVERIFICATION
case SID_UNITSCONVERSION_DIALOG:
{
sal_uInt16 nId = ScUnitsConversionDialogWrapper::GetChildWindowId();
@@ -1926,6 +1932,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
pScMod->SetRefDialog( nId, pWnd == nullptr );
}
break;
+#endif
case SID_OPENDLG_CONDFRMT:
case SID_OPENDLG_COLORSCALE:
diff --git a/sc/source/ui/view/tabvwsh.cxx b/sc/source/ui/view/tabvwsh.cxx
index 033b1a0997d9..fea3e9aef1f8 100644
--- a/sc/source/ui/view/tabvwsh.cxx
+++ b/sc/source/ui/view/tabvwsh.cxx
@@ -88,7 +88,9 @@ void ScTabViewShell::InitInterface_Impl()
GetStaticInterface()->RegisterChildWindow(ScValidityRefChildWin::GetChildWindowId());
GetStaticInterface()->RegisterChildWindow(sc::SearchResultsDlgWrapper::GetChildWindowId());
+#ifdef ENABLE_CALC_UNITVERIFICATION
GetStaticInterface()->RegisterChildWindow(ScUnitsConversionDialogWrapper::GetChildWindowId());
+#endif
GetStaticInterface()->RegisterChildWindow(ScRandomNumberGeneratorDialogWrapper::GetChildWindowId());
GetStaticInterface()->RegisterChildWindow(ScSamplingDialogWrapper::GetChildWindowId());
GetStaticInterface()->RegisterChildWindow(ScDescriptiveStatisticsDialogWrapper::GetChildWindowId());
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index 89f25cd09faf..66834b4c2541 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -56,9 +56,12 @@
#include "markdata.hxx"
#include "reffact.hxx"
#include "condformatdlg.hxx"
-#include "unitsconversiondlg.hxx"
#include "xmlsourcedlg.hxx"
+#ifdef ENABLE_CALC_UNITVERIFICATION
+#include "unitsconversiondlg.hxx"
+#endif
+
#include "RandomNumberGeneratorDialog.hxx"
#include "SamplingDialog.hxx"
#include "DescriptiveStatisticsDialog.hxx"
@@ -325,11 +328,13 @@ VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog(
}
break;
+#ifdef ENABLE_CALC_UNITVERIFICATION
case SID_UNITSCONVERSION_DIALOG:
{
pResult = VclPtr<ScUnitsConversionDialog>::Create( pB, pCW, pParent, &GetViewData() );
}
break;
+#endif
case SID_RANDOM_NUMBER_GENERATOR_DIALOG:
{