Linux x86 build fix
[LibreOffice.git] / extensions / source / propctrlr / MasterDetailLinkDialog.cxx
blob7f87be710192023270268c65ac48516e935be116
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include "MasterDetailLinkDialog.hxx"
21 #include "formlinkdialog.hxx"
22 #include "pcrservices.hxx"
24 extern "C" void SAL_CALL createRegistryInfo_MasterDetailLinkDialog()
26 ::pcr::OAutoRegistration< ::pcr::MasterDetailLinkDialog > aAutoRegistration;
30 namespace pcr
34 using namespace ::com::sun::star::uno;
35 using namespace ::com::sun::star::lang;
36 using namespace ::com::sun::star::beans;
38 MasterDetailLinkDialog::MasterDetailLinkDialog(const Reference< XComponentContext >& _rxContext )
39 :OGenericUnoDialog( _rxContext )
43 Sequence<sal_Int8> SAL_CALL MasterDetailLinkDialog::getImplementationId( ) throw(RuntimeException, std::exception)
45 return css::uno::Sequence<sal_Int8>();
49 Reference< XInterface > SAL_CALL MasterDetailLinkDialog::Create( const Reference< XComponentContext >& _rxContext )
51 return *( new MasterDetailLinkDialog( _rxContext ) );
55 OUString SAL_CALL MasterDetailLinkDialog::getImplementationName() throw(RuntimeException, std::exception)
57 return getImplementationName_static();
61 OUString MasterDetailLinkDialog::getImplementationName_static() throw(RuntimeException)
63 return OUString("org.openoffice.comp.form.ui.MasterDetailLinkDialog");
67 ::comphelper::StringSequence SAL_CALL MasterDetailLinkDialog::getSupportedServiceNames() throw(RuntimeException, std::exception)
69 return getSupportedServiceNames_static();
73 ::comphelper::StringSequence MasterDetailLinkDialog::getSupportedServiceNames_static() throw(RuntimeException)
75 ::comphelper::StringSequence aSupported(1);
76 aSupported[0] = "com.sun.star.form.MasterDetailLinkDialog";
77 return aSupported;
81 Reference<XPropertySetInfo> SAL_CALL MasterDetailLinkDialog::getPropertySetInfo() throw(RuntimeException, std::exception)
83 Reference<XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) );
84 return xInfo;
88 ::cppu::IPropertyArrayHelper& MasterDetailLinkDialog::getInfoHelper()
90 return *getArrayHelper();
94 ::cppu::IPropertyArrayHelper* MasterDetailLinkDialog::createArrayHelper( ) const
96 Sequence< Property > aProps;
97 describeProperties(aProps);
98 return new ::cppu::OPropertyArrayHelper(aProps);
102 VclPtr<Dialog> MasterDetailLinkDialog::createDialog(vcl::Window* _pParent)
104 return VclPtr<FormLinkDialog>::Create(_pParent,m_xDetail,m_xMaster, m_aContext
105 ,m_sExplanation,m_sDetailLabel,m_sMasterLabel);
108 void MasterDetailLinkDialog::implInitialize(const Any& _rValue)
110 PropertyValue aProperty;
111 if (_rValue >>= aProperty)
113 if (aProperty.Name == "Detail")
115 OSL_VERIFY( aProperty.Value >>= m_xDetail );
116 return;
118 else if (aProperty.Name == "Master")
120 OSL_VERIFY( aProperty.Value >>= m_xMaster );
121 return;
123 else if (aProperty.Name == "Explanation")
125 OSL_VERIFY( aProperty.Value >>= m_sExplanation );
126 return;
128 else if (aProperty.Name == "DetailLabel")
130 OSL_VERIFY( aProperty.Value >>= m_sDetailLabel );
131 return;
133 else if (aProperty.Name == "MasterLabel")
135 OSL_VERIFY( aProperty.Value >>= m_sMasterLabel );
136 return;
139 MasterDetailLinkDialog_DBase::implInitialize(_rValue);
143 } // namespace pcr
146 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */