[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - cui/source svx/source sw/Module_sw.mk sw/source vcl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Nov 5 11:48:33 UTC 2018


 cui/source/dialogs/cuigaldlg.cxx      |   11 ++++++++++-
 cui/source/options/treeopt.cxx        |    2 ++
 svx/source/gallery2/galctrl.cxx       |    3 +++
 sw/Module_sw.mk                       |    2 +-
 sw/source/ui/dialog/swdlgfact.cxx     |   34 ++++++++++++++++++++++++++++++++++
 sw/source/ui/fldui/fldedt.cxx         |    4 ++++
 sw/source/ui/fldui/fldtdlg.cxx        |   11 +++++++++++
 sw/source/uibase/dialog/swabstdlg.cxx |    5 +----
 sw/source/uibase/shells/basesh.cxx    |    4 ++++
 vcl/source/window/abstdlg.cxx         |    4 ----
 10 files changed, 70 insertions(+), 10 deletions(-)

New commits:
commit ad54ffb44f76e8294b9f8974409fcf821e523bf9
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Fri Nov 2 22:58:16 2018 +0200
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Nov 5 12:47:33 2018 +0100

    Start of work in progress on making dialogs work in the iOS app
    
    Build the swui library for non-DESKTOP platforms, too. Handle fallout
    for !HAVE_FEATURE_DBCONNECTIVITY and !HAVE_FEATURE_AVMEDIA (both of
    which features we for now don't want to bother with in the iOS app).
    
    Make VclAbstractDialogFactory::Create() do its thing also on
    non-DESKTOP.
    
    This commit just causes more code to be compiled for the non-DESKTOP
    case, dialogs in general surely don't actually work yet in the iOS
    app. For instance:
    
    vcl/source/window/builder.cxx:2060: probably need to implement sfxlo-CustomPropertiesControl or add a makesfxlo-CustomPropertiesControl function
    
    Change-Id: I579efba605f519dcbf407b675be88c7c6ee0f19b
    Reviewed-on: https://gerrit.libreoffice.org/62865
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Tested-by: Tor Lillqvist <tml at collabora.com>

diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index edd5e8ac8fe6..65aec29c2f8e 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_features.h>
+
 #include <sal/config.h>
 
 #include <algorithm>
@@ -869,6 +871,7 @@ void TPGalleryThemeProperties::FillFilterList()
         }
     }
 
+#if HAVE_FEATURE_AVMEDIA
     // media filters
     static const char aWildcard[] = "*.";
     ::avmedia::FilterNameVector     aFilters;
@@ -898,6 +901,9 @@ void TPGalleryThemeProperties::FillFilterList()
             }
         }
     }
+#else
+    (void) nFirstExtFilterPos;
+#endif
 
     // 'All' filters
     OUString aExtensions;
@@ -922,6 +928,7 @@ void TPGalleryThemeProperties::FillFilterList()
         }
     }
 
+#if HAVE_FEATURE_AVMEDIA
     // media filters
     for(std::pair<OUString,OUString> & aFilter : aFilters)
     {
@@ -932,6 +939,7 @@ void TPGalleryThemeProperties::FillFilterList()
             aExtensions += aWildcard + aFilter.second.getToken( 0, ';', nIndex );
         }
      }
+#endif
 
 #if defined(_WIN32)
     if (aExtensions.getLength() > 240)
@@ -1064,13 +1072,14 @@ void TPGalleryThemeProperties::DoPreview()
             ErrorHandler::HandleError( ERRCODE_IO_NOTEXISTSPATH );
             GetParent()->EnterWait();
         }
+#if HAVE_FEATURE_AVMEDIA
         else if( ::avmedia::MediaWindow::isMediaURL( _aURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ), "" ) )
         {
             xMediaPlayer = ::avmedia::MediaWindow::createPlayer( _aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), "" );
             if( xMediaPlayer.is() )
                 xMediaPlayer->start();
         }
