ooo-build r11522 - in trunk: . patches/src680
- From: freuter svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r11522 - in trunk: . patches/src680
- Date: Thu, 7 Feb 2008 11:25:23 +0000 (GMT)
Author: freuter
Date: Thu Feb 7 11:25:23 2008
New Revision: 11522
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11522&view=rev
Log:
checkbox status can now be changed via a mouse click.
Modified:
trunk/ChangeLog
trunk/patches/src680/sw-field-patch.diff
Modified: trunk/patches/src680/sw-field-patch.diff
==============================================================================
--- trunk/patches/src680/sw-field-patch.diff (original)
+++ trunk/patches/src680/sw-field-patch.diff Thu Feb 7 11:25:23 2008
@@ -129,7 +129,7 @@
#endif
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
-index 7832da2..493335f 100644
+index 7832da2..0d4a97d 100644
--- sw/inc/crsrsh.hxx
+++ sw/inc/crsrsh.hxx
@@ -83,12 +83,14 @@
@@ -147,7 +147,25 @@
class SwCntntFrm;
class SwCrsrShell;
class SwCursor;
-@@ -630,6 +632,13 @@ public:
+@@ -144,7 +146,8 @@ struct SwContentAtPos
+ SW_REFMARK = 0x0100,
+ SW_NUMLABEL = 0x0200, // #i23726#
+ SW_CONTENT_CHECK = 0x0400, // --> FME 2005-05-13 #i43742# <--
+- SW_SMARTTAG = 0x0800
++ SW_SMARTTAG = 0x0800,
++ SW_FORMCTRL = 0x1000
+ #ifndef PRODUCT
+ ,SW_CURR_ATTRS = 0x4000 // nur zum Debuggen
+ ,SW_TABLEBOXVALUE = 0x8000 // nur zum Debuggen
+@@ -156,6 +159,7 @@ struct SwContentAtPos
+ const SfxPoolItem* pAttr;
+ const SwRedline* pRedl;
+ SwCntntNode * pNode; // #i23726#
++ const SwFieldBookmark* pFldBookmark;
+ } aFnd;
+
+ int nDist; // #i23726#
+@@ -630,6 +634,13 @@ public:
// werden, es wird dann bei gleichen Namen nur durchnumeriert.
void MakeUniqueBookmarkName( String& rNm );
@@ -414,6 +432,35 @@
BOOL SwCrsrShell::GoPrevBookmark()
{
+diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
+index 26874d2..39d7d8c 100644
+--- sw/source/core/crsr/crstrvl.cxx
++++ sw/source/core/crsr/crstrvl.cxx
+@@ -165,6 +165,7 @@
+ #include <wrong.hxx>
+
+ #include <vcl/window.hxx>
++#include <bookmrk.hxx>
+
+ using namespace ::com::sun::star;
+
+@@ -1256,6 +1257,16 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
+ }
+ }
+
++ if( !bRet && SwContentAtPos::SW_FORMCTRL & rCntntAtPos.eCntntAtPos )
++ {
++ SwFieldBookmark* pFldBookmark=GetDoc()->getFormFieldBookmarkFor( aPos) ;
++ if( bCrsrFoundExact && pTxtNd && pFldBookmark) {
++ rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_FORMCTRL;
++ rCntntAtPos.aFnd.pFldBookmark = pFldBookmark;
++ bRet=TRUE;
++ }
++ }
++
+ if( !bRet && SwContentAtPos::SW_FTN & rCntntAtPos.eCntntAtPos )
+ {
+ if( aTmpState.bFtnNoInfo )
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index bd820b4..0a83a1c 100644
--- sw/source/core/crsr/pam.cxx
@@ -2419,7 +2466,7 @@
/*
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
-index 382eff6..a996b18 100644
+index 382eff6..d8eebb6 100644
--- sw/source/ui/docvw/edtwin.cxx
+++ sw/source/ui/docvw/edtwin.cxx
@@ -325,6 +325,9 @@
@@ -2530,6 +2577,34 @@
case KS_NumIndentDec:
rSh.NumIndent(-360);
break;
+@@ -4188,7 +4243,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
+
+ SwContentAtPos aCntntAtPos( SwContentAtPos::SW_CLICKFIELD |
+ SwContentAtPos::SW_INETATTR |
+- SwContentAtPos::SW_SMARTTAG );
++ SwContentAtPos::SW_SMARTTAG |
++ SwContentAtPos::SW_FORMCTRL);
+
+ if( rSh.GetContentAtPos( aDocPt, aCntntAtPos, TRUE ) )
+ {
+@@ -4209,7 +4265,16 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
+ if ( bExecSmarttags && SwSmartTagMgr::Get().IsSmartTagsEnabled() )
+ rView.ExecSmartTagPopup( aDocPt );
+ }
+- else // if ( SwContentAtPos::SW_INETATTR == aCntntAtPos.eCntntAtPos )
++ else if ( SwContentAtPos::SW_FORMCTRL == aCntntAtPos.eCntntAtPos )
++ {
++ ASSERT( aCntntAtPos.aFnd.pFldBookmark!=NULL, "where is my field ptr???");
++ if ( aCntntAtPos.aFnd.pFldBookmark!=NULL) {
++ SwFieldBookmark *fieldBM=const_cast<SwFieldBookmark *>(aCntntAtPos.aFnd.pFldBookmark);
++ fieldBM->SetChecked(!fieldBM->IsChecked());
++ rSh.CalcLayout(); // workaround; is there a better way to update/invalidate???
++ }
++ }
++ else // if ( SwContentAtPos::SW_INETATTR == aCntntAtPos.eCntntAtPos )
+ {
+ if ( bExecHyperlinks )
+ rSh.ClickToINetAttr( *(SwFmtINetFmt*)aCntntAtPos.aFnd.pAttr, nFilter );
diff --git a/sw/source/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx
index f20d199..c51f15b 100644
--- sw/source/ui/inc/wrtsh.hxx
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]