diff options
Diffstat (limited to 'forms/source')
218 files changed, 1013 insertions, 745 deletions
diff --git a/forms/source/component/BaseListBox.hxx b/forms/source/component/BaseListBox.hxx index 4e7d112bac80..01d63db5659f 100644 --- a/forms/source/component/BaseListBox.hxx +++ b/forms/source/component/BaseListBox.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -41,3 +42,4 @@ const sal_uInt16 BOUNDCOLUMN = 0x0001; #endif // _FORMS_BASELISTBOX_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx index 69bde000d955..33d1e9d3a553 100644 --- a/forms/source/component/Button.cxx +++ b/forms/source/component/Button.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -38,7 +39,7 @@ #include <tools/debug.hxx> #include <tools/urlobj.hxx> #include <vcl/svapp.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> //......................................................................... namespace frm @@ -223,7 +224,7 @@ void OButtonModel::read(const Reference<XObjectInputStream>& _rxInStream) throw break; default: - DBG_ERROR("OButtonModel::read : unknown version !"); + OSL_FAIL("OButtonModel::read : unknown version !"); m_eButtonType = FormButtonType_PUSH; m_sTargetURL = ::rtl::OUString(); m_sTargetFrame = ::rtl::OUString(); @@ -479,7 +480,6 @@ IMPL_LINK( OButtonControl, OnClick, void*, EMPTYARG ) // catch exceptions // and catch them on a per-listener basis - if one listener fails, the others still need // to get notified - // 97676 - 21.02.2002 - fs@openoffice.org try { static_cast< XActionListener* >( aIter.next() )->actionPerformed(aEvt); @@ -492,7 +492,7 @@ IMPL_LINK( OButtonControl, OnClick, void*, EMPTYARG ) #endif catch( const Exception& ) { - DBG_ERROR( "OButtonControl::OnClick: caught a exception other than RuntimeException!" ); + OSL_FAIL( "OButtonControl::OnClick: caught a exception other than RuntimeException!" ); } } } @@ -517,7 +517,7 @@ void OButtonControl::actionPerformed_Impl( sal_Bool _bNotifyListener, const ::co if ( !approveAction() ) return; - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; dispatch( nFeatureId ); return; } @@ -778,3 +778,4 @@ void SAL_CALL OButtonControl::releaseDispatchProviderInterceptor( const Referenc } // namespace frm //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Button.hxx b/forms/source/component/Button.hxx index 641af4a20d64..1c6b168a877c 100644 --- a/forms/source/component/Button.hxx +++ b/forms/source/component/Button.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -208,3 +209,4 @@ private: #endif // _FRM_BUTTON_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/CheckBox.cxx b/forms/source/component/CheckBox.cxx index 3e2531f92f5c..5fbf0a8d1086 100644 --- a/forms/source/component/CheckBox.cxx +++ b/forms/source/component/CheckBox.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,9 +30,7 @@ #include "precompiled_forms.hxx" #include "CheckBox.hxx" #include "property.hxx" -#ifndef _FRM_PROPERTY_HRC_ #include "property.hrc" -#endif #include "services.hxx" #include <tools/debug.hxx> #include <comphelper/basicio.hxx> @@ -201,7 +200,7 @@ void SAL_CALL OCheckBoxModel::read(const Reference<stario::XObjectInputStream>& readCommonProperties(_rxInStream); break; default: - DBG_ERROR("OCheckBoxModel::read : unknown version !"); + OSL_FAIL("OCheckBoxModel::read : unknown version !"); defaultCommonProperties(); break; } @@ -258,12 +257,12 @@ sal_Bool OCheckBoxModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) m_xColumnUpdate->updateBoolean( sal_False ); break; default: - DBG_ERROR("OCheckBoxModel::commitControlValueToDbColumn: invalid value !"); + OSL_FAIL("OCheckBoxModel::commitControlValueToDbColumn: invalid value !"); } } catch(Exception&) { - DBG_ERROR("OCheckBoxModel::commitControlValueToDbColumn: could not commit !"); + OSL_FAIL("OCheckBoxModel::commitControlValueToDbColumn: could not commit !"); } } return sal_True; @@ -273,3 +272,4 @@ sal_Bool OCheckBoxModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) } //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/CheckBox.hxx b/forms/source/component/CheckBox.hxx index 21073c27306d..f5620b310947 100644 --- a/forms/source/component/CheckBox.hxx +++ b/forms/source/component/CheckBox.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -89,3 +90,4 @@ public: #endif // _FORMS_CHECKBOX_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx index f8559fa2fbac..f98b6cb862cc 100644 --- a/forms/source/component/Columns.cxx +++ b/forms/source/component/Columns.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,9 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_forms.hxx" #include "Columns.hxx" -#ifndef _FRM_PROPERTY_HRC_ #include "property.hrc" -#endif #include "property.hxx" #include "componenttools.hxx" #include "ids.hxx" @@ -49,9 +48,7 @@ #include <comphelper/basicio.hxx> #include <comphelper/types.hxx> #include "services.hxx" -#ifndef _FRM_RESOURCE_HRC_ #include "frm_resource.hrc" -#endif #include <tools/debug.hxx> #include <rtl/uuid.h> #include <rtl/memory.h> @@ -100,8 +97,8 @@ const StringSequence& getColumnTypes() //------------------------------------------------------------------------------ sal_Int32 getColumnTypeByModelName(const ::rtl::OUString& aModelName) { - const ::rtl::OUString aModelPrefix = ::rtl::OUString::createFromAscii("com.sun.star.form.component."); - const ::rtl::OUString aCompatibleModelPrefix = ::rtl::OUString::createFromAscii("stardiv.one.form.component."); + const ::rtl::OUString aModelPrefix (RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.") ); + const ::rtl::OUString aCompatibleModelPrefix (RTL_CONSTASCII_USTRINGPARAM("stardiv.one.form.component.") ); sal_Int32 nTypeId = -1; if (aModelName == FRM_COMPONENT_EDIT) @@ -609,3 +606,4 @@ IMPL_COLUMN(FormattedFieldColumn, FRM_SUN_COMPONENT_FORMATTEDFIELD, sal_Fals } // namespace frm //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Columns.hxx b/forms/source/component/Columns.hxx index f52d8db1afa9..4068a7b88590 100644 --- a/forms/source/component/Columns.hxx +++ b/forms/source/component/Columns.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -219,3 +220,4 @@ DECL_COLUMN(FormattedFieldColumn) } // namespace frm //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx index 278e561de251..9b893f5d708a 100644 --- a/forms/source/component/ComboBox.cxx +++ b/forms/source/component/ComboBox.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -393,7 +394,7 @@ void SAL_CALL OComboBoxModel::read(const Reference<stario::XObjectInputStream>& } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OComboBoxModel::read: caught an exception while examining the aggregate's string item list!" ); + OSL_FAIL( "OComboBoxModel::read: caught an exception while examining the aggregate's string item list!" ); } // Version @@ -402,7 +403,7 @@ void SAL_CALL OComboBoxModel::read(const Reference<stario::XObjectInputStream>& if (nVersion > 0x0006) { - DBG_ERROR("OComboBoxModel::read : invalid (means unknown) version !"); + OSL_FAIL("OComboBoxModel::read : invalid (means unknown) version !"); m_aListSource = ::rtl::OUString(); m_aBoundColumn <<= (sal_Int16)0; m_aDefaultText = ::rtl::OUString(); @@ -497,7 +498,7 @@ void OComboBoxModel::loadData( bool _bForce ) Reference<XServiceInfo> xServiceInfo(xConnection, UNO_QUERY); if (!xServiceInfo.is() || !xServiceInfo->supportsService(SRV_SDB_CONNECTION)) { - DBG_ERROR("OComboBoxModel::loadData : invalid connection !"); + OSL_FAIL("OComboBoxModel::loadData : invalid connection !"); return; } @@ -667,7 +668,7 @@ void OComboBoxModel::loadData( bool _bForce ) } break; default: - OSL_ENSURE( false, "OComboBoxModel::loadData: unreachable!" ); + OSL_FAIL( "OComboBoxModel::loadData: unreachable!" ); break; } } @@ -912,3 +913,4 @@ StringSequence SAL_CALL OComboBoxControl::getSupportedServiceNames() throw(Runti } //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/ComboBox.hxx b/forms/source/component/ComboBox.hxx index 55ebcbe168e2..0a45a2fa78d9 100644 --- a/forms/source/component/ComboBox.hxx +++ b/forms/source/component/ComboBox.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -176,3 +177,4 @@ public: #endif // _FORMS_COMBOBOX_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Currency.cxx b/forms/source/component/Currency.cxx index c08d4ea3e36c..9ae25ed9b4b8 100644 --- a/forms/source/component/Currency.cxx +++ b/forms/source/component/Currency.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -120,11 +121,11 @@ void OCurrencyModel::implConstruct() bPrependCurrencySymbol = sal_False; break; case 2: // $ 1 - sCurrencySymbol = ::rtl::OUString(String(aLocaleInfo.getCurrSymbol())) + ::rtl::OUString::createFromAscii(" "); + sCurrencySymbol = ::rtl::OUString(String(aLocaleInfo.getCurrSymbol())) + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ") ); bPrependCurrencySymbol = sal_True; break; case 3: // 1 $ - sCurrencySymbol = ::rtl::OUString::createFromAscii(" ") + ::rtl::OUString(String(aLocaleInfo.getCurrSymbol())); + sCurrencySymbol = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" ") ) + ::rtl::OUString(String(aLocaleInfo.getCurrSymbol())); bPrependCurrencySymbol = sal_False; break; } @@ -136,7 +137,7 @@ void OCurrencyModel::implConstruct() } catch(Exception&) { - DBG_ERROR( "OCurrencyModel::implConstruct: caught an exception while initializing the aggregate!" ); + OSL_FAIL( "OCurrencyModel::implConstruct: caught an exception while initializing the aggregate!" ); } } } @@ -266,3 +267,4 @@ void OCurrencyModel::resetNoBroadcast() } // namespace frm //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Currency.hxx b/forms/source/component/Currency.hxx index f35840933240..b36585e52e39 100644 --- a/forms/source/component/Currency.hxx +++ b/forms/source/component/Currency.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -99,3 +100,4 @@ public: #endif // _FORMS_CURRENCY_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 8ff11dfc2f59..fbde5883ebcf 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -75,7 +76,6 @@ #include <connectivity/dbtools.hxx> #include <cppuhelper/exc_hlp.hxx> #include <cppuhelper/implbase2.hxx> -#include <osl/mutex.hxx> #include <rtl/math.hxx> #include <rtl/tencinfo.h> #include <svl/inetstrm.hxx> @@ -89,10 +89,10 @@ #include <unotools/ucbstreamhelper.hxx> #include <vcl/svapp.hxx> #include <vcl/timer.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <ctype.h> -#include <hash_map> +#include <boost/unordered_map.hpp> // compatiblity: DatabaseCursorType is dead, but for compatiblity reasons we still have to write it ... namespace com { @@ -994,7 +994,7 @@ void ODatabaseForm::Encode( ::rtl::OUString& rString ) const switch( nCharCode ) { case 13: // CR - aResult += ::rtl::OUString::createFromAscii("%0D%0A"); // Hex-Darstellung CR LF + aResult += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%0D%0A") ); // Hex-Darstellung CR LF break; @@ -1041,7 +1041,7 @@ void ODatabaseForm::InsertTextPart( INetMIMEMessage& rParent, const ::rtl::OUStr // Header - ::rtl::OUString aContentDisp = ::rtl::OUString::createFromAscii("form-data; name=\""); + ::rtl::OUString aContentDisp (RTL_CONSTASCII_USTRINGPARAM("form-data; name=\"") ); aContentDisp += rName; aContentDisp += UniString('\"'); pChild->SetContentDisposition( aContentDisp ); @@ -1106,15 +1106,15 @@ sal_Bool ODatabaseForm::InsertFilePart( INetMIMEMessage& rParent, const ::rtl::O // Header - ::rtl::OUString aContentDisp = ::rtl::OUString::createFromAscii( "form-data; name=\"" ); + ::rtl::OUString aContentDisp (RTL_CONSTASCII_USTRINGPARAM( "form-data; name=\"") ); aContentDisp += rName; aContentDisp += UniString('\"'); - aContentDisp += ::rtl::OUString::createFromAscii("; filename=\""); + aContentDisp += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("; filename=\"") ); aContentDisp += aFileName; aContentDisp += UniString('\"'); pChild->SetContentDisposition( aContentDisp ); pChild->SetContentType( aContentType ); - pChild->SetContentTransferEncoding( UniString(::rtl::OUString::createFromAscii("8bit")) ); + pChild->SetContentTransferEncoding( UniString(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("8bit") ) ) ); // Body @@ -1157,7 +1157,7 @@ bool ODatabaseForm::hasValidParent() const Reference<XResultSet> xResultSet(m_xParent, UNO_QUERY); if (!xResultSet.is()) { - DBG_ERROR("ODatabaseForm::hasValidParent() : no parent resultset !"); + OSL_FAIL("ODatabaseForm::hasValidParent() : no parent resultset !"); return false; } try @@ -2082,7 +2082,7 @@ void ODatabaseForm::reset_impl(bool _bAproveByListeners) } catch(const Exception&) { - OSL_ENSURE(sal_False, "ODatabaseForm::reset_impl: could not initialize the master-detail-driven parameters!"); + OSL_FAIL("ODatabaseForm::reset_impl: could not initialize the master-detail-driven parameters!"); } } } @@ -2106,8 +2106,7 @@ void ODatabaseForm::reset_impl(bool _bAproveByListeners) aResetGuard.reset(); // ensure that the row isn't modified // (do this _before_ the listeners are notified ! their reaction (maybe asynchronous) may depend - // on the modified state of the row - // 21.02.00 - 73265 - FS) + // on the modified state of the row) if (bInsertRow) m_xAggregateSet->setPropertyValue(PROPERTY_ISMODIFIED, ::cppu::bool2any(sal_Bool(sal_False))); @@ -2185,7 +2184,7 @@ void lcl_dispatch(const Reference< XFrame >& xFrame,const Reference<XURLTransfor if (xDisp.is()) { Sequence<PropertyValue> aArgs(2); - aArgs.getArray()[0].Name = ::rtl::OUString::createFromAscii("Referer"); + aArgs.getArray()[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Referer") ); aArgs.getArray()[0].Value <<= aReferer; // build a sequence from the to-be-submitted string @@ -2194,7 +2193,7 @@ void lcl_dispatch(const Reference< XFrame >& xFrame,const Reference<XURLTransfor Sequence< sal_Int8 > aPostData((sal_Int8*)a8BitData.GetBuffer(), a8BitData.Len()); Reference< XInputStream > xPostData = new SequenceInputStream(aPostData); - aArgs.getArray()[1].Name = ::rtl::OUString::createFromAscii("PostData"); + aArgs.getArray()[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PostData") ); aArgs.getArray()[1].Value <<= xPostData; xDisp->dispatch(aURL, aArgs); @@ -2226,7 +2225,7 @@ void ODatabaseForm::submit_impl(const Reference<XControl>& Control, const ::com: ::rtl::OUString aTargetName; Reference< XModel > xModel; { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // starform->Forms Reference<XChild> xParent(m_xParent, UNO_QUERY); @@ -2253,7 +2252,7 @@ void ODatabaseForm::submit_impl(const Reference<XControl>& Control, const ::com: Reference<XURLTransformer> xTransformer(m_xServiceFactory->createInstance( - ::rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer")), UNO_QUERY); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.URLTransformer") ) ), UNO_QUERY); DBG_ASSERT(xTransformer.is(), "ODatabaseForm::submit_impl : could not create an URL transformer !"); // URL-Encoding @@ -2261,7 +2260,7 @@ void ODatabaseForm::submit_impl(const Reference<XControl>& Control, const ::com: { ::rtl::OUString aData; { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; aData = GetDataURLEncoded( Control, MouseEvt ); } @@ -2282,7 +2281,7 @@ void ODatabaseForm::submit_impl(const Reference<XControl>& Control, const ::com: if (xDisp.is()) { Sequence<PropertyValue> aArgs(1); - aArgs.getArray()->Name = ::rtl::OUString::createFromAscii("Referer"); + aArgs.getArray()->Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Referer") ); aArgs.getArray()->Value <<= aReferer; xDisp->dispatch(aURL, aArgs); } @@ -2308,22 +2307,22 @@ void ODatabaseForm::submit_impl(const Reference<XControl>& Control, const ::com: ::rtl::OUString aContentType; Sequence<sal_Int8> aData; { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; aData = GetDataMultiPartEncoded(Control, MouseEvt, aContentType); } if (!aData.getLength()) return; Sequence<PropertyValue> aArgs(3); - aArgs.getArray()[0].Name = ::rtl::OUString::createFromAscii("Referer"); + aArgs.getArray()[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Referer") ); aArgs.getArray()[0].Value <<= aReferer; - aArgs.getArray()[1].Name = ::rtl::OUString::createFromAscii("ContentType"); + aArgs.getArray()[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType") ); aArgs.getArray()[1].Value <<= aContentType; // build a sequence from the to-be-submitted string Reference< XInputStream > xPostData = new SequenceInputStream(aData); - aArgs.getArray()[2].Name = ::rtl::OUString::createFromAscii("PostData"); + aArgs.getArray()[2].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PostData") ); aArgs.getArray()[2].Value <<= xPostData; xDisp->dispatch(aURL, aArgs); @@ -2333,14 +2332,14 @@ void ODatabaseForm::submit_impl(const Reference<XControl>& Control, const ::com: { ::rtl::OUString aData; { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; aData = GetDataTextEncoded( Reference<XControl> (), MouseEvt ); } lcl_dispatch(xFrame,xTransformer,aURLStr,aReferer,aTargetName,aData,osl_getThreadTextEncoding()); } else { - DBG_ERROR("ODatabaseForm::submit_Impl : wrong encoding !"); + OSL_FAIL("ODatabaseForm::submit_Impl : wrong encoding !"); } } @@ -2543,7 +2542,7 @@ void SAL_CALL ODatabaseForm::setGroup( const Sequence<Reference<XControlModel> > { // can't throw an exception other than a RuntimeException (which would not be appropriate), // so we ignore (and only assert) this - OSL_ENSURE( sal_False, "ODatabaseForm::setGroup: invalid arguments!" ); + OSL_FAIL( "ODatabaseForm::setGroup: invalid arguments!" ); continue; } @@ -3023,7 +3022,7 @@ void ODatabaseForm::reload_impl(sal_Bool bMoveToFirst, const Reference< XInterac } catch( const SQLException& e ) { - DBG_ERROR("ODatabaseForm::reload_impl : shouldn't executeRowSet catch this exception?"); + OSL_FAIL("ODatabaseForm::reload_impl : shouldn't executeRowSet catch this exception?"); (void)e; } @@ -3596,15 +3595,13 @@ void SAL_CALL ODatabaseForm::moveToInsertRow() throw( SQLException, RuntimeExcep // * in reset_impl // - set the control defaults into the columns if not void // - do _not_ set the columns to NULL if no control default is set - // This fixes both #88888# and #97955# // // Still, there is #72756#. During fixing this bug, DG introduced not calling the aggregate here. So // in theory, we re-introduced #72756#. But the bug described therein does not happen anymore, as the // preliminaries for it changed (no display of guessed values for new records with autoinc fields) // - // BTW: the public Issuezilla bug for #97955# is #i2815# + // BTW: the public Issuezilla bug is #i2815# // - // 16.04.2002 - 97955 - fs@openoffice.org xUpdate->moveToInsertRow(); // then set the default values and the parameters given from the parent @@ -3825,7 +3822,7 @@ Sequence< ::rtl::OUString > SAL_CALL ODatabaseForm::getCurrentServiceNames_Stati ::rtl::OUString* pServices = aServices.getArray(); *pServices++ = FRM_SUN_FORMCOMPONENT; - *pServices++ = ::rtl::OUString::createFromAscii("com.sun.star.form.FormComponents"); + *pServices++ = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.FormComponents") ); *pServices++ = FRM_SUN_COMPONENT_FORM; *pServices++ = FRM_SUN_COMPONENT_HTMLFORM; *pServices++ = FRM_SUN_COMPONENT_DATAFORM; @@ -3866,7 +3863,6 @@ Sequence< ::rtl::OUString > SAL_CALL ODatabaseForm::getSupportedServiceNames() t // the compatible names // This is maily to be consistent with the implementation before fixing #97083#, though the // better solution _may_ be to return the compatible names at runtime, too - // 04.03.2002 - fs@openoffice.org } //------------------------------------------------------------------------------ @@ -3939,7 +3935,7 @@ void SAL_CALL ODatabaseForm::write(const Reference<XObjectOutputStream>& _rxOutS eTranslated = bEscapeProcessing ? DataSelectionType_SQL : DataSelectionType_SQLPASSTHROUGH; } break; - default : DBG_ERROR("ODatabaseForm::write : wrong CommandType !"); + default : OSL_FAIL("ODatabaseForm::write : wrong CommandType !"); } } _rxOutStream->writeShort((sal_Int16)eTranslated); // former DataSelectionType @@ -4045,7 +4041,7 @@ void SAL_CALL ODatabaseForm::read(const Reference<XObjectInputStream>& _rxInStre m_xAggregateSet->setPropertyValue(PROPERTY_ESCAPE_PROCESSING, makeAny((sal_Bool)bEscapeProcessing)); } break; - default : DBG_ERROR("ODatabaseForm::read : wrong CommandType !"); + default : OSL_FAIL("ODatabaseForm::read : wrong CommandType !"); } if (m_xAggregateSet.is()) m_xAggregateSet->setPropertyValue(PROPERTY_COMMANDTYPE, makeAny(nCommandType)); @@ -4160,3 +4156,4 @@ void SAL_CALL ODatabaseForm::setName(const ::rtl::OUString& aName) throw( Runtim } // namespace frm //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/DatabaseForm.hxx b/forms/source/component/DatabaseForm.hxx index e18586fb309d..14fe7111e835 100644 --- a/forms/source/component/DatabaseForm.hxx +++ b/forms/source/component/DatabaseForm.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -70,9 +71,7 @@ #include <connectivity/filtermanager.hxx> #include <connectivity/warningscontainer.hxx> -#ifndef FORMS_SOURCE_MISC_LISTENERCONTAINERS_HXX #include "listenercontainers.hxx" -#endif #include "ids.hxx" #include <comphelper/propmultiplex.hxx> #include <comphelper/uno3.hxx> @@ -567,3 +566,4 @@ inline void ODatabaseForm::submitNBC(const ::com::sun::star::uno::Reference< ::c #endif // _FRM_DATABASEFORM_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Date.cxx b/forms/source/component/Date.cxx index 1e04a63bfb0b..7a177d9ca6b6 100644 --- a/forms/source/component/Date.cxx +++ b/forms/source/component/Date.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -118,7 +119,7 @@ ODateModel::ODateModel(const Reference<XMultiServiceFactory>& _rxFactory) } catch( const Exception& ) { - OSL_ENSURE( sal_False, "ODateModel::ODateModel: caught an exception!" ); + OSL_FAIL( "ODateModel::ODateModel: caught an exception!" ); } osl_decrementInterlockedCount( &m_refCount ); } @@ -361,3 +362,4 @@ Sequence< Type > ODateModel::getSupportedBindingTypes() } // namespace frm //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Date.hxx b/forms/source/component/Date.hxx index 8ff6d1433508..790c8f027bfb 100644 --- a/forms/source/component/Date.hxx +++ b/forms/source/component/Date.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -131,3 +132,4 @@ public: #endif // _FORMS_DATE_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx index 113d664acf33..260acf5d97cb 100644 --- a/forms/source/component/Edit.cxx +++ b/forms/source/component/Edit.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -458,7 +459,7 @@ namespace if ( !xSourceInfo.is() || !xDestInfo.is() ) { - OSL_ENSURE( sal_False, "lcl_transferProperties: invalid property set(s)!" ); + OSL_FAIL( "lcl_transferProperties: invalid property set(s)!" ); return; } @@ -495,7 +496,7 @@ namespace sMessage += ::rtl::OString( "\n\nMessage:\n" ); sMessage += ::rtl::OString( e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_ASCII_US ); } - OSL_ENSURE( sal_False, sMessage.getStr() ); + OSL_FAIL( sMessage.getStr() ); #endif } @@ -560,7 +561,6 @@ void OEditModel::write(const Reference<XObjectOutputStream>& _rxOutStream) throw { // -> fuer die Dauer des Speicherns meinem aggregierten Model die alte TextLen einreden // before doing this we have to save the current text value of the aggregate, as this may be affected by resetting the text len - // FS - 08.12.99 - 70606 aCurrentText = m_xAggregateSet->getPropertyValue(PROPERTY_TEXT); m_xAggregateSet->getPropertyValue(PROPERTY_MAXTEXTLEN) >>= nOldTextLen; @@ -628,7 +628,7 @@ void OEditModel::onConnectedDbColumn( const Reference< XInterface >& _rxForm ) if ( !m_bMaxTextLenModified ) { sal_Int32 nFieldLen = 0; - xField->getPropertyValue(::rtl::OUString::createFromAscii("Precision")) >>= nFieldLen; + xField->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Precision") ) ) >>= nFieldLen; if (nFieldLen && nFieldLen <= USHRT_MAX) { @@ -756,3 +756,4 @@ Any OEditModel::getDefaultForReset() const } //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Edit.hxx b/forms/source/component/Edit.hxx index 3b4c7c55a436..bbe7063c66f1 100644 --- a/forms/source/component/Edit.hxx +++ b/forms/source/component/Edit.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -185,3 +186,4 @@ private: #endif // _FORMS_EDIT_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/EditBase.cxx b/forms/source/component/EditBase.cxx index b8dcbb336ebb..10903bdfee55 100644 --- a/forms/source/component/EditBase.cxx +++ b/forms/source/component/EditBase.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,17 +30,13 @@ #include "precompiled_forms.hxx" #include "EditBase.hxx" #include "property.hxx" -#ifndef _FRM_PROPERTY_HRC_ #include "property.hrc" -#endif #include "services.hxx" #include <tools/debug.hxx> #include <comphelper/basicio.hxx> #include <cppuhelper/queryinterface.hxx> #include "frm_resource.hxx" -#ifndef _FRM_RESOURCE_HRC_ #include "frm_resource.hrc" -#endif //......................................................................... namespace frm @@ -361,3 +358,4 @@ Any OEditBaseModel::getPropertyDefaultByHandle( sal_Int32 nHandle ) const } //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/EditBase.hxx b/forms/source/component/EditBase.hxx index bfa51cb2d1ee..497fd570d522 100644 --- a/forms/source/component/EditBase.hxx +++ b/forms/source/component/EditBase.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -111,3 +112,4 @@ protected: #endif // _FORMS_EDITBASE_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/EventThread.cxx b/forms/source/component/EventThread.cxx index 504a180f6ee5..c729ae4350d4 100644 --- a/forms/source/component/EventThread.cxx +++ b/forms/source/component/EventThread.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -146,35 +147,24 @@ void OComponentEventThread::addEvent( const EventObject* _pEvt, m_aCond.set(); } -//--------------------------------------------------------------------- -//--- 22.08.01 15:48:15 ----------------------------------------------- - void OComponentEventThread::implStarted( ) { acquire( ); } -//--------------------------------------------------------------------- -//--- 22.08.01 15:48:16 ----------------------------------------------- - void OComponentEventThread::implTerminated( ) { release( ); } -//--------------------------------------------------------------------- -//--- 22.08.01 15:47:31 ----------------------------------------------- - void SAL_CALL OComponentEventThread::kill() { - OComponentEventThread_TBASE::kill(); + OComponentEventThread_TBASE::terminate(); + OComponentEventThread_TBASE::join(); implTerminated( ); } -//--------------------------------------------------------------------- -//--- 22.08.01 15:47:33 ----------------------------------------------- - void SAL_CALL OComponentEventThread::onTerminated() { OComponentEventThread_TBASE::onTerminated(); @@ -249,3 +239,4 @@ void OComponentEventThread::run() } // namespace frm //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/EventThread.hxx b/forms/source/component/EventThread.hxx index b36743f85b47..195a354fbd7a 100644 --- a/forms/source/component/EventThread.hxx +++ b/forms/source/component/EventThread.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,7 +33,7 @@ #include <com/sun/star/lang/EventObject.hpp> #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/awt/XControl.hpp> -#include <vos/thread.hxx> +#include <osl/thread.hxx> #include <osl/conditn.hxx> @@ -49,7 +50,7 @@ namespace frm // *************************************************************************************************** // *************************************************************************************************** -typedef ::vos::OThread OComponentEventThread_TBASE; +typedef ::osl::Thread OComponentEventThread_TBASE; class OComponentEventThread :public OComponentEventThread_TBASE ,public ::com::sun::star::lang::XEventListener @@ -108,8 +109,8 @@ public: virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& _rSource ) throw (::com::sun::star::uno::RuntimeException); /* resolve ambiguity : both OWeakObject and OObject have these memory operators */ - void * SAL_CALL operator new( size_t size ) throw() { return OThread::operator new(size); } - void SAL_CALL operator delete( void * p ) throw() { OThread::operator delete(p); } + void * SAL_CALL operator new( size_t size ) throw() { return osl::Thread::operator new(size); } + void SAL_CALL operator delete( void * p ) throw() { osl::Thread::operator delete(p); } private: void implStarted( ); @@ -124,3 +125,4 @@ private: #endif // _FRM_EVENT_THREAD_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/File.cxx b/forms/source/component/File.cxx index d92386b26405..170241c6eba2 100644 --- a/forms/source/component/File.cxx +++ b/forms/source/component/File.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,9 +34,7 @@ #include <com/sun/star/form/FormComponentType.hpp> -#ifndef _FRM_PROPERTY_HRC_ #include "property.hrc" -#endif #include "services.hxx" #include <tools/debug.hxx> #include <comphelper/container.hxx> @@ -249,7 +248,7 @@ void OFileControlModel::read(const Reference<stario::XObjectInputStream>& _rxInS readHelpTextCompatibly(_rxInStream); break; default: - DBG_ERROR("OFileControlModel::read : unknown version !"); + OSL_FAIL("OFileControlModel::read : unknown version !"); m_sDefaultValue = ::rtl::OUString(); } @@ -295,7 +294,6 @@ void OFileControlModel::_reset() { // release our mutex once (it's acquired in the calling method !), as setting aggregate properties // may cause any uno controls belonging to us to lock the solar mutex, which is potentially dangerous with // our own mutex locked - // FS - 72451 - 31.01.00 MutexRelease aRelease(m_aMutex); m_xAggregateSet->setPropertyValue(PROPERTY_TEXT, makeAny(m_sDefaultValue)); } @@ -305,3 +303,4 @@ void OFileControlModel::_reset() } // namespace frm //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/File.hxx b/forms/source/component/File.hxx index 200cac5545ea..02a09eedc198 100644 --- a/forms/source/component/File.hxx +++ b/forms/source/component/File.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -101,3 +102,4 @@ protected: #endif // _FORMS_FILE_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx index d20fec8f1459..4decc560fa4b 100644 --- a/forms/source/component/Filter.cxx +++ b/forms/source/component/Filter.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -119,13 +120,13 @@ namespace frm { if ( !m_xField.is() ) { - OSL_ENSURE( sal_False, "OFilterControl::ensureInitialized: improperly initialized: no field!" ); + OSL_FAIL( "OFilterControl::ensureInitialized: improperly initialized: no field!" ); return sal_False; } if ( !m_xConnection.is() ) { - OSL_ENSURE( sal_False, "OFilterControl::ensureInitialized: improperly initialized: no connection!" ); + OSL_FAIL( "OFilterControl::ensureInitialized: improperly initialized: no connection!" ); return sal_False; } @@ -143,7 +144,7 @@ namespace frm } if ( !m_xFormatter.is() ) { - OSL_ENSURE( sal_False, "OFilterControl::ensureInitialized: no number formatter!" ); + OSL_FAIL( "OFilterControl::ensureInitialized: no number formatter!" ); // no fallback anymore return sal_False; } @@ -168,22 +169,22 @@ namespace frm switch (m_nControlClass) { case FormComponentType::RADIOBUTTON: - aServiceName = ::rtl::OUString::createFromAscii("radiobutton"); + aServiceName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("radiobutton") ); break; case FormComponentType::CHECKBOX: - aServiceName = ::rtl::OUString::createFromAscii("checkbox"); + aServiceName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("checkbox") ); break; case FormComponentType::COMBOBOX: - aServiceName = ::rtl::OUString::createFromAscii("combobox"); + aServiceName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("combobox") ); break; case FormComponentType::LISTBOX: - aServiceName = ::rtl::OUString::createFromAscii("listbox"); + aServiceName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("listbox") ); break; default: if (m_bMultiLine) - aServiceName = ::rtl::OUString::createFromAscii("MultiLineEdit"); + aServiceName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MultiLineEdit") ); else - aServiceName = ::rtl::OUString::createFromAscii("Edit"); + aServiceName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Edit") ); } return aServiceName; } @@ -256,7 +257,6 @@ namespace frm OControl::initFormControlPeer( getPeer() ); // filter controls are _never_ readonly - // #107013# - 2002-02-03 - fs@openoffice.org Reference< XPropertySet > xModel( getModel(), UNO_QUERY_THROW ); Reference< XPropertySetInfo > xModelPSI( xModel->getPropertySetInfo(), UNO_SET_THROW ); if ( xModelPSI->hasPropertyByName( PROPERTY_READONLY ) ) @@ -590,14 +590,14 @@ namespace frm if (xVclWindow.is()) { Any aValue; - if ( aText.equalsAscii( "1" ) + if ( aText.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "1" ) ) || aText.equalsIgnoreAsciiCaseAscii( "TRUE" ) || aText.equalsIgnoreAsciiCaseAscii( "IS TRUE" ) ) { aValue <<= (sal_Int32)STATE_CHECK; } - else if ( aText.equalsAscii( "0" ) + else if ( aText.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "0" ) ) || aText.equalsIgnoreAsciiCaseAscii( "FALSE" ) ) { @@ -758,10 +758,10 @@ namespace frm try { Sequence< Any > aArgs(2); - aArgs[0] <<= PropertyValue(::rtl::OUString::createFromAscii("SQLException"), 0, makeAny( _rExcept ), PropertyState_DIRECT_VALUE); - aArgs[1] <<= PropertyValue(::rtl::OUString::createFromAscii("ParentWindow"), 0, makeAny( m_xMessageParent ), PropertyState_DIRECT_VALUE); + aArgs[0] <<= PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLException") ), 0, makeAny( _rExcept ), PropertyState_DIRECT_VALUE); + aArgs[1] <<= PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentWindow") ), 0, makeAny( m_xMessageParent ), PropertyState_DIRECT_VALUE); - static ::rtl::OUString s_sDialogServiceName = ::rtl::OUString::createFromAscii( "com.sun.star.sdb.ErrorMessageDialog" ); + static ::rtl::OUString s_sDialogServiceName (RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.ErrorMessageDialog") ); Reference< XExecutableDialog > xErrorDialog( maContext.createComponentWithArguments( s_sDialogServiceName, aArgs ), UNO_QUERY ); if ( xErrorDialog.is() ) @@ -804,7 +804,7 @@ namespace frm } else { - DBG_ERROR( "OFilterControl::initialize: unrecognized argument!" ); + OSL_FAIL( "OFilterControl::initialize: unrecognized argument!" ); continue; } @@ -826,7 +826,7 @@ namespace frm Reference< XPropertySet > xControlModel; if ( !(*pValue >>= xControlModel ) || !xControlModel.is() ) { - OSL_ENSURE( sal_False, "OFilterControl::initialize: invalid control model argument!" ); + OSL_FAIL( "OFilterControl::initialize: invalid control model argument!" ); continue; } @@ -929,3 +929,5 @@ namespace frm //......................................................................... } // namespace frm //......................................................................... + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Filter.hxx b/forms/source/component/Filter.hxx index 6ebc7c49df6b..97b291db9fbb 100644 --- a/forms/source/component/Filter.hxx +++ b/forms/source/component/Filter.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -45,7 +46,7 @@ #include <connectivity/sqlparse.hxx> #include <svx/ParseContext.hxx> -#include <hash_map> +#include <boost/unordered_map.hpp> //......................................................................... namespace frm @@ -74,7 +75,7 @@ namespace frm ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xMessageParent; - typedef ::std::hash_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash > MapString2String; + typedef ::boost::unordered_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash > MapString2String; MapString2String m_aDisplayItemToValueItem; ::rtl::OUString m_aText; @@ -156,3 +157,5 @@ namespace frm //......................................................................... #endif // FORMS_COMPONENT_FILTER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/FixedText.cxx b/forms/source/component/FixedText.cxx index 9396e7aabb59..2a27fbc2d4c5 100644 --- a/forms/source/component/FixedText.cxx +++ b/forms/source/component/FixedText.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,9 +32,7 @@ #include "FixedText.hxx" #include "services.hxx" -#ifndef _FRM_PROPERTY_HRC_ #include "property.hrc" -#endif #include "property.hxx" #include <tools/debug.hxx> @@ -136,3 +135,4 @@ void SAL_CALL OFixedTextModel::read(const Reference<XObjectInputStream>& _rxInSt } //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/FixedText.hxx b/forms/source/component/FixedText.hxx index 5adb15225702..a6b92a1e510f 100644 --- a/forms/source/component/FixedText.hxx +++ b/forms/source/component/FixedText.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -69,3 +70,4 @@ protected: #endif // _FORMS_FIXEDTEXT_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index 984e9b324b30..14c9f4fce067 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -64,9 +65,6 @@ #include <functional> #include <algorithm> -#include <functional> -#include <algorithm> - //... namespace frm ....................................................... namespace frm @@ -566,7 +564,7 @@ void OControlModel::readHelpTextCompatibly(const staruno::Reference< stario::XOb } catch(const Exception&) { - OSL_ENSURE(sal_False, "OControlModel::readHelpTextCompatibly: could not forward the property value to the aggregate!"); + OSL_FAIL("OControlModel::readHelpTextCompatibly: could not forward the property value to the aggregate!"); } } @@ -581,7 +579,7 @@ void OControlModel::writeHelpTextCompatibly(const staruno::Reference< stario::XO } catch(const Exception&) { - OSL_ENSURE(sal_False, "OControlModel::writeHelpTextCompatibly: could not retrieve the property value from the aggregate!"); + OSL_FAIL("OControlModel::writeHelpTextCompatibly: could not retrieve the property value from the aggregate!"); } ::comphelper::operator<<( _rxOutStream, sHelpText); } @@ -601,7 +599,7 @@ OControlModel::OControlModel( ,m_bNativeLook( sal_False ) // form controls are usually embedded into documents, not dialogs, and in documents // the native look is ugly .... - // #i37342# / 2004-11-19 / frank.schoenheit@sun.com + // #i37342# { DBG_CTOR(OControlModel, NULL); if (_rUnoControlModelTypeName.getLength()) // the is a model we have to aggregate @@ -621,7 +619,7 @@ OControlModel::OControlModel( } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OControlModel::OControlModel: caught an exception!" ); + OSL_FAIL( "OControlModel::OControlModel: caught an exception!" ); } } } @@ -783,7 +781,7 @@ Sequence< ::rtl::OUString > SAL_CALL OControlModel::getSupportedServiceNames_Sta { Sequence< ::rtl::OUString > aServiceNames( 2 ); aServiceNames[ 0 ] = FRM_SUN_FORMCOMPONENT; - aServiceNames[ 1 ] = ::rtl::OUString::createFromAscii( "com.sun.star.form.FormControlModel" ); + aServiceNames[ 1 ] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.FormControlModel") ); return aServiceNames; } @@ -994,7 +992,7 @@ Any OControlModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const if ( m_aPropertyBagHelper.hasDynamicPropertyByHandle( _nHandle ) ) m_aPropertyBagHelper.getDynamicPropertyDefaultByHandle( _nHandle, aReturn ); else - OSL_ENSURE( false, "OControlModel::convertFastPropertyValue: unknown handle!" ); + OSL_FAIL( "OControlModel::convertFastPropertyValue: unknown handle!" ); } return aReturn; } @@ -1052,7 +1050,7 @@ sal_Bool OControlModel::convertFastPropertyValue( if ( m_aPropertyBagHelper.hasDynamicPropertyByHandle( _nHandle ) ) bModified = m_aPropertyBagHelper.convertDynamicFastPropertyValue( _nHandle, _rValue, _rConvertedValue, _rOldValue ); else - OSL_ENSURE( false, "OControlModel::convertFastPropertyValue: unknown handle!" ); + OSL_FAIL( "OControlModel::convertFastPropertyValue: unknown handle!" ); break; } return bModified; @@ -1086,7 +1084,7 @@ void OControlModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const A if ( m_aPropertyBagHelper.hasDynamicPropertyByHandle( _nHandle ) ) m_aPropertyBagHelper.setDynamicFastPropertyValue( _nHandle, _rValue ); else - OSL_ENSURE( false, "OControlModel::setFastPropertyValue_NoBroadcast: unknown handle!" ); + OSL_FAIL( "OControlModel::setFastPropertyValue_NoBroadcast: unknown handle!" ); break; } } @@ -1653,7 +1651,7 @@ StringSequence SAL_CALL OBoundControlModel::getSupportedServiceNames() throw(Run Sequence< ::rtl::OUString > SAL_CALL OBoundControlModel::getSupportedServiceNames_Static() throw( RuntimeException ) { Sequence< ::rtl::OUString > aOwnServiceNames( 1 ); - aOwnServiceNames[ 0 ] = ::rtl::OUString::createFromAscii( "com.sun.star.form.DataAwareControlModel" ); + aOwnServiceNames[ 0 ] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.DataAwareControlModel") ); return ::comphelper::concatSequences( OControlModel::getSupportedServiceNames_Static(), @@ -1682,7 +1680,6 @@ void SAL_CALL OBoundControlModel::write( const Reference<stario::XObjectOutputSt // in anything from data loss to crash. // (use writeCommonProperties instead, this is called in derived classes write-method) // !!! EOIN !!! - // FS - 68876 - 28.09.1999 } //------------------------------------------------------------------------------ @@ -1807,7 +1804,7 @@ sal_Bool OBoundControlModel::convertFastPropertyValue( bModified = tryPropertyValue(_rConvertedValue, _rOldValue, _rValue, m_aControlSource); break; case PROPERTY_ID_BOUNDFIELD: - DBG_ERROR( "OBoundControlModel::convertFastPropertyValue: BoundField should be a read-only property !" ); + OSL_FAIL( "OBoundControlModel::convertFastPropertyValue: BoundField should be a read-only property !" ); throw com::sun::star::lang::IllegalArgumentException(); case PROPERTY_ID_CONTROLLABEL: if (!_rValue.hasValue()) @@ -1863,7 +1860,7 @@ void OBoundControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, co OSL_VERIFY( rValue >>= m_aControlSource ); break; case PROPERTY_ID_BOUNDFIELD: - DBG_ERROR("OBoundControlModel::setFastPropertyValue_NoBroadcast : BoundField should be a read-only property !"); + OSL_FAIL("OBoundControlModel::setFastPropertyValue_NoBroadcast : BoundField should be a read-only property !"); throw com::sun::star::lang::IllegalArgumentException(); case PROPERTY_ID_CONTROLLABEL: { @@ -1969,7 +1966,7 @@ void SAL_CALL OBoundControlModel::propertyChange( const PropertyChangeEvent& evt } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OBoundControlModel::propertyChange: could not adjust my binding-controlled property!" ); + OSL_FAIL( "OBoundControlModel::propertyChange: could not adjust my binding-controlled property!" ); } } } @@ -2135,7 +2132,7 @@ sal_Bool OBoundControlModel::connectToField(const Reference<XRowSet>& rForm) } else { - OSL_ENSURE(sal_False, "OBoundControlModel::connectToField: property NAME not supported!"); + OSL_FAIL("OBoundControlModel::connectToField: property NAME not supported!"); impl_setField_noNotify( NULL ); } } @@ -2159,7 +2156,7 @@ void OBoundControlModel::initFromField( const Reference< XRowSet >& _rxRowSet ) transferDbValueToControl(); else // reset the field if the row set is empty - // #i30661# / 2004-12-16 / frank.schoenheit@sun.com + // #i30661# resetNoBroadcast(); } } @@ -2332,7 +2329,6 @@ void OBoundControlModel::doSetControlValue( const Any& _rValue ) // release our mutex once (it's acquired in one of the the calling methods), as setting aggregate properties // may cause any uno controls belonging to us to lock the solar mutex, which is potentially dangerous with // our own mutex locked - // #72451# / 2000-01-31 / frank.schoenheit@sun.com MutexRelease aRelease( m_aMutex ); if ( ( m_nValuePropertyAggregateHandle != -1 ) && m_xAggregateFastSet.is() ) { @@ -2345,7 +2341,7 @@ void OBoundControlModel::doSetControlValue( const Any& _rValue ) } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OBoundControlModel::doSetControlValue: caught an exception!" ); + OSL_FAIL( "OBoundControlModel::doSetControlValue: caught an exception!" ); } } @@ -2365,7 +2361,7 @@ void OBoundControlModel::onConnectedValidator( ) } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OBoundControlModel::onConnectedValidator: caught an exception!" ); + OSL_FAIL( "OBoundControlModel::onConnectedValidator: caught an exception!" ); } recheckValidity( false ); } @@ -2383,7 +2379,7 @@ void OBoundControlModel::onDisconnectedValidator( ) } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OBoundControlModel::onDisconnectedValidator: caught an exception!" ); + OSL_FAIL( "OBoundControlModel::onDisconnectedValidator: caught an exception!" ); } recheckValidity( false ); } @@ -2471,12 +2467,9 @@ void OBoundControlModel::reset() throw (RuntimeException) } catch( const SQLException& ) { - OSL_ENSURE( sal_False, "OBoundControlModel::reset: caught an SQL exception!" ); + OSL_FAIL( "OBoundControlModel::reset: caught an SQL exception!" ); } - // don't count the insert row as "invalid" - // @since #i24495# - // @date 2004-05-14 - // @author fs@openoffice.org + // #i24495# - don't count the insert row as "invalid" sal_Bool bSimpleReset = ( !m_xColumn.is() // no connection to a database column @@ -2520,7 +2513,7 @@ void OBoundControlModel::reset() throw (RuntimeException) } catch(Exception&) { - DBG_ERROR("OBoundControlModel::reset: this should have succeeded in all cases!"); + OSL_FAIL("OBoundControlModel::reset: this should have succeeded in all cases!"); } sal_Bool bNeedValueTransfer = sal_True; @@ -2683,7 +2676,7 @@ void OBoundControlModel::disconnectExternalValueBinding( ) } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OBoundControlModel::disconnectExternalValueBinding: caught an exception!" ); + OSL_FAIL( "OBoundControlModel::disconnectExternalValueBinding: caught an exception!" ); } // if the binding also acts as our validator, disconnect the validator, too @@ -2711,8 +2704,8 @@ void SAL_CALL OBoundControlModel::setValueBinding( const Reference< XValueBindin OSL_PRECOND( m_bSupportsExternalBinding, "OBoundControlModel::setValueBinding: How did you reach this method?" ); // the interface for this method should not have been exposed if we do not // support binding to external data - - if ( !impl_approveValueBinding_nolock( _rxBinding ) ) + // allow reset + if ( _rxBinding.is() && !impl_approveValueBinding_nolock( _rxBinding ) ) { throw IncompatibleTypesException( FRM_RES_STRING( RID_STR_INCOMPATIBLE_TYPES ), @@ -3052,7 +3045,7 @@ void OBoundControlModel::recheckValidity( bool _bForceNotification ) } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OBoundControlModel::recheckValidity: caught an exception!" ); + OSL_FAIL( "OBoundControlModel::recheckValidity: caught an exception!" ); } } @@ -3074,3 +3067,4 @@ void OBoundControlModel::describeFixedProperties( Sequence< Property >& _rProps } //... namespace frm ....................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx index 5f36934cb98e..9d0170078da1 100644 --- a/forms/source/component/FormattedField.cxx +++ b/forms/source/component/FormattedField.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -59,7 +60,7 @@ #include <com/sun/star/util/XNumberFormatTypes.hpp> #include <com/sun/star/form/XForm.hpp> #include <com/sun/star/container/XIndexAccess.hpp> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> // needed as long as we use the SolarMutex #include <comphelper/streamsection.hxx> #include <cppuhelper/weakref.hxx> @@ -126,7 +127,7 @@ StandardFormatsSupplier::StandardFormatsSupplier(const Reference< XMultiServiceF { SetNumberFormatter(m_pMyPrivateFormatter); - // #i29147# - 2004-06-18 - fs@openoffice.org + // #i29147# ::utl::DesktopTerminationObserver::registerTerminationListener( this ); } @@ -183,7 +184,7 @@ void StandardFormatsSupplier::notifyTermination() Reference< XNumberFormatsSupplier > xKeepAlive = this; // when the application is terminating, release our static reference so that we are cleared/destructed // earlier than upon unloading the library - // #i29147# - 2004-06-18 - fs@openoffice.org + // #i29147# s_xDefaultFormatsSupplier = WeakReference< XNumberFormatsSupplier >( ); SetNumberFormatter( NULL ); @@ -479,14 +480,12 @@ void OFormattedModel::describeAggregateProperties( Sequence< Property >& _rAggre // same for FormatKey // (though the paragraph above for the TreatAsNumeric does not hold anymore - we do not have an UI for this. // But we have for the format key ...) - // 25.06.2001 - 87862 - frank.schoenheit@sun.com ModifyPropertyAttributes(_rAggregateProps, PROPERTY_FORMATKEY, 0, PropertyAttribute::TRANSIENT); RemoveProperty(_rAggregateProps, PROPERTY_STRICTFORMAT); // no strict format property for formatted fields: it does not make sense, 'cause // there is no general way to decide which characters/sub strings are allowed during the input of an // arbitraryly formatted control - // 81441 - 12/07/00 - FS } //------------------------------------------------------------------------------ @@ -660,7 +659,7 @@ Reference<XNumberFormatsSupplier> OFormattedModel::calcFormFormatsSupplier() co if (!xNextParentForm.is()) { - DBG_ERROR("OFormattedModel::calcFormFormatsSupplier : have no ancestor which is a form !"); + OSL_FAIL("OFormattedModel::calcFormFormatsSupplier : have no ancestor which is a form !"); return NULL; } @@ -690,9 +689,8 @@ void OFormattedModel::loaded(const EventObject& rEvent) throw ( ::com::sun::star // property requests and one for our own code. This would need a lot of code rewriting // alternative b): The NumberFormatter has to be really threadsafe (with an own mutex), which is // the only "clean" solution for me. - // FS - 69603 - 02.11.99 - ::vos::OGuard aGuard(Application::GetSolarMutex()); + SolarMutexGuard aGuard; OEditBaseModel::loaded(rEvent); } @@ -789,7 +787,7 @@ void OFormattedModel::onConnectedDbColumn( const Reference< XInterface >& _rxFor Reference<XNumberFormatsSupplier> xSupplier = calcFormatsSupplier(); m_bNumeric = getBOOL( getPropertyValue( PROPERTY_TREATASNUMERIC ) ); m_nKeyType = getNumberFormatType( xSupplier->getNumberFormats(), nFormatKey ); - xSupplier->getNumberFormatSettings()->getPropertyValue( ::rtl::OUString::createFromAscii("NullDate") ) >>= m_aNullDate; + xSupplier->getNumberFormatSettings()->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NullDate") ) ) >>= m_aNullDate; OEditBaseModel::onConnectedDbColumn( _rxForm ); } @@ -851,7 +849,7 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream) ::rtl::OUString sFormatDescription; LanguageType eFormatLanguage = LANGUAGE_DONTKNOW; - static const ::rtl::OUString s_aLocaleProp = ::rtl::OUString::createFromAscii("Locale"); + static const ::rtl::OUString s_aLocaleProp (RTL_CONSTASCII_USTRINGPARAM("Locale") ); Reference<com::sun::star::beans::XPropertySet> xFormat = xFormats->getByKey(nKey); if (hasProperty(s_aLocaleProp, xFormat)) { @@ -864,7 +862,7 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream) } } - static const ::rtl::OUString s_aFormatStringProp = ::rtl::OUString::createFromAscii("FormatString"); + static const ::rtl::OUString s_aFormatStringProp (RTL_CONSTASCII_USTRINGPARAM("FormatString") ); if (hasProperty(s_aFormatStringProp, xFormat)) xFormat->getPropertyValue(s_aFormatStringProp) >>= sFormatDescription; @@ -979,7 +977,7 @@ void OFormattedModel::read(const Reference<XObjectInputStream>& _rxInStream) thr case 2: break; case 3: - DBG_ERROR("FmXFormattedModel::read : unknown effective value type !"); + OSL_FAIL("FmXFormattedModel::read : unknown effective value type !"); } } @@ -999,7 +997,7 @@ void OFormattedModel::read(const Reference<XObjectInputStream>& _rxInStream) thr } break; default : - DBG_ERROR("OFormattedModel::read : unknown version !"); + OSL_FAIL("OFormattedModel::read : unknown version !"); // dann bleibt das Format des aggregierten Sets, wie es bei der Erzeugung ist : void defaultCommonEditProperties(); break; @@ -1255,3 +1253,5 @@ void OFormattedModel::resetNoBroadcast() //......................................................................... } //......................................................................... + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/FormattedField.hxx b/forms/source/component/FormattedField.hxx index 42c7a5b1bf2a..9891a71bf654 100644 --- a/forms/source/component/FormattedField.hxx +++ b/forms/source/component/FormattedField.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -196,3 +197,4 @@ namespace frm #endif // _FORMS_FORMATTEDFIELD_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/FormattedFieldWrapper.cxx b/forms/source/component/FormattedFieldWrapper.cxx index cf9a04074cfc..118c06921ce1 100644 --- a/forms/source/component/FormattedFieldWrapper.cxx +++ b/forms/source/component/FormattedFieldWrapper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -204,7 +205,7 @@ Any SAL_CALL OFormattedFieldWrapper::queryAggregation(const Type& _rType) throw //------------------------------------------------------------------ ::rtl::OUString SAL_CALL OFormattedFieldWrapper::getImplementationName( ) throw (RuntimeException) { - return ::rtl::OUString::createFromAscii("com.sun.star.comp.forms.OFormattedFieldWrapper"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.forms.OFormattedFieldWrapper") ); } //------------------------------------------------------------------ @@ -379,7 +380,7 @@ void OFormattedFieldWrapper::ensureAggregate() Reference< XServiceInfo > xSI(m_xAggregate, UNO_QUERY); if (!xSI.is()) { - DBG_ERROR("OFormattedFieldWrapper::ensureAggregate: the aggregate has no XServiceInfo!"); + OSL_FAIL("OFormattedFieldWrapper::ensureAggregate: the aggregate has no XServiceInfo!"); m_xAggregate.clear(); } } @@ -396,3 +397,4 @@ void OFormattedFieldWrapper::ensureAggregate() //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/FormattedFieldWrapper.hxx b/forms/source/component/FormattedFieldWrapper.hxx index a3cfcaab50d0..d7726ee428fa 100644 --- a/forms/source/component/FormattedFieldWrapper.hxx +++ b/forms/source/component/FormattedFieldWrapper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -97,3 +98,4 @@ protected: #endif // _FRM_FORMATTED_FIELD_WRAPPER_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/FormsCollection.cxx b/forms/source/component/FormsCollection.cxx index 2664a74546e8..2b72d8e42f57 100644 --- a/forms/source/component/FormsCollection.cxx +++ b/forms/source/component/FormsCollection.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -118,7 +119,7 @@ Any SAL_CALL OFormsCollection::queryAggregation(const Type& _rType) throw(Runtim //------------------------------------------------------------------------------ ::rtl::OUString SAL_CALL OFormsCollection::getImplementationName() throw(RuntimeException) { - return ::rtl::OUString::createFromAscii("com.sun.star.comp.forms.OFormsCollection"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.forms.OFormsCollection") ); } //------------------------------------------------------------------------------ @@ -138,7 +139,7 @@ StringSequence SAL_CALL OFormsCollection::getSupportedServiceNames() throw(Runti StringSequence aReturn(2); aReturn.getArray()[0] = FRM_SUN_FORMS_COLLECTION; - aReturn.getArray()[1] = ::rtl::OUString::createFromAscii("com.sun.star.form.FormComponents"); + aReturn.getArray()[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.FormComponents") ); return aReturn; } @@ -184,3 +185,4 @@ InterfaceRef OFormsCollection::getParent() throw( RuntimeException ) } // namespace frm //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/FormsCollection.hxx b/forms/source/component/FormsCollection.hxx index 705ac89b211a..df547f1f6238 100644 --- a/forms/source/component/FormsCollection.hxx +++ b/forms/source/component/FormsCollection.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -98,3 +99,4 @@ public: } // namespace frm //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx index c7b65906dc30..274e77fbd407 100644 --- a/forms/source/component/Grid.cxx +++ b/forms/source/component/Grid.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -202,7 +203,7 @@ void OGridControlModel::cloneColumns( const OGridControlModel* _pOriginalContain } catch( const Exception& ) { - DBG_ERROR( "OGridControlModel::cloneColumns: caught an exception while cloning the columns!" ); + OSL_FAIL( "OGridControlModel::cloneColumns: caught an exception while cloning the columns!" ); } } @@ -255,7 +256,7 @@ Reference< XRowSet > SAL_CALL OGridControlModel::getRowSet( ) throw (RuntimeExc //------------------------------------------------------------------------------ void SAL_CALL OGridControlModel::setRowSet( const Reference< XRowSet >& /*_rxDataSource*/ ) throw (RuntimeException) { - OSL_ENSURE( false, "OGridControlModel::setRowSet: not supported!" ); + OSL_FAIL( "OGridControlModel::setRowSet: not supported!" ); } //-------------------------------------------------------------------- @@ -398,7 +399,7 @@ Reference<XPropertySet> OGridControlModel::createColumn(sal_Int32 nTypeId) cons case TYPE_TIMEFIELD: xReturn = new TimeFieldColumn( getContext() ); break; case TYPE_FORMATTEDFIELD: xReturn = new FormattedFieldColumn( getContext() ); break; default: - DBG_ERROR("OGridControlModel::createColumn: Unknown Column"); + OSL_FAIL("OGridControlModel::createColumn: Unknown Column"); break; } return xReturn; @@ -1161,3 +1162,4 @@ void OGridControlModel::read(const Reference<XObjectInputStream>& _rxInStream) t } // namespace frm //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Grid.hxx b/forms/source/component/Grid.hxx index 6cd0e9787ef1..5b4b645d77f0 100644 --- a/forms/source/component/Grid.hxx +++ b/forms/source/component/Grid.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -217,3 +218,4 @@ protected: //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/GroupBox.cxx b/forms/source/component/GroupBox.cxx index adf055955f3a..ccb45d2f8a48 100644 --- a/forms/source/component/GroupBox.cxx +++ b/forms/source/component/GroupBox.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,9 +30,7 @@ #include "precompiled_forms.hxx" #include "GroupBox.hxx" #include "property.hxx" -#ifndef _FRM_PROPERTY_HRC_ #include "property.hrc" -#endif #include "services.hxx" #include <tools/debug.hxx> @@ -138,7 +137,7 @@ void SAL_CALL OGroupBoxModel::read(const Reference< XObjectInputStream>& _rxInSt if (nVersion > 0x0002) { - DBG_ERROR("OGroupBoxModel::read : unknown version !"); + OSL_FAIL("OGroupBoxModel::read : unknown version !"); } }; @@ -173,3 +172,4 @@ StringSequence SAL_CALL OGroupBoxControl::getSupportedServiceNames() throw(Runti } //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/GroupBox.hxx b/forms/source/component/GroupBox.hxx index 902c60ced488..a7b0411af451 100644 --- a/forms/source/component/GroupBox.hxx +++ b/forms/source/component/GroupBox.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -82,3 +83,4 @@ public: #endif // _FORMS_GROUPBOX_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/GroupManager.cxx b/forms/source/component/GroupManager.cxx index fde6aa1a23ca..1268bcb5828b 100644 --- a/forms/source/component/GroupManager.cxx +++ b/forms/source/component/GroupManager.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -120,18 +121,17 @@ OGroupComp::OGroupComp(const OGroupComp& _rSource) //------------------------------------------------------------------ OGroupComp::OGroupComp(const Reference<XPropertySet>& rxSet, sal_Int32 nInsertPos ) - :m_xComponent( rxSet ) - ,m_xControlModel(rxSet,UNO_QUERY) - ,m_nPos( nInsertPos ) - ,m_nTabIndex(0) + : m_aName( OGroupManager::GetGroupName( rxSet ) ) + , m_xComponent( rxSet ) + , m_xControlModel(rxSet,UNO_QUERY) + , m_nPos( nInsertPos ) + , m_nTabIndex(0) { if (m_xComponent.is()) { if (hasProperty( PROPERTY_TABINDEX, m_xComponent ) ) // Indices kleiner 0 werden wie 0 behandelt m_nTabIndex = Max(getINT16(m_xComponent->getPropertyValue( PROPERTY_TABINDEX )) , sal_Int16(0)); - - m_xComponent->getPropertyValue( PROPERTY_NAME ) >>= m_aName; } } @@ -226,12 +226,12 @@ void OGroup::RemoveComponent( const Reference<XPropertySet>& rxElement ) } else { - DBG_ERROR( "OGroup::RemoveComponent: Component nicht in Gruppe" ); + OSL_FAIL( "OGroup::RemoveComponent: Component nicht in Gruppe" ); } } else { - DBG_ERROR( "OGroup::RemoveComponent: Component nicht in Gruppe" ); + OSL_FAIL( "OGroup::RemoveComponent: Component nicht in Gruppe" ); } } @@ -269,7 +269,7 @@ Sequence< Reference<XControlModel> > OGroup::GetControlModels() const DBG_NAME(OGroupManager); //------------------------------------------------------------------ OGroupManager::OGroupManager(const Reference< XContainer >& _rxContainer) - :m_pCompGroup( new OGroup( ::rtl::OUString::createFromAscii( "AllComponentGroup" ) ) ) + :m_pCompGroup( new OGroup( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AllComponentGroup") ) ) ) ,m_xContainer(_rxContainer) { DBG_CTOR(OGroupManager,NULL); @@ -318,7 +318,8 @@ void OGroupManager::removeFromGroupMap(const ::rtl::OUString& _sGroupName,const aFind->second.RemoveComponent( _xSet ); // Wenn Anzahl der Gruppenelemente == 1 ist, Gruppe deaktivieren - if ( aFind->second.Count() == 1 ) + sal_Int32 nCount = aFind->second.Count(); + if ( nCount == 1 || nCount == 0 ) { OActiveGroups::iterator aActiveFind = ::std::find( m_aActiveGroupMap.begin(), @@ -329,7 +330,7 @@ void OGroupManager::removeFromGroupMap(const ::rtl::OUString& _sGroupName,const { // the group is active. Deactivate it if the remaining component // is *no* radio button - if ( !isRadioButton( aFind->second.GetObject( 0 ) ) ) + if ( nCount == 0 || !isRadioButton( aFind->second.GetObject( 0 ) ) ) m_aActiveGroupMap.erase( aActiveFind ); } } @@ -338,6 +339,8 @@ void OGroupManager::removeFromGroupMap(const ::rtl::OUString& _sGroupName,const // Bei Component als PropertyChangeListener abmelden _xSet->removePropertyChangeListener( PROPERTY_NAME, this ); + if (hasProperty(PROPERTY_GROUP_NAME, _xSet)) + _xSet->removePropertyChangeListener( PROPERTY_GROUP_NAME, this ); if (hasProperty(PROPERTY_TABINDEX, _xSet)) _xSet->removePropertyChangeListener( PROPERTY_TABINDEX, this ); } @@ -348,10 +351,23 @@ void SAL_CALL OGroupManager::propertyChange(const PropertyChangeEvent& evt) thro // Component aus Gruppe entfernen ::rtl::OUString sGroupName; - if (evt.PropertyName == PROPERTY_NAME) + if (hasProperty( PROPERTY_GROUP_NAME, xSet )) + xSet->getPropertyValue( PROPERTY_GROUP_NAME ) >>= sGroupName; + if (evt.PropertyName == PROPERTY_NAME) { + if (sGroupName.getLength() > 0) + return; // group hasn't changed; ignore this name change. + // no GroupName; use Name as GroupNme + evt.OldValue >>= sGroupName; + } + else if (evt.PropertyName == PROPERTY_GROUP_NAME) { evt.OldValue >>= sGroupName; + if (sGroupName.getLength() == 0) { + // No prior GroupName; fallback to Nme + xSet->getPropertyValue( PROPERTY_NAME ) >>= sGroupName; + } + } else - xSet->getPropertyValue( PROPERTY_NAME ) >>= sGroupName; + sGroupName = GetGroupName( xSet ); removeFromGroupMap(sGroupName,xSet); @@ -434,8 +450,7 @@ void OGroupManager::InsertElement( const Reference<XPropertySet>& xSet ) m_pCompGroup->InsertComponent( xSet ); // Component in Gruppe aufnehmen - ::rtl::OUString sGroupName; - xSet->getPropertyValue( PROPERTY_NAME ) >>= sGroupName; + ::rtl::OUString sGroupName( GetGroupName( xSet ) ); OGroupArr::iterator aFind = m_aGroupArr.find(sGroupName); @@ -473,6 +488,8 @@ void OGroupManager::InsertElement( const Reference<XPropertySet>& xSet ) // Bei Component als PropertyChangeListener anmelden xSet->addPropertyChangeListener( PROPERTY_NAME, this ); + if (hasProperty(PROPERTY_GROUP_NAME, xSet)) + xSet->addPropertyChangeListener( PROPERTY_GROUP_NAME, this ); // Tabindex muss nicht jeder unterstuetzen if (hasProperty(PROPERTY_TABINDEX, xSet)) @@ -489,13 +506,28 @@ void OGroupManager::RemoveElement( const Reference<XPropertySet>& xSet ) return; // Component aus Gruppe entfernen - ::rtl::OUString sGroupName; - xSet->getPropertyValue( PROPERTY_NAME ) >>= sGroupName; + ::rtl::OUString sGroupName( GetGroupName( xSet ) ); removeFromGroupMap(sGroupName,xSet); } +::rtl::OUString OGroupManager::GetGroupName( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xComponent ) +{ + if (!xComponent.is()) + return ::rtl::OUString(); + ::rtl::OUString sGroupName; + if (hasProperty( PROPERTY_GROUP_NAME, xComponent )) { + xComponent->getPropertyValue( PROPERTY_GROUP_NAME ) >>= sGroupName; + if (sGroupName.getLength() == 0) + xComponent->getPropertyValue( PROPERTY_NAME ) >>= sGroupName; + } + else + xComponent->getPropertyValue( PROPERTY_NAME ) >>= sGroupName; + return sGroupName; +} + //......................................................................... } // namespace frm //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/GroupManager.hxx b/forms/source/component/GroupManager.hxx index fc9d8ce82c61..7f6e99be8354 100644 --- a/forms/source/component/GroupManager.hxx +++ b/forms/source/component/GroupManager.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,10 +35,12 @@ #include <com/sun/star/beans/XPropertyChangeListener.hpp> #include <com/sun/star/container/XContainerListener.hpp> #include <com/sun/star/container/XContainer.hpp> -#include <comphelper/stl_types.hxx> #include <cppuhelper/implbase2.hxx> #include <comphelper/stl_types.hxx> #include <comphelper/types.hxx> + +#include <algorithm> + using namespace comphelper; /*======================================================================== @@ -71,7 +74,7 @@ namespace frm template <class ELEMENT, class LESS_COMPARE> sal_Int32 insert_sorted(::std::vector<ELEMENT>& _rArray, const ELEMENT& _rNewElement, const LESS_COMPARE& _rCompareOp) { - typename ::std::vector<ELEMENT>::iterator aInsertPos = lower_bound( + typename ::std::vector<ELEMENT>::iterator aInsertPos = ::std::lower_bound( _rArray.begin(), _rArray.end(), _rNewElement, @@ -84,7 +87,7 @@ namespace frm template <class ELEMENT, class LESS_COMPARE> sal_Bool seek_entry(const ::std::vector<ELEMENT>& _rArray, const ELEMENT& _rNewElement, sal_Int32& nPos, const LESS_COMPARE& _rCompareOp) { - typename ::std::vector<ELEMENT>::const_iterator aExistentPos = lower_bound( + typename ::std::vector<ELEMENT>::const_iterator aExistentPos = ::std::lower_bound( _rArray.begin(), _rArray.end(), _rNewElement, @@ -217,6 +220,8 @@ public: void getGroup(sal_Int32 nGroup, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel> >& _rGroup, ::rtl::OUString& Name); void getGroupByName(const ::rtl::OUString& Name, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel> >& _rGroup); ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel> > getControlModels(); + + static ::rtl::OUString GetGroupName( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xComponent ); }; @@ -226,3 +231,4 @@ public: #endif // _FRM_GROUPMANAGER_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Hidden.cxx b/forms/source/component/Hidden.cxx index 6094839a99b7..b2813dd21d93 100644 --- a/forms/source/component/Hidden.cxx +++ b/forms/source/component/Hidden.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,9 +30,7 @@ #include "precompiled_forms.hxx" #include "Hidden.hxx" #include "property.hxx" -#ifndef _FRM_PROPERTY_HRC_ #include "property.hrc" -#endif #include "services.hxx" #include <tools/debug.hxx> #include <comphelper/basicio.hxx> @@ -179,7 +178,7 @@ void SAL_CALL OHiddenModel::read(const Reference<XObjectInputStream>& _rxInStrea { case 1 : { ::rtl::OUString sDummy; _rxInStream >> sDummy; _rxInStream >> m_sHiddenValue; } break; case 2 : _rxInStream >> m_sHiddenValue; break; - default : DBG_ERROR("OHiddenModel::read : unknown version !"); m_sHiddenValue = ::rtl::OUString(); + default : OSL_FAIL("OHiddenModel::read : unknown version !"); m_sHiddenValue = ::rtl::OUString(); } OControlModel::read(_rxInStream); } @@ -188,3 +187,4 @@ void SAL_CALL OHiddenModel::read(const Reference<XObjectInputStream>& _rxInStrea } //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Hidden.hxx b/forms/source/component/Hidden.hxx index 9052417c3f2c..640b91dbd3c1 100644 --- a/forms/source/component/Hidden.hxx +++ b/forms/source/component/Hidden.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -82,3 +83,4 @@ protected: } //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/ImageButton.cxx b/forms/source/component/ImageButton.cxx index e026f5380bc1..c65fea102a12 100644 --- a/forms/source/component/ImageButton.cxx +++ b/forms/source/component/ImageButton.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,7 +32,7 @@ #include <tools/debug.hxx> #include <tools/urlobj.hxx> #include <vcl/svapp.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <comphelper/basicio.hxx> #include <com/sun/star/awt/MouseButton.hpp> @@ -164,7 +165,7 @@ void OImageButtonModel::read(const Reference<XObjectInputStream>& _rxInStream) t break; default : - DBG_ERROR("OImageButtonModel::read : unknown version !"); + OSL_FAIL("OImageButtonModel::read : unknown version !"); m_eButtonType = FormButtonType_PUSH; m_sTargetURL = ::rtl::OUString(); m_sTargetFrame = ::rtl::OUString(); @@ -230,7 +231,7 @@ Any SAL_CALL OImageButtonControl::queryAggregation(const Type& _rType) throw (Ru //------------------------------------------------------------------------------ void OImageButtonControl::mousePressed(const awt::MouseEvent& e) throw ( ::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; if (e.Buttons != awt::MouseButton::LEFT) return; @@ -271,3 +272,4 @@ void SAL_CALL OImageButtonControl::mouseExited(const awt::MouseEvent& /*e*/) thr } // namespace frm //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/ImageButton.hxx b/forms/source/component/ImageButton.hxx index 188ee8558e70..cd5e4f7758a1 100644 --- a/forms/source/component/ImageButton.hxx +++ b/forms/source/component/ImageButton.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -105,3 +106,4 @@ public: #endif // _FRM_IMAGE_BUTTON_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx index a2ad111a79b7..c05e9e3f2828 100644 --- a/forms/source/component/ImageControl.cxx +++ b/forms/source/component/ImageControl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -179,7 +180,6 @@ OImageControlModel::OImageControlModel( const OImageControlModel* _pOriginal, co osl_incrementInterlockedCount( &m_refCount ); { // simulate a propertyChanged event for the ImageURL - // 2003-05-15 - #109591# - fs@openoffice.org ::osl::MutexGuard aGuard( m_aMutex ); impl_handleNewImageURL_lck( eOther ); } @@ -408,7 +408,7 @@ void OImageControlModel::read(const Reference<XObjectInputStream>& _rxInStream) readCommonProperties(_rxInStream); break; default : - DBG_ERROR("OImageControlModel::read : unknown version !"); + OSL_FAIL("OImageControlModel::read : unknown version !"); m_bReadOnly = sal_False; defaultCommonProperties(); break; @@ -488,7 +488,7 @@ sal_Bool OImageControlModel::impl_handleNewImageURL_lck( ValueChangeInstigator _ break; case ImageStoreInvalid: - OSL_ENSURE( false, "OImageControlModel::impl_handleNewImageURL_lck: image storage type type!" ); + OSL_FAIL( "OImageControlModel::impl_handleNewImageURL_lck: image storage type type!" ); break; } @@ -588,7 +588,7 @@ Any OImageControlModel::translateDbColumnToControlValue() return makeAny( sImageLink ); } case ImageStoreInvalid: - OSL_ENSURE( false, "OImageControlModel::translateDbColumnToControlValue: invalid field type!" ); + OSL_FAIL( "OImageControlModel::translateDbColumnToControlValue: invalid field type!" ); break; } return Any(); @@ -630,7 +630,7 @@ void OImageControlModel::doSetControlValue( const Any& _rValue ) break; case ImageStoreInvalid: - OSL_ENSURE( false, "OImageControlModel::doSetControlValue: invalid field type!" ); + OSL_FAIL( "OImageControlModel::doSetControlValue: invalid field type!" ); break; } // switch ( lcl_getImageStoreType( getFieldType() ) ) @@ -643,7 +643,6 @@ void OImageControlModel::doSetControlValue( const Any& _rValue ) // release our mutex once (it's acquired in the calling method!), as starting the image production may // result in the locking of the solar mutex (unfortunally the default implementation of our aggregate, // VCLXImageControl, does this locking) - // FS - 74438 - 30.03.00 MutexRelease aRelease(m_aMutex); xProducer->startProduction(); } @@ -860,7 +859,7 @@ bool OImageControlControl::implInsertGraphics() // Force bIsLink to be sal_True if we're bound to a field. Though we initialized the file picker with IsLink=TRUE // in this case, and disabled the respective control, there might be picker implementations which do not // respect this, and return IsLink=FALSE here. In this case, "normalize" the flag. - // #i112659# / 2010-08-26 / frank.schoenheit@oracle.com + // #i112659# bIsLink |= bHasField; if ( !bIsLink ) { @@ -876,7 +875,7 @@ bool OImageControlControl::implInsertGraphics() } catch(Exception&) { - DBG_ERROR("OImageControlControl::implInsertGraphics: caught an exception while attempting to execute the FilePicker!"); + OSL_FAIL("OImageControlControl::implInsertGraphics: caught an exception while attempting to execute the FilePicker!"); } return false; } @@ -905,7 +904,7 @@ bool OImageControlControl::impl_isEmptyGraphics_nothrow() const //------------------------------------------------------------------------------ void OImageControlControl::mousePressed(const ::com::sun::star::awt::MouseEvent& e) throw ( ::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if (e.Buttons != MouseButton::LEFT) return; @@ -933,7 +932,6 @@ void OImageControlControl::mousePressed(const ::com::sun::star::awt::MouseEvent& if ( ( e.X < 0 ) || ( e.Y < 0 ) ) { // context menu triggered by keyboard // position it in the center of the control - // 102205 - 16.08.2002 - fs@openoffice.org Reference< XWindow > xWindow( static_cast< ::cppu::OWeakObject* >( this ), UNO_QUERY ); OSL_ENSURE( xWindow.is(), "OImageControlControl::mousePressed: me not a window? How this?" ); if ( xWindow.is() ) @@ -973,7 +971,6 @@ void OImageControlControl::mousePressed(const ::com::sun::star::awt::MouseEvent& // wenn Control nicht gebunden ist, kein Dialog (da die zu schickende URL hinterher sowieso // versanden wuerde) - // FS - #64946# - 19.04.99 Reference<XPropertySet> xBoundField; if (hasProperty(PROPERTY_BOUNDFIELD, xSet)) ::cppu::extractInterface(xBoundField, xSet->getPropertyValue(PROPERTY_BOUNDFIELD)); @@ -1021,3 +1018,4 @@ void SAL_CALL OImageControlControl::mouseExited(const awt::MouseEvent& /*e*/) th } // namespace frm //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/ImageControl.hxx b/forms/source/component/ImageControl.hxx index 853c4aadffbf..65c3f0dc872e 100644 --- a/forms/source/component/ImageControl.hxx +++ b/forms/source/component/ImageControl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -208,3 +209,4 @@ private: #endif // _FRM_IMAGE_CONTROL_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index 909cc1f23659..a54377c73f27 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -340,7 +341,7 @@ namespace frm break; case PROPERTY_ID_VALUE_SEQ : - OSL_ENSURE( false, "ValueItemList is read-only!" ); + OSL_FAIL( "ValueItemList is read-only!" ); throw PropertyVetoException(); case PROPERTY_ID_DEFAULT_SELECT_SEQ : @@ -391,7 +392,7 @@ namespace frm break; case PROPERTY_ID_VALUE_SEQ : - OSL_ENSURE( false, "ValueItemList is read-only!" ); + OSL_FAIL( "ValueItemList is read-only!" ); throw PropertyVetoException(); case PROPERTY_ID_DEFAULT_SELECT_SEQ : @@ -412,7 +413,7 @@ namespace frm void SAL_CALL OListBoxModel::setPropertyValues( const Sequence< ::rtl::OUString >& _rPropertyNames, const Sequence< Any >& _rValues ) throw(PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException) { // if both SelectedItems and StringItemList are set, care for this - // #i27024# / 2004-04-05 / fs@openoffice.org + // #i27024# const Any* pSelectSequenceValue = NULL; const ::rtl::OUString* pStartPos = _rPropertyNames.getConstArray(); @@ -545,7 +546,7 @@ namespace frm } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OComboBoxModel::read: caught an exception while examining the aggregate's string item list!" ); + OSL_FAIL( "OComboBoxModel::read: caught an exception while examining the aggregate's string item list!" ); } // Version @@ -554,7 +555,7 @@ namespace frm if (nVersion > 0x0004) { - DBG_ERROR("OListBoxModel::read : invalid (means unknown) version !"); + OSL_FAIL("OListBoxModel::read : invalid (means unknown) version !"); ValueList().swap(m_aListSourceValues); m_aBoundColumn <<= (sal_Int16)0; ValueList().swap(m_aBoundValues); @@ -749,17 +750,17 @@ namespace frm Reference<XDatabaseMetaData> xMeta = xConnection->getMetaData(); ::rtl::OUString aQuote = xMeta->getIdentifierQuoteString(); - ::rtl::OUString aStatement = ::rtl::OUString::createFromAscii("SELECT "); + ::rtl::OUString aStatement(RTL_CONSTASCII_USTRINGPARAM("SELECT ")); if (!aBoundFieldName.getLength()) // act like a combobox - aStatement += ::rtl::OUString::createFromAscii("DISTINCT "); + aStatement += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DISTINCT ") ); aStatement += quoteName(aQuote,aFieldName); if (aBoundFieldName.getLength()) { - aStatement += ::rtl::OUString::createFromAscii(", "); + aStatement += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(", ") ); aStatement += quoteName(aQuote, aBoundFieldName); } - aStatement += ::rtl::OUString::createFromAscii(" FROM "); + aStatement += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" FROM ") ); ::rtl::OUString sCatalog, sSchema, sTable; qualifiedNameComponents( xMeta, sListSource, sCatalog, sSchema, sTable, eInDataManipulation ); @@ -851,7 +852,7 @@ namespace frm try { Reference< XPropertySet > xBoundField( xColumns->getByIndex( *aBoundColumn ), UNO_QUERY_THROW ); - OSL_VERIFY( xBoundField->getPropertyValue( ::rtl::OUString::createFromAscii( "Type" ) ) >>= m_nBoundColumnType ); + OSL_VERIFY( xBoundField->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Type") ) ) >>= m_nBoundColumnType ); } catch( const Exception& ) { @@ -899,7 +900,7 @@ namespace frm } break; default: - OSL_ENSURE( false, "OListBoxModel::loadData: unreachable!" ); + OSL_FAIL( "OListBoxModel::loadData: unreachable!" ); break; } } @@ -1001,7 +1002,7 @@ namespace frm size_t selectedValue = aSelectedIndices[0]; if ( selectedValue >= aValues.size() ) { - OSL_ENSURE( false, "OListBoxModel::getFirstSelectedValue: inconsistent selection/valuelist!" ); + OSL_FAIL( "OListBoxModel::getFirstSelectedValue: inconsistent selection/valuelist!" ); return s_aEmptyVaue; } @@ -1040,7 +1041,7 @@ namespace frm Reference< XPropertySet > xBoundField( getField() ); if ( !xBoundField.is() ) { - OSL_ENSURE( false, "OListBoxModel::translateDbColumnToControlValue: no field? How could that happen?!" ); + OSL_FAIL( "OListBoxModel::translateDbColumnToControlValue: no field? How could that happen?!" ); return Any(); } @@ -1148,7 +1149,7 @@ namespace frm default: break; } - OSL_ENSURE( false, "lcl_getCurrentExchangeType: unsupported (unexpected) exchange type!" ); + OSL_FAIL( "lcl_getCurrentExchangeType: unsupported (unexpected) exchange type!" ); return eEntry; } } @@ -1565,6 +1566,8 @@ namespace frm void SAL_CALL OListBoxControl::itemStateChanged(const ItemEvent& _rEvent) throw(RuntimeException) { // forward this to our listeners + Reference< XChild > xChild( getModel(), UNO_QUERY ); + if ( xChild.is() && xChild->getParent().is() ) { ::osl::MutexGuard aGuard( m_aMutex ); if ( m_aItemListeners.getLength() ) @@ -1577,6 +1580,8 @@ namespace frm m_pItemBroadcaster->addEvent( new ItemEventDescription( _rEvent ), this ); } } + else + m_aItemListeners.notifyEach( &XItemListener::itemStateChanged, _rEvent ); // and do the handling for the ChangeListeners ::osl::ClearableMutexGuard aGuard(m_aMutex); @@ -1854,3 +1859,4 @@ namespace frm } //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/ListBox.hxx b/forms/source/component/ListBox.hxx index 46ab6b872fb8..cd1302c35fcc 100644 --- a/forms/source/component/ListBox.hxx +++ b/forms/source/component/ListBox.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -284,3 +285,4 @@ private: #endif // _FORMS_LISTBOX_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Numeric.cxx b/forms/source/component/Numeric.cxx index 0d60fd2f62fb..b722c8058f4d 100644 --- a/forms/source/component/Numeric.cxx +++ b/forms/source/component/Numeric.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -220,3 +221,4 @@ void ONumericModel::resetNoBroadcast() } // namespace frm //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Numeric.hxx b/forms/source/component/Numeric.hxx index 1159ad98c3f0..7cef3c7ef5bb 100644 --- a/forms/source/component/Numeric.hxx +++ b/forms/source/component/Numeric.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -97,3 +98,4 @@ public: #endif // _FORMS_NUMERIC_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Pattern.cxx b/forms/source/component/Pattern.cxx index e7b6c695d0cf..1600af87649d 100644 --- a/forms/source/component/Pattern.cxx +++ b/forms/source/component/Pattern.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -260,3 +261,4 @@ void OPatternModel::resetNoBroadcast() } // namespace frm //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Pattern.hxx b/forms/source/component/Pattern.hxx index 9a96a39820ff..9460bb42fa4e 100644 --- a/forms/source/component/Pattern.hxx +++ b/forms/source/component/Pattern.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -106,3 +107,4 @@ public: #endif // _FORMS_PATTERN_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/RadioButton.cxx b/forms/source/component/RadioButton.cxx index 48a2499381a9..5227e5396db8 100644 --- a/forms/source/component/RadioButton.cxx +++ b/forms/source/component/RadioButton.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,10 +29,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_forms.hxx" #include "RadioButton.hxx" +#include "GroupManager.hxx" #include "property.hxx" -#ifndef _FRM_PROPERTY_HRC_ #include "property.hrc" -#endif #include "services.hxx" #include <tools/debug.hxx> #include <comphelper/extract.hxx> @@ -89,7 +89,7 @@ void SAL_CALL ORadioButtonControl::createPeer(const Reference<starawt::XToolkit> // (formerly this switch-off was done in the toolkit - but the correct place is here ...) // Reference< XVclWindowPeer > xVclWindowPeer( getPeer(), UNO_QUERY ); // if (xVclWindowPeer.is()) -// xVclWindowPeer->setProperty(::rtl::OUString::createFromAscii("AutoToggle"), ::cppu::bool2any(sal_False)); +// xVclWindowPeer->setProperty(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutoToggle")), ::cppu::bool2any(sal_False)); // new order: do _not_ switch off the auto toggle because: // * today, it is not necessary anymore to handle the toggling ourself (everything works fine without it) // * without auto toggle, the AccessibleEvents as fired by the radio buttons are @@ -119,6 +119,7 @@ ORadioButtonModel::ORadioButtonModel(const Reference<XMultiServiceFactory>& _rxF m_nClassId = FormComponentType::RADIOBUTTON; m_aLabelServiceName = FRM_SUN_COMPONENT_GROUPBOX; initValueProperty( PROPERTY_STATE, PROPERTY_ID_STATE ); + startAggregatePropertyListening( PROPERTY_GROUP_NAME ); } //------------------------------------------------------------------ @@ -165,8 +166,12 @@ StringSequence SAL_CALL ORadioButtonModel::getSupportedServiceNames() throw(Runt //------------------------------------------------------------------------------ void ORadioButtonModel::SetSiblingPropsTo(const ::rtl::OUString& rPropName, const Any& rValue) { - // mein Name - ::rtl::OUString sMyName(m_aName); + // my name + ::rtl::OUString sMyGroup; + if (hasProperty(PROPERTY_GROUP_NAME, this)) + this->getPropertyValue(PROPERTY_GROUP_NAME) >>= sMyGroup; + if (sMyGroup.getLength() == 0) + sMyGroup = m_aName; // meine Siblings durchiterieren Reference<XIndexAccess> xIndexAccess(getParent(), UNO_QUERY); @@ -174,8 +179,9 @@ void ORadioButtonModel::SetSiblingPropsTo(const ::rtl::OUString& rPropName, cons { Reference<XPropertySet> xMyProps; query_interface(static_cast<XWeak*>(this), xMyProps); - ::rtl::OUString sCurrentName; - for (sal_Int32 i=0; i<xIndexAccess->getCount(); ++i) + ::rtl::OUString sCurrentGroup; + sal_Int32 nNumSiblings = xIndexAccess->getCount(); + for (sal_Int32 i=0; i<nNumSiblings; ++i) { Reference<XPropertySet> xSiblingProperties(*(InterfaceRef*)xIndexAccess->getByIndex(i).getValue(), UNO_QUERY); if (!xSiblingProperties.is()) @@ -192,8 +198,8 @@ void ORadioButtonModel::SetSiblingPropsTo(const ::rtl::OUString& rPropName, cons continue; // das 'zur selben Gruppe gehoeren' wird am Namen festgemacht - xSiblingProperties->getPropertyValue(PROPERTY_NAME) >>= sCurrentName; - if (sCurrentName == sMyName) + sCurrentGroup = OGroupManager::GetGroupName( xSiblingProperties ); + if (sCurrentGroup == sMyGroup) xSiblingProperties->setPropertyValue(rPropName, rValue); } } @@ -220,40 +226,7 @@ void ORadioButtonModel::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, cons // die andere Richtung : wenn sich mein Name aendert ... if (nHandle == PROPERTY_ID_NAME) { - // ... muss ich testen, ob ich Siblings mit dem selben Namen habe, damit ich deren ControlSource uebernehmen kann - Reference<XIndexAccess> xIndexAccess(getParent(), UNO_QUERY); - if (xIndexAccess.is()) - { - ::rtl::OUString sName; - ::rtl::OUString sControlSource; - - Reference<XPropertySet> xMyProps; - query_interface(static_cast<XWeak*>(this), xMyProps); - for (sal_Int32 i=0; i<xIndexAccess->getCount(); ++i) - { - Reference<XPropertySet> xSiblingProperties(*(InterfaceRef*)xIndexAccess->getByIndex(i).getValue(), UNO_QUERY); - if (!xSiblingProperties.is()) - continue; - - if (xMyProps == xSiblingProperties) - // nur wenn ich nicht mich selber gefunden habe - continue; - - sal_Int16 nType = 0; - xSiblingProperties->getPropertyValue(PROPERTY_CLASSID) >>= nType; - if (nType != FormComponentType::RADIOBUTTON) - // nur Radio-Buttons - continue; - - xSiblingProperties->getPropertyValue(PROPERTY_NAME) >>= sName; - // Control, das zur gleichen Gruppe gehoert ? - if (rValue == sName) - { - setPropertyValue(PROPERTY_CONTROLSOURCE, xSiblingProperties->getPropertyValue(PROPERTY_CONTROLSOURCE)); - break; - } - } - } + setControlSource(); } if (nHandle == PROPERTY_ID_DEFAULT_STATE) @@ -271,6 +244,52 @@ void ORadioButtonModel::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, cons } } +void ORadioButtonModel::setControlSource() +{ + Reference<XIndexAccess> xIndexAccess(getParent(), UNO_QUERY); + if (xIndexAccess.is()) + { + ::rtl::OUString sName, sGroupName; + + if (hasProperty(PROPERTY_GROUP_NAME, this)) + this->getPropertyValue(PROPERTY_GROUP_NAME) >>= sGroupName; + this->getPropertyValue(PROPERTY_NAME) >>= sName; + + Reference<XPropertySet> xMyProps; + query_interface(static_cast<XWeak*>(this), xMyProps); + for (sal_Int32 i=0; i<xIndexAccess->getCount(); ++i) + { + Reference<XPropertySet> xSiblingProperties(*(InterfaceRef*)xIndexAccess->getByIndex(i).getValue(), UNO_QUERY); + if (!xSiblingProperties.is()) + continue; + + if (xMyProps == xSiblingProperties) + // nur wenn ich nicht mich selber gefunden habe + continue; + + sal_Int16 nType = 0; + xSiblingProperties->getPropertyValue(PROPERTY_CLASSID) >>= nType; + if (nType != FormComponentType::RADIOBUTTON) + // nur Radio-Buttons + continue; + + ::rtl::OUString sSiblingName, sSiblingGroupName; + if (hasProperty(PROPERTY_GROUP_NAME, xSiblingProperties)) + xSiblingProperties->getPropertyValue(PROPERTY_GROUP_NAME) >>= sSiblingGroupName; + xSiblingProperties->getPropertyValue(PROPERTY_NAME) >>= sSiblingName; + + if ((sGroupName.getLength() == 0 && sSiblingGroupName.getLength() == 0 && // (no group name + sName == sSiblingName) || // names match) or + (sGroupName.getLength() != 0 && sSiblingGroupName.getLength() != 0 && // (have group name + sGroupName == sSiblingGroupName)) // they match) + { + setPropertyValue(PROPERTY_CONTROLSOURCE, xSiblingProperties->getPropertyValue(PROPERTY_CONTROLSOURCE)); + break; + } + } + } +} + //------------------------------------------------------------------------------ void ORadioButtonModel::describeFixedProperties( Sequence< Property >& _rProps ) const { @@ -332,7 +351,7 @@ void SAL_CALL ORadioButtonModel::read(const Reference<XObjectInputStream>& _rxIn readCommonProperties(_rxInStream); break; default : - DBG_ERROR("ORadioButtonModel::read : unknown version !"); + OSL_FAIL("ORadioButtonModel::read : unknown version !"); defaultCommonProperties(); break; } @@ -360,6 +379,13 @@ void ORadioButtonModel::_propertyChanged(const PropertyChangeEvent& _rEvent) thr SetSiblingPropsTo( PROPERTY_STATE, aZero ); } } + else if ( _rEvent.PropertyName.equals( PROPERTY_GROUP_NAME ) ) + { + setControlSource(); + // Can't call OReferenceValueComponent::_propertyChanged(), as it + // doesn't know what to do with the GroupName property. + return; + } OReferenceValueComponent::_propertyChanged( _rEvent ); } @@ -399,7 +425,7 @@ sal_Bool ORadioButtonModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) } catch(Exception&) { - DBG_ERROR("ORadioButtonModel::commitControlValueToDbColumn: could not commit !"); + OSL_FAIL("ORadioButtonModel::commitControlValueToDbColumn: could not commit !"); } } return sal_True; @@ -409,3 +435,4 @@ sal_Bool ORadioButtonModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) } //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/RadioButton.hxx b/forms/source/component/RadioButton.hxx index 3f122fe7b27c..0ffd8a2ba9b5 100644 --- a/forms/source/component/RadioButton.hxx +++ b/forms/source/component/RadioButton.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -84,6 +85,8 @@ private: our mutex is aquired exactly once */ void setNewAggregateState( const ::com::sun::star::uno::Any& _rValue ); + + void setControlSource(); }; //================================================================== @@ -109,3 +112,4 @@ protected: #endif // _FORMS_RADIOBUTTON_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Time.cxx b/forms/source/component/Time.cxx index 49b07adf84e4..0f0bb6336b33 100644 --- a/forms/source/component/Time.cxx +++ b/forms/source/component/Time.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -363,3 +364,4 @@ Sequence< Type > OTimeModel::getSupportedBindingTypes() } // namespace frm //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Time.hxx b/forms/source/component/Time.hxx index a9ac1b4adfd0..60aadc6e5e26 100644 --- a/forms/source/component/Time.hxx +++ b/forms/source/component/Time.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -131,3 +132,4 @@ public: #endif // _FORMS_TIME_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/cachedrowset.cxx b/forms/source/component/cachedrowset.cxx index 2c9cd82e9fee..ac277e8310ec 100644 --- a/forms/source/component/cachedrowset.cxx +++ b/forms/source/component/cachedrowset.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -200,3 +201,5 @@ namespace frm //........................................................................ } // namespace frm //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/cachedrowset.hxx b/forms/source/component/cachedrowset.hxx index d2310bf8fc8c..6c0ebc645367 100644 --- a/forms/source/component/cachedrowset.hxx +++ b/forms/source/component/cachedrowset.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -95,3 +96,5 @@ namespace frm //........................................................................ #endif // CACHEDROWSET_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx index 8deb10c2f170..bcccac7f7822 100644 --- a/forms/source/component/clickableimage.cxx +++ b/forms/source/component/clickableimage.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -46,7 +47,7 @@ #include <vcl/svapp.hxx> #include <sfx2/docfile.hxx> #include <sfx2/objsh.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include "services.hxx" #include <comphelper/container.hxx> #include <comphelper/listenernotification.hxx> @@ -212,7 +213,7 @@ namespace frm Reference< XInterface > xModelsParent; FormButtonType eButtonType = FormButtonType_PUSH; { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; // Parent holen Reference<XFormComponent> xComp(getModel(), UNO_QUERY); @@ -260,7 +261,7 @@ namespace frm case FormButtonType_URL: { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Reference< XModel > xModel = getXModel(xModelsParent); if (!xModel.is()) @@ -295,7 +296,6 @@ namespace frm // * at the UI, show only the mark // * !!!! recognize every SAVEAS on the document, so the absolute URL can be adjusted. This seems // rather impossible !!! - // 89752 - 23.07.2001 - frank.schoenheit@sun.com aURL.Mark = aURL.Complete; aURL.Complete = xModel->getURL(); aURL.Complete += aURL.Mark; @@ -316,7 +316,7 @@ namespace frm Sequence<PropertyValue> aArgs(1); PropertyValue& rProp = aArgs.getArray()[0]; - rProp.Name = ::rtl::OUString::createFromAscii("Referer"); + rProp.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Referer") ); rProp.Value <<= xModel->getURL(); if (xDisp.is()) @@ -439,7 +439,7 @@ namespace frm } catch( const Exception& e ) { - OSL_ENSURE( sal_False, "OClickableImageBaseControl::implSubmit: caught an unknown exception!" ); + OSL_FAIL( "OClickableImageBaseControl::implSubmit: caught an unknown exception!" ); throw WrappedTargetException( ::rtl::OUString(), *this, makeAny( e ) ); } } @@ -500,7 +500,6 @@ namespace frm osl_incrementInterlockedCount( &m_refCount ); { // simulate a propertyChanged event for the ImageURL - // 2003-05-15 - #109591# - fs@openoffice.org Any aImageURL; getFastPropertyValue( aImageURL, PROPERTY_ID_IMAGE_URL ); _propertyChanged( PropertyChangeEvent( *this, PROPERTY_IMAGE_URL, sal_False, PROPERTY_ID_IMAGE_URL, Any( ), aImageURL ) ); @@ -698,7 +697,6 @@ namespace frm pImgProd->SetImage( sURL ); else // caution: the medium may be NULL if somebody gave us a invalid URL to work with - // 11/24/2000 - 79667 - FS pImgProd->SetImage(String()); m_bDownloading = sal_False; return; @@ -732,7 +730,6 @@ namespace frm } // the SfxMedium is not allowed to be created with an invalid URL, so we have to check this first - // 23.01.2001 - 81927 - FS INetURLObject aUrl(rURL); if (INET_PROT_NOT_VALID == aUrl.GetProtocol()) // we treat an invalid URL like we would treat no URL @@ -927,3 +924,4 @@ namespace frm } // namespace frm //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/clickableimage.hxx b/forms/source/component/clickableimage.hxx index f888aa4e3309..816a2aeb827d 100644 --- a/forms/source/component/clickableimage.hxx +++ b/forms/source/component/clickableimage.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -293,3 +294,4 @@ namespace frm #endif // FORMS_SOURCE_CLICKABLEIMAGE_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/cloneable.cxx b/forms/source/component/cloneable.cxx index 5392dbee3e7f..368c3b701d02 100644 --- a/forms/source/component/cloneable.cxx +++ b/forms/source/component/cloneable.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -66,3 +67,4 @@ namespace frm } // namespace frm //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/entrylisthelper.cxx b/forms/source/component/entrylisthelper.cxx index 065bd4ca6896..c894f3fce150 100644 --- a/forms/source/component/entrylisthelper.cxx +++ b/forms/source/component/entrylisthelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -319,3 +320,5 @@ namespace frm //......................................................................... } // namespace frm //......................................................................... + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/entrylisthelper.hxx b/forms/source/component/entrylisthelper.hxx index 64778e9abdc3..64f99feb740f 100644 --- a/forms/source/component/entrylisthelper.hxx +++ b/forms/source/component/entrylisthelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -196,3 +197,5 @@ namespace frm #endif // FORMS_ENTRYLISTHELPER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/errorbroadcaster.cxx b/forms/source/component/errorbroadcaster.cxx index e388a35480a1..40d1afd06c22 100644 --- a/forms/source/component/errorbroadcaster.cxx +++ b/forms/source/component/errorbroadcaster.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -111,3 +112,4 @@ namespace frm } // namespace frm //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/errorbroadcaster.hxx b/forms/source/component/errorbroadcaster.hxx index c91cc220c58d..86e96c1fce7e 100644 --- a/forms/source/component/errorbroadcaster.hxx +++ b/forms/source/component/errorbroadcaster.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -72,3 +73,4 @@ namespace frm #endif // FORMS_ERRORBROADCASTER_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/findpos.cxx b/forms/source/component/findpos.cxx index 87ea53b27e29..86c07c080113 100644 --- a/forms/source/component/findpos.cxx +++ b/forms/source/component/findpos.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -55,3 +56,5 @@ sal_Int32 findPos( } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/findpos.hxx b/forms/source/component/findpos.hxx index 67fb2a8996a3..28d33311ae9b 100644 --- a/forms/source/component/findpos.hxx +++ b/forms/source/component/findpos.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,3 +44,5 @@ sal_Int32 findPos( } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/formcontrolfont.cxx b/forms/source/component/formcontrolfont.cxx index 1029a7678536..f936dc65b86c 100644 --- a/forms/source/component/formcontrolfont.cxx +++ b/forms/source/component/formcontrolfont.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,9 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_forms.hxx" #include "formcontrolfont.hxx" -#ifndef _FRM_PROPERTY_HRC_ #include "property.hrc" -#endif #include "property.hxx" #include <tools/debug.hxx> #include <comphelper/property.hxx> @@ -124,7 +123,7 @@ namespace frm break; default: - OSL_ENSURE( sal_False, "lcl_extractFontDescriptorAggregate: invalid handle!" ); + OSL_FAIL( "lcl_extractFontDescriptorAggregate: invalid handle!" ); break; } return aValue; @@ -358,7 +357,7 @@ namespace frm break; default: - DBG_ERROR( "FontControlModel::convertFastPropertyValue: no font aggregate!" ); + OSL_FAIL( "FontControlModel::convertFastPropertyValue: no font aggregate!" ); } return bModified; } @@ -461,7 +460,7 @@ namespace frm break; default: - DBG_ERROR( "FontControlModel::setFastPropertyValue_NoBroadcast: invalid property!" ); + OSL_FAIL( "FontControlModel::setFastPropertyValue_NoBroadcast: invalid property!" ); } } @@ -540,7 +539,7 @@ namespace frm break; default: - DBG_ERROR( "FontControlModel::getPropertyDefaultByHandle: invalid property!" ); + OSL_FAIL( "FontControlModel::getPropertyDefaultByHandle: invalid property!" ); } return aReturn; @@ -549,3 +548,5 @@ namespace frm //......................................................................... } // namespace frm //......................................................................... + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/imgprod.cxx b/forms/source/component/imgprod.cxx index 07abd703281d..702f7fca461b 100644 --- a/forms/source/component/imgprod.cxx +++ b/forms/source/component/imgprod.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -37,9 +38,7 @@ #include <svtools/filter.hxx> #include <com/sun/star/io/XInputStream.hpp> -#ifndef SVTOOLS_SOURCE_MISC_IMAGERESOURCEACCESS_HXX #include "svtools/imageresourceaccess.hxx" -#endif #include <comphelper/processfactory.hxx> // -------------------- @@ -165,7 +164,7 @@ ErrCode ImgProdLockBytes::SetSize( sal_Size nSize ) return SvLockBytes::SetSize( nSize ); else { - DBG_ERROR( "ImgProdLockBytes::SetSize not supported for xInputStream..." ); + OSL_FAIL( "ImgProdLockBytes::SetSize not supported for xInputStream..." ); return ERRCODE_IO_CANTWRITE; } } @@ -205,9 +204,6 @@ ImageProducer::~ImageProducer() delete mpStm; mpStm = NULL; - - for( void* pCons = maConsList.First(); pCons; pCons = maConsList.Next() ) - delete (::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons; } // ------------------------------------------------------------ @@ -227,24 +223,17 @@ void ImageProducer::addConsumer( const ::com::sun::star::uno::Reference< ::com:: { DBG_ASSERT( rxConsumer.is(), "::AddConsumer(...): No consumer referenced!" ); if( rxConsumer.is() ) - maConsList.Insert( new ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > ( rxConsumer ), LIST_APPEND ); + maConsList.push_back( new ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > ( rxConsumer )); } // ------------------------------------------------------------ void ImageProducer::removeConsumer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer >& rxConsumer ) throw(::com::sun::star::uno::RuntimeException) { - for( sal_uInt32 n = maConsList.Count(); n; ) - { - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > * pRef = (::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) maConsList.GetObject( --n ); + ConsumerList_t::reverse_iterator riter = std::find(maConsList.rbegin(),maConsList.rend(),rxConsumer); - if( *pRef == rxConsumer ) - { - delete pRef; - maConsList.Remove( n ); - break; - } - } + if (riter != maConsList.rend()) + maConsList.erase(riter.base()-1); } // ------------------------------------------------------------ @@ -308,7 +297,7 @@ void ImageProducer::NewDataAvailable() void ImageProducer::startProduction() throw(::com::sun::star::uno::RuntimeException) { - if( maConsList.Count() || maDoneHdl.IsSet() ) + if( !maConsList.empty() || maDoneHdl.IsSet() ) { bool bNotifyEmptyGraphics = false; @@ -334,24 +323,16 @@ void ImageProducer::startProduction() throw(::com::sun::star::uno::RuntimeExcept if ( bNotifyEmptyGraphics ) { // reset image - List aTmp; - void* pCons; - // create temporary list to hold interfaces - for( pCons = maConsList.First(); pCons; pCons = maConsList.Next() ) - aTmp.Insert( new ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > ( *(::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons ), LIST_APPEND ); + ConsumerList_t aTmp = maConsList; // iterate through interfaces - for( pCons = aTmp.First(); pCons; pCons = aTmp.Next() ) + for( ConsumerList_t::iterator iter = aTmp.begin(); iter != aTmp.end(); ++iter ) { - ( *(::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons )->init( 0, 0 ); - ( *(::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons )->complete( ::com::sun::star::awt::ImageStatus::IMAGESTATUS_STATICIMAGEDONE, this ); + (*iter)->init( 0, 0 ); + (*iter)->complete( ::com::sun::star::awt::ImageStatus::IMAGESTATUS_STATICIMAGEDONE, this ); } - // delete interfaces in temporary list - for( pCons = aTmp.First(); pCons; pCons = aTmp.Next() ) - delete (::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons; - if ( maDoneHdl.IsSet() ) maDoneHdl.Call( NULL ); } @@ -381,25 +362,17 @@ void ImageProducer::ImplUpdateData( const Graphic& rGraphic ) { ImplInitConsumer( rGraphic ); - if( mbConsInit && maConsList.Count() ) + if( mbConsInit && !maConsList.empty() ) { - List aTmp; - void* pCons; + // create temporary list to hold interfaces + ConsumerList_t aTmp = maConsList; ImplUpdateConsumer( rGraphic ); mbConsInit = sal_False; - // create temporary list to hold interfaces - for( pCons = maConsList.First(); pCons; pCons = maConsList.Next() ) - aTmp.Insert( new ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > ( *(::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons ), LIST_APPEND ); - // iterate through interfaces - for( pCons = aTmp.First(); pCons; pCons = aTmp.Next() ) - ( *(::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons )->complete( ::com::sun::star::awt::ImageStatus::IMAGESTATUS_STATICIMAGEDONE, this ); - - // delete interfaces in temporary list - for( pCons = aTmp.First(); pCons; pCons = aTmp.Next() ) - delete (::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons; + for( ConsumerList_t::iterator iter = aTmp.begin(); iter != aTmp.end(); ++iter ) + (*iter)->complete( ::com::sun::star::awt::ImageStatus::IMAGESTATUS_STATICIMAGEDONE, this ); } } @@ -412,8 +385,6 @@ void ImageProducer::ImplInitConsumer( const Graphic& rGraphic ) if( pBmpAcc ) { - List aTmp; - void * pCons; sal_uInt16 nPalCount = 0; sal_uInt32 nRMask = 0; sal_uInt32 nGMask = 0; @@ -462,21 +433,15 @@ void ImageProducer::ImplInitConsumer( const Graphic& rGraphic ) } // create temporary list to hold interfaces - for( pCons = maConsList.First(); pCons; pCons = maConsList.Next() ) - aTmp.Insert( new ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > ( *(::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons ), LIST_APPEND ); + ConsumerList_t aTmp = maConsList; // iterate through interfaces - for( pCons = aTmp.First(); pCons; pCons = aTmp.Next() ) + for( ConsumerList_t::iterator iter = aTmp.begin(); iter != aTmp.end(); ++iter) { - ( *(::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons )->init( pBmpAcc->Width(), pBmpAcc->Height() ); - ( *(::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons )->setColorModel( pBmpAcc->GetBitCount(), - aRGBPal, nRMask, nGMask, nBMask, nAMask ); + (*iter)->init( pBmpAcc->Width(), pBmpAcc->Height() ); + (*iter)->setColorModel( pBmpAcc->GetBitCount(),aRGBPal, nRMask, nGMask, nBMask, nAMask ); } - // delete interfaces in temporary list - for( pCons = aTmp.First(); pCons; pCons = aTmp.Next() ) - delete (::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons; - aBmp.ReleaseAccess( pBmpAcc ); mbConsInit = sal_True; } @@ -492,8 +457,6 @@ void ImageProducer::ImplUpdateConsumer( const Graphic& rGraphic ) if( pBmpAcc ) { - List aTmp; - void* pCons; Bitmap aMask( aBmpEx.GetMask() ); BitmapReadAccess* pMskAcc = !!aMask ? aMask.AcquireReadAccess() : NULL; const long nWidth = pBmpAcc->Width(); @@ -513,8 +476,7 @@ void ImageProducer::ImplUpdateConsumer( const Graphic& rGraphic ) } // create temporary list to hold interfaces - for( pCons = maConsList.First(); pCons; pCons = maConsList.Next() ) - aTmp.Insert( new ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > ( *(::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons ), LIST_APPEND ); + ConsumerList_t aTmp = maConsList; if( pBmpAcc->HasPalette() ) { @@ -538,9 +500,8 @@ void ImageProducer::ImplUpdateConsumer( const Graphic& rGraphic ) } // iterate through interfaces - for( pCons = aTmp.First(); pCons; pCons = aTmp.Next() ) - ( *(::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons )->setPixelsByBytes( nStartX, nStartY, nPartWidth, nPartHeight, - aData, 0UL, nPartWidth ); + for (ConsumerList_t::iterator iter = aTmp.begin(); iter != aTmp.end(); ++iter) + (*iter)->setPixelsByBytes( nStartX, nStartY, nPartWidth, nPartHeight, aData, 0UL, nPartWidth ); } else { @@ -559,9 +520,8 @@ void ImageProducer::ImplUpdateConsumer( const Graphic& rGraphic ) } // iterate through interfaces - for( pCons = aTmp.First(); pCons; pCons = aTmp.Next() ) - ( *(::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons )->setPixelsByLongs( nStartX, nStartY, nPartWidth, nPartHeight, - aData, 0UL, nPartWidth ); + for (ConsumerList_t::iterator iter = aTmp.begin(); iter != aTmp.end(); ++iter) + (*iter)->setPixelsByLongs( nStartX, nStartY, nPartWidth, nPartHeight, aData, 0UL, nPartWidth ); } } else @@ -586,15 +546,10 @@ void ImageProducer::ImplUpdateConsumer( const Graphic& rGraphic ) } // iterate through interfaces - for( pCons = aTmp.First(); pCons; pCons = aTmp.Next() ) - ( *(::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons )->setPixelsByLongs( nStartX, nStartY, nPartWidth, nPartHeight, - aData, 0UL, nPartWidth ); + for (ConsumerList_t::iterator iter = aTmp.begin(); iter != aTmp.end(); ++iter) + (*iter)->setPixelsByLongs( nStartX, nStartY, nPartWidth, nPartHeight, aData, 0UL, nPartWidth ); } - // delete interfaces in temporary list - for( pCons = aTmp.First(); pCons; pCons = aTmp.Next() ) - delete (::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons; - aBmp.ReleaseAccess( pBmpAcc ); aMask.ReleaseAccess( pMskAcc ); } @@ -623,3 +578,5 @@ SAL_CALL ImageProducer_CreateInstance( ( ::cppu::OWeakObject* ) new ImageProducer ); } } // namespace frm + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/imgprod.hxx b/forms/source/component/imgprod.hxx index 170fc186fa73..53d673cbe065 100644 --- a/forms/source/component/imgprod.hxx +++ b/forms/source/component/imgprod.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,9 +29,10 @@ #ifndef _PRODUCE_HXX #define _PRODUCE_HXX +#include <boost/ptr_container/ptr_vector.hpp> + #include <tools/link.hxx> #include <tools/string.hxx> -#include <tools/list.hxx> #include <com/sun/star/awt/ImageStatus.hpp> #include <com/sun/star/awt/XImageConsumer.hpp> #include <com/sun/star/awt/XImageProducer.hpp> @@ -60,8 +62,10 @@ class ImageProducer : public ::com::sun::star::awt::XImageProducer, { private: + typedef boost::ptr_vector< ::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > > ConsumerList_t; + ::rtl::OUString maURL; - List maConsList; + ConsumerList_t maConsList; Graphic* mpGraphic; SvStream* mpStm; sal_uInt32 mnTransIndex; @@ -105,3 +109,5 @@ public: }; #endif // _PRODUCE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/navigationbar.cxx b/forms/source/component/navigationbar.cxx index 617c830f104d..7799779d4b3f 100644 --- a/forms/source/component/navigationbar.cxx +++ b/forms/source/component/navigationbar.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -507,3 +508,5 @@ namespace frm //......................................................................... } // namespace frm //......................................................................... + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/navigationbar.hxx b/forms/source/component/navigationbar.hxx index d57c6d1542ac..e410a13c64f6 100644 --- a/forms/source/component/navigationbar.hxx +++ b/forms/source/component/navigationbar.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -136,3 +137,4 @@ namespace frm #endif // FORMS_COMPONENT_NAVIGATION_BAR_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/propertybaghelper.cxx b/forms/source/component/propertybaghelper.cxx index 0b049043cb28..ef09d4841148 100644 --- a/forms/source/component/propertybaghelper.cxx +++ b/forms/source/component/propertybaghelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -93,7 +94,6 @@ namespace frm ,m_pPropertyArrayHelper( NULL ) ,m_bDisposed( false ) { - // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "PropertyBagHelper::PropertyBagHelper" ); } //-------------------------------------------------------------------- @@ -105,14 +105,12 @@ namespace frm //-------------------------------------------------------------------- void PropertyBagHelper::dispose() { - // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "PropertyBagHelper::dispose" ); m_bDisposed = true; } //-------------------------------------------------------------------- void PropertyBagHelper::impl_nts_checkDisposed_throw() const { - // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "PropertyBagHelper::impl_nts_checkDisposed_throw" ); if ( m_bDisposed ) throw DisposedException(); } @@ -120,14 +118,12 @@ namespace frm //-------------------------------------------------------------------- void PropertyBagHelper::impl_nts_invalidatePropertySetInfo() { - // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "PropertyBagHelper::impl_nts_invalidatePropertySetInfo" ); delete m_pPropertyArrayHelper, m_pPropertyArrayHelper = NULL; } //-------------------------------------------------------------------- sal_Int32 PropertyBagHelper::impl_findFreeHandle( const ::rtl::OUString& _rPropertyName ) { - // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "PropertyBagHelper::impl_findFreeHandle" ); ::comphelper::OPropertyArrayAggregationHelper& rPropInfo( impl_ts_getArrayHelper() ); // check the preferred handle @@ -167,8 +163,6 @@ namespace frm //-------------------------------------------------------------------- ::comphelper::OPropertyArrayAggregationHelper& PropertyBagHelper::impl_ts_getArrayHelper() const { - // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "PropertyBagHelper::impl_ts_getArrayHelper" ); - //::osl::MutexGuard aGuard( m_rContext.getMutex() ); OPropertyArrayAggregationHelper* p = m_pPropertyArrayHelper; if ( !p ) { @@ -203,7 +197,6 @@ namespace frm //-------------------------------------------------------------------- void PropertyBagHelper::addProperty( const ::rtl::OUString& _rName, ::sal_Int16 _nAttributes, const Any& _rInitialValue ) { - // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "PropertyBagHelper::addProperty" ); ::osl::MutexGuard aGuard( m_rContext.getMutex() ); impl_nts_checkDisposed_throw(); @@ -231,7 +224,6 @@ namespace frm //-------------------------------------------------------------------- void PropertyBagHelper::removeProperty( const ::rtl::OUString& _rName ) { - // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "PropertyBagHelper::removeProperty" ); ::osl::MutexGuard aGuard( m_rContext.getMutex() ); impl_nts_checkDisposed_throw(); @@ -280,7 +272,6 @@ namespace frm //-------------------------------------------------------------------- Sequence< PropertyValue > PropertyBagHelper::getPropertyValues() { - // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "PropertyBagHelper::getPropertyValues" ); ::osl::MutexGuard aGuard( m_rContext.getMutex() ); impl_nts_checkDisposed_throw(); @@ -323,7 +314,6 @@ namespace frm //-------------------------------------------------------------------- void PropertyBagHelper::setPropertyValues( const Sequence< PropertyValue >& _rProps ) { - // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "PropertyBagHelper::setPropertyValues" ); ::osl::ClearableMutexGuard aGuard( m_rContext.getMutex() ); impl_nts_checkDisposed_throw(); @@ -367,3 +357,4 @@ namespace frm } // namespace frm //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/refvaluecomponent.cxx b/forms/source/component/refvaluecomponent.cxx index 3061a275378b..b586e393ea33 100644 --- a/forms/source/component/refvaluecomponent.cxx +++ b/forms/source/component/refvaluecomponent.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -217,7 +218,7 @@ namespace frm } else { - OSL_ENSURE( false, "OReferenceValueComponent::translateExternalValueToControlValue: unexpected value type!" ); + OSL_FAIL( "OReferenceValueComponent::translateExternalValueToControlValue: unexpected value type!" ); } return makeAny( nState ); @@ -266,7 +267,7 @@ namespace frm } catch( const Exception& ) { - OSL_ENSURE( sal_False, "OReferenceValueComponent::translateControlValueToExternalValue: caught an exception!" ); + OSL_FAIL( "OReferenceValueComponent::translateControlValueToExternalValue: caught an exception!" ); } return aExternalValue; @@ -299,3 +300,4 @@ namespace frm } // namespace frm //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/refvaluecomponent.hxx b/forms/source/component/refvaluecomponent.hxx index dedc86c315be..f88fb5e93f41 100644 --- a/forms/source/component/refvaluecomponent.hxx +++ b/forms/source/component/refvaluecomponent.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -107,3 +108,4 @@ namespace frm #endif // FORMS_SOURCE_COMPONENT_REFVALUECOMPONENT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/scrollbar.cxx b/forms/source/component/scrollbar.cxx index 5bd5744164a6..d8b230a03b3d 100644 --- a/forms/source/component/scrollbar.cxx +++ b/forms/source/component/scrollbar.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -97,7 +98,7 @@ namespace frm aExternalDoubleValue <<= (double)nScrollValue; else { - OSL_ENSURE( sal_False, "translateControlIntToExternalDoubleValue: no integer scroll value!" ); + OSL_FAIL( "translateControlIntToExternalDoubleValue: no integer scroll value!" ); // aExternalDoubleValue is void here, which is okay for this purpose ... } @@ -230,14 +231,14 @@ namespace frm //------------------------------------------------------------------------------ Any OScrollBarModel::translateDbColumnToControlValue( ) { - OSL_ENSURE( sal_False, "OScrollBarModel::commitControlValueToDbColumn: never to be called (we're not bound)!" ); + OSL_FAIL( "OScrollBarModel::commitControlValueToDbColumn: never to be called (we're not bound)!" ); return Any(); } //------------------------------------------------------------------------------ sal_Bool OScrollBarModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) { - OSL_ENSURE( sal_False, "OScrollBarModel::commitControlValueToDbColumn: never to be called (we're not bound)!" ); + OSL_FAIL( "OScrollBarModel::commitControlValueToDbColumn: never to be called (we're not bound)!" ); return sal_True; } @@ -317,3 +318,5 @@ namespace frm //........................................................................ } // namespace frm //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/scrollbar.hxx b/forms/source/component/scrollbar.hxx index 1d528dabe8bc..93a946268a14 100644 --- a/forms/source/component/scrollbar.hxx +++ b/forms/source/component/scrollbar.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -99,3 +100,5 @@ namespace frm //........................................................................ #endif // FORMS_SOURCE_COMPONENT_SCROLLBAR_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/spinbutton.cxx b/forms/source/component/spinbutton.cxx index 332fccd2e744..cef0c2d1e223 100644 --- a/forms/source/component/spinbutton.cxx +++ b/forms/source/component/spinbutton.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -186,14 +187,14 @@ namespace frm //------------------------------------------------------------------------------ Any OSpinButtonModel::translateDbColumnToControlValue( ) { - OSL_ENSURE( sal_False, "OSpinButtonModel::commitControlValueToDbColumn: never to be called (we're not bound)!" ); + OSL_FAIL( "OSpinButtonModel::commitControlValueToDbColumn: never to be called (we're not bound)!" ); return Any(); } //------------------------------------------------------------------------------ sal_Bool OSpinButtonModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) { - OSL_ENSURE( sal_False, "OSpinButtonModel::commitControlValueToDbColumn: never to be called (we're not bound)!" ); + OSL_FAIL( "OSpinButtonModel::commitControlValueToDbColumn: never to be called (we're not bound)!" ); return sal_True; } @@ -273,3 +274,5 @@ namespace frm //........................................................................ } // namespace frm //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/spinbutton.hxx b/forms/source/component/spinbutton.hxx index 4e9437bb8d0e..2b811ab97459 100644 --- a/forms/source/component/spinbutton.hxx +++ b/forms/source/component/spinbutton.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -99,3 +100,5 @@ namespace frm //........................................................................ #endif // FORMS_SOURCE_COMPONENT_SPINBUTTON_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/helper/commanddescriptionprovider.cxx b/forms/source/helper/commanddescriptionprovider.cxx index 4248142d405d..292528db1d53 100644 --- a/forms/source/helper/commanddescriptionprovider.cxx +++ b/forms/source/helper/commanddescriptionprovider.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -138,3 +139,5 @@ namespace frm //........................................................................ } // namespace frm //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/helper/commandimageprovider.cxx b/forms/source/helper/commandimageprovider.cxx index 0b631d8c9d50..6b3599678543 100644 --- a/forms/source/helper/commandimageprovider.cxx +++ b/forms/source/helper/commandimageprovider.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -81,7 +82,7 @@ namespace frm } // ICommandImageProvider - virtual CommandImages getCommandImages( const CommandURLs& _rCommandURLs, const bool _bLarge, const bool _bHiContrast ) const; + virtual CommandImages getCommandImages( const CommandURLs& _rCommandURLs, const bool _bLarge ) const; private: void impl_init_nothrow( const ::comphelper::ComponentContext& _rContext, const Reference< XModel >& _rxDocument ); @@ -129,15 +130,14 @@ namespace frm } //-------------------------------------------------------------------- - CommandImages DocumentCommandImageProvider::getCommandImages( const CommandURLs& _rCommandURLs, const bool _bLarge, const bool _bHiContrast ) const + CommandImages DocumentCommandImageProvider::getCommandImages( const CommandURLs& _rCommandURLs, const bool _bLarge ) const { const size_t nCommandCount = _rCommandURLs.getLength(); CommandImages aImages( nCommandCount ); try { - const sal_Int16 nImageType = - ( _bLarge ? ImageType::SIZE_LARGE : ImageType::SIZE_DEFAULT ) - + ( _bHiContrast ? ImageType::COLOR_HIGHCONTRAST : ImageType::COLOR_NORMAL ); + const sal_Int16 nImageType = ImageType::COLOR_NORMAL + + ( _bLarge ? ImageType::SIZE_LARGE : ImageType::SIZE_DEFAULT ); Sequence< Reference< XGraphic > > aDocImages( nCommandCount ); Sequence< Reference< XGraphic > > aModImages( nCommandCount ); @@ -179,3 +179,5 @@ namespace frm //........................................................................ } // namespace frm //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/helper/controlfeatureinterception.cxx b/forms/source/helper/controlfeatureinterception.cxx index ea34c4fb219b..05bb0347dd72 100644 --- a/forms/source/helper/controlfeatureinterception.cxx +++ b/forms/source/helper/controlfeatureinterception.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -58,7 +59,7 @@ namespace frm { if ( !_rxInterceptor.is() ) { - DBG_ERROR( "ControlFeatureInterception::registerDispatchProviderInterceptor: invalid interceptor!" ); + OSL_FAIL( "ControlFeatureInterception::registerDispatchProviderInterceptor: invalid interceptor!" ); return; } @@ -81,7 +82,7 @@ namespace frm { if ( !_rxInterceptor.is() ) { - DBG_ERROR( "ControlFeatureInterception::releaseDispatchProviderInterceptor: invalid interceptor!" ); + OSL_FAIL( "ControlFeatureInterception::releaseDispatchProviderInterceptor: invalid interceptor!" ); return; } @@ -168,3 +169,4 @@ namespace frm } // namespace frm //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/helper/formnavigation.cxx b/forms/source/helper/formnavigation.cxx index 8a2815938654..3a14f429445c 100644 --- a/forms/source/helper/formnavigation.cxx +++ b/forms/source/helper/formnavigation.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -132,7 +133,7 @@ namespace frm } // unreachable - DBG_ERROR( "OFormNavigationHelper::statusChanged: huh? An invalid/unknown URL?" ); + OSL_FAIL( "OFormNavigationHelper::statusChanged: huh? An invalid/unknown URL?" ); } //------------------------------------------------------------------ @@ -482,3 +483,5 @@ namespace frm //......................................................................... } // namespace frm //......................................................................... + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/helper/resettable.cxx b/forms/source/helper/resettable.cxx index 0210c0ead56c..4748d74f68df 100644 --- a/forms/source/helper/resettable.cxx +++ b/forms/source/helper/resettable.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -100,3 +101,5 @@ namespace frm //........................................................................ } // namespace frm //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/helper/urltransformer.cxx b/forms/source/helper/urltransformer.cxx index a74dbd40d5aa..852fd5483ddd 100644 --- a/forms/source/helper/urltransformer.cxx +++ b/forms/source/helper/urltransformer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -100,3 +101,5 @@ namespace frm //........................................................................ } // namespace frm //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/helper/windowstateguard.cxx b/forms/source/helper/windowstateguard.cxx index 1bbc8e4242f6..7a947ecf30fb 100644 --- a/forms/source/helper/windowstateguard.cxx +++ b/forms/source/helper/windowstateguard.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -230,3 +231,4 @@ namespace frm } // namespace frm //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/inc/FormComponent.hxx b/forms/source/inc/FormComponent.hxx index dead24b09835..40a4a0705ca5 100644 --- a/forms/source/inc/FormComponent.hxx +++ b/forms/source/inc/FormComponent.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -103,7 +104,7 @@ namespace frm // old macro for quickly implementing XServiceInfo::getImplementationName #define IMPLEMENTATION_NAME(ImplName) \ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException) \ - { return ::rtl::OUString::createFromAscii("com.sun.star.comp.forms.") + ::rtl::OUString::createFromAscii(#ImplName); } + { return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.forms.") ) + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(#ImplName)); } class OControlModel; @@ -1318,3 +1319,4 @@ private: #endif // _FORMS_FORMCOMPONENT_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/inc/InterfaceContainer.hxx b/forms/source/inc/InterfaceContainer.hxx index 90e508f43ca8..88c25d99259b 100644 --- a/forms/source/inc/InterfaceContainer.hxx +++ b/forms/source/inc/InterfaceContainer.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,7 +29,7 @@ #ifndef _FRM_INTERFACE_CONTAINER_HXX_ #define _FRM_INTERFACE_CONTAINER_HXX_ -#include <hash_map> +#include <boost/unordered_map.hpp> #include <comphelper/stl_types.hxx> #include <comphelper/types.hxx> #include <comphelper/uno3.hxx> @@ -39,7 +40,6 @@ #include <com/sun/star/lang/EventObject.hpp> #include <com/sun/star/container/XEnumerationAccess.hpp> #include <com/sun/star/io/XPersistObject.hpp> -#include <com/sun/star/form/XFormComponent.hpp> #include <com/sun/star/beans/XPropertyChangeListener.hpp> #include <com/sun/star/beans/PropertyChangeEvent.hpp> #include <com/sun/star/beans/XPropertySet.hpp> @@ -83,7 +83,7 @@ namespace frm }; typedef ::std::vector<InterfaceRef> OInterfaceArray; -typedef ::std::hash_multimap< ::rtl::OUString, InterfaceRef, ::comphelper::UStringHash, ::comphelper::UStringEqual> OInterfaceMap; +typedef ::boost::unordered_multimap< ::rtl::OUString, InterfaceRef, ::comphelper::UStringHash, ::comphelper::UStringEqual> OInterfaceMap; //================================================================== // OInterfaceContainer @@ -326,3 +326,4 @@ public: #endif // _FRM_INTERFACE_CONTAINER_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/inc/cloneable.hxx b/forms/source/inc/cloneable.hxx index da3641d305bc..5500d6dac708 100644 --- a/forms/source/inc/cloneable.hxx +++ b/forms/source/inc/cloneable.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -53,3 +54,4 @@ namespace frm #endif // FORMS_COMPONENT_CLONEABLE_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/inc/commanddescriptionprovider.hxx b/forms/source/inc/commanddescriptionprovider.hxx index f5d4823af477..702040b1b284 100644 --- a/forms/source/inc/commanddescriptionprovider.hxx +++ b/forms/source/inc/commanddescriptionprovider.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -67,3 +68,5 @@ namespace frm //........................................................................ #endif // COMMANDDESCRIPTIONPROVIDER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/inc/commandimageprovider.hxx b/forms/source/inc/commandimageprovider.hxx index d5d5b86a9b41..caf19b4f2c5f 100644 --- a/forms/source/inc/commandimageprovider.hxx +++ b/forms/source/inc/commandimageprovider.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -53,8 +54,7 @@ namespace frm public: virtual CommandImages getCommandImages( const CommandURLs& _rCommandURLs, - const bool _bLarge, - const bool _bHiContrast + const bool _bLarge ) const = 0; virtual ~ICommandImageProvider() { } @@ -76,3 +76,5 @@ namespace frm //........................................................................ #endif // COMMANDIMAGEPROVIDER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/inc/componenttools.hxx b/forms/source/inc/componenttools.hxx index e91573c43d2f..6632e59858dc 100644 --- a/forms/source/inc/componenttools.hxx +++ b/forms/source/inc/componenttools.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -103,3 +104,4 @@ namespace frm #endif // FORMS_SOURCE_INC_COMPONENTTOOLS_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/inc/controlfeatureinterception.hxx b/forms/source/inc/controlfeatureinterception.hxx index 73f3b9d876c8..d3c9aa3c91e3 100644 --- a/forms/source/inc/controlfeatureinterception.hxx +++ b/forms/source/inc/controlfeatureinterception.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -98,3 +99,4 @@ namespace frm #endif // FORMS_SOURCE_INC_CONTROLFEATUREINTERCEPTION_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/inc/featuredispatcher.hxx b/forms/source/inc/featuredispatcher.hxx index eec111c00406..760a8c4b6455 100644 --- a/forms/source/inc/featuredispatcher.hxx +++ b/forms/source/inc/featuredispatcher.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -108,3 +109,5 @@ namespace frm //......................................................................... #endif // FORMS_SOLAR_DISPATCHER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/inc/formcontrolfont.hxx b/forms/source/inc/formcontrolfont.hxx index d14203046b7d..1a6df9d30ce3 100644 --- a/forms/source/inc/formcontrolfont.hxx +++ b/forms/source/inc/formcontrolfont.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -99,3 +100,5 @@ namespace frm //......................................................................... #endif // FORMS_SOURCE_COMPONENT_FORMCONTROLFONT_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/inc/formnavigation.hxx b/forms/source/inc/formnavigation.hxx index 6dc848bd8abe..6e56e4f54519 100644 --- a/forms/source/inc/formnavigation.hxx +++ b/forms/source/inc/formnavigation.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -233,3 +234,5 @@ namespace frm //......................................................................... #endif // FORMS_FORM_NAVIGATION_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/inc/forms_module.hxx b/forms/source/inc/forms_module.hxx index 912323d93194..0f909a343285 100644 --- a/forms/source/inc/forms_module.hxx +++ b/forms/source/inc/forms_module.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -315,3 +316,5 @@ namespace FORMS_MODULE_NAMESPACE //......................................................................... } // namespace FORMS_MODULE_NAMESPACE //......................................................................... + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/inc/forms_module_impl.hxx b/forms/source/inc/forms_module_impl.hxx index d10527075ae3..d2bb8f3a8c62 100644 --- a/forms/source/inc/forms_module_impl.hxx +++ b/forms/source/inc/forms_module_impl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ #ifndef FORMS_MODULE_IMPLEMENTATION_INCLUDE_CONTEXT #error "not to be included directly! use 'foo_module.hxx instead'!" #endif @@ -73,7 +74,7 @@ namespace FORMS_MODULE_NAMESPACE { if (!s_pImplementationNames) { - OSL_ASSERT("OFormsModule::revokeComponent : have no class infos ! Are you sure called this method at the right time ?"); + OSL_FAIL("OFormsModule::revokeComponent : have no class infos ! Are you sure called this method at the right time ?"); return; } OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers, @@ -116,7 +117,7 @@ namespace FORMS_MODULE_NAMESPACE if (!s_pImplementationNames) { - OSL_ASSERT("OFormsModule::getComponentFactory : have no class infos ! Are you sure called this method at the right time ?"); + OSL_FAIL("OFormsModule::getComponentFactory : have no class infos ! Are you sure called this method at the right time ?"); return NULL; } OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers, @@ -159,3 +160,4 @@ namespace FORMS_MODULE_NAMESPACE } // namespace FORMS_MODULE_NAMESPACE //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/inc/frm_module.hxx b/forms/source/inc/frm_module.hxx index 33d17d863d63..0a5342f2bcff 100644 --- a/forms/source/inc/frm_module.hxx +++ b/forms/source/inc/frm_module.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,3 +36,4 @@ #endif // FRM_MODULE_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/inc/frm_resource.hxx b/forms/source/inc/frm_resource.hxx index 33349e6ad620..503a0050e4e6 100644 --- a/forms/source/inc/frm_resource.hxx +++ b/forms/source/inc/frm_resource.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -75,3 +76,4 @@ namespace frm #endif // _FRM_RESOURCE_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/inc/frm_strings.hxx b/forms/source/inc/frm_strings.hxx index 1e3b1b1bd312..57d4ff9bccd5 100644 --- a/forms/source/inc/frm_strings.hxx +++ b/forms/source/inc/frm_strings.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -97,6 +98,7 @@ namespace frm FORMS_CONSTASCII_STRING( PROPERTY_TABINDEX, "TabIndex" ); FORMS_CONSTASCII_STRING( PROPERTY_TAG, "Tag" ); FORMS_CONSTASCII_STRING( PROPERTY_NAME, "Name" ); + FORMS_CONSTASCII_STRING( PROPERTY_GROUP_NAME, "GroupName" ); FORMS_CONSTASCII_STRING( PROPERTY_CLASSID, "ClassId" ); FORMS_CONSTASCII_STRING( PROPERTY_FETCHSIZE, "FetchSize" ); FORMS_CONSTASCII_STRING( PROPERTY_VALUE, "Value" ); @@ -359,3 +361,5 @@ namespace frm #endif // FRM_STRINGS_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/inc/ids.hxx b/forms/source/inc/ids.hxx index ef391341c1d4..db009f959b44 100644 --- a/forms/source/inc/ids.hxx +++ b/forms/source/inc/ids.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,3 +35,4 @@ DECLARE_IMPLEMENTATIONID_HELPER(frm, OImplementationIds) #endif // _FRM_IDS_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/inc/limitedformats.hxx b/forms/source/inc/limitedformats.hxx index fee3221ce17f..92e4d49e0034 100644 --- a/forms/source/inc/limitedformats.hxx +++ b/forms/source/inc/limitedformats.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -103,3 +104,4 @@ namespace frm #endif // _FORMS_LIMITED_FORMATS_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/inc/listenercontainers.hxx b/forms/source/inc/listenercontainers.hxx index d4f088d4e180..59f8c3a604ef 100644 --- a/forms/source/inc/listenercontainers.hxx +++ b/forms/source/inc/listenercontainers.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -138,3 +139,4 @@ namespace frm #endif // FORMS_SOURCE_INC_LISTENERCONTAINERS_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/inc/property.hrc b/forms/source/inc/property.hrc index 0582ce36c6ee..b0216f4f63b6 100644 --- a/forms/source/inc/property.hrc +++ b/forms/source/inc/property.hrc @@ -62,6 +62,8 @@ namespace frm #define PROPERTY_ID_CONTEXT_WRITING_MODE (PROPERTY_ID_START + 21) #define PROPERTY_ID_VERTICAL_ALIGN (PROPERTY_ID_START + 22) #define PROPERTY_ID_GRAPHIC (PROPERTY_ID_START + 23) +#define PROPERTY_ID_GROUP_NAME (PROPERTY_ID_START + 24) + // free // free // free // free diff --git a/forms/source/inc/property.hxx b/forms/source/inc/property.hxx index e2b6f08377cd..d12a0d030e61 100644 --- a/forms/source/inc/property.hxx +++ b/forms/source/inc/property.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -234,3 +235,4 @@ public: #endif // _FRM_PROPERTY_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/inc/propertybaghelper.hxx b/forms/source/inc/propertybaghelper.hxx index 9d135516f964..5bb10583ea37 100644 --- a/forms/source/inc/propertybaghelper.hxx +++ b/forms/source/inc/propertybaghelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -164,3 +165,4 @@ namespace frm #endif // FORMS_PROPERTYBAGHELPER_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/inc/resettable.hxx b/forms/source/inc/resettable.hxx index 1e743806fb23..d1af14b7718b 100644 --- a/forms/source/inc/resettable.hxx +++ b/forms/source/inc/resettable.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -74,3 +75,5 @@ namespace frm //........................................................................ #endif // FORMS_RESETTABLE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/inc/services.hxx b/forms/source/inc/services.hxx index 9fcb5db408a1..450b8adcd346 100644 --- a/forms/source/inc/services.hxx +++ b/forms/source/inc/services.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -231,3 +232,4 @@ namespace frm #endif // _FRM_SERVICES_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/inc/togglestate.hxx b/forms/source/inc/togglestate.hxx index 30efa6f14ed5..4d2d418798d1 100644 --- a/forms/source/inc/togglestate.hxx +++ b/forms/source/inc/togglestate.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -42,3 +43,5 @@ namespace frm //........................................................................ #endif // FORMS_TOGGLESTATE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/inc/urltransformer.hxx b/forms/source/inc/urltransformer.hxx index 2e8bdf1f684a..ead8a5963f22 100644 --- a/forms/source/inc/urltransformer.hxx +++ b/forms/source/inc/urltransformer.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -84,3 +85,4 @@ namespace frm #endif // FORMS_SOURCE_INC_URLTRANSFORMER_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/inc/windowstateguard.hxx b/forms/source/inc/windowstateguard.hxx index b4c93636f825..2123d41ffdf0 100644 --- a/forms/source/inc/windowstateguard.hxx +++ b/forms/source/inc/windowstateguard.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -81,3 +82,4 @@ namespace frm #endif // FORMS_WINDOWSTATEGUARD_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx index e494406f87ef..9c25049affb8 100644 --- a/forms/source/misc/InterfaceContainer.cxx +++ b/forms/source/misc/InterfaceContainer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -95,7 +96,7 @@ lcl_hasVbaEvents( const Sequence< ScriptEventDescriptor >& sEvents ) const ScriptEventDescriptor* pEnd = ( pDesc + sEvents.getLength() ); for ( ; pDesc != pEnd; ++pDesc ) { - if ( pDesc->ScriptType.equals( rtl::OUString::createFromAscii( "VBAInterop" ) ) ) + if ( pDesc->ScriptType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VBAInterop") ) ) ) return true; } return false; @@ -111,7 +112,7 @@ lcl_stripVbaEvents( const Sequence< ScriptEventDescriptor >& sEvents ) sal_Int32 nCopied = 0; for ( ; pDesc != pEnd; ++pDesc ) { - if ( !pDesc->ScriptType.equals( rtl::OUString::createFromAscii( "VBAInterop" ) ) ) + if ( !pDesc->ScriptType.equals( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VBAInterop") ) ) ) { sStripped[ nCopied++ ] = *pDesc; } @@ -133,7 +134,7 @@ void OInterfaceContainer::impl_addVbEvents_nolck_nothrow( const sal_Int32 i_nIn break; Reference< XMultiServiceFactory > xDocFac( xDoc, UNO_QUERY_THROW ); - Reference< XCodeNameQuery > xNameQuery( xDocFac->createInstance( rtl::OUString::createFromAscii( "ooo.vba.VBACodeNameProvider" ) ), UNO_QUERY ); + Reference< XCodeNameQuery > xNameQuery( xDocFac->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo.vba.VBACodeNameProvider") ) ), UNO_QUERY ); if ( !xNameQuery.is() ) break; @@ -151,12 +152,19 @@ void OInterfaceContainer::impl_addVbEvents_nolck_nothrow( const sal_Int32 i_nIn Reference< XPropertySet > xProps( xElement, UNO_QUERY_THROW ); ::rtl::OUString sServiceName; - xProps->getPropertyValue( rtl::OUString::createFromAscii("DefaultControl" ) ) >>= sServiceName; + xProps->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultControl") ) ) >>= sServiceName; - Reference< ooo::vba::XVBAToOOEventDescGen > xDescSupplier( m_xServiceFactory->createInstance( rtl::OUString::createFromAscii( "ooo.vba.VBAToOOEventDesc" ) ), UNO_QUERY_THROW ); - Sequence< ScriptEventDescriptor > vbaEvents = xDescSupplier->getEventDescriptions( m_xServiceFactory->createInstance( sServiceName ), sCodeName ); + Reference< ooo::vba::XVBAToOOEventDescGen > xDescSupplier( m_xServiceFactory->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo.vba.VBAToOOEventDesc") ) ), UNO_QUERY_THROW ); + Reference< XInterface > xInterface = m_xServiceFactory->createInstance( sServiceName ); + Sequence< ScriptEventDescriptor > vbaEvents = xDescSupplier->getEventDescriptions( xInterface, sCodeName ); // register the vba script events m_xEventAttacher->registerScriptEvents( i_nIndex, vbaEvents ); + + Reference< XComponent > xComponent( xInterface, UNO_QUERY ); + if ( xComponent.is() ) + { + xComponent->dispose(); + } } while ( false ); } @@ -546,7 +554,6 @@ void SAL_CALL OInterfaceContainer::read( const Reference< XObjectInputStream >& // after ::read the object is expected to be in the state it was when ::write was called, so we have // to empty ourself here - // FS - 71598 - 12.01.00 while (getCount()) removeByIndex(0); @@ -575,7 +582,6 @@ void SAL_CALL OInterfaceContainer::read( const Reference< XObjectInputStream >& if ( !xObj.is() ) // couldn't handle it throw; - // 72133 - 09.02.00 - FS } catch(Exception&) { @@ -602,7 +608,7 @@ void SAL_CALL OInterfaceContainer::read( const Reference< XObjectInputStream >& } catch( const Exception& ) { - DBG_ERROR( "OInterfaceContainerHelper::read: reading succeeded, but not inserting!" ); + OSL_FAIL( "OInterfaceContainerHelper::read: reading succeeded, but not inserting!" ); // create a placeholder xElement = xElement.query( lcl_createPlaceHolder( m_xServiceFactory ) ); if ( !xElement.is() ) @@ -797,18 +803,6 @@ void OInterfaceContainer::approveNewElement( const Reference< XPropertySet >& _r Reference< XChild > xChild( _rxObject, UNO_QUERY ); if ( !xChild.is() || xChild->getParent().is() ) { -#ifdef FS_PRIV_DEBUG - ::rtl::OUString sChildName, sParentName; - Reference< XNamed > xNamed( xChild, UNO_QUERY ); - if ( xNamed.is() ) - sChildName = xNamed->getName(); - if ( xChild.is() ) - { - xNamed = xNamed.query( xChild->getParent() ); - if ( xNamed.is() ) - sParentName = xNamed->getName(); - } -#endif lcl_throwIllegalArgumentException(); } @@ -1141,7 +1135,7 @@ void SAL_CALL OInterfaceContainer::insertByName(const ::rtl::OUString& _rName, c } catch( const Exception& ) { - DBG_ERROR( "OInterfaceContainer::insertByName: caught an exception!" ); + OSL_FAIL( "OInterfaceContainer::insertByName: caught an exception!" ); } implInsert( m_aItems.size(), xElementProps, sal_True, aElementMetaData.get(), sal_True ); } @@ -1361,3 +1355,4 @@ InterfaceRef OFormComponents::getParent() throw( RuntimeException ) } // namespace frm //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/misc/componenttools.cxx b/forms/source/misc/componenttools.cxx index bdba7456fa7f..abd4c96f5482 100644 --- a/forms/source/misc/componenttools.cxx +++ b/forms/source/misc/componenttools.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -121,3 +122,4 @@ namespace frm } // namespace frm //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/misc/frm_module.cxx b/forms/source/misc/frm_module.cxx index c83a6f8a91e6..e1f4fcaf8bc9 100644 --- a/forms/source/misc/frm_module.cxx +++ b/forms/source/misc/frm_module.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,3 +35,4 @@ #include "forms_module_impl.hxx" #undef FORMS_MODULE_IMPLEMENTATION_INCLUDE_CONTEXT +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/misc/frm_strings.cxx b/forms/source/misc/frm_strings.cxx index 0236422fbb7c..62c4a1ee5b8d 100644 --- a/forms/source/misc/frm_strings.cxx +++ b/forms/source/misc/frm_strings.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,3 +33,4 @@ #include "frm_strings.hxx" #include "services.hxx" +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/misc/ids.cxx b/forms/source/misc/ids.cxx index deae7e8debc4..c9b0265bd533 100644 --- a/forms/source/misc/ids.cxx +++ b/forms/source/misc/ids.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,3 +35,4 @@ IMPLEMENT_IMPLEMENTATIONID_HELPER(frm, OImplementationIds) +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/misc/limitedformats.cxx b/forms/source/misc/limitedformats.cxx index 1b7473114d1c..6066f8f522ce 100644 --- a/forms/source/misc/limitedformats.cxx +++ b/forms/source/misc/limitedformats.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -63,8 +64,8 @@ namespace frm //--------------------------------------------------------------------- static const Locale& getLocale(LocaleType _eType) { - static const Locale s_aEnglishUS( ::rtl::OUString::createFromAscii("en"), ::rtl::OUString::createFromAscii("us"), ::rtl::OUString() ); - static const Locale s_aGerman( ::rtl::OUString::createFromAscii("de"), ::rtl::OUString::createFromAscii("DE"), ::rtl::OUString() ); + static const Locale s_aEnglishUS( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en") ), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("us") ), ::rtl::OUString() ); + static const Locale s_aGerman( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("de") ), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DE") ), ::rtl::OUString() ); static const ::rtl::OUString s_sEmptyString; static const Locale s_aSystem( s_sEmptyString, s_sEmptyString, s_sEmptyString ); @@ -80,7 +81,7 @@ namespace frm return s_aSystem; } - OSL_ENSURE(sal_False, "getLocale: invalid enum value!"); + OSL_FAIL("getLocale: invalid enum value!"); return s_aSystem; } @@ -134,7 +135,7 @@ namespace frm } } - OSL_ENSURE(sal_False, "lcl_getFormatTable: invalid id!"); + OSL_FAIL("lcl_getFormatTable: invalid id!"); return NULL; } @@ -198,7 +199,7 @@ namespace frm } catch(const Exception&) { - OSL_ENSURE(sal_False, "OLimitedFormats::ensureTableInitialized: adding the key to the formats collection failed!"); + OSL_FAIL("OLimitedFormats::ensureTableInitialized: adding the key to the formats collection failed!"); } #endif } @@ -242,7 +243,7 @@ namespace frm } catch(const Exception&) { - OSL_ENSURE(sal_False, "OLimitedFormats::setAggregateSet: invalid handle!"); + OSL_FAIL("OLimitedFormats::setAggregateSet: invalid handle!"); } } #endif @@ -341,7 +342,7 @@ namespace frm if (!bFoundIt) { // somebody gave us an format which we can't translate - ::rtl::OUString sMessage = ::rtl::OUString::createFromAscii("This control supports only a very limited number of formats."); + ::rtl::OUString sMessage (RTL_CONSTASCII_USTRINGPARAM("This control supports only a very limited number of formats.") ); throw IllegalArgumentException(sMessage, NULL, 2); } @@ -400,3 +401,4 @@ namespace frm } // namespace frm //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/misc/listenercontainers.cxx b/forms/source/misc/listenercontainers.cxx index 4c7e438d37d8..7e78c875df3b 100644 --- a/forms/source/misc/listenercontainers.cxx +++ b/forms/source/misc/listenercontainers.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,9 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_forms.hxx" -#ifndef FORMS_SOURCE_MISC_LISTENERCONTAINERS_HXX #include "listenercontainers.hxx" -#endif /** === begin UNO includes === **/ /** === end UNO includes === **/ @@ -61,7 +60,7 @@ namespace frm _rxListener->resetted( _rEvent ); break; default: - OSL_ENSURE( sal_False, "ResetListeners::implNotify: invalid notification type!" ); + OSL_FAIL( "ResetListeners::implNotify: invalid notification type!" ); } return true; } @@ -70,3 +69,4 @@ namespace frm } // namespace frm //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/misc/makefile.mk b/forms/source/misc/makefile.mk index 64af07b00c01..c824369751ad 100644 --- a/forms/source/misc/makefile.mk +++ b/forms/source/misc/makefile.mk @@ -31,7 +31,6 @@ PRJNAME=forms TARGET=common ENABLE_EXCEPTIONS=TRUE -#TARGETTYPE=GUI # --- Settings ---------------------------------- diff --git a/forms/source/misc/property.cxx b/forms/source/misc/property.cxx index fffb7557ad5e..0d97609f0eb7 100644 --- a/forms/source/misc/property.cxx +++ b/forms/source/misc/property.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,9 +31,7 @@ #include "frm_strings.hxx" #include "property.hxx" -#ifndef _FRM_PROPERTY_HRC_ #include "property.hrc" -#endif #include <cppuhelper/queryinterface.hxx> #include <tools/debug.hxx> #include <com/sun/star/beans/PropertyAttribute.hpp> @@ -55,7 +54,7 @@ sal_Int32 PropertyInfoService::getPropertyId(const ::rtl::OUString& _rName) PropertyAssignment aCompareName(_rName, -1); - ::std::pair<PropertyMapIterator,PropertyMapIterator> aPair = equal_range( + ::std::pair<PropertyMapIterator,PropertyMapIterator> aPair = ::std::equal_range( s_AllKnownProperties.begin(), s_AllKnownProperties.end(), aCompareName, @@ -256,3 +255,4 @@ void PropertyInfoService::initialize() } //... namespace frm ....................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/misc/services.cxx b/forms/source/misc/services.cxx index 9a38d49e3e67..25cb3f797e39 100644 --- a/forms/source/misc/services.cxx +++ b/forms/source/misc/services.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -133,7 +134,7 @@ void registerClassInfo( //....................................................................................... #define REGISTER_CLASS_CORE(classImplName) \ registerClassInfo( \ - ::rtl::OUString::createFromAscii("com.sun.star.form.") + ::rtl::OUString::createFromAscii(#classImplName), \ + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.") ) + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(#classImplName)), \ aServices, \ frm::classImplName##_CreateInstance) @@ -228,7 +229,7 @@ void ensureClassInfos() aServices.getArray()[2] = frm::FRM_SUN_COMPONENT_DATABASE_FORMATTEDFIELD; aServices.getArray()[3] = frm::BINDABLE_DATABASE_FORMATTED_FIELD; - registerClassInfo(::rtl::OUString::createFromAscii("com.sun.star.comp.forms.OFormattedFieldWrapper_ForcedFormatted"), + registerClassInfo(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.forms.OFormattedFieldWrapper_ForcedFormatted") ), aServices, frm::OFormattedFieldWrapper_CreateInstance_ForceFormatted); @@ -275,7 +276,7 @@ void ensureClassInfos() // = XForms core #define REGISTER_XFORMS_CLASS(name) \ aServices.realloc(1); \ - aServices.getArray()[0] = rtl::OUString::createFromAscii( "com.sun.star.xforms." #name ); \ + aServices.getArray()[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xforms." #name )); \ REGISTER_CLASS_CORE(name) REGISTER_XFORMS_CLASS(Model); @@ -342,7 +343,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(const sal_Char* _pImplN sal_Int32 nClasses = s_aClassImplementationNames.getLength(); OSL_ENSURE((s_aClassServiceNames.getLength() == nClasses) && (s_aFactories.getLength() == nClasses), - "forms::component_writeInfo : invalid class infos !"); + "forms::component_getFactory : invalid class infos !"); // loop through the sequences and register the service providers const ::rtl::OUString* pClasses = s_aClassImplementationNames.getConstArray(); @@ -351,7 +352,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(const sal_Char* _pImplN for (sal_Int32 i=0; i<nClasses; ++i, ++pClasses, ++pServices, ++pFunctionsAsInts) { - if (rtl_ustr_ascii_compare(*pClasses, _pImplName) == 0) + if (rtl_ustr_ascii_compare(pClasses->getStr(), _pImplName) == 0) { ::cppu::ComponentInstantiation aCurrentCreateFunction = reinterpret_cast< ::cppu::ComponentInstantiation>(*pFunctionsAsInts); @@ -395,3 +396,5 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(const sal_Char* _pImplN } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/resource/frm_resource.cxx b/forms/source/resource/frm_resource.cxx index 67e9c5889326..93746147f3cd 100644 --- a/forms/source/resource/frm_resource.cxx +++ b/forms/source/resource/frm_resource.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,9 +36,7 @@ #include <vcl/svapp.hxx> //--------------------------------------------------- -#ifndef _SOLAR_HRC #include <svl/solar.hrc> -#endif //......................................................................... namespace frm @@ -87,3 +86,4 @@ namespace frm } //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/resource/makefile.mk b/forms/source/resource/makefile.mk index cde68a98a339..39ffdca28daf 100644 --- a/forms/source/resource/makefile.mk +++ b/forms/source/resource/makefile.mk @@ -42,7 +42,9 @@ SRC1FILES= \ strings.src \ xforms.src -SLOFILES= $(SLO)$/frm_resource.obj \ +EXCEPTIONSFILES= $(SLO)$/frm_resource.obj + +SLOFILES= $(EXCEPTIONSFILES) # --- Targets ---------------------------------- diff --git a/forms/source/richtext/attributedispatcher.cxx b/forms/source/richtext/attributedispatcher.cxx index 82df2c3fbbf1..201c6b998e4d 100644 --- a/forms/source/richtext/attributedispatcher.cxx +++ b/forms/source/richtext/attributedispatcher.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -113,7 +114,7 @@ namespace frm sMessage += "\n (URL: "; sMessage += ::rtl::OString( _rURL.Complete.getStr(), _rURL.Complete.getLength(), RTL_TEXTENCODING_ASCII_US ); sMessage += ")"; - DBG_ERROR( sMessage.getStr() ); + OSL_FAIL( sMessage.getStr() ); } #endif @@ -136,3 +137,5 @@ namespace frm //........................................................................ } // namespace frm //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/richtext/attributedispatcher.hxx b/forms/source/richtext/attributedispatcher.hxx index 6c9b7b461267..3dafb5c3f53f 100644 --- a/forms/source/richtext/attributedispatcher.hxx +++ b/forms/source/richtext/attributedispatcher.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -102,3 +103,4 @@ namespace frm #endif // FORMS_SOURCE_RICHTEXT_ATTRIBUTEDISPATCHER_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/richtext/clipboarddispatcher.cxx b/forms/source/richtext/clipboarddispatcher.cxx index 1f021d9ad0ea..52069085ed2c 100644 --- a/forms/source/richtext/clipboarddispatcher.cxx +++ b/forms/source/richtext/clipboarddispatcher.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -206,3 +207,4 @@ namespace frm } // namespace frm //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/richtext/clipboarddispatcher.hxx b/forms/source/richtext/clipboarddispatcher.hxx index a9e6bd7417c1..b41527036ef9 100644 --- a/forms/source/richtext/clipboarddispatcher.hxx +++ b/forms/source/richtext/clipboarddispatcher.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -105,3 +106,4 @@ namespace frm #endif // FORMS_SOURCE_RICHTEXT_CLIPBOARDDISPATCHER_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/richtext/featuredispatcher.cxx b/forms/source/richtext/featuredispatcher.cxx index d24e625e0f33..fdc08a1f7a69 100644 --- a/forms/source/richtext/featuredispatcher.cxx +++ b/forms/source/richtext/featuredispatcher.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -147,7 +148,7 @@ namespace frm } catch( const Exception& ) { - OSL_ENSURE( sal_False, "ORichTextFeatureDispatcher::doNotify: caught an exception!" ); + OSL_FAIL( "ORichTextFeatureDispatcher::doNotify: caught an exception!" ); } } } @@ -155,3 +156,5 @@ namespace frm //........................................................................ } // namespace frm //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/richtext/featuredispatcher.hxx b/forms/source/richtext/featuredispatcher.hxx index 9a8252a21783..2eb80a914c40 100644 --- a/forms/source/richtext/featuredispatcher.hxx +++ b/forms/source/richtext/featuredispatcher.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -105,3 +106,4 @@ namespace frm #endif // FORMS_SOURCE_RICHTEXT_FEATUREDISPATCHER_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/richtext/makefile.mk b/forms/source/richtext/makefile.mk index 5c62a1a9e675..b7d08ef379e6 100644 --- a/forms/source/richtext/makefile.mk +++ b/forms/source/richtext/makefile.mk @@ -38,21 +38,21 @@ TARGET=richtext # --- Files ------------------------------------- EXCEPTIONSFILES=\ - $(SLO)$/richtextunowrapper.obj \ - $(SLO)$/richtextmodel.obj \ - $(SLO)$/richtextcontrol.obj \ - $(SLO)$/featuredispatcher.obj \ - $(SLO)$/clipboarddispatcher.obj \ $(SLO)$/attributedispatcher.obj \ + $(SLO)$/clipboarddispatcher.obj \ + $(SLO)$/featuredispatcher.obj \ $(SLO)$/parametrizedattributedispatcher.obj \ - $(SLO)$/specialdispatchers.obj \ + $(SLO)$/richtextcontrol.obj \ $(SLO)$/richtextengine.obj \ - $(SLO)$/richtextimplcontrol.obj - -SLOFILES= $(EXCEPTIONSFILES) \ + $(SLO)$/richtextimplcontrol.obj \ + $(SLO)$/richtextmodel.obj \ + $(SLO)$/richtextunowrapper.obj \ $(SLO)$/richtextvclcontrol.obj \ $(SLO)$/richtextviewport.obj \ $(SLO)$/rtattributehandler.obj \ + $(SLO)$/specialdispatchers.obj + +SLOFILES= $(EXCEPTIONSFILES) # --- Targets ---------------------------------- diff --git a/forms/source/richtext/parametrizedattributedispatcher.cxx b/forms/source/richtext/parametrizedattributedispatcher.cxx index 60791969c119..a13f165af945 100644 --- a/forms/source/richtext/parametrizedattributedispatcher.cxx +++ b/forms/source/richtext/parametrizedattributedispatcher.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,9 +33,7 @@ #include <svl/itemset.hxx> #include <svl/itempool.hxx> -#ifndef _SVX_SVXIDS_HRC #include <svx/svxids.hrc> -#endif #include <sfx2/sfxuno.hxx> #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/beans/PropertyValue.hpp> @@ -141,3 +140,5 @@ namespace frm //........................................................................ } // namespace frm //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/richtext/parametrizedattributedispatcher.hxx b/forms/source/richtext/parametrizedattributedispatcher.hxx index bbc73a6bd513..0f911dbf4df8 100644 --- a/forms/source/richtext/parametrizedattributedispatcher.hxx +++ b/forms/source/richtext/parametrizedattributedispatcher.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -73,3 +74,4 @@ namespace frm #endif // FORMS_SOURCE_RICHTEXT_PARAMETRIZEDATTRIBUTEDISPATCHER_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx index 9b37ba6d67c4..beab78376ff2 100644 --- a/forms/source/richtext/richtextcontrol.cxx +++ b/forms/source/richtext/richtextcontrol.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,9 +30,7 @@ #include "precompiled_forms.hxx" #include "richtextcontrol.hxx" #include "frm_module.hxx" -#ifndef _FRM_PROPERTY_HRC_ #include "property.hrc" -#endif #include "services.hxx" #include "richtextmodel.hxx" @@ -225,7 +224,7 @@ namespace frm return; } - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if (!getPeer().is()) { @@ -376,7 +375,7 @@ namespace frm void ORichTextPeer::dispose( ) throw(RuntimeException) { { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; RichTextControl* pRichTextControl = static_cast< RichTextControl* >( GetWindow() ); if ( pRichTextControl ) @@ -401,7 +400,7 @@ namespace frm //-------------------------------------------------------------------- void SAL_CALL ORichTextPeer::draw( sal_Int32 _nX, sal_Int32 _nY ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; RichTextControl* pControl = static_cast< RichTextControl* >( GetWindow() ); if ( !pControl ) @@ -634,7 +633,7 @@ namespace frm #if OSL_DEBUG_LEVEL > 0 ::rtl::OString sTrace( "ORichTextPeer::implCreateDispatcher: creating *parametrized* dispatcher for " ); sTrace += ::rtl::OString( _rURL.Complete.getStr(), _rURL.Complete.getLength(), RTL_TEXTENCODING_ASCII_US ); - DBG_TRACE( sTrace.getStr() ); + OSL_TRACE( "%s", sTrace.getStr() ); #endif pAttributeDispatcher = new OParametrizedAttributeDispatcher( pRichTextControl->getView(), _nSlotId, _rURL, pRichTextControl ); } @@ -643,7 +642,7 @@ namespace frm #if OSL_DEBUG_LEVEL > 0 ::rtl::OString sTrace( "ORichTextPeer::implCreateDispatcher: creating *normal* dispatcher for " ); sTrace += ::rtl::OString( _rURL.Complete.getStr(), _rURL.Complete.getLength(), RTL_TEXTENCODING_ASCII_US ); - DBG_TRACE( sTrace.getStr() ); + OSL_TRACE( "%s", sTrace.getStr() ); #endif pAttributeDispatcher = new OAttributeDispatcher( pRichTextControl->getView(), _nSlotId, _rURL, pRichTextControl ); } @@ -653,7 +652,7 @@ namespace frm { ::rtl::OString sTrace( "ORichTextPeer::implCreateDispatcher: not creating dispatcher (unsupported slot) for " ); sTrace += ::rtl::OString( _rURL.Complete.getStr(), _rURL.Complete.getLength(), RTL_TEXTENCODING_ASCII_US ); - DBG_TRACE( sTrace.getStr() ); + OSL_TRACE( "%s", sTrace.getStr() ); } #endif } @@ -684,11 +683,11 @@ namespace frm // some hard-coded slots, which do not have a UNO name at SFX level, but which // we nevertheless need to transport via UNO mechanisms, so we need a name - if ( _rUnoSlotName.equalsAscii( "AllowHangingPunctuation" ) ) + if ( _rUnoSlotName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "AllowHangingPunctuation" ) ) ) return SID_ATTR_PARA_HANGPUNCTUATION; - if ( _rUnoSlotName.equalsAscii( "ApplyForbiddenCharacterRules" ) ) + if ( _rUnoSlotName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ApplyForbiddenCharacterRules" ) ) ) return SID_ATTR_PARA_FORBIDDEN_RULES; - if ( _rUnoSlotName.equalsAscii( "UseScriptSpacing" ) ) + if ( _rUnoSlotName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UseScriptSpacing" ) ) ) return SID_ATTR_PARA_SCRIPTSPACE; OSL_ENSURE( pSlot, "lcl_getSlotFromUnoName: unknown UNO slot name!" ); @@ -702,7 +701,7 @@ namespace frm Reference< XDispatch > xReturn; if ( !GetWindow() ) { - OSL_ENSURE( sal_False, "ORichTextPeer::queryDispatch: already disposed?" ); + OSL_FAIL( "ORichTextPeer::queryDispatch: already disposed?" ); return xReturn; } @@ -764,3 +763,4 @@ namespace frm } // namespace frm //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/richtext/richtextcontrol.hxx b/forms/source/richtext/richtextcontrol.hxx index 54f0b6e08966..99753d14ceba 100644 --- a/forms/source/richtext/richtextcontrol.hxx +++ b/forms/source/richtext/richtextcontrol.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -157,3 +158,4 @@ namespace frm #endif // FORMS_SOURCE_RICHTEXT_RICHTEXTCONTROL_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/richtext/richtextengine.cxx b/forms/source/richtext/richtextengine.cxx index 3b220a2e222a..4b210e7ede60 100644 --- a/forms/source/richtext/richtextengine.cxx +++ b/forms/source/richtext/richtextengine.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,7 +44,7 @@ #include <vcl/outdev.hxx> #include <unotools/lingucfg.hxx> #include <svl/undo.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <algorithm> #include <functional> @@ -94,7 +95,7 @@ namespace frm { RichTextEngine* pClone( NULL ); { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; EditTextObject* pMyText = CreateTextObject(); OSL_ENSURE( pMyText, "RichTextEngine::Clone: CreateTextObject returned nonsense!" ); @@ -120,7 +121,6 @@ namespace frm //-------------------------------------------------------------------- RichTextEngine::~RichTextEngine( ) { - //delete m_pEnginePool; // must be done after the RichTextEngine was deleted DBG_DTOR(RichTextEngine,NULL); } @@ -160,3 +160,4 @@ namespace frm } // namespace frm //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/richtext/richtextengine.hxx b/forms/source/richtext/richtextengine.hxx index c3a1eb36550c..c571f51e9aaf 100644 --- a/forms/source/richtext/richtextengine.hxx +++ b/forms/source/richtext/richtextengine.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -89,3 +90,4 @@ namespace frm #endif // FORMS_SOURCE_RICHTEXT_RICHTEXTENGINE_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx index 8fa944ea943f..e292a6f9ef08 100644 --- a/forms/source/richtext/richtextimplcontrol.cxx +++ b/forms/source/richtext/richtextimplcontrol.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,9 +35,7 @@ #include <editeng/editview.hxx> #include <editeng/eeitem.hxx> #include <editeng/editstat.hxx> -#ifndef _SVX_SVXIDS_HRC #include <svx/svxids.hrc> -#endif #include <editeng/scripttypeitem.hxx> #include <editeng/editobj.hxx> @@ -177,7 +176,7 @@ namespace frm StateCache::const_iterator aCachedStatePos = m_aLastKnownStates.find( _nAttributeId ); if ( aCachedStatePos == m_aLastKnownStates.end() ) { - OSL_ENSURE( sal_False, "RichTextControlImpl::getAttributeState: Don't ask for the state of an attribute which I never encountered!" ); + OSL_FAIL( "RichTextControlImpl::getAttributeState: Don't ask for the state of an attribute which I never encountered!" ); return AttributeState( eIndetermined ); } return aCachedStatePos->second; @@ -678,3 +677,4 @@ namespace frm } // namespace frm //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/richtext/richtextimplcontrol.hxx b/forms/source/richtext/richtextimplcontrol.hxx index 52341905087f..4cec7242279b 100644 --- a/forms/source/richtext/richtextimplcontrol.hxx +++ b/forms/source/richtext/richtextimplcontrol.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -194,3 +195,4 @@ namespace frm #endif // FORMS_SOURCE_RICHTEXT_RICHTEXTIMPLCONTOL_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/richtext/richtextmodel.cxx b/forms/source/richtext/richtextmodel.cxx index 91c6100f1817..c5f91a6fec28 100644 --- a/forms/source/richtext/richtextmodel.cxx +++ b/forms/source/richtext/richtextmodel.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -506,7 +507,7 @@ namespace frm { if ( m_pEngine.get() ) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; m_bSettingEngineText = true; m_pEngine->SetText( _rText ); m_bSettingEngineText = false; @@ -548,7 +549,7 @@ namespace frm } catch( const Exception& ) { - OSL_ENSURE( sal_False, "ORichTextModel::getEditEngine: caught an exception!" ); + OSL_FAIL( "ORichTextModel::getEditEngine: caught an exception!" ); } } return pEngine; @@ -636,3 +637,5 @@ namespace frm //........................................................................ } // namespace frm //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/richtext/richtextmodel.hxx b/forms/source/richtext/richtextmodel.hxx index 94e5523fb001..18c083d02c80 100644 --- a/forms/source/richtext/richtextmodel.hxx +++ b/forms/source/richtext/richtextmodel.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -192,3 +193,4 @@ namespace frm #endif // FORMS_SOURCE_RICHTEXT_RICHTEXTMODEL_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/richtext/richtextunowrapper.cxx b/forms/source/richtext/richtextunowrapper.cxx index d08f04f5c0ae..2077b43756a8 100644 --- a/forms/source/richtext/richtextunowrapper.cxx +++ b/forms/source/richtext/richtextunowrapper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -134,3 +135,4 @@ namespace frm } // namespace frm //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/richtext/richtextunowrapper.hxx b/forms/source/richtext/richtextunowrapper.hxx index a461eb4d507e..ef9ecbe57338 100644 --- a/forms/source/richtext/richtextunowrapper.hxx +++ b/forms/source/richtext/richtextunowrapper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -96,3 +97,4 @@ namespace frm #endif // FORMS_SOURCE_RICHTEXT_RICHTEXTUNOWRAPPER_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/richtext/richtextvclcontrol.cxx b/forms/source/richtext/richtextvclcontrol.cxx index ed2ca6aef521..1f47f4cabe7c 100644 --- a/forms/source/richtext/richtextvclcontrol.cxx +++ b/forms/source/richtext/richtextvclcontrol.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -104,7 +105,7 @@ namespace frm SfxItemSet aToApplyAttributes( getView().GetEmptyItemSet() ); if ( !m_pImpl->executeAttribute( getView().GetAttribs(), aToApplyAttributes, _nAttributeId, _pArgument, m_pImpl->getSelectedScriptType() ) ) { - OSL_ENSURE( sal_False, "RichTextControl::executeAttribute: cannot handle the given attribute!" ); + OSL_FAIL( "RichTextControl::executeAttribute: cannot handle the given attribute!" ); return; } @@ -261,7 +262,7 @@ namespace frm ::sfx2::FileDialogHelper aFP( bLoad ? com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE : com::sun::star::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION, 0, this ); - for ( size_t i = 0; i < sizeof( aExportFormats ) / sizeof( aExportFormats[ 0 ] ); ++i ) + for ( size_t i = 0; i < SAL_N_ELEMENTS( aExportFormats ); ++i ) { aFP.AddFilter( String::CreateFromAscii( aExportFormats[i].pDescription ), @@ -278,7 +279,7 @@ namespace frm { EETextFormat eFormat = EE_FORMAT_XML; String sFilter = aFP.GetCurrentFilter(); - for ( size_t i = 0; i < sizeof( aExportFormats ) / sizeof( aExportFormats[ 0 ] ); ++i ) + for ( size_t i = 0; i < SAL_N_ELEMENTS( aExportFormats ); ++i ) { if ( sFilter.EqualsAscii( aExportFormats[i].pDescription ) ) { @@ -390,3 +391,4 @@ namespace frm //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/richtext/richtextvclcontrol.hxx b/forms/source/richtext/richtextvclcontrol.hxx index 254665f9b873..b69a31c593e0 100644 --- a/forms/source/richtext/richtextvclcontrol.hxx +++ b/forms/source/richtext/richtextvclcontrol.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,9 +30,7 @@ #include <vcl/dialog.hxx> #include <vcl/fixed.hxx> -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif #include <vcl/toolbox.hxx> #include <com/sun/star/awt/FontDescriptor.hpp> #include "rtattributes.hxx" @@ -141,3 +140,4 @@ namespace frm #endif // FORMS_SOURCE_RICHTEXT_RICHTEXTVCLCONTROL_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/richtext/richtextviewport.cxx b/forms/source/richtext/richtextviewport.cxx index 295f83248a9f..4c5a05b7e3d7 100644 --- a/forms/source/richtext/richtextviewport.cxx +++ b/forms/source/richtext/richtextviewport.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -125,3 +126,5 @@ namespace frm //........................................................................ } // namespace frm //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/richtext/richtextviewport.hxx b/forms/source/richtext/richtextviewport.hxx index 70ae75a346f6..2e89fe9a5a74 100644 --- a/forms/source/richtext/richtextviewport.hxx +++ b/forms/source/richtext/richtextviewport.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -78,3 +79,4 @@ namespace frm #endif // FORMS_SOURCE_RICHTEXT_RICHTEXTVIEWPORT_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/richtext/rtattributehandler.cxx b/forms/source/richtext/rtattributehandler.cxx index 16b98bff7efa..4e1a7d5b48fb 100644 --- a/forms/source/richtext/rtattributehandler.cxx +++ b/forms/source/richtext/rtattributehandler.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,9 +30,7 @@ #include "precompiled_forms.hxx" #include "rtattributehandler.hxx" -#ifndef _SVX_SVXIDS_HRC #include <svx/svxids.hrc> -#endif #include <editeng/eeitem.hxx> #include <svl/itemset.hxx> #include <svl/itempool.hxx> @@ -113,7 +112,7 @@ namespace frm //-------------------------------------------------------------------- AttributeCheckState AttributeHandler::implGetCheckState( const SfxPoolItem& /*_rItem*/ ) const { - OSL_ENSURE( sal_False, "AttributeHandler::implGetCheckState: not to be called!" ); + OSL_FAIL( "AttributeHandler::implGetCheckState: not to be called!" ); return eIndetermined; } @@ -232,7 +231,7 @@ namespace frm case SID_ATTR_PARA_ADJUST_RIGHT : m_eAdjust = SVX_ADJUST_RIGHT; break; case SID_ATTR_PARA_ADJUST_BLOCK : m_eAdjust = SVX_ADJUST_BLOCK; break; default: - OSL_ENSURE( sal_False, "ParaAlignmentHandler::ParaAlignmentHandler: invalid slot!" ); + OSL_FAIL( "ParaAlignmentHandler::ParaAlignmentHandler: invalid slot!" ); break; } } @@ -267,7 +266,7 @@ namespace frm case SID_ATTR_PARA_LINESPACE_15: m_nLineSpace = 150; break; case SID_ATTR_PARA_LINESPACE_20: m_nLineSpace = 200; break; default: - OSL_ENSURE( sal_False, "LineSpacingHandler::LineSpacingHandler: invalid slot!" ); + OSL_FAIL( "LineSpacingHandler::LineSpacingHandler: invalid slot!" ); break; } } @@ -309,7 +308,7 @@ namespace frm case SID_SET_SUPER_SCRIPT : m_eEscapement = SVX_ESCAPEMENT_SUPERSCRIPT; break; case SID_SET_SUB_SCRIPT : m_eEscapement = SVX_ESCAPEMENT_SUBSCRIPT; break; default: - OSL_ENSURE( sal_False, "EscapementHandler::EscapementHandler: invalid slot!" ); + OSL_FAIL( "EscapementHandler::EscapementHandler: invalid slot!" ); break; } } @@ -373,7 +372,7 @@ namespace frm DELETEZ( pCorrectWich ); } else - OSL_ENSURE( sal_False, "SlotHandler::executeAttribute: need attributes to do something!" ); + OSL_FAIL( "SlotHandler::executeAttribute: need attributes to do something!" ); } //==================================================================== @@ -462,7 +461,7 @@ namespace frm case SID_ATTR_PARA_LEFT_TO_RIGHT: m_eParagraphDirection = FRMDIR_HORI_LEFT_TOP; m_eDefaultAdjustment = SVX_ADJUST_LEFT; break; case SID_ATTR_PARA_RIGHT_TO_LEFT: m_eParagraphDirection = FRMDIR_HORI_RIGHT_TOP; m_eDefaultAdjustment = SVX_ADJUST_RIGHT; break; default: - OSL_ENSURE( sal_False, "ParagraphDirectionHandler::ParagraphDirectionHandler: invalid attribute id!" ); + OSL_FAIL( "ParagraphDirectionHandler::ParagraphDirectionHandler: invalid attribute id!" ); } if ( SVX_ADJUST_RIGHT == m_eDefaultAdjustment ) @@ -530,3 +529,5 @@ namespace frm //........................................................................ } // namespace frm //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/richtext/rtattributehandler.hxx b/forms/source/richtext/rtattributehandler.hxx index f15fd5d5c49b..e908ae75162c 100644 --- a/forms/source/richtext/rtattributehandler.hxx +++ b/forms/source/richtext/rtattributehandler.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -238,3 +239,4 @@ namespace frm #endif // FORMS_SOURCE_COMPONENT_RTATTRIBUTEHANDLER_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/richtext/rtattributes.hxx b/forms/source/richtext/rtattributes.hxx index 29baa5b8d355..246a1366e283 100644 --- a/forms/source/richtext/rtattributes.hxx +++ b/forms/source/richtext/rtattributes.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -170,3 +171,4 @@ namespace frm #endif // FORMS_SOURCE_RICHTEXT_RTATTRIBUTES_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/richtext/specialdispatchers.cxx b/forms/source/richtext/specialdispatchers.cxx index c7f2005eb7df..708281e041a8 100644 --- a/forms/source/richtext/specialdispatchers.cxx +++ b/forms/source/richtext/specialdispatchers.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,9 +31,7 @@ #include "specialdispatchers.hxx" #include <editeng/editeng.hxx> #include <editeng/editview.hxx> -#ifndef _SVX_SVXIDS_HRC #include <svx/svxids.hrc> -#endif #define ITEMID_SCRIPTSPACE SID_ATTR_PARA_SCRIPTSPACE #include <editeng/scriptspaceitem.hxx> @@ -177,7 +176,7 @@ namespace frm const PropertyValue* pLookupEnd = _rArguments.getConstArray() + _rArguments.getLength(); while ( pLookup != pLookupEnd ) { - if ( pLookup->Name.equalsAscii( "Enable" ) ) + if ( pLookup->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Enable" ) ) ) break; ++pLookup; } @@ -190,7 +189,7 @@ namespace frm return new SfxBoolItem( (WhichId)m_nAttributeId, bEnable ); } - OSL_ENSURE( sal_False, "OAsianFontLayoutDispatcher::convertDispatchArgsToItem: did not find the one and only argument!" ); + OSL_FAIL( "OAsianFontLayoutDispatcher::convertDispatchArgsToItem: did not find the one and only argument!" ); return NULL; } @@ -198,3 +197,4 @@ namespace frm } // namespace frm //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/richtext/specialdispatchers.hxx b/forms/source/richtext/specialdispatchers.hxx index 7b6c7b98ea24..4f8c48a6bd84 100644 --- a/forms/source/richtext/specialdispatchers.hxx +++ b/forms/source/richtext/specialdispatchers.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -111,3 +112,5 @@ namespace frm //........................................................................ #endif // FORMS_SOURCE_RICHTEXT_SPECIALDISPATCHERS_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/richtext/textattributelistener.hxx b/forms/source/richtext/textattributelistener.hxx index 3b7b29ee19f9..51ea48f42af1 100644 --- a/forms/source/richtext/textattributelistener.hxx +++ b/forms/source/richtext/textattributelistener.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -59,3 +60,4 @@ namespace frm #endif // FORMS_SOURCE_RICHTEXT_TEXTATTRIBUTELISTENER_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx index 68f3e0e7773f..c984b9f1d5c6 100644 --- a/forms/source/runtime/formoperations.cxx +++ b/forms/source/runtime/formoperations.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -67,7 +68,8 @@ #include <comphelper/property.hxx> #include <comphelper/namedvaluecollection.hxx> #include <cppuhelper/exc_hlp.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> +#include <sal/macros.h> //-------------------------------------------------------------------------- extern "C" void SAL_CALL createRegistryInfo_FormOperations() @@ -412,7 +414,7 @@ namespace frm ::rtl::OUString sValue = ::rtl::OUString::valueOf( sal_Int32( nCount ) ); if ( !bFinalCount ) - sValue += ::rtl::OUString::createFromAscii( " *" ); + sValue += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" *") ); aState.State <<= sValue; aState.Enabled = sal_True; @@ -420,13 +422,13 @@ namespace frm break; default: - OSL_ENSURE( sal_False, "FormOperations::getState: unknown feature id!" ); + OSL_FAIL( "FormOperations::getState: unknown feature id!" ); break; } } catch( const Exception& ) { - OSL_ENSURE( sal_False, "FormOperations::getState: caught an exception!" ); + OSL_FAIL( "FormOperations::getState: caught an exception!" ); } return aState; @@ -469,7 +471,7 @@ namespace frm //-------------------------------------------------------------------- void SAL_CALL FormOperations::execute( ::sal_Int16 _nFeature ) throw (RuntimeException, IllegalArgumentException, SQLException, WrappedTargetException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; MethodGuard aGuard( *this ); if ( ( _nFeature != FormFeature::DeleteRecord ) && ( _nFeature != FormFeature::UndoRecordChanges ) ) @@ -546,7 +548,7 @@ namespace frm m_xLoadableForm->reload(); // refresh all controls in the form (and sub forms) which can be refreshed - // #i90914# / 2008-07-02 / frank.schoenheit@sun.com + // #i90914# ::comphelper::IndexAccessIterator aIter( m_xLoadableForm ); Reference< XInterface > xElement( aIter.Next() ); while ( xElement.is() ) @@ -648,7 +650,6 @@ namespace frm case FormFeature::MoveToInsertRow: // move to the last row before moving to the insert row - // 21.01.2002 - 96480 - fs@openoffice.org m_xCursor->last(); m_xUpdateCursor->moveToInsertRow(); break; @@ -742,7 +743,7 @@ namespace frm return; } - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; MethodGuard aGuard( *this ); // at the moment we have only one feature which supports execution parameters @@ -982,7 +983,7 @@ namespace frm } catch( Exception& ) { - OSL_ENSURE( sal_False, "FormOperations::propertyChange: caught an exception while updating the parser!" ); + OSL_FAIL( "FormOperations::propertyChange: caught an exception while updating the parser!" ); } impl_invalidateAllSupportedFeatures_nothrow( aGuard ); } @@ -1123,7 +1124,7 @@ namespace frm FormFeature::SaveRecordChanges, FormFeature::UndoRecordChanges }; - size_t nFeatureCount = sizeof( pModifyDependentFeatures ) / sizeof( pModifyDependentFeatures[ 0 ] ); + size_t nFeatureCount = SAL_N_ELEMENTS( pModifyDependentFeatures ); s_aModifyDependentFeatures = Sequence< sal_Int16 >( pModifyDependentFeatures, nFeatureCount ); } @@ -1180,7 +1181,7 @@ namespace frm } catch( const Exception& ) { - OSL_ENSURE( sal_False, "FormOperations::impl_ensureInitializedParser_nothrow: caught an exception!" ); + OSL_FAIL( "FormOperations::impl_ensureInitializedParser_nothrow: caught an exception!" ); } m_bInitializedParser = true; @@ -1209,7 +1210,7 @@ namespace frm } catch( const Exception& ) { - OSL_ENSURE( sal_False, "FormOperations::impl_disposeParser_nothrow: caught an exception!" ); + OSL_FAIL( "FormOperations::impl_disposeParser_nothrow: caught an exception!" ); } } @@ -1517,7 +1518,7 @@ namespace frm } catch( const Exception& ) { - OSL_ENSURE( sal_False, "FormOperations::impl_executeAutoSort_throw: caught an exception while setting the parser properties!" ); + OSL_FAIL( "FormOperations::impl_executeAutoSort_throw: caught an exception while setting the parser properties!" ); } @@ -1531,7 +1532,7 @@ namespace frm } catch( const Exception& ) { - OSL_ENSURE( sal_False, "FormOperations::impl_executeAutoSort_throw: could not reset the form to it's original state!" ); + OSL_FAIL( "FormOperations::impl_executeAutoSort_throw: could not reset the form to it's original state!" ); } } @@ -1590,7 +1591,7 @@ namespace frm } catch( const Exception& ) { - OSL_ENSURE( sal_False, "FormOperations::impl_executeAutoFilter_throw: caught an exception while setting the parser properties!" ); + OSL_FAIL( "FormOperations::impl_executeAutoFilter_throw: caught an exception while setting the parser properties!" ); } @@ -1605,7 +1606,7 @@ namespace frm } catch( const Exception& ) { - OSL_ENSURE( sal_False, "FormOperations::impl_executeAutoFilter_throw: could not reset the form to it's original state!" ); + OSL_FAIL( "FormOperations::impl_executeAutoFilter_throw: could not reset the form to it's original state!" ); } } @@ -1737,3 +1738,5 @@ namespace frm //........................................................................ } // namespace frm //........................................................................ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/runtime/formoperations.hxx b/forms/source/runtime/formoperations.hxx index 374df8c2165c..3699a2474f72 100644 --- a/forms/source/runtime/formoperations.hxx +++ b/forms/source/runtime/formoperations.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -377,3 +378,5 @@ namespace frm //........................................................................ #endif // FORMS_FORMOPERATIONS_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/solar/component/navbarcontrol.cxx b/forms/source/solar/component/navbarcontrol.cxx index 622df5783715..f0e552d79fba 100644 --- a/forms/source/solar/component/navbarcontrol.cxx +++ b/forms/source/solar/component/navbarcontrol.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -164,7 +165,7 @@ namespace frm //------------------------------------------------------------------ void SAL_CALL ONavigationBarControl::createPeer( const Reference< XToolkit >& /*_rToolkit*/, const Reference< XWindowPeer >& _rParentPeer ) throw( RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if (!getPeer().is()) { @@ -335,7 +336,7 @@ namespace frm //------------------------------------------------------------------ void SAL_CALL ONavigationBarPeer::setProperty( const ::rtl::OUString& _rPropertyName, const Any& _rValue ) throw( RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; NavigationToolBar* pNavBar = static_cast< NavigationToolBar* >( GetWindow() ); if ( !pNavBar ) @@ -416,7 +417,7 @@ namespace frm //------------------------------------------------------------------ Any SAL_CALL ONavigationBarPeer::getProperty( const ::rtl::OUString& _rPropertyName ) throw( RuntimeException ) { - ::vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; Any aReturn; NavigationToolBar* pNavBar = static_cast< NavigationToolBar* >( GetWindow() ); @@ -562,3 +563,5 @@ namespace frm //......................................................................... } // namespace frm //......................................................................... + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/solar/component/navbarcontrol.hxx b/forms/source/solar/component/navbarcontrol.hxx index 877aa55aaba2..33becc6476de 100644 --- a/forms/source/solar/component/navbarcontrol.hxx +++ b/forms/source/solar/component/navbarcontrol.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -156,3 +157,5 @@ namespace frm //......................................................................... #endif // FORMS_NAVBARCONTROL_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx index a24d07e28ba5..5112bb442ab7 100644 --- a/forms/source/solar/control/navtoolbar.cxx +++ b/forms/source/solar/control/navtoolbar.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -42,6 +43,7 @@ #include <vcl/fixed.hxx> #include <memory> +#include <sal/macros.h> #define LID_RECORD_LABEL 1000 #define LID_RECORD_FILLER 1001 @@ -100,7 +102,7 @@ namespace frm if ( pAsciiCommandName != NULL ) return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:" ) ) + ::rtl::OUString::createFromAscii( pAsciiCommandName ); - OSL_ENSURE( false, "lcl_getCommandURL: unknown FormFeature!" ); + OSL_FAIL( "lcl_getCommandURL: unknown FormFeature!" ); return ::rtl::OUString(); } } @@ -294,7 +296,7 @@ namespace frm { FormFeature::RemoveFilterAndSort, false, false }, }; - size_t nSupportedFeatures = sizeof( aSupportedFeatures ) / sizeof( aSupportedFeatures[0] ); + size_t nSupportedFeatures = SAL_N_ELEMENTS( aSupportedFeatures ); FeatureDescription* pSupportedFeatures = aSupportedFeatures; FeatureDescription* pSupportedFeaturesEnd = aSupportedFeatures + nSupportedFeatures; for ( ; pSupportedFeatures < pSupportedFeaturesEnd; ++pSupportedFeatures ) @@ -367,8 +369,6 @@ namespace frm if ( !m_pImageProvider ) return; - const bool bIsHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); - const sal_uInt16 nItemCount = m_pToolbar->GetItemCount(); // collect the FormFeatures in the toolbar @@ -394,7 +394,7 @@ namespace frm } // retrieve the images for the command URLs - CommandImages aCommandImages = m_pImageProvider->getCommandImages( aCommandURLs, m_eImageSize == eLarge, bIsHighContrast ); + CommandImages aCommandImages = m_pImageProvider->getCommandImages( aCommandURLs, m_eImageSize == eLarge ); // and set them at the toolbar CommandImages::const_iterator commandImage = aCommandImages.begin(); @@ -466,7 +466,7 @@ namespace frm } break; default: - OSL_ENSURE( sal_False, "NavigationToolBar::ShowFunctionGroup: invalid group id!" ); + OSL_FAIL( "NavigationToolBar::ShowFunctionGroup: invalid group id!" ); } if ( pGroupIds ) @@ -485,7 +485,7 @@ namespace frm case eRecordActions : nIndicatorItem = FormFeature::SaveRecordChanges; break; case eFilterSort : nIndicatorItem = FormFeature::SortAscending; break; default: - OSL_ENSURE( sal_False, "NavigationToolBar::IsFunctionGroupVisible: invalid group id!" ); + OSL_FAIL( "NavigationToolBar::IsFunctionGroupVisible: invalid group id!" ); } return m_pToolbar->IsItemVisible( nIndicatorItem ); @@ -545,9 +545,6 @@ namespace frm m_pToolbar->SetControlBackground(); forEachItemWindow( &NavigationToolBar::setItemBackground, NULL ); - // the contrast of the background color may have changed, so force - // the images to be rebuild (high contrast requires a possibly different - // image set) implUpdateImages(); } @@ -558,9 +555,6 @@ namespace frm m_pToolbar->SetControlBackground( _rColor ); forEachItemWindow( &NavigationToolBar::setItemBackground, &_rColor ); - // the contrast of the background color may have changed, so force - // the images to be rebuild (high contrast requires a possibly different - // image set) implUpdateImages(); } @@ -734,3 +728,5 @@ namespace frm //......................................................................... } // namespace frm //......................................................................... + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/solar/inc/navtoolbar.hxx b/forms/source/solar/inc/navtoolbar.hxx index a6147a60b0e4..0cc1a1c2cfd7 100644 --- a/forms/source/solar/inc/navtoolbar.hxx +++ b/forms/source/solar/inc/navtoolbar.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -192,3 +193,5 @@ namespace frm //......................................................................... #endif // FORMS_SOLAR_CONTROL_NAVTOOLBAR_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/NameContainer.hxx b/forms/source/xforms/NameContainer.hxx index 3cab033f605e..b4481a5434d8 100644 --- a/forms/source/xforms/NameContainer.hxx +++ b/forms/source/xforms/NameContainer.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -219,3 +220,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/binding.cxx b/forms/source/xforms/binding.cxx index 3df2385796f0..7389eabb4409 100644 --- a/forms/source/xforms/binding.cxx +++ b/forms/source/xforms/binding.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -579,7 +580,7 @@ void lcl_removeListenerFromNode( Reference<XNode> xNode, sal_Int32 nCount = 0; // count nodes for context position for( PathExpression::NodeVector_t::iterator aIter = aNodes.begin(); aIter != aNodes.end(); - aIter++, nCount++ ) + ++aIter, ++nCount ) { OSL_ENSURE( aIter->is(), "no node?" ); @@ -633,13 +634,13 @@ void Binding::bind( bool bForceRebind ) { for( XNodes_t::iterator aIter = maEventNodes.begin(); aIter != maEventNodes.end(); - aIter ++ ) + ++aIter ) lcl_removeListenerFromNode( *aIter, this ); maEventNodes.clear(); if( isSimpleBinding() ) for( PathExpression::NodeVector_t::iterator aIter = aNodes.begin(); aIter != aNodes.end(); - aIter++ ) + ++aIter ) maEventNodes.push_back( *aIter ); else maEventNodes.push_back( @@ -647,7 +648,7 @@ void Binding::bind( bool bForceRebind ) UNO_QUERY_THROW ) ); for( PathExpression::NodeVector_t::iterator aIter2 = maEventNodes.begin(); aIter2 != maEventNodes.end(); - aIter2 ++ ) + ++aIter2 ) lcl_addListenerToNode( *aIter2, this ); } @@ -871,7 +872,7 @@ void Binding::clear() // remove all references for( XNodes_t::iterator aIter = maEventNodes.begin(); aIter != maEventNodes.end(); - aIter ++ ) + ++aIter ) lcl_removeListenerFromNode( *aIter, this ); maEventNodes.clear(); @@ -1407,3 +1408,5 @@ void SAL_CALL Binding::setName( const rtl::OUString& rName ) // property listeners setFastPropertyValue( HANDLE_BindingID, makeAny( rName ) ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/binding.hxx b/forms/source/xforms/binding.hxx index 7a69b1547418..ba538441df91 100644 --- a/forms/source/xforms/binding.hxx +++ b/forms/source/xforms/binding.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -525,3 +526,5 @@ public: } // namespace xforms #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/boolexpression.cxx b/forms/source/xforms/boolexpression.cxx index c8d7572b5f56..9abf5590f70d 100644 --- a/forms/source/xforms/boolexpression.cxx +++ b/forms/source/xforms/boolexpression.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -57,3 +58,4 @@ void BoolExpression::setExpression( const rtl::OUString& rExpression ) } // namespace xforms +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/boolexpression.hxx b/forms/source/xforms/boolexpression.hxx index 2c34a98b4fed..8da5d58ad3c0 100644 --- a/forms/source/xforms/boolexpression.hxx +++ b/forms/source/xforms/boolexpression.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -53,3 +54,5 @@ public: } // namespace xforms #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/collection.hxx b/forms/source/xforms/collection.hxx index 2c083a969306..0ba804c8e608 100644 --- a/forms/source/xforms/collection.hxx +++ b/forms/source/xforms/collection.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -335,3 +336,5 @@ protected: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/computedexpression.cxx b/forms/source/xforms/computedexpression.cxx index 540cfd2f6d5b..4739924b8d53 100644 --- a/forms/source/xforms/computedexpression.cxx +++ b/forms/source/xforms/computedexpression.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -183,7 +184,7 @@ void ComputedExpression::clear() mxResult.clear(); } -Reference<XXPathObject> ComputedExpression::getXPath() +Reference<XXPathObject> ComputedExpression::getXPath() const { return mxResult; } @@ -244,3 +245,5 @@ Reference<XXPathAPI> ComputedExpression::_getXPathAPI(const xforms::EvaluationCo } // namespace xforms + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/computedexpression.hxx b/forms/source/xforms/computedexpression.hxx index 6a1581cc8d0b..528bda5e457f 100644 --- a/forms/source/xforms/computedexpression.hxx +++ b/forms/source/xforms/computedexpression.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -127,7 +128,7 @@ public: // get the result of this expression as string/bool/... // (Results will be based on the last call of evaluate(..). The caller // must call evaluate to ensure current results.) - com::sun::star::uno::Reference<com::sun::star::xml::xpath::XXPathObject> getXPath(); + com::sun::star::uno::Reference<com::sun::star::xml::xpath::XXPathObject> getXPath() const; bool getBool( bool bDefault = false ) const; rtl::OUString getString( const rtl::OUString& rDefault = rtl::OUString() ) const; @@ -136,3 +137,5 @@ public: } // namespace xforms #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/convert.cxx b/forms/source/xforms/convert.cxx index 7ea6e35a5284..f0db80bdaacc 100644 --- a/forms/source/xforms/convert.cxx +++ b/forms/source/xforms/convert.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,6 +35,7 @@ #include <memory> #include <algorithm> #include <functional> +#include <o3tl/compat_functional.hxx> #include <rtl/math.hxx> #include <rtl/ustrbuf.hxx> #include <tools/date.hxx> @@ -50,6 +52,7 @@ using com::sun::star::uno::Any; using com::sun::star::uno::makeAny; using com::sun::star::util::Time; using namespace std; +using namespace o3tl; typedef com::sun::star::util::Date UNODate; typedef com::sun::star::util::Time UNOTime; @@ -538,7 +541,7 @@ Convert::Types_t Convert::getTypes() { Types_t aTypes( maMap.size() ); transform( maMap.begin(), maMap.end(), aTypes.getArray(), - select1st<Map_t::value_type>() ); + o3tl::select1st<Map_t::value_type>() ); return aTypes; } @@ -562,7 +565,7 @@ Convert::Any_t Convert::toAny( const rtl::OUString& rValue, switch( _nWhitespaceTreatment ) { default: - OSL_ENSURE( sal_False, "Convert::convertWhitespace: invalid whitespace treatment constant!" ); + OSL_FAIL( "Convert::convertWhitespace: invalid whitespace treatment constant!" ); // NO break case com::sun::star::xsd::WhiteSpaceTreatment::Preserve: sConverted = _rString; @@ -625,3 +628,5 @@ Convert::Any_t Convert::toAny( const rtl::OUString& rValue, aBuffer.setLength( aBuffer.getLength() - 1 ); return aBuffer.makeStringAndClear(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/convert.hxx b/forms/source/xforms/convert.hxx index 750399879ee0..c2cdaef6c558 100644 --- a/forms/source/xforms/convert.hxx +++ b/forms/source/xforms/convert.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -98,7 +99,7 @@ public: sal_Int16 _nWhitespaceTreatment ); - /** replace all occurences 0x08, 0x0A, 0x0D with 0x20 + /** replace all occurrences 0x08, 0x0A, 0x0D with 0x20 */ static ::rtl::OUString replaceWhitespace( const ::rtl::OUString& _rString ); @@ -111,3 +112,5 @@ public: } // namespace xforms #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/datatyperepository.cxx b/forms/source/xforms/datatyperepository.cxx index 8a9a4847af62..593c486b1795 100644 --- a/forms/source/xforms/datatyperepository.cxx +++ b/forms/source/xforms/datatyperepository.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,18 +29,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_forms.hxx" -#ifndef FORMS_SOURCE_XFORMS_DATATYPEREPOSITORY_HXX #include "datatyperepository.hxx" -#endif #include "datatypes.hxx" -#ifndef _FRM_RESOURCE_HRC_ #include "frm_resource.hrc" -#endif #include "frm_resource.hxx" #include "frm_strings.hxx" -#ifndef _FRM_PROPERTY_HRC_ #include "property.hrc" -#endif /** === begin UNO includes === **/ /** === end UNO includes === **/ @@ -48,6 +43,7 @@ #include <functional> #include <algorithm> +#include <o3tl/compat_functional.hxx> //........................................................................ namespace xforms @@ -210,7 +206,7 @@ namespace xforms m_aRepository.begin(), m_aRepository.end(), aNames.getArray(), - ::std::select1st< Repository::value_type >() + ::o3tl::select1st< Repository::value_type >() ); return aNames; } @@ -296,3 +292,4 @@ namespace xforms } // namespace xforms //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/datatyperepository.hxx b/forms/source/xforms/datatyperepository.hxx index f680079ebf4b..e2f61cdaaf35 100644 --- a/forms/source/xforms/datatyperepository.hxx +++ b/forms/source/xforms/datatyperepository.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -96,3 +97,4 @@ namespace xforms #endif // OFFAPI_COM_SUN_STAR_XFORMS_DATATYPEREPOSITORY_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/datatypes.cxx b/forms/source/xforms/datatypes.cxx index 212b5f721e67..c8c76c8d848f 100644 --- a/forms/source/xforms/datatypes.cxx +++ b/forms/source/xforms/datatypes.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,14 +30,10 @@ #include "precompiled_forms.hxx" #include "datatypes.hxx" #include "resourcehelper.hxx" -#ifndef _FRM_PROPERTY_HRC_ #include "property.hrc" -#endif #include "convert.hxx" -/** === begin UNO includes === **/ #include <com/sun/star/xsd/WhiteSpaceTreatment.hpp> -/** === end UNO includes === **/ #include <tools/debug.hxx> #include <tools/datetime.hxx> #include <rtl/math.hxx> @@ -506,7 +503,7 @@ namespace xforms break; default: - OSL_ENSURE( false, "OValueLimitedType::_explainInvalid: unknown reason!" ); + OSL_FAIL( "OValueLimitedType::_explainInvalid: unknown reason!" ); break; } @@ -993,3 +990,4 @@ namespace xforms } // namespace xforms //........................................................................ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/datatypes.hxx b/forms/source/xforms/datatypes.hxx index 50021f6db5b4..83ac51b551f4 100644 --- a/forms/source/xforms/datatypes.hxx +++ b/forms/source/xforms/datatypes.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -422,3 +423,4 @@ namespace xforms #endif // FORMS_SOURCE_XFORMS_DATATYPES_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/datatypes_impl.hxx b/forms/source/xforms/datatypes_impl.hxx index d0d0f9606b91..cc0b2c5b3b35 100644 --- a/forms/source/xforms/datatypes_impl.hxx +++ b/forms/source/xforms/datatypes_impl.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -74,3 +75,4 @@ OValueLimitedType< VALUE_TYPE >::OValueLimitedType( const ::rtl::OUString& _rNam { } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/enumeration.cxx b/forms/source/xforms/enumeration.cxx index 270ade4bc4bb..82a9118f7e66 100644 --- a/forms/source/xforms/enumeration.cxx +++ b/forms/source/xforms/enumeration.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -72,3 +73,5 @@ Any Enumeration::nextElement() return mxContainer->getByIndex( mnIndex++ ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/enumeration.hxx b/forms/source/xforms/enumeration.hxx index 8a9b89a09a15..395f29dd4845 100644 --- a/forms/source/xforms/enumeration.hxx +++ b/forms/source/xforms/enumeration.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -61,3 +62,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/evaluationcontext.hxx b/forms/source/xforms/evaluationcontext.hxx index 4affefd34f29..a5f8b32d5df3 100644 --- a/forms/source/xforms/evaluationcontext.hxx +++ b/forms/source/xforms/evaluationcontext.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -73,3 +74,5 @@ public: } // namespace xforms #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/mip.cxx b/forms/source/xforms/mip.cxx index 7f45ff5e9415..a8bcda632d34 100644 --- a/forms/source/xforms/mip.cxx +++ b/forms/source/xforms/mip.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -124,3 +125,5 @@ void MIP::resetTypeName() { msTypeName = rtl::OUString(); mbHasTypeName } // namespace xforms + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/mip.hxx b/forms/source/xforms/mip.hxx index fb8b219cf7e1..ad0db3e05916 100644 --- a/forms/source/xforms/mip.hxx +++ b/forms/source/xforms/mip.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -120,3 +121,5 @@ public: } // namespace xforms #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/model.cxx b/forms/source/xforms/model.cxx index 0d81c7056bec..e463a4b9e3ad 100644 --- a/forms/source/xforms/model.cxx +++ b/forms/source/xforms/model.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -58,7 +59,6 @@ #include <com/sun/star/xml/dom/NodeType.hpp> #include <com/sun/star/xml/dom/XDocumentBuilder.hpp> #include <com/sun/star/uno/Sequence.hxx> -#include <com/sun/star/ucb/XSimpleFileAccess.hpp> #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/ucb/XSimpleFileAccess.hpp> #include <com/sun/star/io/XInputStream.hpp> @@ -234,60 +234,12 @@ void Model::dbg_assertInvariant() const { OSL_ENSURE( mpInstances != NULL, "no instances found" ); OSL_ENSURE( mxInstances.is(), "No instance container!" ); - // OSL_ENSURE( mxInstances->hasElements(), "no instance!" ); OSL_ENSURE( mpBindings != NULL, "no bindings element" ); OSL_ENSURE( mxBindings.is(), "No Bindings container" ); OSL_ENSURE( mpSubmissions != NULL, "no submissions element" ); OSL_ENSURE( mxSubmissions.is(), "No Submission container" ); - - - - /* - // check bindings, and things that have to do with our binding - std::vector<MIP*> aAllMIPs; // check MIP map - sal_Int32 nCount = mpBindings->countItems(); - for( sal_Int32 i = 0; i < nCount; i++ ) - { - Binding* pBind = Binding::getBinding( - mpBindings->Collection<XPropertySet_t>::getItem( i ) ); - - // examine and check binding - OSL_ENSURE( pBind != NULL, "invalid binding found" ); - - OSL_ENSURE( Model::getModel( pBind->getModel() ) == this, - "our binding doesn't know us."); - // check this binding's MIP against MIP map - MIP* pMIP = const_cast<MIP*>( pBind->_getMIP() ); - sal_Int32 nFound = 0; - if( pMIP != NULL ) - { - aAllMIPs.push_back( pMIP ); - for( MIPs_t::const_iterator aIter = maMIPs.begin(); - aIter != maMIPs.end(); - aIter++ ) - { - if( pMIP == aIter->second ) - nFound++; - } - } - OSL_ENSURE( ( pMIP == NULL ) == ( nFound == 0 ), "MIP-map wrong" ); - } - - // check MIP map for left-over MIPs - for( MIPs_t::const_iterator aIter = maMIPs.begin(); - aIter != maMIPs.end(); - aIter++ ) - { - MIP* pMIP = aIter->second; - std::vector<MIP*>::iterator aFound = - std::find( aAllMIPs.begin(), aAllMIPs.end(), pMIP ); - if( aFound != aAllMIPs.end() ) - aAllMIPs.erase( aFound ); - } - OSL_ENSURE( aAllMIPs.empty(), "lonely MIPs found!" ); - */ } #endif @@ -325,8 +277,6 @@ void Model::removeMIPs( void* pTag ) MIP Model::queryMIP( const XNode_t& xNode ) const { - // OSL_ENSURE( xNode.is(), "no node" ); - // travel up inheritance chain and inherit MIPs MIP aRet; for( XNode_t xCurrent = xNode; @@ -337,7 +287,7 @@ MIP Model::queryMIP( const XNode_t& xNode ) const MIP aMIP; MIPs_t::const_iterator aEnd = maMIPs.upper_bound( xCurrent ); MIPs_t::const_iterator aIter = maMIPs.lower_bound( xCurrent ); - for( ; aIter != aEnd; aIter++ ) + for( ; aIter != aEnd; ++aIter ) aMIP.join( aIter->second.second ); // inherit from current node (or set if we are at the start node) @@ -435,7 +385,7 @@ bool Model::setSimpleContent( const XNode_t& xConstNode, default: { - OSL_ENSURE( false, "bound to unknown node type?" ); + OSL_FAIL( "bound to unknown node type?" ); } break; @@ -717,15 +667,6 @@ Model::XSet_t Model::getSubmissions() return mxSubmissions; } - - -// -// implementation of XFormsUIHelper1 interface -// can be found in file model_ui.cxx -// - - - // // implement XPropertySet & friends // @@ -778,31 +719,4 @@ Sequence<sal_Int8> Model::getImplementationId() return getUnoTunnelID(); } - -// -// 'shift' operators for getting data into and out of Anys -// - -void operator <<= ( com::sun::star::uno::Any& rAny, - xforms::Model* pModel) -{ - Reference<XPropertySet> xPropSet( static_cast<XPropertySet*>( pModel ) ); - rAny <<= xPropSet; -} - -bool operator >>= ( xforms::Model* pModel, - com::sun::star::uno::Any& rAny ) -{ - bool bRet = false; - - // acquire model pointer through XUnoTunnel - Reference<XUnoTunnel> xTunnel( rAny, UNO_QUERY ); - if( xTunnel.is() ) - { - pModel = reinterpret_cast<xforms::Model*>( - xTunnel->getSomething( xforms::Model::getUnoTunnelID() ) ); - bRet = true; - } - - return bRet; -} +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/model.hxx b/forms/source/xforms/model.hxx index be9a5134d1da..a237d7de14fd 100644 --- a/forms/source/xforms/model.hxx +++ b/forms/source/xforms/model.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -427,9 +428,7 @@ public: }; -// finally, allow 'shifting' of Model objects into/out of Any -void operator <<= ( com::sun::star::uno::Any&, const xforms::Model* ); -bool operator >>= ( xforms::Model*, const com::sun::star::uno::Any& ); - } // namespace #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/model_helper.hxx b/forms/source/xforms/model_helper.hxx index d67a83c8cdb1..064d60f3ab71 100644 --- a/forms/source/xforms/model_helper.hxx +++ b/forms/source/xforms/model_helper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -165,3 +166,5 @@ void setInstanceData( } // namespace xforms #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/model_ui.cxx b/forms/source/xforms/model_ui.cxx index a62ac1fa9ac9..1ed98a49a709 100644 --- a/forms/source/xforms/model_ui.cxx +++ b/forms/source/xforms/model_ui.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -138,7 +139,7 @@ void lcl_OutPosition( OUStringBuffer& rBuffer, { OSL_ENSURE( xNode->getParentNode().is(), "need parent" ); - // count # of occurences of this node + // count # of occurrences of this node sal_Int32 nFound = 0; sal_Int32 nPosition = -1; if( xNode->getParentNode().is() ) @@ -256,7 +257,7 @@ OUString Model::getDefaultBindingExpressionForNode( default: // unknown type? fail! - OSL_ENSURE( false, "unknown node type!" ); + OSL_FAIL( "unknown node type!" ); xCurrent.set( NULL ); aBuffer.makeStringAndClear(); // we'll remove the slash below @@ -331,7 +332,7 @@ OUString Model::getNodeDisplayName( const XNode_t& xNode, default: // unknown type? fail! - OSL_ENSURE( false, "unknown node type!" ); + OSL_FAIL( "unknown node type!" ); break; } @@ -354,7 +355,7 @@ OUString Model::getNodeName( const XNode_t& xNode ) case NodeType_DOCUMENT_NODE: default: // unknown type? fail! - OSL_ENSURE( false, "no name for this node type!" ); + OSL_FAIL( "no name for this node type!" ); break; } @@ -683,7 +684,7 @@ Model::XNode_t Model::renameNode( const XNode_t& xNode, } else { - OSL_ENSURE( false, "can't rename this node type" ); + OSL_FAIL( "can't rename this node type" ); } // adjust bindings (if necessary): @@ -953,7 +954,7 @@ OUString Model::getResultForExpression( pBinding->getMIPEvaluationContexts(); for( std::vector<EvaluationContext>::iterator aIter = aContext.begin(); aIter != aContext.end(); - aIter ++ ) + ++aIter ) { aExpression.evaluate( *aIter ); aBuffer.append( lcl_serializeForDisplay(aExpression.getXPath()) ); @@ -1064,3 +1065,5 @@ void xforms::setInstanceData( PROP(URLOnce); #undef PROP } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/namedcollection.hxx b/forms/source/xforms/namedcollection.hxx index ffae93ed2c90..2b06343c4a40 100644 --- a/forms/source/xforms/namedcollection.hxx +++ b/forms/source/xforms/namedcollection.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -140,3 +141,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/pathexpression.cxx b/forms/source/xforms/pathexpression.cxx index ef82e87c4d18..6494059f56bb 100644 --- a/forms/source/xforms/pathexpression.cxx +++ b/forms/source/xforms/pathexpression.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -152,3 +153,5 @@ Reference<XNodeList> PathExpression::getXNodeList() const } // namespace xforms + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/pathexpression.hxx b/forms/source/xforms/pathexpression.hxx index 00f11b56d435..a6d89186e9ff 100644 --- a/forms/source/xforms/pathexpression.hxx +++ b/forms/source/xforms/pathexpression.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -89,3 +90,5 @@ public: } // namespace xforms #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/propertysetbase.cxx b/forms/source/xforms/propertysetbase.cxx index 131b2aa447b0..e12571a4f2fb 100644 --- a/forms/source/xforms/propertysetbase.cxx +++ b/forms/source/xforms/propertysetbase.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -79,7 +80,7 @@ cppu::IPropertyArrayHelper& SAL_CALL PropertySetBase::getInfoHelper() { if ( !m_pProperties ) { - DBG_ASSERT( !m_aProperties.empty(), "PropertySetBase::getInfoHelper: no registered properties!" ); + OSL_ENSURE( !m_aProperties.empty(), "PropertySetBase::getInfoHelper: no registered properties!" ); m_pProperties = new cppu::OPropertyArrayHelper( &m_aProperties[0], m_aProperties.size(), sal_False ); } return *m_pProperties; @@ -93,10 +94,10 @@ Reference< XPropertySetInfo > SAL_CALL PropertySetBase::getPropertySetInfo( ) t void PropertySetBase::registerProperty( const Property& rProperty, const ::rtl::Reference< PropertyAccessorBase >& rAccessor ) { - DBG_ASSERT( rAccessor.get(), "PropertySetBase::registerProperty: invalid property accessor, this will crash!" ); + OSL_ENSURE( rAccessor.get(), "PropertySetBase::registerProperty: invalid property accessor, this will crash!" ); m_aAccessors.insert( PropertyAccessors::value_type( rProperty.Handle, rAccessor ) ); - DBG_ASSERT( ( rAccessor->isWriteable() == true ) + OSL_ENSURE( ( rAccessor->isWriteable() == true ) == ( ( rProperty.Attributes & com::sun::star::beans::PropertyAttribute::READONLY ) == 0 ), "PropertySetBase::registerProperty: inconsistence!" ); @@ -124,7 +125,7 @@ void PropertySetBase::notifyAndCachePropertyValue( sal_Int32 nHandle ) } catch( Exception& ) { - DBG_ERROR( "PropertySetBase::notifyAndCachePropertyValue: this is not expected to fail!" ); + OSL_FAIL( "PropertySetBase::notifyAndCachePropertyValue: this is not expected to fail!" ); } } Any aOldValue = aPos->second; @@ -148,13 +149,13 @@ void PropertySetBase::initializePropertyValueCache( sal_Int32 nHandle ) ::std::pair< PropertyValueCache::iterator, bool > aInsertResult = #endif m_aCache.insert( PropertyValueCache::value_type( nHandle, aCurrentValue ) ); - DBG_ASSERT( aInsertResult.second, "PropertySetBase::initializePropertyValueCache: already cached a value for this property!" ); + OSL_ENSURE( aInsertResult.second, "PropertySetBase::initializePropertyValueCache: already cached a value for this property!" ); } PropertyAccessorBase& PropertySetBase::locatePropertyHandler( sal_Int32 nHandle ) const { PropertyAccessors::const_iterator aPropertyPos = m_aAccessors.find( nHandle ); - DBG_ASSERT( aPropertyPos != m_aAccessors.end() && aPropertyPos->second.get(), + OSL_ENSURE( aPropertyPos != m_aAccessors.end() && aPropertyPos->second.get(), "PropertySetBase::locatePropertyHandler: accessor map is corrupted!" ); // neither should this be called for handles where there is no accessor, nor should a // NULL accssor be in the map @@ -190,3 +191,5 @@ void SAL_CALL PropertySetBase::getFastPropertyValue( Any& rValue, sal_Int32 nHan PropertyAccessorBase& rAccessor = locatePropertyHandler( nHandle ); rAccessor.getValue( rValue ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/propertysetbase.hxx b/forms/source/xforms/propertysetbase.hxx index 9e11efe1ebb7..27556b1381f8 100644 --- a/forms/source/xforms/propertysetbase.hxx +++ b/forms/source/xforms/propertysetbase.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -369,3 +370,5 @@ public: #define PROPERTY_RO( NAME, TYPE ) PROPERTY_FLAGS( NAME, TYPE, com::sun::star::beans::PropertyAttribute::BOUND | com::sun::star::beans::PropertyAttribute::READONLY ) #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/resourcehelper.cxx b/forms/source/xforms/resourcehelper.cxx index 138c64851dce..1fec9f3502d0 100644 --- a/forms/source/xforms/resourcehelper.cxx +++ b/forms/source/xforms/resourcehelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -77,3 +78,5 @@ OUString getResource( sal_uInt16 nResourceId, } } // namespace xforms + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/resourcehelper.hxx b/forms/source/xforms/resourcehelper.hxx index a312c5749c50..0b429cd0eeb7 100644 --- a/forms/source/xforms/resourcehelper.hxx +++ b/forms/source/xforms/resourcehelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -50,3 +51,5 @@ namespace xforms } // namespace #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/submission.cxx b/forms/source/xforms/submission.cxx index b61ad498933e..1e6b22f42bf6 100644 --- a/forms/source/xforms/submission.cxx +++ b/forms/source/xforms/submission.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -335,7 +336,7 @@ bool Submission::doSubmit( const Reference< XInteractionHandler >& xHandler ) new CSubmissionGet( getAction(), aFragment)); else { - OSL_ENSURE(sal_False, "Unsupported xforms submission method"); + OSL_FAIL("Unsupported xforms submission method"); return false; } @@ -569,7 +570,7 @@ void SAL_CALL Submission::submitWithInteraction( } catch( const VetoException& ) { - OSL_ENSURE( sal_False, "Model::submit: Hmm. How can a single submission have a veto right?" ); + OSL_FAIL( "Model::submit: Hmm. How can a single submission have a veto right?" ); // allowed to leave throw; } @@ -664,7 +665,7 @@ Reference< XDocumentFragment > Submission::createSubmissionDocument(const Refere { using namespace com::sun::star::xml::xpath; Reference< XDocumentBuilder > aDocBuilder(m_aFactory->createInstance( - OUString::createFromAscii("com.sun.star.xml.dom.DocumentBuilder")), UNO_QUERY); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.dom.DocumentBuilder"))), UNO_QUERY); Reference< XDocument > aDocument = aDocBuilder->newDocument(); Reference< XDocumentFragment > aFragment = aDocument->createDocumentFragment(); @@ -717,3 +718,4 @@ void SAL_CALL Submission::removeVetoableChangeListener( const ::rtl::OUString& P PropertySetBase::removeVetoableChangeListener( PropertyName, aListener ); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/submission.hxx b/forms/source/xforms/submission.hxx index 36a687a3d5e5..b0c377844cb1 100644 --- a/forms/source/xforms/submission.hxx +++ b/forms/source/xforms/submission.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -274,3 +275,5 @@ public: } // namespace xforms #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/submission/replace.cxx b/forms/source/xforms/submission/replace.cxx index fa8ca6f383b5..9ac1f08eb5ff 100644 --- a/forms/source/xforms/submission/replace.cxx +++ b/forms/source/xforms/submission/replace.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -66,19 +67,18 @@ CSubmission::SubmissionResult CSubmission::replace(const ::rtl::OUString& aRepla if (!xLoader.is()) xLoader = Reference< XComponentLoader >(xFactory->createInstance( - ::rtl::OUString::createFromAscii("com.sun.star.frame.Desktop")), UNO_QUERY_THROW); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop") ) ), UNO_QUERY_THROW); // open the stream from the result... // build media descriptor Sequence< PropertyValue > descriptor(2); - descriptor[0] = PropertyValue(::rtl::OUString::createFromAscii( - "InputStream"), -1, makeAny(m_aResultStream), PropertyState_DIRECT_VALUE); - descriptor[1] = PropertyValue(::rtl::OUString::createFromAscii( - "ReadOnly"), -1, makeAny(sal_True), PropertyState_DIRECT_VALUE); + descriptor[0] = PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InputStream") ), + -1, makeAny(m_aResultStream), PropertyState_DIRECT_VALUE); + descriptor[1] = PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly") ), + -1, makeAny(sal_True), PropertyState_DIRECT_VALUE); - //::rtl::OUString aURL = ::rtl::OUString::createFromAscii("private:stream"); ::rtl::OUString aURL = m_aURLObj.GetMainURL(INetURLObject::NO_DECODE); - ::rtl::OUString aTarget = ::rtl::OUString::createFromAscii("_default"); + ::rtl::OUString aTarget = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_default") ); xLoader->loadComponentFromURL(aURL, aTarget, FrameSearchFlag::ALL, descriptor); return CSubmission::SUCCESS; @@ -87,7 +87,7 @@ CSubmission::SubmissionResult CSubmission::replace(const ::rtl::OUString& aRepla if (aDocument.is()) { // parse the result stream into a new document Reference< XDocumentBuilder > xBuilder(xFactory->createInstance( - ::rtl::OUString::createFromAscii("com.sun.star.xml.dom.DocumentBuilder")), UNO_QUERY_THROW); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.dom.DocumentBuilder") ) ), UNO_QUERY_THROW); Reference< XDocument > aNewDocument = xBuilder->parse(m_aResultStream); if (aNewDocument.is()) { @@ -95,7 +95,6 @@ CSubmission::SubmissionResult CSubmission::replace(const ::rtl::OUString& aRepla Reference< XElement > oldRoot = aDocument->getDocumentElement(); Reference< XElement > newRoot = aNewDocument->getDocumentElement(); - // aDocument->removeChild(Reference< XNode >(oldRoot, UNO_QUERY_THROW)); Reference< XNode > aImportedNode = aDocument->importNode(Reference< XNode >(newRoot, UNO_QUERY_THROW), sal_True); Reference< XNode >(aDocument, UNO_QUERY_THROW)->replaceChild(aImportedNode, Reference< XNode >(oldRoot, UNO_QUERY_THROW)); return CSubmission::SUCCESS; @@ -113,7 +112,7 @@ CSubmission::SubmissionResult CSubmission::replace(const ::rtl::OUString& aRepla } catch (Exception& e) { ::rtl::OString aMsg("Exception during replace:\n"); aMsg += OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8); - OSL_ENSURE(sal_False, aMsg.getStr()); + OSL_FAIL(aMsg.getStr()); } return CSubmission::UNKNOWN_ERROR; } @@ -130,7 +129,7 @@ CSubmission::SubmissionResult CSubmission::replace(const ::rtl::OUString& aRepla pHelper->m_aInteractionHandler = _xHandler; else pHelper->m_aInteractionHandler = CSS::uno::Reference< XInteractionHandler >(m_aFactory->createInstance( - ::rtl::OUString::createFromAscii("com.sun.star.task.InteractionHandler")), UNO_QUERY); + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.InteractionHandler") ) ), UNO_QUERY); OSL_ENSURE(pHelper->m_aInteractionHandler.is(), "failed to create IntreractionHandler"); CProgressHandlerHelper *pProgressHelper = new CProgressHandlerHelper; @@ -143,3 +142,4 @@ CSubmission::SubmissionResult CSubmission::replace(const ::rtl::OUString& aRepla +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/submission/serialization.hxx b/forms/source/xforms/submission/serialization.hxx index a3e369bc19b2..966a3f9e0ae8 100644 --- a/forms/source/xforms/submission/serialization.hxx +++ b/forms/source/xforms/submission/serialization.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -96,3 +97,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/submission/serialization_app_xml.cxx b/forms/source/xforms/submission/serialization_app_xml.cxx index 85cf066d6343..b9e06d29f3a5 100644 --- a/forms/source/xforms/submission/serialization_app_xml.cxx +++ b/forms/source/xforms/submission/serialization_app_xml.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -44,7 +45,7 @@ CSerializationAppXML::CSerializationAppXML() : m_aFactory(utl::getProcessServiceFactory()) , m_aPipe(CSS::uno::Reference< CSS::io::XOutputStream > (m_aFactory->createInstance( - rtl::OUString::createFromAscii("com.sun.star.io.Pipe")), CSS::uno::UNO_QUERY)) + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.Pipe") ) ), CSS::uno::UNO_QUERY)) { OSL_ENSURE(m_aPipe.is(), "cannot create Pipe"); } @@ -90,22 +91,11 @@ CSerializationAppXML::serialize_node(const CSS::uno::Reference< CSS::xml::dom::X } else { // can't get tunnel to native backend // logic for generic implementation could be implemented here... - OSL_ENSURE(sal_False, "unkown dom implementation, cannot serialize"); + OSL_FAIL("unkown dom implementation, cannot serialize"); return; } } -/* -void -CSerializationAppXML::serialize_nodeset() -{ - CSS::uno::Reference< CSS::xml::dom::XNodeList > aNodeList = m_aXPathObject->getNodeList(); - for (sal_Int32 i=0; i<aNodeList->getLength(); i++) - serialize_node(aNodeList->item(i)); - m_aPipe->closeOutput(); -} -*/ - void CSerializationAppXML::serialize() { @@ -119,3 +109,5 @@ CSerializationAppXML::serialize() } m_aPipe->closeOutput(); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/submission/serialization_app_xml.hxx b/forms/source/xforms/submission/serialization_app_xml.hxx index 338df6aea083..9564961bbbc9 100644 --- a/forms/source/xforms/submission/serialization_app_xml.hxx +++ b/forms/source/xforms/submission/serialization_app_xml.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -53,3 +54,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/submission/serialization_urlencoded.cxx b/forms/source/xforms/submission/serialization_urlencoded.cxx index 307d9d90aed7..b0f498ff1b96 100644 --- a/forms/source/xforms/submission/serialization_urlencoded.cxx +++ b/forms/source/xforms/submission/serialization_urlencoded.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -51,7 +52,7 @@ using namespace CSS::xml::dom; CSerializationURLEncoded::CSerializationURLEncoded() : m_aFactory(getProcessServiceFactory()) , m_aPipe(Reference< XOutputStream > (m_aFactory->createInstance( - ::rtl::OUString::createFromAscii("com.sun.star.io.Pipe")), UNO_QUERY)) + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.Pipe") ) ), UNO_QUERY)) { } @@ -169,23 +170,7 @@ void CSerializationURLEncoded::serialize_node(const Reference< XNode >& aNode) if (aChild.is() && aChild->getNodeType() == NodeType_ELEMENT_NODE) serialize_node(aChild); } - - // siblings... -// Reference< XNode > aSibling = aNode->getNextSibling(); -// if (aSibling.is()) -// serialize_node(aSibling); - -} - -/* -void CSerializationURLEncoded::serialize_nodeset() -{ - Reference< XNodeList > aNodeList = m_aXPathObject->getNodeList(); - for (sal_Int32 i=0; i<aNodeList->getLength(); i++) - serialize_node(aNodeList->item(i)); - m_aPipe->closeOutput(); } -*/ void CSerializationURLEncoded::serialize() { @@ -208,3 +193,4 @@ Reference< XInputStream > CSerializationURLEncoded::getInputStream() } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/submission/serialization_urlencoded.hxx b/forms/source/xforms/submission/serialization_urlencoded.hxx index a3c41e7e4d5c..a5e9a4eb1060 100644 --- a/forms/source/xforms/submission/serialization_urlencoded.hxx +++ b/forms/source/xforms/submission/serialization_urlencoded.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -54,3 +55,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/submission/submission.hxx b/forms/source/xforms/submission/submission.hxx index 53e37b4cd131..d01fb8fb0aba 100644 --- a/forms/source/xforms/submission/submission.hxx +++ b/forms/source/xforms/submission/submission.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -158,3 +159,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/submission/submission_get.cxx b/forms/source/xforms/submission/submission_get.cxx index 57adeda664c7..e4b99f675af5 100644 --- a/forms/source/xforms/submission/submission_get.cxx +++ b/forms/source/xforms/submission/submission_get.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -44,11 +45,14 @@ using namespace CSS::uno; using namespace CSS::ucb; using namespace CSS::task; using namespace CSS::io; -using namespace rtl; using namespace osl; using namespace ucbhelper; using namespace std; +using ::rtl::OUString; +using ::rtl::OStringToOUString; +using ::rtl::OStringBuffer; + CSubmissionGet::CSubmissionGet(const rtl::OUString& aURL, const CSS::uno::Reference< CSS::xml::dom::XDocumentFragment >& aFragment) : CSubmission(aURL, aFragment) @@ -70,7 +74,7 @@ CSubmission::SubmissionResult CSubmissionGet::submit(const CSS::uno::Reference< pHelper->m_aInteractionHandler = aInteractionHandler; else pHelper->m_aInteractionHandler = CSS::uno::Reference< XInteractionHandler >(m_aFactory->createInstance( - OUString::createFromAscii("com.sun.star.task.InteractionHandler")), UNO_QUERY); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.InteractionHandler"))), UNO_QUERY); OSL_ENSURE(pHelper->m_aInteractionHandler.is(), "failed to create IntreractionHandler"); CProgressHandlerHelper *pProgressHelper = new CProgressHandlerHelper; pHelper->m_aProgressHandler = CSS::uno::Reference< XProgressHandler >(pProgressHelper); @@ -97,21 +101,22 @@ CSubmission::SubmissionResult CSubmissionGet::submit(const CSS::uno::Reference< OUString aQueryURL = OStringToOUString(aUTF8QueryURL.makeStringAndClear(), RTL_TEXTENCODING_UTF8); ucbhelper::Content aContent(aQueryURL, aEnvironment); CSS::uno::Reference< XOutputStream > aPipe(m_aFactory->createInstance( - OUString::createFromAscii("com.sun.star.io.Pipe")), UNO_QUERY_THROW); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.Pipe"))), UNO_QUERY_THROW); aContent.openStream(aPipe); // get reply try { m_aResultStream = aContent.openStream(); } catch (Exception&) { - OSL_ENSURE(sal_False, "Cannot open reply stream from content"); + OSL_FAIL("Cannot open reply stream from content"); } } catch (Exception&) { // XXX - OSL_ENSURE(sal_False, "Exception during UCB operatration."); + OSL_FAIL("Exception during UCB operatration."); return UNKNOWN_ERROR; } return SUCCESS; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/submission/submission_get.hxx b/forms/source/xforms/submission/submission_get.hxx index 931ecb514fc4..a9dfbbf3e0b6 100644 --- a/forms/source/xforms/submission/submission_get.hxx +++ b/forms/source/xforms/submission/submission_get.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -42,3 +43,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/submission/submission_post.cxx b/forms/source/xforms/submission/submission_post.cxx index fa3f2180b0b0..b991a31a420e 100644 --- a/forms/source/xforms/submission/submission_post.cxx +++ b/forms/source/xforms/submission/submission_post.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -44,11 +45,12 @@ using namespace CSS::uno; using namespace CSS::ucb; using namespace CSS::task; using namespace CSS::io; -using namespace rtl; using namespace osl; using namespace ucbhelper; using namespace std; +using ::rtl::OUString; + CSubmissionPost::CSubmissionPost(const rtl::OUString& aURL, const CSS::uno::Reference< CSS::xml::dom::XDocumentFragment >& aFragment) : CSubmission(aURL, aFragment) @@ -65,41 +67,29 @@ CSubmission::SubmissionResult CSubmissionPost::submit(const CSS::uno::Reference< ucbhelper::Content aContent(m_aURLObj.GetMainURL(INetURLObject::NO_DECODE), aEnvironment); // use post command - - OUString aCommandName = OUString::createFromAscii("post"); + OUString aCommandName(RTL_CONSTASCII_USTRINGPARAM("post")); PostCommandArgument2 aPostArgument; aPostArgument.Source = apSerialization->getInputStream(); - //CSS::uno::Reference< XInterface > aSink( m_aFactory->createInstance( - // OUString::createFromAscii("com.sun.star.io.Pipe")), UNO_QUERY_THROW); CSS::uno::Reference< XActiveDataSink > aSink(new ucbhelper::ActiveDataSink); - // OUString::createFromAscii("com.sun.star.io.Pipe")), UNO_QUERY_THROW); aPostArgument.Sink = aSink; - aPostArgument.MediaType = OUString::createFromAscii("application/xml"); + aPostArgument.MediaType = OUString(RTL_CONSTASCII_USTRINGPARAM("application/xml")); aPostArgument.Referer = OUString(); Any aCommandArgument; aCommandArgument <<= aPostArgument; aContent.executeCommand( aCommandName, aCommandArgument); - // wait for command to finish - // pProgressHelper->m_cFinished.wait(); - - // CSS::uno::Reference< XOutputStream > xOut(aSink, UNO_QUERY_THROW); - // xOut->closeOutput(); - try { - // m_aResultStream = CSS::uno::Reference< XInputStream >(aSink, UNO_QUERY_THROW); m_aResultStream = aSink->getInputStream(); } catch (Exception&) { - OSL_ENSURE(sal_False, "Cannot open reply stream from content"); + OSL_FAIL("Cannot open reply stream from content"); } } catch (Exception&) { - // XXX - OSL_ENSURE(sal_False, "Exception during UCB operatration."); + OSL_FAIL("Exception during UCB operatration."); return UNKNOWN_ERROR; } - return SUCCESS; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/submission/submission_post.hxx b/forms/source/xforms/submission/submission_post.hxx index 1c0c86d6490f..86f040f951de 100644 --- a/forms/source/xforms/submission/submission_post.hxx +++ b/forms/source/xforms/submission/submission_post.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -38,3 +39,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/submission/submission_put.cxx b/forms/source/xforms/submission/submission_put.cxx index 9ed37470ba93..6ffb98c6ac4a 100644 --- a/forms/source/xforms/submission/submission_put.cxx +++ b/forms/source/xforms/submission/submission_put.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -42,11 +43,11 @@ using namespace CSS::uno; using namespace CSS::ucb; using namespace CSS::task; using namespace CSS::io; -using namespace rtl; using namespace osl; using namespace ucbhelper; using namespace std; +using ::rtl::OUString; CSubmissionPut::CSubmissionPut(const rtl::OUString& aURL, const CSS::uno::Reference< CSS::xml::dom::XDocumentFragment >& aFragment) : CSubmission(aURL, aFragment) @@ -71,7 +72,7 @@ CSubmission::SubmissionResult CSubmissionPut::submit(const CSS::uno::Reference< } catch (Exception&) { // XXX - OSL_ENSURE(sal_False, "Exception during UCB operatration."); + OSL_FAIL("Exception during UCB operatration."); return UNKNOWN_ERROR; } @@ -79,3 +80,4 @@ CSubmission::SubmissionResult CSubmissionPut::submit(const CSS::uno::Reference< return SUCCESS; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/submission/submission_put.hxx b/forms/source/xforms/submission/submission_put.hxx index 10e4fa44007d..acdb15e490c8 100644 --- a/forms/source/xforms/submission/submission_put.hxx +++ b/forms/source/xforms/submission/submission_put.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -42,3 +43,4 @@ public: }; #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/unohelper.cxx b/forms/source/xforms/unohelper.cxx index 738ad4f40a1a..475f366401a6 100644 --- a/forms/source/xforms/unohelper.cxx +++ b/forms/source/xforms/unohelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -101,3 +102,5 @@ void xforms::copy( const Reference<XPropertySet>& xFrom, // else: no property? then ignore. } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/unohelper.hxx b/forms/source/xforms/unohelper.hxx index d6cb46fcbc40..76125cf1dcee 100644 --- a/forms/source/xforms/unohelper.hxx +++ b/forms/source/xforms/unohelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -55,3 +56,5 @@ void copy( const com::sun::star::uno::Reference<com::sun::star::beans::XProperty } // namespace #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/warnings_guard_unicode_regex.h b/forms/source/xforms/warnings_guard_unicode_regex.h index 2d7605cb9524..68f0022d7966 100644 --- a/forms/source/xforms/warnings_guard_unicode_regex.h +++ b/forms/source/xforms/warnings_guard_unicode_regex.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -46,3 +47,5 @@ #endif #endif // INCLUDED_WARNINGS_GUARD_UNICODE_REGEX_H + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/xforms_services.cxx b/forms/source/xforms/xforms_services.cxx index 867a80bd7bbd..6ef347dd0c4c 100644 --- a/forms/source/xforms/xforms_services.cxx +++ b/forms/source/xforms/xforms_services.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -70,3 +71,5 @@ Reference<XInterface> XForms_CreateInstance( } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/xforms_services.hxx b/forms/source/xforms/xforms_services.hxx index e40550bc6550..c1e4dc459dc0 100644 --- a/forms/source/xforms/xforms_services.hxx +++ b/forms/source/xforms/xforms_services.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ namespace com { namespace sun { namespace star { @@ -25,3 +26,5 @@ namespace frm const com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>& _rxFactory) throw( com::sun::star::uno::RuntimeException ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/xformsevent.cxx b/forms/source/xforms/xformsevent.cxx index 56f8f2e9ca4a..236284165bd2 100644 --- a/forms/source/xforms/xformsevent.cxx +++ b/forms/source/xforms/xformsevent.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -98,3 +99,5 @@ void SAL_CALL XFormsEventConcrete::initEvent(const OUString& eventTypeArg, sal_B } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/xformsevent.hxx b/forms/source/xforms/xformsevent.hxx index c770c0db6d56..806abe6e3e62 100644 --- a/forms/source/xforms/xformsevent.hxx +++ b/forms/source/xforms/xformsevent.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ #ifndef __XFORMSEVENT_HXX #define __XFORMSEVENT_HXX @@ -64,3 +65,5 @@ class XFormsEventConcrete : public cppu::WeakImplHelper1< XFormsEvent > { } } } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/xmlhelper.cxx b/forms/source/xforms/xmlhelper.cxx index a8aaa19aea34..14c9b73163e1 100644 --- a/forms/source/xforms/xmlhelper.cxx +++ b/forms/source/xforms/xmlhelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -146,3 +147,4 @@ Reference<XDocumentBuilder> getDocumentBuilder() return xBuilder; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/xmlhelper.hxx b/forms/source/xforms/xmlhelper.hxx index d5822138a306..7c102cc8aeaa 100644 --- a/forms/source/xforms/xmlhelper.hxx +++ b/forms/source/xforms/xmlhelper.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -49,3 +50,5 @@ com::sun::star::uno::Reference<com::sun::star::xml::dom::XDocumentBuilder> getDo #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/xpathlib/extension.cxx b/forms/source/xforms/xpathlib/extension.cxx index 4c23eac63be0..ca75c23e31de 100644 --- a/forms/source/xforms/xpathlib/extension.cxx +++ b/forms/source/xforms/xpathlib/extension.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -45,22 +46,19 @@ using com::sun::star::xml::dom::XNode; Reference< XInterface > SAL_CALL CLibxml2XFormsExtension::Create( const Reference< XMultiServiceFactory >& /*aFactory*/) { - // printf("_create_\n"); Reference< XInterface > aInstance(static_cast< XXPathExtension* >(new CLibxml2XFormsExtension(/*aFactory*/))); return aInstance; } ::rtl::OUString SAL_CALL CLibxml2XFormsExtension::getImplementationName_Static() { - // printf("_implname_\n"); - return ::rtl::OUString::createFromAscii("com.sun.star.comp.xml.xpath.XFormsExtension"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.xml.xpath.XFormsExtension") ); } Sequence< ::rtl::OUString > SAL_CALL CLibxml2XFormsExtension::getSupportedServiceNames_Static() { - // printf("_services_\n"); Sequence< ::rtl::OUString > aSequence(1); - aSequence[0] = ::rtl::OUString::createFromAscii("com.sun.star.xml.xpath.XPathExtension"); + aSequence[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.xpath.XPathExtension") ); return aSequence; } @@ -81,9 +79,9 @@ void SAL_CALL CLibxml2XFormsExtension::initialize(const Sequence< Any >& aSequen { if (! (aSequence[i] >>= aValue)) throw RuntimeException(); - if (aValue.Name.equalsAscii("Model")) + if (aValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Model"))) aValue.Value >>= m_aModel; - else if (aValue.Name.equalsAscii("ContextNode")) + else if (aValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ContextNode"))) aValue.Value >>= m_aContextNode; } } @@ -102,3 +100,5 @@ extern "C" void SAL_CALL createRegistryInfo_CLibxml2XFormsExtension() { static frm::OMultiInstanceAutoRegistration< CLibxml2XFormsExtension > aRegistration; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/xpathlib/extension.hxx b/forms/source/xforms/xpathlib/extension.hxx index 303b832f9f43..c44a80f9860f 100644 --- a/forms/source/xforms/xpathlib/extension.hxx +++ b/forms/source/xforms/xpathlib/extension.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ #include <rtl/ustring.h> #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/uno/Sequence.hxx> @@ -37,3 +38,5 @@ public: virtual void SAL_CALL initialize(const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& aSequence) throw (com::sun::star::uno::RuntimeException); }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/xpathlib/xpathlib.cxx b/forms/source/xforms/xpathlib/xpathlib.cxx index 40b75bfda10b..8b12aebd5204 100644 --- a/forms/source/xforms/xpathlib/xpathlib.cxx +++ b/forms/source/xforms/xpathlib/xpathlib.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -210,7 +211,7 @@ void xforms_countNonEmptyFunction(xmlXPathParserContextPtr ctxt, int nargs) for (int i = 0; i < xmlXPathNodeSetGetLength(pNodeSet); i++) { aString = xmlXPathCastNodeToString(xmlXPathNodeSetItem(pNodeSet, i)); - if (strlen((char*)aString) > 0) nNotEmpty++; + if (*aString != 0) nNotEmpty++; } xmlXPathReturnNumber(ctxt, nNotEmpty); } @@ -310,10 +311,10 @@ static sal_Bool parseDateTime(const ::rtl::OUString& aString, DateTime& aDateTim sal_Int32 nDateLength = 10; sal_Int32 nTimeLength = 8; - ::rtl::OUString aDateTimeSep = ::rtl::OUString::createFromAscii("T"); - ::rtl::OUString aDateSep = ::rtl::OUString::createFromAscii("-"); - ::rtl::OUString aTimeSep = ::rtl::OUString::createFromAscii(":"); - ::rtl::OUString aUTCString = ::rtl::OUString::createFromAscii("Z"); + ::rtl::OUString aDateTimeSep(RTL_CONSTASCII_USTRINGPARAM("T")); + ::rtl::OUString aDateSep(RTL_CONSTASCII_USTRINGPARAM("-")); + ::rtl::OUString aTimeSep(RTL_CONSTASCII_USTRINGPARAM(":")); + ::rtl::OUString aUTCString(RTL_CONSTASCII_USTRINGPARAM("Z")); ::rtl::OUString aDateString = aDateTimeString.copy(0, nDateLength); ::rtl::OUString aTimeString = aDateTimeString.copy(nDateLength+1, nTimeLength); @@ -565,3 +566,5 @@ void xforms_currentFunction(xmlXPathParserContextPtr ctxt, int nargs) else xmlXPathReturnEmptyNodeSet(ctxt); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/xpathlib/xpathlib.hxx b/forms/source/xforms/xpathlib/xpathlib.hxx index d9fe96e598ca..2a74c1899bc8 100644 --- a/forms/source/xforms/xpathlib/xpathlib.hxx +++ b/forms/source/xforms/xpathlib/xpathlib.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ #include <libxml/tree.h> @@ -15,38 +16,11 @@ * An XPath parser context. It contains pure parsing informations, * an xmlXPathContext, and the stack of objects. */ -#if 0 -// for reference from xpath.h -struct _xmlXPathParserContext { - const xmlChar *cur; /* the current char being parsed */ - const xmlChar *base; /* the full expression */ - - int error; /* error code */ - - xmlXPathContextPtr context; /* the evaluation context */ - xmlXPathObjectPtr value; /* the current value */ - int valueNr; /* number of values stacked */ - int valueMax; /* max number of values stacked */ - xmlXPathObjectPtr *valueTab; /* stack of values */ - - xmlXPathCompExprPtr comp; /* the precompiled expression */ - int xptr; /* it this an XPointer expression */ - xmlNodePtr ancestor; /* used for walking preceding axis */ -}; - -#endif extern "C" { // XForms -/* -void xforms_getInstanceDocumentFunction(xmlXPathParserContextPtr ctxt, int nargs); -void xforms_rebuildFunction(xmlXPathParserContextPtr ctxt, int nargs); -void xforms_recalculateFunction(xmlXPathParserContextPtr ctxt, int nargs); -void xforms_revalidateFunction(xmlXPathParserContextPtr ctxt, int nargs); -void xforms_refreshFunction(xmlXPathParserContextPtr ctxt, int nargs); -*/ // XForms Core Functions // boolean functions @@ -81,3 +55,5 @@ void xforms_currentFunction(xmlXPathParserContextPtr ctxt, int nargs); xmlXPathFunction xforms_lookupFunc(void *ctxt, const xmlChar *name, const xmlChar *ns_uri); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |