ednumber.cxx (69a74367) ednumber.cxx (23d8f725)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 682 unchanged lines hidden (view full) ---

691}
692
693sal_Bool SwEditShell::IsOutlineCopyable( sal_uInt16 nIdx ) const
694{
695 return lcl_IsOutlineMoveAndCopyable( GetDoc(), nIdx, true );
696}
697
698
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 682 unchanged lines hidden (view full) ---

691}
692
693sal_Bool SwEditShell::IsOutlineCopyable( sal_uInt16 nIdx ) const
694{
695 return lcl_IsOutlineMoveAndCopyable( GetDoc(), nIdx, true );
696}
697
698
699sal_Bool SwEditShell::NumOrNoNum( sal_Bool bNumOn, sal_Bool bChkStart ) // #115901#
699sal_Bool SwEditShell::NumOrNoNum(
700 sal_Bool bNumOn,
701 sal_Bool bChkStart )
700{
702{
701 sal_Bool bRet = sal_False;
702 SwPaM* pCrsr = GetCrsr();
703 if( pCrsr->GetNext() == pCrsr && !pCrsr->HasMark() &&
704 ( !bChkStart || !pCrsr->GetPoint()->nContent.GetIndex()) )
705 {
706 StartAllAction(); // Klammern fuers Updaten !!
707 // #115901#
708 bRet = GetDoc()->NumOrNoNum( pCrsr->GetPoint()->nNode, !bNumOn ); // #i29560#
709 EndAllAction();
710 }
711 return bRet;
703 sal_Bool bRet = sal_False;
704
705 if ( !IsMultiSelection()
706 && !HasSelection()
707 && ( !bChkStart || IsSttPara() ) )
708 {
709 StartAllAction();
710 bRet = GetDoc()->NumOrNoNum( GetCrsr()->GetPoint()->nNode, !bNumOn );
711 EndAllAction();
712 }
713 return bRet;
712}
713
714}
715
716
714sal_Bool SwEditShell::IsNoNum( sal_Bool bChkStart ) const
715{
717sal_Bool SwEditShell::IsNoNum( sal_Bool bChkStart ) const
718{
716 // ein Backspace im Absatz ohne Nummer wird zum Delete
717 sal_Bool bResult = sal_False;
719 sal_Bool bResult = sal_False;
718 SwPaM* pCrsr = GetCrsr();
719
720
720 if (pCrsr->GetNext() == pCrsr && !pCrsr->HasMark() &&
721 (!bChkStart || !pCrsr->GetPoint()->nContent.GetIndex()))
721 if ( !IsMultiSelection()
722 && !HasSelection()
723 && ( !bChkStart || IsSttPara() ) )
722 {
724 {
723 const SwTxtNode* pTxtNd = pCrsr->GetNode()->GetTxtNode();
724
725 if (pTxtNd)
725 const SwTxtNode* pTxtNd = GetCrsr()->GetNode()->GetTxtNode();
726 if ( pTxtNd != NULL )
726 {
727 {
727 bResult = ! pTxtNd->IsCountedInList();
728 bResult = !pTxtNd->IsCountedInList();
728 }
729 }
730
731 return bResult;
732}
733
734sal_uInt8 SwEditShell::GetNumLevel() const
735{
736 // gebe die akt. Ebene zurueck, auf der sich der Point vom Cursor befindet
737 //sal_uInt8 nLevel = NO_NUMBERING; //#outline level,zhaojianwei
738 sal_uInt8 nLevel = MAXLEVEL; //end,zhaojianwei
739
740 SwPaM* pCrsr = GetCrsr();
741 const SwTxtNode* pTxtNd = pCrsr->GetNode()->GetTxtNode();
742
729 }
730 }
731
732 return bResult;
733}
734
735sal_uInt8 SwEditShell::GetNumLevel() const
736{
737 // gebe die akt. Ebene zurueck, auf der sich der Point vom Cursor befindet
738 //sal_uInt8 nLevel = NO_NUMBERING; //#outline level,zhaojianwei
739 sal_uInt8 nLevel = MAXLEVEL; //end,zhaojianwei
740
741 SwPaM* pCrsr = GetCrsr();
742 const SwTxtNode* pTxtNd = pCrsr->GetNode()->GetTxtNode();
743
743 ASSERT( pTxtNd, "GetNumLevel() without text node" )
744 if ( !pTxtNd )
744 ASSERT( pTxtNd != NULL, "GetNumLevel() without text node" )
745 if ( pTxtNd == NULL )
745 return nLevel;
746
747 const SwNumRule* pRule = pTxtNd->GetNumRule();
746 return nLevel;
747
748 const SwNumRule* pRule = pTxtNd->GetNumRule();
748 if(pRule)
749 if ( pRule != NULL )
749 {
750 const int nListLevelOfTxtNode( pTxtNd->GetActualListLevel() );
751 if ( nListLevelOfTxtNode >= 0 )
752 {
753 nLevel = static_cast<sal_uInt8>( nListLevelOfTxtNode );
754 }
755 }
756

--- 12 unchanged lines hidden (view full) ---

769 const String sContinuedListId,
770 const bool bResetIndentAttrs )
771{
772 StartAllAction();
773
774 GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
775
776 SwPaM* pCrsr = GetCrsr();
750 {
751 const int nListLevelOfTxtNode( pTxtNd->GetActualListLevel() );
752 if ( nListLevelOfTxtNode >= 0 )
753 {
754 nLevel = static_cast<sal_uInt8>( nListLevelOfTxtNode );
755 }
756 }
757

--- 12 unchanged lines hidden (view full) ---

770 const String sContinuedListId,
771 const bool bResetIndentAttrs )
772{
773 StartAllAction();
774
775 GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
776
777 SwPaM* pCrsr = GetCrsr();
777 if( pCrsr->GetNext() != pCrsr ) // Mehrfachselektion ?
778 if( IsMultiSelection() )
778 {
779 SwPamRanges aRangeArr( *pCrsr );
780 SwPaM aPam( *pCrsr->GetPoint() );
781 for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
782 {
783 aRangeArr.SetPam( n, aPam );
784 GetDoc()->SetNumRule( aPam, rRule,
785 bCreateNewList, sContinuedListId,

--- 115 unchanged lines hidden ---
779 {
780 SwPamRanges aRangeArr( *pCrsr );
781 SwPaM aPam( *pCrsr->GetPoint() );
782 for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n )
783 {
784 aRangeArr.SetPam( n, aPam );
785 GetDoc()->SetNumRule( aPam, rRule,
786 bCreateNewList, sContinuedListId,

--- 115 unchanged lines hidden ---