You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by Pavel Janík <Pa...@Janik.cz> on 2013/04/11 07:58:53 UTC

trunk: TOOLBOX_ITEM_HEIGHT redefined

Hi,

current trunk:

Compiling: sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
In file included from /Users/pavel/BUILD/BuildDir/ooo_trunk_src/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx:28:
./NumberFormatPropertyPanel.hrc:45:1: error: "TOOLBOX_ITEM_HEIGHT" redefined
In file included from /Users/pavel/BUILD/BuildDir/ooo_trunk_src/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx:24:
/Users/pavel/BUILD/BuildDir/ooo_trunk_src/solver/400/unxmacxi.pro/inc/sfx2/sidebar/propertypanel.hrc:94:1: error: this is the location of the previous definition
dmake:  Error code 1, while making '../../../unxmacxi.pro/slo/NumberFormatPropertyPanel.obj'
ERROR: error 65280 occurred while making /Users/pavel/BUILD/BuildDir/ooo_trunk_src/sc/source/ui/sidebar


-- 
Pavel Janík




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: trunk: TOOLBOX_ITEM_HEIGHT redefined

Posted by Andre Fischer <aw...@gmail.com>.
On 17.05.2013 10:02, Pavel Janík wrote:
> On May 17, 2013, at 9:49 AM, Andre Fischer wrote:
>
>> On 17.05.2013 09:44, Pavel Janík wrote:
>>> Hi Andre,
>>>
>>>> This should make a difference because in sfx2/sidebar/ResourceDefinitions.hrcTOOLBOX_ITEM_HEIGHT is defined to be 15, not 12.  But I tried both versions and can not see a difference.  But still
>>>>
>>>> #undef 	TOOLBOX_ITEM_HEIGHT
>>>> #define	TOOLBOX_ITEM_HEIGHT					12
>>>>
>>>>
>>>> might be safer.
>>> This only hides the problem and makes the code looking strange. What about using different name/prefix or something other?
>> I would prefer the 'something other' option: refactor the definition of positions of the number format panel.  But I don't have the time for it right now.
> Well, yes. But...
>
> This constant is used in three files in sidebar directory:
>
> source/ui/sidebar/AlignmentPropertyPanel.hrc:#define FT_LEFTINDENT_Y							(ALIGNMENT_Y + TOOLBOX_ITEM_HEIGHT + TBX_OUT_BORDER_OFFSET_Y + CONTROL_SPACING_VERTICAL)
>
> source/ui/sidebar/AlignmentPropertyPanel.src:		Size = MAP_APPFONT ( TOOLBOX_ITEM_WIDTH * 3 ,  TOOLBOX_ITEM_HEIGHT) ;
>
> source/ui/sidebar/NumberFormatPropertyPanel.hrc:#define	TOOLBOX_ITEM_HEIGHT					12
> source/ui/sidebar/NumberFormatPropertyPanel.hrc:#define FT_DECIMALS_Y						TBX_CATEGORY_Y + TOOLBOX_ITEM_HEIGHT + 4 + CONTROL_SPACING_VERTICAL
>
> In the first case, it's value is 15, in the second case it is 12. This will lead to some error in the near future...
>
> So is this the right solution?
>
> sed -i 's#TOOLBOX_ITEM_HEIGHT#LOCAL_TOOLBOX_ITEM_HEIGHT#' source/ui/sidebar/NumberFormatPropertyPanel.hrc

Yes, looks good.

-Andre



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: trunk: TOOLBOX_ITEM_HEIGHT redefined

Posted by Pavel Janík <Pa...@Janik.cz>.
On May 17, 2013, at 9:49 AM, Andre Fischer wrote:

> On 17.05.2013 09:44, Pavel Janík wrote:
>> Hi Andre,
>> 
>>> This should make a difference because in sfx2/sidebar/ResourceDefinitions.hrcTOOLBOX_ITEM_HEIGHT is defined to be 15, not 12.  But I tried both versions and can not see a difference.  But still
>>> 
>>> #undef 	TOOLBOX_ITEM_HEIGHT
>>> #define	TOOLBOX_ITEM_HEIGHT					12
>>> 
>>> 
>>> might be safer.
>> This only hides the problem and makes the code looking strange. What about using different name/prefix or something other?
> 
> I would prefer the 'something other' option: refactor the definition of positions of the number format panel.  But I don't have the time for it right now.

