Hi, sorry it took so long to reply, just now we were able to start this task.
We are found how to remove tint from GrabBug, but we still do not quite understand where the model can be located, in which we need to add a new attribute. As we understand it, you should look in the sw module, but could you tell us exactly where to look?
We are found how to remove tint from GrabBug, but we still do not quite understand where the model can be located, in which we need to add a new attribute. As we understand it, you should look in the sw module, but could you tell us exactly where to look?
Суббота, 22 июля 2023, 13:48 +04:00 от Tomaž Vajngerl <quikee@xxxxxxxxx>:
Hi,
On Thu, Jul 20, 2023 at 4:53PM владислав тараканов
<vladislav.tarakanov@xxxxx> wrote:
>
> Hello
>
> We, together with irgaliev01@xxxxxxx, want to try adding support for various text styles (glow, tint, shadow, etc.) in Writer. But we are still only beginner developers, so we would like to ask where exactly in the code should we start fixing this problem? We've previously looked at the oox and sfx2 modules but didn't find anything relevant.
Great. There are multiple things you need to do to add a missing
feature like this:
- extend the model to store the additional data about the feature -
for example glow radius (inside sw)
- use the new data in the model to influence the rendering (inside sw)
- access the new data via UNO if needed (sw, offapi)
- add file format support for OOXML - import and export (mainly
writerfilter, also oox and sw)
- add support for ODF - import and export (sw, xmloff)
- extend the UI to manipulate the new data (sw)
I would first make it so that you get the data into the model and that
it is properly filled when you open an OOXML file and properly saved
to an OOXML file when you save the document. Currently we preserve the
data of text effects, but we preserve it by putting it into what we
call a "GrabBag". This stores the data inside the model, but only for
the purpose that it survives a import/export cycle and not to be a
proper part of the model. Tests for these things are in [1] but the
import is located in [2] and export is located in [3] - so first you
have to change those to not use "GrabBag" anymore for the text effects
you want to implement (glow for example) and store the data at the
same level that the text color, outline or shadow data is already
saved. One you have this, then you can look into how to actually
render these things (probably very similar to how shadows are already
rendered), but first I would make sure that you have properly solved
the model part of this.
[1] sw/qa/extras/ooxmlexport/ooxmlw14export.cxx
[2] writerfilter/source/dmapper/TextEffectsHandler.cxx
[3] sw/source/filter/ww8/docxattributeoutput.cxx
If you have any questions, don't hesitate to ask.
> --
> Vladislav Tarakanov
Best regards,
Tomaž Vajngerl
--
Sincerely,
Irgaliev Amin
Sincerely,
Irgaliev Amin