[Libreoffice-commits] core.git: 3 commits - basctl/source include/svx include/tools rsc/source svx/inc svx/source

Caolán McNamara caolanm at redhat.com
Mon Dec 22 05:55:57 PST 2014


 basctl/source/dlged/dlged.cxx             |    2 
 include/svx/dialogs.hrc                   |   10 -
 include/tools/rcid.h                      |    1 
 rsc/source/parser/rscinit.cxx             |    9 -
 svx/inc/helpid.hrc                        |    2 
 svx/source/tbxctrls/extrusioncontrols.cxx |   37 ++--
 svx/source/tbxctrls/extrusioncontrols.hrc |   17 --
 svx/source/tbxctrls/extrusioncontrols.src |  223 +++++++++++++++---------------
 8 files changed, 138 insertions(+), 163 deletions(-)

New commits:
commit 993fd27d3afddbaf6caaaf50d94bbbdb8b705514
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Dec 22 11:37:59 2014 +0000

    HelpButtons no longer loaded from .rsc files
    
    Change-Id: I0fe82e319ac44a189e93fabd932e3e0a891598d2

diff --git a/include/tools/rcid.h b/include/tools/rcid.h
index 16ab69b..eb54647 100644
--- a/include/tools/rcid.h
+++ b/include/tools/rcid.h
@@ -55,7 +55,6 @@
 #define RSC_BUTTON              (RSC_NOTYPE + 0x45)
 #define RSC_PUSHBUTTON          (RSC_NOTYPE + 0x46)
 
-#define RSC_HELPBUTTON          (RSC_NOTYPE + 0x49)
 #define RSC_IMAGEBUTTON         (RSC_NOTYPE + 0x4a)
 
 #define RSC_SPINBUTTON          (RSC_NOTYPE + 0x4d)
diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx
index 0805674..e476463 100644
--- a/rsc/source/parser/rscinit.cxx
+++ b/rsc/source/parser/rscinit.cxx
@@ -73,7 +73,6 @@ void RscTypCont::Init()
     RscTop   *  pClassButton;
     RscTop   *  pClassCheckBox;
     RscTop   *  pClassPushButton;
-    RscTop   *  pClassHelpButton;
     RscTop   *  pClassRadioButton;
     RscTop   *  pClassImageButton;
     RscTop   *  pClassEdit;
@@ -362,14 +361,6 @@ void RscTypCont::Init()
     // Klasse anlegen
     pClassPushButton = InitClassPushButton( pClassButton );
     pRoot->Insert( pClassPushButton );
