summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM>2010-08-12 16:23:40 +0200
committerPhilipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM>2010-08-12 16:23:40 +0200
commit8d6235484043a008c49394555faf6b393bbb2617 (patch)
treedc5dbf02a005dc3bb73091568acefb054b747245
parent17a07b361db4a6e79ef67cc42ca170ed31b41b50 (diff)
parent05d4c107733a3e50b2321fb93ee7aa049e67bd1b (diff)
merge with OOO330m4
-rwxr-xr-xediteng/source/editeng/impedit4.cxx19
-rwxr-xr-x[-rw-r--r--]officecfg/registry/data/org/openoffice/Office/Math.xcu5
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Math.xcs23
-rw-r--r--[-rwxr-xr-x]sfx2/source/dialog/securitypage.cxx30
-rw-r--r--[-rwxr-xr-x]sfx2/source/dialog/securitypage.src0
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx6
-rw-r--r--sfx2/source/view/viewfrm.cxx9
7 files changed, 87 insertions, 5 deletions
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 6fc80acf06..9b09b563be 100755
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1458,7 +1458,11 @@ Reference< XSpellChecker1 > ImpEditEngine::GetSpeller()
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;
EditSelection aSentenceSel( SelectSentence( rSel ) );
// pSpellInfo->aSpellStart = CreateEPaM( aSentenceSel.Min() );
@@ -2023,7 +2027,6 @@ bool ImpEditEngine::SpellSentence(EditView& rEditView,
#else
bool bRet = false;
EditSelection aCurSel( rEditView.pImpEditView->GetEditSelection() );
- //the pSpellInfo has to be created on demand
if(!pSpellInfo)
pSpellInfo = CreateSpellInfo( aCurSel, true );
pSpellInfo->aCurSentenceStart = aCurSel.Min();
@@ -2191,8 +2194,12 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView,
{
#ifdef SVX_LIGHT
#else
+ // Note: rNewPortions.size() == 0 is valid and happens when the whole
+ // sentence got removed in the dialog
+
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,
// 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 );
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
//each changed element has to be applied to the corresponding source element
svx::SpellPortions::const_iterator aCurrentNewPortion = rNewPortions.end();
@@ -2252,6 +2263,8 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView,
}
else
{
+ DBG_ASSERT( pSpellInfo->aLastSpellContentSelections.size() > 0, "aLastSpellContentSelections should not be empty here" );
+
//select the complete sentence
SpellContentSelections::const_iterator aCurrentEndPosition = pSpellInfo->aLastSpellContentSelections.end();
--aCurrentEndPosition;
diff --git a/officecfg/registry/data/org/openoffice/Office/Math.xcu b/officecfg/registry/data/org/openoffice/Office/Math.xcu
index 3acc948129..b040267907 100644..100755
--- a/officecfg/registry/data/org/openoffice/Office/Math.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Math.xcu
@@ -48,6 +48,8 @@
<value>0</value>
</prop>
</node>
+
+ <!-- only used for symbols with the 'Greek' symbol set name -->
<node oor:name="Id2" oor:op="replace">
<prop oor:name="Name">
<value>OpenSymbol</value>
@@ -65,10 +67,11 @@
<value>0</value>
</prop>
<prop oor:name="Italic">
- <value>2</value>
+ <value>0</value>
</prop>
</node>
</node>
+
<node oor:name="SymbolList">
<node oor:name="alpha" oor:op="replace">
<prop oor:name="Char">
diff --git a/officecfg/registry/schema/org/openoffice/Office/Math.xcs b/officecfg/registry/schema/org/openoffice/Office/Math.xcs
index caa8726b7c..31f6e00a23 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Math.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Math.xcs
@@ -402,7 +402,28 @@
</info>
<value>false</value>
</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 -->
<!-- OldLocation: Soffice.cfg -->
<!-- UIHints: Format - Spacing - Category - Brackets - Scale all brackets -->
diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx
index 5577170c90..4f9b41a0dd 100755..100644
--- a/sfx2/source/dialog/securitypage.cxx
+++ b/sfx2/source/dialog/securitypage.cxx
@@ -245,6 +245,36 @@ SfxSecurityPage_Impl::SfxSecurityPage_Impl( SfxSecurityPage &rTabPage, const Sfx
m_aRecordChangesCB.SetStyle( m_aRecordChangesCB.GetStyle() | WB_EARLYTOGGLE );
m_aRecordChangesCB.SetToggleHdl( LINK( this, SfxSecurityPage_Impl, RecordChangesCBToggleHdl ) );
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 );
}
diff --git a/sfx2/source/dialog/securitypage.src b/sfx2/source/dialog/securitypage.src
index 4818068990..4818068990 100755..100644
--- a/sfx2/source/dialog/securitypage.src
+++ b/sfx2/source/dialog/securitypage.src
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 2486f4e9fb..8122e61147 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -977,6 +977,8 @@ sal_Bool SAL_CALL SfxBaseModel::attachResource( const ::rtl::OUString&
aArgs.remove( "BreakMacroSignature" );
aArgs.remove( "Stream" );
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
@@ -988,6 +990,10 @@ sal_Bool SAL_CALL SfxBaseModel::attachResource( const ::rtl::OUString&
SfxAllItemSet aSet( pObjectShell->GetPool() );
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 );
SFX_ITEMSET_ARG( &aSet, pItem, SfxStringItem, SID_FILTER_NAME, sal_False );
if ( pItem )
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 21d10471fc..a8edc018ce 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -813,6 +813,13 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
xNewObj->SetModifyPasswordEntered( sal_False );
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() )
{
@@ -2144,6 +2151,8 @@ SfxViewShell* SfxViewFrame::LoadViewIntoFrame_Impl( const SfxObjectShell& i_rDoc
aTransformLoadArgs.remove( "Hidden" );
::rtl::OUString sURL( RTL_CONSTASCII_USTRINGPARAM( "private:object" ) );
+ if ( !sURL.getLength() )
+ sURL = i_rDoc.GetFactory().GetFactoryURL();
Reference< XComponentLoader > xLoader( i_rFrame, UNO_QUERY_THROW );
xLoader->loadComponentFromURL( sURL, ::rtl::OUString::createFromAscii( "_self" ), 0,