summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2011-08-21 18:12:16 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2011-08-21 18:12:16 -0500
commit0d4720d1e1ffcefc43ae2af59c7487ab0bfab2ce (patch)
tree7cacea747b7ff3de52f69a8605ef486463201a9c /forms
parent57b992c0b57daba5f44b5c4cdb08e817f355ea01 (diff)
undo anything not wizard related in the previous merge-commit
Diffstat (limited to 'forms')
-rw-r--r--forms/Library_frm.mk6
-rw-r--r--forms/qa/unoapi/knownissues.xcl6
-rw-r--r--forms/source/component/Columns.cxx30
-rw-r--r--forms/source/component/DatabaseForm.cxx91
-rw-r--r--forms/source/component/Edit.cxx62
-rw-r--r--forms/source/component/Edit.hxx1
-rw-r--r--forms/source/component/Filter.cxx34
-rw-r--r--forms/source/component/FormattedField.cxx4
-rw-r--r--forms/source/resource/frm_resource.cxx4
9 files changed, 127 insertions, 111 deletions
diff --git a/forms/Library_frm.mk b/forms/Library_frm.mk
index f99dcb82c7f8..91ec3b0c549c 100644
--- a/forms/Library_frm.mk
+++ b/forms/Library_frm.mk
@@ -38,6 +38,12 @@ $(eval $(call gb_Library_set_include,frm,\
-I$(OUTDIR)/inc \
))
+$(eval $(call gb_Library_add_api,frm,\
+ offapi \
+ oovbaapi \
+ udkapi \
+))
+
$(eval $(call gb_Library_add_linked_libs,frm,\
comphelper \
cppu \
diff --git a/forms/qa/unoapi/knownissues.xcl b/forms/qa/unoapi/knownissues.xcl
index a4bb19333bf5..66e02dc8d8c4 100644
--- a/forms/qa/unoapi/knownissues.xcl
+++ b/forms/qa/unoapi/knownissues.xcl
@@ -129,9 +129,3 @@ forms.OGridControlModel::com::sun::star::view::XSelectionSupplier
### i111333 ###
forms.OImageControlControl::com::sun::star::awt::XControl
-
-### fd#35728 ###
-forms.OGridControlModel::com::sun::star::form::component::GridControl
-forms.OGridControlModel::com::sun::star::beans::XMultiPropertySet
-forms.OGridControlModel::com::sun::star::beans::XPropertySet
-forms.OGridControlModel::com::sun::star::beans::XFastPropertySet
diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx
index 9bc330360e56..d75ef8b5df68 100644
--- a/forms/source/component/Columns.cxx
+++ b/forms/source/component/Columns.cxx
@@ -42,13 +42,15 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/form/binding/XBindableValue.hpp>
#include <com/sun/star/beans/XPropertyContainer.hpp>
+#include <com/sun/star/text/XText.hpp>
#include <comphelper/sequence.hxx>
#include <comphelper/property.hxx>
#include <comphelper/basicio.hxx>
+#include <comphelper/types.hxx>
+#include <comphelper/servicehelper.hxx>
#include "services.hxx"
#include "frm_resource.hrc"
#include <tools/debug.hxx>
-#include <rtl/uuid.h>
#include <rtl/memory.h>
//.........................................................................
@@ -63,6 +65,7 @@ using namespace ::com::sun::star::awt;
using namespace ::com::sun::star::io;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::util;
+using namespace ::com::sun::star::text;
using namespace ::com::sun::star::form::binding;
const sal_uInt16 WIDTH = 0x0001;
@@ -121,21 +124,14 @@ sal_Int32 getColumnTypeByModelName(const ::rtl::OUString& aModelName)
/*************************************************************************/
-//------------------------------------------------------------------
+namespace
+{
+ class theOGridColumnImplementationId : public rtl::Static< UnoTunnelIdInit, theOGridColumnImplementationId > {};
+}
+
const Sequence<sal_Int8>& OGridColumn::getUnoTunnelImplementationId()
{
- static Sequence< sal_Int8 > * pSeq = 0;
- if( !pSeq )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( !pSeq )
- {
- static Sequence< sal_Int8 > aSeq( 16 );
- rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True );
- pSeq = &aSeq;
- }
- }
- return *pSeq;
+ return theOGridColumnImplementationId::get().getSeq();
}
//------------------------------------------------------------------
@@ -173,6 +169,7 @@ Sequence<Type> SAL_CALL OGridColumn::getTypes() throw(RuntimeException)
aTypes.removeType( XServiceInfo::static_type() );
aTypes.removeType( XBindableValue::static_type() );
aTypes.removeType( XPropertyContainer::static_type() );
+
// but re-add their base class(es)
aTypes.addType( XChild::static_type() );
@@ -180,6 +177,10 @@ Sequence<Type> SAL_CALL OGridColumn::getTypes() throw(RuntimeException)
if ( query_aggregation( m_xAggregate, xProv ))
aTypes.addTypes( xProv->getTypes() );
+ aTypes.removeType( XTextRange::static_type() );
+ aTypes.removeType( XSimpleText::static_type() );
+ aTypes.removeType( XText::static_type() );
+
return aTypes.getTypes();
}
@@ -192,6 +193,7 @@ Any SAL_CALL OGridColumn::queryAggregation( const Type& _rType ) throw (RuntimeE
|| _rType.equals(::getCppuType(static_cast< Reference< XServiceInfo >* >(NULL)))
|| _rType.equals(::getCppuType(static_cast< Reference< XBindableValue >* >(NULL)))
|| _rType.equals(::getCppuType(static_cast< Reference< XPropertyContainer >* >(NULL)))
+ || comphelper::isAssignableFrom(::getCppuType(static_cast< Reference< XTextRange >* >(NULL)),_rType)
)
return aReturn;
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 78fa5df14c25..c09e9f6cf3b9 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -163,7 +163,7 @@ private:
if ( m_xDocumentModify.is() )
_enable ? m_xDocumentModify->enableSetModified() : m_xDocumentModify->disableSetModified();
}
- catch( const Exception& )
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -410,7 +410,7 @@ ODatabaseForm::ODatabaseForm( const ODatabaseForm& _cloneSource )
setPropertyValue( pSourceProperty->Name, xSourceProps->getPropertyValue( pSourceProperty->Name ) );
}
}
- catch( const Exception& )
+ catch(const Exception&)
{
throw WrappedTargetException(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Could not clone the given database form." ) ),
@@ -1173,7 +1173,7 @@ bool ODatabaseForm::hasValidParent() const
// the parent form is loaded and on a "virtual" row -> not valid
return false;
}
- catch(Exception&)
+ catch(const Exception&)
{
// parent could be forwardonly?
return false;
@@ -1261,11 +1261,10 @@ sal_Bool ODatabaseForm::executeRowSet(::osl::ResettableMutexGuard& _rClearForNot
m_xAggregateAsRowSet->execute();
bSuccess = sal_True;
}
- catch( const RowSetVetoException& eVeto )
+ catch(const RowSetVetoException&)
{
- (void)eVeto;
}
- catch(SQLException& eDb)
+ catch(const SQLException& eDb)
{
_rClearForNotifies.clear();
if (m_sCurrentErrorContext.getLength())
@@ -1307,7 +1306,7 @@ sal_Bool ODatabaseForm::executeRowSet(::osl::ResettableMutexGuard& _rClearForNot
xUpdate->moveToInsertRow();
}
}
- catch(SQLException& eDB)
+ catch(const SQLException& eDB)
{
_rClearForNotifies.clear();
if (m_sCurrentErrorContext.getLength())
@@ -1750,7 +1749,9 @@ void ODatabaseForm::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const A
{
m_xAggregateSet->setPropertyValue(PROPERTY_DATASOURCE, rValue);
}
- catch(Exception&) { }
+ catch(const Exception&)
+ {
+ }
}
break;
case PROPERTY_ID_TARGET_URL:
@@ -2051,7 +2052,7 @@ void ODatabaseForm::reset_impl(bool _bAproveByListeners)
if ( aDefault.hasValue() )
xColUpdate->updateObject( aDefault );
}
- catch(Exception&)
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -2059,7 +2060,7 @@ void ODatabaseForm::reset_impl(bool _bAproveByListeners)
}
}
}
- catch(Exception&)
+ catch(const Exception&)
{
}
@@ -2419,7 +2420,7 @@ void SAL_CALL ODatabaseForm::setParent(const InterfaceRef& Parent) throw ( ::com
Reference< XPropertySet > xParentProperties( xParentForm, UNO_QUERY_THROW );
xParentProperties->removePropertyChangeListener( PROPERTY_ISNEW, this );
}
- catch( const Exception& )
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -2441,7 +2442,7 @@ void SAL_CALL ODatabaseForm::setParent(const InterfaceRef& Parent) throw ( ::com
Reference< XPropertySet > xParentProperties( xParentForm, UNO_QUERY_THROW );
xParentProperties->addPropertyChangeListener( PROPERTY_ISNEW, this );
}
- catch( const Exception& )
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -2871,11 +2872,11 @@ sal_Bool ODatabaseForm::implEnsureConnection()
return xConnection.is();
}
}
- catch(SQLException& eDB)
+ catch(const SQLException& eDB)
{
onError(eDB, FRM_RES_STRING(RID_STR_CONNECTERROR));
}
- catch( Exception )
+ catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -2904,7 +2905,7 @@ void ODatabaseForm::load_impl(sal_Bool bCausedByParentForm, sal_Bool bMoveToFirs
// a database form always uses caching
// we use starting fetchsize with at least 10 rows
if (bConnected)
- m_xAggregateSet->setPropertyValue(PROPERTY_FETCHSIZE, makeAny((sal_Int32)10));
+ m_xAggregateSet->setPropertyValue(PROPERTY_FETCHSIZE, makeAny((sal_Int32)40));
// if we're loaded as sub form we got a "rowSetChanged" from the parent rowset _before_ we got the "loaded"
// so we don't need to execute the statement again, this was already done
@@ -2962,9 +2963,8 @@ void SAL_CALL ODatabaseForm::unload() throw( RuntimeException )
if (xCloseable.is())
xCloseable->close();
}
- catch( const SQLException& e )
+ catch(const SQLException&)
{
- (void)e;
}
aGuard.reset();
}
@@ -3020,10 +3020,9 @@ void ODatabaseForm::reload_impl(sal_Bool bMoveToFirst, const Reference< XInterac
m_sCurrentErrorContext = FRM_RES_STRING(RID_ERR_REFRESHING_FORM);
bSuccess = executeRowSet(aGuard, bMoveToFirst, _rxCompletionHandler);
}
- catch( const SQLException& e )
+ catch(const SQLException&)
{
OSL_FAIL("ODatabaseForm::reload_impl : shouldn't executeRowSet catch this exception?");
- (void)e;
}
if (bSuccess)
@@ -3122,19 +3121,22 @@ bool ODatabaseForm::impl_approveRowChange_throw( const EventObject& _rEvent, con
if ( !xListener->approveRowSetChange( _rEvent ) )
return false;
}
- catch ( const DisposedException& e )
+ catch (const DisposedException& e)
{
if ( e.Context == xListener )
aIter.remove();
}
- catch ( const RuntimeException& ) { throw; }
- catch ( const SQLException& )
+ catch (const RuntimeException&)
+ {
+ throw;
+ }
+ catch (const SQLException&)
{
if ( _bAllowSQLException )
throw;
DBG_UNHANDLED_EXCEPTION();
}
- catch ( const Exception& )
+ catch (const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -3163,13 +3165,16 @@ sal_Bool SAL_CALL ODatabaseForm::approveCursorMove(const EventObject& event) thr
if ( !xListener->approveCursorMove( event ) )
return sal_False;
}
- catch ( const DisposedException& e )
+ catch (const DisposedException& e)
{
if ( e.Context == xListener )
aIter.remove();
}
- catch ( const RuntimeException& ) { throw; }
- catch ( const Exception& )
+ catch (const RuntimeException&)
+ {
+ throw;
+ }
+ catch (const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -3209,13 +3214,16 @@ sal_Bool SAL_CALL ODatabaseForm::approveRowChange(const RowChangeEvent& event) t
if ( !xListener->approveRowChange( event ) )
return false;
}
- catch ( const DisposedException& e )
+ catch (const DisposedException& e)
{
if ( e.Context == xListener )
aIter.remove();
}
- catch ( const RuntimeException& ) { throw; }
- catch ( const Exception& )
+ catch (const RuntimeException&)
+ {
+ throw;
+ }
+ catch (const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
}
@@ -3499,12 +3507,11 @@ void SAL_CALL ODatabaseForm::insertRow() throw( SQLException, RuntimeException )
if (query_aggregation( m_xAggregate, xUpdate))
xUpdate->insertRow();
}
- catch( const RowSetVetoException& eVeto )
+ catch(const RowSetVetoException&)
{
- (void)eVeto;
throw;
}
- catch(SQLException& eDb)
+ catch(const SQLException& eDb)
{
onError(eDb, FRM_RES_STRING(RID_STR_ERR_INSERTRECORD));
throw;
@@ -3520,12 +3527,11 @@ void SAL_CALL ODatabaseForm::updateRow() throw( SQLException, RuntimeException )
if (query_aggregation( m_xAggregate, xUpdate))
xUpdate->updateRow();
}
- catch( const RowSetVetoException& eVeto )
+ catch(const RowSetVetoException&)
{
- (void)eVeto;
throw;
}
- catch(SQLException& eDb)
+ catch(const SQLException& eDb)
{
onError(eDb, FRM_RES_STRING(RID_STR_ERR_UPDATERECORD));
throw;
@@ -3541,12 +3547,11 @@ void SAL_CALL ODatabaseForm::deleteRow() throw( SQLException, RuntimeException )
if (query_aggregation( m_xAggregate, xUpdate))
xUpdate->deleteRow();
}
- catch( const RowSetVetoException& eVeto )
+ catch(const RowSetVetoException&)
{
- (void)eVeto;
throw;
}
- catch(SQLException& eDb)
+ catch(const SQLException& eDb)
{
onError(eDb, FRM_RES_STRING(RID_STR_ERR_DELETERECORD));
throw;
@@ -3562,12 +3567,11 @@ void SAL_CALL ODatabaseForm::cancelRowUpdates() throw( SQLException, RuntimeExce
if (query_aggregation( m_xAggregate, xUpdate))
xUpdate->cancelRowUpdates();
}
- catch( const RowSetVetoException& eVeto )
+ catch(const RowSetVetoException&)
{
- (void)eVeto;
throw;
}
- catch(SQLException& eDb)
+ catch(const SQLException& eDb)
{
onError(eDb, FRM_RES_STRING(RID_STR_ERR_INSERTRECORD));
throw;
@@ -3627,12 +3631,11 @@ Sequence<sal_Int32> SAL_CALL ODatabaseForm::deleteRows(const Sequence<Any>& rows
if (query_aggregation( m_xAggregate, xDelete))
return xDelete->deleteRows(rows);
}
- catch( const RowSetVetoException& eVeto )
+ catch(const RowSetVetoException&)
{
- (void)eVeto; // make compiler happy
throw;
}
- catch(SQLException& eDb)
+ catch(const SQLException& eDb)
{
onError(eDb, FRM_RES_STRING(RID_STR_ERR_DELETERECORDS));
throw;
diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx
index d745a1b3837a..7d2fa43756f5 100644
--- a/forms/source/component/Edit.cxx
+++ b/forms/source/component/Edit.cxx
@@ -485,7 +485,7 @@ namespace
{
_rxDest->setPropertyValue( pSourceProps->Name, _rxSource->getPropertyValue( pSourceProps->Name ) );
}
- catch( IllegalArgumentException e )
+ catch(const IllegalArgumentException& e)
{
#if OSL_DEBUG_LEVEL > 0
::rtl::OString sMessage( "could not transfer the property named '" );
@@ -497,6 +497,8 @@ namespace
sMessage += ::rtl::OString( e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_ASCII_US );
}
OSL_FAIL( sMessage.getStr() );
+#else
+ (void)e;
#endif
}
@@ -675,7 +677,6 @@ sal_Bool OEditModel::approveDbColumnType( sal_Int32 _nColumnType )
void OEditModel::resetNoBroadcast()
{
OEditBaseModel::resetNoBroadcast();
- m_aLastKnownValue.clear();
}
//------------------------------------------------------------------------------
@@ -683,38 +684,34 @@ sal_Bool OEditModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
{
Any aNewValue( m_xAggregateFastSet->getFastPropertyValue( getValuePropertyAggHandle() ) );
- if ( aNewValue != m_aLastKnownValue )
- {
- ::rtl::OUString sNewValue;
- aNewValue >>= sNewValue;
+ ::rtl::OUString sNewValue;
+ aNewValue >>= sNewValue;
- if ( !aNewValue.hasValue()
- || ( !sNewValue.getLength() // an empty string
- && m_bEmptyIsNull // which should be interpreted as NULL
- )
+ if ( !aNewValue.hasValue()
+ || ( !sNewValue.getLength() // an empty string
+ && m_bEmptyIsNull // which should be interpreted as NULL
)
+ )
+ {
+ m_xColumnUpdate->updateNull();
+ }
+ else
+ {
+ OSL_PRECOND( m_pValueFormatter.get(), "OEditModel::commitControlValueToDbColumn: no value formatter!" );
+ try
{
- m_xColumnUpdate->updateNull();
- }
- else
- {
- OSL_PRECOND( m_pValueFormatter.get(), "OEditModel::commitControlValueToDbColumn: no value formatter!" );
- try
+ if ( m_pValueFormatter.get() )
{
- if ( m_pValueFormatter.get() )
- {
- if ( !m_pValueFormatter->setFormattedValue( sNewValue ) )
- return sal_False;
- }
- else
- m_xColumnUpdate->updateString( sNewValue );
- }
- catch ( const Exception& )
- {
- return sal_False;
+ if ( !m_pValueFormatter->setFormattedValue( sNewValue ) )
+ return sal_False;
}
+ else
+ m_xColumnUpdate->updateString( sNewValue );
+ }
+ catch ( const Exception& )
+ {
+ return sal_False;
}
- m_aLastKnownValue = aNewValue;
}
return sal_True;
@@ -724,6 +721,7 @@ sal_Bool OEditModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
Any OEditModel::translateDbColumnToControlValue()
{
OSL_PRECOND( m_pValueFormatter.get(), "OEditModel::translateDbColumnToControlValue: no value formatter!" );
+ Any aRet;
if ( m_pValueFormatter.get() )
{
::rtl::OUString sValue( m_pValueFormatter->getFormattedValue() );
@@ -732,7 +730,6 @@ Any OEditModel::translateDbColumnToControlValue()
&& m_pValueFormatter->getColumn()->wasNull()
)
{
- m_aLastKnownValue.clear();
}
else
{
@@ -744,14 +741,11 @@ Any OEditModel::translateDbColumnToControlValue()
sValue = sValue.replaceAt( nMaxTextLen, nDiff, ::rtl::OUString() );
}
- m_aLastKnownValue <<= sValue;
+ aRet <<= sValue;
}
}
- else
- m_aLastKnownValue.clear();
- return m_aLastKnownValue.hasValue() ? m_aLastKnownValue : makeAny( ::rtl::OUString() );
- // (m_aLastKnownValue is alllowed to be VOID, the control value isn't)
+ return aRet.hasValue() ? aRet : makeAny( ::rtl::OUString() );
}
//------------------------------------------------------------------------------
diff --git a/forms/source/component/Edit.hxx b/forms/source/component/Edit.hxx
index e3c84612443f..bbe7063c66f1 100644
--- a/forms/source/component/Edit.hxx
+++ b/forms/source/component/Edit.hxx
@@ -45,7 +45,6 @@ namespace frm
class OEditModel
:public OEditBaseModel
{
- ::com::sun::star::uno::Any m_aLastKnownValue;
::std::auto_ptr< ::dbtools::FormattedColumnValue >
m_pValueFormatter;
sal_Bool m_bMaxTextLenModified : 1; // set to <TRUE/> when we change the MaxTextLen of the aggregate
diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx
index 69643053bed8..4decc560fa4b 100644
--- a/forms/source/component/Filter.cxx
+++ b/forms/source/component/Filter.cxx
@@ -631,19 +631,39 @@ namespace frm
if (xListBox.is())
{
m_aText = aText;
- xListBox->selectItem(m_aText, sal_True);
- if ( xListBox->getSelectedItemPos() >= 0 )
+ MapString2String::const_iterator itemPos = m_aDisplayItemToValueItem.find( m_aText );
+ if ( itemPos == m_aDisplayItemToValueItem.end() )
{
- const bool isQuoted = ( aText.getLength() > 0 )
- && ( aText[0] == '\'' )
- && ( aText[aText.getLength() - 1] == '\'' );
+ const bool isQuoted = ( m_aText.getLength() > 1 )
+ && ( m_aText[0] == '\'' )
+ && ( m_aText[ m_aText.getLength() - 1 ] == '\'' );
if ( isQuoted )
{
- xListBox->selectItem( aText.copy( 1, aText.getLength() - 2 ), sal_True );
+ m_aText = m_aText.copy( 1, m_aText.getLength() - 2 );
+ itemPos = m_aDisplayItemToValueItem.find( m_aText );
}
}
+
+ OSL_ENSURE( ( itemPos != m_aDisplayItemToValueItem.end() ) || ( m_aText.getLength() == 0 ),
+ "OFilterControl::setText: this text is not in my display list!" );
+ if ( itemPos == m_aDisplayItemToValueItem.end() )
+ m_aText = ::rtl::OUString();
+
+ if ( m_aText.getLength() == 0)
+ {
+ while ( xListBox->getSelectedItemPos() >= 0 )
+ {
+ xListBox->selectItemPos( xListBox->getSelectedItemPos(), sal_False );
+ }
+ }
+ else
+ {
+ xListBox->selectItem( m_aText, sal_True );
+ }
}
- } break;
+ }
+ break;
+
default:
{
Reference< XTextComponent > xText( getPeer(), UNO_QUERY );
diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx
index 871385c207a6..9d0170078da1 100644
--- a/forms/source/component/FormattedField.cxx
+++ b/forms/source/component/FormattedField.cxx
@@ -1038,10 +1038,10 @@ sal_Bool OFormattedModel::commitControlValueToDbColumn( bool /*_bPostReset*/ )
m_xColumnUpdate->updateNull();
else
{
- // als Value koennen nur double, string oder void auftreten
try
{
- if ( aControlValue.getValueType().getTypeClass() == TypeClass_DOUBLE )
+ double f = 0.0;
+ if ( aControlValue.getValueType().getTypeClass() == TypeClass_DOUBLE || (aControlValue >>= f)) // #i110323
{
DBTypeConversion::setValue( m_xColumnUpdate, m_aNullDate, getDouble( aControlValue ), m_nKeyType );
}
diff --git a/forms/source/resource/frm_resource.cxx b/forms/source/resource/frm_resource.cxx
index 93746147f3cd..c89a2001e057 100644
--- a/forms/source/resource/frm_resource.cxx
+++ b/forms/source/resource/frm_resource.cxx
@@ -59,9 +59,7 @@ namespace frm
if (m_pImpl)
return;
- ByteString sFileName("frm");
-
- m_pImpl = SimpleResMgr::Create(sFileName.GetBuffer(), Application::GetSettings().GetUILocale());
+ m_pImpl = SimpleResMgr::Create("frm", Application::GetSettings().GetUILocale());
if (m_pImpl)
{