https://bugs.documentfoundation.org/show_bug.cgi?id=147791

--- Comment #5 from Jim Raykowski <rayk...@gmail.com> ---
code pointers:

https://design.blog.documentfoundation.org/2018/02/28/easyhacking-all-about-terminology/

An article that illustrates how to add an UNO command for Calc:
https://dev.blog.documentfoundation.org/2022/02/23/adding-a-new-uno-command/ 

For Writer, instead, add the new command to
officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu, perhaps
.uno:PrintVisiblePagesDirect.

officecfg/registry/schema/org/openoffice/Office/UI/Commands.xcs contains
information on properties used in the .xcu file.

core/sw/inc/cmdid.h
perhaps FN_PRINT_VISPAGESDIRECT or SID_PRINT_VISPAGESDIRECT (FN for FuNction,
SID for Slot ID, either will work)

sw/sdi/swriter.sdi
sw/sdi/_viewsh.sdi

sw/source/uibase/uiview/viewprt.cxx
void SwView::ExecutePrint
add a case for the chosen command id:

sw/inc/viewsh.hxx
void GetFirstLastVisPageNumbers (not yet merged, please see
https://gerrit.libreoffice.org/c/core/+/132252)

sfx2/source/view/viewprn.cxx
void SfxViewShell::ExecPrint

sw/source/uibase/uiview/viewstat.cxx
void SwView::GetState(SfxItemSet &rSet)
add a case for the chosen command id:
do similar to what is done in sfx2/source/view/viewsh.cxx void
SfxViewShell::GetState_Impl for case SID_PRINTDOC and case SID_PRINTDOCDIRECT

https://gerrit.libreoffice.org/c/core/+/91605 is an example of two UNO commands
added to Writer.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to