Removed File > Templates > Address Book Source... menu entry and its code
Conflicts: basctl/uiconfig/basicide/menubar/menubar.xml extensions/source/bibliography/uiconfig/sbibliography/menubar/menubar.xml framework/uiconfig/startmodule/menubar/menubar.xml sc/uiconfig/scalc/menubar/menubar.xml sd/uiconfig/sdraw/menubar/menubar.xml sd/uiconfig/simpress/menubar/menubar.xml sfx2/sdi/appslots.sdi sfx2/source/appl/appserv.cxx sfx2/source/doc/docvor.cxx sfx2/source/doc/docvor.hrc sfx2/source/doc/docvor.src svtools/source/dialogs/addresstemplate.cxx sw/uiconfig/sglobal/menubar/menubar.xml sw/uiconfig/sweb/menubar/menubar.xml sw/uiconfig/swform/menubar/menubar.xml sw/uiconfig/swreport/menubar/menubar.xml sw/uiconfig/swriter/menubar/menubar.xml sw/uiconfig/swxform/menubar/menubar.xml Change-Id: Iaec660c2d8da109bd644f5c88213fdb0c51a9c0f
This commit is contained in:
@@ -4042,11 +4042,6 @@
|
||||
<value xml:lang="x-no-translate"></value><value xml:lang="en-US">Do Not Mark Errors</value>
|
||||
</prop>
|
||||
</node>
|
||||
<node oor:name=".uno:AddressBookSource" oor:op="replace">
|
||||
<prop oor:name="Label" oor:type="xs:string">
|
||||
<value xml:lang="x-no-translate"></value><value xml:lang="en-US">~Address Book Source...</value>
|
||||
</prop>
|
||||
</node>
|
||||
<node oor:name=".uno:RubyDialog" oor:op="replace">
|
||||
<prop oor:name="Label" oor:type="xs:string">
|
||||
<value xml:lang="x-no-translate"></value><value xml:lang="en-US">As~ian phonetic guide...</value>
|
||||
|
@@ -4053,11 +4053,6 @@
|
||||
<value xml:lang="en-US">Do Not Mark Errors</value>
|
||||
</prop>
|
||||
</node>
|
||||
<node oor:name=".uno:AddressBookSource" oor:op="replace">
|
||||
<prop oor:name="Label" oor:type="xs:string">
|
||||
<value xml:lang="en-US">~Address Book Source...</value>
|
||||
</prop>
|
||||
</node>
|
||||
<node oor:name=".uno:RubyDialog" oor:op="replace">
|
||||
<prop oor:name="Label" oor:type="xs:string">
|
||||
<value xml:lang="en-US">As~ian phonetic guide...</value>
|
||||
|
@@ -123,11 +123,6 @@ interface Application
|
||||
ExecMethod = MiscExec_Impl ;
|
||||
StateMethod = MiscState_Impl ;
|
||||
]
|
||||
SID_TEMPLATE_ADDRESSBOKSOURCE // ole(no) api(final/play/rec)
|
||||
[
|
||||
ExecMethod = MiscExec_Impl ;
|
||||
StateMethod = MiscState_Impl ;
|
||||
]
|
||||
SID_ATTR_UNDO_COUNT // ole(no) api(final/play)
|
||||
[
|
||||
ExecMethod = PropExec_Impl ;
|
||||
|
@@ -336,31 +336,6 @@ SfxObjectItem AddDirect SID_NEWDOCDIRECT
|
||||
GroupId = GID_APPLICATION;
|
||||
]
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
SfxVoidItem AddressBookSource SID_TEMPLATE_ADDRESSBOKSOURCE
|
||||
()
|
||||
[
|
||||
/* flags: */
|
||||
AutoUpdate = FALSE,
|
||||
Cachable = Cachable,
|
||||
FastCall = FALSE,
|
||||
HasCoreId = FALSE,
|
||||
HasDialog = TRUE,
|
||||
ReadOnlyDoc = TRUE,
|
||||
Toggle = FALSE,
|
||||
Container = TRUE,
|
||||
RecordAbsolute = FALSE,
|
||||
RecordPerSet;
|
||||
Asynchron;
|
||||
|
||||
/* config: */
|
||||
AccelConfig = TRUE,
|
||||
MenuConfig = TRUE,
|
||||
StatusBarConfig = FALSE,
|
||||
ToolBoxConfig = TRUE,
|
||||
GroupId = GID_TEMPLATE;
|
||||
]
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
SfxVoidItem AddWatch SID_BASICIDE_ADDWATCH
|
||||
()
|
||||
|
@@ -45,7 +45,6 @@
|
||||
#include <comphelper/storagehelper.hxx>
|
||||
#include "comphelper/configurationhelper.hxx"
|
||||
|
||||
#include <svtools/addresstemplate.hxx>
|
||||
#include <svtools/miscopt.hxx>
|
||||
#include <svtools/restartdialog.hxx>
|
||||
#include <svl/visitem.hxx>
|
||||
@@ -600,14 +599,6 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
|
||||
break;
|
||||
}
|
||||
|
||||
case SID_TEMPLATE_ADDRESSBOKSOURCE:
|
||||
{
|
||||
svt::AddressBookSourceDialog aDialog(GetTopWindow(), ::comphelper::getProcessServiceFactory());
|
||||
aDialog.Execute();
|
||||
bDone = true;
|
||||
break;
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SCRIPTING
|
||||
case SID_BASICSTOP:
|
||||
StarBASIC::Stop();
|
||||
|
@@ -49,7 +49,6 @@ $(eval $(call gb_SrsTarget_add_files,svt/res,\
|
||||
svtools/source/control/ctrlbox.src \
|
||||
svtools/source/control/ctrltool.src \
|
||||
svtools/source/control/filectrl.src \
|
||||
svtools/source/dialogs/addresstemplate.src \
|
||||
svtools/source/dialogs/filedlg2.src \
|
||||
svtools/source/dialogs/formats.src \
|
||||
svtools/source/dialogs/so3res.src \
|
||||
|
@@ -123,7 +123,6 @@ $(eval $(call gb_Library_add_exception_objects,svt,\
|
||||
svtools/source/control/urlcontrol \
|
||||
svtools/source/control/valueacc \
|
||||
svtools/source/control/valueset \
|
||||
svtools/source/dialogs/addresstemplate \
|
||||
svtools/source/dialogs/colrdlg \
|
||||
svtools/source/dialogs/filedlg \
|
||||
svtools/source/dialogs/filedlg2 \
|
||||
@@ -231,7 +230,6 @@ $(eval $(call gb_Library_add_exception_objects,svt,\
|
||||
svtools/source/toolpanel/toolpaneldeckpeer \
|
||||
svtools/source/toolpanel/toolpaneldrawer \
|
||||
svtools/source/toolpanel/toolpaneldrawerpeer \
|
||||
svtools/source/uno/addrtempuno \
|
||||
svtools/source/uno/contextmenuhelper \
|
||||
svtools/source/uno/framestatuslistener \
|
||||
svtools/source/uno/generictoolboxcontroller \
|
||||
|
@@ -27,7 +27,6 @@ $(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/accessibilityoptions.h
|
||||
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/accessiblefactory.hxx,svtools/accessiblefactory.hxx))
|
||||
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/accessibletable.hxx,svtools/accessibletable.hxx))
|
||||
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/accessibletableprovider.hxx,svtools/accessibletableprovider.hxx))
|
||||
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/addresstemplate.hxx,svtools/addresstemplate.hxx))
|
||||
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/apearcfg.hxx,svtools/apearcfg.hxx))
|
||||
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/asynclink.hxx,svtools/asynclink.hxx))
|
||||
$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/bindablecontrolhelper.hxx,svtools/bindablecontrolhelper.hxx))
|
||||
|
@@ -1,155 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/*
|
||||
* This file is part of the LibreOffice project.
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* This file incorporates work covered by the following license notice:
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed
|
||||
* with this work for additional information regarding copyright
|
||||
* ownership. The ASF licenses this file to you under the Apache
|
||||
* License, Version 2.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
#ifndef _SVT_ADDRESSTEMPLATE_HXX_
|
||||
#define _SVT_ADDRESSTEMPLATE_HXX_
|
||||
|
||||
#include "svtools/svtdllapi.h"
|
||||
#include <vcl/dialog.hxx>
|
||||
#include <vcl/group.hxx>
|
||||
#include <vcl/fixed.hxx>
|
||||
#include <vcl/combobox.hxx>
|
||||
#include <vcl/button.hxx>
|
||||
#include <vcl/lstbox.hxx>
|
||||
#include <vcl/scrbar.hxx>
|
||||
#include <com/sun/star/container/XNameAccess.hpp>
|
||||
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
||||
#include <com/sun/star/util/AliasProgrammaticPair.hpp>
|
||||
#include <com/sun/star/sdb/XDatabaseContext.hpp>
|
||||
#include <com/sun/star/sdbc/XDataSource.hpp>
|
||||
#include <unotools/configitem.hxx>
|
||||
|
||||
// .......................................................................
|
||||
namespace svt
|
||||
{
|
||||
// .......................................................................
|
||||
|
||||
// ===================================================================
|
||||
// = AddressBookSourceDialog
|
||||
// ===================================================================
|
||||
struct AddressBookSourceDialogData;
|
||||
class SVT_DLLPUBLIC AddressBookSourceDialog : public ModalDialog
|
||||
{
|
||||
protected:
|
||||
// Controls
|
||||
FixedLine m_aDatasourceFrame;
|
||||
FixedText m_aDatasourceLabel;
|
||||
ComboBox m_aDatasource;
|
||||
PushButton m_aAdministrateDatasources;
|
||||
FixedText m_aTableLabel;
|
||||
ComboBox m_aTable;
|
||||
|
||||
FixedText m_aFieldsTitle;
|
||||
Window m_aFieldsFrame;
|
||||
|
||||
ScrollBar m_aFieldScroller;
|
||||
OKButton m_aOK;
|
||||
CancelButton m_aCancel;
|
||||
HelpButton m_aHelp;
|
||||
|
||||
// string to display for "no selection"
|
||||
const String m_sNoFieldSelection;
|
||||
|
||||
/// the DatabaseContext for selecting data sources
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::sdb::XDatabaseContext >
|
||||
m_xDatabaseContext;
|
||||
// the ORB for creating objects
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
|
||||
m_xORB;
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >
|
||||
m_xCurrentDatasourceTables;
|
||||
|
||||
AddressBookSourceDialogData*
|
||||
m_pImpl;
|
||||
|
||||
public:
|
||||
AddressBookSourceDialog( Window* _pParent,
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB );
|
||||
|
||||
/** if you use this ctor, the dialog
|
||||
<ul><li>will not store it's data in the configuration (nor initially retrieve it from there)</li>
|
||||
<li>will not allow to change the data source name</li>
|
||||
<li>will not allow to change the table name</li>
|
||||
<li>will not allow to call the data source administration dialog</li>
|
||||
</ul>
|
||||
|
||||
@param _rxORB
|
||||
a service factory to use for various UNO related needs
|
||||
@param _rxTransientDS
|
||||
the data source to obtain connections from
|
||||
@param _rDataSourceName
|
||||
the to-be name of _rxTransientDS. This is only for displaying this
|
||||
name to the user, since the dialog completely works on _rxTransientDS,
|
||||
and doesn't allow to change this.
|
||||
@param _rTable
|
||||
the table name to display. It must refer to a valid table, relative to a connection
|
||||
obtained from <arg>_rxTransientDS</arg>
|
||||
*/
|
||||
AddressBookSourceDialog( Window* _pParent,
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
|
||||
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource >& _rxTransientDS,
|
||||
const ::rtl::OUString& _rDataSourceName,
|
||||
const ::rtl::OUString& _rTable,
|
||||
const ::com::sun::star::uno::Sequence< ::com::sun::star::util::AliasProgrammaticPair >& _rMapping
|
||||
);
|
||||
|
||||
~AddressBookSourceDialog();
|
||||
|
||||
// to be used if the object was constructed for editing a field mapping only
|
||||
void getFieldMapping(
|
||||
::com::sun::star::uno::Sequence< ::com::sun::star::util::AliasProgrammaticPair >& _rMapping) const;
|
||||
|
||||
protected:
|
||||
void implConstruct();
|
||||
|
||||
// Window overridables
|
||||
virtual long PreNotify( NotifyEvent& _rNEvt );
|
||||
|
||||
// implementations
|
||||
void implScrollFields(sal_Int32 _nPos, sal_Bool _bAdjustFocus, sal_Bool _bAdjustScrollbar);
|
||||
void implSelectField(ListBox* _pBox, const String& _rText);
|
||||
|
||||
void initalizeListBox(ListBox* _pList);
|
||||
void resetTables();
|
||||
void resetFields();
|
||||
|
||||
// fill in the data sources listbox
|
||||
void initializeDatasources();
|
||||
|
||||
// initialize the dialog from the configuration data
|
||||
void loadConfiguration();
|
||||
|
||||
DECL_LINK(OnFieldScroll, ScrollBar*);
|
||||
DECL_LINK(OnFieldSelect, ListBox*);
|
||||
DECL_LINK(OnAdministrateDatasources, void*);
|
||||
DECL_LINK(OnComboGetFocus, ComboBox*);
|
||||
DECL_LINK(OnComboLoseFocus, ComboBox*);
|
||||
DECL_LINK(OnComboSelect, ComboBox*);
|
||||
DECL_LINK(OnOkClicked, void*);
|
||||
DECL_LINK(OnDelayedInitialize, void*);
|
||||
};
|
||||
|
||||
|
||||
// .......................................................................
|
||||
} // namespace svt
|
||||
// .......................................................................
|
||||
|
||||
#endif // _SVT_ADDRESSTEMPLATE_HXX_
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
@@ -219,7 +219,6 @@
|
||||
// dialogs
|
||||
|
||||
#define DLG_LOGIN (RID_SVTOOLS_START+113)
|
||||
#define DLG_ADDRESSBOOKSOURCE (RID_SVTOOLS_START+114)
|
||||
|
||||
//.............................................................................
|
||||
// bitmaps
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,313 +0,0 @@
|
||||
/*
|
||||
* This file is part of the LibreOffice project.
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* This file incorporates work covered by the following license notice:
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed
|
||||
* with this work for additional information regarding copyright
|
||||
* ownership. The ASF licenses this file to you under the Apache
|
||||
* License, Version 2.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
#include <svtools/svtools.hrc>
|
||||
#include "addresstemplate.hrc"
|
||||
#include <svtools/controldims.hrc>
|
||||
|
||||
#define FIELD_ROW_HEIGHT 17
|
||||
|
||||
ModalDialog DLG_ADDRESSBOOKSOURCE
|
||||
{
|
||||
HelpID = "svtools:ModalDialog:DLG_ADDRESSBOOKSOURCE";
|
||||
SVLook = TRUE ;
|
||||
OutputSize = TRUE ;
|
||||
Size = MAP_APPFONT ( 300 , 88 + FIELD_ROW_HEIGHT * FIELD_PAIRS_VISIBLE ) ;
|
||||
Hide = TRUE ;
|
||||
Moveable = TRUE ;
|
||||
Text [ en-US ] = "Templates: Address Book Assignment";
|
||||
|
||||
FixedLine FL_DATASOURCEFRAME
|
||||
{
|
||||
Text [ en-US ] = "Address Book Source";
|
||||
SVLook = TRUE ;
|
||||
Pos = MAP_APPFONT ( 6 , 2 ) ;
|
||||
Size = MAP_APPFONT ( 288 , RSC_CD_FIXEDLINE_HEIGHT ) ;
|
||||
};
|
||||
FixedText FT_DATASOURCE
|
||||
{
|
||||
Text [ en-US ] = "Data source";
|
||||
SVLook = TRUE ;
|
||||
Pos = MAP_APPFONT ( 12 , 15 ) ;
|
||||
Size = MAP_APPFONT ( 90 , 10 ) ;
|
||||
|
||||
Group = TRUE;
|
||||
};
|
||||
ComboBox CB_DATASOURCE
|
||||
{
|
||||
HelpID = "svtools:ComboBox:DLG_ADDRESSBOOKSOURCE:CB_DATASOURCE";
|
||||
SVLook = TRUE ;
|
||||
Pos = MAP_APPFONT ( 105, 13 ) ;
|
||||
Size = MAP_APPFONT ( 96, 55 ) ;
|
||||
|
||||
DropDown = TRUE;
|
||||
TabStop = TRUE;
|
||||
};
|
||||
PushButton PB_ADMINISTATE_DATASOURCES
|
||||
{
|
||||
HelpID = "svtools:PushButton:DLG_ADDRESSBOOKSOURCE:PB_ADMINISTATE_DATASOURCES";
|
||||
Text [ en-US ] = "~Address Data Source...";
|
||||
SVLook = TRUE ;
|
||||
Pos = MAP_APPFONT ( 204, 13 ) ;
|
||||
Size = MAP_APPFONT ( 90, 14 ) ;
|
||||
TabStop = TRUE;
|
||||
};
|
||||
FixedText FT_TABLE
|
||||
{
|
||||
Text [ en-US ] = "Table";
|
||||
SVLook = TRUE ;
|
||||
Pos = MAP_APPFONT ( 12 , 32 ) ;
|
||||
Size = MAP_APPFONT ( 90 , 10 ) ;
|
||||
|
||||
Group = TRUE;
|
||||
};
|
||||
ComboBox CB_TABLE
|
||||
{
|
||||
HelpID = "svtools:ComboBox:DLG_ADDRESSBOOKSOURCE:CB_TABLE";
|
||||
SVLook = TRUE ;
|
||||
Pos = MAP_APPFONT ( 105, 30 ) ;
|
||||
Size = MAP_APPFONT ( 96, 55 ) ;
|
||||
|
||||
DropDown = TRUE;
|
||||
TabStop = TRUE;
|
||||
};
|
||||
FixedText FT_FIELDS
|
||||
{
|
||||
Text [ en-US ] = "Field assignment";
|
||||
SVLook = TRUE ;
|
||||
Pos = MAP_APPFONT ( 6, 30 + RSC_CD_DROPDOWN_HEIGHT + RSC_SP_CTRL_Y ) ;
|
||||
Size = MAP_APPFONT ( 248 , RSC_CD_FIXEDTEXT_HEIGHT ) ;
|
||||
};
|
||||
Window CT_BORDER
|
||||
{
|
||||
Border = TRUE ;
|
||||
Pos = MAP_APPFONT ( 6, 30 + RSC_CD_DROPDOWN_HEIGHT + RSC_SP_CTRL_Y + RSC_CD_FIXEDTEXT_HEIGHT + RSC_SP_CTRL_DESC_Y ) ;
|
||||
Size = MAP_APPFONT ( 288 , 5 + FIELD_ROW_HEIGHT * FIELD_PAIRS_VISIBLE ) ;
|
||||
};
|
||||
|
||||
#define DECLARE_FIELD( row, column ) \
|
||||
FixedText FT_FIELD_BASE + row * 2 + column \
|
||||
{ \
|
||||
SVLook = TRUE ; \
|
||||
Pos = MAP_APPFONT ( 3 + column * 134, RSC_SP_CTRL_GROUP_Y + 2 + row * FIELD_ROW_HEIGHT ) ; \
|
||||
Size = MAP_APPFONT ( 79 , 10 ) ; \
|
||||
Group = TRUE; \
|
||||
}; \
|
||||
ListBox LB_FIELD_BASE + row * 2 + column \
|
||||
{ \
|
||||
SVLook = TRUE; \
|
||||
Pos = MAP_APPFONT ( 89 + column * 134, RSC_SP_CTRL_GROUP_Y + row * FIELD_ROW_HEIGHT ) ; \
|
||||
Size = MAP_APPFONT ( 42 , 14 ) ; \
|
||||
Border = TRUE; \
|
||||
DropDown = TRUE; \
|
||||
TabStop = TRUE; \
|
||||
}
|
||||
|
||||
#if FIELD_PAIRS_VISIBLE > 0
|
||||
DECLARE_FIELD( 0, 0 );
|
||||
DECLARE_FIELD( 0, 1 );
|
||||
#endif
|
||||
#if FIELD_PAIRS_VISIBLE > 1
|
||||
DECLARE_FIELD( 1, 0 );
|
||||
DECLARE_FIELD( 1, 1 );
|
||||
#endif
|
||||
#if FIELD_PAIRS_VISIBLE > 2
|
||||
DECLARE_FIELD( 3, 0 );
|
||||
DECLARE_FIELD( 3, 1 );
|
||||
#endif
|
||||
#if FIELD_PAIRS_VISIBLE > 3
|
||||
DECLARE_FIELD( 2, 0 );
|
||||
DECLARE_FIELD( 2, 1 );
|
||||
#endif
|
||||
#if FIELD_PAIRS_VISIBLE > 4
|
||||
DECLARE_FIELD( 4, 0 );
|
||||
DECLARE_FIELD( 4, 1 );
|
||||
#endif
|
||||
#if FIELD_PAIRS_VISIBLE > 5
|
||||
DECLARE_FIELD( 5, 0 );
|
||||
DECLARE_FIELD( 5, 1 );
|
||||
#endif
|
||||
|
||||
ScrollBar SB_FIELDSCROLLER
|
||||
{
|
||||
SVLook = TRUE;
|
||||
Pos = MAP_APPFONT ( 275, RSC_SP_CTRL_GROUP_Y ) ;
|
||||
Size = MAP_APPFONT ( 8 , 16 - RSC_SP_CTRL_GROUP_Y + FIELD_ROW_HEIGHT * (FIELD_PAIRS_VISIBLE - 1) ) ;
|
||||
};
|
||||
|
||||
OKButton PB_OK
|
||||
{
|
||||
SVLook = TRUE;
|
||||
DefButton = TRUE;
|
||||
Pos = MAP_APPFONT ( 137, 70 + FIELD_ROW_HEIGHT * FIELD_PAIRS_VISIBLE ) ;
|
||||
Size = MAP_APPFONT ( 50 , 14 ) ;
|
||||
};
|
||||
|
||||
CancelButton PB_CANCEL
|
||||
{
|
||||
SVLook = TRUE;
|
||||
Pos = MAP_APPFONT ( 190, 70 + FIELD_ROW_HEIGHT * FIELD_PAIRS_VISIBLE ) ;
|
||||
Size = MAP_APPFONT ( 50 , 14 ) ;
|
||||
};
|
||||
|
||||
HelpButton PB_HELP
|
||||
{
|
||||
SVLook = TRUE;
|
||||
Pos = MAP_APPFONT ( 244, 70 + FIELD_ROW_HEIGHT * FIELD_PAIRS_VISIBLE ) ;
|
||||
Size = MAP_APPFONT ( 50 , 14 ) ;
|
||||
};
|
||||
|
||||
String STR_LOGICAL_FIELD_NAMES
|
||||
{
|
||||
Text = "FirstName;LastName;Company;Department;Street;Zip;City;State;Country;PhonePriv;PhoneComp;PhoneOffice;PhoneCell;PhoneOther;Pager;Fax;EMail;URL;Title;Position;Code;AddrForm;AddrFormMail;Id;CalendarURL;InviteParticipant;Note;Altfield1;Altfield2;Altfield3;Altfield4";
|
||||
// no need to translate this
|
||||
// the items in this string have to be in the same order as the STR_FIELD_* strings are added to the
|
||||
// field label list of the dialog
|
||||
};
|
||||
|
||||
String STR_NO_FIELD_SELECTION
|
||||
{
|
||||
Text [ en-US ] = "<none>";
|
||||
};
|
||||
|
||||
String STR_FIELD_COMPANY
|
||||
{
|
||||
Text [ en-US ] = "Company";
|
||||
};
|
||||
String STR_FIELD_DEPARTMENT
|
||||
{
|
||||
Text [ en-US ] = "Department";
|
||||
};
|
||||
String STR_FIELD_FIRSTNAME
|
||||
{
|
||||
Text [ en-US ] = "First name";
|
||||
};
|
||||
String STR_FIELD_LASTNAME
|
||||
{
|
||||
Text [ en-US ] = "Last name";
|
||||
};
|
||||
String STR_FIELD_STREET
|
||||
{
|
||||
Text [ en-US ] = "Street";
|
||||
};
|
||||
String STR_FIELD_COUNTRY
|
||||
{
|
||||
Text [ en-US ] = "Country";
|
||||
};
|
||||
String STR_FIELD_ZIPCODE
|
||||
{
|
||||
Text [ en-US ] = "ZIP Code";
|
||||
};
|
||||
String STR_FIELD_CITY
|
||||
{
|
||||
Text [ en-US ] = "City";
|
||||
};
|
||||
String STR_FIELD_TITLE
|
||||
{
|
||||
Text [ en-US ] = "Title";
|
||||
};
|
||||
String STR_FIELD_POSITION
|
||||
{
|
||||
Text [ en-US ] = "Position";
|
||||
};
|
||||
String STR_FIELD_ADDRFORM
|
||||
{
|
||||
Text [ en-US ] = "Addr. Form";
|
||||
};
|
||||
String STR_FIELD_INITIALS
|
||||
{
|
||||
Text [ en-US ] = "Initials";
|
||||
};
|
||||
String STR_FIELD_SALUTATION
|
||||
{
|
||||
Text [ en-US ] = "Complimentary close";
|
||||
};
|
||||
String STR_FIELD_HOMETEL
|
||||
{
|
||||
Text [ en-US ] = "Tel: Home";
|
||||
};
|
||||
String STR_FIELD_WORKTEL
|
||||
{
|
||||
Text [ en-US ] = "Tel: Work";
|
||||
};
|
||||
String STR_FIELD_FAX
|
||||
{
|
||||
Text [ en-US ] = "FAX";
|
||||
};
|
||||
String STR_FIELD_EMAIL
|
||||
{
|
||||
Text [ en-US ] = "E-mail";
|
||||
};
|
||||
String STR_FIELD_URL
|
||||
{
|
||||
Text [ en-US ] = "URL";
|
||||
};
|
||||
String STR_FIELD_NOTE
|
||||
{
|
||||
Text [ en-US ] = "Note";
|
||||
};
|
||||
String STR_FIELD_USER1
|
||||
{
|
||||
Text [ en-US ] = "User 1";
|
||||
};
|
||||
String STR_FIELD_USER2
|
||||
{
|
||||
Text [ en-US ] = "User 2";
|
||||
};
|
||||
String STR_FIELD_USER3
|
||||
{
|
||||
Text [ en-US ] = "User 3";
|
||||
};
|
||||
String STR_FIELD_USER4
|
||||
{
|
||||
Text [ en-US ] = "User 4";
|
||||
};
|
||||
|
||||
String STR_FIELD_ID
|
||||
{
|
||||
Text [ en-US ] = "ID";
|
||||
};
|
||||
String STR_FIELD_STATE
|
||||
{
|
||||
Text [ en-US ] = "State";
|
||||
};
|
||||
String STR_FIELD_OFFICETEL
|
||||
{
|
||||
Text [ en-US ] = "Tel: Office";
|
||||
};
|
||||
String STR_FIELD_PAGER
|
||||
{
|
||||
Text [ en-US ] = "Pager";
|
||||
};
|
||||
String STR_FIELD_MOBILE
|
||||
{
|
||||
Text [ en-US ] = "Mobile";
|
||||
};
|
||||
String STR_FIELD_TELOTHER
|
||||
{
|
||||
Text [ en-US ] = "Tel: Other";
|
||||
};
|
||||
String STR_FIELD_CALENDAR
|
||||
{
|
||||
Text [ en-US ] = "Calendar";
|
||||
};
|
||||
String STR_FIELD_INVITE
|
||||
{
|
||||
Text [ en-US ] = "Invite";
|
||||
};
|
||||
};
|
@@ -1,228 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/*
|
||||
* This file is part of the LibreOffice project.
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* This file incorporates work covered by the following license notice:
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed
|
||||
* with this work for additional information regarding copyright
|
||||
* ownership. The ASF licenses this file to you under the Apache
|
||||
* License, Version 2.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
#include "svtools/genericunodialog.hxx"
|
||||
#include <svtools/addresstemplate.hxx>
|
||||
#include <comphelper/extract.hxx>
|
||||
#include <cppuhelper/typeprovider.hxx>
|
||||
#include <comphelper/property.hxx>
|
||||
#include <com/sun/star/sdbc/XDataSource.hpp>
|
||||
|
||||
// .......................................................................
|
||||
namespace svt
|
||||
{
|
||||
// .......................................................................
|
||||
|
||||
#define UNODIALOG_PROPERTY_ID_ALIASES 100
|
||||
#define UNODIALOG_PROPERTY_ALIASES "FieldMapping"
|
||||
|
||||
using namespace com::sun::star::uno;
|
||||
using namespace com::sun::star::lang;
|
||||
using namespace com::sun::star::util;
|
||||
using namespace com::sun::star::beans;
|
||||
using namespace com::sun::star::sdbc;
|
||||
|
||||
//=========================================================================
|
||||
//= OAddressBookSourceDialogUno
|
||||
//=========================================================================
|
||||
typedef OGenericUnoDialog OAddressBookSourceDialogUnoBase;
|
||||
class OAddressBookSourceDialogUno
|
||||
:public OAddressBookSourceDialogUnoBase
|
||||
,public ::comphelper::OPropertyArrayUsageHelper< OAddressBookSourceDialogUno >
|
||||
{
|
||||
protected:
|
||||
Sequence< AliasProgrammaticPair > m_aAliases;
|
||||
Reference< XDataSource > m_xDataSource;
|
||||
::rtl::OUString m_sDataSourceName;
|
||||
::rtl::OUString m_sTable;
|
||||
|
||||
protected:
|
||||
OAddressBookSourceDialogUno(const Reference< XMultiServiceFactory >& _rxORB);
|
||||
|
||||
public:
|
||||
// XTypeProvider
|
||||
virtual Sequence<sal_Int8> SAL_CALL getImplementationId( ) throw(RuntimeException);
|
||||
|
||||
// XServiceInfo
|
||||
virtual ::rtl::OUString SAL_CALL getImplementationName() throw(RuntimeException);
|
||||
virtual ::comphelper::StringSequence SAL_CALL getSupportedServiceNames() throw(RuntimeException);
|
||||
|
||||
// XServiceInfo - static methods
|
||||
static Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( RuntimeException );
|
||||
static ::rtl::OUString getImplementationName_Static(void) throw( RuntimeException );
|
||||
static Reference< XInterface >
|
||||
SAL_CALL Create(const Reference< com::sun::star::lang::XMultiServiceFactory >&);
|
||||
|
||||
// XPropertySet
|
||||
virtual Reference< XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(RuntimeException);
|
||||
virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
|
||||
|
||||
// OPropertyArrayUsageHelper
|
||||
virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
|
||||
|
||||
protected:
|
||||
// OGenericUnoDialog overridables
|
||||
virtual Dialog* createDialog(Window* _pParent);
|
||||
|
||||
virtual void implInitialize(const com::sun::star::uno::Any& _rValue);
|
||||
|
||||
virtual void executedDialog(sal_Int16 _nExecutionResult);
|
||||
};
|
||||
|
||||
|
||||
//=========================================================================
|
||||
//= OAddressBookSourceDialogUno
|
||||
//=========================================================================
|
||||
Reference< XInterface > SAL_CALL OAddressBookSourceDialogUno_CreateInstance( const Reference< XMultiServiceFactory >& _rxFactory)
|
||||
{
|
||||
return OAddressBookSourceDialogUno::Create(_rxFactory);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
OAddressBookSourceDialogUno::OAddressBookSourceDialogUno(const Reference< XMultiServiceFactory >& _rxORB)
|
||||
:OGenericUnoDialog(_rxORB)
|
||||
{
|
||||
registerProperty(::rtl::OUString(UNODIALOG_PROPERTY_ALIASES), UNODIALOG_PROPERTY_ID_ALIASES, PropertyAttribute::READONLY,
|
||||
&m_aAliases, getCppuType(&m_aAliases));
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
Sequence<sal_Int8> SAL_CALL OAddressBookSourceDialogUno::getImplementationId( ) throw(RuntimeException)
|
||||
{
|
||||
static ::cppu::OImplementationId aId;
|
||||
return aId.getImplementationId();
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
Reference< XInterface > SAL_CALL OAddressBookSourceDialogUno::Create(const Reference< XMultiServiceFactory >& _rxFactory)
|
||||
{
|
||||
return *(new OAddressBookSourceDialogUno(_rxFactory));
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
::rtl::OUString SAL_CALL OAddressBookSourceDialogUno::getImplementationName() throw(RuntimeException)
|
||||
{
|
||||
return getImplementationName_Static();
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
::rtl::OUString OAddressBookSourceDialogUno::getImplementationName_Static() throw(RuntimeException)
|
||||
{
|
||||
return ::rtl::OUString( "com.sun.star.comp.svtools.OAddressBookSourceDialogUno" );
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
::comphelper::StringSequence SAL_CALL OAddressBookSourceDialogUno::getSupportedServiceNames() throw(RuntimeException)
|
||||
{
|
||||
return getSupportedServiceNames_Static();
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
::comphelper::StringSequence OAddressBookSourceDialogUno::getSupportedServiceNames_Static() throw(RuntimeException)
|
||||
{
|
||||
::comphelper::StringSequence aSupported(1);
|
||||
aSupported.getArray()[0] = ::rtl::OUString( "com.sun.star.ui.AddressBookSourceDialog" );
|
||||
return aSupported;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
Reference<XPropertySetInfo> SAL_CALL OAddressBookSourceDialogUno::getPropertySetInfo() throw(RuntimeException)
|
||||
{
|
||||
Reference<XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) );
|
||||
return xInfo;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
::cppu::IPropertyArrayHelper& OAddressBookSourceDialogUno::getInfoHelper()
|
||||
{
|
||||
return *const_cast<OAddressBookSourceDialogUno*>(this)->getArrayHelper();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
::cppu::IPropertyArrayHelper* OAddressBookSourceDialogUno::createArrayHelper( ) const
|
||||
{
|
||||
Sequence< Property > aProps;
|
||||
describeProperties(aProps);
|
||||
return new ::cppu::OPropertyArrayHelper(aProps);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void OAddressBookSourceDialogUno::executedDialog(sal_Int16 _nExecutionResult)
|
||||
{
|
||||
OAddressBookSourceDialogUnoBase::executedDialog(_nExecutionResult);
|
||||
|
||||
if ( _nExecutionResult )
|
||||
if ( m_pDialog )
|
||||
static_cast< AddressBookSourceDialog* >( m_pDialog )->getFieldMapping( m_aAliases );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void OAddressBookSourceDialogUno::implInitialize(const com::sun::star::uno::Any& _rValue)
|
||||
{
|
||||
PropertyValue aVal;
|
||||
if (_rValue >>= aVal)
|
||||
{
|
||||
if (0 == aVal.Name.compareToAscii("DataSource"))
|
||||
{
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
sal_Bool bSuccess =
|
||||
#endif
|
||||
aVal.Value >>= m_xDataSource;
|
||||
OSL_ENSURE( bSuccess, "OAddressBookSourceDialogUno::implInitialize: invalid type for DataSource!" );
|
||||
return;
|
||||
}
|
||||
|
||||
if (0 == aVal.Name.compareToAscii("DataSourceName"))
|
||||
{
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
sal_Bool bSuccess =
|
||||
#endif
|
||||
aVal.Value >>= m_sDataSourceName;
|
||||
OSL_ENSURE( bSuccess, "OAddressBookSourceDialogUno::implInitialize: invalid type for DataSourceName!" );
|
||||
return;
|
||||
}
|
||||
|
||||
if (0 == aVal.Name.compareToAscii("Command"))
|
||||
{
|
||||
#if OSL_DEBUG_LEVEL > 0
|
||||
sal_Bool bSuccess =
|
||||
#endif
|
||||
aVal.Value >>= m_sTable;
|
||||
OSL_ENSURE( bSuccess, "OAddressBookSourceDialogUno::implInitialize: invalid type for Command!" );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
OAddressBookSourceDialogUnoBase::implInitialize( _rValue );
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
Dialog* OAddressBookSourceDialogUno::createDialog(Window* _pParent)
|
||||
{
|
||||
if ( m_xDataSource.is() && !m_sTable.isEmpty() )
|
||||
return new AddressBookSourceDialog(_pParent, m_aContext.getLegacyServiceFactory(), m_xDataSource, m_sDataSourceName, m_sTable, m_aAliases );
|
||||
else
|
||||
return new AddressBookSourceDialog( _pParent, m_aContext.getLegacyServiceFactory() );
|
||||
}
|
||||
|
||||
// .......................................................................
|
||||
} // namespace svt
|
||||
// .......................................................................
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
@@ -75,7 +75,6 @@ namespace
|
||||
|
||||
// -------------------------------------------------------------------------------------
|
||||
|
||||
DECLARE_CREATEINSTANCE_NAMESPACE( svt, OAddressBookSourceDialogUno )
|
||||
DECLARE_CREATEINSTANCE( SvFilterOptionsDialog )
|
||||
DECLARE_CREATEINSTANCE_NAMESPACE( unographic, GraphicProvider )
|
||||
DECLARE_CREATEINSTANCE_NAMESPACE( unographic, GraphicRendererVCL )
|
||||
@@ -92,19 +91,6 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL svt_component_getFactory (
|
||||
{
|
||||
Reference< XSingleServiceFactory > xFactory;
|
||||
if (rtl_str_compare (
|
||||
pImplementationName, "com.sun.star.comp.svtools.OAddressBookSourceDialogUno") == 0)
|
||||
{
|
||||
Sequence< OUString > aServiceNames(1);
|
||||
aServiceNames.getArray()[0] =
|
||||
OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.AddressBookSourceDialog" ));
|
||||
|
||||
xFactory = ::cppu::createSingleFactory (
|
||||
reinterpret_cast< XMultiServiceFactory* >( _pServiceManager ),
|
||||
OUString::createFromAscii( pImplementationName ),
|
||||
svt::OAddressBookSourceDialogUno_CreateInstance,
|
||||
aServiceNames);
|
||||
}
|
||||
else if (rtl_str_compare (
|
||||
pImplementationName, "com.sun.star.svtools.SvFilterOptionsDialog") == 0)
|
||||
{
|
||||
Sequence< OUString > aServiceNames(1);
|
||||
|
@@ -25,9 +25,6 @@
|
||||
<implementation name="com.sun.star.comp.graphic.GraphicRendererVCL">
|
||||
<service name="com.sun.star.graphic.GraphicRendererVCL"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.comp.svtools.OAddressBookSourceDialogUno">
|
||||
<service name="com.sun.star.ui.AddressBookSourceDialog"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.comp.svtools.uno.Wizard">
|
||||
<service name="com.sun.star.ui.dialogs.Wizard"/>
|
||||
</implementation>
|
||||
|
Reference in New Issue
Block a user