-
-    // Klasse anlegen
-    nId = pHS->getID( "HelpButton" );
-    pClassHelpButton = new RscClass( nId, RSC_HELPBUTTON,
-                                        pClassPushButton );
-    pClassHelpButton->SetCallPar( *pWinPar1, *pWinPar2, *pWinParType );
-    aNmTb.Put( nId, CLASSNAME, pClassHelpButton );
-    pRoot->Insert( pClassHelpButton );
 }
 {
     pClassRadioButton = InitClassRadioButton( pClassButton );
commit 60935c7319f1f12475b8f374fe02917673f352b8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Dec 22 11:34:04 2014 +0000

    avoid 'don't create ItemSets with full range before FreezeIdRanges assert'
    
    Change-Id: I3dbb760cd5dbf2e72d1886eaca537bb9ecf9f8cc

diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 986ccfbe..b45544c 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -183,7 +183,6 @@ DlgEditor::DlgEditor (
     ,pVScroll(NULL)
     ,pDlgEdModel(new DlgEdModel())
     ,pDlgEdPage(new DlgEdPage(*pDlgEdModel))
-    ,pDlgEdView(new DlgEdView(*pDlgEdModel, rWindow_, *this))
     ,m_ClipboardDataFlavors(1)
     ,m_ClipboardDataFlavorsResource(2)
     ,pObjFac(new DlgEdFactory(xModel))
@@ -202,6 +201,7 @@ DlgEditor::DlgEditor (
     ,m_xDocument( xModel )
 {
     pDlgEdModel->GetItemPool().FreezeIdRanges();
+    pDlgEdView.reset(new DlgEdView(*pDlgEdModel, rWindow_, *this));
     pDlgEdModel->SetScaleUnit( MAP_100TH_MM );
 
     SdrLayerAdmin& rAdmin = pDlgEdModel->GetLayerAdmin();
commit a42a6b23afb09a799dec36a293c95964216af6cd
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Dec 22 11:21:10 2014 +0000

    convert RID_SVXFLOAT_EXTRUSION_DIRECTION to strings and images
    
    Change-Id: I7c619a07ab0adb4224f0f0f45b65c3d484824666

diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc
index 46170da..e8fd38c 100644
--- a/include/svx/dialogs.hrc
+++ b/include/svx/dialogs.hrc
@@ -877,8 +877,6 @@
 
 #define RID_SVXSTR_EXPORT_GRAPHIC_TITLE     (RID_SVX_START + 984)
 
-#define RID_SVXFLOAT_EXTRUSION_DIRECTION    (RID_SVX_START + 985)
-
 #define RID_SVX_EXTRUSION_BAR               (RID_SVX_START + 986)
 #define RID_SVX_FONTWORK_BAR                (RID_SVX_START + 987)
 
@@ -1073,9 +1071,15 @@
 #define RID_SVXSTR_CHARS_SPACING_VERY_LOOSE (RID_SVX_START + 1305)
 #define RID_SVXSTR_CHARS_SPACING_CUSTOM   (RID_SVX_START + 1306)
 #define RID_SVXSTR_CHARS_SPACING_KERN_PAIRS (RID_SVX_START + 1307)
+#define RID_SVXIMG_DIRECTION             (RID_SVX_START + 1308)  // needs 10 resource ids
+#define RID_SVXIMG_PERSPECTIVE           (RID_SVX_START + 1318)
+#define RID_SVXIMG_PARALLEL              (RID_SVX_START + 1319)
+#define RID_SVXSTR_DIRECTION             (RID_SVX_START + 1320)  // needs 10 resource ids
+#define RID_SVXSTR_PERSPECTIVE           (RID_SVX_START + 1330)
+#define RID_SVXSTR_PARALLEL              (RID_SVX_START + 1331)
 
 // !!! IMPORTANT: consider and update RID_SVXSTR_NEXTFREE when introducing new RIDs for Strings !!!
-#define RID_SVXSTR_NEXTFREE              (RID_SVX_START + 1308)
+#define RID_SVXSTR_NEXTFREE              (RID_SVX_START + 1332)
 
 // if we have _a_lot_ time, we should group the resource ids by type, instead
 // of grouping them by semantics. The reason is that resource ids have to be
diff --git a/svx/inc/helpid.hrc b/svx/inc/helpid.hrc
index c5e565d..7a8e9bc 100644
--- a/svx/inc/helpid.hrc
+++ b/svx/inc/helpid.hrc
@@ -65,7 +65,6 @@
 #define HID_GALLERY_RENAME                                    "SVX_HID_GALLERY_RENAME"
 #define HID_GALLERY_THEMELIST                                 "SVX_HID_GALLERY_THEMELIST"
 #define HID_GALLERY_WINDOW                                    "SVX_HID_GALLERY_WINDOW"
-#define HID_MENU_EXTRUSION_DIRECTION                          "SVX_HID_MENU_EXTRUSION_DIRECTION"
 #define HID_MENU_EXTRUSION_LIGHTING                           "SVX_HID_MENU_EXTRUSION_LIGHTING"
 #define HID_MNU_FUNC_AVG                                      "SVX_HID_MNU_FUNC_AVG"
 #define HID_MNU_FUNC_COUNT                                    "SVX_HID_MNU_FUNC_COUNT"
@@ -93,7 +92,6 @@
 #define HID_STYLE_LISTBOX                                     "SVX_HID_STYLE_LISTBOX"
 #define HID_SVX_MDLG_DOCRECOVERY_BROKEN                       "SVX_HID_SVX_MDLG_DOCRECOVERY_BROKEN"
 #define HID_SVX_TP_DOCRECOVERY_RECOVER                        "SVX_HID_SVX_TP_DOCRECOVERY_RECOVER"
-#define HID_VALUESET_EXTRUSION_DIRECTION                      "SVX_HID_VALUESET_EXTRUSION_DIRECTION"
 #define HID_VALUESET_EXTRUSION_LIGHTING                       "SVX_HID_VALUESET_EXTRUSION_LIGHTING"
 #define HID_XMLSEC_CALL                                       "SVX_HID_XMLSEC_CALL"
 
diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx
index 155afdc..bd6baed 100644
--- a/svx/source/tbxctrls/extrusioncontrols.cxx
+++ b/svx/source/tbxctrls/extrusioncontrols.cxx
@@ -65,46 +65,41 @@ ExtrusionDirectionWindow::ExtrusionDirectionWindow(
     const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
     vcl::Window* pParentWindow
 )
-:   ToolbarMenu( rFrame, pParentWindow, SVX_RES( RID_SVXFLOAT_EXTRUSION_DIRECTION )) ,
-    mrController( rController ) ,
-    maImgPerspective( SVX_RES( IMG_PERSPECTIVE ) ) ,
-    maImgParallel(    SVX_RES( IMG_PARALLEL    ) ) ,
-    msExtrusionDirection(  ".uno:ExtrusionDirection"  ) ,
-    msExtrusionProjection( ".uno:ExtrusionProjection" )
+    : ToolbarMenu(rFrame, pParentWindow,
+                  WB_MOVEABLE|WB_CLOSEABLE|WB_HIDE|WB_3DLOOK)
+    , mrController(rController)
+    , maImgPerspective(SVX_RES(RID_SVXIMG_PERSPECTIVE))
+    , maImgParallel(SVX_RES(RID_SVXIMG_PARALLEL))
+    , msExtrusionDirection(".uno:ExtrusionDirection")
+    , msExtrusionProjection(".uno:ExtrusionProjection")
 {
-    SetHelpId( HID_MENU_EXTRUSION_DIRECTION );
-
-    sal_uInt16 i;
-    for( i = DIRECTION_NW; i <= DIRECTION_SE; i++ )
+    for(sal_uInt16 i = DIRECTION_NW; i <= DIRECTION_SE; ++i)
     {
-        maImgDirection[i] = Image( SVX_RES( IMG_DIRECTION + i ) );
+        maImgDirection[i] = Image( SVX_RES( RID_SVXIMG_DIRECTION + i ) );
     }
 
     SetSelectHdl( LINK( this, ExtrusionDirectionWindow, SelectHdl ) );
     mpDirectionSet = createEmptyValueSetControl();
-    mpDirectionSet->SetHelpId( HID_VALUESET_EXTRUSION_DIRECTION );
 
     mpDirectionSet->SetSelectHdl( LINK( this, ExtrusionDirectionWindow, SelectHdl ) );
     mpDirectionSet->SetColCount( 3 );
     mpDirectionSet->EnableFullItemMode( false );
 
-    for( i = DIRECTION_NW; i <= DIRECTION_SE; i++ )
+    for (sal_uInt16 i = DIRECTION_NW; i <= DIRECTION_SE; ++i)
     {
-        OUString aText( SVX_RESSTR( STR_DIRECTION + i ) );
-        mpDirectionSet->InsertItem( i+1, maImgDirection[ i ], aText );
+        OUString aText(SVX_RESSTR(RID_SVXSTR_DIRECTION + i));
+        mpDirectionSet->InsertItem(i + 1, maImgDirection[i], aText);
     }
 
-    mpDirectionSet->SetOutputSizePixel( Size( 72, 72 ) );
+    mpDirectionSet->SetOutputSizePixel(Size(72, 72));
 
-    appendEntry( 2, mpDirectionSet );
+    appendEntry(2, mpDirectionSet );
     appendSeparator();
-    appendEntry( 0, SVX_RESSTR( STR_PERSPECTIVE ), maImgPerspective );
-    appendEntry( 1, SVX_RESSTR( STR_PARALLEL    ), maImgParallel    );
+    appendEntry(0, SVX_RESSTR(RID_SVXSTR_PERSPECTIVE), maImgPerspective);
+    appendEntry(1, SVX_RESSTR(RID_SVXSTR_PARALLEL), maImgParallel);
 
     SetOutputSizePixel( getMenuSize() );
 
-    FreeResource();
-
     AddStatusListener( msExtrusionDirection );
     AddStatusListener( msExtrusionProjection );
 }
diff --git a/svx/source/tbxctrls/extrusioncontrols.hrc b/svx/source/tbxctrls/extrusioncontrols.hrc
index f895609..07b9ca3 100644
--- a/svx/source/tbxctrls/extrusioncontrols.hrc
+++ b/svx/source/tbxctrls/extrusioncontrols.hrc
@@ -39,27 +39,10 @@
 #define DIRECTION_S         7
 #define DIRECTION_SE        8
 
-#define STR_PERSPECTIVE         1
-#define STR_PARALLEL            2
-#define STR_CUSTOM              3
-#define STR_INFINITY            4
-
 #define STR_BRIGHT              15
 #define STR_NORMAL              16
 #define STR_DIM                 17
 
-#define STR_WIREFRAME           18
-#define STR_MATTE               19
-#define STR_PLASTIC             20
-#define STR_METAL               21
-
-#define STR_DIRECTION           30      // needs 10 resource ids
-
-#define IMG_DIRECTION           1       // needs 10 resource ids
-
-#define IMG_PERSPECTIVE         31
-#define IMG_PARALLEL            33
-
 #define IMG_LIGHT_OFF           50  // needs 10 resource ids
 #define IMG_LIGHT_ON            60  // needs 10 resource ids
 #define IMG_LIGHT_PREVIEW       70  // needs 10 resource ids
diff --git a/svx/source/tbxctrls/extrusioncontrols.src b/svx/source/tbxctrls/extrusioncontrols.src
index bb6de2d..2c74bd4 100644
--- a/svx/source/tbxctrls/extrusioncontrols.src
+++ b/svx/source/tbxctrls/extrusioncontrols.src
@@ -22,120 +22,125 @@
 
 #define MASKCOLOR   MaskColor = Color { Red=0xFFFF; Green=0x0000; Blue=0xFFFF; };
 
-DockingWindow RID_SVXFLOAT_EXTRUSION_DIRECTION
+Image RID_SVXIMG_DIRECTION + DIRECTION_NW
 {
-    HelpID = "svx:DockingWindow:RID_SVXFLOAT_EXTRUSION_DIRECTION";
-    Border = FALSE ;
-    Hide = TRUE ;
-    SVLook = TRUE ;
-    Sizeable = FALSE ;
-    Moveable = TRUE ;
-    Closeable = TRUE ;
-    Zoomable = TRUE ;
+    ImageBitmap = Bitmap { File = "directionnorthwest_22.bmp" ; };
+    MASKCOLOR
+};
 
-    Text [ en-US ] = "Extrusion Direction" ;
+Image RID_SVXIMG_DIRECTION + DIRECTION_N
+{
+    ImageBitmap = Bitmap { File = "directionnorth_22.bmp" ; };
+    MASKCOLOR
+};
 
-    Image IMG_DIRECTION + DIRECTION_NW
-    {
-        ImageBitmap = Bitmap { File = "directionnorthwest_22.bmp" ; };
-        MASKCOLOR
-    };
-    Image IMG_DIRECTION + DIRECTION_N
-    {
-        ImageBitmap = Bitmap { File = "directionnorth_22.bmp" ; };
-        MASKCOLOR
-    };
-    Image IMG_DIRECTION + DIRECTION_NE
-    {
-        ImageBitmap = Bitmap { File = "directionnortheast_22.bmp"; };
-        MASKCOLOR
-    };
-    Image IMG_DIRECTION + DIRECTION_W
-    {
-        ImageBitmap = Bitmap { File = "directionwest_22.bmp"; };
-        MASKCOLOR
-    };
-    Image IMG_DIRECTION + DIRECTION_NONE
-    {
-        ImageBitmap = Bitmap { File = "directionstraight_22.bmp"; };
-        MASKCOLOR
-    };
-    Image IMG_DIRECTION + DIRECTION_E
-    {
-        ImageBitmap = Bitmap { File = "directioneast_22.bmp"; };
-        MASKCOLOR
-    };
-    Image IMG_DIRECTION + DIRECTION_SW
-    {
-        ImageBitmap = Bitmap { File = "directionsouthwest_22.bmp"; };
-        MASKCOLOR
-    };
-    Image IMG_DIRECTION + DIRECTION_S
-    {
-        ImageBitmap = Bitmap { File = "directionsouth_22.bmp"; };
-        MASKCOLOR
-    };
-    Image IMG_DIRECTION + DIRECTION_SE
-    {
-        ImageBitmap = Bitmap { File = "directionsoutheast_22.bmp"; };
-        MASKCOLOR
-    };
-    Image IMG_PERSPECTIVE
-    {
-        ImageBitmap = Bitmap { File = "perspective_16.bmp"; };
-        MASKCOLOR
-    };
-    Image IMG_PARALLEL
-    {
-        ImageBitmap = Bitmap { File = "parallel_16.bmp"; };
-        MASKCOLOR
-    };
+Image RID_SVXIMG_DIRECTION + DIRECTION_NE
+{
+    ImageBitmap = Bitmap { File = "directionnortheast_22.bmp"; };
+    MASKCOLOR
+};
 
-    String STR_PERSPECTIVE
-    {
-        Text [ en-US ] = "~Perspective" ;
-    };
+Image RID_SVXIMG_DIRECTION + DIRECTION_W
+{
+    ImageBitmap = Bitmap { File = "directionwest_22.bmp"; };
+    MASKCOLOR
+};
 
-    String STR_PARALLEL
-    {
-        Text [ en-US ] = "P~arallel" ;
-    };
-    String STR_DIRECTION + DIRECTION_NW
-    {
-        Text [ en-US ] = "Extrusion North-West";
-    };
-    String STR_DIRECTION + DIRECTION_N
-    {
-        Text [ en-US ] = "Extrusion North";
-    };
-    String STR_DIRECTION + DIRECTION_NE
-    {
-        Text [ en-US ] = "Extrusion North-East";
-    };
-    String STR_DIRECTION + DIRECTION_W
-    {
-        Text [ en-US ] = "Extrusion West";
-    };
-    String STR_DIRECTION + DIRECTION_NONE
-    {
-        Text [ en-US ] = "Extrusion Backwards";
-    };
-    String STR_DIRECTION + DIRECTION_E
-    {
-        Text [ en-US ] = "Extrusion East";
-    };
-    String STR_DIRECTION + DIRECTION_SW
-    {
-        Text [ en-US ] = "Extrusion South-West";
-    };
-    String STR_DIRECTION + DIRECTION_S
-    {
-        Text [ en-US ] = "Extrusion South";
-    };
-    String STR_DIRECTION + DIRECTION_SE
-    {
-        Text [ en-US ] = "Extrusion South-East";
-    };
+Image RID_SVXIMG_DIRECTION + DIRECTION_NONE
+{
+    ImageBitmap = Bitmap { File = "directionstraight_22.bmp"; };
+    MASKCOLOR
+};
+
+Image RID_SVXIMG_DIRECTION + DIRECTION_E
+{
+    ImageBitmap = Bitmap { File = "directioneast_22.bmp"; };
+    MASKCOLOR
+};
+
+Image RID_SVXIMG_DIRECTION + DIRECTION_SW
+{
+    ImageBitmap = Bitmap { File = "directionsouthwest_22.bmp"; };
+    MASKCOLOR
+};
+
+Image RID_SVXIMG_DIRECTION + DIRECTION_S
+{
+    ImageBitmap = Bitmap { File = "directionsouth_22.bmp"; };
+    MASKCOLOR
+};
+
+Image RID_SVXIMG_DIRECTION + DIRECTION_SE
+{
+    ImageBitmap = Bitmap { File = "directionsoutheast_22.bmp"; };
+    MASKCOLOR
+};
+
+Image RID_SVXIMG_PERSPECTIVE
+{
+    ImageBitmap = Bitmap { File = "perspective_16.bmp"; };
+    MASKCOLOR
+};
+
+Image RID_SVXIMG_PARALLEL
+{
+    ImageBitmap = Bitmap { File = "parallel_16.bmp"; };
+    MASKCOLOR
+};
+
+String RID_SVXSTR_PERSPECTIVE
+{
+    Text [ en-US ] = "~Perspective" ;
+};
+
+String RID_SVXSTR_PARALLEL
+{
+    Text [ en-US ] = "P~arallel" ;
+};
+
+String RID_SVXSTR_DIRECTION + DIRECTION_NW
+{
+    Text [ en-US ] = "Extrusion North-West";
+};
+
+String RID_SVXSTR_DIRECTION + DIRECTION_N
+{
+    Text [ en-US ] = "Extrusion North";
+};
+
+String RID_SVXSTR_DIRECTION + DIRECTION_NE
+{
+    Text [ en-US ] = "Extrusion North-East";
+};
+
+String RID_SVXSTR_DIRECTION + DIRECTION_W
+{
+    Text [ en-US ] = "Extrusion West";
+};
+
+String RID_SVXSTR_DIRECTION + DIRECTION_NONE
+{
+    Text [ en-US ] = "Extrusion Backwards";
+};
+
+String RID_SVXSTR_DIRECTION + DIRECTION_E
+{
+    Text [ en-US ] = "Extrusion East";
+};
+
+String RID_SVXSTR_DIRECTION + DIRECTION_SW
+{
+    Text [ en-US ] = "Extrusion South-West";
+};
+
+String RID_SVXSTR_DIRECTION + DIRECTION_S
+{
+    Text [ en-US ] = "Extrusion South";
+};
+
+String RID_SVXSTR_DIRECTION + DIRECTION_SE
+{
+    Text [ en-US ] = "Extrusion South-East";
 };
 
 DockingWindow RID_SVXFLOAT_EXTRUSION_LIGHTING


More information about the Libreoffice-commits mailing list