summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Specht <os@openoffice.org>2001-05-08 07:58:18 +0000
committerOliver Specht <os@openoffice.org>2001-05-08 07:58:18 +0000
commit8cb39a16754c0469aa5341a32a5cf4684bb43439 (patch)
treef6c91de655168448978dbbd793a6548e1e23b789
parentc33c67449bc85d5da1536fad3c173a1008b005e1 (diff)
#84445# GetAnySection extended to support a position
-rw-r--r--sw/inc/editsh.hxx6
-rw-r--r--sw/source/core/edit/edsect.cxx22
-rw-r--r--sw/source/ui/uiview/viewtab.cxx11
3 files changed, 28 insertions, 11 deletions
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index b89fa25b57ee..7ed727551424 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: editsh.hxx,v $
*
- * $Revision: 1.16 $
+ * $Revision: 1.17 $
*
- * last change: $Author: os $ $Date: 2001-05-02 12:31:45 $
+ * last change: $Author: os $ $Date: 2001-05-08 08:57:20 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -799,7 +799,7 @@ public:
// Fussnote steht, deren Referenz in einem spaltigen Bereich steckt.
// Wenn man bOutOfTab setzt, wird der Bereich gesucht,
// der die Tabelle umfasst, nicht etwa ein innerer.
- const SwSection* GetAnySection( BOOL bOutOfTab = FALSE ) const;
+ const SwSection* GetAnySection( BOOL bOutOfTab = FALSE, const Point* pPt = 0 ) const;
USHORT GetSectionFmtCount() const;
USHORT GetSectionFmtPos( const SwSectionFmt& ) const;
diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx
index f9cfef96e7c6..1eca7b181411 100644
--- a/sw/source/core/edit/edsect.cxx
+++ b/sw/source/core/edit/edsect.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: edsect.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: os $ $Date: 2001-05-02 12:34:08 $
+ * last change: $Author: os $ $Date: 2001-05-08 08:58:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -96,6 +96,9 @@
#ifndef _TABFRM_HXX
#include <tabfrm.hxx> // SwTabFrm
#endif
+#ifndef _ROOTFRM_HXX
+#include <rootfrm.hxx> // SwRootFrm
+#endif
// SS fuer Bereiche
@@ -149,9 +152,20 @@ const SwSection* SwEditShell::GetCurrSection() const
* Bereich innerhalb der Fussnote sein.
* --------------------------------------------------*/
-const SwSection* SwEditShell::GetAnySection( BOOL bOutOfTab ) const
+const SwSection* SwEditShell::GetAnySection( BOOL bOutOfTab, const Point* pPt ) const
{
- SwFrm* pFrm = GetCurrFrm();
+ SwFrm *pFrm;
+ if ( pPt )
+ {
+ SwPosition aPos( *GetCrsr()->GetPoint() );
+ Point aPt( *pPt );
+ GetLayout()->GetCrsrOfst( &aPos, aPt );
+ SwCntntNode *pNd = aPos.nNode.GetNode().GetCntntNode();
+ pFrm = pNd->GetFrm( pPt );
+ }
+ else
+ pFrm = GetCurrFrm( FALSE );
+
if( bOutOfTab && pFrm )
pFrm = pFrm->FindTabFrm();
if( pFrm && pFrm->IsInSct() )
diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx
index 6fdd11fdc576..f9bebc961d72 100644
--- a/sw/source/ui/uiview/viewtab.cxx
+++ b/sw/source/ui/uiview/viewtab.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: viewtab.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: ama $ $Date: 2001-02-16 12:28:39 $
+ * last change: $Author: os $ $Date: 2001-05-08 08:57:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1425,7 +1425,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
!bFrmSelection &&
nFrmType & FRMTYPE_COLSECT )
{
- const SwSection *pSect = rSh.GetAnySection();
+ const SwSection *pSect = rSh.GetAnySection(FALSE, pPt);
ASSERT( pSect, "Welcher Bereich?");
if( pSect )
{
@@ -1669,7 +1669,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
{
eRecType = bSectOutTbl ? RECT_OUTTABSECTION
: RECT_SECTION;
- const SwSection *pSect = rSh.GetAnySection( bSectOutTbl );
+ const SwSection *pSect = rSh.GetAnySection( bSectOutTbl, pPt );
ASSERT( pSect, "Welcher Bereich?");
pFmt = pSect->GetFmt();
}
@@ -1784,6 +1784,9 @@ void SwView::StateTabWin(SfxItemSet& rSet)
/*------------------------------------------------------------------------
$Log: not supported by cvs2svn $
+ Revision 1.2 2001/02/16 12:28:39 ama
+ Fix #81084#: Negativ indent of paragraphs in flyframes
+
Revision 1.1.1.1 2000/09/18 17:14:49 hr
initial import