28#include <core_resource.hxx>
36#include <com/sun/star/frame/XTitleChangeListener.hpp>
37#include <com/sun/star/sdb/CommandType.hpp>
38#include <com/sun/star/sdb/SQLContext.hpp>
39#include <com/sun/star/sdbc/ColumnValue.hpp>
40#include <com/sun/star/sdbc/SQLWarning.hpp>
41#include <com/sun/star/sdbcx/KeyType.hpp>
42#include <com/sun/star/sdbcx/XAlterTable.hpp>
43#include <com/sun/star/sdbcx/XAppend.hpp>
44#include <com/sun/star/sdbcx/XDataDescriptorFactory.hpp>
45#include <com/sun/star/sdbcx/XDrop.hpp>
46#include <com/sun/star/sdbcx/XIndexesSupplier.hpp>
47#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
62extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
64 css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any>
const& )
66 return cppu::acquire(new ::dbaui::OTableController(context));
82using namespace ::
dbaui;
90 void dropTable(
const Reference<XNameAccess>& _rxTable,
const OUString& _sTableName)
92 if ( _rxTable->hasByName(_sTableName) )
94 Reference<XDrop> xNameCont(_rxTable,UNO_QUERY);
95 OSL_ENSURE(xNameCont.is(),
"No drop interface for tables!");
97 xNameCont->dropByName(_sTableName);
102OUString SAL_CALL OTableController::getImplementationName()
104 return "org.openoffice.comp.dbu.OTableDesign";
109 return {
"com.sun.star.sdb.TableDesign" };
113 ,m_sTypeNames(
DBA_RES(STR_TABLEDESIGN_DBFIELDTYPES))
114 ,m_bAllowAutoIncrementValue(false)
134 xComponent->addEventListener(
static_cast<XModifyListener*
>(
this));
141 xComponent->removeEventListener(
static_cast<XModifyListener*
>(
this));
170 aReturn.
bEnabled = isConnected() && isEditable();
187 case SID_INDEXDESIGN:
189 ( ( ((!
m_bNew && impl_isModified()) || impl_isModified())
211 setEditable(!isEditable());
215 InvalidateFeature(SID_BROWSER_CLEAR_QUERY);
233 case SID_INDEXDESIGN:
239 InvalidateFeature(_nId);
248 if (!xTablesSup.is())
250 OUString aMessage(
DBA_RES(STR_TABLEDESIGN_CONNECTION_MISSING));
263 bNew = bNew ||
m_bNew || _bSaveAs;
267 xTables = xTablesSup->getTables();
268 OSL_ENSURE(xTables.is(),
"The tables can't be null!");
269 bNew = bNew || (xTables.is() && !xTables->hasByName(
m_sName));
275 OUString aDefaultName =
aName.getToken(0,
' ');
276 aDefaultName = ::dbtools::createUniqueName(xTables,aDefaultName);
294 OSL_FAIL(
"OTableController::doSaveDoc: nothing is expected to happen here!");
309 if(bNew || !xTables->hasByName(
m_sName))
314 OSL_ENSURE(xFact.is(),
"OTableController::doSaveDoc: No XDataDescriptorFactory available!");
315 xTable = xFact->createDataDescriptor();
316 OSL_ENSURE(xTable.is(),
"OTableController::doSaveDoc: Create query failed!");
333 OSL_ENSURE(xAppend.is(),
"OTableController::doSaveDoc: No XAppend Interface!");
334 xAppend->appendByDescriptor(xTable);
340 m_sName = ::dbtools::composeTableName(
getConnection()->getMetaData(), xTable, ::dbtools::EComposeRule::InDataManipulation,
false );
346 if ( xEventListener.is() )
348 frame::TitleChangedEvent
aEvent;
349 xEventListener->titleChanged(
aEvent);
351 releaseNumberForComponent();
360 catch(
const SQLContext& e)
364 catch(
const SQLWarning& e)
368 catch(
const SQLException& e)
372 catch(
const ElementExistException& )
374 OUString sText(
DBA_RES( STR_NAME_ALREADY_EXISTS ) );
375 sText = sText.replaceFirst(
"#" ,
m_sName);
399 return ! (aInfo.
isValid() || bError);
405 if (
m_bNew || isModified())
408 VclMessageType::Question, VclButtonsType::YesNo,
409 DBA_RES(STR_QUERY_SAVE_TABLE_EDIT_INDEXES)));
416 OSL_ENSURE(!
m_bNew && !isModified(),
"OTableController::doEditIndexes: what the hell did doSaveDoc do?");
425 if (xIndexesSupp.is())
427 xIndexes = xIndexesSupp->getIndexes();
428 OSL_ENSURE(xIndexes.is(),
"OTableController::doEditIndexes: no keys got from the indexes supplier!");
431 OSL_FAIL(
"OTableController::doEditIndexes: should never have reached this (no indexes supplier)!");
435 OSL_ENSURE(xColSupp.is(),
"OTableController::doEditIndexes: no columns supplier!");
439 OSL_ENSURE(xCols.is(),
"OTableController::doEditIndexes: no columns!");
462 OTableController_BASE::impl_initialize();
482 catch(
const SQLException&)
504 OTableController_BASE::Construct(pParent);
510 if ( getBroadcastHelper().bInDispose || getBroadcastHelper().bDisposed )
514 ::osl::MutexGuard aGuard(
getMutex() );
525 std::unique_ptr<weld::Builder> xBuilder(
Application::CreateBuilder(getFrameWeld(),
"dbaccess/ui/tabledesignsavemodifieddialog.ui"));
526 std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog(
"TableDesignSaveModifiedDialog"));
527 switch (xQuery->run())
544 std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog(
"DeleteAllRowsDialog"));
545 switch (xQuery->run())
557 OSL_FAIL(
"OTableController::suspend: nothing is expected to happen here!");
576 OSingleDocumentController::describeSupportedFeatures();
578 implDescribeSupportedFeature(
".uno:Redo",
ID_BROWSER_REDO, CommandGroup::EDIT );
580 implDescribeSupportedFeature(
".uno:Undo",
ID_BROWSER_UNDO, CommandGroup::EDIT );
581 implDescribeSupportedFeature(
".uno:NewDoc", SID_NEWDOC, CommandGroup::DOCUMENT );
583 implDescribeSupportedFeature(
".uno:DBIndexDesign", SID_INDEXDESIGN, CommandGroup::APPLICATION );
584 implDescribeSupportedFeature(
".uno:EditDoc",
ID_BROWSER_EDITDOC, CommandGroup::EDIT );
585 implDescribeSupportedFeature(
".uno:GetUndoStrings", SID_GETUNDOSTRINGS );
586 implDescribeSupportedFeature(
".uno:GetRedoStrings", SID_GETREDOSTRINGS );
591 OSingleDocumentController::impl_onModifyChanged();
592 InvalidateFeature( SID_INDEXDESIGN );
611 OTableController_BASE::losingConnection( );
618 xComponent->removeEventListener(xEvtL);
641 OSL_ENSURE(_rxColSup.is(),
"No columns supplier");
645 OSL_ENSURE(xColumns.is(),
"No columns");
649 OSL_ENSURE(xAppend.is(),
"No XAppend Interface!");
653 OSL_ENSURE(row,
"OTableRow is null!");
655 if ( !pField || (!_bNew && row->IsReadOnly() && !_bKeyColumns) )
660 xColumn = xColumnFactory->createDataDescriptor();
668 xAppend->appendByDescriptor(
xColumn);
671 if(xColumns->hasByName(pField->
GetName()))
679 OSL_FAIL(
"OTableController::appendColumns: invalid field name!");
685 catch(
const SQLException& )
700 OSL_ENSURE(_rxSup.is(),
"No XKeysSupplier!");
705 const sal_Int32
nCount = xKeys->getCount();
708 xKeys->getByIndex(
i) >>= xProp;
709 sal_Int32 nKeyType = 0;
711 if(KeyType::PRIMARY == nKeyType)
717 OSL_ENSURE(xKeyFactory.is(),
"No XDataDescriptorFactory Interface!");
718 if ( !xKeyFactory.is() )
721 OSL_ENSURE(xAppend.is(),
"No XAppend Interface!");
724 OSL_ENSURE(xKey.is(),
"Key is null!");
732 if(xColumns->hasElements())
733 xAppend->appendByDescriptor(xKey);
742 std::shared_ptr<OTableRow> pTabEdRow;
748 OSL_ENSURE(xColSup.is(),
"No XColumnsSupplier!");
761 xColumns->getByName(rColumn) >>=
xColumn;
763 sal_Int32 nScale = 0;
764 sal_Int32 nPrecision = 0;
766 sal_Int32 nFormatKey = 0;
767 sal_Int32 nAlign = 0;
769 bool bIsAutoIncrement =
false, bIsCurrency =
false;
770 OUString
sName,sDescription,sTypeName,sHelpText;
794 pTabEdRow = std::make_shared<OTableRow>();
795 pTabEdRow->SetReadOnly(!bIsAlterAllowed);
801 pTabEdRow->SetFieldType( pTypeInfo, bForce );
804 OSL_ENSURE(pActFieldDescr,
"OTableController::loadData: invalid field description generated by the table row!");
805 if ( pActFieldDescr )
828 for(
const OUString& rKeyColumn : aKeyColumnNames)
830 for(std::shared_ptr<OTableRow>
const& pRow :
m_vRowList)
832 if(pRow->GetActFieldDescr()->GetName() == rKeyColumn)
834 pRow->SetPrimaryKey(
true);
844 OTypeInfoMap::const_iterator aTypeIter =
m_aTypeInfo.find(DataType::VARCHAR);
848 OSL_ENSURE(aTypeIter !=
m_aTypeInfo.end(),
"We have no type information!");
853 pTabEdRow = std::make_shared<OTableRow>();
854 pTabEdRow->SetReadOnly(bReadRow);
867 bool bFoundPKey =
false;
872 std::vector< std::shared_ptr<OTableRow> >::const_iterator aIter =
m_vRowList.begin();
873 std::vector< std::shared_ptr<OTableRow> >::const_iterator aEnd =
m_vRowList.end();
874 for(;aIter != aEnd;++aIter)
877 if (pFieldDesc && !pFieldDesc->
GetName().isEmpty())
881 bool bDuplicateNameFound = std::any_of(aIter+1, aEnd,
882 [&bCase, &pFieldDesc](
const std::shared_ptr<OTableRow>& rxRow) {
884 return pCompareDesc && bCase(pCompareDesc->
GetName(),pFieldDesc->
GetName());
886 if (bDuplicateNameFound)
888 OUString strMessage =
DBA_RES(STR_TABLEDESIGN_DUPLICATE_NAME);
889 strMessage = strMessage.replaceFirst(
"$column$", pFieldDesc->
GetName());
898 OUString sTitle(
DBA_RES(STR_TABLEDESIGN_NO_PRIM_KEY_HEAD));
899 OUString sMsg(
DBA_RES(STR_TABLEDESIGN_NO_PRIM_KEY));
906 auto pNewRow = std::make_shared<OTableRow>();
911 pNewRow->SetFieldType( pTypeInfo );
939 OSL_ENSURE(xColumns.is(),
"No columns");
940 if ( !xColumns.is() )
944 sal_Int32 nColumnCount = xIdxColumns->getCount();
949 bool bReload =
false;
954 std::set<OUString, comphelper::UStringMixLess> aColumns(
957 || xMetaData->supportsMixedCaseQuotedIdentifiers()));
958 std::vector< std::shared_ptr<OTableRow> >::const_iterator aIter =
m_vRowList.begin();
959 std::vector< std::shared_ptr<OTableRow> >::const_iterator aEnd =
m_vRowList.end();
961 for(sal_Int32
nPos = 0;aIter != aEnd;++aIter,++
nPos)
963 OSL_ENSURE(*aIter,
"OTableRow is null!");
967 if ( (*aIter)->IsReadOnly() )
969 aColumns.insert(pField->
GetName());
974 if ( xColumns->hasByName(pField->
GetName()) )
976 aColumns.insert(pField->
GetName());
978 OSL_ENSURE(
xColumn.is(),
"Column is null!");
982 OUString sTypeName,sDescription;
994 OSL_FAIL(
"no TypeName property?!" );
1004 (nPrecision != pField->
GetPrecision() && nPrecision ) ||
1009 xColumnFactory.is())
1014 bool bNotOk =
false;
1019 xAlter->alterColumnByName(pField->
GetName(),xNewColumn);
1021 catch(
const SQLException&)
1023 if(xDrop.is() && xAppend.is())
1025 OUString aMessage(
DBA_RES( STR_TABLEDESIGN_ALTER_ERROR ) );
1026 aMessage = aMessage.replaceFirst(
"$column$", pField->
GetName() );
1037 if((!xAlter.is() || bNotOk) && xDrop.is() && xAppend.is())
1039 xDrop->dropByName(pField->
GetName());
1042 xAppend->appendByDescriptor(xNewColumn);
1044 catch(
const SQLException&)
1046 xAppend->appendByDescriptor(
xColumn);
1051 xNewColumn =
nullptr;
1052 if(xColumns->hasByName(pField->
GetName()))
1058 else if(xColumnFactory.is() && xAlter.is() &&
nPos < nColumnCount)
1064 xAlter->alterColumnByIndex(
nPos,xNewColumn);
1065 if(xColumns->hasByName(pField->
GetName()))
1067 aColumns.insert(pField->
GetName());
1074 OSL_FAIL(
"OTableController::alterColumns: invalid column (2)!");
1077 catch(
const SQLException&)
1081 if(xDrop.is() && xAppend.is())
1083 OUString aMessage(
DBA_RES(STR_TABLEDESIGN_ALTER_ERROR));
1084 aMessage = aMessage.replaceFirst(
"$column$",pField->
GetName());
1091 aColumns.insert(
sName);
1092 aColumns.insert(pField->
GetName());
1108 OSL_ENSURE(row,
"OTableRow is null!");
1112 if ( row->IsReadOnly() )
1114 aColumns.insert(pField->
GetName());
1119 if ( xColumns->hasByName(pField->
GetName()) )
1140 for(
const OUString& rColumnName :
aColNames)
1142 if(aColumns.find(rColumnName) == aColumns.end())
1144 if(xKeyColumns.is() && xKeyColumns->hasByName(rColumnName))
1146 OUString aMsgT(
DBA_RES(STR_TBL_COLUMN_IS_KEYCOLUMN));
1147 aMsgT = aMsgT.replaceFirst(
"$column$",rColumnName);
1148 OUString aTitle(
DBA_RES(STR_TBL_COLUMN_IS_KEYCOLUMN_TITLE));
1152 xKeyColumns =
nullptr;
1163 xDrop->dropByName(rColumnName);
1165 catch (
const SQLException&)
1167 OUString sError(
DBA_RES( STR_TABLEDESIGN_COULD_NOT_DROP_COL ) );
1168 sError = sError.replaceFirst(
"$column$", rColumnName );
1170 SQLException aNewException;
1171 aNewException.Message = sError;
1172 aNewException.SQLState =
"S1000";
1173 aNewException.NextException = ::cppu::getCaughtException();
1175 throw aNewException;
1184 OSL_ENSURE(rxRow,
"OTableRow is null!");
1186 if ( !pField || rxRow->IsReadOnly() || aColumns.find(pField->
GetName()) != aColumns.end() )
1190 if(!xColumns->hasByName(pField->
GetName()))
1192 if(xColumnFactory.is() && xAppend.is())
1195 xColumn = xColumnFactory->createDataDescriptor();
1197 xAppend->appendByDescriptor(
xColumn);
1198 if(xColumns->hasByName(pField->
GetName()))
1200 aColumns.insert(pField->
GetName());
1207 OSL_FAIL(
"OTableController::alterColumns: invalid column!");
1214 bool bNeedDropKey =
false;
1215 bool bNeedAppendKey =
false;
1216 if ( xKeyColumns.is() )
1220 OSL_ENSURE(rxRow,
"OTableRow is null!");
1226 && !xKeyColumns->hasByName( pField->
GetName() )
1229 bNeedDropKey = bNeedAppendKey =
true;
1233 && xKeyColumns->hasByName( pField->
GetName() )
1236 bNeedDropKey = bNeedAppendKey =
true;
1243 bNeedAppendKey =
true;
1246 if ( bNeedDropKey && xKeyColumns.is() && xKeyColumns->getElementNames().hasElements() )
1249 if ( bNeedAppendKey )
1269 xKeys = xKeySup->getKeys();
1274 for(sal_Int32
i=0;
i< xKeys->getCount();++
i)
1276 xProp.set(xKeys->getByIndex(
i),UNO_QUERY);
1277 sal_Int32 nKeyType = 0;
1279 if(KeyType::PRIMARY == nKeyType)
1282 xDrop->dropByIndex(
i);
1288 catch(
const SQLContext& e)
1292 catch(
const SQLWarning& e)
1296 catch(
const SQLException& e)
1319 xNameAccess = xSup->getTables();
1320 OSL_ENSURE(xNameAccess.is(),
"no nameaccess for the queries!");
1322 if(!xNameAccess->hasByName(
m_sName))
1339 rTableRow->SetReadOnly();
1357 bAddAllowed = bAddAllowed || ( xMetaData.is() && xMetaData->supportsAlterTableWithAddColumn());
1362 bAddAllowed =
false;
1371 bool bDropAllowed = !
m_xTable.is();
1375 bDropAllowed =
Reference<XDrop>(xNameAccess,UNO_QUERY).is() && xNameAccess->hasElements();
1379 bDropAllowed = bDropAllowed || ( xMetaData.is() && xMetaData->supportsAlterTableWithDropColumn());
1381 return bDropAllowed;
1396 OSL_ENSURE(row,
"OTableRow is null!");
1399 row->SetReadOnly(!bAlterAllowed);
1401 row->SetReadOnly(!bAddAllowed);
1412 OUString
sName = _rName;
1417 auto lHasName = [&bCase, &
sName](
const std::shared_ptr<OTableRow>& rxRow) {
1419 return pFieldDesc && !pFieldDesc->
GetName().isEmpty() && bCase(
sName, pFieldDesc->
GetName());
1426 sName = _rName + OUString::number(++
i);
1440 sTitle = ::dbtools::composeTableName(
getConnection()->getMetaData(),
m_xTable, ::dbtools::EComposeRule::InDataManipulation,
false );
1444 if ( sTitle.isEmpty() )
1469 bool bFoundElem =
false;
1472 if ( !row || !row->GetActFieldDescr() || row->GetActFieldDescr()->GetName().isEmpty() )
1482 auto pTabEdRow = std::make_shared<OTableRow>();
1483 pTabEdRow->SetReadOnly(bReadRow);
1492 return getSdbMetaData().isAutoIncrementPrimaryKey();
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * org_openoffice_comp_dbu_OTableDesign_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
const char *const aFieldNames[]
#define ID_BROWSER_EDITDOC
#define ID_BROWSER_SAVEDOC
#define ID_BROWSER_SAVEASDOC
static std::unique_ptr< weld::Builder > CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false, sal_uInt64 nLOKWindowId=0)
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
bool get_ensureType(const OUString &_rValueName, VALUE_TYPE &_out_rValue) const
class implementing the IObjectNameCheck interface, and checking a given name for being valid as eithe...
OUString GetDescription() const
void SetHelpText(const OUString &_sHelptext)
void SetControlDefault(const css::uno::Any &_rControlDefault)
void SetPrecision(sal_Int32 _rPrecision)
void SetIsNullable(sal_Int32 _rIsNullable)
void SetPrimaryKey(bool _bPKey)
sal_Int32 GetScale() const
OUString GetHelpText() const
bool IsAutoIncrement() const
void SetAutoIncrement(bool _bAuto)
OUString GetTypeName() const
void SetName(const OUString &_rName)
sal_Int32 GetFormatKey() const
void SetDescription(const OUString &_rDescription)
bool IsPrimaryKey() const
sal_Int32 GetType() const
css::uno::Any GetControlDefault() const
SvxCellHorJustify GetHorJustify() const
sal_Int32 GetPrecision() const
void SetCurrency(bool _bIsCurrency)
sal_Int32 GetIsNullable() const
void SetScale(sal_Int32 _rScale)
void SetFormatKey(sal_Int32 _rFormatKey)
void copyColumnSettingsTo(const css::uno::Reference< css::beans::XPropertySet > &_rxColumn)
copies the content of the field description into the column
void SetHorJustify(const SvxCellHorJustify &_rHorJustify)
const OUString & getName() const
OUString getSchema() const
OUString getCatalog() const
virtual void SAL_CALL disposing() override
virtual void Execute(sal_uInt16 nId, const css::uno::Sequence< css::beans::PropertyValue > &aArgs) override
virtual FeatureState GetState(sal_uInt16 nId) const override
void ClearUndoManager()
complete clears the Undo/Redo stacks
OUString createUniqueName(const OUString &_rName)
bool isAddAllowed() const
bool m_bAllowAutoIncrementValue
bool isAutoIncrementPrimaryKey() const
sal_Int32 getFirstEmptyRowPosition()
returns the position of the first empty row
virtual void describeSupportedFeatures() override
void appendColumns(css::uno::Reference< css::sdbcx::XColumnsSupplier > const &_rxColSup, bool _bNew, bool _bKeyColumns=false)
TOTypeInfoSP getTypeInfoByType(sal_Int32 _nDataType) const
bool checkColumns(bool _bNew)
OUString m_sAutoIncrementValue
virtual void Execute(sal_uInt16 nId, const css::uno::Sequence< css::beans::PropertyValue > &aArgs) override
virtual void impl_onModifyChanged() override
bool isDropAllowed() const
std::vector< OTypeInfoMap::iterator > m_aTypeInfoIndex
bool doSaveDoc(bool _bSaveAs)
void appendPrimaryKey(css::uno::Reference< css::sdbcx::XKeysSupplier > const &_rxSup, bool _bNew)
virtual FeatureState GetState(sal_uInt16 nId) const override
void stopTableListening()
css::uno::Reference< css::container::XNameAccess > getKeyColumns() const
virtual bool Construct(vcl::Window *pParent) override
std::vector< std::shared_ptr< OTableRow > > m_vRowList
css::uno::Reference< css::beans::XPropertySet > m_xTable
virtual void losingConnection() override
virtual OUString getPrivateTitle() const override
void startTableListening()
bool isAlterAllowed() const
virtual void impl_initialize() override
virtual ~OTableController() override
virtual void SAL_CALL disposing() override
virtual sal_Bool SAL_CALL suspend(sal_Bool bSuspend) override
void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
#define DBG_UNHANDLED_EXCEPTION(...)
css::uno::Reference< css::uno::XInterface > getDataSource(const css::uno::Reference< css::uno::XInterface > &_rxDependentObject)
void fillTypeInfo(const css::uno::Reference< css::sdbc::XConnection > &_rxConnection, std::u16string_view _rsTypeNames, OTypeInfoMap &_rTypeInfoMap, std::vector< OTypeInfoMap::iterator > &_rTypeInfoIters)
fills a map and a vector with localized type names
const sal_uInt16 TYPE_OTHER
TOTypeInfoSP queryPrimaryKeyType(const OTypeInfoMap &_rTypeInfo)
query for a type info which can be used to create a primary key column
void fillAutoIncrementValue(const css::uno::Reference< css::beans::XPropertySet > &_xDatasource, bool &_rAutoIncrementValueEnabled, OUString &_rsAutoIncrementValue)
fills the bool and string value with information out of the datasource info property
TOTypeInfoSP queryTypeInfoByType(sal_Int32 _nDataType, const OTypeInfoMap &_rTypeInfo)
query for a specific type.
void setColumnProperties(const css::uno::Reference< css::beans::XPropertySet > &_rxColumn, const OFieldDescription *_pFieldDesc)
SvxCellHorJustify mapTextJustify(sal_Int32 _nAlignment)
maps css::awt::TextAlign to SvxCellHorJustify
TOTypeInfoSP getTypeInfoFromType(const OTypeInfoMap &_rTypeInfo, sal_Int32 _nType, const OUString &_sTypeName, const OUString &_sCreateParams, sal_Int32 _nPrecision, sal_Int32 _nScale, bool _bAutoIncrement, bool &_brForceToType)
return the most suitable typeinfo for a requested type
std::shared_ptr< OTypeInfo > TOTypeInfoSP
sal_Int32 mapTextAlign(const SvxCellHorJustify &_eAlignment)
maps SvxCellHorJustify to css::awt::TextAlign
bool appendToFilter(const css::uno::Reference< css::sdbc::XConnection > &xConnection, const OUString &rName, const css::uno::Reference< css::uno::XComponentContext > &rxContext, weld::Window *pParent)
append a name to tablefilter of a datasource
::osl::Mutex & getMutex()
void copy(const fs::path &src, const fs::path &dest)
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
SwView * getView(const uno::Reference< frame::XModel > &xModel)
const Color aColNames[SC_RANGECOLORS]
constexpr OUStringLiteral PROPERTY_ISAUTOINCREMENT(u"IsAutoIncrement")
constexpr OUStringLiteral PROPERTY_ISCURRENCY(u"IsCurrency")
constexpr OUStringLiteral PROPERTY_CONTROLDEFAULT(u"ControlDefault")
constexpr OUStringLiteral PROPERTY_PRECISION(u"Precision")
constexpr OUStringLiteral PROPERTY_TYPENAME(u"TypeName")
constexpr OUStringLiteral PROPERTY_ISNULLABLE(u"IsNullable")
constexpr OUStringLiteral PROPERTY_SCHEMANAME(u"SchemaName")
constexpr OUStringLiteral PROPERTY_DESCRIPTION(u"Description")
constexpr OUStringLiteral PROPERTY_FORMATKEY(u"FormatKey")
constexpr OUStringLiteral PROPERTY_SCALE(u"Scale")
constexpr OUStringLiteral PROPERTY_CURRENTTABLE(u"CurrentTable")
constexpr OUStringLiteral PROPERTY_CATALOGNAME(u"CatalogName")
constexpr OUStringLiteral PROPERTY_HELPTEXT(u"HelpText")
constexpr OUStringLiteral PROPERTY_TYPE(u"Type")
constexpr OUStringLiteral PROPERTY_NAME(u"Name")
constexpr OUStringLiteral PROPERTY_ALIGN(u"Align")
describes the state of a feature
std::optional< bool > bChecked