summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/docrecovery.src4
-rw-r--r--svx/source/form/fmshimp.cxx104
-rw-r--r--svx/source/inc/fmshimp.hxx8
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx3
-rw-r--r--svx/source/sdr/properties/attributeproperties.cxx14
5 files changed, 92 insertions, 41 deletions
diff --git a/svx/source/dialog/docrecovery.src b/svx/source/dialog/docrecovery.src
index 5bcde8bdf0..7c1532b71b 100644
--- a/svx/source/dialog/docrecovery.src
+++ b/svx/source/dialog/docrecovery.src
@@ -370,7 +370,7 @@ TabPage RID_SVXPAGE_ERR_REP_WELCOME
Pos = MAP_APPFONT( RECOV_COL1, RECOV_ROW2 );
Size = MAP_APPFONT( RECOV_CONTROLWIDTH, (RECOV_ROW7-RECOV_ROW2-RSC_SP_CTRL_Y) );
WordBreak = TRUE;
- Text[ en-US ] = "This error report tool gathers information about how %PRODUCTNAME is working and sends it to Sun Microsystems to help improve future versions.\n\nIt's easy - just send the report without any further effort on your part by clicking 'Send' in the next dialog, or you can briefly describe how the error occurred and then click 'Send'. If you want to see the report, click the 'Show Report' button. No data will be sent if you click 'Do Not Send'.\n\nCustomer Privacy\nThe information gathered is limited to data concerning the state of %PRODUCTNAME %PRODUCTVERSION when the error occurred. Other information about passwords or document contents is not collected.\n\nThe information will only be used to improve the quality of %PRODUCTNAME and will not be shared with third parties.\nFor more information on Sun Microsystems' privacy policy, visit\nhttp://www.sun.com/privacy/";
+ Text[ en-US ] = "This error report tool gathers information about how %PRODUCTNAME is working and sends it to Oracle to help improve future versions.\n\nIt's easy - just send the report without any further effort on your part by clicking 'Send' in the next dialog, or you can briefly describe how the error occurred and then click 'Send'. If you want to see the report, click the 'Show Report' button. No data will be sent if you click 'Do Not Send'.\n\nCustomer Privacy\nThe information gathered is limited to data concerning the state of %PRODUCTNAME %PRODUCTVERSION when the error occurred. Other information about passwords or document contents is not collected.\n\nThe information will only be used to improve the quality of %PRODUCTNAME and will not be shared with third parties.\nFor more information on Oracle's privacy policy, visit\nwww.oracle.com/html/services-privacy-policy.html";
};
FixedLine FL_RECOV_BOTTOM
{
@@ -472,7 +472,7 @@ TabPage RID_SVXPAGE_ERR_REP_SEND
Pos = MAP_APPFONT( ERRSEND_COL0, ERRSEND_ROW12 );
Size = MAP_APPFONT( ERRSEND_CONTROLWIDTH2, RSC_CD_CHECKBOX_HEIGHT );
Check = FALSE;
- Text[ en-US ] = "~I allow Sun Microsystems to contact me regarding this report.";
+ Text[ en-US ] = "~I allow Oracle to contact me regarding this report.";
};
FixedText FT_ERRSEND_EMAILADDR
{
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index f783aeacf4..315a064148 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -1430,22 +1430,25 @@ void FmXFormShell::ExecuteSearch()
return;
// filter out the forms which do not contain valid controls at all
- FmFormArray::reverse_iterator form = m_aSearchForms.rbegin();
- ::std::vector< String >::reverse_iterator contextName = aContextNames.rbegin();
- sal_Int32 i = m_aSearchForms.size();
- for ( ;
- form != m_aSearchForms.rend();
- ++form, ++contextName, --i
- )
{
- FmSearchContext aTestContext;
- aTestContext.nContext = static_cast< sal_Int16 >( i-1 );
- sal_uInt32 nValidControls = OnSearchContextRequest( &aTestContext );
- if ( nValidControls == 0 )
+ FmFormArray aValidForms;
+ ::std::vector< String > aValidContexts;
+ FmFormArray::const_iterator form = m_aSearchForms.begin();
+ ::std::vector< String >::const_iterator contextName = aContextNames.begin();
+ for ( ; form != m_aSearchForms.end(); ++form, ++contextName )
{
- m_aSearchForms.erase( form.base() - 1 );
- aContextNames.erase( contextName.base() - 1 );
+ FmSearchContext aTestContext;
+ aTestContext.nContext = static_cast< sal_Int16 >( form - m_aSearchForms.begin() );
+ sal_uInt32 nValidControls = OnSearchContextRequest( &aTestContext );
+ if ( nValidControls > 0 )
+ {
+ aValidForms.push_back( *form );
+ aValidContexts.push_back( *contextName );
+ }
}
+
+ m_aSearchForms.swap( aValidForms );
+ aContextNames.swap( aValidContexts );
}
if (m_aSearchForms.size() == 0)
@@ -1457,7 +1460,7 @@ void FmXFormShell::ExecuteSearch()
// jetzt brauche ich noch einen 'initial context'
sal_Int16 nInitialContext = 0;
Reference< XForm> xActiveForm( getActiveForm());
- for (i=0; i<(sal_Int32)m_aSearchForms.size(); ++i)
+ for ( size_t i=0; i<m_aSearchForms.size(); ++i )
{
if (m_aSearchForms.at(i) == xActiveForm)
{
@@ -2232,6 +2235,8 @@ IMPL_LINK(FmXFormShell, OnFoundData, FmFoundRecordInformation*, pfriWhere)
FmFormObj* pFormObject = FmFormObj::GetFormObject( pObject );
Reference< XControlModel > xControlModel( pFormObject ? pFormObject->GetUnoControlModel() : Reference< XControlModel >() );
DBG_ASSERT( xControlModel.is(), "FmXFormShell::OnFoundData: invalid control!" );
+ if ( !xControlModel.is() )
+ return 0;
// disable the permanent cursor for the last grid we found a record
if (m_xLastGridFound.is() && (m_xLastGridFound != xControlModel))
@@ -2249,7 +2254,7 @@ IMPL_LINK(FmXFormShell, OnFoundData, FmFoundRecordInformation*, pfriWhere)
sal_Int32 nGridColumn = m_arrRelativeGridColumn.GetObject(pfriWhere->nFieldPos);
if (nGridColumn != -1)
{ // dummer weise muss ich mir das Control erst wieder besorgen
- Reference< XControl> xControl( GetControlFromModel(xControlModel));
+ Reference< XControl> xControl( impl_getControl( xControlModel, *pFormObject ) );
Reference< XGrid> xGrid(xControl, UNO_QUERY);
DBG_ASSERT(xGrid.is(), "FmXFormShell::OnFoundData : ungueltiges Control !");
// wenn eine der Asserts anschlaegt, habe ich beim Aufbauen von m_arrSearchedControls wohl was falsch gemacht
@@ -2261,7 +2266,8 @@ IMPL_LINK(FmXFormShell, OnFoundData, FmFoundRecordInformation*, pfriWhere)
xModelSet->setPropertyValue( FM_PROP_CURSORCOLOR, makeAny( sal_Int32( COL_LIGHTRED ) ) );
m_xLastGridFound = xControlModel;
- xGrid->setCurrentColumnPosition((sal_Int16)nGridColumn);
+ if ( xGrid.is() )
+ xGrid->setCurrentColumnPosition((sal_Int16)nGridColumn);
}
// als der Cursor neu positioniert wurde, habe ich (in positioned) meine Formularleisten-Slots invalidiert, aber das greift
@@ -2369,7 +2375,7 @@ IMPL_LINK(FmXFormShell, OnSearchContextRequest, FmSearchContext*, pfmscContextIn
// ... nach der ControlSource-Eigenschaft fragen
SearchableControlIterator iter( xCurrentFormComponent );
- Reference< XControl> xControlBehindModel;
+ Reference< XControl> xControl;
// das Control, das als Model xControlModel hat
// (das folgende while kann mehrmals durchlaufen werden, ohne dass das Control sich aendert, dann muss
// ich nicht jedesmal neu suchen)
@@ -2381,10 +2387,12 @@ IMPL_LINK(FmXFormShell, OnSearchContextRequest, FmSearchContext*, pfmscContextIn
if ( sControlSource.getLength() == 0 )
{ // das aktuelle Element hat keine ControlSource, also ist es ein GridControl (das ist das einzige, was
// der SearchableControlIterator noch zulaesst)
- xControlBehindModel = GetControlFromModel(xControlModel);
- DBG_ASSERT(xControlBehindModel.is(), "FmXFormShell::OnSearchContextRequest : didn't ::std::find a control with requested model !");
+ xControl = impl_getControl( xControlModel, *pFormObject );
+ DBG_ASSERT(xControl.is(), "FmXFormShell::OnSearchContextRequest : didn't ::std::find a control with requested model !");
- Reference< XGridPeer> xGridPeer(xControlBehindModel->getPeer(), UNO_QUERY);
+ Reference< XGridPeer> xGridPeer;
+ if ( xControl.is() )
+ xGridPeer.set( xControl->getPeer(), UNO_QUERY );
do
{
if (!xGridPeer.is())
@@ -2438,13 +2446,13 @@ IMPL_LINK(FmXFormShell, OnSearchContextRequest, FmSearchContext*, pfmscContextIn
if (sControlSource.getLength() && xValidFormFields->hasByName(sControlSource))
{
// jetzt brauche ich das Control zum SdrObject
- if (!xControlBehindModel.is())
+ if (!xControl.is())
{
- xControlBehindModel = GetControlFromModel(xControlModel);
- DBG_ASSERT(xControlBehindModel.is(), "FmXFormShell::OnSearchContextRequest : didn't ::std::find a control with requested model !");
+ xControl = impl_getControl( xControlModel, *pFormObject );
+ DBG_ASSERT(xControl.is(), "FmXFormShell::OnSearchContextRequest : didn't ::std::find a control with requested model !");
}
- if (IsSearchableControl(xControlBehindModel))
+ if (IsSearchableControl(xControl))
{ // alle Tests ueberstanden -> in die Liste mit aufnehmen
strFieldList += sControlSource.getStr();
strFieldList += ';';
@@ -2460,7 +2468,7 @@ IMPL_LINK(FmXFormShell, OnSearchContextRequest, FmSearchContext*, pfmscContextIn
m_arrRelativeGridColumn.Insert(-1, m_arrRelativeGridColumn.Count());
// und fuer die formatierte Suche ...
- pfmscContextInfo->arrFields.push_back(Reference< XInterface>(xControlBehindModel, UNO_QUERY));
+ pfmscContextInfo->arrFields.push_back(Reference< XInterface>(xControl, UNO_QUERY));
}
}
}
@@ -2834,24 +2842,48 @@ void FmXFormShell::SetDesignMode(sal_Bool bDesign)
}
//------------------------------------------------------------------------------
-Reference< XControl> FmXFormShell::GetControlFromModel(const Reference< XControlModel>& xModel)
+Reference< XControl> FmXFormShell::impl_getControl( const Reference< XControlModel >& i_rxModel, const FmFormObj& i_rKnownFormObj )
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::GetControlFromModel" );
if ( impl_checkDisposed() )
return NULL;
- Reference< XControlContainer> xControlContainer( getControlContainerForView() );
+ Reference< XControl > xControl;
+ try
+ {
+ Reference< XControlContainer> xControlContainer( getControlContainerForView(), UNO_SET_THROW );
- Sequence< Reference< XControl> > seqControls( xControlContainer->getControls() );
- Reference< XControl>* pControls = seqControls.getArray();
- // ... die ich dann durchsuchen kann
- for (int i=0; i<seqControls.getLength(); ++i)
+ Sequence< Reference< XControl > > seqControls( xControlContainer->getControls() );
+ const Reference< XControl >* pControls = seqControls.getArray();
+ // ... die ich dann durchsuchen kann
+ for (sal_Int32 i=0; i<seqControls.getLength(); ++i)
+ {
+ xControl.set( pControls[i], UNO_SET_THROW );
+ Reference< XControlModel > xCurrentModel( xControl->getModel() );
+ if ( xCurrentModel == i_rxModel )
+ break;
+ xControl.clear();
+ }
+
+ if ( !xControl.is() )
+ {
+ // fallabck (some controls might not have been created, yet, since they were never visible so far)
+ Reference< XControl > xContainerControl( xControlContainer, UNO_QUERY_THROW );
+ const Window* pContainerWindow = VCLUnoHelper::GetWindow( xContainerControl->getPeer() );
+ ENSURE_OR_THROW( pContainerWindow, "unexpected control container implementation" );
+
+ const SdrView* pSdrView = m_pShell ? m_pShell->GetFormView() : NULL;
+ ENSURE_OR_THROW( pSdrView, "no current view" );
+
+ xControl.set( i_rKnownFormObj.GetUnoControl( *pSdrView, *pContainerWindow ), UNO_QUERY_THROW );
+ }
+ }
+ catch( const Exception& )
{
- Reference< XControlModel> xSearchLoopModel( pControls[i]->getModel());
- if ((XControlModel*)xSearchLoopModel.get() == (XControlModel*)xModel.get())
- return pControls[i];
+ DBG_UNHANDLED_EXCEPTION();
}
- return Reference< XControl>(NULL);
+
+ OSL_ENSURE( xControl.is(), "FmXFormShell::impl_getControl: no control found!" );
+ return xControl;
}
//------------------------------------------------------------------------------
diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx
index 5d378212e9..0f09d9f220 100644
--- a/svx/source/inc/fmshimp.hxx
+++ b/svx/source/inc/fmshimp.hxx
@@ -179,6 +179,7 @@ typedef ::utl::ConfigItem FmXFormShell_CFGBASE;
struct SdrViewEvent;
class FmFormShell;
class FmFormView;
+class FmFormObj;
class SAL_DLLPRIVATE FmXFormShell :public FmXFormShell_BASE
,public FmXFormShell_CFGBASE
,public ::svxform::OStaticDataAccessTools
@@ -379,8 +380,11 @@ protected:
void startListening();
void stopListening();
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> GetControlFromModel(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel>& xModel);
- // liefert das Control, welches das angegebene Model hat
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >
+ impl_getControl(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel>& i_rxModel,
+ const FmFormObj& i_rKnownFormObj
+ );
// sammelt in strNames die Namen aller Formulare
static void impl_collectFormSearchContexts_nothrow(
diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
index 729e5702e4..2d67577c2e 100644
--- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
@@ -1659,6 +1659,9 @@ namespace sdr { namespace contact {
if ( !bHadControl && rControl.is() && rControl.isVisible() )
rControl.invalidate();
+ if ( !bHadControl && rControl.is() && rControl.isVisible() )
+ rControl.invalidate();
+
// check if we already have an XControl.
if ( !xControlModel.is() || !rControl.is() )
// use the default mechanism. This will create a ControlPrimitive2D without
diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx
index e30b2c2e0b..18f420c418 100644
--- a/svx/source/sdr/properties/attributeproperties.cxx
+++ b/svx/source/sdr/properties/attributeproperties.cxx
@@ -281,7 +281,19 @@ namespace sdr
// set stylesheet (if used)
if(pStySheet)
{
- ImpAddStyleSheet(pStySheet, sal_True);
+ // #i109515#
+ SfxItemPool* pStyleSheetPool = &pStySheet->GetPool().GetPool();
+
+ if(pStyleSheetPool == pDestPool)
+ {
+ // just re-set stylesheet
+ ImpAddStyleSheet(pStySheet, sal_True);
+ }
+ else
+ {
+ // StyleSheet is NOT from the correct pool; use default
+ ImpAddStyleSheet(pNewModel->GetDefaultStyleSheet(), sal_True);
+ }
}
delete pOldSet;