Re: Need Help for Bug:47302

2013-04-05 Thread Muthu Subramanian K

Hi Vishv,

On 04/01/2013 04:15 PM, Vishv Brahmbhatt wrote:

Hi,

I need help for Bug 47302.
https://bugs.freedesktop.org/show_bug.cgi?id=47302

For *impress* : I have to get slide name in the text-field through
option *Insert-Fields-Slide Name*. Similar to the Page Number option
in the Insert-Fields-Page Number
That's a good start. You could refer to the SvxAuthorField as well for 
reference.




I  am not completely sure of  the correct mechanism of storing slide
name for different slides.But through bits and pieces of understanding,I
have been able to get the *Slidename* in the Text-Field and store it
(because slide name appears perfectly in *Notes(page)* even after
closing  reopening of *impress* file). But still ,I am facing some
problems in *Normal View* ,as the slide name(in text-field)  doesn't
change automatically with *renaming* of the Slide.

You could refer to the code where the slide numbers are reset.
I am guessing it should be called with some Invalidate()



I am attaching my *git-diff patch* for current status on the bug.

So following are my Questions :

(1) What is the exact mechanism that works behind in storing page number
(in text field)(like some array or data structure) and how it can be
used for *Slide Name* too?

http://opengrok.libreoffice.org/search?q=SvxPageFieldproject=core
throws up some interesting results for you.

I think you missed,
http://opengrok.libreoffice.org/xref/core/tools/inc/tools/pstm.hxx#SV_DECL_PERSIST

Which is kind of the the first line in the class definition of SvxPageField:

SV_DECL_PERSIST1( SvxPageField, SvxFieldData, 
com::sun::star::text::textfield::Type::PAGE )


Trace it through and you should be able to find out, how it works.



(2) How can I handle renaming of the Slide (with my existing code) and
the slide name can automatically change in the text-field?
Some kind of refresh needs to occur when the slide orders change - trace 
the pagefield.




(3) In this code ,I am using *pagenumber service* which will affect
*Insert-Fields-Page Number* option (and it will not work properly).So
I need to define a new *service* for *slide name*,but how can I create a
new service and use it?

You would have to create the idls and create the corresponding services.
The easiest way to start is to copy those files and change it accordingly.


Because my attempt to define a new service through IDL file was
not successful ,as compiler did not recognize it.So how can I handle
this problem?

May be you you missed changing some files (?)
Also don't forget to compile modules like officecfg, offapi, etc (afaik) 
- which does the additional work of creating the corresponding C++ 
header files.
The best is to do a 'make' in the root (at least the first time) and a 
fresh make dev-install.





In-spite of many attempts ,I am not able to get further clue about this
problem.So any sort of help is appreciated.

Hope these help.
And its a very nice patch for the first time. I really liked your 
efforts in adding the UI changes as well!


A little more digging and you should be able to complete this.

Thanks a lot for the patch again!
Muthu Subramanian




Thanks and Regards,
Vishv


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice



___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Need Help for Bug:47302

2013-04-01 Thread Vishv Brahmbhatt
Hi,

I need help for Bug 47302.
https://bugs.freedesktop.org/show_bug.cgi?id=47302

For  *impress* : I have to get slide name in the text-field through
option *Insert-Fields-Slide
Name*. Similar to the Page Number option in the Insert-Fields-Page Number

I  am not completely sure of  the correct mechanism of storing slide name
for different slides.But through bits and pieces of understanding,I have
been able to get the *Slidename* in the Text-Field and store it (because
slide name appears perfectly in *Notes(page)* even after closing 
reopening of *impress* file). But still ,I am facing some problems in *Normal
View* ,as the slide name(in text-field)  doesn't change automatically with *
renaming* of the Slide.

I am attaching my *git-diff patch* for current status on the bug.

So following are my Questions :

(1) What is the exact mechanism that works behind in storing page number
(in text field)(like some array or data structure) and how it can be used
for *Slide Name* too?

(2) How can I handle renaming of the Slide (with my existing code) and the
slide name can automatically change in the text-field?

(3) In this code ,I am using *pagenumber service* which will affect
*Insert-Fields-Page
Number* option (and it will not work properly).So I need to define a new *
service* for *slide name*,but how can I create a new service and use it?
Because my attempt to define a new service through IDL file was
not successful ,as compiler did not recognize it.So how can I handle this
problem?


In-spite of many attempts ,I am not able to get further clue about this
problem.So any sort of help is appreciated.


Thanks and Regards,
Vishv


Bug47302.patch
Description: Binary data
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Need Help for Bug 47302 - Adding a new field in Insert-Fields

2013-02-17 Thread Vishv Brahmbhatt
I have the following(attached) *Reply* from one of the developers for my
Earlier Query. But I am slightly confused with my approach in solving the
problem:

After testing some code instances ,I have found out that code  for
Insert-Fields-Slide Name (impress) can be added here * drviewsb.cxx file
*

And Using the method define at  *drviewsb.cxx*,

I am planning to follow this approach:

(1)For getting a *Slide Name. *Create a class (similar to the class) which
is define at *flditem.hxx* .

(2)Use the class created above in deriving the SvxFieldItem( )  at *
drviewsb.cxx* .

