[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 3 commits - officecfg/registry sfx2/inc sfx2/source svx/source

Oliver-Rainer Wittmann orw at apache.org
Tue May 14 07:07:14 PDT 2013


 officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs |    1 
 sfx2/inc/sfx2/sidebar/EnumContext.hxx                          |    1 
 sfx2/source/sidebar/EnumContext.cxx                            |    3 
 sfx2/source/sidebar/ResourceManager.cxx                        |    1 
 svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx        |   94 ++-----
 svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx        |    2 
 svx/source/sidebar/paragraph/ParaPropertyPanel.cxx             |  118 ++++------
 svx/source/sidebar/paragraph/ParaPropertyPanel.hrc             |    1 
 svx/source/sidebar/possize/PosSizePropertyPanel.cxx            |    7 
 9 files changed, 90 insertions(+), 138 deletions(-)

New commits:
commit de52e4d0e544f6a6c2ab51631870d682885c30cd
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date:   Tue May 14 13:37:28 2013 +0000

    correct context switch handling in paragraph property panel and position and size property panel

diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
index 92c8043..349a62f 100755
--- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
+++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
@@ -471,24 +471,19 @@ void ParaLineSpacingControl::Rearrange(SfxItemState currSPState,FieldUnit currMe
 
     aLineDist.SaveValue();
 
-    sal_uInt16 uCount = aLineDist.GetEntryCount();
+    const sal_uInt16 uCount = aLineDist.GetEntryCount();
     if( uCount == LLINESPACE_FIX + 1 )
     {
-        switch (currentContext.GetCombinedContext())
+        switch (currentContext.GetCombinedContext_DI())
         {
-            case CombinedEnumContext(Application_Impress, Context_Table):
-                case CombinedEnumContext(Application_Draw, Context_Table):
-            case CombinedEnumContext(Application_Writer, Context_DrawText):
-            case CombinedEnumContext(Application_Calc, Context_DrawText):
-            case CombinedEnumContext(Application_Draw, Context_DrawText):
-                case CombinedEnumContext(Application_Impress, Context_DrawText):
-            case CombinedEnumContext(Application_Writer, Context_Annotation):
-            case CombinedEnumContext(Application_Draw, Context_Draw):
-                case CombinedEnumContext(Application_Draw, Context_TextObject):
-                case CombinedEnumContext(Application_Draw, Context_Graphic):
-                case CombinedEnumContext(Application_Impress, Context_Draw):
-                case CombinedEnumContext(Application_Impress, Context_TextObject):
-                case CombinedEnumContext(Application_Impress, Context_Graphic):
+        case CombinedEnumContext(Application_DrawImpress, Context_Table):
+        case CombinedEnumContext(Application_DrawImpress, Context_DrawText):
+        case CombinedEnumContext(Application_DrawImpress, Context_Draw):
+        case CombinedEnumContext(Application_DrawImpress, Context_TextObject):
+        case CombinedEnumContext(Application_DrawImpress, Context_Graphic):
+        case CombinedEnumContext(Application_Calc, Context_DrawText):
+        case CombinedEnumContext(Application_WriterVariants, Context_DrawText):
+        case CombinedEnumContext(Application_WriterVariants, Context_Annotation):
             {
                 aLineDist.RemoveEntry(LLINESPACE_FIX);
             }
@@ -496,11 +491,11 @@ void ParaLineSpacingControl::Rearrange(SfxItemState currSPState,FieldUnit currMe
     }
     else if( uCount == LLINESPACE_FIX)
     {
-        switch (currentContext.GetCombinedContext())
+        switch (currentContext.GetCombinedContext_DI())
         {
-            case CombinedEnumContext(Application_Writer, Context_Default):
-            case CombinedEnumContext(Application_Writer, Context_Text):
-            case CombinedEnumContext(Application_Writer, Context_Table):
+            case CombinedEnumContext(Application_WriterVariants, Context_Default):
+            case CombinedEnumContext(Application_WriterVariants, Context_Text):
+            case CombinedEnumContext(Application_WriterVariants, Context_Table):
             {
                 aLineDist.InsertEntry(String::CreateFromAscii("Fixed"), LLINESPACE_FIX);
             }
diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
index c49a55a..6c0dfc5 100755
--- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
+++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
@@ -837,20 +837,20 @@ IMPL_LINK(ParaPropertyPanel, ClickIndent_IncDec_Hdl_Impl, ToolBox *, pControl)
 {
     switch (pControl->GetCurItemId())
     {
-        case INDENT_INCREMENT:
+    case INDENT_INCREMENT:
         {
-            switch (maContext.GetCombinedContext())
+            switch (maContext.GetCombinedContext_DI())
             {
-                case CombinedEnumContext(Application_Writer, Context_Default):
-                case CombinedEnumContext(Application_Writer, Context_Text):
-                case CombinedEnumContext(Application_Writer, Context_Table):
+            case CombinedEnumContext(Application_WriterVariants, Context_Default):
+            case CombinedEnumContext(Application_WriterVariants, Context_Text):
+            case CombinedEnumContext(Application_WriterVariants, Context_Table):
                 {
                     SfxBoolItem aMargin( SID_INC_INDENT, sal_True );
                     GetBindings()->GetDispatcher()->Execute(
                         SID_INC_INDENT, SFX_CALLMODE_RECORD, &aMargin, 0L);
                 }
                 break;
-                default:
+            default:
                 {
                     SvxLRSpaceItem aMargin( SID_ATTR_PARA_LRSPACE );
 
@@ -867,20 +867,20 @@ IMPL_LINK(ParaPropertyPanel, ClickIndent_IncDec_Hdl_Impl, ToolBox *, pControl)
             }
         }
         break;
-        case INDENT_DECREMENT:
+    case INDENT_DECREMENT:
         {
-            switch (maContext.GetCombinedContext())
+            switch (maContext.GetCombinedContext_DI())
             {
-                case CombinedEnumContext(Application_Writer, Context_Default):
-                case CombinedEnumContext(Application_Writer, Context_Text):
-                case CombinedEnumContext(Application_Writer, Context_Table):
+            case CombinedEnumContext(Application_WriterVariants, Context_Default):
+            case CombinedEnumContext(Application_WriterVariants, Context_Text):
+            case CombinedEnumContext(Application_WriterVariants, Context_Table):
                 {
                     SfxBoolItem aMargin( SID_DEC_INDENT, sal_True );
                     GetBindings()->GetDispatcher()->Execute(
                         SID_DEC_INDENT, SFX_CALLMODE_RECORD, &aMargin, 0L);
                 }
                 break;
-                default:
+            default:
                 {
                     if((maTxtLeft - INDENT_STEP) < 0)
                         maTxtLeft = DEFAULT_VALUE;
@@ -902,7 +902,7 @@ IMPL_LINK(ParaPropertyPanel, ClickIndent_IncDec_Hdl_Impl, ToolBox *, pControl)
             }
         }
         break;
-        case ID_HANGING_INDENT:
+    case ID_HANGING_INDENT:
         {
             SvxLRSpaceItem aMargin( SID_ATTR_PARA_LRSPACE );
             aMargin.SetTxtLeft( (const long)GetCoreValue( *maLeftIndent.get(), m_eLRSpaceUnit ) + (const short)GetCoreValue( *maFLineIndent.get(), m_eLRSpaceUnit ) );
@@ -1174,12 +1174,12 @@ void ParaPropertyPanel::StateChangedAlignmentImpl( sal_uInt16 nSID, SfxItemState
 
 void ParaPropertyPanel::StateChangedIndentImpl( sal_uInt16 /* nSID */, SfxItemState eState, const SfxPoolItem* pState )
 {
-    switch (maContext.GetCombinedContext())
+    switch (maContext.GetCombinedContext_DI())
     {
 
-        case CombinedEnumContext(Application_Writer, Context_DrawText):
-        case CombinedEnumContext(Application_Calc, Context_DrawText):
-        case CombinedEnumContext(Application_Writer, Context_Annotation):
+    case CombinedEnumContext(Application_WriterVariants, Context_DrawText):
+    case CombinedEnumContext(Application_WriterVariants, Context_Annotation):
+    case CombinedEnumContext(Application_Calc, Context_DrawText):
         {
             maLeftIndent->SetMin( DEFAULT_VALUE );
             maRightIndent->SetMin( DEFAULT_VALUE );
@@ -1188,16 +1188,11 @@ void ParaPropertyPanel::StateChangedIndentImpl( sal_uInt16 /* nSID */, SfxItemSt
             maTbxProDemote->Hide();
         }
         break;
-        case CombinedEnumContext(Application_Draw, Context_DrawText):
-            case CombinedEnumContext(Application_Impress, Context_DrawText):
-        case CombinedEnumContext(Application_Draw, Context_Draw):
-        case CombinedEnumContext(Application_Draw, Context_TextObject):
-        case CombinedEnumContext(Application_Draw, Context_Graphic):
-        case CombinedEnumContext(Application_Impress, Context_Draw):
-        case CombinedEnumContext(Application_Impress, Context_TextObject):
-        case CombinedEnumContext(Application_Impress, Context_Graphic):
-        case CombinedEnumContext(Application_Impress, Context_Table):
-            case CombinedEnumContext(Application_Draw, Context_Table):
+    case CombinedEnumContext(Application_DrawImpress, Context_DrawText):
+    case CombinedEnumContext(Application_DrawImpress, Context_Draw):
+    case CombinedEnumContext(Application_DrawImpress, Context_TextObject):
+    case CombinedEnumContext(Application_DrawImpress, Context_Graphic):
+    case CombinedEnumContext(Application_DrawImpress, Context_Table):
         {
             maLeftIndent->SetMin( DEFAULT_VALUE );
             maRightIndent->SetMin( DEFAULT_VALUE );
@@ -1206,9 +1201,9 @@ void ParaPropertyPanel::StateChangedIndentImpl( sal_uInt16 /* nSID */, SfxItemSt
             maTbxProDemote->Show();
         }
         break;
-        case CombinedEnumContext(Application_Writer, Context_Default):
-        case CombinedEnumContext(Application_Writer, Context_Text):
-        case CombinedEnumContext(Application_Writer, Context_Table):
+    case CombinedEnumContext(Application_WriterVariants, Context_Default):
+    case CombinedEnumContext(Application_WriterVariants, Context_Text):
+    case CombinedEnumContext(Application_WriterVariants, Context_Table):
         {
             maLeftIndent->SetMin( NEGA_MAXVALUE, FUNIT_100TH_MM );
             maRightIndent->SetMin( NEGA_MAXVALUE, FUNIT_100TH_MM );
@@ -1238,9 +1233,9 @@ void ParaPropertyPanel::StateChangedIndentImpl( sal_uInt16 /* nSID */, SfxItemSt
         nVal = (long)maLeftIndent->Normalize( (long)nVal );
         maLeftIndent->SetValue( nVal, FUNIT_100TH_MM );
 
-        if(maContext.GetCombinedContext() != CombinedEnumContext(Application_Writer, Context_Text) &&
-            maContext.GetCombinedContext() != CombinedEnumContext(Application_Writer, Context_Default) &&
-            maContext.GetCombinedContext() != CombinedEnumContext(Application_Writer, Context_Table))
+        if ( maContext.GetCombinedContext_DI() != CombinedEnumContext(Application_WriterVariants, Context_Text)
+             && maContext.GetCombinedContext_DI() != CombinedEnumContext(Application_WriterVariants, Context_Default)
+             && maContext.GetCombinedContext_DI() != CombinedEnumContext(Application_WriterVariants, Context_Table))
         {
             maFLineIndent->SetMin( nVal*(-1), FUNIT_100TH_MM );
         }
@@ -1253,29 +1248,24 @@ void ParaPropertyPanel::StateChangedIndentImpl( sal_uInt16 /* nSID */, SfxItemSt
         nfVal = (long)maFLineIndent->Normalize( (long)nfVal );
         maFLineIndent->SetValue( nfVal, FUNIT_100TH_MM );
 
-        switch (maContext.GetCombinedContext())
+        switch (maContext.GetCombinedContext_DI())
         {
-            case CombinedEnumContext(Application_Writer, Context_DrawText):
-            case CombinedEnumContext(Application_Writer, Context_Text):
-            case CombinedEnumContext(Application_Writer, Context_Default):
-            case CombinedEnumContext(Application_Writer, Context_Table):
-            case CombinedEnumContext(Application_Writer, Context_Annotation):
+        case CombinedEnumContext(Application_WriterVariants, Context_DrawText):
+        case CombinedEnumContext(Application_WriterVariants, Context_Text):
+        case CombinedEnumContext(Application_WriterVariants, Context_Default):
+        case CombinedEnumContext(Application_WriterVariants, Context_Table):
+        case CombinedEnumContext(Application_WriterVariants, Context_Annotation):
             {
                 maLeftIndent->SetMax( MAX_SW - nrVal, FUNIT_100TH_MM );
                 maRightIndent->SetMax( MAX_SW - nVal, FUNIT_100TH_MM );
                 maFLineIndent->SetMax( MAX_SW - nVal - nrVal, FUNIT_100TH_MM );
             }
             break;
-            case CombinedEnumContext(Application_Draw, Context_DrawText):
-            case CombinedEnumContext(Application_Draw, Context_Draw):
-                case CombinedEnumContext(Application_Draw, Context_Table):
-            case CombinedEnumContext(Application_Draw, Context_TextObject):
-            case CombinedEnumContext(Application_Draw, Context_Graphic):
-            case CombinedEnumContext(Application_Impress, Context_TextObject):
-                case CombinedEnumContext(Application_Impress, Context_DrawText):
-            case CombinedEnumContext(Application_Impress, Context_Table):
-            case CombinedEnumContext(Application_Impress, Context_Draw):
-            case CombinedEnumContext(Application_Impress, Context_Graphic):
+        case CombinedEnumContext(Application_DrawImpress, Context_DrawText):
+        case CombinedEnumContext(Application_DrawImpress, Context_Draw):
+        case CombinedEnumContext(Application_DrawImpress, Context_Table):
+        case CombinedEnumContext(Application_DrawImpress, Context_TextObject):
+        case CombinedEnumContext(Application_DrawImpress, Context_Graphic):
             {
                 maLeftIndent->SetMax( MAX_SC_SD - nrVal, FUNIT_100TH_MM );
                 maRightIndent->SetMax( MAX_SC_SD - nVal, FUNIT_100TH_MM );
@@ -1285,17 +1275,14 @@ void ParaPropertyPanel::StateChangedIndentImpl( sal_uInt16 /* nSID */, SfxItemSt
 
         maTbxIndent_IncDec->Enable();
         maTbxIndent_IncDec->EnableItem(ID_HANGING_INDENT, sal_True);
-        if ( maContext.GetCombinedContext() != CombinedEnumContext(Application_Writer, Context_Text)
-             && maContext.GetCombinedContext() != CombinedEnumContext(Application_Writer, Context_Default)
-             && maContext.GetCombinedContext() != CombinedEnumContext(Application_Writer, Context_Table) )
+        if ( maContext.GetCombinedContext_DI() != CombinedEnumContext(Application_WriterVariants, Context_Text)
+             && maContext.GetCombinedContext_DI() != CombinedEnumContext(Application_WriterVariants, Context_Default)
+             && maContext.GetCombinedContext_DI() != CombinedEnumContext(Application_WriterVariants, Context_Table) )
         {
             maTbxIndent_IncDec->EnableItem(BT_TBX_INDENT_INC, sal_True);
             maTbxIndent_IncDec->EnableItem(BT_TBX_INDENT_DEC, sal_True);
         }
 
-//      maTbxProDemote->Enable();
-//      if( !mbOutLineRight && !mbOutLineLeft )
-//          maTbxProDemote->EnableItem(SD_HANGING_INDENT, sal_True);
         maTbxProDemote->EnableItem(SD_HANGING_INDENT, sal_True);
     }
     else if( eState == SFX_ITEM_DISABLED )
@@ -1304,14 +1291,14 @@ void ParaPropertyPanel::StateChangedIndentImpl( sal_uInt16 /* nSID */, SfxItemSt
         maRightIndent->Disable();
         maFLineIndent->Disable();
         maTbxIndent_IncDec->Disable();
-        if( maContext.GetCombinedContext() != CombinedEnumContext(Application_Writer, Context_Text)  &&
-            maContext.GetCombinedContext() != CombinedEnumContext(Application_Writer, Context_Default) &&
-            maContext.GetCombinedContext() !=  CombinedEnumContext(Application_Writer, Context_Table) )
+        if( maContext.GetCombinedContext_DI() != CombinedEnumContext(Application_WriterVariants, Context_Text)  &&
+            maContext.GetCombinedContext_DI() != CombinedEnumContext(Application_WriterVariants, Context_Default) &&
+            maContext.GetCombinedContext_DI() !=  CombinedEnumContext(Application_WriterVariants, Context_Table) )
             maTbxIndent_IncDec->Disable();
         else
             maTbxIndent_IncDec->EnableItem(ID_HANGING_INDENT, sal_False);
 
-//      maTbxProDemote->Disable();
+        //      maTbxProDemote->Disable();
         maTbxProDemote->EnableItem(SD_HANGING_INDENT, sal_False);
     }
     else
@@ -1319,13 +1306,12 @@ void ParaPropertyPanel::StateChangedIndentImpl( sal_uInt16 /* nSID */, SfxItemSt
         maLeftIndent->SetEmptyFieldValue();
         maRightIndent->SetEmptyFieldValue();
         maFLineIndent->SetEmptyFieldValue();
-        if( maContext.GetCombinedContext() != CombinedEnumContext(Application_Writer, Context_Text)  &&
-            maContext.GetCombinedContext() != CombinedEnumContext(Application_Writer, Context_Default) &&
-            maContext.GetCombinedContext() !=  CombinedEnumContext(Application_Writer, Context_Table) )
+        if( maContext.GetCombinedContext_DI() != CombinedEnumContext(Application_WriterVariants, Context_Text)  &&
+            maContext.GetCombinedContext_DI() != CombinedEnumContext(Application_WriterVariants, Context_Default) &&
+            maContext.GetCombinedContext_DI() !=  CombinedEnumContext(Application_WriterVariants, Context_Table) )
             maTbxIndent_IncDec->Disable();
         else
             maTbxIndent_IncDec->EnableItem(ID_HANGING_INDENT, sal_False);
-//      maTbxProDemote->Disable();
         maTbxProDemote->EnableItem(SD_HANGING_INDENT, sal_False);
     }
 }
@@ -1412,9 +1398,9 @@ void ParaPropertyPanel::StateChangeOutLineImpl( sal_uInt16 nSID, SfxItemState eS
 
 void ParaPropertyPanel::StateChangeIncDecImpl( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState )
 {
-    if ( ( maContext.GetCombinedContext() == CombinedEnumContext(Application_Writer, Context_Text)
-           || maContext.GetCombinedContext() == CombinedEnumContext(Application_Writer, Context_Default)
-           || maContext.GetCombinedContext() ==  CombinedEnumContext(Application_Writer, Context_Table) )
+    if ( ( maContext.GetCombinedContext_DI() == CombinedEnumContext(Application_WriterVariants, Context_Text)
+           || maContext.GetCombinedContext_DI() == CombinedEnumContext(Application_WriterVariants, Context_Default)
+           || maContext.GetCombinedContext_DI() ==  CombinedEnumContext(Application_WriterVariants, Context_Table) )
          && ( nSID == SID_INC_INDENT || nSID == SID_DEC_INDENT ) )
     {
         // Writer's text shell is the only one which provides reasonable states for Slots SID_INC_INDENT and SID_DEC_INDENT
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index d6bd770..1ebece0 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -1043,12 +1043,11 @@ void PosSizePropertyPanel::executeSize()
         SfxUInt32Item aWidthItem( SID_ATTR_TRANSFORM_WIDTH, (sal_uInt32) lWidth);
         SfxUInt32Item aHeightItem( SID_ATTR_TRANSFORM_HEIGHT, (sal_uInt32) lHeight);
         SfxAllEnumItem aPointItem (SID_ATTR_TRANSFORM_SIZE_POINT, (sal_uInt16)meRP);
-        const sal_Int32 nCombinedContext(maContext.GetCombinedContext());
+        const sal_Int32 nCombinedContext(maContext.GetCombinedContext_DI());
 
-        if( nCombinedContext == CombinedEnumContext(Application_Writer, Context_Graphic) // mnContextId == PROPERTY_CONTEXT_SW_GRAPHIC
-            || nCombinedContext == CombinedEnumContext(Application_Writer, Context_OLE) //mnContextId == PROPERTY_CONTEXT_SW_OLE
+        if( nCombinedContext == CombinedEnumContext(Application_WriterVariants, Context_Graphic)
+            || nCombinedContext == CombinedEnumContext(Application_WriterVariants, Context_OLE)
             )
-        // if( mnContextId == PROPERTY_CONTEXT_SW_GRAPHIC || mnContextId == PROPERTY_CONTEXT_SW_OLE )
         {
             GetBindings()->GetDispatcher()->Execute(SID_ATTR_TRANSFORM, SFX_CALLMODE_RECORD, &aWidthItem, &aHeightItem, &aPointItem, 0L );
         }
commit 4a87b75b86e4c932b5230cb7caecf6f00e40a096
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date:   Tue May 14 13:21:45 2013 +0000

    122056: adding another Writer variant for sidebar context handling
    
    Patch by: Ariel
    Review by: Oliver

diff --git a/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs b/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
index ed82861..4002980 100644
--- a/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
@@ -88,6 +88,7 @@
                  com.sun.star.text.WebDocument
                  com.sun.star.xforms.XMLFormDocument
                  com.sun.star.sdb.FormDesign
+                 com.sun.star.sdb.TextReportDesign
                  com.sun.star.sheet.SpreadsheetDocument
                  com.sun.star.presentation.PresentationDocument
                  com.sun.star.drawing.DrawingDocument
diff --git a/sfx2/inc/sfx2/sidebar/EnumContext.hxx b/sfx2/inc/sfx2/sidebar/EnumContext.hxx
index 7340db0..48e27fb 100644
--- a/sfx2/inc/sfx2/sidebar/EnumContext.hxx
+++ b/sfx2/inc/sfx2/sidebar/EnumContext.hxx
@@ -41,6 +41,7 @@ public:
         Application_WriterWeb,
         Application_WriterXML,
         Application_WriterForm,
+        Application_WriterReport,
         Application_Calc,
         Application_Draw,
         Application_Impress,
diff --git a/sfx2/source/sidebar/EnumContext.cxx b/sfx2/source/sidebar/EnumContext.cxx
index 672e0c3..78c5536 100644
--- a/sfx2/source/sidebar/EnumContext.cxx
+++ b/sfx2/source/sidebar/EnumContext.cxx
@@ -98,6 +98,8 @@ sal_Int32 EnumContext::GetCombinedContext_DI (void) const
         case Application_WriterGlobal:
         case Application_WriterWeb:
         case Application_WriterXML:
+        case Application_WriterForm:
+        case Application_WriterReport:
             return CombinedEnumContext(Application_WriterVariants, meContext);
 
         default:
@@ -164,6 +166,7 @@ void EnumContext::ProvideApplicationContainers (void)
         AddEntry(A2S("com.sun.star.text.WebDocument"), EnumContext::Application_WriterWeb);
         AddEntry(A2S("com.sun.star.xforms.XMLFormDocument"), EnumContext::Application_WriterXML);
         AddEntry(A2S("com.sun.star.sdb.FormDesign"), EnumContext::Application_WriterForm);
+        AddEntry(A2S("com.sun.star.sdb.TextReportDesign"), EnumContext::Application_WriterReport);
         AddEntry(A2S("com.sun.star.sheet.SpreadsheetDocument"), EnumContext::Application_Calc);
         AddEntry(A2S("com.sun.star.drawing.DrawingDocument"), EnumContext::Application_Draw);
         AddEntry(A2S("com.sun.star.presentation.PresentationDocument"), EnumContext::Application_Impress);
diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx
index cbd8d8f..32b5800 100644
--- a/sfx2/source/sidebar/ResourceManager.cxx
+++ b/sfx2/source/sidebar/ResourceManager.cxx
@@ -447,6 +447,7 @@ void ResourceManager::ReadContextList (
                 aApplications.push_back(EnumContext::Application_WriterWeb);
                 aApplications.push_back(EnumContext::Application_WriterXML);
                 aApplications.push_back(EnumContext::Application_WriterForm);
+                aApplications.push_back(EnumContext::Application_WriterReport);
             }
             else
             {
commit 6ca31d904b343c76899dfa2bfef3e7d20db23364
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date:   Tue May 14 12:10:04 2013 +0000

    122270: paragraph property panel, line spacing control: do not directly select item via cursor travelling; removing obsolete code

diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
index ca64451..92c8043 100755
--- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
+++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx
@@ -67,7 +67,6 @@ maSpacing1       (SVX_RES(IMG_SPACING1)),
 maSpacing115     (SVX_RES(IMG_SPACING115)),
 maSpacing15      (SVX_RES(IMG_SPACING15)),
 maSpacing2       (SVX_RES(IMG_SPACING2)),
-maLPCustom       (SVX_RES(IMG_SPACINGLCUSTOM)),
 maSelSpacing1    (SVX_RES(IMG_SEL_SPACING1)),
 maSelSpacing115  (SVX_RES(IMG_SEL_SPACING115)),
 maSelSpacing15   (SVX_RES(IMG_SEL_SPACING15)),
@@ -105,26 +104,20 @@ ParaLineSpacingControl::~ParaLineSpacingControl()
 
 void ParaLineSpacingControl::initial()
 {
-    //maLineSpacing.SetStyle( maLineSpacing.GetStyle()| WB_3DLOOK |  WB_NO_DIRECTSELECT  );
-    //maLineSpacing.SetControlBackground(GetSettings().GetStyleSettings().GetMenuColor());
-    //maLineSpacing.SetColor(GetSettings().GetStyleSettings().GetMenuColor());
-    //maLineSpacing.SetMinFont();
-
-    maLineSpacing.SetControlBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
-    GetSettings().GetStyleSettings().GetMenuColor():
-    sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
-    maLineSpacing.SetColor(GetSettings().GetStyleSettings().GetHighContrastMode()?
-    GetSettings().GetStyleSettings().GetMenuColor():
-    sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
-    maLineSpacing.SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
-    GetSettings().GetStyleSettings().GetMenuColor():
-    sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
-    //maFTSpacing.SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
-    //GetSettings().GetStyleSettings().GetMenuColor():
-    //sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
-    //maFTBy.SetBackground(GetSettings().GetStyleSettings().GetHighContrastMode()?
-    //GetSettings().GetStyleSettings().GetMenuColor():
-    //sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
+    maLineSpacing.SetStyle( maLineSpacing.GetStyle()| WB_3DLOOK |  WB_NO_DIRECTSELECT  );
+
+    maLineSpacing.SetControlBackground(
+        GetSettings().GetStyleSettings().GetHighContrastMode()
+        ? GetSettings().GetStyleSettings().GetMenuColor()
+        : sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
+    maLineSpacing.SetColor(
+        GetSettings().GetStyleSettings().GetHighContrastMode()
+        ? GetSettings().GetStyleSettings().GetMenuColor()
+        : sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
+    maLineSpacing.SetBackground(
+        GetSettings().GetStyleSettings().GetHighContrastMode()
+        ? GetSettings().GetStyleSettings().GetMenuColor()
+        : sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground ));
 
     mpImg = new Image[4];
     mpImg[0] = maSpacing1;
@@ -167,13 +160,7 @@ void ParaLineSpacingControl::initial()
     aLineDistAtPercentBox.SetModifyHdl( aLink );
     aLineDistAtMetricBox.SetModifyHdl( aLink );
 }
-void ParaLineSpacingControl::ToGetFocus(bool bType)
-{
-    if(!bType)
-        aLineDist.GrabFocus();
-    else
-        maLineSpacing.GrabFocus();  //wj
-}
+
 
 void ParaLineSpacingControl::PopupModeEndCallback()
 {
@@ -484,24 +471,6 @@ void ParaLineSpacingControl::Rearrange(SfxItemState currSPState,FieldUnit currMe
 
     aLineDist.SaveValue();
 
-    /*sal_uInt16 nID = pBox->GetCurItemId();
-    pBox->SetItemDown(nID, sal_True);
-
-    Size aFloatSz = GetOutputSizePixel();
-
-    GetLineSPFloatWin()->SetSizePixel( aFloatSz );
-
-    Point aPos=maLineSPTbx->GetPosPixel();
-    aPos.setX(aPos.getX());
-    aPos = OutputToScreenPixel( aPos );
-    Size aSize = maLineSPTbx->GetSizePixel();
-    Rectangle aRect( aPos, aSize );
-
-    GetLineSPFloatWin()->StartPopupMode( aRect, FLOATWIN_POPUPMODE_DOWN | FLOATWIN_POPUPMODE_NOFOCUSCLOSE);
-    GetLineSPFloatWin()->SetPopupModeFlags(GetLineSPFloatWin()->GetPopupModeFlags() | FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE );
-
-    pLineSPPage->ToGetFocus(bValueSetFocus);
-    */
     sal_uInt16 uCount = aLineDist.GetEntryCount();
     if( uCount == LLINESPACE_FIX + 1 )
     {
diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx
index 51d3d80..d31a8a2 100755
--- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx
+++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx
@@ -43,7 +43,6 @@ class ParaLineSpacingControl:public svx::sidebar::PopupControl
 public:
     ParaLineSpacingControl(Window* pParent, svx::sidebar::ParaPropertyPanel& rPanel);
     ~ParaLineSpacingControl();
-    void ToGetFocus(bool bType);
     void Rearrange(SfxItemState currSPState,FieldUnit currMetricUnit,SvxLineSpacingItem* currSPItem,const ::sfx2::sidebar::EnumContext currentContext);
     //virtual void Paint(const Rectangle& rect);
 
@@ -84,7 +83,6 @@ private:
     Image  maSpacing115;
     Image  maSpacing15;
     Image  maSpacing2;
-    Image  maLPCustom;
 
     Image  maSelSpacing1;
     Image  maSelSpacing115;
diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.hrc b/svx/source/sidebar/paragraph/ParaPropertyPanel.hrc
index c71a525..c33cb77 100755
--- a/svx/source/sidebar/paragraph/ParaPropertyPanel.hrc
+++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.hrc
@@ -119,7 +119,6 @@
 #define IMG_SPACING115                     19
 #define IMG_SPACING15                      20
 #define IMG_SPACING2                       21
-#define IMG_SPACINGLCUSTOM                 22
 #define IMG_SEL_SPACING1                   23
 #define IMG_SEL_SPACING115                 24
 #define IMG_SEL_SPACING15                  25


More information about the Libreoffice-commits mailing list