You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by or...@apache.org on 2013/03/19 16:50:03 UTC

svn commit: r1458352 [1/2] - in /openoffice/branches/sidebar/main/sw: inc/cmdid.h sdi/_viewsh.sdi sdi/swriter.sdi source/core/doc/docdesc.cxx source/ui/sidebar/PagePropertyPanel.cxx source/ui/uiview/viewtab.cxx

Author: orw
Date: Tue Mar 19 15:50:03 2013
New Revision: 1458352

URL: http://svn.apache.org/r1458352
Log:
#121793# - introduce new slots for page style's margin values for correct behavior of corresponding control in page property panel 

Modified:
    openoffice/branches/sidebar/main/sw/inc/cmdid.h
    openoffice/branches/sidebar/main/sw/sdi/_viewsh.sdi
    openoffice/branches/sidebar/main/sw/sdi/swriter.sdi
    openoffice/branches/sidebar/main/sw/source/core/doc/docdesc.cxx
    openoffice/branches/sidebar/main/sw/source/ui/sidebar/PagePropertyPanel.cxx
    openoffice/branches/sidebar/main/sw/source/ui/uiview/viewtab.cxx

Modified: openoffice/branches/sidebar/main/sw/inc/cmdid.h
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/inc/cmdid.h?rev=1458352&r1=1458351&r2=1458352&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sw/inc/cmdid.h (original)
+++ openoffice/branches/sidebar/main/sw/inc/cmdid.h Tue Mar 19 15:50:03 2013
@@ -1263,7 +1263,9 @@ Achtung: Ab sofort sind in diesem File k
 #define FN_UNO_DESCRIPTION              (FN_FRAME + 20)
 
 #define FN_PROPERTY_SIDEBAR_GRAFIC_DLG  (FN_SIDEBAR + 0)
-#define SID_ATTR_SWPAGE_COLUMN          (FN_SIDEBAR + 1)
+#define SID_ATTR_PAGE_COLUMN            (FN_SIDEBAR + 1)
+#define SID_ATTR_PAGE_ULSPACE           (FN_SIDEBAR + 2)
+#define SID_ATTR_PAGE_LRSPACE           (FN_SIDEBAR + 3)
 
 
 //Member-Ids fuer Fill/SetVariable an Items

Modified: openoffice/branches/sidebar/main/sw/sdi/_viewsh.sdi
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/sdi/_viewsh.sdi?rev=1458352&r1=1458351&r2=1458352&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sw/sdi/_viewsh.sdi (original)
+++ openoffice/branches/sidebar/main/sw/sdi/_viewsh.sdi Tue Mar 19 15:50:03 2013
@@ -404,11 +404,23 @@ interface BaseTextEditView
 		ExecMethod = Execute ;
 		StateMethod = GetState ;
 	]
-    SID_ATTR_SWPAGE_COLUMN
+    SID_ATTR_PAGE_COLUMN
     [
         ExecMethod = ExecTabWin ;
         StateMethod = StateTabWin ;
     ]
+    SID_ATTR_PAGE_ULSPACE
+    [
+        ExecMethod = ExecTabWin ;
+        StateMethod = StateTabWin ;
+        DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+    ]
+    SID_ATTR_PAGE_LRSPACE
+    [
+        ExecMethod = ExecTabWin ;
+        StateMethod = StateTabWin ;
+        DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
+    ]
 
     SID_THESAURUS // status(final|play)
 	[

Modified: openoffice/branches/sidebar/main/sw/sdi/swriter.sdi
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/sdi/swriter.sdi?rev=1458352&r1=1458351&r2=1458352&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sw/sdi/swriter.sdi (original)
+++ openoffice/branches/sidebar/main/sw/sdi/swriter.sdi Tue Mar 19 15:50:03 2013
@@ -10337,7 +10337,7 @@ SfxVoidItem CopyHyperlinkLocation FN_COP
 ]
 
 
-SfxInt16Item SwPageColumn SID_ATTR_SWPAGE_COLUMN
+SfxInt16Item SwPageColumn SID_ATTR_PAGE_COLUMN
 
 [
     /* flags: */
@@ -10363,3 +10363,55 @@ SfxInt16Item SwPageColumn SID_ATTR_SWPAG
     GroupId = GID_VIEW;
 ]
 
+SvxLongULSpaceItem SwPageULMargin SID_ATTR_PAGE_ULSPACE
+
+[
+	/* flags: */
+	AutoUpdate = FALSE,
+	Cachable = Cachable,
+	FastCall = FALSE,
+	HasCoreId = FALSE,
+	HasDialog = FALSE,
+	ReadOnlyDoc = FALSE,
+	Toggle = FALSE,
+	Container = FALSE,
+	RecordAbsolute = FALSE,
+	RecordPerSet;
+	Synchron;
+
+	Readonly = FALSE,
+
+	/* config: */
+	AccelConfig = FALSE,
+	MenuConfig = FALSE,
+	StatusBarConfig = FALSE,
+	ToolBoxConfig = FALSE,
+	GroupId = GID_FORMAT;
+]
+
+SvxLongLRSpaceItem SwPageLRMargin SID_ATTR_PAGE_LRSPACE
+
+[
+	/* flags: */
+	AutoUpdate = FALSE,
+	Cachable = Cachable,
+	FastCall = FALSE,
+	HasCoreId = FALSE,
+	HasDialog = FALSE,
+	ReadOnlyDoc = FALSE,
+	Toggle = FALSE,
+	Container = FALSE,
+	RecordAbsolute = FALSE,
+	RecordPerSet;
+	Synchron;
+
+	Readonly = FALSE,
+
+	/* config: */
+	AccelConfig = FALSE,
+	MenuConfig = FALSE,
+	StatusBarConfig = FALSE,
+	ToolBoxConfig = FALSE,
+	GroupId = GID_FORMAT;
+]
+

Modified: openoffice/branches/sidebar/main/sw/source/core/doc/docdesc.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/source/core/doc/docdesc.cxx?rev=1458352&r1=1458351&r2=1458352&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sw/source/core/doc/docdesc.cxx (original)
+++ openoffice/branches/sidebar/main/sw/source/core/doc/docdesc.cxx Tue Mar 19 15:50:03 2013
@@ -428,14 +428,15 @@ void SwDoc::ChgPageDesc( sal_uInt16 i, c
         GetIDocumentUndoRedo().DelAllUndoObj();
     }
 
-    SfxBindings* pBindings = GetDocShell() ? GetDocShell()->GetDispatcher()->GetBindings() : 0;
+    SfxBindings* pBindings = 
+        ( GetDocShell() && GetDocShell()->GetDispatcher() ) ? GetDocShell()->GetDispatcher()->GetBindings() : 0;
     if ( pBindings )
     {
-        pBindings->Invalidate( SID_ATTR_SWPAGE_COLUMN );
+        pBindings->Invalidate( SID_ATTR_PAGE_COLUMN );
         pBindings->Invalidate( SID_ATTR_PAGE );
         pBindings->Invalidate( SID_ATTR_PAGE_SIZE );
-        pBindings->Invalidate( SID_ATTR_LONG_ULSPACE );
-        pBindings->Invalidate( SID_ATTR_LONG_LRSPACE );
+        pBindings->Invalidate( SID_ATTR_PAGE_ULSPACE );
+        pBindings->Invalidate( SID_ATTR_PAGE_LRSPACE );
     }
 
 }

Modified: openoffice/branches/sidebar/main/sw/source/ui/sidebar/PagePropertyPanel.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/sidebar/main/sw/source/ui/sidebar/PagePropertyPanel.cxx?rev=1458352&r1=1458351&r2=1458352&view=diff
==============================================================================
--- openoffice/branches/sidebar/main/sw/source/ui/sidebar/PagePropertyPanel.cxx (original)
+++ openoffice/branches/sidebar/main/sw/source/ui/sidebar/PagePropertyPanel.cxx Tue Mar 19 15:50:03 2013
@@ -132,21 +132,21 @@ PagePropertyPanel::PagePropertyPanel(
     , mImgColumnNone_L			(SW_RES(IMG_PAGE_COLUMN_NONE_L))
 
     , mpPageItem( new SvxPageItem(SID_ATTR_PAGE) )
-    , mpPageLRMarginItem( new SvxLongLRSpaceItem( 0, 0, SID_ATTR_LONG_LRSPACE ) )
-    , mpPageULMarginItem( new SvxLongULSpaceItem( 0, 0, SID_ATTR_LONG_ULSPACE ) )
+    , mpPageLRMarginItem( new SvxLongLRSpaceItem( 0, 0, SID_ATTR_PAGE_LRSPACE ) )
+    , mpPageULMarginItem( new SvxLongULSpaceItem( 0, 0, SID_ATTR_PAGE_ULSPACE ) )
     , mpPageSizeItem( new SvxSizeItem(SID_ATTR_PAGE_SIZE) )
     , mePaper( PAPER_USER )
-    , mpPageColumnTypeItem( new SfxInt16Item(SID_ATTR_SWPAGE_COLUMN) )
+    , mpPageColumnTypeItem( new SfxInt16Item(SID_ATTR_PAGE_COLUMN) )
 
     , meFUnit()
     , meUnit()
 
-    , m_aSwPagePgULControl		(SID_ATTR_LONG_ULSPACE, *pBindings, *this)
-    , m_aSwPagePgLRControl		(SID_ATTR_LONG_LRSPACE, *pBindings, *this)
-    , m_aSwPagePgSizeControl		(SID_ATTR_PAGE_SIZE, *pBindings, *this)
-    , m_aSwPagePgControl			(SID_ATTR_PAGE, *pBindings, *this)
-    , m_aSwPageColControl			(SID_ATTR_SWPAGE_COLUMN, *pBindings, *this)
-    , m_aSwPagePgMetricControl	(SID_ATTR_METRIC, *pBindings, *this)
+    , m_aSwPagePgULControl(SID_ATTR_PAGE_ULSPACE, *pBindings, *this)
+    , m_aSwPagePgLRControl(SID_ATTR_PAGE_LRSPACE, *pBindings, *this)
+    , m_aSwPagePgSizeControl(SID_ATTR_PAGE_SIZE, *pBindings, *this)
+    , m_aSwPagePgControl(SID_ATTR_PAGE, *pBindings, *this)
+    , m_aSwPageColControl(SID_ATTR_PAGE_COLUMN, *pBindings, *this)
+    , m_aSwPagePgMetricControl(SID_ATTR_METRIC, *pBindings, *this)
 
     , mpOrientationPopup()
     , mpMarginPopup()
@@ -246,8 +246,8 @@ void PagePropertyPanel::Initialize()
     meUnit  = m_aSwPagePgSizeControl.GetCoreMetric();
 
     // 'pull' for page style's attribute values
-    mpBindings->Update( SID_ATTR_LONG_LRSPACE );
-    mpBindings->Update( SID_ATTR_LONG_ULSPACE );
+    mpBindings->Update( SID_ATTR_PAGE_LRSPACE );
+    mpBindings->Update( SID_ATTR_PAGE_ULSPACE );
     mpBindings->Update( SID_ATTR_PAGE );
     mpBindings->Update( SID_ATTR_PAGE_SIZE );
 }
@@ -387,7 +387,7 @@ void PagePropertyPanel::ExecuteMarginLRC
 {
     mpPageLRMarginItem->SetLeft( nPageLeftMargin );
     mpPageLRMarginItem->SetRight( nPageRightMargin );
-    GetBindings()->GetDispatcher()->Execute( SID_ATTR_LONG_LRSPACE, SFX_CALLMODE_RECORD, mpPageLRMarginItem.get(),  0L );	
+    GetBindings()->GetDispatcher()->Execute( SID_ATTR_PAGE_LRSPACE, SFX_CALLMODE_RECORD, mpPageLRMarginItem.get(),  0L );	
 }
 
 void PagePropertyPanel::ExecuteMarginULChange(
@@ -396,7 +396,7 @@ void PagePropertyPanel::ExecuteMarginULC
 {
     mpPageULMarginItem->SetUpper( nPageTopMargin );
     mpPageULMarginItem->SetLower( nPageBottomMargin );
-    GetBindings()->GetDispatcher()->Execute( SID_ATTR_LONG_ULSPACE, SFX_CALLMODE_RECORD, mpPageULMarginItem.get(),  0L );
+    GetBindings()->GetDispatcher()->Execute( SID_ATTR_PAGE_ULSPACE, SFX_CALLMODE_RECORD, mpPageULMarginItem.get(),  0L );
 }
 
 
@@ -486,7 +486,7 @@ void PagePropertyPanel::ClosePageSizePop
 void PagePropertyPanel::ExecuteColumnChange( const sal_uInt16 nColumnType )
 {
     mpPageColumnTypeItem->SetValue( nColumnType );
-    mpBindings->GetDispatcher()->Execute(SID_ATTR_SWPAGE_COLUMN, SFX_CALLMODE_RECORD, mpPageColumnTypeItem.get(),  0L );
+    mpBindings->GetDispatcher()->Execute(SID_ATTR_PAGE_COLUMN, SFX_CALLMODE_RECORD, mpPageColumnTypeItem.get(),  0L );
 }
 
 
@@ -518,7 +518,7 @@ void PagePropertyPanel::NotifyItemUpdate
 {
     switch( nSId )
     {
-    case SID_ATTR_SWPAGE_COLUMN:
+    case SID_ATTR_PAGE_COLUMN:
         {
             if ( eState >= SFX_ITEM_AVAILABLE && 
                  pState && pState->ISA(SfxInt16Item) )
@@ -528,7 +528,7 @@ void PagePropertyPanel::NotifyItemUpdate
             }
         }
         break;
-    case SID_ATTR_LONG_LRSPACE:
+    case SID_ATTR_PAGE_LRSPACE:
         if ( eState >= SFX_ITEM_AVAILABLE &&
              pState && pState->ISA(SvxLongLRSpaceItem) )
         {
@@ -537,7 +537,7 @@ void PagePropertyPanel::NotifyItemUpdate
         }
         break;
 
-    case SID_ATTR_LONG_ULSPACE:
+    case SID_ATTR_PAGE_ULSPACE:
         if ( eState >= SFX_ITEM_AVAILABLE &&
              pState && pState->ISA(SvxLongULSpaceItem) )
         {