Well, yes. But...

This constant is used in three files in sidebar directory:

source/ui/sidebar/AlignmentPropertyPanel.hrc:#define FT_LEFTINDENT_Y							(ALIGNMENT_Y + TOOLBOX_ITEM_HEIGHT + TBX_OUT_BORDER_OFFSET_Y + CONTROL_SPACING_VERTICAL)

source/ui/sidebar/AlignmentPropertyPanel.src:		Size = MAP_APPFONT ( TOOLBOX_ITEM_WIDTH * 3 ,  TOOLBOX_ITEM_HEIGHT) ;

source/ui/sidebar/NumberFormatPropertyPanel.hrc:#define	TOOLBOX_ITEM_HEIGHT					12
source/ui/sidebar/NumberFormatPropertyPanel.hrc:#define FT_DECIMALS_Y						TBX_CATEGORY_Y + TOOLBOX_ITEM_HEIGHT + 4 + CONTROL_SPACING_VERTICAL

In the first case, it's value is 15, in the second case it is 12. This will lead to some error in the near future...

So is this the right solution?

sed -i 's#TOOLBOX_ITEM_HEIGHT#LOCAL_TOOLBOX_ITEM_HEIGHT#' source/ui/sidebar/NumberFormatPropertyPanel.hrc
-- 
Pavel Janík




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: trunk: TOOLBOX_ITEM_HEIGHT redefined

Posted by Andre Fischer <aw...@gmail.com>.
On 17.05.2013 09:44, Pavel Janík wrote:
> Hi Andre,
>
>> This should make a difference because in sfx2/sidebar/ResourceDefinitions.hrcTOOLBOX_ITEM_HEIGHT is defined to be 15, not 12.  But I tried both versions and can not see a difference.  But still
>>
>> #undef 	TOOLBOX_ITEM_HEIGHT
>> #define	TOOLBOX_ITEM_HEIGHT					12
>>
>>
>> might be safer.
> This only hides the problem and makes the code looking strange. What about using different name/prefix or something other?

I would prefer the 'something other' option: refactor the definition of 
positions of the number format panel.  But I don't have the time for it 
right now.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: trunk: TOOLBOX_ITEM_HEIGHT redefined

Posted by Pavel Janík <Pa...@Janik.cz>.
Hi Andre,

> This should make a difference because in sfx2/sidebar/ResourceDefinitions.hrcTOOLBOX_ITEM_HEIGHT is defined to be 15, not 12.  But I tried both versions and can not see a difference.  But still
> 
> #undef 	TOOLBOX_ITEM_HEIGHT
> #define	TOOLBOX_ITEM_HEIGHT					12
> 
> 
> might be safer.

This only hides the problem and makes the code looking strange. What about using different name/prefix or something other?
-- 
Pavel Janík




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: trunk: TOOLBOX_ITEM_HEIGHT redefined

Posted by Andre Fischer <aw...@gmail.com>.
On 17.05.2013 07:36, Pavel Janík wrote:
> On Apr 11, 2013, at 7:58 AM, Pavel Janík wrote:
>
>> current trunk:
>>
>> Compiling: sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
>> In file included from /Users/pavel/BUILD/BuildDir/ooo_trunk_src/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx:28:
>> ./NumberFormatPropertyPanel.hrc:45:1: error: "TOOLBOX_ITEM_HEIGHT" redefined
>> In file included from /Users/pavel/BUILD/BuildDir/ooo_trunk_src/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx:24:
>> /Users/pavel/BUILD/BuildDir/ooo_trunk_src/solver/400/unxmacxi.pro/inc/sfx2/sidebar/propertypanel.hrc:94:1: error: this is the location of the previous definition
>> dmake:  Error code 1, while making '../../../unxmacxi.pro/slo/NumberFormatPropertyPanel.obj'
>> ERROR: error 65280 occurred while making /Users/pavel/BUILD/BuildDir/ooo_trunk_src/sc/source/ui/sidebar
> This is still the case in the current tree.
>
> As a workaround, I have this in my tree. Is this constant the same as in sfx2? Should it be the same value?
>
> Index: source/ui/sidebar/NumberFormatPropertyPanel.hrc
> ===================================================================
> --- source/ui/sidebar/NumberFormatPropertyPanel.hrc	(revision 1483653)
> +++ source/ui/sidebar/NumberFormatPropertyPanel.hrc	(working copy)
> @@ -37,7 +37,7 @@
>   //===============================================================position=============================================
>   
>   #define MBOX_WIDTH							28
> -#define	TOOLBOX_ITEM_HEIGHT					12
> +// #define	TOOLBOX_ITEM_HEIGHT					12
>   #define CHECKBOX_HEIGHT						10
>   
>   #define FT_CATEGORY_X						SECTIONPAGE_MARGIN_HORIZONTAL

