#80211# set title for datasource browser

This commit is contained in:
Ocke Janssen 2001-07-03 06:46:45 +00:00
parent f2550e3d2d
commit 56fc1495f7
4 changed files with 44 additions and 14 deletions

View file

@ -2,9 +2,9 @@
*
* $RCSfile: sbabrw.src,v $
*
* $Revision: 1.45 $
* $Revision: 1.46 $
*
* last change: $Author: kz $ $Date: 2001-06-29 02:08:15 $
* last change: $Author: oj $ $Date: 2001-07-03 07:46:43 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -1304,7 +1304,12 @@ String STR_LOADING_TABLE
Text[ catalan ] = "loading table $name$ ...";
};
String STR_DSBROWSER_TITLE
{
Text = "Datenquellen Ansicht" ;
Text [ english ] = "Data source browser" ;
Text [ english_us ] = "Data source browser" ;
};

View file

@ -2,9 +2,9 @@
*
* $RCSfile: unodatbr.cxx,v $
*
* $Revision: 1.84 $
* $Revision: 1.85 $
*
* last change: $Author: fs $ $Date: 2001-06-26 09:34:15 $
* last change: $Author: oj $ $Date: 2001-07-03 07:46:43 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -2138,6 +2138,7 @@ sal_Bool SbaTableQueryBrowser::implSelect(const ::rtl::OUString& _rDataSourceNam
{
if (_rDataSourceName.getLength() && _rCommand.getLength() && (-1 != _nCommandType))
{
setTitle(_rDataSourceName,_rCommand);
SvLBoxEntry* pDataSource = NULL;
SvLBoxEntry* pCommandType = NULL;
SvLBoxEntry* pCommand = getObjectEntry(_rDataSourceName, _rCommand, _nCommandType, &pDataSource, &pCommandType, sal_True);
@ -2404,11 +2405,8 @@ IMPL_LINK(SbaTableQueryBrowser, OnSelectEntry, SvLBoxEntry*, _pEntry)
FormLoaded(sal_True);
}
// set the title of the beamer
Reference<XPropertySet> xProp(m_xCurrentFrame,UNO_QUERY);
if(xProp.is() && xProp->getPropertySetInfo()->hasPropertyByName(PROPERTY_TITLE))
{
xProp->setPropertyValue(PROPERTY_TITLE,makeAny(aName));
}
setTitle(sDataSourceName,aName);
}
catch(SQLException& e)
{
@ -2948,6 +2946,12 @@ void SAL_CALL SbaTableQueryBrowser::initialize( const Sequence< Any >& aArgument
OSL_ENSURE(sal_False, "SbaTableQueryBrowser::initialize: could not set the update related names!");
}
}
else
{
// set a default title
::rtl::OUString sTitle = String(ModuleRes(STR_DSBROWSER_TITLE));
setTitle(sTitle,::rtl::OUString());
}
}
// -------------------------------------------------------------------------
@ -3720,6 +3724,20 @@ SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getEntryType( SvLBoxEntry*
return etUnknown;
}
// -----------------------------------------------------------------------------
// set the title of the beamer
void SbaTableQueryBrowser::setTitle(const ::rtl::OUString& _rsDataSourceName,const ::rtl::OUString& _rsName) const
{
::rtl::OUString sTitle = _rsDataSourceName;
if(_rsName.getLength())
{
sTitle += ::rtl::OUString::createFromAscii(": ");
sTitle += _rsName;
}
Reference<XPropertySet> xProp(m_xCurrentFrame,UNO_QUERY);
if(xProp.is() && xProp->getPropertySetInfo()->hasPropertyByName(PROPERTY_TITLE))
xProp->setPropertyValue(PROPERTY_TITLE,makeAny(sTitle));
}
// .........................................................................
} // namespace dbaui

View file

@ -2,9 +2,9 @@
*
* $RCSfile: dbu_resource.hrc,v $
*
* $Revision: 1.51 $
* $Revision: 1.52 $
*
* last change: $Author: oj $ $Date: 2001-06-20 12:25:48 $
* last change: $Author: oj $ $Date: 2001-07-03 07:46:45 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -437,6 +437,7 @@
#define STR_TABLE_PRIV_REFERENCE RID_STRING_START + 176
#define STR_TABLE_PRIV_DROP RID_STRING_START + 177
#define STR_TABLE_PRIV_NAME RID_STRING_START + 178
#define STR_DSBROWSER_TITLE RID_STRING_START + 179
//========================================================================
// untyped resources
@ -451,6 +452,9 @@
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
* Revision 1.51 2001/06/20 12:25:48 oj
* #88434# new query msg
*
* Revision 1.50 2001/06/20 08:25:48 fs
* #87909# disambiguated duplicate ids
*

View file

@ -2,9 +2,9 @@
*
* $RCSfile: unodatbr.hxx,v $
*
* $Revision: 1.28 $
* $Revision: 1.29 $
*
* last change: $Author: oj $ $Date: 2001-06-25 12:37:57 $
* last change: $Author: oj $ $Date: 2001-07-03 07:46:45 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -398,6 +398,9 @@ namespace dbaui
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xTable,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData>& _xMetaData,
sal_Bool bIsAutoIncrement) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
// set _rsName as title at the frame
void setTitle(const ::rtl::OUString& _rsDataSourceName,const ::rtl::OUString& _rsName) const;
};
// .........................................................................