summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-04-22 13:03:06 +0300
committerTor Lillqvist <tml@collabora.com>2014-04-22 13:04:19 +0300
commitf12237c4c6239428b00dd4885a25bbc3b4f14368 (patch)
treec63ec38956f8abc92dc288739943a0cc083a879b
parente139290ca19b5cf00d1408925d918dbfddebe330 (diff)
More hacking on --disable-database-connectivity
Change-Id: Iefa6b104c60464e5a0d793bd676d8ea7ff2727c1
-rw-r--r--forms/Library_frm.mk11
-rw-r--r--forms/source/component/Filter.cxx17
-rw-r--r--forms/source/component/Filter.hxx4
-rw-r--r--forms/source/component/Grid.cxx6
-rw-r--r--forms/source/component/ListBox.cxx16
-rw-r--r--forms/source/misc/services.cxx6
-rw-r--r--forms/source/runtime/formoperations.cxx3
-rw-r--r--sw/Library_sw.mk2
-rw-r--r--sw/source/core/doc/docfld.cxx7
-rw-r--r--sw/source/core/doc/docnew.cxx6
-rw-r--r--sw/source/core/uibase/app/applab.cxx12
-rw-r--r--sw/source/core/uibase/inc/uivwimp.hxx6
-rw-r--r--sw/source/core/uibase/uiview/uivwimp.cxx7
-rw-r--r--sw/source/core/uibase/uiview/view0.cxx8
-rw-r--r--sw/source/core/uibase/uiview/viewstat.cxx6
15 files changed, 105 insertions, 12 deletions
diff --git a/forms/Library_frm.mk b/forms/Library_frm.mk
index d13043118e3c..93acb2df1e0f 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 976c82ff22ea..603178f8bd53 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 f61b7ab40820..51cfd651b470 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 7d4abec36133..f6a17b10497e 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 f812dc987c59..ea2d688603b6 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 02e0548d1d0b..c520e3c93572 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 0ca37a5ff244..2e06b5280853 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 6bb809d00cd1..0bdee22c9ec5 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 25a0e2b50ea4..fafb7137ea07 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 9680a62a1335..66eb19c588fd 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 a029c059fea4..db2951ebab16 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 11ea988d519a..5c2cdb89e58a 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 1eaa6e7131c6..829a9646c830 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 a13db11d95ec..6bc6c1995783 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 df30fefee526..aded9e11f98d 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;
}