[Libreoffice-commits] core.git: Branch 'feature/unitver' - sc/Library_sc.mk sc/source sc/UIConfig_scalc.mk

Andrzej Hunt andrzej at ahunt.org
Mon Jun 1 13:54:08 PDT 2015


 sc/Library_sc.mk               |    2 +-
 sc/UIConfig_scalc.mk           |    4 +++-
 sc/source/ui/app/scdll.cxx     |    2 ++
 sc/source/ui/inc/reffact.hxx   |    2 ++
 sc/source/ui/view/cellsh.cxx   |    5 +++++
 sc/source/ui/view/cellsh1.cxx  |    9 ++++++++-
 sc/source/ui/view/tabvwsh.cxx  |    2 ++
 sc/source/ui/view/tabvwshc.cxx |    7 ++++++-
 8 files changed, 29 insertions(+), 4 deletions(-)

New commits:
commit 5c7d2d8fcad40ed1fa1e50a2e238a5ba353194c1
Author: Andrzej Hunt <andrzej at ahunt.org>
Date:   Mon Jun 1 21:34:04 2015 +0100

    Fix building with disabled unit verification.
    
    Change-Id: I78633082a0e0dfcaa27515ce8d9c8635e50735e9

diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 82a5237..5d96108 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -488,7 +488,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 \
@@ -695,6 +694,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 77c821c..afdf4e1 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 242b0b7..b896e8a 100644
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@ -250,7 +250,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 22ae265..5e1751a 100644
--- a/sc/source/ui/inc/reffact.hxx
+++ b/sc/source/ui/inc/reffact.hxx
@@ -73,12 +73,14 @@ private:
     ScRandomNumberGeneratorDialogWrapper() SAL_DELETED_FUNCTION;
 };
 
+#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 aba1368..8225b41 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -1089,6 +1089,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 c8efa14..a0113f1 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();
@@ -1905,6 +1910,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
             }
             break;
 
+#ifdef ENABLE_CALC_UNITVERIFICATION
         case SID_UNITSCONVERSION_DIALOG:
             {
                 sal_uInt16 nId  = ScUnitsConversionDialogWrapper::GetChildWindowId();
@@ -1914,6 +1920,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 033b1a0..fea3e9a 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 900165a..c1d915d 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:
         {


More information about the Libreoffice-commits mailing list