-
+#endif
         bInputAllowed = true;
         aPreviewString = aString;
     }
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index a924be6442f8..45659f1cdd25 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -297,7 +297,9 @@ VclPtr<SfxTabPage> CreateGeneralTabPage( sal_uInt16 nId, vcl::Window* pParent, c
         case RID_SVXPAGE_INET_PROXY:                fnCreate = &SvxProxyTabPage::Create; break;
         case RID_SVXPAGE_INET_SECURITY:             fnCreate = &SvxSecurityTabPage::Create; break;
         case RID_SVXPAGE_INET_MAIL:                 fnCreate = &SvxEMailTabPage::Create; break;
+#if HAVE_FEATURE_DESKTOP
         case RID_SVXPAGE_PERSONALIZATION:           fnCreate = &SvxPersonalizationTabPage::Create; break;
+#endif
         case RID_SVXPAGE_COLORCONFIG:               fnCreate = &SvxColorOptionsTabPage::Create; break;
         case RID_OFAPAGE_HTMLOPT:                   fnCreate = &OfaHtmlTabPage::Create; break;
         case SID_OPTFILTER_MSOFFICE:                fnCreate = &OfaMSFilterTabPage::Create; break;
diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx
index f23085fb65c2..27074fd6560f 100644
--- a/svx/source/gallery2/galctrl.cxx
+++ b/svx/source/gallery2/galctrl.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_features.h>
 
 #include <vcl/svapp.hxx>
 #include <sfx2/viewfrm.hxx>
@@ -61,11 +62,13 @@ bool GalleryPreview::SetGraphic( const INetURLObject& _aURL )
 {
     bool bRet = true;
     Graphic aGraphic;
+#if HAVE_FEATURE_AVMEDIA
     if( ::avmedia::MediaWindow::isMediaURL( _aURL.GetMainURL( INetURLObject::DecodeMechanism::Unambiguous ), "" ) )
     {
         aGraphic = BitmapEx(RID_SVXBMP_GALLERY_MEDIA);
     }
     else
+#endif
     {
         GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
         GalleryProgress aProgress( &rFilter );
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index afb1c546e69b..985d79874162 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -26,7 +26,7 @@ $(eval $(call gb_Module_add_targets,sw,\
 	Library_msword \
 	Library_sw \
 	Library_swd \
-	$(call gb_Helper_optional,DESKTOP,Library_swui) \
+	Library_swui \
 	UIConfig_sglobal \
 	UIConfig_sweb \
 	UIConfig_swform \
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index 5747c999a01d..e06a6b4a3910 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_features.h>
+
 #include "swdlgfact.hxx"
 #include <svl/style.hxx>
 #include <svx/svxids.hrc>
@@ -226,7 +228,14 @@ void AbstractSwInsertDBColAutoPilot_Impl::DataToDoc( const uno::Sequence< uno::A
         uno::Reference< sdbc::XConnection> xConnection,
         uno::Reference< sdbc::XResultSet > xResultSet)
 {
+#if HAVE_FEATURE_DBCONNECTIVITY
     pDlg->DataToDoc(rSelection, rxSource, xConnection, xResultSet);
+#else
+    (void) rSelection;
+    (void) rxSource;
+    (void) xConnection;
+    (void) xResultSet;
+#endif
 }
 
 OString AbstractDropDownFieldDialog_Impl::GetWindowState() const
@@ -704,8 +713,13 @@ VclPtr<AbstractSwBreakDlg> SwAbstractDialogFactory_Impl::CreateSwBreakDlg(vcl::W
 
 VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwChangeDBDlg(SwView& rVw)
 {
+#if HAVE_FEATURE_DBCONNECTIVITY
     VclPtr<Dialog> pDlg = VclPtr<SwChangeDBDlg>::Create(rVw);
     return VclPtr<VclAbstractDialog_Impl>::Create(pDlg);
+#else
+    (void) rVw;
+    return nullptr;
+#endif
 }
 
 VclPtr<SfxAbstractTabDialog>  SwAbstractDialogFactory_Impl::CreateSwCharDlg(vcl::Window* pParent, SwView& pVw,
@@ -732,8 +746,16 @@ VclPtr<AbstractSwInsertDBColAutoPilot> SwAbstractDialogFactory_Impl::CreateSwIns
         uno::Reference<sdbcx::XColumnsSupplier> xColSupp,
         const SwDBData& rData)
 {
+#if HAVE_FEATURE_DBCONNECTIVITY
     VclPtr<SwInsertDBColAutoPilot> pDlg = VclPtr<SwInsertDBColAutoPilot>::Create( rView, rxSource, xColSupp, rData );
     return VclPtr<AbstractSwInsertDBColAutoPilot_Impl>::Create( pDlg );
+#else
+    (void) rView;
+    (void) rxSource;
+    (void) xColSupp;
+    (void) rData;
+    return nullptr;
+#endif
 }
 
 VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateSwFootNoteOptionDlg(vcl::Window *pParent, SwWrtShell &rSh)
@@ -1054,7 +1076,13 @@ VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateIndexMarkModalDlg(
 VclPtr<AbstractMailMergeWizard> SwAbstractDialogFactory_Impl::CreateMailMergeWizard(
                                     SwView& rView, std::shared_ptr<SwMailMergeConfigItem>& rConfigItem)
 {
+#if HAVE_FEATURE_DBCONNECTIVITY
     return VclPtr<AbstractMailMergeWizard_Impl>::Create( VclPtr<SwMailMergeWizard>::Create(rView, rConfigItem));
+#else
+    (void) rView;
+    (void) rConfigItem;
+    return nullptr;
+#endif
 }
 
 GlossaryGetCurrGroup    SwAbstractDialogFactory_Impl::GetGlossaryCurrGroupFunc()
@@ -1127,20 +1155,26 @@ CreateTabPage SwAbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nI
 
 void SwAbstractDialogFactory_Impl::ExecuteMMResultSaveDialog()
 {
+#if HAVE_FEATURE_DBCONNECTIVITY
     ScopedVclPtrInstance<SwMMResultSaveDialog> pDialog;
     pDialog->Execute();
+#endif
 }
 
 void SwAbstractDialogFactory_Impl::ExecuteMMResultPrintDialog()
 {
+#if HAVE_FEATURE_DBCONNECTIVITY
     ScopedVclPtrInstance<SwMMResultPrintDialog> pDialog;
     pDialog->Execute();
+#endif
 }
 
 void SwAbstractDialogFactory_Impl::ExecuteMMResultEmailDialog()
 {
+#if HAVE_FEATURE_DBCONNECTIVITY
     ScopedVclPtrInstance<SwMMResultEmailDialog> pDialog;
     pDialog->Execute();
+#endif
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx
index 4f6a57868136..56838c446671 100644
--- a/sw/source/ui/fldui/fldedt.cxx
+++ b/sw/source/ui/fldui/fldedt.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_features.h>
+
 #include <vcl/msgbox.hxx>
 #include <sfx2/basedlgs.hxx>
 #include <sfx2/viewfrm.hxx>
@@ -189,10 +191,12 @@ VclPtr<SfxTabPage> SwFieldEditDlg::CreatePage(sal_uInt16 nGroup)
                 pTabPage = SwFieldDokInfPage::Create(get_content_area(), pSet);
                 break;
             }
+#if HAVE_FEATURE_DBCONNECTIVITY
         case GRP_DB:
             pTabPage = SwFieldDBPage::Create(get_content_area(), nullptr);
             static_cast<SwFieldDBPage*>(pTabPage.get())->SetWrtShell(*pSh);
             break;
+#endif
         case GRP_VAR:
             pTabPage = SwFieldVarPage::Create(get_content_area(), nullptr);
             break;
diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx
index 2dedd4a1a9c5..798fefd1eef1 100644
--- a/sw/source/ui/fldui/fldtdlg.cxx
+++ b/sw/source/ui/fldui/fldtdlg.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_features.h>
+
 #include <cmdid.h>
 #include <swtypes.hxx>
 #include <unotools/confignode.hxx>
@@ -81,6 +83,7 @@ SwFieldDlg::SwFieldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, vcl::Window *pPa
                 -1,
                 utl::OConfigurationTreeRoot::CM_READONLY);
 
+#if HAVE_FEATURE_DBCONNECTIVITY
         bool bDatabaseFields = true;
         aCfgRoot.getNodeValue(
             OUString("DatabaseFields")) >>= bDatabaseFields;
@@ -88,6 +91,7 @@ SwFieldDlg::SwFieldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, vcl::Window *pPa
         if (bDatabaseFields)
             m_nDbId = AddTabPage("database", SwFieldDBPage::Create, nullptr);
         else
+#endif
             RemoveTabPage("database");
     }
     else
@@ -278,6 +282,7 @@ void SwFieldDlg::InsertHdl()
 
 void SwFieldDlg::ActivateDatabasePage()
 {
+#if HAVE_FEATURE_DBCONNECTIVITY
     m_bDataBaseMode = true;
     ShowPage(m_nDbId);
     SfxTabPage* pDBPage = GetTabPage(m_nDbId);
@@ -291,6 +296,7 @@ void SwFieldDlg::ActivateDatabasePage()
     RemoveTabPage("docinfo");
     RemoveTabPage("ref");
     RemoveTabPage("functions");
+#endif
 }
 
 void SwFieldDlg::ShowReferencePage()
@@ -300,6 +306,7 @@ void SwFieldDlg::ShowReferencePage()
 
 void SwFieldDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
 {
+#if HAVE_FEATURE_DBCONNECTIVITY
     if (nId == m_nDbId)
     {
         SfxDispatcher* pDispatch = m_pBindings->GetDispatcher();
@@ -315,6 +322,10 @@ void SwFieldDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
                 static_cast<SwFieldDBPage&>(rPage).SetWrtShell(static_cast<SwView*>(pViewShell)->GetWrtShell());
         }
     }
+#else
+    (void) nId;
+    (void) rPage;
+#endif
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/dialog/swabstdlg.cxx b/sw/source/uibase/dialog/swabstdlg.cxx
index 4546834b1c26..9bd65742c28d 100644
--- a/sw/source/uibase/dialog/swabstdlg.cxx
+++ b/sw/source/uibase/dialog/swabstdlg.cxx
@@ -17,8 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <config_features.h>
-
 #include <swabstdlg.hxx>
 
 #include <osl/module.hxx>
@@ -38,7 +36,6 @@ extern "C" SwAbstractDialogFactory* SwCreateDialogFactory();
 SwAbstractDialogFactory* SwAbstractDialogFactory::Create()
 {
     SwFuncPtrCreateDialogFactory fp = nullptr;
-#if HAVE_FEATURE_DESKTOP
 #ifndef DISABLE_DYNLOADING
     static ::osl::Module aDialogLibrary;
     static const OUString sLibName(SWUI_DLL_NAME);
@@ -49,7 +46,7 @@ SwAbstractDialogFactory* SwAbstractDialogFactory::Create()
 #else
     fp = SwCreateDialogFactory;
 #endif
-#endif
+
     if ( fp )
         return fp();
     return nullptr;
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index bf2eb2f39186..d59379e2c856 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_features.h>
+
 #include <sal/config.h>
 
 #include <hintids.hxx>
@@ -2886,6 +2888,7 @@ void SwBaseShell::ExecField( SfxRequest const & rReq )
     sal_uInt16 nSlot = rReq.GetSlot();
     switch( nSlot )
     {
+#if HAVE_FEATURE_DBCONNECTIVITY
         case FN_CHANGE_DBFIELD:
         {
             SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
@@ -2896,6 +2899,7 @@ void SwBaseShell::ExecField( SfxRequest const & rReq )
             pDlg->Execute();
         }
         break;
+#endif
         default:
             OSL_FAIL("wrong dispatcher");
     }
diff --git a/vcl/source/window/abstdlg.cxx b/vcl/source/window/abstdlg.cxx
index 8ce6fd4221d6..8299172625bb 100644
--- a/vcl/source/window/abstdlg.cxx
+++ b/vcl/source/window/abstdlg.cxx
@@ -17,8 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <config_features.h>
-
 #include <rtl/ustring.hxx>
 #include <osl/module.hxx>
 #include <vcl/abstdlg.hxx>
@@ -35,7 +33,6 @@ extern "C" VclAbstractDialogFactory* CreateDialogFactory();
 VclAbstractDialogFactory* VclAbstractDialogFactory::Create()
 {
     FuncPtrCreateDialogFactory fp = nullptr;
-#if HAVE_FEATURE_DESKTOP
 #ifndef DISABLE_DYNLOADING
     static ::osl::Module aDialogLibrary;
     if (aDialogLibrary.is() ||
@@ -48,7 +45,6 @@ VclAbstractDialogFactory* VclAbstractDialogFactory::Create()
 #else
     fp = CreateDialogFactory;
 #endif
-#endif
     if ( fp )
         return fp();
     return nullptr;


More information about the Libreoffice-commits mailing list