summaryrefslogtreecommitdiff
path: root/sw/source/ui/fldui/fldtdlg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/fldui/fldtdlg.cxx')
-rw-r--r--sw/source/ui/fldui/fldtdlg.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx
index cfaa6e23f91b..045252a575e8 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>
@@ -79,6 +81,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;
@@ -86,6 +89,7 @@ SwFieldDlg::SwFieldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, vcl::Window *pPa
if (bDatabaseFields)
m_nDbId = AddTabPage("database", SwFieldDBPage::Create, nullptr);
else
+#endif
RemoveTabPage("database");
}
else
@@ -276,6 +280,7 @@ void SwFieldDlg::InsertHdl()
void SwFieldDlg::ActivateDatabasePage()
{
+#if HAVE_FEATURE_DBCONNECTIVITY
m_bDataBaseMode = true;
ShowPage(m_nDbId);
SfxTabPage* pDBPage = GetTabPage(m_nDbId);
@@ -289,6 +294,7 @@ void SwFieldDlg::ActivateDatabasePage()
RemoveTabPage("docinfo");
RemoveTabPage("ref");
RemoveTabPage("functions");
+#endif
}
void SwFieldDlg::ShowReferencePage()
@@ -298,6 +304,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();
@@ -313,6 +320,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: */