This should make a difference because in 
sfx2/sidebar/ResourceDefinitions.hrcTOOLBOX_ITEM_HEIGHT is defined to be 
15, not 12.  But I tried both versions and can not see a difference.  
But still

#undef 	TOOLBOX_ITEM_HEIGHT
#define	TOOLBOX_ITEM_HEIGHT					12


might be safer.

-Andre

>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: trunk: TOOLBOX_ITEM_HEIGHT redefined

Posted by Pavel Janík <Pa...@Janik.cz>.
On Apr 11, 2013, at 7:58 AM, Pavel Janík wrote:

> current trunk:
> 
> Compiling: sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
> In file included from /Users/pavel/BUILD/BuildDir/ooo_trunk_src/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx:28:
> ./NumberFormatPropertyPanel.hrc:45:1: error: "TOOLBOX_ITEM_HEIGHT" redefined
> In file included from /Users/pavel/BUILD/BuildDir/ooo_trunk_src/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx:24:
> /Users/pavel/BUILD/BuildDir/ooo_trunk_src/solver/400/unxmacxi.pro/inc/sfx2/sidebar/propertypanel.hrc:94:1: error: this is the location of the previous definition
> dmake:  Error code 1, while making '../../../unxmacxi.pro/slo/NumberFormatPropertyPanel.obj'
> ERROR: error 65280 occurred while making /Users/pavel/BUILD/BuildDir/ooo_trunk_src/sc/source/ui/sidebar

This is still the case in the current tree.

As a workaround, I have this in my tree. Is this constant the same as in sfx2? Should it be the same value?

Index: source/ui/sidebar/NumberFormatPropertyPanel.hrc
===================================================================
--- source/ui/sidebar/NumberFormatPropertyPanel.hrc	(revision 1483653)
+++ source/ui/sidebar/NumberFormatPropertyPanel.hrc	(working copy)
@@ -37,7 +37,7 @@
 //===============================================================position=============================================
 
 #define MBOX_WIDTH							28
-#define	TOOLBOX_ITEM_HEIGHT					12
+// #define	TOOLBOX_ITEM_HEIGHT					12
 #define CHECKBOX_HEIGHT						10
 
 #define FT_CATEGORY_X						SECTIONPAGE_MARGIN_HORIZONTAL


-- 
Pavel Janík




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: trunk: TOOLBOX_ITEM_HEIGHT redefined

Posted by Pavel Janík <Pa...@Janik.cz>.
> did you made a clean build? Ok you compile with warning as errors but
> this is no warning. I am surprised because I have built over night trunk
> on my Mac and everything was fine.

I always do clean builds and WaE.
-- 
Pavel Janík




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: trunk: TOOLBOX_ITEM_HEIGHT redefined

Posted by Jürgen Schmidt <jo...@gmail.com>.
On 4/11/13 7:58 AM, Pavel Janík wrote:
> Hi,
> 
> current trunk:
> 
> Compiling: sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
> In file included from /Users/pavel/BUILD/BuildDir/ooo_trunk_src/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx:28:
> ./NumberFormatPropertyPanel.hrc:45:1: error: "TOOLBOX_ITEM_HEIGHT" redefined
> In file included from /Users/pavel/BUILD/BuildDir/ooo_trunk_src/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx:24:
> /Users/pavel/BUILD/BuildDir/ooo_trunk_src/solver/400/unxmacxi.pro/inc/sfx2/sidebar/propertypanel.hrc:94:1: error: this is the location of the previous definition
> dmake:  Error code 1, while making '../../../unxmacxi.pro/slo/NumberFormatPropertyPanel.obj'
> ERROR: error 65280 occurred while making /Users/pavel/BUILD/BuildDir/ooo_trunk_src/sc/source/ui/sidebar
> 
> 

did you made a clean build? Ok you compile with warning as errors but
this is no warning. I am surprised because I have built over night trunk
on my Mac and everything was fine.

Juergen


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org