[Libreoffice-commits] core.git: forms/Library_frm.mk forms/source sw/Library_sw.mk sw/source
Tor Lillqvist
tml at collabora.com
Tue Apr 22 03:04:49 PDT 2014
forms/Library_frm.mk | 11 ++++++++---
forms/source/component/Filter.cxx | 17 ++++++++++++++++-
forms/source/component/Filter.hxx | 4 ++++
forms/source/component/Grid.cxx | 6 ++++++
forms/source/component/ListBox.cxx | 16 ++++++++++++++--
forms/source/misc/services.cxx | 6 ++++++
forms/source/runtime/formoperations.cxx | 3 +++
sw/Library_sw.mk | 2 +-
sw/source/core/doc/docfld.cxx | 7 ++++++-
sw/source/core/doc/docnew.cxx | 6 ++++++
sw/source/core/uibase/app/applab.cxx | 12 +++++++++++-
sw/source/core/uibase/inc/uivwimp.hxx | 6 ++++++
sw/source/core/uibase/uiview/uivwimp.cxx | 7 ++++++-
sw/source/core/uibase/uiview/view0.cxx | 8 ++++++--
sw/source/core/uibase/uiview/viewstat.cxx | 6 ++++++
15 files changed, 105 insertions(+), 12 deletions(-)
New commits:
commit f12237c4c6239428b00dd4885a25bbc3b4f14368
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Apr 22 13:03:06 2014 +0300
More hacking on --disable-database-connectivity
Change-Id: Iefa6b104c60464e5a0d793bd676d8ea7ff2727c1
diff --git a/forms/Library_frm.mk b/forms/Library_frm.mk
index d130431..93acb2d 100644
--- a/forms/Library_frm.mk
+++ b/forms/Library_frm.mk
@@ -62,12 +62,10 @@ $(eval $(call gb_Library_add_exception_objects,frm,\
forms/source/component/Columns \
forms/source/component/ComboBox \
forms/source/component/Currency \
- forms/source/component/DatabaseForm \
forms/source/component/Date \
forms/source/component/EditBase \
forms/source/component/Edit \
forms/source/component/entrylisthelper \
- forms/source/component/errorbroadcaster \
forms/source/component/EventThread \
forms/source/component/File \
forms/source/component/Filter \
@@ -123,7 +121,6 @@ $(eval $(call gb_Library_add_exception_objects,frm,\
forms/source/richtext/richtextviewport \
forms/source/richtext/rtattributehandler \
forms/source/richtext/specialdispatchers \
- forms/source/runtime/formoperations \
forms/source/solar/component/navbarcontrol \
forms/source/solar/control/navtoolbar \
forms/source/xforms/binding \
@@ -154,4 +151,12 @@ $(eval $(call gb_Library_add_exception_objects,frm,\
forms/source/xforms/xpathlib/xpathlib \
))
+$(eval $(call gb_Library_add_exception_objects,frm,\
+ $(call gb_Helper_optional,DBCONNECTIVITY, \
+ forms/source/component/DatabaseForm \
+ forms/source/component/errorbroadcaster \
+ forms/source/runtime/formoperations \
+ ) \
+))
+
# vim: set noet sw=4 ts=4:
diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx
index 976c82f..603178f 100644
--- a/forms/source/component/Filter.cxx
+++ b/forms/source/component/Filter.cxx
@@ -98,7 +98,9 @@ namespace frm
:UnoControl()
,m_aTextListeners( *this )
,m_xContext( _rxORB )
+#if HAVE_FEATURE_DBCONNECTIVITY
,m_aParser( _rxORB )
+#endif
,m_nControlClass( FormComponentType::TEXTFIELD )
,m_bFilterList( sal_False )
,m_bMultiLine( sal_False )
@@ -109,6 +111,7 @@ namespace frm
sal_Bool OFilterControl::ensureInitialized( )
{
+#if HAVE_FEATURE_DBCONNECTIVITY
if ( !m_xField.is() )
{
OSL_FAIL( "OFilterControl::ensureInitialized: improperly initialized: no field!" );
@@ -139,7 +142,7 @@ namespace frm
// no fallback anymore
return sal_False;
}
-
+#endif
return sal_True;
}
@@ -291,6 +294,9 @@ namespace frm
void SAL_CALL OFilterControl::itemStateChanged( const ItemEvent& rEvent ) throw(RuntimeException, std::exception)
{
+#if !HAVE_FEATURE_DBCONNECTIVITY
+ (void) rEvent;
+#else
OUStringBuffer aText;
switch (m_nControlClass)
{
@@ -377,11 +383,13 @@ namespace frm
while( aIt.hasMoreElements() )
((XTextListener *)aIt.next())->textChanged( aEvt );
}
+#endif
}
void OFilterControl::implInitFilterList()
{
+#if HAVE_FEATURE_DBCONNECTIVITY
if ( !ensureInitialized( ) )
// already asserted in ensureInitialized
return;
@@ -487,6 +495,7 @@ namespace frm
{
DBG_UNHANDLED_EXCEPTION();
}
+#endif
}
// XFocusListener
@@ -506,6 +515,7 @@ namespace frm
sal_Bool SAL_CALL OFilterControl::commit() throw(RuntimeException, std::exception)
{
+#if HAVE_FEATURE_DBCONNECTIVITY
if ( !ensureInitialized( ) )
// already asserted in ensureInitialized
return sal_True;
@@ -550,6 +560,7 @@ namespace frm
while( aIt.hasMoreElements() )
static_cast< XTextListener* >( aIt.next() )->textChanged( aEvt );
}
+#endif
return sal_True;
}
@@ -820,6 +831,9 @@ namespace frm
void OFilterControl::initControlModel(Reference< XPropertySet >& xControlModel)
{
+#if !HAVE_FEATURE_DBCONNECTIVITY
+ (void) xControlModel;
+#else
if ( !xControlModel.is() )
{
OSL_FAIL( "OFilterControl::initialize: invalid control model argument!" );
@@ -873,6 +887,7 @@ namespace frm
xForm = xForm.query( xModel->getParent() );
m_xConnection = ::dbtools::getConnection( xForm );
OSL_ENSURE( m_xConnection.is(), "OFilterControl::initialize: unable to determine the form's connection!" );
+#endif
}
OUString SAL_CALL OFilterControl::getImplementationName( ) throw (RuntimeException, std::exception)
diff --git a/forms/source/component/Filter.hxx b/forms/source/component/Filter.hxx
index f61b7ab4..51cfd65 100644
--- a/forms/source/component/Filter.hxx
+++ b/forms/source/component/Filter.hxx
@@ -20,6 +20,8 @@
#ifndef INCLUDED_FORMS_SOURCE_COMPONENT_FILTER_HXX
#define INCLUDED_FORMS_SOURCE_COMPONENT_FILTER_HXX
+#include <config_features.h>
+
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
@@ -70,7 +72,9 @@ namespace frm
MapString2String m_aDisplayItemToValueItem;
OUString m_aText;
+#if HAVE_FEATURE_DBCONNECTIVITY
::connectivity::OSQLParser m_aParser;
+#endif
sal_Int16 m_nControlClass; // which kind of control do we use?
sal_Bool m_bFilterList : 1;
sal_Bool m_bMultiLine : 1;
diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx
index 7d4abec..f6a17b1 100644
--- a/forms/source/component/Grid.cxx
+++ b/forms/source/component/Grid.cxx
@@ -16,6 +16,9 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+
+#include <config_features.h>
+
#include "Columns.hxx"
#include "findpos.hxx"
#include "Grid.hxx"
@@ -188,12 +191,15 @@ Any SAL_CALL OGridControlModel::queryAggregation( const Type& _rType ) throw (Ru
return aReturn;
}
+#if HAVE_FEATURE_DBCONNECTIVITY
+
// XSQLErrorListener
void SAL_CALL OGridControlModel::errorOccured( const SQLErrorEvent& _rEvent ) throw (RuntimeException, std::exception)
{
// forward the errors which happened to my columns to my own listeners
onError( _rEvent );
}
+#endif
// XRowSetSupplier
Reference< XRowSet > SAL_CALL OGridControlModel::getRowSet( ) throw (RuntimeException, std::exception)
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index f812dc9..ea2d688 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
#include "ListBox.hxx"
#include "property.hxx"
@@ -352,6 +353,7 @@ namespace frm
}
break;
+#if HAVE_FEATURE_DBCONNECTIVITY
case PROPERTY_ID_SELECT_VALUE :
{
ORowSetValue v;
@@ -360,7 +362,7 @@ namespace frm
setControlValue( newSelectSeq, eOther );
}
break;
-
+#endif
case PROPERTY_ID_DEFAULT_SELECT_SEQ :
DBG_ASSERT(_rValue.getValueType().equals(::getCppuType(static_cast< Sequence<sal_Int16>*>(0))),
"OListBoxModel::setFastPropertyValue_NoBroadcast : invalid type !" );
@@ -859,6 +861,7 @@ namespace frm
switch (m_eListSourceType)
{
+#if HAVE_FEATURE_DBCONNECTIVITY
case ListSourceType_SQL:
case ListSourceType_SQLPASSTHROUGH:
case ListSourceType_TABLE:
@@ -928,7 +931,7 @@ namespace frm
}
}
break;
-
+#endif
case ListSourceType_TABLEFIELDS:
{
Reference<XNameAccess> xFieldNames = getTableFields(xConnection, sListSource);
@@ -1173,8 +1176,10 @@ namespace frm
const ValueList aValues( impl_getValues() );
assert( m_nConvertedBoundValuesType == getValueType());
Sequence< sal_Int16 > aSelectionIndicies(i_aValues.getLength());
+
sal_Int32 nCount(0);
+#if HAVE_FEATURE_DBCONNECTIVITY
sal_Int16 *pIndex = aSelectionIndicies.getArray();
const Any *pValue = i_aValues.getConstArray();
const Any * const pValueEnd = i_aValues.getConstArray() + i_aValues.getLength();
@@ -1204,12 +1209,14 @@ namespace frm
}
}
assert(aSelectionIndicies.getArray() + nCount == pIndex);
+#endif
aSelectionIndicies.realloc(nCount);
return aSelectionIndicies;
}
Any OListBoxModel::translateDbColumnToControlValue()
{
+#if HAVE_FEATURE_DBCONNECTIVITY
Reference< XPropertySet > xBoundField( getField() );
if ( !xBoundField.is() )
{
@@ -1223,6 +1230,9 @@ namespace frm
m_aSaveValue = aCurrentValue;
return makeAny( translateDbValueToControlValue(aCurrentValue) );
+#else
+ return Any();
+#endif
}
// XReset
@@ -1325,11 +1335,13 @@ namespace frm
break;
case eValue:
+#if HAVE_FEATURE_DBCONNECTIVITY
{
ORowSetValue v;
v.fill(_rExternalValue);
aSelectIndexes = translateDbValueToControlValue(v);
}
+#endif
break;
case eIndexList:
diff --git a/forms/source/misc/services.cxx b/forms/source/misc/services.cxx
index 02e0548..c520e3c 100644
--- a/forms/source/misc/services.cxx
+++ b/forms/source/misc/services.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include "services.hxx"
#include "frm_module.hxx"
#include <cppuhelper/factory.hxx>
@@ -220,7 +222,9 @@ void SAL_CALL createRegistryInfo_FORMS()
static sal_Bool bInit = sal_False;
if (!bInit)
{
+#if HAVE_FEATURE_DBCONNECTIVITY
createRegistryInfo_ODatabaseForm();
+#endif
createRegistryInfo_OFilterControl();
createRegistryInfo_OScrollBarModel();
createRegistryInfo_OSpinButtonModel();
@@ -229,7 +233,9 @@ void SAL_CALL createRegistryInfo_FORMS()
createRegistryInfo_ORichTextModel();
createRegistryInfo_ORichTextControl();
createRegistryInfo_CLibxml2XFormsExtension();
+#if HAVE_FEATURE_DBCONNECTIVITY
createRegistryInfo_FormOperations();
+#endif
bInit = sal_True;
}
}
diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx
index 0ca37a5..2e06b52 100644
--- a/forms/source/runtime/formoperations.cxx
+++ b/forms/source/runtime/formoperations.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
#include "formoperations.hxx"
#include "frm_strings.hxx"
@@ -1741,6 +1742,7 @@ namespace frm
{
f();
}
+#if HAVE_FEATURE_DBCONNECTIVITY
catch( const SQLException& e )
{
(void)e;
@@ -1753,6 +1755,7 @@ namespace frm
aInfo.prepend( sAdditionalError );
aInfo.doThrow();
}
+#endif
catch( const RuntimeException& ) { throw; }
catch( const Exception& )
{
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index 6bb809d..0bdee22 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -697,7 +697,6 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
sw/source/core/uibase/uno/unodispatch \
sw/source/core/uibase/uno/unodoc \
sw/source/core/uibase/uno/unofreg \
- sw/source/core/uibase/uno/unomailmerge \
sw/source/core/uibase/uno/unomod \
sw/source/core/uibase/uno/unomodule \
sw/source/core/uibase/uno/unotxdoc \
@@ -752,6 +751,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
sw/source/core/uibase/dbui/mailmergehelper \
sw/source/core/uibase/dbui/mmconfigitem \
sw/source/core/uibase/dbui/swdbtoolsclient \
+ sw/source/core/uibase/uno/unomailmerge \
))
endif
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index 25a0e2b..fafb713 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -1924,6 +1924,7 @@ void SwDoc::ChangeDBFields( const std::vector<OUString>& rOldNames,
switch( pFld->GetTyp()->Which() )
{
case RES_DBFLD:
+#if HAVE_FEATURE_DBCONNECTIVITY
if( IsNameInArray( rOldNames, lcl_DBDataToString(((SwDBField*)pFld)->GetDBData())))
{
SwDBFieldType* pOldTyp = (SwDBFieldType*)pFld->GetTyp();
@@ -1939,6 +1940,7 @@ void SwDoc::ChangeDBFields( const std::vector<OUString>& rOldNames,
bExpand = true;
}
+#endif
break;
case RES_DBSETNUMBERFLD:
@@ -2486,12 +2488,13 @@ void SwDocUpdtFld::GetBodyNode( const SwTxtFld& rTFld, sal_uInt16 nFldWhich )
SwGetExpField* pGetFld = (SwGetExpField*)rTFld.GetFmtFld().GetField();
pGetFld->ChgBodyTxtFlag( bIsInBody );
}
+#if HAVE_FEATURE_DBCONNECTIVITY
else if( RES_DBFLD == nFldWhich )
{
SwDBField* pDBFld = (SwDBField*)rTFld.GetFmtFld().GetField();
pDBFld->ChgBodyTxtFlag( bIsInBody );
}
-
+#endif
if( pNew != NULL )
if( !pFldSortLst->insert( pNew ).second )
delete pNew;
@@ -2698,6 +2701,7 @@ bool SwDoc::UpdateFld(SwTxtFld * pDstTxtFld, SwField & rSrcFld,
break;
case RES_DBFLD:
+#if HAVE_FEATURE_DBCONNECTIVITY
{
// JP 10.02.96: call ChgValue, so that the style change sets the
// ContentString correctly
@@ -2708,6 +2712,7 @@ bool SwDoc::UpdateFld(SwTxtFld * pDstTxtFld, SwField & rSrcFld,
pDBFld->ClearInitialized();
pDBFld->InitContent();
}
+#endif
// no break;
default:
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 9680a62..66eb19c58 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <doc.hxx>
#include <dcontact.hxx>
#include <com/sun/star/document/PrinterIndependentLayout.hpp>
@@ -398,8 +400,10 @@ SwDoc::SwDoc()
maStatsUpdateTimer.SetTimeout( 100 );
maStatsUpdateTimer.SetTimeoutHdl( LINK( this, SwDoc, DoIdleStatsUpdate ) );
+#if HAVE_FEATURE_DBCONNECTIVITY
// Create DBMgr
mpDBMgr = new SwDBMgr;
+#endif
// create TOXTypes
InitTOXTypes();
@@ -641,7 +645,9 @@ SwDoc::~SwDoc()
mpCharFmtTbl->erase( mpCharFmtTbl->begin() );
DELETEZ( mpPrt );
+#if HAVE_FEATURE_DBCONNECTIVITY
DELETEZ( mpDBMgr );
+#endif
// All Flys need to be destroyed before the Drawing Model,
// because Flys can still contain DrawContacts, when no
diff --git a/sw/source/core/uibase/app/applab.cxx b/sw/source/core/uibase/app/applab.cxx
index a029c05..db2951e 100644
--- a/sw/source/core/uibase/app/applab.cxx
+++ b/sw/source/core/uibase/app/applab.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <cstdarg>
#include <hintids.hxx>
@@ -157,8 +159,10 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel)
static sal_uInt16 nLabelTitleNo = 0;
static sal_uInt16 nBCTitleNo = 0;
+#if HAVE_FEATURE_DBCONNECTIVITY
// Create DB-Manager
boost::scoped_ptr<SwDBMgr> pDBMgr(new SwDBMgr);
+#endif
// Read SwLabItem from Config
SwLabCfgItem aLabCfg(bLabel);
@@ -170,7 +174,13 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel)
SwAbstractDialogFactory* pDialogFactory = SwAbstractDialogFactory::Create();
OSL_ENSURE(pDialogFactory, "SwAbstractDialogFactory fail!");
- boost::scoped_ptr<AbstractSwLabDlg> pDlg(pDialogFactory->CreateSwLabDlg(0, aSet, pDBMgr.get(), bLabel));
+ boost::scoped_ptr<AbstractSwLabDlg> pDlg(pDialogFactory->CreateSwLabDlg(0, aSet,
+#if HAVE_FEATURE_DBCONNECTIVITY
+ pDBMgr.get(),
+#else
+ NULL,
+#endif
+ bLabel));
OSL_ENSURE(pDlg, "Dialogdiet fail!");
if ( RET_OK == pDlg->Execute() )
diff --git a/sw/source/core/uibase/inc/uivwimp.hxx b/sw/source/core/uibase/inc/uivwimp.hxx
index 11ea988..5c2cdb8 100644
--- a/sw/source/core/uibase/inc/uivwimp.hxx
+++ b/sw/source/core/uibase/inc/uivwimp.hxx
@@ -19,6 +19,8 @@
#ifndef INCLUDED_SW_SOURCE_CORE_UIBASE_INC_UIVWIMP_HXX
#define INCLUDED_SW_SOURCE_CORE_UIBASE_INC_UIVWIMP_HXX
+#include <config_features.h>
+
#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <view.hxx>
@@ -103,9 +105,11 @@ class SwView_Impl
SwClipboardChangeListener* pClipEvtLstnr;
ShellModes eShellMode;
+#if HAVE_FEATURE_DBCONNECTIVITY
SwMailMergeConfigItem* pConfigItem;
sal_uInt16 nMailMergeRestartPage;
sal_Bool bMailMergeSourceView;
+#endif
sfx2::DocumentInserter* m_pDocInserter;
SfxRequest* m_pRequest;
@@ -136,6 +140,7 @@ public:
void AddTransferable(SwTransferable& rTransferable);
+#if HAVE_FEATURE_DBCONNECTIVITY
void SetMailMergeConfigItem(SwMailMergeConfigItem* pItem,
sal_uInt16 nRestart, sal_Bool bIsSource)
{ pConfigItem = pItem;
@@ -145,6 +150,7 @@ public:
SwMailMergeConfigItem* GetMailMergeConfigItem() {return pConfigItem;}
sal_uInt16 GetMailMergeRestartPage() const {return nMailMergeRestartPage;}
sal_Bool IsMailMergeSourceView() const { return bMailMergeSourceView; }
+#endif
//#i33307# restore editing position
void SetRestorePosition(const Point& rCrsrPos, bool bSelectObj)
diff --git a/sw/source/core/uibase/uiview/uivwimp.cxx b/sw/source/core/uibase/uiview/uivwimp.cxx
index 1eaa6e7..829a964 100644
--- a/sw/source/core/uibase/uiview/uivwimp.cxx
+++ b/sw/source/core/uibase/uiview/uivwimp.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <cmdid.h>
#include "globals.hrc"
@@ -58,9 +60,11 @@ SwView_Impl::SwView_Impl(SwView* pShell)
, pScanEvtLstnr(0)
, pClipEvtLstnr(0)
, eShellMode(SHELL_MODE_TEXT)
+#if HAVE_FEATURE_DBCONNECTIVITY
, pConfigItem(0)
, nMailMergeRestartPage(0)
, bMailMergeSourceView(sal_True)
+#endif
, m_pDocInserter(NULL)
, m_pRequest(NULL)
, m_nParam(0)
@@ -92,8 +96,9 @@ SwView_Impl::~SwView_Impl()
pClipEvtLstnr->AddRemoveListener( sal_False );
pClipEvtLstnr->ViewDestroyed();
}
+#if HAVE_FEATURE_DBCONNECTIVITY
delete pConfigItem;
-
+#endif
delete m_pDocInserter;
delete m_pRequest;
}
diff --git a/sw/source/core/uibase/uiview/view0.cxx b/sw/source/core/uibase/uiview/view0.cxx
index a13db11..6bc6c19 100644
--- a/sw/source/core/uibase/uiview/view0.cxx
+++ b/sw/source/core/uibase/uiview/view0.cxx
@@ -136,14 +136,16 @@ void SwView::ApplyAccessiblityOptions(SvtAccessibilityOptions& rAccessibilityOpt
}
-void SwView::SetMailMergeConfigItem(SwMailMergeConfigItem* pConfigItem,
+#if HAVE_FEATURE_DBCONNECTIVITY
+
+void SwView::SetMailMergeConfigItem(SwMailMergeConfigItem* pConfigItem,
sal_uInt16 nRestart, sal_Bool bIsSource)
{
m_pViewImpl->SetMailMergeConfigItem(pConfigItem, nRestart, bIsSource);
UIFeatureChanged();
}
-SwMailMergeConfigItem* SwView::GetMailMergeConfigItem()
+SwMailMergeConfigItem* SwView::GetMailMergeConfigItem()
{
return m_pViewImpl->GetMailMergeConfigItem();
}
@@ -158,6 +160,8 @@ sal_Bool SwView::IsMailMergeSourceView() const
return m_pViewImpl->IsMailMergeSourceView();
}
+#endif
+
static sal_Bool lcl_IsViewMarks( const SwViewOption& rVOpt )
{
return rVOpt.IsHardBlank() &&
diff --git a/sw/source/core/uibase/uiview/viewstat.cxx b/sw/source/core/uibase/uiview/viewstat.cxx
index df30fef..aded9e1 100644
--- a/sw/source/core/uibase/uiview/viewstat.cxx
+++ b/sw/source/core/uibase/uiview/viewstat.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <hintids.hxx>
#include <com/sun/star/linguistic2/XThesaurus.hpp>
#include <com/sun/star/uno/Sequence.hxx>
@@ -377,12 +379,14 @@ void SwView::GetState(SfxItemSet &rSet)
break;
case FN_MAILMERGE_SENDMAIL_CHILDWINDOW:
break;
+#if HAVE_FEATURE_DBCONNECTIVITY
case FN_MAILMERGE_CHILDWINDOW:
{
if(!GetMailMergeConfigItem())
rSet.DisableItem(nWhich);
}
break;
+#endif
case SID_ALIGN_ANY_LEFT :
case SID_ALIGN_ANY_HCENTER :
case SID_ALIGN_ANY_RIGHT :
@@ -518,7 +522,9 @@ bool SwView::HasUIFeature( sal_uInt32 nFeature )
switch(nFeature)
{
case CHILDWIN_LABEL : bRet = m_pWrtShell->IsLabelDoc(); break;
+#if HAVE_FEATURE_DBCONNECTIVITY
case CHILDWIN_MAILMERGE : bRet = 0 != GetMailMergeConfigItem(); break;
+#endif
}
return bRet;
}
More information about the Libreoffice-commits
mailing list