summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-09-15 21:03:27 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-09-15 21:03:37 +0100
commitd2033373714ff1bb8a8808b702c85a8024f5a461 (patch)
tree2d2ffbdb6f6e785f75baceb8e464a885ea0fc400 /sw
parente20fe337d76f3a81b1acead279b63bb9beea03eb (diff)
survive disable-database-connectivity + docs with embedded database settings
Change-Id: I70c205cbff48844b645ace48bd6e001222f7855e
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/uno/SwXDocumentSettings.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/source/uibase/uno/SwXDocumentSettings.cxx b/sw/source/uibase/uno/SwXDocumentSettings.cxx
index b96ca0dd8355..45a111c0b213 100644
--- a/sw/source/uibase/uno/SwXDocumentSettings.cxx
+++ b/sw/source/uibase/uno/SwXDocumentSettings.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 <utility>
@@ -506,9 +508,11 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
break;
case HANDLE_EMBEDDED_DATABASE_NAME:
{
+#if HAVE_FEATURE_DBCONNECTIVITY
OUString sEmbeddedName;
if (rValue >>= sEmbeddedName)
mpDoc->GetDBManager()->setEmbeddedName(sEmbeddedName, *mpDocSh);
+#endif
}
break;
case HANDLE_SAVE_VERSION_ON_CLOSE:
@@ -998,7 +1002,11 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf
break;
case HANDLE_EMBEDDED_DATABASE_NAME:
{
+#if HAVE_FEATURE_DBCONNECTIVITY
rValue <<= mpDoc->GetDBManager()->getEmbeddedName();
+#else
+ rValue = uno::Any();
+#endif
}
break;
case HANDLE_SAVE_VERSION_ON_CLOSE: