2010-10-27 12:45:03 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
re-base on ALv2 code. Includes (at least) relevant parts of:
linecap: Reintegrating finished LineCap feature
Patch contributed by Regina Henschel
http://svn.apache.org/viewvc?view=revision&revision=1232507
Patches contributed by Sven Jacobi
impress212: #i81610# fixed animation export
http://svn.apache.org/viewvc?view=revision&revision=1167620
impress212: drawinglayer gbuild environment changes
http://svn.apache.org/viewvc?view=revision&revision=1167627
http://svn.apache.org/viewvc?view=revision&revision=1167628
impress212: DffPropSet -> minor code improvements, removing table
http://svn.apache.org/viewvc?view=revision&revision=1167634
impress212: #158494# fixed excel import (text rotation)
http://svn.apache.org/viewvc?view=revision&revision=1167638
Patches contributed by Armin Le Grand
Svg: Reintegrated Svg replacement from /branches/alg/svgreplavement
http://svn.apache.org/viewvc?view=revision&revision=1220836
#118728# changed indentifying definitions for Svg file detection
http://svn.apache.org/viewvc?view=revision&revision=1229961
#118838# LineGeometry creation for complicated cases optimized to
create single Polygons
http://svn.apache.org/viewvc?view=revision&revision=1236232
#119176# corrected file type detection for SVG for svg files
without xml header
http://svn.apache.org/viewvc?view=revision&revision=1309445
#118728# Extended Svg file detection
http://svn.apache.org/viewvc?view=revision&revision=1230531
#118529# solve break converters and convert commands for OLEs and images
http://svn.apache.org/viewvc?view=revision&revision=1186168
svg: added WaE changes from branch svgreplacement to trunc
http://svn.apache.org/viewvc?view=revision&revision=1222974
svg: corrected missing member initialization
http://svn.apache.org/viewvc?view=revision&revision=1226134
fix for #118525#: Using primitives for chart sub-geometry visualisation
http://svn.apache.org/viewvc?view=revision&revision=1226879
#118898# Adapted ImpGraphic::ImplGetBitmap to correctly convert
metafiles to bitmapEx ...
http://svn.apache.org/viewvc?view=revision&revision=1293316
fix for #118525#: removed no longer used variable maOriginalMapMode, one
more exception eliminated
http://svn.apache.org/viewvc?view=revision&revision=1227097
#16758# Added buffering to the VDev usages of the VclProcessor2D derivates...
http://svn.apache.org/viewvc?view=revision&revision=1229521
#116758# Secured VDev buffer device to Vcl deinit
http://svn.apache.org/viewvc?view=revision&revision=1230574
#116758# added remembering allocated VDevs for VDevBuffer to be able to also
delete these when vcl goes down; it should never happen, but You never know
http://svn.apache.org/viewvc?view=revision&revision=1230927
#118730# Changed SvgClipPathNode to use MaskPrimitive2D for primitive
representation instead of TransparencePrimitive2D
http://svn.apache.org/viewvc?view=revision&revision=1231198
#118822# secured 3D geometry creation (slices) by subdividing the 2D
source polyPolygon early
http://svn.apache.org/viewvc?view=revision&revision=1234749
#118829# enhanced Svg gradient quality, obstacles avoided
http://svn.apache.org/viewvc?view=revision&revision=1235361
#118834# Unified usage of TextBreakupHelper as single tooling class
for i18n text primitive breakup
http://svn.apache.org/viewvc?view=revision&revision=1236110
#118853# added square pixel size limit to conversion of
TransparencePrimitive2D to Metafile action
http://svn.apache.org/viewvc?view=revision&revision=1237656
#118824# coreccted mirroring and boundrect when the graphicmanager
is used for bitmap output
http://svn.apache.org/viewvc?view=revision&revision=1240097
#115092# Corrected VclProcessor2D::RenderPolygonStrokePrimitive2D for
various optimization scenarios
http://svn.apache.org/viewvc?view=revision&revision=1241434
#118783# Corrected errors in ID strings, corrected Svg line/fill export,
corrected polygon close state
http://svn.apache.org/viewvc?view=revision&revision=1232006
#118796# corrected null-pointer usage in SVG text exporter
http://svn.apache.org/viewvc?view=revision&revision=1240262
#118729# Use GraphicStreamUrl and GraphicUrl to allow multi image
import with linked graphics, too
http://svn.apache.org/viewvc?view=revision&revision=1229962
#118898# corrected error in GDIMetaFile::GetBoundRect in handling
MetaFloatTransparentAction
http://svn.apache.org/viewvc?view=revision&revision=1293349
#118855# Corrected handling of possibly created empty clipRegions
after PolyPolygon clipping
http://svn.apache.org/viewvc?view=revision&revision=1237725
#115962# Better (but not yet optimal, see comments in task) handling
of MetaFloatTransparentAction in PDF export
http://svn.apache.org/viewvc?view=revision&revision=1241078
IP clearance: #118466# This patch removes librsvg, libcroco, libgsf, ...
http://svn.apache.org/viewvc?view=revision&revision=1200879
118779# Added svg content streaming in/out to ImpGraphic stream operators
http://svn.apache.org/viewvc?view=revision&revision=1231908
linecap: correctons for WaE and mac drawing
http://svn.apache.org/viewvc?view=revision&revision=1232793
svg: uses current system Dpi for Svg replacement image creation
http://svn.apache.org/viewvc?view=revision&revision=1233948
Patches contributed by Mathias Bauer (and others)
gnumake4 work variously
http://svn.apache.org/viewvc?view=revision&revision=1394326
http://svn.apache.org/viewvc?view=revision&revision=1396797
http://svn.apache.org/viewvc?view=revision&revision=1397315
http://svn.apache.org/viewvc?view=revision&revision=1394326
Remove duplicate header includes.
cws mba34issues01: #i117720#: convert assertion into warning
http://svn.apache.org/viewvc?view=revision&revision=1172352
118485 - Styles for OLEs are not saved. Submitted by Armin Le Grand.
http://svn.apache.org/viewvc?view=revision&revision=1182166
cws mba34issues01: #i117714#: remove assertion
http://svn.apache.org/viewvc?view=revision&revision=1172357
Patch contributed by Jurgen Schmidt
add some additional checks to ensure proper reading operations
http://svn.apache.org/viewvc?view=revision&revision=1209022
mostly prefer our stream / bounds checking work.
Patches contributed by Herbert Duerr
#i118816# add clarifying comment regarding Font::*Color*() methods
http://svn.apache.org/viewvc?view=revision&revision=1233833
extend macro->string handling for empty strings
http://svn.apache.org/viewvc?view=revision&revision=1175801
avoid magic constants for SALCOLOR_NONE
http://svn.apache.org/viewvc?view=revision&revision=1177543
initialize slant properly in ImplFontMetricData constructor (author=iorsh)
http://svn.apache.org/viewvc?view=revision&revision=1177551
#i118675# make check for extension updates more stable
http://svn.apache.org/viewvc?view=revision&revision=1214797
#a118617# remove VBasicEventListener.dll binary
There are no known users depending on its CLSID
http://svn.apache.org/viewvc?view=revision&revision=1203697
Patches contributed by Ariel Constenla-Haile
Fix build breaker on Linux/gcc
http://svn.apache.org/viewvc?view=revision&revision=1221104
Fix crash when trying to instantiate css.graphic.GraphicRasterizer_RSVG
http://svn.apache.org/viewvc?view=revision&revision=1215559
Patches contributed by Oliver-Rainer Wittmann
sw34bf06: #i117962# - method <SwFlyFrm::IsPaint(..)> - consider
instances of <SwFlyDrawObj>
http://svn.apache.org/viewvc?view=revision&revision=1172120
sw34bf06: #i117783# - Writer's implementation of XPagePrintable -
apply print settings to new printing routines
http://svn.apache.org/viewvc?view=revision&revision=1172115
gnumake4 work variously from Hans-Joachim Lankenau
http://svn.apache.org/viewvc?view=revision&revision=1397315
http://svn.apache.org/viewvc?view=revision&revision=1396797
http://svn.apache.org/viewvc?view=revision&revision=1396782
http://svn.apache.org/viewvc?view=revision&revision=1394707
plus some amount of re-splitting of legacy headers.
Patch contributed by Pavel Janik
WaE: Remove unused variables.
http://svn.apache.org/viewvc?view=revision&revision=1230697
Patches contributed by Takashi Ono
mingwport35: i#117795: MinGW port fix for vcl2gnumake
http://svn.apache.org/viewvc?view=revision&revision=1172091
mingwport35: i#117795: MinGW port fix for vcl2gnumake
http://svn.apache.org/viewvc?view=revision&revision=1172091
Patch contributed by Christian Lippka
impress212: #i98044# re enable Text menu for outline and title shapes
http://svn.apache.org/viewvc?view=revision&revision=1167639
Patch contributed by Andre Fischer
118674: Made category B code optional and disabled by default.
http://svn.apache.org/viewvc?view=revision&revision=1215131
118881: Ignore empty paragraphs after bullets.
http://svn.apache.org/viewvc?view=revision&revision=1296205
Patches contributed by Philipp Lohmann
ooo340fixes: #i117780# use rtl allocator
http://svn.apache.org/viewvc?view=revision&revision=1172087
ooo34gsl02: #i117807# fix an off by one error (index actually
inside the pfb section header)
http://svn.apache.org/viewvc?view=revision&revision=1167576
various cleanups, related compilation fixes, warning cleanups, re-working
of obsolete stl template pieces to use boost instead, changed string
classes, re-adapt KDE about data, about dialog, fixing warnings,
and other fixes & improvements.
Disable svg import / render for about/ branding code-paths for now.
Restore full icon theme set.
Remove OS/2 conditionals and sources.
Remove conflicting gtk/full-screen monitors support.
Retain existing svg rasterizer files - temporarily disabled.
Standardize stringificaiton and fixup dllpostfix issues.
Rename SvgGradientHelper::== to equalTo to avoid overloading issues.
Use the flat GdiPlus API for LineCaps calls.
2012-10-09 12:22:23 +01:00
|
|
|
/*
|
|
|
|
* 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 .
|
|
|
|
*/
|
2001-08-01 10:06:48 +00:00
|
|
|
|
2014-04-18 20:41:29 +02:00
|
|
|
#ifndef INCLUDED_EXTENSIONS_SOURCE_ABPILOT_ABSPILOT_HXX
|
|
|
|
#define INCLUDED_EXTENSIONS_SOURCE_ABPILOT_ABSPILOT_HXX
|
2001-08-01 10:06:48 +00:00
|
|
|
|
2019-08-03 20:31:00 +01:00
|
|
|
#include <vcl/roadmapwizard.hxx>
|
2001-08-01 10:06:48 +00:00
|
|
|
#include "addresssettings.hxx"
|
|
|
|
#include "datasourcehandling.hxx"
|
|
|
|
|
2019-09-12 16:17:30 +01:00
|
|
|
using vcl::WizardTypes::WizardState;
|
|
|
|
using vcl::WizardTypes::CommitPageReason;
|
|
|
|
|
2001-08-01 10:06:48 +00:00
|
|
|
namespace abp
|
|
|
|
{
|
2019-08-29 20:17:53 +01:00
|
|
|
typedef ::vcl::RoadmapWizardMachine OAddressBookSourcePilot_Base;
|
2017-11-02 09:42:24 +02:00
|
|
|
class OAddressBookSourcePilot final : public OAddressBookSourcePilot_Base
|
2001-08-01 10:06:48 +00:00
|
|
|
{
|
2015-09-30 11:48:44 +02:00
|
|
|
css::uno::Reference< css::uno::XComponentContext >
|
2001-08-01 10:06:48 +00:00
|
|
|
m_xORB;
|
|
|
|
AddressSettings m_aSettings;
|
|
|
|
|
|
|
|
ODataSource m_aNewDataSource;
|
|
|
|
AddressSourceType m_eNewDataSourceType;
|
|
|
|
|
|
|
|
public:
|
|
|
|
/// ctor
|
2016-05-01 12:41:18 +02:00
|
|
|
OAddressBookSourcePilot(
|
2019-08-29 20:17:53 +01:00
|
|
|
weld::Window* _pParent,
|
2015-09-30 11:48:44 +02:00
|
|
|
const css::uno::Reference< css::uno::XComponentContext >& _rxORB);
|
2001-08-01 10:06:48 +00:00
|
|
|
|
2019-08-29 20:17:53 +01:00
|
|
|
virtual short run() override;
|
|
|
|
|
2001-08-01 10:06:48 +00:00
|
|
|
/// get the service factory which was used to create the dialog
|
2015-09-30 11:48:44 +02:00
|
|
|
const css::uno::Reference< css::uno::XComponentContext >&
|
2019-09-25 13:29:49 +02:00
|
|
|
getORB() const { return m_xORB; }
|
2001-08-01 10:06:48 +00:00
|
|
|
AddressSettings& getSettings() { return m_aSettings; }
|
|
|
|
const AddressSettings& getSettings() const { return m_aSettings; }
|
|
|
|
|
|
|
|
const ODataSource& getDataSource() const { return m_aNewDataSource; }
|
|
|
|
|
2014-04-30 11:46:15 +02:00
|
|
|
bool connectToDataSource( bool _bForceReConnect );
|
2001-08-01 10:06:48 +00:00
|
|
|
|
2016-05-01 12:41:18 +02:00
|
|
|
void travelNext( ) { OAddressBookSourcePilot_Base::travelNext(); }
|
2001-08-01 10:06:48 +00:00
|
|
|
|
2004-05-19 12:37:21 +00:00
|
|
|
/// to be called when the selected type changed
|
|
|
|
void typeSelectionChanged( AddressSourceType _eType );
|
|
|
|
|
2017-11-02 09:42:24 +02:00
|
|
|
private:
|
2001-08-01 10:06:48 +00:00
|
|
|
// OWizardMachine overridables
|
2019-09-20 20:29:36 +01:00
|
|
|
virtual std::unique_ptr<BuilderPage> createPage( WizardState _nState ) override;
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void enterState( WizardState _nState ) override;
|
|
|
|
virtual bool prepareLeaveCurrentState( CommitPageReason _eReason ) override;
|
|
|
|
virtual bool onFinish() override;
|
2004-05-19 12:37:21 +00:00
|
|
|
|
|
|
|
// RoadmapWizard
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual OUString getStateDisplayName( WizardState _nState ) const override;
|
2001-08-01 10:06:48 +00:00
|
|
|
|
|
|
|
/** creates a new data source of the type indicated by m_aSettings
|
|
|
|
<p>If another data source has been created before, this one is deleted.</p>
|
|
|
|
*/
|
|
|
|
void implCreateDataSource();
|
|
|
|
|
|
|
|
/// does an automatic field mapping (possible for all types except AST_OTHER)
|
|
|
|
void implDoAutoFieldMapping();
|
|
|
|
|
|
|
|
/// guesses a default for the table name, if no valid table is selected
|
|
|
|
void implDefaultTableName();
|
|
|
|
|
2017-03-03 20:57:02 +01:00
|
|
|
static bool needAdminInvokationPage( AddressSourceType _eType )
|
2004-05-19 12:37:21 +00:00
|
|
|
{
|
2015-10-23 18:39:07 +02:00
|
|
|
return ( AST_OTHER == _eType );
|
2004-05-19 12:37:21 +00:00
|
|
|
}
|
2001-08-01 10:06:48 +00:00
|
|
|
/// check if with the current settings, we would need to invoke he administration dialog for more details about the data source
|
2017-03-03 20:57:02 +01:00
|
|
|
bool needAdminInvokationPage() const
|
2001-08-01 10:06:48 +00:00
|
|
|
{
|
2004-05-19 12:37:21 +00:00
|
|
|
return needAdminInvokationPage( m_aSettings.eType );
|
2001-08-01 10:06:48 +00:00
|
|
|
}
|
|
|
|
|
2017-03-03 20:57:02 +01:00
|
|
|
static bool needManualFieldMapping( AddressSourceType _eType )
|
2004-05-19 12:37:21 +00:00
|
|
|
{
|
CWS-TOOLING: integrate CWS evoab2def
2009-05-28 16:00:19 +0200 fs r272412 : don't use createFalse - Evo 2.22 simply hangs when ask for all contacts without a first name. Instead, in the WHERE 0=1 case, simply create an empty result set
2009-05-22 14:25:51 +0200 fs r272193 : #i10000#
2009-05-22 14:25:37 +0200 fs r272192 : oops, ENABLE_EVOAB2 for some platforms only, not generically
2009-05-22 14:19:00 +0200 fs r272191 : #i10000#
2009-05-22 12:42:38 +0200 fs r272183 : when sorting, properly use a syslocale collator, instead of comparing the numerical values of the string's UTF-16 code points
2009-05-20 15:09:00 +0200 fs r272131 : clear/getWarnings: also allowed without cache
2009-05-20 14:11:19 +0200 fs r272128 : removed debug traces
2009-05-20 14:03:31 +0200 fs r272126 : #i55701# +STR_SORT_BY_COL_ONLY
2009-05-20 14:02:29 +0200 fs r272125 : implement sorting
2009-05-20 10:10:19 +0200 fs r272107 : #i10000#
2009-05-19 16:02:17 +0200 fs r272089 : #i10000#
2009-05-19 16:02:02 +0200 fs r272088 : #i55701# strings for new error condition DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 16:01:31 +0200 fs r272087 : #i55701# use DATA_CANNOT_SELECT_UNFILTERED as standardized error code
2009-05-19 15:59:59 +0200 fs r272086 : #i55701# +DATA_CANNOT_SELECT_UNFILTERED
2009-05-19 15:46:12 +0200 fs r272084 : #i55701# recognize the DATA_CANNOT_SELECT_UNFILTERED error condition, and allow filtering in this case, even when the result set is empty
2009-05-19 09:06:50 +0200 fs r272059 : merging changes from CWS dba32b, to prevent future conflicts with upcoming local changes
2009-05-18 21:48:58 +0200 fs r272054 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:48:42 +0200 fs r272053 : accessing a non-local unfiltered address book now returns an empty result set, and reports a warning, instead of ungracefully failing
2009-05-18 21:47:41 +0200 fs r272052 : +setExternalWarnings
2009-05-18 21:47:12 +0200 fs r272051 : #i55701# when re/loading the form, display any possible warnings
2009-05-18 21:43:26 +0200 fs r272050 : #i55701# implement XWarningsSupplier, exposing the warnings of our result set
2009-05-18 21:42:51 +0200 fs r272049 : #i55701# implement XWarningsSupplier, exposing the warnings of our aggregate RowSet
2009-05-18 17:53:59 +0200 fs r272041 : #i55701# moved the (I)WarningsContainer from dbaccess to connectivity, to be able to use it in the latter module, too
2009-05-18 17:24:10 +0200 fs r272040 : #i55701# properly enable the various Evolution types
2009-05-18 14:52:19 +0200 fs r272024 : #i55701# properly enable the Evolution types
2009-05-18 13:57:10 +0200 fs r272018 : fixed/extended whereAnalysis (column searching still not enabled, as neither LIKE nor = seem to work with my (somewhat older) Evolution version)
2009-05-18 13:56:08 +0200 fs r272017 : extended showParseTree
2009-05-18 13:55:25 +0200 fs r272016 : extended showParseTree
2009-05-18 11:40:16 +0200 fs r272008 : #i55701#
2009-05-18 11:39:02 +0200 fs r272006 : let the PreparedStatement return proper meta data, too
2009-05-18 10:05:37 +0200 fs r271999 : moved the XStatement interface to from OCommonStatement to OStatement - the former class is also the base for other classes which should not have this interface
2009-05-15 21:53:22 +0200 fs r271973 : collectColumnInformation: report invalid meta data as assertion
2009-05-15 21:51:40 +0200 fs r271972 : showParseTree should be const
2009-05-15 21:51:26 +0200 fs r271971 : showParseTree should be const
2009-05-15 21:51:03 +0200 fs r271970 : properly recognize the 'WHERE 0 = 1' clause, this way having proper statement meta data, this way saving much much calls from the DBA framework
2009-05-15 20:29:03 +0200 fs r271969 : cleaned up the mess with the statement classes
2009-05-15 15:51:11 +0200 fs r271944 : let the result set properly init its meta data
2009-05-15 15:29:54 +0200 fs r271939 : proper property implementations for the resultset class
2009-05-15 15:01:31 +0200 fs r271936 : proper property implementations for the statement class
2009-05-08 14:46:33 +0200 fs r271717 : component_foo must be PUBLIC
2009-05-06 09:20:05 +0200 fs r271565 : #i10000# (warnings on unxlngi6)
2009-05-06 09:01:30 +0200 fs r271564 : #i101493#
2009-05-05 23:08:12 +0200 fs r271560 : #i55701# merging the changes from the ancient (CVS-based) CWS evoab2default into this CWS here
2009-06-05 12:31:05 +00:00
|
|
|
return ( AST_OTHER == _eType ) || ( AST_KAB == _eType ) ||
|
|
|
|
( AST_EVOLUTION == _eType ) || ( AST_EVOLUTION_GROUPWISE == _eType ) ||
|
|
|
|
( AST_EVOLUTION_LDAP == _eType );
|
2004-05-19 12:37:21 +00:00
|
|
|
}
|
2001-08-01 10:06:48 +00:00
|
|
|
/// checks if we need a manual (user-guided) field mapping
|
2017-03-03 20:57:02 +01:00
|
|
|
bool needManualFieldMapping() const
|
2001-08-01 10:06:48 +00:00
|
|
|
{
|
2004-05-19 12:37:21 +00:00
|
|
|
return needManualFieldMapping( m_aSettings.eType );
|
2001-08-01 10:06:48 +00:00
|
|
|
}
|
|
|
|
|
2008-03-06 17:36:08 +00:00
|
|
|
/// determines whether the given address book type does provide one table only
|
2017-03-03 20:57:02 +01:00
|
|
|
static bool needTableSelection( AddressSourceType _eType )
|
2008-03-06 17:36:08 +00:00
|
|
|
{
|
2015-10-23 18:39:07 +02:00
|
|
|
return ( AST_KAB != _eType );
|
2008-03-06 17:36:08 +00:00
|
|
|
}
|
|
|
|
|
2001-08-01 10:06:48 +00:00
|
|
|
void implCleanup();
|
|
|
|
void implCommitAll();
|
2004-05-19 12:37:21 +00:00
|
|
|
|
2008-03-11 07:56:26 +00:00
|
|
|
void impl_updateRoadmap( AddressSourceType _eType );
|
2001-08-01 10:06:48 +00:00
|
|
|
};
|
|
|
|
} // namespace abp
|
2014-02-25 18:36:00 +01:00
|
|
|
|
2014-04-18 20:41:29 +02:00
|
|
|
#endif // INCLUDED_EXTENSIONS_SOURCE_ABPILOT_ABSPILOT_HXX
|
2001-08-01 10:06:48 +00:00
|
|
|
|
2010-10-27 12:45:03 +01:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|