(3)As I am not familiar with UNO references used in the *flditem.hxx* , I
am not sure whether this is a right approach or some other approach is
available.

So if someone can guide me with the  approach ,it would be really helpful.

*drviewsb.cxx file* -
http://opengrok.libreoffice.org/xref/core/sd/source/ui/view/drviewsb.cxx#520

*flditem.hxx*-
http://opengrok.libreoffice.org/xref/core/editeng/inc/editeng/flditem.hxx#182

Eagerly waiting for the needed answer.

Regards,
Vishv

*Reply*


 In order to actually implement the feature, you should follow the
 SID_INSERT_FLD_PAGE use cases in .cxx files also:

 http://opengrok.libreoffice.org/search?q=project=coredefs=refs=SID_INSERT_FLD_PAGEpath=%2Fcore%2Fsd%2Fsource%2Fui%2Fview%2Fhist=

 Here you can see what insert field page does (when in draw view):

 http://opengrok.libreoffice.org/xref/core/sd/source/ui/view/drviewsb.cxx#484

 As far as I understand, you should derive an SvxFieldItem for hold a
 text data - but I'm not sure at all. Maybe you should check some
 Writer fields...

 You can get slide name by SdPage::GetName()
 http://opengrok.libreoffice.org/xref/core/sd/inc/sdpage.hxx#282
 http://opengrok.libreoffice.org/xref/core/sd/source/core/sdpage.cxx#2508

 while you can retrieve the SdPage by index here SdDrawDocument::GetSdPage()
 http://opengrok.libreoffice.org/xref/core/sd/source/core/drawdoc2.cxx#199

 Maybe you can get some clues here

 http://opengrok.libreoffice.org/xref/core/sd/source/ui/view/drviewsb.cxx#710


 Regards.

 2013/2/13 Vishv Brahmbhatt vishvbrahmbhat...@gmail.com:
  Hi,
  I need help for this bug
 https://bugs.freedesktop.org/show_bug.cgi?id=47302
  .I am little inexperienced at scripting(xml). So I want help for my
 Query.
 
  As per  comment#1 at the above link.I have done following steps:
 
  1)Added a menuitem with label ~Slide Name at
 
 http://opengrok.libreoffice.org/xref/core/scripting/workben/bindings/impressmenubar.xml#190
 .
 
  2)Added a node oor:name=.uno:InsertSlideField with value=~Slide Name
 at
 
 http://opengrok.libreoffice.org/xref/core/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu#534
 
  3)Added a menuitem with menu:id=.uno:InsertSlideField at
 
 http://opengrok.libreoffice.org/xref/core/sd/uiconfig/simpress/menubar/menubar.xml#147
 
  4)Define SID_INSERT_FLD_SLIDE at
  http://opengrok.libreoffice.org/xref/core/sd/inc/app.hrc#379
 
  5)Added a function SfxVoidItem InsertSlideField SID_INSERT_FLD_SLIDE at
  http://opengrok.libreoffice.org/xref/core/sd/sdi/sdraw.sdi#3472
 
 
  Using above procedure I am able to get ~Slide Name option in
  Insert-Fields-Slide Name.But it is not active/working.
 
  So here is my Query:
 
  (1)Do I need to use some helper functions for viewing  getting Slide
 Name
  ?
 
  If yes ,then which function do I have to use and where can I use it to
 make
  Slide Name option active?
 
  Or I have to make some changes in the above given steps?
 
 
  Eagerly waiting to get some answers in this query.
 
  Regards,
  Vishv
 
  ___
  LibreOffice mailing list
  LibreOffice@lists.freedesktop.org
  http://lists.freedesktop.org/mailman/listinfo/libreoffice
 

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Need Help for Bug 47302 - Adding a new field in Insert-Fields

2013-02-13 Thread Vishv Brahmbhatt
Hi,
I need help for this bug https://bugs.freedesktop.org/show_bug.cgi?id=47302 .I
am little inexperienced at scripting(xml). So I want help for my Query.

As per  *comment#1* at the above link.I have done following steps:

1)Added a menuitem with label *~Slide Name* at
http://opengrok.libreoffice.org/xref/core/scripting/workben/bindings/impressmenubar.xml#190
.

2)Added a node oor:name=.uno:*InsertSlideField* with value=*~Slide Name*
at
http://opengrok.libreoffice.org/xref/core/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu#534

3)Added a menuitem with menu:id=*.uno:InsertSlideField* at
http://opengrok.libreoffice.org/xref/core/sd/uiconfig/simpress/menubar/menubar.xml#147

4)Define *SID_INSERT_FLD_SLIDE* at
http://opengrok.libreoffice.org/xref/core/sd/inc/app.hrc#379

5)Added a function *SfxVoidItem InsertSlideField SID_INSERT_FLD_SLIDE* at
http://opengrok.libreoffice.org/xref/core/sd/sdi/sdraw.sdi#3472


Using above procedure I am able to get ~*Slide Name* option in
*Insert-Fields-Slide
Name*.But it is not active/working.

*So here is my Query:*

(1)Do I need to use some helper functions for viewing  getting *Slide Name
* ?

If yes ,then which function do I have to use and where can I use it to make
*Slide Name* option active?

Or I have to make some *changes* in the above given steps?


Eagerly waiting to get some answers in this query.

Regards,
Vishv
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice