Kaydet (Commit) 0e55cc95 authored tarafından Tobias Madl's avatar Tobias Madl Kaydeden (comit) Samuel Mehrbrodt

fdo#39468 Translated German to English

Change-Id: I7405b8251b977f8e5c1b95c37fbab6ae6cb120e7
Reviewed-on: https://gerrit.libreoffice.org/11461Reviewed-by: 's avatarSamuel Mehrbrodt <s.mehrbrodt@gmail.com>
Tested-by: 's avatarSamuel Mehrbrodt <s.mehrbrodt@gmail.com>
üst 473ed449
...@@ -761,7 +761,7 @@ void SAL_CALL OControlModel::write(const Reference<css::io::XObjectOutputStream> ...@@ -761,7 +761,7 @@ void SAL_CALL OControlModel::write(const Reference<css::io::XObjectOutputStream>
// 2. wrting a version number // 2. wrting a version number
_rxOutStream->writeShort(0x0003); _rxOutStream->writeShort(0x0003);
// 3. Schreiben der allgemeinen Properties // 3. writing the general properties
::comphelper::operator<<( _rxOutStream, m_aName); ::comphelper::operator<<( _rxOutStream, m_aName);
_rxOutStream->writeShort(m_nTabIndex); _rxOutStream->writeShort(m_nTabIndex);
::comphelper::operator<<( _rxOutStream, m_aTag); // 3. version ::comphelper::operator<<( _rxOutStream, m_aTag); // 3. version
......
...@@ -196,7 +196,7 @@ void OFormattedControl::keyPressed(const ::com::sun::star::awt::KeyEvent& e) thr ...@@ -196,7 +196,7 @@ void OFormattedControl::keyPressed(const ::com::sun::star::awt::KeyEvent& e) thr
{ {
if( e.KeyCode != KEY_RETURN || e.Modifiers != 0 ) if( e.KeyCode != KEY_RETURN || e.Modifiers != 0 )
return; return;
// Steht das Control in einem Formular mit einer Submit-URL? // Is the control on a form with a submit URL?
Reference<com::sun::star::beans::XPropertySet> xSet(getModel(), UNO_QUERY); Reference<com::sun::star::beans::XPropertySet> xSet(getModel(), UNO_QUERY);
if( !xSet.is() ) if( !xSet.is() )
return; return;
...@@ -223,13 +223,13 @@ void OFormattedControl::keyPressed(const ::com::sun::star::awt::KeyEvent& e) thr ...@@ -223,13 +223,13 @@ void OFormattedControl::keyPressed(const ::com::sun::star::awt::KeyEvent& e) thr
if (hasProperty(PROPERTY_CLASSID, xFCSet) && if (hasProperty(PROPERTY_CLASSID, xFCSet) &&
getINT16(xFCSet->getPropertyValue(PROPERTY_CLASSID)) == FormComponentType::TEXTFIELD) getINT16(xFCSet->getPropertyValue(PROPERTY_CLASSID)) == FormComponentType::TEXTFIELD)
{ {
// Noch ein weiteres Edit gefunden ==> dann nicht submitten // Found another edit ==> no submit
if (xFCSet != xSet) if (xFCSet != xSet)
return; return;
} }
} }
} }
// Da wir noch im Haender stehen, submit asynchron ausloesen // Still in the handler, trigger submit asynchronous
if( m_nKeyEvent ) if( m_nKeyEvent )
Application::RemoveUserEvent( m_nKeyEvent ); Application::RemoveUserEvent( m_nKeyEvent );
m_nKeyEvent = Application::PostUserEvent( LINK(this, OFormattedControl, m_nKeyEvent = Application::PostUserEvent( LINK(this, OFormattedControl,
...@@ -363,8 +363,8 @@ void OFormattedModel::describeFixedProperties( Sequence< Property >& _rProps ) c ...@@ -363,8 +363,8 @@ void OFormattedModel::describeFixedProperties( Sequence< Property >& _rProps ) c
void OFormattedModel::describeAggregateProperties( Sequence< Property >& _rAggregateProps ) const void OFormattedModel::describeAggregateProperties( Sequence< Property >& _rAggregateProps ) const
{ {
OEditBaseModel::describeAggregateProperties( _rAggregateProps ); OEditBaseModel::describeAggregateProperties( _rAggregateProps );
// TreatAsNumeric nicht transient : wir wollen es an der UI anbinden (ist noetig, um dem EffectiveDefault // TreatAsNumeric not transient : we want to bind it to the UI (necessary, because EffectiveDefault
// - der kann Text oder Zahl sein - einen Sinn zu geben) // - could be text or numbers - for making sense)
ModifyPropertyAttributes(_rAggregateProps, PROPERTY_TREATASNUMERIC, 0, PropertyAttribute::TRANSIENT); ModifyPropertyAttributes(_rAggregateProps, PROPERTY_TREATASNUMERIC, 0, PropertyAttribute::TRANSIENT);
// same for FormatKey // same for FormatKey
// (though the paragraph above for the TreatAsNumeric does not hold anymore - we do not have an UI for this. // (though the paragraph above for the TreatAsNumeric does not hold anymore - we do not have an UI for this.
...@@ -492,7 +492,7 @@ Reference< XNumberFormatsSupplier > OFormattedModel::calcFormatsSupplier() const ...@@ -492,7 +492,7 @@ Reference< XNumberFormatsSupplier > OFormattedModel::calcFormatsSupplier() const
{ {
Reference<XNumberFormatsSupplier> xSupplier; Reference<XNumberFormatsSupplier> xSupplier;
DBG_ASSERT(m_xAggregateSet.is(), "OFormattedModel::calcFormatsSupplier : have no aggregate !"); DBG_ASSERT(m_xAggregateSet.is(), "OFormattedModel::calcFormatsSupplier : have no aggregate !");
// hat mein aggregiertes Model einen FormatSupplier ? // check if my aggregated model has a FormatSupplier
if( m_xAggregateSet.is() ) if( m_xAggregateSet.is() )
m_xAggregateSet->getPropertyValue(PROPERTY_FORMATSSUPPLIER) >>= xSupplier; m_xAggregateSet->getPropertyValue(PROPERTY_FORMATSSUPPLIER) >>= xSupplier;
if (!xSupplier.is()) if (!xSupplier.is())
...@@ -501,7 +501,7 @@ Reference< XNumberFormatsSupplier > OFormattedModel::calcFormatsSupplier() const ...@@ -501,7 +501,7 @@ Reference< XNumberFormatsSupplier > OFormattedModel::calcFormatsSupplier() const
if (!xSupplier.is()) if (!xSupplier.is())
xSupplier = calcDefaultFormatsSupplier(); xSupplier = calcDefaultFormatsSupplier();
DBG_ASSERT(xSupplier.is(), "OFormattedModel::calcFormatsSupplier : no supplier !"); DBG_ASSERT(xSupplier.is(), "OFormattedModel::calcFormatsSupplier : no supplier !");
// jetzt sollte aber einer da sein // now it should be there
return xSupplier; return xSupplier;
} }
...@@ -509,10 +509,9 @@ Reference<XNumberFormatsSupplier> OFormattedModel::calcFormFormatsSupplier() co ...@@ -509,10 +509,9 @@ Reference<XNumberFormatsSupplier> OFormattedModel::calcFormFormatsSupplier() co
{ {
Reference<XChild> xMe; Reference<XChild> xMe;
query_interface(static_cast<XWeak*>(const_cast<OFormattedModel*>(this)), xMe); query_interface(static_cast<XWeak*>(const_cast<OFormattedModel*>(this)), xMe);
// damit stellen wir sicher, dass wir auch fuer den Fall der Aggregation das richtige // now we are sure, in case of an aggregation, to get the right object
// Objekt bekommen
DBG_ASSERT(xMe.is(), "OFormattedModel::calcFormFormatsSupplier : I should have a content interface !"); DBG_ASSERT(xMe.is(), "OFormattedModel::calcFormFormatsSupplier : I should have a content interface !");
// jetzt durchhangeln nach oben, bis wir auf eine starform treffen (angefangen mit meinem eigenen Parent) // expand to the top, till we get to an initial form (starting with my own parent)
Reference<XChild> xParent(xMe->getParent(), UNO_QUERY); Reference<XChild> xParent(xMe->getParent(), UNO_QUERY);
Reference<XForm> xNextParentForm(xParent, UNO_QUERY); Reference<XForm> xNextParentForm(xParent, UNO_QUERY);
while (!xNextParentForm.is() && xParent.is()) while (!xNextParentForm.is() && xParent.is())
...@@ -525,7 +524,7 @@ Reference<XNumberFormatsSupplier> OFormattedModel::calcFormFormatsSupplier() co ...@@ -525,7 +524,7 @@ Reference<XNumberFormatsSupplier> OFormattedModel::calcFormFormatsSupplier() co
OSL_FAIL("OFormattedModel::calcFormFormatsSupplier : have no ancestor which is a form !"); OSL_FAIL("OFormattedModel::calcFormFormatsSupplier : have no ancestor which is a form !");
return NULL; return NULL;
} }
// den FormatSupplier von meinem Vorfahren (falls der einen hat) // the FormatSupplier of my ancestor (if he owns one)
Reference< XRowSet > xRowSet( xNextParentForm, UNO_QUERY ); Reference< XRowSet > xRowSet( xNextParentForm, UNO_QUERY );
Reference< XNumberFormatsSupplier > xSupplier; Reference< XNumberFormatsSupplier > xSupplier;
if (xRowSet.is()) if (xRowSet.is())
...@@ -567,7 +566,7 @@ void OFormattedModel::onConnectedDbColumn( const Reference< XInterface >& _rxFor ...@@ -567,7 +566,7 @@ void OFormattedModel::onConnectedDbColumn( const Reference< XInterface >& _rxFor
{ // all the following doesn't make any sense if we have no aggregate ... { // all the following doesn't make any sense if we have no aggregate ...
Any aSupplier = m_xAggregateSet->getPropertyValue(PROPERTY_FORMATSSUPPLIER); Any aSupplier = m_xAggregateSet->getPropertyValue(PROPERTY_FORMATSSUPPLIER);
DBG_ASSERT( aSupplier.hasValue(), "OFormattedModel::onConnectedDbColumn : invalid property value !" ); DBG_ASSERT( aSupplier.hasValue(), "OFormattedModel::onConnectedDbColumn : invalid property value !" );
// das sollte im Constructor oder im read auf was richtiges gesetzt worden sein // this should already be initiated and correctly set by the constructor or the read function
Any aFmtKey = m_xAggregateSet->getPropertyValue(PROPERTY_FORMATKEY); Any aFmtKey = m_xAggregateSet->getPropertyValue(PROPERTY_FORMATKEY);
if ( !(aFmtKey >>= nFormatKey ) ) if ( !(aFmtKey >>= nFormatKey ) )
{ // nobody gave us a format to use. So we examine the field we're bound to for a { // nobody gave us a format to use. So we examine the field we're bound to for a
...@@ -599,7 +598,7 @@ void OFormattedModel::onConnectedDbColumn( const Reference< XInterface >& _rxFor ...@@ -599,7 +598,7 @@ void OFormattedModel::onConnectedDbColumn( const Reference< XInterface >& _rxFor
aSupplier >>= m_xOriginalFormatter; aSupplier >>= m_xOriginalFormatter;
m_xAggregateSet->setPropertyValue(PROPERTY_FORMATSSUPPLIER, makeAny(xSupplier)); m_xAggregateSet->setPropertyValue(PROPERTY_FORMATSSUPPLIER, makeAny(xSupplier));
m_xAggregateSet->setPropertyValue(PROPERTY_FORMATKEY, aFmtKey); m_xAggregateSet->setPropertyValue(PROPERTY_FORMATKEY, aFmtKey);
// das Numeric-Flag an mein gebundenes Feld anpassen // adapt the numeric-flag to my bound field
if (xField.is()) if (xField.is())
{ {
m_bNumeric = false; m_bNumeric = false;
...@@ -641,7 +640,7 @@ void OFormattedModel::onDisconnectedDbColumn() ...@@ -641,7 +640,7 @@ void OFormattedModel::onDisconnectedDbColumn()
{ {
OEditBaseModel::onDisconnectedDbColumn(); OEditBaseModel::onDisconnectedDbColumn();
if (m_xOriginalFormatter.is()) if (m_xOriginalFormatter.is())
{ // unser aggregiertes Model hatte keinerlei Format-Informationen { // the aggregated model has no format information
m_xAggregateSet->setPropertyValue(PROPERTY_FORMATSSUPPLIER, makeAny(m_xOriginalFormatter)); m_xAggregateSet->setPropertyValue(PROPERTY_FORMATSSUPPLIER, makeAny(m_xOriginalFormatter));
m_xAggregateSet->setPropertyValue(PROPERTY_FORMATKEY, Any()); m_xAggregateSet->setPropertyValue(PROPERTY_FORMATKEY, Any());
setPropertyValue(PROPERTY_TREATASNUMERIC, makeAny(m_bOriginalNumeric)); setPropertyValue(PROPERTY_TREATASNUMERIC, makeAny(m_bOriginalNumeric));
...@@ -657,8 +656,8 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream) ...@@ -657,8 +656,8 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
OEditBaseModel::write(_rxOutStream); OEditBaseModel::write(_rxOutStream);
_rxOutStream->writeShort(0x0003); _rxOutStream->writeShort(0x0003);
DBG_ASSERT(m_xAggregateSet.is(), "OFormattedModel::write : have no aggregate !"); DBG_ASSERT(m_xAggregateSet.is(), "OFormattedModel::write : have no aggregate !");
// mein Format (evtl. void) in ein persistentes Format bringen (der Supplier zusammen mit dem Key ist es zwar auch, // take my format (possibly void) into a persistent format (the supplier together with the key
// aber deswegen muessen wir ja nicht gleich den ganzen Supplier speichern, das waere ein klein wenig Overhead ;) // would also be persistent, but saving the whole supplier would be overhead)
Reference<XNumberFormatsSupplier> xSupplier; Reference<XNumberFormatsSupplier> xSupplier;
Any aFmtKey; Any aFmtKey;
bool bVoidKey = true; bool bVoidKey = true;
...@@ -671,12 +670,12 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream) ...@@ -671,12 +670,12 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
} }
aFmtKey = m_xAggregateSet->getPropertyValue(PROPERTY_FORMATKEY); aFmtKey = m_xAggregateSet->getPropertyValue(PROPERTY_FORMATKEY);
bVoidKey = (!xSupplier.is() || !aFmtKey.hasValue()) || (isLoaded() && m_xOriginalFormatter.is()); bVoidKey = (!xSupplier.is() || !aFmtKey.hasValue()) || (isLoaded() && m_xOriginalFormatter.is());
// (kein Fomatter und/oder Key) oder (loaded und faked Formatter) // (no formatter and/or key) or (loaded and fakes formatter)
} }
_rxOutStream->writeBoolean(!bVoidKey); _rxOutStream->writeBoolean(!bVoidKey);
if (!bVoidKey) if (!bVoidKey)
{ {
// aus dem FormatKey und dem Formatter persistente Angaben basteln // build persistent data with the FormatKey and the formatter
Any aKey = m_xAggregateSet->getPropertyValue(PROPERTY_FORMATKEY); Any aKey = m_xAggregateSet->getPropertyValue(PROPERTY_FORMATKEY);
sal_Int32 nKey = aKey.hasValue() ? getINT32(aKey) : 0; sal_Int32 nKey = aKey.hasValue() ? getINT32(aKey) : 0;
Reference<XNumberFormats> xFormats = xSupplier->getNumberFormats(); Reference<XNumberFormats> xFormats = xSupplier->getNumberFormats();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment