You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by al...@apache.org on 2014/03/19 11:15:07 UTC

svn commit: r1579184 [28/33] - in /openoffice/branches/alg_writerframes: ./ ext_sources/ extras/l10n/source/de/ extras/l10n/source/es/ extras/l10n/source/eu/ extras/l10n/source/hi/ extras/l10n/source/kk/ extras/l10n/source/lt/ extras/l10n/source/nb/ ex...

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/app/docsh2.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/app/docsh2.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/app/docsh2.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/app/docsh2.cxx Wed Mar 19 10:14:42 2014
@@ -242,12 +242,10 @@ void lcl_processCompatibleSfxHint( const
 
 void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
 {
-	if( !pDoc )
-	{
-//MA: Kommt bei der OLE-Registration vor!
-//		ASSERT( !this, "DocShell ist nicht richtig initialisiert!" );
-		return ;
-	}
+    if( !pDoc )
+    {
+        return ;
+    }
 
 #ifdef FUTURE_VBA
     uno::Reference< script::vba::XVBAEventProcessor > xVbaEvents = pDoc->GetVbaEventProcessor();
@@ -255,74 +253,66 @@ void SwDocShell::Notify( SfxBroadcaster&
         lcl_processCompatibleSfxHint( xVbaEvents, rHint );
 #endif
 
-	sal_uInt16 nAction = 0;
-	if( rHint.ISA(SfxSimpleHint) )
-	{
-		// swithc for more actions
-		switch( ((SfxSimpleHint&) rHint).GetId() )
-		{
-            case SFX_HINT_TITLECHANGED:
-                if( GetMedium() )
-                    nAction = 2;
-			break;
+    sal_uInt16 nAction = 0;
+    if( rHint.ISA(SfxSimpleHint) )
+    {
+        // swithc for more actions
+        switch( ((SfxSimpleHint&) rHint).GetId() )
+        {
+        case SFX_HINT_TITLECHANGED:
+            if( GetMedium() )
+                nAction = 2;
+            break;
         }
-	}
-	else if( rHint.ISA(SfxEventHint) &&
+    }
+    else if( rHint.ISA(SfxEventHint) &&
         ((SfxEventHint&) rHint).GetEventId() == SFX_EVENT_LOADFINISHED )
     {
-        // --> OD 2004-12-03 #i38126# - own action id
         nAction = 3;
-        // <--
     }
 
-	if( nAction )
-	{
+    if( nAction )
+    {
         sal_Bool bUnlockView = sal_True; //initializing prevents warning
-		if( pWrtShell )
-		{
-			bUnlockView = !pWrtShell->IsViewLocked();
-			pWrtShell->LockView( sal_True );	//lock visible section
-			pWrtShell->StartAllAction();
-		}
-		switch( nAction )
-		{
-		case 2:
-			pDoc->GetSysFldType( RES_FILENAMEFLD )->UpdateFlds();
-			break;
-        // --> OD 2004-12-03 #i38126# - own action for event LOADFINISHED
-        // in order to avoid a modified document.
-        // --> OD 2005-02-01 #i41679# - Also for the instance of <SwDoc>
-        // it has to be assured, that it's not modified.
+        if( pWrtShell )
+        {
+            bUnlockView = !pWrtShell->IsViewLocked();
+            pWrtShell->LockView( sal_True );	//lock visible section
+            pWrtShell->StartAllAction();
+        }
+        switch( nAction )
+        {
+        case 2:
+            pDoc->GetSysFldType( RES_FILENAMEFLD )->UpdateFlds();
+            break;
+
+        // own action for event LOADFINISHED in order to avoid a modified document.
+        // Also for the instance of <SwDoc> it has to be assured, that it's not modified.
         // Perform the same as for action id 1, but disable <SetModified>.
         case 3:
             {
                 const bool bResetModified = IsEnableSetModified();
                 if ( bResetModified )
                     EnableSetModified( sal_False );
-                // --> OD 2005-02-01 #i41679#
                 const bool bIsDocModified = pDoc->IsModified();
-                // <--
 
                 pDoc->DocInfoChgd( );
 
-                // --> OD 2005-02-01 #i41679#
                 if ( !bIsDocModified )
                     pDoc->ResetModified();
-                // <--
                 if ( bResetModified )
                     EnableSetModified( sal_True );
             }
             break;
-        // <--
-		}
+        }
 
-		if( pWrtShell )
-		{
-			pWrtShell->EndAllAction();
-			if( bUnlockView )
-				pWrtShell->LockView( sal_False );
-		}
-	}
+        if( pWrtShell )
+        {
+            pWrtShell->EndAllAction();
+            if( bUnlockView )
+                pWrtShell->LockView( sal_False );
+        }
+    }
 }
 
 /*--------------------------------------------------------------------
@@ -1445,7 +1435,7 @@ void SwDocShell::Execute(SfxRequest& rRe
 				{
 					if( PrepareClose( sal_False ) )
 					{
-						SwWait aWait( *this, sal_True );
+						SwWait aWait( *this, true );
 
 						//bDone = bCreateHtml			//#outline level,removed by zhaojianwei
 						//	? pDoc->GenerateHTMLDoc( aFileName, pSplitColl )

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/app/docshini.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/app/docshini.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/app/docshini.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/app/docshini.cxx Wed Mar 19 10:14:42 2014
@@ -567,7 +567,7 @@ sal_Bool  SwDocShell::Load( SfxMedium& r
                 nUpdateDocMode = pUpdateDocItem ? pUpdateDocItem->GetValue() : document::UpdateDocMode::NO_UPDATE;
             }
 
-		SwWait aWait( *this, sal_True );
+		SwWait aWait( *this, true );
 		sal_uInt32 nErr = ERR_SWG_READ_ERROR;
 		switch( GetCreateMode() )
 		{
@@ -684,7 +684,7 @@ sal_Bool  SwDocShell::LoadFrom( SfxMediu
         if ( xAccess->hasByName( aStreamName ) && rMedium.GetStorage()->isStreamElement( aStreamName ) )
 		{
 			// Das Laden
-			SwWait aWait( *this, sal_True );
+			SwWait aWait( *this, true );
 			{
 				ASSERT( !mxBasePool.is(), "wer hat seinen Pool nicht zerstoert?" );
 				mxBasePool = new SwDocStyleSheetPool( *pDoc, SFX_CREATE_MODE_ORGANIZER == GetCreateMode() );

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/app/docst.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/app/docst.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/app/docst.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/app/docst.cxx Wed Mar 19 10:14:42 2014
@@ -219,7 +219,7 @@ void  SwDocShell::StateStyleSheet(SfxIte
 			break;
 			case SID_STYLE_FAMILY5:
 				{
-					const SwNumRule* pRule = pShell->GetCurNumRule();
+					const SwNumRule* pRule = pShell->GetNumRuleAtCurrCrsrPos();
 					if( pRule )
 						aName = pRule->GetName();
 
@@ -239,7 +239,7 @@ void  SwDocShell::StateStyleSheet(SfxIte
 						? SFX_STYLE_FAMILY_FRAME != nActualFamily
 						: ( SFX_STYLE_FAMILY_FRAME == nActualFamily ||
 							SFX_STYLE_FAMILY_PAGE == nActualFamily ||
-							(SFX_STYLE_FAMILY_PSEUDO == nActualFamily && !pShell->GetCurNumRule())) )
+							(SFX_STYLE_FAMILY_PSEUDO == nActualFamily && !pShell->GetNumRuleAtCurrCrsrPos())) )
 				{
 					rSet.DisableItem( nWhich );
 				}
@@ -249,7 +249,7 @@ void  SwDocShell::StateStyleSheet(SfxIte
 				if( (pShell->IsFrmSelected()
 						? SFX_STYLE_FAMILY_FRAME != nActualFamily
 						: SFX_STYLE_FAMILY_FRAME == nActualFamily) ||
-					(SFX_STYLE_FAMILY_PSEUDO == nActualFamily && !pShell->GetCurNumRule()) )
+					(SFX_STYLE_FAMILY_PSEUDO == nActualFamily && !pShell->GetNumRuleAtCurrCrsrPos()) )
 				{
 					rSet.DisableItem( nWhich );
 				}
@@ -882,69 +882,72 @@ sal_uInt16 SwDocShell::Delete(const Stri
  --------------------------------------------------------------------*/
 
 
-sal_uInt16 SwDocShell::ApplyStyles(const String &rName, sal_uInt16 nFamily,
-							   SwWrtShell* pShell, sal_uInt16 nMode )
+sal_uInt16 SwDocShell::ApplyStyles(
+    const String &rName,
+    const sal_uInt16 nFamily,
+    SwWrtShell* pShell,
+    const sal_uInt16 nMode )
 {
-	SwDocStyleSheet* pStyle =
-		(SwDocStyleSheet*)mxBasePool->Find(rName, (SfxStyleFamily)nFamily);
+    SwDocStyleSheet* pStyle = (SwDocStyleSheet*) mxBasePool->Find( rName, (SfxStyleFamily) nFamily );
 
-	ASSERT(pStyle, "Wo ist der StyleSheet");
-	if(!pStyle)
-		return sal_False;
+    ASSERT( pStyle, "Wo ist der StyleSheet" );
+    if ( !pStyle )
+        return sal_False;
 
-	SwWrtShell *pSh = pShell ? pShell : GetWrtShell();
+    SwWrtShell *pSh = pShell ? pShell : GetWrtShell();
 
-	ASSERT( pSh, "Keine Shell, keine Styles");
+    ASSERT( pSh, "Keine Shell, keine Styles" );
 
-	pSh->StartAllAction();
+    pSh->StartAllAction();
 
-	switch(nFamily)
-	{
-		case SFX_STYLE_FAMILY_CHAR:
-		{
-			SwFmtCharFmt aFmt(pStyle->GetCharFmt());
-			pSh->SetAttrItem( aFmt, (nMode & KEY_SHIFT) ?
-                nsSetAttrMode::SETATTR_DONTREPLACE : nsSetAttrMode::SETATTR_DEFAULT );
-			break;
-		}
-		case SFX_STYLE_FAMILY_PARA:
-		{
-            // --> OD 2007-11-06 #i62675#
-            // clear also list attributes at affected text nodes, if paragraph
-            // style has the list style attribute set.
-            pSh->SetTxtFmtColl( pStyle->GetCollection(), true );
-            // <--
-			break;
-		}
-		case SFX_STYLE_FAMILY_FRAME:
-		{
-			if ( pSh->IsFrmSelected() )
-				pSh->SetFrmFmt( pStyle->GetFrmFmt() );
-			break;
-		}
-		case SFX_STYLE_FAMILY_PAGE:
-		{
-			pSh->SetPageStyle(pStyle->GetPageDesc()->GetName());
-			break;
-		}
-		case SFX_STYLE_FAMILY_PSEUDO:
-		{
-            // --> OD 2008-02-08 #newlistlevelattrs#
-            // reset indent attribute on applying list style
-            // --> OD 2008-03-17 #refactorlists#
-            // continue list of list style
-            const SwNumRule* pNumRule = pStyle->GetNumRule();
-            const String sListIdForStyle =pNumRule->GetDefaultListId();
-            pSh->SetCurNumRule( *pNumRule, false, sListIdForStyle, true );
-            // <--
-			break;
-		}
-		default:
-			DBG_ERROR("Unbekannte Familie");
-	}
-	pSh->EndAllAction();
+    switch (nFamily)
+    {
+    case SFX_STYLE_FAMILY_CHAR:
+    {
+        SwFmtCharFmt aFmt( pStyle->GetCharFmt() );
+        pSh->SetAttrItem( aFmt, ( nMode & KEY_SHIFT ) ? nsSetAttrMode::SETATTR_DONTREPLACE : nsSetAttrMode::SETATTR_DEFAULT );
+        break;
+    }
+    case SFX_STYLE_FAMILY_PARA:
+    {
+        // --> OD 2007-11-06 #i62675#
+        // clear also list attributes at affected text nodes, if paragraph
+        // style has the list style attribute set.
+        pSh->SetTxtFmtColl( pStyle->GetCollection(), true );
+        // <--
+        break;
+    }
+    case SFX_STYLE_FAMILY_FRAME:
+    {
+        if ( pSh->IsFrmSelected() )
+            pSh->SetFrmFmt( pStyle->GetFrmFmt() );
+        break;
+    }
+    case SFX_STYLE_FAMILY_PAGE:
+    {
+        pSh->SetPageStyle( pStyle->GetPageDesc()->GetName() );
+        break;
+    }
 
-	return nFamily;
+    case SFX_STYLE_FAMILY_PSEUDO:
+    {
+        // --> OD 2008-02-08 #newlistlevelattrs#
+        // reset indent attribute on applying list style
+        // --> OD 2008-03-17 #refactorlists#
+        // continue list of list style
+        const SwNumRule* pNumRule = pStyle->GetNumRule();
+        const String sListIdForStyle = pNumRule->GetDefaultListId();
+        pSh->SetCurNumRule( *pNumRule, false, sListIdForStyle, true );
+        // <--
+        break;
+    }
+
+    default:
+        DBG_ERROR( "Unbekannte Familie" );
+    }
+    pSh->EndAllAction();
+
+    return nFamily;
 }
 
 /*--------------------------------------------------------------------
@@ -1083,7 +1086,7 @@ sal_uInt16 SwDocShell::UpdateStyle(const
 		{
 			const SwNumRule* pCurRule;
 			if( pStyle->GetNumRule() &&
-                0 != ( pCurRule = pCurrWrtShell->GetCurNumRule() ))
+                0 != ( pCurRule = pCurrWrtShell->GetNumRuleAtCurrCrsrPos() ))
 			{
 				SwNumRule aRule( *pCurRule );
                 // --> OD 2008-07-08 #i91400#
@@ -1244,7 +1247,7 @@ sal_uInt16 SwDocShell::MakeByExample( co
 		{
             pCurrWrtShell->StartAllAction();
 
-            SwNumRule aRule( *pCurrWrtShell->GetCurNumRule() );
+            SwNumRule aRule( *pCurrWrtShell->GetNumRuleAtCurrCrsrPos() );
 			String sOrigRule( aRule.GetName() );
             // --> OD 2008-07-08 #i91400#
             aRule.SetName( pStyle->GetNumRule()->GetName(),

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/app/swwait.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/app/swwait.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/app/swwait.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/app/swwait.cxx Wed Mar 19 10:14:42 2014
@@ -24,48 +24,69 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
+#include <swwait.hxx>
+#include <docsh.hxx>
 
 #include <sfx2/viewfrm.hxx>
 #include <sfx2/dispatch.hxx>
 #include <vcl/window.hxx>
-#include <docsh.hxx>
-#include <swwait.hxx>
 
 
-void SwDocShell::EnterWait( sal_Bool bLockDispatcher )
+SwWait::SwWait(
+    SwDocShell &rDocShell,
+    const bool bLockUnlockDispatcher )
+    : mrDoc ( rDocShell )
+    , mbLockUnlockDispatcher( bLockUnlockDispatcher )
+    , mpLockedDispatchers()
 {
-	SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, sal_False );
-	while ( pFrame )
-	{
-		pFrame->GetWindow().EnterWait();
-		if ( bLockDispatcher )
-			pFrame->GetDispatcher()->Lock( sal_True );
-		pFrame = SfxViewFrame::GetNext( *pFrame, this, sal_False );
-	}
+	EnterWaitAndLockDispatcher();
 }
 
-void SwDocShell::LeaveWait( sal_Bool bLockDispatcher )
+SwWait::~SwWait()
 {
-	SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, sal_False );
-	while ( pFrame )
-	{
-		pFrame->GetWindow().LeaveWait();
-		if ( bLockDispatcher )
-			pFrame->GetDispatcher()->Lock( sal_False );
-		pFrame = SfxViewFrame::GetNext( *pFrame, this, sal_False );
-	}
+	LeaveWaitAndUnlockDispatcher();
 }
 
-SwWait::SwWait( SwDocShell &rDocShell, sal_Bool bLockDispatcher ) :
-	rDoc ( rDocShell ),
-	bLock( bLockDispatcher )
+void SwWait::EnterWaitAndLockDispatcher()
 {
-	rDoc.EnterWait( bLock );
+    SfxViewFrame *pFrame = SfxViewFrame::GetFirst( &mrDoc, sal_False );
+    while ( pFrame )
+    {
+        pFrame->GetWindow().EnterWait();
+        if ( mbLockUnlockDispatcher )
+        {
+            // do not look already locked dispatchers
+            SfxDispatcher* pDispatcher = pFrame->GetDispatcher();
+            if ( !pDispatcher->IsLocked() )
+            {
+                pDispatcher->Lock( sal_True );
+                mpLockedDispatchers.insert( pDispatcher );
+            }
+        }
+
+        pFrame = SfxViewFrame::GetNext( *pFrame, &mrDoc, sal_False );
+    }
 }
 
-SwWait::~SwWait()
+void SwWait::LeaveWaitAndUnlockDispatcher()
 {
-	rDoc.LeaveWait( bLock );
+    SfxViewFrame *pFrame = SfxViewFrame::GetFirst( &mrDoc, sal_False );
+    while ( pFrame )
+    {
+        pFrame->GetWindow().LeaveWait();
+        if ( mbLockUnlockDispatcher )
+        {
+            // only unlock dispatchers which had been locked
+            SfxDispatcher* pDispatcher = pFrame->GetDispatcher();
+            if ( mpLockedDispatchers.find( pDispatcher ) != mpLockedDispatchers.end() )
+            {
+                mpLockedDispatchers.erase( pDispatcher );
+                pDispatcher->Lock( sal_False );
+            }
+        }
+
+        pFrame = SfxViewFrame::GetNext( *pFrame, &mrDoc, sal_False );
+    }
 }
 
 

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/chrdlg/chardlg.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/chrdlg/chardlg.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/chrdlg/chardlg.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/chrdlg/chardlg.cxx Wed Mar 19 10:14:42 2014
@@ -275,24 +275,31 @@ SwCharURLPage::~SwCharURLPage()
 
 void SwCharURLPage::Reset(const SfxItemSet& rSet)
 {
-	const SfxPoolItem* pItem;
-	if(SFX_ITEM_SET == rSet.GetItemState(RES_TXTATR_INETFMT, sal_False, &pItem))
-	{
-		const SwFmtINetFmt* pINetFmt = (const SwFmtINetFmt*)pItem;
-		aURLED.SetText( INetURLObject::decode( pINetFmt->GetValue(),
-										INET_HEX_ESCAPE,
-						   				INetURLObject::DECODE_UNAMBIGUOUS,
-										RTL_TEXTENCODING_UTF8 ));
-		aURLED.SaveValue();
-		aNameED.SetText(pINetFmt->GetName());
-		String sEntry = pINetFmt->GetVisitedFmt();
-		if( !sEntry.Len() )
-			SwStyleNameMapper::FillUIName( RES_POOLCHR_INET_VISIT, sEntry );
-		aVisitedLB.SelectEntry(sEntry);
-		sEntry = pINetFmt->GetINetFmt();
-		if(!sEntry.Len())
-			SwStyleNameMapper::FillUIName( RES_POOLCHR_INET_NORMAL, sEntry );
-		aNotVisitedLB.SelectEntry(sEntry);
+    const SfxPoolItem* pItem;
+    if ( SFX_ITEM_SET == rSet.GetItemState( RES_TXTATR_INETFMT, sal_False, &pItem ) )
+    {
+        const SwFmtINetFmt* pINetFmt = (const SwFmtINetFmt*) pItem;
+        aURLED.SetText( INetURLObject::decode( pINetFmt->GetValue(),
+        INET_HEX_ESCAPE, INetURLObject::DECODE_UNAMBIGUOUS,
+        RTL_TEXTENCODING_UTF8 ) );
+        aURLED.SaveValue();
+        aNameED.SetText( pINetFmt->GetName() );
+
+        String sEntry = pINetFmt->GetVisitedFmt();
+        if ( sEntry.Len() == 0 )
+        {
+            ASSERT( false, "<SwCharURLPage::Reset(..)> - missing visited character format at hyperlink attribute" );
+            SwStyleNameMapper::FillUIName( RES_POOLCHR_INET_VISIT, sEntry );
+        }
+        aVisitedLB.SelectEntry( sEntry );
+
+        sEntry = pINetFmt->GetINetFmt();
+        if ( sEntry.Len() == 0 )
+        {
+            ASSERT( false, "<SwCharURLPage::Reset(..)> - missing unvisited character format at hyperlink attribute" );
+            SwStyleNameMapper::FillUIName( RES_POOLCHR_INET_NORMAL, sEntry );
+        }
+        aNotVisitedLB.SelectEntry( sEntry );
 
 		aTargetFrmLB.SetText(pINetFmt->GetTargetFrame());
 		aVisitedLB.   SaveValue();
@@ -337,13 +344,11 @@ sal_Bool SwCharURLPage::FillItemSet(SfxI
 	//zuerst die gueltigen Einstellungen setzen
 	String sEntry = aVisitedLB.GetSelectEntry();
 	sal_uInt16 nId = SwStyleNameMapper::GetPoolIdFromUIName( sEntry, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
-	aINetFmt.SetVisitedFmtId(nId);
-	aINetFmt.SetVisitedFmt(nId == RES_POOLCHR_INET_VISIT ? aEmptyStr : sEntry);
+	aINetFmt.SetVisitedFmtAndId( sEntry, nId );
 
 	sEntry = aNotVisitedLB.GetSelectEntry();
 	nId = SwStyleNameMapper::GetPoolIdFromUIName( sEntry, nsSwGetPoolIdFromName::GET_POOLID_CHRFMT);
-	aINetFmt.SetINetFmtId( nId );
-	aINetFmt.SetINetFmt(nId == RES_POOLCHR_INET_NORMAL ? aEmptyStr : sEntry);
+	aINetFmt.SetINetFmtAndId( sEntry, nId );
 
 	if( pINetItem && pINetItem->GetMacroTable().Count() )
 		aINetFmt.SetMacroTbl( &pINetItem->GetMacroTable() );

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/dbui/dbinsdlg.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/dbui/dbinsdlg.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/dbui/dbinsdlg.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/dbui/dbinsdlg.cxx Wed Mar 19 10:14:42 2014
@@ -1223,7 +1223,7 @@ void SwInsertDBColAutoPilot::DataToDoc( 
 				break;
 
 			if( 10 == i )
-				pWait = ::std::auto_ptr<SwWait>(new SwWait( *pView->GetDocShell(), sal_True ));
+				pWait = ::std::auto_ptr<SwWait>(new SwWait( *pView->GetDocShell(), true ));
 		}
 
         rSh.MoveTable( GetfnTableCurr(), GetfnTableStart() );
@@ -1455,7 +1455,7 @@ void SwInsertDBColAutoPilot::DataToDoc( 
 					rSh.SwEditShell::SplitNode();
 
 				if( 10 == i )
-					pWait = ::std::auto_ptr<SwWait>(new SwWait( *pView->GetDocShell(), sal_True ));
+					pWait = ::std::auto_ptr<SwWait>(new SwWait( *pView->GetDocShell(), true ));
 			}
 
 			if( !bSetCrsr && pMark != NULL)

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/dbui/dbmgr.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/dbui/dbmgr.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/dbui/dbmgr.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/dbui/dbmgr.cxx Wed Mar 19 10:14:42 2014
@@ -504,7 +504,7 @@ void SwNewDBMgr::ImportFromConnection(	S
 
 					ImportDBEntry(pSh);
 					if( 10 == ++i )
-						pWait = new SwWait( *pSh->GetView().GetDocShell(), sal_True);
+						pWait = new SwWait( *pSh->GetView().GetDocShell(), true );
 
 				} while(ToNextMergeRecord());
 			}

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/dialog/docstdlg.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/dialog/docstdlg.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/dialog/docstdlg.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/dialog/docstdlg.cxx Wed Mar 19 10:14:42 2014
@@ -166,7 +166,7 @@ void SwDocStatPage::Update()
 
 	ASSERT( pSh, "Shell not found" );
 
-	SwWait aWait( *pSh->GetDoc()->GetDocShell(), sal_True );
+	SwWait aWait( *pSh->GetDoc()->GetDocShell(), true );
 	pSh->StartAction();
     aDocStat = pSh->GetDoc()->GetDocStat();
 	pSh->GetDoc()->UpdateDocStat( aDocStat );

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/dochdl/swdtflvr.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/dochdl/swdtflvr.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/dochdl/swdtflvr.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/dochdl/swdtflvr.cxx Wed Mar 19 10:14:42 2014
@@ -831,7 +831,7 @@ int SwTransferable::PrepareForCopy( sal_
 	{
 		SwWait *pWait = 0;
 		if( pWrtShell->ShouldWait() )
-			pWait = new SwWait( *pWrtShell->GetView().GetDocShell(), sal_True );
+			pWait = new SwWait( *pWrtShell->GetView().GetDocShell(), true );
 
 		pClpDocFac = new SwDocFac;
 
@@ -996,7 +996,7 @@ int SwTransferable::CalculateAndCopy()
 {
     if(!pWrtShell)
         return 0;
-    SwWait aWait( *pWrtShell->GetView().GetDocShell(), sal_True );
+    SwWait aWait( *pWrtShell->GetView().GetDocShell(), true );
 
 	String aStr( pWrtShell->Calculate() );
 
@@ -1018,7 +1018,7 @@ int SwTransferable::CopyGlossary( SwText
 {
     if(!pWrtShell)
         return 0;
-    SwWait aWait( *pWrtShell->GetView().GetDocShell(), sal_True );
+    SwWait aWait( *pWrtShell->GetView().GetDocShell(), true );
 
 	pClpDocFac = new SwDocFac;
     SwDoc *const pCDoc = lcl_GetDoc(*pClpDocFac);
@@ -1163,8 +1163,7 @@ int SwTransferable::PasteData( Transfera
 							const Point* pPt, sal_Int8 nDropAction,
 							sal_Bool bPasteSelection )
 {
-	SwWait aWait( *rSh.GetView().
-		GetDocShell(), sal_False );
+	SwWait aWait( *rSh.GetView().GetDocShell(), false );
 	SwTrnsfrActionAndUndo* pAction = 0;
 	SwModule* pMod = SW_MOD();
 
@@ -1347,6 +1346,7 @@ ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIV
 
 			case SOT_FORMATSTR_ID_SVXB:
 			case SOT_FORMAT_BITMAP:
+            case SOT_FORMATSTR_ID_PNG:
 			case SOT_FORMAT_GDIMETAFILE:
 				nRet = SwTransferable::_PasteGrf( rData, rSh, nFormat,
 												SW_PASTESDR_INSERT,pPt,
@@ -1475,6 +1475,7 @@ ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIV
 			case SOT_FORMATSTR_ID_SVXB:
 			case SOT_FORMAT_GDIMETAFILE:
 			case SOT_FORMAT_BITMAP:
+            case SOT_FORMATSTR_ID_PNG:
 			case SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK:
 			case SOT_FORMAT_FILE:
 			case SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR:
@@ -1997,7 +1998,7 @@ int SwTransferable::_PasteTargetURL( Tra
 
 				case SW_PASTESDR_SETATTR:
 					if( rSh.IsObjSelected() )
-						rSh.Paste( aGrf );
+						rSh.Paste( aGrf, String() );
 					else if( OBJCNT_GRF == rSh.GetObjCntTypeOfSelection() )
 						rSh.ReRead( sURL, aEmptyStr, &aGrf );
 					else
@@ -2270,7 +2271,7 @@ int SwTransferable::_PasteSdrFormat(  Tr
 
 int SwTransferable::_PasteGrf( TransferableDataHelper& rData, SwWrtShell& rSh,
 								sal_uLong nFmt, sal_uInt16 nAction, const Point* pPt,
-								sal_uInt8 nActionFlags, sal_Int8 /* nDropAction */, bool bNeedToSelectBeforePaste)
+								sal_uInt8 nActionFlags, sal_Int8 nDropAction, bool bNeedToSelectBeforePaste)
 {
 	int nRet = 0;
 
@@ -2281,6 +2282,7 @@ int SwTransferable::_PasteGrf( Transfera
 	switch( nFmt )
 	{
 	case SOT_FORMAT_BITMAP:
+    case SOT_FORMATSTR_ID_PNG:
 	case SOT_FORMAT_GDIMETAFILE:
 		nRet = rData.GetGraphic( nFmt, aGrf );
 		break;
@@ -2368,55 +2370,85 @@ int SwTransferable::_PasteGrf( Transfera
 
 	if( nRet )
 	{
-		String sURL;
-		if( rSh.GetView().GetDocShell()->ISA(SwWebDocShell) )
-			sURL = aBkmk.GetURL();
+        String sURL;
 
-		switch( nAction )
-		{
-		case SW_PASTESDR_INSERT:
-			SwTransferable::SetSelInShell( rSh, sal_False, pPt );
-			rSh.Insert( sURL, aEmptyStr, aGrf );
-        break;
+        if( rSh.GetView().GetDocShell()->ISA(SwWebDocShell)
+            // #123922# if link action is noted, also take URL
+            || DND_ACTION_LINK == nDropAction)
+        {
+            sURL = aBkmk.GetURL();
+        }
 
-		case SW_PASTESDR_REPLACE:
-			if( rSh.IsObjSelected() )
-			{
-				rSh.ReplaceSdrObj( sURL, aEmptyStr, &aGrf );
-				Point aPt( pPt ? *pPt : rSh.GetCrsrDocPos() );
-				SwTransferable::SetSelInShell( rSh, sal_True, &aPt );
-			}
-			else
-				rSh.ReRead( sURL, aEmptyStr, &aGrf );
-			break;
+        switch( nAction )
+        {
+            case SW_PASTESDR_INSERT:
+            {
+                SwTransferable::SetSelInShell( rSh, sal_False, pPt );
+                rSh.Insert( sURL, aEmptyStr, aGrf );
+                break;
+            }
 
-		case SW_PASTESDR_SETATTR:
-			if( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK == nFmt )
-			{
-				if( rSh.IsFrmSelected() )
-				{
-					SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL );
-					rSh.GetFlyFrmAttr( aSet );
-					SwFmtURL aURL( (SwFmtURL&)aSet.Get( RES_URL ) );
-					aURL.SetURL( aBkmk.GetURL(), sal_False );
-					aSet.Put( aURL );
-					rSh.SetFlyFrmAttr( aSet );
-				}
-			}
-			else if( rSh.IsObjSelected() )
-				rSh.Paste( aGrf );
-			else if( OBJCNT_GRF == rSh.GetObjCntTypeOfSelection() )
-				rSh.ReRead( sURL, aEmptyStr, &aGrf );
-			else
-			{
-				SwTransferable::SetSelInShell( rSh, sal_False, pPt );
-				rSh.Insert( aBkmk.GetURL(), aEmptyStr, aGrf );
-			}
-			break;
-		default:
-			nRet = 0;
-		}
-	}
+            case SW_PASTESDR_REPLACE:
+            {
+                if( rSh.IsObjSelected() )
+                {
+                    // #123922# for D&D on draw objects, do for now the same for
+                    // SW_PASTESDR_REPLACE (D&D) as for SW_PASTESDR_SETATTR (D&D and
+                    // CTRL+SHIFT). The code below replaces the draw object with
+                    // a writer graphic; maybe this is an option later again if wanted
+                    rSh.Paste( aGrf, sURL );
+
+                    // rSh.ReplaceSdrObj( sURL, aEmptyStr, &aGrf );
+                    // Point aPt( pPt ? *pPt : rSh.GetCrsrDocPos() );
+                    // SwTransferable::SetSelInShell( rSh, sal_True, &aPt );
+                }
+                else
+                {
+                    // set graphic at writer graphic without link
+                    rSh.ReRead( sURL, aEmptyStr, &aGrf );
+                }
+
+                break;
+            }
+
+            case SW_PASTESDR_SETATTR:
+            {
+                if( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK == nFmt )
+                {
+                    if( rSh.IsFrmSelected() )
+                    {
+                        SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL );
+                        rSh.GetFlyFrmAttr( aSet );
+                        SwFmtURL aURL( (SwFmtURL&)aSet.Get( RES_URL ) );
+                        aURL.SetURL( aBkmk.GetURL(), sal_False );
+                        aSet.Put( aURL );
+                        rSh.SetFlyFrmAttr( aSet );
+                    }
+                }
+                else if( rSh.IsObjSelected() )
+                {
+                    // set as attribute at DrawObject
+                    rSh.Paste( aGrf, sURL );
+                }
+                else if( OBJCNT_GRF == rSh.GetObjCntTypeOfSelection() )
+                {
+                    // set as linked graphic at writer graphic frame
+                    rSh.ReRead( sURL, aEmptyStr, &aGrf );
+                }
+                else
+                {
+                    SwTransferable::SetSelInShell( rSh, sal_False, pPt );
+                    rSh.Insert( aBkmk.GetURL(), aEmptyStr, aGrf );
+                }
+                break;
+            }
+            default:
+            {
+                nRet = 0;
+                break;
+            }
+        }
+    }
 
 	if( nRet )
 	{
@@ -2821,7 +2853,7 @@ int SwTransferable::PasteFormat( SwWrtSh
 									TransferableDataHelper& rData,
 									sal_uLong nFormat )
 {
-	SwWait aWait( *rSh.GetView().GetDocShell(), sal_False );
+	SwWait aWait( *rSh.GetView().GetDocShell(), false );
 	int nRet = 0;
 
 	sal_uLong nPrivateFmt = FORMAT_PRIVATE;

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/docvw/SidebarWin.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/docvw/SidebarWin.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/docvw/SidebarWin.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/docvw/SidebarWin.cxx Wed Mar 19 10:14:42 2014
@@ -593,11 +593,26 @@ void SwSidebarWin::SetPosAndSize()
                 SwNodes& rNds = pTxtNode->GetDoc()->GetNodes();
                 SwCntntNode* const pCntntNd = rNds[mrSidebarItem.maLayoutInfo.mnStartNodeIdx]->GetCntntNode();
                 SwPosition aStartPos( *pCntntNd, mrSidebarItem.maLayoutInfo.mnStartContent );
-                ::boost::scoped_ptr<SwShellCrsr> pTmpCrsrForAnnotationTextRange(
-                    new SwShellCrsr( DocView().GetWrtShell(), aStartPos ) );
-                pTmpCrsrForAnnotationTextRange->SetMark();
-                pTmpCrsrForAnnotationTextRange->GetMark()->nNode = *pTxtNode;
-                pTmpCrsrForAnnotationTextRange->GetMark()->nContent.Assign( pTxtNode, *(pTxtAnnotationFld->GetStart())+1 );
+                SwShellCrsr* pTmpCrsr = NULL;
+                const bool bTableCrsrNeeded = pTxtNode->FindTableBoxStartNode() != pCntntNd->FindTableBoxStartNode();
+                if ( bTableCrsrNeeded )
+                {
+                    SwShellTableCrsr* pTableCrsr = new SwShellTableCrsr( DocView().GetWrtShell(), aStartPos );
+                    pTableCrsr->SetMark();
+                    pTableCrsr->GetMark()->nNode = *pTxtNode;
+                    pTableCrsr->GetMark()->nContent.Assign( pTxtNode, *(pTxtAnnotationFld->GetStart())+1 );
+                    pTableCrsr->NewTableSelection();
+                    pTmpCrsr = pTableCrsr;
+                }
+                else
+                {
+                    SwShellCrsr* pCrsr = new SwShellCrsr( DocView().GetWrtShell(), aStartPos );
+                    pCrsr->SetMark();
+                    pCrsr->GetMark()->nNode = *pTxtNode;
+                    pCrsr->GetMark()->nContent.Assign( pTxtNode, *(pTxtAnnotationFld->GetStart())+1 );
+                    pTmpCrsr = pCrsr;
+                }
+                ::boost::scoped_ptr<SwShellCrsr> pTmpCrsrForAnnotationTextRange( pTmpCrsr );
 
                 pTmpCrsrForAnnotationTextRange->FillRects();
 

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/docvw/edtwin.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/docvw/edtwin.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/docvw/edtwin.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/docvw/edtwin.cxx Wed Mar 19 10:14:42 2014
@@ -301,7 +301,7 @@ void SwEditWin::UpdatePointer(const Poin
     if( pApplyTempl )
     {
         PointerStyle eStyle = POINTER_FILL;
-        if( rSh.IsOverReadOnlyPos( rLPt ))
+        if ( rSh.IsOverReadOnlyPos( rLPt ) )
         {
             if( pUserMarker )
             {
@@ -1819,8 +1819,8 @@ KEYINPUT_CHECKTABLE_INSDEL:
 
                         //RETURN und leerer Absatz in Numerierung -> Num. beenden
                         else if( !aInBuffer.Len() &&
-                                 rSh.GetCurNumRule() &&
-                                 !rSh.GetCurNumRule()->IsOutlineRule() &&
+                                 rSh.GetNumRuleAtCurrCrsrPos() &&
+                                 !rSh.GetNumRuleAtCurrCrsrPos()->IsOutlineRule() &&
                                  !rSh.HasSelection() &&
                                 rSh.IsSttPara() && rSh.IsEndPara() )
                             eKeyState = KS_NumOff, eNextKeyState = KS_OutlineLvOff;
@@ -1840,7 +1840,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
                 case KEY_RETURN | KEY_MOD2:     // ALT-Return
                     if ( !rSh.HasReadonlySel()
                          && !rSh.IsSttPara()
-                         && rSh.GetCurNumRule()
+                         && rSh.GetNumRuleAtCurrCrsrPos()
                          && !rSh.CrsrInsideInputFld() )
                     {
                         eKeyState = KS_NoNum;
@@ -1851,7 +1851,8 @@ KEYINPUT_CHECKTABLE_INSDEL:
 
                 case KEY_BACKSPACE:
                 case KEY_BACKSPACE | KEY_SHIFT:
-                    if( !rSh.HasReadonlySel() )
+                    if ( !rSh.HasReadonlySel()
+                         && !rSh.CrsrInsideInputFld() )
                     {
                         sal_Bool bDone = sal_False;
                         // Remove the paragraph indent, if the cursor is at the
@@ -1860,12 +1861,11 @@ KEYINPUT_CHECKTABLE_INSDEL:
                         // Also try to remove indent, if current paragraph
                         // has numbering rule, but isn't counted and only
                         // key <backspace> is hit.
-                        const bool bOnlyBackspaceKey(
-                                    KEY_BACKSPACE == rKeyCode.GetFullCode() );
-                        if ( rSh.IsSttPara() &&
-                             !rSh.HasSelection() && // i40834
-                             ( NULL == rSh.GetCurNumRule() ||
-                               ( rSh.IsNoNum() && bOnlyBackspaceKey ) ) )
+                        const bool bOnlyBackspaceKey( KEY_BACKSPACE == rKeyCode.GetFullCode() );
+                        if ( rSh.IsSttPara()
+                             && !rSh.HasSelection()
+                             && ( rSh.GetNumRuleAtCurrCrsrPos() == NULL
+                                  || ( rSh.IsNoNum() && bOnlyBackspaceKey ) ) )
                         {
                             bDone = rSh.TryRemoveIndent();
                         }
@@ -1874,11 +1874,10 @@ KEYINPUT_CHECKTABLE_INSDEL:
                             eKeyState = KS_Ende;
                         else
                         {
-                            if (rSh.IsSttPara() &&
-                                ! rSh.IsNoNum())
+                            if ( rSh.IsSttPara() && !rSh.IsNoNum() )
                             {
-                                if (nKS_NUMDOWN_Count > 0 &&
-                                    0 < rSh.GetNumLevel())
+                                if (nKS_NUMDOWN_Count > 0
+                                    && rSh.GetNumLevel() > 0)
                                 {
                                     eKeyState = KS_NumUp;
                                     nKS_NUMDOWN_Count = 2;
@@ -1892,7 +1891,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
                                 }
                             }
                             // If the cursor is in an empty paragraph, which has
-                            // a numbering, but not the oultine numbering, and
+                            // a numbering, but not the outline numbering, and
                             // there is no selection, the numbering has to be
                             // deleted on key <Backspace>.
                             // Otherwise method <SwEditShell::NumOrNoNum(..)>
@@ -1902,37 +1901,35 @@ KEYINPUT_CHECKTABLE_INSDEL:
                             // on <shift-backspace> it is set to <true>.
                             // Thus, assure that method <SwEditShell::NumOrNum(..)>
                             // is only called for the intended purpose.
-                            bool bCallNumOrNoNum( false );
+                            if ( !bDone && rSh.IsSttPara() )
                             {
-                                if ( !bDone )
+                                bool bCallNumOrNoNum( false );
+                                if ( bOnlyBackspaceKey && !rSh.IsNoNum() )
                                 {
-                                    if ( bOnlyBackspaceKey && !rSh.IsNoNum() )
-                                    {
-                                        bCallNumOrNoNum = true;
-                                    }
-                                    else if ( !bOnlyBackspaceKey && rSh.IsNoNum() )
+                                    bCallNumOrNoNum = true;
+                                }
+                                else if ( !bOnlyBackspaceKey && rSh.IsNoNum() )
+                                {
+                                    bCallNumOrNoNum = true;
+                                }
+                                else if ( bOnlyBackspaceKey
+                                          && rSh.IsSttPara()
+                                          && rSh.IsEndPara()
+                                          && !rSh.HasSelection() )
+                                {
+                                    const SwNumRule* pCurrNumRule( rSh.GetNumRuleAtCurrCrsrPos() );
+                                    if ( pCurrNumRule != NULL
+                                         && pCurrNumRule != rSh.GetOutlineNumRule() )
                                     {
                                         bCallNumOrNoNum = true;
                                     }
-                                    else if ( bOnlyBackspaceKey &&
-                                              rSh.IsSttPara() && rSh.IsEndPara() &&
-                                              !rSh.HasSelection() )
-                                    {
-                                        const SwNumRule* pCurrNumRule( rSh.GetCurNumRule() );
-                                        if ( pCurrNumRule &&
-                                             pCurrNumRule != rSh.GetOutlineNumRule() )
-                                        {
-                                            bCallNumOrNoNum = true;
-                                        }
-                                    }
+                                }
+                                if ( bCallNumOrNoNum
+                                     && rSh.NumOrNoNum( !bOnlyBackspaceKey, sal_True ) )
+                                {
+                                    eKeyState = KS_NumOrNoNum;
                                 }
                             }
-                            if ( bCallNumOrNoNum &&
-                                 rSh.NumOrNoNum( !bOnlyBackspaceKey, sal_True ) )
-                            {
-                                eKeyState = KS_NumOrNoNum;
-                            }
-                            // <--
                         }
                     }
                     break;
@@ -1960,12 +1957,13 @@ KEYINPUT_CHECKTABLE_INSDEL:
                         GetView().GetViewFrame()->GetDispatcher()->Execute( FN_GOTO_NEXT_INPUTFLD );
                         eKeyState = KS_Ende;
                     }
-                    else
-                    if( rSh.GetCurNumRule() && rSh.IsSttOfPara() &&
-                        !rSh.HasReadonlySel() )
-                    {
-                        if ( rSh.IsFirstOfNumRule() &&
-                             numfunc::ChangeIndentOnTabAtFirstPosOfFirstListItem() )
+                    else if( rSh.GetNumRuleAtCurrCrsrPos()
+                             && rSh.IsSttOfPara()
+                             && !rSh.HasReadonlySel() )
+                    {
+                        if ( !rSh.IsMultiSelection()
+                             && rSh.IsFirstOfNumRuleAtCrsrPos()
+                             && numfunc::ChangeIndentOnTabAtFirstPosOfFirstListItem() )
                             eKeyState = KS_NumIndentInc;
                         else
                             eKeyState = KS_NumDown;
@@ -2019,11 +2017,13 @@ KEYINPUT_CHECKTABLE_INSDEL:
                         GetView().GetViewFrame()->GetDispatcher()->Execute( FN_GOTO_PREV_INPUTFLD );
                         eKeyState = KS_Ende;
                     }
-                    else if( rSh.GetCurNumRule() && rSh.IsSttOfPara() &&
-                         !rSh.HasReadonlySel() )
-                    {
-                        if ( rSh.IsFirstOfNumRule() &&
-                             numfunc::ChangeIndentOnTabAtFirstPosOfFirstListItem() )
+                    else if( rSh.GetNumRuleAtCurrCrsrPos()
+                             && rSh.IsSttOfPara()
+                             && !rSh.HasReadonlySel() )
+                    {
+                        if ( !rSh.IsMultiSelection()
+                             && rSh.IsFirstOfNumRuleAtCrsrPos()
+                             && numfunc::ChangeIndentOnTabAtFirstPosOfFirstListItem() )
                             eKeyState = KS_NumIndentDec;
                         else
                             eKeyState = KS_NumUp;
@@ -2308,10 +2308,11 @@ KEYINPUT_CHECKTABLE_INSDEL:
                 }
                 eKeyState = KS_Ende;
             }
-            else if(!rSh.HasReadonlySel())
+            else if ( !rSh.HasReadonlySel()
+                      || rSh.CrsrInsideInputFld() )
             {
-                sal_Bool bIsNormalChar = GetAppCharClass().isLetterNumeric(
-                                                            String( aCh ), 0 );
+                const sal_Bool bIsNormalChar =
+                    GetAppCharClass().isLetterNumeric( String( aCh ), 0 );
                 if( bChkInsBlank && bIsNormalChar &&
                     (aInBuffer.Len() || !rSh.IsSttPara() || !rSh.IsEndPara() ))
                 {
@@ -2321,9 +2322,8 @@ KEYINPUT_CHECKTABLE_INSDEL:
                     aInBuffer.Expand( aInBuffer.Len() + 1, ' ' );
                 }
 
-
-                sal_Bool bIsAutoCorrectChar =  SvxAutoCorrect::IsAutoCorrectChar( aCh );
-                sal_Bool bRunNext = pACorr && pACorr->HasRunNext();
+                const sal_Bool bIsAutoCorrectChar =  SvxAutoCorrect::IsAutoCorrectChar( aCh );
+                const sal_Bool bRunNext = pACorr != NULL && pACorr->HasRunNext();
                 if( !aKeyEvent.GetRepeat() && pACorr && ( bIsAutoCorrectChar || bRunNext ) &&
                         pACfg->IsAutoFmtByInput() &&
                     (( pACorr->IsAutoCorrFlag( ChgWeightUnderl ) &&
@@ -3399,9 +3399,9 @@ void SwEditWin::MouseButtonDown(const Mo
                     const int nSelType = rSh.GetSelectionType();
                     // Check in general, if an object is selectable at given position.
                     // Thus, also text fly frames in background become selectable via Ctrl-Click.
-                    if ( nSelType & nsSelectionType::SEL_OLE ||
-                         nSelType & nsSelectionType::SEL_GRF ||
-                         rSh.IsObjSelectable( aDocPos ) )
+                    if ( ( nSelType & nsSelectionType::SEL_OLE )
+                         || ( nSelType & nsSelectionType::SEL_GRF )
+                         || rSh.IsObjSelectable( aDocPos ) )
                     {
                         MV_KONTEXT( &rSh );
                         if( !rSh.IsFrmSelected() )
@@ -4898,11 +4898,11 @@ void SwEditWin::Command( const CommandEv
                                                         pItem = new SvxPostureItem( ITALIC_NONE, RES_CHRATR_POSTURE );
                                                         break;
                     case DICTATIONCOMMAND_NUMBERING_ON:
-                                    if ( !rSh.GetCurNumRule() )
+                                    if ( !rSh.GetNumRuleAtCurrCrsrPos() )
                                         nSlotId = FN_NUM_NUMBERING_ON;
                                     break;
                     case DICTATIONCOMMAND_NUMBERING_OFF:
-                                    if ( rSh.GetCurNumRule() )
+                                    if ( rSh.GetNumRuleAtCurrCrsrPos() )
                                        nSlotId = FN_NUM_NUMBERING_ON;
                                     break;
                     case DICTATIONCOMMAND_TAB:

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/docvw/romenu.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/docvw/romenu.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/docvw/romenu.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/docvw/romenu.cxx Wed Mar 19 10:14:42 2014
@@ -381,6 +381,10 @@ static void lcl_GetPreferedExtension( St
 	switch( const_cast<Graphic&>(rGrf).GetLink().GetType() )
 	{
 		case GFX_LINK_TYPE_NATIVE_GIF:      pExt = "gif"; break;
+
+        // #15508# added BMP type for better exports (writer export graphic - checked, works)
+        case GFX_LINK_TYPE_NATIVE_BMP:      pExt = "bmp"; break;
+
 		case GFX_LINK_TYPE_NATIVE_TIF:      pExt = "tif"; break;
 		case GFX_LINK_TYPE_NATIVE_WMF:      pExt = "wmf"; break;
 		case GFX_LINK_TYPE_NATIVE_MET:      pExt = "met"; break;

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/envelp/envlop1.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/envelp/envlop1.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/envelp/envlop1.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/envelp/envlop1.cxx Wed Mar 19 10:14:42 2014
@@ -281,7 +281,7 @@ SwEnvPage::~SwEnvPage()
 
 IMPL_LINK( SwEnvPage, DatabaseHdl, ListBox *, pListBox )
 {
-	SwWait aWait( *pSh->GetView().GetDocShell(), sal_True );
+	SwWait aWait( *pSh->GetView().GetDocShell(), true );
 
 	if (pListBox == &aDatabaseLB)
     {

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/frmdlg/column.src
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/frmdlg/column.src?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/frmdlg/column.src (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/frmdlg/column.src Wed Mar 19 10:14:42 2014
@@ -293,8 +293,7 @@ TabPage TP_COLUMN
 		Minimum = 25 ;
 		Maximum = 100 ;
 		Value = 100 ;
-		Unit = FUNIT_CUSTOM ;
-		CustomUnitText = "%" ;
+		Unit = FUNIT_PERCENT ;
 		First = 25 ;
 		Last = 100 ;
 	};

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/inc/drawsh.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/inc/drawsh.hxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/inc/drawsh.hxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/inc/drawsh.hxx Wed Mar 19 10:14:42 2014
@@ -43,6 +43,10 @@ public:
 
 	void		ExecFormText(SfxRequest& rReq);
 	void		GetFormTextState(SfxItemSet& rSet);
+
+    // #123922# added helper methods to handle applying graphic data to draw objects
+    SdrObject* IsSingleFillableNonOLESelected();
+    void InsertPictureFromFile(SdrObject& rObject);
 };
 
 #endif

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/inc/textsh.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/inc/textsh.hxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/inc/textsh.hxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/inc/textsh.hxx Wed Mar 19 10:14:42 2014
@@ -35,11 +35,16 @@ class SwTextShell: public SwBaseShell
 	SwFldMgr*	pPostItFldMgr;
 
     void InsertSymbol( SfxRequest& );
-	void InsertHyperlink(const SvxHyperlinkItem& rHlnkItem);
+	void InsertHyperlink( const SvxHyperlinkItem& rHlnkItem );
 	bool InsertMediaDlg( SfxRequest& );
-    void ChangeHeaderOrFooter(const String& rStyleName, sal_Bool bHeader, sal_Bool bOn, sal_Bool bShowWarning);
+    void ChangeHeaderOrFooter(
+        const String& rStyleName,
+        sal_Bool bHeader,
+        sal_Bool bOn,
+        sal_Bool bShowWarning );
 
 public:
+
 	SFX_DECL_INTERFACE(SW_TEXTSHELL)
 	TYPEINFO();
 

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/inc/view.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/inc/view.hxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/inc/view.hxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/inc/view.hxx Wed Mar 19 10:14:42 2014
@@ -372,6 +372,7 @@ class SW_DLLPUBLIC SwView: public SfxVie
 
 	SW_DLLPRIVATE virtual void	Move();
 
+public: // #123922# Needs to be called from a 2nd place now as a helper method
     SW_DLLPRIVATE sal_Bool          InsertGraphicDlg( SfxRequest& );
 
 protected:

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/inc/wrtsh.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/inc/wrtsh.hxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/inc/wrtsh.hxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/inc/wrtsh.hxx Wed Mar 19 10:14:42 2014
@@ -312,7 +312,7 @@ typedef sal_Bool (SwWrtShell:: *FNSimple
 	void	InsertColumnBreak();
 	void	InsertFootnote(const String &, sal_Bool bEndNote = sal_False, sal_Bool bEdit = sal_True );
 	void	SplitNode( sal_Bool bAutoFormat = sal_False, sal_Bool bCheckTableStart = sal_True );
-	sal_Bool	CanInsert();
+    bool    CanInsert();
 
 	// Verzeichnisse
 	void	InsertTableOf(const SwTOXBase& rTOX, const SfxItemSet* pSet = 0);
@@ -598,7 +598,7 @@ private:
 	SW_DLLPRIVATE long	Ignore(const Point *, sal_Bool bProp=sal_False );
 
 	SW_DLLPRIVATE void	LeaveExtSel() { bSelWrd = bSelLn = sal_False;}
-	SW_DLLPRIVATE sal_Bool	_CanInsert();
+	SW_DLLPRIVATE bool _CanInsert();
 
 	SW_DLLPRIVATE sal_Bool	GoStart(sal_Bool KeepArea = sal_False, sal_Bool * = 0,
 			sal_Bool bSelect = sal_False, sal_Bool bDontMoveRegion = sal_False);

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/index/toxmgr.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/index/toxmgr.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/index/toxmgr.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/index/toxmgr.cxx Wed Mar 19 10:14:42 2014
@@ -293,7 +293,7 @@ sal_Bool SwTOXMgr::UpdateOrInsertTOX(con
 									SwTOXBase** ppBase,
 									const SfxItemSet* pSet)
 {
-	SwWait aWait( *pSh->GetView().GetDocShell(), sal_True );
+	SwWait aWait( *pSh->GetView().GetDocShell(), true );
 	sal_Bool bRet = sal_True;
 	const SwTOXBase* pCurTOX = ppBase && *ppBase ? *ppBase : GetCurTOX();
 	SwTOXBase* pTOX = (SwTOXBase*)pCurTOX;

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/lingu/hyp.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/lingu/hyp.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/lingu/hyp.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/lingu/hyp.cxx Wed Mar 19 10:14:42 2014
@@ -96,7 +96,7 @@ sal_Bool SwHyphWrapper::SpellContinue()
 	if( bAutomatic )
 	{
 		PSH->StartAllAction();
-		pWait = new SwWait( *pView->GetDocShell(), sal_True );
+		pWait = new SwWait( *pView->GetDocShell(), true );
 	}
 
 		uno::Reference< uno::XInterface >  xHyphWord = bInSelection ?

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/misc/glossary.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/misc/glossary.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/misc/glossary.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/misc/glossary.cxx Wed Mar 19 10:14:42 2014
@@ -1091,7 +1091,7 @@ sal_Bool  SwGlTreeListBox::NotifyMoving(
 	if(pDestParent != pSrcParent)
 	{
 		SwGlossaryDlg* pDlg = (SwGlossaryDlg*)Window::GetParent();
-		SwWait aWait( *pDlg->pSh->GetView().GetDocShell(), sal_True );
+		SwWait aWait( *pDlg->pSh->GetView().GetDocShell(), true );
 
 		GroupUserData* pGroupData = (GroupUserData*)pSrcParent->GetUserData();
 		String sSourceGroup(pGroupData->sGroupName);
@@ -1139,7 +1139,7 @@ sal_Bool  SwGlTreeListBox::NotifyCopying
 	if(pDestParent != pSrcParent)
 	{
 		SwGlossaryDlg* pDlg = (SwGlossaryDlg*)Window::GetParent();
-		SwWait aWait( *pDlg->pSh->GetView().GetDocShell(), sal_True );
+		SwWait aWait( *pDlg->pSh->GetView().GetDocShell(), true );
 
 		GroupUserData* pGroupData = (GroupUserData*)pSrcParent->GetUserData();
 		String sSourceGroup(pGroupData->sGroupName);

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/misc/num.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/misc/num.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/misc/num.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/misc/num.cxx Wed Mar 19 10:14:42 2014
@@ -1070,7 +1070,7 @@ SwSvxNumBulletTabDialog::SwSvxNumBulletT
 	GetUserButton()->SetText(sRemoveText);
 	GetUserButton()->SetHelpId(HID_NUM_RESET);
 	GetUserButton()->SetClickHdl(LINK(this, SwSvxNumBulletTabDialog, RemoveNumberingHdl));
-	if(!rWrtSh.GetCurNumRule())
+	if(!rWrtSh.GetNumRuleAtCurrCrsrPos())
 		GetUserButton()->Enable(sal_False);
     AddTabPage( RID_SVXPAGE_PICK_SINGLE_NUM );
     AddTabPage( RID_SVXPAGE_PICK_BULLET );

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/misc/pgfnote.src
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/misc/pgfnote.src?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/misc/pgfnote.src (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/misc/pgfnote.src Wed Mar 19 10:14:42 2014
@@ -157,8 +157,7 @@ TabPage TP_FOOTNOTE_PAGE
 		Spin = TRUE ;
 		Maximum = 100 ;
 		Value = 100 ;
-		Unit = FUNIT_CUSTOM ;
-		CustomUnitText = "%" ;
+		Unit = FUNIT_PERCENT ;
 		First = 10 ;
 		Last = 100 ;
 	};

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/misc/redlndlg.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/misc/redlndlg.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/misc/redlndlg.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/misc/redlndlg.cxx Wed Mar 19 10:14:42 2014
@@ -145,7 +145,7 @@ void SwModelessRedlineAcceptDlg::Activat
 
 	if (pChildWin->GetOldDocShell() != pDocSh)
 	{	// Dok-Wechsel
-		SwWait aWait( *pDocSh, sal_False );
+		SwWait aWait( *pDocSh, false );
 		SwWrtShell* pSh = pView->GetWrtShellPtr();
 
 		pChildWin->SetOldDocShell(pDocSh);	// Rekursion vermeiden (durch Modified-Hdl)
@@ -310,7 +310,7 @@ SwRedlineAcceptDlg::~SwRedlineAcceptDlg(
 
 void SwRedlineAcceptDlg::Init(sal_uInt16 nStart)
 {
-	SwWait aWait( *::GetActiveView()->GetDocShell(), sal_False );
+	SwWait aWait( *::GetActiveView()->GetDocShell(), false );
 	pTable->SetUpdateMode(sal_False);
 	aUsedSeqNo.Remove((sal_uInt16)0, aUsedSeqNo.Count());
 
@@ -480,7 +480,7 @@ void SwRedlineAcceptDlg::Activate()
         return;
 
 	SwView *pView = ::GetActiveView();
-	SwWait aWait( *pView->GetDocShell(), sal_False );
+	SwWait aWait( *pView->GetDocShell(), false );
 
 	aUsedSeqNo.Remove((sal_uInt16)0, aUsedSeqNo.Count());
 
@@ -922,7 +922,7 @@ void SwRedlineAcceptDlg::CallAcceptRejec
 	if( !bAccept )
 		FnAccRej = &SwEditShell::RejectRedline;
 
-	SwWait aWait( *pSh->GetView().GetDocShell(), sal_True );
+	SwWait aWait( *pSh->GetView().GetDocShell(), true );
 	pSh->StartAction();
 
     // #111827#
@@ -1328,7 +1328,7 @@ IMPL_LINK( SwRedlineAcceptDlg, CommandHd
 					if (pTable->GetSortedCol() == nSortMode)
 						bSortDir = !pTable->GetSortDirection();
 
-					SwWait aWait( *::GetActiveView()->GetDocShell(), sal_False );
+					SwWait aWait( *::GetActiveView()->GetDocShell(), false );
 					pTable->SortByCol(nSortMode, bSortDir);
 					if (nSortMode == 0xffff)
 						Init();				// Alles neu fuellen

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/misc/srtdlg.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/misc/srtdlg.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/misc/srtdlg.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/misc/srtdlg.cxx Wed Mar 19 10:14:42 2014
@@ -392,7 +392,7 @@ void SwSortDlg::Apply()
 
 	sal_Bool bRet;
 	{
-		SwWait aWait( *rSh.GetView().GetDocShell(), sal_True );
+		SwWait aWait( *rSh.GetView().GetDocShell(), true );
 		rSh.StartAllAction();
 		if( 0 != (bRet = rSh.Sort( aOptions )))
 			rSh.SetModified();

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/ribbar/workctrl.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/ribbar/workctrl.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/ribbar/workctrl.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/ribbar/workctrl.cxx Wed Mar 19 10:14:42 2014
@@ -799,7 +799,7 @@ SwZoomBox_Impl::SwZoomBox_Impl(
     for(sal_uInt16 i = 0; i < sizeof(aZoomValues)/sizeof(sal_uInt16); i++)
     {
         String sEntry = String::CreateFromInt32(aZoomValues[i]);
-        sEntry += '%';
+        sEntry.AppendAscii( " %" );
         InsertEntry(sEntry);
     }
 }
@@ -931,7 +931,7 @@ void SwPreviewZoomControl::StateChanged(
     if(SFX_ITEM_AVAILABLE <= eState)
     {
         String sZoom(String::CreateFromInt32(((const SfxUInt16Item*)pState)->GetValue()));
-        sZoom += '%';
+        sZoom.AppendAscii( " %" );
         pBox->SetText(sZoom);
         pBox->SaveValue();
     }

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/shells/annotsh.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/shells/annotsh.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/shells/annotsh.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/shells/annotsh.cxx Wed Mar 19 10:14:42 2014
@@ -455,7 +455,7 @@ void SwAnnotationShell::Exec( SfxRequest
 			SwDocStat aCurr;
 			SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
 			{
-				SwWait aWait( *rView.GetDocShell(), sal_True );
+				SwWait aWait( *rView.GetDocShell(), true );
 				rSh.StartAction();
 				rSh.CountWords( aCurr );
 				rSh.UpdateDocStat( aDocStat );

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/shells/basesh.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/shells/basesh.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/shells/basesh.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/shells/basesh.cxx Wed Mar 19 10:14:42 2014
@@ -647,7 +647,7 @@ void SwBaseShell::Execute(SfxRequest &rR
 			break;
 		case FN_UPDATE_CHARTS:
 			{
-				SwWait aWait( *rView.GetDocShell(), sal_True );
+				SwWait aWait( *rView.GetDocShell(), true );
 				rSh.UpdateAllCharts();
 			}
 			break;
@@ -752,7 +752,7 @@ void SwBaseShell::Execute(SfxRequest &rR
             if ( (!rSh.IsSelFrmMode() || nSelType & nsSelectionType::SEL_GRF) &&
                 nGalleryItemType == com::sun::star::gallery::GalleryItemType::GRAPHIC )
             {
-                SwWait aWait( *rView.GetDocShell(), sal_True );
+                SwWait aWait( *rView.GetDocShell(), true );
 
                 String aGrfName, aFltName;
                 const Graphic aGrf( pGalleryItem->GetGraphic() );
@@ -1541,11 +1541,16 @@ void SwBaseShell::GetState( SfxItemSet &
 				rSet.Put(SfxBoolItem(nWhich, bDisable));
 			}
 			break;
-			case FN_BACKSPACE:
-			case SID_DELETE:
-				if (rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0)
-					rSet.DisableItem( nWhich );
-				break;
+
+            case FN_BACKSPACE:
+            case SID_DELETE:
+                if ( ( rSh.HasReadonlySel() && !rSh.CrsrInsideInputFld() )
+                     || rSh.IsSelObjProtected( FLYPROTECT_CONTENT|FLYPROTECT_PARENT ) != 0 )
+                {
+                    rSet.DisableItem( nWhich );
+                }
+                break;
+
 			case SID_CONTOUR_DLG:
 			{
 				sal_Bool bParentCntProt = 0 != rSh.IsSelObjProtected(FLYPROTECT_CONTENT|FLYPROTECT_PARENT );

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/shells/drawsh.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/shells/drawsh.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/shells/drawsh.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/shells/drawsh.cxx Wed Mar 19 10:14:42 2014
@@ -51,6 +51,11 @@
 #include <svx/xtable.hxx>
 #include <sfx2/sidebar/EnumContext.hxx>
 #include <svx/svdoashp.hxx>
+#include <svx/svdoole2.hxx>
+#include <sfx2/opengrf.hxx>
+#include <svx/svdograf.hxx>
+#include <svx/svdundo.hxx>
+#include <svx/xbtmpit.hxx>
 
 #include "swundo.hxx"
 #include "wrtsh.hxx"
@@ -85,6 +90,105 @@ TYPEINIT1(SwDrawShell,SwDrawBaseShell)
  --------------------------------------------------------------------*/
 
 
+// #123922# check as the name implies
+SdrObject* SwDrawShell::IsSingleFillableNonOLESelected()
+{
+    SwWrtShell &rSh = GetShell();
+    SdrView* pSdrView = rSh.GetDrawView();
+
+    if(!pSdrView)
+    {
+        return 0;
+    }
+
+    if(1 != pSdrView->GetMarkedObjectCount())
+    {
+        return 0;
+    }
+
+    SdrObject* pPickObj = pSdrView->GetMarkedObjectByIndex(0);
+
+    if(!pPickObj)
+    {
+        return 0;
+    }
+
+    if(!pPickObj->IsClosedObj())
+    {
+        return 0;
+    }
+
+    if(dynamic_cast< SdrOle2Obj* >(pPickObj))
+    {
+        return 0;
+    }
+
+    return pPickObj;
+}
+
+// #123922# insert given graphic data dependent of the object type in focus
+void SwDrawShell::InsertPictureFromFile(SdrObject& rObject)
+{
+    SwWrtShell &rSh = GetShell();
+    SdrView* pSdrView = rSh.GetDrawView();
+
+    if(pSdrView)
+    {
+        SvxOpenGraphicDialog aDlg(SW_RESSTR(STR_INSERT_GRAPHIC));
+
+        if(GRFILTER_OK == aDlg.Execute())
+        {
+            Graphic aGraphic;
+            int nError(aDlg.GetGraphic(aGraphic));
+
+            if(GRFILTER_OK == nError)
+            {
+                const bool bAsLink(aDlg.IsAsLink());
+                SdrObject* pResult = &rObject;
+
+                rSh.StartUndo(UNDO_PASTE_CLIPBOARD);
+
+                if(dynamic_cast< SdrGrafObj* >(&rObject))
+                {
+                    SdrGrafObj* pNewGrafObj = (SdrGrafObj*)rObject.Clone();
+
+                    pNewGrafObj->SetGraphic(aGraphic);
+
+                    // #123922#  for handling MasterObject and virtual ones correctly, SW
+                    // wants us to call ReplaceObject at the page, but that also
+                    // triggers the same assertion (I tried it), so stay at the view method
+                    pSdrView->ReplaceObjectAtView(&rObject, *pSdrView->GetSdrPageView(), pNewGrafObj);
+
+                    // set in all cases - the Clone() will have copied an existing link (!)
+                    pNewGrafObj->SetGraphicLink(
+                        bAsLink ? aDlg.GetPath() : String(), 
+                        bAsLink ? aDlg.GetCurrentFilter() : String());
+
+                    pResult = pNewGrafObj;
+                }
+                else // if(rObject.IsClosedObj() && !dynamic_cast< SdrOle2Obj* >(&rObject))
+                {
+                    pSdrView->AddUndo(new SdrUndoAttrObj(rObject));
+
+                    SfxItemSet aSet(pSdrView->GetModel()->GetItemPool(), XATTR_FILLSTYLE, XATTR_FILLBITMAP);
+
+                    aSet.Put(XFillStyleItem(XFILL_BITMAP));
+                    aSet.Put(XFillBitmapItem(String(), aGraphic));
+                    rObject.SetMergedItemSetAndBroadcast(aSet);
+                }
+
+                rSh.EndUndo( UNDO_END );
+
+                if(pResult)
+                {
+                    // we are done; mark the modified/new object
+                    pSdrView->MarkObj(pResult, pSdrView->GetSdrPageView());
+                }
+            }
+        }
+    }
+}
+
 void SwDrawShell::Execute(SfxRequest &rReq)
 {
 	SwWrtShell			&rSh = GetShell();
@@ -236,7 +340,7 @@ void SwDrawShell::Execute(SfxRequest &rR
 			SwDocStat aCurr;
 			SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
 			{
-				SwWait aWait( *GetView().GetDocShell(), sal_True );
+				SwWait aWait( *GetView().GetDocShell(), true );
 				rSh.StartAction();
 				rSh.CountWords( aCurr );
 				rSh.UpdateDocStat( aDocStat );
@@ -285,6 +389,21 @@ void SwDrawShell::Execute(SfxRequest &rR
 			rReq.Ignore ();
 			break;
 
+        case SID_INSERT_GRAPHIC:
+        {
+            // #123922# check if we can do something
+            SdrObject* pObj = IsSingleFillableNonOLESelected();
+
+            if(pObj)
+            {
+                // ...and if yes, do something
+                InsertPictureFromFile(*pObj);
+                bool bBla = true;
+            }
+
+            break;
+        }
+
 		default:
 			DBG_ASSERT(!this, "falscher Dispatcher");
 			return;
@@ -299,8 +418,6 @@ void SwDrawShell::Execute(SfxRequest &rR
 	Beschreibung:
  --------------------------------------------------------------------*/
 
-
-
 void SwDrawShell::GetState(SfxItemSet& rSet)
 {
 	SwWrtShell &rSh = GetShell();
@@ -383,6 +500,19 @@ void SwDrawShell::GetState(SfxItemSet& r
 				}
 			}
 			break;
+
+            case SID_INSERT_GRAPHIC:
+            {
+                // #123922# check if we can do something
+                SdrObject* pObj = IsSingleFillableNonOLESelected();
+
+                if(!pObj)
+                {
+                    rSet.DisableItem(nWhich);
+                }
+
+                break;
+            }
 		}
 		nWhich = aIter.NextWhich();
 	}

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/shells/drwtxtex.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/shells/drwtxtex.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/shells/drwtxtex.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/shells/drwtxtex.cxx Wed Mar 19 10:14:42 2014
@@ -418,7 +418,7 @@ void SwDrawTextShell::Execute( SfxReques
 			SwDocStat aCurr;
 			SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
 			{
-				SwWait aWait( *GetView().GetDocShell(), sal_True );
+				SwWait aWait( *GetView().GetDocShell(), true );
 				rSh.StartAction();
 				rSh.CountWords( aCurr );
 				rSh.UpdateDocStat( aDocStat );

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/shells/frmsh.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/shells/frmsh.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/shells/frmsh.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/shells/frmsh.cxx Wed Mar 19 10:14:42 2014
@@ -275,7 +275,7 @@ void SwFrameShell::Execute(SfxRequest &r
 			SwDocStat aCurr;
 			SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
 			{
-				SwWait aWait( *GetView().GetDocShell(), sal_True );
+				SwWait aWait( *GetView().GetDocShell(), true );
 				rSh.StartAction();
 				rSh.CountWords( aCurr );
 				rSh.UpdateDocStat( aDocStat );

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/shells/grfsh.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/shells/grfsh.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/shells/grfsh.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/shells/grfsh.cxx Wed Mar 19 10:14:42 2014
@@ -112,7 +112,14 @@ void SwGrfShell::Execute(SfxRequest &rRe
             }
         }
         break;
-		case SID_INSERT_GRAPHIC:
+        case SID_INSERT_GRAPHIC:
+        {
+            // #123922# implement slot independent from the two below to
+            // bring up the insert graphic dialog and associated actions
+            SwView& rView = GetView();
+            rReq.SetReturnValue(SfxBoolItem(nSlot, rView.InsertGraphicDlg( rReq )));
+            break;
+        }
 		case FN_FORMAT_GRAFIC_DLG:
 		case FN_DRAW_WRAP_DLG:
 		{
@@ -314,7 +321,7 @@ void SwGrfShell::Execute(SfxRequest &rRe
 					if( sGrfNm.Len() )
 					{
                         SwDocShell* pDocSh = GetView().GetDocShell();
-                        SwWait aWait( *pDocSh, sal_True );
+                        SwWait aWait( *pDocSh, true );
                         SfxMedium* pMedium = pDocSh->GetMedium();
                         INetURLObject aAbs;
                         if( pMedium )

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/shells/listsh.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/shells/listsh.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/shells/listsh.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/shells/listsh.cxx Wed Mar 19 10:14:42 2014
@@ -149,7 +149,7 @@ void SwListShell::Execute(SfxRequest &rR
 	SwWrtShell& rSh = GetShell();
 
     // --> FME 2005-01-04 #i35572#
-    const SwNumRule* pCurRule = rSh.GetCurNumRule();
+    const SwNumRule* pCurRule = rSh.GetNumRuleAtCurrCrsrPos();
     ASSERT( pCurRule, "SwListShell::Execute without NumRule" )
     bool bOutline = pCurRule && pCurRule->IsOutlineRule();
     // <--

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/shells/textfld.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/shells/textfld.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/shells/textfld.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/shells/textfld.cxx Wed Mar 19 10:14:42 2014
@@ -367,9 +367,8 @@ void SwTextShell::ExecField(SfxRequest &
                             if( !(sAuthor = aUserOpt.GetID()).Len() )
                                 sAuthor = String( SW_RES( STR_REDLINE_UNKNOWN_AUTHOR ));
 
-                        if( rSh.HasSelection() )
+                        if ( rSh.HasSelection() && !rSh.IsTableMode() )
                         {
-                            rSh.NormalizePam( sal_False );
                             rSh.KillPams();
                         }
 

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/shells/textsh1.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/shells/textsh1.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/shells/textsh1.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/shells/textsh1.cxx Wed Mar 19 10:14:42 2014
@@ -950,7 +950,7 @@ void SwTextShell::Execute(SfxRequest &rR
                 nDefPage = ((SfxUInt16Item *)pItem)->GetValue();
 
             // Numerierungseigenschaften
-            if(rWrtSh.GetCurNumRule())
+            if(rWrtSh.GetNumRuleAtCurrCrsrPos())
             {
                 SfxBoolItem aStart( FN_NUMBER_NEWSTART, rWrtSh.IsNumRuleStart() );
                 aCoreSet.Put(aStart);
@@ -1107,53 +1107,51 @@ void SwTextShell::Execute(SfxRequest &rR
             // <--
         }
         break;
-		case FN_SELECT_PARA:
-		{
-			if(!rWrtSh.IsSttOfPara())
-				rWrtSh.SttPara(sal_False);
-			else
-				rWrtSh.EnterStdMode();
-			rWrtSh.EndPara(sal_True);
-		}
-		break;
 
-		case SID_DEC_INDENT:
-		case SID_INC_INDENT:
-			//According to the requirement, modified the behavior when user
-			//using the indent button on the toolbar. Now if we increase/decrease indent for a
-			//paragraph which has bullet style it will increase/decrease the bullet level.
-			{
-				//If the current paragraph has bullet call the function to 
-				//increase or decrease the bullet level.
-				//Why could I know wheter a paragraph has bullet or not by checking the below conditions?
-				//Please refer to the "case KEY_TAB:" section in SwEditWin::KeyInput(..) :
-				//		if( rSh.GetCurNumRule() && rSh.IsSttOfPara() &&
-				//					!rSh.HasReadonlySel() )
-				//				eKeyState = KS_NumDown;
-				//Above code demonstrates that when the cursor is at the start of a paragraph which has bullet,
-				//press TAB will increase the bullet level.
-				//So I copied from that ^^
-				if ( rWrtSh.GetCurNumRule() && !rWrtSh.HasReadonlySel() )
-				{
-					rWrtSh.NumUpDown( SID_INC_INDENT == nSlot );
-				}
-				else//execute the original processing functions
-				{
-					//below is copied of the old codes
-			rWrtSh.MoveLeftMargin( SID_INC_INDENT == nSlot,
-									rReq.GetModifier() != KEY_MOD1 );
-				}
-			}
-			//rWrtSh.MoveLeftMargin( SID_INC_INDENT == nSlot,
-			//						rReq.GetModifier() != KEY_MOD1 );
-			rReq.Done();
-			break;
-		case FN_DEC_INDENT_OFFSET:
-		case FN_INC_INDENT_OFFSET:
-			rWrtSh.MoveLeftMargin( FN_INC_INDENT_OFFSET == nSlot,
-									rReq.GetModifier() == KEY_MOD1 );
-			rReq.Done();
-			break;
+        case FN_SELECT_PARA:
+        {
+            if ( !rWrtSh.IsSttOfPara() )
+                rWrtSh.SttPara( sal_False );
+            else
+                rWrtSh.EnterStdMode();
+            rWrtSh.EndPara( sal_True );
+        }
+        break;
+
+        case SID_DEC_INDENT:
+        case SID_INC_INDENT:
+        //According to the requirement, modified the behavior when user
+        //using the indent button on the toolbar. Now if we increase/decrease indent for a
+        //paragraph which has bullet style it will increase/decrease the bullet level.
+        {
+            //If the current paragraph has bullet call the function to
+            //increase or decrease the bullet level.
+            //Why could I know wheter a paragraph has bullet or not by checking the below conditions?
+            //Please refer to the "case KEY_TAB:" section in SwEditWin::KeyInput(..) :
+            //		if( rSh.GetCurNumRule() && rSh.IsSttOfPara() &&
+            //					!rSh.HasReadonlySel() )
+            //				eKeyState = KS_NumDown;
+            //Above code demonstrates that when the cursor is at the start of a paragraph which has bullet,
+            //press TAB will increase the bullet level.
+            //So I copied from that ^^
+            if ( rWrtSh.GetNumRuleAtCurrCrsrPos() && !rWrtSh.HasReadonlySel() )
+            {
+                rWrtSh.NumUpDown( SID_INC_INDENT == nSlot );
+            }
+            else				//execute the original processing functions
+            {
+                //below is copied of the old codes
+                rWrtSh.MoveLeftMargin( SID_INC_INDENT == nSlot, rReq.GetModifier() != KEY_MOD1 );
+            }
+        }
+        rReq.Done();
+        break;
+
+        case FN_DEC_INDENT_OFFSET:
+        case FN_INC_INDENT_OFFSET:
+            rWrtSh.MoveLeftMargin( FN_INC_INDENT_OFFSET == nSlot, rReq.GetModifier() == KEY_MOD1 );
+            rReq.Done();
+            break;
 
 		case SID_ATTR_CHAR_COLOR2:
 		{
@@ -1358,7 +1356,7 @@ void SwTextShell::Execute(SfxRequest &rR
         SwDocStat aCurr;
         SwDocStat aDocStat( rSh.getIDocumentStatistics()->GetDocStat() );
         {
-            SwWait aWait( *GetView().GetDocShell(), sal_True );
+            SwWait aWait( *GetView().GetDocShell(), true );
             rSh.StartAction();
             rSh.CountWords( aCurr );
             rSh.UpdateDocStat( aDocStat );
@@ -1463,7 +1461,7 @@ void SwTextShell::GetState( SfxItemSet &
         break;
                 
         case FN_NUMBER_NEWSTART :
-            if(!rSh.GetCurNumRule())
+            if(!rSh.GetNumRuleAtCurrCrsrPos())
                     rSet.DisableItem(nWhich);
             else
                 rSet.Put(SfxBoolItem(FN_NUMBER_NEWSTART,
@@ -1553,39 +1551,33 @@ void SwTextShell::GetState( SfxItemSet &
             }
             break;
 
-		case SID_DEC_INDENT:
-		case SID_INC_INDENT:
-			{
-				//if the paragrah has bullet we'll do the following things:
-				//1: if the bullet level is the first level, disable the decrease-indent button
-				//2: if the bullet level is the last level, disable the increase-indent button
-				if ( rSh.GetCurNumRule() && !rSh.HasReadonlySel() )
-				{
-					sal_uInt8 nLevel = rSh.GetNumLevel();
-					if ( nLevel == (MAXLEVEL-1) && nWhich == SID_INC_INDENT ||
-						nLevel == 0 && nWhich == SID_DEC_INDENT )
-					{
-						rSet.DisableItem( nWhich );
-					}
-				}
-				else//if the paragraph has no bullet, execute the original functions
-				{
-					//below is copied of the old codes
-				sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
-				nHtmlMode &= HTMLMODE_ON|HTMLMODE_SOME_STYLES;
-				if( (nHtmlMode == HTMLMODE_ON) || !rSh.IsMoveLeftMargin(
-										SID_INC_INDENT == nWhich, sal_True ))
-					rSet.DisableItem( nWhich );
-				}
-				//old code begins
-				//sal_uInt16 nHtmlMode = ::GetHtmlMode(GetView().GetDocShell());
-				//nHtmlMode &= HTMLMODE_ON|HTMLMODE_SOME_STYLES;
-				//if( (nHtmlMode == HTMLMODE_ON) || !rSh.IsMoveLeftMargin(
-				//	SID_INC_INDENT == nWhich, TRUE ))
-				//	rSet.DisableItem( nWhich );
-				//old code ends
-			}
-			break;
+        case SID_DEC_INDENT:
+        case SID_INC_INDENT:
+        {
+            //if the paragrah has bullet we'll do the following things:
+            //1: if the bullet level is the first level, disable the decrease-indent button
+            //2: if the bullet level is the last level, disable the increase-indent button
+            if ( rSh.GetNumRuleAtCurrCrsrPos() && !rSh.HasReadonlySel() )
+            {
+                const sal_uInt8 nLevel = rSh.GetNumLevel();
+                if ( ( nLevel == ( MAXLEVEL - 1 ) && nWhich == SID_INC_INDENT )
+                     || ( nLevel == 0 && nWhich == SID_DEC_INDENT ) )
+                {
+                    rSet.DisableItem( nWhich );
+                }
+            }
+            else
+            {
+                sal_uInt16 nHtmlMode = ::GetHtmlMode( GetView().GetDocShell() );
+                nHtmlMode &= HTMLMODE_ON | HTMLMODE_SOME_STYLES;
+                if ( ( nHtmlMode == HTMLMODE_ON )
+                     || !rSh.IsMoveLeftMargin( SID_INC_INDENT == nWhich, sal_True ) )
+                {
+                    rSet.DisableItem( nWhich );
+                }
+            }
+        }
+        break;
 
 		case FN_DEC_INDENT_OFFSET:
 		case FN_INC_INDENT_OFFSET:
@@ -1629,6 +1621,16 @@ void SwTextShell::GetState( SfxItemSet &
             }
             break;
 
+
+        case FN_INSERT_BREAK:
+            if ( rSh.HasReadonlySel()
+                 && !rSh.CrsrInsideInputFld() )
+            {
+                rSet.DisableItem( nWhich );
+            }
+            break;
+
+
         case FN_INSERT_BREAK_DLG:
         case FN_INSERT_COLUMN_BREAK:
         case FN_INSERT_PAGEBREAK:
@@ -1792,16 +1794,19 @@ void SwTextShell::GetState( SfxItemSet &
                      rSet.DisableItem(nWhich);
             }
             break;
+
             case FN_NUM_NUMBERING_ON:
                 rSet.Put(SfxBoolItem(FN_NUM_NUMBERING_ON,rSh.SelectionHasNumber()));
             break;
+
             case FN_NUM_BULLET_ON:
                 rSet.Put(SfxBoolItem(FN_NUM_BULLET_ON,rSh.SelectionHasBullet()));
             break;
+
             case FN_BUL_NUM_RULE_INDEX:
             case FN_NUM_NUM_RULE_INDEX:
-		{				
-			SwNumRule* pCurRule = (SwNumRule*)(GetShell().GetCurNumRule());	
+		{
+			SwNumRule* pCurRule = (SwNumRule*)(GetShell().GetNumRuleAtCurrCrsrPos());
 			sal_uInt16	nActNumLvl = (sal_uInt16)0xFFFF;
 			rSet.Put(SfxUInt16Item(FN_NUM_NUM_RULE_INDEX,DEFAULT_NONE));
 			rSet.Put(SfxUInt16Item(FN_BUL_NUM_RULE_INDEX,DEFAULT_NONE));

Modified: openoffice/branches/alg_writerframes/main/sw/source/ui/shells/txtattr.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg_writerframes/main/sw/source/ui/shells/txtattr.cxx?rev=1579184&r1=1579183&r2=1579184&view=diff
==============================================================================
--- openoffice/branches/alg_writerframes/main/sw/source/ui/shells/txtattr.cxx (original)
+++ openoffice/branches/alg_writerframes/main/sw/source/ui/shells/txtattr.cxx Wed Mar 19 10:14:42 2014
@@ -197,47 +197,52 @@ void SwTextShell::ExecCharAttr(SfxReques
 void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq)
 {
     sal_uInt16 nSlot = rReq.GetSlot();
-	const SfxItemSet* pArgs = rReq.GetArgs();
-	sal_Bool bArgs = pArgs != 0 && pArgs->Count() > 0;
-	int bGrow = sal_False;
-	SwWrtShell& rWrtSh = GetShell();
-	SwTxtFmtColl* pColl = 0;
+    const SfxItemSet* pArgs = rReq.GetArgs();
+    sal_Bool bArgs = pArgs != 0 && pArgs->Count() > 0;
+    int bGrow = sal_False;
+    SwWrtShell& rWrtSh = GetShell();
+    SwTxtFmtColl* pColl = 0;
 
-	// nur gesetzt, wenn gesamter Absatz selektiert ist und AutoUpdateFmt gesetzt ist
-	if( rWrtSh.HasSelection() && rWrtSh.IsSelFullPara() )
-	{
-		pColl = rWrtSh.GetCurTxtFmtColl();
-		if(pColl && !pColl->IsAutoUpdateFmt())
-			pColl = 0;
-	}
-	SfxItemPool& rPool = GetPool();
-	sal_uInt16 nWhich = rPool.GetWhich(nSlot);
-	switch ( nSlot )
-	{
-		case FN_TXTATR_INET:
-		// Sonderbehandlung der PoolId des SwFmtInetFmt
-		if(bArgs)
-		{
-			const SfxPoolItem& rItem = pArgs->Get(nWhich );
+    // nur gesetzt, wenn gesamter Absatz selektiert ist und AutoUpdateFmt gesetzt ist
+    if ( rWrtSh.HasSelection() && rWrtSh.IsSelFullPara() )
+    {
+        pColl = rWrtSh.GetCurTxtFmtColl();
+        if ( pColl && !pColl->IsAutoUpdateFmt() )
+            pColl = 0;
+    }
+    SfxItemPool& rPool = GetPool();
+    sal_uInt16 nWhich = rPool.GetWhich( nSlot );
+    switch (nSlot)
+    {
+    case FN_TXTATR_INET:
+        // Sonderbehandlung der PoolId des SwFmtInetFmt
+        if ( bArgs )
+        {
+            const SfxPoolItem& rItem = pArgs->Get( nWhich );
 
-			SwFmtINetFmt aINetFmt((const SwFmtINetFmt&)rItem);
-			if( USHRT_MAX == aINetFmt.GetVisitedFmtId() )
-			{
-				aINetFmt.SetVisitedFmtId(
-						SwStyleNameMapper::GetPoolIdFromUIName( aINetFmt.GetVisitedFmt(), nsSwGetPoolIdFromName::GET_POOLID_CHRFMT));
-			}
-			if( USHRT_MAX == aINetFmt.GetINetFmtId() )
-			{
-				aINetFmt.SetINetFmtId(
-						SwStyleNameMapper::GetPoolIdFromUIName( aINetFmt.GetINetFmt(), nsSwGetPoolIdFromName::GET_POOLID_CHRFMT));
-			}
+            SwFmtINetFmt aINetFmt( (const SwFmtINetFmt&) rItem );
+            if ( USHRT_MAX == aINetFmt.GetVisitedFmtId() )
+            {
+                ASSERT( false, "<SwTextShell::ExecCharAttrArgs(..)> - unexpected visited character format ID at hyperlink attribute" );
+                aINetFmt.SetVisitedFmtAndId(
+                        aINetFmt.GetVisitedFmt(),
+                        SwStyleNameMapper::GetPoolIdFromUIName( aINetFmt.GetVisitedFmt(), nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ) );
+            }
+            if ( USHRT_MAX == aINetFmt.GetINetFmtId() )
+            {
+                ASSERT( false, "<SwTextShell::ExecCharAttrArgs(..)> - unexpected unvisited character format ID at hyperlink attribute" );
+                aINetFmt.SetINetFmtAndId(
+                        aINetFmt.GetINetFmt(),
+                        SwStyleNameMapper::GetPoolIdFromUIName( aINetFmt.GetINetFmt(), nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ) );
+            }
 
-			if ( pColl )
+            if ( pColl )
                 pColl->SetFmtAttr( aINetFmt );
-			else rWrtSh.SetAttrItem( aINetFmt );
+            else
+                rWrtSh.SetAttrItem( aINetFmt );
             rReq.Done();
-		}
-		break;
+        }
+        break;
 
 		case FN_GROW_FONT_SIZE:
 			bGrow = sal_True;
@@ -466,7 +471,7 @@ SET_LINESPACE:
                 aAdjust.SetWhich(SID_ATTR_PARA_ADJUST);
                 GetView().GetViewFrame()->GetBindings().SetState( aAdjust );
                 // Toggle numbering alignment
-                const SwNumRule* pCurRule = GetShell().GetCurNumRule();
+                const SwNumRule* pCurRule = GetShell().GetNumRuleAtCurrCrsrPos();
                 if( pCurRule )
                 {
                     SvxNumRule aRule = pCurRule->MakeSvxNumRule();