viewport.cxx (efeef26f) | viewport.cxx (a41e6500) |
---|---|
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 --- 703 unchanged lines hidden (view full) --- 712 if(!pWrtShell->GetViewOptions()->getBrowseMode() && 713 pScrollbar->GetType() == SCROLL_DRAG) 714 { 715 //Hier wieder auskommentieren wenn das mitscrollen nicht gewuenscht ist. 716 // JP 21.07.00: the end scrollhandler invalidate the FN_STAT_PAGE, 717 // so we dont must do it agin. 718 EndScrollHdl(pScrollbar); 719 | 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 --- 703 unchanged lines hidden (view full) --- 712 if(!pWrtShell->GetViewOptions()->getBrowseMode() && 713 pScrollbar->GetType() == SCROLL_DRAG) 714 { 715 //Hier wieder auskommentieren wenn das mitscrollen nicht gewuenscht ist. 716 // JP 21.07.00: the end scrollhandler invalidate the FN_STAT_PAGE, 717 // so we dont must do it agin. 718 EndScrollHdl(pScrollbar); 719 |
720 Point aPos( aVisArea.TopLeft() ); 721 lcl_GetPos(this, aPos, pScrollbar, IsDocumentBorder()); | 720 if ( Help::IsQuickHelpEnabled() && 721 pWrtShell->GetViewOptions()->IsShowScrollBarTips()) 722 { 723 Point aPos( aVisArea.TopLeft() ); 724 lcl_GetPos(this, aPos, pScrollbar, IsDocumentBorder()); |
722 | 725 |
723 sal_uInt16 nPhNum = 1; 724 sal_uInt16 nVirtNum = 1; | 726 sal_uInt16 nPhNum = 1; 727 sal_uInt16 nVirtNum = 1; |
725 | 728 |
726 String sDisplay; 727 if(pWrtShell->GetPageNumber( aPos.Y(), sal_False, nPhNum, nVirtNum, sDisplay )) 728 { 729 // JP 21.07.00: the end scrollhandler invalidate the FN_STAT_PAGE, 730 // so we dont must do it agin. 731// if(!GetViewFrame()->GetFrame().IsInPlace()) 732// S F X_BINDINGS().Update(FN_STAT_PAGE); | 729 String sDisplay; 730 if(pWrtShell->GetPageNumber( aPos.Y(), sal_False, nPhNum, nVirtNum, sDisplay )) 731 { 732 // JP 21.07.00: the end scrollhandler invalidate the FN_STAT_PAGE, 733 // so we dont must do it agin. 734 // if(!GetViewFrame()->GetFrame().IsInPlace()) 735 // S F X_BINDINGS().Update(FN_STAT_PAGE); |
733 | 736 |
734 //QuickHelp: 735 if( pWrtShell->GetPageCnt() > 1 && Help::IsQuickHelpEnabled() ) 736 { 737 if( !nPgNum || nPgNum != nPhNum ) 738 { 739 Rectangle aRect; 740 aRect.Left() = pScrollbar->GetParent()->OutputToScreenPixel( 741 pScrollbar->GetPosPixel() ).X() -8; 742 aRect.Top() = pScrollbar->OutputToScreenPixel( 743 pScrollbar->GetPointerPosPixel() ).Y(); 744 aRect.Right() = aRect.Left(); 745 aRect.Bottom() = aRect.Top(); | 737 //QuickHelp: 738 if( pWrtShell->GetPageCnt() > 1 ) 739 { 740 if( !nPgNum || nPgNum != nPhNum ) 741 { 742 Rectangle aRect; 743 aRect.Left() = pScrollbar->GetParent()->OutputToScreenPixel( 744 pScrollbar->GetPosPixel() ).X() -8; 745 aRect.Top() = pScrollbar->OutputToScreenPixel( 746 pScrollbar->GetPointerPosPixel() ).Y(); 747 aRect.Right() = aRect.Left(); 748 aRect.Bottom() = aRect.Top(); |
746 | 749 |
747 String sPageStr( GetPageStr( nPhNum, nVirtNum, sDisplay )); 748 SwContentAtPos aCnt( SwContentAtPos::SW_OUTLINE ); 749 pWrtShell->GetContentAtPos( aPos, aCnt ); 750 if( aCnt.sStr.Len() ) 751 { 752 sPageStr += String::CreateFromAscii( 753 RTL_CONSTASCII_STRINGPARAM( " - " )); 754 sPageStr.Insert( aCnt.sStr, 0, 80 ); 755 sPageStr.SearchAndReplaceAll( '\t', ' ' ); 756 sPageStr.SearchAndReplaceAll( 0x0a, ' ' ); 757 } | 750 String sPageStr( GetPageStr( nPhNum, nVirtNum, sDisplay )); 751 SwContentAtPos aCnt( SwContentAtPos::SW_OUTLINE ); 752 pWrtShell->GetContentAtPos( aPos, aCnt ); 753 if( aCnt.sStr.Len() ) 754 { 755 sPageStr += String::CreateFromAscii( 756 RTL_CONSTASCII_STRINGPARAM( " - " )); 757 sPageStr.Insert( aCnt.sStr, 0, 80 ); 758 sPageStr.SearchAndReplaceAll( '\t', ' ' ); 759 sPageStr.SearchAndReplaceAll( 0x0a, ' ' ); 760 } |
758 | 761 |
759 Help::ShowQuickHelp( pScrollbar, aRect, sPageStr, 760 QUICKHELP_RIGHT|QUICKHELP_VCENTER); 761 } 762 nPgNum = nPhNum; 763 } 764 } | 762 Help::ShowQuickHelp( pScrollbar, aRect, sPageStr, 763 QUICKHELP_RIGHT|QUICKHELP_VCENTER); 764 } 765 nPgNum = nPhNum; 766 } 767 } 768 } |
765 } 766 else 767 EndScrollHdl(pScrollbar); 768 769 if ( pScrollbar->GetType() == SCROLL_DRAG ) 770 pWrtShell->EnableSmooth( sal_True ); 771 772 return 0; --- 608 unchanged lines hidden --- | 769 } 770 else 771 EndScrollHdl(pScrollbar); 772 773 if ( pScrollbar->GetType() == SCROLL_DRAG ) 774 pWrtShell->EnableSmooth( sal_True ); 775 776 return 0; --- 608 unchanged lines hidden --- |