fs33a: merge after pulling OOO330.m4's change sets

This commit is contained in:
Frank Schoenheit [fs]
2010-08-13 12:04:35 +02:00
6 changed files with 87 additions and 5 deletions

View File

@@ -1458,7 +1458,11 @@ Reference< XSpellChecker1 > ImpEditEngine::GetSpeller()
SpellInfo * ImpEditEngine::CreateSpellInfo( const EditSelection &rSel, bool bMultipleDocs ) SpellInfo * ImpEditEngine::CreateSpellInfo( const EditSelection &rSel, bool bMultipleDocs )
{ {
pSpellInfo = new SpellInfo; if (!pSpellInfo)
pSpellInfo = new SpellInfo;
else
*pSpellInfo = SpellInfo(); // reset to default values
pSpellInfo->bMultipleDoc = bMultipleDocs; pSpellInfo->bMultipleDoc = bMultipleDocs;
EditSelection aSentenceSel( SelectSentence( rSel ) ); EditSelection aSentenceSel( SelectSentence( rSel ) );
// pSpellInfo->aSpellStart = CreateEPaM( aSentenceSel.Min() ); // pSpellInfo->aSpellStart = CreateEPaM( aSentenceSel.Min() );
@@ -2023,7 +2027,6 @@ bool ImpEditEngine::SpellSentence(EditView& rEditView,
#else #else
bool bRet = false; bool bRet = false;
EditSelection aCurSel( rEditView.pImpEditView->GetEditSelection() ); EditSelection aCurSel( rEditView.pImpEditView->GetEditSelection() );
//the pSpellInfo has to be created on demand
if(!pSpellInfo) if(!pSpellInfo)
pSpellInfo = CreateSpellInfo( aCurSel, true ); pSpellInfo = CreateSpellInfo( aCurSel, true );
pSpellInfo->aCurSentenceStart = aCurSel.Min(); pSpellInfo->aCurSentenceStart = aCurSel.Min();
@@ -2191,8 +2194,12 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView,
{ {
#ifdef SVX_LIGHT #ifdef SVX_LIGHT
#else #else
// Note: rNewPortions.size() == 0 is valid and happens when the whole
// sentence got removed in the dialog
DBG_ASSERT(pSpellInfo, "pSpellInfo not initialized"); DBG_ASSERT(pSpellInfo, "pSpellInfo not initialized");
if(pSpellInfo) if (pSpellInfo &&
pSpellInfo->aLastSpellPortions.size() > 0) // no portions -> no text to be changed
{ {
// get current paragraph length to calculate later on how the sentence length changed, // get current paragraph length to calculate later on how the sentence length changed,
// in order to place the cursor at the end of the sentence again // in order to place the cursor at the end of the sentence again
@@ -2202,6 +2209,10 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView,
UndoActionStart( EDITUNDO_INSERT ); UndoActionStart( EDITUNDO_INSERT );
if(pSpellInfo->aLastSpellPortions.size() == rNewPortions.size()) if(pSpellInfo->aLastSpellPortions.size() == rNewPortions.size())
{ {
DBG_ASSERT( rNewPortions.size() > 0, "rNewPortions should not be empty here" );
DBG_ASSERT( pSpellInfo->aLastSpellPortions.size() == pSpellInfo->aLastSpellContentSelections.size(),
"aLastSpellPortions and aLastSpellContentSelections size mismatch" );
//the simple case: the same number of elements on both sides //the simple case: the same number of elements on both sides
//each changed element has to be applied to the corresponding source element //each changed element has to be applied to the corresponding source element
svx::SpellPortions::const_iterator aCurrentNewPortion = rNewPortions.end(); svx::SpellPortions::const_iterator aCurrentNewPortion = rNewPortions.end();
@@ -2252,6 +2263,8 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView,
} }
else else
{ {
DBG_ASSERT( pSpellInfo->aLastSpellContentSelections.size() > 0, "aLastSpellContentSelections should not be empty here" );
//select the complete sentence //select the complete sentence
SpellContentSelections::const_iterator aCurrentEndPosition = pSpellInfo->aLastSpellContentSelections.end(); SpellContentSelections::const_iterator aCurrentEndPosition = pSpellInfo->aLastSpellContentSelections.end();
--aCurrentEndPosition; --aCurrentEndPosition;

5
officecfg/registry/data/org/openoffice/Office/Math.xcu Normal file → Executable file
View File

@@ -48,6 +48,8 @@
<value>0</value> <value>0</value>
</prop> </prop>
</node> </node>
<!-- only used for symbols with the 'Greek' symbol set name -->
<node oor:name="Id2" oor:op="replace"> <node oor:name="Id2" oor:op="replace">
<prop oor:name="Name"> <prop oor:name="Name">
<value>OpenSymbol</value> <value>OpenSymbol</value>
@@ -65,10 +67,11 @@
<value>0</value> <value>0</value>
</prop> </prop>
<prop oor:name="Italic"> <prop oor:name="Italic">
<value>2</value> <value>0</value>
</prop> </prop>
</node> </node>
</node> </node>
<node oor:name="SymbolList"> <node oor:name="SymbolList">
<node oor:name="alpha" oor:op="replace"> <node oor:name="alpha" oor:op="replace">
<prop oor:name="Char"> <prop oor:name="Char">

View File

@@ -402,7 +402,28 @@
</info> </info>
<value>false</value> <value>false</value>
</prop> </prop>
<prop oor:name="ScaleNormalBracket" oor:type="xs:boolean"> <prop oor:name="GreekCharStyle" oor:type="xs:short">
<!-- UIHints: n/a yet -->
<info>
<author>TL</author>
<desc>Specifies the default layout for symbols from the 'Greek' symbol set.</desc>
<label>Greek character style</label>
</info>
<constraints>
<minInclusive oor:value="0">
<info>
<desc>Specifies the minimum value allowed</desc>
</info>
</minInclusive>
<maxInclusive oor:value="2">
<info>
<desc>Specifies the maximum value allowed</desc>
</info>
</maxInclusive>
</constraints>
<value>0</value>
</prop>
<prop oor:name="ScaleNormalBracket" oor:type="xs:boolean">
<!-- OldPath: Math/StandardFormat --> <!-- OldPath: Math/StandardFormat -->
<!-- OldLocation: Soffice.cfg --> <!-- OldLocation: Soffice.cfg -->
<!-- UIHints: Format - Spacing - Category - Brackets - Scale all brackets --> <!-- UIHints: Format - Spacing - Category - Brackets - Scale all brackets -->

View File

@@ -245,6 +245,36 @@ SfxSecurityPage_Impl::SfxSecurityPage_Impl( SfxSecurityPage &rTabPage, const Sfx
m_aRecordChangesCB.SetStyle( m_aRecordChangesCB.GetStyle() | WB_EARLYTOGGLE ); m_aRecordChangesCB.SetStyle( m_aRecordChangesCB.GetStyle() | WB_EARLYTOGGLE );
m_aRecordChangesCB.SetToggleHdl( LINK( this, SfxSecurityPage_Impl, RecordChangesCBToggleHdl ) ); m_aRecordChangesCB.SetToggleHdl( LINK( this, SfxSecurityPage_Impl, RecordChangesCBToggleHdl ) );
m_aChangeProtectionPB.SetClickHdl( LINK( this, SfxSecurityPage_Impl, ChangeProtectionPBHdl ) ); m_aChangeProtectionPB.SetClickHdl( LINK( this, SfxSecurityPage_Impl, ChangeProtectionPBHdl ) );
// #i112277: for the time being (OOO 3.3) the following options should not
// be available. In the long run however it is planned to implement the yet
// missing functionality. Thus now we hide them and move the remaining ones up.
m_aNewPasswordToOpenFL.Hide();
m_aNewPasswordToOpenFT.Hide();
m_aNewPasswordToOpenED.Hide();
m_aConfirmPasswordToOpenFT.Hide();
m_aConfirmPasswordToOpenED.Hide();
m_aNewPasswordInfoFT.Hide();
m_aNewPasswordToModifyFL.Hide();
m_aNewPasswordToModifyFT.Hide();
m_aNewPasswordToModifyED.Hide();
m_aConfirmPasswordToModifyFT.Hide();
m_aConfirmPasswordToModifyED.Hide();
const long nDelta = m_aOptionsFL.GetPosPixel().Y() - m_aNewPasswordToOpenFL.GetPosPixel().Y();
Point aPos;
aPos = m_aOptionsFL.GetPosPixel();
aPos.Y() -= nDelta;
m_aOptionsFL.SetPosPixel( aPos );
aPos = m_aOpenReadonlyCB.GetPosPixel();
aPos.Y() -= nDelta;
m_aOpenReadonlyCB.SetPosPixel( aPos );
aPos = m_aRecordChangesCB.GetPosPixel();
aPos.Y() -= nDelta;
m_aRecordChangesCB.SetPosPixel( aPos );
aPos = m_aChangeProtectionPB.GetPosPixel();
aPos.Y() -= nDelta;
m_aChangeProtectionPB.SetPosPixel( aPos );
} }

View File

@@ -977,6 +977,8 @@ sal_Bool SAL_CALL SfxBaseModel::attachResource( const ::rtl::OUString&
aArgs.remove( "BreakMacroSignature" ); aArgs.remove( "BreakMacroSignature" );
aArgs.remove( "Stream" ); aArgs.remove( "Stream" );
aArgs.remove( "InputStream" ); aArgs.remove( "InputStream" );
aArgs.remove( "URL" );
aArgs.remove( "Frame" );
// TODO/LATER: all the parameters that are accepted by ItemSet of the DocShell must be removed here // TODO/LATER: all the parameters that are accepted by ItemSet of the DocShell must be removed here
@@ -988,6 +990,10 @@ sal_Bool SAL_CALL SfxBaseModel::attachResource( const ::rtl::OUString&
SfxAllItemSet aSet( pObjectShell->GetPool() ); SfxAllItemSet aSet( pObjectShell->GetPool() );
TransformParameters( SID_OPENDOC, rArgs, aSet ); TransformParameters( SID_OPENDOC, rArgs, aSet );
// the arguments are not allowed to reach the medium
aSet.ClearItem( SID_FILE_NAME );
aSet.ClearItem( SID_FILLFRAME );
pMedium->GetItemSet()->Put( aSet ); pMedium->GetItemSet()->Put( aSet );
SFX_ITEMSET_ARG( &aSet, pItem, SfxStringItem, SID_FILTER_NAME, sal_False ); SFX_ITEMSET_ARG( &aSet, pItem, SfxStringItem, SID_FILTER_NAME, sal_False );
if ( pItem ) if ( pItem )

View File

@@ -813,6 +813,13 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
xNewObj->SetModifyPasswordEntered( sal_False ); xNewObj->SetModifyPasswordEntered( sal_False );
xNewObj->SetReadOnly(); xNewObj->SetReadOnly();
} }
else if ( rReq.GetSlot() == SID_EDITDOC && bForEdit && !xNewObj->IsReadOnlyMedium() )
{
// the filter might request setting of the document to readonly state
// but in case of SID_EDITDOC it should not happen if the document
// can be opened for editing
xNewObj->SetReadOnlyUI( sal_False );
}
if ( xNewObj->IsDocShared() ) if ( xNewObj->IsDocShared() )
{ {
@@ -2144,6 +2151,8 @@ SfxViewShell* SfxViewFrame::LoadViewIntoFrame_Impl( const SfxObjectShell& i_rDoc
aTransformLoadArgs.remove( "Hidden" ); aTransformLoadArgs.remove( "Hidden" );
::rtl::OUString sURL( RTL_CONSTASCII_USTRINGPARAM( "private:object" ) ); ::rtl::OUString sURL( RTL_CONSTASCII_USTRINGPARAM( "private:object" ) );
if ( !sURL.getLength() )
sURL = i_rDoc.GetFactory().GetFactoryURL();
Reference< XComponentLoader > xLoader( i_rFrame, UNO_QUERY_THROW ); Reference< XComponentLoader > xLoader( i_rFrame, UNO_QUERY_THROW );
xLoader->loadComponentFromURL( sURL, ::rtl::OUString::createFromAscii( "_self" ), 0, xLoader->loadComponentFromURL( sURL, ::rtl::OUString::createFromAscii( "_self" ), 0,